@cloud-app-dev/vidc 4.0.21 → 4.0.22

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 (190) hide show
  1. package/es/CustomRenderSelect/index.js +0 -1
  2. package/es/Drag/DragAndDropItem.js +0 -1
  3. package/es/Drag/index.d.ts +9 -7
  4. package/es/Map/InfoWindow/MakerLikeWindow.js +2 -6
  5. package/es/Map/InfoWindow/index.js +1 -5
  6. package/es/Player/contraller_bar/contraller_event.js +0 -2
  7. package/es/Player/message.js +0 -4
  8. package/es/Progress/index.d.ts +9 -7
  9. package/es/ScreenPlayer/LiveTools.js +5 -5
  10. package/es/ScreenPlayer/RecordTools.js +10 -38
  11. package/es/ScreenPlayer/useTimeSlider.js +9 -4
  12. package/es/useRafInterval/index.js +0 -1
  13. package/es/uuid/index.js +18 -5
  14. package/package.json +2 -3
  15. package/tsconfig.json +1 -1
  16. package/es/AppContext/Sync.d.ts +0 -8
  17. package/es/AppContext/index.d.ts +0 -10
  18. package/es/AppContext/static.d.ts +0 -8
  19. package/es/Auth/index.d.ts +0 -8
  20. package/es/AutoExit/index.d.ts +0 -6
  21. package/es/CheckGroupFixed/demo.d.ts +0 -3
  22. package/es/CheckGroupFixed/index.d.ts +0 -24
  23. package/es/Config/index.d.ts +0 -4
  24. package/es/Config/utils.d.ts +0 -4
  25. package/es/ConfigContext/index.d.ts +0 -17
  26. package/es/CustomRenderSelect/index.d.ts +0 -12
  27. package/es/DBTools/index.d.ts +0 -25
  28. package/es/DisableMark/index.d.ts +0 -9
  29. package/es/DomMove/demo.d.ts +0 -2
  30. package/es/DomMove/index.d.ts +0 -16
  31. package/es/DomMove/utils.d.ts +0 -8
  32. package/es/Drag/DragAndDropItem.d.ts +0 -4
  33. package/es/Drag/DropItem.d.ts +0 -4
  34. package/es/DynamicGridList/Demo.d.ts +0 -3
  35. package/es/DynamicGridList/index.d.ts +0 -24
  36. package/es/DynamicList/demo.d.ts +0 -2
  37. package/es/DynamicList/index.d.ts +0 -22
  38. package/es/DynamicList/utils.d.ts +0 -4
  39. package/es/ErrorFallback/index.d.ts +0 -9
  40. package/es/EventTools/index.d.ts +0 -3
  41. package/es/FrontendPlayer/index.d.ts +0 -4
  42. package/es/FullScreen/index.d.ts +0 -22
  43. package/es/GridList/Demo.d.ts +0 -3
  44. package/es/GridList/data.d.ts +0 -16
  45. package/es/GridList/hook.d.ts +0 -13
  46. package/es/GridList/index.d.ts +0 -15
  47. package/es/GridList/utils.d.ts +0 -9
  48. package/es/HightLevel/index.d.ts +0 -9
  49. package/es/IconFont/index.d.ts +0 -12
  50. package/es/ImageView/index.d.ts +0 -20
  51. package/es/InstanceHistory/index.d.ts +0 -3
  52. package/es/LabelPlayer/demo.d.ts +0 -2
  53. package/es/LabelPlayer/index.d.ts +0 -21
  54. package/es/LabelValue/index.d.ts +0 -15
  55. package/es/List/demo.d.ts +0 -3
  56. package/es/List/index.d.ts +0 -28
  57. package/es/ListWithSizeAnimate/demo.d.ts +0 -2
  58. package/es/ListWithSizeAnimate/index.d.ts +0 -14
  59. package/es/LoaderScript/index.d.ts +0 -47
  60. package/es/LoaderScript/utils.d.ts +0 -13
  61. package/es/Map/BasicMap/AMapInstance.d.ts +0 -19
  62. package/es/Map/BasicMap/LeafletInstance.d.ts +0 -18
  63. package/es/Map/BasicMap/index.d.ts +0 -9
  64. package/es/Map/ClusterLayer/demo.d.ts +0 -3
  65. package/es/Map/ClusterLayer/hook.d.ts +0 -5
  66. package/es/Map/ClusterLayer/index.d.ts +0 -6
  67. package/es/Map/Config/index.d.ts +0 -9
  68. package/es/Map/Config/utils.d.ts +0 -2
  69. package/es/Map/Context/index.d.ts +0 -11
  70. package/es/Map/FindPio/index.d.ts +0 -4
  71. package/es/Map/InfoWindow/MakerLikeWindow.d.ts +0 -4
  72. package/es/Map/InfoWindow/demo.d.ts +0 -3
  73. package/es/Map/InfoWindow/index.d.ts +0 -11
  74. package/es/Map/LevelCenter/DragMarker/index.d.ts +0 -10
  75. package/es/Map/LevelCenter/demo.d.ts +0 -3
  76. package/es/Map/LevelCenter/index.d.ts +0 -15
  77. package/es/Map/LoaderMap/index.d.ts +0 -7
  78. package/es/Map/MapDrawSelect/demo.d.ts +0 -3
  79. package/es/Map/MapDrawSelect/index.d.ts +0 -15
  80. package/es/Map/MouseTool/index.d.ts +0 -10
  81. package/es/Map/MouseTool/useMouseTools.d.ts +0 -7
  82. package/es/Map/ResetTools/index.d.ts +0 -10
  83. package/es/Map/SinglePoint/demo.d.ts +0 -3
  84. package/es/Map/SinglePoint/index.d.ts +0 -27
  85. package/es/Map/hook/useMapEvent.d.ts +0 -2
  86. package/es/Map/hook/useMapType.d.ts +0 -4
  87. package/es/Map/icon.d.ts +0 -2
  88. package/es/Map/index.d.ts +0 -24
  89. package/es/Map/points.d.ts +0 -50
  90. package/es/Map/useMarker/index.d.ts +0 -10
  91. package/es/Map/withMap/index.d.ts +0 -3
  92. package/es/Picture/component/DefaultRects/RectInfo.d.ts +0 -8
  93. package/es/Picture/component/DefaultRects/index.d.ts +0 -13
  94. package/es/Picture/component/DefaultRects/utils.d.ts +0 -2
  95. package/es/Picture/component/DrawRect/index.d.ts +0 -13
  96. package/es/Picture/component/RectMenu/index.d.ts +0 -12
  97. package/es/Picture/component/RectMenu/utils.d.ts +0 -12
  98. package/es/Picture/component/Tools/index.d.ts +0 -12
  99. package/es/Picture/component/WheelScale/index.d.ts +0 -7
  100. package/es/Picture/demo.d.ts +0 -2
  101. package/es/Picture/index.d.ts +0 -5
  102. package/es/Picture/loadCaptureRectImage.d.ts +0 -3
  103. package/es/Picture/useDraw.d.ts +0 -1
  104. package/es/Picture/utils.d.ts +0 -26
  105. package/es/Player/api/index.d.ts +0 -68
  106. package/es/Player/context.d.ts +0 -17
  107. package/es/Player/contraller_bar/bar.d.ts +0 -8
  108. package/es/Player/contraller_bar/contraller_event.d.ts +0 -6
  109. package/es/Player/contraller_bar/index.d.ts +0 -14
  110. package/es/Player/contraller_bar/left_bar.d.ts +0 -10
  111. package/es/Player/contraller_bar/right_bar.d.ts +0 -8
  112. package/es/Player/contraller_bar/time.d.ts +0 -3
  113. package/es/Player/contraller_bar/useBarStatus.d.ts +0 -2
  114. package/es/Player/contraller_bar/volume.d.ts +0 -9
  115. package/es/Player/demo.d.ts +0 -3
  116. package/es/Player/empty.d.ts +0 -2
  117. package/es/Player/event/errorEvent.d.ts +0 -14
  118. package/es/Player/event/eventName.d.ts +0 -18
  119. package/es/Player/event/index.d.ts +0 -24
  120. package/es/Player/fps_play.d.ts +0 -11
  121. package/es/Player/frontend_player.d.ts +0 -8
  122. package/es/Player/frontend_timeline.d.ts +0 -10
  123. package/es/Player/iconfont.d.ts +0 -5
  124. package/es/Player/index.d.ts +0 -2
  125. package/es/Player/live_heart.d.ts +0 -8
  126. package/es/Player/message.d.ts +0 -5
  127. package/es/Player/segment_player.d.ts +0 -9
  128. package/es/Player/segment_timeline.d.ts +0 -12
  129. package/es/Player/single_player.d.ts +0 -5
  130. package/es/Player/timeline.d.ts +0 -5
  131. package/es/Player/util.d.ts +0 -43
  132. package/es/PlayerExt/demo.d.ts +0 -3
  133. package/es/PlayerExt/index.d.ts +0 -48
  134. package/es/ROI/demo.d.ts +0 -3
  135. package/es/ROI/index.d.ts +0 -33
  136. package/es/RefDrawer/Footer.d.ts +0 -9
  137. package/es/RefDrawer/demo.d.ts +0 -3
  138. package/es/RefDrawer/index.d.ts +0 -26
  139. package/es/RefModal/demo.d.ts +0 -3
  140. package/es/RefModal/index.d.ts +0 -17
  141. package/es/ScreenPlayer/Live.d.ts +0 -5
  142. package/es/ScreenPlayer/LiveTools.d.ts +0 -29
  143. package/es/ScreenPlayer/PlayerWithExt.d.ts +0 -34
  144. package/es/ScreenPlayer/RatePick.d.ts +0 -8
  145. package/es/ScreenPlayer/Record.d.ts +0 -10
  146. package/es/ScreenPlayer/RecordTools.d.ts +0 -38
  147. package/es/ScreenPlayer/ScreenSelect.d.ts +0 -7
  148. package/es/ScreenPlayer/SegmentTimeLine.d.ts +0 -17
  149. package/es/ScreenPlayer/TimeMode.d.ts +0 -7
  150. package/es/ScreenPlayer/TimeSelect.d.ts +0 -7
  151. package/es/ScreenPlayer/demo.d.ts +0 -2
  152. package/es/ScreenPlayer/demo2.d.ts +0 -2
  153. package/es/ScreenPlayer/index.d.ts +0 -6
  154. package/es/ScreenPlayer/useTimeSlider.d.ts +0 -25
  155. package/es/ScreenPlayer/useVideoFit.d.ts +0 -5
  156. package/es/ScreenPlayer/utils.d.ts +0 -17
  157. package/es/SegmentPlayer/index.d.ts +0 -2
  158. package/es/Service/http.d.ts +0 -6
  159. package/es/Service/index.d.ts +0 -3
  160. package/es/Service/middleware.d.ts +0 -8
  161. package/es/SocketEmitter/eventEmitter.d.ts +0 -27
  162. package/es/SocketEmitter/index.d.ts +0 -24
  163. package/es/TableLayout/index.d.ts +0 -10
  164. package/es/ThemeAntd/demo.d.ts +0 -4
  165. package/es/ThemeAntd/index.d.ts +0 -7
  166. package/es/Timeout/index.d.ts +0 -26
  167. package/es/bigNumberTransformCN/index.d.ts +0 -5
  168. package/es/cache/index.d.ts +0 -34
  169. package/es/copy/index.d.ts +0 -1
  170. package/es/getThemeStyle/index.d.ts +0 -2
  171. package/es/index.d.ts +0 -62
  172. package/es/likeGo/index.d.ts +0 -2
  173. package/es/likeGoSync/index.d.ts +0 -2
  174. package/es/logger/index.d.ts +0 -7
  175. package/es/nextTick/index.d.ts +0 -1
  176. package/es/recorder/demo.d.ts +0 -3
  177. package/es/recorder/index.d.ts +0 -294
  178. package/es/submidstr/index.d.ts +0 -5
  179. package/es/treeHelper/index.d.ts +0 -11
  180. package/es/useDrawROI/index.d.ts +0 -16
  181. package/es/useEventEmitterHandle/index.d.ts +0 -2
  182. package/es/useFullscreen/demo.d.ts +0 -2
  183. package/es/useFullscreen/index.d.ts +0 -12
  184. package/es/useHistory/index.d.ts +0 -3
  185. package/es/useInfiniteScroll/index.d.ts +0 -16
  186. package/es/useRafInterval/index.d.ts +0 -5
  187. package/es/useSimpleState/index.d.ts +0 -3
  188. package/es/useVirtualList/index.d.ts +0 -13
  189. package/es/utils.d.ts +0 -14
  190. package/es/uuid/index.d.ts +0 -5
@@ -23,7 +23,6 @@ function CustomRenderSelect(_ref) {
23
23
  _ref$selectAotoClose = _ref.selectAotoClose,
24
24
  selectAotoClose = _ref$selectAotoClose === void 0 ? true : _ref$selectAotoClose,
25
25
  props = _objectWithoutProperties(_ref, _excluded);
26
- //@ts-ignore
27
26
  var classname = useMemo(function () {
28
27
  return "custom-render-select-dropdown-".concat(uuid());
29
28
  }, []);
@@ -21,7 +21,6 @@ function DragAndDropItem(_ref) {
21
21
  onDropEnd = _ref.onDropEnd,
22
22
  _ref$disabledCopyElem = _ref.disabledCopyElement,
23
23
  disabledCopyElement = _ref$disabledCopyElem === void 0 ? true : _ref$disabledCopyElem;
24
- //@ts-ignore
25
24
  var id = useMemo(function () {
26
25
  return dragId || "dragId-".concat(uuid());
27
26
  }, [dragId]);
@@ -1,7 +1,9 @@
1
- import DragAndDropItem from './DragAndDropItem';
2
- import DropItem from './DropItem';
3
- declare const Drag: {
4
- DragAndDropItem: typeof DragAndDropItem;
5
- DropItem: typeof DropItem;
6
- };
7
- export default Drag;
1
+ import React from 'react';
2
+ import { IDragAndDropItemProps, IDropItemProps } from './interface';
3
+
4
+ interface IDragInterface<T> {
5
+ DragAndDropItemProps: React.FC<IDragAndDropItemProps<T>>;
6
+ DropItem: React.FC<IDropItemProps<T>>;
7
+ }
8
+
9
+ export default IDragInterface;
@@ -76,18 +76,14 @@ export default function MakerLikeWindow(_ref) {
76
76
  markerRef.current = null;
77
77
  } catch (_) {}
78
78
  });
79
- useEventListener('mouseover',
80
- //@ts-ignore
81
- function () {
79
+ useEventListener('mouseover', function () {
82
80
  return instance.map.setStatus({
83
81
  zoomEnable: false
84
82
  });
85
83
  }, {
86
84
  target: domref
87
85
  });
88
- useEventListener('mouseout',
89
- //@ts-ignore
90
- function () {
86
+ useEventListener('mouseout', function () {
91
87
  return instance.map.setStatus({
92
88
  zoomEnable: true
93
89
  });
@@ -51,11 +51,7 @@ 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()
55
- //@ts-ignore
56
- ? (infoWindow.close(), infoWindow.open(instance.map, lnglat)
57
- //@ts-ignore
58
- ) : infoWindow.open(instance.map, lnglat) : infoWindow.close();
54
+ visible ? !infoWindow.getIsOpen() ? (infoWindow.close(), infoWindow.open(instance.map, lnglat)) : infoWindow.open(instance.map, lnglat) : infoWindow.close();
59
55
  }
60
56
  // eslint-disable-next-line react-hooks/exhaustive-deps
61
57
  }, [visible, center, instance.map]);
@@ -19,13 +19,11 @@ function ContrallerEvent(_ref) {
19
19
  visibel = _useState2[0],
20
20
  setVisibel = _useState2[1];
21
21
  var showContraller = function showContraller() {
22
- //@ts-ignore
23
22
  clearTimeout(timer.current);
24
23
  setVisibel(true);
25
24
  event === null || event === void 0 || event.emit(EventName.SHOW_CONTRALLER);
26
25
  };
27
26
  var hideContraller = function hideContraller() {
28
- //@ts-ignore
29
27
  clearTimeout(timer.current);
30
28
  timer.current = setTimeout(function () {
31
29
  setVisibel(false);
@@ -40,7 +40,6 @@ function VideoMessage() {
40
40
  return '';
41
41
  }, [state.errorTimer, state.status]);
42
42
  var openLoading = function openLoading() {
43
- //@ts-ignore
44
43
  clearTimeout(timeRef.current);
45
44
  timeRef.current = setTimeout(function () {
46
45
  return setState(function (old) {
@@ -51,7 +50,6 @@ function VideoMessage() {
51
50
  }, 200);
52
51
  };
53
52
  var closeLoading = function closeLoading() {
54
- //@ts-ignore
55
53
  clearTimeout(timeRef.current);
56
54
  setState(function (old) {
57
55
  return _objectSpread(_objectSpread({}, old), {}, {
@@ -60,7 +58,6 @@ function VideoMessage() {
60
58
  });
61
59
  };
62
60
  var errorReload = function errorReload(timer) {
63
- //@ts-ignore
64
61
  clearTimeout(timeRef.current);
65
62
  setState(function () {
66
63
  return {
@@ -93,7 +90,6 @@ function VideoMessage() {
93
90
  });
94
91
  };
95
92
  var playEnd = function playEnd() {
96
- //@ts-ignore
97
93
  clearTimeout(timeRef.current);
98
94
  setState(function (old) {
99
95
  return _objectSpread(_objectSpread({}, old), {}, {
@@ -1,7 +1,9 @@
1
- import React from 'react';
2
- import './index.less';
3
- interface IProgressComponentProps {
4
- status: 'over' | 'error' | 'loading';
5
- }
6
- declare function ProgressComponent({ status }: IProgressComponentProps): React.JSX.Element;
7
- export default ProgressComponent;
1
+ import * as React from 'react';
2
+
3
+ export interface ProgressInterface {
4
+ status: 'over' | 'error' | 'loading';
5
+ }
6
+
7
+ declare const Progress: React.FunctionComponent<ProgressInterface>;
8
+
9
+ export default Progress;
@@ -122,10 +122,7 @@ function LiveTools(_ref) {
122
122
  }, /*#__PURE__*/React.createElement(IconFont, {
123
123
  type: "lm-player-quanbuguanbi",
124
124
  title: "\u5173\u95ED\u6240\u6709"
125
- })), /*#__PURE__*/React.createElement(ScreenSelect, {
126
- screenNum: screenNum,
127
- updateState: props.updateState
128
- }), /*#__PURE__*/React.createElement("span", {
125
+ })), /*#__PURE__*/React.createElement("span", {
129
126
  className: "player-tools-item",
130
127
  onClick: props.toggleFit
131
128
  }, fit === 'fill' ? /*#__PURE__*/React.createElement(IconFont, {
@@ -134,7 +131,10 @@ function LiveTools(_ref) {
134
131
  }) : /*#__PURE__*/React.createElement(IconFont, {
135
132
  type: "lm-player-huamianshiying",
136
133
  title: "\u586B\u5145"
137
- })), /*#__PURE__*/React.createElement("span", {
134
+ })), /*#__PURE__*/React.createElement(ScreenSelect, {
135
+ screenNum: screenNum,
136
+ updateState: props.updateState
137
+ }), /*#__PURE__*/React.createElement("span", {
138
138
  className: "player-tools-item",
139
139
  onClick: toggleFullscreen,
140
140
  style: {
@@ -13,11 +13,10 @@ import React from 'react';
13
13
  import Volume from "../Player/contraller_bar/volume";
14
14
  import IconFont from "../Player/iconfont";
15
15
  import useFullscreen from "../useFullscreen";
16
- import RatePick from "./RatePick";
17
16
  import ScreenSelect from "./ScreenSelect";
18
17
  import TimeSelect from "./TimeSelect";
19
18
  function RecordTools(_ref) {
20
- var _player$video$playbac, _player$video, _player$video2;
19
+ var _player$video;
21
20
  var containerRef = _ref.containerRef,
22
21
  screenNum = _ref.screenNum,
23
22
  _ref$mode = _ref.mode,
@@ -105,45 +104,18 @@ function RecordTools(_ref) {
105
104
  }, /*#__PURE__*/React.createElement(IconFont, {
106
105
  type: "lm-player-xiazai",
107
106
  title: "\u4E0B\u8F7D\u5F53\u524D\u5F55\u50CF"
108
- })), hasPlugin && /*#__PURE__*/React.createElement("span", {
107
+ })), /*#__PURE__*/React.createElement("div", {
109
108
  className: "player-tools-item",
110
- onClick: function onClick() {
111
- return props.updateState({
112
- mode: mode !== 2 ? 2 : 1
113
- });
109
+ onClick: props.onClose,
110
+ style: {
111
+ marginRight: 6
114
112
  }
115
113
  }, /*#__PURE__*/React.createElement(IconFont, {
116
- type: "lm-player-S_Device_shezhi",
117
- style: mode === 2 ? {
118
- color: 'var(--primary)'
119
- } : undefined,
120
- className: "icon-chajian",
121
- title: "\u5207\u6362".concat(mode === 1 ? '插件' : '浏览器', "\u6A21\u5F0F")
122
- })), /*#__PURE__*/React.createElement("span", {
123
- className: "player-tools-item",
124
- onClick: toggle
125
- }, /*#__PURE__*/React.createElement(IconFont, {
126
- type: "lm-player-zhuzhenplay",
127
- style: isFpsPlay ? {
128
- color: 'var(--primary)'
129
- } : undefined,
130
- title: "\u9010\u5E27\u64AD\u653E"
131
- })), /*#__PURE__*/React.createElement(RatePick, {
132
- onChange: ratechange,
133
- multipleList: multipleList,
134
- value: (_player$video$playbac = player === null || player === void 0 || (_player$video = player.video) === null || _player$video === void 0 ? void 0 : _player$video.playbackRate) !== null && _player$video$playbac !== void 0 ? _player$video$playbac : 1
135
- }), oneWinExtTools), /*#__PURE__*/React.createElement("div", {
114
+ type: "lm-player-close",
115
+ title: "\u5173\u95ED"
116
+ })), oneWinExtTools), /*#__PURE__*/React.createElement("div", {
136
117
  className: "player-tools-mid"
137
- }, /*#__PURE__*/React.createElement("div", {
138
- className: "player-tools-item",
139
- onClick: props.onClose
140
- }, /*#__PURE__*/React.createElement(IconFont, {
141
- type: "lm-player-tingzhi",
142
- title: "\u505C\u6B62",
143
- style: {
144
- fontSize: 16
145
- }
146
- })), /*#__PURE__*/React.createElement(TimeSelect, {
118
+ }, /*#__PURE__*/React.createElement(TimeSelect, {
147
119
  time: time,
148
120
  onChange: function onChange(time) {
149
121
  var _props$onTimeChange;
@@ -154,7 +126,7 @@ function RecordTools(_ref) {
154
126
  }), /*#__PURE__*/React.createElement("div", {
155
127
  className: "player-tools-item",
156
128
  onClick: playToggle
157
- }, player && !((_player$video2 = player.video) !== null && _player$video2 !== void 0 && _player$video2.paused) ? /*#__PURE__*/React.createElement(IconFont, {
129
+ }, player && !((_player$video = player.video) !== null && _player$video !== void 0 && _player$video.paused) ? /*#__PURE__*/React.createElement(IconFont, {
158
130
  type: "lm-player-Pause_Main",
159
131
  title: "\u6682\u505C",
160
132
  style: {
@@ -287,9 +287,12 @@ function useTimeSlider(canvasRef, _ref2) {
287
287
  * 触发绘制范围单位(hour)
288
288
  */
289
289
  useEventListener('mousewheel', function (event) {
290
+ var _canvasRef$current, _canvasRef$current2, _canvasRef$current3;
291
+ if (!(canvasRef !== null && canvasRef !== void 0 && (_canvasRef$current = canvasRef.current) !== null && _canvasRef$current !== void 0 && _canvasRef$current.width)) return;
290
292
  event.preventDefault();
291
293
  var delta = Math.max(-1, Math.min(1, event.wheelDelta || -event.detail));
292
- var middle_time = state.begin + state.hoursPer * 3600 * 1000 / 2; //ms 记住当前中间的时间
294
+ var event_time = state.begin + state.hoursPer * 3600 * 1000 * (event.offsetX / (canvasRef === null || canvasRef === void 0 || (_canvasRef$current2 = canvasRef.current) === null || _canvasRef$current2 === void 0 ? void 0 : _canvasRef$current2.width));
295
+ // const middle_time = state.begin + (state.hoursPer * 3600 * 1000) / 2; //ms 记住当前中间的时间
293
296
  var new_hoursPer = state.hoursPer;
294
297
  var index = hours.indexOf(new_hoursPer);
295
298
  if (delta < 0) {
@@ -307,15 +310,17 @@ function useTimeSlider(canvasRef, _ref2) {
307
310
  new_hoursPer = hours[index - 1];
308
311
  }
309
312
  }
310
- var new_begin = middle_time - state.hoursPer * 3600 * 1000 / 2; //new_begin = 当前中间的时间 - hoursPer/2
313
+ var new_event_begin = event_time - new_hoursPer * 3600 * 1000 * (event.offsetX / (canvasRef === null || canvasRef === void 0 || (_canvasRef$current3 = canvasRef.current) === null || _canvasRef$current3 === void 0 ? void 0 : _canvasRef$current3.width));
314
+
315
+ // const new_begin = middle_time - (state.hoursPer * 3600 * 1000) / 2; //new_begin = 当前中间的时间 - hoursPer/2
311
316
  setState(function (old) {
312
317
  return _objectSpread(_objectSpread({}, old), {}, {
313
- begin: new_begin,
318
+ begin: new_event_begin,
314
319
  hoursPer: new_hoursPer
315
320
  });
316
321
  });
317
322
  onTimeChange === null || onTimeChange === void 0 || onTimeChange({
318
- begin: new_begin
323
+ begin: new_event_begin
319
324
  });
320
325
  nextTick(function () {
321
326
  return onHoursPerChange === null || onHoursPerChange === void 0 ? void 0 : onHoursPerChange(new_hoursPer);
@@ -35,7 +35,6 @@ function cancelAnimationFrameIsNotDefined(t) {
35
35
  }
36
36
  var clearRafInterval = function clearRafInterval(handle) {
37
37
  if (cancelAnimationFrameIsNotDefined(handle.id)) {
38
- //@ts-ignore
39
38
  return clearInterval(handle.id);
40
39
  }
41
40
  cancelAnimationFrame(handle.id);
package/es/uuid/index.js CHANGED
@@ -1,6 +1,19 @@
1
- import { v5 as uuid } from 'uuid';
1
+ // import { v5 as uuid } from 'uuid';
2
2
 
3
- /**
4
- * 生成UUID
5
- */
6
- export default uuid;
3
+ // /**
4
+ // * 生成UUID
5
+ // */
6
+ // export default uuid;
7
+
8
+ export default function uuid() {
9
+ var s = [];
10
+ var hexDigits = '0123456789abcdef';
11
+ for (var i = 0; i < 36; i++) {
12
+ s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
13
+ }
14
+ s[14] = '4';
15
+ s[19] = hexDigits.substr(s[19] & 0x3 | 0x8, 1);
16
+ s[8] = s[13] = s[18] = s[23] = '-';
17
+ var uuidStr = s.join('');
18
+ return uuidStr;
19
+ }
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": "4.0.21",
5
+ "version": "4.0.22",
6
6
  "scripts": {
7
7
  "docs:deploy": "gh-pages -d docs-dist",
8
8
  "build": "npm run entry && father build",
@@ -63,8 +63,7 @@
63
63
  "react-error-boundary": "^3.1.4",
64
64
  "react-hotkeys-hook": "^4.4.0",
65
65
  "screenfull": "^6.0.2",
66
- "socket.io-client": "2.5.0",
67
- "uuid": "^9.0.0"
66
+ "socket.io-client": "2.5.0"
68
67
  },
69
68
  "devDependencies": {
70
69
  "@commitlint/cli": "^17.6.5",
package/tsconfig.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "strict": false,
3
+ "strict": true,
4
4
  "declaration": true,
5
5
  "skipLibCheck": true,
6
6
  "esModuleInterop": true,
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { AppContextInterface, AppStoreType } from './interface';
3
- interface ISyncProps {
4
- stateChange: (options: AppContextInterface) => void;
5
- storeChange: (store: AppStoreType) => void;
6
- }
7
- declare function Sync({ stateChange, storeChange }: ISyncProps): React.JSX.Element;
8
- export default Sync;
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { AppContextInterface } from './interface';
3
- declare function Provider({ children }: {
4
- children?: React.ReactNode;
5
- }): React.JSX.Element;
6
- declare const _default: {
7
- Provider: typeof Provider;
8
- Context: React.Context<AppContextInterface>;
9
- };
10
- export default _default;
@@ -1,8 +0,0 @@
1
- export declare const _USER_EVENT_CHANGE_ = "_USER_EVENT_CHANGE_";
2
- export declare const _OPERATION_EVENT_CHANGE_ = "_OPERATION_EVENT_CHANGE_";
3
- export declare const _LOGIN_STATUS_EVENT_CHANGE_ = "_LOGIN_STATUS_EVENT_CHANGE_";
4
- export declare const _STORE_EVENT_CHANGE_ = "_STORE_EVENT_CHANGE_";
5
- export declare const _USER_SESSION_ = "_USER_SESSION_";
6
- export declare const _OPERATION_SESSION_ = "_OPERATION_SESSION_";
7
- export declare const _LOGIN_STATUS_SESSION_ = "_LOGIN_STATUS_SESSION_";
8
- export declare const _STORE_SESSION_ = "_STORE_SESSION_";
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- interface IAuthProps {
3
- featureId: string;
4
- noAuthContent?: React.ReactNode;
5
- children?: React.ReactNode;
6
- }
7
- declare function Auth({ featureId, noAuthContent, children }: IAuthProps): React.JSX.Element;
8
- export default Auth;
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- export interface IAutoExitProps {
3
- children?: React.ReactNode;
4
- }
5
- declare function AutoExit({ children }: IAutoExitProps): React.JSX.Element;
6
- export default AutoExit;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- declare const App: () => React.JSX.Element;
3
- export default App;
@@ -1,24 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- export interface SourceDictType {
4
- value?: string | number;
5
- label: string;
6
- icon?: string;
7
- }
8
- interface ICheckGroupFixedProps {
9
- /**
10
- * label
11
- */
12
- label: string;
13
- /**
14
- * 字典
15
- */
16
- source: SourceDictType[];
17
- onChange?: (keys: string[] & number[] & boolean[]) => void;
18
- checboxSize?: number;
19
- labelSize?: number;
20
- cutRow?: number;
21
- value?: string[] & number[] & boolean[];
22
- }
23
- declare function CheckGroupFixed({ label, source, checboxSize, cutRow, labelSize, value, onChange }: ICheckGroupFixedProps): React.JSX.Element;
24
- export default CheckGroupFixed;
@@ -1,4 +0,0 @@
1
- import { ConfigJOSN } from './interface';
2
- declare const Config: ConfigJOSN;
3
- declare const LMConfig: typeof Config;
4
- export default LMConfig;
@@ -1,4 +0,0 @@
1
- import { ThemeInfoType } from './interface';
2
- export declare function insertThemeStyle(options: ThemeInfoType): void;
3
- export declare function lock(): void;
4
- export declare function unlock(): void;
@@ -1,17 +0,0 @@
1
- import React from 'react';
2
- export interface IConfigContextProps {
3
- /**
4
- * @description 用于获取微应用顶层的dom节点
5
- */
6
- root: HTMLElement;
7
- }
8
- interface IProviderProps {
9
- getContainer: () => HTMLElement;
10
- children: React.ReactNode;
11
- }
12
- declare function Provider({ getContainer, children }: IProviderProps): React.JSX.Element;
13
- declare const _default: {
14
- Context: React.Context<IConfigContextProps>;
15
- Provider: typeof Provider;
16
- };
17
- export default _default;
@@ -1,12 +0,0 @@
1
- import { SelectProps } from 'antd';
2
- import React from 'react';
3
- import './index.less';
4
- interface ICustomRenderSelectProps extends SelectProps {
5
- children?: React.ReactNode;
6
- value: any;
7
- customRender: (value: any) => JSX.Element;
8
- onChange: (value: any) => void;
9
- selectAotoClose?: boolean;
10
- }
11
- declare function CustomRenderSelect({ children, value, customRender, popupClassName, getPopupContainer, onChange, selectAotoClose, ...props }: ICustomRenderSelectProps): React.JSX.Element;
12
- export default CustomRenderSelect;
@@ -1,25 +0,0 @@
1
- declare class DBInstance {
2
- LM_DB_SERVER: any;
3
- schemaName: string;
4
- version: number;
5
- constructor(schemaName: string);
6
- _init(): Promise<void>;
7
- get isClosed(): any;
8
- get({ id }: {
9
- id: string;
10
- }): Promise<{
11
- [key: string]: any;
12
- }>;
13
- put(data: {
14
- [key: string]: any;
15
- id: string;
16
- expireTime?: number;
17
- } & any): Promise<null>;
18
- remove(ids: string[]): Promise<any[]>;
19
- removeExpireData(): Promise<any[]>;
20
- clear(): Promise<any>;
21
- count(): Promise<any>;
22
- update(...args: any): Promise<any>;
23
- query(): Promise<any>;
24
- }
25
- export default DBInstance;
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- interface IDisableMarkProps {
4
- children: React.ReactNode;
5
- disabled: boolean;
6
- width?: string | number;
7
- }
8
- export default function DisableMark({ children, disabled, width }: IDisableMarkProps): React.JSX.Element;
9
- export {};
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export default function App(): React.JSX.Element;
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- import { PositionType, SizeType } from '../Picture/interface';
3
- interface IDomMoveProps {
4
- children: React.ReactNode;
5
- onDrag?: (e: MouseEvent, position: PositionType) => void;
6
- onDragChange?: (position: PositionType) => void;
7
- onDragEnd?: (e: MouseEvent, position: PositionType) => void;
8
- position?: PositionType;
9
- size?: SizeType;
10
- disabled?: boolean;
11
- className?: string;
12
- style?: React.CSSProperties;
13
- forwordRef?: React.MutableRefObject<any>;
14
- }
15
- declare const _default: React.ForwardRefExoticComponent<IDomMoveProps & React.RefAttributes<unknown>>;
16
- export default _default;
@@ -1,8 +0,0 @@
1
- export declare function getPosition(obj: any): {
2
- left: any;
3
- top: any;
4
- };
5
- export declare function getMouseXY(e: MouseEvent): {
6
- x: number;
7
- y: number;
8
- };
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import { IDragAndDropItemProps } from './interface';
3
- declare function DragAndDropItem<T>({ children, dragData, dragId, style, onDropEnd, disabledCopyElement }: IDragAndDropItemProps<T>): React.FunctionComponentElement<any>;
4
- export default DragAndDropItem;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import { IDropItemProps } from './interface';
3
- declare function DropItem<T>({ children, style, onDropEnd }: IDropItemProps<T>): React.FunctionComponentElement<any>;
4
- export default DropItem;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- declare const App: () => React.JSX.Element;
3
- export default App;
@@ -1,24 +0,0 @@
1
- import React from 'react';
2
- import { GridListCell } from '../GridList/interface';
3
- import { TData } from '../useInfiniteScroll';
4
- export interface IDynamicGridListProps<T> {
5
- itemHeight?: number;
6
- className?: string;
7
- /**
8
- * 重载条件
9
- */
10
- reloadDeps?: any[];
11
- /**
12
- * render列表
13
- * @param options
14
- */
15
- renderItem: (item: T, cell: GridListCell<T>) => React.ReactNode;
16
- loadPage(d?: TData<T>): Promise<TData<T>>;
17
- itemWidth?: number;
18
- itemKey: string;
19
- getGridGap?: (...args: any) => number;
20
- isNoMore?: (data?: TData<T>) => boolean;
21
- threshold?: number;
22
- }
23
- declare function DynamicGridList<T>({ renderItem, itemHeight, itemKey, itemWidth, reloadDeps, getGridGap, loadPage, isNoMore, threshold, ...props }: IDynamicGridListProps<T>): React.JSX.Element;
24
- export default DynamicGridList;
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export default function (): React.JSX.Element;
@@ -1,22 +0,0 @@
1
- import React from 'react';
2
- import type { TData } from '../useInfiniteScroll';
3
- import './index.less';
4
- export interface IDynamicListProps<T> {
5
- itemHeight?: number;
6
- itemClassName?: string;
7
- /**
8
- * 重载条件
9
- */
10
- reloadDeps?: any[];
11
- /**
12
- * render列表
13
- * @param options
14
- */
15
- renderItem(options: {
16
- index: number;
17
- data: T;
18
- }): JSX.Element;
19
- loadPage(d?: TData<T>): Promise<TData<T>>;
20
- }
21
- declare function DynamicList<T>({ renderItem, itemHeight, itemClassName, reloadDeps, loadPage }: IDynamicListProps<T>): React.JSX.Element;
22
- export default DynamicList;
@@ -1,4 +0,0 @@
1
- export declare const LIMIT = 10;
2
- export declare const skeletonList: {
3
- skeleton: boolean;
4
- }[];
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import { ErrorBoundaryProps } from './inerface';
3
- interface IErrorFallbackProps {
4
- error: Error;
5
- resetErrorBoundary: () => void;
6
- }
7
- declare function ErrorFallback({ error, resetErrorBoundary }: IErrorFallbackProps): React.JSX.Element;
8
- export declare const errorBoundaryOptions: ErrorBoundaryProps;
9
- export default ErrorFallback;
@@ -1,3 +0,0 @@
1
- import EventEmitter from '../SocketEmitter/eventEmitter';
2
- declare const EventTools: EventEmitter;
3
- export default EventTools;
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- import { IFrontendPlayerProps } from '../Player/player';
3
- declare const _default: import("react").FC<IFrontendPlayerProps>;
4
- export default _default;