@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.
- package/README.md +95 -0
- package/dist/Avatar/Avatar.d.ts +4 -0
- package/dist/Avatar/Avatar.js +86 -0
- package/dist/Avatar/index.d.ts +2 -0
- package/dist/{VirtualList → Avatar}/index.js +7 -7
- package/dist/Avatar/typings.d.ts +21 -0
- package/dist/{VirtualList/interface.js → Avatar/typings.js} +3 -3
- package/dist/Badge/Badge.js +4 -5
- package/dist/Badge/typings.d.ts +10 -0
- package/dist/Breadcrumb/Breadcrumb.js +1 -4
- package/dist/Breadcrumb/typings.d.ts +4 -0
- package/dist/Button/Button.d.ts +0 -1
- package/dist/Button/Button.js +21 -9
- package/dist/Button/typings.d.ts +28 -0
- package/dist/Calendar/Calendar.js +1 -2
- package/dist/Calendar/CalendarContext.d.ts +10 -0
- package/dist/Calendar/Footer.js +1 -2
- package/dist/Calendar/Header.js +3 -8
- package/dist/Calendar/ShortCuts.d.ts +2 -0
- package/dist/Calendar/typings.d.ts +18 -0
- package/dist/Card/typings.d.ts +4 -0
- package/dist/Carousel/Carousel.d.ts +4 -0
- package/dist/Carousel/Carousel.js +168 -0
- package/dist/Carousel/CarouselContext.d.ts +4 -0
- package/dist/{VirtualList/Item.js → Carousel/CarouselContext.js} +29 -14
- package/dist/Carousel/CarouselItem.d.ts +4 -0
- package/dist/Carousel/CarouselItem.js +75 -0
- package/dist/Carousel/hooks/useCarousel.d.ts +37 -0
- package/dist/Carousel/hooks/useCarousel.js +348 -0
- package/dist/Carousel/hooks/useCarouselItem.d.ts +8 -0
- package/dist/Carousel/hooks/useCarouselItem.js +161 -0
- package/dist/Carousel/index.d.ts +3 -0
- package/dist/Carousel/index.js +42 -0
- package/dist/Carousel/typings.d.ts +83 -0
- package/dist/{VirtualList/utils/findDOMNode.js → Carousel/typings.js} +3 -16
- package/dist/Cascader/Cascader.js +148 -182
- package/dist/Cascader/CascaderContext.d.ts +4 -10
- package/dist/Cascader/CascaderContext.js +2 -6
- package/dist/Cascader/CascaderDropdown.d.ts +1 -0
- package/dist/Cascader/CascaderDropdown.js +1 -1
- package/dist/Cascader/CascaderMenu.js +4 -77
- package/dist/Cascader/Utils.d.ts +0 -2
- package/dist/Cascader/Utils.js +0 -44
- package/dist/Cascader/index.d.ts +1 -1
- package/dist/Cascader/typings.d.ts +76 -12
- package/dist/Cascader/useCascader.d.ts +61 -3
- package/dist/Cascader/useCascader.js +14 -41
- package/dist/Checkbox/Checkbox.js +2 -6
- package/dist/Checkbox/CheckboxButton.js +2 -6
- package/dist/Checkbox/typings.d.ts +11 -0
- package/dist/CheckboxGroup/CheckboxGroup.d.ts +4 -0
- package/dist/CheckboxGroup/CheckboxGroupContext.d.ts +1 -0
- package/dist/Col/Col.js +1 -8
- package/dist/Col/typings.d.ts +10 -0
- package/dist/Collapse/CollapseContext.d.ts +3 -0
- package/dist/Collapse/CollapseItem.js +10 -8
- package/dist/Collapse/CollapseTransition.d.ts +7 -6
- package/dist/Collapse/CollapseTransition.js +49 -31
- package/dist/Collapse/typings.d.ts +7 -0
- package/dist/ColorPicker/AlphaSlider.d.ts +7 -0
- package/dist/ColorPicker/AlphaSlider.js +0 -1
- package/dist/ColorPicker/ColorPicker.js +0 -1
- package/dist/ColorPicker/HueSlider.d.ts +7 -0
- package/dist/ColorPicker/HueSlider.js +0 -1
- package/dist/ColorPicker/Predefine.d.ts +7 -0
- package/dist/ColorPicker/Predefine.js +0 -1
- package/dist/ColorPicker/SvPanel.d.ts +7 -0
- package/dist/ColorPicker/SvPanel.js +0 -1
- package/dist/ColorPicker/typings.d.ts +9 -0
- package/dist/ConfigProvider/ConfigProvider.d.ts +5 -0
- package/dist/DatePicker/DatePicker.js +25 -14
- package/dist/DatePicker/DateRangePicker.js +11 -10
- package/dist/DatePicker/typings.d.ts +69 -0
- package/dist/DateTimePicker/DateTimePicker.d.ts +1 -1
- package/dist/DateTimePicker/DateTimePicker.js +13 -11
- package/dist/DateTimePicker/typings.d.ts +1 -0
- package/dist/Descriptions/Descriptions.js +1 -5
- package/dist/Descriptions/DescriptionsContext.d.ts +2 -0
- package/dist/Descriptions/typings.d.ts +13 -0
- package/dist/Dialog/Dialog.d.ts +0 -1
- package/dist/Dialog/Dialog.js +5 -8
- package/dist/Dialog/DialogBody.js +0 -3
- package/dist/Dialog/DialogContext.d.ts +8 -0
- package/dist/Dialog/DialogHeader.js +1 -4
- package/dist/Dialog/typings.d.ts +38 -2
- package/dist/Divider/Divider.d.ts +4 -0
- package/dist/Divider/Divider.js +1 -6
- package/dist/Drawer/Drawer.js +28 -14
- package/dist/Drawer/DrawerBody.js +1 -4
- package/dist/Drawer/DrawerContext.d.ts +10 -0
- package/dist/Drawer/DrawerHeader.js +1 -4
- package/dist/Drawer/typings.d.ts +16 -0
- package/dist/Dropdown/Dropdown.js +12 -8
- package/dist/Dropdown/DropdownContext.d.ts +2 -0
- package/dist/Dropdown/typings.d.ts +16 -1
- package/dist/Empty/Empty.js +1 -4
- package/dist/Empty/ImgEmpty.js +1 -1
- package/dist/Form/Form.js +10 -6
- package/dist/Form/FormItem.d.ts +12 -0
- package/dist/Form/FormItem.js +3 -1
- package/dist/Form/typings.d.ts +55 -0
- package/dist/Form/useForm.d.ts +22 -0
- package/dist/Form/utils/NameMap.d.ts +3 -0
- package/dist/Form/utils/classUtil.js +2 -2
- package/dist/Form/utils/validateUtil.d.ts +4 -0
- package/dist/Form/utils/valueUtil.d.ts +17 -0
- package/dist/Icon/Icon.js +1 -4
- package/dist/Icon/typings.d.ts +7 -0
- package/dist/Input/Input.js +18 -10
- package/dist/Input/InputRange.js +14 -11
- package/dist/Input/TextArea.js +8 -4
- package/dist/Input/typings.d.ts +61 -0
- package/dist/InputNumber/InputNumber.js +10 -7
- package/dist/InputNumber/typings.d.ts +21 -0
- package/dist/Link/Link.js +1 -4
- package/dist/Link/typings.d.ts +6 -1
- package/dist/Loading/Loading.js +17 -9
- package/dist/Loading/typings.d.ts +5 -0
- package/dist/Message/Main.d.ts +7 -0
- package/dist/Message/Message.js +11 -8
- package/dist/Message/index.d.ts +8 -0
- package/dist/Message/typings.d.ts +11 -0
- package/dist/MessageBox/Main.js +3 -1
- package/dist/MessageBox/MessageBox.js +1 -1
- package/dist/MessageBox/index.d.ts +17 -3
- package/dist/MessageBox/index.js +1 -1
- package/dist/MessageBox/typings.d.ts +50 -0
- package/dist/Notification/Main.d.ts +7 -0
- package/dist/Notification/Notification.js +17 -14
- package/dist/Notification/index.d.ts +15 -0
- package/dist/Notification/typings.d.ts +13 -0
- package/dist/Pagination/Pagination.js +15 -11
- package/dist/Pagination/typings.d.ts +28 -0
- package/dist/Popconfirm/Popconfirm.js +14 -10
- package/dist/Popconfirm/typings.d.ts +12 -1
- package/dist/Popover/Popover.js +13 -9
- package/dist/Popover/typings.d.ts +13 -1
- package/dist/Popper/Popper.js +22 -18
- package/dist/Popper/typings.d.ts +7 -1
- package/dist/Progress/Progress.js +13 -9
- package/dist/Progress/typings.d.ts +12 -0
- package/dist/Radio/typings.d.ts +7 -0
- package/dist/RadioGroup/typings.d.ts +1 -0
- package/dist/Row/Row.js +8 -5
- package/dist/Row/RowContext.d.ts +1 -0
- package/dist/Row/typings.d.ts +4 -0
- package/dist/Scrollbar/Scrollbar.js +13 -9
- package/dist/Scrollbar/Thumb.js +1 -1
- package/dist/Scrollbar/typings.d.ts +20 -0
- package/dist/Select/SelectCore.js +17 -14
- package/dist/Select/typings.d.ts +33 -0
- package/dist/Skeleton/PlaceholderGraph.d.ts +4 -0
- package/dist/Skeleton/PlaceholderGrid.d.ts +4 -0
- package/dist/Skeleton/PlaceholderGrid.js +0 -4
- package/dist/Skeleton/PlaceholderParagraph.d.ts +4 -0
- package/dist/Skeleton/PlaceholderParagraph.js +0 -4
- package/dist/Switch/Switch.js +13 -10
- package/dist/Switch/typings.d.ts +15 -0
- package/dist/Table/Colgroup.d.ts +1 -0
- package/dist/Table/Table.js +13 -9
- package/dist/Table/TableBody.js +10 -41
- package/dist/Table/TableCell.js +0 -5
- package/dist/Table/TableColumn.js +0 -4
- package/dist/Table/TableContext.d.ts +8 -0
- package/dist/Table/hooks/useSelection.d.ts +10 -0
- package/dist/Table/hooks/useTable.d.ts +7 -0
- package/dist/Table/treeUtil.d.ts +39 -0
- package/dist/Table/typings.d.ts +137 -1
- package/dist/Table/util.d.ts +10 -0
- package/dist/Table/util.js +2 -2
- package/dist/Tabs/Tabs.js +2 -5
- package/dist/Tabs/typings.d.ts +38 -0
- package/dist/Tag/Tag.d.ts +1 -1
- package/dist/Tag/Tag.js +7 -8
- package/dist/Tag/typings.d.ts +10 -0
- package/dist/TimeLine/TimeLineItem.js +7 -4
- package/dist/TimeLine/typings.d.ts +9 -0
- package/dist/TimePicker/TimePicker.js +16 -12
- package/dist/TimePicker/TimePickerRange.js +15 -12
- package/dist/TimePicker/TimeSpinnerPanel.js +3 -5
- package/dist/TimePicker/typings.d.ts +13 -0
- package/dist/TimePicker/useTimePicker.d.ts +7 -0
- package/dist/Tooltip/Tooltip.js +8 -15
- package/dist/Tooltip/TooltipContext.d.ts +1 -0
- package/dist/Tooltip/typings.d.ts +14 -1
- package/dist/Transfer/List.js +12 -8
- package/dist/Transfer/ListItem.d.ts +1 -0
- package/dist/Transfer/Transfer.js +11 -7
- package/dist/Transfer/typings/index.d.ts +27 -0
- package/dist/Transfer/typings/list.d.ts +25 -0
- package/dist/Transfer/typings/listBody.d.ts +1 -0
- package/dist/Transition/Transition.d.ts +16 -3
- package/dist/Transition/Transition.js +6 -4
- package/dist/Transition/TransitionGroup.d.ts +59 -0
- package/dist/Transition/childMapping.d.ts +23 -0
- package/dist/Tree/DirectoryTree.d.ts +6 -13
- package/dist/Tree/DirectoryTree.js +32 -81
- package/dist/Tree/DropIndicator.d.ts +4 -2
- package/dist/Tree/DropIndicator.js +7 -2
- package/dist/Tree/Indent.d.ts +2 -2
- package/dist/Tree/Indent.js +4 -4
- package/dist/Tree/MotionTreeNode.d.ts +4 -5
- package/dist/Tree/MotionTreeNode.js +69 -52
- package/dist/Tree/NodeList.d.ts +18 -11
- package/dist/Tree/NodeList.js +38 -29
- package/dist/Tree/RCTree.d.ts +92 -75
- package/dist/Tree/RCTree.js +199 -188
- package/dist/Tree/Tree.d.ts +18 -3
- package/dist/Tree/Tree.js +27 -27
- package/dist/Tree/TreeNode.d.ts +5 -83
- package/dist/Tree/TreeNode.js +320 -425
- package/dist/Tree/contextTypes.d.ts +40 -30
- package/dist/Tree/contextTypes.js +17 -4
- package/dist/Tree/index.d.ts +2 -2
- package/dist/Tree/typings.d.ts +63 -19
- package/dist/Tree/typings.js +1 -13
- package/dist/Tree/typings.tsx--bak +245 -0
- package/dist/Tree/useUnmount.d.ts +5 -0
- package/dist/{VirtualList/hooks/useChildren.js → Tree/useUnmount.js} +24 -16
- package/dist/Tree/util.d.ts +31 -18
- package/dist/Tree/util.js +21 -52
- package/dist/Tree/utils/conductUtil.d.ts +8 -2
- package/dist/Tree/utils/conductUtil.js +14 -3
- package/dist/Tree/utils/dictUtil.d.ts +8 -3
- package/dist/Tree/utils/dictUtil.js +49 -32
- package/dist/Tree/utils/diffUtil.d.ts +4 -3
- package/dist/Tree/utils/keyUtil.d.ts +2 -0
- package/dist/{VirtualList/utils/isFirefox.js → Tree/utils/keyUtil.js} +8 -7
- package/dist/Tree/utils/motion.js +6 -5
- package/dist/Tree/utils/pickAttrs.d.ts +5 -0
- package/dist/Tree/utils/treeUtil.d.ts +40 -18
- package/dist/Tree/utils/treeUtil.js +35 -14
- package/dist/TreeSelect/TreeSelect.js +14 -13
- package/dist/TreeSelect/Utils.d.ts +2 -1
- package/dist/TreeSelect/typings.d.ts +19 -0
- package/dist/Upload/Upload.js +9 -8
- package/dist/Upload/UploadList.js +2 -1
- package/dist/Upload/typings.d.ts +34 -0
- package/dist/Upload/use-handlers.d.ts +1 -0
- package/dist/Upload/use-handlers.js +1 -1
- package/dist/Util/Math.d.ts +34 -0
- package/dist/Util/base.d.ts +22 -0
- package/dist/Util/base.js +17 -0
- package/dist/Util/shallowEqual.d.ts +11 -0
- package/dist/Util/treeUtils.d.ts +8 -0
- package/dist/fonts/fa-brands-400.ttf +0 -0
- package/dist/fonts/fa-brands-400.woff2 +0 -0
- package/dist/fonts/fa-duotone-900.ttf +0 -0
- package/dist/fonts/fa-duotone-900.woff2 +0 -0
- package/dist/fonts/fa-light-300.ttf +0 -0
- package/dist/fonts/fa-light-300.woff2 +0 -0
- package/dist/fonts/fa-regular-400.ttf +0 -0
- package/dist/fonts/fa-regular-400.woff2 +0 -0
- package/dist/fonts/fa-solid-900.ttf +0 -0
- package/dist/fonts/fa-solid-900.woff2 +0 -0
- package/dist/fonts/fa-thin-100.ttf +0 -0
- package/dist/fonts/fa-thin-100.woff2 +0 -0
- package/dist/fonts/fa-v4compatibility.ttf +0 -0
- package/dist/fonts/fa-v4compatibility.woff2 +0 -0
- package/dist/hooks/animationPropsUtils.d.ts +12 -0
- package/dist/hooks/htmlPropsUtils.d.ts +8 -0
- package/dist/hooks/popperPropsUtils.d.ts +12 -0
- package/dist/hooks/prefix.d.ts +1 -1
- package/dist/hooks/prefix.js +4 -4
- package/dist/hooks/treePropsUtils.d.ts +12 -0
- package/dist/hooks/useChildrenInstance.d.ts +11 -0
- package/dist/hooks/useClassNames.d.ts +79 -0
- package/dist/hooks/useClassNames.js +12 -2
- package/dist/hooks/useControlled.d.ts +8 -0
- package/dist/hooks/useForceUpdate.d.ts +1 -0
- package/dist/index.css +1029 -1290
- package/dist/index.d.ts +8 -5
- package/dist/index.js +8 -5
- package/dist/theme-chalk/avatar/index.scss +50 -0
- package/dist/theme-chalk/build.scss +2 -0
- package/dist/theme-chalk/calendar/month-table.scss +1 -1
- package/dist/theme-chalk/carousel/index.scss +237 -0
- package/dist/theme-chalk/checkbox/index.scss +2 -2
- package/dist/theme-chalk/common/_var.scss +1 -0
- package/dist/theme-chalk/dev.scss +2 -0
- package/dist/theme-chalk/doc.scss +2 -0
- package/dist/theme-chalk/fonts/fa-brands-400.ttf +0 -0
- package/dist/theme-chalk/fonts/fa-brands-400.woff2 +0 -0
- package/dist/theme-chalk/fonts/fa-duotone-900.ttf +0 -0
- package/dist/theme-chalk/fonts/fa-duotone-900.woff2 +0 -0
- package/dist/theme-chalk/fonts/fa-light-300.ttf +0 -0
- package/dist/theme-chalk/fonts/fa-light-300.woff2 +0 -0
- package/dist/theme-chalk/fonts/fa-regular-400.ttf +0 -0
- package/dist/theme-chalk/fonts/fa-regular-400.woff2 +0 -0
- package/dist/theme-chalk/fonts/fa-solid-900.ttf +0 -0
- package/dist/theme-chalk/fonts/fa-solid-900.woff2 +0 -0
- package/dist/theme-chalk/fonts/fa-thin-100.ttf +0 -0
- package/dist/theme-chalk/fonts/fa-thin-100.woff2 +0 -0
- package/dist/theme-chalk/fonts/fa-v4compatibility.ttf +0 -0
- package/dist/theme-chalk/fonts/fa-v4compatibility.woff2 +0 -0
- package/dist/theme-chalk/icon/fonts.scss +9 -0
- package/dist/theme-chalk/icon/index.scss +0 -9
- package/dist/theme-chalk/icon/scss/_shims.scss +318 -318
- package/dist/theme-chalk/icon/scss/_variables.scss +1 -3
- package/dist/theme-chalk/icon/scss/brands.scss +0 -5
- package/dist/theme-chalk/icon/scss/duotone.scss +0 -5
- package/dist/theme-chalk/icon/scss/fontawesome.scss +0 -8
- package/dist/theme-chalk/icon/scss/light.scss +2 -7
- package/dist/theme-chalk/icon/scss/regular.scss +2 -7
- package/dist/theme-chalk/icon/scss/solid.scss +2 -7
- package/dist/theme-chalk/icon/scss/thin.scss +2 -7
- package/dist/theme-chalk/icon/scss/v4-shims.scss +0 -8
- package/dist/theme-chalk/index.scss +3 -0
- package/dist/theme-chalk/input/input.scss +5 -3
- package/dist/theme-chalk/link/index.scss +0 -85
- package/dist/theme-chalk/loading/index.scss +5 -7
- package/dist/theme-chalk/message/index.scss +5 -5
- package/dist/theme-chalk/notification/index.scss +5 -5
- package/dist/theme-chalk/pagination/index.scss +1 -1
- package/dist/theme-chalk/tabs/index.scss +1 -1
- package/dist/types/common.d.ts +24 -0
- package/dist/types/type.d.ts +5 -0
- package/package.json +4 -24
- package/theme-chalk/avatar/index.scss +50 -0
- package/theme-chalk/badge/index.scss +63 -0
- package/theme-chalk/breadcrumb/index.scss +65 -0
- package/theme-chalk/build.scss +2 -0
- package/{dist/theme-chalk/bak/mixins/_button.scss → theme-chalk/button/_mixins.scss} +151 -58
- package/theme-chalk/button/button-group.scss +83 -0
- package/theme-chalk/button/button.scss +382 -0
- package/theme-chalk/button/index.scss +2 -0
- package/theme-chalk/calendar/date-picker.scss +112 -0
- package/theme-chalk/calendar/date-range-picker.scss +139 -0
- package/theme-chalk/calendar/date-table.scss +156 -0
- package/theme-chalk/calendar/index.scss +6 -0
- package/theme-chalk/calendar/month-table.scss +92 -0
- package/theme-chalk/calendar/picker-panel.scss +136 -0
- package/theme-chalk/calendar/year-table.scss +107 -0
- package/theme-chalk/card/index.scss +44 -0
- package/theme-chalk/carousel/index.scss +237 -0
- package/theme-chalk/cascader/cascader-panel.scss +184 -0
- package/theme-chalk/cascader/cascader.scss +239 -0
- package/theme-chalk/cascader/index.scss +2 -0
- package/theme-chalk/checkbox/index.scss +255 -0
- package/theme-chalk/checkbox-button/index.scss +117 -0
- package/theme-chalk/checkbox-group/index.scss +33 -0
- package/{dist/theme-chalk/bak/mixins/_col.scss → theme-chalk/col/_mixins.scss} +27 -3
- package/theme-chalk/col/index.scss +50 -0
- package/theme-chalk/collapse/index.scss +84 -0
- package/theme-chalk/color-picker/index.scss +340 -0
- package/{dist/theme-chalk/bak/mixins/config.scss → theme-chalk/common/_var.scss} +1 -0
- package/theme-chalk/common/index.scss +222 -0
- package/theme-chalk/common/index.ts +1 -0
- package/theme-chalk/date-picker/index.scss +253 -0
- package/theme-chalk/date-time-picker/index.scss +3 -0
- package/theme-chalk/date-time-picker/time-picker.scss +83 -0
- package/theme-chalk/date-time-picker/time-range-picker.scss +32 -0
- package/theme-chalk/descriptions/descriptions-item.scss +66 -0
- package/theme-chalk/descriptions/descriptions.scss +160 -0
- package/theme-chalk/descriptions/index.scss +2 -0
- package/theme-chalk/dev.scss +2 -0
- package/theme-chalk/dialog/index.scss +190 -0
- package/theme-chalk/divider/index.scss +51 -0
- package/theme-chalk/doc.scss +2 -0
- package/theme-chalk/drawer/index.scss +250 -0
- package/theme-chalk/dropdown/index.scss +147 -0
- package/theme-chalk/empty/index.scss +69 -0
- package/theme-chalk/fonts/fa-brands-400.ttf +0 -0
- package/theme-chalk/fonts/fa-brands-400.woff2 +0 -0
- package/theme-chalk/fonts/fa-duotone-900.ttf +0 -0
- package/theme-chalk/fonts/fa-duotone-900.woff2 +0 -0
- package/theme-chalk/fonts/fa-light-300.ttf +0 -0
- package/theme-chalk/fonts/fa-light-300.woff2 +0 -0
- package/theme-chalk/fonts/fa-regular-400.ttf +0 -0
- package/theme-chalk/fonts/fa-regular-400.woff2 +0 -0
- package/theme-chalk/fonts/fa-solid-900.ttf +0 -0
- package/theme-chalk/fonts/fa-solid-900.woff2 +0 -0
- package/theme-chalk/fonts/fa-thin-100.ttf +0 -0
- package/theme-chalk/fonts/fa-thin-100.woff2 +0 -0
- package/theme-chalk/fonts/fa-v4compatibility.ttf +0 -0
- package/theme-chalk/fonts/fa-v4compatibility.woff2 +0 -0
- package/theme-chalk/form/index.scss +359 -0
- package/theme-chalk/icon/fonts.scss +9 -0
- package/theme-chalk/icon/index.scss +44 -0
- package/theme-chalk/icon/scss/_animated.scss +205 -0
- package/theme-chalk/icon/scss/_bordered-pulled.scss +20 -0
- package/theme-chalk/icon/scss/_core.scss +33 -0
- package/theme-chalk/icon/scss/_duotone-icons.scss +12 -0
- package/theme-chalk/icon/scss/_fixed-width.scss +7 -0
- package/theme-chalk/icon/scss/_functions.scss +57 -0
- package/theme-chalk/icon/scss/_icons.scss +11 -0
- package/theme-chalk/icon/scss/_list.scss +20 -0
- package/theme-chalk/icon/scss/_mixins.scss +102 -0
- package/theme-chalk/icon/scss/_rotated-flipped.scss +31 -0
- package/theme-chalk/icon/scss/_screen-reader.scss +14 -0
- package/theme-chalk/icon/scss/_shims.scss +2606 -0
- package/theme-chalk/icon/scss/_sizing.scss +16 -0
- package/theme-chalk/icon/scss/_stacked.scss +32 -0
- package/theme-chalk/icon/scss/_variables.scss +9189 -0
- package/theme-chalk/icon/scss/brands.scss +27 -0
- package/theme-chalk/icon/scss/duotone.scss +72 -0
- package/theme-chalk/icon/scss/fontawesome.scss +13 -0
- package/theme-chalk/icon/scss/index.scss +15 -0
- package/theme-chalk/icon/scss/light.scss +21 -0
- package/theme-chalk/icon/scss/regular.scss +21 -0
- package/theme-chalk/icon/scss/solid.scss +21 -0
- package/theme-chalk/icon/scss/thin.scss +21 -0
- package/theme-chalk/icon/scss/v4-shims.scss +3 -0
- package/theme-chalk/index.scss +67 -0
- package/theme-chalk/input/_mixins.scss +16 -0
- package/theme-chalk/input/index.scss +3 -0
- package/theme-chalk/input/input-range.scss +208 -0
- package/theme-chalk/input/input.scss +577 -0
- package/theme-chalk/input-number/index.scss +172 -0
- package/theme-chalk/link/index.scss +99 -0
- package/theme-chalk/loading/index.scss +94 -0
- package/theme-chalk/message/index.scss +169 -0
- package/theme-chalk/message-box/index.scss +184 -0
- package/theme-chalk/notification/index.scss +155 -0
- package/theme-chalk/pagination/index.scss +515 -0
- package/theme-chalk/placeholder/index.scss +135 -0
- package/theme-chalk/popconfirm/index.scss +35 -0
- package/theme-chalk/popover/index.scss +54 -0
- package/theme-chalk/popper/index.scss +86 -0
- package/theme-chalk/progress/index.scss +155 -0
- package/theme-chalk/radio/index.scss +2 -0
- package/theme-chalk/radio/radio-button.scss +128 -0
- package/theme-chalk/radio/radio.scss +171 -0
- package/theme-chalk/radio-group/index.scss +31 -0
- package/theme-chalk/row/index.scss +30 -0
- package/theme-chalk/scrollbar/index.scss +103 -0
- package/theme-chalk/select/index.scss +244 -0
- package/theme-chalk/select/option-group.scss +54 -0
- package/theme-chalk/select/option.scss +63 -0
- package/theme-chalk/select/select-dropdown.scss +57 -0
- package/theme-chalk/switch/index.scss +273 -0
- package/theme-chalk/table/index.scss +714 -0
- package/theme-chalk/tabs/index.scss +620 -0
- package/theme-chalk/tag/index.scss +360 -0
- package/theme-chalk/time-line/_timeline-item.scss +90 -0
- package/theme-chalk/time-line/_timeline.scss +50 -0
- package/theme-chalk/time-line/index.scss +2 -0
- package/theme-chalk/time-picker/index.scss +109 -0
- package/theme-chalk/tooltip/index.scss +13 -0
- package/theme-chalk/transfer/index.scss +247 -0
- package/theme-chalk/transition/index.scss +756 -0
- package/theme-chalk/tree/_directory.scss +73 -0
- package/theme-chalk/tree/_tree.scss +401 -0
- package/theme-chalk/tree/index.scss +2 -0
- package/theme-chalk/tree-select/index.scss +25 -0
- package/theme-chalk/upload/index.scss +631 -0
- package/dist/Tree/utils/KeyCode.d.ts +0 -110
- package/dist/Tree/utils/KeyCode.js +0 -550
- package/dist/VirtualList/Filler.d.ts +0 -11
- package/dist/VirtualList/Filler.js +0 -78
- package/dist/VirtualList/Item.d.ts +0 -7
- package/dist/VirtualList/ScrollBar.d.ts +0 -43
- package/dist/VirtualList/ScrollBar.js +0 -216
- package/dist/VirtualList/VirtualList.d.ts +0 -33
- package/dist/VirtualList/VirtualList.js +0 -280
- package/dist/VirtualList/hooks/useChildren.d.ts +0 -3
- package/dist/VirtualList/hooks/useDiffItem.d.ts +0 -2
- package/dist/VirtualList/hooks/useDiffItem.js +0 -39
- package/dist/VirtualList/hooks/useFrameWheel.d.ts +0 -6
- package/dist/VirtualList/hooks/useFrameWheel.js +0 -72
- package/dist/VirtualList/hooks/useHeights.d.ts +0 -3
- package/dist/VirtualList/hooks/useHeights.js +0 -83
- package/dist/VirtualList/hooks/useLayoutEffect.d.ts +0 -3
- package/dist/VirtualList/hooks/useLayoutEffect.js +0 -30
- package/dist/VirtualList/hooks/useMobileTouchMove.d.ts +0 -2
- package/dist/VirtualList/hooks/useMobileTouchMove.js +0 -92
- package/dist/VirtualList/hooks/useOriginScroll.d.ts +0 -2
- package/dist/VirtualList/hooks/useOriginScroll.js +0 -56
- package/dist/VirtualList/hooks/useScrollTo.d.ts +0 -5
- package/dist/VirtualList/hooks/useScrollTo.js +0 -111
- package/dist/VirtualList/index.d.ts +0 -2
- package/dist/VirtualList/interface.d.ts +0 -8
- package/dist/VirtualList/mock.d.ts +0 -6
- package/dist/VirtualList/mock.js +0 -29
- package/dist/VirtualList/utils/CacheMap.d.ts +0 -7
- package/dist/VirtualList/utils/CacheMap.js +0 -36
- package/dist/VirtualList/utils/algorithmUtil.d.ts +0 -6
- package/dist/VirtualList/utils/algorithmUtil.js +0 -81
- package/dist/VirtualList/utils/findDOMNode.d.ts +0 -2
- package/dist/VirtualList/utils/isFirefox.d.ts +0 -2
- package/dist/VirtualList/utils/raf.d.ts +0 -5
- package/dist/VirtualList/utils/raf.js +0 -57
- package/dist/theme-chalk/bak/common/popup.scss +0 -47
- package/dist/theme-chalk/bak/common/transition.scss +0 -118
- package/dist/theme-chalk/bak/common/var.scss +0 -1476
- package/dist/theme-chalk/bak/mixins/_var.scss +0 -55
- package/dist/theme-chalk/bak/mixins/function.scss +0 -85
- package/dist/theme-chalk/bak/mixins/mixins.scss +0 -215
- package/dist/theme-chalk/bak/mixins/utils.scss +0 -39
package/dist/Tree/RCTree.js
CHANGED
|
@@ -33,19 +33,20 @@ __export(RCTree_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(RCTree_exports);
|
|
35
35
|
var import_classnames = __toESM(require("classnames"));
|
|
36
|
-
var
|
|
37
|
-
var
|
|
38
|
-
var
|
|
39
|
-
var
|
|
36
|
+
var import_KeyCode = __toESM(require("rc-util/lib/KeyCode"));
|
|
37
|
+
var import_pickAttrs = __toESM(require("rc-util/lib/pickAttrs"));
|
|
38
|
+
var import_warning = __toESM(require("rc-util/lib/warning"));
|
|
39
|
+
var React = __toESM(require("react"));
|
|
40
40
|
var import_DropIndicator = __toESM(require("./DropIndicator"));
|
|
41
41
|
var import_NodeList = __toESM(require("./NodeList"));
|
|
42
42
|
var import_TreeNode = __toESM(require("./TreeNode"));
|
|
43
43
|
var import_contextTypes = require("./contextTypes");
|
|
44
44
|
var import_util = require("./util");
|
|
45
45
|
var import_conductUtil = require("./utils/conductUtil");
|
|
46
|
+
var import_keyUtil = __toESM(require("./utils/keyUtil"));
|
|
46
47
|
var import_treeUtil = require("./utils/treeUtil");
|
|
47
48
|
var MAX_RETRY_TIMES = 10;
|
|
48
|
-
var
|
|
49
|
+
var Tree = class extends React.Component {
|
|
49
50
|
constructor() {
|
|
50
51
|
super(...arguments);
|
|
51
52
|
this.destroyed = false;
|
|
@@ -88,13 +89,14 @@ var RCTree = class extends import_react.Component {
|
|
|
88
89
|
fieldNames: (0, import_treeUtil.fillFieldNames)()
|
|
89
90
|
};
|
|
90
91
|
this.dragStartMousePosition = null;
|
|
92
|
+
this.dragNodeProps = null;
|
|
91
93
|
this.currentMouseOverDroppableNodeKey = null;
|
|
92
|
-
this.listRef =
|
|
93
|
-
this.onNodeDragStart = (event,
|
|
94
|
+
this.listRef = React.createRef();
|
|
95
|
+
this.onNodeDragStart = (event, nodeProps) => {
|
|
94
96
|
const { expandedKeys, keyEntities } = this.state;
|
|
95
97
|
const { onDragStart } = this.props;
|
|
96
|
-
const { eventKey } =
|
|
97
|
-
this.
|
|
98
|
+
const { eventKey } = nodeProps;
|
|
99
|
+
this.dragNodeProps = nodeProps;
|
|
98
100
|
this.dragStartMousePosition = {
|
|
99
101
|
x: event.clientX,
|
|
100
102
|
y: event.clientY
|
|
@@ -107,7 +109,7 @@ var RCTree = class extends import_react.Component {
|
|
|
107
109
|
});
|
|
108
110
|
this.setExpandedKeys(newExpandedKeys);
|
|
109
111
|
window.addEventListener("dragend", this.onWindowDragEnd);
|
|
110
|
-
onDragStart == null ? void 0 : onDragStart({ event, node: (0, import_treeUtil.convertNodePropsToEventData)(
|
|
112
|
+
onDragStart == null ? void 0 : onDragStart({ event, node: (0, import_treeUtil.convertNodePropsToEventData)(nodeProps) });
|
|
111
113
|
};
|
|
112
114
|
/**
|
|
113
115
|
* [Legacy] Select handler is smaller than node,
|
|
@@ -116,22 +118,21 @@ var RCTree = class extends import_react.Component {
|
|
|
116
118
|
* Better for use mouse move event to refresh drag state.
|
|
117
119
|
* But let's just keep it to avoid event trigger logic change.
|
|
118
120
|
*/
|
|
119
|
-
this.onNodeDragEnter = (event,
|
|
121
|
+
this.onNodeDragEnter = (event, nodeProps) => {
|
|
120
122
|
const { expandedKeys, keyEntities, dragChildrenKeys, flattenNodes, indent } = this.state;
|
|
121
123
|
const { onDragEnter, onExpand, allowDrop, direction } = this.props;
|
|
122
|
-
const { pos, eventKey } =
|
|
123
|
-
const { dragNode } = this;
|
|
124
|
+
const { pos, eventKey } = nodeProps;
|
|
124
125
|
if (this.currentMouseOverDroppableNodeKey !== eventKey) {
|
|
125
126
|
this.currentMouseOverDroppableNodeKey = eventKey;
|
|
126
127
|
}
|
|
127
|
-
if (!
|
|
128
|
+
if (!this.dragNodeProps) {
|
|
128
129
|
this.resetDragState();
|
|
129
130
|
return;
|
|
130
131
|
}
|
|
131
132
|
const { dropPosition, dropLevelOffset, dropTargetKey, dropContainerKey, dropTargetPos, dropAllowed, dragOverNodeKey } = (0, import_util.calcDropPosition)(
|
|
132
133
|
event,
|
|
133
|
-
|
|
134
|
-
|
|
134
|
+
this.dragNodeProps,
|
|
135
|
+
nodeProps,
|
|
135
136
|
indent,
|
|
136
137
|
this.dragStartMousePosition,
|
|
137
138
|
allowDrop,
|
|
@@ -142,7 +143,7 @@ var RCTree = class extends import_react.Component {
|
|
|
142
143
|
);
|
|
143
144
|
if (
|
|
144
145
|
// don't allow drop inside its children
|
|
145
|
-
dragChildrenKeys.
|
|
146
|
+
dragChildrenKeys.includes(dropTargetKey) || // don't allow drop when drop is not allowed caculated by calcDropPosition
|
|
146
147
|
!dropAllowed
|
|
147
148
|
) {
|
|
148
149
|
this.resetDragState();
|
|
@@ -154,28 +155,28 @@ var RCTree = class extends import_react.Component {
|
|
|
154
155
|
Object.keys(this.delayedDragEnterLogic).forEach((key) => {
|
|
155
156
|
clearTimeout(this.delayedDragEnterLogic[key]);
|
|
156
157
|
});
|
|
157
|
-
if (
|
|
158
|
+
if (this.dragNodeProps.eventKey !== nodeProps.eventKey) {
|
|
158
159
|
event.persist();
|
|
159
160
|
this.delayedDragEnterLogic[pos] = window.setTimeout(() => {
|
|
160
161
|
if (this.state.draggingNodeKey === null) {
|
|
161
162
|
return;
|
|
162
163
|
}
|
|
163
164
|
let newExpandedKeys = [...expandedKeys];
|
|
164
|
-
const entity = keyEntities
|
|
165
|
+
const entity = (0, import_keyUtil.default)(keyEntities, nodeProps.eventKey);
|
|
165
166
|
if (entity && (entity.children || []).length) {
|
|
166
|
-
newExpandedKeys = (0, import_util.arrAdd)(expandedKeys,
|
|
167
|
+
newExpandedKeys = (0, import_util.arrAdd)(expandedKeys, nodeProps.eventKey);
|
|
167
168
|
}
|
|
168
|
-
if (!("expandedKeys"
|
|
169
|
+
if (!Object.prototype.hasOwnProperty.call(this.props, "expandedKeys")) {
|
|
169
170
|
this.setExpandedKeys(newExpandedKeys);
|
|
170
171
|
}
|
|
171
172
|
onExpand == null ? void 0 : onExpand(newExpandedKeys, {
|
|
172
|
-
node: (0, import_treeUtil.convertNodePropsToEventData)(
|
|
173
|
+
node: (0, import_treeUtil.convertNodePropsToEventData)(nodeProps),
|
|
173
174
|
expanded: true,
|
|
174
175
|
nativeEvent: event.nativeEvent
|
|
175
176
|
});
|
|
176
177
|
}, 800);
|
|
177
178
|
}
|
|
178
|
-
if (
|
|
179
|
+
if (this.dragNodeProps.eventKey === dropTargetKey && dropLevelOffset === 0) {
|
|
179
180
|
this.resetDragState();
|
|
180
181
|
return;
|
|
181
182
|
}
|
|
@@ -190,21 +191,20 @@ var RCTree = class extends import_react.Component {
|
|
|
190
191
|
});
|
|
191
192
|
onDragEnter == null ? void 0 : onDragEnter({
|
|
192
193
|
event,
|
|
193
|
-
node: (0, import_treeUtil.convertNodePropsToEventData)(
|
|
194
|
+
node: (0, import_treeUtil.convertNodePropsToEventData)(nodeProps),
|
|
194
195
|
expandedKeys
|
|
195
196
|
});
|
|
196
197
|
};
|
|
197
|
-
this.onNodeDragOver = (event,
|
|
198
|
+
this.onNodeDragOver = (event, nodeProps) => {
|
|
198
199
|
const { dragChildrenKeys, flattenNodes, keyEntities, expandedKeys, indent } = this.state;
|
|
199
200
|
const { onDragOver, allowDrop, direction } = this.props;
|
|
200
|
-
|
|
201
|
-
if (!dragNode) {
|
|
201
|
+
if (!this.dragNodeProps) {
|
|
202
202
|
return;
|
|
203
203
|
}
|
|
204
|
-
const { dropPosition, dropLevelOffset, dropTargetKey, dropContainerKey,
|
|
204
|
+
const { dropPosition, dropLevelOffset, dropTargetKey, dropContainerKey, dropTargetPos, dropAllowed, dragOverNodeKey } = (0, import_util.calcDropPosition)(
|
|
205
205
|
event,
|
|
206
|
-
|
|
207
|
-
|
|
206
|
+
this.dragNodeProps,
|
|
207
|
+
nodeProps,
|
|
208
208
|
indent,
|
|
209
209
|
this.dragStartMousePosition,
|
|
210
210
|
allowDrop,
|
|
@@ -213,10 +213,10 @@ var RCTree = class extends import_react.Component {
|
|
|
213
213
|
expandedKeys,
|
|
214
214
|
direction
|
|
215
215
|
);
|
|
216
|
-
if (dragChildrenKeys.
|
|
216
|
+
if (dragChildrenKeys.includes(dropTargetKey) || !dropAllowed) {
|
|
217
217
|
return;
|
|
218
218
|
}
|
|
219
|
-
if (
|
|
219
|
+
if (this.dragNodeProps.eventKey === dropTargetKey && dropLevelOffset === 0) {
|
|
220
220
|
if (!(this.state.dropPosition === null && this.state.dropLevelOffset === null && this.state.dropTargetKey === null && this.state.dropContainerKey === null && this.state.dropTargetPos === null && this.state.dropAllowed === false && this.state.dragOverNodeKey === null)) {
|
|
221
221
|
this.resetDragState();
|
|
222
222
|
}
|
|
@@ -231,15 +231,15 @@ var RCTree = class extends import_react.Component {
|
|
|
231
231
|
dragOverNodeKey
|
|
232
232
|
});
|
|
233
233
|
}
|
|
234
|
-
onDragOver == null ? void 0 : onDragOver({ event, node: (0, import_treeUtil.convertNodePropsToEventData)(
|
|
234
|
+
onDragOver == null ? void 0 : onDragOver({ event, node: (0, import_treeUtil.convertNodePropsToEventData)(nodeProps) });
|
|
235
235
|
};
|
|
236
|
-
this.onNodeDragLeave = (event,
|
|
237
|
-
if (this.currentMouseOverDroppableNodeKey ===
|
|
236
|
+
this.onNodeDragLeave = (event, nodeProps) => {
|
|
237
|
+
if (this.currentMouseOverDroppableNodeKey === nodeProps.eventKey && !event.currentTarget.contains(event.relatedTarget)) {
|
|
238
238
|
this.resetDragState();
|
|
239
239
|
this.currentMouseOverDroppableNodeKey = null;
|
|
240
240
|
}
|
|
241
241
|
const { onDragLeave } = this.props;
|
|
242
|
-
onDragLeave == null ? void 0 : onDragLeave({ event, node: (0, import_treeUtil.convertNodePropsToEventData)(
|
|
242
|
+
onDragLeave == null ? void 0 : onDragLeave({ event, node: (0, import_treeUtil.convertNodePropsToEventData)(nodeProps) });
|
|
243
243
|
};
|
|
244
244
|
// since stopPropagation() is called in treeNode
|
|
245
245
|
// if onWindowDrag is called, whice means state is keeped, drag state should be cleared
|
|
@@ -248,16 +248,17 @@ var RCTree = class extends import_react.Component {
|
|
|
248
248
|
window.removeEventListener("dragend", this.onWindowDragEnd);
|
|
249
249
|
};
|
|
250
250
|
// if onNodeDragEnd is called, onWindowDragEnd won't be called since stopPropagation() is called
|
|
251
|
-
this.onNodeDragEnd = (event,
|
|
251
|
+
this.onNodeDragEnd = (event, nodeProps) => {
|
|
252
252
|
const { onDragEnd } = this.props;
|
|
253
253
|
this.setState({
|
|
254
254
|
dragOverNodeKey: null
|
|
255
255
|
});
|
|
256
256
|
this.cleanDragState();
|
|
257
|
-
onDragEnd == null ? void 0 : onDragEnd({ event, node: (0, import_treeUtil.convertNodePropsToEventData)(
|
|
258
|
-
this.
|
|
257
|
+
onDragEnd == null ? void 0 : onDragEnd({ event, node: (0, import_treeUtil.convertNodePropsToEventData)(nodeProps) });
|
|
258
|
+
this.dragNodeProps = null;
|
|
259
|
+
window.removeEventListener("dragend", this.onWindowDragEnd);
|
|
259
260
|
};
|
|
260
|
-
this.onNodeDrop = (event,
|
|
261
|
+
this.onNodeDrop = (event, _, outsideTree = false) => {
|
|
261
262
|
var _a;
|
|
262
263
|
const { dragChildrenKeys, dropPosition, dropTargetKey, dropTargetPos, dropAllowed } = this.state;
|
|
263
264
|
if (!dropAllowed) {
|
|
@@ -273,24 +274,24 @@ var RCTree = class extends import_react.Component {
|
|
|
273
274
|
}
|
|
274
275
|
const abstractDropNodeProps = {
|
|
275
276
|
...(0, import_treeUtil.getTreeNodeProps)(dropTargetKey, this.getTreeNodeRequiredProps()),
|
|
276
|
-
active: ((_a = this.getActiveItem()) == null ? void 0 : _a.
|
|
277
|
-
data: this.state.keyEntities
|
|
277
|
+
active: ((_a = this.getActiveItem()) == null ? void 0 : _a.key) === dropTargetKey,
|
|
278
|
+
data: (0, import_keyUtil.default)(this.state.keyEntities, dropTargetKey).node
|
|
278
279
|
};
|
|
279
|
-
const dropToChild = dragChildrenKeys.
|
|
280
|
-
(0,
|
|
280
|
+
const dropToChild = dragChildrenKeys.includes(dropTargetKey);
|
|
281
|
+
(0, import_warning.default)(!dropToChild, "Can not drop to dragNodes children node. This is a bug of rc-tree. Please report an issue.");
|
|
281
282
|
const posArr = (0, import_util.posToArr)(dropTargetPos);
|
|
282
283
|
const dropResult = {
|
|
283
284
|
event,
|
|
284
285
|
node: (0, import_treeUtil.convertNodePropsToEventData)(abstractDropNodeProps),
|
|
285
|
-
dragNode: this.
|
|
286
|
-
dragNodesKeys: [this.
|
|
286
|
+
dragNode: this.dragNodeProps ? (0, import_treeUtil.convertNodePropsToEventData)(this.dragNodeProps) : null,
|
|
287
|
+
dragNodesKeys: [this.dragNodeProps.eventKey].concat(dragChildrenKeys),
|
|
287
288
|
dropToGap: dropPosition !== 0,
|
|
288
289
|
dropPosition: dropPosition + Number(posArr[posArr.length - 1])
|
|
289
290
|
};
|
|
290
291
|
if (!outsideTree) {
|
|
291
292
|
onDrop == null ? void 0 : onDrop(dropResult);
|
|
292
293
|
}
|
|
293
|
-
this.
|
|
294
|
+
this.dragNodeProps = null;
|
|
294
295
|
};
|
|
295
296
|
this.cleanDragState = () => {
|
|
296
297
|
const { draggingNodeKey } = this.state;
|
|
@@ -308,12 +309,32 @@ var RCTree = class extends import_react.Component {
|
|
|
308
309
|
this.dragStartMousePosition = null;
|
|
309
310
|
this.currentMouseOverDroppableNodeKey = null;
|
|
310
311
|
};
|
|
312
|
+
this.triggerExpandActionExpand = (e, treeNode) => {
|
|
313
|
+
const { expandedKeys, flattenNodes } = this.state;
|
|
314
|
+
const { expanded, key, isLeaf } = treeNode;
|
|
315
|
+
if (isLeaf || e.shiftKey || e.metaKey || e.ctrlKey) {
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
const node = flattenNodes.filter((nodeItem) => nodeItem.key === key)[0];
|
|
319
|
+
const eventNode = (0, import_treeUtil.convertNodePropsToEventData)({
|
|
320
|
+
...(0, import_treeUtil.getTreeNodeProps)(key, this.getTreeNodeRequiredProps()),
|
|
321
|
+
data: node.data
|
|
322
|
+
});
|
|
323
|
+
this.setExpandedKeys(expanded ? (0, import_util.arrDel)(expandedKeys, key) : (0, import_util.arrAdd)(expandedKeys, key));
|
|
324
|
+
this.onNodeExpand(e, eventNode);
|
|
325
|
+
};
|
|
311
326
|
this.onNodeClick = (e, treeNode) => {
|
|
312
|
-
const { onClick } = this.props;
|
|
327
|
+
const { onClick, expandAction } = this.props;
|
|
328
|
+
if (expandAction === "click") {
|
|
329
|
+
this.triggerExpandActionExpand(e, treeNode);
|
|
330
|
+
}
|
|
313
331
|
onClick == null ? void 0 : onClick(e, treeNode);
|
|
314
332
|
};
|
|
315
333
|
this.onNodeDoubleClick = (e, treeNode) => {
|
|
316
|
-
const { onDoubleClick } = this.props;
|
|
334
|
+
const { onDoubleClick, expandAction } = this.props;
|
|
335
|
+
if (expandAction === "doubleClick") {
|
|
336
|
+
this.triggerExpandActionExpand(e, treeNode);
|
|
337
|
+
}
|
|
317
338
|
onDoubleClick == null ? void 0 : onDoubleClick(e, treeNode);
|
|
318
339
|
};
|
|
319
340
|
this.onNodeSelect = (e, treeNode) => {
|
|
@@ -331,12 +352,9 @@ var RCTree = class extends import_react.Component {
|
|
|
331
352
|
selectedKeys = (0, import_util.arrAdd)(selectedKeys, key);
|
|
332
353
|
}
|
|
333
354
|
const selectedNodes = selectedKeys.map((selectedKey) => {
|
|
334
|
-
const entity = keyEntities
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
}
|
|
338
|
-
return entity.node;
|
|
339
|
-
}).filter((node) => node);
|
|
355
|
+
const entity = (0, import_keyUtil.default)(keyEntities, selectedKey);
|
|
356
|
+
return entity ? entity.node : null;
|
|
357
|
+
}).filter(Boolean);
|
|
340
358
|
this.setUncontrolledState({ selectedKeys });
|
|
341
359
|
onSelect == null ? void 0 : onSelect(selectedKeys, {
|
|
342
360
|
event: "select",
|
|
@@ -361,7 +379,7 @@ var RCTree = class extends import_react.Component {
|
|
|
361
379
|
const checkedKeys = checked ? (0, import_util.arrAdd)(oriCheckedKeys, key) : (0, import_util.arrDel)(oriCheckedKeys, key);
|
|
362
380
|
const halfCheckedKeys = (0, import_util.arrDel)(oriHalfCheckedKeys, key);
|
|
363
381
|
checkedObj = { checked: checkedKeys, halfChecked: halfCheckedKeys };
|
|
364
|
-
eventObj.checkedNodes = checkedKeys.map((checkedKey) => keyEntities
|
|
382
|
+
eventObj.checkedNodes = checkedKeys.map((checkedKey) => (0, import_keyUtil.default)(keyEntities, checkedKey)).filter(Boolean).map((entity) => entity.node);
|
|
365
383
|
this.setUncontrolledState({ checkedKeys });
|
|
366
384
|
} else {
|
|
367
385
|
let { checkedKeys, halfCheckedKeys } = (0, import_conductUtil.conductCheck)([...oriCheckedKeys, key], true, keyEntities);
|
|
@@ -375,7 +393,7 @@ var RCTree = class extends import_react.Component {
|
|
|
375
393
|
eventObj.checkedNodesPositions = [];
|
|
376
394
|
eventObj.halfCheckedKeys = halfCheckedKeys;
|
|
377
395
|
checkedKeys.forEach((checkedKey) => {
|
|
378
|
-
const entity = keyEntities
|
|
396
|
+
const entity = (0, import_keyUtil.default)(keyEntities, checkedKey);
|
|
379
397
|
if (!entity) {
|
|
380
398
|
return;
|
|
381
399
|
}
|
|
@@ -383,24 +401,22 @@ var RCTree = class extends import_react.Component {
|
|
|
383
401
|
eventObj.checkedNodes.push(node);
|
|
384
402
|
eventObj.checkedNodesPositions.push({ node, pos });
|
|
385
403
|
});
|
|
386
|
-
this.setUncontrolledState(
|
|
387
|
-
{
|
|
388
|
-
checkedKeys
|
|
389
|
-
},
|
|
390
|
-
false,
|
|
391
|
-
{
|
|
392
|
-
halfCheckedKeys
|
|
393
|
-
}
|
|
394
|
-
);
|
|
404
|
+
this.setUncontrolledState({ checkedKeys }, false, { halfCheckedKeys });
|
|
395
405
|
}
|
|
396
406
|
onCheck == null ? void 0 : onCheck(checkedObj, eventObj);
|
|
397
407
|
};
|
|
398
408
|
this.onNodeLoad = (treeNode) => {
|
|
409
|
+
var _a;
|
|
399
410
|
const { key } = treeNode;
|
|
411
|
+
const { keyEntities } = this.state;
|
|
412
|
+
const entity = (0, import_keyUtil.default)(keyEntities, key);
|
|
413
|
+
if ((_a = entity == null ? void 0 : entity.children) == null ? void 0 : _a.length) {
|
|
414
|
+
return;
|
|
415
|
+
}
|
|
400
416
|
const loadPromise = new Promise((resolve, reject) => {
|
|
401
417
|
this.setState(({ loadedKeys = [], loadingKeys = [] }) => {
|
|
402
418
|
const { loadData, onLoad } = this.props;
|
|
403
|
-
if (!loadData || loadedKeys.
|
|
419
|
+
if (!loadData || loadedKeys.includes(key) || loadingKeys.includes(key)) {
|
|
404
420
|
return null;
|
|
405
421
|
}
|
|
406
422
|
const promise = loadData(treeNode);
|
|
@@ -425,7 +441,7 @@ var RCTree = class extends import_react.Component {
|
|
|
425
441
|
this.loadingRetryTimes[key] = (this.loadingRetryTimes[key] || 0) + 1;
|
|
426
442
|
if (this.loadingRetryTimes[key] >= MAX_RETRY_TIMES) {
|
|
427
443
|
const { loadedKeys: currentLoadedKeys } = this.state;
|
|
428
|
-
(0,
|
|
444
|
+
(0, import_warning.default)(false, "Retry for `loadData` many times but still failed. No more retry.");
|
|
429
445
|
this.setUncontrolledState({
|
|
430
446
|
loadedKeys: (0, import_util.arrAdd)(currentLoadedKeys, key)
|
|
431
447
|
});
|
|
@@ -460,13 +476,13 @@ var RCTree = class extends import_react.Component {
|
|
|
460
476
|
this.onFocus = (...args) => {
|
|
461
477
|
const { onFocus } = this.props;
|
|
462
478
|
this.setState({ focused: true });
|
|
463
|
-
onFocus == null ? void 0 : onFocus
|
|
479
|
+
onFocus == null ? void 0 : onFocus(...args);
|
|
464
480
|
};
|
|
465
481
|
this.onBlur = (...args) => {
|
|
466
482
|
const { onBlur } = this.props;
|
|
467
483
|
this.setState({ focused: false });
|
|
468
484
|
this.onActiveChange(null);
|
|
469
|
-
onBlur == null ? void 0 : onBlur
|
|
485
|
+
onBlur == null ? void 0 : onBlur(...args);
|
|
470
486
|
};
|
|
471
487
|
this.getTreeNodeRequiredProps = () => {
|
|
472
488
|
const { expandedKeys, selectedKeys, loadedKeys, loadingKeys, checkedKeys, halfCheckedKeys, dragOverNodeKey, dropPosition, keyEntities } = this.state;
|
|
@@ -487,17 +503,7 @@ var RCTree = class extends import_react.Component {
|
|
|
487
503
|
this.setExpandedKeys = (expandedKeys) => {
|
|
488
504
|
const { treeData, fieldNames } = this.state;
|
|
489
505
|
const flattenNodes = (0, import_treeUtil.flattenTreeData)(treeData, expandedKeys, fieldNames);
|
|
490
|
-
this.setUncontrolledState(
|
|
491
|
-
{
|
|
492
|
-
expandedKeys,
|
|
493
|
-
flattenNodes
|
|
494
|
-
},
|
|
495
|
-
true
|
|
496
|
-
);
|
|
497
|
-
};
|
|
498
|
-
this.flattenTreeData = (expandedKeys) => {
|
|
499
|
-
const { treeData, fieldNames } = this.state;
|
|
500
|
-
return (0, import_treeUtil.flattenTreeData)(treeData, expandedKeys, fieldNames);
|
|
506
|
+
this.setUncontrolledState({ expandedKeys, flattenNodes }, true);
|
|
501
507
|
};
|
|
502
508
|
this.onNodeExpand = (e, treeNode) => {
|
|
503
509
|
let { expandedKeys } = this.state;
|
|
@@ -508,14 +514,10 @@ var RCTree = class extends import_react.Component {
|
|
|
508
514
|
if (listChanging) {
|
|
509
515
|
return;
|
|
510
516
|
}
|
|
511
|
-
const
|
|
517
|
+
const certain = expandedKeys.includes(key);
|
|
512
518
|
const targetExpanded = !expanded;
|
|
513
|
-
(0,
|
|
514
|
-
|
|
515
|
-
expandedKeys = (0, import_util.arrAdd)(expandedKeys, key);
|
|
516
|
-
} else {
|
|
517
|
-
expandedKeys = (0, import_util.arrDel)(expandedKeys, key);
|
|
518
|
-
}
|
|
519
|
+
(0, import_warning.default)(expanded && certain || !expanded && !certain, "Expand state not sync with index check");
|
|
520
|
+
expandedKeys = targetExpanded ? (0, import_util.arrAdd)(expandedKeys, key) : (0, import_util.arrDel)(expandedKeys, key);
|
|
519
521
|
this.setExpandedKeys(expandedKeys);
|
|
520
522
|
onExpand == null ? void 0 : onExpand(expandedKeys, {
|
|
521
523
|
node: treeNode,
|
|
@@ -551,13 +553,13 @@ var RCTree = class extends import_react.Component {
|
|
|
551
553
|
// =========================== Keyboard ===========================
|
|
552
554
|
this.onActiveChange = (newActiveKey) => {
|
|
553
555
|
const { activeKey } = this.state;
|
|
554
|
-
const { onActiveChange } = this.props;
|
|
556
|
+
const { onActiveChange, itemScrollOffset = 0 } = this.props;
|
|
555
557
|
if (activeKey === newActiveKey) {
|
|
556
558
|
return;
|
|
557
559
|
}
|
|
558
560
|
this.setState({ activeKey: newActiveKey });
|
|
559
561
|
if (newActiveKey !== null) {
|
|
560
|
-
this.scrollTo({ key: newActiveKey });
|
|
562
|
+
this.scrollTo({ key: newActiveKey, offset: itemScrollOffset });
|
|
561
563
|
}
|
|
562
564
|
onActiveChange == null ? void 0 : onActiveChange(newActiveKey);
|
|
563
565
|
};
|
|
@@ -584,7 +586,7 @@ var RCTree = class extends import_react.Component {
|
|
|
584
586
|
}
|
|
585
587
|
};
|
|
586
588
|
this.onKeyDown = (event) => {
|
|
587
|
-
const { activeKey, expandedKeys, checkedKeys } = this.state;
|
|
589
|
+
const { activeKey, expandedKeys, checkedKeys, fieldNames } = this.state;
|
|
588
590
|
const { onKeyDown, checkable, selectable } = this.props;
|
|
589
591
|
switch (event.which) {
|
|
590
592
|
case import_KeyCode.default.UP: {
|
|
@@ -601,7 +603,7 @@ var RCTree = class extends import_react.Component {
|
|
|
601
603
|
const activeItem = this.getActiveItem();
|
|
602
604
|
if (activeItem && activeItem.data) {
|
|
603
605
|
const treeNodeRequiredProps = this.getTreeNodeRequiredProps();
|
|
604
|
-
const expandable = activeItem.data.isLeaf === false || !!(activeItem.data.children || []).length;
|
|
606
|
+
const expandable = activeItem.data.isLeaf === false || !!(activeItem.data[fieldNames.children] || []).length;
|
|
605
607
|
const eventNode = (0, import_treeUtil.convertNodePropsToEventData)({
|
|
606
608
|
...(0, import_treeUtil.getTreeNodeProps)(activeKey, treeNodeRequiredProps),
|
|
607
609
|
data: activeItem.data,
|
|
@@ -612,7 +614,7 @@ var RCTree = class extends import_react.Component {
|
|
|
612
614
|
if (expandable && expandedKeys.includes(activeKey)) {
|
|
613
615
|
this.onNodeExpand({}, eventNode);
|
|
614
616
|
} else if (activeItem.parent) {
|
|
615
|
-
this.onActiveChange(activeItem.parent.
|
|
617
|
+
this.onActiveChange(activeItem.parent.key);
|
|
616
618
|
}
|
|
617
619
|
event.preventDefault();
|
|
618
620
|
break;
|
|
@@ -621,7 +623,7 @@ var RCTree = class extends import_react.Component {
|
|
|
621
623
|
if (expandable && !expandedKeys.includes(activeKey)) {
|
|
622
624
|
this.onNodeExpand({}, eventNode);
|
|
623
625
|
} else if (activeItem.children && activeItem.children.length) {
|
|
624
|
-
this.onActiveChange(activeItem.children[0].
|
|
626
|
+
this.onActiveChange(activeItem.children[0].key);
|
|
625
627
|
}
|
|
626
628
|
event.preventDefault();
|
|
627
629
|
break;
|
|
@@ -637,7 +639,7 @@ var RCTree = class extends import_react.Component {
|
|
|
637
639
|
}
|
|
638
640
|
}
|
|
639
641
|
}
|
|
640
|
-
onKeyDown == null ? void 0 : onKeyDown
|
|
642
|
+
onKeyDown == null ? void 0 : onKeyDown(event);
|
|
641
643
|
};
|
|
642
644
|
/**
|
|
643
645
|
* Only update the value which is not in props
|
|
@@ -648,7 +650,7 @@ var RCTree = class extends import_react.Component {
|
|
|
648
650
|
let allPassed = true;
|
|
649
651
|
const newState = {};
|
|
650
652
|
Object.keys(state).forEach((name) => {
|
|
651
|
-
if (
|
|
653
|
+
if (Object.prototype.hasOwnProperty.call(this.props, name)) {
|
|
652
654
|
allPassed = false;
|
|
653
655
|
return;
|
|
654
656
|
}
|
|
@@ -668,17 +670,18 @@ var RCTree = class extends import_react.Component {
|
|
|
668
670
|
};
|
|
669
671
|
}
|
|
670
672
|
componentDidMount() {
|
|
673
|
+
this.destroyed = false;
|
|
671
674
|
this.onUpdated();
|
|
672
675
|
}
|
|
673
676
|
componentDidUpdate() {
|
|
674
677
|
this.onUpdated();
|
|
675
678
|
}
|
|
676
679
|
onUpdated() {
|
|
677
|
-
const { activeKey } = this.props;
|
|
680
|
+
const { activeKey, itemScrollOffset = 0 } = this.props;
|
|
678
681
|
if (activeKey !== void 0 && activeKey !== this.state.activeKey) {
|
|
679
682
|
this.setState({ activeKey });
|
|
680
683
|
if (activeKey !== null) {
|
|
681
|
-
this.scrollTo({ key: activeKey });
|
|
684
|
+
this.scrollTo({ key: activeKey, offset: itemScrollOffset });
|
|
682
685
|
}
|
|
683
686
|
}
|
|
684
687
|
}
|
|
@@ -692,7 +695,7 @@ var RCTree = class extends import_react.Component {
|
|
|
692
695
|
prevProps: props
|
|
693
696
|
};
|
|
694
697
|
function needSync(name) {
|
|
695
|
-
return !prevProps && name
|
|
698
|
+
return !prevProps && Object.prototype.hasOwnProperty.call(props, name) || prevProps && prevProps[name] !== props[name];
|
|
696
699
|
}
|
|
697
700
|
let treeData;
|
|
698
701
|
let { fieldNames } = prevState;
|
|
@@ -703,7 +706,7 @@ var RCTree = class extends import_react.Component {
|
|
|
703
706
|
if (needSync("treeData")) {
|
|
704
707
|
({ treeData } = props);
|
|
705
708
|
} else if (needSync("children")) {
|
|
706
|
-
(0,
|
|
709
|
+
(0, import_warning.default)(false, "`children` of Tree is deprecated. Please use `treeData` instead.");
|
|
707
710
|
treeData = (0, import_treeUtil.convertTreeToData)(props.children);
|
|
708
711
|
}
|
|
709
712
|
if (treeData) {
|
|
@@ -723,7 +726,14 @@ var RCTree = class extends import_react.Component {
|
|
|
723
726
|
} else if (!prevProps && props.defaultExpandAll) {
|
|
724
727
|
const cloneKeyEntities = { ...keyEntities };
|
|
725
728
|
delete cloneKeyEntities[import_NodeList.MOTION_KEY];
|
|
726
|
-
|
|
729
|
+
const nextExpandedKeys = [];
|
|
730
|
+
Object.keys(cloneKeyEntities).forEach((key) => {
|
|
731
|
+
const entity = cloneKeyEntities[key];
|
|
732
|
+
if (entity.children && entity.children.length) {
|
|
733
|
+
nextExpandedKeys.push(entity.key);
|
|
734
|
+
}
|
|
735
|
+
});
|
|
736
|
+
newState.expandedKeys = nextExpandedKeys;
|
|
727
737
|
} else if (!prevProps && props.defaultExpandedKeys) {
|
|
728
738
|
newState.expandedKeys = props.autoExpandParent || props.defaultExpandParent ? (0, import_util.conductExpandParent)(props.defaultExpandedKeys, keyEntities) : props.defaultExpandedKeys;
|
|
729
739
|
}
|
|
@@ -785,6 +795,8 @@ var RCTree = class extends import_react.Component {
|
|
|
785
795
|
prefixCls,
|
|
786
796
|
className,
|
|
787
797
|
style,
|
|
798
|
+
styles,
|
|
799
|
+
classNames: treeClassNames,
|
|
788
800
|
showLine,
|
|
789
801
|
focusable,
|
|
790
802
|
tabIndex = 0,
|
|
@@ -801,6 +813,7 @@ var RCTree = class extends import_react.Component {
|
|
|
801
813
|
filterTreeNode,
|
|
802
814
|
height,
|
|
803
815
|
itemHeight,
|
|
816
|
+
scrollWidth,
|
|
804
817
|
virtual,
|
|
805
818
|
titleRender,
|
|
806
819
|
dropIndicatorRender,
|
|
@@ -826,97 +839,94 @@ var RCTree = class extends import_react.Component {
|
|
|
826
839
|
draggableConfig = {};
|
|
827
840
|
}
|
|
828
841
|
}
|
|
829
|
-
|
|
830
|
-
|
|
842
|
+
const contextValue = {
|
|
843
|
+
styles,
|
|
844
|
+
classNames: treeClassNames,
|
|
845
|
+
prefixCls,
|
|
846
|
+
selectable,
|
|
847
|
+
showIcon,
|
|
848
|
+
icon,
|
|
849
|
+
switcherIcon,
|
|
850
|
+
draggable: draggableConfig,
|
|
851
|
+
draggingNodeKey,
|
|
852
|
+
checkable,
|
|
853
|
+
checkStrictly,
|
|
854
|
+
disabled,
|
|
855
|
+
keyEntities,
|
|
856
|
+
dropLevelOffset,
|
|
857
|
+
dropContainerKey,
|
|
858
|
+
dropTargetKey,
|
|
859
|
+
dropPosition,
|
|
860
|
+
dragOverNodeKey,
|
|
861
|
+
indent,
|
|
862
|
+
direction,
|
|
863
|
+
dropIndicatorRender,
|
|
864
|
+
loadData,
|
|
865
|
+
filterTreeNode,
|
|
866
|
+
titleRender,
|
|
867
|
+
onNodeClick: this.onNodeClick,
|
|
868
|
+
onNodeDoubleClick: this.onNodeDoubleClick,
|
|
869
|
+
onNodeExpand: this.onNodeExpand,
|
|
870
|
+
onNodeSelect: this.onNodeSelect,
|
|
871
|
+
onNodeCheck: this.onNodeCheck,
|
|
872
|
+
onNodeLoad: this.onNodeLoad,
|
|
873
|
+
onNodeMouseEnter: this.onNodeMouseEnter,
|
|
874
|
+
onNodeMouseLeave: this.onNodeMouseLeave,
|
|
875
|
+
onNodeContextMenu: this.onNodeContextMenu,
|
|
876
|
+
onNodeDragStart: this.onNodeDragStart,
|
|
877
|
+
onNodeDragEnter: this.onNodeDragEnter,
|
|
878
|
+
onNodeDragOver: this.onNodeDragOver,
|
|
879
|
+
onNodeDragLeave: this.onNodeDragLeave,
|
|
880
|
+
onNodeDragEnd: this.onNodeDragEnd,
|
|
881
|
+
onNodeDrop: this.onNodeDrop
|
|
882
|
+
};
|
|
883
|
+
return /* @__PURE__ */ React.createElement(import_contextTypes.TreeContext.Provider, { value: contextValue }, /* @__PURE__ */ React.createElement(
|
|
884
|
+
"div",
|
|
831
885
|
{
|
|
832
|
-
|
|
886
|
+
className: (0, import_classnames.default)(prefixCls, className, rootClassName, {
|
|
887
|
+
[`${prefixCls}-show-line`]: showLine,
|
|
888
|
+
[`${prefixCls}-focused`]: focused,
|
|
889
|
+
[`${prefixCls}-active-focused`]: activeKey !== null
|
|
890
|
+
}),
|
|
891
|
+
style: rootStyle
|
|
892
|
+
},
|
|
893
|
+
/* @__PURE__ */ React.createElement(
|
|
894
|
+
import_NodeList.default,
|
|
895
|
+
{
|
|
896
|
+
ref: this.listRef,
|
|
833
897
|
prefixCls,
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
icon,
|
|
837
|
-
switcherIcon,
|
|
838
|
-
draggable: draggableConfig,
|
|
839
|
-
draggingNodeKey,
|
|
840
|
-
checkable,
|
|
841
|
-
checkStrictly,
|
|
898
|
+
style,
|
|
899
|
+
data: flattenNodes,
|
|
842
900
|
disabled,
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
onNodeDragEnter: this.onNodeDragEnter,
|
|
866
|
-
onNodeDragOver: this.onNodeDragOver,
|
|
867
|
-
onNodeDragLeave: this.onNodeDragLeave,
|
|
868
|
-
onNodeDragEnd: this.onNodeDragEnd,
|
|
869
|
-
onNodeDrop: this.onNodeDrop
|
|
901
|
+
selectable,
|
|
902
|
+
checkable: !!checkable,
|
|
903
|
+
motion,
|
|
904
|
+
dragging: draggingNodeKey !== null,
|
|
905
|
+
height,
|
|
906
|
+
itemHeight,
|
|
907
|
+
virtual,
|
|
908
|
+
focusable,
|
|
909
|
+
focused,
|
|
910
|
+
tabIndex,
|
|
911
|
+
activeItem: this.getActiveItem(),
|
|
912
|
+
onFocus: this.onFocus,
|
|
913
|
+
onBlur: this.onBlur,
|
|
914
|
+
onKeyDown: this.onKeyDown,
|
|
915
|
+
onActiveChange: this.onActiveChange,
|
|
916
|
+
onListChangeStart: this.onListChangeStart,
|
|
917
|
+
onListChangeEnd: this.onListChangeEnd,
|
|
918
|
+
onContextMenu,
|
|
919
|
+
onScroll,
|
|
920
|
+
scrollWidth,
|
|
921
|
+
...this.getTreeNodeRequiredProps(),
|
|
922
|
+
...domProps
|
|
870
923
|
}
|
|
871
|
-
},
|
|
872
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
873
|
-
"div",
|
|
874
|
-
{
|
|
875
|
-
role: "tree",
|
|
876
|
-
className: (0, import_classnames.default)(prefixCls, className, rootClassName, {
|
|
877
|
-
[`${prefixCls}-show-line`]: showLine,
|
|
878
|
-
[`${prefixCls}-focused`]: focused,
|
|
879
|
-
[`${prefixCls}-active-focused`]: activeKey !== null
|
|
880
|
-
}),
|
|
881
|
-
style: rootStyle
|
|
882
|
-
},
|
|
883
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
884
|
-
import_NodeList.default,
|
|
885
|
-
{
|
|
886
|
-
ref: this.listRef,
|
|
887
|
-
prefixCls,
|
|
888
|
-
style,
|
|
889
|
-
data: flattenNodes,
|
|
890
|
-
disabled,
|
|
891
|
-
selectable,
|
|
892
|
-
checkable: !!checkable,
|
|
893
|
-
motion,
|
|
894
|
-
dragging: draggingNodeKey !== null,
|
|
895
|
-
height,
|
|
896
|
-
itemHeight,
|
|
897
|
-
virtual,
|
|
898
|
-
focusable,
|
|
899
|
-
focused,
|
|
900
|
-
tabIndex,
|
|
901
|
-
activeItem: this.getActiveItem(),
|
|
902
|
-
onFocus: this.onFocus,
|
|
903
|
-
onBlur: this.onBlur,
|
|
904
|
-
onKeyDown: this.onKeyDown,
|
|
905
|
-
onActiveChange: this.onActiveChange,
|
|
906
|
-
onListChangeStart: this.onListChangeStart,
|
|
907
|
-
onListChangeEnd: this.onListChangeEnd,
|
|
908
|
-
onContextMenu,
|
|
909
|
-
onScroll,
|
|
910
|
-
...this.getTreeNodeRequiredProps(),
|
|
911
|
-
...domProps
|
|
912
|
-
}
|
|
913
|
-
)
|
|
914
924
|
)
|
|
915
|
-
);
|
|
925
|
+
));
|
|
916
926
|
}
|
|
917
927
|
};
|
|
918
|
-
|
|
919
|
-
prefixCls: "
|
|
928
|
+
Tree.defaultProps = {
|
|
929
|
+
prefixCls: "el-tree",
|
|
920
930
|
showLine: false,
|
|
921
931
|
showIcon: true,
|
|
922
932
|
selectable: true,
|
|
@@ -932,7 +942,8 @@ RCTree.defaultProps = {
|
|
|
932
942
|
defaultCheckedKeys: [],
|
|
933
943
|
defaultSelectedKeys: [],
|
|
934
944
|
dropIndicatorRender: import_DropIndicator.default,
|
|
935
|
-
allowDrop: () => true
|
|
945
|
+
allowDrop: () => true,
|
|
946
|
+
expandAction: false
|
|
936
947
|
};
|
|
937
|
-
|
|
938
|
-
var RCTree_default =
|
|
948
|
+
Tree.TreeNode = import_TreeNode.default;
|
|
949
|
+
var RCTree_default = Tree;
|