naive-ui 2.41.1 → 2.43.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/dist/index.js +3349 -1068
- package/dist/index.mjs +3339 -1070
- package/dist/index.prod.js +1 -1
- package/dist/index.prod.mjs +1 -1
- package/es/_internal/icon/src/styles/index.cssr.mjs +0 -1
- package/es/_internal/icons/replaceable.mjs +1 -1
- package/es/_internal/scrollbar/src/Scrollbar.d.ts +3 -3
- package/es/_internal/select-menu/src/SelectMenu.d.ts +4 -4
- package/es/_internal/selection/src/Selection.d.ts +115 -13
- package/es/_internal/selection/styles/light.d.ts +14 -1
- package/es/_mixins/use-theme.mjs +1 -1
- package/es/_utils/index.d.ts +1 -0
- package/es/_utils/naive/prop.d.ts +19 -10
- package/es/_utils/naive/prop.mjs +21 -21
- package/es/_utils/ts/ts.d.ts +3 -0
- package/es/alert/src/Alert.d.ts +2 -2
- package/es/anchor/index.d.ts +1 -0
- package/es/anchor/src/AnchorAdapter.d.ts +1 -1
- package/es/anchor/src/BaseAnchor.mjs +29 -5
- package/es/anchor/src/Link.d.ts +3 -2
- package/es/anchor/src/Link.mjs +5 -2
- package/es/anchor/src/public-types.d.ts +5 -0
- package/es/anchor/src/public-types.mjs +1 -0
- package/es/auto-complete/src/AutoComplete.d.ts +155 -14
- package/es/auto-complete/styles/light.d.ts +14 -1
- package/es/avatar-group/index.d.ts +3 -2
- package/es/avatar-group/src/AvatarGroup.d.ts +1 -4
- package/es/avatar-group/src/generic-public-types.d.ts +18 -0
- package/es/avatar-group/src/generic-public-types.mjs +1 -0
- package/es/avatar-group/src/public-types.d.ts +10 -0
- package/es/avatar-group/src/public-types.mjs +1 -0
- package/es/back-top/src/BackTop.d.ts +1 -1
- package/es/badge/src/Badge.d.ts +1 -1
- package/es/button/src/Button.d.ts +1 -1
- package/es/card/src/Card.d.ts +7 -2
- package/es/card/src/Card.mjs +3 -1
- package/es/carousel/src/Carousel.d.ts +4 -4
- package/es/carousel/src/Carousel.mjs +2 -2
- package/es/carousel/src/CarouselDots.d.ts +2 -2
- package/es/carousel/src/CarouselItem.mjs +1 -1
- package/es/cascader/src/Cascader.d.ts +163 -20
- package/es/cascader/src/CascaderMenu.d.ts +56 -4
- package/es/cascader/src/CascaderOption.d.ts +56 -4
- package/es/cascader/src/CascaderSelectMenu.d.ts +57 -5
- package/es/cascader/src/CascaderSubmenu.d.ts +56 -4
- package/es/cascader/styles/light.d.ts +14 -1
- package/es/color-picker/src/ColorInputUnit.d.ts +26 -2
- package/es/color-picker/src/ColorPicker.d.ts +128 -11
- package/es/color-picker/src/ColorPickerTrigger.mjs +2 -1
- package/es/color-picker/src/utils.d.ts +2 -0
- package/es/color-picker/src/utils.mjs +23 -0
- package/es/color-picker/styles/light.d.ts +17 -4
- package/es/components.d.ts +1 -0
- package/es/components.mjs +1 -0
- package/es/config-provider/src/ConfigProvider.d.ts +1 -1
- package/es/config-provider/src/ConfigProvider.mjs +1 -1
- package/es/config-provider/src/internal-interface.d.ts +2 -0
- package/es/data-table/src/DataTable.d.ts +690 -68
- package/es/data-table/src/HeaderButton/FilterButton.d.ts +334 -26
- package/es/data-table/src/HeaderButton/FilterMenu.d.ts +332 -24
- package/es/data-table/src/TableParts/Body.d.ts +332 -24
- package/es/data-table/src/TableParts/Cell.mjs +1 -1
- package/es/data-table/src/TableParts/Header.d.ts +332 -24
- package/es/data-table/src/interface.d.ts +253 -18
- package/es/data-table/src/use-sorter.d.ts +2 -5
- package/es/data-table/src/use-table-data.d.ts +1 -4
- package/es/data-table/src/utils.mjs +4 -1
- package/es/data-table/styles/light.d.ts +84 -6
- package/es/date-picker/src/DatePicker.d.ts +229 -23
- package/es/date-picker/src/DatePicker.mjs +1 -1
- package/es/date-picker/src/panel/date.d.ts +110 -10
- package/es/date-picker/src/panel/daterange.d.ts +111 -11
- package/es/date-picker/src/panel/datetime.d.ts +111 -11
- package/es/date-picker/src/panel/datetime.mjs +1 -1
- package/es/date-picker/src/panel/datetimerange.d.ts +112 -12
- package/es/date-picker/src/panel/datetimerange.mjs +2 -2
- package/es/date-picker/src/panel/month.d.ts +110 -10
- package/es/date-picker/src/panel/monthrange.d.ts +111 -11
- package/es/date-picker/src/panel/panelHeader.d.ts +436 -36
- package/es/date-picker/src/panel/use-calendar.d.ts +109 -9
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +110 -10
- package/es/date-picker/src/panel/use-dual-calendar.mjs +3 -3
- package/es/date-picker/src/panel/use-panel-common.d.ts +109 -9
- package/es/date-picker/src/panel/use-panel-common.mjs +1 -1
- package/es/date-picker/src/props.d.ts +85 -7
- package/es/date-picker/src/props.mjs +1 -1
- package/es/date-picker/src/utils.d.ts +2 -1
- package/es/date-picker/src/utils.mjs +4 -1
- package/es/date-picker/styles/light.d.ts +28 -2
- package/es/dialog/src/Dialog.d.ts +9 -6
- package/es/dialog/src/Dialog.mjs +1 -0
- package/es/dialog/src/DialogEnvironment.d.ts +11 -4
- package/es/dialog/src/DialogEnvironment.mjs +3 -0
- package/es/dialog/src/DialogProvider.d.ts +38 -34
- package/es/dialog/src/dialogProps.d.ts +2 -1
- package/es/dialog/src/dialogProps.mjs +2 -1
- package/es/drawer/src/Drawer.d.ts +4 -4
- package/es/drawer/src/DrawerBodyWrapper.d.ts +1 -1
- package/es/dropdown/src/Dropdown.d.ts +165 -24
- package/es/dropdown/src/DropdownMenu.d.ts +2 -2
- package/es/dropdown/src/DropdownOption.d.ts +2 -2
- package/es/dropdown/styles/light.d.ts +16 -3
- package/es/dynamic-input/src/DynamicInput.d.ts +153 -12
- package/es/dynamic-input/src/InputPreset.d.ts +52 -4
- package/es/dynamic-input/src/PairPreset.d.ts +52 -4
- package/es/dynamic-input/styles/light.d.ts +14 -1
- package/es/dynamic-tags/src/DynamicTags.d.ts +153 -12
- package/es/dynamic-tags/styles/light.d.ts +14 -1
- package/es/element/src/Element.mjs +1 -1
- package/es/ellipsis/src/Ellipsis.d.ts +154 -11
- package/es/ellipsis/src/PerformantEllipsis.d.ts +84 -6
- package/es/ellipsis/styles/light.d.ts +14 -1
- package/es/empty/src/Empty.d.ts +1 -1
- package/es/form/src/FormItem.d.ts +8 -2
- package/es/form/src/FormItem.mjs +6 -3
- package/es/form/src/FormItemCol.d.ts +7 -1
- package/es/form/src/FormItemGridItem.d.ts +7 -1
- package/es/form/src/FormItemRow.d.ts +7 -1
- package/es/form/src/utils.d.ts +1 -1
- package/es/form/src/utils.mjs +1 -1
- package/es/global-style/src/GlobalStyle.mjs +1 -1
- package/es/gradient-text/src/GradientText.d.ts +2 -2
- package/es/grid/src/GridItem.d.ts +1 -1
- package/es/heatmap/index.d.ts +6 -0
- package/es/heatmap/index.mjs +4 -0
- package/es/heatmap/src/ColorIndicator.d.ts +25 -0
- package/es/heatmap/src/ColorIndicator.mjs +41 -0
- package/es/heatmap/src/Heatmap.d.ts +385 -0
- package/es/heatmap/src/Heatmap.mjs +333 -0
- package/es/heatmap/src/Rect.d.ts +57 -0
- package/es/heatmap/src/Rect.mjs +67 -0
- package/es/heatmap/src/animationStyle.d.ts +6 -0
- package/es/heatmap/src/animationStyle.mjs +51 -0
- package/es/heatmap/src/interface.d.ts +7 -0
- package/es/heatmap/src/interface.mjs +1 -0
- package/es/heatmap/src/public-types.d.ts +16 -0
- package/es/heatmap/src/public-types.mjs +1 -0
- package/es/heatmap/src/styles/index.cssr.d.ts +2 -0
- package/es/heatmap/src/styles/index.cssr.mjs +102 -0
- package/es/heatmap/src/styles/rtl.cssr.d.ts +2 -0
- package/es/heatmap/src/styles/rtl.cssr.mjs +4 -0
- package/es/heatmap/src/theme.d.ts +8 -0
- package/es/heatmap/src/theme.mjs +7 -0
- package/es/heatmap/src/utils/index.d.ts +32 -0
- package/es/heatmap/src/utils/index.mjs +148 -0
- package/es/heatmap/styles/dark.d.ts +3 -0
- package/es/heatmap/styles/dark.mjs +16 -0
- package/es/heatmap/styles/index.d.ts +3 -0
- package/es/heatmap/styles/index.mjs +2 -0
- package/es/heatmap/styles/light.d.ts +31 -0
- package/es/heatmap/styles/light.mjs +45 -0
- package/es/heatmap/styles/rtl.d.ts +2 -0
- package/es/heatmap/styles/rtl.mjs +5 -0
- package/es/highlight/src/utils.mjs +10 -10
- package/es/icon/src/styles/index.cssr.mjs +0 -1
- package/es/image/index.d.ts +3 -1
- package/es/image/index.mjs +2 -1
- package/es/image/src/Image.d.ts +133 -23
- package/es/image/src/Image.mjs +48 -23
- package/es/image/src/ImageGroup.d.ts +200 -35
- package/es/image/src/ImageGroup.mjs +130 -26
- package/es/image/src/ImagePreview.d.ts +258 -23
- package/es/image/src/ImagePreview.mjs +84 -42
- package/es/image/src/interface.d.ts +42 -3
- package/es/image/src/public-types.d.ts +14 -0
- package/es/image/styles/light.d.ts +14 -1
- package/es/input/src/Input.d.ts +146 -12
- package/es/input/src/Input.mjs +6 -4
- package/es/input/src/InputGroupLabel.d.ts +129 -22
- package/es/input/src/InputGroupLabel.mjs +14 -8
- package/es/input/styles/dark.d.ts +139 -2
- package/es/input/styles/dark.mjs +114 -108
- package/es/input/styles/light.d.ts +76 -3
- package/es/input/styles/light.mjs +7 -2
- package/es/input-number/src/InputNumber.d.ts +152 -11
- package/es/input-number/styles/light.d.ts +14 -1
- package/es/input-otp/src/InputOtp.d.ts +158 -12
- package/es/input-otp/src/InputOtp.mjs +12 -4
- package/es/input-otp/src/public-types.d.ts +1 -0
- package/es/input-otp/src/styles/index.cssr.mjs +12 -3
- package/es/input-otp/styles/dark.mjs +1 -1
- package/es/input-otp/styles/light.d.ts +14 -1
- package/es/layout/src/LayoutSider.d.ts +1 -1
- package/es/legacy-transfer/src/Transfer.d.ts +154 -13
- package/es/legacy-transfer/src/TransferFilter.d.ts +52 -4
- package/es/legacy-transfer/src/TransferList.d.ts +52 -4
- package/es/legacy-transfer/src/TransferListItem.d.ts +52 -4
- package/es/legacy-transfer/styles/light.d.ts +14 -1
- package/es/locales/common/arDZ.mjs +6 -0
- package/es/locales/common/azAZ.mjs +6 -0
- package/es/locales/common/csCZ.mjs +6 -0
- package/es/locales/common/daDK.d.ts +3 -0
- package/es/locales/common/daDK.mjs +130 -0
- package/es/locales/common/deDE.mjs +6 -0
- package/es/locales/common/enGB.mjs +6 -0
- package/es/locales/common/enUS.d.ts +6 -0
- package/es/locales/common/enUS.mjs +6 -0
- package/es/locales/common/eo.mjs +6 -0
- package/es/locales/common/esAR.mjs +6 -0
- package/es/locales/common/etEE.mjs +6 -0
- package/es/locales/common/faIR.mjs +6 -0
- package/es/locales/common/frFR.mjs +6 -0
- package/es/locales/common/idID.mjs +6 -0
- package/es/locales/common/itIT.mjs +6 -0
- package/es/locales/common/jaJP.mjs +6 -0
- package/es/locales/common/kmKH.mjs +6 -0
- package/es/locales/common/koKR.mjs +6 -0
- package/es/locales/common/nbNO.mjs +6 -0
- package/es/locales/common/nlNL.mjs +6 -0
- package/es/locales/common/plPL.mjs +6 -0
- package/es/locales/common/ptBR.mjs +6 -0
- package/es/locales/common/ruRU.mjs +6 -0
- package/es/locales/common/skSK.mjs +6 -0
- package/es/locales/common/svSE.mjs +8 -2
- package/es/locales/common/thTH.mjs +6 -0
- package/es/locales/common/trTR.mjs +6 -0
- package/es/locales/common/ugCN.mjs +6 -0
- package/es/locales/common/ukUA.mjs +6 -0
- package/es/locales/common/uzUZ.mjs +6 -0
- package/es/locales/common/viVN.mjs +6 -0
- package/es/locales/common/zhCN.mjs +6 -0
- package/es/locales/common/zhTW.mjs +6 -0
- package/es/locales/date/daDK.d.ts +3 -0
- package/es/locales/date/daDK.mjs +6 -0
- package/es/locales/index.d.ts +2 -0
- package/es/locales/index.mjs +2 -0
- package/es/locales/utils/index.mjs +1 -1
- package/es/log/src/Log.d.ts +1 -1
- package/es/log/src/Log.mjs +1 -1
- package/es/marquee/src/Marquee.mjs +12 -10
- package/es/mention/src/Mention.d.ts +155 -14
- package/es/mention/styles/light.d.ts +14 -1
- package/es/menu/src/Menu.d.ts +314 -28
- package/es/menu/src/MenuOption.d.ts +113 -9
- package/es/menu/src/MenuOption.mjs +4 -3
- package/es/menu/src/MenuOptionContent.d.ts +1 -1
- package/es/menu/src/MenuOptionGroup.d.ts +1 -1
- package/es/menu/src/MenuOptionGroup.mjs +11 -4
- package/es/menu/src/Submenu.d.ts +114 -10
- package/es/menu/src/use-menu-child.d.ts +2 -0
- package/es/menu/src/use-menu-child.mjs +2 -1
- package/es/menu/styles/light.d.ts +33 -7
- package/es/message/src/Message.d.ts +1 -0
- package/es/message/src/Message.mjs +3 -1
- package/es/message/src/MessageProvider.d.ts +10 -1
- package/es/message/src/styles/index.cssr.mjs +1 -0
- package/es/message/styles/light.d.ts +1 -0
- package/es/message/styles/light.mjs +2 -1
- package/es/modal/src/BodyWrapper.d.ts +13 -7
- package/es/modal/src/BodyWrapper.mjs +4 -3
- package/es/modal/src/Modal.d.ts +32 -15
- package/es/modal/src/Modal.mjs +14 -6
- package/es/modal/src/ModalEnvironment.d.ts +22 -10
- package/es/modal/src/ModalEnvironment.mjs +1 -1
- package/es/modal/src/ModalProvider.d.ts +2 -1
- package/es/modal/src/ModalProvider.mjs +4 -2
- package/es/modal/src/presetProps.d.ts +3 -2
- package/es/modal/src/styles/index.cssr.mjs +4 -2
- package/es/notification/src/Notification.d.ts +2 -2
- package/es/notification/src/NotificationEnvironment.d.ts +1 -1
- package/es/notification/src/NotificationProvider.d.ts +5 -5
- package/es/number-animation/src/NumberAnimation.mjs +1 -1
- package/es/pagination/src/Pagination.d.ts +460 -33
- package/es/pagination/styles/light.d.ts +42 -3
- package/es/popconfirm/src/Popconfirm.d.ts +163 -22
- package/es/popconfirm/src/Popconfirm.mjs +3 -3
- package/es/popconfirm/src/PopconfirmPanel.d.ts +3 -3
- package/es/popconfirm/styles/light.d.ts +14 -1
- package/es/popover/src/Popover.d.ts +133 -16
- package/es/popover/src/PopoverBody.d.ts +129 -12
- package/es/popover/src/PopoverBody.mjs +8 -4
- package/es/popover/src/styles/index.cssr.mjs +1 -1
- package/es/popover/src/styles/rtl.cssr.d.ts +2 -0
- package/es/popover/src/styles/rtl.cssr.mjs +5 -0
- package/es/popover/styles/dark.mjs +4 -0
- package/es/popover/styles/index.d.ts +1 -0
- package/es/popover/styles/index.mjs +2 -1
- package/es/popover/styles/light.d.ts +27 -2
- package/es/popover/styles/light.mjs +7 -2
- package/es/popover/styles/rtl.d.ts +2 -0
- package/es/popover/styles/rtl.mjs +7 -0
- package/es/popselect/src/Popselect.d.ts +217 -76
- package/es/popselect/src/PopselectPanel.d.ts +55 -7
- package/es/popselect/styles/light.d.ts +14 -1
- package/es/progress/src/Circle.d.ts +1 -1
- package/es/progress/src/Circle.mjs +14 -3
- package/es/progress/src/Progress.d.ts +1 -1
- package/es/radio/src/Radio.mjs +5 -5
- package/es/radio/src/RadioButton.d.ts +2 -2
- package/es/radio/src/styles/radio.cssr.mjs +3 -7
- package/es/rate/src/Rate.d.ts +1 -1
- package/es/result/src/Result.d.ts +1 -1
- package/es/select/src/Select.d.ts +164 -21
- package/es/select/styles/light.d.ts +14 -1
- package/es/styles.d.ts +3 -3
- package/es/styles.mjs +3 -3
- package/es/tabs/src/Tab.d.ts +3 -3
- package/es/tabs/src/Tabs.d.ts +1 -1
- package/es/tabs/src/Tabs.mjs +1 -1
- package/es/tabs/src/styles/index.cssr.mjs +4 -4
- package/es/tag/src/Tag.d.ts +1 -1
- package/es/theme-editor/src/ThemeEditor.mjs +1 -1
- package/es/themes/dark.mjs +2 -0
- package/es/themes/light.mjs +2 -0
- package/es/time-picker/src/Panel.d.ts +59 -11
- package/es/time-picker/src/TimePicker.d.ts +156 -15
- package/es/time-picker/styles/light.d.ts +14 -1
- package/es/timeline/src/TimelineItem.d.ts +1 -1
- package/es/tooltip/src/Tooltip.d.ts +166 -25
- package/es/tooltip/styles/light.d.ts +16 -3
- package/es/transfer/src/Transfer.d.ts +154 -13
- package/es/transfer/src/TransferFilter.d.ts +52 -4
- package/es/transfer/src/TransferList.d.ts +52 -4
- package/es/transfer/src/TransferListItem.d.ts +52 -4
- package/es/transfer/styles/light.d.ts +14 -1
- package/es/tree/src/Tree.d.ts +42 -38
- package/es/tree/src/Tree.mjs +3 -1
- package/es/tree/src/TreeNode.d.ts +2 -2
- package/es/tree/src/TreeNodeContent.d.ts +3 -3
- package/es/tree/src/styles/index.cssr.mjs +7 -2
- package/es/tree/styles/light.d.ts +4 -4
- package/es/tree-select/src/TreeSelect.d.ts +172 -29
- package/es/tree-select/styles/index.d.ts +1 -0
- package/es/tree-select/styles/index.mjs +2 -1
- package/es/tree-select/styles/light.d.ts +22 -9
- package/es/tree-select/styles/rtl.d.ts +2 -0
- package/es/tree-select/styles/rtl.mjs +11 -0
- package/es/typography/src/create-header.d.ts +1 -1
- package/es/typography/src/headers.d.ts +6 -6
- package/es/upload/src/Upload.d.ts +1 -0
- package/es/upload/src/Upload.mjs +6 -3
- package/es/upload/src/UploadFile.d.ts +8 -6
- package/es/upload/src/UploadFile.mjs +1 -1
- package/es/upload/src/icons.d.ts +2 -2
- package/es/upload/src/icons.mjs +22 -18
- package/es/upload/src/styles/rtl.cssr.d.ts +2 -0
- package/es/upload/src/styles/rtl.cssr.mjs +5 -0
- package/es/upload/styles/index.d.ts +1 -0
- package/es/upload/styles/index.mjs +2 -1
- package/es/upload/styles/rtl.d.ts +2 -0
- package/es/upload/styles/rtl.mjs +5 -0
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/virtual-list/src/VirtualList.d.ts +1 -1
- package/generic/AvatarGroup.vue +26 -0
- package/generic/index.ts +1 -0
- package/lib/_internal/icon/src/styles/index.cssr.js +0 -1
- package/lib/_internal/scrollbar/src/Scrollbar.d.ts +3 -3
- package/lib/_internal/select-menu/src/SelectMenu.d.ts +4 -4
- package/lib/_internal/selection/src/Selection.d.ts +115 -13
- package/lib/_internal/selection/styles/light.d.ts +14 -1
- package/lib/_utils/index.d.ts +1 -0
- package/lib/_utils/naive/prop.d.ts +19 -10
- package/lib/_utils/naive/prop.js +21 -21
- package/lib/_utils/ts/ts.d.ts +3 -0
- package/lib/alert/src/Alert.d.ts +2 -2
- package/lib/anchor/index.d.ts +1 -0
- package/lib/anchor/src/AnchorAdapter.d.ts +1 -1
- package/lib/anchor/src/AnchorAdapter.js +17 -7
- package/lib/anchor/src/BaseAnchor.js +30 -5
- package/lib/anchor/src/Link.d.ts +3 -2
- package/lib/anchor/src/Link.js +4 -1
- package/lib/anchor/src/public-types.d.ts +5 -0
- package/lib/anchor/src/public-types.js +2 -0
- package/lib/auto-complete/src/AutoComplete.d.ts +155 -14
- package/lib/auto-complete/styles/light.d.ts +14 -1
- package/lib/avatar-group/index.d.ts +3 -2
- package/lib/avatar-group/src/AvatarGroup.d.ts +1 -4
- package/lib/avatar-group/src/generic-public-types.d.ts +18 -0
- package/lib/avatar-group/src/generic-public-types.js +2 -0
- package/lib/avatar-group/src/public-types.d.ts +10 -0
- package/lib/avatar-group/src/public-types.js +2 -0
- package/lib/back-top/src/BackTop.d.ts +1 -1
- package/lib/badge/src/Badge.d.ts +1 -1
- package/lib/button/src/Button.d.ts +1 -1
- package/lib/card/src/Card.d.ts +7 -2
- package/lib/card/src/Card.js +3 -2
- package/lib/carousel/src/Carousel.d.ts +4 -4
- package/lib/carousel/src/Carousel.js +19 -9
- package/lib/carousel/src/CarouselDots.d.ts +2 -2
- package/lib/cascader/src/Cascader.d.ts +163 -20
- package/lib/cascader/src/CascaderMenu.d.ts +56 -4
- package/lib/cascader/src/CascaderOption.d.ts +56 -4
- package/lib/cascader/src/CascaderSelectMenu.d.ts +57 -5
- package/lib/cascader/src/CascaderSubmenu.d.ts +56 -4
- package/lib/cascader/styles/light.d.ts +14 -1
- package/lib/color-picker/src/ColorInputUnit.d.ts +26 -2
- package/lib/color-picker/src/ColorPicker.d.ts +128 -11
- package/lib/color-picker/src/ColorPickerTrigger.js +2 -1
- package/lib/color-picker/src/utils.d.ts +2 -0
- package/lib/color-picker/src/utils.js +26 -0
- package/lib/color-picker/styles/light.d.ts +14 -1
- package/lib/components.d.ts +1 -0
- package/lib/components.js +1 -0
- package/lib/config-provider/src/ConfigProvider.d.ts +1 -1
- package/lib/config-provider/src/internal-interface.d.ts +2 -0
- package/lib/data-table/src/DataTable.d.ts +674 -52
- package/lib/data-table/src/HeaderButton/FilterButton.d.ts +333 -25
- package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +332 -24
- package/lib/data-table/src/TableParts/Body.d.ts +332 -24
- package/lib/data-table/src/TableParts/Header.d.ts +332 -24
- package/lib/data-table/src/interface.d.ts +253 -18
- package/lib/data-table/src/use-sorter.d.ts +2 -5
- package/lib/data-table/src/use-table-data.d.ts +1 -4
- package/lib/data-table/src/utils.js +2 -1
- package/lib/data-table/styles/light.d.ts +84 -6
- package/lib/date-picker/src/DatePicker.d.ts +229 -23
- package/lib/date-picker/src/DatePicker.js +1 -1
- package/lib/date-picker/src/panel/date.d.ts +110 -10
- package/lib/date-picker/src/panel/daterange.d.ts +111 -11
- package/lib/date-picker/src/panel/datetime.d.ts +110 -10
- package/lib/date-picker/src/panel/datetime.js +1 -1
- package/lib/date-picker/src/panel/datetimerange.d.ts +111 -11
- package/lib/date-picker/src/panel/datetimerange.js +2 -2
- package/lib/date-picker/src/panel/month.d.ts +110 -10
- package/lib/date-picker/src/panel/monthrange.d.ts +111 -11
- package/lib/date-picker/src/panel/panelHeader.d.ts +436 -36
- package/lib/date-picker/src/panel/use-calendar.d.ts +109 -9
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +110 -10
- package/lib/date-picker/src/panel/use-dual-calendar.js +3 -3
- package/lib/date-picker/src/panel/use-panel-common.d.ts +109 -9
- package/lib/date-picker/src/panel/use-panel-common.js +1 -1
- package/lib/date-picker/src/props.d.ts +85 -7
- package/lib/date-picker/src/props.js +1 -1
- package/lib/date-picker/src/utils.d.ts +2 -1
- package/lib/date-picker/src/utils.js +5 -1
- package/lib/date-picker/styles/light.d.ts +28 -2
- package/lib/dialog/src/Dialog.d.ts +5 -2
- package/lib/dialog/src/Dialog.js +1 -1
- package/lib/dialog/src/DialogEnvironment.d.ts +11 -4
- package/lib/dialog/src/DialogEnvironment.js +3 -3
- package/lib/dialog/src/DialogProvider.d.ts +38 -34
- package/lib/dialog/src/dialogProps.d.ts +2 -1
- package/lib/dialog/src/dialogProps.js +2 -1
- package/lib/drawer/src/Drawer.d.ts +4 -4
- package/lib/drawer/src/DrawerBodyWrapper.d.ts +1 -1
- package/lib/dropdown/src/Dropdown.d.ts +162 -21
- package/lib/dropdown/src/DropdownMenu.d.ts +2 -2
- package/lib/dropdown/styles/light.d.ts +14 -1
- package/lib/dynamic-input/src/DynamicInput.d.ts +153 -12
- package/lib/dynamic-input/src/InputPreset.d.ts +52 -4
- package/lib/dynamic-input/src/PairPreset.d.ts +52 -4
- package/lib/dynamic-input/styles/light.d.ts +14 -1
- package/lib/dynamic-tags/src/DynamicTags.d.ts +153 -12
- package/lib/dynamic-tags/styles/light.d.ts +14 -1
- package/lib/ellipsis/src/Ellipsis.d.ts +154 -11
- package/lib/ellipsis/src/PerformantEllipsis.d.ts +84 -6
- package/lib/ellipsis/src/PerformantEllipsis.js +17 -7
- package/lib/ellipsis/styles/light.d.ts +14 -1
- package/lib/empty/src/Empty.d.ts +1 -1
- package/lib/form/src/FormItem.d.ts +8 -2
- package/lib/form/src/FormItem.js +3 -2
- package/lib/form/src/FormItemCol.d.ts +7 -1
- package/lib/form/src/FormItemCol.js +17 -7
- package/lib/form/src/FormItemGridItem.d.ts +7 -1
- package/lib/form/src/FormItemGridItem.js +17 -7
- package/lib/form/src/FormItemRow.d.ts +7 -1
- package/lib/form/src/FormItemRow.js +17 -7
- package/lib/form/src/utils.d.ts +1 -1
- package/lib/gradient-text/src/GradientText.d.ts +2 -2
- package/lib/grid/src/GridItem.d.ts +1 -1
- package/lib/heatmap/index.d.ts +6 -0
- package/lib/heatmap/index.js +27 -0
- package/lib/heatmap/src/ColorIndicator.d.ts +25 -0
- package/lib/heatmap/src/ColorIndicator.js +27 -0
- package/lib/heatmap/src/Heatmap.d.ts +385 -0
- package/lib/heatmap/src/Heatmap.js +248 -0
- package/lib/heatmap/src/Rect.d.ts +57 -0
- package/lib/heatmap/src/Rect.js +64 -0
- package/lib/heatmap/src/animationStyle.d.ts +6 -0
- package/lib/heatmap/src/animationStyle.js +52 -0
- package/lib/heatmap/src/interface.d.ts +7 -0
- package/lib/heatmap/src/interface.js +2 -0
- package/lib/heatmap/src/public-types.d.ts +16 -0
- package/lib/heatmap/src/public-types.js +2 -0
- package/lib/heatmap/src/styles/index.cssr.d.ts +2 -0
- package/lib/heatmap/src/styles/index.cssr.js +107 -0
- package/lib/heatmap/src/styles/rtl.cssr.d.ts +2 -0
- package/lib/heatmap/src/styles/rtl.cssr.js +9 -0
- package/lib/heatmap/src/theme.d.ts +8 -0
- package/lib/heatmap/src/theme.js +10 -0
- package/lib/heatmap/src/utils/index.d.ts +32 -0
- package/lib/heatmap/src/utils/index.js +135 -0
- package/lib/heatmap/styles/dark.d.ts +3 -0
- package/lib/heatmap/styles/dark.js +13 -0
- package/lib/heatmap/styles/index.d.ts +3 -0
- package/lib/heatmap/styles/index.js +10 -0
- package/lib/heatmap/styles/light.d.ts +31 -0
- package/lib/heatmap/styles/light.js +39 -0
- package/lib/heatmap/styles/rtl.d.ts +2 -0
- package/lib/heatmap/styles/rtl.js +11 -0
- package/lib/highlight/src/utils.js +10 -21
- package/lib/icon/src/styles/index.cssr.js +0 -1
- package/lib/image/index.d.ts +3 -1
- package/lib/image/index.js +4 -1
- package/lib/image/src/Image.d.ts +133 -23
- package/lib/image/src/Image.js +43 -23
- package/lib/image/src/ImageGroup.d.ts +200 -35
- package/lib/image/src/ImageGroup.js +111 -26
- package/lib/image/src/ImagePreview.d.ts +258 -23
- package/lib/image/src/ImagePreview.js +60 -33
- package/lib/image/src/interface.d.ts +42 -3
- package/lib/image/src/public-types.d.ts +14 -0
- package/lib/image/styles/light.d.ts +14 -1
- package/lib/input/src/Input.d.ts +146 -12
- package/lib/input/src/Input.js +24 -12
- package/lib/input/src/InputGroupLabel.d.ts +129 -22
- package/lib/input/src/InputGroupLabel.js +8 -6
- package/lib/input/styles/dark.d.ts +139 -2
- package/lib/input/styles/dark.js +35 -29
- package/lib/input/styles/light.d.ts +76 -3
- package/lib/input/styles/light.js +7 -2
- package/lib/input-number/src/InputNumber.d.ts +152 -11
- package/lib/input-number/styles/light.d.ts +14 -1
- package/lib/input-otp/src/InputOtp.d.ts +158 -12
- package/lib/input-otp/src/InputOtp.js +12 -16
- package/lib/input-otp/src/public-types.d.ts +1 -0
- package/lib/input-otp/src/styles/index.cssr.js +11 -2
- package/lib/input-otp/styles/dark.js +1 -1
- package/lib/input-otp/styles/light.d.ts +14 -1
- package/lib/layout/src/LayoutSider.d.ts +1 -1
- package/lib/legacy-transfer/src/Transfer.d.ts +154 -13
- package/lib/legacy-transfer/src/TransferFilter.d.ts +52 -4
- package/lib/legacy-transfer/src/TransferList.d.ts +52 -4
- package/lib/legacy-transfer/src/TransferListItem.d.ts +52 -4
- package/lib/legacy-transfer/styles/light.d.ts +14 -1
- package/lib/locales/common/arDZ.js +6 -0
- package/lib/locales/common/azAZ.js +6 -0
- package/lib/locales/common/csCZ.js +6 -0
- package/lib/locales/common/daDK.d.ts +3 -0
- package/lib/locales/common/daDK.js +132 -0
- package/lib/locales/common/deDE.js +6 -0
- package/lib/locales/common/enGB.js +6 -0
- package/lib/locales/common/enUS.d.ts +6 -0
- package/lib/locales/common/enUS.js +6 -0
- package/lib/locales/common/eo.js +6 -0
- package/lib/locales/common/esAR.js +6 -0
- package/lib/locales/common/etEE.js +6 -0
- package/lib/locales/common/faIR.js +6 -0
- package/lib/locales/common/frFR.js +6 -0
- package/lib/locales/common/idID.js +6 -0
- package/lib/locales/common/itIT.js +6 -0
- package/lib/locales/common/jaJP.js +6 -0
- package/lib/locales/common/kmKH.js +6 -0
- package/lib/locales/common/koKR.js +6 -0
- package/lib/locales/common/nbNO.js +6 -0
- package/lib/locales/common/nlNL.js +6 -0
- package/lib/locales/common/plPL.js +6 -0
- package/lib/locales/common/ptBR.js +6 -0
- package/lib/locales/common/ruRU.js +6 -0
- package/lib/locales/common/skSK.js +6 -0
- package/lib/locales/common/svSE.js +8 -2
- package/lib/locales/common/thTH.js +6 -0
- package/lib/locales/common/trTR.js +6 -0
- package/lib/locales/common/ugCN.js +6 -0
- package/lib/locales/common/ukUA.js +6 -0
- package/lib/locales/common/uzUZ.js +6 -0
- package/lib/locales/common/viVN.js +6 -0
- package/lib/locales/common/zhCN.js +6 -0
- package/lib/locales/common/zhTW.js +6 -0
- package/lib/locales/date/daDK.d.ts +3 -0
- package/lib/locales/date/daDK.js +8 -0
- package/lib/locales/index.d.ts +2 -0
- package/lib/locales/index.js +6 -2
- package/lib/log/src/Log.d.ts +1 -1
- package/lib/marquee/src/Marquee.js +4 -3
- package/lib/mention/src/Mention.d.ts +155 -14
- package/lib/mention/styles/light.d.ts +14 -1
- package/lib/menu/src/Menu.d.ts +314 -28
- package/lib/menu/src/MenuOption.d.ts +113 -9
- package/lib/menu/src/MenuOption.js +6 -4
- package/lib/menu/src/MenuOptionContent.d.ts +1 -1
- package/lib/menu/src/MenuOptionGroup.d.ts +1 -1
- package/lib/menu/src/MenuOptionGroup.js +8 -2
- package/lib/menu/src/Submenu.d.ts +114 -10
- package/lib/menu/src/use-menu-child.d.ts +2 -0
- package/lib/menu/src/use-menu-child.js +2 -1
- package/lib/menu/styles/light.d.ts +28 -2
- package/lib/message/src/Message.d.ts +1 -0
- package/lib/message/src/Message.js +3 -2
- package/lib/message/src/MessageProvider.d.ts +10 -1
- package/lib/message/src/styles/index.cssr.js +1 -0
- package/lib/message/styles/light.d.ts +1 -0
- package/lib/message/styles/light.js +1 -1
- package/lib/modal/src/BodyWrapper.d.ts +10 -4
- package/lib/modal/src/BodyWrapper.js +7 -3
- package/lib/modal/src/Modal.d.ts +28 -11
- package/lib/modal/src/Modal.js +10 -4
- package/lib/modal/src/ModalEnvironment.d.ts +22 -10
- package/lib/modal/src/ModalEnvironment.js +18 -8
- package/lib/modal/src/ModalProvider.d.ts +2 -1
- package/lib/modal/src/ModalProvider.js +4 -2
- package/lib/modal/src/presetProps.d.ts +2 -1
- package/lib/modal/src/styles/index.cssr.js +3 -1
- package/lib/notification/src/Notification.d.ts +2 -2
- package/lib/notification/src/NotificationEnvironment.d.ts +1 -1
- package/lib/notification/src/NotificationProvider.d.ts +5 -5
- package/lib/pagination/src/Pagination.d.ts +460 -33
- package/lib/pagination/styles/light.d.ts +42 -3
- package/lib/popconfirm/src/Popconfirm.d.ts +159 -18
- package/lib/popconfirm/src/Popconfirm.js +20 -15
- package/lib/popconfirm/src/PopconfirmPanel.d.ts +1 -1
- package/lib/popconfirm/styles/light.d.ts +14 -1
- package/lib/popover/src/Popover.d.ts +133 -16
- package/lib/popover/src/Popover.js +17 -7
- package/lib/popover/src/PopoverBody.d.ts +129 -12
- package/lib/popover/src/PopoverBody.js +5 -2
- package/lib/popover/src/styles/rtl.cssr.d.ts +2 -0
- package/lib/popover/src/styles/rtl.cssr.js +10 -0
- package/lib/popover/styles/dark.js +4 -0
- package/lib/popover/styles/index.d.ts +1 -0
- package/lib/popover/styles/index.js +3 -1
- package/lib/popover/styles/light.d.ts +27 -2
- package/lib/popover/styles/light.js +7 -2
- package/lib/popover/styles/rtl.d.ts +2 -0
- package/lib/popover/styles/rtl.js +13 -0
- package/lib/popselect/src/Popselect.d.ts +213 -72
- package/lib/popselect/src/Popselect.js +17 -7
- package/lib/popselect/src/PopselectPanel.d.ts +55 -7
- package/lib/popselect/styles/light.d.ts +14 -1
- package/lib/preset.js +17 -7
- package/lib/progress/src/Circle.d.ts +1 -1
- package/lib/progress/src/Circle.js +11 -2
- package/lib/progress/src/Progress.d.ts +1 -1
- package/lib/radio/src/Radio.js +2 -2
- package/lib/radio/src/RadioButton.d.ts +2 -2
- package/lib/radio/src/styles/radio.cssr.js +3 -7
- package/lib/rate/src/Rate.d.ts +1 -1
- package/lib/result/src/Result.d.ts +1 -1
- package/lib/select/src/Select.d.ts +164 -21
- package/lib/select/styles/light.d.ts +14 -1
- package/lib/styles.d.ts +3 -3
- package/lib/styles.js +5 -2
- package/lib/tabs/src/Tab.d.ts +3 -3
- package/lib/tabs/src/Tabs.d.ts +1 -1
- package/lib/tabs/src/styles/index.cssr.js +4 -4
- package/lib/tag/src/Tag.d.ts +1 -1
- package/lib/themes/dark.js +103 -101
- package/lib/themes/light.js +102 -100
- package/lib/time-picker/src/Panel.d.ts +59 -11
- package/lib/time-picker/src/TimePicker.d.ts +156 -15
- package/lib/time-picker/styles/light.d.ts +14 -1
- package/lib/timeline/src/TimelineItem.d.ts +1 -1
- package/lib/tooltip/src/Tooltip.d.ts +159 -18
- package/lib/tooltip/styles/light.d.ts +14 -1
- package/lib/transfer/src/Transfer.d.ts +154 -13
- package/lib/transfer/src/TransferFilter.d.ts +52 -4
- package/lib/transfer/src/TransferList.d.ts +52 -4
- package/lib/transfer/src/TransferListItem.d.ts +52 -4
- package/lib/transfer/styles/light.d.ts +14 -1
- package/lib/tree/src/Tree.d.ts +42 -38
- package/lib/tree/src/Tree.js +4 -3
- package/lib/tree/src/TreeNode.d.ts +2 -2
- package/lib/tree/src/TreeNodeContent.d.ts +3 -3
- package/lib/tree/src/styles/index.cssr.js +7 -2
- package/lib/tree-select/src/TreeSelect.d.ts +169 -26
- package/lib/tree-select/styles/index.d.ts +1 -0
- package/lib/tree-select/styles/index.js +3 -1
- package/lib/tree-select/styles/light.d.ts +14 -1
- package/lib/tree-select/styles/rtl.d.ts +2 -0
- package/lib/tree-select/styles/rtl.js +20 -0
- package/lib/typography/src/create-header.d.ts +1 -1
- package/lib/typography/src/headers.d.ts +6 -6
- package/lib/upload/src/Upload.d.ts +1 -0
- package/lib/upload/src/Upload.js +4 -3
- package/lib/upload/src/UploadFile.d.ts +4 -2
- package/lib/upload/src/UploadFile.js +1 -1
- package/lib/upload/src/icons.d.ts +2 -2
- package/lib/upload/src/icons.js +12 -7
- package/lib/upload/src/styles/rtl.cssr.d.ts +2 -0
- package/lib/upload/src/styles/rtl.cssr.js +10 -0
- package/lib/upload/styles/index.d.ts +1 -0
- package/lib/upload/styles/index.js +3 -1
- package/lib/upload/styles/rtl.d.ts +2 -0
- package/lib/upload/styles/rtl.js +11 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/virtual-list/src/VirtualList.d.ts +1 -1
- package/package.json +30 -19
- package/volar.d.ts +24 -22
- package/web-types.json +599 -61
- package/es/avatar-group/src/interface.d.ts +0 -8
- package/lib/avatar-group/src/interface.d.ts +0 -8
- /package/es/{avatar-group/src/interface.mjs → _utils/ts/ts.mjs} +0 -0
- /package/lib/{avatar-group/src/interface.js → _utils/ts/ts.js} +0 -0
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
import type { PropType, SlotsType } from 'vue';
|
|
2
|
+
import type { ExtractPublicPropTypes } from '../../_utils';
|
|
3
|
+
import type { TooltipProps } from '../../tooltip';
|
|
4
|
+
import type { DayRect } from './interface';
|
|
5
|
+
import type { HeatmapData, HeatmapFirstDayOfWeek, HeatmapSlots } from './public-types';
|
|
6
|
+
import { type HeatmapColorTheme } from './theme';
|
|
7
|
+
export declare const heatmapProps: {
|
|
8
|
+
readonly activeColors: PropType<string[]>;
|
|
9
|
+
readonly colorTheme: PropType<HeatmapColorTheme>;
|
|
10
|
+
readonly data: PropType<HeatmapData>;
|
|
11
|
+
readonly loadingData: PropType<HeatmapData>;
|
|
12
|
+
readonly fillCalendarLeading: BooleanConstructor;
|
|
13
|
+
readonly firstDayOfWeek: {
|
|
14
|
+
readonly type: PropType<HeatmapFirstDayOfWeek>;
|
|
15
|
+
readonly default: 0;
|
|
16
|
+
};
|
|
17
|
+
readonly loading: BooleanConstructor;
|
|
18
|
+
readonly minimumColor: StringConstructor;
|
|
19
|
+
readonly showColorIndicator: {
|
|
20
|
+
readonly type: BooleanConstructor;
|
|
21
|
+
readonly default: true;
|
|
22
|
+
};
|
|
23
|
+
readonly showWeekLabels: {
|
|
24
|
+
readonly type: BooleanConstructor;
|
|
25
|
+
readonly default: true;
|
|
26
|
+
};
|
|
27
|
+
readonly showMonthLabels: {
|
|
28
|
+
readonly type: BooleanConstructor;
|
|
29
|
+
readonly default: true;
|
|
30
|
+
};
|
|
31
|
+
readonly size: {
|
|
32
|
+
readonly type: PropType<"small" | "medium" | "large">;
|
|
33
|
+
readonly default: "medium";
|
|
34
|
+
};
|
|
35
|
+
readonly tooltip: {
|
|
36
|
+
readonly type: PropType<TooltipProps | boolean>;
|
|
37
|
+
readonly default: false;
|
|
38
|
+
};
|
|
39
|
+
readonly xGap: PropType<number | string>;
|
|
40
|
+
readonly yGap: PropType<number | string>;
|
|
41
|
+
readonly theme: PropType<import("../../_mixins").Theme<"Heatmap", {
|
|
42
|
+
activeColors: string[];
|
|
43
|
+
borderRadius: string;
|
|
44
|
+
borderColor: string;
|
|
45
|
+
textColor: string;
|
|
46
|
+
mininumColor: string;
|
|
47
|
+
fontWeight: string;
|
|
48
|
+
loadingColorStart: string;
|
|
49
|
+
loadingColorEnd: string;
|
|
50
|
+
rectSizeSmall: string;
|
|
51
|
+
rectSizeMedium: string;
|
|
52
|
+
rectSizeLarge: string;
|
|
53
|
+
borderRadiusSmall: string;
|
|
54
|
+
borderRadiusMedium: string;
|
|
55
|
+
borderRadiusLarge: string;
|
|
56
|
+
xGapSmall: string;
|
|
57
|
+
xGapMedium: string;
|
|
58
|
+
xGapLarge: string;
|
|
59
|
+
yGapSmall: string;
|
|
60
|
+
yGapMedium: string;
|
|
61
|
+
yGapLarge: string;
|
|
62
|
+
fontSizeSmall: string;
|
|
63
|
+
fontSizeMedium: string;
|
|
64
|
+
fontSizeLarge: string;
|
|
65
|
+
}, any>>;
|
|
66
|
+
readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Heatmap", {
|
|
67
|
+
activeColors: string[];
|
|
68
|
+
borderRadius: string;
|
|
69
|
+
borderColor: string;
|
|
70
|
+
textColor: string;
|
|
71
|
+
mininumColor: string;
|
|
72
|
+
fontWeight: string;
|
|
73
|
+
loadingColorStart: string;
|
|
74
|
+
loadingColorEnd: string;
|
|
75
|
+
rectSizeSmall: string;
|
|
76
|
+
rectSizeMedium: string;
|
|
77
|
+
rectSizeLarge: string;
|
|
78
|
+
borderRadiusSmall: string;
|
|
79
|
+
borderRadiusMedium: string;
|
|
80
|
+
borderRadiusLarge: string;
|
|
81
|
+
xGapSmall: string;
|
|
82
|
+
xGapMedium: string;
|
|
83
|
+
xGapLarge: string;
|
|
84
|
+
yGapSmall: string;
|
|
85
|
+
yGapMedium: string;
|
|
86
|
+
yGapLarge: string;
|
|
87
|
+
fontSizeSmall: string;
|
|
88
|
+
fontSizeMedium: string;
|
|
89
|
+
fontSizeLarge: string;
|
|
90
|
+
}, any>>>;
|
|
91
|
+
readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Heatmap", {
|
|
92
|
+
activeColors: string[];
|
|
93
|
+
borderRadius: string;
|
|
94
|
+
borderColor: string;
|
|
95
|
+
textColor: string;
|
|
96
|
+
mininumColor: string;
|
|
97
|
+
fontWeight: string;
|
|
98
|
+
loadingColorStart: string;
|
|
99
|
+
loadingColorEnd: string;
|
|
100
|
+
rectSizeSmall: string;
|
|
101
|
+
rectSizeMedium: string;
|
|
102
|
+
rectSizeLarge: string;
|
|
103
|
+
borderRadiusSmall: string;
|
|
104
|
+
borderRadiusMedium: string;
|
|
105
|
+
borderRadiusLarge: string;
|
|
106
|
+
xGapSmall: string;
|
|
107
|
+
xGapMedium: string;
|
|
108
|
+
xGapLarge: string;
|
|
109
|
+
yGapSmall: string;
|
|
110
|
+
yGapMedium: string;
|
|
111
|
+
yGapLarge: string;
|
|
112
|
+
fontSizeSmall: string;
|
|
113
|
+
fontSizeMedium: string;
|
|
114
|
+
fontSizeLarge: string;
|
|
115
|
+
}, any>>>;
|
|
116
|
+
};
|
|
117
|
+
export type HeatmapProps = ExtractPublicPropTypes<typeof heatmapProps>;
|
|
118
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
119
|
+
readonly activeColors: PropType<string[]>;
|
|
120
|
+
readonly colorTheme: PropType<HeatmapColorTheme>;
|
|
121
|
+
readonly data: PropType<HeatmapData>;
|
|
122
|
+
readonly loadingData: PropType<HeatmapData>;
|
|
123
|
+
readonly fillCalendarLeading: BooleanConstructor;
|
|
124
|
+
readonly firstDayOfWeek: {
|
|
125
|
+
readonly type: PropType<HeatmapFirstDayOfWeek>;
|
|
126
|
+
readonly default: 0;
|
|
127
|
+
};
|
|
128
|
+
readonly loading: BooleanConstructor;
|
|
129
|
+
readonly minimumColor: StringConstructor;
|
|
130
|
+
readonly showColorIndicator: {
|
|
131
|
+
readonly type: BooleanConstructor;
|
|
132
|
+
readonly default: true;
|
|
133
|
+
};
|
|
134
|
+
readonly showWeekLabels: {
|
|
135
|
+
readonly type: BooleanConstructor;
|
|
136
|
+
readonly default: true;
|
|
137
|
+
};
|
|
138
|
+
readonly showMonthLabels: {
|
|
139
|
+
readonly type: BooleanConstructor;
|
|
140
|
+
readonly default: true;
|
|
141
|
+
};
|
|
142
|
+
readonly size: {
|
|
143
|
+
readonly type: PropType<"small" | "medium" | "large">;
|
|
144
|
+
readonly default: "medium";
|
|
145
|
+
};
|
|
146
|
+
readonly tooltip: {
|
|
147
|
+
readonly type: PropType<TooltipProps | boolean>;
|
|
148
|
+
readonly default: false;
|
|
149
|
+
};
|
|
150
|
+
readonly xGap: PropType<number | string>;
|
|
151
|
+
readonly yGap: PropType<number | string>;
|
|
152
|
+
readonly theme: PropType<import("../../_mixins").Theme<"Heatmap", {
|
|
153
|
+
activeColors: string[];
|
|
154
|
+
borderRadius: string;
|
|
155
|
+
borderColor: string;
|
|
156
|
+
textColor: string;
|
|
157
|
+
mininumColor: string;
|
|
158
|
+
fontWeight: string;
|
|
159
|
+
loadingColorStart: string;
|
|
160
|
+
loadingColorEnd: string;
|
|
161
|
+
rectSizeSmall: string;
|
|
162
|
+
rectSizeMedium: string;
|
|
163
|
+
rectSizeLarge: string;
|
|
164
|
+
borderRadiusSmall: string;
|
|
165
|
+
borderRadiusMedium: string;
|
|
166
|
+
borderRadiusLarge: string;
|
|
167
|
+
xGapSmall: string;
|
|
168
|
+
xGapMedium: string;
|
|
169
|
+
xGapLarge: string;
|
|
170
|
+
yGapSmall: string;
|
|
171
|
+
yGapMedium: string;
|
|
172
|
+
yGapLarge: string;
|
|
173
|
+
fontSizeSmall: string;
|
|
174
|
+
fontSizeMedium: string;
|
|
175
|
+
fontSizeLarge: string;
|
|
176
|
+
}, any>>;
|
|
177
|
+
readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Heatmap", {
|
|
178
|
+
activeColors: string[];
|
|
179
|
+
borderRadius: string;
|
|
180
|
+
borderColor: string;
|
|
181
|
+
textColor: string;
|
|
182
|
+
mininumColor: string;
|
|
183
|
+
fontWeight: string;
|
|
184
|
+
loadingColorStart: string;
|
|
185
|
+
loadingColorEnd: string;
|
|
186
|
+
rectSizeSmall: string;
|
|
187
|
+
rectSizeMedium: string;
|
|
188
|
+
rectSizeLarge: string;
|
|
189
|
+
borderRadiusSmall: string;
|
|
190
|
+
borderRadiusMedium: string;
|
|
191
|
+
borderRadiusLarge: string;
|
|
192
|
+
xGapSmall: string;
|
|
193
|
+
xGapMedium: string;
|
|
194
|
+
xGapLarge: string;
|
|
195
|
+
yGapSmall: string;
|
|
196
|
+
yGapMedium: string;
|
|
197
|
+
yGapLarge: string;
|
|
198
|
+
fontSizeSmall: string;
|
|
199
|
+
fontSizeMedium: string;
|
|
200
|
+
fontSizeLarge: string;
|
|
201
|
+
}, any>>>;
|
|
202
|
+
readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Heatmap", {
|
|
203
|
+
activeColors: string[];
|
|
204
|
+
borderRadius: string;
|
|
205
|
+
borderColor: string;
|
|
206
|
+
textColor: string;
|
|
207
|
+
mininumColor: string;
|
|
208
|
+
fontWeight: string;
|
|
209
|
+
loadingColorStart: string;
|
|
210
|
+
loadingColorEnd: string;
|
|
211
|
+
rectSizeSmall: string;
|
|
212
|
+
rectSizeMedium: string;
|
|
213
|
+
rectSizeLarge: string;
|
|
214
|
+
borderRadiusSmall: string;
|
|
215
|
+
borderRadiusMedium: string;
|
|
216
|
+
borderRadiusLarge: string;
|
|
217
|
+
xGapSmall: string;
|
|
218
|
+
xGapMedium: string;
|
|
219
|
+
xGapLarge: string;
|
|
220
|
+
yGapSmall: string;
|
|
221
|
+
yGapMedium: string;
|
|
222
|
+
yGapLarge: string;
|
|
223
|
+
fontSizeSmall: string;
|
|
224
|
+
fontSizeMedium: string;
|
|
225
|
+
fontSizeLarge: string;
|
|
226
|
+
}, any>>>;
|
|
227
|
+
}>, {
|
|
228
|
+
weekLabels: import("vue").ComputedRef<{
|
|
229
|
+
label: string;
|
|
230
|
+
visible: boolean;
|
|
231
|
+
}[]>;
|
|
232
|
+
monthLabels: import("vue").ComputedRef<{
|
|
233
|
+
name: string;
|
|
234
|
+
colSpan: number;
|
|
235
|
+
}[]>;
|
|
236
|
+
mergedColors: import("vue").ComputedRef<string[]>;
|
|
237
|
+
mergedClsPrefix: import("vue").Ref<string, string>;
|
|
238
|
+
rtlEnabled: import("vue").Ref<import("../../config-provider/src/internal-interface").RtlItem | undefined, import("../../config-provider/src/internal-interface").RtlItem | undefined> | undefined;
|
|
239
|
+
locale: import("vue").Ref<{
|
|
240
|
+
less: string;
|
|
241
|
+
more: string;
|
|
242
|
+
monthFormat: string;
|
|
243
|
+
weekdayFormat: string;
|
|
244
|
+
}, {
|
|
245
|
+
less: string;
|
|
246
|
+
more: string;
|
|
247
|
+
monthFormat: string;
|
|
248
|
+
weekdayFormat: string;
|
|
249
|
+
}>;
|
|
250
|
+
cssVars: import("vue").ComputedRef<{
|
|
251
|
+
'--n-bezier': string;
|
|
252
|
+
'--n-font-size': string;
|
|
253
|
+
'--n-font-weight': string;
|
|
254
|
+
'--n-text-color': string;
|
|
255
|
+
'--n-border-radius': string;
|
|
256
|
+
'--n-border-color': string;
|
|
257
|
+
'--n-loading-color-start': string;
|
|
258
|
+
'--n-rect-size': string;
|
|
259
|
+
'--n-x-gap': string;
|
|
260
|
+
'--n-y-gap': string;
|
|
261
|
+
}> | undefined;
|
|
262
|
+
themeClass: import("vue").Ref<string, string> | undefined;
|
|
263
|
+
onRender: (() => void) | undefined;
|
|
264
|
+
heatmapMatrix: import("vue").ComputedRef<DayRect[][]>;
|
|
265
|
+
loadingClass: import("vue").Ref<string, string>;
|
|
266
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
267
|
+
readonly activeColors: PropType<string[]>;
|
|
268
|
+
readonly colorTheme: PropType<HeatmapColorTheme>;
|
|
269
|
+
readonly data: PropType<HeatmapData>;
|
|
270
|
+
readonly loadingData: PropType<HeatmapData>;
|
|
271
|
+
readonly fillCalendarLeading: BooleanConstructor;
|
|
272
|
+
readonly firstDayOfWeek: {
|
|
273
|
+
readonly type: PropType<HeatmapFirstDayOfWeek>;
|
|
274
|
+
readonly default: 0;
|
|
275
|
+
};
|
|
276
|
+
readonly loading: BooleanConstructor;
|
|
277
|
+
readonly minimumColor: StringConstructor;
|
|
278
|
+
readonly showColorIndicator: {
|
|
279
|
+
readonly type: BooleanConstructor;
|
|
280
|
+
readonly default: true;
|
|
281
|
+
};
|
|
282
|
+
readonly showWeekLabels: {
|
|
283
|
+
readonly type: BooleanConstructor;
|
|
284
|
+
readonly default: true;
|
|
285
|
+
};
|
|
286
|
+
readonly showMonthLabels: {
|
|
287
|
+
readonly type: BooleanConstructor;
|
|
288
|
+
readonly default: true;
|
|
289
|
+
};
|
|
290
|
+
readonly size: {
|
|
291
|
+
readonly type: PropType<"small" | "medium" | "large">;
|
|
292
|
+
readonly default: "medium";
|
|
293
|
+
};
|
|
294
|
+
readonly tooltip: {
|
|
295
|
+
readonly type: PropType<TooltipProps | boolean>;
|
|
296
|
+
readonly default: false;
|
|
297
|
+
};
|
|
298
|
+
readonly xGap: PropType<number | string>;
|
|
299
|
+
readonly yGap: PropType<number | string>;
|
|
300
|
+
readonly theme: PropType<import("../../_mixins").Theme<"Heatmap", {
|
|
301
|
+
activeColors: string[];
|
|
302
|
+
borderRadius: string;
|
|
303
|
+
borderColor: string;
|
|
304
|
+
textColor: string;
|
|
305
|
+
mininumColor: string;
|
|
306
|
+
fontWeight: string;
|
|
307
|
+
loadingColorStart: string;
|
|
308
|
+
loadingColorEnd: string;
|
|
309
|
+
rectSizeSmall: string;
|
|
310
|
+
rectSizeMedium: string;
|
|
311
|
+
rectSizeLarge: string;
|
|
312
|
+
borderRadiusSmall: string;
|
|
313
|
+
borderRadiusMedium: string;
|
|
314
|
+
borderRadiusLarge: string;
|
|
315
|
+
xGapSmall: string;
|
|
316
|
+
xGapMedium: string;
|
|
317
|
+
xGapLarge: string;
|
|
318
|
+
yGapSmall: string;
|
|
319
|
+
yGapMedium: string;
|
|
320
|
+
yGapLarge: string;
|
|
321
|
+
fontSizeSmall: string;
|
|
322
|
+
fontSizeMedium: string;
|
|
323
|
+
fontSizeLarge: string;
|
|
324
|
+
}, any>>;
|
|
325
|
+
readonly themeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Heatmap", {
|
|
326
|
+
activeColors: string[];
|
|
327
|
+
borderRadius: string;
|
|
328
|
+
borderColor: string;
|
|
329
|
+
textColor: string;
|
|
330
|
+
mininumColor: string;
|
|
331
|
+
fontWeight: string;
|
|
332
|
+
loadingColorStart: string;
|
|
333
|
+
loadingColorEnd: string;
|
|
334
|
+
rectSizeSmall: string;
|
|
335
|
+
rectSizeMedium: string;
|
|
336
|
+
rectSizeLarge: string;
|
|
337
|
+
borderRadiusSmall: string;
|
|
338
|
+
borderRadiusMedium: string;
|
|
339
|
+
borderRadiusLarge: string;
|
|
340
|
+
xGapSmall: string;
|
|
341
|
+
xGapMedium: string;
|
|
342
|
+
xGapLarge: string;
|
|
343
|
+
yGapSmall: string;
|
|
344
|
+
yGapMedium: string;
|
|
345
|
+
yGapLarge: string;
|
|
346
|
+
fontSizeSmall: string;
|
|
347
|
+
fontSizeMedium: string;
|
|
348
|
+
fontSizeLarge: string;
|
|
349
|
+
}, any>>>;
|
|
350
|
+
readonly builtinThemeOverrides: PropType<import("../../_mixins/use-theme").ExtractThemeOverrides<import("../../_mixins").Theme<"Heatmap", {
|
|
351
|
+
activeColors: string[];
|
|
352
|
+
borderRadius: string;
|
|
353
|
+
borderColor: string;
|
|
354
|
+
textColor: string;
|
|
355
|
+
mininumColor: string;
|
|
356
|
+
fontWeight: string;
|
|
357
|
+
loadingColorStart: string;
|
|
358
|
+
loadingColorEnd: string;
|
|
359
|
+
rectSizeSmall: string;
|
|
360
|
+
rectSizeMedium: string;
|
|
361
|
+
rectSizeLarge: string;
|
|
362
|
+
borderRadiusSmall: string;
|
|
363
|
+
borderRadiusMedium: string;
|
|
364
|
+
borderRadiusLarge: string;
|
|
365
|
+
xGapSmall: string;
|
|
366
|
+
xGapMedium: string;
|
|
367
|
+
xGapLarge: string;
|
|
368
|
+
yGapSmall: string;
|
|
369
|
+
yGapMedium: string;
|
|
370
|
+
yGapLarge: string;
|
|
371
|
+
fontSizeSmall: string;
|
|
372
|
+
fontSizeMedium: string;
|
|
373
|
+
fontSizeLarge: string;
|
|
374
|
+
}, any>>>;
|
|
375
|
+
}>> & Readonly<{}>, {
|
|
376
|
+
readonly size: "small" | "medium" | "large";
|
|
377
|
+
readonly tooltip: boolean | TooltipProps;
|
|
378
|
+
readonly loading: boolean;
|
|
379
|
+
readonly firstDayOfWeek: HeatmapFirstDayOfWeek;
|
|
380
|
+
readonly fillCalendarLeading: boolean;
|
|
381
|
+
readonly showColorIndicator: boolean;
|
|
382
|
+
readonly showWeekLabels: boolean;
|
|
383
|
+
readonly showMonthLabels: boolean;
|
|
384
|
+
}, SlotsType<HeatmapSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
385
|
+
export default _default;
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.heatmapProps = void 0;
|
|
7
|
+
const date_fns_1 = require("date-fns");
|
|
8
|
+
const lodash_1 = require("lodash");
|
|
9
|
+
const seemly_1 = require("seemly");
|
|
10
|
+
const vue_1 = require("vue");
|
|
11
|
+
const _mixins_1 = require("../../_mixins");
|
|
12
|
+
const _utils_1 = require("../../_utils");
|
|
13
|
+
const utils_1 = require("../../date-picker/src/utils");
|
|
14
|
+
const light_1 = __importDefault(require("../styles/light"));
|
|
15
|
+
const animationStyle_1 = require("./animationStyle");
|
|
16
|
+
const ColorIndicator_1 = __importDefault(require("./ColorIndicator"));
|
|
17
|
+
const Rect_1 = __importDefault(require("./Rect"));
|
|
18
|
+
const index_cssr_1 = __importDefault(require("./styles/index.cssr"));
|
|
19
|
+
const theme_1 = require("./theme");
|
|
20
|
+
const utils_2 = require("./utils");
|
|
21
|
+
exports.heatmapProps = Object.assign(Object.assign({}, _mixins_1.useTheme.props), { activeColors: Array, colorTheme: String, data: Array, loadingData: Object, fillCalendarLeading: Boolean, firstDayOfWeek: {
|
|
22
|
+
type: Number,
|
|
23
|
+
default: 0
|
|
24
|
+
}, loading: Boolean, minimumColor: String, showColorIndicator: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: true
|
|
27
|
+
}, showWeekLabels: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: true
|
|
30
|
+
}, showMonthLabels: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: true
|
|
33
|
+
}, size: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: 'medium'
|
|
36
|
+
}, tooltip: {
|
|
37
|
+
type: [Boolean, Object],
|
|
38
|
+
default: false
|
|
39
|
+
}, xGap: [Number, String], yGap: [Number, String] });
|
|
40
|
+
exports.default = (0, vue_1.defineComponent)({
|
|
41
|
+
name: 'Heatmap',
|
|
42
|
+
slots: Object,
|
|
43
|
+
props: exports.heatmapProps,
|
|
44
|
+
setup(props) {
|
|
45
|
+
const { mergedClsPrefixRef, mergedRtlRef, inlineThemeDisabled } = (0, _mixins_1.useConfig)(props);
|
|
46
|
+
const { localeRef, dateLocaleRef } = (0, _mixins_1.useLocale)('Heatmap');
|
|
47
|
+
const themeRef = (0, _mixins_1.useTheme)('Heatmap', '-heatmap', index_cssr_1.default, light_1.default, props, mergedClsPrefixRef);
|
|
48
|
+
const rtlEnabledRef = (0, _mixins_1.useRtl)('Heatmap', mergedRtlRef, mergedClsPrefixRef);
|
|
49
|
+
const cssVarsRef = (0, vue_1.computed)(() => {
|
|
50
|
+
const { xGap, yGap, size } = props;
|
|
51
|
+
const { common: { cubicBezierEaseInOut }, self: { fontWeight, textColor, borderColor, loadingColorStart, [(0, _utils_1.createKey)('rectSize', size)]: rectSize, [(0, _utils_1.createKey)('borderRadius', size)]: sizeBorderRadius, [(0, _utils_1.createKey)('xGap', size)]: defaultXGap, [(0, _utils_1.createKey)('yGap', size)]: defaultYGap, [(0, _utils_1.createKey)('fontSize', size)]: fontSize } } = themeRef.value;
|
|
52
|
+
const cssVars = {
|
|
53
|
+
'--n-bezier': cubicBezierEaseInOut,
|
|
54
|
+
'--n-font-size': fontSize,
|
|
55
|
+
'--n-font-weight': fontWeight,
|
|
56
|
+
'--n-text-color': textColor,
|
|
57
|
+
'--n-border-radius': sizeBorderRadius,
|
|
58
|
+
'--n-border-color': borderColor,
|
|
59
|
+
'--n-loading-color-start': loadingColorStart,
|
|
60
|
+
'--n-rect-size': rectSize,
|
|
61
|
+
'--n-x-gap': xGap !== undefined
|
|
62
|
+
? typeof xGap === 'number'
|
|
63
|
+
? (0, seemly_1.pxfy)(xGap)
|
|
64
|
+
: xGap
|
|
65
|
+
: defaultXGap,
|
|
66
|
+
'--n-y-gap': yGap !== undefined
|
|
67
|
+
? typeof yGap === 'number'
|
|
68
|
+
? (0, seemly_1.pxfy)(yGap)
|
|
69
|
+
: yGap
|
|
70
|
+
: defaultYGap
|
|
71
|
+
};
|
|
72
|
+
return cssVars;
|
|
73
|
+
});
|
|
74
|
+
const themeClassHandle = inlineThemeDisabled
|
|
75
|
+
? (0, _mixins_1.useThemeClass)('heatmap', (0, vue_1.computed)(() => {
|
|
76
|
+
const { size } = props;
|
|
77
|
+
return size[0];
|
|
78
|
+
}), cssVarsRef, props)
|
|
79
|
+
: undefined;
|
|
80
|
+
const mergedColorsRef = (0, vue_1.computed)(() => {
|
|
81
|
+
const { mininumColor: builtInMinimumColor, activeColors: builtInActiveColors } = themeRef.value.self;
|
|
82
|
+
const mergedMininumColor = props.minimumColor || builtInMinimumColor;
|
|
83
|
+
const theme = props.colorTheme && theme_1.heatmapColorThemes[props.colorTheme];
|
|
84
|
+
const mergedActiveColors = props.activeColors || theme || builtInActiveColors;
|
|
85
|
+
return [mergedMininumColor, ...mergedActiveColors];
|
|
86
|
+
});
|
|
87
|
+
const normalizedDataRef = (0, vue_1.computed)(() => {
|
|
88
|
+
if (!props.data || props.data.length === 0) {
|
|
89
|
+
return [];
|
|
90
|
+
}
|
|
91
|
+
return (0, utils_2.completeDataGaps)(props.data, (0, utils_1.transformNaiveFirstDayOfWeekToDateFns)(props.firstDayOfWeek), props.fillCalendarLeading);
|
|
92
|
+
});
|
|
93
|
+
const normalizedLoadingDataRef = (0, vue_1.computed)(() => {
|
|
94
|
+
if (!props.loadingData || props.loadingData.length === 0) {
|
|
95
|
+
return [];
|
|
96
|
+
}
|
|
97
|
+
return (0, utils_2.completeDataGaps)(props.loadingData, (0, utils_1.transformNaiveFirstDayOfWeekToDateFns)(props.firstDayOfWeek), props.fillCalendarLeading);
|
|
98
|
+
});
|
|
99
|
+
const maxValueRef = (0, vue_1.computed)(() => {
|
|
100
|
+
var _a, _b;
|
|
101
|
+
const validData = normalizedDataRef.value.filter(d => d.value !== null);
|
|
102
|
+
return (_b = (_a = (0, lodash_1.maxBy)(validData, d => d.value)) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : 0;
|
|
103
|
+
});
|
|
104
|
+
const heatmapMatrixRef = (0, vue_1.computed)(() => {
|
|
105
|
+
const data = normalizedDataRef.value;
|
|
106
|
+
const loadingData = normalizedLoadingDataRef.value;
|
|
107
|
+
if (props.loading && !loadingData.length) {
|
|
108
|
+
return (0, utils_2.createLoadingMatrix)((0, utils_1.transformNaiveFirstDayOfWeekToDateFns)(props.firstDayOfWeek));
|
|
109
|
+
}
|
|
110
|
+
const finalData = props.loading ? loadingData : data;
|
|
111
|
+
if (!finalData.length)
|
|
112
|
+
return [];
|
|
113
|
+
const maxValue = maxValueRef.value;
|
|
114
|
+
const colors = mergedColorsRef.value;
|
|
115
|
+
const calendarStartDate = finalData[0].timestamp;
|
|
116
|
+
const dayRects = finalData.map(item => (0, utils_2.createDayRect)(item, calendarStartDate, (0, utils_1.transformNaiveFirstDayOfWeekToDateFns)(props.firstDayOfWeek), colors, maxValue));
|
|
117
|
+
return (0, utils_2.createSparseMatrix)(7, dayRects, dayRect => dayRect.rowIndex, dayRect => dayRect.colIndex);
|
|
118
|
+
});
|
|
119
|
+
const weekLabelsRef = (0, vue_1.computed)(() => {
|
|
120
|
+
const { weekdayFormat } = localeRef.value;
|
|
121
|
+
const { locale } = dateLocaleRef.value;
|
|
122
|
+
const baseDate = (0, date_fns_1.startOfWeek)(new Date(), {
|
|
123
|
+
weekStartsOn: (0, utils_1.transformNaiveFirstDayOfWeekToDateFns)(props.firstDayOfWeek)
|
|
124
|
+
});
|
|
125
|
+
return Array.from({ length: 7 }, (_, i) => {
|
|
126
|
+
return {
|
|
127
|
+
label: (0, date_fns_1.format)((0, date_fns_1.addDays)(baseDate, i), weekdayFormat, { locale }),
|
|
128
|
+
visible: i % 2 !== 0
|
|
129
|
+
};
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
const loadingMonthLabelsRef = (0, vue_1.computed)(() => {
|
|
133
|
+
const { monthFormat } = localeRef.value;
|
|
134
|
+
const { locale } = dateLocaleRef.value;
|
|
135
|
+
const currentYear = new Date().getFullYear();
|
|
136
|
+
// for more consistent month label widths
|
|
137
|
+
const colSpans = [5, 4, 5, 4, 5, 4, 5, 4, 4, 5, 4, 4];
|
|
138
|
+
return Array.from({ length: 12 }, (_, i) => {
|
|
139
|
+
const monthDate = new Date(currentYear, i, 1);
|
|
140
|
+
return {
|
|
141
|
+
name: (0, date_fns_1.format)(monthDate, monthFormat, { locale }),
|
|
142
|
+
colSpan: colSpans[i]
|
|
143
|
+
};
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
function getColsMonth(matrix) {
|
|
147
|
+
const cols = matrix[0].length;
|
|
148
|
+
const res = [];
|
|
149
|
+
for (let col = 0; col < cols; col++) {
|
|
150
|
+
for (let row = 0; row < matrix.length; row++) {
|
|
151
|
+
const cell = matrix[row][col];
|
|
152
|
+
if ((cell === null || cell === void 0 ? void 0 : cell.value) !== null) {
|
|
153
|
+
res.push({
|
|
154
|
+
week: col,
|
|
155
|
+
month: (0, date_fns_1.format)(cell.timestamp, 'yyyy-MM')
|
|
156
|
+
});
|
|
157
|
+
break;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
return res;
|
|
162
|
+
}
|
|
163
|
+
const dataMonthLabelsRef = (0, vue_1.computed)(() => {
|
|
164
|
+
const { monthFormat } = localeRef.value;
|
|
165
|
+
const { locale } = dateLocaleRef.value;
|
|
166
|
+
const matrix = heatmapMatrixRef.value;
|
|
167
|
+
if (!matrix || matrix.length === 0 || !matrix[0]) {
|
|
168
|
+
return [];
|
|
169
|
+
}
|
|
170
|
+
const colsWithMonth = getColsMonth(matrix);
|
|
171
|
+
const monthStats = (0, lodash_1.mapValues)((0, lodash_1.groupBy)(colsWithMonth, 'month'), (entries) => {
|
|
172
|
+
const weekNumbers = entries.map(e => e.week);
|
|
173
|
+
return {
|
|
174
|
+
weekCount: entries.length,
|
|
175
|
+
start: Math.min(...weekNumbers),
|
|
176
|
+
end: Math.max(...weekNumbers)
|
|
177
|
+
};
|
|
178
|
+
});
|
|
179
|
+
return Object.entries(monthStats)
|
|
180
|
+
.filter(([, stats]) => stats.weekCount >= 3) // ensure have enough space
|
|
181
|
+
.sort(([a], [b]) => a.localeCompare(b))
|
|
182
|
+
.map(([month, stats]) => {
|
|
183
|
+
const monthDate = new Date((0, date_fns_1.parseISO)(`${month}-01`));
|
|
184
|
+
return {
|
|
185
|
+
name: (0, date_fns_1.format)(monthDate, monthFormat, { locale }),
|
|
186
|
+
colSpan: stats.end - stats.start + 1
|
|
187
|
+
};
|
|
188
|
+
});
|
|
189
|
+
});
|
|
190
|
+
const monthLabelsRef = (0, vue_1.computed)(() => {
|
|
191
|
+
return props.loading && !props.loadingData
|
|
192
|
+
? loadingMonthLabelsRef.value
|
|
193
|
+
: dataMonthLabelsRef.value;
|
|
194
|
+
});
|
|
195
|
+
const loadingClassRef = (0, animationStyle_1.useLoadingStyleClass)(props, themeRef);
|
|
196
|
+
return {
|
|
197
|
+
weekLabels: weekLabelsRef,
|
|
198
|
+
monthLabels: monthLabelsRef,
|
|
199
|
+
mergedColors: mergedColorsRef,
|
|
200
|
+
mergedClsPrefix: mergedClsPrefixRef,
|
|
201
|
+
rtlEnabled: rtlEnabledRef,
|
|
202
|
+
locale: localeRef,
|
|
203
|
+
cssVars: inlineThemeDisabled ? undefined : cssVarsRef,
|
|
204
|
+
themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
|
|
205
|
+
onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender,
|
|
206
|
+
heatmapMatrix: heatmapMatrixRef,
|
|
207
|
+
loadingClass: loadingClassRef
|
|
208
|
+
};
|
|
209
|
+
},
|
|
210
|
+
render() {
|
|
211
|
+
const { loading, showWeekLabels, showMonthLabels, showColorIndicator, mergedClsPrefix, themeClass, cssVars, rtlEnabled, locale, weekLabels, monthLabels, mergedColors, $slots, heatmapMatrix, loadingClass, onRender } = this;
|
|
212
|
+
onRender === null || onRender === void 0 ? void 0 : onRender();
|
|
213
|
+
return ((0, vue_1.h)("div", { class: [
|
|
214
|
+
themeClass,
|
|
215
|
+
`${mergedClsPrefix}-heatmap`,
|
|
216
|
+
rtlEnabled && `${mergedClsPrefix}-heatmap--rtl`
|
|
217
|
+
], style: cssVars },
|
|
218
|
+
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-heatmap__content` },
|
|
219
|
+
(0, vue_1.h)("table", { class: `${mergedClsPrefix}-heatmap__calendar-table` },
|
|
220
|
+
showMonthLabels && ((0, vue_1.h)("thead", null,
|
|
221
|
+
(0, vue_1.h)("tr", null,
|
|
222
|
+
showWeekLabels && ((0, vue_1.h)("th", { class: `${mergedClsPrefix}-heatmap__week-header-cell` })),
|
|
223
|
+
monthLabels.map((monthLabel, index) => ((0, vue_1.h)("th", { key: `month-${index}`, colspan: monthLabel.colSpan, class: `${mergedClsPrefix}-heatmap__month-label-cell` }, monthLabel.name)))))),
|
|
224
|
+
(0, vue_1.h)("tbody", null, weekLabels.map((weekLabel, rowIdx) => {
|
|
225
|
+
return ((0, vue_1.h)("tr", { key: `row-${rowIdx}` },
|
|
226
|
+
showWeekLabels && ((0, vue_1.h)("td", { class: `${mergedClsPrefix}-heatmap__week-label-cell` }, weekLabel.visible ? weekLabel.label : null)),
|
|
227
|
+
(heatmapMatrix[rowIdx] || []).map((day, weekIdx) => {
|
|
228
|
+
return day.value !== null ? ((0, vue_1.h)("td", { key: `day-${rowIdx}-${weekIdx}`, class: `${mergedClsPrefix}-heatmap__day-cell` },
|
|
229
|
+
(0, vue_1.h)(Rect_1.default, { mergedClsPrefix: mergedClsPrefix, data: day, color: day.color, tooltip: this.tooltip, loading: loading, loadingClass: loadingClass }, {
|
|
230
|
+
tooltip: () => { var _a; return (_a = $slots.tooltip) === null || _a === void 0 ? void 0 : _a.call($slots, day); }
|
|
231
|
+
}))) : ((0, vue_1.h)("td", { key: `empty-${rowIdx}-${weekIdx}`, class: `${mergedClsPrefix}-heatmap__day-cell` },
|
|
232
|
+
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-heatmap__empty-cell` })));
|
|
233
|
+
})));
|
|
234
|
+
})))),
|
|
235
|
+
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-heatmap__footer` },
|
|
236
|
+
(0, _utils_1.resolveWrappedSlot)($slots.footer, children => children && ((0, vue_1.h)("div", { class: `${mergedClsPrefix}-heatmap__footer` }, children))),
|
|
237
|
+
(0, vue_1.h)("div", { class: `${mergedClsPrefix}-heatmap__indicator` }, (0, _utils_1.resolveSlot)($slots.indicator, () => [
|
|
238
|
+
showColorIndicator && ((0, vue_1.h)(ColorIndicator_1.default, { colors: mergedColors, clsPrefix: mergedClsPrefix }, {
|
|
239
|
+
'leading-text': () => (0, _utils_1.resolveSlot)($slots['indicator-leading-text'], () => [
|
|
240
|
+
locale.less
|
|
241
|
+
]),
|
|
242
|
+
'trailing-text': () => (0, _utils_1.resolveSlot)($slots['indicator-trailing-text'], () => [
|
|
243
|
+
locale.more
|
|
244
|
+
])
|
|
245
|
+
}))
|
|
246
|
+
])))));
|
|
247
|
+
}
|
|
248
|
+
});
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { PropType, SlotsType, VNode } from 'vue';
|
|
2
|
+
import type { PopoverProps } from '../../popover/src/Popover';
|
|
3
|
+
import type { HeatmapDataItem } from './public-types';
|
|
4
|
+
export interface RectSlots {
|
|
5
|
+
tooltip?: (props: HeatmapDataItem) => VNode[];
|
|
6
|
+
}
|
|
7
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
8
|
+
mergedClsPrefix: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
data: {
|
|
13
|
+
type: PropType<HeatmapDataItem>;
|
|
14
|
+
required: true;
|
|
15
|
+
};
|
|
16
|
+
color: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
required: true;
|
|
19
|
+
};
|
|
20
|
+
style: ObjectConstructor;
|
|
21
|
+
loading: BooleanConstructor;
|
|
22
|
+
loadingClass: StringConstructor;
|
|
23
|
+
tooltip: {
|
|
24
|
+
type: PropType<PopoverProps | boolean>;
|
|
25
|
+
default: boolean;
|
|
26
|
+
};
|
|
27
|
+
}>, {
|
|
28
|
+
cssVars: import("vue").ComputedRef<{
|
|
29
|
+
'--n-rect-color': string;
|
|
30
|
+
}>;
|
|
31
|
+
tooltipProps: import("vue").ComputedRef<PopoverProps>;
|
|
32
|
+
defaultTooltipContent: import("vue").ComputedRef<string>;
|
|
33
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
34
|
+
mergedClsPrefix: {
|
|
35
|
+
type: StringConstructor;
|
|
36
|
+
required: true;
|
|
37
|
+
};
|
|
38
|
+
data: {
|
|
39
|
+
type: PropType<HeatmapDataItem>;
|
|
40
|
+
required: true;
|
|
41
|
+
};
|
|
42
|
+
color: {
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
required: true;
|
|
45
|
+
};
|
|
46
|
+
style: ObjectConstructor;
|
|
47
|
+
loading: BooleanConstructor;
|
|
48
|
+
loadingClass: StringConstructor;
|
|
49
|
+
tooltip: {
|
|
50
|
+
type: PropType<PopoverProps | boolean>;
|
|
51
|
+
default: boolean;
|
|
52
|
+
};
|
|
53
|
+
}>> & Readonly<{}>, {
|
|
54
|
+
tooltip: boolean | PopoverProps;
|
|
55
|
+
loading: boolean;
|
|
56
|
+
}, SlotsType<RectSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
57
|
+
export default _default;
|