shineout 3.6.0-beta.1 → 3.6.0-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 +51 -50
- 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
|
@@ -507,5 +507,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
507
507
|
// 此文件由脚本自动生成,请勿直接修改。
|
|
508
508
|
// This file was generated automatically by a script. Please do not modify it directly.
|
|
509
509
|
var _default = exports.default = {
|
|
510
|
-
version: '3.6.0-beta.
|
|
510
|
+
version: '3.6.0-beta.2'
|
|
511
511
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -12040,7 +12040,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
12040
12040
|
};
|
|
12041
12041
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
12042
12042
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
12043
|
-
/* harmony default export */ var version = ('3.6.0-beta.
|
|
12043
|
+
/* harmony default export */ var version = ('3.6.0-beta.2');
|
|
12044
12044
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
12045
12045
|
|
|
12046
12046
|
|
|
@@ -21467,7 +21467,8 @@ var setToken = function setToken(options) {
|
|
|
21467
21467
|
_ref$selector = _ref.selector,
|
|
21468
21468
|
selector = _ref$selector === void 0 ? 'body' : _ref$selector,
|
|
21469
21469
|
target = _ref.target,
|
|
21470
|
-
tokenName = _ref.tokenName,
|
|
21470
|
+
_ref$tokenName = _ref.tokenName,
|
|
21471
|
+
tokenName = _ref$tokenName === void 0 ? 'shineout-token' : _ref$tokenName,
|
|
21471
21472
|
token = _ref.token,
|
|
21472
21473
|
attributes = _ref.attributes,
|
|
21473
21474
|
onlyExtra = _ref.onlyExtra,
|
|
@@ -21476,7 +21477,7 @@ var setToken = function setToken(options) {
|
|
|
21476
21477
|
var _getConfig = getConfig(),
|
|
21477
21478
|
prefix = _getConfig.prefix;
|
|
21478
21479
|
if (typeof window === 'undefined') return;
|
|
21479
|
-
var id = "
|
|
21480
|
+
var id = "shineout-next-token-".concat(createHash(selector));
|
|
21480
21481
|
var cacheTag = document.querySelector("[data-token-id=\"".concat(id, "\"]"));
|
|
21481
21482
|
var tag = cacheTag || document.createElement(tagName);
|
|
21482
21483
|
var tokens = [];
|
|
@@ -21599,8 +21600,6 @@ var scopeNormalizeStyle = function scopeNormalizeStyle() {
|
|
|
21599
21600
|
appendNormalizeStyle(scopedStyleString, uniqueStyleId);
|
|
21600
21601
|
};
|
|
21601
21602
|
token_setter({
|
|
21602
|
-
onlyExtra: true,
|
|
21603
|
-
tokenName: 'shineout-extra',
|
|
21604
21603
|
selector: 'html'
|
|
21605
21604
|
});
|
|
21606
21605
|
;// CONCATENATED MODULE: ../shineout-style/src/pagination/pagination.ts
|
|
@@ -29679,7 +29678,7 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
29679
29678
|
style: hideStyle
|
|
29680
29679
|
};
|
|
29681
29680
|
var rect = context.parentRect;
|
|
29682
|
-
if (scrollElRef !== null && scrollElRef !== void 0 && scrollElRef.current && (_scrollElRef$current = scrollElRef.current) !== null && _scrollElRef$current !== void 0 && _scrollElRef$current.contains(parentElRef.current)) {
|
|
29681
|
+
if (!show && scrollElRef !== null && scrollElRef !== void 0 && scrollElRef.current && (_scrollElRef$current = scrollElRef.current) !== null && _scrollElRef$current !== void 0 && _scrollElRef$current.contains(parentElRef.current)) {
|
|
29683
29682
|
var _scrollElRef$current2;
|
|
29684
29683
|
var visibleRect = ((_scrollElRef$current2 = scrollElRef.current) === null || _scrollElRef$current2 === void 0 ? void 0 : _scrollElRef$current2.getBoundingClientRect()) || {};
|
|
29685
29684
|
if (rect.bottom < visibleRect.top || rect.top > visibleRect.bottom || rect.right < visibleRect.left || rect.left > visibleRect.right) {
|
|
@@ -36581,19 +36580,13 @@ var getFilterTree = function getFilterTree(treeNodes, filterFunc, filterExpandKe
|
|
|
36581
36580
|
return node;
|
|
36582
36581
|
});
|
|
36583
36582
|
};
|
|
36584
|
-
var mergeFilteredTree = function mergeFilteredTree(
|
|
36585
|
-
var
|
|
36586
|
-
var childrenKey = filterDatum.childrenKey;
|
|
36583
|
+
var mergeFilteredTree = function mergeFilteredTree(filterData, rawDatum, tiledId) {
|
|
36584
|
+
var childrenKey = rawDatum.childrenKey;
|
|
36587
36585
|
if (tiledId.length === 0) return filterData;
|
|
36588
36586
|
var recursion = function recursion(node) {
|
|
36589
|
-
var nodeKey =
|
|
36587
|
+
var nodeKey = rawDatum.getKey(node);
|
|
36590
36588
|
if (tiledId.indexOf(nodeKey) >= 0) {
|
|
36591
36589
|
node[childrenKey] = deepClone(rawDatum.getDataById(nodeKey)[childrenKey] || []);
|
|
36592
|
-
} else {
|
|
36593
|
-
var item = filterDatum.getDataById(nodeKey);
|
|
36594
|
-
if (item && item[childrenKey]) {
|
|
36595
|
-
node[childrenKey] = deepClone(item[childrenKey] || []);
|
|
36596
|
-
}
|
|
36597
36590
|
}
|
|
36598
36591
|
var children = node[childrenKey] || [];
|
|
36599
36592
|
children.map(recursion);
|
|
@@ -36767,6 +36760,7 @@ function use_tree_toArray(value) {
|
|
|
36767
36760
|
if (!Array.isArray(value)) return [value];
|
|
36768
36761
|
return value;
|
|
36769
36762
|
}
|
|
36763
|
+
var global_tree_map = new Map();
|
|
36770
36764
|
var MODE = {
|
|
36771
36765
|
/**
|
|
36772
36766
|
* 返回全选数据,包含父节点和子节点
|
|
@@ -37086,6 +37080,15 @@ var useTree = function useTree(props) {
|
|
|
37086
37080
|
return 2;
|
|
37087
37081
|
};
|
|
37088
37082
|
var setData = function setData(data) {
|
|
37083
|
+
// if(data && global_tree_map.get(data)){
|
|
37084
|
+
// context.cachedValue = global_tree_map.get(data)?.cachedValue || []
|
|
37085
|
+
// context.pathMap = global_tree_map.get(data)?.pathMap || new Map()
|
|
37086
|
+
// context.dataMap = global_tree_map.get(data)?.dataMap || new Map()
|
|
37087
|
+
// context.valueMap = global_tree_map.get(data)?.valueMap || new Map()
|
|
37088
|
+
// context.unmatchedValueMap = global_tree_map.get(data)?.unmatchedValueMap || new Map()
|
|
37089
|
+
// return
|
|
37090
|
+
// }
|
|
37091
|
+
|
|
37089
37092
|
var prevValue = context.value || [];
|
|
37090
37093
|
context.cachedValue = [];
|
|
37091
37094
|
context.pathMap = new Map();
|
|
@@ -37097,6 +37100,8 @@ var useTree = function useTree(props) {
|
|
|
37097
37100
|
initData(context.data, []);
|
|
37098
37101
|
initValue();
|
|
37099
37102
|
setValue(prevValue);
|
|
37103
|
+
|
|
37104
|
+
// global_tree_map.set(data, context)
|
|
37100
37105
|
};
|
|
37101
37106
|
var set = function set(id, checked, direction) {
|
|
37102
37107
|
if (!isDisabled(id)) {
|
|
@@ -50951,7 +50956,7 @@ var usePaginationList = function usePaginationList(props) {
|
|
|
50951
50956
|
|
|
50952
50957
|
|
|
50953
50958
|
var useTiled = function useTiled(props) {
|
|
50954
|
-
var
|
|
50959
|
+
var filterData = props.data,
|
|
50955
50960
|
keygen = props.keygen,
|
|
50956
50961
|
_props$childrenKey = props.childrenKey,
|
|
50957
50962
|
childrenKey = _props$childrenKey === void 0 ? 'children' : _props$childrenKey,
|
|
@@ -50968,19 +50973,19 @@ var useTiled = function useTiled(props) {
|
|
|
50968
50973
|
tileds = _useState2[0],
|
|
50969
50974
|
setTileds = _useState2[1];
|
|
50970
50975
|
var _useTree = use_tree({
|
|
50971
|
-
data: data,
|
|
50972
|
-
childrenKey: childrenKey,
|
|
50973
|
-
keygen: keygen,
|
|
50974
|
-
isControlled: false
|
|
50975
|
-
}),
|
|
50976
|
-
datum = _useTree.datum;
|
|
50977
|
-
var _useTree2 = use_tree({
|
|
50978
50976
|
data: rawData,
|
|
50977
|
+
datum: props.rawDatum,
|
|
50979
50978
|
childrenKey: childrenKey,
|
|
50980
50979
|
keygen: keygen,
|
|
50981
50980
|
isControlled: false
|
|
50982
50981
|
}),
|
|
50983
|
-
rawDatum =
|
|
50982
|
+
rawDatum = _useTree.datum;
|
|
50983
|
+
if (!filterText || !onAdvancedFilter) {
|
|
50984
|
+
return {
|
|
50985
|
+
data: filterData,
|
|
50986
|
+
onFilter: onFilter
|
|
50987
|
+
};
|
|
50988
|
+
}
|
|
50984
50989
|
var handleToggle = function handleToggle(e, key) {
|
|
50985
50990
|
e.stopPropagation();
|
|
50986
50991
|
var nextTileds = toConsumableArray_default()(tileds);
|
|
@@ -51012,13 +51017,7 @@ var useTiled = function useTiled(props) {
|
|
|
51012
51017
|
children: moreIcon()
|
|
51013
51018
|
});
|
|
51014
51019
|
};
|
|
51015
|
-
|
|
51016
|
-
return {
|
|
51017
|
-
data: data,
|
|
51018
|
-
onFilter: onFilter
|
|
51019
|
-
};
|
|
51020
|
-
}
|
|
51021
|
-
var nextData = mergeFilteredTree(datum, rawDatum, tileds);
|
|
51020
|
+
var nextData = mergeFilteredTree(filterData, rawDatum, tileds);
|
|
51022
51021
|
return {
|
|
51023
51022
|
data: nextData,
|
|
51024
51023
|
onFilter: handleFilter,
|
|
@@ -61500,10 +61499,6 @@ var TabsHeader = function TabsHeader(props) {
|
|
|
61500
61499
|
sticky = props.sticky;
|
|
61501
61500
|
var headerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
61502
61501
|
var scrollRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
61503
|
-
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
61504
|
-
_useState2 = slicedToArray_default()(_useState, 2),
|
|
61505
|
-
loaded = _useState2[0],
|
|
61506
|
-
setLoaded = _useState2[1];
|
|
61507
61502
|
var tabRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({});
|
|
61508
61503
|
var _useTabsContext = useTabsContext(),
|
|
61509
61504
|
shape = _useTabsContext.shape,
|
|
@@ -61512,11 +61507,6 @@ var TabsHeader = function TabsHeader(props) {
|
|
|
61512
61507
|
active = _useTabsContext.active;
|
|
61513
61508
|
var config = useConfig();
|
|
61514
61509
|
var isRtl = config.direction === 'rtl';
|
|
61515
|
-
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
61516
|
-
if (sticky && headerRef.current && scrollRef.current && !loaded) {
|
|
61517
|
-
setLoaded(true);
|
|
61518
|
-
}
|
|
61519
|
-
}, [loaded, sticky]);
|
|
61520
61510
|
var _useTransform = use_transform({
|
|
61521
61511
|
autoScroll: true,
|
|
61522
61512
|
direction: isVertical ? 'Y' : 'X',
|
|
@@ -61578,17 +61568,17 @@ var TabsHeader = function TabsHeader(props) {
|
|
|
61578
61568
|
var single = isRtl && !isVertical ? -1 : 1;
|
|
61579
61569
|
setTransform(delta + headerRef.current.clientWidth * single);
|
|
61580
61570
|
};
|
|
61581
|
-
var
|
|
61571
|
+
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({
|
|
61582
61572
|
offsetTop: 0,
|
|
61583
61573
|
offsetLeft: 0
|
|
61584
61574
|
}),
|
|
61575
|
+
_useState2 = slicedToArray_default()(_useState, 2),
|
|
61576
|
+
currentTabOffset = _useState2[0],
|
|
61577
|
+
setCurrentTabOffset = _useState2[1];
|
|
61578
|
+
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null),
|
|
61585
61579
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
61586
|
-
|
|
61587
|
-
|
|
61588
|
-
var _useState5 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null),
|
|
61589
|
-
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
61590
|
-
currentTabRect = _useState6[0],
|
|
61591
|
-
setCurrentTabRect = _useState6[1];
|
|
61580
|
+
currentTabRect = _useState4[0],
|
|
61581
|
+
setCurrentTabRect = _useState4[1];
|
|
61592
61582
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
61593
61583
|
var _currentTab$getBoundi;
|
|
61594
61584
|
if (shape !== 'line' && shape !== 'dash') return;
|
|
@@ -63160,7 +63150,8 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
63160
63150
|
childrenKey: childrenKey,
|
|
63161
63151
|
expanded: expanded,
|
|
63162
63152
|
rawData: rawData,
|
|
63163
|
-
onFilter: onFilter
|
|
63153
|
+
onFilter: onFilter,
|
|
63154
|
+
rawDatum: datum
|
|
63164
63155
|
}),
|
|
63165
63156
|
tiledData = _useTiled.data,
|
|
63166
63157
|
onTiledFilter = _useTiled.onFilter,
|
|
@@ -63187,6 +63178,15 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
63187
63178
|
closePop = _usePopup.closePop,
|
|
63188
63179
|
PopupProvider = _usePopup.Provider,
|
|
63189
63180
|
popupProviderValue = _usePopup.providerValue;
|
|
63181
|
+
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
63182
|
+
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
63183
|
+
hadOpened = _useState4[0],
|
|
63184
|
+
setHadOpened = _useState4[1];
|
|
63185
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
63186
|
+
if (open) {
|
|
63187
|
+
setHadOpened(true);
|
|
63188
|
+
}
|
|
63189
|
+
}, [open]);
|
|
63190
63190
|
var tipNode = use_tip({
|
|
63191
63191
|
popover: props.popover,
|
|
63192
63192
|
popoverProps: props.popoverProps,
|
|
@@ -63442,6 +63442,7 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
63442
63442
|
filterText: filterText,
|
|
63443
63443
|
onFilter: handleFilter,
|
|
63444
63444
|
onRef: inputRef,
|
|
63445
|
+
inputRef: inputRef,
|
|
63445
63446
|
checkUnMatched: checkUnMatched,
|
|
63446
63447
|
onClearCreatedData: onClearCreatedData,
|
|
63447
63448
|
getDataByValues: getResultByValue,
|
|
@@ -63561,7 +63562,7 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
63561
63562
|
onBlur: handleBlur,
|
|
63562
63563
|
onFocus: handleFocus,
|
|
63563
63564
|
onKeyDown: handleKeyDown,
|
|
63564
|
-
children: [tipNode, renderResult(), /*#__PURE__*/(0,jsx_runtime.jsx)(absolute_list, {
|
|
63565
|
+
children: [tipNode, renderResult(), hadOpened && /*#__PURE__*/(0,jsx_runtime.jsx)(absolute_list, {
|
|
63565
63566
|
adjust: adjust,
|
|
63566
63567
|
focus: open,
|
|
63567
63568
|
fixedWidth: "min",
|
|
@@ -67191,7 +67192,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
67191
67192
|
|
|
67192
67193
|
|
|
67193
67194
|
/* harmony default export */ var src_0 = ({
|
|
67194
|
-
version: '3.6.0-beta.
|
|
67195
|
+
version: '3.6.0-beta.2'
|
|
67195
67196
|
});
|
|
67196
67197
|
}();
|
|
67197
67198
|
/******/ return __webpack_exports__;
|