@kdcloudjs/kdesign 1.7.44 → 1.7.45
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 -202
- package/dist/kdesign-complete.less +2 -1
- package/dist/kdesign.css +3 -2
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +190 -106
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +3 -3
- package/dist/kdesign.min.js +6 -6
- package/dist/kdesign.min.js.map +1 -1
- package/es/city-picker/city-picker.js +10 -9
- 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 +7 -7
- package/es/select/style/index.css +1 -1
- package/es/select/style/index.less +1 -1
- package/es/table/table.js +2 -2
- package/lib/checkbox/group.js +3 -0
- package/lib/city-picker/city-picker.js +10 -9
- package/lib/date-picker/utils/date-fns.js +5 -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 +7 -7
- package/lib/select/style/index.css +1 -1
- package/lib/select/style/index.less +1 -1
- package/lib/table/table.js +2 -2
- package/package.json +2 -2
|
@@ -5,6 +5,7 @@ import _slicedToArray from "@babel/runtime-corejs3/helpers/slicedToArray";
|
|
|
5
5
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
6
6
|
import _findInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/find";
|
|
7
7
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
|
8
|
+
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
|
8
9
|
import React, { useContext, useRef, useEffect, useState, useCallback, useMemo } from 'react';
|
|
9
10
|
import { useMergedState } from '../_utils/hooks';
|
|
10
11
|
import classNames from 'classnames';
|
|
@@ -302,22 +303,22 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
302
303
|
var symbol = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ', ';
|
|
303
304
|
if (!data) return null;
|
|
304
305
|
if (isDomestic(type)) {
|
|
305
|
-
var
|
|
306
|
+
var _context6, _context7;
|
|
306
307
|
if (isCommon) {
|
|
307
308
|
var _context3;
|
|
308
|
-
var _curVal = (data === null || data === void 0 ? void 0 : data.province) ? data === null || data === void 0 ? void 0 : data.province : data === null || data === void 0 ? void 0 : data.country;
|
|
309
|
+
var _curVal = (data === null || data === void 0 ? void 0 : data.province) ? data === null || data === void 0 ? void 0 : data.province : (data === null || data === void 0 ? void 0 : data.country) || '';
|
|
309
310
|
return _concatInstanceProperty(_context3 = "".concat(flag && _curVal ? symbol : '')).call(_context3, _curVal);
|
|
310
311
|
}
|
|
311
312
|
if (data === null || data === void 0 ? void 0 : data.type) {
|
|
312
|
-
var _context4;
|
|
313
|
-
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;
|
|
314
|
-
return _concatInstanceProperty(
|
|
313
|
+
var _context4, _context5;
|
|
314
|
+
var _curVal2 = (data.type === 'domestic' ? (data === null || data === void 0 ? void 0 : data.province) || (data === null || data === void 0 ? void 0 : data.country) : _filterInstanceProperty(_context4 = [data === null || data === void 0 ? void 0 : data.province, data === null || data === void 0 ? void 0 : data.country]).call(_context4, Boolean).join(symbol)) || '';
|
|
315
|
+
return _concatInstanceProperty(_context5 = "".concat(flag && _curVal2 ? symbol : '')).call(_context5, _curVal2);
|
|
315
316
|
}
|
|
316
|
-
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;
|
|
317
|
-
return _concatInstanceProperty(
|
|
317
|
+
var curVal = tabsValue === 'domestic' ? (data === null || data === void 0 ? void 0 : data.province) || (data === null || data === void 0 ? void 0 : data.country) || '' : _filterInstanceProperty(_context6 = [data === null || data === void 0 ? void 0 : data.province, data === null || data === void 0 ? void 0 : data.country]).call(_context6, Boolean).join(symbol);
|
|
318
|
+
return _concatInstanceProperty(_context7 = "".concat(flag && curVal ? symbol : '')).call(_context7, curVal);
|
|
318
319
|
} else {
|
|
319
|
-
var
|
|
320
|
-
return _concatInstanceProperty(
|
|
320
|
+
var _context8, _context9;
|
|
321
|
+
return _concatInstanceProperty(_context8 = "".concat(flag && ((data === null || data === void 0 ? void 0 : data.province) || (data === null || data === void 0 ? void 0 : data.country)) ? symbol : '')).call(_context8, _filterInstanceProperty(_context9 = [data === null || data === void 0 ? void 0 : data.province, data === null || data === void 0 ? void 0 : data.country]).call(_context9, Boolean).join(symbol));
|
|
321
322
|
}
|
|
322
323
|
}, [type, tabsValue]);
|
|
323
324
|
var renderSingle = function renderSingle() {
|
package/es/form/style/index.css
CHANGED
package/es/form/style/index.less
CHANGED
|
@@ -91,7 +91,7 @@ var InternalImageCropper = function InternalImageCropper(props, forwardedRef) {
|
|
|
91
91
|
return cropperRef.current.getImage();
|
|
92
92
|
case 2:
|
|
93
93
|
imgFile = _context.sent;
|
|
94
|
-
imgFile ? onCropSuccess === null || onCropSuccess === void 0 ? void 0 : onCropSuccess(imgFile) : onCropFailed === null || onCropFailed === void 0 ? void 0 : onCropFailed(
|
|
94
|
+
imgFile ? onCropSuccess === null || onCropSuccess === void 0 ? void 0 : onCropSuccess(imgFile) : onCropFailed === null || onCropFailed === void 0 ? void 0 : onCropFailed();
|
|
95
95
|
case 4:
|
|
96
96
|
case "end":
|
|
97
97
|
return _context.stop();
|
package/es/select/select.js
CHANGED
|
@@ -22,7 +22,7 @@ import VirtualList from '../virtual-list';
|
|
|
22
22
|
import KeyCode from '../_utils/KeyCode';
|
|
23
23
|
var INPUT_MIN_WIDTH = 4; // 输入框最小宽度
|
|
24
24
|
var InternalSelect = function InternalSelect(props, ref) {
|
|
25
|
-
var _context, _classNames6, _classNames12, _context5;
|
|
25
|
+
var _context, _classNames5, _classNames6, _classNames12, _context5;
|
|
26
26
|
var _useContext = useContext(ConfigContext),
|
|
27
27
|
getPrefixCls = _useContext.getPrefixCls,
|
|
28
28
|
prefixCls = _useContext.prefixCls,
|
|
@@ -121,14 +121,12 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
121
121
|
// 选择器样式
|
|
122
122
|
var selectCls = classNames(selectPrefixCls, className, _defineProperty({}, "".concat(selectPrefixCls, "-visible"), optionShow));
|
|
123
123
|
var selectionCls = classNames(_defineProperty({}, "".concat(selectPrefixCls, "-selector"), true));
|
|
124
|
-
// 下拉列表框样式
|
|
125
|
-
var dropDownCls = classNames(dropdownClassName, _defineProperty({}, "".concat(selectPrefixCls, "-dropdown"), true));
|
|
126
124
|
// 下拉子项列表样式
|
|
127
125
|
var dropContentCls = classNames(_defineProperty({}, "".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));
|
|
128
126
|
// 多选底部样式
|
|
129
127
|
var multipleFooterCls = classNames(_defineProperty({}, "".concat(selectPrefixCls, "-multiple-footer"), true));
|
|
130
128
|
// 多选,单选公共样式
|
|
131
|
-
var commCls = classNames((
|
|
129
|
+
var commCls = classNames((_classNames5 = {}, _defineProperty(_classNames5, "".concat(selectPrefixCls, "-bordered"), borderType === 'bordered'), _defineProperty(_classNames5, "".concat(selectPrefixCls, "-underline"), borderType === 'underline'), _defineProperty(_classNames5, "".concat(selectPrefixCls, "-borderless"), borderType === 'none'), _defineProperty(_classNames5, _concatInstanceProperty(_context = "".concat(selectPrefixCls, "-size-")).call(_context, size), size), _defineProperty(_classNames5, "".concat(selectPrefixCls, "-wrapper"), true), _defineProperty(_classNames5, "".concat(selectPrefixCls, "-show-search"), isShowSearch && focusd), _defineProperty(_classNames5, "".concat(selectPrefixCls, "-error"), status === 'error'), _classNames5));
|
|
132
130
|
useEffect(function () {
|
|
133
131
|
if (typeof props.visible !== 'undefined') {
|
|
134
132
|
setOptionShow(props.visible);
|
|
@@ -267,6 +265,8 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
267
265
|
});
|
|
268
266
|
return childrenList;
|
|
269
267
|
}, [searchValue, realChildren, filterOption, optionFilterProp]);
|
|
268
|
+
// 下拉列表框样式
|
|
269
|
+
var dropDownCls = classNames(dropdownClassName, (_classNames6 = {}, _defineProperty(_classNames6, "".concat(selectPrefixCls, "-dropdown"), true), _defineProperty(_classNames6, "".concat(selectPrefixCls, "-dropdown-no-data"), filledOptions.length === 0), _classNames6));
|
|
270
270
|
var getOptionLabel = useCallback(function (obj) {
|
|
271
271
|
var _a;
|
|
272
272
|
var text = Object.prototype.hasOwnProperty.call(selectProps, 'options') && !Object.prototype.hasOwnProperty.call(props, 'optionLabelProp') ? 'label' : optionLabelProp;
|
|
@@ -573,7 +573,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
573
573
|
className: dropDownCls,
|
|
574
574
|
style: dropdownStyle,
|
|
575
575
|
ref: dropDownRef
|
|
576
|
-
}, !dropdownRender && childrenToRender.length > 0 ? dropRender(eleOptionList, heightStyle) : null, renderNotContent(), /*#__PURE__*/React.createElement("div", null, dropdownRender ? dropdownRender(dropRender(eleOptionList, heightStyle)) : null), isMultiple &&
|
|
576
|
+
}, !dropdownRender && childrenToRender.length > 0 ? dropRender(eleOptionList, heightStyle) : null, renderNotContent(), /*#__PURE__*/React.createElement("div", null, dropdownRender ? dropdownRender(dropRender(eleOptionList, heightStyle)) : null), isMultiple && filledOptions.length > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
577
577
|
className: multipleFooterCls
|
|
578
578
|
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
579
579
|
style: checkboxStyle,
|
|
@@ -585,7 +585,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
585
585
|
}, locale.getLangMsg('Select', 'seleted', {
|
|
586
586
|
size: /*#__PURE__*/React.createElement("span", {
|
|
587
587
|
className: "".concat(selectPrefixCls, "-multiple-footer-hadSelected-number")
|
|
588
|
-
}, selectedVal.length)
|
|
588
|
+
}, selectedVal === null || selectedVal === void 0 ? void 0 : selectedVal.length)
|
|
589
589
|
}))) : null));
|
|
590
590
|
};
|
|
591
591
|
// 处理多选tag
|
|
@@ -782,7 +782,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
782
782
|
selectedVal = _multipleRef$current5.selectedVal,
|
|
783
783
|
selectMulOpts = _multipleRef$current5.selectMulOpts;
|
|
784
784
|
// isMultiple
|
|
785
|
-
if (which === KeyCode.BACKSPACE && !searchValue && isMultiple && selectedVal.length && selectMulOpts.length) {
|
|
785
|
+
if (which === KeyCode.BACKSPACE && !searchValue && isMultiple && (selectedVal === null || selectedVal === void 0 ? void 0 : selectedVal.length) && selectMulOpts.length) {
|
|
786
786
|
_spliceInstanceProperty(selectedVal).call(selectedVal, -1, 1);
|
|
787
787
|
_spliceInstanceProperty(selectMulOpts).call(selectMulOpts, -1, 1);
|
|
788
788
|
setMulOptions(_toConsumableArray(selectMulOpts));
|
|
@@ -399,7 +399,7 @@
|
|
|
399
399
|
.kd-select-dropdown-search-hidden {
|
|
400
400
|
display: none;
|
|
401
401
|
}
|
|
402
|
-
.kd-select-multiple-dropdown-panel .kd-select-dropdown {
|
|
402
|
+
.kd-select-multiple-dropdown-panel .kd-select-dropdown:not(.kd-select-dropdown-no-data) {
|
|
403
403
|
padding-bottom: 0;
|
|
404
404
|
}
|
|
405
405
|
.kd-select-item {
|
package/es/table/table.js
CHANGED
|
@@ -113,13 +113,13 @@ var Table = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
113
113
|
if (typeof getRowProps === 'function') {
|
|
114
114
|
pipeline.appendRowPropsGetter(getRowProps);
|
|
115
115
|
} else {
|
|
116
|
-
devWarning(
|
|
116
|
+
devWarning(getRowProps !== undefined, 'table', "parameter 'getRowProps' should be a function but here it is ".concat(getRowProps));
|
|
117
117
|
}
|
|
118
118
|
if (typeof getTableProps === 'function') {
|
|
119
119
|
var tableProps = getTableProps();
|
|
120
120
|
pipeline.addTableProps(tableProps);
|
|
121
121
|
} else {
|
|
122
|
-
devWarning(
|
|
122
|
+
devWarning(getTableProps !== undefined, 'table', "parameter 'getTableProps' should be a function but here it is ".concat(getTableProps));
|
|
123
123
|
}
|
|
124
124
|
return /*#__PURE__*/React.createElement(BaseTable, _extends({}, pipeline.getProps(), {
|
|
125
125
|
className: tableCls,
|
package/lib/checkbox/group.js
CHANGED
|
@@ -32,6 +32,9 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
|
|
|
32
32
|
}
|
|
33
33
|
return t;
|
|
34
34
|
};
|
|
35
|
+
|
|
36
|
+
// import { Icon } from '../index'
|
|
37
|
+
|
|
35
38
|
var CheckboxTypes = (0, _type.tuple)('default', 'square');
|
|
36
39
|
exports.CheckboxTypes = CheckboxTypes;
|
|
37
40
|
var CheckboxSizes = (0, _type.tuple)('large', 'middle', 'small');
|
|
@@ -11,6 +11,7 @@ exports.default = void 0;
|
|
|
11
11
|
var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
|
|
12
12
|
var _find = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/find"));
|
|
13
13
|
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
|
|
14
|
+
var _filter = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/filter"));
|
|
14
15
|
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
|
15
16
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/toConsumableArray"));
|
|
16
17
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
@@ -314,22 +315,22 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
314
315
|
var symbol = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ', ';
|
|
315
316
|
if (!data) return null;
|
|
316
317
|
if (isDomestic(type)) {
|
|
317
|
-
var
|
|
318
|
+
var _context6, _context7;
|
|
318
319
|
if (isCommon) {
|
|
319
320
|
var _context3;
|
|
320
|
-
var _curVal = (data === null || data === void 0 ? void 0 : data.province) ? data === null || data === void 0 ? void 0 : data.province : data === null || data === void 0 ? void 0 : data.country;
|
|
321
|
+
var _curVal = (data === null || data === void 0 ? void 0 : data.province) ? data === null || data === void 0 ? void 0 : data.province : (data === null || data === void 0 ? void 0 : data.country) || '';
|
|
321
322
|
return (0, _concat.default)(_context3 = "".concat(flag && _curVal ? symbol : '')).call(_context3, _curVal);
|
|
322
323
|
}
|
|
323
324
|
if (data === null || data === void 0 ? void 0 : data.type) {
|
|
324
|
-
var _context4;
|
|
325
|
-
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;
|
|
326
|
-
return (0, _concat.default)(
|
|
325
|
+
var _context4, _context5;
|
|
326
|
+
var _curVal2 = (data.type === 'domestic' ? (data === null || data === void 0 ? void 0 : data.province) || (data === null || data === void 0 ? void 0 : data.country) : (0, _filter.default)(_context4 = [data === null || data === void 0 ? void 0 : data.province, data === null || data === void 0 ? void 0 : data.country]).call(_context4, Boolean).join(symbol)) || '';
|
|
327
|
+
return (0, _concat.default)(_context5 = "".concat(flag && _curVal2 ? symbol : '')).call(_context5, _curVal2);
|
|
327
328
|
}
|
|
328
|
-
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;
|
|
329
|
-
return (0, _concat.default)(
|
|
329
|
+
var curVal = tabsValue === 'domestic' ? (data === null || data === void 0 ? void 0 : data.province) || (data === null || data === void 0 ? void 0 : data.country) || '' : (0, _filter.default)(_context6 = [data === null || data === void 0 ? void 0 : data.province, data === null || data === void 0 ? void 0 : data.country]).call(_context6, Boolean).join(symbol);
|
|
330
|
+
return (0, _concat.default)(_context7 = "".concat(flag && curVal ? symbol : '')).call(_context7, curVal);
|
|
330
331
|
} else {
|
|
331
|
-
var
|
|
332
|
-
return (0, _concat.default)(
|
|
332
|
+
var _context8, _context9;
|
|
333
|
+
return (0, _concat.default)(_context8 = "".concat(flag && ((data === null || data === void 0 ? void 0 : data.province) || (data === null || data === void 0 ? void 0 : data.country)) ? symbol : '')).call(_context8, (0, _filter.default)(_context9 = [data === null || data === void 0 ? void 0 : data.province, data === null || data === void 0 ? void 0 : data.country]).call(_context9, Boolean).join(symbol));
|
|
333
334
|
}
|
|
334
335
|
}, [type, tabsValue]);
|
|
335
336
|
var renderSingle = function renderSingle() {
|
|
@@ -348,6 +348,9 @@ function setTime(date, _ref) {
|
|
|
348
348
|
second = _ref$second === void 0 ? 0 : _ref$second;
|
|
349
349
|
return (0, _setHours.default)((0, _setMinutes.default)((0, _setSeconds.default)(date, second), minute), hour);
|
|
350
350
|
}
|
|
351
|
+
|
|
352
|
+
// ** Date Getters **
|
|
353
|
+
|
|
351
354
|
function getWeek(date) {
|
|
352
355
|
return (0, _getWeek.default)(date);
|
|
353
356
|
}
|
|
@@ -375,7 +378,8 @@ function getEndOfWeek(date) {
|
|
|
375
378
|
}
|
|
376
379
|
// ** Date Math **
|
|
377
380
|
// *** Addition ***
|
|
378
|
-
|
|
381
|
+
// *** Subtraction ***
|
|
382
|
+
// ** Date Comparison **
|
|
379
383
|
function isSameYear(date1, date2) {
|
|
380
384
|
var equal = isNullEqual(date1, date2);
|
|
381
385
|
if (typeof equal === 'boolean') {
|
package/lib/form/style/index.css
CHANGED
|
@@ -103,7 +103,7 @@ var InternalImageCropper = function InternalImageCropper(props, forwardedRef) {
|
|
|
103
103
|
return cropperRef.current.getImage();
|
|
104
104
|
case 2:
|
|
105
105
|
imgFile = _context.sent;
|
|
106
|
-
imgFile ? onCropSuccess === null || onCropSuccess === void 0 ? void 0 : onCropSuccess(imgFile) : onCropFailed === null || onCropFailed === void 0 ? void 0 : onCropFailed(
|
|
106
|
+
imgFile ? onCropSuccess === null || onCropSuccess === void 0 ? void 0 : onCropSuccess(imgFile) : onCropFailed === null || onCropFailed === void 0 ? void 0 : onCropFailed();
|
|
107
107
|
case 4:
|
|
108
108
|
case "end":
|
|
109
109
|
return _context.stop();
|
package/lib/select/select.js
CHANGED
|
@@ -34,7 +34,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "functi
|
|
|
34
34
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
35
35
|
var INPUT_MIN_WIDTH = 4; // 输入框最小宽度
|
|
36
36
|
var InternalSelect = function InternalSelect(props, ref) {
|
|
37
|
-
var _context, _classNames6, _classNames12, _context5;
|
|
37
|
+
var _context, _classNames5, _classNames6, _classNames12, _context5;
|
|
38
38
|
var _useContext = (0, _react.useContext)(_ConfigContext.default),
|
|
39
39
|
getPrefixCls = _useContext.getPrefixCls,
|
|
40
40
|
prefixCls = _useContext.prefixCls,
|
|
@@ -133,14 +133,12 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
133
133
|
// 选择器样式
|
|
134
134
|
var selectCls = (0, _classnames.default)(selectPrefixCls, className, (0, _defineProperty2.default)({}, "".concat(selectPrefixCls, "-visible"), optionShow));
|
|
135
135
|
var selectionCls = (0, _classnames.default)((0, _defineProperty2.default)({}, "".concat(selectPrefixCls, "-selector"), true));
|
|
136
|
-
// 下拉列表框样式
|
|
137
|
-
var dropDownCls = (0, _classnames.default)(dropdownClassName, (0, _defineProperty2.default)({}, "".concat(selectPrefixCls, "-dropdown"), true));
|
|
138
136
|
// 下拉子项列表样式
|
|
139
137
|
var dropContentCls = (0, _classnames.default)((0, _defineProperty2.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));
|
|
140
138
|
// 多选底部样式
|
|
141
139
|
var multipleFooterCls = (0, _classnames.default)((0, _defineProperty2.default)({}, "".concat(selectPrefixCls, "-multiple-footer"), true));
|
|
142
140
|
// 多选,单选公共样式
|
|
143
|
-
var commCls = (0, _classnames.default)((
|
|
141
|
+
var commCls = (0, _classnames.default)((_classNames5 = {}, (0, _defineProperty2.default)(_classNames5, "".concat(selectPrefixCls, "-bordered"), borderType === 'bordered'), (0, _defineProperty2.default)(_classNames5, "".concat(selectPrefixCls, "-underline"), borderType === 'underline'), (0, _defineProperty2.default)(_classNames5, "".concat(selectPrefixCls, "-borderless"), borderType === 'none'), (0, _defineProperty2.default)(_classNames5, (0, _concat.default)(_context = "".concat(selectPrefixCls, "-size-")).call(_context, size), size), (0, _defineProperty2.default)(_classNames5, "".concat(selectPrefixCls, "-wrapper"), true), (0, _defineProperty2.default)(_classNames5, "".concat(selectPrefixCls, "-show-search"), isShowSearch && focusd), (0, _defineProperty2.default)(_classNames5, "".concat(selectPrefixCls, "-error"), status === 'error'), _classNames5));
|
|
144
142
|
(0, _react.useEffect)(function () {
|
|
145
143
|
if (typeof props.visible !== 'undefined') {
|
|
146
144
|
setOptionShow(props.visible);
|
|
@@ -279,6 +277,8 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
279
277
|
});
|
|
280
278
|
return childrenList;
|
|
281
279
|
}, [searchValue, realChildren, filterOption, optionFilterProp]);
|
|
280
|
+
// 下拉列表框样式
|
|
281
|
+
var dropDownCls = (0, _classnames.default)(dropdownClassName, (_classNames6 = {}, (0, _defineProperty2.default)(_classNames6, "".concat(selectPrefixCls, "-dropdown"), true), (0, _defineProperty2.default)(_classNames6, "".concat(selectPrefixCls, "-dropdown-no-data"), filledOptions.length === 0), _classNames6));
|
|
282
282
|
var getOptionLabel = (0, _react.useCallback)(function (obj) {
|
|
283
283
|
var _a;
|
|
284
284
|
var text = Object.prototype.hasOwnProperty.call(selectProps, 'options') && !Object.prototype.hasOwnProperty.call(props, 'optionLabelProp') ? 'label' : optionLabelProp;
|
|
@@ -585,7 +585,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
585
585
|
className: dropDownCls,
|
|
586
586
|
style: dropdownStyle,
|
|
587
587
|
ref: dropDownRef
|
|
588
|
-
}, !dropdownRender && childrenToRender.length > 0 ? dropRender(eleOptionList, heightStyle) : null, renderNotContent(), /*#__PURE__*/_react.default.createElement("div", null, dropdownRender ? dropdownRender(dropRender(eleOptionList, heightStyle)) : null), isMultiple &&
|
|
588
|
+
}, !dropdownRender && childrenToRender.length > 0 ? dropRender(eleOptionList, heightStyle) : null, renderNotContent(), /*#__PURE__*/_react.default.createElement("div", null, dropdownRender ? dropdownRender(dropRender(eleOptionList, heightStyle)) : null), isMultiple && filledOptions.length > 0 ? /*#__PURE__*/_react.default.createElement("div", {
|
|
589
589
|
className: multipleFooterCls
|
|
590
590
|
}, /*#__PURE__*/_react.default.createElement(_index.Checkbox, {
|
|
591
591
|
style: checkboxStyle,
|
|
@@ -597,7 +597,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
597
597
|
}, locale.getLangMsg('Select', 'seleted', {
|
|
598
598
|
size: /*#__PURE__*/_react.default.createElement("span", {
|
|
599
599
|
className: "".concat(selectPrefixCls, "-multiple-footer-hadSelected-number")
|
|
600
|
-
}, selectedVal.length)
|
|
600
|
+
}, selectedVal === null || selectedVal === void 0 ? void 0 : selectedVal.length)
|
|
601
601
|
}))) : null));
|
|
602
602
|
};
|
|
603
603
|
// 处理多选tag
|
|
@@ -794,7 +794,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
794
794
|
selectedVal = _multipleRef$current5.selectedVal,
|
|
795
795
|
selectMulOpts = _multipleRef$current5.selectMulOpts;
|
|
796
796
|
// isMultiple
|
|
797
|
-
if (which === _KeyCode.default.BACKSPACE && !searchValue && isMultiple && selectedVal.length && selectMulOpts.length) {
|
|
797
|
+
if (which === _KeyCode.default.BACKSPACE && !searchValue && isMultiple && (selectedVal === null || selectedVal === void 0 ? void 0 : selectedVal.length) && selectMulOpts.length) {
|
|
798
798
|
(0, _splice.default)(selectedVal).call(selectedVal, -1, 1);
|
|
799
799
|
(0, _splice.default)(selectMulOpts).call(selectMulOpts, -1, 1);
|
|
800
800
|
setMulOptions((0, _toConsumableArray2.default)(selectMulOpts));
|
|
@@ -399,7 +399,7 @@
|
|
|
399
399
|
.kd-select-dropdown-search-hidden {
|
|
400
400
|
display: none;
|
|
401
401
|
}
|
|
402
|
-
.kd-select-multiple-dropdown-panel .kd-select-dropdown {
|
|
402
|
+
.kd-select-multiple-dropdown-panel .kd-select-dropdown:not(.kd-select-dropdown-no-data) {
|
|
403
403
|
padding-bottom: 0;
|
|
404
404
|
}
|
|
405
405
|
.kd-select-item {
|
package/lib/table/table.js
CHANGED
|
@@ -125,13 +125,13 @@ var Table = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
125
125
|
if (typeof getRowProps === 'function') {
|
|
126
126
|
pipeline.appendRowPropsGetter(getRowProps);
|
|
127
127
|
} else {
|
|
128
|
-
(0, _devwarning.default)(
|
|
128
|
+
(0, _devwarning.default)(getRowProps !== undefined, 'table', "parameter 'getRowProps' should be a function but here it is ".concat(getRowProps));
|
|
129
129
|
}
|
|
130
130
|
if (typeof getTableProps === 'function') {
|
|
131
131
|
var tableProps = getTableProps();
|
|
132
132
|
pipeline.addTableProps(tableProps);
|
|
133
133
|
} else {
|
|
134
|
-
(0, _devwarning.default)(
|
|
134
|
+
(0, _devwarning.default)(getTableProps !== undefined, 'table', "parameter 'getTableProps' should be a function but here it is ".concat(getTableProps));
|
|
135
135
|
}
|
|
136
136
|
return /*#__PURE__*/_react.default.createElement(_table.Table, (0, _extends2.default)({}, pipeline.getProps(), {
|
|
137
137
|
className: tableCls,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kdcloudjs/kdesign",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.45",
|
|
4
4
|
"description": "KDesign 金蝶前端react 组件库",
|
|
5
5
|
"title": "kdesign",
|
|
6
6
|
"keywords": [
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@babel/runtime-corejs3": "^7.11.2",
|
|
79
79
|
"@babel/standalone": "^7.14.3",
|
|
80
80
|
"@kdcloudjs/kdesign-icons": "^1.0.0",
|
|
81
|
-
"@kdcloudjs/table": "1.2.0-canary.
|
|
81
|
+
"@kdcloudjs/table": "1.2.0-canary.12",
|
|
82
82
|
"@popperjs/core": "^2.5.4",
|
|
83
83
|
"@types/js-cookie": "^3.0.3",
|
|
84
84
|
"async-validator": "^3.5.1",
|