@cloud-app-dev/vidc 4.0.22 → 4.0.23

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 (197) hide show
  1. package/es/AppContext/Sync.d.ts +8 -0
  2. package/es/AppContext/index.d.ts +10 -0
  3. package/es/AppContext/index.js +1 -1
  4. package/es/AppContext/static.d.ts +8 -0
  5. package/es/Auth/index.d.ts +8 -0
  6. package/es/AutoExit/index.d.ts +6 -0
  7. package/es/CheckGroupFixed/demo.d.ts +3 -0
  8. package/es/CheckGroupFixed/index.d.ts +24 -0
  9. package/es/Config/index.d.ts +4 -0
  10. package/es/Config/utils.d.ts +4 -0
  11. package/es/ConfigContext/index.d.ts +17 -0
  12. package/es/CustomRenderSelect/index.d.ts +12 -0
  13. package/es/DBTools/index.d.ts +25 -0
  14. package/es/DisableMark/index.d.ts +9 -0
  15. package/es/DomMove/demo.d.ts +2 -0
  16. package/es/DomMove/index.d.ts +16 -0
  17. package/es/DomMove/utils.d.ts +8 -0
  18. package/es/Drag/DragAndDropItem.d.ts +4 -0
  19. package/es/Drag/DropItem.d.ts +4 -0
  20. package/es/Drag/index.d.ts +7 -9
  21. package/es/DynamicGridList/Demo.d.ts +3 -0
  22. package/es/DynamicGridList/index.d.ts +24 -0
  23. package/es/DynamicList/demo.d.ts +2 -0
  24. package/es/DynamicList/index.d.ts +22 -0
  25. package/es/DynamicList/utils.d.ts +4 -0
  26. package/es/ErrorFallback/index.d.ts +9 -0
  27. package/es/EventTools/index.d.ts +3 -0
  28. package/es/FrontendPlayer/index.d.ts +4 -0
  29. package/es/FullScreen/index.d.ts +22 -0
  30. package/es/GridList/Demo.d.ts +3 -0
  31. package/es/GridList/data.d.ts +16 -0
  32. package/es/GridList/hook.d.ts +13 -0
  33. package/es/GridList/index.d.ts +15 -0
  34. package/es/GridList/utils.d.ts +9 -0
  35. package/es/HightLevel/index.d.ts +9 -0
  36. package/es/IconFont/index.d.ts +12 -0
  37. package/es/ImageView/index.d.ts +20 -0
  38. package/es/InstanceHistory/index.d.ts +3 -0
  39. package/es/LabelPlayer/demo.d.ts +2 -0
  40. package/es/LabelPlayer/index.d.ts +21 -0
  41. package/es/LabelValue/index.d.ts +15 -0
  42. package/es/List/demo.d.ts +3 -0
  43. package/es/List/index.d.ts +28 -0
  44. package/es/ListWithSizeAnimate/demo.d.ts +2 -0
  45. package/es/ListWithSizeAnimate/index.d.ts +14 -0
  46. package/es/LoaderScript/index.d.ts +47 -0
  47. package/es/LoaderScript/utils.d.ts +13 -0
  48. package/es/Map/BasicMap/AMapInstance.d.ts +19 -0
  49. package/es/Map/BasicMap/AMapInstance.js +2 -0
  50. package/es/Map/BasicMap/LeafletInstance.d.ts +18 -0
  51. package/es/Map/BasicMap/LeafletInstance.js +4 -2
  52. package/es/Map/BasicMap/index.d.ts +9 -0
  53. package/es/Map/ClusterLayer/demo.d.ts +3 -0
  54. package/es/Map/ClusterLayer/hook.d.ts +5 -0
  55. package/es/Map/ClusterLayer/hook.js +6 -2
  56. package/es/Map/ClusterLayer/index.d.ts +6 -0
  57. package/es/Map/Config/index.d.ts +9 -0
  58. package/es/Map/Config/utils.d.ts +2 -0
  59. package/es/Map/Context/index.d.ts +11 -0
  60. package/es/Map/FindPio/index.d.ts +4 -0
  61. package/es/Map/InfoWindow/MakerLikeWindow.d.ts +4 -0
  62. package/es/Map/InfoWindow/MakerLikeWindow.js +27 -6
  63. package/es/Map/InfoWindow/demo.d.ts +3 -0
  64. package/es/Map/InfoWindow/index.d.ts +11 -0
  65. package/es/Map/InfoWindow/index.js +5 -1
  66. package/es/Map/LevelCenter/DragMarker/index.d.ts +10 -0
  67. package/es/Map/LevelCenter/DragMarker/index.js +1 -0
  68. package/es/Map/LevelCenter/demo.d.ts +3 -0
  69. package/es/Map/LevelCenter/index.d.ts +15 -0
  70. package/es/Map/LoaderMap/index.d.ts +7 -0
  71. package/es/Map/MapDrawSelect/demo.d.ts +3 -0
  72. package/es/Map/MapDrawSelect/index.d.ts +15 -0
  73. package/es/Map/MouseTool/index.d.ts +10 -0
  74. package/es/Map/MouseTool/useMouseTools.d.ts +7 -0
  75. package/es/Map/MouseTool/useMouseTools.js +2 -1
  76. package/es/Map/ResetTools/index.d.ts +10 -0
  77. package/es/Map/SinglePoint/demo.d.ts +3 -0
  78. package/es/Map/SinglePoint/index.d.ts +27 -0
  79. package/es/Map/SinglePoint/index.js +1 -0
  80. package/es/Map/hook/useMapEvent.d.ts +2 -0
  81. package/es/Map/hook/useMapType.d.ts +4 -0
  82. package/es/Map/icon.d.ts +2 -0
  83. package/es/Map/index.d.ts +24 -0
  84. package/es/Map/points.d.ts +74 -0
  85. package/es/Map/useMarker/index.d.ts +10 -0
  86. package/es/Map/withMap/index.d.ts +3 -0
  87. package/es/Picture/component/DefaultRects/RectInfo.d.ts +8 -0
  88. package/es/Picture/component/DefaultRects/RectInfo.js +3 -1
  89. package/es/Picture/component/DefaultRects/index.d.ts +13 -0
  90. package/es/Picture/component/DefaultRects/utils.d.ts +2 -0
  91. package/es/Picture/component/DefaultRects/utils.js +1 -1
  92. package/es/Picture/component/DrawRect/index.d.ts +13 -0
  93. package/es/Picture/component/RectMenu/index.d.ts +12 -0
  94. package/es/Picture/component/RectMenu/index.js +6 -0
  95. package/es/Picture/component/RectMenu/utils.d.ts +12 -0
  96. package/es/Picture/component/Tools/index.d.ts +12 -0
  97. package/es/Picture/component/WheelScale/index.d.ts +7 -0
  98. package/es/Picture/demo.d.ts +2 -0
  99. package/es/Picture/index.d.ts +5 -0
  100. package/es/Picture/loadCaptureRectImage.d.ts +3 -0
  101. package/es/Picture/useDraw.d.ts +1 -0
  102. package/es/Picture/utils.d.ts +26 -0
  103. package/es/Player/api/index.d.ts +68 -0
  104. package/es/Player/context.d.ts +17 -0
  105. package/es/Player/contraller_bar/bar.d.ts +8 -0
  106. package/es/Player/contraller_bar/contraller_event.d.ts +6 -0
  107. package/es/Player/contraller_bar/contraller_event.js +2 -0
  108. package/es/Player/contraller_bar/index.d.ts +14 -0
  109. package/es/Player/contraller_bar/left_bar.d.ts +10 -0
  110. package/es/Player/contraller_bar/right_bar.d.ts +8 -0
  111. package/es/Player/contraller_bar/time.d.ts +3 -0
  112. package/es/Player/contraller_bar/useBarStatus.d.ts +2 -0
  113. package/es/Player/contraller_bar/volume.d.ts +9 -0
  114. package/es/Player/contraller_bar/volume.js +1 -1
  115. package/es/Player/demo.d.ts +3 -0
  116. package/es/Player/empty.d.ts +2 -0
  117. package/es/Player/event/errorEvent.d.ts +14 -0
  118. package/es/Player/event/eventName.d.ts +18 -0
  119. package/es/Player/event/index.d.ts +24 -0
  120. package/es/Player/fps_play.d.ts +11 -0
  121. package/es/Player/frontend_player.d.ts +8 -0
  122. package/es/Player/frontend_timeline.d.ts +10 -0
  123. package/es/Player/iconfont.d.ts +5 -0
  124. package/es/Player/index.d.ts +2 -0
  125. package/es/Player/live_heart.d.ts +8 -0
  126. package/es/Player/message.d.ts +5 -0
  127. package/es/Player/message.js +4 -0
  128. package/es/Player/segment_player.d.ts +9 -0
  129. package/es/Player/segment_timeline.d.ts +12 -0
  130. package/es/Player/single_player.d.ts +5 -0
  131. package/es/Player/timeline.d.ts +5 -0
  132. package/es/Player/util.d.ts +43 -0
  133. package/es/PlayerExt/demo.d.ts +3 -0
  134. package/es/PlayerExt/index.d.ts +48 -0
  135. package/es/Progress/index.d.ts +7 -9
  136. package/es/ROI/demo.d.ts +3 -0
  137. package/es/ROI/index.d.ts +33 -0
  138. package/es/RefDrawer/Footer.d.ts +9 -0
  139. package/es/RefDrawer/demo.d.ts +3 -0
  140. package/es/RefDrawer/index.d.ts +26 -0
  141. package/es/RefModal/demo.d.ts +3 -0
  142. package/es/RefModal/index.d.ts +17 -0
  143. package/es/ScreenPlayer/Live.d.ts +5 -0
  144. package/es/ScreenPlayer/LiveTools.d.ts +29 -0
  145. package/es/ScreenPlayer/LiveTools.js +2 -2
  146. package/es/ScreenPlayer/PlayerWithExt.d.ts +34 -0
  147. package/es/ScreenPlayer/RatePick.d.ts +8 -0
  148. package/es/ScreenPlayer/Record.d.ts +10 -0
  149. package/es/ScreenPlayer/RecordTools.d.ts +38 -0
  150. package/es/ScreenPlayer/RecordTools.js +14 -14
  151. package/es/ScreenPlayer/ScreenSelect.d.ts +7 -0
  152. package/es/ScreenPlayer/SegmentTimeLine.d.ts +17 -0
  153. package/es/ScreenPlayer/TimeMode.d.ts +7 -0
  154. package/es/ScreenPlayer/TimeSelect.d.ts +7 -0
  155. package/es/ScreenPlayer/demo.d.ts +2 -0
  156. package/es/ScreenPlayer/demo2.d.ts +2 -0
  157. package/es/ScreenPlayer/index.d.ts +6 -0
  158. package/es/ScreenPlayer/useTimeSlider.d.ts +25 -0
  159. package/es/ScreenPlayer/useTimeSlider.js +36 -36
  160. package/es/ScreenPlayer/useVideoFit.d.ts +5 -0
  161. package/es/ScreenPlayer/utils.d.ts +17 -0
  162. package/es/SegmentPlayer/index.d.ts +2 -0
  163. package/es/Service/http.d.ts +6 -0
  164. package/es/Service/index.d.ts +3 -0
  165. package/es/Service/middleware.d.ts +8 -0
  166. package/es/SocketEmitter/eventEmitter.d.ts +27 -0
  167. package/es/SocketEmitter/index.d.ts +24 -0
  168. package/es/TableLayout/index.d.ts +10 -0
  169. package/es/ThemeAntd/demo.d.ts +4 -0
  170. package/es/ThemeAntd/index.d.ts +7 -0
  171. package/es/Timeout/index.d.ts +26 -0
  172. package/es/bigNumberTransformCN/index.d.ts +5 -0
  173. package/es/cache/index.d.ts +34 -0
  174. package/es/copy/index.d.ts +1 -0
  175. package/es/getThemeStyle/index.d.ts +2 -0
  176. package/es/index.d.ts +62 -0
  177. package/es/likeGo/index.d.ts +2 -0
  178. package/es/likeGoSync/index.d.ts +2 -0
  179. package/es/logger/index.d.ts +7 -0
  180. package/es/nextTick/index.d.ts +1 -0
  181. package/es/recorder/demo.d.ts +3 -0
  182. package/es/recorder/index.d.ts +294 -0
  183. package/es/submidstr/index.d.ts +5 -0
  184. package/es/treeHelper/index.d.ts +11 -0
  185. package/es/useDrawROI/index.d.ts +16 -0
  186. package/es/useEventEmitterHandle/index.d.ts +2 -0
  187. package/es/useFullscreen/demo.d.ts +2 -0
  188. package/es/useFullscreen/index.d.ts +12 -0
  189. package/es/useHistory/index.d.ts +3 -0
  190. package/es/useInfiniteScroll/index.d.ts +16 -0
  191. package/es/useRafInterval/index.d.ts +5 -0
  192. package/es/useRafInterval/index.js +1 -0
  193. package/es/useSimpleState/index.d.ts +3 -0
  194. package/es/useVirtualList/index.d.ts +13 -0
  195. package/es/utils.d.ts +14 -0
  196. package/es/uuid/index.d.ts +1 -0
  197. package/package.json +1 -2
@@ -5,6 +5,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
5
5
  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; }
6
6
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
7
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
+ // eslint-disable-next-line @typescript-eslint/triple-slash-reference
8
9
  /// <reference path="../AMap.d.ts" />
9
10
  var AMapInstance = /*#__PURE__*/function () {
10
11
  function AMapInstance(ele, config) {
@@ -55,6 +56,7 @@ var AMapInstance = /*#__PURE__*/function () {
55
56
  }, {
56
57
  key: "mapReset",
57
58
  value: function mapReset() {
59
+ //@ts-ignore
58
60
  this.setZoomAndCenter(this.config.zoom, this.config.center);
59
61
  }
60
62
  }, {
@@ -0,0 +1,18 @@
1
+ import { IMapInstance, IMapOptions, Map, LatLng } from '../interface';
2
+ declare class LeafletInstance implements IMapInstance {
3
+ map: Map;
4
+ config: IMapOptions;
5
+ mapContainer: HTMLDivElement;
6
+ constructor(ele: HTMLDivElement, config: IMapOptions);
7
+ createMap(): void;
8
+ destoryMap(): void;
9
+ setZoomAndCenter(zoom: number, center: [number, number] | LatLng): void;
10
+ mapReset(): void;
11
+ setZoom(zoom: number): void;
12
+ setCenter(center: [number, number] | LatLng): void;
13
+ getZoom(): number;
14
+ on(type: string, fn: (event: any) => void): void;
15
+ off(type: string, fn: (event: any) => void): void;
16
+ setCursor(cursor: string): void;
17
+ }
18
+ export default LeafletInstance;
@@ -23,7 +23,8 @@ var LeafletInstance = /*#__PURE__*/function () {
23
23
  maxZoom = _this$config.maxZoom,
24
24
  minZoom = _this$config.minZoom,
25
25
  crsStr = _this$config.crs,
26
- url = _this$config.url,
26
+ _this$config$url = _this$config.url,
27
+ url = _this$config$url === void 0 ? '' : _this$config$url,
27
28
  zoomOffset = _this$config.zoomOffset,
28
29
  center = _this$config.center,
29
30
  zoom = _this$config.zoom,
@@ -72,7 +73,8 @@ var LeafletInstance = /*#__PURE__*/function () {
72
73
  value: function mapReset() {
73
74
  var _this$config2 = this.config,
74
75
  center = _this$config2.center,
75
- zoom = _this$config2.zoom;
76
+ _this$config2$zoom = _this$config2.zoom,
77
+ zoom = _this$config2$zoom === void 0 ? 1 : _this$config2$zoom;
76
78
  this.setZoomAndCenter(zoom, center);
77
79
  }
78
80
  }, {
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ interface IWithLoaderMapProps {
4
+ MAP_GLABAL_KEY?: 'L' | 'AMap';
5
+ children: React.ReactNode;
6
+ className?: string;
7
+ }
8
+ declare function WithLoaderMap({ MAP_GLABAL_KEY, children, className }: IWithLoaderMapProps): React.JSX.Element;
9
+ export default WithLoaderMap;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const App: () => React.JSX.Element;
3
+ export default App;
@@ -0,0 +1,5 @@
1
+ /// <reference path="../AMap.d.ts" />
2
+ import { MapPoint, Marker, LClusterInterface } from '../interface';
3
+ import './index.less';
4
+ export declare function useMarkerCluster(onPointClick?: (point: MapPoint) => void): (LClusterInterface & AMap.MarkerCluster) | null;
5
+ export declare function useMarkers(points?: MapPoint[]): Marker[];
@@ -10,6 +10,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
10
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; }
11
11
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
12
12
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
+ // eslint-disable-next-line @typescript-eslint/triple-slash-reference
13
14
  /// <reference path="../AMap.d.ts" />
14
15
  import { useContext, useEffect, useRef, useState } from 'react';
15
16
  import useMapType from "../hook/useMapType";
@@ -36,6 +37,7 @@ export function useMarkerCluster(onPointClick) {
36
37
  var L = window.L;
37
38
  var clusterGroup = L.markerClusterGroup(clusterOptions);
38
39
  clusterGroup.addTo(instance.map);
40
+ //@ts-ignore
39
41
  clusterRef.current = clusterGroup;
40
42
  }
41
43
  if (type.AMap) {
@@ -48,7 +50,7 @@ export function useMarkerCluster(onPointClick) {
48
50
  content: data.deviceName,
49
51
  direction: 'top'
50
52
  });
51
- onPointClick && context.marker.on('click', function () {
53
+ if (onPointClick) context.marker.on('click', function () {
52
54
  return onPointClick(data);
53
55
  });
54
56
  }
@@ -58,8 +60,9 @@ export function useMarkerCluster(onPointClick) {
58
60
  return;
59
61
  }
60
62
  var lnglat = e === null || e === void 0 ? void 0 : e.lnglat;
61
- lnglat && instance.setZoomAndCenter(instance.getZoom() + 1, lnglat);
63
+ if (lnglat) instance.setZoomAndCenter(instance.getZoom() + 1, lnglat);
62
64
  });
65
+ //@ts-ignore
63
66
  clusterRef.current = cluster;
64
67
  });
65
68
  }
@@ -68,6 +71,7 @@ export function useMarkerCluster(onPointClick) {
68
71
  }, []);
69
72
  useUnmount(function () {
70
73
  try {
74
+ //@ts-ignore
71
75
  instance.map.remove(clusterRef.current);
72
76
  } catch (_) {}
73
77
  });
@@ -0,0 +1,6 @@
1
+ /// <reference path="../AMap.d.ts" />
2
+ import React from 'react';
3
+ import { IClusterLayerProps } from './props';
4
+ import './index.less';
5
+ declare function ClusterLayer({ points, onPointClick, children }: IClusterLayerProps): React.JSX.Element;
6
+ export default ClusterLayer;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { customConfigProps } from '../interface';
3
+ interface IConfigProps {
4
+ children: React.ReactElement;
5
+ MAP_GLABAL_KEY?: 'L' | 'AMap';
6
+ customConfig?: customConfigProps;
7
+ }
8
+ declare function Config({ children, MAP_GLABAL_KEY, customConfig, ...props }: IConfigProps): React.JSX.Element;
9
+ export default Config;
@@ -0,0 +1,2 @@
1
+ import { customConfigProps, IMapOptions } from '../interface';
2
+ export declare function queryMapConfig(type: string, customConfig?: customConfigProps): Promise<IMapOptions>;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { IMapInstance } from '../interface';
3
+ export interface IContenxtProps {
4
+ instance: IMapInstance;
5
+ glaobalKey: 'L' | 'AMap';
6
+ }
7
+ export declare const mapContext: React.Context<IContenxtProps>;
8
+ export declare const Provider: React.Provider<IContenxtProps>;
9
+ export declare const Consumer: React.Consumer<IContenxtProps>;
10
+ declare function map(Component: new () => React.Component<any>): React.ForwardRefExoticComponent<React.RefAttributes<unknown>>;
11
+ export default map;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ declare function FindPio(): React.JSX.Element;
4
+ export default FindPio;
@@ -0,0 +1,4 @@
1
+ /// <reference path="../AMap.d.ts" />
2
+ import React from 'react';
3
+ import { InfoWindowProps } from '.';
4
+ export default function MakerLikeWindow({ children, visible, center, width, height }: InfoWindowProps): React.JSX.Element;
@@ -7,13 +7,15 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
7
7
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
8
8
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
9
9
  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; }
10
+ // eslint-disable-next-line @typescript-eslint/triple-slash-reference
10
11
  /// <reference path="../AMap.d.ts" />
11
12
 
12
13
  import React, { useContext, useEffect, useRef } from 'react';
13
- import ReactDOM from 'react-dom';
14
+ // import ReactDOM from 'react-dom';
14
15
  import { mapContext } from "../Context";
15
16
  import useMapType from "../hook/useMapType";
16
17
  import { useUnmount, useEventListener } from 'ahooks';
18
+ import { createRoot } from 'react-dom/client';
17
19
  var maxIndex = 20;
18
20
  export default function MakerLikeWindow(_ref) {
19
21
  var children = _ref.children,
@@ -33,6 +35,7 @@ export default function MakerLikeWindow(_ref) {
33
35
  // leaflet下还未实现
34
36
 
35
37
  if (type.AMap && !markerRef.current) {
38
+ //@ts-ignore
36
39
  var marker = new AMap.Marker({
37
40
  content: domref.current,
38
41
  visible: false,
@@ -40,7 +43,8 @@ export default function MakerLikeWindow(_ref) {
40
43
  map: instance.map,
41
44
  offset: [-width * 0.5, -height - 32]
42
45
  });
43
- markerRef.current = marker;
46
+ //@ts-ignore
47
+ markerRef.cFurrent = marker;
44
48
  marker.on('click', function () {
45
49
  maxIndex++;
46
50
  if (marker.getzIndex() !== maxIndex) {
@@ -57,13 +61,25 @@ export default function MakerLikeWindow(_ref) {
57
61
  if (type.AMap) {
58
62
  var lnglat = _construct(AMap.LngLat, _toConsumableArray(center));
59
63
  if (visible) {
64
+ //@ts-ignore
60
65
  marker.setPosition(lnglat);
66
+ //@ts-ignore
61
67
  marker.setContent(domref.current);
62
- ReactDOM.render(children, domref.current);
68
+ //@ts-ignore
69
+ if (domref.current) {
70
+ // 创建渲染器实例
71
+ var root = createRoot(domref.current);
72
+ // 使用渲染器实例进行渲染
73
+ root.render(children);
74
+ }
75
+ //@ts-ignore
63
76
  marker.show();
64
77
  } else {
78
+ //@ts-ignore
65
79
  marker.hide();
66
- ReactDOM.unmountComponentAtNode(domref.current);
80
+ // //@ts-ignore
81
+ // ReactDOM.unmountComponentAtNode(domref.current);
82
+ //@ts-ignore
67
83
  instance.map.remove(markerRef.current);
68
84
  markerRef.current = null;
69
85
  }
@@ -72,18 +88,23 @@ export default function MakerLikeWindow(_ref) {
72
88
  }, [visible, center, instance.map]);
73
89
  useUnmount(function () {
74
90
  try {
91
+ //@ts-ignore
75
92
  instance.map.remove(markerRef.current);
76
93
  markerRef.current = null;
77
94
  } catch (_) {}
78
95
  });
79
- useEventListener('mouseover', function () {
96
+ useEventListener('mouseover',
97
+ //@ts-ignore
98
+ function () {
80
99
  return instance.map.setStatus({
81
100
  zoomEnable: false
82
101
  });
83
102
  }, {
84
103
  target: domref
85
104
  });
86
- useEventListener('mouseout', function () {
105
+ useEventListener('mouseout',
106
+ //@ts-ignore
107
+ function () {
87
108
  return instance.map.setStatus({
88
109
  zoomEnable: true
89
110
  });
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const App: () => React.JSX.Element;
3
+ export default App;
@@ -0,0 +1,11 @@
1
+ /// <reference path="../AMap.d.ts" />
2
+ import React from 'react';
3
+ export interface InfoWindowProps {
4
+ children: JSX.Element;
5
+ visible?: boolean;
6
+ center?: [number, number];
7
+ width: number;
8
+ height: number;
9
+ }
10
+ declare function InfoWindow({ children, visible, center, width, height }: InfoWindowProps): React.JSX.Element;
11
+ export default InfoWindow;
@@ -51,7 +51,11 @@ function InfoWindow(_ref) {
51
51
  var lnglat = _construct(AMap.LngLat, _toConsumableArray(center));
52
52
  map.setCenter(lnglat);
53
53
  // eslint-disable-next-line @typescript-eslint/no-unused-expressions
54
- visible ? !infoWindow.getIsOpen() ? (infoWindow.close(), infoWindow.open(instance.map, lnglat)) : infoWindow.open(instance.map, lnglat) : infoWindow.close();
54
+ visible ? !infoWindow.getIsOpen()
55
+ //@ts-ignore
56
+ ? (infoWindow.close(), infoWindow.open(instance.map, lnglat)
57
+ //@ts-ignore
58
+ ) : infoWindow.open(instance.map, lnglat) : infoWindow.close();
55
59
  }
56
60
  // eslint-disable-next-line react-hooks/exhaustive-deps
57
61
  }, [visible, center, instance.map]);
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ export interface IDragMarkerProps {
3
+ center?: [number, number];
4
+ onChange?: (options: {
5
+ center: [number, number];
6
+ }) => void;
7
+ title?: string;
8
+ }
9
+ declare function DragMarker({ center, title, onChange }: IDragMarkerProps): React.JSX.Element;
10
+ export default DragMarker;
@@ -10,6 +10,7 @@ function DragMarker(_ref) {
10
10
  var _useContext = useContext(mapContext),
11
11
  instance = _useContext.instance;
12
12
  var type = useMapType();
13
+ //@ts-ignore
13
14
  var marker = useMarker({
14
15
  map: instance.map,
15
16
  center: center,
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const App: () => React.JSX.Element;
3
+ export default App;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { LatLng, MapPoint } from '../interface';
3
+ export interface ILevelCenter {
4
+ center?: [number, number];
5
+ zoom?: number;
6
+ points?: MapPoint[];
7
+ enableClick?: boolean;
8
+ onLevelCenterChange?: (options: {
9
+ center: [number, number] | LatLng;
10
+ zoom: number;
11
+ }) => void;
12
+ children?: React.ReactNode;
13
+ }
14
+ declare const _default: (props: ILevelCenter) => React.JSX.Element;
15
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface ILoaderMapProps {
3
+ children: React.ReactElement;
4
+ MAP_GLABAL_KEY?: 'L' | 'AMap';
5
+ }
6
+ declare function LoaderMap({ children, MAP_GLABAL_KEY, ...props }: ILoaderMapProps): React.JSX.Element;
7
+ export default LoaderMap;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const App: () => React.JSX.Element;
3
+ export default App;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { DrawType, MapPoint } from '../interface';
3
+ export interface IMapDrawSelectProps {
4
+ center?: [number, number];
5
+ zoom?: number;
6
+ points: MapPoint[];
7
+ children?: React.ReactNode;
8
+ drawUi?: React.ReactNode;
9
+ drawType?: DrawType | 'clear' | 'close';
10
+ selectCenter?: [number, number];
11
+ drawEnd?: (points: MapPoint[]) => void;
12
+ onPointClick?: (point: MapPoint) => void;
13
+ }
14
+ declare const _default: (props: IMapDrawSelectProps) => React.JSX.Element;
15
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { DrawType, MapPoint } from '../interface';
3
+ interface IMouseTool {
4
+ ui: React.ReactNode;
5
+ drawType?: DrawType | 'clear' | 'close';
6
+ drawEnd?: (points: MapPoint[]) => void;
7
+ points?: MapPoint[];
8
+ }
9
+ declare function MouseTool({ ui, drawType, points, drawEnd }: IMouseTool): React.JSX.Element;
10
+ export default MouseTool;
@@ -0,0 +1,7 @@
1
+ import { DrawType } from '../interface';
2
+ declare function useMouseTools(onDrawEnd?: (obj: any) => void): {
3
+ clear: (objs: any[]) => void;
4
+ draw: (type: DrawType) => void;
5
+ close: (ifClear?: boolean) => void;
6
+ };
7
+ export default useMouseTools;
@@ -40,7 +40,8 @@ function useMouseTools(onDrawEnd) {
40
40
  return undefined;
41
41
  }
42
42
  var fn = function fn(e) {
43
- overlayersRef.current.push(e.obj);
43
+ //@ts-ignore
44
+ overlayersRef.current.push(e === null || e === void 0 ? void 0 : e.obj);
44
45
  onDrawEnd === null || onDrawEnd === void 0 || onDrawEnd(e.obj);
45
46
  };
46
47
  mouseRef.current.on('draw', fn);
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import '../../Player/style/iconfont';
3
+ import './index.less';
4
+ export interface IResetTools {
5
+ onMapReset?: () => void;
6
+ onMapZoom?: (num: number) => void;
7
+ className?: string;
8
+ }
9
+ declare function ResetTools({ onMapReset, onMapZoom, className }: IResetTools): React.JSX.Element;
10
+ export default ResetTools;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const App: () => React.JSX.Element;
3
+ export default App;
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ import { MapPoint } from '../interface';
3
+ import './index.less';
4
+ export interface ISinglePlayerProps {
5
+ /**
6
+ * 点位经纬度
7
+ */
8
+ center?: [number, number];
9
+ /**
10
+ * 展示标题
11
+ */
12
+ title?: string;
13
+ points?: MapPoint[];
14
+ /**
15
+ * 开启点击设置
16
+ */
17
+ enableClick?: boolean;
18
+ /**
19
+ * 中心点变化
20
+ */
21
+ onCenterChange?: (options: {
22
+ center: [number, number];
23
+ }) => void;
24
+ children?: React.ReactNode;
25
+ }
26
+ declare const _default: (props: ISinglePlayerProps) => React.JSX.Element;
27
+ export default _default;
@@ -16,6 +16,7 @@ function SinglePoint(_ref) {
16
16
  children = _ref.children;
17
17
  var _useContext = useContext(mapContext),
18
18
  instance = _useContext.instance;
19
+ //@ts-ignore
19
20
  var mapRest = useCallback(function () {
20
21
  return instance.setZoomAndCenter(instance.config.zoom, center !== null && center !== void 0 ? center : instance.config.center);
21
22
  }, [center, instance]);
@@ -0,0 +1,2 @@
1
+ declare function useMapEvent(type: string, fn: (event: any) => void): void;
2
+ export default useMapEvent;
@@ -0,0 +1,4 @@
1
+ export default function useMapType(): {
2
+ leaflet: boolean;
3
+ AMap: boolean;
4
+ };
@@ -0,0 +1,2 @@
1
+ export declare const LevelCenterCenterSvg = "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"28px\" height=\"40px\" viewBox=\"0 0 28 40\" version=\"1.1\"><defs><linearGradient x1=\"6.38826004%\" y1=\"96.2639042%\" x2=\"66.7998206%\" y2=\"14.972142%\" id=\"linearGradient-1\"><stop stop-color=\"#000000\" stop-opacity=\"0.2\" offset=\"0%\"/><stop stop-color=\"#000000\" stop-opacity=\"0\" offset=\"100%\"/></linearGradient></defs><g id=\"Img/Add\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\"><path d=\"M22,28 L28,28 L15.2872963,39.7348034 C15.102574,39.9053163 14.8604062,40 14.6090162,40 L14,40 C13.7238576,40 13.5,39.7761424 13.5,39.5 C13.5,39.3918149 13.5350889,39.2865481 13.6,39.2 L22,28 Z\" id=\"Rectangle\" fill=\"url(#linearGradient-1)\"/><path d=\"M11,23 L17,23 L15.103901,39.1168412 C15.0446525,39.6204542 14.6178366,40 14.1107504,40 L13.8892496,40 C13.3821634,40 12.9553475,39.6204542 12.896099,39.1168412 L11,23 Z\" id=\"Rectangle\" fill=\"#FF8800\"/><circle id=\"Oval\" stroke=\"#FF8800\" fill=\"#FFAA00\" cx=\"14\" cy=\"12\" r=\"11.5\"/><circle id=\"Oval\" fill=\"#FF8800\" cx=\"15\" cy=\"13\" r=\"4\"/><circle id=\"Oval\" fill=\"#FFFFFF\" cx=\"14\" cy=\"12\" r=\"4\"/></g></svg>";
2
+ export declare function createMapCenterIcon(): import("leaflet").DivIcon;
@@ -0,0 +1,24 @@
1
+ /// <reference types="react" />
2
+ import BasicMap from './BasicMap';
3
+ import ClusterLayer from './ClusterLayer';
4
+ import Config from './Config';
5
+ import Context from './Context';
6
+ import FindPio from './FindPio';
7
+ import LoaderMap from './LoaderMap';
8
+ import ResetTools from './ResetTools';
9
+ import useMarker from './useMarker';
10
+ import withMap from './withMap';
11
+ declare const Map: {
12
+ ClusterLayer: typeof ClusterLayer;
13
+ Config: typeof Config;
14
+ Context: typeof Context;
15
+ FindPio: typeof FindPio;
16
+ LevelCenter: (props: import("./LevelCenter").ILevelCenter) => import("react").JSX.Element;
17
+ LoaderMap: typeof LoaderMap;
18
+ BasicMap: typeof BasicMap;
19
+ ResetTools: typeof ResetTools;
20
+ SinglePoint: (props: import("./SinglePoint").ISinglePlayerProps) => import("react").JSX.Element;
21
+ useMarker: typeof useMarker;
22
+ withMap: typeof withMap;
23
+ };
24
+ export default Map;
@@ -0,0 +1,74 @@
1
+ declare const data: ({
2
+ cid: string;
3
+ deviceName: string;
4
+ deviceStatus: string;
5
+ deviceType: string;
6
+ id: string;
7
+ latitude: string;
8
+ longitude: string;
9
+ manufacturerDeviceId: string;
10
+ manufacturerDeviceType: string;
11
+ organizationIds: string[];
12
+ pathId: number[];
13
+ placeId: string;
14
+ sn: string;
15
+ boxNum: string;
16
+ cameraType: number;
17
+ hasFrontEnd: boolean;
18
+ hasStorage: boolean;
19
+ parentId: string;
20
+ accessType: string;
21
+ villageLocationType: string;
22
+ placeTags: string[];
23
+ createTime: string;
24
+ lygroupId?: undefined;
25
+ } | {
26
+ cid: string;
27
+ deviceName: string;
28
+ deviceStatus: string;
29
+ deviceType: string;
30
+ id: string;
31
+ latitude: string;
32
+ longitude: string;
33
+ lygroupId: string;
34
+ manufacturerDeviceId: string;
35
+ manufacturerDeviceType: string;
36
+ organizationIds: string[];
37
+ pathId: number[];
38
+ placeId: string;
39
+ sn: string;
40
+ boxNum: string;
41
+ cameraType: number;
42
+ hasFrontEnd: boolean;
43
+ hasStorage: boolean;
44
+ parentId: string;
45
+ accessType: string;
46
+ villageLocationType: string;
47
+ placeTags: string[];
48
+ createTime: string;
49
+ } | {
50
+ cid: string;
51
+ deviceName: string;
52
+ deviceStatus: string;
53
+ deviceType: string;
54
+ id: string;
55
+ latitude: string;
56
+ longitude: string;
57
+ manufacturerDeviceId: string;
58
+ manufacturerDeviceType: string;
59
+ organizationIds: string[];
60
+ pathId: number[];
61
+ placeId: string;
62
+ sn: string;
63
+ boxNum: string;
64
+ cameraType: null;
65
+ hasFrontEnd: boolean;
66
+ hasStorage: boolean;
67
+ parentId: string;
68
+ accessType: string;
69
+ villageLocationType: string;
70
+ placeTags: string[];
71
+ createTime: string;
72
+ lygroupId?: undefined;
73
+ })[];
74
+ export default data;
@@ -0,0 +1,10 @@
1
+ /// <reference path="../AMap.d.ts" />
2
+ import { Map } from '../interface';
3
+ export interface IUseMarkerProps {
4
+ map: Map;
5
+ center: [number, number];
6
+ createIcon: (options?: any) => any;
7
+ options?: AMap.MarkerOptions;
8
+ }
9
+ declare function useMarker({ map, center, createIcon, options }: IUseMarkerProps): any;
10
+ export default useMarker;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare function withMap<P>(Component: any, className?: string): (props: P) => React.JSX.Element;
3
+ export default withMap;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { RectType } from '../../interface';
3
+ interface IRectInfoProps {
4
+ item: RectType;
5
+ containerDom: HTMLDivElement;
6
+ }
7
+ declare function RectInfo({ item, containerDom }: IRectInfoProps): React.JSX.Element;
8
+ export default RectInfo;
@@ -18,6 +18,7 @@ function RectInfo(_ref) {
18
18
  height = _containerDom$getBoun.height;
19
19
  var _rectInfoWidth$rectIn = {
20
20
  rectInfoWidth: RECT_INFO_WIDTH,
21
+ //@ts-ignore
21
22
  rectInfoHeight: item.tags.length * RECT_INFO_HEIGHT + 6 + 30
22
23
  },
23
24
  rectInfoWidth = _rectInfoWidth$rectIn.rectInfoWidth,
@@ -44,6 +45,7 @@ function RectInfo(_ref) {
44
45
  width: rectInfoWidth,
45
46
  height: rectInfoHeight
46
47
  };
48
+ //@ts-ignore
47
49
  }, [containerDom, item.rect, item.tags.length]);
48
50
  return /*#__PURE__*/React.createElement("div", {
49
51
  className: "rect-info-list-wrapper",
@@ -65,7 +67,7 @@ function RectInfo(_ref) {
65
67
  type: 'lm-player_Photo_repeatingdata'
66
68
  }), "\u91CD\u590D")), /*#__PURE__*/React.createElement("ul", {
67
69
  className: "rect-info-list"
68
- }, item.tags.map(function (v, index) {
70
+ }, item.tags && item.tags.map(function (v, index) {
69
71
  return /*#__PURE__*/React.createElement("li", {
70
72
  className: "info-item",
71
73
  key: index,
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { RectType } from '../../interface';
3
+ import './index.less';
4
+ interface IDefaultRectsProps {
5
+ rects: RectType[];
6
+ containerDom: HTMLDivElement;
7
+ onClickRect?: (item: RectType & {
8
+ base64: string;
9
+ }) => void;
10
+ getRectImage: (rect: number[]) => string | null;
11
+ }
12
+ declare function DefaultRects({ rects, containerDom, onClickRect, getRectImage }: IDefaultRectsProps): React.JSX.Element;
13
+ export default DefaultRects;
@@ -0,0 +1,2 @@
1
+ import { RectType } from '../../interface';
2
+ export declare function computedZIndex(rects: RectType[]): RectType[];
@@ -6,6 +6,6 @@ export function computedZIndex(rects) {
6
6
  return v;
7
7
  });
8
8
  return areas.sort(function (a, b) {
9
- return b.area - a.area;
9
+ return (b.area || 0) - (a.area || 0);
10
10
  });
11
11
  }