@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
|
@@ -6,8 +6,11 @@ import {
|
|
|
6
6
|
mount,
|
|
7
7
|
MountOptions,
|
|
8
8
|
Wrapper,
|
|
9
|
+
enableAutoUnmount,
|
|
9
10
|
} from '@vue/test-utils'
|
|
10
11
|
|
|
12
|
+
enableAutoUnmount(afterEach)
|
|
13
|
+
|
|
11
14
|
describe('VDatePickerMonthTable.ts', () => {
|
|
12
15
|
type Instance = InstanceType<typeof VDatePickerMonthTable>
|
|
13
16
|
let mountFunction: (options?: MountOptions<Instance>) => Wrapper<Instance>
|
|
@@ -15,9 +18,11 @@ describe('VDatePickerMonthTable.ts', () => {
|
|
|
15
18
|
mountFunction = (options?: MountOptions<Instance>) => {
|
|
16
19
|
return mount(VDatePickerMonthTable, {
|
|
17
20
|
...options,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
global: {
|
|
22
|
+
mocks: {
|
|
23
|
+
$vuetify: {
|
|
24
|
+
lang: new Lang(preset),
|
|
25
|
+
},
|
|
21
26
|
},
|
|
22
27
|
},
|
|
23
28
|
})
|
|
@@ -26,10 +31,10 @@ describe('VDatePickerMonthTable.ts', () => {
|
|
|
26
31
|
|
|
27
32
|
it('should render component and match snapshot', () => {
|
|
28
33
|
const wrapper = mountFunction({
|
|
29
|
-
|
|
34
|
+
props: {
|
|
30
35
|
tableDate: '2005',
|
|
31
36
|
current: '2005-05',
|
|
32
|
-
|
|
37
|
+
modelValue: '2005-11',
|
|
33
38
|
},
|
|
34
39
|
})
|
|
35
40
|
|
|
@@ -38,10 +43,10 @@ describe('VDatePickerMonthTable.ts', () => {
|
|
|
38
43
|
|
|
39
44
|
it('should render component and match snapshot (multiple)', () => {
|
|
40
45
|
const wrapper = mountFunction({
|
|
41
|
-
|
|
46
|
+
props: {
|
|
42
47
|
tableDate: '2005',
|
|
43
48
|
current: '2005-05',
|
|
44
|
-
|
|
49
|
+
modelValue: ['2005-11', '2005-10'],
|
|
45
50
|
},
|
|
46
51
|
})
|
|
47
52
|
|
|
@@ -50,165 +55,146 @@ describe('VDatePickerMonthTable.ts', () => {
|
|
|
50
55
|
|
|
51
56
|
it.skip('should watch tableDate value and run transition', async () => { // TODO: make this one work
|
|
52
57
|
const wrapper = mountFunction({
|
|
53
|
-
|
|
58
|
+
props: {
|
|
54
59
|
tableDate: '2005',
|
|
55
60
|
current: '2005-05',
|
|
56
|
-
|
|
61
|
+
modelValue: '2005-11',
|
|
57
62
|
},
|
|
58
63
|
})
|
|
59
64
|
|
|
60
|
-
wrapper.setProps({
|
|
65
|
+
await wrapper.setProps({
|
|
61
66
|
tableDate: '2006',
|
|
62
67
|
})
|
|
63
68
|
await wrapper.vm.$nextTick()
|
|
64
|
-
expect(wrapper.findAll('table')
|
|
69
|
+
expect(wrapper.findAll('table')[0].element.className).toBe('tab-transition-enter tab-transition-enter-active')
|
|
65
70
|
})
|
|
66
71
|
|
|
67
72
|
it.skip('should watch tableDate value and run reverse transition', async () => { // TODO: make this one work
|
|
68
73
|
const wrapper = mountFunction({
|
|
69
|
-
|
|
74
|
+
props: {
|
|
70
75
|
tableDate: '2005',
|
|
71
76
|
current: '2005-05',
|
|
72
|
-
|
|
77
|
+
modelValue: '2005-11',
|
|
73
78
|
},
|
|
74
79
|
})
|
|
75
80
|
|
|
76
|
-
wrapper.setProps({
|
|
81
|
+
await wrapper.setProps({
|
|
77
82
|
tableDate: '2004',
|
|
78
83
|
})
|
|
79
84
|
await wrapper.vm.$nextTick()
|
|
80
|
-
expect(wrapper.findAll('table')
|
|
85
|
+
expect(wrapper.findAll('table')[0].element.className).toBe('tab-reverse-transition-enter tab-reverse-transition-enter-active')
|
|
81
86
|
})
|
|
82
87
|
|
|
83
|
-
it('should emit event when month button is clicked', () => {
|
|
88
|
+
it('should emit event when month button is clicked', async () => {
|
|
84
89
|
const wrapper = mountFunction({
|
|
85
|
-
|
|
90
|
+
props: {
|
|
86
91
|
tableDate: '2005',
|
|
87
92
|
current: '2005-05',
|
|
88
|
-
|
|
93
|
+
modelValue: '2005-11',
|
|
89
94
|
},
|
|
90
95
|
})
|
|
91
96
|
|
|
92
|
-
|
|
93
|
-
wrapper.
|
|
94
|
-
|
|
95
|
-
wrapper.findAll('tbody button').at(0).trigger('click')
|
|
96
|
-
expect(input).toHaveBeenCalledWith('2005-01')
|
|
97
|
+
await wrapper.findAll('tbody button')[0].trigger('click')
|
|
98
|
+
expect(wrapper.emitted('update:modelValue')).toBeTruthy()
|
|
99
|
+
expect(wrapper.emitted('update:modelValue')[0]).toEqual(['2005-01'])
|
|
97
100
|
})
|
|
98
101
|
|
|
99
|
-
it('should not emit event when disabled month button is clicked', () => {
|
|
102
|
+
it('should not emit event when disabled month button is clicked', async () => {
|
|
100
103
|
const wrapper = mountFunction({
|
|
101
|
-
|
|
104
|
+
props: {
|
|
102
105
|
tableDate: '2005',
|
|
103
106
|
current: '2005-05',
|
|
104
|
-
|
|
107
|
+
modelValue: '2005-11',
|
|
105
108
|
allowedDates: () => false,
|
|
106
109
|
},
|
|
107
110
|
})
|
|
108
111
|
|
|
109
|
-
|
|
110
|
-
wrapper.
|
|
111
|
-
|
|
112
|
-
wrapper.findAll('tbody button').at(0).trigger('click')
|
|
113
|
-
expect(input).not.toHaveBeenCalled()
|
|
112
|
+
await wrapper.findAll('tbody button')[0].trigger('click')
|
|
113
|
+
expect(wrapper.emitted('update:modelValue')).toBeFalsy()
|
|
114
114
|
})
|
|
115
115
|
|
|
116
|
-
it('should emit tableDate event when scrolled and scrollable', () => {
|
|
116
|
+
it('should emit tableDate event when scrolled and scrollable', async () => {
|
|
117
117
|
const wrapper = mountFunction({
|
|
118
|
-
|
|
118
|
+
props: {
|
|
119
119
|
tableDate: '2005',
|
|
120
120
|
scrollable: true,
|
|
121
121
|
},
|
|
122
122
|
})
|
|
123
123
|
|
|
124
|
-
|
|
125
|
-
wrapper.
|
|
126
|
-
|
|
127
|
-
wrapper.trigger('wheel', { deltaY: 1 })
|
|
128
|
-
expect(tableDate).toHaveBeenCalledWith('2006')
|
|
124
|
+
await wrapper.trigger('wheel', { deltaY: 1 })
|
|
125
|
+
expect(wrapper.emitted('update:table-date')).toBeTruthy()
|
|
126
|
+
expect(wrapper.emitted('update:table-date')[0]).toEqual(['2006'])
|
|
129
127
|
})
|
|
130
128
|
|
|
131
|
-
it('should not emit tableDate event when scrolled and not scrollable', () => {
|
|
129
|
+
it('should not emit tableDate event when scrolled and not scrollable', async () => {
|
|
132
130
|
const wrapper = mountFunction({
|
|
133
|
-
|
|
131
|
+
props: {
|
|
134
132
|
tableDate: '2005',
|
|
135
133
|
},
|
|
136
134
|
})
|
|
137
135
|
|
|
138
|
-
|
|
139
|
-
wrapper.
|
|
140
|
-
|
|
141
|
-
wrapper.trigger('wheel', { deltaY: 1 })
|
|
142
|
-
expect(tableDate).not.toHaveBeenCalled()
|
|
136
|
+
await wrapper.trigger('wheel', { deltaY: 1 })
|
|
137
|
+
expect(wrapper.emitted('update:table-date')).toBeFalsy()
|
|
143
138
|
})
|
|
144
139
|
|
|
145
|
-
it('should not emit tableDate event when scrollable but tableDate less than min', () => {
|
|
140
|
+
it('should not emit tableDate event when scrollable but tableDate less than min', async () => {
|
|
146
141
|
const wrapper = mountFunction({
|
|
147
|
-
|
|
142
|
+
props: {
|
|
148
143
|
tableDate: '2005',
|
|
149
144
|
scrollable: true,
|
|
150
145
|
min: '2005',
|
|
151
146
|
},
|
|
152
147
|
})
|
|
153
148
|
|
|
154
|
-
|
|
155
|
-
wrapper.
|
|
156
|
-
|
|
157
|
-
wrapper.trigger('wheel', { deltaY: -50 })
|
|
158
|
-
expect(tableDate).not.toHaveBeenCalled()
|
|
149
|
+
await wrapper.trigger('wheel', { deltaY: -50 })
|
|
150
|
+
expect(wrapper.emitted('update:table-date')).toBeFalsy()
|
|
159
151
|
})
|
|
160
152
|
|
|
161
|
-
it('should emit tableDate event when scrollable and tableDate greater than min', () => {
|
|
153
|
+
it('should emit tableDate event when scrollable and tableDate greater than min', async () => {
|
|
162
154
|
const wrapper = mountFunction({
|
|
163
|
-
|
|
155
|
+
props: {
|
|
164
156
|
tableDate: '2005',
|
|
165
157
|
scrollable: true,
|
|
166
158
|
min: '2003',
|
|
167
159
|
},
|
|
168
160
|
})
|
|
169
161
|
|
|
170
|
-
|
|
171
|
-
wrapper.
|
|
172
|
-
|
|
173
|
-
wrapper.trigger('wheel', { deltaY: -50 })
|
|
174
|
-
expect(tableDate).toHaveBeenCalledWith('2004')
|
|
162
|
+
await wrapper.trigger('wheel', { deltaY: -50 })
|
|
163
|
+
expect(wrapper.emitted('update:table-date')).toBeTruthy()
|
|
164
|
+
expect(wrapper.emitted('update:table-date')[0]).toEqual(['2004'])
|
|
175
165
|
})
|
|
176
166
|
|
|
177
167
|
// TODO
|
|
178
|
-
it.skip('should emit tableDate event when swiped', () => {
|
|
168
|
+
it.skip('should emit tableDate event when swiped', async () => {
|
|
179
169
|
const wrapper = mountFunction({
|
|
180
|
-
|
|
170
|
+
props: {
|
|
181
171
|
tableDate: '2005',
|
|
182
172
|
},
|
|
183
173
|
})
|
|
184
174
|
|
|
185
|
-
|
|
186
|
-
wrapper.
|
|
187
|
-
|
|
188
|
-
wrapper.
|
|
189
|
-
wrapper.trigger('touchend')
|
|
190
|
-
expect(tableDate).toHaveBeenCalledWith(2006)
|
|
175
|
+
await wrapper.trigger('touchstart')
|
|
176
|
+
await wrapper.trigger('touchend')
|
|
177
|
+
expect(wrapper.emitted('update:table-date')).toBeTruthy()
|
|
178
|
+
expect(wrapper.emitted('update:table-date')[0]).toEqual([2006])
|
|
191
179
|
})
|
|
192
180
|
|
|
193
181
|
it('should change tableDate when touch is called', () => {
|
|
194
182
|
const wrapper = mountFunction({
|
|
195
|
-
|
|
183
|
+
props: {
|
|
196
184
|
tableDate: '2005',
|
|
197
185
|
},
|
|
198
186
|
})
|
|
199
187
|
|
|
200
|
-
const tableDate = jest.fn()
|
|
201
|
-
wrapper.vm.$on('update:table-date', tableDate)
|
|
202
|
-
|
|
203
188
|
wrapper.vm.touch(1, wrapper.vm.calculateTableDate)
|
|
204
|
-
expect(
|
|
189
|
+
expect(wrapper.emitted('update:table-date')).toBeTruthy()
|
|
190
|
+
expect(wrapper.emitted('update:table-date')[0]).toEqual(['2006'])
|
|
205
191
|
wrapper.vm.touch(-1, wrapper.vm.calculateTableDate)
|
|
206
|
-
expect(
|
|
192
|
+
expect(wrapper.emitted('update:table-date')[1]).toEqual(['2004'])
|
|
207
193
|
})
|
|
208
194
|
|
|
209
195
|
it('should render component with events (array) and match snapshot', () => {
|
|
210
196
|
const wrapper = mountFunction({
|
|
211
|
-
|
|
197
|
+
props: {
|
|
212
198
|
tableDate: '2005',
|
|
213
199
|
events: ['2005-07', '2005-11'],
|
|
214
200
|
eventColor: 'red',
|
|
@@ -220,7 +206,7 @@ describe('VDatePickerMonthTable.ts', () => {
|
|
|
220
206
|
|
|
221
207
|
it('should render component with events (function) and match snapshot', () => {
|
|
222
208
|
const wrapper = mountFunction({
|
|
223
|
-
|
|
209
|
+
props: {
|
|
224
210
|
tableDate: '2005',
|
|
225
211
|
events: date => date === '2005-07' || date === '2005-11',
|
|
226
212
|
eventColor: 'red',
|
|
@@ -232,7 +218,7 @@ describe('VDatePickerMonthTable.ts', () => {
|
|
|
232
218
|
|
|
233
219
|
it('should render component with events colored by object and match snapshot', () => {
|
|
234
220
|
const wrapper = mountFunction({
|
|
235
|
-
|
|
221
|
+
props: {
|
|
236
222
|
tableDate: '2005',
|
|
237
223
|
events: ['2005-07', '2005-11'],
|
|
238
224
|
eventColor: { '2005-07': 'red', '2005-11': 'blue lighten-1' },
|
|
@@ -244,7 +230,7 @@ describe('VDatePickerMonthTable.ts', () => {
|
|
|
244
230
|
|
|
245
231
|
it('should render component with events colored by function and match snapshot', () => {
|
|
246
232
|
const wrapper = mountFunction({
|
|
247
|
-
|
|
233
|
+
props: {
|
|
248
234
|
tableDate: '2005',
|
|
249
235
|
events: ['2005-07', '2005-11'],
|
|
250
236
|
eventColor: date => ({ '2005-07': 'red', '2005-11': 'blue lighten-1' }[date]),
|
|
@@ -3,20 +3,39 @@ import {
|
|
|
3
3
|
mount,
|
|
4
4
|
MountOptions,
|
|
5
5
|
Wrapper,
|
|
6
|
+
enableAutoUnmount,
|
|
6
7
|
} from '@vue/test-utils'
|
|
7
8
|
|
|
8
9
|
describe('VDatePickerTitle.ts', () => {
|
|
9
10
|
type Instance = InstanceType<typeof VDatePickerTitle>
|
|
10
11
|
let mountFunction: (options?: MountOptions<Instance>) => Wrapper<Instance>
|
|
12
|
+
|
|
13
|
+
enableAutoUnmount(afterEach)
|
|
14
|
+
|
|
11
15
|
beforeEach(() => {
|
|
12
16
|
mountFunction = (options?: MountOptions<Instance>) => {
|
|
13
|
-
return mount(VDatePickerTitle,
|
|
17
|
+
return mount(VDatePickerTitle, {
|
|
18
|
+
...options,
|
|
19
|
+
global: {
|
|
20
|
+
mocks: {
|
|
21
|
+
$vuetify: {
|
|
22
|
+
icons: {
|
|
23
|
+
values: {
|
|
24
|
+
next: 'mdi-chevron-right',
|
|
25
|
+
prev: 'mdi-chevron-left',
|
|
26
|
+
},
|
|
27
|
+
component: 'mdi',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
})
|
|
14
33
|
}
|
|
15
34
|
})
|
|
16
35
|
|
|
17
36
|
it('should render component and match snapshot', () => {
|
|
18
37
|
const wrapper = mountFunction({
|
|
19
|
-
|
|
38
|
+
props: {
|
|
20
39
|
year: '1234',
|
|
21
40
|
date: '2005-11-01',
|
|
22
41
|
},
|
|
@@ -27,7 +46,7 @@ describe('VDatePickerTitle.ts', () => {
|
|
|
27
46
|
|
|
28
47
|
it('should render disabled component and match snapshot', () => {
|
|
29
48
|
const wrapper = mountFunction({
|
|
30
|
-
|
|
49
|
+
props: {
|
|
31
50
|
year: '1234',
|
|
32
51
|
date: '2005-11-01',
|
|
33
52
|
disabled: true,
|
|
@@ -39,7 +58,7 @@ describe('VDatePickerTitle.ts', () => {
|
|
|
39
58
|
|
|
40
59
|
it('should render readonly component and match snapshot', () => {
|
|
41
60
|
const wrapper = mountFunction({
|
|
42
|
-
|
|
61
|
+
props: {
|
|
43
62
|
year: '1234',
|
|
44
63
|
date: '2005-11-01',
|
|
45
64
|
readonly: true,
|
|
@@ -51,7 +70,7 @@ describe('VDatePickerTitle.ts', () => {
|
|
|
51
70
|
|
|
52
71
|
it('should render component when selecting year and match snapshot', () => {
|
|
53
72
|
const wrapper = mountFunction({
|
|
54
|
-
|
|
73
|
+
props: {
|
|
55
74
|
year: '1234',
|
|
56
75
|
date: '2005-11-01',
|
|
57
76
|
selectingYear: true,
|
|
@@ -63,60 +82,61 @@ describe('VDatePickerTitle.ts', () => {
|
|
|
63
82
|
|
|
64
83
|
it('should render year icon', () => {
|
|
65
84
|
const wrapper = mountFunction({
|
|
66
|
-
|
|
85
|
+
props: {
|
|
67
86
|
year: '1234',
|
|
68
87
|
yearIcon: 'year',
|
|
69
88
|
date: '2005-11-01',
|
|
70
89
|
},
|
|
71
90
|
})
|
|
72
91
|
|
|
73
|
-
expect(wrapper.findAll('.v-date-picker-title__year')
|
|
92
|
+
expect(wrapper.findAll('.v-date-picker-title__year')[0].html()).toMatchSnapshot()
|
|
74
93
|
})
|
|
75
94
|
|
|
76
|
-
it('should emit input event on year/date click', () => {
|
|
95
|
+
it('should emit input event on year/date click', async () => {
|
|
77
96
|
const wrapper = mountFunction({
|
|
78
|
-
|
|
97
|
+
props: {
|
|
79
98
|
year: '1234',
|
|
80
99
|
yearIcon: 'year',
|
|
81
100
|
date: '2005-11-01',
|
|
82
101
|
},
|
|
83
102
|
})
|
|
84
103
|
|
|
85
|
-
|
|
86
|
-
wrapper.
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
wrapper.findAll('.v-date-picker-title__year')
|
|
91
|
-
expect(
|
|
92
|
-
wrapper.
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
wrapper.findAll('.v-date-picker-
|
|
96
|
-
expect(
|
|
104
|
+
// Клик по дате не должен эмитить событие
|
|
105
|
+
await wrapper.findAll('.v-date-picker-title__date')[0].trigger('click')
|
|
106
|
+
expect(wrapper.emitted('update:selecting-year')).toBeFalsy()
|
|
107
|
+
|
|
108
|
+
// Клик по году должен эмитить true
|
|
109
|
+
await wrapper.findAll('.v-date-picker-title__year')[0].trigger('click')
|
|
110
|
+
expect(wrapper.emitted('update:selecting-year')).toHaveLength(1)
|
|
111
|
+
expect(wrapper.emitted('update:selecting-year')[0]).toEqual([true])
|
|
112
|
+
|
|
113
|
+
// Клик по дате должен эмитить false (переключение обратно)
|
|
114
|
+
await wrapper.findAll('.v-date-picker-title__date')[0].trigger('click')
|
|
115
|
+
expect(wrapper.emitted('update:selecting-year')).toHaveLength(2)
|
|
116
|
+
expect(wrapper.emitted('update:selecting-year')[1]).toEqual([false])
|
|
97
117
|
})
|
|
98
118
|
|
|
99
|
-
it('should have the correct transition', () => {
|
|
119
|
+
it('should have the correct transition', async () => {
|
|
100
120
|
const wrapper = mountFunction({
|
|
101
|
-
|
|
121
|
+
props: {
|
|
102
122
|
year: '2018',
|
|
103
123
|
date: 'Tue, Mar 3',
|
|
104
|
-
|
|
124
|
+
modelValue: '2018-03-03',
|
|
105
125
|
},
|
|
106
126
|
})
|
|
107
127
|
|
|
108
128
|
expect(wrapper.vm.isReversing).toBe(false)
|
|
109
129
|
|
|
110
|
-
wrapper.setProps({
|
|
130
|
+
await wrapper.setProps({
|
|
111
131
|
date: 'Wed, Mar 4',
|
|
112
|
-
|
|
132
|
+
modelValue: '2018-03-04',
|
|
113
133
|
})
|
|
114
134
|
|
|
115
135
|
expect(wrapper.vm.isReversing).toBe(false)
|
|
116
136
|
|
|
117
|
-
wrapper.setProps({
|
|
137
|
+
await wrapper.setProps({
|
|
118
138
|
date: 'Wed, Mar 3',
|
|
119
|
-
|
|
139
|
+
modelValue: '2018-03-03',
|
|
120
140
|
})
|
|
121
141
|
|
|
122
142
|
expect(wrapper.vm.isReversing).toBe(true)
|
|
@@ -3,8 +3,11 @@ import {
|
|
|
3
3
|
mount,
|
|
4
4
|
MountOptions,
|
|
5
5
|
Wrapper,
|
|
6
|
+
enableAutoUnmount,
|
|
6
7
|
} from '@vue/test-utils'
|
|
7
8
|
|
|
9
|
+
enableAutoUnmount(afterEach)
|
|
10
|
+
|
|
8
11
|
describe('VDatePickerYears.ts', () => {
|
|
9
12
|
type Instance = InstanceType<typeof VDatePickerYears>
|
|
10
13
|
let mountFunction: (options?: MountOptions<Instance>) => Wrapper<Instance>
|
|
@@ -12,11 +15,13 @@ describe('VDatePickerYears.ts', () => {
|
|
|
12
15
|
mountFunction = (options?: MountOptions<Instance>) => {
|
|
13
16
|
return mount(VDatePickerYears, {
|
|
14
17
|
...options,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
global: {
|
|
19
|
+
mocks: {
|
|
20
|
+
$vuetify: {
|
|
21
|
+
rtl: false,
|
|
22
|
+
lang: {
|
|
23
|
+
t: () => {},
|
|
24
|
+
},
|
|
20
25
|
},
|
|
21
26
|
},
|
|
22
27
|
},
|
|
@@ -26,8 +31,8 @@ describe('VDatePickerYears.ts', () => {
|
|
|
26
31
|
|
|
27
32
|
it('should render component and match snapshot', () => {
|
|
28
33
|
const wrapper = mountFunction({
|
|
29
|
-
|
|
30
|
-
|
|
34
|
+
props: {
|
|
35
|
+
modelValue: '2000',
|
|
31
36
|
},
|
|
32
37
|
})
|
|
33
38
|
|
|
@@ -36,51 +41,49 @@ describe('VDatePickerYears.ts', () => {
|
|
|
36
41
|
|
|
37
42
|
it('should respect min/max props', async () => {
|
|
38
43
|
const wrapper = mountFunction({
|
|
39
|
-
|
|
44
|
+
props: {
|
|
40
45
|
min: 1234,
|
|
41
46
|
max: 1238,
|
|
42
47
|
},
|
|
43
48
|
})
|
|
44
49
|
|
|
45
|
-
expect(wrapper.findAll('li:first-child')
|
|
46
|
-
expect(wrapper.findAll('li:last-child')
|
|
50
|
+
expect(wrapper.findAll('li:first-child')[0].element.textContent).toBe('1238')
|
|
51
|
+
expect(wrapper.findAll('li:last-child')[0].element.textContent).toBe('1234')
|
|
47
52
|
})
|
|
48
53
|
|
|
49
54
|
it('should not allow min to be greater then max', async () => {
|
|
50
55
|
const wrapper = mountFunction({
|
|
51
|
-
|
|
56
|
+
props: {
|
|
52
57
|
min: 1238,
|
|
53
58
|
max: 1234,
|
|
54
59
|
},
|
|
55
60
|
})
|
|
56
61
|
expect(wrapper.findAll('li')).toHaveLength(1)
|
|
57
|
-
expect(wrapper.findAll('li')
|
|
58
|
-
expect(wrapper.findAll('li')
|
|
62
|
+
expect(wrapper.findAll('li')[0].element.textContent).toBe('1234')
|
|
63
|
+
expect(wrapper.findAll('li')[0].element.textContent).toBe('1234')
|
|
59
64
|
})
|
|
60
65
|
|
|
61
66
|
it('should emit event on year click', async () => {
|
|
62
67
|
const wrapper = mountFunction({
|
|
63
|
-
|
|
64
|
-
|
|
68
|
+
props: {
|
|
69
|
+
modelValue: 1999,
|
|
65
70
|
},
|
|
66
71
|
})
|
|
67
72
|
|
|
68
|
-
|
|
69
|
-
wrapper.
|
|
70
|
-
|
|
71
|
-
wrapper.findAll('li.active + li').at(0).trigger('click')
|
|
72
|
-
expect(input).toHaveBeenCalledWith(1998)
|
|
73
|
+
await wrapper.findAll('li.active + li')[0].trigger('click')
|
|
74
|
+
expect(wrapper.emitted('update:modelValue')).toBeTruthy()
|
|
75
|
+
expect(wrapper.emitted('update:modelValue')?.[0]).toEqual([1998])
|
|
73
76
|
})
|
|
74
77
|
|
|
75
78
|
it('should format years', async () => {
|
|
76
79
|
const wrapper = mountFunction({
|
|
77
|
-
|
|
80
|
+
props: {
|
|
78
81
|
format: year => `(${year})`,
|
|
79
82
|
min: 1001,
|
|
80
83
|
max: 1001,
|
|
81
84
|
},
|
|
82
85
|
})
|
|
83
86
|
|
|
84
|
-
expect(wrapper.findAll('li')
|
|
87
|
+
expect(wrapper.findAll('li')[0].element.textContent).toBe('(1001)')
|
|
85
88
|
})
|
|
86
89
|
})
|