@cloud-app-dev/vidc 4.0.15 → 4.1.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 (329) hide show
  1. package/.dumirc.ts +2 -18
  2. package/.eslintrc.js +3 -0
  3. package/.fatherrc.ts +0 -7
  4. package/es/AppContext/Sync.d.ts +1 -2
  5. package/es/AppContext/index.d.ts +10 -3
  6. package/es/AppContext/index.js +14 -4
  7. package/es/AppContext/interface.d.ts +1 -0
  8. package/es/CheckGroupFixed/demo.d.ts +1 -2
  9. package/es/CheckGroupFixed/demo.js +7 -12
  10. package/es/CheckGroupFixed/index.d.ts +7 -3
  11. package/es/CheckGroupFixed/index.js +9 -9
  12. package/es/CheckGroupFixed/style.d.ts +6 -0
  13. package/es/CheckGroupFixed/style.js +9 -0
  14. package/es/Config/index.js +1 -1
  15. package/es/CustomRenderSelect/index.d.ts +3 -2
  16. package/es/CustomRenderSelect/index.js +13 -10
  17. package/es/DBTools/index.js +1 -2
  18. package/es/DisableMark/index.d.ts +1 -2
  19. package/es/DisableMark/index.js +5 -2
  20. package/es/DomMove/demo.d.ts +1 -2
  21. package/es/DomMove/demo.js +0 -1
  22. package/es/DomMove/index.js +7 -8
  23. package/es/DynamicGridList/demo.d.ts +2 -0
  24. package/es/DynamicGridList/index.d.ts +1 -1
  25. package/es/DynamicGridList/index.js +3 -3
  26. package/es/DynamicList/demo.d.ts +1 -2
  27. package/es/DynamicList/demo.js +14 -19
  28. package/es/DynamicList/index.d.ts +1 -2
  29. package/es/DynamicList/index.js +10 -8
  30. package/es/ErrorFallback/index.d.ts +1 -2
  31. package/es/EventTools/index.d.ts +1 -1
  32. package/es/GridList/demo.d.ts +2 -0
  33. package/es/GridList/{Demo.js → demo.js} +1 -1
  34. package/es/GridList/hook.js +2 -2
  35. package/es/GridList/index.d.ts +0 -1
  36. package/es/GridList/index.js +5 -2
  37. package/es/HightLevel/index.d.ts +1 -2
  38. package/es/HightLevel/index.js +2 -3
  39. package/es/IconFont/index.d.ts +1 -1
  40. package/es/LabelValue/index.d.ts +1 -2
  41. package/es/LabelValue/index.js +5 -2
  42. package/es/List/demo.d.ts +1 -2
  43. package/es/List/demo.js +1 -2
  44. package/es/List/index.d.ts +2 -3
  45. package/es/List/index.js +25 -17
  46. package/es/ListWithSizeAnimate/demo.d.ts +1 -2
  47. package/es/ListWithSizeAnimate/index.d.ts +0 -1
  48. package/es/ListWithSizeAnimate/index.js +19 -10
  49. package/es/LoaderScript/index.d.ts +1 -1
  50. package/es/Picture/component/DefaultRects/RectInfo.d.ts +1 -2
  51. package/es/Picture/component/DefaultRects/RectInfo.js +6 -4
  52. package/es/Picture/component/DefaultRects/index.d.ts +1 -3
  53. package/es/Picture/component/DefaultRects/index.js +5 -5
  54. package/es/Picture/component/DefaultRects/style.d.ts +10 -0
  55. package/es/Picture/component/DefaultRects/style.js +28 -0
  56. package/es/Picture/component/DrawRect/index.d.ts +1 -3
  57. package/es/Picture/component/DrawRect/index.js +6 -3
  58. package/es/Picture/component/RectMenu/index.d.ts +1 -3
  59. package/es/Picture/component/RectMenu/index.js +13 -8
  60. package/es/Picture/component/Tools/index.d.ts +1 -2
  61. package/es/Picture/component/Tools/index.js +21 -9
  62. package/es/Picture/component/Tools/style.d.ts +2 -0
  63. package/es/Picture/component/Tools/style.js +5 -0
  64. package/es/Picture/component/WheelScale/index.d.ts +1 -2
  65. package/es/Picture/demo.d.ts +1 -2
  66. package/es/Picture/demo.js +1 -1
  67. package/es/Picture/index.d.ts +1 -3
  68. package/es/Picture/index.js +21 -19
  69. package/es/Picture/useDraw.js +4 -4
  70. package/es/Player/api/index.d.ts +1 -1
  71. package/es/Player/api/index.js +44 -18
  72. package/es/Player/context.d.ts +1 -1
  73. package/es/Player/contraller_bar/bar.d.ts +1 -1
  74. package/es/Player/contraller_bar/bar.js +5 -1
  75. package/es/Player/contraller_bar/contraller_event.d.ts +1 -1
  76. package/es/Player/contraller_bar/contraller_event.js +4 -5
  77. package/es/Player/contraller_bar/index.d.ts +1 -2
  78. package/es/Player/contraller_bar/index.js +8 -2
  79. package/es/Player/contraller_bar/left_bar.d.ts +1 -1
  80. package/es/Player/contraller_bar/left_bar.js +12 -3
  81. package/es/Player/contraller_bar/right_bar.d.ts +1 -1
  82. package/es/Player/contraller_bar/right_bar.js +1 -2
  83. package/es/Player/contraller_bar/time.d.ts +1 -2
  84. package/es/Player/contraller_bar/time.js +5 -2
  85. package/es/Player/contraller_bar/volume.d.ts +1 -2
  86. package/es/Player/contraller_bar/volume.js +11 -6
  87. package/es/Player/demo.d.ts +1 -2
  88. package/es/Player/demo.js +41 -29
  89. package/es/Player/empty.d.ts +1 -2
  90. package/es/Player/empty.js +0 -1
  91. package/es/Player/event/index.d.ts +1 -1
  92. package/es/Player/event/index.js +4 -3
  93. package/es/Player/fps_play.d.ts +1 -2
  94. package/es/Player/fps_play.js +6 -2
  95. package/es/Player/frontend_player.d.ts +1 -2
  96. package/es/Player/frontend_player.js +4 -5
  97. package/es/Player/frontend_timeline.d.ts +1 -3
  98. package/es/Player/frontend_timeline.js +16 -8
  99. package/es/Player/iconfont.d.ts +1 -2
  100. package/es/Player/iconfont.js +1 -2
  101. package/es/Player/live_heart.js +8 -9
  102. package/es/Player/message.d.ts +2 -4
  103. package/es/Player/message.js +16 -7
  104. package/es/Player/player.d.ts +2 -0
  105. package/es/Player/segment_player.d.ts +1 -2
  106. package/es/Player/segment_player.js +4 -5
  107. package/es/Player/segment_timeline.d.ts +1 -3
  108. package/es/Player/segment_timeline.js +19 -9
  109. package/es/Player/single_player.d.ts +0 -1
  110. package/es/Player/single_player.js +18 -15
  111. package/es/Player/timeline.d.ts +5 -3
  112. package/es/Player/timeline.js +10 -4
  113. package/es/Player/util.d.ts +2 -2
  114. package/es/Player/util.js +2 -2
  115. package/es/PlayerExt/demo.d.ts +1 -2
  116. package/es/PlayerExt/demo.js +3 -3
  117. package/es/PlayerExt/index.d.ts +1 -2
  118. package/es/PlayerExt/index.js +10 -5
  119. package/es/Progress/index.d.ts +1 -3
  120. package/es/Progress/index.js +7 -3
  121. package/es/ROI/demo.d.ts +1 -2
  122. package/es/ROI/demo.js +1 -2
  123. package/es/ROI/index.d.ts +1 -2
  124. package/es/ROI/index.js +17 -7
  125. package/es/RefDrawer/Footer.d.ts +1 -1
  126. package/es/RefDrawer/index.d.ts +1 -1
  127. package/es/RefDrawer/index.js +2 -2
  128. package/es/RefModal/demo.d.ts +1 -2
  129. package/es/RefModal/index.d.ts +1 -1
  130. package/es/RefModal/index.js +2 -2
  131. package/es/ScreenPlayer/Live.d.ts +1 -3
  132. package/es/ScreenPlayer/Live.js +10 -11
  133. package/es/ScreenPlayer/LiveTools.d.ts +5 -1
  134. package/es/ScreenPlayer/LiveTools.js +14 -9
  135. package/es/ScreenPlayer/PlayerWithExt.d.ts +3 -3
  136. package/es/ScreenPlayer/PlayerWithExt.js +14 -13
  137. package/es/ScreenPlayer/RatePick.d.ts +1 -2
  138. package/es/ScreenPlayer/RatePick.js +9 -4
  139. package/es/ScreenPlayer/Record.d.ts +1 -3
  140. package/es/ScreenPlayer/Record.js +27 -22
  141. package/es/ScreenPlayer/RecordTools.d.ts +1 -1
  142. package/es/ScreenPlayer/RecordTools.js +11 -13
  143. package/es/ScreenPlayer/ScreenSelect.d.ts +1 -2
  144. package/es/ScreenPlayer/ScreenSelect.js +11 -3
  145. package/es/ScreenPlayer/SegmentTimeLine.d.ts +1 -2
  146. package/es/ScreenPlayer/SegmentTimeLine.js +12 -6
  147. package/es/ScreenPlayer/TimeMode.d.ts +1 -2
  148. package/es/ScreenPlayer/TimeMode.js +7 -3
  149. package/es/ScreenPlayer/TimeSelect.d.ts +1 -2
  150. package/es/ScreenPlayer/TimeSelect.js +10 -5
  151. package/es/ScreenPlayer/containerStyle.d.ts +13 -0
  152. package/es/ScreenPlayer/containerStyle.js +32 -0
  153. package/es/ScreenPlayer/demo.d.ts +1 -2
  154. package/es/ScreenPlayer/demo.js +8 -13
  155. package/es/ScreenPlayer/demo2.d.ts +1 -2
  156. package/es/ScreenPlayer/demo2.js +112 -116
  157. package/es/ScreenPlayer/index.d.ts +2 -2
  158. package/es/ScreenPlayer/useTimeSlider.d.ts +2 -2
  159. package/es/ScreenPlayer/useTimeSlider.js +16 -15
  160. package/es/ScreenPlayer/useVideoFit.js +2 -2
  161. package/es/SocketEmitter/eventEmitter.d.ts +1 -1
  162. package/es/TableLayout/index.d.ts +1 -2
  163. package/es/TableLayout/index.js +7 -4
  164. package/es/Timeout/index.d.ts +1 -2
  165. package/es/Timeout/index.js +4 -5
  166. package/es/cache/index.d.ts +1 -1
  167. package/es/cache/index.js +21 -21
  168. package/es/index.d.ts +3 -11
  169. package/es/index.js +3 -11
  170. package/es/likeGo/index.d.ts +2 -0
  171. package/es/{Map/Config/utils.js → likeGo/index.js} +15 -49
  172. package/es/likeGoSync/index.d.ts +2 -0
  173. package/es/likeGoSync/index.js +10 -0
  174. package/es/logger/index.d.ts +4 -4
  175. package/es/nextTick/index.d.ts +1 -1
  176. package/es/nextTick/index.js +2 -6
  177. package/es/recorder/demo.d.ts +2 -0
  178. package/es/recorder/demo.js +200 -0
  179. package/es/recorder/index.d.ts +294 -0
  180. package/es/recorder/index.js +991 -0
  181. package/es/useDrawROI/index.js +8 -12
  182. package/es/useEventEmitterHandle/index.js +2 -2
  183. package/es/useInfiniteScroll/index.d.ts +1 -1
  184. package/es/useInfiniteScroll/index.js +8 -7
  185. package/es/useRafInterval/index.js +2 -2
  186. package/es/useSimpleState/index.js +3 -4
  187. package/es/useVirtualList/index.d.ts +1 -1
  188. package/es/useVirtualList/index.js +5 -8
  189. package/es/utils.d.ts +4 -4
  190. package/es/utils.js +1 -30
  191. package/es/uuid/index.d.ts +2 -1
  192. package/es/uuid/index.js +3 -12
  193. package/package.json +36 -37
  194. package/release-build.sh +3 -2
  195. package/scripts/{entry.js → entry.mjs} +4 -6
  196. package/{icon-fix.js → scripts/icon-fix.mjs} +4 -3
  197. package/tsconfig.json +1 -1
  198. package/es/Auth/index.d.ts +0 -8
  199. package/es/Auth/index.js +0 -18
  200. package/es/AutoExit/index.d.ts +0 -6
  201. package/es/AutoExit/index.js +0 -23
  202. package/es/CheckGroupFixed/index.less +0 -53
  203. package/es/ConfigContext/index.d.ts +0 -22
  204. package/es/ConfigContext/index.js +0 -25
  205. package/es/CustomRenderSelect/index.less +0 -25
  206. package/es/DisableMark/index.less +0 -9
  207. package/es/DynamicGridList/Demo.d.ts +0 -3
  208. package/es/DynamicList/index.less +0 -17
  209. package/es/FullScreen/index.d.ts +0 -22
  210. package/es/FullScreen/index.js +0 -36
  211. package/es/FullScreen/index.less +0 -18
  212. package/es/GridList/Demo.d.ts +0 -3
  213. package/es/GridList/index.less +0 -8
  214. package/es/HightLevel/index.less +0 -3
  215. package/es/ImageView/index.d.ts +0 -17
  216. package/es/ImageView/index.js +0 -58
  217. package/es/ImageView/index.less +0 -11
  218. package/es/LabelPlayer/111.png +0 -0
  219. package/es/LabelPlayer/demo.d.ts +0 -2
  220. package/es/LabelPlayer/demo.js +0 -123
  221. package/es/LabelPlayer/index.d.ts +0 -21
  222. package/es/LabelPlayer/index.js +0 -169
  223. package/es/LabelPlayer/index.less +0 -24
  224. package/es/LabelValue/index.less +0 -23
  225. package/es/List/index.less +0 -13
  226. package/es/ListWithSizeAnimate/index.less +0 -23
  227. package/es/Map/AMap.d.ts +0 -7109
  228. package/es/Map/BasicMap/AMapInstance.d.ts +0 -19
  229. package/es/Map/BasicMap/AMapInstance.js +0 -98
  230. package/es/Map/BasicMap/LeafletInstance.d.ts +0 -18
  231. package/es/Map/BasicMap/LeafletInstance.js +0 -111
  232. package/es/Map/BasicMap/index.d.ts +0 -9
  233. package/es/Map/BasicMap/index.js +0 -98
  234. package/es/Map/BasicMap/index.less +0 -29
  235. package/es/Map/ClusterLayer/demo.d.ts +0 -3
  236. package/es/Map/ClusterLayer/demo.js +0 -22
  237. package/es/Map/ClusterLayer/hook.d.ts +0 -5
  238. package/es/Map/ClusterLayer/hook.js +0 -124
  239. package/es/Map/ClusterLayer/index.d.ts +0 -6
  240. package/es/Map/ClusterLayer/index.js +0 -32
  241. package/es/Map/ClusterLayer/index.less +0 -29
  242. package/es/Map/ClusterLayer/props.d.ts +0 -8
  243. package/es/Map/Config/index.d.ts +0 -9
  244. package/es/Map/Config/index.js +0 -52
  245. package/es/Map/Config/utils.d.ts +0 -2
  246. package/es/Map/Context/index.d.ts +0 -11
  247. package/es/Map/Context/index.js +0 -56
  248. package/es/Map/FindPio/index.d.ts +0 -4
  249. package/es/Map/FindPio/index.js +0 -14
  250. package/es/Map/FindPio/index.less +0 -7
  251. package/es/Map/InfoWindow/MakerLikeWindow.d.ts +0 -4
  252. package/es/Map/InfoWindow/MakerLikeWindow.js +0 -113
  253. package/es/Map/InfoWindow/demo.d.ts +0 -3
  254. package/es/Map/InfoWindow/demo.js +0 -76
  255. package/es/Map/InfoWindow/index.d.ts +0 -11
  256. package/es/Map/InfoWindow/index.js +0 -67
  257. package/es/Map/LevelCenter/DragMarker/index.d.ts +0 -10
  258. package/es/Map/LevelCenter/DragMarker/index.js +0 -44
  259. package/es/Map/LevelCenter/demo.d.ts +0 -3
  260. package/es/Map/LevelCenter/demo.js +0 -46
  261. package/es/Map/LevelCenter/index.d.ts +0 -15
  262. package/es/Map/LevelCenter/index.js +0 -71
  263. package/es/Map/LoaderMap/index.d.ts +0 -12
  264. package/es/Map/LoaderMap/index.js +0 -71
  265. package/es/Map/MapDrawSelect/demo.d.ts +0 -3
  266. package/es/Map/MapDrawSelect/demo.js +0 -79
  267. package/es/Map/MapDrawSelect/index.d.ts +0 -15
  268. package/es/Map/MapDrawSelect/index.js +0 -62
  269. package/es/Map/MouseTool/index.d.ts +0 -10
  270. package/es/Map/MouseTool/index.js +0 -44
  271. package/es/Map/MouseTool/useMouseTools.d.ts +0 -7
  272. package/es/Map/MouseTool/useMouseTools.js +0 -83
  273. package/es/Map/ResetTools/index.d.ts +0 -10
  274. package/es/Map/ResetTools/index.js +0 -67
  275. package/es/Map/ResetTools/index.less +0 -39
  276. package/es/Map/SinglePoint/demo.d.ts +0 -3
  277. package/es/Map/SinglePoint/demo.js +0 -16
  278. package/es/Map/SinglePoint/index.d.ts +0 -27
  279. package/es/Map/SinglePoint/index.js +0 -57
  280. package/es/Map/SinglePoint/index.less +0 -41
  281. package/es/Map/hook/useMapEvent.d.ts +0 -2
  282. package/es/Map/hook/useMapEvent.js +0 -19
  283. package/es/Map/hook/useMapType.d.ts +0 -4
  284. package/es/Map/hook/useMapType.js +0 -12
  285. package/es/Map/icon.d.ts +0 -2
  286. package/es/Map/icon.js +0 -10
  287. package/es/Map/index.d.ts +0 -24
  288. package/es/Map/index.js +0 -25
  289. package/es/Map/interface.d.ts +0 -74
  290. package/es/Map/points.d.ts +0 -74
  291. package/es/Map/points.js +0 -1
  292. package/es/Map/useMarker/index.d.ts +0 -10
  293. package/es/Map/useMarker/index.js +0 -71
  294. package/es/Map/withMap/index.d.ts +0 -3
  295. package/es/Map/withMap/index.js +0 -18
  296. package/es/Picture/component/DefaultRects/index.less +0 -211
  297. package/es/Picture/component/DrawRect/index.less +0 -8
  298. package/es/Picture/component/RectMenu/index.less +0 -36
  299. package/es/Picture/component/Tools/index.less +0 -49
  300. package/es/Picture/index.less +0 -20
  301. package/es/Player/style/bar.less +0 -43
  302. package/es/Player/style/index.less +0 -34
  303. package/es/Player/style/message.less +0 -56
  304. package/es/Player/style/slider.less +0 -106
  305. package/es/Player/style/timeline.less +0 -116
  306. package/es/Player/style/volume.less +0 -24
  307. package/es/PlayerExt/index.less +0 -10
  308. package/es/Progress/index.less +0 -21
  309. package/es/ROI/index.less +0 -33
  310. package/es/ScreenPlayer/index.less +0 -335
  311. package/es/TableLayout/index.less +0 -4
  312. package/es/ThemeAntd/demo.d.ts +0 -4
  313. package/es/ThemeAntd/demo.js +0 -129
  314. package/es/ThemeAntd/demo.less +0 -20
  315. package/es/ThemeAntd/index.d.ts +0 -7
  316. package/es/ThemeAntd/index.js +0 -23
  317. package/es/ThemeAntd/index.less +0 -4
  318. package/es/VList/index.d.ts +0 -11
  319. package/es/VList/index.js +0 -42
  320. package/es/VList/index.less +0 -6
  321. package/es/VList/utils.d.ts +0 -14
  322. package/es/VList/utils.js +0 -17
  323. package/es/bigNumberTransformCN/index.d.ts +0 -5
  324. package/es/bigNumberTransformCN/index.js +0 -60
  325. package/es/useFullscreen/demo.d.ts +0 -2
  326. package/es/useFullscreen/demo.js +0 -48
  327. package/es/useFullscreen/index.d.ts +0 -12
  328. package/es/useFullscreen/index.js +0 -76
  329. /package/es/DynamicGridList/{Demo.js → demo.js} +0 -0
package/.dumirc.ts CHANGED
@@ -14,18 +14,6 @@ export default defineConfig({
14
14
  // 配置入口文件路径,API 解析将从这里开始
15
15
  entryFile: './src/index.ts',
16
16
  },
17
- extraBabelPlugins: [
18
- [
19
- 'import',
20
- {
21
- libraryName: 'ahooks',
22
- style: false,
23
- camel2DashComponentName: false,
24
- libraryDirectory: 'es',
25
- },
26
- 'ahooks',
27
- ],
28
- ],
29
17
  theme: {
30
18
  '@ant-prefix': 'cloudapp',
31
19
  },
@@ -46,7 +34,7 @@ export default defineConfig({
46
34
  },
47
35
  proxy: {
48
36
  '/api': {
49
- target: 'https://jxsr-eye.antelopecloud.cn/',
37
+ target: 'http://192.168.101.41:13336',
50
38
  changeOrigin: true,
51
39
  },
52
40
  '/twinmapdataservice': {
@@ -59,11 +47,7 @@ export default defineConfig({
59
47
  changeOrigin: true,
60
48
  },
61
49
  },
62
- scripts: [
63
- '//at.alicdn.com/t/font_1724012_972m5d05cou.js',
64
- 'http://192.168.101.38:8888/twinmap/resources/TwinMap3D/lib/Cesium/Cesium.js',
65
- 'http://192.168.101.38:8888/twinmap/resources/TwinMap3D/TwinMap3D.js',
66
- ],
50
+ scripts: [],
67
51
  styles: [themeConfig],
68
52
 
69
53
  // more config: https://d.umijs.org/config
package/.eslintrc.js CHANGED
@@ -1,3 +1,6 @@
1
1
  module.exports = {
2
2
  extends: require.resolve('@umijs/lint/dist/config/eslint'),
3
+ rules: {
4
+ 'react/no-unknown-property': ['error', { ignore: ['css'] }],
5
+ },
3
6
  };
package/.fatherrc.ts CHANGED
@@ -1,15 +1,8 @@
1
1
  import { defineConfig } from 'father';
2
2
 
3
- const importProps = {
4
- style: false,
5
- camel2DashComponentName: false,
6
- libraryDirectory: 'es',
7
- };
8
-
9
3
  export default defineConfig({
10
4
  platform: 'browser',
11
5
  esm: {
12
6
  output: 'es',
13
7
  },
14
- extraBabelPlugins: [['import', { libraryName: 'ahooks', ...importProps }, 'ahooks']],
15
8
  });
@@ -1,8 +1,7 @@
1
- /// <reference types="react" />
2
1
  import { AppContextInterface, AppStoreType } from './interface';
3
2
  interface ISyncProps {
4
3
  stateChange: (options: AppContextInterface) => void;
5
4
  storeChange: (store: AppStoreType) => void;
6
5
  }
7
- declare function Sync({ stateChange, storeChange }: ISyncProps): JSX.Element;
6
+ declare function Sync({ stateChange, storeChange }: ISyncProps): import("react/jsx-runtime").JSX.Element;
8
7
  export default Sync;
@@ -1,8 +1,15 @@
1
1
  import React from 'react';
2
2
  import { AppContextInterface } from './interface';
3
- declare function Provider({ children }: {
4
- children?: React.ReactNode;
5
- }): JSX.Element;
3
+ interface IProviderProps {
4
+ getContainer: () => HTMLElement;
5
+ children: React.ReactNode;
6
+ }
7
+ declare function Provider({ getContainer, children }: IProviderProps): import("react/jsx-runtime").JSX.Element;
8
+ declare namespace Provider {
9
+ var defaultProps: {
10
+ getContainer: () => HTMLElement;
11
+ };
12
+ }
6
13
  declare const _default: {
7
14
  Provider: typeof Provider;
8
15
  Context: React.Context<AppContextInterface>;
@@ -12,16 +12,17 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
12
12
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
13
  import { isEmpty } from 'lodash-es';
14
14
  import React, { useCallback, useMemo, useState } from 'react';
15
+ import SocketEmitter from "../SocketEmitter";
15
16
  import cache from "../cache";
16
17
  import nextTick from "../nextTick";
17
- import SocketEmitter from "../SocketEmitter";
18
- import { _LOGIN_STATUS_EVENT_CHANGE_, _LOGIN_STATUS_SESSION_, _OPERATION_EVENT_CHANGE_, _OPERATION_SESSION_, _STORE_EVENT_CHANGE_, _STORE_SESSION_, _USER_EVENT_CHANGE_, _USER_SESSION_ } from "./static";
19
18
  import Sync from "./Sync";
19
+ import { _LOGIN_STATUS_EVENT_CHANGE_, _LOGIN_STATUS_SESSION_, _OPERATION_EVENT_CHANGE_, _OPERATION_SESSION_, _STORE_EVENT_CHANGE_, _STORE_SESSION_, _USER_EVENT_CHANGE_, _USER_SESSION_ } from "./static";
20
20
  import { jsx as _jsx } from "react/jsx-runtime";
21
21
  import { jsxs as _jsxs } from "react/jsx-runtime";
22
22
  var Context = /*#__PURE__*/React.createContext(null);
23
23
  function Provider(_ref) {
24
- var children = _ref.children;
24
+ var getContainer = _ref.getContainer,
25
+ children = _ref.children;
25
26
  var _useState = useState({
26
27
  user: cache.getCache(_USER_SESSION_, 'session') || {},
27
28
  operation: cache.getCache(_OPERATION_SESSION_, 'session') || {},
@@ -116,6 +117,9 @@ function Provider(_ref) {
116
117
  });
117
118
  });
118
119
  }, []);
120
+ var root = useMemo(function () {
121
+ return getContainer();
122
+ }, [getContainer]);
119
123
  var providerValue = useMemo(function () {
120
124
  return {
121
125
  user: state.user,
@@ -125,7 +129,8 @@ function Provider(_ref) {
125
129
  updateUser: updateUser,
126
130
  updateOperation: updateOperation,
127
131
  updateLoginStatus: updateLoginStatus,
128
- updateStore: updateStore
132
+ updateStore: updateStore,
133
+ root: root
129
134
  };
130
135
  },
131
136
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -138,6 +143,11 @@ function Provider(_ref) {
138
143
  })]
139
144
  });
140
145
  }
146
+ Provider.defaultProps = {
147
+ getContainer: function getContainer() {
148
+ return document.body;
149
+ }
150
+ };
141
151
  export default {
142
152
  Provider: Provider,
143
153
  Context: Context
@@ -38,4 +38,5 @@ export interface AppContextInterface extends IProviderState {
38
38
  updateOperation: (user: OperationInfoType) => void;
39
39
  updateLoginStatus: (status: boolean) => void;
40
40
  updateStore: (data: { [key: string]: any }) => void;
41
+ root: HTMLElement;
41
42
  }
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
- declare const App: () => JSX.Element;
1
+ declare const App: () => import("react/jsx-runtime").JSX.Element;
3
2
  export default App;
@@ -1,5 +1,3 @@
1
- import { ConfigProvider } from 'antd';
2
- import React from 'react';
3
1
  import CheckGroupFixed from "./index";
4
2
  import { jsx as _jsx } from "react/jsx-runtime";
5
3
  var defaultSource = Array.from(new Array(100)).map(function (_, i) {
@@ -9,16 +7,13 @@ var defaultSource = Array.from(new Array(100)).map(function (_, i) {
9
7
  };
10
8
  });
11
9
  var App = function App() {
12
- return /*#__PURE__*/_jsx(ConfigProvider, {
13
- prefixCls: "cloudapp",
14
- children: /*#__PURE__*/_jsx("div", {
15
- style: {
16
- width: '100%'
17
- },
18
- children: /*#__PURE__*/_jsx(CheckGroupFixed, {
19
- label: "\u6807\u9898",
20
- source: defaultSource
21
- })
10
+ return /*#__PURE__*/_jsx("div", {
11
+ style: {
12
+ width: '100%'
13
+ },
14
+ children: /*#__PURE__*/_jsx(CheckGroupFixed, {
15
+ label: "\u6807\u9898",
16
+ source: defaultSource
22
17
  })
23
18
  });
24
19
  };
@@ -1,12 +1,16 @@
1
- /// <reference types="react" />
2
- import './index.less';
3
1
  export interface SourceDictType {
4
2
  value?: string | number;
5
3
  label: string;
6
4
  icon?: string;
7
5
  }
8
6
  interface ICheckGroupFixedProps {
7
+ /**
8
+ * label
9
+ */
9
10
  label: string;
11
+ /**
12
+ * 字典
13
+ */
10
14
  source: SourceDictType[];
11
15
  onChange?: (keys: string[] & number[] & boolean[]) => void;
12
16
  checboxSize?: number;
@@ -14,5 +18,5 @@ interface ICheckGroupFixedProps {
14
18
  cutRow?: number;
15
19
  value?: string[] & number[] & boolean[];
16
20
  }
17
- declare function CheckGroupFixed({ label, source, checboxSize, cutRow, labelSize, value, onChange }: ICheckGroupFixedProps): JSX.Element;
21
+ declare function CheckGroupFixed({ label, source, checboxSize, cutRow, labelSize, value, onChange }: ICheckGroupFixedProps): import("react/jsx-runtime").JSX.Element;
18
22
  export default CheckGroupFixed;
@@ -1,5 +1,4 @@
1
1
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- import _useUpdateEffect from "ahooks/es/useUpdateEffect";
3
2
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
3
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
5
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -11,9 +10,10 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
11
10
  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; }
12
11
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
13
12
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
+ import { useUpdateEffect } from 'ahooks';
14
14
  import { Badge, Checkbox } from 'antd';
15
15
  import React, { useLayoutEffect, useMemo, useRef, useState } from 'react';
16
- import "./index.less";
16
+ import * as style from "./style";
17
17
  import { jsxs as _jsxs } from "react/jsx-runtime";
18
18
  import { jsx as _jsx } from "react/jsx-runtime";
19
19
  function CheckGroupFixed(_ref) {
@@ -68,7 +68,7 @@ function CheckGroupFixed(_ref) {
68
68
  boxShadow: ' 0 0 10px rgba(0,0,0,0.1)'
69
69
  } : {};
70
70
  }, [state.sider, state.w, state.pos]);
71
- _useUpdateEffect(function () {
71
+ useUpdateEffect(function () {
72
72
  return onChange === null || onChange === void 0 ? void 0 : onChange(state.selectKeys);
73
73
  }, [state.selectKeys]);
74
74
  useLayoutEffect(function () {
@@ -77,22 +77,22 @@ function CheckGroupFixed(_ref) {
77
77
  dom === null || dom === void 0 ? void 0 : dom.setAttribute('style', "grid-template-columns:repeat(auto-fill, minmax(".concat(checboxSize, "px, 1fr));"));
78
78
  }, [checboxSize]);
79
79
  return /*#__PURE__*/_jsxs("div", {
80
- className: "c-check-group-layout",
80
+ className: style.groupLayout,
81
81
  ref: domRef,
82
82
  style: {
83
83
  height: state.sider ? cutRow * 30 + 20 : 'auto'
84
84
  },
85
85
  children: [/*#__PURE__*/_jsxs("div", {
86
- className: "c-check-group-box",
86
+ className: style.groupBox,
87
87
  style: fixedStyle,
88
88
  children: [/*#__PURE__*/_jsxs("span", {
89
- className: "check-label-box",
89
+ className: style.checkLabelBox,
90
90
  style: {
91
91
  width: labelSize
92
92
  },
93
93
  children: [label, "\uFF1A"]
94
94
  }), /*#__PURE__*/_jsx("div", {
95
- className: "check-content-box",
95
+ className: style.checkContentBox,
96
96
  style: {
97
97
  height: state.sider ? 'auto' : cutRow * 30
98
98
  },
@@ -124,7 +124,7 @@ function CheckGroupFixed(_ref) {
124
124
  size: "small",
125
125
  offset: [10, 0],
126
126
  children: /*#__PURE__*/_jsx("span", {
127
- className: "slice-btn",
127
+ className: style.sliceBtn,
128
128
  onClick: function onClick() {
129
129
  return setState(function (old) {
130
130
  return _objectSpread(_objectSpread({}, old), {}, {
@@ -136,7 +136,7 @@ function CheckGroupFixed(_ref) {
136
136
  })
137
137
  })]
138
138
  }), state.sider && /*#__PURE__*/_jsx("div", {
139
- className: "sider-mask",
139
+ className: style.siderMask,
140
140
  onClick: function onClick() {
141
141
  return setState(function (old) {
142
142
  return _objectSpread(_objectSpread({}, old), {}, {
@@ -0,0 +1,6 @@
1
+ export declare const groupLayout: string;
2
+ export declare const groupBox: string;
3
+ export declare const checkLabelBox: string;
4
+ export declare const checkContentBox: string;
5
+ export declare const siderMask: string;
6
+ export declare const sliceBtn: string;
@@ -0,0 +1,9 @@
1
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
2
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
3
+ import { css } from '@emotion/css';
4
+ export var groupLayout = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n"])));
5
+ export var groupBox = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n padding: 10px;\n"])));
6
+ export var checkLabelBox = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: 80px;\n color: #999;\n line-height: 30px;\n text-align: center;\n"])));
7
+ export var checkContentBox = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 100%;\n height: 30px;\n overflow: hidden;\n flex: 1;\n .ant-checkbox-group {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));\n grid-gap: 10px;\n .ant-checkbox-wrapper {\n display: flex;\n width: 120px;\n height: 30px;\n margin-left: 0;\n align-items: center;\n > span:not(.ant-checkbox) {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex: 1;\n }\n }\n }\n"])));
8
+ export var siderMask = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: fixed;\n top: 0;\n left: 0;\n z-index: 98;\n width: 100%;\n height: 100%;\n"])));
9
+ export var sliceBtn = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n position: relative;\n top: 10px;\n right: 10px;\n color: var(--primary);\n cursor: pointer;\n"])));
@@ -1,4 +1,4 @@
1
- import produce from 'immer';
1
+ import { produce } from 'immer';
2
2
  import { insertThemeStyle, lock } from "./utils";
3
3
  var Config = {
4
4
  app: produce({}, function () {}),
@@ -1,6 +1,7 @@
1
1
  import { SelectProps } from 'antd';
2
2
  import React from 'react';
3
- import './index.less';
3
+ export declare const customRenderSelect: string;
4
+ export declare const customRenderbox: string;
4
5
  interface ICustomRenderSelectProps extends SelectProps {
5
6
  children?: React.ReactNode;
6
7
  value: any;
@@ -8,5 +9,5 @@ interface ICustomRenderSelectProps extends SelectProps {
8
9
  onChange: (value: any) => void;
9
10
  selectAotoClose?: boolean;
10
11
  }
11
- declare function CustomRenderSelect({ children, value, customRender, popupClassName, getPopupContainer, onChange, selectAotoClose, ...props }: ICustomRenderSelectProps): JSX.Element;
12
+ declare function CustomRenderSelect({ children, value, customRender, popupClassName, getPopupContainer, onChange, selectAotoClose, ...props }: ICustomRenderSelectProps): import("react/jsx-runtime").JSX.Element;
12
13
  export default CustomRenderSelect;
@@ -1,7 +1,6 @@
1
1
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- import _useClickAway from "ahooks/es/useClickAway";
3
- import _useToggle3 from "ahooks/es/useToggle";
4
2
  var _excluded = ["children", "value", "customRender", "popupClassName", "getPopupContainer", "onChange", "selectAotoClose"];
3
+ var _templateObject, _templateObject2, _templateObject3;
5
4
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
6
5
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
7
6
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -15,12 +14,17 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
15
14
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
16
15
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
17
16
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
17
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
18
+ import { css } from '@emotion/css';
19
+ import { useClickAway, useToggle } from 'ahooks';
18
20
  import { Select } from 'antd';
19
21
  import React, { useMemo, useRef } from 'react';
20
22
  import uuid from "../uuid";
21
- import "./index.less";
22
23
  import { jsx as _jsx } from "react/jsx-runtime";
23
24
  import { jsxs as _jsxs } from "react/jsx-runtime";
25
+ export var customRenderSelect = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n display: inline-flex;\n width: max-content;\n overflow: hidden;\n"])));
26
+ var customSelect = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n top: 50%;\n left: 50%;\n width: max-content;\n height: 100%;\n opacity: 0;\n transform: translate(-50%, -50%);\n"])));
27
+ export var customRenderbox = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n display: inline-block;\n width: max-content;\n overflow: hidden;\n"])));
24
28
  function CustomRenderSelect(_ref) {
25
29
  var children = _ref.children,
26
30
  value = _ref.value,
@@ -35,7 +39,7 @@ function CustomRenderSelect(_ref) {
35
39
  return "custom-render-select-dropdown-".concat(uuid());
36
40
  }, []);
37
41
  var domRef = useRef(null);
38
- var _useToggle = _useToggle3(),
42
+ var _useToggle = useToggle(),
39
43
  _useToggle2 = _slicedToArray(_useToggle, 2),
40
44
  open = _useToggle2[0],
41
45
  _useToggle2$ = _useToggle2[1],
@@ -49,7 +53,7 @@ function CustomRenderSelect(_ref) {
49
53
  return document.querySelector(".".concat(classname));
50
54
  }];
51
55
  }, [classname]);
52
- _useClickAway(function () {
56
+ useClickAway(function () {
53
57
  return set(false);
54
58
  }, getDoms, ['click']);
55
59
  var onSelectChange = function onSelectChange(v) {
@@ -59,11 +63,12 @@ function CustomRenderSelect(_ref) {
59
63
  }
60
64
  };
61
65
  return /*#__PURE__*/_jsxs("div", {
62
- className: "custom-render-select",
66
+ className: customRenderSelect,
63
67
  ref: domRef,
64
68
  children: [/*#__PURE__*/_jsx(Select, _objectSpread(_objectSpread({}, props), {}, {
65
69
  value: value,
66
- popupClassName: "custom-render-select-dropdown ".concat(classname, " ").concat(popupClassName),
70
+ className: customSelect,
71
+ popupClassName: "".concat(classname, " ").concat(popupClassName),
67
72
  getPopupContainer: getPopupContainer ? getPopupContainer : function () {
68
73
  var _domRef$current$paren, _domRef$current2, _domRef$current2$pare;
69
74
  return (_domRef$current$paren = (_domRef$current2 = domRef.current) === null || _domRef$current2 === void 0 ? void 0 : (_domRef$current2$pare = _domRef$current2.parentElement) === null || _domRef$current2$pare === void 0 ? void 0 : _domRef$current2$pare.parentElement) !== null && _domRef$current$paren !== void 0 ? _domRef$current$paren : document.body;
@@ -72,11 +77,9 @@ function CustomRenderSelect(_ref) {
72
77
  onChange: onSelectChange,
73
78
  children: children
74
79
  })), /*#__PURE__*/_jsx("div", {
75
- className: "custom-render-box",
80
+ className: customRenderbox,
76
81
  onClick: toggle,
77
82
  children: customRender(value)
78
- }), /*#__PURE__*/_jsx("div", {
79
- className: "popup-container"
80
83
  })]
81
84
  });
82
85
  }
@@ -62,9 +62,8 @@ var DBInstance = /*#__PURE__*/function () {
62
62
  });
63
63
  case 2:
64
64
  this.LM_DB_SERVER = _context.sent;
65
- console.log(this.LM_DB_SERVER);
66
65
  logger.debug('IndexDB open success!', "serverName:".concat(this.schemaName, ", version:").concat(this.version, ", schema:").concat(JSON.stringify(schema)));
67
- case 5:
66
+ case 4:
68
67
  case "end":
69
68
  return _context.stop();
70
69
  }
@@ -1,9 +1,8 @@
1
1
  import React from 'react';
2
- import './index.less';
3
2
  interface IDisableMarkProps {
4
3
  children: React.ReactNode;
5
4
  disabled: boolean;
6
5
  width?: string | number;
7
6
  }
8
- export default function DisableMark({ children, disabled, width }: IDisableMarkProps): JSX.Element;
7
+ export default function DisableMark({ children, disabled, width }: IDisableMarkProps): import("react/jsx-runtime").JSX.Element;
9
8
  export {};
@@ -1,7 +1,10 @@
1
+ var _templateObject;
2
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
3
+ import { css } from '@emotion/css';
1
4
  import React from 'react';
2
- import "./index.less";
3
5
  import { jsx as _jsx } from "react/jsx-runtime";
4
6
  import { jsxs as _jsxs } from "react/jsx-runtime";
7
+ var classname = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n left: 0;\n z-index: 999;\n width: 100%;\n height: 100%;\n cursor: not-allowed;\n"])));
5
8
  export default function DisableMark(_ref) {
6
9
  var children = _ref.children,
7
10
  disabled = _ref.disabled,
@@ -13,7 +16,7 @@ export default function DisableMark(_ref) {
13
16
  position: 'relative'
14
17
  },
15
18
  children: [disabled ? /*#__PURE__*/_jsx("div", {
16
- className: "disable-mark",
19
+ className: classname,
17
20
  style: {
18
21
  width: width
19
22
  }
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
- export default function App(): JSX.Element;
1
+ export default function App(): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import DomMove from "./index";
3
2
  import { jsx as _jsx } from "react/jsx-runtime";
4
3
  export default function App() {
@@ -1,12 +1,11 @@
1
1
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- import _useEventListener from "ahooks/es/useEventListener";
3
- import _useUpdate from "ahooks/es/useUpdate";
4
- import _useSize from "ahooks/es/useSize";
5
2
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
6
3
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
7
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8
5
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
9
6
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
+ /* eslint-disable @typescript-eslint/no-unused-expressions */
8
+ import { useEventListener, useSize, useUpdate } from 'ahooks';
10
9
  import React, { useEffect, useImperativeHandle, useRef } from 'react';
11
10
  import { getMouseXY, getPosition } from "./utils";
12
11
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -38,8 +37,8 @@ function DomMove(_ref) {
38
37
  height: 0
39
38
  }
40
39
  });
41
- var reSize = _useSize(dragRef) || {};
42
- var update = _useUpdate();
40
+ var reSize = useSize(dragRef) || {};
41
+ var update = useUpdate();
43
42
  var updatePosition = function updatePosition(_ref2) {
44
43
  var x = _ref2.x,
45
44
  y = _ref2.y;
@@ -69,7 +68,7 @@ function DomMove(_ref) {
69
68
  updatePosition: updatePosition
70
69
  };
71
70
  }, []);
72
- _useEventListener('mousemove', function (event) {
71
+ useEventListener('mousemove', function (event) {
73
72
  if (ref.current.isDrag) {
74
73
  // let maxX, maxY;
75
74
  var moveX, moveY;
@@ -95,7 +94,7 @@ function DomMove(_ref) {
95
94
  }, {
96
95
  target: document.body
97
96
  });
98
- _useEventListener('mouseup', function (event) {
97
+ useEventListener('mouseup', function (event) {
99
98
  if (ref.current.isDrag) {
100
99
  ref.current.isDrag = false;
101
100
  onDragEnd === null || onDragEnd === void 0 ? void 0 : onDragEnd(event, ref.current.position);
@@ -103,7 +102,7 @@ function DomMove(_ref) {
103
102
  }, {
104
103
  target: document.body
105
104
  });
106
- _useEventListener('mousedown', function (event) {
105
+ useEventListener('mousedown', function (event) {
107
106
  if (!disabled) {
108
107
  var _getMouseXY2 = getMouseXY(event),
109
108
  _x2 = _getMouseXY2.x,
@@ -0,0 +1,2 @@
1
+ declare const App: () => import("react/jsx-runtime").JSX.Element;
2
+ export default App;
@@ -20,7 +20,7 @@ export interface IDynamicGridListProps<T> {
20
20
  isNoMore?: (data?: TData<T>) => boolean;
21
21
  threshold?: number;
22
22
  }
23
- declare function DynamicGridList<T>({ renderItem, itemHeight, itemKey, itemWidth, reloadDeps, getGridGap, loadPage, isNoMore, threshold, ...props }: IDynamicGridListProps<T>): JSX.Element;
23
+ declare function DynamicGridList<T>({ renderItem, itemHeight, itemKey, itemWidth, reloadDeps, getGridGap, loadPage, isNoMore, threshold, ...props }: IDynamicGridListProps<T>): import("react/jsx-runtime").JSX.Element;
24
24
  declare namespace DynamicGridList {
25
25
  var defaultProps: any;
26
26
  }
@@ -1,7 +1,7 @@
1
- import _useUpdateEffect from "ahooks/es/useUpdateEffect";
2
1
  var _excluded = ["renderItem", "itemHeight", "itemKey", "itemWidth", "reloadDeps", "getGridGap", "loadPage", "isNoMore", "threshold"];
3
2
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
3
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
4
+ import { useUpdateEffect } from 'ahooks';
5
5
  import React, { useMemo, useRef } from 'react';
6
6
  import GridList from "../GridList";
7
7
  import useInfiniteScroll from "../useInfiniteScroll";
@@ -26,7 +26,7 @@ function DynamicGridList(_ref) {
26
26
  }),
27
27
  data = _useInfiniteScroll.data,
28
28
  noMore = _useInfiniteScroll.noMore;
29
- _useUpdateEffect(function () {
29
+ useUpdateEffect(function () {
30
30
  if (noMore) {
31
31
  console.warn('数据已全部加载完成');
32
32
  }
@@ -48,7 +48,7 @@ function DynamicGridList(_ref) {
48
48
  return data ? data.list || [] : [];
49
49
  }, [data]);
50
50
  return /*#__PURE__*/_jsx(GridList, {
51
- className: "cloudapp-dynamic-grid-list ".concat(props.className),
51
+ className: "dynamic-grid-list ".concat(props.className),
52
52
  items: dataList,
53
53
  ref: containerRef,
54
54
  getItemData: getItemData,
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
- export default function (): JSX.Element;
1
+ export default function (): import("react/jsx-runtime").JSX.Element;
@@ -5,8 +5,6 @@ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symb
5
5
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
6
6
  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; }
7
7
  /* eslint-disable @typescript-eslint/no-unused-expressions */
8
- import { ConfigProvider } from 'antd';
9
- import React from 'react';
10
8
  import DynamicList from "./index";
11
9
  import { jsx as _jsx } from "react/jsx-runtime";
12
10
  var resultData = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13'];
@@ -24,26 +22,23 @@ function loadPage(d) {
24
22
  });
25
23
  }
26
24
  export default function () {
27
- return /*#__PURE__*/_jsx(ConfigProvider, {
28
- prefixCls: "cloudapp",
25
+ return /*#__PURE__*/_jsx("div", {
26
+ style: {
27
+ display: 'flex'
28
+ },
29
29
  children: /*#__PURE__*/_jsx("div", {
30
30
  style: {
31
- display: 'flex'
31
+ height: 400,
32
+ width: 300
32
33
  },
33
- children: /*#__PURE__*/_jsx("div", {
34
- style: {
35
- height: 400,
36
- width: 300
37
- },
38
- children: /*#__PURE__*/_jsx(DynamicList, {
39
- loadPage: loadPage,
40
- itemHeight: 40,
41
- renderItem: function renderItem(item) {
42
- return /*#__PURE__*/_jsx("div", {
43
- children: item.data
44
- });
45
- }
46
- })
34
+ children: /*#__PURE__*/_jsx(DynamicList, {
35
+ loadPage: loadPage,
36
+ itemHeight: 40,
37
+ renderItem: function renderItem(item) {
38
+ return /*#__PURE__*/_jsx("div", {
39
+ children: item.data
40
+ });
41
+ }
47
42
  })
48
43
  })
49
44
  });
@@ -1,6 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import type { TData } from '../useInfiniteScroll';
3
- import './index.less';
4
3
  export interface IDynamicListProps<T> {
5
4
  itemHeight?: number;
6
5
  itemClassName?: string;
@@ -18,7 +17,7 @@ export interface IDynamicListProps<T> {
18
17
  }): JSX.Element;
19
18
  loadPage(d?: TData<T>): Promise<TData<T>>;
20
19
  }
21
- declare function DynamicList<T>({ renderItem, itemHeight, itemClassName, reloadDeps, loadPage }: IDynamicListProps<T>): JSX.Element;
20
+ declare function DynamicList<T>({ renderItem, itemHeight, itemClassName, reloadDeps, loadPage }: IDynamicListProps<T>): import("react/jsx-runtime").JSX.Element;
22
21
  declare namespace DynamicList {
23
22
  var defaultProps: {
24
23
  limit: number;