vuetify 2.4.3 → 2.4.4

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.
Files changed (41) hide show
  1. package/dist/json/attributes.json +3 -3
  2. package/dist/json/web-types.json +8 -8
  3. package/dist/vuetify.css +2 -2
  4. package/dist/vuetify.css.map +1 -1
  5. package/dist/vuetify.js +87 -61
  6. package/dist/vuetify.js.map +1 -1
  7. package/dist/vuetify.min.css +2 -2
  8. package/dist/vuetify.min.js +2 -2
  9. package/es5/components/VDatePicker/VDatePicker.js +12 -38
  10. package/es5/components/VDatePicker/VDatePicker.js.map +1 -1
  11. package/es5/components/VDatePicker/mixins/date-picker-table.js +9 -1
  12. package/es5/components/VDatePicker/mixins/date-picker-table.js.map +1 -1
  13. package/es5/components/VDatePicker/util/index.js +8 -0
  14. package/es5/components/VDatePicker/util/index.js.map +1 -1
  15. package/es5/components/VDatePicker/util/sanitizeDateString.js +37 -0
  16. package/es5/components/VDatePicker/util/sanitizeDateString.js.map +1 -0
  17. package/es5/components/VPagination/VPagination.js +1 -0
  18. package/es5/components/VPagination/VPagination.js.map +1 -1
  19. package/es5/framework.js +1 -1
  20. package/lib/components/VDatePicker/VDatePicker.js +1 -12
  21. package/lib/components/VDatePicker/VDatePicker.js.map +1 -1
  22. package/lib/components/VDatePicker/mixins/date-picker-table.js +12 -2
  23. package/lib/components/VDatePicker/mixins/date-picker-table.js.map +1 -1
  24. package/lib/components/VDatePicker/util/index.js +2 -1
  25. package/lib/components/VDatePicker/util/index.js.map +1 -1
  26. package/lib/components/VDatePicker/util/sanitizeDateString.js +12 -0
  27. package/lib/components/VDatePicker/util/sanitizeDateString.js.map +1 -0
  28. package/lib/components/VPagination/VPagination.js +1 -0
  29. package/lib/components/VPagination/VPagination.js.map +1 -1
  30. package/lib/framework.js +1 -1
  31. package/package.json +2 -2
  32. package/src/components/VDatePicker/VDatePicker.ts +1 -7
  33. package/src/components/VDatePicker/__tests__/VDatePickerDateTable.spec.ts +32 -0
  34. package/src/components/VDatePicker/__tests__/VDatePickerMonthTable.spec.ts +32 -0
  35. package/src/components/VDatePicker/mixins/date-picker-table.ts +10 -2
  36. package/src/components/VDatePicker/util/__tests__/sanitizeDateString.spec.ts +10 -0
  37. package/src/components/VDatePicker/util/index.ts +2 -0
  38. package/src/components/VDatePicker/util/sanitizeDateString.ts +8 -0
  39. package/src/components/VPagination/VPagination.ts +1 -0
  40. package/src/components/VPagination/__tests__/__snapshots__/VPagination.spec.ts.snap +6 -3
  41. package/src/components/VTextField/VTextField.sass +2 -2
package/dist/vuetify.js CHANGED
@@ -12521,33 +12521,6 @@ var __assign = undefined && undefined.__assign || function () {
12521
12521
  };
12522
12522
 
12523
12523
  return __assign.apply(this, arguments);
12524
- };
12525
-
12526
- var __read = undefined && undefined.__read || function (o, n) {
12527
- var m = typeof Symbol === "function" && o[Symbol.iterator];
12528
- if (!m) return o;
12529
- var i = m.call(o),
12530
- r,
12531
- ar = [],
12532
- e;
12533
-
12534
- try {
12535
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
12536
- ar.push(r.value);
12537
- }
12538
- } catch (error) {
12539
- e = {
12540
- error: error
12541
- };
12542
- } finally {
12543
- try {
12544
- if (r && !r.done && (m = i["return"])) m.call(i);
12545
- } finally {
12546
- if (e) throw e.error;
12547
- }
12548
- }
12549
-
12550
- return ar;
12551
12524
  }; // Components
12552
12525
 
12553
12526
 
@@ -12565,23 +12538,6 @@ var __read = undefined && undefined.__read || function (o, n) {
12565
12538
 
12566
12539
 
12567
12540
 
12568
- // Adds leading zero to month/day if necessary, returns 'YYYY' if type = 'year',
12569
- // 'YYYY-MM' if 'month' and 'YYYY-MM-DD' if 'date'
12570
-
12571
- function sanitizeDateString(dateString, type) {
12572
- var _a = __read(dateString.split('-'), 3),
12573
- year = _a[0],
12574
- _b = _a[1],
12575
- month = _b === void 0 ? 1 : _b,
12576
- _c = _a[2],
12577
- date = _c === void 0 ? 1 : _c;
12578
-
12579
- return (year + "-" + Object(_util__WEBPACK_IMPORTED_MODULE_12__["pad"])(month) + "-" + Object(_util__WEBPACK_IMPORTED_MODULE_12__["pad"])(date)).substr(0, {
12580
- date: 10,
12581
- month: 7,
12582
- year: 4
12583
- }[type]);
12584
- }
12585
12541
 
12586
12542
  /* harmony default export */ __webpack_exports__["default"] = (Object(_util_mixins__WEBPACK_IMPORTED_MODULE_8__["default"])(_mixins_localable__WEBPACK_IMPORTED_MODULE_5__["default"], _mixins_picker__WEBPACK_IMPORTED_MODULE_6__["default"]).extend({
12587
12543
  name: 'v-date-picker',
@@ -12690,7 +12646,7 @@ function sanitizeDateString(dateString, type) {
12690
12646
 
12691
12647
  var multipleValue = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_9__["wrapInArray"])(_this.value);
12692
12648
  var date = multipleValue[multipleValue.length - 1] || (typeof _this.showCurrent === 'string' ? _this.showCurrent : now.getFullYear() + "-" + (now.getMonth() + 1));
12693
- return sanitizeDateString(date, _this.type === 'date' ? 'month' : 'year');
12649
+ return Object(_util__WEBPACK_IMPORTED_MODULE_12__["sanitizeDateString"])(date, _this.type === 'date' ? 'month' : 'year');
12694
12650
  }()
12695
12651
  };
12696
12652
  },
@@ -12717,7 +12673,7 @@ function sanitizeDateString(dateString, type) {
12717
12673
  },
12718
12674
  current: function current() {
12719
12675
  if (this.showCurrent === true) {
12720
- return sanitizeDateString(this.now.getFullYear() + "-" + (this.now.getMonth() + 1) + "-" + this.now.getDate(), this.type);
12676
+ return Object(_util__WEBPACK_IMPORTED_MODULE_12__["sanitizeDateString"])(this.now.getFullYear() + "-" + (this.now.getMonth() + 1) + "-" + this.now.getDate(), this.type);
12721
12677
  }
12722
12678
 
12723
12679
  return this.showCurrent || null;
@@ -12732,16 +12688,16 @@ function sanitizeDateString(dateString, type) {
12732
12688
  return Number((this.pickerDate || this.tableDate).split('-')[0]);
12733
12689
  },
12734
12690
  minMonth: function minMonth() {
12735
- return this.min ? sanitizeDateString(this.min, 'month') : null;
12691
+ return this.min ? Object(_util__WEBPACK_IMPORTED_MODULE_12__["sanitizeDateString"])(this.min, 'month') : null;
12736
12692
  },
12737
12693
  maxMonth: function maxMonth() {
12738
- return this.max ? sanitizeDateString(this.max, 'month') : null;
12694
+ return this.max ? Object(_util__WEBPACK_IMPORTED_MODULE_12__["sanitizeDateString"])(this.max, 'month') : null;
12739
12695
  },
12740
12696
  minYear: function minYear() {
12741
- return this.min ? sanitizeDateString(this.min, 'year') : null;
12697
+ return this.min ? Object(_util__WEBPACK_IMPORTED_MODULE_12__["sanitizeDateString"])(this.min, 'year') : null;
12742
12698
  },
12743
12699
  maxYear: function maxYear() {
12744
- return this.max ? sanitizeDateString(this.max, 'year') : null;
12700
+ return this.max ? Object(_util__WEBPACK_IMPORTED_MODULE_12__["sanitizeDateString"])(this.max, 'year') : null;
12745
12701
  },
12746
12702
  formatters: function formatters() {
12747
12703
  return {
@@ -12809,16 +12765,16 @@ function sanitizeDateString(dateString, type) {
12809
12765
  // Make a ISO 8601 strings from val and prev for comparision, otherwise it will incorrectly
12810
12766
  // compare for example '2000-9' and '2000-10'
12811
12767
  var sanitizeType = this.type === 'month' ? 'year' : 'month';
12812
- this.isReversing = sanitizeDateString(val, sanitizeType) < sanitizeDateString(prev, sanitizeType);
12768
+ this.isReversing = Object(_util__WEBPACK_IMPORTED_MODULE_12__["sanitizeDateString"])(val, sanitizeType) < Object(_util__WEBPACK_IMPORTED_MODULE_12__["sanitizeDateString"])(prev, sanitizeType);
12813
12769
  this.$emit('update:picker-date', val);
12814
12770
  },
12815
12771
  pickerDate: function pickerDate(val) {
12816
12772
  if (val) {
12817
12773
  this.tableDate = val;
12818
12774
  } else if (this.lastValue && this.type === 'date') {
12819
- this.tableDate = sanitizeDateString(this.lastValue, 'month');
12775
+ this.tableDate = Object(_util__WEBPACK_IMPORTED_MODULE_12__["sanitizeDateString"])(this.lastValue, 'month');
12820
12776
  } else if (this.lastValue && this.type === 'month') {
12821
- this.tableDate = sanitizeDateString(this.lastValue, 'year');
12777
+ this.tableDate = Object(_util__WEBPACK_IMPORTED_MODULE_12__["sanitizeDateString"])(this.lastValue, 'year');
12822
12778
  }
12823
12779
  },
12824
12780
  value: function value(newValue, oldValue) {
@@ -12826,7 +12782,7 @@ function sanitizeDateString(dateString, type) {
12826
12782
  this.setInputDate();
12827
12783
 
12828
12784
  if (!this.isMultiple && this.value && !this.pickerDate || this.isMultiple && this.multipleValue.length && (!oldValue || !oldValue.length) && !this.pickerDate) {
12829
- this.tableDate = sanitizeDateString(this.inputDate, this.type === 'month' ? 'year' : 'month');
12785
+ this.tableDate = Object(_util__WEBPACK_IMPORTED_MODULE_12__["sanitizeDateString"])(this.inputDate, this.type === 'month' ? 'year' : 'month');
12830
12786
  }
12831
12787
  },
12832
12788
  type: function type(_type) {
@@ -12834,7 +12790,7 @@ function sanitizeDateString(dateString, type) {
12834
12790
 
12835
12791
  if (this.value && this.value.length) {
12836
12792
  var output = this.multipleValue.map(function (val) {
12837
- return sanitizeDateString(val, _type);
12793
+ return Object(_util__WEBPACK_IMPORTED_MODULE_12__["sanitizeDateString"])(val, _type);
12838
12794
  }).filter(this.isDateAllowed);
12839
12795
  this.$emit('input', this.isMultiple ? output : output[0]);
12840
12796
  }
@@ -13016,7 +12972,7 @@ function sanitizeDateString(dateString, type) {
13016
12972
  props: {
13017
12973
  allowedDates: this.type === 'month' ? this.allowedDates : null,
13018
12974
  color: this.color,
13019
- current: this.current ? sanitizeDateString(this.current, 'month') : null,
12975
+ current: this.current ? Object(_util__WEBPACK_IMPORTED_MODULE_12__["sanitizeDateString"])(this.current, 'month') : null,
13020
12976
  dark: this.dark,
13021
12977
  disabled: this.disabled,
13022
12978
  events: this.type === 'month' ? this.events : null,
@@ -14055,6 +14011,12 @@ var __spread = undefined && undefined.__spread || function () {
14055
14011
  return _this.$createElement('div', _this.setBackgroundColor(color));
14056
14012
  })) : null;
14057
14013
  },
14014
+ isValidScroll: function isValidScroll(e, calculateTableDate) {
14015
+ var tableDate = calculateTableDate(e.deltaY); // tableDate is 'YYYY-MM' for DateTable and 'YYYY' for MonthTable
14016
+
14017
+ var sanitizeType = tableDate.split('-').length === 1 ? 'year' : 'month';
14018
+ return e.deltaY === 0 || e.deltaY < 0 && (this.min ? tableDate >= Object(_util__WEBPACK_IMPORTED_MODULE_5__["sanitizeDateString"])(this.min, sanitizeType) : true) || e.deltaY > 0 && (this.max ? tableDate <= Object(_util__WEBPACK_IMPORTED_MODULE_5__["sanitizeDateString"])(this.max, sanitizeType) : true);
14019
+ },
14058
14020
  wheel: function wheel(e, calculateTableDate) {
14059
14021
  this.$emit('update:table-date', calculateTableDate(e.deltaY));
14060
14022
  },
@@ -14091,7 +14053,9 @@ var __spread = undefined && undefined.__spread || function () {
14091
14053
  wheel: function wheel(e) {
14092
14054
  e.preventDefault();
14093
14055
 
14094
- _this.wheelThrottle(e, calculateTableDate);
14056
+ if (_this.isValidScroll(e, calculateTableDate)) {
14057
+ _this.wheelThrottle(e, calculateTableDate);
14058
+ }
14095
14059
  }
14096
14060
  } : undefined,
14097
14061
  directives: [touchDirective]
@@ -14227,7 +14191,7 @@ function createItemTypeListeners(instance, itemTypeSuffix) {
14227
14191
  /*!**************************************************!*\
14228
14192
  !*** ./src/components/VDatePicker/util/index.ts ***!
14229
14193
  \**************************************************/
14230
- /*! exports provided: createItemTypeListeners, createItemTypeNativeListeners, createNativeLocaleFormatter, monthChange, pad */
14194
+ /*! exports provided: createItemTypeListeners, createItemTypeNativeListeners, createNativeLocaleFormatter, monthChange, sanitizeDateString, pad */
14231
14195
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
14232
14196
 
14233
14197
  "use strict";
@@ -14243,8 +14207,12 @@ __webpack_require__.r(__webpack_exports__);
14243
14207
  /* harmony import */ var _monthChange__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./monthChange */ "./src/components/VDatePicker/util/monthChange.ts");
14244
14208
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "monthChange", function() { return _monthChange__WEBPACK_IMPORTED_MODULE_2__["default"]; });
14245
14209
 
14246
- /* harmony import */ var _pad__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pad */ "./src/components/VDatePicker/util/pad.ts");
14247
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pad", function() { return _pad__WEBPACK_IMPORTED_MODULE_3__["default"]; });
14210
+ /* harmony import */ var _sanitizeDateString__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./sanitizeDateString */ "./src/components/VDatePicker/util/sanitizeDateString.ts");
14211
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sanitizeDateString", function() { return _sanitizeDateString__WEBPACK_IMPORTED_MODULE_3__["default"]; });
14212
+
14213
+ /* harmony import */ var _pad__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./pad */ "./src/components/VDatePicker/util/pad.ts");
14214
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pad", function() { return _pad__WEBPACK_IMPORTED_MODULE_4__["default"]; });
14215
+
14248
14216
 
14249
14217
 
14250
14218
 
@@ -14366,6 +14334,63 @@ var padStart = function padStart(string, targetLength, padString) {
14366
14334
 
14367
14335
  /***/ }),
14368
14336
 
14337
+ /***/ "./src/components/VDatePicker/util/sanitizeDateString.ts":
14338
+ /*!***************************************************************!*\
14339
+ !*** ./src/components/VDatePicker/util/sanitizeDateString.ts ***!
14340
+ \***************************************************************/
14341
+ /*! exports provided: default */
14342
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
14343
+
14344
+ "use strict";
14345
+ __webpack_require__.r(__webpack_exports__);
14346
+ /* harmony import */ var _pad__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pad */ "./src/components/VDatePicker/util/pad.ts");
14347
+ var __read = undefined && undefined.__read || function (o, n) {
14348
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
14349
+ if (!m) return o;
14350
+ var i = m.call(o),
14351
+ r,
14352
+ ar = [],
14353
+ e;
14354
+
14355
+ try {
14356
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
14357
+ ar.push(r.value);
14358
+ }
14359
+ } catch (error) {
14360
+ e = {
14361
+ error: error
14362
+ };
14363
+ } finally {
14364
+ try {
14365
+ if (r && !r.done && (m = i["return"])) m.call(i);
14366
+ } finally {
14367
+ if (e) throw e.error;
14368
+ }
14369
+ }
14370
+
14371
+ return ar;
14372
+ }; // Adds leading zero to month/day if necessary, returns 'YYYY' if type = 'year',
14373
+ // 'YYYY-MM' if 'month' and 'YYYY-MM-DD' if 'date'
14374
+
14375
+
14376
+
14377
+ /* harmony default export */ __webpack_exports__["default"] = (function (dateString, type) {
14378
+ var _a = __read(dateString.split('-'), 3),
14379
+ year = _a[0],
14380
+ _b = _a[1],
14381
+ month = _b === void 0 ? 1 : _b,
14382
+ _c = _a[2],
14383
+ date = _c === void 0 ? 1 : _c;
14384
+
14385
+ return (year + "-" + Object(_pad__WEBPACK_IMPORTED_MODULE_0__["default"])(month) + "-" + Object(_pad__WEBPACK_IMPORTED_MODULE_0__["default"])(date)).substr(0, {
14386
+ date: 10,
14387
+ month: 7,
14388
+ year: 4
14389
+ }[type]);
14390
+ });
14391
+
14392
+ /***/ }),
14393
+
14369
14394
  /***/ "./src/components/VDialog/VDialog.sass":
14370
14395
  /*!*********************************************!*\
14371
14396
  !*** ./src/components/VDialog/VDialog.sass ***!
@@ -20870,6 +20895,7 @@ var __spread = undefined && undefined.__spread || function () {
20870
20895
  'v-pagination__navigation--disabled': disabled
20871
20896
  },
20872
20897
  attrs: {
20898
+ disabled: disabled,
20873
20899
  type: 'button',
20874
20900
  'aria-label': label
20875
20901
  },
@@ -33806,7 +33832,7 @@ function () {
33806
33832
 
33807
33833
  Vuetify.install = _install__WEBPACK_IMPORTED_MODULE_0__["install"];
33808
33834
  Vuetify.installed = false;
33809
- Vuetify.version = "2.4.3";
33835
+ Vuetify.version = "2.4.4";
33810
33836
  Vuetify.config = {
33811
33837
  silent: false
33812
33838
  };