@cloud-app-dev/vidc 2.2.0-alpha.1 → 2.2.0-alpha.2
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 +3 -2
- package/es/Api/index.js +1 -1
- package/es/Drawer/Demo.js +24 -3
- package/es/Drawer/index.d.ts +29 -4
- package/es/Drawer/index.js +155 -4
- package/es/FrontendPlayer/index.d.ts +2 -0
- package/es/FrontendPlayer/index.js +2 -0
- package/es/FullScreen/index.d.ts +2 -3
- package/es/FullScreen/index.js +14 -41
- package/es/List/GridList/index.js +0 -1
- package/es/Modal/index.d.ts +27 -1
- package/es/Modal/index.js +155 -1
- package/es/Picture/component/MoveContent/index.js +16 -12
- package/es/Picture/component/Tools/index.js +0 -5
- package/es/Player/contraller_bar/contraller_event.js +1 -0
- package/es/Player/frontend_timeline.js +11 -14
- package/es/Player/index.d.ts +6 -2
- package/es/Player/index.js +5 -1
- package/es/SegmentPlayer/index.d.ts +2 -0
- package/es/SegmentPlayer/index.js +2 -0
- package/es/Service/fetch-adapter.d.ts +12 -0
- package/es/Service/fetch-adapter.js +184 -0
- package/es/Service/http.d.ts +1 -1
- package/es/Service/http.js +4 -2
- package/es/Service/interface.d.ts +2 -1
- package/es/Tree/BaseTree/demo.js +3 -1
- package/es/WorkerFlow/Form/Condition.js +2 -1
- package/es/WorkerFlow/Form/EmptyUserSet.js +2 -1
- package/es/WorkerFlow/Form/GroupSelect.js +2 -1
- package/es/WorkerFlow/Form/LevelGroupSelect.js +2 -1
- package/es/WorkerFlow/Form/UserAndGroupSelect.js +2 -1
- package/es/WorkerFlow/Form/UserSelect.js +2 -1
- package/es/WorkerFlow/Nodes/TitleElement.js +6 -2
- package/es/WorkerFlow/index.js +2 -1
- package/es/index.d.ts +2 -5
- package/es/index.js +3 -6
- package/es/typings.d.ts +1 -0
- package/package.json +7 -5
- package/tsconfig.json +3 -2
- package/typings/global.d.ts +4 -0
- package/es/AppRedirect/index.css +0 -0
- package/es/AppRedirect/index.d.ts +0 -17
- package/es/AppRedirect/index.js +0 -33
- package/es/RefDrawer/index.d.ts +0 -15
- package/es/RefDrawer/index.js +0 -71
- package/es/RefModal/index.d.ts +0 -15
- package/es/RefModal/index.js +0 -73
- package/es/useDrawer/index.d.ts +0 -14
- package/es/useDrawer/index.js +0 -91
- package/es/useModal/index.d.ts +0 -14
- package/es/useModal/index.js +0 -93
- package/typings.d.ts +0 -2
|
@@ -72,11 +72,6 @@ function Tools(_ref) {
|
|
|
72
72
|
return containerEle;
|
|
73
73
|
},
|
|
74
74
|
fullScreenChange: fullScreenChange
|
|
75
|
-
}, function (isFullscreen) {
|
|
76
|
-
return /*#__PURE__*/React.createElement(IconFont, {
|
|
77
|
-
title: !isFullscreen ? '全屏' : '退出全屏',
|
|
78
|
-
type: !isFullscreen ? 'icon-S_View_ScreenViewFull' : 'icon-S_View_ScreenViewExit'
|
|
79
|
-
});
|
|
80
75
|
}))));
|
|
81
76
|
}
|
|
82
77
|
|
|
@@ -40,6 +40,9 @@ function FrontendTimeLine(_ref) {
|
|
|
40
40
|
_useTimes2 = _slicedToArray(_useTimes, 1),
|
|
41
41
|
currentTime = _useTimes2[0];
|
|
42
42
|
|
|
43
|
+
var rTime = useMemo(function () {
|
|
44
|
+
return state.time + currentTime;
|
|
45
|
+
}, [state.time, currentTime]);
|
|
43
46
|
useEffect(function () {
|
|
44
47
|
return setState(function (old) {
|
|
45
48
|
return Object.assign(Object.assign({}, old), {
|
|
@@ -47,30 +50,24 @@ function FrontendTimeLine(_ref) {
|
|
|
47
50
|
});
|
|
48
51
|
});
|
|
49
52
|
}, [begin]);
|
|
50
|
-
useEffect(function () {
|
|
51
|
-
return setState(function (old) {
|
|
52
|
-
return Object.assign(Object.assign({}, old), {
|
|
53
|
-
time: currentTime
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
}, [currentTime]);
|
|
57
53
|
var playPercent = useMemo(function () {
|
|
58
|
-
return
|
|
59
|
-
}, [
|
|
54
|
+
return rTime / duration * 100;
|
|
55
|
+
}, [rTime]);
|
|
60
56
|
var cTime = useMemo(function () {
|
|
61
|
-
return begin +
|
|
62
|
-
}, [begin,
|
|
57
|
+
return begin + rTime * 1000;
|
|
58
|
+
}, [begin, rTime]);
|
|
63
59
|
var seekWithLine = useCallback(function (e) {
|
|
64
60
|
var rect = e.currentTarget.getBoundingClientRect();
|
|
65
61
|
var current = e.pageX - rect.left;
|
|
66
62
|
var cTime = current / rect.width * duration;
|
|
67
|
-
onSeek && onSeek(begin + cTime * 1000);
|
|
63
|
+
onSeek && onSeek(begin + cTime * 1000); //时间轴进度条rTime是要加上currentTime,这里要减去一下,包装交互一致性
|
|
64
|
+
|
|
68
65
|
setState(function (old) {
|
|
69
66
|
return Object.assign(Object.assign({}, old), {
|
|
70
|
-
time: cTime
|
|
67
|
+
time: cTime - currentTime
|
|
71
68
|
});
|
|
72
69
|
});
|
|
73
|
-
}, [api, duration, begin, onSeek]);
|
|
70
|
+
}, [api, duration, begin, onSeek, currentTime]);
|
|
74
71
|
var onLineMouseOver = useCallback(function (e) {
|
|
75
72
|
var rect = e.currentTarget.getBoundingClientRect();
|
|
76
73
|
var left = e.pageX - rect.left;
|
package/es/Player/index.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import SinglePlayer from './single_player';
|
|
2
1
|
import SegmentPlayer from './segment_player';
|
|
3
2
|
import FrontendPlayer from './frontend_player';
|
|
4
|
-
|
|
3
|
+
declare const _default: {
|
|
4
|
+
SinglePlayer: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("./player").ISinglePlayerProps & import("react").RefAttributes<import("./player").ExportPlayerType>>>;
|
|
5
|
+
FrontendPlayer: typeof FrontendPlayer;
|
|
6
|
+
SegmentPlayer: typeof SegmentPlayer;
|
|
7
|
+
};
|
|
8
|
+
export default _default;
|
package/es/Player/index.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import SinglePlayer from './single_player';
|
|
2
2
|
import SegmentPlayer from './segment_player';
|
|
3
3
|
import FrontendPlayer from './frontend_player';
|
|
4
|
-
export
|
|
4
|
+
export default {
|
|
5
|
+
SinglePlayer: SinglePlayer,
|
|
6
|
+
FrontendPlayer: FrontendPlayer,
|
|
7
|
+
SegmentPlayer: SegmentPlayer
|
|
8
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="typings/global" />
|
|
2
|
+
import { AxiosRequestConfig, AxiosPromise } from 'axios';
|
|
3
|
+
export interface AxiosFetchRequestConfig extends AxiosRequestConfig<BodyInit> {
|
|
4
|
+
mode?: RequestMode;
|
|
5
|
+
body?: BodyInit;
|
|
6
|
+
cache?: RequestCache;
|
|
7
|
+
integrity?: string;
|
|
8
|
+
redirect?: RequestRedirect;
|
|
9
|
+
referrer?: string;
|
|
10
|
+
credentials?: RequestCredentials;
|
|
11
|
+
}
|
|
12
|
+
export default function fetchAdapter(config: AxiosFetchRequestConfig): AxiosPromise;
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/// <reference path="../../typings/global.d.ts"/>
|
|
2
|
+
import { __awaiter } from "tslib";
|
|
3
|
+
import { AxiosError } from 'axios';
|
|
4
|
+
import settle from 'axios/lib/core/settle';
|
|
5
|
+
import buildURL from 'axios/lib/helpers/buildURL';
|
|
6
|
+
import buildFullPath from 'axios/lib/core/buildFullPath';
|
|
7
|
+
import CanceledError from 'axios/lib/cancel/CanceledError';
|
|
8
|
+
import { isUndefined } from 'lodash-es';
|
|
9
|
+
export default function fetchAdapter(config) {
|
|
10
|
+
return new Promise(function (resolve, reject) {
|
|
11
|
+
var controller = new AbortController();
|
|
12
|
+
var signal = controller.signal;
|
|
13
|
+
var request = createRequest(config, signal);
|
|
14
|
+
var promises = [getResponse(request, config)];
|
|
15
|
+
|
|
16
|
+
if (config.timeout && config.timeout > 0) {
|
|
17
|
+
promises.push(timeoutHandle(request, controller, config));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
if (config.cancelToken) {
|
|
21
|
+
// Handle cancellation
|
|
22
|
+
config.cancelToken.promise.then(function onCanceled(cancel) {
|
|
23
|
+
if (!request) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
reject(!cancel ? new CanceledError(null, config, request) : cancel);
|
|
28
|
+
controller.abort();
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return Promise.race(promises).then(function (data) {
|
|
33
|
+
return settle(resolve, reject, data);
|
|
34
|
+
}).catch(reject);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function timeoutHandle(request, controller, config) {
|
|
39
|
+
return new Promise(function (resolve) {
|
|
40
|
+
setTimeout(function () {
|
|
41
|
+
var message = config.timeoutErrorMessage ? config.timeoutErrorMessage : 'timeout of ' + config.timeout + 'ms exceeded';
|
|
42
|
+
resolve(createError(message, config, 'ECONNABORTED', request));
|
|
43
|
+
controller.abort();
|
|
44
|
+
}, config.timeout);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function getResponse(request, config) {
|
|
49
|
+
return __awaiter(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
50
|
+
var stageOne, response;
|
|
51
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
52
|
+
while (1) {
|
|
53
|
+
switch (_context.prev = _context.next) {
|
|
54
|
+
case 0:
|
|
55
|
+
_context.prev = 0;
|
|
56
|
+
_context.next = 3;
|
|
57
|
+
return fetch(request);
|
|
58
|
+
|
|
59
|
+
case 3:
|
|
60
|
+
stageOne = _context.sent;
|
|
61
|
+
_context.next = 9;
|
|
62
|
+
break;
|
|
63
|
+
|
|
64
|
+
case 6:
|
|
65
|
+
_context.prev = 6;
|
|
66
|
+
_context.t0 = _context["catch"](0);
|
|
67
|
+
return _context.abrupt("return", createError('Network Error', config, 'ERR_NETWORK', request));
|
|
68
|
+
|
|
69
|
+
case 9:
|
|
70
|
+
response = {
|
|
71
|
+
ok: stageOne.ok,
|
|
72
|
+
status: stageOne.status,
|
|
73
|
+
statusText: stageOne.statusText,
|
|
74
|
+
headers: new Headers(stageOne.headers),
|
|
75
|
+
config: config,
|
|
76
|
+
request: request
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
if (!(stageOne.status >= 200 && stageOne.status !== 204)) {
|
|
80
|
+
_context.next = 30;
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
_context.t1 = config.responseType;
|
|
85
|
+
_context.next = _context.t1 === 'arraybuffer' ? 14 : _context.t1 === 'blob' ? 18 : _context.t1 === 'json' ? 22 : 26;
|
|
86
|
+
break;
|
|
87
|
+
|
|
88
|
+
case 14:
|
|
89
|
+
_context.next = 16;
|
|
90
|
+
return stageOne.arrayBuffer();
|
|
91
|
+
|
|
92
|
+
case 16:
|
|
93
|
+
response.data = _context.sent;
|
|
94
|
+
return _context.abrupt("break", 30);
|
|
95
|
+
|
|
96
|
+
case 18:
|
|
97
|
+
_context.next = 20;
|
|
98
|
+
return stageOne.blob();
|
|
99
|
+
|
|
100
|
+
case 20:
|
|
101
|
+
response.data = _context.sent;
|
|
102
|
+
return _context.abrupt("break", 30);
|
|
103
|
+
|
|
104
|
+
case 22:
|
|
105
|
+
_context.next = 24;
|
|
106
|
+
return stageOne.json();
|
|
107
|
+
|
|
108
|
+
case 24:
|
|
109
|
+
response.data = _context.sent;
|
|
110
|
+
return _context.abrupt("break", 30);
|
|
111
|
+
|
|
112
|
+
case 26:
|
|
113
|
+
_context.next = 28;
|
|
114
|
+
return stageOne.text();
|
|
115
|
+
|
|
116
|
+
case 28:
|
|
117
|
+
response.data = _context.sent;
|
|
118
|
+
return _context.abrupt("break", 30);
|
|
119
|
+
|
|
120
|
+
case 30:
|
|
121
|
+
return _context.abrupt("return", response);
|
|
122
|
+
|
|
123
|
+
case 31:
|
|
124
|
+
case "end":
|
|
125
|
+
return _context.stop();
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}, _callee, null, [[0, 6]]);
|
|
129
|
+
}));
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function createRequest(config, signal) {
|
|
133
|
+
var headers = new Headers(config.headers);
|
|
134
|
+
|
|
135
|
+
if (config.auth) {
|
|
136
|
+
var username = config.auth.username || '';
|
|
137
|
+
var password = config.auth.password ? decodeURI(encodeURIComponent(config.auth.password)) : '';
|
|
138
|
+
headers.set('Authorization', "Basic ".concat(btoa(username + ':' + password)));
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
var method = config.method.toUpperCase();
|
|
142
|
+
var options = {
|
|
143
|
+
headers: headers,
|
|
144
|
+
method: method,
|
|
145
|
+
signal: signal
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
if (method !== 'GET' && method !== 'HEAD') {
|
|
149
|
+
options.body = config.data;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
if (config.mode) {
|
|
153
|
+
options.mode = config.mode;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
if (config.cache) {
|
|
157
|
+
options.cache = config.cache;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
if (config.integrity) {
|
|
161
|
+
options.integrity = config.integrity;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
if (config.redirect) {
|
|
165
|
+
options.redirect = config.redirect;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
if (config.referrer) {
|
|
169
|
+
options.referrer = config.referrer;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
if (!isUndefined(config.withCredentials)) {
|
|
173
|
+
options.credentials = config.withCredentials ? 'include' : 'omit';
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
var fullPath = buildFullPath(config.baseURL, config.url);
|
|
177
|
+
var url = buildURL(fullPath, config.params, config.paramsSerializer); // Expected browser to throw error if there is any wrong configuration value
|
|
178
|
+
|
|
179
|
+
return new Request(url, options);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
function createError(message, config, code, request, response) {
|
|
183
|
+
return new AxiosError(message, AxiosError[code], config, request, response);
|
|
184
|
+
}
|
package/es/Service/http.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AxiosInstance } from '
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
2
|
import type { RsponseType, XHRResponse } from './interface';
|
|
3
3
|
declare function http({ cancelHttp, ...newOptions }: RsponseType): Promise<any>;
|
|
4
4
|
declare const httpMultiPartInstance: AxiosInstance;
|
package/es/Service/http.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
|
-
import Axios from '
|
|
2
|
+
import Axios from 'axios';
|
|
3
|
+
import fetchAdapter from './fetch-adapter';
|
|
3
4
|
import * as Middleware from './middleware';
|
|
4
5
|
var CancelToken = Axios.CancelToken;
|
|
5
6
|
var config = {
|
|
6
7
|
baseURL: '/',
|
|
7
8
|
timeout: 60 * 1000,
|
|
8
9
|
xhrMode: 'fetch',
|
|
10
|
+
adapter: fetchAdapter,
|
|
9
11
|
headers: {
|
|
10
12
|
Accept: 'application/json; charset=utf-8',
|
|
11
13
|
'Content-Type': 'application/json; charset=utf-8'
|
|
@@ -68,8 +70,8 @@ function http(_a) {
|
|
|
68
70
|
}
|
|
69
71
|
|
|
70
72
|
var httpMultiPartInstance = Axios.create({
|
|
71
|
-
xhrMode: 'fetch',
|
|
72
73
|
timeout: 10 * 60 * 1000,
|
|
74
|
+
adapter: fetchAdapter,
|
|
73
75
|
headers: {
|
|
74
76
|
'Content-Type': 'multipart/form-data'
|
|
75
77
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AxiosInstance, AxiosRequestConfig, AxiosResponse } from '
|
|
1
|
+
import type { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
2
2
|
export type RsponseType = AxiosRequestConfig & { requestId?: string; cancelHttp?: (cancel: Function) => void; loggerIndex?: number };
|
|
3
3
|
|
|
4
4
|
export type XHRResponse = {
|
|
@@ -20,3 +20,4 @@ export type IServiceInterface = {
|
|
|
20
20
|
registerResponseMiddleware(fn: MiddleWareType): void;
|
|
21
21
|
registerResponseErrorMiddleware(fn: MiddleWareType): void;
|
|
22
22
|
};
|
|
23
|
+
|
package/es/Tree/BaseTree/demo.js
CHANGED
|
@@ -55,8 +55,10 @@ function App() {
|
|
|
55
55
|
height: 400
|
|
56
56
|
}
|
|
57
57
|
}, /*#__PURE__*/React.createElement(Tree, {
|
|
58
|
-
key: state.keyword,
|
|
59
58
|
treeData: treeData,
|
|
59
|
+
treeNodeProps: {
|
|
60
|
+
keyword: state.keyword
|
|
61
|
+
},
|
|
60
62
|
virtual: false,
|
|
61
63
|
icon: function icon(node) {
|
|
62
64
|
return /*#__PURE__*/React.createElement(IconFont, {
|
|
@@ -18,7 +18,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
18
18
|
import React, { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
19
19
|
import Box from '../../Box';
|
|
20
20
|
import IconFont from '../../IconFont';
|
|
21
|
-
import
|
|
21
|
+
import Modal from '../../Modal';
|
|
22
|
+
var RefModal = Modal.RefModal;
|
|
22
23
|
|
|
23
24
|
function ConditionForm(_ref) {
|
|
24
25
|
var form = _ref.form,
|
|
@@ -22,8 +22,9 @@ import React, { useCallback, useMemo, useRef, useState, useEffect } from 'react'
|
|
|
22
22
|
import { replace } from 'lodash';
|
|
23
23
|
import chroma from 'chroma-js';
|
|
24
24
|
import UserSelectModalContent from './UserSelectModalContent';
|
|
25
|
-
import RefModal from '../../RefModal';
|
|
26
25
|
import IconFont from '../../IconFont';
|
|
26
|
+
import Modal from '../../Modal';
|
|
27
|
+
var RefModal = Modal.RefModal;
|
|
27
28
|
|
|
28
29
|
function EmptyUserSet(_ref) {
|
|
29
30
|
var _this = this;
|
|
@@ -24,7 +24,8 @@ import chroma from 'chroma-js';
|
|
|
24
24
|
import GroupSelectModalContent from './GroupSelectModalContent';
|
|
25
25
|
import IconFont from '../../IconFont';
|
|
26
26
|
import { formatRenderGroup } from './utils';
|
|
27
|
-
import
|
|
27
|
+
import Modal from '../../Modal';
|
|
28
|
+
var RefModal = Modal.RefModal;
|
|
28
29
|
|
|
29
30
|
function GroupSelect(_ref) {
|
|
30
31
|
var _this = this;
|
|
@@ -25,8 +25,9 @@ import { replace } from 'lodash';
|
|
|
25
25
|
import chroma from 'chroma-js';
|
|
26
26
|
import GroupSelectModalContent from './GroupSelectModalContent';
|
|
27
27
|
import { formatRenderGroup, ToUpperNumberString } from './utils';
|
|
28
|
-
import RefModal from '../../RefModal';
|
|
29
28
|
import IconFont from '../../IconFont';
|
|
29
|
+
import Modal from '../../Modal';
|
|
30
|
+
var RefModal = Modal.RefModal;
|
|
30
31
|
var levelDict = Array.from(new Array(30)).map(function (_, i) {
|
|
31
32
|
return i + 1;
|
|
32
33
|
});
|
|
@@ -25,9 +25,10 @@ import { replace } from 'lodash';
|
|
|
25
25
|
import chroma from 'chroma-js';
|
|
26
26
|
import UserSelectModalContent from './UserSelectModalContent';
|
|
27
27
|
import GroupSelectModalContent from './GroupSelectModalContent';
|
|
28
|
-
import RefModal from '../../RefModal';
|
|
29
28
|
import { formatRenderGroup } from './utils';
|
|
30
29
|
import IconFont from '../../IconFont';
|
|
30
|
+
import Modal from '../../Modal';
|
|
31
|
+
var RefModal = Modal.RefModal;
|
|
31
32
|
|
|
32
33
|
function UserAndGroupSelect(_ref) {
|
|
33
34
|
var _this = this;
|
|
@@ -22,8 +22,9 @@ import React, { useCallback, useMemo, useRef, useState, useEffect } from 'react'
|
|
|
22
22
|
import { replace } from 'lodash';
|
|
23
23
|
import chroma from 'chroma-js';
|
|
24
24
|
import UserSelectModalContent from './UserSelectModalContent';
|
|
25
|
-
import RefModal from '../../RefModal';
|
|
26
25
|
import IconFont from '../../IconFont';
|
|
26
|
+
import Modal from '../../Modal';
|
|
27
|
+
var RefModal = Modal.RefModal;
|
|
27
28
|
|
|
28
29
|
function UserSelect(_ref) {
|
|
29
30
|
var _this = this;
|
|
@@ -67,7 +67,9 @@ function TitleElement(_ref) {
|
|
|
67
67
|
}, [readOnly, isFocus, state.editable]);
|
|
68
68
|
|
|
69
69
|
_useUpdateEffect(function () {
|
|
70
|
-
|
|
70
|
+
if (!readOnly && !state.editable && onTitleChange) {
|
|
71
|
+
onTitleChange(state.title);
|
|
72
|
+
}
|
|
71
73
|
}, [state.title, state.editable]);
|
|
72
74
|
|
|
73
75
|
_useUpdateEffect(function () {
|
|
@@ -77,7 +79,9 @@ function TitleElement(_ref) {
|
|
|
77
79
|
}, [state.editable]);
|
|
78
80
|
|
|
79
81
|
_useUpdateEffect(function () {
|
|
80
|
-
|
|
82
|
+
if (!state.title && !isFocus) {
|
|
83
|
+
setTitle(placeholder);
|
|
84
|
+
}
|
|
81
85
|
}, [isFocus, state.title, placeholder]);
|
|
82
86
|
|
|
83
87
|
return /*#__PURE__*/React.createElement("div", {
|
package/es/WorkerFlow/index.js
CHANGED
|
@@ -39,8 +39,9 @@ import Render from './Nodes/Render';
|
|
|
39
39
|
import Tools from './Tools';
|
|
40
40
|
import WFC from './OperatorContext';
|
|
41
41
|
import { filterNoticeNode, getJAVATaskData, getUserFormKeys } from './utils';
|
|
42
|
-
import
|
|
42
|
+
import Drawer from '../Drawer';
|
|
43
43
|
import "./index.css";
|
|
44
|
+
var RefDrawer = Drawer.RefDrawer;
|
|
44
45
|
var FormMap = {
|
|
45
46
|
1: ApproverForm,
|
|
46
47
|
4: ConditionForm,
|
package/es/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { default as Api } from './Api';
|
|
2
2
|
export { default as AppContext } from './AppContext';
|
|
3
|
-
export { default as AppRedirect } from './AppRedirect';
|
|
4
3
|
export { default as Auth } from './Auth';
|
|
5
4
|
export { default as AutoExit } from './AutoExit';
|
|
6
5
|
export { default as Box } from './Box';
|
|
@@ -12,6 +11,7 @@ export { default as DeviceSelect } from './DeviceSelect';
|
|
|
12
11
|
export { default as Dict } from './Dict';
|
|
13
12
|
export { default as Drag } from './Drag';
|
|
14
13
|
export { default as Drawer } from './Drawer';
|
|
14
|
+
export { default as FrontendPlayer } from './FrontendPlayer';
|
|
15
15
|
export { default as FullScreen } from './FullScreen';
|
|
16
16
|
export { default as HightLevel } from './HightLevel';
|
|
17
17
|
export { default as IconFont } from './IconFont';
|
|
@@ -28,8 +28,7 @@ export { default as Modal } from './Modal';
|
|
|
28
28
|
export { default as Picture } from './Picture';
|
|
29
29
|
export { default as Player } from './Player';
|
|
30
30
|
export { default as Progress } from './Progress';
|
|
31
|
-
export { default as
|
|
32
|
-
export { default as RefModal } from './RefModal';
|
|
31
|
+
export { default as SegmentPlayer } from './SegmentPlayer';
|
|
33
32
|
export { default as Service } from './Service';
|
|
34
33
|
export { default as TableLayout } from './TableLayout';
|
|
35
34
|
export { default as ThemeAntd } from './ThemeAntd';
|
|
@@ -37,7 +36,5 @@ export { default as Title } from './Title';
|
|
|
37
36
|
export { default as Tree } from './Tree';
|
|
38
37
|
export { default as UserSelect } from './UserSelect';
|
|
39
38
|
export { default as WorkerFlow } from './WorkerFlow';
|
|
40
|
-
export { default as useDrawer } from './useDrawer';
|
|
41
39
|
export { default as useHistory } from './useHistory';
|
|
42
40
|
export { default as useHttp } from './useHttp';
|
|
43
|
-
export { default as useModal } from './useModal';
|
package/es/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { default as Api } from './Api';
|
|
2
2
|
export { default as AppContext } from './AppContext';
|
|
3
|
-
export { default as AppRedirect } from './AppRedirect';
|
|
4
3
|
export { default as Auth } from './Auth';
|
|
5
4
|
export { default as AutoExit } from './AutoExit';
|
|
6
5
|
export { default as Box } from './Box';
|
|
@@ -12,6 +11,7 @@ export { default as DeviceSelect } from './DeviceSelect';
|
|
|
12
11
|
export { default as Dict } from './Dict';
|
|
13
12
|
export { default as Drag } from './Drag';
|
|
14
13
|
export { default as Drawer } from './Drawer';
|
|
14
|
+
export { default as FrontendPlayer } from './FrontendPlayer';
|
|
15
15
|
export { default as FullScreen } from './FullScreen';
|
|
16
16
|
export { default as HightLevel } from './HightLevel';
|
|
17
17
|
export { default as IconFont } from './IconFont';
|
|
@@ -28,8 +28,7 @@ export { default as Modal } from './Modal';
|
|
|
28
28
|
export { default as Picture } from './Picture';
|
|
29
29
|
export { default as Player } from './Player';
|
|
30
30
|
export { default as Progress } from './Progress';
|
|
31
|
-
export { default as
|
|
32
|
-
export { default as RefModal } from './RefModal';
|
|
31
|
+
export { default as SegmentPlayer } from './SegmentPlayer';
|
|
33
32
|
export { default as Service } from './Service';
|
|
34
33
|
export { default as TableLayout } from './TableLayout';
|
|
35
34
|
export { default as ThemeAntd } from './ThemeAntd';
|
|
@@ -37,7 +36,5 @@ export { default as Title } from './Title';
|
|
|
37
36
|
export { default as Tree } from './Tree';
|
|
38
37
|
export { default as UserSelect } from './UserSelect';
|
|
39
38
|
export { default as WorkerFlow } from './WorkerFlow';
|
|
40
|
-
export { default as useDrawer } from './useDrawer';
|
|
41
39
|
export { default as useHistory } from './useHistory';
|
|
42
|
-
export { default as useHttp } from './useHttp';
|
|
43
|
-
export { default as useModal } from './useModal';
|
|
40
|
+
export { default as useHttp } from './useHttp';
|
package/es/typings.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference path="../typings/global.d.ts"/>
|
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": "2.2.0-alpha.
|
|
5
|
+
"version": "2.2.0-alpha.2",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"start": "dumi dev",
|
|
8
8
|
"docs:build": "dumi build",
|
|
@@ -30,14 +30,16 @@
|
|
|
30
30
|
]
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
+
"@types/lodash-es": "^4.17.6",
|
|
33
34
|
"add-dom-event-listener": "^1.1.0",
|
|
34
35
|
"ahooks": "^3.1.0",
|
|
36
|
+
"axios": "^0.27.2",
|
|
35
37
|
"chroma-js": "^2.1.2",
|
|
36
|
-
"fetch-like-axios": "^0.0.5",
|
|
37
38
|
"flv.zv.js": "^2.2.0",
|
|
38
39
|
"hls.js": "^1.1.5",
|
|
39
40
|
"immer": "^9.0.5",
|
|
40
41
|
"lodash": "^4.17.21",
|
|
42
|
+
"lodash-es": "^4.17.21",
|
|
41
43
|
"rc-queue-anim": "^2.0.0"
|
|
42
44
|
},
|
|
43
45
|
"devDependencies": {
|
|
@@ -49,19 +51,19 @@
|
|
|
49
51
|
"@types/react": "^18.0.9",
|
|
50
52
|
"@types/react-dom": "^18.0.4",
|
|
51
53
|
"@umijs/test": "^3.0.5",
|
|
52
|
-
"antd": "^4.20.
|
|
54
|
+
"antd": "^4.20.6",
|
|
53
55
|
"babel-plugin-import": "^1.13.3",
|
|
54
56
|
"dumi": "^1.1.40",
|
|
55
57
|
"father-build": "^1.22.1",
|
|
56
58
|
"gh-pages": "^3.0.0",
|
|
59
|
+
"history": "^5.3.0",
|
|
57
60
|
"lint-staged": "^10.0.7",
|
|
58
61
|
"prettier": "^2.2.1",
|
|
59
62
|
"react": "^18.1.0",
|
|
60
63
|
"react-dom": "^18.1.0",
|
|
61
64
|
"react-router-dom": "^6.3.0",
|
|
62
65
|
"typescript": "^4.5.4",
|
|
63
|
-
"yorkie": "^2.0.0"
|
|
64
|
-
"history": "^5.3.0"
|
|
66
|
+
"yorkie": "^2.0.0"
|
|
65
67
|
},
|
|
66
68
|
"repository": {
|
|
67
69
|
"type": "git",
|
package/tsconfig.json
CHANGED
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"allowSyntheticDefaultImports": true,
|
|
33
33
|
"typeRoots": ["typings", "node_modules/@types"]
|
|
34
34
|
},
|
|
35
|
-
"include": ["src/**/*", "dosc/**/*"],
|
|
36
|
-
|
|
35
|
+
"include": ["src/**/*", "dosc/**/*", "typings/*.d.ts"],
|
|
36
|
+
|
|
37
|
+
"exclude": ["node_modules", "lib", "es", "dist", "**/__test__", "test"]
|
|
37
38
|
}
|
package/es/AppRedirect/index.css
DELETED
|
File without changes
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import * as H from 'history';
|
|
3
|
-
import './index.less';
|
|
4
|
-
interface AppRedirectProps {
|
|
5
|
-
/**
|
|
6
|
-
* @description 匹配路径
|
|
7
|
-
* @default -
|
|
8
|
-
*/
|
|
9
|
-
path?: string | string[];
|
|
10
|
-
/**
|
|
11
|
-
* @description 重定向路径
|
|
12
|
-
* @description -
|
|
13
|
-
*/
|
|
14
|
-
to: H.Location;
|
|
15
|
-
}
|
|
16
|
-
declare function AppRedirect({ path, to }: AppRedirectProps): JSX.Element;
|
|
17
|
-
export default AppRedirect;
|
package/es/AppRedirect/index.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import React, { useEffect } from 'react';
|
|
2
|
-
import { useLocation, useNavigate } from 'react-router-dom';
|
|
3
|
-
import "./index.css";
|
|
4
|
-
|
|
5
|
-
var getKey = function getKey() {
|
|
6
|
-
return Math.random().toString(36).substr(2);
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
function AppRedirect(_ref) {
|
|
10
|
-
var path = _ref.path,
|
|
11
|
-
to = _ref.to;
|
|
12
|
-
var navigate = useNavigate();
|
|
13
|
-
var location = useLocation();
|
|
14
|
-
useEffect(function () {
|
|
15
|
-
if (path === location.pathname) {
|
|
16
|
-
if (typeof to !== 'string') {
|
|
17
|
-
navigate("".concat(to.pathname).concat(to.search ? "".concat(to.search, "&key=").concat(getKey()) : "?key=".concat(getKey())), {
|
|
18
|
-
replace: true,
|
|
19
|
-
state: Object.assign({}, to.state, {
|
|
20
|
-
isReplace: true
|
|
21
|
-
})
|
|
22
|
-
});
|
|
23
|
-
} else {
|
|
24
|
-
navigate("".concat(to, "?key").concat(getKey()), {
|
|
25
|
-
replace: true
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}, [path, location.pathname, to, history]);
|
|
30
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export default AppRedirect;
|