shineout 3.6.0-beta.27 → 3.6.0-beta.28
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 +38 -19
- 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.6.0-beta.
|
|
517
|
+
version: '3.6.0-beta.28'
|
|
518
518
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -12139,7 +12139,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
12139
12139
|
};
|
|
12140
12140
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
12141
12141
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
12142
|
-
/* harmony default export */ var version = ('3.6.0-beta.
|
|
12142
|
+
/* harmony default export */ var version = ('3.6.0-beta.28');
|
|
12143
12143
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
12144
12144
|
|
|
12145
12145
|
|
|
@@ -25654,6 +25654,7 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
25654
25654
|
},
|
|
25655
25655
|
'&::after': {
|
|
25656
25656
|
position: 'absolute',
|
|
25657
|
+
zIndex: fixedFixedIndex + 3,
|
|
25657
25658
|
content: '""',
|
|
25658
25659
|
display: 'block',
|
|
25659
25660
|
bottom: 0,
|
|
@@ -37896,7 +37897,6 @@ function use_tree_toArray(value) {
|
|
|
37896
37897
|
if (!Array.isArray(value)) return [value];
|
|
37897
37898
|
return value;
|
|
37898
37899
|
}
|
|
37899
|
-
var global_tree_map = new Map();
|
|
37900
37900
|
var MODE = {
|
|
37901
37901
|
/**
|
|
37902
37902
|
* 返回全选数据,包含父节点和子节点
|
|
@@ -38299,15 +38299,6 @@ var useTree = function useTree(props) {
|
|
|
38299
38299
|
return 2;
|
|
38300
38300
|
};
|
|
38301
38301
|
var setData = function setData(data) {
|
|
38302
|
-
// if(data && global_tree_map.get(data)){
|
|
38303
|
-
// context.cachedValue = global_tree_map.get(data)?.cachedValue || []
|
|
38304
|
-
// context.pathMap = global_tree_map.get(data)?.pathMap || new Map()
|
|
38305
|
-
// context.dataMap = global_tree_map.get(data)?.dataMap || new Map()
|
|
38306
|
-
// context.valueMap = global_tree_map.get(data)?.valueMap || new Map()
|
|
38307
|
-
// context.unmatchedValueMap = global_tree_map.get(data)?.unmatchedValueMap || new Map()
|
|
38308
|
-
// return
|
|
38309
|
-
// }
|
|
38310
|
-
|
|
38311
38302
|
var prevValue = context.value || [];
|
|
38312
38303
|
context.cachedValue = [];
|
|
38313
38304
|
context.pathMap = new Map();
|
|
@@ -38328,8 +38319,6 @@ var useTree = function useTree(props) {
|
|
|
38328
38319
|
}
|
|
38329
38320
|
initValue();
|
|
38330
38321
|
setValue(prevValue);
|
|
38331
|
-
|
|
38332
|
-
// global_tree_map.set(data, context)
|
|
38333
38322
|
};
|
|
38334
38323
|
var set = function set(id, checked, direction) {
|
|
38335
38324
|
if (!isDisabled(id)) {
|
|
@@ -38371,6 +38360,28 @@ var useTree = function useTree(props) {
|
|
|
38371
38360
|
}
|
|
38372
38361
|
return current;
|
|
38373
38362
|
};
|
|
38363
|
+
var updateInnerCheckStatus = function updateInnerCheckStatus() {
|
|
38364
|
+
var _context$value;
|
|
38365
|
+
if (mode !== MODE.MODE_0) return;
|
|
38366
|
+
(_context$value = context.value) === null || _context$value === void 0 || _context$value.forEach(function (id) {
|
|
38367
|
+
var _ref3 = context.pathMap.get(id),
|
|
38368
|
+
children = _ref3.children;
|
|
38369
|
+
if (children.length) {
|
|
38370
|
+
var noCheckedChildren = children.filter(function (cid) {
|
|
38371
|
+
var _context$value2;
|
|
38372
|
+
return !((_context$value2 = context.value) !== null && _context$value2 !== void 0 && _context$value2.includes(cid));
|
|
38373
|
+
});
|
|
38374
|
+
if (noCheckedChildren.length > 0) {
|
|
38375
|
+
setTimeout(function () {
|
|
38376
|
+
setValueMap(id, 2);
|
|
38377
|
+
noCheckedChildren.forEach(function (cid) {
|
|
38378
|
+
setValueMap(cid, 0);
|
|
38379
|
+
});
|
|
38380
|
+
}, 0);
|
|
38381
|
+
}
|
|
38382
|
+
}
|
|
38383
|
+
});
|
|
38384
|
+
};
|
|
38374
38385
|
var appendChildrenExpanded = function appendChildrenExpanded(child, level, pid, insertData) {
|
|
38375
38386
|
if (!child) return;
|
|
38376
38387
|
child.forEach(function (item, i) {
|
|
@@ -38481,6 +38492,7 @@ var useTree = function useTree(props) {
|
|
|
38481
38492
|
if (props.datum) return;
|
|
38482
38493
|
if (!dataUpdate) return;
|
|
38483
38494
|
setData(data);
|
|
38495
|
+
updateInnerCheckStatus();
|
|
38484
38496
|
}, [data]);
|
|
38485
38497
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
38486
38498
|
if (props.datum) return;
|
|
@@ -38644,7 +38656,9 @@ var Scroll = function Scroll(props) {
|
|
|
38644
38656
|
_props$scrollWidth = props.scrollWidth,
|
|
38645
38657
|
scrollWidth = _props$scrollWidth === void 0 ? 0 : _props$scrollWidth,
|
|
38646
38658
|
_props$defaultHeight = props.defaultHeight,
|
|
38647
|
-
defaultHeight = _props$defaultHeight === void 0 ? 0 : _props$defaultHeight
|
|
38659
|
+
defaultHeight = _props$defaultHeight === void 0 ? 0 : _props$defaultHeight,
|
|
38660
|
+
_props$keepScrollTop = props.keepScrollTop,
|
|
38661
|
+
keepScrollTop = _props$keepScrollTop === void 0 ? false : _props$keepScrollTop;
|
|
38648
38662
|
var _useResize = useResize({
|
|
38649
38663
|
targetRef: containerRef,
|
|
38650
38664
|
timer: 100
|
|
@@ -38668,7 +38682,10 @@ var Scroll = function Scroll(props) {
|
|
|
38668
38682
|
}, isRtl ? 'right' : 'left', 0), "top", 0);
|
|
38669
38683
|
|
|
38670
38684
|
// 当滚动容器的高度为 0 时,paddingTop 为 0,避免滚动条抖动现象
|
|
38671
|
-
var paddingTop =
|
|
38685
|
+
var paddingTop = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
38686
|
+
if (keepScrollTop) return Math.max(0, Math.floor(scrollHeight - height));
|
|
38687
|
+
return height === 0 ? 0 : Math.max(0, Math.floor(scrollHeight - height));
|
|
38688
|
+
}, [scrollHeight, height]);
|
|
38672
38689
|
var placeStyle = {
|
|
38673
38690
|
paddingTop: paddingTop,
|
|
38674
38691
|
width: scrollWidth,
|
|
@@ -38780,6 +38797,7 @@ var VirtualList = function VirtualList(props) {
|
|
|
38780
38797
|
className = props.className,
|
|
38781
38798
|
lineHeight = props.lineHeight,
|
|
38782
38799
|
height = props.height,
|
|
38800
|
+
keepScrollTop = props.keepScrollTop,
|
|
38783
38801
|
keepScrollHeight = props.keepScrollHeight,
|
|
38784
38802
|
renderItem = props.renderItem,
|
|
38785
38803
|
customRenderItem = props.customRenderItem,
|
|
@@ -38946,6 +38964,7 @@ var VirtualList = function VirtualList(props) {
|
|
|
38946
38964
|
style: nextStyle,
|
|
38947
38965
|
height: height,
|
|
38948
38966
|
scrollWidth: 0,
|
|
38967
|
+
keepScrollTop: keepScrollTop,
|
|
38949
38968
|
scrollerStyle: scrollerStyle,
|
|
38950
38969
|
scrollHeight: scrollHeight,
|
|
38951
38970
|
childrenStyle: {
|
|
@@ -38976,6 +38995,7 @@ var VirtualList = function VirtualList(props) {
|
|
|
38976
38995
|
}, [startIndex]);
|
|
38977
38996
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
|
|
38978
38997
|
// 数据变化的时候清空掉 preIndex, 如果之前有缓存的index, setRowHeight 会有问题
|
|
38998
|
+
if (keepScrollTop) return;
|
|
38979
38999
|
if (keepScrollHeight) return;
|
|
38980
39000
|
setTop(0);
|
|
38981
39001
|
setStartIndex(0);
|
|
@@ -53020,6 +53040,7 @@ var list_List = function List(props) {
|
|
|
53020
53040
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(virtual_scroll_list, {
|
|
53021
53041
|
virtualRef: virtualRef,
|
|
53022
53042
|
data: data,
|
|
53043
|
+
keepScrollTop: true,
|
|
53023
53044
|
keygen: keygen,
|
|
53024
53045
|
tag: 'ul',
|
|
53025
53046
|
groupKey: groupKey,
|
|
@@ -55502,9 +55523,7 @@ function Select(props0) {
|
|
|
55502
55523
|
className: classnames_default()(styles === null || styles === void 0 ? void 0 : styles.pickerWrapper, size === 'small' && (styles === null || styles === void 0 ? void 0 : styles.pickerSmall), size === 'large' && (styles === null || styles === void 0 ? void 0 : styles.pickerLarge)),
|
|
55503
55524
|
onAnimationAfterEnter: onAnimationAfterEnter,
|
|
55504
55525
|
display: 'block',
|
|
55505
|
-
type: "scale-y"
|
|
55506
|
-
// type='fade'
|
|
55507
|
-
,
|
|
55526
|
+
type: "scale-y",
|
|
55508
55527
|
duration: 'fast',
|
|
55509
55528
|
style: getListStyle(),
|
|
55510
55529
|
children: [renderHeader(), renderOptions(), renderFooter()]
|
|
@@ -69583,7 +69602,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
69583
69602
|
|
|
69584
69603
|
|
|
69585
69604
|
/* harmony default export */ var src_0 = ({
|
|
69586
|
-
version: '3.6.0-beta.
|
|
69605
|
+
version: '3.6.0-beta.28'
|
|
69587
69606
|
});
|
|
69588
69607
|
}();
|
|
69589
69608
|
/******/ return __webpack_exports__;
|