@dimailn/vuetify 2.7.2-alpha26 → 2.7.2-alpha27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vuetify.js +1109 -1021
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +1 -1
- package/dist/vuetify.min.js +2 -2
- package/es5/components/VAlert/VAlert.js +1 -0
- package/es5/components/VAlert/VAlert.js.map +1 -1
- package/es5/components/VAppBar/VAppBar.js +17 -6
- package/es5/components/VAppBar/VAppBar.js.map +1 -1
- package/es5/components/VBadge/VBadge.js +1 -0
- package/es5/components/VBadge/VBadge.js.map +1 -1
- package/es5/components/VBanner/VBanner.js +11 -12
- package/es5/components/VBanner/VBanner.js.map +1 -1
- package/es5/components/VBottomNavigation/VBottomNavigation.js +8 -7
- package/es5/components/VBottomNavigation/VBottomNavigation.js.map +1 -1
- package/es5/components/VBtn/VBtn.js +2 -2
- package/es5/components/VBtn/VBtn.js.map +1 -1
- package/es5/components/VCalendar/VCalendar.js +27 -29
- package/es5/components/VCalendar/VCalendar.js.map +1 -1
- package/es5/components/VCalendar/VCalendarCategory.js +26 -34
- package/es5/components/VCalendar/VCalendarCategory.js.map +1 -1
- package/es5/components/VCalendar/VCalendarDaily.js +43 -60
- package/es5/components/VCalendar/VCalendarDaily.js.map +1 -1
- package/es5/components/VCalendar/VCalendarMonthly.js +2 -2
- package/es5/components/VCalendar/VCalendarMonthly.js.map +1 -1
- package/es5/components/VCalendar/VCalendarWeekly.js +26 -35
- package/es5/components/VCalendar/VCalendarWeekly.js.map +1 -1
- package/es5/components/VCalendar/mixins/calendar-base.js +5 -10
- package/es5/components/VCalendar/mixins/calendar-base.js.map +1 -1
- package/es5/components/VCalendar/mixins/calendar-with-events.js +43 -58
- package/es5/components/VCalendar/mixins/calendar-with-events.js.map +1 -1
- package/es5/components/VCalendar/mixins/calendar-with-intervals.js +2 -2
- package/es5/components/VCalendar/mixins/calendar-with-intervals.js.map +1 -1
- package/es5/components/VCalendar/mixins/times.js.map +1 -1
- package/es5/components/VCarousel/VCarousel.js +10 -9
- package/es5/components/VCarousel/VCarousel.js.map +1 -1
- package/es5/components/VCheckbox/VCheckbox.js +31 -2
- package/es5/components/VCheckbox/VCheckbox.js.map +1 -1
- package/es5/components/VCheckbox/VSimpleCheckbox.js +0 -3
- package/es5/components/VCheckbox/VSimpleCheckbox.js.map +1 -1
- package/es5/components/VChip/VChip.js +14 -6
- package/es5/components/VChip/VChip.js.map +1 -1
- package/es5/components/VData/VData.js +1 -0
- package/es5/components/VData/VData.js.map +1 -1
- package/es5/components/VDataIterator/VDataFooter.js +1 -0
- package/es5/components/VDataIterator/VDataFooter.js.map +1 -1
- package/es5/components/VDataIterator/VDataIterator.js +1 -0
- package/es5/components/VDataIterator/VDataIterator.js.map +1 -1
- package/es5/components/VDataTable/VDataTable.js +1 -6
- package/es5/components/VDataTable/VDataTable.js.map +1 -1
- package/es5/components/VDataTable/VDataTableHeaderDesktop.js +1 -0
- package/es5/components/VDataTable/VDataTableHeaderDesktop.js.map +1 -1
- package/es5/components/VDataTable/VDataTableHeaderMobile.js +1 -0
- package/es5/components/VDataTable/VDataTableHeaderMobile.js.map +1 -1
- package/es5/components/VDataTable/VEditDialog.js +19 -18
- package/es5/components/VDataTable/VEditDialog.js.map +1 -1
- package/es5/components/VDataTable/mixins/header.js +0 -6
- package/es5/components/VDataTable/mixins/header.js.map +1 -1
- package/es5/components/VDatePicker/VDatePicker.js +13 -18
- package/es5/components/VDatePicker/VDatePicker.js.map +1 -1
- package/es5/components/VDatePicker/VDatePickerHeader.js +48 -26
- package/es5/components/VDatePicker/VDatePickerHeader.js.map +1 -1
- package/es5/components/VDatePicker/VDatePickerMonthTable.js +6 -3
- package/es5/components/VDatePicker/VDatePickerMonthTable.js.map +1 -1
- package/es5/components/VDatePicker/VDatePickerTitle.js +4 -3
- package/es5/components/VDatePicker/VDatePickerTitle.js.map +1 -1
- package/es5/components/VDatePicker/VDatePickerYears.js +11 -12
- package/es5/components/VDatePicker/VDatePickerYears.js.map +1 -1
- package/es5/components/VDatePicker/mixins/date-picker-table.js +16 -13
- package/es5/components/VDatePicker/mixins/date-picker-table.js.map +1 -1
- package/es5/components/VDatePicker/util/createNativeLocaleFormatter.js +4 -0
- package/es5/components/VDatePicker/util/createNativeLocaleFormatter.js.map +1 -1
- package/es5/components/VDialog/VDialog.js +1 -0
- package/es5/components/VDialog/VDialog.js.map +1 -1
- package/es5/components/VExpansionPanel/VExpansionPanel.js +1 -0
- package/es5/components/VExpansionPanel/VExpansionPanel.js.map +1 -1
- package/es5/components/VExpansionPanel/VExpansionPanelHeader.js +1 -10
- package/es5/components/VExpansionPanel/VExpansionPanelHeader.js.map +1 -1
- package/es5/components/VFileInput/VFileInput.js +1 -0
- package/es5/components/VFileInput/VFileInput.js.map +1 -1
- package/es5/components/VForm/VForm.js +1 -0
- package/es5/components/VForm/VForm.js.map +1 -1
- package/es5/components/VHover/VHover.js +1 -0
- package/es5/components/VHover/VHover.js.map +1 -1
- package/es5/components/VImg/VImg.js +3 -5
- package/es5/components/VImg/VImg.js.map +1 -1
- package/es5/components/VInput/VInput.js +1 -0
- package/es5/components/VInput/VInput.js.map +1 -1
- package/es5/components/VItemGroup/VItem.js +2 -1
- package/es5/components/VItemGroup/VItem.js.map +1 -1
- package/es5/components/VItemGroup/VItemGroup.js +5 -1
- package/es5/components/VItemGroup/VItemGroup.js.map +1 -1
- package/es5/components/VLazy/VLazy.js +8 -15
- package/es5/components/VLazy/VLazy.js.map +1 -1
- package/es5/components/VList/VListGroup.js +3 -11
- package/es5/components/VList/VListGroup.js.map +1 -1
- package/es5/components/VList/VListItem.js +26 -12
- package/es5/components/VList/VListItem.js.map +1 -1
- package/es5/components/VList/VListItemAction.js +23 -9
- package/es5/components/VList/VListItemAction.js.map +1 -1
- package/es5/components/VMenu/VMenu.js +1 -0
- package/es5/components/VMenu/VMenu.js.map +1 -1
- package/es5/components/VNavigationDrawer/VNavigationDrawer.js +1 -7
- package/es5/components/VNavigationDrawer/VNavigationDrawer.js.map +1 -1
- package/es5/components/VOtpInput/VOtpInput.js +1 -5
- package/es5/components/VOtpInput/VOtpInput.js.map +1 -1
- package/es5/components/VOverflowBtn/VOverflowBtn.js +1 -0
- package/es5/components/VOverflowBtn/VOverflowBtn.js.map +1 -1
- package/es5/components/VOverlay/VOverlay.js +1 -0
- package/es5/components/VOverlay/VOverlay.js.map +1 -1
- package/es5/components/VPagination/VPagination.js +1 -3
- package/es5/components/VPagination/VPagination.js.map +1 -1
- package/es5/components/VPicker/VPicker.js +2 -3
- package/es5/components/VPicker/VPicker.js.map +1 -1
- package/es5/components/VProgressCircular/VProgressCircular.js +1 -10
- package/es5/components/VProgressCircular/VProgressCircular.js.map +1 -1
- package/es5/components/VProgressLinear/VProgressLinear.js +4 -12
- package/es5/components/VProgressLinear/VProgressLinear.js.map +1 -1
- package/es5/components/VRadioGroup/VRadio.js +1 -0
- package/es5/components/VRadioGroup/VRadio.js.map +1 -1
- package/es5/components/VSelect/VSelect.js +111 -64
- package/es5/components/VSelect/VSelect.js.map +1 -1
- package/es5/components/VSelect/VSelectList.js +13 -17
- package/es5/components/VSelect/VSelectList.js.map +1 -1
- package/es5/components/VSlideGroup/VSlideGroup.js +1 -4
- package/es5/components/VSlideGroup/VSlideGroup.js.map +1 -1
- package/es5/components/VSlideGroup/VSlideItem.js +2 -1
- package/es5/components/VSlideGroup/VSlideItem.js.map +1 -1
- package/es5/components/VSlider/VSlider.js +0 -3
- package/es5/components/VSlider/VSlider.js.map +1 -1
- package/es5/components/VSnackbar/VSnackbar.js +1 -0
- package/es5/components/VSnackbar/VSnackbar.js.map +1 -1
- package/es5/components/VSparkline/VSparkline.js +48 -68
- package/es5/components/VSparkline/VSparkline.js.map +1 -1
- package/es5/components/VSpeedDial/VSpeedDial.js +4 -10
- package/es5/components/VSpeedDial/VSpeedDial.js.map +1 -1
- package/es5/components/VStepper/VStepper.js +1 -0
- package/es5/components/VStepper/VStepper.js.map +1 -1
- package/es5/components/VStepper/VStepperStep.js +11 -19
- package/es5/components/VStepper/VStepperStep.js.map +1 -1
- package/es5/components/VSwitch/VSwitch.js +1 -3
- package/es5/components/VSwitch/VSwitch.js.map +1 -1
- package/es5/components/VTabs/VTab.js +1 -0
- package/es5/components/VTabs/VTab.js.map +1 -1
- package/es5/components/VTabs/VTabs.js +11 -4
- package/es5/components/VTabs/VTabs.js.map +1 -1
- package/es5/components/VTabs/VTabsItems.js +1 -0
- package/es5/components/VTabs/VTabsItems.js.map +1 -1
- package/es5/components/VTextField/VTextField.js +31 -27
- package/es5/components/VTextField/VTextField.js.map +1 -1
- package/es5/components/VTimePicker/VTimePicker.js +72 -44
- package/es5/components/VTimePicker/VTimePicker.js.map +1 -1
- package/es5/components/VTimePicker/VTimePickerClock.js +37 -48
- package/es5/components/VTimePicker/VTimePickerClock.js.map +1 -1
- package/es5/components/VTimePicker/VTimePickerTitle.js +13 -11
- package/es5/components/VTimePicker/VTimePickerTitle.js.map +1 -1
- package/es5/components/VToolbar/VToolbar.js +1 -3
- package/es5/components/VToolbar/VToolbar.js.map +1 -1
- package/es5/components/VTooltip/VTooltip.js +6 -3
- package/es5/components/VTooltip/VTooltip.js.map +1 -1
- package/es5/components/VVirtualScroll/VVirtualScroll.js +0 -3
- package/es5/components/VVirtualScroll/VVirtualScroll.js.map +1 -1
- package/es5/components/VWindow/VWindow.js +0 -3
- package/es5/components/VWindow/VWindow.js.map +1 -1
- package/es5/components/VWindow/VWindowItem.js +1 -5
- package/es5/components/VWindow/VWindowItem.js.map +1 -1
- package/es5/framework.js +1 -1
- package/es5/mixins/detachable/index.js +9 -5
- package/es5/mixins/detachable/index.js.map +1 -1
- package/lib/components/VAlert/VAlert.js +1 -0
- package/lib/components/VAlert/VAlert.js.map +1 -1
- package/lib/components/VAppBar/VAppBar.js +17 -6
- package/lib/components/VAppBar/VAppBar.js.map +1 -1
- package/lib/components/VBadge/VBadge.js +1 -0
- package/lib/components/VBadge/VBadge.js.map +1 -1
- package/lib/components/VBanner/VBanner.js +7 -11
- package/lib/components/VBanner/VBanner.js.map +1 -1
- package/lib/components/VBottomNavigation/VBottomNavigation.js +8 -7
- package/lib/components/VBottomNavigation/VBottomNavigation.js.map +1 -1
- package/lib/components/VBtn/VBtn.js +2 -2
- package/lib/components/VBtn/VBtn.js.map +1 -1
- package/lib/components/VCalendar/VCalendar.js +26 -31
- package/lib/components/VCalendar/VCalendar.js.map +1 -1
- package/lib/components/VCalendar/VCalendarCategory.js +8 -10
- package/lib/components/VCalendar/VCalendarCategory.js.map +1 -1
- package/lib/components/VCalendar/VCalendarDaily.js +21 -33
- package/lib/components/VCalendar/VCalendarDaily.js.map +1 -1
- package/lib/components/VCalendar/VCalendarMonthly.js +2 -2
- package/lib/components/VCalendar/VCalendarMonthly.js.map +1 -1
- package/lib/components/VCalendar/VCalendarWeekly.js +17 -30
- package/lib/components/VCalendar/VCalendarWeekly.js.map +1 -1
- package/lib/components/VCalendar/mixins/calendar-base.js +7 -11
- package/lib/components/VCalendar/mixins/calendar-base.js.map +1 -1
- package/lib/components/VCalendar/mixins/calendar-with-events.js +16 -39
- package/lib/components/VCalendar/mixins/calendar-with-events.js.map +1 -1
- package/lib/components/VCalendar/mixins/calendar-with-intervals.js +2 -2
- package/lib/components/VCalendar/mixins/calendar-with-intervals.js.map +1 -1
- package/lib/components/VCalendar/mixins/times.js.map +1 -1
- package/lib/components/VCarousel/VCarousel.js +12 -11
- package/lib/components/VCarousel/VCarousel.js.map +1 -1
- package/lib/components/VCheckbox/VCheckbox.js +14 -1
- package/lib/components/VCheckbox/VCheckbox.js.map +1 -1
- package/lib/components/VCheckbox/VSimpleCheckbox.js +0 -3
- package/lib/components/VCheckbox/VSimpleCheckbox.js.map +1 -1
- package/lib/components/VChip/VChip.js +14 -6
- package/lib/components/VChip/VChip.js.map +1 -1
- package/lib/components/VData/VData.js +1 -0
- package/lib/components/VData/VData.js.map +1 -1
- package/lib/components/VDataIterator/VDataFooter.js +1 -0
- package/lib/components/VDataIterator/VDataFooter.js.map +1 -1
- package/lib/components/VDataIterator/VDataIterator.js +1 -0
- package/lib/components/VDataIterator/VDataIterator.js.map +1 -1
- package/lib/components/VDataTable/VDataTable.js +2 -7
- package/lib/components/VDataTable/VDataTable.js.map +1 -1
- package/lib/components/VDataTable/VDataTableHeaderDesktop.js +1 -0
- package/lib/components/VDataTable/VDataTableHeaderDesktop.js.map +1 -1
- package/lib/components/VDataTable/VDataTableHeaderMobile.js +1 -0
- package/lib/components/VDataTable/VDataTableHeaderMobile.js.map +1 -1
- package/lib/components/VDataTable/VEditDialog.js +15 -14
- package/lib/components/VDataTable/VEditDialog.js.map +1 -1
- package/lib/components/VDataTable/mixins/header.js +0 -5
- package/lib/components/VDataTable/mixins/header.js.map +1 -1
- package/lib/components/VDatePicker/VDatePicker.js +11 -16
- package/lib/components/VDatePicker/VDatePicker.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerHeader.js +33 -20
- package/lib/components/VDatePicker/VDatePickerHeader.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerMonthTable.js +3 -1
- package/lib/components/VDatePicker/VDatePickerMonthTable.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerTitle.js +4 -3
- package/lib/components/VDatePicker/VDatePickerTitle.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerYears.js +8 -9
- package/lib/components/VDatePicker/VDatePickerYears.js.map +1 -1
- package/lib/components/VDatePicker/mixins/date-picker-table.js +17 -13
- package/lib/components/VDatePicker/mixins/date-picker-table.js.map +1 -1
- package/lib/components/VDatePicker/util/createNativeLocaleFormatter.js +4 -0
- package/lib/components/VDatePicker/util/createNativeLocaleFormatter.js.map +1 -1
- package/lib/components/VDialog/VDialog.js +1 -0
- package/lib/components/VDialog/VDialog.js.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanel.js +1 -0
- package/lib/components/VExpansionPanel/VExpansionPanel.js.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanelHeader.js +1 -4
- package/lib/components/VExpansionPanel/VExpansionPanelHeader.js.map +1 -1
- package/lib/components/VFileInput/VFileInput.js +1 -0
- package/lib/components/VFileInput/VFileInput.js.map +1 -1
- package/lib/components/VForm/VForm.js +1 -0
- package/lib/components/VForm/VForm.js.map +1 -1
- package/lib/components/VHover/VHover.js +1 -0
- package/lib/components/VHover/VHover.js.map +1 -1
- package/lib/components/VImg/VImg.js +2 -6
- package/lib/components/VImg/VImg.js.map +1 -1
- package/lib/components/VInput/VInput.js +1 -0
- package/lib/components/VInput/VInput.js.map +1 -1
- package/lib/components/VItemGroup/VItem.js +2 -1
- package/lib/components/VItemGroup/VItem.js.map +1 -1
- package/lib/components/VItemGroup/VItemGroup.js +6 -1
- package/lib/components/VItemGroup/VItemGroup.js.map +1 -1
- package/lib/components/VLazy/VLazy.js +8 -15
- package/lib/components/VLazy/VLazy.js.map +1 -1
- package/lib/components/VList/VListGroup.js +3 -5
- package/lib/components/VList/VListGroup.js.map +1 -1
- package/lib/components/VList/VListItem.js +25 -14
- package/lib/components/VList/VListItem.js.map +1 -1
- package/lib/components/VList/VListItemAction.js +15 -9
- package/lib/components/VList/VListItemAction.js.map +1 -1
- package/lib/components/VMenu/VMenu.js +1 -0
- package/lib/components/VMenu/VMenu.js.map +1 -1
- package/lib/components/VNavigationDrawer/VNavigationDrawer.js +1 -6
- package/lib/components/VNavigationDrawer/VNavigationDrawer.js.map +1 -1
- package/lib/components/VOtpInput/VOtpInput.js +2 -6
- package/lib/components/VOtpInput/VOtpInput.js.map +1 -1
- package/lib/components/VOverflowBtn/VOverflowBtn.js +1 -0
- package/lib/components/VOverflowBtn/VOverflowBtn.js.map +1 -1
- package/lib/components/VOverlay/VOverlay.js +1 -0
- package/lib/components/VOverlay/VOverlay.js.map +1 -1
- package/lib/components/VPagination/VPagination.js +1 -3
- package/lib/components/VPagination/VPagination.js.map +1 -1
- package/lib/components/VPicker/VPicker.js +3 -3
- package/lib/components/VPicker/VPicker.js.map +1 -1
- package/lib/components/VProgressCircular/VProgressCircular.js +1 -4
- package/lib/components/VProgressCircular/VProgressCircular.js.map +1 -1
- package/lib/components/VProgressLinear/VProgressLinear.js +4 -6
- package/lib/components/VProgressLinear/VProgressLinear.js.map +1 -1
- package/lib/components/VRadioGroup/VRadio.js +1 -0
- package/lib/components/VRadioGroup/VRadio.js.map +1 -1
- package/lib/components/VSelect/VSelect.js +64 -19
- package/lib/components/VSelect/VSelect.js.map +1 -1
- package/lib/components/VSelect/VSelectList.js +13 -15
- package/lib/components/VSelect/VSelectList.js.map +1 -1
- package/lib/components/VSlideGroup/VSlideGroup.js +1 -4
- package/lib/components/VSlideGroup/VSlideGroup.js.map +1 -1
- package/lib/components/VSlideGroup/VSlideItem.js +2 -1
- package/lib/components/VSlideGroup/VSlideItem.js.map +1 -1
- package/lib/components/VSlider/VSlider.js +0 -3
- package/lib/components/VSlider/VSlider.js.map +1 -1
- package/lib/components/VSnackbar/VSnackbar.js +1 -0
- package/lib/components/VSnackbar/VSnackbar.js.map +1 -1
- package/lib/components/VSparkline/VSparkline.js +48 -67
- package/lib/components/VSparkline/VSparkline.js.map +1 -1
- package/lib/components/VSpeedDial/VSpeedDial.js +3 -9
- package/lib/components/VSpeedDial/VSpeedDial.js.map +1 -1
- package/lib/components/VStepper/VStepper.js +1 -0
- package/lib/components/VStepper/VStepper.js.map +1 -1
- package/lib/components/VStepper/VStepperStep.js +7 -18
- package/lib/components/VStepper/VStepperStep.js.map +1 -1
- package/lib/components/VSwitch/VSwitch.js +1 -3
- package/lib/components/VSwitch/VSwitch.js.map +1 -1
- package/lib/components/VTabs/VTab.js +1 -0
- package/lib/components/VTabs/VTab.js.map +1 -1
- package/lib/components/VTabs/VTabs.js +14 -4
- package/lib/components/VTabs/VTabs.js.map +1 -1
- package/lib/components/VTabs/VTabsItems.js +1 -0
- package/lib/components/VTabs/VTabsItems.js.map +1 -1
- package/lib/components/VTextField/VTextField.js +6 -15
- package/lib/components/VTextField/VTextField.js.map +1 -1
- package/lib/components/VTimePicker/VTimePicker.js +65 -31
- package/lib/components/VTimePicker/VTimePicker.js.map +1 -1
- package/lib/components/VTimePicker/VTimePickerClock.js +24 -39
- package/lib/components/VTimePicker/VTimePickerClock.js.map +1 -1
- package/lib/components/VTimePicker/VTimePickerTitle.js +3 -2
- package/lib/components/VTimePicker/VTimePickerTitle.js.map +1 -1
- package/lib/components/VToolbar/VToolbar.js +1 -3
- package/lib/components/VToolbar/VToolbar.js.map +1 -1
- package/lib/components/VTooltip/VTooltip.js +1 -2
- package/lib/components/VTooltip/VTooltip.js.map +1 -1
- package/lib/components/VVirtualScroll/VVirtualScroll.js +0 -3
- package/lib/components/VVirtualScroll/VVirtualScroll.js.map +1 -1
- package/lib/components/VWindow/VWindow.js +0 -3
- package/lib/components/VWindow/VWindow.js.map +1 -1
- package/lib/components/VWindow/VWindowItem.js +2 -6
- package/lib/components/VWindow/VWindowItem.js.map +1 -1
- package/lib/framework.js +1 -1
- package/lib/mixins/detachable/index.js +9 -5
- package/lib/mixins/detachable/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/VAlert/VAlert.ts +2 -0
- package/src/components/VAppBar/VAppBar.ts +12 -3
- package/src/components/VBadge/VBadge.ts +1 -1
- package/src/components/VBanner/VBanner.ts +14 -14
- package/src/components/VBottomNavigation/VBottomNavigation.ts +10 -8
- package/src/components/VBtn/VBtn.ts +2 -2
- package/src/components/VCalendar/VCalendar.ts +29 -27
- package/src/components/VCalendar/VCalendarCategory.ts +9 -8
- package/src/components/VCalendar/VCalendarDaily.ts +18 -28
- package/src/components/VCalendar/VCalendarMonthly.ts +2 -1
- package/src/components/VCalendar/VCalendarWeekly.ts +18 -30
- package/src/components/VCalendar/__tests__/VCalendar.spec.ts +18 -34
- package/src/components/VCalendar/__tests__/VCalendarCategory.spec.ts +16 -14
- package/src/components/VCalendar/__tests__/VCalendarDaily.spec.ts +30 -28
- package/src/components/VCalendar/__tests__/__snapshots__/VCalendar.spec.ts.snap +206 -205
- package/src/components/VCalendar/__tests__/__snapshots__/VCalendarDaily.spec.ts.snap +122 -122
- package/src/components/VCalendar/mixins/__tests__/__snapshots__/calendar-with-events.spec.ts.snap +1 -56
- package/src/components/VCalendar/mixins/__tests__/calendar-base.spec.ts +24 -21
- package/src/components/VCalendar/mixins/__tests__/calendar-with-events.spec.ts +27 -34
- package/src/components/VCalendar/mixins/__tests__/calendar-with-intervals.spec.ts +31 -28
- package/src/components/VCalendar/mixins/__tests__/times.spec.ts +10 -9
- package/src/components/VCalendar/mixins/calendar-base.ts +8 -12
- package/src/components/VCalendar/mixins/calendar-with-events.ts +19 -38
- package/src/components/VCalendar/mixins/calendar-with-intervals.ts +1 -1
- package/src/components/VCalendar/mixins/times.ts +1 -1
- package/src/components/VCarousel/VCarousel.ts +13 -9
- package/src/components/VCheckbox/VCheckbox.ts +19 -1
- package/src/components/VCheckbox/VSimpleCheckbox.ts +0 -3
- package/src/components/VChip/VChip.ts +16 -13
- package/src/components/VData/VData.ts +2 -0
- package/src/components/VDataIterator/VDataFooter.ts +2 -0
- package/src/components/VDataIterator/VDataIterator.ts +2 -0
- package/src/components/VDataTable/VDataTable.ts +2 -4
- package/src/components/VDataTable/VDataTableHeaderDesktop.ts +5 -0
- package/src/components/VDataTable/VDataTableHeaderMobile.ts +2 -0
- package/src/components/VDataTable/VEditDialog.ts +19 -17
- package/src/components/VDataTable/mixins/header.ts +0 -4
- package/src/components/VDatePicker/VDatePicker.ts +13 -18
- package/src/components/VDatePicker/VDatePickerHeader.ts +44 -32
- package/src/components/VDatePicker/VDatePickerMonthTable.ts +1 -1
- package/src/components/VDatePicker/VDatePickerTitle.ts +7 -5
- package/src/components/VDatePicker/VDatePickerYears.ts +6 -10
- package/src/components/VDatePicker/__tests__/VDatePicker.date.spec.ts +302 -246
- package/src/components/VDatePicker/__tests__/VDatePicker.month.spec.ts +90 -86
- package/src/components/VDatePicker/__tests__/VDatePickerDateTable.spec.ts +76 -90
- package/src/components/VDatePicker/__tests__/VDatePickerHeader.spec.ts +96 -71
- package/src/components/VDatePicker/__tests__/VDatePickerMonthTable.spec.ts +63 -77
- package/src/components/VDatePicker/__tests__/VDatePickerTitle.spec.ts +48 -28
- package/src/components/VDatePicker/__tests__/VDatePickerYears.spec.ts +25 -22
- package/src/components/VDatePicker/__tests__/__snapshots__/VDatePicker.date.spec.ts.snap +601 -586
- package/src/components/VDatePicker/__tests__/__snapshots__/VDatePicker.month.spec.ts.snap +203 -193
- package/src/components/VDatePicker/__tests__/__snapshots__/VDatePickerDateTable.spec.ts.snap +615 -615
- package/src/components/VDatePicker/__tests__/__snapshots__/VDatePickerHeader.spec.ts.snap +52 -52
- package/src/components/VDatePicker/__tests__/__snapshots__/VDatePickerMonthTable.spec.ts.snap +144 -144
- package/src/components/VDatePicker/__tests__/__snapshots__/VDatePickerTitle.spec.ts.snap +3 -4
- package/src/components/VDatePicker/mixins/date-picker-table.ts +18 -13
- package/src/components/VDatePicker/util/__tests__/createNativeLocaleFormatter.spec.ts +7 -0
- package/src/components/VDatePicker/util/createNativeLocaleFormatter.ts +3 -0
- package/src/components/VDialog/VDialog.ts +7 -5
- package/src/components/VExpansionPanel/VExpansionPanel.ts +5 -0
- package/src/components/VExpansionPanel/VExpansionPanelHeader.ts +0 -1
- package/src/components/VFileInput/VFileInput.ts +2 -0
- package/src/components/VForm/VForm.ts +2 -0
- package/src/components/VHover/VHover.ts +2 -0
- package/src/components/VImg/VImg.ts +2 -1
- package/src/components/VInput/VInput.ts +2 -0
- package/src/components/VItemGroup/VItem.ts +4 -0
- package/src/components/VItemGroup/VItemGroup.ts +7 -1
- package/src/components/VLazy/VLazy.ts +11 -13
- package/src/components/VList/VListGroup.ts +7 -8
- package/src/components/VList/VListItem.ts +29 -15
- package/src/components/VList/VListItemAction.ts +11 -10
- package/src/components/VMenu/VMenu.ts +3 -1
- package/src/components/VNavigationDrawer/VNavigationDrawer.ts +2 -5
- package/src/components/VOtpInput/VOtpInput.ts +2 -3
- package/src/components/VOverflowBtn/VOverflowBtn.ts +2 -0
- package/src/components/VOverlay/VOverlay.ts +2 -0
- package/src/components/VPagination/VPagination.ts +2 -1
- package/src/components/VPicker/VPicker.ts +8 -10
- package/src/components/VPicker/__tests__/VPicker.spec.ts +14 -15
- package/src/components/VProgressCircular/VProgressCircular.ts +0 -1
- package/src/components/VProgressLinear/VProgressLinear.ts +14 -13
- package/src/components/VRadioGroup/VRadio.ts +2 -0
- package/src/components/VSelect/VSelect.ts +59 -19
- package/src/components/VSelect/VSelectList.ts +13 -9
- package/src/components/VSlideGroup/VSlideGroup.ts +2 -4
- package/src/components/VSlideGroup/VSlideItem.ts +2 -0
- package/src/components/VSlider/VSlider.ts +0 -3
- package/src/components/VSnackbar/VSnackbar.ts +1 -1
- package/src/components/VSparkline/VSparkline.ts +54 -92
- package/src/components/VSpeedDial/VSpeedDial.ts +6 -8
- package/src/components/VStepper/VStepper.ts +3 -1
- package/src/components/VStepper/VStepperStep.ts +8 -15
- package/src/components/VSwitch/VSwitch.ts +4 -5
- package/src/components/VTabs/VTab.ts +2 -0
- package/src/components/VTabs/VTabs.ts +16 -10
- package/src/components/VTabs/VTabsItems.ts +2 -0
- package/src/components/VTextField/VTextField.ts +9 -12
- package/src/components/VTimePicker/VTimePicker.ts +199 -89
- package/src/components/VTimePicker/VTimePickerClock.ts +40 -45
- package/src/components/VTimePicker/VTimePickerTitle.ts +5 -4
- package/src/components/VTimePicker/__tests__/VTimePicker.spec.ts +153 -140
- package/src/components/VTimePicker/__tests__/VTimePickerClock.spec.ts +78 -81
- package/src/components/VTimePicker/__tests__/VTimePickerTitle.spec.ts +47 -41
- package/src/components/VTimePicker/__tests__/__snapshots__/VTimePicker.spec.ts.snap +160 -40
- package/src/components/VToolbar/VToolbar.ts +1 -1
- package/src/components/VTooltip/VTooltip.ts +1 -1
- package/src/components/VVirtualScroll/VVirtualScroll.ts +0 -1
- package/src/components/VWindow/VWindow.ts +0 -1
- package/src/components/VWindow/VWindowItem.ts +2 -3
- package/src/mixins/detachable/index.ts +11 -5
|
@@ -1,24 +1,35 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createApp, h } from 'vue'
|
|
2
2
|
import { Lang } from '../../../services/lang'
|
|
3
3
|
import VTimePicker, { SelectingTimes } from '../VTimePicker'
|
|
4
4
|
import {
|
|
5
5
|
mount,
|
|
6
6
|
MountOptions,
|
|
7
|
-
|
|
7
|
+
VueWrapper,
|
|
8
8
|
} from '@vue/test-utils'
|
|
9
9
|
|
|
10
10
|
import { preset } from '../../../presets/default'
|
|
11
11
|
|
|
12
|
-
Vue.prototype.$vuetify = {
|
|
13
|
-
lang: new Lang(preset),
|
|
14
|
-
}
|
|
15
|
-
|
|
16
12
|
describe('VTimePicker.ts', () => {
|
|
17
13
|
type Instance = InstanceType<typeof VTimePicker>
|
|
18
|
-
let mountFunction: (options?: MountOptions<Instance>) =>
|
|
14
|
+
let mountFunction: (options?: MountOptions<Instance>) => VueWrapper<Instance>
|
|
19
15
|
beforeEach(() => {
|
|
20
16
|
mountFunction = (options?: MountOptions<Instance>) => {
|
|
21
|
-
return mount(VTimePicker,
|
|
17
|
+
return mount(VTimePicker, {
|
|
18
|
+
global: {
|
|
19
|
+
config: {
|
|
20
|
+
warnHandler: () => {}, // Подавляем предупреждения Vue
|
|
21
|
+
},
|
|
22
|
+
mocks: {
|
|
23
|
+
$vuetify: {
|
|
24
|
+
lang: new Lang(preset),
|
|
25
|
+
icons: {
|
|
26
|
+
component: 'mdi',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
...options
|
|
32
|
+
})
|
|
22
33
|
}
|
|
23
34
|
});
|
|
24
35
|
|
|
@@ -26,8 +37,8 @@ describe('VTimePicker.ts', () => {
|
|
|
26
37
|
const useSecondsDesc = (useSecondsValue ? '. with useSeconds' : '')
|
|
27
38
|
it('should accept a value' + useSecondsDesc, async () => {
|
|
28
39
|
const wrapper = mountFunction({
|
|
29
|
-
|
|
30
|
-
|
|
40
|
+
props: {
|
|
41
|
+
modelValue: '09:12:34',
|
|
31
42
|
useSeconds: useSecondsValue,
|
|
32
43
|
},
|
|
33
44
|
})
|
|
@@ -45,8 +56,8 @@ describe('VTimePicker.ts', () => {
|
|
|
45
56
|
|
|
46
57
|
it('should render landscape component' + useSecondsDesc, async () => {
|
|
47
58
|
const wrapper = mountFunction({
|
|
48
|
-
|
|
49
|
-
|
|
59
|
+
props: {
|
|
60
|
+
modelValue: '09:12:34',
|
|
50
61
|
landscape: true,
|
|
51
62
|
useSeconds: useSecondsValue,
|
|
52
63
|
},
|
|
@@ -58,9 +69,9 @@ describe('VTimePicker.ts', () => {
|
|
|
58
69
|
|
|
59
70
|
it('should render disabled component' + useSecondsDesc, async () => {
|
|
60
71
|
const wrapper = mountFunction({
|
|
61
|
-
|
|
72
|
+
props: {
|
|
62
73
|
disabled: true,
|
|
63
|
-
|
|
74
|
+
modelValue: '09:12:34',
|
|
64
75
|
useSeconds: useSecondsValue,
|
|
65
76
|
},
|
|
66
77
|
})
|
|
@@ -71,9 +82,9 @@ describe('VTimePicker.ts', () => {
|
|
|
71
82
|
|
|
72
83
|
it('should render flat component' + useSecondsDesc, async () => {
|
|
73
84
|
const wrapper = mountFunction({
|
|
74
|
-
|
|
85
|
+
props: {
|
|
75
86
|
flat: true,
|
|
76
|
-
|
|
87
|
+
modelValue: '09:12:34',
|
|
77
88
|
useSeconds: useSecondsValue,
|
|
78
89
|
},
|
|
79
90
|
})
|
|
@@ -84,9 +95,9 @@ describe('VTimePicker.ts', () => {
|
|
|
84
95
|
|
|
85
96
|
it('should render component with elevation' + useSecondsDesc, async () => {
|
|
86
97
|
const wrapper = mountFunction({
|
|
87
|
-
|
|
98
|
+
props: {
|
|
88
99
|
elevation: 15,
|
|
89
|
-
|
|
100
|
+
modelValue: '09:12:34',
|
|
90
101
|
useSeconds: useSecondsValue,
|
|
91
102
|
},
|
|
92
103
|
})
|
|
@@ -97,20 +108,20 @@ describe('VTimePicker.ts', () => {
|
|
|
97
108
|
|
|
98
109
|
it('should render component without a title' + useSecondsDesc, () => {
|
|
99
110
|
const wrapper = mountFunction({
|
|
100
|
-
|
|
101
|
-
|
|
111
|
+
props: {
|
|
112
|
+
modelValue: '09:12:34',
|
|
102
113
|
noTitle: true,
|
|
103
114
|
useSeconds: useSecondsValue,
|
|
104
115
|
},
|
|
105
116
|
})
|
|
106
|
-
expect(wrapper.findAll('.v-picker__title')
|
|
117
|
+
expect(wrapper.findAll('.v-picker__title')).toHaveLength(0)
|
|
107
118
|
})
|
|
108
119
|
|
|
109
120
|
it('should accept a date object for a value' + useSecondsDesc, async () => {
|
|
110
121
|
const now = new Date('2017-01-01 12:00 AM')
|
|
111
122
|
const wrapper = mountFunction({
|
|
112
|
-
|
|
113
|
-
|
|
123
|
+
props: {
|
|
124
|
+
modelValue: now,
|
|
114
125
|
useSeconds: useSecondsValue,
|
|
115
126
|
},
|
|
116
127
|
})
|
|
@@ -125,69 +136,76 @@ describe('VTimePicker.ts', () => {
|
|
|
125
136
|
|
|
126
137
|
it('should change am/pm when updated from model' + useSecondsDesc, async () => {
|
|
127
138
|
const wrapper = mountFunction({
|
|
128
|
-
|
|
129
|
-
|
|
139
|
+
props: {
|
|
140
|
+
modelValue: '9:00am',
|
|
130
141
|
useSeconds: useSecondsValue,
|
|
131
142
|
},
|
|
132
143
|
})
|
|
133
144
|
|
|
134
145
|
await wrapper.vm.$nextTick()
|
|
135
|
-
wrapper.setProps({
|
|
146
|
+
await wrapper.setProps({ modelValue: '9:00pm' })
|
|
147
|
+
await wrapper.vm.$nextTick()
|
|
136
148
|
expect(wrapper.vm.period).toBe('pm')
|
|
137
149
|
// with seconds
|
|
138
|
-
wrapper.setProps({
|
|
150
|
+
await wrapper.setProps({ modelValue: '9:00:12am' })
|
|
151
|
+
await wrapper.vm.$nextTick()
|
|
139
152
|
expect(wrapper.vm.period).toBe('am')
|
|
140
|
-
wrapper.setProps({
|
|
153
|
+
await wrapper.setProps({ modelValue: '9:00:12pm' })
|
|
154
|
+
await wrapper.vm.$nextTick()
|
|
141
155
|
expect(wrapper.vm.period).toBe('pm')
|
|
142
156
|
expect(wrapper.html()).toMatchSnapshot()
|
|
143
157
|
})
|
|
144
158
|
|
|
145
159
|
it('should set picker to pm when given Date after noon' + useSecondsDesc, () => {
|
|
146
160
|
const wrapper = mountFunction({
|
|
147
|
-
|
|
148
|
-
|
|
161
|
+
props: {
|
|
162
|
+
modelValue: new Date('2017-01-01 12:00 PM'),
|
|
149
163
|
useSeconds: useSecondsValue,
|
|
150
164
|
},
|
|
151
165
|
})
|
|
152
166
|
|
|
153
167
|
expect(wrapper.vm.period).toBe('pm')
|
|
154
168
|
// with seconds
|
|
155
|
-
wrapper.setProps({
|
|
169
|
+
wrapper.setProps({ modelValue: new Date('2017-01-01 12:00:13 PM') })
|
|
156
170
|
expect(wrapper.vm.period).toBe('pm')
|
|
157
171
|
})
|
|
158
172
|
|
|
159
|
-
it('should set picker to pm when given string with PM in it' + useSecondsDesc, () => {
|
|
173
|
+
it('should set picker to pm when given string with PM in it' + useSecondsDesc, async () => {
|
|
160
174
|
const wrapper = mountFunction({
|
|
161
|
-
|
|
162
|
-
|
|
175
|
+
props: {
|
|
176
|
+
modelValue: '1:00 PM',
|
|
163
177
|
useSeconds: useSecondsValue,
|
|
164
178
|
},
|
|
165
179
|
})
|
|
166
180
|
|
|
181
|
+
await wrapper.vm.$nextTick()
|
|
167
182
|
expect(wrapper.vm.period).toBe('pm')
|
|
168
183
|
// with seconds
|
|
169
|
-
wrapper.setProps({
|
|
184
|
+
await wrapper.setProps({ modelValue: '1:00:12 PM' })
|
|
185
|
+
await wrapper.vm.$nextTick()
|
|
170
186
|
expect(wrapper.vm.period).toBe('pm')
|
|
171
187
|
})
|
|
172
188
|
|
|
173
|
-
it('should set picker to pm when given string with pm in it' + useSecondsDesc, () => {
|
|
189
|
+
it('should set picker to pm when given string with pm in it' + useSecondsDesc, async () => {
|
|
174
190
|
const wrapper = mountFunction({
|
|
175
|
-
|
|
176
|
-
|
|
191
|
+
props: {
|
|
192
|
+
modelValue: '1:00 pm',
|
|
177
193
|
useSeconds: useSecondsValue,
|
|
178
194
|
},
|
|
179
195
|
})
|
|
180
196
|
|
|
197
|
+
await wrapper.vm.$nextTick()
|
|
181
198
|
expect(wrapper.vm.period).toBe('pm')
|
|
182
199
|
// with seconds
|
|
183
|
-
wrapper.setProps({
|
|
200
|
+
await wrapper.setProps({ modelValue: '1:00:13 pm' })
|
|
201
|
+
await wrapper.vm.$nextTick()
|
|
184
202
|
expect(wrapper.vm.period).toBe('pm')
|
|
185
203
|
})
|
|
186
204
|
|
|
187
205
|
it('should set picker to am when given Date before noon' + useSecondsDesc, () => {
|
|
188
206
|
const wrapper = mountFunction({
|
|
189
|
-
|
|
190
|
-
|
|
207
|
+
props: {
|
|
208
|
+
modelValue: new Date('2017-01-01 1:00 AM'),
|
|
191
209
|
useSeconds: useSecondsValue,
|
|
192
210
|
},
|
|
193
211
|
})
|
|
@@ -200,8 +218,8 @@ describe('VTimePicker.ts', () => {
|
|
|
200
218
|
|
|
201
219
|
it('should render colored time picker' + useSecondsDesc, async () => {
|
|
202
220
|
const wrapper = mountFunction({
|
|
203
|
-
|
|
204
|
-
|
|
221
|
+
props: {
|
|
222
|
+
modelValue: '09:00:00',
|
|
205
223
|
color: 'orange darken-1',
|
|
206
224
|
useSeconds: useSecondsValue,
|
|
207
225
|
},
|
|
@@ -213,8 +231,8 @@ describe('VTimePicker.ts', () => {
|
|
|
213
231
|
|
|
214
232
|
it('should render colored time picker, header' + useSecondsDesc, async () => {
|
|
215
233
|
const wrapper = mountFunction({
|
|
216
|
-
|
|
217
|
-
|
|
234
|
+
props: {
|
|
235
|
+
modelValue: '09:00:00',
|
|
218
236
|
color: 'primary',
|
|
219
237
|
headerColor: 'orange darken-1',
|
|
220
238
|
useSeconds: useSecondsValue,
|
|
@@ -227,7 +245,7 @@ describe('VTimePicker.ts', () => {
|
|
|
227
245
|
|
|
228
246
|
it('should render dark time picker' + useSecondsDesc, async () => {
|
|
229
247
|
const wrapper = mountFunction({
|
|
230
|
-
|
|
248
|
+
props: {
|
|
231
249
|
dark: true,
|
|
232
250
|
useSeconds: useSecondsValue,
|
|
233
251
|
},
|
|
@@ -237,10 +255,10 @@ describe('VTimePicker.ts', () => {
|
|
|
237
255
|
expect(wrapper.html()).toMatchSnapshot()
|
|
238
256
|
})
|
|
239
257
|
|
|
240
|
-
it('should set input hour when setting hour in 12hr mode' + useSecondsDesc, () => { // eslint-disable-line max-statements
|
|
258
|
+
it('should set input hour when setting hour in 12hr mode' + useSecondsDesc, async () => { // eslint-disable-line max-statements
|
|
241
259
|
const wrapper = mountFunction({
|
|
242
|
-
|
|
243
|
-
|
|
260
|
+
props: {
|
|
261
|
+
modelValue: '01:23pm',
|
|
244
262
|
format: 'ampm',
|
|
245
263
|
useSeconds: useSecondsValue,
|
|
246
264
|
},
|
|
@@ -249,7 +267,8 @@ describe('VTimePicker.ts', () => {
|
|
|
249
267
|
wrapper.vm.onInput(7)
|
|
250
268
|
expect(wrapper.vm.inputHour).toBe(19)
|
|
251
269
|
|
|
252
|
-
wrapper.setProps({ format: '24hr' })
|
|
270
|
+
await wrapper.setProps({ format: '24hr' })
|
|
271
|
+
await wrapper.vm.$nextTick()
|
|
253
272
|
wrapper.vm.onInput(8)
|
|
254
273
|
expect(wrapper.vm.inputHour).toBe(8)
|
|
255
274
|
|
|
@@ -261,12 +280,14 @@ describe('VTimePicker.ts', () => {
|
|
|
261
280
|
|
|
262
281
|
// with seconds
|
|
263
282
|
wrapper.vm.selecting = SelectingTimes.Hour
|
|
264
|
-
wrapper.setProps({ format: 'ampm' })
|
|
265
|
-
wrapper.setProps({
|
|
283
|
+
await wrapper.setProps({ format: 'ampm' })
|
|
284
|
+
await wrapper.setProps({ modelValue: '01:23:45pm' })
|
|
285
|
+
await wrapper.vm.$nextTick()
|
|
266
286
|
wrapper.vm.onInput(7)
|
|
267
287
|
expect(wrapper.vm.inputHour).toBe(19)
|
|
268
288
|
|
|
269
|
-
wrapper.setProps({ format: '24hr' })
|
|
289
|
+
await wrapper.setProps({ format: '24hr' })
|
|
290
|
+
await wrapper.vm.$nextTick()
|
|
270
291
|
wrapper.vm.onInput(8)
|
|
271
292
|
expect(wrapper.vm.inputHour).toBe(8)
|
|
272
293
|
|
|
@@ -285,7 +306,7 @@ describe('VTimePicker.ts', () => {
|
|
|
285
306
|
|
|
286
307
|
it('should set properly input time' + useSecondsDesc, () => { // eslint-disable-line max-statements
|
|
287
308
|
const wrapper = mountFunction({
|
|
288
|
-
|
|
309
|
+
props: {
|
|
289
310
|
format: '24hr',
|
|
290
311
|
useSeconds: useSecondsValue,
|
|
291
312
|
},
|
|
@@ -328,8 +349,8 @@ describe('VTimePicker.ts', () => {
|
|
|
328
349
|
|
|
329
350
|
it('should update hour when changing period' + useSecondsDesc, async () => {
|
|
330
351
|
const wrapper = mountFunction({
|
|
331
|
-
|
|
332
|
-
|
|
352
|
+
props: {
|
|
353
|
+
modelValue: '15:34',
|
|
333
354
|
useSeconds: useSecondsValue,
|
|
334
355
|
},
|
|
335
356
|
})
|
|
@@ -353,8 +374,8 @@ describe('VTimePicker.ts', () => {
|
|
|
353
374
|
|
|
354
375
|
it('should change selecting when hour/minute/second is selected' + useSecondsDesc, () => {
|
|
355
376
|
const wrapper = mountFunction({
|
|
356
|
-
|
|
357
|
-
|
|
377
|
+
props: {
|
|
378
|
+
modelValue: '01:23pm',
|
|
358
379
|
format: 'ampm',
|
|
359
380
|
useSeconds: useSecondsValue,
|
|
360
381
|
},
|
|
@@ -374,46 +395,38 @@ describe('VTimePicker.ts', () => {
|
|
|
374
395
|
|
|
375
396
|
it('should emit click:XXX event on change' + useSecondsDesc, () => {
|
|
376
397
|
const wrapper = mountFunction({
|
|
377
|
-
|
|
378
|
-
|
|
398
|
+
props: {
|
|
399
|
+
modelValue: '01:23:45pm',
|
|
379
400
|
format: 'ampm',
|
|
380
401
|
useSeconds: useSecondsValue,
|
|
381
402
|
},
|
|
382
403
|
})
|
|
383
404
|
|
|
384
|
-
const clickHour = jest.fn()
|
|
385
|
-
const clickMinute = jest.fn()
|
|
386
|
-
const clickSecond = jest.fn()
|
|
387
|
-
|
|
388
|
-
wrapper.vm.$on('click:hour', clickHour)
|
|
389
|
-
wrapper.vm.$on('click:minute', clickMinute)
|
|
390
|
-
wrapper.vm.$on('click:second', clickSecond)
|
|
391
|
-
|
|
392
405
|
wrapper.vm.onChange(1)
|
|
393
|
-
expect(
|
|
394
|
-
expect(
|
|
395
|
-
expect(
|
|
396
|
-
expect(
|
|
406
|
+
expect(wrapper.emitted('click:hour')).toHaveLength(1)
|
|
407
|
+
expect(wrapper.emitted('click:hour')[0]).toEqual([1])
|
|
408
|
+
expect(wrapper.emitted('click:minute')).toBeFalsy()
|
|
409
|
+
expect(wrapper.emitted('click:second')).toBeFalsy()
|
|
397
410
|
|
|
398
411
|
wrapper.vm.onChange(59)
|
|
399
|
-
expect(
|
|
400
|
-
expect(
|
|
401
|
-
expect(
|
|
402
|
-
expect(
|
|
412
|
+
expect(wrapper.emitted('click:hour')).toHaveLength(1)
|
|
413
|
+
expect(wrapper.emitted('click:minute')).toHaveLength(1)
|
|
414
|
+
expect(wrapper.emitted('click:minute')[0]).toEqual([59])
|
|
415
|
+
expect(wrapper.emitted('click:second')).toBeFalsy()
|
|
403
416
|
|
|
404
417
|
if (useSecondsValue) {
|
|
405
418
|
wrapper.vm.onChange(45)
|
|
406
|
-
expect(
|
|
407
|
-
expect(
|
|
408
|
-
expect(
|
|
409
|
-
expect(
|
|
419
|
+
expect(wrapper.emitted('click:hour')).toHaveLength(1)
|
|
420
|
+
expect(wrapper.emitted('click:minute')).toHaveLength(1)
|
|
421
|
+
expect(wrapper.emitted('click:second')).toHaveLength(1)
|
|
422
|
+
expect(wrapper.emitted('click:second')[0]).toEqual([45])
|
|
410
423
|
}
|
|
411
424
|
})
|
|
412
425
|
|
|
413
426
|
it('should change selecting when clicked in title' + useSecondsDesc, () => {
|
|
414
427
|
const wrapper = mountFunction({
|
|
415
|
-
|
|
416
|
-
|
|
428
|
+
props: {
|
|
429
|
+
modelValue: '01:23pm',
|
|
417
430
|
format: 'ampm',
|
|
418
431
|
useSeconds: useSecondsValue,
|
|
419
432
|
},
|
|
@@ -437,49 +450,44 @@ describe('VTimePicker.ts', () => {
|
|
|
437
450
|
expect(wrapper.vm.selectingSecond).toBe(true)
|
|
438
451
|
})
|
|
439
452
|
|
|
440
|
-
it('should change period when clicked in title' + useSecondsDesc, () => {
|
|
453
|
+
it('should change period when clicked in title' + useSecondsDesc, async () => {
|
|
441
454
|
const wrapper = mountFunction({
|
|
442
|
-
|
|
443
|
-
|
|
455
|
+
props: {
|
|
456
|
+
modelValue: '01:23pm',
|
|
444
457
|
format: 'ampm',
|
|
445
458
|
useSeconds: useSecondsValue,
|
|
446
459
|
},
|
|
447
460
|
})
|
|
448
461
|
|
|
449
|
-
const title = wrapper.vm.$refs.title
|
|
450
|
-
|
|
451
462
|
expect(wrapper.vm.period).toBe('pm')
|
|
452
|
-
|
|
463
|
+
|
|
464
|
+
// Используем прямой вызов метода setPeriod
|
|
465
|
+
wrapper.vm.setPeriod('am')
|
|
466
|
+
await wrapper.vm.$nextTick()
|
|
453
467
|
expect(wrapper.vm.period).toBe('am')
|
|
454
|
-
|
|
468
|
+
|
|
469
|
+
wrapper.vm.setPeriod('pm')
|
|
470
|
+
await wrapper.vm.$nextTick()
|
|
455
471
|
expect(wrapper.vm.period).toBe('pm')
|
|
456
472
|
})
|
|
457
473
|
|
|
458
474
|
it('should match snapshot with slot' + useSecondsDesc, async () => {
|
|
459
|
-
const
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
useSeconds: useSecondsValue,
|
|
467
|
-
},
|
|
468
|
-
scopedSlots: {
|
|
469
|
-
default: slot,
|
|
470
|
-
},
|
|
471
|
-
})
|
|
475
|
+
const wrapper = mountFunction({
|
|
476
|
+
props: {
|
|
477
|
+
modelValue: '10:12',
|
|
478
|
+
useSeconds: useSecondsValue,
|
|
479
|
+
},
|
|
480
|
+
slots: {
|
|
481
|
+
default: '<div class="scoped-slot"></div>',
|
|
472
482
|
},
|
|
473
483
|
})
|
|
474
|
-
|
|
475
|
-
const wrapper = mount(component)
|
|
476
|
-
expect(wrapper.findAll('.v-picker__actions .scoped-slot').wrappers).toHaveLength(1)
|
|
484
|
+
expect(wrapper.findAll('.scoped-slot')).toHaveLength(1)
|
|
477
485
|
})
|
|
478
486
|
|
|
479
487
|
it('should calculate allowed seconds/minute/hour callback' + useSecondsDesc, async () => { // eslint-disable-line max-statements
|
|
480
488
|
const wrapper = mountFunction({
|
|
481
|
-
|
|
482
|
-
|
|
489
|
+
props: {
|
|
490
|
+
modelValue: '10:00:00',
|
|
483
491
|
allowedSeconds: value => value === 0 || (value >= 30 && value <= 40),
|
|
484
492
|
allowedMinutes: value => value % 5 === 0,
|
|
485
493
|
allowedHours: value => value !== 11,
|
|
@@ -584,8 +592,8 @@ describe('VTimePicker.ts', () => {
|
|
|
584
592
|
const allowedSeconds = [0, 30]
|
|
585
593
|
|
|
586
594
|
const wrapper = mountFunction({
|
|
587
|
-
|
|
588
|
-
|
|
595
|
+
props: {
|
|
596
|
+
modelValue: '10:00:00',
|
|
589
597
|
allowedSeconds,
|
|
590
598
|
allowedMinutes,
|
|
591
599
|
allowedHours,
|
|
@@ -697,12 +705,10 @@ describe('VTimePicker.ts', () => {
|
|
|
697
705
|
|
|
698
706
|
it('should update inputSecond when called setInputData' + useSecondsDesc, () => {
|
|
699
707
|
const wrapper = mountFunction({
|
|
700
|
-
|
|
708
|
+
props: {
|
|
701
709
|
useSeconds: useSecondsValue,
|
|
702
710
|
},
|
|
703
711
|
})
|
|
704
|
-
const currentValue = jest.fn()
|
|
705
|
-
wrapper.vm.$on('input', currentValue)
|
|
706
712
|
wrapper.vm.emitValue()
|
|
707
713
|
|
|
708
714
|
wrapper.vm.setInputData(useSecondsValue ? '01:23:45' : '01:23')
|
|
@@ -713,21 +719,20 @@ describe('VTimePicker.ts', () => {
|
|
|
713
719
|
|
|
714
720
|
it('should update when emit input' + useSecondsDesc, () => {
|
|
715
721
|
const wrapper = mountFunction({
|
|
716
|
-
|
|
717
|
-
|
|
722
|
+
props: {
|
|
723
|
+
modelValue: '01:23:45pm',
|
|
718
724
|
format: 'ampm',
|
|
719
725
|
useSeconds: useSecondsValue,
|
|
720
726
|
},
|
|
721
727
|
})
|
|
722
|
-
const currentValue = jest.fn()
|
|
723
|
-
wrapper.vm.$on('input', currentValue)
|
|
724
728
|
wrapper.vm.emitValue()
|
|
725
|
-
expect(
|
|
729
|
+
expect(wrapper.emitted('update:modelValue')).toHaveLength(1)
|
|
730
|
+
expect(wrapper.emitted('update:modelValue')[0]).toEqual([useSecondsValue ? '13:23:45' : '13:23'])
|
|
726
731
|
})
|
|
727
732
|
|
|
728
733
|
it('should update selecting when set selectingSecond/selectingMinute/selectingHour' + useSecondsDesc, () => {
|
|
729
734
|
const wrapper = mountFunction({
|
|
730
|
-
|
|
735
|
+
props: {
|
|
731
736
|
useSeconds: useSecondsValue,
|
|
732
737
|
},
|
|
733
738
|
})
|
|
@@ -749,64 +754,72 @@ describe('VTimePicker.ts', () => {
|
|
|
749
754
|
|
|
750
755
|
it('should emit active-picker when selectingSecond/selectingMinute/selectingHour' + useSecondsDesc, () => {
|
|
751
756
|
const wrapper = mountFunction({
|
|
752
|
-
|
|
757
|
+
props: {
|
|
753
758
|
useSeconds: useSecondsValue,
|
|
754
759
|
},
|
|
755
760
|
})
|
|
756
|
-
|
|
761
|
+
|
|
762
|
+
// Тестируем, что computed свойства работают правильно
|
|
763
|
+
wrapper.vm.selecting = SelectingTimes.Minute
|
|
757
764
|
expect(wrapper.vm.selecting).toBe(SelectingTimes.Minute)
|
|
758
|
-
expect(wrapper.
|
|
759
|
-
expect(wrapper.
|
|
765
|
+
expect(wrapper.vm.selectingMinute).toBe(true)
|
|
766
|
+
expect(wrapper.vm.selectingHour).toBe(false)
|
|
767
|
+
expect(wrapper.vm.selectingSecond).toBe(false)
|
|
760
768
|
|
|
761
|
-
wrapper.vm.
|
|
769
|
+
wrapper.vm.selecting = SelectingTimes.Hour
|
|
762
770
|
expect(wrapper.vm.selecting).toBe(SelectingTimes.Hour)
|
|
763
|
-
expect(wrapper.
|
|
764
|
-
expect(wrapper.
|
|
771
|
+
expect(wrapper.vm.selectingMinute).toBe(false)
|
|
772
|
+
expect(wrapper.vm.selectingHour).toBe(true)
|
|
773
|
+
expect(wrapper.vm.selectingSecond).toBe(false)
|
|
765
774
|
|
|
766
|
-
wrapper.vm.
|
|
775
|
+
wrapper.vm.selecting = SelectingTimes.Second
|
|
767
776
|
expect(wrapper.vm.selecting).toBe(SelectingTimes.Second)
|
|
768
|
-
expect(wrapper.
|
|
769
|
-
expect(wrapper.
|
|
777
|
+
expect(wrapper.vm.selectingMinute).toBe(false)
|
|
778
|
+
expect(wrapper.vm.selectingHour).toBe(false)
|
|
779
|
+
expect(wrapper.vm.selectingSecond).toBe(true)
|
|
770
780
|
})
|
|
771
781
|
|
|
772
|
-
it('should set selecting to Hour when active-picker changes to "HOUR"' + useSecondsDesc, () => {
|
|
782
|
+
it('should set selecting to Hour when active-picker changes to "HOUR"' + useSecondsDesc, async () => {
|
|
773
783
|
const wrapper = mountFunction({
|
|
774
|
-
|
|
784
|
+
props: {
|
|
775
785
|
useSeconds: useSecondsValue,
|
|
776
786
|
activePicker: '',
|
|
777
|
-
|
|
787
|
+
modelValue: '09:12:34',
|
|
778
788
|
},
|
|
779
789
|
})
|
|
780
790
|
wrapper.vm.selectingMinute = true
|
|
781
|
-
wrapper.setProps({ activePicker: 'HOUR' })
|
|
791
|
+
await wrapper.setProps({ activePicker: 'HOUR' })
|
|
792
|
+
await wrapper.vm.$nextTick()
|
|
782
793
|
|
|
783
794
|
expect(wrapper.vm.selecting).toBe(SelectingTimes.Hour)
|
|
784
795
|
})
|
|
785
796
|
|
|
786
|
-
it('should set selecting to Minute when active-picker changes to "MINUTE"' + useSecondsDesc, () => {
|
|
797
|
+
it('should set selecting to Minute when active-picker changes to "MINUTE"' + useSecondsDesc, async () => {
|
|
787
798
|
const wrapper = mountFunction({
|
|
788
|
-
|
|
799
|
+
props: {
|
|
789
800
|
useSeconds: useSecondsValue,
|
|
790
801
|
activePicker: '',
|
|
791
|
-
|
|
802
|
+
modelValue: '09:12:34',
|
|
792
803
|
},
|
|
793
804
|
})
|
|
794
805
|
wrapper.vm.selectingSecond = true
|
|
795
|
-
wrapper.setProps({ activePicker: 'MINUTE' })
|
|
806
|
+
await wrapper.setProps({ activePicker: 'MINUTE' })
|
|
807
|
+
await wrapper.vm.$nextTick()
|
|
796
808
|
|
|
797
809
|
expect(wrapper.vm.selecting).toBe(SelectingTimes.Minute)
|
|
798
810
|
})
|
|
799
811
|
|
|
800
|
-
it('should set selecting to Seconds when active-picker changes to "SECOND"' + useSecondsDesc, () => {
|
|
812
|
+
it('should set selecting to Seconds when active-picker changes to "SECOND"' + useSecondsDesc, async () => {
|
|
801
813
|
const wrapper = mountFunction({
|
|
802
|
-
|
|
814
|
+
props: {
|
|
803
815
|
useSeconds: useSecondsValue,
|
|
804
816
|
activePicker: '',
|
|
805
|
-
|
|
817
|
+
modelValue: '09:12:34',
|
|
806
818
|
},
|
|
807
819
|
})
|
|
808
820
|
wrapper.vm.selectingHour = true
|
|
809
|
-
wrapper.setProps({ activePicker: 'SECOND' })
|
|
821
|
+
await wrapper.setProps({ activePicker: 'SECOND' })
|
|
822
|
+
await wrapper.vm.$nextTick()
|
|
810
823
|
|
|
811
824
|
const expectedValue = useSecondsValue ? SelectingTimes.Second : SelectingTimes.Hour
|
|
812
825
|
expect(wrapper.vm.selecting).toBe(expectedValue)
|