@labelbee/lb-components 1.23.0-alpha.121 → 1.23.0-alpha.123
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/_virtual/2DViewWorker.js +1 -1
- package/dist/components/LLMMultiWheelView/dialogView/index.js +1 -0
- package/dist/components/LLMMultiWheelView/index.js +1 -0
- package/dist/components/LLMMultiWheelView/sidebar/index.js +1 -0
- package/dist/components/LLMToolView/questionView/components/header/index.js +1 -1
- package/dist/components/LLMToolView/questionView/index.js +1 -1
- package/dist/components/LLMToolView/sidebar/components/answerSort/index.js +1 -1
- package/dist/components/LLMToolView/sidebar/components/modelAnswerSort/index.js +1 -0
- package/dist/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -2
- package/dist/components/LLMToolView/sidebar/index.js +1 -1
- package/dist/data/enums/ToolType.js +1 -1
- package/dist/index.css +50 -0
- package/dist/index.js +1 -1
- package/dist/store/LLMMultiWheel/index.js +1 -0
- package/dist/store/annotation/reducer.js +1 -1
- package/dist/store/ctx.js +1 -1
- package/dist/types/components/LLMMultiWheelView/dialogView/index.d.ts +15 -0
- package/dist/types/components/LLMMultiWheelView/index.d.ts +20 -0
- package/dist/types/components/LLMMultiWheelView/sidebar/index.d.ts +8 -0
- package/dist/types/components/LLMMultiWheelView/types.d.ts +62 -0
- package/dist/types/components/LLMToolView/questionView/components/header/index.d.ts +15 -0
- package/dist/types/components/LLMToolView/questionView/index.d.ts +7 -0
- package/dist/types/components/LLMToolView/sidebar/components/answerSort/index.d.ts +3 -0
- package/dist/types/components/LLMToolView/sidebar/components/modelAnswerSort/index.d.ts +29 -0
- package/dist/types/components/LLMToolView/sidebar/components/textInputBox/index.d.ts +2 -2
- package/dist/types/components/LLMToolView/sidebar/index.d.ts +10 -0
- package/dist/types/components/LLMToolView/types.d.ts +5 -2
- package/dist/types/data/enums/ToolType.d.ts +2 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/store/LLMMultiWheel/index.d.ts +16 -0
- package/dist/types/store/ctx.d.ts +7 -0
- package/dist/types/views/MainView/LLMMultiWheelLayout/index.d.ts +9 -0
- package/dist/views/MainView/LLMMultiWheelLayout/index.js +1 -0
- package/dist/views/MainView/index.js +1 -1
- package/dist/views/MainView/sidebar/index.js +1 -1
- package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
- package/es/_virtual/2DViewWorker.js +1 -1
- package/es/components/LLMMultiWheelView/dialogView/index.js +1 -0
- package/es/components/LLMMultiWheelView/index.js +1 -0
- package/es/components/LLMMultiWheelView/sidebar/index.js +1 -0
- package/es/components/LLMToolView/questionView/components/header/index.js +1 -1
- package/es/components/LLMToolView/questionView/index.js +1 -1
- package/es/components/LLMToolView/sidebar/components/answerSort/index.js +1 -1
- package/es/components/LLMToolView/sidebar/components/modelAnswerSort/index.js +1 -0
- package/es/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -2
- package/es/components/LLMToolView/sidebar/index.js +1 -1
- package/es/data/enums/ToolType.js +1 -1
- package/es/index.css +50 -0
- package/es/index.js +1 -1
- package/es/store/LLMMultiWheel/index.js +1 -0
- package/es/store/annotation/reducer.js +1 -1
- package/es/store/ctx.js +1 -1
- package/es/views/MainView/LLMMultiWheelLayout/index.js +1 -0
- package/es/views/MainView/index.js +1 -1
- package/es/views/MainView/sidebar/index.js +1 -1
- package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ISelectAnswerSort {
|
|
3
|
+
[key: string]: number[][];
|
|
4
|
+
}
|
|
5
|
+
interface IModelList {
|
|
6
|
+
id: number;
|
|
7
|
+
answerList: IAnswerList[];
|
|
8
|
+
title: string;
|
|
9
|
+
}
|
|
10
|
+
interface IAnswerList {
|
|
11
|
+
id: string;
|
|
12
|
+
answer: string;
|
|
13
|
+
}
|
|
14
|
+
interface IProps {
|
|
15
|
+
selectedSort?: ISelectAnswerSort;
|
|
16
|
+
modelData: IModelList[];
|
|
17
|
+
selectedAnswerSort: (sorts: ISelectAnswerSort) => void;
|
|
18
|
+
disabeledAll?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare const getSorts: ({ selectedSort, initSelected, modelList, }: {
|
|
21
|
+
selectedSort?: number[][] | undefined;
|
|
22
|
+
modelList: any[];
|
|
23
|
+
initSelected?: number[][] | undefined;
|
|
24
|
+
}) => {
|
|
25
|
+
waitSorts: any[];
|
|
26
|
+
newSort: any[];
|
|
27
|
+
};
|
|
28
|
+
declare const _default: React.ForwardRefExoticComponent<IProps & React.RefAttributes<unknown>>;
|
|
29
|
+
export default _default;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ITextList } from '@/components/LLMToolView/types';
|
|
3
3
|
interface IProps {
|
|
4
4
|
textAttribute: ITextList[];
|
|
5
5
|
disabeledAll?: boolean;
|
|
6
|
-
LLMConfig?: ILLMToolConfig;
|
|
7
6
|
setText: (value: ITextList[]) => void;
|
|
7
|
+
textConfig: ITextList[];
|
|
8
8
|
}
|
|
9
9
|
declare const TextInputBox: (props: IProps) => React.JSX.Element;
|
|
10
10
|
export default TextInputBox;
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { IWaitAnswerSort, IAnswerSort, ILLMToolConfig, IAnswerList, ITextList, ISelectedTags, ILLMMultiWheelToolConfig } from '@/components/LLMToolView/types';
|
|
2
3
|
interface IProps {
|
|
3
4
|
annotation?: any;
|
|
4
5
|
dispatch: any;
|
|
5
6
|
checkMode?: boolean;
|
|
6
7
|
}
|
|
8
|
+
export interface IAnnotationResult {
|
|
9
|
+
newSort?: IAnswerSort[][];
|
|
10
|
+
waitSorts?: IWaitAnswerSort[];
|
|
11
|
+
answerList?: IAnswerList[];
|
|
12
|
+
textAttribute?: ITextList[];
|
|
13
|
+
tagList?: ISelectedTags;
|
|
14
|
+
}
|
|
15
|
+
export declare const EmptyConfig: () => React.JSX.Element;
|
|
16
|
+
export declare const getLLMIsNoConfig: (LLMConfig?: ILLMMultiWheelToolConfig | ILLMToolConfig) => boolean;
|
|
7
17
|
declare const _default: import("react-redux").ConnectedComponent<(props: IProps) => React.JSX.Element, import("react-redux").Omit<IProps, "annotation" | "dispatch">>;
|
|
8
18
|
export default _default;
|
|
@@ -56,6 +56,9 @@ export interface ILLMToolConfig {
|
|
|
56
56
|
tagInputListConfigurable: boolean;
|
|
57
57
|
inputList?: IInputList[];
|
|
58
58
|
}
|
|
59
|
+
export interface ILLMMultiWheelToolConfig extends Omit<ILLMToolConfig, 'enableModelAPI' | 'modelAPIConfigList'> {
|
|
60
|
+
dialogSort?: boolean;
|
|
61
|
+
}
|
|
59
62
|
export interface ITextList {
|
|
60
63
|
textId?: string;
|
|
61
64
|
title?: string | number;
|
|
@@ -68,7 +71,7 @@ export interface ITextList {
|
|
|
68
71
|
isLaText?: boolean;
|
|
69
72
|
}
|
|
70
73
|
export interface IWaitAnswerSort {
|
|
71
|
-
title: number;
|
|
74
|
+
title: number | string;
|
|
72
75
|
id: number;
|
|
73
76
|
}
|
|
74
77
|
export interface IPoint {
|
|
@@ -82,7 +85,7 @@ export interface ITagVertexPoint {
|
|
|
82
85
|
tr: IPoint;
|
|
83
86
|
}
|
|
84
87
|
export interface IAnswerSort {
|
|
85
|
-
title: number;
|
|
88
|
+
title: number | string;
|
|
86
89
|
id: number;
|
|
87
90
|
tagCenterPoint?: IPoint;
|
|
88
91
|
tagVertexPoint?: ITagVertexPoint;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -19,11 +19,12 @@ import { WrapAudioPlayer as AudioPlayer } from './components/audioPlayer';
|
|
|
19
19
|
import { generatePointCloudBoxRects } from './utils';
|
|
20
20
|
import SubAttributeList from './components/subAttributeList';
|
|
21
21
|
import useToolConfigStore from '@/store/toolConfig';
|
|
22
|
+
import { LLMMultiWheelSourceView } from './components/LLMMultiWheelView';
|
|
22
23
|
export declare const store: import("redux").Store<{}, import("redux").Action<any>> & {
|
|
23
24
|
dispatch: unknown;
|
|
24
25
|
};
|
|
25
26
|
declare const _default: React.ForwardRefExoticComponent<AppProps & React.RefAttributes<unknown>>;
|
|
26
27
|
export default _default;
|
|
27
|
-
export { AnnotationView, PointCloudAnnotationView, QuestionView, TextContent, LLMToolView, i18n, VideoTagTool, PredictTracking, SwitchCuboidBoxIn2DView, SwitchCuboidBoxIn2DViewStateMode, BatchSwitchConnectIn2DView, MeasureCanvas, AnnotatedBox, RectRotateSensitivitySlider, FindTrackIDIndex, AudioPlayer, generatePointCloudBoxRects, SubAttributeList, useToolConfigStore, };
|
|
28
|
+
export { AnnotationView, PointCloudAnnotationView, QuestionView, LLMMultiWheelSourceView, TextContent, LLMToolView, i18n, VideoTagTool, PredictTracking, SwitchCuboidBoxIn2DView, SwitchCuboidBoxIn2DViewStateMode, BatchSwitchConnectIn2DView, MeasureCanvas, AnnotatedBox, RectRotateSensitivitySlider, FindTrackIDIndex, AudioPlayer, generatePointCloudBoxRects, SubAttributeList, useToolConfigStore, };
|
|
28
29
|
export * from './constant';
|
|
29
30
|
export * from './typeTem';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EDataFormatType } from '@/constant';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
interface Store {
|
|
4
|
+
dataFormatType: EDataFormatType;
|
|
5
|
+
setDataFormatType: (dataFormatType: EDataFormatType) => void;
|
|
6
|
+
selectedID: React.Key;
|
|
7
|
+
setSelectedID: (selectedID: React.Key) => void;
|
|
8
|
+
highlightIDs: number[];
|
|
9
|
+
setHighlightIDs: (highlightIDs: number[]) => void;
|
|
10
|
+
selectedIDs: string[];
|
|
11
|
+
setSelectedIDs: (selectedIDs: string[]) => void;
|
|
12
|
+
rectRotateSensitivity: number;
|
|
13
|
+
setRectRotateSensitivity: (sensitivity: number) => void;
|
|
14
|
+
}
|
|
15
|
+
declare const useLLMMultiWheelStore: import("zustand").UseBoundStore<import("zustand").StoreApi<Store>>;
|
|
16
|
+
export default useLLMMultiWheelStore;
|
|
@@ -9,6 +9,12 @@ interface ILLMContext {
|
|
|
9
9
|
setModelAPIResponse: React.Dispatch<React.SetStateAction<IModelAPIAnswer[]>>;
|
|
10
10
|
setNewAnswerList: (value: IAnswerList[]) => void;
|
|
11
11
|
}
|
|
12
|
+
interface ILLMMultiWheelContext {
|
|
13
|
+
hoverKey: number;
|
|
14
|
+
setHoverKey: (value: number) => void;
|
|
15
|
+
selectKey: number;
|
|
16
|
+
setSelectKey: (value: number) => void;
|
|
17
|
+
}
|
|
12
18
|
interface INLPContext {
|
|
13
19
|
highlightKey: string;
|
|
14
20
|
setHighlightKey: (value: string) => void;
|
|
@@ -18,4 +24,5 @@ export declare const useDispatch: () => Dispatch<AnyAction | any>;
|
|
|
18
24
|
export declare const useSelector: <Selected extends unknown>(selector: (state: any) => Selected, equalityFn?: ((previous: Selected, next: Selected) => boolean) | undefined) => Selected;
|
|
19
25
|
export declare const LLMContext: React.Context<ILLMContext>;
|
|
20
26
|
export declare const NLPContext: React.Context<INLPContext>;
|
|
27
|
+
export declare const LLMMultiWheelContext: React.Context<ILLMMultiWheelContext>;
|
|
21
28
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AppProps } from '@/App';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export declare const LLMMultiWheelViewCls: string;
|
|
4
|
+
interface IProps {
|
|
5
|
+
path: string;
|
|
6
|
+
loading: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const LLMMultiWheelLayout: React.FC<AppProps & IProps>;
|
|
9
|
+
export default LLMMultiWheelLayout;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index$2=require("../../../components/LLMMultiWheelView/index.js"),index=require("../../../constant/index.js"),index$1=require("../../../utils/index.js"),dom=require("../../../utils/dom.js"),es=require("antd/es"),React=require("react"),index$4=require("../sidebar/index.js"),index$3=require("../toolFooter/index.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const LLMMultiWheelViewCls=`${index.prefix}-LLMMultiWheelView`,{Sider,Content}=es.Layout,layoutCls=`${index.prefix}-layout`,LLMMultiWheelLayout=e=>{var t,l;return React__default.default.createElement(es.Layout,{className:dom.getClassName("layout","container")},e==null?void 0:e.leftSider,React__default.default.createElement(Content,{className:index$1.classnames({[`${layoutCls}__content`]:!0,[`${index.prefix}-LLMLayout`]:!0})},React__default.default.createElement(index$2.default,{showTips:e.showTips,tips:e.tips,drawLayerSlot:e.drawLayerSlot}),React__default.default.createElement(index$3.default,{style:(t=e.style)==null?void 0:t.footer,mode:e.mode,footer:e==null?void 0:e.footer})),React__default.default.createElement(Sider,{className:`${layoutCls}__side`,width:600,style:{position:"relative"}},React__default.default.createElement(index$4.default,{sider:e==null?void 0:e.sider,checkMode:e==null?void 0:e.checkMode}),(l=e.drawLayerSlot)==null?void 0:l.call(e,{})))};exports.LLMMultiWheelViewCls=LLMMultiWheelViewCls,exports.default=LLMMultiWheelLayout;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var index$
|
|
1
|
+
"use strict";var index$8=require("../../components/customResizeHook/index.js"),index$6=require("../../constant/index.js"),antd=require("antd"),es=require("antd/es"),React=require("react"),index$c=require("./annotationOperation/index.js"),index$b=require("./annotationTips/index.js"),index$5=require("./sidebar/index.js"),index$d=require("./toolFooter/index.js"),index$a=require("./toolHeader/index.js"),reducer=require("../../store/annotation/reducer.js"),index$7=require("../../components/videoAnnotate/index.js"),reactRedux=require("react-redux"),ToolUtils=require("../../utils/ToolUtils.js"),index$e=require("../../components/pointCloudView/index.js"),dom=require("../../utils/dom.js"),index$9=require("../../utils/index.js"),index$4=require("../../components/predictTracking/previewResult/index.js"),ctx=require("../../store/ctx.js"),ToolType=require("../../data/enums/ToolType.js"),index$1=require("./LLMLayout/index.js"),index$2=require("./NLPLayout/index.js"),index$3=require("../../components/audioAnnotate/index.js"),icons=require("@ant-design/icons"),reactI18next=require("react-i18next"),lbAnnotation=require("@labelbee/lb-annotation"),index=require("./LLMMultiWheelLayout/index.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,a)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,__spreadValues=(e,t)=>{for(var a in t||(t={}))__hasOwnProp.call(t,a)&&__defNormalProp(e,a,t[a]);if(__getOwnPropSymbols)for(var a of __getOwnPropSymbols(t))__propIsEnum.call(t,a)&&__defNormalProp(e,a,t[a]);return e};const{Sider,Content}=es.Layout,layoutCls=`${index$6.prefix}-layout`,ImageAnnotate=e=>{var t;return React__default.default.createElement(React__default.default.Fragment,null,e.showTips===!0&&React__default.default.createElement(index$b,{path:e.path,tips:e.tips}),React__default.default.createElement(index$c,__spreadValues({},e)),React__default.default.createElement(index$d.default,{style:(t=e.style)==null?void 0:t.footer,mode:e.mode,footer:e==null?void 0:e.footer}))},PointCloudAnnotate=e=>{var t;return React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement(index$e,{drawLayerSlot:e.drawLayerSlot,checkMode:e.checkMode,intelligentFit:e.intelligentFit,measureVisible:e.measureVisible,setResourceLoading:e.setResourceLoading}),React__default.default.createElement(index$d.default,{style:(t=e.style)==null?void 0:t.footer,mode:e.mode,footer:e==null?void 0:e.footer}))},AnnotatedArea=e=>{var t;const{stepList:a,step:l}=e,r=(t=reducer.getStepConfig(a,l))==null?void 0:t.tool,i=ToolUtils.isPointCloudTool(r),n=ToolUtils.isVideoTool(r);return i?React__default.default.createElement(PointCloudAnnotate,__spreadValues({},e)):n?React__default.default.createElement(index$7,{drawLayerSlot:e.drawLayerSlot,footer:e.footer,annotationBefore:e==null?void 0:e.annotationBefore}):React__default.default.createElement(ImageAnnotate,__spreadValues({},e))},ViewportProviderLayout=e=>{var t,a,l;const{t:r}=reactI18next.useTranslation(),{stepList:i,step:n}=e,o=(t=reducer.getStepConfig(i,n))==null?void 0:t.tool,d=![ToolType.EToolName.LLM,ToolType.EToolName.NLP,ToolType.EToolName.LLMMultiWheel].includes(o),c=![ToolType.EToolName.LLM,ToolType.EToolName.NLP,ToolType.EToolName.LLMMultiWheel].includes(o),s=[lbAnnotation.EPointCloudName.PointCloud].includes(o);return React__default.default.createElement(index$8.ViewportProvider,null,React__default.default.createElement(antd.Spin,{spinning:e.loading,indicator:React__default.default.createElement(icons.LoadingOutlined,null),tip:React__default.default.createElement("span",{style:{marginTop:200}},r("LoadingTips")),delay:500},React__default.default.createElement(es.Layout,{className:index$9.classnames([layoutCls,e.className]),style:(a=e.style)==null?void 0:a.layout},React__default.default.createElement("header",{className:`${layoutCls}__header`,style:(l=e.style)==null?void 0:l.header},React__default.default.createElement(index$a,{header:e==null?void 0:e.header,headerName:e.headerName,goBack:e.goBack,exportData:e.exportData,hasLangNode:d,hasHeaderOption:c,hasPredictTrackingIcon:s})),e.children)))},MainView=e=>{var t,a,l,r,i,n,o;const[d,c]=React.useState(void 0),s=(a=(t=e.style)==null?void 0:t.sider)==null?void 0:a.width,{stepList:m,step:f}=e,u=(l=reducer.getStepConfig(m,f))==null?void 0:l.tool,v=ToolType.EToolName.LLM===u,L=ToolType.EToolName.NLP===u,E=ToolType.EToolName.LLMMultiWheel===u,x=ToolUtils.isAudioTool(u);return E?React__default.default.createElement(ViewportProviderLayout,__spreadValues({},e),React__default.default.createElement(index.default,__spreadValues({},e))):v?React__default.default.createElement(ViewportProviderLayout,__spreadValues({},e),React__default.default.createElement(index$1,__spreadValues({},e))):L?React__default.default.createElement(ViewportProviderLayout,__spreadValues({},e),React__default.default.createElement(index$2,__spreadValues({},e))):x?React__default.default.createElement(ViewportProviderLayout,__spreadValues({},e),React__default.default.createElement(index$3,__spreadValues({},e))):React__default.default.createElement(ViewportProviderLayout,__spreadValues({},e),React__default.default.createElement(es.Layout,{className:dom.getClassName("layout","container")},e==null?void 0:e.leftSider,React__default.default.createElement(Content,{className:`${layoutCls}__content`},React__default.default.createElement(AnnotatedArea,__spreadValues({},e)),React__default.default.createElement(index$4,null)),React__default.default.createElement(Sider,{className:`${layoutCls}__side`,width:(r=d!=null?d:s)!=null?r:240,style:(i=e.style)==null?void 0:i.sider},React__default.default.createElement(index$5.default,{sider:e==null?void 0:e.sider,enableColorPicker:e==null?void 0:e.enableColorPicker,setSiderWidth:c,propsSiderWidth:(o=(n=e.style)==null?void 0:n.sider)==null?void 0:o.width}))))},mapStateToProps=({annotation:e})=>{var t,a,l;const{imgList:r,loading:i}=e,n=(t=r[e.imgIndex])!=null?t:{};return{path:(l=(a=n==null?void 0:n.path)!=null?a:n==null?void 0:n.url)!=null?l:"",loading:i}};var MainView$1=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(MainView);module.exports=MainView$1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index=require("../../../constant/index.js"),ToolType=require("../../../data/enums/ToolType.js"),StepUtils=require("../../../utils/StepUtils.js"),es=require("antd/es"),React=require("react"),reactI18next=require("react-i18next"),index$9=require("./AnnotationText/index.js"),index$2=require("./ClearIcon/index.js"),index$7=require("./GeneralOperation/index.js"),index$3=require("./ImgAttributeInfo/index.js"),index$8=require("./SwitchAttributeList/index.js"),index$1=require("./TagSidebar/index.js"),index$4=require("./TextToolSidebar/index.js"),index$6=require("./PointCloudToolSidebar/index.js"),index$
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index=require("../../../constant/index.js"),ToolType=require("../../../data/enums/ToolType.js"),StepUtils=require("../../../utils/StepUtils.js"),es=require("antd/es"),React=require("react"),reactI18next=require("react-i18next"),index$9=require("./AnnotationText/index.js"),index$2=require("./ClearIcon/index.js"),index$7=require("./GeneralOperation/index.js"),index$3=require("./ImgAttributeInfo/index.js"),index$8=require("./SwitchAttributeList/index.js"),index$1=require("./TagSidebar/index.js"),index$4=require("./TextToolSidebar/index.js"),index$6=require("./PointCloudToolSidebar/index.js"),index$f=require("./ToolStyle/index.js"),lbAnnotation=require("@labelbee/lb-annotation"),index$a=require("./ScribbleSidebar/index.js"),ToolIcons=require("./ToolIcons.js"),ctx=require("../../../store/ctx.js"),antd=require("antd"),index$5=require("../../../utils/index.js"),icon_menu_fold=require("../../../assets/annotation/common/icon_menu_fold.svg.js"),index$c=require("../../../components/LLMToolView/sidebar/index.js"),index$d=require("../../../components/LLMMultiWheelView/sidebar/index.js"),index$e=require("./NLPSidebar/index.js"),index$b=require("../../../components/videoAnnotate/videoClipTool/components/annotatedList/index.js");function _interopDefaultLegacy(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var React__default=_interopDefaultLegacy(React);const{EVideoToolName,EPointCloudName}=lbAnnotation.cTool,{Panel}=es.Collapse,sidebarCls=`${index.prefix}-sidebar`,Sidebar=({sider:t,enableColorPicker:N,setSiderWidth:u,propsSiderWidth:j,checkMode:o})=>{const s=ctx.useSelector(a=>StepUtils.getCurrentStepInfo(a.annotation.step,a.annotation.stepList)),[i,$]=React.useState(!0),e=s==null?void 0:s.tool,{t:c}=reactI18next.useTranslation();if(!e)return null;const S=a=>{const r=React__default.default.createElement(index$f,null);return React__default.default.createElement(Panel,{header:c("Style"),className:"panel",key:a},r)},f=React__default.default.createElement(ToolIcons.ToolIcons,{toolName:e,onChange:()=>{}}),l=React__default.default.createElement(index$8,null),m=React__default.default.createElement(index$9,null),x=React__default.default.createElement(es.Collapse,{defaultActiveKey:["1","imgAttribute"],bordered:!1,expandIconPosition:"right",className:`${sidebarCls}__content`,expandIcon:index$1.expandIconFuc},S("1")),p=React__default.default.createElement(es.Collapse,{defaultActiveKey:["1","imgAttribute"],bordered:!1,expandIconPosition:"right",className:`${sidebarCls}__content`,expandIcon:index$1.expandIconFuc},React__default.default.createElement(Panel,{header:React__default.default.createElement("div",null,c("Adjust"),React__default.default.createElement(index$2,null)),className:"panel",key:"imgAttribute"},React__default.default.createElement(index$3,null))),n=React__default.default.createElement(index$7.default,null),g=React__default.default.createElement(index$1.default,null),_=a=>React__default.default.createElement(index$4.default,{disabled:a}),E=React__default.default.createElement(index$a,{onChange:(a,r)=>{}}),v=React__default.default.createElement(index$b,null),b=React__default.default.createElement(index$c.default,{checkMode:o}),q=React__default.default.createElement(index$d,{checkMode:o}),T=React__default.default.createElement(index$e.default,{checkMode:o}),d=React__default.default.createElement("div",{className:`${sidebarCls}__horizontal`}),y=React__default.default.createElement(index$6.default,{enableColorPicker:N}),C=React__default.default.createElement(index$7.PointCloudOperation,null);if(t)return typeof t=="function"?React__default.default.createElement("div",{className:`${sidebarCls}`},t({toolIcon:f,attributeList:l,annotationText:m,toolStyle:x,imageAttributeInfo:p,operation:n,tagToolSideBar:g,textToolSideBar:_,horizontal:d,pointCloudToolSidebar:y,pointCloudOperation:C,scribbleSidebar:E,LLMSidebar:b,LLMMultiWheelSidebar:q,videoClipSidebar:v,NLPSidebar:T})):t;if([ToolType.EToolName.Rect,ToolType.EToolName.Point,ToolType.EToolName.Line,ToolType.EToolName.Rect,ToolType.EToolName.Polygon,ToolType.EToolName.Cuboid].includes(e))return React__default.default.createElement("div",{className:`${sidebarCls}`},f,d,l,m,d,React__default.default.createElement("div",{className:`${sidebarCls}__content`},x,p),n);if(e===ToolType.EToolName.Tag)return React__default.default.createElement("div",{className:`${sidebarCls}`},React__default.default.createElement(index$1.default,null));if(e===EVideoToolName.VideoClipTool)return React__default.default.createElement("div",{className:`${sidebarCls}`},React__default.default.createElement("div",{className:`${sidebarCls}__content`},v,l),n);if(e===EVideoToolName.VideoTagTool)return React__default.default.createElement("div",{className:`${sidebarCls}`},React__default.default.createElement("div",{className:`${sidebarCls}__content`},React__default.default.createElement(index$1.default,null)),n);if(e===EVideoToolName.VideoTextTool)return React__default.default.createElement("div",{className:`${sidebarCls}`},React__default.default.createElement(index$4.default,null));if(e===ToolType.EToolName.Text)return React__default.default.createElement("div",{className:`${sidebarCls}`},"s",React__default.default.createElement(index$4.default,null));if(e===EPointCloudName.PointCloud){const a=()=>{$(!i),u&&u(i?48:void 0)},r=React__default.default.createElement("div",{style:{width:"48px",height:"100%",display:"flex",justifyContent:"center",background:"#ffffff"}},React__default.default.createElement("span",{onClick:()=>a()},React__default.default.createElement("img",{style:{width:"16px",height:"16px",marginTop:"18px",cursor:"pointer",transform:"rotate(180deg)"},src:icon_menu_fold})));return i?React__default.default.createElement(antd.Tabs,{type:"card",activeKey:"1",className:index$5.classnames({[`${sidebarCls}`]:!0,[`${sidebarCls}__pointCloud`]:!0}),tabBarExtraContent:{left:React__default.default.createElement("span",{onClick:()=>a(),style:{padding:"0px 4px"}},React__default.default.createElement("img",{style:{width:"16px",height:"16px",marginLeft:"4px",cursor:"pointer"},src:icon_menu_fold}))}},React__default.default.createElement(antd.Tabs.TabPane,{tab:"\u5DE5\u5177\u9762\u677F",key:"1",style:{height:"100%",display:"flex",flexDirection:"column"}},React__default.default.createElement("div",{className:`${sidebarCls}__content`},React__default.default.createElement(index$6.default,null)),React__default.default.createElement(index$7.PointCloudOperation,null))):r}return e===ToolType.EToolName.ScribbleTool?React__default.default.createElement("div",{className:`${sidebarCls}`},React__default.default.createElement("div",{className:`${sidebarCls}__content`},E,l),n):e===ToolType.EToolName.LLM?b:e===ToolType.EToolName.NLP?T:null};exports.default=Sidebar,exports.sidebarCls=sidebarCls;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),icon_kj1=require("../../../../../assets/annotation/toolHotKeyIcon/icon_kj1.svg.js"),icon_kj_h=require("../../../../../assets/annotation/toolHotKeyIcon/icon_kj_h.svg.js"),ToolType=require("../../../../../data/enums/ToolType.js"),index=require("./rectToolShortCutTable/index.js"),index$2=require("./point/index.js"),index$3=require("./polygon/index.js"),index$4=require("./line/index.js"),index$1=require("./tag/index.js"),index$5=require("./text/index.js"),index$6=require("./videoTag/index.js"),index$7=require("./pointCloud/index.js"),index$8=require("./scribble/index.js"),index$9=require("./cuboid/index.js"),index$a=require("./LLM/index.js"),index$b=require("./NLP/index.js"),index$c=require("./audioText/index.js"),index$d=require("../../index.js"),reactI18next=require("react-i18next"),lbAnnotation=require("@labelbee/lb-annotation"),PointCloudContext=require("../../../../../components/pointCloudView/PointCloudContext.js"),FooterPopover=require("../../FooterPopover.js"),lbUtils=require("@labelbee/lb-utils");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,a,t)=>a in e?__defProp(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,__spreadValues=(e,a)=>{for(var t in a||(a={}))__hasOwnProp.call(a,t)&&__defNormalProp(e,t,a[t]);if(__getOwnPropSymbols)for(var t of __getOwnPropSymbols(a))__propIsEnum.call(a,t)&&__defNormalProp(e,t,a[t]);return e};const{EVideoToolName,EPointCloudName}=lbAnnotation.cTool,shortCutTable={[ToolType.EToolName.Rect]:index.default,[ToolType.EToolName.Tag]:index$1.default,[ToolType.EToolName.Point]:index$2.default,[ToolType.EToolName.Polygon]:index$3.default,[ToolType.EToolName.Line]:index$4.default,[ToolType.EToolName.Text]:index$5,[EVideoToolName.VideoTagTool]:index$6,[EPointCloudName.PointCloud]:index$7.default,[EPointCloudName.PointCloud+"_POLYGON"]:index$7.pointCloudShortCutTable_POLYGON,[EPointCloudName.PointCloud+"_SEGMENT"]:index$7.pointCloudShortCutTable_SEGMENT,[ToolType.EToolName.ScribbleTool]:index$8.default,[ToolType.EToolName.Cuboid]:index$9,[ToolType.EToolName.LLM]:index$a.default,[ToolType.EToolName.NLP]:index$b,[lbAnnotation.EAudioToolName.AudioTextTool]:index$c.default},ToolHotKeyIcon=({icon:e})=>typeof e=="string"?React__default.default.createElement("img",{width:16,height:16,src:e}):e||null,ToolHotKeyCom=({title:e,style:a,shortCutList:t})=>{const{t:i}=reactI18next.useTranslation(),d={width:320,display:"flex",justifyContent:"space-between",margin:16},
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),icon_kj1=require("../../../../../assets/annotation/toolHotKeyIcon/icon_kj1.svg.js"),icon_kj_h=require("../../../../../assets/annotation/toolHotKeyIcon/icon_kj_h.svg.js"),ToolType=require("../../../../../data/enums/ToolType.js"),index=require("./rectToolShortCutTable/index.js"),index$2=require("./point/index.js"),index$3=require("./polygon/index.js"),index$4=require("./line/index.js"),index$1=require("./tag/index.js"),index$5=require("./text/index.js"),index$6=require("./videoTag/index.js"),index$7=require("./pointCloud/index.js"),index$8=require("./scribble/index.js"),index$9=require("./cuboid/index.js"),index$a=require("./LLM/index.js"),index$b=require("./NLP/index.js"),index$c=require("./audioText/index.js"),index$d=require("../../index.js"),reactI18next=require("react-i18next"),lbAnnotation=require("@labelbee/lb-annotation"),PointCloudContext=require("../../../../../components/pointCloudView/PointCloudContext.js"),FooterPopover=require("../../FooterPopover.js"),lbUtils=require("@labelbee/lb-utils");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,a,t)=>a in e?__defProp(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,__spreadValues=(e,a)=>{for(var t in a||(a={}))__hasOwnProp.call(a,t)&&__defNormalProp(e,t,a[t]);if(__getOwnPropSymbols)for(var t of __getOwnPropSymbols(a))__propIsEnum.call(a,t)&&__defNormalProp(e,t,a[t]);return e};const{EVideoToolName,EPointCloudName}=lbAnnotation.cTool,shortCutTable={[ToolType.EToolName.Rect]:index.default,[ToolType.EToolName.Tag]:index$1.default,[ToolType.EToolName.Point]:index$2.default,[ToolType.EToolName.Polygon]:index$3.default,[ToolType.EToolName.Line]:index$4.default,[ToolType.EToolName.Text]:index$5,[EVideoToolName.VideoTagTool]:index$6,[EPointCloudName.PointCloud]:index$7.default,[EPointCloudName.PointCloud+"_POLYGON"]:index$7.pointCloudShortCutTable_POLYGON,[EPointCloudName.PointCloud+"_SEGMENT"]:index$7.pointCloudShortCutTable_SEGMENT,[ToolType.EToolName.ScribbleTool]:index$8.default,[ToolType.EToolName.Cuboid]:index$9,[ToolType.EToolName.LLM]:index$a.default,[ToolType.EToolName.LLMMultiWheel]:index$a.default,[ToolType.EToolName.NLP]:index$b,[lbAnnotation.EAudioToolName.AudioTextTool]:index$c.default},ToolHotKeyIcon=({icon:e})=>typeof e=="string"?React__default.default.createElement("img",{width:16,height:16,src:e}):e||null,ToolHotKeyCom=({title:e,style:a,shortCutList:t})=>{const{t:i}=reactI18next.useTranslation(),d={width:320,display:"flex",justifyContent:"space-between",margin:16},n={display:"block",padding:"0 3px",minWidth:"20px",marginRight:"3px",border:"1px solid rgba(204,204,204,1)",verticalAlign:"middle",fontSize:"12px",textAlign:"center"},c=(l,s)=>React__default.default.createElement("div",{style:d,key:s},React__default.default.createElement("span",{style:{display:"flex",alignItems:"center"}},React__default.default.createElement(ToolHotKeyIcon,{icon:l.icon}),React__default.default.createElement("span",{style:{marginLeft:l.icon?16:0}},i(l.name))),React__default.default.createElement("span",{style:{display:"flex",alignItems:"center"}},l.noticeInfo&&React__default.default.createElement("span",{style:{marginRight:"5px",color:"#CCCCCC"}},i(l.noticeInfo)),m(l.shortCut,l.shortCutUseHtml,l.linkSymbol))),m=(l,s=!1,x="+")=>{if(!l)return null;const g=l.map((r,o)=>{var p,f;const u={display:"flex",alignItems:"center"};return s?React__default.default.createElement("span",{key:o,style:u},React__default.default.createElement("span",{style:n,dangerouslySetInnerHTML:{__html:r}})):o<l.length-1?typeof r=="number"?React__default.default.createElement("span",{key:o,style:u},React__default.default.createElement("span",{style:n},r),React__default.default.createElement("span",{style:{marginRight:"3px"}},"~")):((p=r==null?void 0:r.startsWith)==null?void 0:p.call(r,"data"))?React__default.default.createElement("span",{key:o,style:u},React__default.default.createElement("span",{className:"shortCutButton",style:{marginRight:"3px"}},React__default.default.createElement("img",{width:16,height:23,src:r})),React__default.default.createElement("span",{style:{marginRight:"3px"}},"+")):React__default.default.createElement("span",{key:o,style:u},React__default.default.createElement("span",{style:n},r),React__default.default.createElement("span",{style:{marginRight:"3px"}},x)):typeof r=="number"?React__default.default.createElement("span",{key:o,style:u},React__default.default.createElement("span",{style:n},r)):((f=r==null?void 0:r.startsWith)==null?void 0:f.call(r,"data"))?React__default.default.createElement("span",{className:"shortCutButton",key:o,style:{marginRight:"3px"}},React__default.default.createElement("img",{width:16,height:23,src:r})):React__default.default.createElement("span",{style:n,key:o},r)});return React__default.default.createElement("div",{style:{display:"flex",justifyContent:"space-around",alignItems:"center"}},g)},y=React__default.default.createElement("div",{className:`${index$d.footerCls}__hotkey-content`},t==null?void 0:t.map((l,s)=>c(l,s))),E=a||{};return React__default.default.createElement(FooterPopover,{hoverIcon:icon_kj_h,icon:icon_kj1,title:i("Hotkeys"),content:y,containerStyle:E})},ToolHotKey=({style:e,title:a,toolName:t})=>{const{pointCloudPattern:i,globalPattern:d}=React.useContext(PointCloudContext.PointCloudContext);if(!t||!shortCutTable[t])return null;let n=t;switch(d){case lbUtils.EPointCloudPattern.Detection:switch(i){case ToolType.EToolName.Polygon:n+="_POLYGON";break;case ToolType.EToolName.Line:n=ToolType.EToolName.Line;break;case ToolType.EToolName.Point:n=ToolType.EToolName.Point;break}break;case lbUtils.EPointCloudPattern.Segmentation:n=EPointCloudName.PointCloud+"_SEGMENT";break}const c={style:e,title:a,shortCutList:shortCutTable[n]};return React__default.default.createElement(ToolHotKeyCom,__spreadValues({},c))};exports.ToolHotKeyCom=ToolHotKeyCom,exports.default=ToolHotKey,exports.shortCutTable=shortCutTable;
|