@cloud-app-dev/vidc 2.3.0 → 3.0.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 +2 -2
- package/es/Config/interface.d.ts +2 -1
- package/es/DomMove/demo.d.ts +2 -0
- package/es/DomMove/demo.js +16 -0
- package/es/DomMove/index.d.ts +16 -0
- package/es/DomMove/index.js +145 -0
- package/es/DomMove/utils.d.ts +8 -0
- package/es/{Picture/component/MoveContent → DomMove}/utils.js +19 -0
- package/es/Drawer/index.d.ts +2 -2
- package/es/Drawer/interface.d.ts +4 -174
- package/es/ErrorBoundary/index.d.ts +18 -0
- package/es/ErrorBoundary/index.js +79 -0
- package/es/List/DynamicGridList/Demo.js +40 -27
- package/es/List/DynamicGridList/index.d.ts +20 -29
- package/es/List/DynamicGridList/index.js +40 -63
- package/es/List/DynamicList/index.css +15 -0
- package/es/List/DynamicList/index.d.ts +14 -0
- package/es/List/DynamicList/index.js +105 -0
- package/es/List/DynamicList/interface.d.ts +19 -0
- package/es/List/DynamicList/utils.d.ts +4 -0
- package/es/List/DynamicList/utils.js +6 -0
- package/es/List/GridList/Demo.js +27 -4
- package/es/List/GridList/index.css +1 -0
- package/es/List/GridList/index.d.ts +2 -2
- package/es/List/GridList/index.js +8 -12
- package/es/List/GridList/interface.d.ts +1 -1
- package/es/List/VList/index.js +2 -3
- package/es/List/index.css +2 -54
- package/es/List/index.d.ts +6 -7
- package/es/List/index.js +14 -153
- package/es/List/interface.d.ts +3 -61
- package/es/LoaderApp/index.d.ts +1 -1
- package/es/LoaderApp/index.js +27 -46
- package/es/LoaderApp/interface.d.ts +3 -0
- package/es/LoaderApp/loader.d.ts +6 -7
- package/es/LoaderApp/loader.js +20 -30
- package/es/LoaderApp/sandbox.back.d.ts +18 -0
- package/es/LoaderApp/sandbox.back.js +356 -0
- package/es/LoaderApp/sandbox.d.ts +12 -0
- package/es/LoaderApp/sandbox.js +110 -0
- package/es/LoaderApp/utils.d.ts +5 -1
- package/es/LoaderApp/utils.js +98 -2
- package/es/Map/AMap.d.ts +1572 -0
- package/es/Map/BasicMap/AMapInstance.d.ts +15 -0
- package/es/Map/BasicMap/AMapInstance.js +66 -0
- package/es/Map/BasicMap/LeafletInstance.d.ts +15 -0
- package/es/Map/BasicMap/LeafletInstance.js +98 -0
- package/es/Map/BasicMap/index.css +24 -0
- package/es/Map/BasicMap/index.d.ts +9 -0
- package/es/Map/BasicMap/index.js +103 -0
- package/es/Map/ClusterLayer/hook.d.ts +5 -0
- package/es/Map/ClusterLayer/hook.js +144 -0
- package/es/Map/ClusterLayer/index.css +26 -0
- package/es/Map/ClusterLayer/index.d.ts +5 -0
- package/es/Map/ClusterLayer/index.js +31 -0
- package/es/Map/ClusterLayer/props.d.ts +8 -0
- package/es/Map/Config/index.d.ts +7 -0
- package/es/{InitialConfig → Map/Config}/index.js +35 -36
- package/es/Map/Config/utils.d.ts +2 -0
- package/es/{List/DynamicDeviceList → Map/Config}/utils.js +48 -45
- package/es/Map/Context/index.d.ts +11 -0
- package/es/Map/Context/index.js +66 -0
- package/es/Map/FindPio/index.css +7 -0
- package/es/Map/FindPio/index.d.ts +4 -0
- package/es/Map/FindPio/index.js +16 -0
- package/es/{WorkerFlow/Demo.d.ts → Map/InfoWindow/demo.d.ts} +0 -0
- package/es/{List/DynamicDeviceList/Demo.js → Map/InfoWindow/demo.js} +27 -25
- package/es/Map/InfoWindow/index.d.ts +8 -0
- package/es/Map/InfoWindow/index.js +74 -0
- package/es/Map/LevelCenter/DragMarker/index.d.ts +12 -0
- package/es/Map/LevelCenter/DragMarker/index.js +48 -0
- package/es/{List/DeviceList → Map/LevelCenter}/index.css +0 -0
- package/es/Map/LevelCenter/index.d.ts +13 -0
- package/es/Map/LevelCenter/index.js +42 -0
- package/es/Map/LoaderMap/index.d.ts +12 -0
- package/es/Map/LoaderMap/index.js +58 -0
- package/es/Map/ResetTools/index.css +32 -0
- package/es/Map/ResetTools/index.d.ts +9 -0
- package/es/Map/ResetTools/index.js +61 -0
- package/es/Map/SinglePoint/Marker/index.d.ts +7 -0
- package/es/Map/SinglePoint/Marker/index.js +29 -0
- package/es/Map/SinglePoint/icon/Place_icon_OnLine_Hover.svg +15 -0
- package/es/Map/SinglePoint/icon/Place_icon_OnLine_Normal.svg +15 -0
- package/es/Map/SinglePoint/icon/Place_icon_OutLine_Hover.svg +15 -0
- package/es/Map/SinglePoint/icon/Place_icon_OutLine_Normal.svg +15 -0
- package/es/Map/SinglePoint/index.css +29 -0
- package/es/Map/SinglePoint/index.d.ts +7 -0
- package/es/Map/SinglePoint/index.js +32 -0
- package/es/Map/hook/useMapType.d.ts +4 -0
- package/es/Map/hook/useMapType.js +13 -0
- package/es/Map/icon.d.ts +2 -0
- package/es/Map/icon.js +10 -0
- package/es/Map/index.d.ts +23 -0
- package/es/Map/index.js +25 -0
- package/es/Map/interface.d.ts +55 -0
- package/es/Map/points.json +61247 -0
- package/es/{Picture/component/MoveContent → Map/useMarker}/index.css +0 -0
- package/es/Map/useMarker/index.d.ts +11 -0
- package/es/{WorkerFlow/Form/FormAuth.js → Map/useMarker/index.js} +57 -80
- package/es/Map/withMap/index.d.ts +2 -0
- package/es/Map/withMap/index.js +12 -0
- package/es/Modal/index.js +7 -5
- package/es/Picture/component/RectMenu/index.d.ts +1 -1
- package/es/Picture/index.d.ts +1 -1
- package/es/Picture/index.js +2 -2
- package/es/Player/api/index.d.ts +2 -8
- package/es/Player/api/index.js +29 -35
- package/es/Player/contraller_bar/left_bar.js +2 -2
- package/es/Player/contraller_bar/right_bar.d.ts +1 -1
- package/es/Player/contraller_bar/right_bar.js +13 -27
- package/es/Player/demo.js +21 -24
- package/es/Player/event/index.js +5 -1
- package/es/Player/frontend_player.d.ts +2 -3
- package/es/Player/frontend_player.js +35 -52
- package/es/Player/frontend_timeline.d.ts +3 -2
- package/es/Player/frontend_timeline.js +20 -9
- package/es/Player/live_heart.js +45 -12
- package/es/Player/message.js +23 -12
- package/es/Player/player.d.ts +29 -7
- package/es/Player/segment_player.d.ts +1 -1
- package/es/Player/segment_player.js +50 -39
- package/es/Player/segment_timeline.js +14 -13
- package/es/Player/single_player.js +59 -14
- package/es/Player/timeline.js +8 -6
- package/es/Player/util.d.ts +4 -25
- package/es/Player/util.js +47 -55
- package/es/PlayerExt/index.css +2 -2
- package/es/PlayerExt/index.d.ts +3 -1
- package/es/PlayerExt/index.js +19 -5
- package/es/ScreenPlayer/Live.d.ts +5 -0
- package/es/ScreenPlayer/Live.js +109 -0
- package/es/ScreenPlayer/LiveTools.d.ts +15 -0
- package/es/ScreenPlayer/LiveTools.js +95 -0
- package/es/ScreenPlayer/PlayerWithExt.d.ts +22 -0
- package/es/ScreenPlayer/PlayerWithExt.js +156 -0
- package/es/ScreenPlayer/Record.d.ts +5 -0
- package/es/{WorkerFlow/index.js → ScreenPlayer/Record.js} +286 -273
- package/es/ScreenPlayer/RecordTools.d.ts +17 -0
- package/es/ScreenPlayer/RecordTools.js +102 -0
- package/es/ScreenPlayer/SegmentTimeLine.d.ts +10 -0
- package/es/ScreenPlayer/SegmentTimeLine.js +40 -0
- package/es/ScreenPlayer/TimeSlider.d.ts +127 -0
- package/es/ScreenPlayer/TimeSlider.js +530 -0
- package/es/ScreenPlayer/demo.d.ts +2 -0
- package/es/ScreenPlayer/demo.js +25 -0
- package/es/ScreenPlayer/demo2.d.ts +2 -0
- package/es/ScreenPlayer/demo2.js +153 -0
- package/es/ScreenPlayer/index.css +49 -0
- package/es/ScreenPlayer/index.d.ts +5 -0
- package/es/ScreenPlayer/index.js +8 -0
- package/es/ScreenPlayer/interface.d.ts +81 -0
- package/es/ScreenPlayer/useRecordList.d.ts +3 -0
- package/es/{WorkerFlow/Form/UserAndGroupSelect.js → ScreenPlayer/useRecordList.js} +173 -176
- package/es/ScreenPlayer/useVideoFit.d.ts +5 -0
- package/es/ScreenPlayer/useVideoFit.js +46 -0
- package/es/ScreenPlayer/utils.d.ts +25 -0
- package/es/ScreenPlayer/utils.js +84 -0
- package/es/Timeout/index.d.ts +33 -0
- package/es/Timeout/index.js +83 -0
- package/es/Tree/demo.js +9 -12
- package/es/Tree/index.css +55 -29
- package/es/Tree/index.d.ts +20 -19
- package/es/Tree/index.js +70 -185
- package/es/index.d.ts +8 -9
- package/es/index.js +8 -9
- package/es/useInfiniteScroll/index.d.ts +16 -0
- package/es/{useHttp → useInfiniteScroll}/index.js +79 -43
- package/es/useVirtualList/index.d.ts +13 -0
- package/es/useVirtualList/index.js +175 -0
- package/es/withErrorBoundary/index.d.ts +9 -0
- package/es/withErrorBoundary/index.js +45 -0
- package/package.json +18 -21
- package/release-build.sh +44 -0
- package/test.js +48 -0
- package/es/DeviceIcon/icon.d.ts +0 -9
- package/es/DeviceIcon/icon.js +0 -138
- package/es/DeviceIcon/index.css +0 -8
- package/es/DeviceIcon/index.d.ts +0 -14
- package/es/DeviceIcon/index.js +0 -37
- package/es/DeviceSelect/TreeType.d.ts +0 -7
- package/es/DeviceSelect/TreeType.js +0 -36
- package/es/DeviceSelect/demo.d.ts +0 -3
- package/es/DeviceSelect/demo.js +0 -22
- package/es/DeviceSelect/index.css +0 -11
- package/es/DeviceSelect/index.d.ts +0 -13
- package/es/DeviceSelect/index.js +0 -191
- package/es/Dict/cache.d.ts +0 -3
- package/es/Dict/cache.js +0 -21
- package/es/Dict/device.d.ts +0 -28
- package/es/Dict/device.js +0 -117
- package/es/Dict/hook.d.ts +0 -3
- package/es/Dict/hook.js +0 -98
- package/es/Dict/index.d.ts +0 -9
- package/es/Dict/index.js +0 -10
- package/es/Dict/interface.d.ts +0 -16
- package/es/Dict/utils.d.ts +0 -10
- package/es/Dict/utils.js +0 -44
- package/es/InitialConfig/index.d.ts +0 -8
- package/es/InitialConfig/utils.d.ts +0 -20
- package/es/InitialConfig/utils.js +0 -110
- package/es/InitialRequest/index.d.ts +0 -9
- package/es/InitialRequest/index.js +0 -97
- package/es/InitialRequest/utils.d.ts +0 -10
- package/es/InitialRequest/utils.js +0 -116
- package/es/List/CheckExt.d.ts +0 -9
- package/es/List/CheckExt.js +0 -36
- package/es/List/DeviceList/index.d.ts +0 -11
- package/es/List/DeviceList/index.js +0 -50
- package/es/List/DynamicDeviceList/Demo.d.ts +0 -3
- package/es/List/DynamicDeviceList/index.css +0 -39
- package/es/List/DynamicDeviceList/index.d.ts +0 -12
- package/es/List/DynamicDeviceList/index.js +0 -205
- package/es/List/DynamicDeviceList/interface.d.ts +0 -37
- package/es/List/DynamicDeviceList/utils.d.ts +0 -16
- package/es/List/ListExt/index.css +0 -3
- package/es/List/ListExt/index.d.ts +0 -19
- package/es/List/ListExt/index.js +0 -44
- package/es/Picture/component/MoveContent/index.d.ts +0 -39
- package/es/Picture/component/MoveContent/index.js +0 -244
- package/es/Picture/component/MoveContent/utils.d.ts +0 -4
- package/es/Title/index.css +0 -25
- package/es/Title/index.d.ts +0 -12
- package/es/Title/index.js +0 -30
- package/es/Tree/BaseTree/index.css +0 -64
- package/es/Tree/BaseTree/index.d.ts +0 -24
- package/es/Tree/BaseTree/index.js +0 -83
- package/es/UserSelect/demo.d.ts +0 -3
- package/es/UserSelect/demo.js +0 -21
- package/es/UserSelect/index.css +0 -16
- package/es/UserSelect/index.d.ts +0 -18
- package/es/UserSelect/index.js +0 -194
- package/es/WorkerFlow/Demo.js +0 -57
- package/es/WorkerFlow/Form/Approver.d.ts +0 -10
- package/es/WorkerFlow/Form/Approver.js +0 -33
- package/es/WorkerFlow/Form/Condition.d.ts +0 -11
- package/es/WorkerFlow/Form/Condition.js +0 -235
- package/es/WorkerFlow/Form/EmptyUserSet.d.ts +0 -8
- package/es/WorkerFlow/Form/EmptyUserSet.js +0 -137
- package/es/WorkerFlow/Form/FormAuth.d.ts +0 -8
- package/es/WorkerFlow/Form/GroupList.d.ts +0 -12
- package/es/WorkerFlow/Form/GroupList.js +0 -44
- package/es/WorkerFlow/Form/GroupSelect.d.ts +0 -8
- package/es/WorkerFlow/Form/GroupSelect.js +0 -167
- package/es/WorkerFlow/Form/GroupSelectModalContent.d.ts +0 -6
- package/es/WorkerFlow/Form/GroupSelectModalContent.js +0 -177
- package/es/WorkerFlow/Form/Handle.d.ts +0 -10
- package/es/WorkerFlow/Form/Handle.js +0 -33
- package/es/WorkerFlow/Form/LevelGroupSelect.d.ts +0 -12
- package/es/WorkerFlow/Form/LevelGroupSelect.js +0 -208
- package/es/WorkerFlow/Form/Notifier.d.ts +0 -8
- package/es/WorkerFlow/Form/Notifier.js +0 -16
- package/es/WorkerFlow/Form/UserAndGroupSelect.d.ts +0 -8
- package/es/WorkerFlow/Form/UserSelect.d.ts +0 -8
- package/es/WorkerFlow/Form/UserSelect.js +0 -150
- package/es/WorkerFlow/Form/UserSelectModalContent.d.ts +0 -6
- package/es/WorkerFlow/Form/UserSelectModalContent.js +0 -166
- package/es/WorkerFlow/Form/UserSet.d.ts +0 -14
- package/es/WorkerFlow/Form/UserSet.js +0 -308
- package/es/WorkerFlow/Form/UsersHandleType.d.ts +0 -7
- package/es/WorkerFlow/Form/UsersHandleType.js +0 -32
- package/es/WorkerFlow/Form/utils.d.ts +0 -3
- package/es/WorkerFlow/Form/utils.js +0 -47
- package/es/WorkerFlow/Nodes/Add.d.ts +0 -7
- package/es/WorkerFlow/Nodes/Add.js +0 -98
- package/es/WorkerFlow/Nodes/AddOption.d.ts +0 -10
- package/es/WorkerFlow/Nodes/AddOption.js +0 -23
- package/es/WorkerFlow/Nodes/AddOptionList.d.ts +0 -8
- package/es/WorkerFlow/Nodes/AddOptionList.js +0 -46
- package/es/WorkerFlow/Nodes/Approver.d.ts +0 -11
- package/es/WorkerFlow/Nodes/Approver.js +0 -53
- package/es/WorkerFlow/Nodes/Condition.d.ts +0 -10
- package/es/WorkerFlow/Nodes/Condition.js +0 -140
- package/es/WorkerFlow/Nodes/Constants.d.ts +0 -35
- package/es/WorkerFlow/Nodes/Constants.js +0 -150
- package/es/WorkerFlow/Nodes/End.d.ts +0 -7
- package/es/WorkerFlow/Nodes/End.js +0 -16
- package/es/WorkerFlow/Nodes/Handle.d.ts +0 -11
- package/es/WorkerFlow/Nodes/Handle.js +0 -52
- package/es/WorkerFlow/Nodes/Node.d.ts +0 -8
- package/es/WorkerFlow/Nodes/Node.js +0 -26
- package/es/WorkerFlow/Nodes/Notifier.d.ts +0 -11
- package/es/WorkerFlow/Nodes/Notifier.js +0 -52
- package/es/WorkerFlow/Nodes/Render.d.ts +0 -8
- package/es/WorkerFlow/Nodes/Render.js +0 -16
- package/es/WorkerFlow/Nodes/Start.d.ts +0 -12
- package/es/WorkerFlow/Nodes/Start.js +0 -26
- package/es/WorkerFlow/Nodes/TitleElement.d.ts +0 -10
- package/es/WorkerFlow/Nodes/TitleElement.js +0 -127
- package/es/WorkerFlow/Nodes/Wrap.d.ts +0 -13
- package/es/WorkerFlow/Nodes/Wrap.js +0 -35
- package/es/WorkerFlow/OperatorContext.d.ts +0 -4
- package/es/WorkerFlow/OperatorContext.js +0 -3
- package/es/WorkerFlow/Tools.d.ts +0 -8
- package/es/WorkerFlow/Tools.js +0 -78
- package/es/WorkerFlow/XML/CanvasTag.d.ts +0 -3
- package/es/WorkerFlow/XML/CanvasTag.js +0 -142
- package/es/WorkerFlow/XML/EndEvent.d.ts +0 -1
- package/es/WorkerFlow/XML/EndEvent.js +0 -14
- package/es/WorkerFlow/XML/ExclusiveGateway.d.ts +0 -9
- package/es/WorkerFlow/XML/ExclusiveGateway.js +0 -101
- package/es/WorkerFlow/XML/Root.d.ts +0 -1
- package/es/WorkerFlow/XML/Root.js +0 -5
- package/es/WorkerFlow/XML/StartEvent.d.ts +0 -5
- package/es/WorkerFlow/XML/StartEvent.js +0 -28
- package/es/WorkerFlow/XML/UserTask.d.ts +0 -5
- package/es/WorkerFlow/XML/UserTask.js +0 -93
- package/es/WorkerFlow/XML/index.d.ts +0 -4
- package/es/WorkerFlow/XML/index.js +0 -100
- package/es/WorkerFlow/XML/utils.d.ts +0 -6
- package/es/WorkerFlow/XML/utils.js +0 -97
- package/es/WorkerFlow/data.json +0 -83
- package/es/WorkerFlow/index.css +0 -779
- package/es/WorkerFlow/index.d.ts +0 -13
- package/es/WorkerFlow/interface.d.ts +0 -93
- package/es/WorkerFlow/template.d.ts +0 -2
- package/es/WorkerFlow/template.js +0 -17
- package/es/WorkerFlow/utils.d.ts +0 -14
- package/es/WorkerFlow/utils.js +0 -212
- package/es/useHttp/index.d.ts +0 -8
package/es/UserSelect/index.js
DELETED
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
import _useUpdateEffect from "ahooks/es/useUpdateEffect";
|
|
2
|
-
import _treeHelper from "@cloud-app-dev/utils/es/treeHelper";
|
|
3
|
-
|
|
4
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
5
|
-
|
|
6
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
-
|
|
8
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
9
|
-
|
|
10
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
11
|
-
|
|
12
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
13
|
-
|
|
14
|
-
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."); }
|
|
15
|
-
|
|
16
|
-
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); }
|
|
17
|
-
|
|
18
|
-
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; }
|
|
19
|
-
|
|
20
|
-
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; }
|
|
21
|
-
|
|
22
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
23
|
-
|
|
24
|
-
import React, { useCallback, useMemo, useState, useImperativeHandle } from 'react';
|
|
25
|
-
import api from '../Api';
|
|
26
|
-
import TreeMode from '../Tree';
|
|
27
|
-
import { uniq, intersectionWith, uniqBy, differenceWith } from 'lodash-es';
|
|
28
|
-
import IconFont from '../IconFont';
|
|
29
|
-
import useHttp from '../useHttp';
|
|
30
|
-
import ListExt from '../List/ListExt';
|
|
31
|
-
import "./index.css";
|
|
32
|
-
|
|
33
|
-
function UserSelect(_ref, ref) {
|
|
34
|
-
var selectUsers = _ref.selectUsers,
|
|
35
|
-
onChange = _ref.onChange,
|
|
36
|
-
_ref$className = _ref.className,
|
|
37
|
-
className = _ref$className === void 0 ? '' : _ref$className,
|
|
38
|
-
filterUserIds = _ref.filterUserIds,
|
|
39
|
-
userParams = _ref.userParams;
|
|
40
|
-
|
|
41
|
-
var _useState = useState({
|
|
42
|
-
keyword1: '',
|
|
43
|
-
keyword2: '',
|
|
44
|
-
orgId: '',
|
|
45
|
-
selectUsers: selectUsers,
|
|
46
|
-
selectIds: selectUsers.map(function (v) {
|
|
47
|
-
return v.id;
|
|
48
|
-
})
|
|
49
|
-
}),
|
|
50
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
51
|
-
state = _useState2[0],
|
|
52
|
-
setState = _useState2[1];
|
|
53
|
-
|
|
54
|
-
var _useHttp = useHttp('QueryOrgList', function () {
|
|
55
|
-
return api.getOrgs();
|
|
56
|
-
}),
|
|
57
|
-
_useHttp$data = _useHttp.data,
|
|
58
|
-
orgList = _useHttp$data === void 0 ? [] : _useHttp$data;
|
|
59
|
-
|
|
60
|
-
var treeData = useMemo(function () {
|
|
61
|
-
return _treeHelper.computTreeList(orgList);
|
|
62
|
-
}, [orgList]);
|
|
63
|
-
var selectId = useMemo(function () {
|
|
64
|
-
return state.orgId ? state.orgId : treeData[0] ? treeData[0].id : undefined;
|
|
65
|
-
}, [treeData, state.orgId]);
|
|
66
|
-
|
|
67
|
-
var _useHttp2 = useHttp(['QueryUserList', selectId, userParams], function (_ref2) {
|
|
68
|
-
var _ref3 = _slicedToArray(_ref2, 2),
|
|
69
|
-
_ = _ref3[0],
|
|
70
|
-
id = _ref3[1];
|
|
71
|
-
|
|
72
|
-
return id ? api.getUsers(id, userParams, filterUserIds) : Promise.resolve();
|
|
73
|
-
}),
|
|
74
|
-
_useHttp2$data = _useHttp2.data,
|
|
75
|
-
userList = _useHttp2$data === void 0 ? [] : _useHttp2$data;
|
|
76
|
-
|
|
77
|
-
var onUserChecked1 = useCallback(function (ids) {
|
|
78
|
-
var items = userList.filter(function (v) {
|
|
79
|
-
return ids.includes(v.id);
|
|
80
|
-
});
|
|
81
|
-
var notInList = differenceWith(state.selectUsers, userList, function (a, b) {
|
|
82
|
-
return a.id === b.id;
|
|
83
|
-
});
|
|
84
|
-
var arr = [];
|
|
85
|
-
items.forEach(function (item) {
|
|
86
|
-
arr.push(item);
|
|
87
|
-
});
|
|
88
|
-
var newUsers = uniqBy([].concat(_toConsumableArray(notInList), arr), 'id');
|
|
89
|
-
setState(function (old) {
|
|
90
|
-
return Object.assign(Object.assign({}, old), {
|
|
91
|
-
selectUsers: newUsers,
|
|
92
|
-
selectIds: uniq([].concat(_toConsumableArray(old.selectIds), _toConsumableArray(ids)))
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
}, [userList, state.selectUsers]);
|
|
96
|
-
var onUserChecked2 = useCallback(function (ids) {
|
|
97
|
-
return setState(function (old) {
|
|
98
|
-
return Object.assign(Object.assign({}, old), {
|
|
99
|
-
selectIds: ids
|
|
100
|
-
});
|
|
101
|
-
});
|
|
102
|
-
}, []);
|
|
103
|
-
var list1CheckedKeys = useMemo(function () {
|
|
104
|
-
return intersectionWith(userList, state.selectUsers, function (a, b) {
|
|
105
|
-
return a.id === b.id;
|
|
106
|
-
}).map(function (v) {
|
|
107
|
-
return v.id;
|
|
108
|
-
});
|
|
109
|
-
}, [userList, state.selectUsers]);
|
|
110
|
-
useImperativeHandle(ref, function () {
|
|
111
|
-
return {
|
|
112
|
-
userList: state.selectUsers.filter(function (v) {
|
|
113
|
-
return state.selectIds.includes(v.id);
|
|
114
|
-
})
|
|
115
|
-
};
|
|
116
|
-
}, [state.selectUsers, state.selectIds]);
|
|
117
|
-
|
|
118
|
-
_useUpdateEffect(function () {
|
|
119
|
-
return onChange && onChange(state.selectUsers.filter(function (v) {
|
|
120
|
-
return state.selectIds.includes(v.id);
|
|
121
|
-
}));
|
|
122
|
-
}, [state.selectUsers, state.selectIds]);
|
|
123
|
-
|
|
124
|
-
var renderList1 = useMemo(function () {
|
|
125
|
-
return userList.filter(function (v) {
|
|
126
|
-
return !state.keyword1 || v.realName.includes(state.keyword1);
|
|
127
|
-
});
|
|
128
|
-
}, [userList, state.keyword1]);
|
|
129
|
-
var renderList2 = useMemo(function () {
|
|
130
|
-
return state.selectUsers.filter(function (v) {
|
|
131
|
-
return !state.keyword2 || v.realName.includes(state.keyword2);
|
|
132
|
-
});
|
|
133
|
-
}, [state.selectUsers, state.keyword2]);
|
|
134
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
135
|
-
className: "user-select-modal-content ".concat(className)
|
|
136
|
-
}, /*#__PURE__*/React.createElement(TreeMode, {
|
|
137
|
-
mode: "Org",
|
|
138
|
-
title: "\u7EC4\u7EC7\u673A\u6784",
|
|
139
|
-
inputPlaceholder: "\u8BF7\u8F93\u5165\u540D\u79F0",
|
|
140
|
-
onSelect: function onSelect(ids) {
|
|
141
|
-
return setState(function (old) {
|
|
142
|
-
return Object.assign(Object.assign({}, old), {
|
|
143
|
-
orgId: ids[0]
|
|
144
|
-
});
|
|
145
|
-
});
|
|
146
|
-
},
|
|
147
|
-
selectedKeys: [selectId]
|
|
148
|
-
}), /*#__PURE__*/React.createElement(ListExt, {
|
|
149
|
-
onChecked: onUserChecked1,
|
|
150
|
-
list: renderList1,
|
|
151
|
-
key: userList.length,
|
|
152
|
-
checkedKeys: list1CheckedKeys,
|
|
153
|
-
itemKey: "id",
|
|
154
|
-
itemNameKey: "realName",
|
|
155
|
-
className: "user-source-list",
|
|
156
|
-
title: "\u4EBA\u5458\u5217\u8868",
|
|
157
|
-
onKeywordChange: function onKeywordChange(v) {
|
|
158
|
-
return setState(function (old) {
|
|
159
|
-
return Object.assign(Object.assign({}, old), {
|
|
160
|
-
keyword1: v
|
|
161
|
-
});
|
|
162
|
-
});
|
|
163
|
-
},
|
|
164
|
-
keywords: state.keyword1,
|
|
165
|
-
whatIcon: function whatIcon() {
|
|
166
|
-
return /*#__PURE__*/React.createElement(IconFont, {
|
|
167
|
-
type: "icon-S_AID_username"
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
}), /*#__PURE__*/React.createElement(ListExt, {
|
|
171
|
-
list: renderList2,
|
|
172
|
-
itemKey: "id",
|
|
173
|
-
itemNameKey: "realName",
|
|
174
|
-
checkedKeys: state.selectIds,
|
|
175
|
-
className: "user-select-list",
|
|
176
|
-
title: "\u5DF2\u9009\u62E9\u4EBA\u5458",
|
|
177
|
-
onKeywordChange: function onKeywordChange(v) {
|
|
178
|
-
return setState(function (old) {
|
|
179
|
-
return Object.assign(Object.assign({}, old), {
|
|
180
|
-
keyword2: v
|
|
181
|
-
});
|
|
182
|
-
});
|
|
183
|
-
},
|
|
184
|
-
keywords: state.keyword2,
|
|
185
|
-
onChecked: onUserChecked2,
|
|
186
|
-
whatIcon: function whatIcon() {
|
|
187
|
-
return /*#__PURE__*/React.createElement(IconFont, {
|
|
188
|
-
type: "icon-S_AID_username"
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
}));
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
export default /*#__PURE__*/React.forwardRef(UserSelect);
|
package/es/WorkerFlow/Demo.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import "antd/lib/config-provider/style";
|
|
2
|
-
import _ConfigProvider from "antd/lib/config-provider";
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import WorkerFlow from './index';
|
|
5
|
-
import data from './data.json';
|
|
6
|
-
var form = [{
|
|
7
|
-
label: '处理意见',
|
|
8
|
-
auth: 1,
|
|
9
|
-
name: 'yijian',
|
|
10
|
-
widgetType: 'SINGLE_SELECTION',
|
|
11
|
-
required: true,
|
|
12
|
-
options: [{
|
|
13
|
-
label: '有效',
|
|
14
|
-
value: 1
|
|
15
|
-
}, {
|
|
16
|
-
label: '无效效',
|
|
17
|
-
value: 0
|
|
18
|
-
}]
|
|
19
|
-
}, {
|
|
20
|
-
label: '备注',
|
|
21
|
-
auth: 1,
|
|
22
|
-
name: 'desc'
|
|
23
|
-
}, {
|
|
24
|
-
label: '图片',
|
|
25
|
-
auth: 1,
|
|
26
|
-
name: 'image'
|
|
27
|
-
}, {
|
|
28
|
-
label: '审核意见',
|
|
29
|
-
auth: 1,
|
|
30
|
-
name: 'shyj',
|
|
31
|
-
options: [{
|
|
32
|
-
label: '同意',
|
|
33
|
-
value: 1
|
|
34
|
-
}, {
|
|
35
|
-
label: '拒绝',
|
|
36
|
-
value: 0
|
|
37
|
-
}]
|
|
38
|
-
}];
|
|
39
|
-
|
|
40
|
-
var App = function App() {
|
|
41
|
-
return /*#__PURE__*/React.createElement(_ConfigProvider, {
|
|
42
|
-
prefixCls: "cloudapp"
|
|
43
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
44
|
-
style: {
|
|
45
|
-
height: 800
|
|
46
|
-
}
|
|
47
|
-
}, /*#__PURE__*/React.createElement(WorkerFlow, {
|
|
48
|
-
form: form,
|
|
49
|
-
data: data.data,
|
|
50
|
-
readOnly: false,
|
|
51
|
-
onChange: console.log,
|
|
52
|
-
hasTools: true,
|
|
53
|
-
errorIds: ['UserTask_2222', 'SequenceFlow_6666']
|
|
54
|
-
})));
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
export default App;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { NodeItem, WorkerFlowFormType } from '../interface';
|
|
3
|
-
interface IApproverFormProps {
|
|
4
|
-
form: WorkerFlowFormType[];
|
|
5
|
-
item: NodeItem;
|
|
6
|
-
onChange: (data: any) => void;
|
|
7
|
-
config: NodeItem;
|
|
8
|
-
}
|
|
9
|
-
declare function ApproverForm({ form, item, onChange, config }: IApproverFormProps): JSX.Element;
|
|
10
|
-
export default ApproverForm;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import React, { useMemo } from 'react';
|
|
2
|
-
import UserSet from './UserSet';
|
|
3
|
-
import FormAuth from './FormAuth';
|
|
4
|
-
import { getParentNodeById } from '../XML/utils';
|
|
5
|
-
|
|
6
|
-
function ApproverForm(_ref) {
|
|
7
|
-
var form = _ref.form,
|
|
8
|
-
item = _ref.item,
|
|
9
|
-
onChange = _ref.onChange,
|
|
10
|
-
config = _ref.config;
|
|
11
|
-
var parentNodeType = useMemo(function () {
|
|
12
|
-
var _a;
|
|
13
|
-
|
|
14
|
-
return (_a = getParentNodeById(config, item.id)) === null || _a === void 0 ? void 0 : _a.bpmnType;
|
|
15
|
-
}, [config, item.id]);
|
|
16
|
-
var includeUserTypes = useMemo(function () {
|
|
17
|
-
return parentNodeType === 'startEvent' ? [1, 3] : parentNodeType === 'sequenceFlow' ? [1, 3, 4, 5] : [1, 2, 3, 4, 5];
|
|
18
|
-
}, [parentNodeType]);
|
|
19
|
-
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(UserSet, {
|
|
20
|
-
chargeLevel: item.chargeLevel,
|
|
21
|
-
userType: item.userType,
|
|
22
|
-
emptyUsers: item.emptyUserList,
|
|
23
|
-
nodeUserList: item.nodeUserList,
|
|
24
|
-
usersHandType: item.usersHandType,
|
|
25
|
-
onChange: onChange,
|
|
26
|
-
includeUserTypes: includeUserTypes
|
|
27
|
-
}), /*#__PURE__*/React.createElement(FormAuth, {
|
|
28
|
-
form: form,
|
|
29
|
-
onChange: onChange
|
|
30
|
-
}));
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export default ApproverForm;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ConditionItemType, NodeItem, WorkerFlowFormType } from '../interface';
|
|
3
|
-
interface IConditionFormProps {
|
|
4
|
-
form: WorkerFlowFormType[];
|
|
5
|
-
item?: NodeItem;
|
|
6
|
-
onChange: (data: any) => void;
|
|
7
|
-
index?: number;
|
|
8
|
-
useConditionFields: ConditionItemType[];
|
|
9
|
-
}
|
|
10
|
-
declare function ConditionForm({ form, item, onChange, useConditionFields }: IConditionFormProps): JSX.Element;
|
|
11
|
-
export default ConditionForm;
|
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
import "antd/lib/radio/style";
|
|
2
|
-
import _Radio from "antd/lib/radio";
|
|
3
|
-
import "antd/lib/button/style";
|
|
4
|
-
import _Button from "antd/lib/button";
|
|
5
|
-
|
|
6
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
7
|
-
|
|
8
|
-
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."); }
|
|
9
|
-
|
|
10
|
-
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); }
|
|
11
|
-
|
|
12
|
-
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; }
|
|
13
|
-
|
|
14
|
-
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; }
|
|
15
|
-
|
|
16
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
17
|
-
|
|
18
|
-
import React, { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
19
|
-
import Box from '../../Box';
|
|
20
|
-
import IconFont from '../../IconFont';
|
|
21
|
-
import Modal from '../../Modal';
|
|
22
|
-
var RefModal = Modal.RefModal;
|
|
23
|
-
|
|
24
|
-
function ConditionForm(_ref) {
|
|
25
|
-
var form = _ref.form,
|
|
26
|
-
item = _ref.item,
|
|
27
|
-
onChange = _ref.onChange,
|
|
28
|
-
_ref$useConditionFiel = _ref.useConditionFields,
|
|
29
|
-
useConditionFields = _ref$useConditionFiel === void 0 ? [] : _ref$useConditionFiel;
|
|
30
|
-
|
|
31
|
-
var _a, _b;
|
|
32
|
-
|
|
33
|
-
var _useState = useState({
|
|
34
|
-
field: (item === null || item === void 0 ? void 0 : item.conditionList) ? (_a = item.conditionList[0]) === null || _a === void 0 ? void 0 : _a.field : '',
|
|
35
|
-
value: (item === null || item === void 0 ? void 0 : item.conditionList) ? (_b = item === null || item === void 0 ? void 0 : item.conditionList[0]) === null || _b === void 0 ? void 0 : _b.value : ''
|
|
36
|
-
}),
|
|
37
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
38
|
-
state = _useState2[0],
|
|
39
|
-
setState = _useState2[1];
|
|
40
|
-
|
|
41
|
-
var formItem = useMemo(function () {
|
|
42
|
-
return form.find(function (v) {
|
|
43
|
-
return v.name === state.field;
|
|
44
|
-
}) || {};
|
|
45
|
-
}, [state.field, form]);
|
|
46
|
-
var options = useMemo(function () {
|
|
47
|
-
return formItem ? formItem.options : [];
|
|
48
|
-
}, [formItem]);
|
|
49
|
-
var cRef = useRef(null);
|
|
50
|
-
var modalRef = useRef(null);
|
|
51
|
-
var disabledValues = useMemo(function () {
|
|
52
|
-
return useConditionFields.filter(function (v) {
|
|
53
|
-
return v.field === formItem.name;
|
|
54
|
-
}).map(function (v) {
|
|
55
|
-
return v.value;
|
|
56
|
-
});
|
|
57
|
-
}, [formItem.name, useConditionFields]);
|
|
58
|
-
var addCondition = useCallback(function () {
|
|
59
|
-
var modal = modalRef.current;
|
|
60
|
-
var allowForm = form.filter(function (v) {
|
|
61
|
-
return v.widgetType === 'SINGLE_SELECTION' && v.required;
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
var onOk = function onOk() {
|
|
65
|
-
var _a, _b;
|
|
66
|
-
|
|
67
|
-
var field = cRef.current.field;
|
|
68
|
-
var unChecked = useConditionFields.filter(function (v) {
|
|
69
|
-
return v.field === field;
|
|
70
|
-
}).map(function (v) {
|
|
71
|
-
return v.value;
|
|
72
|
-
});
|
|
73
|
-
var value = (_b = (_a = form.find(function (v) {
|
|
74
|
-
return v.name === field;
|
|
75
|
-
})) === null || _a === void 0 ? void 0 : _a.options.filter(function (v) {
|
|
76
|
-
return !unChecked.includes(v.value);
|
|
77
|
-
})[0]) === null || _b === void 0 ? void 0 : _b.value;
|
|
78
|
-
setState(function (old) {
|
|
79
|
-
return Object.assign(Object.assign({}, old), {
|
|
80
|
-
field: field,
|
|
81
|
-
value: value
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
modal.close();
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
var options = {
|
|
88
|
-
content: /*#__PURE__*/React.createElement(ModalContent, {
|
|
89
|
-
ref: cRef,
|
|
90
|
-
form: allowForm,
|
|
91
|
-
value: state.field
|
|
92
|
-
}),
|
|
93
|
-
width: 340,
|
|
94
|
-
title: '选择条件',
|
|
95
|
-
onOk: onOk
|
|
96
|
-
};
|
|
97
|
-
modal.open(options);
|
|
98
|
-
}, [form, state.field, useConditionFields]);
|
|
99
|
-
var delCondition = useCallback(function () {
|
|
100
|
-
return setState(function () {
|
|
101
|
-
return {
|
|
102
|
-
value: undefined,
|
|
103
|
-
field: undefined
|
|
104
|
-
};
|
|
105
|
-
});
|
|
106
|
-
}, []);
|
|
107
|
-
useEffect(function () {
|
|
108
|
-
if (state.field !== undefined && state.value !== undefined && formItem) {
|
|
109
|
-
var conditionList = [{
|
|
110
|
-
field: state.field,
|
|
111
|
-
value: state.value
|
|
112
|
-
}];
|
|
113
|
-
var expression = "${".concat(state.field, " == ").concat(state.value, "}");
|
|
114
|
-
var optionsItem = options.find(function (v) {
|
|
115
|
-
return v.value === state.value;
|
|
116
|
-
});
|
|
117
|
-
var owner = "\"".concat(formItem.label, "\" \u7B49\u4E8E \"").concat(optionsItem.label, "\"");
|
|
118
|
-
onChange({
|
|
119
|
-
conditionList: conditionList,
|
|
120
|
-
expression: expression,
|
|
121
|
-
owner: owner
|
|
122
|
-
});
|
|
123
|
-
} else {
|
|
124
|
-
onChange({
|
|
125
|
-
conditionList: [],
|
|
126
|
-
expression: undefined,
|
|
127
|
-
owner: undefined
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
}, [state.field, state.value, formItem, options]);
|
|
131
|
-
return /*#__PURE__*/React.createElement(Box.InfoBox, {
|
|
132
|
-
title: "\u8BBE\u7F6E\u6761\u4EF6",
|
|
133
|
-
contentStyle: {
|
|
134
|
-
padding: 20
|
|
135
|
-
},
|
|
136
|
-
titleExt: state.field && /*#__PURE__*/React.createElement("span", {
|
|
137
|
-
onClick: addCondition,
|
|
138
|
-
style: {
|
|
139
|
-
color: 'var(--icon)',
|
|
140
|
-
cursor: 'pointer'
|
|
141
|
-
}
|
|
142
|
-
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
143
|
-
type: "icon-S_Edit_Draw",
|
|
144
|
-
style: {
|
|
145
|
-
paddingRight: 4
|
|
146
|
-
}
|
|
147
|
-
}), "\u4FEE\u6539")
|
|
148
|
-
}, !state.field ? /*#__PURE__*/React.createElement(_Button, {
|
|
149
|
-
type: "primary",
|
|
150
|
-
icon: /*#__PURE__*/React.createElement(IconFont, {
|
|
151
|
-
type: "icon-S_Edit_PlusLine"
|
|
152
|
-
}),
|
|
153
|
-
onClick: addCondition
|
|
154
|
-
}, "\u6DFB\u52A0\u6761\u4EF6") : /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
155
|
-
style: {
|
|
156
|
-
fontWeight: 600
|
|
157
|
-
}
|
|
158
|
-
}, formItem.label, " ", /*#__PURE__*/React.createElement(IconFont, {
|
|
159
|
-
style: {
|
|
160
|
-
paddingLeft: 10,
|
|
161
|
-
cursor: 'pointer'
|
|
162
|
-
},
|
|
163
|
-
onClick: delCondition,
|
|
164
|
-
type: "icon-S_AID_delete"
|
|
165
|
-
})), /*#__PURE__*/React.createElement(_Radio.Group, {
|
|
166
|
-
value: state.value,
|
|
167
|
-
onChange: function onChange(e) {
|
|
168
|
-
return setState(function (old) {
|
|
169
|
-
return Object.assign(Object.assign({}, old), {
|
|
170
|
-
value: e.target.value
|
|
171
|
-
});
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
}, options.map(function (item) {
|
|
175
|
-
return /*#__PURE__*/React.createElement(_Radio, {
|
|
176
|
-
key: item.label,
|
|
177
|
-
value: item.value,
|
|
178
|
-
style: {
|
|
179
|
-
margin: '20px 10px'
|
|
180
|
-
},
|
|
181
|
-
disabled: disabledValues.includes(item.value)
|
|
182
|
-
}, item.label);
|
|
183
|
-
}))), /*#__PURE__*/React.createElement(RefModal, {
|
|
184
|
-
ref: modalRef
|
|
185
|
-
}));
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
var ModalContent = /*#__PURE__*/React.forwardRef(function ModalContent(_ref2, ref) {
|
|
189
|
-
var form = _ref2.form,
|
|
190
|
-
value = _ref2.value;
|
|
191
|
-
|
|
192
|
-
var _useState3 = useState({
|
|
193
|
-
field: value || ''
|
|
194
|
-
}),
|
|
195
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
196
|
-
state = _useState4[0],
|
|
197
|
-
setState = _useState4[1];
|
|
198
|
-
|
|
199
|
-
var list = useMemo(function () {
|
|
200
|
-
return form.filter(function (v) {
|
|
201
|
-
return v.options && v.options.length > 0;
|
|
202
|
-
});
|
|
203
|
-
}, [form]);
|
|
204
|
-
useImperativeHandle(ref, function () {
|
|
205
|
-
return {
|
|
206
|
-
field: state.field
|
|
207
|
-
};
|
|
208
|
-
}, [state.field]);
|
|
209
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
210
|
-
style: {
|
|
211
|
-
minHeight: 200
|
|
212
|
-
}
|
|
213
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
214
|
-
className: "placeholder"
|
|
215
|
-
}, "\u8BF7\u9009\u62E9\u7528\u6765\u533A\u5206\u5BA1\u6279\u6D41\u7A0B\u7684\u6761\u4EF6\u5B57\u6BB5"), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(_Radio.Group, {
|
|
216
|
-
value: state.field,
|
|
217
|
-
onChange: function onChange(e) {
|
|
218
|
-
return setState(function (old) {
|
|
219
|
-
return Object.assign(Object.assign({}, old), {
|
|
220
|
-
field: e.target.value
|
|
221
|
-
});
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
|
-
}, list.map(function (item) {
|
|
225
|
-
return /*#__PURE__*/React.createElement(_Radio, {
|
|
226
|
-
key: item.name,
|
|
227
|
-
value: item.name,
|
|
228
|
-
style: {
|
|
229
|
-
display: 'block',
|
|
230
|
-
margin: '20px 0'
|
|
231
|
-
}
|
|
232
|
-
}, item.label);
|
|
233
|
-
}))));
|
|
234
|
-
});
|
|
235
|
-
export default ConditionForm;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { NodeUserType } from '../interface';
|
|
3
|
-
interface IUserSelectProps {
|
|
4
|
-
userList: NodeUserType[];
|
|
5
|
-
onChange: (users: NodeUserType[]) => void;
|
|
6
|
-
}
|
|
7
|
-
declare function EmptyUserSet({ userList, onChange }: IUserSelectProps): JSX.Element;
|
|
8
|
-
export default EmptyUserSet;
|