@cloud-app-dev/vidc 2.2.0-alpha.1 → 2.2.0-alpha.5
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 +2 -3
- package/es/Api/index.js +1 -1
- package/es/DeviceSelect/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 +3 -3
- package/es/FullScreen/index.js +18 -42
- package/es/HightLevel/index.js +1 -1
- 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 +18 -14
- package/es/Picture/component/Tools/index.js +0 -5
- package/es/Picture/demo.d.ts +2 -0
- package/es/Picture/demo.js +16 -0
- package/es/Picture/index.js +2 -2
- package/es/Picture/utils.js +1 -1
- package/es/Player/api/index.js +1 -1
- package/es/Player/contraller_bar/contraller_event.js +1 -0
- package/es/Player/frontend_player.d.ts +1 -7
- package/es/Player/frontend_timeline.js +11 -14
- package/es/Player/index.d.ts +1 -3
- package/es/Player/index.js +1 -3
- package/es/Player/player.d.ts +15 -0
- package/es/Player/segment_player.d.ts +1 -5
- package/es/Player/single_player.js +4 -3
- package/es/PlayerExt/demo.d.ts +2 -0
- package/es/PlayerExt/demo.js +165 -0
- package/es/PlayerExt/index.css +13 -0
- package/es/PlayerExt/index.d.ts +42 -0
- package/es/PlayerExt/index.js +145 -0
- 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/UserSelect/index.js +1 -1
- package/es/WorkerFlow/Form/Condition.js +2 -1
- package/es/WorkerFlow/Form/EmptyUserSet.js +3 -2
- package/es/WorkerFlow/Form/FormAuth.js +1 -1
- package/es/WorkerFlow/Form/GroupSelect.js +3 -2
- package/es/WorkerFlow/Form/GroupSelectModalContent.js +1 -1
- package/es/WorkerFlow/Form/LevelGroupSelect.js +3 -2
- package/es/WorkerFlow/Form/UserAndGroupSelect.js +3 -2
- package/es/WorkerFlow/Form/UserSelect.js +3 -2
- package/es/WorkerFlow/Form/UserSelectModalContent.js +1 -1
- package/es/WorkerFlow/Form/UserSet.js +1 -1
- package/es/WorkerFlow/Nodes/TitleElement.js +6 -2
- package/es/WorkerFlow/index.js +3 -2
- package/es/WorkerFlow/utils.js +1 -1
- package/es/index.d.ts +3 -5
- package/es/index.js +4 -6
- package/es/typings.d.ts +1 -0
- package/package.json +11 -10
- package/tsconfig.json +4 -3
- 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
|
@@ -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, {
|
package/es/UserSelect/index.js
CHANGED
|
@@ -24,7 +24,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
24
24
|
import React, { useCallback, useMemo, useState, useImperativeHandle } from 'react';
|
|
25
25
|
import api from '../Api';
|
|
26
26
|
import TreeMode from '../Tree';
|
|
27
|
-
import { uniq, intersectionWith, uniqBy, differenceWith } from 'lodash';
|
|
27
|
+
import { uniq, intersectionWith, uniqBy, differenceWith } from 'lodash-es';
|
|
28
28
|
import IconFont from '../IconFont';
|
|
29
29
|
import useHttp from '../useHttp';
|
|
30
30
|
import ListExt from '../List/ListExt';
|
|
@@ -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,
|
|
@@ -19,11 +19,12 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
19
19
|
|
|
20
20
|
import { __awaiter } from "tslib";
|
|
21
21
|
import React, { useCallback, useMemo, useRef, useState, useEffect } from 'react';
|
|
22
|
-
import { replace } from 'lodash';
|
|
22
|
+
import { replace } from 'lodash-es';
|
|
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;
|
|
@@ -25,7 +25,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
25
25
|
|
|
26
26
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
27
27
|
import Box from '../../Box';
|
|
28
|
-
import { cloneDeep } from 'lodash';
|
|
28
|
+
import { cloneDeep } from 'lodash-es';
|
|
29
29
|
|
|
30
30
|
function FormAuth(_ref) {
|
|
31
31
|
var form = _ref.form,
|
|
@@ -19,12 +19,13 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
19
19
|
|
|
20
20
|
import { __awaiter } from "tslib";
|
|
21
21
|
import React, { useCallback, useMemo, useRef, useState, useEffect } from 'react';
|
|
22
|
-
import { replace } from 'lodash';
|
|
22
|
+
import { replace } from 'lodash-es';
|
|
23
23
|
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;
|
|
@@ -23,7 +23,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
23
23
|
import React, { useCallback, useMemo, useState, useImperativeHandle } from 'react';
|
|
24
24
|
import api from '../../Api';
|
|
25
25
|
import TreeMode from '../../Tree';
|
|
26
|
-
import { uniq, intersectionWith } from 'lodash';
|
|
26
|
+
import { uniq, intersectionWith } from 'lodash-es';
|
|
27
27
|
import useHttp from '../../useHttp';
|
|
28
28
|
import { formatRenderGroup } from './utils';
|
|
29
29
|
import GroupList from './GroupList';
|
|
@@ -21,12 +21,13 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
21
21
|
|
|
22
22
|
import { __awaiter } from "tslib";
|
|
23
23
|
import React, { useCallback, useMemo, useRef, useState, useEffect } from 'react';
|
|
24
|
-
import { replace } from 'lodash';
|
|
24
|
+
import { replace } from 'lodash-es';
|
|
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
|
});
|
|
@@ -21,13 +21,14 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
21
21
|
|
|
22
22
|
import { __awaiter } from "tslib";
|
|
23
23
|
import React, { useCallback, useMemo, useRef, useState, useEffect } from 'react';
|
|
24
|
-
import { replace } from 'lodash';
|
|
24
|
+
import { replace } from 'lodash-es';
|
|
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;
|
|
@@ -19,11 +19,12 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
19
19
|
|
|
20
20
|
import { __awaiter } from "tslib";
|
|
21
21
|
import React, { useCallback, useMemo, useRef, useState, useEffect } from 'react';
|
|
22
|
-
import { replace } from 'lodash';
|
|
22
|
+
import { replace } from 'lodash-es';
|
|
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;
|
|
@@ -22,7 +22,7 @@ import React, { useCallback, useMemo, useState, forwardRef, useImperativeHandle
|
|
|
22
22
|
import api from '../../Api';
|
|
23
23
|
import TreeMode from '../../Tree';
|
|
24
24
|
import List from '../../List/ListExt';
|
|
25
|
-
import { uniq, uniqBy, differenceWith, intersectionWith } from 'lodash';
|
|
25
|
+
import { uniq, uniqBy, differenceWith, intersectionWith } from 'lodash-es';
|
|
26
26
|
import useHttp from '../../useHttp';
|
|
27
27
|
var UserSelectModalContent = /*#__PURE__*/forwardRef(function UserSelectModalContent(_ref, ref) {
|
|
28
28
|
var selectUsers = _ref.selectUsers;
|
|
@@ -17,7 +17,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
17
17
|
|
|
18
18
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
19
19
|
import { UserSetOptions } from '../Nodes/Constants';
|
|
20
|
-
import { cloneDeep } from 'lodash';
|
|
20
|
+
import { cloneDeep } from 'lodash-es';
|
|
21
21
|
import UsersHandleType from './UsersHandleType';
|
|
22
22
|
import UserSelect from './UserSelect';
|
|
23
23
|
import UserAndGroupSelect from './UserAndGroupSelect';
|
|
@@ -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
|
@@ -33,14 +33,15 @@ import ApproverForm from './Form/Approver';
|
|
|
33
33
|
import ConditionForm from './Form/Condition';
|
|
34
34
|
import NotifierForm from './Form/Notifier';
|
|
35
35
|
import { TemplateConfig1 } from './template';
|
|
36
|
-
import { cloneDeep } from 'lodash';
|
|
36
|
+
import { cloneDeep } from 'lodash-es';
|
|
37
37
|
import EndNode from './Nodes/End';
|
|
38
38
|
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/WorkerFlow/utils.js
CHANGED
|
@@ -10,7 +10,7 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
10
10
|
|
|
11
11
|
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; }
|
|
12
12
|
|
|
13
|
-
import { cloneDeep } from 'lodash';
|
|
13
|
+
import { cloneDeep } from 'lodash-es';
|
|
14
14
|
import { getNodeById } from './XML/utils';
|
|
15
15
|
export function getJAVATaskData(data) {
|
|
16
16
|
var _a;
|
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';
|
|
@@ -27,9 +27,9 @@ export { default as LoaderScript } from './LoaderScript';
|
|
|
27
27
|
export { default as Modal } from './Modal';
|
|
28
28
|
export { default as Picture } from './Picture';
|
|
29
29
|
export { default as Player } from './Player';
|
|
30
|
+
export { default as PlayerExt } from './PlayerExt';
|
|
30
31
|
export { default as Progress } from './Progress';
|
|
31
|
-
export { default as
|
|
32
|
-
export { default as RefModal } from './RefModal';
|
|
32
|
+
export { default as SegmentPlayer } from './SegmentPlayer';
|
|
33
33
|
export { default as Service } from './Service';
|
|
34
34
|
export { default as TableLayout } from './TableLayout';
|
|
35
35
|
export { default as ThemeAntd } from './ThemeAntd';
|
|
@@ -37,7 +37,5 @@ export { default as Title } from './Title';
|
|
|
37
37
|
export { default as Tree } from './Tree';
|
|
38
38
|
export { default as UserSelect } from './UserSelect';
|
|
39
39
|
export { default as WorkerFlow } from './WorkerFlow';
|
|
40
|
-
export { default as useDrawer } from './useDrawer';
|
|
41
40
|
export { default as useHistory } from './useHistory';
|
|
42
41
|
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';
|
|
@@ -27,9 +27,9 @@ export { default as LoaderScript } from './LoaderScript';
|
|
|
27
27
|
export { default as Modal } from './Modal';
|
|
28
28
|
export { default as Picture } from './Picture';
|
|
29
29
|
export { default as Player } from './Player';
|
|
30
|
+
export { default as PlayerExt } from './PlayerExt';
|
|
30
31
|
export { default as Progress } from './Progress';
|
|
31
|
-
export { default as
|
|
32
|
-
export { default as RefModal } from './RefModal';
|
|
32
|
+
export { default as SegmentPlayer } from './SegmentPlayer';
|
|
33
33
|
export { default as Service } from './Service';
|
|
34
34
|
export { default as TableLayout } from './TableLayout';
|
|
35
35
|
export { default as ThemeAntd } from './ThemeAntd';
|
|
@@ -37,7 +37,5 @@ export { default as Title } from './Title';
|
|
|
37
37
|
export { default as Tree } from './Tree';
|
|
38
38
|
export { default as UserSelect } from './UserSelect';
|
|
39
39
|
export { default as WorkerFlow } from './WorkerFlow';
|
|
40
|
-
export { default as useDrawer } from './useDrawer';
|
|
41
40
|
export { default as useHistory } from './useHistory';
|
|
42
|
-
export { default as useHttp } from './useHttp';
|
|
43
|
-
export { default as useModal } from './useModal';
|
|
41
|
+
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.5",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"start": "dumi dev",
|
|
8
8
|
"docs:build": "dumi build",
|
|
@@ -32,36 +32,37 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"add-dom-event-listener": "^1.1.0",
|
|
34
34
|
"ahooks": "^3.1.0",
|
|
35
|
+
"axios": "^0.27.2",
|
|
35
36
|
"chroma-js": "^2.1.2",
|
|
36
|
-
"fetch-like-axios": "^0.0.5",
|
|
37
37
|
"flv.zv.js": "^2.2.0",
|
|
38
38
|
"hls.js": "^1.1.5",
|
|
39
39
|
"immer": "^9.0.5",
|
|
40
|
-
"lodash": "^4.17.21",
|
|
40
|
+
"lodash-es": "^4.17.21",
|
|
41
41
|
"rc-queue-anim": "^2.0.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@cloud-app-dev/utils": "^3.0.3",
|
|
45
45
|
"@types/add-dom-event-listener": "^1.1.0",
|
|
46
46
|
"@types/chroma-js": "^2.1.3",
|
|
47
|
-
"@types/lodash": "^4.
|
|
47
|
+
"@types/lodash-es": "^4.17.6",
|
|
48
48
|
"@types/node": "^17.0.5",
|
|
49
49
|
"@types/react": "^18.0.9",
|
|
50
50
|
"@types/react-dom": "^18.0.4",
|
|
51
|
-
"@umijs/test": "^3.
|
|
52
|
-
"antd": "^4.
|
|
51
|
+
"@umijs/test": "^3.5.26",
|
|
52
|
+
"antd": "^4.21.0",
|
|
53
53
|
"babel-plugin-import": "^1.13.3",
|
|
54
|
-
"dumi": "^1.1.
|
|
55
|
-
"father-build": "^1.22.
|
|
54
|
+
"dumi": "^1.1.42",
|
|
55
|
+
"father-build": "^1.22.3",
|
|
56
56
|
"gh-pages": "^3.0.0",
|
|
57
|
+
"history": "^5.3.0",
|
|
57
58
|
"lint-staged": "^10.0.7",
|
|
58
59
|
"prettier": "^2.2.1",
|
|
59
60
|
"react": "^18.1.0",
|
|
60
61
|
"react-dom": "^18.1.0",
|
|
61
62
|
"react-router-dom": "^6.3.0",
|
|
63
|
+
"tslib": "^2.4.0",
|
|
62
64
|
"typescript": "^4.5.4",
|
|
63
|
-
"yorkie": "^2.0.0"
|
|
64
|
-
"history": "^5.3.0"
|
|
65
|
+
"yorkie": "^2.0.0"
|
|
65
66
|
},
|
|
66
67
|
"repository": {
|
|
67
68
|
"type": "git",
|
package/tsconfig.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"compilerOptions": {
|
|
4
4
|
"target": "es6",
|
|
5
5
|
"module": "esnext",
|
|
6
|
-
"lib": ["es2018", "dom", "
|
|
6
|
+
"lib": ["es2018", "dom", "es2021"],
|
|
7
7
|
"rootDir": "./",
|
|
8
8
|
"outDir": "es",
|
|
9
9
|
"moduleResolution": "node",
|
|
@@ -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;
|