@cloud-app-dev/vidc 2.0.0-alpha.1 → 2.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.umirc.ts +1 -2
- package/es/Api/index.d.ts +3 -4
- package/es/Api/index.js +7 -8
- package/es/AppRedirect/index.css +0 -0
- package/es/AppRedirect/index.d.ts +16 -0
- package/es/AppRedirect/index.js +38 -0
- package/es/AppRoute/Render.d.ts +23 -0
- package/es/AppRoute/Render.js +111 -0
- package/es/AppRoute/Rendered.d.ts +4 -0
- package/es/AppRoute/Rendered.js +11 -0
- package/es/AppRoute/index.css +0 -0
- package/es/AppRoute/index.d.ts +14 -0
- package/es/AppRoute/index.js +106 -0
- package/es/AppRoute/interface.d.ts +18 -0
- package/es/AppRoute/utils.d.ts +1 -0
- package/es/AppRoute/utils.js +28 -0
- package/es/Auth/index.d.ts +8 -0
- package/es/Auth/index.js +17 -0
- package/es/AutoExit/index.js +8 -5
- package/es/CheckGroupFixed/index.css +49 -0
- package/es/CheckGroupFixed/index.d.ts +17 -0
- package/es/CheckGroupFixed/index.js +146 -0
- package/es/Config/index.js +24 -3
- package/es/Config/interface.d.ts +9 -1
- package/es/Config/utils.d.ts +6 -1
- package/es/ConfigContext/index.d.ts +3 -0
- package/es/ContentBox/BetweenBox/index.css +5 -0
- package/es/ContentBox/BetweenBox/index.d.ts +12 -0
- package/es/ContentBox/BetweenBox/index.js +24 -0
- package/es/ContentBox/InfoBox/index.css +23 -0
- package/es/ContentBox/InfoBox/index.d.ts +12 -0
- package/es/ContentBox/InfoBox/index.js +26 -0
- package/es/ContentBox/TwoColumnBox/index.css +77 -0
- package/es/ContentBox/TwoColumnBox/index.d.ts +10 -0
- package/es/ContentBox/TwoColumnBox/index.js +50 -0
- package/es/ContentBox/deps/content-grid.d.ts +9 -0
- package/es/ContentBox/deps/content-grid.js +9 -0
- package/es/ContentBox/deps/grid-factory.d.ts +10 -0
- package/es/ContentBox/deps/grid-factory.js +72 -0
- package/es/ContentBox/deps/simple-grid.d.ts +9 -0
- package/es/ContentBox/deps/simple-grid.js +8 -0
- package/es/ContentBox/index.css +9 -0
- package/es/ContentBox/index.d.ts +14 -0
- package/es/ContentBox/index.js +28 -0
- package/es/DeviceIcon/icon.js +5 -5
- package/es/DeviceIcon/index.js +2 -2
- package/es/DeviceList/index.d.ts +1 -1
- package/es/DeviceList/index.js +4 -4
- package/es/DeviceSelect/index.js +2 -2
- package/es/Dict/cache.d.ts +3 -0
- package/es/Dict/cache.js +21 -0
- package/es/Dict/desc.d.ts +64 -0
- package/es/Dict/desc.js +162 -0
- package/es/Dict/device.d.ts +28 -0
- package/es/Dict/device.js +117 -0
- package/es/Dict/hook.d.ts +4 -0
- package/es/Dict/hook.js +114 -0
- package/es/Dict/index.d.ts +13 -0
- package/es/Dict/index.js +14 -0
- package/es/Dict/interface.d.ts +16 -0
- package/es/Dict/utils.d.ts +11 -0
- package/es/Dict/utils.js +51 -0
- package/es/Drag/DragAndDropItem.d.ts +4 -0
- package/es/Drag/DragAndDropItem.js +145 -0
- package/es/Drag/DropItem.d.ts +4 -0
- package/es/Drag/DropItem.js +54 -0
- package/es/Drag/index.css +0 -0
- package/es/Drag/index.d.ts +7 -0
- package/es/Drag/index.js +7 -0
- package/es/Drag/interface.d.ts +16 -0
- package/es/Drawer/Demo.d.ts +3 -0
- package/es/Drawer/Demo.js +52 -0
- package/es/Drawer/Footer.d.ts +4 -0
- package/es/Drawer/Footer.js +26 -0
- package/es/Drawer/index.css +39 -0
- package/es/Drawer/index.d.ts +12 -0
- package/es/Drawer/index.js +41 -0
- package/es/Drawer/interface.d.ts +191 -0
- package/es/DynamicDeviceList/CheckExt.js +3 -3
- package/es/DynamicDeviceList/index.js +2 -2
- package/es/DynamicDeviceList/utils.js +2 -2
- package/es/DynamicList/demo.d.ts +2 -0
- package/es/DynamicList/demo.js +71 -0
- package/es/DynamicList/index.css +7 -0
- package/es/DynamicList/index.d.ts +31 -0
- package/es/DynamicList/index.js +132 -0
- package/es/FullScreen/index.css +16 -0
- package/es/FullScreen/index.d.ts +10 -0
- package/es/FullScreen/index.js +68 -0
- package/es/HightLevel/index.css +3 -0
- package/es/HightLevel/index.d.ts +9 -0
- package/es/HightLevel/index.js +22 -0
- package/es/IconFont/index.css +0 -0
- package/es/IconFont/index.d.ts +13 -0
- package/es/IconFont/index.js +58 -0
- package/es/ImageView/index.css +6 -0
- package/es/ImageView/index.d.ts +17 -0
- package/es/ImageView/index.js +58 -0
- package/es/InitialConfig/index.js +5 -9
- package/es/InitialRequest/index.js +2 -2
- package/es/InitialRequest/utils.js +1 -1
- package/es/Input/index.css +8 -0
- package/es/Input/index.d.ts +18 -0
- package/es/Input/index.js +75 -0
- package/es/LabelValue/index.css +18 -0
- package/es/LabelValue/index.d.ts +23 -0
- package/es/LabelValue/index.js +32 -0
- package/es/List/CheckExt.d.ts +10 -0
- package/es/List/CheckExt.js +28 -0
- package/es/List/index.css +62 -6
- package/es/List/index.d.ts +73 -11
- package/es/List/index.js +162 -36
- package/es/List/renderItem.d.ts +20 -0
- package/es/List/renderItem.js +68 -0
- package/es/List/utils.d.ts +5 -0
- package/es/List/utils.js +18 -0
- package/es/ListExt/index.css +9 -0
- package/es/ListExt/index.d.ts +19 -0
- package/es/ListExt/index.js +44 -0
- package/es/LoaderScript/index.d.ts +26 -0
- package/es/LoaderScript/index.js +127 -0
- package/es/LoaderScript/interface.d.ts +26 -0
- package/es/LoaderScript/utils.d.ts +12 -0
- package/es/LoaderScript/utils.js +110 -0
- package/es/Modal/index.css +43 -0
- package/es/Modal/index.d.ts +17 -0
- package/es/Modal/index.js +34 -0
- package/es/Modal/interface.d.ts +339 -0
- package/es/Picture/component/DefaultRects/RectInfo.d.ts +7 -0
- package/es/Picture/component/DefaultRects/RectInfo.js +94 -0
- package/es/Picture/component/DefaultRects/index.css +247 -0
- package/es/Picture/component/DefaultRects/index.d.ts +12 -0
- package/es/Picture/component/DefaultRects/index.js +47 -0
- package/es/Picture/component/DefaultRects/utils.d.ts +2 -0
- package/es/Picture/component/DefaultRects/utils.js +11 -0
- package/es/Picture/component/DrawRect/index.css +8 -0
- package/es/Picture/component/DrawRect/index.d.ts +14 -0
- package/es/Picture/component/DrawRect/index.js +41 -0
- package/es/Picture/component/MoveContent/index.css +0 -0
- package/es/Picture/component/MoveContent/index.d.ts +39 -0
- package/es/Picture/component/MoveContent/index.js +240 -0
- package/es/Picture/component/MoveContent/utils.d.ts +4 -0
- package/es/Picture/component/MoveContent/utils.js +19 -0
- package/es/Picture/component/RectMenu/index.css +31 -0
- package/es/Picture/component/RectMenu/index.d.ts +13 -0
- package/es/Picture/component/RectMenu/index.js +81 -0
- package/es/Picture/component/RectMenu/utils.d.ts +12 -0
- package/es/Picture/component/RectMenu/utils.js +22 -0
- package/es/Picture/component/Tools/index.css +42 -0
- package/es/Picture/component/Tools/index.d.ts +13 -0
- package/es/Picture/component/Tools/index.js +83 -0
- package/es/Picture/component/WheelScale/index.d.ts +6 -0
- package/es/Picture/component/WheelScale/index.js +29 -0
- package/es/Picture/dragBound.d.ts +5 -0
- package/es/Picture/dragBound.js +77 -0
- package/es/Picture/index.css +12 -0
- package/es/Picture/index.d.ts +16 -0
- package/es/Picture/index.js +344 -0
- package/es/Picture/interface.d.ts +67 -0
- package/es/Picture/loadCaptureRectImage.d.ts +8 -0
- package/es/Picture/loadCaptureRectImage.js +119 -0
- package/es/Picture/useDraw.d.ts +1 -0
- package/es/Picture/useDraw.js +136 -0
- package/es/Picture/utils.d.ts +22 -0
- package/es/Picture/utils.js +90 -0
- package/es/Progress/index.css +20 -0
- package/es/Progress/index.d.ts +11 -0
- package/es/Progress/index.js +68 -0
- package/es/RefDrawer/index.js +4 -5
- package/es/RefModal/index.js +4 -5
- package/es/ScrollList/index.css +73 -0
- package/es/ScrollList/index.d.ts +24 -0
- package/es/ScrollList/index.js +261 -0
- package/es/ScrollList/utils.js +84 -0
- package/es/Service/http.js +0 -17
- package/es/TableLayout/index.css +4 -0
- package/es/TableLayout/index.d.ts +10 -0
- package/es/TableLayout/index.js +64 -0
- package/es/ThemeAntd/index.css +501 -0
- package/es/ThemeAntd/index.d.ts +7 -0
- package/es/ThemeAntd/index.js +6 -0
- package/es/ThemeAntd/style/button.css +46 -0
- package/es/ThemeAntd/style/checkbox.css +64 -0
- package/es/ThemeAntd/style/form.css +10 -0
- package/es/ThemeAntd/style/input.css +58 -0
- package/es/ThemeAntd/style/pagination.css +44 -0
- package/es/ThemeAntd/style/picker.css +86 -0
- package/es/ThemeAntd/style/popover.css +3 -0
- package/es/ThemeAntd/style/radio.css +71 -0
- package/es/ThemeAntd/style/scrollbar.css +19 -0
- package/es/ThemeAntd/style/select.css +57 -0
- package/es/ThemeAntd/style/table.css +36 -0
- package/es/ThemeAntd/style/tree.css +4 -0
- package/es/Tree/demo.d.ts +2 -0
- package/es/Tree/demo.js +69 -0
- package/es/Tree/index.css +64 -0
- package/es/Tree/index.d.ts +24 -0
- package/es/Tree/index.js +83 -0
- package/es/TreeMode/index.d.ts +1 -1
- package/es/TreeMode/index.js +6 -6
- package/es/TreeTitle/index.js +2 -2
- package/es/UserSelect/index.d.ts +3 -3
- package/es/UserSelect/index.js +13 -15
- package/es/VList/index.css +4 -0
- package/es/VList/index.d.ts +16 -0
- package/es/VList/index.js +56 -0
- package/es/VList/utils.d.ts +10 -0
- package/es/VList/utils.js +17 -0
- package/es/WorkerFlow/Form/Condition.js +6 -6
- package/es/WorkerFlow/Form/EmptyUserSet.js +2 -2
- package/es/WorkerFlow/Form/FormAuth.js +2 -2
- package/es/WorkerFlow/Form/GroupSelect.js +2 -2
- package/es/WorkerFlow/Form/GroupSelectModalContent.js +5 -5
- package/es/WorkerFlow/Form/LevelGroupSelect.js +3 -3
- package/es/WorkerFlow/Form/UserAndGroupSelect.js +2 -2
- package/es/WorkerFlow/Form/UserSelect.js +2 -2
- package/es/WorkerFlow/Form/UserSelectModalContent.js +3 -4
- package/es/WorkerFlow/Form/UserSet.js +2 -2
- package/es/WorkerFlow/Nodes/Add.js +2 -3
- package/es/WorkerFlow/Nodes/AddOption.js +2 -2
- package/es/WorkerFlow/Nodes/Approver.js +2 -2
- package/es/WorkerFlow/Nodes/Condition.js +2 -2
- package/es/WorkerFlow/Nodes/Handle.js +2 -2
- package/es/WorkerFlow/Nodes/Notifier.js +2 -2
- package/es/WorkerFlow/Nodes/TitleElement.js +5 -8
- package/es/WorkerFlow/index.js +2 -3
- package/es/core.d.ts +27 -0
- package/es/index.d.ts +30 -0
- package/es/index.js +30 -0
- package/es/useChangeEffect/index.d.ts +3 -0
- package/es/useChangeEffect/index.js +32 -0
- package/es/useDrawer/index.d.ts +14 -0
- package/es/useDrawer/index.js +90 -0
- package/es/useHistory/index.css +0 -0
- package/es/useHistory/index.d.ts +3 -0
- package/es/useHistory/index.js +14 -0
- package/es/useHttp/index.d.ts +8 -0
- package/es/useHttp/index.js +78 -0
- package/es/useModal/index.d.ts +14 -0
- package/es/useModal/index.js +92 -0
- package/es/utils.d.ts +2 -0
- package/es/utils.js +32 -0
- package/package.json +11 -5
|
@@ -0,0 +1,92 @@
|
|
|
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, { useContext, useEffect, useMemo, useState } from 'react';
|
|
17
|
+
import ReactDOM from 'react-dom';
|
|
18
|
+
import Modal from '../Modal';
|
|
19
|
+
import CC from '../ConfigContext';
|
|
20
|
+
|
|
21
|
+
function useModal() {
|
|
22
|
+
var context = useContext(CC);
|
|
23
|
+
var root = useMemo(function () {
|
|
24
|
+
return (context === null || context === void 0 ? void 0 : context.root) || document.body;
|
|
25
|
+
}, [context === null || context === void 0 ? void 0 : context.root]);
|
|
26
|
+
var div = useMemo(function () {
|
|
27
|
+
return document.createElement('div');
|
|
28
|
+
}, []);
|
|
29
|
+
|
|
30
|
+
var _useState = useState({
|
|
31
|
+
content: null,
|
|
32
|
+
visible: false,
|
|
33
|
+
title: '',
|
|
34
|
+
onOk: undefined,
|
|
35
|
+
width: undefined,
|
|
36
|
+
className: undefined
|
|
37
|
+
}),
|
|
38
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
39
|
+
state = _useState2[0],
|
|
40
|
+
setState = _useState2[1];
|
|
41
|
+
|
|
42
|
+
useEffect(function () {
|
|
43
|
+
root.appendChild(div);
|
|
44
|
+
return function () {
|
|
45
|
+
root.removeChild(div);
|
|
46
|
+
ReactDOM.unmountComponentAtNode(div);
|
|
47
|
+
div.remove();
|
|
48
|
+
};
|
|
49
|
+
}, []);
|
|
50
|
+
useEffect(function () {
|
|
51
|
+
ReactDOM.render( /*#__PURE__*/React.createElement(_ConfigProvider, {
|
|
52
|
+
prefixCls: "cloudapp",
|
|
53
|
+
getPopupContainer: function getPopupContainer() {
|
|
54
|
+
return root;
|
|
55
|
+
}
|
|
56
|
+
}, /*#__PURE__*/React.createElement(Modal, {
|
|
57
|
+
okText: "\u786E\u5B9A",
|
|
58
|
+
cancelText: "\u53D6\u6D88",
|
|
59
|
+
visible: state.visible,
|
|
60
|
+
onOk: state.onOk,
|
|
61
|
+
onCancel: close,
|
|
62
|
+
destroyOnClose: true,
|
|
63
|
+
title: state.title,
|
|
64
|
+
width: state.width,
|
|
65
|
+
className: state.className,
|
|
66
|
+
getContainer: false
|
|
67
|
+
}, state.content)), div);
|
|
68
|
+
}, [state.content, state.visible, state.title, state.onOk, state.width, state.className]);
|
|
69
|
+
|
|
70
|
+
var open = function open(options) {
|
|
71
|
+
setState(function (old) {
|
|
72
|
+
return Object.assign(Object.assign(Object.assign({}, old), options), {
|
|
73
|
+
visible: true
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
var close = function close() {
|
|
79
|
+
setState(function (old) {
|
|
80
|
+
return Object.assign(Object.assign({}, old), {
|
|
81
|
+
visible: false
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
return {
|
|
87
|
+
open: open,
|
|
88
|
+
close: close
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export default useModal;
|
package/es/utils.d.ts
CHANGED
|
@@ -11,3 +11,5 @@ export declare function getParentListById(id: string, orgList?: any[], list?: an
|
|
|
11
11
|
* @param {Array} ids = []
|
|
12
12
|
*/
|
|
13
13
|
export declare function getPlaceCodesWithParent(areaCode: string, list?: any[], areaCodes?: string[], key?: string, pkey?: string): any;
|
|
14
|
+
export declare function nextTick(cb: () => void): void;
|
|
15
|
+
export declare function tryCatch(resolveFn: () => Promise<any>, rejectFn?: (e: unknown) => void): Promise<void>;
|
package/es/utils.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _cache from "@cloud-app-dev/utils/es/cache";
|
|
2
|
+
import { __awaiter } from "tslib";
|
|
2
3
|
export var getHeader = function getHeader() {
|
|
3
4
|
return {
|
|
4
5
|
Authorization: _cache.getCache('token', 'session')
|
|
@@ -56,4 +57,35 @@ export function getPlaceCodesWithParent(areaCode) {
|
|
|
56
57
|
}
|
|
57
58
|
|
|
58
59
|
return areaCodes;
|
|
60
|
+
}
|
|
61
|
+
export function nextTick(cb) {
|
|
62
|
+
Promise.resolve().then(cb);
|
|
63
|
+
}
|
|
64
|
+
export function tryCatch(resolveFn) {
|
|
65
|
+
var rejectFn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : console.error;
|
|
66
|
+
return __awaiter(this, void 0, void 0, /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
67
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
68
|
+
while (1) {
|
|
69
|
+
switch (_context.prev = _context.next) {
|
|
70
|
+
case 0:
|
|
71
|
+
_context.prev = 0;
|
|
72
|
+
_context.next = 3;
|
|
73
|
+
return resolveFn();
|
|
74
|
+
|
|
75
|
+
case 3:
|
|
76
|
+
_context.next = 8;
|
|
77
|
+
break;
|
|
78
|
+
|
|
79
|
+
case 5:
|
|
80
|
+
_context.prev = 5;
|
|
81
|
+
_context.t0 = _context["catch"](0);
|
|
82
|
+
rejectFn(_context.t0);
|
|
83
|
+
|
|
84
|
+
case 8:
|
|
85
|
+
case "end":
|
|
86
|
+
return _context.stop();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}, _callee, null, [[0, 5]]);
|
|
90
|
+
}));
|
|
59
91
|
}
|
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.0.0-alpha.
|
|
5
|
+
"version": "2.0.0-alpha.2",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"start": "dumi dev",
|
|
8
8
|
"docs:build": "dumi build",
|
|
@@ -30,17 +30,23 @@
|
|
|
30
30
|
]
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
+
"add-dom-event-listener": "^1.1.0",
|
|
34
|
+
"ahooks": "^2.10.12",
|
|
33
35
|
"chroma-js": "^2.1.2",
|
|
36
|
+
"fetch-like-axios": "^0.0.5",
|
|
37
|
+
"immer": "^9.0.5",
|
|
34
38
|
"jsencrypt": "^3.2.1",
|
|
35
|
-
"lodash": "^4.17.
|
|
39
|
+
"lodash": "^4.17.15",
|
|
36
40
|
"mobx": "^6.3.2",
|
|
37
|
-
"rc-queue-anim": "^2.0.0"
|
|
41
|
+
"rc-queue-anim": "^2.0.0",
|
|
42
|
+
"react-virtualized": "^9.22.3"
|
|
38
43
|
},
|
|
39
44
|
"devDependencies": {
|
|
40
|
-
"@cloud-app-dev/utils": "^
|
|
41
|
-
"@
|
|
45
|
+
"@cloud-app-dev/utils": "^3.0.2",
|
|
46
|
+
"@types/add-dom-event-listener": "^1.1.0",
|
|
42
47
|
"@types/chroma-js": "^2.1.3",
|
|
43
48
|
"@types/lodash": "^4.14.172",
|
|
49
|
+
"@types/react-virtualized": "^9.21.15",
|
|
44
50
|
"@umijs/test": "^3.0.5",
|
|
45
51
|
"antd": "^4.17.0",
|
|
46
52
|
"babel-plugin-import": "^1.13.3",
|