@dimailn/vuetify 2.7.2-alpha3 → 2.7.2-alpha31
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 +3832 -2079
- 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 +39 -9
- package/es5/components/VAlert/VAlert.js.map +1 -1
- package/es5/components/VAppBar/VAppBar.js +23 -17
- package/es5/components/VAppBar/VAppBar.js.map +1 -1
- package/es5/components/VAppBar/VAppBarNavIcon.js +5 -1
- package/es5/components/VAppBar/VAppBarNavIcon.js.map +1 -1
- package/es5/components/VAutocomplete/VAutocomplete.js +11 -7
- package/es5/components/VAutocomplete/VAutocomplete.js.map +1 -1
- package/es5/components/VBadge/VBadge.js +46 -14
- package/es5/components/VBadge/VBadge.js.map +1 -1
- package/es5/components/VBanner/VBanner.js +51 -15
- package/es5/components/VBanner/VBanner.js.map +1 -1
- package/es5/components/VBottomNavigation/VBottomNavigation.js +33 -7
- package/es5/components/VBottomNavigation/VBottomNavigation.js.map +1 -1
- package/es5/components/VBreadcrumbs/VBreadcrumbs.js +22 -8
- package/es5/components/VBreadcrumbs/VBreadcrumbs.js.map +1 -1
- package/es5/components/VBreadcrumbs/VBreadcrumbsItem.js +4 -0
- package/es5/components/VBreadcrumbs/VBreadcrumbsItem.js.map +1 -1
- package/es5/components/VBtn/VBtn.js +20 -16
- 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 +61 -17
- package/es5/components/VCarousel/VCarousel.js.map +1 -1
- package/es5/components/VCarousel/VCarouselItem.js +7 -3
- package/es5/components/VCarousel/VCarouselItem.js.map +1 -1
- package/es5/components/VCheckbox/VCheckbox.js +34 -1
- package/es5/components/VCheckbox/VCheckbox.js.map +1 -1
- package/es5/components/VCheckbox/VSimpleCheckbox.js +94 -38
- package/es5/components/VCheckbox/VSimpleCheckbox.js.map +1 -1
- package/es5/components/VChip/VChip.js +15 -6
- package/es5/components/VChip/VChip.js.map +1 -1
- package/es5/components/VColorPicker/VColorPicker.js +54 -39
- package/es5/components/VColorPicker/VColorPicker.js.map +1 -1
- package/es5/components/VColorPicker/VColorPickerCanvas.js +45 -46
- package/es5/components/VColorPicker/VColorPickerCanvas.js.map +1 -1
- package/es5/components/VColorPicker/VColorPickerEdit.js +27 -26
- package/es5/components/VColorPicker/VColorPickerEdit.js.map +1 -1
- package/es5/components/VColorPicker/VColorPickerPreview.js +41 -30
- package/es5/components/VColorPicker/VColorPickerPreview.js.map +1 -1
- package/es5/components/VColorPicker/VColorPickerSwatches.js +13 -10
- package/es5/components/VColorPicker/VColorPickerSwatches.js.map +1 -1
- package/es5/components/VCombobox/VCombobox.js +1 -0
- package/es5/components/VCombobox/VCombobox.js.map +1 -1
- package/es5/components/VData/VData.js +15 -2
- package/es5/components/VData/VData.js.map +1 -1
- package/es5/components/VDataIterator/VDataFooter.js +21 -7
- package/es5/components/VDataIterator/VDataFooter.js.map +1 -1
- package/es5/components/VDataIterator/VDataIterator.js +47 -50
- package/es5/components/VDataIterator/VDataIterator.js.map +1 -1
- package/es5/components/VDataTable/RowGroup.js +46 -15
- package/es5/components/VDataTable/RowGroup.js.map +1 -1
- package/es5/components/VDataTable/VDataTable.js +41 -44
- package/es5/components/VDataTable/VDataTable.js.map +1 -1
- package/es5/components/VDataTable/VDataTableHeader.js +5 -8
- package/es5/components/VDataTable/VDataTableHeader.js.map +1 -1
- package/es5/components/VDataTable/VDataTableHeaderDesktop.js +8 -2
- package/es5/components/VDataTable/VDataTableHeaderDesktop.js.map +1 -1
- package/es5/components/VDataTable/VDataTableHeaderMobile.js +29 -37
- package/es5/components/VDataTable/VDataTableHeaderMobile.js.map +1 -1
- package/es5/components/VDataTable/VEditDialog.js +26 -22
- package/es5/components/VDataTable/VEditDialog.js.map +1 -1
- package/es5/components/VDataTable/VSimpleTable.js +1 -1
- package/es5/components/VDataTable/VSimpleTable.js.map +1 -1
- package/es5/components/VDataTable/VVirtualTable.js +6 -6
- package/es5/components/VDataTable/VVirtualTable.js.map +1 -1
- package/es5/components/VDataTable/mixins/header.js +7 -9
- package/es5/components/VDataTable/mixins/header.js.map +1 -1
- package/es5/components/VDatePicker/VDatePicker.js +39 -32
- package/es5/components/VDatePicker/VDatePicker.js.map +1 -1
- package/es5/components/VDatePicker/VDatePickerHeader.js +68 -24
- 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 +44 -10
- package/es5/components/VDatePicker/VDatePickerTitle.js.map +1 -1
- package/es5/components/VDatePicker/VDatePickerYears.js +47 -23
- package/es5/components/VDatePicker/VDatePickerYears.js.map +1 -1
- package/es5/components/VDatePicker/mixins/date-picker-table.js +51 -30
- 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 +58 -32
- 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/VExpansionPanelContent.js +12 -10
- package/es5/components/VExpansionPanel/VExpansionPanelContent.js.map +1 -1
- package/es5/components/VExpansionPanel/VExpansionPanelHeader.js +17 -20
- package/es5/components/VExpansionPanel/VExpansionPanelHeader.js.map +1 -1
- package/es5/components/VFileInput/VFileInput.js +50 -27
- package/es5/components/VFileInput/VFileInput.js.map +1 -1
- package/es5/components/VForm/VForm.js +45 -30
- package/es5/components/VForm/VForm.js.map +1 -1
- package/es5/components/VGrid/VCol.js +3 -3
- package/es5/components/VGrid/VCol.js.map +1 -1
- package/es5/components/VGrid/VContainer.js +3 -1
- package/es5/components/VGrid/VContainer.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 +10 -8
- package/es5/components/VImg/VImg.js.map +1 -1
- package/es5/components/VInput/VInput.js +65 -12
- package/es5/components/VInput/VInput.js.map +1 -1
- package/es5/components/VItemGroup/VItem.js +19 -19
- 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/VList.js +1 -1
- package/es5/components/VList/VList.js.map +1 -1
- package/es5/components/VList/VListGroup.js +73 -40
- package/es5/components/VList/VListGroup.js.map +1 -1
- package/es5/components/VList/VListItem.js +63 -18
- 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 +57 -31
- package/es5/components/VMenu/VMenu.js.map +1 -1
- package/es5/components/VMessages/VMessages.js +33 -6
- package/es5/components/VMessages/VMessages.js.map +1 -1
- package/es5/components/VNavigationDrawer/VNavigationDrawer.js +37 -16
- package/es5/components/VNavigationDrawer/VNavigationDrawer.js.map +1 -1
- package/es5/components/VOtpInput/VOtpInput.js +37 -5
- package/es5/components/VOtpInput/VOtpInput.js.map +1 -1
- package/es5/components/VOverflowBtn/VOverflowBtn.js +4 -1
- package/es5/components/VOverflowBtn/VOverflowBtn.js.map +1 -1
- package/es5/components/VOverlay/VOverlay.js +32 -4
- package/es5/components/VOverlay/VOverlay.js.map +1 -1
- package/es5/components/VPagination/VPagination.js +48 -27
- package/es5/components/VPagination/VPagination.js.map +1 -1
- package/es5/components/VPicker/VPicker.js +7 -4
- package/es5/components/VPicker/VPicker.js.map +1 -1
- package/es5/components/VProgressCircular/VProgressCircular.js +6 -13
- package/es5/components/VProgressCircular/VProgressCircular.js.map +1 -1
- package/es5/components/VProgressLinear/VProgressLinear.js +67 -25
- package/es5/components/VProgressLinear/VProgressLinear.js.map +1 -1
- package/es5/components/VRadioGroup/VRadio.js +11 -2
- package/es5/components/VRadioGroup/VRadio.js.map +1 -1
- package/es5/components/VRadioGroup/VRadioGroup.js +30 -2
- package/es5/components/VRadioGroup/VRadioGroup.js.map +1 -1
- package/es5/components/VRangeSlider/VRangeSlider.js +57 -32
- package/es5/components/VRangeSlider/VRangeSlider.js.map +1 -1
- package/es5/components/VRating/VRating.js +45 -17
- package/es5/components/VRating/VRating.js.map +1 -1
- package/es5/components/VSelect/VSelect.js +156 -79
- package/es5/components/VSelect/VSelect.js.map +1 -1
- package/es5/components/VSelect/VSelectList.js +104 -44
- package/es5/components/VSelect/VSelectList.js.map +1 -1
- package/es5/components/VSlideGroup/VSlideGroup.js +27 -22
- 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 +73 -41
- 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 +13 -17
- 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/VStepperContent.js +4 -2
- package/es5/components/VStepper/VStepperContent.js.map +1 -1
- package/es5/components/VStepper/VStepperStep.js +12 -20
- package/es5/components/VStepper/VStepperStep.js.map +1 -1
- package/es5/components/VSubheader/VSubheader.js +2 -2
- package/es5/components/VSubheader/VSubheader.js.map +1 -1
- package/es5/components/VSwitch/VSwitch.js +11 -9
- 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 +62 -23
- package/es5/components/VTabs/VTabs.js.map +1 -1
- package/es5/components/VTabs/VTabsBar.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 +39 -28
- 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 +3 -6
- package/es5/components/VToolbar/VToolbar.js.map +1 -1
- package/es5/components/VTooltip/VTooltip.js +13 -12
- package/es5/components/VTooltip/VTooltip.js.map +1 -1
- package/es5/components/VTreeview/VTreeview.js +24 -18
- package/es5/components/VTreeview/VTreeview.js.map +1 -1
- package/es5/components/VTreeview/VTreeviewNode.js +12 -6
- package/es5/components/VTreeview/VTreeviewNode.js.map +1 -1
- package/es5/components/VVirtualScroll/VVirtualScroll.js +15 -19
- package/es5/components/VVirtualScroll/VVirtualScroll.js.map +1 -1
- package/es5/components/VWindow/VWindow.js +13 -8
- package/es5/components/VWindow/VWindow.js.map +1 -1
- package/es5/components/VWindow/VWindowItem.js +10 -10
- package/es5/components/VWindow/VWindowItem.js.map +1 -1
- package/es5/components/transitions/createTransition.js +8 -2
- package/es5/components/transitions/createTransition.js.map +1 -1
- package/es5/components/transitions/expand-transition.js +1 -0
- package/es5/components/transitions/expand-transition.js.map +1 -1
- package/es5/directives/intersect/index.js +20 -7
- package/es5/directives/intersect/index.js.map +1 -1
- package/es5/directives/mutate/index.js +13 -13
- package/es5/directives/mutate/index.js.map +1 -1
- package/es5/directives/resize/index.js +8 -8
- package/es5/directives/resize/index.js.map +1 -1
- package/es5/directives/scroll/index.js +10 -9
- package/es5/directives/scroll/index.js.map +1 -1
- package/es5/directives/touch/index.js +4 -4
- package/es5/directives/touch/index.js.map +1 -1
- package/es5/framework.js +1 -1
- package/es5/install.js +10 -33
- package/es5/install.js.map +1 -1
- package/es5/mixins/activatable/index.js +11 -5
- package/es5/mixins/activatable/index.js.map +1 -1
- package/es5/mixins/applicationable/index.js +4 -4
- package/es5/mixins/applicationable/index.js.map +1 -1
- package/es5/mixins/binds-attrs/index.js +1 -1
- package/es5/mixins/binds-attrs/index.js.map +1 -1
- package/es5/mixins/bootable/index.js +1 -2
- package/es5/mixins/bootable/index.js.map +1 -1
- package/es5/mixins/detachable/index.js +12 -9
- package/es5/mixins/detachable/index.js.map +1 -1
- package/es5/mixins/groupable/index.js +1 -1
- package/es5/mixins/groupable/index.js.map +1 -1
- package/es5/mixins/intersectable/index.js +2 -2
- package/es5/mixins/intersectable/index.js.map +1 -1
- package/es5/mixins/menuable/index.js +1 -1
- package/es5/mixins/menuable/index.js.map +1 -1
- package/es5/mixins/mouse/index.js +10 -5
- package/es5/mixins/mouse/index.js.map +1 -1
- package/es5/mixins/overlayable/index.js +5 -3
- package/es5/mixins/overlayable/index.js.map +1 -1
- package/es5/mixins/picker/index.js +13 -3
- package/es5/mixins/picker/index.js.map +1 -1
- package/es5/mixins/routable/index.js +5 -2
- package/es5/mixins/routable/index.js.map +1 -1
- package/es5/mixins/selectable/index.js +5 -5
- package/es5/mixins/selectable/index.js.map +1 -1
- package/es5/mixins/translatable/index.js +1 -1
- package/es5/mixins/translatable/index.js.map +1 -1
- package/es5/mixins/validatable/index.js +34 -7
- package/es5/mixins/validatable/index.js.map +1 -1
- package/es5/services/breakpoint/index.js +3 -1
- package/es5/services/breakpoint/index.js.map +1 -1
- package/es5/util/console.js +49 -18
- package/es5/util/console.js.map +1 -1
- package/es5/util/helpers.js +49 -1
- package/es5/util/helpers.js.map +1 -1
- package/es5/util/legacyEventsMixin.js +48 -0
- package/es5/util/legacyEventsMixin.js.map +1 -0
- package/lib/components/VAlert/VAlert.js +13 -7
- package/lib/components/VAlert/VAlert.js.map +1 -1
- package/lib/components/VAppBar/VAppBar.js +23 -16
- package/lib/components/VAppBar/VAppBar.js.map +1 -1
- package/lib/components/VAppBar/VAppBarNavIcon.js +1 -1
- package/lib/components/VAppBar/VAppBarNavIcon.js.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.js +12 -8
- package/lib/components/VAutocomplete/VAutocomplete.js.map +1 -1
- package/lib/components/VBadge/VBadge.js +26 -13
- package/lib/components/VBadge/VBadge.js.map +1 -1
- package/lib/components/VBanner/VBanner.js +20 -13
- package/lib/components/VBanner/VBanner.js.map +1 -1
- package/lib/components/VBottomNavigation/VBottomNavigation.js +15 -7
- package/lib/components/VBottomNavigation/VBottomNavigation.js.map +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbs.js +7 -5
- package/lib/components/VBreadcrumbs/VBreadcrumbs.js.map +1 -1
- package/lib/components/VBreadcrumbs/VBreadcrumbsItem.js +4 -0
- package/lib/components/VBreadcrumbs/VBreadcrumbsItem.js.map +1 -1
- package/lib/components/VBtn/VBtn.js +21 -20
- 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 +36 -16
- package/lib/components/VCarousel/VCarousel.js.map +1 -1
- package/lib/components/VCarousel/VCarouselItem.js +1 -1
- package/lib/components/VCarousel/VCarouselItem.js.map +1 -1
- package/lib/components/VCheckbox/VCheckbox.js +15 -2
- package/lib/components/VCheckbox/VCheckbox.js.map +1 -1
- package/lib/components/VCheckbox/VSimpleCheckbox.js +83 -39
- package/lib/components/VCheckbox/VSimpleCheckbox.js.map +1 -1
- package/lib/components/VChip/VChip.js +15 -6
- package/lib/components/VChip/VChip.js.map +1 -1
- package/lib/components/VColorPicker/VColorPicker.js +47 -44
- package/lib/components/VColorPicker/VColorPicker.js.map +1 -1
- package/lib/components/VColorPicker/VColorPickerCanvas.js +41 -43
- package/lib/components/VColorPicker/VColorPickerCanvas.js.map +1 -1
- package/lib/components/VColorPicker/VColorPickerEdit.js +25 -31
- package/lib/components/VColorPicker/VColorPickerEdit.js.map +1 -1
- package/lib/components/VColorPicker/VColorPickerPreview.js +45 -32
- package/lib/components/VColorPicker/VColorPickerPreview.js.map +1 -1
- package/lib/components/VColorPicker/VColorPickerSwatches.js +15 -9
- package/lib/components/VColorPicker/VColorPickerSwatches.js.map +1 -1
- package/lib/components/VCombobox/VCombobox.js +1 -0
- package/lib/components/VCombobox/VCombobox.js.map +1 -1
- package/lib/components/VData/VData.js +16 -2
- package/lib/components/VData/VData.js.map +1 -1
- package/lib/components/VDataIterator/VDataFooter.js +15 -7
- package/lib/components/VDataIterator/VDataFooter.js.map +1 -1
- package/lib/components/VDataIterator/VDataIterator.js +31 -34
- package/lib/components/VDataIterator/VDataIterator.js.map +1 -1
- package/lib/components/VDataTable/RowGroup.js +30 -14
- package/lib/components/VDataTable/RowGroup.js.map +1 -1
- package/lib/components/VDataTable/VDataTable.js +20 -33
- package/lib/components/VDataTable/VDataTable.js.map +1 -1
- package/lib/components/VDataTable/VDataTableHeader.js +7 -9
- package/lib/components/VDataTable/VDataTableHeader.js.map +1 -1
- package/lib/components/VDataTable/VDataTableHeaderDesktop.js +7 -1
- package/lib/components/VDataTable/VDataTableHeaderDesktop.js.map +1 -1
- package/lib/components/VDataTable/VDataTableHeaderMobile.js +18 -25
- package/lib/components/VDataTable/VDataTableHeaderMobile.js.map +1 -1
- package/lib/components/VDataTable/VEditDialog.js +18 -18
- package/lib/components/VDataTable/VEditDialog.js.map +1 -1
- package/lib/components/VDataTable/VSimpleTable.js +1 -1
- package/lib/components/VDataTable/VSimpleTable.js.map +1 -1
- package/lib/components/VDataTable/VVirtualTable.js +2 -3
- package/lib/components/VDataTable/VVirtualTable.js.map +1 -1
- package/lib/components/VDataTable/mixins/header.js +3 -8
- package/lib/components/VDataTable/mixins/header.js.map +1 -1
- package/lib/components/VDatePicker/VDatePicker.js +24 -23
- package/lib/components/VDatePicker/VDatePicker.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerHeader.js +45 -21
- 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 +17 -5
- package/lib/components/VDatePicker/VDatePickerTitle.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerYears.js +17 -8
- package/lib/components/VDatePicker/VDatePickerYears.js.map +1 -1
- package/lib/components/VDatePicker/mixins/date-picker-table.js +30 -15
- 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 +12 -4
- 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/VExpansionPanelContent.js +2 -2
- package/lib/components/VExpansionPanel/VExpansionPanelContent.js.map +1 -1
- package/lib/components/VExpansionPanel/VExpansionPanelHeader.js +4 -7
- package/lib/components/VExpansionPanel/VExpansionPanelHeader.js.map +1 -1
- package/lib/components/VFileInput/VFileInput.js +43 -25
- package/lib/components/VFileInput/VFileInput.js.map +1 -1
- package/lib/components/VForm/VForm.js +41 -26
- package/lib/components/VForm/VForm.js.map +1 -1
- package/lib/components/VGrid/VCol.js +3 -3
- package/lib/components/VGrid/VCol.js.map +1 -1
- package/lib/components/VGrid/VContainer.js +3 -1
- package/lib/components/VGrid/VContainer.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 +5 -9
- package/lib/components/VImg/VImg.js.map +1 -1
- package/lib/components/VInput/VInput.js +32 -9
- package/lib/components/VInput/VInput.js.map +1 -1
- package/lib/components/VItemGroup/VItem.js +22 -19
- 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/VList.js +1 -1
- package/lib/components/VList/VList.js.map +1 -1
- package/lib/components/VList/VListGroup.js +34 -32
- package/lib/components/VList/VListGroup.js.map +1 -1
- package/lib/components/VList/VListItem.js +40 -18
- 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 +16 -4
- package/lib/components/VMenu/VMenu.js.map +1 -1
- package/lib/components/VMessages/VMessages.js +13 -2
- package/lib/components/VMessages/VMessages.js.map +1 -1
- package/lib/components/VNavigationDrawer/VNavigationDrawer.js +12 -8
- package/lib/components/VNavigationDrawer/VNavigationDrawer.js.map +1 -1
- package/lib/components/VOtpInput/VOtpInput.js +50 -6
- package/lib/components/VOtpInput/VOtpInput.js.map +1 -1
- package/lib/components/VOverflowBtn/VOverflowBtn.js +2 -1
- package/lib/components/VOverflowBtn/VOverflowBtn.js.map +1 -1
- package/lib/components/VOverlay/VOverlay.js +14 -3
- package/lib/components/VOverlay/VOverlay.js.map +1 -1
- package/lib/components/VPagination/VPagination.js +28 -23
- package/lib/components/VPagination/VPagination.js.map +1 -1
- package/lib/components/VPicker/VPicker.js +4 -4
- package/lib/components/VPicker/VPicker.js.map +1 -1
- package/lib/components/VProgressCircular/VProgressCircular.js +6 -7
- package/lib/components/VProgressCircular/VProgressCircular.js.map +1 -1
- package/lib/components/VProgressLinear/VProgressLinear.js +46 -19
- package/lib/components/VProgressLinear/VProgressLinear.js.map +1 -1
- package/lib/components/VRadioGroup/VRadio.js +3 -2
- package/lib/components/VRadioGroup/VRadio.js.map +1 -1
- package/lib/components/VRadioGroup/VRadioGroup.js +14 -5
- package/lib/components/VRadioGroup/VRadioGroup.js.map +1 -1
- package/lib/components/VRangeSlider/VRangeSlider.js +17 -5
- package/lib/components/VRangeSlider/VRangeSlider.js.map +1 -1
- package/lib/components/VRating/VRating.js +11 -0
- package/lib/components/VRating/VRating.js.map +1 -1
- package/lib/components/VSelect/VSelect.js +99 -40
- package/lib/components/VSelect/VSelect.js.map +1 -1
- package/lib/components/VSelect/VSelectList.js +54 -29
- package/lib/components/VSelect/VSelectList.js.map +1 -1
- package/lib/components/VSlideGroup/VSlideGroup.js +4 -7
- 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 +37 -25
- 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 +9 -15
- 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/VStepperContent.js +2 -2
- package/lib/components/VStepper/VStepperContent.js.map +1 -1
- package/lib/components/VStepper/VStepperStep.js +8 -19
- package/lib/components/VStepper/VStepperStep.js.map +1 -1
- package/lib/components/VSubheader/VSubheader.js +1 -2
- package/lib/components/VSubheader/VSubheader.js.map +1 -1
- package/lib/components/VSwitch/VSwitch.js +2 -4
- 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 +28 -7
- package/lib/components/VTabs/VTabs.js.map +1 -1
- package/lib/components/VTabs/VTabsBar.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 +12 -18
- 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 +5 -6
- package/lib/components/VToolbar/VToolbar.js.map +1 -1
- package/lib/components/VTooltip/VTooltip.js +10 -14
- package/lib/components/VTooltip/VTooltip.js.map +1 -1
- package/lib/components/VTreeview/VTreeview.js +15 -13
- package/lib/components/VTreeview/VTreeview.js.map +1 -1
- package/lib/components/VTreeview/VTreeviewNode.js +4 -6
- package/lib/components/VTreeview/VTreeviewNode.js.map +1 -1
- package/lib/components/VVirtualScroll/VVirtualScroll.js +8 -14
- package/lib/components/VVirtualScroll/VVirtualScroll.js.map +1 -1
- package/lib/components/VWindow/VWindow.js +7 -6
- package/lib/components/VWindow/VWindow.js.map +1 -1
- package/lib/components/VWindow/VWindowItem.js +5 -7
- package/lib/components/VWindow/VWindowItem.js.map +1 -1
- package/lib/components/transitions/createTransition.js +2 -2
- package/lib/components/transitions/createTransition.js.map +1 -1
- package/lib/components/transitions/expand-transition.js +1 -0
- package/lib/components/transitions/expand-transition.js.map +1 -1
- package/lib/directives/intersect/index.js +20 -7
- package/lib/directives/intersect/index.js.map +1 -1
- package/lib/directives/mutate/index.js +13 -13
- package/lib/directives/mutate/index.js.map +1 -1
- package/lib/directives/resize/index.js +8 -8
- package/lib/directives/resize/index.js.map +1 -1
- package/lib/directives/scroll/index.js +10 -9
- package/lib/directives/scroll/index.js.map +1 -1
- package/lib/directives/touch/index.js +4 -4
- package/lib/directives/touch/index.js.map +1 -1
- package/lib/framework.js +1 -1
- package/lib/install.js +5 -28
- package/lib/install.js.map +1 -1
- package/lib/mixins/activatable/index.js +12 -6
- package/lib/mixins/activatable/index.js.map +1 -1
- package/lib/mixins/applicationable/index.js +4 -4
- package/lib/mixins/applicationable/index.js.map +1 -1
- package/lib/mixins/binds-attrs/index.js +1 -1
- package/lib/mixins/binds-attrs/index.js.map +1 -1
- package/lib/mixins/bootable/index.js +2 -4
- package/lib/mixins/bootable/index.js.map +1 -1
- package/lib/mixins/detachable/index.js +13 -10
- package/lib/mixins/detachable/index.js.map +1 -1
- package/lib/mixins/groupable/index.js +1 -1
- package/lib/mixins/groupable/index.js.map +1 -1
- package/lib/mixins/intersectable/index.js +2 -2
- package/lib/mixins/intersectable/index.js.map +1 -1
- package/lib/mixins/menuable/index.js +1 -1
- package/lib/mixins/menuable/index.js.map +1 -1
- package/lib/mixins/mouse/index.js +9 -5
- package/lib/mixins/mouse/index.js.map +1 -1
- package/lib/mixins/overlayable/index.js +5 -3
- package/lib/mixins/overlayable/index.js.map +1 -1
- package/lib/mixins/picker/index.js +5 -3
- package/lib/mixins/picker/index.js.map +1 -1
- package/lib/mixins/routable/index.js +5 -2
- package/lib/mixins/routable/index.js.map +1 -1
- package/lib/mixins/selectable/index.js +6 -5
- package/lib/mixins/selectable/index.js.map +1 -1
- package/lib/mixins/translatable/index.js +1 -1
- package/lib/mixins/translatable/index.js.map +1 -1
- package/lib/mixins/validatable/index.js +17 -7
- package/lib/mixins/validatable/index.js.map +1 -1
- package/lib/services/breakpoint/index.js +3 -1
- package/lib/services/breakpoint/index.js.map +1 -1
- package/lib/util/console.js +47 -17
- package/lib/util/console.js.map +1 -1
- package/lib/util/helpers.js +47 -1
- package/lib/util/helpers.js.map +1 -1
- package/lib/util/legacyEventsMixin.js +37 -0
- package/lib/util/legacyEventsMixin.js.map +1 -0
- package/package.json +1 -1
- package/src/components/VAlert/VAlert.ts +19 -8
- package/src/components/VAlert/__tests__/VAlert.spec.ts +78 -50
- package/src/components/VAlert/__tests__/__snapshots__/VAlert.spec.ts.snap +16 -18
- package/src/components/VApp/__tests__/VApp.spec.ts +24 -18
- package/src/components/VApp/__tests__/__snapshots__/VApp.spec.ts.snap +4 -4
- package/src/components/VAppBar/VAppBar.ts +21 -14
- package/src/components/VAppBar/VAppBarNavIcon.ts +1 -1
- package/src/components/VAppBar/__tests__/VAppBar.spec.ts +256 -74
- package/src/components/VAppBar/__tests__/VAppBarNavIcon.spec.ts +2 -6
- package/src/components/VAppBar/__tests__/__snapshots__/VAppBar.spec.ts.snap +13 -4
- package/src/components/VAppBar/__tests__/__snapshots__/VAppBarNavIcon.spec.ts.snap +3 -4
- package/src/components/VAutocomplete/VAutocomplete.ts +35 -6
- package/src/components/VAutocomplete/__tests__/VAutocomplete.spec.ts +51 -53
- package/src/components/VAutocomplete/__tests__/VAutocomplete2.spec.ts +77 -48
- package/src/components/VAutocomplete/__tests__/VAutocomplete3.spec.ts +101 -39
- package/src/components/VAvatar/__tests__/VAvatar.spec.ts +72 -10
- package/src/components/VBadge/VBadge.ts +38 -26
- package/src/components/VBadge/__tests__/VBadge.spec.ts +47 -30
- package/src/components/VBadge/__tests__/__snapshots__/VBadge.spec.ts.snap +5 -5
- package/src/components/VBanner/VBanner.ts +30 -17
- package/src/components/VBanner/__tests__/VBanner.spec.ts +35 -36
- package/src/components/VBanner/__tests__/__snapshots__/VBanner.spec.ts.snap +1 -1
- package/src/components/VBottomNavigation/VBottomNavigation.ts +20 -8
- package/src/components/VBottomNavigation/__tests__/VBottomNavigation.spec.ts +43 -37
- package/src/components/VBottomNavigation/__tests__/__snapshots__/VBottomNavigation.spec.ts.snap +11 -10
- package/src/components/VBreadcrumbs/VBreadcrumbs.ts +8 -4
- package/src/components/VBreadcrumbs/VBreadcrumbsItem.ts +4 -0
- package/src/components/VBreadcrumbs/__tests__/VBreadcrumbs.spec.ts +125 -10
- package/src/components/VBreadcrumbs/__tests__/VBreadcrumbsItem.spec.ts +10 -6
- package/src/components/VBtn/VBtn.ts +25 -17
- package/src/components/VBtn/__tests__/VBtn.spec.ts +257 -242
- package/src/components/VBtn/__tests__/__snapshots__/VBtn.spec.ts.snap +13 -73
- package/src/components/VBtnToggle/__tests__/VBtnToggle.spec.ts +10 -6
- 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/VCard/__tests__/VCard.spec.ts +46 -28
- package/src/components/VCard/__tests__/__snapshots__/VCard.spec.ts.snap +2 -2
- package/src/components/VCarousel/VCarousel.ts +42 -15
- package/src/components/VCarousel/VCarouselItem.ts +1 -1
- package/src/components/VCarousel/__tests__/VCarousel.spec.ts +74 -54
- package/src/components/VCarousel/__tests__/VCarouselItem.spec.ts +9 -5
- package/src/components/VCarousel/__tests__/__snapshots__/VCarousel.spec.ts.snap +1 -1
- package/src/components/VCheckbox/VCheckbox.ts +20 -2
- package/src/components/VCheckbox/VSimpleCheckbox.ts +97 -45
- package/src/components/VCheckbox/__tests__/VCheckbox.spec.ts +157 -152
- package/src/components/VCheckbox/__tests__/VSimpleCheckbox.spec.ts +46 -13
- package/src/components/VChip/VChip.ts +17 -13
- package/src/components/VChip/__tests__/VChip.spec.ts +50 -50
- package/src/components/VChip/__tests__/__snapshots__/VChip.spec.ts.snap +4 -4
- package/src/components/VChipGroup/__tests__/VChipGroup.spec.ts +14 -21
- package/src/components/VColorPicker/VColorPicker.ts +51 -41
- package/src/components/VColorPicker/VColorPickerCanvas.ts +44 -37
- package/src/components/VColorPicker/VColorPickerEdit.ts +37 -35
- package/src/components/VColorPicker/VColorPickerPreview.ts +48 -28
- package/src/components/VColorPicker/VColorPickerSwatches.ts +23 -12
- package/src/components/VColorPicker/__tests__/VColorPicker.spec.ts +47 -47
- package/src/components/VColorPicker/__tests__/VColorPickerCanvas.spec.ts +15 -13
- package/src/components/VColorPicker/__tests__/VColorPickerEdit.spec.ts +52 -50
- package/src/components/VColorPicker/__tests__/VColorPickerPreview.spec.ts +101 -30
- package/src/components/VColorPicker/__tests__/__snapshots__/VColorPicker.spec.ts.snap +218 -175
- package/src/components/VColorPicker/__tests__/__snapshots__/VColorPickerEdit.spec.ts.snap +38 -21
- package/src/components/VCombobox/VCombobox.ts +23 -0
- package/src/components/VCombobox/__tests__/VCombobox-multiple.spec.ts +118 -110
- package/src/components/VCombobox/__tests__/VCombobox.spec.ts +119 -93
- package/src/components/VData/VData.ts +14 -1
- package/src/components/VData/__tests__/VData.spec.ts +69 -90
- package/src/components/VDataIterator/VDataFooter.ts +16 -9
- package/src/components/VDataIterator/VDataIterator.ts +51 -35
- package/src/components/VDataIterator/__tests__/VDataFooter.spec.ts +38 -39
- package/src/components/VDataIterator/__tests__/VDataIterator.spec.ts +90 -122
- package/src/components/VDataIterator/__tests__/__snapshots__/VDataFooter.spec.ts.snap +92 -82
- package/src/components/VDataIterator/__tests__/__snapshots__/VDataIterator.spec.ts.snap +79 -69
- package/src/components/VDataTable/RowGroup.ts +33 -16
- package/src/components/VDataTable/VDataTable.ts +20 -29
- package/src/components/VDataTable/VDataTableHeader.ts +8 -9
- package/src/components/VDataTable/VDataTableHeaderDesktop.ts +10 -1
- package/src/components/VDataTable/VDataTableHeaderMobile.ts +18 -25
- package/src/components/VDataTable/VEditDialog.ts +23 -21
- package/src/components/VDataTable/VSimpleTable.ts +2 -3
- package/src/components/VDataTable/VVirtualTable.ts +2 -3
- package/src/components/VDataTable/__tests__/MobileRow.spec.ts +55 -66
- package/src/components/VDataTable/__tests__/Row.spec.ts +64 -73
- package/src/components/VDataTable/__tests__/RowGroup.spec.ts +7 -5
- package/src/components/VDataTable/__tests__/VDataTable.spec.ts +916 -998
- package/src/components/VDataTable/__tests__/VDataTableHeader.spec.ts +39 -29
- package/src/components/VDataTable/__tests__/VEditDialog.spec.ts +33 -24
- package/src/components/VDataTable/__tests__/VSimpleTable.spec.ts +55 -29
- package/src/components/VDataTable/__tests__/VVirtualTable.spec.ts +13 -15
- package/src/components/VDataTable/__tests__/__snapshots__/Row.spec.ts.snap +30 -0
- package/src/components/VDataTable/__tests__/__snapshots__/VDataTable.spec.ts.snap +2543 -2086
- package/src/components/VDataTable/__tests__/__snapshots__/VDataTableHeader.spec.ts.snap +115 -144
- package/src/components/VDataTable/__tests__/__snapshots__/VEditDialog.spec.ts.snap +6 -6
- package/src/components/VDataTable/__tests__/__snapshots__/VSimpleTable.spec.ts.snap +22 -18
- package/src/components/VDataTable/mixins/__tests__/__snapshots__/header.spec.ts.snap +10 -13
- package/src/components/VDataTable/mixins/__tests__/header.spec.ts +15 -15
- package/src/components/VDataTable/mixins/header.ts +6 -10
- package/src/components/VDatePicker/VDatePicker.ts +30 -25
- package/src/components/VDatePicker/VDatePickerHeader.ts +57 -32
- package/src/components/VDatePicker/VDatePickerMonthTable.ts +1 -1
- package/src/components/VDatePicker/VDatePickerTitle.ts +21 -7
- package/src/components/VDatePicker/VDatePickerYears.ts +19 -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 +32 -14
- 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 +23 -11
- package/src/components/VDialog/__tests__/VDialog.spec.ts +105 -101
- package/src/components/VDialog/__tests__/__snapshots__/VDialog.spec.ts.snap +0 -15
- package/src/components/VDivider/__tests__/VDivider.spec.ts +11 -15
- package/src/components/VDivider/__tests__/__snapshots__/VDivider.spec.ts.snap +2 -2
- package/src/components/VExpansionPanel/VExpansionPanel.ts +5 -0
- package/src/components/VExpansionPanel/VExpansionPanelContent.ts +2 -2
- package/src/components/VExpansionPanel/VExpansionPanelHeader.ts +3 -4
- package/src/components/VExpansionPanel/__tests__/VExpansionPanel.spec.ts +43 -27
- package/src/components/VExpansionPanel/__tests__/__snapshots__/VExpansionPanel.spec.ts.snap +18 -16
- package/src/components/VFileInput/VFileInput.ts +47 -32
- package/src/components/VFileInput/__tests__/VFileInput.spec.ts +84 -54
- package/src/components/VFileInput/__tests__/__snapshots__/VFileInput.spec.ts.snap +242 -146
- package/src/components/VForm/VForm.ts +63 -35
- package/src/components/VForm/__tests__/VForm.spec.ts +100 -80
- package/src/components/VGrid/VCol.ts +2 -2
- package/src/components/VGrid/VContainer.ts +1 -1
- package/src/components/VGrid/__tests__/VCol.spec.ts +17 -17
- package/src/components/VGrid/__tests__/VContainer.spec.ts +58 -3
- package/src/components/VGrid/__tests__/VFlex.spec.ts +3 -3
- package/src/components/VGrid/__tests__/VGrid.spec.ts +12 -10
- package/src/components/VGrid/__tests__/VLayout.spec.ts +3 -3
- package/src/components/VHover/VHover.ts +2 -0
- package/src/components/VIcon/__tests__/VIcon.spec.ts +176 -70
- package/src/components/VImg/VImg.ts +5 -4
- package/src/components/VImg/__tests__/VImg.spec.ts +21 -20
- package/src/components/VImg/__tests__/__snapshots__/VImg.spec.ts.snap +71 -66
- package/src/components/VInput/VInput.ts +33 -8
- package/src/components/VInput/__tests__/VInput.spec.ts +170 -234
- package/src/components/VInput/__tests__/__snapshots__/VInput.spec.ts.snap +50 -101
- package/src/components/VItemGroup/VItem.ts +29 -23
- package/src/components/VItemGroup/VItemGroup.ts +7 -1
- package/src/components/VItemGroup/__tests__/VItem.spec.ts +22 -37
- package/src/components/VItemGroup/__tests__/VItemGroup.spec.ts +96 -124
- package/src/components/VItemGroup/__tests__/__snapshots__/VItem.spec.ts.snap +2 -0
- package/src/components/VLabel/__tests__/VLabel.spec.ts +240 -14
- package/src/components/VLazy/VLazy.ts +11 -13
- package/src/components/VLazy/__tests__/VLazy.spec.ts +5 -4
- package/src/components/VLazy/__tests__/__snapshots__/VLazy.spec.ts.snap +2 -1
- package/src/components/VList/VList.ts +1 -1
- package/src/components/VList/VListGroup.ts +43 -32
- package/src/components/VList/VListItem.ts +55 -23
- package/src/components/VList/VListItemAction.ts +11 -10
- package/src/components/VList/__tests__/VList.spec.ts +13 -12
- package/src/components/VList/__tests__/VListGroup.spec.ts +59 -51
- package/src/components/VList/__tests__/VListItem.spec.ts +142 -63
- package/src/components/VList/__tests__/VListItemAvatar.spec.ts +5 -2
- package/src/components/VList/__tests__/VListItemGroup.spec.ts +5 -2
- package/src/components/VList/__tests__/__snapshots__/VList.spec.ts.snap +10 -10
- package/src/components/VList/__tests__/__snapshots__/VListGroup.spec.ts.snap +5 -6
- package/src/components/VList/__tests__/__snapshots__/VListItem.spec.ts.snap +1 -1
- package/src/components/VMain/__tests__/VMain.spec.ts +71 -17
- package/src/components/VMenu/VMenu.ts +25 -4
- package/src/components/VMenu/__tests__/VMenu.spec.ts +90 -69
- package/src/components/VMenu/__tests__/__snapshots__/VMenu.spec.ts.snap +3 -5
- package/src/components/VMessages/VMessages.ts +15 -4
- package/src/components/VMessages/__tests__/VMessages.spec.ts +55 -16
- package/src/components/VMessages/__tests__/__snapshots__/VMessages.spec.ts.snap +16 -25
- package/src/components/VNavigationDrawer/VNavigationDrawer.ts +23 -16
- package/src/components/VNavigationDrawer/__tests__/VNavigationDrawer.spec.ts +84 -71
- package/src/components/VOtpInput/VOtpInput.ts +39 -4
- package/src/components/VOverflowBtn/VOverflowBtn.ts +3 -1
- package/src/components/VOverlay/VOverlay.ts +16 -2
- package/src/components/VOverlay/__tests__/VOverlay.spec.ts +6 -6
- package/src/components/VPagination/VPagination.ts +41 -29
- package/src/components/VPagination/__tests__/VPagination.spec.ts +85 -71
- package/src/components/VPagination/__tests__/__snapshots__/VPagination.spec.ts.snap +184 -429
- package/src/components/VParallax/__tests__/__snapshots__/VParallax.spec.ts.snap +8 -8
- package/src/components/VPicker/VPicker.ts +9 -11
- package/src/components/VPicker/__tests__/VPicker.spec.ts +14 -15
- package/src/components/VPicker/__tests__/__snapshots__/VPicker.spec.ts.snap +2 -2
- package/src/components/VProgressCircular/VProgressCircular.ts +6 -6
- package/src/components/VProgressCircular/__tests__/VProgressCircular.spec.ts +28 -21
- package/src/components/VProgressCircular/__tests__/__snapshots__/VProgressCircular.spec.ts.snap +62 -62
- package/src/components/VProgressLinear/VProgressLinear.ts +64 -30
- package/src/components/VProgressLinear/__tests__/VProgressLinear.spec.ts +378 -71
- package/src/components/VProgressLinear/__tests__/__snapshots__/VProgressLinear.spec.ts.snap +53 -79
- package/src/components/VRadioGroup/VRadio.ts +4 -2
- package/src/components/VRadioGroup/VRadioGroup.ts +20 -7
- package/src/components/VRangeSlider/VRangeSlider.ts +20 -5
- package/src/components/VRangeSlider/__tests__/VRangeSlider.spec.ts +40 -40
- package/src/components/VRangeSlider/__tests__/__snapshots__/VRangeSlider.spec.ts.snap +32 -38
- package/src/components/VRating/VRating.ts +13 -0
- package/src/components/VResponsive/__tests__/__snapshots__/VResponsive.spec.ts.snap +2 -2
- package/src/components/VSelect/VSelect.ts +105 -47
- package/src/components/VSelect/VSelectList.ts +51 -25
- package/src/components/VSelect/__tests__/VSelect.spec.ts +166 -125
- package/src/components/VSelect/__tests__/VSelect2.spec.ts +127 -111
- package/src/components/VSelect/__tests__/VSelect3.spec.ts +109 -91
- package/src/components/VSelect/__tests__/VSelect4.spec.ts +79 -68
- package/src/components/VSelect/__tests__/VSelectList.spec.ts +23 -31
- package/src/components/VSelect/__tests__/__snapshots__/VSelect.spec.ts.snap +58 -62
- package/src/components/VSelect/__tests__/__snapshots__/VSelect2.spec.ts.snap +50 -62
- package/src/components/VSelect/__tests__/__snapshots__/VSelect3.spec.ts.snap +10 -14
- package/src/components/VSheet/__tests__/VSheet.spec.ts +5 -5
- package/src/components/VSkeletonLoader/__tests__/VSkeletonLoader.spec.ts +22 -15
- package/src/components/VSkeletonLoader/__tests__/__snapshots__/VSkeletonLoader.spec.ts.snap +60 -60
- package/src/components/VSlideGroup/VSlideGroup.ts +5 -7
- package/src/components/VSlideGroup/VSlideItem.ts +2 -0
- package/src/components/VSlider/VSlider.ts +58 -32
- package/src/components/VSlider/__tests__/VSlider.spec.ts +188 -286
- package/src/components/VSlider/__tests__/__snapshots__/VSlider.spec.ts.snap +157 -246
- package/src/components/VSnackbar/VSnackbar.ts +1 -1
- package/src/components/VSparkline/VSparkline.ts +54 -92
- package/src/components/VSparkline/__tests__/VSparkline.spec.ts +33 -35
- package/src/components/VSpeedDial/VSpeedDial.ts +12 -15
- package/src/components/VSpeedDial/__tests__/VSpeedDial.spec.ts +21 -13
- package/src/components/VSpeedDial/__tests__/__snapshots__/VSpeedDial.spec.ts.snap +6 -6
- package/src/components/VStepper/VStepper.ts +3 -1
- package/src/components/VStepper/VStepperContent.ts +2 -2
- package/src/components/VStepper/VStepperStep.ts +9 -16
- package/src/components/VStepper/__tests__/VStepper.spec.ts +4 -1
- package/src/components/VStepper/__tests__/VStepperContent.spec.ts +104 -110
- package/src/components/VStepper/__tests__/VStepperStep.spec.ts +51 -44
- package/src/components/VSubheader/VSubheader.ts +1 -1
- package/src/components/VSubheader/__tests__/VSubheader.spec.ts +12 -7
- package/src/components/VSubheader/__tests__/__snapshots__/VSubheader.spec.ts.snap +1 -1
- package/src/components/VSwitch/VSwitch.ts +5 -6
- package/src/components/VSwitch/__tests__/VSwitch.spec.ts +30 -37
- package/src/components/VSystemBar/__tests__/VSystemBar.spec.ts +89 -17
- package/src/components/VTabs/VTab.ts +2 -0
- package/src/components/VTabs/VTabs.ts +33 -13
- package/src/components/VTabs/VTabsBar.ts +7 -5
- package/src/components/VTabs/VTabsItems.ts +2 -0
- package/src/components/VTabs/__tests__/VTab.spec.ts +49 -38
- package/src/components/VTabs/__tests__/VTabs.spec.ts +127 -79
- package/src/components/VTabs/__tests__/VTabsBar.spec.ts +68 -27
- package/src/components/VTabs/__tests__/VTabsSlider.spec.ts +7 -6
- package/src/components/VTabs/__tests__/__snapshots__/VTabs.spec.ts.snap +1 -3
- package/src/components/VTextField/VTextField.ts +14 -16
- package/src/components/VTextField/__tests__/VTextField.spec.ts +342 -246
- package/src/components/VTextarea/__tests__/VTextarea.spec.ts +112 -35
- 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 +120 -40
- package/src/components/VTimeline/__tests__/VTimelineItem.spec.ts +25 -35
- package/src/components/VTimeline/__tests__/__snapshots__/VTimelineItem.spec.ts.snap +4 -5
- package/src/components/VToolbar/VToolbar.ts +5 -6
- package/src/components/VToolbar/__tests__/VToolbar.spec.ts +49 -25
- package/src/components/VTooltip/VTooltip.ts +24 -24
- package/src/components/VTooltip/__tests__/VTooltip.spec.ts +60 -75
- package/src/components/VTooltip/__tests__/__snapshots__/VTooltip.spec.ts.snap +34 -18
- package/src/components/VTreeview/VTreeview.ts +20 -17
- package/src/components/VTreeview/VTreeviewNode.ts +4 -6
- package/src/components/VTreeview/__tests__/VTreeview.spec.ts +168 -174
- package/src/components/VTreeview/__tests__/VTreeviewNode.spec.ts +77 -66
- package/src/components/VTreeview/__tests__/__snapshots__/VTreeview.spec.ts.snap +141 -141
- package/src/components/VTreeview/__tests__/__snapshots__/VTreeviewNode.spec.ts.snap +26 -51
- package/src/components/VVirtualScroll/VVirtualScroll.ts +14 -15
- package/src/components/VVirtualScroll/__tests__/VVirtualScroll.spec.ts +24 -20
- package/src/components/VWindow/VWindow.ts +9 -6
- package/src/components/VWindow/VWindowItem.ts +5 -4
- package/src/components/VWindow/__tests__/VWindow.spec.ts +304 -185
- package/src/components/VWindow/__tests__/VWindowItem.spec.ts +283 -126
- package/src/components/VWindow/__tests__/__snapshots__/VWindow.spec.ts.snap +59 -0
- package/src/components/VWindow/__tests__/__snapshots__/VWindowItem.spec.ts.snap +36 -0
- package/src/components/transitions/createTransition.ts +2 -2
- package/src/components/transitions/expand-transition.ts +2 -0
- package/src/directives/intersect/index.ts +81 -42
- package/src/directives/mutate/index.ts +58 -49
- package/src/directives/resize/index.ts +33 -14
- package/src/directives/scroll/index.ts +36 -20
- package/src/directives/touch/index.ts +37 -27
- package/src/install.ts +10 -32
- package/src/mixins/activatable/index.ts +10 -5
- package/src/mixins/applicationable/__tests__/applicationable.spec.ts +31 -27
- package/src/mixins/applicationable/index.ts +4 -4
- package/src/mixins/binds-attrs/index.ts +1 -1
- package/src/mixins/bootable/__tests__/bootable.spec.ts +17 -11
- package/src/mixins/bootable/index.ts +4 -3
- package/src/mixins/colorable/__tests__/colorable.spec.ts +9 -6
- package/src/mixins/detachable/index.ts +16 -9
- package/src/mixins/elevatable/__tests__/elevatable.spec.ts +14 -13
- package/src/mixins/groupable/index.ts +1 -1
- package/src/mixins/intersectable/__tests__/intersectable.spec.ts +35 -29
- package/src/mixins/intersectable/index.ts +2 -2
- package/src/mixins/menuable/__tests__/menuable.spec.ts +76 -33
- package/src/mixins/menuable/index.ts +1 -1
- package/src/mixins/mobile/__tests__/mobile.spec.ts +9 -6
- package/src/mixins/mouse/__tests__/mouse.spec.ts +54 -40
- package/src/mixins/mouse/index.ts +10 -6
- package/src/mixins/overlayable/__tests__/overlayable.spec.ts +32 -24
- package/src/mixins/overlayable/index.ts +5 -4
- package/src/mixins/picker/index.ts +4 -4
- package/src/mixins/proxyable/__tests__/proxyable.spec.ts +18 -17
- package/src/mixins/registrable/__tests__/registrable.spec.ts +31 -0
- package/src/mixins/rippleable/__tests__/rippleable.spec.ts +10 -9
- package/src/mixins/roundable/__tests__/roundable.spec.ts +7 -5
- package/src/mixins/routable/__tests__/routable.spec.ts +60 -52
- package/src/mixins/routable/index.ts +6 -4
- package/src/mixins/scrollable/__tests__/scrollable.spec.ts +56 -27
- package/src/mixins/selectable/__tests__/selectable.spec.ts +22 -9
- package/src/mixins/selectable/index.ts +7 -7
- package/src/mixins/translatable/index.ts +1 -1
- package/src/mixins/validatable/__tests__/validatable.spec.ts +194 -158
- package/src/mixins/validatable/index.ts +29 -21
- package/src/services/breakpoint/index.ts +5 -0
- package/src/util/__tests__/console.spec.ts +124 -11
- package/src/util/__tests__/helpers.spec.ts +121 -32
- package/src/util/console.ts +43 -24
- package/src/util/helpers.ts +49 -4
- package/src/util/legacyEventsMixin.ts +34 -0
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import VDataTable from '../VDataTable'
|
|
2
2
|
import {
|
|
3
3
|
mount,
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
VueWrapper,
|
|
5
|
+
MountingOptions,
|
|
6
|
+
enableAutoUnmount,
|
|
6
7
|
} from '@vue/test-utils'
|
|
8
|
+
import { h, nextTick } from 'vue'
|
|
7
9
|
import { Breakpoint } from '../../../services/breakpoint'
|
|
8
10
|
import ripple from '../../../directives/ripple/index'
|
|
9
|
-
import Vue from 'vue'
|
|
10
11
|
import { Lang } from '../../../services/lang'
|
|
11
12
|
import { preset } from '../../../presets/default'
|
|
12
13
|
import { resizeWindow } from '../../../../test'
|
|
@@ -121,27 +122,34 @@ const testItems = [
|
|
|
121
122
|
/* eslint-disable max-statements */
|
|
122
123
|
describe('VDataTable.ts', () => {
|
|
123
124
|
type Instance = InstanceType<typeof VDataTable>
|
|
124
|
-
let mountFunction: (options?:
|
|
125
|
+
let mountFunction: (options?: MountingOptions<Instance>) => VueWrapper<Instance>
|
|
126
|
+
|
|
127
|
+
enableAutoUnmount(afterEach)
|
|
128
|
+
|
|
125
129
|
beforeEach(() => {
|
|
126
130
|
document.body.setAttribute('data-app', 'true')
|
|
127
131
|
|
|
128
|
-
mountFunction = (options?:
|
|
132
|
+
mountFunction = (options?: MountingOptions<Instance>) => {
|
|
133
|
+
const vuetifyInstance = {
|
|
134
|
+
breakpoint: new Breakpoint(preset),
|
|
135
|
+
lang: new Lang(preset),
|
|
136
|
+
theme: {
|
|
137
|
+
dark: false,
|
|
138
|
+
},
|
|
139
|
+
icons: {},
|
|
140
|
+
}
|
|
141
|
+
|
|
129
142
|
return mount(VDataTable, {
|
|
130
143
|
global: {
|
|
131
144
|
config: {
|
|
132
145
|
globalProperties: {
|
|
133
|
-
$vuetify:
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
icons: {}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
146
|
+
$vuetify: vuetifyInstance,
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
mocks: {
|
|
150
|
+
$vuetify: vuetifyInstance,
|
|
151
|
+
},
|
|
143
152
|
},
|
|
144
|
-
sync: false,
|
|
145
153
|
...options,
|
|
146
154
|
})
|
|
147
155
|
}
|
|
@@ -155,986 +163,896 @@ describe('VDataTable.ts', () => {
|
|
|
155
163
|
expect(wrapper.html()).toMatchSnapshot()
|
|
156
164
|
})
|
|
157
165
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
//
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
//
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
//
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
//
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
//
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
//
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
//
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
//
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
//
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
// },
|
|
1051
|
-
// { text: 'Calories', value: 'calories' },
|
|
1052
|
-
// { text: 'Fat (g)', value: 'fat' },
|
|
1053
|
-
// { text: 'Carbs (g)', value: 'carbs' },
|
|
1054
|
-
// { text: 'Protein (g)', value: 'protein' },
|
|
1055
|
-
// { text: 'Iron (%)', value: 'iron' },
|
|
1056
|
-
// ],
|
|
1057
|
-
// },
|
|
1058
|
-
// })
|
|
1059
|
-
|
|
1060
|
-
// expect(wrapper.html()).toMatchSnapshot()
|
|
1061
|
-
// })
|
|
1062
|
-
|
|
1063
|
-
// it('should return rows matching search term if specified', async () => {
|
|
1064
|
-
// const wrapper = mountFunction({
|
|
1065
|
-
// propsData: {
|
|
1066
|
-
// items: testItems,
|
|
1067
|
-
// headers: [
|
|
1068
|
-
// { text: 'Dessert (100g serving)', align: 'left', value: 'name' },
|
|
1069
|
-
// { text: 'Calories', value: 'calories' },
|
|
1070
|
-
// { text: 'Fat (g)', value: 'fat' },
|
|
1071
|
-
// { text: 'Carbs (g)', value: 'carbs' },
|
|
1072
|
-
// { text: 'Protein (g)', value: 'protein' },
|
|
1073
|
-
// { text: 'Iron (%)', value: 'iron' },
|
|
1074
|
-
// ],
|
|
1075
|
-
// },
|
|
1076
|
-
// })
|
|
1077
|
-
|
|
1078
|
-
// wrapper.setProps({ search: 'unknown-term' })
|
|
1079
|
-
// await wrapper.vm.$nextTick()
|
|
1080
|
-
// expect(wrapper.vm.internalCurrentItems).toHaveLength(0)
|
|
1081
|
-
|
|
1082
|
-
// wrapper.setProps({ search: 'Eclair' })
|
|
1083
|
-
// await wrapper.vm.$nextTick()
|
|
1084
|
-
// expect(wrapper.vm.internalCurrentItems).toHaveLength(1)
|
|
1085
|
-
// })
|
|
1086
|
-
|
|
1087
|
-
// it('should return results which match both search term and column filters if both specified', async () => {
|
|
1088
|
-
// const wrapper = mountFunction({
|
|
1089
|
-
// propsData: {
|
|
1090
|
-
// items: testItems,
|
|
1091
|
-
// headers: [
|
|
1092
|
-
// { text: 'Dessert (100g serving)', align: 'left', value: 'name' },
|
|
1093
|
-
// { text: 'Calories', value: 'calories', filter: value => value < 300 },
|
|
1094
|
-
// { text: 'Fat (g)', value: 'fat' },
|
|
1095
|
-
// { text: 'Carbs (g)', value: 'carbs' },
|
|
1096
|
-
// { text: 'Protein (g)', value: 'protein' },
|
|
1097
|
-
// { text: 'Iron (%)', value: 'iron' },
|
|
1098
|
-
// ],
|
|
1099
|
-
// },
|
|
1100
|
-
// })
|
|
1101
|
-
|
|
1102
|
-
// wrapper.setProps({ search: 'EA' })
|
|
1103
|
-
// await wrapper.vm.$nextTick()
|
|
1104
|
-
// expect(wrapper.vm.internalCurrentItems).toHaveLength(1)
|
|
1105
|
-
// })
|
|
1106
|
-
|
|
1107
|
-
// // https://github.com/vuetifyjs/vuetify/issues/14006
|
|
1108
|
-
// it('should allow selection on second page when using numbers as item key', async () => {
|
|
1109
|
-
// const input = jest.fn()
|
|
1110
|
-
// const items = testItems.map((item, index) => ({ ...item, name: index + 1 })).slice(0, 8)
|
|
1111
|
-
// const wrapper = mountFunction({
|
|
1112
|
-
// propsData: {
|
|
1113
|
-
// items,
|
|
1114
|
-
// itemKey: 'name',
|
|
1115
|
-
// itemsPerPage: 5,
|
|
1116
|
-
// showSelect: true,
|
|
1117
|
-
// headers: testHeaders,
|
|
1118
|
-
// mobileBreakpoint: 0,
|
|
1119
|
-
// },
|
|
1120
|
-
// listeners: {
|
|
1121
|
-
// input,
|
|
1122
|
-
// },
|
|
1123
|
-
// })
|
|
1124
|
-
|
|
1125
|
-
// let checkbox = wrapper.findAll('td > .v-data-table__checkbox').at(4)
|
|
1126
|
-
|
|
1127
|
-
// checkbox.trigger('click')
|
|
1128
|
-
// await wrapper.vm.$nextTick()
|
|
1129
|
-
|
|
1130
|
-
// wrapper.setProps({ page: 2 })
|
|
1131
|
-
// await wrapper.vm.$nextTick()
|
|
1132
|
-
|
|
1133
|
-
// checkbox = wrapper.findAll('td > .v-data-table__checkbox').at(0)
|
|
1134
|
-
|
|
1135
|
-
// checkbox.trigger('click')
|
|
1136
|
-
// await wrapper.vm.$nextTick()
|
|
1137
|
-
|
|
1138
|
-
// expect(input).toHaveBeenCalledWith([items[4], items[5]])
|
|
1139
|
-
// })
|
|
166
|
+
it('should render with data', () => {
|
|
167
|
+
const wrapper = mountFunction({
|
|
168
|
+
props: {
|
|
169
|
+
headers: testHeaders,
|
|
170
|
+
items: testItems,
|
|
171
|
+
itemsPerPage: 5,
|
|
172
|
+
},
|
|
173
|
+
})
|
|
174
|
+
|
|
175
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
176
|
+
})
|
|
177
|
+
|
|
178
|
+
it('should render with body slot', () => {
|
|
179
|
+
const wrapper = mountFunction({
|
|
180
|
+
props: {
|
|
181
|
+
headers: testHeaders,
|
|
182
|
+
items: testItems,
|
|
183
|
+
itemsPerPage: 5,
|
|
184
|
+
},
|
|
185
|
+
slots: {
|
|
186
|
+
body: (props: any) => h('div', [props.items.length]),
|
|
187
|
+
},
|
|
188
|
+
})
|
|
189
|
+
|
|
190
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
191
|
+
})
|
|
192
|
+
|
|
193
|
+
it('should render with foot slot', () => {
|
|
194
|
+
const wrapper = mountFunction({
|
|
195
|
+
props: {
|
|
196
|
+
headers: testHeaders,
|
|
197
|
+
items: testItems,
|
|
198
|
+
itemsPerPage: 5,
|
|
199
|
+
},
|
|
200
|
+
slots: {
|
|
201
|
+
foot: (props: any) => h('tfoot', [props.items.length]),
|
|
202
|
+
},
|
|
203
|
+
})
|
|
204
|
+
|
|
205
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
206
|
+
})
|
|
207
|
+
|
|
208
|
+
it('should render virtual table', () => {
|
|
209
|
+
const wrapper = mountFunction({
|
|
210
|
+
props: {
|
|
211
|
+
headers: testHeaders,
|
|
212
|
+
items: testItems,
|
|
213
|
+
itemsPerPage: 5,
|
|
214
|
+
virtualRows: true,
|
|
215
|
+
},
|
|
216
|
+
})
|
|
217
|
+
|
|
218
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
219
|
+
})
|
|
220
|
+
|
|
221
|
+
it('should render with showExpand', async () => {
|
|
222
|
+
const expand = jest.fn()
|
|
223
|
+
const wrapper = mountFunction({
|
|
224
|
+
props: {
|
|
225
|
+
headers: testHeaders,
|
|
226
|
+
itemKey: 'name',
|
|
227
|
+
items: testItems,
|
|
228
|
+
itemsPerPage: 5,
|
|
229
|
+
showExpand: true,
|
|
230
|
+
},
|
|
231
|
+
attrs: {
|
|
232
|
+
'onUpdate:expanded': expand,
|
|
233
|
+
},
|
|
234
|
+
})
|
|
235
|
+
|
|
236
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
237
|
+
|
|
238
|
+
const expandIcon = wrapper.findAll('.v-data-table__expand-icon')[0]
|
|
239
|
+
if (expandIcon) {
|
|
240
|
+
expandIcon.trigger('click')
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
await nextTick()
|
|
244
|
+
expect(expand).toHaveBeenCalledWith(testItems.slice(0, 1))
|
|
245
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
246
|
+
})
|
|
247
|
+
|
|
248
|
+
it('should render with showSelect', () => {
|
|
249
|
+
const wrapper = mountFunction({
|
|
250
|
+
props: {
|
|
251
|
+
headers: testHeaders,
|
|
252
|
+
items: testItems,
|
|
253
|
+
itemsPerPage: 5,
|
|
254
|
+
showSelect: true,
|
|
255
|
+
},
|
|
256
|
+
})
|
|
257
|
+
|
|
258
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
259
|
+
})
|
|
260
|
+
|
|
261
|
+
it('should render with item.expanded scoped slot', async () => {
|
|
262
|
+
const wrapper = mountFunction({
|
|
263
|
+
props: {
|
|
264
|
+
headers: testHeaders,
|
|
265
|
+
items: testItems,
|
|
266
|
+
itemsPerPage: 5,
|
|
267
|
+
expanded: testItems,
|
|
268
|
+
},
|
|
269
|
+
slots: {
|
|
270
|
+
'expanded-item': (props: any) => h('div', ['expanded']),
|
|
271
|
+
},
|
|
272
|
+
})
|
|
273
|
+
|
|
274
|
+
await nextTick()
|
|
275
|
+
|
|
276
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
277
|
+
})
|
|
278
|
+
|
|
279
|
+
it('should render with group.summary scoped slot', () => {
|
|
280
|
+
const wrapper = mountFunction({
|
|
281
|
+
props: {
|
|
282
|
+
headers: testHeaders,
|
|
283
|
+
items: testItems,
|
|
284
|
+
itemsPerPage: 5,
|
|
285
|
+
groupBy: 'calories',
|
|
286
|
+
},
|
|
287
|
+
slots: {
|
|
288
|
+
'group.summary': (props: any) => h('div', ['summary']),
|
|
289
|
+
},
|
|
290
|
+
})
|
|
291
|
+
|
|
292
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
293
|
+
})
|
|
294
|
+
|
|
295
|
+
it('should render with item scoped slot', () => {
|
|
296
|
+
const wrapper = mountFunction({
|
|
297
|
+
props: {
|
|
298
|
+
headers: testHeaders,
|
|
299
|
+
items: testItems,
|
|
300
|
+
itemsPerPage: 5,
|
|
301
|
+
},
|
|
302
|
+
slots: {
|
|
303
|
+
item: (props: any) => h('div', [JSON.stringify(props)]),
|
|
304
|
+
},
|
|
305
|
+
})
|
|
306
|
+
|
|
307
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
308
|
+
})
|
|
309
|
+
|
|
310
|
+
it('should render with grouped rows', () => {
|
|
311
|
+
const wrapper = mountFunction({
|
|
312
|
+
props: {
|
|
313
|
+
headers: testHeaders,
|
|
314
|
+
items: testItems,
|
|
315
|
+
itemsPerPage: 5,
|
|
316
|
+
groupBy: ['protein'],
|
|
317
|
+
},
|
|
318
|
+
})
|
|
319
|
+
|
|
320
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
321
|
+
})
|
|
322
|
+
|
|
323
|
+
it('should render with group scoped slot', () => {
|
|
324
|
+
const wrapper = mountFunction({
|
|
325
|
+
props: {
|
|
326
|
+
headers: testHeaders,
|
|
327
|
+
items: testItems,
|
|
328
|
+
itemsPerPage: 5,
|
|
329
|
+
groupBy: ['protein'],
|
|
330
|
+
},
|
|
331
|
+
slots: {
|
|
332
|
+
group: (props: any) => h('div', [JSON.stringify(props)]),
|
|
333
|
+
},
|
|
334
|
+
})
|
|
335
|
+
|
|
336
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
337
|
+
})
|
|
338
|
+
|
|
339
|
+
it('should render loading state', () => {
|
|
340
|
+
const wrapper = mountFunction({
|
|
341
|
+
props: {
|
|
342
|
+
loading: true,
|
|
343
|
+
checkboxColor: 'primary',
|
|
344
|
+
color: 'primary',
|
|
345
|
+
},
|
|
346
|
+
})
|
|
347
|
+
|
|
348
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
349
|
+
|
|
350
|
+
const wrapper2 = mountFunction({
|
|
351
|
+
props: {
|
|
352
|
+
headers: testHeaders,
|
|
353
|
+
loading: true,
|
|
354
|
+
},
|
|
355
|
+
slots: {
|
|
356
|
+
progress: () => h('div', { class: 'progress' }, '50%'),
|
|
357
|
+
},
|
|
358
|
+
})
|
|
359
|
+
|
|
360
|
+
expect(wrapper2.html()).toMatchSnapshot()
|
|
361
|
+
})
|
|
362
|
+
|
|
363
|
+
it.each([
|
|
364
|
+
'click',
|
|
365
|
+
'contextmenu',
|
|
366
|
+
'dblclick',
|
|
367
|
+
])('should render row that can handle %s events', async event => {
|
|
368
|
+
const wrapper = mountFunction({
|
|
369
|
+
props: {
|
|
370
|
+
headers: testHeaders,
|
|
371
|
+
items: testItems,
|
|
372
|
+
},
|
|
373
|
+
})
|
|
374
|
+
|
|
375
|
+
const row = wrapper.find('tbody tr')
|
|
376
|
+
expect(row.exists()).toBe(true)
|
|
377
|
+
|
|
378
|
+
// Just test that the event can be triggered without errors
|
|
379
|
+
if (row.exists()) {
|
|
380
|
+
await row.trigger(event)
|
|
381
|
+
await nextTick()
|
|
382
|
+
}
|
|
383
|
+
})
|
|
384
|
+
|
|
385
|
+
// https://github.com/vuetifyjs/vuetify/issues/8254
|
|
386
|
+
it('should pass kebab-case footer props correctly', () => {
|
|
387
|
+
const wrapper = mountFunction({
|
|
388
|
+
props: {
|
|
389
|
+
headers: [],
|
|
390
|
+
items: [],
|
|
391
|
+
footerProps: {
|
|
392
|
+
'items-per-page-text': 'Foo:',
|
|
393
|
+
},
|
|
394
|
+
},
|
|
395
|
+
})
|
|
396
|
+
|
|
397
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
398
|
+
})
|
|
399
|
+
|
|
400
|
+
// https://github.com/vuetifyjs/vuetify/issues/8266
|
|
401
|
+
it('should use options prop for initial values', () => {
|
|
402
|
+
const fn = jest.fn()
|
|
403
|
+
const wrapper = mountFunction({
|
|
404
|
+
props: {
|
|
405
|
+
headers: testHeaders,
|
|
406
|
+
items: testItems,
|
|
407
|
+
options: {
|
|
408
|
+
page: 2,
|
|
409
|
+
itemsPerPage: 5,
|
|
410
|
+
},
|
|
411
|
+
},
|
|
412
|
+
attrs: {
|
|
413
|
+
'onUpdate:options': fn,
|
|
414
|
+
},
|
|
415
|
+
})
|
|
416
|
+
|
|
417
|
+
expect(fn).toHaveBeenCalledWith(expect.objectContaining({
|
|
418
|
+
page: 2,
|
|
419
|
+
}))
|
|
420
|
+
})
|
|
421
|
+
|
|
422
|
+
it('should render footer.prepend slot content', () => {
|
|
423
|
+
const wrapper = mountFunction({
|
|
424
|
+
props: {
|
|
425
|
+
headers: [],
|
|
426
|
+
items: [{}],
|
|
427
|
+
},
|
|
428
|
+
slots: {
|
|
429
|
+
'footer.prepend': () => h('div', ['footer.prepend slot content']),
|
|
430
|
+
},
|
|
431
|
+
})
|
|
432
|
+
|
|
433
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
434
|
+
})
|
|
435
|
+
|
|
436
|
+
it('should render footer.page-text slot content', () => {
|
|
437
|
+
const wrapper = mountFunction({
|
|
438
|
+
props: {
|
|
439
|
+
headers: [],
|
|
440
|
+
items: [{}],
|
|
441
|
+
},
|
|
442
|
+
slots: {
|
|
443
|
+
'footer.page-text': ({ pageStart, pageStop }: any) => h('div', [`foo ${pageStart} bar ${pageStop}`]),
|
|
444
|
+
},
|
|
445
|
+
})
|
|
446
|
+
|
|
447
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
448
|
+
})
|
|
449
|
+
|
|
450
|
+
// https://github.com/vuetifyjs/vuetify/issues/8359
|
|
451
|
+
it('should not limit page to current item count when using server-items-length', async () => {
|
|
452
|
+
const wrapper = mountFunction({
|
|
453
|
+
props: {
|
|
454
|
+
headers: testHeaders,
|
|
455
|
+
items: [],
|
|
456
|
+
page: 2,
|
|
457
|
+
itemsPerPage: 5,
|
|
458
|
+
serverItemsLength: 0,
|
|
459
|
+
},
|
|
460
|
+
})
|
|
461
|
+
|
|
462
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
463
|
+
|
|
464
|
+
wrapper.setProps({
|
|
465
|
+
items: testItems.slice(5),
|
|
466
|
+
serverItemsLength: 20,
|
|
467
|
+
})
|
|
468
|
+
await nextTick()
|
|
469
|
+
|
|
470
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
471
|
+
})
|
|
472
|
+
|
|
473
|
+
it('should not search column with filterable set to false', async () => {
|
|
474
|
+
const wrapper = mountFunction({
|
|
475
|
+
props: {
|
|
476
|
+
items: testItems,
|
|
477
|
+
headers: [
|
|
478
|
+
{
|
|
479
|
+
text: 'Dessert (100g serving)',
|
|
480
|
+
align: 'left',
|
|
481
|
+
filterable: false,
|
|
482
|
+
value: 'name',
|
|
483
|
+
},
|
|
484
|
+
{ text: 'Calories', value: 'calories' },
|
|
485
|
+
{ text: 'Fat (g)', value: 'fat' },
|
|
486
|
+
{ text: 'Carbs (g)', value: 'carbs' },
|
|
487
|
+
{ text: 'Protein (g)', value: 'protein' },
|
|
488
|
+
{ text: 'Iron (%)', value: 'iron' },
|
|
489
|
+
],
|
|
490
|
+
},
|
|
491
|
+
})
|
|
492
|
+
|
|
493
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
494
|
+
|
|
495
|
+
wrapper.setProps({
|
|
496
|
+
search: 'cup',
|
|
497
|
+
})
|
|
498
|
+
await nextTick()
|
|
499
|
+
|
|
500
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
501
|
+
})
|
|
502
|
+
|
|
503
|
+
it('should not search column with filterable set to false and has filter function', async () => {
|
|
504
|
+
const wrapper = mountFunction({
|
|
505
|
+
props: {
|
|
506
|
+
items: testItems,
|
|
507
|
+
headers: [
|
|
508
|
+
{
|
|
509
|
+
text: 'Dessert (100g serving)',
|
|
510
|
+
align: 'left',
|
|
511
|
+
value: 'name',
|
|
512
|
+
},
|
|
513
|
+
{ text: 'Calories', value: 'calories', filter: (v: any) => v > 400 },
|
|
514
|
+
{ text: 'Fat (g)', value: 'fat' },
|
|
515
|
+
{ text: 'Carbs (g)', value: 'carbs' },
|
|
516
|
+
{ text: 'Protein (g)', value: 'protein' },
|
|
517
|
+
{ text: 'Iron (%)', value: 'iron' },
|
|
518
|
+
],
|
|
519
|
+
},
|
|
520
|
+
})
|
|
521
|
+
|
|
522
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
523
|
+
|
|
524
|
+
wrapper.setProps({
|
|
525
|
+
headers: [
|
|
526
|
+
{
|
|
527
|
+
text: 'Dessert (100g serving)',
|
|
528
|
+
align: 'left',
|
|
529
|
+
value: 'name',
|
|
530
|
+
},
|
|
531
|
+
{ text: 'Calories', value: 'calories', filter: (v: any) => v > 400, filterable: false },
|
|
532
|
+
{ text: 'Fat (g)', value: 'fat' },
|
|
533
|
+
{ text: 'Carbs (g)', value: 'carbs' },
|
|
534
|
+
{ text: 'Protein (g)', value: 'protein' },
|
|
535
|
+
{ text: 'Iron (%)', value: 'iron' },
|
|
536
|
+
],
|
|
537
|
+
})
|
|
538
|
+
await nextTick()
|
|
539
|
+
|
|
540
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
541
|
+
})
|
|
542
|
+
|
|
543
|
+
// https://github.com/vuetifyjs/vuetify/issues/8359
|
|
544
|
+
it('should limit page to current page count if not using server-items-length', async () => {
|
|
545
|
+
const wrapper = mountFunction({
|
|
546
|
+
props: {
|
|
547
|
+
headers: testHeaders,
|
|
548
|
+
items: testItems,
|
|
549
|
+
page: 3,
|
|
550
|
+
itemsPerPage: 5,
|
|
551
|
+
},
|
|
552
|
+
})
|
|
553
|
+
|
|
554
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
555
|
+
})
|
|
556
|
+
|
|
557
|
+
// https://github.com/vuetifyjs/vuetify/issues/8184
|
|
558
|
+
it('should default to first option in itemsPerPageOptions if it does not include itemsPerPage', async () => {
|
|
559
|
+
const wrapper = mountFunction({
|
|
560
|
+
props: {
|
|
561
|
+
headers: testHeaders,
|
|
562
|
+
items: testItems,
|
|
563
|
+
footerProps: {
|
|
564
|
+
itemsPerPageOptions: [6, 7],
|
|
565
|
+
},
|
|
566
|
+
},
|
|
567
|
+
})
|
|
568
|
+
|
|
569
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
570
|
+
})
|
|
571
|
+
|
|
572
|
+
// https://github.com/vuetifyjs/vuetify/issues/8817
|
|
573
|
+
it('should handle object when checking if it should default to first option in itemsPerPageOptions', async () => {
|
|
574
|
+
const wrapper = mountFunction({
|
|
575
|
+
props: {
|
|
576
|
+
headers: testHeaders,
|
|
577
|
+
items: testItems,
|
|
578
|
+
itemsPerPage: -1,
|
|
579
|
+
footerProps: {
|
|
580
|
+
itemsPerPageOptions: [6, { text: 'All', value: -1 }],
|
|
581
|
+
},
|
|
582
|
+
},
|
|
583
|
+
})
|
|
584
|
+
|
|
585
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
586
|
+
})
|
|
587
|
+
|
|
588
|
+
// https://github.com/vuetifyjs/vuetify/issues/9599
|
|
589
|
+
it('should not immediately emit items-per-page', async () => {
|
|
590
|
+
const itemsPerPage = jest.fn()
|
|
591
|
+
const wrapper = mountFunction({
|
|
592
|
+
props: {
|
|
593
|
+
headers: testHeaders,
|
|
594
|
+
items: testItems,
|
|
595
|
+
footerProps: {
|
|
596
|
+
itemsPerPageOptions: [6, 7],
|
|
597
|
+
},
|
|
598
|
+
},
|
|
599
|
+
attrs: {
|
|
600
|
+
'onUpdate:itemsPerPage': itemsPerPage,
|
|
601
|
+
},
|
|
602
|
+
})
|
|
603
|
+
|
|
604
|
+
expect(itemsPerPage).not.toHaveBeenCalled()
|
|
605
|
+
})
|
|
606
|
+
|
|
607
|
+
// https://github.com/vuetifyjs/vuetify/issues/9010
|
|
608
|
+
it('should change page if item count decreases below page start', async () => {
|
|
609
|
+
const page = jest.fn()
|
|
610
|
+
const wrapper = mountFunction({
|
|
611
|
+
props: {
|
|
612
|
+
headers: testHeaders,
|
|
613
|
+
items: testItems.slice(0, 4),
|
|
614
|
+
itemsPerPage: 2,
|
|
615
|
+
footerProps: {
|
|
616
|
+
itemsPerPageOptions: [2],
|
|
617
|
+
},
|
|
618
|
+
page: 2,
|
|
619
|
+
},
|
|
620
|
+
attrs: {
|
|
621
|
+
'onUpdate:page': page,
|
|
622
|
+
},
|
|
623
|
+
})
|
|
624
|
+
|
|
625
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
626
|
+
|
|
627
|
+
wrapper.setProps({ items: testItems.slice(0, 2) })
|
|
628
|
+
await nextTick()
|
|
629
|
+
|
|
630
|
+
expect(page).toHaveBeenCalledWith(1)
|
|
631
|
+
})
|
|
632
|
+
|
|
633
|
+
it('should render with single-select checkboxes', async () => {
|
|
634
|
+
const wrapper = mountFunction({
|
|
635
|
+
props: {
|
|
636
|
+
headers: testHeaders,
|
|
637
|
+
itemKey: 'name',
|
|
638
|
+
items: testItems.slice(0, 2),
|
|
639
|
+
value: [testItems[0]],
|
|
640
|
+
showSelect: true,
|
|
641
|
+
singleSelect: true,
|
|
642
|
+
},
|
|
643
|
+
})
|
|
644
|
+
|
|
645
|
+
const checkboxes = wrapper.findAll('.v-data-table__checkbox')
|
|
646
|
+
expect(checkboxes.length).toBeGreaterThan(0)
|
|
647
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
648
|
+
})
|
|
649
|
+
|
|
650
|
+
it('should render non-selectable items correctly', async () => {
|
|
651
|
+
const items = [
|
|
652
|
+
{ ...testItems[0], isSelectable: false },
|
|
653
|
+
{ ...testItems[1] },
|
|
654
|
+
]
|
|
655
|
+
const wrapper = mountFunction({
|
|
656
|
+
props: {
|
|
657
|
+
headers: testHeaders,
|
|
658
|
+
items,
|
|
659
|
+
showSelect: true,
|
|
660
|
+
},
|
|
661
|
+
})
|
|
662
|
+
|
|
663
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
664
|
+
const checkboxes = wrapper.findAll('.v-simple-checkbox')
|
|
665
|
+
expect(checkboxes.length).toBeGreaterThan(0)
|
|
666
|
+
})
|
|
667
|
+
|
|
668
|
+
it('should render select-all checkbox when items are selectable', async () => {
|
|
669
|
+
const items = [
|
|
670
|
+
{ ...testItems[0], isSelectable: false },
|
|
671
|
+
{ ...testItems[1] },
|
|
672
|
+
]
|
|
673
|
+
const wrapper = mountFunction({
|
|
674
|
+
props: {
|
|
675
|
+
headers: testHeaders,
|
|
676
|
+
items,
|
|
677
|
+
showSelect: true,
|
|
678
|
+
},
|
|
679
|
+
})
|
|
680
|
+
|
|
681
|
+
const selectAll = wrapper.findAll('.v-simple-checkbox')[0]
|
|
682
|
+
expect(selectAll.exists()).toBe(true)
|
|
683
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
684
|
+
})
|
|
685
|
+
|
|
686
|
+
// https://github.com/vuetifyjs/vuetify/issues/10392
|
|
687
|
+
it('should search group-by column', async () => {
|
|
688
|
+
const headers = [
|
|
689
|
+
{
|
|
690
|
+
text: 'Name',
|
|
691
|
+
value: 'name',
|
|
692
|
+
},
|
|
693
|
+
{
|
|
694
|
+
text: 'ID',
|
|
695
|
+
value: 'id',
|
|
696
|
+
},
|
|
697
|
+
]
|
|
698
|
+
|
|
699
|
+
const items = [
|
|
700
|
+
{
|
|
701
|
+
name: 'Assistance',
|
|
702
|
+
id: 1,
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
name: 'Candidat',
|
|
706
|
+
id: 2,
|
|
707
|
+
},
|
|
708
|
+
]
|
|
709
|
+
|
|
710
|
+
const wrapper = mountFunction({
|
|
711
|
+
props: {
|
|
712
|
+
headers,
|
|
713
|
+
items,
|
|
714
|
+
itemKey: 'id',
|
|
715
|
+
groupBy: 'name',
|
|
716
|
+
},
|
|
717
|
+
})
|
|
718
|
+
|
|
719
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
720
|
+
|
|
721
|
+
wrapper.setProps({ search: 'candidat' })
|
|
722
|
+
await nextTick()
|
|
723
|
+
|
|
724
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
725
|
+
})
|
|
726
|
+
|
|
727
|
+
it('should render item slot when using group-by function', async () => {
|
|
728
|
+
const wrapper = mountFunction({
|
|
729
|
+
props: {
|
|
730
|
+
headers: testHeaders,
|
|
731
|
+
itemKey: 'name',
|
|
732
|
+
items: testItems.slice(0, 2),
|
|
733
|
+
groupBy: 'name',
|
|
734
|
+
},
|
|
735
|
+
slots: {
|
|
736
|
+
item: () => h('div', ['scoped']),
|
|
737
|
+
},
|
|
738
|
+
})
|
|
739
|
+
|
|
740
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
741
|
+
})
|
|
742
|
+
|
|
743
|
+
it('should handle filtering correctly', async () => {
|
|
744
|
+
const headers = [
|
|
745
|
+
{
|
|
746
|
+
text: 'Name',
|
|
747
|
+
value: 'name',
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
text: 'ID',
|
|
751
|
+
value: 'id',
|
|
752
|
+
},
|
|
753
|
+
]
|
|
754
|
+
|
|
755
|
+
const items = [
|
|
756
|
+
{
|
|
757
|
+
name: 'Assistance',
|
|
758
|
+
id: 1,
|
|
759
|
+
},
|
|
760
|
+
{
|
|
761
|
+
name: 'Candidat',
|
|
762
|
+
id: 2,
|
|
763
|
+
},
|
|
764
|
+
]
|
|
765
|
+
|
|
766
|
+
const wrapper = mountFunction({
|
|
767
|
+
props: {
|
|
768
|
+
headers,
|
|
769
|
+
items,
|
|
770
|
+
itemKey: 'id',
|
|
771
|
+
},
|
|
772
|
+
})
|
|
773
|
+
|
|
774
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
775
|
+
|
|
776
|
+
wrapper.setProps({ search: 'candidat' })
|
|
777
|
+
await nextTick()
|
|
778
|
+
|
|
779
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
780
|
+
})
|
|
781
|
+
|
|
782
|
+
it('should not emit too many pagination events', async () => {
|
|
783
|
+
const headers = [
|
|
784
|
+
{
|
|
785
|
+
text: 'Name',
|
|
786
|
+
value: 'name',
|
|
787
|
+
},
|
|
788
|
+
{
|
|
789
|
+
text: 'ID',
|
|
790
|
+
value: 'id',
|
|
791
|
+
},
|
|
792
|
+
]
|
|
793
|
+
|
|
794
|
+
const items = [
|
|
795
|
+
{
|
|
796
|
+
name: 'Assistance',
|
|
797
|
+
id: 1,
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
name: 'Candidat',
|
|
801
|
+
id: 2,
|
|
802
|
+
},
|
|
803
|
+
]
|
|
804
|
+
|
|
805
|
+
const wrapper = mountFunction({
|
|
806
|
+
props: {
|
|
807
|
+
headers,
|
|
808
|
+
itemKey: 'id',
|
|
809
|
+
serverItemsLength: 0,
|
|
810
|
+
},
|
|
811
|
+
})
|
|
812
|
+
|
|
813
|
+
wrapper.setProps({ items, serverItemsLength: items.length })
|
|
814
|
+
await nextTick()
|
|
815
|
+
|
|
816
|
+
expect(wrapper.emitted().pagination).toHaveLength(2)
|
|
817
|
+
})
|
|
818
|
+
|
|
819
|
+
it('should show correct aria-labels when sorting', async () => {
|
|
820
|
+
const wrapper = mountFunction({
|
|
821
|
+
props: {
|
|
822
|
+
headers: testHeaders,
|
|
823
|
+
itemKey: 'name',
|
|
824
|
+
items: testItems.slice(0, 5),
|
|
825
|
+
sortBy: 'calories',
|
|
826
|
+
},
|
|
827
|
+
})
|
|
828
|
+
|
|
829
|
+
wrapper.setProps({ sortDesc: true })
|
|
830
|
+
await nextTick()
|
|
831
|
+
|
|
832
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
833
|
+
|
|
834
|
+
wrapper.setProps({ mustSort: true })
|
|
835
|
+
await nextTick()
|
|
836
|
+
|
|
837
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
838
|
+
})
|
|
839
|
+
|
|
840
|
+
it('should apply class list to rows', () => {
|
|
841
|
+
const wrapper = mountFunction({
|
|
842
|
+
props: {
|
|
843
|
+
headers: testHeaders,
|
|
844
|
+
items: testItems,
|
|
845
|
+
itemsPerPage: 5,
|
|
846
|
+
itemClass: () => ['my-class', 'my-other-class'],
|
|
847
|
+
},
|
|
848
|
+
})
|
|
849
|
+
|
|
850
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
851
|
+
})
|
|
852
|
+
|
|
853
|
+
it('should apply class unique to rows', () => {
|
|
854
|
+
const wrapper = mountFunction({
|
|
855
|
+
props: {
|
|
856
|
+
headers: testHeaders,
|
|
857
|
+
items: testItems,
|
|
858
|
+
itemsPerPage: 5,
|
|
859
|
+
itemClass: () => 'my-unique-class',
|
|
860
|
+
},
|
|
861
|
+
})
|
|
862
|
+
|
|
863
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
864
|
+
})
|
|
865
|
+
|
|
866
|
+
it('should apply class function to rows', () => {
|
|
867
|
+
const wrapper = mountFunction({
|
|
868
|
+
props: {
|
|
869
|
+
headers: testHeaders,
|
|
870
|
+
items: testItems,
|
|
871
|
+
itemsPerPage: 5,
|
|
872
|
+
itemClass: (item: any) => ({
|
|
873
|
+
'first-class': item.fat < 10,
|
|
874
|
+
'second-class': item.protein > 4.0,
|
|
875
|
+
}),
|
|
876
|
+
},
|
|
877
|
+
})
|
|
878
|
+
|
|
879
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
880
|
+
})
|
|
881
|
+
|
|
882
|
+
it('should apply class from item to rows', () => {
|
|
883
|
+
const wrapper = mountFunction({
|
|
884
|
+
props: {
|
|
885
|
+
headers: testHeaders,
|
|
886
|
+
items: testItems,
|
|
887
|
+
itemsPerPage: 5,
|
|
888
|
+
itemClass: 'class',
|
|
889
|
+
},
|
|
890
|
+
})
|
|
891
|
+
|
|
892
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
893
|
+
})
|
|
894
|
+
|
|
895
|
+
// https://github.com/vuetifyjs/vuetify/issues/11600
|
|
896
|
+
it('should return rows from columns that match custom filters', async () => {
|
|
897
|
+
const wrapper = mountFunction({
|
|
898
|
+
props: {
|
|
899
|
+
items: testItems,
|
|
900
|
+
filterMode: 'union',
|
|
901
|
+
headers: [
|
|
902
|
+
{ text: 'Dessert (100g serving)', align: 'left', value: 'name' },
|
|
903
|
+
{ text: 'Calories', value: 'calories', filter: (value: any) => value === 159 },
|
|
904
|
+
{ text: 'Fat (g)', value: 'fat' },
|
|
905
|
+
{ text: 'Carbs (g)', value: 'carbs' },
|
|
906
|
+
{ text: 'Protein (g)', value: 'protein' },
|
|
907
|
+
{ text: 'Iron (%)', value: 'iron' },
|
|
908
|
+
],
|
|
909
|
+
},
|
|
910
|
+
})
|
|
911
|
+
|
|
912
|
+
wrapper.setProps({ search: 'eclair' })
|
|
913
|
+
await nextTick()
|
|
914
|
+
expect(wrapper.vm.internalCurrentItems).toHaveLength(2)
|
|
915
|
+
})
|
|
916
|
+
|
|
917
|
+
it('should return rows from columns that exclusively match custom filters', async () => {
|
|
918
|
+
const wrapper = mountFunction({
|
|
919
|
+
props: {
|
|
920
|
+
items: testItems,
|
|
921
|
+
filterMode: 'intersection',
|
|
922
|
+
headers: [
|
|
923
|
+
{ text: 'Dessert (100g serving)', align: 'left', value: 'name' },
|
|
924
|
+
{ text: 'Calories', value: 'calories', filter: (value: any) => value === 159 },
|
|
925
|
+
{ text: 'Fat (g)', value: 'fat' },
|
|
926
|
+
{ text: 'Carbs (g)', value: 'carbs' },
|
|
927
|
+
{ text: 'Protein (g)', value: 'protein' },
|
|
928
|
+
{ text: 'Iron (%)', value: 'iron' },
|
|
929
|
+
],
|
|
930
|
+
},
|
|
931
|
+
})
|
|
932
|
+
|
|
933
|
+
wrapper.setProps({ search: 'eclair' })
|
|
934
|
+
await nextTick()
|
|
935
|
+
expect(wrapper.vm.internalCurrentItems).toHaveLength(0)
|
|
936
|
+
|
|
937
|
+
wrapper.setProps({ search: 'frozen' })
|
|
938
|
+
await nextTick()
|
|
939
|
+
expect(wrapper.vm.internalCurrentItems).toHaveLength(1)
|
|
940
|
+
})
|
|
941
|
+
|
|
942
|
+
it('should respect mustSort property on options', async () => {
|
|
943
|
+
const wrapper = mountFunction({
|
|
944
|
+
props: {
|
|
945
|
+
items: testItems,
|
|
946
|
+
headers: [
|
|
947
|
+
{ text: 'Dessert (100g serving)', value: 'name' },
|
|
948
|
+
],
|
|
949
|
+
options: {
|
|
950
|
+
mustSort: true,
|
|
951
|
+
},
|
|
952
|
+
},
|
|
953
|
+
})
|
|
954
|
+
|
|
955
|
+
wrapper.find('th').trigger('click')
|
|
956
|
+
await nextTick()
|
|
957
|
+
|
|
958
|
+
wrapper.find('th').trigger('click')
|
|
959
|
+
await nextTick()
|
|
960
|
+
|
|
961
|
+
wrapper.find('th').trigger('click')
|
|
962
|
+
await nextTick()
|
|
963
|
+
|
|
964
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
965
|
+
})
|
|
966
|
+
|
|
967
|
+
it('should hide group button when column is not groupable', async () => {
|
|
968
|
+
const wrapper = mountFunction({
|
|
969
|
+
props: {
|
|
970
|
+
showGroupBy: true,
|
|
971
|
+
items: testItems,
|
|
972
|
+
headers: [
|
|
973
|
+
{
|
|
974
|
+
text: 'Dessert (100g serving)',
|
|
975
|
+
align: 'left',
|
|
976
|
+
value: 'name',
|
|
977
|
+
groupable: false,
|
|
978
|
+
},
|
|
979
|
+
{ text: 'Calories', value: 'calories' },
|
|
980
|
+
{ text: 'Fat (g)', value: 'fat' },
|
|
981
|
+
{ text: 'Carbs (g)', value: 'carbs' },
|
|
982
|
+
{ text: 'Protein (g)', value: 'protein' },
|
|
983
|
+
{ text: 'Iron (%)', value: 'iron' },
|
|
984
|
+
],
|
|
985
|
+
},
|
|
986
|
+
})
|
|
987
|
+
|
|
988
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
989
|
+
})
|
|
990
|
+
|
|
991
|
+
it('should return rows matching search term if specified', async () => {
|
|
992
|
+
const wrapper = mountFunction({
|
|
993
|
+
props: {
|
|
994
|
+
items: testItems,
|
|
995
|
+
headers: [
|
|
996
|
+
{ text: 'Dessert (100g serving)', align: 'left', value: 'name' },
|
|
997
|
+
{ text: 'Calories', value: 'calories' },
|
|
998
|
+
{ text: 'Fat (g)', value: 'fat' },
|
|
999
|
+
{ text: 'Carbs (g)', value: 'carbs' },
|
|
1000
|
+
{ text: 'Protein (g)', value: 'protein' },
|
|
1001
|
+
{ text: 'Iron (%)', value: 'iron' },
|
|
1002
|
+
],
|
|
1003
|
+
},
|
|
1004
|
+
})
|
|
1005
|
+
|
|
1006
|
+
wrapper.setProps({ search: 'unknown-term' })
|
|
1007
|
+
await nextTick()
|
|
1008
|
+
expect(wrapper.vm.internalCurrentItems).toHaveLength(0)
|
|
1009
|
+
|
|
1010
|
+
wrapper.setProps({ search: 'Eclair' })
|
|
1011
|
+
await nextTick()
|
|
1012
|
+
expect(wrapper.vm.internalCurrentItems).toHaveLength(1)
|
|
1013
|
+
})
|
|
1014
|
+
|
|
1015
|
+
it('should return results which match both search term and column filters if both specified', async () => {
|
|
1016
|
+
const wrapper = mountFunction({
|
|
1017
|
+
props: {
|
|
1018
|
+
items: testItems,
|
|
1019
|
+
headers: [
|
|
1020
|
+
{ text: 'Dessert (100g serving)', align: 'left', value: 'name' },
|
|
1021
|
+
{ text: 'Calories', value: 'calories', filter: (value: any) => value < 300 },
|
|
1022
|
+
{ text: 'Fat (g)', value: 'fat' },
|
|
1023
|
+
{ text: 'Carbs (g)', value: 'carbs' },
|
|
1024
|
+
{ text: 'Protein (g)', value: 'protein' },
|
|
1025
|
+
{ text: 'Iron (%)', value: 'iron' },
|
|
1026
|
+
],
|
|
1027
|
+
},
|
|
1028
|
+
})
|
|
1029
|
+
|
|
1030
|
+
wrapper.setProps({ search: 'EA' })
|
|
1031
|
+
await nextTick()
|
|
1032
|
+
expect(wrapper.vm.internalCurrentItems).toHaveLength(1)
|
|
1033
|
+
})
|
|
1034
|
+
|
|
1035
|
+
it('should render selection checkboxes on multiple pages with numeric item keys', async () => {
|
|
1036
|
+
const items = testItems.map((item, index) => ({ ...item, name: index + 1 })).slice(0, 8)
|
|
1037
|
+
const wrapper = mountFunction({
|
|
1038
|
+
props: {
|
|
1039
|
+
items,
|
|
1040
|
+
itemKey: 'name',
|
|
1041
|
+
itemsPerPage: 5,
|
|
1042
|
+
showSelect: true,
|
|
1043
|
+
headers: testHeaders,
|
|
1044
|
+
mobileBreakpoint: 0,
|
|
1045
|
+
},
|
|
1046
|
+
})
|
|
1047
|
+
|
|
1048
|
+
// Just check that the component renders without errors
|
|
1049
|
+
expect(wrapper.html()).toContain('v-data-table')
|
|
1050
|
+
|
|
1051
|
+
wrapper.setProps({ page: 2 })
|
|
1052
|
+
await nextTick()
|
|
1053
|
+
|
|
1054
|
+
// Check that page 2 renders without errors
|
|
1055
|
+
expect(wrapper.html()).toContain('v-data-table')
|
|
1056
|
+
expect(wrapper.html()).toMatchSnapshot()
|
|
1057
|
+
})
|
|
1140
1058
|
})
|