@vuetify/nightly 2.6.7 → 2.6.8-master-20220708.0
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/CHANGELOG.md +4 -11
- package/dist/json/web-types.json +5 -5
- package/dist/vuetify.js +308 -224
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +1 -1
- package/dist/vuetify.min.js +2 -2
- package/es5/components/VAutocomplete/VAutocomplete.js +3 -3
- package/es5/components/VAutocomplete/VAutocomplete.js.map +1 -1
- package/es5/components/VBtn/VBtn.js +2 -2
- package/es5/components/VBtn/VBtn.js.map +1 -1
- package/es5/components/VCalendar/mixins/calendar-with-events.js +6 -5
- package/es5/components/VCalendar/mixins/calendar-with-events.js.map +1 -1
- package/es5/components/VCalendar/mixins/mouse.js +4 -4
- package/es5/components/VCalendar/mixins/mouse.js.map +1 -1
- package/es5/components/VCombobox/VCombobox.js +2 -2
- package/es5/components/VCombobox/VCombobox.js.map +1 -1
- package/es5/components/VDataIterator/VDataFooter.js +5 -2
- package/es5/components/VDataIterator/VDataFooter.js.map +1 -1
- package/es5/components/VDataTable/Row.js +2 -2
- package/es5/components/VDataTable/Row.js.map +1 -1
- package/es5/components/VDataTable/VDataTable.js +54 -43
- package/es5/components/VDataTable/VDataTable.js.map +1 -1
- package/es5/components/VDataTable/mixins/header.js +4 -3
- package/es5/components/VDataTable/mixins/header.js.map +1 -1
- package/es5/components/VDatePicker/VDatePicker.js +2 -1
- package/es5/components/VDatePicker/VDatePicker.js.map +1 -1
- package/es5/components/VDialog/VDialog.js +13 -15
- package/es5/components/VDialog/VDialog.js.map +1 -1
- package/es5/components/VItemGroup/VItemGroup.js +4 -2
- package/es5/components/VItemGroup/VItemGroup.js.map +1 -1
- package/es5/components/VMenu/VMenu.js +2 -2
- package/es5/components/VMenu/VMenu.js.map +1 -1
- package/es5/components/VOtpInput/VOtpInput.js +8 -7
- package/es5/components/VOtpInput/VOtpInput.js.map +1 -1
- package/es5/components/VRadioGroup/VRadio.js +2 -1
- package/es5/components/VRadioGroup/VRadio.js.map +1 -1
- package/es5/components/VRangeSlider/VRangeSlider.js +4 -3
- package/es5/components/VRangeSlider/VRangeSlider.js.map +1 -1
- package/es5/components/VSelect/VSelect.js +8 -8
- package/es5/components/VSelect/VSelect.js.map +1 -1
- package/es5/components/VSelect/VSelectList.js +2 -1
- package/es5/components/VSelect/VSelectList.js.map +1 -1
- package/es5/components/VSkeletonLoader/VSkeletonLoader.js +4 -4
- package/es5/components/VSkeletonLoader/VSkeletonLoader.js.map +1 -1
- package/es5/components/VSlideGroup/VSlideGroup.js +4 -4
- package/es5/components/VSlideGroup/VSlideGroup.js.map +1 -1
- package/es5/components/VSlider/VSlider.js +8 -11
- package/es5/components/VSlider/VSlider.js.map +1 -1
- package/es5/components/VSparkline/VSparkline.js +2 -1
- package/es5/components/VSparkline/VSparkline.js.map +1 -1
- package/es5/components/VTextField/VTextField.js +5 -5
- package/es5/components/VTextField/VTextField.js.map +1 -1
- package/es5/components/VTextarea/VTextarea.js +2 -2
- package/es5/components/VTextarea/VTextarea.js.map +1 -1
- package/es5/components/VTimePicker/VTimePicker.js.map +1 -1
- package/es5/components/VTreeview/VTreeview.js +5 -4
- package/es5/components/VTreeview/VTreeview.js.map +1 -1
- package/es5/components/VTreeview/VTreeviewNode.js +2 -1
- package/es5/components/VTreeview/VTreeviewNode.js.map +1 -1
- package/es5/components/VWindow/VWindow.js +5 -6
- package/es5/components/VWindow/VWindow.js.map +1 -1
- package/es5/directives/click-outside/index.js +2 -2
- package/es5/directives/click-outside/index.js.map +1 -1
- package/es5/directives/intersect/index.js +5 -5
- package/es5/directives/intersect/index.js.map +1 -1
- package/es5/directives/mutate/index.js +2 -2
- package/es5/directives/mutate/index.js.map +1 -1
- package/es5/directives/resize/index.js +2 -2
- package/es5/directives/resize/index.js.map +1 -1
- package/es5/directives/scroll/index.js +2 -2
- package/es5/directives/scroll/index.js.map +1 -1
- package/es5/framework.js +1 -1
- package/es5/mixins/activatable/index.js +1 -3
- package/es5/mixins/activatable/index.js.map +1 -1
- package/es5/mixins/binds-attrs/index.js.map +1 -1
- package/es5/mixins/overlayable/index.js +1 -1
- package/es5/mixins/overlayable/index.js.map +1 -1
- package/es5/mixins/routable/index.js +2 -2
- package/es5/mixins/routable/index.js.map +1 -1
- package/es5/util/helpers.js +1 -1
- package/es5/util/helpers.js.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.js +3 -3
- package/lib/components/VAutocomplete/VAutocomplete.js.map +1 -1
- package/lib/components/VBtn/VBtn.js +2 -2
- package/lib/components/VBtn/VBtn.js.map +1 -1
- package/lib/components/VCalendar/mixins/calendar-with-events.js +4 -4
- package/lib/components/VCalendar/mixins/calendar-with-events.js.map +1 -1
- package/lib/components/VCalendar/mixins/mouse.js +4 -4
- package/lib/components/VCalendar/mixins/mouse.js.map +1 -1
- package/lib/components/VCombobox/VCombobox.js +2 -2
- package/lib/components/VCombobox/VCombobox.js.map +1 -1
- package/lib/components/VDataIterator/VDataFooter.js +5 -2
- package/lib/components/VDataIterator/VDataFooter.js.map +1 -1
- package/lib/components/VDataTable/Row.js +2 -2
- package/lib/components/VDataTable/Row.js.map +1 -1
- package/lib/components/VDataTable/VDataTable.js +15 -5
- package/lib/components/VDataTable/VDataTable.js.map +1 -1
- package/lib/components/VDataTable/mixins/header.js +2 -2
- package/lib/components/VDataTable/mixins/header.js.map +1 -1
- package/lib/components/VDatePicker/VDatePicker.js +2 -1
- package/lib/components/VDatePicker/VDatePicker.js.map +1 -1
- package/lib/components/VDialog/VDialog.js +11 -13
- package/lib/components/VDialog/VDialog.js.map +1 -1
- package/lib/components/VItemGroup/VItemGroup.js +2 -2
- package/lib/components/VItemGroup/VItemGroup.js.map +1 -1
- package/lib/components/VMenu/VMenu.js +2 -2
- package/lib/components/VMenu/VMenu.js.map +1 -1
- package/lib/components/VOtpInput/VOtpInput.js +8 -7
- package/lib/components/VOtpInput/VOtpInput.js.map +1 -1
- package/lib/components/VRadioGroup/VRadio.js +2 -1
- package/lib/components/VRadioGroup/VRadio.js.map +1 -1
- package/lib/components/VRangeSlider/VRangeSlider.js +2 -2
- package/lib/components/VRangeSlider/VRangeSlider.js.map +1 -1
- package/lib/components/VSelect/VSelect.js +8 -8
- package/lib/components/VSelect/VSelect.js.map +1 -1
- package/lib/components/VSelect/VSelectList.js +2 -1
- package/lib/components/VSelect/VSelectList.js.map +1 -1
- package/lib/components/VSkeletonLoader/VSkeletonLoader.js +4 -4
- package/lib/components/VSkeletonLoader/VSkeletonLoader.js.map +1 -1
- package/lib/components/VSlideGroup/VSlideGroup.js +4 -4
- package/lib/components/VSlideGroup/VSlideGroup.js.map +1 -1
- package/lib/components/VSlider/VSlider.js +6 -11
- package/lib/components/VSlider/VSlider.js.map +1 -1
- package/lib/components/VSparkline/VSparkline.js +2 -1
- package/lib/components/VSparkline/VSparkline.js.map +1 -1
- package/lib/components/VTextField/VTextField.js +5 -5
- package/lib/components/VTextField/VTextField.js.map +1 -1
- package/lib/components/VTextarea/VTextarea.js +2 -2
- package/lib/components/VTextarea/VTextarea.js.map +1 -1
- package/lib/components/VTimePicker/VTimePicker.js.map +1 -1
- package/lib/components/VTreeview/VTreeview.js +5 -4
- package/lib/components/VTreeview/VTreeview.js.map +1 -1
- package/lib/components/VTreeview/VTreeviewNode.js +2 -1
- package/lib/components/VTreeview/VTreeviewNode.js.map +1 -1
- package/lib/components/VWindow/VWindow.js +3 -3
- package/lib/components/VWindow/VWindow.js.map +1 -1
- package/lib/directives/click-outside/index.js +2 -2
- package/lib/directives/click-outside/index.js.map +1 -1
- package/lib/directives/intersect/index.js +4 -4
- package/lib/directives/intersect/index.js.map +1 -1
- package/lib/directives/mutate/index.js +2 -2
- package/lib/directives/mutate/index.js.map +1 -1
- package/lib/directives/resize/index.js +2 -2
- package/lib/directives/resize/index.js.map +1 -1
- package/lib/directives/scroll/index.js +2 -2
- package/lib/directives/scroll/index.js.map +1 -1
- package/lib/framework.js +1 -1
- package/lib/mixins/activatable/index.js +1 -3
- package/lib/mixins/activatable/index.js.map +1 -1
- package/lib/mixins/binds-attrs/index.js.map +1 -1
- package/lib/mixins/overlayable/index.js +1 -1
- package/lib/mixins/overlayable/index.js.map +1 -1
- package/lib/mixins/routable/index.js +4 -3
- package/lib/mixins/routable/index.js.map +1 -1
- package/lib/util/helpers.js +1 -1
- package/lib/util/helpers.js.map +1 -1
- package/package.json +1 -1
- package/src/components/VDataTable/VDataTable.ts +4 -1
- package/src/components/VDataTable/__tests__/__snapshots__/VDataTable.spec.ts.snap +14 -14
- package/src/components/VDatePicker/VDatePicker.ts +1 -1
- package/src/components/VItemGroup/VItemGroup.ts +2 -2
- package/src/components/VItemGroup/__tests__/VItemGroup.spec.ts +29 -0
- package/src/components/VOverflowBtn/__tests__/__snapshots__/VOverflowBtn.spec.ts.snap +14 -10
- package/src/components/VRangeSlider/__tests__/VRangeSlider.spec.ts +2 -2
- package/src/components/VRangeSlider/__tests__/__snapshots__/VRangeSlider.spec.ts.snap +2 -2
- package/src/components/VSlideGroup/VSlideGroup.ts +1 -1
- package/src/components/VSlider/VSlider.ts +1 -7
- package/src/components/VSlider/__tests__/VSlider.spec.ts +3 -2
- package/src/components/VTimePicker/VTimePicker.ts +1 -1
- package/src/globals.d.ts +6 -6
- package/src/mixins/applicationable/__tests__/applicationable.spec.ts +1 -1
- package/src/mixins/binds-attrs/index.ts +2 -2
- package/src/mixins/overlayable/index.ts +7 -7
- package/src/util/helpers.ts +2 -2
- package/es5/util/component.js +0 -11
- package/es5/util/component.js.map +0 -1
- package/lib/util/component.js +0 -4
- package/lib/util/component.js.map +0 -1
- package/src/util/component.ts +0 -21
|
@@ -6911,7 +6911,7 @@ exports[`VDataTable.ts should render item slot when using group-by function 1`]
|
|
|
6911
6911
|
</i>
|
|
6912
6912
|
</span>
|
|
6913
6913
|
</button>
|
|
6914
|
-
|
|
6914
|
+
Dessert (100g serving): Frozen Yogurt
|
|
6915
6915
|
<button type="button"
|
|
6916
6916
|
class="ma-0 v-btn v-btn--icon v-btn--round theme--light v-size--small"
|
|
6917
6917
|
>
|
|
@@ -6941,7 +6941,7 @@ exports[`VDataTable.ts should render item slot when using group-by function 1`]
|
|
|
6941
6941
|
</i>
|
|
6942
6942
|
</span>
|
|
6943
6943
|
</button>
|
|
6944
|
-
|
|
6944
|
+
Dessert (100g serving): Ice cream sandwich
|
|
6945
6945
|
<button type="button"
|
|
6946
6946
|
class="ma-0 v-btn v-btn--icon v-btn--round theme--light v-size--small"
|
|
6947
6947
|
>
|
|
@@ -8477,7 +8477,7 @@ exports[`VDataTable.ts should render with group.summary scoped slot 1`] = `
|
|
|
8477
8477
|
</i>
|
|
8478
8478
|
</span>
|
|
8479
8479
|
</button>
|
|
8480
|
-
|
|
8480
|
+
Calories: 159
|
|
8481
8481
|
<button type="button"
|
|
8482
8482
|
class="ma-0 v-btn v-btn--icon v-btn--round theme--light v-size--small"
|
|
8483
8483
|
>
|
|
@@ -8551,7 +8551,7 @@ exports[`VDataTable.ts should render with group.summary scoped slot 1`] = `
|
|
|
8551
8551
|
</i>
|
|
8552
8552
|
</span>
|
|
8553
8553
|
</button>
|
|
8554
|
-
|
|
8554
|
+
Calories: 237
|
|
8555
8555
|
<button type="button"
|
|
8556
8556
|
class="ma-0 v-btn v-btn--icon v-btn--round theme--light v-size--small"
|
|
8557
8557
|
>
|
|
@@ -8625,7 +8625,7 @@ exports[`VDataTable.ts should render with group.summary scoped slot 1`] = `
|
|
|
8625
8625
|
</i>
|
|
8626
8626
|
</span>
|
|
8627
8627
|
</button>
|
|
8628
|
-
|
|
8628
|
+
Calories: 262
|
|
8629
8629
|
<button type="button"
|
|
8630
8630
|
class="ma-0 v-btn v-btn--icon v-btn--round theme--light v-size--small"
|
|
8631
8631
|
>
|
|
@@ -8699,7 +8699,7 @@ exports[`VDataTable.ts should render with group.summary scoped slot 1`] = `
|
|
|
8699
8699
|
</i>
|
|
8700
8700
|
</span>
|
|
8701
8701
|
</button>
|
|
8702
|
-
|
|
8702
|
+
Calories: 305
|
|
8703
8703
|
<button type="button"
|
|
8704
8704
|
class="ma-0 v-btn v-btn--icon v-btn--round theme--light v-size--small"
|
|
8705
8705
|
>
|
|
@@ -8773,7 +8773,7 @@ exports[`VDataTable.ts should render with group.summary scoped slot 1`] = `
|
|
|
8773
8773
|
</i>
|
|
8774
8774
|
</span>
|
|
8775
8775
|
</button>
|
|
8776
|
-
|
|
8776
|
+
Calories: 356
|
|
8777
8777
|
<button type="button"
|
|
8778
8778
|
class="ma-0 v-btn v-btn--icon v-btn--round theme--light v-size--small"
|
|
8779
8779
|
>
|
|
@@ -8988,7 +8988,7 @@ exports[`VDataTable.ts should render with grouped rows 1`] = `
|
|
|
8988
8988
|
</i>
|
|
8989
8989
|
</span>
|
|
8990
8990
|
</button>
|
|
8991
|
-
|
|
8991
|
+
Protein (g): 0
|
|
8992
8992
|
<button type="button"
|
|
8993
8993
|
class="ma-0 v-btn v-btn--icon v-btn--round theme--light v-size--small"
|
|
8994
8994
|
>
|
|
@@ -9099,7 +9099,7 @@ exports[`VDataTable.ts should render with grouped rows 1`] = `
|
|
|
9099
9099
|
</i>
|
|
9100
9100
|
</span>
|
|
9101
9101
|
</button>
|
|
9102
|
-
|
|
9102
|
+
Protein (g): 3.9
|
|
9103
9103
|
<button type="button"
|
|
9104
9104
|
class="ma-0 v-btn v-btn--icon v-btn--round theme--light v-size--small"
|
|
9105
9105
|
>
|
|
@@ -9168,7 +9168,7 @@ exports[`VDataTable.ts should render with grouped rows 1`] = `
|
|
|
9168
9168
|
</i>
|
|
9169
9169
|
</span>
|
|
9170
9170
|
</button>
|
|
9171
|
-
|
|
9171
|
+
Protein (g): 4
|
|
9172
9172
|
<button type="button"
|
|
9173
9173
|
class="ma-0 v-btn v-btn--icon v-btn--round theme--light v-size--small"
|
|
9174
9174
|
>
|
|
@@ -9237,7 +9237,7 @@ exports[`VDataTable.ts should render with grouped rows 1`] = `
|
|
|
9237
9237
|
</i>
|
|
9238
9238
|
</span>
|
|
9239
9239
|
</button>
|
|
9240
|
-
|
|
9240
|
+
Protein (g): 4.3
|
|
9241
9241
|
<button type="button"
|
|
9242
9242
|
class="ma-0 v-btn v-btn--icon v-btn--round theme--light v-size--small"
|
|
9243
9243
|
>
|
|
@@ -11644,7 +11644,7 @@ exports[`VDataTable.ts should search group-by column 1`] = `
|
|
|
11644
11644
|
</i>
|
|
11645
11645
|
</span>
|
|
11646
11646
|
</button>
|
|
11647
|
-
|
|
11647
|
+
Name: Assistance
|
|
11648
11648
|
<button type="button"
|
|
11649
11649
|
class="ma-0 v-btn v-btn--icon v-btn--round theme--light v-size--small"
|
|
11650
11650
|
>
|
|
@@ -11681,7 +11681,7 @@ exports[`VDataTable.ts should search group-by column 1`] = `
|
|
|
11681
11681
|
</i>
|
|
11682
11682
|
</span>
|
|
11683
11683
|
</button>
|
|
11684
|
-
|
|
11684
|
+
Name: Candidat
|
|
11685
11685
|
<button type="button"
|
|
11686
11686
|
class="ma-0 v-btn v-btn--icon v-btn--round theme--light v-size--small"
|
|
11687
11687
|
>
|
|
@@ -11856,7 +11856,7 @@ exports[`VDataTable.ts should search group-by column 2`] = `
|
|
|
11856
11856
|
</i>
|
|
11857
11857
|
</span>
|
|
11858
11858
|
</button>
|
|
11859
|
-
|
|
11859
|
+
Name: Candidat
|
|
11860
11860
|
<button type="button"
|
|
11861
11861
|
class="ma-0 v-btn v-btn--icon v-btn--round theme--light v-size--small"
|
|
11862
11862
|
>
|
|
@@ -231,7 +231,7 @@ export default mixins(
|
|
|
231
231
|
year: { year: 'numeric', timeZone: 'UTC' },
|
|
232
232
|
month: { month: 'long', timeZone: 'UTC' },
|
|
233
233
|
date: { weekday: 'short', month: 'short', day: 'numeric', timeZone: 'UTC' },
|
|
234
|
-
}
|
|
234
|
+
} as const
|
|
235
235
|
|
|
236
236
|
const titleDateFormatter = createNativeLocaleFormatter(this.currentLocale, titleFormats[this.type], {
|
|
237
237
|
start: 0,
|
|
@@ -219,7 +219,7 @@ export const BaseItemGroup = mixins(
|
|
|
219
219
|
? this.internalValue
|
|
220
220
|
: []
|
|
221
221
|
const internalValue = defaultValue.slice()
|
|
222
|
-
const index = internalValue.findIndex(val => val
|
|
222
|
+
const index = internalValue.findIndex(val => this.valueComparator(val, value))
|
|
223
223
|
|
|
224
224
|
if (
|
|
225
225
|
this.mandatory &&
|
|
@@ -245,7 +245,7 @@ export const BaseItemGroup = mixins(
|
|
|
245
245
|
this.internalValue = internalValue
|
|
246
246
|
},
|
|
247
247
|
updateSingle (value: any) {
|
|
248
|
-
const isSame =
|
|
248
|
+
const isSame = this.valueComparator(this.internalValue, value)
|
|
249
249
|
|
|
250
250
|
if (this.mandatory && isSame) return
|
|
251
251
|
|
|
@@ -217,6 +217,18 @@ describe('VItemGroup', () => {
|
|
|
217
217
|
wrapper.vm.updateSingle('foo')
|
|
218
218
|
expect(wrapper.vm.internalValue).toBeUndefined()
|
|
219
219
|
|
|
220
|
+
// Toggling on and off object references
|
|
221
|
+
wrapper.vm.updateSingle({ foo: 'foo' })
|
|
222
|
+
expect(wrapper.vm.internalValue).toEqual({ foo: 'foo' })
|
|
223
|
+
wrapper.vm.updateSingle({ foo: 'foo' })
|
|
224
|
+
expect(wrapper.vm.internalValue).toBeUndefined()
|
|
225
|
+
|
|
226
|
+
// Toggling on and off with custom comparator
|
|
227
|
+
wrapper.setProps({ valueComparator: (a: any, b: any) => a?.startsWith(b?.[0]), value: 'foo' })
|
|
228
|
+
expect(wrapper.vm.internalValue).toBe('foo')
|
|
229
|
+
wrapper.vm.updateSingle('foobar')
|
|
230
|
+
expect(wrapper.vm.internalValue).toBeUndefined()
|
|
231
|
+
|
|
220
232
|
wrapper.setProps({ mandatory: true })
|
|
221
233
|
|
|
222
234
|
// Toggling off single mandatory
|
|
@@ -237,6 +249,12 @@ describe('VItemGroup', () => {
|
|
|
237
249
|
wrapper.vm.updateMultiple('foo')
|
|
238
250
|
expect(wrapper.vm.internalValue).toEqual([])
|
|
239
251
|
|
|
252
|
+
// Toggling on and off object references
|
|
253
|
+
wrapper.vm.updateMultiple({ foo: 'foo' })
|
|
254
|
+
expect(wrapper.vm.internalValue).toEqual([{ foo: 'foo' }])
|
|
255
|
+
wrapper.vm.updateMultiple({ foo: 'foo' })
|
|
256
|
+
expect(wrapper.vm.internalValue).toEqual([])
|
|
257
|
+
|
|
240
258
|
wrapper.setProps({ mandatory: true })
|
|
241
259
|
|
|
242
260
|
// Toggling off single mandatory
|
|
@@ -256,6 +274,17 @@ describe('VItemGroup', () => {
|
|
|
256
274
|
expect(wrapper.vm.internalValue).toEqual(['foo', 'bar', 'fizz'])
|
|
257
275
|
})
|
|
258
276
|
|
|
277
|
+
it('should update a multiple item group with a custom comparator', () => {
|
|
278
|
+
const wrapper = mountFunction({
|
|
279
|
+
propsData: { multiple: true },
|
|
280
|
+
})
|
|
281
|
+
|
|
282
|
+
wrapper.setProps({ valueComparator: (a: any, b: any) => a?.startsWith(b?.[0]), value: ['foo'] })
|
|
283
|
+
expect(wrapper.vm.internalValue).toEqual(['foo'])
|
|
284
|
+
wrapper.vm.updateMultiple('foobar')
|
|
285
|
+
expect(wrapper.vm.internalValue).toEqual([])
|
|
286
|
+
})
|
|
287
|
+
|
|
259
288
|
it('should update value if mandatory and dynamic items', async () => {
|
|
260
289
|
const wrapper = mountFunction({
|
|
261
290
|
propsData: {
|
|
@@ -6,17 +6,17 @@ exports[`VOverflowBtn.js should show label with persistentPlaceholder property s
|
|
|
6
6
|
<div role="combobox"
|
|
7
7
|
aria-haspopup="listbox"
|
|
8
8
|
aria-expanded="false"
|
|
9
|
-
aria-owns="list-
|
|
9
|
+
aria-owns="list-15"
|
|
10
10
|
class="v-input__slot"
|
|
11
11
|
>
|
|
12
12
|
<div class="v-select__slot">
|
|
13
|
-
<label for="input-
|
|
13
|
+
<label for="input-15"
|
|
14
14
|
class="v-label theme--light"
|
|
15
15
|
>
|
|
16
16
|
Some label
|
|
17
17
|
</label>
|
|
18
18
|
<div class="v-select__selections">
|
|
19
|
-
<input id="input-
|
|
19
|
+
<input id="input-15"
|
|
20
20
|
readonly="readonly"
|
|
21
21
|
type="text"
|
|
22
22
|
>
|
|
@@ -54,17 +54,17 @@ exports[`VOverflowBtn.js should show label with persistentPlaceholder property s
|
|
|
54
54
|
<div role="combobox"
|
|
55
55
|
aria-haspopup="listbox"
|
|
56
56
|
aria-expanded="true"
|
|
57
|
-
aria-owns="list-
|
|
57
|
+
aria-owns="list-15"
|
|
58
58
|
class="v-input__slot"
|
|
59
59
|
>
|
|
60
60
|
<div class="v-select__slot">
|
|
61
|
-
<label for="input-
|
|
61
|
+
<label for="input-15"
|
|
62
62
|
class="v-label theme--light"
|
|
63
63
|
>
|
|
64
64
|
Some label
|
|
65
65
|
</label>
|
|
66
66
|
<div class="v-select__selections">
|
|
67
|
-
<input id="input-
|
|
67
|
+
<input id="input-15"
|
|
68
68
|
readonly="readonly"
|
|
69
69
|
type="text"
|
|
70
70
|
>
|
|
@@ -145,7 +145,7 @@ exports[`VOverflowBtn.js should use default autocomplete selections 1`] = `
|
|
|
145
145
|
`;
|
|
146
146
|
|
|
147
147
|
exports[`VOverflowBtn.js should use default autocomplete selections 2`] = `
|
|
148
|
-
<div class="v-input v-input--is-label-active v-input--is-dirty theme--light v-text-field v-text-field--single-line v-select v-
|
|
148
|
+
<div class="v-input v-input--is-label-active v-input--is-dirty theme--light v-text-field v-text-field--single-line v-select v-autocomplete v-overflow-btn v-overflow-btn--segmented">
|
|
149
149
|
<div class="v-input__control">
|
|
150
150
|
<div role="combobox"
|
|
151
151
|
aria-haspopup="listbox"
|
|
@@ -155,9 +155,13 @@ exports[`VOverflowBtn.js should use default autocomplete selections 2`] = `
|
|
|
155
155
|
>
|
|
156
156
|
<div class="v-select__slot">
|
|
157
157
|
<div class="v-select__selections">
|
|
158
|
-
<
|
|
159
|
-
|
|
160
|
-
|
|
158
|
+
<button type="button"
|
|
159
|
+
class="v-btn v-btn--text theme--light v-size--default"
|
|
160
|
+
>
|
|
161
|
+
<span class="v-btn__content">
|
|
162
|
+
foo
|
|
163
|
+
</span>
|
|
164
|
+
</button>
|
|
161
165
|
<input id="input-1"
|
|
162
166
|
readonly="readonly"
|
|
163
167
|
type="text"
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
Wrapper,
|
|
6
6
|
} from '@vue/test-utils'
|
|
7
7
|
|
|
8
|
-
describe('VRangeSlider
|
|
8
|
+
describe('VRangeSlider', () => {
|
|
9
9
|
type Instance = InstanceType<typeof VRangeSlider>
|
|
10
10
|
let mountFunction: (options?: MountOptions<Instance>) => Wrapper<Instance>
|
|
11
11
|
|
|
@@ -33,7 +33,7 @@ describe('VRangeSlider.ts', () => {
|
|
|
33
33
|
document.body.removeChild(el)
|
|
34
34
|
})
|
|
35
35
|
|
|
36
|
-
it('should provide a default value if
|
|
36
|
+
it('should provide a default value if none provided', async () => {
|
|
37
37
|
const wrapper = mountFunction()
|
|
38
38
|
|
|
39
39
|
expect(wrapper.vm.lazyValue).toEqual([0, 0])
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`VRangeSlider
|
|
3
|
+
exports[`VRangeSlider should render a vertical slider 1`] = `
|
|
4
4
|
<div class="v-input v-input--is-label-active v-input--is-dirty theme--light v-input__slider v-input__slider--vertical v-input--range-slider">
|
|
5
5
|
<div class="v-input__control">
|
|
6
6
|
<div class="v-input__slot">
|
|
@@ -64,7 +64,7 @@ exports[`VRangeSlider.ts should render a vertical slider 1`] = `
|
|
|
64
64
|
</div>
|
|
65
65
|
`;
|
|
66
66
|
|
|
67
|
-
exports[`VRangeSlider
|
|
67
|
+
exports[`VRangeSlider should render disabled slider 1`] = `
|
|
68
68
|
<div class="v-input v-input--is-label-active v-input--is-dirty v-input--is-disabled theme--light v-input__slider v-input--range-slider">
|
|
69
69
|
<div class="v-input__control">
|
|
70
70
|
<div class="v-input__slot">
|
|
@@ -221,16 +221,10 @@ export default mixins<options &
|
|
|
221
221
|
handler (v: number) {
|
|
222
222
|
this.internalValue = v
|
|
223
223
|
},
|
|
224
|
+
immediate: true,
|
|
224
225
|
},
|
|
225
226
|
},
|
|
226
227
|
|
|
227
|
-
// If done in as immediate in
|
|
228
|
-
// value watcher, causes issues
|
|
229
|
-
// with vue-test-utils
|
|
230
|
-
beforeMount () {
|
|
231
|
-
this.internalValue = this.value
|
|
232
|
-
},
|
|
233
|
-
|
|
234
228
|
mounted () {
|
|
235
229
|
// Without a v-app, iOS does not work with body selectors
|
|
236
230
|
this.app = document.querySelector('[data-app]') ||
|
|
@@ -559,7 +559,7 @@ describe('VSlider.ts', () => {
|
|
|
559
559
|
|
|
560
560
|
it('should set value to min value if given a NaN value', () => {
|
|
561
561
|
const input = jest.fn()
|
|
562
|
-
|
|
562
|
+
mountFunction({
|
|
563
563
|
propsData: {
|
|
564
564
|
min: -20,
|
|
565
565
|
max: 20,
|
|
@@ -570,7 +570,8 @@ describe('VSlider.ts', () => {
|
|
|
570
570
|
},
|
|
571
571
|
})
|
|
572
572
|
|
|
573
|
-
expect(
|
|
573
|
+
expect(input).toHaveBeenCalledTimes(1)
|
|
574
|
+
expect(input).toHaveBeenCalledWith(-20)
|
|
574
575
|
})
|
|
575
576
|
|
|
576
577
|
it('should correctly handle initial value of zero (#7320)', () => {
|
package/src/globals.d.ts
CHANGED
|
@@ -105,8 +105,8 @@ declare module 'vue/types/options' {
|
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
declare module 'vue/types/vue' {
|
|
108
|
-
export type OptionsVue<Instance extends Vue, Data, Methods, Computed, Props, Options = {}> = VueConstructor<
|
|
109
|
-
CombinedVueInstance<Instance, Data, Methods, Computed, Props> & Vue,
|
|
108
|
+
export type OptionsVue<Instance extends Vue, Data, Methods, Computed, Props, SetupBindings, Options = {}> = VueConstructor<
|
|
109
|
+
CombinedVueInstance<Instance, Data, Methods, Computed, Props, SetupBindings> & Vue,
|
|
110
110
|
Options
|
|
111
111
|
>
|
|
112
112
|
|
|
@@ -154,10 +154,10 @@ declare module 'vue/types/vue' {
|
|
|
154
154
|
$_vuetify_installed?: true
|
|
155
155
|
options: Options
|
|
156
156
|
|
|
157
|
-
extend<Data, Methods, Computed, Options, PropNames extends string = never> (options?: ThisTypedComponentOptionsWithArrayProps<V, Data, Methods, Computed, PropNames> & Options): OptionsVue<V, Data, Methods, Computed, Record<PropNames, any>, Options>
|
|
158
|
-
extend<Data, Methods, Computed, Props, Options> (options?: ThisTypedComponentOptionsWithRecordProps<V, Data, Methods, Computed, Props> & Options): OptionsVue<V, Data, Methods, Computed, Props, Options>
|
|
159
|
-
extend<Options, PropNames extends string = never> (definition: FunctionalComponentOptions<Record<PropNames, any>, PropNames[]> & Options): OptionsVue<V, {}, {}, {}, Record<PropNames, any>, Options>
|
|
157
|
+
extend<Data, Methods, Computed, Options, SetupBindings, PropNames extends string = never> (options?: ThisTypedComponentOptionsWithArrayProps<V, Data, Methods, Computed, PropNames, SetupBindings> & Options): OptionsVue<V, Data, Methods, Computed, Record<PropNames, any>, SetupBindings, Options>
|
|
158
|
+
extend<Data, Methods, Computed, Props, Options, SetupBindings> (options?: ThisTypedComponentOptionsWithRecordProps<V, Data, Methods, Computed, Props, SetupBindings> & Options): OptionsVue<V, Data, Methods, Computed, Props, SetupBindings, Options>
|
|
159
|
+
extend<Options, SetupBindings, PropNames extends string = never> (definition: FunctionalComponentOptions<Record<PropNames, any>, PropNames[]> & Options): OptionsVue<V, {}, {}, {}, Record<PropNames, any>, SetupBindings, Options>
|
|
160
160
|
extend<Props, Options> (definition: FunctionalComponentOptions<Props, RecordPropsDefinition<Props>> & Options): OptionsVue<V, {}, {}, {}, Props, Options>
|
|
161
|
-
extend<V extends Vue = Vue> (options?: ComponentOptions<V> & Options): OptionsVue<V, {}, {}, {}, {}, Options>
|
|
161
|
+
extend<V extends Vue = Vue> (options?: ComponentOptions<V> & Options): OptionsVue<V, {}, {}, {}, {}, {}, Options>
|
|
162
162
|
}
|
|
163
163
|
}
|
|
@@ -68,7 +68,7 @@ describe('applicationable.js', () => {
|
|
|
68
68
|
mixins: [Applicationable(null, ['foo', 'bar'])],
|
|
69
69
|
})
|
|
70
70
|
|
|
71
|
-
expect(wrapper.vm.
|
|
71
|
+
expect(wrapper.vm._scope.effects).toHaveLength(6)
|
|
72
72
|
})
|
|
73
73
|
|
|
74
74
|
it('should call to remove application on destroy', async () => {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import Vue
|
|
1
|
+
import Vue from 'vue'
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* This mixin provides `attrs$` and `listeners$` to work around
|
|
5
5
|
* vue bug https://github.com/vuejs/vue/issues/10115
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
function makeWatcher (property: string): ThisType<Vue> &
|
|
8
|
+
function makeWatcher (property: string): ThisType<Vue> & ((val: any, oldVal: any) => void) {
|
|
9
9
|
return function (this: Vue, val, oldVal) {
|
|
10
10
|
for (const attr in oldVal) {
|
|
11
11
|
if (!Object.prototype.hasOwnProperty.call(val, attr)) {
|
|
@@ -128,8 +128,8 @@ export default Vue.extend<Vue & Toggleable & Stackable & options>().extend({
|
|
|
128
128
|
|
|
129
129
|
showScroll && this.showScroll()
|
|
130
130
|
},
|
|
131
|
-
scrollListener (e: WheelEvent
|
|
132
|
-
if (
|
|
131
|
+
scrollListener (e: WheelEvent | KeyboardEvent) {
|
|
132
|
+
if ('key' in e) {
|
|
133
133
|
if (
|
|
134
134
|
['INPUT', 'TEXTAREA', 'SELECT'].includes((e.target as Element).tagName) ||
|
|
135
135
|
// https://github.com/vuetifyjs/vuetify/issues/4715
|
|
@@ -150,7 +150,7 @@ export default Vue.extend<Vue & Toggleable & Stackable & options>().extend({
|
|
|
150
150
|
|
|
151
151
|
if (e.target === this.overlay ||
|
|
152
152
|
(e.type !== 'keydown' && e.target === document.body) ||
|
|
153
|
-
this.checkPath(e)) e.preventDefault()
|
|
153
|
+
this.checkPath(e as WheelEvent)) e.preventDefault()
|
|
154
154
|
},
|
|
155
155
|
hasScrollbar (el?: Element) {
|
|
156
156
|
if (!el || el.nodeType !== Node.ELEMENT_NODE) return false
|
|
@@ -224,14 +224,14 @@ export default Vue.extend<Vue & Toggleable & Stackable & options>().extend({
|
|
|
224
224
|
if (this.$vuetify.breakpoint.smAndDown) {
|
|
225
225
|
document.documentElement!.classList.add('overflow-y-hidden')
|
|
226
226
|
} else {
|
|
227
|
-
addPassiveEventListener(window, 'wheel', this.scrollListener
|
|
228
|
-
window.addEventListener('keydown', this.scrollListener
|
|
227
|
+
addPassiveEventListener(window, 'wheel', this.scrollListener, { passive: false })
|
|
228
|
+
window.addEventListener('keydown', this.scrollListener)
|
|
229
229
|
}
|
|
230
230
|
},
|
|
231
231
|
showScroll () {
|
|
232
232
|
document.documentElement!.classList.remove('overflow-y-hidden')
|
|
233
|
-
window.removeEventListener('wheel', this.scrollListener
|
|
234
|
-
window.removeEventListener('keydown', this.scrollListener
|
|
233
|
+
window.removeEventListener('wheel', this.scrollListener)
|
|
234
|
+
window.removeEventListener('keydown', this.scrollListener)
|
|
235
235
|
},
|
|
236
236
|
},
|
|
237
237
|
})
|
package/src/util/helpers.ts
CHANGED
|
@@ -59,7 +59,7 @@ try {
|
|
|
59
59
|
get: () => {
|
|
60
60
|
passiveSupported = true
|
|
61
61
|
},
|
|
62
|
-
})
|
|
62
|
+
}) as EventListener & EventListenerOptions
|
|
63
63
|
|
|
64
64
|
window.addEventListener('testListener', testListenerOpts, testListenerOpts)
|
|
65
65
|
window.removeEventListener('testListener', testListenerOpts, testListenerOpts)
|
|
@@ -70,7 +70,7 @@ export { passiveSupported }
|
|
|
70
70
|
export function addPassiveEventListener (
|
|
71
71
|
el: EventTarget,
|
|
72
72
|
event: string,
|
|
73
|
-
cb:
|
|
73
|
+
cb: (event: any) => void,
|
|
74
74
|
options: {}
|
|
75
75
|
): void {
|
|
76
76
|
el.addEventListener(event, cb, passiveSupported ? options : false)
|
package/es5/util/component.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/util/component.ts"],"names":[],"mappings":";;;;;;;AAkBc,SAAU,SAAV,CAAwB,OAAxB,EAAkC;AAC9C,SAAO,OAAP;AACD","sourcesContent":["/* eslint-disable max-len, import/export */\nimport {\n ComponentOptions,\n RecordPropsDefinition,\n ThisTypedComponentOptionsWithArrayProps,\n ThisTypedComponentOptionsWithRecordProps,\n} from 'vue/types/options'\nimport { Vue } from 'vue/types/vue'\nimport { FunctionalComponentOptions } from 'vue'\n\ntype V = Vue\n\n// Maybe don't actually use this, it doesn't work very well\nexport default function component<Data, Methods, Computed, PropNames extends string = never> (options?: ThisTypedComponentOptionsWithArrayProps<V, Data, Methods, Computed, PropNames>): ThisTypedComponentOptionsWithArrayProps<V, Data, Methods, Computed, PropNames>\nexport default function component<Data, Methods, Computed, Props> (options?: ThisTypedComponentOptionsWithRecordProps<V, Data, Methods, Computed, Props>): ThisTypedComponentOptionsWithRecordProps<V, Data, Methods, Computed, Props>\nexport default function component<PropNames extends string = never> (definition: FunctionalComponentOptions<Record<PropNames, any>, PropNames[]>): FunctionalComponentOptions<Record<PropNames, any>, PropNames[]>\nexport default function component<Props> (definition: FunctionalComponentOptions<Props, RecordPropsDefinition<Props>>): FunctionalComponentOptions<Props, RecordPropsDefinition<Props>>\nexport default function component (options?: ComponentOptions<V>): ComponentOptions<V>\nexport default function component<T> (options: T): T {\n return options\n}\n"],"sourceRoot":"","file":"component.js"}
|
package/lib/util/component.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/util/component.ts"],"names":[],"mappings":"AAkBA,eAAc,SAAU,SAAV,CAAwB,OAAxB,EAAkC;AAC9C,SAAO,OAAP;AACD","sourcesContent":["/* eslint-disable max-len, import/export */\nimport {\n ComponentOptions,\n RecordPropsDefinition,\n ThisTypedComponentOptionsWithArrayProps,\n ThisTypedComponentOptionsWithRecordProps,\n} from 'vue/types/options'\nimport { Vue } from 'vue/types/vue'\nimport { FunctionalComponentOptions } from 'vue'\n\ntype V = Vue\n\n// Maybe don't actually use this, it doesn't work very well\nexport default function component<Data, Methods, Computed, PropNames extends string = never> (options?: ThisTypedComponentOptionsWithArrayProps<V, Data, Methods, Computed, PropNames>): ThisTypedComponentOptionsWithArrayProps<V, Data, Methods, Computed, PropNames>\nexport default function component<Data, Methods, Computed, Props> (options?: ThisTypedComponentOptionsWithRecordProps<V, Data, Methods, Computed, Props>): ThisTypedComponentOptionsWithRecordProps<V, Data, Methods, Computed, Props>\nexport default function component<PropNames extends string = never> (definition: FunctionalComponentOptions<Record<PropNames, any>, PropNames[]>): FunctionalComponentOptions<Record<PropNames, any>, PropNames[]>\nexport default function component<Props> (definition: FunctionalComponentOptions<Props, RecordPropsDefinition<Props>>): FunctionalComponentOptions<Props, RecordPropsDefinition<Props>>\nexport default function component (options?: ComponentOptions<V>): ComponentOptions<V>\nexport default function component<T> (options: T): T {\n return options\n}\n"],"sourceRoot":"","file":"component.js"}
|
package/src/util/component.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/* eslint-disable max-len, import/export */
|
|
2
|
-
import {
|
|
3
|
-
ComponentOptions,
|
|
4
|
-
RecordPropsDefinition,
|
|
5
|
-
ThisTypedComponentOptionsWithArrayProps,
|
|
6
|
-
ThisTypedComponentOptionsWithRecordProps,
|
|
7
|
-
} from 'vue/types/options'
|
|
8
|
-
import { Vue } from 'vue/types/vue'
|
|
9
|
-
import { FunctionalComponentOptions } from 'vue'
|
|
10
|
-
|
|
11
|
-
type V = Vue
|
|
12
|
-
|
|
13
|
-
// Maybe don't actually use this, it doesn't work very well
|
|
14
|
-
export default function component<Data, Methods, Computed, PropNames extends string = never> (options?: ThisTypedComponentOptionsWithArrayProps<V, Data, Methods, Computed, PropNames>): ThisTypedComponentOptionsWithArrayProps<V, Data, Methods, Computed, PropNames>
|
|
15
|
-
export default function component<Data, Methods, Computed, Props> (options?: ThisTypedComponentOptionsWithRecordProps<V, Data, Methods, Computed, Props>): ThisTypedComponentOptionsWithRecordProps<V, Data, Methods, Computed, Props>
|
|
16
|
-
export default function component<PropNames extends string = never> (definition: FunctionalComponentOptions<Record<PropNames, any>, PropNames[]>): FunctionalComponentOptions<Record<PropNames, any>, PropNames[]>
|
|
17
|
-
export default function component<Props> (definition: FunctionalComponentOptions<Props, RecordPropsDefinition<Props>>): FunctionalComponentOptions<Props, RecordPropsDefinition<Props>>
|
|
18
|
-
export default function component (options?: ComponentOptions<V>): ComponentOptions<V>
|
|
19
|
-
export default function component<T> (options: T): T {
|
|
20
|
-
return options
|
|
21
|
-
}
|