@kdcloudjs/kdesign 1.7.26 → 1.7.28
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 +41 -0
- package/dist/default-theme.js +1 -1
- package/dist/kdesign-complete.less +30 -14
- package/dist/kdesign.css +29 -14
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +168 -42
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +3 -3
- package/dist/kdesign.min.js +8 -8
- package/dist/kdesign.min.js.map +1 -1
- package/es/anchor/style/index.css +1 -1
- package/es/anchor/style/index.less +1 -1
- package/es/anchor/style/token.less +1 -0
- package/es/cascader/style/index.css +2 -2
- package/es/cascader/style/index.less +2 -2
- package/es/cascader/style/token.less +1 -0
- package/es/city-picker/city-picker.js +121 -12
- package/es/city-picker/interface.d.ts +5 -1
- package/es/city-picker/option.js +14 -3
- package/es/city-picker/style/index.css +21 -10
- package/es/city-picker/style/index.less +17 -10
- package/es/grid/col.js +1 -1
- package/es/grid/row.js +1 -1
- package/es/select/select.js +2 -2
- package/es/select/style/index.css +1 -0
- package/es/select/style/index.less +1 -0
- package/es/select/style/token.less +1 -0
- package/es/style/themes/default.less +2 -2
- package/es/tabs/style/index.css +3 -0
- package/es/tabs/style/index.less +3 -0
- package/es/tabs/style/token.less +1 -0
- package/lib/anchor/style/index.css +1 -1
- package/lib/anchor/style/index.less +1 -1
- package/lib/anchor/style/token.less +1 -0
- package/lib/cascader/style/index.css +2 -2
- package/lib/cascader/style/index.less +2 -2
- package/lib/cascader/style/token.less +1 -0
- package/lib/city-picker/city-picker.js +120 -11
- package/lib/city-picker/interface.d.ts +5 -1
- package/lib/city-picker/option.js +14 -3
- package/lib/city-picker/style/index.css +21 -10
- package/lib/city-picker/style/index.less +17 -10
- package/lib/grid/col.js +1 -1
- package/lib/grid/row.js +1 -1
- package/lib/select/select.js +2 -2
- package/lib/select/style/index.css +1 -0
- package/lib/select/style/index.less +1 -0
- package/lib/select/style/token.less +1 -0
- package/lib/style/themes/default.less +2 -2
- package/lib/tabs/style/index.css +3 -0
- package/lib/tabs/style/index.less +3 -0
- package/lib/tabs/style/token.less +1 -0
- package/package.json +1 -1
package/dist/kdesign.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
*
|
|
3
|
-
* @kdcloudjs/kdesign v1.7.
|
|
3
|
+
* @kdcloudjs/kdesign v1.7.27
|
|
4
4
|
*
|
|
5
5
|
* Copyright 2020-present, Kingdee, Inc.
|
|
6
6
|
* All rights reserved.
|
|
@@ -7516,6 +7516,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7516
7516
|
/* harmony import */ var _option__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./option */ "./components/city-picker/option.tsx");
|
|
7517
7517
|
/* harmony import */ var lodash_escapeRegExp__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! lodash/escapeRegExp */ "./node_modules/lodash/escapeRegExp.js");
|
|
7518
7518
|
/* harmony import */ var lodash_escapeRegExp__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(lodash_escapeRegExp__WEBPACK_IMPORTED_MODULE_28__);
|
|
7519
|
+
/* harmony import */ var _utils_KeyCode__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../_utils/KeyCode */ "./components/_utils/KeyCode.ts");
|
|
7520
|
+
/* harmony import */ var lodash_isObject__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! lodash/isObject */ "./node_modules/lodash/isObject.js");
|
|
7521
|
+
/* harmony import */ var lodash_isObject__WEBPACK_IMPORTED_MODULE_30___default = /*#__PURE__*/__webpack_require__.n(lodash_isObject__WEBPACK_IMPORTED_MODULE_30__);
|
|
7519
7522
|
|
|
7520
7523
|
|
|
7521
7524
|
|
|
@@ -7547,6 +7550,14 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
7547
7550
|
|
|
7548
7551
|
|
|
7549
7552
|
|
|
7553
|
+
|
|
7554
|
+
|
|
7555
|
+
var getCityId = function getCityId(data) {
|
|
7556
|
+
if (lodash_isObject__WEBPACK_IMPORTED_MODULE_30___default()(data)) {
|
|
7557
|
+
return data === null || data === void 0 ? void 0 : data.id;
|
|
7558
|
+
}
|
|
7559
|
+
return data;
|
|
7560
|
+
};
|
|
7550
7561
|
var InternalSelect = function InternalSelect(props, ref) {
|
|
7551
7562
|
var _classNames3, _classNames5;
|
|
7552
7563
|
var _useContext = Object(react__WEBPACK_IMPORTED_MODULE_20__["useContext"])(_config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_23__["default"]),
|
|
@@ -7596,8 +7607,8 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
7596
7607
|
itemRender = selectProps.itemRender,
|
|
7597
7608
|
onTabPaneChange = selectProps.onTabPaneChange;
|
|
7598
7609
|
var _useMergedState = Object(_utils_hooks__WEBPACK_IMPORTED_MODULE_21__["useMergedState"])(undefined, {
|
|
7599
|
-
value: value,
|
|
7600
|
-
defaultValue: defaultValue
|
|
7610
|
+
value: getCityId(value),
|
|
7611
|
+
defaultValue: getCityId(defaultValue)
|
|
7601
7612
|
}),
|
|
7602
7613
|
_useMergedState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_useMergedState, 2),
|
|
7603
7614
|
initValue = _useMergedState2[0],
|
|
@@ -7614,6 +7625,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
7614
7625
|
var searchRef = Object(react__WEBPACK_IMPORTED_MODULE_20__["useRef"])(null); // 搜索框ref
|
|
7615
7626
|
var selectionRef = Object(react__WEBPACK_IMPORTED_MODULE_20__["useRef"])(null);
|
|
7616
7627
|
var clearRef = Object(react__WEBPACK_IMPORTED_MODULE_20__["useRef"])(null);
|
|
7628
|
+
var optionsListRef = Object(react__WEBPACK_IMPORTED_MODULE_20__["useRef"])(null);
|
|
7617
7629
|
var _useState = Object(react__WEBPACK_IMPORTED_MODULE_20__["useState"])(typeof props.visible === 'undefined' ? !!defaultOpen : !!props.visible),
|
|
7618
7630
|
_useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_useState, 2),
|
|
7619
7631
|
optionShow = _useState2[0],
|
|
@@ -7645,6 +7657,10 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
7645
7657
|
var commCls = classnames__WEBPACK_IMPORTED_MODULE_22___default()((_classNames3 = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames3, "".concat(selectPrefixCls, "-bordered"), borderType === 'bordered'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames3, "".concat(selectPrefixCls, "-underline"), borderType === 'underline'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames3, "".concat(selectPrefixCls, "-borderless"), borderType === 'none'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames3, "".concat(selectPrefixCls, "-size-").concat(size), size), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames3, "".concat(selectPrefixCls, "-wrapper"), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames3, "".concat(selectPrefixCls, "-show-search"), focusd), _classNames3));
|
|
7646
7658
|
Object(react__WEBPACK_IMPORTED_MODULE_20__["useEffect"])(function () {
|
|
7647
7659
|
if (typeof value === 'undefined') return;
|
|
7660
|
+
if (lodash_isObject__WEBPACK_IMPORTED_MODULE_30___default()(value)) {
|
|
7661
|
+
setSeletedCity(value);
|
|
7662
|
+
return;
|
|
7663
|
+
}
|
|
7648
7664
|
var cityList = [].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(commonList), _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(domesticList), _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(foreignList));
|
|
7649
7665
|
var city = cityList.find(function (city) {
|
|
7650
7666
|
return city.id === value;
|
|
@@ -7750,6 +7766,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
7750
7766
|
};
|
|
7751
7767
|
var handleOption = function handleOption(city) {
|
|
7752
7768
|
handleVisibleChange(false);
|
|
7769
|
+
city.type = tabsValue === 'domestic' ? 'domestic' : 'foreign';
|
|
7753
7770
|
(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));
|
|
7754
7771
|
if (typeof value === 'undefined') {
|
|
7755
7772
|
setSeletedCity(city);
|
|
@@ -7762,8 +7779,9 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
7762
7779
|
return renderNotContent(notContent);
|
|
7763
7780
|
}
|
|
7764
7781
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_20___default.a.createElement("div", {
|
|
7765
|
-
className: "".concat(selectPrefixCls, "-list")
|
|
7766
|
-
|
|
7782
|
+
className: "".concat(selectPrefixCls, "-list"),
|
|
7783
|
+
ref: optionsListRef
|
|
7784
|
+
}, data.map(function (item, index) {
|
|
7767
7785
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_20___default.a.createElement(_option__WEBPACK_IMPORTED_MODULE_27__["default"], {
|
|
7768
7786
|
key: item.id,
|
|
7769
7787
|
value: initValue,
|
|
@@ -7773,7 +7791,12 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
7773
7791
|
return _renderCityInfo(data, isCommon, flag);
|
|
7774
7792
|
},
|
|
7775
7793
|
onChangeSelect: handleOption,
|
|
7776
|
-
itemRender: itemRender
|
|
7794
|
+
itemRender: itemRender,
|
|
7795
|
+
activeIndex: activeIndex,
|
|
7796
|
+
index: index,
|
|
7797
|
+
onChangeActiveIndex: function onChangeActiveIndex(i) {
|
|
7798
|
+
setActiveIndex(i);
|
|
7799
|
+
}
|
|
7777
7800
|
}, searchValue ? getHighlightText(item === null || item === void 0 ? void 0 : item.name, (item === null || item === void 0 ? void 0 : item[optionHighlightProps]) || searchValue) : item === null || item === void 0 ? void 0 : item.name);
|
|
7778
7801
|
}));
|
|
7779
7802
|
};
|
|
@@ -7810,7 +7833,15 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
7810
7833
|
var symbol = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ', ';
|
|
7811
7834
|
if (!data) return null;
|
|
7812
7835
|
if (isDomestic(type)) {
|
|
7813
|
-
|
|
7836
|
+
if (isCommon) {
|
|
7837
|
+
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;
|
|
7838
|
+
return "".concat(flag && _curVal ? symbol : '').concat(_curVal);
|
|
7839
|
+
}
|
|
7840
|
+
if (data !== null && data !== void 0 && data.type) {
|
|
7841
|
+
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;
|
|
7842
|
+
return "".concat(flag && _curVal2 ? symbol : '').concat(_curVal2);
|
|
7843
|
+
}
|
|
7844
|
+
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;
|
|
7814
7845
|
return "".concat(flag && curVal ? symbol : '').concat(curVal);
|
|
7815
7846
|
} else {
|
|
7816
7847
|
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).concat(data !== null && data !== void 0 && data.country && data !== null && data !== void 0 && data.province ? symbol : '').concat(data === null || data === void 0 ? void 0 : data.country);
|
|
@@ -7865,6 +7896,83 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
7865
7896
|
(_clearRef$current2 = clearRef.current) === null || _clearRef$current2 === void 0 ? void 0 : _clearRef$current2.removeEventListener('mouseup', fn);
|
|
7866
7897
|
};
|
|
7867
7898
|
}, [initValue]);
|
|
7899
|
+
|
|
7900
|
+
// keyboard
|
|
7901
|
+
var curkeyboardList = Object(react__WEBPACK_IMPORTED_MODULE_20__["useMemo"])(function () {
|
|
7902
|
+
if (!searchValue) {
|
|
7903
|
+
return commonList;
|
|
7904
|
+
} else if (tabsValue === 'domestic') {
|
|
7905
|
+
return domesticList;
|
|
7906
|
+
} else {
|
|
7907
|
+
return foreignList;
|
|
7908
|
+
}
|
|
7909
|
+
}, [commonList, domesticList, foreignList, searchValue, tabsValue]);
|
|
7910
|
+
var getActiveIndex = function getActiveIndex(index) {
|
|
7911
|
+
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
7912
|
+
var len = curkeyboardList.length;
|
|
7913
|
+
for (var i = 0; i < len; i += 1) {
|
|
7914
|
+
var current = (index + i * offset + len) % len;
|
|
7915
|
+
return current;
|
|
7916
|
+
}
|
|
7917
|
+
return -1;
|
|
7918
|
+
};
|
|
7919
|
+
var _useState11 = Object(react__WEBPACK_IMPORTED_MODULE_20__["useState"])(getActiveIndex(0)),
|
|
7920
|
+
_useState12 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_useState11, 2),
|
|
7921
|
+
activeIndex = _useState12[0],
|
|
7922
|
+
setActiveIndex = _useState12[1];
|
|
7923
|
+
var initActiveIndex = function initActiveIndex() {
|
|
7924
|
+
setActiveIndex(getActiveIndex(0));
|
|
7925
|
+
};
|
|
7926
|
+
Object(react__WEBPACK_IMPORTED_MODULE_20__["useEffect"])(function () {
|
|
7927
|
+
initActiveIndex();
|
|
7928
|
+
}, [searchValue, tabsValue]);
|
|
7929
|
+
var onInternalKeyDown = function onInternalKeyDown(e) {
|
|
7930
|
+
var which = e.which;
|
|
7931
|
+
// open
|
|
7932
|
+
if (which === _utils_KeyCode__WEBPACK_IMPORTED_MODULE_29__["default"].ENTER || which === _utils_KeyCode__WEBPACK_IMPORTED_MODULE_29__["default"].UP || which === _utils_KeyCode__WEBPACK_IMPORTED_MODULE_29__["default"].DOWN) {
|
|
7933
|
+
e.preventDefault();
|
|
7934
|
+
setOptionShow(true);
|
|
7935
|
+
}
|
|
7936
|
+
// up、down、enter、esc
|
|
7937
|
+
if (optionShow) {
|
|
7938
|
+
var offset = 0;
|
|
7939
|
+
switch (which) {
|
|
7940
|
+
case _utils_KeyCode__WEBPACK_IMPORTED_MODULE_29__["default"].UP:
|
|
7941
|
+
offset = -1;
|
|
7942
|
+
break;
|
|
7943
|
+
case _utils_KeyCode__WEBPACK_IMPORTED_MODULE_29__["default"].DOWN:
|
|
7944
|
+
offset = 1;
|
|
7945
|
+
break;
|
|
7946
|
+
case _utils_KeyCode__WEBPACK_IMPORTED_MODULE_29__["default"].ENTER:
|
|
7947
|
+
{
|
|
7948
|
+
var item = curkeyboardList[activeIndex];
|
|
7949
|
+
if (!item) return;
|
|
7950
|
+
handleOption(item);
|
|
7951
|
+
setOptionShow(false);
|
|
7952
|
+
break;
|
|
7953
|
+
}
|
|
7954
|
+
case _utils_KeyCode__WEBPACK_IMPORTED_MODULE_29__["default"].ESC:
|
|
7955
|
+
setOptionShow(false);
|
|
7956
|
+
break;
|
|
7957
|
+
default:
|
|
7958
|
+
break;
|
|
7959
|
+
}
|
|
7960
|
+
if (offset !== 0) {
|
|
7961
|
+
var _optionsListRef$curre, _optionsListRef$curre2;
|
|
7962
|
+
var nextActiveIndex = getActiveIndex(activeIndex + offset, offset);
|
|
7963
|
+
var curDom = (_optionsListRef$curre = optionsListRef.current) === null || _optionsListRef$curre === void 0 ? void 0 : (_optionsListRef$curre2 = _optionsListRef$curre.children) === null || _optionsListRef$curre2 === void 0 ? void 0 : _optionsListRef$curre2[nextActiveIndex];
|
|
7964
|
+
if (curDom) {
|
|
7965
|
+
var _optionsListRef$curre3;
|
|
7966
|
+
(_optionsListRef$curre3 = optionsListRef.current) === null || _optionsListRef$curre3 === void 0 ? void 0 : _optionsListRef$curre3.children[nextActiveIndex].scrollIntoView({
|
|
7967
|
+
behavior: 'auto',
|
|
7968
|
+
block: 'nearest'
|
|
7969
|
+
});
|
|
7970
|
+
}
|
|
7971
|
+
setActiveIndex(nextActiveIndex);
|
|
7972
|
+
e.preventDefault();
|
|
7973
|
+
}
|
|
7974
|
+
}
|
|
7975
|
+
};
|
|
7868
7976
|
var renderCityPicker = function renderCityPicker() {
|
|
7869
7977
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_20___default.a.createElement("div", {
|
|
7870
7978
|
className: cityPickerCls,
|
|
@@ -7882,7 +7990,8 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
7882
7990
|
onBlur: function onBlur() {
|
|
7883
7991
|
var _searchRef$current2;
|
|
7884
7992
|
return (_searchRef$current2 = searchRef.current) === null || _searchRef$current2 === void 0 ? void 0 : _searchRef$current2.blur();
|
|
7885
|
-
}
|
|
7993
|
+
},
|
|
7994
|
+
onKeyDown: onInternalKeyDown
|
|
7886
7995
|
}, renderSingle()));
|
|
7887
7996
|
};
|
|
7888
7997
|
var catchStyle = function catchStyle() {
|
|
@@ -7900,6 +8009,9 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
7900
8009
|
}
|
|
7901
8010
|
};
|
|
7902
8011
|
var handleVisibleChange = function handleVisibleChange(visible) {
|
|
8012
|
+
if (!visible) {
|
|
8013
|
+
initActiveIndex();
|
|
8014
|
+
}
|
|
7903
8015
|
if (visible !== optionShow) {
|
|
7904
8016
|
props.visible === undefined && setOptionShow(visible);
|
|
7905
8017
|
onVisibleChange && onVisibleChange(visible);
|
|
@@ -7973,11 +8085,14 @@ var InternalOption = function InternalOption(props, ref) {
|
|
|
7973
8085
|
value = props.value,
|
|
7974
8086
|
disabled = props.disabled,
|
|
7975
8087
|
className = props.className,
|
|
8088
|
+
activeIndex = props.activeIndex,
|
|
8089
|
+
index = props.index,
|
|
7976
8090
|
onChangeSelect = props.onChangeSelect,
|
|
7977
8091
|
_props$city = props.city,
|
|
7978
8092
|
city = _props$city === void 0 ? {} : _props$city,
|
|
7979
8093
|
renderCityInfo = props.renderCityInfo,
|
|
7980
|
-
itemRender = props.itemRender
|
|
8094
|
+
itemRender = props.itemRender,
|
|
8095
|
+
onChangeActiveIndex = props.onChangeActiveIndex;
|
|
7981
8096
|
var _ref = city,
|
|
7982
8097
|
id = _ref.id,
|
|
7983
8098
|
name = _ref.name;
|
|
@@ -7986,17 +8101,25 @@ var InternalOption = function InternalOption(props, ref) {
|
|
|
7986
8101
|
prefixCls = _useContext.prefixCls;
|
|
7987
8102
|
var selectOptionPrefixCls = getPrefixCls(prefixCls, 'city-picker-list-item');
|
|
7988
8103
|
var isSelected = id !== undefined ? id === value : false;
|
|
7989
|
-
var optionCls = classnames__WEBPACK_IMPORTED_MODULE_3___default()(selectOptionPrefixCls, className, (_classNames = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, "".concat(selectOptionPrefixCls, "-selected"), isSelected), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, "".concat(selectOptionPrefixCls, "-disabled"), disabled), _classNames));
|
|
8104
|
+
var optionCls = classnames__WEBPACK_IMPORTED_MODULE_3___default()(selectOptionPrefixCls, className, (_classNames = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, "".concat(selectOptionPrefixCls, "-selected"), isSelected), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, "".concat(selectOptionPrefixCls, "-disabled"), disabled), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, "".concat(selectOptionPrefixCls, "-active"), activeIndex === index), _classNames));
|
|
7990
8105
|
var handleClick = function handleClick(e) {
|
|
7991
8106
|
e.preventDefault();
|
|
7992
8107
|
if (disabled || id === undefined) return;
|
|
7993
8108
|
onChangeSelect === null || onChangeSelect === void 0 ? void 0 : onChangeSelect(city);
|
|
7994
8109
|
};
|
|
8110
|
+
var handleOnMouseEnter = function handleOnMouseEnter() {
|
|
8111
|
+
onChangeActiveIndex && onChangeActiveIndex(index);
|
|
8112
|
+
};
|
|
8113
|
+
var handleOnMouseLeave = function handleOnMouseLeave() {
|
|
8114
|
+
onChangeActiveIndex && onChangeActiveIndex(-1);
|
|
8115
|
+
};
|
|
7995
8116
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_2___default.a.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("div", {
|
|
7996
8117
|
ref: optionRef,
|
|
7997
8118
|
className: optionCls,
|
|
7998
8119
|
title: name,
|
|
7999
|
-
onClick: handleClick
|
|
8120
|
+
onClick: handleClick,
|
|
8121
|
+
onMouseEnter: handleOnMouseEnter,
|
|
8122
|
+
onMouseLeave: handleOnMouseLeave
|
|
8000
8123
|
}, typeof itemRender === 'function' ? itemRender(city) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_2___default.a.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("span", {
|
|
8001
8124
|
className: "".concat(selectOptionPrefixCls, "-content")
|
|
8002
8125
|
}, children), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("span", {
|
|
@@ -18536,12 +18659,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
18536
18659
|
/* harmony import */ var core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_6__);
|
|
18537
18660
|
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js");
|
|
18538
18661
|
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);
|
|
18539
|
-
/* harmony import */ var
|
|
18540
|
-
/* harmony import */ var
|
|
18541
|
-
/* harmony import */ var
|
|
18542
|
-
/* harmony import */ var
|
|
18543
|
-
/* harmony import */ var
|
|
18544
|
-
/* harmony import */ var
|
|
18662
|
+
/* 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");
|
|
18663
|
+
/* 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__);
|
|
18664
|
+
/* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.number.constructor.js */ "./node_modules/core-js/modules/es.number.constructor.js");
|
|
18665
|
+
/* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_9__);
|
|
18666
|
+
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
|
|
18667
|
+
/* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_10__);
|
|
18545
18668
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react */ "react");
|
|
18546
18669
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_11__);
|
|
18547
18670
|
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
|
|
@@ -18592,7 +18715,7 @@ var Col = function Col(props) {
|
|
|
18592
18715
|
customPrefixcls = _getCompProps.prefixCls;
|
|
18593
18716
|
|
|
18594
18717
|
// 浏览器名称
|
|
18595
|
-
var isSogou = Object(_utils_testBrowserType__WEBPACK_IMPORTED_MODULE_15__["testBrowserType"])(/^sogou/i, 0);
|
|
18718
|
+
var isSogou = Object(_utils_testBrowserType__WEBPACK_IMPORTED_MODULE_15__["testBrowserType"])(/^sogou/i, 0) || /Trident|MSIE/.test(navigator.userAgent);
|
|
18596
18719
|
|
|
18597
18720
|
// className前缀
|
|
18598
18721
|
var prefixCls = getPrefixCls(pkgPrefixCls, 'col', customPrefixcls);
|
|
@@ -18707,19 +18830,21 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
18707
18830
|
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__);
|
|
18708
18831
|
/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/slicedToArray.js");
|
|
18709
18832
|
/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__);
|
|
18710
|
-
/* harmony import */ var
|
|
18711
|
-
/* harmony import */ var
|
|
18712
|
-
/* harmony import */ var
|
|
18713
|
-
/* harmony import */ var
|
|
18714
|
-
/* harmony import */ var
|
|
18715
|
-
/* harmony import */ var
|
|
18716
|
-
/* harmony import */ var
|
|
18717
|
-
/* harmony import */ var
|
|
18718
|
-
/* harmony import */ var
|
|
18719
|
-
/* harmony import */ var
|
|
18720
|
-
/* harmony import */ var
|
|
18721
|
-
/* harmony import */ var
|
|
18722
|
-
/* harmony import */ var
|
|
18833
|
+
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ "./node_modules/core-js/modules/es.regexp.exec.js");
|
|
18834
|
+
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_9__);
|
|
18835
|
+
/* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.number.constructor.js */ "./node_modules/core-js/modules/es.number.constructor.js");
|
|
18836
|
+
/* harmony import */ var core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_constructor_js__WEBPACK_IMPORTED_MODULE_10__);
|
|
18837
|
+
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.array.map.js */ "./node_modules/core-js/modules/es.array.map.js");
|
|
18838
|
+
/* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_11__);
|
|
18839
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! react */ "react");
|
|
18840
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_12__);
|
|
18841
|
+
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
|
|
18842
|
+
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_13__);
|
|
18843
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../_utils */ "./components/_utils/index.ts");
|
|
18844
|
+
/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx");
|
|
18845
|
+
/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! lodash/throttle */ "./node_modules/lodash/throttle.js");
|
|
18846
|
+
/* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(lodash_throttle__WEBPACK_IMPORTED_MODULE_16__);
|
|
18847
|
+
/* harmony import */ var _utils_testBrowserType__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../_utils/testBrowserType */ "./components/_utils/testBrowserType.ts");
|
|
18723
18848
|
|
|
18724
18849
|
|
|
18725
18850
|
|
|
@@ -18739,6 +18864,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
18739
18864
|
|
|
18740
18865
|
|
|
18741
18866
|
|
|
18867
|
+
|
|
18742
18868
|
function getGap(gutter, width) {
|
|
18743
18869
|
var xs = gutter.xs,
|
|
18744
18870
|
sm = gutter.sm,
|
|
@@ -18754,12 +18880,12 @@ function getGap(gutter, width) {
|
|
|
18754
18880
|
return gap;
|
|
18755
18881
|
}
|
|
18756
18882
|
var Row = function Row(props) {
|
|
18757
|
-
var _React$useContext =
|
|
18883
|
+
var _React$useContext = react__WEBPACK_IMPORTED_MODULE_12__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_15__["ConfigContext"]),
|
|
18758
18884
|
getPrefixCls = _React$useContext.getPrefixCls,
|
|
18759
18885
|
pkgPrefixCls = _React$useContext.prefixCls,
|
|
18760
18886
|
userDefaultProps = _React$useContext.compDefaultProps;
|
|
18761
18887
|
// 属性需要合并一遍用户定义的默认属性
|
|
18762
|
-
var _getCompProps = Object(
|
|
18888
|
+
var _getCompProps = Object(_utils__WEBPACK_IMPORTED_MODULE_14__["getCompProps"])('Row', userDefaultProps, props),
|
|
18763
18889
|
style = _getCompProps.style,
|
|
18764
18890
|
className = _getCompProps.className,
|
|
18765
18891
|
children = _getCompProps.children,
|
|
@@ -18770,15 +18896,15 @@ var Row = function Row(props) {
|
|
|
18770
18896
|
customPrefixcls = _getCompProps.prefixCls;
|
|
18771
18897
|
|
|
18772
18898
|
// 浏览器名称
|
|
18773
|
-
var isSogou = Object(
|
|
18899
|
+
var isSogou = Object(_utils_testBrowserType__WEBPACK_IMPORTED_MODULE_17__["testBrowserType"])(/^sogou/i, 0) || /Trident|MSIE/.test(navigator.userAgent);
|
|
18774
18900
|
|
|
18775
18901
|
// className前缀
|
|
18776
18902
|
var prefixCls = getPrefixCls(pkgPrefixCls, 'row', customPrefixcls);
|
|
18777
|
-
var _React$useState =
|
|
18903
|
+
var _React$useState = react__WEBPACK_IMPORTED_MODULE_12__["useState"](window.innerWidth),
|
|
18778
18904
|
_React$useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8___default()(_React$useState, 2),
|
|
18779
18905
|
winWidth = _React$useState2[0],
|
|
18780
18906
|
setWinWidth = _React$useState2[1];
|
|
18781
|
-
var updateWidth =
|
|
18907
|
+
var updateWidth = lodash_throttle__WEBPACK_IMPORTED_MODULE_16___default()(function () {
|
|
18782
18908
|
return setWinWidth(window.innerWidth);
|
|
18783
18909
|
}, 500);
|
|
18784
18910
|
window.addEventListener('resize', updateWidth);
|
|
@@ -18819,15 +18945,15 @@ var Row = function Row(props) {
|
|
|
18819
18945
|
alignItems: toalign[align] || align,
|
|
18820
18946
|
justifyContent: tojustify[justify] || justify
|
|
18821
18947
|
});
|
|
18822
|
-
return /*#__PURE__*/
|
|
18823
|
-
className:
|
|
18948
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12__["createElement"]("div", {
|
|
18949
|
+
className: classnames__WEBPACK_IMPORTED_MODULE_13___default()(prefixCls, className, {
|
|
18824
18950
|
nowrap: !wrap
|
|
18825
18951
|
}, {
|
|
18826
18952
|
'sogou-row': isSogou
|
|
18827
18953
|
}),
|
|
18828
18954
|
style: styleString
|
|
18829
|
-
},
|
|
18830
|
-
return /*#__PURE__*/
|
|
18955
|
+
}, react__WEBPACK_IMPORTED_MODULE_12__["Children"].map(children, function (child) {
|
|
18956
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_12__["cloneElement"](child, {
|
|
18831
18957
|
winWidth: winWidth
|
|
18832
18958
|
});
|
|
18833
18959
|
}));
|
|
@@ -29079,9 +29205,9 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
29079
29205
|
onFocus: handleFocus,
|
|
29080
29206
|
onBlur: handleBlur,
|
|
29081
29207
|
readOnly: !isShowSearch || !!disabled
|
|
29082
|
-
})), singleVal && !searchValue
|
|
29208
|
+
})), singleVal && !searchValue ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.createElement("span", {
|
|
29083
29209
|
className: "".concat(selectPrefixCls, "-selection-item")
|
|
29084
|
-
}, singleVal), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.createElement("span", {
|
|
29210
|
+
}, singleVal) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.createElement("span", {
|
|
29085
29211
|
className: "".concat(selectPrefixCls, "-placeholder"),
|
|
29086
29212
|
style: hiddenStyle
|
|
29087
29213
|
}, placeholder), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.createElement("span", {
|