@cloud-app-dev/vidc 2.1.0-alpha.9 → 2.2.0-alpha.1
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/AppContext/Sync.d.ts +1 -0
- package/es/AppContext/interface.d.ts +4 -1
- package/es/AppRedirect/index.d.ts +1 -0
- package/es/CheckGroupFixed/index.d.ts +1 -0
- package/es/DeviceSelect/TreeType.d.ts +1 -0
- package/es/DeviceSelect/demo.d.ts +1 -0
- package/es/DeviceSelect/index.d.ts +1 -0
- package/es/DeviceSelect/index.js +1 -1
- package/es/Drag/DragAndDropItem.js +2 -2
- package/es/Drag/DropItem.js +2 -2
- package/es/Drawer/Footer.d.ts +1 -0
- package/es/Drawer/index.d.ts +1 -0
- package/es/InitialConfig/utils.d.ts +5 -5
- package/es/InitialConfig/utils.js +19 -19
- package/es/Input/index.d.ts +1 -0
- package/es/List/CheckExt.d.ts +1 -0
- package/es/List/DeviceList/index.js +1 -1
- package/es/List/DynamicDeviceList/Demo.d.ts +1 -0
- package/es/List/DynamicDeviceList/index.d.ts +1 -0
- package/es/List/VList/index.d.ts +1 -0
- package/es/List/index.d.ts +1 -0
- package/es/LoaderApp/loader.js +2 -6
- package/es/LoaderApp/utils.d.ts +1 -0
- package/es/LoaderApp/utils.js +37 -0
- package/es/Modal/index.d.ts +1 -0
- package/es/Picture/component/DefaultRects/RectInfo.d.ts +1 -0
- package/es/Picture/component/DefaultRects/index.d.ts +2 -1
- package/es/Picture/component/DrawRect/index.d.ts +3 -4
- package/es/Picture/component/RectMenu/index.d.ts +2 -3
- package/es/Picture/component/WheelScale/index.d.ts +1 -0
- package/es/Picture/component/WheelScale/index.js +3 -3
- package/es/Picture/index.d.ts +1 -0
- package/es/Picture/index.js +4 -2
- package/es/Picture/interface.d.ts +4 -2
- package/es/Picture/utils.d.ts +1 -0
- package/es/Player/api/index.d.ts +71 -0
- package/es/Player/api/index.js +284 -0
- package/es/Player/contraller_bar/bar.d.ts +8 -0
- package/es/Player/contraller_bar/bar.js +21 -0
- package/es/Player/contraller_bar/contraller_event.d.ts +9 -0
- package/es/Player/contraller_bar/contraller_event.js +57 -0
- package/es/Player/contraller_bar/index.d.ts +19 -0
- package/es/Player/contraller_bar/index.js +37 -0
- package/es/Player/contraller_bar/left_bar.d.ts +15 -0
- package/es/Player/contraller_bar/left_bar.js +91 -0
- package/es/Player/contraller_bar/right_bar.d.ts +13 -0
- package/es/Player/contraller_bar/right_bar.js +55 -0
- package/es/Player/contraller_bar/useBarStatus.d.ts +3 -0
- package/es/Player/contraller_bar/useBarStatus.js +52 -0
- package/es/Player/demo.d.ts +2 -0
- package/es/Player/demo.js +269 -0
- package/es/Player/event/browserTabEvent.d.ts +9 -0
- package/es/Player/event/browserTabEvent.js +57 -0
- package/es/Player/event/errorEvent.d.ts +16 -0
- package/es/Player/event/errorEvent.js +120 -0
- package/es/Player/event/eventName.d.ts +3 -0
- package/es/Player/event/eventName.js +15 -0
- package/es/Player/event/index.d.ts +22 -0
- package/es/Player/event/index.js +175 -0
- package/es/Player/frontend_player.d.ts +15 -0
- package/es/Player/frontend_player.js +90 -0
- package/es/Player/frontend_timeline.d.ts +14 -0
- package/es/Player/frontend_timeline.js +141 -0
- package/es/Player/iconfont.d.ts +13 -0
- package/es/Player/iconfont.js +18 -0
- package/es/Player/index.d.ts +4 -0
- package/es/Player/index.js +4 -0
- package/es/Player/live_heart.d.ts +6 -0
- package/es/Player/live_heart.js +29 -0
- package/es/Player/message.d.ts +11 -0
- package/es/Player/message.js +150 -0
- package/es/Player/player.d.ts +75 -0
- package/es/Player/segment_player.d.ts +13 -0
- package/es/Player/segment_player.js +191 -0
- package/es/Player/segment_timeline.d.ts +16 -0
- package/es/Player/segment_timeline.js +154 -0
- package/es/Player/single_player.d.ts +5 -0
- package/es/Player/single_player.js +185 -0
- package/es/Player/style/bar.css +37 -0
- package/es/Player/style/iconfont.css +62 -0
- package/es/Player/style/index.css +22 -0
- package/es/Player/style/message.css +49 -0
- package/es/Player/style/slider.css +96 -0
- package/es/Player/style/timeline.css +92 -0
- package/es/Player/timeline.d.ts +11 -0
- package/es/Player/timeline.js +104 -0
- package/es/Player/util.d.ts +48 -0
- package/es/Player/util.js +172 -0
- package/es/Progress/index.d.ts +1 -0
- package/es/Tree/BaseTree/demo.d.ts +1 -0
- package/es/Tree/BaseTree/index.d.ts +2 -2
- package/es/Tree/demo.d.ts +1 -0
- package/es/Tree/index.js +1 -1
- package/es/UserSelect/demo.d.ts +1 -0
- package/es/WorkerFlow/Form/Approver.d.ts +1 -0
- package/es/WorkerFlow/Form/Condition.d.ts +1 -0
- package/es/WorkerFlow/Form/EmptyUserSet.d.ts +1 -0
- package/es/WorkerFlow/Form/FormAuth.d.ts +1 -0
- package/es/WorkerFlow/Form/GroupList.d.ts +1 -0
- package/es/WorkerFlow/Form/GroupSelect.d.ts +1 -0
- package/es/WorkerFlow/Form/Handle.d.ts +1 -0
- package/es/WorkerFlow/Form/LevelGroupSelect.d.ts +1 -0
- package/es/WorkerFlow/Form/Notifier.d.ts +1 -0
- package/es/WorkerFlow/Form/UserAndGroupSelect.d.ts +1 -0
- package/es/WorkerFlow/Form/UserSelect.d.ts +1 -0
- package/es/WorkerFlow/Form/UserSet.d.ts +1 -0
- package/es/WorkerFlow/Form/UsersHandleType.d.ts +1 -0
- package/es/WorkerFlow/Nodes/Add.d.ts +1 -0
- package/es/WorkerFlow/Nodes/Add.js +1 -1
- package/es/WorkerFlow/Nodes/AddOption.d.ts +1 -0
- package/es/WorkerFlow/Nodes/AddOptionList.d.ts +1 -0
- package/es/WorkerFlow/Nodes/Approver.d.ts +1 -0
- package/es/WorkerFlow/Nodes/Condition.d.ts +1 -0
- package/es/WorkerFlow/Nodes/End.d.ts +1 -0
- package/es/WorkerFlow/Nodes/Handle.d.ts +1 -0
- package/es/WorkerFlow/Nodes/Node.d.ts +1 -0
- package/es/WorkerFlow/Nodes/Notifier.d.ts +1 -0
- package/es/WorkerFlow/Nodes/Render.d.ts +1 -0
- package/es/WorkerFlow/Nodes/Start.d.ts +1 -0
- package/es/WorkerFlow/Nodes/TitleElement.d.ts +1 -0
- package/es/index.d.ts +3 -3
- package/es/index.js +4 -4
- package/package.json +13 -10
- package/es/AppRouter/index.d.ts +0 -8
- package/es/AppRouter/index.js +0 -17
package/.umirc.ts
CHANGED
|
@@ -5,7 +5,7 @@ const token =
|
|
|
5
5
|
'eyJhbGciOiJIUzI1NiJ9.eyJvcmdhbml6YXRpb25JZCI6IjEwMDEwMTAwMDQ0NiIsImV4dCI6MTY0MDQwOTc4NjQ3OCwidWlkIjoiMTAxMDAwMDAwMjQ5IiwidmFsaWRTdGF0ZSI6MTA0NDA2LCJyb2xlSWQiOlsxMDAwMDAxMTAzODddLCJ2YWxpZFRpbWUiOm51bGwsIm9wdENlbnRlcklkIjoiMTAwMTAwMDAwMjMzIiwidXNlclR5cGUiOjEwMDcwMiwiaWF0IjoxNjQwMTUwNTg2NDc4fQ.9a8me82dxS_DJ52Ac8eBu1Y2Gigs7mZ6Cm3Rd-tj5Vk';
|
|
6
6
|
|
|
7
7
|
export default defineConfig({
|
|
8
|
-
title: '
|
|
8
|
+
title: 'CloudApp VIDC',
|
|
9
9
|
favicon: 'https://user-images.githubusercontent.com/9554297/83762004-a0761b00-a6a9-11ea-83b4-9c8ff721d4b8.png',
|
|
10
10
|
logo: 'https://user-images.githubusercontent.com/9554297/83762004-a0761b00-a6a9-11ea-83b4-9c8ff721d4b8.png',
|
|
11
11
|
outputPath: 'docs-dist',
|
package/es/AppContext/Sync.d.ts
CHANGED
|
@@ -15,9 +15,12 @@ export type UserInfoType = {
|
|
|
15
15
|
userSource: string;
|
|
16
16
|
userType: string;
|
|
17
17
|
validState: string;
|
|
18
|
+
[key: string]: any;
|
|
18
19
|
};
|
|
19
20
|
|
|
20
|
-
export type OperationInfoType = {
|
|
21
|
+
export type OperationInfoType = {
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
};
|
|
21
24
|
|
|
22
25
|
export interface AppContextInterface {
|
|
23
26
|
user: UserInfoType;
|
package/es/DeviceSelect/index.js
CHANGED
|
@@ -59,8 +59,8 @@ function DragAndDropItem(_ref) {
|
|
|
59
59
|
return [old[0], 'dragleave'];
|
|
60
60
|
});
|
|
61
61
|
}, []);
|
|
62
|
-
var allowDrop = useCallback(function (
|
|
63
|
-
|
|
62
|
+
var allowDrop = useCallback(function (event) {
|
|
63
|
+
return event.preventDefault();
|
|
64
64
|
}, []);
|
|
65
65
|
var onDragStart = useCallback(function (event) {
|
|
66
66
|
if (!domRef.current) {
|
package/es/Drag/DropItem.js
CHANGED
|
@@ -38,8 +38,8 @@ function DropItem(_ref) {
|
|
|
38
38
|
event.stopPropagation();
|
|
39
39
|
setStatus('dragleave');
|
|
40
40
|
}, []);
|
|
41
|
-
var allowDrop = useCallback(function (
|
|
42
|
-
|
|
41
|
+
var allowDrop = useCallback(function (event) {
|
|
42
|
+
return event.preventDefault();
|
|
43
43
|
}, []);
|
|
44
44
|
return /*#__PURE__*/React.cloneElement(children, {
|
|
45
45
|
ref: domRef,
|
package/es/Drawer/Footer.d.ts
CHANGED
package/es/Drawer/index.d.ts
CHANGED
|
@@ -3,11 +3,6 @@
|
|
|
3
3
|
* @description 获取系统配置
|
|
4
4
|
*/
|
|
5
5
|
export declare function queryBSConfig(): Promise<any>;
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
* @description 获取所有微应用配置
|
|
9
|
-
*/
|
|
10
|
-
export declare function queryMicroApplicationList(): Promise<any>;
|
|
11
6
|
/**
|
|
12
7
|
*
|
|
13
8
|
* @description 获取平台升级状态
|
|
@@ -18,3 +13,8 @@ export declare function querySystemUpdate(): Promise<any>;
|
|
|
18
13
|
* @description 获取平台配色
|
|
19
14
|
*/
|
|
20
15
|
export declare function queryDefaultTheme(): Promise<any>;
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @description 获取所有微应用
|
|
19
|
+
*/
|
|
20
|
+
export declare function queryMicroApplicationList(): Promise<any>;
|
|
@@ -29,24 +29,20 @@ export function queryBSConfig() {
|
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
31
|
*
|
|
32
|
-
* @description
|
|
32
|
+
* @description 获取平台升级状态
|
|
33
33
|
*/
|
|
34
34
|
|
|
35
|
-
export function
|
|
35
|
+
export function querySystemUpdate() {
|
|
36
36
|
return __awaiter(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
37
37
|
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
38
38
|
while (1) {
|
|
39
39
|
switch (_context2.prev = _context2.next) {
|
|
40
40
|
case 0:
|
|
41
|
-
_context2.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
case 2:
|
|
47
|
-
return _context2.abrupt("return", _context2.sent.data);
|
|
41
|
+
return _context2.abrupt("return", Service.http({
|
|
42
|
+
url: "/statics/config/update.status.conf.json?".concat(Date.now())
|
|
43
|
+
}));
|
|
48
44
|
|
|
49
|
-
case
|
|
45
|
+
case 1:
|
|
50
46
|
case "end":
|
|
51
47
|
return _context2.stop();
|
|
52
48
|
}
|
|
@@ -56,20 +52,24 @@ export function queryMicroApplicationList() {
|
|
|
56
52
|
}
|
|
57
53
|
/**
|
|
58
54
|
*
|
|
59
|
-
* @description
|
|
55
|
+
* @description 获取平台配色
|
|
60
56
|
*/
|
|
61
57
|
|
|
62
|
-
export function
|
|
58
|
+
export function queryDefaultTheme() {
|
|
63
59
|
return __awaiter(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
|
|
64
60
|
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
65
61
|
while (1) {
|
|
66
62
|
switch (_context3.prev = _context3.next) {
|
|
67
63
|
case 0:
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
64
|
+
_context3.next = 2;
|
|
65
|
+
return Service.http({
|
|
66
|
+
url: "/statics/config/theme.info.json?".concat(Date.now())
|
|
67
|
+
});
|
|
71
68
|
|
|
72
|
-
case
|
|
69
|
+
case 2:
|
|
70
|
+
return _context3.abrupt("return", _context3.sent.data);
|
|
71
|
+
|
|
72
|
+
case 3:
|
|
73
73
|
case "end":
|
|
74
74
|
return _context3.stop();
|
|
75
75
|
}
|
|
@@ -79,10 +79,10 @@ export function querySystemUpdate() {
|
|
|
79
79
|
}
|
|
80
80
|
/**
|
|
81
81
|
*
|
|
82
|
-
* @description
|
|
82
|
+
* @description 获取所有微应用
|
|
83
83
|
*/
|
|
84
84
|
|
|
85
|
-
export function
|
|
85
|
+
export function queryMicroApplicationList() {
|
|
86
86
|
return __awaiter(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
|
|
87
87
|
return regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
88
88
|
while (1) {
|
|
@@ -90,7 +90,7 @@ export function queryDefaultTheme() {
|
|
|
90
90
|
case 0:
|
|
91
91
|
_context4.next = 2;
|
|
92
92
|
return Service.http({
|
|
93
|
-
url:
|
|
93
|
+
url: '/api/micro-app-service/app/v1/allList'
|
|
94
94
|
});
|
|
95
95
|
|
|
96
96
|
case 2:
|
package/es/Input/index.d.ts
CHANGED
package/es/List/CheckExt.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { IDynamicDeviceListProps } from './interface';
|
|
2
3
|
import './index.less';
|
|
3
4
|
declare function DynamicDeviceList({ onClick, checkedKeys, defaultCheckedIds, onChecked, params, title, onKeywordChange, limit, itemHeight }: IDynamicDeviceListProps): JSX.Element;
|
package/es/List/VList/index.d.ts
CHANGED
package/es/List/index.d.ts
CHANGED
package/es/LoaderApp/loader.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __awaiter } from "tslib";
|
|
2
|
-
import { arrayify, rewrite } from './utils';
|
|
2
|
+
import { arrayify, fetchStyle, rewrite } from './utils';
|
|
3
3
|
var _global = window;
|
|
4
4
|
export function createScopedCssText(_ref) {
|
|
5
5
|
var styleNode = _ref.styleNode,
|
|
@@ -27,11 +27,7 @@ export function LoaderStyle(_ref2) {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
_context.next = 3;
|
|
30
|
-
return
|
|
31
|
-
return r.text();
|
|
32
|
-
}).catch(function () {
|
|
33
|
-
return '';
|
|
34
|
-
});
|
|
30
|
+
return fetchStyle(style);
|
|
35
31
|
|
|
36
32
|
case 3:
|
|
37
33
|
cssText = _context.sent;
|
package/es/LoaderApp/utils.d.ts
CHANGED
|
@@ -10,5 +10,6 @@ export declare const getMicroConfig: (appConfig: AppItemType, appProps: any, con
|
|
|
10
10
|
html: string;
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
|
+
export declare function fetchStyle(style: string): Promise<string>;
|
|
13
14
|
export declare const arrayify: <T>(list: CSSRuleList | any[]) => T[];
|
|
14
15
|
export declare function rewrite(rules: CSSRule[], prefix?: string): string;
|
package/es/LoaderApp/utils.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { __awaiter } from "tslib";
|
|
1
2
|
export var getMicroConfig = function getMicroConfig() {
|
|
2
3
|
var appConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
3
4
|
var appProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -18,6 +19,42 @@ export var getMicroConfig = function getMicroConfig() {
|
|
|
18
19
|
entry: microAppEntry
|
|
19
20
|
};
|
|
20
21
|
};
|
|
22
|
+
var styleCache = {};
|
|
23
|
+
export function fetchStyle(style) {
|
|
24
|
+
return __awaiter(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
25
|
+
var cssText;
|
|
26
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
27
|
+
while (1) {
|
|
28
|
+
switch (_context.prev = _context.next) {
|
|
29
|
+
case 0:
|
|
30
|
+
if (!styleCache[style]) {
|
|
31
|
+
_context.next = 2;
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return _context.abrupt("return", styleCache[style]);
|
|
36
|
+
|
|
37
|
+
case 2:
|
|
38
|
+
_context.next = 4;
|
|
39
|
+
return fetch(style).then(function (r) {
|
|
40
|
+
return r.text();
|
|
41
|
+
}).catch(function () {
|
|
42
|
+
return '';
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
case 4:
|
|
46
|
+
cssText = _context.sent;
|
|
47
|
+
styleCache[style] = cssText;
|
|
48
|
+
return _context.abrupt("return", cssText);
|
|
49
|
+
|
|
50
|
+
case 7:
|
|
51
|
+
case "end":
|
|
52
|
+
return _context.stop();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}, _callee);
|
|
56
|
+
}));
|
|
57
|
+
}
|
|
21
58
|
var RuleType = {
|
|
22
59
|
// type: rule will be rewrote
|
|
23
60
|
STYLE: 1,
|
package/es/Modal/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { RectType } from '../../interface';
|
|
2
3
|
import './index.less';
|
|
3
4
|
interface IDefaultRectsProps {
|
|
@@ -6,7 +7,7 @@ interface IDefaultRectsProps {
|
|
|
6
7
|
onClickRect?: (item: RectType & {
|
|
7
8
|
base64: string;
|
|
8
9
|
}) => void;
|
|
9
|
-
getRectImage: (rect: number[]) =>
|
|
10
|
+
getRectImage: (rect: number[]) => string;
|
|
10
11
|
}
|
|
11
12
|
declare function DefaultRects({ rects, containerDom, onClickRect, getRectImage }: IDefaultRectsProps): JSX.Element;
|
|
12
13
|
export default DefaultRects;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { MenuRectType } from '../../interface';
|
|
2
3
|
import './index.less';
|
|
3
4
|
interface IDrawRectProps {
|
|
4
5
|
rect: number[];
|
|
5
6
|
canRenderMenu?: boolean;
|
|
6
7
|
containerDom: HTMLDivElement;
|
|
7
|
-
onMenuClick: (options: MenuRectType
|
|
8
|
-
base64: string;
|
|
9
|
-
}) => void;
|
|
8
|
+
onMenuClick: (options: MenuRectType) => void;
|
|
10
9
|
menus: MenuRectType[];
|
|
11
|
-
getRectImage: (rect: number[]) =>
|
|
10
|
+
getRectImage: (rect: number[]) => string;
|
|
12
11
|
}
|
|
13
12
|
declare function DrawRect({ rect, canRenderMenu, containerDom, onMenuClick, menus, getRectImage }: IDrawRectProps): JSX.Element;
|
|
14
13
|
export default DrawRect;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import './index.less';
|
|
2
3
|
import { MenuRectType } from 'src/Picture/interface';
|
|
3
4
|
interface IRectMenuProps {
|
|
@@ -5,9 +6,7 @@ interface IRectMenuProps {
|
|
|
5
6
|
y: number;
|
|
6
7
|
menus: MenuRectType[];
|
|
7
8
|
containerDom: HTMLDivElement;
|
|
8
|
-
onMenuClick: (options: MenuRectType
|
|
9
|
-
base64: string;
|
|
10
|
-
}) => void;
|
|
9
|
+
onMenuClick: (options: MenuRectType) => void;
|
|
11
10
|
}
|
|
12
11
|
declare function RectMenu({ x, y, menus, containerDom, onMenuClick }: IRectMenuProps): JSX.Element;
|
|
13
12
|
export default RectMenu;
|
|
@@ -13,14 +13,14 @@ function WheelScale(_ref) {
|
|
|
13
13
|
|
|
14
14
|
useEffect(function () {
|
|
15
15
|
if (!dom) {
|
|
16
|
-
return
|
|
16
|
+
return undefined;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
dom.addEventListener('
|
|
19
|
+
dom.addEventListener('wheel', onWheel, {
|
|
20
20
|
passive: false
|
|
21
21
|
});
|
|
22
22
|
return function () {
|
|
23
|
-
return dom.removeEventListener('
|
|
23
|
+
return dom.removeEventListener('wheel', onWheel);
|
|
24
24
|
};
|
|
25
25
|
}, [dom, onWheel]);
|
|
26
26
|
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
package/es/Picture/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { IPictureProps } from './interface';
|
|
2
3
|
import './index.less';
|
|
3
4
|
declare function Picture({ className, width, height, minHeight, disabledDrag, imagePath, rects, isOpenSelect, disabledDrawMenu, menus, hasTool, fullScreenEle, ...props }: IPictureProps): JSX.Element;
|
package/es/Picture/index.js
CHANGED
|
@@ -152,7 +152,7 @@ function Picture(_a) {
|
|
|
152
152
|
*/
|
|
153
153
|
|
|
154
154
|
var resetPicture = useCallback(function (event) {
|
|
155
|
-
event.stopPropagation(
|
|
155
|
+
event.stopPropagation();
|
|
156
156
|
setState(function (old) {
|
|
157
157
|
return Object.assign(Object.assign({}, old), {
|
|
158
158
|
scale: 1,
|
|
@@ -304,7 +304,9 @@ function Picture(_a) {
|
|
|
304
304
|
draggable: false,
|
|
305
305
|
src: imagePath,
|
|
306
306
|
key: imagePath,
|
|
307
|
-
onLoad:
|
|
307
|
+
onLoad: function onLoad() {
|
|
308
|
+
return loadImageSuccess();
|
|
309
|
+
}
|
|
308
310
|
}), !isEmpty ? /*#__PURE__*/React.createElement(DrawRect, {
|
|
309
311
|
rect: selectArea,
|
|
310
312
|
onMenuClick: onMenuClick,
|
|
@@ -4,6 +4,7 @@ export type MenuRectType = {
|
|
|
4
4
|
pathname: string;
|
|
5
5
|
title: string;
|
|
6
6
|
icon: string;
|
|
7
|
+
base64?: string;
|
|
7
8
|
};
|
|
8
9
|
|
|
9
10
|
export type TagItemType = {
|
|
@@ -28,6 +29,7 @@ export type RectType = {
|
|
|
28
29
|
feature?: string;
|
|
29
30
|
dupId?: string;
|
|
30
31
|
lowQuality?: boolean;
|
|
32
|
+
base64?: string;
|
|
31
33
|
};
|
|
32
34
|
|
|
33
35
|
export type PositionType = {
|
|
@@ -59,8 +61,8 @@ export interface IPictureProps {
|
|
|
59
61
|
disabledDrawMenu?: false;
|
|
60
62
|
menus?: MenuRectType[];
|
|
61
63
|
imgDownload?: () => void;
|
|
62
|
-
onClickRect?: (item: RectType
|
|
63
|
-
onMenuClick?: (item: MenuRectType
|
|
64
|
+
onClickRect?: (item: RectType) => void;
|
|
65
|
+
onMenuClick?: (item: MenuRectType) => void;
|
|
64
66
|
children?: (option: any) => void;
|
|
65
67
|
hasTool?: boolean;
|
|
66
68
|
fullScreenEle?: Element;
|
package/es/Picture/utils.d.ts
CHANGED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import flvjs from 'flv.zv.js';
|
|
2
|
+
import Hls, { HlsConfig } from 'hls.js';
|
|
3
|
+
import type { FlvPlayerConfig } from '../player';
|
|
4
|
+
declare class Api {
|
|
5
|
+
container: HTMLElement;
|
|
6
|
+
constructor(container: HTMLElement);
|
|
7
|
+
get video(): HTMLVideoElement;
|
|
8
|
+
/**
|
|
9
|
+
* 全屏
|
|
10
|
+
*/
|
|
11
|
+
requestFullScreen: () => void;
|
|
12
|
+
/**
|
|
13
|
+
* 退出全屏
|
|
14
|
+
*/
|
|
15
|
+
cancelFullScreen: () => void;
|
|
16
|
+
play: () => void;
|
|
17
|
+
pause: () => void;
|
|
18
|
+
/**
|
|
19
|
+
* 设置currentTime实现seek
|
|
20
|
+
* @param {*} seconds
|
|
21
|
+
* @param {*} noEmit
|
|
22
|
+
*/
|
|
23
|
+
seekTo: (seconds: number) => void;
|
|
24
|
+
setVolume: (fraction: number) => void;
|
|
25
|
+
mute: () => void;
|
|
26
|
+
unmute: () => void;
|
|
27
|
+
/**
|
|
28
|
+
* 开启画中画功能
|
|
29
|
+
*/
|
|
30
|
+
requestPictureInPicture: () => void;
|
|
31
|
+
/**
|
|
32
|
+
* 关闭画中画功能
|
|
33
|
+
*/
|
|
34
|
+
exitPictureInPicture: () => void;
|
|
35
|
+
/**
|
|
36
|
+
* 设置播放速率
|
|
37
|
+
* @param {*} rate
|
|
38
|
+
*/
|
|
39
|
+
setPlaybackRate: (rate: number) => void;
|
|
40
|
+
/**
|
|
41
|
+
* 获取视频总时长
|
|
42
|
+
*/
|
|
43
|
+
getDuration: () => number;
|
|
44
|
+
/**
|
|
45
|
+
* 获取当前播放时间
|
|
46
|
+
*/
|
|
47
|
+
getCurrentTime: () => number;
|
|
48
|
+
/**
|
|
49
|
+
* 获取缓存时间
|
|
50
|
+
*/
|
|
51
|
+
getSecondsLoaded: () => any;
|
|
52
|
+
/**
|
|
53
|
+
* 获取当前视频缓存的起止时间
|
|
54
|
+
*/
|
|
55
|
+
getBufferedTime: () => number | number[];
|
|
56
|
+
/**
|
|
57
|
+
* 视频截屏方法
|
|
58
|
+
*/
|
|
59
|
+
snapshot: () => string;
|
|
60
|
+
unload: () => void;
|
|
61
|
+
reload: () => void;
|
|
62
|
+
destroy: () => void;
|
|
63
|
+
}
|
|
64
|
+
export declare type TypeAndPlay = {
|
|
65
|
+
type?: string;
|
|
66
|
+
flv?: flvjs.Player;
|
|
67
|
+
hls?: Hls;
|
|
68
|
+
};
|
|
69
|
+
export declare function useTypeAndPlay(url?: string, type?: string, isLive?: boolean, container?: HTMLElement, segments?: flvjs.MediaSegment[], flvConfig?: FlvPlayerConfig, hlsConfig?: HlsConfig): [string, flvjs.Player, Hls];
|
|
70
|
+
export declare function usePlayerApi(url?: string, type?: string, isLive?: boolean, container?: HTMLElement, segments?: flvjs.MediaSegment[], flvConfig?: FlvPlayerConfig, hlsConfig?: HlsConfig): [Api, [string, flvjs.Player, Hls]];
|
|
71
|
+
export default Api;
|