@cloud-app-dev/vidc 2.2.0-alpha.8 → 2.3.0
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/.eslintignore +1 -3
- package/.eslintrc +3 -0
- package/.prettierignore +1 -0
- package/.umirc.ts +72 -72
- package/es/Box/InfoBox/index.css +5 -6
- package/es/Box/TwoColumnBox/index.css +17 -24
- package/es/Box/TwoColumnBox/index.js +1 -4
- package/es/Box/index.css +1 -1
- package/es/ConfigContext/index.d.ts +1 -1
- package/es/List/DynamicDeviceList/index.css +1 -1
- package/es/List/index.css +2 -2
- package/es/List/index.js +6 -6
- package/es/Modal/index.css +1 -1
- package/es/Modal/index.d.ts +7 -7
- package/es/ThemeAntd/index.css +58 -58
- package/es/ThemeAntd/style/button.css +1 -1
- package/es/ThemeAntd/style/checkbox.css +8 -8
- package/es/ThemeAntd/style/input.css +13 -13
- package/es/ThemeAntd/style/pagination.css +5 -5
- package/es/ThemeAntd/style/picker.css +11 -11
- package/es/ThemeAntd/style/popover.css +1 -1
- package/es/ThemeAntd/style/radio.css +4 -4
- package/es/ThemeAntd/style/scrollbar.css +3 -3
- package/es/ThemeAntd/style/select.css +11 -11
- package/es/ThemeAntd/style/table.css +1 -1
- package/es/Title/index.css +3 -3
- package/es/Tree/index.css +3 -3
- package/es/WorkerFlow/Nodes/Add.js +3 -2
- package/es/WorkerFlow/index.css +3 -3
- package/es/WorkerFlow/utils.d.ts +7 -0
- package/es/WorkerFlow/utils.js +15 -0
- package/es/index.d.ts +2 -2
- package/es/index.js +3 -3
- package/package.json +2 -1
- package/es/Tree/BaseTree/demo.d.ts +0 -3
- package/es/Tree/BaseTree/demo.js +0 -71
- package/pnpm-lock.yaml +0 -13662
|
@@ -39,12 +39,13 @@ function AddNode(_ref) {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
var fn = function fn(e) {
|
|
42
|
-
var _a;
|
|
42
|
+
var _a, _b;
|
|
43
43
|
|
|
44
44
|
var dom = (_a = boxRef.current) === null || _a === void 0 ? void 0 : _a.querySelector('.add-popover');
|
|
45
|
+
var dom2 = (_b = boxRef.current) === null || _b === void 0 ? void 0 : _b.querySelector('.add-node-btn');
|
|
45
46
|
var arrs = Array.from(e.path);
|
|
46
47
|
|
|
47
|
-
if (!arrs.includes(dom)) {
|
|
48
|
+
if (!arrs.includes(dom) && !arrs.includes(dom2)) {
|
|
48
49
|
setShowPop(false);
|
|
49
50
|
}
|
|
50
51
|
};
|
package/es/WorkerFlow/index.css
CHANGED
|
@@ -696,7 +696,7 @@
|
|
|
696
696
|
}
|
|
697
697
|
.users-handle-type-content {
|
|
698
698
|
padding: 20px;
|
|
699
|
-
border-top: 1px solid var(--
|
|
699
|
+
border-top: 1px solid var(--gray2);
|
|
700
700
|
}
|
|
701
701
|
.users-handle-type-content .handle-title {
|
|
702
702
|
font-size: var(--fs);
|
|
@@ -732,7 +732,7 @@
|
|
|
732
732
|
}
|
|
733
733
|
.empty-user-select {
|
|
734
734
|
padding: 20px;
|
|
735
|
-
border-top: 1px solid var(--
|
|
735
|
+
border-top: 1px solid var(--gray2);
|
|
736
736
|
}
|
|
737
737
|
.empty-user-select .title {
|
|
738
738
|
font-size: var(--fs);
|
|
@@ -765,7 +765,7 @@
|
|
|
765
765
|
}
|
|
766
766
|
.post-group-list .post-org-title {
|
|
767
767
|
padding-bottom: 4px;
|
|
768
|
-
border-bottom: 1px solid var(--
|
|
768
|
+
border-bottom: 1px solid var(--gray2);
|
|
769
769
|
font-weight: bold;
|
|
770
770
|
}
|
|
771
771
|
.post-group-list .post-check-item {
|
package/es/WorkerFlow/utils.d.ts
CHANGED
|
@@ -5,3 +5,10 @@ export declare function getNextNode(node: NodeItem): NodeItem | undefined;
|
|
|
5
5
|
export declare function filterNoticeNode(data: NodeItem): NodeItem;
|
|
6
6
|
export declare function getUserFormKeys(data: NodeItem): ConditionItemType[];
|
|
7
7
|
export declare function getFirstUserTask(data: NodeItem): NodeItem | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* @desc html event once
|
|
10
|
+
* @param dom
|
|
11
|
+
* @param eventName
|
|
12
|
+
* @param fn
|
|
13
|
+
*/
|
|
14
|
+
export declare function once(dom: HTMLElement, eventName: keyof HTMLElementEventMap, fn: (e: Event) => void): void;
|
package/es/WorkerFlow/utils.js
CHANGED
|
@@ -194,4 +194,19 @@ export function getFirstUserTask(data) {
|
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
return undefined;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* @desc html event once
|
|
200
|
+
* @param dom
|
|
201
|
+
* @param eventName
|
|
202
|
+
* @param fn
|
|
203
|
+
*/
|
|
204
|
+
|
|
205
|
+
export function once(dom, eventName, fn) {
|
|
206
|
+
var cfn = function cfn(e) {
|
|
207
|
+
dom.removeEventListener(eventName, cfn, false);
|
|
208
|
+
fn(e);
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
dom.addEventListener(eventName, cfn, false);
|
|
197
212
|
}
|
package/es/index.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ export { default as TableLayout } from './TableLayout';
|
|
|
35
35
|
export { default as ThemeAntd } from './ThemeAntd';
|
|
36
36
|
export { default as Title } from './Title';
|
|
37
37
|
export { default as Tree } from './Tree';
|
|
38
|
-
export { default as useHistory } from './useHistory';
|
|
39
|
-
export { default as useHttp } from './useHttp';
|
|
40
38
|
export { default as UserSelect } from './UserSelect';
|
|
41
39
|
export { default as WorkerFlow } from './WorkerFlow';
|
|
40
|
+
export { default as useHistory } from './useHistory';
|
|
41
|
+
export { default as useHttp } from './useHttp';
|
package/es/index.js
CHANGED
|
@@ -35,7 +35,7 @@ export { default as TableLayout } from './TableLayout';
|
|
|
35
35
|
export { default as ThemeAntd } from './ThemeAntd';
|
|
36
36
|
export { default as Title } from './Title';
|
|
37
37
|
export { default as Tree } from './Tree';
|
|
38
|
-
export { default as useHistory } from './useHistory';
|
|
39
|
-
export { default as useHttp } from './useHttp';
|
|
40
38
|
export { default as UserSelect } from './UserSelect';
|
|
41
|
-
export { default as WorkerFlow } from './WorkerFlow';
|
|
39
|
+
export { default as WorkerFlow } from './WorkerFlow';
|
|
40
|
+
export { default as useHistory } from './useHistory';
|
|
41
|
+
export { default as useHttp } from './useHttp';
|
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.3.0",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"start": "dumi dev",
|
|
8
8
|
"docs:build": "dumi build",
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"antd": "^4.21.0",
|
|
53
53
|
"babel-plugin-import": "^1.13.3",
|
|
54
54
|
"dumi": "^1.1.42",
|
|
55
|
+
"eslint-config-react-app": "^7.0.1",
|
|
55
56
|
"father-build": "^1.22.3",
|
|
56
57
|
"gh-pages": "^3.0.0",
|
|
57
58
|
"history": "^5.3.0",
|
package/es/Tree/BaseTree/demo.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import "antd/lib/config-provider/style";
|
|
2
|
-
import _ConfigProvider from "antd/lib/config-provider";
|
|
3
|
-
|
|
4
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
5
|
-
|
|
6
|
-
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."); }
|
|
7
|
-
|
|
8
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
9
|
-
|
|
10
|
-
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; }
|
|
11
|
-
|
|
12
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
13
|
-
|
|
14
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
15
|
-
|
|
16
|
-
import React, { useState } from 'react';
|
|
17
|
-
import Tree from './index';
|
|
18
|
-
import IconFont from '../../IconFont';
|
|
19
|
-
var treeData = [{
|
|
20
|
-
id: '1',
|
|
21
|
-
name: 'test',
|
|
22
|
-
children: [{
|
|
23
|
-
id: '11',
|
|
24
|
-
name: 'test11'
|
|
25
|
-
}, {
|
|
26
|
-
id: '22',
|
|
27
|
-
name: 'test22'
|
|
28
|
-
}]
|
|
29
|
-
}];
|
|
30
|
-
|
|
31
|
-
function App() {
|
|
32
|
-
var _useState = useState({
|
|
33
|
-
keyword: 'te'
|
|
34
|
-
}),
|
|
35
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
36
|
-
state = _useState2[0],
|
|
37
|
-
setState = _useState2[1];
|
|
38
|
-
|
|
39
|
-
return /*#__PURE__*/React.createElement(_ConfigProvider, {
|
|
40
|
-
prefixCls: "cloudapp"
|
|
41
|
-
}, /*#__PURE__*/React.createElement("input", {
|
|
42
|
-
type: "text",
|
|
43
|
-
value: state.keyword,
|
|
44
|
-
onChange: function onChange(e) {
|
|
45
|
-
return setState(function (old) {
|
|
46
|
-
return Object.assign(Object.assign({}, old), {
|
|
47
|
-
keyword: e.target.value
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
52
|
-
style: {
|
|
53
|
-
padding: 20,
|
|
54
|
-
width: 300,
|
|
55
|
-
height: 400
|
|
56
|
-
}
|
|
57
|
-
}, /*#__PURE__*/React.createElement(Tree, {
|
|
58
|
-
treeData: treeData,
|
|
59
|
-
treeNodeProps: {
|
|
60
|
-
keyword: state.keyword
|
|
61
|
-
},
|
|
62
|
-
virtual: false,
|
|
63
|
-
icon: function icon(node) {
|
|
64
|
-
return /*#__PURE__*/React.createElement(IconFont, {
|
|
65
|
-
type: "".concat(treeData.length > 0 && node.id === treeData[0].id ? 'icon-S_Bar_Home' : 'icon-S_Photo_ListTree')
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
})));
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export default App;
|