@cloud-app-dev/vidc 2.3.0 → 3.0.2

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 (319) hide show
  1. package/.umirc.ts +2 -2
  2. package/es/Config/interface.d.ts +2 -1
  3. package/es/DomMove/demo.d.ts +2 -0
  4. package/es/DomMove/demo.js +16 -0
  5. package/es/DomMove/index.d.ts +16 -0
  6. package/es/DomMove/index.js +145 -0
  7. package/es/DomMove/utils.d.ts +8 -0
  8. package/es/{Picture/component/MoveContent → DomMove}/utils.js +19 -0
  9. package/es/Drawer/index.d.ts +2 -2
  10. package/es/Drawer/interface.d.ts +4 -174
  11. package/es/ErrorBoundary/index.d.ts +18 -0
  12. package/es/ErrorBoundary/index.js +79 -0
  13. package/es/List/DynamicGridList/Demo.js +40 -27
  14. package/es/List/DynamicGridList/index.d.ts +20 -29
  15. package/es/List/DynamicGridList/index.js +40 -63
  16. package/es/List/DynamicList/index.css +15 -0
  17. package/es/List/DynamicList/index.d.ts +14 -0
  18. package/es/List/DynamicList/index.js +105 -0
  19. package/es/List/DynamicList/interface.d.ts +19 -0
  20. package/es/List/DynamicList/utils.d.ts +4 -0
  21. package/es/List/DynamicList/utils.js +6 -0
  22. package/es/List/GridList/Demo.js +27 -4
  23. package/es/List/GridList/index.css +1 -0
  24. package/es/List/GridList/index.d.ts +2 -2
  25. package/es/List/GridList/index.js +8 -12
  26. package/es/List/GridList/interface.d.ts +1 -1
  27. package/es/List/VList/index.js +2 -3
  28. package/es/List/index.css +2 -54
  29. package/es/List/index.d.ts +6 -7
  30. package/es/List/index.js +14 -153
  31. package/es/List/interface.d.ts +3 -61
  32. package/es/LoaderApp/index.d.ts +1 -1
  33. package/es/LoaderApp/index.js +27 -46
  34. package/es/LoaderApp/interface.d.ts +3 -0
  35. package/es/LoaderApp/loader.d.ts +6 -7
  36. package/es/LoaderApp/loader.js +20 -30
  37. package/es/LoaderApp/sandbox.back.d.ts +18 -0
  38. package/es/LoaderApp/sandbox.back.js +356 -0
  39. package/es/LoaderApp/sandbox.d.ts +12 -0
  40. package/es/LoaderApp/sandbox.js +110 -0
  41. package/es/LoaderApp/utils.d.ts +5 -1
  42. package/es/LoaderApp/utils.js +98 -2
  43. package/es/Map/AMap.d.ts +1572 -0
  44. package/es/Map/BasicMap/AMapInstance.d.ts +15 -0
  45. package/es/Map/BasicMap/AMapInstance.js +66 -0
  46. package/es/Map/BasicMap/LeafletInstance.d.ts +15 -0
  47. package/es/Map/BasicMap/LeafletInstance.js +98 -0
  48. package/es/Map/BasicMap/index.css +24 -0
  49. package/es/Map/BasicMap/index.d.ts +9 -0
  50. package/es/Map/BasicMap/index.js +103 -0
  51. package/es/Map/ClusterLayer/hook.d.ts +5 -0
  52. package/es/Map/ClusterLayer/hook.js +144 -0
  53. package/es/Map/ClusterLayer/index.css +26 -0
  54. package/es/Map/ClusterLayer/index.d.ts +5 -0
  55. package/es/Map/ClusterLayer/index.js +31 -0
  56. package/es/Map/ClusterLayer/props.d.ts +8 -0
  57. package/es/Map/Config/index.d.ts +7 -0
  58. package/es/{InitialConfig → Map/Config}/index.js +35 -36
  59. package/es/Map/Config/utils.d.ts +2 -0
  60. package/es/{List/DynamicDeviceList → Map/Config}/utils.js +48 -45
  61. package/es/Map/Context/index.d.ts +11 -0
  62. package/es/Map/Context/index.js +66 -0
  63. package/es/Map/FindPio/index.css +7 -0
  64. package/es/Map/FindPio/index.d.ts +4 -0
  65. package/es/Map/FindPio/index.js +16 -0
  66. package/es/{WorkerFlow/Demo.d.ts → Map/InfoWindow/demo.d.ts} +0 -0
  67. package/es/{List/DynamicDeviceList/Demo.js → Map/InfoWindow/demo.js} +27 -25
  68. package/es/Map/InfoWindow/index.d.ts +8 -0
  69. package/es/Map/InfoWindow/index.js +74 -0
  70. package/es/Map/LevelCenter/DragMarker/index.d.ts +12 -0
  71. package/es/Map/LevelCenter/DragMarker/index.js +48 -0
  72. package/es/{List/DeviceList → Map/LevelCenter}/index.css +0 -0
  73. package/es/Map/LevelCenter/index.d.ts +13 -0
  74. package/es/Map/LevelCenter/index.js +42 -0
  75. package/es/Map/LoaderMap/index.d.ts +12 -0
  76. package/es/Map/LoaderMap/index.js +58 -0
  77. package/es/Map/ResetTools/index.css +32 -0
  78. package/es/Map/ResetTools/index.d.ts +9 -0
  79. package/es/Map/ResetTools/index.js +61 -0
  80. package/es/Map/SinglePoint/Marker/index.d.ts +7 -0
  81. package/es/Map/SinglePoint/Marker/index.js +29 -0
  82. package/es/Map/SinglePoint/icon/Place_icon_OnLine_Hover.svg +15 -0
  83. package/es/Map/SinglePoint/icon/Place_icon_OnLine_Normal.svg +15 -0
  84. package/es/Map/SinglePoint/icon/Place_icon_OutLine_Hover.svg +15 -0
  85. package/es/Map/SinglePoint/icon/Place_icon_OutLine_Normal.svg +15 -0
  86. package/es/Map/SinglePoint/index.css +29 -0
  87. package/es/Map/SinglePoint/index.d.ts +7 -0
  88. package/es/Map/SinglePoint/index.js +32 -0
  89. package/es/Map/hook/useMapType.d.ts +4 -0
  90. package/es/Map/hook/useMapType.js +13 -0
  91. package/es/Map/icon.d.ts +2 -0
  92. package/es/Map/icon.js +10 -0
  93. package/es/Map/index.d.ts +23 -0
  94. package/es/Map/index.js +25 -0
  95. package/es/Map/interface.d.ts +55 -0
  96. package/es/Map/points.json +61247 -0
  97. package/es/{Picture/component/MoveContent → Map/useMarker}/index.css +0 -0
  98. package/es/Map/useMarker/index.d.ts +11 -0
  99. package/es/{WorkerFlow/Form/FormAuth.js → Map/useMarker/index.js} +57 -80
  100. package/es/Map/withMap/index.d.ts +2 -0
  101. package/es/Map/withMap/index.js +12 -0
  102. package/es/Modal/index.js +7 -5
  103. package/es/Picture/component/RectMenu/index.d.ts +1 -1
  104. package/es/Picture/index.d.ts +1 -1
  105. package/es/Picture/index.js +2 -2
  106. package/es/Player/api/index.d.ts +2 -8
  107. package/es/Player/api/index.js +29 -35
  108. package/es/Player/contraller_bar/left_bar.js +2 -2
  109. package/es/Player/contraller_bar/right_bar.d.ts +1 -1
  110. package/es/Player/contraller_bar/right_bar.js +13 -27
  111. package/es/Player/demo.js +21 -24
  112. package/es/Player/event/index.js +5 -1
  113. package/es/Player/frontend_player.d.ts +2 -3
  114. package/es/Player/frontend_player.js +35 -52
  115. package/es/Player/frontend_timeline.d.ts +3 -2
  116. package/es/Player/frontend_timeline.js +20 -9
  117. package/es/Player/live_heart.js +45 -12
  118. package/es/Player/message.js +23 -12
  119. package/es/Player/player.d.ts +29 -7
  120. package/es/Player/segment_player.d.ts +1 -1
  121. package/es/Player/segment_player.js +50 -39
  122. package/es/Player/segment_timeline.js +14 -13
  123. package/es/Player/single_player.js +59 -14
  124. package/es/Player/timeline.js +8 -6
  125. package/es/Player/util.d.ts +4 -25
  126. package/es/Player/util.js +47 -55
  127. package/es/PlayerExt/index.css +2 -2
  128. package/es/PlayerExt/index.d.ts +3 -1
  129. package/es/PlayerExt/index.js +19 -5
  130. package/es/ScreenPlayer/Live.d.ts +5 -0
  131. package/es/ScreenPlayer/Live.js +109 -0
  132. package/es/ScreenPlayer/LiveTools.d.ts +15 -0
  133. package/es/ScreenPlayer/LiveTools.js +95 -0
  134. package/es/ScreenPlayer/PlayerWithExt.d.ts +22 -0
  135. package/es/ScreenPlayer/PlayerWithExt.js +156 -0
  136. package/es/ScreenPlayer/Record.d.ts +5 -0
  137. package/es/{WorkerFlow/index.js → ScreenPlayer/Record.js} +286 -273
  138. package/es/ScreenPlayer/RecordTools.d.ts +17 -0
  139. package/es/ScreenPlayer/RecordTools.js +102 -0
  140. package/es/ScreenPlayer/SegmentTimeLine.d.ts +10 -0
  141. package/es/ScreenPlayer/SegmentTimeLine.js +40 -0
  142. package/es/ScreenPlayer/TimeSlider.d.ts +127 -0
  143. package/es/ScreenPlayer/TimeSlider.js +530 -0
  144. package/es/ScreenPlayer/demo.d.ts +2 -0
  145. package/es/ScreenPlayer/demo.js +25 -0
  146. package/es/ScreenPlayer/demo2.d.ts +2 -0
  147. package/es/ScreenPlayer/demo2.js +153 -0
  148. package/es/ScreenPlayer/index.css +49 -0
  149. package/es/ScreenPlayer/index.d.ts +5 -0
  150. package/es/ScreenPlayer/index.js +8 -0
  151. package/es/ScreenPlayer/interface.d.ts +81 -0
  152. package/es/ScreenPlayer/useRecordList.d.ts +3 -0
  153. package/es/{WorkerFlow/Form/UserAndGroupSelect.js → ScreenPlayer/useRecordList.js} +173 -176
  154. package/es/ScreenPlayer/useVideoFit.d.ts +5 -0
  155. package/es/ScreenPlayer/useVideoFit.js +46 -0
  156. package/es/ScreenPlayer/utils.d.ts +25 -0
  157. package/es/ScreenPlayer/utils.js +84 -0
  158. package/es/Timeout/index.d.ts +33 -0
  159. package/es/Timeout/index.js +83 -0
  160. package/es/Tree/demo.js +9 -12
  161. package/es/Tree/index.css +55 -29
  162. package/es/Tree/index.d.ts +20 -19
  163. package/es/Tree/index.js +70 -185
  164. package/es/index.d.ts +8 -9
  165. package/es/index.js +8 -9
  166. package/es/useInfiniteScroll/index.d.ts +16 -0
  167. package/es/{useHttp → useInfiniteScroll}/index.js +79 -43
  168. package/es/useVirtualList/index.d.ts +13 -0
  169. package/es/useVirtualList/index.js +175 -0
  170. package/es/withErrorBoundary/index.d.ts +9 -0
  171. package/es/withErrorBoundary/index.js +45 -0
  172. package/package.json +18 -21
  173. package/release-build.sh +44 -0
  174. package/test.js +48 -0
  175. package/es/DeviceIcon/icon.d.ts +0 -9
  176. package/es/DeviceIcon/icon.js +0 -138
  177. package/es/DeviceIcon/index.css +0 -8
  178. package/es/DeviceIcon/index.d.ts +0 -14
  179. package/es/DeviceIcon/index.js +0 -37
  180. package/es/DeviceSelect/TreeType.d.ts +0 -7
  181. package/es/DeviceSelect/TreeType.js +0 -36
  182. package/es/DeviceSelect/demo.d.ts +0 -3
  183. package/es/DeviceSelect/demo.js +0 -22
  184. package/es/DeviceSelect/index.css +0 -11
  185. package/es/DeviceSelect/index.d.ts +0 -13
  186. package/es/DeviceSelect/index.js +0 -191
  187. package/es/Dict/cache.d.ts +0 -3
  188. package/es/Dict/cache.js +0 -21
  189. package/es/Dict/device.d.ts +0 -28
  190. package/es/Dict/device.js +0 -117
  191. package/es/Dict/hook.d.ts +0 -3
  192. package/es/Dict/hook.js +0 -98
  193. package/es/Dict/index.d.ts +0 -9
  194. package/es/Dict/index.js +0 -10
  195. package/es/Dict/interface.d.ts +0 -16
  196. package/es/Dict/utils.d.ts +0 -10
  197. package/es/Dict/utils.js +0 -44
  198. package/es/InitialConfig/index.d.ts +0 -8
  199. package/es/InitialConfig/utils.d.ts +0 -20
  200. package/es/InitialConfig/utils.js +0 -110
  201. package/es/InitialRequest/index.d.ts +0 -9
  202. package/es/InitialRequest/index.js +0 -97
  203. package/es/InitialRequest/utils.d.ts +0 -10
  204. package/es/InitialRequest/utils.js +0 -116
  205. package/es/List/CheckExt.d.ts +0 -9
  206. package/es/List/CheckExt.js +0 -36
  207. package/es/List/DeviceList/index.d.ts +0 -11
  208. package/es/List/DeviceList/index.js +0 -50
  209. package/es/List/DynamicDeviceList/Demo.d.ts +0 -3
  210. package/es/List/DynamicDeviceList/index.css +0 -39
  211. package/es/List/DynamicDeviceList/index.d.ts +0 -12
  212. package/es/List/DynamicDeviceList/index.js +0 -205
  213. package/es/List/DynamicDeviceList/interface.d.ts +0 -37
  214. package/es/List/DynamicDeviceList/utils.d.ts +0 -16
  215. package/es/List/ListExt/index.css +0 -3
  216. package/es/List/ListExt/index.d.ts +0 -19
  217. package/es/List/ListExt/index.js +0 -44
  218. package/es/Picture/component/MoveContent/index.d.ts +0 -39
  219. package/es/Picture/component/MoveContent/index.js +0 -244
  220. package/es/Picture/component/MoveContent/utils.d.ts +0 -4
  221. package/es/Title/index.css +0 -25
  222. package/es/Title/index.d.ts +0 -12
  223. package/es/Title/index.js +0 -30
  224. package/es/Tree/BaseTree/index.css +0 -64
  225. package/es/Tree/BaseTree/index.d.ts +0 -24
  226. package/es/Tree/BaseTree/index.js +0 -83
  227. package/es/UserSelect/demo.d.ts +0 -3
  228. package/es/UserSelect/demo.js +0 -21
  229. package/es/UserSelect/index.css +0 -16
  230. package/es/UserSelect/index.d.ts +0 -18
  231. package/es/UserSelect/index.js +0 -194
  232. package/es/WorkerFlow/Demo.js +0 -57
  233. package/es/WorkerFlow/Form/Approver.d.ts +0 -10
  234. package/es/WorkerFlow/Form/Approver.js +0 -33
  235. package/es/WorkerFlow/Form/Condition.d.ts +0 -11
  236. package/es/WorkerFlow/Form/Condition.js +0 -235
  237. package/es/WorkerFlow/Form/EmptyUserSet.d.ts +0 -8
  238. package/es/WorkerFlow/Form/EmptyUserSet.js +0 -137
  239. package/es/WorkerFlow/Form/FormAuth.d.ts +0 -8
  240. package/es/WorkerFlow/Form/GroupList.d.ts +0 -12
  241. package/es/WorkerFlow/Form/GroupList.js +0 -44
  242. package/es/WorkerFlow/Form/GroupSelect.d.ts +0 -8
  243. package/es/WorkerFlow/Form/GroupSelect.js +0 -167
  244. package/es/WorkerFlow/Form/GroupSelectModalContent.d.ts +0 -6
  245. package/es/WorkerFlow/Form/GroupSelectModalContent.js +0 -177
  246. package/es/WorkerFlow/Form/Handle.d.ts +0 -10
  247. package/es/WorkerFlow/Form/Handle.js +0 -33
  248. package/es/WorkerFlow/Form/LevelGroupSelect.d.ts +0 -12
  249. package/es/WorkerFlow/Form/LevelGroupSelect.js +0 -208
  250. package/es/WorkerFlow/Form/Notifier.d.ts +0 -8
  251. package/es/WorkerFlow/Form/Notifier.js +0 -16
  252. package/es/WorkerFlow/Form/UserAndGroupSelect.d.ts +0 -8
  253. package/es/WorkerFlow/Form/UserSelect.d.ts +0 -8
  254. package/es/WorkerFlow/Form/UserSelect.js +0 -150
  255. package/es/WorkerFlow/Form/UserSelectModalContent.d.ts +0 -6
  256. package/es/WorkerFlow/Form/UserSelectModalContent.js +0 -166
  257. package/es/WorkerFlow/Form/UserSet.d.ts +0 -14
  258. package/es/WorkerFlow/Form/UserSet.js +0 -308
  259. package/es/WorkerFlow/Form/UsersHandleType.d.ts +0 -7
  260. package/es/WorkerFlow/Form/UsersHandleType.js +0 -32
  261. package/es/WorkerFlow/Form/utils.d.ts +0 -3
  262. package/es/WorkerFlow/Form/utils.js +0 -47
  263. package/es/WorkerFlow/Nodes/Add.d.ts +0 -7
  264. package/es/WorkerFlow/Nodes/Add.js +0 -98
  265. package/es/WorkerFlow/Nodes/AddOption.d.ts +0 -10
  266. package/es/WorkerFlow/Nodes/AddOption.js +0 -23
  267. package/es/WorkerFlow/Nodes/AddOptionList.d.ts +0 -8
  268. package/es/WorkerFlow/Nodes/AddOptionList.js +0 -46
  269. package/es/WorkerFlow/Nodes/Approver.d.ts +0 -11
  270. package/es/WorkerFlow/Nodes/Approver.js +0 -53
  271. package/es/WorkerFlow/Nodes/Condition.d.ts +0 -10
  272. package/es/WorkerFlow/Nodes/Condition.js +0 -140
  273. package/es/WorkerFlow/Nodes/Constants.d.ts +0 -35
  274. package/es/WorkerFlow/Nodes/Constants.js +0 -150
  275. package/es/WorkerFlow/Nodes/End.d.ts +0 -7
  276. package/es/WorkerFlow/Nodes/End.js +0 -16
  277. package/es/WorkerFlow/Nodes/Handle.d.ts +0 -11
  278. package/es/WorkerFlow/Nodes/Handle.js +0 -52
  279. package/es/WorkerFlow/Nodes/Node.d.ts +0 -8
  280. package/es/WorkerFlow/Nodes/Node.js +0 -26
  281. package/es/WorkerFlow/Nodes/Notifier.d.ts +0 -11
  282. package/es/WorkerFlow/Nodes/Notifier.js +0 -52
  283. package/es/WorkerFlow/Nodes/Render.d.ts +0 -8
  284. package/es/WorkerFlow/Nodes/Render.js +0 -16
  285. package/es/WorkerFlow/Nodes/Start.d.ts +0 -12
  286. package/es/WorkerFlow/Nodes/Start.js +0 -26
  287. package/es/WorkerFlow/Nodes/TitleElement.d.ts +0 -10
  288. package/es/WorkerFlow/Nodes/TitleElement.js +0 -127
  289. package/es/WorkerFlow/Nodes/Wrap.d.ts +0 -13
  290. package/es/WorkerFlow/Nodes/Wrap.js +0 -35
  291. package/es/WorkerFlow/OperatorContext.d.ts +0 -4
  292. package/es/WorkerFlow/OperatorContext.js +0 -3
  293. package/es/WorkerFlow/Tools.d.ts +0 -8
  294. package/es/WorkerFlow/Tools.js +0 -78
  295. package/es/WorkerFlow/XML/CanvasTag.d.ts +0 -3
  296. package/es/WorkerFlow/XML/CanvasTag.js +0 -142
  297. package/es/WorkerFlow/XML/EndEvent.d.ts +0 -1
  298. package/es/WorkerFlow/XML/EndEvent.js +0 -14
  299. package/es/WorkerFlow/XML/ExclusiveGateway.d.ts +0 -9
  300. package/es/WorkerFlow/XML/ExclusiveGateway.js +0 -101
  301. package/es/WorkerFlow/XML/Root.d.ts +0 -1
  302. package/es/WorkerFlow/XML/Root.js +0 -5
  303. package/es/WorkerFlow/XML/StartEvent.d.ts +0 -5
  304. package/es/WorkerFlow/XML/StartEvent.js +0 -28
  305. package/es/WorkerFlow/XML/UserTask.d.ts +0 -5
  306. package/es/WorkerFlow/XML/UserTask.js +0 -93
  307. package/es/WorkerFlow/XML/index.d.ts +0 -4
  308. package/es/WorkerFlow/XML/index.js +0 -100
  309. package/es/WorkerFlow/XML/utils.d.ts +0 -6
  310. package/es/WorkerFlow/XML/utils.js +0 -97
  311. package/es/WorkerFlow/data.json +0 -83
  312. package/es/WorkerFlow/index.css +0 -779
  313. package/es/WorkerFlow/index.d.ts +0 -13
  314. package/es/WorkerFlow/interface.d.ts +0 -93
  315. package/es/WorkerFlow/template.d.ts +0 -2
  316. package/es/WorkerFlow/template.js +0 -17
  317. package/es/WorkerFlow/utils.d.ts +0 -14
  318. package/es/WorkerFlow/utils.js +0 -212
  319. package/es/useHttp/index.d.ts +0 -8
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- interface ICheckExtProps {
3
- selectCount: number;
4
- count: number;
5
- onCheck: () => void;
6
- onCancel: () => void;
7
- }
8
- declare function CheckExt({ selectCount, onCheck, count, onCancel }: ICheckExtProps): JSX.Element;
9
- export default CheckExt;
@@ -1,36 +0,0 @@
1
- import "antd/lib/tooltip/style";
2
- import _Tooltip from "antd/lib/tooltip";
3
- import React from 'react';
4
- import IconFont from '../IconFont';
5
-
6
- function CheckExt(_ref) {
7
- var selectCount = _ref.selectCount,
8
- onCheck = _ref.onCheck,
9
- count = _ref.count,
10
- onCancel = _ref.onCancel;
11
- return /*#__PURE__*/React.createElement("div", {
12
- className: "cloudapp-c-check-list-checkext"
13
- }, /*#__PURE__*/React.createElement("span", {
14
- className: "select-group"
15
- }, /*#__PURE__*/React.createElement(_Tooltip, {
16
- title: "\u9009\u4E2D\u6240\u6709\u5DF2\u52A0\u8F7D"
17
- }, /*#__PURE__*/React.createElement(IconFont, {
18
- type: "icon-S_Photo_MarkYes",
19
- onClick: onCheck
20
- })), /*#__PURE__*/React.createElement(_Tooltip, {
21
- title: "\u53D6\u6D88\u9009\u4E2D\u6240\u6709\u5DF2\u52A0\u8F7D\u9879"
22
- }, /*#__PURE__*/React.createElement(IconFont, {
23
- type: "icon-MarkNo",
24
- onClick: onCancel
25
- }))), /*#__PURE__*/React.createElement("span", null, "\u5DF2\u9009 ", /*#__PURE__*/React.createElement("span", {
26
- style: {
27
- color: 'var(--success)'
28
- }
29
- }, selectCount), " / \u603B\u6570 ", /*#__PURE__*/React.createElement("span", {
30
- style: {
31
- color: 'var(--primary)'
32
- }
33
- }, count)));
34
- }
35
-
36
- export default CheckExt;
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import { IListProps } from '../ListExt';
3
- import { DeviceItemType } from '../../core';
4
- import './index.less';
5
- interface DeviceListProps extends Exclude<IListProps<DeviceItemType>, 'list' | 'itemKey' | 'itemNameKey' | 'whatIcon' | 'inputPlaceholder' | 'rowHeight'> {
6
- deviceList?: Array<DeviceItemType>;
7
- deleteItem?: (item: DeviceItemType) => void;
8
- getIconStyle?: (item: DeviceItemType) => React.CSSProperties;
9
- }
10
- declare function DeviceList({ getIconStyle, className, deleteItem, deviceList, renderItemExt, ...props }: DeviceListProps): JSX.Element;
11
- export default DeviceList;
@@ -1,50 +0,0 @@
1
- import { __rest } from "tslib";
2
- import React, { useCallback } from 'react';
3
- import List from '../ListExt';
4
- import IconFont from '../../IconFont';
5
- import DeviceIcon from '../../DeviceIcon';
6
- import "./index.css";
7
-
8
- function DeviceList(_a) {
9
- var getIconStyle = _a.getIconStyle,
10
- className = _a.className,
11
- deleteItem = _a.deleteItem,
12
- deviceList = _a.deviceList,
13
- _renderItemExt = _a.renderItemExt,
14
- props = __rest(_a, ["getIconStyle", "className", "deleteItem", "deviceList", "renderItemExt"]);
15
-
16
- var whatIcon = useCallback(function (item) {
17
- return /*#__PURE__*/React.createElement(DeviceIcon, {
18
- style: getIconStyle ? getIconStyle(item) : undefined,
19
- type: item.deviceType,
20
- status: item.deviceStatus
21
- });
22
- }, [getIconStyle]);
23
- var deleteItemAction = useCallback(function (item, e) {
24
- e.stopPropagation();
25
- e.preventDefault();
26
- deleteItem && deleteItem(item);
27
- }, []);
28
- return /*#__PURE__*/React.createElement(List, Object.assign({}, props, {
29
- className: "lm-c-device-list-wrapper ".concat(className),
30
- list: deviceList,
31
- itemNameKey: "deviceName",
32
- itemKey: "cid",
33
- rowHeight: 30,
34
- inputPlaceholder: "\u8BF7\u8F93\u5165\u8BBE\u5907\u540D\u79F0",
35
- whatIcon: whatIcon,
36
- renderItemExt: function renderItemExt(item) {
37
- return _renderItemExt ? _renderItemExt(item) : deleteItem ? /*#__PURE__*/React.createElement("span", {
38
- className: "clear-item",
39
- onClick: function onClick(e) {
40
- return deleteItemAction(item, e);
41
- }
42
- }, /*#__PURE__*/React.createElement(IconFont, {
43
- type: "icon-S_Edit_LineClose",
44
- title: "\u5220\u9664"
45
- })) : undefined;
46
- }
47
- }));
48
- }
49
-
50
- export default DeviceList;
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- declare function App(): JSX.Element;
3
- export default App;
@@ -1,39 +0,0 @@
1
- .zenview-c-dynamic-device-list-layout {
2
- display: flex;
3
- flex-direction: column;
4
- width: 100%;
5
- height: 100%;
6
- border: 1px solid var(--gray2);
7
- }
8
- .zenview-c-dynamic-device-list-layout .dynamic-list-item {
9
- padding: 0 10px;
10
- }
11
- .zenview-c-dynamic-device-list-layout .zenview-c-dynamic-device-box {
12
- flex: 1;
13
- overflow: auto;
14
- contain: strict;
15
- }
16
- .zenview-c-dynamic-device-list-layout .device-item-box {
17
- height: 40px;
18
- line-height: 40px;
19
- display: flex;
20
- padding: 0 10px;
21
- }
22
- .zenview-c-dynamic-device-list-layout .device-item-box .device-name {
23
- flex: 1;
24
- overflow: hidden;
25
- text-overflow: ellipsis;
26
- white-space: nowrap;
27
- }
28
- .zenview-c-dynamic-device-list-layout .device-item-box .device-name .anticon {
29
- padding-right: 4px;
30
- }
31
- .zenview-c-dynamic-device-list-layout .device-item-box .device-name.device-checkbox-name {
32
- display: flex;
33
- }
34
- .zenview-c-dynamic-device-list-layout .device-item-box .device-name.device-checkbox-name .cloudapp-checkbox + span {
35
- flex: 1;
36
- overflow: hidden;
37
- text-overflow: ellipsis;
38
- white-space: nowrap;
39
- }
@@ -1,12 +0,0 @@
1
- /// <reference types="react" />
2
- import { IDynamicDeviceListProps } from './interface';
3
- import './index.less';
4
- declare function DynamicDeviceList({ onClick, checkedKeys, defaultCheckedIds, onChecked, params, title, onKeywordChange, limit, itemHeight }: IDynamicDeviceListProps): JSX.Element;
5
- declare namespace DynamicDeviceList {
6
- var defaultProps: {
7
- limit: number;
8
- itemHeight: number;
9
- params: {};
10
- };
11
- }
12
- export default DynamicDeviceList;
@@ -1,205 +0,0 @@
1
- import "antd/lib/skeleton/style";
2
- import _Skeleton from "antd/lib/skeleton";
3
- import "antd/lib/checkbox/style";
4
- import _Checkbox from "antd/lib/checkbox";
5
- import _useMemoizedFn from "ahooks/es/useMemoizedFn";
6
- import _useUpdateEffect from "ahooks/es/useUpdateEffect";
7
- import _useVirtualList3 from "ahooks/es/useVirtualList";
8
- import _useInfiniteScroll2 from "ahooks/es/useInfiniteScroll";
9
-
10
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
11
-
12
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
13
-
14
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
15
-
16
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
17
-
18
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
19
-
20
- 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."); }
21
-
22
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
23
-
24
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
25
-
26
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
27
-
28
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
29
-
30
- import React, { useCallback, useMemo, useRef, useState } from 'react';
31
- import DeviceIcon from '../../DeviceIcon';
32
- import Title from '../../Title';
33
- import CheckExt from '../CheckExt';
34
- import { loadNextPage, LIMIT, skeletonList } from './utils';
35
- import "./index.css";
36
-
37
- function DynamicDeviceList(_ref) {
38
- var onClick = _ref.onClick,
39
- checkedKeys = _ref.checkedKeys,
40
- defaultCheckedIds = _ref.defaultCheckedIds,
41
- onChecked = _ref.onChecked,
42
- params = _ref.params,
43
- title = _ref.title,
44
- onKeywordChange = _ref.onKeywordChange,
45
- limit = _ref.limit,
46
- itemHeight = _ref.itemHeight;
47
-
48
- var _useState = useState({
49
- checkedKeys: defaultCheckedIds || checkedKeys || []
50
- }),
51
- _useState2 = _slicedToArray(_useState, 2),
52
- state = _useState2[0],
53
- setState = _useState2[1];
54
-
55
- var containerRef = useRef();
56
- var wrapperRef = useRef();
57
-
58
- var _useInfiniteScroll = _useInfiniteScroll2(function (d) {
59
- return loadNextPage(d, limit, params);
60
- }, {
61
- target: containerRef,
62
- threshold: 50,
63
- isNoMore: function isNoMore(d) {
64
- var _a;
65
-
66
- return ((_a = d === null || d === void 0 ? void 0 : d.list) === null || _a === void 0 ? void 0 : _a.length) >= (d === null || d === void 0 ? void 0 : d.count);
67
- },
68
- reloadDeps: [params.placeIds, params.buzGroupId]
69
- }),
70
- data = _useInfiniteScroll.data,
71
- loadingMore = _useInfiniteScroll.loadingMore,
72
- noMore = _useInfiniteScroll.noMore;
73
-
74
- var isSkeleton = useMemo(function () {
75
- return !noMore && loadingMore;
76
- }, [noMore, loadingMore]);
77
- var dataList = useMemo(function () {
78
- return data ? (data === null || data === void 0 ? void 0 : data.list) || [] : [];
79
- }, [data]);
80
-
81
- var _useVirtualList = _useVirtualList3(dataList, {
82
- containerTarget: containerRef,
83
- wrapperTarget: wrapperRef,
84
- itemHeight: itemHeight,
85
- overscan: 10
86
- }),
87
- _useVirtualList2 = _slicedToArray(_useVirtualList, 2),
88
- list = _useVirtualList2[0],
89
- scrollTo = _useVirtualList2[1];
90
- /**
91
- * 列表选中处理
92
- */
93
-
94
-
95
- var onCheckedAction = useCallback(function (item) {
96
- var ids = state.checkedKeys || [];
97
- var id = item.cid;
98
- var checked = !ids.includes(item.cid);
99
-
100
- if (checked) {
101
- ids.push(id);
102
- } else {
103
- ids = ids.filter(function (v) {
104
- return v !== id;
105
- });
106
- }
107
-
108
- setState(function (old) {
109
- return Object.assign(Object.assign({}, old), {
110
- checkedKeys: _toConsumableArray(ids)
111
- });
112
- });
113
- onChecked && onChecked(ids, [item], checked);
114
- }, // eslint-disable-next-line react-hooks/exhaustive-deps
115
- [state.checkedKeys]);
116
-
117
- _useUpdateEffect(function () {
118
- return scrollTo(0);
119
- }, [params.placeIds, params.buzGroupId]);
120
-
121
- var onSelectAll = _useMemoizedFn(function () {
122
- var ids = dataList.map(function (v) {
123
- return v.cid;
124
- });
125
- setState(function (old) {
126
- return Object.assign(Object.assign({}, old), {
127
- checkedKeys: ids
128
- });
129
- });
130
- onChecked && onChecked(ids, dataList, true);
131
- });
132
-
133
- var onCancelAll = function onCancelAll() {
134
- setState(function (old) {
135
- return Object.assign(Object.assign({}, old), {
136
- checkedKeys: []
137
- });
138
- });
139
- onChecked && onChecked([], [], false);
140
- };
141
-
142
- return /*#__PURE__*/React.createElement("div", {
143
- className: "zenview-c-dynamic-device-list-layout"
144
- }, /*#__PURE__*/React.createElement(Title, {
145
- title: title,
146
- onChange: onKeywordChange,
147
- inputPlaceholder: "\u8BF7\u8F93\u5165\u8BBE\u5907\u540D\u79F0"
148
- }), onChecked && /*#__PURE__*/React.createElement(CheckExt, {
149
- count: data === null || data === void 0 ? void 0 : data.count,
150
- selectCount: state.checkedKeys.length,
151
- onCancel: onCancelAll,
152
- onCheck: onSelectAll
153
- }), /*#__PURE__*/React.createElement("div", {
154
- className: "zenview-c-dynamic-device-box",
155
- ref: containerRef
156
- }, /*#__PURE__*/React.createElement("div", {
157
- ref: wrapperRef
158
- }, list.map(function (item) {
159
- return /*#__PURE__*/React.createElement("div", {
160
- key: item.index,
161
- className: "device-item-box ".concat(state.checkedKeys.includes(item.data.cid) ? 'device-item-selected' : '')
162
- }, onChecked ? /*#__PURE__*/React.createElement(_Checkbox, {
163
- className: "device-name device-checkbox-name",
164
- checked: state.checkedKeys.includes(item.data.cid),
165
- value: item.data.cid,
166
- onClick: function onClick() {
167
- return onCheckedAction(item.data);
168
- }
169
- }, /*#__PURE__*/React.createElement(DeviceIcon, {
170
- type: item.data.deviceType,
171
- status: item.data.deviceStatus
172
- }), /*#__PURE__*/React.createElement("span", {
173
- title: item.data.deviceName
174
- }, item.data.deviceName)) : /*#__PURE__*/React.createElement("span", {
175
- className: "device-name",
176
- onClick: onClick ? function () {
177
- return onClick(item);
178
- } : undefined
179
- }, /*#__PURE__*/React.createElement(DeviceIcon, {
180
- type: item.data.deviceType,
181
- status: item.data.deviceStatus
182
- }), /*#__PURE__*/React.createElement("span", {
183
- title: item.data.deviceName
184
- }, item.data.deviceName)));
185
- })), isSkeleton && skeletonList.map(function (_, index) {
186
- return /*#__PURE__*/React.createElement("div", {
187
- key: index,
188
- style: {
189
- padding: '0 10px'
190
- },
191
- className: "dynamic-list-item"
192
- }, /*#__PURE__*/React.createElement(_Skeleton, {
193
- paragraph: false,
194
- loading: true,
195
- active: true
196
- }));
197
- })));
198
- }
199
-
200
- DynamicDeviceList.defaultProps = {
201
- limit: LIMIT,
202
- itemHeight: 40,
203
- params: {}
204
- };
205
- export default DynamicDeviceList;
@@ -1,37 +0,0 @@
1
- export interface IDynamicDeviceListProps {
2
- /**
3
- * @description 列表点击事件
4
- */
5
- onClick?: (item: DeviceItemType) => void;
6
-
7
- /**
8
- * @description 选中设备cid集合
9
- */
10
- checkedKeys?: string[];
11
-
12
- /**
13
- * @description 传入onSelect列表默认渲染为checkbox模式
14
- */
15
- onChecked?: (ids: string[], list: DeviceItemType[], checked: boolean) => void;
16
-
17
- /**
18
- * @description 传入queryList需要的参数,例如业务树ID,场所id等,分页参数除外
19
- */
20
- params?: { [key: string]: any };
21
-
22
- title?: string;
23
-
24
- onKeywordChange?: (v: string) => void;
25
-
26
- defaultCheckedIds?: string[];
27
-
28
- limit?: number;
29
-
30
- itemHeight?: number;
31
- }
32
-
33
- export interface IDynamicDeviceListResult<T> {
34
- list: T[];
35
- offset: number;
36
- [key: string]: any;
37
- }
@@ -1,16 +0,0 @@
1
- import { DeviceItemType, HttpPageResult2 } from '../../core';
2
- import { IDynamicDeviceListResult } from './interface';
3
- export declare function queryDeviceList(params?: any): Promise<HttpPageResult2<DeviceItemType>>;
4
- export declare const LIMIT = 30;
5
- /**
6
- * @desc 懒加载方法
7
- */
8
- export declare const loadNextPage: (d?: IDynamicDeviceListResult<DeviceItemType>, defaultLimit?: number, params?: any) => Promise<{
9
- list: DeviceItemType[];
10
- count: number;
11
- offset: number;
12
- limit: number;
13
- }>;
14
- export declare const skeletonList: {
15
- skeleton: boolean;
16
- }[];
@@ -1,3 +0,0 @@
1
- .vidc-list-component {
2
- margin-left: -1px;
3
- }
@@ -1,19 +0,0 @@
1
- import React from 'react';
2
- import { CheckListProps } from '../interface';
3
- import './index.less';
4
- export interface IListProps<T> extends CheckListProps<T>, IListExtProps {
5
- }
6
- export interface IListExtProps {
7
- title?: string;
8
- titleExt?: React.ReactNode;
9
- inputPlaceholder?: string;
10
- onKeywordChange?: (key: string) => void;
11
- }
12
- declare function ListExt<T>({ onKeywordChange, title, inputPlaceholder, titleExt, className, ...props }: IListProps<T>): JSX.Element;
13
- declare namespace ListExt {
14
- var defaultProps: {
15
- inputPlaceholder: string;
16
- title: string;
17
- };
18
- }
19
- export default ListExt;
@@ -1,44 +0,0 @@
1
- import { __rest } from "tslib";
2
- import React from 'react';
3
- import List from '../index';
4
- import Title from '../../Title';
5
- import "./index.css";
6
-
7
- function ListExt(_a) {
8
- var onKeywordChange = _a.onKeywordChange,
9
- title = _a.title,
10
- inputPlaceholder = _a.inputPlaceholder,
11
- titleExt = _a.titleExt,
12
- className = _a.className,
13
- props = __rest(_a, ["onKeywordChange", "title", "inputPlaceholder", "titleExt", "className"]);
14
-
15
- return /*#__PURE__*/React.createElement(List, Object.assign({}, props, {
16
- className: "".concat(className, " vidc-list-component"),
17
- checkExt: /*#__PURE__*/React.createElement(ListExtTitle, {
18
- titleExt: titleExt,
19
- onKeywordChange: onKeywordChange,
20
- inputPlaceholder: inputPlaceholder,
21
- title: title
22
- })
23
- }));
24
- }
25
-
26
- function ListExtTitle(_ref) {
27
- var title = _ref.title,
28
- inputPlaceholder = _ref.inputPlaceholder,
29
- onKeywordChange = _ref.onKeywordChange,
30
- titleExt = _ref.titleExt;
31
- return /*#__PURE__*/React.createElement(Title, {
32
- title: title,
33
- inputPlaceholder: inputPlaceholder,
34
- onChange: onKeywordChange,
35
- hasInput: !!onKeywordChange,
36
- titleExt: titleExt
37
- });
38
- }
39
-
40
- ListExt.defaultProps = {
41
- inputPlaceholder: '请输入关键字搜索',
42
- title: '列表'
43
- };
44
- export default ListExt;
@@ -1,39 +0,0 @@
1
- import React from 'react';
2
- import { DeviationType, PositionType, SizeType } from '../../interface';
3
- import './index.less';
4
- interface MoveContentProps {
5
- children: React.ReactNode;
6
- onDrag?: (e: React.MouseEvent, position: PositionType) => void;
7
- onDragChange?: (position: PositionType) => void;
8
- onDragEnd?: (e: React.MouseEvent, position: PositionType) => void;
9
- position?: PositionType;
10
- size?: SizeType;
11
- disabled?: boolean;
12
- className?: string;
13
- style?: React.CSSProperties;
14
- }
15
- declare class MoveContentView extends React.Component<MoveContentProps> {
16
- position: PositionType;
17
- DA: PositionType;
18
- moveEvents: any[];
19
- isDrag: boolean;
20
- dragRef: React.RefObject<HTMLElement>;
21
- deviation: DeviationType;
22
- constructor(props: MoveContentProps);
23
- componentDidMount(): void;
24
- initDomInfo(info?: SizeType): void;
25
- componentWillUnmount(): void;
26
- bindMoveEvent(): void;
27
- removeMoveEvent(): void;
28
- onMouseMove: (event: React.MouseEvent) => void;
29
- updatePosition: ({ x, y }: PositionType) => void;
30
- updateSize: ({ width, height }: SizeType) => void;
31
- onMouseUp: (event: React.MouseEvent) => void;
32
- onMouseDown(event: React.MouseEvent): void;
33
- getMouseXY(e: MouseEvent): {
34
- x: number;
35
- y: number;
36
- };
37
- render(): JSX.Element;
38
- }
39
- export default MoveContentView;