shineout 3.0.0-alpha.13 → 3.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.
package/cjs/index.js CHANGED
@@ -433,6 +433,6 @@ exports.TYPE = _TYPE;
433
433
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
434
434
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
435
435
  var _default = {
436
- version: '3.0.0-alpha.13'
436
+ version: '3.0.0-alpha.14'
437
437
  };
438
438
  exports.default = _default;
package/dist/shineout.js CHANGED
@@ -19054,7 +19054,7 @@ var handleStyle = function handleStyle(style) {
19054
19054
  };
19055
19055
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
19056
19056
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
19057
- /* harmony default export */ var version = ('3.0.0-alpha.13');
19057
+ /* harmony default export */ var version = ('3.0.0-alpha.14');
19058
19058
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
19059
19059
 
19060
19060
 
@@ -52612,8 +52612,6 @@ var usePagination = function usePagination(props) {
52612
52612
  ;// CONCATENATED MODULE: ../base/src/pagination/pagination.tsx
52613
52613
 
52614
52614
 
52615
- var pagination_excluded = ["className", "jssStyle", "size", "align", "total", "pageSize", "defaultCurrent", "current", "span", "onChange", "layout", "mode", "simple", "disabled", "text", "pageSizeList"];
52616
-
52617
52615
 
52618
52616
 
52619
52617
 
@@ -52646,7 +52644,7 @@ var Pagination = function Pagination(props) {
52646
52644
  _props$text = props.text,
52647
52645
  text = _props$text === void 0 ? {} : _props$text,
52648
52646
  pageSizeList = props.pageSizeList,
52649
- rest = objectWithoutProperties_default()(props, pagination_excluded);
52647
+ style = props.style;
52650
52648
  var _usePagination = use_pagination({
52651
52649
  total: total,
52652
52650
  span: span,
@@ -52661,7 +52659,9 @@ var Pagination = function Pagination(props) {
52661
52659
  var paginationStyle = jssStyle === null || jssStyle === void 0 ? void 0 : (_jssStyle$pagination = jssStyle.pagination) === null || _jssStyle$pagination === void 0 ? void 0 : _jssStyle$pagination.call(jssStyle);
52662
52660
  var rootClasses = classnames_default()(className, paginationStyle === null || paginationStyle === void 0 ? void 0 : paginationStyle.pagination, align === 'left' && (paginationStyle === null || paginationStyle === void 0 ? void 0 : paginationStyle.left), align === 'center' && (paginationStyle === null || paginationStyle === void 0 ? void 0 : paginationStyle.center), align === 'right' && (paginationStyle === null || paginationStyle === void 0 ? void 0 : paginationStyle.right), size === 'small' && (paginationStyle === null || paginationStyle === void 0 ? void 0 : paginationStyle.small), size === 'large' && (paginationStyle === null || paginationStyle === void 0 ? void 0 : paginationStyle.large));
52663
52661
  var getRootProps = function getRootProps() {
52664
- return objectSpread2_default()({}, rest);
52662
+ return {
52663
+ style: style
52664
+ };
52665
52665
  };
52666
52666
  if (simple || layout.includes('simple')) {
52667
52667
  return /*#__PURE__*/(0,jsx_runtime.jsx)("div", objectSpread2_default()(objectSpread2_default()({}, getRootProps()), {}, {
@@ -56379,22 +56379,26 @@ var useTableLayout = function useTableLayout(props) {
56379
56379
  setFloatRight = _React$useState10[1];
56380
56380
  var _React$useState11 = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(0),
56381
56381
  _React$useState12 = slicedToArray_default()(_React$useState11, 2),
56382
- scrollBarWidth = _React$useState12[0],
56383
- setScrollBarWidth = _React$useState12[1];
56382
+ resizeFlag = _React$useState12[0],
56383
+ setResizeFlag = _React$useState12[1];
56384
56384
  var _React$useState13 = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(0),
56385
56385
  _React$useState14 = slicedToArray_default()(_React$useState13, 2),
56386
- scrollWidth = _React$useState14[0],
56387
- setScrollWidth = _React$useState14[1];
56388
- var _React$useState15 = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(props.columns.map(function (v) {
56386
+ scrollBarWidth = _React$useState14[0],
56387
+ setScrollBarWidth = _React$useState14[1];
56388
+ var _React$useState15 = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(0),
56389
+ _React$useState16 = slicedToArray_default()(_React$useState15, 2),
56390
+ scrollWidth = _React$useState16[0],
56391
+ setScrollWidth = _React$useState16[1];
56392
+ var _React$useState17 = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(props.columns.map(function (v) {
56389
56393
  return v.width;
56390
56394
  })),
56391
- _React$useState16 = slicedToArray_default()(_React$useState15, 2),
56392
- colgroup = _React$useState16[0],
56393
- setColgroup = _React$useState16[1];
56394
- var _React$useState17 = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(true),
56395
56395
  _React$useState18 = slicedToArray_default()(_React$useState17, 2),
56396
- adjust = _React$useState18[0],
56397
- setAdjust = _React$useState18[1];
56396
+ colgroup = _React$useState18[0],
56397
+ setColgroup = _React$useState18[1];
56398
+ var _React$useState19 = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(true),
56399
+ _React$useState20 = slicedToArray_default()(_React$useState19, 2),
56400
+ adjust = _React$useState20[0],
56401
+ setAdjust = _React$useState20[1];
56398
56402
 
56399
56403
  // 检查滚动状态
56400
56404
  var checkScroll = use_persist_fn(function () {
@@ -56442,9 +56446,17 @@ var useTableLayout = function useTableLayout(props) {
56442
56446
  colEl.style.width = "".concat(w, "px");
56443
56447
  context.dragWidth = w;
56444
56448
  });
56449
+ var updateResizeFlag = function updateResizeFlag() {
56450
+ setResizeFlag(function (v) {
56451
+ return (v + 1) % 10;
56452
+ });
56453
+ };
56445
56454
  var changeColGroup = function changeColGroup(cols, adjust) {
56446
56455
  setColgroup(cols);
56447
56456
  setAdjust(adjust);
56457
+ if (!adjust) {
56458
+ updateResizeFlag();
56459
+ }
56448
56460
  };
56449
56461
 
56450
56462
  // 完成拖拽
@@ -56601,7 +56613,8 @@ var useTableLayout = function useTableLayout(props) {
56601
56613
  width: typeof props.width === 'number' ? props.width + deltaXSum : props.width,
56602
56614
  shouldLastColAuto: props.columnResizable && !adjust,
56603
56615
  scrollWidth: scrollWidth,
56604
- maxScrollLeft: scrollWidth - context.clientWidth
56616
+ maxScrollLeft: scrollWidth - context.clientWidth,
56617
+ resizeFlag: resizeFlag
56605
56618
  };
56606
56619
  };
56607
56620
  /* harmony default export */ var use_table_layout = (useTableLayout);
@@ -57816,7 +57829,7 @@ var Tr = function Tr(props) {
57816
57829
  var expandHeight = expandRef.current ? expandRef.current.offsetHeight : 0;
57817
57830
  props.setRowHeight(props.rowIndex, trRef.current.offsetHeight + expandHeight);
57818
57831
  }
57819
- }, [props.expanded, props.rowIndex, props.bodyScrollWidth]);
57832
+ }, [props.expanded, props.rowIndex, props.bodyScrollWidth, props.resizeFlag]);
57820
57833
  var renderTreeExpand = function renderTreeExpand(content) {
57821
57834
  var treeIndent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 22;
57822
57835
  var level = props.treeExpandLevel.get(props.originKey) || 0;
@@ -58078,7 +58091,8 @@ var Tr = function Tr(props) {
58078
58091
  onRowClick: props.onRowClick,
58079
58092
  rowEvents: props.rowEvents,
58080
58093
  disabled: props.datum.disabledCheck(item),
58081
- bodyScrollWidth: props.bodyScrollWidth
58094
+ bodyScrollWidth: props.bodyScrollWidth,
58095
+ resizeFlag: props.resizeFlag
58082
58096
  }, originKey);
58083
58097
  };
58084
58098
  return /*#__PURE__*/(0,jsx_runtime.jsx)("tbody", {
@@ -58297,7 +58311,8 @@ var scrollWrapperStyle = {
58297
58311
  shouldLastColAuto = _useTableLayout.shouldLastColAuto,
58298
58312
  maxScrollLeft = _useTableLayout.maxScrollLeft,
58299
58313
  scrollBarWidth = _useTableLayout.scrollBarWidth,
58300
- scrollWidth = _useTableLayout.scrollWidth;
58314
+ scrollWidth = _useTableLayout.scrollWidth,
58315
+ resizeFlag = _useTableLayout.resizeFlag;
58301
58316
  var _useTableSort = use_table_sort({
58302
58317
  data: props.data,
58303
58318
  sorter: props.sorter,
@@ -58428,7 +58443,8 @@ var scrollWrapperStyle = {
58428
58443
  radio: props.radio,
58429
58444
  onRowClick: props.onRowClick,
58430
58445
  rowEvents: props.rowEvents,
58431
- bodyScrollWidth: scrollWidth
58446
+ bodyScrollWidth: scrollWidth,
58447
+ resizeFlag: resizeFlag
58432
58448
  };
58433
58449
  var headCommonProps = {
58434
58450
  disabled: props.disabled,
@@ -64550,7 +64566,7 @@ var upload_interface = __webpack_require__(7818);
64550
64566
 
64551
64567
 
64552
64568
  /* harmony default export */ var src_0 = ({
64553
- version: '3.0.0-alpha.13'
64569
+ version: '3.0.0-alpha.14'
64554
64570
  });
64555
64571
  }();
64556
64572
  /******/ return __webpack_exports__;