@dimailn/vuetify 2.7.2-alpha26 → 2.7.2-alpha27
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/vuetify.js +1109 -1021
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +1 -1
- package/dist/vuetify.min.js +2 -2
- package/es5/components/VAlert/VAlert.js +1 -0
- package/es5/components/VAlert/VAlert.js.map +1 -1
- package/es5/components/VAppBar/VAppBar.js +17 -6
- package/es5/components/VAppBar/VAppBar.js.map +1 -1
- package/es5/components/VBadge/VBadge.js +1 -0
- package/es5/components/VBadge/VBadge.js.map +1 -1
- package/es5/components/VBanner/VBanner.js +11 -12
- package/es5/components/VBanner/VBanner.js.map +1 -1
- package/es5/components/VBottomNavigation/VBottomNavigation.js +8 -7
- package/es5/components/VBottomNavigation/VBottomNavigation.js.map +1 -1
- package/es5/components/VBtn/VBtn.js +2 -2
- package/es5/components/VBtn/VBtn.js.map +1 -1
- package/es5/components/VCalendar/VCalendar.js +27 -29
- package/es5/components/VCalendar/VCalendar.js.map +1 -1
- package/es5/components/VCalendar/VCalendarCategory.js +26 -34
- package/es5/components/VCalendar/VCalendarCategory.js.map +1 -1
- package/es5/components/VCalendar/VCalendarDaily.js +43 -60
- package/es5/components/VCalendar/VCalendarDaily.js.map +1 -1
- package/es5/components/VCalendar/VCalendarMonthly.js +2 -2
- package/es5/components/VCalendar/VCalendarMonthly.js.map +1 -1
- package/es5/components/VCalendar/VCalendarWeekly.js +26 -35
- package/es5/components/VCalendar/VCalendarWeekly.js.map +1 -1
- package/es5/components/VCalendar/mixins/calendar-base.js +5 -10
- package/es5/components/VCalendar/mixins/calendar-base.js.map +1 -1
- package/es5/components/VCalendar/mixins/calendar-with-events.js +43 -58
- package/es5/components/VCalendar/mixins/calendar-with-events.js.map +1 -1
- package/es5/components/VCalendar/mixins/calendar-with-intervals.js +2 -2
- package/es5/components/VCalendar/mixins/calendar-with-intervals.js.map +1 -1
- package/es5/components/VCalendar/mixins/times.js.map +1 -1
- package/es5/components/VCarousel/VCarousel.js +10 -9
- package/es5/components/VCarousel/VCarousel.js.map +1 -1
- package/es5/components/VCheckbox/VCheckbox.js +31 -2
- package/es5/components/VCheckbox/VCheckbox.js.map +1 -1
- package/es5/components/VCheckbox/VSimpleCheckbox.js +0 -3
- package/es5/components/VCheckbox/VSimpleCheckbox.js.map +1 -1
- package/es5/components/VChip/VChip.js +14 -6
- package/es5/components/VChip/VChip.js.map +1 -1
- package/es5/components/VData/VData.js +1 -0
- package/es5/components/VData/VData.js.map +1 -1
- package/es5/components/VDataIterator/VDataFooter.js +1 -0
- package/es5/components/VDataIterator/VDataFooter.js.map +1 -1
- package/es5/components/VDataIterator/VDataIterator.js +1 -0
- package/es5/components/VDataIterator/VDataIterator.js.map +1 -1
- package/es5/components/VDataTable/VDataTable.js +1 -6
- package/es5/components/VDataTable/VDataTable.js.map +1 -1
- package/es5/components/VDataTable/VDataTableHeaderDesktop.js +1 -0
- package/es5/components/VDataTable/VDataTableHeaderDesktop.js.map +1 -1
- package/es5/components/VDataTable/VDataTableHeaderMobile.js +1 -0
- package/es5/components/VDataTable/VDataTableHeaderMobile.js.map +1 -1
- package/es5/components/VDataTable/VEditDialog.js +19 -18
- package/es5/components/VDataTable/VEditDialog.js.map +1 -1
- package/es5/components/VDataTable/mixins/header.js +0 -6
- package/es5/components/VDataTable/mixins/header.js.map +1 -1
- package/es5/components/VDatePicker/VDatePicker.js +13 -18
- package/es5/components/VDatePicker/VDatePicker.js.map +1 -1
- package/es5/components/VDatePicker/VDatePickerHeader.js +48 -26
- package/es5/components/VDatePicker/VDatePickerHeader.js.map +1 -1
- package/es5/components/VDatePicker/VDatePickerMonthTable.js +6 -3
- package/es5/components/VDatePicker/VDatePickerMonthTable.js.map +1 -1
- package/es5/components/VDatePicker/VDatePickerTitle.js +4 -3
- package/es5/components/VDatePicker/VDatePickerTitle.js.map +1 -1
- package/es5/components/VDatePicker/VDatePickerYears.js +11 -12
- package/es5/components/VDatePicker/VDatePickerYears.js.map +1 -1
- package/es5/components/VDatePicker/mixins/date-picker-table.js +16 -13
- package/es5/components/VDatePicker/mixins/date-picker-table.js.map +1 -1
- package/es5/components/VDatePicker/util/createNativeLocaleFormatter.js +4 -0
- package/es5/components/VDatePicker/util/createNativeLocaleFormatter.js.map +1 -1
- package/es5/components/VDialog/VDialog.js +1 -0
- package/es5/components/VDialog/VDialog.js.map +1 -1
- package/es5/components/VExpansionPanel/VExpansionPanel.js +1 -0
- package/es5/components/VExpansionPanel/VExpansionPanel.js.map +1 -1
- package/es5/components/VExpansionPanel/VExpansionPanelHeader.js +1 -10
- package/es5/components/VExpansionPanel/VExpansionPanelHeader.js.map +1 -1
- package/es5/components/VFileInput/VFileInput.js +1 -0
- package/es5/components/VFileInput/VFileInput.js.map +1 -1
- package/es5/components/VForm/VForm.js +1 -0
- package/es5/components/VForm/VForm.js.map +1 -1
- package/es5/components/VHover/VHover.js +1 -0
- package/es5/components/VHover/VHover.js.map +1 -1
- package/es5/components/VImg/VImg.js +3 -5
- package/es5/components/VImg/VImg.js.map +1 -1
- package/es5/components/VInput/VInput.js +1 -0
- package/es5/components/VInput/VInput.js.map +1 -1
- package/es5/components/VItemGroup/VItem.js +2 -1
- package/es5/components/VItemGroup/VItem.js.map +1 -1
- package/es5/components/VItemGroup/VItemGroup.js +5 -1
- package/es5/components/VItemGroup/VItemGroup.js.map +1 -1
- package/es5/components/VLazy/VLazy.js +8 -15
- package/es5/components/VLazy/VLazy.js.map +1 -1
- package/es5/components/VList/VListGroup.js +3 -11
- package/es5/components/VList/VListGroup.js.map +1 -1
- package/es5/components/VList/VListItem.js +26 -12
- package/es5/components/VList/VListItem.js.map +1 -1
- package/es5/components/VList/VListItemAction.js +23 -9
- package/es5/components/VList/VListItemAction.js.map +1 -1
- package/es5/components/VMenu/VMenu.js +1 -0
- package/es5/components/VMenu/VMenu.js.map +1 -1
- package/es5/components/VNavigationDrawer/VNavigationDrawer.js +1 -7
- package/es5/components/VNavigationDrawer/VNavigationDrawer.js.map +1 -1
- package/es5/components/VOtpInput/VOtpInput.js +1 -5
- package/es5/components/VOtpInput/VOtpInput.js.map +1 -1
- package/es5/components/VOverflowBtn/VOverflowBtn.js +1 -0
- package/es5/components/VOverflowBtn/VOverflowBtn.js.map +1 -1
- package/es5/components/VOverlay/VOverlay.js +1 -0
- package/es5/components/VOverlay/VOverlay.js.map +1 -1
- package/es5/components/VPagination/VPagination.js +1 -3
- package/es5/components/VPagination/VPagination.js.map +1 -1
- package/es5/components/VPicker/VPicker.js +2 -3
- package/es5/components/VPicker/VPicker.js.map +1 -1
- package/es5/components/VProgressCircular/VProgressCircular.js +1 -10
- package/es5/components/VProgressCircular/VProgressCircular.js.map +1 -1
- package/es5/components/VProgressLinear/VProgressLinear.js +4 -12
- package/es5/components/VProgressLinear/VProgressLinear.js.map +1 -1
- package/es5/components/VRadioGroup/VRadio.js +1 -0
- package/es5/components/VRadioGroup/VRadio.js.map +1 -1
- package/es5/components/VSelect/VSelect.js +111 -64
- package/es5/components/VSelect/VSelect.js.map +1 -1
- package/es5/components/VSelect/VSelectList.js +13 -17
- package/es5/components/VSelect/VSelectList.js.map +1 -1
- package/es5/components/VSlideGroup/VSlideGroup.js +1 -4
- package/es5/components/VSlideGroup/VSlideGroup.js.map +1 -1
- package/es5/components/VSlideGroup/VSlideItem.js +2 -1
- package/es5/components/VSlideGroup/VSlideItem.js.map +1 -1
- package/es5/components/VSlider/VSlider.js +0 -3
- package/es5/components/VSlider/VSlider.js.map +1 -1
- package/es5/components/VSnackbar/VSnackbar.js +1 -0
- package/es5/components/VSnackbar/VSnackbar.js.map +1 -1
- package/es5/components/VSparkline/VSparkline.js +48 -68
- package/es5/components/VSparkline/VSparkline.js.map +1 -1
- package/es5/components/VSpeedDial/VSpeedDial.js +4 -10
- package/es5/components/VSpeedDial/VSpeedDial.js.map +1 -1
- package/es5/components/VStepper/VStepper.js +1 -0
- package/es5/components/VStepper/VStepper.js.map +1 -1
- package/es5/components/VStepper/VStepperStep.js +11 -19
- package/es5/components/VStepper/VStepperStep.js.map +1 -1
- package/es5/components/VSwitch/VSwitch.js +1 -3
- package/es5/components/VSwitch/VSwitch.js.map +1 -1
- package/es5/components/VTabs/VTab.js +1 -0
- package/es5/components/VTabs/VTab.js.map +1 -1
- package/es5/components/VTabs/VTabs.js +11 -4
- package/es5/components/VTabs/VTabs.js.map +1 -1
- package/es5/components/VTabs/VTabsItems.js +1 -0
- package/es5/components/VTabs/VTabsItems.js.map +1 -1
- package/es5/components/VTextField/VTextField.js +31 -27
- package/es5/components/VTextField/VTextField.js.map +1 -1
- package/es5/components/VTimePicker/VTimePicker.js +72 -44
- package/es5/components/VTimePicker/VTimePicker.js.map +1 -1
- package/es5/components/VTimePicker/VTimePickerClock.js +37 -48
- package/es5/components/VTimePicker/VTimePickerClock.js.map +1 -1
- package/es5/components/VTimePicker/VTimePickerTitle.js +13 -11
- package/es5/components/VTimePicker/VTimePickerTitle.js.map +1 -1
- package/es5/components/VToolbar/VToolbar.js +1 -3
- package/es5/components/VToolbar/VToolbar.js.map +1 -1
- package/es5/components/VTooltip/VTooltip.js +6 -3
- package/es5/components/VTooltip/VTooltip.js.map +1 -1
- package/es5/components/VVirtualScroll/VVirtualScroll.js +0 -3
- package/es5/components/VVirtualScroll/VVirtualScroll.js.map +1 -1
- package/es5/components/VWindow/VWindow.js +0 -3
- package/es5/components/VWindow/VWindow.js.map +1 -1
- package/es5/components/VWindow/VWindowItem.js +1 -5
- package/es5/components/VWindow/VWindowItem.js.map +1 -1
- package/es5/framework.js +1 -1
- package/es5/mixins/detachable/index.js +9 -5
- package/es5/mixins/detachable/index.js.map +1 -1
- package/lib/components/VAlert/VAlert.js +1 -0
- package/lib/components/VAlert/VAlert.js.map +1 -1
- package/lib/components/VAppBar/VAppBar.js +17 -6
- package/lib/components/VAppBar/VAppBar.js.map +1 -1
- package/lib/components/VBadge/VBadge.js +1 -0
- package/lib/components/VBadge/VBadge.js.map +1 -1
- package/lib/components/VBanner/VBanner.js +7 -11
- package/lib/components/VBanner/VBanner.js.map +1 -1
- package/lib/components/VBottomNavigation/VBottomNavigation.js +8 -7
- package/lib/components/VBottomNavigation/VBottomNavigation.js.map +1 -1
- package/lib/components/VBtn/VBtn.js +2 -2
- package/lib/components/VBtn/VBtn.js.map +1 -1
- package/lib/components/VCalendar/VCalendar.js +26 -31
- package/lib/components/VCalendar/VCalendar.js.map +1 -1
- package/lib/components/VCalendar/VCalendarCategory.js +8 -10
- package/lib/components/VCalendar/VCalendarCategory.js.map +1 -1
- package/lib/components/VCalendar/VCalendarDaily.js +21 -33
- package/lib/components/VCalendar/VCalendarDaily.js.map +1 -1
- package/lib/components/VCalendar/VCalendarMonthly.js +2 -2
- package/lib/components/VCalendar/VCalendarMonthly.js.map +1 -1
- package/lib/components/VCalendar/VCalendarWeekly.js +17 -30
- package/lib/components/VCalendar/VCalendarWeekly.js.map +1 -1
- package/lib/components/VCalendar/mixins/calendar-base.js +7 -11
- package/lib/components/VCalendar/mixins/calendar-base.js.map +1 -1
- package/lib/components/VCalendar/mixins/calendar-with-events.js +16 -39
- package/lib/components/VCalendar/mixins/calendar-with-events.js.map +1 -1
- package/lib/components/VCalendar/mixins/calendar-with-intervals.js +2 -2
- package/lib/components/VCalendar/mixins/calendar-with-intervals.js.map +1 -1
- package/lib/components/VCalendar/mixins/times.js.map +1 -1
- package/lib/components/VCarousel/VCarousel.js +12 -11
- package/lib/components/VCarousel/VCarousel.js.map +1 -1
- package/lib/components/VCheckbox/VCheckbox.js +14 -1
- package/lib/components/VCheckbox/VCheckbox.js.map +1 -1
- package/lib/components/VCheckbox/VSimpleCheckbox.js +0 -3
- package/lib/components/VCheckbox/VSimpleCheckbox.js.map +1 -1
- package/lib/components/VChip/VChip.js +14 -6
- package/lib/components/VChip/VChip.js.map +1 -1
- package/lib/components/VData/VData.js +1 -0
- package/lib/components/VData/VData.js.map +1 -1
- package/lib/components/VDataIterator/VDataFooter.js +1 -0
- package/lib/components/VDataIterator/VDataFooter.js.map +1 -1
- package/lib/components/VDataIterator/VDataIterator.js +1 -0
- package/lib/components/VDataIterator/VDataIterator.js.map +1 -1
- package/lib/components/VDataTable/VDataTable.js +2 -7
- package/lib/components/VDataTable/VDataTable.js.map +1 -1
- package/lib/components/VDataTable/VDataTableHeaderDesktop.js +1 -0
- package/lib/components/VDataTable/VDataTableHeaderDesktop.js.map +1 -1
- package/lib/components/VDataTable/VDataTableHeaderMobile.js +1 -0
- package/lib/components/VDataTable/VDataTableHeaderMobile.js.map +1 -1
- package/lib/components/VDataTable/VEditDialog.js +15 -14
- package/lib/components/VDataTable/VEditDialog.js.map +1 -1
- package/lib/components/VDataTable/mixins/header.js +0 -5
- package/lib/components/VDataTable/mixins/header.js.map +1 -1
- package/lib/components/VDatePicker/VDatePicker.js +11 -16
- package/lib/components/VDatePicker/VDatePicker.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerHeader.js +33 -20
- package/lib/components/VDatePicker/VDatePickerHeader.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerMonthTable.js +3 -1
- package/lib/components/VDatePicker/VDatePickerMonthTable.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerTitle.js +4 -3
- package/lib/components/VDatePicker/VDatePickerTitle.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerYears.js +8 -9
- package/lib/components/VDatePicker/VDatePickerYears.js.map +1 -1
- package/lib/components/VDatePicker/mixins/date-picker-table.js +17 -13
- package/lib/components/VDatePicker/mixins/date-picker-table.js.map +1 -1
- package/lib/components/VDatePicker/util/createNativeLocaleFormatter.js +4 -0
- package/lib/components/VDatePicker/util/createNativeLocaleFormatter.js.map +1 -1
- package/lib/components/VDialog/VDialog.js +1 -0
- package/lib/components/VDialog/VDialog.js.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanel.js +1 -0
- package/lib/components/VExpansionPanel/VExpansionPanel.js.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanelHeader.js +1 -4
- package/lib/components/VExpansionPanel/VExpansionPanelHeader.js.map +1 -1
- package/lib/components/VFileInput/VFileInput.js +1 -0
- package/lib/components/VFileInput/VFileInput.js.map +1 -1
- package/lib/components/VForm/VForm.js +1 -0
- package/lib/components/VForm/VForm.js.map +1 -1
- package/lib/components/VHover/VHover.js +1 -0
- package/lib/components/VHover/VHover.js.map +1 -1
- package/lib/components/VImg/VImg.js +2 -6
- package/lib/components/VImg/VImg.js.map +1 -1
- package/lib/components/VInput/VInput.js +1 -0
- package/lib/components/VInput/VInput.js.map +1 -1
- package/lib/components/VItemGroup/VItem.js +2 -1
- package/lib/components/VItemGroup/VItem.js.map +1 -1
- package/lib/components/VItemGroup/VItemGroup.js +6 -1
- package/lib/components/VItemGroup/VItemGroup.js.map +1 -1
- package/lib/components/VLazy/VLazy.js +8 -15
- package/lib/components/VLazy/VLazy.js.map +1 -1
- package/lib/components/VList/VListGroup.js +3 -5
- package/lib/components/VList/VListGroup.js.map +1 -1
- package/lib/components/VList/VListItem.js +25 -14
- package/lib/components/VList/VListItem.js.map +1 -1
- package/lib/components/VList/VListItemAction.js +15 -9
- package/lib/components/VList/VListItemAction.js.map +1 -1
- package/lib/components/VMenu/VMenu.js +1 -0
- package/lib/components/VMenu/VMenu.js.map +1 -1
- package/lib/components/VNavigationDrawer/VNavigationDrawer.js +1 -6
- package/lib/components/VNavigationDrawer/VNavigationDrawer.js.map +1 -1
- package/lib/components/VOtpInput/VOtpInput.js +2 -6
- package/lib/components/VOtpInput/VOtpInput.js.map +1 -1
- package/lib/components/VOverflowBtn/VOverflowBtn.js +1 -0
- package/lib/components/VOverflowBtn/VOverflowBtn.js.map +1 -1
- package/lib/components/VOverlay/VOverlay.js +1 -0
- package/lib/components/VOverlay/VOverlay.js.map +1 -1
- package/lib/components/VPagination/VPagination.js +1 -3
- package/lib/components/VPagination/VPagination.js.map +1 -1
- package/lib/components/VPicker/VPicker.js +3 -3
- package/lib/components/VPicker/VPicker.js.map +1 -1
- package/lib/components/VProgressCircular/VProgressCircular.js +1 -4
- package/lib/components/VProgressCircular/VProgressCircular.js.map +1 -1
- package/lib/components/VProgressLinear/VProgressLinear.js +4 -6
- package/lib/components/VProgressLinear/VProgressLinear.js.map +1 -1
- package/lib/components/VRadioGroup/VRadio.js +1 -0
- package/lib/components/VRadioGroup/VRadio.js.map +1 -1
- package/lib/components/VSelect/VSelect.js +64 -19
- package/lib/components/VSelect/VSelect.js.map +1 -1
- package/lib/components/VSelect/VSelectList.js +13 -15
- package/lib/components/VSelect/VSelectList.js.map +1 -1
- package/lib/components/VSlideGroup/VSlideGroup.js +1 -4
- package/lib/components/VSlideGroup/VSlideGroup.js.map +1 -1
- package/lib/components/VSlideGroup/VSlideItem.js +2 -1
- package/lib/components/VSlideGroup/VSlideItem.js.map +1 -1
- package/lib/components/VSlider/VSlider.js +0 -3
- package/lib/components/VSlider/VSlider.js.map +1 -1
- package/lib/components/VSnackbar/VSnackbar.js +1 -0
- package/lib/components/VSnackbar/VSnackbar.js.map +1 -1
- package/lib/components/VSparkline/VSparkline.js +48 -67
- package/lib/components/VSparkline/VSparkline.js.map +1 -1
- package/lib/components/VSpeedDial/VSpeedDial.js +3 -9
- package/lib/components/VSpeedDial/VSpeedDial.js.map +1 -1
- package/lib/components/VStepper/VStepper.js +1 -0
- package/lib/components/VStepper/VStepper.js.map +1 -1
- package/lib/components/VStepper/VStepperStep.js +7 -18
- package/lib/components/VStepper/VStepperStep.js.map +1 -1
- package/lib/components/VSwitch/VSwitch.js +1 -3
- package/lib/components/VSwitch/VSwitch.js.map +1 -1
- package/lib/components/VTabs/VTab.js +1 -0
- package/lib/components/VTabs/VTab.js.map +1 -1
- package/lib/components/VTabs/VTabs.js +14 -4
- package/lib/components/VTabs/VTabs.js.map +1 -1
- package/lib/components/VTabs/VTabsItems.js +1 -0
- package/lib/components/VTabs/VTabsItems.js.map +1 -1
- package/lib/components/VTextField/VTextField.js +6 -15
- package/lib/components/VTextField/VTextField.js.map +1 -1
- package/lib/components/VTimePicker/VTimePicker.js +65 -31
- package/lib/components/VTimePicker/VTimePicker.js.map +1 -1
- package/lib/components/VTimePicker/VTimePickerClock.js +24 -39
- package/lib/components/VTimePicker/VTimePickerClock.js.map +1 -1
- package/lib/components/VTimePicker/VTimePickerTitle.js +3 -2
- package/lib/components/VTimePicker/VTimePickerTitle.js.map +1 -1
- package/lib/components/VToolbar/VToolbar.js +1 -3
- package/lib/components/VToolbar/VToolbar.js.map +1 -1
- package/lib/components/VTooltip/VTooltip.js +1 -2
- package/lib/components/VTooltip/VTooltip.js.map +1 -1
- package/lib/components/VVirtualScroll/VVirtualScroll.js +0 -3
- package/lib/components/VVirtualScroll/VVirtualScroll.js.map +1 -1
- package/lib/components/VWindow/VWindow.js +0 -3
- package/lib/components/VWindow/VWindow.js.map +1 -1
- package/lib/components/VWindow/VWindowItem.js +2 -6
- package/lib/components/VWindow/VWindowItem.js.map +1 -1
- package/lib/framework.js +1 -1
- package/lib/mixins/detachable/index.js +9 -5
- package/lib/mixins/detachable/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/VAlert/VAlert.ts +2 -0
- package/src/components/VAppBar/VAppBar.ts +12 -3
- package/src/components/VBadge/VBadge.ts +1 -1
- package/src/components/VBanner/VBanner.ts +14 -14
- package/src/components/VBottomNavigation/VBottomNavigation.ts +10 -8
- package/src/components/VBtn/VBtn.ts +2 -2
- package/src/components/VCalendar/VCalendar.ts +29 -27
- package/src/components/VCalendar/VCalendarCategory.ts +9 -8
- package/src/components/VCalendar/VCalendarDaily.ts +18 -28
- package/src/components/VCalendar/VCalendarMonthly.ts +2 -1
- package/src/components/VCalendar/VCalendarWeekly.ts +18 -30
- package/src/components/VCalendar/__tests__/VCalendar.spec.ts +18 -34
- package/src/components/VCalendar/__tests__/VCalendarCategory.spec.ts +16 -14
- package/src/components/VCalendar/__tests__/VCalendarDaily.spec.ts +30 -28
- package/src/components/VCalendar/__tests__/__snapshots__/VCalendar.spec.ts.snap +206 -205
- package/src/components/VCalendar/__tests__/__snapshots__/VCalendarDaily.spec.ts.snap +122 -122
- package/src/components/VCalendar/mixins/__tests__/__snapshots__/calendar-with-events.spec.ts.snap +1 -56
- package/src/components/VCalendar/mixins/__tests__/calendar-base.spec.ts +24 -21
- package/src/components/VCalendar/mixins/__tests__/calendar-with-events.spec.ts +27 -34
- package/src/components/VCalendar/mixins/__tests__/calendar-with-intervals.spec.ts +31 -28
- package/src/components/VCalendar/mixins/__tests__/times.spec.ts +10 -9
- package/src/components/VCalendar/mixins/calendar-base.ts +8 -12
- package/src/components/VCalendar/mixins/calendar-with-events.ts +19 -38
- package/src/components/VCalendar/mixins/calendar-with-intervals.ts +1 -1
- package/src/components/VCalendar/mixins/times.ts +1 -1
- package/src/components/VCarousel/VCarousel.ts +13 -9
- package/src/components/VCheckbox/VCheckbox.ts +19 -1
- package/src/components/VCheckbox/VSimpleCheckbox.ts +0 -3
- package/src/components/VChip/VChip.ts +16 -13
- package/src/components/VData/VData.ts +2 -0
- package/src/components/VDataIterator/VDataFooter.ts +2 -0
- package/src/components/VDataIterator/VDataIterator.ts +2 -0
- package/src/components/VDataTable/VDataTable.ts +2 -4
- package/src/components/VDataTable/VDataTableHeaderDesktop.ts +5 -0
- package/src/components/VDataTable/VDataTableHeaderMobile.ts +2 -0
- package/src/components/VDataTable/VEditDialog.ts +19 -17
- package/src/components/VDataTable/mixins/header.ts +0 -4
- package/src/components/VDatePicker/VDatePicker.ts +13 -18
- package/src/components/VDatePicker/VDatePickerHeader.ts +44 -32
- package/src/components/VDatePicker/VDatePickerMonthTable.ts +1 -1
- package/src/components/VDatePicker/VDatePickerTitle.ts +7 -5
- package/src/components/VDatePicker/VDatePickerYears.ts +6 -10
- package/src/components/VDatePicker/__tests__/VDatePicker.date.spec.ts +302 -246
- package/src/components/VDatePicker/__tests__/VDatePicker.month.spec.ts +90 -86
- package/src/components/VDatePicker/__tests__/VDatePickerDateTable.spec.ts +76 -90
- package/src/components/VDatePicker/__tests__/VDatePickerHeader.spec.ts +96 -71
- package/src/components/VDatePicker/__tests__/VDatePickerMonthTable.spec.ts +63 -77
- package/src/components/VDatePicker/__tests__/VDatePickerTitle.spec.ts +48 -28
- package/src/components/VDatePicker/__tests__/VDatePickerYears.spec.ts +25 -22
- package/src/components/VDatePicker/__tests__/__snapshots__/VDatePicker.date.spec.ts.snap +601 -586
- package/src/components/VDatePicker/__tests__/__snapshots__/VDatePicker.month.spec.ts.snap +203 -193
- package/src/components/VDatePicker/__tests__/__snapshots__/VDatePickerDateTable.spec.ts.snap +615 -615
- package/src/components/VDatePicker/__tests__/__snapshots__/VDatePickerHeader.spec.ts.snap +52 -52
- package/src/components/VDatePicker/__tests__/__snapshots__/VDatePickerMonthTable.spec.ts.snap +144 -144
- package/src/components/VDatePicker/__tests__/__snapshots__/VDatePickerTitle.spec.ts.snap +3 -4
- package/src/components/VDatePicker/mixins/date-picker-table.ts +18 -13
- package/src/components/VDatePicker/util/__tests__/createNativeLocaleFormatter.spec.ts +7 -0
- package/src/components/VDatePicker/util/createNativeLocaleFormatter.ts +3 -0
- package/src/components/VDialog/VDialog.ts +7 -5
- package/src/components/VExpansionPanel/VExpansionPanel.ts +5 -0
- package/src/components/VExpansionPanel/VExpansionPanelHeader.ts +0 -1
- package/src/components/VFileInput/VFileInput.ts +2 -0
- package/src/components/VForm/VForm.ts +2 -0
- package/src/components/VHover/VHover.ts +2 -0
- package/src/components/VImg/VImg.ts +2 -1
- package/src/components/VInput/VInput.ts +2 -0
- package/src/components/VItemGroup/VItem.ts +4 -0
- package/src/components/VItemGroup/VItemGroup.ts +7 -1
- package/src/components/VLazy/VLazy.ts +11 -13
- package/src/components/VList/VListGroup.ts +7 -8
- package/src/components/VList/VListItem.ts +29 -15
- package/src/components/VList/VListItemAction.ts +11 -10
- package/src/components/VMenu/VMenu.ts +3 -1
- package/src/components/VNavigationDrawer/VNavigationDrawer.ts +2 -5
- package/src/components/VOtpInput/VOtpInput.ts +2 -3
- package/src/components/VOverflowBtn/VOverflowBtn.ts +2 -0
- package/src/components/VOverlay/VOverlay.ts +2 -0
- package/src/components/VPagination/VPagination.ts +2 -1
- package/src/components/VPicker/VPicker.ts +8 -10
- package/src/components/VPicker/__tests__/VPicker.spec.ts +14 -15
- package/src/components/VProgressCircular/VProgressCircular.ts +0 -1
- package/src/components/VProgressLinear/VProgressLinear.ts +14 -13
- package/src/components/VRadioGroup/VRadio.ts +2 -0
- package/src/components/VSelect/VSelect.ts +59 -19
- package/src/components/VSelect/VSelectList.ts +13 -9
- package/src/components/VSlideGroup/VSlideGroup.ts +2 -4
- package/src/components/VSlideGroup/VSlideItem.ts +2 -0
- package/src/components/VSlider/VSlider.ts +0 -3
- package/src/components/VSnackbar/VSnackbar.ts +1 -1
- package/src/components/VSparkline/VSparkline.ts +54 -92
- package/src/components/VSpeedDial/VSpeedDial.ts +6 -8
- package/src/components/VStepper/VStepper.ts +3 -1
- package/src/components/VStepper/VStepperStep.ts +8 -15
- package/src/components/VSwitch/VSwitch.ts +4 -5
- package/src/components/VTabs/VTab.ts +2 -0
- package/src/components/VTabs/VTabs.ts +16 -10
- package/src/components/VTabs/VTabsItems.ts +2 -0
- package/src/components/VTextField/VTextField.ts +9 -12
- package/src/components/VTimePicker/VTimePicker.ts +199 -89
- package/src/components/VTimePicker/VTimePickerClock.ts +40 -45
- package/src/components/VTimePicker/VTimePickerTitle.ts +5 -4
- package/src/components/VTimePicker/__tests__/VTimePicker.spec.ts +153 -140
- package/src/components/VTimePicker/__tests__/VTimePickerClock.spec.ts +78 -81
- package/src/components/VTimePicker/__tests__/VTimePickerTitle.spec.ts +47 -41
- package/src/components/VTimePicker/__tests__/__snapshots__/VTimePicker.spec.ts.snap +160 -40
- package/src/components/VToolbar/VToolbar.ts +1 -1
- package/src/components/VTooltip/VTooltip.ts +1 -1
- package/src/components/VVirtualScroll/VVirtualScroll.ts +0 -1
- package/src/components/VWindow/VWindow.ts +0 -1
- package/src/components/VWindow/VWindowItem.ts +2 -3
- package/src/mixins/detachable/index.ts +11 -5
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {h} from 'vue'
|
|
1
|
+
import { h, defineComponent, VNode, Component, withDirectives } from 'vue'
|
|
2
2
|
// Styles
|
|
3
3
|
// import '../../stylus/components/_calendar-daily.styl'
|
|
4
4
|
|
|
5
|
-
//
|
|
6
|
-
import
|
|
5
|
+
// Directives
|
|
6
|
+
import Resize from '../../directives/resize'
|
|
7
7
|
|
|
8
8
|
// Mixins
|
|
9
9
|
import CalendarWithEvents from './mixins/calendar-with-events'
|
|
@@ -51,6 +51,8 @@ interface VCalendarRenderProps {
|
|
|
51
51
|
/* @vue/component */
|
|
52
52
|
export default defineComponent({
|
|
53
53
|
name: 'v-calendar',
|
|
54
|
+
|
|
55
|
+
|
|
54
56
|
extends: CalendarWithEvents,
|
|
55
57
|
|
|
56
58
|
props: {
|
|
@@ -60,6 +62,8 @@ export default defineComponent({
|
|
|
60
62
|
...props.category,
|
|
61
63
|
},
|
|
62
64
|
|
|
65
|
+
emits: ['change', 'update:modelValue', 'moved', 'click:date'],
|
|
66
|
+
|
|
63
67
|
data: () => ({
|
|
64
68
|
lastStart: null as CalendarTimestamp | null,
|
|
65
69
|
lastEnd: null as CalendarTimestamp | null,
|
|
@@ -236,11 +240,11 @@ export default defineComponent({
|
|
|
236
240
|
updateRelative(moved, this.times.now)
|
|
237
241
|
|
|
238
242
|
if (this.value instanceof Date) {
|
|
239
|
-
this.$emit('
|
|
243
|
+
this.$emit('update:modelValue', timestampToDate(moved))
|
|
240
244
|
} else if (typeof this.value === 'number') {
|
|
241
|
-
this.$emit('
|
|
245
|
+
this.$emit('update:modelValue', timestampToDate(moved).getTime())
|
|
242
246
|
} else {
|
|
243
|
-
this.$emit('
|
|
247
|
+
this.$emit('update:modelValue', moved.date)
|
|
244
248
|
}
|
|
245
249
|
|
|
246
250
|
this.$emit('moved', moved)
|
|
@@ -252,7 +256,7 @@ export default defineComponent({
|
|
|
252
256
|
this.move(-amount)
|
|
253
257
|
},
|
|
254
258
|
timeToY (time: VTime, clamp = true): number | false {
|
|
255
|
-
const c = this.$
|
|
259
|
+
const c = this.$refs.calendarChild as any
|
|
256
260
|
|
|
257
261
|
if (c && c.timeToY) {
|
|
258
262
|
return c.timeToY(time, clamp)
|
|
@@ -261,7 +265,7 @@ export default defineComponent({
|
|
|
261
265
|
}
|
|
262
266
|
},
|
|
263
267
|
timeDelta (time: VTime): number | false {
|
|
264
|
-
const c = this.$
|
|
268
|
+
const c = this.$refs.calendarChild as any
|
|
265
269
|
|
|
266
270
|
if (c && c.timeDelta) {
|
|
267
271
|
return c.timeDelta(time)
|
|
@@ -270,7 +274,7 @@ export default defineComponent({
|
|
|
270
274
|
}
|
|
271
275
|
},
|
|
272
276
|
minutesToPixels (minutes: number): number {
|
|
273
|
-
const c = this.$
|
|
277
|
+
const c = this.$refs.calendarChild as any
|
|
274
278
|
|
|
275
279
|
if (c && c.minutesToPixels) {
|
|
276
280
|
return c.minutesToPixels(minutes)
|
|
@@ -279,7 +283,7 @@ export default defineComponent({
|
|
|
279
283
|
}
|
|
280
284
|
},
|
|
281
285
|
scrollToTime (time: VTime): boolean {
|
|
282
|
-
const c = this.$
|
|
286
|
+
const c = this.$refs.calendarChild as any
|
|
283
287
|
|
|
284
288
|
if (c && c.scrollToTime) {
|
|
285
289
|
return c.scrollToTime(time)
|
|
@@ -350,32 +354,30 @@ export default defineComponent({
|
|
|
350
354
|
render (): VNode {
|
|
351
355
|
const { start, end, maxDays, component, weekdays, categories } = this.renderProps
|
|
352
356
|
|
|
353
|
-
|
|
357
|
+
// Only pass categories prop to VCalendarCategory component
|
|
358
|
+
const props: any = {
|
|
359
|
+
ref: 'calendarChild',
|
|
354
360
|
class: ['v-calendar', {
|
|
355
361
|
'v-calendar-events': !this.noEvents,
|
|
356
362
|
}],
|
|
357
|
-
...this.$props,
|
|
358
363
|
start: start.date,
|
|
359
364
|
end: end.date,
|
|
360
365
|
maxDays,
|
|
361
366
|
weekdays,
|
|
362
|
-
categories,
|
|
363
367
|
role: 'grid',
|
|
364
|
-
directives: [{
|
|
365
|
-
modifiers: { quiet: true },
|
|
366
|
-
name: 'resize',
|
|
367
|
-
value: this.updateEventVisibility,
|
|
368
|
-
}],
|
|
369
|
-
...this.$listeners,
|
|
370
368
|
'onClick:date': (day: CalendarTimestamp, e?: MouseEvent) => {
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
}
|
|
374
|
-
if (this.$listeners['click:date']) {
|
|
375
|
-
this.$emit('click:date', day, e)
|
|
376
|
-
}
|
|
369
|
+
this.$emit('update:modelValue', day.date)
|
|
370
|
+
this.$emit('click:date', day, e)
|
|
377
371
|
},
|
|
378
|
-
|
|
379
|
-
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
// Only add categories prop for VCalendarCategory component
|
|
375
|
+
if (component.name === 'v-calendar-category') {
|
|
376
|
+
props.categories = categories
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
return withDirectives(h(component, props, this.getScopedSlots()), [
|
|
380
|
+
[Resize, this.updateEventVisibility, '', { quiet: true }],
|
|
381
|
+
])
|
|
380
382
|
},
|
|
381
383
|
})
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { h, defineComponent } from 'vue'
|
|
2
|
+
|
|
1
3
|
// Styles
|
|
2
4
|
import './VCalendarCategory.sass'
|
|
3
5
|
|
|
4
6
|
// Types
|
|
5
|
-
import { VNode
|
|
7
|
+
import { VNode } from 'vue'
|
|
6
8
|
|
|
7
9
|
// Mixins
|
|
8
10
|
import VCalendarDaily from './VCalendarDaily'
|
|
@@ -59,7 +61,7 @@ export default defineComponent({
|
|
|
59
61
|
const headerTitle = typeof scope.category === 'object' ? scope.category.categoryName : scope.category
|
|
60
62
|
return h('div', {
|
|
61
63
|
class: 'v-calendar-category__column-header',
|
|
62
|
-
|
|
64
|
+
...this.getDefaultMouseEventHandlers(':day-category', e => {
|
|
63
65
|
return this.getCategoryScope(this.getSlotScope(day), scope.category)
|
|
64
66
|
}),
|
|
65
67
|
}, [
|
|
@@ -85,9 +87,8 @@ export default defineComponent({
|
|
|
85
87
|
const category = this.parsedCategories[categoryIndex]
|
|
86
88
|
return h('div', {
|
|
87
89
|
key: day.date + '-' + categoryIndex,
|
|
88
|
-
class: 'v-calendar-daily__day',
|
|
89
|
-
|
|
90
|
-
on: this.getDefaultMouseEventHandlers(':time', e => {
|
|
90
|
+
class: ['v-calendar-daily__day', this.getRelativeClasses(day)],
|
|
91
|
+
...this.getDefaultMouseEventHandlers(':time', e => {
|
|
91
92
|
return this.getSlotScope(this.getTimestampAtEvent(e, day))
|
|
92
93
|
}),
|
|
93
94
|
}, [
|
|
@@ -111,7 +112,7 @@ export default defineComponent({
|
|
|
111
112
|
},
|
|
112
113
|
}
|
|
113
114
|
|
|
114
|
-
const children = getSlot(this, 'interval',
|
|
115
|
+
const children = getSlot(this, 'interval',
|
|
115
116
|
this.getCategoryScope(this.getSlotScope(interval), category)
|
|
116
117
|
)
|
|
117
118
|
|
|
@@ -129,12 +130,12 @@ export default defineComponent({
|
|
|
129
130
|
genDayBodyCategory (day: CalendarTimestamp, category: CalendarCategory): VNode {
|
|
130
131
|
const data = {
|
|
131
132
|
class: 'v-calendar-category__column',
|
|
132
|
-
|
|
133
|
+
...this.getDefaultMouseEventHandlers(':time-category', e => {
|
|
133
134
|
return this.getCategoryScope(this.getSlotScope(this.getTimestampAtEvent(e, day)), category)
|
|
134
135
|
}),
|
|
135
136
|
}
|
|
136
137
|
|
|
137
|
-
const children = getSlot(this, 'day-body',
|
|
138
|
+
const children = getSlot(this, 'day-body', this.getCategoryScope(this.getSlotScope(day), category))
|
|
138
139
|
|
|
139
140
|
return h('div', data, children)
|
|
140
141
|
},
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import {h} from 'vue'
|
|
1
|
+
import { h, defineComponent, withDirectives, VNode } from 'vue'
|
|
2
2
|
// Styles
|
|
3
3
|
import './VCalendarDaily.sass'
|
|
4
4
|
|
|
5
|
-
// Types
|
|
6
|
-
import { VNode, defineComponent } from 'vue'
|
|
7
|
-
|
|
8
5
|
// Directives
|
|
9
6
|
import Resize from '../../directives/resize'
|
|
10
7
|
|
|
@@ -21,9 +18,9 @@ import { CalendarTimestamp } from 'vuetify/types'
|
|
|
21
18
|
/* @vue/component */
|
|
22
19
|
export default defineComponent({
|
|
23
20
|
name: 'v-calendar-daily',
|
|
24
|
-
extends: CalendarWithIntervals,
|
|
25
21
|
|
|
26
|
-
|
|
22
|
+
|
|
23
|
+
extends: CalendarWithIntervals,
|
|
27
24
|
|
|
28
25
|
data: () => ({
|
|
29
26
|
scrollPush: 0,
|
|
@@ -82,9 +79,8 @@ export default defineComponent({
|
|
|
82
79
|
genHeadDay (day: CalendarTimestamp, index: number): VNode {
|
|
83
80
|
return h('div', {
|
|
84
81
|
key: day.date,
|
|
85
|
-
class: 'v-calendar-daily_head-day',
|
|
86
|
-
|
|
87
|
-
on: this.getDefaultMouseEventHandlers(':day', nativeEvent => {
|
|
82
|
+
class: ['v-calendar-daily_head-day', this.getRelativeClasses(day)],
|
|
83
|
+
...this.getDefaultMouseEventHandlers(':day', nativeEvent => {
|
|
88
84
|
return { nativeEvent, ...this.getSlotScope(day) }
|
|
89
85
|
}),
|
|
90
86
|
}, [
|
|
@@ -94,9 +90,9 @@ export default defineComponent({
|
|
|
94
90
|
])
|
|
95
91
|
},
|
|
96
92
|
genDayHeader (day: CalendarTimestamp, index: number): VNode[] {
|
|
97
|
-
return getSlot(this, 'day-header',
|
|
93
|
+
return getSlot(this, 'day-header', {
|
|
98
94
|
week: this.days, ...day, index,
|
|
99
|
-
})
|
|
95
|
+
}) || []
|
|
100
96
|
},
|
|
101
97
|
genHeadWeekday (day: CalendarTimestamp): VNode {
|
|
102
98
|
const color = day.present ? this.color : undefined
|
|
@@ -123,7 +119,7 @@ export default defineComponent({
|
|
|
123
119
|
}, nativeEvent => {
|
|
124
120
|
return { nativeEvent, ...day }
|
|
125
121
|
}),
|
|
126
|
-
}, this.dayFormatter(day, false))
|
|
122
|
+
}, { default: () => this.dayFormatter(day, false) })
|
|
127
123
|
},
|
|
128
124
|
genBody (): VNode {
|
|
129
125
|
return h('div', {
|
|
@@ -165,9 +161,8 @@ export default defineComponent({
|
|
|
165
161
|
genDay (day: CalendarTimestamp, index: number): VNode {
|
|
166
162
|
return h('div', {
|
|
167
163
|
key: day.date,
|
|
168
|
-
class: 'v-calendar-daily__day',
|
|
169
|
-
|
|
170
|
-
on: this.getDefaultMouseEventHandlers(':time', nativeEvent => {
|
|
164
|
+
class: ['v-calendar-daily__day', this.getRelativeClasses(day)],
|
|
165
|
+
...this.getDefaultMouseEventHandlers(':time', nativeEvent => {
|
|
171
166
|
return { nativeEvent, ...this.getSlotScope(this.getTimestampAtEvent(nativeEvent, day)) }
|
|
172
167
|
}),
|
|
173
168
|
}, [
|
|
@@ -176,7 +171,7 @@ export default defineComponent({
|
|
|
176
171
|
])
|
|
177
172
|
},
|
|
178
173
|
genDayBody (day: CalendarTimestamp): VNode[] {
|
|
179
|
-
return getSlot(this, 'day-body',
|
|
174
|
+
return getSlot(this, 'day-body', this.getSlotScope(day)) || []
|
|
180
175
|
},
|
|
181
176
|
genDayIntervals (index: number): VNode[] {
|
|
182
177
|
return this.intervals[index].map(this.genDayInterval)
|
|
@@ -195,7 +190,7 @@ export default defineComponent({
|
|
|
195
190
|
|
|
196
191
|
}
|
|
197
192
|
|
|
198
|
-
const children = getSlot(this, 'interval',
|
|
193
|
+
const children = getSlot(this, 'interval', this.getSlotScope(interval))
|
|
199
194
|
|
|
200
195
|
return h('div', data, children)
|
|
201
196
|
},
|
|
@@ -206,7 +201,7 @@ export default defineComponent({
|
|
|
206
201
|
style: {
|
|
207
202
|
width,
|
|
208
203
|
},
|
|
209
|
-
|
|
204
|
+
...this.getDefaultMouseEventHandlers(':interval', nativeEvent => {
|
|
210
205
|
return { nativeEvent, ...this.getTimestampAtEvent(nativeEvent, this.parsedStart) }
|
|
211
206
|
}),
|
|
212
207
|
}
|
|
@@ -240,21 +235,16 @@ export default defineComponent({
|
|
|
240
235
|
},
|
|
241
236
|
|
|
242
237
|
render (): VNode {
|
|
243
|
-
return h('div', {
|
|
238
|
+
return withDirectives(h('div', {
|
|
244
239
|
class: this.classes,
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
e.preventDefault()
|
|
248
|
-
},
|
|
240
|
+
onDragstart: (e: MouseEvent) => {
|
|
241
|
+
e.preventDefault()
|
|
249
242
|
},
|
|
250
|
-
directives: [{
|
|
251
|
-
modifiers: { quiet: true },
|
|
252
|
-
name: 'resize',
|
|
253
|
-
value: this.onResize,
|
|
254
|
-
}],
|
|
255
243
|
}, [
|
|
256
244
|
!this.hideHeader ? this.genHead() : '',
|
|
257
245
|
this.genBody(),
|
|
246
|
+
]), [
|
|
247
|
+
[Resize, this.onResize, '', { quiet: true }],
|
|
258
248
|
])
|
|
259
249
|
},
|
|
260
250
|
})
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { defineComponent } from 'vue'
|
|
2
|
+
|
|
1
3
|
// Styles
|
|
2
4
|
import './VCalendarWeekly.sass'
|
|
3
5
|
|
|
@@ -7,7 +9,6 @@ import VCalendarWeekly from './VCalendarWeekly'
|
|
|
7
9
|
// Util
|
|
8
10
|
import { parseTimestamp, getStartOfMonth, getEndOfMonth } from './util/timestamp'
|
|
9
11
|
import { CalendarTimestamp } from 'vuetify/types'
|
|
10
|
-
import { defineComponent } from 'vue'
|
|
11
12
|
|
|
12
13
|
/* @vue/component */
|
|
13
14
|
export default defineComponent({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {h} from 'vue'
|
|
1
|
+
import { h, defineComponent } from 'vue'
|
|
2
2
|
// Styles
|
|
3
3
|
import './VCalendarWeekly.sass'
|
|
4
4
|
|
|
5
5
|
// Types
|
|
6
|
-
import { VNode
|
|
6
|
+
import { VNode } from 'vue'
|
|
7
7
|
|
|
8
8
|
// Components
|
|
9
9
|
import VBtn from '../VBtn'
|
|
@@ -92,9 +92,7 @@ export default defineComponent({
|
|
|
92
92
|
genHead (): VNode {
|
|
93
93
|
return h('div', {
|
|
94
94
|
class: 'v-calendar-weekly__head',
|
|
95
|
-
|
|
96
|
-
role: 'row',
|
|
97
|
-
},
|
|
95
|
+
role: 'row',
|
|
98
96
|
}, this.genHeadDays())
|
|
99
97
|
},
|
|
100
98
|
genHeadDays (): VNode[] {
|
|
@@ -114,11 +112,8 @@ export default defineComponent({
|
|
|
114
112
|
|
|
115
113
|
return h('div', this.setTextColor(color, {
|
|
116
114
|
key: day.date,
|
|
117
|
-
class: 'v-calendar-weekly__head-weekday',
|
|
118
|
-
|
|
119
|
-
attrs: {
|
|
120
|
-
role: 'columnheader',
|
|
121
|
-
},
|
|
115
|
+
class: ['v-calendar-weekly__head-weekday', this.getRelativeClasses(day, outside)],
|
|
116
|
+
role: 'columnheader',
|
|
122
117
|
}), this.weekdayFormatter(day, this.shortWeekdays))
|
|
123
118
|
},
|
|
124
119
|
genWeeks (): VNode[] {
|
|
@@ -142,9 +137,7 @@ export default defineComponent({
|
|
|
142
137
|
return h('div', {
|
|
143
138
|
key: week[0].date,
|
|
144
139
|
class: 'v-calendar-weekly__week',
|
|
145
|
-
|
|
146
|
-
role: 'row',
|
|
147
|
-
},
|
|
140
|
+
role: 'row',
|
|
148
141
|
}, weekNodes)
|
|
149
142
|
},
|
|
150
143
|
getWeekNumber (determineDay: CalendarTimestamp) {
|
|
@@ -168,17 +161,14 @@ export default defineComponent({
|
|
|
168
161
|
|
|
169
162
|
return h('div', {
|
|
170
163
|
key: day.date,
|
|
171
|
-
class: 'v-calendar-weekly__day',
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
role: 'cell',
|
|
175
|
-
},
|
|
176
|
-
on: this.getDefaultMouseEventHandlers(':day', nativeEvent => {
|
|
164
|
+
class: ['v-calendar-weekly__day', this.getRelativeClasses(day, outside)],
|
|
165
|
+
role: 'cell',
|
|
166
|
+
...this.getDefaultMouseEventHandlers(':day', nativeEvent => {
|
|
177
167
|
return { nativeEvent, ...day }
|
|
178
168
|
}),
|
|
179
169
|
}, [
|
|
180
170
|
this.genDayLabel(day),
|
|
181
|
-
...(getSlot(this, 'day',
|
|
171
|
+
...(getSlot(this, 'day', { outside, index, week, ...day }) || []),
|
|
182
172
|
])
|
|
183
173
|
},
|
|
184
174
|
genDayLabel (day: CalendarTimestamp): VNode {
|
|
@@ -199,10 +189,11 @@ export default defineComponent({
|
|
|
199
189
|
'click:date': { event: 'click', stop: true },
|
|
200
190
|
'contextmenu:date': { event: 'contextmenu', stop: true, prevent: true, result: false },
|
|
201
191
|
}, nativeEvent => ({ nativeEvent, ...day })),
|
|
202
|
-
},
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
192
|
+
}, {
|
|
193
|
+
default: () => hasMonth
|
|
194
|
+
? this.monthFormatter(day, this.shortMonths) + ' ' + this.dayFormatter(day, false)
|
|
195
|
+
: this.dayFormatter(day, false)
|
|
196
|
+
})
|
|
206
197
|
},
|
|
207
198
|
genDayMonth (day: CalendarTimestamp): VNode | string {
|
|
208
199
|
const color = day.present ? this.color : undefined
|
|
@@ -215,12 +206,9 @@ export default defineComponent({
|
|
|
215
206
|
|
|
216
207
|
render (): VNode {
|
|
217
208
|
return h('div', {
|
|
218
|
-
class: this.staticClass,
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
dragstart: (e: MouseEvent) => {
|
|
222
|
-
e.preventDefault()
|
|
223
|
-
},
|
|
209
|
+
class: [this.staticClass, this.classes],
|
|
210
|
+
onDragstart: (e: MouseEvent) => {
|
|
211
|
+
e.preventDefault()
|
|
224
212
|
},
|
|
225
213
|
}, [
|
|
226
214
|
!this.hideHeader ? this.genHead() : '',
|
|
@@ -2,23 +2,22 @@ import { parseDate } from '../util/timestamp'
|
|
|
2
2
|
import VCalendar from '../VCalendar'
|
|
3
3
|
import {
|
|
4
4
|
mount,
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
VueWrapper,
|
|
6
|
+
MountingOptions,
|
|
7
7
|
} from '@vue/test-utils'
|
|
8
|
-
import { ExtractVue } from '../../../util/mixins'
|
|
9
8
|
|
|
10
9
|
describe('VCalendar', () => {
|
|
11
|
-
type Instance =
|
|
12
|
-
let mountFunction: (options?:
|
|
10
|
+
type Instance = InstanceType<typeof VCalendar>
|
|
11
|
+
let mountFunction: (options?: MountingOptions<Instance>) => VueWrapper<Instance>
|
|
13
12
|
beforeEach(() => {
|
|
14
|
-
mountFunction = (options?:
|
|
13
|
+
mountFunction = (options?: MountingOptions<Instance>) => {
|
|
15
14
|
return mount(VCalendar, {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
global: {
|
|
16
|
+
mocks: {
|
|
17
|
+
$vuetify: {
|
|
18
|
+
lang: {
|
|
19
|
+
current: 'en-US',
|
|
20
|
+
},
|
|
22
21
|
},
|
|
23
22
|
},
|
|
24
23
|
},
|
|
@@ -29,15 +28,12 @@ describe('VCalendar', () => {
|
|
|
29
28
|
|
|
30
29
|
it('should render day view', async () => {
|
|
31
30
|
const wrapper = mountFunction({
|
|
32
|
-
|
|
31
|
+
props: {
|
|
33
32
|
type: 'day',
|
|
34
33
|
start: '2018-01-29',
|
|
35
34
|
end: '2018-02-04',
|
|
36
35
|
now: '2019-02-17',
|
|
37
36
|
},
|
|
38
|
-
methods: {
|
|
39
|
-
getNow: () => parseDate(new Date('2019-02-17')),
|
|
40
|
-
},
|
|
41
37
|
})
|
|
42
38
|
|
|
43
39
|
expect(wrapper.classes('v-calendar-daily')).toBeTruthy()
|
|
@@ -46,15 +42,12 @@ describe('VCalendar', () => {
|
|
|
46
42
|
|
|
47
43
|
it('should render 4-day view', async () => {
|
|
48
44
|
const wrapper = mountFunction({
|
|
49
|
-
|
|
45
|
+
props: {
|
|
50
46
|
type: '4day',
|
|
51
47
|
start: '2018-01-29',
|
|
52
48
|
end: '2018-02-04',
|
|
53
49
|
now: '2019-02-17',
|
|
54
50
|
},
|
|
55
|
-
methods: {
|
|
56
|
-
getNow: () => parseDate(new Date('2019-02-17')),
|
|
57
|
-
},
|
|
58
51
|
})
|
|
59
52
|
|
|
60
53
|
expect(wrapper.classes('v-calendar-daily')).toBeTruthy()
|
|
@@ -63,15 +56,12 @@ describe('VCalendar', () => {
|
|
|
63
56
|
|
|
64
57
|
it('should render week view', async () => {
|
|
65
58
|
const wrapper = mountFunction({
|
|
66
|
-
|
|
59
|
+
props: {
|
|
67
60
|
type: 'week',
|
|
68
61
|
start: '2018-01-29',
|
|
69
62
|
end: '2018-02-04',
|
|
70
63
|
now: '2019-02-17',
|
|
71
64
|
},
|
|
72
|
-
methods: {
|
|
73
|
-
getNow: () => parseDate(new Date('2019-02-17')),
|
|
74
|
-
},
|
|
75
65
|
})
|
|
76
66
|
|
|
77
67
|
expect(wrapper.classes('v-calendar-daily')).toBeTruthy()
|
|
@@ -80,15 +70,12 @@ describe('VCalendar', () => {
|
|
|
80
70
|
|
|
81
71
|
it('should render month view', async () => {
|
|
82
72
|
const wrapper = mountFunction({
|
|
83
|
-
|
|
73
|
+
props: {
|
|
84
74
|
type: 'month',
|
|
85
75
|
start: '2018-01-29',
|
|
86
76
|
end: '2018-02-04',
|
|
87
77
|
now: '2019-02-17',
|
|
88
78
|
},
|
|
89
|
-
methods: {
|
|
90
|
-
getNow: () => parseDate(new Date('2019-02-17')),
|
|
91
|
-
},
|
|
92
79
|
})
|
|
93
80
|
|
|
94
81
|
expect(wrapper.classes('v-calendar-monthly')).toBeTruthy()
|
|
@@ -97,7 +84,7 @@ describe('VCalendar', () => {
|
|
|
97
84
|
|
|
98
85
|
it('should parse value', async () => {
|
|
99
86
|
const wrapper = mountFunction({
|
|
100
|
-
|
|
87
|
+
props: {
|
|
101
88
|
value: '2019-02-02',
|
|
102
89
|
start: '2019-01-29',
|
|
103
90
|
end: '2019-02-04',
|
|
@@ -109,7 +96,7 @@ describe('VCalendar', () => {
|
|
|
109
96
|
|
|
110
97
|
it('should parse start', async () => {
|
|
111
98
|
const wrapper = mountFunction({
|
|
112
|
-
|
|
99
|
+
props: {
|
|
113
100
|
start: '2019-01-29',
|
|
114
101
|
end: '2019-02-04',
|
|
115
102
|
},
|
|
@@ -120,16 +107,13 @@ describe('VCalendar', () => {
|
|
|
120
107
|
|
|
121
108
|
it('should go to correct day when using next/prev public functions', async () => {
|
|
122
109
|
const wrapper = mountFunction({
|
|
123
|
-
|
|
110
|
+
props: {
|
|
124
111
|
value: '2019-01-11',
|
|
125
112
|
type: 'day',
|
|
126
113
|
weekdays: [1, 2, 3, 4, 5],
|
|
127
114
|
},
|
|
128
115
|
})
|
|
129
116
|
|
|
130
|
-
const input = jest.fn(value => wrapper.setProps({ value }))
|
|
131
|
-
wrapper.vm.$on('input', input)
|
|
132
|
-
|
|
133
117
|
expect(wrapper.html()).toMatchSnapshot()
|
|
134
118
|
|
|
135
119
|
wrapper.vm.next()
|
|
@@ -1,32 +1,34 @@
|
|
|
1
1
|
import {
|
|
2
2
|
mount,
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
VueWrapper,
|
|
4
|
+
MountingOptions,
|
|
5
5
|
} from '@vue/test-utils'
|
|
6
6
|
import { ExtractVue } from '../../../util/mixins'
|
|
7
7
|
import VCalendar from '../VCalendar'
|
|
8
8
|
|
|
9
9
|
describe('VCalendarCategory', () => {
|
|
10
10
|
type Instance = ExtractVue<typeof VCalendar>
|
|
11
|
-
let mountFunction: (options?:
|
|
11
|
+
let mountFunction: (options?: MountingOptions<Instance>) => VueWrapper<Instance>
|
|
12
12
|
beforeEach(() => {
|
|
13
|
-
mountFunction = (options?:
|
|
13
|
+
mountFunction = (options?: MountingOptions<Instance>) => {
|
|
14
14
|
return mount(VCalendar, {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
global: {
|
|
16
|
+
mocks: {
|
|
17
|
+
$vuetify: {
|
|
18
|
+
lang: {
|
|
19
|
+
current: 'en-US',
|
|
20
|
+
},
|
|
20
21
|
},
|
|
21
22
|
},
|
|
22
23
|
},
|
|
24
|
+
...options,
|
|
23
25
|
})
|
|
24
26
|
}
|
|
25
27
|
})
|
|
26
28
|
|
|
27
29
|
it('should test categoryText prop as a string', () => {
|
|
28
30
|
const wrapper = mountFunction({
|
|
29
|
-
|
|
31
|
+
props: {
|
|
30
32
|
type: 'category',
|
|
31
33
|
events: [{ start: new Date(), category: 'Nate' }],
|
|
32
34
|
categories: [{ name: 'Nate' }],
|
|
@@ -39,7 +41,7 @@ describe('VCalendarCategory', () => {
|
|
|
39
41
|
|
|
40
42
|
it('should test categoryText prop as a function', () => {
|
|
41
43
|
const wrapper = mountFunction({
|
|
42
|
-
|
|
44
|
+
props: {
|
|
43
45
|
type: 'category',
|
|
44
46
|
events: [{ start: new Date(), category: '20' }],
|
|
45
47
|
categories: [{ name: 'Nate', age: '20' }],
|
|
@@ -60,7 +62,7 @@ describe('VCalendarCategory', () => {
|
|
|
60
62
|
}
|
|
61
63
|
|
|
62
64
|
const wrapper = mountFunction({
|
|
63
|
-
|
|
65
|
+
props: {
|
|
64
66
|
type: 'category',
|
|
65
67
|
events: [{ start: new Date(), category: 'Nate' }],
|
|
66
68
|
categories: [{ name: 'Nate', age: 20 }, { name: 'Bob', age: 30 }],
|
|
@@ -79,7 +81,7 @@ describe('VCalendarCategory', () => {
|
|
|
79
81
|
}
|
|
80
82
|
|
|
81
83
|
const wrapper = mountFunction({
|
|
82
|
-
|
|
84
|
+
props: {
|
|
83
85
|
type: 'category',
|
|
84
86
|
categoryShowAll: true,
|
|
85
87
|
events: [{ start: new Date(), category: 'Nate' }],
|
|
@@ -99,7 +101,7 @@ describe('VCalendarCategory', () => {
|
|
|
99
101
|
}
|
|
100
102
|
|
|
101
103
|
const wrapper = mountFunction({
|
|
102
|
-
|
|
104
|
+
props: {
|
|
103
105
|
type: 'category',
|
|
104
106
|
events: [{ start: new Date(), category: 'Nate' }, { start: new Date(), category: 'Bob' }],
|
|
105
107
|
categories: ['Nate', 'Bob'],
|