@labelbee/lb-components 1.23.0-alpha.9 → 1.23.0-alpha.90

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 (250) hide show
  1. package/dist/App.js +1 -1
  2. package/dist/_virtual/2DViewWorker.js +1 -0
  3. package/dist/_virtual/highlightSegmentWorker.js +1 -1
  4. package/dist/assets/annotation/icon_link.svg.js +1 -0
  5. package/dist/assets/annotation/icon_unlink.svg.js +1 -0
  6. package/dist/assets/annotation/pointCloudTool/Image2DBoxScale.svg.js +1 -0
  7. package/dist/assets/annotation/pointCloudTool/leftArrow.svg.js +1 -1
  8. package/dist/assets/annotation/pointCloudTool/rightArrow.svg.js +1 -1
  9. package/dist/assets/annotation/pointCloudTool/rotate90_black.svg.js +1 -0
  10. package/dist/assets/icons/ad33251.svg +26 -0
  11. package/dist/components/AnnotationView/index.js +1 -1
  12. package/dist/components/DynamicResizer/DynamicResizer.js +1 -0
  13. package/dist/components/DynamicResizer/assets/bottomToZero.svg.js +1 -0
  14. package/dist/components/DynamicResizer/assets/divider.svg.js +1 -0
  15. package/dist/components/DynamicResizer/assets/topToZero.svg.js +1 -0
  16. package/dist/components/DynamicResizer/hooks/useDrag.js +1 -0
  17. package/dist/components/DynamicResizer/hooks/useUpdateHeight.js +1 -0
  18. package/dist/components/DynamicResizer/index.js +1 -0
  19. package/dist/components/LLMToolView/index.js +1 -1
  20. package/dist/components/LLMToolView/questionView/components/header/index.js +1 -1
  21. package/dist/components/LLMToolView/sidebar/components/textEditor/index.js +2 -2
  22. package/dist/components/LLMToolView/sidebar/components/textEditor/index.module.scss.js +1 -1
  23. package/dist/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -2
  24. package/dist/components/LLMToolView/sidebar/index.js +1 -1
  25. package/dist/components/LLMToolView/utils/data.js +1 -1
  26. package/dist/components/NLPToolView/index.js +1 -1
  27. package/dist/components/audioAnnotate/audioContext/index.js +1 -1
  28. package/dist/components/audioAnnotate/audioSide/clipSidebar/index.js +2 -1
  29. package/dist/components/audioAnnotate/index.js +1 -1
  30. package/dist/components/audioAnnotate/textInput/index.js +1 -1
  31. package/dist/components/audioAnnotate/textInput/index.module.scss.js +1 -1
  32. package/dist/components/audioAnnotate/utils/dataTransform.js +1 -0
  33. package/dist/components/audioPlayer/clipRegion/index.js +1 -1
  34. package/dist/components/audioPlayer/index.js +1 -1
  35. package/dist/components/audioPlayer/useAudioCombine/index.js +3 -2
  36. package/dist/components/audioPlayer/useAudioSegment/index.js +1 -1
  37. package/dist/components/longText/index.js +1 -1
  38. package/dist/components/pointCloud2DRectOperationView/index.js +1 -1
  39. package/dist/components/pointCloud2DRectOperationView/useUpdateRectList.js +1 -0
  40. package/dist/components/pointCloud2DRectOperationView/util.js +1 -0
  41. package/dist/components/pointCloudView/PointCloud2DSingleView.js +1 -1
  42. package/dist/components/pointCloudView/PointCloud2DView.js +1 -1
  43. package/dist/components/pointCloudView/PointCloud3DView.js +1 -1
  44. package/dist/components/pointCloudView/PointCloudBackView.js +1 -1
  45. package/dist/components/pointCloudView/PointCloudContext.js +1 -1
  46. package/dist/components/pointCloudView/PointCloudInfos.js +1 -1
  47. package/dist/components/pointCloudView/PointCloudLayout.js +1 -1
  48. package/dist/components/pointCloudView/PointCloudListener.js +1 -1
  49. package/dist/components/pointCloudView/PointCloudSegment2DView.js +1 -1
  50. package/dist/components/pointCloudView/PointCloudSideView.js +1 -1
  51. package/dist/components/pointCloudView/PointCloudTopView.js +1 -1
  52. package/dist/components/pointCloudView/components/HighlightVisible/index.js +1 -1
  53. package/dist/components/pointCloudView/hooks/useBoxes.js +1 -1
  54. package/dist/components/pointCloudView/hooks/useDataLinkSwitch.js +1 -0
  55. package/dist/components/pointCloudView/hooks/useHighlight.js +1 -1
  56. package/dist/components/pointCloudView/hooks/useHistory.js +1 -1
  57. package/dist/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
  58. package/dist/components/pointCloudView/hooks/usePolygon.js +1 -1
  59. package/dist/components/pointCloudView/hooks/useRotate.js +1 -1
  60. package/dist/components/pointCloudView/hooks/useRotateEdge.js +1 -0
  61. package/dist/components/pointCloudView/hooks/useSingleBox.js +1 -1
  62. package/dist/components/pointCloudView/hooks/useStatus.js +1 -1
  63. package/dist/components/pointCloudView/hooks/useTimeoutFunc.js +1 -0
  64. package/dist/components/pointCloudView/hooks/useWindowKeydownListener.js +1 -0
  65. package/dist/components/pointCloudView/index.js +1 -1
  66. package/dist/components/pointCloudView/utils/event-polyfill.js +1 -0
  67. package/dist/components/pointCloudView/utils/map.js +1 -0
  68. package/dist/components/subAttributeList/index.js +1 -0
  69. package/dist/components/videoAnnotate/videoClipTool/index.js +1 -1
  70. package/dist/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptor.js +1 -1
  71. package/dist/hooks/useToolStyle.js +1 -0
  72. package/dist/index.css +140 -17
  73. package/dist/index.js +1 -1
  74. package/dist/store/Actions.js +1 -1
  75. package/dist/store/annotatedBox/index.js +1 -1
  76. package/dist/store/annotation/actionCreators.js +1 -1
  77. package/dist/store/annotation/reducer.js +1 -1
  78. package/dist/types/App.d.ts +5 -1
  79. package/dist/types/components/AnnotationView/index.d.ts +1 -0
  80. package/dist/types/components/DynamicResizer/DynamicResizer.d.ts +5 -0
  81. package/dist/types/components/DynamicResizer/hooks/useDrag.d.ts +12 -0
  82. package/dist/types/components/DynamicResizer/hooks/useUpdateHeight.d.ts +23 -0
  83. package/dist/types/components/DynamicResizer/index.d.ts +2 -0
  84. package/dist/types/components/DynamicResizer/types/interface.d.ts +17 -0
  85. package/dist/types/components/LLMToolView/utils/data.d.ts +1 -1
  86. package/dist/types/components/audioAnnotate/audioContext/index.d.ts +10 -2
  87. package/dist/types/components/audioAnnotate/textInput/index.d.ts +1 -0
  88. package/dist/types/components/audioAnnotate/utils/dataTransform.d.ts +9 -0
  89. package/dist/types/components/audioPlayer/clipRegion/index.d.ts +1 -0
  90. package/dist/types/components/audioPlayer/index.d.ts +28 -21
  91. package/dist/types/components/longText/index.d.ts +1 -0
  92. package/dist/types/components/pointCloud2DRectOperationView/index.d.ts +1 -0
  93. package/dist/types/components/pointCloud2DRectOperationView/useUpdateRectList.d.ts +2 -0
  94. package/dist/types/components/pointCloud2DRectOperationView/util.d.ts +8 -0
  95. package/dist/types/components/pointCloudView/2DViewWorker.d.ts +1 -0
  96. package/dist/types/components/pointCloudView/PointCloud2DView.d.ts +2 -1
  97. package/dist/types/components/pointCloudView/PointCloudContext.d.ts +28 -4
  98. package/dist/types/components/pointCloudView/PointCloudLayout.d.ts +1 -0
  99. package/dist/types/components/pointCloudView/components/HighlightVisible/index.d.ts +2 -1
  100. package/dist/types/components/pointCloudView/hooks/useDataLinkSwitch.d.ts +19 -0
  101. package/dist/types/components/pointCloudView/hooks/useHighlight.d.ts +1 -1
  102. package/dist/types/components/pointCloudView/hooks/usePointCloudViews.d.ts +8 -0
  103. package/dist/types/components/pointCloudView/hooks/useRotateEdge.d.ts +9 -0
  104. package/dist/types/components/pointCloudView/hooks/useSingleBox.d.ts +3 -2
  105. package/dist/types/components/pointCloudView/hooks/useTimeoutFunc.d.ts +6 -0
  106. package/dist/types/components/pointCloudView/hooks/useWindowKeydownListener.d.ts +16 -0
  107. package/dist/types/components/pointCloudView/utils/event-polyfill.d.ts +8 -0
  108. package/dist/types/components/pointCloudView/utils/map.d.ts +11 -0
  109. package/dist/types/components/subAttributeList/index.d.ts +10 -0
  110. package/dist/types/components/videoAnnotate/index.d.ts +2 -1
  111. package/dist/types/components/videoAnnotate/videoClipTool/index.d.ts +2 -1
  112. package/dist/types/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptor.d.ts +1 -1
  113. package/dist/types/hooks/useToolStyle.d.ts +30 -0
  114. package/dist/types/index.d.ts +7 -2
  115. package/dist/types/store/Actions.d.ts +1 -0
  116. package/dist/types/store/annotatedBox/index.d.ts +2 -0
  117. package/dist/types/store/annotation/actionCreators.d.ts +3 -2
  118. package/dist/types/store/annotation/reducer.d.ts +1 -0
  119. package/dist/types/store/annotation/types.d.ts +9 -2
  120. package/dist/types/utils/AnnotationDataUtils.d.ts +58 -1
  121. package/dist/types/utils/ToolPointCloudBoxRenderHelper.d.ts +23 -0
  122. package/dist/types/utils/index.d.ts +31 -1
  123. package/dist/types/views/MainView/sidebar/GeneralOperation/ActionsConfirm.d.ts +1 -0
  124. package/dist/types/views/MainView/sidebar/GeneralOperation/index.d.ts +2 -0
  125. package/dist/types/views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.d.ts +3 -0
  126. package/dist/types/views/MainView/sidebar/TextToolSidebar/index.d.ts +1 -1
  127. package/dist/types/views/MainView/toolFooter/BatchSwitchConnectIn2DView/BatchSwitchConnectIn2DView.d.ts +9 -0
  128. package/dist/types/views/MainView/toolFooter/BatchSwitchConnectIn2DView/Icons.d.ts +3 -0
  129. package/dist/types/views/MainView/toolFooter/BatchSwitchConnectIn2DView/index.d.ts +1 -0
  130. package/dist/types/views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.d.ts +10 -2
  131. package/dist/types/views/MainView/toolFooter/index.d.ts +1 -1
  132. package/dist/types/views/MainView/toolHeader/StepSwitch/index.d.ts +1 -1
  133. package/dist/types/views/MainView/toolHeader/index.d.ts +1 -1
  134. package/dist/utils/AnnotationDataUtils.js +1 -1
  135. package/dist/utils/ToolPointCloudBoxRenderHelper.js +1 -0
  136. package/dist/utils/index.js +1 -1
  137. package/dist/views/MainView/index.js +1 -1
  138. package/dist/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js +1 -1
  139. package/dist/views/MainView/sidebar/GeneralOperation/index.js +1 -1
  140. package/dist/views/MainView/sidebar/NLPSidebar/NLPAnnotatedList.js +1 -1
  141. package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.js +1 -0
  142. package/dist/views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.module.scss.js +1 -0
  143. package/dist/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
  144. package/dist/views/MainView/sidebar/TagSidebar/index.js +1 -1
  145. package/dist/views/MainView/sidebar/TextToolSidebar/index.js +1 -1
  146. package/dist/views/MainView/sidebar/index.js +1 -1
  147. package/dist/views/MainView/toolFooter/BatchSwitchConnectIn2DView/BatchSwitchConnectIn2DView.js +1 -0
  148. package/dist/views/MainView/toolFooter/BatchSwitchConnectIn2DView/Icons.js +1 -0
  149. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.js +1 -1
  150. package/dist/views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.js +1 -1
  151. package/dist/views/MainView/toolFooter/index.js +1 -1
  152. package/dist/views/MainView/toolHeader/index.js +1 -1
  153. package/es/App.js +1 -1
  154. package/es/_virtual/2DViewWorker.js +1 -0
  155. package/es/_virtual/highlightSegmentWorker.js +1 -1
  156. package/es/assets/annotation/icon_link.svg.js +1 -0
  157. package/es/assets/annotation/icon_unlink.svg.js +1 -0
  158. package/es/assets/annotation/pointCloudTool/Image2DBoxScale.svg.js +1 -0
  159. package/es/assets/annotation/pointCloudTool/leftArrow.svg.js +1 -1
  160. package/es/assets/annotation/pointCloudTool/rightArrow.svg.js +1 -1
  161. package/es/assets/annotation/pointCloudTool/rotate90_black.svg.js +1 -0
  162. package/es/components/AnnotationView/index.js +1 -1
  163. package/es/components/DynamicResizer/DynamicResizer.js +1 -0
  164. package/es/components/DynamicResizer/assets/bottomToZero.svg.js +1 -0
  165. package/es/components/DynamicResizer/assets/divider.svg.js +1 -0
  166. package/es/components/DynamicResizer/assets/topToZero.svg.js +1 -0
  167. package/es/components/DynamicResizer/hooks/useDrag.js +1 -0
  168. package/es/components/DynamicResizer/hooks/useUpdateHeight.js +1 -0
  169. package/es/components/DynamicResizer/index.js +1 -0
  170. package/es/components/LLMToolView/index.js +1 -1
  171. package/es/components/LLMToolView/questionView/components/header/index.js +1 -1
  172. package/es/components/LLMToolView/sidebar/components/textEditor/index.js +2 -2
  173. package/es/components/LLMToolView/sidebar/components/textEditor/index.module.scss.js +1 -1
  174. package/es/components/LLMToolView/sidebar/components/textInputBox/index.js +2 -2
  175. package/es/components/LLMToolView/sidebar/index.js +1 -1
  176. package/es/components/LLMToolView/utils/data.js +1 -1
  177. package/es/components/NLPToolView/index.js +1 -1
  178. package/es/components/audioAnnotate/audioContext/index.js +1 -1
  179. package/es/components/audioAnnotate/audioSide/clipSidebar/index.js +2 -1
  180. package/es/components/audioAnnotate/index.js +1 -1
  181. package/es/components/audioAnnotate/textInput/index.js +1 -1
  182. package/es/components/audioAnnotate/textInput/index.module.scss.js +1 -1
  183. package/es/components/audioAnnotate/utils/dataTransform.js +1 -0
  184. package/es/components/audioPlayer/clipRegion/index.js +1 -1
  185. package/es/components/audioPlayer/index.js +1 -1
  186. package/es/components/audioPlayer/useAudioCombine/index.js +3 -2
  187. package/es/components/audioPlayer/useAudioSegment/index.js +1 -1
  188. package/es/components/longText/index.js +1 -1
  189. package/es/components/pointCloud2DRectOperationView/index.js +1 -1
  190. package/es/components/pointCloud2DRectOperationView/useUpdateRectList.js +1 -0
  191. package/es/components/pointCloud2DRectOperationView/util.js +1 -0
  192. package/es/components/pointCloudView/PointCloud2DSingleView.js +1 -1
  193. package/es/components/pointCloudView/PointCloud2DView.js +1 -1
  194. package/es/components/pointCloudView/PointCloud3DView.js +1 -1
  195. package/es/components/pointCloudView/PointCloudBackView.js +1 -1
  196. package/es/components/pointCloudView/PointCloudContext.js +1 -1
  197. package/es/components/pointCloudView/PointCloudInfos.js +1 -1
  198. package/es/components/pointCloudView/PointCloudLayout.js +1 -1
  199. package/es/components/pointCloudView/PointCloudListener.js +1 -1
  200. package/es/components/pointCloudView/PointCloudSegment2DView.js +1 -1
  201. package/es/components/pointCloudView/PointCloudSideView.js +1 -1
  202. package/es/components/pointCloudView/PointCloudTopView.js +1 -1
  203. package/es/components/pointCloudView/components/HighlightVisible/index.js +1 -1
  204. package/es/components/pointCloudView/hooks/useBoxes.js +1 -1
  205. package/es/components/pointCloudView/hooks/useDataLinkSwitch.js +1 -0
  206. package/es/components/pointCloudView/hooks/useHighlight.js +1 -1
  207. package/es/components/pointCloudView/hooks/useHistory.js +1 -1
  208. package/es/components/pointCloudView/hooks/usePointCloudViews.js +1 -1
  209. package/es/components/pointCloudView/hooks/usePolygon.js +1 -1
  210. package/es/components/pointCloudView/hooks/useRotate.js +1 -1
  211. package/es/components/pointCloudView/hooks/useRotateEdge.js +1 -0
  212. package/es/components/pointCloudView/hooks/useSingleBox.js +1 -1
  213. package/es/components/pointCloudView/hooks/useStatus.js +1 -1
  214. package/es/components/pointCloudView/hooks/useTimeoutFunc.js +1 -0
  215. package/es/components/pointCloudView/hooks/useWindowKeydownListener.js +1 -0
  216. package/es/components/pointCloudView/index.js +1 -1
  217. package/es/components/pointCloudView/utils/event-polyfill.js +1 -0
  218. package/es/components/pointCloudView/utils/map.js +1 -0
  219. package/es/components/subAttributeList/index.js +1 -0
  220. package/es/components/videoAnnotate/videoClipTool/index.js +1 -1
  221. package/es/components/videoAnnotate/videoTagTool/TagToolInstanceAdaptor.js +1 -1
  222. package/es/hooks/useToolStyle.js +1 -0
  223. package/es/index.css +140 -17
  224. package/es/index.js +1 -1
  225. package/es/store/Actions.js +1 -1
  226. package/es/store/annotatedBox/index.js +1 -1
  227. package/es/store/annotation/actionCreators.js +1 -1
  228. package/es/store/annotation/reducer.js +1 -1
  229. package/es/utils/AnnotationDataUtils.js +1 -1
  230. package/es/utils/ToolPointCloudBoxRenderHelper.js +1 -0
  231. package/es/utils/index.js +1 -1
  232. package/es/views/MainView/index.js +1 -1
  233. package/es/views/MainView/sidebar/GeneralOperation/ActionsConfirm.js +1 -1
  234. package/es/views/MainView/sidebar/GeneralOperation/index.js +1 -1
  235. package/es/views/MainView/sidebar/NLPSidebar/NLPAnnotatedList.js +1 -1
  236. package/es/views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.js +1 -0
  237. package/es/views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.module.scss.js +1 -0
  238. package/es/views/MainView/sidebar/PointCloudToolSidebar/index.js +1 -1
  239. package/es/views/MainView/sidebar/TagSidebar/index.js +1 -1
  240. package/es/views/MainView/sidebar/TextToolSidebar/index.js +1 -1
  241. package/es/views/MainView/sidebar/index.js +1 -1
  242. package/es/views/MainView/toolFooter/BatchSwitchConnectIn2DView/BatchSwitchConnectIn2DView.js +1 -0
  243. package/es/views/MainView/toolFooter/BatchSwitchConnectIn2DView/Icons.js +1 -0
  244. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/pointCloud/index.js +1 -1
  245. package/es/views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.js +1 -1
  246. package/es/views/MainView/toolHeader/index.js +1 -1
  247. package/package.json +5 -3
  248. package/dist/assets/annotation/pointCloudTool/rotate180_black.svg.js +0 -1
  249. package/dist/assets/icons/9d70807.svg +0 -5
  250. package/es/assets/annotation/pointCloudTool/rotate180_black.svg.js +0 -1
package/dist/index.css CHANGED
@@ -49,13 +49,97 @@
49
49
  right: -5px;
50
50
  top: -5px;
51
51
  }
52
+ .index-module_rectRotateSensitivitySlider__tGjUn {
53
+ padding: 12px 20px;
54
+ }
55
+ .index-module_rectRotateSensitivitySlider__tGjUn .index-module_title__aAJW6 {
56
+ margin-bottom: 16px;
57
+ }
52
58
  .index-module_container__RwV5P {
53
59
  padding: 12px 20px;
54
60
  }
55
61
  .index-module_container__RwV5P .index-module_content__vHpS9 {
56
62
  display: flex;
57
63
  justify-content: space-between;
58
- margin-top: 4px;
64
+ margin-top: 16px;
65
+ }
66
+ .dynamic-resizer-content {
67
+ width: 100%;
68
+ height: 100%;
69
+ flex-shrink: 0;
70
+ flex-grow: 0;
71
+ position: relative;
72
+ }
73
+
74
+ .divider {
75
+ height: 10px;
76
+ width: 100%;
77
+ position: absolute;
78
+ top: -5px;
79
+ left: 0;
80
+ cursor: row-resize;
81
+ user-select: none;
82
+ display: flex;
83
+ align-items: center;
84
+ flex-direction: column;
85
+ justify-content: center;
86
+ }
87
+ .divider:hover .divider-top, .divider:hover .divider-bottom, .divider:hover .divider-all {
88
+ display: block;
89
+ }
90
+
91
+ .divider-top,
92
+ .divider-bottom,
93
+ .divider-all {
94
+ width: 20px;
95
+ height: 20px;
96
+ cursor: pointer;
97
+ display: none;
98
+ user-select: none;
99
+ }
100
+
101
+ .divider-all {
102
+ position: absolute;
103
+ top: -50%;
104
+ left: 50%;
105
+ transform: translate(-50%);
106
+ }
107
+
108
+ .divider-icon {
109
+ width: 100%;
110
+ height: 20px;
111
+ position: relative;
112
+ }
113
+ .divider-icon::after {
114
+ content: "";
115
+ display: block;
116
+ position: absolute;
117
+ top: 50%;
118
+ left: 0;
119
+ right: 0;
120
+ width: 90%;
121
+ height: 1px;
122
+ background: #ccc;
123
+ margin: 0 auto;
124
+ }
125
+
126
+ .dynamic-resizer-top {
127
+ width: 100%;
128
+ overflow-y: auto;
129
+ }
130
+
131
+ .dynamic-resizer-bottom {
132
+ width: 100%;
133
+ overflow-y: auto;
134
+ }
135
+
136
+ .hide-scrollbar * {
137
+ scrollbar-width: none; /* Firefox */
138
+ -ms-overflow-style: none; /* IE and Edge */
139
+ }
140
+
141
+ .hide-scrollbar *::-webkit-scrollbar {
142
+ display: none; /* Chrome, Safari, Opera */
59
143
  }
60
144
  .index-module_latexEditor__0fK8G {
61
145
  line-height: 32px;
@@ -132,6 +216,12 @@
132
216
  .index-module_outputDisplay__5dS48 .index-module_content__Iml6l .markdown-body {
133
217
  font-size: 14px;
134
218
  }
219
+
220
+ .index-module_tip__NFru6 {
221
+ margin-bottom: 8px;
222
+ color: rgba(0, 0, 0, 0.45);
223
+ font-size: 14px;
224
+ }
135
225
  .index-module_tagList__cvWor {
136
226
  padding: 0px 16px 16px 16px;
137
227
  }
@@ -720,6 +810,16 @@
720
810
  font-family: SourceHanSansCN-Medium;
721
811
  font-size: 14px;
722
812
  }
813
+ .index-module_label__xE6hM .index-module_labelText__Zg1c4 {
814
+ display: flex;
815
+ overflow: hidden;
816
+ width: 60%;
817
+ align-items: center;
818
+ }
819
+ .index-module_label__xE6hM .index-module_labelText__Zg1c4 .index-module_titleText__BRM44 {
820
+ max-width: calc(100% - 20px);
821
+ overflow: hidden;
822
+ }
723
823
  .index-module_label__xE6hM .index-module_required__iElYl::before {
724
824
  display: inline-block;
725
825
  margin-right: 4px;
@@ -732,6 +832,7 @@
732
832
  .index-module_label__xE6hM .index-module_extra__PW5Qk {
733
833
  float: right;
734
834
  margin-right: 5px;
835
+ width: 40%;
735
836
  }
736
837
 
737
838
  .index-module_textareaContainer__dTIv4 {
@@ -862,6 +963,7 @@
862
963
  flex-wrap: wrap;
863
964
  align-items: center;
864
965
  justify-content: center;
966
+ overflow: hidden;
865
967
  }
866
968
  .index-module_placeholderHotkey__0SKPo .text {
867
969
  color: #333;
@@ -878,7 +980,10 @@
878
980
 
879
981
  .index-module_attribute__g8Vbl {
880
982
  height: 22px;
881
- padding: 2px 8px;
983
+ padding: 0px 8px;
984
+ width: max-content;
985
+ max-width: 100%;
986
+ margin-left: auto;
882
987
  }
883
988
 
884
989
  .index-module_clearIcon__ZBZqI {
@@ -1141,7 +1246,8 @@
1141
1246
  }
1142
1247
  .index-module_clipSidebar__z2E8x .index-module_attributeList__2wnCE {
1143
1248
  flex: 1;
1144
- overflow: auto;
1249
+ overflow-x: hidden;
1250
+ overflow-y: auto;
1145
1251
  }
1146
1252
  .index-module_clipSidebar__z2E8x .index-module_attributeList__2wnCE .sensebee-radio-group,
1147
1253
  .index-module_clipSidebar__z2E8x .index-module_attributeList__2wnCE .sensebee-radio-group-no-limit-height .ant-radio-group {
@@ -1489,6 +1595,7 @@
1489
1595
  .bee-sidebar #style-width .ant-slider .ant-slider-track,
1490
1596
  .bee-sidebar #style-color .ant-slider .ant-slider-track,
1491
1597
  .bee-sidebar #style-fillOpacity .ant-slider .ant-slider-track,
1598
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider .ant-slider-track,
1492
1599
  .bee-sidebar #style-borderOpacity .ant-slider .ant-slider-track {
1493
1600
  background: #f5f5f5;
1494
1601
  }
@@ -1498,6 +1605,7 @@
1498
1605
  .bee-sidebar #style-width .ant-slider .ant-slider-dot,
1499
1606
  .bee-sidebar #style-color .ant-slider .ant-slider-dot,
1500
1607
  .bee-sidebar #style-fillOpacity .ant-slider .ant-slider-dot,
1608
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider .ant-slider-dot,
1501
1609
  .bee-sidebar #style-borderOpacity .ant-slider .ant-slider-dot {
1502
1610
  width: 0;
1503
1611
  height: 0;
@@ -1509,6 +1617,7 @@
1509
1617
  .bee-sidebar #style-width .ant-slider .ant-slider-handle,
1510
1618
  .bee-sidebar #style-color .ant-slider .ant-slider-handle,
1511
1619
  .bee-sidebar #style-fillOpacity .ant-slider .ant-slider-handle,
1620
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider .ant-slider-handle,
1512
1621
  .bee-sidebar #style-borderOpacity .ant-slider .ant-slider-handle {
1513
1622
  background-image: url("../dist/assets/icons/cc550fff.svg");
1514
1623
  background-repeat: no-repeat;
@@ -1526,6 +1635,7 @@
1526
1635
  .bee-sidebar #style-width .ant-slider .ant-slider-handle:focus,
1527
1636
  .bee-sidebar #style-color .ant-slider .ant-slider-handle:focus,
1528
1637
  .bee-sidebar #style-fillOpacity .ant-slider .ant-slider-handle:focus,
1638
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider .ant-slider-handle:focus,
1529
1639
  .bee-sidebar #style-borderOpacity .ant-slider .ant-slider-handle:focus {
1530
1640
  box-shadow: none;
1531
1641
  }
@@ -1535,6 +1645,7 @@
1535
1645
  .bee-sidebar #style-width .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header .ant-collapse-arrow,
1536
1646
  .bee-sidebar #style-color .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header .ant-collapse-arrow,
1537
1647
  .bee-sidebar #style-fillOpacity .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header .ant-collapse-arrow,
1648
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header .ant-collapse-arrow,
1538
1649
  .bee-sidebar #style-borderOpacity .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header .ant-collapse-arrow {
1539
1650
  color: inherit;
1540
1651
  font-style: normal;
@@ -1558,6 +1669,7 @@
1558
1669
  .bee-sidebar #style-width .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header,
1559
1670
  .bee-sidebar #style-color .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header,
1560
1671
  .bee-sidebar #style-fillOpacity .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header,
1672
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header,
1561
1673
  .bee-sidebar #style-borderOpacity .ant-slider .ant-collapse > .ant-collapse-item > .ant-collapse-header {
1562
1674
  position: relative;
1563
1675
  color: rgba(0, 0, 0, 0.85);
@@ -1584,6 +1696,9 @@
1584
1696
  .bee-sidebar #style-fillOpacity .ant-slider-rail,
1585
1697
  .bee-sidebar #style-fillOpacity .ant-slider-track,
1586
1698
  .bee-sidebar #style-fillOpacity .ant-slider-step,
1699
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider-rail,
1700
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider-track,
1701
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider-step,
1587
1702
  .bee-sidebar #style-borderOpacity .ant-slider-rail,
1588
1703
  .bee-sidebar #style-borderOpacity .ant-slider-track,
1589
1704
  .bee-sidebar #style-borderOpacity .ant-slider-step {
@@ -1596,38 +1711,46 @@
1596
1711
  .bee-sidebar #style-width .ant-slider .ant-slider-track,
1597
1712
  .bee-sidebar #style-color .ant-slider .ant-slider-track,
1598
1713
  .bee-sidebar #style-fillOpacity .ant-slider .ant-slider-track,
1714
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider .ant-slider-track,
1599
1715
  .bee-sidebar #style-borderOpacity .ant-slider .ant-slider-track {
1600
1716
  background: none;
1601
1717
  }
1602
1718
  .bee-sidebar #style-radius .ant-slider-step .ant-slider-dot,
1603
- .bee-sidebar #style-width .ant-slider-step .ant-slider-dot {
1719
+ .bee-sidebar #style-width .ant-slider-step .ant-slider-dot,
1720
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider-step .ant-slider-dot {
1604
1721
  height: 12px;
1605
1722
  background: #666666;
1606
1723
  border-radius: 0;
1607
1724
  margin-left: -2px;
1608
1725
  }
1609
1726
  .bee-sidebar #style-radius .ant-slider-step .ant-slider-dot:nth-of-type(1),
1610
- .bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(1) {
1727
+ .bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(1),
1728
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider-step .ant-slider-dot:nth-of-type(1) {
1611
1729
  width: 1px;
1612
1730
  }
1613
1731
  .bee-sidebar #style-radius .ant-slider-step .ant-slider-dot:nth-of-type(2),
1614
- .bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(2) {
1732
+ .bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(2),
1733
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider-step .ant-slider-dot:nth-of-type(2) {
1615
1734
  width: 2px;
1616
1735
  }
1617
1736
  .bee-sidebar #style-radius .ant-slider-step .ant-slider-dot:nth-of-type(3),
1618
- .bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(3) {
1737
+ .bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(3),
1738
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider-step .ant-slider-dot:nth-of-type(3) {
1619
1739
  width: 3px;
1620
1740
  }
1621
1741
  .bee-sidebar #style-radius .ant-slider-step .ant-slider-dot:nth-of-type(4),
1622
- .bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(4) {
1742
+ .bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(4),
1743
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider-step .ant-slider-dot:nth-of-type(4) {
1623
1744
  width: 4px;
1624
1745
  }
1625
1746
  .bee-sidebar #style-radius .ant-slider-step .ant-slider-dot:nth-of-type(5),
1626
- .bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(5) {
1747
+ .bee-sidebar #style-width .ant-slider-step .ant-slider-dot:nth-of-type(5),
1748
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider-step .ant-slider-dot:nth-of-type(5) {
1627
1749
  width: 5px;
1628
1750
  }
1629
1751
  .bee-sidebar #style-radius .ant-slider:hover .ant-slider-rail,
1630
- .bee-sidebar #style-width .ant-slider:hover .ant-slider-rail {
1752
+ .bee-sidebar #style-width .ant-slider:hover .ant-slider-rail,
1753
+ .bee-sidebar #style-rectRotateSensitivity .ant-slider:hover .ant-slider-rail {
1631
1754
  background: #f5f5f5;
1632
1755
  }
1633
1756
  .bee-sidebar #style-color .ant-slider-rail {
@@ -2244,6 +2367,9 @@
2244
2367
  .bee-pop-confirm .ant-popover-buttons {
2245
2368
  min-width: 116px;
2246
2369
  }
2370
+ .bee-pop-confirm .ant-popover-inner-content .ant-popover-message {
2371
+ align-items: initial;
2372
+ }
2247
2373
 
2248
2374
  .bee-annotated-attribute {
2249
2375
  width: 240px;
@@ -2494,14 +2620,14 @@
2494
2620
  margin-right: 16px;
2495
2621
  background-image: url("../dist/assets/icons/7eadb9c4.svg");
2496
2622
  }
2497
- .bee-point-cloud-wrapper .bee-point-cloud-container__header-toolbar .bee-point-cloud__rotate-180 {
2623
+ .bee-point-cloud-wrapper .bee-point-cloud-container__header-toolbar .bee-point-cloud__rotate-90 {
2498
2624
  display: inline-block;
2499
2625
  height: 24px;
2500
2626
  width: 24px;
2501
2627
  background-repeat: no-repeat;
2502
2628
  cursor: pointer;
2503
2629
  flex: none;
2504
- background-image: url("../dist/assets/icons/9d70807.svg");
2630
+ background-image: url("../dist/assets/icons/ad33251.svg");
2505
2631
  }
2506
2632
  .bee-point-cloud-wrapper .bee-point-cloud-container__header-toolbar .bee-point-cloud__next {
2507
2633
  font-size: 24px;
@@ -3080,15 +3206,12 @@
3080
3206
  display: block;
3081
3207
  }
3082
3208
  .bee-sidebar__content__NLPList__item__text {
3083
- flex: 1 1;
3084
- padding: 16px;
3085
3209
  font-weight: 400;
3086
3210
  font-size: 12px;
3087
3211
  line-height: 20px;
3088
3212
  color: #666666;
3089
- overflow: hidden;
3090
- text-overflow: ellipsis;
3091
- white-space: nowrap;
3213
+ padding: 16px;
3214
+ width: 100%;
3092
3215
  }
3093
3216
  .bee-sidebar__content__NLPList__item__active {
3094
3217
  background-color: #eeefff;
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index$1=require("./components/AnnotationView/index.js"),pointCloudAnnotationView=require("./components/AnnotationView/pointCloudAnnotationView.js"),index$2=require("./components/LLMToolView/questionView/index.js"),index$3=require("./components/NLPToolView/textContent/index.js"),lbUtils=require("@labelbee/lb-utils"),React=require("react"),reactI18next=require("react-i18next"),reactRedux=require("react-redux"),App=require("./App.js"),configureStore=require("./configureStore.js"),actionCreators=require("./store/annotation/actionCreators.js"),TagToolInstanceAdaptorI18nProvider=require("./components/videoAnnotate/videoTagTool/TagToolInstanceAdaptorI18nProvider.js"),PointCloudContext=require("./components/pointCloudView/PointCloudContext.js"),ctx=require("./store/ctx.js"),index$5=require("./components/predictTracking/predictTrackingIcon/index.js"),index$4=require("./components/LLMToolView/index.js"),index$6=require("./views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.js"),index$7=require("./components/measureCanvas/index.js"),index$8=require("./views/MainView/sidebar/PointCloudToolSidebar/components/annotatedBox/index.js"),index$9=require("./views/MainView/sidebar/PointCloudToolSidebar/components/findTrackIDIndex/index.js"),index$a=require("./constant/index.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,r)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__spreadValues=(e,t)=>{for(var r in t||(t={}))__hasOwnProp.call(t,r)&&__defNormalProp(e,r,t[r]);if(__getOwnPropSymbols)for(var r of __getOwnPropSymbols(t))__propIsEnum.call(t,r)&&__defNormalProp(e,r,t[r]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t));const store=configureStore(),OutputApp=(e,t)=>{const[r,a]=React.useState();return React.useImperativeHandle(t,()=>({toolInstance:r,annotationEngine:store.getState().annotation.annotationEngine,pageBackwardActions:()=>store.dispatch(actionCreators.PageBackward()),pageForwardActions:()=>store.dispatch(actionCreators.PageForward()),pageJump:o=>{const n=~~o-1;store.dispatch(actionCreators.PageJump(n))},hello:()=>alert("hello labelBee!!!")}),[r]),React__default.default.createElement(reactRedux.Provider,{store,context:ctx.LabelBeeContext},React__default.default.createElement(reactI18next.I18nextProvider,{i18n:lbUtils.i18n},React__default.default.createElement(PointCloudContext.PointCloudProvider,null,React__default.default.createElement(App,__spreadProps(__spreadValues({},e),{setToolInstance:o=>{var n;a(o),(n=e.onLoad)==null||n.call(e,{toolInstance:o})}})))))};var index=React__default.default.forwardRef(OutputApp);exports.AnnotationView=index$1,exports.PointCloudAnnotationView=pointCloudAnnotationView,exports.QuestionView=index$2.default,exports.TextContent=index$3,Object.defineProperty(exports,"i18n",{enumerable:!0,get:function(){return lbUtils.i18n}}),exports.VideoTagTool=TagToolInstanceAdaptorI18nProvider.VideoTagTool,exports.PredictTracking=index$5,exports.LLMToolView=index$4,exports.SwitchCuboidBoxIn2DView=index$6,exports.MeasureCanvas=index$7,exports.AnnotatedBox=index$8,exports.FindTrackIDIndex=index$9.FindTrackIDIndexInCheckMode,Object.defineProperty(exports,"EDataFormatType",{enumerable:!0,get:function(){return index$a.EDataFormatType}}),Object.defineProperty(exports,"ELLMDataType",{enumerable:!0,get:function(){return index$a.ELLMDataType}}),Object.defineProperty(exports,"EStepType",{enumerable:!0,get:function(){return index$a.EStepType}}),Object.defineProperty(exports,"ESubmitType",{enumerable:!0,get:function(){return index$a.ESubmitType}}),exports.componentCls=index$a.componentCls,exports.prefix=index$a.prefix,exports.default=index,exports.store=store;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index$1=require("./components/AnnotationView/index.js"),pointCloudAnnotationView=require("./components/AnnotationView/pointCloudAnnotationView.js"),index$2=require("./components/LLMToolView/questionView/index.js"),index$3=require("./components/NLPToolView/textContent/index.js"),lbUtils=require("@labelbee/lb-utils"),React=require("react"),reactI18next=require("react-i18next"),reactRedux=require("react-redux"),App=require("./App.js"),configureStore=require("./configureStore.js"),actionCreators=require("./store/annotation/actionCreators.js"),TagToolInstanceAdaptorI18nProvider=require("./components/videoAnnotate/videoTagTool/TagToolInstanceAdaptorI18nProvider.js"),PointCloudContext=require("./components/pointCloudView/PointCloudContext.js"),ctx=require("./store/ctx.js"),index$5=require("./components/predictTracking/predictTrackingIcon/index.js"),index$4=require("./components/LLMToolView/index.js"),index$6=require("./views/MainView/toolFooter/SwitchCuboidBoxIn2DView/index.js"),BatchSwitchConnectIn2DView=require("./views/MainView/toolFooter/BatchSwitchConnectIn2DView/BatchSwitchConnectIn2DView.js"),index$7=require("./components/measureCanvas/index.js"),index$8=require("./views/MainView/sidebar/PointCloudToolSidebar/components/annotatedBox/index.js"),index$9=require("./views/MainView/sidebar/PointCloudToolSidebar/components/rectRotateSensitivitySlider/index.js"),index$a=require("./views/MainView/sidebar/PointCloudToolSidebar/components/findTrackIDIndex/index.js"),index$b=require("./components/audioPlayer/index.js"),index$c=require("./utils/index.js"),index$d=require("./components/subAttributeList/index.js"),useToolStyle=require("./hooks/useToolStyle.js"),index$e=require("./constant/index.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,r)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__spreadValues=(e,t)=>{for(var r in t||(t={}))__hasOwnProp.call(t,r)&&__defNormalProp(e,r,t[r]);if(__getOwnPropSymbols)for(var r of __getOwnPropSymbols(t))__propIsEnum.call(t,r)&&__defNormalProp(e,r,t[r]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t));const store=configureStore();lbUtils.i18n.use(reactI18next.initReactI18next),lbUtils.i18n.options.react={useSuspense:!1};const OutputApp=(e,t)=>{const[r,i]=React.useState();return React.useImperativeHandle(t,()=>({toolInstance:r,annotationEngine:store.getState().annotation.annotationEngine,pageBackwardActions:()=>store.dispatch(actionCreators.PageBackward()),pageForwardActions:()=>store.dispatch(actionCreators.PageForward()),pageJump:o=>{const n=~~o-1;store.dispatch(actionCreators.PageJump(n))},hello:()=>alert("hello labelBee!!!")}),[r]),React__default.default.createElement(reactRedux.Provider,{store,context:ctx.LabelBeeContext},React__default.default.createElement(reactI18next.I18nextProvider,{i18n:lbUtils.i18n},React__default.default.createElement(useToolStyle.ToolStyleProvider,{value:e.toolStyle},React__default.default.createElement(PointCloudContext.PointCloudProvider,null,React__default.default.createElement(App,__spreadProps(__spreadValues({},e),{setToolInstance:o=>{var n;i(o),(n=e.onLoad)==null||n.call(e,{toolInstance:o})}}))))))};var index=React__default.default.forwardRef(OutputApp);exports.AnnotationView=index$1,exports.PointCloudAnnotationView=pointCloudAnnotationView,exports.QuestionView=index$2.default,exports.TextContent=index$3,Object.defineProperty(exports,"i18n",{enumerable:!0,get:function(){return lbUtils.i18n}}),exports.VideoTagTool=TagToolInstanceAdaptorI18nProvider.VideoTagTool,exports.PredictTracking=index$5,exports.LLMToolView=index$4,exports.SwitchCuboidBoxIn2DView=index$6.default,Object.defineProperty(exports,"SwitchCuboidBoxIn2DViewStateMode",{enumerable:!0,get:function(){return index$6.SwitchCuboidBoxIn2DViewStateMode}}),exports.BatchSwitchConnectIn2DView=BatchSwitchConnectIn2DView.default,exports.MeasureCanvas=index$7,exports.AnnotatedBox=index$8,exports.RectRotateSensitivitySlider=index$9,exports.FindTrackIDIndex=index$a.FindTrackIDIndexInCheckMode,exports.AudioPlayer=index$b.WrapAudioPlayer,exports.generatePointCloudBoxRects=index$c.generatePointCloudBoxRects,exports.SubAttributeList=index$d,Object.defineProperty(exports,"EDataFormatType",{enumerable:!0,get:function(){return index$e.EDataFormatType}}),Object.defineProperty(exports,"ELLMDataType",{enumerable:!0,get:function(){return index$e.ELLMDataType}}),Object.defineProperty(exports,"EStepType",{enumerable:!0,get:function(){return index$e.EStepType}}),Object.defineProperty(exports,"ESubmitType",{enumerable:!0,get:function(){return index$e.ESubmitType}}),exports.componentCls=index$e.componentCls,exports.prefix=index$e.prefix,exports.default=index,exports.store=store;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const ANNOTATION_ACTIONS={INIT_ALL_STATE:"@@INIT_ALL_STATE",UPDATE_TOOL_INSTANCE:"@@UPDATE_TOOL_INSTANCE",UPDATE_IMG_LIST:"@@UPDATE_IMG_LIST",UPDATE_ANNOTATION_CONFIG:"@@UPDATE_ANNOTATION_CONFIG",LOAD_FILE_DATA:"@@LOAD_FILE_DATA",SUBMIT_FILE_DATA:"@@SUBMIT_FILE_DATA",SET_TASK_CONFIG:"@@SET_TASK_CONFIG",INIT_TOOL:"@@INIT_TOOL",SET_TOOL:"@@SET_TOOL",UPDATE_ON_SUBMIT:"@@UPDATE_ON_SUBMIT",UPDATE_ON_SAVE:"@@UPDATE_ON_SAVE",UPDATE_ON_PAGE_CHANGE:"@@UPDATE_ON_PAGE_CHANGE",UPDATE_ON_STEP_CHANGE:"@@UPDATE_ON_STEP_CHANGE",UPDATE_ROTATE:"@@UPDATE_ROTATE",UPDATE_GET_FILE_DATA:"@@UPDATE_GET_FILE_DATA",UPDATE_PAGE_SIZE:"@@UPDATE_PAGE_SIZE",UPDATE_LOAD_FILE_LIST:"@@UPDATE_LOAD_FILE_LIST",GET_FILE_DATA:"@@GET_FILE_DATA",SET_FILE_DATA:"@@SET_FILE_DATA",COPY_BACKWARD_RESULT:"@@COPY_BACKWARD_RESULT",SET_STEP:"@@SET_STEP",SUBMIT_RESULT:"@@SUBMIT_RESULT",SAVE_RESULT:"@@SAVE_RESULT",SET_BASIC_INDEX:"@@SET_BASIC_INDEX",CALC_STEP_PROGRESS:"@@CALC_STEP_PROGRESS",SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED:"@@SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED",SKIP_BEFORE_PAGE_TURNING:"@@SKIP_BEFORE_PAGE_TURNING",UPDATE_BEFORE_ROTATE:"@@UPDATE_BEFORE_ROTATE",SET_LOADING:"@@SET_LOADING",SET_LOADPCDFILE_LOADING:"@@SET_LOADPCDFILE_LOADING",SET_POINT_CLOUD_LOADING:"@@SET_POINT_CLOUD_LOADING",SET_CHECK_MODE:"@@SET_CHECK_MODE",SET_TASK_STEP_LIST:"@@SET_TASK_STEP_LIST",UPDATE_ANNOTATION_VALID:"@@UPDATE_ANNOTATION_VALID",BATCH_UPDATE_TRACK_ID:"@@BATCH_UPDATE_TRACK_ID",BATCH_UPDATE_RESULT_BY_TRACK_ID:"@@BATCH_UPDATE_RESULT_BY_TRACK_ID",BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT:"@@BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT",SET_PREDICT_RESULT_VISIBLE:"@@SET_PREDICT_RESULT_VISIBLE",SET_PREDICT_RESULT:"@@SET_PREDICT_RESULT",SET_HIGHLIGHT_ATTRIBUTE:"@@SET_HIGHLIGHT_ATTRIBUTE",UPDATE_PRE_DATA_PROCESS:"@@UPDATE_PRE_DATA_PROCESS"},IMAGE_ATTRIBUTE_ACTIONS={UPDATE_IMG_ATTRIBUTE:"@@UPDATE_IMG_ATTRIBUTE",INIT_IMG_ATTRIBUTE:"@@INIT_IMG_ATTRIBUTE"},TOOL_STYLE_ACTIONS={INIT_TOOL_STYLE_CONFIG:"@@INIT_TOOL_STYLE_CONFIG",UPDATE_TOOL_STYLE_CONFIG:"@@UPDATE_TOOL_STYLE_CONFIG"};exports.ANNOTATION_ACTIONS=ANNOTATION_ACTIONS,exports.IMAGE_ATTRIBUTE_ACTIONS=IMAGE_ATTRIBUTE_ACTIONS,exports.TOOL_STYLE_ACTIONS=TOOL_STYLE_ACTIONS;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const ANNOTATION_ACTIONS={INIT_ALL_STATE:"@@INIT_ALL_STATE",UPDATE_TOOL_INSTANCE:"@@UPDATE_TOOL_INSTANCE",UPDATE_IMG_LIST:"@@UPDATE_IMG_LIST",UPDATE_ANNOTATION_CONFIG:"@@UPDATE_ANNOTATION_CONFIG",LOAD_FILE_DATA:"@@LOAD_FILE_DATA",SUBMIT_FILE_DATA:"@@SUBMIT_FILE_DATA",SET_TASK_CONFIG:"@@SET_TASK_CONFIG",INIT_TOOL:"@@INIT_TOOL",SET_TOOL:"@@SET_TOOL",UPDATE_ON_SUBMIT:"@@UPDATE_ON_SUBMIT",UPDATE_ON_SAVE:"@@UPDATE_ON_SAVE",UPDATE_ON_PAGE_CHANGE:"@@UPDATE_ON_PAGE_CHANGE",UPDATE_ON_STEP_CHANGE:"@@UPDATE_ON_STEP_CHANGE",UPDATE_ROTATE:"@@UPDATE_ROTATE",UPDATE_GET_FILE_DATA:"@@UPDATE_GET_FILE_DATA",UPDATE_PAGE_SIZE:"@@UPDATE_PAGE_SIZE",UPDATE_LOAD_FILE_LIST:"@@UPDATE_LOAD_FILE_LIST",GET_FILE_DATA:"@@GET_FILE_DATA",SET_FILE_DATA:"@@SET_FILE_DATA",COPY_BACKWARD_RESULT:"@@COPY_BACKWARD_RESULT",SET_STEP:"@@SET_STEP",SUBMIT_RESULT:"@@SUBMIT_RESULT",SAVE_RESULT:"@@SAVE_RESULT",SET_BASIC_INDEX:"@@SET_BASIC_INDEX",CALC_STEP_PROGRESS:"@@CALC_STEP_PROGRESS",SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED:"@@SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED",SKIP_BEFORE_PAGE_TURNING:"@@SKIP_BEFORE_PAGE_TURNING",UPDATE_BEFORE_ROTATE:"@@UPDATE_BEFORE_ROTATE",SET_LOADING:"@@SET_LOADING",SET_LOADPCDFILE_LOADING:"@@SET_LOADPCDFILE_LOADING",SET_POINT_CLOUD_LOADING:"@@SET_POINT_CLOUD_LOADING",SET_CHECK_MODE:"@@SET_CHECK_MODE",SET_TASK_STEP_LIST:"@@SET_TASK_STEP_LIST",UPDATE_ANNOTATION_VALID:"@@UPDATE_ANNOTATION_VALID",BATCH_UPDATE_TRACK_ID:"@@BATCH_UPDATE_TRACK_ID",BATCH_UPDATE_RESULT_BY_TRACK_ID:"@@BATCH_UPDATE_RESULT_BY_TRACK_ID",BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT:"@@BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT",SET_PREDICT_RESULT_VISIBLE:"@@SET_PREDICT_RESULT_VISIBLE",SET_PREDICT_RESULT:"@@SET_PREDICT_RESULT",SET_HIGHLIGHT_ATTRIBUTE:"@@SET_HIGHLIGHT_ATTRIBUTE",UPDATE_PRE_DATA_PROCESS:"@@UPDATE_PRE_DATA_PROCESS",UPDATE_IMG_INDEX_BY_EXTERNAL:"@@UPDATE_IMG_INDEX_BY_EXTERNAL"},IMAGE_ATTRIBUTE_ACTIONS={UPDATE_IMG_ATTRIBUTE:"@@UPDATE_IMG_ATTRIBUTE",INIT_IMG_ATTRIBUTE:"@@INIT_IMG_ATTRIBUTE"},TOOL_STYLE_ACTIONS={INIT_TOOL_STYLE_CONFIG:"@@INIT_TOOL_STYLE_CONFIG",UPDATE_TOOL_STYLE_CONFIG:"@@UPDATE_TOOL_STYLE_CONFIG"};exports.ANNOTATION_ACTIONS=ANNOTATION_ACTIONS,exports.IMAGE_ATTRIBUTE_ACTIONS=IMAGE_ATTRIBUTE_ACTIONS,exports.TOOL_STYLE_ACTIONS=TOOL_STYLE_ACTIONS;
@@ -1 +1 @@
1
- "use strict";var zustand=require("zustand");const useAnnotatedBoxStore=zustand.create(e=>({ptCtx:{},pointCloudBoxList:[],setPointCloudBoxList:t=>e(s=>({pointCloudBoxList:t})),highlightIDs:[],setHighlightIDs:t=>e(s=>({highlightIDs:t})),selectedIDs:[],setSelectedIDs:t=>e(s=>({selectedIDs:t})),setPtCtx:t=>e(s=>({ptCtx:t}))}));module.exports=useAnnotatedBoxStore;
1
+ "use strict";var zustand=require("zustand");const useAnnotatedBoxStore=zustand.create(e=>({ptCtx:{},pointCloudBoxList:[],setPointCloudBoxList:t=>e(s=>({pointCloudBoxList:t})),highlightIDs:[],setHighlightIDs:t=>e(s=>({highlightIDs:t})),selectedIDs:[],setSelectedIDs:t=>e(s=>({selectedIDs:t})),rectRotateSensitivity:2,setRectRotateSensitivity:t=>e(s=>({rectRotateSensitivity:t})),setPtCtx:t=>e(s=>({ptCtx:t}))}));module.exports=useAnnotatedBoxStore;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Actions=require("../Actions.js"),reducer=require("./reducer.js"),index=require("../../constant/index.js"),AnnotationSize=require("../../data/enums/AnnotationSize.js"),PageOperator=require("../../utils/PageOperator.js"),index$1=require("../../utils/index.js"),util=require("../../components/predictTracking/previewResult/util.js"),__async=(t,e,n)=>new Promise((a,r)=>{var o=s=>{try{u(n.next(s))}catch(i){r(i)}},T=s=>{try{u(n.throw(s))}catch(i){r(i)}},u=s=>s.done?a(s.value):Promise.resolve(s.value).then(o,T);u((n=n.apply(t,e)).next())});const dispatchTasks=(t,e)=>e.map(n=>t(n)),getSubmitByPageOperation=t=>t===AnnotationSize.EPageTurningOperation.Forward?index.ESubmitType.Forward:t===AnnotationSize.EPageTurningOperation.Backward?index.ESubmitType.Backward:t===AnnotationSize.EPageTurningOperation.Jump?index.ESubmitType.Jump:index.ESubmitType.Forward,getBasicIndex=(t,e)=>{var n,a;const{imgList:r,imgIndex:o}=t,{dataSourceStep:T}=reducer.getStepConfig(t.stepList,t.step);return((a=(n=index$1.jsonParser(r[o-1].result)[`step_${T}`])==null?void 0:n.result)==null?void 0:a.length)-1||e};function UpdateToolInstance(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_TOOL_INSTANCE,payload:{toolInstance:t}}}function SetTaskStepList({stepList:t}){return{type:Actions.ANNOTATION_ACTIONS.SET_TASK_STEP_LIST,payload:{stepList:t}}}function SetTaskConfig({stepList:t,step:e}){return{type:Actions.ANNOTATION_ACTIONS.SET_TASK_CONFIG,payload:{stepList:t,step:e}}}function UpdateOnSubmit(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_SUBMIT,payload:{onSubmit:t}}}function UpdateOnSave(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_SAVE,payload:{onSave:t}}}function UpdateOnPageChange(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_PAGE_CHANGE,payload:{onPageChange:t}}}function UpdateOnStepChange(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_STEP_CHANGE,payload:{onStepChange:t}}}function UpdateGetFileData(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_GET_FILE_DATA,payload:{getFileData:t}}}function UpdatePageSize(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_PAGE_SIZE,payload:{pageSize:t}}}function UpdateGetFileList(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_LOAD_FILE_LIST,payload:{loadFileList:t}}}function UpdateRotate(){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ROTATE}}function UpdateSkipBeforePageTurning(t){return{type:Actions.ANNOTATION_ACTIONS.SKIP_BEFORE_PAGE_TURNING,payload:{skipBeforePageTurning:t}}}function UpdateBeforeRotate(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_BEFORE_ROTATE,payload:{beforeRotate:t}}}function UpdatePreDataProcess(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_PRE_DATA_PROCESS,payload:{preDataProcess:t}}}function CopyBackWordResult(){return{type:Actions.ANNOTATION_ACTIONS.COPY_BACKWARD_RESULT}}function BatchUpdateTrackID({id:t,newID:e,rangeIndex:n,imgList:a}){return{type:Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_TRACK_ID,payload:{id:t,newID:e,rangeIndex:n,imgList:a}}}function BatchUpdateResultByTrackID(t,e,n){return{type:Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_RESULT_BY_TRACK_ID,payload:{id:t,newData:e,rangeIndex:n}}}function BatchUpdateImgListResultByPredictResult(){return{type:Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT,payload:{}}}const UpdateCheckMode=t=>({type:Actions.ANNOTATION_ACTIONS.SET_CHECK_MODE,payload:{checkMode:t}}),UpdateHighlightAttribute=t=>({type:Actions.ANNOTATION_ACTIONS.SET_HIGHLIGHT_ATTRIBUTE,payload:{attribute:t}});function InitTaskData({onSubmit:t,onSave:e,onPageChange:n,onStepChange:a,getFileData:r,pageSize:o,loadFileList:T,step:u,stepList:s,skipBeforePageTurning:i,beforeRotate:N,checkMode:p,highlightAttribute:I,preDataProcess:O}){const A=[];return t&&A.push(UpdateOnSubmit(t)),e&&A.push(UpdateOnSave(e)),n&&A.push(UpdateOnPageChange(n)),a&&A.push(UpdateOnStepChange(a)),r&&A.push(UpdateGetFileData(r)),T&&A.push(UpdateGetFileList(T)),o&&A.push(UpdatePageSize(o)),i&&A.push(UpdateSkipBeforePageTurning(i)),N&&A.push(UpdateBeforeRotate(N)),O&&A.push(UpdatePreDataProcess(O)),typeof p=="boolean"&&A.push(UpdateCheckMode(p)),A.push(UpdateHighlightAttribute(I)),A.push(SetTaskConfig({stepList:s,step:u})),A.push({type:Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS}),A.push({type:Actions.ANNOTATION_ACTIONS.INIT_TOOL}),d=>dispatchTasks(d,A)}function UpdateInjectFunc({onSubmit:t,onSave:e,onPageChange:n,onStepChange:a,getFileData:r,pageSize:o,loadFileList:T,stepList:u,beforeRotate:s,highlightAttribute:i,preDataProcess:N}){const p=[];return t&&p.push(UpdateOnSubmit(t)),e&&p.push(UpdateOnSave(e)),n&&p.push(UpdateOnPageChange(n)),a&&p.push(UpdateOnStepChange(a)),r&&p.push(UpdateGetFileData(r)),T&&p.push(UpdateGetFileList(T)),o&&p.push(UpdatePageSize(o)),s&&p.push(UpdateBeforeRotate(s)),N&&p.push(UpdatePreDataProcess(N)),p.push(UpdateHighlightAttribute(i)),p.push(SetTaskStepList({stepList:u})),I=>dispatchTasks(I,p)}const getNextStep=(t,e)=>{var n;const a=e==null?void 0:e.findIndex(r=>(r==null?void 0:r.step)===t);return(n=e[a+1])==null?void 0:n.step},ToNextStep=t=>(e,n)=>{const{annotation:a}=n(),{step:r,stepList:o}=a,T=getNextStep(r,o);return[e(UpdateProcessingStep(T,t))]},UpdateProcessingStep=(t,e)=>(n,a)=>{var r,o;const{annotation:T}=a();(r=T==null?void 0:T.onStepChange)==null||r.call(T,t);const u=(o=T==null?void 0:T.imgIndex)!=null?o:0;return[n({type:Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT}),n({type:Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA,payload:{submitType:index.ESubmitType.StepChanged}}),n({type:Actions.ANNOTATION_ACTIONS.SET_STEP,payload:{toStep:t}}),n({type:Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS}),n(reducer.LoadFileAndFileData(e!=null?e:u,0))]},ToSubmitFileData=t=>e=>[e({type:Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT}),e({type:Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA,payload:{submitType:t}})],SubmitAndChangeFileIndex=(t,e,n,a)=>[t(ToSubmitFileData(n)),t(reducer.LoadFileAndFileData(e,a))],ChangeBasicIndex=(t,e)=>[t({type:Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT}),t({type:Actions.ANNOTATION_ACTIONS.SET_BASIC_INDEX,payload:{basicIndex:e}})],ChangeTriggerEventAfterIndexChanged=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED,payload:{triggerEventAfterIndexChanged:e}})},PageBackward=(t=!1)=>(e,n)=>DispatcherTurning(e,n,AnnotationSize.EPageTurningOperation.Backward,t),PageForward=(t=!1)=>(e,n)=>DispatcherTurning(e,n,AnnotationSize.EPageTurningOperation.Forward,t),PageJump=(t,e=!1)=>(n,a)=>{if(t!==a().imgIndex)return DispatcherTurning(n,a,AnnotationSize.EPageTurningOperation.Jump,e,t)},loadImgList=(t,e,n,a)=>__async(void 0,null,function*(){var r;const{loadFileList:o,imgList:T,pageSize:u}=e().annotation,s=Math.floor(n/u);SetAnnotationLoading(t,!0);try{const i=yield o(s,u);if(SetAnnotationLoading(t,!1),!((r=i==null?void 0:i.fileList)==null?void 0:r.length)||!(i==null?void 0:i.total))throw new Error("fileList and total are required");const N=a?new Array(i.total):[...T];return N.splice(s*u,u,...i.fileList),t({type:Actions.ANNOTATION_ACTIONS.UPDATE_IMG_LIST,payload:{imgList:N}}),!0}catch(i){SetAnnotationLoading(t,!1),console.error(i)}}),DispatcherTurning=(t,e,n,a=!1,r)=>__async(void 0,null,function*(){var o;const T=e().annotation,{fileIndexChanged:u,fileIndex:s,basicIndexChanged:i,basicIndex:N}=PageOperator.getNextPageInfo(n,T,r),p=getSubmitByPageOperation(n);if(ChangeTriggerEventAfterIndexChanged(t,a),u){if(T.loading||!T.imgList[s]&&!(yield loadImgList(t,e,s)))return;(o=T.onPageChange)==null||o.call(T,s);const I=p===index.ESubmitType.Backward?getBasicIndex(e().annotation,N):N;return SubmitAndChangeFileIndex(t,s,p,I)}return i?ChangeBasicIndex(t,N):t(ToSubmitFileData(p))}),ChangeSave=t=>{t(ToSubmitFileData(index.ESubmitType.Save)),t({type:Actions.ANNOTATION_ACTIONS.SAVE_RESULT})},SetAnnotationLoading=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_LOADING,payload:{loading:e}})},SetPointCloudLoading=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_LOADING,payload:{loading:e}})},SetLoadPCDFileLoading=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_LOADPCDFILE_LOADING,payload:{loadPCDFileLoading:e}})},InitAnnotationState=t=>{t({type:Actions.ANNOTATION_ACTIONS.INIT_ALL_STATE,payload:{}})},SetPredictResult=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_PREDICT_RESULT,payload:{result:e}})},SetPredictResultVisible=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_PREDICT_RESULT_VISIBLE,payload:{visible:e}})},GetBoxesByID=(t,e)=>(n,a)=>{const{imgList:r,step:o}=a().annotation;return util.getBoxesByTrackID(r,o,t,e)},PreDataProcess=t=>(e,n)=>{var a,r;const{annotation:o}=n();return(r=(a=o==null?void 0:o.preDataProcess)==null?void 0:a.call(o,t))!=null?r:t.dataList};exports.BatchUpdateImgListResultByPredictResult=BatchUpdateImgListResultByPredictResult,exports.BatchUpdateResultByTrackID=BatchUpdateResultByTrackID,exports.BatchUpdateTrackID=BatchUpdateTrackID,exports.ChangeSave=ChangeSave,exports.CopyBackWordResult=CopyBackWordResult,exports.DispatcherTurning=DispatcherTurning,exports.GetBoxesByID=GetBoxesByID,exports.InitAnnotationState=InitAnnotationState,exports.InitTaskData=InitTaskData,exports.PageBackward=PageBackward,exports.PageForward=PageForward,exports.PageJump=PageJump,exports.PreDataProcess=PreDataProcess,exports.SetAnnotationLoading=SetAnnotationLoading,exports.SetLoadPCDFileLoading=SetLoadPCDFileLoading,exports.SetPointCloudLoading=SetPointCloudLoading,exports.SetPredictResult=SetPredictResult,exports.SetPredictResultVisible=SetPredictResultVisible,exports.SetTaskConfig=SetTaskConfig,exports.SetTaskStepList=SetTaskStepList,exports.ToNextStep=ToNextStep,exports.ToSubmitFileData=ToSubmitFileData,exports.UpdateBeforeRotate=UpdateBeforeRotate,exports.UpdateCheckMode=UpdateCheckMode,exports.UpdateGetFileData=UpdateGetFileData,exports.UpdateGetFileList=UpdateGetFileList,exports.UpdateHighlightAttribute=UpdateHighlightAttribute,exports.UpdateInjectFunc=UpdateInjectFunc,exports.UpdateOnPageChange=UpdateOnPageChange,exports.UpdateOnSave=UpdateOnSave,exports.UpdateOnStepChange=UpdateOnStepChange,exports.UpdateOnSubmit=UpdateOnSubmit,exports.UpdatePageSize=UpdatePageSize,exports.UpdatePreDataProcess=UpdatePreDataProcess,exports.UpdateProcessingStep=UpdateProcessingStep,exports.UpdateRotate=UpdateRotate,exports.UpdateSkipBeforePageTurning=UpdateSkipBeforePageTurning,exports.UpdateToolInstance=UpdateToolInstance,exports.loadImgList=loadImgList;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Actions=require("../Actions.js"),reducer=require("./reducer.js"),index=require("../../constant/index.js"),AnnotationSize=require("../../data/enums/AnnotationSize.js"),PageOperator=require("../../utils/PageOperator.js"),index$1=require("../../utils/index.js"),util=require("../../components/predictTracking/previewResult/util.js"),__async=(t,e,n)=>new Promise((a,r)=>{var T=s=>{try{o(n.next(s))}catch(p){r(p)}},i=s=>{try{o(n.throw(s))}catch(p){r(p)}},o=s=>s.done?a(s.value):Promise.resolve(s.value).then(T,i);o((n=n.apply(t,e)).next())});const dispatchTasks=(t,e)=>e.map(n=>t(n)),getSubmitByPageOperation=t=>t===AnnotationSize.EPageTurningOperation.Forward?index.ESubmitType.Forward:t===AnnotationSize.EPageTurningOperation.Backward?index.ESubmitType.Backward:t===AnnotationSize.EPageTurningOperation.Jump?index.ESubmitType.Jump:index.ESubmitType.Forward,getBasicIndex=(t,e)=>{var n,a,r;const{imgList:T,imgIndex:i}=t,{dataSourceStep:o}=reducer.getStepConfig(t.stepList,t.step);return((r=(a=index$1.jsonParser((n=T[i-1])==null?void 0:n.result)[`step_${o}`])==null?void 0:a.result)==null?void 0:r.length)-1||e};function UpdateToolInstance(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_TOOL_INSTANCE,payload:{toolInstance:t}}}function SetTaskStepList({stepList:t}){return{type:Actions.ANNOTATION_ACTIONS.SET_TASK_STEP_LIST,payload:{stepList:t}}}function SetTaskConfig({stepList:t,step:e}){return{type:Actions.ANNOTATION_ACTIONS.SET_TASK_CONFIG,payload:{stepList:t,step:e}}}function UpdateOnSubmit(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_SUBMIT,payload:{onSubmit:t}}}function UpdateOnSave(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_SAVE,payload:{onSave:t}}}function UpdateOnPageChange(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_PAGE_CHANGE,payload:{onPageChange:t}}}function UpdateOnStepChange(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_STEP_CHANGE,payload:{onStepChange:t}}}function UpdateGetFileData(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_GET_FILE_DATA,payload:{getFileData:t}}}function UpdatePageSize(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_PAGE_SIZE,payload:{pageSize:t}}}function UpdateGetFileList(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_LOAD_FILE_LIST,payload:{loadFileList:t}}}function UpdateRotate(){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ROTATE}}function UpdateSkipBeforePageTurning(t){return{type:Actions.ANNOTATION_ACTIONS.SKIP_BEFORE_PAGE_TURNING,payload:{skipBeforePageTurning:t}}}function UpdateBeforeRotate(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_BEFORE_ROTATE,payload:{beforeRotate:t}}}function UpdatePreDataProcess(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_PRE_DATA_PROCESS,payload:{preDataProcess:t}}}function CopyBackWordResult(){return{type:Actions.ANNOTATION_ACTIONS.COPY_BACKWARD_RESULT}}function UpdateImgIndexByExternal(t){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_IMG_INDEX_BY_EXTERNAL,payload:{getImgIndexByExternal:t}}}function BatchUpdateTrackID({id:t,newID:e,rangeIndex:n,imgList:a}){return{type:Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_TRACK_ID,payload:{id:t,newID:e,rangeIndex:n,imgList:a}}}function BatchUpdateResultByTrackID(t,e,n){return{type:Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_RESULT_BY_TRACK_ID,payload:{id:t,newData:e,rangeIndex:n}}}function BatchUpdateImgListResultByPredictResult(){return{type:Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT,payload:{}}}const UpdateCheckMode=t=>({type:Actions.ANNOTATION_ACTIONS.SET_CHECK_MODE,payload:{checkMode:t}}),UpdateHighlightAttribute=t=>({type:Actions.ANNOTATION_ACTIONS.SET_HIGHLIGHT_ATTRIBUTE,payload:{attribute:t}});function InitTaskData({onSubmit:t,onSave:e,onPageChange:n,onStepChange:a,getFileData:r,pageSize:T,loadFileList:i,step:o,stepList:s,skipBeforePageTurning:p,beforeRotate:N,checkMode:A,highlightAttribute:I,preDataProcess:d,getImgIndexByExternal:l}){const u=[];return t&&u.push(UpdateOnSubmit(t)),e&&u.push(UpdateOnSave(e)),n&&u.push(UpdateOnPageChange(n)),a&&u.push(UpdateOnStepChange(a)),r&&u.push(UpdateGetFileData(r)),i&&u.push(UpdateGetFileList(i)),T&&u.push(UpdatePageSize(T)),p&&u.push(UpdateSkipBeforePageTurning(p)),N&&u.push(UpdateBeforeRotate(N)),d&&u.push(UpdatePreDataProcess(d)),typeof A=="boolean"&&u.push(UpdateCheckMode(A)),l&&u.push(UpdateImgIndexByExternal(l)),u.push(UpdateHighlightAttribute(I)),u.push(SetTaskConfig({stepList:s,step:o})),u.push({type:Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS}),u.push({type:Actions.ANNOTATION_ACTIONS.INIT_TOOL}),O=>dispatchTasks(O,u)}function UpdateInjectFunc({onSubmit:t,onSave:e,onPageChange:n,onStepChange:a,getFileData:r,pageSize:T,loadFileList:i,stepList:o,beforeRotate:s,highlightAttribute:p,preDataProcess:N}){const A=[];return t&&A.push(UpdateOnSubmit(t)),e&&A.push(UpdateOnSave(e)),n&&A.push(UpdateOnPageChange(n)),a&&A.push(UpdateOnStepChange(a)),r&&A.push(UpdateGetFileData(r)),i&&A.push(UpdateGetFileList(i)),T&&A.push(UpdatePageSize(T)),s&&A.push(UpdateBeforeRotate(s)),N&&A.push(UpdatePreDataProcess(N)),A.push(UpdateHighlightAttribute(p)),A.push(SetTaskStepList({stepList:o})),I=>dispatchTasks(I,A)}const getNextStep=(t,e)=>{var n;const a=e==null?void 0:e.findIndex(r=>(r==null?void 0:r.step)===t);return(n=e[a+1])==null?void 0:n.step},ToNextStep=t=>(e,n)=>{const{annotation:a}=n(),{step:r,stepList:T}=a,i=getNextStep(r,T);return[e(UpdateProcessingStep(i,t))]},UpdateProcessingStep=(t,e)=>(n,a)=>{var r,T;const{annotation:i}=a();(r=i==null?void 0:i.onStepChange)==null||r.call(i,t);const o=(T=i==null?void 0:i.imgIndex)!=null?T:0;return[n({type:Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT}),n({type:Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA,payload:{submitType:index.ESubmitType.StepChanged}}),n({type:Actions.ANNOTATION_ACTIONS.SET_STEP,payload:{toStep:t}}),n({type:Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS}),n(reducer.LoadFileAndFileData(e!=null?e:o,0))]},ToSubmitFileData=t=>e=>[e({type:Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT}),e({type:Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA,payload:{submitType:t}})],SubmitAndChangeFileIndex=(t,e,n,a)=>[t(ToSubmitFileData(n)),t(reducer.LoadFileAndFileData(e,a))],ChangeBasicIndex=(t,e)=>[t({type:Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT}),t({type:Actions.ANNOTATION_ACTIONS.SET_BASIC_INDEX,payload:{basicIndex:e}})],ChangeTriggerEventAfterIndexChanged=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED,payload:{triggerEventAfterIndexChanged:e}})},PageBackward=(t=!1)=>(e,n)=>DispatcherTurning(e,n,AnnotationSize.EPageTurningOperation.Backward,t),PageForward=(t=!1)=>(e,n)=>DispatcherTurning(e,n,AnnotationSize.EPageTurningOperation.Forward,t),PageJump=(t,e=!1)=>(n,a)=>{if(t!==a().imgIndex)return DispatcherTurning(n,a,AnnotationSize.EPageTurningOperation.Jump,e,t)},loadImgList=(t,e,n,a)=>__async(void 0,null,function*(){var r;const{loadFileList:T,imgList:i,pageSize:o}=e().annotation,s=Math.floor(n/o);SetAnnotationLoading(t,!0);try{const p=yield T(s,o);if(SetAnnotationLoading(t,!1),!((r=p==null?void 0:p.fileList)==null?void 0:r.length)||!(p==null?void 0:p.total))throw new Error("fileList and total are required");const N=a?new Array(p.total):[...i];return N.splice(s*o,o,...p.fileList),t({type:Actions.ANNOTATION_ACTIONS.UPDATE_IMG_LIST,payload:{imgList:N}}),!0}catch(p){SetAnnotationLoading(t,!1),console.error(p)}}),DispatcherTurning=(t,e,n,a=!1,r)=>__async(void 0,null,function*(){var T,i;const o=e().annotation,s=getSubmitByPageOperation(n);let{fileIndexChanged:p,fileIndex:N,basicIndexChanged:A,basicIndex:I}=PageOperator.getNextPageInfo(n,o,r);const d=(T=o==null?void 0:o.getImgIndexByExternal)==null?void 0:T.call(o,o.imgIndex,s);if(d!==void 0&&(p=!0,N=d),ChangeTriggerEventAfterIndexChanged(t,a),p){if(o.loading||!o.imgList[N]&&!(yield loadImgList(t,e,N)))return;(i=o.onPageChange)==null||i.call(o,N);const l=s===index.ESubmitType.Backward?getBasicIndex(e().annotation,I):I;return SubmitAndChangeFileIndex(t,N,s,l)}return A?ChangeBasicIndex(t,I):t(ToSubmitFileData(s))}),ChangeSave=t=>{t(ToSubmitFileData(index.ESubmitType.Save)),t({type:Actions.ANNOTATION_ACTIONS.SAVE_RESULT})},SetAnnotationLoading=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_LOADING,payload:{loading:e}})},SetPointCloudLoading=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_LOADING,payload:{loading:e}})},SetLoadPCDFileLoading=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_LOADPCDFILE_LOADING,payload:{loadPCDFileLoading:e}})},InitAnnotationState=t=>{t({type:Actions.ANNOTATION_ACTIONS.INIT_ALL_STATE,payload:{}})},SetPredictResult=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_PREDICT_RESULT,payload:{result:e}})},SetPredictResultVisible=(t,e)=>{t({type:Actions.ANNOTATION_ACTIONS.SET_PREDICT_RESULT_VISIBLE,payload:{visible:e}})},GetBoxesByID=(t,e)=>(n,a)=>{const{imgList:r,step:T}=a().annotation;return util.getBoxesByTrackID(r,T,t,e)},PreDataProcess=t=>(e,n)=>{var a,r;const{annotation:T}=n();return(r=(a=T==null?void 0:T.preDataProcess)==null?void 0:a.call(T,t))!=null?r:t.dataList};exports.BatchUpdateImgListResultByPredictResult=BatchUpdateImgListResultByPredictResult,exports.BatchUpdateResultByTrackID=BatchUpdateResultByTrackID,exports.BatchUpdateTrackID=BatchUpdateTrackID,exports.ChangeSave=ChangeSave,exports.CopyBackWordResult=CopyBackWordResult,exports.DispatcherTurning=DispatcherTurning,exports.GetBoxesByID=GetBoxesByID,exports.InitAnnotationState=InitAnnotationState,exports.InitTaskData=InitTaskData,exports.PageBackward=PageBackward,exports.PageForward=PageForward,exports.PageJump=PageJump,exports.PreDataProcess=PreDataProcess,exports.SetAnnotationLoading=SetAnnotationLoading,exports.SetLoadPCDFileLoading=SetLoadPCDFileLoading,exports.SetPointCloudLoading=SetPointCloudLoading,exports.SetPredictResult=SetPredictResult,exports.SetPredictResultVisible=SetPredictResultVisible,exports.SetTaskConfig=SetTaskConfig,exports.SetTaskStepList=SetTaskStepList,exports.ToNextStep=ToNextStep,exports.ToSubmitFileData=ToSubmitFileData,exports.UpdateBeforeRotate=UpdateBeforeRotate,exports.UpdateCheckMode=UpdateCheckMode,exports.UpdateGetFileData=UpdateGetFileData,exports.UpdateGetFileList=UpdateGetFileList,exports.UpdateHighlightAttribute=UpdateHighlightAttribute,exports.UpdateImgIndexByExternal=UpdateImgIndexByExternal,exports.UpdateInjectFunc=UpdateInjectFunc,exports.UpdateOnPageChange=UpdateOnPageChange,exports.UpdateOnSave=UpdateOnSave,exports.UpdateOnStepChange=UpdateOnStepChange,exports.UpdateOnSubmit=UpdateOnSubmit,exports.UpdatePageSize=UpdatePageSize,exports.UpdatePreDataProcess=UpdatePreDataProcess,exports.UpdateProcessingStep=UpdateProcessingStep,exports.UpdateRotate=UpdateRotate,exports.UpdateSkipBeforePageTurning=UpdateSkipBeforePageTurning,exports.UpdateToolInstance=UpdateToolInstance,exports.loadImgList=loadImgList;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index$2=require("../../components/customResizeHook/index.js"),index$1=require("../../constant/index.js"),styleString=require("../../constant/styleString.js"),Actions=require("../Actions.js"),index=require("../../utils/index.js"),AnnotationDataUtils=require("../../utils/AnnotationDataUtils.js"),ConfigUtils=require("../../utils/ConfigUtils.js"),data=require("../../utils/data.js"),StepUtils=require("../../utils/StepUtils.js"),ToolUtils=require("../../utils/ToolUtils.js"),lbAnnotation=require("@labelbee/lb-annotation"),lbUtils=require("@labelbee/lb-utils"),antd=require("antd"),es=require("antd/es"),_=require("lodash"),actionCreators=require("./actionCreators.js"),ToolType=require("../../data/enums/ToolType.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var ___default=_interopDefaultLegacy(_),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,s)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,__spreadValues=(e,t)=>{for(var s in t||(t={}))__hasOwnProp.call(t,s)&&__defNormalProp(e,s,t[s]);if(__getOwnPropSymbols)for(var s of __getOwnPropSymbols(t))__propIsEnum.call(t,s)&&__defNormalProp(e,s,t[s]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t)),__async=(e,t,s)=>new Promise((g,u)=>{var S=I=>{try{N(s.next(I))}catch(m){u(m)}},A=I=>{try{N(s.throw(I))}catch(m){u(m)}},N=I=>I.done?g(I.value):Promise.resolve(I.value).then(S,A);N((s=s.apply(e,t)).next())});const getStepConfig=(e,t)=>e.find(s=>s.step===t),initialState={annotationEngine:null,toolInstance:null,imgList:[],config:"{}",imgIndex:-1,basicIndex:0,imgPageSize:1,step:1,stepList:[],imgNode:new Image,basicResultList:[],resultList:[],stepProgress:0,loading:!1,loadPCDFileLoading:!0,triggerEventAfterIndexChanged:!1,pointCloudLoading:!1,checkMode:!1,predictionResult:[],predictionResultVisible:!1,highlightAttribute:""},getTotalPage=e=>{const{imgList:t,imgPageSize:s}=e;return Math.ceil(t.length/s)},calcStepProgress=(e,t)=>e.reduce((s,g)=>{if(g){const u=g.result;if(index.jsonParser(u)[`step_${t}`])return s+1}return s},0)/e.length,updateToolInstance=(e,t)=>{const{step:s,stepList:g}=e,u=StepUtils.getCurrentStepInfo(s,g),S=ConfigUtils.ConfigUtils.jsonParser(u.config);if(ToolUtils.isVideoTool(u==null?void 0:u.tool)||ToolUtils.isAudioTool(u==null?void 0:u.tool)||ToolUtils.isPointCloudTool(u==null?void 0:u.tool)||[ToolType.EToolName.LLM,ToolType.EToolName.NLP].includes(u==null?void 0:u.tool))return;const A=document.getElementById("toolContainer");if(!A)throw"Not exist dom named id-toolContainer";const N=index$2.getFormatSize({width:window.innerWidth,height:window.innerHeight}),I=new lbAnnotation.AnnotationEngine({container:A,toolName:u.tool,size:N,imgNode:t,config:S,style:JSON.parse(styleString)});return{toolInstance:I==null?void 0:I.toolInstance,annotationEngine:I}},LoadFileAndFileData=(e,t)=>(s,g)=>__async(void 0,null,function*(){var u,S;const{stepList:A,step:N}=g().annotation,I=StepUtils.currentToolIsVideo(N,A),m=StepUtils.currentToolIsPointCloud(N,A),D=((u=StepUtils.getCurrentStepInfo(N,A))==null?void 0:u.tool)===ToolType.EToolName.LLM,y=((S=StepUtils.getCurrentStepInfo(N,A))==null?void 0:S.tool)===ToolType.EToolName.NLP,P=StepUtils.currentToolIsAudio(N,A);if(actionCreators.SetAnnotationLoading(s,!0),yield s(TryGetFileDataByAPI(e)),I){s(AfterVideoLoaded(e));return}if(m||D||P||y){s(AfterCommonLoaded(e));return}s(AfterImageLoaded(e,t))}),TryGetFileDataByAPI=e=>(t,s)=>__async(void 0,null,function*(){const{getFileData:g,imgList:u}=s().annotation;if(g){const S=yield g(u[e],e);t({type:Actions.ANNOTATION_ACTIONS.SET_FILE_DATA,payload:{fileData:S,index:e}})}}),AfterVideoLoaded=e=>t=>{t({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e}})},AfterCommonLoaded=e=>t=>{actionCreators.SetAnnotationLoading(t,!1),t({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e}})},AfterImageLoaded=(e,t)=>(s,g)=>{var u;const{toolInstance:S,imgList:A}=g().annotation,N=(u=A==null?void 0:A[e])==null?void 0:u.url;lbAnnotation.ImgUtils.load(N).then(I=>{actionCreators.SetAnnotationLoading(s,!1),s({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{imgNode:I,nextIndex:e,nextBasicIndex:t}})}).catch(()=>{actionCreators.SetAnnotationLoading(s,!1),S==null||S.setErrorImg(),s({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e,nextBasicIndex:t}})})},composeResultByToolInstance=({toolInstance:e,imgList:t,imgIndex:s,stepList:g,step:u=1})=>{var S,A,N,I;const m=((S=t[s])==null?void 0:S.result)||"",[D,y,P]=(A=e==null?void 0:e.exportData())!=null?A:[],x=(I=(N=e==null?void 0:e.exportCustomData)==null?void 0:N.call(e))!=null?I:{},B=data.composeResultWithBasicImgInfo(m,y),w=data.composeResult(B,{step:u,stepList:g},{rect:D},x);return t.map((b,F)=>F===s?__spreadValues(__spreadProps(__spreadValues({},b),{result:w}),P):__spreadValues({},b))},annotationReducer=(e=__spreadValues({},initialState),t)=>{var s,g,u,S,A,N,I,m,D,y,P,x,B,w,b,F,G,V,M,q,k,H,z,K,W;switch(t.type){case Actions.ANNOTATION_ACTIONS.INIT_ALL_STATE:return __spreadValues(__spreadValues({},e),initialState);case Actions.ANNOTATION_ACTIONS.UPDATE_TOOL_INSTANCE:return __spreadProps(__spreadValues({},e),{toolInstance:t.payload.toolInstance});case Actions.ANNOTATION_ACTIONS.UPDATE_IMG_LIST:return __spreadProps(__spreadValues({},e),{imgList:t.payload.imgList});case Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS:{const{imgList:n,step:o}=e,l=calcStepProgress(n,o);return __spreadProps(__spreadValues({},e),{stepProgress:l})}case Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA:{const{imgList:n,imgIndex:o,step:l,stepList:i,toolInstance:a,onSubmit:r,resultList:p}=e;if(!a||!n[o])return e;const d=((s=n[o])==null?void 0:s.result)||"",[,c,T]=(g=a==null?void 0:a.exportData())!=null?g:[],O=(S=(u=a==null?void 0:a.exportCustomData)==null?void 0:u.call(a))!=null?S:{},f=data.composeResultWithBasicImgInfo(d,c),C=data.composeResult(f,{step:l,stepList:i},{rect:p},O),L=e.imgList.map((v,E)=>{if(E===o){const U=AnnotationDataUtils.dataCorrection(C,d,l,i);return __spreadValues(__spreadProps(__spreadValues({},v),{result:U}),T)}return v});if(((A=t.payload)==null?void 0:A.submitType)===index$1.ESubmitType.SyncImgList)return __spreadProps(__spreadValues({},e),{imgList:L});r&&r([L[o]],(N=t.payload)==null?void 0:N.submitType,o,L);const R=calcStepProgress(L,l);return __spreadProps(__spreadValues({},e),{stepProgress:R,imgList:L})}case Actions.ANNOTATION_ACTIONS.SAVE_RESULT:{const{imgList:n,imgIndex:o,onSave:l}=e;return l==null||l(n[o],o,n),__spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT:{const{imgList:n,basicIndex:o,resultList:l,toolInstance:i,basicResultList:a}=e;if(!i)return e;const[r]=(I=i==null?void 0:i.exportData())!=null?I:[];let p=r;if((a==null?void 0:a.length)>0){const d=(m=a[o])==null?void 0:m.id,c=r.map(T=>__spreadProps(__spreadValues({},T),{sourceID:d}));p=___default.default.cloneDeep(l).filter(T=>T.sourceID!==d),p.push(...c)}return __spreadProps(__spreadValues({},e),{resultList:p,imgList:n})}case Actions.ANNOTATION_ACTIONS.SET_BASIC_INDEX:{const{toolInstance:n,step:o,imgList:l,imgIndex:i,stepList:a,annotationEngine:r,resultList:p,basicResultList:d}=e;if(!n||!r)return e;const c=t.payload.basicIndex,T=(D=d[c])==null?void 0:D.id,O=index.jsonParser((y=l[i])==null?void 0:y.result),f=(p||[]).filter(U=>U.sourceID===T),C=getStepConfig(a,o),{dataSourceStep:L,tool:R}=C,v=getStepConfig(a,L);let E=[];return L&&R&&(E=(P=O[`step_${L}`])==null?void 0:P.result,(E==null?void 0:E.length)>0?(r==null||r.setBasicInfo(v.tool,E[c]),r==null||r.launchOperation()):(r==null||r.setBasicInfo(v.tool),r==null||r.forbidOperation(),es.message.info(lbUtils.i18n.t("NoDependency")))),n==null||n.setResult(f),n==null||n.history.initRecord(f,!0),__spreadProps(__spreadValues({},e),{basicIndex:c})}case Actions.ANNOTATION_ACTIONS.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED:{const{triggerEventAfterIndexChanged:n}=t.payload;return __spreadProps(__spreadValues({},e),{triggerEventAfterIndexChanged:!!n})}case Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA:{const{imgList:n,step:o,toolInstance:l,annotationEngine:i,stepList:a}=e;if(!l)return __spreadProps(__spreadValues({},e),{imgIndex:t.payload.nextIndex});const r=StepUtils.getCurrentStepInfo(o,a),{nextIndex:p,imgNode:d,nextBasicIndex:c,imgError:T}=t.payload,O=c!=null?c:0,f=index.jsonParser((x=n[p])==null?void 0:x.result),C=f[`step_${r.step}`],L=!C,R={rotate:(B=f.rotate)!=null?B:0,valid:(w=f.valid)!=null?w:!0};d&&T!==!0?i==null||i.setImgNode(d,R):l==null||l.setValid(R.valid);const v=getStepConfig(a,r.step),{dataSourceStep:E,tool:U}=v,$=getStepConfig(a,E),Y=E&&U,h=(F=(b=f[`step_${E}`])==null?void 0:b.result)!=null?F:[],j=AnnotationDataUtils.getInitialResultList(C==null?void 0:C.result,l,v,h,L);if(i==null||i.launchOperation(),Y&&((h==null?void 0:h.length)>0?i==null||i.setBasicInfo($.tool,h[O]):(i==null||i.setBasicInfo($.tool),i==null||i.forbidOperation(),es.message.info(lbUtils.i18n.t("NoDependency")))),r.tool!=="check"){const J=(V=(G=h[O])==null?void 0:G.id)!=null?V:"",X=Y?j.filter(Z=>lbAnnotation.CommonToolUtils.isSameSourceID(Z.sourceID,J)):j;(M=l==null?void 0:l.history)==null||M.initRecord(j,!0),l==null||l.setResult(X)}return __spreadProps(__spreadValues({},e),{imgIndex:p,basicIndex:O,basicResultList:h,resultList:j})}case Actions.ANNOTATION_ACTIONS.UPDATE_ANNOTATION_CONFIG:return __spreadProps(__spreadValues({},e),{config:(q=t.payload.config)!=null?q:"{}"});case Actions.ANNOTATION_ACTIONS.SET_TASK_STEP_LIST:{const{stepList:n}=t.payload;return __spreadProps(__spreadValues({},e),{stepList:n})}case Actions.ANNOTATION_ACTIONS.SET_TASK_CONFIG:{const{stepList:n,step:o}=t.payload;return __spreadProps(__spreadValues({},e),{stepList:n,step:o})}case Actions.ANNOTATION_ACTIONS.INIT_TOOL:{const{imgNode:n}=e,o=updateToolInstance(e,n);if(o){const{toolInstance:l,annotationEngine:i}=o;return __spreadProps(__spreadValues({},e),{toolInstance:l,annotationEngine:i})}return __spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.SET_TOOL:{const n=(k=t.payload)==null?void 0:k.instance;return n?__spreadProps(__spreadValues({},e),{toolInstance:n}):__spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.UPDATE_ON_SUBMIT:return __spreadProps(__spreadValues({},e),{onSubmit:t.payload.onSubmit});case Actions.ANNOTATION_ACTIONS.UPDATE_ON_SAVE:return __spreadProps(__spreadValues({},e),{onSave:t.payload.onSave});case Actions.ANNOTATION_ACTIONS.UPDATE_ON_PAGE_CHANGE:return __spreadProps(__spreadValues({},e),{onPageChange:t.payload.onPageChange});case Actions.ANNOTATION_ACTIONS.SET_PREDICT_RESULT:return __spreadProps(__spreadValues({},e),{predictionResult:t.payload.result});case Actions.ANNOTATION_ACTIONS.SET_PREDICT_RESULT_VISIBLE:return __spreadProps(__spreadValues({},e),{predictionResultVisible:t.payload.visible});case Actions.ANNOTATION_ACTIONS.UPDATE_ON_STEP_CHANGE:return __spreadProps(__spreadValues({},e),{onStepChange:t.payload.onStepChange});case Actions.ANNOTATION_ACTIONS.UPDATE_GET_FILE_DATA:return __spreadProps(__spreadValues({},e),{getFileData:t.payload.getFileData});case Actions.ANNOTATION_ACTIONS.UPDATE_PAGE_SIZE:return __spreadProps(__spreadValues({},e),{pageSize:t.payload.pageSize});case Actions.ANNOTATION_ACTIONS.UPDATE_LOAD_FILE_LIST:return __spreadProps(__spreadValues({},e),{loadFileList:t.payload.loadFileList});case Actions.ANNOTATION_ACTIONS.UPDATE_BEFORE_ROTATE:return __spreadProps(__spreadValues({},e),{beforeRotate:t.payload.beforeRotate});case Actions.ANNOTATION_ACTIONS.UPDATE_PRE_DATA_PROCESS:return __spreadProps(__spreadValues({},e),{preDataProcess:t.payload.preDataProcess});case Actions.ANNOTATION_ACTIONS.SKIP_BEFORE_PAGE_TURNING:return __spreadProps(__spreadValues({},e),{skipBeforePageTurning:t.payload.skipBeforePageTurning});case Actions.ANNOTATION_ACTIONS.SET_FILE_DATA:{const{fileData:n,index:o}=t.payload,{imgList:l}=e,i=[...l];return i[o]=__spreadValues(__spreadValues({},i[o]),n),__spreadProps(__spreadValues({},e),{imgList:i})}case Actions.ANNOTATION_ACTIONS.UPDATE_ROTATE:{const{toolInstance:n,beforeRotate:o}=e;return o&&o()===!1||(H=n==null?void 0:n.updateRotate)==null||H.call(n),e}case Actions.ANNOTATION_ACTIONS.UPDATE_ANNOTATION_VALID:{const{toolInstance:n}=e,o=(z=n==null?void 0:n.valid)!=null?z:!0;return antd.Modal.destroyAll(),antd.Modal.confirm({content:lbUtils.i18n.t(o?"updateValidFromValidToInValid":"updateValidFromInValidToValid"),onOk:()=>{n==null||n.setValid(!o)},okText:lbUtils.i18n.t("Confirm"),cancelText:lbUtils.i18n.t("Cancel")}),e}case Actions.ANNOTATION_ACTIONS.COPY_BACKWARD_RESULT:{const{toolInstance:n,imgIndex:o,imgList:l,step:i}=e;if(!n)return e;if(o===0||o>=l.length)return console.error("\u65E0\u6CD5\u590D\u5236\u8FB9\u754C\u5916\u7684\u5185\u5BB9"),e;const a=l[o-1].result;if(!a)return e;const r=AnnotationDataUtils.copyResultChange(a,i,(K=l[o].result)!=null?K:"");l[o]=__spreadProps(__spreadValues({},l[o]),{result:r});const d=index.jsonParser(r)[`step_${i}`],c=(d==null?void 0:d.result)||[];return n==null||n.setResult(c),n==null||n.history.pushHistory(c),(W=n==null?void 0:n.asyncData)==null||W.call(n,l[o]),__spreadProps(__spreadValues({},e),{imgList:[...l]})}case Actions.ANNOTATION_ACTIONS.SET_STEP:{const{stepList:n,annotationEngine:o}=e,{toStep:l}=t.payload;if(!o)return e;const i=getStepConfig(n,l);return o==null||o.setToolName(i.tool,i.config),__spreadProps(__spreadValues({},e),{step:l,toolInstance:o==null?void 0:o.toolInstance})}case Actions.ANNOTATION_ACTIONS.SET_LOADPCDFILE_LOADING:{const{loadPCDFileLoading:n}=t.payload;return __spreadProps(__spreadValues({},e),{loadPCDFileLoading:!!n})}case Actions.ANNOTATION_ACTIONS.SET_LOADING:{const{loading:n}=t.payload;return __spreadProps(__spreadValues({},e),{loading:!!n})}case Actions.ANNOTATION_ACTIONS.SET_POINT_CLOUD_LOADING:{const{pointCloudLoading:n}=t.payload;return __spreadProps(__spreadValues({},e),{pointCloudLoading:!!n})}case Actions.ANNOTATION_ACTIONS.SET_CHECK_MODE:{const{checkMode:n}=t.payload;return __spreadProps(__spreadValues({},e),{checkMode:!!n})}case Actions.ANNOTATION_ACTIONS.SET_HIGHLIGHT_ATTRIBUTE:{const{attribute:n}=t.payload;return __spreadProps(__spreadValues({},e),{highlightAttribute:n})}case Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_TRACK_ID:{const{id:n,newID:o,rangeIndex:l,imgList:i}=t.payload,{imgIndex:a,onSubmit:r}=e,p=[],d=i.map((c,T)=>{if(lbAnnotation.MathUtils.isInRange(T,l)){const O=__spreadProps(__spreadValues({},c),{result:lbUtils.PointCloudUtils.batchUpdateTrackID({id:n,newID:o,result:c.result})});return p.push({imgIndex:T,newInfo:O}),O}return c});return r&&r([d[a]],index$1.ESubmitType.BatchUpdateTrackID,a,d,{updateImgList:p}),__spreadProps(__spreadValues({},e),{imgList:d})}case Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_RESULT_BY_TRACK_ID:{const{id:n,newData:o,rangeIndex:l}=t.payload,{imgList:i,imgIndex:a,onSubmit:r}=e,p=[],d=i.map((c,T)=>{if(lbAnnotation.MathUtils.isInRange(T,l)){const O=__spreadProps(__spreadValues({},c),{result:lbUtils.PointCloudUtils.batchUpdateResultByTrackID({id:n,newData:o,result:c.result})});return p.push({imgIndex:T,newInfo:O}),O}return c});return r&&r([d[a]],index$1.ESubmitType.BatchUpdateTrackID,a,d,{updateImgList:p}),__spreadProps(__spreadValues({},e),{imgList:d})}case Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT:{const{onSubmit:n,imgList:o,stepList:l,step:i,predictionResult:a}=e,r={};a.forEach(T=>{const{index:O}=T;r[O]=___default.default.pick(T,["center","width","height","depth","rotation","id","attribute","valid","trackID"])});const p=`step_${i}`,d=[],c=o.map((T,O)=>{if(r[O]){const f=T.result==="{}"?index.jsonParser(data.composeResult("",{step:i,stepList:l},{rect:[]},{})):index.jsonParser(T.result);f[p].result.push(r[O]);const C=__spreadProps(__spreadValues({},T),{result:JSON.stringify(f)});return d.push({imgIndex:O,newInfo:C}),C}return T});return n==null||n(c,index$1.ESubmitType.BatchUpdateImgList,-1,c,{updateImgList:d}),__spreadProps(__spreadValues({},e),{imgList:c})}default:return e}};exports.LoadFileAndFileData=LoadFileAndFileData,exports.annotationReducer=annotationReducer,exports.composeResultByToolInstance=composeResultByToolInstance,exports.getStepConfig=getStepConfig,exports.getTotalPage=getTotalPage;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index$2=require("../../components/customResizeHook/index.js"),index$1=require("../../constant/index.js"),styleString=require("../../constant/styleString.js"),Actions=require("../Actions.js"),index=require("../../utils/index.js"),AnnotationDataUtils=require("../../utils/AnnotationDataUtils.js"),ConfigUtils=require("../../utils/ConfigUtils.js"),data=require("../../utils/data.js"),StepUtils=require("../../utils/StepUtils.js"),ToolUtils=require("../../utils/ToolUtils.js"),lbAnnotation=require("@labelbee/lb-annotation"),lbUtils=require("@labelbee/lb-utils"),antd=require("antd"),es=require("antd/es"),_=require("lodash"),actionCreators=require("./actionCreators.js"),ToolType=require("../../data/enums/ToolType.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var ___default=_interopDefaultLegacy(_),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,l)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[t]=l,__spreadValues=(e,t)=>{for(var l in t||(t={}))__hasOwnProp.call(t,l)&&__defNormalProp(e,l,t[l]);if(__getOwnPropSymbols)for(var l of __getOwnPropSymbols(t))__propIsEnum.call(t,l)&&__defNormalProp(e,l,t[l]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t)),__async=(e,t,l)=>new Promise((g,u)=>{var S=I=>{try{O(l.next(I))}catch(E){u(E)}},p=I=>{try{O(l.throw(I))}catch(E){u(E)}},O=I=>I.done?g(I.value):Promise.resolve(I.value).then(S,p);O((l=l.apply(e,t)).next())});const getStepConfig=(e,t)=>e.find(l=>l.step===t),initialState={annotationEngine:null,toolInstance:null,imgList:[],config:"{}",imgIndex:-1,basicIndex:0,imgPageSize:1,step:1,stepList:[],imgNode:new Image,basicResultList:[],resultList:[],stepProgress:0,loading:!1,loadPCDFileLoading:!0,triggerEventAfterIndexChanged:!1,pointCloudLoading:!1,checkMode:!1,predictionResult:[],predictionResultVisible:!1,highlightAttribute:""},getTotalPage=e=>{const{imgList:t,imgPageSize:l}=e;return Math.ceil(t.length/l)},calcStepProgress=(e,t)=>e.reduce((l,g)=>{if(g){const u=g.result;if(index.jsonParser(u)[`step_${t}`])return l+1}return l},0)/e.length,updateToolInstance=(e,t)=>{const{step:l,stepList:g}=e,u=StepUtils.getCurrentStepInfo(l,g),S=ConfigUtils.ConfigUtils.jsonParser(u.config);if(ToolUtils.isVideoTool(u==null?void 0:u.tool)||ToolUtils.isAudioTool(u==null?void 0:u.tool)||ToolUtils.isPointCloudTool(u==null?void 0:u.tool)||[ToolType.EToolName.LLM,ToolType.EToolName.NLP].includes(u==null?void 0:u.tool))return;const p=document.getElementById("toolContainer");if(!p)throw"Not exist dom named id-toolContainer";const O=index$2.getFormatSize({width:window.innerWidth,height:window.innerHeight}),I=new lbAnnotation.AnnotationEngine({container:p,toolName:u.tool,size:O,imgNode:t,config:S,style:JSON.parse(styleString)});return{toolInstance:I==null?void 0:I.toolInstance,annotationEngine:I}},LoadFileAndFileData=(e,t)=>(l,g)=>__async(void 0,null,function*(){var u,S;const{stepList:p,step:O}=g().annotation,I=StepUtils.currentToolIsVideo(O,p),E=StepUtils.currentToolIsPointCloud(O,p),D=((u=StepUtils.getCurrentStepInfo(O,p))==null?void 0:u.tool)===ToolType.EToolName.LLM,y=((S=StepUtils.getCurrentStepInfo(O,p))==null?void 0:S.tool)===ToolType.EToolName.NLP,P=StepUtils.currentToolIsAudio(O,p);if(actionCreators.SetAnnotationLoading(l,!0),yield l(TryGetFileDataByAPI(e)),I){l(AfterVideoLoaded(e));return}if(E||D||P||y){l(AfterCommonLoaded(e));return}l(AfterImageLoaded(e,t))}),TryGetFileDataByAPI=e=>(t,l)=>__async(void 0,null,function*(){const{getFileData:g,imgList:u}=l().annotation;if(g){const S=yield g(u[e],e);t({type:Actions.ANNOTATION_ACTIONS.SET_FILE_DATA,payload:{fileData:S,index:e}})}}),AfterVideoLoaded=e=>t=>{t({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e}})},AfterCommonLoaded=e=>t=>{actionCreators.SetAnnotationLoading(t,!1),t({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e}})},AfterImageLoaded=(e,t)=>(l,g)=>{var u;const{toolInstance:S,imgList:p}=g().annotation,O=(u=p==null?void 0:p[e])==null?void 0:u.url;lbAnnotation.ImgUtils.load(O).then(I=>{actionCreators.SetAnnotationLoading(l,!1),l({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{imgNode:I,nextIndex:e,nextBasicIndex:t}})}).catch(()=>{actionCreators.SetAnnotationLoading(l,!1),S==null||S.setErrorImg(),l({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e,nextBasicIndex:t}})})},composeResultByToolInstance=({toolInstance:e,imgList:t,imgIndex:l,stepList:g,step:u=1})=>{var S,p,O,I;const E=((S=t[l])==null?void 0:S.result)||"",[D,y,P]=(p=e==null?void 0:e.exportData())!=null?p:[],x=(I=(O=e==null?void 0:e.exportCustomData)==null?void 0:O.call(e))!=null?I:{},B=data.composeResultWithBasicImgInfo(E,y),w=data.composeResult(B,{step:u,stepList:g},{rect:D},x);return t.map((b,F)=>F===l?__spreadValues(__spreadProps(__spreadValues({},b),{result:w}),P):__spreadValues({},b))},annotationReducer=(e=__spreadValues({},initialState),t)=>{var l,g,u,S,p,O,I,E,D,y,P,x,B,w,b,F,G,M,V,q,k,H,z,K,W,$,X,Y,J;switch(t.type){case Actions.ANNOTATION_ACTIONS.INIT_ALL_STATE:return __spreadValues(__spreadValues({},e),initialState);case Actions.ANNOTATION_ACTIONS.UPDATE_TOOL_INSTANCE:return __spreadProps(__spreadValues({},e),{toolInstance:t.payload.toolInstance});case Actions.ANNOTATION_ACTIONS.UPDATE_IMG_LIST:return __spreadProps(__spreadValues({},e),{imgList:t.payload.imgList});case Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS:{const{imgList:n,step:o}=e,s=calcStepProgress(n,o);return __spreadProps(__spreadValues({},e),{stepProgress:s})}case Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA:{const{imgList:n,imgIndex:o,step:s,stepList:i,toolInstance:a,onSubmit:r,resultList:A}=e;if(!a||!n[o])return e;const T=((l=n[o])==null?void 0:l.result)||"",[,d,c]=(g=a==null?void 0:a.exportData())!=null?g:[],N=(S=(u=a==null?void 0:a.exportCustomData)==null?void 0:u.call(a))!=null?S:{},f=data.composeResultWithBasicImgInfo(T,d),L=data.composeResult(f,{step:s,stepList:i},{rect:A},N),m=e.imgList.map((v,C)=>{if(C===o){const U=AnnotationDataUtils.dataCorrection(L,T,s,i);return __spreadValues(__spreadProps(__spreadValues({},v),{result:U}),c)}return v});if(((p=t.payload)==null?void 0:p.submitType)===index$1.ESubmitType.SyncImgList)return __spreadProps(__spreadValues({},e),{imgList:m});r&&r([m[o]],(O=t.payload)==null?void 0:O.submitType,o,m);const R=calcStepProgress(m,s);return __spreadProps(__spreadValues({},e),{stepProgress:R,imgList:m})}case Actions.ANNOTATION_ACTIONS.SAVE_RESULT:{const{imgList:n,imgIndex:o,onSave:s}=e;return s==null||s(n[o],o,n),__spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT:{const{imgList:n,basicIndex:o,resultList:s,toolInstance:i,basicResultList:a}=e;if(!i)return e;const[r]=(I=i==null?void 0:i.exportData())!=null?I:[];let A=r;if((a==null?void 0:a.length)>0){const T=(E=a[o])==null?void 0:E.id,d=r.map(c=>__spreadProps(__spreadValues({},c),{sourceID:T}));A=___default.default.cloneDeep(s).filter(c=>c.sourceID!==T),A.push(...d)}return __spreadProps(__spreadValues({},e),{resultList:A,imgList:n})}case Actions.ANNOTATION_ACTIONS.SET_BASIC_INDEX:{const{toolInstance:n,step:o,imgList:s,imgIndex:i,stepList:a,annotationEngine:r,resultList:A,basicResultList:T}=e;if(!n||!r)return e;const d=t.payload.basicIndex,c=(D=T[d])==null?void 0:D.id,N=index.jsonParser((y=s[i])==null?void 0:y.result),f=(A||[]).filter(U=>U.sourceID===c),L=getStepConfig(a,o),{dataSourceStep:m,tool:R}=L,v=getStepConfig(a,m);let C=[];return m&&R&&(C=(P=N[`step_${m}`])==null?void 0:P.result,(C==null?void 0:C.length)>0?(r==null||r.setBasicInfo(v.tool,C[d]),r==null||r.launchOperation()):(r==null||r.setBasicInfo(v.tool),r==null||r.forbidOperation(),es.message.info(lbUtils.i18n.t("NoDependency")))),n==null||n.setResult(f),n==null||n.history.initRecord(f,!0),__spreadProps(__spreadValues({},e),{basicIndex:d})}case Actions.ANNOTATION_ACTIONS.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED:{const{triggerEventAfterIndexChanged:n}=t.payload;return __spreadProps(__spreadValues({},e),{triggerEventAfterIndexChanged:!!n})}case Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA:{const{imgList:n,step:o,toolInstance:s,annotationEngine:i,stepList:a}=e;if(!s)return __spreadProps(__spreadValues({},e),{imgIndex:t.payload.nextIndex});const r=StepUtils.getCurrentStepInfo(o,a),{nextIndex:A,imgNode:T,nextBasicIndex:d,imgError:c}=t.payload,N=d!=null?d:0,f=index.jsonParser((x=n[A])==null?void 0:x.result),L=f[`step_${r.step}`],m=!L,R={rotate:(B=f.rotate)!=null?B:0,valid:(w=f.valid)!=null?w:!0};T&&c!==!0?i==null||i.setImgNode(T,R):s==null||s.setValid(R.valid);const v=getStepConfig(a,r.step),{dataSourceStep:C,tool:U}=v,Z=getStepConfig(a,C),Q=C&&U,h=(F=(b=f[`step_${C}`])==null?void 0:b.result)!=null?F:[],j=AnnotationDataUtils.getInitialResultList(L==null?void 0:L.result,s,v,h,m);if(i==null||i.launchOperation(),Q&&((h==null?void 0:h.length)>0?i==null||i.setBasicInfo(Z.tool,h[N]):(i==null||i.setBasicInfo(Z.tool),i==null||i.forbidOperation(),es.message.info(lbUtils.i18n.t("NoDependency")))),r.tool!=="check"){const ee=(M=(G=h[N])==null?void 0:G.id)!=null?M:"",te=Q?j.filter(ne=>lbAnnotation.CommonToolUtils.isSameSourceID(ne.sourceID,ee)):j;(V=s==null?void 0:s.history)==null||V.initRecord(j,!0),s==null||s.setResult(te)}return __spreadProps(__spreadValues({},e),{imgIndex:A,basicIndex:N,basicResultList:h,resultList:j})}case Actions.ANNOTATION_ACTIONS.UPDATE_ANNOTATION_CONFIG:return __spreadProps(__spreadValues({},e),{config:(q=t.payload.config)!=null?q:"{}"});case Actions.ANNOTATION_ACTIONS.SET_TASK_STEP_LIST:{const{stepList:n}=t.payload;return __spreadProps(__spreadValues({},e),{stepList:n})}case Actions.ANNOTATION_ACTIONS.SET_TASK_CONFIG:{const{stepList:n,step:o}=t.payload;return __spreadProps(__spreadValues({},e),{stepList:n,step:o})}case Actions.ANNOTATION_ACTIONS.INIT_TOOL:{const{imgNode:n}=e,o=updateToolInstance(e,n);if(o){const{toolInstance:s,annotationEngine:i}=o;return __spreadProps(__spreadValues({},e),{toolInstance:s,annotationEngine:i})}return __spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.SET_TOOL:{const n=(k=t.payload)==null?void 0:k.instance;return n?__spreadProps(__spreadValues({},e),{toolInstance:n}):__spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.UPDATE_ON_SUBMIT:return __spreadProps(__spreadValues({},e),{onSubmit:t.payload.onSubmit});case Actions.ANNOTATION_ACTIONS.UPDATE_ON_SAVE:return __spreadProps(__spreadValues({},e),{onSave:t.payload.onSave});case Actions.ANNOTATION_ACTIONS.UPDATE_ON_PAGE_CHANGE:return __spreadProps(__spreadValues({},e),{onPageChange:t.payload.onPageChange});case Actions.ANNOTATION_ACTIONS.SET_PREDICT_RESULT:return __spreadProps(__spreadValues({},e),{predictionResult:t.payload.result});case Actions.ANNOTATION_ACTIONS.SET_PREDICT_RESULT_VISIBLE:return __spreadProps(__spreadValues({},e),{predictionResultVisible:t.payload.visible});case Actions.ANNOTATION_ACTIONS.UPDATE_ON_STEP_CHANGE:return __spreadProps(__spreadValues({},e),{onStepChange:t.payload.onStepChange});case Actions.ANNOTATION_ACTIONS.UPDATE_GET_FILE_DATA:return __spreadProps(__spreadValues({},e),{getFileData:t.payload.getFileData});case Actions.ANNOTATION_ACTIONS.UPDATE_PAGE_SIZE:return __spreadProps(__spreadValues({},e),{pageSize:t.payload.pageSize});case Actions.ANNOTATION_ACTIONS.UPDATE_LOAD_FILE_LIST:return __spreadProps(__spreadValues({},e),{loadFileList:t.payload.loadFileList});case Actions.ANNOTATION_ACTIONS.UPDATE_BEFORE_ROTATE:return __spreadProps(__spreadValues({},e),{beforeRotate:t.payload.beforeRotate});case Actions.ANNOTATION_ACTIONS.UPDATE_PRE_DATA_PROCESS:return __spreadProps(__spreadValues({},e),{preDataProcess:t.payload.preDataProcess});case Actions.ANNOTATION_ACTIONS.UPDATE_IMG_INDEX_BY_EXTERNAL:return __spreadProps(__spreadValues({},e),{getImgIndexByExternal:t.payload.getImgIndexByExternal});case Actions.ANNOTATION_ACTIONS.SKIP_BEFORE_PAGE_TURNING:return __spreadProps(__spreadValues({},e),{skipBeforePageTurning:t.payload.skipBeforePageTurning});case Actions.ANNOTATION_ACTIONS.SET_FILE_DATA:{const{fileData:n,index:o}=t.payload,{imgList:s}=e,i=[...s];return i[o]=__spreadValues(__spreadValues({},i[o]),n),__spreadProps(__spreadValues({},e),{imgList:i})}case Actions.ANNOTATION_ACTIONS.UPDATE_ROTATE:{const{toolInstance:n,beforeRotate:o}=e;return o&&o()===!1||(H=n==null?void 0:n.updateRotate)==null||H.call(n),e}case Actions.ANNOTATION_ACTIONS.UPDATE_ANNOTATION_VALID:{const{toolInstance:n}=e,o=(z=n==null?void 0:n.valid)!=null?z:!0;return antd.Modal.destroyAll(),antd.Modal.confirm({content:lbUtils.i18n.t(o?"updateValidFromValidToInValid":"updateValidFromInValidToValid"),onOk:()=>{n==null||n.setValid(!o)},okText:lbUtils.i18n.t("Confirm"),cancelText:lbUtils.i18n.t("Cancel")}),e}case Actions.ANNOTATION_ACTIONS.COPY_BACKWARD_RESULT:{const{toolInstance:n,imgIndex:o,imgList:s,step:i,stepList:a}=e;if(!n)return e;if(o===0||o>=s.length)return console.error("\u65E0\u6CD5\u590D\u5236\u8FB9\u754C\u5916\u7684\u5185\u5BB9"),e;const r=s[o-1].result;if(!r)return e;const A=StepUtils.getCurrentStepInfo(i,a),T=(K=A==null?void 0:A.step)!=null?K:i,d=(W=n==null?void 0:n.valid)!=null?W:!0,c=AnnotationDataUtils.copyResultChange({copyResult:r,step:T,currentResult:($=s[o].result)!=null?$:"",preMappingImgList:(X=s[o-1].mappingImgList)!=null?X:[],mappingImgList:(Y=s[o].mappingImgList)!=null?Y:[],valid:d});s[o]=__spreadProps(__spreadValues({},s[o]),{result:c});const f=index.jsonParser(c)[`step_${i}`],L=(f==null?void 0:f.result)||[];return n==null||n.setResult(L),n==null||n.history.pushHistory(L),(J=n==null?void 0:n.asyncData)==null||J.call(n,s[o]),__spreadProps(__spreadValues({},e),{imgList:[...s]})}case Actions.ANNOTATION_ACTIONS.SET_STEP:{const{stepList:n,annotationEngine:o}=e,{toStep:s}=t.payload;if(o){const i=getStepConfig(n,s);return o==null||o.setToolName(i.tool,i.config),__spreadProps(__spreadValues({},e),{step:s,toolInstance:o==null?void 0:o.toolInstance})}return __spreadProps(__spreadValues({},e),{step:s})}case Actions.ANNOTATION_ACTIONS.SET_LOADPCDFILE_LOADING:{const{loadPCDFileLoading:n}=t.payload;return __spreadProps(__spreadValues({},e),{loadPCDFileLoading:!!n})}case Actions.ANNOTATION_ACTIONS.SET_LOADING:{const{loading:n}=t.payload;return __spreadProps(__spreadValues({},e),{loading:!!n})}case Actions.ANNOTATION_ACTIONS.SET_POINT_CLOUD_LOADING:{const{pointCloudLoading:n}=t.payload;return __spreadProps(__spreadValues({},e),{pointCloudLoading:!!n})}case Actions.ANNOTATION_ACTIONS.SET_CHECK_MODE:{const{checkMode:n}=t.payload;return __spreadProps(__spreadValues({},e),{checkMode:!!n})}case Actions.ANNOTATION_ACTIONS.SET_HIGHLIGHT_ATTRIBUTE:{const{attribute:n}=t.payload;return __spreadProps(__spreadValues({},e),{highlightAttribute:n})}case Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_TRACK_ID:{const{id:n,newID:o,rangeIndex:s,imgList:i}=t.payload,{imgIndex:a,onSubmit:r}=e,A=[],T=i.map((d,c)=>{if(lbAnnotation.MathUtils.isInRange(c,s)){const N=__spreadProps(__spreadValues({},d),{result:lbUtils.PointCloudUtils.batchUpdateTrackID({id:n,newID:o,result:d.result})});return A.push({imgIndex:c,newInfo:N}),N}return d});return r&&r([T[a]],index$1.ESubmitType.BatchUpdateTrackID,a,T,{updateImgList:A}),__spreadProps(__spreadValues({},e),{imgList:T})}case Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_RESULT_BY_TRACK_ID:{const{id:n,newData:o,rangeIndex:s}=t.payload,{imgList:i,imgIndex:a,onSubmit:r}=e,A=[],T=i.map((d,c)=>{if(lbAnnotation.MathUtils.isInRange(c,s)){const N=__spreadProps(__spreadValues({},d),{result:lbUtils.PointCloudUtils.batchUpdateResultByTrackID({id:n,newData:o,result:d.result})});return A.push({imgIndex:c,newInfo:N}),N}return d});return r&&r([T[a]],index$1.ESubmitType.BatchUpdateTrackID,a,T,{updateImgList:A}),__spreadProps(__spreadValues({},e),{imgList:T})}case Actions.ANNOTATION_ACTIONS.BATCH_UPDATE_IMG_LIST_RESULT_BY_PREDICT_RESULT:{const{onSubmit:n,imgList:o,stepList:s,step:i,predictionResult:a}=e,r={};a.forEach(c=>{const{index:N}=c;r[N]=___default.default.pick(c,["center","width","height","depth","rotation","id","attribute","valid","trackID"])});const A=`step_${i}`,T=[],d=o.map((c,N)=>{if(r[N]){const f=c.result==="{}"?index.jsonParser(data.composeResult("",{step:i,stepList:s},{rect:[]},{})):index.jsonParser(c.result);f[A].result.push(r[N]);const L=__spreadProps(__spreadValues({},c),{result:JSON.stringify(f)});return T.push({imgIndex:N,newInfo:L}),L}return c});return n==null||n(d,index$1.ESubmitType.BatchUpdateImgList,-1,d,{updateImgList:T}),__spreadProps(__spreadValues({},e),{imgList:d})}default:return e}};exports.LoadFileAndFileData=LoadFileAndFileData,exports.annotationReducer=annotationReducer,exports.composeResultByToolInstance=composeResultByToolInstance,exports.getStepConfig=getStepConfig,exports.getTotalPage=getTotalPage;
@@ -1,10 +1,11 @@
1
1
  import { IPointCloudBox } from '@labelbee/lb-utils';
2
2
  import React from 'react';
3
3
  import { ToolInstance } from './store/annotation/types';
4
- import { GetFileData, IFileItem, LoadFileList, OnPageChange, OnSave, OnStepChange, OnSubmit } from './types/data';
4
+ import { GetFileData, GetImgIndexByExternal, IFileItem, LoadFileList, OnPageChange, OnSave, OnStepChange, OnSubmit } from './types/data';
5
5
  import { Header, RenderFooter, Sider, DrawLayerSlot } from './types/main';
6
6
  import { IStepInfo } from './types/step';
7
7
  import { EPointCloudName } from '@labelbee/lb-annotation';
8
+ import type { ToolStyle } from './types/toolStyle';
8
9
  interface IAnnotationStyle {
9
10
  strokeColor: string;
10
11
  fillColor: string;
@@ -77,6 +78,9 @@ export interface AppProps {
77
78
  }) => void;
78
79
  preDataProcess?: (params: IPreDataProcessParams) => IPointCloudBox[];
79
80
  auditContext?: any;
81
+ getImgIndexByExternal: GetImgIndexByExternal;
82
+ annotationBefore?: (setAnnotationData: Function) => void;
83
+ toolStyle?: ToolStyle;
80
84
  }
81
85
  declare const _default: import("react-redux").ConnectedComponent<React.FC<AppProps>, import("react-redux").Omit<AppProps & {
82
86
  children?: React.ReactNode;
@@ -6,6 +6,7 @@ import React from 'react';
6
6
  export type TAfterImgOnLoad = (img: HTMLImageElement) => void;
7
7
  interface IProps {
8
8
  src: string;
9
+ fallbackSrc?: string;
9
10
  size?: {
10
11
  width?: number;
11
12
  height?: number;
@@ -0,0 +1,5 @@
1
+ import { FC } from 'react';
2
+ import './DynamicResizer.scss';
3
+ import { DynamicResizerProps } from './types/interface';
4
+ declare const DynamicResizer: FC<DynamicResizerProps>;
5
+ export default DynamicResizer;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { DragProps } from '../types/interface';
3
+ declare const useDrag: ({ containerRef, minTopHeight, minBottomHeight, defaultHeight, axis, localKey, isShortcutButton, }: DragProps) => {
4
+ rendered: React.JSX.Element;
5
+ topStyle: {
6
+ height: string;
7
+ };
8
+ bottomStyle: {
9
+ height: string;
10
+ };
11
+ };
12
+ export default useDrag;
@@ -0,0 +1,23 @@
1
+ import { RefObject } from 'react';
2
+ declare const useUpdateHeight: (containerRef: RefObject<HTMLDivElement>, minTopHeight: number, minBottomHeight: number, defaultHeight: number, cacheKey: string) => {
3
+ topHeight: number;
4
+ bottomHeight: number;
5
+ position: {
6
+ x: number;
7
+ y: number;
8
+ };
9
+ bounds: {
10
+ top: number;
11
+ bottom: number;
12
+ };
13
+ topStyle: {
14
+ height: string;
15
+ };
16
+ bottomStyle: {
17
+ height: string;
18
+ };
19
+ updateELHeight: (newTopHeight: number) => void;
20
+ setBottomHeightToZero: () => void;
21
+ setTopHeightToZero: () => void;
22
+ };
23
+ export default useUpdateHeight;
@@ -0,0 +1,2 @@
1
+ import DynamicResizer from './DynamicResizer';
2
+ export default DynamicResizer;
@@ -0,0 +1,17 @@
1
+ import { ReactElement, RefObject } from 'react';
2
+ interface Common {
3
+ defaultHeight?: number;
4
+ minTopHeight?: number;
5
+ minBottomHeight?: number;
6
+ axis?: 'x' | 'y';
7
+ localKey?: string;
8
+ customDivider?: ReactElement;
9
+ isShortcutButton?: boolean;
10
+ }
11
+ export interface DynamicResizerProps extends Common {
12
+ children: ReactElement[] | Element[] | Boolean[];
13
+ }
14
+ export interface DragProps extends Common {
15
+ containerRef: RefObject<HTMLDivElement>;
16
+ }
17
+ export {};
@@ -1,5 +1,5 @@
1
1
  import { IAnswerList, IAnswerSort, ILLMBoxResult, ILLMToolConfig, IWaitAnswerSort, IInputList, ISelectedTags } from '../types';
2
- export declare const getCurrentResultFromResultList: (result: string) => any;
2
+ export declare const getCurrentResultFromResultList: (result: string, step?: number) => any;
3
3
  export declare const formatSort: (sortList: any) => any;
4
4
  export declare const getTagResult: (inputList: IInputList[], result?: ISelectedTags) => {};
5
5
  export declare const getWaitSortList: (answerList: IAnswerList[], result?: ILLMBoxResult) => {
@@ -1,10 +1,17 @@
1
1
  import React from 'react';
2
2
  import { SetState } from 'ahooks/lib/useSetState';
3
- import { IAudioTextToolConfig } from '@labelbee/lb-utils';
3
+ import { IAudioTextToolConfig, ITextConfigItem } from '@labelbee/lb-utils';
4
4
  export declare enum EContextType {
5
5
  before = "\u524D\u6587",
6
6
  after = "\u540E\u6587"
7
7
  }
8
+ export declare const DEFAULT_CLIP_TEXT_CONFIG_ITEM: {
9
+ label: string;
10
+ key: string;
11
+ required: boolean;
12
+ default: string;
13
+ maxLength: number;
14
+ }[];
8
15
  interface IAudioContextProps {
9
16
  audioContext: {
10
17
  visible?: boolean;
@@ -19,7 +26,7 @@ export interface ISelectedRegion {
19
26
  id?: string;
20
27
  loop?: boolean;
21
28
  }
22
- type IAudioClipConfig = Pick<IAudioTextToolConfig, 'clipConfigurable' | 'clipAttributeConfigurable' | 'clipAttributeList' | 'clipTextConfigurable'>;
29
+ type IAudioClipConfig = Pick<IAudioTextToolConfig, 'clipConfigurable' | 'clipAttributeConfigurable' | 'clipAttributeList' | 'clipTextConfigurable' | 'secondaryAttributeConfigurable' | 'subAttributeList'>;
23
30
  interface IAudioClipState extends IAudioClipConfig {
24
31
  /** 选中的截取属性,新建截取片段的默认属性 */
25
32
  selectedAttribute: string;
@@ -31,6 +38,7 @@ interface IAudioClipState extends IAudioClipConfig {
31
38
  combined: boolean;
32
39
  /** 是否按下分割键 */
33
40
  segment: boolean;
41
+ clipTextList: ITextConfigItem[];
34
42
  }
35
43
  interface IAudioClipContext {
36
44
  audioClipState: IAudioClipState;