@cloud-app-dev/vidc 3.0.3 → 3.0.6

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 (57) hide show
  1. package/.umirc.ts +12 -7
  2. package/es/DisableMark/index.css +9 -0
  3. package/es/DisableMark/index.d.ts +8 -0
  4. package/es/DisableMark/index.js +10 -0
  5. package/es/Drawer/index.css +1 -0
  6. package/es/Map/AMap.d.ts +6841 -1308
  7. package/es/Map/BasicMap/AMapInstance.d.ts +4 -3
  8. package/es/Map/BasicMap/AMapInstance.js +18 -3
  9. package/es/Map/BasicMap/LeafletInstance.d.ts +3 -3
  10. package/es/Map/ClusterLayer/hook.d.ts +4 -4
  11. package/es/Map/ClusterLayer/hook.js +20 -24
  12. package/es/Map/ClusterLayer/index.d.ts +1 -0
  13. package/es/Map/ClusterLayer/index.js +1 -0
  14. package/es/Map/Config/utils.js +2 -2
  15. package/es/Map/InfoWindow/MakerLikeWindow.d.ts +4 -0
  16. package/es/Map/InfoWindow/MakerLikeWindow.js +103 -0
  17. package/es/Map/InfoWindow/demo.js +48 -21
  18. package/es/Map/InfoWindow/index.d.ts +7 -5
  19. package/es/Map/InfoWindow/index.js +7 -6
  20. package/es/Map/interface.d.ts +1 -1
  21. package/es/Map/useMarker/index.d.ts +2 -2
  22. package/es/Map/useMarker/index.js +3 -19
  23. package/es/Player/api/index.js +0 -1
  24. package/es/Player/demo.js +4 -3
  25. package/es/Player/event/errorEvent.js +3 -8
  26. package/es/Player/iconfont.d.ts +1 -1
  27. package/es/Player/iconfont.js +1 -1
  28. package/es/Player/live_heart.js +7 -32
  29. package/es/Player/single_player.js +6 -1
  30. package/es/Player/style/iconfont.ttf +0 -0
  31. package/es/Player/style/iconfont.woff +0 -0
  32. package/es/Player/style/iconfont.woff2 +0 -0
  33. package/es/ScreenPlayer/Live.d.ts +1 -1
  34. package/es/ScreenPlayer/Live.js +22 -4
  35. package/es/ScreenPlayer/LiveTools.d.ts +5 -1
  36. package/es/ScreenPlayer/LiveTools.js +87 -43
  37. package/es/ScreenPlayer/PlayerWithExt.js +29 -4
  38. package/es/ScreenPlayer/Record.d.ts +1 -1
  39. package/es/ScreenPlayer/Record.js +27 -8
  40. package/es/ScreenPlayer/RecordTools.d.ts +5 -1
  41. package/es/ScreenPlayer/RecordTools.js +103 -46
  42. package/es/ScreenPlayer/ScreenSelect.d.ts +7 -0
  43. package/es/ScreenPlayer/ScreenSelect.js +28 -0
  44. package/es/ScreenPlayer/SegmentTimeLine.d.ts +1 -2
  45. package/es/ScreenPlayer/SegmentTimeLine.js +9 -6
  46. package/es/ScreenPlayer/TimeSelect.d.ts +7 -0
  47. package/es/ScreenPlayer/TimeSelect.js +129 -0
  48. package/es/ScreenPlayer/demo.d.ts +1 -1
  49. package/es/ScreenPlayer/demo.js +9 -4
  50. package/es/ScreenPlayer/demo2.js +1 -1
  51. package/es/ScreenPlayer/index.css +62 -4
  52. package/es/ScreenPlayer/interface.d.ts +27 -0
  53. package/es/Timeout/index.d.ts +8 -9
  54. package/es/Timeout/index.js +17 -23
  55. package/es/index.d.ts +1 -0
  56. package/es/index.js +1 -0
  57. package/package.json +1 -1
@@ -1,5 +1,3 @@
1
- import "antd/lib/modal/style";
2
- import _Modal from "antd/lib/modal";
3
1
  import _useEventListener from "ahooks/es/useEventListener";
4
2
  import _useRafInterval from "ahooks/es/useRafInterval";
5
3
 
@@ -16,16 +14,15 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
16
14
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
17
15
 
18
16
  import React, { useEffect, useRef, useState } from 'react';
19
- //此处antd有bug不能定制样式前缀
20
- import 'antd/es/modal/style/css';
17
+
21
18
  /**
22
- *
19
+ * @desc 用户创建界面超时回调
23
20
  */
24
-
25
21
  function Timeout(_ref) {
26
22
  var contianer = _ref.contianer,
27
23
  time = _ref.time,
28
- onTimeout = _ref.onTimeout;
24
+ onTimeout = _ref.onTimeout,
25
+ ignore = _ref.ignore;
29
26
  var cuurentTimeRef = useRef(Date.now());
30
27
  var lockstatusRef = useRef(false);
31
28
 
@@ -37,15 +34,24 @@ function Timeout(_ref) {
37
34
  setState = _useState2[1];
38
35
 
39
36
  _useRafInterval(function () {
40
- return setState(function (old) {
37
+ var now = Date.now();
38
+ setState(function (old) {
41
39
  return Object.assign(Object.assign({}, old), {
42
- timelock: Date.now()
40
+ timelock: now
43
41
  });
44
42
  });
43
+ var isIgnore = ignore ? ignore() : false;
44
+
45
+ if (isIgnore) {
46
+ // 如果当前需要忽略,那么重置时间
47
+ cuurentTimeRef.current = now;
48
+ }
45
49
  }, 1 * 1000);
46
50
 
47
51
  useEffect(function () {
48
- if (!lockstatusRef.current && state.timelock - cuurentTimeRef.current > time * 1000) {
52
+ var isIgnore = ignore ? ignore() : false;
53
+
54
+ if (!lockstatusRef.current && state.timelock - cuurentTimeRef.current > time * 1000 && !isIgnore) {
49
55
  lockstatusRef.current = true;
50
56
  onTimeout && onTimeout();
51
57
  setTimeout(function () {
@@ -64,20 +70,8 @@ function Timeout(_ref) {
64
70
  return /*#__PURE__*/React.createElement(React.Fragment, null);
65
71
  }
66
72
 
67
- function defaultTimeoutAction() {
68
- return _Modal.warning({
69
- title: '系统提示',
70
- content: /*#__PURE__*/React.createElement("p", null, "\u60A8\u957F\u65F6\u95F4\u672A\u64CD\u4F5C\u7CFB\u7EDF\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55\uFF01"),
71
- onOk: function onOk() {
72
- sessionStorage.clear();
73
- window.location.replace('/login');
74
- }
75
- });
76
- }
77
-
78
73
  Timeout.defaultProps = {
79
74
  time: 15 * 60,
80
- contianer: document.body,
81
- onTimeout: defaultTimeoutAction
75
+ contianer: document.body
82
76
  };
83
77
  export default Timeout;
package/es/index.d.ts CHANGED
@@ -6,6 +6,7 @@ export { default as Box } from './Box';
6
6
  export { default as CheckGroupFixed } from './CheckGroupFixed';
7
7
  export { default as Config } from './Config';
8
8
  export { default as ConfigContext } from './ConfigContext';
9
+ export { default as DisableMark } from './DisableMark';
9
10
  export { default as DomMove } from './DomMove';
10
11
  export { default as Drag } from './Drag';
11
12
  export { default as Drawer } from './Drawer';
package/es/index.js CHANGED
@@ -6,6 +6,7 @@ export { default as Box } from './Box';
6
6
  export { default as CheckGroupFixed } from './CheckGroupFixed';
7
7
  export { default as Config } from './Config';
8
8
  export { default as ConfigContext } from './ConfigContext';
9
+ export { default as DisableMark } from './DisableMark';
9
10
  export { default as DomMove } from './DomMove';
10
11
  export { default as Drag } from './Drag';
11
12
  export { default as Drawer } from './Drawer';
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "private": false,
3
3
  "name": "@cloud-app-dev/vidc",
4
4
  "description": "Video Image Data Componennts",
5
- "version": "3.0.3",
5
+ "version": "3.0.6",
6
6
  "scripts": {
7
7
  "start": "dumi dev",
8
8
  "docs:build": "dumi build",