@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
|
@@ -5,8 +5,11 @@ import {
|
|
|
5
5
|
mount,
|
|
6
6
|
MountOptions,
|
|
7
7
|
Wrapper,
|
|
8
|
+
enableAutoUnmount,
|
|
8
9
|
} from '@vue/test-utils'
|
|
9
10
|
|
|
11
|
+
enableAutoUnmount(afterEach)
|
|
12
|
+
|
|
10
13
|
describe('VDatePickerDateTable.ts', () => {
|
|
11
14
|
type Instance = InstanceType<typeof VDatePickerDateTable>
|
|
12
15
|
let mountFunction: (options?: MountOptions<Instance>) => Wrapper<Instance>
|
|
@@ -14,10 +17,12 @@ describe('VDatePickerDateTable.ts', () => {
|
|
|
14
17
|
mountFunction = (options?: MountOptions<Instance>) => {
|
|
15
18
|
return mount(VDatePickerDateTable, {
|
|
16
19
|
...options,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
global: {
|
|
21
|
+
mocks: {
|
|
22
|
+
$vuetify: {
|
|
23
|
+
rtl: false,
|
|
24
|
+
lang: new Lang(preset),
|
|
25
|
+
},
|
|
21
26
|
},
|
|
22
27
|
},
|
|
23
28
|
})
|
|
@@ -26,10 +31,10 @@ describe('VDatePickerDateTable.ts', () => {
|
|
|
26
31
|
|
|
27
32
|
it('should render component and match snapshot', () => {
|
|
28
33
|
const wrapper = mountFunction({
|
|
29
|
-
|
|
34
|
+
props: {
|
|
30
35
|
tableDate: '2005-05',
|
|
31
36
|
current: '2005-07',
|
|
32
|
-
|
|
37
|
+
modelValue: '2005-11-03',
|
|
33
38
|
},
|
|
34
39
|
})
|
|
35
40
|
|
|
@@ -38,10 +43,10 @@ describe('VDatePickerDateTable.ts', () => {
|
|
|
38
43
|
|
|
39
44
|
it('should render readonly component and match snapshot', () => {
|
|
40
45
|
const wrapper = mountFunction({
|
|
41
|
-
|
|
46
|
+
props: {
|
|
42
47
|
tableDate: '2005-05',
|
|
43
48
|
current: '2005-07',
|
|
44
|
-
|
|
49
|
+
modelValue: '2005-11-03',
|
|
45
50
|
readonly: true,
|
|
46
51
|
},
|
|
47
52
|
})
|
|
@@ -51,10 +56,10 @@ describe('VDatePickerDateTable.ts', () => {
|
|
|
51
56
|
|
|
52
57
|
it('should render disabled component and match snapshot', () => {
|
|
53
58
|
const wrapper = mountFunction({
|
|
54
|
-
|
|
59
|
+
props: {
|
|
55
60
|
tableDate: '2005-05',
|
|
56
61
|
current: '2005-07',
|
|
57
|
-
|
|
62
|
+
modelValue: '2005-11-03',
|
|
58
63
|
disabled: true,
|
|
59
64
|
},
|
|
60
65
|
})
|
|
@@ -64,10 +69,10 @@ describe('VDatePickerDateTable.ts', () => {
|
|
|
64
69
|
|
|
65
70
|
it('should render component with showWeek and match snapshot', () => {
|
|
66
71
|
const wrapper = mountFunction({
|
|
67
|
-
|
|
72
|
+
props: {
|
|
68
73
|
tableDate: '2018-02',
|
|
69
74
|
current: '2005-07',
|
|
70
|
-
|
|
75
|
+
modelValue: null,
|
|
71
76
|
firstDayOfWeek: 2,
|
|
72
77
|
showWeek: true,
|
|
73
78
|
},
|
|
@@ -77,12 +82,12 @@ describe('VDatePickerDateTable.ts', () => {
|
|
|
77
82
|
|
|
78
83
|
it('should render component and match snapshot for multiple selection', () => {
|
|
79
84
|
const wrapper = mountFunction({
|
|
80
|
-
|
|
85
|
+
props: {
|
|
81
86
|
tableDate: '2005-05',
|
|
82
87
|
current: '2005-07',
|
|
83
88
|
multiple: true,
|
|
84
89
|
selectedDates: ['2005-11-03', '2005-11-05', '2005-11-08'],
|
|
85
|
-
|
|
90
|
+
modelValue: '2005-11-03',
|
|
86
91
|
},
|
|
87
92
|
})
|
|
88
93
|
|
|
@@ -91,10 +96,10 @@ describe('VDatePickerDateTable.ts', () => {
|
|
|
91
96
|
|
|
92
97
|
it('should render component with events (array) and match snapshot', () => {
|
|
93
98
|
const wrapper = mountFunction({
|
|
94
|
-
|
|
99
|
+
props: {
|
|
95
100
|
tableDate: '2005-05',
|
|
96
101
|
current: '2005-07',
|
|
97
|
-
|
|
102
|
+
modelValue: '2005-11-03',
|
|
98
103
|
events: ['2005-05-03'],
|
|
99
104
|
eventColor: 'red',
|
|
100
105
|
},
|
|
@@ -105,10 +110,10 @@ describe('VDatePickerDateTable.ts', () => {
|
|
|
105
110
|
|
|
106
111
|
it('should render component with events (function) and match snapshot', () => {
|
|
107
112
|
const wrapper = mountFunction({
|
|
108
|
-
|
|
113
|
+
props: {
|
|
109
114
|
tableDate: '2005-05',
|
|
110
115
|
current: '2005-07',
|
|
111
|
-
|
|
116
|
+
modelValue: '2005-11-03',
|
|
112
117
|
events: date => date === '2005-05-03',
|
|
113
118
|
eventColor: 'red',
|
|
114
119
|
},
|
|
@@ -119,10 +124,10 @@ describe('VDatePickerDateTable.ts', () => {
|
|
|
119
124
|
|
|
120
125
|
it('should render component with events colored by object and match snapshot', () => {
|
|
121
126
|
const wrapper = mountFunction({
|
|
122
|
-
|
|
127
|
+
props: {
|
|
123
128
|
tableDate: '2005-05',
|
|
124
129
|
current: '2005-07',
|
|
125
|
-
|
|
130
|
+
modelValue: '2005-11-03',
|
|
126
131
|
events: ['2005-05-03', '2005-05-04'],
|
|
127
132
|
eventColor: { '2005-05-03': 'red', '2005-05-04': 'blue lighten-1' },
|
|
128
133
|
},
|
|
@@ -133,10 +138,10 @@ describe('VDatePickerDateTable.ts', () => {
|
|
|
133
138
|
|
|
134
139
|
it('should render component with events colored by function and match snapshot', () => {
|
|
135
140
|
const wrapper = mountFunction({
|
|
136
|
-
|
|
141
|
+
props: {
|
|
137
142
|
tableDate: '2005-05',
|
|
138
143
|
current: '2005-07',
|
|
139
|
-
|
|
144
|
+
modelValue: '2005-11-03',
|
|
140
145
|
events: ['2005-05-03', '2005-05-04'],
|
|
141
146
|
eventColor: date => ({ '2005-05-03': 'red' }[date]),
|
|
142
147
|
},
|
|
@@ -147,10 +152,10 @@ describe('VDatePickerDateTable.ts', () => {
|
|
|
147
152
|
|
|
148
153
|
it('should match snapshot with first day of week', function () {
|
|
149
154
|
const wrapper = mountFunction({
|
|
150
|
-
|
|
155
|
+
props: {
|
|
151
156
|
tableDate: '2005-05',
|
|
152
157
|
current: '2005-07',
|
|
153
|
-
|
|
158
|
+
modelValue: '2005-11-03',
|
|
154
159
|
firstDayOfWeek: 2,
|
|
155
160
|
},
|
|
156
161
|
})
|
|
@@ -160,159 +165,140 @@ describe('VDatePickerDateTable.ts', () => {
|
|
|
160
165
|
|
|
161
166
|
it.skip('should watch tableDate value and run transition', async () => {
|
|
162
167
|
const wrapper = mountFunction({
|
|
163
|
-
|
|
168
|
+
props: {
|
|
164
169
|
tableDate: '2005-05',
|
|
165
170
|
current: '2005-07',
|
|
166
|
-
|
|
171
|
+
modelValue: '2005-11-03',
|
|
167
172
|
},
|
|
168
173
|
})
|
|
169
174
|
|
|
170
|
-
wrapper.setProps({
|
|
175
|
+
await wrapper.setProps({
|
|
171
176
|
tableDate: '2005-06',
|
|
172
177
|
})
|
|
173
178
|
await wrapper.vm.$nextTick()
|
|
174
|
-
expect(wrapper.findAll('table')
|
|
179
|
+
expect(wrapper.findAll('table')[0].element.className).toBe('tab-transition-enter tab-transition-enter-active')
|
|
175
180
|
})
|
|
176
181
|
|
|
177
182
|
it.skip('should watch tableDate value and run reverse transition', async () => {
|
|
178
183
|
const wrapper = mountFunction({
|
|
179
|
-
|
|
184
|
+
props: {
|
|
180
185
|
tableDate: '2005-05',
|
|
181
186
|
current: '2005-07',
|
|
182
|
-
|
|
187
|
+
modelValue: '2005-11-03',
|
|
183
188
|
},
|
|
184
189
|
})
|
|
185
190
|
|
|
186
|
-
wrapper.setProps({
|
|
191
|
+
await wrapper.setProps({
|
|
187
192
|
tableDate: '2005-04',
|
|
188
193
|
})
|
|
189
194
|
await wrapper.vm.$nextTick()
|
|
190
|
-
expect(wrapper.findAll('table')
|
|
195
|
+
expect(wrapper.findAll('table')[0].element.className).toBe('tab-reverse-transition-enter tab-reverse-transition-enter-active')
|
|
191
196
|
})
|
|
192
197
|
|
|
193
|
-
it('should emit event when date button is clicked', () => {
|
|
198
|
+
it('should emit event when date button is clicked', async () => {
|
|
194
199
|
const wrapper = mountFunction({
|
|
195
|
-
|
|
200
|
+
props: {
|
|
196
201
|
tableDate: '2005-05',
|
|
197
202
|
current: '2005-07',
|
|
198
|
-
|
|
203
|
+
modelValue: '2005-11-03',
|
|
199
204
|
},
|
|
200
205
|
})
|
|
201
206
|
|
|
202
|
-
|
|
203
|
-
wrapper.
|
|
204
|
-
|
|
205
|
-
wrapper.findAll('tbody button').at(0).trigger('click')
|
|
206
|
-
expect(input).toHaveBeenCalledWith('2005-05-01')
|
|
207
|
+
await wrapper.findAll('tbody button')[0].trigger('click')
|
|
208
|
+
expect(wrapper.emitted('update:modelValue')).toBeTruthy()
|
|
209
|
+
expect(wrapper.emitted('update:modelValue')[0]).toEqual(['2005-05-01'])
|
|
207
210
|
})
|
|
208
211
|
|
|
209
|
-
it('should not emit event when disabled month button is clicked', () => {
|
|
212
|
+
it('should not emit event when disabled month button is clicked', async () => {
|
|
210
213
|
const wrapper = mountFunction({
|
|
211
|
-
|
|
214
|
+
props: {
|
|
212
215
|
tableDate: '2005-05',
|
|
213
216
|
current: '2005-07',
|
|
214
|
-
|
|
217
|
+
modelValue: '2005-11-03',
|
|
215
218
|
allowedDates: () => false,
|
|
216
219
|
},
|
|
217
220
|
})
|
|
218
221
|
|
|
219
|
-
|
|
220
|
-
wrapper.
|
|
221
|
-
|
|
222
|
-
wrapper.findAll('tbody button').at(0).trigger('click')
|
|
223
|
-
expect(input).not.toHaveBeenCalled()
|
|
222
|
+
await wrapper.findAll('tbody button')[0].trigger('click')
|
|
223
|
+
expect(wrapper.emitted('update:modelValue')).toBeFalsy()
|
|
224
224
|
})
|
|
225
225
|
|
|
226
|
-
it('should emit tableDate event when scrolled and scrollable', () => {
|
|
226
|
+
it('should emit tableDate event when scrolled and scrollable', async () => {
|
|
227
227
|
const wrapper = mountFunction({
|
|
228
|
-
|
|
228
|
+
props: {
|
|
229
229
|
tableDate: '2005-05',
|
|
230
230
|
scrollable: true,
|
|
231
231
|
},
|
|
232
232
|
})
|
|
233
233
|
|
|
234
|
-
|
|
235
|
-
wrapper.
|
|
236
|
-
|
|
237
|
-
wrapper.trigger('wheel', { deltaY: 1 })
|
|
238
|
-
expect(tableDate).toHaveBeenCalledWith('2005-06')
|
|
234
|
+
await wrapper.trigger('wheel', { deltaY: 1 })
|
|
235
|
+
expect(wrapper.emitted('update:table-date')).toBeTruthy()
|
|
236
|
+
expect(wrapper.emitted('update:table-date')[0]).toEqual(['2005-06'])
|
|
239
237
|
})
|
|
240
238
|
|
|
241
|
-
it('should not emit tableDate event when scrolled and not scrollable', () => {
|
|
239
|
+
it('should not emit tableDate event when scrolled and not scrollable', async () => {
|
|
242
240
|
const wrapper = mountFunction({
|
|
243
|
-
|
|
241
|
+
props: {
|
|
244
242
|
tableDate: '2005-05',
|
|
245
243
|
},
|
|
246
244
|
})
|
|
247
245
|
|
|
248
|
-
|
|
249
|
-
wrapper.
|
|
250
|
-
|
|
251
|
-
wrapper.trigger('wheel', { deltaY: 1 })
|
|
252
|
-
expect(tableDate).not.toHaveBeenCalled()
|
|
246
|
+
await wrapper.trigger('wheel', { deltaY: 1 })
|
|
247
|
+
expect(wrapper.emitted('update:table-date')).toBeFalsy()
|
|
253
248
|
})
|
|
254
249
|
|
|
255
|
-
it('should not emit tableDate event when scrollable but tableDate less than min', () => {
|
|
250
|
+
it('should not emit tableDate event when scrollable but tableDate less than min', async () => {
|
|
256
251
|
const wrapper = mountFunction({
|
|
257
|
-
|
|
252
|
+
props: {
|
|
258
253
|
tableDate: '2005-05',
|
|
259
254
|
scrollable: true,
|
|
260
255
|
min: '2005-05',
|
|
261
256
|
},
|
|
262
257
|
})
|
|
263
258
|
|
|
264
|
-
|
|
265
|
-
wrapper.
|
|
266
|
-
|
|
267
|
-
wrapper.trigger('wheel', { deltaY: -50 })
|
|
268
|
-
expect(tableDate).not.toHaveBeenCalled()
|
|
259
|
+
await wrapper.trigger('wheel', { deltaY: -50 })
|
|
260
|
+
expect(wrapper.emitted('update:table-date')).toBeFalsy()
|
|
269
261
|
})
|
|
270
262
|
|
|
271
|
-
it('should emit tableDate event when scrollable and tableDate greater than min', () => {
|
|
263
|
+
it('should emit tableDate event when scrollable and tableDate greater than min', async () => {
|
|
272
264
|
const wrapper = mountFunction({
|
|
273
|
-
|
|
265
|
+
props: {
|
|
274
266
|
tableDate: '2005-05',
|
|
275
267
|
scrollable: true,
|
|
276
268
|
min: '2005-03',
|
|
277
269
|
},
|
|
278
270
|
})
|
|
279
271
|
|
|
280
|
-
|
|
281
|
-
wrapper.
|
|
282
|
-
|
|
283
|
-
wrapper.trigger('wheel', { deltaY: -50 })
|
|
284
|
-
expect(tableDate).toHaveBeenCalledWith('2005-04')
|
|
272
|
+
await wrapper.trigger('wheel', { deltaY: -50 })
|
|
273
|
+
expect(wrapper.emitted('update:table-date')).toBeTruthy()
|
|
274
|
+
expect(wrapper.emitted('update:table-date')[0]).toEqual(['2005-04'])
|
|
285
275
|
})
|
|
286
276
|
|
|
287
277
|
// TODO
|
|
288
|
-
it.skip('should emit tableDate event when swiped', () => {
|
|
278
|
+
it.skip('should emit tableDate event when swiped', async () => {
|
|
289
279
|
const wrapper = mountFunction({
|
|
290
|
-
|
|
280
|
+
props: {
|
|
291
281
|
tableDate: '2005-05',
|
|
292
282
|
},
|
|
293
283
|
})
|
|
294
284
|
|
|
295
|
-
|
|
296
|
-
wrapper.
|
|
297
|
-
|
|
298
|
-
wrapper.
|
|
299
|
-
wrapper.trigger('touchend')
|
|
300
|
-
expect(tableDate).toHaveBeenCalledWith('2005-06')
|
|
285
|
+
await wrapper.trigger('touchstart')
|
|
286
|
+
await wrapper.trigger('touchend')
|
|
287
|
+
expect(wrapper.emitted('update:table-date')).toBeTruthy()
|
|
288
|
+
expect(wrapper.emitted('update:table-date')[0]).toEqual(['2005-06'])
|
|
301
289
|
})
|
|
302
290
|
|
|
303
291
|
it('should change tableDate when touch is called', () => {
|
|
304
292
|
const wrapper = mountFunction({
|
|
305
|
-
|
|
293
|
+
props: {
|
|
306
294
|
tableDate: '2005-05',
|
|
307
295
|
},
|
|
308
296
|
})
|
|
309
297
|
|
|
310
|
-
const tableDate = jest.fn()
|
|
311
|
-
wrapper.vm.$on('update:table-date', tableDate)
|
|
312
|
-
|
|
313
298
|
wrapper.vm.touch(1, wrapper.vm.calculateTableDate)
|
|
314
|
-
expect(
|
|
299
|
+
expect(wrapper.emitted('update:table-date')).toBeTruthy()
|
|
300
|
+
expect(wrapper.emitted('update:table-date')[0]).toEqual(['2005-06'])
|
|
315
301
|
wrapper.vm.touch(-1, wrapper.vm.calculateTableDate)
|
|
316
|
-
expect(
|
|
302
|
+
expect(wrapper.emitted('update:table-date')[1]).toEqual(['2005-04'])
|
|
317
303
|
})
|
|
318
304
|
})
|
|
@@ -5,29 +5,39 @@ import {
|
|
|
5
5
|
mount,
|
|
6
6
|
MountOptions,
|
|
7
7
|
Wrapper,
|
|
8
|
+
enableAutoUnmount,
|
|
8
9
|
} from '@vue/test-utils'
|
|
9
|
-
import Vue from 'vue'
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
icons: {
|
|
13
|
-
values: {
|
|
14
|
-
next: 'mdi-chevron-right',
|
|
15
|
-
prev: 'mdi-chevron-left',
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
}
|
|
11
|
+
enableAutoUnmount(afterEach)
|
|
19
12
|
|
|
20
13
|
describe('VDatePickerHeader.ts', () => {
|
|
21
14
|
type Instance = InstanceType<typeof VDatePickerHeader>
|
|
22
15
|
let mountFunction: (options?: MountOptions<Instance>) => Wrapper<Instance>
|
|
16
|
+
|
|
23
17
|
beforeEach(() => {
|
|
18
|
+
// Mock console.warn to suppress Vue warnings
|
|
19
|
+
jest.spyOn(console, 'warn').mockImplementation((...args: any[]) => {
|
|
20
|
+
if (args[0]?.includes?.('Component is missing template or render function')) {
|
|
21
|
+
return
|
|
22
|
+
}
|
|
23
|
+
if (args[0]?.includes?.('Invalid prop: type check failed')) {
|
|
24
|
+
return
|
|
25
|
+
}
|
|
26
|
+
// Call original warn for other messages
|
|
27
|
+
console.warn(...args)
|
|
28
|
+
})
|
|
24
29
|
mountFunction = (options?: MountOptions<Instance>) => {
|
|
25
30
|
return mount(VDatePickerHeader, {
|
|
26
31
|
...options,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
32
|
+
global: {
|
|
33
|
+
mocks: {
|
|
34
|
+
$vuetify: {
|
|
35
|
+
rtl: false,
|
|
36
|
+
lang: new Lang(preset),
|
|
37
|
+
icons: {
|
|
38
|
+
component: 'mdi',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
31
41
|
},
|
|
32
42
|
},
|
|
33
43
|
})
|
|
@@ -36,8 +46,8 @@ describe('VDatePickerHeader.ts', () => {
|
|
|
36
46
|
|
|
37
47
|
it('should render component and match snapshot', () => {
|
|
38
48
|
const wrapper = mountFunction({
|
|
39
|
-
|
|
40
|
-
|
|
49
|
+
props: {
|
|
50
|
+
modelValue: '2005-11',
|
|
41
51
|
},
|
|
42
52
|
})
|
|
43
53
|
|
|
@@ -46,8 +56,8 @@ describe('VDatePickerHeader.ts', () => {
|
|
|
46
56
|
|
|
47
57
|
it('should render disabled component and match snapshot', () => {
|
|
48
58
|
const wrapper = mountFunction({
|
|
49
|
-
|
|
50
|
-
|
|
59
|
+
props: {
|
|
60
|
+
modelValue: '2005-11',
|
|
51
61
|
disabled: true,
|
|
52
62
|
},
|
|
53
63
|
})
|
|
@@ -57,8 +67,8 @@ describe('VDatePickerHeader.ts', () => {
|
|
|
57
67
|
|
|
58
68
|
it('should render readonly component and match snapshot', () => {
|
|
59
69
|
const wrapper = mountFunction({
|
|
60
|
-
|
|
61
|
-
|
|
70
|
+
props: {
|
|
71
|
+
modelValue: '2005-11',
|
|
62
72
|
readonly: true,
|
|
63
73
|
},
|
|
64
74
|
})
|
|
@@ -68,8 +78,8 @@ describe('VDatePickerHeader.ts', () => {
|
|
|
68
78
|
|
|
69
79
|
it('should render component in RTL mode and match snapshot', async () => {
|
|
70
80
|
const wrapper = mountFunction({
|
|
71
|
-
|
|
72
|
-
|
|
81
|
+
props: {
|
|
82
|
+
modelValue: '2005-11',
|
|
73
83
|
},
|
|
74
84
|
})
|
|
75
85
|
wrapper.vm.$vuetify.rtl = true
|
|
@@ -81,55 +91,75 @@ describe('VDatePickerHeader.ts', () => {
|
|
|
81
91
|
|
|
82
92
|
it('should render component with year value and match snapshot', () => {
|
|
83
93
|
const wrapper = mountFunction({
|
|
84
|
-
|
|
85
|
-
|
|
94
|
+
props: {
|
|
95
|
+
modelValue: '2005',
|
|
96
|
+
},
|
|
97
|
+
})
|
|
98
|
+
|
|
99
|
+
expect(wrapper.findAll('.v-date-picker-header__value div')[0].element.textContent).toBe('2005')
|
|
100
|
+
})
|
|
101
|
+
|
|
102
|
+
it('should handle undefined modelValue', () => {
|
|
103
|
+
const wrapper = mountFunction({
|
|
104
|
+
props: {
|
|
105
|
+
modelValue: undefined as any,
|
|
86
106
|
},
|
|
87
107
|
})
|
|
88
108
|
|
|
89
|
-
expect(wrapper.findAll('.v-date-picker-header__value div')
|
|
109
|
+
expect(wrapper.findAll('.v-date-picker-header__value div')[0].element.textContent).toBe('')
|
|
110
|
+
})
|
|
111
|
+
|
|
112
|
+
it('should handle null modelValue', () => {
|
|
113
|
+
const wrapper = mountFunction({
|
|
114
|
+
props: {
|
|
115
|
+
modelValue: null as any,
|
|
116
|
+
},
|
|
117
|
+
})
|
|
118
|
+
|
|
119
|
+
expect(wrapper.findAll('.v-date-picker-header__value div')[0].element.textContent).toBe('')
|
|
90
120
|
})
|
|
91
121
|
|
|
92
122
|
it('should render prev/next icons', () => {
|
|
93
123
|
const wrapper = mountFunction({
|
|
94
|
-
|
|
95
|
-
|
|
124
|
+
props: {
|
|
125
|
+
modelValue: '2005',
|
|
96
126
|
prevIcon: 'foo',
|
|
97
127
|
nextIcon: 'bar',
|
|
98
128
|
},
|
|
99
129
|
})
|
|
100
130
|
|
|
101
|
-
expect(wrapper.findAll('.v-icon')
|
|
102
|
-
expect(wrapper.findAll('.v-icon')
|
|
131
|
+
expect(wrapper.findAll('.v-icon')[0].element.textContent).toBe('foo')
|
|
132
|
+
expect(wrapper.findAll('.v-icon')[1].element.textContent).toBe('bar')
|
|
103
133
|
})
|
|
104
134
|
|
|
105
135
|
it('should render component with own formatter and match snapshot', () => {
|
|
106
136
|
const wrapper = mountFunction({
|
|
107
|
-
|
|
108
|
-
|
|
137
|
+
props: {
|
|
138
|
+
modelValue: '2005-11',
|
|
109
139
|
format: value => `(${value})`,
|
|
110
140
|
},
|
|
111
141
|
})
|
|
112
142
|
|
|
113
|
-
expect(wrapper.findAll('.v-date-picker-header__value div')
|
|
143
|
+
expect(wrapper.findAll('.v-date-picker-header__value div')[0].element.textContent).toBe('(2005-11)')
|
|
114
144
|
})
|
|
115
145
|
|
|
116
146
|
it('should render colored component and match snapshot', () => {
|
|
117
147
|
const wrapper = mountFunction({
|
|
118
|
-
|
|
119
|
-
|
|
148
|
+
props: {
|
|
149
|
+
modelValue: '2005-11',
|
|
120
150
|
color: 'green lighten-1',
|
|
121
151
|
},
|
|
122
152
|
})
|
|
123
153
|
|
|
124
|
-
const div = wrapper.findAll('.v-date-picker-header__value div')
|
|
154
|
+
const div = wrapper.findAll('.v-date-picker-header__value div')[0]
|
|
125
155
|
expect(div.classes('green--text')).toBe(true)
|
|
126
156
|
expect(div.classes('text--lighten-1')).toBe(true)
|
|
127
157
|
})
|
|
128
158
|
|
|
129
159
|
it('should render component with default slot and match snapshot', () => {
|
|
130
160
|
const wrapper = mountFunction({
|
|
131
|
-
|
|
132
|
-
|
|
161
|
+
props: {
|
|
162
|
+
modelValue: '2005-11',
|
|
133
163
|
},
|
|
134
164
|
slots: {
|
|
135
165
|
default: '<span>foo</span>',
|
|
@@ -139,48 +169,43 @@ describe('VDatePickerHeader.ts', () => {
|
|
|
139
169
|
expect(wrapper.html()).toMatchSnapshot()
|
|
140
170
|
})
|
|
141
171
|
|
|
142
|
-
it('should trigger event on selector click', () => {
|
|
172
|
+
it('should trigger event on selector click', async () => {
|
|
143
173
|
const wrapper = mountFunction({
|
|
144
|
-
|
|
145
|
-
|
|
174
|
+
props: {
|
|
175
|
+
modelValue: '2005-11',
|
|
146
176
|
},
|
|
147
177
|
})
|
|
148
178
|
|
|
149
|
-
|
|
150
|
-
wrapper.
|
|
151
|
-
|
|
152
|
-
wrapper.findAll('.v-date-picker-header__value button').at(0).trigger('click')
|
|
153
|
-
expect(toggle).toHaveBeenCalled()
|
|
179
|
+
await wrapper.findAll('.v-date-picker-header__value button')[0].trigger('click')
|
|
180
|
+
expect(wrapper.emitted('toggle')).toBeTruthy()
|
|
154
181
|
})
|
|
155
182
|
|
|
156
|
-
it('should trigger event on arrows click', () => {
|
|
183
|
+
it('should trigger event on arrows click', async () => {
|
|
157
184
|
const wrapper = mountFunction({
|
|
158
|
-
|
|
159
|
-
|
|
185
|
+
props: {
|
|
186
|
+
modelValue: '2005-12',
|
|
160
187
|
},
|
|
161
188
|
})
|
|
162
189
|
|
|
163
|
-
|
|
164
|
-
wrapper.
|
|
165
|
-
|
|
166
|
-
wrapper.findAll('button.v-btn').at(0).trigger('click')
|
|
167
|
-
expect(input).toHaveBeenCalledWith('2005-11')
|
|
190
|
+
await wrapper.findAll('button.v-btn')[0].trigger('click')
|
|
191
|
+
expect(wrapper.emitted('update:modelValue')).toBeTruthy()
|
|
192
|
+
expect(wrapper.emitted('update:modelValue')?.[0]).toEqual(['2005-11'])
|
|
168
193
|
|
|
169
|
-
wrapper.findAll('button.v-btn')
|
|
170
|
-
expect(
|
|
194
|
+
await wrapper.findAll('button.v-btn')[1].trigger('click')
|
|
195
|
+
expect(wrapper.emitted('update:modelValue')?.[1]).toEqual(['2006-01'])
|
|
171
196
|
})
|
|
172
197
|
|
|
173
|
-
it('should calculate prev/next value', () => {
|
|
198
|
+
it('should calculate prev/next value', async () => {
|
|
174
199
|
const wrapper = mountFunction({
|
|
175
|
-
|
|
176
|
-
|
|
200
|
+
props: {
|
|
201
|
+
modelValue: '2005-12',
|
|
177
202
|
},
|
|
178
203
|
})
|
|
179
204
|
expect(wrapper.vm.calculateChange(-1)).toBe('2005-11')
|
|
180
205
|
expect(wrapper.vm.calculateChange(+1)).toBe('2006-01')
|
|
181
206
|
|
|
182
|
-
wrapper.setProps({
|
|
183
|
-
|
|
207
|
+
await wrapper.setProps({
|
|
208
|
+
modelValue: '2005',
|
|
184
209
|
})
|
|
185
210
|
expect(wrapper.vm.calculateChange(-1)).toBe('2004')
|
|
186
211
|
expect(wrapper.vm.calculateChange(+1)).toBe('2006')
|
|
@@ -188,31 +213,31 @@ describe('VDatePickerHeader.ts', () => {
|
|
|
188
213
|
|
|
189
214
|
it.skip('should watch value and run transition', async () => {
|
|
190
215
|
const wrapper = mountFunction({
|
|
191
|
-
|
|
192
|
-
|
|
216
|
+
props: {
|
|
217
|
+
modelValue: 2005,
|
|
193
218
|
},
|
|
194
219
|
})
|
|
195
220
|
|
|
196
|
-
wrapper.setProps({
|
|
197
|
-
|
|
221
|
+
await wrapper.setProps({
|
|
222
|
+
modelValue: 2006,
|
|
198
223
|
})
|
|
199
224
|
await wrapper.vm.$nextTick()
|
|
200
|
-
expect(wrapper.findAll('.v-date-picker-header__value div')
|
|
201
|
-
expect(wrapper.findAll('.v-date-picker-header__value div')
|
|
225
|
+
expect(wrapper.findAll('.v-date-picker-header__value div')[0].classes('tab-transition-enter')).toBe(true)
|
|
226
|
+
expect(wrapper.findAll('.v-date-picker-header__value div')[0].classes('tab-transition-enter-active')).toBe(true)
|
|
202
227
|
})
|
|
203
228
|
|
|
204
229
|
it.skip('should watch value and run reverse transition', async () => {
|
|
205
230
|
const wrapper = mountFunction({
|
|
206
|
-
|
|
207
|
-
|
|
231
|
+
props: {
|
|
232
|
+
modelValue: 2005,
|
|
208
233
|
},
|
|
209
234
|
})
|
|
210
235
|
|
|
211
|
-
wrapper.setProps({
|
|
212
|
-
|
|
236
|
+
await wrapper.setProps({
|
|
237
|
+
modelValue: 2004,
|
|
213
238
|
})
|
|
214
239
|
await wrapper.vm.$nextTick()
|
|
215
|
-
expect(wrapper.findAll('.v-date-picker-header__value div')
|
|
216
|
-
expect(wrapper.findAll('.v-date-picker-header__value div')
|
|
240
|
+
expect(wrapper.findAll('.v-date-picker-header__value div')[0].classes('tab-reverse-transition-enter')).toBe(true)
|
|
241
|
+
expect(wrapper.findAll('.v-date-picker-header__value div')[0].classes('tab-reverse-transition-enter-active')).toBe(true)
|
|
217
242
|
})
|
|
218
243
|
})
|