@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/App.js CHANGED
@@ -1 +1 @@
1
- "use strict";var index$1=require("./views/MainView/index.js"),lbUtils=require("@labelbee/lb-utils"),React=require("react"),reactRedux=require("react-redux"),index=require("./index.js"),ctx=require("./store/ctx.js"),Actions=require("./store/Actions.js"),actionCreators=require("./store/annotation/actionCreators.js"),reducer=require("./store/annotation/reducer.js"),es=require("antd/es"),zhCN=require("antd/es/locale/zh_CN"),enUS=require("antd/es/locale/en_US");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React),zhCN__default=_interopDefaultLegacy(zhCN),enUS__default=_interopDefaultLegacy(enUS),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,a)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,__spreadValues=(e,t)=>{for(var a in t||(t={}))__hasOwnProp.call(t,a)&&__defNormalProp(e,a,t[a]);if(__getOwnPropSymbols)for(var a of __getOwnPropSymbols(t))__propIsEnum.call(t,a)&&__defNormalProp(e,a,t[a]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t));const App=e=>{const[t,a]=React.useState(0),{imgList:o,step:O=1,stepList:i,onSubmit:s,onSave:l,onPageChange:c,onStepChange:u,initialIndex:d=0,toolInstance:P,setToolInstance:I,getFileData:p,pageSize:f=10,loadFileList:r,defaultLang:g="cn",skipBeforePageTurning:S,beforeRotate:v,checkMode:m=!1,intelligentFit:L=!0,highlightAttribute:_="",preDataProcess:h}=e;React.useEffect(()=>{index.store.dispatch(actionCreators.InitTaskData({onSubmit:s,stepList:i,step:O,getFileData:p,pageSize:f,loadFileList:r,onSave:l,onPageChange:c,onStepChange:u,skipBeforePageTurning:S,beforeRotate:v,checkMode:m,highlightAttribute:_,preDataProcess:h})),b(),lbUtils.i18n.changeLanguage(g);const n=()=>{a(C=>C+1)};return lbUtils.i18n.on("languageChanged",n),()=>{lbUtils.i18n.off("languageChanged",n),actionCreators.InitAnnotationState(index.store.dispatch)}},[]),React.useEffect(()=>{index.store.dispatch(actionCreators.UpdateInjectFunc({onSubmit:s,stepList:i,getFileData:p,pageSize:f,loadFileList:r,onSave:l,onPageChange:c,onStepChange:u,beforeRotate:v,highlightAttribute:_,preDataProcess:h})),lbUtils.i18n.changeLanguage(g)},[s,i,p,f,r,l,c,u,g,v,_,h]),React.useEffect(()=>{I==null||I(P)},[P]);const b=()=>{r?actionCreators.loadImgList(index.store.dispatch,index.store.getState,d,!0).then(n=>{n&&index.store.dispatch(reducer.LoadFileAndFileData(d))}):o&&o.length>0&&(index.store.dispatch({type:Actions.ANNOTATION_ACTIONS.UPDATE_IMG_LIST,payload:{imgList:o}}),index.store.dispatch(reducer.LoadFileAndFileData(d)))};return React__default.default.createElement("div",null,React__default.default.createElement(es.ConfigProvider,{locale:lbUtils.i18n.language==="en"?enUS__default.default:zhCN__default.default},React__default.default.createElement(index$1,__spreadProps(__spreadValues({},e),{intelligentFit:L,checkMode:m}))))},mapStateToProps=e=>({toolInstance:e.annotation.toolInstance});var App$1=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(App);module.exports=App$1;
1
+ "use strict";var index$1=require("./views/MainView/index.js"),lbUtils=require("@labelbee/lb-utils"),React=require("react"),reactRedux=require("react-redux"),index=require("./index.js"),ctx=require("./store/ctx.js"),Actions=require("./store/Actions.js"),actionCreators=require("./store/annotation/actionCreators.js"),reducer=require("./store/annotation/reducer.js"),es=require("antd/es"),zhCN=require("antd/es/locale/zh_CN"),enUS=require("antd/es/locale/en_US");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React),zhCN__default=_interopDefaultLegacy(zhCN),enUS__default=_interopDefaultLegacy(enUS),__defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,a)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,__spreadValues=(e,t)=>{for(var a in t||(t={}))__hasOwnProp.call(t,a)&&__defNormalProp(e,a,t[a]);if(__getOwnPropSymbols)for(var a of __getOwnPropSymbols(t))__propIsEnum.call(t,a)&&__defNormalProp(e,a,t[a]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t));const App=e=>{const[t,a]=React.useState(0),{imgList:o,step:i=1,stepList:s,onSubmit:l,onSave:c,onPageChange:u,onStepChange:d,initialIndex:p=0,toolInstance:P,setToolInstance:S,getFileData:f,pageSize:g=10,loadFileList:r,defaultLang:_="cn",skipBeforePageTurning:m,beforeRotate:v,checkMode:O=!1,intelligentFit:A=!0,highlightAttribute:h="",preDataProcess:I,getImgIndexByExternal:x,annotationBefore:y}=e;React.useEffect(()=>{index.store.dispatch(actionCreators.InitTaskData({onSubmit:l,stepList:s,step:i,getFileData:f,pageSize:g,loadFileList:r,onSave:c,onPageChange:u,onStepChange:d,skipBeforePageTurning:m,beforeRotate:v,checkMode:O,highlightAttribute:h,preDataProcess:I,getImgIndexByExternal:x,annotationBefore:y})),C(),lbUtils.i18n.changeLanguage(_);const n=()=>{a(L=>L+1)};return lbUtils.i18n.on("languageChanged",n),()=>{lbUtils.i18n.off("languageChanged",n),actionCreators.InitAnnotationState(index.store.dispatch)}},[]),React.useEffect(()=>{index.store.dispatch(actionCreators.UpdateInjectFunc({onSubmit:l,stepList:s,getFileData:f,pageSize:g,loadFileList:r,onSave:c,onPageChange:u,onStepChange:d,beforeRotate:v,highlightAttribute:h,preDataProcess:I})),lbUtils.i18n.changeLanguage(_)},[l,s,f,g,r,c,u,d,_,v,h,I]),React.useEffect(()=>{S==null||S(P)},[P]),React.useEffect(()=>{index.store.dispatch({type:Actions.ANNOTATION_ACTIONS.SET_STEP,payload:{toStep:i}})},[i]);const C=()=>{r?actionCreators.loadImgList(index.store.dispatch,index.store.getState,p,!0).then(n=>{n&&index.store.dispatch(reducer.LoadFileAndFileData(p))}):o&&o.length>0&&(index.store.dispatch({type:Actions.ANNOTATION_ACTIONS.UPDATE_IMG_LIST,payload:{imgList:o}}),index.store.dispatch(reducer.LoadFileAndFileData(p)))};return React__default.default.createElement("div",null,React__default.default.createElement(es.ConfigProvider,{locale:lbUtils.i18n.language==="en"?enUS__default.default:zhCN__default.default},React__default.default.createElement(index$1,__spreadProps(__spreadValues({},e),{intelligentFit:A,checkMode:O}))))},mapStateToProps=e=>({toolInstance:e.annotation.toolInstance});var App$1=reactRedux.connect(mapStateToProps,null,null,{context:ctx.LabelBeeContext})(App);module.exports=App$1;