quasar 2.4.9 → 2.4.13

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 (182) hide show
  1. package/dist/api/BottomSheet.json +4 -0
  2. package/dist/api/Dialog.json +5 -1
  3. package/dist/api/LoadingBar.json +7 -0
  4. package/dist/api/Notify.json +20 -10
  5. package/dist/api/Platform.json +171 -0
  6. package/dist/api/QAjaxBar.json +13 -1
  7. package/dist/api/QBtnDropdown.json +4 -2
  8. package/dist/api/QEditor.json +4 -2
  9. package/dist/api/QExpansionItem.json +6 -3
  10. package/dist/api/QFab.json +4 -2
  11. package/dist/api/QFabAction.json +4 -2
  12. package/dist/api/QFile.json +5 -2
  13. package/dist/api/QImg.json +1 -2
  14. package/dist/api/QInnerLoading.json +2 -1
  15. package/dist/api/QInput.json +4 -2
  16. package/dist/api/QPagination.json +4 -2
  17. package/dist/api/QRange.json +9 -0
  18. package/dist/api/QScrollArea.json +13 -5
  19. package/dist/api/QSelect.json +6 -3
  20. package/dist/api/QSlider.json +9 -0
  21. package/dist/api/QSplitter.json +8 -4
  22. package/dist/api/QTable.json +9 -0
  23. package/dist/api/QTree.json +7 -0
  24. package/dist/api/QUploader.json +3 -1
  25. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  26. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  27. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  28. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  29. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  30. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  31. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  32. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  33. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  34. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  35. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  36. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  37. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  38. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  39. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  40. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  41. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  42. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  43. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  44. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
  45. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  46. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  47. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  48. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  49. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  50. package/dist/icon-set/svg-mdi-v4.umd.prod.js +1 -1
  51. package/dist/icon-set/svg-mdi-v5.umd.prod.js +1 -1
  52. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  53. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  54. package/dist/icon-set/themify.umd.prod.js +1 -1
  55. package/dist/lang/ar.umd.prod.js +1 -1
  56. package/dist/lang/az-Latn.umd.prod.js +1 -1
  57. package/dist/lang/bg.umd.prod.js +1 -1
  58. package/dist/lang/bn.umd.prod.js +1 -1
  59. package/dist/lang/ca.umd.prod.js +1 -1
  60. package/dist/lang/cs.umd.prod.js +1 -1
  61. package/dist/lang/da.umd.prod.js +1 -1
  62. package/dist/lang/de.umd.prod.js +1 -1
  63. package/dist/lang/el.umd.prod.js +1 -1
  64. package/dist/lang/en-GB.umd.prod.js +1 -1
  65. package/dist/lang/en-US.umd.prod.js +1 -1
  66. package/dist/lang/eo.umd.prod.js +1 -1
  67. package/dist/lang/es.umd.prod.js +1 -1
  68. package/dist/lang/et.umd.prod.js +1 -1
  69. package/dist/lang/fa-IR.umd.prod.js +1 -1
  70. package/dist/lang/fa.umd.prod.js +1 -1
  71. package/dist/lang/fi.umd.prod.js +1 -1
  72. package/dist/lang/fr.umd.prod.js +1 -1
  73. package/dist/lang/gn.umd.prod.js +1 -1
  74. package/dist/lang/he.umd.prod.js +1 -1
  75. package/dist/lang/hr.umd.prod.js +1 -1
  76. package/dist/lang/hu.umd.prod.js +1 -1
  77. package/dist/lang/id.umd.prod.js +1 -1
  78. package/dist/lang/is.umd.prod.js +1 -1
  79. package/dist/lang/it.umd.prod.js +1 -1
  80. package/dist/lang/ja.umd.prod.js +1 -1
  81. package/dist/lang/km.umd.prod.js +1 -1
  82. package/dist/lang/ko-KR.umd.prod.js +1 -1
  83. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  84. package/dist/lang/lt.umd.prod.js +1 -1
  85. package/dist/lang/lu.umd.prod.js +1 -1
  86. package/dist/lang/lv.umd.prod.js +1 -1
  87. package/dist/lang/ml.umd.prod.js +1 -1
  88. package/dist/lang/ms.umd.prod.js +1 -1
  89. package/dist/lang/my.umd.prod.js +1 -1
  90. package/dist/lang/nb-NO.umd.prod.js +1 -1
  91. package/dist/lang/nl.umd.prod.js +1 -1
  92. package/dist/lang/pl.umd.prod.js +1 -1
  93. package/dist/lang/pt-BR.umd.prod.js +1 -1
  94. package/dist/lang/pt.umd.prod.js +1 -1
  95. package/dist/lang/ro.umd.prod.js +1 -1
  96. package/dist/lang/ru.umd.prod.js +1 -1
  97. package/dist/lang/sk.umd.prod.js +1 -1
  98. package/dist/lang/sl.umd.prod.js +1 -1
  99. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  100. package/dist/lang/sr.umd.prod.js +1 -1
  101. package/dist/lang/sv.umd.prod.js +1 -1
  102. package/dist/lang/ta.umd.prod.js +1 -1
  103. package/dist/lang/th.umd.prod.js +1 -1
  104. package/dist/lang/tr.umd.prod.js +1 -1
  105. package/dist/lang/ug.umd.prod.js +1 -1
  106. package/dist/lang/uk.umd.prod.js +1 -1
  107. package/dist/lang/vi.umd.prod.js +1 -1
  108. package/dist/lang/zh-CN.umd.prod.js +1 -1
  109. package/dist/lang/zh-TW.umd.prod.js +1 -1
  110. package/dist/quasar.cjs.prod.js +2 -2
  111. package/dist/quasar.css +8 -1
  112. package/dist/quasar.esm.prod.js +2 -2
  113. package/dist/quasar.prod.css +1 -1
  114. package/dist/quasar.rtl.css +8 -1
  115. package/dist/quasar.rtl.prod.css +1 -1
  116. package/dist/quasar.sass +7 -1
  117. package/dist/quasar.umd.js +193 -92
  118. package/dist/quasar.umd.prod.js +2 -2
  119. package/dist/ssr-directives/Morph.js +1 -1
  120. package/dist/types/api/qfile.d.ts +8 -0
  121. package/dist/types/api/qselect.d.ts +4 -0
  122. package/dist/types/api/qtable.d.ts +12 -0
  123. package/dist/types/api/qtree.d.ts +31 -0
  124. package/dist/types/api/quploader.d.ts +28 -0
  125. package/dist/types/api/slider.d.ts +6 -7
  126. package/dist/types/api/touchswipe.d.ts +11 -0
  127. package/dist/types/api/validation.d.ts +1 -1
  128. package/dist/types/api/vue-prop-types.ts +15 -0
  129. package/dist/types/api.d.ts +7 -0
  130. package/dist/types/index.d.ts +426 -415
  131. package/dist/types/ts-helpers.d.ts +6 -2
  132. package/dist/types/utils/dom.d.ts +4 -2
  133. package/dist/types/utils.d.ts +7 -2
  134. package/dist/vetur/quasar-attributes.json +34 -30
  135. package/dist/vetur/quasar-tags.json +1 -0
  136. package/dist/web-types/web-types.json +41 -31
  137. package/package.json +1 -1
  138. package/src/components/ajax-bar/QAjaxBar.js +22 -12
  139. package/src/components/ajax-bar/QAjaxBar.json +16 -1
  140. package/src/components/btn-dropdown/QBtnDropdown.json +4 -2
  141. package/src/components/date/QDate.js +6 -1
  142. package/src/components/dialog/QDialog.js +1 -1
  143. package/src/components/dialog-plugin/DialogPlugin.js +1 -1
  144. package/src/components/editor/QEditor.js +1 -1
  145. package/src/components/editor/QEditor.json +3 -1
  146. package/src/components/expansion-item/QExpansionItem.json +6 -3
  147. package/src/components/fab/use-fab.json +4 -2
  148. package/src/components/file/QFile.json +4 -2
  149. package/src/components/form/QForm.js +12 -2
  150. package/src/components/img/QImg.json +2 -3
  151. package/src/components/infinite-scroll/QInfiniteScroll.js +3 -2
  152. package/src/components/inner-loading/QInnerLoading.json +2 -1
  153. package/src/components/input/QInput.js +1 -1
  154. package/src/components/input/QInput.json +4 -2
  155. package/src/components/menu/QMenu.js +2 -1
  156. package/src/components/pagination/QPagination.json +4 -2
  157. package/src/components/scroll-area/QScrollArea.js +21 -1
  158. package/src/components/scroll-area/QScrollArea.json +13 -5
  159. package/src/components/select/QSelect.js +32 -27
  160. package/src/components/select/QSelect.json +6 -3
  161. package/src/components/select/QSelect.sass +4 -0
  162. package/src/components/slider/use-slider.json +9 -0
  163. package/src/components/splitter/QSplitter.json +8 -4
  164. package/src/components/stepper/QStep.js +19 -14
  165. package/src/components/stepper/QStepper.sass +3 -0
  166. package/src/components/table/QTable.json +9 -0
  167. package/src/components/tabs/QTabs.js +10 -2
  168. package/src/components/tree/QTree.js +8 -1
  169. package/src/components/tree/QTree.json +8 -0
  170. package/src/components/uploader/uploader-core.js +2 -0
  171. package/src/components/uploader/xhr-uploader-plugin.json +2 -1
  172. package/src/components/virtual-scroll/use-virtual-scroll.js +20 -9
  173. package/src/composables/private/use-field.js +16 -9
  174. package/src/composables/private/use-file.json +1 -0
  175. package/src/plugins/BottomSheet.json +1 -0
  176. package/src/plugins/Dialog.json +1 -0
  177. package/src/plugins/LoadingBar.js +3 -3
  178. package/src/plugins/LoadingBar.json +8 -0
  179. package/src/plugins/Notify.json +20 -10
  180. package/src/plugins/Platform.js +15 -8
  181. package/src/plugins/Platform.json +166 -0
  182. package/src/utils/private/global-dialog.json +3 -0
package/dist/quasar.sass CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Quasar Framework v2.4.9
2
+ * Quasar Framework v2.4.13
3
3
  * (c) 2015-present Razvan Stoenescu
4
4
  * Released under the MIT License.
5
5
  */
@@ -3260,9 +3260,13 @@ body.desktop
3260
3260
  cursor: text
3261
3261
  .q-field__input
3262
3262
  min-width: 50px !important
3263
+ cursor: text
3263
3264
  &--padding
3264
3265
  padding-left: 4px
3266
+ &__focus-target,
3265
3267
  &__autocomplete-input
3268
+ position: absolute
3269
+ outline: 0 !important
3266
3270
  width: 0
3267
3271
  height: 0
3268
3272
  padding: 0
@@ -3812,6 +3816,7 @@ body.platform-ios
3812
3816
  font-size: 12px
3813
3817
  line-height: 14px
3814
3818
  &__dot
3819
+ contain: layout
3815
3820
  margin-right: 8px
3816
3821
  font-size: 14px
3817
3822
  width: 24px
@@ -3921,6 +3926,7 @@ body.platform-ios
3921
3926
  .q-stepper__tab
3922
3927
  overflow: hidden
3923
3928
  .q-stepper__line
3929
+ contain: layout
3924
3930
  &:before, &:after
3925
3931
  position: absolute
3926
3932
  top: 50%
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Quasar Framework v2.4.9
2
+ * Quasar Framework v2.4.13
3
3
  * (c) 2015-present Razvan Stoenescu
4
4
  * Released under the MIT License.
5
5
  */
@@ -40,19 +40,15 @@
40
40
  let iosCorrection;
41
41
 
42
42
  function getMatch (userAgent, platformMatch) {
43
- const match = /(edge|edga|edgios)\/([\w.]+)/.exec(userAgent)
43
+ const match = /(edg|edge|edga|edgios)\/([\w.]+)/.exec(userAgent)
44
44
  || /(opr)[\/]([\w.]+)/.exec(userAgent)
45
45
  || /(vivaldi)[\/]([\w.]+)/.exec(userAgent)
46
46
  || /(chrome|crios)[\/]([\w.]+)/.exec(userAgent)
47
- || /(iemobile)[\/]([\w.]+)/.exec(userAgent)
48
47
  || /(version)(applewebkit)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(userAgent)
49
48
  || /(webkit)[\/]([\w.]+).*(version)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(userAgent)
50
49
  || /(firefox|fxios)[\/]([\w.]+)/.exec(userAgent)
51
50
  || /(webkit)[\/]([\w.]+)/.exec(userAgent)
52
51
  || /(opera)(?:.*version|)[\/]([\w.]+)/.exec(userAgent)
53
- || /(msie) ([\w.]+)/.exec(userAgent)
54
- || (userAgent.indexOf('trident') >= 0 && /(rv)(?::| )([\w.]+)/.exec(userAgent))
55
- || (userAgent.indexOf('compatible') < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(userAgent))
56
52
  || [];
57
53
 
58
54
  return {
@@ -75,6 +71,8 @@
75
71
  || /(mac)/.exec(userAgent)
76
72
  || /(linux)/.exec(userAgent)
77
73
  || /(cros)/.exec(userAgent)
74
+ // TODO: Remove BlackBerry detection. BlackBerry OS, BlackBerry 10, and BlackBerry PlayBook OS
75
+ // is officially dead as of January 4, 2022 (https://www.blackberry.com/us/en/support/devices/end-of-life)
78
76
  || /(playbook)/.exec(userAgent)
79
77
  || /(bb)/.exec(userAgent)
80
78
  || /(blackberry)/.exec(userAgent)
@@ -164,6 +162,10 @@
164
162
  delete browser[ 'windows phone' ];
165
163
  }
166
164
 
165
+ // TODO: The assumption about WebKit based browsers below is not completely accurate.
166
+ // Google released Blink(a fork of WebKit) engine on April 3, 2013, which is really different than WebKit today.
167
+ // Today, one might want to check for WebKit to deal with its bugs, which is used on all browsers on iOS, and Safari browser on all platforms.
168
+
167
169
  // Chrome, Opera 15+, Vivaldi and Safari are webkit based browsers
168
170
  if (
169
171
  browser.chrome
@@ -180,8 +182,15 @@
180
182
  browser.webkit = true;
181
183
  }
182
184
 
185
+ // TODO: (Qv3) rename the terms 'edge' to 'edge legacy'(or remove it) then 'edge chromium' to 'edge' to match with the known up-to-date terms
186
+ // Microsoft Edge is the new Chromium-based browser. Microsoft Edge Legacy is the old EdgeHTML-based browser (EOL: March 9, 2021).
187
+ if (browser.edg) {
188
+ matched.browser = 'edgechromium';
189
+ browser.edgeChromium = true;
190
+ }
191
+
183
192
  // Blackberry browsers are marked as Safari on BlackBerry
184
- if (browser.safari && browser.blackberry || browser.bb) {
193
+ if ((browser.safari && browser.blackberry) || browser.bb) {
185
194
  matched.browser = 'blackberry';
186
195
  browser.blackberry = true;
187
196
  }
@@ -1447,7 +1456,7 @@
1447
1456
  }
1448
1457
 
1449
1458
  var installQuasar = function (parentApp, opts = {}) {
1450
- const $q = { version: '2.4.9' };
1459
+ const $q = { version: '2.4.13' };
1451
1460
 
1452
1461
  if (globalConfigIsFrozen === false) {
1453
1462
  if (opts.config !== void 0) {
@@ -1646,7 +1655,7 @@
1646
1655
  const onScreen = vue.ref(false);
1647
1656
  const animate = vue.ref(true);
1648
1657
 
1649
- let calls = 0, timer, speed;
1658
+ let sessions = 0, timer, speed;
1650
1659
 
1651
1660
  const classes = vue.computed(() =>
1652
1661
  `q-loading-bar q-loading-bar--${ props.position }`
@@ -1692,16 +1701,17 @@
1692
1701
  const oldSpeed = speed;
1693
1702
  speed = Math.max(0, newSpeed) || 0;
1694
1703
 
1695
- calls++;
1704
+ sessions++;
1696
1705
 
1697
- if (calls > 1) {
1706
+ if (sessions > 1) {
1698
1707
  if (oldSpeed === 0 && newSpeed > 0) {
1699
1708
  planNextStep();
1700
1709
  }
1701
1710
  else if (oldSpeed > 0 && newSpeed <= 0) {
1702
1711
  clearTimeout(timer);
1703
1712
  }
1704
- return
1713
+
1714
+ return sessions
1705
1715
  }
1706
1716
 
1707
1717
  clearTimeout(timer);
@@ -1709,25 +1719,32 @@
1709
1719
 
1710
1720
  progress.value = 0;
1711
1721
 
1712
- if (onScreen.value === true) { return }
1713
-
1714
- onScreen.value = true;
1715
- animate.value = false;
1716
1722
  timer = setTimeout(() => {
1717
1723
  animate.value = true;
1718
1724
  newSpeed > 0 && planNextStep();
1719
- }, 100);
1725
+ }, onScreen.value === true ? 500 : 1);
1726
+
1727
+ if (onScreen.value !== true) {
1728
+ onScreen.value = true;
1729
+ animate.value = false;
1730
+ }
1731
+
1732
+ return sessions
1720
1733
  }
1721
1734
 
1722
1735
  function increment (amount) {
1723
- if (calls > 0) {
1736
+ if (sessions > 0) {
1724
1737
  progress.value = inc(progress.value, amount);
1725
1738
  }
1739
+
1740
+ return sessions
1726
1741
  }
1727
1742
 
1728
1743
  function stop () {
1729
- calls = Math.max(0, calls - 1);
1730
- if (calls > 0) { return }
1744
+ sessions = Math.max(0, sessions - 1);
1745
+ if (sessions > 0) {
1746
+ return sessions
1747
+ }
1731
1748
 
1732
1749
  clearTimeout(timer);
1733
1750
  emit('stop');
@@ -1746,6 +1763,8 @@
1746
1763
  else {
1747
1764
  end();
1748
1765
  }
1766
+
1767
+ return sessions
1749
1768
  }
1750
1769
 
1751
1770
  function planNextStep () {
@@ -5112,7 +5131,7 @@
5112
5131
 
5113
5132
  if (node && node.contains(document.activeElement) !== true) {
5114
5133
  node = node.querySelector('[autofocus], [data-autofocus]') || node;
5115
- node.focus();
5134
+ node.focus({ preventScroll: true });
5116
5135
  }
5117
5136
  });
5118
5137
  }
@@ -5240,6 +5259,7 @@
5240
5259
  // the focus is not in a vue child component
5241
5260
  if (
5242
5261
  handlesFocus.value === true
5262
+ && props.noFocus !== true
5243
5263
  && childHasFocus(innerRef.value, evt.target) !== true
5244
5264
  ) {
5245
5265
  focus();
@@ -9690,7 +9710,15 @@
9690
9710
  unwatchRoute !== void 0 && unwatchRoute();
9691
9711
  });
9692
9712
 
9693
- vue.onActivated(recalculateScroll);
9713
+ let shouldActivate = false;
9714
+
9715
+ vue.onDeactivated(() => {
9716
+ shouldActivate = true;
9717
+ });
9718
+
9719
+ vue.onActivated(() => {
9720
+ shouldActivate === true && recalculateScroll();
9721
+ });
9694
9722
 
9695
9723
  return () => {
9696
9724
  const child = [
@@ -12603,7 +12631,12 @@
12603
12631
  normalizedModel.value
12604
12632
  .filter(date => typeof date === 'string')
12605
12633
  .map(date => decodeString(date, innerMask.value, innerLocale.value))
12606
- .filter(date => date.dateHash !== null)
12634
+ .filter(date =>
12635
+ date.dateHash !== null
12636
+ && date.day !== null
12637
+ && date.month !== null
12638
+ && date.year !== null
12639
+ )
12607
12640
  );
12608
12641
 
12609
12642
  const rangeModel = vue.computed(() => {
@@ -14385,7 +14418,7 @@
14385
14418
  }
14386
14419
 
14387
14420
  node = node.querySelector('[autofocus], [data-autofocus]') || node;
14388
- node.focus();
14421
+ node.focus({ preventScroll: true });
14389
14422
  });
14390
14423
  }
14391
14424
 
@@ -16887,7 +16920,7 @@
16887
16920
 
16888
16921
  function focus () {
16889
16922
  addFocusFn(() => {
16890
- contentRef.value !== null && contentRef.value.focus();
16923
+ contentRef.value !== null && contentRef.value.focus({ preventScroll: true });
16891
16924
  });
16892
16925
  }
16893
16926
 
@@ -18901,6 +18934,8 @@
18901
18934
  abort: state.abort
18902
18935
  };
18903
18936
 
18937
+ // TODO: the result of this computed, especially the dynamic part, isn't currently typed
18938
+ // This result in an error with Volar when accessing the state (eg. files array)
18904
18939
  const slotScope = vue.computed(() => {
18905
18940
  const acc = {
18906
18941
  canAddFiles: canAddFiles.value,
@@ -20622,7 +20657,7 @@
20622
20657
  if (target && (el === null || el.id !== state.targetUid.value)) {
20623
20658
  target.hasAttribute('tabindex') === true || (target = target.querySelector('[tabindex]'));
20624
20659
  if (target && target !== el) {
20625
- target.focus();
20660
+ target.focus({ preventScroll: true });
20626
20661
  }
20627
20662
  }
20628
20663
  }
@@ -20640,6 +20675,7 @@
20640
20675
  }
20641
20676
 
20642
20677
  function onControlFocusin (e) {
20678
+ clearTimeout(focusoutTimer);
20643
20679
  if (state.editable.value === true && state.focused.value === false) {
20644
20680
  state.focused.value = true;
20645
20681
  emit('focus', e);
@@ -20652,13 +20688,9 @@
20652
20688
  if (
20653
20689
  document.hasFocus() === true && (
20654
20690
  state.hasPopupOpen === true
20655
- || (
20656
- state.controlRef !== void 0
20657
- && (
20658
- state.controlRef.value === null
20659
- || state.controlRef.value.contains(document.activeElement) !== false
20660
- )
20661
- )
20691
+ || state.controlRef === void 0
20692
+ || state.controlRef.value === null
20693
+ || state.controlRef.value.contains(document.activeElement) !== false
20662
20694
  )
20663
20695
  ) {
20664
20696
  return
@@ -20884,6 +20916,16 @@
20884
20916
  // expose public methods
20885
20917
  Object.assign(proxy, { focus, blur });
20886
20918
 
20919
+ let shouldActivate = false;
20920
+
20921
+ vue.onDeactivated(() => {
20922
+ shouldActivate = true;
20923
+ });
20924
+
20925
+ vue.onActivated(() => {
20926
+ shouldActivate === true && props.autofocus === true && proxy.focus();
20927
+ });
20928
+
20887
20929
  vue.onMounted(() => {
20888
20930
  if (isRuntimeSsrPreHydration.value === true && props.for === void 0) {
20889
20931
  state.targetUid.value = getTargetUid();
@@ -21593,7 +21635,7 @@
21593
21635
  const target = rootRef.value.querySelector('[autofocus], [data-autofocus]')
21594
21636
  || Array.prototype.find.call(rootRef.value.querySelectorAll('[tabindex]'), el => el.tabIndex > -1);
21595
21637
 
21596
- target !== null && target !== void 0 && target.focus();
21638
+ target !== null && target !== void 0 && target.focus({ preventScroll: true });
21597
21639
  });
21598
21640
  }
21599
21641
 
@@ -21610,6 +21652,16 @@
21610
21652
  }
21611
21653
  });
21612
21654
 
21655
+ let shouldActivate = false;
21656
+
21657
+ vue.onDeactivated(() => {
21658
+ shouldActivate = true;
21659
+ });
21660
+
21661
+ vue.onActivated(() => {
21662
+ shouldActivate === true && props.autofocus === true && focus();
21663
+ });
21664
+
21613
21665
  vue.onMounted(() => {
21614
21666
  props.autofocus === true && focus();
21615
21667
  });
@@ -22167,7 +22219,6 @@
22167
22219
  const rootRef = vue.ref(null);
22168
22220
 
22169
22221
  let index = props.initialIndex || 0;
22170
- let scrollPos = false;
22171
22222
  let localScrollTarget, poll;
22172
22223
 
22173
22224
  const classes = vue.computed(() =>
@@ -22306,8 +22357,10 @@
22306
22357
  vue.watch(() => props.scrollTarget, updateScrollTarget);
22307
22358
  vue.watch(() => props.debounce, setDebounce);
22308
22359
 
22360
+ let scrollPos = false;
22361
+
22309
22362
  vue.onActivated(() => {
22310
- if (localScrollTarget && scrollPos !== false) {
22363
+ if (scrollPos !== false && localScrollTarget) {
22311
22364
  setVerticalScrollPosition(localScrollTarget, scrollPos);
22312
22365
  }
22313
22366
  });
@@ -23166,7 +23219,7 @@
23166
23219
  && inputRef.value !== el
23167
23220
  && (el === null || el.id !== state.targetUid.value)
23168
23221
  ) {
23169
- inputRef.value.focus();
23222
+ inputRef.value.focus({ preventScroll: true });
23170
23223
  }
23171
23224
  });
23172
23225
  }
@@ -27103,6 +27156,26 @@
27103
27156
  }
27104
27157
  });
27105
27158
 
27159
+ let scrollPosition = null;
27160
+
27161
+ vue.onDeactivated(() => {
27162
+ scrollPosition = {
27163
+ top: scroll.vertical.position.value,
27164
+ left: scroll.horizontal.position.value
27165
+ };
27166
+ });
27167
+
27168
+ vue.onActivated(() => {
27169
+ if (scrollPosition === null) { return }
27170
+
27171
+ const scrollTarget = targetRef.value;
27172
+
27173
+ if (scrollTarget !== null) {
27174
+ setHorizontalScrollPosition(scrollTarget, scrollPosition.left);
27175
+ setVerticalScrollPosition(scrollTarget, scrollPosition.top);
27176
+ }
27177
+ });
27178
+
27106
27179
  vue.onBeforeUnmount(emitScroll.cancel);
27107
27180
 
27108
27181
  return () => {
@@ -27730,13 +27803,14 @@
27730
27803
  prevToIndex = -1;
27731
27804
  prevScrollStart = void 0;
27732
27805
 
27806
+ virtualScrollPaddingBefore.value = sumSize(virtualScrollSizesAgg, virtualScrollSizes, 0, virtualScrollSliceRange.value.from);
27807
+ virtualScrollPaddingAfter.value = sumSize(virtualScrollSizesAgg, virtualScrollSizes, virtualScrollSliceRange.value.to, virtualScrollLength.value);
27808
+
27733
27809
  if (toIndex >= 0) {
27734
27810
  updateVirtualScrollSizes(virtualScrollSliceRange.value.from);
27735
27811
  vue.nextTick(() => { scrollTo(toIndex); });
27736
27812
  }
27737
27813
  else {
27738
- virtualScrollPaddingBefore.value = sumSize(virtualScrollSizesAgg, virtualScrollSizes, 0, virtualScrollSliceRange.value.from);
27739
- virtualScrollPaddingAfter.value = sumSize(virtualScrollSizesAgg, virtualScrollSizes, virtualScrollSliceRange.value.to, virtualScrollLength.value);
27740
27814
  onVirtualScrollEvt();
27741
27815
  }
27742
27816
  }
@@ -27761,22 +27835,24 @@
27761
27835
 
27762
27836
  localScrollViewSize = scrollViewSize;
27763
27837
 
27764
- const multiplier = 1 + props.virtualScrollSliceRatioBefore + props.virtualScrollSliceRatioAfter;
27838
+ const virtualScrollSliceRatioBefore = parseFloat(props.virtualScrollSliceRatioBefore) || 0;
27839
+ const virtualScrollSliceRatioAfter = parseFloat(props.virtualScrollSliceRatioAfter) || 0;
27840
+ const multiplier = 1 + virtualScrollSliceRatioBefore + virtualScrollSliceRatioAfter;
27765
27841
  const view = scrollViewSize === void 0 || scrollViewSize <= 0
27766
27842
  ? 1
27767
27843
  : Math.ceil(scrollViewSize / virtualScrollItemSizeComputed.value);
27768
27844
 
27769
27845
  const baseSize = Math.max(
27770
- 10,
27846
+ 1,
27771
27847
  view,
27772
- Math.ceil(props.virtualScrollSliceSize / multiplier)
27848
+ Math.ceil((props.virtualScrollSliceSize > 0 ? props.virtualScrollSliceSize : 10) / multiplier)
27773
27849
  );
27774
27850
 
27775
27851
  virtualScrollSliceSizeComputed.value = {
27776
27852
  total: Math.ceil(baseSize * multiplier),
27777
- start: Math.ceil(baseSize * props.virtualScrollSliceRatioBefore),
27778
- center: Math.ceil(baseSize * (0.5 + props.virtualScrollSliceRatioBefore)),
27779
- end: Math.ceil(baseSize * (1 + props.virtualScrollSliceRatioBefore)),
27853
+ start: Math.ceil(baseSize * virtualScrollSliceRatioBefore),
27854
+ center: Math.ceil(baseSize * (0.5 + virtualScrollSliceRatioBefore)),
27855
+ end: Math.ceil(baseSize * (1 + virtualScrollSliceRatioBefore)),
27780
27856
  view
27781
27857
  };
27782
27858
  }
@@ -27862,7 +27938,15 @@
27862
27938
  setVirtualScrollSize();
27863
27939
  });
27864
27940
 
27941
+ let shouldActivate = false;
27942
+
27943
+ vue.onDeactivated(() => {
27944
+ shouldActivate = true;
27945
+ });
27946
+
27865
27947
  vue.onActivated(() => {
27948
+ if (shouldActivate !== true) { return }
27949
+
27866
27950
  const scrollEl = getVirtualScrollTarget();
27867
27951
 
27868
27952
  if (prevScrollStart !== void 0 && scrollEl !== void 0 && scrollEl !== null && scrollEl.nodeType !== 8) {
@@ -28489,8 +28573,12 @@
28489
28573
  return innerOptionsValue.value.find(v => isDeepEqual(v, val)) !== void 0
28490
28574
  }
28491
28575
 
28492
- function selectInputText () {
28493
- if (props.useInput === true && targetRef.value !== null) {
28576
+ function selectInputText (e) {
28577
+ if (
28578
+ props.useInput === true
28579
+ && targetRef.value !== null
28580
+ && (e === void 0 || (targetRef.value === e.target && e.target.value === selectedString.value))
28581
+ ) {
28494
28582
  targetRef.value.select();
28495
28583
  }
28496
28584
  }
@@ -28523,34 +28611,34 @@
28523
28611
 
28524
28612
  if (typeof value === 'string' && value.length > 0) {
28525
28613
  const needle = value.toLocaleLowerCase();
28614
+ const findFn = extractFn => {
28615
+ const option = props.options.find(opt => extractFn.value(opt).toLocaleLowerCase() === needle);
28526
28616
 
28527
- let fn = opt => getOptionValue.value(opt).toLocaleLowerCase() === needle;
28528
- let option = props.options.find(fn);
28617
+ if (option === void 0) {
28618
+ return false
28619
+ }
28529
28620
 
28530
- if (option !== void 0) {
28531
28621
  if (innerValue.value.indexOf(option) === -1) {
28532
28622
  toggleOption(option);
28533
28623
  }
28534
28624
  else {
28535
28625
  hidePopup();
28536
28626
  }
28537
- }
28538
- else {
28539
- fn = opt => getOptionLabel.value(opt).toLocaleLowerCase() === needle;
28540
- option = props.options.find(fn);
28541
28627
 
28542
- if (option !== void 0) {
28543
- if (innerValue.value.indexOf(option) === -1) {
28544
- toggleOption(option);
28545
- }
28546
- else {
28547
- hidePopup();
28548
- }
28628
+ return true
28629
+ };
28630
+ const fillFn = afterFilter => {
28631
+ if (findFn(getOptionValue) === true) {
28632
+ return
28549
28633
  }
28550
- else {
28551
- filter(value, true);
28634
+ if (findFn(getOptionLabel) === true || afterFilter === true) {
28635
+ return
28552
28636
  }
28553
- }
28637
+
28638
+ filter(value, true, () => fillFn(true));
28639
+ };
28640
+
28641
+ fillFn();
28554
28642
  }
28555
28643
  else {
28556
28644
  state.clearValue(e);
@@ -28860,7 +28948,7 @@
28860
28948
  type: 'search',
28861
28949
  ...comboboxAttrs.value,
28862
28950
  ...state.splitAttrs.attributes.value,
28863
- id: state.targetUid.value,
28951
+ id: isTarget === true ? state.targetUid.value : void 0,
28864
28952
  maxlength: props.maxlength,
28865
28953
  autocomplete: props.autocomplete,
28866
28954
  'data-autofocus': (fromDialog !== true && props.autofocus === true) || void 0,
@@ -28871,7 +28959,7 @@
28871
28959
 
28872
28960
  if (fromDialog !== true && hasDialog === true) {
28873
28961
  if (Array.isArray(data.class) === true) {
28874
- data.class[ 0 ] += ' no-pointer-events';
28962
+ data.class = [ ...data.class, 'no-pointer-events' ];
28875
28963
  }
28876
28964
  else {
28877
28965
  data.class += ' no-pointer-events';
@@ -28929,7 +29017,7 @@
28929
29017
  }
28930
29018
  }
28931
29019
 
28932
- function filter (val, keepClosed) {
29020
+ function filter (val, keepClosed, afterUpdateFn) {
28933
29021
  if (props.onFilter === void 0 || (keepClosed !== true && state.focused.value !== true)) {
28934
29022
  return
28935
29023
  }
@@ -28987,6 +29075,7 @@
28987
29075
  }
28988
29076
 
28989
29077
  typeof afterFn === 'function' && vue.nextTick(() => { afterFn(proxy); });
29078
+ typeof afterUpdateFn === 'function' && vue.nextTick(() => { afterUpdateFn(proxy); });
28990
29079
  });
28991
29080
  }
28992
29081
  },
@@ -29336,13 +29425,13 @@
29336
29425
  child.push(getInput(fromDialog, isTarget));
29337
29426
  }
29338
29427
  // there can be only one (when dialog is opened the control in dialog should be target)
29339
- else if (state.editable.value === true && isTarget === true) {
29428
+ else if (state.editable.value === true) {
29340
29429
  child.push(
29341
29430
  vue.h('div', {
29342
- ref: targetRef,
29431
+ ref: isTarget === true ? targetRef : void 0,
29343
29432
  key: 'd_t',
29344
- class: 'no-outline',
29345
- id: state.targetUid.value,
29433
+ class: 'q-select__focus-target',
29434
+ id: isTarget === true ? state.targetUid.value : void 0,
29346
29435
  ...comboboxAttrs.value,
29347
29436
  onKeydown: onTargetKeydown,
29348
29437
  onKeyup: onTargetKeyup,
@@ -29350,10 +29439,10 @@
29350
29439
  })
29351
29440
  );
29352
29441
 
29353
- if (typeof props.autocomplete === 'string' && props.autocomplete.length > 0) {
29442
+ if (isTarget === true && typeof props.autocomplete === 'string' && props.autocomplete.length > 0) {
29354
29443
  child.push(
29355
29444
  vue.h('input', {
29356
- class: 'q-select__autocomplete-input no-outline',
29445
+ class: 'q-select__autocomplete-input',
29357
29446
  autocomplete: props.autocomplete,
29358
29447
  onKeyup: onTargetAutocomplete
29359
29448
  })
@@ -32059,7 +32148,9 @@
32059
32148
  error: Boolean
32060
32149
  },
32061
32150
 
32062
- setup (props, { slots }) {
32151
+ setup (props, { attrs, slots }) {
32152
+ const { proxy: { $q } } = vue.getCurrentInstance();
32153
+
32063
32154
  const $stepper = vue.inject(stepperKey, () => {
32064
32155
  console.error('QStep needs to be child of QStepper');
32065
32156
  });
@@ -32070,18 +32161,21 @@
32070
32161
 
32071
32162
  const isActive = vue.computed(() => $stepper.value.modelValue === props.name);
32072
32163
 
32073
- vue.watch(isActive, active => {
32074
- if (
32075
- active === true
32076
- && $stepper.value.vertical === true
32077
- ) {
32078
- vue.nextTick(() => {
32079
- if (rootRef.value !== null) {
32080
- rootRef.value.scrollTop = 0;
32164
+ const scrollEvent = vue.computed(() => (
32165
+ ($q.platform.is.ios !== true && $q.platform.is.chrome === true)
32166
+ || isActive.value !== true
32167
+ || $stepper.value.vertical !== true
32168
+ ? {}
32169
+ : {
32170
+ onScroll (e) {
32171
+ const { target } = e;
32172
+ if (target.scrollTop > 0) {
32173
+ target.scrollTop = 0;
32174
+ }
32175
+ attrs.onScroll !== void 0 && attrs.onScroll(e);
32081
32176
  }
32082
- });
32083
- }
32084
- });
32177
+ }
32178
+ ));
32085
32179
 
32086
32180
  const contentKey = vue.computed(() => (
32087
32181
  typeof props.name === 'string' || typeof props.name === 'number'
@@ -32117,7 +32211,7 @@
32117
32211
 
32118
32212
  return () => vue.h(
32119
32213
  'div',
32120
- { ref: rootRef, class: 'q-stepper__step' },
32214
+ { ref: rootRef, class: 'q-stepper__step', ...scrollEvent.value },
32121
32215
  $stepper.value.vertical === true
32122
32216
  ? [
32123
32217
  vue.h(StepHeader, {
@@ -35328,6 +35422,8 @@
35328
35422
  expanded: Array, // v-model:expanded
35329
35423
  selected: {}, // v-model:selected
35330
35424
 
35425
+ noSelectionUnset: Boolean,
35426
+
35331
35427
  defaultExpandAll: Boolean,
35332
35428
  accordion: Boolean,
35333
35429
 
@@ -35885,7 +35981,12 @@
35885
35981
 
35886
35982
  if (hasSelection.value) {
35887
35983
  if (meta.selectable) {
35888
- emit('update:selected', meta.key !== props.selected ? meta.key : null);
35984
+ if (props.noSelectionUnset === false) {
35985
+ emit('update:selected', meta.key !== props.selected ? meta.key : null);
35986
+ }
35987
+ else if (meta.key !== props.selected) {
35988
+ emit('update:selected', meta.key || null);
35989
+ }
35889
35990
  }
35890
35991
  }
35891
35992
  else {
@@ -38098,8 +38199,8 @@
38098
38199
  color: vmColor.value,
38099
38200
  label: okLabel.value,
38100
38201
  ripple: false,
38101
- ...(Object(props.ok) === props.ok ? props.ok : { flat: true }),
38102
38202
  disable: okDisabled.value,
38203
+ ...(Object(props.ok) === props.ok ? props.ok : { flat: true }),
38103
38204
  'data-autofocus': (props.focus === 'ok' && hasForm.value !== true) || void 0,
38104
38205
  onClick: onOk
38105
38206
  }));
@@ -38326,11 +38427,11 @@
38326
38427
  Object.assign(this, {
38327
38428
  start (speed) {
38328
38429
  barRef.value.start(speed);
38329
- Plugin$3.isActive = barRef.value.calls > 0;
38430
+ Plugin$3.isActive = true;
38330
38431
  },
38331
38432
  stop () {
38332
- barRef.value.stop();
38333
- Plugin$3.isActive = barRef.value.calls > 0;
38433
+ const sessions = barRef.value.stop();
38434
+ Plugin$3.isActive = sessions > 0;
38334
38435
  },
38335
38436
  increment () {
38336
38437
  barRef.value.increment.apply(null, arguments);
@@ -39268,7 +39369,7 @@
39268
39369
  });
39269
39370
 
39270
39371
  var index_umd = {
39271
- version: '2.4.9',
39372
+ version: '2.4.13',
39272
39373
  install (app, opts) {
39273
39374
  installQuasar(app, {
39274
39375
  components,