uiw 4.14.0 → 4.14.1
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 +10 -4
- package/dist/uiw.js +310 -123
- package/dist/uiw.min.css +1 -1
- package/dist/uiw.min.js +1 -1
- package/package.json +58 -58
package/dist/uiw.css
CHANGED
|
@@ -4627,6 +4627,10 @@ a.w-list-item:hover:not(.w-disabled) {
|
|
|
4627
4627
|
text-overflow: ellipsis;
|
|
4628
4628
|
word-break: keep-all;
|
|
4629
4629
|
}
|
|
4630
|
+
.w-table-has-children {
|
|
4631
|
+
display: flex;
|
|
4632
|
+
align-items: center;
|
|
4633
|
+
}
|
|
4630
4634
|
.w-table-bordered > table tr > th,
|
|
4631
4635
|
.w-table-bordered > table tr > td,
|
|
4632
4636
|
.w-table-bordered > table > caption {
|
|
@@ -5050,10 +5054,12 @@ a.w-list-item:hover:not(.w-disabled) {
|
|
|
5050
5054
|
align-self: center;
|
|
5051
5055
|
justify-content: space-between;
|
|
5052
5056
|
}
|
|
5053
|
-
.w-transfer-arrow
|
|
5054
|
-
|
|
5055
|
-
cursor: pointer;
|
|
5057
|
+
.w-transfer-arrow {
|
|
5058
|
+
transition: all 0.3s;
|
|
5056
5059
|
border-radius: 3px;
|
|
5057
|
-
|
|
5060
|
+
}
|
|
5061
|
+
.w-transfer-arrow:hover {
|
|
5062
|
+
cursor: pointer;
|
|
5063
|
+
box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
|
|
5058
5064
|
}
|
|
5059
5065
|
|
package/dist/uiw.js
CHANGED
|
@@ -190,7 +190,6 @@ module.exports = shouldUseNative() ? Object.assign : function (target, source) {
|
|
|
190
190
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
191
191
|
|
|
192
192
|
"use strict";
|
|
193
|
-
var __webpack_unused_export__;
|
|
194
193
|
/** @license React v17.0.2
|
|
195
194
|
* react-jsx-runtime.production.min.js
|
|
196
195
|
*
|
|
@@ -199,7 +198,7 @@ var __webpack_unused_export__;
|
|
|
199
198
|
* This source code is licensed under the MIT license found in the
|
|
200
199
|
* LICENSE file in the root directory of this source tree.
|
|
201
200
|
*/
|
|
202
|
-
__webpack_require__(382);var f=__webpack_require__(787),g=60103;
|
|
201
|
+
__webpack_require__(382);var f=__webpack_require__(787),g=60103;exports.Fragment=60107;if("function"===typeof Symbol&&Symbol.for){var h=Symbol.for;g=h("react.element");exports.Fragment=h("react.fragment")}var m=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,n=Object.prototype.hasOwnProperty,p={key:!0,ref:!0,__self:!0,__source:!0};
|
|
203
202
|
function q(c,a,k){var b,d={},e=null,l=null;void 0!==k&&(e=""+k);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(l=a.ref);for(b in a)n.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:g,type:c,key:e,ref:l,props:d,_owner:m.current}}exports.jsx=q;exports.jsxs=q;
|
|
204
203
|
|
|
205
204
|
|
|
@@ -9097,6 +9096,112 @@ function ExpandableComponent(_ref) {
|
|
|
9097
9096
|
});
|
|
9098
9097
|
}
|
|
9099
9098
|
|
|
9099
|
+
;// CONCATENATED MODULE: ../react-table/esm/TableTr.js
|
|
9100
|
+
|
|
9101
|
+
|
|
9102
|
+
|
|
9103
|
+
|
|
9104
|
+
|
|
9105
|
+
|
|
9106
|
+
|
|
9107
|
+
|
|
9108
|
+
|
|
9109
|
+
function TableTr(props) {
|
|
9110
|
+
var {
|
|
9111
|
+
rowKey,
|
|
9112
|
+
data,
|
|
9113
|
+
keys,
|
|
9114
|
+
render,
|
|
9115
|
+
ellipsis,
|
|
9116
|
+
prefixCls,
|
|
9117
|
+
onCell = noop,
|
|
9118
|
+
isExpandedDom,
|
|
9119
|
+
hierarchy,
|
|
9120
|
+
indentSize,
|
|
9121
|
+
childrenColumnName
|
|
9122
|
+
} = props;
|
|
9123
|
+
var [expandIndex, setExpandIndex] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([]);
|
|
9124
|
+
var IconDom = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
|
|
9125
|
+
return (key, isOpacity) => {
|
|
9126
|
+
var flag = expandIndex.includes(key);
|
|
9127
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
|
|
9128
|
+
type: flag ? 'minus-square-o' : 'plus-square-o',
|
|
9129
|
+
style: {
|
|
9130
|
+
marginRight: 10,
|
|
9131
|
+
opacity: isOpacity ? 1 : 0,
|
|
9132
|
+
marginLeft: hierarchy * indentSize
|
|
9133
|
+
},
|
|
9134
|
+
onClick: () => {
|
|
9135
|
+
setExpandIndex(flag ? expandIndex.filter(it => it !== key) : [...expandIndex, key]);
|
|
9136
|
+
}
|
|
9137
|
+
});
|
|
9138
|
+
};
|
|
9139
|
+
}, [expandIndex]);
|
|
9140
|
+
|
|
9141
|
+
if (!Array.isArray(data) || !data.length) {
|
|
9142
|
+
return null;
|
|
9143
|
+
}
|
|
9144
|
+
|
|
9145
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
|
|
9146
|
+
children: data.map((trData, rowNum) => {
|
|
9147
|
+
var key = rowKey ? trData[rowKey] : rowNum;
|
|
9148
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
|
|
9149
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("tr", {
|
|
9150
|
+
children: keys.map((keyName, colNum) => {
|
|
9151
|
+
var objs = {
|
|
9152
|
+
children: trData[keyName]
|
|
9153
|
+
};
|
|
9154
|
+
|
|
9155
|
+
if (render[keyName]) {
|
|
9156
|
+
var child = render[keyName](trData[keyName], keyName, trData, rowNum, colNum);
|
|
9157
|
+
|
|
9158
|
+
if ( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(child)) {
|
|
9159
|
+
objs.children = child;
|
|
9160
|
+
} else {
|
|
9161
|
+
if (child.props) {
|
|
9162
|
+
objs = _extends({}, child.props, {
|
|
9163
|
+
children: objs.children
|
|
9164
|
+
});
|
|
9165
|
+
if (child.props.rowSpan === 0 || child.props.colSpan === 0) return null;
|
|
9166
|
+
}
|
|
9167
|
+
|
|
9168
|
+
if (child.children) {
|
|
9169
|
+
objs.children = child.children;
|
|
9170
|
+
}
|
|
9171
|
+
}
|
|
9172
|
+
}
|
|
9173
|
+
|
|
9174
|
+
if (ellipsis && ellipsis[keyName]) {
|
|
9175
|
+
objs.className = prefixCls + "-ellipsis";
|
|
9176
|
+
}
|
|
9177
|
+
|
|
9178
|
+
var isHasChildren = Array.isArray(trData[childrenColumnName]);
|
|
9179
|
+
|
|
9180
|
+
if (colNum === 0 && (hierarchy || isHasChildren)) {
|
|
9181
|
+
objs.className = objs.className + " " + prefixCls + "-has-children";
|
|
9182
|
+
objs.children = /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
9183
|
+
children: [IconDom(key, isHasChildren), objs.children]
|
|
9184
|
+
});
|
|
9185
|
+
}
|
|
9186
|
+
|
|
9187
|
+
return /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement)("td", _extends({}, objs, {
|
|
9188
|
+
key: colNum,
|
|
9189
|
+
onClick: evn => onCell(trData, {
|
|
9190
|
+
rowNum,
|
|
9191
|
+
colNum,
|
|
9192
|
+
keyName
|
|
9193
|
+
}, evn)
|
|
9194
|
+
}));
|
|
9195
|
+
})
|
|
9196
|
+
}, key), expandIndex.includes(key) && /*#__PURE__*/(0,jsx_runtime.jsx)(TableTr, _extends({}, props, {
|
|
9197
|
+
data: trData[childrenColumnName],
|
|
9198
|
+
hierarchy: hierarchy + 1
|
|
9199
|
+
})), isExpandedDom(trData, rowNum)]
|
|
9200
|
+
}, rowNum);
|
|
9201
|
+
})
|
|
9202
|
+
});
|
|
9203
|
+
}
|
|
9204
|
+
|
|
9100
9205
|
;// CONCATENATED MODULE: ../react-table/esm/index.js
|
|
9101
9206
|
|
|
9102
9207
|
|
|
@@ -9107,8 +9212,8 @@ var react_table_esm_excluded = ["prefixCls", "className", "columns", "data", "ti
|
|
|
9107
9212
|
|
|
9108
9213
|
|
|
9109
9214
|
|
|
9110
|
-
// 展开配置
|
|
9111
9215
|
|
|
9216
|
+
// 展开配置
|
|
9112
9217
|
|
|
9113
9218
|
|
|
9114
9219
|
|
|
@@ -9184,60 +9289,66 @@ function Table(props) {
|
|
|
9184
9289
|
});
|
|
9185
9290
|
};
|
|
9186
9291
|
}, [expandable, expandIndex]);
|
|
9187
|
-
var
|
|
9188
|
-
|
|
9189
|
-
|
|
9190
|
-
|
|
9191
|
-
|
|
9192
|
-
|
|
9193
|
-
|
|
9194
|
-
|
|
9195
|
-
|
|
9196
|
-
|
|
9197
|
-
|
|
9198
|
-
|
|
9199
|
-
|
|
9200
|
-
|
|
9201
|
-
|
|
9202
|
-
|
|
9203
|
-
|
|
9204
|
-
|
|
9205
|
-
|
|
9206
|
-
|
|
9207
|
-
|
|
9208
|
-
|
|
9209
|
-
|
|
9210
|
-
|
|
9211
|
-
|
|
9212
|
-
|
|
9213
|
-
|
|
9214
|
-
|
|
9215
|
-
|
|
9216
|
-
|
|
9217
|
-
|
|
9218
|
-
|
|
9219
|
-
|
|
9292
|
+
var self = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => {
|
|
9293
|
+
var keys = getAllColumnsKeys(columns);
|
|
9294
|
+
var selfColumns = [];
|
|
9295
|
+
|
|
9296
|
+
if (expandable != null && expandable.expandedRowRender) {
|
|
9297
|
+
keys = ['uiw-expanded', ...keys];
|
|
9298
|
+
selfColumns = [{
|
|
9299
|
+
title: '',
|
|
9300
|
+
key: 'uiw-expanded',
|
|
9301
|
+
width: 50,
|
|
9302
|
+
align: 'center',
|
|
9303
|
+
render: (text, key, record, index) => {
|
|
9304
|
+
var _expandable$defaultEx;
|
|
9305
|
+
|
|
9306
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(ExpandableComponent, {
|
|
9307
|
+
defaultExpand: expandable.defaultExpandAllRows === undefined ? !!((_expandable$defaultEx = expandable.defaultExpandedRowKeys) != null && _expandable$defaultEx.includes(rowKey ? record[rowKey] : index)) : !!expandable.defaultExpandAllRows,
|
|
9308
|
+
onClick: expand => {
|
|
9309
|
+
expandable.onExpand == null ? void 0 : expandable.onExpand(expand, record, index);
|
|
9310
|
+
|
|
9311
|
+
if (expand) {
|
|
9312
|
+
var result = expandIndex.filter(it => rowKey ? it !== record[rowKey] : it !== index);
|
|
9313
|
+
expandable.onExpandedRowsChange ? expandable.onExpandedRowsChange(result) : setExpandIndex(result);
|
|
9314
|
+
} else {
|
|
9315
|
+
var _result = [...expandIndex, rowKey ? record[rowKey] : index];
|
|
9316
|
+
expandable.onExpandedRowsChange ? expandable.onExpandedRowsChange(_result) : setExpandIndex(_result);
|
|
9317
|
+
}
|
|
9318
|
+
},
|
|
9319
|
+
expandIcon: expand => {
|
|
9320
|
+
if (expandable.rowExpandable && !(expandable.rowExpandable != null && expandable.rowExpandable(record))) {
|
|
9321
|
+
return null;
|
|
9322
|
+
}
|
|
9323
|
+
|
|
9324
|
+
if (expandable.expandIcon) {
|
|
9325
|
+
return expandable.expandIcon(expand, record, index);
|
|
9326
|
+
}
|
|
9327
|
+
|
|
9328
|
+
return expand ? /*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
|
|
9329
|
+
type: "minus-square-o"
|
|
9330
|
+
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
|
|
9331
|
+
type: "plus-square-o"
|
|
9332
|
+
});
|
|
9220
9333
|
}
|
|
9334
|
+
});
|
|
9335
|
+
}
|
|
9336
|
+
}, ...columns];
|
|
9337
|
+
} else {
|
|
9338
|
+
selfColumns = [...columns];
|
|
9339
|
+
}
|
|
9221
9340
|
|
|
9222
|
-
|
|
9223
|
-
|
|
9224
|
-
|
|
9225
|
-
|
|
9226
|
-
|
|
9227
|
-
}
|
|
9228
|
-
});
|
|
9229
|
-
}
|
|
9230
|
-
}, ...columns];
|
|
9231
|
-
} else {
|
|
9232
|
-
selfColumns = [...columns];
|
|
9233
|
-
}
|
|
9234
|
-
|
|
9341
|
+
return {
|
|
9342
|
+
keys,
|
|
9343
|
+
selfColumns
|
|
9344
|
+
};
|
|
9345
|
+
}, [columns, expandIndex]);
|
|
9235
9346
|
var cls = [prefixCls, className, bordered ? prefixCls + "-bordered" : null].filter(Boolean).join(' ').trim();
|
|
9236
9347
|
var {
|
|
9237
9348
|
header,
|
|
9238
9349
|
render,
|
|
9239
9350
|
ellipsis
|
|
9240
|
-
} = getLevelItems(selfColumns);
|
|
9351
|
+
} = getLevelItems(self.selfColumns);
|
|
9241
9352
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
9242
9353
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", _extends({
|
|
9243
9354
|
style: {
|
|
@@ -9255,48 +9366,18 @@ function Table(props) {
|
|
|
9255
9366
|
onCellHead: onCellHead,
|
|
9256
9367
|
data: header
|
|
9257
9368
|
}), data && data.length > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)("tbody", {
|
|
9258
|
-
children:
|
|
9259
|
-
|
|
9260
|
-
|
|
9261
|
-
|
|
9262
|
-
|
|
9263
|
-
|
|
9264
|
-
|
|
9265
|
-
|
|
9266
|
-
|
|
9267
|
-
|
|
9268
|
-
|
|
9269
|
-
|
|
9270
|
-
objs.children = child;
|
|
9271
|
-
} else {
|
|
9272
|
-
if (child.props) {
|
|
9273
|
-
objs = _extends({}, child.props, {
|
|
9274
|
-
children: objs.children
|
|
9275
|
-
});
|
|
9276
|
-
if (child.props.rowSpan === 0 || child.props.colSpan === 0) return null;
|
|
9277
|
-
}
|
|
9278
|
-
|
|
9279
|
-
if (child.children) {
|
|
9280
|
-
objs.children = child.children;
|
|
9281
|
-
}
|
|
9282
|
-
}
|
|
9283
|
-
}
|
|
9284
|
-
|
|
9285
|
-
if (ellipsis && ellipsis[keyName]) {
|
|
9286
|
-
objs.className = prefixCls + "-ellipsis";
|
|
9287
|
-
}
|
|
9288
|
-
|
|
9289
|
-
return /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.createElement)("td", _extends({}, objs, {
|
|
9290
|
-
key: colNum,
|
|
9291
|
-
onClick: evn => onCell(trData, {
|
|
9292
|
-
rowNum,
|
|
9293
|
-
colNum,
|
|
9294
|
-
keyName
|
|
9295
|
-
}, evn)
|
|
9296
|
-
}));
|
|
9297
|
-
})
|
|
9298
|
-
}, rowKey ? trData[rowKey] + '' : rowNum), isExpandedDom(trData, rowNum)]
|
|
9299
|
-
}, rowNum);
|
|
9369
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(TableTr, {
|
|
9370
|
+
rowKey: rowKey,
|
|
9371
|
+
data: data,
|
|
9372
|
+
keys: self.keys,
|
|
9373
|
+
render: render,
|
|
9374
|
+
ellipsis: ellipsis,
|
|
9375
|
+
prefixCls: prefixCls,
|
|
9376
|
+
onCell: onCell,
|
|
9377
|
+
hierarchy: 0,
|
|
9378
|
+
isExpandedDom: isExpandedDom,
|
|
9379
|
+
indentSize: (expandable == null ? void 0 : expandable.indentSize) || 16,
|
|
9380
|
+
childrenColumnName: (expandable == null ? void 0 : expandable.childrenColumnName) || 'children'
|
|
9300
9381
|
})
|
|
9301
9382
|
}), data && data.length === 0 && empty && /*#__PURE__*/(0,jsx_runtime.jsx)("tbody", {
|
|
9302
9383
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("tr", {
|
|
@@ -10420,12 +10501,21 @@ function SearchTree(props) {
|
|
|
10420
10501
|
|
|
10421
10502
|
|
|
10422
10503
|
|
|
10504
|
+
var CheckedStatus;
|
|
10505
|
+
|
|
10506
|
+
(function (CheckedStatus) {
|
|
10507
|
+
CheckedStatus[CheckedStatus["UnChecked"] = 0] = "UnChecked";
|
|
10508
|
+
CheckedStatus[CheckedStatus["AllChecked"] = 1] = "AllChecked";
|
|
10509
|
+
CheckedStatus[CheckedStatus["Indeterminate"] = 2] = "Indeterminate";
|
|
10510
|
+
})(CheckedStatus || (CheckedStatus = {}));
|
|
10511
|
+
|
|
10423
10512
|
function Transfer(props) {
|
|
10424
10513
|
var {
|
|
10425
10514
|
placeholder,
|
|
10426
10515
|
options,
|
|
10427
10516
|
value,
|
|
10428
10517
|
showSearch = false,
|
|
10518
|
+
selectedAll = false,
|
|
10429
10519
|
bodyStyle,
|
|
10430
10520
|
style,
|
|
10431
10521
|
className,
|
|
@@ -10435,10 +10525,16 @@ function Transfer(props) {
|
|
|
10435
10525
|
var [searchValueLeft, searchValueLeftSet] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)('');
|
|
10436
10526
|
var [searchValueRight, searchValueRightSet] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)('');
|
|
10437
10527
|
var [selectedOptions, selectedOptionSet] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(options || []);
|
|
10528
|
+
var selectedOptionsShowCount = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(0);
|
|
10438
10529
|
var [selectOption, selectOptionSet] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(new Map());
|
|
10530
|
+
var [leftSelectOption, leftSelectOptionSet] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(new Map());
|
|
10439
10531
|
var [leftSelectedKeys, leftSelectedKeySet] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([]);
|
|
10440
10532
|
var [rightSelectedKeys, rightSelectedKeySet] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([]);
|
|
10441
10533
|
var [rightOpions, rightOpionSet] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([]);
|
|
10534
|
+
var [selectAllChecked, selectAllCheckedSet] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({
|
|
10535
|
+
left: CheckedStatus.UnChecked,
|
|
10536
|
+
right: CheckedStatus.UnChecked
|
|
10537
|
+
});
|
|
10442
10538
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
|
|
10443
10539
|
leftSelectedKeySet([]);
|
|
10444
10540
|
rightSelectedKeySet([]);
|
|
@@ -10448,6 +10544,8 @@ function Transfer(props) {
|
|
|
10448
10544
|
}, [JSON.stringify(value)]);
|
|
10449
10545
|
|
|
10450
10546
|
var hiddenNode = callBackfn => {
|
|
10547
|
+
selectedOptionsShowCount.current = 0;
|
|
10548
|
+
|
|
10451
10549
|
var hiddenNodeForSeach = childrens => {
|
|
10452
10550
|
childrens.forEach(child => {
|
|
10453
10551
|
var _child$children;
|
|
@@ -10461,6 +10559,10 @@ function Transfer(props) {
|
|
|
10461
10559
|
} else {
|
|
10462
10560
|
child.hideNode = isHide;
|
|
10463
10561
|
}
|
|
10562
|
+
|
|
10563
|
+
if (!child.hideNode) {
|
|
10564
|
+
selectedOptionsShowCount.current++;
|
|
10565
|
+
}
|
|
10464
10566
|
});
|
|
10465
10567
|
};
|
|
10466
10568
|
|
|
@@ -10468,20 +10570,6 @@ function Transfer(props) {
|
|
|
10468
10570
|
selectedOptionSet([...selectedOptions]);
|
|
10469
10571
|
};
|
|
10470
10572
|
|
|
10471
|
-
var leftTreeOnSelected = (selectedKeys, _1, isChecked, evn) => {
|
|
10472
|
-
leftSelectedKeySet(selectedKeys);
|
|
10473
|
-
var selectOptionTemp = getOptionsRecursion([evn], selectOption, isChecked);
|
|
10474
|
-
selectOptionSet(selectOptionTemp);
|
|
10475
|
-
};
|
|
10476
|
-
|
|
10477
|
-
var rightTreeOnSelected = (selectedKeys, _1, _2, evn) => {
|
|
10478
|
-
rightSelectedKeySet(selectedKeys);
|
|
10479
|
-
selectedKeys.forEach(key => {
|
|
10480
|
-
selectOption.delete(key);
|
|
10481
|
-
});
|
|
10482
|
-
selectOptionSet(selectOption);
|
|
10483
|
-
};
|
|
10484
|
-
|
|
10485
10573
|
var getOptionsRecursion = (childrens, selectOption, isAdd) => {
|
|
10486
10574
|
var addOrDel = (key, label, isAdd) => {
|
|
10487
10575
|
if (isAdd) {
|
|
@@ -10492,7 +10580,6 @@ function Transfer(props) {
|
|
|
10492
10580
|
};
|
|
10493
10581
|
|
|
10494
10582
|
var iteratorParent = child => {
|
|
10495
|
-
// 向上迭代
|
|
10496
10583
|
if (child.parent) {
|
|
10497
10584
|
var selectCount = child.parent.children.filter(child => !selectOption.get(child.key)).length;
|
|
10498
10585
|
addOrDel(child.parent.key, child.parent.label, selectCount === 0);
|
|
@@ -10513,9 +10600,33 @@ function Transfer(props) {
|
|
|
10513
10600
|
return selectOption;
|
|
10514
10601
|
};
|
|
10515
10602
|
|
|
10603
|
+
var leftTreeOnSelected = (selectedKeys, _1, isChecked, evn) => {
|
|
10604
|
+
leftSelectedKeySet(selectedKeys);
|
|
10605
|
+
var selectOptionTemp = getOptionsRecursion([evn], leftSelectOption, isChecked);
|
|
10606
|
+
leftSelectOptionSet(selectOptionTemp);
|
|
10607
|
+
};
|
|
10608
|
+
|
|
10609
|
+
var rightTreeOnSelected = selectedKeys => {
|
|
10610
|
+
rightSelectedKeySet(selectedKeys);
|
|
10611
|
+
};
|
|
10612
|
+
|
|
10516
10613
|
var transferClick = transferType => {
|
|
10614
|
+
var selectOptionTemp = selectOption;
|
|
10615
|
+
|
|
10616
|
+
if (transferType === 'left') {
|
|
10617
|
+
leftSelectOption.forEach((value, key) => {
|
|
10618
|
+
selectOptionTemp.set(key, value);
|
|
10619
|
+
});
|
|
10620
|
+
} else {
|
|
10621
|
+
rightSelectedKeys.forEach(key => {
|
|
10622
|
+
selectOption.delete(key);
|
|
10623
|
+
});
|
|
10624
|
+
}
|
|
10625
|
+
|
|
10626
|
+
selectOptionSet(selectOptionTemp); // leftSelectOptionSet(selectOptionTemp);
|
|
10627
|
+
|
|
10517
10628
|
var option = [];
|
|
10518
|
-
|
|
10629
|
+
selectOptionTemp.forEach((label, key) => option.push({
|
|
10519
10630
|
key,
|
|
10520
10631
|
label
|
|
10521
10632
|
}));
|
|
@@ -10543,11 +10654,71 @@ function Transfer(props) {
|
|
|
10543
10654
|
var isHide = !option.label.includes(searchValue.trim());
|
|
10544
10655
|
option.hideNode = isHide;
|
|
10545
10656
|
});
|
|
10546
|
-
console.log('rightOpions', rightOpions);
|
|
10547
10657
|
rightOpionSet(rightOpions);
|
|
10548
10658
|
props.onSearch == null ? void 0 : props.onSearch('right', searchValue);
|
|
10549
10659
|
};
|
|
10550
10660
|
|
|
10661
|
+
var selectAllLeftChange = e => {
|
|
10662
|
+
var isChecked = e.target.checked;
|
|
10663
|
+
selectAllChecked.left = isChecked ? 1 : 0;
|
|
10664
|
+
|
|
10665
|
+
if (isChecked) {
|
|
10666
|
+
var keys = [];
|
|
10667
|
+
|
|
10668
|
+
var selectedOptionsRecursion = selectedOptions => {
|
|
10669
|
+
selectedOptions.forEach(child => {
|
|
10670
|
+
var _child$children3;
|
|
10671
|
+
|
|
10672
|
+
if ((_child$children3 = child.children) != null && _child$children3.length) {
|
|
10673
|
+
selectedOptionsRecursion(child.children);
|
|
10674
|
+
} else {
|
|
10675
|
+
if (!child.hideNode) {
|
|
10676
|
+
selectOption.set(child.key, child.label);
|
|
10677
|
+
keys.push(child.key);
|
|
10678
|
+
}
|
|
10679
|
+
}
|
|
10680
|
+
});
|
|
10681
|
+
};
|
|
10682
|
+
|
|
10683
|
+
selectedOptionsRecursion(selectedOptions);
|
|
10684
|
+
leftSelectedKeySet(keys);
|
|
10685
|
+
} else {
|
|
10686
|
+
leftSelectedKeySet([]);
|
|
10687
|
+
}
|
|
10688
|
+
|
|
10689
|
+
selectOptionSet(selectOption);
|
|
10690
|
+
selectAllCheckedSet(selectAllChecked);
|
|
10691
|
+
};
|
|
10692
|
+
|
|
10693
|
+
var selectAllRightChange = e => {
|
|
10694
|
+
var isChecked = e.target.checked;
|
|
10695
|
+
selectAllChecked.right = isChecked ? 1 : 0;
|
|
10696
|
+
|
|
10697
|
+
if (isChecked) {
|
|
10698
|
+
var keys = rightOpions.map(child => {
|
|
10699
|
+
selectOption.delete(child.key);
|
|
10700
|
+
return child.key;
|
|
10701
|
+
});
|
|
10702
|
+
rightSelectedKeySet(keys);
|
|
10703
|
+
} else {
|
|
10704
|
+
rightSelectedKeySet([]);
|
|
10705
|
+
}
|
|
10706
|
+
|
|
10707
|
+
selectOptionSet(selectOption);
|
|
10708
|
+
selectAllCheckedSet(selectAllChecked);
|
|
10709
|
+
};
|
|
10710
|
+
|
|
10711
|
+
var Arrow = props => /*#__PURE__*/(0,jsx_runtime.jsx)(Icon, {
|
|
10712
|
+
onClick: () => props.click(),
|
|
10713
|
+
type: "down-square-o",
|
|
10714
|
+
className: prefixCls + "-arrow",
|
|
10715
|
+
style: _extends({
|
|
10716
|
+
fontSize: 20,
|
|
10717
|
+
stroke: '#e9e9e9',
|
|
10718
|
+
fill: '#333'
|
|
10719
|
+
}, props.style)
|
|
10720
|
+
});
|
|
10721
|
+
|
|
10551
10722
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
10552
10723
|
className: cls,
|
|
10553
10724
|
style: _extends({
|
|
@@ -10557,7 +10728,18 @@ function Transfer(props) {
|
|
|
10557
10728
|
bodyStyle: {
|
|
10558
10729
|
padding: 5
|
|
10559
10730
|
},
|
|
10560
|
-
title:
|
|
10731
|
+
title: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
10732
|
+
children: [selectedAll && /*#__PURE__*/(0,jsx_runtime.jsx)(react_checkbox_esm, {
|
|
10733
|
+
indeterminate: leftSelectedKeys.length < selectedOptionsShowCount.current && !!leftSelectedKeys.length,
|
|
10734
|
+
checked: leftSelectedKeys.length >= selectedOptionsShowCount.current && !!leftSelectedKeys.length,
|
|
10735
|
+
onChange: selectAllLeftChange
|
|
10736
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
10737
|
+
style: {
|
|
10738
|
+
marginLeft: 10
|
|
10739
|
+
},
|
|
10740
|
+
children: [leftSelectedKeys.length, "/", selectedOptionsShowCount.current]
|
|
10741
|
+
})]
|
|
10742
|
+
}),
|
|
10561
10743
|
className: prefixCls + "-card",
|
|
10562
10744
|
children: [showSearch && /*#__PURE__*/(0,jsx_runtime.jsx)(react_input_esm, {
|
|
10563
10745
|
placeholder: placeholder,
|
|
@@ -10575,21 +10757,15 @@ function Transfer(props) {
|
|
|
10575
10757
|
})]
|
|
10576
10758
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
10577
10759
|
className: prefixCls + "-arrow-content",
|
|
10578
|
-
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(
|
|
10579
|
-
|
|
10580
|
-
type: "down-square-o",
|
|
10581
|
-
className: prefixCls + "-arrow-left",
|
|
10760
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(Arrow, {
|
|
10761
|
+
click: () => transferClick('left'),
|
|
10582
10762
|
style: {
|
|
10583
|
-
transform: 'rotate(-90deg)'
|
|
10584
|
-
fontSize: 20
|
|
10763
|
+
transform: 'rotate(-90deg)'
|
|
10585
10764
|
}
|
|
10586
|
-
}), /*#__PURE__*/(0,jsx_runtime.jsx)(
|
|
10587
|
-
|
|
10588
|
-
type: "down-square-o",
|
|
10589
|
-
className: prefixCls + "-arrow-right",
|
|
10765
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Arrow, {
|
|
10766
|
+
click: () => transferClick('right'),
|
|
10590
10767
|
style: {
|
|
10591
|
-
transform: 'rotate(90deg)'
|
|
10592
|
-
fontSize: 20
|
|
10768
|
+
transform: 'rotate(90deg)'
|
|
10593
10769
|
}
|
|
10594
10770
|
})]
|
|
10595
10771
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(react_card_esm, {
|
|
@@ -10597,7 +10773,18 @@ function Transfer(props) {
|
|
|
10597
10773
|
padding: 5
|
|
10598
10774
|
},
|
|
10599
10775
|
className: prefixCls + "-card",
|
|
10600
|
-
title:
|
|
10776
|
+
title: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
10777
|
+
children: [selectedAll && /*#__PURE__*/(0,jsx_runtime.jsx)(react_checkbox_esm, {
|
|
10778
|
+
indeterminate: rightSelectedKeys.length < rightOpions.length && !!rightSelectedKeys.length,
|
|
10779
|
+
checked: rightSelectedKeys.length === rightOpions.length && !!rightSelectedKeys.length,
|
|
10780
|
+
onChange: selectAllRightChange
|
|
10781
|
+
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
10782
|
+
style: {
|
|
10783
|
+
marginLeft: 10
|
|
10784
|
+
},
|
|
10785
|
+
children: [rightSelectedKeys.length, "/", rightOpions.length]
|
|
10786
|
+
})]
|
|
10787
|
+
}),
|
|
10601
10788
|
children: [showSearch && /*#__PURE__*/(0,jsx_runtime.jsx)(react_input_esm, {
|
|
10602
10789
|
placeholder: placeholder,
|
|
10603
10790
|
value: searchValueRight,
|