@cloud-app-dev/vidc 3.0.21 → 3.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.
- package/.umirc.ts +1 -1
- package/es/RIO/demo.d.ts +2 -0
- package/es/RIO/demo.js +16 -0
- package/es/RIO/index.css +29 -0
- package/es/RIO/index.d.ts +8 -0
- package/es/RIO/index.js +47 -0
- package/es/RIO/utils.d.ts +1 -0
- package/es/RIO/utils.js +1 -0
- package/es/ScreenPlayer/Record.js +37 -19
- package/es/ScreenPlayer/demo2.js +17 -1
- package/es/ScreenPlayer/useRecordList.js +134 -67
- package/es/ScreenPlayer/useTimeSlider.js +1 -16
- package/es/index.d.ts +2 -0
- package/es/index.js +2 -0
- package/es/useDrawRIO/index.d.ts +12 -0
- package/es/useDrawRIO/index.js +282 -0
- package/package.json +4 -1
package/.umirc.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { defineConfig } from 'dumi';
|
|
|
2
2
|
import path from 'path';
|
|
3
3
|
|
|
4
4
|
const token =
|
|
5
|
-
'eyJhbGciOiJIUzI1NiJ9.
|
|
5
|
+
'eyJhbGciOiJIUzI1NiJ9.eyJvcmdhbml6YXRpb25JZCI6IjEwMDEwMTAwMDQ0NSIsImV4dCI6MTY2MzkyNzM5NjQzMCwidWlkIjoiMTAxMDAwMDAwNjk5IiwidmFsaWRTdGF0ZSI6MTA0NDA2LCJyb2xlSWQiOlsxMDAwMDAxMTA1MTgsMTAwMDAwMTEwNzI4XSwidmFsaWRUaW1lIjoxNzA0MzgzOTk5MDAwLCJvcHRDZW50ZXJJZCI6IjEwMDEwMDAwMDIzMyIsInVzZXJUeXBlIjoxMDA3MDQsImlhdCI6MTY2MzY2ODE5NjQzMH0.bJbtN-QjTUGGSIJRfR1ycjhtGt6UCEsrS29CYN-AAfw';
|
|
6
6
|
|
|
7
7
|
export default defineConfig({
|
|
8
8
|
title: 'CloudApp VIDC',
|
package/es/RIO/demo.d.ts
ADDED
package/es/RIO/demo.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import RIO from './index';
|
|
3
|
+
|
|
4
|
+
var App = function App() {
|
|
5
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
6
|
+
style: {
|
|
7
|
+
width: 600,
|
|
8
|
+
height: 400,
|
|
9
|
+
background: '#999'
|
|
10
|
+
}
|
|
11
|
+
}, /*#__PURE__*/React.createElement(RIO, {
|
|
12
|
+
debug: true
|
|
13
|
+
}));
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export default App;
|
package/es/RIO/index.css
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
.rio-layout {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
position: relative;
|
|
5
|
+
}
|
|
6
|
+
.rio-layout canvas {
|
|
7
|
+
position: absolute;
|
|
8
|
+
left: 0;
|
|
9
|
+
top: 0;
|
|
10
|
+
width: 100%;
|
|
11
|
+
height: 100%;
|
|
12
|
+
}
|
|
13
|
+
.rio-layout .rio-debug-box {
|
|
14
|
+
position: absolute;
|
|
15
|
+
left: 0;
|
|
16
|
+
top: 0;
|
|
17
|
+
width: 100%;
|
|
18
|
+
height: 100%;
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
}
|
|
22
|
+
.rio-layout .rio-debug-box > div {
|
|
23
|
+
display: flex;
|
|
24
|
+
flex: 1;
|
|
25
|
+
}
|
|
26
|
+
.rio-layout .rio-debug-box > div span {
|
|
27
|
+
flex: 1;
|
|
28
|
+
border: 1px solid #eee;
|
|
29
|
+
}
|
package/es/RIO/index.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import _useMount from "ahooks/es/useMount";
|
|
2
|
+
import React, { useEffect, useRef } from 'react';
|
|
3
|
+
import useDrawRIO from '../useDrawRIO';
|
|
4
|
+
import "./index.css";
|
|
5
|
+
var ROW = 18;
|
|
6
|
+
var ROW_ITEMS = 32;
|
|
7
|
+
|
|
8
|
+
function RIO(_ref) {
|
|
9
|
+
var children = _ref.children,
|
|
10
|
+
debug = _ref.debug;
|
|
11
|
+
var ref = useRef(null);
|
|
12
|
+
|
|
13
|
+
var _useDrawRIO = useDrawRIO(ref, {
|
|
14
|
+
row: ROW,
|
|
15
|
+
rowItems: ROW_ITEMS
|
|
16
|
+
}),
|
|
17
|
+
open = _useDrawRIO.open,
|
|
18
|
+
rio = _useDrawRIO.rio;
|
|
19
|
+
|
|
20
|
+
_useMount(function () {
|
|
21
|
+
return open();
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
useEffect(function () {
|
|
25
|
+
console.log(rio);
|
|
26
|
+
}, [rio]);
|
|
27
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
28
|
+
className: "rio-layout"
|
|
29
|
+
}, children, debug && /*#__PURE__*/React.createElement("div", {
|
|
30
|
+
className: "rio-debug-box"
|
|
31
|
+
}, rio.map(function (item, index) {
|
|
32
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
33
|
+
key: "row-".concat(index)
|
|
34
|
+
}, item.map(function (n, i) {
|
|
35
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
36
|
+
key: "item-".concat(i),
|
|
37
|
+
style: {
|
|
38
|
+
backgroundColor: n === 1 ? 'rgba(0,0,0,0.5)' : 'transparent'
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}));
|
|
42
|
+
})), /*#__PURE__*/React.createElement("canvas", {
|
|
43
|
+
ref: ref
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export default RIO;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function drawMark(ctx: CanvasRenderingContext2D, x: number, y: number): void;
|
package/es/RIO/utils.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function drawMark(ctx, x, y) {}
|
|
@@ -15,6 +15,8 @@ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symb
|
|
|
15
15
|
|
|
16
16
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
17
17
|
|
|
18
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
19
|
+
|
|
18
20
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
19
21
|
|
|
20
22
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -140,35 +142,49 @@ function RecordPlayer(_a) {
|
|
|
140
142
|
return;
|
|
141
143
|
}
|
|
142
144
|
|
|
143
|
-
var diffIndexs = differenceWithIndexs(listKey.split('-'), prevListKey.split('-'))
|
|
144
|
-
return v.value !== FILTER_KEY;
|
|
145
|
-
});
|
|
145
|
+
var diffIndexs = differenceWithIndexs(listKey.split('-'), prevListKey.split('-'));
|
|
146
146
|
|
|
147
147
|
if (diffIndexs.length === 0) {
|
|
148
148
|
return;
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
var i = diffIndexs[0].idx; // 变化索引
|
|
152
|
-
|
|
153
151
|
setState(function (old) {
|
|
154
152
|
var mergeList = old.mergeSegments;
|
|
155
|
-
var times = old.currentTimes;
|
|
156
|
-
var item = list[i];
|
|
153
|
+
var times = old.currentTimes; // 批量更新调整
|
|
157
154
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
}
|
|
155
|
+
var _iterator = _createForOfIteratorHelper(diffIndexs),
|
|
156
|
+
_step;
|
|
161
157
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
158
|
+
try {
|
|
159
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
160
|
+
var dif = _step.value;
|
|
161
|
+
var i = dif.idx;
|
|
162
|
+
var item = list[i];
|
|
163
|
+
|
|
164
|
+
if (!item) {
|
|
165
|
+
// 可能是外部的关闭动作关闭
|
|
166
|
+
mergeList[i] = undefined;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
if (item) {
|
|
170
|
+
if (!mergeList[i]) {
|
|
171
|
+
mergeList[i] = {};
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
mergeList[i].date = item.date;
|
|
175
|
+
mergeList[i].segments = mergeList[i].cid !== item.cid ? [] : mergeList[i].segments;
|
|
176
|
+
mergeList[i].cid = item.cid;
|
|
177
|
+
mergeList[i].recordType = item.recordType; // 更新变化的currentTime
|
|
165
178
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
179
|
+
times[i] = list[i].date;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
} catch (err) {
|
|
183
|
+
_iterator.e(err);
|
|
184
|
+
} finally {
|
|
185
|
+
_iterator.f();
|
|
186
|
+
}
|
|
170
187
|
|
|
171
|
-
times[i] = list[i].date;
|
|
172
188
|
return Object.assign(Object.assign({}, old), {
|
|
173
189
|
mergeSegments: _toConsumableArray(mergeList),
|
|
174
190
|
currentTimes: _toConsumableArray(times)
|
|
@@ -432,7 +448,9 @@ function RecordPlayer(_a) {
|
|
|
432
448
|
snapshot: snapshot,
|
|
433
449
|
oneWinExtTools: oneWinExtTools,
|
|
434
450
|
allWinExtTools: allWinExtTools
|
|
435
|
-
}), /*#__PURE__*/React.createElement(
|
|
451
|
+
})), /*#__PURE__*/React.createElement(DisableMark, {
|
|
452
|
+
disabled: !segmentItem.cid
|
|
453
|
+
}, /*#__PURE__*/React.createElement(SegmentTimeLine, {
|
|
436
454
|
begin: timeBegin,
|
|
437
455
|
updateState: updateState,
|
|
438
456
|
segments: segmentItem.segments,
|
package/es/ScreenPlayer/demo2.js
CHANGED
|
@@ -28,7 +28,7 @@ import RecordPlayer from './Record';
|
|
|
28
28
|
import moment from 'moment';
|
|
29
29
|
import Service from '../Service';
|
|
30
30
|
import { completionSegments } from './utils';
|
|
31
|
-
var token = "eyJhbGciOiJIUzI1NiJ9.
|
|
31
|
+
var token = "eyJhbGciOiJIUzI1NiJ9.eyJvcmdhbml6YXRpb25JZCI6IjEwMDEwMTAwMDQ0NSIsImV4dCI6MTY2MzkyNzM5NjQzMCwidWlkIjoiMTAxMDAwMDAwNjk5IiwidmFsaWRTdGF0ZSI6MTA0NDA2LCJyb2xlSWQiOlsxMDAwMDAxMTA1MTgsMTAwMDAwMTEwNzI4XSwidmFsaWRUaW1lIjoxNzA0MzgzOTk5MDAwLCJvcHRDZW50ZXJJZCI6IjEwMDEwMDAwMDIzMyIsInVzZXJUeXBlIjoxMDA3MDQsImlhdCI6MTY2MzY2ODE5NjQzMH0.bJbtN-QjTUGGSIJRfR1ycjhtGt6UCEsrS29CYN-AAfw";
|
|
32
32
|
var cids = ['538509097', '539172446'];
|
|
33
33
|
|
|
34
34
|
var query = function query(_ref) {
|
|
@@ -148,6 +148,22 @@ export default function App() {
|
|
|
148
148
|
idx: idx
|
|
149
149
|
});
|
|
150
150
|
});
|
|
151
|
+
},
|
|
152
|
+
onClose: function onClose() {
|
|
153
|
+
var list = state.list;
|
|
154
|
+
list[state.idx] = undefined;
|
|
155
|
+
setState(function (old) {
|
|
156
|
+
return Object.assign(Object.assign({}, old), {
|
|
157
|
+
list: _toConsumableArray(list)
|
|
158
|
+
});
|
|
159
|
+
});
|
|
160
|
+
},
|
|
161
|
+
onCloseAll: function onCloseAll() {
|
|
162
|
+
return setState(function (old) {
|
|
163
|
+
return Object.assign(Object.assign({}, old), {
|
|
164
|
+
list: []
|
|
165
|
+
});
|
|
166
|
+
});
|
|
151
167
|
}
|
|
152
168
|
}))));
|
|
153
169
|
}
|
|
@@ -13,6 +13,8 @@ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symb
|
|
|
13
13
|
|
|
14
14
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
15
15
|
|
|
16
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
17
|
+
|
|
16
18
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
17
19
|
|
|
18
20
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -51,14 +53,13 @@ export default function useRecordList(list, queryRecord) {
|
|
|
51
53
|
|
|
52
54
|
_useAsyncEffect(function () {
|
|
53
55
|
return __awaiter(_this, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
54
|
-
var diffIndexs, index, item, record, segments,
|
|
56
|
+
var diffIndexs, arr, _iterator, _step, dif, index, item, record, segments, _segments, _segments2, _segments3;
|
|
57
|
+
|
|
55
58
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
56
59
|
while (1) {
|
|
57
60
|
switch (_context.prev = _context.next) {
|
|
58
61
|
case 0:
|
|
59
|
-
diffIndexs = differenceWithIndexs(listKey ? listKey.split('-') : [], prevListKey ? prevListKey.split('-') : [])
|
|
60
|
-
return v.value !== FILTER_KEY;
|
|
61
|
-
});
|
|
62
|
+
diffIndexs = differenceWithIndexs(listKey ? listKey.split('-') : [], prevListKey ? prevListKey.split('-') : []);
|
|
62
63
|
|
|
63
64
|
if (!(diffIndexs.length === 0)) {
|
|
64
65
|
_context.next = 3;
|
|
@@ -68,137 +69,203 @@ export default function useRecordList(list, queryRecord) {
|
|
|
68
69
|
return _context.abrupt("return");
|
|
69
70
|
|
|
70
71
|
case 3:
|
|
71
|
-
|
|
72
|
+
arr = []; // 存在披露更新的情况
|
|
73
|
+
|
|
74
|
+
_iterator = _createForOfIteratorHelper(diffIndexs);
|
|
75
|
+
_context.prev = 5;
|
|
76
|
+
|
|
77
|
+
_iterator.s();
|
|
72
78
|
|
|
79
|
+
case 7:
|
|
80
|
+
if ((_step = _iterator.n()).done) {
|
|
81
|
+
_context.next = 38;
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
dif = _step.value;
|
|
86
|
+
index = dif.idx;
|
|
73
87
|
item = list[index];
|
|
74
88
|
record = state.cidSegments[index];
|
|
75
89
|
|
|
76
|
-
if (!
|
|
77
|
-
|
|
90
|
+
if (!item) {
|
|
91
|
+
arr.push({
|
|
92
|
+
idx: index,
|
|
93
|
+
type: 'delete',
|
|
94
|
+
segments: []
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if (!(item && item.cid && item.date)) {
|
|
99
|
+
_context.next = 36;
|
|
78
100
|
break;
|
|
79
101
|
}
|
|
80
102
|
|
|
81
103
|
if (record) {
|
|
82
|
-
_context.next =
|
|
104
|
+
_context.next = 21;
|
|
83
105
|
break;
|
|
84
106
|
}
|
|
85
107
|
|
|
86
|
-
|
|
87
|
-
type = 'add';
|
|
88
|
-
_context.next = 11;
|
|
108
|
+
_context.next = 17;
|
|
89
109
|
return queryRecord({
|
|
90
110
|
cid: item.cid,
|
|
91
111
|
date: item.date,
|
|
92
112
|
recordType: item.recordType
|
|
93
113
|
});
|
|
94
114
|
|
|
95
|
-
case
|
|
115
|
+
case 17:
|
|
96
116
|
segments = _context.sent;
|
|
97
|
-
|
|
117
|
+
arr.push({
|
|
118
|
+
idx: index,
|
|
119
|
+
type: 'add',
|
|
120
|
+
segments: segments
|
|
121
|
+
});
|
|
122
|
+
_context.next = 36;
|
|
98
123
|
break;
|
|
99
124
|
|
|
100
|
-
case
|
|
125
|
+
case 21:
|
|
101
126
|
if (!(record.cid !== item.cid || record.recordType !== item.recordType)) {
|
|
102
|
-
_context.next =
|
|
127
|
+
_context.next = 28;
|
|
103
128
|
break;
|
|
104
129
|
}
|
|
105
130
|
|
|
106
|
-
|
|
107
|
-
type = 'add';
|
|
108
|
-
_context.next = 18;
|
|
131
|
+
_context.next = 24;
|
|
109
132
|
return queryRecord({
|
|
110
133
|
cid: item.cid,
|
|
111
134
|
date: item.date,
|
|
112
135
|
recordType: item.recordType
|
|
113
136
|
});
|
|
114
137
|
|
|
115
|
-
case
|
|
116
|
-
|
|
117
|
-
|
|
138
|
+
case 24:
|
|
139
|
+
_segments = _context.sent;
|
|
140
|
+
arr.push({
|
|
141
|
+
idx: index,
|
|
142
|
+
type: 'add',
|
|
143
|
+
segments: _segments
|
|
144
|
+
});
|
|
145
|
+
_context.next = 36;
|
|
118
146
|
break;
|
|
119
147
|
|
|
120
|
-
case
|
|
148
|
+
case 28:
|
|
121
149
|
if (!(record.date !== item.date)) {
|
|
122
|
-
_context.next =
|
|
150
|
+
_context.next = 35;
|
|
123
151
|
break;
|
|
124
152
|
}
|
|
125
153
|
|
|
126
|
-
|
|
127
|
-
type = 'modify';
|
|
128
|
-
_context.next = 25;
|
|
154
|
+
_context.next = 31;
|
|
129
155
|
return queryRecord({
|
|
130
156
|
cid: item.cid,
|
|
131
157
|
date: item.date,
|
|
132
158
|
recordType: item.recordType
|
|
133
159
|
});
|
|
134
160
|
|
|
135
|
-
case
|
|
136
|
-
|
|
137
|
-
|
|
161
|
+
case 31:
|
|
162
|
+
_segments2 = _context.sent;
|
|
163
|
+
arr.push({
|
|
164
|
+
idx: index,
|
|
165
|
+
type: 'modify',
|
|
166
|
+
segments: _segments2
|
|
167
|
+
});
|
|
168
|
+
_context.next = 36;
|
|
138
169
|
break;
|
|
139
170
|
|
|
140
|
-
case
|
|
171
|
+
case 35:
|
|
141
172
|
if (Array.isArray(item.segments) && item.segments.length > 0) {
|
|
142
173
|
// 时间轴更新
|
|
143
|
-
|
|
144
|
-
|
|
174
|
+
_segments3 = item.segments;
|
|
175
|
+
arr.push({
|
|
176
|
+
idx: index,
|
|
177
|
+
type: 'modify',
|
|
178
|
+
segments: _segments3
|
|
179
|
+
});
|
|
145
180
|
} else {
|
|
146
181
|
console.debug('无变化!跳过~');
|
|
147
182
|
}
|
|
148
183
|
|
|
149
|
-
case
|
|
184
|
+
case 36:
|
|
185
|
+
_context.next = 7;
|
|
186
|
+
break;
|
|
187
|
+
|
|
188
|
+
case 38:
|
|
189
|
+
_context.next = 43;
|
|
190
|
+
break;
|
|
191
|
+
|
|
192
|
+
case 40:
|
|
193
|
+
_context.prev = 40;
|
|
194
|
+
_context.t0 = _context["catch"](5);
|
|
195
|
+
|
|
196
|
+
_iterator.e(_context.t0);
|
|
197
|
+
|
|
198
|
+
case 43:
|
|
199
|
+
_context.prev = 43;
|
|
200
|
+
|
|
201
|
+
_iterator.f();
|
|
202
|
+
|
|
203
|
+
return _context.finish(43);
|
|
204
|
+
|
|
205
|
+
case 46:
|
|
150
206
|
setState(function (old) {
|
|
151
207
|
var flag = false; //标记是否更新
|
|
152
208
|
|
|
153
209
|
var cidSegments = state.cidSegments;
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
});
|
|
167
|
-
break;
|
|
168
|
-
|
|
169
|
-
case 'modify':
|
|
170
|
-
flag = true;
|
|
171
|
-
cidSegments[index].date = item.date;
|
|
172
|
-
cidSegments[index].recordType = item.recordType;
|
|
173
|
-
var dif = differenceBy(cidSegments[index].segments, segments, 'beginTime');
|
|
174
|
-
|
|
175
|
-
if (dif.length === 0) {
|
|
176
|
-
flag = false;
|
|
177
|
-
} else {
|
|
178
|
-
var arr2 = [].concat(cidSegments[index].segments, segments);
|
|
179
|
-
arr2 = arr2.map(function (v) {
|
|
210
|
+
arr.forEach(function (_ref) {
|
|
211
|
+
var type = _ref.type,
|
|
212
|
+
segments = _ref.segments,
|
|
213
|
+
idx = _ref.idx;
|
|
214
|
+
var index = idx;
|
|
215
|
+
var item = list[index];
|
|
216
|
+
|
|
217
|
+
switch (type) {
|
|
218
|
+
case 'add':
|
|
219
|
+
flag = true;
|
|
220
|
+
var arr1 = item.segments ? [].concat(item.segments, segments) : segments;
|
|
221
|
+
arr1 = arr1.map(function (v) {
|
|
180
222
|
return Object.assign(Object.assign({}, v), {
|
|
181
223
|
id: "".concat(v.beginTime, "-").concat(v.endTime)
|
|
182
224
|
});
|
|
183
225
|
});
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
226
|
+
cidSegments[index] = Object.assign(Object.assign({}, item), {
|
|
227
|
+
segments: orderBy(uniqBy(arr1, 'id'), 'beginTime', 'asc')
|
|
228
|
+
});
|
|
229
|
+
break;
|
|
230
|
+
|
|
231
|
+
case 'delete':
|
|
232
|
+
flag = true;
|
|
233
|
+
cidSegments[index] = undefined;
|
|
234
|
+
break;
|
|
235
|
+
|
|
236
|
+
case 'modify':
|
|
237
|
+
flag = true;
|
|
238
|
+
cidSegments[index].date = item.date;
|
|
239
|
+
cidSegments[index].recordType = item.recordType;
|
|
240
|
+
var dif = differenceBy(cidSegments[index].segments, segments, 'beginTime');
|
|
241
|
+
|
|
242
|
+
if (dif.length === 0) {
|
|
243
|
+
flag = false;
|
|
244
|
+
} else {
|
|
245
|
+
var arr2 = [].concat(cidSegments[index].segments, segments);
|
|
246
|
+
arr2 = arr2.map(function (v) {
|
|
247
|
+
return Object.assign(Object.assign({}, v), {
|
|
248
|
+
id: "".concat(v.beginTime, "-").concat(v.endTime)
|
|
249
|
+
});
|
|
250
|
+
});
|
|
251
|
+
arr2 = uniqBy(arr2, 'id');
|
|
252
|
+
cidSegments[index].segments = orderBy(arr2, 'beginTime', 'asc');
|
|
253
|
+
}
|
|
190
254
|
|
|
255
|
+
break;
|
|
256
|
+
}
|
|
257
|
+
});
|
|
191
258
|
return Object.assign(Object.assign({}, old), {
|
|
192
259
|
cidSegments: flag ? _toConsumableArray(cidSegments) : cidSegments
|
|
193
260
|
});
|
|
194
261
|
});
|
|
195
262
|
|
|
196
|
-
case
|
|
263
|
+
case 47:
|
|
197
264
|
case "end":
|
|
198
265
|
return _context.stop();
|
|
199
266
|
}
|
|
200
267
|
}
|
|
201
|
-
}, _callee);
|
|
268
|
+
}, _callee, null, [[5, 40, 43, 46]]);
|
|
202
269
|
}));
|
|
203
270
|
}, [list, listKey, prevListKey]);
|
|
204
271
|
|
|
@@ -285,22 +285,7 @@ function useTimeSlider(canvasRef, _ref2) {
|
|
|
285
285
|
|
|
286
286
|
|
|
287
287
|
var get_cursor_x_position = function get_cursor_x_position(e) {
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
var _canvas$getBoundingCl = canvas.getBoundingClientRect(),
|
|
291
|
-
left = _canvas$getBoundingCl.left;
|
|
292
|
-
|
|
293
|
-
if (!e) {
|
|
294
|
-
e = window.event;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
if (e.pageX || e.pageY) {
|
|
298
|
-
posx = e.pageX - left;
|
|
299
|
-
} else if (e.clientX || e.clientY) {
|
|
300
|
-
posx = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
return posx;
|
|
288
|
+
return e.offsetX;
|
|
304
289
|
};
|
|
305
290
|
/**
|
|
306
291
|
* 更新画布大小
|
package/es/index.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export { default as Picture } from './Picture';
|
|
|
29
29
|
export { default as Player } from './Player';
|
|
30
30
|
export { default as PlayerExt } from './PlayerExt';
|
|
31
31
|
export { default as Progress } from './Progress';
|
|
32
|
+
export { default as RIO } from './RIO';
|
|
32
33
|
export { default as ScreenPlayer } from './ScreenPlayer';
|
|
33
34
|
export { default as SegmentPlayer } from './SegmentPlayer';
|
|
34
35
|
export { default as Service } from './Service';
|
|
@@ -36,6 +37,7 @@ export { default as TableLayout } from './TableLayout';
|
|
|
36
37
|
export { default as ThemeAntd } from './ThemeAntd';
|
|
37
38
|
export { default as Timeout } from './Timeout';
|
|
38
39
|
export { default as Tree } from './Tree';
|
|
40
|
+
export { default as useDrawRIO } from './useDrawRIO';
|
|
39
41
|
export { default as useFullscreen } from './useFullscreen';
|
|
40
42
|
export { default as useHistory } from './useHistory';
|
|
41
43
|
export { default as useInfiniteScroll } from './useInfiniteScroll';
|
package/es/index.js
CHANGED
|
@@ -29,6 +29,7 @@ export { default as Picture } from './Picture';
|
|
|
29
29
|
export { default as Player } from './Player';
|
|
30
30
|
export { default as PlayerExt } from './PlayerExt';
|
|
31
31
|
export { default as Progress } from './Progress';
|
|
32
|
+
export { default as RIO } from './RIO';
|
|
32
33
|
export { default as ScreenPlayer } from './ScreenPlayer';
|
|
33
34
|
export { default as SegmentPlayer } from './SegmentPlayer';
|
|
34
35
|
export { default as Service } from './Service';
|
|
@@ -36,6 +37,7 @@ export { default as TableLayout } from './TableLayout';
|
|
|
36
37
|
export { default as ThemeAntd } from './ThemeAntd';
|
|
37
38
|
export { default as Timeout } from './Timeout';
|
|
38
39
|
export { default as Tree } from './Tree';
|
|
40
|
+
export { default as useDrawRIO } from './useDrawRIO';
|
|
39
41
|
export { default as useFullscreen } from './useFullscreen';
|
|
40
42
|
export { default as useHistory } from './useHistory';
|
|
41
43
|
export { default as useInfiniteScroll } from './useInfiniteScroll';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BasicTarget } from 'ahooks/lib/utils/domTarget';
|
|
2
|
+
interface RIOOptions {
|
|
3
|
+
row: number;
|
|
4
|
+
rowItems: number;
|
|
5
|
+
}
|
|
6
|
+
declare function useDrawRIO(target: BasicTarget<HTMLCanvasElement>, { row, rowItems }: RIOOptions): {
|
|
7
|
+
open: () => void;
|
|
8
|
+
close: () => void;
|
|
9
|
+
rio: number[][];
|
|
10
|
+
status: string;
|
|
11
|
+
};
|
|
12
|
+
export default useDrawRIO;
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import _useEventListener from "ahooks/es/useEventListener";
|
|
2
|
+
import _useMount from "ahooks/es/useMount";
|
|
3
|
+
import _useLatest from "ahooks/es/useLatest";
|
|
4
|
+
|
|
5
|
+
function _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest(); }
|
|
6
|
+
|
|
7
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
8
|
+
|
|
9
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
|
+
|
|
11
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
12
|
+
|
|
13
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
14
|
+
|
|
15
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
16
|
+
|
|
17
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
18
|
+
|
|
19
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
20
|
+
|
|
21
|
+
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; }
|
|
22
|
+
|
|
23
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
24
|
+
|
|
25
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
26
|
+
|
|
27
|
+
import { getTargetElement } from 'ahooks/lib/utils/domTarget';
|
|
28
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
29
|
+
import { lineString } from '@turf/helpers';
|
|
30
|
+
import lineToPolygon from '@turf/line-to-polygon';
|
|
31
|
+
import booleanDisjoint from '@turf/boolean-disjoint';
|
|
32
|
+
|
|
33
|
+
function useDrawRIO(target, _ref) {
|
|
34
|
+
var row = _ref.row,
|
|
35
|
+
rowItems = _ref.rowItems;
|
|
36
|
+
|
|
37
|
+
var _useState = useState({
|
|
38
|
+
pos: [],
|
|
39
|
+
tempPos: [],
|
|
40
|
+
saveArea: [],
|
|
41
|
+
isOpen: false
|
|
42
|
+
}),
|
|
43
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
44
|
+
state = _useState2[0],
|
|
45
|
+
setState = _useState2[1];
|
|
46
|
+
|
|
47
|
+
var isOpenRef = _useLatest(state.isOpen);
|
|
48
|
+
|
|
49
|
+
_useMount(function () {
|
|
50
|
+
var canvas = getTargetElement(target);
|
|
51
|
+
|
|
52
|
+
var _canvas$getBoundingCl = canvas.getBoundingClientRect(),
|
|
53
|
+
width = _canvas$getBoundingCl.width,
|
|
54
|
+
height = _canvas$getBoundingCl.height;
|
|
55
|
+
|
|
56
|
+
canvas.width = width;
|
|
57
|
+
canvas.height = height;
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
_useEventListener('click', function (event) {
|
|
61
|
+
if (!isOpenRef.current) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
var p_x = event.offsetX;
|
|
66
|
+
var p_y = event.offsetY;
|
|
67
|
+
setState(function (old) {
|
|
68
|
+
var pos = old.pos; // 去掉重复点位,dbclick导致重复触发
|
|
69
|
+
|
|
70
|
+
if (!pos.find(function (_ref2) {
|
|
71
|
+
var _ref3 = _slicedToArray(_ref2, 2),
|
|
72
|
+
x = _ref3[0],
|
|
73
|
+
y = _ref3[1];
|
|
74
|
+
|
|
75
|
+
return x === p_x && y === p_y;
|
|
76
|
+
})) {
|
|
77
|
+
pos = [].concat(_toConsumableArray(pos), [[p_x, p_y]]);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return Object.assign(Object.assign({}, old), {
|
|
81
|
+
pos: pos
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
}, {
|
|
85
|
+
target: target
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
_useEventListener('dblclick', function (event) {
|
|
89
|
+
var p_x = event.offsetX;
|
|
90
|
+
var p_y = event.offsetY;
|
|
91
|
+
setState(function (old) {
|
|
92
|
+
var saveArea = old.saveArea;
|
|
93
|
+
var pos = old.pos;
|
|
94
|
+
var tempPos = old.tempPos;
|
|
95
|
+
|
|
96
|
+
if (pos.length > 2) {
|
|
97
|
+
// 去掉重复点位
|
|
98
|
+
if (!pos.find(function (_ref4) {
|
|
99
|
+
var _ref5 = _slicedToArray(_ref4, 2),
|
|
100
|
+
x = _ref5[0],
|
|
101
|
+
y = _ref5[1];
|
|
102
|
+
|
|
103
|
+
return x === p_x && y === p_y;
|
|
104
|
+
})) {
|
|
105
|
+
pos = [].concat(_toConsumableArray(pos), [[p_x, p_y]]);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
saveArea = [].concat(_toConsumableArray(saveArea), [pos]);
|
|
109
|
+
pos = [];
|
|
110
|
+
tempPos = [];
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
return Object.assign(Object.assign({}, old), {
|
|
114
|
+
pos: pos,
|
|
115
|
+
saveArea: saveArea,
|
|
116
|
+
tempPos: tempPos
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
}, {
|
|
120
|
+
target: target
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
_useEventListener('mousemove', function (event) {
|
|
124
|
+
if (!isOpenRef.current || state.pos.length === 0) {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
var p_x = event.offsetX;
|
|
129
|
+
var p_y = event.offsetY;
|
|
130
|
+
setState(function (old) {
|
|
131
|
+
return Object.assign(Object.assign({}, old), {
|
|
132
|
+
tempPos: [p_x, p_y]
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
}, {
|
|
136
|
+
target: target
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
useEffect(function () {
|
|
140
|
+
var canvas = getTargetElement(target);
|
|
141
|
+
var ctx = canvas.getContext('2d'); // 重置画布
|
|
142
|
+
|
|
143
|
+
ctx.clearRect(0, 0, canvas.width, canvas.height); // 绘制已完成的图形
|
|
144
|
+
|
|
145
|
+
state.saveArea.forEach(function (item) {
|
|
146
|
+
// 绘制坐标线
|
|
147
|
+
var _item = _toArray(item),
|
|
148
|
+
startPos = _item[0],
|
|
149
|
+
pos = _item.slice(1);
|
|
150
|
+
|
|
151
|
+
ctx.beginPath();
|
|
152
|
+
ctx.moveTo.apply(ctx, _toConsumableArray(startPos));
|
|
153
|
+
pos.forEach(function (_ref6) {
|
|
154
|
+
var _ref7 = _slicedToArray(_ref6, 2),
|
|
155
|
+
x = _ref7[0],
|
|
156
|
+
y = _ref7[1];
|
|
157
|
+
|
|
158
|
+
return ctx.lineTo(x, y);
|
|
159
|
+
});
|
|
160
|
+
ctx.lineTo.apply(ctx, _toConsumableArray(startPos));
|
|
161
|
+
ctx.strokeStyle = '#f32d37';
|
|
162
|
+
ctx.lineWidth = 2;
|
|
163
|
+
ctx.fillStyle = 'rgba(243,45,55,0.5)';
|
|
164
|
+
ctx.fill();
|
|
165
|
+
ctx.stroke();
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
if (state.pos.length === 0) {
|
|
169
|
+
return undefined;
|
|
170
|
+
} // 绘制坐标点
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
state.pos.forEach(function (_ref8) {
|
|
174
|
+
var _ref9 = _slicedToArray(_ref8, 2),
|
|
175
|
+
x = _ref9[0],
|
|
176
|
+
y = _ref9[1];
|
|
177
|
+
|
|
178
|
+
ctx.beginPath();
|
|
179
|
+
ctx.arc(x, y, 4, 0, 2 * Math.PI);
|
|
180
|
+
ctx.fillStyle = 'red';
|
|
181
|
+
ctx.fill();
|
|
182
|
+
}); // 绘制坐标线
|
|
183
|
+
|
|
184
|
+
var _state$pos = _toArray(state.pos),
|
|
185
|
+
startPos = _state$pos[0],
|
|
186
|
+
pos = _state$pos.slice(1);
|
|
187
|
+
|
|
188
|
+
ctx.beginPath();
|
|
189
|
+
ctx.moveTo.apply(ctx, _toConsumableArray(startPos));
|
|
190
|
+
pos.forEach(function (_ref10) {
|
|
191
|
+
var _ref11 = _slicedToArray(_ref10, 2),
|
|
192
|
+
x = _ref11[0],
|
|
193
|
+
y = _ref11[1];
|
|
194
|
+
|
|
195
|
+
return ctx.lineTo(x, y);
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
var _state$tempPos = _slicedToArray(state.tempPos, 2),
|
|
199
|
+
x = _state$tempPos[0],
|
|
200
|
+
y = _state$tempPos[1];
|
|
201
|
+
|
|
202
|
+
if (typeof x === 'number' && typeof y === 'number') {
|
|
203
|
+
ctx.lineTo(x, y);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
ctx.lineTo.apply(ctx, _toConsumableArray(startPos));
|
|
207
|
+
ctx.strokeStyle = '#f32d37';
|
|
208
|
+
ctx.lineWidth = 2;
|
|
209
|
+
ctx.fillStyle = 'rgba(243,45,55,0.5)';
|
|
210
|
+
ctx.fill();
|
|
211
|
+
ctx.stroke();
|
|
212
|
+
}, [state.pos, state.saveArea, state.tempPos, target]);
|
|
213
|
+
var status = useMemo(function () {
|
|
214
|
+
return state.isOpen ? 'open' : 'close';
|
|
215
|
+
}, [state.isOpen]);
|
|
216
|
+
|
|
217
|
+
var open = function open() {
|
|
218
|
+
return setState(function (old) {
|
|
219
|
+
return Object.assign(Object.assign({}, old), {
|
|
220
|
+
isOpen: true
|
|
221
|
+
});
|
|
222
|
+
});
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
var close = function close() {
|
|
226
|
+
return setState(function (old) {
|
|
227
|
+
return Object.assign(Object.assign({}, old), {
|
|
228
|
+
isOpen: false
|
|
229
|
+
});
|
|
230
|
+
});
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
var rio = useMemo(function () {
|
|
234
|
+
var canvas = getTargetElement(target);
|
|
235
|
+
|
|
236
|
+
if (!canvas) {
|
|
237
|
+
return new Array(row).fill(new Array(rowItems).fill(0));
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
var _canvas$getBoundingCl2 = canvas.getBoundingClientRect(),
|
|
241
|
+
width = _canvas$getBoundingCl2.width,
|
|
242
|
+
height = _canvas$getBoundingCl2.height;
|
|
243
|
+
|
|
244
|
+
var itemWidth = width / rowItems;
|
|
245
|
+
var itemHeight = height / row;
|
|
246
|
+
var rio = [];
|
|
247
|
+
|
|
248
|
+
for (var i = 0; i < row; i++) {
|
|
249
|
+
var arr = [];
|
|
250
|
+
|
|
251
|
+
for (var k = 0; k < rowItems; k++) {
|
|
252
|
+
var flag = false; // x表示当地的纬度,y表示当地的经度
|
|
253
|
+
|
|
254
|
+
var rect = lineToPolygon(lineString([[k * itemWidth, i * itemHeight], [(k + 1) * itemWidth, i * itemHeight], [(k + 1) * itemWidth, (i + 1) * itemHeight], [k * itemWidth, (i + 1) * itemHeight], [k * itemWidth, i * itemHeight]]));
|
|
255
|
+
|
|
256
|
+
for (var j = 0; j < state.saveArea.length; j++) {
|
|
257
|
+
var item = state.saveArea[j];
|
|
258
|
+
var area = lineToPolygon(lineString(item));
|
|
259
|
+
flag = !booleanDisjoint(rect, area);
|
|
260
|
+
|
|
261
|
+
if (flag === true) {
|
|
262
|
+
break;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
arr.push(flag ? 1 : 0);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
rio.push(arr);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
return rio;
|
|
273
|
+
}, [row, rowItems, state.saveArea, target]);
|
|
274
|
+
return {
|
|
275
|
+
open: open,
|
|
276
|
+
close: close,
|
|
277
|
+
rio: rio,
|
|
278
|
+
status: status
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
export default useDrawRIO;
|
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.
|
|
5
|
+
"version": "3.0.22",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"start": "dumi dev",
|
|
8
8
|
"docs:build": "dumi build",
|
|
@@ -31,6 +31,9 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@cloud-app-dev/flv.js": "^1.0.3",
|
|
34
|
+
"@turf/boolean-disjoint": "^6.5.0",
|
|
35
|
+
"@turf/helpers": "^6.5.0",
|
|
36
|
+
"@turf/line-to-polygon": "^6.5.0",
|
|
34
37
|
"ahooks": "^3.7.0",
|
|
35
38
|
"axios": "^0.27.2",
|
|
36
39
|
"hls.js": "^1.2.1",
|