shineout 3.7.8-beta.8 → 3.7.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.7.8-beta.8'
525
+ version: '3.7.8'
526
526
  };
package/dist/shineout.js CHANGED
@@ -12234,7 +12234,7 @@ var handleStyle = function handleStyle(style) {
12234
12234
  };
12235
12235
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12236
12236
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12237
- /* harmony default export */ var version = ('3.7.8-beta.8');
12237
+ /* harmony default export */ var version = ('3.7.8');
12238
12238
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12239
12239
 
12240
12240
 
@@ -23692,7 +23692,6 @@ var selectStyle = objectSpread2_default()(objectSpread2_default()({
23692
23692
  height: 32,
23693
23693
  padding: "".concat(src.selectHeaderPaddingY, " ").concat(src.selectHeaderPaddingX),
23694
23694
  borderBottom: "1px solid ".concat(src.selectHeaderBorderColor),
23695
- marginBottom: 4,
23696
23695
  '& $columnsCheckbox': {
23697
23696
  marginRight: 0,
23698
23697
  marginLeft: 4,
@@ -31081,6 +31080,23 @@ var getCurrentCSSZoom = function getCurrentCSSZoom() {
31081
31080
  // height: rect.height * zoomRatio,
31082
31081
  // }
31083
31082
  // }
31083
+
31084
+ var getScrollPosition = function getScrollPosition(element) {
31085
+ if (!element) return {
31086
+ scrollTop: 0,
31087
+ scrollLeft: 0
31088
+ };
31089
+ if (element === document.documentElement || element === document.body) {
31090
+ return {
31091
+ scrollTop: document.documentElement.scrollTop || document.body.scrollTop,
31092
+ scrollLeft: document.documentElement.scrollLeft || document.body.scrollLeft
31093
+ };
31094
+ }
31095
+ return {
31096
+ scrollTop: element.scrollTop,
31097
+ scrollLeft: element.scrollLeft
31098
+ };
31099
+ };
31084
31100
  ;// CONCATENATED MODULE: ../hooks/src/common/use-position-style/index.ts
31085
31101
 
31086
31102
 
@@ -31324,17 +31340,18 @@ var usePositionStyle = function usePositionStyle(config) {
31324
31340
  };
31325
31341
  };
31326
31342
  var getAbsoluteStyle = function getAbsoluteStyle(position) {
31327
- var _scrollElRef$current, _scrollElRef$current2, _scrollElRef$current3;
31343
+ var _scrollElRef$current;
31328
31344
  if (!parentElRef.current) return {
31329
31345
  style: hideStyle
31330
31346
  };
31331
31347
  var rect = context.parentRect;
31332
31348
  var needCheck = !show || !shallow_equal(context.prevParentPosition, parentElNewPosition);
31333
- var scrollTop = (scrollElRef === null || scrollElRef === void 0 || (_scrollElRef$current = scrollElRef.current) === null || _scrollElRef$current === void 0 ? void 0 : _scrollElRef$current.scrollTop) || 0;
31334
- var scrollLeft = (scrollElRef === null || scrollElRef === void 0 || (_scrollElRef$current2 = scrollElRef.current) === null || _scrollElRef$current2 === void 0 ? void 0 : _scrollElRef$current2.scrollLeft) || 0;
31335
- if (needCheck && scrollElRef !== null && scrollElRef !== void 0 && scrollElRef.current && (_scrollElRef$current3 = scrollElRef.current) !== null && _scrollElRef$current3 !== void 0 && _scrollElRef$current3.contains(parentElRef.current)) {
31336
- var _scrollElRef$current4;
31337
- var visibleRect = ((_scrollElRef$current4 = scrollElRef.current) === null || _scrollElRef$current4 === void 0 ? void 0 : _scrollElRef$current4.getBoundingClientRect()) || {};
31349
+ var _getScrollPosition = getScrollPosition(scrollElRef === null || scrollElRef === void 0 ? void 0 : scrollElRef.current),
31350
+ scrollTop = _getScrollPosition.scrollTop,
31351
+ scrollLeft = _getScrollPosition.scrollLeft;
31352
+ if (needCheck && scrollElRef !== null && scrollElRef !== void 0 && scrollElRef.current && (_scrollElRef$current = scrollElRef.current) !== null && _scrollElRef$current !== void 0 && _scrollElRef$current.contains(parentElRef.current)) {
31353
+ var _scrollElRef$current2;
31354
+ var visibleRect = ((_scrollElRef$current2 = scrollElRef.current) === null || _scrollElRef$current2 === void 0 ? void 0 : _scrollElRef$current2.getBoundingClientRect()) || {};
31338
31355
  if (rect.bottom < visibleRect.top || rect.top > visibleRect.bottom + scrollTop || rect.right < visibleRect.left || rect.left > visibleRect.right + scrollLeft) {
31339
31356
  return {
31340
31357
  style: hideStyle
@@ -31408,7 +31425,9 @@ var usePositionStyle = function usePositionStyle(config) {
31408
31425
  }
31409
31426
 
31410
31427
  // 当父元素的滚动容器滚动时,判断是否需要更新弹出层位置,包括是否隐藏弹出层(通过hideStyle隐藏,不是show状态)
31411
- context.prevParentPosition = parentElNewPosition;
31428
+ if (show) {
31429
+ context.prevParentPosition = parentElNewPosition;
31430
+ }
31412
31431
  });
31413
31432
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(updateStyle, [show, position, absolute, updateKey, fixedWidth, parentElNewPosition, popupElSize]);
31414
31433
  return {
@@ -50855,7 +50874,7 @@ var useForm = function useForm(props) {
50855
50874
  var _props$onChange;
50856
50875
  var newValue = typeof change === 'function' ? utils_immer_produce(context.value, change) : change;
50857
50876
  context.value = newValue;
50858
- (_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, deepClone(context.value));
50877
+ (_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, newValue);
50859
50878
  });
50860
50879
  var scrollToField = use_persist_fn(function (name) {
50861
50880
  var _document;
@@ -55393,7 +55412,8 @@ var VirtualNode = function VirtualNode(props) {
55393
55412
  className: rootClass,
55394
55413
  dir: config.direction,
55395
55414
  style: {
55396
- paddingLeft: level * indent
55415
+ paddingLeft: level * indent,
55416
+ height: props.lineHeight
55397
55417
  },
55398
55418
  children: [$indents, /*#__PURE__*/(0,jsx_runtime.jsx)(tree_content, {
55399
55419
  virtual: true,
@@ -55677,7 +55697,8 @@ var TreeVirtual = function TreeVirtual(props) {
55677
55697
  onNodeClick: onNodeClick,
55678
55698
  onToggle: onToggle,
55679
55699
  onChange: onChange,
55680
- size: datum.size
55700
+ size: datum.size,
55701
+ lineHeight: lineHeight
55681
55702
  }, id);
55682
55703
  };
55683
55704
  return /*#__PURE__*/(0,jsx_runtime.jsx)(virtual_scroll_list, {
@@ -56360,7 +56381,8 @@ var ColumnsList = function ColumnsList(props) {
56360
56381
  colNum: columns,
56361
56382
  lineHeight: lineHeight,
56362
56383
  rowsInView: itemsInView,
56363
- renderItem: renderItem
56384
+ renderItem: renderItem,
56385
+ paddingY: 4
56364
56386
  });
56365
56387
  };
56366
56388
  var renderSelectAll = function renderSelectAll() {
@@ -71859,7 +71881,7 @@ var upload_interface = __webpack_require__(8821);
71859
71881
 
71860
71882
 
71861
71883
  /* harmony default export */ var src_0 = ({
71862
- version: '3.7.8-beta.8'
71884
+ version: '3.7.8'
71863
71885
  });
71864
71886
  }();
71865
71887
  /******/ return __webpack_exports__;