shineout 3.8.2-beta.1 → 3.8.2-beta.11
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 +52 -24
- 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.2-beta.
|
|
525
|
+
version: '3.8.2-beta.11'
|
|
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.2-beta.
|
|
12389
|
+
/* harmony default export */ var version = ('3.8.2-beta.11');
|
|
12390
12390
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
12391
12391
|
|
|
12392
12392
|
|
|
@@ -22227,12 +22227,15 @@ var modalStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
22227
22227
|
},
|
|
22228
22228
|
body: {
|
|
22229
22229
|
flex: '1 1 auto',
|
|
22230
|
-
minHeight:
|
|
22230
|
+
minHeight: 0,
|
|
22231
22231
|
// overflow: 'auto',
|
|
22232
22232
|
color: src.modalBodyFontColor,
|
|
22233
22233
|
fontSize: src.modalBodyFontSize,
|
|
22234
22234
|
fontWeight: src.modalBodyFontWeight,
|
|
22235
|
-
lineHeight: src.lineHeightDynamic
|
|
22235
|
+
lineHeight: src.lineHeightDynamic,
|
|
22236
|
+
'$wrapperFullScreen &': {
|
|
22237
|
+
minHeight: 'unset'
|
|
22238
|
+
}
|
|
22236
22239
|
},
|
|
22237
22240
|
bodyWithIcon: {
|
|
22238
22241
|
paddingLeft: "calc(".concat(src.modalHeaderIconMarginEnd, " + ").concat(src.modalHeaderIconSize, ")")
|
|
@@ -41901,18 +41904,25 @@ var More = function More(props) {
|
|
|
41901
41904
|
visible = _useState2[0],
|
|
41902
41905
|
setVisible = _useState2[1];
|
|
41903
41906
|
var styles = classes;
|
|
41904
|
-
var shouldShowMore = showNum < 0 || showNum >= data.length;
|
|
41907
|
+
var shouldShowMore = !showNum || showNum < 0 || showNum >= data.length;
|
|
41905
41908
|
var before = [];
|
|
41906
41909
|
var after = [];
|
|
41907
41910
|
var afterLength = 0;
|
|
41908
41911
|
if (!shouldShowMore) {
|
|
41909
|
-
|
|
41912
|
+
var validShowNum = showNum || 0;
|
|
41913
|
+
before = new Array(validShowNum).fill(undefined).map(function (_item, index) {
|
|
41910
41914
|
return data[index];
|
|
41911
41915
|
});
|
|
41912
|
-
|
|
41913
|
-
|
|
41914
|
-
|
|
41915
|
-
|
|
41916
|
+
var afterCount = Math.max(0, data.length - validShowNum);
|
|
41917
|
+
try {
|
|
41918
|
+
after = new Array(afterCount).fill(undefined).map(function (_item, index) {
|
|
41919
|
+
return data[validShowNum + index];
|
|
41920
|
+
});
|
|
41921
|
+
afterLength = after.length;
|
|
41922
|
+
} catch (error) {
|
|
41923
|
+
after = [];
|
|
41924
|
+
afterLength = 0;
|
|
41925
|
+
}
|
|
41916
41926
|
}
|
|
41917
41927
|
if (shouldShowMore) {
|
|
41918
41928
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
|
|
@@ -41954,6 +41964,9 @@ var More = function More(props) {
|
|
|
41954
41964
|
onClick: function onClick(e) {
|
|
41955
41965
|
return e.stopPropagation();
|
|
41956
41966
|
},
|
|
41967
|
+
onScroll: function onScroll(e) {
|
|
41968
|
+
return e.stopPropagation();
|
|
41969
|
+
},
|
|
41957
41970
|
children: [compressed === 'no-repeat' ? null : before, after]
|
|
41958
41971
|
})
|
|
41959
41972
|
})]
|
|
@@ -51235,9 +51248,16 @@ var SchemaBuilder = /*#__PURE__*/function () {
|
|
|
51235
51248
|
} else {
|
|
51236
51249
|
var enumData = this.mapEnumData(componentElement.props.data, format);
|
|
51237
51250
|
if (enumData.length > 0) {
|
|
51238
|
-
|
|
51251
|
+
if (componentElement.props.multiple) {
|
|
51252
|
+
fieldSchemaInfo.items.enum = enumData;
|
|
51253
|
+
} else {
|
|
51254
|
+
fieldSchemaInfo.enum = enumData;
|
|
51255
|
+
}
|
|
51239
51256
|
}
|
|
51240
51257
|
}
|
|
51258
|
+
if (componentElement.props.data.length > 0) {
|
|
51259
|
+
fieldSchemaInfo.description += "enumData: ".concat(JSON.stringify(componentElement.props.data), ";");
|
|
51260
|
+
}
|
|
51241
51261
|
break;
|
|
51242
51262
|
}
|
|
51243
51263
|
case 'ShineoutDatePicker':
|
|
@@ -51289,6 +51309,9 @@ var SchemaBuilder = /*#__PURE__*/function () {
|
|
|
51289
51309
|
} else {
|
|
51290
51310
|
fieldSchemaInfo.items.enum = this.mapEnumData(componentElement.props.data, format);
|
|
51291
51311
|
}
|
|
51312
|
+
if (componentElement.props.data.length > 0) {
|
|
51313
|
+
fieldSchemaInfo.description += "enumData: ".concat(JSON.stringify(componentElement.props.data), ";");
|
|
51314
|
+
}
|
|
51292
51315
|
break;
|
|
51293
51316
|
}
|
|
51294
51317
|
case 'ShineoutRadio':
|
|
@@ -51321,6 +51344,9 @@ var SchemaBuilder = /*#__PURE__*/function () {
|
|
|
51321
51344
|
} else {
|
|
51322
51345
|
fieldSchemaInfo.enum = this.mapEnumData(componentElement.props.data, format);
|
|
51323
51346
|
}
|
|
51347
|
+
if (componentElement.props.data.length > 0) {
|
|
51348
|
+
fieldSchemaInfo.description += "enumData: ".concat(JSON.stringify(componentElement.props.data), ";");
|
|
51349
|
+
}
|
|
51324
51350
|
break;
|
|
51325
51351
|
}
|
|
51326
51352
|
case 'ShineoutSwitch':
|
|
@@ -52661,7 +52687,7 @@ var FormFieldSet = function FormFieldSet(props) {
|
|
|
52661
52687
|
},
|
|
52662
52688
|
children: children({
|
|
52663
52689
|
list: valueArr,
|
|
52664
|
-
value: valueProxy,
|
|
52690
|
+
value: v && typeof_default()(v) === 'object' ? valueProxy : v,
|
|
52665
52691
|
index: i,
|
|
52666
52692
|
error: errorList,
|
|
52667
52693
|
onChange: function onChange(val, options) {
|
|
@@ -62902,8 +62928,7 @@ var scroll_table_Scroll = function Scroll(props) {
|
|
|
62902
62928
|
var wrapperRef = useForkRef(scrollRef, props.wrapperRef);
|
|
62903
62929
|
var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
|
|
62904
62930
|
isMouseDown: false,
|
|
62905
|
-
lastTableHeight: 0
|
|
62906
|
-
unmounted: false
|
|
62931
|
+
lastTableHeight: 0
|
|
62907
62932
|
}),
|
|
62908
62933
|
context = _useRef.current;
|
|
62909
62934
|
var _props$scrollHeight = props.scrollHeight,
|
|
@@ -63012,9 +63037,12 @@ var scroll_table_Scroll = function Scroll(props) {
|
|
|
63012
63037
|
|
|
63013
63038
|
// 非定高的Table但依旧采用了virtual渲染方式,需要渲染出全部的data
|
|
63014
63039
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
|
|
63015
|
-
if (!props.tableRef.current
|
|
63040
|
+
if (!props.tableRef.current) return;
|
|
63016
63041
|
var rootTableHeight = props.tableRef.current.clientHeight;
|
|
63017
63042
|
var container = containerRef.current;
|
|
63043
|
+
var isContainerVisible = (container === null || container === void 0 ? void 0 : container.offsetParent) !== null;
|
|
63044
|
+
if (!isContainerVisible) return;
|
|
63045
|
+
|
|
63018
63046
|
// 判断内容滚动高度是否真的超过了容器高度
|
|
63019
63047
|
var isRealScroll = (container === null || container === void 0 ? void 0 : container.scrollHeight) !== undefined && container.scrollHeight > rootTableHeight;
|
|
63020
63048
|
// 判断Table的根节点dom高度是否发生变化,如果变化了,则是因为不定高,被内部元素撑高了导致的
|
|
@@ -63024,9 +63052,6 @@ var scroll_table_Scroll = function Scroll(props) {
|
|
|
63024
63052
|
} else {
|
|
63025
63053
|
context.lastTableHeight = rootTableHeight;
|
|
63026
63054
|
}
|
|
63027
|
-
return function () {
|
|
63028
|
-
context.unmounted = true;
|
|
63029
|
-
};
|
|
63030
63055
|
}, [paddingTop]);
|
|
63031
63056
|
if (props.isEmpty) {
|
|
63032
63057
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({}, scrollRoleProps), {}, {
|
|
@@ -66190,6 +66215,7 @@ var emptyRef = {
|
|
|
66190
66215
|
props.onScroll(info.x, info.y, info.scrollLeft, info.scrollTop);
|
|
66191
66216
|
}
|
|
66192
66217
|
syncHeaderScroll(info.scrollLeft);
|
|
66218
|
+
if (props.virtual !== "lazy") return;
|
|
66193
66219
|
if (context.scrollingTimer) {
|
|
66194
66220
|
clearTimeout(context.scrollingTimer);
|
|
66195
66221
|
}
|
|
@@ -66348,11 +66374,12 @@ var emptyRef = {
|
|
|
66348
66374
|
}));
|
|
66349
66375
|
};
|
|
66350
66376
|
var renderBottomMirrorScroller = function renderBottomMirrorScroller() {
|
|
66351
|
-
var _scrollRef$current5, _scrollRef$current6, _scrollRef$current7;
|
|
66377
|
+
var _scrollRef$current5, _scrollRef$current6, _scrollRef$current7, _scrollRef$current8, _scrollRef$current9;
|
|
66352
66378
|
if (!props.showBottomScrollbar) return null;
|
|
66353
66379
|
var scrollRefWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$current5 = scrollRef.current) === null || _scrollRef$current5 === void 0 ? void 0 : _scrollRef$current5.clientWidth) || 0;
|
|
66354
66380
|
var scrollRefScrollWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$current6 = scrollRef.current) === null || _scrollRef$current6 === void 0 ? void 0 : _scrollRef$current6.scrollWidth) || 0;
|
|
66355
|
-
var
|
|
66381
|
+
var hasVerticalScroll = ((scrollRef === null || scrollRef === void 0 || (_scrollRef$current7 = scrollRef.current) === null || _scrollRef$current7 === void 0 ? void 0 : _scrollRef$current7.scrollHeight) || 0) > ((scrollRef === null || scrollRef === void 0 || (_scrollRef$current8 = scrollRef.current) === null || _scrollRef$current8 === void 0 ? void 0 : _scrollRef$current8.clientHeight) || 0);
|
|
66382
|
+
var mirrorScrollRefWidth = scrollRefWidth + (hasVerticalScroll ? 0 : scrollBarWidth);
|
|
66356
66383
|
var showScroll = scrollRefScrollWidth > scrollRefWidth;
|
|
66357
66384
|
// 开启了双滚,但是没有滚动条,不显示
|
|
66358
66385
|
if (!scrollRefWidth || !mirrorScrollRefWidth || !showScroll) return null;
|
|
@@ -66360,7 +66387,8 @@ var emptyRef = {
|
|
|
66360
66387
|
var scrollerStickyProps = {
|
|
66361
66388
|
bottom: options.bottom || 0,
|
|
66362
66389
|
zIndex: options.zIndex || defaultZIndex + 1,
|
|
66363
|
-
parent: tableRef === null || tableRef === void 0 ? void 0 : tableRef.current
|
|
66390
|
+
parent: tableRef === null || tableRef === void 0 ? void 0 : tableRef.current,
|
|
66391
|
+
scrollContainer: options.scrollContainer
|
|
66364
66392
|
};
|
|
66365
66393
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(src_sticky_sticky, objectSpread2_default()(objectSpread2_default()({}, scrollerStickyProps), {}, {
|
|
66366
66394
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
@@ -66379,7 +66407,7 @@ var emptyRef = {
|
|
|
66379
66407
|
ref: bottomMirrorScrollRef,
|
|
66380
66408
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
66381
66409
|
style: {
|
|
66382
|
-
width: scrollRef === null || scrollRef === void 0 || (_scrollRef$
|
|
66410
|
+
width: scrollRef === null || scrollRef === void 0 || (_scrollRef$current9 = scrollRef.current) === null || _scrollRef$current9 === void 0 ? void 0 : _scrollRef$current9.scrollWidth,
|
|
66383
66411
|
height: 1
|
|
66384
66412
|
}
|
|
66385
66413
|
})
|
|
@@ -66494,10 +66522,10 @@ var emptyRef = {
|
|
|
66494
66522
|
theadRef.current.parentElement.scrollLeft = left;
|
|
66495
66523
|
});
|
|
66496
66524
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
66497
|
-
var _scrollRef$
|
|
66525
|
+
var _scrollRef$current10;
|
|
66498
66526
|
if (!props.sticky || !scrollRef.current || !isScrollX) return;
|
|
66499
66527
|
// sticky场景下,从空数据到有数据切换时,同步一次滚动条的位置
|
|
66500
|
-
syncHeaderScroll(((_scrollRef$
|
|
66528
|
+
syncHeaderScroll(((_scrollRef$current10 = scrollRef.current) === null || _scrollRef$current10 === void 0 ? void 0 : _scrollRef$current10.scrollLeft) || 0);
|
|
66501
66529
|
}, [isScrollX, props.sticky, $empty]);
|
|
66502
66530
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
66503
66531
|
// 绑定 wheel 事件
|
|
@@ -73075,7 +73103,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
73075
73103
|
|
|
73076
73104
|
|
|
73077
73105
|
/* harmony default export */ var src_0 = ({
|
|
73078
|
-
version: '3.8.2-beta.
|
|
73106
|
+
version: '3.8.2-beta.11'
|
|
73079
73107
|
});
|
|
73080
73108
|
}();
|
|
73081
73109
|
/******/ return __webpack_exports__;
|