uiw 4.13.4 → 4.13.7
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/dist/uiw.css +4 -2
- package/dist/uiw.js +109 -90
- package/dist/uiw.min.css +1 -1
- package/dist/uiw.min.js +1 -1
- package/package.json +60 -65
package/dist/uiw.css
CHANGED
|
@@ -624,7 +624,7 @@
|
|
|
624
624
|
}
|
|
625
625
|
|
|
626
626
|
.w-modal {
|
|
627
|
-
z-index:
|
|
627
|
+
z-index: 990;
|
|
628
628
|
}
|
|
629
629
|
.w-modal-inner {
|
|
630
630
|
padding-bottom: 20px;
|
|
@@ -3847,7 +3847,8 @@ a.w-list-item:hover:not(.w-disabled) {
|
|
|
3847
3847
|
.w-search-select-input-contents input {
|
|
3848
3848
|
box-shadow: none;
|
|
3849
3849
|
padding: 0px;
|
|
3850
|
-
|
|
3850
|
+
min-width: 50px;
|
|
3851
|
+
height: 22px;
|
|
3851
3852
|
}
|
|
3852
3853
|
.w-search-select-input-contents .w-input-inner:hover {
|
|
3853
3854
|
box-shadow: none !important;
|
|
@@ -4952,6 +4953,7 @@ a.w-list-item:hover:not(.w-disabled) {
|
|
|
4952
4953
|
box-shadow: none;
|
|
4953
4954
|
padding: 0px;
|
|
4954
4955
|
height: 20px;
|
|
4956
|
+
min-width: 50px;
|
|
4955
4957
|
}
|
|
4956
4958
|
.w-search-tree-input-contents .w-input-inner:hover {
|
|
4957
4959
|
box-shadow: none !important;
|
package/dist/uiw.js
CHANGED
|
@@ -2814,7 +2814,7 @@ var normalizeDelay = delay => delay && typeof delay === 'object' ? delay : {
|
|
|
2814
2814
|
} = props,
|
|
2815
2815
|
other = _objectWithoutPropertiesLoose(props, react_overlay_trigger_esm_excluded);
|
|
2816
2816
|
|
|
2817
|
-
var zIndex = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(
|
|
2817
|
+
var zIndex = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(990);
|
|
2818
2818
|
var triggerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
|
|
2819
2819
|
var popupRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
|
|
2820
2820
|
var timeoutRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)([]);
|
|
@@ -7782,21 +7782,20 @@ var react_tag_esm_excluded = ["prefixCls", "className", "style", "title", "child
|
|
|
7782
7782
|
return null;
|
|
7783
7783
|
}
|
|
7784
7784
|
|
|
7785
|
-
var closeBtn = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => closable ? /*#__PURE__*/(0,jsx_runtime.jsx)("svg", {
|
|
7786
|
-
onClick: onClose,
|
|
7787
|
-
className: prefixCls + "-close",
|
|
7788
|
-
width: "15",
|
|
7789
|
-
height: "15",
|
|
7790
|
-
viewBox: "0 0 16 16",
|
|
7791
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)("path", {
|
|
7792
|
-
d: "M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z"
|
|
7793
|
-
})
|
|
7794
|
-
}) : null, [closable]);
|
|
7795
7785
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("span", _extends({
|
|
7796
7786
|
className: cls,
|
|
7797
7787
|
style: styl
|
|
7798
7788
|
}, other, {
|
|
7799
|
-
children: [title || children,
|
|
7789
|
+
children: [title || children, closable ? /*#__PURE__*/(0,jsx_runtime.jsx)("svg", {
|
|
7790
|
+
onClick: onClose,
|
|
7791
|
+
className: prefixCls + "-close",
|
|
7792
|
+
width: "15",
|
|
7793
|
+
height: "15",
|
|
7794
|
+
viewBox: "0 0 16 16",
|
|
7795
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)("path", {
|
|
7796
|
+
d: "M9.41 8l2.29-2.29c.19-.18.3-.43.3-.71a1.003 1.003 0 0 0-1.71-.71L8 6.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42L6.59 8 4.3 10.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71L8 9.41l2.29 2.29c.18.19.43.3.71.3a1.003 1.003 0 0 0 .71-1.71L9.41 8z"
|
|
7797
|
+
})
|
|
7798
|
+
}) : null]
|
|
7800
7799
|
}));
|
|
7801
7800
|
});
|
|
7802
7801
|
|
|
@@ -8015,7 +8014,8 @@ function SearchSelect(props) {
|
|
|
8015
8014
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
8016
8015
|
style: {
|
|
8017
8016
|
display: 'flex',
|
|
8018
|
-
flexFlow: 'wrap'
|
|
8017
|
+
flexFlow: 'wrap',
|
|
8018
|
+
width: '100%'
|
|
8019
8019
|
},
|
|
8020
8020
|
children: [isMultiple && selectedValue.slice(0, maxTagCount).map((item, index) => {
|
|
8021
8021
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(react_tag_esm, _extends({
|
|
@@ -8359,7 +8359,11 @@ function Step(props) {
|
|
|
8359
8359
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
8360
8360
|
className: prefixCls + "-item-tail",
|
|
8361
8361
|
style: stepItemDotStyle,
|
|
8362
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
8362
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
8363
|
+
style: {
|
|
8364
|
+
paddingRight: '100%'
|
|
8365
|
+
}
|
|
8366
|
+
})
|
|
8363
8367
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
8364
8368
|
className: prefixCls + "-item-head",
|
|
8365
8369
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
@@ -9068,75 +9072,80 @@ var react_table_esm_excluded = ["prefixCls", "className", "columns", "data", "ti
|
|
|
9068
9072
|
ellipsis
|
|
9069
9073
|
} = getLevelItems(columns);
|
|
9070
9074
|
var keys = getAllColumnsKeys(columns);
|
|
9071
|
-
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div",
|
|
9072
|
-
|
|
9073
|
-
|
|
9074
|
-
|
|
9075
|
-
|
|
9076
|
-
|
|
9077
|
-
|
|
9078
|
-
children:
|
|
9079
|
-
|
|
9080
|
-
|
|
9081
|
-
|
|
9082
|
-
|
|
9083
|
-
|
|
9084
|
-
|
|
9085
|
-
|
|
9086
|
-
|
|
9087
|
-
|
|
9088
|
-
|
|
9089
|
-
|
|
9090
|
-
|
|
9091
|
-
|
|
9092
|
-
|
|
9093
|
-
|
|
9094
|
-
|
|
9095
|
-
|
|
9096
|
-
|
|
9097
|
-
|
|
9098
|
-
|
|
9099
|
-
|
|
9100
|
-
if (child.props
|
|
9101
|
-
|
|
9102
|
-
|
|
9103
|
-
|
|
9104
|
-
|
|
9075
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
9076
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", _extends({
|
|
9077
|
+
style: {
|
|
9078
|
+
overflowY: 'scroll'
|
|
9079
|
+
},
|
|
9080
|
+
className: cls
|
|
9081
|
+
}, other, {
|
|
9082
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
|
|
9083
|
+
style: ellipsis ? {
|
|
9084
|
+
tableLayout: 'fixed'
|
|
9085
|
+
} : {},
|
|
9086
|
+
children: [title && /*#__PURE__*/(0,jsx_runtime.jsx)("caption", {
|
|
9087
|
+
children: title
|
|
9088
|
+
}), columns && columns.length > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(Thead, {
|
|
9089
|
+
onCellHead: onCellHead,
|
|
9090
|
+
data: header
|
|
9091
|
+
}), data && data.length > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)("tbody", {
|
|
9092
|
+
children: data.map((trData, rowNum) => /*#__PURE__*/(0,jsx_runtime.jsx)("tr", {
|
|
9093
|
+
children: keys.map((keyName, colNum) => {
|
|
9094
|
+
var objs = {
|
|
9095
|
+
children: trData[keyName]
|
|
9096
|
+
};
|
|
9097
|
+
|
|
9098
|
+
if (render[keyName]) {
|
|
9099
|
+
var child = render[keyName](trData[keyName], keyName, trData, rowNum, colNum);
|
|
9100
|
+
|
|
9101
|
+
if ( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(child)) {
|
|
9102
|
+
objs.children = child;
|
|
9103
|
+
} else {
|
|
9104
|
+
if (child.props) {
|
|
9105
|
+
objs = _extends({}, child.props, {
|
|
9106
|
+
children: objs.children
|
|
9107
|
+
});
|
|
9108
|
+
if (child.props.rowSpan === 0 || child.props.colSpan === 0) return null;
|
|
9109
|
+
}
|
|
9110
|
+
|
|
9111
|
+
if (child.children) {
|
|
9112
|
+
objs.children = child.children;
|
|
9113
|
+
}
|
|
9105
9114
|
}
|
|
9106
9115
|
}
|
|
9107
|
-
}
|
|
9108
9116
|
|
|
9109
|
-
|
|
9110
|
-
|
|
9111
|
-
|
|
9117
|
+
if (ellipsis && ellipsis[keyName]) {
|
|
9118
|
+
objs.className = prefixCls + "-ellipsis";
|
|
9119
|
+
}
|
|
9112
9120
|
|
|
9113
|
-
|
|
9114
|
-
|
|
9115
|
-
|
|
9116
|
-
|
|
9117
|
-
|
|
9118
|
-
|
|
9119
|
-
|
|
9120
|
-
|
|
9121
|
-
|
|
9122
|
-
|
|
9123
|
-
|
|
9124
|
-
|
|
9125
|
-
|
|
9126
|
-
|
|
9127
|
-
|
|
9128
|
-
|
|
9129
|
-
|
|
9130
|
-
|
|
9131
|
-
|
|
9121
|
+
return /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement)("td", _extends({}, objs, {
|
|
9122
|
+
key: colNum,
|
|
9123
|
+
onClick: evn => onCell(trData, {
|
|
9124
|
+
rowNum,
|
|
9125
|
+
colNum,
|
|
9126
|
+
keyName
|
|
9127
|
+
}, evn)
|
|
9128
|
+
}));
|
|
9129
|
+
})
|
|
9130
|
+
}, rowNum))
|
|
9131
|
+
}), data && data.length === 0 && empty && /*#__PURE__*/(0,jsx_runtime.jsx)("tbody", {
|
|
9132
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)("tr", {
|
|
9133
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)("td", {
|
|
9134
|
+
colSpan: columns.length,
|
|
9135
|
+
style: {
|
|
9136
|
+
position: 'relative',
|
|
9137
|
+
left: 0
|
|
9138
|
+
},
|
|
9139
|
+
children: empty
|
|
9140
|
+
})
|
|
9132
9141
|
})
|
|
9133
|
-
})
|
|
9134
|
-
})
|
|
9135
|
-
}), footer && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
9142
|
+
}), props.children]
|
|
9143
|
+
})
|
|
9144
|
+
})), footer && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
9136
9145
|
className: prefixCls + "-footer",
|
|
9137
9146
|
children: footer
|
|
9138
9147
|
})]
|
|
9139
|
-
})
|
|
9148
|
+
});
|
|
9140
9149
|
});
|
|
9141
9150
|
|
|
9142
9151
|
;// CONCATENATED MODULE: ../react-tabs/esm/Pane.js
|
|
@@ -9467,7 +9476,7 @@ function TreeNode(props) {
|
|
|
9467
9476
|
;// CONCATENATED MODULE: ../react-tree/esm/index.js
|
|
9468
9477
|
|
|
9469
9478
|
|
|
9470
|
-
var react_tree_esm_excluded = ["prefixCls", "icon", "data", "openKeys", "selectedKeys", "defaultExpandAll", "showLine", "iconAnimation", "isSelected", "checkStrictly", "multiple", "onExpand", "onSelected", "className", "autoExpandParent", "renderTitle"];
|
|
9479
|
+
var react_tree_esm_excluded = ["prefixCls", "icon", "data", "openKeys", "selectedKeys", "defaultExpandAll", "showLine", "iconAnimation", "isSelected", "checkStrictly", "multiple", "onExpand", "onSelected", "className", "autoExpandParent", "renderTitle", "onChange"];
|
|
9471
9480
|
|
|
9472
9481
|
|
|
9473
9482
|
|
|
@@ -9582,24 +9591,28 @@ function Tree(props) {
|
|
|
9582
9591
|
onSelected = noop,
|
|
9583
9592
|
className,
|
|
9584
9593
|
autoExpandParent = true,
|
|
9585
|
-
renderTitle
|
|
9594
|
+
renderTitle,
|
|
9595
|
+
onChange
|
|
9586
9596
|
} = props,
|
|
9587
9597
|
elementProps = _objectWithoutPropertiesLoose(props, react_tree_esm_excluded);
|
|
9588
9598
|
|
|
9589
9599
|
var [curOpenKeys, setCurOpenKeys] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(openKeys);
|
|
9590
|
-
var [curSelectedKeys, setCurSelectedKeys] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(selectedKeys);
|
|
9600
|
+
var [curSelectedKeys, setCurSelectedKeys] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(props.value || selectedKeys);
|
|
9591
9601
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
|
|
9592
9602
|
setCurSelectedKeys(props.selectedKeys || []);
|
|
9593
|
-
}, [JSON.stringify(props.selectedKeys)]);
|
|
9603
|
+
}, [JSON.stringify(props.selectedKeys)]);
|
|
9604
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
|
|
9605
|
+
setCurSelectedKeys(props.value || []);
|
|
9606
|
+
}, [JSON.stringify(props.value)]); // useEffect(() => setCurOpenKeys(openKeys), [openKeys]);
|
|
9594
9607
|
// useEffect(() => setCurSelectedKeys(selectedKeys), [selectedKeys]);
|
|
9595
9608
|
|
|
9596
9609
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
|
|
9597
|
-
var arrOpenKeys = curOpenKeys;
|
|
9610
|
+
var arrOpenKeys = [...curOpenKeys];
|
|
9598
9611
|
|
|
9599
9612
|
if (defaultExpandAll) {
|
|
9600
9613
|
arrOpenKeys = getChildKeys(data);
|
|
9601
9614
|
} else if (autoExpandParent) {
|
|
9602
|
-
arrOpenKeys.push(...getChildKeys(data, undefined, 1));
|
|
9615
|
+
arrOpenKeys.push(...getChildKeys(data || [], undefined, 1));
|
|
9603
9616
|
}
|
|
9604
9617
|
|
|
9605
9618
|
setCurOpenKeys(arrOpenKeys);
|
|
@@ -9661,6 +9674,7 @@ function Tree(props) {
|
|
|
9661
9674
|
|
|
9662
9675
|
setCurSelectedKeys(selKeys);
|
|
9663
9676
|
onSelected && onSelected(selKeys, item.key, selected, item, evn);
|
|
9677
|
+
onChange == null ? void 0 : onChange(selKeys);
|
|
9664
9678
|
}
|
|
9665
9679
|
|
|
9666
9680
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", _extends({
|
|
@@ -9840,7 +9854,7 @@ function SearchTagInput(props) {
|
|
|
9840
9854
|
});
|
|
9841
9855
|
|
|
9842
9856
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(content, newProps);
|
|
9843
|
-
}, [selectedOption, options, emptyOption]);
|
|
9857
|
+
}, [JSON.parse(JSON.stringify(selectedOption)), options, emptyOption]);
|
|
9844
9858
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(Dropdown, _extends({
|
|
9845
9859
|
className: cls,
|
|
9846
9860
|
trigger: "focus"
|
|
@@ -9869,7 +9883,8 @@ function SearchTagInput(props) {
|
|
|
9869
9883
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
9870
9884
|
style: {
|
|
9871
9885
|
display: 'flex',
|
|
9872
|
-
flexFlow: 'wrap'
|
|
9886
|
+
flexFlow: 'wrap',
|
|
9887
|
+
width: '100%'
|
|
9873
9888
|
},
|
|
9874
9889
|
children: [selectedOption.map((item, index) => {
|
|
9875
9890
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(react_tag_esm, {
|
|
@@ -9904,7 +9919,8 @@ function SearchTagInput(props) {
|
|
|
9904
9919
|
})]
|
|
9905
9920
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
9906
9921
|
style: {
|
|
9907
|
-
height: 25
|
|
9922
|
+
height: 25,
|
|
9923
|
+
width: 14
|
|
9908
9924
|
},
|
|
9909
9925
|
className: prefixCls + "-close-tag-contents",
|
|
9910
9926
|
children: (selectIconType === 'close' || selectIconType === 'loading' && loading) && /*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
|
|
@@ -10049,7 +10065,7 @@ function SearchTree(props) {
|
|
|
10049
10065
|
var [selectedOptions, selectedOptionSet] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(options);
|
|
10050
10066
|
var [isEmpty, isEmptySet] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(emptyOption);
|
|
10051
10067
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
|
|
10052
|
-
selectedValuesSet(value);
|
|
10068
|
+
selectedValuesSet(Array.isArray(value) ? value : []);
|
|
10053
10069
|
}, [JSON.stringify(value)]);
|
|
10054
10070
|
|
|
10055
10071
|
var selectedChange = (resultValue, cur, isChecked) => {
|
|
@@ -10070,18 +10086,21 @@ function SearchTree(props) {
|
|
|
10070
10086
|
};
|
|
10071
10087
|
|
|
10072
10088
|
var selectedSearch = searchValue => {
|
|
10073
|
-
var hiddenNodeForSeach = childrens
|
|
10089
|
+
var hiddenNodeForSeach = function hiddenNodeForSeach(childrens, parentIsHide) {
|
|
10090
|
+
if (parentIsHide === void 0) {
|
|
10091
|
+
parentIsHide = true;
|
|
10092
|
+
}
|
|
10093
|
+
|
|
10074
10094
|
childrens.forEach(child => {
|
|
10075
10095
|
var _child$children2;
|
|
10076
10096
|
|
|
10077
|
-
var isHide = !child.label.includes(searchValue);
|
|
10097
|
+
var isHide = !child.label.includes(searchValue.trim()) && parentIsHide;
|
|
10078
10098
|
|
|
10079
10099
|
if (!!((_child$children2 = child.children) != null && _child$children2.length)) {
|
|
10080
|
-
hiddenNodeForSeach(child.children);
|
|
10100
|
+
hiddenNodeForSeach(child.children, isHide);
|
|
10081
10101
|
var find = child.children.find(item => !item.hideNode);
|
|
10082
10102
|
child.hideNode = isHide && !find;
|
|
10083
10103
|
} else {
|
|
10084
|
-
// const isHide = !(child.label as string).includes(searchValue)
|
|
10085
10104
|
child.hideNode = isHide;
|
|
10086
10105
|
}
|
|
10087
10106
|
});
|
|
@@ -10096,7 +10115,7 @@ function SearchTree(props) {
|
|
|
10096
10115
|
|
|
10097
10116
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(esm_SearchTagInput, _extends({}, other, {
|
|
10098
10117
|
emptyOption: isEmpty,
|
|
10099
|
-
onSearch: debounce(selectedSearch,
|
|
10118
|
+
onSearch: debounce(selectedSearch, 600),
|
|
10100
10119
|
onChange: selectedChange,
|
|
10101
10120
|
values: selectedValues,
|
|
10102
10121
|
options: selectedOptions,
|