shineout 3.8.3 → 3.8.4-beta.2
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 +59 -12
- 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
|
@@ -522,5 +522,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
522
522
|
// 此文件由脚本自动生成,请勿直接修改。
|
|
523
523
|
// This file was generated automatically by a script. Please do not modify it directly.
|
|
524
524
|
var _default = exports.default = {
|
|
525
|
-
version: '3.8.
|
|
525
|
+
version: '3.8.4-beta.2'
|
|
526
526
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -12386,7 +12386,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
12386
12386
|
};
|
|
12387
12387
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
12388
12388
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
12389
|
-
/* harmony default export */ var version = ('3.8.
|
|
12389
|
+
/* harmony default export */ var version = ('3.8.4-beta.2');
|
|
12390
12390
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
12391
12391
|
|
|
12392
12392
|
|
|
@@ -28313,7 +28313,14 @@ var textarea_input = objectSpread2_default()(objectSpread2_default()(objectSprea
|
|
|
28313
28313
|
resize: 'vertical'
|
|
28314
28314
|
},
|
|
28315
28315
|
'&:not($shadow)': {
|
|
28316
|
-
|
|
28316
|
+
// 非 Safari 浏览器使用 -webkit-fill-available
|
|
28317
|
+
'@supports not ((-webkit-hyphens: none))': {
|
|
28318
|
+
minHeight: '-webkit-fill-available'
|
|
28319
|
+
},
|
|
28320
|
+
// Safari 使用 100%(Safari 支持 -webkit-hyphens)
|
|
28321
|
+
'@supports (-webkit-hyphens: none)': {
|
|
28322
|
+
minHeight: 'unset'
|
|
28323
|
+
}
|
|
28317
28324
|
}
|
|
28318
28325
|
},
|
|
28319
28326
|
resize: {
|
|
@@ -29709,6 +29716,9 @@ var uploadStyle = {
|
|
|
29709
29716
|
},
|
|
29710
29717
|
'$resultDeleted $resultText &': {
|
|
29711
29718
|
color: src.uploadResultDeletedFontColor
|
|
29719
|
+
},
|
|
29720
|
+
'& > svg': {
|
|
29721
|
+
width: '100%'
|
|
29712
29722
|
}
|
|
29713
29723
|
},
|
|
29714
29724
|
iconHover: {
|
|
@@ -30513,6 +30523,32 @@ function isInDocument(element) {
|
|
|
30513
30523
|
}
|
|
30514
30524
|
return is_isBrowser() && document.documentElement.contains(element);
|
|
30515
30525
|
}
|
|
30526
|
+
function document_isScrollAble(container) {
|
|
30527
|
+
if (!container || !is_isBrowser()) return false;
|
|
30528
|
+
if (container.scrollHeight > container.clientHeight) {
|
|
30529
|
+
return true;
|
|
30530
|
+
}
|
|
30531
|
+
var placeholderEl = document.createElement('div');
|
|
30532
|
+
placeholderEl.style.height = '9999px';
|
|
30533
|
+
placeholderEl.style.top = '0';
|
|
30534
|
+
placeholderEl.style.flexShrink = '0';
|
|
30535
|
+
placeholderEl.style.left = '0';
|
|
30536
|
+
placeholderEl.style.width = '1px';
|
|
30537
|
+
placeholderEl.style.pointerEvents = 'none';
|
|
30538
|
+
container.appendChild(placeholderEl);
|
|
30539
|
+
var absoluteEl = document.createElement('div');
|
|
30540
|
+
absoluteEl.style.position = 'absolute';
|
|
30541
|
+
absoluteEl.style.top = '0';
|
|
30542
|
+
absoluteEl.style.bottom = '0';
|
|
30543
|
+
absoluteEl.style.left = '0';
|
|
30544
|
+
absoluteEl.style.width = '1px';
|
|
30545
|
+
absoluteEl.style.pointerEvents = 'none';
|
|
30546
|
+
container.appendChild(absoluteEl);
|
|
30547
|
+
var hasScroll = absoluteEl.clientHeight < placeholderEl.clientHeight;
|
|
30548
|
+
placeholderEl.remove();
|
|
30549
|
+
absoluteEl.remove();
|
|
30550
|
+
return hasScroll;
|
|
30551
|
+
}
|
|
30516
30552
|
;// CONCATENATED MODULE: ../hooks/src/utils/position.ts
|
|
30517
30553
|
|
|
30518
30554
|
// 根据位置计算合适的 position
|
|
@@ -63107,12 +63143,11 @@ var scroll_table_Scroll = function Scroll(props) {
|
|
|
63107
63143
|
|
|
63108
63144
|
// 非定高的Table但依旧采用了virtual渲染方式,需要渲染出全部的data
|
|
63109
63145
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
|
|
63110
|
-
if (!props.tableRef.current) return;
|
|
63111
|
-
var rootTableHeight = props.tableRef.current.clientHeight;
|
|
63146
|
+
if (!props.tableRef.current || !props.setFakeVirtual) return;
|
|
63112
63147
|
var container = containerRef.current;
|
|
63113
63148
|
var isContainerVisible = (container === null || container === void 0 ? void 0 : container.offsetParent) !== null;
|
|
63114
63149
|
if (!isContainerVisible) return;
|
|
63115
|
-
|
|
63150
|
+
var rootTableHeight = props.tableRef.current.clientHeight;
|
|
63116
63151
|
// 判断内容滚动高度是否真的超过了容器高度
|
|
63117
63152
|
var isRealScroll = (container === null || container === void 0 ? void 0 : container.scrollHeight) !== undefined && container.scrollHeight > rootTableHeight;
|
|
63118
63153
|
// 判断Table的根节点dom高度是否发生变化,如果变化了,则是因为不定高,被内部元素撑高了导致的
|
|
@@ -63122,7 +63157,7 @@ var scroll_table_Scroll = function Scroll(props) {
|
|
|
63122
63157
|
} else {
|
|
63123
63158
|
context.lastTableHeight = rootTableHeight;
|
|
63124
63159
|
}
|
|
63125
|
-
}, [paddingTop]);
|
|
63160
|
+
}, [paddingTop, props.setFakeVirtual]);
|
|
63126
63161
|
if (props.isEmpty) {
|
|
63127
63162
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({}, scrollRoleProps), {}, {
|
|
63128
63163
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
@@ -66030,12 +66065,16 @@ var emptyRef = {
|
|
|
66030
66065
|
var tableRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
66031
66066
|
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
66032
66067
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
66033
|
-
|
|
66034
|
-
|
|
66068
|
+
scrollAble = _useState2[0],
|
|
66069
|
+
setScrollAble = _useState2[1];
|
|
66035
66070
|
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
66036
66071
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
66037
|
-
|
|
66038
|
-
|
|
66072
|
+
scrolling = _useState4[0],
|
|
66073
|
+
setScrolling = _useState4[1];
|
|
66074
|
+
var _useState5 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
66075
|
+
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
66076
|
+
fakeVirtual = _useState6[0],
|
|
66077
|
+
setFakeVirtual = _useState6[1];
|
|
66039
66078
|
var browserScrollbarWidth = useScrollbarWidth();
|
|
66040
66079
|
if (props.fixed) {
|
|
66041
66080
|
table_devUseWarning.deprecated('fixed', 'virtual', 'Table');
|
|
@@ -66064,6 +66103,14 @@ var emptyRef = {
|
|
|
66064
66103
|
}),
|
|
66065
66104
|
context = _useRef.current;
|
|
66066
66105
|
var virtual = !fakeVirtual && props.rowsInView !== 0 && (!!props.virtual || props.fixed === 'both' || props.fixed === 'y' || props.fixed === 'auto');
|
|
66106
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
|
|
66107
|
+
if (!virtual) return;
|
|
66108
|
+
if (!tableRef.current) return;
|
|
66109
|
+
var maxHeight = tableRef.current.style.maxHeight;
|
|
66110
|
+
if (!maxHeight) return;
|
|
66111
|
+
var isScrollAble = document_isScrollAble(tableRef.current);
|
|
66112
|
+
setScrollAble(isScrollAble);
|
|
66113
|
+
}, [virtual]);
|
|
66067
66114
|
|
|
66068
66115
|
// 虚拟列表高度另外计算
|
|
66069
66116
|
var _useResize = useResize({
|
|
@@ -66517,7 +66564,7 @@ var emptyRef = {
|
|
|
66517
66564
|
isScrollX: isScrollX,
|
|
66518
66565
|
isEmpty: !!$empty,
|
|
66519
66566
|
tableRef: tableRef,
|
|
66520
|
-
setFakeVirtual: setFakeVirtual,
|
|
66567
|
+
setFakeVirtual: scrollAble ? undefined : setFakeVirtual,
|
|
66521
66568
|
children: [!props.hideHeader && !props.sticky && $headTable, !!((_props$data3 = props.data) !== null && _props$data3 !== void 0 && _props$data3.length) && /*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
|
|
66522
66569
|
style: objectSpread2_default()(objectSpread2_default()({}, tableStyle), {}, {
|
|
66523
66570
|
transform: virtualInfo.translateStyle
|
|
@@ -73173,7 +73220,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
73173
73220
|
|
|
73174
73221
|
|
|
73175
73222
|
/* harmony default export */ var src_0 = ({
|
|
73176
|
-
version: '3.8.
|
|
73223
|
+
version: '3.8.4-beta.2'
|
|
73177
73224
|
});
|
|
73178
73225
|
}();
|
|
73179
73226
|
/******/ return __webpack_exports__;
|