uiw 4.13.5 → 4.13.8
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 +23 -1
- package/dist/uiw.js +236 -112
- package/dist/uiw.min.css +1 -1
- package/dist/uiw.min.js +1 -1
- package/package.json +60 -65
package/dist/uiw.css
CHANGED
|
@@ -2717,6 +2717,10 @@ sup.w-badge-count {
|
|
|
2717
2717
|
color: #dc3545;
|
|
2718
2718
|
}
|
|
2719
2719
|
.w-form-item-error .w-input-inner,
|
|
2720
|
+
.w-form-item-error .w-select,
|
|
2721
|
+
.w-form-item-error .w-select-default,
|
|
2722
|
+
.w-form-item-error .w-select:hover,
|
|
2723
|
+
.w-form-item-error .w-select-default:hover,
|
|
2720
2724
|
.w-form-item-error .w-input-inner:hover,
|
|
2721
2725
|
.w-form-item-error .w-input-inner:focus.w-input-inner:hover,
|
|
2722
2726
|
.w-form-item-error .w-textarea,
|
|
@@ -3847,7 +3851,8 @@ a.w-list-item:hover:not(.w-disabled) {
|
|
|
3847
3851
|
.w-search-select-input-contents input {
|
|
3848
3852
|
box-shadow: none;
|
|
3849
3853
|
padding: 0px;
|
|
3850
|
-
|
|
3854
|
+
min-width: 50px;
|
|
3855
|
+
height: 22px;
|
|
3851
3856
|
}
|
|
3852
3857
|
.w-search-select-input-contents .w-input-inner:hover {
|
|
3853
3858
|
box-shadow: none !important;
|
|
@@ -4640,10 +4645,19 @@ a.w-list-item:hover:not(.w-disabled) {
|
|
|
4640
4645
|
|
|
4641
4646
|
.w-tabs-bar {
|
|
4642
4647
|
position: relative;
|
|
4648
|
+
overflow-x: auto;
|
|
4649
|
+
height: calc(100% + 17px);
|
|
4643
4650
|
}
|
|
4644
4651
|
.w-tabs-nav {
|
|
4645
4652
|
position: relative;
|
|
4646
4653
|
}
|
|
4654
|
+
.w-tabs-nav-hidden {
|
|
4655
|
+
display: flex;
|
|
4656
|
+
overflow-x: scroll;
|
|
4657
|
+
padding: 5px 30px 5px 5px;
|
|
4658
|
+
max-height: 200px;
|
|
4659
|
+
flex-direction: column;
|
|
4660
|
+
}
|
|
4647
4661
|
.w-tabs-item {
|
|
4648
4662
|
padding: 7px 10px;
|
|
4649
4663
|
display: inline-block;
|
|
@@ -4666,6 +4680,12 @@ a.w-list-item:hover:not(.w-disabled) {
|
|
|
4666
4680
|
user-select: none;
|
|
4667
4681
|
color: rgba(0, 0, 0, 0.25);
|
|
4668
4682
|
}
|
|
4683
|
+
.w-tabs-flow-content {
|
|
4684
|
+
margin-left: 5px;
|
|
4685
|
+
padding: 0px 10px 0px 10px;
|
|
4686
|
+
box-shadow: 1px 0px 0px #d9d9d9 inset;
|
|
4687
|
+
cursor: pointer;
|
|
4688
|
+
}
|
|
4669
4689
|
.w-tabs-card .w-tabs-nav::after,
|
|
4670
4690
|
.w-tabs-line .w-tabs-nav::after {
|
|
4671
4691
|
content: '';
|
|
@@ -4770,6 +4790,7 @@ a.w-list-item:hover:not(.w-disabled) {
|
|
|
4770
4790
|
background-color: rgba(0, 0, 0, 0.75);
|
|
4771
4791
|
border-radius: 4px;
|
|
4772
4792
|
box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
|
|
4793
|
+
word-break: break-all;
|
|
4773
4794
|
}
|
|
4774
4795
|
.w-tooltip.right .w-tooltip-arrow,
|
|
4775
4796
|
.w-tooltip.rightTop .w-tooltip-arrow,
|
|
@@ -4952,6 +4973,7 @@ a.w-list-item:hover:not(.w-disabled) {
|
|
|
4952
4973
|
box-shadow: none;
|
|
4953
4974
|
padding: 0px;
|
|
4954
4975
|
height: 20px;
|
|
4976
|
+
min-width: 50px;
|
|
4955
4977
|
}
|
|
4956
4978
|
.w-search-tree-input-contents .w-input-inner:hover {
|
|
4957
4979
|
box-shadow: none !important;
|
package/dist/uiw.js
CHANGED
|
@@ -8014,7 +8014,8 @@ function SearchSelect(props) {
|
|
|
8014
8014
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
8015
8015
|
style: {
|
|
8016
8016
|
display: 'flex',
|
|
8017
|
-
flexFlow: 'wrap'
|
|
8017
|
+
flexFlow: 'wrap',
|
|
8018
|
+
width: '100%'
|
|
8018
8019
|
},
|
|
8019
8020
|
children: [isMultiple && selectedValue.slice(0, maxTagCount).map((item, index) => {
|
|
8020
8021
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(react_tag_esm, _extends({
|
|
@@ -9071,75 +9072,80 @@ var react_table_esm_excluded = ["prefixCls", "className", "columns", "data", "ti
|
|
|
9071
9072
|
ellipsis
|
|
9072
9073
|
} = getLevelItems(columns);
|
|
9073
9074
|
var keys = getAllColumnsKeys(columns);
|
|
9074
|
-
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div",
|
|
9075
|
-
|
|
9076
|
-
|
|
9077
|
-
|
|
9078
|
-
|
|
9079
|
-
|
|
9080
|
-
|
|
9081
|
-
children:
|
|
9082
|
-
|
|
9083
|
-
|
|
9084
|
-
|
|
9085
|
-
|
|
9086
|
-
|
|
9087
|
-
|
|
9088
|
-
|
|
9089
|
-
|
|
9090
|
-
|
|
9091
|
-
|
|
9092
|
-
|
|
9093
|
-
|
|
9094
|
-
|
|
9095
|
-
|
|
9096
|
-
|
|
9097
|
-
|
|
9098
|
-
|
|
9099
|
-
|
|
9100
|
-
|
|
9101
|
-
|
|
9102
|
-
|
|
9103
|
-
if (child.props
|
|
9104
|
-
|
|
9105
|
-
|
|
9106
|
-
|
|
9107
|
-
|
|
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
|
+
}
|
|
9108
9114
|
}
|
|
9109
9115
|
}
|
|
9110
|
-
}
|
|
9111
9116
|
|
|
9112
|
-
|
|
9113
|
-
|
|
9114
|
-
|
|
9117
|
+
if (ellipsis && ellipsis[keyName]) {
|
|
9118
|
+
objs.className = prefixCls + "-ellipsis";
|
|
9119
|
+
}
|
|
9115
9120
|
|
|
9116
|
-
|
|
9117
|
-
|
|
9118
|
-
|
|
9119
|
-
|
|
9120
|
-
|
|
9121
|
-
|
|
9122
|
-
|
|
9123
|
-
|
|
9124
|
-
|
|
9125
|
-
|
|
9126
|
-
|
|
9127
|
-
|
|
9128
|
-
|
|
9129
|
-
|
|
9130
|
-
|
|
9131
|
-
|
|
9132
|
-
|
|
9133
|
-
|
|
9134
|
-
|
|
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
|
+
})
|
|
9135
9141
|
})
|
|
9136
|
-
})
|
|
9137
|
-
})
|
|
9138
|
-
}), footer && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
9142
|
+
}), props.children]
|
|
9143
|
+
})
|
|
9144
|
+
})), footer && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
9139
9145
|
className: prefixCls + "-footer",
|
|
9140
9146
|
children: footer
|
|
9141
9147
|
})]
|
|
9142
|
-
})
|
|
9148
|
+
});
|
|
9143
9149
|
});
|
|
9144
9150
|
|
|
9145
9151
|
;// CONCATENATED MODULE: ../react-tabs/esm/Pane.js
|
|
@@ -9177,8 +9183,11 @@ var react_tabs_esm_excluded = ["prefixCls", "className", "children", "type", "ac
|
|
|
9177
9183
|
|
|
9178
9184
|
|
|
9179
9185
|
|
|
9186
|
+
|
|
9180
9187
|
Tabs.Pane = Pane;
|
|
9181
9188
|
function Tabs(props) {
|
|
9189
|
+
var _flowNav$nav;
|
|
9190
|
+
|
|
9182
9191
|
var {
|
|
9183
9192
|
prefixCls = 'w-tabs',
|
|
9184
9193
|
className,
|
|
@@ -9195,6 +9204,71 @@ function Tabs(props) {
|
|
|
9195
9204
|
});
|
|
9196
9205
|
var activeItem = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
|
|
9197
9206
|
var cls = [prefixCls, className, type ? prefixCls + "-" + type : null].filter(Boolean).join(' ').trim();
|
|
9207
|
+
var [flowNav, flowNavSet] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({
|
|
9208
|
+
content: 0,
|
|
9209
|
+
nav: [],
|
|
9210
|
+
flowLeft: -1,
|
|
9211
|
+
displayStart: 0,
|
|
9212
|
+
displayEnd: 0
|
|
9213
|
+
});
|
|
9214
|
+
var [hiddenNav, hiddenNavSet] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([]);
|
|
9215
|
+
var deviation = 15;
|
|
9216
|
+
var [nodes, nodesSet] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)();
|
|
9217
|
+
var divContentRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(node => {
|
|
9218
|
+
if (node !== null) {
|
|
9219
|
+
nodesSet(nodes);
|
|
9220
|
+
node.addEventListener('scroll', e => {
|
|
9221
|
+
var {
|
|
9222
|
+
clientWidth,
|
|
9223
|
+
scrollLeft
|
|
9224
|
+
} = e.target;
|
|
9225
|
+
flowNav.displayStart = scrollLeft;
|
|
9226
|
+
flowNav.displayEnd = clientWidth + scrollLeft;
|
|
9227
|
+
flowNavSet(_extends({}, flowNav));
|
|
9228
|
+
});
|
|
9229
|
+
flowNav.displayEnd = node.getBoundingClientRect().width;
|
|
9230
|
+
flowNavSet(_extends({}, flowNav));
|
|
9231
|
+
}
|
|
9232
|
+
}, []);
|
|
9233
|
+
var divNavRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)((node, key) => {
|
|
9234
|
+
if (node !== null) {
|
|
9235
|
+
node.addEventListener('click', e => {
|
|
9236
|
+
activeItem.current = node;
|
|
9237
|
+
});
|
|
9238
|
+
divNavWidthChange(node.getBoundingClientRect().width, key);
|
|
9239
|
+
}
|
|
9240
|
+
}, []);
|
|
9241
|
+
|
|
9242
|
+
var divNavWidthChange = (width, index) => {
|
|
9243
|
+
var curWidth = 0;
|
|
9244
|
+
flowNav.nav.slice(0, index + 1).forEach(nav => curWidth += nav.width);
|
|
9245
|
+
flowNav.nav[index] = {
|
|
9246
|
+
width,
|
|
9247
|
+
curWidth: Math.floor(curWidth),
|
|
9248
|
+
index
|
|
9249
|
+
};
|
|
9250
|
+
flowNavSet(flowNav);
|
|
9251
|
+
};
|
|
9252
|
+
|
|
9253
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
|
|
9254
|
+
showHideenNav();
|
|
9255
|
+
}, [flowNav.displayEnd > ((_flowNav$nav = flowNav.nav[flowNav.nav.length - 1]) == null ? void 0 : _flowNav$nav.curWidth)]);
|
|
9256
|
+
|
|
9257
|
+
var showHideenNav = () => {
|
|
9258
|
+
var hiddenNav = [];
|
|
9259
|
+
|
|
9260
|
+
if (flowNav.nav.length > 0) {
|
|
9261
|
+
flowNav.nav.forEach(item => {
|
|
9262
|
+
var curWidth = item.curWidth - deviation;
|
|
9263
|
+
|
|
9264
|
+
if (curWidth < flowNav.displayStart || curWidth > flowNav.displayEnd) {
|
|
9265
|
+
hiddenNav.push(item.index);
|
|
9266
|
+
}
|
|
9267
|
+
});
|
|
9268
|
+
hiddenNavSet(hiddenNav);
|
|
9269
|
+
}
|
|
9270
|
+
};
|
|
9271
|
+
|
|
9198
9272
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => setActiveKey(props.activeKey), [props.activeKey]);
|
|
9199
9273
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => calcSlideStyle(), [activeKey]);
|
|
9200
9274
|
|
|
@@ -9211,38 +9285,42 @@ function Tabs(props) {
|
|
|
9211
9285
|
className: cls
|
|
9212
9286
|
}, elementProps, {
|
|
9213
9287
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
9214
|
-
|
|
9288
|
+
style: {
|
|
9289
|
+
display: 'flex'
|
|
9290
|
+
},
|
|
9215
9291
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
9216
|
-
|
|
9217
|
-
|
|
9218
|
-
|
|
9219
|
-
|
|
9220
|
-
|
|
9221
|
-
|
|
9222
|
-
|
|
9223
|
-
className:
|
|
9224
|
-
|
|
9225
|
-
|
|
9226
|
-
|
|
9227
|
-
|
|
9228
|
-
|
|
9229
|
-
setActiveKey(item.key);
|
|
9230
|
-
onTabClick && onTabClick(item.key, item, e);
|
|
9231
|
-
calcSlideStyle();
|
|
9232
|
-
};
|
|
9233
|
-
}
|
|
9234
|
-
|
|
9235
|
-
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", _extends({
|
|
9236
|
-
ref: node => {
|
|
9237
|
-
if (node && item.key === activeKey) {
|
|
9238
|
-
activeItem.current = node;
|
|
9239
|
-
}
|
|
9240
|
-
}
|
|
9241
|
-
}, divProps), key);
|
|
9292
|
+
style: {
|
|
9293
|
+
overflow: 'hidden'
|
|
9294
|
+
},
|
|
9295
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
9296
|
+
className: prefixCls + "-bar",
|
|
9297
|
+
ref: divContentRef,
|
|
9298
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
9299
|
+
className: prefixCls + "-nav",
|
|
9300
|
+
style: {
|
|
9301
|
+
width: 'max-content'
|
|
9302
|
+
},
|
|
9303
|
+
children: renderNav(children)
|
|
9304
|
+
})
|
|
9242
9305
|
})
|
|
9243
9306
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
9244
9307
|
style: slideStyle,
|
|
9245
9308
|
className: prefixCls + "-slide"
|
|
9309
|
+
}), hiddenNav.length > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(Popover, {
|
|
9310
|
+
trigger: "click",
|
|
9311
|
+
placement: "bottomRight",
|
|
9312
|
+
visibleArrow: false,
|
|
9313
|
+
content: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
9314
|
+
className: prefixCls + "-nav-hidden",
|
|
9315
|
+
children: renderNav(hiddenNav.map(idx => children[idx]))
|
|
9316
|
+
}),
|
|
9317
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
9318
|
+
onClick: showHideenNav,
|
|
9319
|
+
className: prefixCls + "-flow-content",
|
|
9320
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
9321
|
+
children: "\u2026"
|
|
9322
|
+
})
|
|
9323
|
+
})
|
|
9246
9324
|
})]
|
|
9247
9325
|
}), external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.map(children, item => {
|
|
9248
9326
|
if (!item || activeKey !== item.key) {
|
|
@@ -9252,6 +9330,31 @@ function Tabs(props) {
|
|
|
9252
9330
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(item, Object.assign({}, item.props, {}));
|
|
9253
9331
|
})]
|
|
9254
9332
|
}));
|
|
9333
|
+
|
|
9334
|
+
function renderNav(children) {
|
|
9335
|
+
return external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.map(children, (item, key) => {
|
|
9336
|
+
if (!item) {
|
|
9337
|
+
return null;
|
|
9338
|
+
}
|
|
9339
|
+
|
|
9340
|
+
var divProps = {
|
|
9341
|
+
className: [prefixCls + "-item", item.key === activeKey ? 'active' : null, item.props.disabled ? 'disabled' : null].filter(Boolean).join(' ').trim(),
|
|
9342
|
+
children: item.props.label
|
|
9343
|
+
};
|
|
9344
|
+
|
|
9345
|
+
if (!item.props.disabled) {
|
|
9346
|
+
divProps.onClick = e => {
|
|
9347
|
+
setActiveKey(item.key);
|
|
9348
|
+
onTabClick && onTabClick(item.key, item, e);
|
|
9349
|
+
calcSlideStyle();
|
|
9350
|
+
};
|
|
9351
|
+
}
|
|
9352
|
+
|
|
9353
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", _extends({
|
|
9354
|
+
ref: _ref => divNavRef(_ref, key)
|
|
9355
|
+
}, divProps), key);
|
|
9356
|
+
});
|
|
9357
|
+
}
|
|
9255
9358
|
}
|
|
9256
9359
|
|
|
9257
9360
|
;// CONCATENATED MODULE: ../react-textarea/esm/style/index.css
|
|
@@ -9470,7 +9573,7 @@ function TreeNode(props) {
|
|
|
9470
9573
|
;// CONCATENATED MODULE: ../react-tree/esm/index.js
|
|
9471
9574
|
|
|
9472
9575
|
|
|
9473
|
-
var react_tree_esm_excluded = ["prefixCls", "icon", "data", "openKeys", "selectedKeys", "defaultExpandAll", "showLine", "iconAnimation", "isSelected", "checkStrictly", "multiple", "onExpand", "onSelected", "className", "autoExpandParent", "renderTitle"];
|
|
9576
|
+
var react_tree_esm_excluded = ["prefixCls", "icon", "data", "openKeys", "selectedKeys", "defaultExpandAll", "showLine", "iconAnimation", "isSelected", "checkStrictly", "multiple", "onExpand", "onSelected", "className", "autoExpandParent", "renderTitle", "onChange", "value"];
|
|
9474
9577
|
|
|
9475
9578
|
|
|
9476
9579
|
|
|
@@ -9585,24 +9688,24 @@ function Tree(props) {
|
|
|
9585
9688
|
onSelected = noop,
|
|
9586
9689
|
className,
|
|
9587
9690
|
autoExpandParent = true,
|
|
9588
|
-
renderTitle
|
|
9691
|
+
renderTitle,
|
|
9692
|
+
onChange,
|
|
9693
|
+
value
|
|
9589
9694
|
} = props,
|
|
9590
9695
|
elementProps = _objectWithoutPropertiesLoose(props, react_tree_esm_excluded);
|
|
9591
9696
|
|
|
9592
9697
|
var [curOpenKeys, setCurOpenKeys] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(openKeys);
|
|
9593
|
-
var [curSelectedKeys, setCurSelectedKeys] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(selectedKeys);
|
|
9698
|
+
var [curSelectedKeys, setCurSelectedKeys] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(value || selectedKeys);
|
|
9594
9699
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
|
|
9595
|
-
setCurSelectedKeys(props.selectedKeys || []);
|
|
9596
|
-
}, [JSON.stringify(props.selectedKeys)
|
|
9597
|
-
// useEffect(() => setCurSelectedKeys(selectedKeys), [selectedKeys]);
|
|
9598
|
-
|
|
9700
|
+
setCurSelectedKeys(props.value || props.selectedKeys || []);
|
|
9701
|
+
}, [JSON.stringify(props.selectedKeys), JSON.stringify(props.value)]);
|
|
9599
9702
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
|
|
9600
9703
|
var arrOpenKeys = [...curOpenKeys];
|
|
9601
9704
|
|
|
9602
9705
|
if (defaultExpandAll) {
|
|
9603
9706
|
arrOpenKeys = getChildKeys(data);
|
|
9604
9707
|
} else if (autoExpandParent) {
|
|
9605
|
-
arrOpenKeys.push(...getChildKeys(data, undefined, 1));
|
|
9708
|
+
arrOpenKeys.push(...getChildKeys(data || [], undefined, 1));
|
|
9606
9709
|
}
|
|
9607
9710
|
|
|
9608
9711
|
setCurOpenKeys(arrOpenKeys);
|
|
@@ -9640,7 +9743,7 @@ function Tree(props) {
|
|
|
9640
9743
|
var findKey = selKeys.find(v => v === item.key);
|
|
9641
9744
|
var selected = false;
|
|
9642
9745
|
|
|
9643
|
-
if (!findKey) {
|
|
9746
|
+
if (!findKey && findKey !== 0) {
|
|
9644
9747
|
selected = true;
|
|
9645
9748
|
selKeys.push(item.key);
|
|
9646
9749
|
} else {
|
|
@@ -9664,6 +9767,7 @@ function Tree(props) {
|
|
|
9664
9767
|
|
|
9665
9768
|
setCurSelectedKeys(selKeys);
|
|
9666
9769
|
onSelected && onSelected(selKeys, item.key, selected, item, evn);
|
|
9770
|
+
onChange == null ? void 0 : onChange(selKeys);
|
|
9667
9771
|
}
|
|
9668
9772
|
|
|
9669
9773
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", _extends({
|
|
@@ -9739,7 +9843,7 @@ function TreeChecked(_ref) {
|
|
|
9739
9843
|
;// CONCATENATED MODULE: ../react-search-tree/esm/SearchTagInput.js
|
|
9740
9844
|
|
|
9741
9845
|
|
|
9742
|
-
var SearchTagInput_excluded = ["prefixCls", "mode", "size", "disabled", "allowClear", "loading", "className", "style", "placeholder", "content", "options", "values", "onChange", "onSearch", "emptyOption"];
|
|
9846
|
+
var SearchTagInput_excluded = ["prefixCls", "mode", "size", "disabled", "allowClear", "loading", "selectCloseDrop", "className", "style", "placeholder", "content", "options", "values", "onChange", "onSearch", "emptyOption"];
|
|
9743
9847
|
|
|
9744
9848
|
|
|
9745
9849
|
|
|
@@ -9759,6 +9863,7 @@ function SearchTagInput(props) {
|
|
|
9759
9863
|
disabled = false,
|
|
9760
9864
|
allowClear = false,
|
|
9761
9865
|
loading = false,
|
|
9866
|
+
selectCloseDrop = false,
|
|
9762
9867
|
className,
|
|
9763
9868
|
style,
|
|
9764
9869
|
placeholder,
|
|
@@ -9795,7 +9900,8 @@ function SearchTagInput(props) {
|
|
|
9795
9900
|
}
|
|
9796
9901
|
|
|
9797
9902
|
setSelectedOption(selectedAll);
|
|
9798
|
-
|
|
9903
|
+
searchValueChange('');
|
|
9904
|
+
onChange == null ? void 0 : onChange(selectedAll, selectd, isChecked);
|
|
9799
9905
|
};
|
|
9800
9906
|
|
|
9801
9907
|
var removeSelectItem = index => {
|
|
@@ -9806,10 +9912,15 @@ function SearchTagInput(props) {
|
|
|
9806
9912
|
};
|
|
9807
9913
|
|
|
9808
9914
|
function handleInputChange(value) {
|
|
9915
|
+
setInnerIsOpen(true);
|
|
9916
|
+
searchValueChange(value);
|
|
9917
|
+
setSelectIconType(value ? 'loading' : '');
|
|
9918
|
+
}
|
|
9919
|
+
|
|
9920
|
+
var searchValueChange = value => {
|
|
9809
9921
|
searchValueSet(value);
|
|
9810
9922
|
onSearch == null ? void 0 : onSearch(value);
|
|
9811
|
-
|
|
9812
|
-
} // 清除选中的值
|
|
9923
|
+
}; // 清除选中的值
|
|
9813
9924
|
|
|
9814
9925
|
|
|
9815
9926
|
function resetSelectedValue(e) {
|
|
@@ -9837,17 +9948,27 @@ function SearchTagInput(props) {
|
|
|
9837
9948
|
}
|
|
9838
9949
|
|
|
9839
9950
|
var newProps = _extends({}, content.props, {
|
|
9840
|
-
onSelected:
|
|
9951
|
+
onSelected: function onSelected(selectedAll, selectd, isChecked) {
|
|
9952
|
+
if (isChecked === void 0) {
|
|
9953
|
+
isChecked = true;
|
|
9954
|
+
}
|
|
9955
|
+
|
|
9956
|
+
setInnerIsOpen(!selectCloseDrop);
|
|
9957
|
+
handleSelectChange(selectedAll, selectd, isChecked);
|
|
9958
|
+
},
|
|
9841
9959
|
values: selectedOption,
|
|
9842
9960
|
options
|
|
9843
9961
|
});
|
|
9844
9962
|
|
|
9845
9963
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(content, newProps);
|
|
9846
|
-
}, [JSON.
|
|
9847
|
-
return /*#__PURE__*/(0,jsx_runtime.jsx)(Dropdown,
|
|
9964
|
+
}, [JSON.stringify(selectedOption), options, emptyOption]);
|
|
9965
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(Dropdown, {
|
|
9848
9966
|
className: cls,
|
|
9849
|
-
trigger: "
|
|
9850
|
-
|
|
9967
|
+
trigger: "click",
|
|
9968
|
+
onVisibleChange: isOpen => {
|
|
9969
|
+
setInnerIsOpen(isOpen);
|
|
9970
|
+
if (!isOpen) searchValueChange('');
|
|
9971
|
+
},
|
|
9851
9972
|
isOpen: innerIsOpen,
|
|
9852
9973
|
menu: /*#__PURE__*/(0,jsx_runtime.jsx)(react_card_esm, {
|
|
9853
9974
|
bodyStyle: emptyOption === true ? {
|
|
@@ -9872,7 +9993,8 @@ function SearchTagInput(props) {
|
|
|
9872
9993
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
9873
9994
|
style: {
|
|
9874
9995
|
display: 'flex',
|
|
9875
|
-
flexFlow: 'wrap'
|
|
9996
|
+
flexFlow: 'wrap',
|
|
9997
|
+
width: '100%'
|
|
9876
9998
|
},
|
|
9877
9999
|
children: [selectedOption.map((item, index) => {
|
|
9878
10000
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(react_tag_esm, {
|
|
@@ -9907,7 +10029,8 @@ function SearchTagInput(props) {
|
|
|
9907
10029
|
})]
|
|
9908
10030
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
9909
10031
|
style: {
|
|
9910
|
-
height: 25
|
|
10032
|
+
height: 25,
|
|
10033
|
+
width: 14
|
|
9911
10034
|
},
|
|
9912
10035
|
className: prefixCls + "-close-tag-contents",
|
|
9913
10036
|
children: (selectIconType === 'close' || selectIconType === 'loading' && loading) && /*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
|
|
@@ -9918,7 +10041,7 @@ function SearchTagInput(props) {
|
|
|
9918
10041
|
})]
|
|
9919
10042
|
})
|
|
9920
10043
|
})
|
|
9921
|
-
})
|
|
10044
|
+
});
|
|
9922
10045
|
}
|
|
9923
10046
|
|
|
9924
10047
|
/* harmony default export */ const esm_SearchTagInput = (SearchTagInput);
|
|
@@ -10023,7 +10146,7 @@ function SingeTree(props) {
|
|
|
10023
10146
|
key,
|
|
10024
10147
|
label
|
|
10025
10148
|
};
|
|
10026
|
-
props.onSelected == null ? void 0 : props.onSelected([cur], cur, isChecked);
|
|
10149
|
+
props.onSelected == null ? void 0 : props.onSelected(isChecked ? [cur] : [], cur, isChecked);
|
|
10027
10150
|
};
|
|
10028
10151
|
|
|
10029
10152
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(Tree, _extends({
|
|
@@ -10102,7 +10225,8 @@ function SearchTree(props) {
|
|
|
10102
10225
|
|
|
10103
10226
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(esm_SearchTagInput, _extends({}, other, {
|
|
10104
10227
|
emptyOption: isEmpty,
|
|
10105
|
-
|
|
10228
|
+
selectCloseDrop: !multiple,
|
|
10229
|
+
onSearch: selectedSearch,
|
|
10106
10230
|
onChange: selectedChange,
|
|
10107
10231
|
values: selectedValues,
|
|
10108
10232
|
options: selectedOptions,
|