@cloud-app-dev/vidc 2.2.0-alpha.8 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (342) hide show
  1. package/.eslintignore +1 -3
  2. package/.eslintrc +3 -0
  3. package/.prettierignore +1 -0
  4. package/.umirc.ts +74 -74
  5. package/es/Box/InfoBox/index.css +5 -6
  6. package/es/Box/TwoColumnBox/index.css +17 -24
  7. package/es/Box/TwoColumnBox/index.js +1 -4
  8. package/es/Box/index.css +1 -1
  9. package/es/Config/interface.d.ts +2 -1
  10. package/es/ConfigContext/index.d.ts +1 -1
  11. package/es/DomMove/demo.d.ts +2 -0
  12. package/es/DomMove/demo.js +16 -0
  13. package/es/DomMove/index.d.ts +16 -0
  14. package/es/DomMove/index.js +145 -0
  15. package/es/DomMove/utils.d.ts +8 -0
  16. package/es/{Picture/component/MoveContent → DomMove}/utils.js +19 -0
  17. package/es/Drawer/index.d.ts +2 -2
  18. package/es/Drawer/interface.d.ts +4 -174
  19. package/es/ErrorBoundary/index.d.ts +18 -0
  20. package/es/ErrorBoundary/index.js +79 -0
  21. package/es/List/DynamicGridList/Demo.js +40 -27
  22. package/es/List/DynamicGridList/index.d.ts +20 -29
  23. package/es/List/DynamicGridList/index.js +40 -63
  24. package/es/List/DynamicList/index.css +15 -0
  25. package/es/List/DynamicList/index.d.ts +14 -0
  26. package/es/List/DynamicList/index.js +105 -0
  27. package/es/List/DynamicList/interface.d.ts +19 -0
  28. package/es/List/DynamicList/utils.d.ts +4 -0
  29. package/es/List/DynamicList/utils.js +6 -0
  30. package/es/List/GridList/Demo.js +27 -4
  31. package/es/List/GridList/index.css +1 -0
  32. package/es/List/GridList/index.d.ts +2 -2
  33. package/es/List/GridList/index.js +8 -12
  34. package/es/List/GridList/interface.d.ts +1 -1
  35. package/es/List/VList/index.js +2 -3
  36. package/es/List/index.css +3 -55
  37. package/es/List/index.d.ts +6 -7
  38. package/es/List/index.js +15 -154
  39. package/es/List/interface.d.ts +3 -61
  40. package/es/LoaderApp/index.d.ts +1 -1
  41. package/es/LoaderApp/index.js +27 -46
  42. package/es/LoaderApp/interface.d.ts +3 -0
  43. package/es/LoaderApp/loader.d.ts +6 -7
  44. package/es/LoaderApp/loader.js +20 -30
  45. package/es/LoaderApp/sandbox.back.d.ts +18 -0
  46. package/es/LoaderApp/sandbox.back.js +356 -0
  47. package/es/LoaderApp/sandbox.d.ts +12 -0
  48. package/es/LoaderApp/sandbox.js +110 -0
  49. package/es/LoaderApp/utils.d.ts +5 -1
  50. package/es/LoaderApp/utils.js +98 -2
  51. package/es/Map/AMap.d.ts +1572 -0
  52. package/es/Map/BasicMap/AMapInstance.d.ts +15 -0
  53. package/es/Map/BasicMap/AMapInstance.js +66 -0
  54. package/es/Map/BasicMap/LeafletInstance.d.ts +15 -0
  55. package/es/Map/BasicMap/LeafletInstance.js +98 -0
  56. package/es/Map/BasicMap/index.css +24 -0
  57. package/es/Map/BasicMap/index.d.ts +9 -0
  58. package/es/Map/BasicMap/index.js +103 -0
  59. package/es/Map/ClusterLayer/hook.d.ts +5 -0
  60. package/es/Map/ClusterLayer/hook.js +144 -0
  61. package/es/Map/ClusterLayer/index.css +26 -0
  62. package/es/Map/ClusterLayer/index.d.ts +5 -0
  63. package/es/Map/ClusterLayer/index.js +31 -0
  64. package/es/Map/ClusterLayer/props.d.ts +8 -0
  65. package/es/Map/Config/index.d.ts +7 -0
  66. package/es/{InitialConfig → Map/Config}/index.js +35 -36
  67. package/es/Map/Config/utils.d.ts +2 -0
  68. package/es/{List/DynamicDeviceList → Map/Config}/utils.js +48 -45
  69. package/es/Map/Context/index.d.ts +11 -0
  70. package/es/Map/Context/index.js +66 -0
  71. package/es/Map/FindPio/index.css +7 -0
  72. package/es/Map/FindPio/index.d.ts +4 -0
  73. package/es/Map/FindPio/index.js +16 -0
  74. package/es/{WorkerFlow/Demo.d.ts → Map/InfoWindow/demo.d.ts} +0 -0
  75. package/es/{List/DynamicDeviceList/Demo.js → Map/InfoWindow/demo.js} +27 -25
  76. package/es/Map/InfoWindow/index.d.ts +8 -0
  77. package/es/Map/InfoWindow/index.js +74 -0
  78. package/es/Map/LevelCenter/DragMarker/index.d.ts +12 -0
  79. package/es/Map/LevelCenter/DragMarker/index.js +48 -0
  80. package/es/{List/DeviceList → Map/LevelCenter}/index.css +0 -0
  81. package/es/Map/LevelCenter/index.d.ts +13 -0
  82. package/es/Map/LevelCenter/index.js +42 -0
  83. package/es/Map/LoaderMap/index.d.ts +12 -0
  84. package/es/Map/LoaderMap/index.js +58 -0
  85. package/es/Map/ResetTools/index.css +32 -0
  86. package/es/Map/ResetTools/index.d.ts +9 -0
  87. package/es/Map/ResetTools/index.js +61 -0
  88. package/es/Map/SinglePoint/Marker/index.d.ts +7 -0
  89. package/es/Map/SinglePoint/Marker/index.js +29 -0
  90. package/es/Map/SinglePoint/icon/Place_icon_OnLine_Hover.svg +15 -0
  91. package/es/Map/SinglePoint/icon/Place_icon_OnLine_Normal.svg +15 -0
  92. package/es/Map/SinglePoint/icon/Place_icon_OutLine_Hover.svg +15 -0
  93. package/es/Map/SinglePoint/icon/Place_icon_OutLine_Normal.svg +15 -0
  94. package/es/Map/SinglePoint/index.css +29 -0
  95. package/es/Map/SinglePoint/index.d.ts +7 -0
  96. package/es/Map/SinglePoint/index.js +32 -0
  97. package/es/Map/hook/useMapType.d.ts +4 -0
  98. package/es/Map/hook/useMapType.js +13 -0
  99. package/es/Map/icon.d.ts +2 -0
  100. package/es/Map/icon.js +10 -0
  101. package/es/Map/index.d.ts +23 -0
  102. package/es/Map/index.js +25 -0
  103. package/es/Map/interface.d.ts +55 -0
  104. package/es/Map/points.json +61247 -0
  105. package/es/{Picture/component/MoveContent → Map/useMarker}/index.css +0 -0
  106. package/es/Map/useMarker/index.d.ts +11 -0
  107. package/es/{WorkerFlow/Form/FormAuth.js → Map/useMarker/index.js} +57 -80
  108. package/es/Map/withMap/index.d.ts +2 -0
  109. package/es/Map/withMap/index.js +12 -0
  110. package/es/Modal/index.css +1 -1
  111. package/es/Modal/index.d.ts +7 -7
  112. package/es/Modal/index.js +7 -5
  113. package/es/Picture/component/RectMenu/index.d.ts +1 -1
  114. package/es/Picture/index.d.ts +1 -1
  115. package/es/Picture/index.js +2 -2
  116. package/es/Player/api/index.d.ts +1 -8
  117. package/es/Player/api/index.js +27 -35
  118. package/es/Player/contraller_bar/left_bar.js +2 -2
  119. package/es/Player/contraller_bar/right_bar.d.ts +1 -1
  120. package/es/Player/contraller_bar/right_bar.js +13 -27
  121. package/es/Player/demo.js +13 -21
  122. package/es/Player/event/index.js +5 -1
  123. package/es/Player/frontend_player.d.ts +1 -1
  124. package/es/Player/frontend_player.js +20 -13
  125. package/es/Player/frontend_timeline.d.ts +1 -1
  126. package/es/Player/frontend_timeline.js +6 -5
  127. package/es/Player/live_heart.js +45 -12
  128. package/es/Player/message.js +23 -12
  129. package/es/Player/player.d.ts +31 -7
  130. package/es/Player/segment_player.d.ts +1 -1
  131. package/es/Player/segment_player.js +30 -18
  132. package/es/Player/segment_timeline.js +14 -13
  133. package/es/Player/single_player.js +50 -9
  134. package/es/Player/timeline.js +8 -6
  135. package/es/Player/util.d.ts +4 -25
  136. package/es/Player/util.js +47 -55
  137. package/es/PlayerExt/index.css +2 -2
  138. package/es/PlayerExt/index.d.ts +3 -1
  139. package/es/PlayerExt/index.js +19 -5
  140. package/es/ScreenPlayer/Live.d.ts +5 -0
  141. package/es/ScreenPlayer/Live.js +109 -0
  142. package/es/ScreenPlayer/LiveTools.d.ts +15 -0
  143. package/es/ScreenPlayer/LiveTools.js +95 -0
  144. package/es/ScreenPlayer/PlayerWithExt.d.ts +22 -0
  145. package/es/ScreenPlayer/PlayerWithExt.js +169 -0
  146. package/es/ScreenPlayer/Record.d.ts +5 -0
  147. package/es/{WorkerFlow/index.js → ScreenPlayer/Record.js} +290 -273
  148. package/es/ScreenPlayer/RecordTools.d.ts +17 -0
  149. package/es/ScreenPlayer/RecordTools.js +102 -0
  150. package/es/ScreenPlayer/SegmentTimeLine.d.ts +10 -0
  151. package/es/ScreenPlayer/SegmentTimeLine.js +40 -0
  152. package/es/ScreenPlayer/TimeSlider.d.ts +127 -0
  153. package/es/ScreenPlayer/TimeSlider.js +528 -0
  154. package/es/ScreenPlayer/demo.d.ts +2 -0
  155. package/es/ScreenPlayer/demo.js +25 -0
  156. package/es/ScreenPlayer/demo2.d.ts +2 -0
  157. package/es/ScreenPlayer/demo2.js +153 -0
  158. package/es/ScreenPlayer/index.css +50 -0
  159. package/es/ScreenPlayer/index.d.ts +5 -0
  160. package/es/ScreenPlayer/index.js +8 -0
  161. package/es/ScreenPlayer/interface.d.ts +81 -0
  162. package/es/ScreenPlayer/useRecordList.d.ts +3 -0
  163. package/es/{WorkerFlow/Form/UserAndGroupSelect.js → ScreenPlayer/useRecordList.js} +173 -176
  164. package/es/ScreenPlayer/useVideoFit.d.ts +5 -0
  165. package/es/{Tree/BaseTree/demo.js → ScreenPlayer/useVideoFit.js} +30 -55
  166. package/es/ScreenPlayer/utils.d.ts +25 -0
  167. package/es/ScreenPlayer/utils.js +84 -0
  168. package/es/ThemeAntd/index.css +58 -58
  169. package/es/ThemeAntd/style/button.css +1 -1
  170. package/es/ThemeAntd/style/checkbox.css +8 -8
  171. package/es/ThemeAntd/style/input.css +13 -13
  172. package/es/ThemeAntd/style/pagination.css +5 -5
  173. package/es/ThemeAntd/style/picker.css +11 -11
  174. package/es/ThemeAntd/style/popover.css +1 -1
  175. package/es/ThemeAntd/style/radio.css +4 -4
  176. package/es/ThemeAntd/style/scrollbar.css +3 -3
  177. package/es/ThemeAntd/style/select.css +11 -11
  178. package/es/ThemeAntd/style/table.css +1 -1
  179. package/es/Timeout/index.d.ts +33 -0
  180. package/es/Timeout/index.js +83 -0
  181. package/es/Tree/demo.js +9 -12
  182. package/es/Tree/index.css +55 -29
  183. package/es/Tree/index.d.ts +20 -19
  184. package/es/Tree/index.js +70 -185
  185. package/es/index.d.ts +8 -9
  186. package/es/index.js +8 -9
  187. package/es/useInfiniteScroll/index.d.ts +16 -0
  188. package/es/{useHttp → useInfiniteScroll}/index.js +79 -43
  189. package/es/useVirtualList/index.d.ts +13 -0
  190. package/es/useVirtualList/index.js +175 -0
  191. package/es/withErrorBoundary/index.d.ts +9 -0
  192. package/es/withErrorBoundary/index.js +45 -0
  193. package/package.json +19 -21
  194. package/release-build.sh +19 -0
  195. package/test.js +48 -0
  196. package/es/DeviceIcon/icon.d.ts +0 -9
  197. package/es/DeviceIcon/icon.js +0 -138
  198. package/es/DeviceIcon/index.css +0 -8
  199. package/es/DeviceIcon/index.d.ts +0 -14
  200. package/es/DeviceIcon/index.js +0 -37
  201. package/es/DeviceSelect/TreeType.d.ts +0 -7
  202. package/es/DeviceSelect/TreeType.js +0 -36
  203. package/es/DeviceSelect/demo.d.ts +0 -3
  204. package/es/DeviceSelect/demo.js +0 -22
  205. package/es/DeviceSelect/index.css +0 -11
  206. package/es/DeviceSelect/index.d.ts +0 -13
  207. package/es/DeviceSelect/index.js +0 -191
  208. package/es/Dict/cache.d.ts +0 -3
  209. package/es/Dict/cache.js +0 -21
  210. package/es/Dict/device.d.ts +0 -28
  211. package/es/Dict/device.js +0 -117
  212. package/es/Dict/hook.d.ts +0 -3
  213. package/es/Dict/hook.js +0 -98
  214. package/es/Dict/index.d.ts +0 -9
  215. package/es/Dict/index.js +0 -10
  216. package/es/Dict/interface.d.ts +0 -16
  217. package/es/Dict/utils.d.ts +0 -10
  218. package/es/Dict/utils.js +0 -44
  219. package/es/InitialConfig/index.d.ts +0 -8
  220. package/es/InitialConfig/utils.d.ts +0 -20
  221. package/es/InitialConfig/utils.js +0 -110
  222. package/es/InitialRequest/index.d.ts +0 -9
  223. package/es/InitialRequest/index.js +0 -97
  224. package/es/InitialRequest/utils.d.ts +0 -10
  225. package/es/InitialRequest/utils.js +0 -116
  226. package/es/List/CheckExt.d.ts +0 -9
  227. package/es/List/CheckExt.js +0 -36
  228. package/es/List/DeviceList/index.d.ts +0 -11
  229. package/es/List/DeviceList/index.js +0 -50
  230. package/es/List/DynamicDeviceList/Demo.d.ts +0 -3
  231. package/es/List/DynamicDeviceList/index.css +0 -39
  232. package/es/List/DynamicDeviceList/index.d.ts +0 -12
  233. package/es/List/DynamicDeviceList/index.js +0 -205
  234. package/es/List/DynamicDeviceList/interface.d.ts +0 -37
  235. package/es/List/DynamicDeviceList/utils.d.ts +0 -16
  236. package/es/List/ListExt/index.css +0 -3
  237. package/es/List/ListExt/index.d.ts +0 -19
  238. package/es/List/ListExt/index.js +0 -44
  239. package/es/Picture/component/MoveContent/index.d.ts +0 -39
  240. package/es/Picture/component/MoveContent/index.js +0 -244
  241. package/es/Picture/component/MoveContent/utils.d.ts +0 -4
  242. package/es/Title/index.css +0 -25
  243. package/es/Title/index.d.ts +0 -12
  244. package/es/Title/index.js +0 -30
  245. package/es/Tree/BaseTree/demo.d.ts +0 -3
  246. package/es/Tree/BaseTree/index.css +0 -64
  247. package/es/Tree/BaseTree/index.d.ts +0 -24
  248. package/es/Tree/BaseTree/index.js +0 -83
  249. package/es/UserSelect/demo.d.ts +0 -3
  250. package/es/UserSelect/demo.js +0 -21
  251. package/es/UserSelect/index.css +0 -16
  252. package/es/UserSelect/index.d.ts +0 -18
  253. package/es/UserSelect/index.js +0 -194
  254. package/es/WorkerFlow/Demo.js +0 -57
  255. package/es/WorkerFlow/Form/Approver.d.ts +0 -10
  256. package/es/WorkerFlow/Form/Approver.js +0 -33
  257. package/es/WorkerFlow/Form/Condition.d.ts +0 -11
  258. package/es/WorkerFlow/Form/Condition.js +0 -235
  259. package/es/WorkerFlow/Form/EmptyUserSet.d.ts +0 -8
  260. package/es/WorkerFlow/Form/EmptyUserSet.js +0 -137
  261. package/es/WorkerFlow/Form/FormAuth.d.ts +0 -8
  262. package/es/WorkerFlow/Form/GroupList.d.ts +0 -12
  263. package/es/WorkerFlow/Form/GroupList.js +0 -44
  264. package/es/WorkerFlow/Form/GroupSelect.d.ts +0 -8
  265. package/es/WorkerFlow/Form/GroupSelect.js +0 -167
  266. package/es/WorkerFlow/Form/GroupSelectModalContent.d.ts +0 -6
  267. package/es/WorkerFlow/Form/GroupSelectModalContent.js +0 -177
  268. package/es/WorkerFlow/Form/Handle.d.ts +0 -10
  269. package/es/WorkerFlow/Form/Handle.js +0 -33
  270. package/es/WorkerFlow/Form/LevelGroupSelect.d.ts +0 -12
  271. package/es/WorkerFlow/Form/LevelGroupSelect.js +0 -208
  272. package/es/WorkerFlow/Form/Notifier.d.ts +0 -8
  273. package/es/WorkerFlow/Form/Notifier.js +0 -16
  274. package/es/WorkerFlow/Form/UserAndGroupSelect.d.ts +0 -8
  275. package/es/WorkerFlow/Form/UserSelect.d.ts +0 -8
  276. package/es/WorkerFlow/Form/UserSelect.js +0 -150
  277. package/es/WorkerFlow/Form/UserSelectModalContent.d.ts +0 -6
  278. package/es/WorkerFlow/Form/UserSelectModalContent.js +0 -166
  279. package/es/WorkerFlow/Form/UserSet.d.ts +0 -14
  280. package/es/WorkerFlow/Form/UserSet.js +0 -308
  281. package/es/WorkerFlow/Form/UsersHandleType.d.ts +0 -7
  282. package/es/WorkerFlow/Form/UsersHandleType.js +0 -32
  283. package/es/WorkerFlow/Form/utils.d.ts +0 -3
  284. package/es/WorkerFlow/Form/utils.js +0 -47
  285. package/es/WorkerFlow/Nodes/Add.d.ts +0 -7
  286. package/es/WorkerFlow/Nodes/Add.js +0 -97
  287. package/es/WorkerFlow/Nodes/AddOption.d.ts +0 -10
  288. package/es/WorkerFlow/Nodes/AddOption.js +0 -23
  289. package/es/WorkerFlow/Nodes/AddOptionList.d.ts +0 -8
  290. package/es/WorkerFlow/Nodes/AddOptionList.js +0 -46
  291. package/es/WorkerFlow/Nodes/Approver.d.ts +0 -11
  292. package/es/WorkerFlow/Nodes/Approver.js +0 -53
  293. package/es/WorkerFlow/Nodes/Condition.d.ts +0 -10
  294. package/es/WorkerFlow/Nodes/Condition.js +0 -140
  295. package/es/WorkerFlow/Nodes/Constants.d.ts +0 -35
  296. package/es/WorkerFlow/Nodes/Constants.js +0 -150
  297. package/es/WorkerFlow/Nodes/End.d.ts +0 -7
  298. package/es/WorkerFlow/Nodes/End.js +0 -16
  299. package/es/WorkerFlow/Nodes/Handle.d.ts +0 -11
  300. package/es/WorkerFlow/Nodes/Handle.js +0 -52
  301. package/es/WorkerFlow/Nodes/Node.d.ts +0 -8
  302. package/es/WorkerFlow/Nodes/Node.js +0 -26
  303. package/es/WorkerFlow/Nodes/Notifier.d.ts +0 -11
  304. package/es/WorkerFlow/Nodes/Notifier.js +0 -52
  305. package/es/WorkerFlow/Nodes/Render.d.ts +0 -8
  306. package/es/WorkerFlow/Nodes/Render.js +0 -16
  307. package/es/WorkerFlow/Nodes/Start.d.ts +0 -12
  308. package/es/WorkerFlow/Nodes/Start.js +0 -26
  309. package/es/WorkerFlow/Nodes/TitleElement.d.ts +0 -10
  310. package/es/WorkerFlow/Nodes/TitleElement.js +0 -127
  311. package/es/WorkerFlow/Nodes/Wrap.d.ts +0 -13
  312. package/es/WorkerFlow/Nodes/Wrap.js +0 -35
  313. package/es/WorkerFlow/OperatorContext.d.ts +0 -4
  314. package/es/WorkerFlow/OperatorContext.js +0 -3
  315. package/es/WorkerFlow/Tools.d.ts +0 -8
  316. package/es/WorkerFlow/Tools.js +0 -78
  317. package/es/WorkerFlow/XML/CanvasTag.d.ts +0 -3
  318. package/es/WorkerFlow/XML/CanvasTag.js +0 -142
  319. package/es/WorkerFlow/XML/EndEvent.d.ts +0 -1
  320. package/es/WorkerFlow/XML/EndEvent.js +0 -14
  321. package/es/WorkerFlow/XML/ExclusiveGateway.d.ts +0 -9
  322. package/es/WorkerFlow/XML/ExclusiveGateway.js +0 -101
  323. package/es/WorkerFlow/XML/Root.d.ts +0 -1
  324. package/es/WorkerFlow/XML/Root.js +0 -5
  325. package/es/WorkerFlow/XML/StartEvent.d.ts +0 -5
  326. package/es/WorkerFlow/XML/StartEvent.js +0 -28
  327. package/es/WorkerFlow/XML/UserTask.d.ts +0 -5
  328. package/es/WorkerFlow/XML/UserTask.js +0 -93
  329. package/es/WorkerFlow/XML/index.d.ts +0 -4
  330. package/es/WorkerFlow/XML/index.js +0 -100
  331. package/es/WorkerFlow/XML/utils.d.ts +0 -6
  332. package/es/WorkerFlow/XML/utils.js +0 -97
  333. package/es/WorkerFlow/data.json +0 -83
  334. package/es/WorkerFlow/index.css +0 -779
  335. package/es/WorkerFlow/index.d.ts +0 -13
  336. package/es/WorkerFlow/interface.d.ts +0 -93
  337. package/es/WorkerFlow/template.d.ts +0 -2
  338. package/es/WorkerFlow/template.js +0 -17
  339. package/es/WorkerFlow/utils.d.ts +0 -7
  340. package/es/WorkerFlow/utils.js +0 -197
  341. package/es/useHttp/index.d.ts +0 -8
  342. package/pnpm-lock.yaml +0 -13662
@@ -0,0 +1,11 @@
1
+ import { Map } from '../interface';
2
+ import { AMap as AMapType } from '../AMap';
3
+ import './index.less';
4
+ export interface IUseMarkerProps {
5
+ map: Map;
6
+ center: [number, number];
7
+ createIcon: (options?: any) => any;
8
+ options?: AMapType.MarkerOptions;
9
+ }
10
+ declare function useMarker({ map, center, createIcon, options }: IUseMarkerProps): any;
11
+ export default useMarker;
@@ -1,7 +1,8 @@
1
- import "antd/lib/radio/style";
2
- import _Radio from "antd/lib/radio";
3
- import "antd/lib/table/style";
4
- import _Table from "antd/lib/table";
1
+ function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
2
+
3
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
4
+
5
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
5
6
 
6
7
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
7
8
 
@@ -23,95 +24,71 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
23
24
 
24
25
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
25
26
 
26
- import React, { useCallback, useEffect, useState } from 'react';
27
- import Box from '../../Box';
28
- import { cloneDeep } from 'lodash-es';
27
+ import { useEffect, useRef, useState } from 'react';
28
+ import useMapType from '../hook/useMapType';
29
+ import "./index.css";
30
+ var _global = window;
29
31
 
30
- function FormAuth(_ref) {
31
- var form = _ref.form,
32
- onChange = _ref.onChange;
32
+ function useMarker(_ref) {
33
+ var map = _ref.map,
34
+ center = _ref.center,
35
+ createIcon = _ref.createIcon,
36
+ options = _ref.options;
33
37
 
34
38
  var _useState = useState({
35
- form: cloneDeep(form)
39
+ marker: null
36
40
  }),
37
41
  _useState2 = _slicedToArray(_useState, 2),
38
42
  state = _useState2[0],
39
43
  setState = _useState2[1];
40
44
 
41
- var onFormAuthChange = useCallback(function (options) {
42
- var newForm = state.form;
43
- newForm.forEach(function (item) {
44
- if (item.name === options.name) {
45
- item.auth = options.auth;
46
- }
47
- });
48
- setState(function (old) {
49
- return Object.assign(Object.assign({}, old), {
50
- form: _toConsumableArray(newForm)
51
- });
52
- });
53
- }, [state.form]);
45
+ var inMap = useRef(false);
46
+ var type = useMapType();
54
47
  useEffect(function () {
55
- return onChange({
56
- form: state.form
57
- });
58
- }, [state.form]);
59
- return /*#__PURE__*/React.createElement(Box.InfoBox, {
60
- className: "user-form-auth-layout",
61
- title: "\u8868\u5355\u64CD\u4F5C\u6743\u9650"
62
- }, /*#__PURE__*/React.createElement(_Table, {
63
- className: "user-form-table",
64
- pagination: false,
65
- rowKey: "name",
66
- columns: [{
67
- title: '表单字段',
68
- dataIndex: 'label',
69
- align: 'center'
70
- }, {
71
- title: '可编辑',
72
- align: 'center',
73
- render: function render(item) {
74
- return /*#__PURE__*/React.createElement(_Radio, {
75
- checked: item.auth === 1,
76
- onClick: function onClick() {
77
- return onFormAuthChange({
78
- name: item.name,
79
- auth: 1
80
- });
81
- }
48
+ if (!(center && center.length === 2) || !map) {
49
+ return;
50
+ }
51
+
52
+ if (type.leaflet) {
53
+ var L = window.L;
54
+ var latlng = L.latLng(center);
55
+
56
+ if (inMap.current) {
57
+ state.marker.setLatLng(latlng);
58
+ } else {
59
+ var marker = L.marker(latlng, {
60
+ icon: createIcon(),
61
+ draggable: true,
62
+ zIndexOffset: 10
82
63
  });
83
- }
84
- }, {
85
- title: '只读',
86
- align: 'center',
87
- render: function render(item) {
88
- return /*#__PURE__*/React.createElement(_Radio, {
89
- checked: item.auth === 2,
90
- onClick: function onClick() {
91
- return onFormAuthChange({
92
- name: item.name,
93
- auth: 2
94
- });
95
- }
64
+ map.addLayer(marker);
65
+ setState({
66
+ marker: marker
96
67
  });
68
+ inMap.current = true;
97
69
  }
98
- }, {
99
- title: '隐藏',
100
- align: 'center',
101
- render: function render(item) {
102
- return /*#__PURE__*/React.createElement(_Radio, {
103
- checked: item.auth === 0,
104
- onClick: function onClick() {
105
- return onFormAuthChange({
106
- name: item.name,
107
- auth: 0
108
- });
109
- }
70
+ }
71
+
72
+ if (type.AMap) {
73
+ var AMap = _global.AMap;
74
+
75
+ if (inMap.current) {
76
+ state.marker.setPosition(_construct(AMap.LngLat, _toConsumableArray(center)));
77
+ } else {
78
+ var _marker = new AMap.Marker(Object.assign({
79
+ position: _construct(AMap.LngLat, _toConsumableArray(center))
80
+ }, options));
81
+
82
+ map.add(_marker);
83
+ setState({
84
+ marker: _marker
110
85
  });
86
+ inMap.current = true;
111
87
  }
112
- }],
113
- dataSource: state.form
114
- }));
88
+ } // eslint-disable-next-line react-hooks/exhaustive-deps
89
+
90
+ }, [center, map, options]);
91
+ return state.marker;
115
92
  }
116
93
 
117
- export default FormAuth;
94
+ export default useMarker;
@@ -0,0 +1,2 @@
1
+ declare function withMap<P>(Component: any, className?: string): (props: P) => JSX.Element;
2
+ export default withMap;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import Map from '../BasicMap';
3
+
4
+ function withMap(Component, className) {
5
+ return function withMapComponent(props) {
6
+ return /*#__PURE__*/React.createElement(Map, {
7
+ className: className
8
+ }, /*#__PURE__*/React.createElement(Component, Object.assign({}, props)));
9
+ };
10
+ }
11
+
12
+ export default withMap;
@@ -6,7 +6,7 @@
6
6
  height: 100%;
7
7
  display: flex;
8
8
  flex-direction: column;
9
- border-radius: var(--form-redius);
9
+ border-radius: var(--redius1);
10
10
  overflow: hidden;
11
11
  background-color: transparent;
12
12
  }
@@ -7,18 +7,18 @@ declare namespace Modal {
7
7
  className: string;
8
8
  getContainer: boolean;
9
9
  };
10
- var info;
11
- var success;
12
- var error;
13
- var warn;
14
- var warning;
15
- var confirm;
10
+ var info: import("antd/lib/modal/confirm").ModalFunc;
11
+ var success: import("antd/lib/modal/confirm").ModalFunc;
12
+ var error: import("antd/lib/modal/confirm").ModalFunc;
13
+ var warn: import("antd/lib/modal/confirm").ModalFunc;
14
+ var warning: import("antd/lib/modal/confirm").ModalFunc;
15
+ var confirm: import("antd/lib/modal/confirm").ModalFunc;
16
16
  var destroyAll: () => void;
17
17
  var useModal: (prefixCls?: string) => {
18
18
  open: (options: IUseModalHookState) => void;
19
19
  close: () => void;
20
20
  };
21
- var useAntdModal;
21
+ var useAntdModal: typeof import("antd/lib/modal/useModal").default;
22
22
  var RefModal: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<IRefModalMethodsProps>>;
23
23
  }
24
24
  export interface IUseModalHookState {
package/es/Modal/index.js CHANGED
@@ -19,8 +19,8 @@ import { __rest } from "tslib";
19
19
  import React, { useContext, useEffect, useImperativeHandle, useMemo, useState } from 'react';
20
20
  import * as ReactDOMClient from 'react-dom/client';
21
21
  import CC from '../ConfigContext';
22
- import "./index.css";
23
22
  import ConfigContext from '../ConfigContext';
23
+ import "./index.css";
24
24
 
25
25
  function Modal(_a) {
26
26
  var children = _a.children,
@@ -69,15 +69,16 @@ function useModal() {
69
69
 
70
70
  var root = useMemo(function () {
71
71
  return ReactDOMClient.createRoot(div);
72
- }, []);
72
+ }, [div]);
73
73
  useEffect(function () {
74
74
  container.appendChild(div);
75
75
  return function () {
76
+ // eslint-disable-next-line no-sequences
76
77
  setTimeout(function () {
77
78
  return root.unmount(), div.remove();
78
79
  }, 100);
79
80
  };
80
- }, []);
81
+ }, [container, div, root]);
81
82
  useEffect(function () {
82
83
  root.render( /*#__PURE__*/React.createElement(_ConfigProvider, {
83
84
  prefixCls: prefixCls,
@@ -96,7 +97,7 @@ function useModal() {
96
97
  className: state.className,
97
98
  getContainer: false
98
99
  }, state.content)));
99
- }, [state.content, state.visible, state.title, state.onOk, state.width, state.className]);
100
+ }, [state.content, state.visible, state.title, state.onOk, state.width, state.className, root, prefixCls, container]);
100
101
 
101
102
  var open = function open(options) {
102
103
  setState(function (old) {
@@ -152,7 +153,8 @@ var RefModal = /*#__PURE__*/React.forwardRef(function RefModal(_, ref) {
152
153
  visible: false
153
154
  });
154
155
  });
155
- };
156
+ }; // eslint-disable-next-line react-hooks/exhaustive-deps
157
+
156
158
 
157
159
  useImperativeHandle(ref, function () {
158
160
  return {
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
+ import { MenuRectType } from '../../../Picture/interface';
2
3
  import './index.less';
3
- import { MenuRectType } from 'src/Picture/interface';
4
4
  interface IRectMenuProps {
5
5
  x: number;
6
6
  y: number;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { IPictureProps } from './interface';
2
+ import type { IPictureProps } from './interface';
3
3
  import './index.less';
4
4
  declare function Picture({ className, width, height, minHeight, disabledDrag, imagePath, rects, isOpenSelect, disabledDrawMenu, menus, hasTool, fullScreenEle, ...props }: IPictureProps): JSX.Element;
5
5
  declare namespace Picture {
@@ -18,7 +18,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
18
18
 
19
19
  import { __awaiter, __rest } from "tslib";
20
20
  import React, { useMemo, useRef, useState, useCallback, useEffect } from 'react';
21
- import MoveContent from './component/MoveContent';
21
+ import DomMove from '../DomMove';
22
22
  import { getRectImagePath } from './loadCaptureRectImage';
23
23
  import { computedBound } from './dragBound';
24
24
  import { customContextMenu, computedRectScale, cloneImageNode } from './utils';
@@ -276,7 +276,7 @@ function Picture(_a) {
276
276
  },
277
277
  ref: layoutRef,
278
278
  onContextMenu: customContextMenu
279
- }, /*#__PURE__*/React.createElement(MoveContent, {
279
+ }, /*#__PURE__*/React.createElement(DomMove, {
280
280
  className: "picture-move-layout",
281
281
  disabled: isOpenSelect || disabledDrag,
282
282
  position: {
@@ -5,14 +5,6 @@ declare class Api {
5
5
  container: HTMLElement;
6
6
  constructor(container: HTMLElement);
7
7
  get video(): HTMLVideoElement;
8
- /**
9
- * 全屏
10
- */
11
- requestFullScreen: () => void;
12
- /**
13
- * 退出全屏
14
- */
15
- cancelFullScreen: () => void;
16
8
  play: () => void;
17
9
  pause: () => void;
18
10
  /**
@@ -59,6 +51,7 @@ declare class Api {
59
51
  snapshot: () => string;
60
52
  unload: () => void;
61
53
  reload: () => void;
54
+ toggleFit: () => void;
62
55
  destroy: () => void;
63
56
  }
64
57
  export declare type TypeAndPlay = {
@@ -1,3 +1,5 @@
1
+ import _nextTick from "@cloud-app-dev/utils/es/nextTick";
2
+
1
3
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
4
 
3
5
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -17,7 +19,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
17
19
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
18
20
 
19
21
  import { useEffect, useState } from 'react';
20
- import { fullscreen, isFullscreen, exitFullscreen, createFlvPlayer, createHlsPlayer } from '../util';
22
+ import { createFlvPlayer, createHlsPlayer, tryCatch } from '../util';
21
23
 
22
24
  var Api = /*#__PURE__*/function () {
23
25
  function Api(container) {
@@ -25,29 +27,10 @@ var Api = /*#__PURE__*/function () {
25
27
 
26
28
  _classCallCheck(this, Api);
27
29
 
28
- /**
29
- * 全屏
30
- */
31
- this.requestFullScreen = function () {
32
- if (!isFullscreen(_this.container)) {
33
- fullscreen(_this.container);
34
- }
35
- };
36
- /**
37
- * 退出全屏
38
- */
39
-
40
-
41
- this.cancelFullScreen = function () {
42
- if (isFullscreen(_this.container)) {
43
- exitFullscreen();
44
- }
45
- };
46
-
47
30
  this.play = function () {
48
- if (_this.video.paused) {
49
- _this.video.play();
50
- }
31
+ tryCatch(function () {
32
+ return _this.video.play();
33
+ });
51
34
  };
52
35
 
53
36
  this.pause = function () {
@@ -180,6 +163,8 @@ var Api = /*#__PURE__*/function () {
180
163
 
181
164
  this.reload = function () {};
182
165
 
166
+ this.toggleFit = function () {};
167
+
183
168
  this.destroy = function () {
184
169
  _this.container = null;
185
170
  };
@@ -239,24 +224,29 @@ export function useTypeAndPlay(url, type, isLive, container, segments, flvConfig
239
224
  video.setAttribute('src', url);
240
225
  }
241
226
 
242
- try {
243
- video.play();
244
- } catch (_) {}
245
-
227
+ url && video.paused && tryCatch(function () {
228
+ return video.play();
229
+ });
246
230
  setState(options);
247
231
  return function () {
248
232
  if (options.flv) {
249
- options.flv.destroy();
250
- }
251
-
252
- if (options.hls) {
253
- options.hls.destroy();
233
+ options.flv.pause();
234
+ tryCatch(function () {
235
+ return options.flv.destroy();
236
+ });
237
+ } else if (options.hls) {
238
+ video.pause();
239
+ tryCatch(function () {
240
+ return options.hls.destroy();
241
+ });
242
+ } else {
243
+ video.pause();
244
+ video.removeAttribute('src');
254
245
  }
255
246
 
256
- video.removeAttribute('src');
257
247
  setState({});
258
248
  };
259
- }, [url, container, segments, type]);
249
+ }, [url, container, segments, type, isLive, flvConfig, hlsConfig]);
260
250
  return [state.type, state.flv, state.hls];
261
251
  } //创建Api
262
252
 
@@ -276,7 +266,9 @@ export function usePlayerApi(url, type, isLive, container, segments, flvConfig,
276
266
  var api = new Api(container);
277
267
  setApi(api);
278
268
  return function () {
279
- return api.destroy();
269
+ return _nextTick(function () {
270
+ return api.destroy();
271
+ });
280
272
  };
281
273
  }, [container, segments]);
282
274
  return [api, typePlay];
@@ -46,6 +46,7 @@ function LeftBar(_ref) {
46
46
  };
47
47
  }, [event]);
48
48
  var video = container.querySelector('video'); //缓存值
49
+ // eslint-disable-next-line react-hooks/exhaustive-deps
49
50
 
50
51
  var paused = useMemo(function () {
51
52
  return video === null || video === void 0 ? void 0 : video.paused;
@@ -60,7 +61,6 @@ function LeftBar(_ref) {
60
61
  var _useTimes = useTimes(api, event, hideTimeProgress),
61
62
  _useTimes2 = _slicedToArray(_useTimes, 3),
62
63
  current = _useTimes2[0],
63
- _ = _useTimes2[1],
64
64
  duration = _useTimes2[2]; //TODO 方法
65
65
 
66
66
 
@@ -72,7 +72,7 @@ function LeftBar(_ref) {
72
72
  } else {
73
73
  api.pause();
74
74
  }
75
- }, [video, api, isLive]);
75
+ }, [video, api]);
76
76
  return /*#__PURE__*/React.createElement("div", {
77
77
  className: "contraller-left-bar"
78
78
  }, leftExtContents, /*#__PURE__*/React.createElement(Bar, null, /*#__PURE__*/React.createElement(IconFont, {
@@ -9,5 +9,5 @@ interface IRightBarProps {
9
9
  rightExtContents: React.ReactNode;
10
10
  rightMidExtContents: React.ReactNode;
11
11
  }
12
- declare function RightBar({ container, api, rightExtContents, rightMidExtContents }: IRightBarProps): JSX.Element;
12
+ declare function RightBar({ container, rightExtContents, rightMidExtContents }: IRightBarProps): JSX.Element;
13
13
  export default RightBar;
@@ -1,3 +1,5 @@
1
+ import _useFullscreen3 from "ahooks/es/useFullscreen";
2
+
1
3
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
4
 
3
5
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -10,45 +12,29 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
10
12
 
11
13
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
14
 
13
- import React, { useState, useMemo, useEffect, useCallback } from 'react';
15
+ import React from 'react';
14
16
  import IconFont from '../iconfont';
15
17
  import Bar from './bar';
16
- import { isFullscreen } from '../util';
17
18
 
18
19
  function RightBar(_ref) {
19
20
  var container = _ref.container,
20
- api = _ref.api,
21
21
  rightExtContents = _ref.rightExtContents,
22
22
  rightMidExtContents = _ref.rightMidExtContents;
23
23
 
24
- var _useState = useState(Date.now()),
25
- _useState2 = _slicedToArray(_useState, 2),
26
- dep = _useState2[0],
27
- setDep = _useState2[1];
28
-
29
- useEffect(function () {
30
- var update = function update() {
31
- return setDep(Date.now());
32
- };
33
-
34
- document.addEventListener('fullscreenchange', update);
35
- return function () {
36
- return document.removeEventListener('fullscreenchange', update);
37
- };
38
- }, []);
39
- var isfull = useMemo(function () {
40
- return isFullscreen(container);
41
- }, [dep, container]);
42
- var fullscreen = useCallback(function () {
43
- !isFullscreen(container) ? api.requestFullScreen() : api.cancelFullScreen();
44
- setDep(Date.now());
45
- }, [api, container]);
24
+ var _useFullscreen = _useFullscreen3(container),
25
+ _useFullscreen2 = _slicedToArray(_useFullscreen, 2),
26
+ isFullScreen = _useFullscreen2[0],
27
+ _useFullscreen2$ = _useFullscreen2[1],
28
+ enterFullscreen = _useFullscreen2$.enterFullscreen,
29
+ exitFullscreen = _useFullscreen2$.exitFullscreen;
30
+
31
+ var fullscreen = isFullScreen ? exitFullscreen : enterFullscreen;
46
32
  return /*#__PURE__*/React.createElement("div", {
47
33
  className: "contraller-right-bar"
48
34
  }, rightMidExtContents, /*#__PURE__*/React.createElement(Bar, null, /*#__PURE__*/React.createElement(IconFont, {
49
- title: isfull ? '窗口' : '全屏',
35
+ title: isFullScreen ? '窗口' : '全屏',
50
36
  onClick: fullscreen,
51
- type: isfull ? 'lm-player-ExitFull_Main' : 'lm-player-Full_Main'
37
+ type: isFullScreen ? 'lm-player-ExitFull_Main' : 'lm-player-Full_Main'
52
38
  })), rightExtContents);
53
39
  }
54
40
 
package/es/Player/demo.js CHANGED
@@ -122,37 +122,29 @@ function Demo1() {
122
122
  }));
123
123
  }
124
124
 
125
+ var begin = Date.now();
126
+
125
127
  function Demo2() {
126
128
  var _useState3 = useState({
127
129
  isLive: 1,
128
130
  segments: [{
129
- duration: 60,
131
+ beginTime: begin,
132
+ endTime: begin + 60 * 1000,
130
133
  url: 'http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4'
131
134
  }, {
132
- duration: 60
135
+ beginTime: begin + 60 * 1000,
136
+ endTime: begin + 2 * 60 * 1000
133
137
  }, {
134
- duration: 60,
138
+ beginTime: begin + 2 * 60 * 1000,
139
+ endTime: begin + 3 * 60 * 1000,
135
140
  url: 'http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4?date=1'
136
141
  }, {
137
- duration: 60
142
+ beginTime: begin + 3 * 60 * 1000,
143
+ endTime: begin + 4 * 60 * 1000
138
144
  }, {
139
- duration: 60,
145
+ beginTime: begin + 4 * 60 * 1000,
146
+ endTime: begin + 5 * 60 * 1000,
140
147
  url: 'http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4?date=2'
141
- }, {
142
- duration: 60
143
- }, {
144
- duration: 60,
145
- url: 'http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4?date=3'
146
- }, {
147
- duration: 60
148
- }, {
149
- duration: 60,
150
- url: 'http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4?date=4'
151
- }, {
152
- duration: 60
153
- }, {
154
- duration: 60,
155
- url: 'http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4?date=5'
156
148
  }],
157
149
  tempUrl: ''
158
150
  }),
@@ -197,7 +189,7 @@ function Demo2() {
197
189
  });
198
190
  }
199
191
  }, "\u64AD\u653E")), /*#__PURE__*/React.createElement(SegmentPlayer, {
200
- begin: Date.now(),
192
+ begin: begin,
201
193
  segments: state.segments,
202
194
  isLive: false
203
195
  }));
@@ -1,3 +1,5 @@
1
+ import _nextTick from "@cloud-app-dev/utils/es/nextTick";
2
+
1
3
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
4
 
3
5
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -119,7 +121,9 @@ export function usePlayerEvent(video) {
119
121
  var event = new VideoEventInstance(video);
120
122
  setEvent(event);
121
123
  return function () {
122
- return event.destroy();
124
+ return _nextTick(function () {
125
+ return event.destroy();
126
+ });
123
127
  };
124
128
  }, [video]);
125
129
  return event;
@@ -5,5 +5,5 @@ import type { IFrontendPlayerProps } from './player';
5
5
  * @param param0
6
6
  * @returns
7
7
  */
8
- declare function FrontendPlayer({ url, begin, end, onSeek, ...props }: IFrontendPlayerProps): JSX.Element;
8
+ declare function FrontendPlayer({ url, begin, end, onSeek, forwordRef, customTimeLine, onCanPlayerInit, ...props }: IFrontendPlayerProps): JSX.Element;
9
9
  export default FrontendPlayer;