@labelbee/lb-components 1.2.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 +31 -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_a.svg.js +1 -0
- package/dist/assets/annotation/pointTool/icon_point_a.svg.js +1 -0
- package/dist/assets/annotation/polygonTool/icon_polygon_a.svg.js +1 -0
- package/dist/assets/annotation/rectTool/icon_rectPattern.svg.js +1 -0
- package/dist/assets/annotation/toolHotKeyIcon/icon_alttab_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_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_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_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_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/attributeIcon/zoomUp.svg.js +1 -0
- package/dist/assets/cssIcon/annotation/icon_clearSmall.svg +10 -0
- package/dist/assets/cssIcon/annotation/icon_clearSmall_a.svg +10 -0
- package/dist/assets/cssIcon/slide_btn.svg +23 -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/ImageError/index.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/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/useRafState.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 +835 -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/reducer.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 +41 -0
- package/dist/types/components/AnnotationView/index.d.ts +24 -0
- package/dist/types/components/ImageError/index.d.ts +14 -0
- package/dist/types/components/annotationStepPopover/index.d.ts +8 -0
- package/dist/types/components/attributeList/index.d.ts +16 -0
- package/dist/types/components/checkboxList/index.d.ts +8 -0
- package/dist/types/components/colorTag/index.d.ts +1 -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/configureStore.d.ts +3 -0
- package/dist/types/constant/index.d.ts +18 -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 +43 -0
- package/dist/types/hooks/useRafState.d.ts +3 -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 +9 -0
- package/dist/types/store/Actions.d.ts +31 -0
- package/dist/types/store/annotation/actionCreators.d.ts +56 -0
- package/dist/types/store/annotation/reducer.d.ts +14 -0
- package/dist/types/store/annotation/types.d.ts +100 -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 +18 -0
- package/dist/types/utils/TextUtils.d.ts +7 -0
- package/dist/types/utils/ToolStyleUtils.d.ts +18 -0
- package/dist/types/utils/data.d.ts +15 -0
- package/dist/types/utils/dom.d.ts +5 -0
- package/dist/types/utils/index.d.ts +5 -0
- package/dist/types/views/MainView/annotationOperation/index.d.ts +19 -0
- package/dist/types/views/MainView/index.d.ts +4 -0
- package/dist/types/views/MainView/sidebar/AnnotationText/index.d.ts +7 -0
- package/dist/types/views/MainView/sidebar/ClearIcon/index.d.ts +2 -0
- package/dist/types/views/MainView/sidebar/GeneralOperation/index.d.ts +12 -0
- package/dist/types/views/MainView/sidebar/ImgAttributeInfo/index.d.ts +6 -0
- package/dist/types/views/MainView/sidebar/SwitchAttributeList/index.d.ts +9 -0
- package/dist/types/views/MainView/sidebar/TagSidebar/index.d.ts +9 -0
- package/dist/types/views/MainView/sidebar/TextAreaFormat/index.d.ts +8 -0
- package/dist/types/views/MainView/sidebar/TextToolSidebar/index.d.ts +20 -0
- package/dist/types/views/MainView/sidebar/ToolStyle/index.d.ts +7 -0
- package/dist/types/views/MainView/sidebar/index.d.ts +7 -0
- package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/common/index.d.ts +109 -0
- package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/index.d.ts +13 -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/polygon/index.d.ts +79 -0
- package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/rectToolShortCutTable/index.d.ts +38 -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/index.d.ts +3 -0
- package/dist/types/views/MainView/toolFooter/HiddenTips/index.d.ts +6 -0
- package/dist/types/views/MainView/toolFooter/PageNumber/index.d.ts +6 -0
- package/dist/types/views/MainView/toolFooter/ZoomController/ZoomLevel/index.d.ts +7 -0
- package/dist/types/views/MainView/toolFooter/ZoomController/index.d.ts +8 -0
- package/dist/types/views/MainView/toolFooter/index.d.ts +22 -0
- package/dist/types/views/MainView/toolHeader/ExportData/index.d.ts +13 -0
- package/dist/types/views/MainView/toolHeader/StepSwitch/index.d.ts +12 -0
- package/dist/types/views/MainView/toolHeader/headerOption/index.d.ts +8 -0
- package/dist/types/views/MainView/toolHeader/index.d.ts +19 -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/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/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/index.js +1 -0
- package/dist/views/MainView/sidebar/ImgAttributeInfo/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/ToolStyle/index.js +1 -0
- package/dist/views/MainView/sidebar/index.js +1 -0
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/common/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/polygon/index.js +1 -0
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/rectToolShortCutTable/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/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/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/App.js.map +1 -0
- package/es/assets/annotation/common/icon_adapt.svg.js +1 -0
- package/es/assets/annotation/common/icon_adapt.svg.js.map +1 -0
- package/es/assets/annotation/common/icon_adapt_black.svg.js +1 -0
- package/es/assets/annotation/common/icon_adapt_black.svg.js.map +1 -0
- package/es/assets/annotation/common/icon_back.svg.js +1 -0
- package/es/assets/annotation/common/icon_back.svg.js.map +1 -0
- package/es/assets/annotation/common/icon_backA.svg.js +1 -0
- package/es/assets/annotation/common/icon_backA.svg.js.map +1 -0
- package/es/assets/annotation/common/icon_clear.svg.js +1 -0
- package/es/assets/annotation/common/icon_clear.svg.js.map +1 -0
- package/es/assets/annotation/common/icon_clearSmall.svg.js +1 -0
- package/es/assets/annotation/common/icon_clearSmall.svg.js.map +1 -0
- package/es/assets/annotation/common/icon_clearSmall_a.svg.js +1 -0
- package/es/assets/annotation/common/icon_clearSmall_a.svg.js.map +1 -0
- package/es/assets/annotation/common/icon_clear_a.svg.js +1 -0
- package/es/assets/annotation/common/icon_clear_a.svg.js.map +1 -0
- package/es/assets/annotation/common/icon_invalid.svg.js +1 -0
- package/es/assets/annotation/common/icon_invalid.svg.js.map +1 -0
- package/es/assets/annotation/common/icon_invalid_a.svg.js +1 -0
- package/es/assets/annotation/common/icon_invalid_a.svg.js.map +1 -0
- package/es/assets/annotation/common/icon_next.svg.js +1 -0
- package/es/assets/annotation/common/icon_next.svg.js.map +1 -0
- package/es/assets/annotation/common/icon_nextA.svg.js +1 -0
- package/es/assets/annotation/common/icon_nextA.svg.js.map +1 -0
- package/es/assets/annotation/common/icon_r.svg.js +1 -0
- package/es/assets/annotation/common/icon_r.svg.js.map +1 -0
- package/es/assets/annotation/common/icon_rA.svg.js +1 -0
- package/es/assets/annotation/common/icon_rA.svg.js.map +1 -0
- package/es/assets/annotation/common/icon_save.svg.js +1 -0
- package/es/assets/annotation/common/icon_save.svg.js.map +1 -0
- package/es/assets/annotation/common/icon_saveA.svg.js +1 -0
- package/es/assets/annotation/common/icon_saveA.svg.js.map +1 -0
- package/es/assets/annotation/image/brightness.svg.js +1 -0
- package/es/assets/annotation/image/brightness.svg.js.map +1 -0
- package/es/assets/annotation/image/contrast.svg.js +1 -0
- package/es/assets/annotation/image/contrast.svg.js.map +1 -0
- package/es/assets/annotation/image/icon_yuantu.svg.js +1 -0
- package/es/assets/annotation/image/icon_yuantu.svg.js.map +1 -0
- package/es/assets/annotation/image/saturation.svg.js +1 -0
- package/es/assets/annotation/image/saturation.svg.js.map +1 -0
- package/es/assets/annotation/lineTool/icon_line_a.svg.js +1 -0
- package/es/assets/annotation/lineTool/icon_line_a.svg.js.map +1 -0
- package/es/assets/annotation/pointTool/icon_point_a.svg.js +1 -0
- package/es/assets/annotation/pointTool/icon_point_a.svg.js.map +1 -0
- package/es/assets/annotation/polygonTool/icon_polygon_a.svg.js +1 -0
- package/es/assets/annotation/polygonTool/icon_polygon_a.svg.js.map +1 -0
- package/es/assets/annotation/rectTool/icon_rectPattern.svg.js +1 -0
- package/es/assets/annotation/rectTool/icon_rectPattern.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_alttab_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_alttab_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_cencel_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_cencel_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_del_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_del_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_frameActive_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_frameActive_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_frameChange_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_frameChange_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_frameNull_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_frameNull_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_frame_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_frame_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_fullView_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_fullView_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_kj1.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_kj1.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_kj_h.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_kj_h.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_last_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_last_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_lineActive_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_lineActive_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_lineChange_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_lineChange_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_lineCont_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_lineCont_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_lineDel_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_lineDel_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_lineInsert_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_lineInsert_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_lineNull_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_lineNull_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_lineSpecial_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_lineSpecial_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_line_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_line_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_loupe_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_loupe_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_mouse_left_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_mouse_left_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_mouse_middle_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_mouse_middle_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_mouse_right_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_mouse_right_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_move_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_move_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_next_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_next_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_noDisplay.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_noDisplay.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_pointActive_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_pointActive_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_pointNull_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_pointNull_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_point_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_point_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_polygonActive_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_polygonActive_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_polygonChange_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_polygonChange_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_polygonDel_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_polygonDel_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_polygonInsert_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_polygonInsert_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_polygonNull_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_polygonNull_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_reform_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_reform_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_reload_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_reload_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_save_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_save_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_straightLine_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_straightLine_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_tab_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_tab_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_tag_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_tag_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_unGrip_kj.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/icon_unGrip_kj.svg.js.map +1 -0
- package/es/assets/annotation/toolHotKeyIcon/setValid.svg.js +1 -0
- package/es/assets/annotation/toolHotKeyIcon/setValid.svg.js.map +1 -0
- package/es/assets/attributeIcon/zoomUp.svg.js +1 -0
- package/es/assets/attributeIcon/zoomUp.svg.js.map +1 -0
- package/es/assets/cssIcon/annotation/icon_clearSmall.svg +10 -0
- package/es/assets/cssIcon/annotation/icon_clearSmall_a.svg +10 -0
- package/es/assets/cssIcon/slide_btn.svg +23 -0
- package/es/assets/toolStyle/icon_border.svg.js +1 -0
- package/es/assets/toolStyle/icon_border.svg.js.map +1 -0
- package/es/assets/toolStyle/icon_borderColor.svg.js +1 -0
- package/es/assets/toolStyle/icon_borderColor.svg.js.map +1 -0
- package/es/assets/toolStyle/icon_opacityFill.svg.js +1 -0
- package/es/assets/toolStyle/icon_opacityFill.svg.js.map +1 -0
- package/es/assets/toolStyle/icon_opacityStroke.svg.js +1 -0
- package/es/assets/toolStyle/icon_opacityStroke.svg.js.map +1 -0
- package/es/components/AnnotationView/index.js +1 -0
- package/es/components/AnnotationView/index.js.map +1 -0
- package/es/components/ImageError/index.js +1 -0
- package/es/components/ImageError/index.js.map +1 -0
- package/es/components/annotationStepPopover/index.js +1 -0
- package/es/components/annotationStepPopover/index.js.map +1 -0
- package/es/components/attributeList/index.js +1 -0
- package/es/components/attributeList/index.js.map +1 -0
- package/es/components/checkboxList/index.js +1 -0
- package/es/components/checkboxList/index.js.map +1 -0
- package/es/components/colorTag/index.js +1 -0
- package/es/components/colorTag/index.js.map +1 -0
- package/es/components/customAntd/IconWithText/index.js +1 -0
- package/es/components/customAntd/IconWithText/index.js.map +1 -0
- package/es/components/customResizeHook/index.js +1 -0
- package/es/components/customResizeHook/index.js.map +1 -0
- package/es/configureStore.js +1 -0
- package/es/configureStore.js.map +1 -0
- package/es/constant/index.js +1 -0
- package/es/constant/index.js.map +1 -0
- package/es/constant/styleString.js +1 -0
- package/es/constant/styleString.js.map +1 -0
- package/es/data/Style.js +1 -0
- package/es/data/Style.js.map +1 -0
- package/es/data/enums/AnnotationSize.js +1 -0
- package/es/data/enums/AnnotationSize.js.map +1 -0
- package/es/data/enums/ToolType.js +1 -0
- package/es/data/enums/ToolType.js.map +1 -0
- package/es/hooks/useRafState.js +1 -0
- package/es/hooks/useRafState.js.map +1 -0
- package/es/hooks/useSafeSate.js +1 -0
- package/es/hooks/useSafeSate.js.map +1 -0
- package/es/hooks/useSize.js +1 -0
- package/es/hooks/useSize.js.map +1 -0
- package/es/hooks/useUnmountedRef.js +1 -0
- package/es/hooks/useUnmountedRef.js.map +1 -0
- package/es/index.js +1 -0
- package/es/index.js.map +1 -0
- package/es/store/Actions.js +1 -0
- package/es/store/Actions.js.map +1 -0
- package/es/store/annotation/actionCreators.js +1 -0
- package/es/store/annotation/actionCreators.js.map +1 -0
- package/es/store/annotation/reducer.js +1 -0
- package/es/store/annotation/reducer.js.map +1 -0
- package/es/store/imgAttribute/actionCreators.js +1 -0
- package/es/store/imgAttribute/actionCreators.js.map +1 -0
- package/es/store/imgAttribute/reducer.js +1 -0
- package/es/store/imgAttribute/reducer.js.map +1 -0
- package/es/store/index.js +1 -0
- package/es/store/index.js.map +1 -0
- package/es/store/toolStyle/actionCreators.js +1 -0
- package/es/store/toolStyle/actionCreators.js.map +1 -0
- package/es/store/toolStyle/reducer.js +1 -0
- package/es/store/toolStyle/reducer.js.map +1 -0
- package/es/utils/AnnotationDataUtils.js +1 -0
- package/es/utils/AnnotationDataUtils.js.map +1 -0
- package/es/utils/ConfigUtils.js +1 -0
- package/es/utils/ConfigUtils.js.map +1 -0
- package/es/utils/PageOperator.js +1 -0
- package/es/utils/PageOperator.js.map +1 -0
- package/es/utils/StepUtils.js +1 -0
- package/es/utils/StepUtils.js.map +1 -0
- package/es/utils/TextUtils.js +1 -0
- package/es/utils/TextUtils.js.map +1 -0
- package/es/utils/ToolStyleUtils.js +1 -0
- package/es/utils/ToolStyleUtils.js.map +1 -0
- package/es/utils/data.js +1 -0
- package/es/utils/data.js.map +1 -0
- package/es/utils/dom.js +1 -0
- package/es/utils/dom.js.map +1 -0
- package/es/utils/index.js +1 -0
- package/es/utils/index.js.map +1 -0
- package/es/views/MainView/annotationOperation/index.js +1 -0
- package/es/views/MainView/annotationOperation/index.js.map +1 -0
- package/es/views/MainView/index.js +1 -0
- package/es/views/MainView/index.js.map +1 -0
- package/es/views/MainView/sidebar/AnnotationText/index.js +1 -0
- package/es/views/MainView/sidebar/AnnotationText/index.js.map +1 -0
- package/es/views/MainView/sidebar/ClearIcon/index.js +1 -0
- package/es/views/MainView/sidebar/ClearIcon/index.js.map +1 -0
- package/es/views/MainView/sidebar/GeneralOperation/index.js +1 -0
- package/es/views/MainView/sidebar/GeneralOperation/index.js.map +1 -0
- package/es/views/MainView/sidebar/ImgAttributeInfo/index.js +1 -0
- package/es/views/MainView/sidebar/ImgAttributeInfo/index.js.map +1 -0
- package/es/views/MainView/sidebar/SwitchAttributeList/index.js +1 -0
- package/es/views/MainView/sidebar/SwitchAttributeList/index.js.map +1 -0
- package/es/views/MainView/sidebar/TagSidebar/index.js +1 -0
- package/es/views/MainView/sidebar/TagSidebar/index.js.map +1 -0
- package/es/views/MainView/sidebar/TextAreaFormat/index.js +1 -0
- package/es/views/MainView/sidebar/TextAreaFormat/index.js.map +1 -0
- package/es/views/MainView/sidebar/TextToolSidebar/index.js +1 -0
- package/es/views/MainView/sidebar/TextToolSidebar/index.js.map +1 -0
- package/es/views/MainView/sidebar/ToolStyle/index.js +1 -0
- package/es/views/MainView/sidebar/ToolStyle/index.js.map +1 -0
- package/es/views/MainView/sidebar/index.js +1 -0
- package/es/views/MainView/sidebar/index.js.map +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/common/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/common/index.js.map +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js.map +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/line/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/line/index.js.map +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/point/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/point/index.js.map +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/polygon/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/polygon/index.js.map +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/rectToolShortCutTable/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/rectToolShortCutTable/index.js.map +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/tag/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/tag/index.js.map +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/text/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/text/index.js.map +1 -0
- package/es/views/MainView/toolFooter/FooterTips/index.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/index.js.map +1 -0
- package/es/views/MainView/toolFooter/HiddenTips/index.js +1 -0
- package/es/views/MainView/toolFooter/HiddenTips/index.js.map +1 -0
- package/es/views/MainView/toolFooter/PageNumber/index.js +1 -0
- package/es/views/MainView/toolFooter/PageNumber/index.js.map +1 -0
- package/es/views/MainView/toolFooter/ZoomController/ZoomLevel/index.js +1 -0
- package/es/views/MainView/toolFooter/ZoomController/ZoomLevel/index.js.map +1 -0
- package/es/views/MainView/toolFooter/ZoomController/index.js +1 -0
- package/es/views/MainView/toolFooter/ZoomController/index.js.map +1 -0
- package/es/views/MainView/toolFooter/index.js +1 -0
- package/es/views/MainView/toolFooter/index.js.map +1 -0
- package/es/views/MainView/toolHeader/ExportData/index.js +1 -0
- package/es/views/MainView/toolHeader/ExportData/index.js.map +1 -0
- package/es/views/MainView/toolHeader/StepSwitch/index.js +1 -0
- package/es/views/MainView/toolHeader/StepSwitch/index.js.map +1 -0
- package/es/views/MainView/toolHeader/headerOption/index.js +1 -0
- package/es/views/MainView/toolHeader/headerOption/index.js.map +1 -0
- package/es/views/MainView/toolHeader/index.js +1 -0
- package/es/views/MainView/toolHeader/index.js.map +1 -0
- package/package.json +98 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),reactRedux=require("react-redux"),configureStore=require("./configureStore.js"),App=require("./App.js"),actionCreators=require("./store/annotation/actionCreators.js"),lbUtils=require("@sensetime/lb-utils"),reactI18next=require("react-i18next"),index$1=require("./components/AnnotationView/index.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,r,t)=>r in e?__defProp(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,__spreadValues=(e,r)=>{for(var t in r||(r={}))__hasOwnProp.call(r,t)&&__defNormalProp(e,t,r[t]);if(__getOwnPropSymbols)for(var t of __getOwnPropSymbols(r))__propIsEnum.call(r,t)&&__defNormalProp(e,t,r[t]);return e},__spreadProps=(e,r)=>__defProps(e,__getOwnPropDescs(r));const store=configureStore(),OutputApp=(e,r)=>{const[t,a]=React.useState();return React.useImperativeHandle(r,()=>({toolInstance:t,pageBackwardActions:()=>store.dispatch(actionCreators.PageBackward()),pageForwardActions:()=>store.dispatch(actionCreators.PageForward()),pageJump:o=>{const n=~~o-1;store.dispatch(actionCreators.PageJump(n))},hello:()=>alert("hello labelBee!!!")}),[t]),React__default.default.createElement(reactRedux.Provider,{store},React__default.default.createElement(reactI18next.I18nextProvider,{i18n:lbUtils.i18n},React__default.default.createElement(App,__spreadProps(__spreadValues({},e),{setToolInstance:a}))))};var index=React__default.default.forwardRef(OutputApp);Object.defineProperty(exports,"i18n",{enumerable:!0,get:function(){return lbUtils.i18n}}),exports.AnnotationView=index$1,exports.default=index,exports.store=store;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const ANNOTATION_ACTIONS={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",UPDATE_ON_SUBMIT:"@@UPDATE_ON_SUBMIT",UPDATE_ON_SAVE:"@@UPDATE_ON_SAVE",UPDATE_ROTATE:"@@UPDATE_ROTATE",UPDATE_GET_FILE_DATA:"@@UPDATE_GET_FILE_DATA",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",SET_LOADING:"@@SET_LOADING"},IMAGE_ATTRIBUTE_ACTIONS={UPDATE_IMG_ATTRIBUTE:"@@UPDATE_IMG_ATTRIBUTE",INIT_IMG_ATTRIBUTE:"@@INIT_IMG_ATTRIBUTE"},TOOL_STYLE_ACTIONS={INIT_TOOL_STYLE_CONFIG:"@@INIT_TOOL_STYLE_CONFIG",UPDATE_TOOL_STYLE_CONFIG:"@@UPDATE_TOOL_STYLE_CONFIG"};exports.ANNOTATION_ACTIONS=ANNOTATION_ACTIONS,exports.IMAGE_ATTRIBUTE_ACTIONS=IMAGE_ATTRIBUTE_ACTIONS,exports.TOOL_STYLE_ACTIONS=TOOL_STYLE_ACTIONS;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Actions=require("../Actions.js"),reducer=require("./reducer.js"),index=require("../../constant/index.js"),AnnotationSize=require("../../data/enums/AnnotationSize.js"),PageOperator=require("../../utils/PageOperator.js"),index$1=require("../../utils/index.js");const dispatchTasks=(e,t)=>t.map(n=>e(n)),getSubmitByPageOperation=e=>e===AnnotationSize.EPageTurningOperation.Forward?index.ESubmitType.Forward:e===AnnotationSize.EPageTurningOperation.Backward?index.ESubmitType.Backward:e===AnnotationSize.EPageTurningOperation.Jump?index.ESubmitType.Jump:index.ESubmitType.Forward,getBasicIndex=(e,t)=>{var n,a;const{imgList:o,imgIndex:T}=e,{dataSourceStep:s}=reducer.getStepConfig(e.stepList,e.step);return((a=(n=index$1.jsonParser(o[T-1].result)[`step_${s}`])==null?void 0:n.result)==null?void 0:a.length)-1||t};function UpdateImgList(e){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_IMG_LIST,payload:{imgList:e}}}function SetTaskConfig({stepList:e,step:t}){return{type:Actions.ANNOTATION_ACTIONS.SET_TASK_CONFIG,payload:{stepList:e,step:t}}}function UpdateOnSubmit(e){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_SUBMIT,payload:{onSubmit:e}}}function UpdateOnSave(e){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_SAVE,payload:{onSave:e}}}function UpdateGetFileData(e){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_GET_FILE_DATA,payload:{getFileData:e}}}function UpdateRotate(){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ROTATE}}function CopyBackWordResult(){return{type:Actions.ANNOTATION_ACTIONS.COPY_BACKWARD_RESULT}}function InitTaskData({onSubmit:e,onSave:t,getFileData:n,imgList:a,step:o,stepList:T,initialIndex:s}){const r=[];return e&&r.push(UpdateOnSubmit(e)),t&&r.push(UpdateOnSave(t)),n&&r.push(UpdateGetFileData(n)),r.push(UpdateImgList(a)),r.push(SetTaskConfig({stepList:T,step:o})),r.push({type:Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS}),r.push({type:Actions.ANNOTATION_ACTIONS.INIT_TOOL}),r.push(reducer.LoadImageAndFileData(s)),i=>dispatchTasks(i,r)}const ToNextStep=e=>(t,n)=>{const{step:a}=n().annotation;return[t(UpdateProcessingStep(a+1,e))]},UpdateProcessingStep=(e,t)=>(n,a)=>{var o,T,s;const r=(s=(T=(o=a())==null?void 0:o.annotation)==null?void 0:T.imgIndex)!=null?s:0;return[n({type:Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT}),n({type:Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA,payload:{submitType:index.ESubmitType.StepChanged}}),n({type:Actions.ANNOTATION_ACTIONS.SET_STEP,payload:{toStep:e}}),n({type:Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS}),n(reducer.LoadImageAndFileData(t!=null?t:r,0))]},ToSubmitFileData=e=>t=>[t({type:Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT}),t({type:Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA,payload:{submitType:e}})],SubmitAndChangeFileIndex=(e,t,n,a)=>[e(ToSubmitFileData(n)),e(reducer.LoadImageAndFileData(t,a))],ChangeBasicIndex=(e,t)=>[e({type:Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT}),e({type:Actions.ANNOTATION_ACTIONS.SET_BASIC_INDEX,payload:{basicIndex:t}})],ChangeTriggerEventAfterIndexChanged=(e,t)=>{e({type:Actions.ANNOTATION_ACTIONS.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED,payload:{triggerEventAfterIndexChanged:t}})},PageBackward=(e=!1)=>(t,n)=>DispatcherTurning(t,n,AnnotationSize.EPageTurningOperation.Backward,e),PageForward=(e=!1)=>(t,n)=>DispatcherTurning(t,n,AnnotationSize.EPageTurningOperation.Forward,e),PageJump=(e,t=!1)=>(n,a)=>{if(e!==a().imgIndex)return DispatcherTurning(n,a,AnnotationSize.EPageTurningOperation.Jump,t,e)},DispatcherTurning=(e,t,n,a=!1,o)=>{const T=t().annotation,{fileIndexChanged:s,fileIndex:r,basicIndexChanged:i,basicIndex:A}=PageOperator.getNextPageInfo(n,T,o),p=getSubmitByPageOperation(n);if(ChangeTriggerEventAfterIndexChanged(e,a),s){const N=p===index.ESubmitType.Backward?getBasicIndex(T,A):A;return SubmitAndChangeFileIndex(e,r,p,N)}return i?ChangeBasicIndex(e,A):e(ToSubmitFileData(p))},ChangeSave=e=>{e(ToSubmitFileData(index.ESubmitType.Save)),e({type:Actions.ANNOTATION_ACTIONS.SAVE_RESULT})},SetAnnotationLoading=(e,t)=>{e({type:Actions.ANNOTATION_ACTIONS.SET_LOADING,payload:{loading:t}})};exports.ChangeSave=ChangeSave,exports.CopyBackWordResult=CopyBackWordResult,exports.DispatcherTurning=DispatcherTurning,exports.InitTaskData=InitTaskData,exports.PageBackward=PageBackward,exports.PageForward=PageForward,exports.PageJump=PageJump,exports.SetAnnotationLoading=SetAnnotationLoading,exports.SetTaskConfig=SetTaskConfig,exports.ToNextStep=ToNextStep,exports.ToSubmitFileData=ToSubmitFileData,exports.UpdateGetFileData=UpdateGetFileData,exports.UpdateImgList=UpdateImgList,exports.UpdateOnSave=UpdateOnSave,exports.UpdateOnSubmit=UpdateOnSubmit,exports.UpdateProcessingStep=UpdateProcessingStep,exports.UpdateRotate=UpdateRotate;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Actions=require("../Actions.js"),_=require("lodash"),data=require("../../utils/data.js"),index=require("../../utils/index.js"),StepUtils=require("../../utils/StepUtils.js"),AnnotationDataUtils=require("../../utils/AnnotationDataUtils.js"),ConfigUtils=require("../../utils/ConfigUtils.js"),styleString=require("../../constant/styleString.js"),index$1=require("../../components/customResizeHook/index.js"),annotation=require("@sensetime/annotation"),es=require("antd/es"),actionCreators=require("./actionCreators.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var ___default=_interopDefaultLegacy(_),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,o)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,__spreadValues=(e,t)=>{for(var o in t||(t={}))__hasOwnProp.call(t,o)&&__defNormalProp(e,o,t[o]);if(__getOwnPropSymbols)for(var o of __getOwnPropSymbols(t))__propIsEnum.call(t,o)&&__defNormalProp(e,o,t[o]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t)),__async=(e,t,o)=>new Promise((T,c)=>{var p=l=>{try{N(o.next(l))}catch(E){c(E)}},g=l=>{try{N(o.throw(l))}catch(E){c(E)}},N=l=>l.done?T(l.value):Promise.resolve(l.value).then(p,g);N((o=o.apply(e,t)).next())});const getStepConfig=(e,t)=>e.find(o=>o.step===t),initialState={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},getTotalPage=e=>{const{imgList:t,imgPageSize:o}=e;return Math.ceil(t.length/o)},calcStepProgress=(e,t)=>e.reduce((o,T)=>{const c=T.result;return index.jsonParser(c)[`step_${t}`]?o+1:o},0)/e.length,updateToolInstance=(e,t)=>{const{step:o,stepList:T}=e,c=StepUtils.getCurrentStepInfo(o,T),p=ConfigUtils.ConfigUtils.jsonParser(c.config),g=document.getElementById("toolContainer");if(!g)throw"Not exist dom named id-toolContainer";const N=index$1.getFormatSize({width:window.innerWidth,height:window.innerHeight}),l=new annotation.AnnotationEngine({container:g,toolName:c.tool,size:N,imgNode:t,config:p,style:JSON.parse(styleString)});return{toolInstance:l.toolInstance,annotationEngine:l}},LoadImageAndFileData=(e,t)=>(o,T)=>__async(void 0,null,function*(){const{getFileData:c,imgList:p,toolInstance:g}=T().annotation;if(actionCreators.SetAnnotationLoading(o,!0),c){const l=yield c(p[e],e);o({type:Actions.ANNOTATION_ACTIONS.SET_FILE_DATA,payload:{fileData:l,index:e}})}const{url:N}=p[e];return annotation.ImgUtils.load(N).then(l=>{actionCreators.SetAnnotationLoading(o,!1),o({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{imgNode:l,nextIndex:e,nextBasicIndex:t}})}).catch(()=>{actionCreators.SetAnnotationLoading(o,!1),g.setErrorImg(),o({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e,nextBasicIndex:t}})})}),annotationReducer=(e=initialState,t)=>{var o,T,c,p,g,N,l,E,h,b,x,F,j,w,U;switch(t.type){case Actions.ANNOTATION_ACTIONS.UPDATE_TOOL_INSTANCE:return __spreadProps(__spreadValues({},e),{toolInstance:t.payload.toolInstance});case Actions.ANNOTATION_ACTIONS.UPDATE_IMG_LIST:return __spreadProps(__spreadValues({},e),{imgList:t.payload.imgList});case Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS:{const{imgList:n,step:s}=e,r=calcStepProgress(n,s);return __spreadProps(__spreadValues({},e),{stepProgress:r})}case Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA:{const{imgList:n,imgIndex:s,step:r,stepList:i,toolInstance:a,onSubmit:u,resultList:A}=e;if(!a)return e;const I=((o=n[s])==null?void 0:o.result)||"",[,d]=a.exportData(),O=data.composeResultWithBasicImgInfo(I,d),m=data.composeResult(O,{step:r,stepList:i},{rect:A});n[s].result=AnnotationDataUtils.dataCorrection(m,I,r,i),u&&u([n[s]],(T=t.payload)==null?void 0:T.submitType,s);const f=calcStepProgress(n,r);return __spreadProps(__spreadValues({},e),{stepProgress:f,imgList:n})}case Actions.ANNOTATION_ACTIONS.SAVE_RESULT:{const{imgList:n,imgIndex:s,onSave:r}=e;return r==null||r(n[s],s,n),__spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT:{const{imgList:n,basicIndex:s,resultList:r,annotationEngine:i,basicResultList:a}=e;if(!i)return e;const[u]=i.toolInstance.exportData();let A=u;if((a==null?void 0:a.length)>0){const I=(c=a[s])==null?void 0:c.id,d=u.map(O=>__spreadProps(__spreadValues({},O),{sourceID:I}));A=___default.default.cloneDeep(r).filter(O=>O.sourceID!==I),A.push(...d)}return __spreadProps(__spreadValues({},e),{resultList:A,imgList:n})}case Actions.ANNOTATION_ACTIONS.SET_BASIC_INDEX:{const{toolInstance:n,step:s,imgList:r,imgIndex:i,stepList:a,annotationEngine:u,resultList:A,basicResultList:I}=e;if(!n||!u)return e;const d=t.payload.basicIndex,O=(p=I[d])==null?void 0:p.id,m=index.jsonParser((g=r[i])==null?void 0:g.result),f=(A||[]).filter(P=>P.sourceID===O),L=getStepConfig(a,s),{dataSourceStep:C,tool:R}=L,D=getStepConfig(a,C);let S=[];return C&&R&&(S=(N=m[`step_${C}`])==null?void 0:N.result,(S==null?void 0:S.length)>0?(u.setBasicInfo(D.tool,S[d]),u.launchOperation()):(u.setBasicInfo(D.tool),u.forbidOperation(),es.message.info("\u5F53\u524D\u6587\u4EF6\u4E0D\u5B58\u5728\u4F9D\u8D56\u6570\u636E"))),n.setResult(f),n.history.initRecord(f,!0),__spreadProps(__spreadValues({},e),{basicIndex:d})}case Actions.ANNOTATION_ACTIONS.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED:{const{triggerEventAfterIndexChanged:n}=t.payload;return __spreadProps(__spreadValues({},e),{triggerEventAfterIndexChanged:!!n})}case Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA:{const{imgList:n,step:s,toolInstance:r,annotationEngine:i,stepList:a}=e;if(!r||!i)return e;const u=StepUtils.getCurrentStepInfo(s,a),{nextIndex:A,imgNode:I,nextBasicIndex:d,imgError:O}=t.payload,m=d!=null?d:0,f=index.jsonParser((l=n[A])==null?void 0:l.result),L=f[`step_${s}`],C=!L,R={rotate:(E=f.rotate)!=null?E:0,valid:(h=f.valid)!=null?h:!0};I&&O!==!0&&i.setImgNode(I,R);const D=getStepConfig(a,s),{dataSourceStep:S,tool:P}=D,B=getStepConfig(a,S),q=S&&P,v=(x=(b=f[`step_${S}`])==null?void 0:b.result)!=null?x:[],y=AnnotationDataUtils.getInitialResultList(L==null?void 0:L.result,r,D,v,C);if(i.launchOperation(),q&&((v==null?void 0:v.length)>0?i.setBasicInfo(B.tool,v[m]):(i.setBasicInfo(B.tool),i.forbidOperation(),es.message.info("\u5F53\u524D\u6587\u4EF6\u4E0D\u5B58\u5728\u4F9D\u8D56\u6570\u636E"))),u.tool!=="check"){const G=(j=(F=v[m])==null?void 0:F.id)!=null?j:"",z=q?y.filter(M=>annotation.CommonToolUtils.isSameSourceID(M.sourceID,G)):y;r.setResult(z),r.history.initRecord(y,!0)}return __spreadProps(__spreadValues({},e),{imgIndex:A,basicIndex:m,basicResultList:v,resultList:y})}case Actions.ANNOTATION_ACTIONS.UPDATE_ANNOTATION_CONFIG:return __spreadProps(__spreadValues({},e),{config:(w=t.payload.config)!=null?w:"{}"});case Actions.ANNOTATION_ACTIONS.SET_TASK_CONFIG:{const{stepList:n,step:s}=t.payload;return __spreadProps(__spreadValues({},e),{stepList:n,step:s})}case Actions.ANNOTATION_ACTIONS.INIT_TOOL:{const{imgNode:n}=e,{toolInstance:s,annotationEngine:r}=updateToolInstance(e,n);return __spreadProps(__spreadValues({},e),{toolInstance:s,annotationEngine:r})}case Actions.ANNOTATION_ACTIONS.UPDATE_ON_SUBMIT:return __spreadProps(__spreadValues({},e),{onSubmit:t.payload.onSubmit});case Actions.ANNOTATION_ACTIONS.UPDATE_ON_SAVE:return __spreadProps(__spreadValues({},e),{onSave:t.payload.onSave});case Actions.ANNOTATION_ACTIONS.UPDATE_GET_FILE_DATA:return __spreadProps(__spreadValues({},e),{getFileData:t.payload.getFileData});case Actions.ANNOTATION_ACTIONS.SET_FILE_DATA:{const{fileData:n,index:s}=t.payload,{imgList:r}=e;return r[s]=__spreadValues(__spreadValues({},r[s]),n),__spreadProps(__spreadValues({},e),{imgList:r})}case Actions.ANNOTATION_ACTIONS.UPDATE_ROTATE:{const{toolInstance:n}=e;return n==null||n.updateRotate(),e}case Actions.ANNOTATION_ACTIONS.COPY_BACKWARD_RESULT:{const{toolInstance:n,imgIndex:s,imgList:r,step:i}=e;if(!n)return e;if(s===0||s>=r.length)return console.error("\u65E0\u6CD5\u590D\u5236\u8FB9\u754C\u5916\u7684\u5185\u5BB9"),e;const a=r[s-1].result;if(!a)return e;const u=AnnotationDataUtils.copyResultChange(a,i,(U=r[s].result)!=null?U:"");r[s].result=u;const I=index.jsonParser(u)[`step_${i}`],d=(I==null?void 0:I.result)||[];return n.setResult(d),n.history.pushHistory(d),__spreadProps(__spreadValues({},e),{imgList:[...r]})}case Actions.ANNOTATION_ACTIONS.SET_STEP:{const{stepList:n,annotationEngine:s}=e,{toStep:r}=t.payload;if(!s)return e;if(r<=n.length){const i=getStepConfig(n,r);return s.setToolName(i.tool,i.config),__spreadProps(__spreadValues({},e),{step:r,toolInstance:s.toolInstance})}break}case Actions.ANNOTATION_ACTIONS.SET_LOADING:{const{loading:n}=t.payload;return __spreadProps(__spreadValues({},e),{loading:!!n})}default:return e}return e};exports.LoadImageAndFileData=LoadImageAndFileData,exports.annotationReducer=annotationReducer,exports.getStepConfig=getStepConfig,exports.getTotalPage=getTotalPage;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Actions=require("../Actions.js");function UpdateImgAttribute(t){return{type:Actions.IMAGE_ATTRIBUTE_ACTIONS.UPDATE_IMG_ATTRIBUTE,payload:t}}function InitImgAttribute(){return{type:Actions.IMAGE_ATTRIBUTE_ACTIONS.INIT_IMG_ATTRIBUTE,payload:{}}}var ImgAttribute={UpdateImgAttribute,InitImgAttribute};exports.InitImgAttribute=InitImgAttribute,exports.UpdateImgAttribute=UpdateImgAttribute,exports.default=ImgAttribute;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Actions=require("../Actions.js"),__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,r,t)=>r in e?__defProp(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,__spreadValues=(e,r)=>{for(var t in r||(r={}))__hasOwnProp.call(r,t)&&__defNormalProp(e,t,r[t]);if(__getOwnPropSymbols)for(var t of __getOwnPropSymbols(r))__propIsEnum.call(r,t)&&__defNormalProp(e,t,r[t]);return e};const initialState={contrast:1,saturation:1,brightness:1,zoomRatio:1,isOriginalSize:!1};function imgAttributeReducer(e=__spreadValues({},initialState),r){switch(r.type){case Actions.IMAGE_ATTRIBUTE_ACTIONS.UPDATE_IMG_ATTRIBUTE:return __spreadValues(__spreadValues({},e),r.payload);case Actions.IMAGE_ATTRIBUTE_ACTIONS.INIT_IMG_ATTRIBUTE:return __spreadValues({},initialState);default:return e}}exports.imgAttributeReducer=imgAttributeReducer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var redux=require("redux"),reducer=require("./annotation/reducer.js"),reducer$1=require("./imgAttribute/reducer.js"),reducer$2=require("./toolStyle/reducer.js");const rootReducer=redux.combineReducers({annotation:reducer.annotationReducer,imgAttribute:reducer$1.imgAttributeReducer,toolStyle:reducer$2.toolStyleReducer});exports.rootReducer=rootReducer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Actions=require("../Actions.js");function InitToolStyleConfig(){return{type:Actions.TOOL_STYLE_ACTIONS.INIT_TOOL_STYLE_CONFIG,payload:void 0}}function UpdateToolStyleConfig(e){return{type:Actions.TOOL_STYLE_ACTIONS.UPDATE_TOOL_STYLE_CONFIG,payload:e}}exports.InitToolStyleConfig=InitToolStyleConfig,exports.UpdateToolStyleConfig=UpdateToolStyleConfig;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Style=require("../../data/Style.js"),ToolStyleUtils=require("../../utils/ToolStyleUtils.js"),Actions=require("../Actions.js"),__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(r,t,e)=>t in r?__defProp(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,__spreadValues=(r,t)=>{for(var e in t||(t={}))__hasOwnProp.call(t,e)&&__defNormalProp(r,e,t[e]);if(__getOwnPropSymbols)for(var e of __getOwnPropSymbols(t))__propIsEnum.call(t,e)&&__defNormalProp(r,e,t[e]);return r};const initialState={color:1,width:2,borderOpacity:9,fillOpacity:9,toolColor:ToolStyleUtils.ToolStyleUtils.getToolColors(),attributeColor:ToolStyleUtils.ToolStyleUtils.getAttributeColors(),lineColor:ToolStyleUtils.ToolStyleUtils.getDefaultToolLineColors(),attributeLineColor:[Style.NULL_COLOR].concat(Style.COLORS_ARRAY)};function toolStyleReducer(r=__spreadValues({},initialState),t){switch(t.type){case Actions.TOOL_STYLE_ACTIONS.INIT_TOOL_STYLE_CONFIG:return __spreadValues({},initialState);case Actions.TOOL_STYLE_ACTIONS.UPDATE_TOOL_STYLE_CONFIG:{const e={},o=t.payload;return((o==null?void 0:o.borderOpacity)||(o==null?void 0:o.fillOpacity))&&Object.assign(e,ToolStyleUtils.ToolStyleUtils.initByOpacity(o.borderOpacity||r.borderOpacity,o.fillOpacity||r.fillOpacity)),__spreadValues(__spreadValues(__spreadValues({},r),t.payload),e)}default:return r}}exports.toolStyleReducer=toolStyleReducer;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IStepInfo } from './types/step';
|
|
3
|
+
import { OnSubmit, GetFileData, OnSave } from './types/data';
|
|
4
|
+
import { ToolInstance } from './store/annotation/types';
|
|
5
|
+
export interface AppProps {
|
|
6
|
+
exportData?: (data: any[]) => void;
|
|
7
|
+
goBack?: () => void;
|
|
8
|
+
imgList: string[];
|
|
9
|
+
config: string;
|
|
10
|
+
stepList: IStepInfo[];
|
|
11
|
+
step: number;
|
|
12
|
+
onSubmit?: OnSubmit;
|
|
13
|
+
onSave?: OnSave;
|
|
14
|
+
getFileData?: GetFileData;
|
|
15
|
+
headerName?: string;
|
|
16
|
+
initialIndex?: number;
|
|
17
|
+
className?: string;
|
|
18
|
+
toolInstance: ToolInstance;
|
|
19
|
+
header?: React.ReactNode;
|
|
20
|
+
footer?: React.ReactNode;
|
|
21
|
+
sider?: React.ReactNode;
|
|
22
|
+
style?: {
|
|
23
|
+
layout?: {
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
};
|
|
26
|
+
header?: {
|
|
27
|
+
[key: string]: any;
|
|
28
|
+
};
|
|
29
|
+
sider?: {
|
|
30
|
+
[key: string]: any;
|
|
31
|
+
};
|
|
32
|
+
footer?: {
|
|
33
|
+
[key: string]: any;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
setToolInstance?: (tool: ToolInstance) => void;
|
|
37
|
+
mode?: 'light' | 'dark';
|
|
38
|
+
defaultLang: 'en' | 'cn';
|
|
39
|
+
}
|
|
40
|
+
declare const _default: import("react-redux").ConnectedComponent<React.FC<AppProps>, import("react-redux").Omit<AppProps, "toolInstance">>;
|
|
41
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 用于标注查看模式
|
|
3
|
+
* @author laoluo
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
interface IProps {
|
|
7
|
+
src: string;
|
|
8
|
+
size: {
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
};
|
|
12
|
+
style: {
|
|
13
|
+
color?: string;
|
|
14
|
+
fill?: string;
|
|
15
|
+
thickness?: number;
|
|
16
|
+
};
|
|
17
|
+
annotations: any[];
|
|
18
|
+
zoomChange?: (zoom: number) => void;
|
|
19
|
+
backgroundStyle: React.CSSProperties;
|
|
20
|
+
onChange?: (type: 'hover' | 'selected', ids: string[]) => void;
|
|
21
|
+
showLoading?: boolean;
|
|
22
|
+
}
|
|
23
|
+
declare const _default: React.ForwardRefExoticComponent<IProps & React.RefAttributes<unknown>>;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface IProps {
|
|
3
|
+
width?: number;
|
|
4
|
+
height?: number;
|
|
5
|
+
reloadImage: () => void;
|
|
6
|
+
hideSetInvalidTips?: boolean;
|
|
7
|
+
/** 忽略顶部的偏移,如: 多边形的容器已经计算好高度(容器不包含顶部标注提示语部分) */
|
|
8
|
+
ignoreOffsetY?: boolean;
|
|
9
|
+
layerStyle?: React.CSSProperties;
|
|
10
|
+
backgroundColor: string;
|
|
11
|
+
fileTypeName?: string;
|
|
12
|
+
}
|
|
13
|
+
declare const ImageError: (props: IProps) => JSX.Element;
|
|
14
|
+
export default ImageError;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const ATTRIBUTE_COLORS: string[];
|
|
3
|
+
interface IProps {
|
|
4
|
+
list: Array<{
|
|
5
|
+
label: string;
|
|
6
|
+
value: string;
|
|
7
|
+
}>;
|
|
8
|
+
selectedAttribute: string;
|
|
9
|
+
attributeChanged: (v: string) => void;
|
|
10
|
+
forbidDefault?: boolean;
|
|
11
|
+
forbidColor?: boolean;
|
|
12
|
+
noHeightLimit?: boolean;
|
|
13
|
+
num?: number;
|
|
14
|
+
}
|
|
15
|
+
declare const AttributeList: React.ForwardRefExoticComponent<IProps & React.RefAttributes<unknown>>;
|
|
16
|
+
export default AttributeList;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ColorTag: ({ color, style }: any) => JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ISize } from '@/types/main';
|
|
3
|
+
export declare const viewportContext: React.Context<{
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
}>;
|
|
7
|
+
export declare const ViewportProviderComponent: (props: any) => JSX.Element;
|
|
8
|
+
export declare const ViewportProvider: import("react-redux").ConnectedComponent<(props: any) => JSX.Element, import("react-redux").Omit<any, "annotation" | "dispatch">>;
|
|
9
|
+
export declare const useViewport: () => {
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* 获取当前 canvas 的大小
|
|
15
|
+
* @param isEdit 是否为编辑模式
|
|
16
|
+
* @param isTips 是否有 tips
|
|
17
|
+
*/
|
|
18
|
+
export declare const useCanvasViewPort: (isEdit?: boolean, isTips?: boolean) => {
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* 解析当前 windowSize 下的 canvasSize
|
|
24
|
+
* @param size
|
|
25
|
+
* @param isEdit
|
|
26
|
+
* @param isTips
|
|
27
|
+
*/
|
|
28
|
+
export declare const getFormatSize: (windowSize: ISize, isEdit?: boolean, isTips?: boolean) => {
|
|
29
|
+
width: number;
|
|
30
|
+
height: number;
|
|
31
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare enum EStepType {
|
|
2
|
+
Check = 0,
|
|
3
|
+
ANNOTATION = 1,
|
|
4
|
+
QUALITY_INSPECTION = 2,
|
|
5
|
+
PRE_ANNOTATION = 3,
|
|
6
|
+
MANUAL_CORRECTION = 4
|
|
7
|
+
}
|
|
8
|
+
export declare enum ESubmitType {
|
|
9
|
+
Backward = 1,
|
|
10
|
+
Forward = 2,
|
|
11
|
+
Jump = 3,
|
|
12
|
+
Quit = 4,
|
|
13
|
+
Export = 5,
|
|
14
|
+
StepChanged = 6,
|
|
15
|
+
Save = 7
|
|
16
|
+
}
|
|
17
|
+
export declare const prefix = "bee";
|
|
18
|
+
export declare const componentCls: string;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const styleString = "{\"toolColor\":{\"1\":{\"valid\":{\"stroke\":\"rgba(0,0,255,0.50)\",\"fill\":\"rgba(0,0,255,0.40)\"},\"invalid\":{\"stroke\":\"rgba(255,153,102,1.00)\",\"fill\":\"rgba(255,153,102,0.80)\"},\"validSelected\":{\"stroke\":\"rgba(0,15,255,1.00)\",\"fill\":\"rgba(0,15,255,0.80)\"},\"invalidSelected\":{\"stroke\":\"rgba(255,0,0,0.60)\",\"fill\":\"rgba(255,0,0,0.24)\"},\"validHover\":{\"stroke\":\"rgba(0,15,255,0.80)\",\"fill\":\"rgba(0,15,255,0.64)\"},\"invalidHover\":{\"stroke\":\"rgba(255,0,0,0.50)\",\"fill\":\"rgba(255,0,0,0.40)\"}},\"3\":{\"valid\":{\"stroke\":\"rgba(0,255,255,0.50)\",\"fill\":\"rgba(0,255,255,0.40)\"},\"invalid\":{\"stroke\":\"rgba(255,153,102,1.00)\",\"fill\":\"rgba(255,153,102,0.80)\"},\"validSelected\":{\"stroke\":\"rgba(0,212,255,1.00)\",\"fill\":\"rgba(0,212,255,0.80)\"},\"invalidSelected\":{\"stroke\":\"rgba(255,0,0,0.60)\",\"fill\":\"rgba(255,0,0,0.24)\"},\"validHover\":{\"stroke\":\"rgba(0,212,255,0.80)\",\"fill\":\"rgba(0,212,255,0.64)\"},\"invalidHover\":{\"stroke\":\"rgba(255,0,0,0.50)\",\"fill\":\"rgba(255,0,0,0.40)\"}},\"5\":{\"valid\":{\"stroke\":\"rgba(0,255,0,0.50)\",\"fill\":\"rgba(0,255,0,0.40)\"},\"invalid\":{\"stroke\":\"rgba(255,153,102,1.00)\",\"fill\":\"rgba(255,153,102,0.80)\"},\"validSelected\":{\"stroke\":\"rgba(149,255,1.00)\",\"fill\":\"rgba(149,255,0,0.80)\"},\"invalidSelected\":{\"stroke\":\"rgba(255,0,0,0.60)\",\"fill\":\"rgba(255,0,0,0.24)\"},\"validHover\":{\"stroke\":\"rgba(149,255,0,0.80)\",\"fill\":\"rgba(149,255,0,0.64)\"},\"invalidHover\":{\"stroke\":\"rgba(255,0,0,0.50)\",\"fill\":\"rgba(255,0,0,0.40)\"}},\"7\":{\"valid\":{\"stroke\":\"rgba(255,255,0,0.50)\",\"fill\":\"rgba(255,255,0,0.40)\"},\"invalid\":{\"stroke\":\"rgba(255,153,102,1.00)\",\"fill\":\"rgba(255,153,102,0.80)\"},\"validSelected\":{\"stroke\":\"rgba(255,230,102,1.00)\",\"fill\":\"rgba(255,213,0,0.80)\"},\"invalidSelected\":{\"stroke\":\"rgba(255,0,0,0.60)\",\"fill\":\"rgba(255,0,0,0.24)\"},\"validHover\":{\"stroke\":\"rgba(255,230,102,0.80)\",\"fill\":\"rgba(255,230,102,0.64)\"},\"invalidHover\":{\"stroke\":\"rgba(255,0,0,0.50)\",\"fill\":\"rgba(255,0,0,0.40)\"}},\"9\":{\"valid\":{\"stroke\":\"rgba(255,0,255,0.50)\",\"fill\":\"rgba(255,0,255,0.40)\"},\"invalid\":{\"stroke\":\"rgba(255,153,102,1.00)\",\"fill\":\"rgba(255,153,102,0.80)\"},\"validSelected\":{\"stroke\":\"rgba(230,102,255,1.00)\",\"fill\":\"rgba(213,0,255,0.80)\"},\"invalidSelected\":{\"stroke\":\"rgba(255,0,0,0.60)\",\"fill\":\"rgba(255,0,0,0.24)\"},\"validHover\":{\"stroke\":\"rgba(230,102,255,0.80)\",\"fill\":\"rgba(230,102,255,0.64)\"},\"invalidHover\":{\"stroke\":\"rgba(255,0,0,0.50)\",\"fill\":\"rgba(255,0,0,0.40)\"}}},\"attributeColor\":[{\"valid\":{\"stroke\":\"rgba(204,204,204,1.00)\",\"fill\":\"rgba(204,204,204,0.40)\"},\"invalid\":{\"stroke\":\"rgba(255,153,102,1.00)\",\"fill\":\"rgba(255,153,102,0.40)\"},\"validSelected\":{\"stroke\":\"rgba(204,204,204,1.00)\",\"fill\":\"rgba(204,204,204,0.80)\"},\"invalidSelected\":{\"stroke\":\"rgba(255,0,0,1.00)\",\"fill\":\"rgba(255,0,0,0.80)\"},\"validHover\":{\"stroke\":\"rgba(204,204,204,1.00)\",\"fill\":\"rgba(204,204,204,0.80)\"},\"invalidHover\":{\"stroke\":\"rgba(255,0,0,1.00)\",\"fill\":\"rgba(255,0,0,0.80)\"}},{\"valid\":{\"stroke\":\"rgba(153,51,255,1.00)\",\"fill\":\"rgba(153,51,255,0.40)\"},\"invalid\":{\"stroke\":\"rgba(255,153,102,1.00)\",\"fill\":\"rgba(255,153,102,0.40)\"},\"validSelected\":{\"stroke\":\"rgba(153,51,255,1.00)\",\"fill\":\"rgba(153,51,255,0.80)\"},\"invalidSelected\":{\"stroke\":\"rgba(255,0,0,1.00)\",\"fill\":\"rgba(255,0,0,0.80)\"},\"validHover\":{\"stroke\":\"rgba(153,51,255,1.00)\",\"fill\":\"rgba(153,51,255,0.80)\"},\"invalidHover\":{\"stroke\":\"rgba(255,0,0,1.00)\",\"fill\":\"rgba(255,0,0,0.80)\"}},{\"valid\":{\"stroke\":\"rgba(51,254,51,1.00)\",\"fill\":\"rgba(51,254,51,0.40)\"},\"invalid\":{\"stroke\":\"rgba(255,153,102,1.00)\",\"fill\":\"rgba(255,153,102,0.40)\"},\"validSelected\":{\"stroke\":\"rgba(51,254,51,1.00)\",\"fill\":\"rgba(51,254,51,0.80)\"},\"invalidSelected\":{\"stroke\":\"rgba(255,0,0,1.00)\",\"fill\":\"rgba(255,0,0,0.80)\"},\"validHover\":{\"stroke\":\"rgba(51,254,51,1.00)\",\"fill\":\"rgba(51,254,51,0.80)\"},\"invalidHover\":{\"stroke\":\"rgba(255,0,0,1.00)\",\"fill\":\"rgba(255,0,0,0.80)\"}},{\"valid\":{\"stroke\":\"rgba(255,51,255,1.00)\",\"fill\":\"rgba(255,51,255,0.40)\"},\"invalid\":{\"stroke\":\"rgba(255,153,102,1.00)\",\"fill\":\"rgba(255,153,102,0.40)\"},\"validSelected\":{\"stroke\":\"rgba(255,51,255,1.00)\",\"fill\":\"rgba(255,51,255,0.80)\"},\"invalidSelected\":{\"stroke\":\"rgba(255,0,0,1.00)\",\"fill\":\"rgba(255,0,0,0.80)\"},\"validHover\":{\"stroke\":\"rgba(255,51,255,1.00)\",\"fill\":\"rgba(255,51,255,0.80)\"},\"invalidHover\":{\"stroke\":\"rgba(255,0,0,1.00)\",\"fill\":\"rgba(255,0,0,0.80)\"}},{\"valid\":{\"stroke\":\"rgba(204,255,51,1.00)\",\"fill\":\"rgba(204,255,51,0.40)\"},\"invalid\":{\"stroke\":\"rgba(255,153,102,1.00)\",\"fill\":\"rgba(255,153,102,0.40)\"},\"validSelected\":{\"stroke\":\"rgba(204,255,51,1.00)\",\"fill\":\"rgba(204,255,51,0.80)\"},\"invalidSelected\":{\"stroke\":\"rgba(255,0,0,1.00)\",\"fill\":\"rgba(255,0,0,0.80)\"},\"validHover\":{\"stroke\":\"rgba(204,255,51,1.00)\",\"fill\":\"rgba(204,255,51,0.80)\"},\"invalidHover\":{\"stroke\":\"rgba(255,0,0,1.00)\",\"fill\":\"rgba(255,0,0,0.80)\"}},{\"valid\":{\"stroke\":\"rgba(51,153,255,1.00)\",\"fill\":\"rgba(51,153,255,0.40)\"},\"invalid\":{\"stroke\":\"rgba(255,153,102,1.00)\",\"fill\":\"rgba(255,153,102,0.40)\"},\"validSelected\":{\"stroke\":\"rgba(51,153,255,1.00)\",\"fill\":\"rgba(51,153,255,0.80)\"},\"invalidSelected\":{\"stroke\":\"rgba(255,0,0,1.00)\",\"fill\":\"rgba(255,0,0,0.80)\"},\"validHover\":{\"stroke\":\"rgba(51,153,255,1.00)\",\"fill\":\"rgba(51,153,255,0.80)\"},\"invalidHover\":{\"stroke\":\"rgba(255,0,0,1.00)\",\"fill\":\"rgba(255,0,0,0.80)\"}},{\"valid\":{\"stroke\":\"rgba(255,153,51,1.00)\",\"fill\":\"rgba(255,153,51,0.40)\"},\"invalid\":{\"stroke\":\"rgba(255,153,102,1.00)\",\"fill\":\"rgba(255,153,102,0.40)\"},\"validSelected\":{\"stroke\":\"rgba(255,153,51,1.00)\",\"fill\":\"rgba(255,153,51,0.80)\"},\"invalidSelected\":{\"stroke\":\"rgba(255,0,0,1.00)\",\"fill\":\"rgba(255,0,0,0.80)\"},\"validHover\":{\"stroke\":\"rgba(255,153,51,1.00)\",\"fill\":\"rgba(255,153,51,0.80)\"},\"invalidHover\":{\"stroke\":\"rgba(255,0,0,1.00)\",\"fill\":\"rgba(255,0,0,0.80)\"}},{\"valid\":{\"stroke\":\"rgba(51,255,238,1.00)\",\"fill\":\"rgba(51,255,238,0.40)\"},\"invalid\":{\"stroke\":\"rgba(255,153,102,1.00)\",\"fill\":\"rgba(255,153,102,0.40)\"},\"validSelected\":{\"stroke\":\"rgba(51,255,238,1.00)\",\"fill\":\"rgba(51,255,238,0.80)\"},\"invalidSelected\":{\"stroke\":\"rgba(255,0,0,1.00)\",\"fill\":\"rgba(255,0,0,0.80)\"},\"validHover\":{\"stroke\":\"rgba(51,255,238,1.00)\",\"fill\":\"rgba(51,255,238,0.80)\"},\"invalidHover\":{\"stroke\":\"rgba(255,0,0,1.00)\",\"fill\":\"rgba(255,0,0,0.80)\"}},{\"valid\":{\"stroke\":\"rgba(255,221,51,1.00)\",\"fill\":\"rgba(255,221,51,0.40)\"},\"invalid\":{\"stroke\":\"rgba(255,153,102,1.00)\",\"fill\":\"rgba(255,153,102,0.40)\"},\"validSelected\":{\"stroke\":\"rgba(255,221,51,1.00)\",\"fill\":\"rgba(255,221,51,0.80)\"},\"invalidSelected\":{\"stroke\":\"rgba(255,0,0,1.00)\",\"fill\":\"rgba(255,0,0,0.80)\"},\"validHover\":{\"stroke\":\"rgba(255,221,51,1.00)\",\"fill\":\"rgba(255,221,51,0.80)\"},\"invalidHover\":{\"stroke\":\"rgba(255,0,0,1.00)\",\"fill\":\"rgba(255,0,0,0.80)\"}}],\"lineColor\":{\"1\":\"rgba(102, 111, 255, 1 )\",\"3\":\"rgba(102, 230, 255, 1)\",\"5\":\"rgba(191, 255, 102, 1)\",\"7\":\"rgba(255, 230, 102, 1)\",\"9\":\"rgba(230, 102, 255, 1)\"},\"attributeLineColor\":[\"rgba(204, 204, 204, 1)\",\"rgba(153, 51, 255, 1)\",\"rgba(51, 254, 51, 1)\",\"rgba(255, 51, 255, 1)\",\"rgba(204, 255, 51, 1)\",\"rgba(51, 153, 255, 1)\",\"rgba(255, 153, 51, 1)\",\"rgba(51, 255, 238, 1)\",\"rgba(255, 221, 51, 1)\"],\"color\":1,\"width\":2,\"opacity\":9}";
|
|
2
|
+
export default styleString;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare const COLORS_ARRAY: string[];
|
|
2
|
+
export declare const NULL_COLOR = "rgba(204, 204, 204, 1)";
|
|
3
|
+
export declare const DEFAULT_COLOR: {
|
|
4
|
+
valid: {
|
|
5
|
+
stroke: string;
|
|
6
|
+
fill: string;
|
|
7
|
+
};
|
|
8
|
+
invalid: {
|
|
9
|
+
stroke: string;
|
|
10
|
+
fill: string;
|
|
11
|
+
};
|
|
12
|
+
validSelected: {
|
|
13
|
+
stroke: string;
|
|
14
|
+
fill: string;
|
|
15
|
+
};
|
|
16
|
+
invalidSelected: {
|
|
17
|
+
stroke: string;
|
|
18
|
+
fill: string;
|
|
19
|
+
};
|
|
20
|
+
validHover: {
|
|
21
|
+
stroke: string;
|
|
22
|
+
fill: string;
|
|
23
|
+
};
|
|
24
|
+
invalidHover: {
|
|
25
|
+
stroke: string;
|
|
26
|
+
fill: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export declare const CHANGE_COLOR: {
|
|
30
|
+
[a: number]: any;
|
|
31
|
+
};
|
|
32
|
+
export declare const BORDER_OPACITY_LEVEL: {
|
|
33
|
+
[a: number]: number;
|
|
34
|
+
};
|
|
35
|
+
export declare const FILL_OPACITY_LEVEL: {
|
|
36
|
+
[a: number]: number;
|
|
37
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export declare const headerHeight = 61;
|
|
2
|
+
export declare const tipsHeight = 40;
|
|
3
|
+
export declare const footerHeight = 40;
|
|
4
|
+
export declare const sidebarWidth = 240;
|
|
5
|
+
export declare const editStepWidth = 320;
|
|
6
|
+
/** 标注步骤的类型 */
|
|
7
|
+
export declare enum EStepType {
|
|
8
|
+
ANNOTATION = 1,
|
|
9
|
+
QUALITY_INSPECTION = 2,
|
|
10
|
+
PRE_ANNOTATION = 3,
|
|
11
|
+
MANUAL_CORRECTION = 4
|
|
12
|
+
}
|
|
13
|
+
/** 标注工具中最大获取的图片数 */
|
|
14
|
+
export declare const ANNOTATION_MAX_SIZE = 100;
|
|
15
|
+
/** 翻页操作 */
|
|
16
|
+
export declare enum EPageTurningOperation {
|
|
17
|
+
Backward = 0,
|
|
18
|
+
Forward = 1,
|
|
19
|
+
Jump = 2
|
|
20
|
+
}
|
|
21
|
+
/** 拖拽状态 */
|
|
22
|
+
export declare enum EDragStatus {
|
|
23
|
+
Start = 0,
|
|
24
|
+
Stop = 1,
|
|
25
|
+
Wait = 2
|
|
26
|
+
}
|
|
27
|
+
/** 拖拽的内容 */
|
|
28
|
+
export declare enum EDragTarget {
|
|
29
|
+
Point = 0,
|
|
30
|
+
Line = 1,
|
|
31
|
+
Plane = 2
|
|
32
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export declare enum ETextType {
|
|
2
|
+
AnyString = 0,
|
|
3
|
+
Order = 1,
|
|
4
|
+
EnglishOnly = 2,
|
|
5
|
+
NumberOnly = 3,
|
|
6
|
+
CustomFormat = 4
|
|
7
|
+
}
|
|
8
|
+
/** 文本标注字数上限 */
|
|
9
|
+
export declare const TEXT_ATTRIBUTE_MAX_LENGTH = 1000;
|
|
10
|
+
export declare enum EToolName {
|
|
11
|
+
/** 拉框工具 */
|
|
12
|
+
Rect = "rectTool",
|
|
13
|
+
/** 标签工具 */
|
|
14
|
+
Tag = "tagTool",
|
|
15
|
+
/** 标点工具 */
|
|
16
|
+
Point = "pointTool",
|
|
17
|
+
/** 列表标点工具 */
|
|
18
|
+
PointMarker = "pointMarkerTool",
|
|
19
|
+
/** 前景分割工具 */
|
|
20
|
+
Segmentation = "segmentationTool",
|
|
21
|
+
/** 筛选工具 */
|
|
22
|
+
Filter = "filterTool",
|
|
23
|
+
/** 文本工具 */
|
|
24
|
+
Text = "textTool",
|
|
25
|
+
/** 多边形工具 */
|
|
26
|
+
Polygon = "polygonTool",
|
|
27
|
+
/** 线条 */
|
|
28
|
+
Line = "lineTool",
|
|
29
|
+
/** 列表线条工具 */
|
|
30
|
+
LineMarker = "lineMarkerTool",
|
|
31
|
+
/** 空工具,表示当前没有选择的工具,没有实际的业务逻辑 */
|
|
32
|
+
Empty = "emptyTool",
|
|
33
|
+
/** 文件夹标签工具 */
|
|
34
|
+
FolderTag = "folderTagTool",
|
|
35
|
+
/** 拉框跟踪工具 */
|
|
36
|
+
RectTrack = "rectTrackTool",
|
|
37
|
+
/** 人脸106工具 */
|
|
38
|
+
Face = "faceTool",
|
|
39
|
+
/** 客户端属性工具 */
|
|
40
|
+
ClientAttribute = "clientAttributeTool",
|
|
41
|
+
/** OCR关联关系工具 */
|
|
42
|
+
OCRRelation = "OCRRelationTool"
|
|
43
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
declare function useSafeState<S>(initialState: S | (() => S)): [S, Dispatch<SetStateAction<S>>];
|
|
3
|
+
declare function useSafeState<S = undefined>(): [S | undefined, Dispatch<SetStateAction<S | undefined>>];
|
|
4
|
+
export default useSafeState;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { i18n } from '@sensetime/lb-utils';
|
|
3
|
+
import AnnotationView from '@/components/AnnotationView';
|
|
4
|
+
export declare const store: import("redux").Store<{}, import("redux").Action<any>> & {
|
|
5
|
+
dispatch: unknown;
|
|
6
|
+
};
|
|
7
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<unknown>>;
|
|
8
|
+
export default _default;
|
|
9
|
+
export { AnnotationView, i18n };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare const ANNOTATION_ACTIONS: {
|
|
2
|
+
UPDATE_TOOL_INSTANCE: string;
|
|
3
|
+
UPDATE_IMG_LIST: string;
|
|
4
|
+
UPDATE_ANNOTATION_CONFIG: string;
|
|
5
|
+
LOAD_FILE_DATA: string;
|
|
6
|
+
SUBMIT_FILE_DATA: string;
|
|
7
|
+
SET_TASK_CONFIG: string;
|
|
8
|
+
INIT_TOOL: string;
|
|
9
|
+
UPDATE_ON_SUBMIT: string;
|
|
10
|
+
UPDATE_ON_SAVE: string;
|
|
11
|
+
UPDATE_ROTATE: string;
|
|
12
|
+
UPDATE_GET_FILE_DATA: string;
|
|
13
|
+
GET_FILE_DATA: string;
|
|
14
|
+
SET_FILE_DATA: string;
|
|
15
|
+
COPY_BACKWARD_RESULT: string;
|
|
16
|
+
SET_STEP: string;
|
|
17
|
+
SUBMIT_RESULT: string;
|
|
18
|
+
SAVE_RESULT: string;
|
|
19
|
+
SET_BASIC_INDEX: string;
|
|
20
|
+
CALC_STEP_PROGRESS: string;
|
|
21
|
+
SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED: string;
|
|
22
|
+
SET_LOADING: string;
|
|
23
|
+
};
|
|
24
|
+
export declare const IMAGE_ATTRIBUTE_ACTIONS: {
|
|
25
|
+
UPDATE_IMG_ATTRIBUTE: string;
|
|
26
|
+
INIT_IMG_ATTRIBUTE: string;
|
|
27
|
+
};
|
|
28
|
+
export declare const TOOL_STYLE_ACTIONS: {
|
|
29
|
+
INIT_TOOL_STYLE_CONFIG: string;
|
|
30
|
+
UPDATE_TOOL_STYLE_CONFIG: string;
|
|
31
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { IStepInfo } from '@/types/step';
|
|
2
|
+
import { GetFileData, IFileItem, OnSave, OnSubmit } from '@/types/data';
|
|
3
|
+
import { AnnotationActionTypes, ToolInstance } from './types';
|
|
4
|
+
import { ESubmitType } from '@/constant';
|
|
5
|
+
import { EPageTurningOperation } from '@/data/enums/AnnotationSize';
|
|
6
|
+
export declare function UpdateToolInstance(toolInstance: ToolInstance): AnnotationActionTypes;
|
|
7
|
+
export declare function UpdateImgList(imgList: IFileItem[]): AnnotationActionTypes;
|
|
8
|
+
export declare function UpdateAnnotationConfig(config: string): AnnotationActionTypes;
|
|
9
|
+
export declare function SetTaskConfig({ stepList, step, }: {
|
|
10
|
+
stepList: IStepInfo[];
|
|
11
|
+
step: number;
|
|
12
|
+
}): AnnotationActionTypes;
|
|
13
|
+
export declare function UpdateOnSubmit(onSubmit: OnSubmit): AnnotationActionTypes;
|
|
14
|
+
export declare function UpdateOnSave(onSave: OnSave): AnnotationActionTypes;
|
|
15
|
+
export declare function UpdateGetFileData(getFileData: GetFileData): AnnotationActionTypes;
|
|
16
|
+
export declare function UpdateRotate(): AnnotationActionTypes;
|
|
17
|
+
export declare function CopyBackWordResult(): AnnotationActionTypes;
|
|
18
|
+
/**
|
|
19
|
+
* 初始化任务数据
|
|
20
|
+
* @param param0
|
|
21
|
+
*/
|
|
22
|
+
export declare function InitTaskData({ onSubmit, onSave, getFileData, imgList, step, stepList, initialIndex, }: any): any;
|
|
23
|
+
/** 切换到下一步 */
|
|
24
|
+
export declare const ToNextStep: (pageNumber?: number | undefined) => (dispatch: any, getState: any) => any[];
|
|
25
|
+
/**
|
|
26
|
+
* 更新当前操作的步骤
|
|
27
|
+
* @param {number} toStep
|
|
28
|
+
*/
|
|
29
|
+
export declare const UpdateProcessingStep: (toStep: number, index?: number | undefined) => (dispatch: any, state: any) => any[];
|
|
30
|
+
/**
|
|
31
|
+
* 提交当前的文件数据
|
|
32
|
+
* @param submitType
|
|
33
|
+
*/
|
|
34
|
+
export declare const ToSubmitFileData: (submitType: ESubmitType) => (dispatch: any) => any[];
|
|
35
|
+
/** 向前翻页 */
|
|
36
|
+
export declare const PageBackward: (triggerEventAfterIndexChanged?: boolean) => (dispatch: any, getState: any) => any;
|
|
37
|
+
/** 向后翻页 */
|
|
38
|
+
export declare const PageForward: (triggerEventAfterIndexChanged?: boolean) => (dispatch: any, getState: any) => any;
|
|
39
|
+
/**
|
|
40
|
+
* 跳到指定文件索引
|
|
41
|
+
* @param toIndex
|
|
42
|
+
*/
|
|
43
|
+
export declare const PageJump: (toIndex: number, triggerEventAfterIndexChanged?: boolean) => (dispatch: any, getState: any) => any;
|
|
44
|
+
/**
|
|
45
|
+
* 判断翻页还是切换依赖数据
|
|
46
|
+
* @param dispatch
|
|
47
|
+
* @param getState
|
|
48
|
+
* @param pageTurningOperation
|
|
49
|
+
* @param toIndex
|
|
50
|
+
*/
|
|
51
|
+
export declare const DispatcherTurning: (dispatch: any, getState: any, pageTurningOperation: EPageTurningOperation, triggerEventAfterIndexChanged?: boolean, toIndex?: number | undefined) => any;
|
|
52
|
+
/**
|
|
53
|
+
* 保存当前页数据
|
|
54
|
+
* */
|
|
55
|
+
export declare const ChangeSave: (dispatch: Function) => void;
|
|
56
|
+
export declare const SetAnnotationLoading: (dispatch: Function, loading: boolean) => void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AnnotationState, AnnotationActionTypes } from './types';
|
|
2
|
+
export declare const getStepConfig: (stepList: any[], step: number) => any;
|
|
3
|
+
/**
|
|
4
|
+
* 获取当前文件列表的总页数
|
|
5
|
+
* @param state
|
|
6
|
+
*/
|
|
7
|
+
export declare const getTotalPage: (state: AnnotationState) => number;
|
|
8
|
+
/**
|
|
9
|
+
* 初始化imgNode并加载数据
|
|
10
|
+
* @param nextIndex
|
|
11
|
+
* @param nextBasicIndex
|
|
12
|
+
*/
|
|
13
|
+
export declare const LoadImageAndFileData: (nextIndex: number, nextBasicIndex?: number | undefined) => (dispatch: any, getState: any) => Promise<void>;
|
|
14
|
+
export declare const annotationReducer: (state: AnnotationState | undefined, action: AnnotationActionTypes) => AnnotationState;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { AnnotationEngine, RectOperation, TagOperation, TextToolOperation, PointOperation, PolygonOperation, LineToolOperation } from '@sensetime/annotation';
|
|
2
|
+
import { ANNOTATION_ACTIONS } from '@/store/Actions';
|
|
3
|
+
import { IStepInfo } from '@/types/step';
|
|
4
|
+
import { OnSubmit, IFileItem, GetFileData, OnSave } from '@/types/data';
|
|
5
|
+
import { ESubmitType } from '@/constant';
|
|
6
|
+
export declare type GraphToolInstance = RectOperation | PointOperation | PolygonOperation | LineToolOperation;
|
|
7
|
+
export declare type ToolInstance = GraphToolInstance | TagOperation | TextToolOperation;
|
|
8
|
+
interface CommonActions {
|
|
9
|
+
type: string;
|
|
10
|
+
payload?: any;
|
|
11
|
+
}
|
|
12
|
+
export interface AnnotationState {
|
|
13
|
+
toolInstance: ToolInstance | null;
|
|
14
|
+
annotationEngine: AnnotationEngine | null;
|
|
15
|
+
imgList: IFileItem[];
|
|
16
|
+
config: string;
|
|
17
|
+
imgIndex: number;
|
|
18
|
+
imgPageSize: number;
|
|
19
|
+
step: number;
|
|
20
|
+
stepList: IStepInfo[];
|
|
21
|
+
imgNode: HTMLImageElement;
|
|
22
|
+
onSubmit?: OnSubmit;
|
|
23
|
+
onSave?: OnSave;
|
|
24
|
+
getFileData?: GetFileData;
|
|
25
|
+
basicIndex: number;
|
|
26
|
+
basicResultList: any[];
|
|
27
|
+
resultList: any[];
|
|
28
|
+
stepProgress: number;
|
|
29
|
+
loading: boolean;
|
|
30
|
+
/** 阻止文件切换后的事件 */
|
|
31
|
+
triggerEventAfterIndexChanged: boolean;
|
|
32
|
+
}
|
|
33
|
+
interface UpdateToolInstance {
|
|
34
|
+
type: typeof ANNOTATION_ACTIONS.UPDATE_TOOL_INSTANCE;
|
|
35
|
+
payload: {
|
|
36
|
+
toolInstance: ToolInstance;
|
|
37
|
+
annotationEngine: AnnotationEngine;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
interface UpdateImgList {
|
|
41
|
+
type: typeof ANNOTATION_ACTIONS.UPDATE_IMG_LIST;
|
|
42
|
+
payload: {
|
|
43
|
+
imgList: IFileItem[];
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
interface UpdateAnnotationConfig {
|
|
47
|
+
type: typeof ANNOTATION_ACTIONS.UPDATE_ANNOTATION_CONFIG;
|
|
48
|
+
payload: {
|
|
49
|
+
config: string;
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
interface SubmitFileData extends CommonActions {
|
|
53
|
+
type: typeof ANNOTATION_ACTIONS.SUBMIT_FILE_DATA;
|
|
54
|
+
payload: {
|
|
55
|
+
submitType: ESubmitType;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
interface LoadFileData extends CommonActions {
|
|
59
|
+
type: typeof ANNOTATION_ACTIONS.LOAD_FILE_DATA;
|
|
60
|
+
payload: {
|
|
61
|
+
nextIndex: number;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
interface SetTaskConfig {
|
|
65
|
+
type: typeof ANNOTATION_ACTIONS.SET_TASK_CONFIG;
|
|
66
|
+
payload: {
|
|
67
|
+
stepList: IStepInfo[];
|
|
68
|
+
step: number;
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
interface InitTool {
|
|
72
|
+
type: typeof ANNOTATION_ACTIONS.INIT_TOOL;
|
|
73
|
+
payload: {
|
|
74
|
+
stepList: IStepInfo[];
|
|
75
|
+
step: number;
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
interface UpdateOnSubmit {
|
|
79
|
+
type: typeof ANNOTATION_ACTIONS.UPDATE_ON_SUBMIT;
|
|
80
|
+
payload: {
|
|
81
|
+
onSubmit: OnSubmit;
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
interface UpdateOnSave {
|
|
85
|
+
type: typeof ANNOTATION_ACTIONS.UPDATE_ON_SAVE;
|
|
86
|
+
payload: {
|
|
87
|
+
onSave: OnSave;
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
interface UpdateGetFileData {
|
|
91
|
+
type: typeof ANNOTATION_ACTIONS.UPDATE_GET_FILE_DATA;
|
|
92
|
+
payload: {
|
|
93
|
+
getFileData: GetFileData;
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
interface CopyBackWordResult extends CommonActions {
|
|
97
|
+
type: typeof ANNOTATION_ACTIONS.COPY_BACKWARD_RESULT;
|
|
98
|
+
}
|
|
99
|
+
export declare type AnnotationActionTypes = UpdateToolInstance | UpdateImgList | UpdateAnnotationConfig | SubmitFileData | LoadFileData | SetTaskConfig | InitTool | UpdateOnSubmit | UpdateGetFileData | CopyBackWordResult | UpdateOnSave;
|
|
100
|
+
export {};
|