@fle-ui/next 1.0.0 → 1.0.4-alpha.0

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 (198) hide show
  1. package/.history/.gitignore_20210922213827 +27 -0
  2. package/.history/.gitignore_20211029154108 +29 -0
  3. package/.history/.gitignore_20211029154109 +29 -0
  4. package/.history/.gitignore_20211029173434 +29 -0
  5. package/.history/.umirc_20210922213827.ts +153 -0
  6. package/.history/.umirc_20211018162341.ts +153 -0
  7. package/.history/{package_20211018113630.json → package_20211213140100.json} +7 -3
  8. package/.history/{package_20211018113634.json → package_20211223145956.json} +8 -3
  9. package/.history/{package_20211013165524.json → package_20211223211341.json} +9 -4
  10. package/.history/{package_20211018101440.json → package_20211223220710.json} +9 -4
  11. package/.history/package_20211223221147.json +146 -0
  12. package/.history/package_20211223221328.json +146 -0
  13. package/.history/package_20211223221445.json +146 -0
  14. package/.umirc.ts +2 -0
  15. package/dist/@fle-ui/next.css +2304 -2261
  16. package/dist/@fle-ui/next.css.map +1 -1
  17. package/dist/@fle-ui/next.js +1166 -1248
  18. package/dist/@fle-ui/next.js.map +1 -1
  19. package/dist/@fle-ui/next.min.css +3 -3
  20. package/dist/@fle-ui/next.min.css.map +1 -1
  21. package/dist/@fle-ui/next.min.js +3 -3
  22. package/dist/@fle-ui/next.min.js.map +1 -1
  23. package/docs-dist/{components__affix__affix.md~components__alert__alert.md~components__anchor__anchor.md~components__au~00d1741d.js → components__affix__affix.md~components__alert__alert.md~components__anchor__anchor.md~components__au~31d645aa.js} +2690 -1940
  24. package/docs-dist/components__avatar__avatar.md.js +227 -372
  25. package/docs-dist/components__button__button.md.js +27 -27
  26. package/docs-dist/components__form__form.md.js +1 -1
  27. package/docs-dist/components__layout__layout.md.js +1 -1
  28. package/docs-dist/components__modal__modal.md.js +17 -11
  29. package/docs-dist/components__popconfirm__popconfirm.md.js +51 -51
  30. package/docs-dist/components__skeleton__skeleton.md.chunk.css +1 -0
  31. package/docs-dist/components__skeleton__skeleton.md.js +1080 -0
  32. package/docs-dist/components__slider__slider.md.js +1 -1
  33. package/docs-dist/components__space__space.md.js +1 -1
  34. package/docs-dist/components__spin__spin.md.js +1 -1
  35. package/docs-dist/components__statistic__statistic.md.js +1 -1
  36. package/docs-dist/components__steps__steps.md.js +1 -1
  37. package/docs-dist/components__switch__switch.md.js +1 -1
  38. package/docs-dist/components__table__table.md.js +1 -1
  39. package/docs-dist/components__tabs__tabs.md.js +1 -1
  40. package/docs-dist/components__tag__tag.md.js +1 -1
  41. package/docs-dist/components__time-picker__time-picker.md.js +1 -1
  42. package/docs-dist/components__timeline__timeline.md.js +1 -1
  43. package/docs-dist/components__tooltip__tooltip.md.js +1 -1
  44. package/docs-dist/components__transfer__transfer.md.js +1 -1
  45. package/docs-dist/components__tree-select__tree-select.md.js +1 -1
  46. package/docs-dist/components__tree__tree.md.chunk.css +1 -0
  47. package/docs-dist/components__tree__tree.md.js +1775 -0
  48. package/docs-dist/components__typography__typography.md.js +1 -1
  49. package/docs-dist/components__upload__upload.md.js +7 -11
  50. package/docs-dist/demos_bmurcdaerb.js +1 -1
  51. package/docs-dist/demos_bmurcdaerb~demos_citsitats~demos_dirg~demos_drac~demos_ecaps~demos_eert~demos_egami~demos_egas~1a5cf206.chunk.css +2 -0
  52. package/docs-dist/{demos_bmurcdaerb~demos_citsitats~demos_dirg~demos_drac~demos_ecaps~demos_egami~demos_egassem~demos_e~57973d2f.js → demos_bmurcdaerb~demos_citsitats~demos_dirg~demos_drac~demos_ecaps~demos_eert~demos_egami~demos_egas~1a5cf206.js} +1536 -1843
  53. package/docs-dist/demos_citsitats.js +1 -1
  54. package/docs-dist/demos_daolpu.chunk.css +2 -2
  55. package/docs-dist/demos_daolpu.js +2598 -2905
  56. package/docs-dist/demos_dirg.js +1 -1
  57. package/docs-dist/demos_drac.js +1 -1
  58. package/docs-dist/demos_ecaps.js +1 -1
  59. package/docs-dist/demos_eert.chunk.css +1 -0
  60. package/docs-dist/demos_eert.js +1203 -0
  61. package/docs-dist/demos_egami.js +1 -1
  62. package/docs-dist/demos_egassem.js +1 -1
  63. package/docs-dist/demos_egdab.js +1 -1
  64. package/docs-dist/demos_elbat.chunk.css +2 -2
  65. package/docs-dist/demos_elbat.js +649 -956
  66. package/docs-dist/demos_enilemit.js +1 -1
  67. package/docs-dist/demos_espalloc.js +1 -1
  68. package/docs-dist/demos_etar.js +75 -70
  69. package/docs-dist/demos_etelpmoc-otua.js +1 -1
  70. package/docs-dist/demos_gat.js +1 -1
  71. package/docs-dist/demos_hctiws.js +1 -1
  72. package/docs-dist/demos_ladom.js +1 -1
  73. package/docs-dist/demos_lesuorac.js +1 -1
  74. package/docs-dist/demos_mrifnocpop.js +2 -2
  75. package/docs-dist/demos_mrof.js +1 -2
  76. package/docs-dist/demos_nips.js +1 -1
  77. package/docs-dist/demos_noitacifiton.js +2 -2
  78. package/docs-dist/demos_noitanigap.js +1 -1
  79. package/docs-dist/demos_noteleks.js +691 -0
  80. package/docs-dist/demos_nottub.js +1 -1
  81. package/docs-dist/demos_nwodpord.js +1 -1
  82. package/docs-dist/demos_oidar.js +1 -1
  83. package/docs-dist/demos_pitloot.js +1 -1
  84. package/docs-dist/demos_pot-kcab.js +10 -10
  85. package/docs-dist/demos_radnelac.js +1 -1
  86. package/docs-dist/demos_ratava.js +4 -4
  87. package/docs-dist/demos_rebmun-tupni.js +1 -1
  88. package/docs-dist/demos_redacsac.js +1 -1
  89. package/docs-dist/demos_redaeh-egap.js +1 -1
  90. package/docs-dist/demos_redils.js +1 -1
  91. package/docs-dist/demos_redivid.js +1 -1
  92. package/docs-dist/demos_redivorp-gifnoc.js +6 -6
  93. package/docs-dist/demos_refsnart.js +1 -1
  94. package/docs-dist/demos_rekcip-emit.js +1 -1
  95. package/docs-dist/demos_rekcip-etad.js +3 -3
  96. package/docs-dist/demos_revopop.js +1 -1
  97. package/docs-dist/demos_reward.js +1 -1
  98. package/docs-dist/demos_rohcna.js +1 -1
  99. package/docs-dist/demos_sbat.chunk.css +2 -2
  100. package/docs-dist/demos_sbat.js +2302 -2609
  101. package/docs-dist/demos_snoitnem.js +1 -1
  102. package/docs-dist/demos_snoitpircsed.js +1 -1
  103. package/docs-dist/demos_spets.js +1 -1
  104. package/docs-dist/demos_ssergorp.js +1 -1
  105. package/docs-dist/demos_tceles.js +1 -1
  106. package/docs-dist/demos_tluser.js +1 -1
  107. package/docs-dist/demos_tnemmoc.js +1 -1
  108. package/docs-dist/demos_trela.js +1 -1
  109. package/docs-dist/demos_tsil.js +1 -1
  110. package/docs-dist/demos_tuoyal.js +1 -1
  111. package/docs-dist/demos_tupni.js +2 -2
  112. package/docs-dist/demos_unem.js +1 -1
  113. package/docs-dist/demos_xiffa.js +1 -1
  114. package/docs-dist/demos_xobkcehc.js +1 -1
  115. package/docs-dist/demos_yhpargopyt.js +1 -1
  116. package/docs-dist/demos_ytpme.js +1 -1
  117. package/docs-dist/docs__document__getting-started.md.js +1 -1
  118. package/docs-dist/docs__document__introduce.md.js +1 -1
  119. package/docs-dist/docs__document__practical-projects.md.js +1 -1
  120. package/docs-dist/docs__index.md.js +1 -1
  121. package/docs-dist/docs__story__index.md.js +23 -1
  122. package/docs-dist/dumi_demos.js +1 -1
  123. package/docs-dist/umi.js +475 -242
  124. package/docs-dist/{vendors~components__affix__affix.md~components__alert__alert.md~components__anchor__anchor.md~compon~e29e5a37.chunk.css → vendors~components__affix__affix.md~components__alert__alert.md~components__anchor__anchor.md~compon~06d8f7d3.chunk.css} +0 -0
  125. package/docs-dist/{vendors~components__affix__affix.md~components__alert__alert.md~components__anchor__anchor.md~compon~e29e5a37.js → vendors~components__affix__affix.md~components__alert__alert.md~components__anchor__anchor.md~compon~06d8f7d3.js} +0 -0
  126. package/docs-dist/{vendors~components__affix__affix.md~components__alert__alert.md~components__anchor__anchor.md~compon~ac3aca9a.js → vendors~components__affix__affix.md~components__alert__alert.md~components__anchor__anchor.md~compon~11c8b8d8.js} +0 -0
  127. package/docs-dist/{vendors~components__affix__affix.md~components__alert__alert.md~components__anchor__anchor.md~compon~3ba4f4a1.js → vendors~components__affix__affix.md~components__alert__alert.md~components__anchor__anchor.md~compon~44483e31.js} +0 -0
  128. package/docs-dist/{vendors~demos_bmurcdaerb~demos_citsitats~demos_daolpu~demos_dirg~demos_drac~demos_ecaps~demos_egami~~4cc402e9.js → vendors~demos_bmurcdaerb~demos_citsitats~demos_daolpu~demos_dirg~demos_drac~demos_ecaps~demos_eert~d~f20ff6ec.js} +9204 -8936
  129. package/docs-dist/vendors~demos_gat.js +1 -1
  130. package/docs-dist/vendors~demos_ladom.js +1 -1
  131. package/docs-dist/vendors~demos_redivorp-gifnoc.js +1 -1
  132. package/docs-dist/vendors~demos_sbat.js +1 -1
  133. package/docs-dist/vendors~demos_trela.js +1 -1
  134. package/docs-dist/vendors~demos_tsil.js +1 -1
  135. package/docs-dist/vendors~demos_tuoyal.js +1 -1
  136. package/docs-dist/vendors~wrappers.js +1 -1
  137. package/docs-dist/wrappers.js +2 -2
  138. package/es/badge/style/index.css +5 -5
  139. package/es/cascader/index.d.ts +11 -129
  140. package/es/cascader/index.js +151 -534
  141. package/es/cascader/style/css.js +1 -1
  142. package/es/cascader/style/index.css +205 -180
  143. package/es/cascader/style/index.d.ts +1 -1
  144. package/es/cascader/style/index.js +1 -1
  145. package/es/cascader/style/index.less +66 -205
  146. package/es/cascader/style/rtl.less +10 -84
  147. package/es/drawer/style/index.css +1 -1
  148. package/es/input-number/style/index.css +18 -4
  149. package/es/input-number/style/index.less +15 -2
  150. package/es/input-number/style/rtl.less +24 -7
  151. package/es/modal/style/index.css +10 -9
  152. package/es/modal/style/modal.less +3 -2
  153. package/es/popover/style/index.css +2 -2
  154. package/es/progress/style/index.css +3 -3
  155. package/es/result/noFound.js +1 -1
  156. package/es/result/style/index.css +1 -1
  157. package/es/style/color/colors.less +3 -3
  158. package/es/style/theme.less +7 -4
  159. package/es/table/demo/drag-sorting/index.less +2 -2
  160. package/es/table/style/index.css +3 -0
  161. package/es/tag/style/index.css +5 -5
  162. package/es/tooltip/style/index.css +2 -2
  163. package/es/upload/style/index.css +2 -2
  164. package/es/upload/style/index.less +5 -3
  165. package/lib/badge/style/index.css +5 -5
  166. package/lib/cascader/index.d.ts +11 -129
  167. package/lib/cascader/index.js +153 -545
  168. package/lib/cascader/style/css.js +1 -1
  169. package/lib/cascader/style/index.css +205 -180
  170. package/lib/cascader/style/index.d.ts +1 -1
  171. package/lib/cascader/style/index.js +1 -1
  172. package/lib/cascader/style/index.less +66 -205
  173. package/lib/cascader/style/rtl.less +10 -84
  174. package/lib/drawer/style/index.css +1 -1
  175. package/lib/input-number/style/index.css +18 -4
  176. package/lib/input-number/style/index.less +15 -2
  177. package/lib/input-number/style/rtl.less +24 -7
  178. package/lib/modal/style/index.css +10 -9
  179. package/lib/modal/style/modal.less +3 -2
  180. package/lib/popover/style/index.css +2 -2
  181. package/lib/progress/style/index.css +3 -3
  182. package/lib/result/noFound.js +1 -1
  183. package/lib/result/style/index.css +1 -1
  184. package/lib/style/color/colors.less +3 -3
  185. package/lib/style/theme.less +7 -4
  186. package/lib/table/demo/drag-sorting/index.less +2 -2
  187. package/lib/table/style/index.css +3 -0
  188. package/lib/tag/style/index.css +5 -5
  189. package/lib/tooltip/style/index.css +2 -2
  190. package/lib/upload/style/index.css +2 -2
  191. package/lib/upload/style/index.less +5 -3
  192. package/package.json +3 -2
  193. package/report.html +2 -2
  194. package/.history/package_20211011190148.json +0 -141
  195. package/.history/package_20211011193053.json +0 -141
  196. package/.history/package_20211018113658.json +0 -141
  197. package/.history/package_20211018113740.json +0 -141
  198. package/docs-dist/demos_bmurcdaerb~demos_citsitats~demos_dirg~demos_drac~demos_ecaps~demos_egami~demos_egassem~demos_e~57973d2f.chunk.css +0 -2
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * @fle-ui/next v1.0.0
3
+ * @fle-ui/next v1.0.4-alpha.0
4
4
  *
5
5
  * Copyright 2015-present, Alipay, Inc.
6
6
  * All rights reserved.
@@ -5690,43 +5690,24 @@ __webpack_require__.r(__webpack_exports__);
5690
5690
 
5691
5691
  "use strict";
5692
5692
  /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js");
5693
- /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js");
5694
- /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js");
5695
- /* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");
5696
- /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js");
5697
- /* harmony import */ var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createSuper */ "./node_modules/@babel/runtime/helpers/esm/createSuper.js");
5698
- /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
5699
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
5700
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react */ "react");
5701
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_8__);
5702
- /* harmony import */ var rc_cascader__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! rc-cascader */ "./node_modules/rc-cascader/es/index.js");
5703
- /* harmony import */ var array_tree_filter__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! array-tree-filter */ "./node_modules/array-tree-filter/lib/index.js");
5704
- /* harmony import */ var array_tree_filter__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(array_tree_filter__WEBPACK_IMPORTED_MODULE_10__);
5705
- /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
5706
- /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_11__);
5707
- /* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! rc-util/es/omit */ "./node_modules/rc-util/es/omit.js");
5708
- /* harmony import */ var rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! rc-util/es/KeyCode */ "./node_modules/rc-util/es/KeyCode.js");
5709
- /* harmony import */ var _ant_design_icons_es_icons_CloseCircleFilled__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @ant-design/icons/es/icons/CloseCircleFilled */ "./node_modules/@ant-design/icons/es/icons/CloseCircleFilled.js");
5710
- /* harmony import */ var _ant_design_icons_es_icons_DownOutlined__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @ant-design/icons/es/icons/DownOutlined */ "./node_modules/@ant-design/icons/es/icons/DownOutlined.js");
5711
- /* harmony import */ var _ant_design_icons_es_icons_RightOutlined__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @ant-design/icons/es/icons/RightOutlined */ "./node_modules/@ant-design/icons/es/icons/RightOutlined.js");
5712
- /* harmony import */ var _ant_design_icons_es_icons_RedoOutlined__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @ant-design/icons/es/icons/RedoOutlined */ "./node_modules/@ant-design/icons/es/icons/RedoOutlined.js");
5713
- /* harmony import */ var _ant_design_icons_es_icons_LeftOutlined__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @ant-design/icons/es/icons/LeftOutlined */ "./node_modules/@ant-design/icons/es/icons/LeftOutlined.js");
5714
- /* harmony import */ var _input__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../input */ "./components/input/index.tsx");
5715
- /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx");
5716
- /* harmony import */ var _locale_provider_LocaleReceiver__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../locale-provider/LocaleReceiver */ "./components/locale-provider/LocaleReceiver.tsx");
5717
- /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../_util/devWarning */ "./components/_util/devWarning.ts");
5718
- /* harmony import */ var _config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../config-provider/SizeContext */ "./components/config-provider/SizeContext.tsx");
5719
- /* harmony import */ var _util_reactNode__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../_util/reactNode */ "./components/_util/reactNode.ts");
5720
- /* harmony import */ var _util_motion__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../_util/motion */ "./components/_util/motion.tsx");
5721
-
5722
-
5723
-
5724
-
5725
-
5726
-
5727
-
5728
-
5729
-
5693
+ /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
5694
+ /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js");
5695
+ /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js");
5696
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
5697
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ "react");
5698
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__);
5699
+ /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
5700
+ /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_6__);
5701
+ /* harmony import */ var rc_cascader__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rc-cascader */ "./node_modules/rc-cascader/es/index.js");
5702
+ /* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rc-util/es/omit */ "./node_modules/rc-util/es/omit.js");
5703
+ /* harmony import */ var _ant_design_icons_es_icons_RightOutlined__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @ant-design/icons/es/icons/RightOutlined */ "./node_modules/@ant-design/icons/es/icons/RightOutlined.js");
5704
+ /* harmony import */ var _ant_design_icons_es_icons_RedoOutlined__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @ant-design/icons/es/icons/RedoOutlined */ "./node_modules/@ant-design/icons/es/icons/RedoOutlined.js");
5705
+ /* harmony import */ var _ant_design_icons_es_icons_LeftOutlined__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @ant-design/icons/es/icons/LeftOutlined */ "./node_modules/@ant-design/icons/es/icons/LeftOutlined.js");
5706
+ /* harmony import */ var _util_devWarning__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../_util/devWarning */ "./components/_util/devWarning.ts");
5707
+ /* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../config-provider */ "./components/config-provider/index.tsx");
5708
+ /* harmony import */ var _config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../config-provider/SizeContext */ "./components/config-provider/SizeContext.tsx");
5709
+ /* harmony import */ var _select_utils_iconUtil__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../select/utils/iconUtil */ "./components/select/utils/iconUtil.tsx");
5710
+ /* harmony import */ var _util_motion__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../_util/motion */ "./components/_util/motion.tsx");
5730
5711
 
5731
5712
 
5732
5713
 
@@ -5743,548 +5724,174 @@ __webpack_require__.r(__webpack_exports__);
5743
5724
 
5744
5725
 
5745
5726
 
5746
- // We limit the filtered item count by default
5747
5727
 
5748
- var defaultLimit = 50; // keep value when filtering
5749
5728
 
5750
- var keepFilteredValueField = '__KEEP_FILTERED_OPTION_VALUE';
5729
+ function highlightKeyword(str, lowerKeyword, prefixCls) {
5730
+ var cells = str.toLowerCase().split(lowerKeyword) // @ts-ignore
5731
+ .reduce( // @ts-ignore
5732
+ function (list, cur, index) {
5733
+ return (// @ts-ignore
5734
+ index === 0 ? [cur] : [].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(list), [lowerKeyword, cur])
5735
+ );
5736
+ }, []);
5737
+ var fillCells = [];
5738
+ var start = 0; // @ts-ignore
5751
5739
 
5752
- function highlightKeyword(str, keyword, prefixCls) {
5753
- return str.split(keyword).map(function (node, index) {
5754
- return index === 0 ? node : [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__["createElement"]("span", {
5755
- className: "".concat(prefixCls, "-menu-item-keyword"),
5756
- key: "seperator"
5757
- }, keyword), node];
5758
- });
5759
- }
5740
+ cells.forEach(function (cell, index) {
5741
+ var end = start + cell.length;
5742
+ var originWorld = str.slice(start, end);
5743
+ start = end;
5760
5744
 
5761
- function defaultFilterOption(inputValue, path, names) {
5762
- return path.some(function (option) {
5763
- return option[names.label].indexOf(inputValue) > -1;
5764
- });
5765
- }
5745
+ if (index % 2 === 1) {
5746
+ originWorld = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"]("span", {
5747
+ className: "".concat(prefixCls, "-menu-item-keyword"),
5748
+ key: "seperator"
5749
+ }, originWorld);
5750
+ }
5766
5751
 
5767
- function defaultRenderFilteredOption(inputValue, path, prefixCls, names) {
5768
- return path.map(function (option, index) {
5769
- var label = option[names.label];
5770
- var node = label.indexOf(inputValue) > -1 ? highlightKeyword(label, inputValue, prefixCls) : label;
5771
- return index === 0 ? node : [' / ', node];
5752
+ fillCells.push(originWorld);
5772
5753
  });
5754
+ return fillCells;
5773
5755
  }
5774
5756
 
5775
- function defaultSortFilteredOption(a, b, inputValue, names) {
5776
- function callback(elem) {
5777
- return elem[names.label].indexOf(inputValue) > -1;
5778
- }
5779
-
5780
- return a.findIndex(callback) - b.findIndex(callback);
5781
- }
5757
+ var defaultSearchRender = function defaultSearchRender(inputValue, path, prefixCls, fieldNames) {
5758
+ var optionList = []; // We do lower here to save perf
5782
5759
 
5783
- function getFieldNames(_ref) {
5784
- var fieldNames = _ref.fieldNames;
5785
- return fieldNames;
5786
- }
5760
+ var lower = inputValue.toLowerCase();
5761
+ path.forEach(function (node, index) {
5762
+ if (index !== 0) {
5763
+ optionList.push(' / ');
5764
+ }
5787
5765
 
5788
- function getFilledFieldNames(props) {
5789
- var fieldNames = getFieldNames(props) || {};
5790
- var names = {
5791
- children: fieldNames.children || 'children',
5792
- label: fieldNames.label || 'label',
5793
- value: fieldNames.value || 'value'
5794
- };
5795
- return names;
5796
- }
5766
+ var label = node[fieldNames.label];
5797
5767
 
5798
- function flattenTree(options, props) {
5799
- var ancestor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
5800
- var names = getFilledFieldNames(props);
5801
- var flattenOptions = [];
5802
- var childrenName = names.children;
5803
- options.forEach(function (option) {
5804
- var path = ancestor.concat(option);
5768
+ var type = Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(label);
5805
5769
 
5806
- if (props.changeOnSelect || !option[childrenName] || !option[childrenName].length) {
5807
- flattenOptions.push(path);
5770
+ if (type === 'string' || type === 'number') {
5771
+ label = highlightKeyword(String(label), lower, prefixCls);
5808
5772
  }
5809
5773
 
5810
- if (option[childrenName]) {
5811
- flattenOptions = flattenOptions.concat(flattenTree(option[childrenName], props, path));
5812
- }
5774
+ optionList.push(label);
5813
5775
  });
5814
- return flattenOptions;
5815
- }
5816
-
5817
- var defaultDisplayRender = function defaultDisplayRender(label) {
5818
- return label.join(' / ');
5776
+ return optionList;
5819
5777
  };
5820
5778
 
5821
- function warningValueNotExist(list) {
5822
- var fieldNames = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
5823
- (list || []).forEach(function (item) {
5824
- var valueFieldName = fieldNames.value || 'value';
5825
- if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_22__[/* default */ "a"])(valueFieldName in item, 'Cascader', 'Not found `value` in `options`.');
5826
- warningValueNotExist(item[fieldNames.children || 'children'], fieldNames);
5827
- });
5828
- }
5829
-
5830
- function getEmptyNode(renderEmpty, names, notFoundContent) {
5831
- var _ref2;
5832
-
5833
- return _ref2 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_ref2, names.value, 'ANT_CASCADER_NOT_FOUND'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_ref2, names.label, notFoundContent || renderEmpty('Cascader')), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_ref2, "disabled", true), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_ref2, "isEmptyNode", true), _ref2;
5834
- }
5835
-
5836
- var Cascader = /*#__PURE__*/function (_React$Component) {
5837
- Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(Cascader, _React$Component);
5838
-
5839
- var _super = Object(_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(Cascader);
5840
-
5841
- function Cascader(props) {
5842
- var _this;
5843
-
5844
- Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(this, Cascader);
5845
-
5846
- _this = _super.call(this, props);
5847
- _this.cachedOptions = [];
5848
-
5849
- _this.setValue = function (value) {
5850
- var selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
5851
-
5852
- if (!('value' in _this.props)) {
5853
- _this.setState({
5854
- value: value
5855
- });
5856
- }
5857
-
5858
- var onChange = _this.props.onChange;
5859
- onChange === null || onChange === void 0 ? void 0 : onChange(value, selectedOptions);
5860
- };
5861
-
5862
- _this.saveInput = function (node) {
5863
- _this.input = node;
5864
- };
5865
-
5866
- _this.handleChange = function (value, selectedOptions) {
5867
- _this.setState({
5868
- inputValue: ''
5869
- });
5870
-
5871
- if (selectedOptions[0].__IS_FILTERED_OPTION) {
5872
- var unwrappedValue = selectedOptions[0][keepFilteredValueField] === undefined ? value[0] : selectedOptions[0][keepFilteredValueField];
5873
- var unwrappedSelectedOptions = selectedOptions[0].path;
5874
-
5875
- _this.setValue(unwrappedValue, unwrappedSelectedOptions);
5876
-
5877
- return;
5878
- }
5879
-
5880
- _this.setValue(value, selectedOptions);
5881
- };
5882
-
5883
- _this.handlePopupVisibleChange = function (popupVisible) {
5884
- if (!('popupVisible' in _this.props)) {
5885
- _this.setState(function (state) {
5886
- return {
5887
- popupVisible: popupVisible,
5888
- inputFocused: popupVisible,
5889
- inputValue: popupVisible ? state.inputValue : ''
5890
- };
5891
- });
5892
- }
5893
-
5894
- var onPopupVisibleChange = _this.props.onPopupVisibleChange;
5895
- onPopupVisibleChange === null || onPopupVisibleChange === void 0 ? void 0 : onPopupVisibleChange(popupVisible);
5896
- };
5897
-
5898
- _this.handleInputBlur = function () {
5899
- _this.setState({
5900
- inputFocused: false
5901
- });
5902
- };
5903
-
5904
- _this.handleInputClick = function (e) {
5905
- var _this$state = _this.state,
5906
- inputFocused = _this$state.inputFocused,
5907
- popupVisible = _this$state.popupVisible; // Prevent `Trigger` behaviour.
5908
-
5909
- if (inputFocused || popupVisible) {
5910
- e.stopPropagation();
5911
- }
5912
- };
5913
-
5914
- _this.handleKeyDown = function (e) {
5915
- // SPACE => https://github.com/ant-design/ant-design/issues/16871
5916
- if (e.keyCode === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].BACKSPACE || e.keyCode === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"].SPACE) {
5917
- e.stopPropagation();
5918
- }
5919
- };
5920
-
5921
- _this.handleInputChange = function (e) {
5922
- var popupVisible = _this.state.popupVisible;
5923
- var inputValue = e.target.value;
5924
-
5925
- if (!popupVisible) {
5926
- _this.handlePopupVisibleChange(true);
5927
- }
5928
-
5929
- _this.setState({
5930
- inputValue: inputValue
5931
- });
5932
- };
5933
-
5934
- _this.clearSelection = function (e) {
5935
- var inputValue = _this.state.inputValue;
5936
- e.preventDefault();
5937
- e.stopPropagation();
5938
-
5939
- if (!inputValue) {
5940
- _this.handlePopupVisibleChange(false);
5941
-
5942
- _this.clearSelectionTimeout = setTimeout(function () {
5943
- _this.setValue([]);
5944
- }, 200);
5945
- } else {
5946
- _this.setState({
5947
- inputValue: ''
5948
- });
5949
- }
5950
- };
5951
-
5952
- _this.renderCascader = function (_ref3, locale) {
5953
- var getContextPopupContainer = _ref3.getPopupContainer,
5954
- getPrefixCls = _ref3.getPrefixCls,
5955
- renderEmpty = _ref3.renderEmpty,
5956
- direction = _ref3.direction;
5957
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__["createElement"](_config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_23__[/* default */ "b"].Consumer, null, function (size) {
5958
- var _classNames, _classNames2, _classNames3, _classNames5;
5959
-
5960
- var _assertThisInitialize = Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_this),
5961
- props = _assertThisInitialize.props,
5962
- state = _assertThisInitialize.state;
5963
-
5964
- var customizePrefixCls = props.prefixCls,
5965
- customizeInputPrefixCls = props.inputPrefixCls,
5966
- children = props.children,
5967
- _props$placeholder = props.placeholder,
5968
- placeholder = _props$placeholder === void 0 ? locale.placeholder || 'Please select' : _props$placeholder,
5969
- customizeSize = props.size,
5970
- disabled = props.disabled,
5971
- className = props.className,
5972
- style = props.style,
5973
- allowClear = props.allowClear,
5974
- _props$showSearch = props.showSearch,
5975
- showSearch = _props$showSearch === void 0 ? false : _props$showSearch,
5976
- suffixIcon = props.suffixIcon,
5977
- expandIcon = props.expandIcon,
5978
- notFoundContent = props.notFoundContent,
5979
- popupClassName = props.popupClassName,
5980
- bordered = props.bordered,
5981
- dropdownRender = props.dropdownRender,
5982
- otherProps = Object(tslib__WEBPACK_IMPORTED_MODULE_7__[/* __rest */ "c"])(props, ["prefixCls", "inputPrefixCls", "children", "placeholder", "size", "disabled", "className", "style", "allowClear", "showSearch", "suffixIcon", "expandIcon", "notFoundContent", "popupClassName", "bordered", "dropdownRender"]);
5983
-
5984
- var mergedSize = customizeSize || size;
5985
- var value = state.value,
5986
- inputFocused = state.inputFocused;
5987
- var isRtlLayout = direction === 'rtl';
5988
- var prefixCls = getPrefixCls('cascader', customizePrefixCls);
5989
- var inputPrefixCls = getPrefixCls('input', customizeInputPrefixCls);
5990
- var sizeCls = classnames__WEBPACK_IMPORTED_MODULE_11___default()((_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_classNames, "".concat(inputPrefixCls, "-lg"), mergedSize === 'large'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_classNames, "".concat(inputPrefixCls, "-sm"), mergedSize === 'small'), _classNames));
5991
- var clearIcon = allowClear && !disabled && value.length > 0 || state.inputValue ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__["createElement"](_ant_design_icons_es_icons_CloseCircleFilled__WEBPACK_IMPORTED_MODULE_14__[/* default */ "a"], {
5992
- className: "".concat(prefixCls, "-picker-clear"),
5993
- onClick: _this.clearSelection
5994
- }) : null;
5995
- var arrowCls = classnames__WEBPACK_IMPORTED_MODULE_11___default()((_classNames2 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-picker-arrow"), true), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-picker-arrow-expand"), state.popupVisible), _classNames2));
5996
- var pickerCls = classnames__WEBPACK_IMPORTED_MODULE_11___default()("".concat(prefixCls, "-picker"), (_classNames3 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_classNames3, "".concat(prefixCls, "-picker-rtl"), isRtlLayout), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_classNames3, "".concat(prefixCls, "-picker-with-value"), state.inputValue), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_classNames3, "".concat(prefixCls, "-picker-disabled"), disabled), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_classNames3, "".concat(prefixCls, "-picker-").concat(mergedSize), !!mergedSize), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_classNames3, "".concat(prefixCls, "-picker-show-search"), !!showSearch), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_classNames3, "".concat(prefixCls, "-picker-focused"), inputFocused), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_classNames3, "".concat(prefixCls, "-picker-borderless"), !bordered), _classNames3), className); // Fix bug of https://github.com/facebook/react/pull/5004
5997
- // and https://fb.me/react-unknown-prop
5998
-
5999
- var inputProps = Object(rc_util_es_omit__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"])( // Not know why these props left
6000
- otherProps, ['onChange', 'options', 'popupPlacement', 'transitionName', 'displayRender', 'onPopupVisibleChange', 'changeOnSelect', 'expandTrigger', 'popupVisible', 'getPopupContainer', 'loadData', 'filterOption', 'renderFilteredOption', 'sortFilteredOption', 'fieldNames']);
6001
- var options = props.options;
6002
- var names = getFilledFieldNames(_this.props);
6003
-
6004
- if (options && options.length > 0) {
6005
- if (state.inputValue) {
6006
- options = _this.generateFilteredOptions(prefixCls, renderEmpty);
6007
- }
6008
- } else {
6009
- options = [getEmptyNode(renderEmpty, names, notFoundContent)];
6010
- } // Dropdown menu should keep previous status until it is fully closed.
6011
-
6012
-
6013
- if (!state.popupVisible) {
6014
- options = _this.cachedOptions;
6015
- } else {
6016
- _this.cachedOptions = options;
6017
- }
6018
-
6019
- var dropdownMenuColumnStyle = {};
6020
- var isNotFound = (options || []).length === 1 && options[0].isEmptyNode;
6021
-
6022
- if (isNotFound) {
6023
- dropdownMenuColumnStyle.height = 'auto'; // Height of one row.
6024
- } // The default value of `matchInputWidth` is `true`
5779
+ var Cascader = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["forwardRef"](function (props, ref) {
5780
+ var _classNames2;
6025
5781
 
5782
+ var customizePrefixCls = props.prefixCls,
5783
+ customizeSize = props.size,
5784
+ className = props.className,
5785
+ multiple = props.multiple,
5786
+ _props$bordered = props.bordered,
5787
+ bordered = _props$bordered === void 0 ? true : _props$bordered,
5788
+ transitionName = props.transitionName,
5789
+ _props$choiceTransiti = props.choiceTransitionName,
5790
+ choiceTransitionName = _props$choiceTransiti === void 0 ? '' : _props$choiceTransiti,
5791
+ popupClassName = props.popupClassName,
5792
+ dropdownClassName = props.dropdownClassName,
5793
+ expandIcon = props.expandIcon,
5794
+ showSearch = props.showSearch,
5795
+ _props$allowClear = props.allowClear,
5796
+ allowClear = _props$allowClear === void 0 ? true : _props$allowClear,
5797
+ notFoundContent = props.notFoundContent,
5798
+ direction = props.direction,
5799
+ getPopupContainer = props.getPopupContainer,
5800
+ rest = Object(tslib__WEBPACK_IMPORTED_MODULE_4__[/* __rest */ "c"])(props, ["prefixCls", "size", "className", "multiple", "bordered", "transitionName", "choiceTransitionName", "popupClassName", "dropdownClassName", "expandIcon", "showSearch", "allowClear", "notFoundContent", "direction", "getPopupContainer"]);
6026
5801
 
6027
- var resultListMatchInputWidth = showSearch.matchInputWidth !== false;
5802
+ var restProps = Object(rc_util_es_omit__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(rest, ['suffixIcon']);
6028
5803
 
6029
- if (resultListMatchInputWidth && (state.inputValue || isNotFound) && _this.input) {
6030
- dropdownMenuColumnStyle.width = _this.input.input.offsetWidth;
6031
- }
5804
+ var _React$useContext = react__WEBPACK_IMPORTED_MODULE_5__["useContext"](_config_provider__WEBPACK_IMPORTED_MODULE_13__[/* ConfigContext */ "b"]),
5805
+ getContextPopupContainer = _React$useContext.getPopupContainer,
5806
+ getPrefixCls = _React$useContext.getPrefixCls,
5807
+ renderEmpty = _React$useContext.renderEmpty,
5808
+ rootDirection = _React$useContext.direction;
6032
5809
 
6033
- var inputIcon;
5810
+ var mergedDirection = direction || rootDirection;
5811
+ var isRtl = mergedDirection === 'rtl'; // =================== Warning =====================
6034
5812
 
6035
- if (suffixIcon) {
6036
- inputIcon = Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_24__[/* replaceElement */ "c"])(suffixIcon, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__["createElement"]("span", {
6037
- className: "".concat(prefixCls, "-picker-arrow")
6038
- }, suffixIcon), function () {
6039
- var _classNames4;
5813
+ if (true) {
5814
+ if (true) Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"])(popupClassName === undefined, 'Cascader', '`popupClassName` is deprecated. Please use `dropdownClassName` instead.');
5815
+ } // =================== No Found ====================
6040
5816
 
6041
- return {
6042
- className: classnames__WEBPACK_IMPORTED_MODULE_11___default()((_classNames4 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_classNames4, suffixIcon.props.className, suffixIcon.props.className), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_classNames4, "".concat(prefixCls, "-picker-arrow"), true), _classNames4))
6043
- };
6044
- });
6045
- } else {
6046
- inputIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__["createElement"](_ant_design_icons_es_icons_DownOutlined__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"], {
6047
- className: arrowCls
6048
- });
6049
- }
6050
5817
 
6051
- var input = children || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__["createElement"]("span", {
6052
- style: style,
6053
- className: pickerCls
6054
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__["createElement"]("span", {
6055
- className: "".concat(prefixCls, "-picker-label")
6056
- }, _this.getLabel()), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__["createElement"](_input__WEBPACK_IMPORTED_MODULE_19__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, inputProps, {
6057
- tabIndex: -1,
6058
- ref: _this.saveInput,
6059
- prefixCls: inputPrefixCls,
6060
- placeholder: value && value.length > 0 ? undefined : placeholder,
6061
- className: "".concat(prefixCls, "-input ").concat(sizeCls),
6062
- value: state.inputValue,
6063
- disabled: disabled,
6064
- readOnly: !showSearch,
6065
- autoComplete: inputProps.autoComplete || 'off',
6066
- onClick: showSearch ? _this.handleInputClick : undefined,
6067
- onBlur: showSearch ? _this.handleInputBlur : undefined,
6068
- onKeyDown: _this.handleKeyDown,
6069
- onChange: showSearch ? _this.handleInputChange : undefined
6070
- })), clearIcon, inputIcon);
6071
- var expandIconNode;
6072
-
6073
- if (expandIcon) {
6074
- expandIconNode = expandIcon;
6075
- } else {
6076
- expandIconNode = isRtlLayout ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__["createElement"](_ant_design_icons_es_icons_LeftOutlined__WEBPACK_IMPORTED_MODULE_18__[/* default */ "a"], null) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__["createElement"](_ant_design_icons_es_icons_RightOutlined__WEBPACK_IMPORTED_MODULE_16__[/* default */ "a"], null);
6077
- }
5818
+ var mergedNotFoundContent = notFoundContent || renderEmpty('Cascader'); // ==================== Prefix =====================
6078
5819
 
6079
- var loadingIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__["createElement"]("span", {
6080
- className: "".concat(prefixCls, "-menu-item-loading-icon")
6081
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__["createElement"](_ant_design_icons_es_icons_RedoOutlined__WEBPACK_IMPORTED_MODULE_17__[/* default */ "a"], {
6082
- spin: true
6083
- }));
6084
- var getPopupContainer = props.getPopupContainer || getContextPopupContainer;
6085
- var rest = Object(rc_util_es_omit__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"])(props, ['inputIcon', 'expandIcon', 'loadingIcon', 'bordered', 'className']);
6086
- var rcCascaderPopupClassName = classnames__WEBPACK_IMPORTED_MODULE_11___default()(popupClassName, (_classNames5 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_classNames5, "".concat(prefixCls, "-menu-").concat(direction), direction === 'rtl'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_classNames5, "".concat(prefixCls, "-menu-empty"), options.length === 1 && options[0].value === 'ANT_CASCADER_NOT_FOUND'), _classNames5));
6087
- var rootPrefixCls = getPrefixCls();
6088
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__["createElement"](rc_cascader__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, rest, {
6089
- prefixCls: prefixCls,
6090
- getPopupContainer: getPopupContainer,
6091
- options: options,
6092
- value: value,
6093
- popupVisible: state.popupVisible,
6094
- onPopupVisibleChange: _this.handlePopupVisibleChange,
6095
- onChange: _this.handleChange,
6096
- dropdownMenuColumnStyle: dropdownMenuColumnStyle,
6097
- expandIcon: expandIconNode,
6098
- loadingIcon: loadingIcon,
6099
- popupClassName: rcCascaderPopupClassName,
6100
- popupPlacement: _this.getPopupPlacement(direction),
6101
- // rc-cascader should update ts define to fix this case
6102
- dropdownRender: dropdownRender,
6103
- transitionName: Object(_util_motion__WEBPACK_IMPORTED_MODULE_25__[/* getTransitionName */ "b"])(rootPrefixCls, 'slide-up', props.transitionName)
6104
- }), input);
6105
- });
6106
- };
5820
+ var rootPrefixCls = getPrefixCls();
5821
+ var prefixCls = getPrefixCls('select', customizePrefixCls);
5822
+ var cascaderPrefixCls = getPrefixCls('cascader', customizePrefixCls); // =================== Dropdown ====================
6107
5823
 
6108
- _this.state = {
6109
- value: props.value || props.defaultValue || [],
6110
- inputValue: '',
6111
- inputFocused: false,
6112
- popupVisible: props.popupVisible,
6113
- flattenOptions: props.showSearch ? flattenTree(props.options, props) : undefined,
6114
- prevProps: props
6115
- };
6116
- return _this;
6117
- }
5824
+ var mergedDropdownClassName = classnames__WEBPACK_IMPORTED_MODULE_6___default()(dropdownClassName || popupClassName, "".concat(cascaderPrefixCls, "-dropdown"), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, "".concat(cascaderPrefixCls, "-dropdown-rtl"), mergedDirection === 'rtl')); // ==================== Search =====================
6118
5825
 
6119
- Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(Cascader, [{
6120
- key: "componentWillUnmount",
6121
- value: function componentWillUnmount() {
6122
- if (this.clearSelectionTimeout) {
6123
- clearTimeout(this.clearSelectionTimeout);
6124
- }
5826
+ var mergedShowSearch = react__WEBPACK_IMPORTED_MODULE_5__["useMemo"](function () {
5827
+ if (!showSearch) {
5828
+ return showSearch;
6125
5829
  }
6126
- }, {
6127
- key: "getLabel",
6128
- value: function getLabel() {
6129
- var _this$props = this.props,
6130
- options = _this$props.options,
6131
- _this$props$displayRe = _this$props.displayRender,
6132
- displayRender = _this$props$displayRe === void 0 ? defaultDisplayRender : _this$props$displayRe;
6133
- var names = getFilledFieldNames(this.props);
6134
- var value = this.state.value;
6135
- var unwrappedValue = Array.isArray(value[0]) ? value[0] : value;
6136
- var selectedOptions = array_tree_filter__WEBPACK_IMPORTED_MODULE_10___default()(options, function (o, level) {
6137
- return o[names.value] === unwrappedValue[level];
6138
- }, {
6139
- childrenKeyName: names.children
6140
- });
6141
- var label = selectedOptions.length ? selectedOptions.map(function (o) {
6142
- return o[names.label];
6143
- }) : value;
6144
- return displayRender(label, selectedOptions);
6145
- }
6146
- }, {
6147
- key: "generateFilteredOptions",
6148
- value: function generateFilteredOptions(prefixCls, renderEmpty) {
6149
- var _this2 = this;
6150
-
6151
- var _this$props2 = this.props,
6152
- showSearch = _this$props2.showSearch,
6153
- notFoundContent = _this$props2.notFoundContent;
6154
- var names = getFilledFieldNames(this.props);
6155
- var _showSearch$filter = showSearch.filter,
6156
- filter = _showSearch$filter === void 0 ? defaultFilterOption : _showSearch$filter,
6157
- _showSearch$render = showSearch.render,
6158
- render = _showSearch$render === void 0 ? defaultRenderFilteredOption : _showSearch$render,
6159
- _showSearch$sort = showSearch.sort,
6160
- sort = _showSearch$sort === void 0 ? defaultSortFilteredOption : _showSearch$sort,
6161
- _showSearch$limit = showSearch.limit,
6162
- limit = _showSearch$limit === void 0 ? defaultLimit : _showSearch$limit;
6163
- var _this$state2 = this.state,
6164
- _this$state2$flattenO = _this$state2.flattenOptions,
6165
- flattenOptions = _this$state2$flattenO === void 0 ? [] : _this$state2$flattenO,
6166
- inputValue = _this$state2.inputValue; // Limit the filter if needed
6167
-
6168
- var filtered;
6169
-
6170
- if (limit > 0) {
6171
- filtered = [];
6172
- var matchCount = 0; // Perf optimization to filter items only below the limit
6173
-
6174
- flattenOptions.some(function (path) {
6175
- var match = filter(_this2.state.inputValue, path, names);
6176
-
6177
- if (match) {
6178
- filtered.push(path);
6179
- matchCount += 1;
6180
- }
6181
-
6182
- return matchCount >= limit;
6183
- });
6184
- } else {
6185
- Object(_util_devWarning__WEBPACK_IMPORTED_MODULE_22__[/* default */ "a"])(typeof limit !== 'number', 'Cascader', "'limit' of showSearch should be positive number or false.");
6186
- filtered = flattenOptions.filter(function (path) {
6187
- return filter(_this2.state.inputValue, path, names);
6188
- });
6189
- }
6190
5830
 
6191
- filtered = filtered.sort(function (a, b) {
6192
- return sort(a, b, inputValue, names);
6193
- });
6194
-
6195
- if (filtered.length > 0) {
6196
- // Fix issue: https://github.com/ant-design/ant-design/issues/26554
6197
- var field = names.value === names.label ? keepFilteredValueField : names.value;
6198
- return filtered.map(function (path) {
6199
- var _ref4;
6200
-
6201
- return _ref4 = {
6202
- __IS_FILTERED_OPTION: true,
6203
- path: path
6204
- }, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_ref4, field, path.map(function (o) {
6205
- return o[names.value];
6206
- })), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_ref4, names.label, render(inputValue, path, prefixCls, names)), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_ref4, "disabled", path.some(function (o) {
6207
- return !!o.disabled;
6208
- })), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_ref4, "isEmptyNode", true), _ref4;
6209
- });
6210
- }
5831
+ var searchConfig = {
5832
+ render: defaultSearchRender
5833
+ };
6211
5834
 
6212
- return [getEmptyNode(renderEmpty, names, notFoundContent)];
6213
- }
6214
- }, {
6215
- key: "focus",
6216
- value: function focus() {
6217
- this.input.focus();
6218
- }
6219
- }, {
6220
- key: "blur",
6221
- value: function blur() {
6222
- this.input.blur();
5835
+ if (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(showSearch) === 'object') {
5836
+ searchConfig = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, searchConfig), showSearch);
6223
5837
  }
6224
- }, {
6225
- key: "getPopupPlacement",
6226
- value: function getPopupPlacement() {
6227
- var direction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'ltr';
6228
- var popupPlacement = this.props.popupPlacement;
6229
5838
 
6230
- if (popupPlacement !== undefined) {
6231
- return popupPlacement;
6232
- }
5839
+ return searchConfig;
5840
+ }, [showSearch]); // ===================== Size ======================
6233
5841
 
6234
- return direction === 'rtl' ? 'bottomRight' : 'bottomLeft';
6235
- }
6236
- }, {
6237
- key: "render",
6238
- value: function render() {
6239
- var _this3 = this;
5842
+ var size = react__WEBPACK_IMPORTED_MODULE_5__["useContext"](_config_provider_SizeContext__WEBPACK_IMPORTED_MODULE_14__[/* default */ "b"]);
5843
+ var mergedSize = customizeSize || size; // ===================== Icon ======================
6240
5844
 
6241
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8__["createElement"](_config_provider__WEBPACK_IMPORTED_MODULE_20__[/* ConfigConsumer */ "a"], null, function (configArgument) {
6242
- return (
6243
- /*#__PURE__*/
6244
- // @ts-ignore
6245
- react__WEBPACK_IMPORTED_MODULE_8__["createElement"](_locale_provider_LocaleReceiver__WEBPACK_IMPORTED_MODULE_21__[/* default */ "a"], null, function (locale) {
6246
- return _this3.renderCascader(configArgument, locale);
6247
- })
6248
- );
6249
- });
6250
- }
6251
- }], [{
6252
- key: "getDerivedStateFromProps",
6253
- value: function getDerivedStateFromProps(nextProps, _ref5) {
6254
- var prevProps = _ref5.prevProps;
6255
- var newState = {
6256
- prevProps: nextProps
6257
- };
5845
+ var mergedExpandIcon = expandIcon;
6258
5846
 
6259
- if ('value' in nextProps) {
6260
- newState.value = nextProps.value || [];
6261
- }
6262
-
6263
- if ('popupVisible' in nextProps) {
6264
- newState.popupVisible = nextProps.popupVisible;
6265
- }
5847
+ if (!expandIcon) {
5848
+ mergedExpandIcon = isRtl ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"](_ant_design_icons_es_icons_LeftOutlined__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"], null) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"](_ant_design_icons_es_icons_RightOutlined__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], null);
5849
+ }
6266
5850
 
6267
- if (nextProps.showSearch && prevProps.options !== nextProps.options) {
6268
- newState.flattenOptions = flattenTree(nextProps.options, nextProps);
6269
- }
5851
+ var loadingIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"]("span", {
5852
+ className: "".concat(prefixCls, "-menu-item-loading-icon")
5853
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"](_ant_design_icons_es_icons_RedoOutlined__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"], {
5854
+ spin: true
5855
+ })); // =================== Multiple ====================
6270
5856
 
6271
- if ( true && nextProps.options) {
6272
- warningValueNotExist(nextProps.options, getFieldNames(nextProps));
6273
- }
5857
+ var checkable = react__WEBPACK_IMPORTED_MODULE_5__["useMemo"](function () {
5858
+ return multiple ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"]("span", {
5859
+ className: "".concat(cascaderPrefixCls, "-checkbox-inner")
5860
+ }) : false;
5861
+ }, [multiple]); // ===================== Icons =====================
6274
5862
 
6275
- return newState;
6276
- }
6277
- }]);
5863
+ var _getIcons = Object(_select_utils_iconUtil__WEBPACK_IMPORTED_MODULE_15__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, props), {
5864
+ multiple: multiple,
5865
+ prefixCls: prefixCls
5866
+ })),
5867
+ suffixIcon = _getIcons.suffixIcon,
5868
+ removeIcon = _getIcons.removeIcon,
5869
+ clearIcon = _getIcons.clearIcon; // ==================== Render =====================
6278
5870
 
6279
- return Cascader;
6280
- }(react__WEBPACK_IMPORTED_MODULE_8__["Component"]);
6281
5871
 
6282
- Cascader.defaultProps = {
6283
- options: [],
6284
- disabled: false,
6285
- allowClear: true,
6286
- bordered: true
6287
- };
5872
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"](rc_cascader__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({
5873
+ prefixCls: prefixCls,
5874
+ className: classnames__WEBPACK_IMPORTED_MODULE_6___default()(!customizePrefixCls && cascaderPrefixCls, (_classNames2 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-lg"), mergedSize === 'large'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-sm"), mergedSize === 'small'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-rtl"), isRtl), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames2, "".concat(prefixCls, "-borderless"), !bordered), _classNames2), className)
5875
+ }, restProps, {
5876
+ direction: mergedDirection,
5877
+ notFoundContent: mergedNotFoundContent,
5878
+ allowClear: allowClear,
5879
+ showSearch: mergedShowSearch,
5880
+ expandIcon: mergedExpandIcon,
5881
+ inputIcon: suffixIcon,
5882
+ removeIcon: removeIcon,
5883
+ clearIcon: clearIcon,
5884
+ loadingIcon: loadingIcon,
5885
+ checkable: checkable,
5886
+ dropdownClassName: mergedDropdownClassName,
5887
+ dropdownPrefixCls: customizePrefixCls || cascaderPrefixCls,
5888
+ choiceTransitionName: Object(_util_motion__WEBPACK_IMPORTED_MODULE_16__[/* getTransitionName */ "b"])(rootPrefixCls, '', choiceTransitionName),
5889
+ transitionName: Object(_util_motion__WEBPACK_IMPORTED_MODULE_16__[/* getTransitionName */ "b"])(rootPrefixCls, 'slide-up', transitionName),
5890
+ getPopupContainer: getPopupContainer || getContextPopupContainer,
5891
+ ref: ref
5892
+ }));
5893
+ });
5894
+ Cascader.displayName = 'Cascader';
6288
5895
  /* harmony default export */ __webpack_exports__["a"] = (Cascader);
6289
5896
 
6290
5897
  /***/ }),
@@ -6315,7 +5922,7 @@ __webpack_require__.r(__webpack_exports__);
6315
5922
  /* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "./components/style/index.less");
6316
5923
  /* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "./components/cascader/style/index.less");
6317
5924
  /* harmony import */ var _empty_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../empty/style */ "./components/empty/style/index.tsx");
6318
- /* harmony import */ var _input_style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../input/style */ "./components/input/style/index.tsx");
5925
+ /* harmony import */ var _select_style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../select/style */ "./components/select/style/index.tsx");
6319
5926
 
6320
5927
  // style dependencies
6321
5928
 
@@ -18687,7 +18294,7 @@ var NoFound = function NoFound() {
18687
18294
  fill: "#FFF"
18688
18295
  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", {
18689
18296
  d: "M174.823 30.03c0-16.281 13.198-29.48 29.48-29.48 16.28 0 29.48 13.199 29.48 29.48 0 16.28-13.2 29.48-29.48 29.48-16.282 0-29.48-13.2-29.48-29.48",
18690
- fill: "#1890FF"
18297
+ fill: "#2c68ff"
18691
18298
  }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("path", {
18692
18299
  d: "M205.952 38.387c.5.5.785 1.142.785 1.928s-.286 1.465-.785 1.964c-.572.5-1.214.75-2 .75-.785 0-1.429-.285-1.929-.785-.572-.5-.82-1.143-.82-1.929s.248-1.428.82-1.928c.5-.5 1.144-.75 1.93-.75.785 0 1.462.25 1.999.75m4.285-19.463c1.428 1.249 2.143 2.963 2.143 5.142 0 1.712-.427 3.13-1.219 4.25-.067.096-.137.18-.218.265-.416.429-1.41 1.346-2.956 2.699a5.07 5.07 0 0 0-1.428 1.75 5.207 5.207 0 0 0-.536 2.357v.5h-4.107v-.5c0-1.357.215-2.536.714-3.5.464-.964 1.857-2.464 4.178-4.536l.43-.5c.643-.785.964-1.643.964-2.535 0-1.18-.358-2.108-1-2.785-.678-.68-1.643-1.001-2.858-1.001-1.536 0-2.642.464-3.357 1.43-.37.5-.621 1.135-.76 1.904a1.999 1.999 0 0 1-1.971 1.63h-.004c-1.277 0-2.257-1.183-1.98-2.43.337-1.518 1.02-2.78 2.073-3.784 1.536-1.5 3.607-2.25 6.25-2.25 2.32 0 4.214.607 5.642 1.894",
18693
18300
  fill: "#FFF"
@@ -42048,46 +41655,6 @@ function warningProps(props) {
42048
41655
 
42049
41656
  /* harmony default export */ __webpack_exports__["a"] = (warningProps);
42050
41657
 
42051
- /***/ }),
42052
-
42053
- /***/ "./node_modules/array-tree-filter/lib/index.js":
42054
- /*!*****************************************************!*\
42055
- !*** ./node_modules/array-tree-filter/lib/index.js ***!
42056
- \*****************************************************/
42057
- /*! no static exports found */
42058
- /*! exports used: default */
42059
- /***/ (function(module, exports, __webpack_require__) {
42060
-
42061
- (function (global, factory) {
42062
- true ? module.exports = factory() :
42063
- undefined;
42064
- }(this, (function () { 'use strict';
42065
-
42066
- function arrayTreeFilter(data, filterFn, options) {
42067
- options = options || {};
42068
- options.childrenKeyName = options.childrenKeyName || "children";
42069
- var children = data || [];
42070
- var result = [];
42071
- var level = 0;
42072
- do {
42073
- var foundItem = children.filter(function (item) {
42074
- return filterFn(item, level);
42075
- })[0];
42076
- if (!foundItem) {
42077
- break;
42078
- }
42079
- result.push(foundItem);
42080
- children = foundItem[options.childrenKeyName] || [];
42081
- level += 1;
42082
- } while (children.length > 0);
42083
- return result;
42084
- }
42085
-
42086
- return arrayTreeFilter;
42087
-
42088
- })));
42089
-
42090
-
42091
41658
  /***/ }),
42092
41659
 
42093
41660
  /***/ "./node_modules/async-validator/dist-web/index.js":
@@ -50107,24 +49674,22 @@ function monitorResize(element, callback) {
50107
49674
 
50108
49675
  "use strict";
50109
49676
  /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js");
50110
- /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js");
50111
- /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js");
50112
- /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js");
50113
- /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js");
50114
- /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js");
50115
- /* harmony import */ var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createSuper */ "./node_modules/@babel/runtime/helpers/esm/createSuper.js");
50116
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react */ "react");
50117
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__);
50118
- /* harmony import */ var rc_trigger__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rc-trigger */ "./node_modules/rc-trigger/es/index.js");
50119
- /* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! warning */ "./node_modules/warning/warning.js");
50120
- /* harmony import */ var warning__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(warning__WEBPACK_IMPORTED_MODULE_9__);
50121
- /* harmony import */ var rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! rc-util/es/KeyCode */ "./node_modules/rc-util/es/KeyCode.js");
50122
- /* harmony import */ var array_tree_filter__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! array-tree-filter */ "./node_modules/array-tree-filter/lib/index.js");
50123
- /* harmony import */ var array_tree_filter__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(array_tree_filter__WEBPACK_IMPORTED_MODULE_11__);
50124
- /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utils */ "./node_modules/rc-cascader/es/utils.js");
50125
- /* harmony import */ var _Menus__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Menus */ "./node_modules/rc-cascader/es/Menus.js");
50126
- /* harmony import */ var _placements__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./placements */ "./node_modules/rc-cascader/es/placements.js");
49677
+ /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
49678
+ /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js");
49679
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react");
49680
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
49681
+ /* harmony import */ var rc_util_es_warning__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rc-util/es/warning */ "./node_modules/rc-util/es/warning.js");
49682
+ /* harmony import */ var rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rc-util/es/hooks/useMergedState */ "./node_modules/rc-util/es/hooks/useMergedState.js");
49683
+ /* harmony import */ var rc_tree_select_es_generate__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-tree-select/es/generate */ "./node_modules/rc-tree-select/es/generate.js");
49684
+ /* harmony import */ var _OptionList__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./OptionList */ "./node_modules/rc-cascader/es/OptionList/index.js");
49685
+ /* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./context */ "./node_modules/rc-cascader/es/context.js");
49686
+ /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./util */ "./node_modules/rc-cascader/es/util.js");
49687
+ /* harmony import */ var _hooks_useUpdateEffect__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./hooks/useUpdateEffect */ "./node_modules/rc-cascader/es/hooks/useUpdateEffect.js");
49688
+ /* harmony import */ var _hooks_useSearchConfig__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./hooks/useSearchConfig */ "./node_modules/rc-cascader/es/hooks/useSearchConfig.js");
49689
+
49690
+
50127
49691
 
49692
+ var _excluded = ["checkable", "changeOnSelect", "children", "options", "onChange", "value", "defaultValue", "popupVisible", "open", "dropdownClassName", "popupClassName", "onDropdownVisibleChange", "onPopupVisibleChange", "popupPlacement", "placement", "searchValue", "onSearch", "showSearch", "expandTrigger", "expandIcon", "loadingIcon", "displayRender", "loadData", "dropdownMenuColumnStyle", "dropdownPrefixCls"];
50128
49693
 
50129
49694
 
50130
49695
 
@@ -50134,665 +49699,1077 @@ function monitorResize(element, callback) {
50134
49699
 
50135
49700
 
50136
49701
 
49702
+ /**
49703
+ * `rc-cascader` is much like `rc-tree-select` but API is very different.
49704
+ * It's caused that component developer is not same person
49705
+ * and we do not rice the API naming standard at that time.
49706
+ *
49707
+ * To avoid breaking change, wrap the `rc-tree-select` to compatible with `rc-cascader` API.
49708
+ * This should be better to merge to same API like `rc-tree-select` or `rc-select` in next major version.
49709
+ *
49710
+ * Update:
49711
+ * - dropdown class change to `rc-cascader-dropdown`
49712
+ * - direction rtl keyboard
49713
+ *
49714
+ * Deprecated:
49715
+ * - popupVisible
49716
+ * - hidePopupOnSelect
49717
+ *
49718
+ * Removed:
49719
+ * - builtinPlacements: Handle by select
49720
+ */
49721
+
49722
+ var RefCascader = Object(rc_tree_select_es_generate__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])({
49723
+ prefixCls: 'rc-cascader',
49724
+ optionList: _OptionList__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"]
49725
+ });
49726
+
49727
+ function defaultDisplayRender(labels) {
49728
+ return labels.join(' / ');
49729
+ }
50137
49730
 
49731
+ var Cascader = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function (props, ref) {
49732
+ var checkable = props.checkable,
49733
+ changeOnSelect = props.changeOnSelect,
49734
+ children = props.children,
49735
+ options = props.options,
49736
+ onChange = props.onChange,
49737
+ value = props.value,
49738
+ defaultValue = props.defaultValue,
49739
+ popupVisible = props.popupVisible,
49740
+ open = props.open,
49741
+ dropdownClassName = props.dropdownClassName,
49742
+ popupClassName = props.popupClassName,
49743
+ onDropdownVisibleChange = props.onDropdownVisibleChange,
49744
+ onPopupVisibleChange = props.onPopupVisibleChange,
49745
+ popupPlacement = props.popupPlacement,
49746
+ placement = props.placement,
49747
+ searchValue = props.searchValue,
49748
+ onSearch = props.onSearch,
49749
+ showSearch = props.showSearch,
49750
+ expandTrigger = props.expandTrigger,
49751
+ _props$expandIcon = props.expandIcon,
49752
+ expandIcon = _props$expandIcon === void 0 ? '>' : _props$expandIcon,
49753
+ loadingIcon = props.loadingIcon,
49754
+ _props$displayRender = props.displayRender,
49755
+ displayRender = _props$displayRender === void 0 ? defaultDisplayRender : _props$displayRender,
49756
+ loadData = props.loadData,
49757
+ dropdownMenuColumnStyle = props.dropdownMenuColumnStyle,
49758
+ dropdownPrefixCls = props.dropdownPrefixCls,
49759
+ restProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(props, _excluded);
50138
49760
 
49761
+ var fieldNames = restProps.fieldNames;
49762
+ var mergedFieldNames = react__WEBPACK_IMPORTED_MODULE_3__["useMemo"](function () {
49763
+ return Object(_util__WEBPACK_IMPORTED_MODULE_9__[/* fillFieldNames */ "c"])(fieldNames);
49764
+ }, [fieldNames]); // ============================ Ref =============================
50139
49765
 
49766
+ var cascaderRef = react__WEBPACK_IMPORTED_MODULE_3__["useRef"]();
49767
+ react__WEBPACK_IMPORTED_MODULE_3__["useImperativeHandle"](ref, function () {
49768
+ return {
49769
+ focus: function focus() {
49770
+ cascaderRef.current.focus();
49771
+ },
49772
+ blur: function blur() {
49773
+ cascaderRef.current.blur();
49774
+ }
49775
+ };
49776
+ });
50140
49777
 
49778
+ var getEntityByValue = function getEntityByValue(val) {
49779
+ return cascaderRef.current.getEntityByValue(val);
49780
+ }; // =========================== Search ===========================
50141
49781
 
50142
49782
 
50143
- var Cascader = /*#__PURE__*/function (_React$Component) {
50144
- Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(Cascader, _React$Component);
49783
+ var _useMergedState = Object(rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(undefined, {
49784
+ value: searchValue,
49785
+ onChange: onSearch
49786
+ }),
49787
+ _useMergedState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_useMergedState, 2),
49788
+ mergedSearch = _useMergedState2[0],
49789
+ setMergedSearch = _useMergedState2[1];
50145
49790
 
50146
- var _super = Object(_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(Cascader);
49791
+ var _useSearchConfig = Object(_hooks_useSearchConfig__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"])(showSearch),
49792
+ _useSearchConfig2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_useSearchConfig, 2),
49793
+ mergedShowSearch = _useSearchConfig2[0],
49794
+ searchConfig = _useSearchConfig2[1]; // ========================== Options ===========================
50147
49795
 
50148
- function Cascader(props) {
50149
- var _this;
50150
49796
 
50151
- Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(this, Cascader);
49797
+ var mergedOptions = react__WEBPACK_IMPORTED_MODULE_3__["useMemo"](function () {
49798
+ return Object(_util__WEBPACK_IMPORTED_MODULE_9__[/* convertOptions */ "b"])(options, mergedFieldNames);
49799
+ }, [options, mergedFieldNames]); // =========================== Value ============================
50152
49800
 
50153
- _this = _super.call(this, props);
49801
+ /**
49802
+ * Always pass props value to last value unit:
49803
+ * - single: ['light', 'little'] => ['light__little']
49804
+ * - multiple: [['light', 'little'], ['bamboo']] => ['light__little', 'bamboo']
49805
+ */
50154
49806
 
50155
- _this.setPopupVisible = function (popupVisible) {
50156
- var value = _this.state.value;
49807
+ var parseToInternalValue = function parseToInternalValue(propValue) {
49808
+ var propValueList = [];
50157
49809
 
50158
- if (!('popupVisible' in _this.props)) {
50159
- _this.setState({
50160
- popupVisible: popupVisible
50161
- });
50162
- } // sync activeValue with value when panel open
49810
+ if (propValue) {
49811
+ propValueList = checkable ? propValue : [propValue];
49812
+ }
50163
49813
 
49814
+ return propValueList.map(_util__WEBPACK_IMPORTED_MODULE_9__[/* connectValue */ "a"]);
49815
+ };
50164
49816
 
50165
- if (popupVisible && !_this.state.popupVisible) {
50166
- _this.setState({
50167
- activeValue: value
50168
- });
50169
- }
49817
+ var _React$useState = react__WEBPACK_IMPORTED_MODULE_3__["useState"](function () {
49818
+ return parseToInternalValue(value || defaultValue);
49819
+ }),
49820
+ _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_React$useState, 2),
49821
+ internalValue = _React$useState2[0],
49822
+ setInternalValue = _React$useState2[1];
50170
49823
 
50171
- _this.props.onPopupVisibleChange(popupVisible);
50172
- };
49824
+ Object(_hooks_useUpdateEffect__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"])(function () {
49825
+ setInternalValue(parseToInternalValue(value));
49826
+ }, [value]); // =========================== Label ============================
50173
49827
 
50174
- _this.handleChange = function (options, _ref, e) {
50175
- var visible = _ref.visible;
49828
+ var labelRender = function labelRender(entity, val) {
49829
+ var fieldLabel = mergedFieldNames.label;
50176
49830
 
50177
- if (e.type !== 'keydown' || e.keyCode === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].ENTER) {
50178
- _this.props.onChange(options.map(function (o) {
50179
- return o[_this.getFieldName('value')];
50180
- }), options);
49831
+ if (!entity) {
49832
+ var valPath = Object(_util__WEBPACK_IMPORTED_MODULE_9__[/* splitValue */ "f"])(val);
49833
+ return displayRender(valPath, []);
49834
+ }
50181
49835
 
50182
- _this.setPopupVisible(visible);
49836
+ if (checkable) {
49837
+ return entity.data.node[fieldLabel];
49838
+ }
49839
+
49840
+ var _restoreCompatibleVal = Object(_util__WEBPACK_IMPORTED_MODULE_9__[/* restoreCompatibleValue */ "e"])(entity, mergedFieldNames),
49841
+ selectedOptions = _restoreCompatibleVal.options;
49842
+
49843
+ var rawOptions = selectedOptions.map(function (opt) {
49844
+ return opt.node;
49845
+ });
49846
+ var labelList = rawOptions.map(function (opt) {
49847
+ return opt[fieldLabel];
49848
+ });
49849
+ return displayRender(labelList, rawOptions);
49850
+ }; // =========================== Change ===========================
49851
+
49852
+
49853
+ var onInternalChange = function onInternalChange(newValue
49854
+ /** Not care current type */
49855
+ ) {
49856
+ // TODO: Need improve motion experience
49857
+ setMergedSearch('');
49858
+ var valueList = checkable ? newValue : [newValue];
49859
+ var pathList = [];
49860
+ var optionsList = [];
49861
+ var valueEntities = valueList.map(getEntityByValue).filter(function (entity) {
49862
+ return entity;
49863
+ });
49864
+ valueEntities.forEach(function (entity) {
49865
+ var _restoreCompatibleVal2 = Object(_util__WEBPACK_IMPORTED_MODULE_9__[/* restoreCompatibleValue */ "e"])(entity, mergedFieldNames),
49866
+ valueOptions = _restoreCompatibleVal2.options;
49867
+
49868
+ var originOptions = valueOptions.map(function (option) {
49869
+ return option.node;
49870
+ });
49871
+ pathList.push(originOptions.map(function (opt) {
49872
+ return opt[mergedFieldNames.value];
49873
+ }));
49874
+ optionsList.push(originOptions);
49875
+ }); // Fill state
49876
+
49877
+ if (value === undefined) {
49878
+ setInternalValue(valueList);
49879
+ }
49880
+
49881
+ if (onChange) {
49882
+ if (checkable) {
49883
+ onChange(pathList, optionsList);
49884
+ } else {
49885
+ // TODO: This should return null as other component.
49886
+ // But its a breaking change and we should keep the logic.
49887
+ onChange(pathList[0] || [], optionsList[0] || []);
50183
49888
  }
50184
- };
49889
+ }
49890
+ }; // ============================ Open ============================
50185
49891
 
50186
- _this.handlePopupVisibleChange = function (popupVisible) {
50187
- _this.setPopupVisible(popupVisible);
50188
- };
50189
49892
 
50190
- _this.handleMenuSelect = function (targetOption, menuIndex, e) {
50191
- // Keep focused state for keyboard support
50192
- var triggerNode = _this.trigger.getRootDomNode();
49893
+ if (true) {
49894
+ Object(rc_util_es_warning__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(!onPopupVisibleChange, '`onPopupVisibleChange` is deprecated. Please use `onDropdownVisibleChange` instead.');
49895
+ Object(rc_util_es_warning__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(popupVisible === undefined, '`popupVisible` is deprecated. Please use `open` instead.');
49896
+ Object(rc_util_es_warning__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(popupClassName === undefined, '`popupClassName` is deprecated. Please use `dropdownClassName` instead.');
49897
+ Object(rc_util_es_warning__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(popupPlacement === undefined, '`popupPlacement` is deprecated. Please use `placement` instead.');
49898
+ }
49899
+
49900
+ var mergedOpen = open !== undefined ? open : popupVisible;
49901
+ var mergedDropdownClassName = dropdownClassName || popupClassName;
49902
+ var mergedPlacement = placement || popupPlacement;
49903
+
49904
+ var onInternalDropdownVisibleChange = function onInternalDropdownVisibleChange(nextVisible) {
49905
+ onDropdownVisibleChange === null || onDropdownVisibleChange === void 0 ? void 0 : onDropdownVisibleChange(nextVisible);
49906
+ onPopupVisibleChange === null || onPopupVisibleChange === void 0 ? void 0 : onPopupVisibleChange(nextVisible);
49907
+ }; // ========================== Context ===========================
49908
+
49909
+
49910
+ var context = react__WEBPACK_IMPORTED_MODULE_3__["useMemo"](function () {
49911
+ return {
49912
+ changeOnSelect: changeOnSelect,
49913
+ expandTrigger: expandTrigger,
49914
+ fieldNames: mergedFieldNames,
49915
+ expandIcon: expandIcon,
49916
+ loadingIcon: loadingIcon,
49917
+ loadData: loadData,
49918
+ dropdownMenuColumnStyle: dropdownMenuColumnStyle,
49919
+ search: searchConfig,
49920
+ dropdownPrefixCls: dropdownPrefixCls
49921
+ };
49922
+ }, [changeOnSelect, expandTrigger, mergedFieldNames, expandIcon, loadingIcon, loadData, dropdownMenuColumnStyle, searchConfig, dropdownPrefixCls]); // =========================== Render ===========================
49923
+
49924
+ var dropdownStyle = // Search to match width
49925
+ mergedSearch && searchConfig.matchInputWidth || // Empty keep the width
49926
+ !mergedOptions.length ? {} : {
49927
+ minWidth: 'auto'
49928
+ };
49929
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_context__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].Provider, {
49930
+ value: context
49931
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](RefCascader, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({
49932
+ ref: cascaderRef
49933
+ }, restProps, {
49934
+ value: checkable ? internalValue : internalValue[0],
49935
+ placement: mergedPlacement,
49936
+ dropdownMatchSelectWidth: false,
49937
+ dropdownStyle: dropdownStyle,
49938
+ dropdownClassName: mergedDropdownClassName,
49939
+ treeData: mergedOptions,
49940
+ treeCheckable: checkable,
49941
+ treeNodeFilterProp: "label",
49942
+ onChange: onInternalChange,
49943
+ showCheckedStrategy: RefCascader.SHOW_PARENT,
49944
+ open: mergedOpen,
49945
+ onDropdownVisibleChange: onInternalDropdownVisibleChange,
49946
+ searchValue: mergedSearch // Customize filter logic in OptionList
49947
+ ,
49948
+ filterTreeNode: function filterTreeNode() {
49949
+ return true;
49950
+ },
49951
+ showSearch: mergedShowSearch,
49952
+ onSearch: setMergedSearch,
49953
+ labelRender: labelRender,
49954
+ getRawInputElement: function getRawInputElement() {
49955
+ return children;
49956
+ }
49957
+ })));
49958
+ });
49959
+ Cascader.displayName = 'Cascader';
49960
+ /* harmony default export */ __webpack_exports__["a"] = (Cascader);
49961
+
49962
+ /***/ }),
49963
+
49964
+ /***/ "./node_modules/rc-cascader/es/OptionList/Checkbox.js":
49965
+ /*!************************************************************!*\
49966
+ !*** ./node_modules/rc-cascader/es/OptionList/Checkbox.js ***!
49967
+ \************************************************************/
49968
+ /*! exports provided: default */
49969
+ /*! exports used: default */
49970
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
49971
+
49972
+ "use strict";
49973
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Checkbox; });
49974
+ /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
49975
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
49976
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
49977
+ /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
49978
+ /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__);
49979
+ /* harmony import */ var rc_tree_select_es_Context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-tree-select/es/Context */ "./node_modules/rc-tree-select/es/Context.js");
49980
+
49981
+
49982
+
49983
+
49984
+ function Checkbox(_ref) {
49985
+ var _classNames;
49986
+
49987
+ var prefixCls = _ref.prefixCls,
49988
+ checked = _ref.checked,
49989
+ halfChecked = _ref.halfChecked,
49990
+ disabled = _ref.disabled,
49991
+ onClick = _ref.onClick;
49992
+
49993
+ var _React$useContext = react__WEBPACK_IMPORTED_MODULE_1__["useContext"](rc_tree_select_es_Context__WEBPACK_IMPORTED_MODULE_3__[/* SelectContext */ "a"]),
49994
+ checkable = _React$useContext.checkable;
49995
+
49996
+ var customCheckbox = typeof checkable !== 'boolean' ? checkable : null;
49997
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("span", {
49998
+ className: classnames__WEBPACK_IMPORTED_MODULE_2___default()("".concat(prefixCls), (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-checked"), checked), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-indeterminate"), !checked && halfChecked), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-disabled"), disabled), _classNames)),
49999
+ onClick: onClick
50000
+ }, customCheckbox);
50001
+ }
50002
+
50003
+ /***/ }),
50004
+
50005
+ /***/ "./node_modules/rc-cascader/es/OptionList/Column.js":
50006
+ /*!**********************************************************!*\
50007
+ !*** ./node_modules/rc-cascader/es/OptionList/Column.js ***!
50008
+ \**********************************************************/
50009
+ /*! exports provided: default */
50010
+ /*! exports used: default */
50011
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
50012
+
50013
+ "use strict";
50014
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Column; });
50015
+ /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
50016
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
50017
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
50018
+ /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
50019
+ /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__);
50020
+ /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util */ "./node_modules/rc-cascader/es/util.js");
50021
+ /* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../context */ "./node_modules/rc-cascader/es/context.js");
50022
+ /* harmony import */ var _Checkbox__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Checkbox */ "./node_modules/rc-cascader/es/OptionList/Checkbox.js");
50023
+
50024
+
50025
+
50026
+
50027
+
50028
+
50029
+ function Column(_ref) {
50030
+ var prefixCls = _ref.prefixCls,
50031
+ index = _ref.index,
50032
+ multiple = _ref.multiple,
50033
+ options = _ref.options,
50034
+ openKey = _ref.openKey,
50035
+ onSelect = _ref.onSelect,
50036
+ onOpen = _ref.onOpen,
50037
+ onToggleOpen = _ref.onToggleOpen,
50038
+ checkedSet = _ref.checkedSet,
50039
+ halfCheckedSet = _ref.halfCheckedSet,
50040
+ loadingKeys = _ref.loadingKeys;
50041
+ var menuPrefixCls = "".concat(prefixCls, "-menu");
50042
+ var menuItemPrefixCls = "".concat(prefixCls, "-menu-item");
50043
+
50044
+ var _React$useContext = react__WEBPACK_IMPORTED_MODULE_1__["useContext"](_context__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"]),
50045
+ changeOnSelect = _React$useContext.changeOnSelect,
50046
+ expandTrigger = _React$useContext.expandTrigger,
50047
+ expandIcon = _React$useContext.expandIcon,
50048
+ loadingIcon = _React$useContext.loadingIcon,
50049
+ dropdownMenuColumnStyle = _React$useContext.dropdownMenuColumnStyle;
50050
+
50051
+ var hoverOpen = expandTrigger === 'hover'; // ============================ Render ============================
50052
+
50053
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("ul", {
50054
+ className: menuPrefixCls,
50055
+ role: "menu"
50056
+ }, options.map(function (option) {
50057
+ var _classNames;
50058
+
50059
+ var disabled = option.disabled,
50060
+ value = option.value,
50061
+ node = option.node;
50062
+ var isMergedLeaf = Object(_util__WEBPACK_IMPORTED_MODULE_3__[/* isLeaf */ "d"])(option);
50063
+ var isLoading = loadingKeys.includes(value); // >>>>> checked
50064
+
50065
+ var checked = checkedSet.has(value); // >>>>> Open
50193
50066
 
50194
- if (triggerNode && triggerNode.focus) {
50195
- triggerNode.focus();
50067
+ var triggerOpenPath = function triggerOpenPath() {
50068
+ if (!disabled && (!hoverOpen || !isMergedLeaf)) {
50069
+ onOpen(index, value);
50196
50070
  }
50071
+ }; // >>>>> Selection
50197
50072
 
50198
- var _this$props = _this.props,
50199
- changeOnSelect = _this$props.changeOnSelect,
50200
- loadData = _this$props.loadData,
50201
- expandTrigger = _this$props.expandTrigger;
50202
50073
 
50203
- if (!targetOption || targetOption.disabled) {
50204
- return;
50074
+ var triggerSelect = function triggerSelect() {
50075
+ if (!disabled && (isMergedLeaf || changeOnSelect || multiple)) {
50076
+ onSelect(value, isMergedLeaf);
50205
50077
  }
50078
+ }; // >>>>> Title
50206
50079
 
50207
- var activeValue = _this.state.activeValue;
50208
- activeValue = activeValue.slice(0, menuIndex + 1);
50209
- activeValue[menuIndex] = targetOption[_this.getFieldName('value')];
50210
50080
 
50211
- var activeOptions = _this.getActiveOptions(activeValue);
50081
+ var title;
50212
50082
 
50213
- if (targetOption.isLeaf === false && !targetOption[_this.getFieldName('children')] && loadData) {
50083
+ if (typeof (node === null || node === void 0 ? void 0 : node.title) === 'string') {
50084
+ title = node.title;
50085
+ } else if (typeof option.title === 'string') {
50086
+ title = option.title;
50087
+ } // >>>>> Render
50088
+
50089
+
50090
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("li", {
50091
+ key: value,
50092
+ className: classnames__WEBPACK_IMPORTED_MODULE_2___default()(menuItemPrefixCls, (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(menuItemPrefixCls, "-expand"), !isMergedLeaf), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(menuItemPrefixCls, "-active"), openKey === value), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(menuItemPrefixCls, "-disabled"), disabled), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(menuItemPrefixCls, "-loading"), isLoading), _classNames)),
50093
+ style: dropdownMenuColumnStyle,
50094
+ role: "menuitemcheckbox",
50095
+ title: title,
50096
+ "aria-checked": checked,
50097
+ "data-value": value,
50098
+ onClick: function onClick() {
50099
+ triggerOpenPath();
50100
+
50101
+ if (!multiple || isMergedLeaf) {
50102
+ triggerSelect();
50103
+ }
50104
+ },
50105
+ onDoubleClick: function onDoubleClick() {
50214
50106
  if (changeOnSelect) {
50215
- _this.handleChange(activeOptions, {
50216
- visible: true
50217
- }, e);
50107
+ onToggleOpen(false);
50218
50108
  }
50109
+ },
50110
+ onMouseEnter: function onMouseEnter() {
50111
+ if (hoverOpen) {
50112
+ triggerOpenPath();
50113
+ }
50114
+ }
50115
+ }, multiple && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_Checkbox__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], {
50116
+ prefixCls: "".concat(prefixCls, "-checkbox"),
50117
+ checked: checked,
50118
+ halfChecked: halfCheckedSet.has(value),
50119
+ disabled: disabled,
50120
+ onClick: function onClick() {
50121
+ triggerSelect();
50122
+ }
50123
+ }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", {
50124
+ className: "".concat(menuItemPrefixCls, "-content")
50125
+ }, option.title), !isLoading && expandIcon && !isMergedLeaf && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", {
50126
+ className: "".concat(menuItemPrefixCls, "-expand-icon")
50127
+ }, expandIcon), isLoading && loadingIcon && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", {
50128
+ className: "".concat(menuItemPrefixCls, "-loading-icon")
50129
+ }, loadingIcon));
50130
+ }));
50131
+ }
50219
50132
 
50220
- _this.setState({
50221
- activeValue: activeValue
50222
- });
50133
+ /***/ }),
50223
50134
 
50224
- loadData(activeOptions);
50225
- return;
50226
- }
50135
+ /***/ "./node_modules/rc-cascader/es/OptionList/index.js":
50136
+ /*!*********************************************************!*\
50137
+ !*** ./node_modules/rc-cascader/es/OptionList/index.js ***!
50138
+ \*********************************************************/
50139
+ /*! exports provided: default */
50140
+ /*! exports used: default */
50141
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
50227
50142
 
50228
- var newState = {};
50143
+ "use strict";
50144
+ /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
50145
+ /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js");
50146
+ /* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ "./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
50147
+ /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js");
50148
+ /* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
50149
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ "react");
50150
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__);
50151
+ /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
50152
+ /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_6__);
50153
+ /* harmony import */ var rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! rc-util/es/KeyCode */ "./node_modules/rc-util/es/KeyCode.js");
50154
+ /* harmony import */ var rc_tree_select_es_Context__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! rc-tree-select/es/Context */ "./node_modules/rc-tree-select/es/Context.js");
50155
+ /* harmony import */ var _Column__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Column */ "./node_modules/rc-cascader/es/OptionList/Column.js");
50156
+ /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../util */ "./node_modules/rc-cascader/es/util.js");
50157
+ /* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../context */ "./node_modules/rc-cascader/es/context.js");
50158
+ /* harmony import */ var _hooks_useSearchResult__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../hooks/useSearchResult */ "./node_modules/rc-cascader/es/hooks/useSearchResult.js");
50229
50159
 
50230
- if (!targetOption[_this.getFieldName('children')] || !targetOption[_this.getFieldName('children')].length) {
50231
- _this.handleChange(activeOptions, {
50232
- visible: false
50233
- }, e); // set value to activeValue when select leaf option
50234
50160
 
50235
50161
 
50236
- newState.value = activeValue; // add e.type judgement to prevent `onChange` being triggered by mouseEnter
50237
- } else if (changeOnSelect && (e.type === 'click' || e.type === 'keydown')) {
50238
- if (expandTrigger === 'hover') {
50239
- _this.handleChange(activeOptions, {
50240
- visible: false
50241
- }, e);
50242
- } else {
50243
- _this.handleChange(activeOptions, {
50244
- visible: true
50245
- }, e);
50246
- } // set value to activeValue on every select
50247
50162
 
50248
50163
 
50249
- newState.value = activeValue;
50250
- }
50251
50164
 
50252
- newState.activeValue = activeValue; // not change the value by keyboard
50165
+ /* eslint-disable default-case */
50253
50166
 
50254
- if ('value' in _this.props || e.type === 'keydown' && e.keyCode !== rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].ENTER) {
50255
- delete newState.value;
50256
- }
50257
50167
 
50258
- _this.setState(newState);
50259
- };
50260
50168
 
50261
- _this.handleItemDoubleClick = function () {
50262
- var changeOnSelect = _this.props.changeOnSelect;
50263
50169
 
50264
- if (changeOnSelect) {
50265
- _this.setPopupVisible(false);
50266
- }
50267
- };
50268
50170
 
50269
- _this.handleKeyDown = function (e) {
50270
- var children = _this.props.children; // https://github.com/ant-design/ant-design/issues/6717
50271
- // Don't bind keyboard support when children specify the onKeyDown
50272
50171
 
50273
- if (children && children.props.onKeyDown) {
50274
- children.props.onKeyDown(e);
50275
- return;
50276
- }
50277
50172
 
50278
- var activeValue = Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_this.state.activeValue);
50279
50173
 
50280
- var currentLevel = activeValue.length - 1 < 0 ? 0 : activeValue.length - 1;
50174
+ var RefOptionList = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["forwardRef"](function (props, ref) {
50175
+ var _optionColumns$, _optionColumns$$optio, _classNames;
50281
50176
 
50282
- var currentOptions = _this.getCurrentLevelOptions();
50177
+ var prefixCls = props.prefixCls,
50178
+ options = props.options,
50179
+ onSelect = props.onSelect,
50180
+ multiple = props.multiple,
50181
+ open = props.open,
50182
+ flattenOptions = props.flattenOptions,
50183
+ searchValue = props.searchValue,
50184
+ onToggleOpen = props.onToggleOpen,
50185
+ notFoundContent = props.notFoundContent,
50186
+ direction = props.direction;
50187
+ var containerRef = react__WEBPACK_IMPORTED_MODULE_5__["useRef"]();
50188
+ var rtl = direction === 'rtl';
50283
50189
 
50284
- var currentIndex = currentOptions.map(function (o) {
50285
- return o[_this.getFieldName('value')];
50286
- }).indexOf(activeValue[currentLevel]);
50190
+ var _React$useContext = react__WEBPACK_IMPORTED_MODULE_5__["useContext"](rc_tree_select_es_Context__WEBPACK_IMPORTED_MODULE_8__[/* SelectContext */ "a"]),
50191
+ checkedKeys = _React$useContext.checkedKeys,
50192
+ halfCheckedKeys = _React$useContext.halfCheckedKeys;
50287
50193
 
50288
- if (e.keyCode !== rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].DOWN && e.keyCode !== rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].UP && e.keyCode !== rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].LEFT && e.keyCode !== rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].RIGHT && e.keyCode !== rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].ENTER && e.keyCode !== rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].SPACE && e.keyCode !== rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].BACKSPACE && e.keyCode !== rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].ESC && e.keyCode !== rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].TAB) {
50289
- return;
50290
- } // Press any keys above to reopen menu
50194
+ var _React$useContext2 = react__WEBPACK_IMPORTED_MODULE_5__["useContext"](_context__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"]),
50195
+ changeOnSelect = _React$useContext2.changeOnSelect,
50196
+ expandTrigger = _React$useContext2.expandTrigger,
50197
+ fieldNames = _React$useContext2.fieldNames,
50198
+ loadData = _React$useContext2.loadData,
50199
+ search = _React$useContext2.search,
50200
+ dropdownPrefixCls = _React$useContext2.dropdownPrefixCls;
50291
50201
 
50202
+ var mergedPrefixCls = dropdownPrefixCls || prefixCls; // ========================= loadData =========================
50292
50203
 
50293
- if (!_this.state.popupVisible && e.keyCode !== rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].BACKSPACE && e.keyCode !== rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].LEFT && e.keyCode !== rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].RIGHT && e.keyCode !== rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].ESC && e.keyCode !== rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].TAB) {
50294
- _this.setPopupVisible(true);
50204
+ var _React$useState = react__WEBPACK_IMPORTED_MODULE_5__["useState"]([]),
50205
+ _React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(_React$useState, 2),
50206
+ loadingKeys = _React$useState2[0],
50207
+ setLoadingKeys = _React$useState2[1];
50295
50208
 
50296
- if (_this.props.onKeyDown) {
50297
- _this.props.onKeyDown(e);
50298
- }
50209
+ var internalLoadData = function internalLoadData(pathValue) {
50210
+ // Do not load when search
50211
+ if (!loadData || searchValue) {
50212
+ return;
50213
+ }
50299
50214
 
50300
- return;
50301
- }
50215
+ var entity = flattenOptions.find(function (flattenOption) {
50216
+ return flattenOption.data.value === pathValue;
50217
+ });
50302
50218
 
50303
- if (e.keyCode === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].DOWN || e.keyCode === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].UP) {
50304
- e.preventDefault();
50305
- var nextIndex = currentIndex;
50219
+ if (entity && !Object(_util__WEBPACK_IMPORTED_MODULE_10__[/* isLeaf */ "d"])(entity.data.node)) {
50220
+ var _restoreCompatibleVal = Object(_util__WEBPACK_IMPORTED_MODULE_10__[/* restoreCompatibleValue */ "e"])(entity, fieldNames),
50221
+ optionList = _restoreCompatibleVal.options;
50306
50222
 
50307
- if (nextIndex !== -1) {
50308
- if (e.keyCode === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].DOWN) {
50309
- nextIndex += 1;
50310
- nextIndex = nextIndex >= currentOptions.length ? 0 : nextIndex;
50311
- } else {
50312
- nextIndex -= 1;
50313
- nextIndex = nextIndex < 0 ? currentOptions.length - 1 : nextIndex;
50314
- }
50315
- } else {
50316
- nextIndex = 0;
50317
- }
50223
+ var rawOptionList = optionList.map(function (opt) {
50224
+ return opt.node;
50225
+ });
50226
+ setLoadingKeys(function (keys) {
50227
+ return [].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(keys), [optionList[optionList.length - 1].value]);
50228
+ });
50229
+ loadData(rawOptionList);
50230
+ }
50231
+ }; // zombieJ: This is bad. We should make this same as `rc-tree` to use Promise instead.
50318
50232
 
50319
- activeValue[currentLevel] = currentOptions[nextIndex][_this.getFieldName('value')];
50320
- } else if (e.keyCode === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].LEFT || e.keyCode === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].BACKSPACE) {
50321
- e.preventDefault();
50322
- activeValue.splice(activeValue.length - 1, 1);
50323
- } else if (e.keyCode === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].RIGHT) {
50324
- e.preventDefault();
50325
50233
 
50326
- if (currentOptions[currentIndex] && currentOptions[currentIndex][_this.getFieldName('children')]) {
50327
- activeValue.push(currentOptions[currentIndex][_this.getFieldName('children')][0][_this.getFieldName('value')]);
50328
- }
50329
- } else if (e.keyCode === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].ESC || e.keyCode === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].TAB) {
50330
- _this.setPopupVisible(false);
50234
+ react__WEBPACK_IMPORTED_MODULE_5__["useEffect"](function () {
50235
+ if (loadingKeys.length) {
50236
+ loadingKeys.forEach(function (loadingKey) {
50237
+ var option = flattenOptions.find(function (opt) {
50238
+ return opt.value === loadingKey;
50239
+ });
50331
50240
 
50332
- if (_this.props.onKeyDown) {
50333
- _this.props.onKeyDown(e);
50241
+ if (option.data.children) {
50242
+ setLoadingKeys(function (keys) {
50243
+ return keys.filter(function (key) {
50244
+ return key !== loadingKey;
50245
+ });
50246
+ });
50334
50247
  }
50248
+ });
50249
+ }
50250
+ }, [flattenOptions, loadingKeys]); // ========================== Values ==========================
50335
50251
 
50336
- return;
50337
- }
50252
+ var checkedSet = react__WEBPACK_IMPORTED_MODULE_5__["useMemo"](function () {
50253
+ return new Set(checkedKeys);
50254
+ }, [checkedKeys]);
50255
+ var halfCheckedSet = react__WEBPACK_IMPORTED_MODULE_5__["useMemo"](function () {
50256
+ return new Set(halfCheckedKeys);
50257
+ }, [halfCheckedKeys]); // =========================== Open ===========================
50338
50258
 
50339
- if (!activeValue || activeValue.length === 0) {
50340
- _this.setPopupVisible(false);
50341
- }
50259
+ var _React$useState3 = react__WEBPACK_IMPORTED_MODULE_5__["useState"](null),
50260
+ _React$useState4 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(_React$useState3, 2),
50261
+ openFinalValue = _React$useState4[0],
50262
+ setOpenFinalValue = _React$useState4[1];
50263
+
50264
+ var mergedOpenPath = react__WEBPACK_IMPORTED_MODULE_5__["useMemo"](function () {
50265
+ if (searchValue) {
50266
+ return openFinalValue !== undefined && openFinalValue !== null ? [openFinalValue] : [];
50267
+ }
50342
50268
 
50343
- var activeOptions = _this.getActiveOptions(activeValue);
50269
+ var entity = flattenOptions.find(function (flattenOption) {
50270
+ return flattenOption.data.value === openFinalValue;
50271
+ });
50344
50272
 
50345
- var targetOption = activeOptions[activeOptions.length - 1];
50273
+ if (entity) {
50274
+ var _restoreCompatibleVal2 = Object(_util__WEBPACK_IMPORTED_MODULE_10__[/* restoreCompatibleValue */ "e"])(entity, fieldNames),
50275
+ path = _restoreCompatibleVal2.path;
50346
50276
 
50347
- _this.handleMenuSelect(targetOption, activeOptions.length - 1, e);
50277
+ return path;
50278
+ }
50279
+
50280
+ return [];
50281
+ }, [openFinalValue, flattenOptions, searchValue]);
50282
+ react__WEBPACK_IMPORTED_MODULE_5__["useEffect"](function () {
50283
+ if (open) {
50284
+ var nextOpenPath = null;
50348
50285
 
50349
- if (_this.props.onKeyDown) {
50350
- _this.props.onKeyDown(e);
50286
+ if (!multiple && checkedKeys.length) {
50287
+ var entity = flattenOptions.find(function (flattenOption) {
50288
+ return flattenOption.data.value === checkedKeys[0];
50289
+ });
50290
+
50291
+ if (entity) {
50292
+ nextOpenPath = entity.data.value;
50293
+ }
50351
50294
  }
50352
- };
50353
50295
 
50354
- _this.saveTrigger = function (node) {
50355
- _this.trigger = node;
50356
- };
50296
+ setOpenFinalValue(nextOpenPath);
50297
+ }
50298
+ }, [open]); // =========================== Path ===========================
50357
50299
 
50358
- var initialValue = [];
50300
+ var onPathOpen = function onPathOpen(index, pathValue) {
50301
+ setOpenFinalValue(pathValue); // Trigger loadData
50359
50302
 
50360
- if ('value' in props) {
50361
- initialValue = props.value || [];
50362
- } else if ('defaultValue' in props) {
50363
- initialValue = props.defaultValue || [];
50303
+ internalLoadData(pathValue);
50304
+ };
50305
+
50306
+ var onPathSelect = function onPathSelect(pathValue, leaf) {
50307
+ onSelect(pathValue, {
50308
+ selected: !checkedSet.has(pathValue)
50309
+ });
50310
+
50311
+ if (!multiple && (leaf || changeOnSelect && expandTrigger === 'hover')) {
50312
+ onToggleOpen(false);
50364
50313
  }
50314
+ };
50365
50315
 
50366
- warning__WEBPACK_IMPORTED_MODULE_9___default()(!('filedNames' in props), '`filedNames` of Cascader is a typo usage and deprecated, please use `fieldNames` instead.');
50367
- _this.state = {
50368
- popupVisible: props.popupVisible,
50369
- activeValue: initialValue,
50370
- value: initialValue,
50371
- prevProps: props
50372
- };
50373
- _this.defaultFieldNames = {
50374
- label: 'label',
50375
- value: 'value',
50376
- children: 'children'
50316
+ var getPathList = function getPathList(pathList) {
50317
+ var currentOptions = options;
50318
+
50319
+ var _loop = function _loop(i) {
50320
+ currentOptions = (currentOptions || []).find(function (option) {
50321
+ return option.value === pathList[i];
50322
+ }).children;
50377
50323
  };
50378
- return _this;
50379
- }
50380
50324
 
50381
- Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(Cascader, [{
50382
- key: "getPopupDOMNode",
50383
- value: function getPopupDOMNode() {
50384
- return this.trigger.getPopupDomNode();
50325
+ for (var i = 0; i < pathList.length; i += 1) {
50326
+ _loop(i);
50385
50327
  }
50386
- }, {
50387
- key: "getFieldName",
50388
- value: function getFieldName(name) {
50389
- var defaultFieldNames = this.defaultFieldNames;
50390
- var _this$props2 = this.props,
50391
- fieldNames = _this$props2.fieldNames,
50392
- filedNames = _this$props2.filedNames;
50393
50328
 
50394
- if ('filedNames' in this.props) {
50395
- return filedNames[name] || defaultFieldNames[name]; // For old compatibility
50396
- }
50329
+ return currentOptions;
50330
+ }; // ========================== Search ==========================
50331
+
50332
+
50333
+ var searchOptions = Object(_hooks_useSearchResult__WEBPACK_IMPORTED_MODULE_12__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, props), {}, {
50334
+ prefixCls: mergedPrefixCls,
50335
+ fieldNames: fieldNames,
50336
+ changeOnSelect: changeOnSelect,
50337
+ searchConfig: search
50338
+ })); // ========================== Column ==========================
50397
50339
 
50398
- return fieldNames[name] || defaultFieldNames[name];
50340
+ var optionColumns = react__WEBPACK_IMPORTED_MODULE_5__["useMemo"](function () {
50341
+ if (searchValue) {
50342
+ return [{
50343
+ options: searchOptions
50344
+ }];
50399
50345
  }
50400
- }, {
50401
- key: "getFieldNames",
50402
- value: function getFieldNames() {
50403
- var _this$props3 = this.props,
50404
- fieldNames = _this$props3.fieldNames,
50405
- filedNames = _this$props3.filedNames;
50406
50346
 
50407
- if ('filedNames' in this.props) {
50408
- return filedNames; // For old compatibility
50347
+ var rawOptionColumns = [];
50348
+
50349
+ for (var i = 0; i <= mergedOpenPath.length; i += 1) {
50350
+ var subOptions = getPathList(mergedOpenPath.slice(0, i));
50351
+
50352
+ if (subOptions) {
50353
+ rawOptionColumns.push({
50354
+ options: subOptions
50355
+ });
50356
+ } else {
50357
+ break;
50409
50358
  }
50359
+ }
50360
+
50361
+ return rawOptionColumns;
50362
+ }, [searchValue, searchOptions, mergedOpenPath]); // ========================= Keyboard =========================
50410
50363
 
50411
- return fieldNames;
50364
+ var getActiveOption = function getActiveOption(activeColumnIndex, offset) {
50365
+ var _optionColumns$active;
50366
+
50367
+ var pathActiveValue = mergedOpenPath[activeColumnIndex];
50368
+ var currentOptions = ((_optionColumns$active = optionColumns[activeColumnIndex]) === null || _optionColumns$active === void 0 ? void 0 : _optionColumns$active.options) || [];
50369
+ var activeOptionIndex = currentOptions.findIndex(function (opt) {
50370
+ return opt.value === pathActiveValue;
50371
+ });
50372
+ var len = currentOptions.length; // Last one is special since -1 may back 2 offset
50373
+
50374
+ if (offset === -1 && activeOptionIndex === -1) {
50375
+ activeOptionIndex = len;
50412
50376
  }
50413
- }, {
50414
- key: "getCurrentLevelOptions",
50415
- value: function getCurrentLevelOptions() {
50416
- var _this2 = this;
50417
50377
 
50418
- var _this$props$options = this.props.options,
50419
- options = _this$props$options === void 0 ? [] : _this$props$options;
50420
- var _this$state$activeVal = this.state.activeValue,
50421
- activeValue = _this$state$activeVal === void 0 ? [] : _this$state$activeVal;
50422
- var result = array_tree_filter__WEBPACK_IMPORTED_MODULE_11___default()(options, function (o, level) {
50423
- return o[_this2.getFieldName('value')] === activeValue[level];
50424
- }, {
50425
- childrenKeyName: this.getFieldName('children')
50426
- });
50378
+ for (var i = 1; i <= len; i += 1) {
50379
+ var current = (activeOptionIndex + i * offset + len) % len;
50380
+ var option = currentOptions[current];
50427
50381
 
50428
- if (result[result.length - 2]) {
50429
- return result[result.length - 2][this.getFieldName('children')];
50382
+ if (!option.disabled) {
50383
+ return option;
50430
50384
  }
50385
+ }
50431
50386
 
50432
- return Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(options).filter(function (o) {
50433
- return !o.disabled;
50434
- });
50387
+ return null;
50388
+ };
50389
+
50390
+ var prevColumn = function prevColumn() {
50391
+ if (mergedOpenPath.length <= 1) {
50392
+ onToggleOpen(false);
50435
50393
  }
50436
- }, {
50437
- key: "getActiveOptions",
50438
- value: function getActiveOptions(activeValue) {
50439
- var _this3 = this;
50440
50394
 
50441
- return array_tree_filter__WEBPACK_IMPORTED_MODULE_11___default()(this.props.options || [], function (o, level) {
50442
- return o[_this3.getFieldName('value')] === activeValue[level];
50443
- }, {
50444
- childrenKeyName: this.getFieldName('children')
50445
- });
50395
+ setOpenFinalValue(mergedOpenPath[mergedOpenPath.length - 2]);
50396
+ };
50397
+
50398
+ var nextColumn = function nextColumn() {
50399
+ var nextColumnIndex = mergedOpenPath.length;
50400
+ var nextActiveOption = getActiveOption(nextColumnIndex, 1);
50401
+
50402
+ if (nextActiveOption) {
50403
+ onPathOpen(nextColumnIndex, nextActiveOption.value);
50446
50404
  }
50447
- }, {
50448
- key: "render",
50449
- value: function render() {
50450
- var _this$props4 = this.props,
50451
- prefixCls = _this$props4.prefixCls,
50452
- transitionName = _this$props4.transitionName,
50453
- popupClassName = _this$props4.popupClassName,
50454
- _this$props4$options = _this$props4.options,
50455
- options = _this$props4$options === void 0 ? [] : _this$props4$options,
50456
- disabled = _this$props4.disabled,
50457
- builtinPlacements = _this$props4.builtinPlacements,
50458
- popupPlacement = _this$props4.popupPlacement,
50459
- children = _this$props4.children,
50460
- dropdownRender = _this$props4.dropdownRender,
50461
- restProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_this$props4, ["prefixCls", "transitionName", "popupClassName", "options", "disabled", "builtinPlacements", "popupPlacement", "children", "dropdownRender"]); // Did not show popup when there is no options
50405
+ };
50462
50406
 
50407
+ react__WEBPACK_IMPORTED_MODULE_5__["useImperativeHandle"](ref, function () {
50408
+ return {
50409
+ // scrollTo: treeRef.current?.scrollTo,
50410
+ onKeyDown: function onKeyDown(event) {
50411
+ var which = event.which;
50463
50412
 
50464
- var menus = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"]("div", null);
50465
- var emptyMenuClassName = '';
50413
+ switch (which) {
50414
+ // >>> Arrow keys
50415
+ case rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].UP:
50416
+ case rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].DOWN:
50417
+ {
50418
+ var offset = 0;
50466
50419
 
50467
- if (options && options.length > 0) {
50468
- menus = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"](_Menus__WEBPACK_IMPORTED_MODULE_13__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, this.props, {
50469
- fieldNames: this.getFieldNames(),
50470
- defaultFieldNames: this.defaultFieldNames,
50471
- activeValue: this.state.activeValue,
50472
- onSelect: this.handleMenuSelect,
50473
- onItemDoubleClick: this.handleItemDoubleClick,
50474
- visible: this.state.popupVisible
50475
- }));
50476
- } else {
50477
- emptyMenuClassName = " ".concat(prefixCls, "-menus-empty");
50478
- }
50420
+ if (which === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].UP) {
50421
+ offset = -1;
50422
+ } else if (which === rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].DOWN) {
50423
+ offset = 1;
50424
+ }
50479
50425
 
50480
- var popupNode = menus;
50426
+ if (offset !== 0) {
50427
+ var activeColumnIndex = Math.max(mergedOpenPath.length - 1, 0);
50428
+ var nextActiveOption = getActiveOption(activeColumnIndex, offset);
50481
50429
 
50482
- if (dropdownRender) {
50483
- popupNode = dropdownRender(menus);
50484
- }
50430
+ if (nextActiveOption) {
50431
+ var _containerRef$current, _ele$scrollIntoView;
50485
50432
 
50486
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["createElement"](rc_trigger__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({
50487
- ref: this.saveTrigger
50488
- }, restProps, {
50489
- popupPlacement: popupPlacement,
50490
- builtinPlacements: builtinPlacements,
50491
- popupTransitionName: transitionName,
50492
- action: disabled ? [] : ['click'],
50493
- popupVisible: disabled ? false : this.state.popupVisible,
50494
- onPopupVisibleChange: this.handlePopupVisibleChange,
50495
- prefixCls: "".concat(prefixCls, "-menus"),
50496
- popupClassName: popupClassName + emptyMenuClassName,
50497
- popup: popupNode
50498
- }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7__["cloneElement"](children, {
50499
- onKeyDown: this.handleKeyDown,
50500
- tabIndex: disabled ? undefined : 0
50501
- }));
50502
- }
50503
- }], [{
50504
- key: "getDerivedStateFromProps",
50505
- value: function getDerivedStateFromProps(nextProps, prevState) {
50506
- var _prevState$prevProps = prevState.prevProps,
50507
- prevProps = _prevState$prevProps === void 0 ? {} : _prevState$prevProps;
50508
- var newState = {
50509
- prevProps: nextProps
50510
- };
50433
+ var ele = (_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.querySelector("li[data-value=\"".concat(nextActiveOption.value, "\"]"));
50434
+ ele === null || ele === void 0 ? void 0 : (_ele$scrollIntoView = ele.scrollIntoView) === null || _ele$scrollIntoView === void 0 ? void 0 : _ele$scrollIntoView.call(ele, {
50435
+ block: 'nearest'
50436
+ });
50437
+ onPathOpen(activeColumnIndex, nextActiveOption.value);
50438
+ }
50439
+ }
50440
+
50441
+ break;
50442
+ }
50443
+
50444
+ case rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].LEFT:
50445
+ {
50446
+ if (rtl) {
50447
+ nextColumn();
50448
+ } else {
50449
+ prevColumn();
50450
+ }
50451
+
50452
+ break;
50453
+ }
50454
+
50455
+ case rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].RIGHT:
50456
+ {
50457
+ if (rtl) {
50458
+ prevColumn();
50459
+ } else {
50460
+ nextColumn();
50461
+ }
50462
+
50463
+ break;
50464
+ }
50465
+
50466
+ case rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].BACKSPACE:
50467
+ {
50468
+ if (!searchValue) {
50469
+ prevColumn();
50470
+ }
50471
+
50472
+ break;
50473
+ }
50474
+ // >>> Select
50475
+
50476
+ case rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].ENTER:
50477
+ {
50478
+ var _optionColumns, _optionColumns$option;
50479
+
50480
+ var lastValue = mergedOpenPath[mergedOpenPath.length - 1];
50481
+ var option = (_optionColumns = optionColumns[mergedOpenPath.length - 1]) === null || _optionColumns === void 0 ? void 0 : (_optionColumns$option = _optionColumns.options) === null || _optionColumns$option === void 0 ? void 0 : _optionColumns$option.find(function (opt) {
50482
+ return opt.value === lastValue;
50483
+ }); // Skip when no select
50511
50484
 
50512
- if ('value' in nextProps && !Object(_utils__WEBPACK_IMPORTED_MODULE_12__[/* isEqualArrays */ "a"])(prevProps.value, nextProps.value)) {
50513
- newState.value = nextProps.value || []; // allow activeValue diff from value
50514
- // https://github.com/ant-design/ant-design/issues/2767
50485
+ if (option) {
50486
+ var leaf = Object(_util__WEBPACK_IMPORTED_MODULE_10__[/* isLeaf */ "d"])(option);
50515
50487
 
50516
- if (!('loadData' in nextProps)) {
50517
- newState.activeValue = nextProps.value || [];
50488
+ if (multiple || changeOnSelect || leaf) {
50489
+ onPathSelect(lastValue, leaf);
50490
+ } // Close for changeOnSelect
50491
+
50492
+
50493
+ if (changeOnSelect) {
50494
+ onToggleOpen(false);
50495
+ }
50496
+ }
50497
+
50498
+ break;
50499
+ }
50500
+ // >>> Close
50501
+
50502
+ case rc_util_es_KeyCode__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].ESC:
50503
+ {
50504
+ onToggleOpen(false);
50505
+
50506
+ if (open) {
50507
+ event.stopPropagation();
50508
+ }
50509
+ }
50518
50510
  }
50519
- }
50511
+ },
50512
+ onKeyUp: function onKeyUp() {}
50513
+ };
50514
+ }); // ========================== Render ==========================
50520
50515
 
50521
- if ('popupVisible' in nextProps) {
50522
- newState.popupVisible = nextProps.popupVisible;
50523
- }
50516
+ var columnProps = Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, props), {}, {
50517
+ onOpen: onPathOpen,
50518
+ onSelect: onPathSelect,
50519
+ onToggleOpen: onToggleOpen,
50520
+ checkedSet: checkedSet,
50521
+ halfCheckedSet: halfCheckedSet,
50522
+ loadingKeys: loadingKeys
50523
+ }); // >>>>> Empty
50524
+
50525
+
50526
+ var isEmpty = !((_optionColumns$ = optionColumns[0]) === null || _optionColumns$ === void 0 ? void 0 : (_optionColumns$$optio = _optionColumns$.options) === null || _optionColumns$$optio === void 0 ? void 0 : _optionColumns$$optio.length);
50527
+ var emptyList = [{
50528
+ title: notFoundContent,
50529
+ value: '__EMPTY__',
50530
+ disabled: true,
50531
+ node: null
50532
+ }]; // >>>>> Columns
50533
+
50534
+ var mergedOptionColumns = isEmpty ? [{
50535
+ options: emptyList
50536
+ }] : optionColumns;
50537
+ var columnNodes = mergedOptionColumns.map(function (col, index) {
50538
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"](_Column__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({
50539
+ key: index,
50540
+ index: index
50541
+ }, columnProps, {
50542
+ prefixCls: mergedPrefixCls,
50543
+ options: col.options,
50544
+ openKey: mergedOpenPath[index]
50545
+ }));
50546
+ }); // >>>>> Render
50524
50547
 
50525
- return newState;
50526
- }
50527
- }]);
50548
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"](react__WEBPACK_IMPORTED_MODULE_5__["Fragment"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"]("div", {
50549
+ className: classnames__WEBPACK_IMPORTED_MODULE_6___default()("".concat(mergedPrefixCls, "-menus"), (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(mergedPrefixCls, "-menu-empty"), isEmpty), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_classNames, "".concat(mergedPrefixCls, "-rtl"), rtl), _classNames)),
50550
+ ref: containerRef
50551
+ }, columnNodes));
50552
+ });
50553
+ /* harmony default export */ __webpack_exports__["a"] = (RefOptionList);
50528
50554
 
50529
- return Cascader;
50530
- }(react__WEBPACK_IMPORTED_MODULE_7__["Component"]);
50555
+ /***/ }),
50531
50556
 
50532
- Cascader.defaultProps = {
50533
- onChange: function onChange() {},
50534
- onPopupVisibleChange: function onPopupVisibleChange() {},
50535
- disabled: false,
50536
- transitionName: '',
50537
- prefixCls: 'rc-cascader',
50538
- popupClassName: '',
50539
- popupPlacement: 'bottomLeft',
50540
- builtinPlacements: _placements__WEBPACK_IMPORTED_MODULE_14__[/* default */ "a"],
50557
+ /***/ "./node_modules/rc-cascader/es/context.js":
50558
+ /*!************************************************!*\
50559
+ !*** ./node_modules/rc-cascader/es/context.js ***!
50560
+ \************************************************/
50561
+ /*! exports provided: default */
50562
+ /*! exports used: default */
50563
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
50564
+
50565
+ "use strict";
50566
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
50567
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
50568
+
50569
+ var CascaderContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createContext"]({
50570
+ changeOnSelect: false,
50541
50571
  expandTrigger: 'click',
50542
- fieldNames: {
50543
- label: 'label',
50544
- value: 'value',
50545
- children: 'children'
50546
- },
50547
- expandIcon: '>'
50548
- };
50549
- /* harmony default export */ __webpack_exports__["a"] = (Cascader);
50572
+ fieldNames: null,
50573
+ expandIcon: null,
50574
+ loadingIcon: null,
50575
+ loadData: null,
50576
+ dropdownMenuColumnStyle: null,
50577
+ search: null
50578
+ });
50579
+ /* harmony default export */ __webpack_exports__["a"] = (CascaderContext);
50550
50580
 
50551
50581
  /***/ }),
50552
50582
 
50553
- /***/ "./node_modules/rc-cascader/es/Menus.js":
50554
- /*!**********************************************!*\
50555
- !*** ./node_modules/rc-cascader/es/Menus.js ***!
50556
- \**********************************************/
50583
+ /***/ "./node_modules/rc-cascader/es/hooks/useSearchConfig.js":
50584
+ /*!**************************************************************!*\
50585
+ !*** ./node_modules/rc-cascader/es/hooks/useSearchConfig.js ***!
50586
+ \**************************************************************/
50557
50587
  /*! exports provided: default */
50558
50588
  /*! exports used: default */
50559
50589
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
50560
50590
 
50561
50591
  "use strict";
50562
- /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js");
50563
- /* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js");
50564
- /* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js");
50565
- /* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js");
50566
- /* harmony import */ var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createSuper */ "./node_modules/@babel/runtime/helpers/esm/createSuper.js");
50567
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ "react");
50568
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__);
50569
- /* harmony import */ var array_tree_filter__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! array-tree-filter */ "./node_modules/array-tree-filter/lib/index.js");
50570
- /* harmony import */ var array_tree_filter__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(array_tree_filter__WEBPACK_IMPORTED_MODULE_6__);
50592
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useSearchConfig; });
50593
+ /* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ "./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
50594
+ /* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js");
50595
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
50596
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
50597
+ /* harmony import */ var rc_util_es_warning__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-util/es/warning */ "./node_modules/rc-util/es/warning.js");
50571
50598
 
50572
50599
 
50573
50600
 
50601
+ // Convert `showSearch` to unique config
50574
50602
 
50603
+ function useSearchConfig(showSearch) {
50604
+ return react__WEBPACK_IMPORTED_MODULE_2__["useMemo"](function () {
50605
+ if (!showSearch) {
50606
+ return [false, {}];
50607
+ }
50575
50608
 
50609
+ var searchConfig = {
50610
+ matchInputWidth: true,
50611
+ limit: 50
50612
+ };
50576
50613
 
50614
+ if (showSearch && Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(showSearch) === 'object') {
50615
+ searchConfig = Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, searchConfig), showSearch);
50616
+ }
50577
50617
 
50618
+ if (searchConfig.limit <= 0) {
50619
+ delete searchConfig.limit;
50578
50620
 
50579
- var Menus = /*#__PURE__*/function (_React$Component) {
50580
- Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(Menus, _React$Component);
50621
+ if (true) {
50622
+ Object(rc_util_es_warning__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(false, "'limit' of showSearch should be positive number or false.");
50623
+ }
50624
+ }
50581
50625
 
50582
- var _super = Object(_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(Menus);
50626
+ return [true, searchConfig];
50627
+ }, [showSearch]);
50628
+ }
50583
50629
 
50584
- function Menus() {
50585
- var _this;
50630
+ /***/ }),
50586
50631
 
50587
- Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(this, Menus);
50632
+ /***/ "./node_modules/rc-cascader/es/hooks/useSearchResult.js":
50633
+ /*!**************************************************************!*\
50634
+ !*** ./node_modules/rc-cascader/es/hooks/useSearchResult.js ***!
50635
+ \**************************************************************/
50636
+ /*! exports provided: default */
50637
+ /*! exports used: default */
50638
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
50588
50639
 
50589
- _this = _super.apply(this, arguments);
50590
- _this.menuItems = {};
50640
+ "use strict";
50641
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useSearchResult; });
50642
+ /* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ "./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
50643
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
50644
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
50645
+ /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../util */ "./node_modules/rc-cascader/es/util.js");
50591
50646
 
50592
- _this.saveMenuItem = function (index) {
50593
- return function (node) {
50594
- _this.menuItems[index] = node;
50595
- };
50596
- };
50597
50647
 
50598
- return _this;
50599
- }
50600
50648
 
50601
- Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(Menus, [{
50602
- key: "componentDidMount",
50603
- value: function componentDidMount() {
50604
- this.scrollActiveItemToView();
50605
- }
50606
- }, {
50607
- key: "componentDidUpdate",
50608
- value: function componentDidUpdate(prevProps) {
50609
- if (!prevProps.visible && this.props.visible) {
50610
- this.scrollActiveItemToView();
50611
- }
50612
- }
50613
- }, {
50614
- key: "getFieldName",
50615
- value: function getFieldName(name) {
50616
- var _this$props = this.props,
50617
- fieldNames = _this$props.fieldNames,
50618
- defaultFieldNames = _this$props.defaultFieldNames; // 防止只设置单个属性的名字
50619
50649
 
50620
- return fieldNames[name] || defaultFieldNames[name];
50621
- }
50622
- }, {
50623
- key: "getOption",
50624
- value: function getOption(option, menuIndex) {
50625
- var _this$props2 = this.props,
50626
- prefixCls = _this$props2.prefixCls,
50627
- expandTrigger = _this$props2.expandTrigger,
50628
- expandIcon = _this$props2.expandIcon,
50629
- loadingIcon = _this$props2.loadingIcon;
50630
- var onSelect = this.props.onSelect.bind(this, option, menuIndex);
50631
- var onItemDoubleClick = this.props.onItemDoubleClick.bind(this, option, menuIndex);
50632
- var expandProps = {
50633
- onClick: onSelect,
50634
- onDoubleClick: onItemDoubleClick
50635
- };
50636
- var menuItemCls = "".concat(prefixCls, "-menu-item");
50637
- var expandIconNode = null;
50638
- var hasChildren = option[this.getFieldName('children')] && option[this.getFieldName('children')].length > 0;
50650
+ var defaultFilter = function defaultFilter(search, options, _ref) {
50651
+ var label = _ref.label;
50652
+ return options.some(function (opt) {
50653
+ return String(opt[label]).toLowerCase().includes(search.toLowerCase());
50654
+ });
50655
+ };
50639
50656
 
50640
- if (hasChildren || option.isLeaf === false) {
50641
- menuItemCls += " ".concat(prefixCls, "-menu-item-expand");
50657
+ var defaultRender = function defaultRender(inputValue, path, prefixCls, fieldNames) {
50658
+ return path.map(function (opt) {
50659
+ return opt[fieldNames.label];
50660
+ }).join(' / ');
50661
+ };
50642
50662
 
50643
- if (!option.loading) {
50644
- expandIconNode = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"]("span", {
50645
- className: "".concat(prefixCls, "-menu-item-expand-icon")
50646
- }, expandIcon);
50647
- }
50648
- }
50663
+ function useSearchResult(resultConfig) {
50664
+ var searchConfig = resultConfig.searchConfig,
50665
+ flattenOptions = resultConfig.flattenOptions,
50666
+ fieldNames = resultConfig.fieldNames,
50667
+ changeOnSelect = resultConfig.changeOnSelect,
50668
+ searchValue = resultConfig.searchValue,
50669
+ prefixCls = resultConfig.prefixCls; // ============================== MISC ==============================
50649
50670
 
50650
- if (expandTrigger === 'hover' && (hasChildren || option.isLeaf === false)) {
50651
- expandProps = {
50652
- onMouseEnter: this.delayOnSelect.bind(this, onSelect),
50653
- onMouseLeave: this.delayOnSelect.bind(this),
50654
- onClick: onSelect
50655
- };
50656
- }
50671
+ var filterOption = searchConfig.filter || defaultFilter;
50672
+ var renderOption = searchConfig.render || defaultRender; // ============================= Filter =============================
50673
+ // Do filter
50657
50674
 
50658
- if (this.isActiveOption(option, menuIndex)) {
50659
- menuItemCls += " ".concat(prefixCls, "-menu-item-active");
50660
- expandProps.ref = this.saveMenuItem(menuIndex);
50661
- }
50675
+ var filteredEntityList = react__WEBPACK_IMPORTED_MODULE_1__["useMemo"](function () {
50676
+ if (!searchValue) {
50677
+ return [];
50678
+ } // Normalize list
50662
50679
 
50663
- if (option.disabled) {
50664
- menuItemCls += " ".concat(prefixCls, "-menu-item-disabled");
50665
- }
50666
50680
 
50667
- var loadingIconNode = null;
50681
+ var normalizeList = flattenOptions.map(function (option) {
50682
+ var _restoreCompatibleVal = Object(_util__WEBPACK_IMPORTED_MODULE_2__[/* restoreCompatibleValue */ "e"])(option, fieldNames),
50683
+ options = _restoreCompatibleVal.options;
50668
50684
 
50669
- if (option.loading) {
50670
- menuItemCls += " ".concat(prefixCls, "-menu-item-loading");
50671
- loadingIconNode = loadingIcon || null;
50672
- }
50685
+ var originOptionList = options.map(function (opt) {
50686
+ return opt.node;
50687
+ });
50688
+ return {
50689
+ option: option,
50690
+ originOptionList: originOptionList
50691
+ };
50692
+ }); // Not keep parent node when !changeOnSelect
50693
+
50694
+ if (!changeOnSelect) {
50695
+ normalizeList = normalizeList.filter(function (_ref2) {
50696
+ var option = _ref2.option;
50697
+ return Object(_util__WEBPACK_IMPORTED_MODULE_2__[/* isLeaf */ "d"])(option.data);
50698
+ });
50699
+ } // Filter
50673
50700
 
50674
- var title = '';
50675
50701
 
50676
- if ('title' in option) {
50677
- // eslint-disable-next-line prefer-destructuring
50678
- title = option.title;
50679
- } else if (typeof option[this.getFieldName('label')] === 'string') {
50680
- title = option[this.getFieldName('label')];
50702
+ var filteredList = [];
50703
+
50704
+ for (var i = 0; i < normalizeList.length; i += 1) {
50705
+ // Perf saving if enabled
50706
+ if (!searchConfig.sort && filteredList.length >= searchConfig.limit) {
50707
+ break;
50708
+ } // Do filter
50709
+
50710
+
50711
+ var optGrp = normalizeList[i];
50712
+
50713
+ if (filterOption(searchValue, optGrp.originOptionList, fieldNames)) {
50714
+ filteredList.push(optGrp);
50681
50715
  }
50716
+ } // Sort: When searchConfig.sort is enabled. We have to filter all the list
50682
50717
 
50683
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"]("li", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({
50684
- key: option[this.getFieldName('value')],
50685
- className: menuItemCls,
50686
- title: title
50687
- }, expandProps, {
50688
- role: "menuitem",
50689
- onMouseDown: function onMouseDown(e) {
50690
- return e.preventDefault();
50691
- }
50692
- }), option[this.getFieldName('label')], expandIconNode, loadingIconNode);
50693
- }
50694
- }, {
50695
- key: "getActiveOptions",
50696
- value: function getActiveOptions(values) {
50697
- var _this2 = this;
50698
50718
 
50699
- var options = this.props.options;
50700
- var activeValue = values || this.props.activeValue;
50701
- return array_tree_filter__WEBPACK_IMPORTED_MODULE_6___default()(options, function (o, level) {
50702
- return o[_this2.getFieldName('value')] === activeValue[level];
50703
- }, {
50704
- childrenKeyName: this.getFieldName('children')
50719
+ if (searchConfig.sort) {
50720
+ filteredList.sort(function (a, b) {
50721
+ return searchConfig.sort(a.originOptionList, b.originOptionList, searchValue, fieldNames);
50705
50722
  });
50706
50723
  }
50707
- }, {
50708
- key: "getShowOptions",
50709
- value: function getShowOptions() {
50710
- var _this3 = this;
50711
50724
 
50712
- var options = this.props.options;
50713
- var result = this.getActiveOptions().map(function (activeOption) {
50714
- return activeOption[_this3.getFieldName('children')];
50715
- }).filter(function (activeOption) {
50716
- return !!activeOption && activeOption.length > 0;
50717
- });
50718
- result.unshift(options);
50719
- return result;
50720
- }
50721
- }, {
50722
- key: "delayOnSelect",
50723
- value: function delayOnSelect(onSelect) {
50724
- var _this4 = this;
50725
+ return filteredList;
50726
+ }, [flattenOptions, fieldNames, searchValue, filterOption, changeOnSelect, searchConfig]); // ======================== Generate Options ========================
50727
+ // Wrap with connected label
50725
50728
 
50726
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
50727
- args[_key - 1] = arguments[_key];
50728
- }
50729
+ var options = react__WEBPACK_IMPORTED_MODULE_1__["useMemo"](function () {
50730
+ return filteredEntityList.map(function (_ref3) {
50731
+ var option = _ref3.option,
50732
+ originOptionList = _ref3.originOptionList;
50733
+ var title = renderOption(searchValue, originOptionList, prefixCls, fieldNames);
50734
+ return Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, option.data), {}, {
50735
+ title: title
50736
+ });
50737
+ });
50738
+ }, [searchValue, renderOption, filteredEntityList, fieldNames, prefixCls]);
50739
+ return options;
50740
+ }
50729
50741
 
50730
- if (this.delayTimer) {
50731
- clearTimeout(this.delayTimer);
50732
- this.delayTimer = null;
50733
- }
50742
+ /***/ }),
50734
50743
 
50735
- if (typeof onSelect === 'function') {
50736
- this.delayTimer = window.setTimeout(function () {
50737
- onSelect(args);
50738
- _this4.delayTimer = null;
50739
- }, 150);
50740
- }
50741
- }
50742
- }, {
50743
- key: "scrollActiveItemToView",
50744
- value: function scrollActiveItemToView() {
50745
- // scroll into view
50746
- var optionsLength = this.getShowOptions().length; // eslint-disable-next-line no-plusplus
50744
+ /***/ "./node_modules/rc-cascader/es/hooks/useUpdateEffect.js":
50745
+ /*!**************************************************************!*\
50746
+ !*** ./node_modules/rc-cascader/es/hooks/useUpdateEffect.js ***!
50747
+ \**************************************************************/
50748
+ /*! exports provided: default */
50749
+ /*! exports used: default */
50750
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
50747
50751
 
50748
- for (var i = 0; i < optionsLength; i++) {
50749
- var itemComponent = this.menuItems[i];
50752
+ "use strict";
50753
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useUpdateEffect; });
50754
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
50755
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
50750
50756
 
50751
- if (itemComponent && itemComponent.parentElement) {
50752
- itemComponent.parentElement.scrollTop = itemComponent.offsetTop;
50753
- }
50754
- }
50755
- }
50756
- }, {
50757
- key: "isActiveOption",
50758
- value: function isActiveOption(option, menuIndex) {
50759
- var _this$props$activeVal = this.props.activeValue,
50760
- activeValue = _this$props$activeVal === void 0 ? [] : _this$props$activeVal;
50761
- return activeValue[menuIndex] === option[this.getFieldName('value')];
50762
- }
50763
- }, {
50764
- key: "render",
50765
- value: function render() {
50766
- var _this5 = this;
50757
+ /**
50758
+ * Work like `componentDidUpdate`
50759
+ */
50767
50760
 
50768
- var _this$props3 = this.props,
50769
- prefixCls = _this$props3.prefixCls,
50770
- dropdownMenuColumnStyle = _this$props3.dropdownMenuColumnStyle;
50771
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"]("div", null, this.getShowOptions().map(function (options, menuIndex) {
50772
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__["createElement"]("ul", {
50773
- className: "".concat(prefixCls, "-menu"),
50774
- key: menuIndex,
50775
- style: dropdownMenuColumnStyle
50776
- }, options.map(function (option) {
50777
- return _this5.getOption(option, menuIndex);
50778
- }));
50779
- }));
50780
- }
50781
- }]);
50761
+ function useUpdateEffect(updater, condition) {
50762
+ var prepareRef = react__WEBPACK_IMPORTED_MODULE_0__["useRef"](true);
50763
+ react__WEBPACK_IMPORTED_MODULE_0__["useEffect"](function () {
50764
+ if (prepareRef.current) {
50765
+ prepareRef.current = false;
50766
+ return;
50767
+ } // eslint-disable-next-line consistent-return
50782
50768
 
50783
- return Menus;
50784
- }(react__WEBPACK_IMPORTED_MODULE_5__["Component"]);
50785
50769
 
50786
- Menus.defaultProps = {
50787
- options: [],
50788
- value: [],
50789
- activeValue: [],
50790
- onSelect: function onSelect() {},
50791
- prefixCls: 'rc-cascader-menus',
50792
- visible: false,
50793
- expandTrigger: 'click'
50794
- };
50795
- /* harmony default export */ __webpack_exports__["a"] = (Menus);
50770
+ return updater();
50771
+ }, condition);
50772
+ }
50796
50773
 
50797
50774
  /***/ }),
50798
50775
 
@@ -50811,86 +50788,102 @@ Menus.defaultProps = {
50811
50788
 
50812
50789
  /***/ }),
50813
50790
 
50814
- /***/ "./node_modules/rc-cascader/es/placements.js":
50815
- /*!***************************************************!*\
50816
- !*** ./node_modules/rc-cascader/es/placements.js ***!
50817
- \***************************************************/
50818
- /*! exports provided: default */
50819
- /*! exports used: default */
50791
+ /***/ "./node_modules/rc-cascader/es/util.js":
50792
+ /*!*********************************************!*\
50793
+ !*** ./node_modules/rc-cascader/es/util.js ***!
50794
+ \*********************************************/
50795
+ /*! exports provided: fillFieldNames, restoreCompatibleValue, isLeaf, connectValue, splitValue, convertOptions */
50796
+ /*! exports used: connectValue, convertOptions, fillFieldNames, isLeaf, restoreCompatibleValue, splitValue */
50820
50797
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
50821
50798
 
50822
50799
  "use strict";
50823
- var BUILT_IN_PLACEMENTS = {
50824
- bottomLeft: {
50825
- points: ['tl', 'bl'],
50826
- offset: [0, 4],
50827
- overflow: {
50828
- adjustX: 1,
50829
- adjustY: 1
50830
- }
50831
- },
50832
- topLeft: {
50833
- points: ['bl', 'tl'],
50834
- offset: [0, -4],
50835
- overflow: {
50836
- adjustX: 1,
50837
- adjustY: 1
50838
- }
50839
- },
50840
- bottomRight: {
50841
- points: ['tr', 'br'],
50842
- offset: [0, 4],
50843
- overflow: {
50844
- adjustX: 1,
50845
- adjustY: 1
50846
- }
50847
- },
50848
- topRight: {
50849
- points: ['br', 'tr'],
50850
- offset: [0, -4],
50851
- overflow: {
50852
- adjustX: 1,
50853
- adjustY: 1
50854
- }
50855
- }
50856
- };
50857
- /* harmony default export */ __webpack_exports__["a"] = (BUILT_IN_PLACEMENTS);
50800
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return restoreCompatibleValue; });
50801
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return isLeaf; });
50802
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return connectValue; });
50803
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return splitValue; });
50804
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return convertOptions; });
50805
+ /* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js");
50806
+ /* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ "./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
50807
+ /* harmony import */ var rc_tree_select_es_utils_valueUtil__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rc-tree-select/es/utils/valueUtil */ "./node_modules/rc-tree-select/es/utils/valueUtil.js");
50808
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "c", function() { return rc_tree_select_es_utils_valueUtil__WEBPACK_IMPORTED_MODULE_2__["b"]; });
50858
50809
 
50859
- /***/ }),
50860
50810
 
50861
- /***/ "./node_modules/rc-cascader/es/utils.js":
50862
- /*!**********************************************!*\
50863
- !*** ./node_modules/rc-cascader/es/utils.js ***!
50864
- \**********************************************/
50865
- /*! exports provided: isEqualArrays */
50866
- /*! exports used: isEqualArrays */
50867
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
50868
50811
 
50869
- "use strict";
50870
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isEqualArrays; });
50871
- function isEqualArrays(arrA, arrB) {
50872
- if (arrA === arrB) {
50873
- return true;
50874
- }
50875
50812
 
50876
- if (!arrA || !arrB) {
50877
- return false;
50813
+ var VALUE_SPLIT = '__RC_CASCADER_SPLIT__';
50814
+
50815
+ /**
50816
+ * Convert entity back to path & options
50817
+ * @returns
50818
+ */
50819
+
50820
+ function restoreCompatibleValue(entity, fieldNames) {
50821
+ var path = [];
50822
+ var options = [];
50823
+ var current = entity;
50824
+
50825
+ while (current) {
50826
+ path.unshift(current.data.node[fieldNames.value]);
50827
+ options.unshift(current.data.node);
50828
+ current = current.parent;
50878
50829
  }
50879
50830
 
50880
- var len = arrA.length;
50831
+ return {
50832
+ path: path,
50833
+ options: options
50834
+ };
50835
+ }
50836
+ function isLeaf(option) {
50837
+ var children = option.children,
50838
+ node = option.node;
50839
+ var leaf = node === null || node === void 0 ? void 0 : node.isLeaf;
50840
+ return leaf !== undefined ? leaf : !(children === null || children === void 0 ? void 0 : children.length);
50841
+ }
50842
+ /**
50843
+ * We will connect path value to a string. e.g.
50844
+ * ['little', 'bamboo'] => 'little__bamboo'
50845
+ *
50846
+ * zombieJ: It's better to deprecate the same key in the nest tree. Maybe next major version.
50847
+ */
50881
50848
 
50882
- if (arrB.length !== len) {
50883
- return false;
50884
- } // eslint-disable-next-line no-plusplus
50849
+ function connectValue(value) {
50850
+ return (value || []).join(VALUE_SPLIT);
50851
+ }
50852
+ /**
50853
+ * Reverse of `connectValue`
50854
+ */
50885
50855
 
50856
+ function splitValue(str) {
50857
+ return str.split(VALUE_SPLIT);
50858
+ }
50859
+ /**
50860
+ * Fill options with fully value by path to avoid nest entity with same value.
50861
+ * Which means we need another round to get origin node back!
50862
+ * This is slow perf on large list. We should abandon same value in nest in future.
50863
+ */
50886
50864
 
50887
- for (var i = 0; i < len; i++) {
50888
- if (arrA[i] !== arrB[i]) {
50889
- return false;
50890
- }
50865
+ function convertOptions(options, _ref) {
50866
+ var fieldValue = _ref.value,
50867
+ fieldChildren = _ref.children;
50868
+
50869
+ function injectValue(list) {
50870
+ var parentValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
50871
+ return (list || []).map(function (option) {
50872
+ var _objectSpread2;
50873
+
50874
+ var newValue = parentValue ? connectValue([parentValue, option[fieldValue]]) : option[fieldValue];
50875
+
50876
+ var cloneOption = Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, option), {}, (_objectSpread2 = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_objectSpread2, fieldValue, newValue), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_objectSpread2, "node", option), _objectSpread2));
50877
+
50878
+ if (cloneOption[fieldChildren]) {
50879
+ cloneOption[fieldChildren] = injectValue(cloneOption[fieldChildren], newValue);
50880
+ }
50881
+
50882
+ return cloneOption;
50883
+ });
50891
50884
  }
50892
50885
 
50893
- return true;
50886
+ return injectValue(options);
50894
50887
  }
50895
50888
 
50896
50889
  /***/ }),
@@ -96268,81 +96261,6 @@ function __classPrivateFieldSet(receiver, privateMap, value) {
96268
96261
  }
96269
96262
 
96270
96263
 
96271
- /***/ }),
96272
-
96273
- /***/ "./node_modules/warning/warning.js":
96274
- /*!*****************************************!*\
96275
- !*** ./node_modules/warning/warning.js ***!
96276
- \*****************************************/
96277
- /*! no static exports found */
96278
- /*! exports used: default */
96279
- /***/ (function(module, exports, __webpack_require__) {
96280
-
96281
- "use strict";
96282
- /**
96283
- * Copyright (c) 2014-present, Facebook, Inc.
96284
- *
96285
- * This source code is licensed under the MIT license found in the
96286
- * LICENSE file in the root directory of this source tree.
96287
- */
96288
-
96289
-
96290
-
96291
- /**
96292
- * Similar to invariant but only logs a warning if the condition is not met.
96293
- * This can be used to log issues in development environments in critical
96294
- * paths. Removing the logging code for production environments will keep the
96295
- * same logic and follow the same code paths.
96296
- */
96297
-
96298
- var __DEV__ = "development" !== 'production';
96299
-
96300
- var warning = function() {};
96301
-
96302
- if (__DEV__) {
96303
- var printWarning = function printWarning(format, args) {
96304
- var len = arguments.length;
96305
- args = new Array(len > 1 ? len - 1 : 0);
96306
- for (var key = 1; key < len; key++) {
96307
- args[key - 1] = arguments[key];
96308
- }
96309
- var argIndex = 0;
96310
- var message = 'Warning: ' +
96311
- format.replace(/%s/g, function() {
96312
- return args[argIndex++];
96313
- });
96314
- if (typeof console !== 'undefined') {
96315
- console.error(message);
96316
- }
96317
- try {
96318
- // --- Welcome to debugging React ---
96319
- // This error was thrown as a convenience so that you can use this stack
96320
- // to find the callsite that caused this warning to fire.
96321
- throw new Error(message);
96322
- } catch (x) {}
96323
- }
96324
-
96325
- warning = function(condition, format, args) {
96326
- var len = arguments.length;
96327
- args = new Array(len > 2 ? len - 2 : 0);
96328
- for (var key = 2; key < len; key++) {
96329
- args[key - 2] = arguments[key];
96330
- }
96331
- if (format === undefined) {
96332
- throw new Error(
96333
- '`warning(condition, format, ...args)` requires a warning ' +
96334
- 'message argument'
96335
- );
96336
- }
96337
- if (!condition) {
96338
- printWarning.apply(null, [format].concat(args));
96339
- }
96340
- };
96341
- }
96342
-
96343
- module.exports = warning;
96344
-
96345
-
96346
96264
  /***/ }),
96347
96265
 
96348
96266
  /***/ "./node_modules/webpack/buildin/global.js":