shineout 3.7.0-beta.13 → 3.7.0-beta.15
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 +1 -1
- package/dist/shineout.js +33 -39
- package/dist/shineout.js.map +1 -1
- package/dist/shineout.min.js +1 -1
- package/dist/shineout.min.js.map +1 -1
- package/esm/index.js +1 -1
- package/package.json +5 -5
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.
|
|
517
|
+
version: '3.7.0-beta.15'
|
|
518
518
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -12217,7 +12217,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
12217
12217
|
};
|
|
12218
12218
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
12219
12219
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
12220
|
-
/* harmony default export */ var version = ('3.7.0-beta.
|
|
12220
|
+
/* harmony default export */ var version = ('3.7.0-beta.15');
|
|
12221
12221
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
12222
12222
|
|
|
12223
12223
|
|
|
@@ -21765,9 +21765,6 @@ var modalStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
21765
21765
|
height: '100vh',
|
|
21766
21766
|
width: '100vw',
|
|
21767
21767
|
overflow: 'auto'
|
|
21768
|
-
},
|
|
21769
|
-
'& $body': {
|
|
21770
|
-
minHeight: 'auto'
|
|
21771
21768
|
}
|
|
21772
21769
|
},
|
|
21773
21770
|
wrapperZoom: {
|
|
@@ -25877,6 +25874,11 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
25877
25874
|
background: 'transparent'
|
|
25878
25875
|
}))
|
|
25879
25876
|
},
|
|
25877
|
+
scrollX: {
|
|
25878
|
+
'&$headWrapper, &$footWrapper': {
|
|
25879
|
+
overflowX: 'hidden'
|
|
25880
|
+
}
|
|
25881
|
+
},
|
|
25880
25882
|
emptyWrapper: {
|
|
25881
25883
|
minHeight: '170px',
|
|
25882
25884
|
width: '100%',
|
|
@@ -62723,7 +62725,7 @@ var useTableRow = function useTableRow(props) {
|
|
|
62723
62725
|
/* harmony default export */ var use_table_row = (useTableRow);
|
|
62724
62726
|
;// CONCATENATED MODULE: ../hooks/src/common/use-component-memo/use-memo.ts
|
|
62725
62727
|
|
|
62726
|
-
function
|
|
62728
|
+
function useComponentMemo(getValue, condition, shouldUpdate) {
|
|
62727
62729
|
var cacheRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({});
|
|
62728
62730
|
if (!shouldUpdate) return getValue();
|
|
62729
62731
|
if (!('value' in cacheRef.current) || shouldUpdate(cacheRef.current.condition, condition)) {
|
|
@@ -62737,8 +62739,6 @@ function useMemo(getValue, condition, shouldUpdate) {
|
|
|
62737
62739
|
|
|
62738
62740
|
|
|
62739
62741
|
|
|
62740
|
-
|
|
62741
|
-
|
|
62742
62742
|
function Td(props) {
|
|
62743
62743
|
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(),
|
|
62744
62744
|
_React$useState2 = slicedToArray_default()(_React$useState, 2),
|
|
@@ -62762,9 +62762,7 @@ function Td(props) {
|
|
|
62762
62762
|
onMouseEnter = props.onMouseEnter,
|
|
62763
62763
|
onMouseLeave = props.onMouseLeave,
|
|
62764
62764
|
renderContent = props.renderContent;
|
|
62765
|
-
var
|
|
62766
|
-
var updateFn = typeof_default()(props.shouldCellUpdate) === 'object' && 'update' in props.shouldCellUpdate ? props.shouldCellUpdate.update : props.shouldCellUpdate;
|
|
62767
|
-
var $td = useMemo(function () {
|
|
62765
|
+
var $td = useComponentMemo(function () {
|
|
62768
62766
|
var content = renderContent(props.col, props.data);
|
|
62769
62767
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("td", {
|
|
62770
62768
|
colSpan: colSpan,
|
|
@@ -62778,16 +62776,13 @@ function Td(props) {
|
|
|
62778
62776
|
onClick: onClick,
|
|
62779
62777
|
children: content
|
|
62780
62778
|
}, col.key);
|
|
62781
|
-
}, [data, className, style, col.type, col.treeColumnsName]
|
|
62779
|
+
}, [data, className, style, col.type, col.treeColumnsName], props.virtual === 'lazy' ? function (prev, next) {
|
|
62782
62780
|
if (col.type || col.treeColumnsName) {
|
|
62783
62781
|
return true;
|
|
62784
62782
|
}
|
|
62785
62783
|
return prev.some(function (_, index) {
|
|
62786
|
-
|
|
62787
|
-
|
|
62788
|
-
}
|
|
62789
|
-
return !shallowEqual(prev[index], next[index]);
|
|
62790
|
-
});
|
|
62784
|
+
return !shallowEqual(prev === null || prev === void 0 ? void 0 : prev[index], next === null || next === void 0 ? void 0 : next[index]);
|
|
62785
|
+
}) || !props.scrolling;
|
|
62791
62786
|
} : undefined);
|
|
62792
62787
|
return $td;
|
|
62793
62788
|
}
|
|
@@ -63075,8 +63070,9 @@ var Tr = function Tr(props) {
|
|
|
63075
63070
|
onClick: props.onCellClick ? function () {
|
|
63076
63071
|
return handleCellClick(data[i].data, i);
|
|
63077
63072
|
} : undefined,
|
|
63078
|
-
|
|
63079
|
-
|
|
63073
|
+
renderContent: renderContent,
|
|
63074
|
+
virtual: props.virtual,
|
|
63075
|
+
scrolling: props.scrolling
|
|
63080
63076
|
}, "".concat(col.key, "-").concat(props.rowIndex, "-").concat(i));
|
|
63081
63077
|
tds.push(td);
|
|
63082
63078
|
if (data[i].colSpan) skip = data[i].colSpan - 1;
|
|
@@ -63174,8 +63170,6 @@ var Tr = function Tr(props) {
|
|
|
63174
63170
|
|
|
63175
63171
|
|
|
63176
63172
|
|
|
63177
|
-
|
|
63178
|
-
|
|
63179
63173
|
/* harmony default export */ var tbody = (function (props) {
|
|
63180
63174
|
var _props$columns = props.columns,
|
|
63181
63175
|
columns = _props$columns === void 0 ? [] : _props$columns,
|
|
@@ -63248,25 +63242,19 @@ var Tr = function Tr(props) {
|
|
|
63248
63242
|
resizeFlag: props.resizeFlag,
|
|
63249
63243
|
treeCheckAll: props.treeCheckAll,
|
|
63250
63244
|
onCellClick: props.onCellClick,
|
|
63251
|
-
|
|
63245
|
+
virtual: props.virtual,
|
|
63246
|
+
scrolling: props.scrolling
|
|
63252
63247
|
}, trRenderKey);
|
|
63253
63248
|
};
|
|
63254
|
-
var
|
|
63255
|
-
var updateFn = typeof_default()(props.shouldCellUpdate) === 'object' && 'update' in props.shouldCellUpdate ? props.shouldCellUpdate.update : props.shouldCellUpdate;
|
|
63256
|
-
var $tbody = useMemo(function () {
|
|
63249
|
+
var $tbody = useComponentMemo(function () {
|
|
63257
63250
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("tbody", {
|
|
63258
63251
|
children: (props.data || []).map(function (item, index) {
|
|
63259
63252
|
return renderRow(item, index);
|
|
63260
63253
|
})
|
|
63261
63254
|
});
|
|
63262
|
-
}, [props.data, currentIndex]
|
|
63255
|
+
}, [props.data, currentIndex], props.virtual === 'lazy' ? function (prev, next) {
|
|
63263
63256
|
return prev.some(function (_, index) {
|
|
63264
|
-
|
|
63265
|
-
return prev[index].some(function (item, idx) {
|
|
63266
|
-
return updateFn(item, next[index][idx]);
|
|
63267
|
-
});
|
|
63268
|
-
}
|
|
63269
|
-
return !shallowEqual(prev[index], next[index]);
|
|
63257
|
+
return !shallowEqual(prev === null || prev === void 0 ? void 0 : prev[index], next === null || next === void 0 ? void 0 : next[index]);
|
|
63270
63258
|
}) || !props.scrolling;
|
|
63271
63259
|
} : undefined);
|
|
63272
63260
|
return $tbody;
|
|
@@ -63589,7 +63577,13 @@ var emptyRef = {
|
|
|
63589
63577
|
});
|
|
63590
63578
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
63591
63579
|
var _theadRef$current, _tfootRef$current;
|
|
63592
|
-
|
|
63580
|
+
var theadHeight = (theadRef === null || theadRef === void 0 || (_theadRef$current = theadRef.current) === null || _theadRef$current === void 0 ? void 0 : _theadRef$current.clientHeight) || 0;
|
|
63581
|
+
var tfootHeight = ((_tfootRef$current = tfootRef.current) === null || _tfootRef$current === void 0 ? void 0 : _tfootRef$current.clientHeight) || 0;
|
|
63582
|
+
if (props.sticky) {
|
|
63583
|
+
context.theadAndTfootHeight = tfootHeight;
|
|
63584
|
+
} else {
|
|
63585
|
+
context.theadAndTfootHeight = theadHeight + tfootHeight;
|
|
63586
|
+
}
|
|
63593
63587
|
}, [theadRef.current, tfootRef.current]);
|
|
63594
63588
|
var virtualInfo = use_table_virtual({
|
|
63595
63589
|
disabled: !virtual,
|
|
@@ -63711,8 +63705,7 @@ var emptyRef = {
|
|
|
63711
63705
|
bodyScrollWidth: scrollWidth,
|
|
63712
63706
|
resizeFlag: resizeFlag,
|
|
63713
63707
|
treeCheckAll: props.treeCheckAll,
|
|
63714
|
-
onCellClick: props.onCellClick
|
|
63715
|
-
shouldCellUpdate: props.shouldCellUpdate
|
|
63708
|
+
onCellClick: props.onCellClick
|
|
63716
63709
|
};
|
|
63717
63710
|
var headCommonProps = {
|
|
63718
63711
|
disabled: props.disabled,
|
|
@@ -63755,7 +63748,7 @@ var emptyRef = {
|
|
|
63755
63748
|
parent: tableRef === null || tableRef === void 0 ? void 0 : tableRef.current
|
|
63756
63749
|
};
|
|
63757
63750
|
var isRenderVirtualTable = virtual || props.sticky || !((_props$data3 = props.data) !== null && _props$data3 !== void 0 && _props$data3.length);
|
|
63758
|
-
var headWrapperClass = classnames_default()(tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.headWrapper, props.sticky && isScrollY && tableClasses.scrollY);
|
|
63751
|
+
var headWrapperClass = classnames_default()(tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.headWrapper, props.sticky && isScrollY && tableClasses.scrollY, props.sticky && !isScrollY && tableClasses.scrollX);
|
|
63759
63752
|
var footWrapperClass = classnames_default()(tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.footWrapper);
|
|
63760
63753
|
var renderHeadMirrorScroller = function renderHeadMirrorScroller() {
|
|
63761
63754
|
var _scrollRef$current, _scrollRef$current2, _scrollRef$current3;
|
|
@@ -64114,7 +64107,8 @@ var TabsPanel = function TabsPanel(props) {
|
|
|
64114
64107
|
active = _useTabsContext.active,
|
|
64115
64108
|
lazy = _useTabsContext.lazy,
|
|
64116
64109
|
setTabs = _useTabsContext.setTabs,
|
|
64117
|
-
color = _useTabsContext.color
|
|
64110
|
+
color = _useTabsContext.color,
|
|
64111
|
+
shape = _useTabsContext.shape;
|
|
64118
64112
|
var isActive = active === id;
|
|
64119
64113
|
var keekAlive = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
|
|
64120
64114
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
|
|
@@ -64123,7 +64117,7 @@ var TabsPanel = function TabsPanel(props) {
|
|
|
64123
64117
|
tab: tab,
|
|
64124
64118
|
disabled: props.disabled,
|
|
64125
64119
|
jssStyle: jssStyle,
|
|
64126
|
-
background: background,
|
|
64120
|
+
background: shape !== 'button' && shape !== 'fill' ? background : undefined,
|
|
64127
64121
|
color: props.color || (active === id ? color : undefined)
|
|
64128
64122
|
};
|
|
64129
64123
|
setTabs(function (prev) {
|
|
@@ -64152,7 +64146,7 @@ var TabsPanel = function TabsPanel(props) {
|
|
|
64152
64146
|
});
|
|
64153
64147
|
});
|
|
64154
64148
|
};
|
|
64155
|
-
}, [id, tab, color, active, props.disabled, props.jssStyle]);
|
|
64149
|
+
}, [id, tab, color, active, shape, props.disabled, props.jssStyle]);
|
|
64156
64150
|
if (!isActive && lazy && !keekAlive.current) {
|
|
64157
64151
|
return null;
|
|
64158
64152
|
}
|
|
@@ -70377,7 +70371,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
70377
70371
|
|
|
70378
70372
|
|
|
70379
70373
|
/* harmony default export */ var src_0 = ({
|
|
70380
|
-
version: '3.7.0-beta.
|
|
70374
|
+
version: '3.7.0-beta.15'
|
|
70381
70375
|
});
|
|
70382
70376
|
}();
|
|
70383
70377
|
/******/ return __webpack_exports__;
|