@cloud-app-dev/vidc 2.0.0-alpha.7 → 2.1.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/.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/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 +44 -14
- package/es/Config/interface.d.ts +12 -5
- package/es/Config/utils.d.ts +1 -1
- package/es/Config/utils.js +1 -3
- 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 +21 -52
- package/es/Dict/desc.js +3 -3
- package/es/Dict/utils.js +3 -3
- 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 -16
- package/es/InitialRequest/utils.d.ts +6 -4
- package/es/InitialRequest/utils.js +52 -70
- 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 -24
- 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/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 +6 -4
- package/es/WorkerFlow/Form/Condition.js +2 -4
- package/es/WorkerFlow/Form/EmptyUserSet.js +2 -4
- package/es/WorkerFlow/Form/FormAuth.js +2 -2
- package/es/WorkerFlow/Form/GroupList.js +2 -2
- package/es/WorkerFlow/Form/GroupSelect.js +2 -4
- package/es/WorkerFlow/Form/GroupSelectModalContent.js +1 -1
- package/es/WorkerFlow/Form/LevelGroupSelect.js +3 -5
- package/es/WorkerFlow/Form/UserAndGroupSelect.js +2 -4
- package/es/WorkerFlow/Form/UserSelect.js +2 -4
- package/es/WorkerFlow/Form/UserSelectModalContent.js +3 -3
- package/es/WorkerFlow/Form/UserSet.js +2 -2
- package/es/WorkerFlow/Nodes/TitleElement.js +71 -34
- package/es/WorkerFlow/index.css +9 -3
- package/es/WorkerFlow/index.js +13 -8
- package/es/WorkerFlow/utils.js +2 -2
- package/es/index.d.ts +3 -11
- package/es/index.js +3 -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 -11
- 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 -261
- 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
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import _useUpdateEffect from "ahooks/es/useUpdateEffect";
|
|
2
|
+
import _nextTick from "@cloud-app-dev/utils/es/nextTick";
|
|
3
|
+
import _useFocusWithin from "ahooks/es/useFocusWithin";
|
|
4
|
+
|
|
1
5
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
6
|
|
|
3
7
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -10,10 +14,9 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
10
14
|
|
|
11
15
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
16
|
|
|
13
|
-
import React, { useState, useEffect, useRef,
|
|
17
|
+
import React, { useState, useEffect, useRef, useContext } from 'react';
|
|
14
18
|
import WFC from '../OperatorContext';
|
|
15
19
|
import IconFont from '../../IconFont';
|
|
16
|
-
import useChangeEffect from '../../useChangeEffect';
|
|
17
20
|
|
|
18
21
|
function TitleElement(_ref) {
|
|
19
22
|
var nodeName = _ref.nodeName,
|
|
@@ -25,57 +28,91 @@ function TitleElement(_ref) {
|
|
|
25
28
|
var _useContext = useContext(WFC),
|
|
26
29
|
readOnly = _useContext.readOnly;
|
|
27
30
|
|
|
28
|
-
var
|
|
31
|
+
var ref = useRef(null);
|
|
32
|
+
|
|
33
|
+
var _useState = useState({
|
|
34
|
+
title: nodeName,
|
|
35
|
+
editable: false
|
|
36
|
+
}),
|
|
29
37
|
_useState2 = _slicedToArray(_useState, 2),
|
|
30
|
-
|
|
31
|
-
|
|
38
|
+
state = _useState2[0],
|
|
39
|
+
setState = _useState2[1];
|
|
32
40
|
|
|
33
|
-
var
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
41
|
+
var setTitle = function setTitle(title) {
|
|
42
|
+
return setState(function (old) {
|
|
43
|
+
return Object.assign(Object.assign({}, old), {
|
|
44
|
+
title: title
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
};
|
|
37
48
|
|
|
38
|
-
var
|
|
39
|
-
|
|
40
|
-
|
|
49
|
+
var setEditable = function setEditable(editable) {
|
|
50
|
+
return setState(function (old) {
|
|
51
|
+
return Object.assign(Object.assign({}, old), {
|
|
52
|
+
editable: editable
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
var isFocus = _useFocusWithin(ref);
|
|
41
58
|
|
|
42
|
-
if (!title) {
|
|
43
|
-
setTitle(placeholder);
|
|
44
|
-
}
|
|
45
|
-
}, [title, placeholder]);
|
|
46
59
|
useEffect(function () {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
60
|
+
if (isFocus && !readOnly && state.editable) {
|
|
61
|
+
_nextTick(function () {
|
|
62
|
+
var _a;
|
|
63
|
+
|
|
64
|
+
return (_a = ref.current) === null || _a === void 0 ? void 0 : _a.select();
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
}, [readOnly, isFocus, state.editable]);
|
|
68
|
+
|
|
69
|
+
_useUpdateEffect(function () {
|
|
70
|
+
return !readOnly && !state.editable && onTitleChange && onTitleChange(state.title);
|
|
71
|
+
}, [state.title, state.editable]);
|
|
72
|
+
|
|
73
|
+
_useUpdateEffect(function () {
|
|
74
|
+
var _a;
|
|
75
|
+
|
|
76
|
+
return (_a = ref.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
77
|
+
}, [state.editable]);
|
|
78
|
+
|
|
79
|
+
_useUpdateEffect(function () {
|
|
80
|
+
return !state.title && !isFocus && setTitle(placeholder);
|
|
81
|
+
}, [isFocus, state.title, placeholder]);
|
|
82
|
+
|
|
83
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
84
|
+
className: "node-title-ele",
|
|
85
|
+
tabIndex: 1000
|
|
86
|
+
}, icon && /*#__PURE__*/React.createElement(IconFont, {
|
|
53
87
|
type: icon,
|
|
54
88
|
style: {
|
|
55
89
|
paddingRight: 4
|
|
56
90
|
}
|
|
57
|
-
}),
|
|
58
|
-
ref:
|
|
91
|
+
}), /*#__PURE__*/React.createElement("input", {
|
|
92
|
+
ref: ref,
|
|
59
93
|
type: "text",
|
|
94
|
+
style: {
|
|
95
|
+
display: !readOnly && state.editable ? 'inline-block' : 'none'
|
|
96
|
+
},
|
|
60
97
|
className: "cloudapp-input editable-title-input",
|
|
61
|
-
onBlur: onBlur,
|
|
62
98
|
onChange: function onChange(e) {
|
|
63
99
|
return setTitle(e.target.value);
|
|
64
100
|
},
|
|
65
|
-
|
|
66
|
-
return
|
|
101
|
+
onBlur: function onBlur() {
|
|
102
|
+
return setEditable(false);
|
|
67
103
|
},
|
|
68
|
-
value: title,
|
|
104
|
+
value: state.title,
|
|
69
105
|
placeholder: placeholder
|
|
70
|
-
})
|
|
106
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
71
107
|
className: "editable-title",
|
|
108
|
+
style: {
|
|
109
|
+
display: !(!readOnly && state.editable) ? 'inline-block' : 'none',
|
|
110
|
+
borderColor: readOnly ? 'transparent' : undefined
|
|
111
|
+
},
|
|
72
112
|
onClick: function onClick() {
|
|
73
113
|
return setEditable(true);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
borderColor: 'transparent'
|
|
77
|
-
} : undefined
|
|
78
|
-
}, title), !readOnly && /*#__PURE__*/React.createElement(IconFont, {
|
|
114
|
+
}
|
|
115
|
+
}, state.title), !readOnly && /*#__PURE__*/React.createElement(IconFont, {
|
|
79
116
|
className: "worker-flow-node-del",
|
|
80
117
|
type: "icon-MarkNo",
|
|
81
118
|
onClick: delNode,
|
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';
|
|
@@ -38,7 +40,6 @@ 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
|
|
13
|
+
import { cloneDeep } from 'lodash';
|
|
14
14
|
import { getNodeById } from './XML/utils';
|
|
15
15
|
export function getJAVATaskData(data) {
|
|
16
16
|
var _a;
|
|
@@ -137,7 +137,7 @@ export function getNextNode(node) {
|
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
export function filterNoticeNode(data) {
|
|
140
|
-
var newData =
|
|
140
|
+
var newData = cloneDeep(data);
|
|
141
141
|
|
|
142
142
|
var fn = function fn(node) {
|
|
143
143
|
var _a; // 过滤抄送节点
|
package/es/index.d.ts
CHANGED
|
@@ -1,21 +1,17 @@
|
|
|
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 AppRoute } from './AppRoute';
|
|
5
4
|
export { default as Auth } from './Auth';
|
|
6
5
|
export { default as AutoExit } from './AutoExit';
|
|
6
|
+
export { default as Box } from './Box';
|
|
7
7
|
export { default as CheckGroupFixed } from './CheckGroupFixed';
|
|
8
8
|
export { default as Config } from './Config';
|
|
9
9
|
export { default as ConfigContext } from './ConfigContext';
|
|
10
|
-
export { default as ContentBox } from './ContentBox';
|
|
11
10
|
export { default as DeviceIcon } from './DeviceIcon';
|
|
12
|
-
export { default as DeviceList } from './DeviceList';
|
|
13
11
|
export { default as DeviceSelect } from './DeviceSelect';
|
|
14
12
|
export { default as Dict } from './Dict';
|
|
15
13
|
export { default as Drag } from './Drag';
|
|
16
14
|
export { default as Drawer } from './Drawer';
|
|
17
|
-
export { default as DynamicDeviceList } from './DynamicDeviceList';
|
|
18
|
-
export { default as DynamicList } from './DynamicList';
|
|
19
15
|
export { default as FullScreen } from './FullScreen';
|
|
20
16
|
export { default as HightLevel } from './HightLevel';
|
|
21
17
|
export { default as IconFont } from './IconFont';
|
|
@@ -23,9 +19,9 @@ export { default as ImageView } from './ImageView';
|
|
|
23
19
|
export { default as InitialConfig } from './InitialConfig';
|
|
24
20
|
export { default as InitialRequest } from './InitialRequest';
|
|
25
21
|
export { default as Input } from './Input';
|
|
22
|
+
export { default as InstanceHistory } from './InstanceHistory';
|
|
26
23
|
export { default as LabelValue } from './LabelValue';
|
|
27
24
|
export { default as List } from './List';
|
|
28
|
-
export { default as ListExt } from './ListExt';
|
|
29
25
|
export { default as LoaderApp } from './LoaderApp';
|
|
30
26
|
export { default as LoaderScript } from './LoaderScript';
|
|
31
27
|
export { default as Modal } from './Modal';
|
|
@@ -33,18 +29,14 @@ export { default as Picture } from './Picture';
|
|
|
33
29
|
export { default as Progress } from './Progress';
|
|
34
30
|
export { default as RefDrawer } from './RefDrawer';
|
|
35
31
|
export { default as RefModal } from './RefModal';
|
|
36
|
-
export { default as ScrollList } from './ScrollList';
|
|
37
32
|
export { default as Service } from './Service';
|
|
38
33
|
export { default as TableLayout } from './TableLayout';
|
|
39
34
|
export { default as ThemeAntd } from './ThemeAntd';
|
|
35
|
+
export { default as Title } from './Title';
|
|
40
36
|
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
37
|
export { default as useDrawer } from './useDrawer';
|
|
45
38
|
export { default as useHistory } from './useHistory';
|
|
46
39
|
export { default as useHttp } from './useHttp';
|
|
47
40
|
export { default as useModal } from './useModal';
|
|
48
41
|
export { default as UserSelect } from './UserSelect';
|
|
49
|
-
export { default as VList } from './VList';
|
|
50
42
|
export { default as WorkerFlow } from './WorkerFlow';
|
package/es/index.js
CHANGED
|
@@ -1,21 +1,17 @@
|
|
|
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 AppRoute } from './AppRoute';
|
|
5
4
|
export { default as Auth } from './Auth';
|
|
6
5
|
export { default as AutoExit } from './AutoExit';
|
|
6
|
+
export { default as Box } from './Box';
|
|
7
7
|
export { default as CheckGroupFixed } from './CheckGroupFixed';
|
|
8
8
|
export { default as Config } from './Config';
|
|
9
9
|
export { default as ConfigContext } from './ConfigContext';
|
|
10
|
-
export { default as ContentBox } from './ContentBox';
|
|
11
10
|
export { default as DeviceIcon } from './DeviceIcon';
|
|
12
|
-
export { default as DeviceList } from './DeviceList';
|
|
13
11
|
export { default as DeviceSelect } from './DeviceSelect';
|
|
14
12
|
export { default as Dict } from './Dict';
|
|
15
13
|
export { default as Drag } from './Drag';
|
|
16
14
|
export { default as Drawer } from './Drawer';
|
|
17
|
-
export { default as DynamicDeviceList } from './DynamicDeviceList';
|
|
18
|
-
export { default as DynamicList } from './DynamicList';
|
|
19
15
|
export { default as FullScreen } from './FullScreen';
|
|
20
16
|
export { default as HightLevel } from './HightLevel';
|
|
21
17
|
export { default as IconFont } from './IconFont';
|
|
@@ -23,9 +19,9 @@ export { default as ImageView } from './ImageView';
|
|
|
23
19
|
export { default as InitialConfig } from './InitialConfig';
|
|
24
20
|
export { default as InitialRequest } from './InitialRequest';
|
|
25
21
|
export { default as Input } from './Input';
|
|
22
|
+
export { default as InstanceHistory } from './InstanceHistory';
|
|
26
23
|
export { default as LabelValue } from './LabelValue';
|
|
27
24
|
export { default as List } from './List';
|
|
28
|
-
export { default as ListExt } from './ListExt';
|
|
29
25
|
export { default as LoaderApp } from './LoaderApp';
|
|
30
26
|
export { default as LoaderScript } from './LoaderScript';
|
|
31
27
|
export { default as Modal } from './Modal';
|
|
@@ -33,18 +29,14 @@ export { default as Picture } from './Picture';
|
|
|
33
29
|
export { default as Progress } from './Progress';
|
|
34
30
|
export { default as RefDrawer } from './RefDrawer';
|
|
35
31
|
export { default as RefModal } from './RefModal';
|
|
36
|
-
export { default as ScrollList } from './ScrollList';
|
|
37
32
|
export { default as Service } from './Service';
|
|
38
33
|
export { default as TableLayout } from './TableLayout';
|
|
39
34
|
export { default as ThemeAntd } from './ThemeAntd';
|
|
35
|
+
export { default as Title } from './Title';
|
|
40
36
|
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
37
|
export { default as useDrawer } from './useDrawer';
|
|
45
38
|
export { default as useHistory } from './useHistory';
|
|
46
39
|
export { default as useHttp } from './useHttp';
|
|
47
40
|
export { default as useModal } from './useModal';
|
|
48
41
|
export { default as UserSelect } from './UserSelect';
|
|
49
|
-
export { default as VList } from './VList';
|
|
50
42
|
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.2",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"start": "dumi dev",
|
|
8
8
|
"docs:build": "dumi build",
|
|
@@ -31,22 +31,20 @@
|
|
|
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
|
-
"lodash": "^4.17.15",
|
|
40
|
-
"mobx": "^6.3.2",
|
|
38
|
+
"lodash": "^4.17.21",
|
|
41
39
|
"rc-queue-anim": "^2.0.0",
|
|
42
|
-
"react-
|
|
40
|
+
"react-activation": "^0.9.12"
|
|
43
41
|
},
|
|
44
42
|
"devDependencies": {
|
|
45
|
-
"@cloud-app-dev/utils": "^3.0.
|
|
43
|
+
"@cloud-app-dev/utils": "^3.0.3",
|
|
46
44
|
"@types/add-dom-event-listener": "^1.1.0",
|
|
47
45
|
"@types/chroma-js": "^2.1.3",
|
|
48
|
-
"@types/lodash": "^4.14.
|
|
49
|
-
"@types/
|
|
46
|
+
"@types/lodash": "^4.14.178",
|
|
47
|
+
"@types/node": "^17.0.5",
|
|
50
48
|
"@umijs/test": "^3.0.5",
|
|
51
49
|
"antd": "^4.17.0",
|
|
52
50
|
"babel-plugin-import": "^1.13.3",
|
|
@@ -54,12 +52,13 @@
|
|
|
54
52
|
"father-build": "^1.19.8",
|
|
55
53
|
"gh-pages": "^3.0.0",
|
|
56
54
|
"lint-staged": "^10.0.7",
|
|
57
|
-
"mobx-react": "^7.2.0",
|
|
58
55
|
"prettier": "^2.2.1",
|
|
59
56
|
"react": "^17.0.2",
|
|
60
57
|
"react-dom": "^17.0.2",
|
|
61
|
-
"react-router-dom": "^
|
|
58
|
+
"react-router-dom": "^6.2.1",
|
|
62
59
|
"rollup-plugin-node-polyfills": "^0.2.1",
|
|
60
|
+
"tslib": "^2.3.1",
|
|
61
|
+
"typescript": "^4.5.4",
|
|
63
62
|
"yorkie": "^2.0.0"
|
|
64
63
|
},
|
|
65
64
|
"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 {};
|