shineout 3.7.0-beta.4 → 3.7.0-beta.5

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
@@ -514,5 +514,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
514
514
  // 此文件由脚本自动生成,请勿直接修改。
515
515
  // This file was generated automatically by a script. Please do not modify it directly.
516
516
  var _default = exports.default = {
517
- version: '3.7.0-beta.4'
517
+ version: '3.7.0-beta.5'
518
518
  };
package/dist/shineout.js CHANGED
@@ -6780,7 +6780,11 @@ var arrowRight = [/*#__PURE__*/(0,jsx_runtime.jsx)("path", {
6780
6780
  clipRule: "evenodd",
6781
6781
  d: "M10.0625 17.9999C9.67198 18.3904 9.03881 18.3904 8.64829 17.9999C8.25776 17.6094 8.25776 16.9762 8.64829 16.5857L13.2341 11.9999L8.64829 7.41414C8.25776 7.02361 8.25776 6.39045 8.64829 5.99992C9.03881 5.6094 9.67198 5.6094 10.0625 5.99992L15.3554 11.2928C15.7459 11.6833 15.7459 12.3165 15.3554 12.707L10.0625 17.9999Z"
6782
6782
  }, '1')];
6783
- var caretFill = ['M18.2213 9.72149L12.6348 15.2953C12.2444 15.6847 11.6125 15.6847 11.2222 15.2952L5.69827 9.78345C5.30731 9.39335 5.30662 8.76019 5.69671 8.36924C5.88295 8.18259 6.13536 8.07705 6.39902 8.07558L17.5094 8.0136C18.0617 8.01052 18.5119 8.45573 18.515 9.008C18.5165 9.27554 18.4107 9.53253 18.2213 9.72149Z'];
6783
+ var caretFill = /*#__PURE__*/(0,jsx_runtime.jsx)("path", {
6784
+ fillRule: "evenodd",
6785
+ clipRule: "evenodd",
6786
+ d: "M18.262 9.92099L12.6754 15.4948C12.2851 15.8842 11.6531 15.8842 11.2628 15.4947L5.73891 9.98295C5.34796 9.59286 5.34727 8.95969 5.73736 8.56874C5.9236 8.3821 6.17601 8.27656 6.43967 8.27508L17.5501 8.2131C18.1024 8.21002 18.5526 8.65523 18.5556 9.2075C18.5571 9.47504 18.4514 9.73203 18.262 9.92099Z"
6787
+ });
6784
6788
  var imageCount = [/*#__PURE__*/(0,jsx_runtime.jsx)("path", {
6785
6789
  fillRule: "evenodd",
6786
6790
  clipRule: "evenodd",
@@ -7074,12 +7078,12 @@ var config = {
7074
7078
  Next: icons.ArrowRight,
7075
7079
  CollapseArrow: icons.ArrowLeft
7076
7080
  },
7077
- textarea: {
7078
- Close: icons.CloseFill
7079
- },
7080
7081
  tag: {
7081
7082
  Close: icons.Close
7082
7083
  },
7084
+ textarea: {
7085
+ Close: icons.CloseFill
7086
+ },
7083
7087
  transfer: {
7084
7088
  DeleteAll: icons.Delete,
7085
7089
  DeleteItem: icons.Close,
@@ -12142,7 +12146,7 @@ var handleStyle = function handleStyle(style) {
12142
12146
  };
12143
12147
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12144
12148
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12145
- /* harmony default export */ var version = ('3.7.0-beta.4');
12149
+ /* harmony default export */ var version = ('3.7.0-beta.5');
12146
12150
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12147
12151
 
12148
12152
 
@@ -17247,7 +17251,8 @@ var cascaderStyle = objectSpread2_default()(objectSpread2_default()({
17247
17251
  minWidth: 0,
17248
17252
  position: 'relative',
17249
17253
  outline: 'none',
17250
- overflow: 'hidden'
17254
+ maxHeight: 78,
17255
+ overflow: 'auto'
17251
17256
  },
17252
17257
  result: {
17253
17258
  display: 'flex',
@@ -17393,7 +17398,9 @@ var cascaderStyle = objectSpread2_default()(objectSpread2_default()({
17393
17398
  iconWrapper: {
17394
17399
  display: 'flex',
17395
17400
  alignItems: 'center',
17396
- justifyContent: 'center'
17401
+ justifyContent: 'center',
17402
+ position: 'sticky',
17403
+ top: 0
17397
17404
  },
17398
17405
  clearable: {},
17399
17406
  clearIcon: {
@@ -28292,8 +28299,8 @@ var treeSelectStyle = objectSpread2_default()(objectSpread2_default()({
28292
28299
  minWidth: 0,
28293
28300
  position: 'relative',
28294
28301
  outline: 'none',
28295
- overflow: 'hidden',
28296
- '&:hover': {}
28302
+ maxHeight: 78,
28303
+ overflow: 'auto'
28297
28304
  },
28298
28305
  result: {
28299
28306
  display: 'flex',
@@ -28425,7 +28432,9 @@ var treeSelectStyle = objectSpread2_default()(objectSpread2_default()({
28425
28432
  iconWrapper: {
28426
28433
  display: 'flex',
28427
28434
  alignItems: 'center',
28428
- justifyContent: 'center'
28435
+ justifyContent: 'center',
28436
+ position: 'sticky',
28437
+ top: 0
28429
28438
  },
28430
28439
  clearable: {},
28431
28440
  clearIcon: {
@@ -47462,6 +47471,7 @@ var Modal = function Modal(props) {
47462
47471
  doc.style.paddingRight = "".concat(window.innerWidth - docSize.width, "px");
47463
47472
  }
47464
47473
  } else {
47474
+ if (!context.isMask) return;
47465
47475
  doc.style.paddingRight = '';
47466
47476
  doc.style.overflow = '';
47467
47477
  }
@@ -47486,6 +47496,7 @@ var Modal = function Modal(props) {
47486
47496
  hasMask = false;
47487
47497
  }
47488
47498
  {
47499
+ if (!context.isMask) return;
47489
47500
  var doc = document.body.parentNode;
47490
47501
  doc.style.paddingRight = '';
47491
47502
  doc.style.overflow = '';
@@ -50519,7 +50530,7 @@ var FormFlow = function FormFlow(props) {
50519
50530
  return datum === null || datum === void 0 ? void 0 : datum.get(name);
50520
50531
  });
50521
50532
  var memoizedResult = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
50522
- if (!props.strict) return;
50533
+ if (!props.strict) return null;
50523
50534
  if (isFunc(props.children)) {
50524
50535
  return props.children(datum);
50525
50536
  }
@@ -62428,20 +62439,31 @@ function useMemo(getValue, condition, shouldUpdate) {
62428
62439
 
62429
62440
 
62430
62441
 
62442
+
62431
62443
  function Td(props) {
62444
+ var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(),
62445
+ _React$useState2 = slicedToArray_default()(_React$useState, 2),
62446
+ style = _React$useState2[0],
62447
+ setStyle = _React$useState2[1];
62448
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
62449
+ if (!props.style) return;
62450
+ if (shallowEqual(props.style, style)) {
62451
+ return;
62452
+ }
62453
+ setStyle(props.style);
62454
+ }, [props.style]);
62432
62455
  var col = props.col,
62433
62456
  colSpan = props.colSpan,
62434
62457
  rowSpan = props.rowSpan,
62435
62458
  className = props.className,
62436
- style = props.style,
62437
62459
  direction = props.direction,
62438
62460
  role = props.role,
62439
62461
  onClick = props.onClick,
62440
62462
  onMouseEnter = props.onMouseEnter,
62441
62463
  onMouseLeave = props.onMouseLeave,
62442
62464
  renderContent = props.renderContent;
62443
- var externalDependencies = typeof_default()(props.shouldUpdate) === 'object' && props.shouldUpdate.dependencies ? props.shouldUpdate.dependencies : [];
62444
- var updateFn = typeof_default()(props.shouldUpdate) === 'object' && 'update' in props.shouldUpdate ? props.shouldUpdate.update : props.shouldUpdate;
62465
+ var externalDependencies = typeof_default()(props.shouldCellUpdate) === 'object' && props.shouldCellUpdate.dependencies ? props.shouldCellUpdate.dependencies : [];
62466
+ var updateFn = typeof_default()(props.shouldCellUpdate) === 'object' && 'update' in props.shouldCellUpdate ? props.shouldCellUpdate.update : props.shouldCellUpdate;
62445
62467
  var $td = useMemo(function () {
62446
62468
  var content = renderContent(props.col, props.data);
62447
62469
  return /*#__PURE__*/(0,jsx_runtime.jsx)("td", {
@@ -62519,13 +62541,14 @@ var Tr = function Tr(props) {
62519
62541
  right: right
62520
62542
  };
62521
62543
  }
62522
- return {};
62544
+ return undefined;
62523
62545
  };
62524
- var getTdStyle = function getTdStyle(column, colSpan) {
62546
+ var getTdStyle = usePersistFn(function (column, colSpan) {
62525
62547
  var index = column.index;
62526
62548
  var fixedStyle = getFixedStyle(column.fixed, index, colSpan);
62549
+ if (!fixedStyle && !column.style) return;
62527
62550
  return objectSpread2_default()(objectSpread2_default()({}, column.style), fixedStyle);
62528
- };
62551
+ });
62529
62552
  var handleCellClick = usePersistFn(function (data, colIndex) {
62530
62553
  if (!props.onCellClick) return;
62531
62554
  props.onCellClick(data, {
@@ -62588,7 +62611,7 @@ var Tr = function Tr(props) {
62588
62611
  return _ref.apply(this, arguments);
62589
62612
  };
62590
62613
  }());
62591
- var renderTreeExpand = function renderTreeExpand(content) {
62614
+ var renderTreeExpand = usePersistFn(function (content) {
62592
62615
  var treeIndent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 22;
62593
62616
  var level = props.treeExpandLevel.get(props.originKey) || 0;
62594
62617
  var className = tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.expandWrapper;
@@ -62641,8 +62664,8 @@ var Tr = function Tr(props) {
62641
62664
  },
62642
62665
  children: [$expandIconWrapper, content]
62643
62666
  });
62644
- };
62645
- var renderContent = function renderContent(col, data) {
62667
+ });
62668
+ var renderContent = usePersistFn(function (col, data) {
62646
62669
  if (col.type === 'expand' || col.type === 'row-expand') {
62647
62670
  var renderResult = typeof col.render === 'function' ? col.render(props.rawData, props.rowIndex) : undefined;
62648
62671
  if (typeof renderResult !== 'function') return null;
@@ -62708,8 +62731,8 @@ var Tr = function Tr(props) {
62708
62731
  return renderTreeExpand(content, col.treeIndent);
62709
62732
  }
62710
62733
  return content;
62711
- };
62712
- var renderTds = function renderTds(cols, data) {
62734
+ });
62735
+ var renderTds = usePersistFn(function (cols, data) {
62713
62736
  var tds = [];
62714
62737
  var skip = 0;
62715
62738
  var lastRowIndex = data.length - 1;
@@ -62753,9 +62776,9 @@ var Tr = function Tr(props) {
62753
62776
  onClick: props.onCellClick ? function () {
62754
62777
  return handleCellClick(data[i].data, i);
62755
62778
  } : undefined,
62756
- shouldUpdate: col.shouldUpdate,
62779
+ shouldCellUpdate: col.shouldCellUpdate || props.shouldCellUpdate,
62757
62780
  renderContent: renderContent
62758
- });
62781
+ }, "".concat(col.key, "-").concat(props.rowIndex, "-").concat(i));
62759
62782
  tds.push(td);
62760
62783
  if (data[i].colSpan) skip = data[i].colSpan - 1;
62761
62784
  }
@@ -62764,7 +62787,7 @@ var Tr = function Tr(props) {
62764
62787
  if (_loop(i)) continue;
62765
62788
  }
62766
62789
  return tds;
62767
- };
62790
+ });
62768
62791
  var renderExpand = function renderExpand() {
62769
62792
  if (!props.expanded) return null;
62770
62793
  var expandCol = props.expandCol;
@@ -62880,9 +62903,10 @@ var Tr = function Tr(props) {
62880
62903
  return col.type === 'expand' || col.type === 'row-expand';
62881
62904
  });
62882
62905
  var renderRow = function renderRow(item, index) {
62906
+ var _props$rowEvents;
62883
62907
  var rowIndex = index + currentIndex;
62884
62908
  var originKey = getKey(props.keygen, item, rowIndex);
62885
- var trRenderKey = props.loader ? originKey : "".concat(originKey, "-").concat(rowIndex);
62909
+ var trRenderKey = props.loader || (_props$rowEvents = props.rowEvents) !== null && _props$rowEvents !== void 0 && _props$rowEvents.draggable ? originKey : "".concat(originKey, "-").concat(rowIndex);
62886
62910
  return /*#__PURE__*/(0,jsx_runtime.jsx)(tr, {
62887
62911
  originKey: originKey,
62888
62912
  row: rowData[index],
@@ -62922,7 +62946,8 @@ var Tr = function Tr(props) {
62922
62946
  bodyScrollWidth: props.bodyScrollWidth,
62923
62947
  resizeFlag: props.resizeFlag,
62924
62948
  treeCheckAll: props.treeCheckAll,
62925
- onCellClick: props.onCellClick
62949
+ onCellClick: props.onCellClick,
62950
+ shouldCellUpdate: props.shouldCellUpdate
62926
62951
  }, trRenderKey);
62927
62952
  };
62928
62953
  return /*#__PURE__*/(0,jsx_runtime.jsx)("tbody", {
@@ -63336,7 +63361,8 @@ var emptyRef = {
63336
63361
  bodyScrollWidth: scrollWidth,
63337
63362
  resizeFlag: resizeFlag,
63338
63363
  treeCheckAll: props.treeCheckAll,
63339
- onCellClick: props.onCellClick
63364
+ onCellClick: props.onCellClick,
63365
+ shouldCellUpdate: props.shouldCellUpdate
63340
63366
  };
63341
63367
  var headCommonProps = {
63342
63368
  disabled: props.disabled,
@@ -69872,7 +69898,7 @@ var upload_interface = __webpack_require__(8821);
69872
69898
 
69873
69899
 
69874
69900
  /* harmony default export */ var src_0 = ({
69875
- version: '3.7.0-beta.4'
69901
+ version: '3.7.0-beta.5'
69876
69902
  });
69877
69903
  }();
69878
69904
  /******/ return __webpack_exports__;