@sheinx/hooks 3.6.0-beta.3 → 3.6.0-beta.30

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 (173) hide show
  1. package/cjs/common/use-filter/use-filter.d.ts.map +1 -1
  2. package/cjs/common/use-pagination-list/index.d.ts.map +1 -1
  3. package/cjs/common/use-pagination-list/index.js +6 -1
  4. package/cjs/common/use-position-style/check-border.d.ts +6 -0
  5. package/cjs/common/use-position-style/check-border.d.ts.map +1 -0
  6. package/cjs/common/use-position-style/check-border.js +35 -0
  7. package/cjs/common/use-position-style/get-position-style.d.ts +1 -0
  8. package/cjs/common/use-position-style/get-position-style.d.ts.map +1 -1
  9. package/cjs/common/use-position-style/get-position-style.js +14 -8
  10. package/cjs/common/use-position-style/index.d.ts +1 -0
  11. package/cjs/common/use-position-style/index.d.ts.map +1 -1
  12. package/cjs/common/use-position-style/index.js +21 -10
  13. package/cjs/components/use-cascader/use-cascader.d.ts.map +1 -1
  14. package/cjs/components/use-cascader/use-cascader.type.d.ts +2 -1
  15. package/cjs/components/use-cascader/use-cascader.type.d.ts.map +1 -1
  16. package/cjs/components/use-check/use-check.d.ts +1 -1
  17. package/cjs/components/use-check/use-check.d.ts.map +1 -1
  18. package/cjs/components/use-check/use-check.js +10 -3
  19. package/cjs/components/use-datepicker/use-datepicker-format.d.ts.map +1 -1
  20. package/cjs/components/use-datepicker/use-datepicker-format.js +4 -0
  21. package/cjs/components/use-datepicker/use-datepicker-format.type.d.ts +1 -1
  22. package/cjs/components/use-datepicker/use-datepicker-format.type.d.ts.map +1 -1
  23. package/cjs/components/use-form/Provider.d.ts +1 -2
  24. package/cjs/components/use-form/Provider.d.ts.map +1 -1
  25. package/cjs/components/use-form/use-form-control/use-form-control.d.ts.map +1 -1
  26. package/cjs/components/use-form/use-form-fieldset/fieldset-context.d.ts +1 -1
  27. package/cjs/components/use-form/use-form-fieldset/fieldset-context.d.ts.map +1 -1
  28. package/cjs/components/use-form/use-form-fieldset/fieldset-context.js +3 -2
  29. package/cjs/components/use-form/use-form-fieldset/index.d.ts +1 -0
  30. package/cjs/components/use-form/use-form-fieldset/index.d.ts.map +1 -1
  31. package/cjs/components/use-form/use-form-fieldset/index.js +6 -0
  32. package/cjs/components/use-form/use-form.d.ts +1 -2
  33. package/cjs/components/use-form/use-form.d.ts.map +1 -1
  34. package/cjs/components/use-form/use-form.js +19 -9
  35. package/cjs/components/use-form/use-form.type.d.ts +3 -1
  36. package/cjs/components/use-form/use-form.type.d.ts.map +1 -1
  37. package/cjs/components/use-input/use-input-format.d.ts +1 -1
  38. package/cjs/components/use-input/use-input-format.d.ts.map +1 -1
  39. package/cjs/components/use-input/use-input-format.js +12 -4
  40. package/cjs/components/use-input/use-input-number.d.ts +1 -1
  41. package/cjs/components/use-input/use-input-number.d.ts.map +1 -1
  42. package/cjs/components/use-input/use-input-number.js +1 -0
  43. package/cjs/components/use-popup/use-popup.d.ts.map +1 -1
  44. package/cjs/components/use-popup/use-popup.js +5 -0
  45. package/cjs/components/use-table/index.d.ts +2 -1
  46. package/cjs/components/use-table/index.d.ts.map +1 -1
  47. package/cjs/components/use-table/index.js +7 -0
  48. package/cjs/components/use-table/use-table-filter.d.ts +19 -0
  49. package/cjs/components/use-table/use-table-filter.d.ts.map +1 -0
  50. package/cjs/components/use-table/use-table-filter.js +96 -0
  51. package/cjs/components/use-table/use-table-tree.d.ts +13 -0
  52. package/cjs/components/use-table/use-table-tree.d.ts.map +1 -1
  53. package/cjs/components/use-table/use-table-tree.js +68 -1
  54. package/cjs/components/use-table/use-table-virtual.d.ts.map +1 -1
  55. package/cjs/components/use-table/use-table-virtual.js +6 -4
  56. package/cjs/components/use-table/use-table.type.d.ts +93 -0
  57. package/cjs/components/use-table/use-table.type.d.ts.map +1 -1
  58. package/cjs/components/use-tabs/context.d.ts +1 -1
  59. package/cjs/components/use-tabs/context.d.ts.map +1 -1
  60. package/cjs/components/use-tabs/use-tabs.d.ts +1 -1
  61. package/cjs/components/use-tree/index.d.ts +3 -2
  62. package/cjs/components/use-tree/index.d.ts.map +1 -1
  63. package/cjs/components/use-tree/index.js +18 -2
  64. package/cjs/components/use-tree/use-tree-node.d.ts.map +1 -1
  65. package/cjs/components/use-tree/use-tree-node.js +1 -5
  66. package/cjs/components/use-tree/use-tree-node.type.d.ts +18 -0
  67. package/cjs/components/use-tree/use-tree-node.type.d.ts.map +1 -1
  68. package/cjs/components/use-tree/use-tree-virtual-node.d.ts +13 -0
  69. package/cjs/components/use-tree/use-tree-virtual-node.d.ts.map +1 -0
  70. package/cjs/components/use-tree/use-tree-virtual-node.js +92 -0
  71. package/cjs/components/use-tree/use-tree.d.ts.map +1 -1
  72. package/cjs/components/use-tree/use-tree.js +236 -18
  73. package/cjs/components/use-tree/use-tree.type.d.ts +35 -1
  74. package/cjs/components/use-tree/use-tree.type.d.ts.map +1 -1
  75. package/cjs/components/use-treeselect/use-tiled.d.ts +1 -1
  76. package/cjs/utils/dom/element.d.ts +1 -1
  77. package/cjs/utils/dom/element.d.ts.map +1 -1
  78. package/cjs/utils/dom/element.js +5 -3
  79. package/cjs/utils/is.d.ts +2 -0
  80. package/cjs/utils/is.d.ts.map +1 -1
  81. package/cjs/utils/is.js +5 -2
  82. package/cjs/utils/lazyload.d.ts.map +1 -1
  83. package/cjs/utils/lazyload.js +2 -2
  84. package/cjs/utils/object.d.ts.map +1 -1
  85. package/cjs/utils/object.js +6 -1
  86. package/cjs/utils/warning.js +5 -5
  87. package/esm/common/use-filter/use-filter.d.ts.map +1 -1
  88. package/esm/common/use-pagination-list/index.d.ts.map +1 -1
  89. package/esm/common/use-pagination-list/index.js +6 -1
  90. package/esm/common/use-position-style/check-border.d.ts +6 -0
  91. package/esm/common/use-position-style/check-border.d.ts.map +1 -0
  92. package/esm/common/use-position-style/check-border.js +29 -0
  93. package/esm/common/use-position-style/get-position-style.d.ts +1 -0
  94. package/esm/common/use-position-style/get-position-style.d.ts.map +1 -1
  95. package/esm/common/use-position-style/get-position-style.js +14 -8
  96. package/esm/common/use-position-style/index.d.ts +1 -0
  97. package/esm/common/use-position-style/index.d.ts.map +1 -1
  98. package/esm/common/use-position-style/index.js +21 -10
  99. package/esm/components/use-cascader/use-cascader.d.ts.map +1 -1
  100. package/esm/components/use-cascader/use-cascader.type.d.ts +2 -1
  101. package/esm/components/use-cascader/use-cascader.type.d.ts.map +1 -1
  102. package/esm/components/use-check/use-check.d.ts +1 -1
  103. package/esm/components/use-check/use-check.d.ts.map +1 -1
  104. package/esm/components/use-check/use-check.js +10 -3
  105. package/esm/components/use-datepicker/use-datepicker-format.d.ts.map +1 -1
  106. package/esm/components/use-datepicker/use-datepicker-format.js +4 -0
  107. package/esm/components/use-datepicker/use-datepicker-format.type.d.ts +1 -1
  108. package/esm/components/use-datepicker/use-datepicker-format.type.d.ts.map +1 -1
  109. package/esm/components/use-form/Provider.d.ts +1 -2
  110. package/esm/components/use-form/Provider.d.ts.map +1 -1
  111. package/esm/components/use-form/use-form-control/use-form-control.d.ts.map +1 -1
  112. package/esm/components/use-form/use-form-fieldset/fieldset-context.d.ts +1 -1
  113. package/esm/components/use-form/use-form-fieldset/fieldset-context.d.ts.map +1 -1
  114. package/esm/components/use-form/use-form-fieldset/fieldset-context.js +2 -1
  115. package/esm/components/use-form/use-form-fieldset/index.d.ts +1 -0
  116. package/esm/components/use-form/use-form-fieldset/index.d.ts.map +1 -1
  117. package/esm/components/use-form/use-form-fieldset/index.js +2 -1
  118. package/esm/components/use-form/use-form.d.ts +1 -2
  119. package/esm/components/use-form/use-form.d.ts.map +1 -1
  120. package/esm/components/use-form/use-form.js +19 -9
  121. package/esm/components/use-form/use-form.type.d.ts +3 -1
  122. package/esm/components/use-form/use-form.type.d.ts.map +1 -1
  123. package/esm/components/use-input/use-input-format.d.ts +1 -1
  124. package/esm/components/use-input/use-input-format.d.ts.map +1 -1
  125. package/esm/components/use-input/use-input-format.js +12 -4
  126. package/esm/components/use-input/use-input-number.d.ts +1 -1
  127. package/esm/components/use-input/use-input-number.d.ts.map +1 -1
  128. package/esm/components/use-input/use-input-number.js +1 -0
  129. package/esm/components/use-popup/use-popup.d.ts.map +1 -1
  130. package/esm/components/use-popup/use-popup.js +5 -0
  131. package/esm/components/use-table/index.d.ts +2 -1
  132. package/esm/components/use-table/index.d.ts.map +1 -1
  133. package/esm/components/use-table/index.js +1 -0
  134. package/esm/components/use-table/use-table-filter.d.ts +19 -0
  135. package/esm/components/use-table/use-table-filter.d.ts.map +1 -0
  136. package/esm/components/use-table/use-table-filter.js +89 -0
  137. package/esm/components/use-table/use-table-tree.d.ts +13 -0
  138. package/esm/components/use-table/use-table-tree.d.ts.map +1 -1
  139. package/esm/components/use-table/use-table-tree.js +67 -0
  140. package/esm/components/use-table/use-table-virtual.d.ts.map +1 -1
  141. package/esm/components/use-table/use-table-virtual.js +6 -4
  142. package/esm/components/use-table/use-table.type.d.ts +93 -0
  143. package/esm/components/use-table/use-table.type.d.ts.map +1 -1
  144. package/esm/components/use-tabs/context.d.ts +1 -1
  145. package/esm/components/use-tabs/context.d.ts.map +1 -1
  146. package/esm/components/use-tabs/use-tabs.d.ts +1 -1
  147. package/esm/components/use-tree/index.d.ts +3 -2
  148. package/esm/components/use-tree/index.d.ts.map +1 -1
  149. package/esm/components/use-tree/index.js +3 -2
  150. package/esm/components/use-tree/use-tree-node.d.ts.map +1 -1
  151. package/esm/components/use-tree/use-tree-node.js +1 -5
  152. package/esm/components/use-tree/use-tree-node.type.d.ts +18 -0
  153. package/esm/components/use-tree/use-tree-node.type.d.ts.map +1 -1
  154. package/esm/components/use-tree/use-tree-virtual-node.d.ts +13 -0
  155. package/esm/components/use-tree/use-tree-virtual-node.d.ts.map +1 -0
  156. package/esm/components/use-tree/use-tree-virtual-node.js +85 -0
  157. package/esm/components/use-tree/use-tree.d.ts.map +1 -1
  158. package/esm/components/use-tree/use-tree.js +238 -20
  159. package/esm/components/use-tree/use-tree.type.d.ts +35 -1
  160. package/esm/components/use-tree/use-tree.type.d.ts.map +1 -1
  161. package/esm/components/use-treeselect/use-tiled.d.ts +1 -1
  162. package/esm/utils/dom/element.d.ts +1 -1
  163. package/esm/utils/dom/element.d.ts.map +1 -1
  164. package/esm/utils/dom/element.js +4 -2
  165. package/esm/utils/is.d.ts +2 -0
  166. package/esm/utils/is.d.ts.map +1 -1
  167. package/esm/utils/is.js +4 -1
  168. package/esm/utils/lazyload.d.ts.map +1 -1
  169. package/esm/utils/lazyload.js +3 -3
  170. package/esm/utils/object.d.ts.map +1 -1
  171. package/esm/utils/object.js +6 -1
  172. package/esm/utils/warning.js +5 -5
  173. package/package.json +1 -1
@@ -1,3 +1,9 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
1
7
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
2
8
  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."); }
3
9
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
@@ -11,15 +17,15 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
17
  import { useState, useEffect, useRef } from 'react';
12
18
  import useLatestObj from "../../common/use-latest-obj";
13
19
  import { useInputAble } from "../../common/use-input-able";
20
+ import { getExpandVirtualData } from "../use-table/use-table-tree";
14
21
  import { usePersistFn } from "../../common/use-persist-fn";
15
- import { isFunc, isString, isNumber, isArray, isUnMatchedData } from "../../utils/is";
16
- import { devUseWarning } from "../../utils";
22
+ import { isFunc, isString, isNumber, isArray, isUnMatchedData, isOptionalDisabled } from "../../utils/is";
23
+ import { devUseWarning, produce } from "../../utils";
17
24
  function toArray(value) {
18
25
  if (!value) return [];
19
26
  if (!Array.isArray(value)) return [value];
20
27
  return value;
21
28
  }
22
- var global_tree_map = new Map();
23
29
  export var MODE = {
24
30
  /**
25
31
  * 返回全选数据,包含父节点和子节点
@@ -52,6 +58,7 @@ var useTree = function useTree(props) {
52
58
  childrenKey = _props$childrenKey === void 0 ? 'children' : _props$childrenKey,
53
59
  keygen = props.keygen,
54
60
  mode = props.mode,
61
+ virtual = props.virtual,
55
62
  activeProp = props.active,
56
63
  expandedProp = props.expanded,
57
64
  _props$dataUpdate = props.dataUpdate,
@@ -59,14 +66,19 @@ var useTree = function useTree(props) {
59
66
  _props$defaultExpande = props.defaultExpanded,
60
67
  defaultExpanded = _props$defaultExpande === void 0 ? [] : _props$defaultExpande,
61
68
  defaultExpandAll = props.defaultExpandAll,
62
- disabledProps = props.disabled,
63
69
  unmatch = props.unmatch,
64
70
  isControlled = props.isControlled,
65
71
  onExpandProp = props.onExpand;
72
+ var disabledProps = isOptionalDisabled(props.disabled) ? props.disabled.disabled : props.disabled;
73
+ var isRealtime = isOptionalDisabled(props.disabled) ? props.disabled.isRealtime : false;
66
74
  var _useState = useState(false),
67
75
  _useState2 = _slicedToArray(_useState, 2),
68
76
  inited = _useState2[0],
69
77
  setInited = _useState2[1];
78
+ var _useState3 = useState([]),
79
+ _useState4 = _slicedToArray(_useState3, 2),
80
+ dataFlat = _useState4[0],
81
+ setDataFlat = _useState4[1];
70
82
  var _useInputAble = useInputAble({
71
83
  value: expandedProp,
72
84
  defaultValue: defaultExpanded,
@@ -79,6 +91,8 @@ var useTree = function useTree(props) {
79
91
  var _useRef = useRef({
80
92
  pathMap: new Map(),
81
93
  dataMap: new Map(),
94
+ dataFlatStatusMap: new Map(),
95
+ dataFlat: [],
82
96
  forceUpdateMap: new Map(),
83
97
  valueMap: new Map(),
84
98
  updateMap: new Map(),
@@ -110,11 +124,27 @@ var useTree = function useTree(props) {
110
124
  expanded: shouldDefaultExpand
111
125
  };
112
126
  }
127
+ if (virtual) {
128
+ return {
129
+ active: isActive,
130
+ expanded: context.dataFlatStatusMap.get(id).expanded
131
+ };
132
+ }
113
133
  return {
114
134
  active: isActive,
115
135
  expanded: !!(expandeds && expandeds.indexOf(id) >= 0)
116
136
  };
117
137
  };
138
+
139
+ // 注册节点
140
+ var bindVirtualNode = function bindVirtualNode(id, update) {
141
+ context.updateMap.set(id, update);
142
+ var isActive = activeProp === id;
143
+ return {
144
+ active: isActive,
145
+ expanded: context.dataFlatStatusMap.get(id).expanded
146
+ };
147
+ };
118
148
  var get = function get(id) {
119
149
  return context.valueMap.get(id);
120
150
  };
@@ -127,7 +157,6 @@ var useTree = function useTree(props) {
127
157
  if (keygen && (isString(keygen) || isNumber(keygen))) {
128
158
  return item[keygen];
129
159
  }
130
-
131
160
  // 降级处理
132
161
  return id + (id ? ',' : '') + index;
133
162
  };
@@ -225,6 +254,8 @@ var useTree = function useTree(props) {
225
254
  };
226
255
  var initData = function initData(data, path, disabled) {
227
256
  var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
257
+ var level = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
258
+ var pid = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
228
259
  var ids = [];
229
260
  for (var i = 0; i < data.length; i++) {
230
261
  var item = data[i];
@@ -236,6 +267,28 @@ var useTree = function useTree(props) {
236
267
  }
237
268
  // 制作 data mapping
238
269
  context.dataMap.set(id, item);
270
+ if (virtual) {
271
+ context.dataFlatStatusMap.set(id, {
272
+ active: false,
273
+ expanded: defaultExpandAll ? true : (expanded === null || expanded === void 0 ? void 0 : expanded.includes(id)) || false,
274
+ fetching: false
275
+ });
276
+ var node = {
277
+ id: id,
278
+ level: level,
279
+ data: item,
280
+ pid: pid
281
+ };
282
+ if (defaultExpandAll) {
283
+ context.dataFlat.push(node);
284
+ } else {
285
+ if (level === 1) {
286
+ context.dataFlat.push(node);
287
+ } else if (expanded && pid !== null && expanded.indexOf(pid) >= 0) {
288
+ context.dataFlat.push(node);
289
+ }
290
+ }
291
+ }
239
292
  var _isDisabled = !!disabled;
240
293
  if (_isDisabled === false) {
241
294
  _isDisabled = getDisabled()(item);
@@ -244,7 +297,7 @@ var useTree = function useTree(props) {
244
297
  ids.push(id);
245
298
  var children = [];
246
299
  if (Array.isArray(item[childrenKey])) {
247
- var _children = initData(item[childrenKey], [].concat(_toConsumableArray(path), [id]), mode === MODE.MODE_4 ? disabled : _isDisabled, indexPath);
300
+ var _children = initData(item[childrenKey], [].concat(_toConsumableArray(path), [id]), mode === MODE.MODE_4 ? disabled : _isDisabled, indexPath, level + 1, id);
248
301
  if (_children) children = _children;
249
302
  }
250
303
  context.pathMap.set(id, {
@@ -257,6 +310,34 @@ var useTree = function useTree(props) {
257
310
  }
258
311
  return ids;
259
312
  };
313
+ var initFlatData = function initFlatData(data, path) {
314
+ var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
315
+ var pid = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
316
+ var result = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
317
+ for (var i = 0; i < data.length; i++) {
318
+ var item = data[i];
319
+ var id = getKey(item, path[path.length - 1], i);
320
+ var node = {
321
+ id: id,
322
+ level: level,
323
+ data: item,
324
+ pid: pid
325
+ };
326
+ if (defaultExpandAll) {
327
+ result.push(node);
328
+ } else {
329
+ if (level === 1) {
330
+ result.push(node);
331
+ } else if (expanded && pid !== null && expanded.indexOf(pid) >= 0) {
332
+ result.push(node);
333
+ }
334
+ }
335
+ if (Array.isArray(item[childrenKey])) {
336
+ initFlatData(item[childrenKey], [].concat(_toConsumableArray(path), [id]), level + 1, id, result);
337
+ }
338
+ }
339
+ return result;
340
+ };
260
341
  var initValue = function initValue(ids_outer, forceCheck) {
261
342
  var ids = ids_outer;
262
343
  if (!context.data || !context.value) {
@@ -322,7 +403,15 @@ var useTree = function useTree(props) {
322
403
  var isDisabled = function isDisabled(id) {
323
404
  if (isFunc(disabledProps)) {
324
405
  var node = context.pathMap.get(id);
325
- if (node) return node.isDisabled;
406
+ if (node) {
407
+ if (isRealtime) {
408
+ var item = context.dataMap.get(id);
409
+ if (!item) return false;
410
+ return getDisabled()(item);
411
+ } else {
412
+ return node.isDisabled;
413
+ }
414
+ }
326
415
  return false;
327
416
  }
328
417
  return !!disabledProps;
@@ -339,28 +428,26 @@ var useTree = function useTree(props) {
339
428
  return 2;
340
429
  };
341
430
  var setData = function setData(data) {
342
- // if(data && global_tree_map.get(data)){
343
- // context.cachedValue = global_tree_map.get(data)?.cachedValue || []
344
- // context.pathMap = global_tree_map.get(data)?.pathMap || new Map()
345
- // context.dataMap = global_tree_map.get(data)?.dataMap || new Map()
346
- // context.valueMap = global_tree_map.get(data)?.valueMap || new Map()
347
- // context.unmatchedValueMap = global_tree_map.get(data)?.unmatchedValueMap || new Map()
348
- // return
349
- // }
350
-
351
431
  var prevValue = context.value || [];
352
432
  context.cachedValue = [];
353
433
  context.pathMap = new Map();
354
434
  context.dataMap = new Map();
435
+ context.dataFlat = [];
436
+ context.dataFlatStatusMap = new Map();
355
437
  context.valueMap = new Map();
356
438
  context.unmatchedValueMap = new Map();
357
439
  context.data = toArray(data);
440
+ if (virtual) {
441
+ context.dataFlat = [];
442
+ setDataFlat([]);
443
+ }
358
444
  if (!data) return;
359
445
  initData(context.data, []);
446
+ if (virtual) {
447
+ setDataFlat(context.dataFlat);
448
+ }
360
449
  initValue();
361
450
  setValue(prevValue);
362
-
363
- // global_tree_map.set(data, context)
364
451
  };
365
452
  var set = function set(id, checked, direction) {
366
453
  if (!isDisabled(id)) {
@@ -402,6 +489,123 @@ var useTree = function useTree(props) {
402
489
  }
403
490
  return current;
404
491
  };
492
+ var updateInnerCheckStatus = function updateInnerCheckStatus() {
493
+ var _context$value;
494
+ if (mode !== MODE.MODE_0) return;
495
+ (_context$value = context.value) === null || _context$value === void 0 || _context$value.forEach(function (id) {
496
+ var _ref3 = context.pathMap.get(id),
497
+ children = _ref3.children;
498
+ if (children.length) {
499
+ var noCheckedChildren = children.filter(function (cid) {
500
+ var _context$value2;
501
+ return !((_context$value2 = context.value) !== null && _context$value2 !== void 0 && _context$value2.includes(cid));
502
+ });
503
+ if (noCheckedChildren.length > 0) {
504
+ setTimeout(function () {
505
+ setValueMap(id, 2);
506
+ noCheckedChildren.forEach(function (cid) {
507
+ setValueMap(cid, 0);
508
+ });
509
+ }, 0);
510
+ }
511
+ }
512
+ });
513
+ };
514
+ var appendChildrenExpanded = function appendChildrenExpanded(child, level, pid, insertData) {
515
+ if (!child) return;
516
+ child.forEach(function (item, i) {
517
+ var _context$dataFlatStat;
518
+ var childId = getKey(item, pid, i);
519
+ var node = {
520
+ id: childId,
521
+ level: level,
522
+ data: item,
523
+ pid: pid
524
+ };
525
+ insertData.push(node);
526
+ if ((_context$dataFlatStat = context.dataFlatStatusMap.get(childId)) !== null && _context$dataFlatStat !== void 0 && _context$dataFlatStat.expanded && item[childrenKey]) {
527
+ appendChildrenExpanded(item[childrenKey], level + 1, childId, insertData);
528
+ }
529
+ });
530
+ };
531
+ var insertFlat = function insertFlat(id) {
532
+ var item = getDataById(id);
533
+ if (isUnMatchedData(item)) return;
534
+ if (!item) return;
535
+ var status = context.dataFlatStatusMap.get(id);
536
+ if (!status) return;
537
+ var childrenData = item[childrenKey];
538
+ var insertStartNode = dataFlat.find(function (item) {
539
+ return item.id === id;
540
+ });
541
+ context.dataFlatStatusMap.set(id, _objectSpread(_objectSpread({}, status), {}, {
542
+ expanded: true,
543
+ fetching: false
544
+ }));
545
+ if (!insertStartNode) return;
546
+ var insertData = [];
547
+ appendChildrenExpanded(childrenData, insertStartNode.level + 1, id, insertData);
548
+ var insertIndex = dataFlat.indexOf(insertStartNode);
549
+ var nextDataFlat = produce(dataFlat, function (draft) {
550
+ draft.splice.apply(draft, [insertIndex + 1, 0].concat(_toConsumableArray(insertData)));
551
+ });
552
+ setDataFlat(nextDataFlat);
553
+ };
554
+ var removeFlat = function removeFlat(id) {
555
+ var item = getDataById(id);
556
+ if (isUnMatchedData(item)) return;
557
+ if (!item) return;
558
+ var removeNode = dataFlat.find(function (item) {
559
+ return item.id === id;
560
+ });
561
+ if (!removeNode) return;
562
+ var status = context.dataFlatStatusMap.get(id);
563
+ if (!status) return;
564
+ context.dataFlatStatusMap.set(id, _objectSpread(_objectSpread({}, status), {}, {
565
+ fetching: false,
566
+ expanded: false
567
+ }));
568
+ var removeStartIndex = dataFlat.indexOf(removeNode);
569
+ var removeEndIndex = 0;
570
+ for (var i = removeStartIndex + 1; i < dataFlat.length; i++) {
571
+ if (dataFlat[i].level <= removeNode.level) {
572
+ removeEndIndex = i;
573
+ break;
574
+ }
575
+ if (i === dataFlat.length - 1) {
576
+ removeEndIndex = i + 1;
577
+ break;
578
+ }
579
+ }
580
+ var nextDataFlat = produce(dataFlat, function (draft) {
581
+ draft.splice(removeStartIndex + 1, removeEndIndex - removeStartIndex - 1);
582
+ });
583
+ setDataFlat(nextDataFlat);
584
+ };
585
+ var expandedFlat = function expandedFlat(expanded) {
586
+ if (!context.data) return;
587
+ context.dataFlatStatusMap.forEach(function (status, id) {
588
+ context.dataFlatStatusMap.set(id, _objectSpread(_objectSpread({}, status), {}, {
589
+ expanded: false
590
+ }));
591
+ });
592
+ expanded.forEach(function (id) {
593
+ var status = context.dataFlatStatusMap.get(id);
594
+ if (!status) return;
595
+ context.dataFlatStatusMap.set(id, _objectSpread(_objectSpread({}, status), {}, {
596
+ expanded: true
597
+ }));
598
+ });
599
+ var _getExpandVirtualData = getExpandVirtualData(props.tiledData || context.data, expanded, getKey, childrenKey),
600
+ treeDataInfo = _getExpandVirtualData.treeDataInfo;
601
+ if (!treeDataInfo) {
602
+ return;
603
+ }
604
+ setDataFlat(treeDataInfo);
605
+ };
606
+ var getFlatData = function getFlatData() {
607
+ return context.dataFlat;
608
+ };
405
609
  useEffect(function () {
406
610
  if (defaultExpandAll) {
407
611
  var nextExpanded = [];
@@ -412,41 +616,55 @@ var useTree = function useTree(props) {
412
616
  });
413
617
  onExpand(nextExpanded);
414
618
  }
415
- }, []);
619
+ }, [context.dataMap]);
416
620
  useEffect(function () {
417
621
  if (props.datum) return;
418
622
  if (!dataUpdate) return;
419
623
  setData(data);
624
+ updateInnerCheckStatus();
420
625
  }, [data]);
421
626
  useEffect(function () {
422
627
  if (props.datum) return;
423
628
  setValue(value);
424
629
  }, [value]);
630
+ useEffect(function () {
631
+ if (!virtual) return;
632
+ if (!props.tiledData) return;
633
+ var tiledFlatData = initFlatData(props.tiledData, [], 1);
634
+ setDataFlat(tiledFlatData);
635
+ }, [props.tiledData]);
425
636
  useEffect(function () {
426
637
  setInited(true);
427
638
  }, []);
428
639
  var datum = useLatestObj({
429
640
  get: get,
430
641
  set: set,
642
+ insertFlat: insertFlat,
643
+ removeFlat: removeFlat,
644
+ expandedFlat: expandedFlat,
431
645
  getPath: getPath,
432
646
  getValue: getValue,
433
647
  getChecked: getChecked,
434
648
  getKey: getKey,
649
+ getFlatData: getFlatData,
435
650
  getDataByValues: getDataByValues,
436
651
  setValue: setValue,
437
652
  setData: setData,
438
653
  isDisabled: isDisabled,
439
654
  bindNode: bindNode,
655
+ bindVirtualNode: bindVirtualNode,
440
656
  getDataById: getDataById,
441
657
  bindUpdate: bindUpdate,
442
658
  unBindUpdate: unBindUpdate,
443
659
  isUnMatched: isUnMatched,
444
660
  childrenKey: childrenKey,
445
661
  data: data,
662
+ dataFlat: dataFlat,
446
663
  pathMap: context.pathMap,
447
664
  dataMap: context.dataMap,
448
665
  valueMap: context.valueMap,
449
- updateMap: context.updateMap
666
+ updateMap: context.updateMap,
667
+ dataFlatStatusMap: context.dataFlatStatusMap
450
668
  });
451
669
  return {
452
670
  inited: inited,
@@ -2,9 +2,22 @@ import { StructKeygenStringType, KeygenResult, ObjectKey } from '../../common/ty
2
2
  export type CheckedStatusType = 0 | 1 | 2;
3
3
  export type TreeModeType = 0 | 1 | 2 | 3 | 4;
4
4
  export type UpdateFunc = (name: string, active: boolean) => void;
5
+ export type FlatNodeType<DataItem> = {
6
+ id: KeygenResult;
7
+ data: DataItem;
8
+ level: number;
9
+ pid?: KeygenResult | null;
10
+ };
11
+ export type FlatMapType = {
12
+ active: boolean;
13
+ expanded: boolean;
14
+ fetching: boolean;
15
+ };
5
16
  export interface TreeContext<DataItem> {
6
17
  pathMap: Map<KeygenResult, TreePathType>;
7
18
  dataMap: Map<KeygenResult, DataItem>;
19
+ dataFlat: FlatNodeType<DataItem>[];
20
+ dataFlatStatusMap: Map<KeygenResult, FlatMapType>;
8
21
  valueMap: Map<KeygenResult, CheckedStatusType>;
9
22
  unmatchedValueMap: Map<any, any>;
10
23
  updateMap: Map<KeygenResult, UpdateFunc>;
@@ -21,11 +34,19 @@ export interface TreePathType {
21
34
  indexPath: number[];
22
35
  index: number;
23
36
  }
37
+ export interface DisabledOption<DataItem> {
38
+ disabled: (data: DataItem) => boolean;
39
+ isRealtime: boolean;
40
+ }
24
41
  export interface BaseTreeProps<DataItem> {
25
42
  /**
26
43
  * @private 内部属性
27
44
  */
28
45
  isControlled: boolean;
46
+ /**
47
+ * @private 内部属性
48
+ */
49
+ tiledData?: DataItem[];
29
50
  active?: KeygenResult;
30
51
  /**
31
52
  * @en Selected key (controlled)
@@ -63,7 +84,7 @@ export interface BaseTreeProps<DataItem> {
63
84
  * @cn 显示选择框时有效,为 true 时,所有节点禁用选择,为函数时,根据函数返回结果确定是否禁用
64
85
  * @default false
65
86
  */
66
- disabled?: boolean | ((item: DataItem) => boolean);
87
+ disabled?: boolean | ((item: DataItem) => boolean) | DisabledOption<DataItem>;
67
88
  /**
68
89
  * @en Auxiliary method for generating key. When it is a function, use the return value of this function. When it is a string, use the data value corresponding to this string. For example, "id" is the same thing as (d) => d.id
69
90
  * @cn 生成 key 的辅助方法, 为函数时,使用此函数返回值, 为 string 时,使用这个 string 对应的数据值。如 "id",相当于 (d) => d.id
@@ -106,10 +127,17 @@ export interface BaseTreeProps<DataItem> {
106
127
  * @private 内部数据处理
107
128
  */
108
129
  datum?: TreeDatum<DataItem>;
130
+ /**
131
+ * @private 是否虚拟化
132
+ */
133
+ virtual?: boolean;
109
134
  }
110
135
  export interface TreeDatum<DataItem> {
111
136
  get: (id: KeygenResult) => CheckedStatusType | undefined;
112
137
  set: (id: KeygenResult, checked: CheckedStatusType, direction?: 'asc' | 'desc') => CheckedStatusType | null;
138
+ insertFlat: (id: KeygenResult) => void;
139
+ removeFlat: (id: KeygenResult) => void;
140
+ expandedFlat: (id: KeygenResult[]) => void;
113
141
  getPath: (id: KeygenResult) => TreePathType | undefined;
114
142
  getValue: () => KeygenResult[];
115
143
  getChecked: (id: KeygenResult) => boolean | 'indeterminate';
@@ -122,6 +150,10 @@ export interface TreeDatum<DataItem> {
122
150
  active: boolean;
123
151
  expanded: boolean;
124
152
  };
153
+ bindVirtualNode: (id: KeygenResult, update: UpdateFunc, data: DataItem) => {
154
+ active: boolean;
155
+ expanded: boolean;
156
+ };
125
157
  getDataById: (id: KeygenResult) => DataItem | {
126
158
  IS_NOT_MATCHED_VALUE: boolean;
127
159
  value: KeygenResult | null;
@@ -132,8 +164,10 @@ export interface TreeDatum<DataItem> {
132
164
  updateMap: Map<KeygenResult, UpdateFunc>;
133
165
  childrenKey: string;
134
166
  data: DataItem[];
167
+ dataFlat: FlatNodeType<DataItem>[];
135
168
  pathMap: Map<KeygenResult, TreePathType>;
136
169
  dataMap: Map<KeygenResult, DataItem>;
137
170
  valueMap: Map<KeygenResult, CheckedStatusType>;
171
+ dataFlatStatusMap: Map<KeygenResult, FlatMapType>;
138
172
  }
139
173
  //# sourceMappingURL=use-tree.type.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-tree.type.d.ts","sourceRoot":"","sources":["use-tree.type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEpF,MAAM,MAAM,iBAAiB,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAE1C,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAE7C,MAAM,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;AAEjE,MAAM,WAAW,WAAW,CAAC,QAAQ;IACnC,OAAO,EAAE,GAAG,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;IACzC,OAAO,EAAE,GAAG,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IACrC,QAAQ,EAAE,GAAG,CAAC,YAAY,EAAE,iBAAiB,CAAC,CAAC;IAC/C,iBAAiB,EAAE,GAAG,CAAC,GA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led: <DataItem>(props: UseTiledProps<DataItem>) => {
7
7
  } | {
8
8
  data: any;
9
9
  onFilter: (text: string, from?: string) => void;
10
- expandIcons: ((item: DataItem) => string | number | boolean | import("react").ReactFragment | JSX.Element | null | undefined)[];
10
+ expandIcons: ((item: DataItem) => string | number | boolean | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined)[];
11
11
  };
12
12
  export default useTiled;
13
13
  //# sourceMappingURL=use-tiled.d.ts.map
@@ -13,7 +13,7 @@ export declare const addResizeObserver: (el: HTMLElement, handler: any, options?
13
13
  }) => () => void;
14
14
  export declare function getParent(el: HTMLElement | null | Element, target?: string | HTMLElement): Element | null;
15
15
  export declare function getClosestScrollContainer(element: HTMLElement | null): HTMLElement | null;
16
- export declare function getClosestFixedContainer(element: Element | HTMLElement | null): HTMLElement | null;
16
+ export declare function getClosestPositionedContainer(element: Element | HTMLElement | null, positions?: React.CSSProperties['position'][]): HTMLElement | null;
17
17
  export declare function cssSupport(attr: keyof CSSStyleDeclaration, value: string): boolean;
18
18
  export declare const parsePxToNumber: (str: string) => number;
19
19
  export declare const getFieldId: (name?: string, formName?: string) => string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"element.d.ts","sourceRoot":"","sources":["element.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B;;;;;;GAMG;AACH,wBAAgB,QAAQ,CACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,EACzB,WAAW,UAAQ,EACnB,SAAS,CAAC,EAAE,MAAM,GACjB,KAAK,CAAC,SAAS,CASjB;AAGD,eAAO,MAAM,iBAAiB,OACxB,WAAW,WACN,GAAG;;;gBA4Cb,CAAC;AAEF,wBAAgB,SAAS,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,GAAG,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,WAAW,kBAmBxF;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,WAAW,GAAG,IAAI,CAmCzF;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,WAAW,GAAG,IAAI,sBAqB7E;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,mBAAmB,EAAE,KAAK,EAAE,MAAM,WAYxE;AAED,eAAO,MAAM,eAAe,QAAS,MAAM,WAAwC,CAAC;AAEpF,eAAO,MAAM,UAAU,UAAW,MAAM,aAAa,MAAM,uBAG1D,CAAC"}
1
+ {"version":3,"file":"element.d.ts","sourceRoot":"","sources":["element.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B;;;;;;GAMG;AACH,wBAAgB,QAAQ,CACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,EACzB,WAAW,UAAQ,EACnB,SAAS,CAAC,EAAE,MAAM,GACjB,KAAK,CAAC,SAAS,CASjB;AAGD,eAAO,MAAM,iBAAiB,OACxB,WAAW,WACN,GAAG;;;gBA4Cb,CAAC;AAEF,wBAAgB,SAAS,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,GAAG,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,WAAW,kBAmBxF;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,WAAW,GAAG,IAAI,CAmCzF;AAED,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,OAAO,GAAG,WAAW,GAAG,IAAI,EACrC,SAAS,GAAE,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,EAA0B,sBAuBrE;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,mBAAmB,EAAE,KAAK,EAAE,MAAM,WAYxE;AAED,eAAO,MAAM,eAAe,QAAS,MAAM,WAAwC,CAAC;AAEpF,eAAO,MAAM,UAAU,UAAW,MAAM,aAAa,MAAM,uBAG1D,CAAC"}
@@ -145,13 +145,15 @@ export function getClosestScrollContainer(element) {
145
145
  // 如果没有找到可滚动的祖先,返回 body 或 documentElement
146
146
  return document.scrollingElement || document.documentElement;
147
147
  }
148
- export function getClosestFixedContainer(element) {
148
+ export function getClosestPositionedContainer(element) {
149
+ var positions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ['fixed', 'absolute'];
149
150
  if (!element) {
150
151
  return null;
151
152
  }
152
153
  var isFixable = function isFixable(el) {
153
154
  var style = window.getComputedStyle(el);
154
- return style.position === 'fixed';
155
+ var position = style.position;
156
+ return positions.includes(position);
155
157
  };
156
158
 
157
159
  // 遍历父元素
package/esm/utils/is.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { ObjectType } from '../common/type';
2
+ import { DisabledOption } from '../components/use-tree/use-tree.type';
2
3
  import { UnMatchedData } from '../common/use-list-select/use-list.type';
3
4
  import React from 'react';
4
5
  export declare function isBrowser(): boolean;
@@ -25,4 +26,5 @@ export declare function isNamedComponent(type: any): type is React.ForwardRefExo
25
26
  export declare const isMacOS: () => boolean;
26
27
  export declare const isFirefox: () => boolean;
27
28
  export declare function isDomElement(element: any): element is HTMLElement;
29
+ export declare const isOptionalDisabled: <DataItem>(disabled: unknown) => disabled is DisabledOption<DataItem>;
28
30
  //# sourceMappingURL=is.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"is.d.ts","sourceRoot":"","sources":["is.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACxE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,wBAAgB,SAAS,YAExB;AASD,eAAO,MAAM,OAAO,4BAAgB,CAAC;AACrC,eAAO,MAAM,QAAQ,QAAS,OAAO,sBACc,CAAC;AACpD,eAAO,MAAM,MAAM,QAAS,OAAO,gBAAqC,CAAC;AACzE,eAAO,MAAM,SAAS,QAAS,OAAO,mBAA2C,CAAC;AAClF,eAAO,MAAM,OAAO,QAAS,OAAO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AAM,SAAS,QAAO,OAG5B,CAAC;AAEF,wBAAgB,YAAY,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO,IAAI,WAAW,CAQjE;AAED,eAAO,MAAM,kBAAkB,uBACnB,OAAO,yCAGlB,CAAC"}
package/esm/utils/is.js CHANGED
@@ -98,4 +98,7 @@ export var isFirefox = function isFirefox() {
98
98
  export function isDomElement(element) {
99
99
  return (typeof HTMLElement === "undefined" ? "undefined" : _typeof(HTMLElement)) === 'object' ? element instanceof HTMLElement // DOM2
100
100
  : element && _typeof(element) === 'object' && element !== null && element.nodeType === 1 && typeof element.nodeName === 'string';
101
- }
101
+ }
102
+ export var isOptionalDisabled = function isOptionalDisabled(disabled) {
103
+ return isObject(disabled) && disabled.hasOwnProperty('isRealtime');
104
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"lazyload.d.ts","sourceRoot":"","sources":["lazyload.ts"],"names":[],"mappings":"AAKA,KAAK,UAAU,GAAG;IAChB,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,oBAAoB,CAAC;CACjC,CAAC;AAsBF,wBAAgB,QAAQ,SAgBvB;AAWD,wBAAgB,WAAW,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,cAAc,CAAC,EAAE,OAAO,QAUvE;AAyBD,wBAAgB,QAAQ,CAAC,GAAG,EAAE,UAAU,iBA4BvC"}
1
+ {"version":3,"file":"lazyload.d.ts","sourceRoot":"","sources":["lazyload.ts"],"names":[],"mappings":"AAKA,KAAK,UAAU,GAAG;IAChB,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,oBAAoB,CAAC;CACjC,CAAC;AAsBF,wBAAgB,QAAQ,SAgBvB;AAWD,wBAAgB,WAAW,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,cAAc,CAAC,EAAE,OAAO,QAUvE;AA0BD,wBAAgB,QAAQ,CAAC,GAAG,EAAE,UAAU,iBA4BvC"}
@@ -1,5 +1,5 @@
1
1
  import { generateUUID, docSize, devUseWarning } from "../utils";
2
- import { getClosestFixedContainer } from "./dom/element";
2
+ import { getClosestPositionedContainer } from "./dom/element";
3
3
  var throttle = 80;
4
4
  var components = {};
5
5
  var timeout = null;
@@ -11,7 +11,6 @@ var getRect = function getRect(el) {
11
11
  if (el) {
12
12
  devUseWarning.error("the ".concat(el, " is not a element"));
13
13
  }
14
- ;
15
14
  return {
16
15
  top: 0,
17
16
  bottom: winHeight
@@ -67,13 +66,14 @@ function getObserver(obj, id) {
67
66
  render = obj.render,
68
67
  offscreen = obj.offscreen,
69
68
  noRemove = obj.noRemove;
70
- var fixedContainer = getClosestFixedContainer(element);
69
+ var fixedContainer = getClosestPositionedContainer(element, ['fixed', 'absolute']);
71
70
  var observer = new IntersectionObserver(function (entries) {
72
71
  entries.forEach(function (en) {
73
72
  if (en.isIntersecting || en.intersectionRatio > 0) {
74
73
  render();
75
74
  if (!noRemove) removeStack(id);
76
75
  } else {
76
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions
77
77
  offscreen && offscreen();
78
78
  }
79
79
  });
@@ -1 +1 @@
1
- {"version":3,"file":"object.d.ts","sourceRoot":"","sources":["object.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,wBAAgB,WAAW,CAAC,IAAI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