@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,1525 @@
|
|
|
1
|
+
import "./src-DNBBthjO.js";
|
|
2
|
+
import { _ as e, d as t, f as n, g as r, h as i, i as a, l as o, m as s, n as c, p as l, s as u, t as d, v as f } from "./foundation-Cawx37mp.js";
|
|
3
|
+
import { t as p } from "./env-BeIzjQx7.js";
|
|
4
|
+
import "./keyCode-DMNg63wX.js";
|
|
5
|
+
import { t as m } from "./isEnterPress-HTy0eCBp.js";
|
|
6
|
+
import { f as h, i as g, n as _, p as v, r as y, t as b, y as x } from "./treeUtil-IUdRJ6Ws.js";
|
|
7
|
+
import { n as ee } from "./popover-hD77YpUM.js";
|
|
8
|
+
import { t as S } from "./checkbox-mJD1ou6k.js";
|
|
9
|
+
import { t as te } from "./input-wf0nZCRS.js";
|
|
10
|
+
import { t as ne } from "./tag-input-SxUfNqF0.js";
|
|
11
|
+
import { t as re } from "./config-context-CyynTtDb.js";
|
|
12
|
+
import { n as ie } from "./tag-BPD0bELU.js";
|
|
13
|
+
import { t as ae } from "./spin-D-1P0WMW.js";
|
|
14
|
+
import { Fragment as C, computed as w, createBlock as T, createCommentVNode as E, createElementBlock as D, createElementVNode as O, createVNode as k, defineComponent as A, getCurrentInstance as oe, h as j, inject as se, markRaw as ce, mergeProps as M, nextTick as le, normalizeClass as N, normalizeStyle as ue, onBeforeUnmount as de, onMounted as fe, openBlock as P, renderList as F, shallowReactive as pe, shallowRef as me, toDisplayString as he, unref as I, useAttrs as ge, useSlots as _e, useTemplateRef as L, watch as R, withCtx as ve } from "vue";
|
|
15
|
+
import { IconChevronDown as ye, IconChevronRight as be, IconClear as xe, IconTick as Se } from "@aifuxi/semi-icons-vue";
|
|
16
|
+
`${p}`, `${p}`;
|
|
17
|
+
var z = {
|
|
18
|
+
SIZE_SET: [
|
|
19
|
+
"small",
|
|
20
|
+
"large",
|
|
21
|
+
"default"
|
|
22
|
+
],
|
|
23
|
+
VALIDATE_STATUS: [
|
|
24
|
+
"success",
|
|
25
|
+
"default",
|
|
26
|
+
"error",
|
|
27
|
+
"warning"
|
|
28
|
+
],
|
|
29
|
+
IS_KEY: "isKey",
|
|
30
|
+
IS_VALUE: "isValue",
|
|
31
|
+
SHOW_NEXT_BY_CLICK: "click",
|
|
32
|
+
SHOW_NEXT_BY_HOVER: "hover",
|
|
33
|
+
LEAF_ONLY_MERGE_TYPE: "leafOnly",
|
|
34
|
+
AUTO_MERGE_VALUE_MERGE_TYPE: "autoMergeValue",
|
|
35
|
+
NONE_MERGE_TYPE: "none",
|
|
36
|
+
SEARCH_POSITION_TRIGGER: "trigger",
|
|
37
|
+
SEARCH_POSITION_CUSTOM: "custom",
|
|
38
|
+
RELATED: "related",
|
|
39
|
+
UN_RELATED: "unRelated"
|
|
40
|
+
}, B = "_SEMI_CASCADER_SPLIT_";
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region bundled-foundation
|
|
43
|
+
function V(e, t) {
|
|
44
|
+
return `${e}-${t}`;
|
|
45
|
+
}
|
|
46
|
+
function Ce(e) {
|
|
47
|
+
return !(0, s.default)(e) && !(0, f.default)(e);
|
|
48
|
+
}
|
|
49
|
+
function we(e) {
|
|
50
|
+
return Array.isArray(e) ? e : [e];
|
|
51
|
+
}
|
|
52
|
+
function H(e, t, n, r) {
|
|
53
|
+
if (!n) return !0;
|
|
54
|
+
let i = n, a;
|
|
55
|
+
return typeof n == "boolean" ? (i = (e, t) => {
|
|
56
|
+
let n = e.toLowerCase();
|
|
57
|
+
return t.toLowerCase().includes(n);
|
|
58
|
+
}, a = r.join("")) : a = r.join(), i(e, a, t);
|
|
59
|
+
}
|
|
60
|
+
function U(e, t, n) {
|
|
61
|
+
let r = (0, u.default)(n, "value", "value"), i = (0, u.default)(n, "children", "children"), a = (o, s, c) => {
|
|
62
|
+
let l = o ? o[i] : e, u = null;
|
|
63
|
+
if (o) {
|
|
64
|
+
let e = o[r], i = c ? `${c.key}${B}${e}` : `${e}`, a = c ? V(c.pos, s) : `${s}`, l = { ...o };
|
|
65
|
+
n && Object.entries(n).forEach(([e, t]) => {
|
|
66
|
+
let n = o[t];
|
|
67
|
+
(0, f.default)(n) || (l[e] = n);
|
|
68
|
+
}), u = {
|
|
69
|
+
data: l,
|
|
70
|
+
ind: s,
|
|
71
|
+
key: i,
|
|
72
|
+
pos: a,
|
|
73
|
+
level: c ? c.level + 1 : 0,
|
|
74
|
+
parentKey: c ? c.key : null,
|
|
75
|
+
path: c ? [...c.path, i] : [i],
|
|
76
|
+
valuePath: c ? [...c.valuePath, e] : [e]
|
|
77
|
+
}, t(u);
|
|
78
|
+
}
|
|
79
|
+
l && l.forEach((e, t) => {
|
|
80
|
+
a(e, t, u);
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
a(null);
|
|
84
|
+
}
|
|
85
|
+
function Te(e) {
|
|
86
|
+
return e?.length ? Array.isArray(e[0]) ? e.map((e) => W(e)) : [W(e)] : [];
|
|
87
|
+
}
|
|
88
|
+
function W(e) {
|
|
89
|
+
return e.join(B);
|
|
90
|
+
}
|
|
91
|
+
function G(e, t, n) {
|
|
92
|
+
let r = (0, u.default)(n, "value", "value"), i = (0, u.default)(n, "children", "children"), a = e.split("-").map((e) => Number(e)), o = t, s = [];
|
|
93
|
+
return a.forEach((e, t) => {
|
|
94
|
+
o = t === 0 ? o[e] : o?.[i]?.[e], s.push(o?.[r]);
|
|
95
|
+
}), W(s);
|
|
96
|
+
}
|
|
97
|
+
function Ee(e, t) {
|
|
98
|
+
let n = {};
|
|
99
|
+
return U(e, (e) => {
|
|
100
|
+
let { key: t, parentKey: r } = e, i = { ...e };
|
|
101
|
+
n[t] = i, i.parent = n[r], i.parent && (i.parent.children = i.parent.children || [], i.parent.children.push(i));
|
|
102
|
+
}, t), n;
|
|
103
|
+
}
|
|
104
|
+
function De(e, t) {
|
|
105
|
+
let n = (0, u.default)(t, "value", "value");
|
|
106
|
+
return Array.isArray(e) ? e.map((e) => (0, u.default)(e, n)) : (0, u.default)(e, n);
|
|
107
|
+
}
|
|
108
|
+
function Oe(e, t) {
|
|
109
|
+
let n;
|
|
110
|
+
return n = t ? z.LEAF_ONLY_MERGE_TYPE : e ? z.AUTO_MERGE_VALUE_MERGE_TYPE : z.NONE_MERGE_TYPE, n;
|
|
111
|
+
}
|
|
112
|
+
//#endregion
|
|
113
|
+
//#region bundled-foundation
|
|
114
|
+
var ke = class extends d {
|
|
115
|
+
constructor(e) {
|
|
116
|
+
super({ ...e }), this.handleKeyDown = (e) => {
|
|
117
|
+
e.key === "Escape" && this.getState("isOpen") && this.close(e);
|
|
118
|
+
}, this.updateSearching = (e) => {
|
|
119
|
+
this._adapter.updateStates({ isSearching: !1 });
|
|
120
|
+
}, this.handleTagRemoveByKey = (e) => {
|
|
121
|
+
let { keyEntities: t } = this.getStates(), { disabled: n } = this.getProps();
|
|
122
|
+
if (n)
|
|
123
|
+
/* istanbul ignore next */
|
|
124
|
+
return;
|
|
125
|
+
let r = t[e] ?? {};
|
|
126
|
+
!r?.data?.disable && this._handleMultipleSelect(r), this._adapter.rePositionDropdown();
|
|
127
|
+
}, this.handleTagRemoveInTrigger = (e) => {
|
|
128
|
+
let { treeData: t } = this.getStates(), { keyMaps: n } = this.getProps(), r = G(e, t, n);
|
|
129
|
+
this.handleTagRemoveByKey(r);
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
init() {
|
|
133
|
+
let e = this.getProp("open") || this.getProp("defaultOpen");
|
|
134
|
+
this.collectOptions(!0), this._adapter.updateLoadingKeyRefValue(/* @__PURE__ */ new Set()), this._adapter.updateLoadedKeyRefValue(/* @__PURE__ */ new Set()), e && !this._isDisabled() && this.open();
|
|
135
|
+
}
|
|
136
|
+
_setEmptyContentMinWidth() {
|
|
137
|
+
let { style: t } = this.getProps(), n;
|
|
138
|
+
n = t && (0, i.default)(t.width) || t && (0, e.default)(t.width) && !t.width.includes("%") ? t.width : this._adapter.getTriggerWidth(), this._adapter.setEmptyContentMinWidth(n);
|
|
139
|
+
}
|
|
140
|
+
destroy() {
|
|
141
|
+
this._adapter.unregisterClickOutsideHandler();
|
|
142
|
+
}
|
|
143
|
+
_isDisabled() {
|
|
144
|
+
return this.getProp("disabled");
|
|
145
|
+
}
|
|
146
|
+
_isFilterable() {
|
|
147
|
+
return !!this.getProp("filterTreeNode");
|
|
148
|
+
}
|
|
149
|
+
_notifyChange(e) {
|
|
150
|
+
let { onChangeWithObject: t, multiple: n } = this.getProps(), r = t ? [] : "value";
|
|
151
|
+
if (n) {
|
|
152
|
+
let t = [];
|
|
153
|
+
e.forEach((e) => {
|
|
154
|
+
let n = this.getItemPropPath(e, r);
|
|
155
|
+
t.push(n);
|
|
156
|
+
}), this._adapter.notifyChange(t);
|
|
157
|
+
} else {
|
|
158
|
+
let t = (0, f.default)(e) || !("key" in e) ? [] : this.getItemPropPath(e.key, r);
|
|
159
|
+
this._adapter.notifyChange(t);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
_isLeaf(e) {
|
|
163
|
+
return this.getProp("loadData") ? !!e.isLeaf : !e.children || !e.children.length;
|
|
164
|
+
}
|
|
165
|
+
_clearInput() {
|
|
166
|
+
this._adapter.updateInputValue("");
|
|
167
|
+
}
|
|
168
|
+
_notifyBlur(e) {
|
|
169
|
+
this._adapter.notifyBlur(e);
|
|
170
|
+
}
|
|
171
|
+
_notifyFocus(e) {
|
|
172
|
+
this._adapter.notifyFocus(e);
|
|
173
|
+
}
|
|
174
|
+
_isOptionDisabled(e, t) {
|
|
175
|
+
return h([e], t, !0).some((e) => t[e].data.disabled);
|
|
176
|
+
}
|
|
177
|
+
getItemPropPath(e, t, n) {
|
|
178
|
+
let r = n || this.getState("keyEntities"), i = r[e], a = [];
|
|
179
|
+
if (i) {
|
|
180
|
+
if (i._notExist) a = i.path;
|
|
181
|
+
else {
|
|
182
|
+
let e = i.path;
|
|
183
|
+
a = Array.isArray(t) ? e.map((e) => r[e].data) : e.map((e) => r[e].data[t]);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
return a;
|
|
187
|
+
}
|
|
188
|
+
_getCacheValue(e) {
|
|
189
|
+
let { selectedKeys: n } = this.getStates(), r = Array.from(n)[0], i;
|
|
190
|
+
if ((0, t.default)(e[r])) {
|
|
191
|
+
if ((0, o.default)(r, "not-exist-")) {
|
|
192
|
+
let n = r.match(/not-exist-(\S*)/)[1];
|
|
193
|
+
i = (0, t.default)(e[n]) ? n : e[n].valuePath;
|
|
194
|
+
} else i = r;
|
|
195
|
+
} else i = e[r].valuePath;
|
|
196
|
+
return i;
|
|
197
|
+
}
|
|
198
|
+
collectOptions(e = !1) {
|
|
199
|
+
let { treeData: n, value: r, defaultValue: i, keyMaps: a } = this.getProps(), o = Ee(n, a);
|
|
200
|
+
this._adapter.rePositionDropdown();
|
|
201
|
+
let s;
|
|
202
|
+
e ? s = i : (0, t.default)(o) || (s = this._getCacheValue(o));
|
|
203
|
+
let c = this._isControlledComponent() ? (0, f.default)(r) ? [] : r : s;
|
|
204
|
+
Ce(c) ? this.updateSelectedKey(c, o) : this._adapter.updateStates({ keyEntities: o }), this.recalculateFilteredKeys(void 0, o);
|
|
205
|
+
}
|
|
206
|
+
_calcFilteredKeys(e, t) {
|
|
207
|
+
if (!e) return [];
|
|
208
|
+
let { treeNodeFilterProp: n, filterTreeNode: r, filterLeafOnly: i, remote: a, keyMaps: o } = this.getProps(), s = n === "label" ? (0, u.default)(o, "label", "label") : n, c = Object.values(t ?? this.getState("keyEntities"));
|
|
209
|
+
return a ? c.filter((e) => !e._notExist).filter((e) => r && !i || this._isLeaf(e.data)).map((e) => e.key) : c.filter((n) => {
|
|
210
|
+
let { key: i, _notExist: a, data: o } = n;
|
|
211
|
+
if (a) return !1;
|
|
212
|
+
let c = this.getItemPropPath(i, s, t);
|
|
213
|
+
return H(e, o, r, c);
|
|
214
|
+
}).filter((e) => r && !i || this._isLeaf(e.data)).map((e) => e.key);
|
|
215
|
+
}
|
|
216
|
+
recalculateFilteredKeys(e, t) {
|
|
217
|
+
if (!this._isFilterable()) return;
|
|
218
|
+
let n = this.getState("isSearching");
|
|
219
|
+
if ((0, f.default)(e) && !n) return;
|
|
220
|
+
let r = (0, f.default)(e) ? this.getState("inputValue") : e, i = this._calcFilteredKeys(r, t), a = {
|
|
221
|
+
isSearching: !!r,
|
|
222
|
+
filteredKeys: new Set(i)
|
|
223
|
+
};
|
|
224
|
+
t && (a.keyEntities = t), this._adapter.updateStates(a), this._adapter.rePositionDropdown();
|
|
225
|
+
}
|
|
226
|
+
handleValueChange(e) {
|
|
227
|
+
let { keyEntities: t } = this.getStates();
|
|
228
|
+
this.updateSelectedKey(e, t);
|
|
229
|
+
}
|
|
230
|
+
_getClearSelectedKey(e) {
|
|
231
|
+
let t = {}, { searchPlaceholder: n, placeholder: r, multiple: i } = this.getProps();
|
|
232
|
+
return t.selectedKeys = /* @__PURE__ */ new Set([]), t.activeKeys = /* @__PURE__ */ new Set([]), t.filteredKeys = /* @__PURE__ */ new Set([]), e && !i && (t.inputPlaceHolder = n || r || "", t.inputValue = ""), t;
|
|
233
|
+
}
|
|
234
|
+
updateSelectedKey(e, t) {
|
|
235
|
+
let { changeOnSelect: i, onChangeWithObject: a, multiple: o } = this.getProps(), { activeKeys: s, loading: l, keyEntities: u, selectedKeys: d } = this.getStates(), f = this._adapter.getLoadingKeyRefValue(), p = this._isFilterable(), m = [...s].filter((e) => f.has(e)), h = we(e), g = this.getProp("keyMaps"), _ = a && (0, r.default)(h[0]) ? De(h, g) : h, v = Te(_), y = {}, b = v.length > 0 ? v[0] : void 0, x = b ? t[b] : void 0;
|
|
236
|
+
if (x) {
|
|
237
|
+
if (i || this._isLeaf(x.data)) {
|
|
238
|
+
if (y.selectedKeys = /* @__PURE__ */ new Set([b]), m.length || (y.activeKeys = new Set(x.path)), p && !o) {
|
|
239
|
+
let e = this.renderDisplayText(b, t);
|
|
240
|
+
y.inputPlaceHolder = e;
|
|
241
|
+
}
|
|
242
|
+
} else (0, n.default)(v, Array.from(d)) && (y = this._getClearSelectedKey(p));
|
|
243
|
+
} else if (e && e.length) {
|
|
244
|
+
let e = _[_.length - 1], n = `not-exist-${e}`, r = {
|
|
245
|
+
data: {
|
|
246
|
+
label: e,
|
|
247
|
+
value: e
|
|
248
|
+
},
|
|
249
|
+
key: n,
|
|
250
|
+
path: _,
|
|
251
|
+
_notExist: !0
|
|
252
|
+
};
|
|
253
|
+
if (y.selectedKeys = /* @__PURE__ */ new Set([n]), p && !o) {
|
|
254
|
+
let e = this._defaultRenderText(_);
|
|
255
|
+
y.inputPlaceHolder = e;
|
|
256
|
+
}
|
|
257
|
+
t[n] = r;
|
|
258
|
+
} else if (l || f?.size) {
|
|
259
|
+
y.keyEntities = (0, c.default)(u, t), this._adapter.updateStates(y);
|
|
260
|
+
return;
|
|
261
|
+
} else y = this._getClearSelectedKey(p);
|
|
262
|
+
y.keyEntities = t, this._adapter.updateStates(y);
|
|
263
|
+
}
|
|
264
|
+
open() {
|
|
265
|
+
let e = this._isFilterable(), { multiple: t } = this.getProps();
|
|
266
|
+
this._adapter.openMenu(), e && (this._clearInput(), !t && this.toggle2SearchInput(!0)), this._isControlledComponent() && this.reCalcActiveKeys(), this._adapter.notifyDropdownVisibleChange(!0), this._adapter.registerClickOutsideHandler((e) => this.close(e)), this._setEmptyContentMinWidth();
|
|
267
|
+
}
|
|
268
|
+
reCalcActiveKeys() {
|
|
269
|
+
let { selectedKeys: e, activeKeys: t, keyEntities: r } = this.getStates(), i = r[[...e][0]];
|
|
270
|
+
if (!i) return;
|
|
271
|
+
let a = new Set(i.path);
|
|
272
|
+
(0, n.default)(a, t) || this._adapter.updateStates({ activeKeys: a });
|
|
273
|
+
}
|
|
274
|
+
close(e, t) {
|
|
275
|
+
let { multiple: n } = this.getProps();
|
|
276
|
+
if (this._adapter.closeMenu(), this._adapter.notifyDropdownVisibleChange(!1), this._adapter.unregisterClickOutsideHandler(), this._isFilterable()) {
|
|
277
|
+
let { selectedKeys: e, isSearching: r } = this.getStates(), i = "";
|
|
278
|
+
t && !n ? i = this.renderDisplayText(t) : e.size && !n && (i = this.renderDisplayText([...e][0])), this._adapter.updateStates({
|
|
279
|
+
inputValue: i,
|
|
280
|
+
isSearching: !1
|
|
281
|
+
}), !n && this.toggle2SearchInput(!1), !n && this._adapter.updateFocusState(!1);
|
|
282
|
+
}
|
|
283
|
+
this._notifyBlur(e);
|
|
284
|
+
}
|
|
285
|
+
focus() {
|
|
286
|
+
let { filterTreeNode: e } = this.getProps();
|
|
287
|
+
e && this._adapter.focusInput(), this._adapter.updateFocusState(!0);
|
|
288
|
+
}
|
|
289
|
+
blur() {
|
|
290
|
+
let { filterTreeNode: e } = this.getProps();
|
|
291
|
+
e && this._adapter.blurInput(), this._adapter.updateFocusState(!1);
|
|
292
|
+
}
|
|
293
|
+
toggle2SearchInput(e) {
|
|
294
|
+
e ? this._adapter.toggleInputShow(e, () => this.focus()) : this._adapter.toggleInputShow(e, () => void 0);
|
|
295
|
+
}
|
|
296
|
+
handleItemClick(e, t) {
|
|
297
|
+
this._isDisabled() || (this.handleSingleSelect(e, t), this._adapter.rePositionDropdown());
|
|
298
|
+
}
|
|
299
|
+
handleItemHover(e, t) {
|
|
300
|
+
this._isDisabled() || this.handleShowNextByHover(t);
|
|
301
|
+
}
|
|
302
|
+
handleShowNextByHover(e) {
|
|
303
|
+
let { keyEntities: t } = this.getStates(), { data: n, key: r } = e, i = this._isLeaf(n), a = t[r].path;
|
|
304
|
+
this._adapter.updateStates({ activeKeys: new Set(a) }), i || this.notifyIfLoadData(e);
|
|
305
|
+
}
|
|
306
|
+
onItemCheckboxClick(e) {
|
|
307
|
+
this._isDisabled() || (this._handleMultipleSelect(e), this._adapter.rePositionDropdown());
|
|
308
|
+
}
|
|
309
|
+
handleClick(e) {
|
|
310
|
+
let t = this._isDisabled(), n = this._isFilterable(), { isOpen: r } = this.getStates();
|
|
311
|
+
t || (r ? r && !n && this.close(e) : (this.open(), this._notifyFocus(e)));
|
|
312
|
+
}
|
|
313
|
+
/* istanbul ignore next */
|
|
314
|
+
handleSelectionEnterPress(e) {
|
|
315
|
+
m(e) && this.handleClick(e);
|
|
316
|
+
}
|
|
317
|
+
toggleHoverState(e) {
|
|
318
|
+
this._adapter.toggleHovering(e);
|
|
319
|
+
}
|
|
320
|
+
_defaultRenderText(e, t) {
|
|
321
|
+
let n = this.getProp("separator");
|
|
322
|
+
return t && typeof t == "function" ? t(e) : e.join(n);
|
|
323
|
+
}
|
|
324
|
+
renderDisplayText(e, t) {
|
|
325
|
+
let n = this.getProp("displayRender"), r = this.getProp("displayProp"), i = this.getItemPropPath(e, r, t);
|
|
326
|
+
return this._defaultRenderText(i, n);
|
|
327
|
+
}
|
|
328
|
+
handleNodeLoad(e) {
|
|
329
|
+
let { data: t, key: n } = e, r = new Set(this._adapter.getLoadingKeyRefValue()), i = new Set(this._adapter.getLoadedKeyRefValue()).add(n), a = /* @__PURE__ */ new Set([...r]);
|
|
330
|
+
a.delete(n), this._adapter.notifyOnLoad(i, t), this._adapter.updateLoadingKeyRefValue(a), this._adapter.updateLoadedKeyRefValue(i), this._adapter.updateStates({
|
|
331
|
+
loadingKeys: a,
|
|
332
|
+
loadedKeys: i
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
notifyIfLoadData(e) {
|
|
336
|
+
let { data: t, key: n } = e;
|
|
337
|
+
if (this._adapter.updateStates({ loading: !1 }), !t.isLeaf && !t.children && this.getProp("loadData")) {
|
|
338
|
+
let t = this._adapter.getLoadedKeyRefValue(), r = new Set(this._adapter.getLoadingKeyRefValue());
|
|
339
|
+
if (t.has(n) || r.has(n)) return;
|
|
340
|
+
this._adapter.updateStates({ loading: !0 });
|
|
341
|
+
let { keyEntities: i } = this.getStates(), a = this.getItemPropPath(n, [], i), o = r.add(n);
|
|
342
|
+
this._adapter.updateLoadingKeyRefValue(o), this._adapter.updateStates({ loadingKeys: o }), this._adapter.notifyLoadData(a, this.handleNodeLoad.bind(this, e));
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
handleSingleSelect(e, t) {
|
|
346
|
+
let { changeOnSelect: n, filterLeafOnly: r, multiple: i, enableLeafClick: a, clickToSelect: o } = this.getProps(), { keyEntities: s, selectedKeys: c, isSearching: l } = this.getStates(), u = this._isFilterable(), { data: d, key: f } = t, p = this._isLeaf(d), m = s[f].path, h = [f], g = f !== [...c][0];
|
|
347
|
+
if (!p && !n && !l && !(i && o)) {
|
|
348
|
+
this._adapter.updateStates({ activeKeys: new Set(m) }), this.notifyIfLoadData(t);
|
|
349
|
+
return;
|
|
350
|
+
}
|
|
351
|
+
if (i) this._adapter.updateStates({ activeKeys: new Set(m) }), (o || p && a) && this.onItemCheckboxClick(t);
|
|
352
|
+
else if (this._adapter.notifySelect(d.value), g) {
|
|
353
|
+
if (this._notifyChange(t), this.notifyIfLoadData(t), this._isControlledComponent()) {
|
|
354
|
+
this._adapter.updateStates({ activeKeys: new Set(m) }), p && this.close(e);
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
357
|
+
this._adapter.updateStates({
|
|
358
|
+
activeKeys: new Set(m),
|
|
359
|
+
selectedKeys: new Set(h)
|
|
360
|
+
});
|
|
361
|
+
let n = this.renderDisplayText(f);
|
|
362
|
+
u && this._adapter.updateInputPlaceHolder(n), (p || !r && l) && this.close(e, f);
|
|
363
|
+
} else this.close(e);
|
|
364
|
+
}
|
|
365
|
+
_handleMultipleSelect(e) {
|
|
366
|
+
let { checkRelation: t } = this.getProps();
|
|
367
|
+
t === z.RELATED ? this._handleRelatedMultipleSelect(e) : t === "unRelated" && this._handleUnRelatedMultipleSelect(e), this._adapter.updateStates({ inputValue: "" });
|
|
368
|
+
}
|
|
369
|
+
_handleRelatedMultipleSelect(e) {
|
|
370
|
+
let { key: t } = e, { checkedKeys: n, keyEntities: r, resolvedCheckedKeys: a } = this.getStates(), { autoMergeValue: o, max: s, disableStrictly: c, leafOnly: l } = this.getProps(), u = n.has(t), d = c ? this.calcCheckedStatus(!u, t) : !u, { checkedKeys: f, halfCheckedKeys: p } = c ? this.calcNonDisabledCheckedKeys(t, d) : this.calcCheckedKeys(t, d), m = Oe(o, l), h = m === z.LEAF_ONLY_MERGE_TYPE, g = m === z.NONE_MERGE_TYPE, _ = new Set(x(f, r, h)), v = g ? f : _;
|
|
371
|
+
if ((0, i.default)(s)) {
|
|
372
|
+
if (!g) {
|
|
373
|
+
if (a.size < _.size && _.size > s) {
|
|
374
|
+
let e = [];
|
|
375
|
+
_.forEach((t) => {
|
|
376
|
+
e.push(r[t]);
|
|
377
|
+
}), this._adapter.notifyOnExceed(e);
|
|
378
|
+
return;
|
|
379
|
+
}
|
|
380
|
+
} else if (n.size < f.size && f.size > s) {
|
|
381
|
+
let e = [];
|
|
382
|
+
f.forEach((t) => {
|
|
383
|
+
e.push(r[t]);
|
|
384
|
+
}), this._adapter.notifyOnExceed(e);
|
|
385
|
+
return;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
this._isControlledComponent() || this._adapter.updateStates({
|
|
389
|
+
checkedKeys: f,
|
|
390
|
+
halfCheckedKeys: p,
|
|
391
|
+
resolvedCheckedKeys: _
|
|
392
|
+
}), this._notifyChange(v), d && this._notifySelect(v);
|
|
393
|
+
}
|
|
394
|
+
_handleUnRelatedMultipleSelect(e) {
|
|
395
|
+
let { key: t } = e, { checkedKeys: n, keyEntities: r } = this.getStates(), { max: a } = this.getProps(), o = new Set(n), s;
|
|
396
|
+
if (n.has(t)) o.delete(t), s = !1;
|
|
397
|
+
else {
|
|
398
|
+
if ((0, i.default)(a) && n.size >= a) {
|
|
399
|
+
let e = [];
|
|
400
|
+
n.forEach((t) => {
|
|
401
|
+
e.push(r[t]);
|
|
402
|
+
}), this._adapter.notifyOnExceed(e);
|
|
403
|
+
return;
|
|
404
|
+
}
|
|
405
|
+
o.add(t), s = !0;
|
|
406
|
+
}
|
|
407
|
+
this._isControlledComponent() || this._adapter.updateStates({ checkedKeys: o }), this._notifyChange(o), s && this._notifySelect(o);
|
|
408
|
+
}
|
|
409
|
+
calcNonDisabledCheckedKeys(e, t) {
|
|
410
|
+
let { keyEntities: n, disabledKeys: r } = this.getStates(), i = new Set(this.getState("checkedKeys")), o = x(v([e], n, !1), n, !0);
|
|
411
|
+
if (!o.some((e) => r.has(e))) return this.calcCheckedKeys(e, t);
|
|
412
|
+
let s = o.filter((e) => !r.has(e)), c = t ? [...s, ...i] : (0, a.default)(x([...i], n, !0), s);
|
|
413
|
+
return b(c, n);
|
|
414
|
+
}
|
|
415
|
+
calcCheckedStatus(e, t) {
|
|
416
|
+
if (!e) return e;
|
|
417
|
+
let { checkedKeys: n, keyEntities: r, disabledKeys: i } = this.getStates(), a = x(v([t], r, !1), r, !0);
|
|
418
|
+
return a.some((e) => i.has(e)) ? !a.filter((e) => !i.has(e)).every((e) => n.has(e)) : e;
|
|
419
|
+
}
|
|
420
|
+
_notifySelect(e) {
|
|
421
|
+
let { keyEntities: t } = this.getStates(), n = [];
|
|
422
|
+
e.forEach((e) => {
|
|
423
|
+
let r = t[e]?.data?.value;
|
|
424
|
+
r !== void 0 && n.push(r);
|
|
425
|
+
});
|
|
426
|
+
let r = n.length === 1 ? n[0] : n;
|
|
427
|
+
this._adapter.notifySelect(r);
|
|
428
|
+
}
|
|
429
|
+
calcCheckedKeys(e, t) {
|
|
430
|
+
let { keyEntities: n } = this.getStates(), r = new Set(this.getState("checkedKeys")), i = new Set(this.getState("halfCheckedKeys"));
|
|
431
|
+
return t ? _(e, n, r, i) : y(e, n, r, i);
|
|
432
|
+
}
|
|
433
|
+
handleInputChange(e) {
|
|
434
|
+
this._adapter.updateInputValue(e);
|
|
435
|
+
let t = this._calcFilteredKeys(e);
|
|
436
|
+
this._adapter.updateStates({
|
|
437
|
+
isSearching: !!e,
|
|
438
|
+
filteredKeys: new Set(t)
|
|
439
|
+
}), this._adapter.notifyOnSearch(e), this._adapter.rePositionDropdown();
|
|
440
|
+
}
|
|
441
|
+
handleClear() {
|
|
442
|
+
let { isSearching: e } = this.getStates(), { searchPlaceholder: t, placeholder: n, multiple: r } = this.getProps(), i = this._isFilterable(), a = this._isControlledComponent(), o = {};
|
|
443
|
+
r ? (o.isSearching = !1, this._adapter.updateInputValue(""), this._adapter.notifyOnSearch(""), o.checkedKeys = /* @__PURE__ */ new Set([]), o.halfCheckedKeys = /* @__PURE__ */ new Set([]), o.selectedKeys = /* @__PURE__ */ new Set([]), o.activeKeys = /* @__PURE__ */ new Set([]), o.resolvedCheckedKeys = /* @__PURE__ */ new Set([]), this._adapter.notifyChange([])) : i && e ? (o.isSearching = !1, this._adapter.updateInputValue(""), this._adapter.notifyOnSearch("")) : (i && (o.inputValue = "", o.inputPlaceHolder = t || n || "", this._adapter.updateInputValue(""), this._adapter.notifyOnSearch("")), a || (o.selectedKeys = /* @__PURE__ */ new Set([])), o.activeKeys = /* @__PURE__ */ new Set([]), o.filteredKeys = /* @__PURE__ */ new Set([]), this._adapter.notifyChange([])), this._adapter.updateStates(o), this._adapter.notifyClear(), this._adapter.rePositionDropdown();
|
|
444
|
+
}
|
|
445
|
+
/* istanbul ignore next */
|
|
446
|
+
handleClearEnterPress(e) {
|
|
447
|
+
m(e) && this.handleClear();
|
|
448
|
+
}
|
|
449
|
+
getRenderData() {
|
|
450
|
+
let { keyEntities: e, isSearching: t } = this.getStates(), n = this._isFilterable();
|
|
451
|
+
return t && n ? this.getFilteredData() : Object.values(e).filter((e) => e.parentKey === null && !e._notExist).sort((e, t) => parseInt(e.ind, 10) - parseInt(t.ind, 10));
|
|
452
|
+
}
|
|
453
|
+
getFilteredData() {
|
|
454
|
+
let { treeNodeFilterProp: e, filterSorter: t, keyMaps: n } = this.getProps(), r = e === "label" ? (0, u.default)(n, "label", "label") : e, { filteredKeys: i, keyEntities: a, inputValue: o } = this.getStates(), s = [];
|
|
455
|
+
return [...i].forEach((e) => {
|
|
456
|
+
let t = a[e];
|
|
457
|
+
if (!t) return;
|
|
458
|
+
let n = this.getItemPropPath(e, []), i = n.map((e) => e[r]), o = this._isOptionDisabled(e, a);
|
|
459
|
+
s.push({
|
|
460
|
+
data: t.data,
|
|
461
|
+
pathData: n,
|
|
462
|
+
key: e,
|
|
463
|
+
disabled: o,
|
|
464
|
+
searchText: i
|
|
465
|
+
});
|
|
466
|
+
}), (0, l.default)(t) && s.sort((e, n) => t(e.pathData, n.pathData, o)), s;
|
|
467
|
+
}
|
|
468
|
+
handleListScroll(e, t) {
|
|
469
|
+
let { activeKeys: n, keyEntities: r } = this.getStates(), i = [...n][n.size - 1], a = i ? (0, u.default)(r, [i, "data"], null) : null;
|
|
470
|
+
this._adapter.notifyListScroll(e, {
|
|
471
|
+
panelIndex: t,
|
|
472
|
+
activeNode: a
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
}, K = A({
|
|
476
|
+
name: "CascaderNodeRenderer",
|
|
477
|
+
props: { content: {
|
|
478
|
+
type: null,
|
|
479
|
+
default: void 0
|
|
480
|
+
} },
|
|
481
|
+
setup(e) {
|
|
482
|
+
return () => typeof e.content == "function" ? e.content() : e.content;
|
|
483
|
+
}
|
|
484
|
+
}), q = {
|
|
485
|
+
key: 0,
|
|
486
|
+
class: "semi-cascader-option semi-cascader-option-empty"
|
|
487
|
+
}, Ae = {
|
|
488
|
+
class: "semi-cascader-option-label",
|
|
489
|
+
"x-semi-prop": "emptyContent"
|
|
490
|
+
}, je = ["onClick", "onKeypress"], Me = { class: "semi-cascader-option-label" }, Ne = ["onClick", "onKeypress"], J = { class: "semi-cascader-option-label" }, Pe = ["onScroll"], Fe = [
|
|
491
|
+
"id",
|
|
492
|
+
"aria-disabled",
|
|
493
|
+
"aria-expanded",
|
|
494
|
+
"aria-haspopup",
|
|
495
|
+
"aria-owns",
|
|
496
|
+
"onClick",
|
|
497
|
+
"onKeypress",
|
|
498
|
+
"onMouseenter"
|
|
499
|
+
], Ie = { class: "semi-cascader-option-label" }, Le = /* @__PURE__ */ A({
|
|
500
|
+
__name: "CascaderPanel",
|
|
501
|
+
props: {
|
|
502
|
+
activeKeys: {},
|
|
503
|
+
checkedKeys: {},
|
|
504
|
+
data: {},
|
|
505
|
+
direction: {},
|
|
506
|
+
emptyContent: {},
|
|
507
|
+
expandIcon: {},
|
|
508
|
+
filterRender: { type: Function },
|
|
509
|
+
halfCheckedKeys: {},
|
|
510
|
+
keyword: {},
|
|
511
|
+
loadData: { type: Function },
|
|
512
|
+
loadedKeys: {},
|
|
513
|
+
loadingKeys: {},
|
|
514
|
+
multiple: { type: Boolean },
|
|
515
|
+
searchable: { type: Boolean },
|
|
516
|
+
selectedKeys: {},
|
|
517
|
+
separator: {},
|
|
518
|
+
showNext: {},
|
|
519
|
+
virtualize: {}
|
|
520
|
+
},
|
|
521
|
+
emits: [
|
|
522
|
+
"check",
|
|
523
|
+
"itemClick",
|
|
524
|
+
"itemHover",
|
|
525
|
+
"listScroll"
|
|
526
|
+
],
|
|
527
|
+
setup(e, { emit: t }) {
|
|
528
|
+
let n = e, r = t, i = me(0), a = w(() => {
|
|
529
|
+
if (n.searchable) return [];
|
|
530
|
+
let e = [], t = n.data;
|
|
531
|
+
for (; t.length;) e.push(t), t = t.find((e) => n.activeKeys.has(e.key))?.children ?? [];
|
|
532
|
+
return e;
|
|
533
|
+
}), o = w(() => {
|
|
534
|
+
let e = n.virtualize?.height;
|
|
535
|
+
return typeof e == "number" ? e : Number.parseFloat(e ?? "") || 200;
|
|
536
|
+
}), s = w(() => {
|
|
537
|
+
let e = n.data;
|
|
538
|
+
if (!n.virtualize) return {
|
|
539
|
+
start: 0,
|
|
540
|
+
items: e,
|
|
541
|
+
total: 0
|
|
542
|
+
};
|
|
543
|
+
let t = Math.max(0, Math.floor(i.value / n.virtualize.itemSize) - 2), r = Math.ceil(o.value / n.virtualize.itemSize) + 4;
|
|
544
|
+
return {
|
|
545
|
+
start: t,
|
|
546
|
+
items: e.slice(t, t + r),
|
|
547
|
+
total: e.length * n.virtualize.itemSize
|
|
548
|
+
};
|
|
549
|
+
});
|
|
550
|
+
function c(e) {
|
|
551
|
+
return !!(e.data.disabled || "disabled" in e && e.disabled);
|
|
552
|
+
}
|
|
553
|
+
function l(e, t) {
|
|
554
|
+
let r = n.selectedKeys.has(e.key);
|
|
555
|
+
return [
|
|
556
|
+
"semi-cascader-option",
|
|
557
|
+
t && !n.filterRender ? "semi-cascader-option-flatten" : "",
|
|
558
|
+
n.activeKeys.has(e.key) && !r ? "semi-cascader-option-active" : "",
|
|
559
|
+
r && !n.multiple ? "semi-cascader-option-select" : "",
|
|
560
|
+
c(e) ? "semi-cascader-option-disabled" : ""
|
|
561
|
+
].filter(Boolean);
|
|
562
|
+
}
|
|
563
|
+
function u(e, t) {
|
|
564
|
+
c(t) || r("itemClick", e, t);
|
|
565
|
+
}
|
|
566
|
+
function d(e, t) {
|
|
567
|
+
e.key === "Enter" && u(e, t);
|
|
568
|
+
}
|
|
569
|
+
function f(e, t) {
|
|
570
|
+
!t.data.disabled && n.showNext === "hover" && r("itemHover", e, t);
|
|
571
|
+
}
|
|
572
|
+
function p(e, t) {
|
|
573
|
+
e.stopPropagation(), e.nativeEvent.stopImmediatePropagation(), c(t) || r("check", t);
|
|
574
|
+
}
|
|
575
|
+
function m(e, t = !1) {
|
|
576
|
+
let r = t ? " semi-cascader-option-icon-left" : "";
|
|
577
|
+
return e === "child" ? n.expandIcon ?? j(be, { class: `semi-cascader-option-icon semi-cascader-option-icon-expand${r}` }) : e === "tick" ? j(Se, { class: `semi-cascader-option-icon semi-cascader-option-icon-active${r}` }) : e === "loading" ? j(ae, {
|
|
578
|
+
wrapperClassName: `semi-cascader-option-spin-icon${r}`,
|
|
579
|
+
size: "small"
|
|
580
|
+
}) : j("span", {
|
|
581
|
+
"aria-hidden": "true",
|
|
582
|
+
class: `semi-cascader-option-icon semi-cascader-option-icon-empty${r}`
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
function h(e) {
|
|
586
|
+
let t = [], r = n.keyword.toLocaleLowerCase();
|
|
587
|
+
return e.forEach((i, a) => {
|
|
588
|
+
if (typeof i != "string" || !r) t.push(i);
|
|
589
|
+
else {
|
|
590
|
+
let e = i.toLocaleLowerCase(), o = 0, s = e.indexOf(r);
|
|
591
|
+
for (; s >= 0;) s > o && t.push(i.slice(o, s)), t.push(j("span", {
|
|
592
|
+
class: "semi-cascader-option-label-highlight",
|
|
593
|
+
key: `${a}-${s}`
|
|
594
|
+
}, i.slice(s, s + n.keyword.length))), o = s + n.keyword.length, s = e.indexOf(r, o);
|
|
595
|
+
o < i.length && t.push(i.slice(o));
|
|
596
|
+
}
|
|
597
|
+
a < e.length - 1 && t.push(n.separator);
|
|
598
|
+
}), t;
|
|
599
|
+
}
|
|
600
|
+
function g(e, t) {
|
|
601
|
+
let r = {
|
|
602
|
+
className: l(e, !0).join(" "),
|
|
603
|
+
inputValue: n.keyword,
|
|
604
|
+
disabled: c(e),
|
|
605
|
+
data: e.pathData,
|
|
606
|
+
checkStatus: {
|
|
607
|
+
checked: n.checkedKeys.has(e.key),
|
|
608
|
+
halfChecked: n.halfCheckedKeys.has(e.key)
|
|
609
|
+
},
|
|
610
|
+
selected: n.selectedKeys.has(e.key),
|
|
611
|
+
onClick: (t) => u(t, e),
|
|
612
|
+
onCheck: (t) => u(t, e)
|
|
613
|
+
};
|
|
614
|
+
return t !== void 0 && (r.style = t), r;
|
|
615
|
+
}
|
|
616
|
+
function _(e) {
|
|
617
|
+
if (n.virtualize) return {
|
|
618
|
+
position: "absolute",
|
|
619
|
+
left: 0,
|
|
620
|
+
right: 0,
|
|
621
|
+
top: `${(s.value.start + e) * n.virtualize.itemSize}px`,
|
|
622
|
+
height: `${n.virtualize.itemSize}px`
|
|
623
|
+
};
|
|
624
|
+
}
|
|
625
|
+
function v(e) {
|
|
626
|
+
i.value = e.currentTarget.scrollTop, r("listScroll", e, 0);
|
|
627
|
+
}
|
|
628
|
+
return (t, n) => (P(), D("div", { class: N([
|
|
629
|
+
"semi-cascader-option-lists",
|
|
630
|
+
e.direction === "rtl" ? "semi-cascader-option-lists-rtl" : void 0,
|
|
631
|
+
e.data.length === 0 ? "semi-cascader-option-lists-empty" : void 0
|
|
632
|
+
]) }, [e.data.length === 0 ? (P(), D("ul", q, [O("span", Ae, [k(I(K), { content: e.emptyContent }, null, 8, ["content"])])])) : e.searchable ? (P(), D("ul", {
|
|
633
|
+
key: 1,
|
|
634
|
+
class: "semi-cascader-option-list",
|
|
635
|
+
style: ue(e.virtualize ? {
|
|
636
|
+
height: typeof e.virtualize.height == "number" ? `${e.virtualize.height}px` : e.virtualize.height,
|
|
637
|
+
width: typeof e.virtualize.width == "number" ? `${e.virtualize.width}px` : e.virtualize.width,
|
|
638
|
+
overflow: "auto",
|
|
639
|
+
position: "relative"
|
|
640
|
+
} : void 0),
|
|
641
|
+
onScroll: n[0] ||= (t) => e.virtualize ? v(t) : r("listScroll", t, 0)
|
|
642
|
+
}, [e.virtualize ? (P(), D("div", {
|
|
643
|
+
key: 0,
|
|
644
|
+
style: ue({
|
|
645
|
+
height: `${s.value.total}px`,
|
|
646
|
+
position: "relative"
|
|
647
|
+
})
|
|
648
|
+
}, [(P(!0), D(C, null, F(s.value.items, (t, n) => (P(), D(C, { key: t.key }, [e.filterRender ? (P(), T(I(K), {
|
|
649
|
+
key: 0,
|
|
650
|
+
content: e.filterRender(g(t, _(n)))
|
|
651
|
+
}, null, 8, ["content"])) : (P(), D("li", {
|
|
652
|
+
key: 1,
|
|
653
|
+
role: "menuitem",
|
|
654
|
+
class: N(l(t, !0)),
|
|
655
|
+
style: ue(_(n)),
|
|
656
|
+
onClick: (e) => u(e, t),
|
|
657
|
+
onKeypress: (e) => d(e, t)
|
|
658
|
+
}, [O("span", Me, [e.multiple ? (P(), T(I(S), {
|
|
659
|
+
key: 1,
|
|
660
|
+
"class-name": "semi-cascader-option-label-checkbox",
|
|
661
|
+
checked: e.checkedKeys.has(t.key),
|
|
662
|
+
disabled: c(t),
|
|
663
|
+
indeterminate: e.halfCheckedKeys.has(t.key),
|
|
664
|
+
onChange: (e) => p(e, t)
|
|
665
|
+
}, null, 8, [
|
|
666
|
+
"checked",
|
|
667
|
+
"disabled",
|
|
668
|
+
"indeterminate",
|
|
669
|
+
"onChange"
|
|
670
|
+
])) : (P(), T(I(K), {
|
|
671
|
+
key: 0,
|
|
672
|
+
content: m("empty")
|
|
673
|
+
}, null, 8, ["content"])), k(I(K), { content: h(t.searchText) }, null, 8, ["content"])])], 46, je))], 64))), 128))], 4)) : (P(!0), D(C, { key: 1 }, F(e.data, (t) => (P(), D(C, { key: t.key }, [e.filterRender ? (P(), T(I(K), {
|
|
674
|
+
key: 0,
|
|
675
|
+
content: e.filterRender(g(t))
|
|
676
|
+
}, null, 8, ["content"])) : (P(), D("li", {
|
|
677
|
+
key: 1,
|
|
678
|
+
role: "menuitem",
|
|
679
|
+
class: N(l(t, !0)),
|
|
680
|
+
onClick: (e) => u(e, t),
|
|
681
|
+
onKeypress: (e) => d(e, t)
|
|
682
|
+
}, [O("span", J, [e.multiple ? (P(), T(I(S), {
|
|
683
|
+
key: 1,
|
|
684
|
+
"class-name": "semi-cascader-option-label-checkbox",
|
|
685
|
+
checked: e.checkedKeys.has(t.key),
|
|
686
|
+
disabled: c(t),
|
|
687
|
+
indeterminate: e.halfCheckedKeys.has(t.key),
|
|
688
|
+
onChange: (e) => p(e, t)
|
|
689
|
+
}, null, 8, [
|
|
690
|
+
"checked",
|
|
691
|
+
"disabled",
|
|
692
|
+
"indeterminate",
|
|
693
|
+
"onChange"
|
|
694
|
+
])) : (P(), T(I(K), {
|
|
695
|
+
key: 0,
|
|
696
|
+
content: m("empty")
|
|
697
|
+
}, null, 8, ["content"])), k(I(K), { content: h(t.searchText) }, null, 8, ["content"])])], 42, Ne))], 64))), 128))], 36)) : (P(!0), D(C, { key: 2 }, F(a.value, (t, n) => (P(), D("ul", {
|
|
698
|
+
key: t[0]?.key ?? n,
|
|
699
|
+
role: "menu",
|
|
700
|
+
class: "semi-cascader-option-list",
|
|
701
|
+
onScroll: (e) => r("listScroll", e, n)
|
|
702
|
+
}, [(P(!0), D(C, null, F(t, (t) => (P(), D("li", {
|
|
703
|
+
id: `cascaderItem-${t.key}`,
|
|
704
|
+
key: t.key,
|
|
705
|
+
role: "menuitem",
|
|
706
|
+
"aria-disabled": !!t.data.disabled,
|
|
707
|
+
"aria-expanded": e.activeKeys.has(t.key),
|
|
708
|
+
"aria-haspopup": !!(t.children?.length || e.loadData && !t.data.isLeaf),
|
|
709
|
+
"aria-owns": t.parentKey ? `cascaderItem-${t.parentKey}` : void 0,
|
|
710
|
+
class: N(l(t, !1)),
|
|
711
|
+
onClick: (e) => u(e, t),
|
|
712
|
+
onKeypress: (e) => d(e, t),
|
|
713
|
+
onMouseenter: (e) => f(e, t)
|
|
714
|
+
}, [O("span", Ie, [e.multiple ? (P(), T(I(S), {
|
|
715
|
+
key: 1,
|
|
716
|
+
"class-name": "semi-cascader-option-label-checkbox",
|
|
717
|
+
checked: e.checkedKeys.has(t.key),
|
|
718
|
+
disabled: !!t.data.disabled,
|
|
719
|
+
indeterminate: e.halfCheckedKeys.has(t.key),
|
|
720
|
+
onChange: (e) => p(e, t)
|
|
721
|
+
}, null, 8, [
|
|
722
|
+
"checked",
|
|
723
|
+
"disabled",
|
|
724
|
+
"indeterminate",
|
|
725
|
+
"onChange"
|
|
726
|
+
])) : (P(), T(I(K), {
|
|
727
|
+
key: 0,
|
|
728
|
+
content: m(e.selectedKeys.has(t.key) ? "tick" : "empty")
|
|
729
|
+
}, null, 8, ["content"])), O("span", null, [k(I(K), { content: t.data.label }, null, 8, ["content"])])]), t.children?.length || e.loadData && !t.data.isLeaf ? (P(), T(I(K), {
|
|
730
|
+
key: 0,
|
|
731
|
+
content: m(e.loadingKeys.has(t.key) && !e.loadedKeys.has(t.key) ? "loading" : "child", !0)
|
|
732
|
+
}, null, 8, ["content"])) : E("", !0)], 42, Fe))), 128))], 40, Pe))), 128))], 2));
|
|
733
|
+
}
|
|
734
|
+
}), Re = [
|
|
735
|
+
"id",
|
|
736
|
+
"aria-describedby",
|
|
737
|
+
"aria-disabled",
|
|
738
|
+
"aria-errormessage",
|
|
739
|
+
"aria-invalid",
|
|
740
|
+
"aria-label",
|
|
741
|
+
"aria-labelledby",
|
|
742
|
+
"aria-required",
|
|
743
|
+
"tabindex"
|
|
744
|
+
], ze = ["id"], Be = { class: "semi-cascader-selection-n" }, Ve = {
|
|
745
|
+
key: 1,
|
|
746
|
+
class: "semi-cascader-selection-n"
|
|
747
|
+
}, He = {
|
|
748
|
+
key: 3,
|
|
749
|
+
class: "semi-cascader-selection-placeholder"
|
|
750
|
+
}, Ue = {
|
|
751
|
+
key: 1,
|
|
752
|
+
class: "semi-cascader-suffix",
|
|
753
|
+
"x-semi-prop": "suffix"
|
|
754
|
+
}, We = {
|
|
755
|
+
key: 3,
|
|
756
|
+
class: "semi-cascader-arrow",
|
|
757
|
+
"x-semi-prop": "arrowIcon"
|
|
758
|
+
}, Y = /* @__PURE__ */ A({
|
|
759
|
+
name: "Cascader",
|
|
760
|
+
inheritAttrs: !1,
|
|
761
|
+
__name: "Cascader",
|
|
762
|
+
props: {
|
|
763
|
+
ariaDescribedby: {},
|
|
764
|
+
ariaErrormessage: {},
|
|
765
|
+
ariaInvalid: { type: [Boolean, String] },
|
|
766
|
+
ariaLabel: { default: "Cascader" },
|
|
767
|
+
ariaLabelledby: {},
|
|
768
|
+
ariaRequired: { type: [Boolean, String] },
|
|
769
|
+
arrowIcon: { type: [
|
|
770
|
+
Object,
|
|
771
|
+
String,
|
|
772
|
+
Number,
|
|
773
|
+
Boolean,
|
|
774
|
+
null,
|
|
775
|
+
Array
|
|
776
|
+
] },
|
|
777
|
+
autoAdjustOverflow: {
|
|
778
|
+
type: Boolean,
|
|
779
|
+
default: !0
|
|
780
|
+
},
|
|
781
|
+
autoClearSearchValue: {
|
|
782
|
+
type: Boolean,
|
|
783
|
+
default: !0
|
|
784
|
+
},
|
|
785
|
+
autoMergeValue: {
|
|
786
|
+
type: Boolean,
|
|
787
|
+
default: !0
|
|
788
|
+
},
|
|
789
|
+
borderless: {
|
|
790
|
+
type: Boolean,
|
|
791
|
+
default: !1
|
|
792
|
+
},
|
|
793
|
+
bottomSlot: { type: [
|
|
794
|
+
Object,
|
|
795
|
+
String,
|
|
796
|
+
Number,
|
|
797
|
+
Boolean,
|
|
798
|
+
null,
|
|
799
|
+
Array
|
|
800
|
+
] },
|
|
801
|
+
changeOnSelect: {
|
|
802
|
+
type: Boolean,
|
|
803
|
+
default: !1
|
|
804
|
+
},
|
|
805
|
+
checkRelation: { default: "related" },
|
|
806
|
+
class: { type: [
|
|
807
|
+
Boolean,
|
|
808
|
+
null,
|
|
809
|
+
String,
|
|
810
|
+
Object,
|
|
811
|
+
Array
|
|
812
|
+
] },
|
|
813
|
+
className: { type: [
|
|
814
|
+
Boolean,
|
|
815
|
+
null,
|
|
816
|
+
String,
|
|
817
|
+
Object,
|
|
818
|
+
Array
|
|
819
|
+
] },
|
|
820
|
+
clearIcon: { type: [
|
|
821
|
+
Object,
|
|
822
|
+
String,
|
|
823
|
+
Number,
|
|
824
|
+
Boolean,
|
|
825
|
+
null,
|
|
826
|
+
Array
|
|
827
|
+
] },
|
|
828
|
+
clickToSelect: {
|
|
829
|
+
type: Boolean,
|
|
830
|
+
default: !1
|
|
831
|
+
},
|
|
832
|
+
defaultOpen: {
|
|
833
|
+
type: Boolean,
|
|
834
|
+
default: !1
|
|
835
|
+
},
|
|
836
|
+
defaultValue: {},
|
|
837
|
+
disabled: {
|
|
838
|
+
type: Boolean,
|
|
839
|
+
default: !1
|
|
840
|
+
},
|
|
841
|
+
disableStrictly: {
|
|
842
|
+
type: Boolean,
|
|
843
|
+
default: !1
|
|
844
|
+
},
|
|
845
|
+
displayProp: { default: "label" },
|
|
846
|
+
displayRender: {},
|
|
847
|
+
dropdownClassName: { type: [
|
|
848
|
+
Boolean,
|
|
849
|
+
null,
|
|
850
|
+
String,
|
|
851
|
+
Object,
|
|
852
|
+
Array
|
|
853
|
+
] },
|
|
854
|
+
dropdownMargin: {},
|
|
855
|
+
dropdownStyle: { type: [
|
|
856
|
+
Boolean,
|
|
857
|
+
null,
|
|
858
|
+
String,
|
|
859
|
+
Object,
|
|
860
|
+
Array
|
|
861
|
+
] },
|
|
862
|
+
emptyContent: { type: [
|
|
863
|
+
Object,
|
|
864
|
+
String,
|
|
865
|
+
Number,
|
|
866
|
+
Boolean,
|
|
867
|
+
null,
|
|
868
|
+
Array
|
|
869
|
+
] },
|
|
870
|
+
enableLeafClick: {
|
|
871
|
+
type: Boolean,
|
|
872
|
+
default: !1
|
|
873
|
+
},
|
|
874
|
+
expandIcon: { type: [
|
|
875
|
+
Object,
|
|
876
|
+
String,
|
|
877
|
+
Number,
|
|
878
|
+
Boolean,
|
|
879
|
+
null,
|
|
880
|
+
Array
|
|
881
|
+
] },
|
|
882
|
+
filterLeafOnly: {
|
|
883
|
+
type: Boolean,
|
|
884
|
+
default: !0
|
|
885
|
+
},
|
|
886
|
+
filterRender: {},
|
|
887
|
+
filterSorter: {},
|
|
888
|
+
filterTreeNode: {
|
|
889
|
+
type: [Boolean, Function],
|
|
890
|
+
default: !1
|
|
891
|
+
},
|
|
892
|
+
getPopupContainer: {},
|
|
893
|
+
id: {},
|
|
894
|
+
insetLabel: { type: [
|
|
895
|
+
Object,
|
|
896
|
+
String,
|
|
897
|
+
Number,
|
|
898
|
+
Boolean,
|
|
899
|
+
null,
|
|
900
|
+
Array
|
|
901
|
+
] },
|
|
902
|
+
insetLabelId: {},
|
|
903
|
+
keyMaps: { default: () => ({}) },
|
|
904
|
+
leafOnly: {
|
|
905
|
+
type: Boolean,
|
|
906
|
+
default: !1
|
|
907
|
+
},
|
|
908
|
+
loadData: {},
|
|
909
|
+
loadedKeys: {},
|
|
910
|
+
max: {},
|
|
911
|
+
maxTagCount: {},
|
|
912
|
+
modelValue: {},
|
|
913
|
+
motion: {
|
|
914
|
+
type: Boolean,
|
|
915
|
+
default: !0
|
|
916
|
+
},
|
|
917
|
+
mouseEnterDelay: {},
|
|
918
|
+
mouseLeaveDelay: {},
|
|
919
|
+
multiple: {
|
|
920
|
+
type: Boolean,
|
|
921
|
+
default: !1
|
|
922
|
+
},
|
|
923
|
+
onChangeWithObject: {
|
|
924
|
+
type: Boolean,
|
|
925
|
+
default: !1
|
|
926
|
+
},
|
|
927
|
+
placeholder: {},
|
|
928
|
+
position: {},
|
|
929
|
+
prefix: { type: [
|
|
930
|
+
Object,
|
|
931
|
+
String,
|
|
932
|
+
Number,
|
|
933
|
+
Boolean,
|
|
934
|
+
null,
|
|
935
|
+
Array
|
|
936
|
+
] },
|
|
937
|
+
preventScroll: { type: Boolean },
|
|
938
|
+
remote: {
|
|
939
|
+
type: Boolean,
|
|
940
|
+
default: !1
|
|
941
|
+
},
|
|
942
|
+
restTagsPopoverProps: { default: () => ({}) },
|
|
943
|
+
searchPlaceholder: {},
|
|
944
|
+
searchPosition: { default: "trigger" },
|
|
945
|
+
separator: { default: " / " },
|
|
946
|
+
showClear: {
|
|
947
|
+
type: Boolean,
|
|
948
|
+
default: !1
|
|
949
|
+
},
|
|
950
|
+
showNext: { default: "click" },
|
|
951
|
+
showRestTagsPopover: {
|
|
952
|
+
type: Boolean,
|
|
953
|
+
default: !1
|
|
954
|
+
},
|
|
955
|
+
size: { default: "default" },
|
|
956
|
+
stopPropagation: {
|
|
957
|
+
type: [Boolean, String],
|
|
958
|
+
default: !0
|
|
959
|
+
},
|
|
960
|
+
style: { type: [
|
|
961
|
+
Boolean,
|
|
962
|
+
null,
|
|
963
|
+
String,
|
|
964
|
+
Object,
|
|
965
|
+
Array
|
|
966
|
+
] },
|
|
967
|
+
suffix: { type: [
|
|
968
|
+
Object,
|
|
969
|
+
String,
|
|
970
|
+
Number,
|
|
971
|
+
Boolean,
|
|
972
|
+
null,
|
|
973
|
+
Array
|
|
974
|
+
] },
|
|
975
|
+
topSlot: { type: [
|
|
976
|
+
Object,
|
|
977
|
+
String,
|
|
978
|
+
Number,
|
|
979
|
+
Boolean,
|
|
980
|
+
null,
|
|
981
|
+
Array
|
|
982
|
+
] },
|
|
983
|
+
treeData: { default: () => [] },
|
|
984
|
+
treeNodeFilterProp: { default: "label" },
|
|
985
|
+
triggerRender: {},
|
|
986
|
+
validateStatus: { default: "default" },
|
|
987
|
+
value: {},
|
|
988
|
+
virtualizeInSearch: {},
|
|
989
|
+
zIndex: { default: 1030 }
|
|
990
|
+
},
|
|
991
|
+
emits: [
|
|
992
|
+
"blur",
|
|
993
|
+
"change",
|
|
994
|
+
"clear",
|
|
995
|
+
"exceed",
|
|
996
|
+
"focus",
|
|
997
|
+
"listScroll",
|
|
998
|
+
"load",
|
|
999
|
+
"search",
|
|
1000
|
+
"select",
|
|
1001
|
+
"visibleChange",
|
|
1002
|
+
"update:modelValue",
|
|
1003
|
+
"update:value"
|
|
1004
|
+
],
|
|
1005
|
+
setup(e, { expose: t, emit: n }) {
|
|
1006
|
+
let r = e, i = n, a = ge(), o = _e(), s = oe(), c = L("trigger"), l = L("popup"), u = L("input"), d = L("tagInput"), f = se(re, void 0), p = w(() => f ? f.value : {
|
|
1007
|
+
direction: "ltr",
|
|
1008
|
+
locale: { code: "zh-CN" },
|
|
1009
|
+
getPopupContainer: void 0
|
|
1010
|
+
});
|
|
1011
|
+
function m(e) {
|
|
1012
|
+
let t = s?.vnode.props, n = e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
|
|
1013
|
+
return !!(t && (Object.prototype.hasOwnProperty.call(t, e) || Object.prototype.hasOwnProperty.call(t, n)));
|
|
1014
|
+
}
|
|
1015
|
+
function h(e, t) {
|
|
1016
|
+
return m(String(e)) ? r[e] !== !1 : t;
|
|
1017
|
+
}
|
|
1018
|
+
let _ = w(() => m("modelValue")), v = w(() => m("value")), y = w(() => _.value || v.value), S = w(() => _.value ? r.modelValue : v.value ? r.value : void 0), ae = w(() => h("autoAdjustOverflow", !0)), A = w(() => h("autoMergeValue", !0)), be = w(() => h("filterLeafOnly", !0)), Se = w(() => h("motion", !0)), B = w(() => h("stopPropagation", !0)), V = w(() => r.keyMaps ?? {}), Ce = w(() => V.value.disabled ?? "disabled"), we = w(() => Oe(A.value, r.leafOnly)), H = pe({
|
|
1019
|
+
emptyContentMinWidth: null,
|
|
1020
|
+
isOpen: !1,
|
|
1021
|
+
rePosKey: 0,
|
|
1022
|
+
keyEntities: {},
|
|
1023
|
+
selectedKeys: /* @__PURE__ */ new Set(),
|
|
1024
|
+
activeKeys: /* @__PURE__ */ new Set(),
|
|
1025
|
+
filteredKeys: /* @__PURE__ */ new Set(),
|
|
1026
|
+
inputValue: "",
|
|
1027
|
+
isSearching: !1,
|
|
1028
|
+
inputPlaceHolder: r.searchPlaceholder ?? r.placeholder ?? "",
|
|
1029
|
+
prevProps: {},
|
|
1030
|
+
isHovering: !1,
|
|
1031
|
+
checkedKeys: /* @__PURE__ */ new Set(),
|
|
1032
|
+
halfCheckedKeys: /* @__PURE__ */ new Set(),
|
|
1033
|
+
resolvedCheckedKeys: /* @__PURE__ */ new Set(),
|
|
1034
|
+
loadedKeys: new Set(r.loadedKeys ?? []),
|
|
1035
|
+
loadingKeys: /* @__PURE__ */ new Set(),
|
|
1036
|
+
loading: !1,
|
|
1037
|
+
treeData: r.treeData,
|
|
1038
|
+
isFocus: !1,
|
|
1039
|
+
isInput: !1,
|
|
1040
|
+
disabledKeys: /* @__PURE__ */ new Set(),
|
|
1041
|
+
showInput: !1
|
|
1042
|
+
}), U = /* @__PURE__ */ new Map(), Te = me(/* @__PURE__ */ new Set()), G = me(new Set(r.loadedKeys ?? [])), q = null, Ae = !1;
|
|
1043
|
+
function je(e) {
|
|
1044
|
+
if (e == null) return [];
|
|
1045
|
+
let t;
|
|
1046
|
+
return t = Array.isArray(e) ? Array.isArray(e[0]) ? e : [e] : [[e]], t.map((e) => e.map((e) => r.onChangeWithObject && e && typeof e == "object" ? De(e, V.value) : e)).filter((e) => e.length > 0);
|
|
1047
|
+
}
|
|
1048
|
+
function Me(e) {
|
|
1049
|
+
return je(e).map((e) => W(e)).filter((e) => !!H.keyEntities[e]);
|
|
1050
|
+
}
|
|
1051
|
+
function Ne(e) {
|
|
1052
|
+
let t = Me(e)[0];
|
|
1053
|
+
if (!t) {
|
|
1054
|
+
H.selectedKeys = /* @__PURE__ */ new Set(), H.activeKeys = /* @__PURE__ */ new Set();
|
|
1055
|
+
return;
|
|
1056
|
+
}
|
|
1057
|
+
let n = H.keyEntities[t];
|
|
1058
|
+
if (!n) return;
|
|
1059
|
+
let i = r.loadData ? !!n.data.isLeaf : !n.children?.length;
|
|
1060
|
+
if (!r.changeOnSelect && !i) {
|
|
1061
|
+
H.selectedKeys = /* @__PURE__ */ new Set(), H.activeKeys = new Set(n.path);
|
|
1062
|
+
return;
|
|
1063
|
+
}
|
|
1064
|
+
H.selectedKeys = /* @__PURE__ */ new Set([t]), H.activeKeys = new Set(n.path);
|
|
1065
|
+
}
|
|
1066
|
+
function J(e) {
|
|
1067
|
+
let t = Me(e);
|
|
1068
|
+
if (r.checkRelation === "related") {
|
|
1069
|
+
let e = b(t, H.keyEntities);
|
|
1070
|
+
H.checkedKeys = new Set(e.checkedKeys), H.halfCheckedKeys = new Set(e.halfCheckedKeys);
|
|
1071
|
+
let n = we.value === z.LEAF_ONLY_MERGE_TYPE;
|
|
1072
|
+
H.resolvedCheckedKeys = new Set(x([...H.checkedKeys], H.keyEntities, n));
|
|
1073
|
+
} else H.checkedKeys = new Set(t), H.halfCheckedKeys = /* @__PURE__ */ new Set(), H.resolvedCheckedKeys = new Set(t);
|
|
1074
|
+
}
|
|
1075
|
+
function Pe() {
|
|
1076
|
+
H.treeData = r.treeData, H.keyEntities = Ee(r.treeData, V.value), H.disabledKeys = r.disableStrictly && r.checkRelation === "related" ? new Set(g(H.keyEntities, V.value)) : /* @__PURE__ */ new Set();
|
|
1077
|
+
let e = y.value ? S.value : r.defaultValue;
|
|
1078
|
+
r.multiple ? J(e) : Ne(e), H.rePosKey += 1;
|
|
1079
|
+
}
|
|
1080
|
+
function Fe() {
|
|
1081
|
+
let e = {
|
|
1082
|
+
...r,
|
|
1083
|
+
autoMergeValue: A.value,
|
|
1084
|
+
filterLeafOnly: be.value,
|
|
1085
|
+
keyMaps: V.value,
|
|
1086
|
+
motion: Se.value,
|
|
1087
|
+
stopPropagation: B.value,
|
|
1088
|
+
value: S.value
|
|
1089
|
+
};
|
|
1090
|
+
return y.value || delete e.value, e;
|
|
1091
|
+
}
|
|
1092
|
+
let Ie = {
|
|
1093
|
+
getContext: () => void 0,
|
|
1094
|
+
getContexts: () => void 0,
|
|
1095
|
+
getProp: (e) => Fe()[e],
|
|
1096
|
+
getProps: Fe,
|
|
1097
|
+
getState: (e) => H[e],
|
|
1098
|
+
getStates: () => H,
|
|
1099
|
+
setState: (e, t) => {
|
|
1100
|
+
Object.assign(H, e), t?.();
|
|
1101
|
+
},
|
|
1102
|
+
getCache: (e) => U.get(e),
|
|
1103
|
+
getCaches: () => U,
|
|
1104
|
+
setCache: (e, t) => U.set(e, t),
|
|
1105
|
+
stopPropagation: (e) => e?.stopPropagation?.(),
|
|
1106
|
+
persistEvent: () => void 0,
|
|
1107
|
+
updateInputValue: (e) => {
|
|
1108
|
+
H.inputValue = e;
|
|
1109
|
+
},
|
|
1110
|
+
updateInputPlaceHolder: (e) => {
|
|
1111
|
+
H.inputPlaceHolder = e;
|
|
1112
|
+
},
|
|
1113
|
+
focusInput: () => {
|
|
1114
|
+
u.value?.focus(), d.value?.focus();
|
|
1115
|
+
},
|
|
1116
|
+
blurInput: () => {
|
|
1117
|
+
u.value?.blur(), d.value?.blur();
|
|
1118
|
+
},
|
|
1119
|
+
registerClickOutsideHandler: (e) => {
|
|
1120
|
+
Ie.unregisterClickOutsideHandler(), q = (t) => {
|
|
1121
|
+
let n = t.target;
|
|
1122
|
+
if (!(n instanceof Node)) return;
|
|
1123
|
+
let r = t.composedPath?.() ?? [], i = !!(c.value?.contains(n) || r.includes(c.value)), a = !!(l.value?.contains(n) || r.includes(l.value));
|
|
1124
|
+
!i && !a && e(t);
|
|
1125
|
+
}, document.addEventListener("mousedown", q, !1);
|
|
1126
|
+
},
|
|
1127
|
+
unregisterClickOutsideHandler: () => {
|
|
1128
|
+
!q || typeof document > "u" || (document.removeEventListener("mousedown", q, !1), q = null);
|
|
1129
|
+
},
|
|
1130
|
+
rePositionDropdown: () => {
|
|
1131
|
+
H.rePosKey += 1;
|
|
1132
|
+
},
|
|
1133
|
+
updateStates: (e) => Object.assign(H, e),
|
|
1134
|
+
openMenu: () => {
|
|
1135
|
+
H.isOpen || (H.isOpen = !0, i("visibleChange", !0));
|
|
1136
|
+
},
|
|
1137
|
+
closeMenu: (e) => {
|
|
1138
|
+
H.isOpen && (H.isOpen = !1, e?.(), i("visibleChange", !1));
|
|
1139
|
+
},
|
|
1140
|
+
updateSelection: (e) => {
|
|
1141
|
+
H.selectedKeys = e;
|
|
1142
|
+
},
|
|
1143
|
+
notifyChange: (e) => {
|
|
1144
|
+
let t = e;
|
|
1145
|
+
i("change", t), i("update:value", t), i("update:modelValue", t);
|
|
1146
|
+
},
|
|
1147
|
+
notifySelect: (e) => i("select", e),
|
|
1148
|
+
notifyOnSearch: (e) => i("search", e),
|
|
1149
|
+
notifyFocus: (e) => i("focus", e),
|
|
1150
|
+
notifyBlur: (e) => i("blur", e),
|
|
1151
|
+
notifyDropdownVisibleChange: () => void 0,
|
|
1152
|
+
toggleHovering: (e) => {
|
|
1153
|
+
H.isHovering = e;
|
|
1154
|
+
},
|
|
1155
|
+
notifyLoadData: (e, t) => {
|
|
1156
|
+
r.loadData && r.loadData(e).then(() => {
|
|
1157
|
+
setTimeout(() => {
|
|
1158
|
+
t(), H.loading = !1;
|
|
1159
|
+
});
|
|
1160
|
+
});
|
|
1161
|
+
},
|
|
1162
|
+
notifyOnLoad: (e, t) => i("load", e, t),
|
|
1163
|
+
notifyListScroll: (e, t) => i("listScroll", e, t),
|
|
1164
|
+
notifyOnExceed: (e) => i("exceed", e),
|
|
1165
|
+
notifyClear: () => i("clear"),
|
|
1166
|
+
toggleInputShow: (e, t) => {
|
|
1167
|
+
H.showInput = e, le(t);
|
|
1168
|
+
},
|
|
1169
|
+
updateFocusState: (e) => {
|
|
1170
|
+
H.isFocus = e;
|
|
1171
|
+
},
|
|
1172
|
+
updateLoadingKeyRefValue: (e) => {
|
|
1173
|
+
Te.value = e;
|
|
1174
|
+
},
|
|
1175
|
+
getLoadingKeyRefValue: () => Te.value,
|
|
1176
|
+
updateLoadedKeyRefValue: (e) => {
|
|
1177
|
+
G.value = e;
|
|
1178
|
+
},
|
|
1179
|
+
getLoadedKeyRefValue: () => G.value,
|
|
1180
|
+
setEmptyContentMinWidth: (e) => {
|
|
1181
|
+
H.emptyContentMinWidth = e;
|
|
1182
|
+
},
|
|
1183
|
+
getTriggerWidth: () => c.value?.getBoundingClientRect().width ?? 0
|
|
1184
|
+
}, Y = ce(new ke(Ie)), Ge = w(() => !!r.filterTreeNode), Ke = w(() => Ge.value && r.searchPosition === z.SEARCH_POSITION_TRIGGER), qe = w(() => Y.getRenderData()), Je = w(() => [qe.value.length === 0 && H.emptyContentMinWidth != null ? { minWidth: typeof H.emptyContentMinWidth == "number" ? `${H.emptyContentMinWidth}px` : H.emptyContentMinWidth } : void 0, r.dropdownStyle]), X = w(() => r.multiple ? we.value === z.NONE_MERGE_TYPE || r.checkRelation === z.UN_RELATED ? [...H.checkedKeys] : [...H.resolvedCheckedKeys] : [...H.selectedKeys]), Ye = w(() => X.value.length > 0), Xe = w(() => Object.fromEntries(Object.entries(a).filter(([e]) => e.startsWith("data-")))), Ze = w(() => o.prefix?.() ?? (m("prefix") ? r.prefix : void 0)), Z = w(() => m("insetLabel") ? r.insetLabel : void 0), Qe = w(() => o.suffix?.() ?? (m("suffix") ? r.suffix : void 0)), $e = w(() => o.arrowIcon?.() ?? (m("arrowIcon") ? r.arrowIcon : void 0) ?? j(ye)), et = w(() => o.clearIcon?.() ?? (m("clearIcon") ? r.clearIcon : void 0) ?? j(xe)), tt = w(() => o.expandIcon?.() ?? (m("expandIcon") ? r.expandIcon : void 0)), nt = w(() => typeof tt.value == "boolean" ? null : tt.value), rt = w(() => o.top?.() ?? (m("topSlot") ? r.topSlot : void 0)), it = w(() => o.bottom?.() ?? (m("bottomSlot") ? r.bottomSlot : void 0)), at = w(() => o.empty ? o.empty() : m("emptyContent") ? r.emptyContent : p.value.locale.Cascader?.emptyText ?? (p.value.locale.code === "en-US" ? "No Data" : "暂无数据")), ot = w(() => typeof at.value == "boolean" ? null : at.value), st = w(() => r.getPopupContainer ?? p.value.getPopupContainer), ct = w(() => ({
|
|
1185
|
+
...st.value ? { getPopupContainer: st.value } : {},
|
|
1186
|
+
...r.dropdownMargin === void 0 ? {} : { margin: r.dropdownMargin },
|
|
1187
|
+
...r.mouseEnterDelay === void 0 ? {} : { mouseEnterDelay: r.mouseEnterDelay },
|
|
1188
|
+
...r.mouseLeaveDelay === void 0 ? {} : { mouseLeaveDelay: r.mouseLeaveDelay }
|
|
1189
|
+
})), lt = w(() => ({
|
|
1190
|
+
...nt.value === void 0 ? {} : { expandIcon: nt.value },
|
|
1191
|
+
...o.filter || r.filterRender ? { filterRender: bt } : {},
|
|
1192
|
+
...r.loadData ? { loadData: r.loadData } : {},
|
|
1193
|
+
...r.virtualizeInSearch ? { virtualize: r.virtualizeInSearch } : {}
|
|
1194
|
+
})), ut = w(() => ({
|
|
1195
|
+
...r.maxTagCount === void 0 ? {} : { maxTagCount: r.maxTagCount },
|
|
1196
|
+
...r.preventScroll === void 0 ? {} : { preventScroll: r.preventScroll }
|
|
1197
|
+
})), dt = w(() => [
|
|
1198
|
+
"semi-cascader",
|
|
1199
|
+
r.class,
|
|
1200
|
+
r.className,
|
|
1201
|
+
a.class,
|
|
1202
|
+
r.borderless ? "semi-cascader-borderless" : void 0,
|
|
1203
|
+
H.isFocus || H.isOpen && !H.isInput ? "semi-cascader-focus" : void 0,
|
|
1204
|
+
r.disabled ? "semi-cascader-disabled" : void 0,
|
|
1205
|
+
"semi-cascader-single",
|
|
1206
|
+
Ge.value ? "semi-cascader-filterable" : void 0,
|
|
1207
|
+
r.validateStatus === "error" ? "semi-cascader-error" : void 0,
|
|
1208
|
+
r.validateStatus === "warning" ? "semi-cascader-warning" : void 0,
|
|
1209
|
+
r.size === "small" ? "semi-cascader-small" : void 0,
|
|
1210
|
+
r.size === "large" ? "semi-cascader-large" : void 0,
|
|
1211
|
+
Ze.value || Z.value ? "semi-cascader-with-prefix" : void 0,
|
|
1212
|
+
Qe.value ? "semi-cascader-with-suffix" : void 0
|
|
1213
|
+
]), ft = w(() => r.showClear && (!!H.inputValue || Ye.value) && !r.disabled && (H.isOpen || H.isHovering)), pt = w(() => {
|
|
1214
|
+
let e = [...H.selectedKeys][0];
|
|
1215
|
+
if (!e) return;
|
|
1216
|
+
let t = Y.getItemPropPath(e, r.displayProp), n = t.flatMap((e, n) => n < t.length - 1 ? [e, r.separator] : [e]);
|
|
1217
|
+
return o.display?.({ selected: t }) ?? r.displayRender?.(t) ?? n;
|
|
1218
|
+
}), mt = w(() => pt.value ?? H.inputPlaceHolder);
|
|
1219
|
+
function ht(e, t) {
|
|
1220
|
+
return o.display?.({
|
|
1221
|
+
selected: e,
|
|
1222
|
+
index: t
|
|
1223
|
+
}) ?? r.displayRender?.(e, t) ?? e.data[r.displayProp];
|
|
1224
|
+
}
|
|
1225
|
+
function gt(e, t) {
|
|
1226
|
+
let n = H.keyEntities[e];
|
|
1227
|
+
if (!n) return;
|
|
1228
|
+
let i = r.disabled || !!n.data[Ce.value] || r.disableStrictly && H.disabledKeys.has(e);
|
|
1229
|
+
return j(ie, {
|
|
1230
|
+
key: `cascader-tag-${e}-${t}`,
|
|
1231
|
+
className: ["semi-cascader-selection-tag", i ? "semi-cascader-selection-tag-disabled" : void 0],
|
|
1232
|
+
closable: !0,
|
|
1233
|
+
color: "white",
|
|
1234
|
+
size: r.size === "default" ? "large" : r.size,
|
|
1235
|
+
tagKey: e,
|
|
1236
|
+
onClose: (t, n) => {
|
|
1237
|
+
n.preventDefault(), i || Y.handleTagRemoveByKey(e);
|
|
1238
|
+
}
|
|
1239
|
+
}, { default: () => ht(n, t) });
|
|
1240
|
+
}
|
|
1241
|
+
let _t = w(() => {
|
|
1242
|
+
let e = r.maxTagCount ?? Infinity;
|
|
1243
|
+
return X.value.slice(0, e).map(gt);
|
|
1244
|
+
}), Q = w(() => {
|
|
1245
|
+
let e = r.maxTagCount ?? Infinity;
|
|
1246
|
+
return X.value.slice(e).map((t, n) => gt(t, n + e));
|
|
1247
|
+
}), vt = w(() => {
|
|
1248
|
+
let e;
|
|
1249
|
+
e = r.multiple ? new Set(X.value.map((e) => H.keyEntities[e]?.pos).filter((e) => !!e)) : H.keyEntities[[...H.selectedKeys][0] ?? ""]?.pos;
|
|
1250
|
+
let t = {
|
|
1251
|
+
componentProps: r,
|
|
1252
|
+
disabled: r.disabled,
|
|
1253
|
+
inputValue: H.inputValue,
|
|
1254
|
+
placeholder: H.inputPlaceHolder,
|
|
1255
|
+
onSearch: $,
|
|
1256
|
+
onChange: $,
|
|
1257
|
+
onClear: (e) => wt(e),
|
|
1258
|
+
onRemove: (e) => Y.handleTagRemoveInTrigger(e)
|
|
1259
|
+
};
|
|
1260
|
+
return e !== void 0 && (t.value = e), t;
|
|
1261
|
+
}), yt = w(() => o.trigger?.(vt.value) ?? r.triggerRender?.(vt.value));
|
|
1262
|
+
function bt(e) {
|
|
1263
|
+
return o.filter?.(e) ?? r.filterRender?.(e);
|
|
1264
|
+
}
|
|
1265
|
+
function xt(e) {
|
|
1266
|
+
Y.handleClick(e);
|
|
1267
|
+
}
|
|
1268
|
+
function St(e) {
|
|
1269
|
+
Y.handleSelectionEnterPress(e);
|
|
1270
|
+
}
|
|
1271
|
+
function Ct(e) {
|
|
1272
|
+
Y.handleKeyDown(e);
|
|
1273
|
+
}
|
|
1274
|
+
function wt(e) {
|
|
1275
|
+
e?.stopPropagation?.(), Y.handleClear();
|
|
1276
|
+
}
|
|
1277
|
+
function Tt(e) {
|
|
1278
|
+
e.stopPropagation(), Y.handleClearEnterPress(e);
|
|
1279
|
+
}
|
|
1280
|
+
function Et(e) {
|
|
1281
|
+
e !== H.isOpen && (e ? Y.open() : Y.close());
|
|
1282
|
+
}
|
|
1283
|
+
function Dt(e, t) {
|
|
1284
|
+
Y.handleItemClick(e, t);
|
|
1285
|
+
}
|
|
1286
|
+
function Ot(e, t) {
|
|
1287
|
+
Y.handleItemHover(e, t);
|
|
1288
|
+
}
|
|
1289
|
+
function kt(e, t) {
|
|
1290
|
+
Y.handleListScroll(e, t);
|
|
1291
|
+
}
|
|
1292
|
+
function At(e) {
|
|
1293
|
+
Y.onItemCheckboxClick(e);
|
|
1294
|
+
}
|
|
1295
|
+
function $(e) {
|
|
1296
|
+
H.isOpen || Y.open(), Y.handleInputChange(e);
|
|
1297
|
+
}
|
|
1298
|
+
function jt() {
|
|
1299
|
+
Y.open();
|
|
1300
|
+
}
|
|
1301
|
+
function Mt() {
|
|
1302
|
+
Y.close();
|
|
1303
|
+
}
|
|
1304
|
+
function Nt() {
|
|
1305
|
+
c.value?.focus({ preventScroll: r.preventScroll }), Y.focus();
|
|
1306
|
+
}
|
|
1307
|
+
function Pt() {
|
|
1308
|
+
c.value?.blur(), Y.blur();
|
|
1309
|
+
}
|
|
1310
|
+
return t({
|
|
1311
|
+
open: jt,
|
|
1312
|
+
close: Mt,
|
|
1313
|
+
focus: Nt,
|
|
1314
|
+
blur: Pt,
|
|
1315
|
+
search: $
|
|
1316
|
+
}), R(() => [
|
|
1317
|
+
r.treeData,
|
|
1318
|
+
r.keyMaps,
|
|
1319
|
+
r.multiple,
|
|
1320
|
+
r.disableStrictly
|
|
1321
|
+
], () => {
|
|
1322
|
+
Pe(), Ae && (r.multiple ? Y.recalculateFilteredKeys() : Y.collectOptions());
|
|
1323
|
+
}, {
|
|
1324
|
+
deep: !0,
|
|
1325
|
+
immediate: !0
|
|
1326
|
+
}), R(S, (e) => {
|
|
1327
|
+
y.value && (r.multiple ? J(e) : Y.handleValueChange(e));
|
|
1328
|
+
}, { deep: !0 }), R(() => [
|
|
1329
|
+
r.checkRelation,
|
|
1330
|
+
r.leafOnly,
|
|
1331
|
+
A.value
|
|
1332
|
+
], () => {
|
|
1333
|
+
r.multiple && J(y.value ? S.value : r.defaultValue);
|
|
1334
|
+
}), R(() => r.loadedKeys, (e) => {
|
|
1335
|
+
m("loadedKeys") && (G.value = new Set(e ?? []), H.loadedKeys = new Set(e ?? []));
|
|
1336
|
+
}, { deep: !0 }), R(() => r.searchPlaceholder ?? r.placeholder, (e) => {
|
|
1337
|
+
Ye.value || (H.inputPlaceHolder = e ?? "");
|
|
1338
|
+
}), fe(() => {
|
|
1339
|
+
Ae = !0, Y.init();
|
|
1340
|
+
}), de(() => Y.destroy()), (t, n) => (P(), T(I(ee), M(ct.value, {
|
|
1341
|
+
"auto-adjust-overflow": ae.value,
|
|
1342
|
+
motion: Se.value,
|
|
1343
|
+
position: e.position ?? (p.value.direction === "rtl" ? "bottomRight" : "bottomLeft"),
|
|
1344
|
+
"re-pos-key": I(H).rePosKey,
|
|
1345
|
+
"stop-propagation": B.value,
|
|
1346
|
+
trigger: "custom",
|
|
1347
|
+
visible: I(H).isOpen,
|
|
1348
|
+
"z-index": e.zIndex,
|
|
1349
|
+
onAfterClose: n[2] ||= (e) => I(Y).updateSearching(!1),
|
|
1350
|
+
onVisibleChange: Et
|
|
1351
|
+
}), {
|
|
1352
|
+
content: ve(() => [O("div", {
|
|
1353
|
+
ref: "popup",
|
|
1354
|
+
role: "listbox",
|
|
1355
|
+
class: N(["semi-cascader-popover", e.dropdownClassName]),
|
|
1356
|
+
style: ue(Je.value),
|
|
1357
|
+
onKeydown: Ct
|
|
1358
|
+
}, [
|
|
1359
|
+
rt.value == null ? E("", !0) : (P(), T(I(K), {
|
|
1360
|
+
key: 0,
|
|
1361
|
+
content: rt.value
|
|
1362
|
+
}, null, 8, ["content"])),
|
|
1363
|
+
k(Le, M(lt.value, {
|
|
1364
|
+
"active-keys": I(H).activeKeys,
|
|
1365
|
+
"checked-keys": I(H).checkedKeys,
|
|
1366
|
+
data: qe.value,
|
|
1367
|
+
direction: p.value.direction,
|
|
1368
|
+
"empty-content": ot.value,
|
|
1369
|
+
"half-checked-keys": I(H).halfCheckedKeys,
|
|
1370
|
+
keyword: I(H).inputValue,
|
|
1371
|
+
"loaded-keys": I(H).loadedKeys,
|
|
1372
|
+
"loading-keys": I(H).loadingKeys,
|
|
1373
|
+
multiple: e.multiple,
|
|
1374
|
+
searchable: Ge.value && I(H).isSearching,
|
|
1375
|
+
"selected-keys": I(H).selectedKeys,
|
|
1376
|
+
separator: e.separator,
|
|
1377
|
+
"show-next": e.showNext,
|
|
1378
|
+
onCheck: At,
|
|
1379
|
+
onItemClick: Dt,
|
|
1380
|
+
onItemHover: Ot,
|
|
1381
|
+
onListScroll: kt
|
|
1382
|
+
}), null, 16, [
|
|
1383
|
+
"active-keys",
|
|
1384
|
+
"checked-keys",
|
|
1385
|
+
"data",
|
|
1386
|
+
"direction",
|
|
1387
|
+
"empty-content",
|
|
1388
|
+
"half-checked-keys",
|
|
1389
|
+
"keyword",
|
|
1390
|
+
"loaded-keys",
|
|
1391
|
+
"loading-keys",
|
|
1392
|
+
"multiple",
|
|
1393
|
+
"searchable",
|
|
1394
|
+
"selected-keys",
|
|
1395
|
+
"separator",
|
|
1396
|
+
"show-next"
|
|
1397
|
+
]),
|
|
1398
|
+
it.value == null ? E("", !0) : (P(), T(I(K), {
|
|
1399
|
+
key: 1,
|
|
1400
|
+
content: it.value
|
|
1401
|
+
}, null, 8, ["content"]))
|
|
1402
|
+
], 38)]),
|
|
1403
|
+
default: ve(() => [yt.value == null ? (P(), D("div", M({
|
|
1404
|
+
key: 1,
|
|
1405
|
+
id: e.id,
|
|
1406
|
+
ref: "trigger"
|
|
1407
|
+
}, Xe.value, {
|
|
1408
|
+
role: "combobox",
|
|
1409
|
+
"aria-describedby": e.ariaDescribedby ?? I(a)["aria-describedby"],
|
|
1410
|
+
"aria-disabled": e.disabled,
|
|
1411
|
+
"aria-errormessage": e.ariaErrormessage ?? I(a)["aria-errormessage"],
|
|
1412
|
+
"aria-invalid": e.ariaInvalid ?? I(a)["aria-invalid"],
|
|
1413
|
+
"aria-label": e.ariaLabel ?? I(a)["aria-label"] ?? "Cascader",
|
|
1414
|
+
"aria-labelledby": e.ariaLabelledby ?? I(a)["aria-labelledby"],
|
|
1415
|
+
"aria-required": e.ariaRequired ?? I(a)["aria-required"],
|
|
1416
|
+
class: dt.value,
|
|
1417
|
+
style: [e.style, I(a).style],
|
|
1418
|
+
tabindex: e.disabled ? void 0 : 0,
|
|
1419
|
+
onClick: xt,
|
|
1420
|
+
onKeydown: Ct,
|
|
1421
|
+
onKeypress: St,
|
|
1422
|
+
onMouseenter: n[0] ||= (t) => e.showClear ? I(Y).toggleHoverState(!0) : void 0,
|
|
1423
|
+
onMouseleave: n[1] ||= (t) => e.showClear ? I(Y).toggleHoverState(!1) : void 0
|
|
1424
|
+
}), [
|
|
1425
|
+
Ze.value != null || Z.value != null ? (P(), D("div", {
|
|
1426
|
+
key: 0,
|
|
1427
|
+
id: e.insetLabelId,
|
|
1428
|
+
class: N([
|
|
1429
|
+
"semi-cascader-prefix",
|
|
1430
|
+
Z.value == null ? void 0 : "semi-cascader-inset-label",
|
|
1431
|
+
typeof (Ze.value ?? Z.value) == "string" ? "semi-cascader-prefix-text" : void 0
|
|
1432
|
+
]),
|
|
1433
|
+
"x-semi-prop": "prefix,insetLabel"
|
|
1434
|
+
}, [k(I(K), { content: Ze.value ?? Z.value }, null, 8, ["content"])], 10, ze)) : E("", !0),
|
|
1435
|
+
O("div", { class: N(["semi-cascader-selection", e.multiple && Ye.value ? "semi-cascader-selection-multiple" : void 0]) }, [Ke.value ? (P(), D(C, { key: 0 }, [e.multiple ? (P(), T(I(ne), M({
|
|
1436
|
+
key: 0,
|
|
1437
|
+
ref: "tagInput"
|
|
1438
|
+
}, ut.value, {
|
|
1439
|
+
"class-name": "semi-cascader-tagInput-wrapper",
|
|
1440
|
+
disabled: e.disabled,
|
|
1441
|
+
"expand-rest-tags-on-click": !1,
|
|
1442
|
+
"input-value": I(H).inputValue,
|
|
1443
|
+
"model-value": X.value,
|
|
1444
|
+
placeholder: I(H).inputPlaceHolder,
|
|
1445
|
+
"render-tag-item": gt,
|
|
1446
|
+
"rest-tags-popover-props": e.restTagsPopoverProps,
|
|
1447
|
+
"show-rest-tags-popover": e.showRestTagsPopover,
|
|
1448
|
+
size: e.size,
|
|
1449
|
+
onInputChange: $,
|
|
1450
|
+
onRemove: I(Y).handleTagRemoveByKey
|
|
1451
|
+
}), null, 16, [
|
|
1452
|
+
"disabled",
|
|
1453
|
+
"input-value",
|
|
1454
|
+
"model-value",
|
|
1455
|
+
"placeholder",
|
|
1456
|
+
"rest-tags-popover-props",
|
|
1457
|
+
"show-rest-tags-popover",
|
|
1458
|
+
"size",
|
|
1459
|
+
"onRemove"
|
|
1460
|
+
])) : (P(), D("div", {
|
|
1461
|
+
key: 1,
|
|
1462
|
+
class: N(["semi-cascader-search-wrapper", e.size === "default" ? void 0 : `semi-cascader-search-wrapper-${e.size}`])
|
|
1463
|
+
}, [O("span", { class: N([
|
|
1464
|
+
pt.value ? void 0 : "semi-cascader-selection-placeholder",
|
|
1465
|
+
I(H).showInput && I(H).inputValue ? "semi-cascader-selection-text-hide" : void 0,
|
|
1466
|
+
I(H).showInput && !I(H).inputValue ? "semi-cascader-selection-text-inactive" : void 0
|
|
1467
|
+
]) }, [k(I(K), { content: mt.value }, null, 8, ["content"])], 2), I(H).showInput ? (P(), T(I(te), {
|
|
1468
|
+
key: 0,
|
|
1469
|
+
ref: "input",
|
|
1470
|
+
"class-name": "semi-cascader-input",
|
|
1471
|
+
disabled: e.disabled,
|
|
1472
|
+
"model-value": I(H).inputValue,
|
|
1473
|
+
"prevent-scroll": e.preventScroll,
|
|
1474
|
+
size: e.size,
|
|
1475
|
+
onChange: $
|
|
1476
|
+
}, null, 8, [
|
|
1477
|
+
"disabled",
|
|
1478
|
+
"model-value",
|
|
1479
|
+
"prevent-scroll",
|
|
1480
|
+
"size"
|
|
1481
|
+
])) : E("", !0)], 2))], 64)) : e.multiple ? Ye.value ? (P(), D(C, { key: 2 }, [(P(!0), D(C, null, F(_t.value, (e, t) => (P(), T(I(K), {
|
|
1482
|
+
key: t,
|
|
1483
|
+
content: e
|
|
1484
|
+
}, null, 8, ["content"]))), 128)), Q.value.length && e.showRestTagsPopover ? (P(), T(I(ee), M({
|
|
1485
|
+
key: 0,
|
|
1486
|
+
"auto-adjust-overflow": !0,
|
|
1487
|
+
content: Q.value,
|
|
1488
|
+
position: "top",
|
|
1489
|
+
"show-arrow": !0,
|
|
1490
|
+
trigger: "hover"
|
|
1491
|
+
}, e.restTagsPopoverProps), {
|
|
1492
|
+
default: ve(() => [O("span", Be, "+" + he(Q.value.length), 1)]),
|
|
1493
|
+
_: 1
|
|
1494
|
+
}, 16, ["content"])) : Q.value.length ? (P(), D("span", Ve, " +" + he(Q.value.length), 1)) : E("", !0)], 64)) : (P(), D("span", He, he(e.placeholder), 1)) : (P(), D("span", {
|
|
1495
|
+
key: 1,
|
|
1496
|
+
class: N(pt.value ? void 0 : "semi-cascader-selection-placeholder")
|
|
1497
|
+
}, [k(I(K), { content: pt.value ?? e.placeholder }, null, 8, ["content"])], 2))], 2),
|
|
1498
|
+
Qe.value == null ? E("", !0) : (P(), D("div", Ue, [k(I(K), { content: Qe.value }, null, 8, ["content"])])),
|
|
1499
|
+
ft.value ? (P(), D("div", {
|
|
1500
|
+
key: 2,
|
|
1501
|
+
role: "button",
|
|
1502
|
+
tabindex: "0",
|
|
1503
|
+
"aria-label": "Clear Cascader value",
|
|
1504
|
+
class: "semi-cascader-clearbtn",
|
|
1505
|
+
onClick: wt,
|
|
1506
|
+
onKeypress: Tt
|
|
1507
|
+
}, [k(I(K), { content: et.value }, null, 8, ["content"])], 32)) : $e.value == null ? E("", !0) : (P(), D("div", We, [k(I(K), { content: $e.value }, null, 8, ["content"])]))
|
|
1508
|
+
], 16, Re)) : (P(), T(I(K), {
|
|
1509
|
+
key: 0,
|
|
1510
|
+
content: yt.value
|
|
1511
|
+
}, null, 8, ["content"]))]),
|
|
1512
|
+
_: 1
|
|
1513
|
+
}, 16, [
|
|
1514
|
+
"auto-adjust-overflow",
|
|
1515
|
+
"motion",
|
|
1516
|
+
"position",
|
|
1517
|
+
"re-pos-key",
|
|
1518
|
+
"stop-propagation",
|
|
1519
|
+
"visible",
|
|
1520
|
+
"z-index"
|
|
1521
|
+
]));
|
|
1522
|
+
}
|
|
1523
|
+
});
|
|
1524
|
+
//#endregion
|
|
1525
|
+
export { Y as t };
|