@labelbee/lb-components 1.22.0 → 1.23.0-alpha.2

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.
Files changed (107) hide show
  1. package/dist/components/LLMToolView/index.js +1 -1
  2. package/dist/components/LLMToolView/questionView/components/header/index.js +1 -1
  3. package/dist/components/LLMToolView/sidebar/components/answerList/index.js +1 -1
  4. package/dist/components/LLMToolView/sidebar/components/answerSort/index.js +1 -1
  5. package/dist/components/LLMToolView/sidebar/components/determineGroup/index.js +1 -1
  6. package/dist/components/LLMToolView/sidebar/components/scoreGroupButton/index.js +1 -1
  7. package/dist/components/LLMToolView/sidebar/components/textEditor/index.js +1 -1
  8. package/dist/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -2
  9. package/dist/components/LLMToolView/sidebar/index.js +1 -1
  10. package/dist/components/LLMToolView/utils/data.js +1 -1
  11. package/dist/components/NLPToolView/index.js +1 -0
  12. package/dist/components/NLPToolView/textContent/extraMask.js +1 -0
  13. package/dist/components/NLPToolView/textContent/index.js +1 -0
  14. package/dist/components/NLPToolView/utils/index.js +1 -0
  15. package/dist/components/messageMaskLayer/index.js +1 -0
  16. package/dist/components/tagList/components/overall/index.js +1 -0
  17. package/dist/components/tagList/components/portion/index.js +1 -0
  18. package/dist/components/tagList/index.js +1 -0
  19. package/dist/components/tagList/index.module.scss.js +1 -0
  20. package/dist/data/enums/ToolType.js +1 -1
  21. package/dist/hooks/annotation.js +1 -1
  22. package/dist/index.css +110 -0
  23. package/dist/index.js +1 -1
  24. package/dist/store/annotation/reducer.js +1 -1
  25. package/dist/store/ctx.js +1 -1
  26. package/dist/types/components/LLMToolView/index.d.ts +2 -0
  27. package/dist/types/components/LLMToolView/sidebar/components/answerList/index.d.ts +3 -10
  28. package/dist/types/components/LLMToolView/sidebar/components/answerSort/index.d.ts +1 -1
  29. package/dist/types/components/LLMToolView/sidebar/components/determineGroup/index.d.ts +1 -1
  30. package/dist/types/components/LLMToolView/sidebar/components/scoreGroupButton/index.d.ts +1 -1
  31. package/dist/types/components/LLMToolView/sidebar/components/textEditor/index.d.ts +1 -1
  32. package/dist/types/components/LLMToolView/sidebar/components/textInputBox/index.d.ts +1 -1
  33. package/dist/types/components/LLMToolView/sidebar/index.d.ts +1 -3
  34. package/dist/types/components/LLMToolView/types.d.ts +27 -0
  35. package/dist/types/components/LLMToolView/utils/data.d.ts +27 -0
  36. package/dist/types/components/NLPToolView/index.d.ts +16 -0
  37. package/dist/types/components/NLPToolView/textContent/extraMask.d.ts +12 -0
  38. package/dist/types/components/NLPToolView/textContent/index.d.ts +16 -0
  39. package/dist/types/components/NLPToolView/types.d.ts +82 -0
  40. package/dist/types/components/NLPToolView/utils/index.d.ts +2 -0
  41. package/dist/types/components/attributeList/index.d.ts +1 -1
  42. package/dist/types/components/messageMaskLayer/index.d.ts +11 -0
  43. package/dist/types/components/tagList/components/overall/index.d.ts +4 -0
  44. package/dist/types/components/tagList/components/portion/index.d.ts +4 -0
  45. package/dist/types/components/tagList/index.d.ts +4 -0
  46. package/dist/types/components/tagList/types.d.ts +23 -0
  47. package/dist/types/data/enums/ToolType.d.ts +2 -1
  48. package/dist/types/hooks/annotation.d.ts +1 -0
  49. package/dist/types/index.d.ts +2 -1
  50. package/dist/types/store/ctx.d.ts +5 -0
  51. package/dist/types/views/MainView/NLPLayout/index.d.ts +13 -0
  52. package/dist/types/views/MainView/sidebar/GeneralOperation/index.d.ts +1 -0
  53. package/dist/types/views/MainView/sidebar/NLPSidebar/NLPAnnotatedList.d.ts +13 -0
  54. package/dist/types/views/MainView/sidebar/NLPSidebar/index.d.ts +12 -0
  55. package/dist/types/views/MainView/sidebar/NLPSidebar/indicatorDetermine.d.ts +13 -0
  56. package/dist/types/views/MainView/sidebar/SwitchAttributeList/index.d.ts +2 -2
  57. package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/NLP/index.d.ts +6 -0
  58. package/dist/views/MainView/LLMLayout/index.js +1 -1
  59. package/dist/views/MainView/NLPLayout/index.js +1 -0
  60. package/dist/views/MainView/index.js +1 -1
  61. package/dist/views/MainView/sidebar/GeneralOperation/index.js +1 -1
  62. package/dist/views/MainView/sidebar/NLPSidebar/NLPAnnotatedList.js +1 -0
  63. package/dist/views/MainView/sidebar/NLPSidebar/index.js +1 -0
  64. package/dist/views/MainView/sidebar/NLPSidebar/indicatorDetermine.js +1 -0
  65. package/dist/views/MainView/sidebar/SwitchAttributeList/index.js +1 -1
  66. package/dist/views/MainView/sidebar/index.js +1 -1
  67. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/LLM/index.js +1 -1
  68. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/NLP/index.js +1 -0
  69. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
  70. package/es/components/LLMToolView/index.js +1 -1
  71. package/es/components/LLMToolView/questionView/components/header/index.js +1 -1
  72. package/es/components/LLMToolView/sidebar/components/answerList/index.js +1 -1
  73. package/es/components/LLMToolView/sidebar/components/answerSort/index.js +1 -1
  74. package/es/components/LLMToolView/sidebar/components/determineGroup/index.js +1 -1
  75. package/es/components/LLMToolView/sidebar/components/scoreGroupButton/index.js +1 -1
  76. package/es/components/LLMToolView/sidebar/components/textEditor/index.js +2 -2
  77. package/es/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -2
  78. package/es/components/LLMToolView/sidebar/index.js +1 -1
  79. package/es/components/LLMToolView/utils/data.js +1 -1
  80. package/es/components/NLPToolView/index.js +1 -0
  81. package/es/components/NLPToolView/textContent/extraMask.js +1 -0
  82. package/es/components/NLPToolView/textContent/index.js +1 -0
  83. package/es/components/NLPToolView/utils/index.js +1 -0
  84. package/es/components/messageMaskLayer/index.js +1 -0
  85. package/es/components/tagList/components/overall/index.js +1 -0
  86. package/es/components/tagList/components/portion/index.js +1 -0
  87. package/es/components/tagList/index.js +1 -0
  88. package/es/components/tagList/index.module.scss.js +1 -0
  89. package/es/data/enums/ToolType.js +1 -1
  90. package/es/hooks/annotation.js +1 -1
  91. package/es/index.css +110 -0
  92. package/es/index.js +1 -1
  93. package/es/store/annotation/reducer.js +1 -1
  94. package/es/store/ctx.js +1 -1
  95. package/es/views/MainView/LLMLayout/index.js +1 -1
  96. package/es/views/MainView/NLPLayout/index.js +1 -0
  97. package/es/views/MainView/index.js +1 -1
  98. package/es/views/MainView/sidebar/GeneralOperation/index.js +1 -1
  99. package/es/views/MainView/sidebar/NLPSidebar/NLPAnnotatedList.js +1 -0
  100. package/es/views/MainView/sidebar/NLPSidebar/index.js +1 -0
  101. package/es/views/MainView/sidebar/NLPSidebar/indicatorDetermine.js +1 -0
  102. package/es/views/MainView/sidebar/SwitchAttributeList/index.js +1 -1
  103. package/es/views/MainView/sidebar/index.js +1 -1
  104. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/LLM/index.js +1 -1
  105. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/NLP/index.js +1 -0
  106. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
  107. package/package.json +3 -3
@@ -1,17 +1,10 @@
1
1
  import React from 'react';
2
- import { ILLMToolConfig, IAnswerList } from '@/components/LLMToolView/types';
2
+ import { ILLMToolConfig, IAnswerList, IConfigUpdate } from '@/components/LLMToolView/types';
3
3
  interface IProps {
4
4
  list?: IAnswerList[];
5
- checkMode?: boolean;
5
+ disabeledAll?: boolean;
6
6
  LLMConfig?: ILLMToolConfig;
7
- updateValue: ({ order, value, key, }: {
8
- order: number;
9
- value: number | string | {
10
- key: string;
11
- value: number | boolean;
12
- };
13
- key?: string;
14
- }) => void;
7
+ updateValue: (value: IConfigUpdate) => void;
15
8
  }
16
9
  declare const AnswerList: (props: IProps) => React.JSX.Element;
17
10
  export default AnswerList;
@@ -4,7 +4,7 @@ interface IProps {
4
4
  setSortList: (value: IAnswerSort[][]) => void;
5
5
  sortList: IAnswerSort[][];
6
6
  waitSortList: IWaitAnswerSort[];
7
- checkMode?: boolean;
7
+ disabeledAll?: boolean;
8
8
  }
9
9
  declare const AnswerSort: (props: IProps) => React.JSX.Element;
10
10
  export default AnswerSort;
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  interface IProps {
3
3
  title: string;
4
4
  selectValue?: boolean;
5
- isDisableAll?: boolean;
5
+ disabeledAll?: boolean;
6
6
  updateValue: (changeValue: boolean) => void;
7
7
  }
8
8
  declare const DetermineGroup: (props: IProps) => React.JSX.Element;
@@ -3,7 +3,7 @@ interface IProps {
3
3
  title: React.ReactNode;
4
4
  score?: number;
5
5
  selectScore?: number;
6
- isDisableAll?: boolean;
6
+ disabeledAll?: boolean;
7
7
  updateScore: (score: number) => void;
8
8
  }
9
9
  declare const ScoreGroupButton: (props: IProps) => React.JSX.Element;
@@ -4,7 +4,7 @@ interface IProps {
4
4
  newAnswer?: string;
5
5
  textEditObject: ITextList;
6
6
  updateValue: (changeValue: string) => void;
7
- checkMode?: boolean;
7
+ disabeledAll?: boolean;
8
8
  answerIndex: number;
9
9
  }
10
10
  declare const TextEditor: (props: IProps) => React.JSX.Element;
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { ILLMToolConfig, ITextList } from '@/components/LLMToolView/types';
3
3
  interface IProps {
4
4
  textAttribute: ITextList[];
5
- checkMode?: boolean;
5
+ disabeledAll?: boolean;
6
6
  LLMConfig?: ILLMToolConfig;
7
7
  setText: (value: ITextList[]) => void;
8
8
  }
@@ -4,7 +4,5 @@ interface IProps {
4
4
  dispatch: any;
5
5
  checkMode?: boolean;
6
6
  }
7
- declare const _default: import("react-redux").ConnectedComponent<React.FC<IProps>, import("react-redux").Omit<IProps & {
8
- children?: React.ReactNode;
9
- }, "annotation" | "dispatch">>;
7
+ declare const _default: import("react-redux").ConnectedComponent<(props: IProps) => React.JSX.Element, import("react-redux").Omit<IProps, "annotation" | "dispatch">>;
10
8
  export default _default;
@@ -20,6 +20,7 @@ export interface IAnswerList {
20
20
  };
21
21
  newAnswer?: string;
22
22
  url?: string;
23
+ tagList?: ISelectedTags;
23
24
  }
24
25
  export interface IModelAPIAnswer {
25
26
  id: string;
@@ -52,6 +53,8 @@ export interface ILLMToolConfig {
52
53
  };
53
54
  isTextEdit: boolean;
54
55
  textEdit: ITextList[];
56
+ tagInputListConfigurable: boolean;
57
+ inputList?: IInputList[];
55
58
  }
56
59
  export interface ITextList {
57
60
  textId?: string;
@@ -89,5 +92,29 @@ export interface ILLMBoxResult {
89
92
  id: number;
90
93
  sort?: number[][];
91
94
  textAttribute?: ITextList[];
95
+ valid: boolean;
96
+ tagList?: ISelectedTags;
97
+ }
98
+ export interface IInputList {
99
+ key: string;
100
+ value: string;
101
+ isMulti: boolean;
102
+ isOverall: boolean;
103
+ subSelected: Array<{
104
+ key: string;
105
+ value: string;
106
+ isDefault: boolean;
107
+ }>;
108
+ }
109
+ export interface ISelectedTags {
110
+ [key: string]: string[];
111
+ }
112
+ export interface IConfigUpdate {
113
+ order: number;
114
+ value: number | string | {
115
+ key: string;
116
+ value?: number | boolean | string[];
117
+ };
118
+ key?: string;
92
119
  }
93
120
  export {};
@@ -1,2 +1,29 @@
1
+ import { IAnswerList, IAnswerSort, ILLMBoxResult, ILLMToolConfig, IWaitAnswerSort, IInputList, ISelectedTags } from '../types';
1
2
  export declare const getCurrentResultFromResultList: (result: string) => any;
2
3
  export declare const formatSort: (sortList: any) => any;
4
+ export declare const getTagResult: (inputList: IInputList[], result?: ISelectedTags) => {};
5
+ export declare const getWaitSortList: (answerList: IAnswerList[], result?: ILLMBoxResult) => {
6
+ newSort: IAnswerSort[][];
7
+ waitSorts: IWaitAnswerSort[];
8
+ };
9
+ export declare const initAnswerList: (initValue: IAnswerList[], LLMConfig?: ILLMToolConfig) => {
10
+ tagList: {};
11
+ order: number;
12
+ answer: string;
13
+ score?: number | undefined;
14
+ indicatorScore?: {
15
+ [key: string]: number;
16
+ } | undefined;
17
+ indicatorDetermine?: {
18
+ [key: string]: boolean;
19
+ } | undefined;
20
+ newAnswer?: string | undefined;
21
+ url?: string | undefined;
22
+ }[];
23
+ export declare const getRenderDataByResult: (LLMConfig?: ILLMToolConfig, result?: ILLMBoxResult) => {
24
+ newSort: IAnswerSort[][];
25
+ waitSorts: IWaitAnswerSort[];
26
+ answerList: IAnswerList[];
27
+ tagList: ISelectedTags;
28
+ textAttribute: import("../types").ITextList[] | undefined;
29
+ };
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { IExtraLayer, ISelectText, IExtraData } from './types';
3
+ interface IProps {
4
+ checkMode?: boolean;
5
+ annotation?: any;
6
+ showTips?: boolean;
7
+ tips?: string;
8
+ extraLayer?: (value: IExtraLayer) => void;
9
+ extraData?: IExtraData;
10
+ onChangeAnnotation?: (v: ISelectText) => void;
11
+ customAnnotationData?: ISelectText;
12
+ }
13
+ declare const _default: import("react-redux").ConnectedComponent<React.FC<IProps>, import("react-redux").Omit<IProps & {
14
+ children?: React.ReactNode;
15
+ }, "annotation">>;
16
+ export default _default;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @file extra mask
3
+ * @author lixinghua <lixinghua_vendor@sensetime.com>
4
+ * @date 2024.01.30
5
+ */
6
+ import React from 'react';
7
+ import { IExtraData, IExtraInterval } from '../types';
8
+ declare const _default: ({ splitIntervals, extraData, }: {
9
+ splitIntervals: IExtraInterval[];
10
+ extraData?: IExtraData | undefined;
11
+ }) => React.JSX.Element;
12
+ export default _default;
@@ -0,0 +1,16 @@
1
+ import React, { RefObject } from 'react';
2
+ import { INLPToolConfig, ITextData, INLPTextAnnotation, ISelectText, IExtraLayer, IExtraData } from '../types';
3
+ interface IProps {
4
+ highlightKey?: string;
5
+ textData: ITextData[];
6
+ textAnnotation: INLPTextAnnotation[];
7
+ lang?: string;
8
+ NLPConfig?: INLPToolConfig;
9
+ answerHeaderSlot?: React.ReactDOM | string;
10
+ onSelectionChange?: (contentRef: RefObject<HTMLDivElement>, text: string) => void;
11
+ extraLayer?: (values: IExtraLayer) => void;
12
+ extraData?: IExtraData;
13
+ customAnnotationData?: ISelectText;
14
+ }
15
+ declare const WrapQuestionView: (props: IProps) => React.JSX.Element;
16
+ export default WrapQuestionView;
@@ -0,0 +1,82 @@
1
+ import { IInfoList } from '@labelbee/lb-utils';
2
+ import React from 'react';
3
+ export interface IndicatorDetermine {
4
+ label: string;
5
+ value: string;
6
+ }
7
+ export interface INLPToolConfig {
8
+ indicatorDetermine?: IndicatorDetermine[];
9
+ isTextEdit: boolean;
10
+ textEdit: ITextList[];
11
+ attributeConfigurable: boolean;
12
+ attributeList: IInfoList[];
13
+ }
14
+ export interface ITextList {
15
+ textId?: string;
16
+ title?: string | number;
17
+ tip?: string;
18
+ min?: number;
19
+ max?: number;
20
+ value?: string;
21
+ isFillAnswer?: boolean;
22
+ textControl?: boolean;
23
+ isLaText?: boolean;
24
+ }
25
+ export interface ITextData {
26
+ content: string;
27
+ }
28
+ export interface INLPResult {
29
+ id: number;
30
+ newText: string;
31
+ indicatorDetermine: any;
32
+ textAnnotation: INLPTextAnnotation[];
33
+ }
34
+ export interface INLPTextAnnotation {
35
+ id: string;
36
+ start: number;
37
+ end: number;
38
+ attribute: string;
39
+ text: string;
40
+ }
41
+ export interface INLPInterval {
42
+ start: number;
43
+ end: number;
44
+ annotations?: INLPTextAnnotation[];
45
+ text: string;
46
+ attribute?: string;
47
+ id?: string;
48
+ }
49
+ export interface ISelectText {
50
+ id?: string;
51
+ start: number;
52
+ end: number;
53
+ text: string;
54
+ endPosition?: React.CSSProperties;
55
+ }
56
+ export interface IExtraLayer {
57
+ style: React.CSSProperties | undefined;
58
+ onClose: () => void;
59
+ submitData?: ISelectText;
60
+ }
61
+ export interface IExtraInterval {
62
+ start: number;
63
+ end: number;
64
+ extraAnnotations?: IExtraInAnnotation[];
65
+ text: string;
66
+ attribute?: string;
67
+ id?: string;
68
+ }
69
+ export interface IExtraInAnnotation {
70
+ auditID?: number;
71
+ text: string;
72
+ id?: string;
73
+ start: number;
74
+ end: number;
75
+ uuid?: string;
76
+ }
77
+ export interface IExtraData {
78
+ isShowRemark?: boolean;
79
+ hoverAuditID?: number;
80
+ editAuditID?: number;
81
+ displayRemarkList: IExtraInAnnotation[];
82
+ }
@@ -0,0 +1,2 @@
1
+ import { INLPInterval } from '../types';
2
+ export declare const getIntervals: (content: string, textAnnotation: INLPInterval[], key: string) => INLPInterval[];
@@ -18,7 +18,7 @@ interface IProps {
18
18
  enableColorPicker?: boolean;
19
19
  updateColorConfig?: (value: string, color: string) => void;
20
20
  updateSize?: (size: IDefaultSize) => void;
21
- attributeLockChange?: (list: any) => void;
21
+ attributeLockChange?: (list: string[]) => void;
22
22
  forbidShowLimitPopover?: boolean;
23
23
  }
24
24
  declare const AttributeList: React.ForwardRefExoticComponent<IProps & React.RefAttributes<unknown>>;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @file Used to cover container and prompt
3
+ * @author lixinghua <lixinghua_vendor@sensetime.com>
4
+ * @date 2024.03.13
5
+ */
6
+ import React from 'react';
7
+ declare const _default: ({ message, style }: {
8
+ message: string;
9
+ style?: React.CSSProperties | undefined;
10
+ }) => React.JSX.Element;
11
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { ITagListProps } from '../../types';
3
+ declare const _default: (props: ITagListProps) => React.JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { ITagListProps } from '../../types';
3
+ declare const _default: (props: ITagListProps) => React.JSX.Element;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { ITagListProps } from './types';
3
+ declare const TagList: (props: ITagListProps) => React.JSX.Element | null;
4
+ export default TagList;
@@ -0,0 +1,23 @@
1
+ export interface IInputList {
2
+ key: string;
3
+ value: string;
4
+ isMulti: boolean;
5
+ isOverall: boolean;
6
+ subSelected: Array<{
7
+ key: string;
8
+ value: string;
9
+ isDefault: boolean;
10
+ }>;
11
+ }
12
+ export interface ISelectedTags {
13
+ [key: string]: string[];
14
+ }
15
+ export interface ITagListProps {
16
+ updateValue: (value: {
17
+ key: string;
18
+ value: string[];
19
+ }) => void;
20
+ inputList?: IInputList[];
21
+ selectedTags: ISelectedTags;
22
+ disabeledAll?: boolean;
23
+ }
@@ -42,7 +42,8 @@ export declare enum EToolName {
42
42
  Cuboid = "cuboidTool",
43
43
  /** 点云多边形工具 */
44
44
  PointCloudPolygon = "pointCloudPolygon",
45
- LLM = "LLMTool"
45
+ LLM = "LLMTool",
46
+ NLP = "NLPTool"
46
47
  }
47
48
  export declare enum ETextType {
48
49
  AnyString = 0,
@@ -36,5 +36,6 @@ export interface ICustomToolInstanceProps {
36
36
  declare const useCustomToolInstance: ({ basicInfo }?: ICustomToolInstanceProps) => {
37
37
  toolInstanceRef: import("react").MutableRefObject<ICustomToolInstance>;
38
38
  clearToolInstance: () => void;
39
+ initEventEmitter: () => void;
39
40
  };
40
41
  export { useCustomToolInstance };
@@ -2,6 +2,7 @@ import { AppProps } from '@/App';
2
2
  import AnnotationView from '@/components/AnnotationView';
3
3
  import PointCloudAnnotationView from '@/components/AnnotationView/pointCloudAnnotationView';
4
4
  import QuestionView from '@/components/LLMToolView/questionView';
5
+ import TextContent from '@/components/NLPToolView/textContent';
5
6
  import { i18n } from '@labelbee/lb-utils';
6
7
  import React from 'react';
7
8
  import { VideoTagTool } from '@/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptorI18nProvider';
@@ -17,6 +18,6 @@ export declare const store: import("redux").Store<{}, import("redux").Action<any
17
18
  };
18
19
  declare const _default: React.ForwardRefExoticComponent<AppProps & React.RefAttributes<unknown>>;
19
20
  export default _default;
20
- export { AnnotationView, PointCloudAnnotationView, QuestionView, LLMToolView, i18n, VideoTagTool, PredictTracking, SwitchCuboidBoxIn2DView, MeasureCanvas, AnnotatedBox, FindTrackIDIndex, };
21
+ export { AnnotationView, PointCloudAnnotationView, QuestionView, TextContent, LLMToolView, i18n, VideoTagTool, PredictTracking, SwitchCuboidBoxIn2DView, MeasureCanvas, AnnotatedBox, FindTrackIDIndex, };
21
22
  export * from './constant';
22
23
  export * from './typeTem';
@@ -9,8 +9,13 @@ interface ILLMContext {
9
9
  setModelAPIResponse: React.Dispatch<React.SetStateAction<IModelAPIAnswer[]>>;
10
10
  setNewAnswerList: (value: IAnswerList[]) => void;
11
11
  }
12
+ interface INLPContext {
13
+ highlightKey: string;
14
+ setHighlightKey: (value: string) => void;
15
+ }
12
16
  export declare const LabelBeeContext: any;
13
17
  export declare const useDispatch: () => Dispatch<AnyAction | any>;
14
18
  export declare const useSelector: <Selected extends unknown>(selector: (state: any) => Selected, equalityFn?: ((previous: Selected, next: Selected) => boolean) | undefined) => Selected;
15
19
  export declare const LLMContext: React.Context<ILLMContext>;
20
+ export declare const NLPContext: React.Context<INLPContext>;
16
21
  export {};
@@ -0,0 +1,13 @@
1
+ import { AppProps } from '@/App';
2
+ import React from 'react';
3
+ import { IExtraData, IExtraLayer, ISelectText } from '@/components/NLPToolView/types';
4
+ interface IProps {
5
+ path: string;
6
+ loading: boolean;
7
+ extraData?: IExtraData;
8
+ extraLayer?: (value: IExtraLayer) => void;
9
+ onChangeAnnotation?: (v: ISelectText) => void;
10
+ customAnnotationData?: ISelectText;
11
+ }
12
+ declare const NLPLayout: React.FC<AppProps & IProps>;
13
+ export default NLPLayout;
@@ -9,6 +9,7 @@ interface IProps {
9
9
  imgList: AnnotationFileList;
10
10
  imgIndex: number;
11
11
  stepList: IStepInfo[];
12
+ hideValidity?: boolean;
12
13
  }
13
14
  export declare const PointCloudOperation: ConnectedComponent<React.FC<IProps>, Omit<IProps & {
14
15
  children?: React.ReactNode;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { IStepInfo } from '@/types/step';
3
+ import { ICustomToolInstance } from '@/hooks/annotation';
4
+ interface IProps {
5
+ toolInstance: ICustomToolInstance;
6
+ stepInfo: IStepInfo;
7
+ checkMode?: boolean;
8
+ }
9
+ export declare const sidebarCls: string;
10
+ declare const _default: import("react-redux").ConnectedComponent<React.FC<IProps>, import("react-redux").Omit<IProps & {
11
+ children?: React.ReactNode;
12
+ }, "toolInstance" | "stepInfo">>;
13
+ export default _default;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { TagOperation } from '@labelbee/lb-annotation';
3
+ interface IProps {
4
+ imgIndex: number;
5
+ toolInstance: TagOperation;
6
+ checkMode?: boolean;
7
+ }
8
+ export declare const sidebarCls: string;
9
+ declare const _default: import("react-redux").ConnectedComponent<React.FC<IProps>, import("react-redux").Omit<IProps & {
10
+ children?: React.ReactNode;
11
+ }, "imgIndex" | "toolInstance">>;
12
+ export default _default;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { IStepInfo } from '@/types/step';
3
+ import { ICustomToolInstance } from '@/hooks/annotation';
4
+ import { IFileItem } from '@/types/data';
5
+ interface IProps {
6
+ toolInstance: ICustomToolInstance;
7
+ stepInfo: IStepInfo;
8
+ imgIndex: number;
9
+ disabeledAll?: boolean;
10
+ imgList: IFileItem[];
11
+ }
12
+ declare const _default: import("react-redux").ConnectedComponent<(props: IProps) => React.JSX.Element | null, import("react-redux").Omit<IProps, "imgIndex" | "imgList" | "toolInstance" | "stepInfo">>;
13
+ export default _default;
@@ -2,8 +2,8 @@ import React from 'react';
2
2
  import { GraphToolInstance } from 'src/store/annotation/types';
3
3
  import { IStepInfo } from '@/types/step';
4
4
  interface IProps {
5
- toolInstance: GraphToolInstance;
6
- stepInfo: IStepInfo;
5
+ toolInstance?: GraphToolInstance;
6
+ stepInfo?: IStepInfo;
7
7
  }
8
8
  declare const _default: import("react-redux").ConnectedComponent<React.FC<IProps>, import("react-redux").Omit<IProps & {
9
9
  children?: React.ReactNode;
@@ -0,0 +1,6 @@
1
+ declare const NLPShortCutTable: {
2
+ name: string;
3
+ icon: any;
4
+ shortCut: string[];
5
+ }[];
6
+ export default NLPShortCutTable;
@@ -1 +1 @@
1
- "use strict";var index$1=require("../../../constant/index.js"),es=require("antd/es"),React=require("react"),index$4=require("../sidebar/index.js"),index$3=require("../toolFooter/index.js"),dom=require("../../../utils/dom.js"),index=require("../../../utils/index.js"),ctx=require("../../../store/ctx.js"),index$2=require("../../../components/LLMToolView/index.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const{Sider,Content}=es.Layout,layoutCls=`${index$1.prefix}-layout`,LLMLayout=e=>{var t,a;const[l,i]=React.useState(-1),[r,o]=React.useState([]),[n,s]=React.useState([]);return React__default.default.createElement(es.Layout,{className:dom.getClassName("layout","container")},React__default.default.createElement(ctx.LLMContext.Provider,{value:React.useMemo(()=>({hoverKey:l,setHoverKey:i,modelAPIResponse:r,setModelAPIResponse:o,newAnswerList:n,setNewAnswerList:s}),[l,r,n])},e==null?void 0:e.leftSider,React__default.default.createElement(Content,{className:index.classnames({[`${layoutCls}__content`]:!0,[`${index$1.prefix}-LLMLayout`]:!0})},React__default.default.createElement(index$2,{checkMode:e.checkMode,showTips:e.showTips,tips:e.tips}),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}),(a=e.drawLayerSlot)==null?void 0:a.call(e,{}))))};module.exports=LLMLayout;
1
+ "use strict";var index$1=require("../../../constant/index.js"),es=require("antd/es"),React=require("react"),index$4=require("../sidebar/index.js"),index$3=require("../toolFooter/index.js"),dom=require("../../../utils/dom.js"),index=require("../../../utils/index.js"),ctx=require("../../../store/ctx.js"),index$2=require("../../../components/LLMToolView/index.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const{Sider,Content}=es.Layout,layoutCls=`${index$1.prefix}-layout`,LLMLayout=e=>{var t,a;const[l,o]=React.useState(-1),[r,i]=React.useState([]),[n,d]=React.useState([]);return React__default.default.createElement(es.Layout,{className:dom.getClassName("layout","container")},React__default.default.createElement(ctx.LLMContext.Provider,{value:React.useMemo(()=>({hoverKey:l,setHoverKey:o,modelAPIResponse:r,setModelAPIResponse:i,newAnswerList:n,setNewAnswerList:d}),[l,r,n])},e==null?void 0:e.leftSider,React__default.default.createElement(Content,{className:index.classnames({[`${layoutCls}__content`]:!0,[`${index$1.prefix}-LLMLayout`]:!0})},React__default.default.createElement(index$2,{checkMode:e.checkMode,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}),(a=e.drawLayerSlot)==null?void 0:a.call(e,{}))))};module.exports=LLMLayout;
@@ -0,0 +1 @@
1
+ "use strict";var index$1=require("../../../constant/index.js"),es=require("antd/es"),React=require("react"),index$4=require("../sidebar/index.js"),index$3=require("../toolFooter/index.js"),dom=require("../../../utils/dom.js"),index=require("../../../utils/index.js"),ctx=require("../../../store/ctx.js"),index$2=require("../../../components/NLPToolView/index.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const{Sider,Content}=es.Layout,layoutCls=`${index$1.prefix}-layout`,NLPLayout=e=>{var t,a;const[n,l]=React.useState("");return React__default.default.createElement(es.Layout,{className:dom.getClassName("layout","container")},React__default.default.createElement(ctx.NLPContext.Provider,{value:React.useMemo(()=>({highlightKey:n,setHighlightKey:l}),[n])},e==null?void 0:e.leftSider,React__default.default.createElement(Content,{className:index.classnames({[`${layoutCls}__content`]:!0,[`${index$1.prefix}-NLPLayout`]:!0})},React__default.default.createElement(index$2,{checkMode:e.checkMode,showTips:e.showTips,tips:e.tips,extraLayer:e==null?void 0:e.extraLayer,extraData:e==null?void 0:e.extraData,onChangeAnnotation:e==null?void 0:e.onChangeAnnotation,customAnnotationData:e==null?void 0:e.customAnnotationData}),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:400,style:{position:"relative"}},React__default.default.createElement(index$4.default,{sider:e==null?void 0:e.sider,checkMode:e==null?void 0:e.checkMode}),(a=e.drawLayerSlot)==null?void 0:a.call(e,{}))))};module.exports=NLPLayout;
@@ -1 +1 @@
1
- "use strict";var index$6=require("../../components/customResizeHook/index.js"),index$4=require("../../constant/index.js"),antd=require("antd"),es=require("antd/es"),React=require("react"),index$a=require("./annotationOperation/index.js"),index$9=require("./annotationTips/index.js"),index$3=require("./sidebar/index.js"),index$b=require("./toolFooter/index.js"),index$8=require("./toolHeader/index.js"),reducer=require("../../store/annotation/reducer.js"),index$5=require("../../components/videoAnnotate/index.js"),reactRedux=require("react-redux"),ToolUtils=require("../../utils/ToolUtils.js"),index$c=require("../../components/pointCloudView/index.js"),dom=require("../../utils/dom.js"),index$7=require("../../utils/index.js"),index$2=require("../../components/predictTracking/previewResult/index.js"),ctx=require("../../store/ctx.js"),ToolType=require("../../data/enums/ToolType.js"),index=require("./LLMLayout/index.js"),index$1=require("../../components/audioAnnotate/index.js"),icons=require("@ant-design/icons"),reactI18next=require("react-i18next"),lbAnnotation=require("@labelbee/lb-annotation");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$4.prefix}-layout`,ImageAnnotate=e=>{var t;return React__default.default.createElement(React__default.default.Fragment,null,e.showTips===!0&&React__default.default.createElement(index$9,{path:e.path,tips:e.tips}),React__default.default.createElement(index$a,__spreadValues({},e)),React__default.default.createElement(index$b.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$c,{drawLayerSlot:e.drawLayerSlot,checkMode:e.checkMode,intelligentFit:e.intelligentFit,measureVisible:e.measureVisible}),React__default.default.createElement(index$b.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$5,{drawLayerSlot:e.drawLayerSlot,footer:e.footer}):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].includes(o),u=![ToolType.EToolName.LLM].includes(o),c=[lbAnnotation.EPointCloudName.PointCloud].includes(o);return React__default.default.createElement(index$6.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$7.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$8,{header:e==null?void 0:e.header,headerName:e.headerName,goBack:e.goBack,exportData:e.exportData,hasLangNode:d,hasHeaderOption:u,hasPredictTrackingIcon:c})),e.children)))},MainView=e=>{var t,a,l,r,i,n,o;const[d,u]=React.useState(void 0),c=(a=(t=e.style)==null?void 0:t.sider)==null?void 0:a.width,{stepList:m,step:f}=e,s=(l=reducer.getStepConfig(m,f))==null?void 0:l.tool,v=ToolType.EToolName.LLM===s,x=ToolUtils.isAudioTool(s);return v?React__default.default.createElement(ViewportProviderLayout,__spreadValues({},e),React__default.default.createElement(index,__spreadValues({},e))):x?React__default.default.createElement(ViewportProviderLayout,__spreadValues({},e),React__default.default.createElement(index$1,__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$2,null)),React__default.default.createElement(Sider,{className:`${layoutCls}__side`,width:(r=d!=null?d:c)!=null?r:240,style:(i=e.style)==null?void 0:i.sider},React__default.default.createElement(index$3.default,{sider:e==null?void 0:e.sider,enableColorPicker:e==null?void 0:e.enableColorPicker,setSiderWidth:u,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
+ "use strict";var index$7=require("../../components/customResizeHook/index.js"),index$5=require("../../constant/index.js"),antd=require("antd"),es=require("antd/es"),React=require("react"),index$b=require("./annotationOperation/index.js"),index$a=require("./annotationTips/index.js"),index$4=require("./sidebar/index.js"),index$c=require("./toolFooter/index.js"),index$9=require("./toolHeader/index.js"),reducer=require("../../store/annotation/reducer.js"),index$6=require("../../components/videoAnnotate/index.js"),reactRedux=require("react-redux"),ToolUtils=require("../../utils/ToolUtils.js"),index$d=require("../../components/pointCloudView/index.js"),dom=require("../../utils/dom.js"),index$8=require("../../utils/index.js"),index$3=require("../../components/predictTracking/previewResult/index.js"),ctx=require("../../store/ctx.js"),ToolType=require("../../data/enums/ToolType.js"),index=require("./LLMLayout/index.js"),index$1=require("./NLPLayout/index.js"),index$2=require("../../components/audioAnnotate/index.js"),icons=require("@ant-design/icons"),reactI18next=require("react-i18next"),lbAnnotation=require("@labelbee/lb-annotation");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$5.prefix}-layout`,ImageAnnotate=e=>{var t;return React__default.default.createElement(React__default.default.Fragment,null,e.showTips===!0&&React__default.default.createElement(index$a,{path:e.path,tips:e.tips}),React__default.default.createElement(index$b,__spreadValues({},e)),React__default.default.createElement(index$c.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$d,{drawLayerSlot:e.drawLayerSlot,checkMode:e.checkMode,intelligentFit:e.intelligentFit,measureVisible:e.measureVisible}),React__default.default.createElement(index$c.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$6,{drawLayerSlot:e.drawLayerSlot,footer:e.footer}):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].includes(o),u=![ToolType.EToolName.LLM,ToolType.EToolName.NLP].includes(o),c=[lbAnnotation.EPointCloudName.PointCloud].includes(o);return React__default.default.createElement(index$7.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$8.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$9,{header:e==null?void 0:e.header,headerName:e.headerName,goBack:e.goBack,exportData:e.exportData,hasLangNode:d,hasHeaderOption:u,hasPredictTrackingIcon:c})),e.children)))},MainView=e=>{var t,a,l,r,i,n,o;const[d,u]=React.useState(void 0),c=(a=(t=e.style)==null?void 0:t.sider)==null?void 0:a.width,{stepList:m,step:f}=e,s=(l=reducer.getStepConfig(m,f))==null?void 0:l.tool,v=ToolType.EToolName.LLM===s,x=ToolType.EToolName.NLP===s,E=ToolUtils.isAudioTool(s);return v?React__default.default.createElement(ViewportProviderLayout,__spreadValues({},e),React__default.default.createElement(index,__spreadValues({},e))):x?React__default.default.createElement(ViewportProviderLayout,__spreadValues({},e),React__default.default.createElement(index$1,__spreadValues({},e))):E?React__default.default.createElement(ViewportProviderLayout,__spreadValues({},e),React__default.default.createElement(index$2,__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$3,null)),React__default.default.createElement(Sider,{className:`${layoutCls}__side`,width:(r=d!=null?d:c)!=null?r:240,style:(i=e.style)==null?void 0:i.sider},React__default.default.createElement(index$4.default,{sider:e==null?void 0:e.sider,enableColorPicker:e==null?void 0:e.enableColorPicker,setSiderWidth:u,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 React=require("react"),reactRedux=require("react-redux"),StepUtils=require("../../../../utils/StepUtils.js"),index=require("../../../../utils/index.js"),ActionsConfirm=require("./ActionsConfirm.js"),useOperationList=require("./useOperationList.js"),ctx=require("../../../../store/ctx.js"),unitAttribute=require("../../../../assets/annotation/pointCloudTool/unitAttribute.svg.js"),unitAttributeForbid=require("../../../../assets/annotation/pointCloudTool/unitAttributeForbid.svg.js"),unitAttributeHover=require("../../../../assets/annotation/pointCloudTool/unitAttributeHover.svg.js"),reactI18next=require("react-i18next"),index$1=require("../../../../components/pointCloudView/components/UnifyParamsModal/index.js"),useSingleBox=require("../../../../components/pointCloudView/hooks/useSingleBox.js"),reducer=require("../../../../store/annotation/reducer.js"),useStatus=require("../../../../components/pointCloudView/hooks/useStatus.js");function _interopDefaultLegacy(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var React__default=_interopDefaultLegacy(React);const mapStateToProps=t=>{var e,o;const n=StepUtils.getCurrentStepInfo((e=t.annotation)==null?void 0:e.step,(o=t.annotation)==null?void 0:o.stepList);return{toolInstance:t.annotation.toolInstance,stepInfo:n,imgList:t.annotation.imgList,imgIndex:t.annotation.imgIndex,stepList:t.annotation.stepList}},GeneralOperation=({toolInstance:t,stepInfo:e})=>{const o=useOperationList(t),n=index.jsonParser(e==null?void 0:e.config),i=[o.empty];return(e==null?void 0:e.dataSourceStep)===0&&i.push(o.setValidity),(n==null?void 0:n.copyBackwardResult)&&i.push(o.copyPrevious),React__default.default.createElement(ActionsConfirm,{allOperation:i})},PointCloudOperation=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(({toolInstance:t,stepInfo:e,imgList:o,stepList:n,imgIndex:i})=>{const{t:p}=reactI18next.useTranslation(),{selectedBox:a}=useSingleBox.useSingleBox(),u=useOperationList(t),[v,l]=React.useState(!1),[f,m]=React.useState([]),{isPointCloudDetectionPattern:g,isPointCloudSegmentationPattern:x}=useStatus.useStatus(),c=index.jsonParser(e.config);let r=[u.copyPrevious,u.empty,u.setValidity];if(g&&c.trackConfigurable===!0){const s=!a,y={name:p("UnifyParams"),key:"UnifyParams",imgSvg:s?unitAttributeForbid:unitAttribute,hoverSvg:unitAttributeHover,onClick:()=>{m(reducer.composeResultByToolInstance({toolInstance:t,imgList:o,imgIndex:i,stepList:n})),l(!0)},forbidConfirm:!0,forbidOperation:s};r.unshift(y)}const C=React.useCallback(()=>{l(!1)},[]),d=a==null?void 0:a.info;return x&&(r=r.filter(s=>!["setValidity","copyPrevious"].includes(s.key))),React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement(ActionsConfirm,{allOperation:r}),React__default.default.createElement(index$1,{id:d==null?void 0:d.trackID,visible:v,onCancel:C,config:c,imgList:f}))});var GeneralOperation$1=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(GeneralOperation);exports.PointCloudOperation=PointCloudOperation,exports.default=GeneralOperation$1;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),reactRedux=require("react-redux"),StepUtils=require("../../../../utils/StepUtils.js"),index=require("../../../../utils/index.js"),ActionsConfirm=require("./ActionsConfirm.js"),useOperationList=require("./useOperationList.js"),ctx=require("../../../../store/ctx.js"),unitAttribute=require("../../../../assets/annotation/pointCloudTool/unitAttribute.svg.js"),unitAttributeForbid=require("../../../../assets/annotation/pointCloudTool/unitAttributeForbid.svg.js"),unitAttributeHover=require("../../../../assets/annotation/pointCloudTool/unitAttributeHover.svg.js"),reactI18next=require("react-i18next"),index$1=require("../../../../components/pointCloudView/components/UnifyParamsModal/index.js"),useSingleBox=require("../../../../components/pointCloudView/hooks/useSingleBox.js"),reducer=require("../../../../store/annotation/reducer.js"),useStatus=require("../../../../components/pointCloudView/hooks/useStatus.js");function _interopDefaultLegacy(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var React__default=_interopDefaultLegacy(React);const mapStateToProps=t=>{var e,n;const o=StepUtils.getCurrentStepInfo((e=t.annotation)==null?void 0:e.step,(n=t.annotation)==null?void 0:n.stepList);return{toolInstance:t.annotation.toolInstance,stepInfo:o,imgList:t.annotation.imgList,imgIndex:t.annotation.imgIndex,stepList:t.annotation.stepList}},GeneralOperation=({toolInstance:t,stepInfo:e,hideValidity:n})=>{const o=useOperationList(t),r=index.jsonParser(e==null?void 0:e.config),i=[o.empty];return(e==null?void 0:e.dataSourceStep)===0&&!n&&i.push(o.setValidity),(r==null?void 0:r.copyBackwardResult)&&i.push(o.copyPrevious),React__default.default.createElement(ActionsConfirm,{allOperation:i})},PointCloudOperation=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(({toolInstance:t,stepInfo:e,imgList:n,stepList:o,imgIndex:r})=>{const{t:i}=reactI18next.useTranslation(),{selectedBox:u}=useSingleBox.useSingleBox(),l=useOperationList(t),[v,c]=React.useState(!1),[f,m]=React.useState([]),{isPointCloudDetectionPattern:g,isPointCloudSegmentationPattern:x}=useStatus.useStatus(),d=index.jsonParser(e.config);let s=[l.copyPrevious,l.empty,l.setValidity];if(g&&d.trackConfigurable===!0){const a=!u,y={name:i("UnifyParams"),key:"UnifyParams",imgSvg:a?unitAttributeForbid:unitAttribute,hoverSvg:unitAttributeHover,onClick:()=>{m(reducer.composeResultByToolInstance({toolInstance:t,imgList:n,imgIndex:r,stepList:o})),c(!0)},forbidConfirm:!0,forbidOperation:a};s.unshift(y)}const C=React.useCallback(()=>{c(!1)},[]),p=u==null?void 0:u.info;return x&&(s=s.filter(a=>!["setValidity","copyPrevious"].includes(a.key))),React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement(ActionsConfirm,{allOperation:s}),React__default.default.createElement(index$1,{id:p==null?void 0:p.trackID,visible:v,onCancel:C,config:d,imgList:f}))});var GeneralOperation$1=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(GeneralOperation);exports.PointCloudOperation=PointCloudOperation,exports.default=GeneralOperation$1;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),reactRedux=require("react-redux"),StepUtils=require("../../../../utils/StepUtils.js"),reactI18next=require("react-i18next"),ctx=require("../../../../store/ctx.js"),index$1=require("../../../../constant/index.js"),index=require("../../../../utils/index.js"),antd=require("antd"),icons=require("@ant-design/icons");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,t,n)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__spreadValues=(e,t)=>{for(var n in t||(t={}))__hasOwnProp.call(t,n)&&__defNormalProp(e,n,t[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(t))__propIsEnum.call(t,n)&&__defNormalProp(e,n,t[n]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t));const sidebarCls=`${index$1.prefix}-sidebar`,getAnnotatedList=(e,t)=>{const n=(e==null?void 0:e.attributeList)||[];return t.map(i=>{var s,c;const r=((c=(s=n.filter(u=>u.value===i.attribute))==null?void 0:s[0])==null?void 0:c.key)||"";return __spreadProps(__spreadValues({},i),{label:r})})},NLPAnnotatedList=e=>{var t,n;const[i,s]=React.useState(0),c=React.useRef(null),{toolInstance:r,checkMode:u,stepInfo:v}=e,{t:l}=reactI18next.useTranslation(),m=index.jsonParser(v.config),[_,x]=React.useState("");React.useEffect(()=>(r&&r.on("changeAttributeSidebar",o=>{s(a=>a+1)}),()=>{r==null||r.unbindAll("changeAttributeSidebar")}),[r,c]);const[f]=r.exportData(),g=(n=(t=f==null?void 0:f[0])==null?void 0:t.textAnnotation)!=null?n:[],d=getAnnotatedList(m,g),b=o=>{let a=o===_?"":o;r==null||r.setHighlightKey(a),x(a)},P=o=>{r==null||r.deleteTextAnnotation(o.id)};return(d==null?void 0:d.length)===0?null:React__default.default.createElement("div",{className:`${sidebarCls}__content__NLPList`},d.map((o,a)=>{const L=_===o.id;return React__default.default.createElement("div",{key:a,className:index.classnames({[`${sidebarCls}__content__NLPList__item`]:!0,[`${sidebarCls}__content__NLPList__item__active`]:L}),onClick:()=>b(o.id)},React__default.default.createElement("span",{className:`${sidebarCls}__content__NLPList__item__text`},React__default.default.createElement(antd.Tooltip,{title:o.text,overlayInnerStyle:{maxHeight:"400px",overflow:"auto"}},React__default.default.createElement("span",null,`${o.label||l("NoAttribute")}\uFF0C${l("textTool")}\uFF1A${o.text}`))),!u&&React__default.default.createElement(antd.Popconfirm,{title:l("DeleteCommentConfirm"),placement:"topRight",okText:l("Confirm"),cancelText:l("Cancel"),getPopupContainer:p=>p.parentElement,onConfirm:()=>P(o),overlayClassName:`${index$1.prefix}-pop-confirm`},React__default.default.createElement(icons.CloseOutlined,{className:`${sidebarCls}-pop-remove`,onClick:p=>{p.stopPropagation()}})))}))},mapStateToProps=e=>{var t,n;const i=StepUtils.getCurrentStepInfo((t=e.annotation)==null?void 0:t.step,(n=e.annotation)==null?void 0:n.stepList);return{toolInstance:e.annotation.toolInstance,stepInfo:i}};var NLPAnnotatedList$1=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(NLPAnnotatedList);exports.default=NLPAnnotatedList$1,exports.sidebarCls=sidebarCls;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),reactRedux=require("react-redux"),ctx=require("../../../../store/ctx.js"),index$2=require("../../../../constant/index.js"),index$1=require("../SwitchAttributeList/index.js"),index=require("../GeneralOperation/index.js"),NLPAnnotatedList=require("./NLPAnnotatedList.js"),indicatorDetermine=require("./indicatorDetermine.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const NlpAttributeList=({checkMode:e})=>e?null:React__default.default.createElement(index$1,null),sidebarCls=`${index$2.prefix}-sidebar`,NLPSidebar=({toolInstance:e,checkMode:t})=>React__default.default.createElement("div",{className:`${sidebarCls}`},React__default.default.createElement("div",{className:`${sidebarCls}__content`},React__default.default.createElement(indicatorDetermine,{disabeledAll:t}),React__default.default.createElement(NlpAttributeList,{checkMode:t}),React__default.default.createElement(NLPAnnotatedList.default,{checkMode:t})),!t&&React__default.default.createElement(index.default,{hideValidity:!0}));function mapStateToProps(e){return{toolInstance:e.annotation.toolInstance,imgIndex:e.annotation.imgIndex}}var NLPToolSidebar=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(NLPSidebar);exports.default=NLPToolSidebar,exports.sidebarCls=sidebarCls;
@@ -0,0 +1 @@
1
+ "use strict";var React=require("react"),reactRedux=require("react-redux"),StepUtils=require("../../../../utils/StepUtils.js"),reactI18next=require("react-i18next"),ctx=require("../../../../store/ctx.js"),index=require("../../../../utils/index.js"),index$1=require("../../../../components/LLMToolView/sidebar/components/determineGroup/index.js"),data=require("../../../../components/LLMToolView/utils/data.js");function _interopDefaultLegacy(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}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=(t,e,n)=>e in t?__defProp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,__spreadValues=(t,e)=>{for(var n in e||(e={}))__hasOwnProp.call(e,n)&&__defNormalProp(t,n,e[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(e))__propIsEnum.call(e,n)&&__defNormalProp(t,n,e[n]);return t},__spreadProps=(t,e)=>__defProps(t,__getOwnPropDescs(e));const IndicatorDetermineList=t=>{const{toolInstance:e,stepInfo:n,disabeledAll:u,imgIndex:c,imgList:d}=t,[m]=e.exportData(),[i,_]=React.useState(m==null?void 0:m[0]),{t:g}=reactI18next.useTranslation(),[D,x]=React.useState(0);React.useEffect(()=>{var o;if(!d[c])return;const r=(o=d[c])!=null?o:{},a=data.getCurrentResultFromResultList((r==null?void 0:r.result)||"");_(a)},[c,d]),React.useEffect(()=>(e&&e.on("changeIndicatorDetermine",o=>{const[r]=e.exportData();_(r==null?void 0:r[0]),x(a=>a+1)}),()=>{e==null||e.unbindAll("changeIndicatorDetermine")}),[e]);const I=index.jsonParser(n.config),{indicatorDetermine:p}=I,y=o=>{var r;const{value:a,key:l}=o;if(l){const v={[l]:a},s=(r=i==null?void 0:i.indicatorDetermine)!=null?r:{},f=__spreadProps(__spreadValues({},i),{indicatorDetermine:__spreadValues(__spreadValues({},s),v)});e.updateResult(f)}};if((p==null?void 0:p.length)>0){const o=p.filter(r=>r==null?void 0:r.label);return React__default.default.createElement("div",{style:{padding:"12px",marginBottom:"12px"}},React__default.default.createElement("div",{style:{fontSize:"16px",fontWeight:500,lineHeight:"46px"}},g("IndicatorJudgment")),React__default.default.createElement("div",{style:{maxHeight:"400px",overflow:"auto"}},o.map((r,a)=>{var l;const{label:v,value:s}=r;return React__default.default.createElement(index$1,{selectValue:(l=i==null?void 0:i.indicatorDetermine)==null?void 0:l[s],title:v,updateValue:f=>{y({key:s,value:f})},key:a,disabeledAll:u})})))}return null},mapStateToProps=t=>{var e,n;const u=StepUtils.getCurrentStepInfo((e=t.annotation)==null?void 0:e.step,(n=t.annotation)==null?void 0:n.stepList);return{toolInstance:t.annotation.toolInstance,stepInfo:u,imgIndex:t.annotation.imgIndex,imgList:t.annotation.imgList}};var IndicatorDetermineList$1=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(IndicatorDetermineList);module.exports=IndicatorDetermineList$1;
@@ -1 +1 @@
1
- "use strict";var React=require("react"),reactRedux=require("react-redux"),index$1=require("../../../../components/attributeList/index.js"),StepUtils=require("../../../../utils/StepUtils.js"),index=require("../../../../utils/index.js"),reactI18next=require("react-i18next"),ToolType=require("../../../../data/enums/ToolType.js"),ctx=require("../../../../store/ctx.js");function _interopDefaultLegacy(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var React__default=_interopDefaultLegacy(React);const SwitchAttributeList=t=>{var n;const[c,u]=React.useState(0),i=React.useRef(null),{toolInstance:e}=t,{t:f}=reactI18next.useTranslation();if(React.useEffect(()=>(e&&e.singleOn("changeAttributeSidebar",a=>{var s;u(r=>r+1),!!i.current&&((s=i.current.children[a])==null||s.scrollIntoView({block:"center"}))}),()=>{e==null||e.unbindAll("changeAttributeSidebar")}),[e,i]),!t.stepInfo)return null;const l=index.jsonParser(t.stepInfo.config),o=t.stepInfo.tool===ToolType.EToolName.ScribbleTool;if(l.attributeConfigurable!==!0&&!o)return null;if((l.attributeConfigurable===!0||o)&&(l==null?void 0:l.attributeList)){const a=l.attributeList.map(r=>({label:r.key,value:r.value,color:r==null?void 0:r.color}));o||a.unshift({label:f("NoAttribute"),value:""});const s=r=>{e.setDefaultAttribute(r),u(b=>b+1)};return React__default.default.createElement(index$1.default,{list:a,attributeChanged:s,selectedAttribute:(n=e==null?void 0:e.defaultAttribute)!=null?n:"",ref:i,forbidDefault:o})}return null},mapStateToProps=t=>{var n,c;const u=StepUtils.getCurrentStepInfo((n=t.annotation)==null?void 0:n.step,(c=t.annotation)==null?void 0:c.stepList);return{toolInstance:t.annotation.toolInstance,stepInfo:u}};var SwitchAttributeList$1=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(SwitchAttributeList);module.exports=SwitchAttributeList$1;
1
+ "use strict";var React=require("react"),reactRedux=require("react-redux"),index$1=require("../../../../components/attributeList/index.js"),StepUtils=require("../../../../utils/StepUtils.js"),index=require("../../../../utils/index.js"),reactI18next=require("react-i18next"),ToolType=require("../../../../data/enums/ToolType.js"),ctx=require("../../../../store/ctx.js");function _interopDefaultLegacy(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var React__default=_interopDefaultLegacy(React);const SwitchAttributeList=t=>{var i;const[s,l]=React.useState(0),o=React.useRef(null),{toolInstance:e}=t,{t:f}=reactI18next.useTranslation(),b=r=>{e==null||e.setAttributeLockList(r)};if(React.useEffect(()=>(e&&e.singleOn("changeAttributeSidebar",r=>{var a;l(n=>n+1),!!o.current&&((a=o.current.children[r])==null||a.scrollIntoView({block:"center"}))}),()=>{e==null||e.unbindAll("changeAttributeSidebar")}),[e,o]),!t.stepInfo)return null;const u=index.jsonParser(t.stepInfo.config),c=t.stepInfo.tool===ToolType.EToolName.ScribbleTool;if(u.attributeConfigurable!==!0&&!c)return null;if((u.attributeConfigurable===!0||c)&&(u==null?void 0:u.attributeList)){const r=u.attributeList.map(n=>({label:n.key,value:n.value,color:n==null?void 0:n.color}));c||r.unshift({label:f("NoAttribute"),value:""});const a=n=>{e&&(e.setDefaultAttribute(n),l(d=>d+1))};return React__default.default.createElement(index$1.default,{list:r,attributeChanged:a,selectedAttribute:(i=e==null?void 0:e.defaultAttribute)!=null?i:"",ref:o,attributeLockChange:b})}return null},mapStateToProps=t=>{var i,s;const l=StepUtils.getCurrentStepInfo((i=t.annotation)==null?void 0:i.step,(s=t.annotation)==null?void 0:s.stepList);return{toolInstance:t.annotation.toolInstance,stepInfo:l}};var SwitchAttributeList$1=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(SwitchAttributeList);module.exports=SwitchAttributeList$1;