@unicom-cloud/ui 0.8.161 → 0.8.162
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/.virtual/_rolldown/runtime.js +1 -1
- package/.vite/manifest.json +185 -258
- package/affix/Affix.js +2 -3
- package/affix/index.d.ts +3 -0
- package/affix/index.js +2 -2
- package/alert/Alert.js +4 -5
- package/alert/index.d.ts +3 -0
- package/alert/index.js +2 -2
- package/anchor/Anchor.js +5 -6
- package/anchor/Link.js +1 -2
- package/anchor/context.js +1 -1
- package/anchor/index.d.ts +4 -1
- package/anchor/index.js +2 -2
- package/anchor/utils.js +1 -1
- package/app/App.js +4 -5
- package/app/context.js +1 -1
- package/app/index.js +2 -2
- package/app/useApp.js +1 -1
- package/auto-complete/AutoComplete.js +6 -7
- package/auto-complete/index.d.ts +4 -1
- package/auto-complete/index.js +2 -2
- package/avatar/Avatar.js +1 -2
- package/avatar/Group.js +1 -2
- package/avatar/context.js +1 -1
- package/avatar/index.d.ts +4 -1
- package/avatar/index.js +2 -2
- package/back-top/BackTop.js +5 -6
- package/back-top/index.d.ts +3 -0
- package/back-top/index.js +2 -2
- package/badge/Badge.js +3 -4
- package/badge/Count.js +6 -6
- package/badge/index.d.ts +4 -1
- package/badge/index.js +2 -2
- package/badge/utils.js +1 -1
- package/border-beam/BorderBeam.js +1 -2
- package/border-beam/index.d.ts +3 -0
- package/border-beam/index.js +2 -2
- package/breadcrumb/Breadcrumb.js +1 -2
- package/breadcrumb/Item.js +1 -1
- package/breadcrumb/context.js +1 -1
- package/breadcrumb/index.d.ts +4 -1
- package/breadcrumb/index.js +2 -2
- package/button/Button.js +1 -2
- package/button/Group.js +1 -2
- package/button/Toggle.js +1 -2
- package/button/index.d.ts +4 -1
- package/button/index.js +2 -2
- package/calendar/Calendar.js +1 -2
- package/calendar/Month.js +1 -1
- package/calendar/WeekList.js +1 -1
- package/calendar/Year.js +1 -1
- package/calendar/header/Panel.js +1 -1
- package/calendar/header/index.js +1 -1
- package/calendar/hook/useCellClassName.js +1 -1
- package/calendar/index.d.ts +4 -1
- package/calendar/index.js +2 -2
- package/card/Card.js +1 -2
- package/card/Grid.js +1 -2
- package/card/Meta.js +1 -2
- package/card/index.d.ts +4 -1
- package/card/index.js +2 -2
- package/carousel/Arrow.js +1 -2
- package/carousel/Carousel.js +1 -2
- package/carousel/Indicator.js +1 -2
- package/carousel/index.d.ts +3 -0
- package/carousel/index.js +2 -2
- package/cascader/Cascader.js +1 -2
- package/cascader/base/node.js +1 -1
- package/cascader/base/store.js +1 -1
- package/cascader/hook/useRefCurrent.js +1 -1
- package/cascader/index.d.ts +3 -0
- package/cascader/index.js +2 -2
- package/cascader/panel/List.js +97 -94
- package/cascader/panel/Option.d.ts +1 -0
- package/cascader/panel/Option.js +17 -19
- package/cascader/panel/Search.js +1 -1
- package/cascader/utils.js +1 -1
- package/checkbox/Checkbox.js +7 -8
- package/checkbox/Group.js +1 -2
- package/checkbox/GroupBlock.js +1 -2
- package/checkbox/context.js +1 -1
- package/checkbox/index.d.ts +4 -1
- package/checkbox/index.js +2 -2
- package/checkbox/useCheckbox.js +1 -1
- package/collapse/Collapse.js +1 -2
- package/collapse/Item.js +81 -80
- package/collapse/context.js +1 -1
- package/collapse/index.d.ts +4 -1
- package/collapse/index.js +2 -2
- package/collapse/utils.js +1 -1
- package/color-picker/ColorPicker.js +1 -2
- package/color-picker/ControlBar.d.ts +1 -1
- package/color-picker/ControlBar.js +1 -2
- package/color-picker/InputAlpha.d.ts +1 -1
- package/color-picker/InputAlpha.js +1 -2
- package/color-picker/InputHex.d.ts +1 -1
- package/color-picker/InputHex.js +1 -2
- package/color-picker/InputRgb.d.ts +1 -1
- package/color-picker/InputRgb.js +1 -2
- package/color-picker/Mode.js +1 -1
- package/color-picker/Palette.d.ts +1 -1
- package/color-picker/Palette.js +1 -2
- package/color-picker/Panel.d.ts +1 -1
- package/color-picker/Panel.js +74 -74
- package/color-picker/colors.js +1 -1
- package/color-picker/hooks/useColorPicker.js +1 -1
- package/color-picker/hooks/useControlBlock.js +1 -1
- package/color-picker/index.d.ts +22 -0
- package/color-picker/index.js +2 -2
- package/color-picker/interface.d.ts +2 -2
- package/color-picker/interface.js +1 -1
- package/color-picker/utils.js +1 -1
- package/comment/Comment.js +1 -2
- package/comment/index.d.ts +3 -0
- package/comment/index.js +2 -2
- package/config-provider/ConfigProvider.js +8 -8
- package/config-provider/context.js +1 -1
- package/config-provider/index.d.ts +4 -1
- package/config-provider/index.js +2 -2
- package/config-provider/initUI.d.ts +3 -2
- package/config-provider/initUI.js +4 -4
- package/config-provider/interface.d.ts +4 -4
- package/config-provider/useConfigProvider.js +22 -19
- package/config-provider/utils.js +1 -1
- package/constant/index.js +1 -1
- package/copy/Copy.js +1 -2
- package/copy/index.d.ts +3 -0
- package/copy/index.js +2 -2
- package/countdown/Countdown.js +1 -2
- package/countdown/index.d.ts +3 -0
- package/countdown/index.js +2 -2
- package/countdown/utils.js +1 -1
- package/date-picker/DatePicker.js +1 -1
- package/date-picker/DatePickerRange.js +16 -17
- package/date-picker/Picker.js +241 -242
- package/date-picker/context.js +1 -1
- package/date-picker/hook/useCellClassName.js +1 -2
- package/date-picker/index.d.ts +4 -1
- package/date-picker/index.js +9 -3
- package/date-picker/panel/Body.js +1 -1
- package/date-picker/panel/Footer.js +1 -1
- package/date-picker/panel/Header.js +1 -2
- package/date-picker/panel/Shortcut.js +1 -1
- package/date-picker/panel/WeekList.js +1 -1
- package/date-picker/panel/date/index.js +1 -2
- package/date-picker/panel/month/index.js +1 -2
- package/date-picker/panel/quarter/index.js +1 -2
- package/date-picker/panel/range/index.js +1 -2
- package/date-picker/panel/week/index.js +1 -2
- package/date-picker/panel/year/index.js +1 -2
- package/date-picker/utils.js +1 -1
- package/descriptions/Descriptions.js +1 -2
- package/descriptions/index.d.ts +3 -0
- package/descriptions/index.js +2 -2
- package/details/Details.js +47 -50
- package/details/index.d.ts +3 -0
- package/details/index.js +2 -2
- package/development/Development.js +1 -2
- package/development/index.d.ts +3 -0
- package/development/index.js +2 -2
- package/divider/Divider.js +1 -2
- package/divider/index.d.ts +4 -1
- package/divider/index.js +2 -2
- package/draggable/Draggable.js +1 -2
- package/draggable/Item.js +1 -1
- package/draggable/index.d.ts +4 -1
- package/draggable/index.js +2 -2
- package/draw/Draw.js +1 -2
- package/draw/constant.js +1 -1
- package/draw/index.d.ts +4 -1
- package/draw/index.js +2 -2
- package/drawer/Drawer.js +64 -62
- package/drawer/index.d.ts +5 -0
- package/drawer/index.js +7 -3
- package/drawer/interface.d.ts +14 -3
- package/drawer/use-drawer/Hook.d.ts +7 -0
- package/drawer/use-drawer/Hook.js +44 -0
- package/drawer/use-drawer/index.d.ts +4 -0
- package/drawer/use-drawer/index.js +47 -0
- package/dropdown/Button.js +1 -2
- package/dropdown/Dropdown.js +6 -7
- package/dropdown/index.d.ts +4 -1
- package/dropdown/index.js +2 -2
- package/empty/Empty.js +1 -2
- package/empty/index.d.ts +3 -0
- package/empty/index.js +2 -2
- package/flex/Flex.js +1 -2
- package/flex/index.d.ts +4 -1
- package/flex/index.js +2 -2
- package/form/Control.js +11 -11
- package/form/Form.js +12 -12
- package/form/FormControl.js +40 -41
- package/form/FormItem.js +52 -53
- package/form/FormItemLabel.js +1 -2
- package/form/FormItemTip.js +3 -3
- package/form/FormLabelSymbol.js +1 -2
- package/form/FormList.js +11 -11
- package/form/FormProvider.js +1 -1
- package/form/constant.js +1 -1
- package/form/context.js +1 -1
- package/form/hook/useForm.js +1 -1
- package/form/hook/useFormContext.js +8 -8
- package/form/hook/useFormState.js +7 -7
- package/form/hook/useWatch.js +8 -8
- package/form/index.d.ts +4 -1
- package/form/index.js +2 -2
- package/form/interface.js +1 -1
- package/form/promisify.js +1 -1
- package/form/store.js +1 -1
- package/form/utils.js +1 -1
- package/global-provider/GlobalProvider.js +1 -1
- package/global-provider/context.js +1 -1
- package/global-provider/index.d.ts +4 -1
- package/global-provider/index.js +2 -2
- package/grid/Grid.js +1 -2
- package/grid/Item.js +1 -2
- package/grid/context.js +1 -1
- package/grid/index.d.ts +8 -2
- package/grid/index.js +2 -2
- package/grid/utils.js +1 -1
- package/hooks/index.js +1 -1
- package/hooks/use-breakpoint/index.js +1 -1
- package/hooks/use-computed-state/index.js +1 -1
- package/hooks/use-controllable-value/index.js +1 -1
- package/hooks/use-create/index.js +1 -1
- package/hooks/use-creation/index.js +1 -1
- package/hooks/use-effect-event/index.js +1 -1
- package/hooks/use-event/index.js +1 -1
- package/hooks/use-event-listener/index.js +1 -1
- package/hooks/use-force-update/index.js +1 -1
- package/hooks/use-fullscreen/index.js +1 -1
- package/hooks/use-id/index.js +1 -1
- package/hooks/use-intersection-observer/index.js +1 -1
- package/hooks/use-intersection-observers/index.js +1 -1
- package/hooks/use-interval/index.js +1 -1
- package/hooks/use-is-first-render/index.js +1 -1
- package/hooks/use-isomorphic-layout-effect/index.js +1 -1
- package/hooks/use-keyboard-event/index.js +1 -1
- package/hooks/use-latest/index.js +1 -1
- package/hooks/use-listen-window-resize/index.js +1 -1
- package/hooks/use-media/index.js +1 -1
- package/hooks/use-memoized-fn/index.js +1 -1
- package/hooks/use-merge-props/index.js +1 -1
- package/hooks/use-move/index.js +1 -1
- package/hooks/use-mutation-observers/index.js +1 -1
- package/hooks/use-online-status/index.js +1 -1
- package/hooks/use-overflow-hidden/index.js +1 -1
- package/hooks/use-override-ref/index.js +1 -1
- package/hooks/use-persist-callback/index.js +1 -1
- package/hooks/use-prefers-color-scheme-dark/index.js +1 -1
- package/hooks/use-previous/index.js +1 -1
- package/hooks/use-refs/index.js +1 -1
- package/hooks/use-resize-observer/index.js +1 -1
- package/hooks/use-resize-observers/index.js +1 -1
- package/hooks/use-responsive-state/index.js +1 -1
- package/hooks/use-set-state/index.js +1 -1
- package/hooks/use-state-callback/index.js +1 -1
- package/hooks/use-state-with-promise/index.js +1 -1
- package/hooks/use-update-effect/index.js +1 -1
- package/hooks/use-update-layout-effect/index.js +1 -1
- package/hooks/use-verification-code/index.js +1 -1
- package/hooks/use-watch/index.js +1 -1
- package/hooks/use-watermark/index.js +1 -1
- package/hooks/use-watermark/utils.js +1 -1
- package/hooks/use-window-size/index.js +1 -1
- package/hooks/useUnmountOnExit.js +1 -1
- package/icon/Icon.js +1 -2
- package/icon/addIconFromCdn.js +1 -1
- package/icon/index.js +2 -2
- package/icon-hover/IconHover.js +22 -23
- package/icon-hover/index.d.ts +3 -0
- package/icon-hover/index.js +2 -2
- package/icons/file/File.js +1 -2
- package/icons/file/index.js +1 -1
- package/icons/file/style/index.d.ts +2 -0
- package/icons.js +1 -1
- package/image/Image.js +8 -9
- package/image/ImageFooter.js +8 -8
- package/image/ImagePreview.js +26 -26
- package/image/ImagePreviewArrow.js +1 -2
- package/image/ImagePreviewGroup.js +1 -1
- package/image/ImagePreviewToolbar.js +1 -1
- package/image/TriggerForToolbar.js +1 -1
- package/image/context.js +1 -1
- package/image/{utils/hook → hook}/useImageStatus.js +2 -2
- package/image/{utils/hook → hook}/useShowFooter.d.ts +1 -1
- package/image/{utils/hook → hook}/useShowFooter.js +2 -2
- package/image/index.d.ts +4 -1
- package/image/index.js +2 -2
- package/image/utils/getFixTranslate.js +1 -1
- package/image/utils/getScale.js +1 -1
- package/index.js +656 -698
- package/input/Button.js +1 -2
- package/input/Group.js +1 -2
- package/input/Input.js +1 -2
- package/input/InputComponent.js +14 -14
- package/input/Password.js +5 -6
- package/input/Search.js +5 -6
- package/input/Textarea.js +15 -16
- package/input/autoSizeTextareaHeight.js +1 -1
- package/input/constants.js +1 -1
- package/input/index.d.ts +10 -1
- package/input/index.js +6 -3
- package/input/useComposition.js +1 -1
- package/input/utils.js +1 -1
- package/input-number/InputNumber.js +6 -7
- package/input-number/decimal.js +1 -1
- package/input-number/index.d.ts +3 -0
- package/input-number/index.js +2 -2
- package/input-number/useSelectionRange.js +1 -1
- package/input-number/utils.js +1 -1
- package/input-tag/InputTag.js +10 -11
- package/input-tag/constant.js +1 -1
- package/input-tag/hook/useComputeAutoWidthDelay.js +1 -1
- package/input-tag/index.d.ts +3 -0
- package/input-tag/index.js +2 -2
- package/layout/Content.js +1 -2
- package/layout/Footer.js +1 -2
- package/layout/Header.js +1 -2
- package/layout/Layout.js +1 -2
- package/layout/Sider.js +5 -6
- package/layout/context.js +1 -1
- package/layout/index.d.ts +4 -1
- package/layout/index.js +2 -2
- package/link/Link.js +1 -2
- package/link/index.d.ts +3 -0
- package/link/index.js +2 -2
- package/liquid-fill/LiquidFill.js +62 -62
- package/liquid-fill/index.d.ts +3 -0
- package/liquid-fill/index.js +2 -2
- package/liquid-fill/interface.d.ts +0 -4
- package/list/Item.js +1 -2
- package/list/List.d.ts +2 -9
- package/list/List.js +1 -3
- package/list/Meta.js +1 -2
- package/list/index.d.ts +14 -0
- package/list/index.js +2 -2
- package/loading/Loading.js +27 -27
- package/loading/index.d.ts +3 -0
- package/loading/index.js +2 -2
- package/locale/ar-EG.js +1 -1
- package/locale/de-DE.js +1 -1
- package/locale/default.js +1 -1
- package/locale/en-US.js +1 -1
- package/locale/es-ES.js +1 -1
- package/locale/fr-FR.js +1 -1
- package/locale/id-ID.js +1 -1
- package/locale/it-IT.js +1 -1
- package/locale/ja-JP.js +1 -1
- package/locale/ko-KR.js +1 -1
- package/locale/ms-MY.js +1 -1
- package/locale/pt-BR.js +1 -1
- package/locale/pt-PT.js +1 -1
- package/locale/ru-RU.js +1 -1
- package/locale/th-TH.js +1 -1
- package/locale/tr-TR.js +1 -1
- package/locale/vi-VN.js +1 -1
- package/locale/zh-CN.js +1 -1
- package/locale/zh-HK.js +1 -1
- package/locale/zh-TW.js +1 -1
- package/marquee/Marquee.js +1 -2
- package/marquee/index.d.ts +3 -0
- package/marquee/index.js +2 -2
- package/mask/Mask.js +5 -6
- package/mask/constant.d.ts +2 -3
- package/mask/constant.js +6 -6
- package/mask/index.d.ts +3 -0
- package/mask/index.js +2 -2
- package/mask/interface.d.ts +1 -1
- package/masonry/Masonry.d.ts +3 -3
- package/masonry/Masonry.js +4 -8
- package/masonry/MasonryItem.js +1 -1
- package/masonry/hooks/useDelay.js +1 -1
- package/masonry/hooks/useGutter.js +1 -1
- package/masonry/hooks/usePositions.js +1 -1
- package/masonry/hooks/useRefs.js +1 -1
- package/masonry/index.d.ts +7 -4
- package/masonry/index.js +2 -2
- package/masonry/interface.d.ts +0 -4
- package/mentions/Mentions.js +1 -2
- package/mentions/index.d.ts +3 -0
- package/mentions/index.js +2 -2
- package/mentions/utils.js +1 -1
- package/menu/Indent.js +1 -1
- package/menu/Item.js +1 -1
- package/menu/ItemGroup.js +1 -1
- package/menu/Menu.js +1 -2
- package/menu/OverflowWrap.js +12 -12
- package/menu/context.js +1 -1
- package/menu/index.d.ts +4 -1
- package/menu/index.js +2 -2
- package/menu/sub-menu/Inline.js +6 -6
- package/menu/sub-menu/Pop.js +1 -2
- package/menu/sub-menu/index.js +1 -1
- package/menu/utils.js +1 -1
- package/message/Message.d.ts +3 -3
- package/message/Message.js +61 -61
- package/message/config.d.ts +3 -0
- package/message/config.js +15 -0
- package/message/constants.js +2 -3
- package/message/index.d.ts +7 -3
- package/message/index.js +8 -7
- package/message/interface.d.ts +3 -4
- package/message/useMessage.js +13 -13
- package/message/utils.d.ts +0 -0
- package/message/utils.js +2 -0
- package/modal/Modal.d.ts +3 -18
- package/modal/Modal.js +104 -96
- package/modal/config.d.ts +3 -5
- package/modal/config.js +4 -15
- package/modal/{Confirm.js → confirm.js} +39 -43
- package/modal/constants.d.ts +1 -0
- package/modal/constants.js +11 -0
- package/modal/index.d.ts +9 -2
- package/modal/index.js +11 -5
- package/modal/interface.d.ts +13 -2
- package/modal/use-modal/Hook.d.ts +1 -1
- package/modal/use-modal/Hook.js +27 -29
- package/modal/use-modal/index.js +40 -43
- package/modal/utils.d.ts +1 -0
- package/modal/utils.js +12 -0
- package/notice/Notice.js +33 -33
- package/notice/config.d.ts +3 -0
- package/notice/config.js +7 -0
- package/notice/constants.d.ts +1 -0
- package/notice/constants.js +10 -3
- package/notice/index.d.ts +6 -2
- package/notice/index.js +5 -4
- package/notice/interface.d.ts +3 -2
- package/notice/utils.js +1 -1
- package/notice/withNotice.d.ts +2 -1
- package/notice/withNotice.js +11 -11
- package/notification/Notification.d.ts +3 -16
- package/notification/Notification.js +84 -77
- package/notification/config.d.ts +4 -0
- package/notification/config.js +11 -0
- package/notification/constants.js +4 -11
- package/notification/index.d.ts +13 -0
- package/notification/index.js +9 -5
- package/notification/interface.d.ts +12 -0
- package/notification/useNotification.js +16 -16
- package/notification/utils.d.ts +0 -4
- package/notification/utils.js +1 -15
- package/overflow-ellipsis/OverflowEllipsis.js +1 -2
- package/overflow-ellipsis/OverflowItem.js +1 -2
- package/overflow-ellipsis/index.d.ts +3 -0
- package/overflow-ellipsis/index.js +2 -2
- package/package.json +1 -1
- package/page-header/PageHeader.js +5 -6
- package/page-header/index.d.ts +3 -0
- package/page-header/index.js +2 -2
- package/pagination/PageItem.js +1 -2
- package/pagination/PageJumper.js +1 -2
- package/pagination/PageOption.js +1 -2
- package/pagination/Pagination.js +1 -2
- package/pagination/index.d.ts +3 -0
- package/pagination/index.js +2 -2
- package/pagination/interface.js +1 -1
- package/picker/Input.js +8 -9
- package/picker/InputRange.js +14 -15
- package/picker/index.d.ts +4 -1
- package/picker/index.js +2 -2
- package/popconfirm/Popconfirm.js +1 -2
- package/popconfirm/index.d.ts +3 -0
- package/popconfirm/index.js +2 -2
- package/popover/Popover.js +1 -2
- package/popover/index.d.ts +3 -0
- package/popover/index.js +2 -2
- package/portal/Portal.js +1 -2
- package/portal/index.d.ts +3 -0
- package/portal/index.js +2 -2
- package/progress/CircleProgress.js +1 -1
- package/progress/LineProgess.js +1 -1
- package/progress/Progress.js +1 -2
- package/progress/StepProgress.js +1 -1
- package/progress/index.d.ts +7 -1
- package/progress/index.js +2 -2
- package/qr-code/QRCode.js +13 -13
- package/qr-code/index.d.ts +4 -1
- package/qr-code/index.js +2 -2
- package/qr-code/interface.d.ts +0 -1
- package/qr-code/src/index.js +1 -1
- package/qr-code/src/qrcodegen.js +1 -1
- package/radio/Group.js +1 -2
- package/radio/GroupBlock.js +1 -2
- package/radio/Radio.js +5 -6
- package/radio/context.js +1 -1
- package/radio/index.d.ts +4 -1
- package/radio/index.js +2 -2
- package/rate/Rate.js +5 -6
- package/rate/index.d.ts +3 -0
- package/rate/index.js +2 -2
- package/resize-box/ResizeBox.js +1 -2
- package/resize-box/ResizeTrigger.js +1 -2
- package/resize-box/Split.js +1 -2
- package/resize-box/SplitGroup.js +1 -2
- package/resize-box/index.d.ts +4 -1
- package/resize-box/index.js +2 -2
- package/result/403.js +1 -1
- package/result/404.js +1 -1
- package/result/500.js +1 -1
- package/result/Result.js +1 -2
- package/result/index.d.ts +3 -0
- package/result/index.js +2 -2
- package/rich-text/RichText.js +11 -11
- package/rich-text/Toolbar.js +165 -166
- package/rich-text/constant.js +1 -1
- package/rich-text/index.d.ts +4 -1
- package/rich-text/index.js +2 -5
- package/rich-text/lib/blots/block.js +1 -1
- package/rich-text/lib/blots/break.js +1 -1
- package/rich-text/lib/blots/container.js +1 -1
- package/rich-text/lib/blots/cursor.js +1 -1
- package/rich-text/lib/blots/embed.js +1 -1
- package/rich-text/lib/blots/inline.js +1 -1
- package/rich-text/lib/blots/scroll.js +1 -1
- package/rich-text/lib/blots/text.js +1 -1
- package/rich-text/lib/core/composition.js +1 -1
- package/rich-text/lib/core/editor.js +1 -1
- package/rich-text/lib/core/emitter.js +1 -1
- package/rich-text/lib/core/logger.js +1 -1
- package/rich-text/lib/core/module.js +1 -1
- package/rich-text/lib/core/rich.js +1 -1
- package/rich-text/lib/core/selection.js +1 -1
- package/rich-text/lib/core/theme.js +1 -1
- package/rich-text/lib/core/utils/createRegistryWithFormats.js +1 -1
- package/rich-text/lib/core/utils/scrollRectIntoView.js +1 -1
- package/rich-text/lib/delta/AttributeMap.js +1 -1
- package/rich-text/lib/delta/Op.js +1 -1
- package/rich-text/lib/delta/OpIterator.js +1 -1
- package/rich-text/lib/delta/index.js +1 -1
- package/rich-text/lib/diff/index.js +1 -1
- package/rich-text/lib/formats/align.js +1 -1
- package/rich-text/lib/formats/background.js +1 -1
- package/rich-text/lib/formats/blockquote.js +1 -1
- package/rich-text/lib/formats/bold.js +1 -1
- package/rich-text/lib/formats/code.js +1 -1
- package/rich-text/lib/formats/color.js +1 -1
- package/rich-text/lib/formats/direction.js +1 -1
- package/rich-text/lib/formats/emoji.js +1 -1
- package/rich-text/lib/formats/font.js +1 -1
- package/rich-text/lib/formats/formula.js +1 -1
- package/rich-text/lib/formats/header.js +1 -1
- package/rich-text/lib/formats/hr.js +1 -1
- package/rich-text/lib/formats/image.js +1 -1
- package/rich-text/lib/formats/indent.js +1 -1
- package/rich-text/lib/formats/italic.js +1 -1
- package/rich-text/lib/formats/lineHeight.js +1 -1
- package/rich-text/lib/formats/link.js +1 -1
- package/rich-text/lib/formats/list.js +1 -1
- package/rich-text/lib/formats/script.js +1 -1
- package/rich-text/lib/formats/size.js +1 -1
- package/rich-text/lib/formats/strike.js +1 -1
- package/rich-text/lib/formats/table.js +1 -1
- package/rich-text/lib/formats/underline.js +1 -1
- package/rich-text/lib/formats/video.js +1 -1
- package/rich-text/lib/index.js +1 -1
- package/rich-text/lib/modules/clipboard.js +1 -1
- package/rich-text/lib/modules/history.js +1 -1
- package/rich-text/lib/modules/image-resize/index.js +1 -1
- package/rich-text/lib/modules/image-resize/modules/Base.js +1 -1
- package/rich-text/lib/modules/image-resize/modules/DisplaySize.js +1 -1
- package/rich-text/lib/modules/image-resize/modules/Resize.js +1 -1
- package/rich-text/lib/modules/image-resize/options.js +1 -1
- package/rich-text/lib/modules/input.js +1 -1
- package/rich-text/lib/modules/keyboard.js +1 -1
- package/rich-text/lib/modules/normalizeExternalHTML/index.js +1 -1
- package/rich-text/lib/modules/normalizeExternalHTML/normalizers/googleDocs.js +1 -1
- package/rich-text/lib/modules/normalizeExternalHTML/normalizers/msWord.js +1 -1
- package/rich-text/lib/modules/table.js +1 -1
- package/rich-text/lib/modules/toolbar.js +1 -1
- package/rich-text/lib/modules/uiNode.js +1 -1
- package/rich-text/lib/modules/uploader.js +1 -1
- package/rich-text/lib/parchment/attributor/attributor.js +1 -1
- package/rich-text/lib/parchment/attributor/class.js +1 -1
- package/rich-text/lib/parchment/attributor/store.js +1 -1
- package/rich-text/lib/parchment/attributor/style.js +1 -1
- package/rich-text/lib/parchment/blot/abstract/container.js +1 -1
- package/rich-text/lib/parchment/blot/abstract/leaf.js +1 -1
- package/rich-text/lib/parchment/blot/abstract/parent.js +1 -1
- package/rich-text/lib/parchment/blot/abstract/shadow.js +1 -1
- package/rich-text/lib/parchment/blot/block.js +1 -1
- package/rich-text/lib/parchment/blot/embed.js +1 -1
- package/rich-text/lib/parchment/blot/inline.js +1 -1
- package/rich-text/lib/parchment/blot/scroll.js +1 -1
- package/rich-text/lib/parchment/blot/text.js +1 -1
- package/rich-text/lib/parchment/collection/linked-list.js +1 -1
- package/rich-text/lib/parchment/error.js +1 -1
- package/rich-text/lib/parchment/index.js +1 -1
- package/rich-text/lib/parchment/registry.js +1 -1
- package/rich-text/lib/parchment/scope.js +1 -1
- package/row-col/Col-.js +1 -2
- package/row-col/Col.js +1 -2
- package/row-col/Row.js +1 -2
- package/row-col/context.js +1 -1
- package/row-col/index.d.ts +4 -1
- package/row-col/index.js +2 -2
- package/segmented/Segmented.js +81 -81
- package/segmented/index.d.ts +3 -0
- package/segmented/index.js +2 -2
- package/select/Option.js +1 -1
- package/select/OptionGroup.js +1 -1
- package/select/Select.js +13 -14
- package/select/index.d.ts +4 -1
- package/select/index.js +2 -2
- package/select/utils.js +1 -1
- package/select-view/Core.js +10 -11
- package/select-view/SelectView.js +1 -1
- package/select-view/index.d.ts +3 -0
- package/select-view/index.js +2 -2
- package/skeleton/Image.js +1 -1
- package/skeleton/Skeleton.js +1 -2
- package/skeleton/Text.js +1 -1
- package/skeleton/index.d.ts +4 -1
- package/skeleton/index.js +2 -2
- package/slider/Button.d.ts +1 -1
- package/slider/Button.js +1 -2
- package/slider/Dot.d.ts +2 -2
- package/slider/Dot.js +1 -1
- package/slider/Input.d.ts +1 -1
- package/slider/Input.js +1 -1
- package/slider/Mark.d.ts +4 -4
- package/slider/Mark.js +1 -1
- package/slider/Slider.js +5 -6
- package/slider/Tick.d.ts +1 -1
- package/slider/Tick.js +1 -1
- package/slider/hook/useInterval.js +1 -1
- package/slider/hook/useLegalValue.js +1 -1
- package/slider/index.d.ts +14 -0
- package/slider/index.js +2 -2
- package/slider/utils.js +1 -1
- package/space/Space.js +1 -2
- package/space/index.d.ts +4 -1
- package/space/index.js +2 -2
- package/speech-synthesis/SpeechSynthesis.js +1 -1
- package/speech-synthesis/index.d.ts +3 -0
- package/speech-synthesis/index.js +2 -2
- package/spin/DotLoading.js +1 -2
- package/spin/Spin.js +1 -2
- package/spin/index.d.ts +4 -1
- package/spin/index.js +2 -2
- package/splitter/Panel.js +1 -2
- package/splitter/SplitBar.js +1 -2
- package/splitter/Splitter.js +1 -2
- package/splitter/hooks/useItems.js +1 -1
- package/splitter/hooks/useResizable.js +1 -1
- package/splitter/hooks/useResize.js +1 -1
- package/splitter/hooks/useSizes.js +1 -1
- package/splitter/index.d.ts +4 -1
- package/splitter/index.js +2 -2
- package/statistic/Statistic.js +1 -2
- package/statistic/index.d.ts +7 -1
- package/statistic/index.js +2 -2
- package/statistic/interface.js +1 -1
- package/steps/Step.js +1 -1
- package/steps/Steps.js +1 -2
- package/steps/index.d.ts +4 -1
- package/steps/index.js +2 -2
- package/steps/interface.d.ts +1 -1
- package/style/animation/fade.less +5 -5
- package/style/animation/slide.less +7 -7
- package/style/animation/zoom.less +28 -28
- package/style/global.less +3 -3
- package/style/index.less +3 -4
- package/style/normalize.less +2 -2
- package/style/override.less +0 -1
- package/style/token.less +1 -0
- package/style.css +1 -1
- package/suspense-fallback-test/SuspenseFallbackTest.js +1 -1
- package/suspense-fallback-test/index.d.ts +6 -0
- package/suspense-fallback-test/index.js +2 -2
- package/switch/Switch.js +5 -6
- package/switch/index.d.ts +4 -1
- package/switch/index.js +2 -2
- package/table/ColGroup.js +1 -1
- package/table/Table.js +1 -2
- package/table/constant.js +1 -1
- package/table/context.d.ts +1 -2
- package/table/context.js +1 -1
- package/table/hook/useColumns.js +1 -1
- package/table/hook/useComponent.js +1 -1
- package/table/hook/useExpand.js +1 -1
- package/table/hook/useRowSelection.js +1 -1
- package/table/hook/useSorter.js +1 -1
- package/table/hook/useStickyClassNames.js +1 -1
- package/table/hook/useStickyOffsets.js +1 -1
- package/table/hook/useThResizable.js +1 -1
- package/table/index.d.ts +44 -0
- package/table/index.js +2 -2
- package/table/summary/Cell.js +1 -2
- package/table/summary/Row.js +1 -2
- package/table/summary/context.d.ts +1 -2
- package/table/summary/context.js +1 -1
- package/table/summary/index.js +1 -1
- package/table/tbody/DataRecordRenderer.js +1 -1
- package/table/tbody/Td.js +1 -2
- package/table/tbody/Tr.js +1 -2
- package/table/tbody/index.js +1 -1
- package/table/tfoot/index.js +1 -1
- package/table/th-resizable/index.js +1 -2
- package/table/thead/Column.js +1 -2
- package/table/thead/index.js +1 -2
- package/table/utils.js +1 -1
- package/tabs/TabContent.js +1 -2
- package/tabs/TabPane.js +1 -2
- package/tabs/Tabs.js +1 -2
- package/tabs/context.js +1 -1
- package/tabs/hook/useDomSize.js +1 -1
- package/tabs/hook/useHeaderScroll.js +1 -1
- package/tabs/index.d.ts +4 -1
- package/tabs/index.js +2 -2
- package/tabs/tab-header/DropdownIcon.js +1 -1
- package/tabs/tab-header/TabInk.js +2 -2
- package/tabs/tab-header/TabNavIcon.js +1 -1
- package/tabs/tab-header/TabTitle.js +1 -1
- package/tabs/tab-header/index.js +12 -13
- package/tabs/utils.js +1 -1
- package/tag/Tag.js +1 -2
- package/tag/index.d.ts +3 -0
- package/tag/index.js +2 -2
- package/tag/utils.js +1 -1
- package/time-picker/Picker.js +19 -20
- package/time-picker/TimeColumn.js +1 -1
- package/time-picker/TimePicker.js +1 -2
- package/time-picker/TimePickerRange.js +7 -7
- package/time-picker/context.js +1 -1
- package/time-picker/index.js +2 -2
- package/time-picker/utils.js +1 -1
- package/time-picker/withTimePicker.js +1 -1
- package/timeline/Item.js +1 -2
- package/timeline/Timeline.js +1 -2
- package/timeline/index.d.ts +4 -1
- package/timeline/index.js +2 -2
- package/timer/Timer.js +1 -2
- package/timer/index.d.ts +3 -0
- package/timer/index.js +2 -2
- package/toast/Toast.d.ts +5 -2
- package/toast/Toast.js +1 -1
- package/toast/index.d.ts +9 -3
- package/toast/index.js +2 -2
- package/tooltip/Tooltip.js +1 -2
- package/tooltip/index.d.ts +3 -0
- package/tooltip/index.js +2 -2
- package/tour/Tour.js +93 -93
- package/tour/index.d.ts +3 -0
- package/tour/index.js +2 -2
- package/transfer/Item.js +1 -1
- package/transfer/List.js +1 -2
- package/transfer/Transfer.js +1 -2
- package/transfer/index.d.ts +3 -0
- package/transfer/index.js +2 -2
- package/transition/index.d.ts +1 -3
- package/transition/index.js +7 -5
- package/tree/Animation.d.ts +3 -3
- package/tree/Animation.js +87 -63
- package/tree/Node.js +103 -115
- package/tree/NodeList.js +46 -45
- package/tree/Tree.d.ts +1 -1
- package/tree/Tree.js +159 -158
- package/tree/context.js +1 -1
- package/tree/index.d.ts +42 -0
- package/tree/index.js +10 -12
- package/tree/interface.d.ts +1 -0
- package/tree/utils.js +1 -1
- package/tree-select/List.js +1 -1
- package/tree-select/TreeSelect.js +4 -5
- package/tree-select/hook/useKeyCache.js +1 -2
- package/tree-select/hook/useStateValue.js +1 -1
- package/tree-select/hook/useTreeData.js +1 -1
- package/tree-select/index.d.ts +4 -1
- package/tree-select/index.js +2 -2
- package/tree-select/utils.js +1 -1
- package/trigger/Trigger.js +17 -18
- package/trigger/getPopupStyle.js +1 -1
- package/trigger/index.d.ts +3 -0
- package/trigger/index.js +2 -2
- package/trigger/utils.js +1 -1
- package/typography/Base.js +28 -29
- package/typography/EditContent.js +1 -1
- package/typography/Ellipsis.js +2 -3
- package/typography/Operations.js +1 -1
- package/typography/Paragraph.js +1 -2
- package/typography/Text.js +1 -1
- package/typography/Title.js +1 -1
- package/typography/Typography.js +1 -2
- package/typography/index.d.ts +4 -1
- package/typography/index.js +2 -2
- package/typography/useCssEllipsis.js +1 -1
- package/typography/useEllipsis.js +2 -2
- package/upload/TriggerNode.js +1 -2
- package/upload/Upload.js +11 -12
- package/upload/Uploader.js +1 -2
- package/upload/constant.js +1 -1
- package/upload/index.d.ts +4 -1
- package/upload/index.js +2 -2
- package/upload/list/PictureItem.d.ts +1 -1
- package/upload/list/PictureItem.js +5 -5
- package/upload/list/TextItem.d.ts +1 -1
- package/upload/list/TextItem.js +7 -7
- package/upload/list/UploadProgress.js +1 -2
- package/upload/list/index.js +1 -2
- package/upload/list/utils.js +1 -1
- package/upload/request.js +1 -1
- package/upload/utils.js +1 -1
- package/utils/callOrReturn.js +1 -1
- package/utils/callbackOriginRef.js +1 -1
- package/utils/caseName.js +1 -1
- package/utils/className.js +1 -1
- package/utils/constant.js +1 -1
- package/utils/contextHolder.d.ts +1 -1
- package/utils/contextHolder.js +2 -3
- package/utils/copy.js +1 -1
- package/utils/createGlobalConfigFunction.d.ts +5 -0
- package/utils/createGlobalConfigFunction.js +19 -0
- package/utils/css.d.ts +1 -0
- package/utils/css.js +10 -0
- package/utils/date.js +1 -1
- package/utils/dayjs.js +1 -1
- package/utils/dom.js +1 -1
- package/utils/emitter.js +1 -1
- package/utils/file.js +1 -1
- package/utils/fileRead.js +1 -1
- package/utils/fileToDataURL.js +1 -1
- package/utils/fillNBSP.js +1 -1
- package/utils/findRootElement.js +1 -1
- package/utils/findScrollParent.js +1 -1
- package/utils/getHighlightText.js +1 -1
- package/utils/getHotkeyHandler.js +1 -1
- package/utils/getScrollBarHeight.js +1 -1
- package/utils/getScrollBarSize.js +1 -1
- package/utils/getScrollBarWidth.js +1 -1
- package/utils/getStringLength.js +1 -1
- package/utils/include.js +1 -1
- package/utils/index.d.ts +2 -1
- package/utils/index.js +174 -172
- package/utils/intersectionObserver.js +1 -1
- package/utils/is.js +1 -1
- package/utils/keyboardCode.js +1 -1
- package/utils/lodash.js +70 -4
- package/utils/math.js +1 -1
- package/utils/mergeProps.js +1 -1
- package/utils/mergedToString.js +1 -1
- package/utils/mutationObserver.js +1 -1
- package/utils/names.js +1 -1
- package/utils/object.js +1 -1
- package/utils/omit.js +1 -1
- package/utils/pad.js +1 -1
- package/utils/pick.js +1 -1
- package/utils/pinyin.js +1 -1
- package/utils/react19Adapter.js +1 -1
- package/utils/ref.js +1 -1
- package/utils/resizeObserver.js +1 -1
- package/utils/responsiveObserve.js +1 -1
- package/utils/saveAs.js +1 -1
- package/utils/screenfull.js +1 -1
- package/utils/scrollIntoViewIfNeeded.js +1 -1
- package/utils/setCreateRoot.js +1 -1
- package/utils/setDarkTheme.js +1 -1
- package/utils/setPrimaryColor.js +1 -1
- package/utils/setTheme.js +1 -1
- package/utils/string.js +1 -1
- package/utils/style.js +1 -1
- package/utils/throttleByRequestAnimationFrame.d.ts +1 -0
- package/utils/throttleByRequestAnimationFrame.js +4 -0
- package/utils/tinycolor.js +1 -1
- package/utils/toArray.js +1 -1
- package/utils/tree.js +1 -1
- package/utils/tween.js +1 -1
- package/utils/uuid.js +1 -1
- package/utils/validate.js +1 -1
- package/utils/warning.js +1 -1
- package/verification-code/VerificationCode.js +1 -2
- package/verification-code/index.d.ts +4 -1
- package/verification-code/index.js +2 -2
- package/version/index.js +8 -8
- package/virtual-list/Filler.d.ts +1 -1
- package/virtual-list/Filler.js +1 -1
- package/virtual-list/VirtualList.js +171 -171
- package/virtual-list/constant.js +1 -1
- package/virtual-list/hook/useCacheChildrenNodes.js +1 -1
- package/virtual-list/hook/useComputeVirtualItemHeight.js +1 -1
- package/virtual-list/index.d.ts +10 -0
- package/virtual-list/index.js +2 -2
- package/virtual-list/utils/algorithm.js +1 -1
- package/virtual-list/utils/item.js +1 -1
- package/watermark/Watermark.js +1 -2
- package/watermark/index.d.ts +4 -1
- package/watermark/index.js +2 -2
- package/utils/throttleByRaf.d.ts +0 -1
- package/utils/throttleByRaf.js +0 -4
- package/utils/throttleByRaf2.d.ts +0 -1
- package/utils/throttleByRaf2.js +0 -4
- /package/image/{utils/hook → hook}/useImageStatus.d.ts +0 -0
- /package/modal/{Confirm.d.ts → confirm.d.ts} +0 -0
package/tree/Tree.js
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
/* 潘启宝 2026-05-
|
|
1
|
+
/* 潘启宝 2026-05-26 15:50:14 星期二 山东省济南市 */
|
|
2
2
|
import { isArray as e, isArrayAndNotEmpty as t, isEqualWith as n, isFunction as r, isNumber as i, isUndefined as a } from "../utils/is.js";
|
|
3
3
|
import o from "../utils/className.js";
|
|
4
4
|
import { pickDataAttributes as s } from "../utils/pick.js";
|
|
5
5
|
import { TREE_COMPONENT_INFO as c } from "../utils/names.js";
|
|
6
6
|
import l from "../hooks/use-merge-props/index.js";
|
|
7
7
|
import u from "../config-provider/context.js";
|
|
8
|
-
import "../
|
|
8
|
+
import { lodash_exports as ee } from "../utils/lodash.js";
|
|
9
|
+
import te from "../hooks/use-memoized-fn/index.js";
|
|
9
10
|
import { CHILDREN_NAME as d } from "../constant/index.js";
|
|
10
|
-
import { TreeContext as
|
|
11
|
+
import { TreeContext as ne } from "./context.js";
|
|
11
12
|
import f from "./Node.js";
|
|
12
|
-
import
|
|
13
|
-
import { getAllCheckedKeysByCheck as
|
|
14
|
-
import { createElement as
|
|
15
|
-
import { jsx as
|
|
16
|
-
import
|
|
17
|
-
import
|
|
13
|
+
import re from "./NodeList.js";
|
|
14
|
+
import { getAllCheckedKeysByCheck as ie, getCheckedKeysByInitKeys as ae, getTreeDataFromTreeChildren as oe } from "./utils.js";
|
|
15
|
+
import { createElement as se, forwardRef as ce, useCallback as p, useContext as le, useEffect as ue, useImperativeHandle as de, useMemo as m, useRef as h, useState as g } from "react";
|
|
16
|
+
import { jsx as fe } from "react/jsx-runtime";
|
|
17
|
+
import _ from "lodash/get";
|
|
18
|
+
import v from "lodash/has";
|
|
18
19
|
//#region components/pc/tree/Tree.tsx
|
|
19
|
-
var
|
|
20
|
+
var pe = {
|
|
20
21
|
key: "key",
|
|
21
22
|
title: "title",
|
|
22
23
|
children: d,
|
|
@@ -25,88 +26,88 @@ var ue = {
|
|
|
25
26
|
disableCheckbox: "disableCheckbox",
|
|
26
27
|
checkable: "checkable",
|
|
27
28
|
isLeaf: "isLeaf"
|
|
28
|
-
},
|
|
29
|
+
}, me = {
|
|
29
30
|
selectable: !0,
|
|
30
31
|
autoExpandParent: !0,
|
|
31
32
|
checkedStrategy: "all",
|
|
32
33
|
actionOnClick: "select",
|
|
33
34
|
allowDrop: () => !0,
|
|
34
|
-
fieldNames:
|
|
35
|
+
fieldNames: pe,
|
|
35
36
|
animation: !0
|
|
36
37
|
};
|
|
37
|
-
function
|
|
38
|
-
let { getPrefixCls:
|
|
38
|
+
function he(c, d) {
|
|
39
|
+
let { getPrefixCls: ce, componentConfig: he, rtl: y } = le(u), ge = l(c, me, he?.Tree), b = "selectedKeys" in c, x = "checkedKeys" in c, S = "halfCheckedKeys" in c, _e = "expandedKeys" in c, C = "treeData" in c, { ___PqbAdapterMode___: ve, className: ye, showLine: be, size: xe, virtualListProps: w, height: T, style: Se, icons: Ce, actionOnClick: we, animation: E, checkedStrategy: Te, autoExpandParent: Ee, allowDrop: D, selectable: De, fieldNames: Oe, blockNode: ke, expandedKeys: O, defaultExpandedKeys: Ae, selectedKeys: k, defaultSelectedKeys: je, checkedKeys: A, defaultCheckedKeys: Me, treeData: Ne, children: j, checkStrictly: M, halfCheckedKeys: Pe, renderExtra: Fe, renderTitle: Ie, checkable: N, draggable: Le, multiple: Re, loadMore: P, filterNode: ze, onMouseDown: Be, onExpand: Ve, onSelect: He, onNodeSelect: Ue, onCheck: We, onNodeCheck: Ge, onDragStart: Ke, onDragEnd: qe, onDragOver: Je, onDragLeave: Ye, onDrop: Xe, maxLevel: F } = ge, I = ce?.("tree"), Ze = m(() => C ? Ne : oe(j), [
|
|
39
40
|
j,
|
|
40
41
|
C,
|
|
41
|
-
|
|
42
|
-
]), L =
|
|
42
|
+
Ne
|
|
43
|
+
]), L = p((e) => {
|
|
43
44
|
let t = {
|
|
44
|
-
...
|
|
45
|
-
...C ?
|
|
45
|
+
...pe,
|
|
46
|
+
...C ? Oe : {}
|
|
46
47
|
}, n = {
|
|
47
|
-
children:
|
|
48
|
-
selectable:
|
|
49
|
-
checkable:
|
|
50
|
-
title:
|
|
51
|
-
disabled:
|
|
52
|
-
disableCheckbox:
|
|
53
|
-
isLeaf:
|
|
54
|
-
key:
|
|
48
|
+
children: v(e, t.children) ? _(e, t.children) : j,
|
|
49
|
+
selectable: v(e, t.selectable) ? _(e, t.selectable) : De,
|
|
50
|
+
checkable: v(e, t.checkable) ? _(e, t.checkable) : N,
|
|
51
|
+
title: _(e, t.title),
|
|
52
|
+
disabled: _(e, t.disabled),
|
|
53
|
+
disableCheckbox: _(e, t.disableCheckbox),
|
|
54
|
+
isLeaf: _(e, t.isLeaf),
|
|
55
|
+
key: _(e, t.key)
|
|
55
56
|
};
|
|
56
|
-
return
|
|
57
|
+
return v(e, t.key) ? n.key = _(e, t.key) : delete n.key, n;
|
|
57
58
|
}, [
|
|
58
59
|
N,
|
|
59
60
|
j,
|
|
60
|
-
|
|
61
|
+
Oe,
|
|
61
62
|
C,
|
|
62
|
-
|
|
63
|
+
De
|
|
63
64
|
]);
|
|
64
65
|
function R(e) {
|
|
65
66
|
return i(F) && i(e) && e > F - 1;
|
|
66
67
|
}
|
|
67
|
-
let
|
|
68
|
+
let Qe = p((e) => {
|
|
68
69
|
B.current = {};
|
|
69
70
|
let n = [], r = 0, i = (e, a) => {
|
|
70
71
|
let s = R(a._level), c = e.length;
|
|
71
72
|
return e.map((e, l) => {
|
|
72
|
-
let { children: u, selectable:
|
|
73
|
+
let { children: u, selectable: ee, checkable: te, key: d = `${a?._key || ""}-${l}`, ...ne } = L(e), f = {
|
|
73
74
|
dataRef: e,
|
|
74
|
-
draggable:
|
|
75
|
-
selectable:
|
|
76
|
-
checkable:
|
|
77
|
-
showLine:
|
|
78
|
-
blockNode:
|
|
75
|
+
draggable: Le,
|
|
76
|
+
selectable: ee,
|
|
77
|
+
checkable: te,
|
|
78
|
+
showLine: be,
|
|
79
|
+
blockNode: ke,
|
|
79
80
|
...e,
|
|
80
|
-
...
|
|
81
|
-
key:
|
|
81
|
+
...ne,
|
|
82
|
+
key: d,
|
|
82
83
|
children: u,
|
|
83
|
-
_key:
|
|
84
|
+
_key: d,
|
|
84
85
|
_index: r++,
|
|
85
86
|
parentKey: a ? a._key : void 0,
|
|
86
87
|
pathParentKeys: a?.pathParentKeys || [],
|
|
87
88
|
_level: a._level,
|
|
88
89
|
_lineless: a?._lineless ? [...a._lineless || [], a._isTail] : []
|
|
89
90
|
};
|
|
90
|
-
return c === l + 1 && (
|
|
91
|
-
_key:
|
|
91
|
+
return c === l + 1 && (f.className = o(`${I}-node-is-tail`, f.className)), n.push(f), B.current[d] = f, t(u) && !s ? B.current[d].children = i(u, {
|
|
92
|
+
_key: d,
|
|
92
93
|
_level: a._level + 1,
|
|
93
|
-
_lineless:
|
|
94
|
+
_lineless: f._lineless,
|
|
94
95
|
_isTail: c === l + 1,
|
|
95
|
-
pathParentKeys: [...a?.pathParentKeys || [],
|
|
96
|
-
}) : B.current[
|
|
96
|
+
pathParentKeys: [...a?.pathParentKeys || [], d]
|
|
97
|
+
}) : B.current[d].children = [], f;
|
|
97
98
|
});
|
|
98
99
|
};
|
|
99
100
|
return i(e || [], { _level: 0 }), n;
|
|
100
101
|
}, [
|
|
101
|
-
|
|
102
|
-
|
|
102
|
+
ke,
|
|
103
|
+
Le,
|
|
103
104
|
L,
|
|
104
105
|
I,
|
|
105
|
-
|
|
106
|
+
be,
|
|
106
107
|
F
|
|
107
|
-
]), z =
|
|
108
|
+
]), z = p((e) => {
|
|
108
109
|
if (!M) {
|
|
109
|
-
let { checkedKeys: t, indeterminateKeys: n } =
|
|
110
|
+
let { checkedKeys: t, indeterminateKeys: n } = ae(e, B.current);
|
|
110
111
|
return {
|
|
111
112
|
checkedKeys: t,
|
|
112
113
|
halfCheckedKeys: n
|
|
@@ -114,9 +115,9 @@ function fe(c, d) {
|
|
|
114
115
|
}
|
|
115
116
|
return {
|
|
116
117
|
checkedKeys: e,
|
|
117
|
-
halfCheckedKeys:
|
|
118
|
+
halfCheckedKeys: Pe || []
|
|
118
119
|
};
|
|
119
|
-
}, [M,
|
|
120
|
+
}, [M, Pe]), B = h({}), V = h(null), H = h(null), U = h(null), $e = m(() => {
|
|
120
121
|
let e = { threshold: null };
|
|
121
122
|
return e = w ? {
|
|
122
123
|
threshold: 100,
|
|
@@ -125,19 +126,19 @@ function fe(c, d) {
|
|
|
125
126
|
height: T,
|
|
126
127
|
threshold: 100
|
|
127
128
|
} : { threshold: null }, e;
|
|
128
|
-
}, [T, w]),
|
|
129
|
-
let { checkedKeys: e, halfCheckedKeys: t } = z(A ||
|
|
129
|
+
}, [T, w]), et = m(() => Qe(Ze), [Qe, Ze]), [W, G] = g(() => k || je || []), [K, q] = g(() => {
|
|
130
|
+
let { checkedKeys: e, halfCheckedKeys: t } = z(A || Me || []);
|
|
130
131
|
return {
|
|
131
132
|
keys: e,
|
|
132
133
|
halfKeys: t
|
|
133
134
|
};
|
|
134
|
-
}), [J,
|
|
135
|
-
function
|
|
135
|
+
}), [J, tt] = g(() => ot(O || Ae)), [Y, nt] = g(() => []), [X, rt] = g(() => []), [Z, it] = g(() => []);
|
|
136
|
+
function at(e, t) {
|
|
136
137
|
let n = e;
|
|
137
138
|
t && (n = t._key), U.current && U.current.scrollIntoView(n, t || B.current[n]);
|
|
138
139
|
}
|
|
139
|
-
function
|
|
140
|
-
if (!
|
|
140
|
+
function ot(t) {
|
|
141
|
+
if (!Ee) return t || [];
|
|
141
142
|
if (!t) return Object.keys(B.current).filter((e) => {
|
|
142
143
|
let { children: t } = B.current[e] ?? {};
|
|
143
144
|
return t?.length;
|
|
@@ -150,7 +151,7 @@ function fe(c, d) {
|
|
|
150
151
|
}));
|
|
151
152
|
}), Object.keys(n);
|
|
152
153
|
}
|
|
153
|
-
function
|
|
154
|
+
function st(e, t) {
|
|
154
155
|
let n = B.current[e]?.dataRef, r = {
|
|
155
156
|
e: t,
|
|
156
157
|
data: n,
|
|
@@ -158,33 +159,33 @@ function fe(c, d) {
|
|
|
158
159
|
selected: !1,
|
|
159
160
|
selectedNodes: []
|
|
160
161
|
};
|
|
161
|
-
if (
|
|
162
|
+
if (Re) {
|
|
162
163
|
let t = [...W], n = t.indexOf(e);
|
|
163
|
-
n > -1 ? (t.splice(n, 1), r.selected = !1) : (r.selected = !0, t.push(e)), r.selectedNodes = Q(t),
|
|
164
|
-
} else r.selected = !0, r.selectedNodes = Q([e]),
|
|
165
|
-
|
|
164
|
+
n > -1 ? (t.splice(n, 1), r.selected = !1) : (r.selected = !0, t.push(e)), r.selectedNodes = Q(t), b || G(t), He?.(t, r);
|
|
165
|
+
} else r.selected = !0, r.selectedNodes = Q([e]), b || G([e]), He?.([e], r);
|
|
166
|
+
Ue?.(e, n, r);
|
|
166
167
|
}
|
|
167
|
-
function
|
|
168
|
+
function ct(e, t, n) {
|
|
168
169
|
let r = [...K.keys || []], i = K.halfKeys;
|
|
169
|
-
if (M) r = e ? r.concat(t) : r.filter((e) => e !== t),
|
|
170
|
+
if (M) r = e ? r.concat(t) : r.filter((e) => e !== t), x || q((e) => {
|
|
170
171
|
let t = { ...e };
|
|
171
172
|
return t.keys = r, t;
|
|
172
|
-
}),
|
|
173
|
+
}), S || q((e) => {
|
|
173
174
|
let t = { ...e };
|
|
174
175
|
return t.halfKeys = i, t;
|
|
175
176
|
});
|
|
176
177
|
else {
|
|
177
|
-
let { checkedKeys: n, indeterminateKeys: a } =
|
|
178
|
-
r = n, i = a, q(
|
|
178
|
+
let { checkedKeys: n, indeterminateKeys: a } = ie(t, e, r, B.current, i);
|
|
179
|
+
r = n, i = a, q(x ? (e) => {
|
|
179
180
|
let t = { ...e };
|
|
180
181
|
return t.halfKeys = i, t;
|
|
181
182
|
} : (e) => {
|
|
182
183
|
let t = { ...e };
|
|
183
184
|
return t.keys = r, t.halfKeys = i, t;
|
|
184
|
-
}),
|
|
185
|
+
}), Te === "parent" ? r = r.filter((e) => {
|
|
185
186
|
let t = B.current[e];
|
|
186
187
|
if (!t || !r.includes(t.parentKey)) return !0;
|
|
187
|
-
}) :
|
|
188
|
+
}) : Te === "child" && (r = r.filter((e) => {
|
|
188
189
|
let t = B.current[e];
|
|
189
190
|
if (!t || !t.children?.length || t.children?.every?.((e) => !r.includes(e._key))) return !0;
|
|
190
191
|
}));
|
|
@@ -198,32 +199,32 @@ function fe(c, d) {
|
|
|
198
199
|
e: n,
|
|
199
200
|
node: Q([t])[0]
|
|
200
201
|
};
|
|
201
|
-
|
|
202
|
+
We?.(r, o), Ge?.(t, a, o);
|
|
202
203
|
}
|
|
203
|
-
function
|
|
204
|
+
function lt(e) {
|
|
204
205
|
if (R(e._level)) {
|
|
205
206
|
console.warn(`[Tree] Cannot load more: reached max level ${F}`);
|
|
206
207
|
return;
|
|
207
208
|
}
|
|
208
|
-
r(P) && (
|
|
209
|
-
|
|
209
|
+
r(P) && (it(Array.from(new Set([...Z, e._key]))), rt(X.filter((t) => t !== e._key)), P?.(Q([e._key])[0]).then((t) => {
|
|
210
|
+
it(Z.filter((t) => t !== e._key)), rt(Array.from(new Set([...X, e._key]))), vt(!e.expanded, e._key);
|
|
210
211
|
}).catch((t) => {
|
|
211
|
-
|
|
212
|
+
it(Z.filter((t) => t !== e._key)), console.error("[tree]load data error: ", t);
|
|
212
213
|
}).finally(() => {}));
|
|
213
214
|
}
|
|
214
|
-
function
|
|
215
|
-
V.current = Q([t._key])[0], H.current = 0,
|
|
215
|
+
function ut(e, t) {
|
|
216
|
+
V.current = Q([t._key])[0], H.current = 0, Ke?.(e, Q([t._key])[0]);
|
|
216
217
|
}
|
|
217
|
-
function
|
|
218
|
-
V.current = null, H.current = 0,
|
|
218
|
+
function dt(e, t) {
|
|
219
|
+
V.current = null, H.current = 0, qe?.(e, Q([t._key])[0]);
|
|
219
220
|
}
|
|
220
|
-
function
|
|
221
|
-
H.current = n,
|
|
221
|
+
function ft(e, t, n) {
|
|
222
|
+
H.current = n, Je?.(e, Q([t._key])[0]);
|
|
222
223
|
}
|
|
223
|
-
function
|
|
224
|
-
H.current = 0,
|
|
224
|
+
function pt(e, t) {
|
|
225
|
+
H.current = 0, Ye?.(e, Q([t._key])[0]);
|
|
225
226
|
}
|
|
226
|
-
function
|
|
227
|
+
function mt(e, t) {
|
|
227
228
|
let n = B.current[e.parentKey];
|
|
228
229
|
for (; n;) {
|
|
229
230
|
let { _key: e, parentKey: r } = n;
|
|
@@ -232,7 +233,7 @@ function fe(c, d) {
|
|
|
232
233
|
n = B.current[r];
|
|
233
234
|
}
|
|
234
235
|
}
|
|
235
|
-
function
|
|
236
|
+
function ht(e, t) {
|
|
236
237
|
if (a(e) || a(t)) return !1;
|
|
237
238
|
if (e === t) return !0;
|
|
238
239
|
let n = e.key, r = t.key;
|
|
@@ -240,16 +241,16 @@ function fe(c, d) {
|
|
|
240
241
|
let i = e.props._key, o = t.props._key;
|
|
241
242
|
return a(i) && a(o) ? !1 : i === o;
|
|
242
243
|
}
|
|
243
|
-
function
|
|
244
|
+
function gt(e, t, n) {
|
|
244
245
|
if (V.current) {
|
|
245
246
|
let r = Q([t._key])[0];
|
|
246
|
-
if (
|
|
247
|
+
if (Xe && !mt(t, V.current) && !ht(V.current, r)) {
|
|
247
248
|
if (D && !D({
|
|
248
249
|
dropNode: r,
|
|
249
250
|
dragNode: V.current,
|
|
250
251
|
dropPosition: n
|
|
251
252
|
})) return;
|
|
252
|
-
|
|
253
|
+
Xe({
|
|
253
254
|
dragNode: V.current,
|
|
254
255
|
dropNode: r,
|
|
255
256
|
dropPosition: n,
|
|
@@ -258,7 +259,7 @@ function fe(c, d) {
|
|
|
258
259
|
}
|
|
259
260
|
}
|
|
260
261
|
}
|
|
261
|
-
function
|
|
262
|
+
function _t(e, t) {
|
|
262
263
|
let n = !0;
|
|
263
264
|
return r(D) && (n = D({
|
|
264
265
|
dropNode: Q([e._key])[0],
|
|
@@ -266,25 +267,27 @@ function fe(c, d) {
|
|
|
266
267
|
dropPosition: t
|
|
267
268
|
})), n;
|
|
268
269
|
}
|
|
269
|
-
function
|
|
270
|
+
function vt(e, t) {
|
|
270
271
|
if (Y.includes(t)) return;
|
|
271
272
|
let n = e ? Array.from(new Set([...J, t])) : J.filter((e) => e !== t);
|
|
272
|
-
|
|
273
|
+
tt((e) => n), E && nt((e) => [...e, t]);
|
|
274
|
+
let i = Ve;
|
|
275
|
+
r(i) && i(n, {
|
|
273
276
|
expanded: e,
|
|
274
277
|
node: Q([t])[0],
|
|
275
278
|
expandedNodes: Q(n)
|
|
276
279
|
});
|
|
277
280
|
}
|
|
278
281
|
function Q(e) {
|
|
279
|
-
return $([].concat(e).map((e) => B.current[e]).filter(Boolean)).map((t) =>
|
|
282
|
+
return $([].concat(e).map((e) => B.current[e]).filter(Boolean)).map((t, n, r) => ve ? {
|
|
280
283
|
props: t,
|
|
281
284
|
key: e
|
|
282
|
-
} : /* @__PURE__ */
|
|
285
|
+
} : /* @__PURE__ */ se(f, {
|
|
283
286
|
...t,
|
|
284
287
|
key: t.key
|
|
285
288
|
}));
|
|
286
289
|
}
|
|
287
|
-
function
|
|
290
|
+
function yt(e) {
|
|
288
291
|
return {
|
|
289
292
|
expandedKeysSet: e?.expandedKeysSet || new Set(J || []),
|
|
290
293
|
checkedKeysSet: e?.checkedKeysSet || new Set(K.keys || []),
|
|
@@ -293,10 +296,10 @@ function fe(c, d) {
|
|
|
293
296
|
};
|
|
294
297
|
}
|
|
295
298
|
function $(t, n) {
|
|
296
|
-
let { expandedKeysSet: r, checkedKeysSet: i, selectedKeysSet: a, halfCheckedKeysSet: o } =
|
|
299
|
+
let { expandedKeysSet: r, checkedKeysSet: i, selectedKeysSet: a, halfCheckedKeysSet: o } = yt(n), s = (e) => {
|
|
297
300
|
let t = e.children?.length, n = R(e._level), s = {
|
|
298
301
|
isLeaf: !t || n,
|
|
299
|
-
autoExpandParent: t ?
|
|
302
|
+
autoExpandParent: t ? Ee : !1,
|
|
300
303
|
expanded: r ? r.has(e._key) : J.includes(e._key)
|
|
301
304
|
};
|
|
302
305
|
return P && (s.loaded = X.includes(e._key) || n, s.isLeaf = (t ? !1 : e.isLeaf) || n), {
|
|
@@ -315,12 +318,12 @@ function fe(c, d) {
|
|
|
315
318
|
children: null
|
|
316
319
|
};
|
|
317
320
|
};
|
|
318
|
-
return e(t) ? t.map((e) => s(e)) : s(t);
|
|
319
|
-
}
|
|
320
|
-
function vt(e) {
|
|
321
|
-
Y.includes(e) && et(Y.filter((t, n, r) => t !== e));
|
|
321
|
+
return e(t) ? t.map((e, t, n) => s(e)) : s(t);
|
|
322
322
|
}
|
|
323
|
-
|
|
323
|
+
let bt = te((e) => {
|
|
324
|
+
Y.includes(e) && nt(Y.filter((t, n, r) => t !== e));
|
|
325
|
+
});
|
|
326
|
+
function xt() {
|
|
324
327
|
return {
|
|
325
328
|
selectedKeys: W,
|
|
326
329
|
checkedKeys: K.keys,
|
|
@@ -329,11 +332,11 @@ function fe(c, d) {
|
|
|
329
332
|
currentExpandKeys: Y,
|
|
330
333
|
loadedKeys: X,
|
|
331
334
|
loadingKeys: Z,
|
|
332
|
-
nodeList:
|
|
335
|
+
nodeList: et
|
|
333
336
|
};
|
|
334
337
|
}
|
|
335
|
-
return
|
|
336
|
-
if (!(
|
|
338
|
+
return ue(() => {
|
|
339
|
+
if (!(x && A || S && M)) return;
|
|
337
340
|
let { halfCheckedKeys: e, checkedKeys: t } = z(A);
|
|
338
341
|
return q((n) => {
|
|
339
342
|
let r = { ...n };
|
|
@@ -343,86 +346,84 @@ function fe(c, d) {
|
|
|
343
346
|
M,
|
|
344
347
|
A,
|
|
345
348
|
z,
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
]),
|
|
349
|
-
if (
|
|
349
|
+
x,
|
|
350
|
+
S
|
|
351
|
+
]), ue(() => {
|
|
352
|
+
if (_e) return n(O, J) || tt((e) => O), () => {};
|
|
350
353
|
}, [
|
|
351
354
|
O,
|
|
352
355
|
J,
|
|
353
|
-
|
|
354
|
-
]),
|
|
355
|
-
if (
|
|
356
|
+
_e
|
|
357
|
+
]), ue(() => {
|
|
358
|
+
if (b) return n(k, W) || G(k || []), () => {};
|
|
356
359
|
}, [
|
|
357
|
-
|
|
360
|
+
b,
|
|
358
361
|
k,
|
|
359
362
|
W
|
|
360
|
-
]),
|
|
361
|
-
scrollIntoView:
|
|
362
|
-
handleCheck:
|
|
363
|
-
getTreeState:
|
|
364
|
-
handleExpandEnd:
|
|
363
|
+
]), de(d, () => ({
|
|
364
|
+
scrollIntoView: at,
|
|
365
|
+
handleCheck: ct,
|
|
366
|
+
getTreeState: xt,
|
|
367
|
+
handleExpandEnd: bt,
|
|
365
368
|
getNodeProps: $,
|
|
366
|
-
getDataSet:
|
|
369
|
+
getDataSet: yt,
|
|
367
370
|
getCacheNode: Q,
|
|
368
|
-
handleExpand:
|
|
369
|
-
handleAllowDrop:
|
|
370
|
-
handleNodeDrop:
|
|
371
|
-
isSameNode:
|
|
372
|
-
})), /* @__PURE__ */
|
|
371
|
+
handleExpand: vt,
|
|
372
|
+
handleAllowDrop: _t,
|
|
373
|
+
handleNodeDrop: gt,
|
|
374
|
+
isSameNode: ht
|
|
375
|
+
})), /* @__PURE__ */ fe(ne.Provider, {
|
|
373
376
|
value: {
|
|
374
|
-
icons:
|
|
377
|
+
icons: Ce,
|
|
375
378
|
animation: E,
|
|
376
379
|
key2nodeProps: B.current,
|
|
377
380
|
getFieldInfo: L,
|
|
378
|
-
getTreeState:
|
|
381
|
+
getTreeState: xt,
|
|
379
382
|
getNodeProps: $,
|
|
380
|
-
onExpandEnd: E ?
|
|
381
|
-
onSelect:
|
|
382
|
-
onCheck:
|
|
383
|
-
onNodeDragStart:
|
|
384
|
-
onNodeDragEnd:
|
|
385
|
-
onNodeDragLeave:
|
|
386
|
-
onNodeDragOver:
|
|
387
|
-
onNodeDrop:
|
|
388
|
-
onExpand:
|
|
389
|
-
renderExtra:
|
|
390
|
-
renderTitle:
|
|
391
|
-
loadMore: P &&
|
|
392
|
-
allowDrop:
|
|
393
|
-
actionOnClick:
|
|
394
|
-
virtualListProps:
|
|
383
|
+
onExpandEnd: E ? bt : ee.noop,
|
|
384
|
+
onSelect: st,
|
|
385
|
+
onCheck: ct,
|
|
386
|
+
onNodeDragStart: ut,
|
|
387
|
+
onNodeDragEnd: dt,
|
|
388
|
+
onNodeDragLeave: pt,
|
|
389
|
+
onNodeDragOver: ft,
|
|
390
|
+
onNodeDrop: gt,
|
|
391
|
+
onExpand: vt,
|
|
392
|
+
renderExtra: Fe,
|
|
393
|
+
renderTitle: Ie,
|
|
394
|
+
loadMore: P && lt,
|
|
395
|
+
allowDrop: _t,
|
|
396
|
+
actionOnClick: we,
|
|
397
|
+
virtualListProps: $e
|
|
395
398
|
},
|
|
396
|
-
children: /* @__PURE__ */
|
|
397
|
-
ref:
|
|
398
|
-
U.current = e;
|
|
399
|
-
},
|
|
399
|
+
children: /* @__PURE__ */ fe(re, {
|
|
400
|
+
ref: U,
|
|
400
401
|
className: o(I, {
|
|
401
402
|
[`${I}-checkable`]: N,
|
|
402
|
-
[`${I}-show-line`]:
|
|
403
|
-
[`${I}-size-${
|
|
404
|
-
[`${I}-rtl`]:
|
|
405
|
-
},
|
|
406
|
-
style:
|
|
407
|
-
filterNode:
|
|
408
|
-
virtualListProps:
|
|
403
|
+
[`${I}-show-line`]: be,
|
|
404
|
+
[`${I}-size-${xe}`]: xe,
|
|
405
|
+
[`${I}-rtl`]: y
|
|
406
|
+
}, ye),
|
|
407
|
+
style: Se,
|
|
408
|
+
filterNode: ze,
|
|
409
|
+
virtualListProps: $e,
|
|
409
410
|
expandedKeys: J,
|
|
410
411
|
currentExpandKeys: Y,
|
|
411
412
|
getNodeProps: $,
|
|
412
|
-
getDataSet:
|
|
413
|
-
nodeList:
|
|
414
|
-
onMouseDown:
|
|
413
|
+
getDataSet: yt,
|
|
414
|
+
nodeList: et,
|
|
415
|
+
onMouseDown: Be,
|
|
415
416
|
ariaProps: {
|
|
416
417
|
role: "tree",
|
|
417
|
-
"aria-multiselectable":
|
|
418
|
+
"aria-multiselectable": Re,
|
|
418
419
|
tabIndex: 0,
|
|
419
|
-
...s(
|
|
420
|
+
...s(ge)
|
|
420
421
|
}
|
|
421
422
|
})
|
|
422
423
|
});
|
|
423
424
|
}
|
|
424
|
-
var
|
|
425
|
-
|
|
425
|
+
var y = ce(he);
|
|
426
|
+
y.displayName = c.displayName;
|
|
426
427
|
//#endregion
|
|
427
|
-
export {
|
|
428
|
+
export { y as default };
|
|
428
429
|
/* 独立思考,明辨是非 */
|
package/tree/context.js
CHANGED
package/tree/index.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { TreeContext } from './context';
|
|
2
|
+
import Node from './Node';
|
|
3
|
+
import NodeList from './NodeList';
|
|
4
|
+
declare const Tree: import("./Tree").ForwardRefFormControlProps & {
|
|
5
|
+
SHOW_PARENT: string;
|
|
6
|
+
SHOW_ALL: string;
|
|
7
|
+
SHOW_CHILD: string;
|
|
8
|
+
Node: import("react").NamedExoticComponent<import("./interface").NodeProps>;
|
|
9
|
+
TreeContext: import("react").Context<{
|
|
10
|
+
icons?: import("./interface").NodeProps["icons"];
|
|
11
|
+
loadMore?: (node: import("./interface").NodeProps) => void;
|
|
12
|
+
renderExtra?: import("./interface").TreeProps["renderExtra"];
|
|
13
|
+
renderTitle?: import("./interface").TreeProps["renderTitle"];
|
|
14
|
+
virtualListProps?: import("../virtual-list").AvailableVirtualListProps;
|
|
15
|
+
onSelect?: (_key: string, e: any) => void;
|
|
16
|
+
onCheck?: (checked: boolean, _key: string, e: any) => void;
|
|
17
|
+
onExpand?: (expanded: boolean, _key: string) => void;
|
|
18
|
+
onNodeDrop?: (e: import("react").DragEvent<HTMLSpanElement>, nodeProps: import("./interface").NodeProps, dragPosition: 0 | 1 | -1) => void;
|
|
19
|
+
key2nodeProps?: {
|
|
20
|
+
[key: string]: import("./interface").NodeProps;
|
|
21
|
+
};
|
|
22
|
+
actionOnClick?: import("./interface").TreeProps["actionOnClick"];
|
|
23
|
+
getNodeProps?: <T extends import("./interface").NodeProps | import("./interface").NodeProps[]>(nodes: T, dataSet?: any) => T;
|
|
24
|
+
getTreeState?: () => import("./interface").TreeState;
|
|
25
|
+
onExpandEnd?: (key: string) => void;
|
|
26
|
+
animation?: boolean;
|
|
27
|
+
onNodeDragStart?: (e: import("react").DragEvent<HTMLSpanElement>, nodeProps: import("./interface").NodeProps) => void;
|
|
28
|
+
onNodeDragEnd?: (e: import("react").DragEvent<HTMLSpanElement>, nodeProps: import("./interface").NodeProps) => void;
|
|
29
|
+
onNodeDragOver?: (e: import("react").DragEvent<HTMLSpanElement>, nodeProps: import("./interface").NodeProps, position: any) => void;
|
|
30
|
+
onNodeDragLeave?: (e: import("react").DragEvent<HTMLSpanElement>, nodeProps: import("./interface").NodeProps) => void;
|
|
31
|
+
allowDrop?: (nodeProps: import("./interface").NodeProps, dragPosition: 0 | 1 | -1) => boolean;
|
|
32
|
+
getFieldInfo?: (nodeProps: import("./interface").NodeProps) => import("./interface").TreeDataType;
|
|
33
|
+
}>;
|
|
34
|
+
NodeList: import("react").ForwardRefExoticComponent<Omit<any, "ref"> & import("react").RefAttributes<unknown>>;
|
|
35
|
+
zh: string;
|
|
36
|
+
en: string;
|
|
37
|
+
displayName: string;
|
|
38
|
+
id: string;
|
|
39
|
+
};
|
|
40
|
+
export { TreeContext, Node as TreeNode, NodeList as TreeNodeList };
|
|
41
|
+
export default Tree;
|
|
42
|
+
export type { ActionOnClick, AllowDrop, FakeNodeInstance, FieldNamesType, key2nodePropsType, NodeInstance, NodeProps, SHOW_ALL, SHOW_CHILD, SHOW_PARENT, TreeDataType, TreeProps, TreeState, } from './interface';
|
package/tree/index.js
CHANGED
|
@@ -1,22 +1,20 @@
|
|
|
1
|
-
/* 潘启宝 2026-05-
|
|
1
|
+
/* 潘启宝 2026-05-26 15:50:14 星期二 山东省济南市 */
|
|
2
2
|
import { TREE_COMPONENT_INFO as e } from "../utils/names.js";
|
|
3
3
|
import { TreeContext as t } from "./context.js";
|
|
4
4
|
import n from "./Node.js";
|
|
5
|
-
import r from "./
|
|
6
|
-
import i from "./
|
|
7
|
-
import
|
|
8
|
-
import s from "./Tree.js";
|
|
5
|
+
import r from "./NodeList.js";
|
|
6
|
+
import { SHOW_CHILD as i, SHOW_PARENT as a } from "./utils.js";
|
|
7
|
+
import o from "./Tree.js";
|
|
9
8
|
//#region components/pc/tree/index.ts
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
SHOW_PARENT:
|
|
9
|
+
var s = Object.assign(o, {
|
|
10
|
+
...e,
|
|
11
|
+
SHOW_PARENT: a,
|
|
13
12
|
SHOW_ALL: "all",
|
|
14
|
-
SHOW_CHILD:
|
|
13
|
+
SHOW_CHILD: i,
|
|
15
14
|
Node: n,
|
|
16
15
|
TreeContext: t,
|
|
17
|
-
NodeList:
|
|
18
|
-
Animation: r
|
|
16
|
+
NodeList: r
|
|
19
17
|
});
|
|
20
18
|
//#endregion
|
|
21
|
-
export {
|
|
19
|
+
export { t as TreeContext, n as TreeNode, r as TreeNodeList, s as default };
|
|
22
20
|
/* 独立思考,明辨是非 */
|
package/tree/interface.d.ts
CHANGED
package/tree/utils.js
CHANGED
package/tree-select/List.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 潘启宝 2026-05-
|
|
1
|
+
/* 潘启宝 2026-05-26 15:50:14 星期二 山东省济南市 */
|
|
2
2
|
import { isFunction as e, isString as t } from "../utils/is.js";
|
|
3
3
|
import n from "../tree/index.js";
|
|
4
4
|
import { forwardRef as r, useCallback as i, useImperativeHandle as a, useMemo as o, useRef as s } from "react";
|