@dimailn/vuetify 2.7.2-alpha28 → 2.7.2-alpha29
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 +1416 -304
- 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 +38 -8
- package/es5/components/VAlert/VAlert.js.map +1 -1
- package/es5/components/VAutocomplete/VAutocomplete.js +1 -0
- package/es5/components/VAutocomplete/VAutocomplete.js.map +1 -1
- package/es5/components/VBadge/VBadge.js +28 -0
- package/es5/components/VBadge/VBadge.js.map +1 -1
- package/es5/components/VBanner/VBanner.js +34 -6
- package/es5/components/VBanner/VBanner.js.map +1 -1
- package/es5/components/VBottomNavigation/VBottomNavigation.js +25 -0
- package/es5/components/VBottomNavigation/VBottomNavigation.js.map +1 -1
- package/es5/components/VCarousel/VCarousel.js +28 -3
- package/es5/components/VCarousel/VCarousel.js.map +1 -1
- package/es5/components/VCheckbox/VSimpleCheckbox.js +30 -2
- package/es5/components/VCheckbox/VSimpleCheckbox.js.map +1 -1
- package/es5/components/VColorPicker/VColorPicker.js +30 -2
- package/es5/components/VColorPicker/VColorPicker.js.map +1 -1
- package/es5/components/VCombobox/VCombobox.js +1 -0
- package/es5/components/VCombobox/VCombobox.js.map +1 -1
- package/es5/components/VDataIterator/VDataFooter.js +16 -7
- package/es5/components/VDataIterator/VDataFooter.js.map +1 -1
- package/es5/components/VDataIterator/VDataIterator.js +42 -47
- 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 +10 -18
- package/es5/components/VDataTable/VDataTable.js.map +1 -1
- package/es5/components/VDataTable/VDataTableHeader.js.map +1 -1
- package/es5/components/VDataTable/VDataTableHeaderDesktop.js +3 -0
- package/es5/components/VDataTable/VDataTableHeaderDesktop.js.map +1 -1
- package/es5/components/VDataTable/VDataTableHeaderMobile.js +28 -37
- package/es5/components/VDataTable/VDataTableHeaderMobile.js.map +1 -1
- package/es5/components/VDataTable/VEditDialog.js +3 -4
- 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 +5 -5
- package/es5/components/VDataTable/VVirtualTable.js.map +1 -1
- package/es5/components/VDataTable/mixins/header.js +1 -1
- package/es5/components/VDataTable/mixins/header.js.map +1 -1
- package/es5/components/VDatePicker/VDatePicker.js +21 -9
- package/es5/components/VDatePicker/VDatePicker.js.map +1 -1
- package/es5/components/VDatePicker/VDatePickerHeader.js +24 -8
- package/es5/components/VDatePicker/VDatePickerHeader.js.map +1 -1
- package/es5/components/VDatePicker/VDatePickerTitle.js +33 -8
- package/es5/components/VDatePicker/VDatePickerTitle.js.map +1 -1
- package/es5/components/VDatePicker/VDatePickerYears.js +38 -13
- package/es5/components/VDatePicker/VDatePickerYears.js.map +1 -1
- package/es5/components/VDatePicker/mixins/date-picker-table.js +33 -17
- package/es5/components/VDatePicker/mixins/date-picker-table.js.map +1 -1
- package/es5/components/VInput/VInput.js +36 -8
- package/es5/components/VInput/VInput.js.map +1 -1
- package/es5/components/VList/VListGroup.js +47 -21
- package/es5/components/VList/VListGroup.js.map +1 -1
- package/es5/components/VList/VListItem.js +29 -4
- package/es5/components/VList/VListItem.js.map +1 -1
- package/es5/components/VMenu/VMenu.js +55 -30
- package/es5/components/VMenu/VMenu.js.map +1 -1
- package/es5/components/VMessages/VMessages.js +30 -7
- package/es5/components/VMessages/VMessages.js.map +1 -1
- package/es5/components/VNavigationDrawer/VNavigationDrawer.js +36 -9
- package/es5/components/VNavigationDrawer/VNavigationDrawer.js.map +1 -1
- package/es5/components/VOverlay/VOverlay.js +28 -0
- package/es5/components/VOverlay/VOverlay.js.map +1 -1
- package/es5/components/VPagination/VPagination.js +30 -6
- package/es5/components/VPagination/VPagination.js.map +1 -1
- package/es5/components/VProgressLinear/VProgressLinear.js +28 -0
- package/es5/components/VProgressLinear/VProgressLinear.js.map +1 -1
- package/es5/components/VRadioGroup/VRadioGroup.js +28 -0
- package/es5/components/VRadioGroup/VRadioGroup.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 +112 -84
- package/es5/components/VSelect/VSelect.js.map +1 -1
- package/es5/components/VSelect/VSelectList.js +58 -17
- package/es5/components/VSelect/VSelectList.js.map +1 -1
- package/es5/components/VSlider/VSlider.js +42 -16
- package/es5/components/VSlider/VSlider.js.map +1 -1
- package/es5/components/VSpeedDial/VSpeedDial.js +10 -8
- package/es5/components/VSpeedDial/VSpeedDial.js.map +1 -1
- package/es5/components/VTabs/VTabs.js +45 -17
- package/es5/components/VTabs/VTabs.js.map +1 -1
- package/es5/framework.js +1 -1
- package/es5/mixins/validatable/index.js +24 -0
- package/es5/mixins/validatable/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 +5 -1
- package/es5/util/helpers.js.map +1 -1
- package/lib/components/VAlert/VAlert.js +12 -6
- package/lib/components/VAlert/VAlert.js.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.js +1 -0
- package/lib/components/VAutocomplete/VAutocomplete.js.map +1 -1
- package/lib/components/VBadge/VBadge.js +11 -0
- package/lib/components/VBadge/VBadge.js.map +1 -1
- package/lib/components/VBanner/VBanner.js +11 -0
- package/lib/components/VBanner/VBanner.js.map +1 -1
- package/lib/components/VBottomNavigation/VBottomNavigation.js +7 -0
- package/lib/components/VBottomNavigation/VBottomNavigation.js.map +1 -1
- package/lib/components/VCarousel/VCarousel.js +7 -0
- package/lib/components/VCarousel/VCarousel.js.map +1 -1
- package/lib/components/VCheckbox/VSimpleCheckbox.js +11 -0
- package/lib/components/VCheckbox/VSimpleCheckbox.js.map +1 -1
- package/lib/components/VColorPicker/VColorPicker.js +12 -1
- package/lib/components/VColorPicker/VColorPicker.js.map +1 -1
- package/lib/components/VCombobox/VCombobox.js +1 -0
- package/lib/components/VCombobox/VCombobox.js.map +1 -1
- package/lib/components/VDataIterator/VDataFooter.js +14 -7
- package/lib/components/VDataIterator/VDataFooter.js.map +1 -1
- package/lib/components/VDataIterator/VDataIterator.js +26 -31
- 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 +8 -15
- package/lib/components/VDataTable/VDataTable.js.map +1 -1
- package/lib/components/VDataTable/VDataTableHeader.js +1 -1
- package/lib/components/VDataTable/VDataTableHeader.js.map +1 -1
- package/lib/components/VDataTable/VDataTableHeaderDesktop.js +3 -0
- package/lib/components/VDataTable/VDataTableHeaderDesktop.js.map +1 -1
- package/lib/components/VDataTable/VDataTableHeaderMobile.js +17 -25
- package/lib/components/VDataTable/VDataTableHeaderMobile.js.map +1 -1
- package/lib/components/VDataTable/VEditDialog.js +3 -4
- 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 +1 -2
- package/lib/components/VDataTable/VVirtualTable.js.map +1 -1
- package/lib/components/VDataTable/mixins/header.js +1 -1
- package/lib/components/VDataTable/mixins/header.js.map +1 -1
- package/lib/components/VDatePicker/VDatePicker.js +7 -1
- package/lib/components/VDatePicker/VDatePicker.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerHeader.js +12 -1
- package/lib/components/VDatePicker/VDatePickerHeader.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerTitle.js +11 -0
- package/lib/components/VDatePicker/VDatePickerTitle.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerYears.js +11 -1
- package/lib/components/VDatePicker/VDatePickerYears.js.map +1 -1
- package/lib/components/VDatePicker/mixins/date-picker-table.js +12 -1
- package/lib/components/VDatePicker/mixins/date-picker-table.js.map +1 -1
- package/lib/components/VInput/VInput.js +13 -3
- package/lib/components/VInput/VInput.js.map +1 -1
- package/lib/components/VList/VListGroup.js +16 -8
- package/lib/components/VList/VListGroup.js.map +1 -1
- package/lib/components/VList/VListItem.js +8 -1
- package/lib/components/VList/VListItem.js.map +1 -1
- package/lib/components/VMenu/VMenu.js +14 -3
- 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 +11 -2
- package/lib/components/VNavigationDrawer/VNavigationDrawer.js.map +1 -1
- package/lib/components/VOverlay/VOverlay.js +11 -0
- package/lib/components/VOverlay/VOverlay.js.map +1 -1
- package/lib/components/VPagination/VPagination.js +11 -0
- package/lib/components/VPagination/VPagination.js.map +1 -1
- package/lib/components/VProgressLinear/VProgressLinear.js +11 -0
- package/lib/components/VProgressLinear/VProgressLinear.js.map +1 -1
- package/lib/components/VRadioGroup/VRadioGroup.js +11 -0
- package/lib/components/VRadioGroup/VRadioGroup.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 +52 -36
- package/lib/components/VSelect/VSelect.js.map +1 -1
- package/lib/components/VSelect/VSelectList.js +21 -3
- package/lib/components/VSelect/VSelectList.js.map +1 -1
- package/lib/components/VSlider/VSlider.js +11 -1
- package/lib/components/VSlider/VSlider.js.map +1 -1
- package/lib/components/VSpeedDial/VSpeedDial.js +7 -7
- package/lib/components/VSpeedDial/VSpeedDial.js.map +1 -1
- package/lib/components/VTabs/VTabs.js +11 -0
- package/lib/components/VTabs/VTabs.js.map +1 -1
- package/lib/framework.js +1 -1
- package/lib/mixins/validatable/index.js +7 -1
- package/lib/mixins/validatable/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 +5 -1
- package/lib/util/helpers.js.map +1 -1
- package/package.json +1 -1
- package/src/components/VAlert/VAlert.ts +17 -7
- 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/VAutocomplete/VAutocomplete.ts +22 -0
- 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/VBadge/VBadge.ts +13 -0
- package/src/components/VBanner/VBanner.ts +13 -0
- package/src/components/VBottomNavigation/VBottomNavigation.ts +10 -0
- package/src/components/VCarousel/VCarousel.ts +11 -0
- package/src/components/VCheckbox/VSimpleCheckbox.ts +13 -0
- package/src/components/VColorPicker/VColorPicker.ts +13 -0
- 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/VDataIterator/VDataFooter.ts +14 -9
- package/src/components/VDataIterator/VDataIterator.ts +46 -34
- 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 +8 -15
- package/src/components/VDataTable/VDataTableHeader.ts +2 -2
- package/src/components/VDataTable/VDataTableHeaderDesktop.ts +4 -0
- package/src/components/VDataTable/VDataTableHeaderMobile.ts +16 -25
- package/src/components/VDataTable/VEditDialog.ts +3 -3
- package/src/components/VDataTable/VSimpleTable.ts +2 -3
- package/src/components/VDataTable/VVirtualTable.ts +1 -2
- package/src/components/VDataTable/__tests__/VDataTable.spec.ts +18 -22
- package/src/components/VDataTable/__tests__/VDataTableHeader.spec.ts +39 -29
- package/src/components/VDataTable/__tests__/VEditDialog.spec.ts +7 -2
- package/src/components/VDataTable/__tests__/VSimpleTable.spec.ts +11 -16
- 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 +4 -12
- package/src/components/VDataTable/__tests__/__snapshots__/VSimpleTable.spec.ts.snap +22 -18
- package/src/components/VDataTable/mixins/__tests__/__snapshots__/header.spec.ts.snap +9 -12
- package/src/components/VDataTable/mixins/__tests__/header.spec.ts +15 -15
- package/src/components/VDataTable/mixins/header.ts +1 -1
- package/src/components/VDatePicker/VDatePicker.ts +11 -1
- package/src/components/VDatePicker/VDatePickerHeader.ts +13 -0
- package/src/components/VDatePicker/VDatePickerTitle.ts +12 -0
- package/src/components/VDatePicker/VDatePickerYears.ts +13 -0
- package/src/components/VDatePicker/mixins/date-picker-table.ts +13 -0
- package/src/components/VInput/VInput.ts +18 -5
- package/src/components/VList/VListGroup.ts +22 -10
- package/src/components/VList/VListItem.ts +10 -1
- package/src/components/VMenu/VMenu.ts +21 -3
- 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 +43 -5
- package/src/components/VMessages/__tests__/__snapshots__/VMessages.spec.ts.snap +16 -25
- package/src/components/VNavigationDrawer/VNavigationDrawer.ts +21 -11
- package/src/components/VOverlay/VOverlay.ts +12 -0
- package/src/components/VPagination/VPagination.ts +23 -9
- package/src/components/VProgressLinear/VProgressLinear.ts +13 -0
- package/src/components/VRadioGroup/VRadioGroup.ts +14 -0
- package/src/components/VRating/VRating.ts +13 -0
- package/src/components/VSelect/VSelect.ts +60 -43
- package/src/components/VSelect/VSelectList.ts +29 -8
- package/src/components/VSlider/VSlider.ts +14 -1
- package/src/components/VSpeedDial/VSpeedDial.ts +7 -8
- 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/VTabs/VTabs.ts +14 -0
- package/src/mixins/validatable/index.ts +11 -1
- package/src/util/__tests__/console.spec.ts +124 -11
- package/src/util/__tests__/helpers.spec.ts +59 -31
- package/src/util/console.ts +43 -24
- package/src/util/helpers.ts +8 -4
|
@@ -39,13 +39,21 @@ var _vue = require("vue");
|
|
|
39
39
|
|
|
40
40
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
41
41
|
|
|
42
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(
|
|
42
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
43
|
+
|
|
44
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
45
|
+
|
|
46
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
47
|
+
|
|
48
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
43
49
|
|
|
44
50
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
45
51
|
|
|
46
52
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
47
53
|
|
|
48
|
-
function
|
|
54
|
+
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
55
|
+
|
|
56
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
49
57
|
|
|
50
58
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
51
59
|
|
|
@@ -76,6 +84,7 @@ var _default2 = baseMixins.extend({
|
|
|
76
84
|
type: null,
|
|
77
85
|
default: false
|
|
78
86
|
},
|
|
87
|
+
auto: Boolean,
|
|
79
88
|
cacheItems: Boolean,
|
|
80
89
|
chips: Boolean,
|
|
81
90
|
clearable: Boolean,
|
|
@@ -111,6 +120,7 @@ var _default2 = baseMixins.extend({
|
|
|
111
120
|
return defaultMenuProps;
|
|
112
121
|
}
|
|
113
122
|
},
|
|
123
|
+
minWidth: [String, Number],
|
|
114
124
|
multiple: Boolean,
|
|
115
125
|
openOnClear: Boolean,
|
|
116
126
|
returnObject: Boolean,
|
|
@@ -248,68 +258,54 @@ var _default2 = baseMixins.extend({
|
|
|
248
258
|
return _objectSpread(_objectSpread({}, defaultMenuProps), {}, {
|
|
249
259
|
eager: this.eager,
|
|
250
260
|
modelValue: this.menuCanShow && this.isMenuActive,
|
|
251
|
-
nudgeBottom: normalisedProps.offsetY ? 1 : 0
|
|
261
|
+
nudgeBottom: normalisedProps.offsetY ? 1 : 0,
|
|
262
|
+
auto: this.auto,
|
|
263
|
+
minWidth: this.minWidth
|
|
252
264
|
}, normalisedProps);
|
|
253
265
|
}
|
|
254
266
|
},
|
|
255
|
-
mounted: function mounted() {
|
|
256
|
-
var _this2 = this;
|
|
257
|
-
|
|
258
|
-
this.$nextTick(function () {
|
|
259
|
-
if (_this2.$el && _this2.$el.attributes) {
|
|
260
|
-
var attrs = _this2.$el.attributes;
|
|
261
|
-
|
|
262
|
-
for (var i = 0; i < attrs.length; i++) {
|
|
263
|
-
var attr = attrs[i];
|
|
264
|
-
|
|
265
|
-
if (attr.name.startsWith('data-v-')) {
|
|
266
|
-
_this2.detectedScopeId = attr.name; // scopeId найден и сохранен для использования в dropdown
|
|
267
|
-
|
|
268
|
-
break;
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
});
|
|
273
|
-
},
|
|
274
267
|
watch: {
|
|
275
|
-
internalValue:
|
|
276
|
-
|
|
268
|
+
internalValue: {
|
|
269
|
+
handler: function handler(val) {
|
|
270
|
+
var _this2 = this;
|
|
277
271
|
|
|
278
|
-
|
|
279
|
-
|
|
272
|
+
this.initialValue = val;
|
|
273
|
+
this.setSelectedItems();
|
|
280
274
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
275
|
+
if (this.multiple) {
|
|
276
|
+
this.$nextTick(function () {
|
|
277
|
+
var _a;
|
|
284
278
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
279
|
+
(_a = _this2.$refs.menu) === null || _a === void 0 ? void 0 : _a.updateDimensions();
|
|
280
|
+
});
|
|
281
|
+
}
|
|
288
282
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
283
|
+
if (this.hideSelected) {
|
|
284
|
+
this.$nextTick(function () {
|
|
285
|
+
_this2.onScroll();
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
deep: true
|
|
294
290
|
},
|
|
295
291
|
isMenuActive: function isMenuActive(val) {
|
|
296
|
-
var
|
|
292
|
+
var _this3 = this;
|
|
297
293
|
|
|
298
294
|
window.setTimeout(function () {
|
|
299
|
-
return
|
|
295
|
+
return _this3.onMenuActiveChange(val);
|
|
300
296
|
});
|
|
301
297
|
},
|
|
302
298
|
items: {
|
|
303
299
|
immediate: true,
|
|
304
300
|
handler: function handler(val) {
|
|
305
|
-
var
|
|
301
|
+
var _this4 = this;
|
|
306
302
|
|
|
307
303
|
if (this.cacheItems) {
|
|
308
304
|
// Breaks vue-test-utils if
|
|
309
305
|
// this isn't calculated
|
|
310
306
|
// on the next tick
|
|
311
307
|
this.$nextTick(function () {
|
|
312
|
-
|
|
308
|
+
_this4.cachedItems = _this4.filterDuplicates(_this4.cachedItems.concat(val));
|
|
313
309
|
});
|
|
314
310
|
}
|
|
315
311
|
|
|
@@ -317,6 +313,39 @@ var _default2 = baseMixins.extend({
|
|
|
317
313
|
}
|
|
318
314
|
}
|
|
319
315
|
},
|
|
316
|
+
created: function created() {
|
|
317
|
+
var _this5 = this;
|
|
318
|
+
|
|
319
|
+
var breakingProps = [['value', 'modelValue'], ['onInput', 'onUpdate:modelValue']];
|
|
320
|
+
/* istanbul ignore next */
|
|
321
|
+
|
|
322
|
+
breakingProps.forEach(function (_ref) {
|
|
323
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
324
|
+
original = _ref2[0],
|
|
325
|
+
replacement = _ref2[1];
|
|
326
|
+
|
|
327
|
+
if (_this5.$attrs.hasOwnProperty(original)) (0, _console.breaking)(original, replacement, _this5);
|
|
328
|
+
});
|
|
329
|
+
},
|
|
330
|
+
mounted: function mounted() {
|
|
331
|
+
var _this6 = this;
|
|
332
|
+
|
|
333
|
+
this.$nextTick(function () {
|
|
334
|
+
if (_this6.$el && _this6.$el.attributes) {
|
|
335
|
+
var attrs = _this6.$el.attributes;
|
|
336
|
+
|
|
337
|
+
for (var i = 0; i < attrs.length; i++) {
|
|
338
|
+
var attr = attrs[i];
|
|
339
|
+
|
|
340
|
+
if (attr.name.startsWith('data-v-')) {
|
|
341
|
+
_this6.detectedScopeId = attr.name; // scopeId найден и сохранен для использования в dropdown
|
|
342
|
+
|
|
343
|
+
break;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
});
|
|
348
|
+
},
|
|
320
349
|
methods: {
|
|
321
350
|
/** @public */
|
|
322
351
|
blur: function blur(e) {
|
|
@@ -334,12 +363,12 @@ var _default2 = baseMixins.extend({
|
|
|
334
363
|
this.isMenuActive = true;
|
|
335
364
|
},
|
|
336
365
|
clearableCallback: function clearableCallback() {
|
|
337
|
-
var
|
|
366
|
+
var _this7 = this;
|
|
338
367
|
|
|
339
368
|
this.setValue(this.multiple ? [] : null);
|
|
340
369
|
this.setMenuIndex(-1);
|
|
341
370
|
this.$nextTick(function () {
|
|
342
|
-
return
|
|
371
|
+
return _this7.$refs.input && _this7.$refs.input.focus();
|
|
343
372
|
});
|
|
344
373
|
if (this.openOnClear) this.isMenuActive = true;
|
|
345
374
|
},
|
|
@@ -374,18 +403,18 @@ var _default2 = baseMixins.extend({
|
|
|
374
403
|
return Array.from(uniqueValues.values());
|
|
375
404
|
},
|
|
376
405
|
findExistingIndex: function findExistingIndex(item) {
|
|
377
|
-
var
|
|
406
|
+
var _this8 = this;
|
|
378
407
|
|
|
379
408
|
var itemValue = this.getValue(item);
|
|
380
409
|
return (this.internalValue || []).findIndex(function (i) {
|
|
381
|
-
return
|
|
410
|
+
return _this8.valueComparator(_this8.getValue(i), itemValue);
|
|
382
411
|
});
|
|
383
412
|
},
|
|
384
413
|
getContent: function getContent() {
|
|
385
414
|
return this.$refs.menu && this.$refs.menu.$refs.content;
|
|
386
415
|
},
|
|
387
416
|
genChipSelection: function genChipSelection(item, index) {
|
|
388
|
-
var
|
|
417
|
+
var _this9 = this;
|
|
389
418
|
|
|
390
419
|
var isDisabled = this.isDisabled || this.getDisabled(item);
|
|
391
420
|
var isInteractive = !isDisabled && this.isInteractive;
|
|
@@ -399,14 +428,14 @@ var _default2 = baseMixins.extend({
|
|
|
399
428
|
onClick: function onClick(e) {
|
|
400
429
|
if (!isInteractive) return;
|
|
401
430
|
e.stopPropagation();
|
|
402
|
-
|
|
431
|
+
_this9.selectedIndex = index;
|
|
403
432
|
},
|
|
404
433
|
'onClick:close': function onClickClose() {
|
|
405
|
-
return
|
|
434
|
+
return _this9.onChipInput(item);
|
|
406
435
|
},
|
|
407
436
|
key: JSON.stringify(this.getValue(item))
|
|
408
437
|
}, function () {
|
|
409
|
-
return
|
|
438
|
+
return _this9.getText(item);
|
|
410
439
|
});
|
|
411
440
|
},
|
|
412
441
|
genCommaSelection: function genCommaSelection(item, index, last) {
|
|
@@ -473,14 +502,14 @@ var _default2 = baseMixins.extend({
|
|
|
473
502
|
return input;
|
|
474
503
|
},
|
|
475
504
|
genHiddenInput: function genHiddenInput() {
|
|
476
|
-
var
|
|
505
|
+
var _this10 = this;
|
|
477
506
|
|
|
478
507
|
var value = this.lazyValue;
|
|
479
508
|
|
|
480
509
|
if (this.multiple && Array.isArray(value)) {
|
|
481
510
|
value = value.map(function (item) {
|
|
482
511
|
if (_typeof(item) === 'object' && item !== null) {
|
|
483
|
-
return
|
|
512
|
+
return _this10.getValue(item);
|
|
484
513
|
}
|
|
485
514
|
|
|
486
515
|
return item;
|
|
@@ -515,12 +544,12 @@ var _default2 = baseMixins.extend({
|
|
|
515
544
|
}
|
|
516
545
|
},
|
|
517
546
|
genListWithSlot: function genListWithSlot() {
|
|
518
|
-
var
|
|
547
|
+
var _this11 = this;
|
|
519
548
|
|
|
520
549
|
var slots = Object.fromEntries(['prepend-item', 'no-data', 'append-item'].filter(function (slotName) {
|
|
521
|
-
return
|
|
550
|
+
return _this11.$slots[slotName];
|
|
522
551
|
}).map(function (slotName) {
|
|
523
|
-
return [slotName,
|
|
552
|
+
return [slotName, _this11.$slots[slotName]];
|
|
524
553
|
})); // Requires destructuring due to Vue
|
|
525
554
|
// modifying the `on` property when passed
|
|
526
555
|
// as a referenced object
|
|
@@ -530,7 +559,7 @@ var _default2 = baseMixins.extend({
|
|
|
530
559
|
}));
|
|
531
560
|
},
|
|
532
561
|
genMenu: function genMenu() {
|
|
533
|
-
var
|
|
562
|
+
var _this12 = this;
|
|
534
563
|
|
|
535
564
|
var props = this.$_menuProps;
|
|
536
565
|
props.activator = this.$refs['input-slot'];
|
|
@@ -548,14 +577,14 @@ var _default2 = baseMixins.extend({
|
|
|
548
577
|
return (0, _vue.h)(_VMenu.default, _objectSpread(_objectSpread({
|
|
549
578
|
role: undefined
|
|
550
579
|
}, props), {}, {
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
580
|
+
'onUpdate:modelValue': function onUpdateModelValue(val) {
|
|
581
|
+
_this12.isMenuActive = val;
|
|
582
|
+
_this12.isFocused = val;
|
|
554
583
|
},
|
|
555
584
|
onScroll: this.onScroll,
|
|
556
585
|
ref: 'menu'
|
|
557
586
|
}), function () {
|
|
558
|
-
return [
|
|
587
|
+
return [_this12.genList()];
|
|
559
588
|
});
|
|
560
589
|
},
|
|
561
590
|
genSelections: function genSelections() {
|
|
@@ -580,7 +609,7 @@ var _default2 = baseMixins.extend({
|
|
|
580
609
|
}, children);
|
|
581
610
|
},
|
|
582
611
|
genSlotSelection: function genSlotSelection(item, index) {
|
|
583
|
-
var
|
|
612
|
+
var _this13 = this;
|
|
584
613
|
|
|
585
614
|
return this.$slots.selection({
|
|
586
615
|
class: 'v-chip--select',
|
|
@@ -589,7 +618,7 @@ var _default2 = baseMixins.extend({
|
|
|
589
618
|
index: index,
|
|
590
619
|
select: function select(e) {
|
|
591
620
|
e.stopPropagation();
|
|
592
|
-
|
|
621
|
+
_this13.selectedIndex = index;
|
|
593
622
|
},
|
|
594
623
|
selected: index === this.selectedIndex,
|
|
595
624
|
disabled: !this.isInteractive
|
|
@@ -645,7 +674,7 @@ var _default2 = baseMixins.extend({
|
|
|
645
674
|
}
|
|
646
675
|
},
|
|
647
676
|
onKeyPress: function onKeyPress(e) {
|
|
648
|
-
var
|
|
677
|
+
var _this14 = this;
|
|
649
678
|
|
|
650
679
|
if (this.multiple || !this.isInteractive || this.disableLookup || e.key.length > 1 || e.ctrlKey || e.metaKey || e.altKey) return;
|
|
651
680
|
var KEYBOARD_LOOKUP_THRESHOLD = 1000; // milliseconds
|
|
@@ -661,8 +690,8 @@ var _default2 = baseMixins.extend({
|
|
|
661
690
|
var index = this.allItems.findIndex(function (item) {
|
|
662
691
|
var _a;
|
|
663
692
|
|
|
664
|
-
var text = ((_a =
|
|
665
|
-
return text.toLowerCase().startsWith(
|
|
693
|
+
var text = ((_a = _this14.getText(item)) !== null && _a !== void 0 ? _a : '').toString();
|
|
694
|
+
return text.toLowerCase().startsWith(_this14.keyboardLookupPrefix);
|
|
666
695
|
});
|
|
667
696
|
var item = this.allItems[index];
|
|
668
697
|
|
|
@@ -670,15 +699,15 @@ var _default2 = baseMixins.extend({
|
|
|
670
699
|
this.lastItem = Math.max(this.lastItem, index + 5);
|
|
671
700
|
this.setValue(this.returnObject ? item : this.getValue(item));
|
|
672
701
|
this.$nextTick(function () {
|
|
673
|
-
return
|
|
702
|
+
return _this14.$refs.menu.getTiles();
|
|
674
703
|
});
|
|
675
704
|
setTimeout(function () {
|
|
676
|
-
return
|
|
705
|
+
return _this14.setMenuIndex(index);
|
|
677
706
|
});
|
|
678
707
|
}
|
|
679
708
|
},
|
|
680
709
|
onKeyDown: function onKeyDown(e) {
|
|
681
|
-
var
|
|
710
|
+
var _this15 = this;
|
|
682
711
|
|
|
683
712
|
if (this.isReadonly && e.keyCode !== _helpers.keyCodes.tab) return;
|
|
684
713
|
var keyCode = e.keyCode;
|
|
@@ -691,7 +720,7 @@ var _default2 = baseMixins.extend({
|
|
|
691
720
|
this.$nextTick(function () {
|
|
692
721
|
menu.changeListIndex(e);
|
|
693
722
|
|
|
694
|
-
|
|
723
|
+
_this15.$emit('update:list-index', menu.listIndex);
|
|
695
724
|
});
|
|
696
725
|
} // If enter, space, open menu
|
|
697
726
|
|
|
@@ -727,7 +756,7 @@ var _default2 = baseMixins.extend({
|
|
|
727
756
|
}
|
|
728
757
|
},
|
|
729
758
|
onMouseUp: function onMouseUp(e) {
|
|
730
|
-
var
|
|
759
|
+
var _this16 = this;
|
|
731
760
|
|
|
732
761
|
// eslint-disable-next-line sonarjs/no-collapsible-if
|
|
733
762
|
if (this.hasMouseDown && e.which !== 3 && this.isInteractive) {
|
|
@@ -736,7 +765,7 @@ var _default2 = baseMixins.extend({
|
|
|
736
765
|
// or inside, toggle menu
|
|
737
766
|
if (this.isAppendInner(e.target)) {
|
|
738
767
|
this.$nextTick(function () {
|
|
739
|
-
return
|
|
768
|
+
return _this16.isMenuActive = !_this16.isMenuActive;
|
|
740
769
|
});
|
|
741
770
|
}
|
|
742
771
|
}
|
|
@@ -744,11 +773,11 @@ var _default2 = baseMixins.extend({
|
|
|
744
773
|
_VTextField2.default.methods.onMouseUp.call(this, e);
|
|
745
774
|
},
|
|
746
775
|
onScroll: function onScroll() {
|
|
747
|
-
var
|
|
776
|
+
var _this17 = this;
|
|
748
777
|
|
|
749
778
|
if (!this.isMenuActive) {
|
|
750
779
|
requestAnimationFrame(function () {
|
|
751
|
-
var content =
|
|
780
|
+
var content = _this17.getContent();
|
|
752
781
|
|
|
753
782
|
if (content) content.scrollTop = 0;
|
|
754
783
|
});
|
|
@@ -782,7 +811,7 @@ var _default2 = baseMixins.extend({
|
|
|
782
811
|
}
|
|
783
812
|
},
|
|
784
813
|
onUpDown: function onUpDown(e) {
|
|
785
|
-
var
|
|
814
|
+
var _this18 = this;
|
|
786
815
|
|
|
787
816
|
var menu = this.$refs.menu;
|
|
788
817
|
if (!menu) return;
|
|
@@ -797,7 +826,7 @@ var _default2 = baseMixins.extend({
|
|
|
797
826
|
menu.isBooted = true;
|
|
798
827
|
window.requestAnimationFrame(function () {
|
|
799
828
|
menu.getTiles();
|
|
800
|
-
if (!menu.hasClickableTiles) return
|
|
829
|
+
if (!menu.hasClickableTiles) return _this18.activateMenu();
|
|
801
830
|
|
|
802
831
|
switch (keyCode) {
|
|
803
832
|
case _helpers.keyCodes.up:
|
|
@@ -817,11 +846,11 @@ var _default2 = baseMixins.extend({
|
|
|
817
846
|
break;
|
|
818
847
|
}
|
|
819
848
|
|
|
820
|
-
|
|
849
|
+
_this18.selectItem(_this18.allItems[_this18.getMenuIndex()]);
|
|
821
850
|
});
|
|
822
851
|
},
|
|
823
852
|
selectItem: function selectItem(item) {
|
|
824
|
-
var
|
|
853
|
+
var _this19 = this;
|
|
825
854
|
|
|
826
855
|
if (!this.multiple) {
|
|
827
856
|
this.setValue(this.returnObject ? item : this.getValue(item));
|
|
@@ -831,7 +860,7 @@ var _default2 = baseMixins.extend({
|
|
|
831
860
|
var i = this.findExistingIndex(item);
|
|
832
861
|
i !== -1 ? internalValue.splice(i, 1) : internalValue.push(item);
|
|
833
862
|
this.setValue(internalValue.map(function (i) {
|
|
834
|
-
return
|
|
863
|
+
return _this19.returnObject ? i : _this19.getValue(i);
|
|
835
864
|
})); // There is no item to re-highlight
|
|
836
865
|
// when selections are hidden
|
|
837
866
|
|
|
@@ -842,10 +871,10 @@ var _default2 = baseMixins.extend({
|
|
|
842
871
|
|
|
843
872
|
if (~index) {
|
|
844
873
|
this.$nextTick(function () {
|
|
845
|
-
return
|
|
874
|
+
return _this19.$refs.menu.getTiles();
|
|
846
875
|
});
|
|
847
876
|
setTimeout(function () {
|
|
848
|
-
return
|
|
877
|
+
return _this19.setMenuIndex(index);
|
|
849
878
|
});
|
|
850
879
|
}
|
|
851
880
|
}
|
|
@@ -855,7 +884,7 @@ var _default2 = baseMixins.extend({
|
|
|
855
884
|
this.$refs.menu && (this.$refs.menu.listIndex = index);
|
|
856
885
|
},
|
|
857
886
|
setSelectedItems: function setSelectedItems() {
|
|
858
|
-
var
|
|
887
|
+
var _this20 = this;
|
|
859
888
|
|
|
860
889
|
var selectedItems = [];
|
|
861
890
|
var values = !this.multiple || !Array.isArray(this.internalValue) ? [this.internalValue] : this.internalValue;
|
|
@@ -867,12 +896,12 @@ var _default2 = baseMixins.extend({
|
|
|
867
896
|
var _loop = function _loop() {
|
|
868
897
|
var value = _step.value;
|
|
869
898
|
|
|
870
|
-
var index =
|
|
871
|
-
return
|
|
899
|
+
var index = _this20.allItems.findIndex(function (v) {
|
|
900
|
+
return _this20.valueComparator(_this20.getValue(v), _this20.getValue(value));
|
|
872
901
|
});
|
|
873
902
|
|
|
874
903
|
if (index > -1) {
|
|
875
|
-
selectedItems.push(
|
|
904
|
+
selectedItems.push(_this20.allItems[index]);
|
|
876
905
|
}
|
|
877
906
|
};
|
|
878
907
|
|
|
@@ -890,7 +919,6 @@ var _default2 = baseMixins.extend({
|
|
|
890
919
|
setValue: function setValue(value) {
|
|
891
920
|
if (!this.valueComparator(value, this.internalValue)) {
|
|
892
921
|
this.internalValue = value;
|
|
893
|
-
this.$emit('update:modelValue', value); // Note: change event is already emitted by VInput's internalValue setter
|
|
894
922
|
}
|
|
895
923
|
},
|
|
896
924
|
isAppendInner: function isAppendInner(target) {
|