shineout 3.7.0-beta.3 → 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 +1 -1
- package/dist/shineout.js +292 -112
- 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/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 =
|
|
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.
|
|
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
|
-
|
|
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: {
|
|
@@ -25527,19 +25534,9 @@ var switchStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
25527
25534
|
var useSwitchStyle = styled(src_switch_switch, 'switch');
|
|
25528
25535
|
|
|
25529
25536
|
/* harmony default export */ var shineout_style_src_switch = ((/* unused pure expression or super */ null && (useSwitchStyle)));
|
|
25530
|
-
;// CONCATENATED MODULE: ../shineout-style/src/mixin/custom-scrollbar.ts
|
|
25531
|
-
function customScrollBar(info) {
|
|
25532
|
-
return {
|
|
25533
|
-
'scrollbar-color': info.background,
|
|
25534
|
-
'&::-webkit-scrollbar': {
|
|
25535
|
-
background: info.background
|
|
25536
|
-
}
|
|
25537
|
-
};
|
|
25538
|
-
}
|
|
25539
25537
|
;// CONCATENATED MODULE: ../shineout-style/src/table/table.ts
|
|
25540
25538
|
|
|
25541
25539
|
|
|
25542
|
-
|
|
25543
25540
|
var cellBaseIndex = 4;
|
|
25544
25541
|
var fixedIndex = 6;
|
|
25545
25542
|
var resizeIndex = 8;
|
|
@@ -25734,13 +25731,22 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
25734
25731
|
zIndex: fixedIndex + 1
|
|
25735
25732
|
}
|
|
25736
25733
|
}
|
|
25734
|
+
},
|
|
25735
|
+
'$wrapper & table > tfoot': {
|
|
25736
|
+
position: 'sticky',
|
|
25737
|
+
bottom: 0,
|
|
25738
|
+
zIndex: fixedIndex
|
|
25737
25739
|
}
|
|
25738
25740
|
},
|
|
25739
25741
|
footWrapper: {
|
|
25740
25742
|
flex: '0 0 auto',
|
|
25741
|
-
// overflow: 'hidden',
|
|
25742
25743
|
boxSizing: 'border-box',
|
|
25743
|
-
background: src.tableTfootBackgroundColor
|
|
25744
|
+
background: src.tableTfootBackgroundColor,
|
|
25745
|
+
"[data-soui-role='scroll'] &": {
|
|
25746
|
+
position: 'sticky',
|
|
25747
|
+
bottom: 0,
|
|
25748
|
+
zIndex: fixedIndex + 1
|
|
25749
|
+
}
|
|
25744
25750
|
},
|
|
25745
25751
|
emptyWrapper: {
|
|
25746
25752
|
minHeight: '170px',
|
|
@@ -25749,18 +25755,13 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
25749
25755
|
position: 'sticky',
|
|
25750
25756
|
left: 0,
|
|
25751
25757
|
top: 0,
|
|
25752
|
-
right: 0,
|
|
25753
25758
|
justifyContent: 'center',
|
|
25754
25759
|
display: 'flex',
|
|
25755
25760
|
alignItems: 'center',
|
|
25756
25761
|
borderBottom: "1px solid ".concat(src.tableCellBorderColor)
|
|
25757
25762
|
},
|
|
25758
|
-
|
|
25759
|
-
|
|
25760
|
-
overflowY: 'scroll'
|
|
25761
|
-
}, customScrollBar({
|
|
25762
|
-
background: 'transparent'
|
|
25763
|
-
}))
|
|
25763
|
+
emptyNoBorder: {
|
|
25764
|
+
borderBottom: 'none'
|
|
25764
25765
|
},
|
|
25765
25766
|
cellFixedLeft: {
|
|
25766
25767
|
position: 'sticky'
|
|
@@ -28298,8 +28299,8 @@ var treeSelectStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
28298
28299
|
minWidth: 0,
|
|
28299
28300
|
position: 'relative',
|
|
28300
28301
|
outline: 'none',
|
|
28301
|
-
|
|
28302
|
-
'
|
|
28302
|
+
maxHeight: 78,
|
|
28303
|
+
overflow: 'auto'
|
|
28303
28304
|
},
|
|
28304
28305
|
result: {
|
|
28305
28306
|
display: 'flex',
|
|
@@ -28431,7 +28432,9 @@ var treeSelectStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
28431
28432
|
iconWrapper: {
|
|
28432
28433
|
display: 'flex',
|
|
28433
28434
|
alignItems: 'center',
|
|
28434
|
-
justifyContent: 'center'
|
|
28435
|
+
justifyContent: 'center',
|
|
28436
|
+
position: 'sticky',
|
|
28437
|
+
top: 0
|
|
28435
28438
|
},
|
|
28436
28439
|
clearable: {},
|
|
28437
28440
|
clearIcon: {
|
|
@@ -47468,6 +47471,7 @@ var Modal = function Modal(props) {
|
|
|
47468
47471
|
doc.style.paddingRight = "".concat(window.innerWidth - docSize.width, "px");
|
|
47469
47472
|
}
|
|
47470
47473
|
} else {
|
|
47474
|
+
if (!context.isMask) return;
|
|
47471
47475
|
doc.style.paddingRight = '';
|
|
47472
47476
|
doc.style.overflow = '';
|
|
47473
47477
|
}
|
|
@@ -47492,6 +47496,7 @@ var Modal = function Modal(props) {
|
|
|
47492
47496
|
hasMask = false;
|
|
47493
47497
|
}
|
|
47494
47498
|
{
|
|
47499
|
+
if (!context.isMask) return;
|
|
47495
47500
|
var doc = document.body.parentNode;
|
|
47496
47501
|
doc.style.paddingRight = '';
|
|
47497
47502
|
doc.style.overflow = '';
|
|
@@ -49694,12 +49699,10 @@ var useForm = function useForm(props) {
|
|
|
49694
49699
|
context.removeArr.delete(n);
|
|
49695
49700
|
if (df !== undefined && deepGet(context.value, n) === undefined) {
|
|
49696
49701
|
if (!context.mounted) context.defaultValues[n] = df;
|
|
49697
|
-
|
|
49698
|
-
|
|
49699
|
-
deepSet(v, n, df, deepSetOptions);
|
|
49700
|
-
});
|
|
49701
|
-
update(n);
|
|
49702
|
+
onChange(function (v) {
|
|
49703
|
+
deepSet(v, n, df, deepSetOptions);
|
|
49702
49704
|
});
|
|
49705
|
+
update(n);
|
|
49703
49706
|
}
|
|
49704
49707
|
},
|
|
49705
49708
|
unbind: function unbind(n, reserveAble, validateField, update) {
|
|
@@ -50527,7 +50530,7 @@ var FormFlow = function FormFlow(props) {
|
|
|
50527
50530
|
return datum === null || datum === void 0 ? void 0 : datum.get(name);
|
|
50528
50531
|
});
|
|
50529
50532
|
var memoizedResult = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
50530
|
-
if (!props.strict) return;
|
|
50533
|
+
if (!props.strict) return null;
|
|
50531
50534
|
if (isFunc(props.children)) {
|
|
50532
50535
|
return props.children(datum);
|
|
50533
50536
|
}
|
|
@@ -59964,6 +59967,12 @@ var Sticky = function Sticky(props) {
|
|
|
59964
59967
|
}
|
|
59965
59968
|
return cancelParentObserver;
|
|
59966
59969
|
}, [props.parent, css, context.target, top, bottom]);
|
|
59970
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
59971
|
+
if (props.onChange) {
|
|
59972
|
+
props.onChange(show);
|
|
59973
|
+
}
|
|
59974
|
+
;
|
|
59975
|
+
}, [show]);
|
|
59967
59976
|
|
|
59968
59977
|
// 纯css方法 直接使用css
|
|
59969
59978
|
// js方法
|
|
@@ -60134,6 +60143,147 @@ var BaseSwitch = function BaseSwitch(props) {
|
|
|
60134
60143
|
var SwitchComp = src_switch_switch_0;
|
|
60135
60144
|
SwitchComp.displayName = 'ShineoutSwitch';
|
|
60136
60145
|
/* harmony default export */ var src_switch_0 = (SwitchComp);
|
|
60146
|
+
;// CONCATENATED MODULE: ../base/src/virtual-scroll/scroll-table.tsx
|
|
60147
|
+
|
|
60148
|
+
|
|
60149
|
+
|
|
60150
|
+
|
|
60151
|
+
|
|
60152
|
+
|
|
60153
|
+
var extractHeightValue = function extractHeightValue(num) {
|
|
60154
|
+
if (isNumber(num)) return num;
|
|
60155
|
+
var match = num.match(/(\d+)/);
|
|
60156
|
+
if (match) {
|
|
60157
|
+
return parseInt(match[0], 10);
|
|
60158
|
+
}
|
|
60159
|
+
return undefined;
|
|
60160
|
+
};
|
|
60161
|
+
var scroll_table_Scroll = function Scroll(props) {
|
|
60162
|
+
var containerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
60163
|
+
var scrollRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
60164
|
+
var wrapperRef = useForkRef(scrollRef, props.wrapperRef);
|
|
60165
|
+
var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
|
|
60166
|
+
timer: null,
|
|
60167
|
+
isMouseDown: false
|
|
60168
|
+
}),
|
|
60169
|
+
context = _useRef.current;
|
|
60170
|
+
// TODO: keepScrollTop考虑做成Table的新feat?
|
|
60171
|
+
var _props$scrollHeight = props.scrollHeight,
|
|
60172
|
+
scrollHeight = _props$scrollHeight === void 0 ? 0 : _props$scrollHeight,
|
|
60173
|
+
_props$scrollWidth = props.scrollWidth,
|
|
60174
|
+
scrollWidth = _props$scrollWidth === void 0 ? 0 : _props$scrollWidth,
|
|
60175
|
+
_props$defaultHeight = props.defaultHeight,
|
|
60176
|
+
defaultHeight = _props$defaultHeight === void 0 ? 0 : _props$defaultHeight,
|
|
60177
|
+
_props$keepScrollTop = props.keepScrollTop,
|
|
60178
|
+
keepScrollTop = _props$keepScrollTop === void 0 ? false : _props$keepScrollTop;
|
|
60179
|
+
var _useResize = useResize({
|
|
60180
|
+
targetRef: containerRef,
|
|
60181
|
+
timer: 100
|
|
60182
|
+
}),
|
|
60183
|
+
width = _useResize.width,
|
|
60184
|
+
h = _useResize.height;
|
|
60185
|
+
var height = h || defaultHeight;
|
|
60186
|
+
var config = useConfig();
|
|
60187
|
+
var isRtl = config.direction === 'rtl';
|
|
60188
|
+
var scrollerStyle = {
|
|
60189
|
+
flex: 1,
|
|
60190
|
+
minWidth: 0,
|
|
60191
|
+
minHeight: 0,
|
|
60192
|
+
overflow: props.isEmptyContent ? 'hidden' : 'auto',
|
|
60193
|
+
width: '100%'
|
|
60194
|
+
};
|
|
60195
|
+
var containerStyle = {
|
|
60196
|
+
height: '100%',
|
|
60197
|
+
width: '100%',
|
|
60198
|
+
display: 'flex',
|
|
60199
|
+
position: 'sticky',
|
|
60200
|
+
flexDirection: 'column',
|
|
60201
|
+
top: 0,
|
|
60202
|
+
overflow: props.isEmptyContent ? 'auto' : undefined
|
|
60203
|
+
};
|
|
60204
|
+
|
|
60205
|
+
// 当滚动容器的高度为 0 时,paddingTop 为 0,避免滚动条抖动现象
|
|
60206
|
+
var paddingTop = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
60207
|
+
if (keepScrollTop) return Math.max(0, Math.floor(scrollHeight - height));
|
|
60208
|
+
return height === 0 ? 0 : Math.max(0, Math.floor(scrollHeight - height));
|
|
60209
|
+
}, [scrollHeight, height]);
|
|
60210
|
+
var placeStyle = {
|
|
60211
|
+
paddingTop: paddingTop,
|
|
60212
|
+
width: scrollWidth,
|
|
60213
|
+
overflow: props.isScrollY ? 'hidden' : 'auto hidden',
|
|
60214
|
+
height: props.isScrollY ? 0 : 1,
|
|
60215
|
+
marginTop: props.isScrollY ? 0 : -1,
|
|
60216
|
+
lineHeight: 0
|
|
60217
|
+
};
|
|
60218
|
+
var handleScroll = usePersistFn(function (e) {
|
|
60219
|
+
var onScrollToBottom = props.onScrollToBottom;
|
|
60220
|
+
var target = e.currentTarget;
|
|
60221
|
+
var scrollLeft = target.scrollLeft,
|
|
60222
|
+
scrollTop = target.scrollTop;
|
|
60223
|
+
if (props.height && onScrollToBottom) {
|
|
60224
|
+
var realHeight = extractHeightValue(props.height);
|
|
60225
|
+
if (realHeight !== undefined) {
|
|
60226
|
+
var touchBottom = target.scrollHeight === scrollTop + realHeight;
|
|
60227
|
+
if (touchBottom) onScrollToBottom();
|
|
60228
|
+
}
|
|
60229
|
+
}
|
|
60230
|
+
var maxY = target.scrollHeight - target.clientHeight;
|
|
60231
|
+
var maxX = target.scrollWidth - target.clientWidth;
|
|
60232
|
+
if (!isRtl) {
|
|
60233
|
+
// 解决浏览器缩放以后导致滚动条长度出现小数
|
|
60234
|
+
if (maxX - scrollLeft < 0 || maxX - scrollLeft < 1) scrollLeft = maxX;
|
|
60235
|
+
if (scrollLeft < 0) scrollLeft = 0;
|
|
60236
|
+
} else {
|
|
60237
|
+
if (maxX + scrollLeft < 0 || maxX + scrollLeft < 1) scrollLeft = 0 - maxX;
|
|
60238
|
+
if (scrollLeft > 0) scrollLeft = 0;
|
|
60239
|
+
}
|
|
60240
|
+
if (scrollTop > maxY || maxY - scrollTop < 1) scrollTop = maxY;
|
|
60241
|
+
if (scrollTop < 0) scrollTop = 0;
|
|
60242
|
+
var x = maxX === 0 ? 0 : Math.min(Math.abs(scrollLeft) / maxX, 1);
|
|
60243
|
+
var y = maxY === 0 ? 0 : Math.min(scrollTop / maxY, 1);
|
|
60244
|
+
if (props.onScroll) props.onScroll({
|
|
60245
|
+
scrollLeft: scrollLeft,
|
|
60246
|
+
scrollTop: scrollTop,
|
|
60247
|
+
x: x,
|
|
60248
|
+
y: y,
|
|
60249
|
+
height: height,
|
|
60250
|
+
width: width,
|
|
60251
|
+
fromDrag: context.isMouseDown
|
|
60252
|
+
});
|
|
60253
|
+
});
|
|
60254
|
+
var handleInnerScroll = usePersistFn(function (e) {
|
|
60255
|
+
var scrollTop = e.currentTarget.scrollTop;
|
|
60256
|
+
if (scrollRef.current) {
|
|
60257
|
+
e.currentTarget.scrollTop = 0;
|
|
60258
|
+
scrollRef.current.scrollTop += scrollTop;
|
|
60259
|
+
}
|
|
60260
|
+
});
|
|
60261
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({}, getDataAttribute({
|
|
60262
|
+
role: 'scroll'
|
|
60263
|
+
})), {}, {
|
|
60264
|
+
style: scrollerStyle,
|
|
60265
|
+
onScroll: handleScroll,
|
|
60266
|
+
ref: wrapperRef,
|
|
60267
|
+
onMouseDown: function onMouseDown() {
|
|
60268
|
+
context.isMouseDown = true;
|
|
60269
|
+
},
|
|
60270
|
+
onMouseUp: function onMouseUp() {
|
|
60271
|
+
context.isMouseDown = false;
|
|
60272
|
+
},
|
|
60273
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", objectSpread2_default()(objectSpread2_default()({}, getDataAttribute({
|
|
60274
|
+
role: 'scroll-container'
|
|
60275
|
+
})), {}, {
|
|
60276
|
+
style: containerStyle,
|
|
60277
|
+
ref: containerRef,
|
|
60278
|
+
onScroll: handleInnerScroll,
|
|
60279
|
+
children: props.children
|
|
60280
|
+
})), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
60281
|
+
style: placeStyle,
|
|
60282
|
+
children: "\xA0"
|
|
60283
|
+
})]
|
|
60284
|
+
}));
|
|
60285
|
+
};
|
|
60286
|
+
/* harmony default export */ var scroll_table = (scroll_table_Scroll);
|
|
60137
60287
|
;// CONCATENATED MODULE: ../hooks/src/common/use-scrollbar-width/index.ts
|
|
60138
60288
|
|
|
60139
60289
|
|
|
@@ -60264,6 +60414,34 @@ var useColumns = function useColumns(props) {
|
|
|
60264
60414
|
|
|
60265
60415
|
|
|
60266
60416
|
|
|
60417
|
+
function getDecimalAndIntegerPart(num) {
|
|
60418
|
+
if (!num) return [0, 0];
|
|
60419
|
+
var str = num.toString();
|
|
60420
|
+
var dotIndex = str.indexOf('.');
|
|
60421
|
+
if (dotIndex === -1) return [parseInt(str), 0];
|
|
60422
|
+
var integerPart = parseInt(str.slice(0, dotIndex));
|
|
60423
|
+
var decimalPart = parseFloat("0.".concat(str.slice(dotIndex + 1)));
|
|
60424
|
+
return [integerPart, decimalPart];
|
|
60425
|
+
}
|
|
60426
|
+
|
|
60427
|
+
// 将所有的小数部分转移到最后一列
|
|
60428
|
+
function shiftDecimalToLastColumn(cols) {
|
|
60429
|
+
var decimalSum = 0;
|
|
60430
|
+
cols.forEach(function (v, i) {
|
|
60431
|
+
var _getDecimalAndInteger = getDecimalAndIntegerPart(v),
|
|
60432
|
+
_getDecimalAndInteger2 = slicedToArray_default()(_getDecimalAndInteger, 2),
|
|
60433
|
+
inter = _getDecimalAndInteger2[0],
|
|
60434
|
+
decimal = _getDecimalAndInteger2[1];
|
|
60435
|
+
if (decimal > 0) {
|
|
60436
|
+
decimalSum += decimal;
|
|
60437
|
+
cols[i] = inter;
|
|
60438
|
+
}
|
|
60439
|
+
});
|
|
60440
|
+
if (decimalSum > 0) {
|
|
60441
|
+
cols[cols.length - 1] = Number(cols[cols.length - 1]) + decimalSum;
|
|
60442
|
+
}
|
|
60443
|
+
return cols;
|
|
60444
|
+
}
|
|
60267
60445
|
var MIN_RESIZABLE_WIDTH = 20;
|
|
60268
60446
|
function compareColumnWidth(curCols, preCols) {
|
|
60269
60447
|
if (curCols.length !== preCols.length) return false;
|
|
@@ -60385,7 +60563,7 @@ var useTableLayout = function useTableLayout(props) {
|
|
|
60385
60563
|
if (cols && cols.every(function (v) {
|
|
60386
60564
|
return v === 0;
|
|
60387
60565
|
})) return;
|
|
60388
|
-
setColgroup(cols);
|
|
60566
|
+
setColgroup(shiftDecimalToLastColumn(cols));
|
|
60389
60567
|
setAdjust(adjust);
|
|
60390
60568
|
if (!adjust) {
|
|
60391
60569
|
updateResizeFlag();
|
|
@@ -60970,7 +61148,7 @@ var useTableVirtual = function useTableVirtual(props) {
|
|
|
60970
61148
|
for (var i = 0; i <= index; i++) {
|
|
60971
61149
|
sum += context.cachedHeight[i] || props.rowHeight;
|
|
60972
61150
|
}
|
|
60973
|
-
return sum;
|
|
61151
|
+
return sum + props.theadAndTfootHeight;
|
|
60974
61152
|
};
|
|
60975
61153
|
var setRowHeight = usePersistFn(function (index, height) {
|
|
60976
61154
|
if (props.disabled) return;
|
|
@@ -61190,7 +61368,7 @@ var useTableVirtual = function useTableVirtual(props) {
|
|
|
61190
61368
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
61191
61369
|
if (props.disabled) return;
|
|
61192
61370
|
setHeight(getContentHeight(props.data.length - 1));
|
|
61193
|
-
}, [props.data.length]);
|
|
61371
|
+
}, [props.data.length, props.theadAndTfootHeight]);
|
|
61194
61372
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
61195
61373
|
if (props.disabled) return;
|
|
61196
61374
|
if (context.heightCallback) {
|
|
@@ -61964,13 +62142,17 @@ var thead_toNum = toNum;
|
|
|
61964
62142
|
});
|
|
61965
62143
|
};
|
|
61966
62144
|
var getFixedStyle = function getFixedStyle(fixed, index, colSpan, level) {
|
|
62145
|
+
// 累加level 至 0 的所有高度
|
|
62146
|
+
var top = context.trHeights.slice(0, level).reduce(function (a, b) {
|
|
62147
|
+
return thead_toNum(a) + thead_toNum(b);
|
|
62148
|
+
}, 0);
|
|
61967
62149
|
if (fixed === 'left') {
|
|
61968
62150
|
var left = colgroup.slice(0, index).reduce(function (a, b) {
|
|
61969
62151
|
return thead_toNum(a) + thead_toNum(b);
|
|
61970
62152
|
}, 0);
|
|
61971
62153
|
return {
|
|
61972
62154
|
left: left,
|
|
61973
|
-
top:
|
|
62155
|
+
top: top,
|
|
61974
62156
|
position: 'sticky'
|
|
61975
62157
|
};
|
|
61976
62158
|
}
|
|
@@ -61980,12 +62162,12 @@ var thead_toNum = toNum;
|
|
|
61980
62162
|
}, 0);
|
|
61981
62163
|
return {
|
|
61982
62164
|
right: right,
|
|
61983
|
-
top:
|
|
62165
|
+
top: top,
|
|
61984
62166
|
position: 'sticky'
|
|
61985
62167
|
};
|
|
61986
62168
|
}
|
|
61987
62169
|
return {
|
|
61988
|
-
top:
|
|
62170
|
+
top: top,
|
|
61989
62171
|
position: 'sticky'
|
|
61990
62172
|
};
|
|
61991
62173
|
};
|
|
@@ -62202,16 +62384,6 @@ var useTableRow = function useTableRow(props) {
|
|
|
62202
62384
|
}
|
|
62203
62385
|
setHoverIndex(hoverIndex);
|
|
62204
62386
|
});
|
|
62205
|
-
var isCellHover = usePersistFn(function (rowIndex) {
|
|
62206
|
-
var colSpan = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
62207
|
-
if (!props.hover) return false;
|
|
62208
|
-
var isHover = false;
|
|
62209
|
-
for (var i = 0; i < colSpan; i++) {
|
|
62210
|
-
isHover = hoverIndex.has(rowIndex + i);
|
|
62211
|
-
if (isHover) break;
|
|
62212
|
-
}
|
|
62213
|
-
return isHover;
|
|
62214
|
-
});
|
|
62215
62387
|
var rowData = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
62216
62388
|
var rows = [];
|
|
62217
62389
|
context.rowSelectMergeStartData = [];
|
|
@@ -62245,7 +62417,6 @@ var useTableRow = function useTableRow(props) {
|
|
|
62245
62417
|
return {
|
|
62246
62418
|
rowData: rowData,
|
|
62247
62419
|
handleCellHover: handleCellHover,
|
|
62248
|
-
isCellHover: isCellHover,
|
|
62249
62420
|
hoverIndex: hoverIndex,
|
|
62250
62421
|
rowSelectMergeStartData: context.rowSelectMergeStartData
|
|
62251
62422
|
};
|
|
@@ -62268,20 +62439,31 @@ function useMemo(getValue, condition, shouldUpdate) {
|
|
|
62268
62439
|
|
|
62269
62440
|
|
|
62270
62441
|
|
|
62442
|
+
|
|
62271
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]);
|
|
62272
62455
|
var col = props.col,
|
|
62273
62456
|
colSpan = props.colSpan,
|
|
62274
62457
|
rowSpan = props.rowSpan,
|
|
62275
62458
|
className = props.className,
|
|
62276
|
-
style = props.style,
|
|
62277
62459
|
direction = props.direction,
|
|
62278
62460
|
role = props.role,
|
|
62279
62461
|
onClick = props.onClick,
|
|
62280
62462
|
onMouseEnter = props.onMouseEnter,
|
|
62281
62463
|
onMouseLeave = props.onMouseLeave,
|
|
62282
62464
|
renderContent = props.renderContent;
|
|
62283
|
-
var externalDependencies = typeof_default()(props.
|
|
62284
|
-
var updateFn = typeof_default()(props.
|
|
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;
|
|
62285
62467
|
var $td = useMemo(function () {
|
|
62286
62468
|
var content = renderContent(props.col, props.data);
|
|
62287
62469
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("td", {
|
|
@@ -62359,13 +62541,14 @@ var Tr = function Tr(props) {
|
|
|
62359
62541
|
right: right
|
|
62360
62542
|
};
|
|
62361
62543
|
}
|
|
62362
|
-
return
|
|
62544
|
+
return undefined;
|
|
62363
62545
|
};
|
|
62364
|
-
var getTdStyle = function
|
|
62546
|
+
var getTdStyle = usePersistFn(function (column, colSpan) {
|
|
62365
62547
|
var index = column.index;
|
|
62366
62548
|
var fixedStyle = getFixedStyle(column.fixed, index, colSpan);
|
|
62549
|
+
if (!fixedStyle && !column.style) return;
|
|
62367
62550
|
return objectSpread2_default()(objectSpread2_default()({}, column.style), fixedStyle);
|
|
62368
|
-
};
|
|
62551
|
+
});
|
|
62369
62552
|
var handleCellClick = usePersistFn(function (data, colIndex) {
|
|
62370
62553
|
if (!props.onCellClick) return;
|
|
62371
62554
|
props.onCellClick(data, {
|
|
@@ -62428,7 +62611,7 @@ var Tr = function Tr(props) {
|
|
|
62428
62611
|
return _ref.apply(this, arguments);
|
|
62429
62612
|
};
|
|
62430
62613
|
}());
|
|
62431
|
-
var renderTreeExpand = function
|
|
62614
|
+
var renderTreeExpand = usePersistFn(function (content) {
|
|
62432
62615
|
var treeIndent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 22;
|
|
62433
62616
|
var level = props.treeExpandLevel.get(props.originKey) || 0;
|
|
62434
62617
|
var className = tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.expandWrapper;
|
|
@@ -62481,8 +62664,8 @@ var Tr = function Tr(props) {
|
|
|
62481
62664
|
},
|
|
62482
62665
|
children: [$expandIconWrapper, content]
|
|
62483
62666
|
});
|
|
62484
|
-
};
|
|
62485
|
-
var renderContent = function
|
|
62667
|
+
});
|
|
62668
|
+
var renderContent = usePersistFn(function (col, data) {
|
|
62486
62669
|
if (col.type === 'expand' || col.type === 'row-expand') {
|
|
62487
62670
|
var renderResult = typeof col.render === 'function' ? col.render(props.rawData, props.rowIndex) : undefined;
|
|
62488
62671
|
if (typeof renderResult !== 'function') return null;
|
|
@@ -62548,8 +62731,8 @@ var Tr = function Tr(props) {
|
|
|
62548
62731
|
return renderTreeExpand(content, col.treeIndent);
|
|
62549
62732
|
}
|
|
62550
62733
|
return content;
|
|
62551
|
-
};
|
|
62552
|
-
var renderTds = function
|
|
62734
|
+
});
|
|
62735
|
+
var renderTds = usePersistFn(function (cols, data) {
|
|
62553
62736
|
var tds = [];
|
|
62554
62737
|
var skip = 0;
|
|
62555
62738
|
var lastRowIndex = data.length - 1;
|
|
@@ -62565,27 +62748,37 @@ var Tr = function Tr(props) {
|
|
|
62565
62748
|
if (data[i]) {
|
|
62566
62749
|
var last = cols[i + (data[i].colSpan || 1) - 1] || {};
|
|
62567
62750
|
var isRowSpanTd = data[i].rowSpan > 1;
|
|
62751
|
+
var shouldBindMouseEvent = props.hover && hasSiblingRowSpan || isRowSpanTd;
|
|
62752
|
+
var showCellHover = props.hoverIndex.has(props.rowIndex);
|
|
62753
|
+
if (!showCellHover && data[i].rowSpan > 1) {
|
|
62754
|
+
for (var j = 0; j < data[i].rowSpan; j++) {
|
|
62755
|
+
if (props.hoverIndex.has(props.rowIndex + j)) {
|
|
62756
|
+
showCellHover = true;
|
|
62757
|
+
break;
|
|
62758
|
+
}
|
|
62759
|
+
}
|
|
62760
|
+
}
|
|
62568
62761
|
var td = /*#__PURE__*/(0,jsx_runtime.jsx)(Td, {
|
|
62569
62762
|
col: col,
|
|
62570
62763
|
data: data[i].data,
|
|
62571
62764
|
colSpan: data[i].colSpan,
|
|
62572
62765
|
rowSpan: data[i].rowSpan,
|
|
62573
|
-
onMouseEnter:
|
|
62574
|
-
props.handleCellHover(props.rowIndex, data[i].rowSpan);
|
|
62766
|
+
onMouseEnter: shouldBindMouseEvent ? function () {
|
|
62767
|
+
return props.handleCellHover(props.rowIndex, data[i].rowSpan);
|
|
62575
62768
|
} : undefined,
|
|
62576
|
-
onMouseLeave:
|
|
62577
|
-
props.handleCellHover(-1, 0);
|
|
62769
|
+
onMouseLeave: shouldBindMouseEvent ? function () {
|
|
62770
|
+
return props.handleCellHover(-1, 0);
|
|
62578
62771
|
} : undefined,
|
|
62579
|
-
className: classnames_default()(col.className, col.type === 'checkbox' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellCheckbox), col.fixed === 'left' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellFixedLeft), col.fixed === 'right' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellFixedRight), col.align === 'center' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellAlignCenter), col.align === 'right' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellAlignRight), (col.lastFixed || col.firstFixed || last.lastFixed) && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellFixedLast), lastRowIndex === i && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellIgnoreBorder),
|
|
62772
|
+
className: classnames_default()(col.className, col.type === 'checkbox' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellCheckbox), col.fixed === 'left' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellFixedLeft), col.fixed === 'right' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellFixedRight), col.align === 'center' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellAlignCenter), col.align === 'right' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellAlignRight), (col.lastFixed || col.firstFixed || last.lastFixed) && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellFixedLast), lastRowIndex === i && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellIgnoreBorder), showCellHover && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellHover)),
|
|
62580
62773
|
style: getTdStyle(col, data[i].colSpan),
|
|
62581
62774
|
direction: config.direction,
|
|
62582
62775
|
"data-role": col.type === 'checkbox' ? 'checkbox' : undefined,
|
|
62583
62776
|
onClick: props.onCellClick ? function () {
|
|
62584
62777
|
return handleCellClick(data[i].data, i);
|
|
62585
62778
|
} : undefined,
|
|
62586
|
-
|
|
62779
|
+
shouldCellUpdate: col.shouldCellUpdate || props.shouldCellUpdate,
|
|
62587
62780
|
renderContent: renderContent
|
|
62588
|
-
});
|
|
62781
|
+
}, "".concat(col.key, "-").concat(props.rowIndex, "-").concat(i));
|
|
62589
62782
|
tds.push(td);
|
|
62590
62783
|
if (data[i].colSpan) skip = data[i].colSpan - 1;
|
|
62591
62784
|
}
|
|
@@ -62594,7 +62787,7 @@ var Tr = function Tr(props) {
|
|
|
62594
62787
|
if (_loop(i)) continue;
|
|
62595
62788
|
}
|
|
62596
62789
|
return tds;
|
|
62597
|
-
};
|
|
62790
|
+
});
|
|
62598
62791
|
var renderExpand = function renderExpand() {
|
|
62599
62792
|
if (!props.expanded) return null;
|
|
62600
62793
|
var expandCol = props.expandCol;
|
|
@@ -62703,7 +62896,6 @@ var Tr = function Tr(props) {
|
|
|
62703
62896
|
hover: hover
|
|
62704
62897
|
}),
|
|
62705
62898
|
rowData = _useTableRow.rowData,
|
|
62706
|
-
isCellHover = _useTableRow.isCellHover,
|
|
62707
62899
|
handleCellHover = _useTableRow.handleCellHover,
|
|
62708
62900
|
hoverIndex = _useTableRow.hoverIndex,
|
|
62709
62901
|
rowSelectMergeStartData = _useTableRow.rowSelectMergeStartData;
|
|
@@ -62711,9 +62903,10 @@ var Tr = function Tr(props) {
|
|
|
62711
62903
|
return col.type === 'expand' || col.type === 'row-expand';
|
|
62712
62904
|
});
|
|
62713
62905
|
var renderRow = function renderRow(item, index) {
|
|
62906
|
+
var _props$rowEvents;
|
|
62714
62907
|
var rowIndex = index + currentIndex;
|
|
62715
62908
|
var originKey = getKey(props.keygen, item, rowIndex);
|
|
62716
|
-
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);
|
|
62717
62910
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tr, {
|
|
62718
62911
|
originKey: originKey,
|
|
62719
62912
|
row: rowData[index],
|
|
@@ -62740,7 +62933,6 @@ var Tr = function Tr(props) {
|
|
|
62740
62933
|
setRowHeight: props.setRowHeight,
|
|
62741
62934
|
striped: props.striped,
|
|
62742
62935
|
radio: props.radio,
|
|
62743
|
-
isCellHover: isCellHover,
|
|
62744
62936
|
hover: hover,
|
|
62745
62937
|
isSelect: props.datum.check(rowSelectMergeStartData[index]),
|
|
62746
62938
|
handleCellHover: handleCellHover
|
|
@@ -62754,7 +62946,8 @@ var Tr = function Tr(props) {
|
|
|
62754
62946
|
bodyScrollWidth: props.bodyScrollWidth,
|
|
62755
62947
|
resizeFlag: props.resizeFlag,
|
|
62756
62948
|
treeCheckAll: props.treeCheckAll,
|
|
62757
|
-
onCellClick: props.onCellClick
|
|
62949
|
+
onCellClick: props.onCellClick,
|
|
62950
|
+
shouldCellUpdate: props.shouldCellUpdate
|
|
62758
62951
|
}, trRenderKey);
|
|
62759
62952
|
};
|
|
62760
62953
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("tbody", {
|
|
@@ -62897,19 +63090,6 @@ var table_excluded = ["data"];
|
|
|
62897
63090
|
|
|
62898
63091
|
var table_devUseWarning = devUseWarning;
|
|
62899
63092
|
var table_emptyArr = [];
|
|
62900
|
-
var virtualScrollerStyle = {
|
|
62901
|
-
flex: 1,
|
|
62902
|
-
minWidth: 0,
|
|
62903
|
-
minHeight: 0,
|
|
62904
|
-
overflow: 'auto',
|
|
62905
|
-
width: '100%'
|
|
62906
|
-
};
|
|
62907
|
-
var scrollWrapperStyle = {
|
|
62908
|
-
flex: 1,
|
|
62909
|
-
minHeight: 0,
|
|
62910
|
-
minWidth: 0,
|
|
62911
|
-
display: 'flex'
|
|
62912
|
-
};
|
|
62913
63093
|
var emptyRef = {
|
|
62914
63094
|
current: null
|
|
62915
63095
|
};
|
|
@@ -62931,15 +63111,6 @@ var emptyRef = {
|
|
|
62931
63111
|
var mirrorScrollRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
62932
63112
|
var tableRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
62933
63113
|
var browserScrollbarWidth = useScrollbarWidth();
|
|
62934
|
-
var emptyStyle = objectSpread2_default()(objectSpread2_default()({}, virtualScrollerStyle), {}, {
|
|
62935
|
-
overflow: 'auto hidden',
|
|
62936
|
-
position: 'absolute',
|
|
62937
|
-
zIndex: 1,
|
|
62938
|
-
bottom: 0,
|
|
62939
|
-
left: 0,
|
|
62940
|
-
right: 0,
|
|
62941
|
-
height: browserScrollbarWidth
|
|
62942
|
-
});
|
|
62943
63114
|
if (props.fixed) {
|
|
62944
63115
|
table_devUseWarning.deprecated('fixed', 'virtual', 'Table');
|
|
62945
63116
|
}
|
|
@@ -62960,7 +63131,8 @@ var emptyRef = {
|
|
|
62960
63131
|
};
|
|
62961
63132
|
};
|
|
62962
63133
|
var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
|
|
62963
|
-
emptyHeight: 0
|
|
63134
|
+
emptyHeight: 0,
|
|
63135
|
+
theadAndTfootHeight: 0
|
|
62964
63136
|
}),
|
|
62965
63137
|
context = _useRef.current;
|
|
62966
63138
|
var virtual = ((_props$data = props.data) === null || _props$data === void 0 ? void 0 : _props$data.length) && props.rowsInView !== 0 && (!!props.virtual || props.fixed === 'both' || props.fixed === 'y' || props.fixed === 'auto');
|
|
@@ -63092,6 +63264,10 @@ var emptyRef = {
|
|
|
63092
63264
|
onChange: inputableData.onChange,
|
|
63093
63265
|
disabled: props.disabled
|
|
63094
63266
|
});
|
|
63267
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
63268
|
+
var _theadRef$current, _tfootRef$current;
|
|
63269
|
+
context.theadAndTfootHeight = ((theadRef === null || theadRef === void 0 || (_theadRef$current = theadRef.current) === null || _theadRef$current === void 0 ? void 0 : _theadRef$current.clientHeight) || 0) + (((_tfootRef$current = tfootRef.current) === null || _tfootRef$current === void 0 ? void 0 : _tfootRef$current.clientHeight) || 0);
|
|
63270
|
+
}, [theadRef.current, tfootRef.current]);
|
|
63095
63271
|
var virtualInfo = use_table_virtual({
|
|
63096
63272
|
disabled: !virtual,
|
|
63097
63273
|
data: treeData,
|
|
@@ -63102,8 +63278,11 @@ var emptyRef = {
|
|
|
63102
63278
|
scrollRef: scrollRef,
|
|
63103
63279
|
innerRef: tbodyRef,
|
|
63104
63280
|
scrollLeft: props.scrollLeft,
|
|
63105
|
-
isRtl: isRtl
|
|
63281
|
+
isRtl: isRtl,
|
|
63282
|
+
theadAndTfootHeight: context.theadAndTfootHeight
|
|
63106
63283
|
});
|
|
63284
|
+
|
|
63285
|
+
// 简单表格的滚动事件
|
|
63107
63286
|
var handleBodyScroll = usePersistFn(function (e) {
|
|
63108
63287
|
var target = e.currentTarget;
|
|
63109
63288
|
if (!target) return;
|
|
@@ -63119,6 +63298,8 @@ var emptyRef = {
|
|
|
63119
63298
|
props.onScroll(x, y, target.scrollLeft, target.scrollTop);
|
|
63120
63299
|
}
|
|
63121
63300
|
});
|
|
63301
|
+
|
|
63302
|
+
// 虚拟表格的滚动事件
|
|
63122
63303
|
var handleVirtualScroll = usePersistFn(function (info) {
|
|
63123
63304
|
virtualInfo.handleScroll(info);
|
|
63124
63305
|
layoutFunc.checkFloat();
|
|
@@ -63133,7 +63314,7 @@ var emptyRef = {
|
|
|
63133
63314
|
var _props$data2;
|
|
63134
63315
|
if (!((_props$data2 = props.data) !== null && _props$data2 !== void 0 && _props$data2.length) || filteredData !== undefined && filteredData.length === 0) {
|
|
63135
63316
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
63136
|
-
className: tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.emptyWrapper,
|
|
63317
|
+
className: classnames_default()(tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.emptyWrapper, isScrollX && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.emptyNoBorder)),
|
|
63137
63318
|
ref: function ref(el) {
|
|
63138
63319
|
context.emptyHeight = (el === null || el === void 0 ? void 0 : el.clientHeight) || 0;
|
|
63139
63320
|
},
|
|
@@ -63180,7 +63361,8 @@ var emptyRef = {
|
|
|
63180
63361
|
bodyScrollWidth: scrollWidth,
|
|
63181
63362
|
resizeFlag: resizeFlag,
|
|
63182
63363
|
treeCheckAll: props.treeCheckAll,
|
|
63183
|
-
onCellClick: props.onCellClick
|
|
63364
|
+
onCellClick: props.onCellClick,
|
|
63365
|
+
shouldCellUpdate: props.shouldCellUpdate
|
|
63184
63366
|
};
|
|
63185
63367
|
var headCommonProps = {
|
|
63186
63368
|
disabled: props.disabled,
|
|
@@ -63223,9 +63405,8 @@ var emptyRef = {
|
|
|
63223
63405
|
parent: tableRef === null || tableRef === void 0 ? void 0 : tableRef.current
|
|
63224
63406
|
};
|
|
63225
63407
|
var isRenderVirtualTable = virtual || props.sticky || !((_props$data3 = props.data) !== null && _props$data3 !== void 0 && _props$data3.length);
|
|
63226
|
-
var headWrapperClass = classnames_default()(tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.headWrapper
|
|
63227
|
-
);
|
|
63228
|
-
var footWrapperClass = classnames_default()(tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.footWrapper, isScrollY && scrollBarWidth && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.scrollY));
|
|
63408
|
+
var headWrapperClass = classnames_default()(tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.headWrapper);
|
|
63409
|
+
var footWrapperClass = classnames_default()(tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.footWrapper);
|
|
63229
63410
|
var renderHeadMirrorScroller = function renderHeadMirrorScroller() {
|
|
63230
63411
|
var _scrollRef$current, _scrollRef$current2, _scrollRef$current3;
|
|
63231
63412
|
if (!props.showTopScrollbar) return null;
|
|
@@ -63263,17 +63444,16 @@ var emptyRef = {
|
|
|
63263
63444
|
}));
|
|
63264
63445
|
};
|
|
63265
63446
|
if (isRenderVirtualTable) {
|
|
63266
|
-
var _props$data4;
|
|
63447
|
+
var _props$data4, _props$data5;
|
|
63267
63448
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
63268
|
-
children: [renderHeadMirrorScroller(), /*#__PURE__*/(0,jsx_runtime.jsxs)(
|
|
63269
|
-
style: scrollWrapperStyle,
|
|
63270
|
-
scrollerStyle: (_props$data4 = props.data) !== null && _props$data4 !== void 0 && _props$data4.length ? virtualScrollerStyle : emptyStyle,
|
|
63449
|
+
children: [renderHeadMirrorScroller(), /*#__PURE__*/(0,jsx_runtime.jsxs)(scroll_table, {
|
|
63271
63450
|
wrapperRef: scrollRef,
|
|
63272
63451
|
scrollWidth: width || 1,
|
|
63273
63452
|
scrollHeight: virtual ? virtualInfo.scrollHeight : tbodyHeight,
|
|
63274
63453
|
onScroll: handleVirtualScroll,
|
|
63275
63454
|
defaultHeight: context.emptyHeight,
|
|
63276
63455
|
isScrollY: isScrollY,
|
|
63456
|
+
isEmptyContent: !((_props$data4 = props.data) !== null && _props$data4 !== void 0 && _props$data4.length),
|
|
63277
63457
|
children: [!props.hideHeader && /*#__PURE__*/(0,jsx_runtime.jsx)(StickyWrapper, objectSpread2_default()(objectSpread2_default()({}, props.sticky ? stickyProps : {}), {}, {
|
|
63278
63458
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
63279
63459
|
className: headWrapperClass,
|
|
@@ -63285,7 +63465,7 @@ var emptyRef = {
|
|
|
63285
63465
|
children: [Group, /*#__PURE__*/(0,jsx_runtime.jsx)(thead, objectSpread2_default()({}, headCommonProps))]
|
|
63286
63466
|
})
|
|
63287
63467
|
})
|
|
63288
|
-
})), /*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
|
|
63468
|
+
})), !!((_props$data5 = props.data) !== null && _props$data5 !== void 0 && _props$data5.length) && /*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
|
|
63289
63469
|
style: {
|
|
63290
63470
|
width: width,
|
|
63291
63471
|
transform: virtualInfo.getTranslate()
|
|
@@ -63305,8 +63485,8 @@ var emptyRef = {
|
|
|
63305
63485
|
ref: tfootRef,
|
|
63306
63486
|
children: [Group, /*#__PURE__*/(0,jsx_runtime.jsx)(tfoot, objectSpread2_default()({}, footCommonProps))]
|
|
63307
63487
|
})
|
|
63308
|
-
}) : null]
|
|
63309
|
-
})
|
|
63488
|
+
}) : null, renderEmpty()]
|
|
63489
|
+
})]
|
|
63310
63490
|
});
|
|
63311
63491
|
}
|
|
63312
63492
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
@@ -69718,7 +69898,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
69718
69898
|
|
|
69719
69899
|
|
|
69720
69900
|
/* harmony default export */ var src_0 = ({
|
|
69721
|
-
version: '3.7.0-beta.
|
|
69901
|
+
version: '3.7.0-beta.5'
|
|
69722
69902
|
});
|
|
69723
69903
|
}();
|
|
69724
69904
|
/******/ return __webpack_exports__;
|