@aifuxi/semi-ui-vue 0.1.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +22 -0
- package/dist/Button-RCaDTqHh.js +249 -0
- package/dist/Collapsible-DeV0aJ4n.js +199 -0
- package/dist/Cropper-Dy1LPBDN.js +587 -0
- package/dist/Divider-BQmwhGfH.js +57 -0
- package/dist/Input-BYWFIgNn.js +593 -0
- package/dist/InputNumber-BaeViVtG.js +856 -0
- package/dist/Modal-BhmFYVFw.js +975 -0
- package/dist/Pagination-4JvS-gHR.js +572 -0
- package/dist/Progress-BulSV_JR.js +523 -0
- package/dist/SBOM.spdx.json +165 -0
- package/dist/SelectOption-Ce-Lst-e.js +1473 -0
- package/dist/Slider-w9sbxzBw.js +707 -0
- package/dist/Spin-CuFLkqev.js +222 -0
- package/dist/THIRD_PARTY_LICENSES/Semi-Design.txt +83 -0
- package/dist/THIRD_PARTY_LICENSES/async-validator.txt +9 -0
- package/dist/THIRD_PARTY_LICENSES/bezier-easing.txt +22 -0
- package/dist/THIRD_PARTY_LICENSES/date-fns-tz.txt +21 -0
- package/dist/THIRD_PARTY_LICENSES/date-fns.txt +21 -0
- package/dist/THIRD_PARTY_LICENSES/lodash.txt +47 -0
- package/dist/THIRD_PARTY_LICENSES/scroll-into-view-if-needed.txt +21 -0
- package/dist/THIRD_PARTY_NOTICES.md +23 -0
- package/dist/Tooltip-Bq7HZwnS.js +1321 -0
- package/dist/Tree-tqy5xBYJ.js +1275 -0
- package/dist/_plugin-vue_export-helper-B3ysoDQm.js +8 -0
- package/dist/anchor/Anchor.vue.d.ts +29 -0
- package/dist/anchor/AnchorLink.vue.d.ts +16 -0
- package/dist/anchor/AnchorNodeRenderer.d.ts +15 -0
- package/dist/anchor/anchor-context.d.ts +18 -0
- package/dist/anchor/index.d.ts +11 -0
- package/dist/anchor/index.js +2 -0
- package/dist/anchor/types.d.ts +43 -0
- package/dist/anchor-DW0p2t-I.js +503 -0
- package/dist/arrayMove-ByVCXfhS.js +7 -0
- package/dist/auto-complete/AutoComplete.vue.d.ts +33 -0
- package/dist/auto-complete/AutoCompleteNodeRenderer.d.ts +15 -0
- package/dist/auto-complete/AutoCompleteOption.vue.d.ts +19 -0
- package/dist/auto-complete/index.d.ts +10 -0
- package/dist/auto-complete/index.js +2 -0
- package/dist/auto-complete/types.d.ts +117 -0
- package/dist/auto-complete/use-auto-complete-foundation.d.ts +40 -0
- package/dist/auto-complete-BeahBlt9.js +765 -0
- package/dist/avatar/Avatar.vue.d.ts +26 -0
- package/dist/avatar/AvatarGroup.d.ts +54 -0
- package/dist/avatar/AvatarNodeRenderer.d.ts +15 -0
- package/dist/avatar/TopSlotSvg.vue.d.ts +7 -0
- package/dist/avatar/index.d.ts +10 -0
- package/dist/avatar/index.js +2 -0
- package/dist/avatar/types.d.ts +86 -0
- package/dist/avatar-B00xjEzD.js +551 -0
- package/dist/back-top/BackTop.vue.d.ts +19 -0
- package/dist/back-top/index.d.ts +3 -0
- package/dist/back-top/index.js +2 -0
- package/dist/back-top/types.d.ts +15 -0
- package/dist/back-top-C2XqUzoN.js +123 -0
- package/dist/badge/Badge.vue.d.ts +23 -0
- package/dist/badge/BadgeNodeRenderer.d.ts +15 -0
- package/dist/badge/index.d.ts +6 -0
- package/dist/badge/index.js +2 -0
- package/dist/badge/types.d.ts +29 -0
- package/dist/badge-gWsDkzyt.js +120 -0
- package/dist/banner/Banner.vue.d.ts +19 -0
- package/dist/banner/BannerNodeRenderer.d.ts +15 -0
- package/dist/banner/index.d.ts +6 -0
- package/dist/banner/index.js +2 -0
- package/dist/banner/types.d.ts +25 -0
- package/dist/banner-B3O4uDoR.js +220 -0
- package/dist/breadcrumb/Breadcrumb.d.ts +129 -0
- package/dist/breadcrumb/BreadcrumbIconRenderer.d.ts +23 -0
- package/dist/breadcrumb/BreadcrumbItem.vue.d.ts +19 -0
- package/dist/breadcrumb/BreadcrumbNodeRenderer.d.ts +15 -0
- package/dist/breadcrumb/BreadcrumbPopover.vue.d.ts +17 -0
- package/dist/breadcrumb/BreadcrumbPopoverArrow.vue.d.ts +3 -0
- package/dist/breadcrumb/breadcrumb-context.d.ts +9 -0
- package/dist/breadcrumb/index.d.ts +11 -0
- package/dist/breadcrumb/index.js +2 -0
- package/dist/breadcrumb/types.d.ts +72 -0
- package/dist/breadcrumb-BmBbFmGK.js +451 -0
- package/dist/button/Button.vue.d.ts +34 -0
- package/dist/button/ButtonAiLoadingIcon.vue.d.ts +3 -0
- package/dist/button/ButtonGroup.d.ts +69 -0
- package/dist/button/ButtonIconRenderer.d.ts +28 -0
- package/dist/button/ButtonLoadingIcon.vue.d.ts +3 -0
- package/dist/button/SplitButtonGroup.vue.d.ts +16 -0
- package/dist/button/index.d.ts +5 -0
- package/dist/button/index.js +3 -0
- package/dist/button/types.d.ts +57 -0
- package/dist/button-Rcn5pYGh.js +134 -0
- package/dist/calendar/Calendar.vue.d.ts +29 -0
- package/dist/calendar/CalendarDay.vue.d.ts +3 -0
- package/dist/calendar/CalendarMonth.vue.d.ts +3 -0
- package/dist/calendar/CalendarNodeRenderer.d.ts +15 -0
- package/dist/calendar/CalendarTimeColumn.vue.d.ts +6 -0
- package/dist/calendar/CalendarWeek.vue.d.ts +8 -0
- package/dist/calendar/index.d.ts +6 -0
- package/dist/calendar/index.js +2 -0
- package/dist/calendar/types.d.ts +67 -0
- package/dist/calendar-CJTrr4y5.js +1172 -0
- package/dist/card/Card.vue.d.ts +16 -0
- package/dist/card/CardGroup.vue.d.ts +13 -0
- package/dist/card/CardMeta.vue.d.ts +11 -0
- package/dist/card/CardNodeRenderer.d.ts +15 -0
- package/dist/card/CardSkeleton.vue.d.ts +3 -0
- package/dist/card/card-content.d.ts +2 -0
- package/dist/card/index.d.ts +11 -0
- package/dist/card/index.js +2 -0
- package/dist/card/types.d.ts +56 -0
- package/dist/card-DwMOFi6_.js +348 -0
- package/dist/carousel/Carousel.vue.d.ts +29 -0
- package/dist/carousel/CarouselArrow.vue.d.ts +15 -0
- package/dist/carousel/CarouselIndicator.vue.d.ts +17 -0
- package/dist/carousel/CarouselItemRenderer.d.ts +34 -0
- package/dist/carousel/CarouselNodeRenderer.d.ts +15 -0
- package/dist/carousel/index.d.ts +6 -0
- package/dist/carousel/index.js +2 -0
- package/dist/carousel/types.d.ts +70 -0
- package/dist/carousel/use-carousel-foundation.d.ts +19 -0
- package/dist/carousel-B4WlIRJH.js +458 -0
- package/dist/cascader/Cascader.vue.d.ts +71 -0
- package/dist/cascader/CascaderNodeRenderer.d.ts +15 -0
- package/dist/cascader/CascaderPanel.vue.d.ts +36 -0
- package/dist/cascader/index.d.ts +6 -0
- package/dist/cascader/index.js +2 -0
- package/dist/cascader/types.d.ts +192 -0
- package/dist/cascader-Ch6clCeh.js +1525 -0
- package/dist/checkbox/Checkbox.vue.d.ts +19 -0
- package/dist/checkbox/CheckboxGroup.d.ts +161 -0
- package/dist/checkbox/CheckboxNodeRenderer.d.ts +15 -0
- package/dist/checkbox/checkbox-context.d.ts +11 -0
- package/dist/checkbox/index.d.ts +10 -0
- package/dist/checkbox/index.js +2 -0
- package/dist/checkbox/types.d.ts +92 -0
- package/dist/checkbox-mJD1ou6k.js +479 -0
- package/dist/collapse/Collapse.vue.d.ts +140 -0
- package/dist/collapse/CollapseNodeRenderer.d.ts +15 -0
- package/dist/collapse/CollapsePanel.vue.d.ts +99 -0
- package/dist/collapse/collapse-context.d.ts +14 -0
- package/dist/collapse/index.d.ts +10 -0
- package/dist/collapse/index.js +2 -0
- package/dist/collapse/types.d.ts +50 -0
- package/dist/collapse-7YtQLWqt.js +278 -0
- package/dist/collapsible/Collapsible.vue.d.ts +136 -0
- package/dist/collapsible/index.d.ts +5 -0
- package/dist/collapsible/index.js +5 -0
- package/dist/collapsible/types.d.ts +28 -0
- package/dist/color-picker/AlphaSlider.vue.d.ts +14 -0
- package/dist/color-picker/ColorChooseArea.vue.d.ts +20 -0
- package/dist/color-picker/ColorDataPart.vue.d.ts +15 -0
- package/dist/color-picker/ColorPicker.vue.d.ts +28 -0
- package/dist/color-picker/ColorPickerNodeRenderer.d.ts +17 -0
- package/dist/color-picker/ColorPickerPanel.vue.d.ts +37 -0
- package/dist/color-picker/ColorSlider.vue.d.ts +13 -0
- package/dist/color-picker/index.d.ts +10 -0
- package/dist/color-picker/index.js +2 -0
- package/dist/color-picker/types.d.ts +67 -0
- package/dist/color-picker-ChC7qsx0.js +885 -0
- package/dist/config-context-CyynTtDb.js +4 -0
- package/dist/config-provider/ConfigConsumer.vue.d.ts +11 -0
- package/dist/config-provider/ConfigProvider.vue.d.ts +16 -0
- package/dist/config-provider/config-context.d.ts +3 -0
- package/dist/config-provider/constants.d.ts +4 -0
- package/dist/config-provider/index.d.ts +13 -0
- package/dist/config-provider/index.js +3 -0
- package/dist/config-provider/semi-global.d.ts +6 -0
- package/dist/config-provider/types.d.ts +74 -0
- package/dist/config-provider/use-responsive-observe.d.ts +6 -0
- package/dist/config-provider-VMfNNSF1.js +188 -0
- package/dist/constants-BF9bZJyc.js +45 -0
- package/dist/constants-BNwzO87W.js +9 -0
- package/dist/cropper/Cropper.vue.d.ts +18 -0
- package/dist/cropper/index.d.ts +4 -0
- package/dist/cropper/index.js +5 -0
- package/dist/cropper/types.d.ts +51 -0
- package/dist/date-picker/DatePicker.vue.d.ts +41 -0
- package/dist/date-picker/DatePickerMonth.vue.d.ts +25 -0
- package/dist/date-picker/DatePickerNodeRenderer.d.ts +17 -0
- package/dist/date-picker/DatePickerPanel.vue.d.ts +33 -0
- package/dist/date-picker/index.d.ts +5 -0
- package/dist/date-picker/index.js +2 -0
- package/dist/date-picker/types.d.ts +211 -0
- package/dist/date-picker-B2lhlKHD.js +2207 -0
- package/dist/descriptions/Descriptions.vue.d.ts +96 -0
- package/dist/descriptions/DescriptionsItem.vue.d.ts +96 -0
- package/dist/descriptions/DescriptionsNodeRenderer.d.ts +15 -0
- package/dist/descriptions/descriptions-context.d.ts +7 -0
- package/dist/descriptions/index.d.ts +10 -0
- package/dist/descriptions/index.js +2 -0
- package/dist/descriptions/types.d.ts +45 -0
- package/dist/descriptions-BU6ahbge.js +272 -0
- package/dist/divider/Divider.vue.d.ts +15 -0
- package/dist/divider/DividerContentRenderer.d.ts +17 -0
- package/dist/divider/index.d.ts +3 -0
- package/dist/divider/index.js +3 -0
- package/dist/divider/types.d.ts +13 -0
- package/dist/divider-DA9U4uOl.js +8 -0
- package/dist/dropdown/Dropdown.vue.d.ts +23 -0
- package/dist/dropdown/DropdownDivider.vue.d.ts +4 -0
- package/dist/dropdown/DropdownItem.vue.d.ts +28 -0
- package/dist/dropdown/DropdownMenu.vue.d.ts +11 -0
- package/dist/dropdown/DropdownNodeRenderer.d.ts +15 -0
- package/dist/dropdown/DropdownTitle.vue.d.ts +11 -0
- package/dist/dropdown/DropdownTriggerRenderer.d.ts +45 -0
- package/dist/dropdown/dropdown-context.d.ts +8 -0
- package/dist/dropdown/index.d.ts +17 -0
- package/dist/dropdown/index.js +2 -0
- package/dist/dropdown/types.d.ts +98 -0
- package/dist/dropdown-D0-UWd65.js +665 -0
- package/dist/empty/Empty.vue.d.ts +13 -0
- package/dist/empty/EmptyNodeRenderer.d.ts +15 -0
- package/dist/empty/index.d.ts +6 -0
- package/dist/empty/index.js +2 -0
- package/dist/empty/types.d.ts +27 -0
- package/dist/empty-Bpms8Z5w.js +152 -0
- package/dist/env-BeIzjQx7.js +4 -0
- package/dist/es-CAWQuPuV.js +93 -0
- package/dist/float-button/FloatButton.vue.d.ts +20 -0
- package/dist/float-button/FloatButtonBadge.vue.d.ts +18 -0
- package/dist/float-button/FloatButtonGroup.vue.d.ts +17 -0
- package/dist/float-button/FloatButtonNodeRenderer.d.ts +17 -0
- package/dist/float-button/index.d.ts +4 -0
- package/dist/float-button/index.js +2 -0
- package/dist/float-button/types.d.ts +59 -0
- package/dist/float-button-qU3b0WBX.js +190 -0
- package/dist/form/ArrayField.d.ts +24 -0
- package/dist/form/Form.vue.d.ts +38 -0
- package/dist/form/FormErrorMessage.vue.d.ts +4 -0
- package/dist/form/FormField.d.ts +9 -0
- package/dist/form/FormInputGroup.d.ts +62 -0
- package/dist/form/FormLabel.vue.d.ts +18 -0
- package/dist/form/FormNodeRenderer.d.ts +15 -0
- package/dist/form/FormSection.vue.d.ts +16 -0
- package/dist/form/FormSlot.d.ts +3 -0
- package/dist/form/form-context.d.ts +4 -0
- package/dist/form/index.d.ts +68 -0
- package/dist/form/index.js +3 -0
- package/dist/form/internal-types.d.ts +67 -0
- package/dist/form/types.d.ts +273 -0
- package/dist/form/use-form.d.ts +11 -0
- package/dist/form/with-form.d.ts +3 -0
- package/dist/form-CLhGuORQ.js +2030 -0
- package/dist/foundation-Cawx37mp.js +1819 -0
- package/dist/grid/Col.vue.d.ts +13 -0
- package/dist/grid/Row.vue.d.ts +14 -0
- package/dist/grid/grid-context.d.ts +6 -0
- package/dist/grid/index.d.ts +5 -0
- package/dist/grid/index.js +2 -0
- package/dist/grid/media-query.d.ts +2 -0
- package/dist/grid/types.d.ts +44 -0
- package/dist/grid-Cn2uBhRd.js +161 -0
- package/dist/highlight/Highlight.vue.d.ts +10 -0
- package/dist/highlight/HighlightNodeRenderer.d.ts +49 -0
- package/dist/highlight/index.d.ts +4 -0
- package/dist/highlight/index.js +2 -0
- package/dist/highlight/internal-types.d.ts +8 -0
- package/dist/highlight/types.d.ts +17 -0
- package/dist/highlight-DHX3RV0C.js +158 -0
- package/dist/icon/index.d.ts +2 -0
- package/dist/icon/index.js +2 -0
- package/dist/image/Image.vue.d.ts +21 -0
- package/dist/image/ImageNodeRenderer.d.ts +15 -0
- package/dist/image/ImagePreview.vue.d.ts +56 -0
- package/dist/image/ImagePreviewFooter.vue.d.ts +38 -0
- package/dist/image/ImagePreviewHeader.vue.d.ts +17 -0
- package/dist/image/ImagePreviewImage.vue.d.ts +27 -0
- package/dist/image/ImagePreviewInner.vue.d.ts +54 -0
- package/dist/image/image-context.d.ts +14 -0
- package/dist/image/index.d.ts +6 -0
- package/dist/image/index.js +2 -0
- package/dist/image/types.d.ts +183 -0
- package/dist/image-C-ifCh_9.js +1615 -0
- package/dist/index.d.ts +68 -0
- package/dist/index.js +75 -0
- package/dist/input/Input.vue.d.ts +58 -0
- package/dist/input/InputGroup.d.ts +69 -0
- package/dist/input/InputNodeRenderer.d.ts +15 -0
- package/dist/input/TextArea.vue.d.ts +50 -0
- package/dist/input/index.d.ts +11 -0
- package/dist/input/index.js +2 -0
- package/dist/input/types.d.ts +168 -0
- package/dist/input-number/InputNumber.vue.d.ts +52 -0
- package/dist/input-number/index.d.ts +10 -0
- package/dist/input-number/index.js +5 -0
- package/dist/input-number/types.d.ts +56 -0
- package/dist/input-wf0nZCRS.js +747 -0
- package/dist/isBefore-BG1hiM9f.js +37 -0
- package/dist/isElement-Cx0AsIov.js +11 -0
- package/dist/isEnterPress-HTy0eCBp.js +8 -0
- package/dist/isNullOrUndefined-Cg6MZ8r3.js +6 -0
- package/dist/isPromise-D2v3Ejff.js +11 -0
- package/dist/keyCode-DMNg63wX.js +110 -0
- package/dist/layout/Layout.vue.d.ts +14 -0
- package/dist/layout/LayoutContent.vue.d.ts +14 -0
- package/dist/layout/LayoutFooter.vue.d.ts +14 -0
- package/dist/layout/LayoutHeader.vue.d.ts +14 -0
- package/dist/layout/LayoutSection.vue.d.ts +17 -0
- package/dist/layout/LayoutSider.vue.d.ts +18 -0
- package/dist/layout/index.d.ts +17 -0
- package/dist/layout/index.js +2 -0
- package/dist/layout/layout-context.d.ts +6 -0
- package/dist/layout/media-query.d.ts +4 -0
- package/dist/layout/types.d.ts +31 -0
- package/dist/layout-tq-_l_O3.js +171 -0
- package/dist/list/List.vue.d.ts +22 -0
- package/dist/list/ListItem.vue.d.ts +88 -0
- package/dist/list/ListNodeRenderer.d.ts +15 -0
- package/dist/list/ListSpin.vue.d.ts +16 -0
- package/dist/list/index.d.ts +10 -0
- package/dist/list/index.js +2 -0
- package/dist/list/list-context.d.ts +8 -0
- package/dist/list/types.d.ts +66 -0
- package/dist/list-DHIOE2Y-.js +387 -0
- package/dist/modal/ConfirmModal.vue.d.ts +14 -0
- package/dist/modal/Modal.vue.d.ts +15 -0
- package/dist/modal/ModalDefaultFooter.vue.d.ts +22 -0
- package/dist/modal/ModalDialog.vue.d.ts +53 -0
- package/dist/modal/ModalInnerContent.vue.d.ts +38 -0
- package/dist/modal/ModalNodeRenderer.d.ts +15 -0
- package/dist/modal/imperative.d.ts +9 -0
- package/dist/modal/index.d.ts +8 -0
- package/dist/modal/index.js +2 -0
- package/dist/modal/types.d.ts +92 -0
- package/dist/modal/use-modal.d.ts +2 -0
- package/dist/modal-YVolL7Hz.js +221 -0
- package/dist/navigation/CollapseButton.vue.d.ts +12 -0
- package/dist/navigation/NavFooter.vue.d.ts +15 -0
- package/dist/navigation/NavHeader.vue.d.ts +13 -0
- package/dist/navigation/NavItem.d.ts +177 -0
- package/dist/navigation/Navigation.vue.d.ts +29 -0
- package/dist/navigation/NavigationContextProvider.d.ts +16 -0
- package/dist/navigation/NavigationIconRenderer.d.ts +45 -0
- package/dist/navigation/NavigationItemTree.vue.d.ts +8 -0
- package/dist/navigation/NavigationNodeRenderer.d.ts +18 -0
- package/dist/navigation/SubNav.vue.d.ts +18 -0
- package/dist/navigation/index.d.ts +14 -0
- package/dist/navigation/index.js +2 -0
- package/dist/navigation/navigation-context.d.ts +35 -0
- package/dist/navigation/types.d.ts +177 -0
- package/dist/navigation-DF8R5jFK.js +1479 -0
- package/dist/notification/NotificationHost.vue.d.ts +7 -0
- package/dist/notification/NotificationNodeRenderer.d.ts +15 -0
- package/dist/notification/NotificationNotice.vue.d.ts +16 -0
- package/dist/notification/imperative.d.ts +12 -0
- package/dist/notification/index.d.ts +6 -0
- package/dist/notification/index.js +2 -0
- package/dist/notification/notification-store.d.ts +24 -0
- package/dist/notification/types.d.ts +63 -0
- package/dist/notification/use-notification.d.ts +2 -0
- package/dist/notification-DIsvgiIO.js +445 -0
- package/dist/overflow-list/OverflowList.vue.d.ts +131 -0
- package/dist/overflow-list/OverflowListNodeRenderer.d.ts +35 -0
- package/dist/overflow-list/index.d.ts +5 -0
- package/dist/overflow-list/index.js +2 -0
- package/dist/overflow-list/types.d.ts +35 -0
- package/dist/overflow-list-Df6ixrtB.js +413 -0
- package/dist/pagination/Pagination.vue.d.ts +25 -0
- package/dist/pagination/PaginationNodeRenderer.d.ts +15 -0
- package/dist/pagination/PaginationPopover.vue.d.ts +25 -0
- package/dist/pagination/PaginationRestList.vue.d.ts +11 -0
- package/dist/pagination/index.d.ts +3 -0
- package/dist/pagination/index.js +2 -0
- package/dist/pagination/types.d.ts +46 -0
- package/dist/pin-code/PinCode.vue.d.ts +20 -0
- package/dist/pin-code/index.d.ts +10 -0
- package/dist/pin-code/index.js +2 -0
- package/dist/pin-code/types.d.ts +25 -0
- package/dist/pin-code-wY5g0KLD.js +193 -0
- package/dist/popconfirm/Popconfirm.vue.d.ts +25 -0
- package/dist/popconfirm/PopconfirmNodeRenderer.d.ts +15 -0
- package/dist/popconfirm/index.d.ts +4 -0
- package/dist/popconfirm/index.js +2 -0
- package/dist/popconfirm/types.d.ts +57 -0
- package/dist/popconfirm-DQUtvI0A.js +389 -0
- package/dist/popover/Popover.vue.d.ts +23 -0
- package/dist/popover/PopoverArrow.vue.d.ts +10 -0
- package/dist/popover/index.d.ts +4 -0
- package/dist/popover/index.js +2 -0
- package/dist/popover/types.d.ts +35 -0
- package/dist/popover-hD77YpUM.js +292 -0
- package/dist/progress/Progress.vue.d.ts +24 -0
- package/dist/progress/ProgressCircle.vue.d.ts +26 -0
- package/dist/progress/ProgressLine.vue.d.ts +23 -0
- package/dist/progress/ProgressNodeRenderer.d.ts +15 -0
- package/dist/progress/index.d.ts +6 -0
- package/dist/progress/index.js +2 -0
- package/dist/progress/types.d.ts +44 -0
- package/dist/progress-DIIyWKKD.js +9 -0
- package/dist/radio/Radio.vue.d.ts +30 -0
- package/dist/radio/RadioGroup.d.ts +201 -0
- package/dist/radio/RadioNodeRenderer.d.ts +15 -0
- package/dist/radio/index.d.ts +10 -0
- package/dist/radio/index.js +2 -0
- package/dist/radio/radio-context.d.ts +15 -0
- package/dist/radio/types.d.ts +100 -0
- package/dist/radio-y9iAI359.js +565 -0
- package/dist/rating/Rating.vue.d.ts +39 -0
- package/dist/rating/RatingItem.vue.d.ts +33 -0
- package/dist/rating/RatingNodeRenderer.d.ts +17 -0
- package/dist/rating/index.d.ts +6 -0
- package/dist/rating/index.js +2 -0
- package/dist/rating/types.d.ts +57 -0
- package/dist/rating-CJkb4pkD.js +542 -0
- package/dist/resizable/Resizable.vue.d.ts +31 -0
- package/dist/resizable/ResizableNodeRenderer.d.ts +17 -0
- package/dist/resizable/ResizeGroup.vue.d.ts +13 -0
- package/dist/resizable/ResizeHandler.vue.d.ts +11 -0
- package/dist/resizable/ResizeItem.vue.d.ts +19 -0
- package/dist/resizable/SingleResizeHandle.vue.d.ts +21 -0
- package/dist/resizable/index.d.ts +6 -0
- package/dist/resizable/index.js +2 -0
- package/dist/resizable/resizable-context.d.ts +27 -0
- package/dist/resizable/types.d.ts +87 -0
- package/dist/resizable/use-resize-group.d.ts +21 -0
- package/dist/resizable/use-single-resize.d.ts +30 -0
- package/dist/resizable-CEB0ZdGT.js +814 -0
- package/dist/scroll-list/ScrollItem.vue.d.ts +21 -0
- package/dist/scroll-list/ScrollList.vue.d.ts +11 -0
- package/dist/scroll-list/ScrollListNodeRenderer.d.ts +15 -0
- package/dist/scroll-list/index.d.ts +10 -0
- package/dist/scroll-list/index.js +2 -0
- package/dist/scroll-list/types.d.ts +54 -0
- package/dist/scroll-list-BSXksNOR.js +466 -0
- package/dist/select/Select.vue.d.ts +39 -0
- package/dist/select/SelectFragment.d.ts +4 -0
- package/dist/select/SelectNodeRenderer.d.ts +15 -0
- package/dist/select/SelectOption.vue.d.ts +13 -0
- package/dist/select/SelectOptionCollector.d.ts +13 -0
- package/dist/select/SelectOptionGroup.vue.d.ts +14 -0
- package/dist/select/index.d.ts +12 -0
- package/dist/select/index.js +3 -0
- package/dist/select/types.d.ts +165 -0
- package/dist/select/use-select-foundation.d.ts +64 -0
- package/dist/select-BeM6gxAU.js +40 -0
- package/dist/side-sheet/SideSheet.vue.d.ts +19 -0
- package/dist/side-sheet/SideSheetContent.vue.d.ts +37 -0
- package/dist/side-sheet/SideSheetNodeRenderer.d.ts +15 -0
- package/dist/side-sheet/index.d.ts +4 -0
- package/dist/side-sheet/index.js +2 -0
- package/dist/side-sheet/types.d.ts +46 -0
- package/dist/side-sheet-9CBTk23r.js +542 -0
- package/dist/skeleton/Skeleton.vue.d.ts +15 -0
- package/dist/skeleton/SkeletonAvatar.vue.d.ts +9 -0
- package/dist/skeleton/SkeletonButton.vue.d.ts +7 -0
- package/dist/skeleton/SkeletonImage.vue.d.ts +7 -0
- package/dist/skeleton/SkeletonNodeRenderer.d.ts +15 -0
- package/dist/skeleton/SkeletonParagraph.vue.d.ts +8 -0
- package/dist/skeleton/SkeletonTitle.vue.d.ts +7 -0
- package/dist/skeleton/index.d.ts +18 -0
- package/dist/skeleton/index.js +2 -0
- package/dist/skeleton/types.d.ts +36 -0
- package/dist/skeleton-p61lfhoz.js +302 -0
- package/dist/slider/Slider.vue.d.ts +32 -0
- package/dist/slider/SliderFragment.d.ts +4 -0
- package/dist/slider/index.d.ts +5 -0
- package/dist/slider/index.js +5 -0
- package/dist/slider/types.d.ts +57 -0
- package/dist/slider/use-slider-foundation.d.ts +47 -0
- package/dist/space/Space.vue.d.ts +16 -0
- package/dist/space/index.d.ts +3 -0
- package/dist/space/index.js +2 -0
- package/dist/space/types.d.ts +15 -0
- package/dist/space-DVnFbkCz.js +63 -0
- package/dist/spin/Spin.vue.d.ts +105 -0
- package/dist/spin/SpinNodeRenderer.d.ts +15 -0
- package/dist/spin/index.d.ts +6 -0
- package/dist/spin/index.js +2 -0
- package/dist/spin/types.d.ts +20 -0
- package/dist/spin-D-1P0WMW.js +9 -0
- package/dist/src-DNBBthjO.js +490 -0
- package/dist/steps/Step.vue.d.ts +22 -0
- package/dist/steps/Steps.vue.d.ts +24 -0
- package/dist/steps/StepsNodeRenderer.d.ts +17 -0
- package/dist/steps/index.d.ts +9 -0
- package/dist/steps/index.js +2 -0
- package/dist/steps/steps-context.d.ts +6 -0
- package/dist/steps/types.d.ts +54 -0
- package/dist/steps-6p04q-Lz.js +303 -0
- package/dist/switch/Switch.vue.d.ts +27 -0
- package/dist/switch/SwitchNodeRenderer.d.ts +15 -0
- package/dist/switch/SwitchSpin.vue.d.ts +7 -0
- package/dist/switch/index.d.ts +7 -0
- package/dist/switch/index.js +2 -0
- package/dist/switch/types.d.ts +28 -0
- package/dist/switch-Dte2Fl3l.js +284 -0
- package/dist/table/Table.vue.d.ts +29 -0
- package/dist/table/TableBody.vue.d.ts +70 -0
- package/dist/table/TableCell.vue.d.ts +37 -0
- package/dist/table/TableColumn.d.ts +81 -0
- package/dist/table/TableFilterMenu.vue.d.ts +18 -0
- package/dist/table/TableHeader.vue.d.ts +46 -0
- package/dist/table/TableNativeElement.d.ts +9 -0
- package/dist/table/TableNodeRenderer.d.ts +13 -0
- package/dist/table/TableSpin.vue.d.ts +16 -0
- package/dist/table/index.d.ts +13 -0
- package/dist/table/index.js +2 -0
- package/dist/table/table-utils.d.ts +43 -0
- package/dist/table/types.d.ts +323 -0
- package/dist/table-jZkHjf-W.js +2097 -0
- package/dist/tabs/TabBar.vue.d.ts +38 -0
- package/dist/tabs/TabItem.vue.d.ts +26 -0
- package/dist/tabs/TabPane.vue.d.ts +13 -0
- package/dist/tabs/Tabs.vue.d.ts +36 -0
- package/dist/tabs/TabsDropdown.vue.d.ts +27 -0
- package/dist/tabs/TabsNodeRenderer.d.ts +15 -0
- package/dist/tabs/index.d.ts +6 -0
- package/dist/tabs/index.js +2 -0
- package/dist/tabs/tabs-context.d.ts +12 -0
- package/dist/tabs/types.d.ts +110 -0
- package/dist/tabs-CezuYzIu.js +874 -0
- package/dist/tag/SplitTagGroup.d.ts +36 -0
- package/dist/tag/Tag.vue.d.ts +33 -0
- package/dist/tag/TagGroup.d.ts +115 -0
- package/dist/tag/TagNodeRenderer.d.ts +15 -0
- package/dist/tag/index.d.ts +8 -0
- package/dist/tag/index.js +2 -0
- package/dist/tag/types.d.ts +82 -0
- package/dist/tag-BPD0bELU.js +348 -0
- package/dist/tag-input/TagInput.vue.d.ts +51 -0
- package/dist/tag-input/TagInputNodeRenderer.d.ts +17 -0
- package/dist/tag-input/TagInputRestPopover.vue.d.ts +19 -0
- package/dist/tag-input/TagInputTag.vue.d.ts +27 -0
- package/dist/tag-input/index.d.ts +5 -0
- package/dist/tag-input/index.js +2 -0
- package/dist/tag-input/types.d.ts +95 -0
- package/dist/tag-input/use-tag-input-foundation.d.ts +47 -0
- package/dist/tag-input-SxUfNqF0.js +784 -0
- package/dist/time-picker/TimePicker.vue.d.ts +27 -0
- package/dist/time-picker/TimePickerColumn.vue.d.ts +29 -0
- package/dist/time-picker/TimePickerNodeRenderer.d.ts +17 -0
- package/dist/time-picker/TimePickerPanel.vue.d.ts +32 -0
- package/dist/time-picker/index.d.ts +5 -0
- package/dist/time-picker/index.js +2 -0
- package/dist/time-picker/types.d.ts +146 -0
- package/dist/time-picker/use-time-picker-foundation.d.ts +36 -0
- package/dist/time-picker-D6p36ea8.js +3587 -0
- package/dist/timeline/Timeline.vue.d.ts +69 -0
- package/dist/timeline/TimelineItem.vue.d.ts +100 -0
- package/dist/timeline/TimelineNodeRenderer.d.ts +15 -0
- package/dist/timeline/index.d.ts +10 -0
- package/dist/timeline/index.js +2 -0
- package/dist/timeline/types.d.ts +43 -0
- package/dist/timeline-2D5xCZsU.js +191 -0
- package/dist/toast/ToastHost.vue.d.ts +7 -0
- package/dist/toast/ToastIconRenderer.d.ts +17 -0
- package/dist/toast/ToastNodeRenderer.d.ts +15 -0
- package/dist/toast/ToastNotice.vue.d.ts +20 -0
- package/dist/toast/imperative.d.ts +3 -0
- package/dist/toast/index.d.ts +6 -0
- package/dist/toast/index.js +2 -0
- package/dist/toast/toast-store.d.ts +30 -0
- package/dist/toast/types.d.ts +65 -0
- package/dist/toast/use-toast.d.ts +2 -0
- package/dist/toast-s8nFLf8t.js +523 -0
- package/dist/tooltip/Tooltip.vue.d.ts +23 -0
- package/dist/tooltip/TooltipArrow.vue.d.ts +8 -0
- package/dist/tooltip/TooltipNodeRenderer.d.ts +15 -0
- package/dist/tooltip/TooltipPortal.vue.d.ts +44 -0
- package/dist/tooltip/TooltipTriggerRenderer.d.ts +66 -0
- package/dist/tooltip/index.d.ts +5 -0
- package/dist/tooltip/index.js +3 -0
- package/dist/tooltip/types.d.ts +117 -0
- package/dist/tooltip/use-tooltip-foundation.d.ts +25 -0
- package/dist/tooltip-en9bvXRp.js +28 -0
- package/dist/transfer/Transfer.vue.d.ts +35 -0
- package/dist/transfer/TransferNodeRenderer.d.ts +15 -0
- package/dist/transfer/index.d.ts +5 -0
- package/dist/transfer/index.js +2 -0
- package/dist/transfer/types.d.ts +159 -0
- package/dist/transfer-Doq1sI9z.js +695 -0
- package/dist/tree/Tree.vue.d.ts +73 -0
- package/dist/tree/TreeNode.vue.d.ts +77 -0
- package/dist/tree/TreeNodeMotion.vue.d.ts +20 -0
- package/dist/tree/TreeNodeRenderer.d.ts +15 -0
- package/dist/tree/index.d.ts +9 -0
- package/dist/tree/index.js +5 -0
- package/dist/tree/types.d.ts +180 -0
- package/dist/tree-select/TreeSelect.vue.d.ts +76 -0
- package/dist/tree-select/TreeSelectNodeRenderer.d.ts +15 -0
- package/dist/tree-select/index.d.ts +6 -0
- package/dist/tree-select/index.js +2 -0
- package/dist/tree-select/types.d.ts +156 -0
- package/dist/tree-select-BIu6Owuq.js +1237 -0
- package/dist/treeUtil-IUdRJ6Ws.js +277 -0
- package/dist/typography/Numeral.vue.d.ts +32 -0
- package/dist/typography/Paragraph.vue.d.ts +30 -0
- package/dist/typography/Text.vue.d.ts +30 -0
- package/dist/typography/Title.vue.d.ts +28 -0
- package/dist/typography/Typography.vue.d.ts +13 -0
- package/dist/typography/TypographyBase.vue.d.ts +40 -0
- package/dist/typography/TypographyCopyable.vue.d.ts +29 -0
- package/dist/typography/TypographyDecorations.d.ts +34 -0
- package/dist/typography/TypographyNodeRenderer.d.ts +17 -0
- package/dist/typography/index.d.ts +17 -0
- package/dist/typography/index.js +2 -0
- package/dist/typography/types.d.ts +108 -0
- package/dist/typography/typography-locale.d.ts +5 -0
- package/dist/typography/typography-utils.d.ts +4 -0
- package/dist/typography-DF8KwKuL.js +914 -0
- package/dist/upload/Upload.vue.d.ts +69 -0
- package/dist/upload/UploadFileCard.vue.d.ts +4 -0
- package/dist/upload/UploadNodeRenderer.d.ts +15 -0
- package/dist/upload/index.d.ts +10 -0
- package/dist/upload/index.js +2 -0
- package/dist/upload/types.d.ts +250 -0
- package/dist/upload-BzdpoGJX.js +1777 -0
- package/dist/uuid-BUHV1G8U.js +21 -0
- package/dist/warning-naSiE8G7.js +6 -0
- package/dist/zh-CN-CCu7YvUA.js +1623 -0
- package/package.json +336 -0
|
@@ -0,0 +1,1237 @@
|
|
|
1
|
+
import "./src-DNBBthjO.js";
|
|
2
|
+
import { _ as e, d as t, h as n, i as r, p as i, s as a, t as o, v as s } from "./foundation-Cawx37mp.js";
|
|
3
|
+
import { t as c } from "./env-BeIzjQx7.js";
|
|
4
|
+
import { t as l } from "./constants-BNwzO87W.js";
|
|
5
|
+
import "./keyCode-DMNg63wX.js";
|
|
6
|
+
import { t as u } from "./isEnterPress-HTy0eCBp.js";
|
|
7
|
+
import { _ as d, b as f, c as p, d as m, f as h, h as g, i as _, l as v, m as y, n as b, p as x, r as S, s as C, t as ee, v as w, y as T } from "./treeUtil-IUdRJ6Ws.js";
|
|
8
|
+
import { n as te } from "./popover-hD77YpUM.js";
|
|
9
|
+
import { t as ne } from "./input-wf0nZCRS.js";
|
|
10
|
+
import { t as re } from "./tag-input-SxUfNqF0.js";
|
|
11
|
+
import { t as ie } from "./config-context-CyynTtDb.js";
|
|
12
|
+
import { n as ae, r as oe } from "./tag-BPD0bELU.js";
|
|
13
|
+
import { Tree as se } from "./tree/index.js";
|
|
14
|
+
import { Fragment as ce, computed as E, createBlock as D, createCommentVNode as O, createElementBlock as k, createElementVNode as A, createVNode as j, defineComponent as M, getCurrentInstance as le, h as ue, inject as de, markRaw as fe, mergeProps as N, nextTick as pe, normalizeClass as P, normalizeStyle as me, onBeforeUnmount as he, onMounted as ge, openBlock as F, shallowReactive as _e, shallowRef as ve, unref as I, useAttrs as ye, useSlots as be, useTemplateRef as L, watch as R, withCtx as xe } from "vue";
|
|
15
|
+
import { IconChevronDown as Se, IconClear as Ce, IconSearch as we } from "@aifuxi/semi-icons-vue";
|
|
16
|
+
`${c}`, `${c}`, `${c}`;
|
|
17
|
+
var z = {
|
|
18
|
+
SIZE_SET: [
|
|
19
|
+
"small",
|
|
20
|
+
"large",
|
|
21
|
+
"default"
|
|
22
|
+
],
|
|
23
|
+
SEARCH_POSITION_DROPDOWN: "dropdown",
|
|
24
|
+
SEARCH_POSITION_TRIGGER: "trigger",
|
|
25
|
+
STATUS: l
|
|
26
|
+
}, Te = class extends o {
|
|
27
|
+
constructor(e) {
|
|
28
|
+
super({ ...e }), this.handleKeyDown = (e) => {
|
|
29
|
+
e.key === "Escape" && this.getState("isOpen") && this.close(e);
|
|
30
|
+
}, this._registerClickOutsideHandler = () => {
|
|
31
|
+
this._adapter.registerClickOutsideHandler((e) => {
|
|
32
|
+
this.handlerTriggerBlur(e), this.close(e);
|
|
33
|
+
});
|
|
34
|
+
}, this.clearInputValue = () => {
|
|
35
|
+
let { inputValue: e } = this.getStates();
|
|
36
|
+
e && this._adapter.updateInputValue("");
|
|
37
|
+
}, this.onClickSingleTriggerSearchItem = (e) => {
|
|
38
|
+
this.focusInput(!0);
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
init() {
|
|
42
|
+
let { searchAutoFocus: e, searchPosition: t, filterTreeNode: n } = this.getProps(), r = t === z.SEARCH_POSITION_TRIGGER && n, i = e && r;
|
|
43
|
+
this._setDropdownWidth();
|
|
44
|
+
let a = !this._isDisabled();
|
|
45
|
+
(this.getProp("defaultOpen") || i) && a && (this.open(), this._registerClickOutsideHandler()), i && a && this.handleTriggerFocus(null);
|
|
46
|
+
}
|
|
47
|
+
destroy() {
|
|
48
|
+
this._adapter.unregisterClickOutsideHandler();
|
|
49
|
+
}
|
|
50
|
+
_setDropdownWidth() {
|
|
51
|
+
let { style: t, dropdownMatchSelectWidth: r } = this.getProps(), i;
|
|
52
|
+
r && (i = t && (0, n.default)(t.width) || t && (0, e.default)(t.width) && !t.width.includes("%") ? t.width : this._adapter.getTriggerWidth(), this._adapter.setOptionWrapperWidth(i));
|
|
53
|
+
}
|
|
54
|
+
_isMultiple() {
|
|
55
|
+
return this.getProp("multiple");
|
|
56
|
+
}
|
|
57
|
+
_isAnimated() {
|
|
58
|
+
return this.getProp("motionExpand");
|
|
59
|
+
}
|
|
60
|
+
_isDisabled(e = {}) {
|
|
61
|
+
return this.getProp("disabled") || e.disabled;
|
|
62
|
+
}
|
|
63
|
+
_isExpandControlled() {
|
|
64
|
+
return this.getProp("expandedKeys");
|
|
65
|
+
}
|
|
66
|
+
_isSelectToClose() {
|
|
67
|
+
return !this.getProp("expandAction");
|
|
68
|
+
}
|
|
69
|
+
_isLoadControlled() {
|
|
70
|
+
return this.getProp("loadedKeys");
|
|
71
|
+
}
|
|
72
|
+
_showFilteredOnly() {
|
|
73
|
+
let { inputValue: e } = this.getStates(), { showFilteredOnly: t } = this.getProps();
|
|
74
|
+
return !!e && t;
|
|
75
|
+
}
|
|
76
|
+
findDataForValue(e) {
|
|
77
|
+
let { value: t, defaultValue: n, keyMaps: r } = this.getProps(), i = (0, a.default)(r, "value", "value"), o = (0, a.default)(r, "key", "key"), s = [];
|
|
78
|
+
return t ? s = Array.isArray(t) ? t : [t] : n && (s = Array.isArray(n) ? n : [n]), s.find((t) => t[i] === e || t[o] === e);
|
|
79
|
+
}
|
|
80
|
+
constructDataForValue(e) {
|
|
81
|
+
let { treeNodeLabelProp: t, keyMaps: n } = this.getProps(), r = (0, a.default)(n, "key", "key"), i = (0, a.default)(n, "label", t);
|
|
82
|
+
return {
|
|
83
|
+
[r]: e,
|
|
84
|
+
[i]: e
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
getDataForKeyNotInKeyEntities(e) {
|
|
88
|
+
let { onChangeWithObject: t } = this.getProps();
|
|
89
|
+
return t ? this.findDataForValue(e) : this.constructDataForValue(e);
|
|
90
|
+
}
|
|
91
|
+
getTreeNodeProps(e) {
|
|
92
|
+
let { expandedKeys: t = /* @__PURE__ */ new Set([]), selectedKeys: n = [], checkedKeys: r = /* @__PURE__ */ new Set([]), halfCheckedKeys: i = /* @__PURE__ */ new Set([]), realCheckedKeys: a = /* @__PURE__ */ new Set([]), keyEntities: o = {}, filteredKeys: s = /* @__PURE__ */ new Set([]), inputValue: c = "", loadedKeys: l, loadingKeys: u, filteredExpandedKeys: d = /* @__PURE__ */ new Set([]), disabledKeys: f = /* @__PURE__ */ new Set([]) } = this.getStates(), { treeNodeFilterProp: p, checkRelation: m } = this.getProps(), h = o[e];
|
|
93
|
+
if (!h) return null;
|
|
94
|
+
let g = !1, _ = !1;
|
|
95
|
+
m === "related" ? (g = r.has(e), _ = i.has(e)) : m === "unRelated" && (g = a.has(e), _ = !1);
|
|
96
|
+
let v = {
|
|
97
|
+
eventKey: e,
|
|
98
|
+
expanded: c ? d.has(e) : t.has(e),
|
|
99
|
+
selected: n.includes(e),
|
|
100
|
+
checked: g,
|
|
101
|
+
halfChecked: _,
|
|
102
|
+
pos: String(h ? h.pos : ""),
|
|
103
|
+
level: h.level,
|
|
104
|
+
filtered: s.has(e),
|
|
105
|
+
keyword: c,
|
|
106
|
+
treeNodeFilterProp: p,
|
|
107
|
+
loading: u.has(e) && !l.has(e),
|
|
108
|
+
loaded: l.has(e)
|
|
109
|
+
};
|
|
110
|
+
return this.getProp("disableStrictly") && f.has(e) && (v.disabled = !0), v;
|
|
111
|
+
}
|
|
112
|
+
handleNodeLoad(e, t, n, r) {
|
|
113
|
+
let { loadData: i } = this.getProps(), { key: a } = n;
|
|
114
|
+
return !i || e.has(a) || t.has(a) ? {} : (i(n).then(() => {
|
|
115
|
+
let e = new Set(this.getState("loadedKeys")), t = new Set(this.getState("loadingKeys")), i = e.add(a), o = /* @__PURE__ */ new Set([...t]);
|
|
116
|
+
o.delete(a), this._adapter.notifyLoad(i, n), this._isLoadControlled() || this._adapter.updateState({ loadedKeys: i }), this._adapter.setState({ loadingKeys: o }), r();
|
|
117
|
+
}), { loadingKeys: t.add(a) });
|
|
118
|
+
}
|
|
119
|
+
/* istanbul ignore next */
|
|
120
|
+
focusInput(e) {
|
|
121
|
+
this._adapter.updateInputFocus(e);
|
|
122
|
+
}
|
|
123
|
+
_notifyMultipleChange(e, t) {
|
|
124
|
+
let { keyEntities: n } = this.getStates(), { leafOnly: r, checkRelation: i, keyMaps: a, autoMergeValue: o } = this.getProps(), s = [];
|
|
125
|
+
i === "related" ? s = o ? T(e, n, r, !0) : e : i === "unRelated" && (s = e);
|
|
126
|
+
let c = s.map((e) => n[e] && n[e].key === e ? n[e].data : this.getDataForKeyNotInKeyEntities(e));
|
|
127
|
+
if (this.getProp("onChangeWithObject")) this._adapter.notifyChangeWithObject(c, t);
|
|
128
|
+
else {
|
|
129
|
+
let e = w(c, a);
|
|
130
|
+
this._adapter.notifyChange(e, c, t);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
_notifyChange(e, t) {
|
|
134
|
+
let { keyEntities: n } = this.getStates(), { keyMaps: r } = this.getProps();
|
|
135
|
+
if (this._isMultiple() && Array.isArray(e)) this._notifyMultipleChange(e, t);
|
|
136
|
+
else {
|
|
137
|
+
let i = (0, s.default)(e) ? e : n[e].data, a = (0, s.default)(e) ? e : w(i, r);
|
|
138
|
+
this.getProp("onChangeWithObject") ? this._adapter.notifyChangeWithObject(i, t) : this._adapter.notifyChange(a, i, t);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
_notifyFocus(e) {
|
|
142
|
+
this._adapter.notifyFocus(e);
|
|
143
|
+
}
|
|
144
|
+
handleTriggerFocus(e) {
|
|
145
|
+
this._adapter.updateIsFocus(!0), this._notifyFocus(e), this._registerClickOutsideHandler();
|
|
146
|
+
}
|
|
147
|
+
_notifyBlur(e) {
|
|
148
|
+
this._adapter.notifyBlur(e);
|
|
149
|
+
}
|
|
150
|
+
handlerTriggerBlur(e) {
|
|
151
|
+
this.getState("isFocus") && (this._adapter.updateIsFocus(!1), this._notifyBlur(e), this._adapter.unregisterClickOutsideHandler());
|
|
152
|
+
}
|
|
153
|
+
toggleHoverState(e) {
|
|
154
|
+
this._adapter.toggleHovering(e);
|
|
155
|
+
}
|
|
156
|
+
open() {
|
|
157
|
+
this._adapter.openMenu(), this._setDropdownWidth();
|
|
158
|
+
}
|
|
159
|
+
close(e) {
|
|
160
|
+
this._adapter.closeMenu(), this.getProp("motionExpand") && this._adapter.updateState({ motionKeys: /* @__PURE__ */ new Set([]) });
|
|
161
|
+
}
|
|
162
|
+
handleClick(e) {
|
|
163
|
+
let t = this._isDisabled(), { isOpen: n, inputValue: r, isFocus: i } = this.getStates(), { searchPosition: a, clickTriggerToHide: o } = this.getProps();
|
|
164
|
+
if (!t) {
|
|
165
|
+
if (i || this.handleTriggerFocus(e), n) {
|
|
166
|
+
if (a === "trigger" && r) return;
|
|
167
|
+
o && this.close(e);
|
|
168
|
+
} else this.open();
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
/* istanbul ignore next */
|
|
172
|
+
handleSelectionEnterPress(e) {
|
|
173
|
+
u(e) && this.handleClick(e);
|
|
174
|
+
}
|
|
175
|
+
handleClear(e) {
|
|
176
|
+
let { searchPosition: n, filterTreeNode: r } = this.getProps(), { inputValue: i, selectedKeys: a } = this.getStates(), o = this._isMultiple(), s = this._isControlledComponent(), c = o ? [] : void 0;
|
|
177
|
+
this._notifyChange(c, e), s || (this._adapter.rePositionDropdown(), this._adapter.updateState({
|
|
178
|
+
selectedKeys: [],
|
|
179
|
+
checkedKeys: /* @__PURE__ */ new Set(),
|
|
180
|
+
halfCheckedKeys: /* @__PURE__ */ new Set(),
|
|
181
|
+
realCheckedKeys: /* @__PURE__ */ new Set([])
|
|
182
|
+
})), r && n === z.SEARCH_POSITION_TRIGGER && i !== "" && ((0, t.default)(a) ? this.handleInputChange("") : this.clearInput()), this._adapter.notifyClear(e);
|
|
183
|
+
}
|
|
184
|
+
/* istanbul ignore next */
|
|
185
|
+
handleClearEnterPress(e) {
|
|
186
|
+
u(e) && this.handleClear(e);
|
|
187
|
+
}
|
|
188
|
+
removeTag(e) {
|
|
189
|
+
let { disableStrictly: t, checkRelation: n, keyMaps: r } = this.getProps(), { keyEntities: i, disabledKeys: o, realCheckedKeys: s } = this.getStates(), c = i[e] && i[e].key === e ? i[e].data : this.getDataForKeyNotInKeyEntities(e);
|
|
190
|
+
if (!(c[(0, a.default)(r, "disabled", "disabled")] || t && o.has(e))) {
|
|
191
|
+
if (n === "unRelated") {
|
|
192
|
+
let t = new Set(s);
|
|
193
|
+
t.delete(e), this._notifyChange([...t], null), this._isControlledComponent() || (this._adapter.updateState({ realCheckedKeys: t }), this._adapter.rePositionDropdown());
|
|
194
|
+
} else if (n === "related") {
|
|
195
|
+
let { checkedKeys: t, halfCheckedKeys: n } = this.calcCheckedKeys(e, !1);
|
|
196
|
+
this._notifyChange([...t], null), this._isControlledComponent() || (this._adapter.updateState({
|
|
197
|
+
checkedKeys: t,
|
|
198
|
+
halfCheckedKeys: n
|
|
199
|
+
}), this._adapter.rePositionDropdown());
|
|
200
|
+
}
|
|
201
|
+
this._adapter.notifySelect(e, !1, c), this._adapter.rePositionDropdown();
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
clearInput() {
|
|
205
|
+
let { flattenNodes: e, expandedKeys: t, selectedKeys: n, keyEntities: r, treeData: i } = this.getStates(), { keyMaps: a } = this.getProps(), o = new Set(t);
|
|
206
|
+
this._isExpandControlled();
|
|
207
|
+
let s = h(n, r, !1);
|
|
208
|
+
s.forEach((e) => o.add(e));
|
|
209
|
+
let c = g(i, o, a);
|
|
210
|
+
this._adapter.updateState({
|
|
211
|
+
expandedKeys: o,
|
|
212
|
+
flattenNodes: c,
|
|
213
|
+
inputValue: "",
|
|
214
|
+
motionKeys: /* @__PURE__ */ new Set([]),
|
|
215
|
+
filteredKeys: /* @__PURE__ */ new Set([]),
|
|
216
|
+
filteredExpandedKeys: new Set(s),
|
|
217
|
+
filteredShownKeys: /* @__PURE__ */ new Set([])
|
|
218
|
+
}), this._adapter.rePositionDropdown();
|
|
219
|
+
}
|
|
220
|
+
handleInputChange(e) {
|
|
221
|
+
this._adapter.updateInputValue(e);
|
|
222
|
+
let { flattenNodes: t, expandedKeys: n, selectedKeys: r, keyEntities: i, treeData: o } = this.getStates(), { showFilteredOnly: s, filterTreeNode: c, treeNodeFilterProp: l, keyMaps: u, remote: d } = this.getProps();
|
|
223
|
+
if (d) {
|
|
224
|
+
this._adapter.notifySearch(e, [], []), this._adapter.rePositionDropdown();
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
let f = l === "label" ? (0, a.default)(u, "label", "label") : l, p = new Set(n), _ = [], v = [], y = [], b = [], S = /* @__PURE__ */ new Set([]);
|
|
228
|
+
if (!e) y = h(r, i, !1), y.forEach((e) => p.add(e)), b = g(o, p, u);
|
|
229
|
+
else {
|
|
230
|
+
let t = Object.values(i).filter((t) => {
|
|
231
|
+
let { data: n } = t;
|
|
232
|
+
return m(e, n, c, f);
|
|
233
|
+
});
|
|
234
|
+
_ = t.map((e) => e.data), v = t.map((e) => e.key), y = h(v, i, !1);
|
|
235
|
+
let n = x(v, i, !0);
|
|
236
|
+
S = /* @__PURE__ */ new Set([...n, ...y]), b = g(o, new Set(y), u, s && S);
|
|
237
|
+
}
|
|
238
|
+
let C = new Set(y);
|
|
239
|
+
this._adapter.notifySearch(e, Array.from(C), _), this._adapter.updateState({
|
|
240
|
+
expandedKeys: p,
|
|
241
|
+
flattenNodes: b,
|
|
242
|
+
motionKeys: /* @__PURE__ */ new Set([]),
|
|
243
|
+
filteredKeys: new Set(v),
|
|
244
|
+
filteredExpandedKeys: C,
|
|
245
|
+
filteredShownKeys: S
|
|
246
|
+
}), this._adapter.rePositionDropdown();
|
|
247
|
+
}
|
|
248
|
+
handleNodeSelect(e, t) {
|
|
249
|
+
this._isDisabled(t) || (this._isMultiple() ? this.handleMultipleSelect(e, t) : this.handleSingleSelect(e, t));
|
|
250
|
+
}
|
|
251
|
+
handleSingleSelect(e, t) {
|
|
252
|
+
let n = [...this.getState("selectedKeys")], { clickToHide: r } = this.getProps(), { selected: i, eventKey: a, data: o } = t;
|
|
253
|
+
this._adapter.notifySelect(a, !0, o), !n.includes(a) && !i && (n = [a], this._notifyChange(a, e), this._isControlledComponent() || this._adapter.updateState({ selectedKeys: n })), r && (this._isSelectToClose() || !o.children) && (this.close(e), this.handlerTriggerBlur(e));
|
|
254
|
+
}
|
|
255
|
+
calcCheckedKeys(e, t) {
|
|
256
|
+
let { keyEntities: n } = this.getStates(), r = new Set(this.getState("checkedKeys")), i = new Set(this.getState("halfCheckedKeys"));
|
|
257
|
+
return t ? b(e, n, r, i) : S(e, n, r, i);
|
|
258
|
+
}
|
|
259
|
+
handleMultipleSelect(e, t) {
|
|
260
|
+
let { searchPosition: n, disableStrictly: r, checkRelation: i } = this.getProps(), { inputValue: a, realCheckedKeys: o } = this.getStates(), { checked: s, eventKey: c, data: l } = t;
|
|
261
|
+
if (i === "related") {
|
|
262
|
+
let t = r ? this.calcCheckedStatus(!s, c) : !s, { checkedKeys: n, halfCheckedKeys: i } = r ? this.calcNonDisabledCheckedKeys(c, t) : this.calcCheckedKeys(c, t);
|
|
263
|
+
this._adapter.notifySelect(c, t, l), this._notifyChange([...n], e), this._isControlledComponent() || (this._adapter.updateState({
|
|
264
|
+
checkedKeys: n,
|
|
265
|
+
halfCheckedKeys: i
|
|
266
|
+
}), this._adapter.rePositionDropdown());
|
|
267
|
+
} else if (i === "unRelated") {
|
|
268
|
+
let t = new Set(o), n;
|
|
269
|
+
o.has(c) ? (t.delete(c), n = !1) : (t.add(c), n = !0), this._adapter.notifySelect(c, n, l), this._notifyChange([...t], e), this._isControlledComponent() || (this._adapter.updateState({ realCheckedKeys: t }), this._adapter.rePositionDropdown());
|
|
270
|
+
}
|
|
271
|
+
n === z.SEARCH_POSITION_TRIGGER && a !== "" && this._adapter.updateState({ inputValue: "" });
|
|
272
|
+
}
|
|
273
|
+
calcNonDisabledCheckedKeys(e, t) {
|
|
274
|
+
let { keyEntities: n, disabledKeys: i } = this.getStates(), a = new Set(this.getState("checkedKeys")), o = T(x([e], n, !1), n, !0);
|
|
275
|
+
if (!o.some((e) => i.has(e))) return this.calcCheckedKeys(e, t);
|
|
276
|
+
let s = o.filter((e) => !i.has(e)), c = t ? [...s, ...a] : (0, r.default)(T([...a], n, !0, !0), s);
|
|
277
|
+
return ee(c, n);
|
|
278
|
+
}
|
|
279
|
+
calcCheckedStatus(e, t) {
|
|
280
|
+
if (!e) return e;
|
|
281
|
+
let { checkedKeys: n, keyEntities: r, disabledKeys: i } = this.getStates(), a = T(x([t], r, !1), r, !0);
|
|
282
|
+
return a.some((e) => i.has(e)) ? !a.filter((e) => !i.has(e)).every((e) => n.has(e)) : e;
|
|
283
|
+
}
|
|
284
|
+
handleNodeExpandInSearch(e, t) {
|
|
285
|
+
let { treeData: n, filteredShownKeys: r, keyEntities: i } = this.getStates(), { keyMaps: a } = this.getProps(), o = this._showFilteredOnly(), s = new Set(this.getState("filteredExpandedKeys")), c = "show", { eventKey: l, expanded: u, data: f } = t;
|
|
286
|
+
if (u ? s.has(l) && (s.delete(l), c = "hide") : s.add(l), this._adapter.cacheFlattenNodes(c === "hide" && this._isAnimated()), !this._isExpandControlled()) {
|
|
287
|
+
let e = g(n, s, a, o && r), t = this._isAnimated() ? d(l, s, i) : [], u = {
|
|
288
|
+
filteredExpandedKeys: s,
|
|
289
|
+
flattenNodes: e,
|
|
290
|
+
motionKeys: new Set(t),
|
|
291
|
+
motionType: c
|
|
292
|
+
};
|
|
293
|
+
this._adapter.updateState(u);
|
|
294
|
+
}
|
|
295
|
+
this._adapter.notifyExpand(s, {
|
|
296
|
+
expanded: !u,
|
|
297
|
+
node: f
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
handleNodeExpand(e, t) {
|
|
301
|
+
let { loadData: n, keyMaps: r } = this.getProps(), { inputValue: i, keyEntities: a } = this.getStates(), o = !!i;
|
|
302
|
+
if (!n && (!t.children || !t.children.length)) return;
|
|
303
|
+
let s = this._isExpandControlled();
|
|
304
|
+
if (o) {
|
|
305
|
+
this.handleNodeExpandInSearch(e, t);
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
let { treeData: c } = this.getStates(), l = new Set(this.getState("expandedKeys")), u = "show", { eventKey: f, expanded: p, data: m } = t;
|
|
309
|
+
if (p ? l.has(f) && (l.delete(f), u = "hide") : l.add(f), this._adapter.cacheFlattenNodes(u === "hide" && this._isAnimated()), !s) {
|
|
310
|
+
let e = g(c, l, r), t = this._isAnimated() ? d(f, l, a) : [], n = {
|
|
311
|
+
expandedKeys: l,
|
|
312
|
+
flattenNodes: e,
|
|
313
|
+
motionKeys: new Set(t),
|
|
314
|
+
motionType: u
|
|
315
|
+
};
|
|
316
|
+
this._adapter.updateState(n);
|
|
317
|
+
}
|
|
318
|
+
this._adapter.notifyExpand(l, {
|
|
319
|
+
expanded: !p,
|
|
320
|
+
node: m
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
getRenderTextInSingle() {
|
|
324
|
+
let { renderSelectedItem: e, treeNodeLabelProp: t, keyMaps: n } = this.getProps(), { selectedKeys: r, keyEntities: o } = this.getStates(), s = (0, a.default)(n, "label", t), c = (0, i.default)(e) ? e : (e) => (0, a.default)(e, s, null), l;
|
|
325
|
+
if (r.length) {
|
|
326
|
+
let e = r[0];
|
|
327
|
+
l = o[e] && o[e].key === e ? o[e].data : this.getDataForKeyNotInKeyEntities(e);
|
|
328
|
+
}
|
|
329
|
+
return l ? c(l) : null;
|
|
330
|
+
}
|
|
331
|
+
handleInputTriggerBlur() {
|
|
332
|
+
this._adapter.updateState({ inputTriggerFocus: !1 });
|
|
333
|
+
}
|
|
334
|
+
handleInputTriggerFocus() {
|
|
335
|
+
this.clearInput(), this._adapter.updateState({ inputTriggerFocus: !0 });
|
|
336
|
+
}
|
|
337
|
+
setLoadKeys(e, t) {
|
|
338
|
+
this._adapter.updateLoadKeys(e, t);
|
|
339
|
+
}
|
|
340
|
+
handlePopoverVisibleChange(e) {
|
|
341
|
+
let { filterTreeNode: t, searchAutoFocus: n, searchPosition: r } = this.getProps();
|
|
342
|
+
e === !1 && t && this.clearInputValue(), t && r === z.SEARCH_POSITION_DROPDOWN && e && n && this.focusInput(!0);
|
|
343
|
+
}
|
|
344
|
+
handleAfterClose() {
|
|
345
|
+
let { filterTreeNode: e } = this.getProps();
|
|
346
|
+
e && this.clearInput();
|
|
347
|
+
}
|
|
348
|
+
}, B = M({
|
|
349
|
+
name: "TreeSelectNodeRenderer",
|
|
350
|
+
props: { content: {
|
|
351
|
+
type: null,
|
|
352
|
+
default: void 0
|
|
353
|
+
} },
|
|
354
|
+
setup(e) {
|
|
355
|
+
return () => e.content;
|
|
356
|
+
}
|
|
357
|
+
}), Ee = { class: "semi-tree-wrapper" }, De = {
|
|
358
|
+
key: 1,
|
|
359
|
+
class: "semi-tree-search-wrapper"
|
|
360
|
+
}, Oe = [
|
|
361
|
+
"aria-describedby",
|
|
362
|
+
"aria-disabled",
|
|
363
|
+
"aria-errormessage",
|
|
364
|
+
"aria-invalid",
|
|
365
|
+
"aria-label",
|
|
366
|
+
"aria-labelledby",
|
|
367
|
+
"aria-required",
|
|
368
|
+
"tabindex"
|
|
369
|
+
], ke = ["id"], Ae = { class: "semi-tree-select-selection" }, je = {
|
|
370
|
+
key: 1,
|
|
371
|
+
class: "semi-tree-select-suffix",
|
|
372
|
+
"x-semi-prop": "suffix"
|
|
373
|
+
}, Me = {
|
|
374
|
+
key: 3,
|
|
375
|
+
class: "semi-tree-select-arrow",
|
|
376
|
+
"x-semi-prop": "arrowIcon"
|
|
377
|
+
}, V = /* @__PURE__ */ M({
|
|
378
|
+
name: "TreeSelect",
|
|
379
|
+
inheritAttrs: !1,
|
|
380
|
+
__name: "TreeSelect",
|
|
381
|
+
props: {
|
|
382
|
+
ariaDescribedby: {},
|
|
383
|
+
ariaErrormessage: {},
|
|
384
|
+
ariaInvalid: { type: Boolean },
|
|
385
|
+
ariaLabel: {},
|
|
386
|
+
ariaLabelledby: {},
|
|
387
|
+
ariaRequired: { type: Boolean },
|
|
388
|
+
arrowIcon: { type: [
|
|
389
|
+
Object,
|
|
390
|
+
String,
|
|
391
|
+
Number,
|
|
392
|
+
Boolean,
|
|
393
|
+
null,
|
|
394
|
+
Array
|
|
395
|
+
] },
|
|
396
|
+
autoAdjustOverflow: {
|
|
397
|
+
type: Boolean,
|
|
398
|
+
default: !0
|
|
399
|
+
},
|
|
400
|
+
autoExpandParent: {
|
|
401
|
+
type: Boolean,
|
|
402
|
+
default: !1
|
|
403
|
+
},
|
|
404
|
+
autoMergeValue: {
|
|
405
|
+
type: Boolean,
|
|
406
|
+
default: !0
|
|
407
|
+
},
|
|
408
|
+
borderless: {
|
|
409
|
+
type: Boolean,
|
|
410
|
+
default: !1
|
|
411
|
+
},
|
|
412
|
+
checkRelation: { default: "related" },
|
|
413
|
+
class: { type: [
|
|
414
|
+
Boolean,
|
|
415
|
+
null,
|
|
416
|
+
String,
|
|
417
|
+
Object,
|
|
418
|
+
Array
|
|
419
|
+
] },
|
|
420
|
+
className: { type: [
|
|
421
|
+
Boolean,
|
|
422
|
+
null,
|
|
423
|
+
String,
|
|
424
|
+
Object,
|
|
425
|
+
Array
|
|
426
|
+
] },
|
|
427
|
+
clearIcon: { type: [
|
|
428
|
+
Object,
|
|
429
|
+
String,
|
|
430
|
+
Number,
|
|
431
|
+
Boolean,
|
|
432
|
+
null,
|
|
433
|
+
Array
|
|
434
|
+
] },
|
|
435
|
+
clickToHide: {
|
|
436
|
+
type: Boolean,
|
|
437
|
+
default: !0
|
|
438
|
+
},
|
|
439
|
+
clickTriggerToHide: {
|
|
440
|
+
type: Boolean,
|
|
441
|
+
default: !0
|
|
442
|
+
},
|
|
443
|
+
defaultExpandAll: {
|
|
444
|
+
type: Boolean,
|
|
445
|
+
default: !1
|
|
446
|
+
},
|
|
447
|
+
defaultExpandedKeys: { default: () => [] },
|
|
448
|
+
defaultOpen: {
|
|
449
|
+
type: Boolean,
|
|
450
|
+
default: !1
|
|
451
|
+
},
|
|
452
|
+
defaultValue: {},
|
|
453
|
+
disabled: {
|
|
454
|
+
type: Boolean,
|
|
455
|
+
default: !1
|
|
456
|
+
},
|
|
457
|
+
disableStrictly: {
|
|
458
|
+
type: Boolean,
|
|
459
|
+
default: !1
|
|
460
|
+
},
|
|
461
|
+
dropdownClassName: { type: [
|
|
462
|
+
Boolean,
|
|
463
|
+
null,
|
|
464
|
+
String,
|
|
465
|
+
Object,
|
|
466
|
+
Array
|
|
467
|
+
] },
|
|
468
|
+
dropdownMargin: {},
|
|
469
|
+
dropdownMatchSelectWidth: {
|
|
470
|
+
type: Boolean,
|
|
471
|
+
default: !0
|
|
472
|
+
},
|
|
473
|
+
dropdownStyle: { type: [
|
|
474
|
+
Boolean,
|
|
475
|
+
null,
|
|
476
|
+
String,
|
|
477
|
+
Object,
|
|
478
|
+
Array
|
|
479
|
+
] },
|
|
480
|
+
emptyContent: { type: [
|
|
481
|
+
Object,
|
|
482
|
+
String,
|
|
483
|
+
Number,
|
|
484
|
+
Boolean,
|
|
485
|
+
null,
|
|
486
|
+
Array
|
|
487
|
+
] },
|
|
488
|
+
expandAction: {
|
|
489
|
+
type: [Boolean, String],
|
|
490
|
+
default: !1
|
|
491
|
+
},
|
|
492
|
+
expandAll: {
|
|
493
|
+
type: Boolean,
|
|
494
|
+
default: !1
|
|
495
|
+
},
|
|
496
|
+
expandedKeys: {},
|
|
497
|
+
expandIcon: { type: [
|
|
498
|
+
Object,
|
|
499
|
+
String,
|
|
500
|
+
Number,
|
|
501
|
+
Boolean,
|
|
502
|
+
null,
|
|
503
|
+
Array,
|
|
504
|
+
Function
|
|
505
|
+
] },
|
|
506
|
+
filterTreeNode: {
|
|
507
|
+
type: [Boolean, Function],
|
|
508
|
+
default: !1
|
|
509
|
+
},
|
|
510
|
+
getPopupContainer: {},
|
|
511
|
+
insetLabel: { type: [
|
|
512
|
+
Object,
|
|
513
|
+
String,
|
|
514
|
+
Number,
|
|
515
|
+
Boolean,
|
|
516
|
+
null,
|
|
517
|
+
Array
|
|
518
|
+
] },
|
|
519
|
+
insetLabelId: {},
|
|
520
|
+
keyMaps: {},
|
|
521
|
+
labelEllipsis: { type: Boolean },
|
|
522
|
+
leafOnly: {
|
|
523
|
+
type: Boolean,
|
|
524
|
+
default: !1
|
|
525
|
+
},
|
|
526
|
+
loadData: {},
|
|
527
|
+
loadedKeys: {},
|
|
528
|
+
maxTagCount: {},
|
|
529
|
+
modelValue: {},
|
|
530
|
+
motion: {
|
|
531
|
+
type: Boolean,
|
|
532
|
+
default: !0
|
|
533
|
+
},
|
|
534
|
+
motionExpand: {
|
|
535
|
+
type: Boolean,
|
|
536
|
+
default: !0
|
|
537
|
+
},
|
|
538
|
+
mouseEnterDelay: {},
|
|
539
|
+
mouseLeaveDelay: {},
|
|
540
|
+
multiple: {
|
|
541
|
+
type: Boolean,
|
|
542
|
+
default: !1
|
|
543
|
+
},
|
|
544
|
+
onChangeWithObject: {
|
|
545
|
+
type: Boolean,
|
|
546
|
+
default: !1
|
|
547
|
+
},
|
|
548
|
+
optionListStyle: {},
|
|
549
|
+
outerBottomSlot: { type: [
|
|
550
|
+
Object,
|
|
551
|
+
String,
|
|
552
|
+
Number,
|
|
553
|
+
Boolean,
|
|
554
|
+
null,
|
|
555
|
+
Array
|
|
556
|
+
] },
|
|
557
|
+
outerTopSlot: { type: [
|
|
558
|
+
Object,
|
|
559
|
+
String,
|
|
560
|
+
Number,
|
|
561
|
+
Boolean,
|
|
562
|
+
null,
|
|
563
|
+
Array
|
|
564
|
+
] },
|
|
565
|
+
placeholder: {},
|
|
566
|
+
position: {},
|
|
567
|
+
prefix: { type: [
|
|
568
|
+
Object,
|
|
569
|
+
String,
|
|
570
|
+
Number,
|
|
571
|
+
Boolean,
|
|
572
|
+
null,
|
|
573
|
+
Array
|
|
574
|
+
] },
|
|
575
|
+
preventScroll: { type: Boolean },
|
|
576
|
+
remote: {
|
|
577
|
+
type: Boolean,
|
|
578
|
+
default: !1
|
|
579
|
+
},
|
|
580
|
+
renderFullLabel: {},
|
|
581
|
+
renderLabel: {},
|
|
582
|
+
renderSelectedItem: {},
|
|
583
|
+
restTagsPopoverProps: { default: () => ({}) },
|
|
584
|
+
searchAutoFocus: {
|
|
585
|
+
type: Boolean,
|
|
586
|
+
default: !1
|
|
587
|
+
},
|
|
588
|
+
searchPlaceholder: {},
|
|
589
|
+
searchPosition: { default: "dropdown" },
|
|
590
|
+
searchRender: { type: [Function, Boolean] },
|
|
591
|
+
showClear: {
|
|
592
|
+
type: Boolean,
|
|
593
|
+
default: !1
|
|
594
|
+
},
|
|
595
|
+
showFilteredOnly: {
|
|
596
|
+
type: Boolean,
|
|
597
|
+
default: !1
|
|
598
|
+
},
|
|
599
|
+
showLine: {
|
|
600
|
+
type: Boolean,
|
|
601
|
+
default: !1
|
|
602
|
+
},
|
|
603
|
+
showRestTagsPopover: {
|
|
604
|
+
type: Boolean,
|
|
605
|
+
default: !1
|
|
606
|
+
},
|
|
607
|
+
showSearchClear: {
|
|
608
|
+
type: Boolean,
|
|
609
|
+
default: !0
|
|
610
|
+
},
|
|
611
|
+
size: { default: "default" },
|
|
612
|
+
stopPropagation: {
|
|
613
|
+
type: [Boolean, String],
|
|
614
|
+
default: !0
|
|
615
|
+
},
|
|
616
|
+
style: { type: [
|
|
617
|
+
Boolean,
|
|
618
|
+
null,
|
|
619
|
+
String,
|
|
620
|
+
Object,
|
|
621
|
+
Array
|
|
622
|
+
] },
|
|
623
|
+
suffix: { type: [
|
|
624
|
+
Object,
|
|
625
|
+
String,
|
|
626
|
+
Number,
|
|
627
|
+
Boolean,
|
|
628
|
+
null,
|
|
629
|
+
Array
|
|
630
|
+
] },
|
|
631
|
+
treeData: { default: () => [] },
|
|
632
|
+
treeNodeFilterProp: { default: "label" },
|
|
633
|
+
treeNodeLabelProp: { default: "label" },
|
|
634
|
+
triggerRender: {},
|
|
635
|
+
triggerTagWrap: {
|
|
636
|
+
type: Boolean,
|
|
637
|
+
default: !1
|
|
638
|
+
},
|
|
639
|
+
validateStatus: { default: "default" },
|
|
640
|
+
value: {},
|
|
641
|
+
virtualize: {},
|
|
642
|
+
zIndex: { default: 1030 }
|
|
643
|
+
},
|
|
644
|
+
emits: [
|
|
645
|
+
"blur",
|
|
646
|
+
"change",
|
|
647
|
+
"clear",
|
|
648
|
+
"expand",
|
|
649
|
+
"focus",
|
|
650
|
+
"load",
|
|
651
|
+
"search",
|
|
652
|
+
"select",
|
|
653
|
+
"visibleChange",
|
|
654
|
+
"update:expandedKeys",
|
|
655
|
+
"update:modelValue",
|
|
656
|
+
"update:value"
|
|
657
|
+
],
|
|
658
|
+
setup(e, { expose: t, emit: n }) {
|
|
659
|
+
let r = e, i = n, a = ye(), o = be(), s = le(), c = L("trigger"), l = L("popup"), u = L("input"), d = L("tagInput"), m = L("tree"), h = de(ie, void 0), b = E(() => h ? h.value : {
|
|
660
|
+
direction: "ltr",
|
|
661
|
+
locale: { code: "zh-CN" }
|
|
662
|
+
});
|
|
663
|
+
function x(e) {
|
|
664
|
+
let t = s?.vnode.props, n = e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
|
|
665
|
+
return !!(t && (Object.prototype.hasOwnProperty.call(t, e) || Object.prototype.hasOwnProperty.call(t, n)));
|
|
666
|
+
}
|
|
667
|
+
function S(e, t) {
|
|
668
|
+
return x(String(e)) ? r[e] !== !1 : t;
|
|
669
|
+
}
|
|
670
|
+
let w = E(() => x("modelValue")), M = E(() => x("value")), z = E(() => w.value || M.value), V = E(() => w.value ? r.modelValue : M.value ? r.value : void 0), H = E(() => x("expandedKeys")), Ne = E(() => x("loadedKeys")), U = E(() => r.keyMaps ?? {}), Pe = E(() => U.value.key ?? "key"), Fe = E(() => U.value.value ?? "value"), Ie = E(() => U.value.label ?? r.treeNodeLabelProp), Le = E(() => U.value.children ?? "children"), Re = E(() => S("autoAdjustOverflow", !0)), ze = E(() => S("autoMergeValue", !0)), Be = E(() => S("clickToHide", !0)), Ve = E(() => S("clickTriggerToHide", !0)), He = E(() => S("dropdownMatchSelectWidth", !0)), Ue = E(() => S("motion", !0)), We = E(() => S("motionExpand", !0)), Ge = E(() => S("showSearchClear", !0)), W = _e({
|
|
671
|
+
inputTriggerFocus: !1,
|
|
672
|
+
isOpen: !1,
|
|
673
|
+
isFocus: !1,
|
|
674
|
+
rePosKey: 0,
|
|
675
|
+
dropdownMinWidth: null,
|
|
676
|
+
inputValue: "",
|
|
677
|
+
keyEntities: {},
|
|
678
|
+
treeData: [],
|
|
679
|
+
flattenNodes: [],
|
|
680
|
+
cachedFlattenNodes: void 0,
|
|
681
|
+
selectedKeys: [],
|
|
682
|
+
checkedKeys: /* @__PURE__ */ new Set(),
|
|
683
|
+
halfCheckedKeys: /* @__PURE__ */ new Set(),
|
|
684
|
+
realCheckedKeys: /* @__PURE__ */ new Set(),
|
|
685
|
+
disabledKeys: /* @__PURE__ */ new Set(),
|
|
686
|
+
motionKeys: /* @__PURE__ */ new Set(),
|
|
687
|
+
motionType: "hide",
|
|
688
|
+
expandedKeys: /* @__PURE__ */ new Set(),
|
|
689
|
+
filteredKeys: /* @__PURE__ */ new Set(),
|
|
690
|
+
filteredExpandedKeys: /* @__PURE__ */ new Set(),
|
|
691
|
+
filteredShownKeys: /* @__PURE__ */ new Set(),
|
|
692
|
+
prevProps: null,
|
|
693
|
+
isHovering: !1,
|
|
694
|
+
cachedKeyValuePairs: {},
|
|
695
|
+
loadedKeys: new Set(r.loadedKeys ?? []),
|
|
696
|
+
loadingKeys: /* @__PURE__ */ new Set()
|
|
697
|
+
}), Ke = /* @__PURE__ */ new Map(), qe = ve(null), G = null, Je = !1;
|
|
698
|
+
function K(e) {
|
|
699
|
+
return String(e[Pe.value] ?? e.key ?? "");
|
|
700
|
+
}
|
|
701
|
+
function Ye(e) {
|
|
702
|
+
return e[Fe.value] ?? e[Pe.value] ?? e.key;
|
|
703
|
+
}
|
|
704
|
+
function Xe(e) {
|
|
705
|
+
let t = e[Le.value];
|
|
706
|
+
return Array.isArray(t) ? t : [];
|
|
707
|
+
}
|
|
708
|
+
function Ze(e) {
|
|
709
|
+
return W.keyEntities[e]?.data ?? {
|
|
710
|
+
[Pe.value]: e,
|
|
711
|
+
[Ie.value]: e
|
|
712
|
+
};
|
|
713
|
+
}
|
|
714
|
+
function Qe(e) {
|
|
715
|
+
let t = f(e, r.onChangeWithObject, U.value), n = y(t, W.cachedKeyValuePairs, r.multiple);
|
|
716
|
+
if (!r.multiple) {
|
|
717
|
+
W.selectedKeys = n;
|
|
718
|
+
return;
|
|
719
|
+
}
|
|
720
|
+
if (r.checkRelation === "related") {
|
|
721
|
+
let e = ee(n, W.keyEntities);
|
|
722
|
+
W.checkedKeys = e.checkedKeys, W.halfCheckedKeys = e.halfCheckedKeys;
|
|
723
|
+
} else W.realCheckedKeys = new Set(n);
|
|
724
|
+
}
|
|
725
|
+
function $e() {
|
|
726
|
+
let e = v(r.treeData, U.value);
|
|
727
|
+
W.treeData = r.treeData, W.keyEntities = e.keyEntities, W.cachedKeyValuePairs = e.valueEntities;
|
|
728
|
+
let t = z.value ? V.value : r.defaultValue;
|
|
729
|
+
Je ? r.expandAll && (W.expandedKeys = new Set(Object.keys(W.keyEntities))) : H.value ? W.expandedKeys = C(r.expandedKeys ?? [], W.keyEntities, r.autoExpandParent) : r.defaultExpandAll || r.expandAll ? W.expandedKeys = new Set(Object.keys(W.keyEntities)) : r.defaultExpandedKeys.length ? W.expandedKeys = C(r.defaultExpandedKeys, W.keyEntities, !0) : t !== void 0 && (W.expandedKeys = p(f(t, r.onChangeWithObject, U.value), W.keyEntities, r.multiple, W.cachedKeyValuePairs)), r.disableStrictly && r.checkRelation === "related" ? W.disabledKeys = _(W.keyEntities, U.value) : W.disabledKeys = /* @__PURE__ */ new Set(), Qe(t), W.flattenNodes = g(W.treeData, W.expandedKeys, U.value), Je = !0, W.rePosKey += 1;
|
|
730
|
+
}
|
|
731
|
+
function et() {
|
|
732
|
+
let e = {
|
|
733
|
+
...r,
|
|
734
|
+
autoMergeValue: ze.value,
|
|
735
|
+
clickToHide: Be.value,
|
|
736
|
+
clickTriggerToHide: Ve.value,
|
|
737
|
+
dropdownMatchSelectWidth: He.value,
|
|
738
|
+
keyMaps: U.value,
|
|
739
|
+
motionExpand: We.value,
|
|
740
|
+
value: V.value
|
|
741
|
+
};
|
|
742
|
+
return z.value || delete e.value, H.value || delete e.expandedKeys, Ne.value || delete e.loadedKeys, e;
|
|
743
|
+
}
|
|
744
|
+
let tt = {
|
|
745
|
+
getContext: () => void 0,
|
|
746
|
+
getContexts: () => void 0,
|
|
747
|
+
getProp: (e) => et()[e],
|
|
748
|
+
getProps: et,
|
|
749
|
+
getState: (e) => W[e],
|
|
750
|
+
getStates: () => W,
|
|
751
|
+
setState: (e, t) => {
|
|
752
|
+
Object.assign(W, e), t?.();
|
|
753
|
+
},
|
|
754
|
+
getCache: (e) => Ke.get(e),
|
|
755
|
+
getCaches: () => Ke,
|
|
756
|
+
setCache: (e, t) => Ke.set(e, t),
|
|
757
|
+
stopPropagation: (e) => e?.stopPropagation?.(),
|
|
758
|
+
persistEvent: () => void 0,
|
|
759
|
+
updateInputValue: (e) => {
|
|
760
|
+
W.inputValue = e;
|
|
761
|
+
},
|
|
762
|
+
registerClickOutsideHandler: (e) => {
|
|
763
|
+
tt.unregisterClickOutsideHandler(), G = (t) => {
|
|
764
|
+
let n = t.target;
|
|
765
|
+
if (!(n instanceof Node)) return;
|
|
766
|
+
let r = t.composedPath?.() ?? [], i = !!(c.value?.contains(n) || r.includes(c.value)), a = !!(l.value?.contains(n) || r.includes(l.value));
|
|
767
|
+
!i && !a && e(t);
|
|
768
|
+
}, document.addEventListener("mousedown", G);
|
|
769
|
+
},
|
|
770
|
+
unregisterClickOutsideHandler: () => {
|
|
771
|
+
!G || typeof document > "u" || (document.removeEventListener("mousedown", G), G = null);
|
|
772
|
+
},
|
|
773
|
+
rePositionDropdown: () => {
|
|
774
|
+
W.rePosKey += 1;
|
|
775
|
+
},
|
|
776
|
+
updateState: (e) => Object.assign(W, e),
|
|
777
|
+
notifySelect: (e, t, n) => i("select", e, t, n),
|
|
778
|
+
notifySearch: (e, t, n) => i("search", e, t, n),
|
|
779
|
+
cacheFlattenNodes: (e) => {
|
|
780
|
+
W.cachedFlattenNodes = e ? [...W.flattenNodes] : void 0;
|
|
781
|
+
},
|
|
782
|
+
openMenu: () => {
|
|
783
|
+
W.isOpen || (W.isOpen = !0, i("visibleChange", !0));
|
|
784
|
+
},
|
|
785
|
+
closeMenu: (e) => {
|
|
786
|
+
W.isOpen && (W.isOpen = !1, e?.(), i("visibleChange", !1));
|
|
787
|
+
},
|
|
788
|
+
getTriggerWidth: () => c.value?.getBoundingClientRect().width ?? !1,
|
|
789
|
+
setOptionWrapperWidth: (e) => {
|
|
790
|
+
W.dropdownMinWidth = e;
|
|
791
|
+
},
|
|
792
|
+
notifyClear: (e) => i("clear", e),
|
|
793
|
+
notifyChange: (e, t, n) => {
|
|
794
|
+
i("change", e, t, n), i("update:value", e), i("update:modelValue", e);
|
|
795
|
+
},
|
|
796
|
+
notifyChangeWithObject: (e, t) => {
|
|
797
|
+
i("change", e, t), i("update:value", e), i("update:modelValue", e);
|
|
798
|
+
},
|
|
799
|
+
notifyExpand: (e, t) => {
|
|
800
|
+
let n = [...e];
|
|
801
|
+
i("expand", n, t), i("update:expandedKeys", n);
|
|
802
|
+
},
|
|
803
|
+
notifyFocus: (e) => i("focus", e),
|
|
804
|
+
notifyBlur: (e) => i("blur", e),
|
|
805
|
+
toggleHovering: (e) => {
|
|
806
|
+
W.isHovering = e;
|
|
807
|
+
},
|
|
808
|
+
notifyLoad: (e, t) => i("load", e, t),
|
|
809
|
+
updateInputFocus: (e) => {
|
|
810
|
+
e ? (u.value?.focus(), d.value?.focus()) : (u.value?.blur(), d.value?.blur());
|
|
811
|
+
},
|
|
812
|
+
updateLoadKeys: (e, t) => t(),
|
|
813
|
+
updateIsFocus: (e) => {
|
|
814
|
+
W.isFocus = e;
|
|
815
|
+
}
|
|
816
|
+
}, q = fe(new Te(tt)), nt = E(() => r.multiple ? r.checkRelation === "unRelated" ? [...W.realCheckedKeys] : ze.value ? T([...W.checkedKeys], W.keyEntities, r.leafOnly, !0) : [...W.checkedKeys] : W.selectedKeys), rt = E(() => nt.value.map(Ze)), it = E(() => {
|
|
817
|
+
let e = (r.multiple ? r.checkRelation === "related" ? [...W.checkedKeys] : [...W.realCheckedKeys] : W.selectedKeys).map(Ze);
|
|
818
|
+
if (r.onChangeWithObject) return r.multiple ? e : e[0];
|
|
819
|
+
let t = e.map(Ye);
|
|
820
|
+
return r.multiple ? t : t[0];
|
|
821
|
+
}), at = E(() => [...W.expandedKeys]), ot = E(() => {
|
|
822
|
+
if (!r.showFilteredOnly || !W.inputValue || r.remote || W.filteredShownKeys.size === 0) return r.treeData;
|
|
823
|
+
let e = (t) => t.flatMap((t) => {
|
|
824
|
+
let n = K(t);
|
|
825
|
+
if (!W.filteredShownKeys.has(n)) return [];
|
|
826
|
+
let r = e(Xe(t));
|
|
827
|
+
return [r.length || Xe(t).length ? {
|
|
828
|
+
...t,
|
|
829
|
+
[Le.value]: r
|
|
830
|
+
} : t];
|
|
831
|
+
});
|
|
832
|
+
return e(r.treeData);
|
|
833
|
+
}), J = E(() => nt.value.length > 0), st = E(() => !!r.filterTreeNode), Y = E(() => st.value && r.searchPosition === "trigger"), ct = E(() => r.showClear && (J.value || Y.value && !!W.inputValue) && !r.disabled && (W.isOpen || W.isHovering)), lt = E(() => [
|
|
834
|
+
"semi-tree-select",
|
|
835
|
+
r.class,
|
|
836
|
+
r.className,
|
|
837
|
+
a.class,
|
|
838
|
+
r.borderless ? "semi-tree-select-borderless" : void 0,
|
|
839
|
+
W.isFocus ? "semi-tree-select-focus" : void 0,
|
|
840
|
+
r.disabled ? "semi-tree-select-disabled" : void 0,
|
|
841
|
+
r.multiple ? "semi-tree-select-multiple" : "semi-tree-select-single",
|
|
842
|
+
st.value ? "semi-tree-select-filterable" : void 0,
|
|
843
|
+
r.validateStatus === "error" ? "semi-tree-select-error" : void 0,
|
|
844
|
+
r.validateStatus === "warning" ? "semi-tree-select-warning" : void 0,
|
|
845
|
+
r.size === "small" ? "semi-tree-select-small" : void 0,
|
|
846
|
+
r.size === "large" ? "semi-tree-select-large" : void 0,
|
|
847
|
+
X.value || Z.value ? "semi-tree-select-with-prefix" : void 0,
|
|
848
|
+
dt.value ? "semi-tree-select-with-suffix" : void 0,
|
|
849
|
+
r.multiple && Y.value && !J.value ? "semi-tree-select-multiple-tagInput-empty" : void 0,
|
|
850
|
+
r.multiple && Y.value && J.value ? "semi-tree-select-multiple-tagInput-notEmpty" : void 0,
|
|
851
|
+
r.triggerTagWrap && r.multiple && Y.value ? "semi-tree-select-triggerTagWrap" : void 0
|
|
852
|
+
]), ut = E(() => Object.fromEntries(Object.entries(a).filter(([e]) => e.startsWith("data-")))), X = E(() => o.prefix?.() ?? (x("prefix") ? r.prefix : void 0)), Z = E(() => x("insetLabel") ? r.insetLabel : void 0), dt = E(() => o.suffix?.() ?? (x("suffix") ? r.suffix : void 0)), ft = E(() => o.arrowIcon?.() ?? (x("arrowIcon") ? r.arrowIcon : void 0) ?? ue(Se)), pt = E(() => o.clearIcon?.() ?? (x("clearIcon") ? r.clearIcon : void 0) ?? ue(Ce)), mt = E(() => o.outerTop?.() ?? (x("outerTopSlot") ? r.outerTopSlot : void 0)), ht = E(() => o.outerBottom?.() ?? (x("outerBottomSlot") ? r.outerBottomSlot : void 0)), gt = E(() => r.searchPlaceholder ? r.searchPlaceholder : b.value.locale.TreeSelect?.searchPlaceholder ?? (b.value.locale.code === "en-US" ? "Search" : "搜索")), _t = E(() => o.empty ? o.empty() : x("emptyContent") ? r.emptyContent : b.value.locale.Tree?.emptyText ?? (b.value.locale.code === "en-US" ? "No Data" : "暂无数据")), vt = E(() => [W.dropdownMinWidth === null ? void 0 : { minWidth: typeof W.dropdownMinWidth == "number" ? `${W.dropdownMinWidth}px` : W.dropdownMinWidth }, r.dropdownStyle]), yt = E(() => ({
|
|
853
|
+
className: r.searchPosition === "dropdown" ? "semi-tree-input" : "semi-tree-select-inputTrigger",
|
|
854
|
+
value: W.inputValue,
|
|
855
|
+
placeholder: r.searchPosition === "dropdown" ? gt.value : "",
|
|
856
|
+
showClear: Ge.value,
|
|
857
|
+
disabled: r.disabled,
|
|
858
|
+
preventScroll: r.preventScroll,
|
|
859
|
+
onChange: $
|
|
860
|
+
})), Q = E(() => o.search?.(yt.value) ?? (typeof r.searchRender == "function" ? r.searchRender(yt.value) : void 0)), bt = E(() => x("searchRender") && r.searchRender === !1);
|
|
861
|
+
function xt(e, t) {
|
|
862
|
+
let n = {
|
|
863
|
+
node: e,
|
|
864
|
+
index: t,
|
|
865
|
+
onClose: (t, n) => {
|
|
866
|
+
n?.preventDefault(), n?.stopPropagation(), q.removeTag(K(e));
|
|
867
|
+
}
|
|
868
|
+
}, i = o.selectedItem?.(n) ?? r.renderSelectedItem?.(e, n);
|
|
869
|
+
return i && typeof i == "object" && !Array.isArray(i) && "isRenderInTag" in i ? i : {
|
|
870
|
+
content: i ?? e[Ie.value] ?? Ye(e)?.toString(),
|
|
871
|
+
isRenderInTag: !0
|
|
872
|
+
};
|
|
873
|
+
}
|
|
874
|
+
function St(e, t) {
|
|
875
|
+
let n = xt(e, t);
|
|
876
|
+
if (!n.isRenderInTag) return n.content;
|
|
877
|
+
let i = r.disabled || !!e[U.value.disabled ?? "disabled"] || r.disableStrictly && W.disabledKeys.has(K(e));
|
|
878
|
+
return ue(ae, {
|
|
879
|
+
key: `tree-select-tag-${K(e)}-${t}`,
|
|
880
|
+
className: "semi-tree-select-selection-tag",
|
|
881
|
+
closable: !i,
|
|
882
|
+
color: "white",
|
|
883
|
+
size: r.size === "small" ? "small" : "large",
|
|
884
|
+
onClose: (t, n) => {
|
|
885
|
+
n.preventDefault(), n.stopPropagation(), q.removeTag(K(e));
|
|
886
|
+
}
|
|
887
|
+
}, { default: () => n.content });
|
|
888
|
+
}
|
|
889
|
+
let Ct = E(() => rt.value.map((e, t) => St(e, t)));
|
|
890
|
+
function wt(e, t) {
|
|
891
|
+
return St(Ze(e), t);
|
|
892
|
+
}
|
|
893
|
+
let Tt = E(() => {
|
|
894
|
+
let e = rt.value[0];
|
|
895
|
+
if (!e) return;
|
|
896
|
+
let t = o.selectedItem?.({
|
|
897
|
+
node: e,
|
|
898
|
+
index: 0,
|
|
899
|
+
onClose: () => void 0
|
|
900
|
+
});
|
|
901
|
+
if (t !== void 0) return t;
|
|
902
|
+
let n = r.renderSelectedItem?.(e);
|
|
903
|
+
return n && typeof n == "object" && !Array.isArray(n) && "content" in n ? n.content : n ?? e[Ie.value] ?? String(Ye(e));
|
|
904
|
+
}), Et = E(() => ({
|
|
905
|
+
componentProps: r,
|
|
906
|
+
disabled: r.disabled,
|
|
907
|
+
inputValue: W.inputValue,
|
|
908
|
+
placeholder: r.placeholder ?? "",
|
|
909
|
+
value: rt.value,
|
|
910
|
+
onClear: (e) => It(e ?? new Event("clear")),
|
|
911
|
+
onSearch: $,
|
|
912
|
+
onRemove: (e) => q.removeTag(e)
|
|
913
|
+
})), Dt = E(() => o.trigger?.(Et.value) ?? r.triggerRender?.(Et.value)), Ot = E(() => ({
|
|
914
|
+
...r.getPopupContainer ? { getPopupContainer: r.getPopupContainer } : {},
|
|
915
|
+
...r.dropdownMargin === void 0 ? {} : { margin: r.dropdownMargin },
|
|
916
|
+
...r.mouseEnterDelay === void 0 ? {} : { mouseEnterDelay: r.mouseEnterDelay },
|
|
917
|
+
...r.mouseLeaveDelay === void 0 ? {} : { mouseLeaveDelay: r.mouseLeaveDelay }
|
|
918
|
+
})), kt = E(() => ({
|
|
919
|
+
...it.value === void 0 ? {} : { modelValue: it.value },
|
|
920
|
+
...x("expandIcon") || o.expandIcon ? { expandIcon: qt.value } : {},
|
|
921
|
+
...r.labelEllipsis === void 0 ? {} : { labelEllipsis: r.labelEllipsis },
|
|
922
|
+
...r.loadData ? { loadData: r.loadData } : {},
|
|
923
|
+
...r.loadedKeys === void 0 ? {} : { loadedKeys: r.loadedKeys },
|
|
924
|
+
...o.fullLabel || r.renderFullLabel ? { renderFullLabel: Kt } : {},
|
|
925
|
+
...o.label || r.renderLabel ? { renderLabel: Gt } : {},
|
|
926
|
+
...r.virtualize ? { virtualize: r.virtualize } : {}
|
|
927
|
+
})), At = E(() => ({
|
|
928
|
+
...r.maxTagCount === void 0 ? {} : { maxTagCount: r.maxTagCount },
|
|
929
|
+
...r.placeholder === void 0 ? {} : { placeholder: r.placeholder }
|
|
930
|
+
})), jt = E(() => ({ ...r.maxTagCount === void 0 ? {} : { maxTagCount: r.maxTagCount } }));
|
|
931
|
+
function Mt(e) {
|
|
932
|
+
qe.value = e;
|
|
933
|
+
}
|
|
934
|
+
function Nt(e) {
|
|
935
|
+
Mt(e), q.handleClick(e);
|
|
936
|
+
}
|
|
937
|
+
function Pt(e) {
|
|
938
|
+
Mt(e), q.handleSelectionEnterPress(e);
|
|
939
|
+
}
|
|
940
|
+
function Ft(e) {
|
|
941
|
+
Mt(e), q.handleKeyDown(e);
|
|
942
|
+
}
|
|
943
|
+
function It(e) {
|
|
944
|
+
e.stopPropagation?.(), q.handleClear(e);
|
|
945
|
+
}
|
|
946
|
+
function Lt(e) {
|
|
947
|
+
e.stopPropagation(), q.handleClearEnterPress(e);
|
|
948
|
+
}
|
|
949
|
+
function $(e) {
|
|
950
|
+
W.isOpen || q.open(), q.handleInputChange(e), r.remote || pe(() => m.value?.search(e));
|
|
951
|
+
}
|
|
952
|
+
function Rt(e, t, n) {
|
|
953
|
+
let r = q.getTreeNodeProps(e) ?? {};
|
|
954
|
+
q.handleNodeSelect(qe.value, {
|
|
955
|
+
...r,
|
|
956
|
+
data: n,
|
|
957
|
+
disabled: !!n[U.value.disabled ?? "disabled"],
|
|
958
|
+
eventKey: e,
|
|
959
|
+
children: Xe(n)
|
|
960
|
+
});
|
|
961
|
+
}
|
|
962
|
+
function zt(e) {
|
|
963
|
+
q.removeTag(e);
|
|
964
|
+
}
|
|
965
|
+
function Bt(e, t) {
|
|
966
|
+
H.value || (W.expandedKeys = new Set(e)), W.flattenNodes = g(W.treeData, H.value ? new Set(r.expandedKeys ?? []) : W.expandedKeys, U.value), i("expand", e, t), i("update:expandedKeys", e), W.rePosKey += 1;
|
|
967
|
+
}
|
|
968
|
+
function Vt(e, t) {
|
|
969
|
+
Ne.value || (W.loadedKeys = new Set(e)), i("load", e, t);
|
|
970
|
+
}
|
|
971
|
+
function Ht(e) {
|
|
972
|
+
q.handlePopoverVisibleChange(e);
|
|
973
|
+
}
|
|
974
|
+
function Ut() {
|
|
975
|
+
q.handleAfterClose(), !r.remote && W.inputValue === "" && m.value?.search("");
|
|
976
|
+
}
|
|
977
|
+
function Wt() {
|
|
978
|
+
q.close(null);
|
|
979
|
+
}
|
|
980
|
+
function Gt(e, t, n) {
|
|
981
|
+
return o.label?.({
|
|
982
|
+
label: e,
|
|
983
|
+
node: t ?? {},
|
|
984
|
+
searchWord: n
|
|
985
|
+
}) ?? r.renderLabel?.(e, t, n) ?? e;
|
|
986
|
+
}
|
|
987
|
+
function Kt(e) {
|
|
988
|
+
return o.fullLabel?.(e) ?? r.renderFullLabel?.(e);
|
|
989
|
+
}
|
|
990
|
+
let qt = E(() => o.expandIcon ? (e) => o.expandIcon?.(e) : x("expandIcon") ? r.expandIcon : void 0);
|
|
991
|
+
return t({
|
|
992
|
+
close: Wt,
|
|
993
|
+
search: $
|
|
994
|
+
}), R(() => [
|
|
995
|
+
r.treeData,
|
|
996
|
+
r.keyMaps,
|
|
997
|
+
r.expandAll,
|
|
998
|
+
r.disableStrictly
|
|
999
|
+
], $e, {
|
|
1000
|
+
deep: !0,
|
|
1001
|
+
immediate: !0
|
|
1002
|
+
}), R(V, (e) => {
|
|
1003
|
+
z.value && Qe(e);
|
|
1004
|
+
}, { deep: !0 }), R(() => r.expandedKeys, (e) => {
|
|
1005
|
+
H.value && (W.expandedKeys = C(e ?? [], W.keyEntities, r.autoExpandParent), W.flattenNodes = g(W.treeData, W.expandedKeys, U.value));
|
|
1006
|
+
}, { deep: !0 }), R(() => r.loadedKeys, (e) => {
|
|
1007
|
+
Ne.value && (W.loadedKeys = new Set(e ?? []));
|
|
1008
|
+
}, { deep: !0 }), R(() => [
|
|
1009
|
+
r.multiple,
|
|
1010
|
+
r.checkRelation,
|
|
1011
|
+
r.onChangeWithObject
|
|
1012
|
+
], () => Qe(z.value ? V.value : r.defaultValue)), R(() => [
|
|
1013
|
+
W.checkedKeys.size,
|
|
1014
|
+
W.realCheckedKeys.size,
|
|
1015
|
+
W.selectedKeys.length
|
|
1016
|
+
], () => pe(() => tt.rePositionDropdown())), ge(() => q.init()), he(() => q.destroy()), (t, n) => (F(), D(I(te), N(Ot.value, {
|
|
1017
|
+
"auto-adjust-overflow": Re.value,
|
|
1018
|
+
motion: Ue.value,
|
|
1019
|
+
position: e.position ?? "bottomLeft",
|
|
1020
|
+
"re-pos-key": I(W).rePosKey,
|
|
1021
|
+
"stop-propagation": e.stopPropagation === !0,
|
|
1022
|
+
trigger: "custom",
|
|
1023
|
+
visible: I(W).isOpen,
|
|
1024
|
+
"z-index": e.zIndex,
|
|
1025
|
+
onAfterClose: Ut,
|
|
1026
|
+
onVisibleChange: Ht
|
|
1027
|
+
}), {
|
|
1028
|
+
content: xe(() => [A("div", {
|
|
1029
|
+
ref: "popup",
|
|
1030
|
+
class: P(["semi-tree-select-popover", e.dropdownClassName]),
|
|
1031
|
+
style: me(vt.value),
|
|
1032
|
+
onClickCapture: Mt,
|
|
1033
|
+
onKeydownCapture: Ft
|
|
1034
|
+
}, [A("div", Ee, [
|
|
1035
|
+
mt.value == null ? st.value && e.searchPosition === "dropdown" && !bt.value ? (F(), k("div", De, [Q.value == null ? (F(), D(I(ne), {
|
|
1036
|
+
key: 1,
|
|
1037
|
+
ref: "input",
|
|
1038
|
+
"aria-label": "Filter TreeSelect item",
|
|
1039
|
+
"class-name": "semi-tree-input",
|
|
1040
|
+
"model-value": I(W).inputValue,
|
|
1041
|
+
placeholder: gt.value,
|
|
1042
|
+
"prevent-scroll": e.preventScroll,
|
|
1043
|
+
"show-clear": Ge.value,
|
|
1044
|
+
onChange: $
|
|
1045
|
+
}, {
|
|
1046
|
+
prefix: xe(() => [j(I(we))]),
|
|
1047
|
+
_: 1
|
|
1048
|
+
}, 8, [
|
|
1049
|
+
"model-value",
|
|
1050
|
+
"placeholder",
|
|
1051
|
+
"prevent-scroll",
|
|
1052
|
+
"show-clear"
|
|
1053
|
+
])) : (F(), D(I(B), {
|
|
1054
|
+
key: 0,
|
|
1055
|
+
content: Q.value
|
|
1056
|
+
}, null, 8, ["content"]))])) : O("", !0) : (F(), D(I(B), {
|
|
1057
|
+
key: 0,
|
|
1058
|
+
content: mt.value
|
|
1059
|
+
}, null, 8, ["content"])),
|
|
1060
|
+
j(I(se), N({ ref: "tree" }, kt.value, {
|
|
1061
|
+
"tree-select-embedded": !0,
|
|
1062
|
+
"auto-expand-parent": e.autoExpandParent,
|
|
1063
|
+
"auto-merge-value": ze.value,
|
|
1064
|
+
"check-relation": e.checkRelation,
|
|
1065
|
+
"default-expand-all": e.defaultExpandAll,
|
|
1066
|
+
disabled: e.disabled,
|
|
1067
|
+
"disable-strictly": e.disableStrictly,
|
|
1068
|
+
"empty-content": _t.value,
|
|
1069
|
+
"expand-action": e.expandAction,
|
|
1070
|
+
"expanded-keys": at.value,
|
|
1071
|
+
"filter-tree-node": e.filterTreeNode,
|
|
1072
|
+
"key-maps": U.value,
|
|
1073
|
+
"leaf-only": e.leafOnly,
|
|
1074
|
+
motion: We.value,
|
|
1075
|
+
multiple: e.multiple,
|
|
1076
|
+
"on-change-with-object": e.onChangeWithObject,
|
|
1077
|
+
"search-render": !1,
|
|
1078
|
+
"show-filtered-only": e.showFilteredOnly,
|
|
1079
|
+
"show-line": e.showLine,
|
|
1080
|
+
"tree-data": ot.value,
|
|
1081
|
+
"tree-node-filter-prop": e.treeNodeFilterProp,
|
|
1082
|
+
onExpand: Bt,
|
|
1083
|
+
onLoad: Vt,
|
|
1084
|
+
onSelect: Rt
|
|
1085
|
+
}), null, 16, [
|
|
1086
|
+
"auto-expand-parent",
|
|
1087
|
+
"auto-merge-value",
|
|
1088
|
+
"check-relation",
|
|
1089
|
+
"default-expand-all",
|
|
1090
|
+
"disabled",
|
|
1091
|
+
"disable-strictly",
|
|
1092
|
+
"empty-content",
|
|
1093
|
+
"expand-action",
|
|
1094
|
+
"expanded-keys",
|
|
1095
|
+
"filter-tree-node",
|
|
1096
|
+
"key-maps",
|
|
1097
|
+
"leaf-only",
|
|
1098
|
+
"motion",
|
|
1099
|
+
"multiple",
|
|
1100
|
+
"on-change-with-object",
|
|
1101
|
+
"show-filtered-only",
|
|
1102
|
+
"show-line",
|
|
1103
|
+
"tree-data",
|
|
1104
|
+
"tree-node-filter-prop"
|
|
1105
|
+
]),
|
|
1106
|
+
ht.value == null ? O("", !0) : (F(), D(I(B), {
|
|
1107
|
+
key: 2,
|
|
1108
|
+
content: ht.value
|
|
1109
|
+
}, null, 8, ["content"]))
|
|
1110
|
+
])], 38)]),
|
|
1111
|
+
default: xe(() => [Dt.value == null ? (F(), k("div", N({
|
|
1112
|
+
key: 1,
|
|
1113
|
+
ref: "trigger"
|
|
1114
|
+
}, ut.value, {
|
|
1115
|
+
role: "combobox",
|
|
1116
|
+
"aria-describedby": e.ariaDescribedby ?? I(a)["aria-describedby"],
|
|
1117
|
+
"aria-disabled": e.disabled,
|
|
1118
|
+
"aria-errormessage": e.ariaErrormessage ?? I(a)["aria-errormessage"],
|
|
1119
|
+
"aria-haspopup": "tree",
|
|
1120
|
+
"aria-invalid": e.ariaInvalid ?? I(a)["aria-invalid"],
|
|
1121
|
+
"aria-label": e.ariaLabel ?? I(a)["aria-label"] ?? "TreeSelect",
|
|
1122
|
+
"aria-labelledby": e.ariaLabelledby ?? I(a)["aria-labelledby"],
|
|
1123
|
+
"aria-required": e.ariaRequired ?? I(a)["aria-required"],
|
|
1124
|
+
class: lt.value,
|
|
1125
|
+
style: [e.style, I(a).style],
|
|
1126
|
+
tabindex: e.disabled ? void 0 : 0,
|
|
1127
|
+
onClick: Nt,
|
|
1128
|
+
onKeydown: Ft,
|
|
1129
|
+
onKeypress: Pt,
|
|
1130
|
+
onMouseenter: n[3] ||= (t) => e.showClear ? I(q).toggleHoverState(!0) : void 0,
|
|
1131
|
+
onMouseleave: n[4] ||= (t) => e.showClear ? I(q).toggleHoverState(!1) : void 0
|
|
1132
|
+
}), [
|
|
1133
|
+
X.value != null || Z.value != null ? (F(), k("div", {
|
|
1134
|
+
key: 0,
|
|
1135
|
+
id: e.insetLabelId,
|
|
1136
|
+
class: P([
|
|
1137
|
+
"semi-tree-select-prefix",
|
|
1138
|
+
Z.value == null ? void 0 : "semi-tree-select-inset-label",
|
|
1139
|
+
typeof (X.value ?? Z.value) == "string" ? "semi-tree-select-prefix-text" : void 0
|
|
1140
|
+
]),
|
|
1141
|
+
"x-semi-prop": "prefix,insetLabel"
|
|
1142
|
+
}, [j(I(B), { content: X.value ?? Z.value }, null, 8, ["content"])], 10, ke)) : O("", !0),
|
|
1143
|
+
A("div", Ae, [Y.value ? (F(), k(ce, { key: 0 }, [e.multiple ? (F(), D(I(re), N({
|
|
1144
|
+
key: 0,
|
|
1145
|
+
ref: "tagInput"
|
|
1146
|
+
}, At.value, {
|
|
1147
|
+
"auto-focus": e.searchAutoFocus,
|
|
1148
|
+
disabled: e.disabled,
|
|
1149
|
+
"expand-rest-tags-on-click": !1,
|
|
1150
|
+
"input-value": I(W).inputValue,
|
|
1151
|
+
"model-value": nt.value,
|
|
1152
|
+
"prevent-scroll": e.preventScroll,
|
|
1153
|
+
"render-tag-item": wt,
|
|
1154
|
+
"rest-tags-popover-props": e.restTagsPopoverProps,
|
|
1155
|
+
"show-rest-tags-popover": e.showRestTagsPopover,
|
|
1156
|
+
size: e.size,
|
|
1157
|
+
onInputChange: $,
|
|
1158
|
+
onRemove: zt
|
|
1159
|
+
}), null, 16, [
|
|
1160
|
+
"auto-focus",
|
|
1161
|
+
"disabled",
|
|
1162
|
+
"input-value",
|
|
1163
|
+
"model-value",
|
|
1164
|
+
"prevent-scroll",
|
|
1165
|
+
"rest-tags-popover-props",
|
|
1166
|
+
"show-rest-tags-popover",
|
|
1167
|
+
"size"
|
|
1168
|
+
])) : (F(), k(ce, { key: 1 }, [A("div", { class: P(["semi-tree-select-triggerSingleSearch-wrapper", I(W).inputTriggerFocus ? "semi-tree-select-triggerSingleSearch-upper" : void 0]) }, [Q.value == null ? (F(), D(I(ne), {
|
|
1169
|
+
key: 1,
|
|
1170
|
+
ref: "input",
|
|
1171
|
+
"aria-label": "Filter TreeSelect item",
|
|
1172
|
+
"class-name": "semi-tree-select-inputTrigger",
|
|
1173
|
+
"auto-focus": e.searchAutoFocus,
|
|
1174
|
+
disabled: e.disabled,
|
|
1175
|
+
"model-value": I(W).inputValue,
|
|
1176
|
+
"prevent-scroll": e.preventScroll,
|
|
1177
|
+
onBlur: n[0] ||= (e) => I(q).handleInputTriggerBlur(),
|
|
1178
|
+
onChange: $,
|
|
1179
|
+
onFocus: n[1] ||= (e) => I(q).handleInputTriggerFocus()
|
|
1180
|
+
}, null, 8, [
|
|
1181
|
+
"auto-focus",
|
|
1182
|
+
"disabled",
|
|
1183
|
+
"model-value",
|
|
1184
|
+
"prevent-scroll"
|
|
1185
|
+
])) : (F(), D(I(B), {
|
|
1186
|
+
key: 0,
|
|
1187
|
+
content: Q.value
|
|
1188
|
+
}, null, 8, ["content"]))], 2), I(W).inputValue ? O("", !0) : (F(), k("span", {
|
|
1189
|
+
key: 0,
|
|
1190
|
+
class: P([
|
|
1191
|
+
"semi-tree-select-selection-TriggerSearchItem",
|
|
1192
|
+
(I(W).inputTriggerFocus || !Tt.value) && !e.disabled ? "semi-tree-select-selection-TriggerSearchItem-placeholder" : void 0,
|
|
1193
|
+
e.disabled ? "semi-tree-select-selection-TriggerSearchItem-disabled" : void 0
|
|
1194
|
+
]),
|
|
1195
|
+
onClick: n[2] ||= (e) => I(q).onClickSingleTriggerSearchItem?.(e)
|
|
1196
|
+
}, [j(I(B), { content: Tt.value ?? e.placeholder }, null, 8, ["content"])], 2))], 64))], 64)) : !e.multiple || !J.value ? (F(), k("span", {
|
|
1197
|
+
key: 1,
|
|
1198
|
+
class: P(["semi-tree-select-selection-content", Tt.value ? void 0 : "semi-tree-select-selection-placeholder"])
|
|
1199
|
+
}, [j(I(B), { content: Tt.value ?? e.placeholder }, null, 8, ["content"])], 2)) : (F(), D(I(oe), N({ key: 2 }, jt.value, {
|
|
1200
|
+
mode: "custom",
|
|
1201
|
+
"popover-props": e.restTagsPopoverProps,
|
|
1202
|
+
"show-popover": e.showRestTagsPopover,
|
|
1203
|
+
size: "large",
|
|
1204
|
+
"tag-list": Ct.value
|
|
1205
|
+
}), null, 16, [
|
|
1206
|
+
"popover-props",
|
|
1207
|
+
"show-popover",
|
|
1208
|
+
"tag-list"
|
|
1209
|
+
]))]),
|
|
1210
|
+
dt.value == null ? O("", !0) : (F(), k("div", je, [j(I(B), { content: dt.value }, null, 8, ["content"])])),
|
|
1211
|
+
ct.value ? (F(), k("div", {
|
|
1212
|
+
key: 2,
|
|
1213
|
+
role: "button",
|
|
1214
|
+
tabindex: "0",
|
|
1215
|
+
"aria-label": "Clear TreeSelect value",
|
|
1216
|
+
class: "semi-tree-select-clearbtn",
|
|
1217
|
+
onClick: It,
|
|
1218
|
+
onKeypress: Lt
|
|
1219
|
+
}, [j(I(B), { content: pt.value }, null, 8, ["content"])], 32)) : ft.value == null ? O("", !0) : (F(), k("div", Me, [j(I(B), { content: ft.value }, null, 8, ["content"])]))
|
|
1220
|
+
], 16, Oe)) : (F(), D(I(B), {
|
|
1221
|
+
key: 0,
|
|
1222
|
+
content: Dt.value
|
|
1223
|
+
}, null, 8, ["content"]))]),
|
|
1224
|
+
_: 1
|
|
1225
|
+
}, 16, [
|
|
1226
|
+
"auto-adjust-overflow",
|
|
1227
|
+
"motion",
|
|
1228
|
+
"position",
|
|
1229
|
+
"re-pos-key",
|
|
1230
|
+
"stop-propagation",
|
|
1231
|
+
"visible",
|
|
1232
|
+
"z-index"
|
|
1233
|
+
]));
|
|
1234
|
+
}
|
|
1235
|
+
});
|
|
1236
|
+
//#endregion
|
|
1237
|
+
export { V as t };
|