@labelbee/lb-components 1.2.1

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 (493) hide show
  1. package/README.md +31 -0
  2. package/dist/App.js +1 -0
  3. package/dist/assets/annotation/common/icon_adapt.svg.js +1 -0
  4. package/dist/assets/annotation/common/icon_adapt_black.svg.js +1 -0
  5. package/dist/assets/annotation/common/icon_back.svg.js +1 -0
  6. package/dist/assets/annotation/common/icon_backA.svg.js +1 -0
  7. package/dist/assets/annotation/common/icon_clear.svg.js +1 -0
  8. package/dist/assets/annotation/common/icon_clearSmall.svg.js +1 -0
  9. package/dist/assets/annotation/common/icon_clearSmall_a.svg.js +1 -0
  10. package/dist/assets/annotation/common/icon_clear_a.svg.js +1 -0
  11. package/dist/assets/annotation/common/icon_invalid.svg.js +1 -0
  12. package/dist/assets/annotation/common/icon_invalid_a.svg.js +1 -0
  13. package/dist/assets/annotation/common/icon_next.svg.js +1 -0
  14. package/dist/assets/annotation/common/icon_nextA.svg.js +1 -0
  15. package/dist/assets/annotation/common/icon_r.svg.js +1 -0
  16. package/dist/assets/annotation/common/icon_rA.svg.js +1 -0
  17. package/dist/assets/annotation/common/icon_save.svg.js +1 -0
  18. package/dist/assets/annotation/common/icon_saveA.svg.js +1 -0
  19. package/dist/assets/annotation/image/brightness.svg.js +1 -0
  20. package/dist/assets/annotation/image/contrast.svg.js +1 -0
  21. package/dist/assets/annotation/image/icon_yuantu.svg.js +1 -0
  22. package/dist/assets/annotation/image/saturation.svg.js +1 -0
  23. package/dist/assets/annotation/lineTool/icon_line_a.svg.js +1 -0
  24. package/dist/assets/annotation/pointTool/icon_point_a.svg.js +1 -0
  25. package/dist/assets/annotation/polygonTool/icon_polygon_a.svg.js +1 -0
  26. package/dist/assets/annotation/rectTool/icon_rectPattern.svg.js +1 -0
  27. package/dist/assets/annotation/toolHotKeyIcon/icon_alttab_kj.svg.js +1 -0
  28. package/dist/assets/annotation/toolHotKeyIcon/icon_cencel_kj.svg.js +1 -0
  29. package/dist/assets/annotation/toolHotKeyIcon/icon_del_kj.svg.js +1 -0
  30. package/dist/assets/annotation/toolHotKeyIcon/icon_frameActive_kj.svg.js +1 -0
  31. package/dist/assets/annotation/toolHotKeyIcon/icon_frameChange_kj.svg.js +1 -0
  32. package/dist/assets/annotation/toolHotKeyIcon/icon_frameNull_kj.svg.js +1 -0
  33. package/dist/assets/annotation/toolHotKeyIcon/icon_frame_kj.svg.js +1 -0
  34. package/dist/assets/annotation/toolHotKeyIcon/icon_fullView_kj.svg.js +1 -0
  35. package/dist/assets/annotation/toolHotKeyIcon/icon_kj1.svg.js +1 -0
  36. package/dist/assets/annotation/toolHotKeyIcon/icon_kj_h.svg.js +1 -0
  37. package/dist/assets/annotation/toolHotKeyIcon/icon_last_kj.svg.js +1 -0
  38. package/dist/assets/annotation/toolHotKeyIcon/icon_lineActive_kj.svg.js +1 -0
  39. package/dist/assets/annotation/toolHotKeyIcon/icon_lineChange_kj.svg.js +1 -0
  40. package/dist/assets/annotation/toolHotKeyIcon/icon_lineCont_kj.svg.js +1 -0
  41. package/dist/assets/annotation/toolHotKeyIcon/icon_lineDel_kj.svg.js +1 -0
  42. package/dist/assets/annotation/toolHotKeyIcon/icon_lineInsert_kj.svg.js +1 -0
  43. package/dist/assets/annotation/toolHotKeyIcon/icon_lineNull_kj.svg.js +1 -0
  44. package/dist/assets/annotation/toolHotKeyIcon/icon_lineSpecial_kj.svg.js +1 -0
  45. package/dist/assets/annotation/toolHotKeyIcon/icon_line_kj.svg.js +1 -0
  46. package/dist/assets/annotation/toolHotKeyIcon/icon_loupe_kj.svg.js +1 -0
  47. package/dist/assets/annotation/toolHotKeyIcon/icon_mouse_left_kj.svg.js +1 -0
  48. package/dist/assets/annotation/toolHotKeyIcon/icon_mouse_middle_kj.svg.js +1 -0
  49. package/dist/assets/annotation/toolHotKeyIcon/icon_mouse_right_kj.svg.js +1 -0
  50. package/dist/assets/annotation/toolHotKeyIcon/icon_move_kj.svg.js +1 -0
  51. package/dist/assets/annotation/toolHotKeyIcon/icon_next_kj.svg.js +1 -0
  52. package/dist/assets/annotation/toolHotKeyIcon/icon_noDisplay.svg.js +1 -0
  53. package/dist/assets/annotation/toolHotKeyIcon/icon_pointActive_kj.svg.js +1 -0
  54. package/dist/assets/annotation/toolHotKeyIcon/icon_pointNull_kj.svg.js +1 -0
  55. package/dist/assets/annotation/toolHotKeyIcon/icon_point_kj.svg.js +1 -0
  56. package/dist/assets/annotation/toolHotKeyIcon/icon_polygonActive_kj.svg.js +1 -0
  57. package/dist/assets/annotation/toolHotKeyIcon/icon_polygonChange_kj.svg.js +1 -0
  58. package/dist/assets/annotation/toolHotKeyIcon/icon_polygonDel_kj.svg.js +1 -0
  59. package/dist/assets/annotation/toolHotKeyIcon/icon_polygonInsert_kj.svg.js +1 -0
  60. package/dist/assets/annotation/toolHotKeyIcon/icon_polygonNull_kj.svg.js +1 -0
  61. package/dist/assets/annotation/toolHotKeyIcon/icon_reform_kj.svg.js +1 -0
  62. package/dist/assets/annotation/toolHotKeyIcon/icon_reload_kj.svg.js +1 -0
  63. package/dist/assets/annotation/toolHotKeyIcon/icon_save_kj.svg.js +1 -0
  64. package/dist/assets/annotation/toolHotKeyIcon/icon_straightLine_kj.svg.js +1 -0
  65. package/dist/assets/annotation/toolHotKeyIcon/icon_tab_kj.svg.js +1 -0
  66. package/dist/assets/annotation/toolHotKeyIcon/icon_tag_kj.svg.js +1 -0
  67. package/dist/assets/annotation/toolHotKeyIcon/icon_unGrip_kj.svg.js +1 -0
  68. package/dist/assets/annotation/toolHotKeyIcon/setValid.svg.js +1 -0
  69. package/dist/assets/attributeIcon/zoomUp.svg.js +1 -0
  70. package/dist/assets/cssIcon/annotation/icon_clearSmall.svg +10 -0
  71. package/dist/assets/cssIcon/annotation/icon_clearSmall_a.svg +10 -0
  72. package/dist/assets/cssIcon/slide_btn.svg +23 -0
  73. package/dist/assets/toolStyle/icon_border.svg.js +1 -0
  74. package/dist/assets/toolStyle/icon_borderColor.svg.js +1 -0
  75. package/dist/assets/toolStyle/icon_opacityFill.svg.js +1 -0
  76. package/dist/assets/toolStyle/icon_opacityStroke.svg.js +1 -0
  77. package/dist/components/AnnotationView/index.js +1 -0
  78. package/dist/components/ImageError/index.js +1 -0
  79. package/dist/components/annotationStepPopover/index.js +1 -0
  80. package/dist/components/attributeList/index.js +1 -0
  81. package/dist/components/checkboxList/index.js +1 -0
  82. package/dist/components/colorTag/index.js +1 -0
  83. package/dist/components/customAntd/IconWithText/index.js +1 -0
  84. package/dist/components/customResizeHook/index.js +1 -0
  85. package/dist/configureStore.js +1 -0
  86. package/dist/constant/index.js +1 -0
  87. package/dist/constant/styleString.js +1 -0
  88. package/dist/data/Style.js +1 -0
  89. package/dist/data/enums/AnnotationSize.js +1 -0
  90. package/dist/data/enums/ToolType.js +1 -0
  91. package/dist/hooks/useRafState.js +1 -0
  92. package/dist/hooks/useSafeSate.js +1 -0
  93. package/dist/hooks/useSize.js +1 -0
  94. package/dist/hooks/useUnmountedRef.js +1 -0
  95. package/dist/index.css +835 -0
  96. package/dist/index.js +1 -0
  97. package/dist/store/Actions.js +1 -0
  98. package/dist/store/annotation/actionCreators.js +1 -0
  99. package/dist/store/annotation/reducer.js +1 -0
  100. package/dist/store/imgAttribute/actionCreators.js +1 -0
  101. package/dist/store/imgAttribute/reducer.js +1 -0
  102. package/dist/store/index.js +1 -0
  103. package/dist/store/toolStyle/actionCreators.js +1 -0
  104. package/dist/store/toolStyle/reducer.js +1 -0
  105. package/dist/types/App.d.ts +41 -0
  106. package/dist/types/components/AnnotationView/index.d.ts +24 -0
  107. package/dist/types/components/ImageError/index.d.ts +14 -0
  108. package/dist/types/components/annotationStepPopover/index.d.ts +8 -0
  109. package/dist/types/components/attributeList/index.d.ts +16 -0
  110. package/dist/types/components/checkboxList/index.d.ts +8 -0
  111. package/dist/types/components/colorTag/index.d.ts +1 -0
  112. package/dist/types/components/customAntd/IconWithText/index.d.ts +9 -0
  113. package/dist/types/components/customResizeHook/index.d.ts +31 -0
  114. package/dist/types/configureStore.d.ts +3 -0
  115. package/dist/types/constant/index.d.ts +18 -0
  116. package/dist/types/constant/styleString.d.ts +2 -0
  117. package/dist/types/data/Style.d.ts +37 -0
  118. package/dist/types/data/enums/AnnotationSize.d.ts +32 -0
  119. package/dist/types/data/enums/ToolType.d.ts +43 -0
  120. package/dist/types/hooks/useRafState.d.ts +3 -0
  121. package/dist/types/hooks/useSafeSate.d.ts +4 -0
  122. package/dist/types/hooks/useSize.d.ts +7 -0
  123. package/dist/types/hooks/useUnmountedRef.d.ts +3 -0
  124. package/dist/types/index.d.ts +9 -0
  125. package/dist/types/store/Actions.d.ts +31 -0
  126. package/dist/types/store/annotation/actionCreators.d.ts +56 -0
  127. package/dist/types/store/annotation/reducer.d.ts +14 -0
  128. package/dist/types/store/annotation/types.d.ts +100 -0
  129. package/dist/types/store/imgAttribute/actionCreators.d.ts +8 -0
  130. package/dist/types/store/imgAttribute/reducer.d.ts +8 -0
  131. package/dist/types/store/imgAttribute/types.d.ts +23 -0
  132. package/dist/types/store/index.d.ts +3 -0
  133. package/dist/types/store/toolStyle/actionCreators.d.ts +8 -0
  134. package/dist/types/store/toolStyle/reducer.d.ts +13 -0
  135. package/dist/types/store/toolStyle/types.d.ts +23 -0
  136. package/dist/types/utils/AnnotationDataUtils.d.ts +77 -0
  137. package/dist/types/utils/ConfigUtils.d.ts +9 -0
  138. package/dist/types/utils/PageOperator.d.ts +48 -0
  139. package/dist/types/utils/StepUtils.d.ts +18 -0
  140. package/dist/types/utils/TextUtils.d.ts +7 -0
  141. package/dist/types/utils/ToolStyleUtils.d.ts +18 -0
  142. package/dist/types/utils/data.d.ts +15 -0
  143. package/dist/types/utils/dom.d.ts +5 -0
  144. package/dist/types/utils/index.d.ts +5 -0
  145. package/dist/types/views/MainView/annotationOperation/index.d.ts +19 -0
  146. package/dist/types/views/MainView/index.d.ts +4 -0
  147. package/dist/types/views/MainView/sidebar/AnnotationText/index.d.ts +7 -0
  148. package/dist/types/views/MainView/sidebar/ClearIcon/index.d.ts +2 -0
  149. package/dist/types/views/MainView/sidebar/GeneralOperation/index.d.ts +12 -0
  150. package/dist/types/views/MainView/sidebar/ImgAttributeInfo/index.d.ts +6 -0
  151. package/dist/types/views/MainView/sidebar/SwitchAttributeList/index.d.ts +9 -0
  152. package/dist/types/views/MainView/sidebar/TagSidebar/index.d.ts +9 -0
  153. package/dist/types/views/MainView/sidebar/TextAreaFormat/index.d.ts +8 -0
  154. package/dist/types/views/MainView/sidebar/TextToolSidebar/index.d.ts +20 -0
  155. package/dist/types/views/MainView/sidebar/ToolStyle/index.d.ts +7 -0
  156. package/dist/types/views/MainView/sidebar/index.d.ts +7 -0
  157. package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/common/index.d.ts +109 -0
  158. package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/index.d.ts +13 -0
  159. package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/line/index.d.ts +71 -0
  160. package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/point/index.d.ts +27 -0
  161. package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/polygon/index.d.ts +79 -0
  162. package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/rectToolShortCutTable/index.d.ts +38 -0
  163. package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/tag/index.d.ts +3 -0
  164. package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/text/index.d.ts +6 -0
  165. package/dist/types/views/MainView/toolFooter/FooterTips/index.d.ts +3 -0
  166. package/dist/types/views/MainView/toolFooter/HiddenTips/index.d.ts +6 -0
  167. package/dist/types/views/MainView/toolFooter/PageNumber/index.d.ts +6 -0
  168. package/dist/types/views/MainView/toolFooter/ZoomController/ZoomLevel/index.d.ts +7 -0
  169. package/dist/types/views/MainView/toolFooter/ZoomController/index.d.ts +8 -0
  170. package/dist/types/views/MainView/toolFooter/index.d.ts +22 -0
  171. package/dist/types/views/MainView/toolHeader/ExportData/index.d.ts +13 -0
  172. package/dist/types/views/MainView/toolHeader/StepSwitch/index.d.ts +12 -0
  173. package/dist/types/views/MainView/toolHeader/headerOption/index.d.ts +8 -0
  174. package/dist/types/views/MainView/toolHeader/index.d.ts +19 -0
  175. package/dist/utils/AnnotationDataUtils.js +1 -0
  176. package/dist/utils/ConfigUtils.js +1 -0
  177. package/dist/utils/PageOperator.js +1 -0
  178. package/dist/utils/StepUtils.js +1 -0
  179. package/dist/utils/TextUtils.js +1 -0
  180. package/dist/utils/ToolStyleUtils.js +1 -0
  181. package/dist/utils/data.js +1 -0
  182. package/dist/utils/dom.js +1 -0
  183. package/dist/utils/index.js +1 -0
  184. package/dist/views/MainView/annotationOperation/index.js +1 -0
  185. package/dist/views/MainView/index.js +1 -0
  186. package/dist/views/MainView/sidebar/AnnotationText/index.js +1 -0
  187. package/dist/views/MainView/sidebar/ClearIcon/index.js +1 -0
  188. package/dist/views/MainView/sidebar/GeneralOperation/index.js +1 -0
  189. package/dist/views/MainView/sidebar/ImgAttributeInfo/index.js +1 -0
  190. package/dist/views/MainView/sidebar/SwitchAttributeList/index.js +1 -0
  191. package/dist/views/MainView/sidebar/TagSidebar/index.js +1 -0
  192. package/dist/views/MainView/sidebar/TextAreaFormat/index.js +1 -0
  193. package/dist/views/MainView/sidebar/TextToolSidebar/index.js +1 -0
  194. package/dist/views/MainView/sidebar/ToolStyle/index.js +1 -0
  195. package/dist/views/MainView/sidebar/index.js +1 -0
  196. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/common/index.js +1 -0
  197. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -0
  198. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/line/index.js +1 -0
  199. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/point/index.js +1 -0
  200. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/polygon/index.js +1 -0
  201. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/rectToolShortCutTable/index.js +1 -0
  202. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/tag/index.js +1 -0
  203. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/text/index.js +1 -0
  204. package/dist/views/MainView/toolFooter/FooterTips/index.js +1 -0
  205. package/dist/views/MainView/toolFooter/HiddenTips/index.js +1 -0
  206. package/dist/views/MainView/toolFooter/PageNumber/index.js +1 -0
  207. package/dist/views/MainView/toolFooter/ZoomController/ZoomLevel/index.js +1 -0
  208. package/dist/views/MainView/toolFooter/ZoomController/index.js +1 -0
  209. package/dist/views/MainView/toolFooter/index.js +1 -0
  210. package/dist/views/MainView/toolHeader/ExportData/index.js +1 -0
  211. package/dist/views/MainView/toolHeader/StepSwitch/index.js +1 -0
  212. package/dist/views/MainView/toolHeader/headerOption/index.js +1 -0
  213. package/dist/views/MainView/toolHeader/index.js +1 -0
  214. package/es/App.js +1 -0
  215. package/es/App.js.map +1 -0
  216. package/es/assets/annotation/common/icon_adapt.svg.js +1 -0
  217. package/es/assets/annotation/common/icon_adapt.svg.js.map +1 -0
  218. package/es/assets/annotation/common/icon_adapt_black.svg.js +1 -0
  219. package/es/assets/annotation/common/icon_adapt_black.svg.js.map +1 -0
  220. package/es/assets/annotation/common/icon_back.svg.js +1 -0
  221. package/es/assets/annotation/common/icon_back.svg.js.map +1 -0
  222. package/es/assets/annotation/common/icon_backA.svg.js +1 -0
  223. package/es/assets/annotation/common/icon_backA.svg.js.map +1 -0
  224. package/es/assets/annotation/common/icon_clear.svg.js +1 -0
  225. package/es/assets/annotation/common/icon_clear.svg.js.map +1 -0
  226. package/es/assets/annotation/common/icon_clearSmall.svg.js +1 -0
  227. package/es/assets/annotation/common/icon_clearSmall.svg.js.map +1 -0
  228. package/es/assets/annotation/common/icon_clearSmall_a.svg.js +1 -0
  229. package/es/assets/annotation/common/icon_clearSmall_a.svg.js.map +1 -0
  230. package/es/assets/annotation/common/icon_clear_a.svg.js +1 -0
  231. package/es/assets/annotation/common/icon_clear_a.svg.js.map +1 -0
  232. package/es/assets/annotation/common/icon_invalid.svg.js +1 -0
  233. package/es/assets/annotation/common/icon_invalid.svg.js.map +1 -0
  234. package/es/assets/annotation/common/icon_invalid_a.svg.js +1 -0
  235. package/es/assets/annotation/common/icon_invalid_a.svg.js.map +1 -0
  236. package/es/assets/annotation/common/icon_next.svg.js +1 -0
  237. package/es/assets/annotation/common/icon_next.svg.js.map +1 -0
  238. package/es/assets/annotation/common/icon_nextA.svg.js +1 -0
  239. package/es/assets/annotation/common/icon_nextA.svg.js.map +1 -0
  240. package/es/assets/annotation/common/icon_r.svg.js +1 -0
  241. package/es/assets/annotation/common/icon_r.svg.js.map +1 -0
  242. package/es/assets/annotation/common/icon_rA.svg.js +1 -0
  243. package/es/assets/annotation/common/icon_rA.svg.js.map +1 -0
  244. package/es/assets/annotation/common/icon_save.svg.js +1 -0
  245. package/es/assets/annotation/common/icon_save.svg.js.map +1 -0
  246. package/es/assets/annotation/common/icon_saveA.svg.js +1 -0
  247. package/es/assets/annotation/common/icon_saveA.svg.js.map +1 -0
  248. package/es/assets/annotation/image/brightness.svg.js +1 -0
  249. package/es/assets/annotation/image/brightness.svg.js.map +1 -0
  250. package/es/assets/annotation/image/contrast.svg.js +1 -0
  251. package/es/assets/annotation/image/contrast.svg.js.map +1 -0
  252. package/es/assets/annotation/image/icon_yuantu.svg.js +1 -0
  253. package/es/assets/annotation/image/icon_yuantu.svg.js.map +1 -0
  254. package/es/assets/annotation/image/saturation.svg.js +1 -0
  255. package/es/assets/annotation/image/saturation.svg.js.map +1 -0
  256. package/es/assets/annotation/lineTool/icon_line_a.svg.js +1 -0
  257. package/es/assets/annotation/lineTool/icon_line_a.svg.js.map +1 -0
  258. package/es/assets/annotation/pointTool/icon_point_a.svg.js +1 -0
  259. package/es/assets/annotation/pointTool/icon_point_a.svg.js.map +1 -0
  260. package/es/assets/annotation/polygonTool/icon_polygon_a.svg.js +1 -0
  261. package/es/assets/annotation/polygonTool/icon_polygon_a.svg.js.map +1 -0
  262. package/es/assets/annotation/rectTool/icon_rectPattern.svg.js +1 -0
  263. package/es/assets/annotation/rectTool/icon_rectPattern.svg.js.map +1 -0
  264. package/es/assets/annotation/toolHotKeyIcon/icon_alttab_kj.svg.js +1 -0
  265. package/es/assets/annotation/toolHotKeyIcon/icon_alttab_kj.svg.js.map +1 -0
  266. package/es/assets/annotation/toolHotKeyIcon/icon_cencel_kj.svg.js +1 -0
  267. package/es/assets/annotation/toolHotKeyIcon/icon_cencel_kj.svg.js.map +1 -0
  268. package/es/assets/annotation/toolHotKeyIcon/icon_del_kj.svg.js +1 -0
  269. package/es/assets/annotation/toolHotKeyIcon/icon_del_kj.svg.js.map +1 -0
  270. package/es/assets/annotation/toolHotKeyIcon/icon_frameActive_kj.svg.js +1 -0
  271. package/es/assets/annotation/toolHotKeyIcon/icon_frameActive_kj.svg.js.map +1 -0
  272. package/es/assets/annotation/toolHotKeyIcon/icon_frameChange_kj.svg.js +1 -0
  273. package/es/assets/annotation/toolHotKeyIcon/icon_frameChange_kj.svg.js.map +1 -0
  274. package/es/assets/annotation/toolHotKeyIcon/icon_frameNull_kj.svg.js +1 -0
  275. package/es/assets/annotation/toolHotKeyIcon/icon_frameNull_kj.svg.js.map +1 -0
  276. package/es/assets/annotation/toolHotKeyIcon/icon_frame_kj.svg.js +1 -0
  277. package/es/assets/annotation/toolHotKeyIcon/icon_frame_kj.svg.js.map +1 -0
  278. package/es/assets/annotation/toolHotKeyIcon/icon_fullView_kj.svg.js +1 -0
  279. package/es/assets/annotation/toolHotKeyIcon/icon_fullView_kj.svg.js.map +1 -0
  280. package/es/assets/annotation/toolHotKeyIcon/icon_kj1.svg.js +1 -0
  281. package/es/assets/annotation/toolHotKeyIcon/icon_kj1.svg.js.map +1 -0
  282. package/es/assets/annotation/toolHotKeyIcon/icon_kj_h.svg.js +1 -0
  283. package/es/assets/annotation/toolHotKeyIcon/icon_kj_h.svg.js.map +1 -0
  284. package/es/assets/annotation/toolHotKeyIcon/icon_last_kj.svg.js +1 -0
  285. package/es/assets/annotation/toolHotKeyIcon/icon_last_kj.svg.js.map +1 -0
  286. package/es/assets/annotation/toolHotKeyIcon/icon_lineActive_kj.svg.js +1 -0
  287. package/es/assets/annotation/toolHotKeyIcon/icon_lineActive_kj.svg.js.map +1 -0
  288. package/es/assets/annotation/toolHotKeyIcon/icon_lineChange_kj.svg.js +1 -0
  289. package/es/assets/annotation/toolHotKeyIcon/icon_lineChange_kj.svg.js.map +1 -0
  290. package/es/assets/annotation/toolHotKeyIcon/icon_lineCont_kj.svg.js +1 -0
  291. package/es/assets/annotation/toolHotKeyIcon/icon_lineCont_kj.svg.js.map +1 -0
  292. package/es/assets/annotation/toolHotKeyIcon/icon_lineDel_kj.svg.js +1 -0
  293. package/es/assets/annotation/toolHotKeyIcon/icon_lineDel_kj.svg.js.map +1 -0
  294. package/es/assets/annotation/toolHotKeyIcon/icon_lineInsert_kj.svg.js +1 -0
  295. package/es/assets/annotation/toolHotKeyIcon/icon_lineInsert_kj.svg.js.map +1 -0
  296. package/es/assets/annotation/toolHotKeyIcon/icon_lineNull_kj.svg.js +1 -0
  297. package/es/assets/annotation/toolHotKeyIcon/icon_lineNull_kj.svg.js.map +1 -0
  298. package/es/assets/annotation/toolHotKeyIcon/icon_lineSpecial_kj.svg.js +1 -0
  299. package/es/assets/annotation/toolHotKeyIcon/icon_lineSpecial_kj.svg.js.map +1 -0
  300. package/es/assets/annotation/toolHotKeyIcon/icon_line_kj.svg.js +1 -0
  301. package/es/assets/annotation/toolHotKeyIcon/icon_line_kj.svg.js.map +1 -0
  302. package/es/assets/annotation/toolHotKeyIcon/icon_loupe_kj.svg.js +1 -0
  303. package/es/assets/annotation/toolHotKeyIcon/icon_loupe_kj.svg.js.map +1 -0
  304. package/es/assets/annotation/toolHotKeyIcon/icon_mouse_left_kj.svg.js +1 -0
  305. package/es/assets/annotation/toolHotKeyIcon/icon_mouse_left_kj.svg.js.map +1 -0
  306. package/es/assets/annotation/toolHotKeyIcon/icon_mouse_middle_kj.svg.js +1 -0
  307. package/es/assets/annotation/toolHotKeyIcon/icon_mouse_middle_kj.svg.js.map +1 -0
  308. package/es/assets/annotation/toolHotKeyIcon/icon_mouse_right_kj.svg.js +1 -0
  309. package/es/assets/annotation/toolHotKeyIcon/icon_mouse_right_kj.svg.js.map +1 -0
  310. package/es/assets/annotation/toolHotKeyIcon/icon_move_kj.svg.js +1 -0
  311. package/es/assets/annotation/toolHotKeyIcon/icon_move_kj.svg.js.map +1 -0
  312. package/es/assets/annotation/toolHotKeyIcon/icon_next_kj.svg.js +1 -0
  313. package/es/assets/annotation/toolHotKeyIcon/icon_next_kj.svg.js.map +1 -0
  314. package/es/assets/annotation/toolHotKeyIcon/icon_noDisplay.svg.js +1 -0
  315. package/es/assets/annotation/toolHotKeyIcon/icon_noDisplay.svg.js.map +1 -0
  316. package/es/assets/annotation/toolHotKeyIcon/icon_pointActive_kj.svg.js +1 -0
  317. package/es/assets/annotation/toolHotKeyIcon/icon_pointActive_kj.svg.js.map +1 -0
  318. package/es/assets/annotation/toolHotKeyIcon/icon_pointNull_kj.svg.js +1 -0
  319. package/es/assets/annotation/toolHotKeyIcon/icon_pointNull_kj.svg.js.map +1 -0
  320. package/es/assets/annotation/toolHotKeyIcon/icon_point_kj.svg.js +1 -0
  321. package/es/assets/annotation/toolHotKeyIcon/icon_point_kj.svg.js.map +1 -0
  322. package/es/assets/annotation/toolHotKeyIcon/icon_polygonActive_kj.svg.js +1 -0
  323. package/es/assets/annotation/toolHotKeyIcon/icon_polygonActive_kj.svg.js.map +1 -0
  324. package/es/assets/annotation/toolHotKeyIcon/icon_polygonChange_kj.svg.js +1 -0
  325. package/es/assets/annotation/toolHotKeyIcon/icon_polygonChange_kj.svg.js.map +1 -0
  326. package/es/assets/annotation/toolHotKeyIcon/icon_polygonDel_kj.svg.js +1 -0
  327. package/es/assets/annotation/toolHotKeyIcon/icon_polygonDel_kj.svg.js.map +1 -0
  328. package/es/assets/annotation/toolHotKeyIcon/icon_polygonInsert_kj.svg.js +1 -0
  329. package/es/assets/annotation/toolHotKeyIcon/icon_polygonInsert_kj.svg.js.map +1 -0
  330. package/es/assets/annotation/toolHotKeyIcon/icon_polygonNull_kj.svg.js +1 -0
  331. package/es/assets/annotation/toolHotKeyIcon/icon_polygonNull_kj.svg.js.map +1 -0
  332. package/es/assets/annotation/toolHotKeyIcon/icon_reform_kj.svg.js +1 -0
  333. package/es/assets/annotation/toolHotKeyIcon/icon_reform_kj.svg.js.map +1 -0
  334. package/es/assets/annotation/toolHotKeyIcon/icon_reload_kj.svg.js +1 -0
  335. package/es/assets/annotation/toolHotKeyIcon/icon_reload_kj.svg.js.map +1 -0
  336. package/es/assets/annotation/toolHotKeyIcon/icon_save_kj.svg.js +1 -0
  337. package/es/assets/annotation/toolHotKeyIcon/icon_save_kj.svg.js.map +1 -0
  338. package/es/assets/annotation/toolHotKeyIcon/icon_straightLine_kj.svg.js +1 -0
  339. package/es/assets/annotation/toolHotKeyIcon/icon_straightLine_kj.svg.js.map +1 -0
  340. package/es/assets/annotation/toolHotKeyIcon/icon_tab_kj.svg.js +1 -0
  341. package/es/assets/annotation/toolHotKeyIcon/icon_tab_kj.svg.js.map +1 -0
  342. package/es/assets/annotation/toolHotKeyIcon/icon_tag_kj.svg.js +1 -0
  343. package/es/assets/annotation/toolHotKeyIcon/icon_tag_kj.svg.js.map +1 -0
  344. package/es/assets/annotation/toolHotKeyIcon/icon_unGrip_kj.svg.js +1 -0
  345. package/es/assets/annotation/toolHotKeyIcon/icon_unGrip_kj.svg.js.map +1 -0
  346. package/es/assets/annotation/toolHotKeyIcon/setValid.svg.js +1 -0
  347. package/es/assets/annotation/toolHotKeyIcon/setValid.svg.js.map +1 -0
  348. package/es/assets/attributeIcon/zoomUp.svg.js +1 -0
  349. package/es/assets/attributeIcon/zoomUp.svg.js.map +1 -0
  350. package/es/assets/cssIcon/annotation/icon_clearSmall.svg +10 -0
  351. package/es/assets/cssIcon/annotation/icon_clearSmall_a.svg +10 -0
  352. package/es/assets/cssIcon/slide_btn.svg +23 -0
  353. package/es/assets/toolStyle/icon_border.svg.js +1 -0
  354. package/es/assets/toolStyle/icon_border.svg.js.map +1 -0
  355. package/es/assets/toolStyle/icon_borderColor.svg.js +1 -0
  356. package/es/assets/toolStyle/icon_borderColor.svg.js.map +1 -0
  357. package/es/assets/toolStyle/icon_opacityFill.svg.js +1 -0
  358. package/es/assets/toolStyle/icon_opacityFill.svg.js.map +1 -0
  359. package/es/assets/toolStyle/icon_opacityStroke.svg.js +1 -0
  360. package/es/assets/toolStyle/icon_opacityStroke.svg.js.map +1 -0
  361. package/es/components/AnnotationView/index.js +1 -0
  362. package/es/components/AnnotationView/index.js.map +1 -0
  363. package/es/components/ImageError/index.js +1 -0
  364. package/es/components/ImageError/index.js.map +1 -0
  365. package/es/components/annotationStepPopover/index.js +1 -0
  366. package/es/components/annotationStepPopover/index.js.map +1 -0
  367. package/es/components/attributeList/index.js +1 -0
  368. package/es/components/attributeList/index.js.map +1 -0
  369. package/es/components/checkboxList/index.js +1 -0
  370. package/es/components/checkboxList/index.js.map +1 -0
  371. package/es/components/colorTag/index.js +1 -0
  372. package/es/components/colorTag/index.js.map +1 -0
  373. package/es/components/customAntd/IconWithText/index.js +1 -0
  374. package/es/components/customAntd/IconWithText/index.js.map +1 -0
  375. package/es/components/customResizeHook/index.js +1 -0
  376. package/es/components/customResizeHook/index.js.map +1 -0
  377. package/es/configureStore.js +1 -0
  378. package/es/configureStore.js.map +1 -0
  379. package/es/constant/index.js +1 -0
  380. package/es/constant/index.js.map +1 -0
  381. package/es/constant/styleString.js +1 -0
  382. package/es/constant/styleString.js.map +1 -0
  383. package/es/data/Style.js +1 -0
  384. package/es/data/Style.js.map +1 -0
  385. package/es/data/enums/AnnotationSize.js +1 -0
  386. package/es/data/enums/AnnotationSize.js.map +1 -0
  387. package/es/data/enums/ToolType.js +1 -0
  388. package/es/data/enums/ToolType.js.map +1 -0
  389. package/es/hooks/useRafState.js +1 -0
  390. package/es/hooks/useRafState.js.map +1 -0
  391. package/es/hooks/useSafeSate.js +1 -0
  392. package/es/hooks/useSafeSate.js.map +1 -0
  393. package/es/hooks/useSize.js +1 -0
  394. package/es/hooks/useSize.js.map +1 -0
  395. package/es/hooks/useUnmountedRef.js +1 -0
  396. package/es/hooks/useUnmountedRef.js.map +1 -0
  397. package/es/index.js +1 -0
  398. package/es/index.js.map +1 -0
  399. package/es/store/Actions.js +1 -0
  400. package/es/store/Actions.js.map +1 -0
  401. package/es/store/annotation/actionCreators.js +1 -0
  402. package/es/store/annotation/actionCreators.js.map +1 -0
  403. package/es/store/annotation/reducer.js +1 -0
  404. package/es/store/annotation/reducer.js.map +1 -0
  405. package/es/store/imgAttribute/actionCreators.js +1 -0
  406. package/es/store/imgAttribute/actionCreators.js.map +1 -0
  407. package/es/store/imgAttribute/reducer.js +1 -0
  408. package/es/store/imgAttribute/reducer.js.map +1 -0
  409. package/es/store/index.js +1 -0
  410. package/es/store/index.js.map +1 -0
  411. package/es/store/toolStyle/actionCreators.js +1 -0
  412. package/es/store/toolStyle/actionCreators.js.map +1 -0
  413. package/es/store/toolStyle/reducer.js +1 -0
  414. package/es/store/toolStyle/reducer.js.map +1 -0
  415. package/es/utils/AnnotationDataUtils.js +1 -0
  416. package/es/utils/AnnotationDataUtils.js.map +1 -0
  417. package/es/utils/ConfigUtils.js +1 -0
  418. package/es/utils/ConfigUtils.js.map +1 -0
  419. package/es/utils/PageOperator.js +1 -0
  420. package/es/utils/PageOperator.js.map +1 -0
  421. package/es/utils/StepUtils.js +1 -0
  422. package/es/utils/StepUtils.js.map +1 -0
  423. package/es/utils/TextUtils.js +1 -0
  424. package/es/utils/TextUtils.js.map +1 -0
  425. package/es/utils/ToolStyleUtils.js +1 -0
  426. package/es/utils/ToolStyleUtils.js.map +1 -0
  427. package/es/utils/data.js +1 -0
  428. package/es/utils/data.js.map +1 -0
  429. package/es/utils/dom.js +1 -0
  430. package/es/utils/dom.js.map +1 -0
  431. package/es/utils/index.js +1 -0
  432. package/es/utils/index.js.map +1 -0
  433. package/es/views/MainView/annotationOperation/index.js +1 -0
  434. package/es/views/MainView/annotationOperation/index.js.map +1 -0
  435. package/es/views/MainView/index.js +1 -0
  436. package/es/views/MainView/index.js.map +1 -0
  437. package/es/views/MainView/sidebar/AnnotationText/index.js +1 -0
  438. package/es/views/MainView/sidebar/AnnotationText/index.js.map +1 -0
  439. package/es/views/MainView/sidebar/ClearIcon/index.js +1 -0
  440. package/es/views/MainView/sidebar/ClearIcon/index.js.map +1 -0
  441. package/es/views/MainView/sidebar/GeneralOperation/index.js +1 -0
  442. package/es/views/MainView/sidebar/GeneralOperation/index.js.map +1 -0
  443. package/es/views/MainView/sidebar/ImgAttributeInfo/index.js +1 -0
  444. package/es/views/MainView/sidebar/ImgAttributeInfo/index.js.map +1 -0
  445. package/es/views/MainView/sidebar/SwitchAttributeList/index.js +1 -0
  446. package/es/views/MainView/sidebar/SwitchAttributeList/index.js.map +1 -0
  447. package/es/views/MainView/sidebar/TagSidebar/index.js +1 -0
  448. package/es/views/MainView/sidebar/TagSidebar/index.js.map +1 -0
  449. package/es/views/MainView/sidebar/TextAreaFormat/index.js +1 -0
  450. package/es/views/MainView/sidebar/TextAreaFormat/index.js.map +1 -0
  451. package/es/views/MainView/sidebar/TextToolSidebar/index.js +1 -0
  452. package/es/views/MainView/sidebar/TextToolSidebar/index.js.map +1 -0
  453. package/es/views/MainView/sidebar/ToolStyle/index.js +1 -0
  454. package/es/views/MainView/sidebar/ToolStyle/index.js.map +1 -0
  455. package/es/views/MainView/sidebar/index.js +1 -0
  456. package/es/views/MainView/sidebar/index.js.map +1 -0
  457. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/common/index.js +1 -0
  458. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/common/index.js.map +1 -0
  459. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -0
  460. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js.map +1 -0
  461. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/line/index.js +1 -0
  462. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/line/index.js.map +1 -0
  463. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/point/index.js +1 -0
  464. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/point/index.js.map +1 -0
  465. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/polygon/index.js +1 -0
  466. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/polygon/index.js.map +1 -0
  467. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/rectToolShortCutTable/index.js +1 -0
  468. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/rectToolShortCutTable/index.js.map +1 -0
  469. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/tag/index.js +1 -0
  470. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/tag/index.js.map +1 -0
  471. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/text/index.js +1 -0
  472. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/text/index.js.map +1 -0
  473. package/es/views/MainView/toolFooter/FooterTips/index.js +1 -0
  474. package/es/views/MainView/toolFooter/FooterTips/index.js.map +1 -0
  475. package/es/views/MainView/toolFooter/HiddenTips/index.js +1 -0
  476. package/es/views/MainView/toolFooter/HiddenTips/index.js.map +1 -0
  477. package/es/views/MainView/toolFooter/PageNumber/index.js +1 -0
  478. package/es/views/MainView/toolFooter/PageNumber/index.js.map +1 -0
  479. package/es/views/MainView/toolFooter/ZoomController/ZoomLevel/index.js +1 -0
  480. package/es/views/MainView/toolFooter/ZoomController/ZoomLevel/index.js.map +1 -0
  481. package/es/views/MainView/toolFooter/ZoomController/index.js +1 -0
  482. package/es/views/MainView/toolFooter/ZoomController/index.js.map +1 -0
  483. package/es/views/MainView/toolFooter/index.js +1 -0
  484. package/es/views/MainView/toolFooter/index.js.map +1 -0
  485. package/es/views/MainView/toolHeader/ExportData/index.js +1 -0
  486. package/es/views/MainView/toolHeader/ExportData/index.js.map +1 -0
  487. package/es/views/MainView/toolHeader/StepSwitch/index.js +1 -0
  488. package/es/views/MainView/toolHeader/StepSwitch/index.js.map +1 -0
  489. package/es/views/MainView/toolHeader/headerOption/index.js +1 -0
  490. package/es/views/MainView/toolHeader/headerOption/index.js.map +1 -0
  491. package/es/views/MainView/toolHeader/index.js +1 -0
  492. package/es/views/MainView/toolHeader/index.js.map +1 -0
  493. package/package.json +98 -0
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),reactRedux=require("react-redux"),configureStore=require("./configureStore.js"),App=require("./App.js"),actionCreators=require("./store/annotation/actionCreators.js"),lbUtils=require("@sensetime/lb-utils"),reactI18next=require("react-i18next"),index$1=require("./components/AnnotationView/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,r,t)=>r in e?__defProp(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,__spreadValues=(e,r)=>{for(var t in r||(r={}))__hasOwnProp.call(r,t)&&__defNormalProp(e,t,r[t]);if(__getOwnPropSymbols)for(var t of __getOwnPropSymbols(r))__propIsEnum.call(r,t)&&__defNormalProp(e,t,r[t]);return e},__spreadProps=(e,r)=>__defProps(e,__getOwnPropDescs(r));const store=configureStore(),OutputApp=(e,r)=>{const[t,a]=React.useState();return React.useImperativeHandle(r,()=>({toolInstance:t,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!!!")}),[t]),React__default.default.createElement(reactRedux.Provider,{store},React__default.default.createElement(reactI18next.I18nextProvider,{i18n:lbUtils.i18n},React__default.default.createElement(App,__spreadProps(__spreadValues({},e),{setToolInstance:a}))))};var index=React__default.default.forwardRef(OutputApp);Object.defineProperty(exports,"i18n",{enumerable:!0,get:function(){return lbUtils.i18n}}),exports.AnnotationView=index$1,exports.default=index,exports.store=store;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const ANNOTATION_ACTIONS={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",UPDATE_ON_SUBMIT:"@@UPDATE_ON_SUBMIT",UPDATE_ON_SAVE:"@@UPDATE_ON_SAVE",UPDATE_ROTATE:"@@UPDATE_ROTATE",UPDATE_GET_FILE_DATA:"@@UPDATE_GET_FILE_DATA",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",SET_LOADING:"@@SET_LOADING"},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;
@@ -0,0 +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");const dispatchTasks=(e,t)=>t.map(n=>e(n)),getSubmitByPageOperation=e=>e===AnnotationSize.EPageTurningOperation.Forward?index.ESubmitType.Forward:e===AnnotationSize.EPageTurningOperation.Backward?index.ESubmitType.Backward:e===AnnotationSize.EPageTurningOperation.Jump?index.ESubmitType.Jump:index.ESubmitType.Forward,getBasicIndex=(e,t)=>{var n,a;const{imgList:o,imgIndex:T}=e,{dataSourceStep:s}=reducer.getStepConfig(e.stepList,e.step);return((a=(n=index$1.jsonParser(o[T-1].result)[`step_${s}`])==null?void 0:n.result)==null?void 0:a.length)-1||t};function UpdateImgList(e){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_IMG_LIST,payload:{imgList:e}}}function SetTaskConfig({stepList:e,step:t}){return{type:Actions.ANNOTATION_ACTIONS.SET_TASK_CONFIG,payload:{stepList:e,step:t}}}function UpdateOnSubmit(e){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_SUBMIT,payload:{onSubmit:e}}}function UpdateOnSave(e){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ON_SAVE,payload:{onSave:e}}}function UpdateGetFileData(e){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_GET_FILE_DATA,payload:{getFileData:e}}}function UpdateRotate(){return{type:Actions.ANNOTATION_ACTIONS.UPDATE_ROTATE}}function CopyBackWordResult(){return{type:Actions.ANNOTATION_ACTIONS.COPY_BACKWARD_RESULT}}function InitTaskData({onSubmit:e,onSave:t,getFileData:n,imgList:a,step:o,stepList:T,initialIndex:s}){const r=[];return e&&r.push(UpdateOnSubmit(e)),t&&r.push(UpdateOnSave(t)),n&&r.push(UpdateGetFileData(n)),r.push(UpdateImgList(a)),r.push(SetTaskConfig({stepList:T,step:o})),r.push({type:Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS}),r.push({type:Actions.ANNOTATION_ACTIONS.INIT_TOOL}),r.push(reducer.LoadImageAndFileData(s)),i=>dispatchTasks(i,r)}const ToNextStep=e=>(t,n)=>{const{step:a}=n().annotation;return[t(UpdateProcessingStep(a+1,e))]},UpdateProcessingStep=(e,t)=>(n,a)=>{var o,T,s;const r=(s=(T=(o=a())==null?void 0:o.annotation)==null?void 0:T.imgIndex)!=null?s: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:e}}),n({type:Actions.ANNOTATION_ACTIONS.CALC_STEP_PROGRESS}),n(reducer.LoadImageAndFileData(t!=null?t:r,0))]},ToSubmitFileData=e=>t=>[t({type:Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT}),t({type:Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA,payload:{submitType:e}})],SubmitAndChangeFileIndex=(e,t,n,a)=>[e(ToSubmitFileData(n)),e(reducer.LoadImageAndFileData(t,a))],ChangeBasicIndex=(e,t)=>[e({type:Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT}),e({type:Actions.ANNOTATION_ACTIONS.SET_BASIC_INDEX,payload:{basicIndex:t}})],ChangeTriggerEventAfterIndexChanged=(e,t)=>{e({type:Actions.ANNOTATION_ACTIONS.SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED,payload:{triggerEventAfterIndexChanged:t}})},PageBackward=(e=!1)=>(t,n)=>DispatcherTurning(t,n,AnnotationSize.EPageTurningOperation.Backward,e),PageForward=(e=!1)=>(t,n)=>DispatcherTurning(t,n,AnnotationSize.EPageTurningOperation.Forward,e),PageJump=(e,t=!1)=>(n,a)=>{if(e!==a().imgIndex)return DispatcherTurning(n,a,AnnotationSize.EPageTurningOperation.Jump,t,e)},DispatcherTurning=(e,t,n,a=!1,o)=>{const T=t().annotation,{fileIndexChanged:s,fileIndex:r,basicIndexChanged:i,basicIndex:A}=PageOperator.getNextPageInfo(n,T,o),p=getSubmitByPageOperation(n);if(ChangeTriggerEventAfterIndexChanged(e,a),s){const N=p===index.ESubmitType.Backward?getBasicIndex(T,A):A;return SubmitAndChangeFileIndex(e,r,p,N)}return i?ChangeBasicIndex(e,A):e(ToSubmitFileData(p))},ChangeSave=e=>{e(ToSubmitFileData(index.ESubmitType.Save)),e({type:Actions.ANNOTATION_ACTIONS.SAVE_RESULT})},SetAnnotationLoading=(e,t)=>{e({type:Actions.ANNOTATION_ACTIONS.SET_LOADING,payload:{loading:t}})};exports.ChangeSave=ChangeSave,exports.CopyBackWordResult=CopyBackWordResult,exports.DispatcherTurning=DispatcherTurning,exports.InitTaskData=InitTaskData,exports.PageBackward=PageBackward,exports.PageForward=PageForward,exports.PageJump=PageJump,exports.SetAnnotationLoading=SetAnnotationLoading,exports.SetTaskConfig=SetTaskConfig,exports.ToNextStep=ToNextStep,exports.ToSubmitFileData=ToSubmitFileData,exports.UpdateGetFileData=UpdateGetFileData,exports.UpdateImgList=UpdateImgList,exports.UpdateOnSave=UpdateOnSave,exports.UpdateOnSubmit=UpdateOnSubmit,exports.UpdateProcessingStep=UpdateProcessingStep,exports.UpdateRotate=UpdateRotate;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Actions=require("../Actions.js"),_=require("lodash"),data=require("../../utils/data.js"),index=require("../../utils/index.js"),StepUtils=require("../../utils/StepUtils.js"),AnnotationDataUtils=require("../../utils/AnnotationDataUtils.js"),ConfigUtils=require("../../utils/ConfigUtils.js"),styleString=require("../../constant/styleString.js"),index$1=require("../../components/customResizeHook/index.js"),annotation=require("@sensetime/annotation"),es=require("antd/es"),actionCreators=require("./actionCreators.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,o)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,__spreadValues=(e,t)=>{for(var o in t||(t={}))__hasOwnProp.call(t,o)&&__defNormalProp(e,o,t[o]);if(__getOwnPropSymbols)for(var o of __getOwnPropSymbols(t))__propIsEnum.call(t,o)&&__defNormalProp(e,o,t[o]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t)),__async=(e,t,o)=>new Promise((T,c)=>{var p=l=>{try{N(o.next(l))}catch(E){c(E)}},g=l=>{try{N(o.throw(l))}catch(E){c(E)}},N=l=>l.done?T(l.value):Promise.resolve(l.value).then(p,g);N((o=o.apply(e,t)).next())});const getStepConfig=(e,t)=>e.find(o=>o.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,triggerEventAfterIndexChanged:!1},getTotalPage=e=>{const{imgList:t,imgPageSize:o}=e;return Math.ceil(t.length/o)},calcStepProgress=(e,t)=>e.reduce((o,T)=>{const c=T.result;return index.jsonParser(c)[`step_${t}`]?o+1:o},0)/e.length,updateToolInstance=(e,t)=>{const{step:o,stepList:T}=e,c=StepUtils.getCurrentStepInfo(o,T),p=ConfigUtils.ConfigUtils.jsonParser(c.config),g=document.getElementById("toolContainer");if(!g)throw"Not exist dom named id-toolContainer";const N=index$1.getFormatSize({width:window.innerWidth,height:window.innerHeight}),l=new annotation.AnnotationEngine({container:g,toolName:c.tool,size:N,imgNode:t,config:p,style:JSON.parse(styleString)});return{toolInstance:l.toolInstance,annotationEngine:l}},LoadImageAndFileData=(e,t)=>(o,T)=>__async(void 0,null,function*(){const{getFileData:c,imgList:p,toolInstance:g}=T().annotation;if(actionCreators.SetAnnotationLoading(o,!0),c){const l=yield c(p[e],e);o({type:Actions.ANNOTATION_ACTIONS.SET_FILE_DATA,payload:{fileData:l,index:e}})}const{url:N}=p[e];return annotation.ImgUtils.load(N).then(l=>{actionCreators.SetAnnotationLoading(o,!1),o({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{imgNode:l,nextIndex:e,nextBasicIndex:t}})}).catch(()=>{actionCreators.SetAnnotationLoading(o,!1),g.setErrorImg(),o({type:Actions.ANNOTATION_ACTIONS.LOAD_FILE_DATA,payload:{nextIndex:e,nextBasicIndex:t}})})}),annotationReducer=(e=initialState,t)=>{var o,T,c,p,g,N,l,E,h,b,x,F,j,w,U;switch(t.type){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:s}=e,r=calcStepProgress(n,s);return __spreadProps(__spreadValues({},e),{stepProgress:r})}case Actions.ANNOTATION_ACTIONS.SUBMIT_FILE_DATA:{const{imgList:n,imgIndex:s,step:r,stepList:i,toolInstance:a,onSubmit:u,resultList:A}=e;if(!a)return e;const I=((o=n[s])==null?void 0:o.result)||"",[,d]=a.exportData(),O=data.composeResultWithBasicImgInfo(I,d),m=data.composeResult(O,{step:r,stepList:i},{rect:A});n[s].result=AnnotationDataUtils.dataCorrection(m,I,r,i),u&&u([n[s]],(T=t.payload)==null?void 0:T.submitType,s);const f=calcStepProgress(n,r);return __spreadProps(__spreadValues({},e),{stepProgress:f,imgList:n})}case Actions.ANNOTATION_ACTIONS.SAVE_RESULT:{const{imgList:n,imgIndex:s,onSave:r}=e;return r==null||r(n[s],s,n),__spreadValues({},e)}case Actions.ANNOTATION_ACTIONS.SUBMIT_RESULT:{const{imgList:n,basicIndex:s,resultList:r,annotationEngine:i,basicResultList:a}=e;if(!i)return e;const[u]=i.toolInstance.exportData();let A=u;if((a==null?void 0:a.length)>0){const I=(c=a[s])==null?void 0:c.id,d=u.map(O=>__spreadProps(__spreadValues({},O),{sourceID:I}));A=___default.default.cloneDeep(r).filter(O=>O.sourceID!==I),A.push(...d)}return __spreadProps(__spreadValues({},e),{resultList:A,imgList:n})}case Actions.ANNOTATION_ACTIONS.SET_BASIC_INDEX:{const{toolInstance:n,step:s,imgList:r,imgIndex:i,stepList:a,annotationEngine:u,resultList:A,basicResultList:I}=e;if(!n||!u)return e;const d=t.payload.basicIndex,O=(p=I[d])==null?void 0:p.id,m=index.jsonParser((g=r[i])==null?void 0:g.result),f=(A||[]).filter(P=>P.sourceID===O),L=getStepConfig(a,s),{dataSourceStep:C,tool:R}=L,D=getStepConfig(a,C);let S=[];return C&&R&&(S=(N=m[`step_${C}`])==null?void 0:N.result,(S==null?void 0:S.length)>0?(u.setBasicInfo(D.tool,S[d]),u.launchOperation()):(u.setBasicInfo(D.tool),u.forbidOperation(),es.message.info("\u5F53\u524D\u6587\u4EF6\u4E0D\u5B58\u5728\u4F9D\u8D56\u6570\u636E"))),n.setResult(f),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:s,toolInstance:r,annotationEngine:i,stepList:a}=e;if(!r||!i)return e;const u=StepUtils.getCurrentStepInfo(s,a),{nextIndex:A,imgNode:I,nextBasicIndex:d,imgError:O}=t.payload,m=d!=null?d:0,f=index.jsonParser((l=n[A])==null?void 0:l.result),L=f[`step_${s}`],C=!L,R={rotate:(E=f.rotate)!=null?E:0,valid:(h=f.valid)!=null?h:!0};I&&O!==!0&&i.setImgNode(I,R);const D=getStepConfig(a,s),{dataSourceStep:S,tool:P}=D,B=getStepConfig(a,S),q=S&&P,v=(x=(b=f[`step_${S}`])==null?void 0:b.result)!=null?x:[],y=AnnotationDataUtils.getInitialResultList(L==null?void 0:L.result,r,D,v,C);if(i.launchOperation(),q&&((v==null?void 0:v.length)>0?i.setBasicInfo(B.tool,v[m]):(i.setBasicInfo(B.tool),i.forbidOperation(),es.message.info("\u5F53\u524D\u6587\u4EF6\u4E0D\u5B58\u5728\u4F9D\u8D56\u6570\u636E"))),u.tool!=="check"){const G=(j=(F=v[m])==null?void 0:F.id)!=null?j:"",z=q?y.filter(M=>annotation.CommonToolUtils.isSameSourceID(M.sourceID,G)):y;r.setResult(z),r.history.initRecord(y,!0)}return __spreadProps(__spreadValues({},e),{imgIndex:A,basicIndex:m,basicResultList:v,resultList:y})}case Actions.ANNOTATION_ACTIONS.UPDATE_ANNOTATION_CONFIG:return __spreadProps(__spreadValues({},e),{config:(w=t.payload.config)!=null?w:"{}"});case Actions.ANNOTATION_ACTIONS.SET_TASK_CONFIG:{const{stepList:n,step:s}=t.payload;return __spreadProps(__spreadValues({},e),{stepList:n,step:s})}case Actions.ANNOTATION_ACTIONS.INIT_TOOL:{const{imgNode:n}=e,{toolInstance:s,annotationEngine:r}=updateToolInstance(e,n);return __spreadProps(__spreadValues({},e),{toolInstance:s,annotationEngine:r})}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_GET_FILE_DATA:return __spreadProps(__spreadValues({},e),{getFileData:t.payload.getFileData});case Actions.ANNOTATION_ACTIONS.SET_FILE_DATA:{const{fileData:n,index:s}=t.payload,{imgList:r}=e;return r[s]=__spreadValues(__spreadValues({},r[s]),n),__spreadProps(__spreadValues({},e),{imgList:r})}case Actions.ANNOTATION_ACTIONS.UPDATE_ROTATE:{const{toolInstance:n}=e;return n==null||n.updateRotate(),e}case Actions.ANNOTATION_ACTIONS.COPY_BACKWARD_RESULT:{const{toolInstance:n,imgIndex:s,imgList:r,step:i}=e;if(!n)return e;if(s===0||s>=r.length)return console.error("\u65E0\u6CD5\u590D\u5236\u8FB9\u754C\u5916\u7684\u5185\u5BB9"),e;const a=r[s-1].result;if(!a)return e;const u=AnnotationDataUtils.copyResultChange(a,i,(U=r[s].result)!=null?U:"");r[s].result=u;const I=index.jsonParser(u)[`step_${i}`],d=(I==null?void 0:I.result)||[];return n.setResult(d),n.history.pushHistory(d),__spreadProps(__spreadValues({},e),{imgList:[...r]})}case Actions.ANNOTATION_ACTIONS.SET_STEP:{const{stepList:n,annotationEngine:s}=e,{toStep:r}=t.payload;if(!s)return e;if(r<=n.length){const i=getStepConfig(n,r);return s.setToolName(i.tool,i.config),__spreadProps(__spreadValues({},e),{step:r,toolInstance:s.toolInstance})}break}case Actions.ANNOTATION_ACTIONS.SET_LOADING:{const{loading:n}=t.payload;return __spreadProps(__spreadValues({},e),{loading:!!n})}default:return e}return e};exports.LoadImageAndFileData=LoadImageAndFileData,exports.annotationReducer=annotationReducer,exports.getStepConfig=getStepConfig,exports.getTotalPage=getTotalPage;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Actions=require("../Actions.js");function UpdateImgAttribute(t){return{type:Actions.IMAGE_ATTRIBUTE_ACTIONS.UPDATE_IMG_ATTRIBUTE,payload:t}}function InitImgAttribute(){return{type:Actions.IMAGE_ATTRIBUTE_ACTIONS.INIT_IMG_ATTRIBUTE,payload:{}}}var ImgAttribute={UpdateImgAttribute,InitImgAttribute};exports.InitImgAttribute=InitImgAttribute,exports.UpdateImgAttribute=UpdateImgAttribute,exports.default=ImgAttribute;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Actions=require("../Actions.js"),__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,r,t)=>r in e?__defProp(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,__spreadValues=(e,r)=>{for(var t in r||(r={}))__hasOwnProp.call(r,t)&&__defNormalProp(e,t,r[t]);if(__getOwnPropSymbols)for(var t of __getOwnPropSymbols(r))__propIsEnum.call(r,t)&&__defNormalProp(e,t,r[t]);return e};const initialState={contrast:1,saturation:1,brightness:1,zoomRatio:1,isOriginalSize:!1};function imgAttributeReducer(e=__spreadValues({},initialState),r){switch(r.type){case Actions.IMAGE_ATTRIBUTE_ACTIONS.UPDATE_IMG_ATTRIBUTE:return __spreadValues(__spreadValues({},e),r.payload);case Actions.IMAGE_ATTRIBUTE_ACTIONS.INIT_IMG_ATTRIBUTE:return __spreadValues({},initialState);default:return e}}exports.imgAttributeReducer=imgAttributeReducer;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var redux=require("redux"),reducer=require("./annotation/reducer.js"),reducer$1=require("./imgAttribute/reducer.js"),reducer$2=require("./toolStyle/reducer.js");const rootReducer=redux.combineReducers({annotation:reducer.annotationReducer,imgAttribute:reducer$1.imgAttributeReducer,toolStyle:reducer$2.toolStyleReducer});exports.rootReducer=rootReducer;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Actions=require("../Actions.js");function InitToolStyleConfig(){return{type:Actions.TOOL_STYLE_ACTIONS.INIT_TOOL_STYLE_CONFIG,payload:void 0}}function UpdateToolStyleConfig(e){return{type:Actions.TOOL_STYLE_ACTIONS.UPDATE_TOOL_STYLE_CONFIG,payload:e}}exports.InitToolStyleConfig=InitToolStyleConfig,exports.UpdateToolStyleConfig=UpdateToolStyleConfig;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var Style=require("../../data/Style.js"),ToolStyleUtils=require("../../utils/ToolStyleUtils.js"),Actions=require("../Actions.js"),__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(r,t,e)=>t in r?__defProp(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,__spreadValues=(r,t)=>{for(var e in t||(t={}))__hasOwnProp.call(t,e)&&__defNormalProp(r,e,t[e]);if(__getOwnPropSymbols)for(var e of __getOwnPropSymbols(t))__propIsEnum.call(t,e)&&__defNormalProp(r,e,t[e]);return r};const initialState={color:1,width:2,borderOpacity:9,fillOpacity:9,toolColor:ToolStyleUtils.ToolStyleUtils.getToolColors(),attributeColor:ToolStyleUtils.ToolStyleUtils.getAttributeColors(),lineColor:ToolStyleUtils.ToolStyleUtils.getDefaultToolLineColors(),attributeLineColor:[Style.NULL_COLOR].concat(Style.COLORS_ARRAY)};function toolStyleReducer(r=__spreadValues({},initialState),t){switch(t.type){case Actions.TOOL_STYLE_ACTIONS.INIT_TOOL_STYLE_CONFIG:return __spreadValues({},initialState);case Actions.TOOL_STYLE_ACTIONS.UPDATE_TOOL_STYLE_CONFIG:{const e={},o=t.payload;return((o==null?void 0:o.borderOpacity)||(o==null?void 0:o.fillOpacity))&&Object.assign(e,ToolStyleUtils.ToolStyleUtils.initByOpacity(o.borderOpacity||r.borderOpacity,o.fillOpacity||r.fillOpacity)),__spreadValues(__spreadValues(__spreadValues({},r),t.payload),e)}default:return r}}exports.toolStyleReducer=toolStyleReducer;
@@ -0,0 +1,41 @@
1
+ import React from 'react';
2
+ import { IStepInfo } from './types/step';
3
+ import { OnSubmit, GetFileData, OnSave } from './types/data';
4
+ import { ToolInstance } from './store/annotation/types';
5
+ export interface AppProps {
6
+ exportData?: (data: any[]) => void;
7
+ goBack?: () => void;
8
+ imgList: string[];
9
+ config: string;
10
+ stepList: IStepInfo[];
11
+ step: number;
12
+ onSubmit?: OnSubmit;
13
+ onSave?: OnSave;
14
+ getFileData?: GetFileData;
15
+ headerName?: string;
16
+ initialIndex?: number;
17
+ className?: string;
18
+ toolInstance: ToolInstance;
19
+ header?: React.ReactNode;
20
+ footer?: React.ReactNode;
21
+ sider?: React.ReactNode;
22
+ style?: {
23
+ layout?: {
24
+ [key: string]: any;
25
+ };
26
+ header?: {
27
+ [key: string]: any;
28
+ };
29
+ sider?: {
30
+ [key: string]: any;
31
+ };
32
+ footer?: {
33
+ [key: string]: any;
34
+ };
35
+ };
36
+ setToolInstance?: (tool: ToolInstance) => void;
37
+ mode?: 'light' | 'dark';
38
+ defaultLang: 'en' | 'cn';
39
+ }
40
+ declare const _default: import("react-redux").ConnectedComponent<React.FC<AppProps>, import("react-redux").Omit<AppProps, "toolInstance">>;
41
+ export default _default;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * 用于标注查看模式
3
+ * @author laoluo
4
+ */
5
+ import React from 'react';
6
+ interface IProps {
7
+ src: string;
8
+ size: {
9
+ width: number;
10
+ height: number;
11
+ };
12
+ style: {
13
+ color?: string;
14
+ fill?: string;
15
+ thickness?: number;
16
+ };
17
+ annotations: any[];
18
+ zoomChange?: (zoom: number) => void;
19
+ backgroundStyle: React.CSSProperties;
20
+ onChange?: (type: 'hover' | 'selected', ids: string[]) => void;
21
+ showLoading?: boolean;
22
+ }
23
+ declare const _default: React.ForwardRefExoticComponent<IProps & React.RefAttributes<unknown>>;
24
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ interface IProps {
3
+ width?: number;
4
+ height?: number;
5
+ reloadImage: () => void;
6
+ hideSetInvalidTips?: boolean;
7
+ /** 忽略顶部的偏移,如: 多边形的容器已经计算好高度(容器不包含顶部标注提示语部分) */
8
+ ignoreOffsetY?: boolean;
9
+ layerStyle?: React.CSSProperties;
10
+ backgroundColor: string;
11
+ fileTypeName?: string;
12
+ }
13
+ declare const ImageError: (props: IProps) => JSX.Element;
14
+ export default ImageError;
@@ -0,0 +1,8 @@
1
+ import { IStepInfo } from '@/types/step';
2
+ interface IProps {
3
+ stepList: IStepInfo[];
4
+ currentStep: number;
5
+ updateStep: (step: number) => void;
6
+ }
7
+ declare const AnnotationStepPopover: (props: IProps) => JSX.Element;
8
+ export default AnnotationStepPopover;
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ export declare const ATTRIBUTE_COLORS: string[];
3
+ interface IProps {
4
+ list: Array<{
5
+ label: string;
6
+ value: string;
7
+ }>;
8
+ selectedAttribute: string;
9
+ attributeChanged: (v: string) => void;
10
+ forbidDefault?: boolean;
11
+ forbidColor?: boolean;
12
+ noHeightLimit?: boolean;
13
+ num?: number;
14
+ }
15
+ declare const AttributeList: React.ForwardRefExoticComponent<IProps & React.RefAttributes<unknown>>;
16
+ export default AttributeList;
@@ -0,0 +1,8 @@
1
+ interface IProps {
2
+ selectedAttribute: string[];
3
+ attributeChanged: () => void;
4
+ num?: any;
5
+ list?: any[];
6
+ }
7
+ declare const CheckboxList: (props: IProps) => JSX.Element;
8
+ export default CheckboxList;
@@ -0,0 +1 @@
1
+ export declare const ColorTag: ({ color, style }: any) => JSX.Element;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ interface IProps {
3
+ text: string;
4
+ Icon: any;
5
+ iconChildren: React.ReactNode;
6
+ marginLeft?: number;
7
+ }
8
+ declare const IconWithText: (props: IProps) => JSX.Element;
9
+ export default IconWithText;
@@ -0,0 +1,31 @@
1
+ import React from 'react';
2
+ import { ISize } from '@/types/main';
3
+ export declare const viewportContext: React.Context<{
4
+ width: number;
5
+ height: number;
6
+ }>;
7
+ export declare const ViewportProviderComponent: (props: any) => JSX.Element;
8
+ export declare const ViewportProvider: import("react-redux").ConnectedComponent<(props: any) => JSX.Element, import("react-redux").Omit<any, "annotation" | "dispatch">>;
9
+ export declare const useViewport: () => {
10
+ width: number;
11
+ height: number;
12
+ };
13
+ /**
14
+ * 获取当前 canvas 的大小
15
+ * @param isEdit 是否为编辑模式
16
+ * @param isTips 是否有 tips
17
+ */
18
+ export declare const useCanvasViewPort: (isEdit?: boolean, isTips?: boolean) => {
19
+ width: number;
20
+ height: number;
21
+ };
22
+ /**
23
+ * 解析当前 windowSize 下的 canvasSize
24
+ * @param size
25
+ * @param isEdit
26
+ * @param isTips
27
+ */
28
+ export declare const getFormatSize: (windowSize: ISize, isEdit?: boolean, isTips?: boolean) => {
29
+ width: number;
30
+ height: number;
31
+ };
@@ -0,0 +1,3 @@
1
+ export default function configureStore(): import("redux").Store<{}, import("redux").Action<any>> & {
2
+ dispatch: unknown;
3
+ };
@@ -0,0 +1,18 @@
1
+ export declare enum EStepType {
2
+ Check = 0,
3
+ ANNOTATION = 1,
4
+ QUALITY_INSPECTION = 2,
5
+ PRE_ANNOTATION = 3,
6
+ MANUAL_CORRECTION = 4
7
+ }
8
+ export declare enum ESubmitType {
9
+ Backward = 1,
10
+ Forward = 2,
11
+ Jump = 3,
12
+ Quit = 4,
13
+ Export = 5,
14
+ StepChanged = 6,
15
+ Save = 7
16
+ }
17
+ export declare const prefix = "bee";
18
+ export declare const componentCls: string;
@@ -0,0 +1,2 @@
1
+ declare const styleString = "{\"toolColor\":{\"1\":{\"valid\":{\"stroke\":\"rgba(0,0,255,0.50)\",\"fill\":\"rgba(0,0,255,0.40)\"},\"invalid\":{\"stroke\":\"rgba(255,153,102,1.00)\",\"fill\":\"rgba(255,153,102,0.80)\"},\"validSelected\":{\"stroke\":\"rgba(0,15,255,1.00)\",\"fill\":\"rgba(0,15,255,0.80)\"},\"invalidSelected\":{\"stroke\":\"rgba(255,0,0,0.60)\",\"fill\":\"rgba(255,0,0,0.24)\"},\"validHover\":{\"stroke\":\"rgba(0,15,255,0.80)\",\"fill\":\"rgba(0,15,255,0.64)\"},\"invalidHover\":{\"stroke\":\"rgba(255,0,0,0.50)\",\"fill\":\"rgba(255,0,0,0.40)\"}},\"3\":{\"valid\":{\"stroke\":\"rgba(0,255,255,0.50)\",\"fill\":\"rgba(0,255,255,0.40)\"},\"invalid\":{\"stroke\":\"rgba(255,153,102,1.00)\",\"fill\":\"rgba(255,153,102,0.80)\"},\"validSelected\":{\"stroke\":\"rgba(0,212,255,1.00)\",\"fill\":\"rgba(0,212,255,0.80)\"},\"invalidSelected\":{\"stroke\":\"rgba(255,0,0,0.60)\",\"fill\":\"rgba(255,0,0,0.24)\"},\"validHover\":{\"stroke\":\"rgba(0,212,255,0.80)\",\"fill\":\"rgba(0,212,255,0.64)\"},\"invalidHover\":{\"stroke\":\"rgba(255,0,0,0.50)\",\"fill\":\"rgba(255,0,0,0.40)\"}},\"5\":{\"valid\":{\"stroke\":\"rgba(0,255,0,0.50)\",\"fill\":\"rgba(0,255,0,0.40)\"},\"invalid\":{\"stroke\":\"rgba(255,153,102,1.00)\",\"fill\":\"rgba(255,153,102,0.80)\"},\"validSelected\":{\"stroke\":\"rgba(149,255,1.00)\",\"fill\":\"rgba(149,255,0,0.80)\"},\"invalidSelected\":{\"stroke\":\"rgba(255,0,0,0.60)\",\"fill\":\"rgba(255,0,0,0.24)\"},\"validHover\":{\"stroke\":\"rgba(149,255,0,0.80)\",\"fill\":\"rgba(149,255,0,0.64)\"},\"invalidHover\":{\"stroke\":\"rgba(255,0,0,0.50)\",\"fill\":\"rgba(255,0,0,0.40)\"}},\"7\":{\"valid\":{\"stroke\":\"rgba(255,255,0,0.50)\",\"fill\":\"rgba(255,255,0,0.40)\"},\"invalid\":{\"stroke\":\"rgba(255,153,102,1.00)\",\"fill\":\"rgba(255,153,102,0.80)\"},\"validSelected\":{\"stroke\":\"rgba(255,230,102,1.00)\",\"fill\":\"rgba(255,213,0,0.80)\"},\"invalidSelected\":{\"stroke\":\"rgba(255,0,0,0.60)\",\"fill\":\"rgba(255,0,0,0.24)\"},\"validHover\":{\"stroke\":\"rgba(255,230,102,0.80)\",\"fill\":\"rgba(255,230,102,0.64)\"},\"invalidHover\":{\"stroke\":\"rgba(255,0,0,0.50)\",\"fill\":\"rgba(255,0,0,0.40)\"}},\"9\":{\"valid\":{\"stroke\":\"rgba(255,0,255,0.50)\",\"fill\":\"rgba(255,0,255,0.40)\"},\"invalid\":{\"stroke\":\"rgba(255,153,102,1.00)\",\"fill\":\"rgba(255,153,102,0.80)\"},\"validSelected\":{\"stroke\":\"rgba(230,102,255,1.00)\",\"fill\":\"rgba(213,0,255,0.80)\"},\"invalidSelected\":{\"stroke\":\"rgba(255,0,0,0.60)\",\"fill\":\"rgba(255,0,0,0.24)\"},\"validHover\":{\"stroke\":\"rgba(230,102,255,0.80)\",\"fill\":\"rgba(230,102,255,0.64)\"},\"invalidHover\":{\"stroke\":\"rgba(255,0,0,0.50)\",\"fill\":\"rgba(255,0,0,0.40)\"}}},\"attributeColor\":[{\"valid\":{\"stroke\":\"rgba(204,204,204,1.00)\",\"fill\":\"rgba(204,204,204,0.40)\"},\"invalid\":{\"stroke\":\"rgba(255,153,102,1.00)\",\"fill\":\"rgba(255,153,102,0.40)\"},\"validSelected\":{\"stroke\":\"rgba(204,204,204,1.00)\",\"fill\":\"rgba(204,204,204,0.80)\"},\"invalidSelected\":{\"stroke\":\"rgba(255,0,0,1.00)\",\"fill\":\"rgba(255,0,0,0.80)\"},\"validHover\":{\"stroke\":\"rgba(204,204,204,1.00)\",\"fill\":\"rgba(204,204,204,0.80)\"},\"invalidHover\":{\"stroke\":\"rgba(255,0,0,1.00)\",\"fill\":\"rgba(255,0,0,0.80)\"}},{\"valid\":{\"stroke\":\"rgba(153,51,255,1.00)\",\"fill\":\"rgba(153,51,255,0.40)\"},\"invalid\":{\"stroke\":\"rgba(255,153,102,1.00)\",\"fill\":\"rgba(255,153,102,0.40)\"},\"validSelected\":{\"stroke\":\"rgba(153,51,255,1.00)\",\"fill\":\"rgba(153,51,255,0.80)\"},\"invalidSelected\":{\"stroke\":\"rgba(255,0,0,1.00)\",\"fill\":\"rgba(255,0,0,0.80)\"},\"validHover\":{\"stroke\":\"rgba(153,51,255,1.00)\",\"fill\":\"rgba(153,51,255,0.80)\"},\"invalidHover\":{\"stroke\":\"rgba(255,0,0,1.00)\",\"fill\":\"rgba(255,0,0,0.80)\"}},{\"valid\":{\"stroke\":\"rgba(51,254,51,1.00)\",\"fill\":\"rgba(51,254,51,0.40)\"},\"invalid\":{\"stroke\":\"rgba(255,153,102,1.00)\",\"fill\":\"rgba(255,153,102,0.40)\"},\"validSelected\":{\"stroke\":\"rgba(51,254,51,1.00)\",\"fill\":\"rgba(51,254,51,0.80)\"},\"invalidSelected\":{\"stroke\":\"rgba(255,0,0,1.00)\",\"fill\":\"rgba(255,0,0,0.80)\"},\"validHover\":{\"stroke\":\"rgba(51,254,51,1.00)\",\"fill\":\"rgba(51,254,51,0.80)\"},\"invalidHover\":{\"stroke\":\"rgba(255,0,0,1.00)\",\"fill\":\"rgba(255,0,0,0.80)\"}},{\"valid\":{\"stroke\":\"rgba(255,51,255,1.00)\",\"fill\":\"rgba(255,51,255,0.40)\"},\"invalid\":{\"stroke\":\"rgba(255,153,102,1.00)\",\"fill\":\"rgba(255,153,102,0.40)\"},\"validSelected\":{\"stroke\":\"rgba(255,51,255,1.00)\",\"fill\":\"rgba(255,51,255,0.80)\"},\"invalidSelected\":{\"stroke\":\"rgba(255,0,0,1.00)\",\"fill\":\"rgba(255,0,0,0.80)\"},\"validHover\":{\"stroke\":\"rgba(255,51,255,1.00)\",\"fill\":\"rgba(255,51,255,0.80)\"},\"invalidHover\":{\"stroke\":\"rgba(255,0,0,1.00)\",\"fill\":\"rgba(255,0,0,0.80)\"}},{\"valid\":{\"stroke\":\"rgba(204,255,51,1.00)\",\"fill\":\"rgba(204,255,51,0.40)\"},\"invalid\":{\"stroke\":\"rgba(255,153,102,1.00)\",\"fill\":\"rgba(255,153,102,0.40)\"},\"validSelected\":{\"stroke\":\"rgba(204,255,51,1.00)\",\"fill\":\"rgba(204,255,51,0.80)\"},\"invalidSelected\":{\"stroke\":\"rgba(255,0,0,1.00)\",\"fill\":\"rgba(255,0,0,0.80)\"},\"validHover\":{\"stroke\":\"rgba(204,255,51,1.00)\",\"fill\":\"rgba(204,255,51,0.80)\"},\"invalidHover\":{\"stroke\":\"rgba(255,0,0,1.00)\",\"fill\":\"rgba(255,0,0,0.80)\"}},{\"valid\":{\"stroke\":\"rgba(51,153,255,1.00)\",\"fill\":\"rgba(51,153,255,0.40)\"},\"invalid\":{\"stroke\":\"rgba(255,153,102,1.00)\",\"fill\":\"rgba(255,153,102,0.40)\"},\"validSelected\":{\"stroke\":\"rgba(51,153,255,1.00)\",\"fill\":\"rgba(51,153,255,0.80)\"},\"invalidSelected\":{\"stroke\":\"rgba(255,0,0,1.00)\",\"fill\":\"rgba(255,0,0,0.80)\"},\"validHover\":{\"stroke\":\"rgba(51,153,255,1.00)\",\"fill\":\"rgba(51,153,255,0.80)\"},\"invalidHover\":{\"stroke\":\"rgba(255,0,0,1.00)\",\"fill\":\"rgba(255,0,0,0.80)\"}},{\"valid\":{\"stroke\":\"rgba(255,153,51,1.00)\",\"fill\":\"rgba(255,153,51,0.40)\"},\"invalid\":{\"stroke\":\"rgba(255,153,102,1.00)\",\"fill\":\"rgba(255,153,102,0.40)\"},\"validSelected\":{\"stroke\":\"rgba(255,153,51,1.00)\",\"fill\":\"rgba(255,153,51,0.80)\"},\"invalidSelected\":{\"stroke\":\"rgba(255,0,0,1.00)\",\"fill\":\"rgba(255,0,0,0.80)\"},\"validHover\":{\"stroke\":\"rgba(255,153,51,1.00)\",\"fill\":\"rgba(255,153,51,0.80)\"},\"invalidHover\":{\"stroke\":\"rgba(255,0,0,1.00)\",\"fill\":\"rgba(255,0,0,0.80)\"}},{\"valid\":{\"stroke\":\"rgba(51,255,238,1.00)\",\"fill\":\"rgba(51,255,238,0.40)\"},\"invalid\":{\"stroke\":\"rgba(255,153,102,1.00)\",\"fill\":\"rgba(255,153,102,0.40)\"},\"validSelected\":{\"stroke\":\"rgba(51,255,238,1.00)\",\"fill\":\"rgba(51,255,238,0.80)\"},\"invalidSelected\":{\"stroke\":\"rgba(255,0,0,1.00)\",\"fill\":\"rgba(255,0,0,0.80)\"},\"validHover\":{\"stroke\":\"rgba(51,255,238,1.00)\",\"fill\":\"rgba(51,255,238,0.80)\"},\"invalidHover\":{\"stroke\":\"rgba(255,0,0,1.00)\",\"fill\":\"rgba(255,0,0,0.80)\"}},{\"valid\":{\"stroke\":\"rgba(255,221,51,1.00)\",\"fill\":\"rgba(255,221,51,0.40)\"},\"invalid\":{\"stroke\":\"rgba(255,153,102,1.00)\",\"fill\":\"rgba(255,153,102,0.40)\"},\"validSelected\":{\"stroke\":\"rgba(255,221,51,1.00)\",\"fill\":\"rgba(255,221,51,0.80)\"},\"invalidSelected\":{\"stroke\":\"rgba(255,0,0,1.00)\",\"fill\":\"rgba(255,0,0,0.80)\"},\"validHover\":{\"stroke\":\"rgba(255,221,51,1.00)\",\"fill\":\"rgba(255,221,51,0.80)\"},\"invalidHover\":{\"stroke\":\"rgba(255,0,0,1.00)\",\"fill\":\"rgba(255,0,0,0.80)\"}}],\"lineColor\":{\"1\":\"rgba(102, 111, 255, 1 )\",\"3\":\"rgba(102, 230, 255, 1)\",\"5\":\"rgba(191, 255, 102, 1)\",\"7\":\"rgba(255, 230, 102, 1)\",\"9\":\"rgba(230, 102, 255, 1)\"},\"attributeLineColor\":[\"rgba(204, 204, 204, 1)\",\"rgba(153, 51, 255, 1)\",\"rgba(51, 254, 51, 1)\",\"rgba(255, 51, 255, 1)\",\"rgba(204, 255, 51, 1)\",\"rgba(51, 153, 255, 1)\",\"rgba(255, 153, 51, 1)\",\"rgba(51, 255, 238, 1)\",\"rgba(255, 221, 51, 1)\"],\"color\":1,\"width\":2,\"opacity\":9}";
2
+ export default styleString;
@@ -0,0 +1,37 @@
1
+ export declare const COLORS_ARRAY: string[];
2
+ export declare const NULL_COLOR = "rgba(204, 204, 204, 1)";
3
+ export declare const DEFAULT_COLOR: {
4
+ valid: {
5
+ stroke: string;
6
+ fill: string;
7
+ };
8
+ invalid: {
9
+ stroke: string;
10
+ fill: string;
11
+ };
12
+ validSelected: {
13
+ stroke: string;
14
+ fill: string;
15
+ };
16
+ invalidSelected: {
17
+ stroke: string;
18
+ fill: string;
19
+ };
20
+ validHover: {
21
+ stroke: string;
22
+ fill: string;
23
+ };
24
+ invalidHover: {
25
+ stroke: string;
26
+ fill: string;
27
+ };
28
+ };
29
+ export declare const CHANGE_COLOR: {
30
+ [a: number]: any;
31
+ };
32
+ export declare const BORDER_OPACITY_LEVEL: {
33
+ [a: number]: number;
34
+ };
35
+ export declare const FILL_OPACITY_LEVEL: {
36
+ [a: number]: number;
37
+ };
@@ -0,0 +1,32 @@
1
+ export declare const headerHeight = 61;
2
+ export declare const tipsHeight = 40;
3
+ export declare const footerHeight = 40;
4
+ export declare const sidebarWidth = 240;
5
+ export declare const editStepWidth = 320;
6
+ /** 标注步骤的类型 */
7
+ export declare enum EStepType {
8
+ ANNOTATION = 1,
9
+ QUALITY_INSPECTION = 2,
10
+ PRE_ANNOTATION = 3,
11
+ MANUAL_CORRECTION = 4
12
+ }
13
+ /** 标注工具中最大获取的图片数 */
14
+ export declare const ANNOTATION_MAX_SIZE = 100;
15
+ /** 翻页操作 */
16
+ export declare enum EPageTurningOperation {
17
+ Backward = 0,
18
+ Forward = 1,
19
+ Jump = 2
20
+ }
21
+ /** 拖拽状态 */
22
+ export declare enum EDragStatus {
23
+ Start = 0,
24
+ Stop = 1,
25
+ Wait = 2
26
+ }
27
+ /** 拖拽的内容 */
28
+ export declare enum EDragTarget {
29
+ Point = 0,
30
+ Line = 1,
31
+ Plane = 2
32
+ }
@@ -0,0 +1,43 @@
1
+ export declare enum ETextType {
2
+ AnyString = 0,
3
+ Order = 1,
4
+ EnglishOnly = 2,
5
+ NumberOnly = 3,
6
+ CustomFormat = 4
7
+ }
8
+ /** 文本标注字数上限 */
9
+ export declare const TEXT_ATTRIBUTE_MAX_LENGTH = 1000;
10
+ export declare enum EToolName {
11
+ /** 拉框工具 */
12
+ Rect = "rectTool",
13
+ /** 标签工具 */
14
+ Tag = "tagTool",
15
+ /** 标点工具 */
16
+ Point = "pointTool",
17
+ /** 列表标点工具 */
18
+ PointMarker = "pointMarkerTool",
19
+ /** 前景分割工具 */
20
+ Segmentation = "segmentationTool",
21
+ /** 筛选工具 */
22
+ Filter = "filterTool",
23
+ /** 文本工具 */
24
+ Text = "textTool",
25
+ /** 多边形工具 */
26
+ Polygon = "polygonTool",
27
+ /** 线条 */
28
+ Line = "lineTool",
29
+ /** 列表线条工具 */
30
+ LineMarker = "lineMarkerTool",
31
+ /** 空工具,表示当前没有选择的工具,没有实际的业务逻辑 */
32
+ Empty = "emptyTool",
33
+ /** 文件夹标签工具 */
34
+ FolderTag = "folderTagTool",
35
+ /** 拉框跟踪工具 */
36
+ RectTrack = "rectTrackTool",
37
+ /** 人脸106工具 */
38
+ Face = "faceTool",
39
+ /** 客户端属性工具 */
40
+ ClientAttribute = "clientAttributeTool",
41
+ /** OCR关联关系工具 */
42
+ OCRRelation = "OCRRelationTool"
43
+ }
@@ -0,0 +1,3 @@
1
+ import type { Dispatch, SetStateAction } from 'react';
2
+ declare const useRafState: <S>(initialState: S | (() => S)) => [S, Dispatch<SetStateAction<S>>];
3
+ export default useRafState;
@@ -0,0 +1,4 @@
1
+ import { Dispatch, SetStateAction } from 'react';
2
+ declare function useSafeState<S>(initialState: S | (() => S)): [S, Dispatch<SetStateAction<S>>];
3
+ declare function useSafeState<S = undefined>(): [S | undefined, Dispatch<SetStateAction<S | undefined>>];
4
+ export default useSafeState;
@@ -0,0 +1,7 @@
1
+ import type { BasicTarget } from '../utils/dom';
2
+ interface Size {
3
+ width?: number;
4
+ height?: number;
5
+ }
6
+ declare function useSize(target: BasicTarget): Size;
7
+ export default useSize;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const useUnmountedRef: () => import("react").MutableRefObject<boolean>;
3
+ export default useUnmountedRef;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { i18n } from '@sensetime/lb-utils';
3
+ import AnnotationView from '@/components/AnnotationView';
4
+ export declare const store: import("redux").Store<{}, import("redux").Action<any>> & {
5
+ dispatch: unknown;
6
+ };
7
+ declare const _default: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<unknown>>;
8
+ export default _default;
9
+ export { AnnotationView, i18n };
@@ -0,0 +1,31 @@
1
+ export declare const ANNOTATION_ACTIONS: {
2
+ UPDATE_TOOL_INSTANCE: string;
3
+ UPDATE_IMG_LIST: string;
4
+ UPDATE_ANNOTATION_CONFIG: string;
5
+ LOAD_FILE_DATA: string;
6
+ SUBMIT_FILE_DATA: string;
7
+ SET_TASK_CONFIG: string;
8
+ INIT_TOOL: string;
9
+ UPDATE_ON_SUBMIT: string;
10
+ UPDATE_ON_SAVE: string;
11
+ UPDATE_ROTATE: string;
12
+ UPDATE_GET_FILE_DATA: string;
13
+ GET_FILE_DATA: string;
14
+ SET_FILE_DATA: string;
15
+ COPY_BACKWARD_RESULT: string;
16
+ SET_STEP: string;
17
+ SUBMIT_RESULT: string;
18
+ SAVE_RESULT: string;
19
+ SET_BASIC_INDEX: string;
20
+ CALC_STEP_PROGRESS: string;
21
+ SET_TRIGGER_EVENT_AFTER_INDEX_CHANGED: string;
22
+ SET_LOADING: string;
23
+ };
24
+ export declare const IMAGE_ATTRIBUTE_ACTIONS: {
25
+ UPDATE_IMG_ATTRIBUTE: string;
26
+ INIT_IMG_ATTRIBUTE: string;
27
+ };
28
+ export declare const TOOL_STYLE_ACTIONS: {
29
+ INIT_TOOL_STYLE_CONFIG: string;
30
+ UPDATE_TOOL_STYLE_CONFIG: string;
31
+ };
@@ -0,0 +1,56 @@
1
+ import { IStepInfo } from '@/types/step';
2
+ import { GetFileData, IFileItem, OnSave, OnSubmit } from '@/types/data';
3
+ import { AnnotationActionTypes, ToolInstance } from './types';
4
+ import { ESubmitType } from '@/constant';
5
+ import { EPageTurningOperation } from '@/data/enums/AnnotationSize';
6
+ export declare function UpdateToolInstance(toolInstance: ToolInstance): AnnotationActionTypes;
7
+ export declare function UpdateImgList(imgList: IFileItem[]): AnnotationActionTypes;
8
+ export declare function UpdateAnnotationConfig(config: string): AnnotationActionTypes;
9
+ export declare function SetTaskConfig({ stepList, step, }: {
10
+ stepList: IStepInfo[];
11
+ step: number;
12
+ }): AnnotationActionTypes;
13
+ export declare function UpdateOnSubmit(onSubmit: OnSubmit): AnnotationActionTypes;
14
+ export declare function UpdateOnSave(onSave: OnSave): AnnotationActionTypes;
15
+ export declare function UpdateGetFileData(getFileData: GetFileData): AnnotationActionTypes;
16
+ export declare function UpdateRotate(): AnnotationActionTypes;
17
+ export declare function CopyBackWordResult(): AnnotationActionTypes;
18
+ /**
19
+ * 初始化任务数据
20
+ * @param param0
21
+ */
22
+ export declare function InitTaskData({ onSubmit, onSave, getFileData, imgList, step, stepList, initialIndex, }: any): any;
23
+ /** 切换到下一步 */
24
+ export declare const ToNextStep: (pageNumber?: number | undefined) => (dispatch: any, getState: any) => any[];
25
+ /**
26
+ * 更新当前操作的步骤
27
+ * @param {number} toStep
28
+ */
29
+ export declare const UpdateProcessingStep: (toStep: number, index?: number | undefined) => (dispatch: any, state: any) => any[];
30
+ /**
31
+ * 提交当前的文件数据
32
+ * @param submitType
33
+ */
34
+ export declare const ToSubmitFileData: (submitType: ESubmitType) => (dispatch: any) => any[];
35
+ /** 向前翻页 */
36
+ export declare const PageBackward: (triggerEventAfterIndexChanged?: boolean) => (dispatch: any, getState: any) => any;
37
+ /** 向后翻页 */
38
+ export declare const PageForward: (triggerEventAfterIndexChanged?: boolean) => (dispatch: any, getState: any) => any;
39
+ /**
40
+ * 跳到指定文件索引
41
+ * @param toIndex
42
+ */
43
+ export declare const PageJump: (toIndex: number, triggerEventAfterIndexChanged?: boolean) => (dispatch: any, getState: any) => any;
44
+ /**
45
+ * 判断翻页还是切换依赖数据
46
+ * @param dispatch
47
+ * @param getState
48
+ * @param pageTurningOperation
49
+ * @param toIndex
50
+ */
51
+ export declare const DispatcherTurning: (dispatch: any, getState: any, pageTurningOperation: EPageTurningOperation, triggerEventAfterIndexChanged?: boolean, toIndex?: number | undefined) => any;
52
+ /**
53
+ * 保存当前页数据
54
+ * */
55
+ export declare const ChangeSave: (dispatch: Function) => void;
56
+ export declare const SetAnnotationLoading: (dispatch: Function, loading: boolean) => void;
@@ -0,0 +1,14 @@
1
+ import { AnnotationState, AnnotationActionTypes } from './types';
2
+ export declare const getStepConfig: (stepList: any[], step: number) => any;
3
+ /**
4
+ * 获取当前文件列表的总页数
5
+ * @param state
6
+ */
7
+ export declare const getTotalPage: (state: AnnotationState) => number;
8
+ /**
9
+ * 初始化imgNode并加载数据
10
+ * @param nextIndex
11
+ * @param nextBasicIndex
12
+ */
13
+ export declare const LoadImageAndFileData: (nextIndex: number, nextBasicIndex?: number | undefined) => (dispatch: any, getState: any) => Promise<void>;
14
+ export declare const annotationReducer: (state: AnnotationState | undefined, action: AnnotationActionTypes) => AnnotationState;
@@ -0,0 +1,100 @@
1
+ import { AnnotationEngine, RectOperation, TagOperation, TextToolOperation, PointOperation, PolygonOperation, LineToolOperation } from '@sensetime/annotation';
2
+ import { ANNOTATION_ACTIONS } from '@/store/Actions';
3
+ import { IStepInfo } from '@/types/step';
4
+ import { OnSubmit, IFileItem, GetFileData, OnSave } from '@/types/data';
5
+ import { ESubmitType } from '@/constant';
6
+ export declare type GraphToolInstance = RectOperation | PointOperation | PolygonOperation | LineToolOperation;
7
+ export declare type ToolInstance = GraphToolInstance | TagOperation | TextToolOperation;
8
+ interface CommonActions {
9
+ type: string;
10
+ payload?: any;
11
+ }
12
+ export interface AnnotationState {
13
+ toolInstance: ToolInstance | null;
14
+ annotationEngine: AnnotationEngine | null;
15
+ imgList: IFileItem[];
16
+ config: string;
17
+ imgIndex: number;
18
+ imgPageSize: number;
19
+ step: number;
20
+ stepList: IStepInfo[];
21
+ imgNode: HTMLImageElement;
22
+ onSubmit?: OnSubmit;
23
+ onSave?: OnSave;
24
+ getFileData?: GetFileData;
25
+ basicIndex: number;
26
+ basicResultList: any[];
27
+ resultList: any[];
28
+ stepProgress: number;
29
+ loading: boolean;
30
+ /** 阻止文件切换后的事件 */
31
+ triggerEventAfterIndexChanged: boolean;
32
+ }
33
+ interface UpdateToolInstance {
34
+ type: typeof ANNOTATION_ACTIONS.UPDATE_TOOL_INSTANCE;
35
+ payload: {
36
+ toolInstance: ToolInstance;
37
+ annotationEngine: AnnotationEngine;
38
+ };
39
+ }
40
+ interface UpdateImgList {
41
+ type: typeof ANNOTATION_ACTIONS.UPDATE_IMG_LIST;
42
+ payload: {
43
+ imgList: IFileItem[];
44
+ };
45
+ }
46
+ interface UpdateAnnotationConfig {
47
+ type: typeof ANNOTATION_ACTIONS.UPDATE_ANNOTATION_CONFIG;
48
+ payload: {
49
+ config: string;
50
+ };
51
+ }
52
+ interface SubmitFileData extends CommonActions {
53
+ type: typeof ANNOTATION_ACTIONS.SUBMIT_FILE_DATA;
54
+ payload: {
55
+ submitType: ESubmitType;
56
+ };
57
+ }
58
+ interface LoadFileData extends CommonActions {
59
+ type: typeof ANNOTATION_ACTIONS.LOAD_FILE_DATA;
60
+ payload: {
61
+ nextIndex: number;
62
+ };
63
+ }
64
+ interface SetTaskConfig {
65
+ type: typeof ANNOTATION_ACTIONS.SET_TASK_CONFIG;
66
+ payload: {
67
+ stepList: IStepInfo[];
68
+ step: number;
69
+ };
70
+ }
71
+ interface InitTool {
72
+ type: typeof ANNOTATION_ACTIONS.INIT_TOOL;
73
+ payload: {
74
+ stepList: IStepInfo[];
75
+ step: number;
76
+ };
77
+ }
78
+ interface UpdateOnSubmit {
79
+ type: typeof ANNOTATION_ACTIONS.UPDATE_ON_SUBMIT;
80
+ payload: {
81
+ onSubmit: OnSubmit;
82
+ };
83
+ }
84
+ interface UpdateOnSave {
85
+ type: typeof ANNOTATION_ACTIONS.UPDATE_ON_SAVE;
86
+ payload: {
87
+ onSave: OnSave;
88
+ };
89
+ }
90
+ interface UpdateGetFileData {
91
+ type: typeof ANNOTATION_ACTIONS.UPDATE_GET_FILE_DATA;
92
+ payload: {
93
+ getFileData: GetFileData;
94
+ };
95
+ }
96
+ interface CopyBackWordResult extends CommonActions {
97
+ type: typeof ANNOTATION_ACTIONS.COPY_BACKWARD_RESULT;
98
+ }
99
+ export declare type AnnotationActionTypes = UpdateToolInstance | UpdateImgList | UpdateAnnotationConfig | SubmitFileData | LoadFileData | SetTaskConfig | InitTool | UpdateOnSubmit | UpdateGetFileData | CopyBackWordResult | UpdateOnSave;
100
+ export {};