@cloud-app-dev/vidc 2.0.0-alpha.9 → 2.1.0-alpha.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/.fatherrc.js +11 -4
- package/.umirc.ts +1 -1
- package/es/Api/index.js +7 -7
- package/es/AppRedirect/index.d.ts +1 -1
- package/es/AppRedirect/index.js +7 -12
- package/es/AppRouter/index.d.ts +3 -0
- package/es/AppRouter/index.js +19 -0
- package/es/Auth/index.js +1 -1
- package/es/AutoExit/index.js +12 -10
- package/es/{ContentBox → Box}/BetweenBox/index.css +0 -0
- package/es/{ContentBox → Box}/BetweenBox/index.d.ts +0 -0
- package/es/{ContentBox → Box}/BetweenBox/index.js +0 -0
- package/es/{ContentBox → Box}/InfoBox/index.css +0 -0
- package/es/{ContentBox → Box}/InfoBox/index.d.ts +0 -0
- package/es/{ContentBox → Box}/InfoBox/index.js +0 -0
- package/es/{ContentBox → Box}/TwoColumnBox/index.css +0 -0
- package/es/{ContentBox → Box}/TwoColumnBox/index.d.ts +0 -0
- package/es/{ContentBox → Box}/TwoColumnBox/index.js +0 -0
- package/es/{ContentBox → Box}/deps/content-grid.d.ts +0 -0
- package/es/{ContentBox → Box}/deps/content-grid.js +0 -0
- package/es/{ContentBox → Box}/deps/grid-factory.d.ts +0 -0
- package/es/{ContentBox → Box}/deps/grid-factory.js +0 -0
- package/es/{ContentBox → Box}/deps/simple-grid.d.ts +0 -0
- package/es/{ContentBox → Box}/deps/simple-grid.js +0 -0
- package/es/{ContentBox → Box}/index.css +0 -0
- package/es/{ContentBox → Box}/index.d.ts +3 -3
- package/es/{ContentBox → Box}/index.js +5 -5
- package/es/CheckGroupFixed/index.js +4 -2
- package/es/Config/index.js +12 -12
- package/es/Config/interface.d.ts +6 -4
- package/es/ConfigContext/index.d.ts +15 -2
- package/es/ConfigContext/index.js +25 -3
- package/es/DeviceSelect/TreeType.d.ts +6 -0
- package/es/DeviceSelect/TreeType.js +36 -0
- package/es/DeviceSelect/demo.js +2 -2
- package/es/DeviceSelect/index.css +6 -1
- package/es/DeviceSelect/index.d.ts +5 -0
- package/es/DeviceSelect/index.js +22 -54
- package/es/Dict/desc.js +3 -3
- package/es/Dict/utils.js +3 -3
- package/es/HightLevel/index.js +1 -2
- package/es/IconFont/index.d.ts +0 -1
- package/es/IconFont/index.js +12 -13
- package/es/InitialConfig/index.js +7 -4
- package/es/InitialConfig/utils.d.ts +5 -0
- package/es/InitialConfig/utils.js +33 -6
- package/es/InitialRequest/index.d.ts +3 -1
- package/es/InitialRequest/index.js +20 -18
- package/es/InitialRequest/utils.d.ts +4 -3
- package/es/InitialRequest/utils.js +26 -27
- package/es/Input/index.js +3 -2
- package/es/InstanceHistory/index.d.ts +3 -0
- package/es/InstanceHistory/index.js +9 -0
- package/es/List/CheckExt.d.ts +3 -5
- package/es/List/CheckExt.js +21 -13
- package/es/{AppRoute → List/DeviceList}/index.css +0 -0
- package/es/List/DeviceList/index.d.ts +11 -0
- package/es/{DeviceList → List/DeviceList}/index.js +6 -18
- package/es/{DynamicDeviceList → List/DynamicDeviceList}/Demo.d.ts +0 -0
- package/es/{DynamicList/demo.js → List/DynamicDeviceList/Demo.js} +25 -42
- package/es/{DynamicDeviceList → List/DynamicDeviceList}/index.css +5 -17
- package/es/List/DynamicDeviceList/index.d.ts +11 -0
- package/es/List/DynamicDeviceList/index.js +205 -0
- package/es/List/DynamicDeviceList/interface.d.ts +37 -0
- package/es/List/DynamicDeviceList/utils.d.ts +16 -0
- package/es/List/DynamicDeviceList/utils.js +61 -0
- package/es/{DynamicList/demo.d.ts → List/DynamicGridList/Demo.d.ts} +0 -0
- package/es/List/DynamicGridList/Demo.js +70 -0
- package/es/List/DynamicGridList/index.d.ts +26 -0
- package/es/List/DynamicGridList/index.js +73 -0
- package/es/List/GridList/Demo.d.ts +2 -0
- package/es/List/GridList/Demo.js +91 -0
- package/es/List/GridList/hook.d.ts +13 -0
- package/es/List/GridList/hook.js +301 -0
- package/es/List/GridList/index.css +7 -0
- package/es/List/GridList/index.d.ts +15 -0
- package/es/List/GridList/index.js +47 -0
- package/es/List/GridList/interface.d.ts +59 -0
- package/es/List/GridList/utils.d.ts +9 -0
- package/es/List/GridList/utils.js +43 -0
- package/es/List/ListExt/index.css +3 -0
- package/es/{ListExt → List/ListExt}/index.d.ts +1 -1
- package/es/{ListExt → List/ListExt}/index.js +3 -3
- package/es/List/VList/index.css +6 -0
- package/es/List/VList/index.d.ts +18 -0
- package/es/List/VList/index.js +51 -0
- package/es/List/VList/utils.d.ts +14 -0
- package/es/{VList → List/VList}/utils.js +0 -0
- package/es/List/index.css +11 -12
- package/es/List/index.d.ts +5 -70
- package/es/List/index.js +32 -25
- package/es/List/interface.d.ts +87 -0
- package/es/List/renderItem.d.ts +1 -1
- package/es/List/renderItem.js +13 -10
- package/es/LoaderApp/index.d.ts +1 -1
- package/es/LoaderApp/index.js +18 -18
- package/es/LoaderApp/utils.d.ts +2 -1
- package/es/LoaderApp/utils.js +6 -3
- package/es/LoaderScript/index.js +7 -89
- package/es/LoaderScript/utils.d.ts +2 -0
- package/es/LoaderScript/utils.js +170 -33
- package/es/Picture/component/MoveContent/index.js +3 -3
- package/es/Picture/index.js +1 -1
- package/es/Picture/utils.js +1 -1
- package/es/RefDrawer/index.js +1 -1
- package/es/RefModal/index.js +1 -1
- package/es/Service/http.d.ts +6 -4
- package/es/Service/http.js +20 -22
- package/es/Service/index.d.ts +3 -3
- package/es/Service/index.js +7 -11
- package/es/Service/interface.d.ts +5 -11
- package/es/Service/middleware.d.ts +1 -1
- package/es/Service/middleware.js +1 -1
- package/es/TableLayout/index.d.ts +3 -0
- package/es/TableLayout/index.js +14 -45
- package/es/{TreeTitle → Title}/index.css +5 -5
- package/es/{TreeTitle → Title}/index.d.ts +2 -2
- package/es/{TreeTitle → Title}/index.js +7 -4
- package/es/{TreeMode → Tree/BaseTree}/demo.d.ts +0 -0
- package/es/Tree/BaseTree/demo.js +69 -0
- package/es/Tree/BaseTree/index.css +64 -0
- package/es/Tree/BaseTree/index.d.ts +24 -0
- package/es/Tree/BaseTree/index.js +83 -0
- package/es/Tree/demo.js +19 -56
- package/es/Tree/index.css +29 -55
- package/es/Tree/index.d.ts +19 -20
- package/es/Tree/index.js +185 -70
- package/es/UserSelect/index.js +7 -8
- package/es/WorkerFlow/Form/Condition.js +2 -4
- package/es/WorkerFlow/Form/EmptyUserSet.js +1 -1
- package/es/WorkerFlow/Form/FormAuth.js +3 -3
- package/es/WorkerFlow/Form/GroupList.js +2 -2
- package/es/WorkerFlow/Form/GroupSelect.js +1 -1
- package/es/WorkerFlow/Form/GroupSelectModalContent.js +2 -3
- package/es/WorkerFlow/Form/LevelGroupSelect.js +2 -2
- package/es/WorkerFlow/Form/UserAndGroupSelect.js +1 -1
- package/es/WorkerFlow/Form/UserSelect.js +1 -1
- package/es/WorkerFlow/Form/UserSelectModalContent.js +3 -6
- package/es/WorkerFlow/Form/UserSet.js +3 -3
- package/es/WorkerFlow/Nodes/TitleElement.js +71 -34
- package/es/WorkerFlow/index.css +9 -3
- package/es/WorkerFlow/index.js +14 -9
- package/es/WorkerFlow/utils.js +1 -1
- package/es/index.d.ts +4 -11
- package/es/index.js +4 -11
- package/es/useDrawer/index.d.ts +1 -1
- package/es/useDrawer/index.js +3 -2
- package/es/useHistory/index.d.ts +2 -2
- package/es/useHistory/index.js +3 -6
- package/es/useHttp/index.js +1 -1
- package/es/useModal/index.d.ts +1 -1
- package/es/useModal/index.js +3 -2
- package/es/utils.d.ts +9 -0
- package/es/utils.js +36 -1
- package/package.json +10 -12
- package/tsconfig.json +1 -1
- package/es/AppRoute/Render.d.ts +0 -23
- package/es/AppRoute/Render.js +0 -111
- package/es/AppRoute/Rendered.d.ts +0 -4
- package/es/AppRoute/Rendered.js +0 -11
- package/es/AppRoute/index.d.ts +0 -14
- package/es/AppRoute/index.js +0 -106
- package/es/AppRoute/interface.d.ts +0 -18
- package/es/AppRoute/utils.d.ts +0 -1
- package/es/AppRoute/utils.js +0 -28
- package/es/DeviceList/index.css +0 -32
- package/es/DeviceList/index.d.ts +0 -14
- package/es/DynamicDeviceList/CheckExt.d.ts +0 -8
- package/es/DynamicDeviceList/CheckExt.js +0 -36
- package/es/DynamicDeviceList/Demo.js +0 -17
- package/es/DynamicDeviceList/index.d.ts +0 -35
- package/es/DynamicDeviceList/index.js +0 -224
- package/es/DynamicDeviceList/utils.d.ts +0 -2
- package/es/DynamicDeviceList/utils.js +0 -15
- package/es/DynamicList/index.css +0 -7
- package/es/DynamicList/index.d.ts +0 -31
- package/es/DynamicList/index.js +0 -132
- package/es/IconFont/index.css +0 -0
- package/es/List/utils.d.ts +0 -5
- package/es/List/utils.js +0 -18
- package/es/ListExt/index.css +0 -9
- package/es/ScrollList/index.css +0 -73
- package/es/ScrollList/index.d.ts +0 -24
- package/es/ScrollList/index.js +0 -262
- package/es/ScrollList/utils.js +0 -84
- package/es/Service/logger.d.ts +0 -3
- package/es/Service/logger.js +0 -13
- package/es/Service/utils.d.ts +0 -3
- package/es/Service/utils.js +0 -11
- package/es/TreeMode/demo.js +0 -32
- package/es/TreeMode/index.css +0 -38
- package/es/TreeMode/index.d.ts +0 -23
- package/es/TreeMode/index.js +0 -201
- package/es/VList/index.css +0 -4
- package/es/VList/index.d.ts +0 -16
- package/es/VList/index.js +0 -56
- package/es/VList/utils.d.ts +0 -10
- package/es/useChangeEffect/index.d.ts +0 -3
- package/es/useChangeEffect/index.js +0 -32
- package/es/useHistory/index.css +0 -0
package/es/WorkerFlow/index.css
CHANGED
|
@@ -241,6 +241,9 @@
|
|
|
241
241
|
color: #15bc83;
|
|
242
242
|
text-align: left;
|
|
243
243
|
line-height: 16px;
|
|
244
|
+
width: 100%;
|
|
245
|
+
}
|
|
246
|
+
.worker-flow-design .auto-judge .title-wrapper .node-title-ele {
|
|
244
247
|
display: flex;
|
|
245
248
|
justify-content: space-between;
|
|
246
249
|
}
|
|
@@ -492,8 +495,6 @@
|
|
|
492
495
|
}
|
|
493
496
|
.node-wrap-box .title {
|
|
494
497
|
position: relative;
|
|
495
|
-
display: flex;
|
|
496
|
-
align-items: center;
|
|
497
498
|
padding-left: 10px;
|
|
498
499
|
padding-right: 40px;
|
|
499
500
|
width: 100%;
|
|
@@ -501,10 +502,15 @@
|
|
|
501
502
|
line-height: 30px;
|
|
502
503
|
font-size: 12px;
|
|
503
504
|
color: #fff;
|
|
504
|
-
text-align: left;
|
|
505
505
|
background: #576a95;
|
|
506
506
|
border-radius: 4px 4px 0 0;
|
|
507
507
|
}
|
|
508
|
+
.node-wrap-box .title .node-title-ele {
|
|
509
|
+
width: 100%;
|
|
510
|
+
height: 100%;
|
|
511
|
+
display: flex;
|
|
512
|
+
align-items: center;
|
|
513
|
+
}
|
|
508
514
|
.node-wrap-box .title .iconfont {
|
|
509
515
|
font-size: 12px;
|
|
510
516
|
margin-right: 5px;
|
package/es/WorkerFlow/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import _useUpdateEffect from "ahooks/es/useUpdateEffect";
|
|
2
|
+
import _useCreation from "ahooks/es/useCreation";
|
|
1
3
|
import "antd/lib/modal/style";
|
|
2
4
|
import _Modal from "antd/lib/modal";
|
|
3
5
|
|
|
@@ -22,7 +24,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
22
24
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
23
25
|
|
|
24
26
|
import { __awaiter } from "tslib";
|
|
25
|
-
import React, { useCallback, useImperativeHandle,
|
|
27
|
+
import React, { useCallback, useImperativeHandle, useRef, useState } from 'react';
|
|
26
28
|
import { OptionTypes, NodeTemplates, NodeTypes, createVNodeApprover } from './Nodes/Constants';
|
|
27
29
|
import { downloadBpmnFile, exportBpmnFile as _exportBpmnFile } from './XML';
|
|
28
30
|
import { createId, getEndEventId } from './XML/utils';
|
|
@@ -31,14 +33,13 @@ import ApproverForm from './Form/Approver';
|
|
|
31
33
|
import ConditionForm from './Form/Condition';
|
|
32
34
|
import NotifierForm from './Form/Notifier';
|
|
33
35
|
import { TemplateConfig1 } from './template';
|
|
34
|
-
import cloneDeep from 'lodash
|
|
36
|
+
import { cloneDeep } from 'lodash';
|
|
35
37
|
import EndNode from './Nodes/End';
|
|
36
38
|
import Render from './Nodes/Render';
|
|
37
39
|
import Tools from './Tools';
|
|
38
40
|
import WFC from './OperatorContext';
|
|
39
41
|
import { filterNoticeNode, getJAVATaskData, getUserFormKeys } from './utils';
|
|
40
42
|
import RefDrawer from '../RefDrawer';
|
|
41
|
-
import useChangeEffect from '../useChangeEffect';
|
|
42
43
|
import "./index.css";
|
|
43
44
|
var FormMap = {
|
|
44
45
|
1: ApproverForm,
|
|
@@ -260,15 +261,18 @@ function WorkerFlow(_ref, ref) {
|
|
|
260
261
|
}
|
|
261
262
|
}
|
|
262
263
|
|
|
263
|
-
var endId =
|
|
264
|
+
var endId = _useCreation(function () {
|
|
264
265
|
return getEndEventId(config);
|
|
265
266
|
}, []);
|
|
266
|
-
|
|
267
|
+
|
|
268
|
+
var id = _useCreation(function () {
|
|
267
269
|
return (_data === null || _data === void 0 ? void 0 : _data.id) || createId('Process_001');
|
|
268
270
|
}, []);
|
|
269
|
-
|
|
271
|
+
|
|
272
|
+
var name = _useCreation(function () {
|
|
270
273
|
return (_data === null || _data === void 0 ? void 0 : _data.name) || "\u5DE5\u4F5C\u6D41_".concat(id);
|
|
271
274
|
}, [id]);
|
|
275
|
+
|
|
272
276
|
var getConfig = useCallback(function () {
|
|
273
277
|
var newConfig = filterNoticeNode(config);
|
|
274
278
|
|
|
@@ -286,23 +290,24 @@ function WorkerFlow(_ref, ref) {
|
|
|
286
290
|
taskList: taskList,
|
|
287
291
|
useFormKeys: useFormKeys
|
|
288
292
|
};
|
|
289
|
-
}, [config]);
|
|
293
|
+
}, [config, id, name]);
|
|
290
294
|
/**
|
|
291
295
|
* @description onChange传递数据
|
|
292
296
|
*/
|
|
293
297
|
|
|
294
|
-
|
|
298
|
+
_useUpdateEffect(function () {
|
|
295
299
|
return onChange && onChange(getConfig());
|
|
296
300
|
}, [config]);
|
|
297
301
|
/**
|
|
298
302
|
* @description ref传递数据
|
|
299
303
|
*/
|
|
300
304
|
|
|
305
|
+
|
|
301
306
|
useImperativeHandle(ref, function () {
|
|
302
307
|
return {
|
|
303
308
|
getConfig: getConfig
|
|
304
309
|
};
|
|
305
|
-
}, [
|
|
310
|
+
}, [getConfig]);
|
|
306
311
|
return /*#__PURE__*/React.createElement(WFC.Provider, {
|
|
307
312
|
value: {
|
|
308
313
|
config: config,
|
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';
|
|
14
14
|
import { getNodeById } from './XML/utils';
|
|
15
15
|
export function getJAVATaskData(data) {
|
|
16
16
|
var _a;
|
package/es/index.d.ts
CHANGED
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
export { default as Api } from './Api';
|
|
2
2
|
export { default as AppContext } from './AppContext';
|
|
3
3
|
export { default as AppRedirect } from './AppRedirect';
|
|
4
|
-
export { default as
|
|
4
|
+
export { default as AppRouter } from './AppRouter';
|
|
5
5
|
export { default as Auth } from './Auth';
|
|
6
6
|
export { default as AutoExit } from './AutoExit';
|
|
7
|
+
export { default as Box } from './Box';
|
|
7
8
|
export { default as CheckGroupFixed } from './CheckGroupFixed';
|
|
8
9
|
export { default as Config } from './Config';
|
|
9
10
|
export { default as ConfigContext } from './ConfigContext';
|
|
10
|
-
export { default as ContentBox } from './ContentBox';
|
|
11
11
|
export { default as DeviceIcon } from './DeviceIcon';
|
|
12
|
-
export { default as DeviceList } from './DeviceList';
|
|
13
12
|
export { default as DeviceSelect } from './DeviceSelect';
|
|
14
13
|
export { default as Dict } from './Dict';
|
|
15
14
|
export { default as Drag } from './Drag';
|
|
16
15
|
export { default as Drawer } from './Drawer';
|
|
17
|
-
export { default as DynamicDeviceList } from './DynamicDeviceList';
|
|
18
|
-
export { default as DynamicList } from './DynamicList';
|
|
19
16
|
export { default as FullScreen } from './FullScreen';
|
|
20
17
|
export { default as HightLevel } from './HightLevel';
|
|
21
18
|
export { default as IconFont } from './IconFont';
|
|
@@ -23,9 +20,9 @@ export { default as ImageView } from './ImageView';
|
|
|
23
20
|
export { default as InitialConfig } from './InitialConfig';
|
|
24
21
|
export { default as InitialRequest } from './InitialRequest';
|
|
25
22
|
export { default as Input } from './Input';
|
|
23
|
+
export { default as InstanceHistory } from './InstanceHistory';
|
|
26
24
|
export { default as LabelValue } from './LabelValue';
|
|
27
25
|
export { default as List } from './List';
|
|
28
|
-
export { default as ListExt } from './ListExt';
|
|
29
26
|
export { default as LoaderApp } from './LoaderApp';
|
|
30
27
|
export { default as LoaderScript } from './LoaderScript';
|
|
31
28
|
export { default as Modal } from './Modal';
|
|
@@ -33,18 +30,14 @@ export { default as Picture } from './Picture';
|
|
|
33
30
|
export { default as Progress } from './Progress';
|
|
34
31
|
export { default as RefDrawer } from './RefDrawer';
|
|
35
32
|
export { default as RefModal } from './RefModal';
|
|
36
|
-
export { default as ScrollList } from './ScrollList';
|
|
37
33
|
export { default as Service } from './Service';
|
|
38
34
|
export { default as TableLayout } from './TableLayout';
|
|
39
35
|
export { default as ThemeAntd } from './ThemeAntd';
|
|
36
|
+
export { default as Title } from './Title';
|
|
40
37
|
export { default as Tree } from './Tree';
|
|
41
|
-
export { default as TreeMode } from './TreeMode';
|
|
42
|
-
export { default as TreeTitle } from './TreeTitle';
|
|
43
|
-
export { default as useChangeEffect } from './useChangeEffect';
|
|
44
38
|
export { default as useDrawer } from './useDrawer';
|
|
45
39
|
export { default as useHistory } from './useHistory';
|
|
46
40
|
export { default as useHttp } from './useHttp';
|
|
47
41
|
export { default as useModal } from './useModal';
|
|
48
42
|
export { default as UserSelect } from './UserSelect';
|
|
49
|
-
export { default as VList } from './VList';
|
|
50
43
|
export { default as WorkerFlow } from './WorkerFlow';
|
package/es/index.js
CHANGED
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
export { default as Api } from './Api';
|
|
2
2
|
export { default as AppContext } from './AppContext';
|
|
3
3
|
export { default as AppRedirect } from './AppRedirect';
|
|
4
|
-
export { default as
|
|
4
|
+
export { default as AppRouter } from './AppRouter';
|
|
5
5
|
export { default as Auth } from './Auth';
|
|
6
6
|
export { default as AutoExit } from './AutoExit';
|
|
7
|
+
export { default as Box } from './Box';
|
|
7
8
|
export { default as CheckGroupFixed } from './CheckGroupFixed';
|
|
8
9
|
export { default as Config } from './Config';
|
|
9
10
|
export { default as ConfigContext } from './ConfigContext';
|
|
10
|
-
export { default as ContentBox } from './ContentBox';
|
|
11
11
|
export { default as DeviceIcon } from './DeviceIcon';
|
|
12
|
-
export { default as DeviceList } from './DeviceList';
|
|
13
12
|
export { default as DeviceSelect } from './DeviceSelect';
|
|
14
13
|
export { default as Dict } from './Dict';
|
|
15
14
|
export { default as Drag } from './Drag';
|
|
16
15
|
export { default as Drawer } from './Drawer';
|
|
17
|
-
export { default as DynamicDeviceList } from './DynamicDeviceList';
|
|
18
|
-
export { default as DynamicList } from './DynamicList';
|
|
19
16
|
export { default as FullScreen } from './FullScreen';
|
|
20
17
|
export { default as HightLevel } from './HightLevel';
|
|
21
18
|
export { default as IconFont } from './IconFont';
|
|
@@ -23,9 +20,9 @@ export { default as ImageView } from './ImageView';
|
|
|
23
20
|
export { default as InitialConfig } from './InitialConfig';
|
|
24
21
|
export { default as InitialRequest } from './InitialRequest';
|
|
25
22
|
export { default as Input } from './Input';
|
|
23
|
+
export { default as InstanceHistory } from './InstanceHistory';
|
|
26
24
|
export { default as LabelValue } from './LabelValue';
|
|
27
25
|
export { default as List } from './List';
|
|
28
|
-
export { default as ListExt } from './ListExt';
|
|
29
26
|
export { default as LoaderApp } from './LoaderApp';
|
|
30
27
|
export { default as LoaderScript } from './LoaderScript';
|
|
31
28
|
export { default as Modal } from './Modal';
|
|
@@ -33,18 +30,14 @@ export { default as Picture } from './Picture';
|
|
|
33
30
|
export { default as Progress } from './Progress';
|
|
34
31
|
export { default as RefDrawer } from './RefDrawer';
|
|
35
32
|
export { default as RefModal } from './RefModal';
|
|
36
|
-
export { default as ScrollList } from './ScrollList';
|
|
37
33
|
export { default as Service } from './Service';
|
|
38
34
|
export { default as TableLayout } from './TableLayout';
|
|
39
35
|
export { default as ThemeAntd } from './ThemeAntd';
|
|
36
|
+
export { default as Title } from './Title';
|
|
40
37
|
export { default as Tree } from './Tree';
|
|
41
|
-
export { default as TreeMode } from './TreeMode';
|
|
42
|
-
export { default as TreeTitle } from './TreeTitle';
|
|
43
|
-
export { default as useChangeEffect } from './useChangeEffect';
|
|
44
38
|
export { default as useDrawer } from './useDrawer';
|
|
45
39
|
export { default as useHistory } from './useHistory';
|
|
46
40
|
export { default as useHttp } from './useHttp';
|
|
47
41
|
export { default as useModal } from './useModal';
|
|
48
42
|
export { default as UserSelect } from './UserSelect';
|
|
49
|
-
export { default as VList } from './VList';
|
|
50
43
|
export { default as WorkerFlow } from './WorkerFlow';
|
package/es/useDrawer/index.d.ts
CHANGED
package/es/useDrawer/index.js
CHANGED
|
@@ -19,7 +19,8 @@ import Drawer from '../Drawer';
|
|
|
19
19
|
import CC from '../ConfigContext';
|
|
20
20
|
|
|
21
21
|
function useDrawer() {
|
|
22
|
-
var
|
|
22
|
+
var prefixCls = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'cloudapp';
|
|
23
|
+
var context = useContext(CC.Context);
|
|
23
24
|
var root = useMemo(function () {
|
|
24
25
|
return (context === null || context === void 0 ? void 0 : context.root) || document.body;
|
|
25
26
|
}, [context === null || context === void 0 ? void 0 : context.root]);
|
|
@@ -49,7 +50,7 @@ function useDrawer() {
|
|
|
49
50
|
}, []);
|
|
50
51
|
useEffect(function () {
|
|
51
52
|
ReactDOM.render( /*#__PURE__*/React.createElement(_ConfigProvider, {
|
|
52
|
-
prefixCls:
|
|
53
|
+
prefixCls: prefixCls,
|
|
53
54
|
getPopupContainer: function getPopupContainer() {
|
|
54
55
|
return root;
|
|
55
56
|
}
|
package/es/useHistory/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import '
|
|
2
|
-
declare function useHistory():
|
|
1
|
+
import type { History } from 'history';
|
|
2
|
+
declare function useHistory(): History;
|
|
3
3
|
export default useHistory;
|
package/es/useHistory/index.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
|
-
import
|
|
3
|
-
import "./index.css";
|
|
4
|
-
var _global = window;
|
|
2
|
+
import InstanceHistory from '../InstanceHistory';
|
|
5
3
|
|
|
6
4
|
function useHistory() {
|
|
7
|
-
var naticeHistory = useNativeHistory();
|
|
8
5
|
var history = useMemo(function () {
|
|
9
|
-
return
|
|
10
|
-
}, [
|
|
6
|
+
return InstanceHistory;
|
|
7
|
+
}, []);
|
|
11
8
|
return history;
|
|
12
9
|
}
|
|
13
10
|
|
package/es/useHttp/index.js
CHANGED
|
@@ -10,7 +10,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
10
10
|
|
|
11
11
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
12
|
|
|
13
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
13
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
14
14
|
|
|
15
15
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
16
16
|
var cacheMemory = {};
|
package/es/useModal/index.d.ts
CHANGED
package/es/useModal/index.js
CHANGED
|
@@ -19,7 +19,8 @@ import Modal from '../Modal';
|
|
|
19
19
|
import CC from '../ConfigContext';
|
|
20
20
|
|
|
21
21
|
function useModal() {
|
|
22
|
-
var
|
|
22
|
+
var prefixCls = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'cloudapp';
|
|
23
|
+
var context = useContext(CC.Context);
|
|
23
24
|
var root = useMemo(function () {
|
|
24
25
|
return (context === null || context === void 0 ? void 0 : context.root) || document.body;
|
|
25
26
|
}, [context === null || context === void 0 ? void 0 : context.root]);
|
|
@@ -49,7 +50,7 @@ function useModal() {
|
|
|
49
50
|
}, []);
|
|
50
51
|
useEffect(function () {
|
|
51
52
|
ReactDOM.render( /*#__PURE__*/React.createElement(_ConfigProvider, {
|
|
52
|
-
prefixCls:
|
|
53
|
+
prefixCls: prefixCls,
|
|
53
54
|
getPopupContainer: function getPopupContainer() {
|
|
54
55
|
return root;
|
|
55
56
|
}
|
package/es/utils.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { MutableRefObject } from 'react';
|
|
1
2
|
export declare const getHeader: () => {
|
|
2
3
|
Authorization: any;
|
|
3
4
|
};
|
|
@@ -13,3 +14,11 @@ export declare function getParentListById(id: string, orgList?: any[], list?: an
|
|
|
13
14
|
export declare function getPlaceCodesWithParent(areaCode: string, list?: any[], areaCodes?: string[], key?: string, pkey?: string): any;
|
|
14
15
|
export declare function nextTick(cb: () => void): void;
|
|
15
16
|
export declare function tryCatch(resolveFn: () => Promise<any>, rejectFn?: (e: unknown) => void): Promise<void>;
|
|
17
|
+
declare type TargetValue<T> = T | undefined | null;
|
|
18
|
+
declare type TargetType = HTMLElement | Element | Window | Document;
|
|
19
|
+
export declare type BasicTarget<T extends TargetType = Element> = (() => TargetValue<T>) | TargetValue<T> | MutableRefObject<TargetValue<T>>;
|
|
20
|
+
export declare function getTargetElement<T extends TargetType>(target: BasicTarget<T>, defaultElement?: T): T;
|
|
21
|
+
declare const getScrollTop: (el: Document | Element) => number;
|
|
22
|
+
declare const getScrollHeight: (el: Document | Element) => number;
|
|
23
|
+
declare const getClientHeight: (el: Document | Element) => number;
|
|
24
|
+
export { getScrollTop, getScrollHeight, getClientHeight };
|
package/es/utils.js
CHANGED
|
@@ -88,4 +88,39 @@ export function tryCatch(resolveFn) {
|
|
|
88
88
|
}
|
|
89
89
|
}, _callee, null, [[0, 5]]);
|
|
90
90
|
}));
|
|
91
|
-
}
|
|
91
|
+
}
|
|
92
|
+
export function getTargetElement(target, defaultElement) {
|
|
93
|
+
if (!target) {
|
|
94
|
+
return defaultElement;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
var targetElement;
|
|
98
|
+
|
|
99
|
+
if (typeof target === 'function') {
|
|
100
|
+
targetElement = target();
|
|
101
|
+
} else if ('current' in target) {
|
|
102
|
+
targetElement = target.current;
|
|
103
|
+
} else {
|
|
104
|
+
targetElement = target;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return targetElement;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
var getScrollTop = function getScrollTop(el) {
|
|
111
|
+
if (el === document || el === document.body) {
|
|
112
|
+
return Math.max(window.pageYOffset, document.documentElement.scrollTop, document.body.scrollTop);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
return el.scrollTop;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
var getScrollHeight = function getScrollHeight(el) {
|
|
119
|
+
return el.scrollHeight || Math.max(document.documentElement.scrollHeight, document.body.scrollHeight);
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
var getClientHeight = function getClientHeight(el) {
|
|
123
|
+
return el.clientHeight || Math.max(document.documentElement.clientHeight, document.body.clientHeight);
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
export { getScrollTop, getScrollHeight, getClientHeight };
|
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.
|
|
5
|
+
"version": "2.1.0-alpha.4",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"start": "dumi dev",
|
|
8
8
|
"docs:build": "dumi build",
|
|
@@ -31,22 +31,19 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"add-dom-event-listener": "^1.1.0",
|
|
34
|
-
"ahooks": "^
|
|
34
|
+
"ahooks": "^3.1.0",
|
|
35
35
|
"chroma-js": "^2.1.2",
|
|
36
36
|
"fetch-like-axios": "^0.0.5",
|
|
37
37
|
"immer": "^9.0.5",
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"mobx": "^6.3.2",
|
|
41
|
-
"rc-queue-anim": "^2.0.0",
|
|
42
|
-
"react-virtualized": "^9.22.3"
|
|
38
|
+
"lodash": "^4.17.21",
|
|
39
|
+
"rc-queue-anim": "^2.0.0"
|
|
43
40
|
},
|
|
44
41
|
"devDependencies": {
|
|
45
|
-
"@cloud-app-dev/utils": "^3.0.
|
|
42
|
+
"@cloud-app-dev/utils": "^3.0.3",
|
|
46
43
|
"@types/add-dom-event-listener": "^1.1.0",
|
|
47
44
|
"@types/chroma-js": "^2.1.3",
|
|
48
|
-
"@types/lodash
|
|
49
|
-
"@types/
|
|
45
|
+
"@types/lodash": "^4.14.178",
|
|
46
|
+
"@types/node": "^17.0.5",
|
|
50
47
|
"@umijs/test": "^3.0.5",
|
|
51
48
|
"antd": "^4.17.0",
|
|
52
49
|
"babel-plugin-import": "^1.13.3",
|
|
@@ -54,12 +51,13 @@
|
|
|
54
51
|
"father-build": "^1.19.8",
|
|
55
52
|
"gh-pages": "^3.0.0",
|
|
56
53
|
"lint-staged": "^10.0.7",
|
|
57
|
-
"mobx-react": "^7.2.0",
|
|
58
54
|
"prettier": "^2.2.1",
|
|
59
55
|
"react": "^17.0.2",
|
|
60
56
|
"react-dom": "^17.0.2",
|
|
61
|
-
"react-router-dom": "^
|
|
57
|
+
"react-router-dom": "^6.2.1",
|
|
62
58
|
"rollup-plugin-node-polyfills": "^0.2.1",
|
|
59
|
+
"tslib": "^2.3.1",
|
|
60
|
+
"typescript": "^4.5.4",
|
|
63
61
|
"yorkie": "^2.0.0"
|
|
64
62
|
},
|
|
65
63
|
"repository": {
|
package/tsconfig.json
CHANGED
package/es/AppRoute/Render.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { match, RouteProps } from 'react-router-dom';
|
|
3
|
-
import { IRenderRouteProps } from './interface';
|
|
4
|
-
import * as H from 'history';
|
|
5
|
-
/**
|
|
6
|
-
* @TODO
|
|
7
|
-
* @多种修正使用url判断异步处理这里防止回调执行的时候url变化导致一直执行
|
|
8
|
-
* @每次执行先清除上一次的
|
|
9
|
-
*/
|
|
10
|
-
export declare const RenderRoute: React.MemoExoticComponent<({ location, match, history, setRouteProps }: IRenderRouteProps) => any>;
|
|
11
|
-
interface IRenderComponentsProps {
|
|
12
|
-
state: any;
|
|
13
|
-
props: any;
|
|
14
|
-
}
|
|
15
|
-
export declare const RenderComponents: React.MemoExoticComponent<({ state, props }: IRenderComponentsProps) => any>;
|
|
16
|
-
interface IRenderRoutesProps extends RouteProps {
|
|
17
|
-
routes?: RouteProps[];
|
|
18
|
-
setRouteProps: (match: match<any>, location: H.Location, history: H.History) => void;
|
|
19
|
-
children?: React.ReactNode;
|
|
20
|
-
}
|
|
21
|
-
export declare function RenderRoutes({ routes, setRouteProps, children }: IRenderRoutesProps): JSX.Element;
|
|
22
|
-
export declare function RenderSingleRoute({ exact, strict, sensitive, path, setRouteProps, children }: IRenderRoutesProps): JSX.Element;
|
|
23
|
-
export {};
|
package/es/AppRoute/Render.js
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { __rest } from "tslib";
|
|
2
|
-
import React, { useEffect, useMemo } from 'react';
|
|
3
|
-
import { getRouteItem } from './utils';
|
|
4
|
-
import useHistory from '../useHistory';
|
|
5
|
-
import { Route, Switch } from 'react-router-dom';
|
|
6
|
-
/**
|
|
7
|
-
* @TODO
|
|
8
|
-
* @多种修正使用url判断异步处理这里防止回调执行的时候url变化导致一直执行
|
|
9
|
-
* @每次执行先清除上一次的
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
export var RenderRoute = /*#__PURE__*/React.memo(function (_ref) {
|
|
13
|
-
var location = _ref.location,
|
|
14
|
-
match = _ref.match,
|
|
15
|
-
history = _ref.history,
|
|
16
|
-
setRouteProps = _ref.setRouteProps;
|
|
17
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
18
|
-
useEffect(function () {
|
|
19
|
-
return setRouteProps(match, location, history);
|
|
20
|
-
}, [location.pathname]);
|
|
21
|
-
return null;
|
|
22
|
-
});
|
|
23
|
-
export var RenderComponents = /*#__PURE__*/React.memo(function (_ref2) {
|
|
24
|
-
var state = _ref2.state,
|
|
25
|
-
props = _ref2.props;
|
|
26
|
-
|
|
27
|
-
var _useMemo = useMemo(function () {
|
|
28
|
-
return state;
|
|
29
|
-
}, [state]),
|
|
30
|
-
match = _useMemo.match,
|
|
31
|
-
location = _useMemo.location;
|
|
32
|
-
|
|
33
|
-
var history = useHistory();
|
|
34
|
-
|
|
35
|
-
var _a = useMemo(function () {
|
|
36
|
-
return props;
|
|
37
|
-
}, [props]),
|
|
38
|
-
path = _a.path,
|
|
39
|
-
component = _a.component,
|
|
40
|
-
render = _a.render,
|
|
41
|
-
routes = _a.routes,
|
|
42
|
-
other = __rest(_a, ["path", "component", "render", "routes"]);
|
|
43
|
-
|
|
44
|
-
var _useMemo2 = useMemo(function () {
|
|
45
|
-
var Com, Ren;
|
|
46
|
-
|
|
47
|
-
if (!routes) {
|
|
48
|
-
Com = component;
|
|
49
|
-
Ren = render;
|
|
50
|
-
} else {
|
|
51
|
-
var routeItem = getRouteItem(match, routes);
|
|
52
|
-
Com = routeItem.component;
|
|
53
|
-
Ren = routeItem.render;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
return {
|
|
57
|
-
Com: Com,
|
|
58
|
-
Ren: Ren
|
|
59
|
-
};
|
|
60
|
-
}, [component, match, render, routes]),
|
|
61
|
-
Com = _useMemo2.Com,
|
|
62
|
-
Ren = _useMemo2.Ren;
|
|
63
|
-
|
|
64
|
-
return Com ? /*#__PURE__*/React.cloneElement( /*#__PURE__*/React.createElement(Com, null), Object.assign(Object.assign({}, other), {
|
|
65
|
-
match: match,
|
|
66
|
-
location: location,
|
|
67
|
-
history: history
|
|
68
|
-
})) : Ren(Object.assign(Object.assign({}, other), {
|
|
69
|
-
match: match,
|
|
70
|
-
location: location,
|
|
71
|
-
history: history
|
|
72
|
-
}));
|
|
73
|
-
});
|
|
74
|
-
export function RenderRoutes(_ref3) {
|
|
75
|
-
var routes = _ref3.routes,
|
|
76
|
-
setRouteProps = _ref3.setRouteProps,
|
|
77
|
-
children = _ref3.children;
|
|
78
|
-
return /*#__PURE__*/React.createElement(Switch, null, routes.map(function (item, i) {
|
|
79
|
-
return /*#__PURE__*/React.createElement(Route, {
|
|
80
|
-
exact: !!item.exact,
|
|
81
|
-
sensitive: !!item.sensitive,
|
|
82
|
-
strict: !!item.strict,
|
|
83
|
-
key: i,
|
|
84
|
-
path: item.path,
|
|
85
|
-
render: function render(props) {
|
|
86
|
-
return /*#__PURE__*/React.createElement(RenderRoute, Object.assign({}, props, {
|
|
87
|
-
setRouteProps: setRouteProps
|
|
88
|
-
}));
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
}), children);
|
|
92
|
-
}
|
|
93
|
-
export function RenderSingleRoute(_ref4) {
|
|
94
|
-
var exact = _ref4.exact,
|
|
95
|
-
strict = _ref4.strict,
|
|
96
|
-
sensitive = _ref4.sensitive,
|
|
97
|
-
path = _ref4.path,
|
|
98
|
-
setRouteProps = _ref4.setRouteProps,
|
|
99
|
-
children = _ref4.children;
|
|
100
|
-
return /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(Route, {
|
|
101
|
-
exact: !!exact,
|
|
102
|
-
strict: !!strict,
|
|
103
|
-
sensitive: !!sensitive,
|
|
104
|
-
path: path,
|
|
105
|
-
render: function render(props) {
|
|
106
|
-
return /*#__PURE__*/React.createElement(RenderRoute, Object.assign({}, props, {
|
|
107
|
-
setRouteProps: setRouteProps
|
|
108
|
-
}));
|
|
109
|
-
}
|
|
110
|
-
}), children);
|
|
111
|
-
}
|
package/es/AppRoute/Rendered.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React, { useEffect } from 'react';
|
|
2
|
-
|
|
3
|
-
function Rendered(_ref) {
|
|
4
|
-
var onRendered = _ref.onRendered;
|
|
5
|
-
useEffect(function () {
|
|
6
|
-
return onRendered();
|
|
7
|
-
}, []);
|
|
8
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export default Rendered;
|
package/es/AppRoute/index.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { match } from 'react-router-dom';
|
|
3
|
-
import { IAppRouteType, IAppRouteProps } from './interface';
|
|
4
|
-
import * as H from 'history';
|
|
5
|
-
import './index.less';
|
|
6
|
-
declare class AppRoute extends React.Component<IAppRouteProps, IAppRouteType> {
|
|
7
|
-
private isRender;
|
|
8
|
-
constructor(props: IAppRouteProps);
|
|
9
|
-
shouldComponentUpdate(props: IAppRouteProps): boolean;
|
|
10
|
-
componentWillUnmount(): void;
|
|
11
|
-
setRouteProps: (newMatch: match<any>, newLocation: H.Location<any>, history: H.History<any>) => void;
|
|
12
|
-
render(): JSX.Element;
|
|
13
|
-
}
|
|
14
|
-
export default AppRoute;
|