quasar 2.5.0 → 2.5.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 (164) hide show
  1. package/dist/api/QBtn.json +2 -2
  2. package/dist/api/QBtnDropdown.json +14 -14
  3. package/dist/api/QCarousel.json +1 -1
  4. package/dist/api/QCheckbox.json +1 -1
  5. package/dist/api/QChip.json +1 -1
  6. package/dist/api/QDialog.json +13 -13
  7. package/dist/api/QDrawer.json +16 -16
  8. package/dist/api/QExpansionItem.json +13 -13
  9. package/dist/api/QFab.json +13 -13
  10. package/dist/api/QFabAction.json +2 -2
  11. package/dist/api/QField.json +2 -2
  12. package/dist/api/QFile.json +1 -1
  13. package/dist/api/QForm.json +9 -3
  14. package/dist/api/QInput.json +2 -2
  15. package/dist/api/QKnob.json +18 -0
  16. package/dist/api/QMenu.json +13 -13
  17. package/dist/api/QPopupEdit.json +6 -6
  18. package/dist/api/QPopupProxy.json +13 -13
  19. package/dist/api/QRadio.json +1 -1
  20. package/dist/api/QRange.json +1 -1
  21. package/dist/api/QRouteTab.json +1 -1
  22. package/dist/api/QSelect.json +18 -4
  23. package/dist/api/QSlider.json +1 -1
  24. package/dist/api/QTable.json +6 -6
  25. package/dist/api/QToggle.json +1 -1
  26. package/dist/api/QTooltip.json +13 -13
  27. package/dist/api/QUploader.json +1 -1
  28. package/dist/api/TouchHold.json +1 -1
  29. package/dist/api/TouchPan.json +1 -1
  30. package/dist/api/TouchRepeat.json +1 -1
  31. package/dist/api/TouchSwipe.json +1 -1
  32. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  33. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  34. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  35. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  36. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  37. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  38. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  39. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  40. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  41. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  42. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  43. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  44. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  45. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  46. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  47. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  48. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  49. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  50. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  51. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
  52. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  53. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  54. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  55. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  56. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  57. package/dist/icon-set/svg-mdi-v4.umd.prod.js +1 -1
  58. package/dist/icon-set/svg-mdi-v5.umd.prod.js +1 -1
  59. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  60. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  61. package/dist/icon-set/themify.umd.prod.js +1 -1
  62. package/dist/lang/ar.umd.prod.js +1 -1
  63. package/dist/lang/az-Latn.umd.prod.js +1 -1
  64. package/dist/lang/bg.umd.prod.js +1 -1
  65. package/dist/lang/bn.umd.prod.js +1 -1
  66. package/dist/lang/ca.umd.prod.js +1 -1
  67. package/dist/lang/cs.umd.prod.js +1 -1
  68. package/dist/lang/da.umd.prod.js +1 -1
  69. package/dist/lang/de.umd.prod.js +1 -1
  70. package/dist/lang/el.umd.prod.js +1 -1
  71. package/dist/lang/en-GB.umd.prod.js +1 -1
  72. package/dist/lang/en-US.umd.prod.js +1 -1
  73. package/dist/lang/eo.umd.prod.js +1 -1
  74. package/dist/lang/es.umd.prod.js +1 -1
  75. package/dist/lang/et.umd.prod.js +1 -1
  76. package/dist/lang/fa-IR.umd.prod.js +1 -1
  77. package/dist/lang/fa.umd.prod.js +1 -1
  78. package/dist/lang/fi.umd.prod.js +1 -1
  79. package/dist/lang/fr.umd.prod.js +1 -1
  80. package/dist/lang/gn.umd.prod.js +1 -1
  81. package/dist/lang/he.umd.prod.js +1 -1
  82. package/dist/lang/hr.umd.prod.js +1 -1
  83. package/dist/lang/hu.umd.prod.js +1 -1
  84. package/dist/lang/id.umd.prod.js +1 -1
  85. package/dist/lang/is.umd.prod.js +1 -1
  86. package/dist/lang/it.umd.prod.js +1 -1
  87. package/dist/lang/ja.umd.prod.js +1 -1
  88. package/dist/lang/km.umd.prod.js +1 -1
  89. package/dist/lang/ko-KR.umd.prod.js +1 -1
  90. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  91. package/dist/lang/lt.umd.prod.js +1 -1
  92. package/dist/lang/lu.umd.prod.js +1 -1
  93. package/dist/lang/lv.umd.prod.js +1 -1
  94. package/dist/lang/ml.umd.prod.js +1 -1
  95. package/dist/lang/ms.umd.prod.js +1 -1
  96. package/dist/lang/my.umd.prod.js +1 -1
  97. package/dist/lang/nb-NO.umd.prod.js +1 -1
  98. package/dist/lang/nl.umd.prod.js +1 -1
  99. package/dist/lang/pl.umd.prod.js +1 -1
  100. package/dist/lang/pt-BR.umd.prod.js +1 -1
  101. package/dist/lang/pt.umd.prod.js +1 -1
  102. package/dist/lang/ro.umd.prod.js +1 -1
  103. package/dist/lang/ru.umd.prod.js +1 -1
  104. package/dist/lang/sk.umd.prod.js +1 -1
  105. package/dist/lang/sl.umd.prod.js +1 -1
  106. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  107. package/dist/lang/sr.umd.prod.js +1 -1
  108. package/dist/lang/sv.umd.prod.js +1 -1
  109. package/dist/lang/ta.umd.prod.js +1 -1
  110. package/dist/lang/th.umd.prod.js +1 -1
  111. package/dist/lang/tr.umd.prod.js +1 -1
  112. package/dist/lang/ug.umd.prod.js +1 -1
  113. package/dist/lang/uk.umd.prod.js +1 -1
  114. package/dist/lang/vi.umd.prod.js +1 -1
  115. package/dist/lang/zh-CN.umd.prod.js +1 -1
  116. package/dist/lang/zh-TW.umd.prod.js +1 -1
  117. package/dist/quasar.cjs.prod.js +2 -2
  118. package/dist/quasar.css +4 -0
  119. package/dist/quasar.esm.prod.js +2 -2
  120. package/dist/quasar.prod.css +1 -1
  121. package/dist/quasar.rtl.css +4 -0
  122. package/dist/quasar.rtl.prod.css +1 -1
  123. package/dist/quasar.sass +3 -1
  124. package/dist/quasar.umd.js +259 -171
  125. package/dist/quasar.umd.prod.js +2 -2
  126. package/dist/ssr-directives/Morph.js +1 -1
  127. package/dist/types/index.d.ts +103 -89
  128. package/dist/types/utils/date.d.ts +25 -13
  129. package/dist/vetur/quasar-attributes.json +8 -0
  130. package/dist/vetur/quasar-tags.json +2 -0
  131. package/dist/web-types/web-types.json +81 -55
  132. package/package.json +1 -1
  133. package/src/api-file-example.json +2 -2
  134. package/src/api.extends.json +21 -32
  135. package/src/components/btn/QBtn.json +3 -6
  136. package/src/components/carousel/QCarousel.json +2 -4
  137. package/src/components/checkbox/use-checkbox.json +2 -4
  138. package/src/components/chip/QChip.json +1 -3
  139. package/src/components/fab/QFabAction.json +1 -3
  140. package/src/components/field/QField.json +2 -6
  141. package/src/components/field/QField.sass +2 -0
  142. package/src/components/form/QForm.js +26 -24
  143. package/src/components/form/QForm.json +9 -7
  144. package/src/components/input/QInput.json +2 -6
  145. package/src/components/input/use-mask.js +2 -2
  146. package/src/components/knob/QKnob.js +46 -40
  147. package/src/components/knob/QKnob.json +16 -0
  148. package/src/components/radio/QRadio.json +2 -4
  149. package/src/components/select/QSelect.js +2 -1
  150. package/src/components/select/QSelect.json +17 -8
  151. package/src/components/slider/use-slider.json +1 -1
  152. package/src/components/table/QTable.json +5 -13
  153. package/src/components/tabs/QRouteTab.json +2 -3
  154. package/src/components/tabs/use-tab.js +11 -8
  155. package/src/components/tree/QTree.js +39 -41
  156. package/src/composables/private/use-file.json +1 -3
  157. package/src/composables/private/use-router-link.js +1 -1
  158. package/src/composables/private/use-validate.js +14 -18
  159. package/src/directives/TouchHold.json +2 -3
  160. package/src/directives/TouchPan.json +2 -3
  161. package/src/directives/TouchRepeat.json +2 -3
  162. package/src/directives/TouchSwipe.json +2 -3
  163. package/src/plugins/Screen.js +9 -5
  164. package/src/utils/date.js +110 -31
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Quasar Framework v2.5.0
2
+ * Quasar Framework v2.5.4
3
3
  * (c) 2015-present Razvan Stoenescu
4
4
  * Released under the MIT License.
5
5
  */
@@ -635,11 +635,15 @@
635
635
 
636
636
  const { visualViewport } = window;
637
637
  const target = visualViewport || window;
638
- const getSize = visualViewport === void 0
639
- ? () => [ window.innerWidth, window.innerHeight ]
638
+ const scrollingElement = document.scrollingElement || document.documentElement;
639
+ const getSize = visualViewport === void 0 || client.is.mobile === true
640
+ ? () => [
641
+ Math.max(window.innerWidth, scrollingElement.clientWidth),
642
+ Math.max(window.innerHeight, scrollingElement.clientHeight)
643
+ ]
640
644
  : () => [
641
- visualViewport.width * visualViewport.scale + window.innerWidth - document.scrollingElement.clientWidth,
642
- visualViewport.height * visualViewport.scale + window.innerHeight - document.scrollingElement.clientHeight
645
+ visualViewport.width * visualViewport.scale + window.innerWidth - scrollingElement.clientWidth,
646
+ visualViewport.height * visualViewport.scale + window.innerHeight - scrollingElement.clientHeight
643
647
  ];
644
648
 
645
649
  const classes = $q.config.screen !== void 0 && $q.config.screen.bodyClasses === true;
@@ -1459,7 +1463,7 @@
1459
1463
  }
1460
1464
 
1461
1465
  var installQuasar = function (parentApp, opts = {}) {
1462
- const $q = { version: '2.5.0' };
1466
+ const $q = { version: '2.5.4' };
1463
1467
 
1464
1468
  if (globalConfigIsFrozen === false) {
1465
1469
  if (opts.config !== void 0) {
@@ -2700,7 +2704,7 @@
2700
2704
  prevent(e);
2701
2705
 
2702
2706
  return proxy.$router[ props.replace === true ? 'replace' : 'push' ](props.to)
2703
- .catch(() => {})
2707
+ .catch(err => err)
2704
2708
  }
2705
2709
 
2706
2710
  return {
@@ -9907,9 +9911,12 @@
9907
9911
  $tabs.avoidRouteWatcher = false;
9908
9912
  }
9909
9913
  else {
9910
- res.then(() => {
9914
+ res.then(err => {
9911
9915
  $tabs.avoidRouteWatcher = false;
9912
- $tabs.updateModel({ name: props.name, fromRoute: true });
9916
+
9917
+ if (err === void 0) {
9918
+ $tabs.updateModel({ name: props.name, fromRoute: true });
9919
+ }
9913
9920
  });
9914
9921
  }
9915
9922
  };
@@ -9966,12 +9973,12 @@
9966
9973
  props.alert !== false && content.push(
9967
9974
  props.alertIcon !== void 0
9968
9975
  ? vue.h(QIcon, {
9969
- class: 'q-tab__alert-icon',
9970
- color: props.alert !== true
9971
- ? props.alert
9972
- : void 0,
9973
- name: props.alertIcon
9974
- })
9976
+ class: 'q-tab__alert-icon',
9977
+ color: props.alert !== true
9978
+ ? props.alert
9979
+ : void 0,
9980
+ name: props.alertIcon
9981
+ })
9975
9982
  : vue.h('div', {
9976
9983
  class: 'q-tab__alert'
9977
9984
  + (props.alert !== true ? ` text-${ props.alert }` : '')
@@ -11779,15 +11786,18 @@
11779
11786
  function applyYearMonthDayChange (date, mod, sign) {
11780
11787
  let
11781
11788
  year = date.getFullYear(),
11782
- month = date.getMonth(),
11783
- day = date.getDate();
11789
+ month = date.getMonth();
11784
11790
 
11785
- if (mod.years !== void 0) {
11786
- year += sign * mod.years;
11791
+ const day = date.getDate();
11792
+
11793
+ if (mod.year !== void 0) {
11794
+ year += sign * mod.year;
11795
+ delete mod.year;
11787
11796
  }
11788
11797
 
11789
- if (mod.months !== void 0) {
11790
- month += sign * mod.months;
11798
+ if (mod.month !== void 0) {
11799
+ month += sign * mod.month;
11800
+ delete mod.month;
11791
11801
  }
11792
11802
 
11793
11803
  date.setDate(1);
@@ -11797,30 +11807,14 @@
11797
11807
  date.setMonth(month);
11798
11808
  date.setDate(Math.min(day, daysInMonth(date)));
11799
11809
 
11800
- if (mod.days !== void 0) {
11801
- date.setDate(date.getDate() + sign * mod.days);
11810
+ if (mod.date !== void 0) {
11811
+ date.setDate(date.getDate() + sign * mod.date);
11812
+ delete mod.date;
11802
11813
  }
11803
11814
 
11804
11815
  return date
11805
11816
  }
11806
11817
 
11807
- function getChange (date, mod, sign) {
11808
- const
11809
- d = new Date(date),
11810
- t = mod.years !== void 0 || mod.months !== void 0 || mod.days !== void 0
11811
- ? applyYearMonthDayChange(d, mod, sign)
11812
- : d;
11813
-
11814
- for (const key in mod) {
11815
- if (key !== 'years' && key !== 'months' && key !== 'days') {
11816
- const op = capitalize(key);
11817
- t[ `set${ op }` ](t[ `get${ op }` ]() + sign * mod[ key ]);
11818
- }
11819
- }
11820
-
11821
- return t
11822
- }
11823
-
11824
11818
  function applyYearMonthDay (date, mod, middle) {
11825
11819
  const
11826
11820
  year = mod.year !== void 0 ? mod.year : date[ `get${ middle }FullYear` ](),
@@ -11835,22 +11829,86 @@
11835
11829
  date[ `set${ middle }Month` ](month);
11836
11830
  date[ `set${ middle }Date` ](day);
11837
11831
 
11832
+ delete mod.year;
11833
+ delete mod.month;
11834
+ delete mod.date;
11835
+
11838
11836
  return date
11839
11837
  }
11840
11838
 
11841
- function adjustDate (date, mod, utc) {
11839
+ function getChange (date, rawMod, sign) {
11842
11840
  const
11841
+ mod = normalizeMod(rawMod),
11842
+ d = new Date(date),
11843
+ t = mod.year !== void 0 || mod.month !== void 0 || mod.date !== void 0
11844
+ ? applyYearMonthDayChange(d, mod, sign) // removes year/month/day
11845
+ : d;
11846
+
11847
+ for (const key in mod) {
11848
+ const op = capitalize(key);
11849
+ t[ `set${ op }` ](t[ `get${ op }` ]() + sign * mod[ key ]);
11850
+ }
11851
+
11852
+ return t
11853
+ }
11854
+
11855
+ function normalizeMod (mod) {
11856
+ const acc = { ...mod };
11857
+
11858
+ if (mod.years !== void 0) {
11859
+ acc.year = mod.years;
11860
+ delete acc.years;
11861
+ }
11862
+
11863
+ if (mod.months !== void 0) {
11864
+ acc.month = mod.months;
11865
+ delete acc.months;
11866
+ }
11867
+
11868
+ if (mod.days !== void 0) {
11869
+ acc.date = mod.days;
11870
+ delete acc.days;
11871
+ }
11872
+ if (mod.day !== void 0) {
11873
+ acc.date = mod.day;
11874
+ delete acc.day;
11875
+ }
11876
+
11877
+ if (mod.hour !== void 0) {
11878
+ acc.hours = mod.hour;
11879
+ delete acc.hour;
11880
+ }
11881
+
11882
+ if (mod.minute !== void 0) {
11883
+ acc.minutes = mod.minute;
11884
+ delete acc.minute;
11885
+ }
11886
+
11887
+ if (mod.second !== void 0) {
11888
+ acc.seconds = mod.second;
11889
+ delete acc.second;
11890
+ }
11891
+
11892
+ if (mod.millisecond !== void 0) {
11893
+ acc.milliseconds = mod.millisecond;
11894
+ delete acc.millisecond;
11895
+ }
11896
+
11897
+ return acc
11898
+ }
11899
+
11900
+ function adjustDate (date, rawMod, utc) {
11901
+ const
11902
+ mod = normalizeMod(rawMod),
11843
11903
  middle = utc === true ? 'UTC' : '',
11844
11904
  d = new Date(date),
11845
11905
  t = mod.year !== void 0 || mod.month !== void 0 || mod.date !== void 0
11846
- ? applyYearMonthDay(d, mod, middle)
11906
+ ? applyYearMonthDay(d, mod, middle) // removes year/month/day
11847
11907
  : d;
11848
11908
 
11849
11909
  for (const key in mod) {
11850
- if (key !== 'year' && key !== 'month' && key !== 'date') {
11851
- const op = key.charAt(0).toUpperCase() + key.slice(1);
11852
- t[ `set${ middle }${ op }` ](mod[ key ]);
11853
- }
11910
+ const op = key.charAt(0).toUpperCase() + key.slice(1);
11911
+ t[ `set${ middle }${ op }` ](mod[ key ]);
11854
11912
  }
11855
11913
 
11856
11914
  return t
@@ -12084,16 +12142,23 @@
12084
12142
 
12085
12143
  switch (unit) {
12086
12144
  case 'year':
12145
+ case 'years':
12087
12146
  t[ `${ prefix }Month` ](0);
12088
12147
  case 'month':
12148
+ case 'months':
12089
12149
  t[ `${ prefix }Date` ](1);
12090
12150
  case 'day':
12151
+ case 'days':
12152
+ case 'date':
12091
12153
  t[ `${ prefix }Hours` ](0);
12092
12154
  case 'hour':
12155
+ case 'hours':
12093
12156
  t[ `${ prefix }Minutes` ](0);
12094
12157
  case 'minute':
12158
+ case 'minutes':
12095
12159
  t[ `${ prefix }Seconds` ](0);
12096
12160
  case 'second':
12161
+ case 'seconds':
12097
12162
  t[ `${ prefix }Milliseconds` ](0);
12098
12163
  }
12099
12164
  return t
@@ -12106,16 +12171,23 @@
12106
12171
 
12107
12172
  switch (unit) {
12108
12173
  case 'year':
12174
+ case 'years':
12109
12175
  t[ `${ prefix }Month` ](11);
12110
12176
  case 'month':
12177
+ case 'months':
12111
12178
  t[ `${ prefix }Date` ](daysInMonth(t));
12112
12179
  case 'day':
12180
+ case 'days':
12181
+ case 'date':
12113
12182
  t[ `${ prefix }Hours` ](23);
12114
12183
  case 'hour':
12184
+ case 'hours':
12115
12185
  t[ `${ prefix }Minutes` ](59);
12116
12186
  case 'minute':
12187
+ case 'minutes':
12117
12188
  t[ `${ prefix }Seconds` ](59);
12118
12189
  case 'second':
12190
+ case 'seconds':
12119
12191
  t[ `${ prefix }Milliseconds` ](999);
12120
12192
  }
12121
12193
  return t
@@ -12151,21 +12223,28 @@
12151
12223
 
12152
12224
  switch (unit) {
12153
12225
  case 'years':
12226
+ case 'year':
12154
12227
  return (t.getFullYear() - sub.getFullYear())
12155
12228
 
12156
12229
  case 'months':
12230
+ case 'month':
12157
12231
  return (t.getFullYear() - sub.getFullYear()) * 12 + t.getMonth() - sub.getMonth()
12158
12232
 
12159
12233
  case 'days':
12234
+ case 'day':
12235
+ case 'date':
12160
12236
  return getDiff(startOfDate(t, 'day'), startOfDate(sub, 'day'), MILLISECONDS_IN_DAY)
12161
12237
 
12162
12238
  case 'hours':
12239
+ case 'hour':
12163
12240
  return getDiff(startOfDate(t, 'hour'), startOfDate(sub, 'hour'), MILLISECONDS_IN_HOUR)
12164
12241
 
12165
12242
  case 'minutes':
12243
+ case 'minute':
12166
12244
  return getDiff(startOfDate(t, 'minute'), startOfDate(sub, 'minute'), MILLISECONDS_IN_MINUTE)
12167
12245
 
12168
12246
  case 'seconds':
12247
+ case 'second':
12169
12248
  return getDiff(startOfDate(t, 'second'), startOfDate(sub, 'second'), 1000)
12170
12249
  }
12171
12250
  }
@@ -12211,26 +12290,33 @@
12211
12290
 
12212
12291
  switch (unit) {
12213
12292
  case 'second':
12293
+ case 'seconds':
12214
12294
  if (t.getSeconds() !== d.getSeconds()) {
12215
12295
  return false
12216
12296
  }
12217
12297
  case 'minute': // intentional fall-through
12298
+ case 'minutes':
12218
12299
  if (t.getMinutes() !== d.getMinutes()) {
12219
12300
  return false
12220
12301
  }
12221
12302
  case 'hour': // intentional fall-through
12303
+ case 'hours':
12222
12304
  if (t.getHours() !== d.getHours()) {
12223
12305
  return false
12224
12306
  }
12225
12307
  case 'day': // intentional fall-through
12308
+ case 'days':
12309
+ case 'date':
12226
12310
  if (t.getDate() !== d.getDate()) {
12227
12311
  return false
12228
12312
  }
12229
12313
  case 'month': // intentional fall-through
12314
+ case 'months':
12230
12315
  if (t.getMonth() !== d.getMonth()) {
12231
12316
  return false
12232
12317
  }
12233
12318
  case 'year': // intentional fall-through
12319
+ case 'years':
12234
12320
  if (t.getFullYear() !== d.getFullYear()) {
12235
12321
  return false
12236
12322
  }
@@ -20307,7 +20393,14 @@
20307
20393
  else if (isDirtyModel.value === false) {
20308
20394
  isDirtyModel.value = true;
20309
20395
 
20310
- if (hasActiveRules.value === true && props.lazyRules !== 'ondemand') {
20396
+ if (
20397
+ hasActiveRules.value === true
20398
+ && props.lazyRules !== 'ondemand'
20399
+ // Don't re-trigger if it's already in progress;
20400
+ // It might mean that focus switched to submit btn and
20401
+ // QForm's submit() has been called already (ENTER key)
20402
+ && innerLoading.value === false
20403
+ ) {
20311
20404
  debouncedValidate();
20312
20405
  }
20313
20406
  }
@@ -20333,7 +20426,7 @@
20333
20426
  return true
20334
20427
  }
20335
20428
 
20336
- validateIndex++;
20429
+ const index = ++validateIndex;
20337
20430
 
20338
20431
  if (innerLoading.value !== true && props.lazyRules !== true) {
20339
20432
  isDirtyModel.value = true;
@@ -20350,9 +20443,7 @@
20350
20443
  innerErrorMessage.value = m;
20351
20444
  }
20352
20445
 
20353
- if (innerLoading.value !== false) {
20354
- innerLoading.value = false;
20355
- }
20446
+ innerLoading.value = false;
20356
20447
  };
20357
20448
 
20358
20449
  const promises = [];
@@ -20382,35 +20473,26 @@
20382
20473
  return true
20383
20474
  }
20384
20475
 
20385
- if (innerLoading.value !== true) {
20386
- innerLoading.value = true;
20387
- }
20388
-
20389
- const index = validateIndex;
20476
+ innerLoading.value = true;
20390
20477
 
20391
20478
  return Promise.all(promises).then(
20392
20479
  res => {
20393
- if (index !== validateIndex) {
20394
- return true
20395
- }
20396
-
20397
20480
  if (res === void 0 || Array.isArray(res) === false || res.length === 0) {
20398
- update(false);
20481
+ index === validateIndex && update(false);
20399
20482
  return true
20400
20483
  }
20401
20484
 
20402
20485
  const msg = res.find(r => r === false || typeof r === 'string');
20403
- update(msg !== void 0, msg);
20486
+ index === validateIndex && update(msg !== void 0, msg);
20404
20487
  return msg === void 0
20405
20488
  },
20406
20489
  e => {
20407
20490
  if (index === validateIndex) {
20408
20491
  console.error(e);
20409
20492
  update(true);
20410
- return false
20411
20493
  }
20412
20494
 
20413
- return true
20495
+ return false
20414
20496
  }
20415
20497
  )
20416
20498
  }
@@ -21570,7 +21652,7 @@
21570
21652
  ? shouldFocus
21571
21653
  : props.noErrorFocus !== true;
21572
21654
 
21573
- validateIndex++;
21655
+ const index = ++validateIndex;
21574
21656
 
21575
21657
  const emitEvent = (res, ref) => {
21576
21658
  emit('validation-' + (res === true ? 'success' : 'error'), ref);
@@ -21584,7 +21666,7 @@
21584
21666
  promises.push(
21585
21667
  valid.then(
21586
21668
  valid => ({ valid, comp }),
21587
- error => ({ valid: false, comp, error })
21669
+ err => ({ valid: false, comp, err })
21588
21670
  )
21589
21671
  );
21590
21672
  }
@@ -21608,34 +21690,33 @@
21608
21690
  return Promise.resolve(true)
21609
21691
  }
21610
21692
 
21611
- const index = validateIndex;
21612
-
21613
- return Promise.all(promises).then(
21614
- res => {
21615
- if (index === validateIndex) {
21616
- const errors = res.filter(r => r.valid !== true);
21693
+ return Promise.all(promises).then(res => {
21694
+ const errors = res.filter(r => r.valid !== true);
21617
21695
 
21618
- if (errors.length === 0) {
21619
- emitEvent(true);
21620
- return true
21621
- }
21696
+ if (errors.length === 0) {
21697
+ index === validateIndex && emitEvent(true);
21698
+ return true
21699
+ }
21622
21700
 
21623
- const { valid, comp } = errors[ 0 ];
21701
+ const { valid, comp, err } = errors[ 0 ];
21624
21702
 
21625
- emitEvent(false, comp);
21703
+ // if not outdated already
21704
+ if (index === validateIndex) {
21705
+ err !== void 0 && console.error(err);
21626
21706
 
21627
- if (
21628
- focus === true
21629
- && valid !== true
21630
- && typeof comp.focus === 'function'
21631
- ) {
21632
- comp.focus();
21633
- }
21707
+ emitEvent(false, comp);
21634
21708
 
21635
- return false
21709
+ if (
21710
+ focus === true
21711
+ && valid !== true
21712
+ && typeof comp.focus === 'function'
21713
+ ) {
21714
+ comp.focus();
21636
21715
  }
21637
21716
  }
21638
- )
21717
+
21718
+ return false
21719
+ })
21639
21720
  }
21640
21721
 
21641
21722
  function resetValidation () {
@@ -21649,8 +21730,11 @@
21649
21730
  function submit (evt) {
21650
21731
  evt !== void 0 && stopAndPrevent(evt);
21651
21732
 
21733
+ const index = validateIndex + 1;
21734
+
21652
21735
  validate().then(val => {
21653
- if (val === true) {
21736
+ // if not outdated && validation succeeded
21737
+ if (index === validateIndex && val === true) {
21654
21738
  if (props.onSubmit !== void 0) {
21655
21739
  emit('submit', evt);
21656
21740
  }
@@ -22826,7 +22910,7 @@
22826
22910
  ? unmaskValue(masked)
22827
22911
  : masked;
22828
22912
 
22829
- props.modelValue !== val && emitValue(val, true);
22913
+ String(props.modelValue) !== val && emitValue(val, true);
22830
22914
  }
22831
22915
 
22832
22916
  function moveCursorForPaste (inp, start, end) {
@@ -23721,6 +23805,9 @@
23721
23805
  required: true
23722
23806
  },
23723
23807
 
23808
+ innerMin: Number,
23809
+ innerMax: Number,
23810
+
23724
23811
  step: {
23725
23812
  type: Number,
23726
23813
  default: 1,
@@ -23745,27 +23832,33 @@
23745
23832
  const model = vue.ref(props.modelValue);
23746
23833
  const dragging = vue.ref(false);
23747
23834
 
23748
- let centerPosition, $el;
23835
+ const innerMin = vue.computed(() => (
23836
+ isNaN(props.innerMin) === true || props.innerMin < props.min
23837
+ ? props.min
23838
+ : props.innerMin
23839
+ ));
23840
+ const innerMax = vue.computed(() => (
23841
+ isNaN(props.innerMax) === true || props.innerMax > props.max
23842
+ ? props.max
23843
+ : props.innerMax
23844
+ ));
23749
23845
 
23750
- vue.watch(() => props.modelValue, val => {
23751
- if (val < props.min) {
23752
- model.value = props.min;
23753
- }
23754
- else if (val > props.max) {
23755
- model.value = props.max;
23756
- }
23757
- else {
23758
- if (val !== model.value) {
23759
- model.value = val;
23760
- }
23761
- return
23762
- }
23846
+ let centerPosition;
23763
23847
 
23764
- if (model.value !== props.modelValue) {
23765
- emit('update:modelValue', model.value);
23766
- emit('change', model.value);
23767
- }
23768
- });
23848
+ function normalizeModel () {
23849
+ model.value = props.modelValue === null
23850
+ ? innerMin.value
23851
+ : between(props.modelValue, innerMin.value, innerMax.value);
23852
+
23853
+ updateValue(true);
23854
+ }
23855
+
23856
+ vue.watch(
23857
+ () => `${ props.modelValue }|${ innerMin.value }|${ innerMax.value }`,
23858
+ normalizeModel
23859
+ );
23860
+
23861
+ normalizeModel();
23769
23862
 
23770
23863
  const editable = vue.computed(() => props.disable === false && props.readonly === false);
23771
23864
 
@@ -23833,7 +23926,7 @@
23833
23926
  });
23834
23927
 
23835
23928
  function updateCenterPosition () {
23836
- const { top, left, width, height } = $el.getBoundingClientRect();
23929
+ const { top, left, width, height } = proxy.$el.getBoundingClientRect();
23837
23930
  centerPosition = {
23838
23931
  top: top + height / 2,
23839
23932
  left: left + width / 2
@@ -23863,8 +23956,8 @@
23863
23956
 
23864
23957
  model.value = between(
23865
23958
  parseFloat((model.value + offset).toFixed(decimals.value)),
23866
- props.min,
23867
- props.max
23959
+ innerMin.value,
23960
+ innerMax.value
23868
23961
  );
23869
23962
 
23870
23963
  updateValue();
@@ -23907,7 +24000,7 @@
23907
24000
  newModel = parseFloat(newModel.toFixed(decimals.value));
23908
24001
  }
23909
24002
 
23910
- newModel = between(newModel, props.min, props.max);
24003
+ newModel = between(newModel, innerMin.value, innerMax.value);
23911
24004
 
23912
24005
  emit('drag-value', newModel);
23913
24006
 
@@ -23935,16 +24028,12 @@
23935
24028
  return vue.h('input', formAttrs.value)
23936
24029
  }
23937
24030
 
23938
- vue.onMounted(() => {
23939
- $el = proxy.$el;
23940
- });
23941
-
23942
24031
  return () => {
23943
24032
  const data = {
23944
24033
  class: classes.value,
23945
24034
  role: 'slider',
23946
- 'aria-valuemin': props.min,
23947
- 'aria-valuemax': props.max,
24035
+ 'aria-valuemin': innerMin.value,
24036
+ 'aria-valuemax': innerMax.value,
23948
24037
  'aria-valuenow': props.modelValue,
23949
24038
  ...attrs.value,
23950
24039
  ...circularProps.value,
@@ -23957,18 +24046,18 @@
23957
24046
  default: slots.default
23958
24047
  };
23959
24048
 
23960
- if (editable.value === true) {
23961
- if (props.name !== void 0) {
23962
- child.internal = getNameInput;
23963
- }
23964
-
23965
- return vue.withDirectives(
23966
- vue.h(QCircularProgress, data, child),
23967
- directives.value
23968
- )
24049
+ if (editable.value === true && props.name !== void 0) {
24050
+ child.internal = getNameInput;
23969
24051
  }
23970
24052
 
23971
- return vue.h(QCircularProgress, data, child)
24053
+ return hDir(
24054
+ QCircularProgress,
24055
+ data,
24056
+ child,
24057
+ 'knob',
24058
+ editable.value,
24059
+ () => directives.value
24060
+ )
23972
24061
  }
23973
24062
  }
23974
24063
  });
@@ -28370,7 +28459,7 @@
28370
28459
  itemProps[ 'aria-selected' ] = itemProps.active === true ? 'true' : 'false';
28371
28460
 
28372
28461
  if ($q.platform.is.desktop === true) {
28373
- itemProps.onMousemove = () => { setOptionIndex(index); };
28462
+ itemProps.onMousemove = () => { menu.value === true && setOptionIndex(index); };
28374
28463
  }
28375
28464
  }
28376
28465
 
@@ -29418,6 +29507,7 @@
29418
29507
  Object.assign(proxy, {
29419
29508
  showPopup, hidePopup,
29420
29509
  removeAtIndex, add, toggleOption,
29510
+ getOptionIndex: () => optionIndex.value,
29421
29511
  setOptionIndex, moveOptionSelection,
29422
29512
  filter, updateMenuPosition, updateInputValue,
29423
29513
  isOptionSelected,
@@ -35976,34 +36066,34 @@
35976
36066
 
35977
36067
  m.lazy === 'loading'
35978
36068
  ? vue.h(QSpinner, {
35979
- class: 'q-tree__spinner',
35980
- color: computedControlColor.value
35981
- })
36069
+ class: 'q-tree__spinner',
36070
+ color: computedControlColor.value
36071
+ })
35982
36072
  : (
35983
36073
  isParent === true
35984
36074
  ? vue.h(QIcon, {
35985
- class: 'q-tree__arrow'
36075
+ class: 'q-tree__arrow'
35986
36076
  + (m.expanded === true ? ' q-tree__arrow--rotate' : ''),
35987
- name: computedIcon.value,
35988
- onClick (e) { onExpandClick(node, m, e); }
35989
- })
36077
+ name: computedIcon.value,
36078
+ onClick (e) { onExpandClick(node, m, e); }
36079
+ })
35990
36080
  : null
35991
36081
  ),
35992
36082
 
35993
36083
  m.hasTicking === true && m.noTick !== true
35994
36084
  ? vue.h(QCheckbox, {
35995
- class: 'q-tree__tickbox',
35996
- modelValue: m.indeterminate === true ? null : m.ticked,
35997
- color: computedControlColor.value,
35998
- dark: isDark.value,
35999
- dense: true,
36000
- keepColor: true,
36001
- disable: m.tickable !== true,
36002
- onKeydown: stopAndPrevent,
36003
- 'onUpdate:modelValue': v => {
36004
- onTickedClick(m, v);
36005
- }
36006
- })
36085
+ class: 'q-tree__tickbox',
36086
+ modelValue: m.indeterminate === true ? null : m.ticked,
36087
+ color: computedControlColor.value,
36088
+ dark: isDark.value,
36089
+ dense: true,
36090
+ keepColor: true,
36091
+ disable: m.tickable !== true,
36092
+ onKeydown: stopAndPrevent,
36093
+ 'onUpdate:modelValue': v => {
36094
+ onTickedClick(m, v);
36095
+ }
36096
+ })
36007
36097
  : null,
36008
36098
 
36009
36099
  vue.h('div', {
@@ -36021,22 +36111,22 @@
36021
36111
 
36022
36112
  isParent === true
36023
36113
  ? vue.h(QSlideTransition, {
36024
- duration: props.duration,
36025
- onShow,
36026
- onHide
36027
- }, () => vue.withDirectives(
36114
+ duration: props.duration,
36115
+ onShow,
36116
+ onHide
36117
+ }, () => vue.withDirectives(
36118
+ vue.h('div', {
36119
+ class: 'q-tree__node-collapsible' + textColorClass.value,
36120
+ key: `${ key }__q`
36121
+ }, [
36122
+ body,
36028
36123
  vue.h('div', {
36029
- class: 'q-tree__node-collapsible' + textColorClass.value,
36030
- key: `${ key }__q`
36031
- }, [
36032
- body,
36033
- vue.h('div', {
36034
- class: 'q-tree__children'
36124
+ class: 'q-tree__children'
36035
36125
  + (m.disabled === true ? ' q-tree__node--disabled' : '')
36036
- }, children)
36037
- ]),
36038
- [ [ vue.vShow, m.expanded ] ]
36039
- ))
36126
+ }, children)
36127
+ ]),
36128
+ [ [ vue.vShow, m.expanded ] ]
36129
+ ))
36040
36130
  : body
36041
36131
  ])
36042
36132
  }
@@ -36049,14 +36139,12 @@
36049
36139
  function onClick (node, meta, e, keyboard) {
36050
36140
  keyboard !== true && blur(meta.key);
36051
36141
 
36052
- if (hasSelection.value) {
36053
- if (meta.selectable) {
36054
- if (props.noSelectionUnset === false) {
36055
- emit('update:selected', meta.key !== props.selected ? meta.key : null);
36056
- }
36057
- else if (meta.key !== props.selected) {
36058
- emit('update:selected', meta.key || null);
36059
- }
36142
+ if (hasSelection.value && meta.selectable) {
36143
+ if (props.noSelectionUnset === false) {
36144
+ emit('update:selected', meta.key !== props.selected ? meta.key : null);
36145
+ }
36146
+ else if (meta.key !== props.selected) {
36147
+ emit('update:selected', meta.key || null);
36060
36148
  }
36061
36149
  }
36062
36150
  else {
@@ -39439,7 +39527,7 @@
39439
39527
  });
39440
39528
 
39441
39529
  var index_umd = {
39442
- version: '2.5.0',
39530
+ version: '2.5.4',
39443
39531
  install (app, opts) {
39444
39532
  installQuasar(app, {
39445
39533
  components,