@labelbee/lb-components 1.5.0 → 1.6.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 (242) hide show
  1. package/dist/assets/annotation/lineTool/icon_line.svg.js +1 -0
  2. package/dist/assets/annotation/pointCloudTool/changePointCloudValid.svg.js +1 -0
  3. package/dist/assets/annotation/pointCloudTool/copy.svg.js +1 -0
  4. package/dist/assets/annotation/pointCloudTool/nextBox.svg.js +1 -0
  5. package/dist/assets/annotation/pointCloudTool/patse.svg.js +1 -0
  6. package/dist/assets/annotation/pointCloudTool/prevBox.svg.js +1 -0
  7. package/dist/assets/annotation/pointCloudTool/rotate180_black.svg.js +1 -0
  8. package/dist/assets/annotation/pointCloudTool/selectAll.svg.js +1 -0
  9. package/dist/assets/annotation/pointCloudTool/selectMultiple.svg.js +1 -0
  10. package/dist/assets/annotation/pointTool/icon_point.svg.js +1 -0
  11. package/dist/assets/annotation/polygonTool/icon_polygon.svg.js +1 -0
  12. package/dist/assets/annotation/rectTool/icon_rect.svg.js +1 -0
  13. package/dist/assets/annotation/rectTool/{icon_rectPattern.svg.js → icon_rect_a.svg.js} +0 -0
  14. package/dist/assets/{cssIcon/annotation/icon_clearSmall.svg → icons/25541b4d.svg} +0 -0
  15. package/dist/assets/icons/25ef334b.svg +8 -0
  16. package/dist/assets/icons/7eadb9c4.svg +5 -0
  17. package/dist/assets/icons/9d70807.svg +5 -0
  18. package/dist/assets/icons/c5b4262e.png +0 -0
  19. package/dist/assets/{cssIcon/slide_btn.svg → icons/cc550fff.svg} +0 -0
  20. package/dist/assets/{cssIcon/annotation/icon_clearSmall_a.svg → icons/dc9b6bfc.svg} +0 -0
  21. package/dist/assets/icons/e4f0b7fe.png +0 -0
  22. package/dist/components/AnnotationView/index.js +1 -1
  23. package/dist/components/customResizeHook/index.js +1 -1
  24. package/dist/components/pointCloudView/PointCloud2DView.js +1 -0
  25. package/dist/components/pointCloudView/PointCloud3DView.js +1 -0
  26. package/dist/components/pointCloudView/PointCloudBackView.js +1 -0
  27. package/dist/components/pointCloudView/PointCloudContext.js +1 -0
  28. package/dist/components/pointCloudView/PointCloudInfos.js +1 -0
  29. package/dist/components/pointCloudView/PointCloudLayout.js +1 -0
  30. package/dist/components/pointCloudView/PointCloudListener.js +1 -0
  31. package/dist/components/pointCloudView/PointCloudSideView.js +1 -0
  32. package/dist/components/pointCloudView/PointCloudTopView.js +1 -0
  33. package/dist/components/pointCloudView/hooks/useBoxes.js +1 -0
  34. package/dist/components/pointCloudView/hooks/usePointCloudViews.js +1 -0
  35. package/dist/components/pointCloudView/hooks/usePolygon.js +1 -0
  36. package/dist/components/pointCloudView/hooks/useRotate.js +1 -0
  37. package/dist/components/pointCloudView/hooks/useSingleBox.js +1 -0
  38. package/dist/components/pointCloudView/hooks/useStatus.js +1 -0
  39. package/dist/components/pointCloudView/index.js +1 -0
  40. package/dist/components/videoPlayer/components/controller/index.js +1 -1
  41. package/dist/components/videoPlayer/index.js +1 -1
  42. package/dist/components/videoPlayer/utils.js +1 -1
  43. package/dist/data/enums/ToolType.js +1 -1
  44. package/dist/hooks/annotation.js +1 -0
  45. package/dist/index.css +273 -43
  46. package/dist/index.js +1 -1
  47. package/dist/store/annotation/actionCreators.js +1 -1
  48. package/dist/store/annotation/map.js +1 -0
  49. package/dist/store/annotation/reducer.js +1 -1
  50. package/dist/types/App.d.ts +4 -3
  51. package/dist/types/components/AnnotationView/index.d.ts +2 -2
  52. package/dist/types/components/pointCloudView/PointCloud2DView.d.ts +6 -0
  53. package/dist/types/components/pointCloudView/PointCloud3DView.d.ts +6 -0
  54. package/dist/types/components/pointCloudView/PointCloudBackView.d.ts +3 -0
  55. package/dist/types/components/pointCloudView/PointCloudContext.d.ts +31 -0
  56. package/dist/types/components/pointCloudView/PointCloudInfos.d.ts +19 -0
  57. package/dist/types/components/pointCloudView/PointCloudLayout.d.ts +6 -0
  58. package/dist/types/components/pointCloudView/PointCloudListener.d.ts +6 -0
  59. package/dist/types/components/pointCloudView/PointCloudSideView.d.ts +6 -0
  60. package/dist/types/components/pointCloudView/PointCloudTopView.d.ts +6 -0
  61. package/dist/types/components/pointCloudView/hooks/useBoxes.d.ts +10 -0
  62. package/dist/types/components/pointCloudView/hooks/usePointCloudViews.d.ts +59 -0
  63. package/dist/types/components/pointCloudView/hooks/usePolygon.d.ts +9 -0
  64. package/dist/types/components/pointCloudView/hooks/useRotate.d.ts +8 -0
  65. package/dist/types/components/pointCloudView/hooks/useSingleBox.d.ts +13 -0
  66. package/dist/types/components/pointCloudView/hooks/useStatus.d.ts +11 -0
  67. package/dist/types/components/pointCloudView/index.d.ts +15 -0
  68. package/dist/types/components/videoPlayer/TagToolInstanceAdaptor.d.ts +1 -1
  69. package/dist/types/components/videoPlayer/index.d.ts +1 -1
  70. package/dist/types/data/enums/ToolType.d.ts +3 -1
  71. package/dist/types/hooks/annotation.d.ts +24 -0
  72. package/dist/types/index.d.ts +1 -0
  73. package/dist/types/store/annotation/actionCreators.d.ts +4 -4
  74. package/dist/types/store/annotation/map.d.ts +13 -0
  75. package/dist/types/store/annotation/reducer.d.ts +1 -1
  76. package/dist/types/utils/PageOperator.d.ts +1 -1
  77. package/dist/types/utils/StepUtils.d.ts +7 -0
  78. package/dist/types/utils/ToolUtils.d.ts +10 -0
  79. package/dist/types/utils/data.d.ts +1 -1
  80. package/dist/types/utils/dom.d.ts +1 -1
  81. package/dist/types/utils/index.d.ts +1 -1
  82. package/dist/types/views/MainView/annotationOperation/index.d.ts +1 -1
  83. package/dist/types/views/MainView/sidebar/GeneralOperation/ActionsConfirm.d.ts +12 -0
  84. package/dist/types/views/MainView/sidebar/GeneralOperation/index.d.ts +5 -1
  85. package/dist/types/views/MainView/sidebar/GeneralOperation/useOperationList.d.ts +12 -0
  86. package/dist/types/views/MainView/sidebar/PointCloudToolSidebar/index.d.ts +11 -0
  87. package/dist/types/views/MainView/sidebar/ToolIcons.d.ts +11 -0
  88. package/dist/types/views/MainView/sidebar/ToolStyle/index.d.ts +1 -1
  89. package/dist/types/views/MainView/sidebar/index.d.ts +1 -0
  90. package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.d.ts +3 -0
  91. package/dist/types/views/MainView/toolFooter/Pagination.d.ts +12 -2
  92. package/dist/types/views/MainView/toolFooter/ZoomController/index.d.ts +14 -4
  93. package/dist/types/views/MainView/toolFooter/index.d.ts +5 -8
  94. package/dist/types/views/MainView/toolHeader/ExportData/index.d.ts +1 -1
  95. package/dist/utils/StepUtils.js +1 -1
  96. package/dist/utils/ToolUtils.js +1 -0
  97. package/dist/utils/data.js +1 -1
  98. package/dist/utils/dom.js +1 -1
  99. package/dist/utils/index.js +1 -1
  100. package/dist/views/MainView/annotationOperation/index.js +1 -1
  101. package/dist/views/MainView/index.js +1 -1
  102. package/dist/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js +1 -0
  103. package/dist/views/MainView/sidebar/GeneralOperation/index.js +1 -1
  104. package/dist/views/MainView/sidebar/GeneralOperation/useOperationList.js +1 -0
  105. package/dist/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -0
  106. package/dist/views/MainView/sidebar/SwitchAttributeList/index.js +1 -1
  107. package/dist/views/MainView/sidebar/ToolIcons.js +1 -0
  108. package/dist/views/MainView/sidebar/index.js +1 -1
  109. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
  110. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.js +1 -0
  111. package/dist/views/MainView/toolFooter/Pagination.js +1 -1
  112. package/dist/views/MainView/toolFooter/ZoomController/ZoomLevel/index.js +1 -1
  113. package/dist/views/MainView/toolFooter/ZoomController/index.js +1 -1
  114. package/dist/views/MainView/toolFooter/index.js +1 -1
  115. package/es/App.js.map +1 -1
  116. package/es/assets/annotation/lineTool/icon_line.svg.js +1 -0
  117. package/es/assets/annotation/lineTool/icon_line.svg.js.map +1 -0
  118. package/es/assets/annotation/pointCloudTool/changePointCloudValid.svg.js +1 -0
  119. package/es/assets/annotation/pointCloudTool/changePointCloudValid.svg.js.map +1 -0
  120. package/es/assets/annotation/pointCloudTool/copy.svg.js +1 -0
  121. package/es/assets/annotation/pointCloudTool/copy.svg.js.map +1 -0
  122. package/es/assets/annotation/pointCloudTool/nextBox.svg.js +1 -0
  123. package/es/assets/annotation/pointCloudTool/nextBox.svg.js.map +1 -0
  124. package/es/assets/annotation/pointCloudTool/patse.svg.js +1 -0
  125. package/es/assets/annotation/pointCloudTool/patse.svg.js.map +1 -0
  126. package/es/assets/annotation/pointCloudTool/prevBox.svg.js +1 -0
  127. package/es/assets/annotation/pointCloudTool/prevBox.svg.js.map +1 -0
  128. package/es/assets/annotation/pointCloudTool/rotate180_black.svg.js +1 -0
  129. package/es/assets/annotation/pointCloudTool/rotate180_black.svg.js.map +1 -0
  130. package/es/assets/annotation/pointCloudTool/selectAll.svg.js +1 -0
  131. package/es/assets/annotation/pointCloudTool/selectAll.svg.js.map +1 -0
  132. package/es/assets/annotation/pointCloudTool/selectMultiple.svg.js +1 -0
  133. package/es/assets/annotation/pointCloudTool/selectMultiple.svg.js.map +1 -0
  134. package/es/assets/annotation/pointTool/icon_point.svg.js +1 -0
  135. package/es/assets/annotation/pointTool/icon_point.svg.js.map +1 -0
  136. package/es/assets/annotation/polygonTool/icon_polygon.svg.js +1 -0
  137. package/es/assets/annotation/polygonTool/icon_polygon.svg.js.map +1 -0
  138. package/es/assets/annotation/rectTool/icon_rect.svg.js +1 -0
  139. package/es/assets/annotation/rectTool/icon_rect.svg.js.map +1 -0
  140. package/es/assets/annotation/rectTool/icon_rectPattern.svg.js +4 -1
  141. package/es/assets/annotation/rectTool/icon_rect_a.svg.js +1 -0
  142. package/es/assets/annotation/rectTool/icon_rect_a.svg.js.map +1 -0
  143. package/es/components/AnnotationView/index.js +1 -1
  144. package/es/components/AnnotationView/index.js.map +1 -1
  145. package/es/components/customResizeHook/index.js +1 -1
  146. package/es/components/customResizeHook/index.js.map +1 -1
  147. package/es/components/pointCloudView/PointCloud2DView.js +1 -0
  148. package/es/components/pointCloudView/PointCloud2DView.js.map +1 -0
  149. package/es/components/pointCloudView/PointCloud3DView.js +1 -0
  150. package/es/components/pointCloudView/PointCloud3DView.js.map +1 -0
  151. package/es/components/pointCloudView/PointCloudBackView.js +1 -0
  152. package/es/components/pointCloudView/PointCloudBackView.js.map +1 -0
  153. package/es/components/pointCloudView/PointCloudContext.js +1 -0
  154. package/es/components/pointCloudView/PointCloudContext.js.map +1 -0
  155. package/es/components/pointCloudView/PointCloudInfos.js +1 -0
  156. package/es/components/pointCloudView/PointCloudInfos.js.map +1 -0
  157. package/es/components/pointCloudView/PointCloudLayout.js +1 -0
  158. package/es/components/pointCloudView/PointCloudLayout.js.map +1 -0
  159. package/es/components/pointCloudView/PointCloudListener.js +1 -0
  160. package/es/components/pointCloudView/PointCloudListener.js.map +1 -0
  161. package/es/components/pointCloudView/PointCloudSideView.js +1 -0
  162. package/es/components/pointCloudView/PointCloudSideView.js.map +1 -0
  163. package/es/components/pointCloudView/PointCloudTopView.js +1 -0
  164. package/es/components/pointCloudView/PointCloudTopView.js.map +1 -0
  165. package/es/components/pointCloudView/data.js +4 -0
  166. package/es/components/pointCloudView/data.js.map +1 -0
  167. package/es/components/pointCloudView/hooks/useBoxes.js +1 -0
  168. package/es/components/pointCloudView/hooks/useBoxes.js.map +1 -0
  169. package/es/components/pointCloudView/hooks/usePointCloudViews.js +1 -0
  170. package/es/components/pointCloudView/hooks/usePointCloudViews.js.map +1 -0
  171. package/es/components/pointCloudView/hooks/usePolygon.js +1 -0
  172. package/es/components/pointCloudView/hooks/usePolygon.js.map +1 -0
  173. package/es/components/pointCloudView/hooks/useRotate.js +1 -0
  174. package/es/components/pointCloudView/hooks/useRotate.js.map +1 -0
  175. package/es/components/pointCloudView/hooks/useSingleBox.js +1 -0
  176. package/es/components/pointCloudView/hooks/useSingleBox.js.map +1 -0
  177. package/es/components/pointCloudView/hooks/useStatus.js +1 -0
  178. package/es/components/pointCloudView/hooks/useStatus.js.map +1 -0
  179. package/es/components/pointCloudView/index.js +1 -0
  180. package/es/components/pointCloudView/index.js.map +1 -0
  181. package/es/components/videoPlayer/components/controller/index.js +1 -1
  182. package/es/components/videoPlayer/components/controller/index.js.map +1 -1
  183. package/es/components/videoPlayer/index.js +1 -1
  184. package/es/components/videoPlayer/index.js.map +1 -1
  185. package/es/components/videoPlayer/utils.js +1 -1
  186. package/es/components/videoPlayer/utils.js.map +1 -1
  187. package/es/data/enums/ToolType.js +1 -1
  188. package/es/data/enums/ToolType.js.map +1 -1
  189. package/es/hooks/annotation.js +1 -0
  190. package/es/hooks/annotation.js.map +1 -0
  191. package/es/hooks/useSize.js.map +1 -1
  192. package/es/index.css +1364 -0
  193. package/es/index.js +1 -1
  194. package/es/index.js.map +1 -1
  195. package/es/store/annotation/actionCreators.js +1 -1
  196. package/es/store/annotation/actionCreators.js.map +1 -1
  197. package/es/store/annotation/map.js +1 -0
  198. package/es/store/annotation/map.js.map +1 -0
  199. package/es/store/annotation/reducer.js +1 -1
  200. package/es/store/annotation/reducer.js.map +1 -1
  201. package/es/utils/StepUtils.js +1 -1
  202. package/es/utils/StepUtils.js.map +1 -1
  203. package/es/utils/ToolUtils.js +1 -0
  204. package/es/utils/ToolUtils.js.map +1 -0
  205. package/es/utils/data.js +1 -1
  206. package/es/utils/data.js.map +1 -1
  207. package/es/utils/dom.js +1 -1
  208. package/es/utils/dom.js.map +1 -1
  209. package/es/utils/index.js +1 -1
  210. package/es/utils/index.js.map +1 -1
  211. package/es/views/MainView/annotationOperation/index.js +1 -1
  212. package/es/views/MainView/annotationOperation/index.js.map +1 -1
  213. package/es/views/MainView/index.js +1 -1
  214. package/es/views/MainView/index.js.map +1 -1
  215. package/es/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js +1 -0
  216. package/es/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js.map +1 -0
  217. package/es/views/MainView/sidebar/GeneralOperation/index.js +1 -1
  218. package/es/views/MainView/sidebar/GeneralOperation/index.js.map +1 -1
  219. package/es/views/MainView/sidebar/GeneralOperation/useOperationList.js +1 -0
  220. package/es/views/MainView/sidebar/GeneralOperation/useOperationList.js.map +1 -0
  221. package/es/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -0
  222. package/es/views/MainView/sidebar/PointCloudToolSidebar/index.js.map +1 -0
  223. package/es/views/MainView/sidebar/SwitchAttributeList/index.js +1 -1
  224. package/es/views/MainView/sidebar/SwitchAttributeList/index.js.map +1 -1
  225. package/es/views/MainView/sidebar/ToolIcons.js +1 -0
  226. package/es/views/MainView/sidebar/ToolIcons.js.map +1 -0
  227. package/es/views/MainView/sidebar/index.js +1 -1
  228. package/es/views/MainView/sidebar/index.js.map +1 -1
  229. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
  230. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js.map +1 -1
  231. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.js +1 -0
  232. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.js.map +1 -0
  233. package/es/views/MainView/toolFooter/Pagination.js +1 -1
  234. package/es/views/MainView/toolFooter/Pagination.js.map +1 -1
  235. package/es/views/MainView/toolFooter/ZoomController/ZoomLevel/index.js +1 -1
  236. package/es/views/MainView/toolFooter/ZoomController/ZoomLevel/index.js.map +1 -1
  237. package/es/views/MainView/toolFooter/ZoomController/index.js +1 -1
  238. package/es/views/MainView/toolFooter/ZoomController/index.js.map +1 -1
  239. package/es/views/MainView/toolFooter/index.js +1 -1
  240. package/es/views/MainView/toolFooter/index.js.map +1 -1
  241. package/package.json +14 -13
  242. package/dist/index.css.map +0 -1
@@ -0,0 +1,6 @@
1
+ import { IFileItem } from '@/types/data';
2
+ interface IProps {
3
+ imgInfo: IFileItem;
4
+ }
5
+ declare const _default: import("react-redux").ConnectedComponent<({ imgInfo }: IProps) => JSX.Element, import("react-redux").Omit<IProps, "imgInfo">>;
6
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { IAnnotationStateProps } from '@/store/annotation/map';
3
+ declare const _default: import("react-redux").ConnectedComponent<React.FC<IAnnotationStateProps>, import("react-redux").Omit<IAnnotationStateProps & {
4
+ children?: React.ReactNode;
5
+ }, "currentData">>;
6
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import { IAnnotationStateProps } from '@/store/annotation/map';
2
+ declare const _default: import("react-redux").ConnectedComponent<({ currentData }: IAnnotationStateProps) => JSX.Element, import("react-redux").Omit<IAnnotationStateProps, "currentData">>;
3
+ export default _default;
@@ -0,0 +1,31 @@
1
+ import { IPointCloudBox, IPointCloudBoxList, IPolygonData } from '@labelbee/lb-utils';
2
+ import { PointCloud, PointCloudAnnotation } from '@labelbee/lb-annotation';
3
+ import React from 'react';
4
+ interface IPointCloudContextInstances {
5
+ topViewInstance?: PointCloudAnnotation;
6
+ sideViewInstance?: PointCloudAnnotation;
7
+ backViewInstance?: PointCloudAnnotation;
8
+ mainViewInstance?: PointCloud;
9
+ setTopViewInstance: (instance: PointCloudAnnotation) => void;
10
+ setSideViewInstance: (instance: PointCloudAnnotation) => void;
11
+ setBackViewInstance: (instance: PointCloudAnnotation) => void;
12
+ setMainViewInstance: (instance: PointCloud) => void;
13
+ }
14
+ export interface IPointCloudContext extends IPointCloudContextInstances {
15
+ pointCloudBoxList: IPointCloudBoxList;
16
+ selectedIDs: string[];
17
+ setSelectedIDs: (ids?: string[] | string) => void;
18
+ valid: boolean;
19
+ setPointCloudResult: (resultList: IPointCloudBoxList) => void;
20
+ selectedPointCloudBox?: IPointCloudBox;
21
+ setPointCloudValid: (valid?: boolean) => void;
22
+ addSelectedID: (selectedID: string) => void;
23
+ selectedAllBoxes: () => void;
24
+ selectedID: string;
25
+ addPointCloudBox: (boxParams: IPointCloudBox) => void;
26
+ polygonList: IPolygonData[];
27
+ setPolygonList: (polygonList: IPolygonData[]) => void;
28
+ }
29
+ export declare const PointCloudContext: React.Context<IPointCloudContext>;
30
+ export declare const PointCloudProvider: React.FC<{}>;
31
+ export {};
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @author Glenfiddish <edwinlee0927@hotmail.com>
3
+ * @file Display selected box's infos
4
+ * @createdate 2022-07-13
5
+ */
6
+ import { EPerspectiveView } from '@labelbee/lb-utils';
7
+ /**
8
+ * Display size info for views
9
+ * @param param0
10
+ * @returns
11
+ */
12
+ export declare const SizeInfoForView: ({ perspectiveView }: {
13
+ perspectiveView: EPerspectiveView;
14
+ }) => JSX.Element | null;
15
+ /**
16
+ * Display selected box's infos
17
+ */
18
+ export declare const BoxInfos: () => JSX.Element | null;
19
+ export declare const PointCloudValidity: () => JSX.Element | null;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export declare const PointCloudContainer: React.FC<{
3
+ title: string;
4
+ toolbar?: React.ReactElement;
5
+ className?: string;
6
+ }>;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { IAnnotationStateProps } from '@/store/annotation/map';
3
+ declare const _default: import("react-redux").ConnectedComponent<React.FC<IAnnotationStateProps>, import("react-redux").Omit<IAnnotationStateProps & {
4
+ children?: React.ReactNode;
5
+ }, "currentData">>;
6
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { IAnnotationStateProps } from '@/store/annotation/map';
3
+ declare const _default: import("react-redux").ConnectedComponent<React.FC<IAnnotationStateProps>, import("react-redux").Omit<IAnnotationStateProps & {
4
+ children?: React.ReactNode;
5
+ }, "currentData">>;
6
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { IAnnotationStateProps } from '@/store/annotation/map';
3
+ declare const _default: import("react-redux").ConnectedComponent<React.FC<IAnnotationStateProps>, import("react-redux").Omit<IAnnotationStateProps & {
4
+ children?: React.ReactNode;
5
+ }, "currentData">>;
6
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import { IPointCloudBoxList } from '@labelbee/lb-utils';
2
+ /**
3
+ * Actions for selected boxes
4
+ */
5
+ export declare const useBoxes: () => {
6
+ copySelectedBoxes: () => void;
7
+ pasteSelectedBoxes: () => void;
8
+ copiedBoxes: IPointCloudBoxList;
9
+ selectedBoxes: import("@labelbee/lb-utils").IPointCloudBox[];
10
+ };
@@ -0,0 +1,59 @@
1
+ /**
2
+ * @file Point cloud interface for crud
3
+ * @author Glenfiddish <edwinlee0927@hotmail.com>
4
+ * @createdate 2022-08-17
5
+ */
6
+ import { PointCloudAnnotation, PointCloud } from '@labelbee/lb-annotation';
7
+ import { IPointCloudBox } from '@labelbee/lb-utils';
8
+ import { ISize } from '@/types/main';
9
+ /**
10
+ * Get the coordinate from canvas2d-coordinate to world coordinate
11
+ */
12
+ export declare const transferCanvas2World: (currentPos: {
13
+ x: number;
14
+ y: number;
15
+ }, size: {
16
+ width: number;
17
+ height: number;
18
+ }) => {
19
+ x: number;
20
+ y: number;
21
+ };
22
+ export declare const topViewPolygon2PointCloud: (newPolygon: any, size: ISize, pointCloud?: PointCloud | undefined, selectedPointCloud?: IPointCloudBox | undefined, defaultValue?: {
23
+ [v: string]: any;
24
+ } | undefined) => Omit<IPointCloudBox, "trackID">;
25
+ /**
26
+ * NewBox synchronize sideView
27
+ * @param boxParams
28
+ * @param newPolygon TODO! Need to add type
29
+ */
30
+ export declare const synchronizeSideView: (boxParams: IPointCloudBox, newPolygon: any, sideViewInstance: PointCloudAnnotation | undefined, url: string) => void;
31
+ /**
32
+ * NewBox synchronize backView
33
+ * @param boxParams
34
+ * @param newPolygon TODO! Need to add type
35
+ */
36
+ export declare const synchronizeBackView: (boxParams: IPointCloudBox, newPolygon: any, BackViewInstance: PointCloudAnnotation, url: string) => void;
37
+ /**
38
+ * NewBox synchronize TopView
39
+ * @param boxParams
40
+ * @param newPolygon TODO! Need to add type
41
+ */
42
+ export declare const synchronizeTopView: (newBoxParams: IPointCloudBox, newPolygon: any, topViewInstance?: PointCloudAnnotation | undefined, mainViewInstance?: PointCloud | undefined) => void;
43
+ export declare const usePointCloudViews: () => {
44
+ topViewAddBox: () => void;
45
+ topViewSelectedChanged: () => void;
46
+ sideViewUpdateBox: () => void;
47
+ topViewUpdateBox?: undefined;
48
+ backViewUpdateBox?: undefined;
49
+ pointCloudBoxListUpdated?: undefined;
50
+ clearAllResult?: undefined;
51
+ } | {
52
+ topViewAddBox: (newPolygon: any, size: ISize) => void;
53
+ topViewSelectedChanged: () => void;
54
+ topViewUpdateBox: (polygon: any, size: ISize) => void;
55
+ sideViewUpdateBox: (newPolygon: any, originPolygon: any) => void;
56
+ backViewUpdateBox: (newPolygon: any, originPolygon: any) => void;
57
+ pointCloudBoxListUpdated: (newBoxes: IPointCloudBox[]) => void;
58
+ clearAllResult: () => void;
59
+ };
@@ -0,0 +1,9 @@
1
+ import { IPolygonData } from '@labelbee/lb-utils';
2
+ /**
3
+ * PointCloud Polygon Hook
4
+ * @returns
5
+ */
6
+ export declare const usePolygon: () => {
7
+ addPolygon: (polygon: IPolygonData) => void;
8
+ deletePolygon: (id: string) => void;
9
+ };
@@ -0,0 +1,8 @@
1
+ import { IAnnotationStateProps } from '@/store/annotation/map';
2
+ /**
3
+ * PointCloud Rotate Hook
4
+ * @returns
5
+ */
6
+ export declare const useRotate: ({ currentData }: IAnnotationStateProps) => {
7
+ updateRotate: (angle: number) => void;
8
+ };
@@ -0,0 +1,13 @@
1
+ import { IPointCloudBox } from '@labelbee/lb-utils';
2
+ /** Actions for single selected box */
3
+ export declare const useSingleBox: () => {
4
+ selectedBox: {
5
+ info: IPointCloudBox;
6
+ index: number;
7
+ } | undefined;
8
+ updateSelectedBox: (params: Partial<IPointCloudBox>) => void;
9
+ changeSelectedBoxValid: () => void;
10
+ selectNextBox: (sort?: any) => void;
11
+ selectPrevBox: () => void;
12
+ deletePointCloudBox: (id: string) => void;
13
+ };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @file Update PointCloud Status
3
+ * @createDate 2022-08-26
4
+ * @author Ron <ron.f.luo@gmail.com>
5
+ */
6
+ import { cTool } from '@labelbee/lb-annotation';
7
+ export declare const useStatus: () => {
8
+ clearAllResult: () => void;
9
+ updatePointCloudPattern: (toolName: any) => void;
10
+ pointCloudPattern: cTool.EToolName;
11
+ };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @author Glenfiddish <edwinlee0927@hotmail.com>
3
+ * @file Point cloud tool view
4
+ * Includes 2D-view、3Dview、top-view、side-view、back-view
5
+ * @date 2022-06-21
6
+ */
7
+ import React from 'react';
8
+ import { IFileItem } from '@/types/data';
9
+ interface IProps {
10
+ imgList: IFileItem[];
11
+ }
12
+ declare const _default: import("react-redux").ConnectedComponent<React.FC<IProps>, import("react-redux").Omit<IProps & {
13
+ children?: React.ReactNode;
14
+ }, "imgList">>;
15
+ export default _default;
@@ -40,7 +40,7 @@ export declare class TagToolInstanceAdaptor extends React.Component<IVideoTagIns
40
40
  };
41
41
  get currentTagResult(): any;
42
42
  get valid(): boolean;
43
- clearResult: (sendMsg?: boolean, value?: string) => void;
43
+ clearResult: (sendMsg?: boolean, value?: string | undefined) => void;
44
44
  exportData: () => (any[] | {
45
45
  valid: boolean;
46
46
  duration: number;
@@ -9,7 +9,7 @@ export declare const VideoPlayerCtx: React.Context<{
9
9
  videoRef?: React.RefObject<HTMLVideoElement> | null | undefined;
10
10
  isPlay: boolean;
11
11
  playPause: () => void;
12
- updateNextPlaybackRate: (isForward?: boolean) => void;
12
+ updateNextPlaybackRate: (isForward?: boolean | undefined) => void;
13
13
  setCurrentTime: (time: number) => void;
14
14
  playbackRate: number;
15
15
  currentTime: number;
@@ -39,5 +39,7 @@ export declare enum EToolName {
39
39
  /** 客户端属性工具 */
40
40
  ClientAttribute = "clientAttributeTool",
41
41
  /** OCR关联关系工具 */
42
- OCRRelation = "OCRRelationTool"
42
+ OCRRelation = "OCRRelationTool",
43
+ /** 算法分割辅助工具 */
44
+ SegmentByRect = "segmentByRectTool"
43
45
  }
@@ -0,0 +1,24 @@
1
+ /// <reference types="react" />
2
+ export interface ICustomToolInstance {
3
+ exportData: () => [any[], {}];
4
+ exportCustomData: () => {};
5
+ singleOn: () => void;
6
+ clearResult: () => void;
7
+ on: () => void;
8
+ setResult: () => void;
9
+ setValid: (valid: boolean) => void;
10
+ history: {
11
+ initRecord: () => void;
12
+ pushHistory: () => void;
13
+ };
14
+ setDefaultAttribute: (attribute: string) => void;
15
+ setSubAttribute: (key: string, value: string) => void;
16
+ }
17
+ /**
18
+ * Custom an empty toolInstance to adapt old use.
19
+ * @returns
20
+ */
21
+ declare const useCustomToolInstance: () => {
22
+ toolInstanceRef: import("react").MutableRefObject<ICustomToolInstance>;
23
+ };
24
+ export { useCustomToolInstance };
@@ -3,6 +3,7 @@ import AnnotationView from '@/components/AnnotationView';
3
3
  import { i18n } from '@labelbee/lb-utils';
4
4
  import React from 'react';
5
5
  import { VideoTagTool } from '@/components/videoPlayer/TagToolInstanceAdaptorI18nProvider';
6
+ import './index.scss';
6
7
  export declare const store: import("redux").Store<{}, import("redux").Action<any>> & {
7
8
  dispatch: unknown;
8
9
  };
@@ -25,12 +25,12 @@ export declare function CopyBackWordResult(): AnnotationActionTypes;
25
25
  */
26
26
  export declare function InitTaskData({ onSubmit, onSave, onPageChange, onStepChange, getFileData, pageSize, loadFileList, step, stepList, }: any): any;
27
27
  /** 切换到下一步 */
28
- export declare const ToNextStep: (pageNumber?: number) => (dispatch: any, getState: any) => any[];
28
+ export declare const ToNextStep: (pageNumber?: number | undefined) => (dispatch: any, getState: any) => any[];
29
29
  /**
30
30
  * 更新当前操作的步骤
31
31
  * @param {number} toStep
32
32
  */
33
- export declare const UpdateProcessingStep: (toStep: number, index?: number) => (dispatch: any, getState: any) => any[];
33
+ export declare const UpdateProcessingStep: (toStep: number, index?: number | undefined) => (dispatch: any, getState: any) => any[];
34
34
  /**
35
35
  * 提交当前的文件数据
36
36
  * @param submitType
@@ -52,7 +52,7 @@ export declare const PageJump: (toIndex: number, triggerEventAfterIndexChanged?:
52
52
  * @param nextIndex 需要加载的图片index
53
53
  * @param isInitial // 是否为初始化加载
54
54
  */
55
- export declare const loadImgList: (dispatch: any, getState: any, nextIndex: number, isInitial?: boolean) => Promise<true | undefined>;
55
+ export declare const loadImgList: (dispatch: any, getState: any, nextIndex: number, isInitial?: boolean | undefined) => Promise<true | undefined>;
56
56
  /**
57
57
  * 判断翻页还是切换依赖数据
58
58
  * @param dispatch
@@ -60,7 +60,7 @@ export declare const loadImgList: (dispatch: any, getState: any, nextIndex: numb
60
60
  * @param pageTurningOperation
61
61
  * @param toIndex
62
62
  */
63
- export declare const DispatcherTurning: (dispatch: any, getState: any, pageTurningOperation: EPageTurningOperation, triggerEventAfterIndexChanged?: boolean, toIndex?: number) => Promise<any>;
63
+ export declare const DispatcherTurning: (dispatch: any, getState: any, pageTurningOperation: EPageTurningOperation, triggerEventAfterIndexChanged?: boolean, toIndex?: number | undefined) => Promise<any>;
64
64
  /**
65
65
  * 保存当前页数据
66
66
  * */
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @file MapStateToProps set
3
+ * @createdate 2022-07-19
4
+ * @author Ron <ron.f.luo@gmail.com>
5
+ */
6
+ import { AppState } from '../index';
7
+ import { IFileItem } from '@/types/data';
8
+ export declare const aMapStateToProps: (state: AppState) => {
9
+ currentData: any;
10
+ };
11
+ export interface IAnnotationStateProps {
12
+ currentData: IFileItem;
13
+ }
@@ -10,5 +10,5 @@ export declare const getTotalPage: (state: AnnotationState) => number;
10
10
  * @param nextIndex
11
11
  * @param nextBasicIndex
12
12
  */
13
- export declare const LoadFileAndFileData: (nextIndex: number, nextBasicIndex?: number) => any;
13
+ export declare const LoadFileAndFileData: (nextIndex: number, nextBasicIndex?: number | undefined) => any;
14
14
  export declare const annotationReducer: (state: AnnotationState | undefined, action: AnnotationActionTypes) => AnnotationState;
@@ -43,6 +43,6 @@ declare class PageOperator {
43
43
  * @param pageTurningOperation
44
44
  * @param fileIndex
45
45
  */
46
- static getNextFileIndex: (pageTurningOperation: EPageTurningOperation, pageInfo: IPageInfo, fileIndex?: number) => number;
46
+ static getNextFileIndex: (pageTurningOperation: EPageTurningOperation, pageInfo: IPageInfo, fileIndex?: number | undefined) => number;
47
47
  }
48
48
  export default PageOperator;
@@ -22,4 +22,11 @@ export default class StepUtils {
22
22
  * @returns {Number} 是否为视频工具
23
23
  */
24
24
  static currentToolIsVideo(step: number, stepList: IStepInfo[]): boolean;
25
+ /**
26
+ * Check for PointCloud
27
+ * @param step
28
+ * @param stepList
29
+ * @returns
30
+ */
31
+ static currentToolIsPointCloud(step: number, stepList: IStepInfo[]): boolean;
25
32
  }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @author Glenfiddish <edwinlee0927@hotmail.com>
3
+ * @file Tool utils
4
+ * @date 2022-06-20
5
+ */
6
+ declare class ToolUtils {
7
+ static isVideoTool(tool?: string): boolean;
8
+ static isPointCloudTool(tool?: string): boolean;
9
+ }
10
+ export default ToolUtils;
@@ -12,4 +12,4 @@ export declare const composeResult: (result: string, pos: {
12
12
  }, newData: {
13
13
  rect: any[];
14
14
  basicRectID?: string;
15
- }) => string;
15
+ }, customObject: Object) => string;
@@ -7,5 +7,5 @@ export declare function getTargetElement(target?: BasicTarget<TargetElement>, de
7
7
  * @param elm
8
8
  * @param modify
9
9
  */
10
- export declare const getClassName: (elm: string, modify?: string) => string;
10
+ export declare const getClassName: (block: string, elm?: string | undefined, modify?: string | undefined) => string;
11
11
  export {};
@@ -2,4 +2,4 @@ export declare const jsonParser: (content: any, defaultValue?: any) => any;
2
2
  export declare const getNewNode: <T>(newNode: T, oldNode: T) => T;
3
3
  export declare const classnames: (className: {
4
4
  [key: string]: boolean;
5
- } | string[]) => string;
5
+ } | (string | undefined)[]) => string;
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import { AppState } from 'src/store';
3
3
  import { ImgAttributeState } from 'src/store/imgAttribute/types';
4
- import { AnnotationEngine } from '@labelbee/lb-annotation';
5
4
  import { AppProps } from '@/App';
5
+ import { AnnotationEngine } from '@labelbee/lb-annotation';
6
6
  interface IProps extends AppState, AppProps {
7
7
  imgAttribute: ImgAttributeState;
8
8
  imgIndex: number;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ export interface IOperationConfig {
3
+ name: string;
4
+ key: string;
5
+ imgSvg: string | React.ReactElement;
6
+ hoverSvg: string | React.ReactElement;
7
+ onClick: () => void;
8
+ }
9
+ declare const ActionsConfirm: React.FC<{
10
+ allOperation: IOperationConfig[];
11
+ }>;
12
+ export default ActionsConfirm;
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { ConnectedComponent } from 'react-redux';
2
3
  import { ToolInstance } from '@/store/annotation/types';
3
4
  import { IStepInfo } from '@/types/step';
4
5
  import { AnnotationFileList } from '@/types/data';
@@ -8,7 +9,10 @@ interface IProps {
8
9
  imgList: AnnotationFileList;
9
10
  imgIndex: number;
10
11
  }
11
- declare const _default: import("react-redux").ConnectedComponent<React.FC<IProps>, import("react-redux").Omit<IProps & {
12
+ export declare const PointCloudOperation: ConnectedComponent<React.FC<IProps>, Omit<IProps & {
13
+ children?: React.ReactNode;
14
+ }, 'toolInstance' | 'stepInfo' | 'imgList' | 'imgIndex'>>;
15
+ declare const _default: ConnectedComponent<React.FC<IProps>, import("react-redux").Omit<IProps & {
12
16
  children?: React.ReactNode;
13
17
  }, "imgIndex" | "imgList" | "toolInstance" | "stepInfo">>;
14
18
  export default _default;
@@ -0,0 +1,12 @@
1
+ import { IOperationConfig } from './ActionsConfirm';
2
+ /**
3
+ * Hooks for sidebar common operations' config
4
+ * @param toolInstance
5
+ * @returns
6
+ */
7
+ declare const useOperationList: (toolInstance: any) => {
8
+ empty: IOperationConfig;
9
+ setValidity: IOperationConfig;
10
+ copyPrevious: IOperationConfig;
11
+ };
12
+ export default useOperationList;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { IStepInfo } from '@/types/step';
3
+ import { ICustomToolInstance } from '@/hooks/annotation';
4
+ interface IProps {
5
+ stepInfo: IStepInfo;
6
+ toolInstance: ICustomToolInstance;
7
+ }
8
+ declare const _default: import("react-redux").ConnectedComponent<React.FC<IProps>, import("react-redux").Omit<IProps & {
9
+ children?: React.ReactNode;
10
+ }, "toolInstance" | "stepInfo">>;
11
+ export default _default;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @file Tool options on tool's sidebar
3
+ * @author Glenfiddish <edwinlee0927@hotmail.com>
4
+ * @createdate 2022-07-14
5
+ */
6
+ import { EToolName } from '@/data/enums/ToolType';
7
+ export declare const ToolIcons: ({ toolName, selectedToolName, onChange, }: {
8
+ toolName: string;
9
+ selectedToolName?: string | undefined;
10
+ onChange: (toolName: EToolName) => void;
11
+ }) => JSX.Element;
@@ -3,5 +3,5 @@ interface IProps {
3
3
  toolStyle: ToolStyleState;
4
4
  config: string;
5
5
  }
6
- declare const _default: import("react-redux").ConnectedComponent<(props: IProps) => JSX.Element, import("react-redux").Omit<IProps, "config" | "toolStyle">>;
6
+ declare const _default: import("react-redux").ConnectedComponent<(props: IProps) => JSX.Element, import("react-redux").Omit<IProps, "toolStyle" | "config">>;
7
7
  export default _default;
@@ -5,5 +5,6 @@ interface IProps {
5
5
  toolName?: EToolName;
6
6
  sider?: Sider;
7
7
  }
8
+ export declare const sidebarCls: string;
8
9
  declare const Sidebar: React.FC<IProps>;
9
10
  export default Sidebar;
@@ -0,0 +1,3 @@
1
+ import { IShortcut } from '@/types/tool';
2
+ declare const pointCloudShortCutTable: IShortcut[];
3
+ export default pointCloudShortCutTable;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- interface IPagination {
2
+ interface IPaginationProps {
3
3
  imgIndex: number;
4
4
  totalPage: number;
5
5
  pageJump: (page: string) => void;
@@ -8,5 +8,15 @@ interface IPagination {
8
8
  footerCls: string;
9
9
  isVideo?: boolean;
10
10
  }
11
- export declare const Pagination: React.FC<IPagination>;
11
+ interface IPageProps {
12
+ jumpSkip: Function;
13
+ imgIndex: number;
14
+ }
15
+ /**
16
+ * page input for changing current page or file index
17
+ * @param props
18
+ * @returns
19
+ */
20
+ export declare const PageInput: (props: IPageProps) => JSX.Element;
21
+ export declare const Pagination: React.FC<IPaginationProps>;
12
22
  export {};
@@ -1,10 +1,20 @@
1
1
  import React from 'react';
2
2
  import { ToolInstance } from '@/store/annotation/types';
3
- interface IProps {
4
- toolInstance: ToolInstance;
5
- mode?: 'light' | 'dark';
3
+ import { FooterTheme } from '../index';
4
+ interface IZoomControllerProps {
5
+ mode?: FooterTheme;
6
+ initialPosition?: () => void;
7
+ zoomIn?: () => void;
8
+ zoomOut?: () => void;
6
9
  }
7
- declare const _default: import("react-redux").ConnectedComponent<React.FC<IProps>, import("react-redux").Omit<IProps & {
10
+ export declare const ZoomController: React.FC<IZoomControllerProps>;
11
+ declare const _default: import("react-redux").ConnectedComponent<React.FC<{
12
+ toolInstance: ToolInstance;
13
+ mode: FooterTheme;
14
+ }>, import("react-redux").Omit<{
15
+ toolInstance: ToolInstance;
16
+ mode: FooterTheme;
17
+ } & {
8
18
  children?: React.ReactNode;
9
19
  }, "toolInstance">>;
10
20
  export default _default;
@@ -1,11 +1,7 @@
1
- import { Footer } from '@/types/main';
1
+ import { RenderFooter } from '@/types/main';
2
2
  import { IStepInfo } from '@/types/step';
3
3
  import React from 'react';
4
- interface IPageProps {
5
- jumpSkip: Function;
6
- imgIndex: number;
7
- }
8
- export declare const PageInput: (props: IPageProps) => JSX.Element;
4
+ export declare type FooterTheme = 'light' | 'dark';
9
5
  interface IProps {
10
6
  totalPage: number;
11
7
  imgIndex: number;
@@ -16,10 +12,11 @@ interface IProps {
16
12
  step: number;
17
13
  basicResultList: any[];
18
14
  basicIndex: number;
19
- mode?: 'light' | 'dark';
20
- footer?: Footer;
15
+ mode?: FooterTheme;
16
+ footer?: RenderFooter;
21
17
  }
22
18
  export declare const footerCls: string;
19
+ export declare const FooterDivider: () => JSX.Element;
23
20
  declare const _default: import("react-redux").ConnectedComponent<React.FC<IProps>, import("react-redux").Omit<IProps & {
24
21
  children?: React.ReactNode;
25
22
  }, "stepList" | "step" | "imgIndex" | "basicResultList" | "basicIndex" | "totalPage">>;
@@ -11,5 +11,5 @@ interface IProps {
11
11
  }
12
12
  declare const _default: import("react-redux").ConnectedComponent<React.FC<IProps>, import("react-redux").Omit<IProps & {
13
13
  children?: React.ReactNode;
14
- }, "imgList" | "toolInstance" | "onSubmit" | "dispatch">>;
14
+ }, "imgList" | "onSubmit" | "toolInstance" | "dispatch">>;
15
15
  export default _default;
@@ -1 +1 @@
1
- "use strict";var index=require("../constant/index.js"),lbAnnotation=require("@labelbee/lb-annotation");const{EVideoToolName}=lbAnnotation.cTool;class StepUtils{static getCurrentStepInfo(n,t){const e=this.getStepInfo(n,t);return[index.EStepType.QUALITY_INSPECTION,index.EStepType.MANUAL_CORRECTION].includes(e==null?void 0:e.type)?this.getStepInfo(e.dataSourceStep,t):e}static getStepInfo(n,t){return t==null?void 0:t.filter(e=>e.step===n)[0]}static currentToolIsVideo(n,t){const e=StepUtils.getCurrentStepInfo(n,t);return Object.values(EVideoToolName).includes(e==null?void 0:e.tool)}}module.exports=StepUtils;
1
+ "use strict";var index=require("../constant/index.js"),ToolUtils=require("./ToolUtils.js");class StepUtils{static getCurrentStepInfo(o,e){const t=this.getStepInfo(o,e);return[index.EStepType.QUALITY_INSPECTION,index.EStepType.MANUAL_CORRECTION].includes(t==null?void 0:t.type)?this.getStepInfo(t.dataSourceStep,e):t}static getStepInfo(o,e){return e==null?void 0:e.filter(t=>t.step===o)[0]}static currentToolIsVideo(o,e){const t=StepUtils.getCurrentStepInfo(o,e);return ToolUtils.isVideoTool(t==null?void 0:t.tool)}static currentToolIsPointCloud(o,e){const t=StepUtils.getCurrentStepInfo(o,e);return ToolUtils.isPointCloudTool(t==null?void 0:t.tool)}}module.exports=StepUtils;
@@ -0,0 +1 @@
1
+ "use strict";var lbAnnotation=require("@labelbee/lb-annotation");const{EVideoToolName,EPointCloudName}=lbAnnotation.cTool;class ToolUtils{static isVideoTool(e){return e?Object.values(EVideoToolName).includes(e):!1}static isPointCloudTool(e){return e?Object.values(EPointCloudName).includes(e):!1}}module.exports=ToolUtils;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index=require("./index.js"),StepUtils=require("./StepUtils.js"),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(r,e,t)=>e in r?__defProp(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,__spreadValues=(r,e)=>{for(var t in e||(e={}))__hasOwnProp.call(e,t)&&__defNormalProp(r,t,e[t]);if(__getOwnPropSymbols)for(var t of __getOwnPropSymbols(e))__propIsEnum.call(e,t)&&__defNormalProp(r,t,e[t]);return r},__spreadProps=(r,e)=>__defProps(r,__getOwnPropDescs(e));const composeResultWithBasicImgInfo=(r,e)=>JSON.stringify(__spreadValues(__spreadValues({},index.jsonParser(r)),e)),composeResult=(r,e,t)=>{const{step:u,stepList:a}=e,{rect:o,basicRectID:p}=t;try{const s=index.jsonParser(r),l=StepUtils.getCurrentStepInfo(u,a),{dataSourceStep:f}=l,n=`step_${l.step}`;if(s[n]){const i=s[n];return i.result?(JSON.stringify(i.result)===JSON.stringify(o)||(p?i.result=[...i.result.filter(c=>!(c.sourceID&&c.sourceID===p)),...o.filter(c=>c.sourceID&&c.sourceID===p)]:i.result=o),JSON.stringify(s)):JSON.stringify(__spreadProps(__spreadValues({},s),{[n]:__spreadProps(__spreadValues({},s[n]),{result:o})}))}return JSON.stringify(__spreadProps(__spreadValues({},s),{[n]:{dataSourceStep:f,toolName:a[u-1].tool,result:o}}))}catch(s){return r}};exports.composeResult=composeResult,exports.composeResultWithBasicImgInfo=composeResultWithBasicImgInfo;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index=require("./index.js"),StepUtils=require("./StepUtils.js"),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(r,e,t)=>e in r?__defProp(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,__spreadValues=(r,e)=>{for(var t in e||(e={}))__hasOwnProp.call(e,t)&&__defNormalProp(r,t,e[t]);if(__getOwnPropSymbols)for(var t of __getOwnPropSymbols(e))__propIsEnum.call(e,t)&&__defNormalProp(r,t,e[t]);return r},__spreadProps=(r,e)=>__defProps(r,__getOwnPropDescs(e));const composeResultWithBasicImgInfo=(r,e)=>JSON.stringify(__spreadValues(__spreadValues({},index.jsonParser(r)),e)),composeResult=(r,e,t,c)=>{const{step:a,stepList:l}=e,{rect:n,basicRectID:u}=t;try{const s=index.jsonParser(r),f=StepUtils.getCurrentStepInfo(a,l),{dataSourceStep:_}=f,i=`step_${f.step}`;if(s[i]){const o=s[i];return Object.assign(o,c),o.result?(JSON.stringify(o.result)===JSON.stringify(n)||(u?o.result=[...o.result.filter(p=>!(p.sourceID&&p.sourceID===u)),...n.filter(p=>p.sourceID&&p.sourceID===u)]:o.result=n),JSON.stringify(s)):JSON.stringify(__spreadProps(__spreadValues({},s),{[i]:__spreadProps(__spreadValues(__spreadValues({},s[i]),c),{result:n})}))}return JSON.stringify(__spreadProps(__spreadValues({},s),{[i]:__spreadProps(__spreadValues({dataSourceStep:_},c),{toolName:l[a-1].tool,result:n})}))}catch(s){return r}};exports.composeResult=composeResult,exports.composeResultWithBasicImgInfo=composeResultWithBasicImgInfo;