@cloud-app-dev/vidc 4.0.2 → 4.0.4
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/.dumirc.ts +17 -4
- package/es/LabelPlayer/111.png +0 -0
- package/es/LabelPlayer/demo.d.ts +2 -0
- package/es/LabelPlayer/demo.js +123 -0
- package/es/LabelPlayer/index.d.ts +21 -0
- package/es/LabelPlayer/index.js +169 -0
- package/es/LabelPlayer/index.less +24 -0
- package/es/LoaderScript/utils.js +3 -3
- package/es/Map/BasicMap/index.js +17 -41
- package/es/Map/ClusterLayer/demo.d.ts +3 -0
- package/es/Map/ClusterLayer/demo.js +22 -0
- package/es/Map/Config/index.d.ts +3 -1
- package/es/Map/Config/index.js +17 -32
- package/es/Map/Config/utils.d.ts +2 -2
- package/es/Map/Config/utils.js +40 -51
- package/es/Map/InfoWindow/index.d.ts +2 -1
- package/es/Map/InfoWindow/index.js +19 -32
- package/es/Map/SinglePoint/demo.d.ts +3 -0
- package/es/Map/SinglePoint/demo.js +16 -0
- package/es/Map/index.d.ts +1 -1
- package/es/Map/index.js +1 -1
- package/es/Map/interface.d.ts +14 -0
- package/es/Map3D/demo.d.ts +3 -0
- package/es/Map3D/demo.js +13 -0
- package/es/Map3D/index.d.ts +4 -0
- package/es/Map3D/index.js +84 -0
- package/es/Map3D/index.less +4 -0
- package/es/Player/api/index.js +53 -18
- package/es/Player/util.js +42 -15
- package/es/ScreenPlayer/Live.js +18 -14
- package/es/ScreenPlayer/PlayerWithExt.d.ts +1 -1
- package/es/ScreenPlayer/Record.js +127 -186
- package/es/ScreenPlayer/ScreenSelect.js +63 -35
- package/es/ScreenPlayer/index.less +163 -1
- package/es/ScreenPlayer/interface.d.ts +1 -0
- package/es/ScreenPlayer/utils.js +21 -11
- package/es/index.d.ts +2 -0
- package/es/index.js +2 -0
- package/es/utils.d.ts +5 -5
- package/es/utils.js +32 -35
- package/package.json +2 -2
|
@@ -1,55 +1,83 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Popover } from 'antd';
|
|
2
2
|
import React, { useMemo } from 'react';
|
|
3
|
-
import CustomRenderSelect from "../CustomRenderSelect";
|
|
4
3
|
import IconFont from "../Player/iconfont";
|
|
5
4
|
import { ScreenType } from "./utils";
|
|
6
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
6
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
-
|
|
9
7
|
function ScreenSelect(_ref) {
|
|
10
8
|
var screenNum = _ref.screenNum,
|
|
11
|
-
|
|
9
|
+
updateState = _ref.updateState;
|
|
12
10
|
var icon = useMemo(function () {
|
|
13
11
|
var _ScreenType$find;
|
|
14
|
-
|
|
15
12
|
return (_ScreenType$find = ScreenType.find(function (v) {
|
|
16
13
|
return v.name === screenNum;
|
|
17
14
|
})) === null || _ScreenType$find === void 0 ? void 0 : _ScreenType$find.icon;
|
|
18
15
|
}, [screenNum]);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
var getScreenOptions = function getScreenOptions() {
|
|
17
|
+
return /*#__PURE__*/_jsx("div", {
|
|
18
|
+
className: "custom-select-dropdown",
|
|
19
|
+
children: ScreenType.map(function (item) {
|
|
20
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
21
|
+
className: "ant-select-item ant-select-item-option",
|
|
22
|
+
style: item.name === screenNum ? {
|
|
23
|
+
color: 'var(--primary)',
|
|
24
|
+
backgroundColor: 'var(--form-bg-light)'
|
|
25
|
+
} : {},
|
|
26
|
+
onClick: function onClick() {
|
|
27
|
+
updateState({
|
|
28
|
+
screenNum: item.name
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
32
|
+
style: {
|
|
33
|
+
paddingRight: 4,
|
|
34
|
+
color: 'var(--icon)',
|
|
35
|
+
position: 'relative',
|
|
36
|
+
top: 1
|
|
37
|
+
},
|
|
38
|
+
children: /*#__PURE__*/_jsx(IconFont, {
|
|
39
|
+
type: item.icon
|
|
40
|
+
})
|
|
41
|
+
}), item.name, "\u5206\u5C4F"]
|
|
42
|
+
}, "".concat(item.name));
|
|
43
|
+
})
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
return (
|
|
47
|
+
/*#__PURE__*/
|
|
48
|
+
// <CustomRenderSelect
|
|
49
|
+
// value={screenNum}
|
|
50
|
+
// popupClassName="custom-select-dropdown "
|
|
51
|
+
// customRender={() => (
|
|
52
|
+
// <span className="select-current-screen-item">
|
|
53
|
+
// <IconFont type={icon} />
|
|
54
|
+
// </span>
|
|
55
|
+
// )}
|
|
56
|
+
// onChange={(v) => updateState({ screenNum: v })}
|
|
57
|
+
// placement="topLeft"
|
|
58
|
+
// >
|
|
59
|
+
// {ScreenType.map((item) => (
|
|
60
|
+
// <Select.Option key={`${item.name}`} value={item.name}>
|
|
61
|
+
// <span style={{ paddingRight: 4, color: 'var(--icon)', position: 'relative', top: 1 }}>
|
|
62
|
+
// <IconFont type={item.icon} />
|
|
63
|
+
// </span>
|
|
64
|
+
// {item.name}分屏
|
|
65
|
+
// </Select.Option>
|
|
66
|
+
// ))}
|
|
67
|
+
// </CustomRenderSelect>
|
|
68
|
+
_jsx(Popover, {
|
|
69
|
+
trigger: "hover",
|
|
70
|
+
content: getScreenOptions,
|
|
71
|
+
getPopupContainer: function getPopupContainer(node) {
|
|
72
|
+
return node;
|
|
73
|
+
},
|
|
74
|
+
children: /*#__PURE__*/_jsx("span", {
|
|
24
75
|
className: "select-current-screen-item",
|
|
25
76
|
children: /*#__PURE__*/_jsx(IconFont, {
|
|
26
77
|
type: icon
|
|
27
78
|
})
|
|
28
|
-
})
|
|
29
|
-
},
|
|
30
|
-
onChange: function onChange(v) {
|
|
31
|
-
return updateState({
|
|
32
|
-
screenNum: v
|
|
33
|
-
});
|
|
34
|
-
},
|
|
35
|
-
placement: "topLeft",
|
|
36
|
-
children: ScreenType.map(function (item) {
|
|
37
|
-
return /*#__PURE__*/_jsxs(Select.Option, {
|
|
38
|
-
value: item.name,
|
|
39
|
-
children: [/*#__PURE__*/_jsx("span", {
|
|
40
|
-
style: {
|
|
41
|
-
paddingRight: 4,
|
|
42
|
-
color: 'var(--icon)',
|
|
43
|
-
position: 'relative',
|
|
44
|
-
top: 1
|
|
45
|
-
},
|
|
46
|
-
children: /*#__PURE__*/_jsx(IconFont, {
|
|
47
|
-
type: item.icon
|
|
48
|
-
})
|
|
49
|
-
}), item.name, "\u5206\u5C4F"]
|
|
50
|
-
}, "".concat(item.name));
|
|
79
|
+
})
|
|
51
80
|
})
|
|
52
|
-
|
|
81
|
+
);
|
|
53
82
|
}
|
|
54
|
-
|
|
55
83
|
export default ScreenSelect;
|
|
@@ -156,6 +156,167 @@
|
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
+
|
|
160
|
+
.ant-popover-inner-content {
|
|
161
|
+
padding: 4px 0;
|
|
162
|
+
|
|
163
|
+
.ant-select-item-option:hover {
|
|
164
|
+
background-color: var(--form-bg-dark);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/* ------------------------1分屏---------------------- */
|
|
169
|
+
.container1 {
|
|
170
|
+
display: grid;
|
|
171
|
+
grid-template-columns: repeat(1, 100%);
|
|
172
|
+
grid-template-rows: repeat(1, 100%);
|
|
173
|
+
grid-auto-flow: row dense; //排列顺序先行后列 紧密排列
|
|
174
|
+
place-content: center;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/* ------------------------4分屏---------------------- */
|
|
178
|
+
.container4 {
|
|
179
|
+
display: grid;
|
|
180
|
+
grid-template-columns: repeat(2, 50%);
|
|
181
|
+
grid-template-rows: repeat(2, 50%);
|
|
182
|
+
grid-auto-flow: row dense; //排列顺序先行后列 紧密排列
|
|
183
|
+
place-content: center;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/* ------------------------6分屏---------------------- */
|
|
187
|
+
.container6 {
|
|
188
|
+
display: grid;
|
|
189
|
+
grid-template-columns: repeat(3, 33.3%);
|
|
190
|
+
grid-template-rows: repeat(2, 50%);
|
|
191
|
+
grid-auto-flow: row dense; //排列顺序先行后列 紧密排列
|
|
192
|
+
place-content: center;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/* -----------------------8分屏---------------------- */
|
|
196
|
+
.container8 {
|
|
197
|
+
display: grid;
|
|
198
|
+
grid-template-columns: repeat(379, 0.264%);
|
|
199
|
+
grid-template-rows: repeat(846, 0.1182%);
|
|
200
|
+
grid-auto-flow: row dense; //排列顺序先行后列 紧密排列
|
|
201
|
+
place-content: center;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.item8-1 {
|
|
205
|
+
grid-column-start: 1;
|
|
206
|
+
grid-column-end: 164;
|
|
207
|
+
grid-row-start: 1;
|
|
208
|
+
grid-row-end: 424;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.item8-2 {
|
|
212
|
+
grid-column-start: 164;
|
|
213
|
+
grid-column-end: 271;
|
|
214
|
+
grid-row-start: 1;
|
|
215
|
+
grid-row-end: 282;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.item8-3 {
|
|
219
|
+
grid-column-start: 271;
|
|
220
|
+
grid-column-end: 380;
|
|
221
|
+
grid-row-start: 1;
|
|
222
|
+
grid-row-end: 282;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.item8-4 {
|
|
226
|
+
grid-column-start: 1;
|
|
227
|
+
grid-column-end: 164;
|
|
228
|
+
grid-row-start: 424;
|
|
229
|
+
grid-row-end: 847;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.item8-5 {
|
|
233
|
+
|
|
234
|
+
grid-column-start: 164;
|
|
235
|
+
grid-column-end: 271;
|
|
236
|
+
grid-row-start: 282;
|
|
237
|
+
grid-row-end: 563;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.item8-6 {
|
|
241
|
+
grid-column-start: 271;
|
|
242
|
+
grid-column-end: 380;
|
|
243
|
+
grid-row-start: 282;
|
|
244
|
+
grid-row-end: 563;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.item8-7 {
|
|
248
|
+
grid-column-start: 164;
|
|
249
|
+
grid-column-end: 271;
|
|
250
|
+
grid-row-start: 563;
|
|
251
|
+
grid-row-end: 847;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.item8-8 {
|
|
255
|
+
grid-column-start: 271;
|
|
256
|
+
grid-column-end: 380;
|
|
257
|
+
grid-row-start: 563;
|
|
258
|
+
grid-row-end: 847;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/* ------------------------9分屏---------------------- */
|
|
262
|
+
.container9 {
|
|
263
|
+
display: grid;
|
|
264
|
+
grid-template-columns: repeat(3, 33.3%);
|
|
265
|
+
grid-template-rows: repeat(3, 33.3%);
|
|
266
|
+
grid-auto-flow: row dense; //排列顺序先行后列 紧密排列
|
|
267
|
+
place-content: center;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/* ------------------------10分屏---------------------- */
|
|
271
|
+
|
|
272
|
+
.container10 {
|
|
273
|
+
display: grid;
|
|
274
|
+
grid-template-columns: repeat(4, 25%);
|
|
275
|
+
grid-template-rows: repeat(4, 25%);
|
|
276
|
+
grid-auto-flow: row dense; //排列顺序先行后列 紧密排列
|
|
277
|
+
place-content: center;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.item10-1 {
|
|
281
|
+
grid-column-start: 1;
|
|
282
|
+
grid-column-end: 3;
|
|
283
|
+
grid-row-start: 1;
|
|
284
|
+
grid-row-end: 3;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.item10-2 {
|
|
288
|
+
grid-column-start: 3;
|
|
289
|
+
grid-column-end: 5;
|
|
290
|
+
grid-row-start: 1;
|
|
291
|
+
grid-row-end: 3;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
/* ------------------------13分屏---------------------- */
|
|
296
|
+
|
|
297
|
+
.container13 {
|
|
298
|
+
display: grid;
|
|
299
|
+
grid-template-columns: repeat(4, 25%);
|
|
300
|
+
grid-template-rows: repeat(4, 25%);
|
|
301
|
+
grid-auto-flow: row dense; //排列顺序先行后列 紧密排列
|
|
302
|
+
place-content: center;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.item13-6 {
|
|
306
|
+
grid-column-start: 2;
|
|
307
|
+
grid-column-end: 4;
|
|
308
|
+
grid-row-start: 2;
|
|
309
|
+
grid-row-end: 4;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
/* ------------------------16分屏---------------------- */
|
|
313
|
+
.container16 {
|
|
314
|
+
display: grid;
|
|
315
|
+
grid-template-columns: repeat(4, 25%);
|
|
316
|
+
grid-template-rows: repeat(4, 25%);
|
|
317
|
+
grid-auto-flow: row dense; //排列顺序先行后列 紧密排列
|
|
318
|
+
place-content: center;
|
|
319
|
+
}
|
|
159
320
|
}
|
|
160
321
|
|
|
161
322
|
.player-time-select {
|
|
@@ -164,6 +325,7 @@
|
|
|
164
325
|
justify-content: space-around;
|
|
165
326
|
align-items: center;
|
|
166
327
|
}
|
|
328
|
+
|
|
167
329
|
.@{ant-prefix}-select.time-mode-select {
|
|
168
330
|
font-size: var(--fs-small);
|
|
169
331
|
color: var(--gray1);
|
|
@@ -198,4 +360,4 @@
|
|
|
198
360
|
cursor: pointer;
|
|
199
361
|
border: 1px solid var(--gray1);
|
|
200
362
|
border-radius: 2px;
|
|
201
|
-
}
|
|
363
|
+
}
|
package/es/ScreenPlayer/utils.js
CHANGED
|
@@ -2,27 +2,42 @@ export var ScreenType = [{
|
|
|
2
2
|
name: 1,
|
|
3
3
|
width: '100%',
|
|
4
4
|
height: '100%',
|
|
5
|
-
icon: '
|
|
5
|
+
icon: 'icon-S_View_ArrayNum'
|
|
6
6
|
}, {
|
|
7
7
|
name: 4,
|
|
8
8
|
width: '50%',
|
|
9
9
|
height: '50%',
|
|
10
|
-
icon: '
|
|
10
|
+
icon: 'icon-S_View_ArrayNum2'
|
|
11
11
|
}, {
|
|
12
12
|
name: 6,
|
|
13
13
|
width: '33.33333333%',
|
|
14
14
|
height: '50%',
|
|
15
|
-
icon: '
|
|
15
|
+
icon: 'icon-ArrayNum6'
|
|
16
|
+
}, {
|
|
17
|
+
name: 8,
|
|
18
|
+
width: '33.33333333%',
|
|
19
|
+
height: '33.33333333%',
|
|
20
|
+
icon: 'icon-ArrayNum8'
|
|
16
21
|
}, {
|
|
17
22
|
name: 9,
|
|
18
23
|
width: '33.33333333%',
|
|
19
24
|
height: '33.33333333%',
|
|
20
|
-
icon: '
|
|
25
|
+
icon: 'icon-S_View_ArrayNum1'
|
|
26
|
+
}, {
|
|
27
|
+
name: 10,
|
|
28
|
+
width: '33.33333333%',
|
|
29
|
+
height: '33.33333333%',
|
|
30
|
+
icon: 'icon-ArrayNum10'
|
|
31
|
+
}, {
|
|
32
|
+
name: 13,
|
|
33
|
+
width: '33.33333333%',
|
|
34
|
+
height: '33.33333333%',
|
|
35
|
+
icon: 'icon-ArrayNum13'
|
|
21
36
|
}, {
|
|
22
37
|
name: 16,
|
|
23
38
|
width: '25%',
|
|
24
39
|
height: '25%',
|
|
25
|
-
icon: '
|
|
40
|
+
icon: 'icon-ArrayNum16'
|
|
26
41
|
}];
|
|
27
42
|
export var TimeModeLibs = [{
|
|
28
43
|
name: 1
|
|
@@ -40,23 +55,21 @@ export function mergeFill(len) {
|
|
|
40
55
|
return mergeArr[i] ? mergeArr[i] : v;
|
|
41
56
|
});
|
|
42
57
|
}
|
|
58
|
+
|
|
43
59
|
/**
|
|
44
60
|
* unix时间戳
|
|
45
61
|
* @param start
|
|
46
62
|
* @param end
|
|
47
63
|
* @param segments
|
|
48
64
|
*/
|
|
49
|
-
|
|
50
65
|
export var completionSegments = function completionSegments(start, end, segments) {
|
|
51
66
|
var arr = [];
|
|
52
|
-
|
|
53
67
|
if (segments.length > 0 && start < +segments[0].beginTime) {
|
|
54
68
|
arr.push({
|
|
55
69
|
beginTime: start,
|
|
56
70
|
endTime: +segments[0].beginTime
|
|
57
71
|
});
|
|
58
72
|
}
|
|
59
|
-
|
|
60
73
|
segments.reduce(function (prev, current, idx) {
|
|
61
74
|
if (arr.length === 0 && idx === 0) {
|
|
62
75
|
prev.push(current);
|
|
@@ -68,17 +81,14 @@ export var completionSegments = function completionSegments(start, end, segments
|
|
|
68
81
|
} else {
|
|
69
82
|
prev.push(current);
|
|
70
83
|
}
|
|
71
|
-
|
|
72
84
|
return prev;
|
|
73
85
|
}, arr);
|
|
74
|
-
|
|
75
86
|
if (end > +segments[segments.length - 1].endTime) {
|
|
76
87
|
arr.push({
|
|
77
88
|
beginTime: segments[segments.length - 1].endTime,
|
|
78
89
|
endTime: end
|
|
79
90
|
});
|
|
80
91
|
}
|
|
81
|
-
|
|
82
92
|
return arr;
|
|
83
93
|
};
|
|
84
94
|
export function sleep(time) {
|
package/es/index.d.ts
CHANGED
|
@@ -18,11 +18,13 @@ export { default as HightLevel } from './HightLevel';
|
|
|
18
18
|
export { default as IconFont } from './IconFont';
|
|
19
19
|
export { default as ImageView } from './ImageView';
|
|
20
20
|
export { default as InstanceHistory } from './InstanceHistory';
|
|
21
|
+
export { default as LabelPlayer } from './LabelPlayer';
|
|
21
22
|
export { default as LabelValue } from './LabelValue';
|
|
22
23
|
export { default as List } from './List';
|
|
23
24
|
export { default as ListWithSizeAnimate } from './ListWithSizeAnimate';
|
|
24
25
|
export { default as LoaderScript } from './LoaderScript';
|
|
25
26
|
export { default as Map } from './Map';
|
|
27
|
+
export { default as Map3D } from './Map3D';
|
|
26
28
|
export { default as Picture } from './Picture';
|
|
27
29
|
export { default as Player } from './Player';
|
|
28
30
|
export { default as PlayerExt } from './PlayerExt';
|
package/es/index.js
CHANGED
|
@@ -18,11 +18,13 @@ export { default as HightLevel } from "./HightLevel";
|
|
|
18
18
|
export { default as IconFont } from "./IconFont";
|
|
19
19
|
export { default as ImageView } from "./ImageView";
|
|
20
20
|
export { default as InstanceHistory } from "./InstanceHistory";
|
|
21
|
+
export { default as LabelPlayer } from "./LabelPlayer";
|
|
21
22
|
export { default as LabelValue } from "./LabelValue";
|
|
22
23
|
export { default as List } from "./List";
|
|
23
24
|
export { default as ListWithSizeAnimate } from "./ListWithSizeAnimate";
|
|
24
25
|
export { default as LoaderScript } from "./LoaderScript";
|
|
25
26
|
export { default as Map } from "./Map";
|
|
27
|
+
export { default as Map3D } from "./Map3D";
|
|
26
28
|
export { default as Picture } from "./Picture";
|
|
27
29
|
export { default as Player } from "./Player";
|
|
28
30
|
export { default as PlayerExt } from "./PlayerExt";
|
package/es/utils.d.ts
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import type { MutableRefObject } from 'react';
|
|
2
|
-
export declare const getHeader: () => {
|
|
3
|
-
Authorization: any;
|
|
4
|
-
};
|
|
5
|
-
export declare function tryCatch(resolveFn: () => any, rejectFn?: (e: unknown) => void): Promise<void>;
|
|
6
2
|
declare type TargetValue<T> = T | undefined | null;
|
|
7
3
|
declare type TargetType = HTMLElement | Element | Window | Document;
|
|
8
4
|
export declare type BasicTarget<T extends TargetType = Element> = (() => TargetValue<T>) | TargetValue<T> | MutableRefObject<TargetValue<T>>;
|
|
@@ -11,4 +7,8 @@ declare const getScrollTop: (el: Document | Element) => number;
|
|
|
11
7
|
declare const getScrollHeight: (el: Document | Element) => number;
|
|
12
8
|
declare const getClientHeight: (el: Document | Element) => number;
|
|
13
9
|
declare const getEleScrollHeight: (el: Document | Element) => number;
|
|
14
|
-
export
|
|
10
|
+
export declare const getHeader: () => {
|
|
11
|
+
Authorization: any;
|
|
12
|
+
};
|
|
13
|
+
declare function likeGo<T>(fn: () => Promise<T>): Promise<[T, Error]>;
|
|
14
|
+
export { getScrollTop, getScrollHeight, getClientHeight, getEleScrollHeight, likeGo };
|
package/es/utils.js
CHANGED
|
@@ -3,40 +3,6 @@ import _cache from "@cloud-app-dev/utils/es/cache";
|
|
|
3
3
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
4
4
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
5
5
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
6
|
-
export var getHeader = function getHeader() {
|
|
7
|
-
return {
|
|
8
|
-
Authorization: _cache.getCache('token', 'session')
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
export function tryCatch(_x) {
|
|
12
|
-
return _tryCatch.apply(this, arguments);
|
|
13
|
-
}
|
|
14
|
-
function _tryCatch() {
|
|
15
|
-
_tryCatch = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(resolveFn) {
|
|
16
|
-
var rejectFn,
|
|
17
|
-
_args = arguments;
|
|
18
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
19
|
-
while (1) switch (_context.prev = _context.next) {
|
|
20
|
-
case 0:
|
|
21
|
-
rejectFn = _args.length > 1 && _args[1] !== undefined ? _args[1] : console.error;
|
|
22
|
-
_context.prev = 1;
|
|
23
|
-
_context.next = 4;
|
|
24
|
-
return resolveFn();
|
|
25
|
-
case 4:
|
|
26
|
-
_context.next = 9;
|
|
27
|
-
break;
|
|
28
|
-
case 6:
|
|
29
|
-
_context.prev = 6;
|
|
30
|
-
_context.t0 = _context["catch"](1);
|
|
31
|
-
rejectFn(_context.t0);
|
|
32
|
-
case 9:
|
|
33
|
-
case "end":
|
|
34
|
-
return _context.stop();
|
|
35
|
-
}
|
|
36
|
-
}, _callee, null, [[1, 6]]);
|
|
37
|
-
}));
|
|
38
|
-
return _tryCatch.apply(this, arguments);
|
|
39
|
-
}
|
|
40
6
|
export function getTargetElement(target, defaultElement) {
|
|
41
7
|
if (!target) {
|
|
42
8
|
return defaultElement;
|
|
@@ -75,4 +41,35 @@ var getEleScrollHeight = function getEleScrollHeight(el) {
|
|
|
75
41
|
}
|
|
76
42
|
return top;
|
|
77
43
|
};
|
|
78
|
-
export
|
|
44
|
+
export var getHeader = function getHeader() {
|
|
45
|
+
return {
|
|
46
|
+
Authorization: _cache.getCache('token', 'session')
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
function likeGo(_x) {
|
|
50
|
+
return _likeGo.apply(this, arguments);
|
|
51
|
+
}
|
|
52
|
+
function _likeGo() {
|
|
53
|
+
_likeGo = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(fn) {
|
|
54
|
+
var result;
|
|
55
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
56
|
+
while (1) switch (_context.prev = _context.next) {
|
|
57
|
+
case 0:
|
|
58
|
+
result = [];
|
|
59
|
+
_context.next = 3;
|
|
60
|
+
return fn().then(function (res) {
|
|
61
|
+
result[0] = res;
|
|
62
|
+
}).catch(function (err) {
|
|
63
|
+
result[1] = err;
|
|
64
|
+
});
|
|
65
|
+
case 3:
|
|
66
|
+
return _context.abrupt("return", result);
|
|
67
|
+
case 4:
|
|
68
|
+
case "end":
|
|
69
|
+
return _context.stop();
|
|
70
|
+
}
|
|
71
|
+
}, _callee);
|
|
72
|
+
}));
|
|
73
|
+
return _likeGo.apply(this, arguments);
|
|
74
|
+
}
|
|
75
|
+
export { getScrollTop, getScrollHeight, getClientHeight, getEleScrollHeight, likeGo };
|
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.
|
|
5
|
+
"version": "4.0.4",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"docs:deploy": "gh-pages -d docs-dist",
|
|
8
8
|
"build": "npm run entry && father build",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"@umijs/lint": "^4.0.36",
|
|
70
70
|
"antd": "^5.1.7",
|
|
71
71
|
"babel-plugin-import": "^1.13.5",
|
|
72
|
-
"dumi": "^2.1.
|
|
72
|
+
"dumi": "^2.1.10",
|
|
73
73
|
"eslint": "^8.28.0",
|
|
74
74
|
"father": "^4.1.3",
|
|
75
75
|
"gh-pages": "^4.0.0",
|