shineout 3.6.7-beta.2 → 3.6.7-beta.3
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 +21 -15
- 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.7-beta.
|
|
517
|
+
version: '3.6.7-beta.3'
|
|
518
518
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -12217,7 +12217,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
12217
12217
|
};
|
|
12218
12218
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
12219
12219
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
12220
|
-
/* harmony default export */ var version = ('3.6.7-beta.
|
|
12220
|
+
/* harmony default export */ var version = ('3.6.7-beta.3');
|
|
12221
12221
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
12222
12222
|
|
|
12223
12223
|
|
|
@@ -38769,6 +38769,16 @@ var useTree = function useTree(props) {
|
|
|
38769
38769
|
var getFlatData = function getFlatData() {
|
|
38770
38770
|
return context.dataFlat;
|
|
38771
38771
|
};
|
|
38772
|
+
var updateExpanded = usePersistFn(function (expanded) {
|
|
38773
|
+
var tempExpandMap = new Set(expanded);
|
|
38774
|
+
if (!expanded) return;
|
|
38775
|
+
if (virtual) {
|
|
38776
|
+
expandedFlat(expanded);
|
|
38777
|
+
}
|
|
38778
|
+
context.updateMap.forEach(function (update, id) {
|
|
38779
|
+
update('expanded', tempExpandMap.has(id));
|
|
38780
|
+
});
|
|
38781
|
+
});
|
|
38772
38782
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
38773
38783
|
if (defaultExpandAll) {
|
|
38774
38784
|
var nextExpanded = [];
|
|
@@ -38784,6 +38794,11 @@ var useTree = function useTree(props) {
|
|
|
38784
38794
|
if (props.datum) return;
|
|
38785
38795
|
if (!dataUpdate) return;
|
|
38786
38796
|
setData(data);
|
|
38797
|
+
var nextExpanded = props.expanded || props.defaultExpanded || [];
|
|
38798
|
+
if (!shallowEqual(nextExpanded, expanded)) {
|
|
38799
|
+
onExpand(nextExpanded);
|
|
38800
|
+
updateExpanded(nextExpanded);
|
|
38801
|
+
}
|
|
38787
38802
|
updateInnerCheckStatus();
|
|
38788
38803
|
}, [data]);
|
|
38789
38804
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
@@ -38810,16 +38825,17 @@ var useTree = function useTree(props) {
|
|
|
38810
38825
|
getChecked: getChecked,
|
|
38811
38826
|
getKey: getKey,
|
|
38812
38827
|
getFlatData: getFlatData,
|
|
38828
|
+
getDataById: getDataById,
|
|
38813
38829
|
getDataByValues: getDataByValues,
|
|
38814
38830
|
setValue: setValue,
|
|
38815
38831
|
setData: setData,
|
|
38816
38832
|
isDisabled: isDisabled,
|
|
38833
|
+
isUnMatched: isUnMatched,
|
|
38817
38834
|
bindNode: bindNode,
|
|
38818
38835
|
bindVirtualNode: bindVirtualNode,
|
|
38819
|
-
getDataById: getDataById,
|
|
38820
38836
|
bindUpdate: bindUpdate,
|
|
38821
38837
|
unBindUpdate: unBindUpdate,
|
|
38822
|
-
|
|
38838
|
+
updateExpanded: updateExpanded,
|
|
38823
38839
|
childrenKey: childrenKey,
|
|
38824
38840
|
data: data,
|
|
38825
38841
|
dataFlat: dataFlat,
|
|
@@ -54666,16 +54682,6 @@ var Tree = function Tree(props) {
|
|
|
54666
54682
|
}
|
|
54667
54683
|
return props.height || styleHeight;
|
|
54668
54684
|
};
|
|
54669
|
-
var handleUpdateExpanded = function handleUpdateExpanded(expanded) {
|
|
54670
|
-
var tempExpandMap = new Set(expanded);
|
|
54671
|
-
if (!expanded) return;
|
|
54672
|
-
if (virtual) {
|
|
54673
|
-
datum.expandedFlat(expanded);
|
|
54674
|
-
}
|
|
54675
|
-
datum.updateMap.forEach(function (update, id) {
|
|
54676
|
-
update('expanded', tempExpandMap.has(id));
|
|
54677
|
-
});
|
|
54678
|
-
};
|
|
54679
54685
|
var handleUpdateActive = function handleUpdateActive(active, item) {
|
|
54680
54686
|
setActive(active);
|
|
54681
54687
|
if (active !== props.active) {
|
|
@@ -54824,7 +54830,7 @@ var Tree = function Tree(props) {
|
|
|
54824
54830
|
return;
|
|
54825
54831
|
}
|
|
54826
54832
|
if (!props.expanded) return;
|
|
54827
|
-
|
|
54833
|
+
datum.updateExpanded(expanded);
|
|
54828
54834
|
}, [expanded]);
|
|
54829
54835
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
54830
54836
|
// if (!active) return;
|
|
@@ -70111,7 +70117,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
70111
70117
|
|
|
70112
70118
|
|
|
70113
70119
|
/* harmony default export */ var src_0 = ({
|
|
70114
|
-
version: '3.6.7-beta.
|
|
70120
|
+
version: '3.6.7-beta.3'
|
|
70115
70121
|
});
|
|
70116
70122
|
}();
|
|
70117
70123
|
/******/ return __webpack_exports__;
|