@cloud-app-dev/vidc 2.0.0-alpha.10 → 2.0.0-alpha.14

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.
Files changed (156) hide show
  1. package/.umirc.ts +1 -1
  2. package/es/AppRedirect/index.js +7 -11
  3. package/es/AppRoute/index.d.ts +3 -6
  4. package/es/AppRoute/index.js +36 -37
  5. package/es/AppRoute/interface.d.ts +2 -12
  6. package/es/AutoExit/index.js +12 -10
  7. package/es/{ContentBox → Box}/BetweenBox/index.css +0 -0
  8. package/es/{ContentBox → Box}/BetweenBox/index.d.ts +0 -0
  9. package/es/{ContentBox → Box}/BetweenBox/index.js +0 -0
  10. package/es/{ContentBox → Box}/InfoBox/index.css +0 -0
  11. package/es/{ContentBox → Box}/InfoBox/index.d.ts +0 -0
  12. package/es/{ContentBox → Box}/InfoBox/index.js +0 -0
  13. package/es/{ContentBox → Box}/TwoColumnBox/index.css +0 -0
  14. package/es/{ContentBox → Box}/TwoColumnBox/index.d.ts +0 -0
  15. package/es/{ContentBox → Box}/TwoColumnBox/index.js +0 -0
  16. package/es/{ContentBox → Box}/deps/content-grid.d.ts +0 -0
  17. package/es/{ContentBox → Box}/deps/content-grid.js +0 -0
  18. package/es/{ContentBox → Box}/deps/grid-factory.d.ts +0 -0
  19. package/es/{ContentBox → Box}/deps/grid-factory.js +0 -0
  20. package/es/{ContentBox → Box}/deps/simple-grid.d.ts +0 -0
  21. package/es/{ContentBox → Box}/deps/simple-grid.js +0 -0
  22. package/es/{ContentBox → Box}/index.css +0 -0
  23. package/es/{ContentBox → Box}/index.d.ts +3 -3
  24. package/es/{ContentBox → Box}/index.js +5 -5
  25. package/es/CheckGroupFixed/index.js +4 -2
  26. package/es/Config/index.js +1 -1
  27. package/es/Config/interface.d.ts +3 -1
  28. package/es/DeviceSelect/TreeType.d.ts +6 -0
  29. package/es/DeviceSelect/TreeType.js +36 -0
  30. package/es/DeviceSelect/demo.js +2 -2
  31. package/es/DeviceSelect/index.css +6 -1
  32. package/es/DeviceSelect/index.d.ts +5 -0
  33. package/es/DeviceSelect/index.js +22 -54
  34. package/es/IconFont/index.d.ts +0 -1
  35. package/es/IconFont/index.js +12 -13
  36. package/es/InitialRequest/utils.js +8 -9
  37. package/es/Input/index.js +3 -2
  38. package/es/List/CheckExt.d.ts +3 -5
  39. package/es/List/CheckExt.js +21 -13
  40. package/es/{AppRoute → List/DeviceList}/index.css +0 -0
  41. package/es/List/DeviceList/index.d.ts +11 -0
  42. package/es/{DeviceList → List/DeviceList}/index.js +6 -18
  43. package/es/{DynamicDeviceList → List/DynamicDeviceList}/Demo.d.ts +0 -0
  44. package/es/{DynamicList/demo.js → List/DynamicDeviceList/Demo.js} +25 -42
  45. package/es/{DynamicDeviceList → List/DynamicDeviceList}/index.css +5 -17
  46. package/es/List/DynamicDeviceList/index.d.ts +11 -0
  47. package/es/List/DynamicDeviceList/index.js +205 -0
  48. package/es/List/DynamicDeviceList/interface.d.ts +37 -0
  49. package/es/List/DynamicDeviceList/utils.d.ts +16 -0
  50. package/es/List/DynamicDeviceList/utils.js +61 -0
  51. package/es/{DynamicList/demo.d.ts → List/DynamicGridList/Demo.d.ts} +0 -0
  52. package/es/List/DynamicGridList/Demo.js +70 -0
  53. package/es/List/DynamicGridList/index.d.ts +26 -0
  54. package/es/List/DynamicGridList/index.js +73 -0
  55. package/es/List/GridList/Demo.d.ts +2 -0
  56. package/es/List/GridList/Demo.js +91 -0
  57. package/es/List/GridList/hook.d.ts +13 -0
  58. package/es/List/GridList/hook.js +301 -0
  59. package/es/List/GridList/index.css +7 -0
  60. package/es/List/GridList/index.d.ts +15 -0
  61. package/es/List/GridList/index.js +47 -0
  62. package/es/List/GridList/interface.d.ts +59 -0
  63. package/es/List/GridList/utils.d.ts +9 -0
  64. package/es/List/GridList/utils.js +43 -0
  65. package/es/List/ListExt/index.css +3 -0
  66. package/es/{ListExt → List/ListExt}/index.d.ts +1 -1
  67. package/es/{ListExt → List/ListExt}/index.js +3 -3
  68. package/es/List/VList/index.css +6 -0
  69. package/es/List/VList/index.d.ts +18 -0
  70. package/es/List/VList/index.js +51 -0
  71. package/es/List/VList/utils.d.ts +14 -0
  72. package/es/{VList → List/VList}/utils.js +0 -0
  73. package/es/List/index.css +11 -12
  74. package/es/List/index.d.ts +5 -70
  75. package/es/List/index.js +32 -25
  76. package/es/List/interface.d.ts +87 -0
  77. package/es/List/renderItem.d.ts +1 -1
  78. package/es/List/renderItem.js +13 -10
  79. package/es/LoaderApp/index.js +4 -1
  80. package/es/LoaderScript/utils.js +60 -37
  81. package/es/Service/http.d.ts +1 -1
  82. package/es/Service/http.js +2 -8
  83. package/es/TableLayout/index.d.ts +3 -0
  84. package/es/TableLayout/index.js +14 -45
  85. package/es/{TreeTitle → Title}/index.css +5 -5
  86. package/es/{TreeTitle → Title}/index.d.ts +2 -2
  87. package/es/{TreeTitle → Title}/index.js +7 -4
  88. package/es/{TreeMode → Tree/BaseTree}/demo.d.ts +0 -0
  89. package/es/Tree/BaseTree/demo.js +69 -0
  90. package/es/Tree/BaseTree/index.css +64 -0
  91. package/es/Tree/BaseTree/index.d.ts +24 -0
  92. package/es/Tree/BaseTree/index.js +83 -0
  93. package/es/Tree/demo.js +19 -56
  94. package/es/Tree/index.css +29 -55
  95. package/es/Tree/index.d.ts +19 -20
  96. package/es/Tree/index.js +185 -70
  97. package/es/UserSelect/index.js +6 -4
  98. package/es/WorkerFlow/Form/Condition.js +2 -4
  99. package/es/WorkerFlow/Form/FormAuth.js +2 -2
  100. package/es/WorkerFlow/Form/GroupList.js +2 -2
  101. package/es/WorkerFlow/Form/GroupSelectModalContent.js +1 -1
  102. package/es/WorkerFlow/Form/UserSelectModalContent.js +2 -2
  103. package/es/WorkerFlow/Form/UserSet.js +2 -2
  104. package/es/WorkerFlow/Nodes/TitleElement.js +71 -34
  105. package/es/WorkerFlow/index.css +9 -3
  106. package/es/WorkerFlow/index.js +3 -2
  107. package/es/index.d.ts +3 -11
  108. package/es/index.js +3 -11
  109. package/es/useDrawer/index.d.ts +1 -1
  110. package/es/useDrawer/index.js +2 -1
  111. package/es/useModal/index.d.ts +1 -1
  112. package/es/useModal/index.js +2 -1
  113. package/es/{IconFont → useNavigate}/index.css +0 -0
  114. package/es/useNavigate/index.d.ts +4 -0
  115. package/es/useNavigate/index.js +14 -0
  116. package/es/utils.d.ts +9 -0
  117. package/es/utils.js +36 -1
  118. package/package.json +4 -8
  119. package/es/AppRoute/Render.d.ts +0 -23
  120. package/es/AppRoute/Render.js +0 -111
  121. package/es/AppRoute/Rendered.d.ts +0 -4
  122. package/es/AppRoute/Rendered.js +0 -11
  123. package/es/AppRoute/utils.d.ts +0 -1
  124. package/es/AppRoute/utils.js +0 -28
  125. package/es/DeviceList/index.css +0 -32
  126. package/es/DeviceList/index.d.ts +0 -14
  127. package/es/DynamicDeviceList/CheckExt.d.ts +0 -8
  128. package/es/DynamicDeviceList/CheckExt.js +0 -36
  129. package/es/DynamicDeviceList/Demo.js +0 -17
  130. package/es/DynamicDeviceList/index.d.ts +0 -35
  131. package/es/DynamicDeviceList/index.js +0 -224
  132. package/es/DynamicDeviceList/utils.d.ts +0 -2
  133. package/es/DynamicDeviceList/utils.js +0 -15
  134. package/es/DynamicList/index.css +0 -7
  135. package/es/DynamicList/index.d.ts +0 -31
  136. package/es/DynamicList/index.js +0 -132
  137. package/es/List/utils.d.ts +0 -5
  138. package/es/List/utils.js +0 -18
  139. package/es/ListExt/index.css +0 -9
  140. package/es/ScrollList/index.css +0 -73
  141. package/es/ScrollList/index.d.ts +0 -24
  142. package/es/ScrollList/index.js +0 -262
  143. package/es/ScrollList/utils.js +0 -84
  144. package/es/TreeMode/demo.js +0 -32
  145. package/es/TreeMode/index.css +0 -38
  146. package/es/TreeMode/index.d.ts +0 -23
  147. package/es/TreeMode/index.js +0 -201
  148. package/es/VList/index.css +0 -4
  149. package/es/VList/index.d.ts +0 -16
  150. package/es/VList/index.js +0 -56
  151. package/es/VList/utils.d.ts +0 -10
  152. package/es/useChangeEffect/index.d.ts +0 -3
  153. package/es/useChangeEffect/index.js +0 -32
  154. package/es/useHistory/index.css +0 -0
  155. package/es/useHistory/index.d.ts +0 -3
  156. package/es/useHistory/index.js +0 -14
@@ -1,73 +0,0 @@
1
- .lm-c-normol-box.lm-c-infinite-scroll-layout {
2
- position: relative;
3
- background-color: transparent;
4
- }
5
- .lm-c-normol-box.lm-c-infinite-scroll-layout .row-group-part {
6
- display: flex;
7
- justify-content: center;
8
- }
9
- .lm-c-normol-box.lm-c-infinite-scroll-layout .row-group-part .row-item-part {
10
- overflow: hidden;
11
- }
12
- .lm-c-normol-box.lm-c-infinite-scroll-layout .row-group-part .row-item-part:last-child {
13
- margin-right: 0 !important;
14
- }
15
- .lm-c-normol-box.lm-c-infinite-scroll-layout .scoll-back-top {
16
- position: absolute;
17
- right: 20px;
18
- bottom: 20px;
19
- height: 40px;
20
- width: 40px;
21
- border-radius: 50%;
22
- background-color: var(--primary);
23
- color: #fff;
24
- cursor: pointer;
25
- text-align: center;
26
- line-height: 40px;
27
- font-size: 18px;
28
- }
29
- .lm-c-normol-box.lm-c-infinite-scroll-layout .scoll-back-top:hover {
30
- background-color: var(--primary);
31
- }
32
- .lm-c-normol-box.lm-c-infinite-scroll-layout.infinite-scroll-empty {
33
- background-repeat: no-repeat;
34
- background-position: center 30%;
35
- background-size: 200px;
36
- }
37
- .lm-c-normol-box.lm-c-infinite-scroll-layout .listcard-title {
38
- font-size: 14px;
39
- font-weight: 700;
40
- margin-bottom: 5px;
41
- justify-content: left;
42
- }
43
- .lm-c-normol-box.lm-c-infinite-scroll-layout .listcard-title.row-group-part:before {
44
- content: '';
45
- border-radius: 10px;
46
- border: 4px solid var(--primary);
47
- position: relative;
48
- margin-right: 10px;
49
- top: 6px;
50
- height: 8px;
51
- display: inline-block;
52
- }
53
- .lm-c-normol-box.lm-c-infinite-scroll-layout .listcard-title.row-group-part.show-line:before {
54
- content: '';
55
- border-radius: 10px;
56
- border: 4px solid var(--primary);
57
- position: relative;
58
- margin-right: 10px;
59
- margin-left: -4px;
60
- top: 6px;
61
- height: 8px;
62
- display: inline-block;
63
- }
64
- .lm-c-normol-box.lm-c-infinite-scroll-layout .row-group-part.show-line:before {
65
- content: '';
66
- border: 0.5px solid #d8d8d8;
67
- margin-right: 15px;
68
- }
69
- .lm-c-normol-box.lm-c-infinite-scroll-layout .row-group-part.hide-line:before {
70
- content: '';
71
- border: none;
72
- margin-right: 15px;
73
- }
@@ -1,24 +0,0 @@
1
- import * as React from 'react';
2
-
3
- export declare interface ScrollListProps<T> {
4
- itemHeight?: number; // 用于计算滚动条的高度
5
- data?: Array<T>;
6
- loadMore?: () => Promise<null>; //加载更多的方法,次方法应该修改props.data
7
- renderItem?: (item: T, index: number) => React.ReactNode;
8
- rowClass?: string;
9
- threshold?: number;
10
- itemClass?: string;
11
- itemGrid?: object;
12
- gutter?: number;
13
- hasLoadPrev?: boolean;
14
- hasLoadMore?: boolean;
15
- loadPrev?: func;
16
- prethreshold?: number;
17
- isNoData?: boolean;
18
- className?: string;
19
- noDataUrl?: string;
20
- }
21
-
22
- declare const ScrollList: React.StatelessComponent<ScrollListProps<T>>;
23
-
24
- export default ScrollList;
@@ -1,262 +0,0 @@
1
- import "antd/lib/tooltip/style";
2
- import _Tooltip from "antd/lib/tooltip";
3
-
4
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
5
-
6
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
7
-
8
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
9
-
10
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
11
-
12
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
13
-
14
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
15
-
16
- 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."); }
17
-
18
- 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); }
19
-
20
- 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; }
21
-
22
- 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; }
23
-
24
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
25
-
26
- import React, { useState, useEffect, useMemo, useRef, useImperativeHandle, forwardRef } from 'react';
27
- import AutoSizer from 'react-virtualized/dist/es/AutoSizer';
28
- import InfiniteLoader from 'react-virtualized/dist/es/InfiniteLoader';
29
- import List from 'react-virtualized/dist/es/List';
30
- import IconFont from '../IconFont';
31
- import debounce from 'lodash-es/debounce';
32
- import cloneDeep from 'lodash-es/cloneDeep';
33
- import { computedCuurentGrid, arraySliceForX, simpleGrid } from './utils';
34
- import "./index.css";
35
- var ScrollList = /*#__PURE__*/forwardRef(function InfiniteScrollLayout(props, ref) {
36
- var data = props.data,
37
- itemGrid = props.itemGrid,
38
- itemHeight = props.itemHeight,
39
- threshold = props.threshold,
40
- isNoData = props.isNoData,
41
- _props$className = props.className,
42
- className = _props$className === void 0 ? '' : _props$className,
43
- hasLoadPrev = props.hasLoadPrev,
44
- loadPrev = props.loadPrev,
45
- prethreshold = props.prethreshold,
46
- noDataUrl = props.noDataUrl;
47
- var infiniteRef = useRef(null);
48
- var loadingRef = useRef(false);
49
- var scrollRef = useRef(false);
50
-
51
- var _useState = useState(false),
52
- _useState2 = _slicedToArray(_useState, 2),
53
- showBackTop = _useState2[0],
54
- setShowBackUp = _useState2[1];
55
-
56
- var _useState3 = useState(computedCuurentGrid()),
57
- _useState4 = _slicedToArray(_useState3, 2),
58
- currentGrid = _useState4[0],
59
- setContentGrid = _useState4[1];
60
-
61
- var debounced = null;
62
- useEffect(function () {
63
- var bindResizeEvent = function bindResizeEvent() {
64
- setContentGrid(computedCuurentGrid());
65
- };
66
-
67
- window.addEventListener('resize', bindResizeEvent, false);
68
- return function () {
69
- debounced && debounced.cancel();
70
- window.removeEventListener('resize', bindResizeEvent, false);
71
- }; // eslint-disable-next-line react-hooks/exhaustive-deps
72
- }, []);
73
- var rowCount = useMemo(function () {
74
- return Math.floor(24 / itemGrid[currentGrid]);
75
- }, [itemGrid, currentGrid]);
76
- var renderData = useMemo(function () {
77
- return arraySliceForX(data, rowCount);
78
- }, [data, rowCount]);
79
-
80
- function forceUpdateGrid() {
81
- infiniteRef.current && infiniteRef.current._registeredChild.forceUpdateGrid();
82
- }
83
-
84
- function scrollToPosition() {
85
- var _infiniteRef$current$;
86
-
87
- infiniteRef.current && (_infiniteRef$current$ = infiniteRef.current._registeredChild).scrollToPosition.apply(_infiniteRef$current$, arguments);
88
- }
89
-
90
- function scrollToRow() {
91
- var _infiniteRef$current$2;
92
-
93
- infiniteRef.current && (_infiniteRef$current$2 = infiniteRef.current._registeredChild).scrollToRow.apply(_infiniteRef$current$2, arguments);
94
- }
95
-
96
- useImperativeHandle(ref, function () {
97
- return {
98
- forceUpdateGrid: forceUpdateGrid,
99
- scrollToRow: scrollToRow,
100
- scrollToPosition: scrollToPosition
101
- };
102
- });
103
-
104
- var loadMore = /*#__PURE__*/function () {
105
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
106
- return regeneratorRuntime.wrap(function _callee$(_context) {
107
- while (1) {
108
- switch (_context.prev = _context.next) {
109
- case 0:
110
- if (!(props.hasLoadMore && props.loadMore && !loadingRef.current)) {
111
- _context.next = 5;
112
- break;
113
- }
114
-
115
- loadingRef.current = true;
116
- _context.next = 4;
117
- return props.loadMore();
118
-
119
- case 4:
120
- loadingRef.current = false;
121
-
122
- case 5:
123
- case "end":
124
- return _context.stop();
125
- }
126
- }
127
- }, _callee);
128
- }));
129
-
130
- return function loadMore() {
131
- return _ref.apply(this, arguments);
132
- };
133
- }();
134
-
135
- function onListScroll(options) {
136
- if (hasLoadPrev && !loadingRef.current && loadPrev && options.scrollTop === 0 && scrollRef.current) {
137
- loadingRef.current = true;
138
- loadPrev().then(function (dataLength) {
139
- if (dataLength) {
140
- var row = Math.ceil(dataLength / rowCount);
141
-
142
- if (row > 0) {
143
- scrollToPosition(row * itemHeight);
144
- }
145
- }
146
-
147
- loadingRef.current = false;
148
- });
149
- }
150
-
151
- if (!scrollRef.current && options.scrollTop >= prethreshold) {
152
- scrollRef.current = true;
153
- }
154
-
155
- debounced && debounced.cancel();
156
- debounced = debounce(function () {
157
- var flag = options.scrollTop > 200;
158
-
159
- if (showBackTop !== flag) {
160
- setShowBackUp(flag);
161
- }
162
-
163
- props.onScroll && props.onScroll(options);
164
- }, 500);
165
- debounced();
166
- }
167
-
168
- function rowRender(_ref2) {
169
- var key = _ref2.key,
170
- index = _ref2.index,
171
- style = _ref2.style;
172
- var gutter = props.gutter,
173
- paddingRow = props.paddingRow,
174
- rowClass = props.rowClass,
175
- hasLoadMore = props.hasLoadMore,
176
- itemClass = props.itemClass;
177
- var rowData = renderData[index] || [];
178
- var len = rowCount - rowData.length;
179
-
180
- if (rowData.length < rowCount) {
181
- for (var i = 0; i < len; i++) {
182
- rowData.push(null);
183
- }
184
- }
185
-
186
- return /*#__PURE__*/React.createElement("div", {
187
- key: key,
188
- style: _objectSpread(_objectSpread({}, style), {}, {
189
- padding: "0 ".concat(paddingRow)
190
- }),
191
- className: "row-group-part ".concat(rowClass)
192
- }, rowData.map(function (v, i) {
193
- return /*#__PURE__*/React.createElement("div", {
194
- key: "".concat(key, "-").concat(i),
195
- className: "row-item-part ".concat(v === null && hasLoadMore ? 'row-item-placeholder' : '', " ").concat(v !== null ? itemClass : ''),
196
- style: {
197
- width: "".concat(100 / 24 * itemGrid[currentGrid], "%"),
198
- height: itemHeight,
199
- marginRight: gutter,
200
- paddingBottom: gutter
201
- }
202
- }, v && props.renderItem(v, i));
203
- }));
204
- }
205
-
206
- function _isRowLoaded(_ref3) {
207
- var index = _ref3.index;
208
- return !!renderData[index];
209
- }
210
-
211
- return /*#__PURE__*/React.createElement("div", {
212
- className: "lm-c-infinite-scroll-layout ".concat(isNoData ? 'infinite-scroll-empty' : '', " ").concat(className),
213
- style: isNoData ? {
214
- backgroundImage: "url(".concat(noDataUrl, ")")
215
- } : undefined
216
- }, /*#__PURE__*/React.createElement(InfiniteLoader, {
217
- isRowLoaded: _isRowLoaded,
218
- loadMoreRows: loadMore,
219
- rowCount: renderData.length + 1,
220
- ref: infiniteRef,
221
- threshold: threshold
222
- }, function (_ref4) {
223
- var onRowsRendered = _ref4.onRowsRendered,
224
- registerChild = _ref4.registerChild;
225
- return /*#__PURE__*/React.createElement(AutoSizer, null, function (_ref5) {
226
- var width = _ref5.width,
227
- height = _ref5.height;
228
- return /*#__PURE__*/React.createElement(List, {
229
- width: width,
230
- onRowsRendered: onRowsRendered,
231
- ref: registerChild,
232
- height: height,
233
- rowCount: renderData.length,
234
- rowHeight: itemHeight,
235
- rowRenderer: rowRender,
236
- onScroll: onListScroll
237
- });
238
- });
239
- }), props.hasBackTop && showBackTop && /*#__PURE__*/React.createElement(_Tooltip, {
240
- title: "\u8FD4\u56DE\u9876\u90E8",
241
- placement: "top"
242
- }, /*#__PURE__*/React.createElement("div", {
243
- className: "scoll-back-top",
244
- onClick: function onClick() {
245
- return scrollToPosition(0);
246
- }
247
- }, /*#__PURE__*/React.createElement(IconFont, {
248
- type: "icon-S_Arrow_MoveUp"
249
- }))));
250
- });
251
- ScrollList.defaultProps = {
252
- itemHeight: 200,
253
- gutter: 20,
254
- itemGrid: cloneDeep(simpleGrid),
255
- hasLoadMore: true,
256
- hasLoadPrev: true,
257
- threshold: 5,
258
- prethreshold: 200,
259
- hasBackTop: false,
260
- data: []
261
- };
262
- export default ScrollList;
@@ -1,84 +0,0 @@
1
- export function computedCuurentGrid() {
2
- var width = document.body.clientWidth;
3
-
4
- if (width >= 1600) {
5
- return 'xxl';
6
- }
7
-
8
- if (width >= 1200 && width < 1600) {
9
- return 'xl';
10
- }
11
-
12
- if (width >= 992 && width < 1200) {
13
- return 'lg';
14
- }
15
-
16
- if (width >= 768 && width < 992) {
17
- return 'md';
18
- }
19
-
20
- if (width >= 576 && width < 768) {
21
- return 'sm';
22
- }
23
-
24
- if (width < 576) {
25
- return 'xs';
26
- }
27
- } // 切割数组 1维变2维
28
-
29
- export function arraySliceForX(arr) {
30
- var x = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3;
31
- var newArr = [];
32
-
33
- for (var i = 0, l = arr.length; i < l; i++) {
34
- if (newArr.length === 0) {
35
- newArr.push([]);
36
- }
37
-
38
- if (newArr[newArr.length - 1].length > x - 1) {
39
- newArr.push([]);
40
- }
41
-
42
- newArr[newArr.length - 1].push(arr[i]);
43
- }
44
-
45
- return newArr;
46
- } // 切割数组 1维变2维,分组聚合展示
47
-
48
- export function arraySliceForXG(arr) {
49
- var x = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3;
50
- var isGroupTitle = arguments.length > 2 ? arguments[2] : undefined;
51
- var newArr = [];
52
-
53
- for (var i = 0, l = arr.length; i < l; i++) {
54
- if (newArr.length === 0) {
55
- newArr.push([]);
56
- }
57
-
58
- if (isGroupTitle(arr[i])) {
59
- if (newArr[newArr.length - 1].length === 0) {
60
- newArr[newArr.length - 1].push(arr[i]);
61
- } else {
62
- newArr.push([arr[i]]);
63
- }
64
-
65
- newArr.push([]);
66
- } else {
67
- if (newArr[newArr.length - 1].length > x - 1) {
68
- newArr.push([]);
69
- }
70
-
71
- newArr[newArr.length - 1].push(arr[i]);
72
- }
73
- }
74
-
75
- return newArr;
76
- }
77
- export var simpleGrid = {
78
- xxl: 4,
79
- xl: 6,
80
- lg: 6,
81
- md: 7,
82
- sm: 24,
83
- xs: 24
84
- };
@@ -1,32 +0,0 @@
1
- import "antd/lib/config-provider/style";
2
- import _ConfigProvider from "antd/lib/config-provider";
3
- import React from 'react';
4
- import BsTree from './index';
5
-
6
- function App() {
7
- return /*#__PURE__*/React.createElement(_ConfigProvider, {
8
- prefixCls: "cloudapp"
9
- }, /*#__PURE__*/React.createElement("div", {
10
- style: {
11
- padding: 20,
12
- height: 400,
13
- display: 'flex'
14
- }
15
- }, /*#__PURE__*/React.createElement(BsTree, {
16
- title: "\u8BBE\u5907\u4E1A\u52A1\u6811",
17
- mode: "Bz"
18
- }), /*#__PURE__*/React.createElement(BsTree, {
19
- title: "\u81EA\u5B9A\u4E49\u5206\u7EC4",
20
- mode: "Custom"
21
- }), /*#__PURE__*/React.createElement(BsTree, {
22
- title: "\u884C\u653F\u533A\u5212",
23
- mode: "Place",
24
- checkable: true,
25
- checkStrictly: true
26
- }), /*#__PURE__*/React.createElement(BsTree, {
27
- title: "\u7EC4\u7EC7\u673A\u6784",
28
- mode: "Org"
29
- })));
30
- }
31
-
32
- export default App;
@@ -1,38 +0,0 @@
1
- .bc-type-tree-layout {
2
- height: 100%;
3
- display: flex;
4
- flex-direction: column;
5
- border: 1px solid var(--bd-color);
6
- margin-left: -1px;
7
- }
8
- .bc-type-tree-layout .lm-c-tree-title-part {
9
- border-bottom: 1px solid var(--bd-color);
10
- background-color: var(--form-bg-light);
11
- }
12
- .bc-type-tree-layout > .lm-base-tree-component {
13
- flex: 1;
14
- overflow: auto;
15
- }
16
- .bc-type-tree-layout .cloudapp-tree {
17
- height: 100%;
18
- overflow: auto;
19
- }
20
- .bc-type-tree-layout .anticon {
21
- font-size: var(--fs);
22
- }
23
- .bc-type-tree-layout .cloudapp-tree-title {
24
- font-size: var(--fs-small);
25
- flex: 1;
26
- }
27
- .bc-type-tree-layout .cloudapp-tree-title > span {
28
- min-width: 100%;
29
- display: inline-flex;
30
- justify-content: space-between;
31
- }
32
- .bc-type-tree-layout .cloudapp-tree-title > span .anticon {
33
- font-size: 16px;
34
- color: var(--icon);
35
- padding-right: 6px;
36
- position: relative;
37
- top: 1px;
38
- }
@@ -1,23 +0,0 @@
1
- import React from 'react';
2
- import { BaseTreeProps } from '../Tree';
3
- import './index.less';
4
- interface IBsTreeProps extends BaseTreeProps {
5
- title?: React.ReactNode;
6
- inputPlaceholder?: string;
7
- renderHeader?: () => JSX.Element;
8
- /**
9
- * @description 需要默认选中时触发 事件
10
- */
11
- onDefailtSelect?: (id?: string) => void;
12
- mode?: 'Bz' | 'Custom' | 'Place' | 'Org';
13
- }
14
- declare function TreeMode({ title, className, renderHeader, inputPlaceholder, treeNodeProps, onDefailtSelect, mode, showIcon, ...props }: IBsTreeProps): JSX.Element;
15
- declare namespace TreeMode {
16
- var defaultProps: {
17
- mode: string;
18
- className: string;
19
- treeNodeProps: {};
20
- showIcon: boolean;
21
- };
22
- }
23
- export default TreeMode;