@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,2097 @@
|
|
|
1
|
+
import "./src-DNBBthjO.js";
|
|
2
|
+
import { t as e } from "./env-BeIzjQx7.js";
|
|
3
|
+
import { t } from "./Tooltip-Bq7HZwnS.js";
|
|
4
|
+
import { i as n, r, t as i } from "./dropdown-D0-UWd65.js";
|
|
5
|
+
import { t as a } from "./checkbox-mJD1ou6k.js";
|
|
6
|
+
import { t as o } from "./Pagination-4JvS-gHR.js";
|
|
7
|
+
import { t as s } from "./radio-y9iAI359.js";
|
|
8
|
+
import { t as c } from "./config-context-CyynTtDb.js";
|
|
9
|
+
import { n as l, o as u } from "./config-provider-VMfNNSF1.js";
|
|
10
|
+
import { t as d } from "./Button-RCaDTqHh.js";
|
|
11
|
+
import { Comment as f, Fragment as p, Text as m, computed as h, createBlock as g, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createTextVNode as ee, createVNode as b, defineComponent as x, getCurrentInstance as S, h as C, inject as te, mergeProps as w, nextTick as ne, normalizeClass as T, normalizeStyle as E, onBeforeUnmount as re, onMounted as D, openBlock as O, renderList as ie, renderSlot as k, resolveComponent as A, resolveDynamicComponent as j, shallowRef as M, toDisplayString as ae, unref as N, useAttrs as P, useId as oe, useSlots as se, useTemplateRef as ce, watch as le, withCtx as F } from "vue";
|
|
12
|
+
import { IconCaretdown as I, IconCaretup as ue, IconChevronRight as de, IconFilter as L } from "@aifuxi/semi-icons-vue";
|
|
13
|
+
//#region bundled-foundation
|
|
14
|
+
var fe = {
|
|
15
|
+
PREFIX: `${e}-table`,
|
|
16
|
+
TABLE: `${e}-table`,
|
|
17
|
+
WRAP: `${e}-table-wrapper`,
|
|
18
|
+
THEAD: `${e}-table-thead`,
|
|
19
|
+
TR: `${e}-table-row`,
|
|
20
|
+
TH: `${e}-table-row-head`,
|
|
21
|
+
TD: `${e}-table-row-cell`
|
|
22
|
+
}, pe = {
|
|
23
|
+
SIZE_SMALL: "small",
|
|
24
|
+
SIZE_MIDDLE: "middle",
|
|
25
|
+
SIZES: [
|
|
26
|
+
"small",
|
|
27
|
+
"default",
|
|
28
|
+
"middle"
|
|
29
|
+
],
|
|
30
|
+
LAYOUTS: [
|
|
31
|
+
"",
|
|
32
|
+
"auto",
|
|
33
|
+
"fixed"
|
|
34
|
+
],
|
|
35
|
+
PAGINATION_POSITIONS: [
|
|
36
|
+
"bottom",
|
|
37
|
+
"top",
|
|
38
|
+
"both"
|
|
39
|
+
],
|
|
40
|
+
FOOTER_POSITIONS: [
|
|
41
|
+
!1,
|
|
42
|
+
!0,
|
|
43
|
+
"left",
|
|
44
|
+
"right"
|
|
45
|
+
],
|
|
46
|
+
SORT_DIRECTIONS: ["ascend", "descend"],
|
|
47
|
+
FIXED_SET: [
|
|
48
|
+
!1,
|
|
49
|
+
!0,
|
|
50
|
+
"left",
|
|
51
|
+
"right"
|
|
52
|
+
],
|
|
53
|
+
ALIGNS: [
|
|
54
|
+
"left",
|
|
55
|
+
"right",
|
|
56
|
+
"center"
|
|
57
|
+
],
|
|
58
|
+
JUSTIFY_CONTENT: [
|
|
59
|
+
"flex-start",
|
|
60
|
+
"flex-end",
|
|
61
|
+
"center"
|
|
62
|
+
],
|
|
63
|
+
SCROLL_HORIZONTAL_POSITIONS: [
|
|
64
|
+
"left",
|
|
65
|
+
"middle",
|
|
66
|
+
"right"
|
|
67
|
+
],
|
|
68
|
+
DEFAULT_KEY_COLUMN_SELECTION: "column-selection",
|
|
69
|
+
DEFAULT_KEY_COLUMN_EXPAND: "column-expand",
|
|
70
|
+
DEFAULT_KEY_COLUMN_TITLE: "column-title",
|
|
71
|
+
DEFAULT_KEY_COLUMN_SORTER: "column-sorter",
|
|
72
|
+
DEFAULT_KEY_COLUMN_FILTER: "column-filter",
|
|
73
|
+
DEFAULT_KEY_COLUMN_SCROLLBAR: "column-scrollbar",
|
|
74
|
+
DEFAULT_COMPONENTS: {
|
|
75
|
+
table: "table",
|
|
76
|
+
header: {
|
|
77
|
+
outer: "table",
|
|
78
|
+
wrapper: "thead",
|
|
79
|
+
row: "tr",
|
|
80
|
+
cell: "th"
|
|
81
|
+
},
|
|
82
|
+
body: {
|
|
83
|
+
outer: "table",
|
|
84
|
+
wrapper: "tbody",
|
|
85
|
+
row: "tr",
|
|
86
|
+
cell: "td"
|
|
87
|
+
},
|
|
88
|
+
footer: {
|
|
89
|
+
wrapper: "tfoot",
|
|
90
|
+
row: "tr",
|
|
91
|
+
cell: "td"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
EXPAND_RELATED_PROPS: [
|
|
95
|
+
"expandedRowRender",
|
|
96
|
+
"dataSource",
|
|
97
|
+
"hideExpandedColumn",
|
|
98
|
+
"childrenRecordName",
|
|
99
|
+
"rowExpandable"
|
|
100
|
+
]
|
|
101
|
+
}, me = 1, he = 16, R = 16, z = 12, B = 12, ge = 8, V = 8, _e = 20, ve = 53, ye = 33, be = 45, H = 25, U = 37, W = {
|
|
102
|
+
DEFAULT_PAGE_SIZE: 10,
|
|
103
|
+
DEFAULT_WIDTH_COLUMN_EXPAND: 60,
|
|
104
|
+
DEFAULT_WIDTH_COLUMN_SELECTION: 60,
|
|
105
|
+
DEFAULT_INDENT_WIDTH: 20,
|
|
106
|
+
DEFAULT_CELL_PADDING_LEFT: 16,
|
|
107
|
+
DEFAULT_CELL_PADDING_RIGHT: 16,
|
|
108
|
+
DEFAULT_CELL_PADDING_TOP: he,
|
|
109
|
+
DEFAULT_CELL_PADDING_BOTTOM: R,
|
|
110
|
+
DEFAULT_CELL_MIDDLE_PADDING_TOP: z,
|
|
111
|
+
DEFAULT_CELL_MIDDLE_PADDING_BOTTOM: B,
|
|
112
|
+
DEFAULT_CELL_SMALL_PADDING_TOP: ge,
|
|
113
|
+
DEFAULT_CELL_SMALL_PADDING_BOTTOM: V,
|
|
114
|
+
DEFAULT_CELL_BORDER_WIDTH_LEFT: 1,
|
|
115
|
+
DEFAULT_CELL_BORDER_WIDTH_RIGHT: 1,
|
|
116
|
+
DEFAULT_CELL_BORDER_WITH_BOTTOM: me,
|
|
117
|
+
DEFAULT_CELL_LINE_HEIGHT: _e,
|
|
118
|
+
DEFAULT_VIRTUALIZED_BODY_HEIGHT: 600,
|
|
119
|
+
DEFAULT_VIRTUALIZED_SECTION_ROW_HEIGHT: ve,
|
|
120
|
+
DEFAULT_VIRTUALIZED_ROW_HEIGHT: ve,
|
|
121
|
+
DEFAULT_VIRTUALIZED_ROW_MIN_HEIGHT: ye,
|
|
122
|
+
DEFAULT_VIRTUALIZED_SECTION_ROW_MIDDLE_HEIGHT: be,
|
|
123
|
+
DEFAULT_VIRTUALIZED_ROW_MIDDLE_HEIGHT: be,
|
|
124
|
+
DEFAULT_VIRTUALIZED_ROW_MIDDLE_MIN_HEIGHT: H,
|
|
125
|
+
DEFAULT_VIRTUALIZED_SECTION_ROW_SMALL_HEIGHT: U,
|
|
126
|
+
DEFAULT_VIRTUALIZED_ROW_SMALL_HEIGHT: U,
|
|
127
|
+
DEFAULT_VIRTUALIZED_ROW_SMALL_MIN_HEIGHT: 17
|
|
128
|
+
}, G = {
|
|
129
|
+
name: "TableNodeRenderer",
|
|
130
|
+
props: { content: null },
|
|
131
|
+
setup(e) {
|
|
132
|
+
return () => C(p, null, e.content == null ? [] : [e.content]);
|
|
133
|
+
}
|
|
134
|
+
}, xe = Symbol("workspace-table-column"), K = x({
|
|
135
|
+
name: "TableColumn",
|
|
136
|
+
inheritAttrs: !1,
|
|
137
|
+
props: {
|
|
138
|
+
align: String,
|
|
139
|
+
className: String,
|
|
140
|
+
colSpan: Number,
|
|
141
|
+
dataIndex: String,
|
|
142
|
+
defaultFilteredValue: Array,
|
|
143
|
+
defaultSortOrder: [String, Boolean],
|
|
144
|
+
ellipsis: [Boolean, Object],
|
|
145
|
+
filterChildrenRecord: Boolean,
|
|
146
|
+
filterConfirmMode: String,
|
|
147
|
+
filterDropdown: null,
|
|
148
|
+
filterDropdownProps: Object,
|
|
149
|
+
filterDropdownVisible: Boolean,
|
|
150
|
+
filterIcon: null,
|
|
151
|
+
filterMultiple: Boolean,
|
|
152
|
+
filteredValue: Array,
|
|
153
|
+
filters: Array,
|
|
154
|
+
fixed: [Boolean, String],
|
|
155
|
+
onCell: Function,
|
|
156
|
+
onFilter: Function,
|
|
157
|
+
onFilterDropdownVisibleChange: Function,
|
|
158
|
+
onHeaderCell: Function,
|
|
159
|
+
render: Function,
|
|
160
|
+
renderFilterDropdown: Function,
|
|
161
|
+
renderFilterDropdownItem: Function,
|
|
162
|
+
resize: Boolean,
|
|
163
|
+
showSortTip: Boolean,
|
|
164
|
+
sortChildrenRecord: Boolean,
|
|
165
|
+
sorter: [Boolean, Function],
|
|
166
|
+
sortIcon: Function,
|
|
167
|
+
sortOrder: [String, Boolean],
|
|
168
|
+
title: null,
|
|
169
|
+
useFullRender: Boolean,
|
|
170
|
+
width: [String, Number]
|
|
171
|
+
},
|
|
172
|
+
setup() {
|
|
173
|
+
return () => null;
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
Object.defineProperty(K, xe, { value: !0 });
|
|
177
|
+
//#endregion
|
|
178
|
+
//#region src/table/table-utils.ts
|
|
179
|
+
function Se(e) {
|
|
180
|
+
return typeof e == "number" ? `${e}px` : e;
|
|
181
|
+
}
|
|
182
|
+
function Ce(e, t) {
|
|
183
|
+
return t ? t.split(".").reduce((e, t) => {
|
|
184
|
+
if (!(typeof e != "object" || !e)) return e[t];
|
|
185
|
+
}, e) : e;
|
|
186
|
+
}
|
|
187
|
+
function we(e, t = "key", n = 0) {
|
|
188
|
+
let r = typeof t == "function" ? t(e) : Ce(e, String(t));
|
|
189
|
+
return typeof r == "string" || typeof r == "number" ? r : n;
|
|
190
|
+
}
|
|
191
|
+
function Te(e, t) {
|
|
192
|
+
let n = { ...e.props ?? {} };
|
|
193
|
+
delete n.key;
|
|
194
|
+
let r = typeof e.children == "object" && e.children ? e.children : {}, i = De(r.default?.()), a = e.key ?? n.dataIndex, o = r.title?.() ?? n.title;
|
|
195
|
+
return Oe({
|
|
196
|
+
...n,
|
|
197
|
+
...a === void 0 ? {} : { key: a },
|
|
198
|
+
...o === void 0 ? {} : { title: o },
|
|
199
|
+
...i.length ? { children: i } : {}
|
|
200
|
+
}, t);
|
|
201
|
+
}
|
|
202
|
+
function Ee(e, t) {
|
|
203
|
+
if (Array.isArray(e)) {
|
|
204
|
+
e.forEach((e) => Ee(e, t));
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
if (!e || typeof e != "object" || !("__v_isVNode" in e)) return;
|
|
208
|
+
let n = e;
|
|
209
|
+
if (n.type === p) {
|
|
210
|
+
Ee(n.children, t);
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
if (n.type === m || n.type === f) return;
|
|
214
|
+
let r = n.type;
|
|
215
|
+
(n.type === K || r?.[xe] === !0 || r?.name === "TableColumn") && t.push(Te(n, t.length));
|
|
216
|
+
}
|
|
217
|
+
function De(e) {
|
|
218
|
+
let t = [];
|
|
219
|
+
return Ee(e, t), t;
|
|
220
|
+
}
|
|
221
|
+
function Oe(e, t, n = 0) {
|
|
222
|
+
let { children: r, ...i } = e, a = Array.isArray(r) ? r.map((e, t) => Oe(e, t, n + 1)) : void 0;
|
|
223
|
+
return {
|
|
224
|
+
...i,
|
|
225
|
+
key: e.key ?? e.dataIndex ?? `${n}-${t}`,
|
|
226
|
+
...a?.length ? { children: a } : {}
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
function ke(e) {
|
|
230
|
+
return Array.isArray(e) ? e.map((e, t) => Oe(e, t)) : [];
|
|
231
|
+
}
|
|
232
|
+
function q(e) {
|
|
233
|
+
return e.flatMap((e) => e.children?.length ? q(e.children) : [e]);
|
|
234
|
+
}
|
|
235
|
+
function Ae(e) {
|
|
236
|
+
return e.children?.length ? 1 + Math.max(...e.children.map((e) => Ae(e))) : 1;
|
|
237
|
+
}
|
|
238
|
+
function je(e) {
|
|
239
|
+
let t = e.length ? Math.max(...e.map((e) => Ae(e))) : 1, n = Array.from({ length: t }, () => []), r = (e, i) => {
|
|
240
|
+
let a = e.children?.length ? e.children.reduce((e, t) => e + r(t, i + 1), 0) : 1;
|
|
241
|
+
return n[i].push({
|
|
242
|
+
column: e,
|
|
243
|
+
colSpan: e.colSpan ?? a,
|
|
244
|
+
rowSpan: e.children?.length ? 1 : t - i
|
|
245
|
+
}), a;
|
|
246
|
+
};
|
|
247
|
+
return e.forEach((e) => r(e, 0)), n;
|
|
248
|
+
}
|
|
249
|
+
function Me(e, t, n = 0, r, i = { value: 0 }) {
|
|
250
|
+
let a = [];
|
|
251
|
+
return e.forEach((e) => {
|
|
252
|
+
let o = i.value++, s = we(e, t.rowKey, o);
|
|
253
|
+
a.push({
|
|
254
|
+
record: e,
|
|
255
|
+
key: s,
|
|
256
|
+
level: n,
|
|
257
|
+
parentKey: r,
|
|
258
|
+
index: o
|
|
259
|
+
});
|
|
260
|
+
let c = e[t.childrenRecordName];
|
|
261
|
+
t.expandedKeys.has(s) && Array.isArray(c) && a.push(...Me(c, t, n + 1, s, i));
|
|
262
|
+
}), a;
|
|
263
|
+
}
|
|
264
|
+
function Ne(e) {
|
|
265
|
+
let t = /* @__PURE__ */ new Map(), n = 0, r = e.filter((e) => e.fixed === !0 || e.fixed === "left");
|
|
266
|
+
r.forEach((e, i) => {
|
|
267
|
+
t.set(e.key, {
|
|
268
|
+
side: "left",
|
|
269
|
+
value: n,
|
|
270
|
+
edge: i === r.length - 1
|
|
271
|
+
}), n += typeof e.__width == "number" ? e.__width : typeof e.width == "number" ? e.width : 0;
|
|
272
|
+
});
|
|
273
|
+
let i = 0, a = e.filter((e) => e.fixed === "right").reverse();
|
|
274
|
+
return a.forEach((e, n) => {
|
|
275
|
+
t.set(e.key, {
|
|
276
|
+
side: "right",
|
|
277
|
+
value: i,
|
|
278
|
+
edge: n === a.length - 1
|
|
279
|
+
}), i += typeof e.__width == "number" ? e.__width : typeof e.width == "number" ? e.width : 0;
|
|
280
|
+
}), t;
|
|
281
|
+
}
|
|
282
|
+
//#endregion
|
|
283
|
+
//#region src/table/TableCell.vue
|
|
284
|
+
var Pe = /* @__PURE__ */ x({
|
|
285
|
+
__name: "TableCell",
|
|
286
|
+
props: {
|
|
287
|
+
column: {},
|
|
288
|
+
component: { default: "td" },
|
|
289
|
+
direction: {},
|
|
290
|
+
expanded: { type: Boolean },
|
|
291
|
+
expandNode: { type: [
|
|
292
|
+
Object,
|
|
293
|
+
String,
|
|
294
|
+
Number,
|
|
295
|
+
Boolean,
|
|
296
|
+
null,
|
|
297
|
+
Array
|
|
298
|
+
] },
|
|
299
|
+
fixedEdge: {
|
|
300
|
+
type: Boolean,
|
|
301
|
+
default: !1
|
|
302
|
+
},
|
|
303
|
+
fixedOffset: { default: 0 },
|
|
304
|
+
fixedSide: {},
|
|
305
|
+
hovered: {
|
|
306
|
+
type: Boolean,
|
|
307
|
+
default: !1
|
|
308
|
+
},
|
|
309
|
+
indent: { default: 0 },
|
|
310
|
+
indentSize: { default: 20 },
|
|
311
|
+
prefixCls: {},
|
|
312
|
+
record: {},
|
|
313
|
+
rowIndex: {},
|
|
314
|
+
selected: { type: Boolean },
|
|
315
|
+
selectionNode: { type: [
|
|
316
|
+
Object,
|
|
317
|
+
String,
|
|
318
|
+
Number,
|
|
319
|
+
Boolean,
|
|
320
|
+
null,
|
|
321
|
+
Array
|
|
322
|
+
] },
|
|
323
|
+
renderCell: {}
|
|
324
|
+
},
|
|
325
|
+
setup(e) {
|
|
326
|
+
let t = e, n = M(t.record);
|
|
327
|
+
le(() => t.record, (e, r) => {
|
|
328
|
+
(!t.column.shouldCellUpdate || t.column.shouldCellUpdate(e, r)) && (n.value = e);
|
|
329
|
+
}, { flush: "sync" });
|
|
330
|
+
let r = h(() => Ce(n.value, t.column.dataIndex)), i = h(() => t.column.onCell?.(n.value, t.rowIndex) ?? {}), a = h(() => t.indent > 0 ? C("span", {
|
|
331
|
+
class: [`${t.prefixCls}-row-indent`, `indent-level-${t.indent}`],
|
|
332
|
+
style: { paddingLeft: `${t.indentSize * t.indent}px` }
|
|
333
|
+
}) : void 0), o = h(() => {
|
|
334
|
+
let e = {
|
|
335
|
+
expandIcon: t.expandNode,
|
|
336
|
+
indentText: t.column.useFullRender ? a.value : void 0,
|
|
337
|
+
isHovering: t.hovered,
|
|
338
|
+
selection: t.column.useFullRender ? t.selectionNode : void 0
|
|
339
|
+
}, i = t.column.render ? t.column.render(r.value, n.value, t.rowIndex, e) : t.renderCell?.({
|
|
340
|
+
column: t.column,
|
|
341
|
+
record: n.value,
|
|
342
|
+
rowIndex: t.rowIndex,
|
|
343
|
+
text: r.value
|
|
344
|
+
}) ?? r.value;
|
|
345
|
+
return i && typeof i == "object" && !("__v_isVNode" in i) && "children" in i && "props" in i ? i : {
|
|
346
|
+
children: i,
|
|
347
|
+
props: {}
|
|
348
|
+
};
|
|
349
|
+
}), s = h(() => ({
|
|
350
|
+
...i.value,
|
|
351
|
+
...o.value.props,
|
|
352
|
+
style: [i.value.style, o.value.props.style],
|
|
353
|
+
class: [
|
|
354
|
+
i.value.class,
|
|
355
|
+
i.value.className,
|
|
356
|
+
o.value.props.class,
|
|
357
|
+
o.value.props.className
|
|
358
|
+
]
|
|
359
|
+
})), c = h(() => s.value.colSpan === 0 || s.value.rowSpan === 0), l = h(() => Object.fromEntries(Object.entries(s.value).filter(([e]) => ![
|
|
360
|
+
"class",
|
|
361
|
+
"className",
|
|
362
|
+
"style",
|
|
363
|
+
"onClick",
|
|
364
|
+
"colSpan",
|
|
365
|
+
"rowSpan"
|
|
366
|
+
].includes(e)))), u = h(() => {
|
|
367
|
+
if (t.column.align) {
|
|
368
|
+
if (t.direction === "rtl") {
|
|
369
|
+
if (t.column.align === "left") return "right";
|
|
370
|
+
if (t.column.align === "right") return "left";
|
|
371
|
+
}
|
|
372
|
+
return t.column.align;
|
|
373
|
+
}
|
|
374
|
+
}), d = h(() => [{
|
|
375
|
+
[(t.direction === "rtl" ? t.fixedSide === "left" ? "right" : "left" : t.fixedSide) ?? "left"]: t.fixedSide ? `${t.fixedOffset}px` : void 0,
|
|
376
|
+
textAlign: u.value
|
|
377
|
+
}, s.value.style]), f = h(() => [
|
|
378
|
+
`${t.prefixCls}-row-cell`,
|
|
379
|
+
t.column.className,
|
|
380
|
+
s.value.class,
|
|
381
|
+
t.column.ellipsis ? `${t.prefixCls}-row-cell-ellipsis` : void 0,
|
|
382
|
+
t.fixedSide ? `${t.prefixCls}-cell-fixed-${t.fixedSide}` : void 0,
|
|
383
|
+
t.fixedSide === "left" && t.fixedEdge ? `${t.prefixCls}-cell-fixed-left-last` : void 0,
|
|
384
|
+
t.fixedSide === "right" && t.fixedEdge ? `${t.prefixCls}-cell-fixed-right-first` : void 0
|
|
385
|
+
]), p = h(() => (t.column.ellipsis === !0 || typeof t.column.ellipsis == "object" && t.column.ellipsis.showTitle !== !1) && ["string", "number"].includes(typeof r.value) ? String(r.value) : void 0);
|
|
386
|
+
function m(e) {
|
|
387
|
+
s.value.onClick?.(e);
|
|
388
|
+
}
|
|
389
|
+
return (e, n) => c.value ? _("", !0) : (O(), g(j(t.component), w({ key: 0 }, l.value, {
|
|
390
|
+
class: f.value,
|
|
391
|
+
style: d.value,
|
|
392
|
+
colspan: s.value.colSpan,
|
|
393
|
+
rowspan: s.value.rowSpan,
|
|
394
|
+
title: p.value,
|
|
395
|
+
role: "gridcell",
|
|
396
|
+
onClick: m
|
|
397
|
+
}), {
|
|
398
|
+
default: F(() => [
|
|
399
|
+
!t.column.useFullRender && a.value ? (O(), g(N(G), {
|
|
400
|
+
key: 0,
|
|
401
|
+
content: a.value
|
|
402
|
+
}, null, 8, ["content"])) : _("", !0),
|
|
403
|
+
!t.column.useFullRender && t.expandNode ? (O(), g(N(G), {
|
|
404
|
+
key: 1,
|
|
405
|
+
content: t.expandNode
|
|
406
|
+
}, null, 8, ["content"])) : _("", !0),
|
|
407
|
+
b(N(G), { content: o.value.children }, null, 8, ["content"])
|
|
408
|
+
]),
|
|
409
|
+
_: 1
|
|
410
|
+
}, 16, [
|
|
411
|
+
"class",
|
|
412
|
+
"style",
|
|
413
|
+
"colspan",
|
|
414
|
+
"rowspan",
|
|
415
|
+
"title"
|
|
416
|
+
]));
|
|
417
|
+
}
|
|
418
|
+
}), Fe = /* @__PURE__ */ x({
|
|
419
|
+
__name: "TableBody",
|
|
420
|
+
props: {
|
|
421
|
+
clickGroupedRowToExpand: { type: Boolean },
|
|
422
|
+
columns: {},
|
|
423
|
+
componentCell: { default: "td" },
|
|
424
|
+
componentRow: { default: "tr" },
|
|
425
|
+
componentWrapper: { default: "tbody" },
|
|
426
|
+
direction: {},
|
|
427
|
+
expandedKeys: {},
|
|
428
|
+
expandIcon: { type: [
|
|
429
|
+
Boolean,
|
|
430
|
+
Object,
|
|
431
|
+
String,
|
|
432
|
+
Number,
|
|
433
|
+
null,
|
|
434
|
+
Array,
|
|
435
|
+
Function
|
|
436
|
+
] },
|
|
437
|
+
expandedRowRender: {},
|
|
438
|
+
expandRowByClick: { type: Boolean },
|
|
439
|
+
fixedOffsets: {},
|
|
440
|
+
halfSelectedKeys: {},
|
|
441
|
+
hideExpandedColumn: { type: Boolean },
|
|
442
|
+
indentSize: { default: 20 },
|
|
443
|
+
keepDOM: { type: Boolean },
|
|
444
|
+
onRow: {},
|
|
445
|
+
onGroupedRow: {},
|
|
446
|
+
prefixCls: {},
|
|
447
|
+
renderCell: {},
|
|
448
|
+
renderExpandedRow: {},
|
|
449
|
+
renderGroupSection: {},
|
|
450
|
+
rowExpandable: {},
|
|
451
|
+
rows: {},
|
|
452
|
+
rowSelection: { type: [Boolean, Object] },
|
|
453
|
+
rowSpanHover: { type: Boolean },
|
|
454
|
+
selectedKeys: {},
|
|
455
|
+
virtualBottom: { default: 0 },
|
|
456
|
+
virtualTop: { default: 0 }
|
|
457
|
+
},
|
|
458
|
+
emits: [
|
|
459
|
+
"expand",
|
|
460
|
+
"groupExpand",
|
|
461
|
+
"select"
|
|
462
|
+
],
|
|
463
|
+
setup(e, { emit: t }) {
|
|
464
|
+
let n = e, r = t, i = M(/* @__PURE__ */ new Set());
|
|
465
|
+
function o(e) {
|
|
466
|
+
return n.rowSelection && n.rowSelection.getCheckboxProps?.(e.record) || {};
|
|
467
|
+
}
|
|
468
|
+
function c(e) {
|
|
469
|
+
return !!(n.rowSelection && (n.rowSelection.disabled || o(e).disabled));
|
|
470
|
+
}
|
|
471
|
+
function l(e) {
|
|
472
|
+
return n.onRow?.(e.record, e.index, {
|
|
473
|
+
disabled: c(e),
|
|
474
|
+
selected: n.selectedKeys.has(e.key)
|
|
475
|
+
}) ?? {};
|
|
476
|
+
}
|
|
477
|
+
function u(e) {
|
|
478
|
+
return Object.fromEntries(Object.entries(l(e)).filter(([e]) => ![
|
|
479
|
+
"class",
|
|
480
|
+
"className",
|
|
481
|
+
"style",
|
|
482
|
+
"onClick"
|
|
483
|
+
].includes(e)));
|
|
484
|
+
}
|
|
485
|
+
function d(e) {
|
|
486
|
+
let t = l(e);
|
|
487
|
+
return [
|
|
488
|
+
`${n.prefixCls}-row`,
|
|
489
|
+
n.selectedKeys.has(e.key) ? `${n.prefixCls}-row-selected` : void 0,
|
|
490
|
+
n.expandedKeys.has(e.key) ? `${n.prefixCls}-row-expanded` : void 0,
|
|
491
|
+
i.value.has(e.key) ? `${n.prefixCls}-row-hovered` : void 0,
|
|
492
|
+
t.class,
|
|
493
|
+
t.className
|
|
494
|
+
];
|
|
495
|
+
}
|
|
496
|
+
function f(e, t) {
|
|
497
|
+
let r = /* @__PURE__ */ new Set([e.key]);
|
|
498
|
+
if (n.rowSpanHover) {
|
|
499
|
+
let e = t.currentTarget, i = e.parentElement, a = i ? [...i.querySelectorAll("[data-row-key]")] : [], o = a.indexOf(e);
|
|
500
|
+
a.forEach((t, i) => {
|
|
501
|
+
let a = [...t.querySelectorAll("[rowspan]")].map((e) => Number(e.getAttribute("rowspan") || 1)).some((e) => e > 1 && i <= o && i + e > o), s = i >= o && [...e.querySelectorAll("[rowspan]")].some((e) => o + Number(e.getAttribute("rowspan") || 1) > i);
|
|
502
|
+
if (a || s) {
|
|
503
|
+
let e = t.dataset.rowKey, i = n.rows.find((t) => String(t.key) === e);
|
|
504
|
+
i && r.add(i.key);
|
|
505
|
+
}
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
i.value = r;
|
|
509
|
+
}
|
|
510
|
+
function m() {
|
|
511
|
+
i.value = /* @__PURE__ */ new Set();
|
|
512
|
+
}
|
|
513
|
+
function ee(e) {
|
|
514
|
+
let t = e.record.children;
|
|
515
|
+
return Array.isArray(t) && t.length > 0;
|
|
516
|
+
}
|
|
517
|
+
function x(e) {
|
|
518
|
+
return n.rowExpandable ? n.rowExpandable(e.record) : !!(ee(e) || n.expandedRowRender || n.renderExpandedRow);
|
|
519
|
+
}
|
|
520
|
+
function S(e) {
|
|
521
|
+
if (!x(e) || n.expandIcon === !1) return;
|
|
522
|
+
let t = n.expandedKeys.has(e.key), i = typeof n.expandIcon == "function" ? n.expandIcon(t) : n.expandIcon || C(de, { class: t ? `${n.prefixCls}-expandedIcon-show` : `${n.prefixCls}-expandedIcon-hide` });
|
|
523
|
+
return C("span", {
|
|
524
|
+
"aria-expanded": t,
|
|
525
|
+
"aria-label": "Expand this row",
|
|
526
|
+
class: `${n.prefixCls}-expand-icon`,
|
|
527
|
+
role: "button",
|
|
528
|
+
tabindex: -1,
|
|
529
|
+
onClick: (t) => {
|
|
530
|
+
t.stopPropagation(), r("expand", e, t);
|
|
531
|
+
},
|
|
532
|
+
onKeypress: (t) => {
|
|
533
|
+
t.key === "Enter" && r("expand", e, t);
|
|
534
|
+
}
|
|
535
|
+
}, [i]);
|
|
536
|
+
}
|
|
537
|
+
function te(e) {
|
|
538
|
+
if (!n.rowSelection) return;
|
|
539
|
+
let t = n.selectedKeys.has(e.key), i = c(e), l = (t, n) => r("select", e, t, n), u = n.rowSelection.type === "radio" ? C(s, {
|
|
540
|
+
...o(e),
|
|
541
|
+
ariaLabel: `Select row ${e.index + 1}`,
|
|
542
|
+
checked: t,
|
|
543
|
+
disabled: i,
|
|
544
|
+
style: { width: "16px" },
|
|
545
|
+
onChange: (e) => l(e.target.checked, e)
|
|
546
|
+
}) : C(a, {
|
|
547
|
+
...o(e),
|
|
548
|
+
ariaLabel: `Select row ${e.index + 1}`,
|
|
549
|
+
checked: t,
|
|
550
|
+
disabled: i,
|
|
551
|
+
indeterminate: n.halfSelectedKeys.has(e.key),
|
|
552
|
+
style: { width: "16px" },
|
|
553
|
+
onChange: (e) => l(e.target.checked, e)
|
|
554
|
+
}), d = C("span", { class: `${n.prefixCls}-selection-wrap` }, u);
|
|
555
|
+
return n.rowSelection.renderCell?.({
|
|
556
|
+
disabled: i,
|
|
557
|
+
inHeader: !1,
|
|
558
|
+
indeterminate: n.halfSelectedKeys.has(e.key),
|
|
559
|
+
index: e.index,
|
|
560
|
+
originNode: d,
|
|
561
|
+
record: e.record,
|
|
562
|
+
selected: t,
|
|
563
|
+
selectRow: l
|
|
564
|
+
}) ?? d;
|
|
565
|
+
}
|
|
566
|
+
function ne(e, t) {
|
|
567
|
+
l(e).onClick?.(t), n.rowSelection && n.rowSelection.clickRow && !c(e) && r("select", e, !n.selectedKeys.has(e.key), t), !(n.rowSelection && n.rowSelection.clickRow) && n.expandRowByClick && x(e) && r("expand", e, t);
|
|
568
|
+
}
|
|
569
|
+
function re(e) {
|
|
570
|
+
let t = n.expandedKeys.has(e.key);
|
|
571
|
+
return n.renderExpandedRow?.({
|
|
572
|
+
expanded: t,
|
|
573
|
+
index: e.index,
|
|
574
|
+
record: e.record
|
|
575
|
+
}) ?? n.expandedRowRender?.(e.record, e.index, t);
|
|
576
|
+
}
|
|
577
|
+
function D(e) {
|
|
578
|
+
return n.onGroupedRow?.(e.record, e.index) ?? {};
|
|
579
|
+
}
|
|
580
|
+
function k(e) {
|
|
581
|
+
return Object.fromEntries(Object.entries(D(e)).filter(([e]) => ![
|
|
582
|
+
"class",
|
|
583
|
+
"className",
|
|
584
|
+
"style",
|
|
585
|
+
"onClick"
|
|
586
|
+
].includes(e)));
|
|
587
|
+
}
|
|
588
|
+
function A(e, t) {
|
|
589
|
+
D(e).onClick?.(t), n.clickGroupedRowToExpand && e.groupKey !== void 0 && r("groupExpand", e.groupKey, t);
|
|
590
|
+
}
|
|
591
|
+
function ae(e) {
|
|
592
|
+
let t = n.expandedKeys.has(e.key);
|
|
593
|
+
return C("span", {
|
|
594
|
+
"aria-expanded": t,
|
|
595
|
+
"aria-label": "Expand this group",
|
|
596
|
+
class: `${n.prefixCls}-expand-icon`,
|
|
597
|
+
role: "button",
|
|
598
|
+
tabindex: -1,
|
|
599
|
+
onClick: (t) => {
|
|
600
|
+
t.stopPropagation(), e.groupKey !== void 0 && r("groupExpand", e.groupKey, t);
|
|
601
|
+
}
|
|
602
|
+
}, C(de, { class: t ? `${n.prefixCls}-expandedIcon-show` : `${n.prefixCls}-expandedIcon-hide` }));
|
|
603
|
+
}
|
|
604
|
+
let P = h(() => Math.max(1, n.columns.length));
|
|
605
|
+
return (e, t) => (O(), g(j(n.componentWrapper), { class: T(`${n.prefixCls}-tbody`) }, {
|
|
606
|
+
default: F(() => [
|
|
607
|
+
n.virtualTop > 0 ? (O(), g(j(n.componentRow), {
|
|
608
|
+
key: 0,
|
|
609
|
+
class: T(`${n.prefixCls}-row`),
|
|
610
|
+
"aria-hidden": "true"
|
|
611
|
+
}, {
|
|
612
|
+
default: F(() => [(O(), g(j(n.componentCell), {
|
|
613
|
+
colspan: P.value,
|
|
614
|
+
style: E({
|
|
615
|
+
height: `${n.virtualTop}px`,
|
|
616
|
+
padding: 0,
|
|
617
|
+
border: 0
|
|
618
|
+
})
|
|
619
|
+
}, null, 8, ["colspan", "style"]))]),
|
|
620
|
+
_: 1
|
|
621
|
+
}, 8, ["class"])) : _("", !0),
|
|
622
|
+
(O(!0), v(p, null, ie(n.rows, (e) => (O(), v(p, { key: e.key }, [e.sectionRow ? (O(), g(j(n.componentRow), w({
|
|
623
|
+
key: 0,
|
|
624
|
+
ref_for: !0
|
|
625
|
+
}, k(e), {
|
|
626
|
+
class: [
|
|
627
|
+
`${n.prefixCls}-row`,
|
|
628
|
+
`${n.prefixCls}-row-section`,
|
|
629
|
+
D(e).class,
|
|
630
|
+
D(e).className
|
|
631
|
+
],
|
|
632
|
+
style: D(e).style,
|
|
633
|
+
"aria-expanded": n.expandedKeys.has(e.key),
|
|
634
|
+
role: "row",
|
|
635
|
+
onClick: (t) => A(e, t)
|
|
636
|
+
}), {
|
|
637
|
+
default: F(() => [(O(), g(j(n.componentCell), {
|
|
638
|
+
class: T(`${n.prefixCls}-row-cell`),
|
|
639
|
+
colspan: P.value,
|
|
640
|
+
role: "gridcell"
|
|
641
|
+
}, {
|
|
642
|
+
default: F(() => [b(N(G), { content: ae(e) }, null, 8, ["content"]), b(N(G), { content: n.renderGroupSection?.({
|
|
643
|
+
group: e.group || [],
|
|
644
|
+
groupKey: e.groupKey
|
|
645
|
+
}) }, null, 8, ["content"])]),
|
|
646
|
+
_: 2
|
|
647
|
+
}, 1032, ["class", "colspan"]))]),
|
|
648
|
+
_: 2
|
|
649
|
+
}, 1040, [
|
|
650
|
+
"class",
|
|
651
|
+
"style",
|
|
652
|
+
"aria-expanded",
|
|
653
|
+
"onClick"
|
|
654
|
+
])) : (O(), g(j(n.componentRow), w({
|
|
655
|
+
key: 1,
|
|
656
|
+
ref_for: !0
|
|
657
|
+
}, u(e), {
|
|
658
|
+
class: d(e),
|
|
659
|
+
style: l(e).style,
|
|
660
|
+
"data-row-key": e.key,
|
|
661
|
+
"aria-expanded": x(e) ? n.expandedKeys.has(e.key) : void 0,
|
|
662
|
+
"aria-level": e.level + 1,
|
|
663
|
+
"aria-rowindex": e.index + 1,
|
|
664
|
+
role: "row",
|
|
665
|
+
onClick: (t) => ne(e, t),
|
|
666
|
+
onMouseenter: (t) => f(e, t),
|
|
667
|
+
onMouseleave: m
|
|
668
|
+
}), {
|
|
669
|
+
default: F(() => [(O(!0), v(p, null, ie(n.columns, (t, r) => (O(), g(Pe, {
|
|
670
|
+
key: t.key,
|
|
671
|
+
column: t,
|
|
672
|
+
component: n.componentCell,
|
|
673
|
+
direction: n.direction,
|
|
674
|
+
expanded: n.expandedKeys.has(e.key),
|
|
675
|
+
"expand-node": t.__kind === "expand" || n.hideExpandedColumn && r === (n.rowSelection && !n.rowSelection.hidden ? 1 : 0) ? S(e) : void 0,
|
|
676
|
+
"fixed-edge": n.fixedOffsets.get(t.key)?.edge,
|
|
677
|
+
"fixed-offset": n.fixedOffsets.get(t.key)?.value,
|
|
678
|
+
"fixed-side": n.fixedOffsets.get(t.key)?.side,
|
|
679
|
+
indent: n.hideExpandedColumn && r === (n.rowSelection && !n.rowSelection.hidden ? 1 : 0) ? e.level : 0,
|
|
680
|
+
"indent-size": n.indentSize,
|
|
681
|
+
"prefix-cls": n.prefixCls,
|
|
682
|
+
record: e.record,
|
|
683
|
+
"render-cell": t.__kind === "selection" ? () => te(e) : n.renderCell,
|
|
684
|
+
"row-index": e.index,
|
|
685
|
+
selected: n.selectedKeys.has(e.key),
|
|
686
|
+
"selection-node": te(e),
|
|
687
|
+
hovered: i.value.has(e.key)
|
|
688
|
+
}, null, 8, [
|
|
689
|
+
"column",
|
|
690
|
+
"component",
|
|
691
|
+
"direction",
|
|
692
|
+
"expanded",
|
|
693
|
+
"expand-node",
|
|
694
|
+
"fixed-edge",
|
|
695
|
+
"fixed-offset",
|
|
696
|
+
"fixed-side",
|
|
697
|
+
"indent",
|
|
698
|
+
"indent-size",
|
|
699
|
+
"prefix-cls",
|
|
700
|
+
"record",
|
|
701
|
+
"render-cell",
|
|
702
|
+
"row-index",
|
|
703
|
+
"selected",
|
|
704
|
+
"selection-node",
|
|
705
|
+
"hovered"
|
|
706
|
+
]))), 128))]),
|
|
707
|
+
_: 2
|
|
708
|
+
}, 1040, [
|
|
709
|
+
"class",
|
|
710
|
+
"style",
|
|
711
|
+
"data-row-key",
|
|
712
|
+
"aria-expanded",
|
|
713
|
+
"aria-level",
|
|
714
|
+
"aria-rowindex",
|
|
715
|
+
"onClick",
|
|
716
|
+
"onMouseenter"
|
|
717
|
+
])), !e.sectionRow && re(e) != null && (n.expandedKeys.has(e.key) || n.keepDOM) ? (O(), g(j(n.componentRow), {
|
|
718
|
+
key: 2,
|
|
719
|
+
class: T([
|
|
720
|
+
`${n.prefixCls}-row`,
|
|
721
|
+
`${n.prefixCls}-row-expand`,
|
|
722
|
+
n.expandedKeys.has(e.key) ? void 0 : `${n.prefixCls}-row-hidden`
|
|
723
|
+
]),
|
|
724
|
+
"aria-level": "2",
|
|
725
|
+
role: "row"
|
|
726
|
+
}, {
|
|
727
|
+
default: F(() => [(O(), g(j(n.componentCell), {
|
|
728
|
+
class: T(`${n.prefixCls}-row-cell`),
|
|
729
|
+
colspan: P.value,
|
|
730
|
+
role: "gridcell"
|
|
731
|
+
}, {
|
|
732
|
+
default: F(() => [y("div", { class: T(`${n.prefixCls}-expand-inner`) }, [b(N(G), { content: re(e) }, null, 8, ["content"])], 2)]),
|
|
733
|
+
_: 2
|
|
734
|
+
}, 1032, ["class", "colspan"]))]),
|
|
735
|
+
_: 2
|
|
736
|
+
}, 1032, ["class"])) : _("", !0)], 64))), 128)),
|
|
737
|
+
n.virtualBottom > 0 ? (O(), g(j(n.componentRow), {
|
|
738
|
+
key: 1,
|
|
739
|
+
class: T(`${n.prefixCls}-row`),
|
|
740
|
+
"aria-hidden": "true"
|
|
741
|
+
}, {
|
|
742
|
+
default: F(() => [(O(), g(j(n.componentCell), {
|
|
743
|
+
colspan: P.value,
|
|
744
|
+
style: E({
|
|
745
|
+
height: `${n.virtualBottom}px`,
|
|
746
|
+
padding: 0,
|
|
747
|
+
border: 0
|
|
748
|
+
})
|
|
749
|
+
}, null, 8, ["colspan", "style"]))]),
|
|
750
|
+
_: 1
|
|
751
|
+
}, 8, ["class"])) : _("", !0)
|
|
752
|
+
]),
|
|
753
|
+
_: 1
|
|
754
|
+
}, 8, ["class"]));
|
|
755
|
+
}
|
|
756
|
+
}), Ie = /* @__PURE__ */ x({
|
|
757
|
+
name: "TableFilterMenu",
|
|
758
|
+
__name: "TableFilterMenu",
|
|
759
|
+
props: {
|
|
760
|
+
filters: {},
|
|
761
|
+
level: { default: 0 },
|
|
762
|
+
multiple: { type: Boolean },
|
|
763
|
+
renderItem: {},
|
|
764
|
+
selected: {}
|
|
765
|
+
},
|
|
766
|
+
emits: ["toggle"],
|
|
767
|
+
setup(e, { emit: t }) {
|
|
768
|
+
let o = e, c = t;
|
|
769
|
+
function l(e, t) {
|
|
770
|
+
return o.renderItem?.({
|
|
771
|
+
checked: o.selected.includes(e.value),
|
|
772
|
+
filteredValue: o.selected,
|
|
773
|
+
filterMultiple: o.multiple,
|
|
774
|
+
level: o.level,
|
|
775
|
+
onChange: t,
|
|
776
|
+
text: e.text,
|
|
777
|
+
value: e.value
|
|
778
|
+
});
|
|
779
|
+
}
|
|
780
|
+
return (e, t) => {
|
|
781
|
+
let u = A("TableFilterMenu", !0);
|
|
782
|
+
return O(), g(N(n), null, {
|
|
783
|
+
default: F(() => [(O(!0), v(p, null, ie(o.filters, (e, n) => (O(), v(p, { key: `${o.level}-${n}` }, [e.children?.length ? (O(), g(N(i), {
|
|
784
|
+
key: 0,
|
|
785
|
+
trigger: "hover",
|
|
786
|
+
position: "right"
|
|
787
|
+
}, {
|
|
788
|
+
content: F(() => [b(u, {
|
|
789
|
+
filters: e.children,
|
|
790
|
+
level: o.level + 1,
|
|
791
|
+
multiple: o.multiple,
|
|
792
|
+
"render-item": o.renderItem,
|
|
793
|
+
selected: o.selected,
|
|
794
|
+
onToggle: t[0] ||= (e, t) => c("toggle", e, t)
|
|
795
|
+
}, null, 8, [
|
|
796
|
+
"filters",
|
|
797
|
+
"level",
|
|
798
|
+
"multiple",
|
|
799
|
+
"render-item",
|
|
800
|
+
"selected"
|
|
801
|
+
])]),
|
|
802
|
+
default: F(() => [b(N(r), { onClick: (t) => c("toggle", e, t) }, {
|
|
803
|
+
default: F(() => [o.renderItem ? (O(), g(N(G), {
|
|
804
|
+
key: 0,
|
|
805
|
+
content: l(e, (t) => c("toggle", e, t))
|
|
806
|
+
}, null, 8, ["content"])) : o.multiple ? (O(), g(N(a), {
|
|
807
|
+
key: 1,
|
|
808
|
+
checked: o.selected.includes(e.value)
|
|
809
|
+
}, {
|
|
810
|
+
default: F(() => [b(N(G), { content: e.text }, null, 8, ["content"])]),
|
|
811
|
+
_: 2
|
|
812
|
+
}, 1032, ["checked"])) : (O(), g(N(s), {
|
|
813
|
+
key: 2,
|
|
814
|
+
checked: o.selected.includes(e.value)
|
|
815
|
+
}, {
|
|
816
|
+
default: F(() => [b(N(G), { content: e.text }, null, 8, ["content"])]),
|
|
817
|
+
_: 2
|
|
818
|
+
}, 1032, ["checked"]))]),
|
|
819
|
+
_: 2
|
|
820
|
+
}, 1032, ["onClick"])]),
|
|
821
|
+
_: 2
|
|
822
|
+
}, 1024)) : (O(), g(N(r), {
|
|
823
|
+
key: 1,
|
|
824
|
+
onClick: (t) => c("toggle", e, t)
|
|
825
|
+
}, {
|
|
826
|
+
default: F(() => [o.renderItem ? (O(), g(N(G), {
|
|
827
|
+
key: 0,
|
|
828
|
+
content: l(e, (t) => c("toggle", e, t))
|
|
829
|
+
}, null, 8, ["content"])) : o.multiple ? (O(), g(N(a), {
|
|
830
|
+
key: 1,
|
|
831
|
+
checked: o.selected.includes(e.value)
|
|
832
|
+
}, {
|
|
833
|
+
default: F(() => [b(N(G), { content: e.text }, null, 8, ["content"])]),
|
|
834
|
+
_: 2
|
|
835
|
+
}, 1032, ["checked"])) : (O(), g(N(s), {
|
|
836
|
+
key: 2,
|
|
837
|
+
checked: o.selected.includes(e.value)
|
|
838
|
+
}, {
|
|
839
|
+
default: F(() => [b(N(G), { content: e.text }, null, 8, ["content"])]),
|
|
840
|
+
_: 2
|
|
841
|
+
}, 1032, ["checked"]))]),
|
|
842
|
+
_: 2
|
|
843
|
+
}, 1032, ["onClick"]))], 64))), 128))]),
|
|
844
|
+
_: 1
|
|
845
|
+
});
|
|
846
|
+
};
|
|
847
|
+
}
|
|
848
|
+
}), J = ["onPointerdown"], Le = /* @__PURE__ */ x({
|
|
849
|
+
__name: "TableHeader",
|
|
850
|
+
props: {
|
|
851
|
+
componentCell: { default: "th" },
|
|
852
|
+
componentRow: { default: "tr" },
|
|
853
|
+
componentWrapper: { default: "thead" },
|
|
854
|
+
dataCount: {},
|
|
855
|
+
direction: {},
|
|
856
|
+
filterValues: {},
|
|
857
|
+
fixedOffsets: {},
|
|
858
|
+
headerStyle: { type: [
|
|
859
|
+
Boolean,
|
|
860
|
+
null,
|
|
861
|
+
String,
|
|
862
|
+
Object,
|
|
863
|
+
Array
|
|
864
|
+
] },
|
|
865
|
+
headerRows: {},
|
|
866
|
+
locale: {},
|
|
867
|
+
onHeaderRow: {},
|
|
868
|
+
prefixCls: {},
|
|
869
|
+
resizable: { type: [Boolean, Object] },
|
|
870
|
+
rowSelection: { type: [Boolean, Object] },
|
|
871
|
+
selectedCount: {},
|
|
872
|
+
sortOrders: {},
|
|
873
|
+
sticky: { type: [Boolean, Object] },
|
|
874
|
+
renderHeaderCell: {}
|
|
875
|
+
},
|
|
876
|
+
emits: [
|
|
877
|
+
"filter",
|
|
878
|
+
"resize",
|
|
879
|
+
"selectAll",
|
|
880
|
+
"sort"
|
|
881
|
+
],
|
|
882
|
+
setup(e, { emit: n }) {
|
|
883
|
+
let r = e, o = n, s = M(null), c = M(0), l = M(0), u = M(/* @__PURE__ */ new Map()), f = M(/* @__PURE__ */ new Map());
|
|
884
|
+
function m(e) {
|
|
885
|
+
return r.filterValues.get(e.key) ?? [];
|
|
886
|
+
}
|
|
887
|
+
function x(e) {
|
|
888
|
+
return e.filterConfirmMode === "confirm" ? u.value.get(e.key) ?? m(e) : m(e);
|
|
889
|
+
}
|
|
890
|
+
function S(e, t) {
|
|
891
|
+
let n = new Map(u.value);
|
|
892
|
+
n.set(e.key, t), u.value = n;
|
|
893
|
+
}
|
|
894
|
+
function te(e) {
|
|
895
|
+
if (Object.prototype.hasOwnProperty.call(e, "filterDropdownVisible")) return e.filterDropdownVisible;
|
|
896
|
+
if (e.filterConfirmMode === "confirm" || e.renderFilterDropdown) return f.value.get(e.key) ?? !1;
|
|
897
|
+
}
|
|
898
|
+
function ne(e) {
|
|
899
|
+
let t = te(e);
|
|
900
|
+
return {
|
|
901
|
+
...e.filterDropdownProps,
|
|
902
|
+
clickToHide: e.filterConfirmMode !== "confirm",
|
|
903
|
+
...t === void 0 ? {} : { visible: t }
|
|
904
|
+
};
|
|
905
|
+
}
|
|
906
|
+
function E(e, t) {
|
|
907
|
+
if (!Object.prototype.hasOwnProperty.call(e, "filterDropdownVisible")) {
|
|
908
|
+
let n = new Map(f.value);
|
|
909
|
+
n.set(e.key, t), f.value = n;
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
function D(e, t) {
|
|
913
|
+
E(e, t), t && e.filterConfirmMode === "confirm" && S(e, [...m(e)]), e.onFilterDropdownVisibleChange?.(t);
|
|
914
|
+
}
|
|
915
|
+
function k(e, t, n) {
|
|
916
|
+
n.stopPropagation();
|
|
917
|
+
let r = x(e), i = r.includes(t.value) ? r.filter((e) => e !== t.value) : e.filterMultiple === !1 ? [t.value] : [...r, t.value];
|
|
918
|
+
e.filterConfirmMode === "confirm" ? S(e, i) : o("filter", e, i);
|
|
919
|
+
}
|
|
920
|
+
function A(e) {
|
|
921
|
+
o("filter", e, x(e)), E(e, !1);
|
|
922
|
+
}
|
|
923
|
+
function P(e) {
|
|
924
|
+
S(e, [...m(e)]);
|
|
925
|
+
}
|
|
926
|
+
function oe(e) {
|
|
927
|
+
S(e, []), o("filter", e, []);
|
|
928
|
+
}
|
|
929
|
+
function se(e) {
|
|
930
|
+
return {
|
|
931
|
+
clear: (t = {}) => {
|
|
932
|
+
oe(e), t.closeDropdown && E(e, !1);
|
|
933
|
+
},
|
|
934
|
+
close: () => E(e, !1),
|
|
935
|
+
confirm: (t = {}) => {
|
|
936
|
+
t.filteredValue && S(e, t.filteredValue), o("filter", e, t.filteredValue ?? x(e)), t.closeDropdown && E(e, !1);
|
|
937
|
+
},
|
|
938
|
+
filters: e.filters,
|
|
939
|
+
reset: () => P(e),
|
|
940
|
+
setTempFilteredValue: (t) => S(e, t),
|
|
941
|
+
tempFilteredValue: x(e)
|
|
942
|
+
};
|
|
943
|
+
}
|
|
944
|
+
function ce() {
|
|
945
|
+
if (r.rowSelection) return C(a, {
|
|
946
|
+
checked: r.dataCount > 0 && r.selectedCount === r.dataCount,
|
|
947
|
+
disabled: !!r.rowSelection.disabled,
|
|
948
|
+
indeterminate: r.selectedCount > 0 && r.selectedCount < r.dataCount,
|
|
949
|
+
style: { width: "16px" },
|
|
950
|
+
"aria-label": "Select all rows",
|
|
951
|
+
onChange: K
|
|
952
|
+
});
|
|
953
|
+
}
|
|
954
|
+
function le(e) {
|
|
955
|
+
if (!e.sorter) return;
|
|
956
|
+
let n = de(e, r.sortOrders.get(e.key) || !1);
|
|
957
|
+
return C("span", {
|
|
958
|
+
class: `${r.prefixCls}-column-sorter-wrapper`,
|
|
959
|
+
role: "button",
|
|
960
|
+
tabindex: -1,
|
|
961
|
+
onClick: (t) => o("sort", e, t)
|
|
962
|
+
}, [fe(e) ? C(t, { content: pe(e) }, { default: () => n }) : n]);
|
|
963
|
+
}
|
|
964
|
+
function de(e, t) {
|
|
965
|
+
return e.sortIcon ? e.sortIcon({ sortOrder: t }) : C("span", { class: `${r.prefixCls}-column-sorter` }, [C("span", { class: [`${r.prefixCls}-column-sorter-up`, t === "ascend" && "on"] }, C(ue)), C("span", { class: [`${r.prefixCls}-column-sorter-down`, t === "descend" && "on"] }, C(I))]);
|
|
966
|
+
}
|
|
967
|
+
function fe(e) {
|
|
968
|
+
return e.showSortTip === !0 && !Object.prototype.hasOwnProperty.call(e, "sortOrder") && !e.sortIcon;
|
|
969
|
+
}
|
|
970
|
+
function pe(e) {
|
|
971
|
+
let t = r.sortOrders.get(e.key) || !1;
|
|
972
|
+
return t === "ascend" ? r.locale.descend || "Click to descend" : t === "descend" ? r.locale.cancelSort || "Cancel sorting" : r.locale.ascend || "Click to ascend";
|
|
973
|
+
}
|
|
974
|
+
function me(e) {
|
|
975
|
+
let n = r.sortOrders.get(e.key) || !1, i = !!(e.filters || e.renderFilterDropdown || e.filterDropdown), a = de(e, n), s = fe(e) && i ? C(t, { content: pe(e) }, { default: () => a }) : a, c = C("span", {
|
|
976
|
+
class: `${r.prefixCls}-column-sorter-wrapper`,
|
|
977
|
+
role: "button",
|
|
978
|
+
tabindex: -1,
|
|
979
|
+
"aria-label": `Current sort order is ${n || "none"}`,
|
|
980
|
+
"aria-roledescription": "Sort data with this column",
|
|
981
|
+
onClick: (t) => {
|
|
982
|
+
t.stopPropagation(), o("sort", e, t);
|
|
983
|
+
},
|
|
984
|
+
onKeypress: (t) => {
|
|
985
|
+
t.key === "Enter" && (t.stopPropagation(), o("sort", e, t));
|
|
986
|
+
}
|
|
987
|
+
}, [C("span", { class: `${r.prefixCls}-row-head-title` }, C(G, { content: R(e) })), s]);
|
|
988
|
+
return fe(e) && !i ? C(t, { content: pe(e) }, { default: () => c }) : c;
|
|
989
|
+
}
|
|
990
|
+
function he(e) {
|
|
991
|
+
if (!(e.filters || e.renderFilterDropdown || e.filterDropdown)) return;
|
|
992
|
+
let t = () => {
|
|
993
|
+
if (e.filterDropdown) return e.filterDropdown;
|
|
994
|
+
if (e.renderFilterDropdown) return e.renderFilterDropdown(se(e));
|
|
995
|
+
let t = [C(Ie, {
|
|
996
|
+
filters: e.filters ?? [],
|
|
997
|
+
multiple: e.filterMultiple !== !1,
|
|
998
|
+
renderItem: e.renderFilterDropdownItem,
|
|
999
|
+
selected: x(e),
|
|
1000
|
+
onToggle: (t, n) => k(e, t, n)
|
|
1001
|
+
})];
|
|
1002
|
+
return e.filterConfirmMode === "confirm" && t.push(C("div", {
|
|
1003
|
+
class: `${r.prefixCls}-column-filter-footer`,
|
|
1004
|
+
style: {
|
|
1005
|
+
borderTop: "1px solid var(--semi-color-border)",
|
|
1006
|
+
display: "flex",
|
|
1007
|
+
gap: "8px",
|
|
1008
|
+
justifyContent: "flex-end",
|
|
1009
|
+
padding: "8px 12px"
|
|
1010
|
+
}
|
|
1011
|
+
}, [C(d, {
|
|
1012
|
+
size: "small",
|
|
1013
|
+
onClick: () => P(e)
|
|
1014
|
+
}, () => String(r.locale.resetFilter || "Reset")), C(d, {
|
|
1015
|
+
size: "small",
|
|
1016
|
+
theme: "solid",
|
|
1017
|
+
onClick: () => A(e)
|
|
1018
|
+
}, () => String(r.locale.confirmFilter || "OK"))])), C("div", t);
|
|
1019
|
+
};
|
|
1020
|
+
return C(i, {
|
|
1021
|
+
...ne(e),
|
|
1022
|
+
class: `${r.prefixCls}-column-filter-dropdown`,
|
|
1023
|
+
position: "bottom",
|
|
1024
|
+
trigger: "click",
|
|
1025
|
+
"onUpdate:visible": (t) => E(e, t),
|
|
1026
|
+
onVisibleChange: (t) => D(e, t)
|
|
1027
|
+
}, {
|
|
1028
|
+
content: t,
|
|
1029
|
+
default: () => C("span", { class: [`${r.prefixCls}-column-filter`, m(e).length ? "on" : void 0] }, [typeof e.filterIcon == "function" ? e.filterIcon(m(e).length > 0) : e.filterIcon && e.filterIcon !== !0 ? e.filterIcon : C(L, {
|
|
1030
|
+
"aria-haspopup": "listbox",
|
|
1031
|
+
"aria-label": "Filter data with this column",
|
|
1032
|
+
role: "button",
|
|
1033
|
+
tabindex: -1
|
|
1034
|
+
})])
|
|
1035
|
+
});
|
|
1036
|
+
}
|
|
1037
|
+
function R(e) {
|
|
1038
|
+
return typeof e.title == "function" ? e.title({
|
|
1039
|
+
filter: he(e),
|
|
1040
|
+
selection: ce(),
|
|
1041
|
+
sorter: le(e)
|
|
1042
|
+
}) : r.renderHeaderCell?.({ column: e }) ?? e.title;
|
|
1043
|
+
}
|
|
1044
|
+
function z(e, t, n) {
|
|
1045
|
+
return e.column.onHeaderCell?.(e.column, t, n) ?? {};
|
|
1046
|
+
}
|
|
1047
|
+
function B(e, t, n) {
|
|
1048
|
+
let i = z(e, t, n), a = r.fixedOffsets.get(e.column.key), o = r.direction === "rtl" ? a?.side === "left" ? "right" : "left" : a?.side;
|
|
1049
|
+
return [
|
|
1050
|
+
r.headerStyle,
|
|
1051
|
+
{
|
|
1052
|
+
[o ?? "left"]: a ? `${a.value}px` : void 0,
|
|
1053
|
+
textAlign: e.column.align
|
|
1054
|
+
},
|
|
1055
|
+
i.style
|
|
1056
|
+
];
|
|
1057
|
+
}
|
|
1058
|
+
function ge(e, t, n) {
|
|
1059
|
+
let i = r.fixedOffsets.get(e.column.key), a = z(e, t, n);
|
|
1060
|
+
return [
|
|
1061
|
+
`${r.prefixCls}-row-head`,
|
|
1062
|
+
e.column.className,
|
|
1063
|
+
a.class,
|
|
1064
|
+
a.className,
|
|
1065
|
+
e.column.ellipsis ? `${r.prefixCls}-row-head-ellipsis` : void 0,
|
|
1066
|
+
i ? `${r.prefixCls}-cell-fixed-${i.side}` : void 0,
|
|
1067
|
+
i?.edge && i.side === "left" ? `${r.prefixCls}-cell-fixed-left-last` : void 0,
|
|
1068
|
+
i?.edge && i.side === "right" ? `${r.prefixCls}-cell-fixed-right-first` : void 0,
|
|
1069
|
+
e.column.__kind === "selection" ? `${r.prefixCls}-column-selection` : void 0
|
|
1070
|
+
];
|
|
1071
|
+
}
|
|
1072
|
+
function V(e, t, n) {
|
|
1073
|
+
let r = z(e, t, n);
|
|
1074
|
+
return Object.fromEntries(Object.entries(r).filter(([e]) => ![
|
|
1075
|
+
"class",
|
|
1076
|
+
"className",
|
|
1077
|
+
"style",
|
|
1078
|
+
"onClick"
|
|
1079
|
+
].includes(e)));
|
|
1080
|
+
}
|
|
1081
|
+
function _e(e) {
|
|
1082
|
+
let t = r.onHeaderRow?.((r.headerRows[e] ?? []).map((e) => e.column), e) ?? {};
|
|
1083
|
+
return Object.fromEntries(Object.entries(t).filter(([e]) => ![
|
|
1084
|
+
"class",
|
|
1085
|
+
"className",
|
|
1086
|
+
"style"
|
|
1087
|
+
].includes(e)));
|
|
1088
|
+
}
|
|
1089
|
+
function ve(e) {
|
|
1090
|
+
let t = r.onHeaderRow?.((r.headerRows[e] ?? []).map((e) => e.column), e) ?? {};
|
|
1091
|
+
return [
|
|
1092
|
+
`${r.prefixCls}-row`,
|
|
1093
|
+
t.class,
|
|
1094
|
+
t.className
|
|
1095
|
+
];
|
|
1096
|
+
}
|
|
1097
|
+
function ye(e) {
|
|
1098
|
+
return r.onHeaderRow?.((r.headerRows[e] ?? []).map((e) => e.column), e)?.style;
|
|
1099
|
+
}
|
|
1100
|
+
function be(e, t, n, r) {
|
|
1101
|
+
z(e, t, n).onClick?.(r);
|
|
1102
|
+
}
|
|
1103
|
+
function H(e, t) {
|
|
1104
|
+
t.preventDefault(), t.stopPropagation(), s.value = e, c.value = t.clientX, l.value = typeof e.__width == "number" ? e.__width : typeof e.width == "number" ? e.width : t.currentTarget.parentElement?.getBoundingClientRect().width ?? 0, o("resize", e, l.value, "start"), window.addEventListener("pointermove", U), window.addEventListener("pointerup", W, { once: !0 });
|
|
1105
|
+
}
|
|
1106
|
+
function U(e) {
|
|
1107
|
+
if (!s.value) return;
|
|
1108
|
+
let t = (e.clientX - c.value) * (r.direction === "rtl" ? -1 : 1);
|
|
1109
|
+
o("resize", s.value, Math.max(40, l.value + t), "move");
|
|
1110
|
+
}
|
|
1111
|
+
function W(e) {
|
|
1112
|
+
if (s.value) {
|
|
1113
|
+
let t = (e.clientX - c.value) * (r.direction === "rtl" ? -1 : 1);
|
|
1114
|
+
o("resize", s.value, Math.max(40, l.value + t), "stop");
|
|
1115
|
+
}
|
|
1116
|
+
s.value = null, window.removeEventListener("pointermove", U);
|
|
1117
|
+
}
|
|
1118
|
+
re(() => {
|
|
1119
|
+
typeof window < "u" && (window.removeEventListener("pointermove", U), window.removeEventListener("pointerup", W));
|
|
1120
|
+
});
|
|
1121
|
+
let xe = h(() => ({ top: r.sticky && typeof r.sticky == "object" ? `${r.sticky.top ?? 0}px` : void 0 }));
|
|
1122
|
+
function K(e) {
|
|
1123
|
+
o("selectAll", e.target.checked, e);
|
|
1124
|
+
}
|
|
1125
|
+
return (e, t) => (O(), g(j(r.componentWrapper), { class: T(`${r.prefixCls}-thead`) }, {
|
|
1126
|
+
default: F(() => [(O(!0), v(p, null, ie(r.headerRows, (e, t) => (O(), g(j(r.componentRow), w({ key: t }, { ref_for: !0 }, _e(t), {
|
|
1127
|
+
class: ve(t),
|
|
1128
|
+
style: ye(t),
|
|
1129
|
+
role: "row"
|
|
1130
|
+
}), {
|
|
1131
|
+
default: F(() => [(O(!0), v(p, null, ie(e, (e, n) => (O(), g(j(r.componentCell), w({ key: e.column.key }, { ref_for: !0 }, V(e, n, t), {
|
|
1132
|
+
class: ge(e, n, t),
|
|
1133
|
+
style: [B(e, n, t), xe.value],
|
|
1134
|
+
colspan: e.colSpan,
|
|
1135
|
+
rowspan: e.rowSpan,
|
|
1136
|
+
"aria-sort": r.sortOrders.get(e.column.key) === "ascend" ? "ascending" : r.sortOrders.get(e.column.key) === "descend" ? "descending" : e.column.sorter ? "none" : void 0,
|
|
1137
|
+
role: "columnheader",
|
|
1138
|
+
onClick: (r) => be(e, n, t, r)
|
|
1139
|
+
}), {
|
|
1140
|
+
default: F(() => [e.column.__kind === "selection" ? (O(), v("span", {
|
|
1141
|
+
key: 0,
|
|
1142
|
+
class: T(`${r.prefixCls}-selection-wrap`)
|
|
1143
|
+
}, [b(N(a), {
|
|
1144
|
+
checked: r.dataCount > 0 && r.selectedCount === r.dataCount,
|
|
1145
|
+
indeterminate: r.selectedCount > 0 && r.selectedCount < r.dataCount,
|
|
1146
|
+
disabled: !!(r.rowSelection && r.rowSelection.disabled),
|
|
1147
|
+
style: { width: "16px" },
|
|
1148
|
+
"aria-label": "Select all rows",
|
|
1149
|
+
onChange: K
|
|
1150
|
+
}, null, 8, [
|
|
1151
|
+
"checked",
|
|
1152
|
+
"indeterminate",
|
|
1153
|
+
"disabled"
|
|
1154
|
+
])], 2)) : e.column.useFullRender && typeof e.column.title == "function" ? (O(), g(N(G), {
|
|
1155
|
+
key: 1,
|
|
1156
|
+
content: R(e.column)
|
|
1157
|
+
}, null, 8, ["content"])) : e.column.sorter || e.column.filters || e.column.renderFilterDropdown || e.column.filterDropdown ? (O(), v("span", {
|
|
1158
|
+
key: 2,
|
|
1159
|
+
class: T(`${r.prefixCls}-header-column`)
|
|
1160
|
+
}, [e.column.sorter ? (O(), g(N(G), {
|
|
1161
|
+
key: 0,
|
|
1162
|
+
content: me(e.column)
|
|
1163
|
+
}, null, 8, ["content"])) : (O(), v("span", {
|
|
1164
|
+
key: 1,
|
|
1165
|
+
class: T(`${r.prefixCls}-row-head-title`)
|
|
1166
|
+
}, [b(N(G), { content: R(e.column) }, null, 8, ["content"])], 2)), e.column.filters || e.column.renderFilterDropdown || e.column.filterDropdown ? (O(), g(N(i), w({
|
|
1167
|
+
key: 2,
|
|
1168
|
+
trigger: "click",
|
|
1169
|
+
position: "bottom",
|
|
1170
|
+
class: `${r.prefixCls}-column-filter-dropdown`
|
|
1171
|
+
}, { ref_for: !0 }, ne(e.column), {
|
|
1172
|
+
"onUpdate:visible": (t) => E(e.column, t),
|
|
1173
|
+
onVisibleChange: (t) => D(e.column, t)
|
|
1174
|
+
}), {
|
|
1175
|
+
content: F(() => [e.column.filterDropdown ? (O(), g(N(G), {
|
|
1176
|
+
key: 0,
|
|
1177
|
+
content: e.column.filterDropdown
|
|
1178
|
+
}, null, 8, ["content"])) : e.column.renderFilterDropdown ? (O(), g(N(G), {
|
|
1179
|
+
key: 1,
|
|
1180
|
+
content: e.column.renderFilterDropdown({ ...se(e.column) })
|
|
1181
|
+
}, null, 8, ["content"])) : (O(), v(p, { key: 2 }, [b(Ie, {
|
|
1182
|
+
filters: e.column.filters || [],
|
|
1183
|
+
multiple: e.column.filterMultiple !== !1,
|
|
1184
|
+
"render-item": e.column.renderFilterDropdownItem,
|
|
1185
|
+
selected: x(e.column),
|
|
1186
|
+
onToggle: (t, n) => k(e.column, t, n)
|
|
1187
|
+
}, null, 8, [
|
|
1188
|
+
"filters",
|
|
1189
|
+
"multiple",
|
|
1190
|
+
"render-item",
|
|
1191
|
+
"selected",
|
|
1192
|
+
"onToggle"
|
|
1193
|
+
]), e.column.filterConfirmMode === "confirm" ? (O(), v("div", {
|
|
1194
|
+
key: 0,
|
|
1195
|
+
class: T(`${r.prefixCls}-column-filter-footer`),
|
|
1196
|
+
style: {
|
|
1197
|
+
display: "flex",
|
|
1198
|
+
"justify-content": "flex-end",
|
|
1199
|
+
gap: "8px",
|
|
1200
|
+
padding: "8px 12px",
|
|
1201
|
+
"border-top": "1px solid var(--semi-color-border)"
|
|
1202
|
+
}
|
|
1203
|
+
}, [b(N(d), {
|
|
1204
|
+
size: "small",
|
|
1205
|
+
onClick: (t) => P(e.column)
|
|
1206
|
+
}, {
|
|
1207
|
+
default: F(() => [ee(ae(r.locale.resetFilter || "Reset"), 1)]),
|
|
1208
|
+
_: 1
|
|
1209
|
+
}, 8, ["onClick"]), b(N(d), {
|
|
1210
|
+
size: "small",
|
|
1211
|
+
theme: "solid",
|
|
1212
|
+
onClick: (t) => A(e.column)
|
|
1213
|
+
}, {
|
|
1214
|
+
default: F(() => [ee(ae(r.locale.confirmFilter || "OK"), 1)]),
|
|
1215
|
+
_: 1
|
|
1216
|
+
}, 8, ["onClick"])], 2)) : _("", !0)], 64))]),
|
|
1217
|
+
default: F(() => [y("span", { class: T([`${r.prefixCls}-column-filter`, m(e.column).length ? "on" : void 0]) }, [typeof e.column.filterIcon == "function" ? (O(), g(N(G), {
|
|
1218
|
+
key: 0,
|
|
1219
|
+
content: e.column.filterIcon(m(e.column).length > 0)
|
|
1220
|
+
}, null, 8, ["content"])) : e.column.filterIcon && e.column.filterIcon !== !0 ? (O(), g(N(G), {
|
|
1221
|
+
key: 1,
|
|
1222
|
+
content: e.column.filterIcon
|
|
1223
|
+
}, null, 8, ["content"])) : (O(), g(N(L), {
|
|
1224
|
+
key: 2,
|
|
1225
|
+
role: "button",
|
|
1226
|
+
"aria-label": "Filter data with this column",
|
|
1227
|
+
"aria-haspopup": "listbox",
|
|
1228
|
+
tabindex: "-1"
|
|
1229
|
+
}))], 2)]),
|
|
1230
|
+
_: 2
|
|
1231
|
+
}, 1040, [
|
|
1232
|
+
"class",
|
|
1233
|
+
"onUpdate:visible",
|
|
1234
|
+
"onVisibleChange"
|
|
1235
|
+
])) : _("", !0)], 2)) : (O(), g(N(G), {
|
|
1236
|
+
key: 3,
|
|
1237
|
+
content: R(e.column)
|
|
1238
|
+
}, null, 8, ["content"])), r.resizable && e.column.resize !== !1 ? (O(), v("span", {
|
|
1239
|
+
key: 4,
|
|
1240
|
+
class: "react-resizable-handle",
|
|
1241
|
+
role: "separator",
|
|
1242
|
+
"aria-orientation": "vertical",
|
|
1243
|
+
onPointerdown: (t) => H(e.column, t)
|
|
1244
|
+
}, null, 40, J)) : _("", !0)]),
|
|
1245
|
+
_: 2
|
|
1246
|
+
}, 1040, [
|
|
1247
|
+
"class",
|
|
1248
|
+
"style",
|
|
1249
|
+
"colspan",
|
|
1250
|
+
"rowspan",
|
|
1251
|
+
"aria-sort",
|
|
1252
|
+
"onClick"
|
|
1253
|
+
]))), 128))]),
|
|
1254
|
+
_: 2
|
|
1255
|
+
}, 1040, ["class", "style"]))), 128))]),
|
|
1256
|
+
_: 1
|
|
1257
|
+
}, 8, ["class"]));
|
|
1258
|
+
}
|
|
1259
|
+
}), Re = x({
|
|
1260
|
+
name: "TableNativeElement",
|
|
1261
|
+
inheritAttrs: !1,
|
|
1262
|
+
setup(e, { attrs: t, slots: n }) {
|
|
1263
|
+
return () => C("table", t, n.default?.());
|
|
1264
|
+
}
|
|
1265
|
+
}), ze = {
|
|
1266
|
+
key: 0,
|
|
1267
|
+
class: "semi-spin-wrapper"
|
|
1268
|
+
}, Be = {
|
|
1269
|
+
width: "48",
|
|
1270
|
+
height: "48",
|
|
1271
|
+
viewBox: "0 0 36 36",
|
|
1272
|
+
version: "1.1",
|
|
1273
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1274
|
+
"aria-hidden": "true",
|
|
1275
|
+
"data-icon": "spin"
|
|
1276
|
+
}, Ve = {
|
|
1277
|
+
stroke: "none",
|
|
1278
|
+
"stroke-width": "1",
|
|
1279
|
+
fill: "none",
|
|
1280
|
+
"fill-rule": "evenodd"
|
|
1281
|
+
}, He = ["stroke"], Y = {
|
|
1282
|
+
class: "semi-spin-children",
|
|
1283
|
+
"x-semi-prop": "children"
|
|
1284
|
+
}, Ue = /* @__PURE__ */ x({
|
|
1285
|
+
name: "TableSpin",
|
|
1286
|
+
__name: "TableSpin",
|
|
1287
|
+
props: { spinning: { type: Boolean } },
|
|
1288
|
+
setup(e) {
|
|
1289
|
+
let t = `linearGradient-semi-table-spin-${oe()}`;
|
|
1290
|
+
return (n, r) => (O(), v("div", { class: T(["semi-spin semi-spin-large semi-spin-block", { "semi-spin-hidden": !e.spinning }]) }, [e.spinning ? (O(), v("div", ze, [(O(), v("svg", Be, [y("defs", null, [y("linearGradient", {
|
|
1291
|
+
id: t,
|
|
1292
|
+
x1: "0%",
|
|
1293
|
+
y1: "100%",
|
|
1294
|
+
x2: "100%",
|
|
1295
|
+
y2: "100%"
|
|
1296
|
+
}, [...r[0] ||= [
|
|
1297
|
+
y("stop", {
|
|
1298
|
+
"stop-color": "currentColor",
|
|
1299
|
+
"stop-opacity": "0",
|
|
1300
|
+
offset: "0%"
|
|
1301
|
+
}, null, -1),
|
|
1302
|
+
y("stop", {
|
|
1303
|
+
"stop-color": "currentColor",
|
|
1304
|
+
"stop-opacity": "0.50",
|
|
1305
|
+
offset: "39.9430698%"
|
|
1306
|
+
}, null, -1),
|
|
1307
|
+
y("stop", {
|
|
1308
|
+
"stop-color": "currentColor",
|
|
1309
|
+
offset: "100%"
|
|
1310
|
+
}, null, -1)
|
|
1311
|
+
]])]), y("g", Ve, [r[1] ||= y("rect", {
|
|
1312
|
+
"fill-opacity": "0.01",
|
|
1313
|
+
fill: "none",
|
|
1314
|
+
x: "0",
|
|
1315
|
+
y: "0",
|
|
1316
|
+
width: "36",
|
|
1317
|
+
height: "36"
|
|
1318
|
+
}, null, -1), y("path", {
|
|
1319
|
+
d: "M34,18 C34,9.163444 26.836556,2 18,2 C11.6597233,2 6.18078805,5.68784135 3.59122325,11.0354951",
|
|
1320
|
+
stroke: `url(#${t})`,
|
|
1321
|
+
"stroke-width": "4",
|
|
1322
|
+
"stroke-linecap": "round"
|
|
1323
|
+
}, null, 8, He)])]))])) : _("", !0), y("div", Y, [k(n.$slots, "default")])], 2));
|
|
1324
|
+
}
|
|
1325
|
+
}), We = ["id", "data-column-fixed"], Ge = /* @__PURE__ */ x({
|
|
1326
|
+
name: "Table",
|
|
1327
|
+
inheritAttrs: !1,
|
|
1328
|
+
__name: "Table",
|
|
1329
|
+
props: {
|
|
1330
|
+
bordered: { type: Boolean },
|
|
1331
|
+
childrenRecordName: {},
|
|
1332
|
+
class: { type: [
|
|
1333
|
+
Boolean,
|
|
1334
|
+
null,
|
|
1335
|
+
String,
|
|
1336
|
+
Object,
|
|
1337
|
+
Array
|
|
1338
|
+
] },
|
|
1339
|
+
className: { type: [
|
|
1340
|
+
Boolean,
|
|
1341
|
+
null,
|
|
1342
|
+
String,
|
|
1343
|
+
Object,
|
|
1344
|
+
Array
|
|
1345
|
+
] },
|
|
1346
|
+
clickGroupedRowToExpand: { type: Boolean },
|
|
1347
|
+
columns: {},
|
|
1348
|
+
components: {},
|
|
1349
|
+
dataSource: {},
|
|
1350
|
+
defaultExpandAllGroupRows: { type: Boolean },
|
|
1351
|
+
defaultExpandAllRows: { type: Boolean },
|
|
1352
|
+
defaultExpandedRowKeys: {},
|
|
1353
|
+
direction: {},
|
|
1354
|
+
empty: { type: [
|
|
1355
|
+
Object,
|
|
1356
|
+
String,
|
|
1357
|
+
Number,
|
|
1358
|
+
Boolean,
|
|
1359
|
+
null,
|
|
1360
|
+
Array
|
|
1361
|
+
] },
|
|
1362
|
+
expandAllGroupRows: { type: Boolean },
|
|
1363
|
+
expandAllRows: { type: Boolean },
|
|
1364
|
+
expandCellFixed: { type: [Boolean, String] },
|
|
1365
|
+
expandIcon: { type: [
|
|
1366
|
+
Boolean,
|
|
1367
|
+
Object,
|
|
1368
|
+
String,
|
|
1369
|
+
Number,
|
|
1370
|
+
null,
|
|
1371
|
+
Array,
|
|
1372
|
+
Function
|
|
1373
|
+
] },
|
|
1374
|
+
expandedRowKeys: {},
|
|
1375
|
+
expandedRowRender: { type: Function },
|
|
1376
|
+
expandRowByClick: { type: Boolean },
|
|
1377
|
+
footer: { type: [
|
|
1378
|
+
Object,
|
|
1379
|
+
String,
|
|
1380
|
+
Number,
|
|
1381
|
+
Boolean,
|
|
1382
|
+
null,
|
|
1383
|
+
Array,
|
|
1384
|
+
Function
|
|
1385
|
+
] },
|
|
1386
|
+
getVirtualizedListRef: { type: Function },
|
|
1387
|
+
groupBy: { type: [String, Function] },
|
|
1388
|
+
headerStyle: { type: [
|
|
1389
|
+
Boolean,
|
|
1390
|
+
null,
|
|
1391
|
+
String,
|
|
1392
|
+
Object,
|
|
1393
|
+
Array
|
|
1394
|
+
] },
|
|
1395
|
+
hideExpandedColumn: { type: Boolean },
|
|
1396
|
+
id: {},
|
|
1397
|
+
indentSize: {},
|
|
1398
|
+
keepDOM: { type: Boolean },
|
|
1399
|
+
loading: { type: Boolean },
|
|
1400
|
+
onChange: { type: Function },
|
|
1401
|
+
onExpand: { type: Function },
|
|
1402
|
+
onExpandedRowsChange: { type: Function },
|
|
1403
|
+
onGroupedRow: { type: Function },
|
|
1404
|
+
onHeaderRow: { type: Function },
|
|
1405
|
+
onRow: { type: Function },
|
|
1406
|
+
pagination: { type: [Boolean, Object] },
|
|
1407
|
+
prefixCls: {},
|
|
1408
|
+
renderGroupSection: { type: Function },
|
|
1409
|
+
renderPagination: { type: Function },
|
|
1410
|
+
resizable: { type: [Boolean, Object] },
|
|
1411
|
+
rowExpandable: { type: Function },
|
|
1412
|
+
rowKey: { type: [
|
|
1413
|
+
String,
|
|
1414
|
+
Number,
|
|
1415
|
+
Function
|
|
1416
|
+
] },
|
|
1417
|
+
rowSelection: { type: [Boolean, Object] },
|
|
1418
|
+
rowSpanHover: { type: Boolean },
|
|
1419
|
+
scroll: {},
|
|
1420
|
+
showHeader: { type: Boolean },
|
|
1421
|
+
size: {},
|
|
1422
|
+
sticky: { type: [Boolean, Object] },
|
|
1423
|
+
style: { type: [
|
|
1424
|
+
Boolean,
|
|
1425
|
+
null,
|
|
1426
|
+
String,
|
|
1427
|
+
Object,
|
|
1428
|
+
Array
|
|
1429
|
+
] },
|
|
1430
|
+
title: { type: [
|
|
1431
|
+
Object,
|
|
1432
|
+
String,
|
|
1433
|
+
Number,
|
|
1434
|
+
Boolean,
|
|
1435
|
+
null,
|
|
1436
|
+
Array,
|
|
1437
|
+
Function
|
|
1438
|
+
] },
|
|
1439
|
+
virtualized: { type: [Boolean, Object] }
|
|
1440
|
+
},
|
|
1441
|
+
emits: [
|
|
1442
|
+
"change",
|
|
1443
|
+
"expand",
|
|
1444
|
+
"expandedRowsChange",
|
|
1445
|
+
"pageChange",
|
|
1446
|
+
"select",
|
|
1447
|
+
"selectAll",
|
|
1448
|
+
"selectChange"
|
|
1449
|
+
],
|
|
1450
|
+
setup(e, { expose: t, emit: n }) {
|
|
1451
|
+
let r = e, i = n, a = P(), s = se(), d = S(), f = te(c, void 0), m = ce("body"), ee = ce("header"), x = ce("wrapper"), C = M(/* @__PURE__ */ new Map()), k = M(/* @__PURE__ */ new Map()), A = M(/* @__PURE__ */ new Set()), ae = M(/* @__PURE__ */ new Set()), oe = M(/* @__PURE__ */ new Map()), I = M(1), ue = M(W.DEFAULT_PAGE_SIZE), de = M(0), L = M("both"), me;
|
|
1452
|
+
function he(e) {
|
|
1453
|
+
let t = d?.vnode.props, n = String(e).replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
|
|
1454
|
+
return !!(t && (Object.prototype.hasOwnProperty.call(t, e) || Object.prototype.hasOwnProperty.call(t, n)));
|
|
1455
|
+
}
|
|
1456
|
+
function R(e, t) {
|
|
1457
|
+
if (he(e) && r[e] !== void 0) return r[e];
|
|
1458
|
+
let n = l.config.overrideDefaultProps?.Table?.[e];
|
|
1459
|
+
return n === void 0 ? t : n;
|
|
1460
|
+
}
|
|
1461
|
+
let z = h(() => R("prefixCls", fe.PREFIX)), B = h(() => r.direction ?? f?.value.direction ?? "ltr"), ge = h(() => R("dataSource", [])), V = h(() => R("childrenRecordName", "children")), _e = h(() => R("rowKey", "key")), ve = h(() => R("hideExpandedColumn", !0)), ye = h(() => R("showHeader", !0)), be = h(() => R("indentSize", W.DEFAULT_INDENT_WIDTH)), H = h(() => R("pagination", !0)), U = h(() => {
|
|
1462
|
+
let e = r.rowSelection;
|
|
1463
|
+
return e ? e === !0 ? {} : e : !1;
|
|
1464
|
+
}), xe = h(() => {
|
|
1465
|
+
let e = f?.value.locale ?? u;
|
|
1466
|
+
return e.Table ?? {
|
|
1467
|
+
confirmFilter: e.code === "en-US" ? "OK" : "确定",
|
|
1468
|
+
emptyText: e.code === "en-US" ? "No Result" : "暂无数据",
|
|
1469
|
+
pageText: e.code === "en-US" ? "Showing ${currentStart} to ${currentEnd} of ${total}" : "显示第 ${currentStart} 条-第 ${currentEnd} 条,共 ${total} 条",
|
|
1470
|
+
resetFilter: e.code === "en-US" ? "Reset" : "重置"
|
|
1471
|
+
};
|
|
1472
|
+
}), K = h(() => {
|
|
1473
|
+
let e = ke(r.columns);
|
|
1474
|
+
return e.length ? e : De(s.default?.());
|
|
1475
|
+
});
|
|
1476
|
+
function Ce() {
|
|
1477
|
+
let e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map();
|
|
1478
|
+
q(K.value).forEach((n) => {
|
|
1479
|
+
n.defaultSortOrder && e.set(n.key, n.defaultSortOrder), n.defaultFilteredValue?.length && t.set(n.key, [...n.defaultFilteredValue]);
|
|
1480
|
+
}), C.value = e, k.value = t;
|
|
1481
|
+
}
|
|
1482
|
+
function Te(e = ge.value) {
|
|
1483
|
+
let t = [], n = (e) => {
|
|
1484
|
+
e.forEach((e, r) => {
|
|
1485
|
+
t.push(we(e, _e.value, t.length + r));
|
|
1486
|
+
let i = e[V.value];
|
|
1487
|
+
Array.isArray(i) && n(i);
|
|
1488
|
+
});
|
|
1489
|
+
};
|
|
1490
|
+
return n(e), t;
|
|
1491
|
+
}
|
|
1492
|
+
function Ee(e) {
|
|
1493
|
+
if (!r.groupBy) return;
|
|
1494
|
+
let t = typeof r.groupBy == "function" ? r.groupBy(e) : e[r.groupBy];
|
|
1495
|
+
return typeof t == "string" || typeof t == "number" ? t : void 0;
|
|
1496
|
+
}
|
|
1497
|
+
function Ae(e = ge.value) {
|
|
1498
|
+
return [...new Set(e.map(Ee).filter((e) => e !== void 0))];
|
|
1499
|
+
}
|
|
1500
|
+
function Pe() {
|
|
1501
|
+
let e = new Set(r.defaultExpandedRowKeys ?? []);
|
|
1502
|
+
(r.defaultExpandAllRows || r.expandAllRows) && Te().forEach((t) => e.add(t)), (r.defaultExpandAllRows || r.expandAllRows || r.defaultExpandAllGroupRows || r.expandAllGroupRows) && Ae().forEach((t) => e.add(t)), A.value = e;
|
|
1503
|
+
}
|
|
1504
|
+
function Ie() {
|
|
1505
|
+
let e = U.value;
|
|
1506
|
+
ae.value = new Set(e && (e.selectedRowKeys ?? e.defaultSelectedRowKeys) || []);
|
|
1507
|
+
}
|
|
1508
|
+
Ce(), Pe(), Ie();
|
|
1509
|
+
let J = h(() => {
|
|
1510
|
+
let e = new Map(C.value);
|
|
1511
|
+
return q(K.value).forEach((t) => {
|
|
1512
|
+
Object.prototype.hasOwnProperty.call(t, "sortOrder") && e.set(t.key, t.sortOrder ?? !1);
|
|
1513
|
+
}), e;
|
|
1514
|
+
}), ze = h(() => {
|
|
1515
|
+
let e = new Map(k.value);
|
|
1516
|
+
return q(K.value).forEach((t) => {
|
|
1517
|
+
Object.prototype.hasOwnProperty.call(t, "filteredValue") && e.set(t.key, t.filteredValue ?? []);
|
|
1518
|
+
}), e;
|
|
1519
|
+
}), Be = h(() => Array.isArray(r.expandedRowKeys) ? new Set(r.expandedRowKeys) : A.value), Ve = h(() => {
|
|
1520
|
+
let e = U.value && U.value.selectedRowKeys;
|
|
1521
|
+
return Array.isArray(e) ? new Set(e) : ae.value;
|
|
1522
|
+
}), He = h(() => {
|
|
1523
|
+
let e = K.value.map((e, t) => Oe(e, t));
|
|
1524
|
+
if (!ve.value) {
|
|
1525
|
+
let t = Oe({
|
|
1526
|
+
className: `${z.value}-column-expand`,
|
|
1527
|
+
...r.expandCellFixed === void 0 ? {} : { fixed: r.expandCellFixed },
|
|
1528
|
+
key: "column-expand",
|
|
1529
|
+
__kind: "expand",
|
|
1530
|
+
...r.resizable ? { width: W.DEFAULT_WIDTH_COLUMN_EXPAND } : {}
|
|
1531
|
+
}, 0);
|
|
1532
|
+
e = t.fixed === "right" ? [...e, t] : [t, ...e];
|
|
1533
|
+
}
|
|
1534
|
+
if (U.value && !U.value.hidden) {
|
|
1535
|
+
let t = Oe({
|
|
1536
|
+
className: [`${z.value}-column-selection`, U.value.className].filter(Boolean).join(" "),
|
|
1537
|
+
...U.value.fixed === void 0 ? {} : { fixed: U.value.fixed },
|
|
1538
|
+
key: U.value.key ?? pe.DEFAULT_KEY_COLUMN_SELECTION,
|
|
1539
|
+
__kind: "selection",
|
|
1540
|
+
...U.value.onCell === void 0 ? {} : { onCell: U.value.onCell },
|
|
1541
|
+
...U.value.onHeaderCell === void 0 ? {} : { onHeaderCell: U.value.onHeaderCell },
|
|
1542
|
+
...U.value.title === void 0 ? {} : { title: U.value.title },
|
|
1543
|
+
...U.value.width === void 0 && !r.resizable ? {} : { width: U.value.width ?? W.DEFAULT_WIDTH_COLUMN_SELECTION }
|
|
1544
|
+
}, 0);
|
|
1545
|
+
e = t.fixed === "right" ? [...e, t] : [t, ...e];
|
|
1546
|
+
}
|
|
1547
|
+
return e.map((e) => {
|
|
1548
|
+
let t = oe.value.get(e.key) ?? e.width;
|
|
1549
|
+
return {
|
|
1550
|
+
...e,
|
|
1551
|
+
...t === void 0 ? {} : { __width: t }
|
|
1552
|
+
};
|
|
1553
|
+
});
|
|
1554
|
+
}), Y = h(() => q(He.value)), Ge = h(() => je(He.value)), Ke = h(() => Ne(Y.value)), qe = h(() => Y.value.some((e) => !!e.fixed));
|
|
1555
|
+
function Je(e) {
|
|
1556
|
+
return q(K.value).reduce((e, t) => {
|
|
1557
|
+
let n = ze.value.get(t.key) ?? [];
|
|
1558
|
+
if (!n.length || !t.onFilter) return e;
|
|
1559
|
+
let r = (e) => e.flatMap((e) => {
|
|
1560
|
+
let i = e[V.value], a = t.filterChildrenRecord && Array.isArray(i) ? r(i) : [];
|
|
1561
|
+
return a.length ? [{
|
|
1562
|
+
...e,
|
|
1563
|
+
[V.value]: a
|
|
1564
|
+
}] : n.some((n) => t.onFilter?.(n, e)) ? [e] : [];
|
|
1565
|
+
});
|
|
1566
|
+
return r(e);
|
|
1567
|
+
}, e);
|
|
1568
|
+
}
|
|
1569
|
+
function Ye(e) {
|
|
1570
|
+
let t = q(K.value).find((e) => e.sorter && J.value.get(e.key)), n = [...e];
|
|
1571
|
+
if (t && typeof t.sorter == "function") {
|
|
1572
|
+
let e = J.value.get(t.key) === "descend" ? -1 : 1, r = t.sorter;
|
|
1573
|
+
n.sort((t, n) => r(t, n) * e);
|
|
1574
|
+
}
|
|
1575
|
+
return n.map((e) => {
|
|
1576
|
+
let n = e[V.value];
|
|
1577
|
+
return Array.isArray(n) && t?.sortChildrenRecord !== !1 ? {
|
|
1578
|
+
...e,
|
|
1579
|
+
[V.value]: Ye(n)
|
|
1580
|
+
} : e;
|
|
1581
|
+
});
|
|
1582
|
+
}
|
|
1583
|
+
let Xe = h(() => Ye(Je(ge.value))), X = h(() => {
|
|
1584
|
+
if (H.value === !1) return !1;
|
|
1585
|
+
let e = H.value === !0 ? {} : H.value;
|
|
1586
|
+
return {
|
|
1587
|
+
...e,
|
|
1588
|
+
currentPage: e.currentPage ?? I.value,
|
|
1589
|
+
pageSize: e.pageSize ?? ue.value,
|
|
1590
|
+
total: e.total ?? Xe.value.length
|
|
1591
|
+
};
|
|
1592
|
+
}), Z = h(() => {
|
|
1593
|
+
let e = X.value;
|
|
1594
|
+
if (!e) return Xe.value;
|
|
1595
|
+
let t = e.currentPage ?? 1, n = e.pageSize ?? W.DEFAULT_PAGE_SIZE;
|
|
1596
|
+
return Xe.value.slice((t - 1) * n, t * n);
|
|
1597
|
+
}), Ze = h(() => {
|
|
1598
|
+
let e = {
|
|
1599
|
+
childrenRecordName: V.value,
|
|
1600
|
+
expandedKeys: Be.value,
|
|
1601
|
+
rowKey: _e.value
|
|
1602
|
+
};
|
|
1603
|
+
if (!r.groupBy) return Me(Z.value, e);
|
|
1604
|
+
let t = /* @__PURE__ */ new Map();
|
|
1605
|
+
Z.value.forEach((e) => {
|
|
1606
|
+
let n = Ee(e);
|
|
1607
|
+
if (n === void 0) return;
|
|
1608
|
+
let r = t.get(n) ?? [];
|
|
1609
|
+
r.push(e), t.set(n, r);
|
|
1610
|
+
});
|
|
1611
|
+
let n = [], i = { value: 0 };
|
|
1612
|
+
return t.forEach((t, r) => {
|
|
1613
|
+
n.push({
|
|
1614
|
+
group: t,
|
|
1615
|
+
groupKey: r,
|
|
1616
|
+
index: i.value,
|
|
1617
|
+
key: r,
|
|
1618
|
+
level: 0,
|
|
1619
|
+
record: t[0] ?? {},
|
|
1620
|
+
sectionRow: !0
|
|
1621
|
+
}), Be.value.has(r) && n.push(...Me(t, e, 1, r, i));
|
|
1622
|
+
}), n;
|
|
1623
|
+
}), Q = h(() => {
|
|
1624
|
+
let e = /* @__PURE__ */ new Map(), t = 0, n = (r, i = 0, a) => r.map((r) => {
|
|
1625
|
+
let o = we(r, _e.value, t), s = {
|
|
1626
|
+
index: t,
|
|
1627
|
+
key: o,
|
|
1628
|
+
level: i,
|
|
1629
|
+
parentKey: a,
|
|
1630
|
+
record: r
|
|
1631
|
+
};
|
|
1632
|
+
t += 1;
|
|
1633
|
+
let c = r[V.value], l = Array.isArray(c) ? c : [];
|
|
1634
|
+
e.set(o, {
|
|
1635
|
+
childKeys: [],
|
|
1636
|
+
key: o,
|
|
1637
|
+
...a === void 0 ? {} : { parentKey: a },
|
|
1638
|
+
record: r,
|
|
1639
|
+
row: s
|
|
1640
|
+
});
|
|
1641
|
+
let u = l.length ? n(l, i + 1, o) : [];
|
|
1642
|
+
return e.set(o, {
|
|
1643
|
+
childKeys: u,
|
|
1644
|
+
key: o,
|
|
1645
|
+
...a === void 0 ? {} : { parentKey: a },
|
|
1646
|
+
record: r,
|
|
1647
|
+
row: s
|
|
1648
|
+
}), o;
|
|
1649
|
+
});
|
|
1650
|
+
return n(Z.value), e;
|
|
1651
|
+
});
|
|
1652
|
+
function Qe(e) {
|
|
1653
|
+
let t = U.value;
|
|
1654
|
+
return !!(t && (t.disabled || t.getCheckboxProps?.(e.record).disabled));
|
|
1655
|
+
}
|
|
1656
|
+
let $e = h(() => {
|
|
1657
|
+
let e = /* @__PURE__ */ new Set();
|
|
1658
|
+
if (!U.value || U.value.checkRelation !== "related") return e;
|
|
1659
|
+
let t = (n) => {
|
|
1660
|
+
let r = Q.value.get(n);
|
|
1661
|
+
if (!r) return {
|
|
1662
|
+
all: !1,
|
|
1663
|
+
any: !1
|
|
1664
|
+
};
|
|
1665
|
+
let i = r.childKeys.map(t), a = Ve.value.has(n), o = a || i.some((e) => e.any), s = a && i.every((e) => e.all);
|
|
1666
|
+
return o && !s && e.add(n), {
|
|
1667
|
+
all: s,
|
|
1668
|
+
any: o
|
|
1669
|
+
};
|
|
1670
|
+
};
|
|
1671
|
+
return Q.value.forEach((e) => {
|
|
1672
|
+
e.parentKey === void 0 && t(e.key);
|
|
1673
|
+
}), e;
|
|
1674
|
+
});
|
|
1675
|
+
function et(e) {
|
|
1676
|
+
let t = r.virtualized, n = typeof t == "object" ? t.itemSize : void 0;
|
|
1677
|
+
return typeof n == "function" ? n(e, {}) || 53 : typeof n == "number" ? n : r.size === "small" ? W.DEFAULT_VIRTUALIZED_ROW_SMALL_HEIGHT : r.size === "middle" ? W.DEFAULT_VIRTUALIZED_ROW_MIDDLE_HEIGHT : W.DEFAULT_VIRTUALIZED_ROW_HEIGHT;
|
|
1678
|
+
}
|
|
1679
|
+
let tt = h(() => {
|
|
1680
|
+
if (!r.virtualized || !r.scroll?.y) return {
|
|
1681
|
+
bottom: 0,
|
|
1682
|
+
rows: Ze.value,
|
|
1683
|
+
top: 0
|
|
1684
|
+
};
|
|
1685
|
+
let e = typeof r.scroll.y == "number" ? r.scroll.y : W.DEFAULT_VIRTUALIZED_BODY_HEIGHT, t = et(0), n = Math.max(0, Math.floor(de.value / t) - 2), i = Math.ceil(e / t) + 4, a = Math.min(Ze.value.length, n + i), o = Ze.value.slice(0, n).reduce((e, t, n) => e + et(n), 0);
|
|
1686
|
+
return {
|
|
1687
|
+
bottom: Ze.value.slice(a).reduce((e, t, n) => e + et(a + n), 0),
|
|
1688
|
+
rows: Ze.value.slice(n, a),
|
|
1689
|
+
top: o
|
|
1690
|
+
};
|
|
1691
|
+
}), nt = h(() => [...Q.value.values()].filter((e) => !Qe(e)).map((e) => e.row)), rt = h(() => nt.value.filter((e) => Ve.value.has(e.key)).length);
|
|
1692
|
+
function it(e) {
|
|
1693
|
+
let t = q(K.value), n = t.find((e) => J.value.get(e.key)), r = t.filter((e) => e.filters || e.onFilter).map((e) => ({
|
|
1694
|
+
...e.dataIndex === void 0 ? {} : { dataIndex: e.dataIndex },
|
|
1695
|
+
filteredValue: ze.value.get(e.key) ?? [],
|
|
1696
|
+
...e.filters === void 0 ? {} : { filters: e.filters },
|
|
1697
|
+
...e.onFilter === void 0 ? {} : { onFilter: e.onFilter }
|
|
1698
|
+
})), i = n ? J.value.get(n.key) : void 0, a = n ? {
|
|
1699
|
+
...n.dataIndex === void 0 ? {} : { dataIndex: n.dataIndex },
|
|
1700
|
+
...n.sorter === void 0 ? {} : { sorter: n.sorter },
|
|
1701
|
+
...i === void 0 ? {} : { sortOrder: i }
|
|
1702
|
+
} : void 0;
|
|
1703
|
+
return {
|
|
1704
|
+
extra: { changeType: e },
|
|
1705
|
+
filters: r,
|
|
1706
|
+
...X.value ? { pagination: X.value } : {},
|
|
1707
|
+
...a ? { sorter: a } : {}
|
|
1708
|
+
};
|
|
1709
|
+
}
|
|
1710
|
+
function at(e) {
|
|
1711
|
+
let t = it(e);
|
|
1712
|
+
r.onChange?.(t), i("change", t);
|
|
1713
|
+
}
|
|
1714
|
+
function ot(e, t) {
|
|
1715
|
+
let n = J.value.get(e.key) || !1, r = n === !1 ? "ascend" : n === "ascend" && "descend";
|
|
1716
|
+
Object.prototype.hasOwnProperty.call(e, "sortOrder") || (C.value = new Map(r ? [[e.key, r]] : [])), I.value = 1, at("sorter"), ht(), t.stopPropagation?.();
|
|
1717
|
+
}
|
|
1718
|
+
function st(e, t) {
|
|
1719
|
+
if (!Object.prototype.hasOwnProperty.call(e, "filteredValue")) {
|
|
1720
|
+
let n = new Map(k.value);
|
|
1721
|
+
n.set(e.key, t), k.value = n;
|
|
1722
|
+
}
|
|
1723
|
+
I.value = 1, at("filter"), ht();
|
|
1724
|
+
}
|
|
1725
|
+
function ct(e, t, n, r) {
|
|
1726
|
+
U.value && !Array.isArray(U.value.selectedRowKeys) && (ae.value = e);
|
|
1727
|
+
let a = [...Q.value.values()].filter((t) => e.has(t.key)).map((e) => e.record), o = [...e];
|
|
1728
|
+
t && n !== void 0 && (U.value && U.value.onSelect?.(t.record, n, a, r), i("select", t.record, n, a, r)), U.value && U.value.onChange?.(o, a), i("selectChange", o, a);
|
|
1729
|
+
}
|
|
1730
|
+
function lt(e, t, n) {
|
|
1731
|
+
n.stopPropagation?.();
|
|
1732
|
+
let r = U.value && U.value.type === "radio" ? new Set(t ? [e.key] : []) : new Set(Ve.value);
|
|
1733
|
+
if (t ? r.add(e.key) : r.delete(e.key), U.value && U.value.checkRelation === "related") {
|
|
1734
|
+
let n = (e) => {
|
|
1735
|
+
let i = Q.value.get(e);
|
|
1736
|
+
i && (Qe(i) || (t ? r.add(e) : r.delete(e)), i.childKeys.forEach(n));
|
|
1737
|
+
};
|
|
1738
|
+
n(e.key);
|
|
1739
|
+
let i = Q.value.get(e.key)?.parentKey;
|
|
1740
|
+
for (; i !== void 0;) {
|
|
1741
|
+
let e = Q.value.get(i);
|
|
1742
|
+
if (!e) break;
|
|
1743
|
+
let t = e.childKeys.filter((e) => {
|
|
1744
|
+
let t = Q.value.get(e);
|
|
1745
|
+
return t && !Qe(t);
|
|
1746
|
+
});
|
|
1747
|
+
!Qe(e) && t.length > 0 && t.every((e) => r.has(e)) ? r.add(e.key) : r.delete(e.key), i = e.parentKey;
|
|
1748
|
+
}
|
|
1749
|
+
}
|
|
1750
|
+
ct(r, e, t, n);
|
|
1751
|
+
}
|
|
1752
|
+
function ut(e, t) {
|
|
1753
|
+
t.stopPropagation?.();
|
|
1754
|
+
let n = new Set(Ve.value), r = [];
|
|
1755
|
+
nt.value.forEach((t) => {
|
|
1756
|
+
let i = n.has(t.key);
|
|
1757
|
+
e ? n.add(t.key) : n.delete(t.key), i !== e && r.push(t.record);
|
|
1758
|
+
});
|
|
1759
|
+
let a = [...Q.value.values()].filter((e) => n.has(e.key)).map((e) => e.record);
|
|
1760
|
+
U.value && U.value.onSelectAll?.(e, a, r), i("selectAll", e, a, r), ct(n);
|
|
1761
|
+
}
|
|
1762
|
+
function dt(e, t) {
|
|
1763
|
+
let n = !Be.value.has(e.key), a = new Set(Be.value);
|
|
1764
|
+
n ? a.add(e.key) : a.delete(e.key), Array.isArray(r.expandedRowKeys) || (A.value = a), r.onExpand?.(n, e.record, t), i("expand", n, e.record, t);
|
|
1765
|
+
let o = pt().filter((e) => a.has(we(e, _e.value)));
|
|
1766
|
+
r.onExpandedRowsChange?.(o), i("expandedRowsChange", o);
|
|
1767
|
+
}
|
|
1768
|
+
function ft(e, t) {
|
|
1769
|
+
let n = new Set(Be.value);
|
|
1770
|
+
n.has(e) ? n.delete(e) : n.add(e), Array.isArray(r.expandedRowKeys) || (A.value = n), t.stopPropagation?.();
|
|
1771
|
+
}
|
|
1772
|
+
function pt(e = ge.value) {
|
|
1773
|
+
return e.flatMap((e) => {
|
|
1774
|
+
let t = e[V.value];
|
|
1775
|
+
return [e, ...Array.isArray(t) ? pt(t) : []];
|
|
1776
|
+
});
|
|
1777
|
+
}
|
|
1778
|
+
function mt(e, t) {
|
|
1779
|
+
let n = H.value === !0 ? {} : H.value || {};
|
|
1780
|
+
n.currentPage === void 0 && (I.value = e), n.pageSize === void 0 && (ue.value = t), n.onChange?.(e, t), i("pageChange", e, t), at("pagination"), r.scroll?.scrollToFirstRowOnChange && ht();
|
|
1781
|
+
}
|
|
1782
|
+
function ht() {
|
|
1783
|
+
ne(() => {
|
|
1784
|
+
r.scroll?.y && m.value ? m.value.scrollTop = 0 : r.scroll?.scrollToFirstRowOnChange && x.value?.scrollIntoView({
|
|
1785
|
+
behavior: "smooth",
|
|
1786
|
+
block: "start"
|
|
1787
|
+
});
|
|
1788
|
+
});
|
|
1789
|
+
}
|
|
1790
|
+
function gt(e = m.value) {
|
|
1791
|
+
if (!e) return;
|
|
1792
|
+
let t = Math.max(0, e.scrollWidth - e.clientWidth);
|
|
1793
|
+
t <= 1 ? L.value = "both" : e.scrollLeft <= 1 ? L.value = B.value === "rtl" ? "right" : "left" : e.scrollLeft >= t - 1 ? L.value = B.value === "rtl" ? "left" : "right" : L.value = "middle";
|
|
1794
|
+
}
|
|
1795
|
+
function _t(e) {
|
|
1796
|
+
let t = e.currentTarget, n = de.value;
|
|
1797
|
+
de.value = t.scrollTop, ee.value && (ee.value.scrollLeft = t.scrollLeft), gt(t), r.virtualized && typeof r.virtualized == "object" && r.virtualized.onScroll?.({
|
|
1798
|
+
scrollDirection: t.scrollTop >= n ? "forward" : "backward",
|
|
1799
|
+
scrollOffset: t.scrollTop,
|
|
1800
|
+
scrollUpdateWasRequested: !1
|
|
1801
|
+
});
|
|
1802
|
+
}
|
|
1803
|
+
function vt(e, t, n) {
|
|
1804
|
+
let i = new Map(oe.value);
|
|
1805
|
+
if (i.set(e.key, t), oe.value = i, !r.resizable || r.resizable === !0) return;
|
|
1806
|
+
let a = {
|
|
1807
|
+
...e,
|
|
1808
|
+
width: t
|
|
1809
|
+
};
|
|
1810
|
+
n === "start" ? r.resizable.onResizeStart?.(a) : n === "move" ? r.resizable.onResize?.(a) : r.resizable.onResizeStop?.(a);
|
|
1811
|
+
}
|
|
1812
|
+
let yt = h(() => ({
|
|
1813
|
+
maxHeight: Se(r.scroll?.y),
|
|
1814
|
+
overflowX: r.scroll?.x ? "auto" : void 0,
|
|
1815
|
+
overflowY: r.scroll?.y ? "auto" : void 0
|
|
1816
|
+
})), bt = h(() => ({
|
|
1817
|
+
minWidth: Se(r.scroll?.x),
|
|
1818
|
+
width: Se(r.scroll?.x),
|
|
1819
|
+
tableLayout: qe.value || r.scroll?.y || Y.value.some((e) => e.ellipsis) ? "fixed" : void 0
|
|
1820
|
+
})), xt = h(() => Object.fromEntries(Object.entries(a).filter(([e]) => e.startsWith("data-")))), St = h(() => [
|
|
1821
|
+
`${z.value}-wrapper`,
|
|
1822
|
+
`${z.value}-wrapper-${B.value}`,
|
|
1823
|
+
r.className,
|
|
1824
|
+
r.class,
|
|
1825
|
+
a.class
|
|
1826
|
+
]), Ct = h(() => [
|
|
1827
|
+
r.size === "small" ? `${z.value}-small` : void 0,
|
|
1828
|
+
r.size === "middle" ? `${z.value}-middle` : void 0,
|
|
1829
|
+
r.virtualized ? `${z.value}-virtualized` : void 0,
|
|
1830
|
+
r.bordered ? `${z.value}-bordered` : void 0,
|
|
1831
|
+
r.scroll?.y ? `${z.value}-fixed-header` : void 0,
|
|
1832
|
+
["both", "left"].includes(L.value) ? `${z.value}-scroll-position-left` : void 0,
|
|
1833
|
+
["both", "right"].includes(L.value) ? `${z.value}-scroll-position-right` : void 0
|
|
1834
|
+
]), wt = h(() => s.title?.({ pageData: Z.value }) ?? (he("title") ? typeof r.title == "function" ? r.title(Z.value) : r.title : void 0)), Tt = h(() => s.footer?.({ pageData: Z.value }) ?? (he("footer") ? typeof r.footer == "function" ? r.footer(Z.value) : r.footer : void 0)), Et = h(() => s.empty?.() ?? (he("empty") ? r.empty : xe.value.emptyText)), Dt = h(() => {
|
|
1835
|
+
let e = X.value;
|
|
1836
|
+
if (!e) return "";
|
|
1837
|
+
let t = e.total ?? 0, n = t ? ((e.currentPage ?? 1) - 1) * (e.pageSize ?? W.DEFAULT_PAGE_SIZE) + 1 : 0, r = Math.min(t, (e.currentPage ?? 1) * (e.pageSize ?? W.DEFAULT_PAGE_SIZE));
|
|
1838
|
+
return typeof e.formatPageText == "function" ? e.formatPageText({
|
|
1839
|
+
currentEnd: r,
|
|
1840
|
+
currentStart: n,
|
|
1841
|
+
total: t
|
|
1842
|
+
}) : e.formatPageText === !1 ? "" : (xe.value.pageText ?? "").replace("${currentStart}", String(n)).replace("${currentEnd}", String(r)).replace("${total}", String(t));
|
|
1843
|
+
}), Ot = h(() => X.value ? X.value.position ?? "bottom" : "bottom");
|
|
1844
|
+
function kt(e) {
|
|
1845
|
+
return s.headerCell?.({ column: e.column });
|
|
1846
|
+
}
|
|
1847
|
+
function At(e) {
|
|
1848
|
+
return s.cell?.(e);
|
|
1849
|
+
}
|
|
1850
|
+
function jt(e) {
|
|
1851
|
+
return s.expandedRow?.(e);
|
|
1852
|
+
}
|
|
1853
|
+
function Mt(e) {
|
|
1854
|
+
let t = s.groupSection?.(e) ?? r.renderGroupSection?.(e.groupKey, e.group) ?? e.groupKey;
|
|
1855
|
+
return t && typeof t == "object" && !("__v_isVNode" in t) && "children" in t ? t.children : t;
|
|
1856
|
+
}
|
|
1857
|
+
function $(e, t) {
|
|
1858
|
+
return r.components?.[e]?.[t] || (t === "wrapper" ? e === "header" ? "thead" : "tbody" : t === "row" ? "tr" : t === "cell" ? e === "header" ? "th" : "td" : r.components?.table ?? Re);
|
|
1859
|
+
}
|
|
1860
|
+
function Nt(e) {
|
|
1861
|
+
return r.components?.body?.colgroup?.[e] ?? (e === "wrapper" ? "colgroup" : "col");
|
|
1862
|
+
}
|
|
1863
|
+
function Pt() {
|
|
1864
|
+
return {
|
|
1865
|
+
scrollTo(e) {
|
|
1866
|
+
m.value && (m.value.scrollTop = e);
|
|
1867
|
+
},
|
|
1868
|
+
scrollToItem(e, t = "auto") {
|
|
1869
|
+
if (!m.value) return;
|
|
1870
|
+
let n = Ze.value.slice(0, e).reduce((e, t, n) => e + et(n), 0), r = et(e), i = m.value.clientHeight;
|
|
1871
|
+
m.value.scrollTop = t === "center" ? n - (i - r) / 2 : t === "end" ? n - i + r : n;
|
|
1872
|
+
}
|
|
1873
|
+
};
|
|
1874
|
+
}
|
|
1875
|
+
return t({ getCurrentPageData: () => Z.value }), le(() => U.value && U.value.selectedRowKeys, (e) => {
|
|
1876
|
+
Array.isArray(e) && (ae.value = new Set(e));
|
|
1877
|
+
}), le(() => r.expandedRowKeys, (e) => {
|
|
1878
|
+
Array.isArray(e) && (A.value = new Set(e));
|
|
1879
|
+
}), le(() => [Xe.value.length, X.value && X.value.pageSize], ([e, t]) => {
|
|
1880
|
+
let n = t || ue.value, r = Math.max(1, Math.ceil(e / n));
|
|
1881
|
+
I.value > r && (I.value = r);
|
|
1882
|
+
}), D(() => {
|
|
1883
|
+
r.getVirtualizedListRef?.({ current: Pt() }), typeof ResizeObserver < "u" && m.value && (qe.value || ye.value && r.scroll?.y) && (me = new ResizeObserver(() => gt()), me.observe(m.value)), gt();
|
|
1884
|
+
}), re(() => {
|
|
1885
|
+
me?.disconnect(), r.getVirtualizedListRef?.({ current: null });
|
|
1886
|
+
}), (e, t) => (O(), v("div", w(xt.value, {
|
|
1887
|
+
id: r.id,
|
|
1888
|
+
ref: "wrapper",
|
|
1889
|
+
class: St.value,
|
|
1890
|
+
"data-column-fixed": qe.value,
|
|
1891
|
+
style: [N(a).style, r.style]
|
|
1892
|
+
}), [b(Ue, { spinning: !!r.loading }, {
|
|
1893
|
+
default: F(() => [y("div", { class: T(Ct.value) }, [
|
|
1894
|
+
X.value && ["top", "both"].includes(Ot.value) ? (O(), v("div", {
|
|
1895
|
+
key: 0,
|
|
1896
|
+
class: T(`${z.value}-pagination-outer`)
|
|
1897
|
+
}, [N(s).pagination || r.renderPagination ? (O(), g(N(G), {
|
|
1898
|
+
key: 0,
|
|
1899
|
+
content: N(s).pagination?.({ pagination: X.value }) ?? r.renderPagination?.(X.value)
|
|
1900
|
+
}, null, 8, ["content"])) : (O(), v(p, { key: 1 }, [y("span", { class: T(`${z.value}-pagination-info`) }, [b(N(G), { content: Dt.value }, null, 8, ["content"])], 2), y("span", { class: T(`${z.value}-pagination-wrapper`) }, [b(o, w(X.value, { onChange: mt }), null, 16)], 2)], 64))], 2)) : _("", !0),
|
|
1901
|
+
wt.value == null ? _("", !0) : (O(), v("div", {
|
|
1902
|
+
key: 1,
|
|
1903
|
+
class: T(`${z.value}-title`),
|
|
1904
|
+
"x-semi-prop": "title"
|
|
1905
|
+
}, [b(N(G), { content: wt.value }, null, 8, ["content"])], 2)),
|
|
1906
|
+
y("div", { class: T(`${z.value}-container`) }, [
|
|
1907
|
+
r.scroll?.y && ye.value ? (O(), v("div", {
|
|
1908
|
+
key: 0,
|
|
1909
|
+
ref: "header",
|
|
1910
|
+
class: T([`${z.value}-header`, r.sticky ? `${z.value}-header-sticky` : void 0])
|
|
1911
|
+
}, [(O(), g(j($("header", "outer") || r.components?.table || "table"), {
|
|
1912
|
+
class: T([z.value, `${z.value}-fixed`]),
|
|
1913
|
+
style: E(bt.value),
|
|
1914
|
+
role: "table"
|
|
1915
|
+
}, {
|
|
1916
|
+
default: F(() => [y("colgroup", { class: T(`${z.value}-colgroup`) }, [(O(!0), v(p, null, ie(Y.value, (e) => (O(), v("col", {
|
|
1917
|
+
key: e.key,
|
|
1918
|
+
class: T([`${z.value}-col`, e.className]),
|
|
1919
|
+
style: E({
|
|
1920
|
+
minWidth: N(Se)(e.__width ?? e.width),
|
|
1921
|
+
width: N(Se)(e.__width ?? e.width)
|
|
1922
|
+
})
|
|
1923
|
+
}, null, 6))), 128))], 2), b(Le, {
|
|
1924
|
+
"component-cell": $("header", "cell"),
|
|
1925
|
+
"component-row": $("header", "row"),
|
|
1926
|
+
"component-wrapper": $("header", "wrapper"),
|
|
1927
|
+
"data-count": nt.value.length,
|
|
1928
|
+
direction: B.value,
|
|
1929
|
+
"filter-values": ze.value,
|
|
1930
|
+
"fixed-offsets": Ke.value,
|
|
1931
|
+
"header-style": r.headerStyle,
|
|
1932
|
+
"header-rows": Ge.value,
|
|
1933
|
+
locale: xe.value,
|
|
1934
|
+
"on-header-row": r.onHeaderRow,
|
|
1935
|
+
"prefix-cls": z.value,
|
|
1936
|
+
"render-header-cell": kt,
|
|
1937
|
+
resizable: r.resizable,
|
|
1938
|
+
"row-selection": U.value,
|
|
1939
|
+
"selected-count": rt.value,
|
|
1940
|
+
"sort-orders": J.value,
|
|
1941
|
+
sticky: r.sticky,
|
|
1942
|
+
onFilter: st,
|
|
1943
|
+
onResize: vt,
|
|
1944
|
+
onSelectAll: ut,
|
|
1945
|
+
onSort: ot
|
|
1946
|
+
}, null, 8, [
|
|
1947
|
+
"component-cell",
|
|
1948
|
+
"component-row",
|
|
1949
|
+
"component-wrapper",
|
|
1950
|
+
"data-count",
|
|
1951
|
+
"direction",
|
|
1952
|
+
"filter-values",
|
|
1953
|
+
"fixed-offsets",
|
|
1954
|
+
"header-style",
|
|
1955
|
+
"header-rows",
|
|
1956
|
+
"locale",
|
|
1957
|
+
"on-header-row",
|
|
1958
|
+
"prefix-cls",
|
|
1959
|
+
"resizable",
|
|
1960
|
+
"row-selection",
|
|
1961
|
+
"selected-count",
|
|
1962
|
+
"sort-orders",
|
|
1963
|
+
"sticky"
|
|
1964
|
+
])]),
|
|
1965
|
+
_: 1
|
|
1966
|
+
}, 8, ["class", "style"]))], 2)) : _("", !0),
|
|
1967
|
+
y("div", {
|
|
1968
|
+
ref: "body",
|
|
1969
|
+
class: T(`${z.value}-body`),
|
|
1970
|
+
style: E(yt.value),
|
|
1971
|
+
onScroll: _t
|
|
1972
|
+
}, [(O(), g(j($("body", "outer") || r.components?.table || "table"), {
|
|
1973
|
+
class: T([z.value, qe.value || r.scroll?.y || Y.value.some((e) => e.ellipsis) ? `${z.value}-fixed` : void 0]),
|
|
1974
|
+
style: E(bt.value),
|
|
1975
|
+
role: "table"
|
|
1976
|
+
}, {
|
|
1977
|
+
default: F(() => [
|
|
1978
|
+
(O(), g(j(Nt("wrapper")), { class: T(`${z.value}-colgroup`) }, {
|
|
1979
|
+
default: F(() => [(O(!0), v(p, null, ie(Y.value, (e) => (O(), g(j(Nt("col")), {
|
|
1980
|
+
key: e.key,
|
|
1981
|
+
class: T([`${z.value}-col`, e.className]),
|
|
1982
|
+
style: E({
|
|
1983
|
+
minWidth: N(Se)(e.__width ?? e.width),
|
|
1984
|
+
width: N(Se)(e.__width ?? e.width)
|
|
1985
|
+
})
|
|
1986
|
+
}, null, 8, ["class", "style"]))), 128))]),
|
|
1987
|
+
_: 1
|
|
1988
|
+
}, 8, ["class"])),
|
|
1989
|
+
!r.scroll?.y && ye.value ? (O(), g(Le, {
|
|
1990
|
+
key: 0,
|
|
1991
|
+
"component-cell": $("header", "cell"),
|
|
1992
|
+
"component-row": $("header", "row"),
|
|
1993
|
+
"component-wrapper": $("header", "wrapper"),
|
|
1994
|
+
"data-count": nt.value.length,
|
|
1995
|
+
direction: B.value,
|
|
1996
|
+
"filter-values": ze.value,
|
|
1997
|
+
"fixed-offsets": Ke.value,
|
|
1998
|
+
"header-style": r.headerStyle,
|
|
1999
|
+
"header-rows": Ge.value,
|
|
2000
|
+
locale: xe.value,
|
|
2001
|
+
"on-header-row": r.onHeaderRow,
|
|
2002
|
+
"prefix-cls": z.value,
|
|
2003
|
+
"render-header-cell": kt,
|
|
2004
|
+
resizable: r.resizable,
|
|
2005
|
+
"row-selection": U.value,
|
|
2006
|
+
"selected-count": rt.value,
|
|
2007
|
+
"sort-orders": J.value,
|
|
2008
|
+
sticky: r.sticky,
|
|
2009
|
+
onFilter: st,
|
|
2010
|
+
onResize: vt,
|
|
2011
|
+
onSelectAll: ut,
|
|
2012
|
+
onSort: ot
|
|
2013
|
+
}, null, 8, [
|
|
2014
|
+
"component-cell",
|
|
2015
|
+
"component-row",
|
|
2016
|
+
"component-wrapper",
|
|
2017
|
+
"data-count",
|
|
2018
|
+
"direction",
|
|
2019
|
+
"filter-values",
|
|
2020
|
+
"fixed-offsets",
|
|
2021
|
+
"header-style",
|
|
2022
|
+
"header-rows",
|
|
2023
|
+
"locale",
|
|
2024
|
+
"on-header-row",
|
|
2025
|
+
"prefix-cls",
|
|
2026
|
+
"resizable",
|
|
2027
|
+
"row-selection",
|
|
2028
|
+
"selected-count",
|
|
2029
|
+
"sort-orders",
|
|
2030
|
+
"sticky"
|
|
2031
|
+
])) : _("", !0),
|
|
2032
|
+
b(Fe, {
|
|
2033
|
+
columns: Y.value,
|
|
2034
|
+
"click-grouped-row-to-expand": r.clickGroupedRowToExpand,
|
|
2035
|
+
"component-cell": $("body", "cell"),
|
|
2036
|
+
"component-row": $("body", "row"),
|
|
2037
|
+
"component-wrapper": $("body", "wrapper"),
|
|
2038
|
+
direction: B.value,
|
|
2039
|
+
"expanded-keys": Be.value,
|
|
2040
|
+
"expand-icon": he("expandIcon") ? r.expandIcon : void 0,
|
|
2041
|
+
"expand-row-by-click": r.expandRowByClick,
|
|
2042
|
+
"expanded-row-render": r.expandedRowRender,
|
|
2043
|
+
"fixed-offsets": Ke.value,
|
|
2044
|
+
"half-selected-keys": $e.value,
|
|
2045
|
+
"hide-expanded-column": ve.value,
|
|
2046
|
+
"indent-size": be.value,
|
|
2047
|
+
"keep-d-o-m": r.keepDOM,
|
|
2048
|
+
"on-row": r.onRow,
|
|
2049
|
+
"on-grouped-row": r.onGroupedRow,
|
|
2050
|
+
"prefix-cls": z.value,
|
|
2051
|
+
"render-cell": At,
|
|
2052
|
+
"render-expanded-row": N(s).expandedRow ? jt : void 0,
|
|
2053
|
+
"render-group-section": Mt,
|
|
2054
|
+
"row-expandable": r.rowExpandable,
|
|
2055
|
+
"row-span-hover": r.rowSpanHover,
|
|
2056
|
+
rows: tt.value.rows,
|
|
2057
|
+
"row-selection": U.value,
|
|
2058
|
+
"selected-keys": Ve.value,
|
|
2059
|
+
"virtual-bottom": tt.value.bottom,
|
|
2060
|
+
"virtual-top": tt.value.top,
|
|
2061
|
+
onExpand: dt,
|
|
2062
|
+
onGroupExpand: ft,
|
|
2063
|
+
onSelect: lt
|
|
2064
|
+
}, null, 8, /* @__PURE__ */ "columns.click-grouped-row-to-expand.component-cell.component-row.component-wrapper.direction.expanded-keys.expand-icon.expand-row-by-click.expanded-row-render.fixed-offsets.half-selected-keys.hide-expanded-column.indent-size.keep-d-o-m.on-row.on-grouped-row.prefix-cls.render-expanded-row.row-expandable.row-span-hover.rows.row-selection.selected-keys.virtual-bottom.virtual-top".split("."))
|
|
2065
|
+
]),
|
|
2066
|
+
_: 1
|
|
2067
|
+
}, 8, ["class", "style"])), Ze.value.length === 0 ? (O(), v("div", {
|
|
2068
|
+
key: 0,
|
|
2069
|
+
class: T(`${z.value}-placeholder`)
|
|
2070
|
+
}, [y("div", {
|
|
2071
|
+
class: T(`${z.value}-empty`),
|
|
2072
|
+
"x-semi-prop": "empty"
|
|
2073
|
+
}, [b(N(G), { content: Et.value }, null, 8, ["content"])], 2)], 2)) : _("", !0)], 38),
|
|
2074
|
+
Tt.value == null ? _("", !0) : (O(), v("div", {
|
|
2075
|
+
key: 1,
|
|
2076
|
+
class: T(`${z.value}-footer`),
|
|
2077
|
+
"x-semi-prop": "footer"
|
|
2078
|
+
}, [b(N(G), { content: Tt.value }, null, 8, ["content"])], 2))
|
|
2079
|
+
], 2),
|
|
2080
|
+
X.value && ["bottom", "both"].includes(Ot.value) ? (O(), v("div", {
|
|
2081
|
+
key: 2,
|
|
2082
|
+
class: T(`${z.value}-pagination-outer`)
|
|
2083
|
+
}, [N(s).pagination || r.renderPagination ? (O(), g(N(G), {
|
|
2084
|
+
key: 0,
|
|
2085
|
+
content: N(s).pagination?.({ pagination: X.value }) ?? r.renderPagination?.(X.value)
|
|
2086
|
+
}, null, 8, ["content"])) : (O(), v(p, { key: 1 }, [y("span", { class: T(`${z.value}-pagination-info`) }, [b(N(G), { content: Dt.value }, null, 8, ["content"])], 2), y("span", { class: T(`${z.value}-pagination-wrapper`) }, [b(o, w(X.value, { onChange: mt }), null, 16)], 2)], 64))], 2)) : _("", !0)
|
|
2087
|
+
], 2)]),
|
|
2088
|
+
_: 1
|
|
2089
|
+
}, 8, ["spinning"])], 16, We));
|
|
2090
|
+
}
|
|
2091
|
+
}), Ke = pe.DEFAULT_KEY_COLUMN_SELECTION, qe = pe.DEFAULT_KEY_COLUMN_EXPAND, Je = K, Ye = Object.assign(Ge, {
|
|
2092
|
+
Column: Je,
|
|
2093
|
+
DEFAULT_KEY_COLUMN_SELECTION: Ke,
|
|
2094
|
+
DEFAULT_KEY_COLUMN_EXPAND: qe
|
|
2095
|
+
});
|
|
2096
|
+
//#endregion
|
|
2097
|
+
export { Je as i, Ke as n, Ye as r, qe as t };
|