@kdcloudjs/kdesign 1.7.44 → 1.7.46
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/CHANGELOG.md +0 -1704
- package/dist/kdesign-complete.less +2 -1
- package/dist/kdesign.css +3 -2
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +418 -269
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +3 -3
- package/dist/kdesign.min.js +10 -10
- package/dist/kdesign.min.js.map +1 -1
- package/es/_utils/usePopper.js +1 -1
- package/es/city-picker/city-picker.js +13 -10
- package/es/config-provider/compDefaultProps.d.ts +1 -0
- package/es/config-provider/compDefaultProps.js +2 -1
- package/es/form/style/index.css +1 -0
- package/es/form/style/index.less +1 -0
- package/es/image-cropper/image-cropper.js +1 -1
- package/es/select/select.js +83 -17
- package/es/select/style/index.css +1 -1
- package/es/select/style/index.less +1 -1
- package/es/table/table.js +2 -2
- package/es/tree/tree.d.ts +1 -0
- package/es/tree/tree.js +5 -4
- package/es/tree/treeHooks.d.ts +1 -1
- package/es/tree/treeHooks.js +3 -3
- package/es/tree/utils/treeUtils.d.ts +3 -3
- package/es/tree/utils/treeUtils.js +12 -4
- package/lib/_utils/usePopper.js +1 -1
- package/lib/city-picker/city-picker.js +13 -10
- package/lib/config-provider/compDefaultProps.d.ts +1 -0
- package/lib/config-provider/compDefaultProps.js +2 -1
- package/lib/form/style/index.css +1 -0
- package/lib/form/style/index.less +1 -0
- package/lib/image-cropper/image-cropper.js +1 -1
- package/lib/select/select.js +83 -17
- package/lib/select/style/index.css +1 -1
- package/lib/select/style/index.less +1 -1
- package/lib/table/table.js +2 -2
- package/lib/tree/tree.d.ts +1 -0
- package/lib/tree/tree.js +5 -4
- package/lib/tree/treeHooks.d.ts +1 -1
- package/lib/tree/treeHooks.js +3 -3
- package/lib/tree/utils/treeUtils.d.ts +3 -3
- package/lib/tree/utils/treeUtils.js +12 -4
- package/package.json +2 -2
package/dist/kdesign.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
*
|
|
3
|
-
* @kdcloudjs/kdesign v1.7.
|
|
3
|
+
* @kdcloudjs/kdesign v1.7.45
|
|
4
4
|
*
|
|
5
5
|
* Copyright 2020-present, Kingdee, Inc.
|
|
6
6
|
* All rights reserved.
|
|
@@ -2211,7 +2211,7 @@ var getBorderWidth = function getBorderWidth(el) {
|
|
|
2211
2211
|
if (el.offsetParent) {
|
|
2212
2212
|
var parentBorder = getBorderWidth(el.offsetParent);
|
|
2213
2213
|
border.top += parentBorder.top + parseInt(getComputedStyle(el.offsetParent, null).borderTopWidth.slice(0, -2));
|
|
2214
|
-
border.left += parentBorder.left + parseInt(getComputedStyle(el.offsetParent, null).
|
|
2214
|
+
border.left += parentBorder.left + parseInt(getComputedStyle(el.offsetParent, null).borderLeftWidth.slice(0, -2));
|
|
2215
2215
|
}
|
|
2216
2216
|
return border;
|
|
2217
2217
|
};
|
|
@@ -7559,10 +7559,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7559
7559
|
/* harmony import */ var core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_13__);
|
|
7560
7560
|
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ "./node_modules/core-js/modules/es.function.name.js");
|
|
7561
7561
|
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_14__);
|
|
7562
|
-
/* harmony import */ var
|
|
7563
|
-
/* harmony import */ var
|
|
7564
|
-
/* harmony import */ var
|
|
7565
|
-
/* harmony import */ var
|
|
7562
|
+
/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.array.filter.js */ "./node_modules/core-js/modules/es.array.filter.js");
|
|
7563
|
+
/* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_15__);
|
|
7564
|
+
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.object.keys.js */ "./node_modules/core-js/modules/es.object.keys.js");
|
|
7565
|
+
/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_16__);
|
|
7566
7566
|
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
|
|
7567
7567
|
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_17__);
|
|
7568
7568
|
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
|
|
@@ -7837,7 +7837,9 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
7837
7837
|
var handleOption = function handleOption(city) {
|
|
7838
7838
|
var _searchRef$current;
|
|
7839
7839
|
handleVisibleChange(false);
|
|
7840
|
-
city.type
|
|
7840
|
+
if (!city.type) {
|
|
7841
|
+
city.type = tabsValue === 'domestic' ? 'domestic' : 'foreign';
|
|
7842
|
+
}
|
|
7841
7843
|
(city === null || city === void 0 ? void 0 : city.id) !== initValue && (onChange === null || onChange === void 0 ? void 0 : onChange(city === null || city === void 0 ? void 0 : city.id, city));
|
|
7842
7844
|
(_searchRef$current = searchRef.current) === null || _searchRef$current === void 0 ? void 0 : _searchRef$current.focus();
|
|
7843
7845
|
setAfterChangeFocus(true);
|
|
@@ -7910,17 +7912,17 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
7910
7912
|
if (!data) return null;
|
|
7911
7913
|
if (isDomestic(type)) {
|
|
7912
7914
|
if (isCommon) {
|
|
7913
|
-
var _curVal = data !== null && data !== void 0 && data.province ? data === null || data === void 0 ? void 0 : data.province : data === null || data === void 0 ? void 0 : data.country;
|
|
7915
|
+
var _curVal = data !== null && data !== void 0 && data.province ? data === null || data === void 0 ? void 0 : data.province : (data === null || data === void 0 ? void 0 : data.country) || '';
|
|
7914
7916
|
return "".concat(flag && _curVal ? symbol : '').concat(_curVal);
|
|
7915
7917
|
}
|
|
7916
7918
|
if (data !== null && data !== void 0 && data.type) {
|
|
7917
|
-
var _curVal2 = data.type === 'domestic' ? (data === null || data === void 0 ? void 0 : data.province) || (data === null || data === void 0 ? void 0 : data.country) : data === null || data === void 0 ? void 0 : data.country;
|
|
7919
|
+
var _curVal2 = (data.type === 'domestic' ? (data === null || data === void 0 ? void 0 : data.province) || (data === null || data === void 0 ? void 0 : data.country) : [data === null || data === void 0 ? void 0 : data.province, data === null || data === void 0 ? void 0 : data.country].filter(Boolean).join(symbol)) || '';
|
|
7918
7920
|
return "".concat(flag && _curVal2 ? symbol : '').concat(_curVal2);
|
|
7919
7921
|
}
|
|
7920
|
-
var curVal = tabsValue === 'domestic' ? (data === null || data === void 0 ? void 0 : data.province) || (data === null || data === void 0 ? void 0 : data.country) : data === null || data === void 0 ? void 0 : data.country;
|
|
7922
|
+
var curVal = tabsValue === 'domestic' ? (data === null || data === void 0 ? void 0 : data.province) || (data === null || data === void 0 ? void 0 : data.country) || '' : [data === null || data === void 0 ? void 0 : data.province, data === null || data === void 0 ? void 0 : data.country].filter(Boolean).join(symbol);
|
|
7921
7923
|
return "".concat(flag && curVal ? symbol : '').concat(curVal);
|
|
7922
7924
|
} else {
|
|
7923
|
-
return "".concat(flag && (data !== null && data !== void 0 && data.province || data !== null && data !== void 0 && data.country) ? symbol : '').concat(data === null || data === void 0 ? void 0 : data.province
|
|
7925
|
+
return "".concat(flag && (data !== null && data !== void 0 && data.province || data !== null && data !== void 0 && data.country) ? symbol : '').concat([data === null || data === void 0 ? void 0 : data.province, data === null || data === void 0 ? void 0 : data.country].filter(Boolean).join(symbol));
|
|
7924
7926
|
}
|
|
7925
7927
|
}, [type, tabsValue]);
|
|
7926
7928
|
var renderSingle = function renderSingle() {
|
|
@@ -10408,7 +10410,8 @@ var compDefaultProps = {
|
|
|
10408
10410
|
});
|
|
10409
10411
|
},
|
|
10410
10412
|
estimatedItemSize: 32,
|
|
10411
|
-
expandOnClickNode: true
|
|
10413
|
+
expandOnClickNode: true,
|
|
10414
|
+
expandOnFilterNode: false
|
|
10412
10415
|
},
|
|
10413
10416
|
TreeNode: {},
|
|
10414
10417
|
ToolTip: {
|
|
@@ -19956,7 +19959,7 @@ var InternalImageCropper = function InternalImageCropper(props, forwardedRef) {
|
|
|
19956
19959
|
return cropperRef.current.getImage();
|
|
19957
19960
|
case 2:
|
|
19958
19961
|
imgFile = _context.sent;
|
|
19959
|
-
imgFile ? onCropSuccess === null || onCropSuccess === void 0 ? void 0 : onCropSuccess(imgFile) : onCropFailed === null || onCropFailed === void 0 ? void 0 : onCropFailed(
|
|
19962
|
+
imgFile ? onCropSuccess === null || onCropSuccess === void 0 ? void 0 : onCropSuccess(imgFile) : onCropFailed === null || onCropFailed === void 0 ? void 0 : onCropFailed();
|
|
19960
19963
|
case 4:
|
|
19961
19964
|
case "end":
|
|
19962
19965
|
return _context.stop();
|
|
@@ -29551,47 +29554,67 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
29551
29554
|
/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_4__);
|
|
29552
29555
|
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptors.js");
|
|
29553
29556
|
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_5__);
|
|
29554
|
-
/* harmony import */ var
|
|
29555
|
-
/* harmony import */ var
|
|
29556
|
-
/* harmony import */ var
|
|
29557
|
-
/* harmony import */ var
|
|
29558
|
-
/* harmony import */ var
|
|
29559
|
-
/* harmony import */ var
|
|
29560
|
-
/* harmony import */ var
|
|
29561
|
-
/* harmony import */ var
|
|
29562
|
-
/* harmony import */ var
|
|
29563
|
-
/* harmony import */ var
|
|
29564
|
-
/* harmony import */ var
|
|
29565
|
-
/* harmony import */ var
|
|
29566
|
-
/* harmony import */ var
|
|
29567
|
-
/* harmony import */ var
|
|
29568
|
-
/* harmony import */ var
|
|
29569
|
-
/* harmony import */ var
|
|
29570
|
-
/* harmony import */ var
|
|
29571
|
-
/* harmony import */ var
|
|
29572
|
-
/* harmony import */ var
|
|
29573
|
-
/* harmony import */ var
|
|
29574
|
-
/* harmony import */ var
|
|
29575
|
-
/* harmony import */ var
|
|
29576
|
-
/* harmony import */ var
|
|
29577
|
-
/* harmony import */ var
|
|
29578
|
-
/* harmony import */ var
|
|
29579
|
-
/* harmony import */ var
|
|
29580
|
-
/* harmony import */ var
|
|
29581
|
-
/* harmony import */ var
|
|
29582
|
-
/* harmony import */ var
|
|
29583
|
-
/* harmony import */ var
|
|
29584
|
-
/* harmony import */ var
|
|
29585
|
-
/* harmony import */ var
|
|
29586
|
-
/* harmony import */ var
|
|
29587
|
-
/* harmony import */ var
|
|
29588
|
-
/* harmony import */ var
|
|
29589
|
-
/* harmony import */ var
|
|
29590
|
-
/* harmony import */ var
|
|
29591
|
-
/* harmony import */ var
|
|
29592
|
-
/* harmony import */ var
|
|
29593
|
-
/* harmony import */ var
|
|
29594
|
-
/* harmony import */ var
|
|
29557
|
+
/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.array.slice.js */ "./node_modules/core-js/modules/es.array.slice.js");
|
|
29558
|
+
/* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_6__);
|
|
29559
|
+
/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.array.from.js */ "./node_modules/core-js/modules/es.array.from.js");
|
|
29560
|
+
/* harmony import */ var core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_from_js__WEBPACK_IMPORTED_MODULE_7__);
|
|
29561
|
+
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ "./node_modules/core-js/modules/es.regexp.exec.js");
|
|
29562
|
+
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_8__);
|
|
29563
|
+
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
|
|
29564
|
+
/* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_9__);
|
|
29565
|
+
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ "./node_modules/core-js/modules/es.symbol.iterator.js");
|
|
29566
|
+
/* harmony import */ var core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_iterator_js__WEBPACK_IMPORTED_MODULE_10__);
|
|
29567
|
+
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js");
|
|
29568
|
+
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_11__);
|
|
29569
|
+
/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "./node_modules/@babel/runtime/helpers/toConsumableArray.js");
|
|
29570
|
+
/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_12__);
|
|
29571
|
+
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js");
|
|
29572
|
+
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_13__);
|
|
29573
|
+
/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/slicedToArray.js");
|
|
29574
|
+
/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_14__);
|
|
29575
|
+
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
|
|
29576
|
+
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_15__);
|
|
29577
|
+
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.array.map.js */ "./node_modules/core-js/modules/es.array.map.js");
|
|
29578
|
+
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_16__);
|
|
29579
|
+
/* harmony import */ var core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/es.array.find.js */ "./node_modules/core-js/modules/es.array.find.js");
|
|
29580
|
+
/* harmony import */ var core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_17__);
|
|
29581
|
+
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
|
|
29582
|
+
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_18__);
|
|
29583
|
+
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ "./node_modules/core-js/modules/es.function.name.js");
|
|
29584
|
+
/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_19__);
|
|
29585
|
+
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! core-js/modules/es.array.includes.js */ "./node_modules/core-js/modules/es.array.includes.js");
|
|
29586
|
+
/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_20__);
|
|
29587
|
+
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! core-js/modules/es.string.includes.js */ "./node_modules/core-js/modules/es.string.includes.js");
|
|
29588
|
+
/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_21__);
|
|
29589
|
+
/* harmony import */ var core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! core-js/modules/es.array.splice.js */ "./node_modules/core-js/modules/es.array.splice.js");
|
|
29590
|
+
/* harmony import */ var core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_splice_js__WEBPACK_IMPORTED_MODULE_22__);
|
|
29591
|
+
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
|
|
29592
|
+
/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_23__);
|
|
29593
|
+
/* harmony import */ var core_js_modules_es_set_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! core-js/modules/es.set.js */ "./node_modules/core-js/modules/es.set.js");
|
|
29594
|
+
/* harmony import */ var core_js_modules_es_set_js__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_set_js__WEBPACK_IMPORTED_MODULE_24__);
|
|
29595
|
+
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
|
|
29596
|
+
/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_25__);
|
|
29597
|
+
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
|
|
29598
|
+
/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_26__);
|
|
29599
|
+
/* harmony import */ var core_js_modules_es_array_find_index_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! core-js/modules/es.array.find-index.js */ "./node_modules/core-js/modules/es.array.find-index.js");
|
|
29600
|
+
/* harmony import */ var core_js_modules_es_array_find_index_js__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_find_index_js__WEBPACK_IMPORTED_MODULE_27__);
|
|
29601
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! react */ "react");
|
|
29602
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_28__);
|
|
29603
|
+
/* harmony import */ var _utils_hooks__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../_utils/hooks */ "./components/_utils/hooks.tsx");
|
|
29604
|
+
/* harmony import */ var lodash_isBoolean__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! lodash/isBoolean */ "./node_modules/lodash/isBoolean.js");
|
|
29605
|
+
/* harmony import */ var lodash_isBoolean__WEBPACK_IMPORTED_MODULE_30___default = /*#__PURE__*/__webpack_require__.n(lodash_isBoolean__WEBPACK_IMPORTED_MODULE_30__);
|
|
29606
|
+
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
|
|
29607
|
+
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_31___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_31__);
|
|
29608
|
+
/* harmony import */ var _config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../config-provider/ConfigContext */ "./components/config-provider/ConfigContext.tsx");
|
|
29609
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../_utils */ "./components/_utils/index.ts");
|
|
29610
|
+
/* harmony import */ var _utils_react_children__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../_utils/react-children */ "./components/_utils/react-children.ts");
|
|
29611
|
+
/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../index */ "./components/index.tsx");
|
|
29612
|
+
/* harmony import */ var _option__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./option */ "./components/select/option.tsx");
|
|
29613
|
+
/* harmony import */ var _utils_usePopper__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../_utils/usePopper */ "./components/_utils/usePopper.tsx");
|
|
29614
|
+
/* harmony import */ var _virtual_list__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../virtual-list */ "./components/virtual-list/index.tsx");
|
|
29615
|
+
/* harmony import */ var _utils_KeyCode__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ../_utils/KeyCode */ "./components/_utils/KeyCode.ts");
|
|
29616
|
+
|
|
29617
|
+
|
|
29595
29618
|
|
|
29596
29619
|
|
|
29597
29620
|
|
|
@@ -29602,8 +29625,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
29602
29625
|
|
|
29603
29626
|
|
|
29604
29627
|
|
|
29628
|
+
|
|
29629
|
+
|
|
29630
|
+
|
|
29631
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
29632
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
29633
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
29605
29634
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
29606
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
29635
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_13___default()(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
29636
|
+
|
|
29637
|
+
|
|
29638
|
+
|
|
29639
|
+
|
|
29607
29640
|
|
|
29608
29641
|
|
|
29609
29642
|
|
|
@@ -29628,13 +29661,13 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
29628
29661
|
var INPUT_MIN_WIDTH = 4; // 输入框最小宽度
|
|
29629
29662
|
|
|
29630
29663
|
var InternalSelect = function InternalSelect(props, ref) {
|
|
29631
|
-
var _classNames6, _classNames12;
|
|
29632
|
-
var _useContext = Object(
|
|
29664
|
+
var _classNames5, _classNames6, _classNames12;
|
|
29665
|
+
var _useContext = Object(react__WEBPACK_IMPORTED_MODULE_28__["useContext"])(_config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_32__["default"]),
|
|
29633
29666
|
getPrefixCls = _useContext.getPrefixCls,
|
|
29634
29667
|
prefixCls = _useContext.prefixCls,
|
|
29635
29668
|
userDefaultProps = _useContext.compDefaultProps,
|
|
29636
29669
|
locale = _useContext.locale;
|
|
29637
|
-
var selectProps = Object(
|
|
29670
|
+
var selectProps = Object(_utils__WEBPACK_IMPORTED_MODULE_33__["getCompProps"])('Select', userDefaultProps, props);
|
|
29638
29671
|
var selectLangMsg = locale.getCompLangMsg({
|
|
29639
29672
|
componentName: 'Select'
|
|
29640
29673
|
});
|
|
@@ -29676,79 +29709,76 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
29676
29709
|
virtualListProps = selectProps.virtualListProps,
|
|
29677
29710
|
status = selectProps.status;
|
|
29678
29711
|
var isMultiple = mode === 'multiple'; // 是否多选
|
|
29679
|
-
var _useMergedState = Object(
|
|
29712
|
+
var _useMergedState = Object(_utils_hooks__WEBPACK_IMPORTED_MODULE_29__["useMergedState"])(undefined, {
|
|
29680
29713
|
value: value,
|
|
29681
29714
|
defaultValue: defaultValue
|
|
29682
29715
|
}),
|
|
29683
|
-
_useMergedState2 =
|
|
29716
|
+
_useMergedState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_14___default()(_useMergedState, 2),
|
|
29684
29717
|
initValue = _useMergedState2[0],
|
|
29685
29718
|
setInitValue = _useMergedState2[1];
|
|
29686
|
-
var realChildren = Array.isArray(options) ? options : Object(
|
|
29687
|
-
var selectRef = Object(
|
|
29688
|
-
var searchRef = Object(
|
|
29689
|
-
var selectionRef = Object(
|
|
29690
|
-
var dropDownRef = Object(
|
|
29691
|
-
var multipleRef = Object(
|
|
29719
|
+
var realChildren = Array.isArray(options) ? options : Object(_utils_react_children__WEBPACK_IMPORTED_MODULE_34__["toArray"])(children); // options配置项和默认children
|
|
29720
|
+
var selectRef = Object(react__WEBPACK_IMPORTED_MODULE_28__["useRef"])();
|
|
29721
|
+
var searchRef = Object(react__WEBPACK_IMPORTED_MODULE_28__["useRef"])(null); // 搜索框ref
|
|
29722
|
+
var selectionRef = Object(react__WEBPACK_IMPORTED_MODULE_28__["useRef"])(null);
|
|
29723
|
+
var dropDownRef = Object(react__WEBPACK_IMPORTED_MODULE_28__["useRef"])(null);
|
|
29724
|
+
var multipleRef = Object(react__WEBPACK_IMPORTED_MODULE_28__["useRef"])({
|
|
29692
29725
|
selectedVal: isMultiple ? [] : null,
|
|
29693
29726
|
selectMulOpts: []
|
|
29694
29727
|
}); // 多选ref已选中项
|
|
29695
|
-
var measureRef = Object(
|
|
29696
|
-
var clearRef = Object(
|
|
29697
|
-
var _useState = Object(
|
|
29698
|
-
_useState2 =
|
|
29728
|
+
var measureRef = Object(react__WEBPACK_IMPORTED_MODULE_28__["useRef"])(null);
|
|
29729
|
+
var clearRef = Object(react__WEBPACK_IMPORTED_MODULE_28__["useRef"])(null);
|
|
29730
|
+
var _useState = Object(react__WEBPACK_IMPORTED_MODULE_28__["useState"])([]),
|
|
29731
|
+
_useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_14___default()(_useState, 2),
|
|
29699
29732
|
mulOptions = _useState2[0],
|
|
29700
29733
|
setMulOptions = _useState2[1];
|
|
29701
|
-
var _useState3 = Object(
|
|
29702
|
-
_useState4 =
|
|
29734
|
+
var _useState3 = Object(react__WEBPACK_IMPORTED_MODULE_28__["useState"])(''),
|
|
29735
|
+
_useState4 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_14___default()(_useState3, 2),
|
|
29703
29736
|
singleVal = _useState4[0],
|
|
29704
29737
|
setSingleVal = _useState4[1];
|
|
29705
|
-
var _useState5 = Object(
|
|
29706
|
-
_useState6 =
|
|
29738
|
+
var _useState5 = Object(react__WEBPACK_IMPORTED_MODULE_28__["useState"])(typeof props.visible === 'undefined' ? !!defaultOpen : !!props.visible),
|
|
29739
|
+
_useState6 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_14___default()(_useState5, 2),
|
|
29707
29740
|
optionShow = _useState6[0],
|
|
29708
29741
|
setOptionShow = _useState6[1];
|
|
29709
29742
|
// 下拉列表是否展示
|
|
29710
29743
|
// const [searchInput, setSearchInput] = useState<string>('') // 搜索框值
|
|
29711
|
-
var _useState7 = Object(
|
|
29712
|
-
_useState8 =
|
|
29744
|
+
var _useState7 = Object(react__WEBPACK_IMPORTED_MODULE_28__["useState"])(''),
|
|
29745
|
+
_useState8 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_14___default()(_useState7, 2),
|
|
29713
29746
|
searchValue = _useState8[0],
|
|
29714
29747
|
setSearchValue = _useState8[1]; // 搜索框定时器
|
|
29715
|
-
var _useState9 = Object(
|
|
29716
|
-
_useState10 =
|
|
29748
|
+
var _useState9 = Object(react__WEBPACK_IMPORTED_MODULE_28__["useState"])(INPUT_MIN_WIDTH),
|
|
29749
|
+
_useState10 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_14___default()(_useState9, 2),
|
|
29717
29750
|
inputWidth = _useState10[0],
|
|
29718
29751
|
setInputWidth = _useState10[1]; // 输入框宽度
|
|
29719
|
-
var _useState11 = Object(
|
|
29720
|
-
_useState12 =
|
|
29752
|
+
var _useState11 = Object(react__WEBPACK_IMPORTED_MODULE_28__["useState"])(autoFocus),
|
|
29753
|
+
_useState12 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_14___default()(_useState11, 2),
|
|
29721
29754
|
focusd = _useState12[0],
|
|
29722
29755
|
setFocusd = _useState12[1];
|
|
29723
|
-
var isShowSearch = Object(
|
|
29724
|
-
return
|
|
29756
|
+
var isShowSearch = Object(react__WEBPACK_IMPORTED_MODULE_28__["useMemo"])(function () {
|
|
29757
|
+
return lodash_isBoolean__WEBPACK_IMPORTED_MODULE_30___default()(showSearch) ? showSearch : isMultiple;
|
|
29725
29758
|
}, [isMultiple, showSearch]);
|
|
29726
29759
|
var selectPrefixCls = getPrefixCls(prefixCls, 'select', customPrefixcls);
|
|
29727
29760
|
// 选择器样式
|
|
29728
|
-
var selectCls =
|
|
29729
|
-
var selectionCls =
|
|
29730
|
-
|
|
29731
|
-
// 下拉列表框样式
|
|
29732
|
-
var dropDownCls = classnames__WEBPACK_IMPORTED_MODULE_22___default()(dropdownClassName, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_8___default()({}, "".concat(selectPrefixCls, "-dropdown"), true));
|
|
29761
|
+
var selectCls = classnames__WEBPACK_IMPORTED_MODULE_31___default()(selectPrefixCls, className, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_13___default()({}, "".concat(selectPrefixCls, "-visible"), optionShow));
|
|
29762
|
+
var selectionCls = classnames__WEBPACK_IMPORTED_MODULE_31___default()(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_13___default()({}, "".concat(selectPrefixCls, "-selector"), true));
|
|
29733
29763
|
|
|
29734
29764
|
// 下拉子项列表样式
|
|
29735
|
-
var dropContentCls =
|
|
29765
|
+
var dropContentCls = classnames__WEBPACK_IMPORTED_MODULE_31___default()(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_13___default()({}, "".concat(selectPrefixCls, "-dropdown-scroll"), (isMultiple ? (realChildren === null || realChildren === void 0 ? void 0 : realChildren.length) > 8 : (realChildren === null || realChildren === void 0 ? void 0 : realChildren.length) > 10) || selectProps.dropdownRender));
|
|
29736
29766
|
|
|
29737
29767
|
// 多选底部样式
|
|
29738
|
-
var multipleFooterCls =
|
|
29768
|
+
var multipleFooterCls = classnames__WEBPACK_IMPORTED_MODULE_31___default()(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_13___default()({}, "".concat(selectPrefixCls, "-multiple-footer"), true));
|
|
29739
29769
|
|
|
29740
29770
|
// 多选,单选公共样式
|
|
29741
|
-
var commCls =
|
|
29742
|
-
Object(
|
|
29771
|
+
var commCls = classnames__WEBPACK_IMPORTED_MODULE_31___default()((_classNames5 = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_13___default()(_classNames5, "".concat(selectPrefixCls, "-bordered"), borderType === 'bordered'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_13___default()(_classNames5, "".concat(selectPrefixCls, "-underline"), borderType === 'underline'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_13___default()(_classNames5, "".concat(selectPrefixCls, "-borderless"), borderType === 'none'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_13___default()(_classNames5, "".concat(selectPrefixCls, "-size-").concat(size), size), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_13___default()(_classNames5, "".concat(selectPrefixCls, "-wrapper"), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_13___default()(_classNames5, "".concat(selectPrefixCls, "-show-search"), isShowSearch && focusd), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_13___default()(_classNames5, "".concat(selectPrefixCls, "-error"), status === 'error'), _classNames5));
|
|
29772
|
+
Object(react__WEBPACK_IMPORTED_MODULE_28__["useEffect"])(function () {
|
|
29743
29773
|
if (typeof props.visible !== 'undefined') {
|
|
29744
29774
|
setOptionShow(props.visible);
|
|
29745
29775
|
}
|
|
29746
29776
|
}, [props.visible]);
|
|
29747
29777
|
|
|
29748
29778
|
// realchildren更新时数据处理---待解决
|
|
29749
|
-
Object(
|
|
29779
|
+
Object(react__WEBPACK_IMPORTED_MODULE_28__["useEffect"])(function () {
|
|
29750
29780
|
if (isMultiple) {
|
|
29751
|
-
multipleRef.current.selectedVal = Array.isArray(initValue) ?
|
|
29781
|
+
multipleRef.current.selectedVal = Array.isArray(initValue) ? _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_12___default()(initValue) : initValue || [];
|
|
29752
29782
|
if (Array.isArray(initValue)) {
|
|
29753
29783
|
if (realChildren !== null && realChildren !== void 0 && realChildren.length) {
|
|
29754
29784
|
var arr = [];
|
|
@@ -29789,7 +29819,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
29789
29819
|
}
|
|
29790
29820
|
}
|
|
29791
29821
|
}, [isMultiple, initValue, children, options]);
|
|
29792
|
-
Object(
|
|
29822
|
+
Object(react__WEBPACK_IMPORTED_MODULE_28__["useEffect"])(function () {
|
|
29793
29823
|
if (!isMultiple) {
|
|
29794
29824
|
multipleRef.current.selectedVal = initValue; // 默认选中值
|
|
29795
29825
|
if (initValue !== undefined) {
|
|
@@ -29815,17 +29845,17 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
29815
29845
|
}
|
|
29816
29846
|
}
|
|
29817
29847
|
}, [initValue, realChildren]);
|
|
29818
|
-
Object(
|
|
29848
|
+
Object(react__WEBPACK_IMPORTED_MODULE_28__["useEffect"])(function () {
|
|
29819
29849
|
if (optionShow === false) {
|
|
29820
29850
|
handleClear();
|
|
29821
29851
|
}
|
|
29822
29852
|
}, [optionShow]);
|
|
29823
|
-
var handleFocus = Object(
|
|
29853
|
+
var handleFocus = Object(react__WEBPACK_IMPORTED_MODULE_28__["useCallback"])(function (e) {
|
|
29824
29854
|
e.stopPropagation();
|
|
29825
29855
|
setFocusd(true);
|
|
29826
29856
|
onFocus && onFocus(e);
|
|
29827
29857
|
}, [onFocus]);
|
|
29828
|
-
var handleBlur = Object(
|
|
29858
|
+
var handleBlur = Object(react__WEBPACK_IMPORTED_MODULE_28__["useCallback"])(function (e) {
|
|
29829
29859
|
e.stopPropagation();
|
|
29830
29860
|
setFocusd(false);
|
|
29831
29861
|
onBlur && onBlur(e);
|
|
@@ -29840,7 +29870,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
29840
29870
|
// }
|
|
29841
29871
|
// }
|
|
29842
29872
|
|
|
29843
|
-
Object(
|
|
29873
|
+
Object(react__WEBPACK_IMPORTED_MODULE_28__["useEffect"])(function () {
|
|
29844
29874
|
selectionRef.current.addEventListener('mouseup', function (e) {
|
|
29845
29875
|
var _e$target;
|
|
29846
29876
|
var isCloseBtn = (e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.className.indexOf('kd-tag-close-icon')) > -1;
|
|
@@ -29849,10 +29879,10 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
29849
29879
|
}
|
|
29850
29880
|
});
|
|
29851
29881
|
}, []);
|
|
29852
|
-
Object(
|
|
29882
|
+
Object(react__WEBPACK_IMPORTED_MODULE_28__["useLayoutEffect"])(function () {
|
|
29853
29883
|
measureRef.current && setInputWidth(measureRef.current.scrollWidth);
|
|
29854
29884
|
}, [searchValue]);
|
|
29855
|
-
var filledOptions = Object(
|
|
29885
|
+
var filledOptions = Object(react__WEBPACK_IMPORTED_MODULE_28__["useMemo"])(function () {
|
|
29856
29886
|
if (filterOption === false || !searchValue) {
|
|
29857
29887
|
return realChildren;
|
|
29858
29888
|
}
|
|
@@ -29879,7 +29909,10 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
29879
29909
|
});
|
|
29880
29910
|
return childrenList;
|
|
29881
29911
|
}, [searchValue, realChildren, filterOption, optionFilterProp]);
|
|
29882
|
-
|
|
29912
|
+
|
|
29913
|
+
// 下拉列表框样式
|
|
29914
|
+
var dropDownCls = classnames__WEBPACK_IMPORTED_MODULE_31___default()(dropdownClassName, (_classNames6 = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_13___default()(_classNames6, "".concat(selectPrefixCls, "-dropdown"), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_13___default()(_classNames6, "".concat(selectPrefixCls, "-dropdown-no-data"), filledOptions.length === 0), _classNames6));
|
|
29915
|
+
var getOptionLabel = Object(react__WEBPACK_IMPORTED_MODULE_28__["useCallback"])(function (obj) {
|
|
29883
29916
|
var text = Object.prototype.hasOwnProperty.call(selectProps, 'options') && !Object.prototype.hasOwnProperty.call(props, 'optionLabelProp') ? 'label' : optionLabelProp;
|
|
29884
29917
|
if (obj.props) {
|
|
29885
29918
|
var _obj$props3;
|
|
@@ -29922,8 +29955,8 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
29922
29955
|
var _multipleRef$current = multipleRef.current,
|
|
29923
29956
|
selectedVal = _multipleRef$current.selectedVal,
|
|
29924
29957
|
selectMulOpts = _multipleRef$current.selectMulOpts;
|
|
29925
|
-
var valArr =
|
|
29926
|
-
var optsArr =
|
|
29958
|
+
var valArr = _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_12___default()(selectedVal);
|
|
29959
|
+
var optsArr = _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_12___default()(selectMulOpts);
|
|
29927
29960
|
if (selectedVal.includes(key)) {
|
|
29928
29961
|
var idx = selectedVal.indexOf(key);
|
|
29929
29962
|
valArr.splice(idx, 1);
|
|
@@ -29980,7 +30013,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
29980
30013
|
label: getOptionLabel(obj) || key
|
|
29981
30014
|
}));
|
|
29982
30015
|
}
|
|
29983
|
-
setMulOptions(
|
|
30016
|
+
setMulOptions(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_12___default()(_selectMulOpts));
|
|
29984
30017
|
onChange && onChange(labelInValue ? _selectMulOpts : _selectedVal, _selectMulOpts);
|
|
29985
30018
|
if (!isSelected) {
|
|
29986
30019
|
onDeselect && onDeselect(key); // 下拉项取消选中时调用,参数为选中项的value,多选模式下生效
|
|
@@ -29991,14 +30024,39 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
29991
30024
|
onSelect && onSelect(key); // 下拉项被选中时调用,参数为选中项value或key
|
|
29992
30025
|
};
|
|
29993
30026
|
|
|
30027
|
+
var removeIntersection = function removeIntersection(selectedItems, filteredItems) {
|
|
30028
|
+
var filteredValues = new Set(filteredItems.map(function (item) {
|
|
30029
|
+
var _item$props;
|
|
30030
|
+
return item.value || ((_item$props = item.props) === null || _item$props === void 0 ? void 0 : _item$props.value);
|
|
30031
|
+
}));
|
|
30032
|
+
var filteredSelectedItems = [];
|
|
30033
|
+
var filteredSelectedValues = [];
|
|
30034
|
+
var _iterator = _createForOfIteratorHelper(selectedItems),
|
|
30035
|
+
_step;
|
|
30036
|
+
try {
|
|
30037
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
30038
|
+
var item = _step.value;
|
|
30039
|
+
if (!filteredValues.has(item.value)) {
|
|
30040
|
+
filteredSelectedItems.push(item);
|
|
30041
|
+
filteredSelectedValues.push(item.value);
|
|
30042
|
+
}
|
|
30043
|
+
}
|
|
30044
|
+
} catch (err) {
|
|
30045
|
+
_iterator.e(err);
|
|
30046
|
+
} finally {
|
|
30047
|
+
_iterator.f();
|
|
30048
|
+
}
|
|
30049
|
+
return [filteredSelectedValues, filteredSelectedItems];
|
|
30050
|
+
};
|
|
30051
|
+
|
|
29994
30052
|
// 多选模式下选中所有 与清除所有 (可以优化)
|
|
29995
|
-
var handleSelectAll = function handleSelectAll() {
|
|
30053
|
+
var handleSelectAll = function handleSelectAll(checked) {
|
|
29996
30054
|
var _multipleRef$current3 = multipleRef.current,
|
|
29997
30055
|
selectedVal = _multipleRef$current3.selectedVal,
|
|
29998
30056
|
selectMulOpts = _multipleRef$current3.selectMulOpts;
|
|
29999
|
-
var newSelectedVal =
|
|
30000
|
-
var newSelectMulOpts =
|
|
30001
|
-
if (
|
|
30057
|
+
var newSelectedVal = _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_12___default()(selectedVal);
|
|
30058
|
+
var newSelectMulOpts = _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_12___default()(selectMulOpts);
|
|
30059
|
+
if (!checked) {
|
|
30002
30060
|
filledOptions.map(function (child) {
|
|
30003
30061
|
var _ref = child.props || child,
|
|
30004
30062
|
value = _ref.value;
|
|
@@ -30013,23 +30071,26 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
30013
30071
|
if (typeof value === 'undefined') {
|
|
30014
30072
|
multipleRef.current.selectedVal = newSelectedVal;
|
|
30015
30073
|
multipleRef.current.selectMulOpts = newSelectMulOpts;
|
|
30016
|
-
setMulOptions(
|
|
30074
|
+
setMulOptions(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_12___default()(newSelectMulOpts));
|
|
30017
30075
|
setSearchValue('');
|
|
30018
30076
|
}
|
|
30019
30077
|
} else {
|
|
30020
|
-
|
|
30021
|
-
|
|
30078
|
+
;
|
|
30079
|
+
var _removeIntersection = removeIntersection(newSelectMulOpts, filledOptions);
|
|
30080
|
+
var _removeIntersection2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_14___default()(_removeIntersection, 2);
|
|
30081
|
+
newSelectedVal = _removeIntersection2[0];
|
|
30082
|
+
newSelectMulOpts = _removeIntersection2[1];
|
|
30022
30083
|
if (typeof value === 'undefined') {
|
|
30023
|
-
multipleRef.current.selectedVal =
|
|
30024
|
-
multipleRef.current.selectMulOpts =
|
|
30025
|
-
setMulOptions(
|
|
30084
|
+
multipleRef.current.selectedVal = newSelectedVal;
|
|
30085
|
+
multipleRef.current.selectMulOpts = newSelectMulOpts;
|
|
30086
|
+
setMulOptions(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_12___default()(newSelectMulOpts));
|
|
30026
30087
|
}
|
|
30027
30088
|
}
|
|
30028
30089
|
onChange && onChange(labelInValue ? newSelectMulOpts : newSelectedVal, newSelectMulOpts);
|
|
30029
30090
|
};
|
|
30030
30091
|
|
|
30031
30092
|
// 输入框变化搜索内容
|
|
30032
|
-
var handleSearchChange = Object(
|
|
30093
|
+
var handleSearchChange = Object(react__WEBPACK_IMPORTED_MODULE_28__["useCallback"])(function (event) {
|
|
30033
30094
|
var val = event.currentTarget.value;
|
|
30034
30095
|
setOptionShow(true);
|
|
30035
30096
|
setSearchValue(val);
|
|
@@ -30037,7 +30098,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
30037
30098
|
}, [onSearch]);
|
|
30038
30099
|
|
|
30039
30100
|
// 清除搜索内容
|
|
30040
|
-
var handleClear = Object(
|
|
30101
|
+
var handleClear = Object(react__WEBPACK_IMPORTED_MODULE_28__["useCallback"])(function () {
|
|
30041
30102
|
if (searchRef.current) {
|
|
30042
30103
|
searchRef.current.value = '';
|
|
30043
30104
|
setSearchValue('');
|
|
@@ -30068,7 +30129,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
30068
30129
|
var idx = selectedVal.indexOf(tag);
|
|
30069
30130
|
selectedVal.splice(idx, 1);
|
|
30070
30131
|
selectMulOpts.splice(idx, 1);
|
|
30071
|
-
setMulOptions(
|
|
30132
|
+
setMulOptions(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_12___default()(selectMulOpts));
|
|
30072
30133
|
onChange && onChange(labelInValue ? selectMulOpts : selectedVal, selectMulOpts);
|
|
30073
30134
|
e.stopPropagation();
|
|
30074
30135
|
};
|
|
@@ -30078,27 +30139,27 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
30078
30139
|
var _classNames7;
|
|
30079
30140
|
var suffixIcon = selectProps.suffixIcon;
|
|
30080
30141
|
// 选择器下拉icon样式
|
|
30081
|
-
var arrowIconCls =
|
|
30142
|
+
var arrowIconCls = classnames__WEBPACK_IMPORTED_MODULE_31___default()((_classNames7 = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_13___default()(_classNames7, "".concat(selectPrefixCls, "-icon-arrow"), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_13___default()(_classNames7, "".concat(selectPrefixCls, "-icon-arrow-up"), optionShow), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_13___default()(_classNames7, "".concat(selectPrefixCls, "-icon-arrow-down"), !optionShow), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_13___default()(_classNames7, "".concat(selectPrefixCls, "-icon-arrow-focus"), optionShow), _classNames7));
|
|
30082
30143
|
var iconShow = allowClear && !disabled && ((isMultiple ? mulOptions.length > 0 : (singleVal !== null && singleVal !== void 0 ? singleVal : '') !== '') || searchValue);
|
|
30083
|
-
var clearIconCls =
|
|
30084
|
-
return /*#__PURE__*/
|
|
30144
|
+
var clearIconCls = classnames__WEBPACK_IMPORTED_MODULE_31___default()(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_13___default()({}, "".concat(selectPrefixCls, "-icon-clear"), true));
|
|
30145
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_28___default.a.Fragment, null, iconShow ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement("span", {
|
|
30085
30146
|
onClick: handleReset,
|
|
30086
30147
|
onMouseDown: function onMouseDown(e) {
|
|
30087
30148
|
return e.preventDefault();
|
|
30088
30149
|
},
|
|
30089
30150
|
className: clearIconCls,
|
|
30090
30151
|
ref: clearRef
|
|
30091
|
-
}, clearIcon || /*#__PURE__*/
|
|
30152
|
+
}, clearIcon || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement(_index__WEBPACK_IMPORTED_MODULE_35__["Icon"], {
|
|
30092
30153
|
type: "close-solid"
|
|
30093
|
-
})) : null, showArrow ? /*#__PURE__*/
|
|
30154
|
+
})) : null, showArrow ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement("span", {
|
|
30094
30155
|
className: arrowIconCls
|
|
30095
|
-
}, suffixIcon || /*#__PURE__*/
|
|
30156
|
+
}, suffixIcon || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement(_index__WEBPACK_IMPORTED_MODULE_35__["Icon"], {
|
|
30096
30157
|
type: "arrow-down"
|
|
30097
30158
|
})) : null);
|
|
30098
30159
|
};
|
|
30099
30160
|
var renderOption = function renderOption(child, index) {
|
|
30100
30161
|
if (child !== null && child !== void 0 && child.props && (child.type.displayName === 'Option' || child.type.name === 'Option')) {
|
|
30101
|
-
return /*#__PURE__*/
|
|
30162
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement(_option__WEBPACK_IMPORTED_MODULE_36__["default"], _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_11___default()({
|
|
30102
30163
|
isMultiple: isMultiple
|
|
30103
30164
|
}, child.props, {
|
|
30104
30165
|
key: index,
|
|
@@ -30111,7 +30172,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
30111
30172
|
}
|
|
30112
30173
|
}));
|
|
30113
30174
|
} else {
|
|
30114
|
-
return /*#__PURE__*/
|
|
30175
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement(_option__WEBPACK_IMPORTED_MODULE_36__["default"], _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_11___default()({
|
|
30115
30176
|
isMultiple: isMultiple,
|
|
30116
30177
|
value: child === null || child === void 0 ? void 0 : child.value,
|
|
30117
30178
|
key: index,
|
|
@@ -30126,7 +30187,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
30126
30187
|
}
|
|
30127
30188
|
};
|
|
30128
30189
|
var dropRender = function dropRender(childrenToRender, heightStyle) {
|
|
30129
|
-
return /*#__PURE__*/
|
|
30190
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement("div", {
|
|
30130
30191
|
className: dropContentCls,
|
|
30131
30192
|
style: heightStyle
|
|
30132
30193
|
}, childrenToRender);
|
|
@@ -30135,20 +30196,48 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
30135
30196
|
// 下拉列表为空时显示的内容
|
|
30136
30197
|
var renderNotContent = function renderNotContent() {
|
|
30137
30198
|
// 下拉列表为空
|
|
30138
|
-
var emptyListCls =
|
|
30199
|
+
var emptyListCls = classnames__WEBPACK_IMPORTED_MODULE_31___default()(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_13___default()({}, "".concat(selectPrefixCls, "-dropdown-empty"), true));
|
|
30139
30200
|
var notFoundContent = selectProps.notFoundContent;
|
|
30140
30201
|
var emptyContent = notFoundContent || '暂无数据';
|
|
30141
|
-
return (filledOptions === null || filledOptions === void 0 ? void 0 : filledOptions.length) === 0 && /*#__PURE__*/
|
|
30202
|
+
return (filledOptions === null || filledOptions === void 0 ? void 0 : filledOptions.length) === 0 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement("div", {
|
|
30142
30203
|
className: emptyListCls
|
|
30143
30204
|
}, emptyContent);
|
|
30144
30205
|
};
|
|
30145
|
-
Object(
|
|
30206
|
+
Object(react__WEBPACK_IMPORTED_MODULE_28__["useEffect"])(function () {
|
|
30146
30207
|
if (isShowSearch && autoFocus && !disabled) {
|
|
30147
30208
|
var _searchRef$current3;
|
|
30148
30209
|
(_searchRef$current3 = searchRef.current) === null || _searchRef$current3 === void 0 ? void 0 : _searchRef$current3.focus();
|
|
30149
30210
|
}
|
|
30150
30211
|
}, [isShowSearch, autoFocus, disabled]);
|
|
30151
|
-
var optionsListRef =
|
|
30212
|
+
var optionsListRef = react__WEBPACK_IMPORTED_MODULE_28___default.a.useRef(null);
|
|
30213
|
+
var getCheckedState = function getCheckedState(selectedItems, filteredItems) {
|
|
30214
|
+
var valuesSet = new Set(selectedItems.map(function (item) {
|
|
30215
|
+
return item.value;
|
|
30216
|
+
}));
|
|
30217
|
+
var number = 0;
|
|
30218
|
+
var _iterator2 = _createForOfIteratorHelper(filteredItems),
|
|
30219
|
+
_step2;
|
|
30220
|
+
try {
|
|
30221
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
30222
|
+
var _item$props2;
|
|
30223
|
+
var item = _step2.value;
|
|
30224
|
+
if (valuesSet.has(item.value || ((_item$props2 = item.props) === null || _item$props2 === void 0 ? void 0 : _item$props2.value))) {
|
|
30225
|
+
number += 1;
|
|
30226
|
+
}
|
|
30227
|
+
}
|
|
30228
|
+
} catch (err) {
|
|
30229
|
+
_iterator2.e(err);
|
|
30230
|
+
} finally {
|
|
30231
|
+
_iterator2.f();
|
|
30232
|
+
}
|
|
30233
|
+
var checked = number > 0 && number === filteredItems.length;
|
|
30234
|
+
var indeterminate = number > 0 && number < filteredItems.length;
|
|
30235
|
+
return {
|
|
30236
|
+
checked: checked,
|
|
30237
|
+
indeterminate: indeterminate
|
|
30238
|
+
};
|
|
30239
|
+
};
|
|
30240
|
+
|
|
30152
30241
|
// 渲染下拉列表框
|
|
30153
30242
|
var renderContent = function renderContent() {
|
|
30154
30243
|
var dropdownRender = selectProps.dropdownRender,
|
|
@@ -30162,7 +30251,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
30162
30251
|
var temp = renderOption(item, index);
|
|
30163
30252
|
return temp;
|
|
30164
30253
|
});
|
|
30165
|
-
eleOptionList = /*#__PURE__*/
|
|
30254
|
+
eleOptionList = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement(_virtual_list__WEBPACK_IMPORTED_MODULE_38__["default"], _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_11___default()({
|
|
30166
30255
|
role: "listbox",
|
|
30167
30256
|
data: childrenToRender,
|
|
30168
30257
|
itemKey: function itemKey(child) {
|
|
@@ -30188,39 +30277,42 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
30188
30277
|
height: '30px',
|
|
30189
30278
|
background: 'none'
|
|
30190
30279
|
};
|
|
30191
|
-
var
|
|
30192
|
-
|
|
30193
|
-
|
|
30280
|
+
var _getCheckedState = getCheckedState(mulOptions, filledOptions),
|
|
30281
|
+
checked = _getCheckedState.checked,
|
|
30282
|
+
indeterminate = _getCheckedState.indeterminate;
|
|
30283
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_28___default.a.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement("div", {
|
|
30194
30284
|
className: dropDownCls,
|
|
30195
30285
|
style: dropdownStyle,
|
|
30196
30286
|
ref: dropDownRef
|
|
30197
|
-
}, !dropdownRender && childrenToRender.length > 0 ? dropRender(eleOptionList, heightStyle) : null, renderNotContent(), /*#__PURE__*/
|
|
30287
|
+
}, !dropdownRender && childrenToRender.length > 0 ? dropRender(eleOptionList, heightStyle) : null, renderNotContent(), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement("div", null, dropdownRender ? dropdownRender(dropRender(eleOptionList, heightStyle)) : null), isMultiple && filledOptions.length > 0 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement("div", {
|
|
30198
30288
|
className: multipleFooterCls
|
|
30199
|
-
}, /*#__PURE__*/
|
|
30289
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement(_index__WEBPACK_IMPORTED_MODULE_35__["Checkbox"], {
|
|
30200
30290
|
style: checkboxStyle,
|
|
30201
30291
|
checked: checked,
|
|
30202
30292
|
indeterminate: indeterminate,
|
|
30203
|
-
onChange:
|
|
30204
|
-
|
|
30293
|
+
onChange: function onChange() {
|
|
30294
|
+
return handleSelectAll(checked);
|
|
30295
|
+
}
|
|
30296
|
+
}, selectLangMsg === null || selectLangMsg === void 0 ? void 0 : selectLangMsg.selectAll), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement("span", {
|
|
30205
30297
|
className: "".concat(selectPrefixCls, "-multiple-footer-hadSelected")
|
|
30206
30298
|
}, locale.getLangMsg('Select', 'seleted', {
|
|
30207
|
-
size: /*#__PURE__*/
|
|
30299
|
+
size: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement("span", {
|
|
30208
30300
|
className: "".concat(selectPrefixCls, "-multiple-footer-hadSelected-number")
|
|
30209
|
-
}, selectedVal.length)
|
|
30301
|
+
}, selectedVal === null || selectedVal === void 0 ? void 0 : selectedVal.length)
|
|
30210
30302
|
}))) : null));
|
|
30211
30303
|
};
|
|
30212
30304
|
|
|
30213
30305
|
// 处理多选tag
|
|
30214
|
-
var handleMaxTagHolder = Object(
|
|
30306
|
+
var handleMaxTagHolder = Object(react__WEBPACK_IMPORTED_MODULE_28__["useCallback"])(function () {
|
|
30215
30307
|
var maxTagPlaceholder = selectProps.maxTagPlaceholder;
|
|
30216
30308
|
if (typeof maxTagPlaceholder === 'function') {
|
|
30217
|
-
return /*#__PURE__*/
|
|
30309
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement(_index__WEBPACK_IMPORTED_MODULE_35__["Tag"], {
|
|
30218
30310
|
type: "edit",
|
|
30219
30311
|
size: size,
|
|
30220
30312
|
disabled: disabled
|
|
30221
30313
|
}, maxTagPlaceholder(mulOptions));
|
|
30222
30314
|
} else {
|
|
30223
|
-
return /*#__PURE__*/
|
|
30315
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement(_index__WEBPACK_IMPORTED_MODULE_35__["Tag"], {
|
|
30224
30316
|
type: "edit",
|
|
30225
30317
|
size: size,
|
|
30226
30318
|
disabled: disabled
|
|
@@ -30246,13 +30338,13 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
30246
30338
|
var hiddenStyle = isShowSearch && !!searchValue || singleVal ? {
|
|
30247
30339
|
visibility: 'hidden'
|
|
30248
30340
|
} : undefined;
|
|
30249
|
-
return /*#__PURE__*/
|
|
30341
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_28___default.a.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement("div", {
|
|
30250
30342
|
className: singleCls,
|
|
30251
30343
|
ref: selectionRef,
|
|
30252
30344
|
title: title
|
|
30253
|
-
}, /*#__PURE__*/
|
|
30345
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement("span", {
|
|
30254
30346
|
className: "".concat(selectPrefixCls, "-selection-search")
|
|
30255
|
-
}, /*#__PURE__*/
|
|
30347
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement("input", {
|
|
30256
30348
|
ref: searchRef,
|
|
30257
30349
|
value: searchValue,
|
|
30258
30350
|
className: "".concat(selectPrefixCls, "-selection-search-input"),
|
|
@@ -30260,12 +30352,12 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
30260
30352
|
onFocus: handleFocus,
|
|
30261
30353
|
onBlur: handleBlur,
|
|
30262
30354
|
readOnly: !isShowSearch || !!disabled
|
|
30263
|
-
})), singleVal && !searchValue ? /*#__PURE__*/
|
|
30355
|
+
})), singleVal && !searchValue ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement("span", {
|
|
30264
30356
|
className: "".concat(selectPrefixCls, "-selection-item")
|
|
30265
|
-
}, singleVal) : null, /*#__PURE__*/
|
|
30357
|
+
}, singleVal) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement("span", {
|
|
30266
30358
|
className: "".concat(selectPrefixCls, "-placeholder"),
|
|
30267
30359
|
style: hiddenStyle
|
|
30268
|
-
}, placeholder), /*#__PURE__*/
|
|
30360
|
+
}, placeholder), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement("span", {
|
|
30269
30361
|
className: "".concat(selectPrefixCls, "-suffix")
|
|
30270
30362
|
}, renderSuffix())));
|
|
30271
30363
|
};
|
|
@@ -30275,21 +30367,21 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
30275
30367
|
var _classNames10, _classNames11;
|
|
30276
30368
|
var maxTagCount = selectProps.maxTagCount,
|
|
30277
30369
|
maxTagPlaceholder = selectProps.maxTagPlaceholder;
|
|
30278
|
-
var multipleCls =
|
|
30279
|
-
var itemCls =
|
|
30370
|
+
var multipleCls = classnames__WEBPACK_IMPORTED_MODULE_31___default()(commCls, (_classNames10 = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_13___default()(_classNames10, "".concat(selectPrefixCls, "-multiple-disabled"), disabled), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_13___default()(_classNames10, "".concat(selectPrefixCls, "-").concat(mode), mode), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_13___default()(_classNames10, "".concat(selectPrefixCls, "-focused"), focusd || optionShow), _classNames10));
|
|
30371
|
+
var itemCls = classnames__WEBPACK_IMPORTED_MODULE_31___default()((_classNames11 = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_13___default()(_classNames11, "".concat(selectPrefixCls, "-selection-item"), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_13___default()(_classNames11, "".concat(selectPrefixCls, "-selection-item-").concat(size), size), _classNames11));
|
|
30280
30372
|
var TagStyle = {
|
|
30281
30373
|
margin: '2px 8px 2px 0',
|
|
30282
30374
|
maxWidth: '100%'
|
|
30283
30375
|
};
|
|
30284
|
-
return /*#__PURE__*/
|
|
30376
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement("div", {
|
|
30285
30377
|
className: multipleCls,
|
|
30286
30378
|
ref: selectionRef
|
|
30287
|
-
}, Array.isArray(mulOptions) ? /*#__PURE__*/
|
|
30379
|
+
}, Array.isArray(mulOptions) ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_28___default.a.Fragment, null, mulOptions.map(function (item, index) {
|
|
30288
30380
|
var label = item.label,
|
|
30289
30381
|
value = item.value;
|
|
30290
|
-
return !maxTagCount || index <= maxTagCount - 1 ? /*#__PURE__*/
|
|
30382
|
+
return !maxTagCount || index <= maxTagCount - 1 ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement("span", {
|
|
30291
30383
|
key: value,
|
|
30292
|
-
className:
|
|
30384
|
+
className: classnames__WEBPACK_IMPORTED_MODULE_31___default()("".concat(selectPrefixCls, "-selection-tag")),
|
|
30293
30385
|
onMouseDown: function onMouseDown(e) {
|
|
30294
30386
|
return e.preventDefault();
|
|
30295
30387
|
}
|
|
@@ -30299,7 +30391,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
30299
30391
|
label: label,
|
|
30300
30392
|
disabled: disabled,
|
|
30301
30393
|
size: size
|
|
30302
|
-
}) : /*#__PURE__*/
|
|
30394
|
+
}) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement(_index__WEBPACK_IMPORTED_MODULE_35__["Tag"], {
|
|
30303
30395
|
type: "edit",
|
|
30304
30396
|
style: TagStyle,
|
|
30305
30397
|
size: size,
|
|
@@ -30310,16 +30402,16 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
30310
30402
|
},
|
|
30311
30403
|
"data-tag": value
|
|
30312
30404
|
}, label)) : null;
|
|
30313
|
-
}), maxTagCount && mulOptions.length > maxTagCount ? maxTagPlaceholder ? handleMaxTagHolder() : /*#__PURE__*/
|
|
30405
|
+
}), maxTagCount && mulOptions.length > maxTagCount ? maxTagPlaceholder ? handleMaxTagHolder() : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement("span", {
|
|
30314
30406
|
className: itemCls
|
|
30315
|
-
}, /*#__PURE__*/
|
|
30407
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement("span", {
|
|
30316
30408
|
className: "".concat(selectPrefixCls, "-selection-item-content")
|
|
30317
|
-
}, "\u5171", mulOptions.length, "\u9879")) : null) : null, /*#__PURE__*/
|
|
30409
|
+
}, "\u5171", mulOptions.length, "\u9879")) : null) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement("span", {
|
|
30318
30410
|
className: "".concat(selectPrefixCls, "-selection-search"),
|
|
30319
30411
|
style: {
|
|
30320
30412
|
width: inputWidth
|
|
30321
30413
|
}
|
|
30322
|
-
}, /*#__PURE__*/
|
|
30414
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement("input", {
|
|
30323
30415
|
ref: searchRef,
|
|
30324
30416
|
value: searchValue,
|
|
30325
30417
|
className: "".concat(selectPrefixCls, "-selection-search-input"),
|
|
@@ -30327,16 +30419,16 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
30327
30419
|
onFocus: handleFocus,
|
|
30328
30420
|
onBlur: handleBlur,
|
|
30329
30421
|
readOnly: !isShowSearch || !!disabled
|
|
30330
|
-
}), /*#__PURE__*/
|
|
30422
|
+
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement("span", {
|
|
30331
30423
|
ref: measureRef,
|
|
30332
30424
|
className: "".concat(selectPrefixCls, "-selection-search-mirror")
|
|
30333
|
-
}, searchValue, "\xA0")), /*#__PURE__*/
|
|
30425
|
+
}, searchValue, "\xA0")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement("span", {
|
|
30334
30426
|
className: "".concat(selectPrefixCls, "-placeholder")
|
|
30335
|
-
}, !mulOptions.length && !searchValue ? placeholder : null), /*#__PURE__*/
|
|
30427
|
+
}, !mulOptions.length && !searchValue ? placeholder : null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement("span", {
|
|
30336
30428
|
className: "".concat(selectPrefixCls, "-suffix")
|
|
30337
30429
|
}, renderSuffix()));
|
|
30338
30430
|
};
|
|
30339
|
-
var singleCls =
|
|
30431
|
+
var singleCls = classnames__WEBPACK_IMPORTED_MODULE_31___default()(commCls, (_classNames12 = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_13___default()(_classNames12, "".concat(selectPrefixCls, "-single"), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_13___default()(_classNames12, "".concat(selectPrefixCls, "-single-disabled"), disabled), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_13___default()(_classNames12, "".concat(selectPrefixCls, "-single-focused"), focusd && !disabled || optionShow), _classNames12));
|
|
30340
30432
|
// keyboard
|
|
30341
30433
|
var getActiveIndex = function getActiveIndex(index) {
|
|
30342
30434
|
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
@@ -30351,18 +30443,18 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
30351
30443
|
return -1;
|
|
30352
30444
|
};
|
|
30353
30445
|
// reset activeIndex
|
|
30354
|
-
Object(
|
|
30446
|
+
Object(react__WEBPACK_IMPORTED_MODULE_28__["useEffect"])(function () {
|
|
30355
30447
|
if (searchValue) {
|
|
30356
30448
|
setActiveIndex(getActiveIndex(0));
|
|
30357
30449
|
}
|
|
30358
30450
|
}, [searchValue]);
|
|
30359
|
-
Object(
|
|
30451
|
+
Object(react__WEBPACK_IMPORTED_MODULE_28__["useEffect"])(function () {
|
|
30360
30452
|
if (optionShow && !disabled) {
|
|
30361
30453
|
var onDropdownVisibleChange = selectProps.onDropdownVisibleChange;
|
|
30362
30454
|
onDropdownVisibleChange && onDropdownVisibleChange(true);
|
|
30363
30455
|
}
|
|
30364
30456
|
}, [optionShow]);
|
|
30365
|
-
Object(
|
|
30457
|
+
Object(react__WEBPACK_IMPORTED_MODULE_28__["useEffect"])(function () {
|
|
30366
30458
|
var _clearRef$current;
|
|
30367
30459
|
var fn = function fn(e) {
|
|
30368
30460
|
e.stopPropagation();
|
|
@@ -30373,7 +30465,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
30373
30465
|
(_clearRef$current2 = clearRef.current) === null || _clearRef$current2 === void 0 ? void 0 : _clearRef$current2.removeEventListener('mouseup', fn);
|
|
30374
30466
|
};
|
|
30375
30467
|
}, [singleVal, mulOptions]);
|
|
30376
|
-
Object(
|
|
30468
|
+
Object(react__WEBPACK_IMPORTED_MODULE_28__["useImperativeHandle"])(ref, function () {
|
|
30377
30469
|
return {
|
|
30378
30470
|
select: selectRef.current,
|
|
30379
30471
|
focus: function focus() {
|
|
@@ -30388,14 +30480,14 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
30388
30480
|
}
|
|
30389
30481
|
};
|
|
30390
30482
|
});
|
|
30391
|
-
var _useState13 = Object(
|
|
30392
|
-
_useState14 =
|
|
30483
|
+
var _useState13 = Object(react__WEBPACK_IMPORTED_MODULE_28__["useState"])(isShowSearch ? getActiveIndex(0) : -1),
|
|
30484
|
+
_useState14 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_14___default()(_useState13, 2),
|
|
30393
30485
|
activeIndex = _useState14[0],
|
|
30394
30486
|
setActiveIndex = _useState14[1];
|
|
30395
30487
|
var onInternalKeyDown = function onInternalKeyDown(e) {
|
|
30396
30488
|
var which = e.which;
|
|
30397
30489
|
// open
|
|
30398
|
-
if (which ===
|
|
30490
|
+
if (which === _utils_KeyCode__WEBPACK_IMPORTED_MODULE_39__["default"].ENTER || which === _utils_KeyCode__WEBPACK_IMPORTED_MODULE_39__["default"].UP || which === _utils_KeyCode__WEBPACK_IMPORTED_MODULE_39__["default"].DOWN) {
|
|
30399
30491
|
e.preventDefault();
|
|
30400
30492
|
handleVisibleChange(true);
|
|
30401
30493
|
}
|
|
@@ -30404,25 +30496,25 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
30404
30496
|
selectedVal = _multipleRef$current5.selectedVal,
|
|
30405
30497
|
selectMulOpts = _multipleRef$current5.selectMulOpts;
|
|
30406
30498
|
// isMultiple
|
|
30407
|
-
if (which ===
|
|
30499
|
+
if (which === _utils_KeyCode__WEBPACK_IMPORTED_MODULE_39__["default"].BACKSPACE && !searchValue && isMultiple && selectedVal !== null && selectedVal !== void 0 && selectedVal.length && selectMulOpts.length) {
|
|
30408
30500
|
selectedVal.splice(-1, 1);
|
|
30409
30501
|
selectMulOpts.splice(-1, 1);
|
|
30410
|
-
setMulOptions(
|
|
30502
|
+
setMulOptions(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_12___default()(selectMulOpts));
|
|
30411
30503
|
onChange && onChange(labelInValue ? selectMulOpts : selectedVal, selectMulOpts);
|
|
30412
30504
|
}
|
|
30413
30505
|
// optionsList: up、down、enter
|
|
30414
30506
|
if (optionShow) {
|
|
30415
30507
|
var offset = 0;
|
|
30416
|
-
if (which ===
|
|
30508
|
+
if (which === _utils_KeyCode__WEBPACK_IMPORTED_MODULE_39__["default"].UP) {
|
|
30417
30509
|
offset = -1;
|
|
30418
|
-
} else if (which ===
|
|
30510
|
+
} else if (which === _utils_KeyCode__WEBPACK_IMPORTED_MODULE_39__["default"].DOWN) {
|
|
30419
30511
|
offset = 1;
|
|
30420
|
-
} else if (which ===
|
|
30421
|
-
var _item$
|
|
30512
|
+
} else if (which === _utils_KeyCode__WEBPACK_IMPORTED_MODULE_39__["default"].ENTER) {
|
|
30513
|
+
var _item$props3, _item$props4;
|
|
30422
30514
|
var item = filledOptions[activeIndex];
|
|
30423
30515
|
if (!item) return;
|
|
30424
|
-
var key = ((_item$
|
|
30425
|
-
var label = ((_item$
|
|
30516
|
+
var key = ((_item$props3 = item.props) === null || _item$props3 === void 0 ? void 0 : _item$props3.value) || item.value;
|
|
30517
|
+
var label = ((_item$props4 = item.props) === null || _item$props4 === void 0 ? void 0 : _item$props4.children) || item.label;
|
|
30426
30518
|
handleOption(key, label, true);
|
|
30427
30519
|
// search
|
|
30428
30520
|
if (searchValue) {
|
|
@@ -30438,7 +30530,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
30438
30530
|
if (!isMultiple) {
|
|
30439
30531
|
handleVisibleChange(false);
|
|
30440
30532
|
}
|
|
30441
|
-
} else if (which ===
|
|
30533
|
+
} else if (which === _utils_KeyCode__WEBPACK_IMPORTED_MODULE_39__["default"].ESC) {
|
|
30442
30534
|
handleVisibleChange(false);
|
|
30443
30535
|
}
|
|
30444
30536
|
if (offset !== 0) {
|
|
@@ -30454,11 +30546,11 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
30454
30546
|
}
|
|
30455
30547
|
};
|
|
30456
30548
|
var renderSelect = function renderSelect() {
|
|
30457
|
-
return /*#__PURE__*/
|
|
30549
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement("div", {
|
|
30458
30550
|
className: selectCls,
|
|
30459
30551
|
ref: selectRef,
|
|
30460
30552
|
style: style
|
|
30461
|
-
}, /*#__PURE__*/
|
|
30553
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.createElement("span", {
|
|
30462
30554
|
className: selectionCls,
|
|
30463
30555
|
tabIndex: disabled ? -1 : 0,
|
|
30464
30556
|
onFocus: function onFocus() {
|
|
@@ -30504,9 +30596,9 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
30504
30596
|
onVisibleChange: handleVisibleChange,
|
|
30505
30597
|
clickToClose: !(isShowSearch && searchValue)
|
|
30506
30598
|
});
|
|
30507
|
-
return Object(
|
|
30599
|
+
return Object(_utils_usePopper__WEBPACK_IMPORTED_MODULE_37__["default"])(renderSelect(), renderContent(), popperProps);
|
|
30508
30600
|
};
|
|
30509
|
-
var Select = /*#__PURE__*/
|
|
30601
|
+
var Select = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_28___default.a.forwardRef(InternalSelect);
|
|
30510
30602
|
Select.displayName = 'Select';
|
|
30511
30603
|
/* harmony default export */ __webpack_exports__["default"] = (Select);
|
|
30512
30604
|
|
|
@@ -33691,13 +33783,13 @@ var Table = /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_4__["forwardRef"]
|
|
|
33691
33783
|
if (typeof getRowProps === 'function') {
|
|
33692
33784
|
pipeline.appendRowPropsGetter(getRowProps);
|
|
33693
33785
|
} else {
|
|
33694
|
-
Object(_utils_devwarning__WEBPACK_IMPORTED_MODULE_22__["default"])(
|
|
33786
|
+
Object(_utils_devwarning__WEBPACK_IMPORTED_MODULE_22__["default"])(getRowProps !== undefined, 'table', "parameter 'getRowProps' should be a function but here it is ".concat(getRowProps));
|
|
33695
33787
|
}
|
|
33696
33788
|
if (typeof getTableProps === 'function') {
|
|
33697
33789
|
var tableProps = getTableProps();
|
|
33698
33790
|
pipeline.addTableProps(tableProps);
|
|
33699
33791
|
} else {
|
|
33700
|
-
Object(_utils_devwarning__WEBPACK_IMPORTED_MODULE_22__["default"])(
|
|
33792
|
+
Object(_utils_devwarning__WEBPACK_IMPORTED_MODULE_22__["default"])(getTableProps !== undefined, 'table', "parameter 'getTableProps' should be a function but here it is ".concat(getTableProps));
|
|
33701
33793
|
}
|
|
33702
33794
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(_kdcloudjs_table__WEBPACK_IMPORTED_MODULE_5__["Table"], _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, pipeline.getProps(), {
|
|
33703
33795
|
className: tableCls,
|
|
@@ -36952,7 +37044,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
36952
37044
|
|
|
36953
37045
|
|
|
36954
37046
|
|
|
36955
|
-
var _excluded = ["prefixCls", "treeData", "virtual", "showIcon", "switcherIcon", "icon", "checkable", "checkStrictly", "disabled", "draggable", "scrollToKey", "expandedKeys", "checkedKeys", "defaultExpandRoot", "defaultExpandAll", "defaultExpandParent", "defaultExpandedKeys", "defaultCheckedKeys", "defaultSelectedKeys", "height", "onCheck", "onExpand", "onDragStart", "onDragOver", "onDragLeave", "onDragEnter", "onDragEnd", "onDrop", "onSelect", "selectedKeys", "setTreeNodeStyle", "setTreeNodeClassName", "estimatedItemSize", "style", "className", "filterTreeNode", "filterValue", "expandOnClickNode", "onlyExpandOnClickIcon", "loadData", "notFoundContent", "showLine"];
|
|
37047
|
+
var _excluded = ["prefixCls", "treeData", "virtual", "showIcon", "switcherIcon", "icon", "checkable", "checkStrictly", "disabled", "draggable", "scrollToKey", "expandedKeys", "checkedKeys", "defaultExpandRoot", "defaultExpandAll", "defaultExpandParent", "defaultExpandedKeys", "defaultCheckedKeys", "defaultSelectedKeys", "height", "onCheck", "onExpand", "onDragStart", "onDragOver", "onDragLeave", "onDragEnter", "onDragEnd", "onDrop", "onSelect", "selectedKeys", "setTreeNodeStyle", "setTreeNodeClassName", "estimatedItemSize", "style", "className", "filterTreeNode", "filterValue", "expandOnClickNode", "onlyExpandOnClickIcon", "loadData", "notFoundContent", "showLine", "expandOnFilterNode"];
|
|
36956
37048
|
|
|
36957
37049
|
|
|
36958
37050
|
|
|
@@ -37030,6 +37122,7 @@ var InternalTree = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default.a.fo
|
|
|
37030
37122
|
loadData = TreeProps.loadData,
|
|
37031
37123
|
notFoundContent = TreeProps.notFoundContent,
|
|
37032
37124
|
showLine = TreeProps.showLine,
|
|
37125
|
+
expandOnFilterNode = TreeProps.expandOnFilterNode,
|
|
37033
37126
|
others = _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_4___default()(TreeProps, _excluded);
|
|
37034
37127
|
var treePrefixCls = getPrefixCls(prefixCls, 'tree', customPrefixcls); // 树样式前缀
|
|
37035
37128
|
var treeNodeClassName = classnames__WEBPACK_IMPORTED_MODULE_17___default()(className, (_classNames = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3___default()(_classNames, "".concat(treePrefixCls), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_3___default()(_classNames, "".concat(treePrefixCls, "-show-line"), showLine), _classNames));
|
|
@@ -37091,7 +37184,7 @@ var InternalTree = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default.a.fo
|
|
|
37091
37184
|
setSearchStatus('NONE');
|
|
37092
37185
|
}
|
|
37093
37186
|
}, [filterValue]);
|
|
37094
|
-
var _useExpand = Object(_treeHooks__WEBPACK_IMPORTED_MODULE_24__["useExpand"])(flattenAllData, expandedKeysProps, defaultExpandedKeys, defaultExpandAll, defaultExpandRoot, defaultExpandParent, scrollKey, isInit, filterTreeNode, isSearching, keysData, searchStatus, filterValue),
|
|
37187
|
+
var _useExpand = Object(_treeHooks__WEBPACK_IMPORTED_MODULE_24__["useExpand"])(flattenAllData, expandedKeysProps, defaultExpandedKeys, defaultExpandAll, defaultExpandRoot, defaultExpandParent, scrollKey, isInit, filterTreeNode, isSearching, keysData, searchStatus, filterValue, expandOnFilterNode),
|
|
37095
37188
|
_useExpand2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_useExpand, 2),
|
|
37096
37189
|
expandedKeys = _useExpand2[0],
|
|
37097
37190
|
setExpandedKeys = _useExpand2[1];
|
|
@@ -37107,8 +37200,8 @@ var InternalTree = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default.a.fo
|
|
|
37107
37200
|
setCheckedKeys = _useChecked2[2],
|
|
37108
37201
|
setHalfCheckedKeys = _useChecked2[3];
|
|
37109
37202
|
var filterData = react__WEBPACK_IMPORTED_MODULE_16___default.a.useMemo(function () {
|
|
37110
|
-
return Object(_utils_treeUtils__WEBPACK_IMPORTED_MODULE_23__["getFilterData"])(spreadAttrData, filterTreeNode, isSearching, posData, keysData);
|
|
37111
|
-
}, [spreadAttrData, isSearching, posData, keysData, filterValue]);
|
|
37203
|
+
return Object(_utils_treeUtils__WEBPACK_IMPORTED_MODULE_23__["getFilterData"])(spreadAttrData, filterTreeNode, isSearching, posData, keysData, expandOnFilterNode);
|
|
37204
|
+
}, [spreadAttrData, isSearching, posData, keysData, filterValue, expandOnFilterNode]);
|
|
37112
37205
|
Object(react__WEBPACK_IMPORTED_MODULE_16__["useEffect"])(function () {
|
|
37113
37206
|
if (typeof scrollKey === 'undefined') {
|
|
37114
37207
|
return;
|
|
@@ -37492,15 +37585,15 @@ var useChecked = function useChecked(checkStrictly, checkedKeysProps, defaultChe
|
|
|
37492
37585
|
}, [nextHalfCheckedKeys]);
|
|
37493
37586
|
return [checkedKeys, halfCheckedKeys, setCheckedKeys, setHalfCheckedKeys];
|
|
37494
37587
|
};
|
|
37495
|
-
var useExpand = function useExpand(flattenAllData, expandedKeysProps, defaultExpandedKeys, defaultExpandAll, defaultExpandRoot, defaultExpandParent, scrollKey, isInit, filterTreeNode, isSearching, keysData, searchStatus, filterValue) {
|
|
37588
|
+
var useExpand = function useExpand(flattenAllData, expandedKeysProps, defaultExpandedKeys, defaultExpandAll, defaultExpandRoot, defaultExpandParent, scrollKey, isInit, filterTreeNode, isSearching, keysData, searchStatus, filterValue, expandOnFilterNode) {
|
|
37496
37589
|
var expandScrollkeys = [];
|
|
37497
37590
|
if (scrollKey) {
|
|
37498
37591
|
var pos = Object(_utils_treeUtils__WEBPACK_IMPORTED_MODULE_4__["getPos"])(flattenAllData, scrollKey);
|
|
37499
37592
|
expandScrollkeys = Object(_utils_treeUtils__WEBPACK_IMPORTED_MODULE_4__["getAllParentKeys"])(flattenAllData, pos);
|
|
37500
37593
|
}
|
|
37501
37594
|
var initialExpandedKeys = react__WEBPACK_IMPORTED_MODULE_3___default.a.useMemo(function () {
|
|
37502
|
-
return Object(_utils_treeUtils__WEBPACK_IMPORTED_MODULE_4__["getInitExpandedKeys"])(flattenAllData, expandedKeysProps, defaultExpandedKeys, defaultExpandAll, defaultExpandRoot, defaultExpandParent, expandScrollkeys, filterTreeNode, isSearching, keysData, isInit, searchStatus);
|
|
37503
|
-
}, [flattenAllData, expandedKeysProps, defaultExpandedKeys, defaultExpandAll, defaultExpandRoot, defaultExpandParent, scrollKey, filterTreeNode, isSearching, keysData, isInit, searchStatus, filterValue]);
|
|
37595
|
+
return Object(_utils_treeUtils__WEBPACK_IMPORTED_MODULE_4__["getInitExpandedKeys"])(flattenAllData, expandedKeysProps, defaultExpandedKeys, defaultExpandAll, defaultExpandRoot, defaultExpandParent, expandScrollkeys, filterTreeNode, isSearching, keysData, isInit, searchStatus, expandOnFilterNode);
|
|
37596
|
+
}, [flattenAllData, expandedKeysProps, defaultExpandedKeys, defaultExpandAll, defaultExpandRoot, defaultExpandParent, scrollKey, filterTreeNode, isSearching, keysData, isInit, searchStatus, filterValue, expandOnFilterNode]);
|
|
37504
37597
|
var _React$useState7 = react__WEBPACK_IMPORTED_MODULE_3___default.a.useState(initialExpandedKeys),
|
|
37505
37598
|
_React$useState8 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_React$useState7, 2),
|
|
37506
37599
|
expandedKeys = _React$useState8[0],
|
|
@@ -38114,7 +38207,7 @@ function findfilterChildrenKeys(node, allFilterKeys) {
|
|
|
38114
38207
|
}
|
|
38115
38208
|
return nodes;
|
|
38116
38209
|
}
|
|
38117
|
-
var getAllFilterKeys = function getAllFilterKeys(data, filterTreeNode, keysData) {
|
|
38210
|
+
var getAllFilterKeys = function getAllFilterKeys(data, filterTreeNode, keysData, expandOnFilterNode) {
|
|
38118
38211
|
var allFilterKeys = new Set();
|
|
38119
38212
|
var filterExpandKeys = new Set();
|
|
38120
38213
|
var filterKeys = data.filter(function (item) {
|
|
@@ -38124,11 +38217,16 @@ var getAllFilterKeys = function getAllFilterKeys(data, filterTreeNode, keysData)
|
|
|
38124
38217
|
findfilterChildrenKeys(item, allFilterKeys);
|
|
38125
38218
|
});
|
|
38126
38219
|
filterKeys.forEach(function (item) {
|
|
38220
|
+
var firstIteration = true;
|
|
38127
38221
|
var node = _objectSpread({}, item);
|
|
38128
38222
|
while (node) {
|
|
38129
38223
|
var _node;
|
|
38130
38224
|
allFilterKeys.add(node.key);
|
|
38131
|
-
filterExpandKeys
|
|
38225
|
+
// expandOnFilterNode为true时,不将filterKeys中的节点添加到filterExpandKeys中
|
|
38226
|
+
if (!expandOnFilterNode || !firstIteration) {
|
|
38227
|
+
filterExpandKeys.add(node.key);
|
|
38228
|
+
}
|
|
38229
|
+
firstIteration = false;
|
|
38132
38230
|
node = (keysData === null || keysData === void 0 ? void 0 : keysData[(_node = node) === null || _node === void 0 ? void 0 : _node.parentKey]) || null;
|
|
38133
38231
|
}
|
|
38134
38232
|
});
|
|
@@ -38140,10 +38238,11 @@ var getAllFilterKeys = function getAllFilterKeys(data, filterTreeNode, keysData)
|
|
|
38140
38238
|
var getFilterData = function getFilterData(data, filterTreeNode, isSearching) {
|
|
38141
38239
|
var posData = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
38142
38240
|
var keysData = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
|
|
38241
|
+
var expandOnFilterNode = arguments.length > 5 ? arguments[5] : undefined;
|
|
38143
38242
|
var filterData = data;
|
|
38144
38243
|
var allFilterKeys = null;
|
|
38145
38244
|
if (isSearching) {
|
|
38146
|
-
allFilterKeys = getAllFilterKeys(filterData, filterTreeNode, keysData).allFilterKeys;
|
|
38245
|
+
allFilterKeys = getAllFilterKeys(filterData, filterTreeNode, keysData, expandOnFilterNode).allFilterKeys;
|
|
38147
38246
|
filterData = filterData.filter(function (item) {
|
|
38148
38247
|
return allFilterKeys.includes(item.key);
|
|
38149
38248
|
});
|
|
@@ -38459,6 +38558,7 @@ function getAllCheckedKeys(key, checked, checkedKeys, keysNodeProps, halfChecked
|
|
|
38459
38558
|
halfCheckedKeysSet.delete(key);
|
|
38460
38559
|
childKeys.forEach(function (v) {
|
|
38461
38560
|
allKeys.add(v);
|
|
38561
|
+
halfCheckedKeysSet.delete(v);
|
|
38462
38562
|
});
|
|
38463
38563
|
} else {
|
|
38464
38564
|
halfCheckedKeysSet.delete(key);
|
|
@@ -38580,6 +38680,7 @@ var getInitExpandedKeys = function getInitExpandedKeys(data, expandedKeys, defau
|
|
|
38580
38680
|
var keysData = arguments.length > 9 ? arguments[9] : undefined;
|
|
38581
38681
|
var isInit = arguments.length > 10 ? arguments[10] : undefined;
|
|
38582
38682
|
var searchStatus = arguments.length > 11 ? arguments[11] : undefined;
|
|
38683
|
+
var expandOnFilterNode = arguments.length > 12 ? arguments[12] : undefined;
|
|
38583
38684
|
var keys = (expandedKeys === null || expandedKeys === void 0 ? void 0 : expandedKeys.concat(expandScrollkeys)) || (defaultExpandedKeys === null || defaultExpandedKeys === void 0 ? void 0 : defaultExpandedKeys.concat(expandScrollkeys)) || [];
|
|
38584
38685
|
if (isInit) {
|
|
38585
38686
|
if (defaultExpandAll) {
|
|
@@ -38601,7 +38702,7 @@ var getInitExpandedKeys = function getInitExpandedKeys(data, expandedKeys, defau
|
|
|
38601
38702
|
}
|
|
38602
38703
|
}
|
|
38603
38704
|
if (isSearching && searchStatus === 'SEARCH_START') {
|
|
38604
|
-
keys = _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default()(getAllFilterKeys(data, filterTreeNode, keysData).filterExpandKeys);
|
|
38705
|
+
keys = _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default()(getAllFilterKeys(data, filterTreeNode, keysData, expandOnFilterNode).filterExpandKeys);
|
|
38605
38706
|
}
|
|
38606
38707
|
return keys;
|
|
38607
38708
|
};
|
|
@@ -46577,9 +46678,7 @@ var BaseTable = /*#__PURE__*/function (_React$Component) {
|
|
|
46577
46678
|
_this = _super.call(this, props);
|
|
46578
46679
|
_this.rowHeightManager = Object(_helpers_rowHeightManager__WEBPACK_IMPORTED_MODULE_23__["makeRowHeightManager"])(_this.props.dataSource.length, _this.props.estimatedRowHeight);
|
|
46579
46680
|
_this.artTableWrapperRef = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_16___default.a.createRef();
|
|
46580
|
-
_this.rootSubscription = new rxjs__WEBPACK_IMPORTED_MODULE_17__["Subscription"]();
|
|
46581
46681
|
_this.hasScrollY = false;
|
|
46582
|
-
_this.resizeSubject = new rxjs__WEBPACK_IMPORTED_MODULE_17__["Subject"]();
|
|
46583
46682
|
_this.offsetY = 0;
|
|
46584
46683
|
|
|
46585
46684
|
_this.handleRowMouseEnter = function (e) {
|
|
@@ -47026,12 +47125,11 @@ var BaseTable = /*#__PURE__*/function (_React$Component) {
|
|
|
47026
47125
|
}, {
|
|
47027
47126
|
key: "componentDidMount",
|
|
47028
47127
|
value: function componentDidMount() {
|
|
47029
|
-
var _a, _b, _c, _d, _e, _f;
|
|
47030
|
-
// console.log('update dom helper start')
|
|
47031
|
-
|
|
47032
|
-
|
|
47033
|
-
this.updateDOMHelper(); // console.log('update dom helper end')
|
|
47128
|
+
var _a, _b, _c, _d, _e, _f;
|
|
47034
47129
|
|
|
47130
|
+
this.rootSubscription = new rxjs__WEBPACK_IMPORTED_MODULE_17__["Subscription"]();
|
|
47131
|
+
this.resizeSubject = new rxjs__WEBPACK_IMPORTED_MODULE_17__["Subject"]();
|
|
47132
|
+
this.updateDOMHelper();
|
|
47035
47133
|
this.props$ = new rxjs__WEBPACK_IMPORTED_MODULE_17__["BehaviorSubject"](this.props);
|
|
47036
47134
|
this.initSubscriptions();
|
|
47037
47135
|
this.didMountOrUpdate(); // console.log('did mount end')
|
|
@@ -47812,6 +47910,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
47812
47910
|
|
|
47813
47911
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "browserType", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__["browserType"]; });
|
|
47814
47912
|
|
|
47913
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MULTI_SELECT_MARK_PROPNAME", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__["MULTI_SELECT_MARK_PROPNAME"]; });
|
|
47914
|
+
|
|
47915
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SINGLE_SELECT_MARK_PROPNAME", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__["SINGLE_SELECT_MARK_PROPNAME"]; });
|
|
47916
|
+
|
|
47917
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isSelectColumn", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__["isSelectColumn"]; });
|
|
47918
|
+
|
|
47815
47919
|
/* harmony import */ var _transforms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./transforms */ "./node_modules/@kdcloudjs/table/es/table/transforms/index.js");
|
|
47816
47920
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeAutoRowSpanTransform", function() { return _transforms__WEBPACK_IMPORTED_MODULE_3__["makeAutoRowSpanTransform"]; });
|
|
47817
47921
|
|
|
@@ -48111,7 +48215,9 @@ function getColumnWidthSum(pipeline) {
|
|
|
48111
48215
|
}
|
|
48112
48216
|
|
|
48113
48217
|
function getTableRemainingWidth(pipeline) {
|
|
48114
|
-
var
|
|
48218
|
+
var _a, _b;
|
|
48219
|
+
|
|
48220
|
+
var tableWidth = ((_b = (_a = pipeline.ref.current.domHelper) === null || _a === void 0 ? void 0 : _a.tableBody) === null || _b === void 0 ? void 0 : _b.clientWidth) || pipeline.getStateAtKey(tableWidthKey);
|
|
48115
48221
|
if (!tableWidth) return;
|
|
48116
48222
|
var remainingWidth = Math.floor(tableWidth - getColumnWidthSum(pipeline));
|
|
48117
48223
|
return remainingWidth > 0 ? remainingWidth : 0;
|
|
@@ -48735,9 +48841,13 @@ function columnDrag() {
|
|
|
48735
48841
|
if (onColumnDragStopped) {
|
|
48736
48842
|
var _context;
|
|
48737
48843
|
|
|
48738
|
-
var
|
|
48739
|
-
var
|
|
48740
|
-
return code
|
|
48844
|
+
var isRowDragColumn = function isRowDragColumn(code) {
|
|
48845
|
+
var rowDragColumnKey = pipeline.getFeatureOptions('rowDragColumnKey');
|
|
48846
|
+
return code === rowDragColumnKey;
|
|
48847
|
+
};
|
|
48848
|
+
|
|
48849
|
+
var newColumns = _babel_runtime_corejs3_core_js_stable_instance_filter__WEBPACK_IMPORTED_MODULE_3___default()(_context = sortColumns(columns, cloumnsSortData)).call(_context, function (column) {
|
|
48850
|
+
return column.code !== _autoFill__WEBPACK_IMPORTED_MODULE_5__["FILL_COLUMN_CODE"] && !isRowDragColumn(column.code) && !Object(_utils__WEBPACK_IMPORTED_MODULE_4__["isSelectColumn"])(column);
|
|
48741
48851
|
}); // TODO drag需要在resize之后use,否则这里返回的列对应的宽度不是拖拽后的
|
|
48742
48852
|
|
|
48743
48853
|
|
|
@@ -48763,9 +48873,9 @@ function columnDrag() {
|
|
|
48763
48873
|
};
|
|
48764
48874
|
}
|
|
48765
48875
|
|
|
48766
|
-
function enableMove(
|
|
48767
|
-
var lock =
|
|
48768
|
-
code =
|
|
48876
|
+
function enableMove(_ref) {
|
|
48877
|
+
var lock = _ref.lock,
|
|
48878
|
+
code = _ref.code;
|
|
48769
48879
|
return code && code !== _autoFill__WEBPACK_IMPORTED_MODULE_5__["FILL_COLUMN_CODE"] && !lock;
|
|
48770
48880
|
}
|
|
48771
48881
|
|
|
@@ -50727,17 +50837,20 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
50727
50837
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "multiSelect", function() { return multiSelect; });
|
|
50728
50838
|
/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/slicedToArray */ "./node_modules/@babel/runtime-corejs3/helpers/slicedToArray.js");
|
|
50729
50839
|
/* harmony import */ var _babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);
|
|
50730
|
-
/* harmony import */ var
|
|
50731
|
-
/* harmony import */ var
|
|
50732
|
-
/* harmony import */ var
|
|
50733
|
-
/* harmony import */ var
|
|
50734
|
-
/* harmony import */ var
|
|
50735
|
-
/* harmony import */ var
|
|
50736
|
-
/* harmony import */ var
|
|
50737
|
-
/* harmony import */ var
|
|
50738
|
-
/* harmony import */ var
|
|
50739
|
-
/* harmony import */ var
|
|
50740
|
-
/* harmony import */ var
|
|
50840
|
+
/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/defineProperty */ "./node_modules/@babel/runtime-corejs3/helpers/defineProperty.js");
|
|
50841
|
+
/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__);
|
|
50842
|
+
/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/extends */ "./node_modules/@babel/runtime-corejs3/helpers/extends.js");
|
|
50843
|
+
/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_2__);
|
|
50844
|
+
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/set */ "./node_modules/@babel/runtime-corejs3/core-js-stable/set.js");
|
|
50845
|
+
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_3__);
|
|
50846
|
+
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/slice */ "./node_modules/@babel/runtime-corejs3/core-js-stable/instance/slice.js");
|
|
50847
|
+
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_4__);
|
|
50848
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ "react");
|
|
50849
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__);
|
|
50850
|
+
/* harmony import */ var _internals__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../internals */ "./node_modules/@kdcloudjs/table/es/table/internals.js");
|
|
50851
|
+
/* harmony import */ var _utils_others__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils/others */ "./node_modules/@kdcloudjs/table/es/table/utils/others.js");
|
|
50852
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils */ "./node_modules/@kdcloudjs/table/es/table/utils/index.js");
|
|
50853
|
+
|
|
50741
50854
|
|
|
50742
50855
|
|
|
50743
50856
|
|
|
@@ -50752,7 +50865,7 @@ var selectValueSetKey = 'selectValueSetKey';
|
|
|
50752
50865
|
function multiSelect() {
|
|
50753
50866
|
var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
50754
50867
|
return function multiSelectStep(pipeline) {
|
|
50755
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
50868
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
50756
50869
|
|
|
50757
50870
|
var stateKey = 'multiSelect';
|
|
50758
50871
|
var Checkbox = pipeline.ctx.components.Checkbox;
|
|
@@ -50762,7 +50875,7 @@ function multiSelect() {
|
|
|
50762
50875
|
}
|
|
50763
50876
|
|
|
50764
50877
|
var primaryKey = pipeline.ensurePrimaryKey('multiSelect');
|
|
50765
|
-
var isDisabled = (_a = opts.isDisabled) !== null && _a !== void 0 ? _a : Object(
|
|
50878
|
+
var isDisabled = (_a = opts.isDisabled) !== null && _a !== void 0 ? _a : Object(_utils_others__WEBPACK_IMPORTED_MODULE_7__["always"])(false);
|
|
50766
50879
|
var clickArea = (_b = opts.clickArea) !== null && _b !== void 0 ? _b : 'checkbox';
|
|
50767
50880
|
var value = (_f = (_e = (_c = opts.value) !== null && _c !== void 0 ? _c : (_d = pipeline.getStateAtKey(stateKey)) === null || _d === void 0 ? void 0 : _d.value) !== null && _e !== void 0 ? _e : opts.defaultValue) !== null && _f !== void 0 ? _f : [];
|
|
50768
50881
|
var lastKey = (_k = (_j = (_g = opts.lastKey) !== null && _g !== void 0 ? _g : (_h = pipeline.getStateAtKey(stateKey)) === null || _h === void 0 ? void 0 : _h.lastKey) !== null && _j !== void 0 ? _j : opts.defaultLastKey) !== null && _k !== void 0 ? _k : '';
|
|
@@ -50782,17 +50895,17 @@ function multiSelect() {
|
|
|
50782
50895
|
/** dataSource 中包含的所有 keys */
|
|
50783
50896
|
|
|
50784
50897
|
|
|
50785
|
-
var fullKeySet = new
|
|
50898
|
+
var fullKeySet = new _babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_3___default.a();
|
|
50786
50899
|
/** 所有有效的 keys(disable 状态为 false) */
|
|
50787
50900
|
|
|
50788
50901
|
var allKeys = [];
|
|
50789
|
-
var set = new
|
|
50902
|
+
var set = new _babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_3___default.a(value);
|
|
50790
50903
|
var isAllChecked = set.size !== 0; // 当前不存在选中则默认为false
|
|
50791
50904
|
|
|
50792
50905
|
var isAnyChecked = false;
|
|
50793
|
-
var flatDataSource = Object(
|
|
50906
|
+
var flatDataSource = Object(_utils__WEBPACK_IMPORTED_MODULE_8__["collectNodes"])(pipeline.getDataSource());
|
|
50794
50907
|
flatDataSource.forEach(function (row, rowIndex) {
|
|
50795
|
-
var rowKey =
|
|
50908
|
+
var rowKey = _internals__WEBPACK_IMPORTED_MODULE_6__["internals"].safeGetRowKey(primaryKey, row, rowIndex);
|
|
50796
50909
|
fullKeySet.add(rowKey); // 在 allKeys 中排除被禁用的 key
|
|
50797
50910
|
|
|
50798
50911
|
if (!isDisabled(row, rowIndex)) {
|
|
@@ -50814,21 +50927,21 @@ function multiSelect() {
|
|
|
50814
50927
|
if (!hiddenSelectColumn) {
|
|
50815
50928
|
var _context;
|
|
50816
50929
|
|
|
50817
|
-
var defaultCheckboxColumnTitle = /*#__PURE__*/
|
|
50930
|
+
var defaultCheckboxColumnTitle = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(Checkbox, {
|
|
50818
50931
|
checked: isAllChecked,
|
|
50819
50932
|
indeterminate: !isAllChecked && isAnyChecked,
|
|
50820
50933
|
onChange: function onChange(_) {
|
|
50821
50934
|
var allKeys = pipeline.getFeatureOptions(allEnableKeys);
|
|
50822
50935
|
|
|
50823
50936
|
if (isAllChecked) {
|
|
50824
|
-
_onChange(
|
|
50937
|
+
_onChange(_utils_others__WEBPACK_IMPORTED_MODULE_7__["arrayUtils"].diff(value, allKeys), '', allKeys, 'uncheck-all');
|
|
50825
50938
|
} else {
|
|
50826
|
-
_onChange(
|
|
50939
|
+
_onChange(_utils_others__WEBPACK_IMPORTED_MODULE_7__["arrayUtils"].merge(value, allKeys), '', allKeys, 'check-all');
|
|
50827
50940
|
}
|
|
50828
50941
|
}
|
|
50829
50942
|
});
|
|
50830
50943
|
|
|
50831
|
-
var checkboxColumn =
|
|
50944
|
+
var checkboxColumn = _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default()(_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default()({
|
|
50832
50945
|
name: '是否选中',
|
|
50833
50946
|
title: defaultCheckboxColumnTitle,
|
|
50834
50947
|
width: 50,
|
|
@@ -50837,11 +50950,11 @@ function multiSelect() {
|
|
|
50837
50950
|
getCellProps: function getCellProps(value, row, rowIndex) {
|
|
50838
50951
|
var _a, _b;
|
|
50839
50952
|
|
|
50840
|
-
var rowKey =
|
|
50953
|
+
var rowKey = _internals__WEBPACK_IMPORTED_MODULE_6__["internals"].safeGetRowKey(primaryKey, row, rowIndex);
|
|
50841
50954
|
var checkboxCellProps = {};
|
|
50842
50955
|
var preCellProps = (_b = (_a = opts.checkboxColumn) === null || _a === void 0 ? void 0 : _a.getCellProps) === null || _b === void 0 ? void 0 : _b.call(_a, value, row, rowIndex);
|
|
50843
|
-
var fullRowsSet = pipeline.getFeatureOptions(fullRowsSetKey) || new
|
|
50844
|
-
var selectValueSet = pipeline.getFeatureOptions(selectValueSetKey) || new
|
|
50956
|
+
var fullRowsSet = pipeline.getFeatureOptions(fullRowsSetKey) || new _babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_3___default.a();
|
|
50957
|
+
var selectValueSet = pipeline.getFeatureOptions(selectValueSetKey) || new _babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_3___default.a();
|
|
50845
50958
|
|
|
50846
50959
|
if (fullRowsSet.has(rowKey) && clickArea === 'cell') {
|
|
50847
50960
|
var prevChecked = selectValueSet.has(rowKey);
|
|
@@ -50860,17 +50973,17 @@ function multiSelect() {
|
|
|
50860
50973
|
};
|
|
50861
50974
|
}
|
|
50862
50975
|
|
|
50863
|
-
return Object(
|
|
50976
|
+
return Object(_utils__WEBPACK_IMPORTED_MODULE_8__["mergeCellProps"])(preCellProps, checkboxCellProps);
|
|
50864
50977
|
},
|
|
50865
50978
|
render: function render(_, row, rowIndex) {
|
|
50866
50979
|
if (row[pipeline.getFeatureOptions('footerRowMetaKey')]) {
|
|
50867
50980
|
return null;
|
|
50868
50981
|
}
|
|
50869
50982
|
|
|
50870
|
-
var key =
|
|
50871
|
-
var selectValueSet = pipeline.getFeatureOptions(selectValueSetKey) || new
|
|
50983
|
+
var key = _internals__WEBPACK_IMPORTED_MODULE_6__["internals"].safeGetRowKey(primaryKey, row, rowIndex);
|
|
50984
|
+
var selectValueSet = pipeline.getFeatureOptions(selectValueSetKey) || new _babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_3___default.a();
|
|
50872
50985
|
var checked = selectValueSet.has(key);
|
|
50873
|
-
return /*#__PURE__*/
|
|
50986
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(Checkbox, {
|
|
50874
50987
|
checked: checked,
|
|
50875
50988
|
disabled: isDisabled(row, rowIndex),
|
|
50876
50989
|
onChange: clickArea === 'checkbox' ? function (arg1, arg2) {
|
|
@@ -50890,12 +51003,13 @@ function multiSelect() {
|
|
|
50890
51003
|
}
|
|
50891
51004
|
} : undefined
|
|
50892
51005
|
});
|
|
50893
|
-
}
|
|
51006
|
+
},
|
|
51007
|
+
features: _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default()(_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_2___default()({}, (_l = opts.checkboxColumn) === null || _l === void 0 ? void 0 : _l.features), _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, _utils__WEBPACK_IMPORTED_MODULE_8__["MULTI_SELECT_MARK_PROPNAME"], true))
|
|
50894
51008
|
});
|
|
50895
51009
|
|
|
50896
|
-
var nextColumns =
|
|
51010
|
+
var nextColumns = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_4___default()(_context = pipeline.getColumns()).call(_context);
|
|
50897
51011
|
|
|
50898
|
-
var checkboxPlacement = (
|
|
51012
|
+
var checkboxPlacement = (_m = opts.checkboxPlacement) !== null && _m !== void 0 ? _m : 'start';
|
|
50899
51013
|
|
|
50900
51014
|
if (checkboxPlacement === 'start') {
|
|
50901
51015
|
nextColumns.unshift(checkboxColumn);
|
|
@@ -50907,8 +51021,8 @@ function multiSelect() {
|
|
|
50907
51021
|
}
|
|
50908
51022
|
|
|
50909
51023
|
pipeline.appendRowPropsGetter(function (row, rowIndex) {
|
|
50910
|
-
var rowKey =
|
|
50911
|
-
var fullRowsSet = pipeline.getFeatureOptions(fullRowsSetKey) || new
|
|
51024
|
+
var rowKey = _internals__WEBPACK_IMPORTED_MODULE_6__["internals"].safeGetRowKey(primaryKey, row, rowIndex);
|
|
51025
|
+
var fullRowsSet = pipeline.getFeatureOptions(fullRowsSetKey) || new _babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_3___default.a();
|
|
50912
51026
|
|
|
50913
51027
|
if (!fullRowsSet.has(rowKey)) {
|
|
50914
51028
|
// rowKey 不在 fullKeySet 中说明这一行是在 multiSelect 之后才生成的,multiSelect 不对之后生成的行进行处理
|
|
@@ -50918,7 +51032,7 @@ function multiSelect() {
|
|
|
50918
51032
|
var style = {};
|
|
50919
51033
|
var className;
|
|
50920
51034
|
var onClick;
|
|
50921
|
-
var selectValueSet = pipeline.getFeatureOptions(selectValueSetKey) || new
|
|
51035
|
+
var selectValueSet = pipeline.getFeatureOptions(selectValueSetKey) || new _babel_runtime_corejs3_core_js_stable_set__WEBPACK_IMPORTED_MODULE_3___default.a();
|
|
50922
51036
|
var checked = selectValueSet.has(rowKey);
|
|
50923
51037
|
|
|
50924
51038
|
if (opts.highlightRowWhenSelected && checked) {
|
|
@@ -50971,13 +51085,13 @@ function multiSelect() {
|
|
|
50971
51085
|
start = _ref2[0],
|
|
50972
51086
|
end = _ref2[1];
|
|
50973
51087
|
|
|
50974
|
-
batchKeys =
|
|
51088
|
+
batchKeys = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_4___default()(_allKeys).call(_allKeys, start, end + 1);
|
|
50975
51089
|
}
|
|
50976
51090
|
|
|
50977
51091
|
if (prevChecked) {
|
|
50978
|
-
_onChange(
|
|
51092
|
+
_onChange(_utils_others__WEBPACK_IMPORTED_MODULE_7__["arrayUtils"].diff(value, batchKeys), key, batchKeys, 'uncheck');
|
|
50979
51093
|
} else {
|
|
50980
|
-
_onChange(
|
|
51094
|
+
_onChange(_utils_others__WEBPACK_IMPORTED_MODULE_7__["arrayUtils"].merge(value, batchKeys), key, batchKeys, 'check');
|
|
50981
51095
|
}
|
|
50982
51096
|
}
|
|
50983
51097
|
};
|
|
@@ -52017,6 +52131,7 @@ function rowDrag(opt) {
|
|
|
52017
52131
|
};
|
|
52018
52132
|
|
|
52019
52133
|
var updateScrollPosition = function updateScrollPosition(mouseMoveEvent) {
|
|
52134
|
+
if (opt === null || opt === void 0 ? void 0 : opt.suppressScrollMove) return;
|
|
52020
52135
|
var clientY = mouseMoveEvent.clientY;
|
|
52021
52136
|
var tableBodyClientRect = tableBody.getBoundingClientRect();
|
|
52022
52137
|
var top = tableBodyClientRect.top,
|
|
@@ -52113,6 +52228,7 @@ function rowDrag(opt) {
|
|
|
52113
52228
|
};
|
|
52114
52229
|
|
|
52115
52230
|
var rowDragColumn = (opt === null || opt === void 0 ? void 0 : opt.rowDragColumn) || defaultRowDragColumn;
|
|
52231
|
+
pipeline.setFeatureOptions('rowDragColumnKey', rowDragColumn.code);
|
|
52116
52232
|
|
|
52117
52233
|
var nextColumns = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_1___default()(_context = pipeline.getColumns()).call(_context);
|
|
52118
52234
|
|
|
@@ -52510,15 +52626,18 @@ function rowGrouping() {
|
|
|
52510
52626
|
"use strict";
|
|
52511
52627
|
__webpack_require__.r(__webpack_exports__);
|
|
52512
52628
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "singleSelect", function() { return singleSelect; });
|
|
52513
|
-
/* harmony import */ var
|
|
52514
|
-
/* harmony import */ var
|
|
52515
|
-
/* harmony import */ var
|
|
52516
|
-
/* harmony import */ var
|
|
52517
|
-
/* harmony import */ var
|
|
52518
|
-
/* harmony import */ var
|
|
52519
|
-
/* harmony import */ var
|
|
52520
|
-
/* harmony import */ var
|
|
52521
|
-
/* harmony import */ var
|
|
52629
|
+
/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/defineProperty */ "./node_modules/@babel/runtime-corejs3/helpers/defineProperty.js");
|
|
52630
|
+
/* harmony import */ var _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
|
|
52631
|
+
/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime-corejs3/helpers/extends */ "./node_modules/@babel/runtime-corejs3/helpers/extends.js");
|
|
52632
|
+
/* harmony import */ var _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_1__);
|
|
52633
|
+
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime-corejs3/core-js-stable/instance/slice */ "./node_modules/@babel/runtime-corejs3/core-js-stable/instance/slice.js");
|
|
52634
|
+
/* harmony import */ var _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_2__);
|
|
52635
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react");
|
|
52636
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
|
|
52637
|
+
/* harmony import */ var _internals__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../internals */ "./node_modules/@kdcloudjs/table/es/table/internals.js");
|
|
52638
|
+
/* harmony import */ var _utils_others__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/others */ "./node_modules/@kdcloudjs/table/es/table/utils/others.js");
|
|
52639
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils */ "./node_modules/@kdcloudjs/table/es/table/utils/index.js");
|
|
52640
|
+
|
|
52522
52641
|
|
|
52523
52642
|
|
|
52524
52643
|
|
|
@@ -52530,7 +52649,7 @@ function singleSelect() {
|
|
|
52530
52649
|
return function singleSelectStep(pipeline) {
|
|
52531
52650
|
var _context;
|
|
52532
52651
|
|
|
52533
|
-
var _a, _b, _c, _d, _e;
|
|
52652
|
+
var _a, _b, _c, _d, _e, _f;
|
|
52534
52653
|
|
|
52535
52654
|
var Radio = pipeline.ctx.components.Radio;
|
|
52536
52655
|
|
|
@@ -52540,7 +52659,7 @@ function singleSelect() {
|
|
|
52540
52659
|
|
|
52541
52660
|
var stateKey = 'singleSelect';
|
|
52542
52661
|
var clickArea = (_a = opts.clickArea) !== null && _a !== void 0 ? _a : 'radio';
|
|
52543
|
-
var isDisabled = (_b = opts.isDisabled) !== null && _b !== void 0 ? _b : Object(
|
|
52662
|
+
var isDisabled = (_b = opts.isDisabled) !== null && _b !== void 0 ? _b : Object(_utils_others__WEBPACK_IMPORTED_MODULE_5__["always"])(false);
|
|
52544
52663
|
var primaryKey = pipeline.ensurePrimaryKey('singleSelect');
|
|
52545
52664
|
var value = (_d = (_c = opts.value) !== null && _c !== void 0 ? _c : pipeline.getStateAtKey(stateKey)) !== null && _d !== void 0 ? _d : opts.defaultValue;
|
|
52546
52665
|
|
|
@@ -52551,7 +52670,7 @@ function singleSelect() {
|
|
|
52551
52670
|
pipeline.setStateAtKey(stateKey, rowKey);
|
|
52552
52671
|
};
|
|
52553
52672
|
|
|
52554
|
-
var radioColumn =
|
|
52673
|
+
var radioColumn = _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()(_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
52555
52674
|
name: '',
|
|
52556
52675
|
width: 50,
|
|
52557
52676
|
align: 'center'
|
|
@@ -52562,9 +52681,9 @@ function singleSelect() {
|
|
|
52562
52681
|
var preCellProps = (_b = (_a = opts.radioColumn) === null || _a === void 0 ? void 0 : _a.getCellProps) === null || _b === void 0 ? void 0 : _b.call(_a, value, row, rowIndex);
|
|
52563
52682
|
|
|
52564
52683
|
if (clickArea === 'cell') {
|
|
52565
|
-
var rowKey =
|
|
52684
|
+
var rowKey = _internals__WEBPACK_IMPORTED_MODULE_4__["internals"].safeGetRowKey(primaryKey, row, rowIndex);
|
|
52566
52685
|
var disabled = isDisabled(row, rowIndex);
|
|
52567
|
-
return Object(
|
|
52686
|
+
return Object(_utils__WEBPACK_IMPORTED_MODULE_6__["mergeCellProps"])(preCellProps, {
|
|
52568
52687
|
style: {
|
|
52569
52688
|
cursor: disabled ? 'not-allowed' : 'pointer'
|
|
52570
52689
|
},
|
|
@@ -52585,8 +52704,8 @@ function singleSelect() {
|
|
|
52585
52704
|
return null;
|
|
52586
52705
|
}
|
|
52587
52706
|
|
|
52588
|
-
var rowKey =
|
|
52589
|
-
return /*#__PURE__*/
|
|
52707
|
+
var rowKey = _internals__WEBPACK_IMPORTED_MODULE_4__["internals"].safeGetRowKey(primaryKey, row, rowIndex);
|
|
52708
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(Radio, {
|
|
52590
52709
|
checked: value === rowKey,
|
|
52591
52710
|
disabled: isDisabled(row, rowIndex),
|
|
52592
52711
|
onChange: clickArea === 'radio' ? function (arg1, arg2) {
|
|
@@ -52601,12 +52720,13 @@ function singleSelect() {
|
|
|
52601
52720
|
onChange(rowKey);
|
|
52602
52721
|
} : undefined
|
|
52603
52722
|
});
|
|
52604
|
-
}
|
|
52723
|
+
},
|
|
52724
|
+
features: _babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()(_babel_runtime_corejs3_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, (_e = opts.radioColumn) === null || _e === void 0 ? void 0 : _e.features), _babel_runtime_corejs3_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, _utils__WEBPACK_IMPORTED_MODULE_6__["SINGLE_SELECT_MARK_PROPNAME"], true))
|
|
52605
52725
|
});
|
|
52606
52726
|
|
|
52607
|
-
var nextColumns =
|
|
52727
|
+
var nextColumns = _babel_runtime_corejs3_core_js_stable_instance_slice__WEBPACK_IMPORTED_MODULE_2___default()(_context = pipeline.getColumns()).call(_context);
|
|
52608
52728
|
|
|
52609
|
-
var radioPlacement = (
|
|
52729
|
+
var radioPlacement = (_f = opts.radioPlacement) !== null && _f !== void 0 ? _f : 'start';
|
|
52610
52730
|
|
|
52611
52731
|
if (radioPlacement === 'start') {
|
|
52612
52732
|
nextColumns.unshift(radioColumn);
|
|
@@ -52616,7 +52736,7 @@ function singleSelect() {
|
|
|
52616
52736
|
|
|
52617
52737
|
pipeline.columns(nextColumns);
|
|
52618
52738
|
pipeline.appendRowPropsGetter(function (row, rowIndex) {
|
|
52619
|
-
var rowKey =
|
|
52739
|
+
var rowKey = _internals__WEBPACK_IMPORTED_MODULE_4__["internals"].safeGetRowKey(primaryKey, row, rowIndex);
|
|
52620
52740
|
var style = {};
|
|
52621
52741
|
var className;
|
|
52622
52742
|
var onClick;
|
|
@@ -56593,7 +56713,7 @@ function groupBy(list, iteratee) {
|
|
|
56593
56713
|
/*!***************************************************************!*\
|
|
56594
56714
|
!*** ./node_modules/@kdcloudjs/table/es/table/utils/index.js ***!
|
|
56595
56715
|
\***************************************************************/
|
|
56596
|
-
/*! exports provided: collectNodes, getTreeDepth, groupBy, isLeafNode, isGroupColumn, applyTransforms, buildTree, exportTableAsExcel, layeredSort, mergeCellProps, proto, makeRecursiveMapper, smartCompare, traverseColumn, copyDataToClipboard, executeOnTempElement, layeredFilter, getEventPath, isElementInEventPath, getTargetEleInEventPath, calculatePointerRelative, calculatePopupRelative, keepWithinBounds, console, browserType */
|
|
56716
|
+
/*! exports provided: collectNodes, getTreeDepth, groupBy, isLeafNode, isGroupColumn, applyTransforms, buildTree, exportTableAsExcel, layeredSort, mergeCellProps, proto, makeRecursiveMapper, smartCompare, traverseColumn, copyDataToClipboard, executeOnTempElement, layeredFilter, getEventPath, isElementInEventPath, getTargetEleInEventPath, calculatePointerRelative, calculatePopupRelative, keepWithinBounds, console, browserType, MULTI_SELECT_MARK_PROPNAME, SINGLE_SELECT_MARK_PROPNAME, isSelectColumn */
|
|
56597
56717
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
56598
56718
|
|
|
56599
56719
|
"use strict";
|
|
@@ -56667,6 +56787,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
56667
56787
|
/* harmony import */ var _browserType__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./browserType */ "./node_modules/@kdcloudjs/table/es/table/utils/browserType.js");
|
|
56668
56788
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "browserType", function() { return _browserType__WEBPACK_IMPORTED_MODULE_18__["browserType"]; });
|
|
56669
56789
|
|
|
56790
|
+
/* harmony import */ var _selectColumn__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./selectColumn */ "./node_modules/@kdcloudjs/table/es/table/utils/selectColumn.js");
|
|
56791
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MULTI_SELECT_MARK_PROPNAME", function() { return _selectColumn__WEBPACK_IMPORTED_MODULE_19__["MULTI_SELECT_MARK_PROPNAME"]; });
|
|
56792
|
+
|
|
56793
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SINGLE_SELECT_MARK_PROPNAME", function() { return _selectColumn__WEBPACK_IMPORTED_MODULE_19__["SINGLE_SELECT_MARK_PROPNAME"]; });
|
|
56794
|
+
|
|
56795
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isSelectColumn", function() { return _selectColumn__WEBPACK_IMPORTED_MODULE_19__["isSelectColumn"]; });
|
|
56796
|
+
|
|
56797
|
+
|
|
56670
56798
|
|
|
56671
56799
|
|
|
56672
56800
|
|
|
@@ -57273,6 +57401,27 @@ proto.array = function (baseRecord) {
|
|
|
57273
57401
|
|
|
57274
57402
|
/***/ }),
|
|
57275
57403
|
|
|
57404
|
+
/***/ "./node_modules/@kdcloudjs/table/es/table/utils/selectColumn.js":
|
|
57405
|
+
/*!**********************************************************************!*\
|
|
57406
|
+
!*** ./node_modules/@kdcloudjs/table/es/table/utils/selectColumn.js ***!
|
|
57407
|
+
\**********************************************************************/
|
|
57408
|
+
/*! exports provided: MULTI_SELECT_MARK_PROPNAME, SINGLE_SELECT_MARK_PROPNAME, isSelectColumn */
|
|
57409
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
57410
|
+
|
|
57411
|
+
"use strict";
|
|
57412
|
+
__webpack_require__.r(__webpack_exports__);
|
|
57413
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MULTI_SELECT_MARK_PROPNAME", function() { return MULTI_SELECT_MARK_PROPNAME; });
|
|
57414
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SINGLE_SELECT_MARK_PROPNAME", function() { return SINGLE_SELECT_MARK_PROPNAME; });
|
|
57415
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSelectColumn", function() { return isSelectColumn; });
|
|
57416
|
+
var MULTI_SELECT_MARK_PROPNAME = 'checkboxSelection';
|
|
57417
|
+
var SINGLE_SELECT_MARK_PROPNAME = 'radioSelection';
|
|
57418
|
+
function isSelectColumn(column) {
|
|
57419
|
+
var features = column.features || {};
|
|
57420
|
+
return features[MULTI_SELECT_MARK_PROPNAME] === true || features[SINGLE_SELECT_MARK_PROPNAME] === true;
|
|
57421
|
+
}
|
|
57422
|
+
|
|
57423
|
+
/***/ }),
|
|
57424
|
+
|
|
57276
57425
|
/***/ "./node_modules/@kdcloudjs/table/es/table/utils/smartCompare.js":
|
|
57277
57426
|
/*!**********************************************************************!*\
|
|
57278
57427
|
!*** ./node_modules/@kdcloudjs/table/es/table/utils/smartCompare.js ***!
|