@labelbee/lb-components 1.2.3 → 1.5.0-alpha.0

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 (225) hide show
  1. package/LICENSE +203 -0
  2. package/dist/App.js +1 -1
  3. package/dist/assets/annotation/toolHotKeyIcon/icon_back_kj.svg.js +1 -0
  4. package/dist/assets/annotation/toolHotKeyIcon/icon_forward_kj.svg.js +1 -0
  5. package/dist/assets/annotation/toolHotKeyIcon/icon_playPause.svg.js +1 -0
  6. package/dist/assets/annotation/toolHotKeyIcon/icon_polygonMerge_kj.svg.js +1 -0
  7. package/dist/assets/annotation/toolHotKeyIcon/icon_segment.svg.js +1 -0
  8. package/dist/assets/annotation/toolHotKeyIcon/icon_speed_kj.svg.js +1 -0
  9. package/dist/assets/annotation/video/icon_keyboard_h.svg.js +1 -0
  10. package/dist/components/fileException/FileError.js +1 -0
  11. package/dist/components/fileException/FileInvalid.js +1 -0
  12. package/dist/components/fileException/index.js +1 -0
  13. package/dist/components/videoAnnotate/index.js +1 -0
  14. package/dist/components/videoPlayer/TagToolInstanceAdaptor.js +1 -0
  15. package/dist/components/videoPlayer/TagToolInstanceAdaptorI18nProvider.js +1 -0
  16. package/dist/components/videoPlayer/VideoTagLayer.js +1 -0
  17. package/dist/components/videoPlayer/components/controller/index.js +1 -0
  18. package/dist/components/videoPlayer/index.js +1 -0
  19. package/dist/components/videoPlayer/utils.js +1 -0
  20. package/dist/index.css +950 -651
  21. package/dist/index.css.map +1 -0
  22. package/dist/index.js +1 -1
  23. package/dist/store/Actions.js +1 -1
  24. package/dist/store/annotation/actionCreators.js +1 -1
  25. package/dist/store/annotation/reducer.js +1 -1
  26. package/dist/types/App.d.ts +28 -7
  27. package/dist/types/components/annotationStepPopover/index.d.ts +0 -1
  28. package/dist/types/components/checkboxList/index.d.ts +0 -1
  29. package/dist/types/components/colorTag/index.d.ts +0 -1
  30. package/dist/types/components/{ImageError/index.d.ts → fileException/FileError.d.ts} +5 -4
  31. package/dist/types/components/fileException/FileInvalid.d.ts +12 -0
  32. package/dist/types/components/fileException/index.d.ts +17 -0
  33. package/dist/types/components/videoAnnotate/index.d.ts +15 -0
  34. package/dist/types/components/videoPlayer/TagToolInstanceAdaptor.d.ts +90 -0
  35. package/dist/types/components/videoPlayer/TagToolInstanceAdaptorI18nProvider.d.ts +8 -0
  36. package/dist/types/components/videoPlayer/VideoTagLayer.d.ts +12 -0
  37. package/dist/types/components/videoPlayer/components/controller/index.d.ts +2 -0
  38. package/dist/types/components/videoPlayer/index.d.ts +73 -0
  39. package/dist/types/components/videoPlayer/types.d.ts +8 -0
  40. package/dist/types/components/videoPlayer/utils.d.ts +36 -0
  41. package/dist/types/index.d.ts +6 -4
  42. package/dist/types/store/Actions.d.ts +5 -0
  43. package/dist/types/store/annotation/actionCreators.d.ts +20 -8
  44. package/dist/types/store/annotation/reducer.d.ts +2 -2
  45. package/dist/types/store/annotation/types.d.ts +30 -2
  46. package/dist/types/utils/PageOperator.d.ts +1 -1
  47. package/dist/types/utils/StepUtils.d.ts +7 -0
  48. package/dist/types/utils/TextUtils.d.ts +1 -1
  49. package/dist/types/utils/dom.d.ts +6 -0
  50. package/dist/types/views/MainView/annotationOperation/index.d.ts +5 -9
  51. package/dist/types/views/MainView/annotationTips/index.d.ts +5 -0
  52. package/dist/types/views/MainView/index.d.ts +9 -3
  53. package/dist/types/views/MainView/sidebar/AnnotationText/index.d.ts +3 -1
  54. package/dist/types/views/MainView/sidebar/ClearIcon/index.d.ts +0 -1
  55. package/dist/types/views/MainView/sidebar/GeneralOperation/index.d.ts +3 -1
  56. package/dist/types/views/MainView/sidebar/ImgAttributeInfo/index.d.ts +0 -1
  57. package/dist/types/views/MainView/sidebar/SwitchAttributeList/index.d.ts +3 -1
  58. package/dist/types/views/MainView/sidebar/TagSidebar/index.d.ts +3 -1
  59. package/dist/types/views/MainView/sidebar/TextAreaFormat/index.d.ts +0 -1
  60. package/dist/types/views/MainView/sidebar/TextToolSidebar/index.d.ts +3 -1
  61. package/dist/types/views/MainView/sidebar/ToolStyle/index.d.ts +0 -1
  62. package/dist/types/views/MainView/sidebar/index.d.ts +3 -1
  63. package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/common/index.d.ts +23 -0
  64. package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/index.d.ts +2 -7
  65. package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/polygon/index.d.ts +7 -1
  66. package/dist/types/views/MainView/toolFooter/FooterTips/ToolHotKey/videoTag/index.d.ts +3 -0
  67. package/dist/types/views/MainView/toolFooter/HiddenTips/index.d.ts +0 -1
  68. package/dist/types/views/MainView/toolFooter/PageNumber/index.d.ts +0 -1
  69. package/dist/types/views/MainView/toolFooter/Pagination.d.ts +12 -0
  70. package/dist/types/views/MainView/toolFooter/ZoomController/ZoomLevel/index.d.ts +3 -1
  71. package/dist/types/views/MainView/toolFooter/ZoomController/index.d.ts +3 -1
  72. package/dist/types/views/MainView/toolFooter/index.d.ts +6 -2
  73. package/dist/types/views/MainView/toolHeader/ExportData/index.d.ts +3 -1
  74. package/dist/types/views/MainView/toolHeader/StepSwitch/index.d.ts +3 -1
  75. package/dist/types/views/MainView/toolHeader/index.d.ts +8 -4
  76. package/dist/utils/StepUtils.js +1 -1
  77. package/dist/utils/TextUtils.js +1 -1
  78. package/dist/utils/dom.js +1 -1
  79. package/dist/utils/index.js +1 -1
  80. package/dist/views/MainView/annotationOperation/index.js +1 -1
  81. package/dist/views/MainView/annotationTips/index.js +1 -0
  82. package/dist/views/MainView/index.js +1 -1
  83. package/dist/views/MainView/sidebar/GeneralOperation/index.js +1 -1
  84. package/dist/views/MainView/sidebar/TagSidebar/index.js +1 -1
  85. package/dist/views/MainView/sidebar/index.js +1 -1
  86. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/common/index.js +1 -1
  87. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
  88. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/polygon/index.js +1 -1
  89. package/dist/views/MainView/toolFooter/FooterTips/ToolHotKey/videoTag/index.js +1 -0
  90. package/dist/views/MainView/toolFooter/FooterTips/index.js +1 -1
  91. package/dist/views/MainView/toolFooter/Pagination.js +1 -0
  92. package/dist/views/MainView/toolFooter/index.js +1 -1
  93. package/dist/views/MainView/toolHeader/headerOption/index.js +1 -1
  94. package/dist/views/MainView/toolHeader/index.js +1 -1
  95. package/es/App.js +1 -1
  96. package/es/App.js.map +1 -1
  97. package/es/assets/annotation/toolHotKeyIcon/icon_back_kj.svg.js +1 -0
  98. package/es/assets/annotation/toolHotKeyIcon/icon_back_kj.svg.js.map +1 -0
  99. package/es/assets/annotation/toolHotKeyIcon/icon_forward_kj.svg.js +1 -0
  100. package/es/assets/annotation/toolHotKeyIcon/icon_forward_kj.svg.js.map +1 -0
  101. package/es/assets/annotation/toolHotKeyIcon/icon_playPause.svg.js +1 -0
  102. package/es/assets/annotation/toolHotKeyIcon/icon_playPause.svg.js.map +1 -0
  103. package/es/assets/annotation/toolHotKeyIcon/icon_polygonMerge_kj.svg.js +1 -0
  104. package/es/assets/annotation/toolHotKeyIcon/icon_polygonMerge_kj.svg.js.map +1 -0
  105. package/es/assets/annotation/toolHotKeyIcon/icon_segment.svg.js +1 -0
  106. package/es/assets/annotation/toolHotKeyIcon/icon_segment.svg.js.map +1 -0
  107. package/es/assets/annotation/toolHotKeyIcon/icon_speed_kj.svg.js +1 -0
  108. package/es/assets/annotation/toolHotKeyIcon/icon_speed_kj.svg.js.map +1 -0
  109. package/es/assets/annotation/video/icon_keyboard_h.svg.js +1 -0
  110. package/es/assets/annotation/video/icon_keyboard_h.svg.js.map +1 -0
  111. package/es/components/AnnotationView/index.js.map +1 -1
  112. package/es/components/ImageError/index.js +53 -1
  113. package/es/components/ImageError/index.js.map +1 -1
  114. package/es/components/annotationStepPopover/index.js.map +1 -1
  115. package/es/components/attributeList/index.js.map +1 -1
  116. package/es/components/checkboxList/index.js.map +1 -1
  117. package/es/components/colorTag/index.js.map +1 -1
  118. package/es/components/customAntd/IconWithText/index.js.map +1 -1
  119. package/es/components/customResizeHook/index.js.map +1 -1
  120. package/es/components/fileException/FileError.js +1 -0
  121. package/es/components/fileException/FileError.js.map +1 -0
  122. package/es/components/fileException/FileInvalid.js +1 -0
  123. package/es/components/fileException/FileInvalid.js.map +1 -0
  124. package/es/components/fileException/index.js +1 -0
  125. package/es/components/fileException/index.js.map +1 -0
  126. package/es/components/videoAnnotate/index.js +1 -0
  127. package/es/components/videoAnnotate/index.js.map +1 -0
  128. package/es/components/videoPlayer/TagToolInstanceAdaptor.js +1 -0
  129. package/es/components/videoPlayer/TagToolInstanceAdaptor.js.map +1 -0
  130. package/es/components/videoPlayer/TagToolInstanceAdaptorI18nProvider.js +1 -0
  131. package/es/components/videoPlayer/TagToolInstanceAdaptorI18nProvider.js.map +1 -0
  132. package/es/components/videoPlayer/VideoTagLayer.js +1 -0
  133. package/es/components/videoPlayer/VideoTagLayer.js.map +1 -0
  134. package/es/components/videoPlayer/components/controller/index.js +1 -0
  135. package/es/components/videoPlayer/components/controller/index.js.map +1 -0
  136. package/es/components/videoPlayer/index.js +1 -0
  137. package/es/components/videoPlayer/index.js.map +1 -0
  138. package/es/components/videoPlayer/utils.js +1 -0
  139. package/es/components/videoPlayer/utils.js.map +1 -0
  140. package/es/configureStore.js.map +1 -1
  141. package/es/constant/index.js.map +1 -1
  142. package/es/constant/styleString.js.map +1 -1
  143. package/es/data/Style.js.map +1 -1
  144. package/es/data/enums/AnnotationSize.js.map +1 -1
  145. package/es/data/enums/ToolType.js.map +1 -1
  146. package/es/hooks/useRafState.js.map +1 -1
  147. package/es/hooks/useSafeSate.js.map +1 -1
  148. package/es/hooks/useSize.js.map +1 -1
  149. package/es/hooks/useUnmountedRef.js.map +1 -1
  150. package/es/index.js +1 -1
  151. package/es/index.js.map +1 -1
  152. package/es/store/Actions.js +1 -1
  153. package/es/store/Actions.js.map +1 -1
  154. package/es/store/annotation/actionCreators.js +1 -1
  155. package/es/store/annotation/actionCreators.js.map +1 -1
  156. package/es/store/annotation/reducer.js +1 -1
  157. package/es/store/annotation/reducer.js.map +1 -1
  158. package/es/store/imgAttribute/actionCreators.js.map +1 -1
  159. package/es/store/imgAttribute/reducer.js.map +1 -1
  160. package/es/store/index.js.map +1 -1
  161. package/es/store/toolStyle/actionCreators.js.map +1 -1
  162. package/es/store/toolStyle/reducer.js.map +1 -1
  163. package/es/utils/AnnotationDataUtils.js.map +1 -1
  164. package/es/utils/ConfigUtils.js.map +1 -1
  165. package/es/utils/PageOperator.js.map +1 -1
  166. package/es/utils/StepUtils.js +1 -1
  167. package/es/utils/StepUtils.js.map +1 -1
  168. package/es/utils/TextUtils.js +1 -1
  169. package/es/utils/TextUtils.js.map +1 -1
  170. package/es/utils/ToolStyleUtils.js.map +1 -1
  171. package/es/utils/data.js.map +1 -1
  172. package/es/utils/dom.js +1 -1
  173. package/es/utils/dom.js.map +1 -1
  174. package/es/utils/index.js +1 -1
  175. package/es/utils/index.js.map +1 -1
  176. package/es/views/MainView/annotationOperation/index.js +1 -1
  177. package/es/views/MainView/annotationOperation/index.js.map +1 -1
  178. package/es/views/MainView/annotationTips/index.js +1 -0
  179. package/es/views/MainView/annotationTips/index.js.map +1 -0
  180. package/es/views/MainView/index.js +1 -1
  181. package/es/views/MainView/index.js.map +1 -1
  182. package/es/views/MainView/sidebar/AnnotationText/index.js.map +1 -1
  183. package/es/views/MainView/sidebar/ClearIcon/index.js.map +1 -1
  184. package/es/views/MainView/sidebar/GeneralOperation/index.js +1 -1
  185. package/es/views/MainView/sidebar/GeneralOperation/index.js.map +1 -1
  186. package/es/views/MainView/sidebar/ImgAttributeInfo/index.js.map +1 -1
  187. package/es/views/MainView/sidebar/SwitchAttributeList/index.js.map +1 -1
  188. package/es/views/MainView/sidebar/TagSidebar/index.js +1 -1
  189. package/es/views/MainView/sidebar/TagSidebar/index.js.map +1 -1
  190. package/es/views/MainView/sidebar/TextAreaFormat/index.js.map +1 -1
  191. package/es/views/MainView/sidebar/TextToolSidebar/index.js.map +1 -1
  192. package/es/views/MainView/sidebar/ToolStyle/index.js.map +1 -1
  193. package/es/views/MainView/sidebar/index.js +1 -1
  194. package/es/views/MainView/sidebar/index.js.map +1 -1
  195. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/common/index.js +1 -1
  196. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/common/index.js.map +1 -1
  197. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js +1 -1
  198. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/index.js.map +1 -1
  199. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/line/index.js.map +1 -1
  200. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/point/index.js.map +1 -1
  201. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/polygon/index.js +1 -1
  202. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/polygon/index.js.map +1 -1
  203. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/rectToolShortCutTable/index.js.map +1 -1
  204. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/tag/index.js.map +1 -1
  205. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/text/index.js.map +1 -1
  206. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/videoTag/index.js +1 -0
  207. package/es/views/MainView/toolFooter/FooterTips/ToolHotKey/videoTag/index.js.map +1 -0
  208. package/es/views/MainView/toolFooter/FooterTips/index.js +1 -1
  209. package/es/views/MainView/toolFooter/FooterTips/index.js.map +1 -1
  210. package/es/views/MainView/toolFooter/HiddenTips/index.js.map +1 -1
  211. package/es/views/MainView/toolFooter/PageNumber/index.js.map +1 -1
  212. package/es/views/MainView/toolFooter/Pagination.js +1 -0
  213. package/es/views/MainView/toolFooter/Pagination.js.map +1 -0
  214. package/es/views/MainView/toolFooter/ZoomController/ZoomLevel/index.js.map +1 -1
  215. package/es/views/MainView/toolFooter/ZoomController/index.js.map +1 -1
  216. package/es/views/MainView/toolFooter/index.js +1 -1
  217. package/es/views/MainView/toolFooter/index.js.map +1 -1
  218. package/es/views/MainView/toolHeader/ExportData/index.js.map +1 -1
  219. package/es/views/MainView/toolHeader/StepSwitch/index.js.map +1 -1
  220. package/es/views/MainView/toolHeader/headerOption/index.js +1 -1
  221. package/es/views/MainView/toolHeader/headerOption/index.js.map +1 -1
  222. package/es/views/MainView/toolHeader/index.js +1 -1
  223. package/es/views/MainView/toolHeader/index.js.map +1 -1
  224. package/package.json +12 -10
  225. package/dist/components/ImageError/index.js +0 -1
@@ -1 +1 @@
1
- "use strict";var es=require("antd/es"),React=require("react"),reactRedux=require("react-redux"),icon_kj1=require("../../../../../assets/annotation/toolHotKeyIcon/icon_kj1.svg.js"),icon_kj_h=require("../../../../../assets/annotation/toolHotKeyIcon/icon_kj_h.svg.js"),ToolType=require("../../../../../data/enums/ToolType.js"),index=require("./rectToolShortCutTable/index.js"),index$2=require("./point/index.js"),index$3=require("./polygon/index.js"),index$4=require("./line/index.js"),index$1=require("./tag/index.js"),index$5=require("./text/index.js"),StepUtils=require("../../../../../utils/StepUtils.js"),index$6=require("../../index.js"),reactI18next=require("react-i18next");function _interopDefaultLegacy(n){return n&&typeof n=="object"&&"default"in n?n:{default:n}}var React__default=_interopDefaultLegacy(React);const shortCutTable={[ToolType.EToolName.Rect]:index.default,[ToolType.EToolName.Tag]:index$1.default,[ToolType.EToolName.Point]:index$2.default,[ToolType.EToolName.Polygon]:index$3.default,[ToolType.EToolName.Line]:index$4.default,[ToolType.EToolName.Text]:index$5},ToolHotKey=({isSingleImg:n,style:d})=>{var c;const[p,o]=React.useState(!1),{t:u}=reactI18next.useTranslation(),r=reactRedux.useSelector(e=>{var a,i;return StepUtils.getCurrentStepInfo((a=e==null?void 0:e.annotation)==null?void 0:a.step,(i=e.annotation)==null?void 0:i.stepList)}),y=e=>typeof e=="string"?React__default.default.createElement("img",{width:16,height:16,src:e,style:m}):e,f={width:320,display:"flex",justifyContent:"space-between",margin:"23px 21px"},m={marginRight:10},s={display:"block",padding:"0 3px",minWidth:"20px",marginRight:"3px",border:"1px solid rgba(204,204,204,1)",verticalAlign:"middle",fontSize:"12px",textAlign:"center"},g=(e,a)=>React__default.default.createElement("div",{style:f,key:a},React__default.default.createElement("span",{style:{display:"flex",alignItems:"center"}},y(e.icon),u(e.name)),React__default.default.createElement("span",{style:{display:"flex",alignItems:"center"}},e.noticeInfo&&React__default.default.createElement("span",{style:{marginRight:"5px",color:"#CCCCCC"}},u(e.noticeInfo)),v(e.shortCut,e.shortCutUseHtml,e.linkSymbol))),v=(e,a=!1,i)=>{const E=e.map((t,l)=>a?React__default.default.createElement("span",{key:l,style:{display:"flex"}},React__default.default.createElement("span",{style:s,dangerouslySetInnerHTML:{__html:t}})):l<e.length-1?typeof t=="number"?React__default.default.createElement("span",{key:l,style:{display:"flex"}},React__default.default.createElement("span",{style:s},t),React__default.default.createElement("span",{style:{marginRight:"3px"}},"~")):(t==null?void 0:t.startsWith("data"))?React__default.default.createElement("span",{key:l,style:{display:"flex"}},React__default.default.createElement("span",{className:"shortCutButton",style:{marginRight:"3px"}},React__default.default.createElement("img",{width:16,height:23,src:t})),React__default.default.createElement("span",{style:{marginRight:"3px"}},"+")):React__default.default.createElement("span",{key:l,style:{display:"flex"}},React__default.default.createElement("span",{style:s},t),React__default.default.createElement("span",{style:{marginRight:"3px"}},i||"+")):typeof t=="number"?React__default.default.createElement("span",{key:l,style:{display:"flex"}},React__default.default.createElement("span",{style:s},t)):(t==null?void 0:t.startsWith("data"))?React__default.default.createElement("span",{className:"shortCutButton",key:l,style:{marginRight:"3px"}},React__default.default.createElement("img",{width:16,height:23,src:t})):React__default.default.createElement("span",{style:s,key:l},t));return React__default.default.createElement("div",{style:{display:"flex",justifyContent:"space-around",alignItems:"center"}},E)},h=React__default.default.createElement("div",{className:`${index$6.footerCls}__hotkey-content`},r&&((c=shortCutTable[r==null?void 0:r.tool])==null?void 0:c.map((e,a)=>g(e,a)))),x=d||{width:600};return r&&!shortCutTable[r==null?void 0:r.tool]?null:React__default.default.createElement(es.Popover,{placement:"topLeft",content:h,onMouseMove:()=>o(!0),onMouseLeave:()=>{o(!1)},overlayClassName:"tool-hotkeys-popover"},React__default.default.createElement("div",{className:"shortCutTitle",onMouseMove:()=>o(!0),onMouseLeave:()=>o(!1),style:x},React__default.default.createElement("a",{className:"svg"},React__default.default.createElement("img",{src:p?icon_kj_h:icon_kj1,width:15,height:13,style:{marginRight:"5px"}}),u("Hotkeys"))))};module.exports=ToolHotKey;
1
+ "use strict";var es=require("antd/es"),React=require("react"),icon_kj1=require("../../../../../assets/annotation/toolHotKeyIcon/icon_kj1.svg.js"),icon_kj_h=require("../../../../../assets/annotation/toolHotKeyIcon/icon_kj_h.svg.js"),ToolType=require("../../../../../data/enums/ToolType.js"),index=require("./rectToolShortCutTable/index.js"),index$2=require("./point/index.js"),index$3=require("./polygon/index.js"),index$4=require("./line/index.js"),index$1=require("./tag/index.js"),index$5=require("./text/index.js"),index$6=require("./videoTag/index.js"),index$7=require("../../index.js"),reactI18next=require("react-i18next"),lbAnnotation=require("@labelbee/lb-annotation");function _interopDefaultLegacy(l){return l&&typeof l=="object"&&"default"in l?l:{default:l}}var React__default=_interopDefaultLegacy(React);const{EVideoToolName}=lbAnnotation.cTool,shortCutTable={[ToolType.EToolName.Rect]:index.default,[ToolType.EToolName.Tag]:index$1.default,[ToolType.EToolName.Point]:index$2.default,[ToolType.EToolName.Polygon]:index$3.default,[ToolType.EToolName.Line]:index$4.default,[ToolType.EToolName.Text]:index$5,[EVideoToolName.VideoTagTool]:index$6},ToolHotKey=({style:l,title:u,toolName:o})=>{var c;const[d,s]=React.useState(!1),{t:i}=reactI18next.useTranslation();if(!o)return null;const y=e=>typeof e=="string"?React__default.default.createElement("img",{width:16,height:16,src:e,style:p}):e,f={width:320,display:"flex",justifyContent:"space-between",margin:"23px 21px"},p={marginRight:10},n={display:"block",padding:"0 3px",minWidth:"20px",marginRight:"3px",border:"1px solid rgba(204,204,204,1)",verticalAlign:"middle",fontSize:"12px",textAlign:"center"},m=(e,r)=>React__default.default.createElement("div",{style:f,key:r},React__default.default.createElement("span",{style:{display:"flex",alignItems:"center"}},y(e.icon),i(e.name)),React__default.default.createElement("span",{style:{display:"flex",alignItems:"center"}},e.noticeInfo&&React__default.default.createElement("span",{style:{marginRight:"5px",color:"#CCCCCC"}},i(e.noticeInfo)),g(e.shortCut,e.shortCutUseHtml,e.linkSymbol))),g=(e,r=!1,v)=>{const E=e.map((t,a)=>r?React__default.default.createElement("span",{key:a,style:{display:"flex"}},React__default.default.createElement("span",{style:n,dangerouslySetInnerHTML:{__html:t}})):a<e.length-1?typeof t=="number"?React__default.default.createElement("span",{key:a,style:{display:"flex"}},React__default.default.createElement("span",{style:n},t),React__default.default.createElement("span",{style:{marginRight:"3px"}},"~")):(t==null?void 0:t.startsWith("data"))?React__default.default.createElement("span",{key:a,style:{display:"flex"}},React__default.default.createElement("span",{className:"shortCutButton",style:{marginRight:"3px"}},React__default.default.createElement("img",{width:16,height:23,src:t})),React__default.default.createElement("span",{style:{marginRight:"3px"}},"+")):React__default.default.createElement("span",{key:a,style:{display:"flex"}},React__default.default.createElement("span",{style:n},t),React__default.default.createElement("span",{style:{marginRight:"3px"}},v||"+")):typeof t=="number"?React__default.default.createElement("span",{key:a,style:{display:"flex"}},React__default.default.createElement("span",{style:n},t)):(t==null?void 0:t.startsWith("data"))?React__default.default.createElement("span",{className:"shortCutButton",key:a,style:{marginRight:"3px"}},React__default.default.createElement("img",{width:16,height:23,src:t})):React__default.default.createElement("span",{style:n,key:a},t));return React__default.default.createElement("div",{style:{display:"flex",justifyContent:"space-around",alignItems:"center"}},E)},h=React__default.default.createElement("div",{className:`${index$7.footerCls}__hotkey-content`},(c=shortCutTable[o])==null?void 0:c.map((e,r)=>m(e,r))),x=l||{width:100};return shortCutTable[o]?React__default.default.createElement(es.Popover,{placement:"topLeft",content:h,onMouseMove:()=>s(!0),onMouseLeave:()=>{s(!1)},overlayClassName:"tool-hotkeys-popover"},React__default.default.createElement("div",{className:"shortCutTitle",onMouseMove:()=>s(!0),onMouseLeave:()=>s(!1),style:x},u!=null?u:React__default.default.createElement("a",{className:"svg"},React__default.default.createElement("img",{src:d?icon_kj_h:icon_kj1,width:15,height:13,style:{marginRight:"5px"}}),i("Hotkeys")))):null};module.exports=ToolHotKey;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var icon_line_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_line_kj.svg.js"),icon_polygonNull_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_polygonNull_kj.svg.js"),icon_polygonActive_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_polygonActive_kj.svg.js"),icon_polygonChange_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_polygonChange_kj.svg.js"),icon_polygonDel_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_polygonDel_kj.svg.js"),icon_mouse_left_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_left_kj.svg.js"),icon_mouse_right_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_right_kj.svg.js"),icon_lineCont_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_lineCont_kj.svg.js"),icon_polygonInsert_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_polygonInsert_kj.svg.js"),icon_unGrip_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_unGrip_kj.svg.js"),index=require("../common/index.js");const polygon={name:"AnnotatePolygon",icon:icon_line_kj,shortCut:[icon_mouse_left_kj]},invalidPolygon={name:"AnnotateInvalidPolygon",icon:icon_polygonNull_kj,shortCut:["Ctrl",icon_mouse_left_kj]},selectedPolygon={name:"SelectPolygon",icon:icon_polygonActive_kj,shortCut:[icon_mouse_right_kj],noticeInfo:"RightClick"},changePolygonAttribute={name:"TogglePolygonEffectiveness",icon:icon_polygonChange_kj,shortCut:["F"]},deletePolygon={name:"DeletePolygon",icon:icon_polygonDel_kj,shortCut:["Del"]},keepLine={name:"ContinueToLabel",icon:icon_lineCont_kj,shortCut:["Space"]},insertPolygonPoint={name:"InsertPoint",icon:icon_polygonInsert_kj,noticeInfo:"SelectAndDoubleClick",shortCut:[icon_mouse_left_kj]},deletePolygonPoint={name:"DeletePoint",icon:icon_polygonDel_kj,noticeInfo:"SelectAndDoubleClick",shortCut:[icon_mouse_right_kj]},suspendAbsorption={name:"StopAdsorption",icon:icon_unGrip_kj,noticeInfo:"Press",shortCut:["Alt"]},pointToolShortCutTable=[polygon,invalidPolygon,selectedPolygon,changePolygonAttribute,deletePolygon,keepLine,insertPolygonPoint,deletePolygonPoint,suspendAbsorption,index.revoke,index.restore,index.rotate,index.scale,index.backward,index.forward,index.setValid,index.dargWithRightClick,index.dargWithLeftClick,index.tabChangeSelected,index.tabReverseChangeSelected];exports.changePolygonAttribute=changePolygonAttribute,exports.default=pointToolShortCutTable,exports.deletePolygon=deletePolygon,exports.deletePolygonPoint=deletePolygonPoint,exports.insertPolygonPoint=insertPolygonPoint,exports.invalidPolygon=invalidPolygon,exports.keepLine=keepLine,exports.polygon=polygon,exports.selectedPolygon=selectedPolygon,exports.suspendAbsorption=suspendAbsorption;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var icon_line_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_line_kj.svg.js"),icon_polygonNull_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_polygonNull_kj.svg.js"),icon_polygonActive_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_polygonActive_kj.svg.js"),icon_polygonChange_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_polygonChange_kj.svg.js"),icon_polygonDel_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_polygonDel_kj.svg.js"),icon_mouse_left_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_left_kj.svg.js"),icon_mouse_right_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_mouse_right_kj.svg.js"),icon_lineCont_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_lineCont_kj.svg.js"),icon_polygonInsert_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_polygonInsert_kj.svg.js"),icon_unGrip_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_unGrip_kj.svg.js"),icon_segment=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_segment.svg.js"),icon_polygonMerge_kj=require("../../../../../../assets/annotation/toolHotKeyIcon/icon_polygonMerge_kj.svg.js"),index=require("../common/index.js");const polygon={name:"AnnotatePolygon",icon:icon_line_kj,shortCut:[icon_mouse_left_kj]},invalidPolygon={name:"AnnotateInvalidPolygon",icon:icon_polygonNull_kj,shortCut:["Ctrl",icon_mouse_left_kj]},selectedPolygon={name:"SelectPolygon",icon:icon_polygonActive_kj,shortCut:[icon_mouse_right_kj],noticeInfo:"RightClick"},changePolygonAttribute={name:"TogglePolygonEffectiveness",icon:icon_polygonChange_kj,shortCut:["F"]},deletePolygon={name:"DeletePolygon",icon:icon_polygonDel_kj,shortCut:["Del"]},keepLine={name:"ContinueToLabel",icon:icon_lineCont_kj,shortCut:["Space"]},insertPolygonPoint={name:"InsertPoint",icon:icon_polygonInsert_kj,noticeInfo:"SelectAndDoubleClick",shortCut:[icon_mouse_left_kj]},deletePolygonPoint={name:"DeletePoint",icon:icon_polygonDel_kj,noticeInfo:"SelectAndDoubleClick",shortCut:[icon_mouse_right_kj]},suspendAbsorption={name:"StopAdsorption",icon:icon_unGrip_kj,noticeInfo:"Press",shortCut:["Alt"]},splitPolygon={name:"CropOverlapArea",icon:icon_segment,noticeInfo:"",shortCut:["ALT","X"]},combinePolygon={name:"CombineOverlapArea",icon:icon_polygonMerge_kj,noticeInfo:"",shortCut:["Alt","Z"]},pointToolShortCutTable=[polygon,invalidPolygon,selectedPolygon,changePolygonAttribute,deletePolygon,keepLine,insertPolygonPoint,deletePolygonPoint,suspendAbsorption,index.revoke,index.restore,index.rotate,index.scale,index.backward,index.forward,index.setValid,index.dargWithRightClick,index.dargWithLeftClick,index.tabChangeSelected,index.tabReverseChangeSelected,combinePolygon,splitPolygon];exports.changePolygonAttribute=changePolygonAttribute,exports.combinePolygon=combinePolygon,exports.default=pointToolShortCutTable,exports.deletePolygon=deletePolygon,exports.deletePolygonPoint=deletePolygonPoint,exports.insertPolygonPoint=insertPolygonPoint,exports.invalidPolygon=invalidPolygon,exports.keepLine=keepLine,exports.polygon=polygon,exports.selectedPolygon=selectedPolygon,exports.splitPolygon=splitPolygon,exports.suspendAbsorption=suspendAbsorption;
@@ -0,0 +1 @@
1
+ "use strict";var _=require("lodash"),index=require("../common/index.js"),index$1=require("../tag/index.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var ___default=_interopDefaultLegacy(_);const videoForward=___default.default.cloneDeep(index.forward),videoBackward=___default.default.cloneDeep(index.backward);videoForward.name="NextFile",videoBackward.name="PreviousFile";const videoTagToolShortCurTable=[index.saveResult,index$1.tagInSingleImg,index.playPause,index.speed,index.rewind,index.forwardForward,index.fullScreen,videoBackward,videoForward];module.exports=videoTagToolShortCurTable;
@@ -1 +1 @@
1
- "use strict";var React=require("react"),index=require("./ToolHotKey/index.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const FooterTips=()=>React__default.default.createElement("div",{className:"tipsBar"},React__default.default.createElement(index,null));module.exports=FooterTips;
1
+ "use strict";var React=require("react"),index=require("./ToolHotKey/index.js"),reactRedux=require("react-redux"),StepUtils=require("../../../../utils/StepUtils.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const FooterTips=()=>{const e=reactRedux.useSelector(t=>{var r,o;return StepUtils.getCurrentStepInfo((r=t==null?void 0:t.annotation)==null?void 0:r.step,(o=t.annotation)==null?void 0:o.stepList)});return React__default.default.createElement("div",{className:"tipsBar"},React__default.default.createElement(index,{toolName:e==null?void 0:e.tool}))};module.exports=FooterTips;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var icons=require("@ant-design/icons"),React=require("react"),index=require("./index.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React),__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,a)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,__spreadValues=(e,t)=>{for(var a in t||(t={}))__hasOwnProp.call(t,a)&&__defNormalProp(e,a,t[a]);if(__getOwnPropSymbols)for(var a of __getOwnPropSymbols(t))__propIsEnum.call(t,a)&&__defNormalProp(e,a,t[a]);return e};const Forward=e=>e.isVideo?React__default.default.createElement(icons.StepForwardFilled,__spreadValues({},e.iconProps)):React__default.default.createElement(icons.RightOutlined,__spreadValues({},e.iconProps)),Back=e=>e.isVideo?React__default.default.createElement(icons.StepBackwardFilled,__spreadValues({},e.iconProps)):React__default.default.createElement(icons.LeftOutlined,__spreadValues({},e.iconProps)),Pagination=({pageBackward:e,imgIndex:t,pageJump:a,totalPage:i,pageForward:l,isVideo:n,footerCls:r})=>React__default.default.createElement("div",{className:`${r}__pagination`},React__default.default.createElement(Back,{isVideo:n,iconProps:{className:`${r}__highlight`,onClick:e}}),React__default.default.createElement(index.PageInput,{imgIndex:t,jumpSkip:a}),"/",React__default.default.createElement("span",{className:`${r}__pageAll`},i),React__default.default.createElement(Forward,{isVideo:n,iconProps:{className:`${r}__highlight`,onClick:l}}));exports.Pagination=Pagination;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),es=require("antd/es"),icons=require("@ant-design/icons"),reactRedux=require("react-redux"),reducer=require("../../../store/annotation/reducer.js"),index$2=require("./HiddenTips/index.js"),index$3=require("./PageNumber/index.js"),index$4=require("./ZoomController/index.js"),index$1=require("./FooterTips/index.js"),index=require("../../../constant/index.js"),actionCreators=require("../../../store/annotation/actionCreators.js"),reactI18next=require("react-i18next");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const PageInput=e=>{const{jumpSkip:l,imgIndex:a}=e,[o,n]=React.useState(a),s=React.useRef(null);React.useEffect(()=>{n(a+1)},[a]);const i=t=>{/^\d*$/.test(t.target.value)&&n(t.target.value)},r=t=>{t.keyCode===13&&l(t.target.value)};return React__default.default.createElement(es.Input,{className:"pageInput",ref:s,onChange:i,value:o,onKeyDown:r})},footerCls=`${index.prefix}-footer`,FooterDivider=()=>React__default.default.createElement(es.Divider,{type:"vertical",style:{background:"rgba(153, 153, 153, 1)",height:"16px"}}),ToolFooter=e=>{var l;const{stepList:a,step:o,basicResultList:n,basicIndex:s,mode:i}=e,r=reactRedux.useDispatch(),{t}=reactI18next.useTranslation(),u=(l=a[o-1])!=null?l:{},c=()=>{r(actionCreators.PageBackward())},d=()=>{r(actionCreators.PageForward())},g=p=>{const f=~~p-1;r(actionCreators.PageJump(f))},m=!!u.dataSourceStep;return React__default.default.createElement("div",{className:`${footerCls}`,style:e.style},React__default.default.createElement(index$1,null),React__default.default.createElement("div",{style:{flex:1}}),React__default.default.createElement(index$2,null),React__default.default.createElement(index$3,null),React__default.default.createElement("div",{className:`${footerCls}__pagination`},React__default.default.createElement(icons.LeftOutlined,{className:`${footerCls}__highlight`,onClick:c}),React__default.default.createElement(PageInput,{imgIndex:e.imgIndex,jumpSkip:g}),"/",React__default.default.createElement("span",{className:`${footerCls}__pageAll`},e.totalPage),React__default.default.createElement(icons.RightOutlined,{className:`${footerCls}__highlight`,onClick:d})),m&&n.length>0&&React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement(FooterDivider,null),React__default.default.createElement("span",null,t("curItems",{current:s+1,total:n.length}))),React__default.default.createElement(FooterDivider,null),React__default.default.createElement(index$4,{mode:i}))},mapStateToProps=e=>({totalPage:reducer.getTotalPage(e.annotation),imgIndex:e.annotation.imgIndex,stepList:e.annotation.stepList,step:e.annotation.step,basicIndex:e.annotation.basicIndex,basicResultList:e.annotation.basicResultList});var ToolFooter$1=reactRedux.connect(mapStateToProps)(ToolFooter);exports.PageInput=PageInput,exports.default=ToolFooter$1,exports.footerCls=footerCls;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var index=require("../../../constant/index.js"),actionCreators=require("../../../store/annotation/actionCreators.js"),reducer=require("../../../store/annotation/reducer.js"),es=require("antd/es"),React=require("react"),reactI18next=require("react-i18next"),reactRedux=require("react-redux"),index$1=require("./FooterTips/index.js"),index$2=require("./HiddenTips/index.js"),index$3=require("./PageNumber/index.js"),index$4=require("./ZoomController/index.js"),Pagination=require("./Pagination.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React);const PageInput=e=>{const{jumpSkip:o,imgIndex:a}=e,[s,r]=React.useState(a),i=React.useRef(null);React.useEffect(()=>{r(a+1)},[a]);const l=t=>{/^\d*$/.test(t.target.value)&&r(t.target.value)},n=t=>{t.keyCode===13&&o(t.target.value)};return React__default.default.createElement(es.Input,{className:"pageInput",ref:i,onChange:l,value:s,onKeyDown:n})},footerCls=`${index.prefix}-footer`,FooterDivider=()=>React__default.default.createElement(es.Divider,{type:"vertical",style:{background:"rgba(153, 153, 153, 1)",height:"16px"}}),ToolFooter=e=>{var o;const{stepList:a,step:s,basicResultList:r,basicIndex:i,mode:l,footer:n}=e,t=reactRedux.useDispatch(),{t:c}=reactI18next.useTranslation(),v=(o=a[s-1])!=null?o:{},I=()=>{t(actionCreators.PageBackward())},E=()=>{t(actionCreators.PageForward())},P=b=>{const q=~~b-1;t(actionCreators.PageJump(q))},y=!!v.dataSourceStep,d=React__default.default.createElement(index$1,null),f=React__default.default.createElement(index$2,null),g=React__default.default.createElement(index$3,null),p=React__default.default.createElement(Pagination.Pagination,{imgIndex:e.imgIndex,totalPage:e.totalPage,pageJump:P,pageBackward:I,pageForward:E,footerCls}),m=React__default.default.createElement(index$4,{mode:l}),x=React__default.default.createElement("span",null,c("curItems",{current:i+1,total:r.length})),u=React__default.default.createElement(FooterDivider,null);return n?typeof n=="function"?React__default.default.createElement("div",{className:`${footerCls}`,style:e.style},n({footerTips:d,hiddenTips:f,pageNumber:g,pagination:p,zoomController:m,curItems:x,footerDivider:u})):n:React__default.default.createElement("div",{className:`${footerCls}`,style:e.style},d,React__default.default.createElement("div",{style:{flex:1}}),f,g,p,y&&r.length>0&&React__default.default.createElement(React__default.default.Fragment,null,u,x),u,m)},mapStateToProps=e=>({totalPage:reducer.getTotalPage(e.annotation),imgIndex:e.annotation.imgIndex,stepList:e.annotation.stepList,step:e.annotation.step,basicIndex:e.annotation.basicIndex,basicResultList:e.annotation.basicResultList});var ToolFooter$1=reactRedux.connect(mapStateToProps)(ToolFooter);exports.PageInput=PageInput,exports.default=ToolFooter$1,exports.footerCls=footerCls;
@@ -1 +1 @@
1
- "use strict";var React=require("react"),reactRedux=require("react-redux"),icon_r=require("../../../../assets/annotation/common/icon_r.svg.js"),icon_next=require("../../../../assets/annotation/common/icon_next.svg.js"),icon_back=require("../../../../assets/annotation/common/icon_back.svg.js"),icon_rA=require("../../../../assets/annotation/common/icon_rA.svg.js"),icon_nextA=require("../../../../assets/annotation/common/icon_nextA.svg.js"),icon_backA=require("../../../../assets/annotation/common/icon_backA.svg.js"),icon_save=require("../../../../assets/annotation/common/icon_save.svg.js"),icon_saveA=require("../../../../assets/annotation/common/icon_saveA.svg.js"),index=require("../../../../constant/index.js"),ToolType=require("../../../../data/enums/ToolType.js"),actionCreators=require("../../../../store/annotation/actionCreators.js"),reactI18next=require("react-i18next");function _interopDefaultLegacy(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var React__default=_interopDefaultLegacy(React),EColor;(function(t){t.Hover="#666fff",t.Normal="#cccccc"})(EColor||(EColor={}));const HeaderOption=t=>{const[n,s]=React.useState(""),{stepInfo:r}=t,c=reactRedux.useDispatch(),{annotation:{toolInstance:o,onSave:i}}=reactRedux.useSelector(e=>({annotation:e.annotation,imgAttribute:e.imgAttribute})),{t:l}=reactI18next.useTranslation(),a=t.isBegin||(r==null?void 0:r.tool)===ToolType.EToolName.Tag,v=()=>{r.dataSourceStep!==0&&r.dataSourceStep!==void 0||o==null||o.updateRotate()},m=React.useCallback(()=>{o==null||o.undo()},[o]),u=React.useCallback(()=>{o==null||o.redo()},[o]),d=[{toolName:"save",title:"Save",show:!!i,commonSvg:icon_save,selectedSvg:icon_saveA,click:()=>{c(actionCreators.ChangeSave)},style:{fontSize:"12px",color:!a&&n==="save"?EColor.Hover:EColor.Normal}},{toolName:"revocation",title:"Undo",show:!0,commonSvg:icon_back,selectedSvg:icon_backA,click:()=>{m()},style:{opacity:a===!0?.4:1,fontSize:"12px",color:!a&&n==="revocation"?EColor.Hover:EColor.Normal}},{toolName:"restore",title:"Redo",show:!0,commonSvg:icon_next,selectedSvg:icon_nextA,click:()=>{u()},style:{opacity:a===!0?.4:1,fontSize:"12px",color:!a&&n==="restore"?EColor.Hover:EColor.Normal}},{toolName:"rotate",title:"Rotate",show:!0,selectedSvg:icon_rA,commonSvg:icon_r,click:()=>{v()},style:{fontSize:"12px",color:!a&&n==="rotate"?EColor.Hover:EColor.Normal}}];return React__default.default.createElement("div",{className:`${index.prefix}-header__hotKey`},d.map(e=>e.show&&React__default.default.createElement("div",{key:e.toolName,className:"item",onMouseEnter:()=>s(e.toolName),onMouseLeave:()=>s("")},React__default.default.createElement("a",{className:"item",onClick:e.click},React__default.default.createElement("img",{className:"singleTool",src:n===e.toolName?e.selectedSvg:e.commonSvg,style:e.style}),React__default.default.createElement("div",{style:e.style},l(e.title))))))};module.exports=HeaderOption;
1
+ "use strict";var React=require("react"),reactRedux=require("react-redux"),icon_r=require("../../../../assets/annotation/common/icon_r.svg.js"),icon_next=require("../../../../assets/annotation/common/icon_next.svg.js"),icon_back=require("../../../../assets/annotation/common/icon_back.svg.js"),icon_rA=require("../../../../assets/annotation/common/icon_rA.svg.js"),icon_nextA=require("../../../../assets/annotation/common/icon_nextA.svg.js"),icon_backA=require("../../../../assets/annotation/common/icon_backA.svg.js"),icon_save=require("../../../../assets/annotation/common/icon_save.svg.js"),icon_saveA=require("../../../../assets/annotation/common/icon_saveA.svg.js"),index=require("../../../../constant/index.js"),ToolType=require("../../../../data/enums/ToolType.js"),actionCreators=require("../../../../store/annotation/actionCreators.js"),reactI18next=require("react-i18next"),lbAnnotation=require("@labelbee/lb-annotation");function _interopDefaultLegacy(o){return o&&typeof o=="object"&&"default"in o?o:{default:o}}var React__default=_interopDefaultLegacy(React);const{EVideoToolName}=lbAnnotation.cTool;var EColor;(function(o){o.Hover="#666fff",o.Normal="#cccccc"})(EColor||(EColor={}));const HeaderOption=o=>{const[r,c]=React.useState(""),{stepInfo:a}=o,l=reactRedux.useDispatch(),{annotation:{toolInstance:t,onSave:u}}=reactRedux.useSelector(e=>({annotation:e.annotation,imgAttribute:e.imgAttribute})),{t:v}=reactI18next.useTranslation(),s=[ToolType.EToolName.Tag,EVideoToolName.VideoTagTool].includes(a==null?void 0:a.tool),i=[EVideoToolName.VideoTagTool].includes(a==null?void 0:a.tool),n=o.isBegin||s,m=()=>{a.dataSourceStep!==0&&a.dataSourceStep!==void 0||t==null||t.updateRotate()},d=React.useCallback(()=>{t==null||t.undo()},[t]),g=React.useCallback(()=>{t==null||t.redo()},[t]),S=[{toolName:"save",title:"Save",show:!!u,commonSvg:icon_save,selectedSvg:icon_saveA,click:()=>{l(actionCreators.ChangeSave)},style:{fontSize:"12px",color:!n&&r==="save"?EColor.Hover:EColor.Normal}},{toolName:"revocation",title:"Undo",show:!0,commonSvg:icon_back,selectedSvg:icon_backA,click:()=>{s||d()},style:{opacity:n===!0?.4:1,fontSize:"12px",color:!n&&r==="revocation"?EColor.Hover:EColor.Normal}},{toolName:"restore",title:"Redo",show:!0,commonSvg:icon_next,selectedSvg:icon_nextA,click:()=>{s||g()},style:{opacity:n===!0?.4:1,fontSize:"12px",color:!n&&r==="restore"?EColor.Hover:EColor.Normal}},{toolName:"rotate",title:"Rotate",show:!0,selectedSvg:icon_rA,commonSvg:icon_r,click:()=>{i||m()},style:{opacity:i===!0?.4:1,fontSize:"12px",color:!n&&r==="rotate"?EColor.Hover:EColor.Normal}}];return React__default.default.createElement("div",{className:`${index.prefix}-header__hotKey`},S.map(e=>e.show&&React__default.default.createElement("div",{key:e.toolName,className:"item",onMouseEnter:()=>c(e.toolName),onMouseLeave:()=>c("")},React__default.default.createElement("a",{className:"item",onClick:e.click},React__default.default.createElement("img",{className:"singleTool",src:r===e.toolName?e.selectedSvg:e.commonSvg,style:e.style}),React__default.default.createElement("div",{style:e.style},v(e.title))))))};module.exports=HeaderOption;
@@ -1 +1 @@
1
- "use strict";var React=require("react"),icons=require("@ant-design/icons"),reactRedux=require("react-redux"),index$4=require("../../../index.js"),classNames=require("classnames"),index=require("../../../constant/index.js"),index$3=require("./ExportData/index.js"),index$2=require("./headerOption/index.js"),es=require("antd/es"),actionCreators=require("../../../store/annotation/actionCreators.js"),index$1=require("./StepSwitch/index.js"),lbUtils=require("@labelbee/lb-utils"),reactI18next=require("react-i18next"),useSize=require("../../../hooks/useSize.js"),_=require("lodash");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var React__default=_interopDefaultLegacy(React),classNames__default=_interopDefaultLegacy(classNames);const NextButton=({disabled:e})=>{const{t}=reactI18next.useTranslation();return React__default.default.createElement(es.Button,{type:"primary",style:{marginLeft:10},onClick:()=>{index$4.store.dispatch(actionCreators.ToNextStep(0))},disabled:e},t("NextStep"))},NextStep=({step:e,stepProgress:t,stepList:n})=>{var r;const{t:i}=reactI18next.useTranslation(),o=(r=_.last(n))==null?void 0:r.step;if(n.length<2||e===o)return null;const a=t<1;return a?React__default.default.createElement(es.Tooltip,{title:i("StepNotFinishedNotify")},React__default.default.createElement("span",null,React__default.default.createElement(NextButton,{disabled:a}))):React__default.default.createElement(NextButton,{disabled:a})},ToolHeader=({goBack:e,exportData:t,headerName:n,imgList:r,stepProgress:i,stepInfo:o,stepList:a,step:p,annotationEngine:m})=>{var s;const v=reactRedux.useDispatch(),[,x]=React.useReducer(l=>l+1,0),c=React.useRef(null),u=useSize(c),E=React__default.default.createElement(index$3,{exportData:t}),g=()=>{v(actionCreators.ToSubmitFileData(index.ESubmitType.Quit)),e&&e(r)},d=l=>{lbUtils.i18n.changeLanguage(l),m.setLang(l),x()},f=lbUtils.i18n.language,h=(s=u==null?void 0:u.width)!=null?s:window.innerWidth;return React__default.default.createElement("div",{className:classNames__default.default(`${index.prefix}-header`),ref:c},React__default.default.createElement("div",{className:`${index.prefix}-header__title`},React__default.default.createElement(icons.LeftOutlined,{className:`${index.prefix}-header__icon`,onClick:g}),n?React__default.default.createElement("span",{className:`${index.prefix}-header__name`},n):"",a.length>1&&React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement(index$1,{stepProgress:i}),React__default.default.createElement(NextStep,{step:p,stepProgress:i,stepList:a})),E,React__default.default.createElement("div",{id:"operationNode",className:`${index.prefix}-header__operationNode`,style:{left:h/2-174/2}},React__default.default.createElement(index$2,{stepInfo:o})),React__default.default.createElement("div",{className:`${index.prefix}-header__titlePlacement`}),React__default.default.createElement("div",{className:`${index.prefix}-header__lang`},React__default.default.createElement("span",{className:`${index.prefix}-langCN ${f==="cn"?"active":""}`,onClick:()=>d("cn")},"\u4E2D\u6587")," / ",React__default.default.createElement("span",{className:`${index.prefix}-langEN ${f==="en"?"active":""}`,onClick:()=>d("en")},"En"))))},mapStateToProps=e=>{var t;return{imgList:e.annotation.imgList,annotationEngine:e.annotation.annotationEngine,stepProgress:e.annotation.stepProgress,toolName:(t=e.annotation.stepList[e.annotation.step-1])==null?void 0:t.tool,stepList:e.annotation.stepList,stepInfo:e.annotation.stepList[e.annotation.step-1],step:e.annotation.step}};var ToolHeader$1=reactRedux.connect(mapStateToProps)(ToolHeader);module.exports=ToolHeader$1;
1
+ "use strict";var index$1=require("../../../constant/index.js"),useSize=require("../../../hooks/useSize.js"),actionCreators=require("../../../store/annotation/actionCreators.js"),icons=require("@ant-design/icons"),lbUtils=require("@labelbee/lb-utils"),es=require("antd/es"),classNames=require("classnames"),_=require("lodash"),React=require("react"),reactI18next=require("react-i18next"),reactRedux=require("react-redux"),index$4=require("../../../index.js"),index$2=require("./ExportData/index.js"),index$3=require("./headerOption/index.js"),index=require("./StepSwitch/index.js");function _interopDefaultLegacy(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var classNames__default=_interopDefaultLegacy(classNames),React__default=_interopDefaultLegacy(React);const NextButton=({disabled:e,imgList:n})=>{const{t}=reactI18next.useTranslation(),r=()=>{const{dispatch:a,getState:i}=index$4.store;n[0]?a(actionCreators.ToNextStep(0)):actionCreators.loadImgList(a,i,0).then(o=>{o&&a(actionCreators.ToNextStep(0))})};return React__default.default.createElement(es.Button,{type:"primary",style:{marginLeft:10},onClick:r,disabled:e},t("NextStep"))},NextStep=({step:e,stepProgress:n,stepList:t,imgList:r})=>{var a;const{t:i}=reactI18next.useTranslation(),o=(a=_.last(t))==null?void 0:a.step;if(t.length<2||e===o)return null;const l=n<1;return l?React__default.default.createElement(es.Tooltip,{title:i("StepNotFinishedNotify")},React__default.default.createElement("span",null,React__default.default.createElement(NextButton,{disabled:l,imgList:r}))):React__default.default.createElement(NextButton,{disabled:l,imgList:r})},ToolHeader=({goBack:e,exportData:n,header:t,headerName:r,imgList:a,stepProgress:i,stepInfo:o,stepList:l,step:g,annotationEngine:u})=>{var d;const $=reactRedux.useDispatch(),[,q]=React.useReducer(s=>s+1,0),c=React.useRef(null),f=useSize(c),S=React__default.default.createElement(index$2,{exportData:n}),L=()=>{$(actionCreators.ToSubmitFileData(index$1.ESubmitType.Quit)),e&&e(a)},p=s=>{lbUtils.i18n.changeLanguage(s),u==null||u.setLang(s),q()},m=lbUtils.i18n.language,T=(d=f==null?void 0:f.width)!=null?d:window.innerWidth,v=React__default.default.createElement(icons.LeftOutlined,{className:`${index$1.prefix}-header__icon`,onClick:L}),x=r?React__default.default.createElement("span",{className:`${index$1.prefix}-header__name`},r):"",N=l.length>1&&React__default.default.createElement(React__default.default.Fragment,null,React__default.default.createElement(index,{stepProgress:i}),React__default.default.createElement(NextStep,{step:g,stepProgress:i,stepList:l,imgList:a})),E=React__default.default.createElement(index$3,{stepInfo:o}),h=React__default.default.createElement("div",{className:`${index$1.prefix}-header__lang`},React__default.default.createElement("span",{className:`${index$1.prefix}-langCN ${m==="cn"?"active":""}`,onClick:()=>p("cn")},"\u4E2D\u6587")," / ",React__default.default.createElement("span",{className:`${index$1.prefix}-langEN ${m==="en"?"active":""}`,onClick:()=>p("en")},"En"));return t?typeof t=="function"?React__default.default.createElement("div",{className:classNames__default.default(`${index$1.prefix}-header`),ref:c},React__default.default.createElement("div",{className:`${index$1.prefix}-header__title`},t({backNode:v,headerNameNode:x,stepListNode:N,headerOptionNode:E,langNode:h}))):t:React__default.default.createElement("div",{className:classNames__default.default(`${index$1.prefix}-header`),ref:c},React__default.default.createElement("div",{className:`${index$1.prefix}-header__title`},v,x,N,S,React__default.default.createElement("div",{id:"operationNode",className:`${index$1.prefix}-header__operationNode`,style:{left:T/2-174/2}},E),React__default.default.createElement("div",{className:`${index$1.prefix}-header__titlePlacement`}),h))},mapStateToProps=e=>{var n;return{imgList:e.annotation.imgList,annotationEngine:e.annotation.annotationEngine,stepProgress:e.annotation.stepProgress,toolName:(n=e.annotation.stepList[e.annotation.step-1])==null?void 0:n.tool,stepList:e.annotation.stepList,stepInfo:e.annotation.stepList[e.annotation.step-1],step:e.annotation.step}};var ToolHeader$1=reactRedux.connect(mapStateToProps)(ToolHeader);module.exports=ToolHeader$1;
package/es/App.js CHANGED
@@ -1 +1 @@
1
- import n,{useEffect as i}from"react";import{connect as v}from"react-redux";import{store as _}from"./index.js";import{InitTaskData as g}from"./store/annotation/actionCreators.js";import w from"./views/MainView/index.js";import{i18n as I}from"@labelbee/lb-utils";var O=Object.defineProperty,s=Object.getOwnPropertySymbols,P=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable,l=(e,t,r)=>t in e?O(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y=(e,t)=>{for(var r in t||(t={}))P.call(t,r)&&l(e,r,t[r]);if(s)for(var r of s(t))b.call(t,r)&&l(e,r,t[r]);return e};const j=e=>{const{imgList:t,step:r,stepList:p,onSubmit:c,onSave:m,initialIndex:f=0,toolInstance:o,setToolInstance:a,getFileData:u,defaultLang:d="cn"}=e;return i(()=>{_.dispatch(g({imgList:t,onSubmit:c,stepList:p,step:r,initialIndex:f,getFileData:u,onSave:m})),I.changeLanguage(d)},[]),i(()=>{a==null||a(o)},[o]),n.createElement("div",null,n.createElement(w,y({},e)))},x=e=>({toolInstance:e.annotation.toolInstance});var E=v(x)(j);export{E as default};
1
+ import L from"./views/MainView/index.js";import{i18n as w}from"@labelbee/lb-utils";import p,{useEffect as l}from"react";import{connect as y}from"react-redux";import{store as o}from"./index.js";import{ANNOTATION_ACTIONS as A}from"./store/Actions.js";import{InitTaskData as T,loadImgList as j}from"./store/annotation/actionCreators.js";import{LoadFileAndFileData as c}from"./store/annotation/reducer.js";var b=Object.defineProperty,m=Object.getOwnPropertySymbols,E=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,f=(e,t,a)=>t in e?b(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,N=(e,t)=>{for(var a in t||(t={}))E.call(t,a)&&f(e,a,t[a]);if(m)for(var a of m(t))x.call(t,a)&&f(e,a,t[a]);return e};const C=e=>{const{imgList:t,step:a=1,stepList:d,onSubmit:u,onSave:g,onPageChange:_,onStepChange:I,initialIndex:r=0,toolInstance:n,setToolInstance:i,getFileData:h,pageSize:v=10,loadFileList:s,defaultLang:O="cn"}=e;l(()=>{o.dispatch(T({onSubmit:u,stepList:d,step:a,getFileData:h,pageSize:v,loadFileList:s,onSave:g,onPageChange:_,onStepChange:I})),P(),w.changeLanguage(O)},[]),l(()=>{i==null||i(n)},[n]);const P=()=>{s?j(o.dispatch,o.getState,r,!0).then(S=>{S&&o.dispatch(c(r))}):t&&t.length>0&&(o.dispatch({type:A.UPDATE_IMG_LIST,payload:{imgList:t}}),o.dispatch(c(r)))};return p.createElement("div",null,p.createElement(L,N({},e)))},D=e=>({toolInstance:e.annotation.toolInstance});var F=y(D)(C);export{F as default};
package/es/App.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"App.js","sources":["../src/App.tsx"],"sourcesContent":["import React, { useEffect } from 'react';\nimport { connect } from 'react-redux';\nimport { store } from '.';\nimport { AppState } from './store';\nimport { InitTaskData } from './store/annotation/actionCreators';\nimport MainView from '@/views/MainView';\nimport { IStepInfo } from './types/step';\nimport { OnSubmit, GetFileData, OnSave } from './types/data';\nimport { ToolInstance } from './store/annotation/types';\nimport { i18n } from '@labelbee/lb-utils';\n\nexport interface AppProps {\n exportData?: (data: any[]) => void;\n goBack?: () => void;\n imgList: string[];\n config: string;\n stepList: IStepInfo[];\n step: number;\n onSubmit?: OnSubmit;\n onSave?: OnSave;\n getFileData?: GetFileData;\n headerName?: string;\n initialIndex?: number;\n className?: string;\n toolInstance: ToolInstance;\n header?: React.ReactNode;\n footer?: React.ReactNode;\n sider?: React.ReactNode;\n style?: {\n layout?: { [key: string]: any };\n header?: { [key: string]: any };\n sider?: { [key: string]: any };\n footer?: { [key: string]: any };\n };\n setToolInstance?: (tool: ToolInstance) => void;\n mode?: 'light' | 'dark'; // 临时需求应用于 toolFooter 的操作\n defaultLang: 'en' | 'cn'; // 国际化设置\n}\n\nconst App: React.FC<AppProps> = (props) => {\n const {\n imgList,\n step,\n stepList,\n onSubmit,\n onSave,\n initialIndex = 0,\n toolInstance,\n setToolInstance,\n getFileData,\n defaultLang = 'cn',\n } = props;\n useEffect(() => {\n store.dispatch(\n InitTaskData({ imgList, onSubmit, stepList, step, initialIndex, getFileData, onSave }),\n );\n\n // 初始化国际化语言\n i18n.changeLanguage(defaultLang);\n }, []);\n\n useEffect(() => {\n setToolInstance?.(toolInstance);\n }, [toolInstance]);\n\n return (\n <div>\n <MainView {...props} />\n </div>\n );\n};\n\nconst mapStateToProps = (state: AppState) => ({\n toolInstance: state.annotation.toolInstance,\n});\n\nexport default connect(mapStateToProps)(App);\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAuCA,MAAM,MAA0B,CAAC,UAAU;AACzC,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,eAAe;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,IACA,cAAc;AAAA,MACZ;AACJ,YAAU,MAAM;AACd,UAAM,SACJ,aAAa,CAAE,SAAS,UAAU,UAAU,MAAM,cAAc,aAAa;AAI/E,SAAK,eAAe;AAAA,KACnB;AAEH,YAAU,MAAM;AACd,uDAAkB;AAAA,KACjB,CAAC;AAEJ,6CACG,OAAD,0CACG,UAAD,mBAAc;AAAA;AAKpB,MAAM,kBAAkB,CAAC;AAAqB,EAC5C,cAAc,MAAM,WAAW;AAAA;AAGjC,YAAe,QAAQ,iBAAiB;;;;"}
1
+ {"version":3,"file":"App.js","sources":["../src/App.tsx"],"sourcesContent":["import MainView from '@/views/MainView';\nimport { i18n } from '@labelbee/lb-utils';\nimport React, { useEffect } from 'react';\nimport { connect } from 'react-redux';\nimport { store } from '.';\nimport { AppState } from './store';\nimport { ANNOTATION_ACTIONS } from './store/Actions';\nimport { InitTaskData, loadImgList } from './store/annotation/actionCreators';\nimport { LoadFileAndFileData } from './store/annotation/reducer';\nimport { ToolInstance } from './store/annotation/types';\nimport {\n GetFileData,\n OnSave,\n OnSubmit,\n IFileItem,\n OnPageChange,\n OnStepChange,\n LoadFileList,\n} from './types/data';\nimport { Footer, Header, Sider } from './types/main';\nimport { IStepInfo } from './types/step';\n\ninterface IAnnotationStyle {\n strokeColor: string;\n fillColor: string;\n textColor: string;\n toolColor: any;\n}\n\nexport interface AppProps {\n exportData?: (data: any[]) => void;\n goBack?: () => void;\n imgList?: IFileItem[];\n config: string;\n stepList: IStepInfo[];\n step: number;\n onSubmit?: OnSubmit;\n onSave?: OnSave;\n onPageChange?: OnPageChange;\n onStepChange?: OnStepChange;\n getFileData?: GetFileData;\n pageSize: number;\n loadFileList?: LoadFileList;\n headerName?: string;\n initialIndex?: number;\n className?: string;\n toolInstance: ToolInstance;\n header?: Header;\n footer?: Footer;\n sider?: Sider;\n style?: {\n layout?: { [key: string]: any };\n header?: { [key: string]: any };\n sider?: { [key: string]: any };\n footer?: { [key: string]: any };\n };\n setToolInstance?: (tool: ToolInstance) => void;\n mode?: 'light' | 'dark'; // 临时需求应用于 toolFooter 的操作\n showTips?: boolean; // 是否展示 tips\n defaultLang: 'en' | 'cn'; // 国际化设置\n leftSider?: () => React.ReactNode | React.ReactNode;\n\n // 标注信息扩展的功能\n dataInjectionAtCreation: (annotationData: any) => {};\n // 渲染增强\n renderEnhance: {\n staticRender?: (canvas: HTMLCanvasElement, data: any, style: IAnnotationStyle) => void;\n selectedRender?: (canvas: HTMLCanvasElement, data: any, style: IAnnotationStyle) => void;\n creatingRender?: (canvas: HTMLCanvasElement, data: any, style: IAnnotationStyle) => void;\n };\n}\n\nconst App: React.FC<AppProps> = (props) => {\n const {\n imgList,\n step = 1,\n stepList,\n onSubmit,\n onSave,\n onPageChange,\n onStepChange,\n initialIndex = 0,\n toolInstance,\n setToolInstance,\n getFileData,\n pageSize = 10,\n loadFileList,\n defaultLang = 'cn',\n } = props;\n\n useEffect(() => {\n store.dispatch(\n InitTaskData({\n onSubmit,\n stepList,\n step,\n getFileData,\n pageSize,\n loadFileList,\n onSave,\n onPageChange,\n onStepChange,\n }),\n );\n\n initImgList();\n // 初始化国际化语言\n i18n.changeLanguage(defaultLang);\n }, []);\n\n useEffect(() => {\n setToolInstance?.(toolInstance);\n }, [toolInstance]);\n\n // 初始化imgList 优先以loadFileList方式加载数据\n const initImgList = () => {\n if (loadFileList) {\n loadImgList(store.dispatch, store.getState, initialIndex, true).then((isSuccess) => {\n if (isSuccess) {\n store.dispatch(LoadFileAndFileData(initialIndex));\n }\n });\n } else if (imgList && imgList.length > 0) {\n store.dispatch({\n type: ANNOTATION_ACTIONS.UPDATE_IMG_LIST,\n payload: {\n imgList,\n },\n });\n store.dispatch(LoadFileAndFileData(initialIndex));\n }\n };\n\n return (\n <div>\n <MainView {...props} />\n </div>\n );\n};\n\nconst mapStateToProps = (state: AppState) => ({\n toolInstance: state.annotation.toolInstance,\n});\n\nexport default connect(mapStateToProps)(App);\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAwEA,MAAM,GAAA,GAA0B,CAAC,KAAU,KAAA;AACzC,EAAM,MAAA;AAAA,IACJ,OAAA;AAAA,IACA,IAAO,GAAA,CAAA;AAAA,IACP,QAAA;AAAA,IACA,QAAA;AAAA,IACA,MAAA;AAAA,IACA,YAAA;AAAA,IACA,YAAA;AAAA,IACA,YAAe,GAAA,CAAA;AAAA,IACf,YAAA;AAAA,IACA,eAAA;AAAA,IACA,WAAA;AAAA,IACA,QAAW,GAAA,EAAA;AAAA,IACX,YAAA;AAAA,IACA,WAAc,GAAA,IAAA;AAAA,GACZ,GAAA,KAAA,CAAA;AAEJ,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,KAAA,CAAM,SACJ,YAAa,CAAA;AAAA,MACX,QAAA;AAAA,MACA,QAAA;AAAA,MACA,IAAA;AAAA,MACA,WAAA;AAAA,MACA,QAAA;AAAA,MACA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,YAAA;AAAA,MACA,YAAA;AAAA,KAAA,CAAA,CAAA,CAAA;AAIJ,IAAA,WAAA,EAAA,CAAA;AAEA,IAAA,IAAA,CA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 @@
1
+ var c="data:image/svg+xml,%3csvg id='icon_back_kj' xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e %3cdefs%3e %3cstyle%3e .cls-1 %7b fill: none%3b %7d .cls-2 %7b fill: %23666%3b %7d %3c/style%3e %3c/defs%3e %3crect id='%e7%9f%a9%e5%bd%a2%e5%a4%87%e4%bb%bd_10' data-name='%e7%9f%a9%e5%bd%a2%e5%a4%87%e4%bb%bd 10' class='cls-1' width='16' height='16'/%3e %3cg id='%e7%bb%84_1224' data-name='%e7%bb%84 1224' transform='translate(-0.347 0.145)'%3e %3cpath id='%e8%b7%af%e5%be%84' class='cls-2' d='M.118%2c3.807%2c5.615.058A.318.318%2c0%2c0%2c1%2c6.12.27v7.5a.318.318%2c0%2c0%2c1-.505.211L.118%2c4.229A.248.248%2c0%2c0%2c1%2c.118%2c3.807Z' transform='translate(7.824 3.855)'/%3e %3cpath id='%e8%b7%af%e5%be%84-2' data-name='%e8%b7%af%e5%be%84' class='cls-2' d='M.118%2c3.807%2c5.615.058A.318.318%2c0%2c0%2c1%2c6.12.27v7.5a.318.318%2c0%2c0%2c1-.505.211L.118%2c4.229A.248.248%2c0%2c0%2c1%2c.118%2c3.807Z' transform='translate(2.348 3.855)'/%3e %3c/g%3e%3c/svg%3e";export{c as default};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon_back_kj.svg.js","sources":["../../../../src/assets/annotation/toolHotKeyIcon/icon_back_kj.svg"],"sourcesContent":["var img = \"data:image/svg+xml,%3csvg id='icon_back_kj' xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e %3cdefs%3e %3cstyle%3e .cls-1 %7b fill: none%3b %7d .cls-2 %7b fill: %23666%3b %7d %3c/style%3e %3c/defs%3e %3crect id='%e7%9f%a9%e5%bd%a2%e5%a4%87%e4%bb%bd_10' data-name='%e7%9f%a9%e5%bd%a2%e5%a4%87%e4%bb%bd 10' class='cls-1' width='16' height='16'/%3e %3cg id='%e7%bb%84_1224' data-name='%e7%bb%84 1224' transform='translate(-0.347 0.145)'%3e %3cpath id='%e8%b7%af%e5%be%84' class='cls-2' d='M.118%2c3.807%2c5.615.058A.318.318%2c0%2c0%2c1%2c6.12.27v7.5a.318.318%2c0%2c0%2c1-.505.211L.118%2c4.229A.248.248%2c0%2c0%2c1%2c.118%2c3.807Z' transform='translate(7.824 3.855)'/%3e %3cpath id='%e8%b7%af%e5%be%84-2' data-name='%e8%b7%af%e5%be%84' class='cls-2' d='M.118%2c3.807%2c5.615.058A.318.318%2c0%2c0%2c1%2c6.12.27v7.5a.318.318%2c0%2c0%2c1-.505.211L.118%2c4.229A.248.248%2c0%2c0%2c1%2c.118%2c3.807Z' transform='translate(2.348 3.855)'/%3e %3c/g%3e%3c/svg%3e\";\n export default img;"],"names":[],"mappings":"AAAG,IAAC,GAAG,GAAG;;;;"}
@@ -0,0 +1 @@
1
+ var c="data:image/svg+xml,%3csvg id='icon_forward_kj' xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e %3cdefs%3e %3cstyle%3e .cls-1 %7b fill: none%3b %7d .cls-2 %7b fill: %23666%3b %7d %3c/style%3e %3c/defs%3e %3crect id='%e7%9f%a9%e5%bd%a2%e5%a4%87%e4%bb%bd_10' data-name='%e7%9f%a9%e5%bd%a2%e5%a4%87%e4%bb%bd 10' class='cls-1' width='16' height='16'/%3e %3cg id='%e7%bb%84_1225' data-name='%e7%bb%84 1225' transform='translate(-0.347 0.145)'%3e %3cpath id='%e8%b7%af%e5%be%84' class='cls-2' d='M6%2c3.807.505.058A.318.318%2c0%2c0%2c0%2c0%2c.27v7.5a.318.318%2c0%2c0%2c0%2c.505.211L6%2c4.229A.248.248%2c0%2c0%2c0%2c6%2c3.807Z' transform='translate(2.348 3.855)'/%3e %3cpath id='%e8%b7%af%e5%be%84-2' data-name='%e8%b7%af%e5%be%84' class='cls-2' d='M6%2c3.807.505.058A.318.318%2c0%2c0%2c0%2c0%2c.27v7.5a.318.318%2c0%2c0%2c0%2c.505.211L6%2c4.229A.248.248%2c0%2c0%2c0%2c6%2c3.807Z' transform='translate(7.824 3.855)'/%3e %3c/g%3e%3c/svg%3e";export{c as default};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon_forward_kj.svg.js","sources":["../../../../src/assets/annotation/toolHotKeyIcon/icon_forward_kj.svg"],"sourcesContent":["var img = \"data:image/svg+xml,%3csvg id='icon_forward_kj' xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e %3cdefs%3e %3cstyle%3e .cls-1 %7b fill: none%3b %7d .cls-2 %7b fill: %23666%3b %7d %3c/style%3e %3c/defs%3e %3crect id='%e7%9f%a9%e5%bd%a2%e5%a4%87%e4%bb%bd_10' data-name='%e7%9f%a9%e5%bd%a2%e5%a4%87%e4%bb%bd 10' class='cls-1' width='16' height='16'/%3e %3cg id='%e7%bb%84_1225' data-name='%e7%bb%84 1225' transform='translate(-0.347 0.145)'%3e %3cpath id='%e8%b7%af%e5%be%84' class='cls-2' d='M6%2c3.807.505.058A.318.318%2c0%2c0%2c0%2c0%2c.27v7.5a.318.318%2c0%2c0%2c0%2c.505.211L6%2c4.229A.248.248%2c0%2c0%2c0%2c6%2c3.807Z' transform='translate(2.348 3.855)'/%3e %3cpath id='%e8%b7%af%e5%be%84-2' data-name='%e8%b7%af%e5%be%84' class='cls-2' d='M6%2c3.807.505.058A.318.318%2c0%2c0%2c0%2c0%2c.27v7.5a.318.318%2c0%2c0%2c0%2c.505.211L6%2c4.229A.248.248%2c0%2c0%2c0%2c6%2c3.807Z' transform='translate(7.824 3.855)'/%3e %3c/g%3e%3c/svg%3e\";\n export default img;"],"names":[],"mappings":"AAAG,IAAC,GAAG,GAAG;;;;"}
@@ -0,0 +1 @@
1
+ var e="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e %3cdefs%3e %3cstyle%3e .cls-1 %7b fill: white%3b opacity: 0%3b %7d .cls-2 %7b fill: %23666%3b %7d %3c/style%3e %3c/defs%3e %3cg id='icon_playPause' transform='translate(0.16 0.16)'%3e %3crect id='%e7%9f%a9%e5%bd%a2' class='cls-1' width='16' height='16' transform='translate(-0.16 -0.16)'/%3e %3cg id='%e7%bb%84_1221' data-name='%e7%bb%84 1221' transform='translate(1.84 3.671)'%3e %3cpath id='%e8%b7%af%e5%be%84' class='cls-2' d='M6.038%2c3.829.508.059A.32.32%2c0%2c0%2c0%2c0%2c.271V7.813a.32.32%2c0%2c0%2c0%2c.508.212l5.53-3.771A.249.249%2c0%2c0%2c0%2c6.038%2c3.829Z' transform='translate(1 0)'/%3e %3crect id='%e7%9f%a9%e5%bd%a2_400' data-name='%e7%9f%a9%e5%bd%a2 400' class='cls-2' width='1.524' height='7.618' rx='0.762' transform='translate(6.828 0.233)'/%3e %3crect id='%e7%9f%a9%e5%bd%a2_401' data-name='%e7%9f%a9%e5%bd%a2 401' class='cls-2' width='1.524' height='7.618' rx='0.762' transform='translate(9.718 0.233)'/%3e %3c/g%3e %3c/g%3e%3c/svg%3e";export{e as default};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon_playPause.svg.js","sources":["../../../../src/assets/annotation/toolHotKeyIcon/icon_playPause.svg"],"sourcesContent":["var img = \"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e %3cdefs%3e %3cstyle%3e .cls-1 %7b fill: white%3b opacity: 0%3b %7d .cls-2 %7b fill: %23666%3b %7d %3c/style%3e %3c/defs%3e %3cg id='icon_playPause' transform='translate(0.16 0.16)'%3e %3crect id='%e7%9f%a9%e5%bd%a2' class='cls-1' width='16' height='16' transform='translate(-0.16 -0.16)'/%3e %3cg id='%e7%bb%84_1221' data-name='%e7%bb%84 1221' transform='translate(1.84 3.671)'%3e %3cpath id='%e8%b7%af%e5%be%84' class='cls-2' d='M6.038%2c3.829.508.059A.32.32%2c0%2c0%2c0%2c0%2c.271V7.813a.32.32%2c0%2c0%2c0%2c.508.212l5.53-3.771A.249.249%2c0%2c0%2c0%2c6.038%2c3.829Z' transform='translate(1 0)'/%3e %3crect id='%e7%9f%a9%e5%bd%a2_400' data-name='%e7%9f%a9%e5%bd%a2 400' class='cls-2' width='1.524' height='7.618' rx='0.762' transform='translate(6.828 0.233)'/%3e %3crect id='%e7%9f%a9%e5%bd%a2_401' data-name='%e7%9f%a9%e5%bd%a2 401' class='cls-2' width='1.524' height='7.618' rx='0.762' transform='translate(9.718 0.233)'/%3e %3c/g%3e %3c/g%3e%3c/svg%3e\";\n export default img;"],"names":[],"mappings":"AAAG,IAAC,GAAG,GAAG;;;;"}
@@ -0,0 +1 @@
1
+ var e="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3crect opacity='0.01' width='16' height='16' fill='black'/%3e%3cpath d='M10.002 9.52532H9.50201V10.0253V13.5406L2.50202 13.5406L2.50202 6.51493L6.00397 6.51493H6.50397V6.01493L6.50397 2.49963L13.5001 2.49963L13.5001 9.52532H10.002Z' fill='%23CCCCCC' stroke='%23666666'/%3e%3c/svg%3e";export{e as default};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon_polygonMerge_kj.svg.js","sources":["../../../../src/assets/annotation/toolHotKeyIcon/icon_polygonMerge_kj.svg"],"sourcesContent":["var img = \"data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3crect opacity='0.01' width='16' height='16' fill='black'/%3e%3cpath d='M10.002 9.52532H9.50201V10.0253V13.5406L2.50202 13.5406L2.50202 6.51493L6.00397 6.51493H6.50397V6.01493L6.50397 2.49963L13.5001 2.49963L13.5001 9.52532H10.002Z' fill='%23CCCCCC' stroke='%23666666'/%3e%3c/svg%3e\";\n export default img;"],"names":[],"mappings":"AAAG,IAAC,GAAG,GAAG;;;;"}
@@ -0,0 +1 @@
1
+ var t="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3crect opacity='0.01' width='16' height='16' fill='black'/%3e%3crect x='13.5' y='9.49963' width='7' height='7' transform='rotate(180 13.5 9.49963)' fill='%23CCCCCC' stroke='%23666666'/%3e%3crect x='9.5' y='13.4996' width='7' height='7' transform='rotate(180 9.5 13.4996)' fill='%23CCCCCC' stroke='%23666666'/%3e%3c/svg%3e";export{t as default};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon_segment.svg.js","sources":["../../../../src/assets/annotation/toolHotKeyIcon/icon_segment.svg"],"sourcesContent":["var img = \"data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3crect opacity='0.01' width='16' height='16' fill='black'/%3e%3crect x='13.5' y='9.49963' width='7' height='7' transform='rotate(180 13.5 9.49963)' fill='%23CCCCCC' stroke='%23666666'/%3e%3crect x='9.5' y='13.4996' width='7' height='7' transform='rotate(180 9.5 13.4996)' fill='%23CCCCCC' stroke='%23666666'/%3e%3c/svg%3e\";\n export default img;"],"names":[],"mappings":"AAAG,IAAC,GAAG,GAAG;;;;"}
@@ -0,0 +1 @@
1
+ var e="data:image/svg+xml,%3csvg id='icon_speed_kj' xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e %3cdefs%3e %3cstyle%3e .cls-1 %7b fill: none%3b %7d .cls-2 %7b fill: %23666%3b %7d %3c/style%3e %3c/defs%3e %3crect id='%e7%9f%a9%e5%bd%a2%e5%a4%87%e4%bb%bd_10' data-name='%e7%9f%a9%e5%bd%a2%e5%a4%87%e4%bb%bd 10' class='cls-1' width='16' height='16'/%3e %3cg id='%e7%bb%84_1223' data-name='%e7%bb%84 1223' transform='translate(-0.118 0.286)'%3e %3crect id='%e7%9f%a9%e5%bd%a2_402' data-name='%e7%9f%a9%e5%bd%a2 402' class='cls-2' width='1.5' height='6' rx='0.75' transform='translate(8.118 12.043) rotate(90)'/%3e %3crect id='%e7%9f%a9%e5%bd%a2_403' data-name='%e7%9f%a9%e5%bd%a2 403' class='cls-2' width='1.5' height='4' rx='0.75' transform='translate(6.118 9.043) rotate(90)'/%3e %3crect id='%e7%9f%a9%e5%bd%a2_404' data-name='%e7%9f%a9%e5%bd%a2 404' class='cls-2' width='1.5' height='3' rx='0.75' transform='translate(5.118 6.043) rotate(90)'/%3e %3cpath id='%e5%80%8d%e9%80%9f' class='cls-2' d='M219.687%2c4.153H217.4L218.806.2a.267.267%2c0%2c0%2c0%2c.017-.084.278.278%2c0%2c0%2c0-.289-.269h-2.872a.28.28%2c0%2c0%2c0-.269.186l-2.312%2c6.454a.267.267%2c0%2c0%2c0-.017.084.278.278%2c0%2c0%2c0%2c.289.269h2.552l-.541%2c4.539c0%2c.008-.008.02-.008.029a.278.278%2c0%2c0%2c0%2c.289.269.285.285%2c0%2c0%2c0%2c.253-.157l4.042-6.986a.248.248%2c0%2c0%2c0%2c.029-.111.272.272%2c0%2c0%2c0-.281-.273Z' transform='translate(-206.065 1.862)'/%3e %3c/g%3e%3c/svg%3e";export{e as default};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon_speed_kj.svg.js","sources":["../../../../src/assets/annotation/toolHotKeyIcon/icon_speed_kj.svg"],"sourcesContent":["var img = \"data:image/svg+xml,%3csvg id='icon_speed_kj' xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e %3cdefs%3e %3cstyle%3e .cls-1 %7b fill: none%3b %7d .cls-2 %7b fill: %23666%3b %7d %3c/style%3e %3c/defs%3e %3crect id='%e7%9f%a9%e5%bd%a2%e5%a4%87%e4%bb%bd_10' data-name='%e7%9f%a9%e5%bd%a2%e5%a4%87%e4%bb%bd 10' class='cls-1' width='16' height='16'/%3e %3cg id='%e7%bb%84_1223' data-name='%e7%bb%84 1223' transform='translate(-0.118 0.286)'%3e %3crect id='%e7%9f%a9%e5%bd%a2_402' data-name='%e7%9f%a9%e5%bd%a2 402' class='cls-2' width='1.5' height='6' rx='0.75' transform='translate(8.118 12.043) rotate(90)'/%3e %3crect id='%e7%9f%a9%e5%bd%a2_403' data-name='%e7%9f%a9%e5%bd%a2 403' class='cls-2' width='1.5' height='4' rx='0.75' transform='translate(6.118 9.043) rotate(90)'/%3e %3crect id='%e7%9f%a9%e5%bd%a2_404' data-name='%e7%9f%a9%e5%bd%a2 404' class='cls-2' width='1.5' height='3' rx='0.75' transform='translate(5.118 6.043) rotate(90)'/%3e %3cpath id='%e5%80%8d%e9%80%9f' class='cls-2' d='M219.687%2c4.153H217.4L218.806.2a.267.267%2c0%2c0%2c0%2c.017-.084.278.278%2c0%2c0%2c0-.289-.269h-2.872a.28.28%2c0%2c0%2c0-.269.186l-2.312%2c6.454a.267.267%2c0%2c0%2c0-.017.084.278.278%2c0%2c0%2c0%2c.289.269h2.552l-.541%2c4.539c0%2c.008-.008.02-.008.029a.278.278%2c0%2c0%2c0%2c.289.269.285.285%2c0%2c0%2c0%2c.253-.157l4.042-6.986a.248.248%2c0%2c0%2c0%2c.029-.111.272.272%2c0%2c0%2c0-.281-.273Z' transform='translate(-206.065 1.862)'/%3e %3c/g%3e%3c/svg%3e\";\n export default img;"],"names":[],"mappings":"AAAG,IAAC,GAAG,GAAG;;;;"}
@@ -0,0 +1 @@
1
+ var c="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='15' height='13' viewBox='0 0 15 13'%3e %3cdefs%3e %3cstyle%3e .cls-1 %7b opacity: 0.8%3b %7d .cls-2 %7b fill: white%3b %7d %3c/style%3e %3c/defs%3e %3cg id='icon_keyboard_h' class='cls-1'%3e %3cg id='%e5%9b%be%e6%a0%87_%e8%ae%be%e7%bd%ae_%e5%bf%ab%e6%8d%b7%e9%94%ae'%3e %3cpath id='%e5%bd%a2%e7%8a%b6' class='cls-2' d='M2.142%2c13a2.205%2c2.205%2c0%2c0%2c1-1.513-.585A1.949%2c1.949%2c0%2c0%2c1%2c0%2c11V2A2.083%2c2.083%2c0%2c0%2c1%2c2.149%2c0h10.7A2.083%2c2.083%2c0%2c0%2c1%2c15%2c2V11a1.927%2c1.927%2c0%2c0%2c1-.63%2c1.417A2.209%2c2.209%2c0%2c0%2c1%2c12.855%2c13H2.142ZM3.209%2c9a1%2c1%2c0%2c1%2c0%2c0%2c2h8.582a1%2c1%2c0%2c1%2c0%2c0-2ZM11%2c5c-.069%2c0-.287.058-.287.194V6.739c0%2c.085%2c0%2c.261.287.261h1.639c.217%2c0%2c.217-.156.217-.23V5.23A.243.243%2c0%2c0%2c0%2c12.6%2c5ZM6.716%2c5c-.069%2c0-.287.058-.287.194V6.739c0%2c.085%2c0%2c.261.287.261H8.355c.217%2c0%2c.217-.156.217-.23V5.23A.243.243%2c0%2c0%2c0%2c8.319%2c5ZM2.43%2c5c-.069%2c0-.287.058-.287.194V6.739c0%2c.085%2c0%2c.261.287.261H4.069c.217%2c0%2c.217-.156.217-.23V5.23A.243.243%2c0%2c0%2c0%2c4.033%2c5ZM11%2c2c-.069%2c0-.287.059-.287.2V3.739c0%2c.085%2c0%2c.261.287.261h1.639c.217%2c0%2c.217-.155.217-.23V2.23A.243.243%2c0%2c0%2c0%2c12.6%2c2ZM6.716%2c2c-.069%2c0-.287.059-.287.2V3.739c0%2c.085%2c0%2c.261.287.261H8.355c.217%2c0%2c.217-.155.217-.23V2.23A.243.243%2c0%2c0%2c0%2c8.319%2c2ZM2.43%2c2c-.069%2c0-.287.059-.287.2V3.739c0%2c.085%2c0%2c.261.287.261H4.069c.217%2c0%2c.217-.155.217-.23V2.23A.243.243%2c0%2c0%2c0%2c4.033%2c2Z'/%3e %3c/g%3e %3c/g%3e%3c/svg%3e";export{c as default};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon_keyboard_h.svg.js","sources":["../../../../src/assets/annotation/video/icon_keyboard_h.svg"],"sourcesContent":["var img = \"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='15' height='13' viewBox='0 0 15 13'%3e %3cdefs%3e %3cstyle%3e .cls-1 %7b opacity: 0.8%3b %7d .cls-2 %7b fill: white%3b %7d %3c/style%3e %3c/defs%3e %3cg id='icon_keyboard_h' class='cls-1'%3e %3cg id='%e5%9b%be%e6%a0%87_%e8%ae%be%e7%bd%ae_%e5%bf%ab%e6%8d%b7%e9%94%ae'%3e %3cpath id='%e5%bd%a2%e7%8a%b6' class='cls-2' d='M2.142%2c13a2.205%2c2.205%2c0%2c0%2c1-1.513-.585A1.949%2c1.949%2c0%2c0%2c1%2c0%2c11V2A2.083%2c2.083%2c0%2c0%2c1%2c2.149%2c0h10.7A2.083%2c2.083%2c0%2c0%2c1%2c15%2c2V11a1.927%2c1.927%2c0%2c0%2c1-.63%2c1.417A2.209%2c2.209%2c0%2c0%2c1%2c12.855%2c13H2.142ZM3.209%2c9a1%2c1%2c0%2c1%2c0%2c0%2c2h8.582a1%2c1%2c0%2c1%2c0%2c0-2ZM11%2c5c-.069%2c0-.287.058-.287.194V6.739c0%2c.085%2c0%2c.261.287.261h1.639c.217%2c0%2c.217-.156.217-.23V5.23A.243.243%2c0%2c0%2c0%2c12.6%2c5ZM6.716%2c5c-.069%2c0-.287.058-.287.194V6.739c0%2c.085%2c0%2c.261.287.261H8.355c.217%2c0%2c.217-.156.217-.23V5.23A.243.243%2c0%2c0%2c0%2c8.319%2c5ZM2.43%2c5c-.069%2c0-.287.058-.287.194V6.739c0%2c.085%2c0%2c.261.287.261H4.069c.217%2c0%2c.217-.156.217-.23V5.23A.243.243%2c0%2c0%2c0%2c4.033%2c5ZM11%2c2c-.069%2c0-.287.059-.287.2V3.739c0%2c.085%2c0%2c.261.287.261h1.639c.217%2c0%2c.217-.155.217-.23V2.23A.243.243%2c0%2c0%2c0%2c12.6%2c2ZM6.716%2c2c-.069%2c0-.287.059-.287.2V3.739c0%2c.085%2c0%2c.261.287.261H8.355c.217%2c0%2c.217-.155.217-.23V2.23A.243.243%2c0%2c0%2c0%2c8.319%2c2ZM2.43%2c2c-.069%2c0-.287.059-.287.2V3.739c0%2c.085%2c0%2c.261.287.261H4.069c.217%2c0%2c.217-.155.217-.23V2.23A.243.243%2c0%2c0%2c0%2c4.033%2c2Z'/%3e %3c/g%3e %3c/g%3e%3c/svg%3e\";\n export default img;"],"names":[],"mappings":"AAAG,IAAC,GAAG,GAAG;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/AnnotationView/index.tsx"],"sourcesContent":["/**\n * 用于标注查看模式\n * @author laoluo\n */\n\nimport React, { useEffect, useRef, useImperativeHandle, useState } from 'react';\nimport { ViewOperation, ImgUtils } from '@labelbee/lb-annotation';\nimport { Spin } from 'antd/es';\n\ninterface IProps {\n src: string; // 图片路径\n size: {\n width: number;\n height: number;\n };\n style: {\n color?: string;\n fill?: string;\n thickness?: number;\n };\n annotations: any[]; // TODO\n zoomChange?: (zoom: number) => void;\n backgroundStyle: React.CSSProperties;\n onChange?: (type: 'hover' | 'selected', ids: string[]) => void;\n\n showLoading?: boolean;\n}\n\nconst DEFAULT_SIZE = {\n width: 1280,\n height: 720,\n};\n\nconst AnnotationView = (props: IProps, ref: any) => {\n const {\n size = DEFAULT_SIZE,\n src,\n annotations = [],\n style = {\n color: 'blue',\n thickness: 5,\n },\n zoomChange,\n backgroundStyle = {},\n onChange,\n showLoading = false,\n } = props;\n const [loading, setLoading] = useState(false);\n const annotationRef = useRef<HTMLDivElement>(null);\n const viewOperation = useRef<ViewOperation>();\n\n useImperativeHandle(\n ref,\n () => {\n const toolInstance = viewOperation.current;\n if (!toolInstance) {\n return {};\n }\n\n return {\n zoomIn: () => toolInstance.zoomChanged(true), // 放大\n zoomOut: () => toolInstance.zoomChanged(false), // 缩小\n initImgPos: () => toolInstance.initImgPos(),\n toolInstance,\n };\n },\n [viewOperation.current],\n );\n\n useEffect(() => {\n if (annotationRef.current) {\n viewOperation.current = new ViewOperation({\n container: annotationRef.current,\n size,\n style,\n annotations,\n config: '{}', // TODO,暂时不需要\n });\n\n viewOperation.current.init();\n }\n\n return () => {\n viewOperation.current?.destroy();\n };\n }, []);\n\n useEffect(() => {\n if (viewOperation.current) {\n setLoading(true);\n viewOperation.current?.setLoading(true);\n ImgUtils.load(src)\n .then((imgNode: HTMLImageElement) => {\n viewOperation.current?.setLoading(false);\n setLoading(false);\n\n viewOperation.current?.setImgNode(imgNode);\n })\n .catch(() => {\n viewOperation.current?.setLoading(false);\n setLoading(false);\n });\n }\n }, [src]);\n\n /**\n * 基础数据绘制监听\n */\n useEffect(() => {\n if (viewOperation.current) {\n viewOperation.current.updateData(annotations);\n }\n }, [annotations]);\n\n /** 窗口大小监听 */\n useEffect(() => {\n const toolInstance = viewOperation.current;\n\n if (toolInstance?.setSize) {\n toolInstance.setSize(size);\n }\n }, [size?.width, size?.height]);\n\n useEffect(() => {\n if (viewOperation.current) {\n viewOperation.current?.on('onChange', (...args: any) => {\n onChange?.apply(null, args);\n });\n\n viewOperation.current?.on('renderZoom', (zoom: number) => {\n if (zoomChange) {\n zoomChange(zoom);\n }\n });\n }\n return () => {\n viewOperation.current?.unbindAll('onChange');\n viewOperation.current?.unbindAll('renderZoom');\n };\n }, [zoomChange, onChange]);\n\n const mainRender = <div ref={annotationRef} style={{ ...size, ...backgroundStyle }} />;\n\n return (\n <Spin spinning={showLoading || loading} delay={300}>\n {mainRender}\n </Spin>\n );\n\n // return mainRender;\n};\n\nexport default React.forwardRef(AnnotationView);\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AA4BA,MAAM,eAAe;AAAA,EACnB,OAAO;AAAA,EACP,QAAQ;AAAA;AAGV,MAAM,iBAAiB,CAAC,OAAe,QAAa;AAClD,QAAM;AAAA,IACJ,OAAO;AAAA,IACP;AAAA,IACA,cAAc;AAAA,IACd,QAAQ;AAAA,MACN,OAAO;AAAA,MACP,WAAW;AAAA;AAAA,IAEb;AAAA,IACA,kBAAkB;AAAA,IAClB;AAAA,IACA,cAAc;AAAA,MACZ;AACJ,QAAM,CAAC,S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Y,IAAI,SAAc;AACtD,6CAAU,MAAM,MAAM;AAAA;AAGxB,0BAAc,YAAd,mBAAuB,GAAG,cAAc,CAAC,SAAiB;AACxD,YAAI,YAAY;AACd,qBAAW;AAAA;AAAA;AAAA;AAIjB,WAAO,MAAM;AAvIjB;AAwIM,2BAAc,YAAd,oBAAuB,UAAU;AACjC,2BAAc,YAAd,oBAAuB,UAAU;AAAA;AAAA,KAElC,CAAC,YAAY;AAEhB,QAAM,iDAAc,OAAD;AAAA,IAAK,KAAK;AAAA,IAAe,OAAO,kCAAK,OAAS;AAAA;AAEjE,6CACG,MAAD;AAAA,IAAM,UAAU,eAAe;AAAA,IAAS,OAAO;AAAA,KAC5C;AAAA;AAOP,YAAe,MAAM,WAAW;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/AnnotationView/index.tsx"],"sourcesContent":["/**\n * 用于标注查看模式\n * @author laoluo\n */\n\nimport React, { useEffect, useRef, useImperativeHandle, useState } from 'react';\nimport { ViewOperation, ImgUtils } from '@labelbee/lb-annotation';\nimport { Spin } from 'antd/es';\n\ninterface IProps {\n src: string; // 图片路径\n size: {\n width: number;\n height: number;\n };\n style: {\n color?: string;\n fill?: string;\n thickness?: number;\n };\n annotations: any[]; // TODO\n zoomChange?: (zoom: number) => void;\n backgroundStyle: React.CSSProperties;\n onChange?: (type: 'hover' | 'selected', ids: string[]) => void;\n\n showLoading?: boolean;\n}\n\nconst DEFAULT_SIZE = {\n width: 1280,\n height: 720,\n};\n\nconst AnnotationView = (props: IProps, ref: any) => {\n const {\n size = DEFAULT_SIZE,\n src,\n annotations = [],\n style = {\n stroke: 'blue',\n thickness: 3,\n },\n zoomChange,\n backgroundStyle = {},\n onChange,\n showLoading = false,\n } = props;\n const [loading, setLoading] = useState(false);\n const annotationRef = useRef<HTMLDivElement>(null);\n const viewOperation = useRef<ViewOperation>();\n\n useImperativeHandle(\n ref,\n () => {\n const toolInstance = viewOperation.current;\n if (!toolInstance) {\n return {};\n }\n\n return {\n zoomIn: () => toolInstance.zoomChanged(true), // 放大\n zoomOut: () => toolInstance.zoomChanged(false), // 缩小\n initImgPos: () => toolInstance.initImgPos(),\n toolInstance,\n };\n },\n [viewOperation.current],\n );\n\n useEffect(() => {\n if (annotationRef.current) {\n viewOperation.current = new ViewOperation({\n container: annotationRef.current,\n size,\n style,\n annotations,\n config: '{}', // TODO,暂时不需要\n });\n\n viewOperation.current.init();\n }\n\n return () => {\n viewOperation.current?.destroy();\n };\n }, []);\n\n useEffect(() => {\n if (viewOperation.current) {\n setLoading(true);\n viewOperation.current?.setLoading(true);\n ImgUtils.load(src)\n .then((imgNode: HTMLImageElement) => {\n viewOperation.current?.setLoading(false);\n setLoading(false);\n\n viewOperation.current?.setImgNode(imgNode);\n })\n .catch(() => {\n viewOperation.current?.setLoading(false);\n setLoading(false);\n });\n }\n }, [src]);\n\n /**\n * 基础数据绘制监听\n */\n useEffect(() => {\n if (viewOperation.current) {\n viewOperation.current.updateData(annotations);\n }\n }, [annotations]);\n\n /** 窗口大小监听 */\n useEffect(() => {\n const toolInstance = viewOperation.current;\n\n if (toolInstance?.setSize) {\n toolInstance.setSize(size);\n }\n }, [size?.width, size?.height]);\n\n useEffect(() => {\n if (viewOperation.current) {\n viewOperation.current?.on('onChange', (...args: any) => {\n onChange?.apply(null, args);\n });\n\n viewOperation.current?.on('renderZoom', (zoom: number) => {\n if (zoomChange) {\n zoomChange(zoom);\n }\n });\n }\n return () => {\n viewOperation.current?.unbindAll('onChange');\n viewOperation.current?.unbindAll('renderZoom');\n };\n }, [zoomChange, onChange]);\n\n const mainRender = (\n <div ref={annotationRef} style={{ position: 'relative', ...size, ...backgroundStyle }} />\n );\n\n return (\n <Spin spinning={showLoading || loading} delay={300}>\n {mainRender}\n </Spin>\n );\n\n // return mainRender;\n};\n\nexport default React.forwardRef(AnnotationView);\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AA4BA,MAAM,YAAe,GAAA;AAAA,EACnB,KAAO,EAAA,IAAA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jB,IAAA,OAAO,MAAM;AAvIjB,MAAA,IAAA,GAAA,EAAA,GAAA,CAAA;AAwIM,MAAc,CAAA,GAAA,GAAA,aAAA,CAAA,OAAA,KAAd,oBAAuB,SAAU,CAAA,UAAA,CAAA,CAAA;AACjC,MAAc,CAAA,GAAA,GAAA,aAAA,CAAA,OAAA,KAAd,oBAAuB,SAAU,CAAA,YAAA,CAAA,CAAA;AAAA,KAAA,CAAA;AAAA,GAAA,EAElC,CAAC,UAAY,EAAA,QAAA,CAAA,CAAA,CAAA;AAEhB,EAAM,MAAA,UAAA,uCACH,KAAD,EAAA;AAAA,IAAK,GAAK,EAAA,aAAA;AAAA,IAAe,KAAO,EAAA,cAAA,CAAA,cAAA,CAAA,CAAE,QAAU,EAAA,UAAA,CAAA,EAAe,IAAS,CAAA,EAAA,eAAA,CAAA;AAAA,GAAA,CAAA,CAAA;AAGtE,EAAA,2CACG,IAAD,EAAA;AAAA,IAAM,UAAU,WAAe,IAAA,OAAA;AAAA,IAAS,KAAO,EAAA,GAAA;AAAA,GAC5C,EAAA,UAAA,CAAA,CAAA;AAAA,CAAA,CAAA;AAOP,YAAe,MAAM,UAAW,CAAA,cAAA,CAAA;;;;"}
@@ -1 +1,53 @@
1
- import{ReloadOutlined as d}from"@ant-design/icons";import{Button as f}from"antd/es";import e from"react";const g=n=>{const{width:o,height:i,reloadImage:a,hideSetInvalidTips:s,ignoreOffsetY:u,backgroundColor:l,fileTypeName:r="\u56FE\u7247"}=n,c=u?0:40,t=n.layerStyle||{position:"absolute",left:0,top:c,cursor:"initial",zIndex:20,fontSize:12};o&&i?Object.assign(t,{width:o,height:i}):Object.assign(t,{bottom:0,right:0}),l&&Object.assign(t,{backgroundColor:l});const m={position:"absolute",top:"30%",left:"50%",transform:"translate(-50%, -50%)"};return e.createElement("div",{style:t},e.createElement("div",{style:m},e.createElement("div",{style:{textAlign:"center",marginBottom:10}},e.createElement(f,{type:"primary",shape:"circle",icon:e.createElement(d,null),onClick:a})),e.createElement("div",null,`${r}\u52A0\u8F7D\u5931\u8D25, \u8BF7\u91CD\u65B0\u52A0\u8F7D${s?"":` \u6216 \u5C06${r}\u6807\u4E3A\u65E0\u6548`}`)))};export{g as default};
1
+ import { ReloadOutlined } from '@ant-design/icons';
2
+ import { Button } from 'antd/es';
3
+ import React from 'react';
4
+
5
+ const ImageError = (props) => {
6
+ const {
7
+ width,
8
+ height,
9
+ reloadImage,
10
+ hideSetInvalidTips,
11
+ ignoreOffsetY,
12
+ backgroundColor,
13
+ fileTypeName = "\u56FE\u7247"
14
+ } = props;
15
+ const top = !ignoreOffsetY ? 40 : 0;
16
+ const layerStyle = props.layerStyle || {
17
+ position: "absolute",
18
+ left: 0,
19
+ top,
20
+ cursor: "initial",
21
+ zIndex: 20,
22
+ fontSize: 12
23
+ };
24
+ if (width && height) {
25
+ Object.assign(layerStyle, {width, height});
26
+ } else {
27
+ Object.assign(layerStyle, {bottom: 0, right: 0});
28
+ }
29
+ if (backgroundColor) {
30
+ Object.assign(layerStyle, {backgroundColor});
31
+ }
32
+ const buttonStyle = {
33
+ position: "absolute",
34
+ top: "30%",
35
+ left: "50%",
36
+ transform: "translate(-50%, -50%)"
37
+ };
38
+ return /* @__PURE__ */ React.createElement("div", {
39
+ style: layerStyle
40
+ }, /* @__PURE__ */ React.createElement("div", {
41
+ style: buttonStyle
42
+ }, /* @__PURE__ */ React.createElement("div", {
43
+ style: {textAlign: "center", marginBottom: 10}
44
+ }, /* @__PURE__ */ React.createElement(Button, {
45
+ type: "primary",
46
+ shape: "circle",
47
+ icon: /* @__PURE__ */ React.createElement(ReloadOutlined, null),
48
+ onClick: reloadImage
49
+ })), /* @__PURE__ */ React.createElement("div", null, `${fileTypeName}\u52A0\u8F7D\u5931\u8D25, \u8BF7\u91CD\u65B0\u52A0\u8F7D${hideSetInvalidTips ? "" : ` \u6216 \u5C06${fileTypeName}\u6807\u4E3A\u65E0\u6548`}`)));
50
+ };
51
+
52
+ export { ImageError as default };
53
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/ImageError/index.tsx"],"sourcesContent":["import { ReloadOutlined } from '@ant-design/icons';\nimport { Button } from 'antd/es';\nimport React from 'react';\n\ninterface IProps {\n width?: number;\n height?: number;\n reloadImage: () => void;\n hideSetInvalidTips?: boolean;\n /** 忽略顶部的偏移,如: 多边形的容器已经计算好高度(容器不包含顶部标注提示语部分) */\n ignoreOffsetY?: boolean;\n layerStyle?: React.CSSProperties;\n backgroundColor: string;\n fileTypeName?: string;\n}\n\nconst ImageError = (props: IProps) => {\n const {\n width,\n height,\n reloadImage,\n hideSetInvalidTips,\n ignoreOffsetY,\n backgroundColor,\n fileTypeName = '图片',\n } = props;\n\n const top = !ignoreOffsetY ? 40 : 0;\n\n const layerStyle: React.CSSProperties = props.layerStyle || {\n position: 'absolute',\n left: 0,\n top,\n cursor: 'initial',\n zIndex: 20,\n fontSize: 12,\n };\n if (width && height) {\n Object.assign(layerStyle, { width, height });\n } else {\n Object.assign(layerStyle, { bottom: 0, right: 0 });\n }\n\n if (backgroundColor) {\n Object.assign(layerStyle, { backgroundColor });\n }\n\n const buttonStyle: React.CSSProperties = {\n position: 'absolute',\n top: '30%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n };\n\n return (\n <div style={layerStyle}>\n <div style={buttonStyle}>\n <div style={{ textAlign: 'center', marginBottom: 10 }}>\n <Button type='primary' shape='circle' icon={<ReloadOutlined />} onClick={reloadImage} />\n </div>\n <div>\n {`${fileTypeName}加载失败, 请重新加载${\n hideSetInvalidTips ? '' : ` 或 将${fileTypeName}标为无效`\n }`}\n </div>\n </div>\n </div>\n );\n};\n\nexport default ImageError;\n"],"names":[],"mappings":";;;;MAgBM,aAAa,CAAC,UAAkB;AACpC,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,eAAe;AAAA,MACb;AAEJ,QAAM,MAAM,CAAC,gBAAgB,KAAK;AAElC,QAAM,aAAkC,MAAM,cAAc;AAAA,IAC1D,UAAU;AAAA,IACV,MAAM;AAAA,IACN;AAAA,IACA,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,UAAU;AAAA;AAEZ,MAAI,SAAS,QAAQ;AACnB,WAAO,OAAO,YAAY,CAAE,OAAO;AAAA,SAC9B;AACL,WAAO,OAAO,YAAY,CAAE,QAAQ,GAAG,OAAO;AAAA;AAGhD,MAAI,iBAAiB;AACnB,WAAO,OAAO,YAAY,CAAE;AAAA;AAG9B,QAAM,cAAmC;AAAA,IACvC,UAAU;AAAA,IACV,KAAK;AAAA,IACL,MAAM;AAAA,IACN,WAAW;AAAA;AAGb,6CACG,OAAD;AAAA,IAAK,OAAO;AAAA,yCACT,OAAD;AAAA,IAAK,OAAO;AAAA,yCACT,OAAD;AAAA,IAAK,OAAO,CAAE,WAAW,UAAU,cAAc;AAAA,yCAC9C,QAAD;AAAA,IAAQ,MAAK;AAAA,IAAU,OAAM;AAAA,IAAS,0CAAO,gBAAD;AAAA,IAAoB,SAAS;AAAA,2CAE1E,OAAD,MACG,GAAG,uEACF,qBAAqB,KAAK,iBAAO;AAAA;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/ImageError/index.tsx"],"sourcesContent":["import { ReloadOutlined } from '@ant-design/icons';\nimport { Button } from 'antd/es';\nimport React from 'react';\n\ninterface IProps {\n width?: number;\n height?: number;\n reloadImage: () => void;\n hideSetInvalidTips?: boolean;\n /** 忽略顶部的偏移,如: 多边形的容器已经计算好高度(容器不包含顶部标注提示语部分) */\n ignoreOffsetY?: boolean;\n layerStyle?: React.CSSProperties;\n backgroundColor: string;\n fileTypeName?: string;\n}\n\nconst ImageError = (props: IProps) => {\n const {\n width,\n height,\n reloadImage,\n hideSetInvalidTips,\n ignoreOffsetY,\n backgroundColor,\n fileTypeName = '图片',\n } = props;\n\n const top = !ignoreOffsetY ? 40 : 0;\n\n const layerStyle: React.CSSProperties = props.layerStyle || {\n position: 'absolute',\n left: 0,\n top,\n cursor: 'initial',\n zIndex: 20,\n fontSize: 12,\n };\n if (width && height) {\n Object.assign(layerStyle, { width, height });\n } else {\n Object.assign(layerStyle, { bottom: 0, right: 0 });\n }\n\n if (backgroundColor) {\n Object.assign(layerStyle, { backgroundColor });\n }\n\n const buttonStyle: React.CSSProperties = {\n position: 'absolute',\n top: '30%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n };\n\n return (\n <div style={layerStyle}>\n <div style={buttonStyle}>\n <div style={{ textAlign: 'center', marginBottom: 10 }}>\n <Button type='primary' shape='circle' icon={<ReloadOutlined />} onClick={reloadImage} />\n </div>\n <div>\n {`${fileTypeName}加载失败, 请重新加载${\n hideSetInvalidTips ? '' : ` 或 将${fileTypeName}标为无效`\n }`}\n </div>\n </div>\n </div>\n );\n};\n\nexport default ImageError;\n"],"names":[],"mappings":";;;;AAgBM,MAAA,UAAA,GAAa,CAAC,KAAkB,KAAA;AACpC,EAAM,MAAA;AAAA,IACJ,KAAA;AAAA,IACA,MAAA;AAAA,IACA,WAAA;AAAA,IACA,kBAAA;AAAA,IACA,aAAA;AAAA,IACA,eAAA;AAAA,IACA,YAAe,GAAA,cAAA;AAAA,GACb,GAAA,KAAA,CAAA;AAEJ,EAAM,MAAA,GAAA,GAAM,CAAC,aAAA,GAAgB,EAAK,GAAA,CAAA,CAAA;AAElC,EAAM,MAAA,UAAA,GAAkC,MAAM,UAAc,IAAA;AAAA,IAC1D,QAAU,EAAA,UAAA;AAAA,IACV,IAAM,EAAA,CAAA;AAAA,IACN,GAAA;AAAA,IACA,MAAQ,EAAA,SAAA;AAAA,IACR,MAAQ,EAAA,EAAA;AAAA,IACR,QAAU,EAAA,EAAA;AAAA,GAAA,CAAA;AAEZ,EAAA,IAAI,SAAS,MAAQ,EAAA;AACnB,IAAO,MAAA,CAAA,MAAA,CAAO,UAAY,EAAA,CAAE,KAAO,EAAA,MAAA,CAAA,CAAA,CAAA;AAAA,GAC9B,MAAA;AACL,IAAA,MAAA,CAAO,MAAO,CAAA,UAAA,EAAY,CAAE,MAAA,EAAQ,GAAG,KAAO,EAAA,CAAA,CAAA,CAAA,CAAA;AAAA,GAAA;AAGhD,EAAA,IAAI,eAAiB,EAAA;AACnB,IAAO,MAAA,CAAA,MAAA,CAAO,YAAY,CAAE,eAAA,CAAA,CAAA,CAAA;AAAA,GAAA;AAG9B,EAAA,MAAM,WAAmC,GAAA;AAAA,IACvC,QAAU,EAAA,UAAA;AAAA,IACV,GAAK,EAAA,KAAA;AAAA,IACL,IAAM,EAAA,KAAA;AAAA,IACN,SAAW,EAAA,uBAAA;AAAA,GAAA,CAAA;AAGb,EAAA,2CACG,KAAD,EAAA;AAAA,IAAK,KAAO,EAAA,UAAA;AAAA,GAAA,sCACT,KAAD,EAAA;AAAA,IAAK,KAAO,EAAA,WAAA;AAAA,GAAA,sCACT,KAAD,EAAA;AAAA,IAAK,KAAO,EAAA,CAAE,SAAW,EAAA,QAAA,EAAU,YAAc,EAAA,EAAA,CAAA;AAAA,GAAA,sCAC9C,MAAD,EAAA;AAAA,IAAQ,IAAK,EAAA,SAAA;AAAA,IAAU,KAAM,EAAA,QAAA;AAAA,IAAS,IAAA,sCAAO,cAAD,EAAA,IAAA,CAAA;AAAA,IAAoB,OAAS,EAAA,WAAA;AAAA,GAAA,CAAA,CAAA,sCAE1E,KAAD,EAAA,IAAA,EACG,GAAG,YACF,CAAA,wDAAA,EAAA,kBAAA,GAAqB,KAAK,CAAO,cAAA,EAAA,YAAA,CAAA,wBAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/annotationStepPopover/index.tsx"],"sourcesContent":["// 标注步骤中的 popover 的内容\n\nimport { componentCls } from '@/constant';\nimport { classnames } from '@/utils';\nimport React from 'react';\nimport { IStepInfo } from '@/types/step';\nimport { useTranslation } from 'react-i18next';\ninterface IProps {\n stepList: IStepInfo[];\n currentStep: number;\n updateStep: (step: number) => void;\n}\n\nconst AnnotationStepPopover = (props: IProps) => {\n const { t } = useTranslation();\n const { stepList, updateStep, currentStep } = props;\n\n return (\n <div className={`${componentCls}__annotationStepPopover`}>\n {stepList.map((info) => {\n const isSelected = info.step === currentStep;\n\n return (\n <div\n key={`stepList${info.step}`}\n className={classnames({\n step: true,\n })}\n onClick={() => {\n if (currentStep && !isSelected) {\n updateStep(info.step);\n }\n }}\n >\n <div\n className={classnames({\n name: true,\n highlight: isSelected,\n })}\n >\n {`${info.step} - ${info.name || t(info.tool)}`}\n </div>\n </div>\n );\n })}\n </div>\n );\n};\n\nexport default AnnotationStepPopover;\n"],"names":[],"mappings":";;;;;MAaM,wBAAwB,CAAC,UAAkB;AAC/C,QAAM,CAAE,KAAM;AACd,QAAM,CAAE,UAAU,YAAY,eAAgB;AAE9C,6CACG,OAAD;AAAA,IAAK,WAAW,GAAG;AAAA,KAChB,SAAS,IAAI,CAAC,SAAS;AACtB,UAAM,aAAa,KAAK,SAAS;AAEjC,+CACG,OAAD;AAAA,MACE,KAAK,WAAW,KAAK;AAAA,MACrB,WAAW,WAAW;AAAA,QACpB,MAAM;AAAA;AAAA,MAER,SAAS,MAAM;AACb,YAAI,eAAe,CAAC,YAAY;AAC9B,qBAAW,KAAK;AAAA;AAAA;AAAA,2CAInB,OAAD;AAAA,MACE,WAAW,WAAW;AAAA,QACpB,MAAM;AAAA,QACN,WAAW;AAAA;AAAA,OAGZ,GAAG,KAAK,UAAU,KAAK,QAAQ,EAAE,KAAK;AAAA;AAAA;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/annotationStepPopover/index.tsx"],"sourcesContent":["// 标注步骤中的 popover 的内容\n\nimport { componentCls } from '@/constant';\nimport { classnames } from '@/utils';\nimport React from 'react';\nimport { IStepInfo } from '@/types/step';\nimport { useTranslation } from 'react-i18next';\ninterface IProps {\n stepList: IStepInfo[];\n currentStep: number;\n updateStep: (step: number) => void;\n}\n\nconst AnnotationStepPopover = (props: IProps) => {\n const { t } = useTranslation();\n const { stepList, updateStep, currentStep } = props;\n\n return (\n <div className={`${componentCls}__annotationStepPopover`}>\n {stepList.map((info) => {\n const isSelected = info.step === currentStep;\n\n return (\n <div\n key={`stepList${info.step}`}\n className={classnames({\n step: true,\n })}\n onClick={() => {\n if (currentStep && !isSelected) {\n updateStep(info.step);\n }\n }}\n >\n <div\n className={classnames({\n name: true,\n highlight: isSelected,\n })}\n >\n {`${info.step} - ${info.name || t(info.tool)}`}\n </div>\n </div>\n );\n })}\n </div>\n );\n};\n\nexport default AnnotationStepPopover;\n"],"names":[],"mappings":";;;;;AAaM,MAAA,qBAAA,GAAwB,CAAC,KAAkB,KAAA;AAC/C,EAAA,MAAM,CAAE,CAAM,CAAA,GAAA,cAAA,EAAA,CAAA;AACd,EAAM,MAAA,CAAE,QAAU,EAAA,UAAA,EAAY,WAAgB,CAAA,GAAA,KAAA,CAAA;AAE9C,EAAA,2CACG,KAAD,EAAA;AAAA,IAAK,WAAW,CAAG,EAAA,YAAA,CAAA,uBAAA,CAAA;AAAA,GAChB,EAAA,QAAA,CAAS,GAAI,CAAA,CAAC,IAAS,KAAA;AACtB,IAAM,MAAA,UAAA,GAAa,KAAK,IAAS,KAAA,WAAA,CAAA;AAEjC,IAAA,2CACG,KAAD,EAAA;AAAA,MACE,GAAA,EAAK,WAAW,IAAK,CAAA,IAAA,CAAA,CAAA;AAAA,MACrB,WAAW,UAAW,CAAA;AAAA,QACpB,IAAM,EAAA,IAAA;AAAA,OAAA,CAAA;AAAA,MAER,SAAS,MAAM;AACb,QAAI,IAAA,WAAA,IAAe,CAAC,UAAY,EAAA;AAC9B,UAAA,UAAA,CAAW,IAAK,CAAA,IAAA,CAAA,CAAA;AAAA,SAAA;AAAA,OAAA;AAAA,KAAA,sCAInB,KAAD,EAAA;AAAA,MACE,WAAW,UAAW,CAAA;AAAA,QACpB,IAAM,EAAA,IAAA;AAAA,QACN,SAAW,EAAA,UAAA;AAAA,OAAA,CAAA;AAAA,KAAA,EAGZ,GAAG,IAAK,CAAA,IAAA,CAAA,GAAA,EAAU,IAAK,CAAA,IAAA,IAAQ,EAAE,IAAK,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,GAAA,CAAA,CAAA,CAAA;AAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/attributeList/index.tsx"],"sourcesContent":["import { COLORS_ARRAY, NULL_COLOR } from '@/data/Style';\nimport { ColorTag } from '@/components/colorTag';\nimport { Radio } from 'antd/es';\nimport React from 'react';\n\nexport const ATTRIBUTE_COLORS = [NULL_COLOR].concat(COLORS_ARRAY);\n\ninterface IProps {\n list: Array<{\n label: string;\n value: string;\n }>;\n selectedAttribute: string;\n attributeChanged: (v: string) => void;\n forbidDefault?: boolean;\n forbidColor?: boolean;\n noHeightLimit?: boolean;\n num?: number;\n}\n\nconst AttributeList = React.forwardRef((props: IProps, ref) => {\n const radioRef = React.useRef<any>();\n\n const list = props.list || [];\n\n let NEW_ATTRIBUTE_COLORS = [...ATTRIBUTE_COLORS];\n\n // 去除默认的颜色\n if (props.forbidDefault === true) {\n NEW_ATTRIBUTE_COLORS = NEW_ATTRIBUTE_COLORS.slice(1);\n }\n\n let className = 'sensebee-radio-group';\n if (props.noHeightLimit) {\n className = 'sensebee-radio-group-no-limit-height';\n }\n\n return (\n <div className={className}>\n <Radio.Group\n name=\"radiogroup\"\n defaultValue={props?.selectedAttribute}\n value={props?.selectedAttribute}\n onChange={(e) => props.attributeChanged(e.target.value)}\n ref={ref as any}\n >\n {list.map((i: any, index: number) => {\n let hotKey: number | string = props?.num ?? index;\n\n if (props.forbidDefault === true) {\n // 禁止 default 将从 1 开始\n hotKey++;\n }\n\n // 超出范围无法展示\n if (!(typeof hotKey === 'number' && hotKey <= 9 && hotKey >= 0)) {\n hotKey = '-';\n }\n\n return (\n <Radio\n value={i.value}\n ref={radioRef}\n key={index}\n >\n <span className=\"sensebee-radio-label\" title={i.label}>\n {!props?.forbidColor && (\n <ColorTag\n color={\n index > 8 && !props.forbidDefault\n ? COLORS_ARRAY[(index - 1) % COLORS_ARRAY.length]\n : NEW_ATTRIBUTE_COLORS[\n index % NEW_ATTRIBUTE_COLORS.length\n ]\n }\n style={{ marginRight: '8px' }}\n />\n )}\n {i.label}\n </span>\n <span className=\"sensebee-radio-num\">{hotKey}</span>\n </Radio>\n );\n })}\n </Radio.Group>\n </div>\n );\n});\n\nexport default AttributeList;\n"],"names":[],"mappings":";;;;;MAKa,mBAAmB,CAAC,YAAY,OAAO;MAe9C,gBAAgB,MAAM,WAAW,CAAC,OAAe,QAAQ;AAC7D,QAAM,WAAW,MAAM;AAEvB,QAAM,OAAO,MAAM,QAAQ;AAE3B,MAAI,uBAAuB,CAAC,GAAG;AAG/B,MAAI,MAAM,kBAAkB,MAAM;AAChC,2BAAuB,qBAAqB,MAAM;AAAA;AAGpD,MAAI,YAAY;AAChB,MAAI,MAAM,eAAe;AACvB,gBAAY;AAAA;AAGd,6CACG,OAAD;AAAA,IAAK;AAAA,yCACF,MAAM,OAAP;AAAA,IACE,MAAK;AAAA,IACL,cAAc,+BAAO;AAAA,IACrB,OAAO,+BAAO;AAAA,IACd,UAAU,CAAC,MAAM,MAAM,iBAAiB,EAAE,OAAO;AAAA,IACjD;AAAA,KAEC,KAAK,IAAI,CAAC,GAAQ,UAAkB;AA9C7C;AA+CU,QAAI,SAA0B,qCAAO,QAAP,YAAc;AAE5C,QAAI,MAAM,kBAAkB,MAAM;AAEhC;AAAA;AAIF,QAAI,SAAS,WAAW,YAAY,UAAU,KAAK,UAAU,IAAI;AAC/D,eAAS;AAAA;AAGX,+CACG,OAAD;AAAA,MACE,OAAO,EAAE;AAAA,MACT,KAAK;AAAA,MACL,KAAK;AAAA,2CAEJ,QAAD;AAAA,MAAM,WAAU;AAAA,MAAuB,OAAO,EAAE;AAAA,OAC7C,iCAAQ,oDACN,UAAD;AAAA,MACE,OACE,QAAQ,KAAK,CAAC,MAAM,gBAChB,aAAc,SAAQ,KAAK,aAAa,UACxC,qBACA,QAAQ,qBAAqB;AAAA,MAGnC,OAAO,CAAE,aAAa;AAAA,QAGzB,EAAE,4CAEJ,QAAD;AAAA,MAAM,WAAU;AAAA,OAAsB;AAAA;AAAA;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/attributeList/index.tsx"],"sourcesContent":["import { COLORS_ARRAY, NULL_COLOR } from '@/data/Style';\nimport { ColorTag } from '@/components/colorTag';\nimport { Radio } from 'antd/es';\nimport React from 'react';\n\nexport const ATTRIBUTE_COLORS = [NULL_COLOR].concat(COLORS_ARRAY);\n\ninterface IProps {\n list: Array<{\n label: string;\n value: string;\n }>;\n selectedAttribute: string;\n attributeChanged: (v: string) => void;\n forbidDefault?: boolean;\n forbidColor?: boolean;\n noHeightLimit?: boolean;\n num?: number;\n}\n\nconst AttributeList = React.forwardRef((props: IProps, ref) => {\n const radioRef = React.useRef<any>();\n\n const list = props.list || [];\n\n let NEW_ATTRIBUTE_COLORS = [...ATTRIBUTE_COLORS];\n\n // 去除默认的颜色\n if (props.forbidDefault === true) {\n NEW_ATTRIBUTE_COLORS = NEW_ATTRIBUTE_COLORS.slice(1);\n }\n\n let className = 'sensebee-radio-group';\n if (props.noHeightLimit) {\n className = 'sensebee-radio-group-no-limit-height';\n }\n\n return (\n <div className={className}>\n <Radio.Group\n name=\"radiogroup\"\n defaultValue={props?.selectedAttribute}\n value={props?.selectedAttribute}\n onChange={(e) => props.attributeChanged(e.target.value)}\n ref={ref as any}\n >\n {list.map((i: any, index: number) => {\n let hotKey: number | string = props?.num ?? index;\n\n if (props.forbidDefault === true) {\n // 禁止 default 将从 1 开始\n hotKey++;\n }\n\n // 超出范围无法展示\n if (!(typeof hotKey === 'number' && hotKey <= 9 && hotKey >= 0)) {\n hotKey = '-';\n }\n\n return (\n <Radio\n value={i.value}\n ref={radioRef}\n key={index}\n >\n <span className=\"sensebee-radio-label\" title={i.label}>\n {!props?.forbidColor && (\n <ColorTag\n color={\n index > 8 && !props.forbidDefault\n ? COLORS_ARRAY[(index - 1) % COLORS_ARRAY.length]\n : NEW_ATTRIBUTE_COLORS[\n index % NEW_ATTRIBUTE_COLORS.length\n ]\n }\n style={{ marginRight: '8px' }}\n />\n )}\n {i.label}\n </span>\n <span className=\"sensebee-radio-num\">{hotKey}</span>\n </Radio>\n );\n })}\n </Radio.Group>\n </div>\n );\n});\n\nexport default AttributeList;\n"],"names":[],"mappings":";;;;;AAKa,MAAA,gBAAA,GAAmB,CAAC,UAAA,CAAA,CAAY,MAAO,CAAA,YAAA,EAAA;AAepD,MAAM,aAAgB,GAAA,KAAA,CAAM,UAAW,CAAA,CAAC,OAAe,GAAQ,KAAA;AAC7D,EAAA,MAAM,WAAW,KAAM,CAAA,MAAA,EAAA,CAAA;AAEvB,EAAM,MAAA,IAAA,GAAO,MAAM,IAAQ,IAAA,EAAA,CAAA;AAE3B,EAAI,IAAA,oBAAA,GAAuB,CAAC,GAAG,gBAAA,CAAA,CAAA;AAG/B,EAAI,IAAA,KAAA,CAAM,kBAAkB,IAAM,EAAA;AAChC,IAAA,oBAAA,GAAuB,qBAAqB,KAAM,CAAA,CAAA,CAAA,CAAA;AAAA,GAAA;AAGpD,EAAA,IAAI,SAAY,GAAA,sBAAA,CAAA;AAChB,EAAA,IAAI,MAAM,aAAe,EAAA;AACvB,IAAY,SAAA,GAAA,sCAAA,CAAA;AAAA,GAAA;AAGd,EAAA,2CACG,KAAD,EAAA;AAAA,IAAK,SAAA;AAAA,GACH,kBAAA,KAAA,CAAA,aAAA,CAAC,MAAM,KAAP,EAAA;AAAA,IACE,IAAK,EAAA,YAAA;AAAA,IACL,cAAc,KAAO,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,KAAA,CAAA,iBAAA;AAAA,IACrB,OAAO,KAAO,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,KAAA,CAAA,iBAAA;AAAA,IACd,UAAU,CAAC,CAAA,KAAM,KAA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AAA,KAAA,CAAA,aAAA,CAAC,MAAD,EAAA;AAAA,MAAM,SAAU,EAAA,oBAAA;AAAA,KAAsB,EAAA,MAAA,CAAA,CAAA,CAAA;AAAA,GAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/checkboxList/index.tsx"],"sourcesContent":["import { Checkbox } from 'antd/es';\nimport React from 'react';\n\ninterface IProps {\n selectedAttribute: string[];\n attributeChanged: () => void;\n num?: any;\n list?: any[];\n}\n\nconst CheckboxList = (props: IProps) => {\n const checkboxRef = React.useRef<any>(null);\n const list = props.list || [];\n return (\n <div className=\"sensebee-checkbox-group\">\n <Checkbox.Group\n name=\"checkboxgroup\"\n // defaultValue={props.selectedAttribute}\n value={props.selectedAttribute}\n onChange={() => props.attributeChanged()}\n >\n {list.map((i: any, index: number) => (\n // @ts-ignore\n <Checkbox value={i.value} ref={checkboxRef} onFocus={() => {\n checkboxRef?.current?.blur();\n }}\n key={index}\n >\n <span className=\"sensebee-checkbox-label\" title={i.label}>\n {i.label}\n </span>\n <span className=\"sensebee-checkbox-num\">{props?.num ?? index}</span>\n </Checkbox>\n ))}\n </Checkbox.Group>\n </div>\n );\n};\n\nexport default CheckboxList;\n"],"names":[],"mappings":";;;MAUM,eAAe,CAAC,UAAkB;AACtC,QAAM,cAAc,MAAM,OAAY;AACtC,QAAM,OAAO,MAAM,QAAQ;AAC3B,6CACG,OAAD;AAAA,IAAK,WAAU;AAAA,yCACZ,SAAS,OAAV;AAAA,IACE,MAAK;AAAA,IAEL,OAAO,MAAM;AAAA,IACb,UAAU,MAAM,MAAM;AAAA,KAErB,KAAK,IAAI,CAAC,GAAQ,UAAe;AArB1C;AAuBU,+CAAC,UAAD;AAAA,MAAU,OAAO,EAAE;AAAA,MAAO,KAAK;AAAA,MAAa,SAAS,MAAM;AAvBrE;AAwBc,0DAAa,YAAb,oBAAsB;AAAA;AAAA,MAExB,KAAK;AAAA,2CAEJ,QAAD;AAAA,MAAM,WAAU;AAAA,MAA0B,OAAO,EAAE;AAAA,OAChD,EAAE,4CAEJ,QAAD;AAAA,MAAM,WAAU;AAAA,OAAyB,qCAAO,QAAP,YAAc;AAAA;AAAA;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/checkboxList/index.tsx"],"sourcesContent":["import { Checkbox } from 'antd/es';\nimport React from 'react';\n\ninterface IProps {\n selectedAttribute: string[];\n attributeChanged: () => void;\n num?: any;\n list?: any[];\n}\n\nconst CheckboxList = (props: IProps) => {\n const checkboxRef = React.useRef<any>(null);\n const list = props.list || [];\n return (\n <div className=\"sensebee-checkbox-group\">\n <Checkbox.Group\n name=\"checkboxgroup\"\n // defaultValue={props.selectedAttribute}\n value={props.selectedAttribute}\n onChange={() => props.attributeChanged()}\n >\n {list.map((i: any, index: number) => (\n // @ts-ignore\n <Checkbox value={i.value} ref={checkboxRef} onFocus={() => {\n checkboxRef?.current?.blur();\n }}\n key={index}\n >\n <span className=\"sensebee-checkbox-label\" title={i.label}>\n {i.label}\n </span>\n <span className=\"sensebee-checkbox-num\">{props?.num ?? index}</span>\n </Checkbox>\n ))}\n </Checkbox.Group>\n </div>\n );\n};\n\nexport default CheckboxList;\n"],"names":[],"mappings":";;;AAUM,MAAA,YAAA,GAAe,CAAC,KAAkB,KAAA;AACtC,EAAM,MAAA,WAAA,GAAc,MAAM,MAAY,CAAA,IAAA,CAAA,CAAA;AACtC,EAAM,MAAA,IAAA,GAAO,MAAM,IAAQ,IAAA,EAAA,CAAA;AAC3B,EAAA,2CACG,KAAD,EAAA;AAAA,IAAK,SAAU,EAAA,yBAAA;AAAA,GACb,kBAAA,KAAA,CAAA,aAAA,CAAC,SAAS,KAAV,EAAA;AAAA,IACE,IAAK,EAAA,eAAA;AAAA,IAEL,OAAO,KAAM,CAAA,iBAAA;AAAA,IACb,QAAA,EAAU,MAAM,KAAM,CAAA,gBAAA,EAAA;AAAA,GAAA,EAErB,IAAK,CAAA,GAAA,CAAI,CAAC,CAAA,EAAQ,KAAe,KAAA;AArB1C,IAAA,IAAA,EAAA,CAAA;AAuBU,IAAA,uBAAA,KAAA,CAAA,aAAA,CAAC,QAAD,EAAA;AAAA,MAAU,OAAO,CAAE,CAAA,KAAA;AAAA,MAAO,GAAK,EAAA,WAAA;AAAA,MAAa,SAAS,MAAM;AAvBrE,QAAA,IAAA,GAAA,CAAA;AAwBc,QAAA,CAAA,GAAA,GAAA,WAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,WAAA,CAAa,YAAb,IAAsB,GAAA,KAAA,CAAA,GAAA,GAAA,CAAA,IAAA,EAAA,CAAA;AAAA,OAAA;AAAA,MAExB,GAAK,EAAA,KAAA;AAAA,KAAA,sCAEJ,MAAD,EAAA;AAAA,MAAM,SAAU,EAAA,yBAAA;AAAA,MAA0B,OAAO,CAAE,CAAA,KAAA;AAAA,KAChD,EAAA,CAAA,CAAE,KAEL,CAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,MAAD,EAAA;AAAA,MAAM,SAAU,EAAA,uBAAA;AAAA,KAAyB,EAAA,CAAA,EAAA,GAAA,KAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,KAAA,CAAO,QAAP,IAAc,GAAA,EAAA,GAAA,KAAA,CAAA,CAAA,CAAA;AAAA,GAAA,CAAA,CAAA,CAAA,CAAA;AAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/colorTag/index.tsx"],"sourcesContent":["import React from 'react';\n\nexport const ColorTag = ({ color, style }: any) => (\n <div\n style={{\n display: 'inline-block',\n height: 14,\n width: 14,\n backgroundColor: color,\n verticalAlign: 'middle',\n ...style,\n }}\n />\n);\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;MAEa,WAAW,CAAC,CAAE,OAAO,+CAC/B,OAAD;AAAA,EACE,OAAO;AAAA,IACL,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,iBAAiB;AAAA,IACjB,eAAe;AAAA,KACZ;AAAA;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/colorTag/index.tsx"],"sourcesContent":["import React from 'react';\n\nexport const ColorTag = ({ color, style }: any) => (\n <div\n style={{\n display: 'inline-block',\n height: 14,\n width: 14,\n backgroundColor: color,\n verticalAlign: 'middle',\n ...style,\n }}\n />\n);\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAEO,MAAM,WAAW,CAAC,CAAE,KAAO,EAAA,KAAA,CAAA,yCAC/B,KAAD,EAAA;AAAA,EACE,KAAO,EAAA,cAAA,CAAA;AAAA,IACL,OAAS,EAAA,cAAA;AAAA,IACT,MAAQ,EAAA,EAAA;AAAA,IACR,KAAO,EAAA,EAAA;AAAA,IACP,eAAiB,EAAA,KAAA;AAAA,IACjB,aAAe,EAAA,QAAA;AAAA,GACZ,EAAA,KAAA,CAAA;AAAA,CAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/customAntd/IconWithText/index.tsx"],"sourcesContent":["import { componentCls } from '@/constant';\nimport React from 'react';\n\ninterface IProps {\n text: string; // icon 文本\n Icon: any;\n iconChildren: React.ReactNode;\n marginLeft?: number;\n}\n\nconst IconWithText = (props: IProps) => {\n const { Icon, text, iconChildren, ...otherProps } = props;\n\n const marginLeft = props.marginLeft === undefined ? 30 : props.marginLeft;\n\n return (\n <div {...otherProps} className={componentCls} >\n <div className={`${componentCls}__iconWithText`} style={{ marginLeft }}>\n <div className='iconGroup'>\n <Icon className='icon' />\n {iconChildren}\n </div>\n\n <span className='name'>{text}</span>\n </div>\n </div>\n );\n};\n\nexport default IconWithText;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAUM,eAAe,CAAC,UAAkB;AACtC,QAAoD,YAA5C,OAAM,MAAM,gBAAgC,IAAf,uBAAe,IAAf,CAA7B,QAAM,QAAM;AAEpB,QAAM,aAAa,MAAM,eAAe,SAAY,KAAK,MAAM;AAE/D,6CACG,OAAD,iCAAS,aAAT;AAAA,IAAqB,WAAW;AAAA,0CAC7B,OAAD;AAAA,IAAK,WAAW,GAAG;AAAA,IAA8B,OAAO,CAAE;AAAA,yCACvD,OAAD;AAAA,IAAK,WAAU;AAAA,yCACZ,MAAD;AAAA,IAAM,WAAU;AAAA,MACf,mDAGF,QAAD;AAAA,IAAM,WAAU;AAAA,KAAQ;AAAA;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/customAntd/IconWithText/index.tsx"],"sourcesContent":["import { componentCls } from '@/constant';\nimport React from 'react';\n\ninterface IProps {\n text: string; // icon 文本\n Icon: any;\n iconChildren: React.ReactNode;\n marginLeft?: number;\n}\n\nconst IconWithText = (props: IProps) => {\n const { Icon, text, iconChildren, ...otherProps } = props;\n\n const marginLeft = props.marginLeft === undefined ? 30 : props.marginLeft;\n\n return (\n <div {...otherProps} className={componentCls} >\n <div className={`${componentCls}__iconWithText`} style={{ marginLeft }}>\n <div className='iconGroup'>\n <Icon className='icon' />\n {iconChildren}\n </div>\n\n <span className='name'>{text}</span>\n </div>\n </div>\n );\n};\n\nexport default IconWithText;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUM,MAAA,YAAA,GAAe,CAAC,KAAkB,KAAA;AACtC,EAAoD,MAAA,EAAA,GAAA,KAAA,EAA5C,OAAM,IAAM,EAAA,YAAA,CAAA,GAAgC,IAAf,UAAe,GAAA,SAAA,CAAA,EAAA,EAAf,CAA7B,MAAA,EAAM,MAAM,EAAA,cAAA,CAAA,CAAA,CAAA;AAEpB,EAAA,MAAM,UAAa,GAAA,KAAA,CAAM,UAAe,KAAA,KAAA,CAAA,GAAY,KAAK,KAAM,CAAA,UAAA,CAAA;AAE/D,EACE,uBAAA,KAAA,CAAA,aAAA,CAAC,KAAD,EAAA,aAAA,CAAA,cAAA,CAAA,EAAA,EAAS,UAAT,CAAA,EAAA;AAAA,IAAqB,SAAW,EAAA,YAAA;AAAA,GAAA,CAAA,sCAC7B,KAAD,EAAA;AAAA,IAAK,WAAW,CAAG,EAAA,YAAA,CAAA,cAAA,CAAA;AAAA,IAA8B,OAAO,CAAE,UAAA,CAAA;AAAA,GAAA,sCACvD,KAAD,EAAA;AAAA,IAAK,SAAU,EAAA,WAAA;AAAA,GAAA,sCACZ,IAAD,EAAA;AAAA,IAAM,SAAU,EAAA,MAAA;AAAA,GACf,CAAA,EAAA,YAAA,CAAA,sCAGF,MAAD,EAAA;AAAA,IAAM,SAAU,EAAA,MAAA;AAAA,GAAQ,EAAA,IAAA,CAAA,CAAA,CAAA,CAAA;AAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/customResizeHook/index.tsx"],"sourcesContent":["import {\n editStepWidth,\n footerHeight,\n headerHeight,\n sidebarWidth,\n} from '@/data/enums/AnnotationSize';\nimport { cKeyCode, toolUtils } from '@labelbee/lb-annotation';\n\nimport React, { useContext, useEffect, useMemo, useState } from 'react';\nimport { connect } from 'react-redux';\nimport { AppState } from '@/store';\nimport { UpdateRotate, PageBackward, PageForward } from '@/store/annotation/actionCreators';\nimport { ISize } from '@/types/main';\n\nconst EKeyCode = cKeyCode.default;\n\nexport const viewportContext = React.createContext<{\n width: number;\n height: number;\n}>({\n width: window.innerWidth,\n height: window.innerHeight,\n});\n\nexport const ViewportProviderComponent = (props: any) => {\n const { children, dispatch } = props;\n const [width] = useState(window.innerWidth);\n const [height] = useState(window.innerHeight);\n\n const keydown = (e: KeyboardEvent) => {\n if (!toolUtils.hotkeyFilter(e)) {\n return;\n }\n if (e.keyCode === EKeyCode.A) {\n dispatch(PageBackward());\n }\n\n if (e.keyCode === EKeyCode.D) {\n dispatch(PageForward());\n }\n if (e.keyCode === EKeyCode.R) {\n dispatch(UpdateRotate());\n }\n };\n\n useEffect(() => {\n window.addEventListener('keydown', keydown);\n\n return () => {\n window.removeEventListener('keydown', keydown);\n };\n }, []);\n\n const size = useMemo(() => ({ width, height }), [width, height]);\n\n return <viewportContext.Provider value={size}>{children}</viewportContext.Provider>;\n};\n\nexport const ViewportProvider = connect((state: AppState) => ({\n annotation: state.annotation,\n}))(ViewportProviderComponent);\n\nexport const useViewport = () => {\n const { width, height } = useContext(viewportContext);\n return { width, height };\n};\n\n/**\n * 获取当前 canvas 的大小\n * @param isEdit 是否为编辑模式\n * @param isTips 是否有 tips\n */\nexport const useCanvasViewPort = (isEdit = false, isTips = false) => {\n const { width, height } = useContext(viewportContext);\n const otherHeight = headerHeight + footerHeight;\n const placeholderHeight = isTips ? 40 + otherHeight + 40 : otherHeight;\n const placeholderWidth = isEdit ? editStepWidth + sidebarWidth : sidebarWidth;\n\n return {\n width: width - placeholderWidth,\n height: height - placeholderHeight,\n };\n};\n\n/**\n * 解析当前 windowSize 下的 canvasSize\n * @param size\n * @param isEdit\n * @param isTips\n */\nexport const getFormatSize = (windowSize: ISize, isEdit = false, isTips = false) => {\n const { width, height } = windowSize;\n const otherHeight = headerHeight + footerHeight;\n const placeholderHeight = isTips ? 40 + otherHeight + 40 : otherHeight;\n const placeholderWidth = isEdit ? editStepWidth + sidebarWidth : sidebarWidth;\n\n return {\n width: width - placeholderWidth,\n height: height - placeholderHeight,\n };\n};\n"],"names":[],"mappings":";;;;;;AAcA,MAAM,WAAW,SAAS;MAEb,kBAAkB,MAAM,cAGlC;AAAA,EACD,OAAO,OAAO;AAAA,EACd,QAAQ,OAAO;AAAA;MAGJ,4BAA4B,CAAC,UAAe;AACvD,QAAM,CAAE,UAAU,YAAa;AAC/B,QAAM,CAAC,SAAS,SAAS,OAAO;AAChC,QAAM,CAAC,UAAU,SAAS,OAAO;AAEjC,QAAM,UAAU,CAAC,MAAqB;AACpC,QAAI,CAAC,UAAU,aAAa,IAAI;AAC9B;AAAA;AAEF,QAAI,EAAE,YAAY,SAAS,GAAG;AAC5B,eAAS;AAAA;AAGX,QAAI,EAAE,YAAY,SAAS,GAAG;AAC5B,eAAS;AAAA;AAEX,QAAI,EAAE,YAAY,SAAS,GAAG;AAC5B,eAAS;AAAA;AAAA;AAIb,YAAU,MAAM;AACd,WAAO,iBAAiB,WAAW;AAEnC,WAAO,MAAM;AACX,aAAO,oBAAoB,WAAW;AAAA;AAAA,KAEvC;AAEH,QAAM,OAAO,QAAQ,QAAS,OAAO,UAAW,CAAC,OAAO;AAExD,6CAAQ,gBAAgB,UAAjB;AAAA,IAA0B,OAAO;AAAA,KAAO;AAAA;MAGpC,mBAAmB,QAAQ,CAAC;AAAqB,EAC5D,YAAY,MAAM;AAAA,IAChB;MA8BS,gBAAgB,CAAC,YAAmB,SAAS,OAAO,SAAS,UAAU;AAClF,QAAM,CAAE,OAAO,UAAW;AAC1B,QAAM,cAAc,eAAe;AACnC,QAAM,oBAAoB,SAAS,KAAK,cAAc,KAAK;AAC3D,QAAM,mBAAmB,SAAS,gBAAgB,eAAe;AAEjE,SAAO;AAAA,IACL,OAAO,QAAQ;AAAA,IACf,QAAQ,SAAS;AAAA;AAAA;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/customResizeHook/index.tsx"],"sourcesContent":["import {\n editStepWidth,\n footerHeight,\n headerHeight,\n sidebarWidth,\n} from '@/data/enums/AnnotationSize';\nimport { cKeyCode, toolUtils } from '@labelbee/lb-annotation';\n\nimport React, { useContext, useEffect, useMemo, useState } from 'react';\nimport { connect } from 'react-redux';\nimport { AppState } from '@/store';\nimport { UpdateRotate, PageBackward, PageForward } from '@/store/annotation/actionCreators';\nimport { ISize } from '@/types/main';\n\nconst EKeyCode = cKeyCode.default;\n\nexport const viewportContext = React.createContext<{\n width: number;\n height: number;\n}>({\n width: window.innerWidth,\n height: window.innerHeight,\n});\n\nexport const ViewportProviderComponent = (props: any) => {\n const { children, dispatch } = props;\n const [width] = useState(window.innerWidth);\n const [height] = useState(window.innerHeight);\n\n const keydown = (e: KeyboardEvent) => {\n if (!toolUtils.hotkeyFilter(e)) {\n return;\n }\n if (e.keyCode === EKeyCode.A) {\n dispatch(PageBackward());\n }\n\n if (e.keyCode === EKeyCode.D) {\n dispatch(PageForward());\n }\n if (e.keyCode === EKeyCode.R) {\n dispatch(UpdateRotate());\n }\n };\n\n useEffect(() => {\n window.addEventListener('keydown', keydown);\n\n return () => {\n window.removeEventListener('keydown', keydown);\n };\n }, []);\n\n const size = useMemo(() => ({ width, height }), [width, height]);\n\n return <viewportContext.Provider value={size}>{children}</viewportContext.Provider>;\n};\n\nexport const ViewportProvider = connect((state: AppState) => ({\n annotation: state.annotation,\n}))(ViewportProviderComponent);\n\nexport const useViewport = () => {\n const { width, height } = useContext(viewportContext);\n return { width, height };\n};\n\n/**\n * 获取当前 canvas 的大小\n * @param isEdit 是否为编辑模式\n * @param isTips 是否有 tips\n */\nexport const useCanvasViewPort = (isEdit = false, isTips = false) => {\n const { width, height } = useContext(viewportContext);\n const otherHeight = headerHeight + footerHeight;\n const placeholderHeight = isTips ? 40 + otherHeight + 40 : otherHeight;\n const placeholderWidth = isEdit ? editStepWidth + sidebarWidth : sidebarWidth;\n\n return {\n width: width - placeholderWidth,\n height: height - placeholderHeight,\n };\n};\n\n/**\n * 解析当前 windowSize 下的 canvasSize\n * @param size\n * @param isEdit\n * @param isTips\n */\nexport const getFormatSize = (windowSize: ISize, isEdit = false, isTips = false) => {\n const { width, height } = windowSize;\n const otherHeight = headerHeight + footerHeight;\n const placeholderHeight = isTips ? 40 + otherHeight + 40 : otherHeight;\n const placeholderWidth = isEdit ? editStepWidth + sidebarWidth : sidebarWidth;\n\n return {\n width: width - placeholderWidth,\n height: height - placeholderHeight,\n };\n};\n"],"names":[],"mappings":";;;;;;AAcA,MAAM,WAAW,QAAS,CAAA,OAAA,CAAA;AAEb,MAAA,eAAA,GAAkB,MAAM,aAGlC,CAAA;AAAA,EACD,OAAO,MAAO,CAAA,UAAA;AAAA,EACd,QAAQ,MAAO,CAAA,WAAA;AAAA,CAAA,EAAA;AAGJ,MAAA,yBAAA,GAA4B,CAAC,KAAe,KAAA;AACvD,EAA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EAAA,QAAA,CAAA,CAAA;AAAA,EAAA;AAGpC,MAAA,gBAAA,GAAmB,OAAQ,CAAA,CAAC,KAAqB,MAAA;AAAA,EAC5D,YAAY,KAAM,CAAA,UAAA;AAAA,CAChB,CAAA,CAAA,CAAA,yBAAA,EAAA;AA8BG,MAAM,gBAAgB,CAAC,UAAA,EAAmB,MAAS,GAAA,KAAA,EAAO,SAAS,KAAU,KAAA;AAClF,EAAM,MAAA,CAAE,OAAO,MAAW,CAAA,GAAA,UAAA,CAAA;AAC1B,EAAA,MAAM,cAAc,YAAe,GAAA,YAAA,CAAA;AACnC,EAAA,MAAM,iBAAoB,GAAA,MAAA,GAAS,EAAK,GAAA,WAAA,GAAc,EAAK,GAAA,WAAA,CAAA;AAC3D,EAAM,MAAA,gBAAA,GAAmB,MAAS,GAAA,aAAA,GAAgB,YAAe,GAAA,YAAA,CAAA;AAEjE,EAAO,OAAA;AAAA,IACL,OAAO,KAAQ,GAAA,gBAAA;AAAA,IACf,QAAQ,MAAS,GAAA,iBAAA;AAAA,GAAA,CAAA;AAAA;;;;"}
@@ -0,0 +1 @@
1
+ import{ReloadOutlined as g}from"@ant-design/icons";import{Button as p}from"antd/es";import e from"react";import{useTranslation as u}from"react-i18next";const y=n=>{const{width:o,height:i,reloadImage:a,hideSetInvalidTips:s,ignoreOffsetY:c,backgroundColor:r,fileType:m="image"}=n,{t:l}=u(),d=c?0:40,t=n.layerStyle||{position:"absolute",left:0,top:d,cursor:"initial",zIndex:20,fontSize:12};o&&i?Object.assign(t,{width:o,height:i}):Object.assign(t,{bottom:0,right:0}),r&&Object.assign(t,{backgroundColor:r});const f={position:"absolute",top:"30%",left:"50%",transform:"translate(-50%, -50%)"};return e.createElement("div",{style:t},e.createElement("div",{style:f},e.createElement("div",{style:{textAlign:"center",marginBottom:10}},e.createElement(p,{type:"primary",shape:"circle",icon:e.createElement(g,null),onClick:a})),e.createElement("div",null,`${l(`${m}ErrorAndReload`)}${s?"":l("orMaskAsInvalid")}`)))};export{y as default};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileError.js","sources":["../../../src/components/fileException/FileError.tsx"],"sourcesContent":["import { ReloadOutlined } from '@ant-design/icons';\nimport { Button } from 'antd/es';\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\n\nexport interface IFileErrorProps {\n width?: number;\n height?: number;\n reloadImage: () => void;\n hideSetInvalidTips?: boolean;\n /** 忽略顶部的偏移,如: 多边形的容器已经计算好高度(容器不包含顶部标注提示语部分) */\n ignoreOffsetY?: boolean;\n layerStyle?: React.CSSProperties;\n backgroundColor: string;\n fileType?: string;\n isError?: boolean;\n}\n\nconst FileError = (props: IFileErrorProps) => {\n const {\n width,\n height,\n reloadImage,\n hideSetInvalidTips,\n ignoreOffsetY,\n backgroundColor,\n fileType = 'image',\n } = props;\n\n const { t } = useTranslation();\n\n const top = !ignoreOffsetY ? 40 : 0;\n\n const layerStyle: React.CSSProperties = props.layerStyle || {\n position: 'absolute',\n left: 0,\n top,\n cursor: 'initial',\n zIndex: 20,\n fontSize: 12,\n };\n if (width && height) {\n Object.assign(layerStyle, { width, height });\n } else {\n Object.assign(layerStyle, { bottom: 0, right: 0 });\n }\n\n if (backgroundColor) {\n Object.assign(layerStyle, { backgroundColor });\n }\n\n const buttonStyle: React.CSSProperties = {\n position: 'absolute',\n top: '30%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n };\n\n return (\n <div style={layerStyle}>\n <div style={buttonStyle}>\n <div style={{ textAlign: 'center', marginBottom: 10 }}>\n <Button type='primary' shape='circle' icon={<ReloadOutlined />} onClick={reloadImage} />\n </div>\n <div>\n {`${t(`${fileType}ErrorAndReload`)}${hideSetInvalidTips ? '' : t('orMaskAsInvalid')}`}\n </div>\n </div>\n </div>\n );\n};\n\nexport default FileError;\n"],"names":[],"mappings":";;;;;AAkBM,MAAA,SAAA,GAAY,CAAC,KAA2B,KAAA;AAC5C,EAAM,MAAA;AAAA,IACJ,KAAA;AAAA,IACA,MAAA;AAAA,IAC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QAAA,EAAU,YAAc,EAAA,EAAA,CAAA;AAAA,GAAA,sCAC9C,MAAD,EAAA;AAAA,IAAQ,IAAK,EAAA,SAAA;AAAA,IAAU,KAAM,EAAA,QAAA;AAAA,IAAS,IAAA,sCAAO,cAAD,EAAA,IAAA,CAAA;AAAA,IAAoB,OAAS,EAAA,WAAA;AAAA,GAE3E,CAAA,CAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,OAAD,IACG,EAAA,CAAA,EAAG,EAAE,CAAG,EAAA,QAAA,CAAA,cAAA,CAAA,CAAA,CAAA,EAA4B,kBAAqB,GAAA,EAAA,GAAK,CAAE,CAAA,iBAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA;;;;"}
@@ -0,0 +1 @@
1
+ import i from"react";import{useTranslation as r}from"react-i18next";const a=({fileType:t="image",isValid:e})=>{const{t:n}=r();return e?null:i.createElement("div",{style:{position:"absolute",inset:0,color:"white",display:"flex",alignItems:"center",fontSize:30,opacity:.7,background:"rgba(255, 87, 34, 1)",justifyContent:"center"}},n(`${t}InvalidAndSkip`))};export{a as default};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileInvalid.js","sources":["../../../src/components/fileException/FileInvalid.tsx"],"sourcesContent":["/**\n * @author Glenfiddish <edwinlee0927@hotmail.com>\n * @file File invalid layer, display while isValid equal false\n * @date 2022-06-07\n */\n\nimport React from 'react';\nimport { useTranslation } from 'react-i18next';\n\nexport interface IFileInvalidProps {\n fileType?: string;\n isValid: boolean;\n}\n\nconst FileInvalid: React.FC<IFileInvalidProps> = ({ fileType = 'image', isValid }) => {\n const { t } = useTranslation();\n\n if (isValid) {\n return null;\n }\n\n return (\n <div\n style={{\n position: 'absolute',\n inset: 0,\n color: 'white',\n display: 'flex',\n alignItems: 'center',\n fontSize: 30,\n opacity: 0.7,\n background: 'rgba(255, 87, 34, 1)',\n justifyContent: 'center',\n }}\n >\n {t(`${fileType}InvalidAndSkip`)}\n </div>\n );\n};\n\nexport default FileInvalid;\n"],"names":[],"mappings":";;;AAcA,MAAM,WAA2C,GAAA,CAAC,CAAE,QAAA,GAAW,SAAS,OAAc,CAAA,KAAA;AACpF,EAAA,MAAM,CAAE,CAAM,CAAA,GAAA,cAAA,EAAA,CAAA;AAEd,EAAA,IAAI,OAAS,EAAA;AACX,IAAO,OAAA,IAAA,CAAA;AAAA,GAAA;AAGT,EAAA,2CACG,KAAD,EAAA;AAAA,IACE,KAAO,EAAA;AAAA,MACL,QAAU,EAAA,UAAA;AAAA,MACV,KAAO,EAAA,CAAA;AAAA,MACP,KAAO,EAAA,OAAA;AAAA,MACP,OAAS,EAAA,MAAA;AAAA,MACT,UAAY,EAAA,QAAA;AAAA,MACZ,QAAU,EAAA,EAAA;AAAA,MACV,OAAS,EAAA,GAAA;AAAA,MACT,UAAY,EAAA,sBAAA;AAAA,MACZ,cAAgB,EAAA,QAAA;AAAA,KAAA;AAAA,GAAA,EAGjB,EAAE,CAAG,EAAA,QAAA,CAAA,cAAA,CAAA,CAAA,CAAA,CAAA;AAAA;;;;"}
@@ -0,0 +1 @@
1
+ import a from"react";import n from"./FileError.js";import p from"./FileInvalid.js";var f=Object.defineProperty,l=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,i=(t,r,e)=>r in t?f(t,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[r]=e,o=(t,r)=>{for(var e in r||(r={}))m.call(r,e)&&i(t,e,r[e]);if(l)for(var e of l(r))c.call(r,e)&&i(t,e,r[e]);return t};const u=({invalidProps:t,errorProps:r,fileType:e})=>t.isValid?r.isError?a.createElement(n,o({},o({fileType:e},r))):null:a.createElement(p,o({},o({fileType:e},t)));export{u as default};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/fileException/index.tsx"],"sourcesContent":["/**\n * @author Glenfiddish <edwinlee0927@hotmail.com>\n * @file File exception layer, determine whether to render FileInvalid or FileError\n * @date 2022-06-07\n */\n\nimport React from 'react';\nimport FileError, { IFileErrorProps } from './FileError';\nimport FileInvalid, { IFileInvalidProps } from './FileInvalid';\n\ninterface IFileExceptionProps {\n errorProps: IFileErrorProps & { isError: boolean };\n invalidProps: IFileInvalidProps;\n fileType: string;\n}\n\nconst FileException: React.FC<IFileExceptionProps> = ({ invalidProps, errorProps, fileType }) => {\n if (!invalidProps.isValid) {\n return <FileInvalid {...{ fileType, ...invalidProps }} />;\n }\n\n if (errorProps.isError) {\n return <FileError {...{ fileType, ...errorProps }} />;\n }\n return null;\n};\n\nexport default FileException;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAgBA,MAAM,aAA+C,GAAA,CAAC,CAAE,YAAA,EAAc,YAAY,QAAe,CAAA,KAAA;AAC/F,EAAI,IAAA,CAAC,aAAa,OAAS,EAAA;AACzB,IAAA,uBAAQ,KAAA,CAAA,aAAA,CAAA,WAAA,EAAD,cAAiB,CAAA,EAAA,EAAA,cAAA,CAAA,CAAE,QAAa,CAAA,EAAA,YAAA,CAAA,CAAA,CAAA,CAAA;AAAA,GAAA;AAGzC,EAAA,IAAI,WAAW,OAAS,EAAA;AACtB,IAAA,uBAAQ,KAAA,CAAA,aAAA,CAAA,SAAA,EAAD,cAAe,CAAA,EAAA,EAAA,cAAA,CAAA,CAAE,QAAa,CAAA,EAAA,UAAA,CAAA,CAAA,CAAA,CAAA;AAAA,GAAA;AAEvC,EAAO,OAAA,IAAA,CAAA;AAAA;;;;"}
@@ -0,0 +1 @@
1
+ import d from"react";import{connect as m,useDispatch as T}from"react-redux";import{ANNOTATION_ACTIONS as e}from"../../store/Actions.js";import{PageBackward as g,PageForward as u,PageJump as A}from"../../store/annotation/actionCreators.js";import{TagToolInstanceAdaptor as l}from"../videoPlayer/TagToolInstanceAdaptor.js";const O=o=>{const{imgList:n,imgIndex:r,stepList:s,step:p}=o.annotation,t=T(),c=a=>{t({type:e.SET_TOOL,payload:{instance:a}})},i=()=>{t({type:e.SET_TOOL,payload:{instance:void 0}})};return d.createElement(l,{imgIndex:r,imgList:n,pageBackward:()=>t(g()),pageForward:()=>t(u()),pageJump:a=>t(A(~~a)),onMounted:c,onUnmounted:i,stepList:s,step:p})};var f=m(({annotation:o})=>({annotation:o}))(O);export{f as default};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/videoAnnotate/index.tsx"],"sourcesContent":["/**\n * @author Glenfiddish <edwinlee0927@hotmail.com>\n * @file connect store & TagToolInstanceAdaptor\n * @date 2022-06-02\n */\n\nimport React from 'react';\nimport { connect, useDispatch } from 'react-redux';\nimport { AppState } from '@/store';\nimport { ANNOTATION_ACTIONS } from '@/store/Actions';\nimport { AnnotationState } from '@/store/annotation/types';\nimport { PageBackward, PageForward, PageJump } from '@/store/annotation/actionCreators';\nimport { TagToolInstanceAdaptor } from '@/components/videoPlayer/TagToolInstanceAdaptor';\n\nconst VideoAnnotate: React.FC<{ annotation: AnnotationState }> = (props) => {\n const { imgList, imgIndex, stepList, step } = props.annotation;\n const dispatch = useDispatch();\n const onMounted = (instance: TagToolInstanceAdaptor) => {\n dispatch({\n type: ANNOTATION_ACTIONS.SET_TOOL,\n payload: {\n instance,\n },\n });\n };\n\n const onUnmounted = () => {\n dispatch({\n type: ANNOTATION_ACTIONS.SET_TOOL,\n payload: {\n instance: undefined,\n },\n });\n };\n\n return (\n <TagToolInstanceAdaptor\n imgIndex={imgIndex}\n imgList={imgList}\n pageBackward={() => dispatch(PageBackward())}\n pageForward={() => dispatch(PageForward())}\n pageJump={(page) => dispatch(PageJump(~~page))}\n onMounted={onMounted}\n onUnmounted={onUnmounted}\n stepList={stepList}\n step={step}\n />\n );\n};\n\nexport default connect(({ annotation }: AppState) => ({ annotation }))(VideoAnnotate);\n"],"names":[],"mappings":";;;;;;AAcA,MAAM,aAAA,GAA2D,CAAC,KAAU,KAAA;AAC1E,EAAA,MAAM,CAAE,OAAA,EAAS,QAAU,EAAA,QAAA,EAAU,QAAS,KAAM,CAAA,UAAA,CAAA;AACpD,EAAA,MAAM,QAAW,GAAA,WAAA,EAAA,CAAA;AACjB,EAAM,MAAA,SAAA,GAAY,CAAC,QAAqC,KAAA;AACtD,IAAS,QAAA,CAAA;AAAA,MACP,MAAM,kBAAmB,CAAA,QAAA;AAAA,MACzB,OAAS,EAAA;AAAA,QACP,QAAA;AAAA,OAAA;AAAA,KAAA,CAAA,CAAA;AAAA,GAAA,CAAA;AAKN,EAAA,MAAM,cAAc,MAAM;AACxB,IAAS,QAAA,CAAA;AAAA,MACP,MAAM,kBAAmB,CAAA,QAAA;AAAA,MACzB,OAAS,EAAA;AAAA,QACP,QAAU,EAAA,KAAA,CAAA;AAAA,OAAA;AAAA,KAAA,CAAA,CAAA;AAAA,GAAA,CAAA;AAKhB,EAAA,2CACG,sBAAD,EAAA;AAAA,IACE,QAAA;AAAA,IACA,OAAA;AAAA,IACA,YAAA,EAAc,MAAM,QAAS,CAAA,YAAA,EAAA,CAAA;AAAA,IAC7B,WAAA,EAAa,MAAM,QAAS,CAAA,WAAA,EAAA,CAAA;AAAA,IAC5B,UAAU,CAAC,IAAA,KAAS,QAAS,CAAA,QAAA,CAAS,CAAC,CAAC,IAAA,CAAA,CAAA;AAAA,IACxC,SAAA;AAAA,IACA,WAAA;AAAA,IACA,QAAA;AAAA,IACA,IAAA;AAAA,GAAA,CAAA,CAAA;AAAA,CAAA,CAAA;AAKN,sBAAe,OAAQ,CAAA,CAAC,CAAE,UAAA,CAAA,OAA8B,UAAe,CAAA,CAAA,CAAA,CAAA,aAAA,CAAA;;;;"}