shineout 3.4.2-beta.5 → 3.4.2-beta.7
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 -14
- 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
|
@@ -492,5 +492,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
492
492
|
// 此文件由脚本自动生成,请勿直接修改。
|
|
493
493
|
// This file was generated automatically by a script. Please do not modify it directly.
|
|
494
494
|
var _default = exports.default = {
|
|
495
|
-
version: '3.4.2-beta.
|
|
495
|
+
version: '3.4.2-beta.7'
|
|
496
496
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -11991,7 +11991,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
11991
11991
|
};
|
|
11992
11992
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
11993
11993
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
11994
|
-
/* harmony default export */ var version = ('3.4.2-beta.
|
|
11994
|
+
/* harmony default export */ var version = ('3.4.2-beta.7');
|
|
11995
11995
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
11996
11996
|
|
|
11997
11997
|
|
|
@@ -36064,8 +36064,9 @@ var useTree = function useTree(props) {
|
|
|
36064
36064
|
// 重复 id 警告
|
|
36065
36065
|
if (context.dataMap.get(id)) {
|
|
36066
36066
|
console.error("There is already a key \"".concat(id, "\" exists. The key must be unique."));
|
|
36067
|
-
|
|
36067
|
+
continue;
|
|
36068
36068
|
}
|
|
36069
|
+
|
|
36069
36070
|
// 制作 data mapping
|
|
36070
36071
|
context.dataMap.set(id, item);
|
|
36071
36072
|
var _isDisabled = !!disabled;
|
|
@@ -58655,7 +58656,7 @@ var emptyRef = {
|
|
|
58655
58656
|
});
|
|
58656
58657
|
};
|
|
58657
58658
|
var renderTable = function renderTable() {
|
|
58658
|
-
var _props$summary, _sticky$top, _props$style;
|
|
58659
|
+
var _props$summary, _sticky$top, _props$style, _props$data3;
|
|
58659
58660
|
var Group = /*#__PURE__*/(0,jsx_runtime.jsx)(table_colgroup, {
|
|
58660
58661
|
colgroup: colgroup,
|
|
58661
58662
|
columns: columns,
|
|
@@ -58727,7 +58728,7 @@ var emptyRef = {
|
|
|
58727
58728
|
css: sticky === null || sticky === void 0 ? void 0 : sticky.css,
|
|
58728
58729
|
parent: tableRef === null || tableRef === void 0 ? void 0 : tableRef.current
|
|
58729
58730
|
};
|
|
58730
|
-
var isRenderVirtualTable = virtual || props.sticky || ((_props$style = props.style) === null || _props$style === void 0 ? void 0 : _props$style.height) || props.height;
|
|
58731
|
+
var isRenderVirtualTable = virtual || props.sticky || ((_props$style = props.style) === null || _props$style === void 0 ? void 0 : _props$style.height) || props.height || !((_props$data3 = props.data) !== null && _props$data3 !== void 0 && _props$data3.length);
|
|
58731
58732
|
var headWrapperClass = classnames_default()(tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.headWrapper, isScrollY && scrollBarWidth && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.scrollY));
|
|
58732
58733
|
var footWrapperClass = classnames_default()(tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.footWrapper, isScrollY && scrollBarWidth && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.scrollY));
|
|
58733
58734
|
var renderHeadMirrorScroller = function renderHeadMirrorScroller() {
|
|
@@ -58769,7 +58770,7 @@ var emptyRef = {
|
|
|
58769
58770
|
}));
|
|
58770
58771
|
};
|
|
58771
58772
|
if (isRenderVirtualTable) {
|
|
58772
|
-
var _props$
|
|
58773
|
+
var _props$data4;
|
|
58773
58774
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
58774
58775
|
children: [renderHeadMirrorScroller(), !props.hideHeader && /*#__PURE__*/(0,jsx_runtime.jsx)(StickyWrapper, objectSpread2_default()(objectSpread2_default()({}, props.sticky ? stickyProps : {}), {}, {
|
|
58775
58776
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
@@ -58788,7 +58789,7 @@ var emptyRef = {
|
|
|
58788
58789
|
})
|
|
58789
58790
|
})), /*#__PURE__*/(0,jsx_runtime.jsx)(virtual_scroll_scroll, {
|
|
58790
58791
|
style: scrollWrapperStyle,
|
|
58791
|
-
scrollerStyle: (_props$
|
|
58792
|
+
scrollerStyle: (_props$data4 = props.data) !== null && _props$data4 !== void 0 && _props$data4.length ? virtualScrollerStyle : table_emptyStyle,
|
|
58792
58793
|
wrapperRef: scrollRef,
|
|
58793
58794
|
scrollWidth: width || 1,
|
|
58794
58795
|
scrollHeight: virtual ? virtualInfo.scrollHeight : tbodyHeight,
|
|
@@ -58826,17 +58827,17 @@ var emptyRef = {
|
|
|
58826
58827
|
});
|
|
58827
58828
|
}
|
|
58828
58829
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
58829
|
-
children: [renderHeadMirrorScroller(), /*#__PURE__*/(0,jsx_runtime.
|
|
58830
|
+
children: [renderHeadMirrorScroller(), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
58830
58831
|
ref: scrollRef,
|
|
58831
58832
|
className: tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.bodyWrapper,
|
|
58832
58833
|
onScroll: handleBodyScroll,
|
|
58833
|
-
children:
|
|
58834
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
|
|
58834
58835
|
style: {
|
|
58835
58836
|
width: width
|
|
58836
58837
|
},
|
|
58837
58838
|
ref: tbodyRef,
|
|
58838
58839
|
children: [Group, !props.hideHeader && /*#__PURE__*/(0,jsx_runtime.jsx)(thead, objectSpread2_default()({}, headCommonProps)), /*#__PURE__*/(0,jsx_runtime.jsx)(tbody, objectSpread2_default()({}, bodyCommonProps)), /*#__PURE__*/(0,jsx_runtime.jsx)(tfoot, objectSpread2_default()({}, footCommonProps))]
|
|
58839
|
-
})
|
|
58840
|
+
})
|
|
58840
58841
|
})]
|
|
58841
58842
|
});
|
|
58842
58843
|
};
|
|
@@ -59437,24 +59438,42 @@ var TabsHeader = function TabsHeader(props) {
|
|
|
59437
59438
|
var single = isRtl && !isVertical ? -1 : 1;
|
|
59438
59439
|
setTransform(delta + headerRef.current.clientWidth * single);
|
|
59439
59440
|
};
|
|
59440
|
-
var
|
|
59441
|
+
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({
|
|
59442
|
+
offsetTop: 0,
|
|
59443
|
+
offsetLeft: 0
|
|
59444
|
+
}),
|
|
59445
|
+
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
59446
|
+
currentTabOffset = _useState4[0],
|
|
59447
|
+
setCurrentTabOffset = _useState4[1];
|
|
59448
|
+
var _useState5 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null),
|
|
59449
|
+
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
59450
|
+
currentTabRect = _useState6[0],
|
|
59451
|
+
setCurrentTabRect = _useState6[1];
|
|
59452
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
59441
59453
|
var _currentTab$getBoundi;
|
|
59442
59454
|
if (shape !== 'line' && shape !== 'dash') return;
|
|
59443
59455
|
var currentTab = tabRef.current[active];
|
|
59444
|
-
|
|
59456
|
+
setCurrentTabOffset({
|
|
59457
|
+
offsetTop: (currentTab === null || currentTab === void 0 ? void 0 : currentTab.offsetTop) || 0,
|
|
59458
|
+
offsetLeft: (currentTab === null || currentTab === void 0 ? void 0 : currentTab.offsetLeft) || 0
|
|
59459
|
+
});
|
|
59445
59460
|
var currentTabRect = currentTab === null || currentTab === void 0 || (_currentTab$getBoundi = currentTab.getBoundingClientRect) === null || _currentTab$getBoundi === void 0 ? void 0 : _currentTab$getBoundi.call(currentTab);
|
|
59461
|
+
setCurrentTabRect(currentTabRect);
|
|
59462
|
+
}, [active]);
|
|
59463
|
+
var renderHeaderScrollBar = function renderHeaderScrollBar() {
|
|
59464
|
+
if (shape !== 'line' && shape !== 'dash') return;
|
|
59446
59465
|
if (!currentTabRect) return;
|
|
59447
59466
|
var scrollBarStyle = isVertical ? {
|
|
59448
59467
|
right: getPosition !== null && getPosition !== void 0 && getPosition.startsWith('left') ? 0 : 'auto',
|
|
59449
59468
|
left: getPosition !== null && getPosition !== void 0 && getPosition.startsWith('right') ? 0 : 'auto',
|
|
59450
|
-
top:
|
|
59469
|
+
top: currentTabOffset.offsetTop + currentTabRect.height / 2,
|
|
59451
59470
|
height: shape === 'line' ? currentTabRect.height : 24,
|
|
59452
59471
|
width: 2,
|
|
59453
59472
|
transform: 'translateY(-50%)'
|
|
59454
59473
|
} : {
|
|
59455
59474
|
bottom: getPosition !== null && getPosition !== void 0 && getPosition.startsWith('top') ? 0 : 'auto',
|
|
59456
59475
|
top: getPosition !== null && getPosition !== void 0 && getPosition.startsWith('bottom') ? 0 : 'auto',
|
|
59457
|
-
left:
|
|
59476
|
+
left: currentTabOffset.offsetLeft + currentTabRect.width / 2,
|
|
59458
59477
|
width: shape === 'line' ? currentTabRect.width : 24,
|
|
59459
59478
|
height: 2,
|
|
59460
59479
|
transform: 'translateX(-50%)'
|
|
@@ -65101,7 +65120,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
65101
65120
|
|
|
65102
65121
|
|
|
65103
65122
|
/* harmony default export */ var src_0 = ({
|
|
65104
|
-
version: '3.4.2-beta.
|
|
65123
|
+
version: '3.4.2-beta.7'
|
|
65105
65124
|
});
|
|
65106
65125
|
}();
|
|
65107
65126
|
/******/ return __webpack_exports__;
|