@kdcloudjs/kdesign 1.7.18 → 1.7.20

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.
Files changed (88) hide show
  1. package/CHANGELOG.md +67 -0
  2. package/dist/kdesign-complete.less +362 -244
  3. package/dist/kdesign.css +270 -239
  4. package/dist/kdesign.css.map +1 -1
  5. package/dist/kdesign.js +716 -788
  6. package/dist/kdesign.js.map +1 -1
  7. package/dist/kdesign.min.css +2 -2
  8. package/dist/kdesign.min.js +6 -6
  9. package/dist/kdesign.min.js.map +1 -1
  10. package/es/button/style/token.less +1 -0
  11. package/es/carousel/style/index.css +4 -0
  12. package/es/carousel/style/index.less +31 -5
  13. package/es/cascader/cascader.js +4 -2
  14. package/es/checkbox/checkbox.js +5 -5
  15. package/es/checkbox/style/index.css +2 -0
  16. package/es/checkbox/style/index.less +2 -0
  17. package/es/checkbox/style/token.less +1 -1
  18. package/es/city-picker/city-picker.d.ts +3 -23
  19. package/es/city-picker/city-picker.js +351 -124
  20. package/es/city-picker/interface.d.ts +57 -0
  21. package/es/city-picker/interface.js +3 -0
  22. package/es/city-picker/option.d.ts +4 -0
  23. package/es/city-picker/option.js +42 -0
  24. package/es/city-picker/style/index.css +264 -239
  25. package/es/city-picker/style/index.less +262 -218
  26. package/es/city-picker/style/mixin.less +26 -3
  27. package/es/city-picker/style/token.less +42 -14
  28. package/es/collapse/collapse.d.ts +1 -1
  29. package/es/config-provider/compDefaultProps.d.ts +13 -0
  30. package/es/config-provider/compDefaultProps.js +13 -0
  31. package/es/dropdown/dropdown.d.ts +1 -0
  32. package/es/dropdown/dropdown.js +7 -2
  33. package/es/input/style/token.less +2 -8
  34. package/es/upload/upload.js +87 -63
  35. package/lib/button/style/token.less +1 -0
  36. package/lib/carousel/style/index.css +4 -0
  37. package/lib/carousel/style/index.less +31 -5
  38. package/lib/cascader/cascader.js +4 -2
  39. package/lib/checkbox/checkbox.js +4 -4
  40. package/lib/checkbox/style/index.css +2 -0
  41. package/lib/checkbox/style/index.less +2 -0
  42. package/lib/checkbox/style/token.less +1 -1
  43. package/lib/city-picker/city-picker.d.ts +3 -23
  44. package/lib/city-picker/city-picker.js +350 -123
  45. package/lib/city-picker/interface.d.ts +57 -0
  46. package/lib/city-picker/interface.js +11 -0
  47. package/lib/city-picker/option.d.ts +4 -0
  48. package/lib/city-picker/option.js +55 -0
  49. package/lib/city-picker/style/index.css +264 -239
  50. package/lib/city-picker/style/index.less +262 -218
  51. package/lib/city-picker/style/mixin.less +26 -3
  52. package/lib/city-picker/style/token.less +42 -14
  53. package/lib/collapse/collapse.d.ts +1 -1
  54. package/lib/config-provider/compDefaultProps.d.ts +13 -0
  55. package/lib/config-provider/compDefaultProps.js +13 -0
  56. package/lib/dropdown/dropdown.d.ts +1 -0
  57. package/lib/dropdown/dropdown.js +7 -2
  58. package/lib/input/style/token.less +2 -8
  59. package/lib/upload/upload.js +86 -62
  60. package/package.json +1 -1
  61. package/es/city-picker/city-group.d.ts +0 -8
  62. package/es/city-picker/city-group.js +0 -38
  63. package/es/city-picker/city-list.d.ts +0 -12
  64. package/es/city-picker/city-list.js +0 -55
  65. package/es/city-picker/city-panel-item.d.ts +0 -13
  66. package/es/city-picker/city-panel-item.js +0 -22
  67. package/es/city-picker/city-panel.d.ts +0 -17
  68. package/es/city-picker/city-panel.js +0 -153
  69. package/es/city-picker/city-search-panel.d.ts +0 -9
  70. package/es/city-picker/city-search-panel.js +0 -44
  71. package/es/city-picker/no-data.d.ts +0 -3
  72. package/es/city-picker/no-data.js +0 -18
  73. package/es/city-picker/utils/grouping.d.ts +0 -7
  74. package/es/city-picker/utils/grouping.js +0 -24
  75. package/lib/city-picker/city-group.d.ts +0 -8
  76. package/lib/city-picker/city-group.js +0 -51
  77. package/lib/city-picker/city-list.d.ts +0 -12
  78. package/lib/city-picker/city-list.js +0 -68
  79. package/lib/city-picker/city-panel-item.d.ts +0 -13
  80. package/lib/city-picker/city-panel-item.js +0 -35
  81. package/lib/city-picker/city-panel.d.ts +0 -17
  82. package/lib/city-picker/city-panel.js +0 -166
  83. package/lib/city-picker/city-search-panel.d.ts +0 -9
  84. package/lib/city-picker/city-search-panel.js +0 -57
  85. package/lib/city-picker/no-data.d.ts +0 -3
  86. package/lib/city-picker/no-data.js +0 -31
  87. package/lib/city-picker/utils/grouping.d.ts +0 -7
  88. package/lib/city-picker/utils/grouping.js +0 -30
package/dist/kdesign.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @kdcloudjs/kdesign v1.7.17
3
+ * @kdcloudjs/kdesign v1.7.19
4
4
  *
5
5
  * Copyright 2020-present, Kingdee, Inc.
6
6
  * All rights reserved.
@@ -6542,8 +6542,10 @@ var Cascader = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_17___default.a.forwar
6542
6542
  var value = _ref5[fieldNames.value];
6543
6543
  return value;
6544
6544
  });
6545
- setCurrentOptions(selectedOptions);
6546
- props.value === undefined && setValue(selectedValue);
6545
+ if (typeof props.value === 'undefined') {
6546
+ setCurrentOptions(selectedOptions);
6547
+ setValue(selectedValue);
6548
+ }
6547
6549
  props.onChange && props.onChange(selectedValue, selectedOptions);
6548
6550
  };
6549
6551
  var onVisibleChange = function onVisibleChange(visible) {
@@ -7101,20 +7103,20 @@ var InternalCheckbox = function InternalCheckbox(props, ref) {
7101
7103
  var getIndeterminate = function getIndeterminate() {
7102
7104
  return selected ? false : indeterminate;
7103
7105
  };
7104
- var getDefaultClassName = classnames__WEBPACK_IMPORTED_MODULE_7___default()(className, (_classNames = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(checkboxPrefixCls), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(checkboxPrefixCls, "-no-child"), !children), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(checkboxPrefixCls, "-").concat(mergedSize), true && !!children), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType, "-disabled"), mergedDisabled), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "checked", selected), _classNames));
7105
- var getSquareClassName = classnames__WEBPACK_IMPORTED_MODULE_7___default()(className, (_classNames2 = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames2, "".concat(checkboxPrefixCls), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames2, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames2, "".concat(checkboxPrefixCls, "-").concat(mergedSize), true && !!children), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames2, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType, "-disabled"), mergedDisabled), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames2, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType, "-checked"), selected && !mergedDisabled), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames2, "checked", selected), _classNames2));
7106
+ var getDefaultClassName = classnames__WEBPACK_IMPORTED_MODULE_7___default()(className, (_classNames = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(checkboxPrefixCls), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(checkboxPrefixCls, "-no-child"), !children), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(checkboxPrefixCls, "-").concat(mergedSize), !!children), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType, "-disabled"), mergedDisabled), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "checked", selected), _classNames));
7107
+ var getSquareClassName = classnames__WEBPACK_IMPORTED_MODULE_7___default()(className, (_classNames2 = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames2, "".concat(checkboxPrefixCls), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames2, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames2, "".concat(checkboxPrefixCls, "-").concat(mergedSize), !!children), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames2, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType, "-disabled"), mergedDisabled), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames2, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType, "-checked"), selected && !mergedDisabled), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames2, "checked", selected), _classNames2));
7106
7108
  var getRootClassName = isDefaultType() ? getDefaultClassName : getSquareClassName;
7107
7109
  var inputClassName = classnames__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, "".concat(checkboxPrefixCls, "-input"), true));
7108
7110
  var checkedWrapperClassName = classnames__WEBPACK_IMPORTED_MODULE_7___default()((_classNames4 = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames4, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType, "-no-child"), !children), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames4, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType, "-wrapper"), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames4, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType, "-wrapper-size"), !!children), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames4, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType, "-margin"), !!children), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames4, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType, "-checked"), selected), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames4, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType, "-indeterminate"), getIndeterminate()), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames4, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType, "-disabled"), mergedDisabled && !selected), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames4, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType, "-checked-disabled"), mergedDisabled && selected), _classNames4));
7109
7111
  var triangleClassName = classnames__WEBPACK_IMPORTED_MODULE_7___default()((_classNames5 = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames5, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType, "-triangle"), !selected), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames5, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType, "-triangle-checked"), selected), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames5, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType, "-triangle-disabled"), mergedDisabled), _classNames5));
7110
7112
  var innerIconClassName = classnames__WEBPACK_IMPORTED_MODULE_7___default()(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, "".concat(checkboxPrefixCls, "-").concat(mergedCheckboxType, "-inner"), true));
7111
- var handleChange = Object(react__WEBPACK_IMPORTED_MODULE_6__["useCallback"])(function (e) {
7113
+ var handleChange = function handleChange(e) {
7112
7114
  onChange && onChange(e);
7113
7115
  (checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.onCheckboxGroupChange) && (checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.onCheckboxGroupChange(value, e.target.checked, e));
7114
7116
  if (!(checkboxGroup !== null && checkboxGroup !== void 0 && checkboxGroup.isControlled)) {
7115
7117
  setSelected(e.target.checked);
7116
7118
  }
7117
- }, [onChange]);
7119
+ };
7118
7120
  Object(react__WEBPACK_IMPORTED_MODULE_6__["useEffect"])(function () {
7119
7121
  lodash_isBoolean__WEBPACK_IMPORTED_MODULE_11___default()(checked) && checked !== selected && setSelected(checked);
7120
7122
  }, [checked, selected]);
@@ -7396,210 +7398,88 @@ __webpack_require__.r(__webpack_exports__);
7396
7398
 
7397
7399
  /***/ }),
7398
7400
 
7399
- /***/ "./components/city-picker/city-group.tsx":
7400
- /*!***********************************************!*\
7401
- !*** ./components/city-picker/city-group.tsx ***!
7402
- \***********************************************/
7401
+ /***/ "./components/city-picker/city-picker.tsx":
7402
+ /*!************************************************!*\
7403
+ !*** ./components/city-picker/city-picker.tsx ***!
7404
+ \************************************************/
7403
7405
  /*! exports provided: default */
7404
7406
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
7405
7407
 
7406
7408
  "use strict";
7407
7409
  __webpack_require__.r(__webpack_exports__);
7408
- /* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.map.js */ "./node_modules/core-js/modules/es.array.map.js");
7409
- /* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_0__);
7410
- /* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
7411
- /* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_1__);
7412
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
7413
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
7414
- /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
7415
- /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);
7416
- /* harmony import */ var _config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../config-provider/ConfigContext */ "./components/config-provider/ConfigContext.tsx");
7417
-
7418
-
7419
-
7420
-
7421
-
7422
- var CityGroup = function CityGroup(props) {
7423
- var _useContext = Object(react__WEBPACK_IMPORTED_MODULE_2__["useContext"])(_config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_4__["default"]),
7424
- getPrefixCls = _useContext.getPrefixCls,
7425
- prefixCls = _useContext.prefixCls;
7426
- var groups = props.groups,
7427
- _props$activedIndex = props.activedIndex,
7428
- current = _props$activedIndex === void 0 ? 0 : _props$activedIndex,
7429
- changeIndex = props.changeIndex;
7430
- var cityPickerPrefixCls = getPrefixCls(prefixCls, 'city-picker');
7431
- var containerCls = classnames__WEBPACK_IMPORTED_MODULE_3___default()("".concat(cityPickerPrefixCls, "-group-container"));
7432
- var handleClick = function handleClick(groupIndex) {
7433
- changeIndex && changeIndex(groupIndex);
7434
- };
7435
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("div", {
7436
- className: containerCls
7437
- }, groups.map(function (item, index) {
7438
- var itemCls = classnames__WEBPACK_IMPORTED_MODULE_3___default()("".concat(cityPickerPrefixCls, "-group-item"), {
7439
- active: current === index,
7440
- last: index === groups.length - 1
7441
- });
7442
- var handleTitleClick = function handleTitleClick() {
7443
- handleClick(index);
7444
- };
7445
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("div", {
7446
- className: itemCls,
7447
- title: item,
7448
- key: "".concat(item, "_").concat(index),
7449
- onClick: handleTitleClick
7450
- }, item);
7451
- }));
7452
- };
7453
- /* harmony default export */ __webpack_exports__["default"] = (CityGroup);
7410
+ /* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "./node_modules/@babel/runtime/helpers/toConsumableArray.js");
7411
+ /* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);
7412
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js");
7413
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__);
7414
+ /* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/slicedToArray.js");
7415
+ /* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__);
7416
+ /* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
7417
+ /* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_3__);
7418
+ /* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.symbol.description.js */ "./node_modules/core-js/modules/es.symbol.description.js");
7419
+ /* harmony import */ var core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_4__);
7420
+ /* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
7421
+ /* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_5__);
7422
+ /* harmony import */ var core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.array.find.js */ "./node_modules/core-js/modules/es.array.find.js");
7423
+ /* harmony import */ var core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_find_js__WEBPACK_IMPORTED_MODULE_6__);
7424
+ /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
7425
+ /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_7__);
7426
+ /* harmony import */ var core_js_modules_es_regexp_constructor_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ "./node_modules/core-js/modules/es.regexp.constructor.js");
7427
+ /* harmony import */ var core_js_modules_es_regexp_constructor_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_constructor_js__WEBPACK_IMPORTED_MODULE_8__);
7428
+ /* 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");
7429
+ /* 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__);
7430
+ /* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ "./node_modules/core-js/modules/es.regexp.to-string.js");
7431
+ /* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_10__);
7432
+ /* harmony import */ var core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.array.join.js */ "./node_modules/core-js/modules/es.array.join.js");
7433
+ /* harmony import */ var core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_join_js__WEBPACK_IMPORTED_MODULE_11__);
7434
+ /* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.array.map.js */ "./node_modules/core-js/modules/es.array.map.js");
7435
+ /* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_12__);
7436
+ /* harmony import */ var core_js_modules_es_string_split_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.string.split.js */ "./node_modules/core-js/modules/es.string.split.js");
7437
+ /* 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__);
7438
+ /* 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");
7439
+ /* 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__);
7440
+ /* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.object.keys.js */ "./node_modules/core-js/modules/es.object.keys.js");
7441
+ /* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_15__);
7442
+ /* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.array.filter.js */ "./node_modules/core-js/modules/es.array.filter.js");
7443
+ /* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_16__);
7444
+ /* 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");
7445
+ /* 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__);
7446
+ /* 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");
7447
+ /* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_18__);
7448
+ /* harmony import */ var core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptors.js");
7449
+ /* harmony import */ var core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_19__);
7450
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! react */ "react");
7451
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_20__);
7452
+ /* harmony import */ var _utils_hooks__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../_utils/hooks */ "./components/_utils/hooks.tsx");
7453
+ /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
7454
+ /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_22__);
7455
+ /* harmony import */ var _config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../config-provider/ConfigContext */ "./components/config-provider/ConfigContext.tsx");
7456
+ /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../_utils */ "./components/_utils/index.ts");
7457
+ /* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../index */ "./components/index.tsx");
7458
+ /* harmony import */ var _utils_usePopper__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../_utils/usePopper */ "./components/_utils/usePopper.tsx");
7459
+ /* harmony import */ var _option__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./option */ "./components/city-picker/option.tsx");
7460
+ /* harmony import */ var lodash_escapeRegExp__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! lodash/escapeRegExp */ "./node_modules/lodash/escapeRegExp.js");
7461
+ /* harmony import */ var lodash_escapeRegExp__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(lodash_escapeRegExp__WEBPACK_IMPORTED_MODULE_28__);
7454
7462
 
7455
- /***/ }),
7456
7463
 
7457
- /***/ "./components/city-picker/city-list.tsx":
7458
- /*!**********************************************!*\
7459
- !*** ./components/city-picker/city-list.tsx ***!
7460
- \**********************************************/
7461
- /*! exports provided: default */
7462
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
7463
-
7464
- "use strict";
7465
- __webpack_require__.r(__webpack_exports__);
7466
- /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
7467
- /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_0__);
7468
- /* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.array.map.js */ "./node_modules/core-js/modules/es.array.map.js");
7469
- /* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_1__);
7470
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
7471
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
7472
- /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
7473
- /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);
7474
- /* harmony import */ var _config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../config-provider/ConfigContext */ "./components/config-provider/ConfigContext.tsx");
7475
- /* harmony import */ var _city_panel_item__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./city-panel-item */ "./components/city-picker/city-panel-item.tsx");
7476
- /* harmony import */ var _no_data__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./no-data */ "./components/city-picker/no-data.tsx");
7477
7464
 
7465
+ 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; }
7466
+ 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_1___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; }
7478
7467
 
7479
7468
 
7480
7469
 
7481
7470
 
7482
7471
 
7483
7472
 
7484
- var CityList = function CityList(props) {
7485
- var _useContext = Object(react__WEBPACK_IMPORTED_MODULE_2__["useContext"])(_config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_4__["default"]),
7486
- getPrefixCls = _useContext.getPrefixCls,
7487
- prefixCls = _useContext.prefixCls;
7488
- var groupKeys = props.groupKeys,
7489
- cityList = props.cityList,
7490
- handleSelect = props.onSelect;
7491
- var cityPickerPrefixCls = getPrefixCls(prefixCls, 'city-picker');
7492
- var tableCls = classnames__WEBPACK_IMPORTED_MODULE_3___default()("".concat(cityPickerPrefixCls, "-city-table"));
7493
- var tableGroupCls = classnames__WEBPACK_IMPORTED_MODULE_3___default()("".concat(cityPickerPrefixCls, "-city-table-group"));
7494
- var keyCls = classnames__WEBPACK_IMPORTED_MODULE_3___default()("".concat(cityPickerPrefixCls, "-city-table-key"));
7495
- var itemContainerCls = classnames__WEBPACK_IMPORTED_MODULE_3___default()("".concat(cityPickerPrefixCls, "-city-table-item-container"));
7496
- var hasData = cityList && cityList.some(function (citys) {
7497
- return citys.length > 0;
7498
- });
7499
- if (!hasData) {
7500
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("div", {
7501
- className: tableCls
7502
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(_no_data__WEBPACK_IMPORTED_MODULE_6__["default"], null));
7503
- }
7504
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("div", {
7505
- className: tableCls
7506
- }, groupKeys && groupKeys.length > 0 && groupKeys.map(function (key, index) {
7507
- var list = cityList[index] || [];
7508
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("div", {
7509
- className: tableGroupCls,
7510
- key: key
7511
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("div", {
7512
- className: keyCls
7513
- }, key), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("div", {
7514
- className: itemContainerCls
7515
- }, list.map(function (city) {
7516
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(_city_panel_item__WEBPACK_IMPORTED_MODULE_5__["default"], {
7517
- key: city.id,
7518
- city: city,
7519
- onSelect: handleSelect
7520
- });
7521
- })));
7522
- }), !groupKeys && cityList && cityList.map(function (citys) {
7523
- return citys.map(function (city) {
7524
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(_city_panel_item__WEBPACK_IMPORTED_MODULE_5__["default"], {
7525
- key: city.id,
7526
- city: city,
7527
- onSelect: handleSelect
7528
- });
7529
- });
7530
- }));
7531
- };
7532
- /* harmony default export */ __webpack_exports__["default"] = (CityList);
7533
7473
 
7534
- /***/ }),
7535
7474
 
7536
- /***/ "./components/city-picker/city-panel-item.tsx":
7537
- /*!****************************************************!*\
7538
- !*** ./components/city-picker/city-panel-item.tsx ***!
7539
- \****************************************************/
7540
- /*! exports provided: default */
7541
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
7542
7475
 
7543
- "use strict";
7544
- __webpack_require__.r(__webpack_exports__);
7545
- /* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ "./node_modules/core-js/modules/es.function.name.js");
7546
- /* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_0__);
7547
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
7548
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
7549
- /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
7550
- /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__);
7551
- /* harmony import */ var _config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../config-provider/ConfigContext */ "./components/config-provider/ConfigContext.tsx");
7552
7476
 
7553
7477
 
7554
7478
 
7555
7479
 
7556
- var CityPanelItem = function CityPanelItem(props) {
7557
- var _useContext = Object(react__WEBPACK_IMPORTED_MODULE_1__["useContext"])(_config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_3__["default"]),
7558
- getPrefixCls = _useContext.getPrefixCls,
7559
- prefixCls = _useContext.prefixCls;
7560
- var city = props.city,
7561
- onSelect = props.onSelect;
7562
- var cityPickerPrefixCls = getPrefixCls(prefixCls, 'city-picker');
7563
- var cls = classnames__WEBPACK_IMPORTED_MODULE_2___default()("".concat(cityPickerPrefixCls, "-city-table-cell"));
7564
- var handleCitySelect = function handleCitySelect() {
7565
- onSelect === null || onSelect === void 0 ? void 0 : onSelect(city);
7566
- };
7567
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement("div", {
7568
- className: cls,
7569
- key: city.id,
7570
- title: city.name,
7571
- onClick: handleCitySelect
7572
- }, city.name);
7573
- };
7574
- /* harmony default export */ __webpack_exports__["default"] = (CityPanelItem);
7575
7480
 
7576
- /***/ }),
7577
7481
 
7578
- /***/ "./components/city-picker/city-panel.tsx":
7579
- /*!***********************************************!*\
7580
- !*** ./components/city-picker/city-panel.tsx ***!
7581
- \***********************************************/
7582
- /*! exports provided: default */
7583
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
7584
7482
 
7585
- "use strict";
7586
- __webpack_require__.r(__webpack_exports__);
7587
- /* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/slicedToArray.js");
7588
- /* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0__);
7589
- /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
7590
- /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_1__);
7591
- /* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
7592
- /* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_2__);
7593
- /* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
7594
- /* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_3__);
7595
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ "react");
7596
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);
7597
- /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
7598
- /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_5__);
7599
- /* harmony import */ var _config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../config-provider/ConfigContext */ "./components/config-provider/ConfigContext.tsx");
7600
- /* harmony import */ var _city_group__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./city-group */ "./components/city-picker/city-group.tsx");
7601
- /* harmony import */ var _city_list__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./city-list */ "./components/city-picker/city-list.tsx");
7602
- /* harmony import */ var _utils_grouping__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils/grouping */ "./components/city-picker/utils/grouping.ts");
7603
7483
 
7604
7484
 
7605
7485
 
@@ -7610,413 +7490,373 @@ __webpack_require__.r(__webpack_exports__);
7610
7490
 
7611
7491
 
7612
7492
 
7613
- var CityPanel = function CityPanel(_ref) {
7614
- var groups = _ref.groups,
7615
- commons = _ref.commons,
7616
- cityList = _ref.cityList,
7617
- onSelect = _ref.onSelect;
7618
- var _useContext = Object(react__WEBPACK_IMPORTED_MODULE_4__["useContext"])(_config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_6__["default"]),
7493
+ var tabsData = [{
7494
+ id: 'domestic',
7495
+ name: '国内'
7496
+ }, {
7497
+ id: 'foreign',
7498
+ name: '国际/中国港澳台'
7499
+ }];
7500
+ var InternalSelect = function InternalSelect(props, ref) {
7501
+ var _classNames3, _classNames5;
7502
+ var _useContext = Object(react__WEBPACK_IMPORTED_MODULE_20__["useContext"])(_config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_23__["default"]),
7619
7503
  getPrefixCls = _useContext.getPrefixCls,
7620
7504
  prefixCls = _useContext.prefixCls,
7621
- globalLocale = _useContext.locale;
7622
- var cityPickerLang = globalLocale.getCompLangMsg({
7623
- componentName: 'CityPicker'
7624
- });
7625
- var _useState = Object(react__WEBPACK_IMPORTED_MODULE_4__["useState"])('domestic'),
7626
- _useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_useState, 2),
7627
- activedIndex = _useState2[0],
7628
- setActivedIndex = _useState2[1];
7629
- var _useState3 = Object(react__WEBPACK_IMPORTED_MODULE_4__["useState"])({
7630
- domestic: [],
7631
- foreign: []
7505
+ userDefaultProps = _useContext.compDefaultProps;
7506
+ var selectProps = Object(_utils__WEBPACK_IMPORTED_MODULE_24__["getCompProps"])('CityPicker', userDefaultProps, props);
7507
+ var type = selectProps.type,
7508
+ size = selectProps.size,
7509
+ value = selectProps.value,
7510
+ className = selectProps.className,
7511
+ defaultOpen = selectProps.defaultOpen,
7512
+ disabled = selectProps.disabled,
7513
+ borderType = selectProps.borderType,
7514
+ _selectProps$showArro = selectProps.showArrow,
7515
+ showArrow = _selectProps$showArro === void 0 ? true : _selectProps$showArro,
7516
+ allowClear = selectProps.allowClear,
7517
+ customPrefixcls = selectProps.prefixCls,
7518
+ onFocus = selectProps.onFocus,
7519
+ onBlur = selectProps.onBlur,
7520
+ onClear = selectProps.onClear,
7521
+ onVisibleChange = selectProps.onVisibleChange,
7522
+ onChange = selectProps.onChange,
7523
+ onSearch = selectProps.onSearch,
7524
+ defaultValue = selectProps.defaultValue,
7525
+ placeholder = selectProps.placeholder,
7526
+ _selectProps$dropdown = selectProps.dropdownStyle,
7527
+ dropdownStyle = _selectProps$dropdown === void 0 ? {} : _selectProps$dropdown,
7528
+ style = selectProps.style,
7529
+ clearIcon = selectProps.clearIcon,
7530
+ loading = selectProps.loading,
7531
+ showDescription = selectProps.showDescription,
7532
+ description = selectProps.description,
7533
+ optionHighlightProps = selectProps.optionHighlightProps,
7534
+ _selectProps$popperSt = selectProps.popperStyle,
7535
+ popperStyle = _selectProps$popperSt === void 0 ? {} : _selectProps$popperSt,
7536
+ _selectProps$commonLi = selectProps.commonList,
7537
+ commonList = _selectProps$commonLi === void 0 ? [] : _selectProps$commonLi,
7538
+ _selectProps$domestic = selectProps.domesticList,
7539
+ domesticList = _selectProps$domestic === void 0 ? [] : _selectProps$domestic,
7540
+ _selectProps$foreignL = selectProps.foreignList,
7541
+ foreignList = _selectProps$foreignL === void 0 ? [] : _selectProps$foreignL,
7542
+ itemRender = selectProps.itemRender;
7543
+ var _useMergedState = Object(_utils_hooks__WEBPACK_IMPORTED_MODULE_21__["useMergedState"])(undefined, {
7544
+ value: value,
7545
+ defaultValue: defaultValue
7632
7546
  }),
7633
- _useState4 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_useState3, 2),
7634
- cityGroups = _useState4[0],
7635
- setCityGroups = _useState4[1];
7636
- var _useState5 = Object(react__WEBPACK_IMPORTED_MODULE_4__["useState"])(null),
7637
- _useState6 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_useState5, 2),
7638
- groupKeys = _useState6[0],
7639
- setGroupKeys = _useState6[1];
7640
- var _useState7 = Object(react__WEBPACK_IMPORTED_MODULE_4__["useState"])(0),
7641
- _useState8 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_useState7, 2),
7642
- activedGroupIndex = _useState8[0],
7643
- setActivedGroupIndex = _useState8[1];
7644
- var _useState9 = Object(react__WEBPACK_IMPORTED_MODULE_4__["useState"])([commons ? commons.domestic : []]),
7645
- _useState10 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_useState9, 2),
7646
- list = _useState10[0],
7647
- setList = _useState10[1];
7648
- Object(react__WEBPACK_IMPORTED_MODULE_4__["useEffect"])(function () {
7649
- if (!groups) {
7650
- return;
7651
- }
7652
- var domestic = groups.domestic,
7653
- foreign = groups.foreign;
7654
- domestic = Object(_utils_grouping__WEBPACK_IMPORTED_MODULE_9__["default"])(domestic);
7655
- foreign = Object(_utils_grouping__WEBPACK_IMPORTED_MODULE_9__["default"])(foreign);
7656
- if (commons !== null && commons !== void 0 && commons.domestic) {
7657
- domestic.unshift(cityPickerLang.common);
7658
- }
7659
- if (commons !== null && commons !== void 0 && commons.foreign) {
7660
- foreign.unshift(cityPickerLang.common);
7661
- }
7662
- setCityGroups({
7663
- domestic: domestic,
7664
- foreign: foreign
7665
- });
7666
- }, [groups, commons]);
7667
- Object(react__WEBPACK_IMPORTED_MODULE_4__["useEffect"])(function () {
7668
- if (commons) {
7669
- setList([commons[activedIndex]]);
7670
- } else {
7671
- var _groups = cityGroups[activedIndex];
7672
- var currentGroup = _groups[0];
7673
- var currentGroups = (currentGroup || '').split('');
7674
- var newList = [];
7675
- var currentList = cityList[activedIndex];
7676
- currentGroups.forEach(function (character) {
7677
- var temp = currentList[character] ? currentList[character] : [];
7678
- newList.push(temp);
7679
- });
7680
- setList(newList);
7681
- setGroupKeys(currentGroups);
7682
- }
7683
- setActivedGroupIndex(0);
7684
- }, [activedIndex, cityGroups, groups, cityList]);
7685
- var cityPickerPrefixCls = getPrefixCls(prefixCls, 'city-picker');
7686
- var containerCls = classnames__WEBPACK_IMPORTED_MODULE_5___default()("".concat(cityPickerPrefixCls, "-panel-container"));
7687
- var headerCls = classnames__WEBPACK_IMPORTED_MODULE_5___default()("".concat(cityPickerPrefixCls, "-header"));
7688
- var contentContainerCls = classnames__WEBPACK_IMPORTED_MODULE_5___default()("".concat(cityPickerPrefixCls, "-content-container"));
7689
- var domesticCls = classnames__WEBPACK_IMPORTED_MODULE_5___default()("".concat(cityPickerPrefixCls, "-tab-item ").concat(cityPickerPrefixCls, "-header-domestic"), {
7690
- active: activedIndex === 'domestic'
7691
- });
7692
- var internationalCls = classnames__WEBPACK_IMPORTED_MODULE_5___default()("".concat(cityPickerPrefixCls, "-tab-item ").concat(cityPickerPrefixCls, "-header-internation"), {
7693
- active: activedIndex === 'foreign'
7694
- });
7695
- var handleDomesticClick = function handleDomesticClick() {
7696
- if (activedIndex === 'domestic') return;
7697
- setActivedIndex('domestic');
7698
- };
7699
- var handleInternationClick = function handleInternationClick() {
7700
- if (activedIndex === 'foreign') return;
7701
- setActivedIndex('foreign');
7547
+ _useMergedState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_useMergedState, 2),
7548
+ initValue = _useMergedState2[0],
7549
+ setInitValue = _useMergedState2[1];
7550
+ var innerRef = Object(react__WEBPACK_IMPORTED_MODULE_20__["useRef"])();
7551
+ var selectRef = ref || innerRef;
7552
+ var searchRef = Object(react__WEBPACK_IMPORTED_MODULE_20__["useRef"])(null); // 搜索框ref
7553
+ var selectionRef = Object(react__WEBPACK_IMPORTED_MODULE_20__["useRef"])(null);
7554
+ var clearRef = Object(react__WEBPACK_IMPORTED_MODULE_20__["useRef"])(null);
7555
+ var _useState = Object(react__WEBPACK_IMPORTED_MODULE_20__["useState"])(typeof props.visible === 'undefined' ? !!defaultOpen : !!props.visible),
7556
+ _useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_useState, 2),
7557
+ optionShow = _useState2[0],
7558
+ setOptionShow = _useState2[1];
7559
+ var _useState3 = Object(react__WEBPACK_IMPORTED_MODULE_20__["useState"])(''),
7560
+ _useState4 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_useState3, 2),
7561
+ searchValue = _useState4[0],
7562
+ setSearchValue = _useState4[1];
7563
+ var _useState5 = Object(react__WEBPACK_IMPORTED_MODULE_20__["useState"])(false),
7564
+ _useState6 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_useState5, 2),
7565
+ focusd = _useState6[0],
7566
+ setFocusd = _useState6[1];
7567
+ var _useState7 = Object(react__WEBPACK_IMPORTED_MODULE_20__["useState"])(null),
7568
+ _useState8 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_useState7, 2),
7569
+ seletedCity = _useState8[0],
7570
+ setSeletedCity = _useState8[1];
7571
+ var _useState9 = Object(react__WEBPACK_IMPORTED_MODULE_20__["useState"])('domestic'),
7572
+ _useState10 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2___default()(_useState9, 2),
7573
+ tabsValue = _useState10[0],
7574
+ setTabsValue = _useState10[1];
7575
+ var isDomestic = function isDomestic(type) {
7576
+ return type === 'domestic';
7702
7577
  };
7578
+ var selectPrefixCls = getPrefixCls(prefixCls, 'city-picker', customPrefixcls);
7579
+ var cityPickerCls = classnames__WEBPACK_IMPORTED_MODULE_22___default()(selectPrefixCls, className, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, "".concat(selectPrefixCls, "-visible"), optionShow));
7580
+ var selectionCls = classnames__WEBPACK_IMPORTED_MODULE_22___default()(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, "".concat(selectPrefixCls, "-selector"), true));
7703
7581
 
7704
- /**
7705
- * 分组变换事件
7706
- * @param index 分组索引
7707
- */
7708
- var handleGroupChange = function handleGroupChange(index) {
7709
- if (!cityList) {
7710
- return;
7582
+ // 公共样式
7583
+ 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));
7584
+ Object(react__WEBPACK_IMPORTED_MODULE_20__["useEffect"])(function () {
7585
+ if (typeof value === 'undefined') return;
7586
+ 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));
7587
+ var city = cityList.find(function (city) {
7588
+ return city.id === value;
7589
+ });
7590
+ if (city) {
7591
+ setSeletedCity(city);
7711
7592
  }
7712
- var groups = cityGroups[activedIndex];
7713
- var currentGroup = groups[index];
7714
- if (commons && currentGroup === cityPickerLang.common) {
7715
- setList([commons[activedIndex] || []]);
7716
- setGroupKeys(null);
7717
- setActivedGroupIndex(index);
7718
- return;
7593
+ }, [commonList, domesticList, foreignList, value]);
7594
+ Object(react__WEBPACK_IMPORTED_MODULE_20__["useEffect"])(function () {
7595
+ if (typeof props.visible !== 'undefined') {
7596
+ setOptionShow(props.visible);
7597
+ }
7598
+ }, [props.visible]);
7599
+ Object(react__WEBPACK_IMPORTED_MODULE_20__["useEffect"])(function () {
7600
+ if (optionShow === false) {
7601
+ handleClear();
7719
7602
  }
7720
- var currentGroups = (currentGroup || '').split('');
7721
- var newList = [];
7722
- var currentList = cityList[activedIndex];
7723
- currentGroups.forEach(function (character) {
7724
- var temp = currentList[character] ? currentList[character] : [];
7725
- newList.push(temp);
7603
+ }, [optionShow]);
7604
+ var handleFocus = Object(react__WEBPACK_IMPORTED_MODULE_20__["useCallback"])(function (e) {
7605
+ e.stopPropagation();
7606
+ setFocusd(true);
7607
+ onFocus && onFocus(e);
7608
+ }, [onFocus]);
7609
+ var handleBlur = Object(react__WEBPACK_IMPORTED_MODULE_20__["useCallback"])(function (e) {
7610
+ e.stopPropagation();
7611
+ setFocusd(false);
7612
+ onBlur && onBlur(e);
7613
+ }, [onBlur]);
7614
+ Object(react__WEBPACK_IMPORTED_MODULE_20__["useEffect"])(function () {
7615
+ selectionRef.current.addEventListener('mouseup', function (e) {
7616
+ var _e$target;
7617
+ 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;
7618
+ if (isCloseBtn) {
7619
+ e.stopPropagation();
7620
+ }
7726
7621
  });
7727
- setList(newList);
7728
- setGroupKeys(currentGroups);
7729
- setActivedGroupIndex(index);
7730
- };
7731
- var handleSelectCity = function handleSelectCity(city) {
7732
- onSelect === null || onSelect === void 0 ? void 0 : onSelect(city);
7733
- };
7734
- var isClassified = commons && commons.domestic && commons.foreign;
7735
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement("div", {
7736
- className: containerCls
7737
- }, isClassified && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement("div", {
7738
- className: headerCls
7739
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement("div", {
7740
- className: domesticCls,
7741
- onClick: handleDomesticClick
7742
- }, cityPickerLang.domestic), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement("div", {
7743
- className: internationalCls,
7744
- onClick: handleInternationClick
7745
- }, cityPickerLang.internation)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement("div", {
7746
- className: contentContainerCls
7747
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(_city_group__WEBPACK_IMPORTED_MODULE_7__["default"], {
7748
- groups: cityGroups[activedIndex],
7749
- activedIndex: activedGroupIndex,
7750
- changeIndex: handleGroupChange
7751
- }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(_city_list__WEBPACK_IMPORTED_MODULE_8__["default"], {
7752
- groupKeys: groupKeys,
7753
- cityList: list,
7754
- onSelect: handleSelectCity
7755
- })));
7756
- };
7757
- /* harmony default export */ __webpack_exports__["default"] = (CityPanel);
7758
-
7759
- /***/ }),
7760
-
7761
- /***/ "./components/city-picker/city-picker.tsx":
7762
- /*!************************************************!*\
7763
- !*** ./components/city-picker/city-picker.tsx ***!
7764
- \************************************************/
7765
- /*! exports provided: default */
7766
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
7767
-
7768
- "use strict";
7769
- __webpack_require__.r(__webpack_exports__);
7770
- /* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "./node_modules/@babel/runtime/helpers/toConsumableArray.js");
7771
- /* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__);
7772
- /* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/slicedToArray.js");
7773
- /* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__);
7774
- /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
7775
- /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_2__);
7776
- /* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
7777
- /* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_3__);
7778
- /* harmony import */ var core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.object.values.js */ "./node_modules/core-js/modules/es.object.values.js");
7779
- /* harmony import */ var core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_4__);
7780
- /* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ "./node_modules/core-js/modules/es.function.name.js");
7781
- /* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_5__);
7782
- /* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.array.filter.js */ "./node_modules/core-js/modules/es.array.filter.js");
7783
- /* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_6__);
7784
- /* harmony import */ var core_js_modules_es_string_starts_with_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.string.starts-with.js */ "./node_modules/core-js/modules/es.string.starts-with.js");
7785
- /* harmony import */ var core_js_modules_es_string_starts_with_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_starts_with_js__WEBPACK_IMPORTED_MODULE_7__);
7786
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react */ "react");
7787
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_8__);
7788
- /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
7789
- /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_9__);
7790
- /* harmony import */ var _config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../config-provider/ConfigContext */ "./components/config-provider/ConfigContext.tsx");
7791
- /* harmony import */ var _city_panel_item__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./city-panel-item */ "./components/city-picker/city-panel-item.tsx");
7792
- /* harmony import */ var _city_panel__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./city-panel */ "./components/city-picker/city-panel.tsx");
7793
- /* harmony import */ var _city_search_panel__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./city-search-panel */ "./components/city-picker/city-search-panel.tsx");
7794
- /* harmony import */ var _utils_usePopper__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../_utils/usePopper */ "./components/_utils/usePopper.tsx");
7795
-
7796
-
7797
-
7798
-
7799
-
7800
-
7801
-
7802
-
7803
-
7804
-
7622
+ }, []);
7805
7623
 
7624
+ // 输入框变化搜索内容
7625
+ var handleSearchChange = Object(react__WEBPACK_IMPORTED_MODULE_20__["useCallback"])(function (event) {
7626
+ var val = event.currentTarget.value;
7627
+ setOptionShow(true);
7628
+ setSearchValue(val);
7629
+ onSearch === null || onSearch === void 0 ? void 0 : onSearch(val);
7630
+ }, [onSearch]);
7806
7631
 
7632
+ // 清除搜索内容
7633
+ var handleClear = Object(react__WEBPACK_IMPORTED_MODULE_20__["useCallback"])(function () {
7634
+ if (searchRef.current) {
7635
+ searchRef.current.value = '';
7636
+ setSearchValue('');
7637
+ }
7638
+ }, [searchRef]);
7807
7639
 
7640
+ // 清空选择器内容
7641
+ var handleReset = function handleReset(e) {
7642
+ e.stopPropagation();
7643
+ onClear && onClear('');
7644
+ setInitValue('');
7645
+ setSeletedCity(null);
7646
+ setSearchValue('');
7647
+ onChange && onChange(undefined, '');
7648
+ };
7808
7649
 
7650
+ // 渲染后缀图标
7651
+ var renderSuffix = function renderSuffix() {
7652
+ var _classNames4;
7653
+ if (disabled) return null;
7654
+ var suffixIcon = selectProps.suffixIcon;
7655
+ var arrowIconCls = classnames__WEBPACK_IMPORTED_MODULE_22___default()((_classNames4 = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames4, "".concat(selectPrefixCls, "-icon-arrow"), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames4, "".concat(selectPrefixCls, "-icon-arrow-up"), optionShow), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames4, "".concat(selectPrefixCls, "-icon-arrow-down"), !optionShow), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames4, "".concat(selectPrefixCls, "-icon-arrow-focus"), optionShow), _classNames4));
7656
+ var iconShow = allowClear && !disabled && ((initValue !== null && initValue !== void 0 ? initValue : '') !== '' || searchValue);
7657
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_20___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_20___default.a.Fragment, null, iconShow && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_20___default.a.createElement("span", {
7658
+ onClick: handleReset,
7659
+ onMouseDown: function onMouseDown(e) {
7660
+ return e.preventDefault();
7661
+ },
7662
+ className: "".concat(selectPrefixCls, "-icon-clear"),
7663
+ ref: clearRef
7664
+ }, clearIcon || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_20___default.a.createElement(_index__WEBPACK_IMPORTED_MODULE_25__["Icon"], {
7665
+ type: "close-solid"
7666
+ })), showArrow && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_20___default.a.createElement("span", {
7667
+ className: arrowIconCls
7668
+ }, suffixIcon || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_20___default.a.createElement(_index__WEBPACK_IMPORTED_MODULE_25__["Icon"], {
7669
+ type: "arrow-down"
7670
+ })));
7671
+ };
7809
7672
 
7810
- var CityPicker = function CityPicker(_ref) {
7811
- var cityList = _ref.cityList,
7812
- className = _ref.className,
7813
- commons = _ref.commons,
7814
- disabled = _ref.disabled,
7815
- groups = _ref.groups,
7816
- inputClassName = _ref.inputClassName,
7817
- inputStyle = _ref.inputStyle,
7818
- placeholder = _ref.placeholder,
7819
- showTitle = _ref.showTitle,
7820
- style = _ref.style,
7821
- title = _ref.title;
7822
- var _useContext = Object(react__WEBPACK_IMPORTED_MODULE_8__["useContext"])(_config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_10__["default"]),
7823
- getPrefixCls = _useContext.getPrefixCls,
7824
- prefixCls = _useContext.prefixCls;
7825
- var _useState = Object(react__WEBPACK_IMPORTED_MODULE_8__["useState"])(''),
7826
- _useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1___default()(_useState, 2),
7827
- inputVal = _useState2[0],
7828
- setInputVal = _useState2[1];
7829
- var _useState3 = Object(react__WEBPACK_IMPORTED_MODULE_8__["useState"])(''),
7830
- _useState4 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1___default()(_useState3, 2),
7831
- additionalVal = _useState4[0],
7832
- setAdditionalVal = _useState4[1];
7833
- var _useState5 = Object(react__WEBPACK_IMPORTED_MODULE_8__["useState"])(false),
7834
- _useState6 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1___default()(_useState5, 2),
7835
- popperVisible = _useState6[0],
7836
- setPopperVisible = _useState6[1];
7837
- var inputRef = Object(react__WEBPACK_IMPORTED_MODULE_8__["useRef"])(null);
7838
- var allCity = Object(react__WEBPACK_IMPORTED_MODULE_8__["useRef"])([]);
7839
- Object(react__WEBPACK_IMPORTED_MODULE_8__["useEffect"])(function () {
7840
- if (!cityList) {
7841
- return;
7673
+ // 下拉列表为空时显示的内容
7674
+ var renderNotContent = function renderNotContent(msg) {
7675
+ var notFoundContent = selectProps.notFoundContent;
7676
+ var emptyContent = notFoundContent || msg;
7677
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_20___default.a.createElement("div", {
7678
+ className: "".concat(selectPrefixCls, "-dropdown-empty")
7679
+ }, emptyContent);
7680
+ };
7681
+ var getHighlightText = function getHighlightText(text, inputValue) {
7682
+ if (!inputValue || !text) return text;
7683
+ var regex = new RegExp(Array.isArray(inputValue) ? inputValue.map(function (item) {
7684
+ return "(".concat(lodash_escapeRegExp__WEBPACK_IMPORTED_MODULE_28___default()(item), ")");
7685
+ }).join('|') : "(".concat(lodash_escapeRegExp__WEBPACK_IMPORTED_MODULE_28___default()(inputValue), ")"), 'i');
7686
+ var strArr = text === null || text === void 0 ? void 0 : text.split(regex);
7687
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_20___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_20___default.a.Fragment, null, strArr === null || strArr === void 0 ? void 0 : strArr.map(function (item, index) {
7688
+ return regex !== null && regex !== void 0 && regex.test(item) ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_20___default.a.createElement("span", {
7689
+ key: index,
7690
+ className: "".concat(selectPrefixCls, "-highlight")
7691
+ }, item) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_20___default.a.createElement("span", {
7692
+ key: index
7693
+ }, item);
7694
+ }));
7695
+ };
7696
+ var handleOption = function handleOption(city) {
7697
+ handleVisibleChange(false);
7698
+ (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));
7699
+ if (typeof value === 'undefined') {
7700
+ setSeletedCity(city);
7701
+ setInitValue(city === null || city === void 0 ? void 0 : city.id);
7842
7702
  }
7843
- var domestic = cityList.domestic,
7844
- foreign = cityList.foreign;
7845
- allCity.current = [].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(Object.values(domestic)), _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(Object.values(foreign))).reduce(function (arr, current) {
7846
- return arr.concat(current);
7847
- }, []);
7848
- }, [cityList]);
7849
- var cityPickerPrefixCls = getPrefixCls(prefixCls, 'city-picker');
7850
- var containerCls = classnames__WEBPACK_IMPORTED_MODULE_9___default()("".concat(cityPickerPrefixCls, "-container"), className);
7851
- var contentCls = classnames__WEBPACK_IMPORTED_MODULE_9___default()("".concat(cityPickerPrefixCls, "-content"));
7852
- var titleCls = classnames__WEBPACK_IMPORTED_MODULE_9___default()("".concat(cityPickerPrefixCls, "-title"));
7853
- var additionalInfoCls = classnames__WEBPACK_IMPORTED_MODULE_9___default()("".concat(cityPickerPrefixCls, "-info"));
7854
- var inputCls = classnames__WEBPACK_IMPORTED_MODULE_9___default()("".concat(cityPickerPrefixCls, "-input"), inputClassName);
7855
- var arrowCls = classnames__WEBPACK_IMPORTED_MODULE_9___default()('kdicon kdicon-arrow-down', "".concat(cityPickerPrefixCls, "-arrow"), {
7856
- 'arrow-up': popperVisible
7857
- });
7858
- var handleContainerClick = function handleContainerClick() {
7859
- var _inputRef$current;
7860
- if (document.activeElement === inputRef.current) {
7861
- return;
7703
+ };
7704
+ var renderNodeList = function renderNodeList(data, notContent) {
7705
+ if (!data.length) {
7706
+ return renderNotContent(notContent);
7862
7707
  }
7863
- (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
7708
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_20___default.a.createElement("div", {
7709
+ className: "".concat(selectPrefixCls, "-list")
7710
+ }, data.map(function (item) {
7711
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_20___default.a.createElement(_option__WEBPACK_IMPORTED_MODULE_27__["default"], {
7712
+ key: item.id,
7713
+ value: initValue,
7714
+ city: item,
7715
+ renderCityInfo: renderCityInfo,
7716
+ onChangeSelect: handleOption,
7717
+ itemRender: itemRender
7718
+ }, 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);
7719
+ }));
7864
7720
  };
7865
- var handleCitySelect = function handleCitySelect(city) {
7866
- setInputVal(city.name || '');
7867
- var otherInfoStr = city.country === '中国' ? "".concat(city.province) : "".concat(city.province).concat(city.province ? ',' : '').concat(city.country);
7868
- setAdditionalVal(otherInfoStr);
7869
- setPopperVisible(false);
7721
+ var renderLoading = function renderLoading() {
7722
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_20___default.a.createElement("div", {
7723
+ className: "".concat(selectPrefixCls, "-dropdown-loading")
7724
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_20___default.a.createElement(_index__WEBPACK_IMPORTED_MODULE_25__["Spin"], {
7725
+ type: "container"
7726
+ }));
7870
7727
  };
7871
- var handleFocus = function handleFocus() {
7872
- if (popperVisible) {
7873
- return;
7728
+ var toggleTabPane = function toggleTabPane(type) {
7729
+ setTabsValue(type);
7730
+ };
7731
+
7732
+ // 渲染下拉列表框
7733
+ var renderContent = function renderContent() {
7734
+ return loading ? renderLoading() : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_20___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_20___default.a.Fragment, null, searchValue ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_20___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_20___default.a.Fragment, null, isDomestic(type) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_20___default.a.createElement(_index__WEBPACK_IMPORTED_MODULE_25__["Tabs"], {
7735
+ noContainer: true,
7736
+ onChange: toggleTabPane,
7737
+ activeKey: tabsValue
7738
+ }, tabsData.map(function (item) {
7739
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_20___default.a.createElement(_index__WEBPACK_IMPORTED_MODULE_25__["Tabs"].TabPane, {
7740
+ key: item.id,
7741
+ tab: item.name
7742
+ }, item);
7743
+ })), tabsValue === 'domestic' ? renderNodeList(domesticList, '暂无数据') : renderNodeList(foreignList, '暂无数据')) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_20___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_20___default.a.Fragment, null, !!commonList.length && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_20___default.a.createElement("div", {
7744
+ className: "".concat(selectPrefixCls, "-dropdown-common")
7745
+ }, "\u5E38\u7528"), renderNodeList(commonList, '无常用城市')));
7746
+ };
7747
+ var renderCityInfo = Object(react__WEBPACK_IMPORTED_MODULE_20__["useCallback"])(function (data) {
7748
+ var flag = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
7749
+ var symbol = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ', ';
7750
+ if (!data) return null;
7751
+ if (isDomestic(type)) {
7752
+ return "".concat(flag && data !== null && data !== void 0 && data.province ? symbol : '').concat(data === null || data === void 0 ? void 0 : data.province);
7753
+ } else {
7754
+ return "".concat(flag && data !== null && data !== void 0 && data.province ? symbol : '').concat(data === null || data === void 0 ? void 0 : data.province).concat(data !== null && data !== void 0 && data.country ? symbol : '').concat(data === null || data === void 0 ? void 0 : data.country);
7874
7755
  }
7875
- setPopperVisible(true);
7756
+ }, [type]);
7757
+ var renderSingle = function renderSingle() {
7758
+ var hiddenStyle = !!searchValue || (initValue !== null && initValue !== void 0 ? initValue : '') !== '' ? {
7759
+ visibility: 'hidden'
7760
+ } : undefined;
7761
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_20___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_20___default.a.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_20___default.a.createElement("div", {
7762
+ className: singleCls,
7763
+ ref: selectionRef
7764
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_20___default.a.createElement("div", {
7765
+ className: "".concat(selectPrefixCls, "-content")
7766
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_20___default.a.createElement("span", {
7767
+ className: "".concat(selectPrefixCls, "-content-search")
7768
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_20___default.a.createElement("input", {
7769
+ ref: searchRef,
7770
+ value: searchValue,
7771
+ className: "".concat(selectPrefixCls, "-content-search-input"),
7772
+ onChange: handleSearchChange,
7773
+ onFocus: handleFocus,
7774
+ onBlur: handleBlur,
7775
+ readOnly: !!disabled
7776
+ }), !searchValue && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_20___default.a.createElement("span", {
7777
+ className: "".concat(selectPrefixCls, "-content-item"),
7778
+ title: seletedCity === null || seletedCity === void 0 ? void 0 : seletedCity.name
7779
+ }, seletedCity === null || seletedCity === void 0 ? void 0 : seletedCity.name)), !searchValue && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_20___default.a.createElement("span", {
7780
+ className: "".concat(selectPrefixCls, "-content-info")
7781
+ }, renderCityInfo(seletedCity))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_20___default.a.createElement("span", {
7782
+ className: "".concat(selectPrefixCls, "-placeholder"),
7783
+ style: hiddenStyle
7784
+ }, placeholder), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_20___default.a.createElement("span", {
7785
+ className: "".concat(selectPrefixCls, "-suffix")
7786
+ }, renderSuffix())));
7876
7787
  };
7877
- var handleChange = function handleChange(evt) {
7878
- var value = evt.target.value;
7879
- setAdditionalVal('');
7880
- setInputVal(value);
7788
+ var singleCls = classnames__WEBPACK_IMPORTED_MODULE_22___default()(commCls, (_classNames5 = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames5, "".concat(selectPrefixCls, "-disabled"), disabled), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames5, "".concat(selectPrefixCls, "-focused"), !disabled && focusd || optionShow), _classNames5));
7789
+ Object(react__WEBPACK_IMPORTED_MODULE_20__["useEffect"])(function () {
7790
+ if (optionShow && !disabled) {
7791
+ var onDropdownVisibleChange = selectProps.onDropdownVisibleChange;
7792
+ onDropdownVisibleChange && onDropdownVisibleChange(true);
7793
+ }
7794
+ }, [optionShow]);
7795
+ Object(react__WEBPACK_IMPORTED_MODULE_20__["useEffect"])(function () {
7796
+ var _clearRef$current;
7797
+ var fn = function fn(e) {
7798
+ e.stopPropagation();
7799
+ };
7800
+ (_clearRef$current = clearRef.current) === null || _clearRef$current === void 0 ? void 0 : _clearRef$current.addEventListener('mouseup', fn);
7801
+ return function () {
7802
+ var _clearRef$current2;
7803
+ (_clearRef$current2 = clearRef.current) === null || _clearRef$current2 === void 0 ? void 0 : _clearRef$current2.removeEventListener('mouseup', fn);
7804
+ };
7805
+ }, [initValue]);
7806
+ var renderCityPicker = function renderCityPicker() {
7807
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_20___default.a.createElement("div", {
7808
+ className: cityPickerCls,
7809
+ ref: selectRef,
7810
+ style: style
7811
+ }, showDescription && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_20___default.a.createElement("span", {
7812
+ className: "".concat(selectPrefixCls, "-description")
7813
+ }, description), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_20___default.a.createElement("span", {
7814
+ className: selectionCls,
7815
+ tabIndex: disabled ? -1 : 0,
7816
+ onFocus: function onFocus() {
7817
+ var _searchRef$current;
7818
+ return (_searchRef$current = searchRef.current) === null || _searchRef$current === void 0 ? void 0 : _searchRef$current.focus();
7819
+ },
7820
+ onBlur: function onBlur() {
7821
+ var _searchRef$current2;
7822
+ return (_searchRef$current2 = searchRef.current) === null || _searchRef$current2 === void 0 ? void 0 : _searchRef$current2.blur();
7823
+ }
7824
+ }, renderSingle()));
7881
7825
  };
7882
- var handlePopperVisibleChange = function handlePopperVisibleChange(visible) {
7883
- if (!visible) {
7884
- setPopperVisible(false);
7826
+ var catchStyle = function catchStyle() {
7827
+ if (selectRef !== null && selectRef !== void 0 && selectRef.current) {
7828
+ var _selectRef$current;
7829
+ var _selectRef$current$ge = (_selectRef$current = selectRef.current) === null || _selectRef$current === void 0 ? void 0 : _selectRef$current.getBoundingClientRect(),
7830
+ width = _selectRef$current$ge.width;
7831
+ return _objectSpread(_objectSpread({
7832
+ minWidth: width,
7833
+ maxWidth: 600
7834
+ }, dropdownStyle), {}, {
7835
+ width: (dropdownStyle === null || dropdownStyle === void 0 ? void 0 : dropdownStyle.width) || 'auto',
7836
+ zIndex: 1050
7837
+ }, popperStyle);
7885
7838
  }
7886
7839
  };
7887
- var inputSelector = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("div", {
7888
- className: containerCls,
7889
- style: style,
7890
- onClick: handleContainerClick
7891
- }, showTitle && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("div", {
7892
- className: titleCls
7893
- }, title), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("div", {
7894
- className: contentCls
7895
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("input", {
7896
- ref: inputRef,
7897
- type: "text",
7898
- readOnly: disabled,
7899
- onChange: handleChange,
7900
- placeholder: placeholder,
7901
- style: inputStyle,
7902
- className: inputCls,
7903
- title: inputVal,
7904
- value: inputVal,
7905
- onFocus: handleFocus
7906
- }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("span", {
7907
- className: additionalInfoCls
7908
- }, additionalVal), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("i", {
7909
- className: arrowCls
7910
- })));
7911
- var cityPanel = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(_city_panel__WEBPACK_IMPORTED_MODULE_12__["default"], {
7912
- commons: commons,
7913
- groups: groups,
7914
- cityList: cityList,
7915
- onSelect: handleCitySelect
7916
- });
7917
- var getSearchResults = function getSearchResults() {
7918
- if (!allCity.current || allCity.current.length === 0 || !inputVal) {
7919
- return [];
7840
+ var handleVisibleChange = function handleVisibleChange(visible) {
7841
+ if (visible !== optionShow) {
7842
+ props.visible === undefined && setOptionShow(visible);
7843
+ onVisibleChange && onVisibleChange(visible);
7920
7844
  }
7921
- return allCity.current.filter(function (city) {
7922
- var _city$name;
7923
- return (_city$name = city.name) === null || _city$name === void 0 ? void 0 : _city$name.startsWith(inputVal);
7924
- });
7925
7845
  };
7926
- var searchPanel = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement(_city_search_panel__WEBPACK_IMPORTED_MODULE_13__["default"], {
7927
- keyword: inputVal,
7928
- data: getSearchResults(),
7929
- onSelect: handleCitySelect
7930
- });
7931
- var popperProps = {
7932
- visible: popperVisible,
7846
+ var popperProps = _objectSpread(_objectSpread({}, selectProps), {}, {
7847
+ prefixCls: "".concat(selectPrefixCls, "-dropdown"),
7933
7848
  placement: 'bottomLeft',
7934
- trigger: 'focus',
7935
- prefixCls: "".concat(cityPickerPrefixCls, "-panel"),
7936
- onVisibleChange: handlePopperVisibleChange
7937
- };
7938
- var panel = inputVal.length > 0 ? searchPanel : cityPanel;
7939
- return Object(_utils_usePopper__WEBPACK_IMPORTED_MODULE_14__["default"])(inputSelector, panel, popperProps);
7940
- };
7941
- CityPicker.displayName = 'CityPicker';
7942
- CityPicker.PanelItem = _city_panel_item__WEBPACK_IMPORTED_MODULE_11__["default"];
7943
- CityPicker.Panel = _city_panel__WEBPACK_IMPORTED_MODULE_12__["default"];
7944
- CityPicker.SearchPanel = _city_search_panel__WEBPACK_IMPORTED_MODULE_13__["default"];
7945
- /* harmony default export */ __webpack_exports__["default"] = (CityPicker);
7946
-
7947
- /***/ }),
7948
-
7949
- /***/ "./components/city-picker/city-search-panel.tsx":
7950
- /*!******************************************************!*\
7951
- !*** ./components/city-picker/city-search-panel.tsx ***!
7952
- \******************************************************/
7953
- /*! exports provided: default */
7954
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
7955
-
7956
- "use strict";
7957
- __webpack_require__.r(__webpack_exports__);
7958
- /* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.map.js */ "./node_modules/core-js/modules/es.array.map.js");
7959
- /* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_0__);
7960
- /* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ "./node_modules/core-js/modules/es.regexp.exec.js");
7961
- /* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_1__);
7962
- /* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.string.replace.js */ "./node_modules/core-js/modules/es.string.replace.js");
7963
- /* harmony import */ var core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_2__);
7964
- /* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ "./node_modules/core-js/modules/es.function.name.js");
7965
- /* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_3__);
7966
- /* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
7967
- /* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_4__);
7968
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ "react");
7969
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__);
7970
- /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
7971
- /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_6__);
7972
- /* harmony import */ var _config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../config-provider/ConfigContext */ "./components/config-provider/ConfigContext.tsx");
7973
- /* harmony import */ var _no_data__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./no-data */ "./components/city-picker/no-data.tsx");
7974
-
7975
-
7976
-
7977
-
7978
-
7979
-
7980
-
7981
-
7982
-
7983
- var SearchPanel = function SearchPanel(_ref) {
7984
- var _ref$data = _ref.data,
7985
- data = _ref$data === void 0 ? [] : _ref$data,
7986
- _ref$keyword = _ref.keyword,
7987
- keyword = _ref$keyword === void 0 ? '' : _ref$keyword,
7988
- handleSelect = _ref.onSelect;
7989
- var _useContext = Object(react__WEBPACK_IMPORTED_MODULE_5__["useContext"])(_config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_7__["default"]),
7990
- getPrefixCls = _useContext.getPrefixCls,
7991
- prefixCls = _useContext.prefixCls;
7992
- var cityPickerPrefixCls = getPrefixCls(prefixCls, 'city-picker');
7993
- var containerCls = classnames__WEBPACK_IMPORTED_MODULE_6___default()("".concat(cityPickerPrefixCls, "-search-panel"));
7994
- var hasData = data && data.length > 0;
7995
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement("div", {
7996
- className: containerCls
7997
- }, hasData ? data.map(function (city) {
7998
- var itemContainerCls = classnames__WEBPACK_IMPORTED_MODULE_6___default()("".concat(cityPickerPrefixCls, "-search-panel-item"));
7999
- var itemLeftCls = classnames__WEBPACK_IMPORTED_MODULE_6___default()("".concat(cityPickerPrefixCls, "-search-panel-item-left"));
8000
- var itemRightCls = classnames__WEBPACK_IMPORTED_MODULE_6___default()("".concat(cityPickerPrefixCls, "-search-panel-item-right"));
8001
- var handleClick = function handleClick() {
8002
- handleSelect === null || handleSelect === void 0 ? void 0 : handleSelect(city);
8003
- };
8004
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement("div", {
8005
- className: itemContainerCls,
8006
- onClick: handleClick,
8007
- key: city.id
8008
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement("div", {
8009
- className: itemLeftCls
8010
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement("span", {
8011
- dangerouslySetInnerHTML: {
8012
- __html: city.name.replace(keyword, "<span class=\"".concat(cityPickerPrefixCls, "-search-keyword\">").concat(keyword, "</span>"))
8013
- }
8014
- })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement("div", {
8015
- className: itemRightCls
8016
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement("span", null, city.province), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement("span", null, city.country === '中国' ? '' : city.country)));
8017
- }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5___default.a.createElement(_no_data__WEBPACK_IMPORTED_MODULE_8__["default"], null));
7849
+ popperStyle: catchStyle(),
7850
+ defaultVisible: optionShow,
7851
+ visible: optionShow,
7852
+ onVisibleChange: handleVisibleChange,
7853
+ clickToClose: !searchValue
7854
+ });
7855
+ return Object(_utils_usePopper__WEBPACK_IMPORTED_MODULE_26__["default"])(renderCityPicker(), renderContent(), popperProps);
8018
7856
  };
8019
- /* harmony default export */ __webpack_exports__["default"] = (SearchPanel);
7857
+ var Select = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_20___default.a.forwardRef(InternalSelect);
7858
+ Select.displayName = 'CityPicker';
7859
+ /* harmony default export */ __webpack_exports__["default"] = (Select);
8020
7860
 
8021
7861
  /***/ }),
8022
7862
 
@@ -8036,38 +7876,68 @@ __webpack_require__.r(__webpack_exports__);
8036
7876
 
8037
7877
  /***/ }),
8038
7878
 
8039
- /***/ "./components/city-picker/no-data.tsx":
8040
- /*!********************************************!*\
8041
- !*** ./components/city-picker/no-data.tsx ***!
8042
- \********************************************/
7879
+ /***/ "./components/city-picker/option.tsx":
7880
+ /*!*******************************************!*\
7881
+ !*** ./components/city-picker/option.tsx ***!
7882
+ \*******************************************/
8043
7883
  /*! exports provided: default */
8044
7884
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
8045
7885
 
8046
7886
  "use strict";
8047
7887
  __webpack_require__.r(__webpack_exports__);
8048
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
8049
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
8050
- /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
8051
- /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__);
8052
- /* harmony import */ var _config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../config-provider/ConfigContext */ "./components/config-provider/ConfigContext.tsx");
7888
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js");
7889
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
7890
+ /* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ "./node_modules/core-js/modules/es.function.name.js");
7891
+ /* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_1__);
7892
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
7893
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
7894
+ /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
7895
+ /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);
7896
+ /* harmony import */ var _config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../config-provider/ConfigContext */ "./components/config-provider/ConfigContext.tsx");
8053
7897
 
8054
7898
 
8055
7899
 
8056
- var NoData = function NoData() {
8057
- var _useContext = Object(react__WEBPACK_IMPORTED_MODULE_0__["useContext"])(_config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_2__["default"]),
7900
+
7901
+
7902
+ var InternalOption = function InternalOption(props, ref) {
7903
+ var _classNames;
7904
+ var optionRef = Object(react__WEBPACK_IMPORTED_MODULE_2__["useRef"])(null) || ref;
7905
+ var children = props.children,
7906
+ value = props.value,
7907
+ disabled = props.disabled,
7908
+ onChangeSelect = props.onChangeSelect,
7909
+ _props$city = props.city,
7910
+ city = _props$city === void 0 ? {} : _props$city,
7911
+ renderCityInfo = props.renderCityInfo,
7912
+ itemRender = props.itemRender;
7913
+ var _ref = city,
7914
+ id = _ref.id,
7915
+ name = _ref.name;
7916
+ var _useContext = Object(react__WEBPACK_IMPORTED_MODULE_2__["useContext"])(_config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_4__["default"]),
8058
7917
  getPrefixCls = _useContext.getPrefixCls,
8059
- prefixCls = _useContext.prefixCls,
8060
- globalLocale = _useContext.locale;
8061
- var cityPickerLang = globalLocale.getCompLangMsg({
8062
- componentName: 'CityPicker'
8063
- });
8064
- var cityPickerPrefixCls = getPrefixCls(prefixCls, 'city-picker');
8065
- var cls = classnames__WEBPACK_IMPORTED_MODULE_1___default()("".concat(cityPickerPrefixCls, "-no-data"));
8066
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
8067
- className: cls
8068
- }, cityPickerLang.noData);
7918
+ prefixCls = _useContext.prefixCls;
7919
+ var selectOptionPrefixCls = getPrefixCls(prefixCls, 'city-picker-list-item');
7920
+ var isSelected = id !== undefined ? id === value : false;
7921
+ var optionCls = classnames__WEBPACK_IMPORTED_MODULE_3___default()(selectOptionPrefixCls, (_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));
7922
+ var handleClick = function handleClick(e) {
7923
+ e.preventDefault();
7924
+ if (disabled || id === undefined) return;
7925
+ onChangeSelect === null || onChangeSelect === void 0 ? void 0 : onChangeSelect(city);
7926
+ };
7927
+ 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", {
7928
+ ref: optionRef,
7929
+ className: optionCls,
7930
+ title: name,
7931
+ onClick: handleClick
7932
+ }, 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("div", {
7933
+ className: "".concat(selectOptionPrefixCls, "-content")
7934
+ }, children), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("div", {
7935
+ className: "".concat(selectOptionPrefixCls, "-info")
7936
+ }, renderCityInfo === null || renderCityInfo === void 0 ? void 0 : renderCityInfo(city, true)))));
8069
7937
  };
8070
- /* harmony default export */ __webpack_exports__["default"] = (NoData);
7938
+ var Option = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.forwardRef(InternalOption);
7939
+ Option.displayName = 'CityPickerOption';
7940
+ /* harmony default export */ __webpack_exports__["default"] = (Option);
8071
7941
 
8072
7942
  /***/ }),
8073
7943
 
@@ -8098,43 +7968,6 @@ __webpack_require__.r(__webpack_exports__);
8098
7968
 
8099
7969
 
8100
7970
 
8101
- /***/ }),
8102
-
8103
- /***/ "./components/city-picker/utils/grouping.ts":
8104
- /*!**************************************************!*\
8105
- !*** ./components/city-picker/utils/grouping.ts ***!
8106
- \**************************************************/
8107
- /*! exports provided: default */
8108
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
8109
-
8110
- "use strict";
8111
- __webpack_require__.r(__webpack_exports__);
8112
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return grouping; });
8113
- /**
8114
- * 进行分组
8115
- * @param groups 组别
8116
- * @param nums 每组个数
8117
- * @returns 分组结果
8118
- */
8119
- function grouping() {
8120
- var groups = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
8121
- var nums = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 4;
8122
- if (groups.length === 0 || nums <= 1) return groups;
8123
- var result = [];
8124
- var str = '';
8125
- for (var i = 0; i < groups.length; i++) {
8126
- if (str.length === nums) {
8127
- result.push(str);
8128
- str = '';
8129
- }
8130
- str += groups[i];
8131
- if (i === groups.length - 1) {
8132
- result.push(str);
8133
- }
8134
- }
8135
- return result;
8136
- }
8137
-
8138
7971
  /***/ }),
8139
7972
 
8140
7973
  /***/ "./components/collapse/collapse.tsx":
@@ -9968,6 +9801,19 @@ var compDefaultProps = {
9968
9801
  });
9969
9802
  },
9970
9803
  expandOnClickNode: false
9804
+ },
9805
+ CityPicker: {
9806
+ type: 'domestic',
9807
+ loading: false,
9808
+ size: 'small',
9809
+ borderType: 'underline',
9810
+ defaultOpen: false,
9811
+ showArrow: true,
9812
+ placeholder: '',
9813
+ description: '城市',
9814
+ showDescription: true,
9815
+ optionHighlightProps: 'highlightText',
9816
+ allowClear: true
9971
9817
  }
9972
9818
  };
9973
9819
  /* harmony default export */ __webpack_exports__["default"] = (compDefaultProps);
@@ -15658,10 +15504,11 @@ var Dropdown = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11__["forwardRef"](fu
15658
15504
  defaultVisible = allProps.defaultVisible,
15659
15505
  onVisibleChange = allProps.onVisibleChange,
15660
15506
  trigger = allProps.trigger,
15661
- customPrefixcls = allProps.prefixCls;
15662
-
15663
- // className前缀
15507
+ customPrefixcls = allProps.prefixCls,
15508
+ menuAnimation = allProps.menuAnimation,
15509
+ popperStyle = allProps.popperStyle;
15664
15510
  var prefixCls = getPrefixCls(pkgPrefixCls, 'dropdown', customPrefixcls);
15511
+ var innerAnimation = typeof menuAnimation === 'boolean' ? menuAnimation : trigger !== 'contextMenu';
15665
15512
  var _React$useState = react__WEBPACK_IMPORTED_MODULE_11__["useState"](!!props.visible || defaultVisible),
15666
15513
  _React$useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1___default()(_React$useState, 2),
15667
15514
  visible = _React$useState2[0],
@@ -15755,6 +15602,9 @@ var Dropdown = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_11__["forwardRef"](fu
15755
15602
  var popperProps = _objectSpread(_objectSpread({}, allProps), {}, {
15756
15603
  visible: visible,
15757
15604
  prefixCls: prefixCls,
15605
+ popperStyle: innerAnimation ? popperStyle : _objectSpread({
15606
+ animation: 'none'
15607
+ }, popperStyle),
15758
15608
  onVisibleChange: handleVisibleChange
15759
15609
  });
15760
15610
  return Object(_utils_usePopper__WEBPACK_IMPORTED_MODULE_16__["default"])(child, menuElement, popperProps);
@@ -37900,63 +37750,74 @@ __webpack_require__.r(__webpack_exports__);
37900
37750
 
37901
37751
  "use strict";
37902
37752
  __webpack_require__.r(__webpack_exports__);
37903
- /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js");
37904
- /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);
37905
- /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js");
37906
- /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__);
37907
- /* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/asyncToGenerator.js");
37908
- /* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__);
37909
- /* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "./node_modules/@babel/runtime/helpers/toConsumableArray.js");
37910
- /* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__);
37911
- /* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/slicedToArray.js");
37912
- /* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4__);
37913
- /* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js");
37914
- /* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5__);
37915
- /* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
37916
- /* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_6__);
37917
- /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
37918
- /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_7__);
37919
- /* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
37920
- /* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_8__);
37921
- /* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.object.keys.js */ "./node_modules/core-js/modules/es.object.keys.js");
37922
- /* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_9__);
37923
- /* harmony import */ var core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.promise.js */ "./node_modules/core-js/modules/es.promise.js");
37924
- /* harmony import */ var core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_10__);
37925
- /* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/es.array.slice.js */ "./node_modules/core-js/modules/es.array.slice.js");
37926
- /* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_11__);
37927
- /* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ "./node_modules/core-js/modules/es.function.name.js");
37928
- /* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_12__);
37929
- /* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
37930
- /* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_13__);
37931
- /* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
37932
- /* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_14__);
37933
- /* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
37934
- /* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_15__);
37935
- /* 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");
37936
- /* 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__);
37937
- /* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ "./node_modules/core-js/modules/es.regexp.exec.js");
37938
- /* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_17__);
37939
- /* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/es.array.filter.js */ "./node_modules/core-js/modules/es.array.filter.js");
37940
- /* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_18__);
37941
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! react */ "react");
37942
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_19__);
37943
- /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
37944
- /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_20__);
37945
- /* harmony import */ var _config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../config-provider/ConfigContext */ "./components/config-provider/ConfigContext.tsx");
37946
- /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../_utils */ "./components/_utils/index.ts");
37947
- /* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../icon */ "./components/icon/index.tsx");
37948
- /* harmony import */ var _request__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./request */ "./components/upload/request.ts");
37949
- /* harmony import */ var _verify_file__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./verify-file */ "./components/upload/verify-file.ts");
37950
- /* harmony import */ var _scan_files__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./scan-files */ "./components/upload/scan-files.ts");
37951
- /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./utils */ "./components/upload/utils.ts");
37952
- /* harmony import */ var _image__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../image */ "./components/image/index.tsx");
37953
- /* harmony import */ var _progress__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../progress */ "./components/progress/index.tsx");
37753
+ /* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.symbol.js */ "./node_modules/core-js/modules/es.symbol.js");
37754
+ /* harmony import */ var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0__);
37755
+ /* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
37756
+ /* harmony import */ var core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptor_js__WEBPACK_IMPORTED_MODULE_1__);
37757
+ /* harmony import */ var core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ "./node_modules/core-js/modules/es.object.get-own-property-descriptors.js");
37758
+ /* harmony import */ var core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_get_own_property_descriptors_js__WEBPACK_IMPORTED_MODULE_2__);
37759
+ /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js");
37760
+ /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_3__);
37761
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js");
37762
+ /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_4__);
37763
+ /* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/asyncToGenerator.js");
37764
+ /* harmony import */ var _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_5__);
37765
+ /* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "./node_modules/@babel/runtime/helpers/toConsumableArray.js");
37766
+ /* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_6__);
37767
+ /* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/slicedToArray.js");
37768
+ /* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7__);
37769
+ /* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js");
37770
+ /* harmony import */ var _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_8__);
37771
+ /* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core-js/modules/es.array.concat.js */ "./node_modules/core-js/modules/es.array.concat.js");
37772
+ /* harmony import */ var core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_9__);
37773
+ /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ "./node_modules/core-js/modules/es.object.to-string.js");
37774
+ /* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_10__);
37775
+ /* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ "./node_modules/core-js/modules/web.dom-collections.for-each.js");
37776
+ /* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_11__);
37777
+ /* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core-js/modules/es.object.keys.js */ "./node_modules/core-js/modules/es.object.keys.js");
37778
+ /* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_12__);
37779
+ /* harmony import */ var core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! core-js/modules/es.promise.js */ "./node_modules/core-js/modules/es.promise.js");
37780
+ /* harmony import */ var core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_promise_js__WEBPACK_IMPORTED_MODULE_13__);
37781
+ /* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! core-js/modules/es.array.slice.js */ "./node_modules/core-js/modules/es.array.slice.js");
37782
+ /* harmony import */ var core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_slice_js__WEBPACK_IMPORTED_MODULE_14__);
37783
+ /* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ "./node_modules/core-js/modules/es.function.name.js");
37784
+ /* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_15__);
37785
+ /* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ "./node_modules/core-js/modules/es.array.iterator.js");
37786
+ /* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_16__);
37787
+ /* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ "./node_modules/core-js/modules/es.string.iterator.js");
37788
+ /* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_17__);
37789
+ /* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ "./node_modules/core-js/modules/web.dom-collections.iterator.js");
37790
+ /* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_18__);
37791
+ /* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! core-js/modules/es.array.map.js */ "./node_modules/core-js/modules/es.array.map.js");
37792
+ /* harmony import */ var core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_map_js__WEBPACK_IMPORTED_MODULE_19__);
37793
+ /* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! core-js/modules/es.regexp.exec.js */ "./node_modules/core-js/modules/es.regexp.exec.js");
37794
+ /* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_20__);
37795
+ /* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! core-js/modules/es.array.filter.js */ "./node_modules/core-js/modules/es.array.filter.js");
37796
+ /* harmony import */ var core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_filter_js__WEBPACK_IMPORTED_MODULE_21__);
37797
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! react */ "react");
37798
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_22__);
37799
+ /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
37800
+ /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_23__);
37801
+ /* harmony import */ var _config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../config-provider/ConfigContext */ "./components/config-provider/ConfigContext.tsx");
37802
+ /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../_utils */ "./components/_utils/index.ts");
37803
+ /* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../icon */ "./components/icon/index.tsx");
37804
+ /* harmony import */ var _request__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./request */ "./components/upload/request.ts");
37805
+ /* harmony import */ var _verify_file__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./verify-file */ "./components/upload/verify-file.ts");
37806
+ /* harmony import */ var _scan_files__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./scan-files */ "./components/upload/scan-files.ts");
37807
+ /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./utils */ "./components/upload/utils.ts");
37808
+ /* harmony import */ var _image__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../image */ "./components/image/index.tsx");
37809
+ /* harmony import */ var _progress__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../progress */ "./components/progress/index.tsx");
37810
+
37811
+
37812
+
37954
37813
 
37955
37814
 
37956
37815
 
37957
37816
 
37958
37817
 
37959
37818
  var _this = undefined;
37819
+ 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; }
37820
+ 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_4___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; }
37960
37821
 
37961
37822
 
37962
37823
 
@@ -38006,13 +37867,12 @@ function abort(file) {
38006
37867
  }
38007
37868
  var InternalUpload = function InternalUpload(props, ref) {
38008
37869
  var _classNames;
38009
- var _React$useContext = react__WEBPACK_IMPORTED_MODULE_19___default.a.useContext(_config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_21__["default"]),
38010
- getPrefixCls = _React$useContext.getPrefixCls,
38011
- pkgPrefixCls = _React$useContext.prefixCls,
38012
- userDefaultProps = _React$useContext.compDefaultProps;
38013
- var innerRef = react__WEBPACK_IMPORTED_MODULE_19___default.a.useRef();
38014
- var mergedRef = ref || innerRef;
38015
- var allProps = Object(_utils__WEBPACK_IMPORTED_MODULE_22__["getCompProps"])('Upload', userDefaultProps, props); // 属性需要合并一遍用户定义的默认属性
37870
+ var _useContext = Object(react__WEBPACK_IMPORTED_MODULE_22__["useContext"])(_config_provider_ConfigContext__WEBPACK_IMPORTED_MODULE_24__["default"]),
37871
+ getPrefixCls = _useContext.getPrefixCls,
37872
+ pkgPrefixCls = _useContext.prefixCls,
37873
+ userDefaultProps = _useContext.compDefaultProps;
37874
+ var inputRef = Object(react__WEBPACK_IMPORTED_MODULE_22__["useRef"])(null);
37875
+ var allProps = Object(_utils__WEBPACK_IMPORTED_MODULE_25__["getCompProps"])('Upload', userDefaultProps, props); // 属性需要合并一遍用户定义的默认属性
38016
37876
 
38017
37877
  var type = allProps.type,
38018
37878
  style = allProps.style,
@@ -38028,15 +37888,15 @@ var InternalUpload = function InternalUpload(props, ref) {
38028
37888
  showUploadList = allProps.showUploadList,
38029
37889
  customPrefixcls = allProps.prefixCls,
38030
37890
  onPreview = allProps.onPreview;
38031
- var _React$useState = react__WEBPACK_IMPORTED_MODULE_19___default.a.useState(props.fileList || props.defaultFileList || []),
38032
- _React$useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4___default()(_React$useState, 2),
38033
- fileList = _React$useState2[0],
38034
- setFileList = _React$useState2[1];
38035
- var hasChildren = children && react__WEBPACK_IMPORTED_MODULE_19__["Children"].toArray(children).length > 0;
38036
- react__WEBPACK_IMPORTED_MODULE_19___default.a.useEffect(function () {
37891
+ var _useState = Object(react__WEBPACK_IMPORTED_MODULE_22__["useState"])(props.fileList || props.defaultFileList || []),
37892
+ _useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7___default()(_useState, 2),
37893
+ fileList = _useState2[0],
37894
+ setFileList = _useState2[1];
37895
+ var hasChildren = children && react__WEBPACK_IMPORTED_MODULE_22__["Children"].toArray(children).length > 0;
37896
+ Object(react__WEBPACK_IMPORTED_MODULE_22__["useEffect"])(function () {
38037
37897
  props.fileList && setFileList(props.fileList);
38038
37898
  }, [props.fileList]);
38039
- react__WEBPACK_IMPORTED_MODULE_19___default.a.useEffect(function () {
37899
+ Object(react__WEBPACK_IMPORTED_MODULE_22__["useEffect"])(function () {
38040
37900
  return abort;
38041
37901
  }, []);
38042
37902
  var onClick = function onClick(e) {
@@ -38056,19 +37916,21 @@ var InternalUpload = function InternalUpload(props, ref) {
38056
37916
  });
38057
37917
  };
38058
37918
  var uploadFiles = function uploadFiles(files) {
38059
- files.forEach(function (file) {
38060
- file.originFileObj = new File([file], file.name, {
38061
- type: file.type
37919
+ if (Array.isArray(files) && files.length) {
37920
+ files.forEach(function (file) {
37921
+ file.originFileObj = new File([file], file.name, {
37922
+ type: file.type
37923
+ });
37924
+ file.uid = getUid();
37925
+ file.status = 'notStart';
37926
+ file.fileName = allProps.name || file.name;
38062
37927
  });
38063
- file.uid = getUid();
38064
- file.status = 'notStart';
38065
- file.fileName = allProps.name || file.name;
38066
- });
38067
- var newFileList = [].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_3___default()(fileList), _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_3___default()(files));
38068
- files.forEach(function (file) {
38069
- props.fileList === undefined && setFileList(fileList);
38070
- upload(file, newFileList);
38071
- });
37928
+ var newFileList = [].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_6___default()(fileList), _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_6___default()(files));
37929
+ files.forEach(function (file) {
37930
+ props.fileList === undefined && setFileList(fileList);
37931
+ upload(file, newFileList);
37932
+ });
37933
+ }
38072
37934
  };
38073
37935
  var upload = function upload(file, fileList) {
38074
37936
  if (props.beforeUpload) {
@@ -38129,7 +37991,7 @@ var InternalUpload = function InternalUpload(props, ref) {
38129
37991
  console.error(e);
38130
37992
  });
38131
37993
  transform.then(function (_ref) {
38132
- var _ref2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4___default()(_ref, 2),
37994
+ var _ref2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7___default()(_ref, 2),
38133
37995
  transformedFile = _ref2[0],
38134
37996
  data = _ref2[1];
38135
37997
  var requestOptions = {
@@ -38160,9 +38022,9 @@ var InternalUpload = function InternalUpload(props, ref) {
38160
38022
  onFileListChange(file, fileList);
38161
38023
  },
38162
38024
  onSuccess: function () {
38163
- var _onSuccess2 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.mark(function _callee(response, xhr) {
38025
+ var _onSuccess2 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_5___default()( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_8___default.a.mark(function _callee(response, xhr) {
38164
38026
  var url;
38165
- return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.wrap(function _callee$(_context) {
38027
+ return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_8___default.a.wrap(function _callee$(_context) {
38166
38028
  while (1) switch (_context.prev = _context.next) {
38167
38029
  case 0:
38168
38030
  file.status = 'done';
@@ -38173,7 +38035,7 @@ var InternalUpload = function InternalUpload(props, ref) {
38173
38035
  break;
38174
38036
  }
38175
38037
  _context.next = 6;
38176
- return Object(_utils__WEBPACK_IMPORTED_MODULE_27__["getBase64"])(file);
38038
+ return Object(_utils__WEBPACK_IMPORTED_MODULE_30__["getBase64"])(file);
38177
38039
  case 6:
38178
38040
  url = _context.sent;
38179
38041
  file.url = url;
@@ -38197,44 +38059,57 @@ var InternalUpload = function InternalUpload(props, ref) {
38197
38059
  }()
38198
38060
  };
38199
38061
  onStart && onStart(file);
38200
- reqs[uid] = Object(_request__WEBPACK_IMPORTED_MODULE_24__["default"])(requestOptions);
38062
+ reqs[uid] = Object(_request__WEBPACK_IMPORTED_MODULE_27__["default"])(requestOptions);
38201
38063
  });
38202
38064
  });
38203
38065
  };
38204
- var handleRemove = function handleRemove(file, e) {
38205
- e.preventDefault();
38206
- var files = fileList.filter(function (fileItem) {
38207
- return fileItem.uid !== file.uid;
38208
- });
38209
- if (onRemove) {
38210
- var remove = onRemove(file);
38211
- if (remove && typeof remove !== 'boolean' && remove.then) {
38212
- remove.then(function (flag) {
38213
- if (flag) {
38214
- onFileListChange(file, files);
38215
- abort(file);
38216
- }
38217
- }).catch(function (e) {
38218
- console.log(e);
38219
- });
38220
- } else if (remove !== false) {
38066
+ var handleRemove = function handleRemove(originFile) {
38067
+ var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
38068
+ if (e) {
38069
+ e.preventDefault();
38070
+ }
38071
+ if (originFile) {
38072
+ var file = _objectSpread(_objectSpread({}, originFile), {}, {
38073
+ status: 'removed'
38074
+ });
38075
+ var files = fileList.filter(function (fileItem) {
38076
+ return fileItem.uid !== file.uid;
38077
+ });
38078
+ if (onRemove) {
38079
+ var remove = onRemove(file);
38080
+ if (remove && typeof remove !== 'boolean' && remove.then) {
38081
+ remove.then(function (flag) {
38082
+ if (flag) {
38083
+ onFileListChange(file, files);
38084
+ abort(file);
38085
+ }
38086
+ }).catch(function (e) {
38087
+ console.log(e);
38088
+ });
38089
+ } else if (remove !== false) {
38090
+ onFileListChange(file, files);
38091
+ abort(file);
38092
+ }
38093
+ } else {
38221
38094
  onFileListChange(file, files);
38222
38095
  abort(file);
38223
38096
  }
38224
- } else {
38225
- onFileListChange(file, files);
38226
- abort(file);
38227
38097
  }
38228
38098
  };
38229
- var handleReUpload = function handleReUpload(file, e) {
38230
- e.preventDefault();
38231
- file.percent = 0;
38232
- file.status = 'uploading';
38233
- var files = fileList.map(function (fileItem) {
38234
- return fileItem.uid === file.uid ? file : fileItem;
38235
- });
38236
- onFileListChange(file, files);
38237
- upload(file, files);
38099
+ var handleReUpload = function handleReUpload(file) {
38100
+ var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
38101
+ if (e) {
38102
+ e.preventDefault();
38103
+ }
38104
+ if (file) {
38105
+ file.percent = 0;
38106
+ file.status = 'uploading';
38107
+ var files = fileList.map(function (fileItem) {
38108
+ return fileItem.uid === file.uid ? file : fileItem;
38109
+ });
38110
+ onFileListChange(file, files);
38111
+ upload(file, files);
38112
+ }
38238
38113
  };
38239
38114
  var prefixCls = getPrefixCls(pkgPrefixCls, 'upload', customPrefixcls);
38240
38115
  var inputFileProps = {
@@ -38247,17 +38122,17 @@ var InternalUpload = function InternalUpload(props, ref) {
38247
38122
  webkitdirectory: directory ? 'webkitdirectory' : undefined
38248
38123
  };
38249
38124
  var dragEvents = {};
38250
- var _React$useState3 = react__WEBPACK_IMPORTED_MODULE_19___default.a.useState(false),
38251
- _React$useState4 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_4___default()(_React$useState3, 2),
38252
- hover = _React$useState4[0],
38253
- setHover = _React$useState4[1];
38125
+ var _useState3 = Object(react__WEBPACK_IMPORTED_MODULE_22__["useState"])(false),
38126
+ _useState4 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_7___default()(_useState3, 2),
38127
+ hover = _useState4[0],
38128
+ setHover = _useState4[1];
38254
38129
  if (type === 'drag') {
38255
38130
  var onFileDrop = function onFileDrop(e) {
38256
38131
  e.preventDefault();
38257
38132
  setHover(false);
38258
38133
  if (directory) {
38259
- Object(_scan_files__WEBPACK_IMPORTED_MODULE_26__["default"])(Array.prototype.slice.call(e.dataTransfer.items), function (file) {
38260
- return Object(_verify_file__WEBPACK_IMPORTED_MODULE_25__["default"])(file, accept);
38134
+ Object(_scan_files__WEBPACK_IMPORTED_MODULE_29__["default"])(Array.prototype.slice.call(e.dataTransfer.items), function (file) {
38135
+ return Object(_verify_file__WEBPACK_IMPORTED_MODULE_28__["default"])(file, accept);
38261
38136
  }, function (file) {
38262
38137
  file.originFileObj = new File([file], file.type);
38263
38138
  file.uid = getUid();
@@ -38269,7 +38144,7 @@ var InternalUpload = function InternalUpload(props, ref) {
38269
38144
  });
38270
38145
  } else {
38271
38146
  var files = Array.prototype.slice.call(e.dataTransfer.files).filter(function (file) {
38272
- return Object(_verify_file__WEBPACK_IMPORTED_MODULE_25__["default"])(file, accept);
38147
+ return Object(_verify_file__WEBPACK_IMPORTED_MODULE_28__["default"])(file, accept);
38273
38148
  });
38274
38149
  if (multiple === false) {
38275
38150
  files = files.slice(0, 1);
@@ -38285,7 +38160,7 @@ var InternalUpload = function InternalUpload(props, ref) {
38285
38160
  dragEvents.onDragOver = onFileLeave;
38286
38161
  dragEvents.onDragLeave = onFileLeave;
38287
38162
  }
38288
- react__WEBPACK_IMPORTED_MODULE_19___default.a.useEffect(function () {
38163
+ Object(react__WEBPACK_IMPORTED_MODULE_22__["useEffect"])(function () {
38289
38164
  if (type === 'drag') {
38290
38165
  var stopDrop = function stopDrop(e) {
38291
38166
  return e.preventDefault();
@@ -38298,39 +38173,49 @@ var InternalUpload = function InternalUpload(props, ref) {
38298
38173
  };
38299
38174
  }
38300
38175
  }, [type]);
38301
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.createElement("div", {
38302
- className: classnames__WEBPACK_IMPORTED_MODULE_20___default()(prefixCls, {
38176
+ Object(react__WEBPACK_IMPORTED_MODULE_22__["useImperativeHandle"])(ref, function () {
38177
+ return {
38178
+ fileList: fileList,
38179
+ uploadFiles: uploadFiles,
38180
+ reUploadFile: handleReUpload,
38181
+ removeFile: handleRemove,
38182
+ abortFile: abort,
38183
+ input: inputRef.current
38184
+ };
38185
+ });
38186
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default.a.createElement("div", {
38187
+ className: classnames__WEBPACK_IMPORTED_MODULE_23___default()(prefixCls, {
38303
38188
  disabled: disabled
38304
38189
  }, className),
38305
38190
  style: style
38306
- }, listType === 'text' && hasChildren && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.createElement("label", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({
38307
- className: classnames__WEBPACK_IMPORTED_MODULE_20___default()((_classNames = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(prefixCls, "-").concat(type), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "hover", hover), _classNames))
38308
- }, dragEvents), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.createElement("span", {
38191
+ }, listType === 'text' && hasChildren && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default.a.createElement("label", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_3___default()({
38192
+ className: classnames__WEBPACK_IMPORTED_MODULE_23___default()((_classNames = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_4___default()(_classNames, "".concat(prefixCls, "-").concat(type), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_4___default()(_classNames, "hover", hover), _classNames))
38193
+ }, dragEvents), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default.a.createElement("span", {
38309
38194
  className: "".concat(prefixCls, "-handle")
38310
- }, children), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.createElement("span", {
38195
+ }, children), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default.a.createElement("span", {
38311
38196
  className: "".concat(prefixCls, "-input")
38312
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.createElement("input", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({
38197
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default.a.createElement("input", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_3___default()({
38313
38198
  title: "",
38314
38199
  type: "file"
38315
38200
  }, inputFileProps, {
38316
- ref: mergedRef
38317
- })))), (listType === 'picture' || !(listType === 'text' && (!showUploadList || !fileList.length))) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.createElement("ul", {
38201
+ ref: inputRef
38202
+ })))), (listType === 'picture' || !(listType === 'text' && (!showUploadList || !fileList.length))) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default.a.createElement("ul", {
38318
38203
  className: "".concat(prefixCls, "-").concat(listType, "-list")
38319
- }, listType === 'picture' && hasChildren && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.createElement("li", {
38320
- className: classnames__WEBPACK_IMPORTED_MODULE_20___default()("".concat(prefixCls, "-").concat(listType, "-list-item"))
38321
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.createElement("label", {
38204
+ }, listType === 'picture' && hasChildren && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default.a.createElement("li", {
38205
+ className: classnames__WEBPACK_IMPORTED_MODULE_23___default()("".concat(prefixCls, "-").concat(listType, "-list-item"))
38206
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default.a.createElement("label", {
38322
38207
  className: "".concat(prefixCls, "-select")
38323
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.createElement("span", {
38208
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default.a.createElement("span", {
38324
38209
  className: "".concat(prefixCls, "-handle")
38325
- }, children), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.createElement("span", {
38210
+ }, children), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default.a.createElement("span", {
38326
38211
  className: "".concat(prefixCls, "-input")
38327
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.createElement("input", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({
38212
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default.a.createElement("input", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_3___default()({
38328
38213
  title: "",
38329
38214
  type: "file"
38330
38215
  }, inputFileProps, {
38331
- ref: mergedRef
38216
+ ref: inputRef
38332
38217
  }))))), showUploadList && fileList.map(function (file) {
38333
- return itemRender ? itemRender( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.createElement(Item, {
38218
+ return itemRender ? itemRender( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default.a.createElement(Item, {
38334
38219
  file: file,
38335
38220
  prefixCls: prefixCls,
38336
38221
  listType: listType,
@@ -38338,7 +38223,7 @@ var InternalUpload = function InternalUpload(props, ref) {
38338
38223
  handleRemove: handleRemove,
38339
38224
  disabled: disabled,
38340
38225
  onPreview: onPreview
38341
- }), file, setFileList) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.createElement(Item, {
38226
+ }), file, setFileList) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default.a.createElement(Item, {
38342
38227
  key: file.uid,
38343
38228
  file: file,
38344
38229
  prefixCls: prefixCls,
@@ -38368,75 +38253,75 @@ var Item = function Item(_ref3) {
38368
38253
  var handlePreview = function handlePreview() {
38369
38254
  onPreview && onPreview(file);
38370
38255
  };
38371
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.createElement("li", {
38372
- className: classnames__WEBPACK_IMPORTED_MODULE_20___default()("".concat(prefixCls, "-").concat(listType, "-list-item"), {
38256
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default.a.createElement("li", {
38257
+ className: classnames__WEBPACK_IMPORTED_MODULE_23___default()("".concat(prefixCls, "-").concat(listType, "-list-item"), {
38373
38258
  error: file.status === 'error'
38374
38259
  })
38375
- }, listType === 'text' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_19___default.a.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.createElement("span", {
38260
+ }, listType === 'text' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_22___default.a.Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default.a.createElement("span", {
38376
38261
  className: "".concat(prefixCls, "-").concat(listType, "-list-item-icon"),
38377
38262
  onClick: handlePreview
38378
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.createElement(_icon__WEBPACK_IMPORTED_MODULE_23__["default"], {
38263
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default.a.createElement(_icon__WEBPACK_IMPORTED_MODULE_26__["default"], {
38379
38264
  spin: file.status === 'uploading',
38380
38265
  type: mapStatus[file.status]
38381
- })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.createElement("span", {
38266
+ })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default.a.createElement("span", {
38382
38267
  className: "".concat(prefixCls, "-").concat(listType, "-list-item-name"),
38383
38268
  title: file.name,
38384
38269
  onClick: handlePreview
38385
- }, file.name), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.createElement("span", {
38270
+ }, file.name), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default.a.createElement("span", {
38386
38271
  className: "".concat(prefixCls, "-").concat(listType, "-list-item-size")
38387
- }, "(", Object(_utils__WEBPACK_IMPORTED_MODULE_27__["getFileSize"])(file.size), ")"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.createElement("div", {
38272
+ }, "(", Object(_utils__WEBPACK_IMPORTED_MODULE_30__["getFileSize"])(file.size), ")"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default.a.createElement("div", {
38388
38273
  className: "".concat(prefixCls, "-").concat(listType, "-list-item-action")
38389
- }, file.status === 'error' && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.createElement("a", {
38274
+ }, file.status === 'error' && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default.a.createElement("a", {
38390
38275
  href: "true",
38391
38276
  className: "".concat(prefixCls, "-").concat(listType, "-list-item-reupload"),
38392
38277
  onClick: handleReUpload.bind(_this, file)
38393
- }, "\u91CD\u65B0\u4E0A\u4F20"), !disabled && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.createElement("a", {
38278
+ }, "\u91CD\u65B0\u4E0A\u4F20"), !disabled && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default.a.createElement("a", {
38394
38279
  href: "true",
38395
38280
  className: "".concat(prefixCls, "-").concat(listType, "-list-item-delete"),
38396
38281
  onClick: handleRemove.bind(_this, file)
38397
- }, "\u5220\u9664"))) : file.status === 'uploading' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.createElement("div", {
38282
+ }, "\u5220\u9664"))) : file.status === 'uploading' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default.a.createElement("div", {
38398
38283
  className: "".concat(prefixCls, "-").concat(listType, "-list-item-loading")
38399
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.createElement(_progress__WEBPACK_IMPORTED_MODULE_29__["default"], {
38284
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default.a.createElement(_progress__WEBPACK_IMPORTED_MODULE_32__["default"], {
38400
38285
  percent: file.percent,
38401
38286
  textMap: ['文件上传中'],
38402
38287
  showInfo: false
38403
- })) : file.status === 'error' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.createElement("div", {
38288
+ })) : file.status === 'error' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default.a.createElement("div", {
38404
38289
  className: "".concat(prefixCls, "-").concat(listType, "-list-item-error")
38405
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.createElement("div", {
38290
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default.a.createElement("div", {
38406
38291
  className: "".concat(prefixCls, "-").concat(listType, "-list-item-error-text")
38407
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.createElement(_icon__WEBPACK_IMPORTED_MODULE_23__["default"], {
38292
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default.a.createElement(_icon__WEBPACK_IMPORTED_MODULE_26__["default"], {
38408
38293
  type: mapStatus[file.status],
38409
38294
  style: {
38410
38295
  verticalAlign: 'top'
38411
38296
  }
38412
- }), "\u4E0A\u4F20\u5931\u8D25"), !disabled && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.createElement("div", {
38297
+ }), "\u4E0A\u4F20\u5931\u8D25"), !disabled && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default.a.createElement("div", {
38413
38298
  className: "".concat(prefixCls, "-").concat(listType, "-list-item-action")
38414
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.createElement("a", {
38299
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default.a.createElement("a", {
38415
38300
  href: "true",
38416
38301
  className: "".concat(prefixCls, "-").concat(listType, "-list-item-reupload"),
38417
38302
  onClick: handleReUpload.bind(_this, file)
38418
- }, "\u91CD\u65B0\u4E0A\u4F20"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.createElement("a", {
38303
+ }, "\u91CD\u65B0\u4E0A\u4F20"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default.a.createElement("a", {
38419
38304
  href: "true",
38420
38305
  className: "".concat(prefixCls, "-").concat(listType, "-list-item-delete"),
38421
38306
  onClick: handleRemove.bind(_this, file)
38422
- }, "\u5220\u9664"))) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.createElement(_image__WEBPACK_IMPORTED_MODULE_28__["default"], {
38307
+ }, "\u5220\u9664"))) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default.a.createElement(_image__WEBPACK_IMPORTED_MODULE_31__["default"], {
38423
38308
  onClick: handlePreview,
38424
38309
  previewType: "upload",
38425
38310
  name: file.name,
38426
- size: Object(_utils__WEBPACK_IMPORTED_MODULE_27__["getFileSize"])(file.size),
38311
+ size: Object(_utils__WEBPACK_IMPORTED_MODULE_30__["getFileSize"])(file.size),
38427
38312
  src: file.thumbUrl || file.url,
38428
38313
  style: {
38429
38314
  width: '100%',
38430
38315
  height: '100%'
38431
38316
  },
38432
- operations: disabled ? [] : [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.createElement(_icon__WEBPACK_IMPORTED_MODULE_23__["default"], {
38317
+ operations: disabled ? [] : [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_22___default.a.createElement(_icon__WEBPACK_IMPORTED_MODULE_26__["default"], {
38433
38318
  key: "1",
38434
38319
  type: "delete",
38435
38320
  onClick: handleRemove.bind(_this, file)
38436
38321
  })]
38437
38322
  }));
38438
38323
  };
38439
- var Upload = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_19___default.a.forwardRef(InternalUpload);
38324
+ var Upload = /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_22__["forwardRef"])(InternalUpload);
38440
38325
  Upload.displayName = 'Upload';
38441
38326
  /* harmony default export */ __webpack_exports__["default"] = (Upload);
38442
38327
 
@@ -117704,6 +117589,49 @@ function eq(value, other) {
117704
117589
  module.exports = eq;
117705
117590
 
117706
117591
 
117592
+ /***/ }),
117593
+
117594
+ /***/ "./node_modules/lodash/escapeRegExp.js":
117595
+ /*!*********************************************!*\
117596
+ !*** ./node_modules/lodash/escapeRegExp.js ***!
117597
+ \*********************************************/
117598
+ /*! no static exports found */
117599
+ /***/ (function(module, exports, __webpack_require__) {
117600
+
117601
+ var toString = __webpack_require__(/*! ./toString */ "./node_modules/lodash/toString.js");
117602
+
117603
+ /**
117604
+ * Used to match `RegExp`
117605
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
117606
+ */
117607
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
117608
+ reHasRegExpChar = RegExp(reRegExpChar.source);
117609
+
117610
+ /**
117611
+ * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
117612
+ * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
117613
+ *
117614
+ * @static
117615
+ * @memberOf _
117616
+ * @since 3.0.0
117617
+ * @category String
117618
+ * @param {string} [string=''] The string to escape.
117619
+ * @returns {string} Returns the escaped string.
117620
+ * @example
117621
+ *
117622
+ * _.escapeRegExp('[lodash](https://lodash.com/)');
117623
+ * // => '\[lodash\]\(https://lodash\.com/\)'
117624
+ */
117625
+ function escapeRegExp(string) {
117626
+ string = toString(string);
117627
+ return (string && reHasRegExpChar.test(string))
117628
+ ? string.replace(reRegExpChar, '\\$&')
117629
+ : string;
117630
+ }
117631
+
117632
+ module.exports = escapeRegExp;
117633
+
117634
+
117707
117635
  /***/ }),
117708
117636
 
117709
117637
  /***/ "./node_modules/lodash/findLast.js":