@qsxy/element-plus-react 1.0.0-next.1 → 1.0.0-next.10

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 (489) hide show
  1. package/README.md +95 -0
  2. package/dist/Avatar/Avatar.d.ts +4 -0
  3. package/dist/Avatar/Avatar.js +86 -0
  4. package/dist/Avatar/index.d.ts +2 -0
  5. package/dist/{VirtualList → Avatar}/index.js +7 -7
  6. package/dist/Avatar/typings.d.ts +21 -0
  7. package/dist/{VirtualList/interface.js → Avatar/typings.js} +3 -3
  8. package/dist/Badge/Badge.js +4 -5
  9. package/dist/Badge/typings.d.ts +10 -0
  10. package/dist/Breadcrumb/Breadcrumb.js +1 -4
  11. package/dist/Breadcrumb/typings.d.ts +4 -0
  12. package/dist/Button/Button.d.ts +0 -1
  13. package/dist/Button/Button.js +21 -9
  14. package/dist/Button/typings.d.ts +28 -0
  15. package/dist/Calendar/Calendar.js +1 -2
  16. package/dist/Calendar/CalendarContext.d.ts +10 -0
  17. package/dist/Calendar/Footer.js +1 -2
  18. package/dist/Calendar/Header.js +3 -8
  19. package/dist/Calendar/ShortCuts.d.ts +2 -0
  20. package/dist/Calendar/typings.d.ts +18 -0
  21. package/dist/Card/typings.d.ts +4 -0
  22. package/dist/Carousel/Carousel.d.ts +4 -0
  23. package/dist/Carousel/Carousel.js +168 -0
  24. package/dist/Carousel/CarouselContext.d.ts +4 -0
  25. package/dist/{VirtualList/Item.js → Carousel/CarouselContext.js} +29 -14
  26. package/dist/Carousel/CarouselItem.d.ts +4 -0
  27. package/dist/Carousel/CarouselItem.js +75 -0
  28. package/dist/Carousel/hooks/useCarousel.d.ts +37 -0
  29. package/dist/Carousel/hooks/useCarousel.js +348 -0
  30. package/dist/Carousel/hooks/useCarouselItem.d.ts +8 -0
  31. package/dist/Carousel/hooks/useCarouselItem.js +161 -0
  32. package/dist/Carousel/index.d.ts +3 -0
  33. package/dist/Carousel/index.js +42 -0
  34. package/dist/Carousel/typings.d.ts +83 -0
  35. package/dist/{VirtualList/utils/findDOMNode.js → Carousel/typings.js} +3 -16
  36. package/dist/Cascader/Cascader.js +148 -182
  37. package/dist/Cascader/CascaderContext.d.ts +4 -10
  38. package/dist/Cascader/CascaderContext.js +2 -6
  39. package/dist/Cascader/CascaderDropdown.d.ts +1 -0
  40. package/dist/Cascader/CascaderDropdown.js +1 -1
  41. package/dist/Cascader/CascaderMenu.js +4 -77
  42. package/dist/Cascader/Utils.d.ts +0 -2
  43. package/dist/Cascader/Utils.js +0 -44
  44. package/dist/Cascader/index.d.ts +1 -1
  45. package/dist/Cascader/typings.d.ts +76 -12
  46. package/dist/Cascader/useCascader.d.ts +61 -3
  47. package/dist/Cascader/useCascader.js +14 -41
  48. package/dist/Checkbox/Checkbox.js +2 -6
  49. package/dist/Checkbox/CheckboxButton.js +2 -6
  50. package/dist/Checkbox/typings.d.ts +11 -0
  51. package/dist/CheckboxGroup/CheckboxGroup.d.ts +4 -0
  52. package/dist/CheckboxGroup/CheckboxGroupContext.d.ts +1 -0
  53. package/dist/Col/Col.js +1 -8
  54. package/dist/Col/typings.d.ts +10 -0
  55. package/dist/Collapse/CollapseContext.d.ts +3 -0
  56. package/dist/Collapse/CollapseItem.js +10 -8
  57. package/dist/Collapse/CollapseTransition.d.ts +7 -6
  58. package/dist/Collapse/CollapseTransition.js +49 -31
  59. package/dist/Collapse/typings.d.ts +7 -0
  60. package/dist/ColorPicker/AlphaSlider.d.ts +7 -0
  61. package/dist/ColorPicker/AlphaSlider.js +0 -1
  62. package/dist/ColorPicker/ColorPicker.js +0 -1
  63. package/dist/ColorPicker/HueSlider.d.ts +7 -0
  64. package/dist/ColorPicker/HueSlider.js +0 -1
  65. package/dist/ColorPicker/Predefine.d.ts +7 -0
  66. package/dist/ColorPicker/Predefine.js +0 -1
  67. package/dist/ColorPicker/SvPanel.d.ts +7 -0
  68. package/dist/ColorPicker/SvPanel.js +0 -1
  69. package/dist/ColorPicker/typings.d.ts +9 -0
  70. package/dist/ConfigProvider/ConfigProvider.d.ts +5 -0
  71. package/dist/DatePicker/DatePicker.js +25 -14
  72. package/dist/DatePicker/DateRangePicker.js +11 -10
  73. package/dist/DatePicker/typings.d.ts +69 -0
  74. package/dist/DateTimePicker/DateTimePicker.d.ts +1 -1
  75. package/dist/DateTimePicker/DateTimePicker.js +13 -11
  76. package/dist/DateTimePicker/typings.d.ts +1 -0
  77. package/dist/Descriptions/Descriptions.js +1 -5
  78. package/dist/Descriptions/DescriptionsContext.d.ts +2 -0
  79. package/dist/Descriptions/typings.d.ts +13 -0
  80. package/dist/Dialog/Dialog.d.ts +0 -1
  81. package/dist/Dialog/Dialog.js +5 -8
  82. package/dist/Dialog/DialogBody.js +0 -3
  83. package/dist/Dialog/DialogContext.d.ts +8 -0
  84. package/dist/Dialog/DialogHeader.js +1 -4
  85. package/dist/Dialog/typings.d.ts +38 -2
  86. package/dist/Divider/Divider.d.ts +4 -0
  87. package/dist/Divider/Divider.js +1 -6
  88. package/dist/Drawer/Drawer.js +28 -14
  89. package/dist/Drawer/DrawerBody.js +1 -4
  90. package/dist/Drawer/DrawerContext.d.ts +10 -0
  91. package/dist/Drawer/DrawerHeader.js +1 -4
  92. package/dist/Drawer/typings.d.ts +16 -0
  93. package/dist/Dropdown/Dropdown.js +12 -8
  94. package/dist/Dropdown/DropdownContext.d.ts +2 -0
  95. package/dist/Dropdown/typings.d.ts +16 -1
  96. package/dist/Empty/Empty.js +1 -4
  97. package/dist/Empty/ImgEmpty.js +1 -1
  98. package/dist/Form/Form.js +10 -6
  99. package/dist/Form/FormItem.d.ts +12 -0
  100. package/dist/Form/FormItem.js +3 -1
  101. package/dist/Form/typings.d.ts +55 -0
  102. package/dist/Form/useForm.d.ts +22 -0
  103. package/dist/Form/utils/NameMap.d.ts +3 -0
  104. package/dist/Form/utils/classUtil.js +2 -2
  105. package/dist/Form/utils/validateUtil.d.ts +4 -0
  106. package/dist/Form/utils/valueUtil.d.ts +17 -0
  107. package/dist/Icon/Icon.js +1 -4
  108. package/dist/Icon/typings.d.ts +7 -0
  109. package/dist/Input/Input.js +18 -10
  110. package/dist/Input/InputRange.js +14 -11
  111. package/dist/Input/TextArea.js +8 -4
  112. package/dist/Input/typings.d.ts +61 -0
  113. package/dist/InputNumber/InputNumber.js +10 -7
  114. package/dist/InputNumber/typings.d.ts +21 -0
  115. package/dist/Link/Link.js +1 -4
  116. package/dist/Link/typings.d.ts +6 -1
  117. package/dist/Loading/Loading.js +17 -9
  118. package/dist/Loading/typings.d.ts +5 -0
  119. package/dist/Message/Main.d.ts +7 -0
  120. package/dist/Message/Message.js +11 -8
  121. package/dist/Message/index.d.ts +8 -0
  122. package/dist/Message/typings.d.ts +11 -0
  123. package/dist/MessageBox/Main.js +3 -1
  124. package/dist/MessageBox/MessageBox.js +1 -1
  125. package/dist/MessageBox/index.d.ts +17 -3
  126. package/dist/MessageBox/index.js +1 -1
  127. package/dist/MessageBox/typings.d.ts +50 -0
  128. package/dist/Notification/Main.d.ts +7 -0
  129. package/dist/Notification/Notification.js +17 -14
  130. package/dist/Notification/index.d.ts +15 -0
  131. package/dist/Notification/typings.d.ts +13 -0
  132. package/dist/Pagination/Pagination.js +15 -11
  133. package/dist/Pagination/typings.d.ts +28 -0
  134. package/dist/Popconfirm/Popconfirm.js +14 -10
  135. package/dist/Popconfirm/typings.d.ts +12 -1
  136. package/dist/Popover/Popover.js +13 -9
  137. package/dist/Popover/typings.d.ts +13 -1
  138. package/dist/Popper/Popper.js +22 -18
  139. package/dist/Popper/typings.d.ts +7 -1
  140. package/dist/Progress/Progress.js +13 -9
  141. package/dist/Progress/typings.d.ts +12 -0
  142. package/dist/Radio/typings.d.ts +7 -0
  143. package/dist/RadioGroup/typings.d.ts +1 -0
  144. package/dist/Row/Row.js +8 -5
  145. package/dist/Row/RowContext.d.ts +1 -0
  146. package/dist/Row/typings.d.ts +4 -0
  147. package/dist/Scrollbar/Scrollbar.js +13 -9
  148. package/dist/Scrollbar/Thumb.js +1 -1
  149. package/dist/Scrollbar/typings.d.ts +20 -0
  150. package/dist/Select/SelectCore.js +17 -14
  151. package/dist/Select/typings.d.ts +33 -0
  152. package/dist/Skeleton/PlaceholderGraph.d.ts +4 -0
  153. package/dist/Skeleton/PlaceholderGrid.d.ts +4 -0
  154. package/dist/Skeleton/PlaceholderGrid.js +0 -4
  155. package/dist/Skeleton/PlaceholderParagraph.d.ts +4 -0
  156. package/dist/Skeleton/PlaceholderParagraph.js +0 -4
  157. package/dist/Switch/Switch.js +13 -10
  158. package/dist/Switch/typings.d.ts +15 -0
  159. package/dist/Table/Colgroup.d.ts +1 -0
  160. package/dist/Table/Table.js +13 -9
  161. package/dist/Table/TableBody.js +10 -41
  162. package/dist/Table/TableCell.js +0 -5
  163. package/dist/Table/TableColumn.js +0 -4
  164. package/dist/Table/TableContext.d.ts +8 -0
  165. package/dist/Table/hooks/useSelection.d.ts +10 -0
  166. package/dist/Table/hooks/useTable.d.ts +7 -0
  167. package/dist/Table/treeUtil.d.ts +39 -0
  168. package/dist/Table/typings.d.ts +137 -1
  169. package/dist/Table/util.d.ts +10 -0
  170. package/dist/Table/util.js +2 -2
  171. package/dist/Tabs/Tabs.js +2 -5
  172. package/dist/Tabs/typings.d.ts +38 -0
  173. package/dist/Tag/Tag.d.ts +1 -1
  174. package/dist/Tag/Tag.js +7 -8
  175. package/dist/Tag/typings.d.ts +10 -0
  176. package/dist/TimeLine/TimeLineItem.js +7 -4
  177. package/dist/TimeLine/typings.d.ts +9 -0
  178. package/dist/TimePicker/TimePicker.js +16 -12
  179. package/dist/TimePicker/TimePickerRange.js +15 -12
  180. package/dist/TimePicker/TimeSpinnerPanel.js +3 -5
  181. package/dist/TimePicker/typings.d.ts +13 -0
  182. package/dist/TimePicker/useTimePicker.d.ts +7 -0
  183. package/dist/Tooltip/Tooltip.js +8 -15
  184. package/dist/Tooltip/TooltipContext.d.ts +1 -0
  185. package/dist/Tooltip/typings.d.ts +14 -1
  186. package/dist/Transfer/List.js +12 -8
  187. package/dist/Transfer/ListItem.d.ts +1 -0
  188. package/dist/Transfer/Transfer.js +11 -7
  189. package/dist/Transfer/typings/index.d.ts +27 -0
  190. package/dist/Transfer/typings/list.d.ts +25 -0
  191. package/dist/Transfer/typings/listBody.d.ts +1 -0
  192. package/dist/Transition/Transition.d.ts +16 -3
  193. package/dist/Transition/Transition.js +6 -4
  194. package/dist/Transition/TransitionGroup.d.ts +59 -0
  195. package/dist/Transition/childMapping.d.ts +23 -0
  196. package/dist/Tree/DirectoryTree.d.ts +6 -13
  197. package/dist/Tree/DirectoryTree.js +32 -81
  198. package/dist/Tree/DropIndicator.d.ts +4 -2
  199. package/dist/Tree/DropIndicator.js +7 -2
  200. package/dist/Tree/Indent.d.ts +2 -2
  201. package/dist/Tree/Indent.js +4 -4
  202. package/dist/Tree/MotionTreeNode.d.ts +4 -5
  203. package/dist/Tree/MotionTreeNode.js +69 -52
  204. package/dist/Tree/NodeList.d.ts +18 -11
  205. package/dist/Tree/NodeList.js +38 -29
  206. package/dist/Tree/RCTree.d.ts +92 -75
  207. package/dist/Tree/RCTree.js +199 -188
  208. package/dist/Tree/Tree.d.ts +18 -3
  209. package/dist/Tree/Tree.js +27 -27
  210. package/dist/Tree/TreeNode.d.ts +5 -83
  211. package/dist/Tree/TreeNode.js +320 -425
  212. package/dist/Tree/contextTypes.d.ts +40 -30
  213. package/dist/Tree/contextTypes.js +17 -4
  214. package/dist/Tree/index.d.ts +2 -2
  215. package/dist/Tree/typings.d.ts +63 -19
  216. package/dist/Tree/typings.js +1 -13
  217. package/dist/Tree/typings.tsx--bak +245 -0
  218. package/dist/Tree/useUnmount.d.ts +5 -0
  219. package/dist/{VirtualList/hooks/useChildren.js → Tree/useUnmount.js} +24 -16
  220. package/dist/Tree/util.d.ts +31 -18
  221. package/dist/Tree/util.js +21 -52
  222. package/dist/Tree/utils/conductUtil.d.ts +8 -2
  223. package/dist/Tree/utils/conductUtil.js +14 -3
  224. package/dist/Tree/utils/dictUtil.d.ts +8 -3
  225. package/dist/Tree/utils/dictUtil.js +49 -32
  226. package/dist/Tree/utils/diffUtil.d.ts +4 -3
  227. package/dist/Tree/utils/keyUtil.d.ts +2 -0
  228. package/dist/{VirtualList/utils/isFirefox.js → Tree/utils/keyUtil.js} +8 -7
  229. package/dist/Tree/utils/motion.js +6 -5
  230. package/dist/Tree/utils/pickAttrs.d.ts +5 -0
  231. package/dist/Tree/utils/treeUtil.d.ts +40 -18
  232. package/dist/Tree/utils/treeUtil.js +35 -14
  233. package/dist/TreeSelect/TreeSelect.js +14 -13
  234. package/dist/TreeSelect/Utils.d.ts +2 -1
  235. package/dist/TreeSelect/typings.d.ts +19 -0
  236. package/dist/Upload/Upload.js +9 -8
  237. package/dist/Upload/UploadList.js +2 -1
  238. package/dist/Upload/typings.d.ts +34 -0
  239. package/dist/Upload/use-handlers.d.ts +1 -0
  240. package/dist/Upload/use-handlers.js +1 -1
  241. package/dist/Util/Math.d.ts +34 -0
  242. package/dist/Util/base.d.ts +22 -0
  243. package/dist/Util/base.js +17 -0
  244. package/dist/Util/shallowEqual.d.ts +11 -0
  245. package/dist/Util/treeUtils.d.ts +8 -0
  246. package/dist/fonts/fa-brands-400.ttf +0 -0
  247. package/dist/fonts/fa-brands-400.woff2 +0 -0
  248. package/dist/fonts/fa-duotone-900.ttf +0 -0
  249. package/dist/fonts/fa-duotone-900.woff2 +0 -0
  250. package/dist/fonts/fa-light-300.ttf +0 -0
  251. package/dist/fonts/fa-light-300.woff2 +0 -0
  252. package/dist/fonts/fa-regular-400.ttf +0 -0
  253. package/dist/fonts/fa-regular-400.woff2 +0 -0
  254. package/dist/fonts/fa-solid-900.ttf +0 -0
  255. package/dist/fonts/fa-solid-900.woff2 +0 -0
  256. package/dist/fonts/fa-thin-100.ttf +0 -0
  257. package/dist/fonts/fa-thin-100.woff2 +0 -0
  258. package/dist/fonts/fa-v4compatibility.ttf +0 -0
  259. package/dist/fonts/fa-v4compatibility.woff2 +0 -0
  260. package/dist/hooks/animationPropsUtils.d.ts +12 -0
  261. package/dist/hooks/htmlPropsUtils.d.ts +8 -0
  262. package/dist/hooks/popperPropsUtils.d.ts +12 -0
  263. package/dist/hooks/prefix.d.ts +1 -1
  264. package/dist/hooks/prefix.js +4 -4
  265. package/dist/hooks/treePropsUtils.d.ts +12 -0
  266. package/dist/hooks/useChildrenInstance.d.ts +11 -0
  267. package/dist/hooks/useClassNames.d.ts +79 -0
  268. package/dist/hooks/useClassNames.js +12 -2
  269. package/dist/hooks/useControlled.d.ts +8 -0
  270. package/dist/hooks/useForceUpdate.d.ts +1 -0
  271. package/dist/index.css +1029 -1290
  272. package/dist/index.d.ts +8 -5
  273. package/dist/index.js +8 -5
  274. package/dist/theme-chalk/avatar/index.scss +50 -0
  275. package/dist/theme-chalk/build.scss +2 -0
  276. package/dist/theme-chalk/calendar/month-table.scss +1 -1
  277. package/dist/theme-chalk/carousel/index.scss +237 -0
  278. package/dist/theme-chalk/checkbox/index.scss +2 -2
  279. package/dist/theme-chalk/common/_var.scss +1 -0
  280. package/dist/theme-chalk/dev.scss +2 -0
  281. package/dist/theme-chalk/doc.scss +2 -0
  282. package/dist/theme-chalk/fonts/fa-brands-400.ttf +0 -0
  283. package/dist/theme-chalk/fonts/fa-brands-400.woff2 +0 -0
  284. package/dist/theme-chalk/fonts/fa-duotone-900.ttf +0 -0
  285. package/dist/theme-chalk/fonts/fa-duotone-900.woff2 +0 -0
  286. package/dist/theme-chalk/fonts/fa-light-300.ttf +0 -0
  287. package/dist/theme-chalk/fonts/fa-light-300.woff2 +0 -0
  288. package/dist/theme-chalk/fonts/fa-regular-400.ttf +0 -0
  289. package/dist/theme-chalk/fonts/fa-regular-400.woff2 +0 -0
  290. package/dist/theme-chalk/fonts/fa-solid-900.ttf +0 -0
  291. package/dist/theme-chalk/fonts/fa-solid-900.woff2 +0 -0
  292. package/dist/theme-chalk/fonts/fa-thin-100.ttf +0 -0
  293. package/dist/theme-chalk/fonts/fa-thin-100.woff2 +0 -0
  294. package/dist/theme-chalk/fonts/fa-v4compatibility.ttf +0 -0
  295. package/dist/theme-chalk/fonts/fa-v4compatibility.woff2 +0 -0
  296. package/dist/theme-chalk/icon/fonts.scss +9 -0
  297. package/dist/theme-chalk/icon/index.scss +0 -9
  298. package/dist/theme-chalk/icon/scss/_shims.scss +318 -318
  299. package/dist/theme-chalk/icon/scss/_variables.scss +1 -3
  300. package/dist/theme-chalk/icon/scss/brands.scss +0 -5
  301. package/dist/theme-chalk/icon/scss/duotone.scss +0 -5
  302. package/dist/theme-chalk/icon/scss/fontawesome.scss +0 -8
  303. package/dist/theme-chalk/icon/scss/light.scss +2 -7
  304. package/dist/theme-chalk/icon/scss/regular.scss +2 -7
  305. package/dist/theme-chalk/icon/scss/solid.scss +2 -7
  306. package/dist/theme-chalk/icon/scss/thin.scss +2 -7
  307. package/dist/theme-chalk/icon/scss/v4-shims.scss +0 -8
  308. package/dist/theme-chalk/index.scss +3 -0
  309. package/dist/theme-chalk/input/input.scss +5 -3
  310. package/dist/theme-chalk/link/index.scss +0 -85
  311. package/dist/theme-chalk/loading/index.scss +5 -7
  312. package/dist/theme-chalk/message/index.scss +5 -5
  313. package/dist/theme-chalk/notification/index.scss +5 -5
  314. package/dist/theme-chalk/pagination/index.scss +1 -1
  315. package/dist/theme-chalk/tabs/index.scss +1 -1
  316. package/dist/types/common.d.ts +24 -0
  317. package/dist/types/type.d.ts +5 -0
  318. package/package.json +4 -24
  319. package/theme-chalk/avatar/index.scss +50 -0
  320. package/theme-chalk/badge/index.scss +63 -0
  321. package/theme-chalk/breadcrumb/index.scss +65 -0
  322. package/theme-chalk/build.scss +2 -0
  323. package/{dist/theme-chalk/bak/mixins/_button.scss → theme-chalk/button/_mixins.scss} +151 -58
  324. package/theme-chalk/button/button-group.scss +83 -0
  325. package/theme-chalk/button/button.scss +382 -0
  326. package/theme-chalk/button/index.scss +2 -0
  327. package/theme-chalk/calendar/date-picker.scss +112 -0
  328. package/theme-chalk/calendar/date-range-picker.scss +139 -0
  329. package/theme-chalk/calendar/date-table.scss +156 -0
  330. package/theme-chalk/calendar/index.scss +6 -0
  331. package/theme-chalk/calendar/month-table.scss +92 -0
  332. package/theme-chalk/calendar/picker-panel.scss +136 -0
  333. package/theme-chalk/calendar/year-table.scss +107 -0
  334. package/theme-chalk/card/index.scss +44 -0
  335. package/theme-chalk/carousel/index.scss +237 -0
  336. package/theme-chalk/cascader/cascader-panel.scss +184 -0
  337. package/theme-chalk/cascader/cascader.scss +239 -0
  338. package/theme-chalk/cascader/index.scss +2 -0
  339. package/theme-chalk/checkbox/index.scss +255 -0
  340. package/theme-chalk/checkbox-button/index.scss +117 -0
  341. package/theme-chalk/checkbox-group/index.scss +33 -0
  342. package/{dist/theme-chalk/bak/mixins/_col.scss → theme-chalk/col/_mixins.scss} +27 -3
  343. package/theme-chalk/col/index.scss +50 -0
  344. package/theme-chalk/collapse/index.scss +84 -0
  345. package/theme-chalk/color-picker/index.scss +340 -0
  346. package/{dist/theme-chalk/bak/mixins/config.scss → theme-chalk/common/_var.scss} +1 -0
  347. package/theme-chalk/common/index.scss +222 -0
  348. package/theme-chalk/common/index.ts +1 -0
  349. package/theme-chalk/date-picker/index.scss +253 -0
  350. package/theme-chalk/date-time-picker/index.scss +3 -0
  351. package/theme-chalk/date-time-picker/time-picker.scss +83 -0
  352. package/theme-chalk/date-time-picker/time-range-picker.scss +32 -0
  353. package/theme-chalk/descriptions/descriptions-item.scss +66 -0
  354. package/theme-chalk/descriptions/descriptions.scss +160 -0
  355. package/theme-chalk/descriptions/index.scss +2 -0
  356. package/theme-chalk/dev.scss +2 -0
  357. package/theme-chalk/dialog/index.scss +190 -0
  358. package/theme-chalk/divider/index.scss +51 -0
  359. package/theme-chalk/doc.scss +2 -0
  360. package/theme-chalk/drawer/index.scss +250 -0
  361. package/theme-chalk/dropdown/index.scss +147 -0
  362. package/theme-chalk/empty/index.scss +69 -0
  363. package/theme-chalk/fonts/fa-brands-400.ttf +0 -0
  364. package/theme-chalk/fonts/fa-brands-400.woff2 +0 -0
  365. package/theme-chalk/fonts/fa-duotone-900.ttf +0 -0
  366. package/theme-chalk/fonts/fa-duotone-900.woff2 +0 -0
  367. package/theme-chalk/fonts/fa-light-300.ttf +0 -0
  368. package/theme-chalk/fonts/fa-light-300.woff2 +0 -0
  369. package/theme-chalk/fonts/fa-regular-400.ttf +0 -0
  370. package/theme-chalk/fonts/fa-regular-400.woff2 +0 -0
  371. package/theme-chalk/fonts/fa-solid-900.ttf +0 -0
  372. package/theme-chalk/fonts/fa-solid-900.woff2 +0 -0
  373. package/theme-chalk/fonts/fa-thin-100.ttf +0 -0
  374. package/theme-chalk/fonts/fa-thin-100.woff2 +0 -0
  375. package/theme-chalk/fonts/fa-v4compatibility.ttf +0 -0
  376. package/theme-chalk/fonts/fa-v4compatibility.woff2 +0 -0
  377. package/theme-chalk/form/index.scss +359 -0
  378. package/theme-chalk/icon/fonts.scss +9 -0
  379. package/theme-chalk/icon/index.scss +44 -0
  380. package/theme-chalk/icon/scss/_animated.scss +205 -0
  381. package/theme-chalk/icon/scss/_bordered-pulled.scss +20 -0
  382. package/theme-chalk/icon/scss/_core.scss +33 -0
  383. package/theme-chalk/icon/scss/_duotone-icons.scss +12 -0
  384. package/theme-chalk/icon/scss/_fixed-width.scss +7 -0
  385. package/theme-chalk/icon/scss/_functions.scss +57 -0
  386. package/theme-chalk/icon/scss/_icons.scss +11 -0
  387. package/theme-chalk/icon/scss/_list.scss +20 -0
  388. package/theme-chalk/icon/scss/_mixins.scss +102 -0
  389. package/theme-chalk/icon/scss/_rotated-flipped.scss +31 -0
  390. package/theme-chalk/icon/scss/_screen-reader.scss +14 -0
  391. package/theme-chalk/icon/scss/_shims.scss +2606 -0
  392. package/theme-chalk/icon/scss/_sizing.scss +16 -0
  393. package/theme-chalk/icon/scss/_stacked.scss +32 -0
  394. package/theme-chalk/icon/scss/_variables.scss +9189 -0
  395. package/theme-chalk/icon/scss/brands.scss +27 -0
  396. package/theme-chalk/icon/scss/duotone.scss +72 -0
  397. package/theme-chalk/icon/scss/fontawesome.scss +13 -0
  398. package/theme-chalk/icon/scss/index.scss +15 -0
  399. package/theme-chalk/icon/scss/light.scss +21 -0
  400. package/theme-chalk/icon/scss/regular.scss +21 -0
  401. package/theme-chalk/icon/scss/solid.scss +21 -0
  402. package/theme-chalk/icon/scss/thin.scss +21 -0
  403. package/theme-chalk/icon/scss/v4-shims.scss +3 -0
  404. package/theme-chalk/index.scss +67 -0
  405. package/theme-chalk/input/_mixins.scss +16 -0
  406. package/theme-chalk/input/index.scss +3 -0
  407. package/theme-chalk/input/input-range.scss +208 -0
  408. package/theme-chalk/input/input.scss +577 -0
  409. package/theme-chalk/input-number/index.scss +172 -0
  410. package/theme-chalk/link/index.scss +99 -0
  411. package/theme-chalk/loading/index.scss +94 -0
  412. package/theme-chalk/message/index.scss +169 -0
  413. package/theme-chalk/message-box/index.scss +184 -0
  414. package/theme-chalk/notification/index.scss +155 -0
  415. package/theme-chalk/pagination/index.scss +515 -0
  416. package/theme-chalk/placeholder/index.scss +135 -0
  417. package/theme-chalk/popconfirm/index.scss +35 -0
  418. package/theme-chalk/popover/index.scss +54 -0
  419. package/theme-chalk/popper/index.scss +86 -0
  420. package/theme-chalk/progress/index.scss +155 -0
  421. package/theme-chalk/radio/index.scss +2 -0
  422. package/theme-chalk/radio/radio-button.scss +128 -0
  423. package/theme-chalk/radio/radio.scss +171 -0
  424. package/theme-chalk/radio-group/index.scss +31 -0
  425. package/theme-chalk/row/index.scss +30 -0
  426. package/theme-chalk/scrollbar/index.scss +103 -0
  427. package/theme-chalk/select/index.scss +244 -0
  428. package/theme-chalk/select/option-group.scss +54 -0
  429. package/theme-chalk/select/option.scss +63 -0
  430. package/theme-chalk/select/select-dropdown.scss +57 -0
  431. package/theme-chalk/switch/index.scss +273 -0
  432. package/theme-chalk/table/index.scss +714 -0
  433. package/theme-chalk/tabs/index.scss +620 -0
  434. package/theme-chalk/tag/index.scss +360 -0
  435. package/theme-chalk/time-line/_timeline-item.scss +90 -0
  436. package/theme-chalk/time-line/_timeline.scss +50 -0
  437. package/theme-chalk/time-line/index.scss +2 -0
  438. package/theme-chalk/time-picker/index.scss +109 -0
  439. package/theme-chalk/tooltip/index.scss +13 -0
  440. package/theme-chalk/transfer/index.scss +247 -0
  441. package/theme-chalk/transition/index.scss +756 -0
  442. package/theme-chalk/tree/_directory.scss +73 -0
  443. package/theme-chalk/tree/_tree.scss +401 -0
  444. package/theme-chalk/tree/index.scss +2 -0
  445. package/theme-chalk/tree-select/index.scss +25 -0
  446. package/theme-chalk/upload/index.scss +631 -0
  447. package/dist/Tree/utils/KeyCode.d.ts +0 -110
  448. package/dist/Tree/utils/KeyCode.js +0 -550
  449. package/dist/VirtualList/Filler.d.ts +0 -11
  450. package/dist/VirtualList/Filler.js +0 -78
  451. package/dist/VirtualList/Item.d.ts +0 -7
  452. package/dist/VirtualList/ScrollBar.d.ts +0 -43
  453. package/dist/VirtualList/ScrollBar.js +0 -216
  454. package/dist/VirtualList/VirtualList.d.ts +0 -33
  455. package/dist/VirtualList/VirtualList.js +0 -280
  456. package/dist/VirtualList/hooks/useChildren.d.ts +0 -3
  457. package/dist/VirtualList/hooks/useDiffItem.d.ts +0 -2
  458. package/dist/VirtualList/hooks/useDiffItem.js +0 -39
  459. package/dist/VirtualList/hooks/useFrameWheel.d.ts +0 -6
  460. package/dist/VirtualList/hooks/useFrameWheel.js +0 -72
  461. package/dist/VirtualList/hooks/useHeights.d.ts +0 -3
  462. package/dist/VirtualList/hooks/useHeights.js +0 -83
  463. package/dist/VirtualList/hooks/useLayoutEffect.d.ts +0 -3
  464. package/dist/VirtualList/hooks/useLayoutEffect.js +0 -30
  465. package/dist/VirtualList/hooks/useMobileTouchMove.d.ts +0 -2
  466. package/dist/VirtualList/hooks/useMobileTouchMove.js +0 -92
  467. package/dist/VirtualList/hooks/useOriginScroll.d.ts +0 -2
  468. package/dist/VirtualList/hooks/useOriginScroll.js +0 -56
  469. package/dist/VirtualList/hooks/useScrollTo.d.ts +0 -5
  470. package/dist/VirtualList/hooks/useScrollTo.js +0 -111
  471. package/dist/VirtualList/index.d.ts +0 -2
  472. package/dist/VirtualList/interface.d.ts +0 -8
  473. package/dist/VirtualList/mock.d.ts +0 -6
  474. package/dist/VirtualList/mock.js +0 -29
  475. package/dist/VirtualList/utils/CacheMap.d.ts +0 -7
  476. package/dist/VirtualList/utils/CacheMap.js +0 -36
  477. package/dist/VirtualList/utils/algorithmUtil.d.ts +0 -6
  478. package/dist/VirtualList/utils/algorithmUtil.js +0 -81
  479. package/dist/VirtualList/utils/findDOMNode.d.ts +0 -2
  480. package/dist/VirtualList/utils/isFirefox.d.ts +0 -2
  481. package/dist/VirtualList/utils/raf.d.ts +0 -5
  482. package/dist/VirtualList/utils/raf.js +0 -57
  483. package/dist/theme-chalk/bak/common/popup.scss +0 -47
  484. package/dist/theme-chalk/bak/common/transition.scss +0 -118
  485. package/dist/theme-chalk/bak/common/var.scss +0 -1476
  486. package/dist/theme-chalk/bak/mixins/_var.scss +0 -55
  487. package/dist/theme-chalk/bak/mixins/function.scss +0 -85
  488. package/dist/theme-chalk/bak/mixins/mixins.scss +0 -215
  489. package/dist/theme-chalk/bak/mixins/utils.scss +0 -39
package/dist/Tree/util.js CHANGED
@@ -36,37 +36,19 @@ __export(util_exports, {
36
36
  conductExpandParent: () => conductExpandParent,
37
37
  convertDataToTree: () => convertDataToTree,
38
38
  getDragChildrenKeys: () => getDragChildrenKeys,
39
- getPosition: () => getPosition,
39
+ getPosition: () => import_treeUtil.getPosition,
40
40
  isFirstChild: () => isFirstChild,
41
41
  isLastChild: () => isLastChild,
42
- isTreeNode: () => isTreeNode,
43
- omit: () => omit,
42
+ isTreeNode: () => import_treeUtil.isTreeNode,
44
43
  parseCheckedKeys: () => parseCheckedKeys,
45
- posToArr: () => posToArr,
46
- toArray: () => toArray
44
+ posToArr: () => posToArr
47
45
  });
48
46
  module.exports = __toCommonJS(util_exports);
47
+ var import_warning = __toESM(require("rc-util/lib/warning"));
49
48
  var import_react = __toESM(require("react"));
50
- var import_Util = require("../Util");
51
49
  var import_TreeNode = __toESM(require("./TreeNode"));
52
- function toArray(children, option = {}) {
53
- let ret = [];
54
- import_react.Children.forEach(children, (child) => {
55
- if ((child === void 0 || child === null) && !option.keepEmpty) {
56
- return;
57
- }
58
- let nodeType = child == null ? void 0 : child.type;
59
- nodeType = (nodeType == null ? void 0 : nodeType.displayName) || nodeType;
60
- if (Array.isArray(child)) {
61
- ret = ret.concat(toArray(child));
62
- } else if (nodeType === "Fragment" && child.props) {
63
- ret = ret.concat(toArray(child.props.children, option));
64
- } else {
65
- ret.push(child);
66
- }
67
- });
68
- return ret;
69
- }
50
+ var import_keyUtil = __toESM(require("./utils/keyUtil"));
51
+ var import_treeUtil = require("./utils/treeUtil");
70
52
  function arrDel(list, value) {
71
53
  if (!list) {
72
54
  return [];
@@ -88,15 +70,9 @@ function arrAdd(list, value) {
88
70
  function posToArr(pos) {
89
71
  return pos.split("-");
90
72
  }
91
- function getPosition(level, index) {
92
- return `${level}-${index}`;
93
- }
94
- function isTreeNode(node) {
95
- return node && node.type && node.type.isTreeNode;
96
- }
97
73
  function getDragChildrenKeys(dragNodeKey, keyEntities) {
98
74
  const dragChildrenKeys = [];
99
- const entity = keyEntities[dragNodeKey];
75
+ const entity = (0, import_keyUtil.default)(keyEntities, dragNodeKey);
100
76
  function dig(list = []) {
101
77
  list.forEach(({ key, children }) => {
102
78
  dragChildrenKeys.push(key);
@@ -117,25 +93,29 @@ function isFirstChild(treeNodeEntity) {
117
93
  const posArr = posToArr(treeNodeEntity.pos);
118
94
  return Number(posArr[posArr.length - 1]) === 0;
119
95
  }
120
- function calcDropPosition(event, dragNode, targetNode, indent, startMousePosition, allowDrop, flattenedNodes, keyEntities, expandKeys, direction) {
96
+ function calcDropPosition(event, dragNodeProps, targetNodeProps, indent, startMousePosition, allowDrop, flattenedNodes, keyEntities, expandKeys, direction) {
121
97
  var _a;
122
98
  const { clientX, clientY } = event;
123
99
  const { top, height } = event.target.getBoundingClientRect();
124
100
  const horizontalMouseOffset = (direction === "rtl" ? -1 : 1) * (((startMousePosition == null ? void 0 : startMousePosition.x) || 0) - clientX);
125
101
  const rawDropLevelOffset = (horizontalMouseOffset - 12) / indent;
126
- let abstractDropNodeEntity = keyEntities[targetNode.props.eventKey];
102
+ const filteredExpandKeys = expandKeys.filter((key) => {
103
+ var _a2, _b;
104
+ return (_b = (_a2 = keyEntities[key]) == null ? void 0 : _a2.children) == null ? void 0 : _b.length;
105
+ });
106
+ let abstractDropNodeEntity = (0, import_keyUtil.default)(keyEntities, targetNodeProps.eventKey);
127
107
  if (clientY < top + height / 2) {
128
108
  const nodeIndex = flattenedNodes.findIndex((flattenedNode) => flattenedNode.key === abstractDropNodeEntity.key);
129
109
  const prevNodeIndex = nodeIndex <= 0 ? 0 : nodeIndex - 1;
130
110
  const prevNodeKey = flattenedNodes[prevNodeIndex].key;
131
- abstractDropNodeEntity = keyEntities[prevNodeKey];
111
+ abstractDropNodeEntity = (0, import_keyUtil.default)(keyEntities, prevNodeKey);
132
112
  }
133
113
  const initialAbstractDropNodeKey = abstractDropNodeEntity.key;
134
114
  const abstractDragOverEntity = abstractDropNodeEntity;
135
115
  const dragOverNodeKey = abstractDropNodeEntity.key;
136
116
  let dropPosition = 0;
137
117
  let dropLevelOffset = 0;
138
- if (!expandKeys.includes(initialAbstractDropNodeKey)) {
118
+ if (!filteredExpandKeys.includes(initialAbstractDropNodeKey)) {
139
119
  for (let i = 0; i < rawDropLevelOffset; i += 1) {
140
120
  if (isLastChild(abstractDropNodeEntity)) {
141
121
  abstractDropNodeEntity = abstractDropNodeEntity.parent;
@@ -145,16 +125,16 @@ function calcDropPosition(event, dragNode, targetNode, indent, startMousePositio
145
125
  }
146
126
  }
147
127
  }
148
- const abstractDragDataNode = dragNode.props.data;
128
+ const abstractDragDataNode = dragNodeProps.data;
149
129
  const abstractDropDataNode = abstractDropNodeEntity.node;
150
130
  let dropAllowed = true;
151
131
  if (isFirstChild(abstractDropNodeEntity) && abstractDropNodeEntity.level === 0 && clientY < top + height / 2 && allowDrop({
152
132
  dragNode: abstractDragDataNode,
153
133
  dropNode: abstractDropDataNode,
154
134
  dropPosition: -1
155
- }) && abstractDropNodeEntity.key === targetNode.props.eventKey) {
135
+ }) && abstractDropNodeEntity.key === targetNodeProps.eventKey) {
156
136
  dropPosition = -1;
157
- } else if ((abstractDragOverEntity.children || []).length && expandKeys.includes(dragOverNodeKey)) {
137
+ } else if ((abstractDragOverEntity.children || []).length && filteredExpandKeys.includes(dragOverNodeKey)) {
158
138
  if (allowDrop({
159
139
  dragNode: abstractDragDataNode,
160
140
  dropNode: abstractDropDataNode,
@@ -254,7 +234,7 @@ function parseCheckedKeys(keys) {
254
234
  halfCheckedKeys: keys.halfChecked || void 0
255
235
  };
256
236
  } else {
257
- (0, import_Util.warning)(false, "`checkedKeys` is not an array or an object");
237
+ (0, import_warning.default)(false, "`checkedKeys` is not an array or an object");
258
238
  return null;
259
239
  }
260
240
  return keyProps;
@@ -265,7 +245,7 @@ function conductExpandParent(keyList, keyEntities) {
265
245
  if (expandedKeys.has(key)) {
266
246
  return;
267
247
  }
268
- const entity = keyEntities[key];
248
+ const entity = (0, import_keyUtil.default)(keyEntities, key);
269
249
  if (!entity) {
270
250
  return;
271
251
  }
@@ -283,15 +263,6 @@ function conductExpandParent(keyList, keyEntities) {
283
263
  });
284
264
  return [...expandedKeys];
285
265
  }
286
- function omit(obj, fields) {
287
- const clone = { ...obj };
288
- if (Array.isArray(fields)) {
289
- fields.forEach((key) => {
290
- delete clone[key];
291
- });
292
- }
293
- return clone;
294
- }
295
266
  // Annotate the CommonJS export names for ESM import in node:
296
267
  0 && (module.exports = {
297
268
  arrAdd,
@@ -305,8 +276,6 @@ function omit(obj, fields) {
305
276
  isFirstChild,
306
277
  isLastChild,
307
278
  isTreeNode,
308
- omit,
309
279
  parseCheckedKeys,
310
- posToArr,
311
- toArray
280
+ posToArr
312
281
  });
@@ -1,11 +1,17 @@
1
- import { BasicDataNode, DataEntity, DataNode, GetCheckDisabled, Key } from '../typings';
1
+ import type { BasicDataNode, DataNode, GetCheckDisabled, Key, KeyEntities } from '../typings';
2
2
  interface ConductReturnType {
3
3
  checkedKeys: Key[];
4
4
  halfCheckedKeys: Key[];
5
5
  }
6
6
  export declare function isCheckDisabled<TreeDataType>(node: TreeDataType): boolean;
7
+ /**
8
+ * Conduct with keys.
9
+ * @param keyList current key list
10
+ * @param keyEntities key - dataEntity map
11
+ * @param mode `fill` to fill missing key, `clean` to remove useless key
12
+ */
7
13
  export declare function conductCheck<TreeDataType extends BasicDataNode = DataNode>(keyList: Key[], checked: true | {
8
14
  checked: false;
9
15
  halfCheckedKeys: Key[];
10
- }, keyEntities: Record<Key, DataEntity<TreeDataType>>, getCheckDisabled?: GetCheckDisabled<TreeDataType>): ConductReturnType;
16
+ }, keyEntities: KeyEntities<TreeDataType>, getCheckDisabled?: GetCheckDisabled<TreeDataType>): ConductReturnType;
11
17
  export {};
@@ -1,6 +1,8 @@
1
+ var __create = Object.create;
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
4
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
7
  var __export = (target, all) => {
6
8
  for (var name in all)
@@ -14,6 +16,14 @@ var __copyProps = (to, from, except, desc) => {
14
16
  }
15
17
  return to;
16
18
  };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
17
27
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
28
 
19
29
  // src/Tree/utils/conductUtil.ts
@@ -23,7 +33,8 @@ __export(conductUtil_exports, {
23
33
  isCheckDisabled: () => isCheckDisabled
24
34
  });
25
35
  module.exports = __toCommonJS(conductUtil_exports);
26
- var import_Util = require("../../Util");
36
+ var import_warning = __toESM(require("rc-util/lib/warning"));
37
+ var import_keyUtil = __toESM(require("./keyUtil"));
27
38
  function removeFromCheckedKeys(halfCheckedKeys, checkedKeys) {
28
39
  const filteredKeys = /* @__PURE__ */ new Set();
29
40
  halfCheckedKeys.forEach((key) => {
@@ -150,7 +161,7 @@ function conductCheck(keyList, checked, keyEntities, getCheckDisabled) {
150
161
  }
151
162
  const keys = new Set(
152
163
  keyList.filter((key) => {
153
- const hasEntity = !!keyEntities[key];
164
+ const hasEntity = !!(0, import_keyUtil.default)(keyEntities, key);
154
165
  if (!hasEntity) {
155
166
  warningMissKeys.push(key);
156
167
  }
@@ -170,7 +181,7 @@ function conductCheck(keyList, checked, keyEntities, getCheckDisabled) {
170
181
  levelSet.add(entity);
171
182
  maxLevel = Math.max(maxLevel, level);
172
183
  });
173
- (0, import_Util.warning)(
184
+ (0, import_warning.default)(
174
185
  !warningMissKeys.length,
175
186
  `Tree missing follow keys: ${warningMissKeys.slice(0, 100).map((key) => `'${key}'`).join(", ")}`
176
187
  );
@@ -1,8 +1,13 @@
1
+ import { TreeProps } from '../RCTree';
1
2
  import { DataNode, Key } from '../typings';
2
- export declare function calcRangeKeys<T = DataNode>({ treeData, expandedKeys, startKey, endKey }: {
3
- treeData: T[];
3
+ type FieldNames = TreeProps['fieldNames'];
4
+ /** 计算选中范围,只考虑expanded情况以优化性能 */
5
+ export declare function calcRangeKeys({ treeData, expandedKeys, startKey, endKey, fieldNames, }: {
6
+ treeData: DataNode[];
4
7
  expandedKeys: Key[];
5
8
  startKey?: Key;
6
9
  endKey?: Key;
10
+ fieldNames?: FieldNames;
7
11
  }): Key[];
8
- export declare function convertDirectoryKeysToNodes<T = DataNode>(treeData: T[], keys: Key[]): T[];
12
+ export declare function convertDirectoryKeysToNodes(treeData: DataNode[], keys: Key[], fieldNames?: FieldNames): DataNode[];
13
+ export {};
@@ -23,18 +23,30 @@ __export(dictUtil_exports, {
23
23
  convertDirectoryKeysToNodes: () => convertDirectoryKeysToNodes
24
24
  });
25
25
  module.exports = __toCommonJS(dictUtil_exports);
26
- function traverseNodesKey(treeData, callback) {
26
+ var import_treeUtil = require("./treeUtil");
27
+ var RECORD_NONE = 0;
28
+ var RECORD_START = 1;
29
+ var RECORD_END = 2;
30
+ function traverseNodesKey(treeData, callback, fieldNames) {
31
+ const { key: fieldKey, children: fieldChildren } = fieldNames;
27
32
  function processNode(dataNode) {
28
- const { key, children } = dataNode;
33
+ const key = dataNode[fieldKey];
34
+ const children = dataNode[fieldChildren];
29
35
  if (callback(key, dataNode) !== false) {
30
- traverseNodesKey(children || [], callback);
36
+ traverseNodesKey(children || [], callback, fieldNames);
31
37
  }
32
38
  }
33
39
  treeData.forEach(processNode);
34
40
  }
35
- function calcRangeKeys({ treeData, expandedKeys, startKey, endKey }) {
41
+ function calcRangeKeys({
42
+ treeData,
43
+ expandedKeys,
44
+ startKey,
45
+ endKey,
46
+ fieldNames
47
+ }) {
36
48
  const keys = [];
37
- let record = 0 /* None */;
49
+ let record = RECORD_NONE;
38
50
  if (startKey && startKey === endKey) {
39
51
  return [startKey];
40
52
  }
@@ -44,39 +56,44 @@ function calcRangeKeys({ treeData, expandedKeys, startKey, endKey }) {
44
56
  function matchKey(key) {
45
57
  return key === startKey || key === endKey;
46
58
  }
47
- traverseNodesKey(treeData, (key) => {
48
- if (record === 2 /* End */) {
49
- return false;
50
- }
51
- if (matchKey(key)) {
52
- keys.push(key);
53
- if (record === 0 /* None */) {
54
- record = 1 /* Start */;
55
- } else if (record === 1 /* Start */) {
56
- record = 2 /* End */;
59
+ traverseNodesKey(
60
+ treeData,
61
+ (key) => {
62
+ if (record === RECORD_END) {
57
63
  return false;
58
64
  }
59
- } else if (record === 1 /* Start */) {
60
- keys.push(key);
61
- }
62
- if (expandedKeys.indexOf(key) === -1) {
63
- return false;
64
- }
65
- return true;
66
- });
65
+ if (matchKey(key)) {
66
+ keys.push(key);
67
+ if (record === RECORD_NONE) {
68
+ record = RECORD_START;
69
+ } else if (record === RECORD_START) {
70
+ record = RECORD_END;
71
+ return false;
72
+ }
73
+ } else if (record === RECORD_START) {
74
+ keys.push(key);
75
+ }
76
+ return expandedKeys.includes(key);
77
+ },
78
+ (0, import_treeUtil.fillFieldNames)(fieldNames)
79
+ );
67
80
  return keys;
68
81
  }
69
- function convertDirectoryKeysToNodes(treeData, keys) {
82
+ function convertDirectoryKeysToNodes(treeData, keys, fieldNames) {
70
83
  const restKeys = [...keys];
71
84
  const nodes = [];
72
- traverseNodesKey(treeData, (key, node) => {
73
- const index = restKeys.indexOf(key);
74
- if (index !== -1) {
75
- nodes.push(node);
76
- restKeys.splice(index, 1);
77
- }
78
- return !!restKeys.length;
79
- });
85
+ traverseNodesKey(
86
+ treeData,
87
+ (key, node) => {
88
+ const index = restKeys.indexOf(key);
89
+ if (index !== -1) {
90
+ nodes.push(node);
91
+ restKeys.splice(index, 1);
92
+ }
93
+ return !!restKeys.length;
94
+ },
95
+ (0, import_treeUtil.fillFieldNames)(fieldNames)
96
+ );
80
97
  return nodes;
81
98
  }
82
99
  // Annotate the CommonJS export names for ESM import in node:
@@ -1,6 +1,7 @@
1
- import { FlattenNode, Key } from '../typings';
1
+ /// <reference types="react" />
2
+ import type { FlattenNode, Key } from '../typings';
2
3
  export declare function findExpandedKeys(prev?: Key[], next?: Key[]): {
3
4
  add: boolean;
4
- key: Key;
5
+ key: import("react").Key;
5
6
  };
6
- export declare function getExpandRange(shorter: FlattenNode[], longer: FlattenNode[], key: Key): FlattenNode[];
7
+ export declare function getExpandRange(shorter: FlattenNode[], longer: FlattenNode[], key: Key): FlattenNode<import("../typings").DataNode>[];
@@ -0,0 +1,2 @@
1
+ import type { Key, KeyEntities } from '../typings';
2
+ export default function getEntity<T = any>(keyEntities: KeyEntities<T>, key: Key): import("../typings").DataEntity<T>;
@@ -16,11 +16,12 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // src/VirtualList/utils/isFirefox.ts
20
- var isFirefox_exports = {};
21
- __export(isFirefox_exports, {
22
- default: () => isFirefox_default
19
+ // src/Tree/utils/keyUtil.ts
20
+ var keyUtil_exports = {};
21
+ __export(keyUtil_exports, {
22
+ default: () => getEntity
23
23
  });
24
- module.exports = __toCommonJS(isFirefox_exports);
25
- var isFF = typeof navigator === "object" && /Firefox/i.test(navigator.userAgent);
26
- var isFirefox_default = isFF;
24
+ module.exports = __toCommonJS(keyUtil_exports);
25
+ function getEntity(keyEntities, key) {
26
+ return keyEntities[key];
27
+ }
@@ -29,12 +29,13 @@ __export(motion_exports, {
29
29
  });
30
30
  module.exports = __toCommonJS(motion_exports);
31
31
  var import_dom_lib = require("dom-lib");
32
+ var import_prefix = require("../../hooks/prefix");
32
33
  var beforeEnter = (el) => {
33
34
  el.style.height = "0";
34
35
  el.style.opacity = "0";
35
36
  };
36
37
  var onEnter = (el) => {
37
- (0, import_dom_lib.addClass)(el, "r-motion-collapse");
38
+ (0, import_dom_lib.addClass)(el, `${import_prefix.namespace}-motion-collapse`);
38
39
  el.dataset.oldOverflow = el.style.overflow;
39
40
  if (el.scrollHeight !== 0) {
40
41
  el.style.height = `${el.scrollHeight}px`;
@@ -45,12 +46,12 @@ var onEnter = (el) => {
45
46
  el.style.overflow = "hidden";
46
47
  };
47
48
  var afterEnter = (el) => {
48
- (0, import_dom_lib.removeClass)(el, "r-motion-collapse");
49
+ (0, import_dom_lib.removeClass)(el, `${import_prefix.namespace}-motion-collapse`);
49
50
  el.style.height = "";
50
51
  el.style.overflow = el.dataset.oldOverflow;
51
52
  };
52
53
  var beforeLeave = (el) => {
53
- (0, import_dom_lib.addClass)(el, "r-motion-collapse");
54
+ (0, import_dom_lib.addClass)(el, `${import_prefix.namespace}-motion-collapse`);
54
55
  if (!el.dataset) {
55
56
  el.dataset = {};
56
57
  }
@@ -59,13 +60,13 @@ var beforeLeave = (el) => {
59
60
  el.style.overflow = "hidden";
60
61
  };
61
62
  var afterLeave = (el) => {
62
- (0, import_dom_lib.removeClass)(el, "r-motion-collapse");
63
+ (0, import_dom_lib.removeClass)(el, `${import_prefix.namespace}-motion-collapse`);
63
64
  el.style.height = "";
64
65
  el.style.overflow = el.dataset.oldOverflow;
65
66
  el.style.display = "";
66
67
  };
67
68
  var collapseMotion = {
68
- name: "r-treenode-collapse",
69
+ name: `${import_prefix.namespace}-treenode-collapse`,
69
70
  beforeEnter,
70
71
  onEnter,
71
72
  afterEnter,
@@ -3,4 +3,9 @@ export interface PickConfig {
3
3
  data?: boolean;
4
4
  attr?: boolean;
5
5
  }
6
+ /**
7
+ * Picker props from exist props with filter
8
+ * @param props Passed props
9
+ * @param ariaOnly boolean | { aria?: boolean; data?: boolean; attr?: boolean; } filter config
10
+ */
6
11
  export default function pickAttrs(props: object, ariaOnly?: boolean | PickConfig): {};
@@ -1,41 +1,60 @@
1
- import React from 'react';
2
- import { TreeNodeProps } from '../TreeNode';
3
- import { BasicDataNode, DataEntity, DataNode, EventDataNode, FieldNames, FlattenNode, GetKey, Key } from '../typings';
4
- export declare function getKey(key: Key, pos: string): Key;
1
+ import * as React from 'react';
2
+ import type { BasicDataNode, DataEntity, DataNode, EventDataNode, FieldNames, FlattenNode, GetKey, Key, KeyEntities, NodeElement, TreeNodeProps } from '../typings';
3
+ export declare function getPosition(level: string | number, index: number): string;
4
+ export declare function isTreeNode(node: NodeElement): boolean;
5
+ export declare function getKey(key: Key, pos: string): React.Key;
5
6
  export declare function fillFieldNames(fieldNames?: FieldNames): Required<FieldNames>;
7
+ /**
8
+ * Warning if TreeNode do not provides key
9
+ */
6
10
  export declare function warningWithoutKey(treeData: DataNode[], fieldNames: FieldNames): void;
7
- export declare function convertTreeToData<T = DataNode>(rootNodes: React.ReactElement): T[];
8
- export declare function flattenTreeData(treeNodeList: DataNode[], expandedKeys: Key[] | true, fieldNames: FieldNames): FlattenNode[];
11
+ /**
12
+ * Convert `children` of Tree into `treeData` structure.
13
+ */
14
+ export declare function convertTreeToData(rootNodes: React.ReactNode): DataNode[];
15
+ /**
16
+ * Flat nest tree data into flatten list. This is used for virtual list render.
17
+ * @param treeNodeList Origin data node list
18
+ * @param expandedKeys
19
+ * need expanded keys, provides `true` means all expanded (used in `rc-tree-select`).
20
+ */
21
+ export declare function flattenTreeData<TreeDataType extends BasicDataNode = DataNode>(treeNodeList: TreeDataType[], expandedKeys: Key[] | true, fieldNames: FieldNames): FlattenNode<TreeDataType>[];
9
22
  type ExternalGetKey = GetKey<DataNode> | string;
10
23
  interface TraverseDataNodesConfig {
11
24
  childrenPropName?: string;
12
25
  externalGetKey?: ExternalGetKey;
13
26
  fieldNames?: FieldNames;
14
27
  }
15
- export declare function traverseDataNodes<T = DataNode>(dataNodes: T[], callback: (data: {
16
- node: T;
28
+ /**
29
+ * Traverse all the data by `treeData`.
30
+ * Please not use it out of the `rc-tree` since we may refactor this code.
31
+ */
32
+ export declare function traverseDataNodes(dataNodes: DataNode[], callback: (data: {
33
+ node: DataNode;
17
34
  index: number;
18
35
  pos: string;
19
36
  key: Key;
20
37
  parentPos: string | number;
21
38
  level: number;
22
- nodes: T[];
39
+ nodes: DataNode[];
23
40
  }) => void, config?: TraverseDataNodesConfig | string): void;
24
41
  interface Wrapper {
25
42
  posEntities: Record<string, DataEntity>;
26
- keyEntities: Record<Key, DataEntity>;
43
+ keyEntities: KeyEntities;
27
44
  }
28
- export declare function convertDataToEntities<T = DataNode>(dataNodes: T[], { initWrapper, processEntity, onProcessFinished, externalGetKey, childrenPropName, fieldNames, }?: {
45
+ /**
46
+ * Convert `treeData` into entity records.
47
+ */
48
+ export declare function convertDataToEntities(dataNodes: DataNode[], { initWrapper, processEntity, onProcessFinished, externalGetKey, childrenPropName, fieldNames, }?: {
29
49
  initWrapper?: (wrapper: Wrapper) => Wrapper;
30
50
  processEntity?: (entity: DataEntity, wrapper: Wrapper) => void;
31
51
  onProcessFinished?: (wrapper: Wrapper) => void;
32
52
  externalGetKey?: ExternalGetKey;
33
53
  childrenPropName?: string;
34
54
  fieldNames?: FieldNames;
35
- }, legacyExternalGetKey?: ExternalGetKey): {
36
- posEntities: {};
37
- keyEntities: {};
38
- };
55
+ },
56
+ /** @deprecated Use `config.externalGetKey` instead */
57
+ legacyExternalGetKey?: ExternalGetKey): Wrapper;
39
58
  export interface TreeNodeRequiredProps<TreeDataType extends BasicDataNode = DataNode> {
40
59
  expandedKeys: Key[];
41
60
  selectedKeys: Key[];
@@ -45,10 +64,13 @@ export interface TreeNodeRequiredProps<TreeDataType extends BasicDataNode = Data
45
64
  halfCheckedKeys: Key[];
46
65
  dragOverNodeKey: Key;
47
66
  dropPosition: number;
48
- keyEntities: Record<Key, DataEntity<TreeDataType>>;
67
+ keyEntities: KeyEntities<TreeDataType>;
49
68
  }
69
+ /**
70
+ * Get TreeNode props with Tree props.
71
+ */
50
72
  export declare function getTreeNodeProps<TreeDataType extends BasicDataNode = DataNode>(key: Key, { expandedKeys, selectedKeys, loadedKeys, loadingKeys, checkedKeys, halfCheckedKeys, dragOverNodeKey, dropPosition, keyEntities }: TreeNodeRequiredProps<TreeDataType>): {
51
- eventKey: Key;
73
+ eventKey: React.Key;
52
74
  expanded: boolean;
53
75
  selected: boolean;
54
76
  loaded: boolean;
@@ -60,5 +82,5 @@ export declare function getTreeNodeProps<TreeDataType extends BasicDataNode = Da
60
82
  dragOverGapTop: boolean;
61
83
  dragOverGapBottom: boolean;
62
84
  };
63
- export declare function convertNodePropsToEventData<TreeDataType extends BasicDataNode = DataNode>(props: TreeNodeProps<TreeDataType>): EventDataNode;
85
+ export declare function convertNodePropsToEventData<TreeDataType extends BasicDataNode = DataNode>(props: TreeNodeProps<TreeDataType>): EventDataNode<TreeDataType>;
64
86
  export {};