quasar 1.18.0 → 1.18.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 (119) hide show
  1. package/dist/api/QKnob.json +18 -0
  2. package/dist/api/QRange.json +1 -1
  3. package/dist/api/QSlider.json +1 -1
  4. package/dist/icon-set/bootstrap-icons.umd.min.js +1 -1
  5. package/dist/icon-set/eva-icons.umd.min.js +1 -1
  6. package/dist/icon-set/fontawesome-v5-pro.umd.min.js +1 -1
  7. package/dist/icon-set/fontawesome-v5.umd.min.js +1 -1
  8. package/dist/icon-set/ionicons-v4.umd.min.js +1 -1
  9. package/dist/icon-set/line-awesome.umd.min.js +1 -1
  10. package/dist/icon-set/material-icons-outlined.umd.min.js +1 -1
  11. package/dist/icon-set/material-icons-round.umd.min.js +1 -1
  12. package/dist/icon-set/material-icons-sharp.umd.min.js +1 -1
  13. package/dist/icon-set/material-icons.umd.min.js +1 -1
  14. package/dist/icon-set/mdi-v3.umd.min.js +1 -1
  15. package/dist/icon-set/mdi-v4.umd.min.js +1 -1
  16. package/dist/icon-set/mdi-v5.umd.min.js +1 -1
  17. package/dist/icon-set/mdi-v6.umd.min.js +1 -1
  18. package/dist/icon-set/svg-bootstrap-icons.umd.min.js +1 -1
  19. package/dist/icon-set/svg-eva-icons.umd.min.js +1 -1
  20. package/dist/icon-set/svg-fontawesome-v5.umd.min.js +1 -1
  21. package/dist/icon-set/svg-ionicons-v4.umd.min.js +1 -1
  22. package/dist/icon-set/svg-ionicons-v5.umd.min.js +1 -1
  23. package/dist/icon-set/svg-ionicons-v6.umd.min.js +1 -1
  24. package/dist/icon-set/svg-line-awesome.umd.min.js +1 -1
  25. package/dist/icon-set/svg-material-icons-outlined.umd.min.js +1 -1
  26. package/dist/icon-set/svg-material-icons-round.umd.min.js +1 -1
  27. package/dist/icon-set/svg-material-icons-sharp.umd.min.js +1 -1
  28. package/dist/icon-set/svg-material-icons.umd.min.js +1 -1
  29. package/dist/icon-set/svg-mdi-v4.umd.min.js +1 -1
  30. package/dist/icon-set/svg-mdi-v5.umd.min.js +1 -1
  31. package/dist/icon-set/svg-mdi-v6.umd.min.js +1 -1
  32. package/dist/icon-set/svg-themify.umd.min.js +1 -1
  33. package/dist/icon-set/themify.umd.min.js +1 -1
  34. package/dist/lang/ar.umd.min.js +1 -1
  35. package/dist/lang/az-latn.umd.min.js +1 -1
  36. package/dist/lang/bg.umd.min.js +1 -1
  37. package/dist/lang/ca.umd.min.js +1 -1
  38. package/dist/lang/cs.umd.min.js +1 -1
  39. package/dist/lang/da.umd.min.js +1 -1
  40. package/dist/lang/de.umd.min.js +1 -1
  41. package/dist/lang/el.umd.min.js +1 -1
  42. package/dist/lang/en-gb.umd.min.js +1 -1
  43. package/dist/lang/en-us.umd.min.js +1 -1
  44. package/dist/lang/eo.umd.min.js +1 -1
  45. package/dist/lang/es.umd.min.js +1 -1
  46. package/dist/lang/et.umd.min.js +1 -1
  47. package/dist/lang/fa-ir.umd.min.js +1 -1
  48. package/dist/lang/fa.umd.min.js +1 -1
  49. package/dist/lang/fi.umd.min.js +1 -1
  50. package/dist/lang/fr.umd.min.js +1 -1
  51. package/dist/lang/gn.umd.min.js +1 -1
  52. package/dist/lang/he.umd.min.js +1 -1
  53. package/dist/lang/hr.umd.min.js +1 -1
  54. package/dist/lang/hu.umd.min.js +1 -1
  55. package/dist/lang/id.umd.min.js +1 -1
  56. package/dist/lang/is.umd.min.js +1 -1
  57. package/dist/lang/it.umd.min.js +1 -1
  58. package/dist/lang/ja.umd.min.js +1 -1
  59. package/dist/lang/km.umd.min.js +1 -1
  60. package/dist/lang/ko-kr.umd.min.js +1 -1
  61. package/dist/lang/kur-ckb.umd.min.js +1 -1
  62. package/dist/lang/lu.umd.min.js +1 -1
  63. package/dist/lang/lv.umd.min.js +1 -1
  64. package/dist/lang/ml.umd.min.js +1 -1
  65. package/dist/lang/ms.umd.min.js +1 -1
  66. package/dist/lang/my.umd.min.js +1 -1
  67. package/dist/lang/nb-no.umd.min.js +1 -1
  68. package/dist/lang/nl.umd.min.js +1 -1
  69. package/dist/lang/pl.umd.min.js +1 -1
  70. package/dist/lang/pt-br.umd.min.js +1 -1
  71. package/dist/lang/pt.umd.min.js +1 -1
  72. package/dist/lang/ro.umd.min.js +1 -1
  73. package/dist/lang/ru.umd.min.js +1 -1
  74. package/dist/lang/sk.umd.min.js +1 -1
  75. package/dist/lang/sl.umd.min.js +1 -1
  76. package/dist/lang/sr.umd.min.js +1 -1
  77. package/dist/lang/sv.umd.min.js +1 -1
  78. package/dist/lang/ta.umd.min.js +1 -1
  79. package/dist/lang/th.umd.min.js +1 -1
  80. package/dist/lang/tr.umd.min.js +1 -1
  81. package/dist/lang/ug.umd.min.js +1 -1
  82. package/dist/lang/uk.umd.min.js +1 -1
  83. package/dist/lang/vi.umd.min.js +1 -1
  84. package/dist/lang/zh-hans.umd.min.js +1 -1
  85. package/dist/lang/zh-hant.umd.min.js +1 -1
  86. package/dist/quasar.addon.css +1 -1
  87. package/dist/quasar.addon.rtl.css +1 -1
  88. package/dist/quasar.common.js +2 -2
  89. package/dist/quasar.css +5 -1
  90. package/dist/quasar.esm.js +2 -2
  91. package/dist/quasar.ie.polyfills.js +1 -1
  92. package/dist/quasar.ie.polyfills.umd.min.js +1 -1
  93. package/dist/quasar.min.css +1 -1
  94. package/dist/quasar.rtl.css +5 -1
  95. package/dist/quasar.rtl.min.css +1 -1
  96. package/dist/quasar.sass +3 -1
  97. package/dist/quasar.styl +3 -1
  98. package/dist/quasar.umd.js +239 -153
  99. package/dist/quasar.umd.min.js +2 -2
  100. package/dist/quasar.umd.modern.js +236 -151
  101. package/dist/quasar.umd.modern.min.js +2 -2
  102. package/dist/types/index.d.ts +8 -0
  103. package/dist/types/utils/date.d.ts +28 -13
  104. package/dist/vetur/quasar-attributes.json +8 -0
  105. package/dist/vetur/quasar-tags.json +2 -0
  106. package/dist/web-types/web-types.json +21 -3
  107. package/package.json +1 -1
  108. package/src/components/field/QField.sass +2 -0
  109. package/src/components/field/QField.styl +2 -0
  110. package/src/components/form/QForm.js +17 -14
  111. package/src/components/knob/QKnob.js +41 -23
  112. package/src/components/knob/QKnob.json +16 -0
  113. package/src/components/select/QSelect.js +1 -1
  114. package/src/components/slider/slider-utils.json +1 -1
  115. package/src/components/tree/QTree.js +6 -8
  116. package/src/mixins/mask.js +1 -1
  117. package/src/mixins/validate.js +12 -12
  118. package/src/plugins/Screen.js +10 -6
  119. package/src/utils/date.js +147 -85
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Quasar Framework v1.18.0
2
+ * Quasar Framework v1.18.4
3
3
  * (c) 2015-present Razvan Stoenescu
4
4
  * Released under the MIT License.
5
5
  */
@@ -12,7 +12,7 @@
12
12
 
13
13
  Vue = Vue && Object.prototype.hasOwnProperty.call(Vue, 'default') ? Vue['default'] : Vue;
14
14
 
15
- var version = "1.18.0";
15
+ var version = "1.18.4";
16
16
 
17
17
  /* eslint-disable no-useless-escape */
18
18
 
@@ -645,14 +645,18 @@
645
645
  }
646
646
 
647
647
  var visualViewport = window.visualViewport;
648
- var getSize = visualViewport === void 0
649
- ? function () { return [ window.innerWidth, window.innerHeight ]; }
648
+ var target = visualViewport || window;
649
+ var scrollingElement = document.scrollingElement || document.documentElement;
650
+ var getSize = visualViewport === void 0 || client.is.mobile === true
651
+ ? function () { return [
652
+ Math.max(window.innerWidth, scrollingElement.clientWidth),
653
+ Math.max(window.innerHeight, scrollingElement.clientHeight)
654
+ ]; }
650
655
  : function () { return [
651
- visualViewport.width * visualViewport.scale + window.innerWidth - document.scrollingElement.clientWidth,
652
- visualViewport.height * visualViewport.scale + window.innerHeight - document.scrollingElement.clientHeight
656
+ visualViewport.width * visualViewport.scale + window.innerWidth - scrollingElement.clientWidth,
657
+ visualViewport.height * visualViewport.scale + window.innerHeight - scrollingElement.clientHeight
653
658
  ]; };
654
659
 
655
- var target = visualViewport || window;
656
660
  var classes = cfg.screen !== void 0 && cfg.screen.bodyClasses === true;
657
661
 
658
662
  var update = function (force) {
@@ -11820,8 +11824,8 @@
11820
11824
  days = '(' + dateLocale.days.join('|') + ')',
11821
11825
  key = mask + days;
11822
11826
 
11823
- if (regexStore[key] !== void 0) {
11824
- return regexStore[key]
11827
+ if (regexStore[ key ] !== void 0) {
11828
+ return regexStore[ key ]
11825
11829
  }
11826
11830
 
11827
11831
  var
@@ -11939,7 +11943,7 @@
11939
11943
 
11940
11944
  default:
11941
11945
  index--;
11942
- if (match[0] === '[') {
11946
+ if (match[ 0 ] === '[') {
11943
11947
  match = match.substring(1, match.length - 1);
11944
11948
  }
11945
11949
  return match.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
@@ -11947,7 +11951,7 @@
11947
11951
  });
11948
11952
 
11949
11953
  var res = { map: map, regex: new RegExp('^' + regexText) };
11950
- regexStore[key] = res;
11954
+ regexStore[ key ] = res;
11951
11955
 
11952
11956
  return res
11953
11957
  }
@@ -11981,12 +11985,14 @@
11981
11985
 
11982
11986
  var day = date.getDate();
11983
11987
 
11984
- if (mod.years !== void 0) {
11985
- year += sign * mod.years;
11988
+ if (mod.year !== void 0) {
11989
+ year += sign * mod.year;
11990
+ delete mod.year;
11986
11991
  }
11987
11992
 
11988
- if (mod.months !== void 0) {
11989
- month += sign * mod.months;
11993
+ if (mod.month !== void 0) {
11994
+ month += sign * mod.month;
11995
+ delete mod.month;
11990
11996
  }
11991
11997
 
11992
11998
  date.setDate(1);
@@ -11996,76 +12002,108 @@
11996
12002
  date.setMonth(month);
11997
12003
  date.setDate(Math.min(day, daysInMonth(date)));
11998
12004
 
11999
- if (mod.days !== void 0) {
12000
- date.setDate(date.getDate() + sign * mod.days);
12005
+ if (mod.date !== void 0) {
12006
+ date.setDate(date.getDate() + sign * mod.date);
12007
+ delete mod.date;
12001
12008
  }
12002
12009
 
12003
12010
  return date
12004
12011
  }
12005
12012
 
12006
- var yearMonDay = [ 'years', 'year', 'months', 'month', 'days' ];
12013
+ function applyYearMonthDay (date, mod, middle) {
12014
+ var
12015
+ year = mod.year !== void 0 ? mod.year : date[ ("get" + middle + "FullYear") ](),
12016
+ month = mod.month !== void 0 ? mod.month - 1 : date[ ("get" + middle + "Month") ](),
12017
+ maxDay = (new Date(year, month + 1, 0)).getDate(),
12018
+ day = Math.min(maxDay, mod.date !== void 0 ? mod.date : date[ ("get" + middle + "Date") ]());
12019
+
12020
+ date[ ("set" + middle + "Date") ](1);
12021
+ date[ ("set" + middle + "Month") ](2);
12007
12022
 
12008
- function getChange (date, mod, sign) {
12023
+ date[ ("set" + middle + "FullYear") ](year);
12024
+ date[ ("set" + middle + "Month") ](month);
12025
+ date[ ("set" + middle + "Date") ](day);
12026
+
12027
+ delete mod.year;
12028
+ delete mod.month;
12029
+ delete mod.date;
12030
+
12031
+ return date
12032
+ }
12033
+
12034
+ function getChange (date, rawMod, sign) {
12009
12035
  var
12036
+ mod = normalizeMod(rawMod),
12010
12037
  d = new Date(date),
12011
- t = (
12012
- mod.years !== void 0 || mod.year !== void 0 ||
12013
- mod.months !== void 0 || mod.month !== void 0 ||
12014
- mod.days !== void 0
12015
- )
12016
- ? applyYearMonthDayChange(d, mod, sign)
12038
+ t = mod.year !== void 0 || mod.month !== void 0 || mod.date !== void 0
12039
+ ? applyYearMonthDayChange(d, mod, sign) // removes year/month/day
12017
12040
  : d;
12018
12041
 
12019
12042
  for (var key in mod) {
12020
- if (yearMonDay.includes(key) === false) {
12021
- var op = capitalize(key);
12022
- t[("set" + op)](t[("get" + op)]() + sign * mod[key]);
12023
- }
12043
+ var op = capitalize(key);
12044
+ t[ ("set" + op) ](t[ ("get" + op) ]() + sign * mod[ key ]);
12024
12045
  }
12025
12046
 
12026
12047
  return t
12027
12048
  }
12028
12049
 
12029
- function applyYearMonthDay (date, mod, middle) {
12030
- var
12031
- year = mod.year !== void 0
12032
- ? mod.year
12033
- : (mod.years !== void 0 ? mod.years : date[("get" + middle + "FullYear")]()),
12034
- month = mod.month !== void 0
12035
- ? mod.month - 1
12036
- : (mod.months !== void 0 ? mod.months : date[("get" + middle + "Month")]()),
12037
- maxDay = (new Date(year, month + 1, 0)).getDate(),
12038
- day = Math.min(maxDay, mod.date !== void 0 ? mod.date : date[("get" + middle + "Date")]());
12050
+ function normalizeMod (mod) {
12051
+ var acc = Object.assign({}, mod);
12039
12052
 
12040
- date[("set" + middle + "Date")](1);
12041
- date[("set" + middle + "Month")](2);
12053
+ if (mod.years !== void 0) {
12054
+ acc.year = mod.years;
12055
+ delete acc.years;
12056
+ }
12042
12057
 
12043
- date[("set" + middle + "FullYear")](year);
12044
- date[("set" + middle + "Month")](month);
12045
- date[("set" + middle + "Date")](day);
12058
+ if (mod.months !== void 0) {
12059
+ acc.month = mod.months;
12060
+ delete acc.months;
12061
+ }
12046
12062
 
12047
- return date
12048
- }
12063
+ if (mod.days !== void 0) {
12064
+ acc.date = mod.days;
12065
+ delete acc.days;
12066
+ }
12067
+ if (mod.day !== void 0) {
12068
+ acc.date = mod.day;
12069
+ delete acc.day;
12070
+ }
12049
12071
 
12050
- var yearMonDayAdj = [ 'years', 'year', 'months', 'month', 'days' ];
12072
+ if (mod.hour !== void 0) {
12073
+ acc.hours = mod.hour;
12074
+ delete acc.hour;
12075
+ }
12051
12076
 
12052
- function adjustDate (date, mod, utc) {
12077
+ if (mod.minute !== void 0) {
12078
+ acc.minutes = mod.minute;
12079
+ delete acc.minute;
12080
+ }
12081
+
12082
+ if (mod.second !== void 0) {
12083
+ acc.seconds = mod.second;
12084
+ delete acc.second;
12085
+ }
12086
+
12087
+ if (mod.millisecond !== void 0) {
12088
+ acc.milliseconds = mod.millisecond;
12089
+ delete acc.millisecond;
12090
+ }
12091
+
12092
+ return acc
12093
+ }
12094
+
12095
+ function adjustDate (date, rawMod, utc) {
12053
12096
  var
12097
+ mod = normalizeMod(rawMod),
12054
12098
  middle = utc === true ? 'UTC' : '',
12055
12099
  d = new Date(date),
12056
- t = (
12057
- mod.years !== void 0 || mod.year !== void 0 ||
12058
- mod.months !== void 0 || mod.month !== void 0 ||
12059
- mod.days !== void 0
12060
- )
12061
- ? applyYearMonthDay(d, mod, middle)
12100
+ t = mod.year !== void 0 || mod.month !== void 0 || mod.date !== void 0
12101
+ ? applyYearMonthDay(d, mod, middle) // removes year/month/day
12062
12102
  : d;
12063
12103
 
12064
12104
  for (var key in mod) {
12065
- if (yearMonDayAdj.includes(key) === false) {
12066
- var op = key.charAt(0).toUpperCase() + key.slice(1);
12067
- t[("set" + middle + op)](mod[key]);
12068
- }
12105
+ var op = key.charAt(0).toUpperCase() + key.slice(1);
12106
+ t[ ("set" + middle + op) ](mod[ key ]);
12069
12107
  }
12070
12108
 
12071
12109
  return t
@@ -12138,7 +12176,7 @@
12138
12176
  var tzString = '';
12139
12177
 
12140
12178
  if (map.X !== void 0 || map.x !== void 0) {
12141
- var stamp = parseInt(match[map.X !== void 0 ? map.X : map.x], 10);
12179
+ var stamp = parseInt(match[ map.X !== void 0 ? map.X : map.x ], 10);
12142
12180
 
12143
12181
  if (isNaN(stamp) === true || stamp < 0) {
12144
12182
  return date
@@ -12156,28 +12194,28 @@
12156
12194
  }
12157
12195
  else {
12158
12196
  if (map.YYYY !== void 0) {
12159
- date.year = parseInt(match[map.YYYY], 10);
12197
+ date.year = parseInt(match[ map.YYYY ], 10);
12160
12198
  }
12161
12199
  else if (map.YY !== void 0) {
12162
- var y = parseInt(match[map.YY], 10);
12200
+ var y = parseInt(match[ map.YY ], 10);
12163
12201
  date.year = y < 0 ? y : 2000 + y;
12164
12202
  }
12165
12203
 
12166
12204
  if (map.M !== void 0) {
12167
- date.month = parseInt(match[map.M], 10);
12205
+ date.month = parseInt(match[ map.M ], 10);
12168
12206
  if (date.month < 1 || date.month > 12) {
12169
12207
  return date
12170
12208
  }
12171
12209
  }
12172
12210
  else if (map.MMM !== void 0) {
12173
- date.month = monthsShort.indexOf(match[map.MMM]) + 1;
12211
+ date.month = monthsShort.indexOf(match[ map.MMM ]) + 1;
12174
12212
  }
12175
12213
  else if (map.MMMM !== void 0) {
12176
- date.month = months.indexOf(match[map.MMMM]) + 1;
12214
+ date.month = months.indexOf(match[ map.MMMM ]) + 1;
12177
12215
  }
12178
12216
 
12179
12217
  if (map.D !== void 0) {
12180
- date.day = parseInt(match[map.D], 10);
12218
+ date.day = parseInt(match[ map.D ], 10);
12181
12219
 
12182
12220
  if (date.year === null || date.month === null || date.day < 1) {
12183
12221
  return date
@@ -12193,14 +12231,14 @@
12193
12231
  }
12194
12232
 
12195
12233
  if (map.H !== void 0) {
12196
- date.hour = parseInt(match[map.H], 10) % 24;
12234
+ date.hour = parseInt(match[ map.H ], 10) % 24;
12197
12235
  }
12198
12236
  else if (map.h !== void 0) {
12199
- date.hour = parseInt(match[map.h], 10) % 12;
12237
+ date.hour = parseInt(match[ map.h ], 10) % 12;
12200
12238
  if (
12201
- (map.A && match[map.A] === 'PM') ||
12202
- (map.a && match[map.a] === 'pm') ||
12203
- (map.aa && match[map.aa] === 'p.m.')
12239
+ (map.A && match[ map.A ] === 'PM') ||
12240
+ (map.a && match[ map.a ] === 'pm') ||
12241
+ (map.aa && match[ map.aa ] === 'p.m.')
12204
12242
  ) {
12205
12243
  date.hour += 12;
12206
12244
  }
@@ -12208,20 +12246,20 @@
12208
12246
  }
12209
12247
 
12210
12248
  if (map.m !== void 0) {
12211
- date.minute = parseInt(match[map.m], 10) % 60;
12249
+ date.minute = parseInt(match[ map.m ], 10) % 60;
12212
12250
  }
12213
12251
 
12214
12252
  if (map.s !== void 0) {
12215
- date.second = parseInt(match[map.s], 10) % 60;
12253
+ date.second = parseInt(match[ map.s ], 10) % 60;
12216
12254
  }
12217
12255
 
12218
12256
  if (map.S !== void 0) {
12219
- date.millisecond = parseInt(match[map.S], 10) * Math.pow( 10, (3 - match[map.S].length) );
12257
+ date.millisecond = parseInt(match[ map.S ], 10) * Math.pow( 10, (3 - match[ map.S ].length) );
12220
12258
  }
12221
12259
 
12222
12260
  if (map.Z !== void 0 || map.ZZ !== void 0) {
12223
- tzString = (map.Z !== void 0 ? match[map.Z].replace(':', '') : match[map.ZZ]);
12224
- date.timezoneOffset = (tzString[0] === '+' ? -1 : 1) * (60 * tzString.slice(1, 3) + 1 * tzString.slice(3, 5));
12261
+ tzString = (map.Z !== void 0 ? match[ map.Z ].replace(':', '') : match[ map.ZZ ]);
12262
+ date.timezoneOffset = (tzString[ 0 ] === '+' ? -1 : 1) * (60 * tzString.slice(1, 3) + 1 * tzString.slice(3, 5));
12225
12263
  }
12226
12264
  }
12227
12265
 
@@ -12303,17 +12341,24 @@
12303
12341
 
12304
12342
  switch (unit) {
12305
12343
  case 'year':
12306
- t[(prefix + "Month")](0);
12344
+ case 'years':
12345
+ t[ (prefix + "Month") ](0);
12307
12346
  case 'month':
12308
- t[(prefix + "Date")](1);
12347
+ case 'months':
12348
+ t[ (prefix + "Date") ](1);
12309
12349
  case 'day':
12310
- t[(prefix + "Hours")](0);
12350
+ case 'days':
12351
+ case 'date':
12352
+ t[ (prefix + "Hours") ](0);
12311
12353
  case 'hour':
12312
- t[(prefix + "Minutes")](0);
12354
+ case 'hours':
12355
+ t[ (prefix + "Minutes") ](0);
12313
12356
  case 'minute':
12314
- t[(prefix + "Seconds")](0);
12357
+ case 'minutes':
12358
+ t[ (prefix + "Seconds") ](0);
12315
12359
  case 'second':
12316
- t[(prefix + "Milliseconds")](0);
12360
+ case 'seconds':
12361
+ t[ (prefix + "Milliseconds") ](0);
12317
12362
  }
12318
12363
  return t
12319
12364
  }
@@ -12325,17 +12370,24 @@
12325
12370
 
12326
12371
  switch (unit) {
12327
12372
  case 'year':
12328
- t[(prefix + "Month")](11);
12373
+ case 'years':
12374
+ t[ (prefix + "Month") ](11);
12329
12375
  case 'month':
12330
- t[(prefix + "Date")](daysInMonth(t));
12376
+ case 'months':
12377
+ t[ (prefix + "Date") ](daysInMonth(t));
12331
12378
  case 'day':
12332
- t[(prefix + "Hours")](23);
12379
+ case 'days':
12380
+ case 'date':
12381
+ t[ (prefix + "Hours") ](23);
12333
12382
  case 'hour':
12334
- t[(prefix + "Minutes")](59);
12383
+ case 'hours':
12384
+ t[ (prefix + "Minutes") ](59);
12335
12385
  case 'minute':
12336
- t[(prefix + "Seconds")](59);
12386
+ case 'minutes':
12387
+ t[ (prefix + "Seconds") ](59);
12337
12388
  case 'second':
12338
- t[(prefix + "Milliseconds")](999);
12389
+ case 'seconds':
12390
+ t[ (prefix + "Milliseconds") ](999);
12339
12391
  }
12340
12392
  return t
12341
12393
  }
@@ -12372,21 +12424,28 @@
12372
12424
 
12373
12425
  switch (unit) {
12374
12426
  case 'years':
12427
+ case 'year':
12375
12428
  return (t.getFullYear() - sub.getFullYear())
12376
12429
 
12377
12430
  case 'months':
12431
+ case 'month':
12378
12432
  return (t.getFullYear() - sub.getFullYear()) * 12 + t.getMonth() - sub.getMonth()
12379
12433
 
12380
12434
  case 'days':
12435
+ case 'day':
12436
+ case 'date':
12381
12437
  return getDiff(startOfDate(t, 'day'), startOfDate(sub, 'day'), MILLISECONDS_IN_DAY)
12382
12438
 
12383
12439
  case 'hours':
12440
+ case 'hour':
12384
12441
  return getDiff(startOfDate(t, 'hour'), startOfDate(sub, 'hour'), MILLISECONDS_IN_HOUR)
12385
12442
 
12386
12443
  case 'minutes':
12444
+ case 'minute':
12387
12445
  return getDiff(startOfDate(t, 'minute'), startOfDate(sub, 'minute'), MILLISECONDS_IN_MINUTE)
12388
12446
 
12389
12447
  case 'seconds':
12448
+ case 'second':
12390
12449
  return getDiff(startOfDate(t, 'second'), startOfDate(sub, 'second'), 1000)
12391
12450
  }
12392
12451
  }
@@ -12432,26 +12491,33 @@
12432
12491
 
12433
12492
  switch (unit) {
12434
12493
  case 'second':
12494
+ case 'seconds':
12435
12495
  if (t.getSeconds() !== d.getSeconds()) {
12436
12496
  return false
12437
12497
  }
12438
12498
  case 'minute': // intentional fall-through
12499
+ case 'minutes':
12439
12500
  if (t.getMinutes() !== d.getMinutes()) {
12440
12501
  return false
12441
12502
  }
12442
12503
  case 'hour': // intentional fall-through
12504
+ case 'hours':
12443
12505
  if (t.getHours() !== d.getHours()) {
12444
12506
  return false
12445
12507
  }
12446
12508
  case 'day': // intentional fall-through
12509
+ case 'days':
12510
+ case 'date':
12447
12511
  if (t.getDate() !== d.getDate()) {
12448
12512
  return false
12449
12513
  }
12450
12514
  case 'month': // intentional fall-through
12515
+ case 'months':
12451
12516
  if (t.getMonth() !== d.getMonth()) {
12452
12517
  return false
12453
12518
  }
12454
12519
  case 'year': // intentional fall-through
12520
+ case 'years':
12455
12521
  if (t.getFullYear() !== d.getFullYear()) {
12456
12522
  return false
12457
12523
  }
@@ -12509,12 +12575,12 @@
12509
12575
 
12510
12576
  // Month Short Name: Jan, Feb, ...
12511
12577
  MMM: function MMM (date, dateLocale) {
12512
- return dateLocale.monthsShort[date.getMonth()]
12578
+ return dateLocale.monthsShort[ date.getMonth() ]
12513
12579
  },
12514
12580
 
12515
12581
  // Month Name: January, February, ...
12516
12582
  MMMM: function MMMM (date, dateLocale) {
12517
- return dateLocale.months[date.getMonth()]
12583
+ return dateLocale.months[ date.getMonth() ]
12518
12584
  },
12519
12585
 
12520
12586
  // Quarter: 1, 2, 3, 4
@@ -12564,12 +12630,12 @@
12564
12630
 
12565
12631
  // Day of week: Sun, Mon, ...
12566
12632
  ddd: function ddd (date, dateLocale) {
12567
- return dateLocale.daysShort[date.getDay()]
12633
+ return dateLocale.daysShort[ date.getDay() ]
12568
12634
  },
12569
12635
 
12570
12636
  // Day of week: Sunday, Monday, ...
12571
12637
  dddd: function dddd (date, dateLocale) {
12572
- return dateLocale.days[date.getDay()]
12638
+ return dateLocale.days[ date.getDay() ]
12573
12639
  },
12574
12640
 
12575
12641
  // Day of ISO week: 1, 2, ..., 7
@@ -12718,7 +12784,7 @@
12718
12784
  token,
12719
12785
  function (match, text) { return (
12720
12786
  match in formatter
12721
- ? formatter[match](date, locale, __forcedYear, __forcedTimezoneOffset)
12787
+ ? formatter[ match ](date, locale, __forcedYear, __forcedTimezoneOffset)
12722
12788
  : (text === void 0 ? match : text.split('\\]').join(']'))
12723
12789
  ); }
12724
12790
  )
@@ -18248,7 +18314,14 @@
18248
18314
  else if (this.isDirty === false) {
18249
18315
  this.isDirty = true;
18250
18316
 
18251
- if (this.hasActiveRules === true && this.lazyRules !== 'ondemand') {
18317
+ if (
18318
+ this.hasActiveRules === true &&
18319
+ this.lazyRules !== 'ondemand' &&
18320
+ // Don't re-trigger if it's already in progress;
18321
+ // It might mean that focus switched to submit btn and
18322
+ // QForm's submit() has been called already (ENTER key)
18323
+ this.innerLoading === false
18324
+ ) {
18252
18325
  this.debouncedValidate();
18253
18326
  }
18254
18327
  }
@@ -18315,7 +18388,7 @@
18315
18388
  return true
18316
18389
  }
18317
18390
 
18318
- this.validateIndex++;
18391
+ var index = ++this.validateIndex;
18319
18392
 
18320
18393
  if (this.innerLoading !== true && this.lazyRules !== true) {
18321
18394
  this.isDirty = true;
@@ -18368,31 +18441,24 @@
18368
18441
  this.innerLoading = true;
18369
18442
  }
18370
18443
 
18371
- var index = this.validateIndex;
18372
-
18373
18444
  return Promise.all(promises).then(
18374
18445
  function (res) {
18375
- if (index !== this$1.validateIndex) {
18376
- return true
18377
- }
18378
-
18379
18446
  if (res === void 0 || Array.isArray(res) === false || res.length === 0) {
18380
- update(false);
18447
+ index === this$1.validateIndex && update(false);
18381
18448
  return true
18382
18449
  }
18383
18450
 
18384
18451
  var msg = res.find(function (r) { return r === false || typeof r === 'string'; });
18385
- update(msg !== void 0, msg);
18452
+ index === this$1.validateIndex && update(msg !== void 0, msg);
18386
18453
  return msg === void 0
18387
18454
  },
18388
18455
  function (e) {
18389
18456
  if (index === this$1.validateIndex) {
18390
18457
  console.error(e);
18391
18458
  update(true);
18392
- return false
18393
18459
  }
18394
18460
 
18395
- return true
18461
+ return false
18396
18462
  }
18397
18463
  )
18398
18464
  },
@@ -19836,7 +19902,7 @@
19836
19902
  ? shouldFocus
19837
19903
  : this.noErrorFocus !== true;
19838
19904
 
19839
- this.validateIndex++;
19905
+ var index = ++this.validateIndex;
19840
19906
 
19841
19907
  var components = this.getValidationComponents().filter(function (c) { return c.disable !== true; });
19842
19908
 
@@ -19852,7 +19918,7 @@
19852
19918
  promises.push(
19853
19919
  valid.then(
19854
19920
  function (valid) { return ({ valid: valid, comp: comp }); },
19855
- function (error) { return ({ valid: false, comp: comp, error: error }); }
19921
+ function (err) { return ({ valid: false, comp: comp, err: err }); }
19856
19922
  )
19857
19923
  );
19858
19924
  }
@@ -19882,21 +19948,22 @@
19882
19948
  return Promise.resolve(true)
19883
19949
  }
19884
19950
 
19885
- var index = this.validateIndex;
19886
-
19887
19951
  return Promise.all(promises).then(
19888
19952
  function (res) {
19889
- if (index === this$1.validateIndex) {
19890
- var errors = res.filter(function (r) { return r.valid !== true; });
19953
+ var errors = res.filter(function (r) { return r.valid !== true; });
19891
19954
 
19892
- if (errors.length === 0) {
19893
- emit(true);
19894
- return true
19895
- }
19955
+ if (errors.length === 0) {
19956
+ index === this$1.validateIndex && emit(true);
19957
+ return true
19958
+ }
19896
19959
 
19897
- var ref = errors[0];
19898
- var valid = ref.valid;
19899
- var comp = ref.comp;
19960
+ var ref = errors[0];
19961
+ var valid = ref.valid;
19962
+ var comp = ref.comp;
19963
+ var err = ref.err;
19964
+
19965
+ if (index === this$1.validateIndex) {
19966
+ err !== void 0 && console.error(err);
19900
19967
 
19901
19968
  emit(false, comp);
19902
19969
 
@@ -19907,9 +19974,9 @@
19907
19974
  ) {
19908
19975
  comp.focus();
19909
19976
  }
19910
-
19911
- return false
19912
19977
  }
19978
+
19979
+ return false
19913
19980
  }
19914
19981
  )
19915
19982
  },
@@ -19927,8 +19994,11 @@
19927
19994
 
19928
19995
  evt !== void 0 && stopAndPrevent(evt);
19929
19996
 
19997
+ var index = this.validateIndex + 1;
19998
+
19930
19999
  this.validate().then(function (val) {
19931
- if (val === true) {
20000
+ // if not outdated && validation succeeded
20001
+ if (index === this$1.validateIndex && val === true) {
19932
20002
  if (this$1.qListeners.submit !== void 0) {
19933
20003
  this$1.$emit('submit', evt);
19934
20004
  }
@@ -21116,7 +21186,7 @@
21116
21186
  ? this.__unmask(masked)
21117
21187
  : masked;
21118
21188
 
21119
- this.value !== val && this.__emitValue(val, true);
21189
+ String(this.value) !== val && this.__emitValue(val, true);
21120
21190
  },
21121
21191
 
21122
21192
  __moveCursorForPaste: function __moveCursorForPaste (inp, start, end) {
@@ -21950,6 +22020,9 @@
21950
22020
  },
21951
22021
 
21952
22022
  props: {
22023
+ innerMin: Number,
22024
+ innerMax: Number,
22025
+
21953
22026
  step: {
21954
22027
  type: Number,
21955
22028
  default: 1,
@@ -21966,31 +22039,22 @@
21966
22039
  },
21967
22040
 
21968
22041
  data: function data () {
22042
+ var innerMin = this.__getInnerMin(this.innerMin);
22043
+ var innerMax = this.__getInnerMax(this.innerMax);
22044
+
21969
22045
  return {
21970
- model: this.value,
22046
+ model: this.value === null ? innerMin : between(this.value, innerMin, innerMax),
21971
22047
  dragging: false
21972
22048
  }
21973
22049
  },
21974
22050
 
21975
22051
  watch: {
21976
- value: function value (value$1) {
21977
- if (value$1 < this.min) {
21978
- this.model = this.min;
21979
- }
21980
- else if (value$1 > this.max) {
21981
- this.model = this.max;
21982
- }
21983
- else {
21984
- if (value$1 !== this.model) {
21985
- this.model = value$1;
21986
- }
21987
- return
21988
- }
22052
+ modelUpdate: function modelUpdate () {
22053
+ this.model = this.value === null
22054
+ ? this.computedInnerMin
22055
+ : between(this.value, this.computedInnerMin, this.computedInnerMax);
21989
22056
 
21990
- if (this.model !== this.value) {
21991
- this.$emit('input', this.model);
21992
- this.$emit('change', this.model);
21993
- }
22057
+ this.__updateValue(true);
21994
22058
  }
21995
22059
  },
21996
22060
 
@@ -22003,6 +22067,18 @@
22003
22067
  )
22004
22068
  },
22005
22069
 
22070
+ computedInnerMin: function computedInnerMin () {
22071
+ return this.__getInnerMin(this.innerMin)
22072
+ },
22073
+
22074
+ computedInnerMax: function computedInnerMax () {
22075
+ return this.__getInnerMax(this.innerMax)
22076
+ },
22077
+
22078
+ modelUpdate: function modelUpdate () {
22079
+ return ((this.value) + "|" + (this.computedInnerMin) + "|" + (this.computedInnerMax))
22080
+ },
22081
+
22006
22082
  editable: function editable () {
22007
22083
  return this.disable === false && this.readonly === false
22008
22084
  },
@@ -22034,8 +22110,8 @@
22034
22110
  attrs: function attrs () {
22035
22111
  var attrs = {
22036
22112
  role: 'slider',
22037
- 'aria-valuemin': this.min,
22038
- 'aria-valuemax': this.max,
22113
+ 'aria-valuemin': this.computedInnerMin,
22114
+ 'aria-valuemax': this.computedInnerMax,
22039
22115
  'aria-valuenow': this.value
22040
22116
  };
22041
22117
 
@@ -22051,6 +22127,18 @@
22051
22127
  },
22052
22128
 
22053
22129
  methods: {
22130
+ __getInnerMin: function __getInnerMin (val) {
22131
+ return isNaN(val) === true || this.innerMin < this.min
22132
+ ? this.min
22133
+ : this.innerMin
22134
+ },
22135
+
22136
+ __getInnerMax: function __getInnerMax (val) {
22137
+ return isNaN(val) === true || val > this.max
22138
+ ? this.max
22139
+ : this.innerMax
22140
+ },
22141
+
22054
22142
  __updateCenterPosition: function __updateCenterPosition () {
22055
22143
  var ref = this.$el.getBoundingClientRect();
22056
22144
  var top = ref.top;
@@ -22096,8 +22184,8 @@
22096
22184
 
22097
22185
  this.model = between(
22098
22186
  parseFloat((this.model + offset).toFixed(this.decimals)),
22099
- this.min,
22100
- this.max
22187
+ this.computedInnerMin,
22188
+ this.computedInnerMax
22101
22189
  );
22102
22190
 
22103
22191
  this.__updateValue();
@@ -22154,7 +22242,7 @@
22154
22242
  model = parseFloat(model.toFixed(this.decimals));
22155
22243
  }
22156
22244
 
22157
- model = between(model, this.min, this.max);
22245
+ model = between(model, this.computedInnerMin, this.computedInnerMax);
22158
22246
 
22159
22247
  this.$emit('drag-value', model);
22160
22248
 
@@ -27062,7 +27150,7 @@
27062
27150
  };
27063
27151
 
27064
27152
  if (this$1.$q.platform.is.desktop === true) {
27065
- itemEvents.mousemove = function () { this$1.setOptionIndex(index); };
27153
+ itemEvents.mousemove = function () { this$1.menu === true && this$1.setOptionIndex(index); };
27066
27154
  }
27067
27155
 
27068
27156
  var option = {
@@ -35395,14 +35483,12 @@
35395
35483
  __onClick: function __onClick (node, meta, e, keyboard) {
35396
35484
  keyboard !== true && this.__blur(meta.key);
35397
35485
 
35398
- if (this.hasSelection) {
35399
- if (meta.selectable) {
35400
- if (this.noSelectionUnset === false) {
35401
- this.$emit('update:selected', meta.key !== this.selected ? meta.key : null);
35402
- }
35403
- else if (meta.key !== this.selected) {
35404
- this.$emit('update:selected', meta.key || null);
35405
- }
35486
+ if (this.hasSelection && meta.selectable) {
35487
+ if (this.noSelectionUnset === false) {
35488
+ this.$emit('update:selected', meta.key !== this.selected ? meta.key : null);
35489
+ }
35490
+ else if (meta.key !== this.selected) {
35491
+ this.$emit('update:selected', meta.key || null);
35406
35492
  }
35407
35493
  }
35408
35494
  else {