shineout 3.9.14-beta.6 → 3.9.14-beta.8

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/cjs/index.js CHANGED
@@ -522,5 +522,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
522
522
  // 此文件由脚本自动生成,请勿直接修改。
523
523
  // This file was generated automatically by a script. Please do not modify it directly.
524
524
  var _default = exports.default = {
525
- version: '3.9.14-beta.6'
525
+ version: '3.9.14-beta.8'
526
526
  };
package/dist/shineout.js CHANGED
@@ -12326,7 +12326,7 @@ var handleStyle = function handleStyle(style) {
12326
12326
  };
12327
12327
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12328
12328
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12329
- /* harmony default export */ var version = ('3.9.14-beta.6');
12329
+ /* harmony default export */ var version = ('3.9.14-beta.8');
12330
12330
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12331
12331
 
12332
12332
 
@@ -30755,10 +30755,13 @@ function useClickAway(params) {
30755
30755
  });
30756
30756
  var target = Array.isArray(t) ? t : [t];
30757
30757
  var handleClickAway = use_persist_fn(function (event) {
30758
- // @ts-ignore
30758
+ var _composedPath, _composedPath2, _ref;
30759
+ // composedPath() 兼容 Shadow DOM,包含事件传播路径上的所有元素
30760
+ var path = (_composedPath = (_composedPath2 = (_ref = event).composedPath) === null || _composedPath2 === void 0 ? void 0 : _composedPath2.call(_ref)) !== null && _composedPath !== void 0 ? _composedPath : [event.target];
30759
30761
  if (target.findIndex(function (t) {
30760
- var _t$current;
30761
- return (_t$current = t.current) === null || _t$current === void 0 ? void 0 : _t$current.contains(event.target);
30762
+ return t.current && path.some(function (n) {
30763
+ return n instanceof Node && t.current.contains(n);
30764
+ });
30762
30765
  }) > -1) {
30763
30766
  return;
30764
30767
  }
@@ -57647,7 +57650,7 @@ var initPlaceElement = function initPlaceElement() {
57647
57650
  }
57648
57651
  };
57649
57652
  initPlaceElement();
57650
- var Node = function Node(props) {
57653
+ var tree_simple_node_Node = function Node(props) {
57651
57654
  var jssStyle = props.jssStyle,
57652
57655
  id = props.id,
57653
57656
  data = props.data,
@@ -57902,7 +57905,7 @@ var Node = function Node(props) {
57902
57905
  }), hasChildren && /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement)(List, getChildrenListProps())]
57903
57906
  }));
57904
57907
  };
57905
- /* harmony default export */ var tree_simple_node = (Node);
57908
+ /* harmony default export */ var tree_simple_node = (tree_simple_node_Node);
57906
57909
  ;// CONCATENATED MODULE: ../hooks/src/components/use-tree/use-tree-virtual-node.ts
57907
57910
 
57908
57911
 
@@ -65969,6 +65972,32 @@ var useTableLayout = function useTableLayout(props) {
65969
65972
  (_cancelFunc = cancelFunc) === null || _cancelFunc === void 0 || _cancelFunc();
65970
65973
  };
65971
65974
  }, [scrollRef.current]);
65975
+
65976
+ // 当祖先元素的 CSS 动画结束时(如 Modal 入场动画),重新测量列宽
65977
+ // 解决 Table 在动画容器(如 Modal)中渲染时,动画期间测量的列宽不准确导致 sticky 表头与表体列宽错位的问题
65978
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
65979
+ var scrollEl = scrollRef.current;
65980
+ if (!scrollEl) return;
65981
+
65982
+ // 查找最近的 fixed 定位祖先(如 Modal wrapper),仅在该元素上监听动画结束
65983
+ var fixedAncestor = null;
65984
+ var parent = scrollEl.parentElement;
65985
+ while (parent) {
65986
+ if (window.getComputedStyle(parent).position === 'fixed') {
65987
+ fixedAncestor = parent;
65988
+ break;
65989
+ }
65990
+ parent = parent.parentElement;
65991
+ }
65992
+ if (!fixedAncestor) return;
65993
+ var handleAnimationEnd = function handleAnimationEnd() {
65994
+ getColgroup(false);
65995
+ };
65996
+ fixedAncestor.addEventListener('animationend', handleAnimationEnd);
65997
+ return function () {
65998
+ fixedAncestor.removeEventListener('animationend', handleAnimationEnd);
65999
+ };
66000
+ }, [scrollRef.current]);
65972
66001
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
65973
66002
  if (adjust) {
65974
66003
  getColgroup(adjust === 'drag');
@@ -75728,7 +75757,7 @@ var upload_interface = __webpack_require__(8821);
75728
75757
 
75729
75758
 
75730
75759
  /* harmony default export */ var src_0 = ({
75731
- version: '3.9.14-beta.6'
75760
+ version: '3.9.14-beta.8'
75732
75761
  });
75733
75762
  }();
75734
75763
  /******/ return __webpack_exports__;