shineout 3.7.8-beta.9 → 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.9'
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.9');
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
@@ -50857,7 +50874,7 @@ var useForm = function useForm(props) {
50857
50874
  var _props$onChange;
50858
50875
  var newValue = typeof change === 'function' ? utils_immer_produce(context.value, change) : change;
50859
50876
  context.value = newValue;
50860
- (_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);
50861
50878
  });
50862
50879
  var scrollToField = use_persist_fn(function (name) {
50863
50880
  var _document;
@@ -56364,7 +56381,8 @@ var ColumnsList = function ColumnsList(props) {
56364
56381
  colNum: columns,
56365
56382
  lineHeight: lineHeight,
56366
56383
  rowsInView: itemsInView,
56367
- renderItem: renderItem
56384
+ renderItem: renderItem,
56385
+ paddingY: 4
56368
56386
  });
56369
56387
  };
56370
56388
  var renderSelectAll = function renderSelectAll() {
@@ -71863,7 +71881,7 @@ var upload_interface = __webpack_require__(8821);
71863
71881
 
71864
71882
 
71865
71883
  /* harmony default export */ var src_0 = ({
71866
- version: '3.7.8-beta.9'
71884
+ version: '3.7.8'
71867
71885
  });
71868
71886
  }();
71869
71887
  /******/ return __webpack_exports__;