@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,1172 @@
|
|
|
1
|
+
import "./src-DNBBthjO.js";
|
|
2
|
+
import { t as e } from "./foundation-Cawx37mp.js";
|
|
3
|
+
import { C as t, E as n, S as r, T as i, a, n as o, r as s, t as c, v as l, w as u, x as d } from "./zh-CN-CCu7YvUA.js";
|
|
4
|
+
import { a as f, i as p, n as m, r as h, t as g } from "./isBefore-BG1hiM9f.js";
|
|
5
|
+
import { t as ee } from "./Tooltip-Bq7HZwnS.js";
|
|
6
|
+
import { t as te } from "./config-context-CyynTtDb.js";
|
|
7
|
+
import { t as ne } from "./Button-RCaDTqHh.js";
|
|
8
|
+
import { Fragment as _, computed as v, createBlock as y, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createTextVNode as C, createVNode as w, defineComponent as T, inject as E, markRaw as re, mergeProps as D, nextTick as ie, normalizeClass as O, normalizeProps as k, normalizeStyle as A, onBeforeUnmount as ae, onMounted as j, openBlock as M, provide as oe, renderList as N, shallowReactive as P, shallowRef as F, toDisplayString as I, unref as L, useAttrs as se, useSlots as ce, useTemplateRef as R, watch as le, withCtx as z } from "vue";
|
|
9
|
+
import { IconClose as ue } from "@aifuxi/semi-icons-vue";
|
|
10
|
+
//#region ../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/addDays/index.js
|
|
11
|
+
function B(e, t) {
|
|
12
|
+
i(2, arguments);
|
|
13
|
+
var r = u(e), a = n(t);
|
|
14
|
+
return isNaN(a) ? /* @__PURE__ */ new Date(NaN) : (a && r.setDate(r.getDate() + a), r);
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region ../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/isWeekend/index.js
|
|
18
|
+
function de(e) {
|
|
19
|
+
i(1, arguments);
|
|
20
|
+
var t = u(e).getDay();
|
|
21
|
+
return t === 0 || t === 6;
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region ../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/addHours/index.js
|
|
25
|
+
var fe = 36e5;
|
|
26
|
+
function V(e, r) {
|
|
27
|
+
i(2, arguments);
|
|
28
|
+
var a = n(r);
|
|
29
|
+
return t(e, a * fe);
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region ../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/startOfWeek/index.js
|
|
33
|
+
function H(e, t) {
|
|
34
|
+
var a;
|
|
35
|
+
i(1, arguments);
|
|
36
|
+
var o = r(), s = n(t?.weekStartsOn ?? (t == null || (a = t.locale) == null ? void 0 : a.options?.weekStartsOn) ?? o.weekStartsOn ?? o.locale?.options?.weekStartsOn ?? 0);
|
|
37
|
+
if (!(s >= 0 && s <= 6)) throw RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
38
|
+
var c = u(e), l = c.getDay(), d = (l < s ? 7 : 0) + l - s;
|
|
39
|
+
return c.setDate(c.getDate() - d), c.setHours(0, 0, 0, 0), c;
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region ../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/differenceInCalendarDays/index.js
|
|
43
|
+
var pe = 864e5;
|
|
44
|
+
function U(e, t) {
|
|
45
|
+
i(2, arguments);
|
|
46
|
+
var n = f(e), r = f(t), a = n.getTime() - d(n), o = r.getTime() - d(r);
|
|
47
|
+
return Math.round((a - o) / pe);
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region ../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/isSameDay/index.js
|
|
51
|
+
function W(e, t) {
|
|
52
|
+
i(2, arguments);
|
|
53
|
+
var n = f(e), r = f(t);
|
|
54
|
+
return n.getTime() === r.getTime();
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region ../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/differenceInCalendarWeeks/index.js
|
|
58
|
+
var me = 6048e5;
|
|
59
|
+
function he(e, t, n) {
|
|
60
|
+
i(2, arguments);
|
|
61
|
+
var r = H(e, n), a = H(t, n), o = r.getTime() - d(r), s = a.getTime() - d(a);
|
|
62
|
+
return Math.round((o - s) / me);
|
|
63
|
+
}
|
|
64
|
+
//#endregion
|
|
65
|
+
//#region ../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/differenceInMilliseconds/index.js
|
|
66
|
+
function ge(e, t) {
|
|
67
|
+
return i(2, arguments), u(e).getTime() - u(t).getTime();
|
|
68
|
+
}
|
|
69
|
+
//#endregion
|
|
70
|
+
//#region ../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/_lib/roundingMethods/index.js
|
|
71
|
+
var _e = {
|
|
72
|
+
ceil: Math.ceil,
|
|
73
|
+
round: Math.round,
|
|
74
|
+
floor: Math.floor,
|
|
75
|
+
trunc: function(e) {
|
|
76
|
+
return e < 0 ? Math.ceil(e) : Math.floor(e);
|
|
77
|
+
}
|
|
78
|
+
}, ve = "trunc";
|
|
79
|
+
function ye(e) {
|
|
80
|
+
return e ? _e[e] : _e[ve];
|
|
81
|
+
}
|
|
82
|
+
//#endregion
|
|
83
|
+
//#region ../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/differenceInHours/index.js
|
|
84
|
+
function be(e, t, n) {
|
|
85
|
+
i(2, arguments);
|
|
86
|
+
var r = ge(e, t) / l;
|
|
87
|
+
return ye(n?.roundingMethod)(r);
|
|
88
|
+
}
|
|
89
|
+
//#endregion
|
|
90
|
+
//#region ../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/endOfDay/index.js
|
|
91
|
+
function xe(e) {
|
|
92
|
+
i(1, arguments);
|
|
93
|
+
var t = u(e);
|
|
94
|
+
return t.setHours(23, 59, 59, 999), t;
|
|
95
|
+
}
|
|
96
|
+
//#endregion
|
|
97
|
+
//#region ../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/endOfMonth/index.js
|
|
98
|
+
function Se(e) {
|
|
99
|
+
i(1, arguments);
|
|
100
|
+
var t = u(e), n = t.getMonth();
|
|
101
|
+
return t.setFullYear(t.getFullYear(), n + 1, 0), t.setHours(23, 59, 59, 999), t;
|
|
102
|
+
}
|
|
103
|
+
//#endregion
|
|
104
|
+
//#region ../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/endOfWeek/index.js
|
|
105
|
+
function Ce(e, t) {
|
|
106
|
+
var a;
|
|
107
|
+
i(1, arguments);
|
|
108
|
+
var o = r(), s = n(t?.weekStartsOn ?? (t == null || (a = t.locale) == null ? void 0 : a.options?.weekStartsOn) ?? o.weekStartsOn ?? o.locale?.options?.weekStartsOn ?? 0);
|
|
109
|
+
if (!(s >= 0 && s <= 6)) throw RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
110
|
+
var c = u(e), l = c.getDay(), d = (l < s ? -7 : 0) + 6 - (l - s);
|
|
111
|
+
return c.setDate(c.getDate() + d), c.setHours(23, 59, 59, 999), c;
|
|
112
|
+
}
|
|
113
|
+
//#endregion
|
|
114
|
+
//#region ../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/getDate/index.js
|
|
115
|
+
function we(e) {
|
|
116
|
+
return i(1, arguments), u(e).getDate();
|
|
117
|
+
}
|
|
118
|
+
//#endregion
|
|
119
|
+
//#region ../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/getDay/index.js
|
|
120
|
+
function Te(e) {
|
|
121
|
+
return i(1, arguments), u(e).getDay();
|
|
122
|
+
}
|
|
123
|
+
//#endregion
|
|
124
|
+
//#region ../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/getMinutes/index.js
|
|
125
|
+
function Ee(e) {
|
|
126
|
+
return i(1, arguments), u(e).getMinutes();
|
|
127
|
+
}
|
|
128
|
+
//#endregion
|
|
129
|
+
//#region ../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/getSeconds/index.js
|
|
130
|
+
function De(e) {
|
|
131
|
+
return i(1, arguments), u(e).getSeconds();
|
|
132
|
+
}
|
|
133
|
+
//#endregion
|
|
134
|
+
//#region ../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/getWeekOfMonth/index.js
|
|
135
|
+
function Oe(e, t) {
|
|
136
|
+
var a;
|
|
137
|
+
i(1, arguments);
|
|
138
|
+
var o = r(), s = n(t?.weekStartsOn ?? (t == null || (a = t.locale) == null ? void 0 : a.options?.weekStartsOn) ?? o.weekStartsOn ?? o.locale?.options?.weekStartsOn ?? 0);
|
|
139
|
+
if (!(s >= 0 && s <= 6)) throw RangeError("weekStartsOn must be between 0 and 6 inclusively");
|
|
140
|
+
var c = we(e);
|
|
141
|
+
if (isNaN(c)) return NaN;
|
|
142
|
+
var l = s - Te(p(e));
|
|
143
|
+
l <= 0 && (l += 7);
|
|
144
|
+
var u = c - l;
|
|
145
|
+
return Math.ceil(u / 7) + 1;
|
|
146
|
+
}
|
|
147
|
+
//#endregion
|
|
148
|
+
//#region ../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/getWeeksInMonth/index.js
|
|
149
|
+
function ke(e, t) {
|
|
150
|
+
return i(1, arguments), he(h(e), p(e), t) + 1;
|
|
151
|
+
}
|
|
152
|
+
//#endregion
|
|
153
|
+
//#region ../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/isSameWeek/index.js
|
|
154
|
+
function Ae(e, t, n) {
|
|
155
|
+
i(2, arguments);
|
|
156
|
+
var r = H(e, n), a = H(t, n);
|
|
157
|
+
return r.getTime() === a.getTime();
|
|
158
|
+
}
|
|
159
|
+
//#endregion
|
|
160
|
+
//#region ../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/esm/isSameMonth/index.js
|
|
161
|
+
function G(e, t) {
|
|
162
|
+
i(2, arguments);
|
|
163
|
+
var n = u(e), r = u(t);
|
|
164
|
+
return n.getFullYear() === r.getFullYear() && n.getMonth() === r.getMonth();
|
|
165
|
+
}
|
|
166
|
+
//#endregion
|
|
167
|
+
//#region bundled-foundation
|
|
168
|
+
var K = (e, t, n, r, i = !1) => {
|
|
169
|
+
let a = { ...e };
|
|
170
|
+
return a.date = t, n && (a.start = n), r && (a.end = r), a.allDay = i, a;
|
|
171
|
+
}, je = (e, t, n) => {
|
|
172
|
+
let r = u(e), i = u(t), a = u(n);
|
|
173
|
+
return r.getTime() < a.getTime() && r.getTime() >= i.getTime();
|
|
174
|
+
}, q = (e, t) => g(new Date(e), new Date(t)) ? -1 : 1, Me = (e) => de(e), J = () => /* @__PURE__ */ new Date(), Y = (e) => Math.round(e * 1e3) / 1e3, X = (e) => ((o(e) * 60 + Ee(e)) * 60 + De(e)) / 86400, Ne = (e) => "allDay" in e && e.allDay, Pe = (e) => {
|
|
175
|
+
let { start: t, end: n } = e;
|
|
176
|
+
if (!(!t && !n)) return t ? e.end = W(t, V(t, 1)) ? V(t, 1) : xe(t) : e.start = W(n, V(n, -1)) ? V(n, -1) : f(n), e;
|
|
177
|
+
}, Fe = (e) => {
|
|
178
|
+
let t = e.map((e) => e.topInd);
|
|
179
|
+
return t.length ? Math.max(...t) + 1 : 1;
|
|
180
|
+
}, Ie = (e, t, n, r, i, a) => {
|
|
181
|
+
let o = J(), c = [];
|
|
182
|
+
return [...Array(n).keys()].map((n) => {
|
|
183
|
+
let l = {}, u = B(t, n);
|
|
184
|
+
l.ind = n, l.date = u, l.dayString = s(u, "d", {
|
|
185
|
+
locale: i,
|
|
186
|
+
weekStartsOn: a
|
|
187
|
+
}), l.weekday = s(u, "EEE", {
|
|
188
|
+
locale: i,
|
|
189
|
+
weekStartsOn: a
|
|
190
|
+
}), l.isToday = W(u, o), l.isWeekend = Me(u), r === "month" && (l.isSameMonth = G(e, u), l.month = s(u, "LLL", { locale: i })), c.push(l);
|
|
191
|
+
}), c;
|
|
192
|
+
}, Le = (e, t, n = "week", r, i) => {
|
|
193
|
+
let a = H(e, { weekStartsOn: i });
|
|
194
|
+
return Ie(t || e, a, 7, n, r, i);
|
|
195
|
+
}, Re = (e, t = !0, n = void 0) => {
|
|
196
|
+
let r = [], { start: i, end: a } = e;
|
|
197
|
+
if (i && a) {
|
|
198
|
+
let n = U(a, i);
|
|
199
|
+
[...Array(n + 1).keys()].map((n) => {
|
|
200
|
+
r.push(K(e, B(i, n), null, null, t));
|
|
201
|
+
});
|
|
202
|
+
} else {
|
|
203
|
+
let o = i || a || n;
|
|
204
|
+
r.push(K(e, f(o), null, null, t));
|
|
205
|
+
}
|
|
206
|
+
return r;
|
|
207
|
+
}, ze = (e) => {
|
|
208
|
+
let { start: t, end: n } = e, r = [];
|
|
209
|
+
if (Ne(e)) return Re(e);
|
|
210
|
+
if (t && n) g(t, n) || ([e.start, e.end] = [e.end, e.start]), W(t, n) ? r.push(K(e, f(t))) : Math.abs(be(t, n)) < 24 ? (r.push(K(e, f(t), null, xe(t))), r.push(K(e, f(n), f(n)))) : r = r.concat(Re(e));
|
|
211
|
+
else {
|
|
212
|
+
let t = Pe(e);
|
|
213
|
+
r.push(K(t, f(t.start)));
|
|
214
|
+
}
|
|
215
|
+
return r;
|
|
216
|
+
}, Z = (e, t, n, r) => {
|
|
217
|
+
let i = /* @__PURE__ */ new Map();
|
|
218
|
+
return e.forEach((e) => {
|
|
219
|
+
let a;
|
|
220
|
+
a = t in e ? e[t] : f(r);
|
|
221
|
+
let o = n ? n(a).toString() : a.toString();
|
|
222
|
+
i.has(o) ? i.get(o).push(e) : i.set(o, [e]);
|
|
223
|
+
}), i;
|
|
224
|
+
}, Be = (e, t, n) => {
|
|
225
|
+
let r = /* @__PURE__ */ new Map();
|
|
226
|
+
return [...e.keys()].map((i) => {
|
|
227
|
+
let a = e.get(i), o = new Date(i);
|
|
228
|
+
if (je(o, t, n)) r.has(i) ? r.set(i, [...r.get(i), ...a]) : r.set(i, a);
|
|
229
|
+
else if (!g(n, o)) {
|
|
230
|
+
let e = a.filter((e) => !e.end || !g(e.end, t)), n = t.toString();
|
|
231
|
+
r.has(n) ? r.set(n, [...r.get(n), ...e]) : r.set(n, a);
|
|
232
|
+
}
|
|
233
|
+
}), r;
|
|
234
|
+
}, Ve = (e, t, n) => Be(e, t, B(Ce(t, { weekStartsOn: n }), 1)), He = (e, t, n, r, i) => {
|
|
235
|
+
let a = U(r, n);
|
|
236
|
+
return e.sort((e, t) => q(e.start, t.start)).forEach((e) => {
|
|
237
|
+
let o = { ...e }, { end: s } = e, c, l = U(t, n), u = 0;
|
|
238
|
+
for (; i[u] && i[u][l];) u++;
|
|
239
|
+
c = s ? je(s, n, r) ? U(s, t) : U(r, t) : 0, o.leftPos = Y(Number(l) / a), o.width = Math.min(1 - Y(Number(l) / a), Y((c + 1) * 1 / a)), o.topInd = u, [...Array(c + 1).keys()].forEach((t) => {
|
|
240
|
+
i[u] || (i[u] = []), t > 0 ? i[u][l + t] = e : i[u][l + t] = o;
|
|
241
|
+
});
|
|
242
|
+
}), i;
|
|
243
|
+
}, Ue = (e, t, n, r, i) => He(e, t, n, B(Ce(t, { weekStartsOn: i }), 1), r), We = (e) => {
|
|
244
|
+
let t = {};
|
|
245
|
+
return e.forEach((e, n) => {
|
|
246
|
+
e.forEach((e, r) => {
|
|
247
|
+
t[r] || (t[r] = []), t[r][n] = e;
|
|
248
|
+
});
|
|
249
|
+
}), t;
|
|
250
|
+
}, Ge = (e) => {
|
|
251
|
+
let { start: t, end: n, allDay: r, children: i } = e, a, o;
|
|
252
|
+
if (Ne(e)) a = 0, o = 0;
|
|
253
|
+
else if (!t || !n) {
|
|
254
|
+
let t = Pe(e);
|
|
255
|
+
o = X(t.end), a = X(t.start);
|
|
256
|
+
} else g(t, n) || ([t, n] = [n, t]), a = X(t), o = X(n);
|
|
257
|
+
return {
|
|
258
|
+
startPos: Y(a),
|
|
259
|
+
endPos: Y(o),
|
|
260
|
+
children: i,
|
|
261
|
+
allDay: !!r
|
|
262
|
+
};
|
|
263
|
+
}, Ke = class extends e {
|
|
264
|
+
constructor(e) {
|
|
265
|
+
super({ ...e });
|
|
266
|
+
}
|
|
267
|
+
init() {}
|
|
268
|
+
destroy() {
|
|
269
|
+
this.raf && cancelAnimationFrame(this.raf);
|
|
270
|
+
}
|
|
271
|
+
initCurrTime() {
|
|
272
|
+
let { showCurrTime: e, displayValue: t } = this.getProps();
|
|
273
|
+
e && W(t, J()) && (this._adapter.updateShowCurrTime(), this.getCurrLocation());
|
|
274
|
+
}
|
|
275
|
+
notifyScrollHeight(e) {
|
|
276
|
+
this._adapter.updateScrollHeight(e);
|
|
277
|
+
}
|
|
278
|
+
closeCard(e, t) {
|
|
279
|
+
this._adapter.unregisterClickOutsideHandler(), this._adapter.notifyClose(e, t);
|
|
280
|
+
}
|
|
281
|
+
_getDate() {
|
|
282
|
+
let { displayValue: e } = this.getProps();
|
|
283
|
+
return e || J();
|
|
284
|
+
}
|
|
285
|
+
showCard(e, t) {
|
|
286
|
+
this._adapter.unregisterClickOutsideHandler();
|
|
287
|
+
let n = document.querySelector("body").clientWidth - e.target.getBoundingClientRect().right - 110;
|
|
288
|
+
this._adapter.openCard(t, n > 0), this._adapter.registerClickOutsideHandler(t, () => {
|
|
289
|
+
this.closeCard(null, t);
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
formatCbValue(e) {
|
|
293
|
+
let t = e.shift(), n = [
|
|
294
|
+
t.getFullYear(),
|
|
295
|
+
t.getMonth(),
|
|
296
|
+
t.getDate(),
|
|
297
|
+
...e
|
|
298
|
+
];
|
|
299
|
+
return new Date(...n);
|
|
300
|
+
}
|
|
301
|
+
getCurrLocation() {
|
|
302
|
+
let e = null, t = X(J());
|
|
303
|
+
this._adapter.updateCurrPos(Y(t));
|
|
304
|
+
let n = () => {
|
|
305
|
+
let r = Date.now();
|
|
306
|
+
e ||= r, r - e > 3e4 && (t = X(J()), this._adapter.updateCurrPos(Y(t)), e = r), this.raf = requestAnimationFrame(n);
|
|
307
|
+
};
|
|
308
|
+
this.raf = requestAnimationFrame(n);
|
|
309
|
+
}
|
|
310
|
+
getWeeklyData(e, t) {
|
|
311
|
+
let n = {}, { weekStartsOn: r } = this.getProps();
|
|
312
|
+
return n.month = s(e, "LLL", {
|
|
313
|
+
locale: t,
|
|
314
|
+
weekStartsOn: r
|
|
315
|
+
}), n.week = Le(e, null, "week", t, r), this._adapter.setWeeklyData(n), n;
|
|
316
|
+
}
|
|
317
|
+
getRangeData(e, t) {
|
|
318
|
+
let n = {}, { range: r, weekStartsOn: i } = this.getProps(), a = U(r[1], r[0]);
|
|
319
|
+
return n.month = s(e, "LLL", {
|
|
320
|
+
locale: t,
|
|
321
|
+
weekStartsOn: i
|
|
322
|
+
}), n.week = Ie(e, f(r[0]), a, "week", t, i), this._adapter.setRangeData(n), n;
|
|
323
|
+
}
|
|
324
|
+
getMonthlyData(e, t) {
|
|
325
|
+
let n = p(e), r = {}, { weekStartsOn: i } = this.getProps(), a = ke(e, { weekStartsOn: i });
|
|
326
|
+
return [...Array(a).keys()].map((e) => {
|
|
327
|
+
r[e] = Le(B(n, e * 7), n, "month", t, i);
|
|
328
|
+
}), this._adapter.setMonthlyData(r), r;
|
|
329
|
+
}
|
|
330
|
+
_parseEvents(e) {
|
|
331
|
+
let t = {
|
|
332
|
+
allDay: [],
|
|
333
|
+
day: []
|
|
334
|
+
};
|
|
335
|
+
return e.map((e) => ze(e)).forEach((e) => {
|
|
336
|
+
e.forEach((e) => {
|
|
337
|
+
e.allDay ? t.allDay.push(e) : t.day.push(e);
|
|
338
|
+
});
|
|
339
|
+
}), t;
|
|
340
|
+
}
|
|
341
|
+
getParseDailyEvents(e, t) {
|
|
342
|
+
t ||= this._getDate();
|
|
343
|
+
let n = this._parseEvents(e), { displayValue: r } = this.getProps(), i = f(t).toString();
|
|
344
|
+
n.allDay = Z(n.allDay, "date", f, r).get(i), n.day = Z(n.day, "date", null, r).get(i), n.allDay ||= [], n.day ||= [], n.day = n.day.map((e) => Ge(e));
|
|
345
|
+
let a = n.day.reduce((e, t) => {
|
|
346
|
+
let n = `${t.startPos}-${t.endPos}`;
|
|
347
|
+
return e[n] || (e[n] = []), e[n].push(t), e;
|
|
348
|
+
}, {}), o = {};
|
|
349
|
+
return n.day = n.day.map((e) => {
|
|
350
|
+
let t = `${e.startPos}-${e.endPos}`, n = o[t];
|
|
351
|
+
return o[t] = n === void 0 ? 0 : ++n, e.left = n === 0 ? 0 : `${n / a[t].length * 100}%`, e;
|
|
352
|
+
}), n;
|
|
353
|
+
}
|
|
354
|
+
parseDailyEvents() {
|
|
355
|
+
let { events: e, displayValue: t } = this.getProps(), n = this.getParseDailyEvents(e, t);
|
|
356
|
+
this._adapter.setParsedEvents(n), this._adapter.cacheEventKeys(e.map((e) => e.key));
|
|
357
|
+
}
|
|
358
|
+
_parseWeeklyEvents(e, t) {
|
|
359
|
+
let { weekStartsOn: n } = this.getProps(), r = [[]], i = Ve(e, t, n);
|
|
360
|
+
return [...i.keys()].sort((e, t) => q(e, t)).forEach((e) => {
|
|
361
|
+
let a = new Date(e);
|
|
362
|
+
r = Ue(i.get(e).filter((e) => W(e.date, a)), a, t, r, n);
|
|
363
|
+
}), r;
|
|
364
|
+
}
|
|
365
|
+
_renderWeeklyAllDayEvent(e) {
|
|
366
|
+
let t = [];
|
|
367
|
+
return e.forEach((e) => {
|
|
368
|
+
let n = e.filter((e) => "leftPos" in e);
|
|
369
|
+
t.push(...n);
|
|
370
|
+
}), t;
|
|
371
|
+
}
|
|
372
|
+
parseWeeklyAllDayEvents(e) {
|
|
373
|
+
let { week: t } = this._adapter.getWeeklyData(), n = t[0].date, r = this._parseWeeklyEvents(e, n);
|
|
374
|
+
return this._renderWeeklyAllDayEvent(r);
|
|
375
|
+
}
|
|
376
|
+
getParsedWeeklyEvents(e) {
|
|
377
|
+
let t = this._parseEvents(e), { displayValue: n } = this.getProps(), r = {};
|
|
378
|
+
return r.allDay = Z(t.allDay, "start", f, n), r.day = Z(t.day, "date", null, n), r;
|
|
379
|
+
}
|
|
380
|
+
parseWeeklyEvents() {
|
|
381
|
+
let { events: e } = this.getProps(), t = this.getParsedWeeklyEvents(e);
|
|
382
|
+
this._adapter.setParsedEvents(t), this._adapter.cacheEventKeys(e.map((e) => e.key));
|
|
383
|
+
}
|
|
384
|
+
pushDayEventIntoWeekMap(e, t, n) {
|
|
385
|
+
t in n ? n[t].push(e) : n[t] = [e];
|
|
386
|
+
}
|
|
387
|
+
convertMapToArray(e, t) {
|
|
388
|
+
let n = [], r = /* @__PURE__ */ new Map();
|
|
389
|
+
for (let t of e.entries()) {
|
|
390
|
+
let [e, n] = t;
|
|
391
|
+
r.set(e, n);
|
|
392
|
+
}
|
|
393
|
+
let i = this._parseWeeklyEvents(r, t);
|
|
394
|
+
return n.push(...i), n;
|
|
395
|
+
}
|
|
396
|
+
getParseMonthlyEvents(e) {
|
|
397
|
+
let t = {}, { displayValue: n, events: r, weekStartsOn: i } = this.getProps(), a = this._getDate(), o = p(n), s = Se(n), c = [];
|
|
398
|
+
return r.sort((e, t) => g(e.start, t.start) ? -1 : +!!m(e.start, t.start)).forEach((e) => {
|
|
399
|
+
let t = Re(e, e.allDay, a);
|
|
400
|
+
c.push(...t);
|
|
401
|
+
}), c.filter((e) => G(e.date, n)), c.forEach((e) => {
|
|
402
|
+
if (G(e.date, n)) {
|
|
403
|
+
let n = Oe(e.date, { weekStartsOn: i }) - 1;
|
|
404
|
+
this.pushDayEventIntoWeekMap(e, n, t);
|
|
405
|
+
return;
|
|
406
|
+
}
|
|
407
|
+
if (g(e.date, o)) {
|
|
408
|
+
Ae(e.date, o, { weekStartsOn: i }) && this.pushDayEventIntoWeekMap(e, 0, t);
|
|
409
|
+
return;
|
|
410
|
+
}
|
|
411
|
+
if (m(e.date, s)) {
|
|
412
|
+
if (Ae(e.date, s, { weekStartsOn: i })) {
|
|
413
|
+
let n = Oe(s, { weekStartsOn: i }) - 1;
|
|
414
|
+
this.pushDayEventIntoWeekMap(e, n, t);
|
|
415
|
+
}
|
|
416
|
+
return;
|
|
417
|
+
}
|
|
418
|
+
}), Object.keys(t).forEach((e) => {
|
|
419
|
+
let n = t[e];
|
|
420
|
+
t[e] = {};
|
|
421
|
+
let r = H(n[0].date, { weekStartsOn: i }), a = Z(n, "start", f), o = this.convertMapToArray(a, r);
|
|
422
|
+
t[e].day = We(o), t[e].display = this._renderDisplayEvents(o);
|
|
423
|
+
}), t;
|
|
424
|
+
}
|
|
425
|
+
parseMonthlyEvents(e) {
|
|
426
|
+
let { events: t } = this.getProps(), n = this.getParseMonthlyEvents(e);
|
|
427
|
+
this._adapter.setParsedEvents(n), this._adapter.setItemLimit(e), this._adapter.cacheEventKeys(t.map((e) => e.key));
|
|
428
|
+
}
|
|
429
|
+
_renderDisplayEvents(e) {
|
|
430
|
+
let t = e.slice();
|
|
431
|
+
return t.length && (t = this._renderWeeklyAllDayEvent(t)), t;
|
|
432
|
+
}
|
|
433
|
+
_parseRangeEvents(e) {
|
|
434
|
+
let t = [[]], [n, r] = this.getProp("range"), i = Be(e, n, r);
|
|
435
|
+
return [...i.keys()].sort((e, t) => q(e, t)).forEach((e) => {
|
|
436
|
+
let a = new Date(e);
|
|
437
|
+
t = He(i.get(e).filter((e) => W(e.date, a)), a, n, r, t);
|
|
438
|
+
}), t;
|
|
439
|
+
}
|
|
440
|
+
_renderRangeAllDayEvent(e) {
|
|
441
|
+
let t = [];
|
|
442
|
+
return e.forEach((e) => {
|
|
443
|
+
let n = e.filter((e) => "leftPos" in e);
|
|
444
|
+
t = [...t, ...n];
|
|
445
|
+
}), t;
|
|
446
|
+
}
|
|
447
|
+
parseRangeAllDayEvents(e) {
|
|
448
|
+
let t = this._parseRangeEvents(e);
|
|
449
|
+
return this._renderRangeAllDayEvent(t);
|
|
450
|
+
}
|
|
451
|
+
getParsedRangeEvents(e) {
|
|
452
|
+
let t = this._parseEvents(e), [n] = this.getProp("range");
|
|
453
|
+
return t.allDay = Z(t.allDay, "start", f, n), t.day = Z(t.day, "date", null, n), t;
|
|
454
|
+
}
|
|
455
|
+
parseRangeEvents() {
|
|
456
|
+
let { events: e } = this.getProps(), t = this.getParsedRangeEvents(e);
|
|
457
|
+
this._adapter.setParsedEvents(t), this._adapter.cacheEventKeys(e.map((e) => e.key));
|
|
458
|
+
}
|
|
459
|
+
checkWeekend(e) {
|
|
460
|
+
return Me(e);
|
|
461
|
+
}
|
|
462
|
+
}, Q = T({
|
|
463
|
+
name: "CalendarNodeRenderer",
|
|
464
|
+
props: { content: {
|
|
465
|
+
type: null,
|
|
466
|
+
default: void 0
|
|
467
|
+
} },
|
|
468
|
+
setup(e) {
|
|
469
|
+
return () => e.content;
|
|
470
|
+
}
|
|
471
|
+
}), qe = Symbol("semi-calendar-context");
|
|
472
|
+
function $() {
|
|
473
|
+
let e = E(qe);
|
|
474
|
+
if (!e) throw Error("please make sure Calendar internal components inside Calendar");
|
|
475
|
+
return e;
|
|
476
|
+
}
|
|
477
|
+
//#endregion
|
|
478
|
+
//#region src/calendar/CalendarDayColumn.vue?vue&type=script&setup=true&lang.ts
|
|
479
|
+
var Je = {
|
|
480
|
+
class: "semi-calendar-grid",
|
|
481
|
+
role: "presentation"
|
|
482
|
+
}, Ye = {
|
|
483
|
+
role: "gridcell",
|
|
484
|
+
class: "semi-calendar-grid-content"
|
|
485
|
+
}, Xe = ["data-time", "onClick"], Ze = ["data-time", "onClick"], Qe = { class: "semi-calendar-event-items" }, $e = /* @__PURE__ */ T({
|
|
486
|
+
name: "CalendarDayColumn",
|
|
487
|
+
__name: "CalendarDayColumn",
|
|
488
|
+
props: {
|
|
489
|
+
date: {},
|
|
490
|
+
events: { default: () => [] },
|
|
491
|
+
isWeekend: {
|
|
492
|
+
type: Boolean,
|
|
493
|
+
default: !1
|
|
494
|
+
},
|
|
495
|
+
minEventHeight: { default: -(2 ** 53 - 1) },
|
|
496
|
+
scrollHeight: { default: 0 },
|
|
497
|
+
showCurrTime: {
|
|
498
|
+
type: Boolean,
|
|
499
|
+
default: !0
|
|
500
|
+
}
|
|
501
|
+
},
|
|
502
|
+
emits: ["click"],
|
|
503
|
+
setup(e, { emit: t }) {
|
|
504
|
+
let n = e, r = t, i = $(), a = F(0), o = F(!1), s = 0, c = 0, l = Array.from({ length: 25 }, (e, t) => ({
|
|
505
|
+
hour: t,
|
|
506
|
+
hourLabel: `${String(t).padStart(2, "0")}:00:00`,
|
|
507
|
+
halfLabel: `${String(t).padStart(2, "0")}:30:00`
|
|
508
|
+
})), u = v(() => ({ top: `${a.value * n.scrollHeight}px` }));
|
|
509
|
+
function d(e) {
|
|
510
|
+
let t = e.startPos ?? 0, r = e.endPos ?? 0, i = t * n.scrollHeight, a = Math.max(n.minEventHeight, (r - t) * n.scrollHeight);
|
|
511
|
+
return {
|
|
512
|
+
top: `${i}px`,
|
|
513
|
+
height: `${a}px`,
|
|
514
|
+
left: e.left ?? 0
|
|
515
|
+
};
|
|
516
|
+
}
|
|
517
|
+
function f(e) {
|
|
518
|
+
(!c || e - c >= 3e4) && (a.value = Y(X(J())), c = e), s = requestAnimationFrame(f);
|
|
519
|
+
}
|
|
520
|
+
return j(() => {
|
|
521
|
+
!n.showCurrTime || !W(n.date, J()) || (o.value = !0, a.value = Y(X(J())), s = requestAnimationFrame(f));
|
|
522
|
+
}), ae(() => {
|
|
523
|
+
s && cancelAnimationFrame(s);
|
|
524
|
+
}), (e, t) => (M(), x("div", Je, [S("div", Ye, [
|
|
525
|
+
n.showCurrTime && o.value ? (M(), x(_, { key: 0 }, [S("div", {
|
|
526
|
+
class: "semi-calendar-grid-curr-circle",
|
|
527
|
+
style: A(u.value)
|
|
528
|
+
}, null, 4), S("div", {
|
|
529
|
+
class: "semi-calendar-grid-curr-line",
|
|
530
|
+
style: A(u.value)
|
|
531
|
+
}, null, 4)], 64)) : b("", !0),
|
|
532
|
+
S("ul", {
|
|
533
|
+
role: "row",
|
|
534
|
+
class: O(["semi-calendar-grid-skeleton", n.isWeekend && "semi-calendar-weekend"])
|
|
535
|
+
}, [(M(!0), x(_, null, N(L(l), (e) => (M(), x(_, { key: `${e.hour}-daycol` }, [S("li", {
|
|
536
|
+
"data-time": e.hourLabel,
|
|
537
|
+
class: "semi-calendar-grid-skeleton-row-line",
|
|
538
|
+
onClick: (t) => r("click", t, [
|
|
539
|
+
n.date,
|
|
540
|
+
e.hour,
|
|
541
|
+
0,
|
|
542
|
+
0
|
|
543
|
+
])
|
|
544
|
+
}, null, 8, Xe), S("li", {
|
|
545
|
+
"data-time": e.halfLabel,
|
|
546
|
+
onClick: (t) => r("click", t, [
|
|
547
|
+
n.date,
|
|
548
|
+
e.hour,
|
|
549
|
+
30,
|
|
550
|
+
0
|
|
551
|
+
])
|
|
552
|
+
}, null, 8, Ze)], 64))), 128))], 2),
|
|
553
|
+
L(i).slots.dateGrid ? (M(), y(L(Q), {
|
|
554
|
+
key: 1,
|
|
555
|
+
content: L(i).slots.dateGrid({
|
|
556
|
+
date: n.date,
|
|
557
|
+
dateString: n.date.toString()
|
|
558
|
+
})
|
|
559
|
+
}, null, 8, ["content"])) : b("", !0),
|
|
560
|
+
S("ul", Qe, [(M(!0), x(_, null, N(n.events, (e, t) => (M(), x("li", {
|
|
561
|
+
key: e.key || `${e.startPos ?? 0}-${t}`,
|
|
562
|
+
class: "semi-calendar-event-item semi-calendar-event-day",
|
|
563
|
+
style: A(d(e))
|
|
564
|
+
}, [w(L(Q), { content: L(i).eventContent(e) }, null, 8, ["content"])], 4))), 128))])
|
|
565
|
+
])]));
|
|
566
|
+
}
|
|
567
|
+
}), et = { class: "semi-calendar-time-items" }, tt = /* @__PURE__ */ T({
|
|
568
|
+
name: "CalendarTimeColumn",
|
|
569
|
+
__name: "CalendarTimeColumn",
|
|
570
|
+
props: { className: {} },
|
|
571
|
+
setup(e) {
|
|
572
|
+
let t = e, n = $();
|
|
573
|
+
function r(e, t) {
|
|
574
|
+
return e.replace("${time}", String(t));
|
|
575
|
+
}
|
|
576
|
+
let i = v(() => Array.from({ length: 24 }, (e, t) => {
|
|
577
|
+
if (t === 0) return "";
|
|
578
|
+
let i = n.slots.timeDisplay?.({ time: t });
|
|
579
|
+
return i === void 0 ? t < 12 ? r(n.locale.value.AM, t) : r(n.locale.value.PM, t === 12 ? 12 : t - 12) : i;
|
|
580
|
+
}));
|
|
581
|
+
return (e, n) => (M(), x("div", { class: O([t.className, "semi-calendar-time"]) }, [S("ul", et, [(M(!0), x(_, null, N(i.value, (e, t) => (M(), x("li", {
|
|
582
|
+
key: `time-${t}`,
|
|
583
|
+
class: "semi-calendar-time-item"
|
|
584
|
+
}, [S("span", null, [w(L(Q), { content: e }, null, 8, ["content"])])]))), 128))])], 2));
|
|
585
|
+
}
|
|
586
|
+
}), nt = { class: "semi-calendar-day-sticky-top" }, rt = { class: "semi-calendar-tag semi-calendar-all-day-tag semi-calendar-day-sticky-left" }, it = {
|
|
587
|
+
key: 1,
|
|
588
|
+
class: "semi-calendar-event-items"
|
|
589
|
+
}, at = { class: "semi-calendar-day-scroll-wrapper" }, ot = /* @__PURE__ */ T({
|
|
590
|
+
name: "CalendarDay",
|
|
591
|
+
__name: "CalendarDay",
|
|
592
|
+
setup(e) {
|
|
593
|
+
let t = $(), n = R("root"), r = R("scroll"), i = R("allDay"), a = F(0), o = v(() => t.state.parsedEvents), s = v(() => Array.isArray(o.value.day) ? o.value.day : []), c = v(() => Array.isArray(o.value.allDay) ? o.value.allDay : []), l = v(() => ({
|
|
594
|
+
height: typeof t.props.value.height == "number" ? `${t.props.value.height}px` : t.props.value.height,
|
|
595
|
+
width: typeof t.props.value.width == "number" ? `${t.props.value.width}px` : t.props.value.width,
|
|
596
|
+
...t.props.value.style && typeof t.props.value.style == "object" ? t.props.value.style : {}
|
|
597
|
+
}));
|
|
598
|
+
function u(e, n) {
|
|
599
|
+
let r = t.formatClickValue(n);
|
|
600
|
+
t.click(e, r);
|
|
601
|
+
}
|
|
602
|
+
return j(async () => {
|
|
603
|
+
if (await ie(), a.value = r.value?.scrollHeight ?? 0, n.value) {
|
|
604
|
+
let e = i.value?.querySelector(".semi-calendar-all-day-tag span"), r = e ? Number.parseFloat(getComputedStyle(e).lineHeight) : 0, a = i.value?.querySelector(".semi-calendar-all-day-content")?.getBoundingClientRect().height ?? r;
|
|
605
|
+
n.value.scrollTop = t.props.value.scrollTop + Math.max(0, a - r);
|
|
606
|
+
}
|
|
607
|
+
}), (e, o) => (M(), x("div", {
|
|
608
|
+
ref_key: "root",
|
|
609
|
+
ref: n,
|
|
610
|
+
class: O(["semi-calendar-day", L(t).props.value.className]),
|
|
611
|
+
style: A(l.value)
|
|
612
|
+
}, [S("div", nt, [w(L(Q), { content: L(t).slots.header?.() ?? L(t).props.value.header }, null, 8, ["content"]), S("div", {
|
|
613
|
+
ref_key: "allDay",
|
|
614
|
+
ref: i,
|
|
615
|
+
class: "semi-calendar-all-day"
|
|
616
|
+
}, [S("ul", rt, [S("span", null, I(L(t).locale.value.allDay), 1)]), S("div", {
|
|
617
|
+
role: "gridcell",
|
|
618
|
+
class: O(["semi-calendar-all-day-content", L(t).props.value.markWeekend && L(t).foundation.checkWeekend(L(t).props.value.displayValue) && "semi-calendar-weekend"])
|
|
619
|
+
}, [L(t).slots.allDayEvents ? (M(), y(L(Q), {
|
|
620
|
+
key: 0,
|
|
621
|
+
content: L(t).slots.allDayEvents({ events: L(t).props.value.events })
|
|
622
|
+
}, null, 8, ["content"])) : (M(), x("ul", it, [(M(!0), x(_, null, N(c.value, (e, n) => (M(), x("li", {
|
|
623
|
+
key: e.key || `allDay-${n}`,
|
|
624
|
+
class: "semi-calendar-event-item semi-calendar-event-allday"
|
|
625
|
+
}, [w(L(Q), { content: L(t).eventContent(e) }, null, 8, ["content"])]))), 128))]))], 2)], 512)]), S("div", at, [S("div", {
|
|
626
|
+
ref_key: "scroll",
|
|
627
|
+
ref: r,
|
|
628
|
+
class: "semi-calendar-day-scroll"
|
|
629
|
+
}, [w(tt, { "class-name": "semi-calendar-day-sticky-left" }), w($e, {
|
|
630
|
+
date: L(t).props.value.displayValue,
|
|
631
|
+
events: s.value,
|
|
632
|
+
"is-weekend": L(t).props.value.markWeekend && L(t).foundation.checkWeekend(L(t).props.value.displayValue),
|
|
633
|
+
"min-event-height": L(t).props.value.minEventHeight,
|
|
634
|
+
"scroll-height": a.value,
|
|
635
|
+
"show-curr-time": L(t).props.value.showCurrTime,
|
|
636
|
+
onClick: u
|
|
637
|
+
}, null, 8, [
|
|
638
|
+
"date",
|
|
639
|
+
"events",
|
|
640
|
+
"is-weekend",
|
|
641
|
+
"min-event-height",
|
|
642
|
+
"scroll-height",
|
|
643
|
+
"show-curr-time"
|
|
644
|
+
])], 512)])], 6));
|
|
645
|
+
}
|
|
646
|
+
}), st = {
|
|
647
|
+
role: "presentation",
|
|
648
|
+
class: "semi-calendar-month-sticky-top"
|
|
649
|
+
}, ct = {
|
|
650
|
+
class: "semi-calendar-month-header",
|
|
651
|
+
role: "presentation"
|
|
652
|
+
}, lt = {
|
|
653
|
+
role: "presentation",
|
|
654
|
+
class: "semi-calendar-month-grid"
|
|
655
|
+
}, ut = {
|
|
656
|
+
role: "row",
|
|
657
|
+
class: "semi-calendar-month-grid-row"
|
|
658
|
+
}, dt = ["aria-label"], ft = {
|
|
659
|
+
role: "presentation",
|
|
660
|
+
class: "semi-calendar-month-grid-wrapper"
|
|
661
|
+
}, pt = {
|
|
662
|
+
role: "presentation",
|
|
663
|
+
class: "semi-calendar-month-week"
|
|
664
|
+
}, mt = {
|
|
665
|
+
role: "presentation",
|
|
666
|
+
class: "semi-calendar-month-grid-col"
|
|
667
|
+
}, ht = {
|
|
668
|
+
role: "row",
|
|
669
|
+
class: "semi-calendar-month-skeleton"
|
|
670
|
+
}, gt = { class: "semi-popover" }, _t = { class: "semi-popover-content" }, vt = { class: "semi-calendar-month-event-card" }, yt = { class: "semi-calendar-month-event-card-content" }, bt = { class: "semi-calendar-month-event-card-header" }, xt = { class: "semi-calendar-month-event-card-header-info" }, St = { class: "semi-calendar-month-event-card-header-info-weekday" }, Ct = { class: "semi-calendar-month-event-card-header-info-date" }, wt = { class: "semi-calendar-month-event-card-body" }, Tt = { class: "semi-calendar-month-event-card-list" }, Et = [
|
|
671
|
+
"aria-label",
|
|
672
|
+
"aria-current",
|
|
673
|
+
"onClick"
|
|
674
|
+
], Dt = {
|
|
675
|
+
key: 1,
|
|
676
|
+
class: "semi-calendar-month-date"
|
|
677
|
+
}, Ot = { class: "semi-calendar-today-date" }, kt = {
|
|
678
|
+
key: 1,
|
|
679
|
+
class: "semi-calendar-today-date"
|
|
680
|
+
}, At = ["onClick"], jt = [
|
|
681
|
+
"aria-label",
|
|
682
|
+
"aria-current",
|
|
683
|
+
"onClick"
|
|
684
|
+
], Mt = {
|
|
685
|
+
key: 1,
|
|
686
|
+
class: "semi-calendar-month-date"
|
|
687
|
+
}, Nt = { class: "semi-calendar-today-date" }, Pt = {
|
|
688
|
+
key: 1,
|
|
689
|
+
class: "semi-calendar-today-date"
|
|
690
|
+
}, Ft = { class: "semi-calendar-event-items" }, It = /* @__PURE__ */ T({
|
|
691
|
+
name: "CalendarMonth",
|
|
692
|
+
__name: "CalendarMonth",
|
|
693
|
+
setup(e) {
|
|
694
|
+
let t = $(), n = R("root"), r = F(), i = F("leftTopOver"), a, o = v(() => t.state.monthlyData), s = v(() => t.state.parsedEvents), c = v(() => Object.keys(o.value).map((e) => ({
|
|
695
|
+
index: Number(e),
|
|
696
|
+
days: o.value[Number(e)] ?? []
|
|
697
|
+
}))), l = v(() => ({
|
|
698
|
+
height: typeof t.props.value.height == "number" ? `${t.props.value.height}px` : t.props.value.height,
|
|
699
|
+
width: typeof t.props.value.width == "number" ? `${t.props.value.width}px` : t.props.value.width,
|
|
700
|
+
...t.props.value.style && typeof t.props.value.style == "object" ? t.props.value.style : {}
|
|
701
|
+
})), u = v(() => t.getPopupContainer.value ? { getPopupContainer: t.getPopupContainer.value } : {});
|
|
702
|
+
function d() {
|
|
703
|
+
let e = (n.value?.querySelector(".semi-calendar-month-weekrow"))?.getBoundingClientRect().height ?? 0;
|
|
704
|
+
return Math.max(0, Math.ceil((e - 60) / 24));
|
|
705
|
+
}
|
|
706
|
+
async function f() {
|
|
707
|
+
await ie();
|
|
708
|
+
let e = d();
|
|
709
|
+
e !== t.state.itemLimit && t.refreshMonth(e);
|
|
710
|
+
}
|
|
711
|
+
function p(e) {
|
|
712
|
+
return s.value[e];
|
|
713
|
+
}
|
|
714
|
+
function m(e, t) {
|
|
715
|
+
return p(e)?.day?.[t]?.filter(Boolean) ?? [];
|
|
716
|
+
}
|
|
717
|
+
function h(e, n) {
|
|
718
|
+
return m(e, n.ind).length > t.state.itemLimit;
|
|
719
|
+
}
|
|
720
|
+
function g(e) {
|
|
721
|
+
return [
|
|
722
|
+
e.isToday && "semi-calendar-today",
|
|
723
|
+
t.props.value.markWeekend && e.isWeekend && "semi-calendar-weekend",
|
|
724
|
+
e.isSameMonth && "semi-calendar-month-same"
|
|
725
|
+
];
|
|
726
|
+
}
|
|
727
|
+
function te(e) {
|
|
728
|
+
return {
|
|
729
|
+
left: `${Math.min(e.leftPos ?? 0, 1) * 100}%`,
|
|
730
|
+
width: `${Math.min(e.width ?? 0, 1) * 100}%`,
|
|
731
|
+
top: `${e.topInd ?? 0}em`
|
|
732
|
+
};
|
|
733
|
+
}
|
|
734
|
+
function T(e) {
|
|
735
|
+
return (p(e)?.display ?? []).filter((e) => (e.topInd ?? 0) < t.state.itemLimit);
|
|
736
|
+
}
|
|
737
|
+
function E(e, n) {
|
|
738
|
+
return Math.max(0, m(e, n.ind).length - t.state.itemLimit);
|
|
739
|
+
}
|
|
740
|
+
function re(e) {
|
|
741
|
+
return t.locale.value.remaining.replace("${remained}", String(e));
|
|
742
|
+
}
|
|
743
|
+
function k(e, n, a) {
|
|
744
|
+
e.stopPropagation();
|
|
745
|
+
let o = e.currentTarget, s = document.body.clientWidth - o.getBoundingClientRect().right - 110;
|
|
746
|
+
i.value = s > 0 ? "leftTopOver" : "rightTopOver", r.value = n.date.toString(), t.moreClick(e, n.date, a);
|
|
747
|
+
}
|
|
748
|
+
function oe(e) {
|
|
749
|
+
r.value && (r.value = void 0, t.close(e));
|
|
750
|
+
}
|
|
751
|
+
function P(e, n) {
|
|
752
|
+
t.click(e, t.formatClickValue([n.date]));
|
|
753
|
+
}
|
|
754
|
+
return j(() => {
|
|
755
|
+
f(), typeof ResizeObserver < "u" && n.value && (a = new ResizeObserver(() => void f()), a.observe(n.value));
|
|
756
|
+
}), ae(() => {
|
|
757
|
+
a?.disconnect(), a = void 0, r.value = void 0;
|
|
758
|
+
}), le(() => t.props.value.height, () => void f()), (e, a) => (M(), x("div", {
|
|
759
|
+
ref_key: "root",
|
|
760
|
+
ref: n,
|
|
761
|
+
role: "grid",
|
|
762
|
+
class: O(["semi-calendar-month", L(t).props.value.className]),
|
|
763
|
+
style: A(l.value)
|
|
764
|
+
}, [S("div", st, [w(L(Q), { content: L(t).slots.header?.() ?? L(t).props.value.header }, null, 8, ["content"]), S("div", ct, [S("div", lt, [S("ul", ut, [(M(!0), x(_, null, N(o.value[0] ?? [], (e) => (M(), x("li", {
|
|
765
|
+
key: `${e.weekday}-monthheader`,
|
|
766
|
+
role: "columnheader",
|
|
767
|
+
"aria-label": e.weekday,
|
|
768
|
+
class: O([L(t).props.value.markWeekend && e.isWeekend && "semi-calendar-weekend"])
|
|
769
|
+
}, [S("span", null, I(e.weekday), 1)], 10, dt))), 128))])])])]), S("div", ft, [S("div", pt, [S("ul", mt, [(M(!0), x(_, null, N(c.value, (e) => (M(), x("div", {
|
|
770
|
+
key: `${e.index}-weekrow`,
|
|
771
|
+
role: "presentation",
|
|
772
|
+
class: "semi-calendar-month-weekrow"
|
|
773
|
+
}, [S("ul", ht, [(M(!0), x(_, null, N(e.days, (n) => (M(), x(_, { key: `${n.date.toString()}-weeksk` }, [h(e.index, n) ? (M(), y(ee, D({
|
|
774
|
+
key: 0,
|
|
775
|
+
ref_for: !0
|
|
776
|
+
}, u.value, {
|
|
777
|
+
visible: r.value === n.date.toString(),
|
|
778
|
+
position: i.value,
|
|
779
|
+
"prefix-cls": "semi-popover",
|
|
780
|
+
trigger: "custom",
|
|
781
|
+
role: "dialog",
|
|
782
|
+
"show-arrow": !1,
|
|
783
|
+
spacing: 4,
|
|
784
|
+
"z-index": 1030,
|
|
785
|
+
"close-on-esc": !0,
|
|
786
|
+
"guard-focus": !0,
|
|
787
|
+
"return-focus-on-close": !0,
|
|
788
|
+
"disable-focus-listener": !0
|
|
789
|
+
}), {
|
|
790
|
+
content: z(() => [S("div", gt, [S("div", _t, [S("div", vt, [S("div", yt, [S("div", bt, [S("div", xt, [S("div", St, I(n.weekday), 1), S("div", Ct, I(n.dayString), 1)]), w(ne, {
|
|
791
|
+
class: "semi-calendar-month-event-card-close",
|
|
792
|
+
type: "tertiary",
|
|
793
|
+
theme: "borderless",
|
|
794
|
+
size: "small",
|
|
795
|
+
"aria-label": L(t).locale.value.close,
|
|
796
|
+
onClick: oe
|
|
797
|
+
}, {
|
|
798
|
+
icon: z(() => [w(L(ue))]),
|
|
799
|
+
_: 1
|
|
800
|
+
}, 8, ["aria-label"])]), S("div", wt, [S("ul", Tt, [(M(!0), x(_, null, N(m(e.index, n.ind), (e, n) => (M(), x("li", { key: e.key || `${n}-card-event` }, [w(L(Q), { content: L(t).eventContent(e) }, null, 8, ["content"])]))), 128))])])])])])])]),
|
|
801
|
+
default: z(() => [S("li", {
|
|
802
|
+
role: "gridcell",
|
|
803
|
+
"aria-label": n.date.toLocaleDateString(),
|
|
804
|
+
"aria-current": n.isToday ? "date" : void 0,
|
|
805
|
+
class: O(g(n)),
|
|
806
|
+
onClick: (e) => P(e, n)
|
|
807
|
+
}, [
|
|
808
|
+
L(t).slots.dateDisplay ? (M(), y(L(Q), {
|
|
809
|
+
key: 0,
|
|
810
|
+
content: L(t).slots.dateDisplay({ date: n.date })
|
|
811
|
+
}, null, 8, ["content"])) : (M(), x("span", Dt, [n.dayString === "1" ? (M(), x(_, { key: 0 }, [
|
|
812
|
+
C(I(n.month), 1),
|
|
813
|
+
S("span", Ot, "\xA0" + I(n.dayString), 1),
|
|
814
|
+
C(I(L(t).locale.value.datestring), 1)
|
|
815
|
+
], 64)) : (M(), x("span", kt, I(n.dayString), 1))])),
|
|
816
|
+
S("div", {
|
|
817
|
+
class: "semi-calendar-month-event-card-wrapper",
|
|
818
|
+
style: { bottom: "0" },
|
|
819
|
+
onClick: (t) => k(t, n, E(e.index, n))
|
|
820
|
+
}, I(re(E(e.index, n))), 9, At),
|
|
821
|
+
L(t).slots.dateGrid ? (M(), y(L(Q), {
|
|
822
|
+
key: 2,
|
|
823
|
+
content: L(t).slots.dateGrid({
|
|
824
|
+
date: n.date,
|
|
825
|
+
dateString: n.date.toString()
|
|
826
|
+
})
|
|
827
|
+
}, null, 8, ["content"])) : b("", !0)
|
|
828
|
+
], 10, Et)]),
|
|
829
|
+
_: 2
|
|
830
|
+
}, 1040, ["visible", "position"])) : (M(), x("li", {
|
|
831
|
+
key: 1,
|
|
832
|
+
role: "gridcell",
|
|
833
|
+
"aria-label": n.date.toLocaleDateString(),
|
|
834
|
+
"aria-current": n.isToday ? "date" : void 0,
|
|
835
|
+
class: O(g(n)),
|
|
836
|
+
onClick: (e) => P(e, n)
|
|
837
|
+
}, [L(t).slots.dateDisplay ? (M(), y(L(Q), {
|
|
838
|
+
key: 0,
|
|
839
|
+
content: L(t).slots.dateDisplay({ date: n.date })
|
|
840
|
+
}, null, 8, ["content"])) : (M(), x("span", Mt, [n.dayString === "1" ? (M(), x(_, { key: 0 }, [
|
|
841
|
+
C(I(n.month), 1),
|
|
842
|
+
S("span", Nt, "\xA0" + I(n.dayString), 1),
|
|
843
|
+
C(I(L(t).locale.value.datestring), 1)
|
|
844
|
+
], 64)) : (M(), x("span", Pt, I(n.dayString), 1))])), L(t).slots.dateGrid ? (M(), y(L(Q), {
|
|
845
|
+
key: 2,
|
|
846
|
+
content: L(t).slots.dateGrid({
|
|
847
|
+
date: n.date,
|
|
848
|
+
dateString: n.date.toString()
|
|
849
|
+
})
|
|
850
|
+
}, null, 8, ["content"])) : b("", !0)], 10, jt))], 64))), 128))]), S("ul", Ft, [(M(!0), x(_, null, N(T(e.index), (e, n) => (M(), x("li", {
|
|
851
|
+
key: e.key || `${n}-monthevent`,
|
|
852
|
+
class: "semi-calendar-event-item semi-calendar-event-month",
|
|
853
|
+
style: A(te(e))
|
|
854
|
+
}, [w(L(Q), { content: L(t).eventContent(e) }, null, 8, ["content"])], 4))), 128))])]))), 128))])])])], 6));
|
|
855
|
+
}
|
|
856
|
+
}), Lt = { class: "semi-calendar-week-sticky-top" }, Rt = { class: "semi-calendar-week-header" }, zt = { class: "semi-calendar-tag semi-calendar-week-tag semi-calendar-week-sticky-left" }, Bt = {
|
|
857
|
+
role: "gridcell",
|
|
858
|
+
class: "semi-calendar-week-grid"
|
|
859
|
+
}, Vt = { class: "semi-calendar-week-grid-row" }, Ht = { class: "semi-calendar-today-date" }, Ut = { class: "semi-calendar-tag semi-calendar-all-day-tag semi-calendar-week-sticky-left" }, Wt = {
|
|
860
|
+
role: "gridcell",
|
|
861
|
+
class: "semi-calendar-content semi-calendar-all-day-content"
|
|
862
|
+
}, Gt = { class: "semi-calendar-all-day-skeleton" }, Kt = {
|
|
863
|
+
key: 1,
|
|
864
|
+
class: "semi-calendar-event-items"
|
|
865
|
+
}, qt = { class: "semi-calendar-week-scroll-wrapper" }, Jt = /* @__PURE__ */ T({
|
|
866
|
+
name: "CalendarWeek",
|
|
867
|
+
__name: "CalendarWeek",
|
|
868
|
+
props: { rangeMode: {
|
|
869
|
+
type: Boolean,
|
|
870
|
+
default: !1
|
|
871
|
+
} },
|
|
872
|
+
setup(e) {
|
|
873
|
+
let t = e, n = $(), r = R("root"), i = R("scroll"), a = R("allDay"), o = F(0), s = v(() => t.rangeMode ? n.state.rangeData : n.state.weeklyData), c = v(() => n.state.parsedEvents), l = v(() => c.value.day instanceof Map ? c.value.day : /* @__PURE__ */ new Map()), u = v(() => c.value.allDay instanceof Map ? c.value.allDay : /* @__PURE__ */ new Map()), d = v(() => t.rangeMode ? n.foundation.parseRangeAllDayEvents(u.value) : n.foundation.parseWeeklyAllDayEvents(u.value)), f = v(() => n.slots.allDayEvents ? void 0 : { height: `${Fe(d.value)}em` }), p = v(() => ({
|
|
874
|
+
height: typeof n.props.value.height == "number" ? `${n.props.value.height}px` : n.props.value.height,
|
|
875
|
+
width: typeof n.props.value.width == "number" ? `${n.props.value.width}px` : n.props.value.width,
|
|
876
|
+
...n.props.value.style && typeof n.props.value.style == "object" ? n.props.value.style : {}
|
|
877
|
+
}));
|
|
878
|
+
function m(e) {
|
|
879
|
+
let t = l.value.get(e.date.toString()) ?? [];
|
|
880
|
+
return n.foundation.getParseDailyEvents(t, e.date).day;
|
|
881
|
+
}
|
|
882
|
+
function h(e) {
|
|
883
|
+
let t = e.leftPos ?? 0, n = e.width ?? 0;
|
|
884
|
+
return {
|
|
885
|
+
left: `${Math.min(t, 1) * 100}%`,
|
|
886
|
+
width: `${Math.min(n, 1) * 100}%`,
|
|
887
|
+
top: `${e.topInd ?? 0}em`
|
|
888
|
+
};
|
|
889
|
+
}
|
|
890
|
+
function g(e, t) {
|
|
891
|
+
let r = n.formatClickValue(t);
|
|
892
|
+
n.click(e, r);
|
|
893
|
+
}
|
|
894
|
+
return j(async () => {
|
|
895
|
+
if (await ie(), o.value = i.value?.scrollHeight ?? 0, r.value) {
|
|
896
|
+
let e = a.value?.querySelector(".semi-calendar-all-day-tag span"), t = e ? Number.parseFloat(getComputedStyle(e).lineHeight) : 0, i = a.value?.querySelector(".semi-calendar-all-day-content")?.getBoundingClientRect().height ?? t;
|
|
897
|
+
r.value.scrollTop = n.props.value.scrollTop + Math.max(0, i - t);
|
|
898
|
+
}
|
|
899
|
+
}), (e, t) => (M(), x("div", {
|
|
900
|
+
ref_key: "root",
|
|
901
|
+
ref: r,
|
|
902
|
+
class: O(["semi-calendar-week", L(n).props.value.className]),
|
|
903
|
+
style: A(p.value)
|
|
904
|
+
}, [S("div", Lt, [
|
|
905
|
+
w(L(Q), { content: L(n).slots.header?.() ?? L(n).props.value.header }, null, 8, ["content"]),
|
|
906
|
+
S("div", Rt, [S("ul", zt, [S("span", null, I(s.value.month), 1)]), S("div", Bt, [S("ul", Vt, [(M(!0), x(_, null, N(s.value.week, (e) => (M(), x("li", {
|
|
907
|
+
key: `${e.date.toString()}-weekheader`,
|
|
908
|
+
class: O([e.isToday && "semi-calendar-today", L(n).props.value.markWeekend && e.isWeekend && "semi-calendar-weekend"])
|
|
909
|
+
}, [L(n).slots.dateDisplay ? (M(), y(L(Q), {
|
|
910
|
+
key: 0,
|
|
911
|
+
content: L(n).slots.dateDisplay({ date: e.date })
|
|
912
|
+
}, null, 8, ["content"])) : (M(), x(_, { key: 1 }, [S("span", Ht, I(e.dayString), 1), S("span", null, I(e.weekday), 1)], 64))], 2))), 128))])])]),
|
|
913
|
+
S("div", {
|
|
914
|
+
ref_key: "allDay",
|
|
915
|
+
ref: a,
|
|
916
|
+
class: "semi-calendar-all-day",
|
|
917
|
+
style: A(f.value)
|
|
918
|
+
}, [S("ul", Ut, [S("span", null, I(L(n).locale.value.allDay), 1)]), S("div", Wt, [S("ul", Gt, [(M(!0), x(_, null, N(s.value.week, (e) => (M(), x("li", {
|
|
919
|
+
key: `${e.date.toString()}-weekgrid`,
|
|
920
|
+
class: O([L(n).props.value.markWeekend && e.isWeekend && "semi-calendar-weekend"])
|
|
921
|
+
}, null, 2))), 128))]), L(n).slots.allDayEvents ? (M(), y(L(Q), {
|
|
922
|
+
key: 0,
|
|
923
|
+
content: L(n).slots.allDayEvents({ events: L(n).props.value.events })
|
|
924
|
+
}, null, 8, ["content"])) : (M(), x("ul", Kt, [(M(!0), x(_, null, N(d.value, (e, t) => (M(), x("li", {
|
|
925
|
+
key: e.key || `allDay-${t}`,
|
|
926
|
+
class: "semi-calendar-event-item semi-calendar-event-allday",
|
|
927
|
+
style: A(h(e))
|
|
928
|
+
}, [w(L(Q), { content: L(n).eventContent(e) }, null, 8, ["content"])], 4))), 128))]))])], 4)
|
|
929
|
+
]), S("div", qt, [S("div", {
|
|
930
|
+
ref_key: "scroll",
|
|
931
|
+
ref: i,
|
|
932
|
+
class: "semi-calendar-week-scroll"
|
|
933
|
+
}, [w(tt, { "class-name": "semi-calendar-week-sticky-left" }), (M(!0), x(_, null, N(s.value.week, (e) => (M(), y($e, {
|
|
934
|
+
key: `${e.date.toString()}-weekday`,
|
|
935
|
+
date: e.date,
|
|
936
|
+
events: m(e),
|
|
937
|
+
"is-weekend": L(n).props.value.markWeekend && e.isWeekend,
|
|
938
|
+
"min-event-height": L(n).props.value.minEventHeight,
|
|
939
|
+
"scroll-height": o.value,
|
|
940
|
+
"show-curr-time": L(n).props.value.showCurrTime,
|
|
941
|
+
onClick: g
|
|
942
|
+
}, null, 8, [
|
|
943
|
+
"date",
|
|
944
|
+
"events",
|
|
945
|
+
"is-weekend",
|
|
946
|
+
"min-event-height",
|
|
947
|
+
"scroll-height",
|
|
948
|
+
"show-curr-time"
|
|
949
|
+
]))), 128))], 512)])], 6));
|
|
950
|
+
}
|
|
951
|
+
});
|
|
952
|
+
//#endregion
|
|
953
|
+
//#region src/calendar/use-calendar-foundation.ts
|
|
954
|
+
function Yt(e, t) {
|
|
955
|
+
let n = P({
|
|
956
|
+
itemLimit: 0,
|
|
957
|
+
monthlyData: {},
|
|
958
|
+
parsedEvents: {
|
|
959
|
+
day: [],
|
|
960
|
+
allDay: []
|
|
961
|
+
},
|
|
962
|
+
rangeData: {
|
|
963
|
+
month: "",
|
|
964
|
+
week: []
|
|
965
|
+
},
|
|
966
|
+
weeklyData: {
|
|
967
|
+
month: "",
|
|
968
|
+
week: []
|
|
969
|
+
}
|
|
970
|
+
}), r = /* @__PURE__ */ new Map(), i = re(new Ke({
|
|
971
|
+
getContext: () => void 0,
|
|
972
|
+
getContexts: () => ({}),
|
|
973
|
+
getProp: (t) => e.value[t],
|
|
974
|
+
getProps: () => e.value,
|
|
975
|
+
getState: (e) => n[e],
|
|
976
|
+
getStates: () => n,
|
|
977
|
+
setState: (e, t) => {
|
|
978
|
+
Object.assign(n, e), t?.();
|
|
979
|
+
},
|
|
980
|
+
getCache: (e) => r.get(e),
|
|
981
|
+
getCaches: () => r,
|
|
982
|
+
setCache: (e, t) => r.set(e, t),
|
|
983
|
+
stopPropagation: (e) => e?.stopPropagation?.(),
|
|
984
|
+
persistEvent: () => void 0,
|
|
985
|
+
setParsedEvents: (e) => {
|
|
986
|
+
n.parsedEvents = e;
|
|
987
|
+
},
|
|
988
|
+
cacheEventKeys: () => void 0,
|
|
989
|
+
setRangeData: (e) => {
|
|
990
|
+
n.rangeData = e;
|
|
991
|
+
},
|
|
992
|
+
getRangeData: () => n.rangeData,
|
|
993
|
+
setWeeklyData: (e) => {
|
|
994
|
+
n.weeklyData = e;
|
|
995
|
+
},
|
|
996
|
+
getWeeklyData: () => n.weeklyData,
|
|
997
|
+
setMonthlyData: (e) => {
|
|
998
|
+
n.monthlyData = e;
|
|
999
|
+
},
|
|
1000
|
+
getMonthlyData: () => n.monthlyData,
|
|
1001
|
+
setItemLimit: (e) => {
|
|
1002
|
+
n.itemLimit = e;
|
|
1003
|
+
}
|
|
1004
|
+
}));
|
|
1005
|
+
function a() {
|
|
1006
|
+
n.parsedEvents = i.getParseDailyEvents(e.value.events, e.value.displayValue);
|
|
1007
|
+
}
|
|
1008
|
+
function o() {
|
|
1009
|
+
n.weeklyData = i.getWeeklyData(e.value.displayValue, t.value), n.parsedEvents = i.getParsedWeeklyEvents(e.value.events);
|
|
1010
|
+
}
|
|
1011
|
+
function s() {
|
|
1012
|
+
let r = e.value.range[0] ?? e.value.displayValue;
|
|
1013
|
+
n.rangeData = i.getRangeData(r, t.value), n.parsedEvents = i.getParsedRangeEvents(e.value.events);
|
|
1014
|
+
}
|
|
1015
|
+
function c(r) {
|
|
1016
|
+
n.itemLimit = r, n.monthlyData = i.getMonthlyData(e.value.displayValue, t.value), n.parsedEvents = i.getParseMonthlyEvents(r);
|
|
1017
|
+
}
|
|
1018
|
+
return j(() => i.init()), ae(() => i.destroy()), {
|
|
1019
|
+
foundation: i,
|
|
1020
|
+
refreshDay: a,
|
|
1021
|
+
refreshMonth: c,
|
|
1022
|
+
refreshRange: s,
|
|
1023
|
+
refreshWeek: o,
|
|
1024
|
+
state: n
|
|
1025
|
+
};
|
|
1026
|
+
}
|
|
1027
|
+
//#endregion
|
|
1028
|
+
//#region src/calendar/Calendar.vue
|
|
1029
|
+
var Xt = /* @__PURE__ */ T({
|
|
1030
|
+
name: "Calendar",
|
|
1031
|
+
inheritAttrs: !1,
|
|
1032
|
+
__name: "Calendar",
|
|
1033
|
+
props: {
|
|
1034
|
+
className: { type: [
|
|
1035
|
+
Boolean,
|
|
1036
|
+
null,
|
|
1037
|
+
String,
|
|
1038
|
+
Object,
|
|
1039
|
+
Array
|
|
1040
|
+
] },
|
|
1041
|
+
displayValue: {},
|
|
1042
|
+
events: { default: () => [] },
|
|
1043
|
+
header: { type: [
|
|
1044
|
+
Object,
|
|
1045
|
+
String,
|
|
1046
|
+
Number,
|
|
1047
|
+
Boolean,
|
|
1048
|
+
null,
|
|
1049
|
+
Array
|
|
1050
|
+
] },
|
|
1051
|
+
height: { default: 600 },
|
|
1052
|
+
markWeekend: {
|
|
1053
|
+
type: Boolean,
|
|
1054
|
+
default: !1
|
|
1055
|
+
},
|
|
1056
|
+
minEventHeight: { default: -(2 ** 53 - 1) },
|
|
1057
|
+
mode: { default: "week" },
|
|
1058
|
+
range: { default: () => [] },
|
|
1059
|
+
scrollTop: { default: 400 },
|
|
1060
|
+
showCurrTime: {
|
|
1061
|
+
type: Boolean,
|
|
1062
|
+
default: !0
|
|
1063
|
+
},
|
|
1064
|
+
style: { type: [
|
|
1065
|
+
Boolean,
|
|
1066
|
+
null,
|
|
1067
|
+
String,
|
|
1068
|
+
Object,
|
|
1069
|
+
Array
|
|
1070
|
+
] },
|
|
1071
|
+
weekStartsOn: { default: 0 },
|
|
1072
|
+
width: {}
|
|
1073
|
+
},
|
|
1074
|
+
emits: [
|
|
1075
|
+
"click",
|
|
1076
|
+
"close",
|
|
1077
|
+
"moreClick"
|
|
1078
|
+
],
|
|
1079
|
+
setup(e, { emit: t }) {
|
|
1080
|
+
let n = Object.freeze({
|
|
1081
|
+
allDay: "全天",
|
|
1082
|
+
AM: "上午${time}时",
|
|
1083
|
+
PM: "下午${time}时",
|
|
1084
|
+
datestring: "日",
|
|
1085
|
+
remaining: "还有${remained}项",
|
|
1086
|
+
close: "关闭事件列表"
|
|
1087
|
+
}), r = Object.freeze({
|
|
1088
|
+
allDay: "All Day",
|
|
1089
|
+
AM: "${time} AM",
|
|
1090
|
+
PM: "${time} PM",
|
|
1091
|
+
datestring: "",
|
|
1092
|
+
remaining: "${remained} more",
|
|
1093
|
+
close: "Close event list"
|
|
1094
|
+
}), i = e, o = t, s = se(), l = ce(), u = F(i.displayValue ?? /* @__PURE__ */ new Date()), d = E(te, void 0), f = v(() => d ? d.value : {
|
|
1095
|
+
direction: "ltr",
|
|
1096
|
+
locale: { code: "zh-CN" }
|
|
1097
|
+
}), p = v(() => f.value.locale.code ?? "zh-CN"), m = v(() => {
|
|
1098
|
+
let e = p.value === "en-US" ? r : n, t = f.value.locale.Calendar;
|
|
1099
|
+
return {
|
|
1100
|
+
...e,
|
|
1101
|
+
...t
|
|
1102
|
+
};
|
|
1103
|
+
}), h = v(() => f.value.locale.dateFnsLocale ?? (p.value === "en-US" ? a : c)), g = v(() => ({
|
|
1104
|
+
className: i.className,
|
|
1105
|
+
displayValue: i.displayValue ?? u.value,
|
|
1106
|
+
events: i.events,
|
|
1107
|
+
header: i.header,
|
|
1108
|
+
height: i.height,
|
|
1109
|
+
markWeekend: i.markWeekend,
|
|
1110
|
+
minEventHeight: i.minEventHeight,
|
|
1111
|
+
mode: i.mode,
|
|
1112
|
+
range: i.range,
|
|
1113
|
+
scrollTop: i.scrollTop,
|
|
1114
|
+
showCurrTime: i.showCurrTime,
|
|
1115
|
+
style: i.style,
|
|
1116
|
+
weekStartsOn: i.weekStartsOn,
|
|
1117
|
+
width: i.width
|
|
1118
|
+
})), { foundation: ee, refreshDay: ne, refreshMonth: _, refreshRange: b, refreshWeek: x, state: S } = Yt(v(() => ({
|
|
1119
|
+
...g.value,
|
|
1120
|
+
events: g.value.events.map((e) => ({
|
|
1121
|
+
...e,
|
|
1122
|
+
children: e
|
|
1123
|
+
}))
|
|
1124
|
+
})), h);
|
|
1125
|
+
function C(e) {
|
|
1126
|
+
let t = e.children;
|
|
1127
|
+
return t && typeof t == "object" && "key" in t ? t : e;
|
|
1128
|
+
}
|
|
1129
|
+
function w(e) {
|
|
1130
|
+
let t = C(e);
|
|
1131
|
+
return l.event?.({ event: t }) ?? t.content;
|
|
1132
|
+
}
|
|
1133
|
+
let T = {
|
|
1134
|
+
click: (e, t) => o("click", e, t),
|
|
1135
|
+
close: (e) => o("close", e),
|
|
1136
|
+
dateFnsLocale: h,
|
|
1137
|
+
direction: v(() => f.value.direction),
|
|
1138
|
+
eventContent: w,
|
|
1139
|
+
foundation: ee,
|
|
1140
|
+
formatClickValue: (e) => ee.formatCbValue([...e]),
|
|
1141
|
+
getPopupContainer: v(() => f.value.getPopupContainer),
|
|
1142
|
+
locale: m,
|
|
1143
|
+
moreClick: (e, t, n) => o("moreClick", e, t, n),
|
|
1144
|
+
props: g,
|
|
1145
|
+
refreshMonth: _,
|
|
1146
|
+
refreshRange: b,
|
|
1147
|
+
refreshWeek: x,
|
|
1148
|
+
slots: l,
|
|
1149
|
+
state: S
|
|
1150
|
+
};
|
|
1151
|
+
return oe(qe, T), le(() => [
|
|
1152
|
+
i.mode,
|
|
1153
|
+
i.displayValue?.getTime(),
|
|
1154
|
+
i.range.map((e) => e.getTime()).join(","),
|
|
1155
|
+
i.weekStartsOn,
|
|
1156
|
+
h.value,
|
|
1157
|
+
i.events
|
|
1158
|
+
], () => {
|
|
1159
|
+
i.mode === "day" ? ne() : i.mode === "month" ? _(S.itemLimit) : i.mode === "range" ? b() : x();
|
|
1160
|
+
}, {
|
|
1161
|
+
deep: !0,
|
|
1162
|
+
immediate: !0
|
|
1163
|
+
}), (e, t) => g.value.mode === "day" ? (M(), y(ot, k(D({ key: 0 }, L(s))), null, 16)) : g.value.mode === "month" ? (M(), y(It, k(D({ key: 1 }, L(s))), null, 16)) : g.value.mode === "range" ? (M(), y(Jt, D({ key: 2 }, L(s), { "range-mode": "" }), null, 16)) : (M(), y(Jt, k(D({ key: 3 }, L(s))), null, 16));
|
|
1164
|
+
}
|
|
1165
|
+
}), Zt = [
|
|
1166
|
+
"day",
|
|
1167
|
+
"week",
|
|
1168
|
+
"month",
|
|
1169
|
+
"range"
|
|
1170
|
+
], Qt = Xt;
|
|
1171
|
+
//#endregion
|
|
1172
|
+
export { Zt as n, Qt as t };
|