@labelbee/lb-components 1.23.0-alpha.7 → 1.23.0-alpha.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App.js +1 -1
- package/dist/_virtual/2DViewWorker.js +1 -0
- package/dist/_virtual/highlightSegmentWorker.js +1 -1
- package/dist/assets/annotation/icon_link.svg.js +1 -0
- package/dist/assets/annotation/icon_unlink.svg.js +1 -0
- package/dist/assets/annotation/pointCloudTool/Image2DBoxScale.svg.js +1 -0
- package/dist/assets/annotation/pointCloudTool/leftArrow.svg.js +1 -1
- package/dist/assets/annotation/pointCloudTool/rightArrow.svg.js +1 -1
- package/dist/assets/annotation/pointCloudTool/rotate90_black.svg.js +1 -0
- package/dist/assets/icons/ad33251.svg +26 -0
- package/dist/components/AnnotationView/index.js +1 -1
- package/dist/components/LLMToolView/index.js +1 -1
- package/dist/components/LLMToolView/questionView/components/header/index.js +1 -1
- package/dist/components/LLMToolView/sidebar/components/textEditor/index.js +2 -2
- package/dist/components/LLMToolView/sidebar/components/textEditor/index.module.scss.js +1 -1
- package/dist/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -2
- package/dist/components/LLMToolView/sidebar/index.js +1 -1
- package/dist/components/LLMToolView/utils/data.js +1 -1
- package/dist/components/NLPToolView/index.js +1 -1
- package/dist/components/audioAnnotate/audioContext/index.js +1 -1
- package/dist/components/audioAnnotate/audioSide/clipSidebar/index.js +1 -1
- package/dist/components/audioAnnotate/index.js +1 -1
- package/dist/components/audioAnnotate/textInput/index.js +1 -1
- package/dist/components/audioAnnotate/textInput/index.module.scss.js +1 -1
- package/dist/components/audioAnnotate/utils/dataTransform.js +1 -0
- package/dist/components/audioPlayer/clipRegion/index.js +1 -1
- package/dist/components/audioPlayer/index.js +1 -1
- package/dist/components/audioPlayer/useAudioCombine/index.js +3 -2
- package/dist/components/audioPlayer/useAudioSegment/index.js +1 -1
- package/dist/components/longText/index.js +1 -1
- package/dist/components/pointCloud2DRectOperationView/index.js +1 -1
- package/dist/components/pointCloud2DRectOperationView/useUpdateRectList.js +1 -0
- package/dist/components/pointCloud2DRectOperationView/util.js +1 -0
- package/dist/components/pointCloudView/PointCloud2DSingleView.js +1 -1
- package/dist/components/pointCloudView/PointCloud2DView.js +1 -1
- package/dist/components/pointCloudView/PointCloud3DView.js +1 -1
- package/dist/components/pointCloudView/PointCloudBackView.js +1 -1
- package/dist/components/pointCloudView/PointCloudContext.js +1 -1
- package/dist/components/pointCloudView/PointCloudInfos.js +1 -1
- package/dist/components/pointCloudView/PointCloudLayout.js +1 -1
- package/dist/components/pointCloudView/PointCloudListener.js +1 -1
- package/dist/components/pointCloudView/PointCloudSegment2DView.js +1 -1
- package/dist/components/pointCloudView/PointCloudSideView.js +1 -1
- package/dist/components/pointCloudView/PointCloudTopView.js +1 -1
- package/dist/components/pointCloudView/components/HighlightVisible/index.js +1 -1
- package/dist/components/pointCloudView/hooks/useBoxes.js +1 -1
- package/dist/components/pointCloudView/hooks/useDataLinkSwitch.js +1 -0
- package/dist/components/pointCloudView/hooks/useHighlight.js +1 -1
- package/dist/components/pointCloudView/hooks/useHistory.js +1 -1
- package/dist/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
- package/dist/components/pointCloudView/hooks/usePolygon.js +1 -1
- package/dist/components/pointCloudView/hooks/useRotate.js +1 -1
- package/dist/components/pointCloudView/hooks/useRotateEdge.js +1 -0
- package/dist/components/pointCloudView/hooks/useSingleBox.js +1 -1
- package/dist/components/pointCloudView/hooks/useStatus.js +1 -1
- package/dist/components/pointCloudView/hooks/useTimeoutFunc.js +1 -0
- package/dist/components/pointCloudView/hooks/useWindowKeydownListener.js +1 -0
- package/dist/components/pointCloudView/index.js +1 -1
- package/dist/components/pointCloudView/utils/event-polyfill.js +1 -0
- package/dist/components/pointCloudView/utils/map.js +1 -0
- package/dist/components/subAttributeList/index.js +1 -0
- package/dist/components/videoAnnotate/videoClipTool/index.js +1 -1
- package/dist/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptor.js +1 -1
- package/dist/hooks/useToolStyle.js +1 -0
- package/dist/index.css +59 -17
- package/dist/index.js +1 -1
- package/dist/store/Actions.js +1 -1
- package/dist/store/annotatedBox/index.js +1 -1
- package/dist/store/annotation/actionCreators.js +1 -1
- package/dist/store/annotation/reducer.js +1 -1
- package/dist/types/App.d.ts +5 -1
- package/dist/types/components/AnnotationView/index.d.ts +1 -0
- package/dist/types/components/LLMToolView/utils/data.d.ts +1 -1
- package/dist/types/components/audioAnnotate/audioContext/index.d.ts +10 -2
- package/dist/types/components/audioAnnotate/textInput/index.d.ts +1 -0
- package/dist/types/components/audioAnnotate/utils/dataTransform.d.ts +9 -0
- package/dist/types/components/audioPlayer/index.d.ts +28 -21
- package/dist/types/components/longText/index.d.ts +1 -0
- package/dist/types/components/pointCloud2DRectOperationView/index.d.ts +1 -0
- package/dist/types/components/pointCloud2DRectOperationView/useUpdateRectList.d.ts +2 -0
- package/dist/types/components/pointCloud2DRectOperationView/util.d.ts +8 -0
- package/dist/types/components/pointCloudView/2DViewWorker.d.ts +1 -0
- package/dist/types/components/pointCloudView/PointCloud2DView.d.ts +2 -1
- package/dist/types/components/pointCloudView/PointCloudContext.d.ts +28 -4
- package/dist/types/components/pointCloudView/PointCloudLayout.d.ts +1 -0
- package/dist/types/components/pointCloudView/components/HighlightVisible/index.d.ts +2 -1
- package/dist/types/components/pointCloudView/hooks/useDataLinkSwitch.d.ts +19 -0
- package/dist/types/components/pointCloudView/hooks/useHighlight.d.ts +1 -1
- package/dist/types/components/pointCloudView/hooks/usePointCloudViews.d.ts +8 -0
- package/dist/types/components/pointCloudView/hooks/useRotateEdge.d.ts +9 -0
- package/dist/types/components/pointCloudView/hooks/useSingleBox.d.ts +3 -2
- package/dist/types/components/pointCloudView/hooks/useTimeoutFunc.d.ts +6 -0
- package/dist/types/components/pointCloudView/hooks/useWindowKeydownListener.d.ts +16 -0
- package/dist/types/components/pointCloudView/utils/event-polyfill.d.ts +8 -0
- package/dist/types/components/pointCloudView/utils/map.d.ts +11 -0
- package/dist/types/components/subAttributeList/index.d.ts +10 -0
- package/dist/types/components/videoAnnotate/index.d.ts +2 -1
- package/dist/types/components/videoAnnotate/videoClipTool/index.d.ts +2 -1
- package/dist/types/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptor.d.ts +1 -1
- package/dist/types/hooks/useToolStyle.d.ts +30 -0
- package/dist/types/index.d.ts +7 -2
- package/dist/types/store/Actions.d.ts +1 -0
- package/dist/types/store/annotatedBox/index.d.ts +2 -0
- package/dist/types/store/annotation/actionCreators.d.ts +3 -2
- package/dist/types/store/annotation/reducer.d.ts +1 -0
- package/dist/types/store/annotation/types.d.ts +9 -2
- package/dist/types/utils/AnnotationDataUtils.d.ts +58 -1
- package/dist/types/utils/ToolPointCloudBoxRenderHelper.d.ts +23 -0
- package/dist/types/utils/index.d.ts +31 -1
- package/dist/types/views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.d.ts +3 -0
- package/dist/types/views/MainView/sidebar/TextToolSidebar/index.d.ts +1 -1
- package/dist/types/views/MainView/toolFooter/BatchSwitchConnectIn2DView/BatchSwitchConnectIn2DView.d.ts +9 -0
- package/dist/types/views/MainView/toolFooter/BatchSwitchConnectIn2DView/Icons.d.ts +3 -0
- package/dist/types/views/MainView/toolFooter/BatchSwitchConnectIn2DView/index.d.ts +1 -0
- package/dist/types/views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.d.ts +10 -2
- package/dist/types/views/MainView/toolFooter/index.d.ts +1 -1
- package/dist/types/views/MainView/toolHeader/StepSwitch/index.d.ts +1 -1
- package/dist/types/views/MainView/toolHeader/index.d.ts +1 -1
- package/dist/utils/AnnotationDataUtils.js +1 -1
- package/dist/utils/ToolPointCloudBoxRenderHelper.js +1 -0
- package/dist/utils/index.js +1 -1
- package/dist/views/MainView/index.js +1 -1
- package/dist/views/MainView/sidebar/NLPSidebar/NLPAnnotatedList.js +1 -1
- package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.js +1 -0
- package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.module.scss.js +1 -0
- package/dist/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
- package/dist/views/MainView/sidebar/TagSidebar/index.js +1 -1
- package/dist/views/MainView/sidebar/TextToolSidebar/index.js +1 -1
- package/dist/views/MainView/toolFooter/BatchSwitchConnectIn2DView/BatchSwitchConnectIn2DView.js +1 -0
- package/dist/views/MainView/toolFooter/BatchSwitchConnectIn2DView/Icons.js +1 -0
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.js +1 -1
- package/dist/views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.js +1 -1
- package/dist/views/MainView/toolFooter/index.js +1 -1
- package/es/App.js +1 -1
- package/es/_virtual/2DViewWorker.js +1 -0
- package/es/_virtual/highlightSegmentWorker.js +1 -1
- package/es/assets/annotation/icon_link.svg.js +1 -0
- package/es/assets/annotation/icon_unlink.svg.js +1 -0
- package/es/assets/annotation/pointCloudTool/Image2DBoxScale.svg.js +1 -0
- package/es/assets/annotation/pointCloudTool/leftArrow.svg.js +1 -1
- package/es/assets/annotation/pointCloudTool/rightArrow.svg.js +1 -1
- package/es/assets/annotation/pointCloudTool/rotate90_black.svg.js +1 -0
- package/es/components/AnnotationView/index.js +1 -1
- package/es/components/LLMToolView/index.js +1 -1
- package/es/components/LLMToolView/questionView/components/header/index.js +1 -1
- package/es/components/LLMToolView/sidebar/components/textEditor/index.js +2 -2
- package/es/components/LLMToolView/sidebar/components/textEditor/index.module.scss.js +1 -1
- package/es/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -2
- package/es/components/LLMToolView/sidebar/index.js +1 -1
- package/es/components/LLMToolView/utils/data.js +1 -1
- package/es/components/NLPToolView/index.js +1 -1
- package/es/components/audioAnnotate/audioContext/index.js +1 -1
- package/es/components/audioAnnotate/audioSide/clipSidebar/index.js +1 -1
- package/es/components/audioAnnotate/index.js +1 -1
- package/es/components/audioAnnotate/textInput/index.js +1 -1
- package/es/components/audioAnnotate/textInput/index.module.scss.js +1 -1
- package/es/components/audioAnnotate/utils/dataTransform.js +1 -0
- package/es/components/audioPlayer/clipRegion/index.js +1 -1
- package/es/components/audioPlayer/index.js +1 -1
- package/es/components/audioPlayer/useAudioCombine/index.js +3 -2
- package/es/components/audioPlayer/useAudioSegment/index.js +1 -1
- package/es/components/longText/index.js +1 -1
- package/es/components/pointCloud2DRectOperationView/index.js +1 -1
- package/es/components/pointCloud2DRectOperationView/useUpdateRectList.js +1 -0
- package/es/components/pointCloud2DRectOperationView/util.js +1 -0
- package/es/components/pointCloudView/PointCloud2DSingleView.js +1 -1
- package/es/components/pointCloudView/PointCloud2DView.js +1 -1
- package/es/components/pointCloudView/PointCloud3DView.js +1 -1
- package/es/components/pointCloudView/PointCloudBackView.js +1 -1
- package/es/components/pointCloudView/PointCloudContext.js +1 -1
- package/es/components/pointCloudView/PointCloudInfos.js +1 -1
- package/es/components/pointCloudView/PointCloudLayout.js +1 -1
- package/es/components/pointCloudView/PointCloudListener.js +1 -1
- package/es/components/pointCloudView/PointCloudSegment2DView.js +1 -1
- package/es/components/pointCloudView/PointCloudSideView.js +1 -1
- package/es/components/pointCloudView/PointCloudTopView.js +1 -1
- package/es/components/pointCloudView/components/HighlightVisible/index.js +1 -1
- package/es/components/pointCloudView/hooks/useBoxes.js +1 -1
- package/es/components/pointCloudView/hooks/useDataLinkSwitch.js +1 -0
- package/es/components/pointCloudView/hooks/useHighlight.js +1 -1
- package/es/components/pointCloudView/hooks/useHistory.js +1 -1
- package/es/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
- package/es/components/pointCloudView/hooks/usePolygon.js +1 -1
- package/es/components/pointCloudView/hooks/useRotate.js +1 -1
- package/es/components/pointCloudView/hooks/useRotateEdge.js +1 -0
- package/es/components/pointCloudView/hooks/useSingleBox.js +1 -1
- package/es/components/pointCloudView/hooks/useStatus.js +1 -1
- package/es/components/pointCloudView/hooks/useTimeoutFunc.js +1 -0
- package/es/components/pointCloudView/hooks/useWindowKeydownListener.js +1 -0
- package/es/components/pointCloudView/index.js +1 -1
- package/es/components/pointCloudView/utils/event-polyfill.js +1 -0
- package/es/components/pointCloudView/utils/map.js +1 -0
- package/es/components/subAttributeList/index.js +1 -0
- package/es/components/videoAnnotate/videoClipTool/index.js +1 -1
- package/es/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptor.js +1 -1
- package/es/hooks/useToolStyle.js +1 -0
- package/es/index.css +59 -17
- package/es/index.js +1 -1
- package/es/store/Actions.js +1 -1
- package/es/store/annotatedBox/index.js +1 -1
- package/es/store/annotation/actionCreators.js +1 -1
- package/es/store/annotation/reducer.js +1 -1
- package/es/utils/AnnotationDataUtils.js +1 -1
- package/es/utils/ToolPointCloudBoxRenderHelper.js +1 -0
- package/es/utils/index.js +1 -1
- package/es/views/MainView/index.js +1 -1
- package/es/views/MainView/sidebar/NLPSidebar/NLPAnnotatedList.js +1 -1
- package/es/views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.js +1 -0
- package/es/views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.module.scss.js +1 -0
- package/es/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
- package/es/views/MainView/sidebar/TagSidebar/index.js +1 -1
- package/es/views/MainView/sidebar/TextToolSidebar/index.js +1 -1
- package/es/views/MainView/toolFooter/BatchSwitchConnectIn2DView/BatchSwitchConnectIn2DView.js +1 -0
- package/es/views/MainView/toolFooter/BatchSwitchConnectIn2DView/Icons.js +1 -0
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.js +1 -1
- package/es/views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.js +1 -1
- package/package.json +4 -3
- package/dist/assets/annotation/pointCloudTool/rotate180_black.svg.js +0 -1
- package/dist/assets/icons/9d70807.svg +0 -5
- package/es/assets/annotation/pointCloudTool/rotate180_black.svg.js +0 -1
|
@@ -14,6 +14,7 @@ export interface IAnnotationDataTemporarily {
|
|
|
14
14
|
export interface IAnnotationData2dView {
|
|
15
15
|
annotations: IAnnotationDataTemporarily[];
|
|
16
16
|
url: string;
|
|
17
|
+
fallbackUrl?: string;
|
|
17
18
|
calName?: string;
|
|
18
19
|
calib?: ICalib;
|
|
19
20
|
path: string;
|
|
@@ -24,5 +25,5 @@ interface IProps extends IA2MapStateProps {
|
|
|
24
25
|
checkMode?: boolean;
|
|
25
26
|
measureVisible?: boolean;
|
|
26
27
|
}
|
|
27
|
-
declare const _default: import("react-redux").ConnectedComponent<({ currentData, config, thumbnailWidth, isEnlargeTopView, highlightAttribute, loadPCDFileLoading, checkMode, measureVisible }: IProps) => React.JSX.Element | null, import("react-redux").Omit<IProps, "imgIndex" | "imgList" | "config" | "highlightAttribute" | "loadPCDFileLoading" | "stepInfo" | "currentData" | "configString">>;
|
|
28
|
+
declare const _default: import("react-redux").ConnectedComponent<({ currentData, config, thumbnailWidth, isEnlargeTopView, highlightAttribute, loadPCDFileLoading, checkMode, measureVisible, }: IProps) => React.JSX.Element | null, import("react-redux").Omit<IProps, "imgIndex" | "imgList" | "config" | "highlightAttribute" | "loadPCDFileLoading" | "stepInfo" | "currentData" | "configString">>;
|
|
28
29
|
export default _default;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { IPointCloudBox, IPointCloudBoxList, IPolygonData, IPointCloudSphereList, IPointCloudSphere, ILine, EPointCloudPattern, IPointCloudSegmentation, ICalib, ISize } from '@labelbee/lb-utils';
|
|
2
|
-
import React from 'react';
|
|
1
|
+
import { IPointCloudBox, IPointCloudBoxList, IPolygonData, IPointCloudSphereList, IPointCloudSphere, ILine, EPointCloudPattern, IPointCloudSegmentation, ICalib, ISize, IPointCloudBoxRect, IPointCloud2DRectOperationViewRect } from '@labelbee/lb-utils';
|
|
2
|
+
import React, { PropsWithChildren } from 'react';
|
|
3
|
+
import { EPointCloudBoxRenderTrigger } from '@/utils/ToolPointCloudBoxRenderHelper';
|
|
3
4
|
import { PointCloud, PointCloudAnnotation, ActionsHistory, EToolName } from '@labelbee/lb-annotation';
|
|
5
|
+
import type { MapIndirectWeakSet } from './utils/map';
|
|
6
|
+
import { WindowKeydownListenerHooker } from './hooks/useWindowKeydownListener';
|
|
4
7
|
interface IPointCloudContextInstances {
|
|
5
8
|
topViewInstance?: PointCloudAnnotation;
|
|
6
9
|
sideViewInstance?: PointCloudAnnotation;
|
|
@@ -22,10 +25,14 @@ interface IPointCloudSegment {
|
|
|
22
25
|
type AttrPanelLayout = '' | 'left' | 'right';
|
|
23
26
|
interface IHighlight2DData {
|
|
24
27
|
url: string;
|
|
28
|
+
fallbackUrl: string;
|
|
25
29
|
calib?: ICalib;
|
|
26
30
|
}
|
|
31
|
+
type PickRectObjct = Pick<IPointCloud2DRectOperationViewRect, 'id' | 'attribute' | 'width' | 'height' | 'x' | 'y' | 'imageName'>;
|
|
32
|
+
type UpdateRectListByReducer = (reducer: (prevRectList: IPointCloudBoxRect[], pickRectObject: (item: IPointCloud2DRectOperationViewRect) => PickRectObjct) => IPointCloudBoxRect[]) => void;
|
|
27
33
|
export interface IPointCloudContext extends IPointCloudContextInstances, IPointCloudStatus, IPointCloudSegment {
|
|
28
34
|
pointCloudBoxList: IPointCloudBoxList;
|
|
35
|
+
rectList: IPointCloudBoxRect[];
|
|
29
36
|
pointCloudSphereList: IPointCloudSphereList;
|
|
30
37
|
displayPointCloudList: IPointCloudBoxList;
|
|
31
38
|
displaySphereList: IPointCloudSphereList;
|
|
@@ -47,6 +54,10 @@ export interface IPointCloudContext extends IPointCloudContextInstances, IPointC
|
|
|
47
54
|
addPointCloudSphere: (sphereParams: IPointCloudSphere) => IPointCloudSphere[];
|
|
48
55
|
polygonList: IPolygonData[];
|
|
49
56
|
setPolygonList: (polygonList: IPolygonData[]) => void;
|
|
57
|
+
setRectList: (rectList: IPointCloudBoxRect[]) => void;
|
|
58
|
+
addRectIn2DView: (rect: IPointCloud2DRectOperationViewRect) => void;
|
|
59
|
+
removeRectIn2DView: (rects: IPointCloud2DRectOperationViewRect[]) => void;
|
|
60
|
+
updateRectIn2DView: (rect: IPointCloud2DRectOperationViewRect, mergeSelf?: boolean) => void;
|
|
50
61
|
lineList: ILine[];
|
|
51
62
|
setLineList: (lineList: ILine[]) => void;
|
|
52
63
|
zoom: number;
|
|
@@ -60,7 +71,7 @@ export interface IPointCloudContext extends IPointCloudContextInstances, IPointC
|
|
|
60
71
|
reRender: (_displayPointCloudList: IPointCloudBoxList, _polygonList: IPolygonData[], _displaySphereList: IPointCloudSphereList, _lineList: ILine[], _segmentation: IPointCloudSegmentation[]) => void;
|
|
61
72
|
attrPanelLayout: AttrPanelLayout;
|
|
62
73
|
setAttrPanelLayout: (layout: AttrPanelLayout) => void;
|
|
63
|
-
syncAllViewPointCloudColor: (newPointCloudList?: IPointCloudBox[], newHighlight2DDataList?: IHighlight2DData[]) => Promise<any>;
|
|
74
|
+
syncAllViewPointCloudColor: (syncByTrigger: EPointCloudBoxRenderTrigger, newPointCloudList?: IPointCloudBox[], newHighlight2DDataList?: IHighlight2DData[]) => Promise<any>;
|
|
64
75
|
defaultAttribute: string;
|
|
65
76
|
setDefaultAttribute: (defaultAttribute: string) => void;
|
|
66
77
|
pointCloudPattern: EToolName.Rect | EToolName.Polygon | EToolName.Point | EToolName.Line;
|
|
@@ -71,6 +82,8 @@ export interface IPointCloudContext extends IPointCloudContextInstances, IPointC
|
|
|
71
82
|
clearAllDetectionInstance: () => void;
|
|
72
83
|
highlight2DDataList: IHighlight2DData[];
|
|
73
84
|
setHighlight2DDataList: (urlList: IHighlight2DData[]) => void;
|
|
85
|
+
highlight2DLoading: boolean;
|
|
86
|
+
setHighlight2DLoading: (loading: boolean) => void;
|
|
74
87
|
imageSizes: {
|
|
75
88
|
[key: string]: ISize;
|
|
76
89
|
};
|
|
@@ -78,7 +91,18 @@ export interface IPointCloudContext extends IPointCloudContextInstances, IPointC
|
|
|
78
91
|
imgNode: HTMLImageElement;
|
|
79
92
|
path: string;
|
|
80
93
|
}) => void;
|
|
94
|
+
addRectFromPointCloudBoxByImageName: (imageName: string) => boolean;
|
|
95
|
+
removeRectBySpecifyId: (imageName: string, ids: string[], idField?: keyof IPointCloudBoxRect) => boolean;
|
|
96
|
+
removeRectByPointCloudBoxId: (imageName: string) => boolean;
|
|
97
|
+
rectRotateSensitivity: number;
|
|
98
|
+
setRectRotateSensitivity: (sensitivity: number) => void;
|
|
99
|
+
/** imageName -> pointCloudBox.id -> [pointCloudBox, ...] */
|
|
100
|
+
imageNamePointCloudBoxMap: MapIndirectWeakSet<IPointCloudBox>;
|
|
101
|
+
/** imageName -> pointCloudBox.id -> [rect, ...] */
|
|
102
|
+
linkageImageNameRectMap: MapIndirectWeakSet<IPointCloudBoxRect>;
|
|
103
|
+
updateRectListByReducer: UpdateRectListByReducer;
|
|
104
|
+
windowKeydownListenerHook: WindowKeydownListenerHooker;
|
|
81
105
|
}
|
|
82
106
|
export declare const PointCloudContext: React.Context<IPointCloudContext>;
|
|
83
|
-
export declare const PointCloudProvider: React.FC<{}
|
|
107
|
+
export declare const PointCloudProvider: React.FC<PropsWithChildren<{}>>;
|
|
84
108
|
export {};
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
* Render Component for highlight.
|
|
3
3
|
*/
|
|
4
4
|
import React from 'react';
|
|
5
|
-
declare const HighlightVisible: ({ visible, style, onClick, loading, }: {
|
|
5
|
+
declare const HighlightVisible: ({ visible, style, onClick, loading, disabled, }: {
|
|
6
6
|
visible: boolean;
|
|
7
7
|
loading: boolean;
|
|
8
8
|
style?: React.CSSProperties | undefined;
|
|
9
9
|
onClick: () => void;
|
|
10
|
+
disabled?: boolean | undefined;
|
|
10
11
|
}) => React.JSX.Element;
|
|
11
12
|
export default HighlightVisible;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface UseDataLinkSwitchOptions {
|
|
3
|
+
/** DOM显示层级 */
|
|
4
|
+
zIndex: number;
|
|
5
|
+
/** 是否2d框 */
|
|
6
|
+
is2DView: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* 用来判断图片项,
|
|
9
|
+
* 具体参考:packages/lb-components/src/components/pointCloud2DRectOperationView/index.tsx, getRectListByBoxList函数
|
|
10
|
+
*
|
|
11
|
+
* 基于上参考,此值需确保唯一性!
|
|
12
|
+
*/
|
|
13
|
+
imageName: string;
|
|
14
|
+
}
|
|
15
|
+
declare const useDataLinkSwitch: (opts: UseDataLinkSwitchOptions) => {
|
|
16
|
+
rendered: React.JSX.Element | null;
|
|
17
|
+
isLinking: boolean;
|
|
18
|
+
};
|
|
19
|
+
export default useDataLinkSwitch;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { IAnnotationStateProps } from '../../../store/annotation/map';
|
|
7
7
|
import { ICalib } from '@labelbee/lb-utils';
|
|
8
8
|
declare const useHighlight: ({ currentData }: Partial<IAnnotationStateProps>) => {
|
|
9
|
-
toggle2dVisible: (url: string, calib?: ICalib) => Promise<void>;
|
|
9
|
+
toggle2dVisible: (url: string, fallbackUrl: string, calib?: ICalib) => Promise<void>;
|
|
10
10
|
isHighlightVisible: (url: string) => boolean;
|
|
11
11
|
};
|
|
12
12
|
export { useHighlight };
|
|
@@ -69,6 +69,7 @@ export declare const usePointCloudViews: () => {
|
|
|
69
69
|
updateViewsByDefaultSize?: undefined;
|
|
70
70
|
generateRects?: undefined;
|
|
71
71
|
update2DViewRect?: undefined;
|
|
72
|
+
remove2DViewRect?: undefined;
|
|
72
73
|
} | {
|
|
73
74
|
topViewAddSphere: ({ newPoint, size, zoom, trackConfigurable, }: {
|
|
74
75
|
newPoint: IPointUnit;
|
|
@@ -105,4 +106,11 @@ export declare const usePointCloudViews: () => {
|
|
|
105
106
|
boxID: string;
|
|
106
107
|
imageName: string;
|
|
107
108
|
}) => IPointCloudBox[] | undefined;
|
|
109
|
+
remove2DViewRect: (params: {
|
|
110
|
+
boxID: string;
|
|
111
|
+
imageName: string;
|
|
112
|
+
}) => IPointCloudBox[] | undefined;
|
|
113
|
+
};
|
|
114
|
+
export declare const useSyncRectPositionDimensionToPointCloudList: () => {
|
|
115
|
+
syncToPointCloudBoxList: () => IPointCloudBox[] | null;
|
|
108
116
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="lodash" />
|
|
2
|
+
import { IAnnotationStateProps } from '@/store/annotation/map';
|
|
3
|
+
/**
|
|
4
|
+
* PointCloud Rotate Hook
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
export declare const useRotateEdge: ({ currentData }: IAnnotationStateProps) => {
|
|
8
|
+
updateRotateEdge: import("lodash").DebouncedFunc<(angle: number) => void>;
|
|
9
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IPointCloudBox, PartialIPointCloudBoxList } from '@labelbee/lb-utils';
|
|
2
|
+
import { IFileItem } from '@/types/data';
|
|
2
3
|
interface IUseSingleBoxParams {
|
|
3
4
|
generateRects?: (box: IPointCloudBox) => void;
|
|
4
5
|
}
|
|
@@ -13,10 +14,10 @@ export declare const useSingleBox: (props?: IUseSingleBoxParams) => {
|
|
|
13
14
|
changeValidByID: (id: string) => import("@labelbee/lb-utils").IPointCloudBoxList | undefined;
|
|
14
15
|
selectNextBox: (manual?: boolean) => void;
|
|
15
16
|
selectPrevBox: (manual?: boolean) => void;
|
|
16
|
-
deletePointCloudBox: (id: string) => void;
|
|
17
|
+
deletePointCloudBox: (id: string, shouldUpdateMatchingRectList?: boolean) => void;
|
|
17
18
|
selectedBoxes: IPointCloudBox[];
|
|
18
19
|
updateSelectedBoxes: (updateList: PartialIPointCloudBoxList) => import("@labelbee/lb-utils").IPointCloudBoxList | undefined;
|
|
19
20
|
getPointCloudByID: (id: string) => IPointCloudBox | undefined;
|
|
20
|
-
deleteSelectedPointCloudBoxAndPolygon: () => void;
|
|
21
|
+
deleteSelectedPointCloudBoxAndPolygon: (currentData: IFileItem) => void;
|
|
21
22
|
};
|
|
22
23
|
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Proivde the `useWindowKeydownListener` hook (more power except `https://github.com/alibaba/hooks/blob/master/packages/hooks/src/useEventListener/index.ts`)
|
|
3
|
+
* which will have `preappend` or `append` event in your order.
|
|
4
|
+
*/
|
|
5
|
+
import '../utils/event-polyfill';
|
|
6
|
+
type KeydownListener = (e: KeyboardEvent) => void;
|
|
7
|
+
type Caller = (fn: KeydownListener) => () => void;
|
|
8
|
+
export interface WindowKeydownListenerHooker {
|
|
9
|
+
appendEventListener: Caller;
|
|
10
|
+
preappendEventListener: Caller;
|
|
11
|
+
/** Alias for `appendEventListener`, user-friendly name */
|
|
12
|
+
addEventListener: Caller;
|
|
13
|
+
}
|
|
14
|
+
export declare const getEmptyUseWindowKeydownListener: () => WindowKeydownListenerHooker;
|
|
15
|
+
declare const useWindowKeydownListener: () => WindowKeydownListenerHooker;
|
|
16
|
+
export default useWindowKeydownListener;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type MapIndirectWeakSet<T extends object> = Map<string, Map<string, WeakSet<T>>>;
|
|
2
|
+
/**
|
|
3
|
+
* Update MapIndirectWeakSet
|
|
4
|
+
*
|
|
5
|
+
* @param map The map will be changed
|
|
6
|
+
* @param key0 The top key
|
|
7
|
+
* @param key1 The inner key
|
|
8
|
+
* @param value The target to be set
|
|
9
|
+
* @returns return map
|
|
10
|
+
*/
|
|
11
|
+
export declare const addMapIndirectWeakSetItem: <T extends object>(map: MapIndirectWeakSet<T>, key0: string, key1: string, value: T) => MapIndirectWeakSet<T>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IInputList } from '@labelbee/lb-utils';
|
|
3
|
+
interface IProps {
|
|
4
|
+
subAttributeList: IInputList[];
|
|
5
|
+
setSubAttribute: (value: string, subAttribute: string) => void;
|
|
6
|
+
getValue: (subAttribute: IInputList) => undefined | string;
|
|
7
|
+
lang?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const WrapSubAttributeList: (props: IProps) => React.JSX.Element;
|
|
10
|
+
export default WrapSubAttributeList;
|
|
@@ -20,8 +20,9 @@ export interface IVideoAnnotateProps {
|
|
|
20
20
|
drawLayerSlot?: DrawLayerSlot;
|
|
21
21
|
footer?: any;
|
|
22
22
|
skipBeforePageTurning?: (pageTurning: Function) => void;
|
|
23
|
+
annotationBefore?: (setAnnotationData: Function) => void;
|
|
23
24
|
}
|
|
24
25
|
declare const _default: import("react-redux").ConnectedComponent<React.FC<IVideoAnnotateProps>, import("react-redux").Omit<IVideoAnnotateProps & {
|
|
25
26
|
children?: React.ReactNode;
|
|
26
|
-
}, "
|
|
27
|
+
}, "step" | "stepList" | "imgIndex" | "imgList" | "config" | "skipBeforePageTurning" | "loading" | "path" | "stepInfo">>;
|
|
27
28
|
export default _default;
|
|
@@ -49,7 +49,7 @@ declare class VideoClipTool extends React.Component<IVideoClipProps, IState> {
|
|
|
49
49
|
videoPlayer?: any;
|
|
50
50
|
videoNode?: HTMLVideoElement;
|
|
51
51
|
videoRef?: HTMLVideoElement;
|
|
52
|
-
throttledUpdateTime: _.
|
|
52
|
+
throttledUpdateTime: _.DebouncedFuncLeading<(newValue: number) => void>;
|
|
53
53
|
constructor(props: IVideoClipProps);
|
|
54
54
|
get valid(): boolean;
|
|
55
55
|
get config(): any;
|
|
@@ -91,6 +91,7 @@ declare class VideoClipTool extends React.Component<IVideoClipProps, IState> {
|
|
|
91
91
|
* @returns
|
|
92
92
|
*/
|
|
93
93
|
toggleClipStatus: (curTime?: number) => void;
|
|
94
|
+
setClipResult: (curTime?: number) => void;
|
|
94
95
|
/** 添加时间点 */
|
|
95
96
|
addTime: () => void;
|
|
96
97
|
/** 更新当前时间 */
|
|
@@ -65,7 +65,7 @@ export declare class TagToolInstanceAdaptor extends React.Component<IVideoTagIns
|
|
|
65
65
|
value: string;
|
|
66
66
|
};
|
|
67
67
|
isMulti: boolean;
|
|
68
|
-
},
|
|
68
|
+
}, existData?: ObjectString) => _.Dictionary<string | undefined>;
|
|
69
69
|
setResult: (tagResult: any[]) => void;
|
|
70
70
|
setLabel: (num1: number, num2: number) => void;
|
|
71
71
|
/**
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The file is about `ToolStyle` context.
|
|
3
|
+
*
|
|
4
|
+
* What will provide:
|
|
5
|
+
* 1. give the explicit `toolStyle` config
|
|
6
|
+
* 2. give hook for reading context
|
|
7
|
+
*
|
|
8
|
+
* Who will use/consume:
|
|
9
|
+
* 1. `BasicToolOperation` class & its derived class
|
|
10
|
+
* 2. `DrawUtils`
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
import React, { FC, PropsWithChildren } from 'react';
|
|
14
|
+
import type { ToolStyle } from '../types/toolStyle';
|
|
15
|
+
declare const validFields: readonly ["hiddenText"];
|
|
16
|
+
type ValidField = typeof validFields[number];
|
|
17
|
+
type OptionalToolStyle = Pick<ToolStyle, ValidField>;
|
|
18
|
+
export declare const ToolStyleContext: React.Context<{
|
|
19
|
+
value: OptionalToolStyle;
|
|
20
|
+
updateValue: (value: Partial<OptionalToolStyle>) => void;
|
|
21
|
+
}>;
|
|
22
|
+
export declare const useToolStyleContext: () => {
|
|
23
|
+
value: OptionalToolStyle;
|
|
24
|
+
updateValue: (value: Partial<OptionalToolStyle>) => void;
|
|
25
|
+
};
|
|
26
|
+
interface ToolStyleProviderProps {
|
|
27
|
+
value?: OptionalToolStyle;
|
|
28
|
+
}
|
|
29
|
+
export declare const ToolStyleProvider: FC<PropsWithChildren<ToolStyleProviderProps>>;
|
|
30
|
+
export {};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -9,15 +9,20 @@ import { VideoTagTool } from '@/components/videoAnnotate/videoTagTool/TagToolIns
|
|
|
9
9
|
import './index.scss';
|
|
10
10
|
import PredictTracking from '@/components/predictTracking';
|
|
11
11
|
import LLMToolView from '@/components/LLMToolView';
|
|
12
|
-
import SwitchCuboidBoxIn2DView from '@/views/MainView/toolFooter/SwitchCuboidBoxIn2DView';
|
|
12
|
+
import SwitchCuboidBoxIn2DView, { SwitchCuboidBoxIn2DViewStateMode } from '@/views/MainView/toolFooter/SwitchCuboidBoxIn2DView';
|
|
13
|
+
import BatchSwitchConnectIn2DView from '@/views/MainView/toolFooter/BatchSwitchConnectIn2DView';
|
|
13
14
|
import MeasureCanvas from './components/measureCanvas';
|
|
14
15
|
import AnnotatedBox from './views/MainView/sidebar/PointCloudToolSidebar/components/annotatedBox';
|
|
16
|
+
import RectRotateSensitivitySlider from './views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider';
|
|
15
17
|
import { FindTrackIDIndexInCheckMode as FindTrackIDIndex } from './views/MainView/sidebar/PointCloudToolSidebar/components/findTrackIDIndex';
|
|
18
|
+
import { WrapAudioPlayer as AudioPlayer } from './components/audioPlayer';
|
|
19
|
+
import { generatePointCloudBoxRects } from './utils';
|
|
20
|
+
import SubAttributeList from './components/subAttributeList';
|
|
16
21
|
export declare const store: import("redux").Store<{}, import("redux").Action<any>> & {
|
|
17
22
|
dispatch: unknown;
|
|
18
23
|
};
|
|
19
24
|
declare const _default: React.ForwardRefExoticComponent<AppProps & React.RefAttributes<unknown>>;
|
|
20
25
|
export default _default;
|
|
21
|
-
export { AnnotationView, PointCloudAnnotationView, QuestionView, TextContent, LLMToolView, i18n, VideoTagTool, PredictTracking, SwitchCuboidBoxIn2DView, MeasureCanvas, AnnotatedBox, FindTrackIDIndex, };
|
|
26
|
+
export { AnnotationView, PointCloudAnnotationView, QuestionView, TextContent, LLMToolView, i18n, VideoTagTool, PredictTracking, SwitchCuboidBoxIn2DView, SwitchCuboidBoxIn2DViewStateMode, BatchSwitchConnectIn2DView, MeasureCanvas, AnnotatedBox, RectRotateSensitivitySlider, FindTrackIDIndex, AudioPlayer, generatePointCloudBoxRects, SubAttributeList, };
|
|
22
27
|
export * from './constant';
|
|
23
28
|
export * from './typeTem';
|
|
@@ -40,6 +40,7 @@ export declare const ANNOTATION_ACTIONS: {
|
|
|
40
40
|
SET_PREDICT_RESULT: string;
|
|
41
41
|
SET_HIGHLIGHT_ATTRIBUTE: string;
|
|
42
42
|
UPDATE_PRE_DATA_PROCESS: string;
|
|
43
|
+
UPDATE_IMG_INDEX_BY_EXTERNAL: string;
|
|
43
44
|
};
|
|
44
45
|
export declare const IMAGE_ATTRIBUTE_ACTIONS: {
|
|
45
46
|
UPDATE_IMG_ATTRIBUTE: string;
|
|
@@ -8,6 +8,8 @@ interface Store {
|
|
|
8
8
|
setHighlightIDs: (highlightIDs: number[]) => void;
|
|
9
9
|
selectedIDs: string[];
|
|
10
10
|
setSelectedIDs: (selectedIDs: string[]) => void;
|
|
11
|
+
rectRotateSensitivity: number;
|
|
12
|
+
setRectRotateSensitivity: (sensitivity: number) => void;
|
|
11
13
|
setPtCtx: (ptCtx: IPointCloudContext) => void;
|
|
12
14
|
}
|
|
13
15
|
declare const useAnnotatedBoxStore: import("zustand").UseBoundStore<import("zustand").StoreApi<Store>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IStepInfo } from '@/types/step';
|
|
2
|
-
import { GetFileData, LoadFileList, IFileItem, OnPageChange, OnSave, OnStepChange, OnSubmit } from '@/types/data';
|
|
2
|
+
import { GetFileData, LoadFileList, IFileItem, OnPageChange, OnSave, OnStepChange, OnSubmit, GetImgIndexByExternal } from '@/types/data';
|
|
3
3
|
import { AnnotationActionTypes, ToolInstance } from './types';
|
|
4
4
|
import { ESubmitType } from '@/constant';
|
|
5
5
|
import { EPageTurningOperation } from '@/data/enums/AnnotationSize';
|
|
@@ -28,6 +28,7 @@ export declare function UpdateSkipBeforePageTurning(skipBeforePageTurning: (page
|
|
|
28
28
|
export declare function UpdateBeforeRotate(beforeRotate: () => {}): AnnotationActionTypes;
|
|
29
29
|
export declare function UpdatePreDataProcess(preDataProcess: () => {}): AnnotationActionTypes;
|
|
30
30
|
export declare function CopyBackWordResult(): AnnotationActionTypes;
|
|
31
|
+
export declare function UpdateImgIndexByExternal(getImgIndexByExternal: GetImgIndexByExternal): AnnotationActionTypes;
|
|
31
32
|
export declare function BatchUpdateTrackID({ id, newID, rangeIndex, imgList, }: {
|
|
32
33
|
id: number;
|
|
33
34
|
newID: number;
|
|
@@ -43,7 +44,7 @@ export declare const UpdateHighlightAttribute: (attribute: string) => Annotation
|
|
|
43
44
|
* 初始化任务数据
|
|
44
45
|
* @param param0
|
|
45
46
|
*/
|
|
46
|
-
export declare function InitTaskData({ onSubmit, onSave, onPageChange, onStepChange, getFileData, pageSize, loadFileList, step, stepList, skipBeforePageTurning, beforeRotate, checkMode, highlightAttribute, preDataProcess, }: any): any;
|
|
47
|
+
export declare function InitTaskData({ onSubmit, onSave, onPageChange, onStepChange, getFileData, pageSize, loadFileList, step, stepList, skipBeforePageTurning, beforeRotate, checkMode, highlightAttribute, preDataProcess, getImgIndexByExternal, }: any): any;
|
|
47
48
|
/**
|
|
48
49
|
* 初始化任务数据
|
|
49
50
|
* @param param0
|
|
@@ -54,4 +54,5 @@ export declare const annotationReducer: (state: {
|
|
|
54
54
|
predictionResultVisible: boolean;
|
|
55
55
|
highlightAttribute: string;
|
|
56
56
|
preDataProcess?: ((params: import("../../App").IPreDataProcessParams) => IPointCloudBox[]) | undefined;
|
|
57
|
+
getImgIndexByExternal?: import("@/types/data").GetImgIndexByExternal | undefined;
|
|
57
58
|
} | undefined, action: AnnotationActionTypes) => AnnotationState;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AnnotationEngine, RectOperation, TagOperation, TextToolOperation, PointOperation, PolygonOperation, LineToolOperation } from '@labelbee/lb-annotation';
|
|
2
2
|
import { ANNOTATION_ACTIONS } from '@/store/Actions';
|
|
3
3
|
import { IStepInfo } from '@/types/step';
|
|
4
|
-
import { OnSubmit, IFileItem, GetFileData, OnSave, OnPageChange, OnStepChange, LoadFileList } from '@/types/data';
|
|
4
|
+
import { OnSubmit, IFileItem, GetFileData, OnSave, OnPageChange, OnStepChange, LoadFileList, GetImgIndexByExternal } from '@/types/data';
|
|
5
5
|
import { ESubmitType } from '@/constant';
|
|
6
6
|
import { IPointCloudBox } from '@labelbee/lb-utils';
|
|
7
7
|
import { IPreDataProcessParams } from '@/App';
|
|
@@ -47,6 +47,7 @@ export interface AnnotationState {
|
|
|
47
47
|
predictionResultVisible: boolean;
|
|
48
48
|
highlightAttribute: string;
|
|
49
49
|
preDataProcess?: (params: IPreDataProcessParams) => IPointCloudBox[];
|
|
50
|
+
getImgIndexByExternal?: GetImgIndexByExternal;
|
|
50
51
|
}
|
|
51
52
|
interface UpdateToolInstance {
|
|
52
53
|
type: typeof ANNOTATION_ACTIONS.UPDATE_TOOL_INSTANCE;
|
|
@@ -135,6 +136,12 @@ interface UpdateGetFileList {
|
|
|
135
136
|
getFileData: LoadFileList;
|
|
136
137
|
};
|
|
137
138
|
}
|
|
139
|
+
interface UpdataImgIndexByExternal {
|
|
140
|
+
type: typeof ANNOTATION_ACTIONS.UPDATE_IMG_INDEX_BY_EXTERNAL;
|
|
141
|
+
payload: {
|
|
142
|
+
getImgIndexByExternal: GetImgIndexByExternal;
|
|
143
|
+
};
|
|
144
|
+
}
|
|
138
145
|
interface CopyBackWordResult extends CommonActions {
|
|
139
146
|
type: typeof ANNOTATION_ACTIONS.COPY_BACKWARD_RESULT;
|
|
140
147
|
}
|
|
@@ -158,5 +165,5 @@ interface BatchUpdateResultByTrackID {
|
|
|
158
165
|
range: [number, number];
|
|
159
166
|
};
|
|
160
167
|
}
|
|
161
|
-
export type AnnotationActionTypes = UpdateToolInstance | UpdateImgList | UpdateAnnotationConfig | SubmitFileData | LoadFileData | SetTaskConfig | InitTool | UpdateOnSubmit | UpdateOnPageChange | UpdateOnStepChange | UpdateGetFileData | UpdatePageSize | UpdateGetFileList | CopyBackWordResult | UpdateOnSave | BatchUpdateTrackID | BatchUpdateResultByTrackID | InitAnnotationState;
|
|
168
|
+
export type AnnotationActionTypes = UpdateToolInstance | UpdateImgList | UpdateAnnotationConfig | SubmitFileData | LoadFileData | SetTaskConfig | InitTool | UpdateOnSubmit | UpdateOnPageChange | UpdateOnStepChange | UpdateGetFileData | UpdatePageSize | UpdateGetFileList | CopyBackWordResult | UpdateOnSave | BatchUpdateTrackID | BatchUpdateResultByTrackID | UpdataImgIndexByExternal | InitAnnotationState;
|
|
162
169
|
export {};
|
|
@@ -1,5 +1,61 @@
|
|
|
1
1
|
import { IStepInfo } from '@/types/step';
|
|
2
|
+
import { IMappingImg } from '@/types/data';
|
|
3
|
+
interface ICopyResultChangeParams {
|
|
4
|
+
copyResult: string;
|
|
5
|
+
step: number;
|
|
6
|
+
currentResult: string;
|
|
7
|
+
mappingImgList: IMappingImg[];
|
|
8
|
+
preMappingImgList: IMappingImg[];
|
|
9
|
+
valid: boolean;
|
|
10
|
+
}
|
|
11
|
+
interface IGetNextPath {
|
|
12
|
+
prePath: string;
|
|
13
|
+
preMappingImgList: IMappingImg[];
|
|
14
|
+
nextMappingImgList: IMappingImg[];
|
|
15
|
+
}
|
|
16
|
+
interface ICopyResultItemHandlerParams {
|
|
17
|
+
item: any;
|
|
18
|
+
key?: string | number;
|
|
19
|
+
parent: any;
|
|
20
|
+
mappingImgList: IMappingImg[];
|
|
21
|
+
preMappingImgList: IMappingImg[];
|
|
22
|
+
}
|
|
2
23
|
export default class AnnotationDataUtils {
|
|
24
|
+
/**
|
|
25
|
+
* Performs a depth-first traversal of an object or array, executing a callback function on each element.
|
|
26
|
+
*
|
|
27
|
+
* @param {any} objOrArr - The object or array to be traversed.
|
|
28
|
+
* @param {Function} callback - The callback function to be executed on each element.
|
|
29
|
+
* The callback function takes three parameters: element, key, and parent.
|
|
30
|
+
* @param {string | number} [key] - The key or index of the current element in its parent (optional).
|
|
31
|
+
* @param {any} [parent] - The parent of the current element (optional).
|
|
32
|
+
*/
|
|
33
|
+
static traverseDF(objOrArr: any, callback: (element: any, key?: string | number, parent?: any) => void, key?: string | number, parent?: any): void;
|
|
34
|
+
/**
|
|
35
|
+
* Calculates the next path based on the provided parameters.
|
|
36
|
+
*
|
|
37
|
+
* @param {IGetNextPath} params - The object containing necessary information.
|
|
38
|
+
* @param {string} params.prePath - The current path.
|
|
39
|
+
* @param {IImgList} params.preMappingImgList - The list of current mapping images.
|
|
40
|
+
* @param {IImgList} params.nextMappingImgList - The list of next mapping images.
|
|
41
|
+
* @returns {string} The next path, returns an empty string if not found.
|
|
42
|
+
*/
|
|
43
|
+
static getNextPath(params: IGetNextPath): string | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Handles the processing of individual items during the traversal of results or resultRect.
|
|
46
|
+
* This function updates specific properties of the parent object based on the key of the current item.
|
|
47
|
+
*
|
|
48
|
+
* @param {ICopyResultItemHandlerParams} params - Parameters containing the current item, its key, parent object, and image lists.
|
|
49
|
+
* @param {ICopyResultItemHandlerParams.item} item - The current item being processed.
|
|
50
|
+
* @param {ICopyResultItemHandlerParams.key} key - The key associated with the current item.
|
|
51
|
+
* @param {ICopyResultItemHandlerParams.parent} parent - The parent object of the current item.
|
|
52
|
+
* @param {ICopyResultItemHandlerParams.mappingImgList} mappingImgList - The list of images for mapping.
|
|
53
|
+
* @param {ICopyResultItemHandlerParams.preMappingImgList} preMappingImgList - The list of images before mapping.
|
|
54
|
+
*/
|
|
55
|
+
static copyResultItemHandler(params: ICopyResultItemHandlerParams): {
|
|
56
|
+
value: any;
|
|
57
|
+
oldValue: any;
|
|
58
|
+
};
|
|
3
59
|
/**
|
|
4
60
|
* 复制上一张图片结果
|
|
5
61
|
* @param copyResult 复制的结果
|
|
@@ -7,7 +63,7 @@ export default class AnnotationDataUtils {
|
|
|
7
63
|
* @param currentResult 当前的步骤
|
|
8
64
|
* @returns
|
|
9
65
|
*/
|
|
10
|
-
static copyResultChange(
|
|
66
|
+
static copyResultChange(params: ICopyResultChangeParams): string | undefined;
|
|
11
67
|
/**
|
|
12
68
|
* 判断结果sourceID与依赖数据的id是否能对应
|
|
13
69
|
* @param result
|
|
@@ -75,3 +131,4 @@ export default class AnnotationDataUtils {
|
|
|
75
131
|
*/
|
|
76
132
|
static deleteRes(resData: any, dataSourceStep: number, deletedIds: string[], stepKeys: number[]): void;
|
|
77
133
|
}
|
|
134
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ICoordinate, IPointCloudBox } from '@labelbee/lb-utils';
|
|
2
|
+
export declare enum EPointCloudBoxRenderTrigger {
|
|
3
|
+
Default = "Default",
|
|
4
|
+
UndoRedo = "UndoRedo",
|
|
5
|
+
ClearAll = "ClearAll",
|
|
6
|
+
Single = "Single",
|
|
7
|
+
SingleDelete = "SingleDelete",
|
|
8
|
+
SingleToggleValid = "SingleToggleValid",
|
|
9
|
+
SingleRotate = "SingleRotate",
|
|
10
|
+
MultiPaste = "MultiPaste",
|
|
11
|
+
MultiMove = "MultiMove"
|
|
12
|
+
}
|
|
13
|
+
export declare enum EPointCloudBoxSingleModifiedType {
|
|
14
|
+
ChangeAttribute = "ChangeAttribute",
|
|
15
|
+
Move = "Move",
|
|
16
|
+
ChangeDepth = "ChangeDepth",
|
|
17
|
+
ChangeSize = "ChangeSize",
|
|
18
|
+
ToggleValid = "ToggleValid"
|
|
19
|
+
}
|
|
20
|
+
export declare const calcResetAreasAndBoxIds: (trigger: EPointCloudBoxRenderTrigger, newList: IPointCloudBox[], oldList: IPointCloudBox[]) => {
|
|
21
|
+
modifiedBoxIds: string[];
|
|
22
|
+
resetAreas: ICoordinate[][];
|
|
23
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ICoordinate, IPointCloudBox, ISize } from '@labelbee/lb-utils';
|
|
1
|
+
import { IBasicRect, ICoordinate, IPointCloudBox, ISize } from '@labelbee/lb-utils';
|
|
2
2
|
import { IMappingImg } from '@/types/data';
|
|
3
3
|
export declare const jsonParser: (content: any, defaultValue?: any) => any;
|
|
4
4
|
export declare const getNewNode: <T>(newNode: T, oldNode: T) => T;
|
|
@@ -11,6 +11,9 @@ export declare const getBoundingRect: (points: ICoordinate[]) => {
|
|
|
11
11
|
width: number;
|
|
12
12
|
height: number;
|
|
13
13
|
};
|
|
14
|
+
export declare const isBoundingRectInImage: (boundingRect: Omit<IBasicRect, "id">, path: string, imageSizes: {
|
|
15
|
+
[key: string]: ISize;
|
|
16
|
+
}) => boolean;
|
|
14
17
|
interface IGetRectPointCloudBoxParams {
|
|
15
18
|
pointCloudBox: IPointCloudBox;
|
|
16
19
|
mappingData: IMappingImg;
|
|
@@ -25,4 +28,31 @@ export declare const getRectPointCloudBox: (params: IGetRectPointCloudBoxParams)
|
|
|
25
28
|
width: number;
|
|
26
29
|
height: number;
|
|
27
30
|
} | undefined;
|
|
31
|
+
export interface GeneratePointCloudBoxRectsOptions {
|
|
32
|
+
prepareRectsFn?: (rects: Array<ReturnType<typeof getRectPointCloudBox>>, pointCloudBox: IPointCloudBox) => Array<ReturnType<typeof getRectPointCloudBox>>;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Updates the given point cloud box with rectangles derived from the mapping image list and image sizes.
|
|
36
|
+
*
|
|
37
|
+
* @param {Object} params - The parameters for the function.
|
|
38
|
+
* @param {IPointCloudBox} params.pointCloudBox - The point cloud box object to be updated.
|
|
39
|
+
* @param {IMappingImg[]} params.mappingImgList - The list of mapping images to process.
|
|
40
|
+
* @param {Object.<string, ISize>} params.imageSizes - An object containing image sizes keyed by image paths.
|
|
41
|
+
*
|
|
42
|
+
* @param {Object=} options - The options
|
|
43
|
+
* @param {Function=} options.prepareRectsFn - The prepare func for rects
|
|
44
|
+
*
|
|
45
|
+
* @returns {void}
|
|
46
|
+
*
|
|
47
|
+
* @description This function processes a list of mapping images to generate rectangles for the provided point cloud box.
|
|
48
|
+
* It filters out undefined rectangles and updates the point cloud box with the valid rectangles. Note that this function
|
|
49
|
+
* modifies the `pointCloudBox` parameter by adding a `rects` property.
|
|
50
|
+
*/
|
|
51
|
+
export declare const generatePointCloudBoxRects: (params: {
|
|
52
|
+
pointCloudBox: IPointCloudBox;
|
|
53
|
+
mappingImgList: IMappingImg[];
|
|
54
|
+
imageSizes: {
|
|
55
|
+
[key: string]: ISize;
|
|
56
|
+
};
|
|
57
|
+
}, options?: GeneratePointCloudBoxRectsOptions) => void;
|
|
28
58
|
export {};
|
|
@@ -20,5 +20,5 @@ interface IProps {
|
|
|
20
20
|
export declare const SingleTextInput: (props: any) => React.JSX.Element;
|
|
21
21
|
declare const _default: import("react-redux").ConnectedComponent<React.FC<IProps>, import("react-redux").Omit<IProps & {
|
|
22
22
|
children?: React.ReactNode;
|
|
23
|
-
}, "
|
|
23
|
+
}, "step" | "stepList" | "imgIndex" | "basicResultList" | "toolInstance" | "triggerEventAfterIndexChanged" | "dispatch">>;
|
|
24
24
|
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The component which provides the batch operation for connection/disconnection
|
|
3
|
+
*/
|
|
4
|
+
import { FC } from 'react';
|
|
5
|
+
export declare enum EventBusEvent {
|
|
6
|
+
switchConnect = "batch:switch-connect"
|
|
7
|
+
}
|
|
8
|
+
declare const BatchSwitchConnectIn2DView: FC;
|
|
9
|
+
export default BatchSwitchConnectIn2DView;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, EventBusEvent as BatchSwitchConnectionEventBusEvent } from './BatchSwitchConnectIn2DView';
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
declare
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export declare enum SwitchCuboidBoxIn2DViewStateMode {
|
|
3
|
+
isHidden = 0,
|
|
4
|
+
is2d = 1,
|
|
5
|
+
is3d = 2
|
|
6
|
+
}
|
|
7
|
+
interface SwitchCuboidBoxIn2DViewProps {
|
|
8
|
+
onChange?: (stateMode: SwitchCuboidBoxIn2DViewStateMode) => void;
|
|
9
|
+
}
|
|
10
|
+
declare const SwitchCuboidBoxIn2DView: FC<SwitchCuboidBoxIn2DViewProps>;
|
|
3
11
|
export default SwitchCuboidBoxIn2DView;
|