quasar 2.4.8 → 2.4.12

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 (147) hide show
  1. package/dist/api/LoadingBar.json +7 -0
  2. package/dist/api/Platform.json +171 -0
  3. package/dist/api/QAjaxBar.json +13 -1
  4. package/dist/api/QFile.json +1 -0
  5. package/dist/api/QTree.json +7 -0
  6. package/dist/api/QUploader.json +3 -1
  7. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  8. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  9. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  10. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  11. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  12. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  13. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  14. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  15. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  16. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  17. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  18. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  19. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  20. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  21. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  22. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  23. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  24. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  25. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  26. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
  27. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  28. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  29. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  30. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  31. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  32. package/dist/icon-set/svg-mdi-v4.umd.prod.js +1 -1
  33. package/dist/icon-set/svg-mdi-v5.umd.prod.js +1 -1
  34. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  35. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  36. package/dist/icon-set/themify.umd.prod.js +1 -1
  37. package/dist/lang/ar.umd.prod.js +1 -1
  38. package/dist/lang/az-Latn.umd.prod.js +1 -1
  39. package/dist/lang/bg.umd.prod.js +1 -1
  40. package/dist/lang/bn.umd.prod.js +1 -1
  41. package/dist/lang/ca.umd.prod.js +1 -1
  42. package/dist/lang/cs.umd.prod.js +1 -1
  43. package/dist/lang/da.umd.prod.js +1 -1
  44. package/dist/lang/de.umd.prod.js +1 -1
  45. package/dist/lang/el.umd.prod.js +1 -1
  46. package/dist/lang/en-GB.umd.prod.js +1 -1
  47. package/dist/lang/en-US.umd.prod.js +1 -1
  48. package/dist/lang/eo.umd.prod.js +1 -1
  49. package/dist/lang/es.umd.prod.js +1 -1
  50. package/dist/lang/et.umd.prod.js +1 -1
  51. package/dist/lang/fa-IR.umd.prod.js +1 -1
  52. package/dist/lang/fa.umd.prod.js +1 -1
  53. package/dist/lang/fi.umd.prod.js +1 -1
  54. package/dist/lang/fr.umd.prod.js +1 -1
  55. package/dist/lang/gn.umd.prod.js +1 -1
  56. package/dist/lang/he.umd.prod.js +1 -1
  57. package/dist/lang/hr.umd.prod.js +1 -1
  58. package/dist/lang/hu.umd.prod.js +1 -1
  59. package/dist/lang/id.umd.prod.js +1 -1
  60. package/dist/lang/is.umd.prod.js +1 -1
  61. package/dist/lang/it.umd.prod.js +1 -1
  62. package/dist/lang/ja.umd.prod.js +1 -1
  63. package/dist/lang/km.umd.prod.js +1 -1
  64. package/dist/lang/ko-KR.umd.prod.js +1 -1
  65. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  66. package/dist/lang/lt.umd.prod.js +1 -1
  67. package/dist/lang/lu.umd.prod.js +1 -1
  68. package/dist/lang/lv.umd.prod.js +1 -1
  69. package/dist/lang/ml.umd.prod.js +1 -1
  70. package/dist/lang/ms.umd.prod.js +1 -1
  71. package/dist/lang/my.umd.prod.js +6 -0
  72. package/dist/lang/nb-NO.umd.prod.js +1 -1
  73. package/dist/lang/nl.umd.prod.js +1 -1
  74. package/dist/lang/pl.umd.prod.js +1 -1
  75. package/dist/lang/pt-BR.umd.prod.js +1 -1
  76. package/dist/lang/pt.umd.prod.js +1 -1
  77. package/dist/lang/ro.umd.prod.js +1 -1
  78. package/dist/lang/ru.umd.prod.js +1 -1
  79. package/dist/lang/sk.umd.prod.js +1 -1
  80. package/dist/lang/sl.umd.prod.js +1 -1
  81. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  82. package/dist/lang/sr.umd.prod.js +1 -1
  83. package/dist/lang/sv.umd.prod.js +1 -1
  84. package/dist/lang/ta.umd.prod.js +1 -1
  85. package/dist/lang/th.umd.prod.js +1 -1
  86. package/dist/lang/tr.umd.prod.js +1 -1
  87. package/dist/lang/ug.umd.prod.js +1 -1
  88. package/dist/lang/uk.umd.prod.js +1 -1
  89. package/dist/lang/vi.umd.prod.js +1 -1
  90. package/dist/lang/zh-CN.umd.prod.js +1 -1
  91. package/dist/lang/zh-TW.umd.prod.js +1 -1
  92. package/dist/quasar.cjs.prod.js +2 -2
  93. package/dist/quasar.css +10 -3
  94. package/dist/quasar.esm.prod.js +2 -2
  95. package/dist/quasar.prod.css +1 -1
  96. package/dist/quasar.rtl.css +10 -3
  97. package/dist/quasar.rtl.prod.css +1 -1
  98. package/dist/quasar.sass +9 -3
  99. package/dist/quasar.umd.js +207 -101
  100. package/dist/quasar.umd.prod.js +2 -2
  101. package/dist/ssr-directives/Morph.js +1 -1
  102. package/dist/types/api/qfile.d.ts +8 -0
  103. package/dist/types/api/qselect.d.ts +4 -0
  104. package/dist/types/api/qtable.d.ts +12 -0
  105. package/dist/types/api/qtree.d.ts +31 -0
  106. package/dist/types/api/quploader.d.ts +28 -0
  107. package/dist/types/api/touchswipe.d.ts +11 -0
  108. package/dist/types/api/validation.d.ts +1 -1
  109. package/dist/types/api.d.ts +6 -0
  110. package/dist/types/index.d.ts +422 -314
  111. package/dist/types/ts-helpers.d.ts +6 -2
  112. package/dist/types/utils.d.ts +4 -1
  113. package/dist/vetur/quasar-attributes.json +4 -0
  114. package/dist/vetur/quasar-tags.json +1 -0
  115. package/dist/web-types/web-types.json +11 -1
  116. package/lang/index.json +4 -0
  117. package/lang/my.js +90 -0
  118. package/package.json +1 -1
  119. package/src/components/ajax-bar/QAjaxBar.js +22 -12
  120. package/src/components/ajax-bar/QAjaxBar.json +16 -1
  121. package/src/components/date/QDate.js +6 -1
  122. package/src/components/dialog/QDialog.js +1 -1
  123. package/src/components/dialog-plugin/DialogPlugin.js +1 -1
  124. package/src/components/editor/QEditor.js +1 -1
  125. package/src/components/form/QForm.js +12 -2
  126. package/src/components/icon/QIcon.js +3 -3
  127. package/src/components/icon/QIcon.sass +2 -2
  128. package/src/components/infinite-scroll/QInfiniteScroll.js +3 -2
  129. package/src/components/input/QInput.js +1 -1
  130. package/src/components/menu/QMenu.js +2 -1
  131. package/src/components/scroll-area/QScrollArea.js +36 -11
  132. package/src/components/select/QSelect.js +32 -27
  133. package/src/components/select/QSelect.sass +4 -0
  134. package/src/components/stepper/QStep.js +19 -14
  135. package/src/components/stepper/QStepper.sass +3 -0
  136. package/src/components/tabs/QTabs.js +10 -2
  137. package/src/components/tree/QTree.js +8 -1
  138. package/src/components/tree/QTree.json +8 -0
  139. package/src/components/uploader/uploader-core.js +2 -0
  140. package/src/components/uploader/xhr-uploader-plugin.json +2 -1
  141. package/src/components/virtual-scroll/use-virtual-scroll.js +14 -5
  142. package/src/composables/private/use-field.js +18 -9
  143. package/src/composables/private/use-file.json +1 -0
  144. package/src/plugins/LoadingBar.js +3 -3
  145. package/src/plugins/LoadingBar.json +8 -0
  146. package/src/plugins/Platform.js +15 -8
  147. package/src/plugins/Platform.json +166 -0
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Quasar Framework v2.4.8
2
+ * Quasar Framework v2.4.12
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.8' };
1459
+ const $q = { version: '2.4.12' };
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 () {
@@ -2032,13 +2051,13 @@
2032
2051
  }
2033
2052
 
2034
2053
  if (type.value.img === true) {
2035
- return vue.h('div', data, hMergeSlot(slots.default, [
2054
+ return vue.h('span', data, hMergeSlot(slots.default, [
2036
2055
  vue.h('img', { src: type.value.src })
2037
2056
  ]))
2038
2057
  }
2039
2058
 
2040
2059
  if (type.value.svg === true) {
2041
- return vue.h('div', data, hMergeSlot(slots.default, [
2060
+ return vue.h('span', data, hMergeSlot(slots.default, [
2042
2061
  vue.h('svg', {
2043
2062
  viewBox: type.value.viewBox
2044
2063
  }, type.value.nodes)
@@ -2046,7 +2065,7 @@
2046
2065
  }
2047
2066
 
2048
2067
  if (type.value.svguse === true) {
2049
- return vue.h('div', data, hMergeSlot(slots.default, [
2068
+ return vue.h('span', data, hMergeSlot(slots.default, [
2050
2069
  vue.h('svg', {
2051
2070
  viewBox: type.value.viewBox
2052
2071
  }, [
@@ -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
@@ -20754,6 +20786,8 @@
20754
20786
  name: props.clearIcon || $q.iconSet.field.clear,
20755
20787
  tabindex: 0,
20756
20788
  type: 'button',
20789
+ 'aria-hidden': null,
20790
+ role: null,
20757
20791
  onClick: clearValue
20758
20792
  })
20759
20793
  ])
@@ -20882,6 +20916,16 @@
20882
20916
  // expose public methods
20883
20917
  Object.assign(proxy, { focus, blur });
20884
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
+
20885
20929
  vue.onMounted(() => {
20886
20930
  if (isRuntimeSsrPreHydration.value === true && props.for === void 0) {
20887
20931
  state.targetUid.value = getTargetUid();
@@ -21591,7 +21635,7 @@
21591
21635
  const target = rootRef.value.querySelector('[autofocus], [data-autofocus]')
21592
21636
  || Array.prototype.find.call(rootRef.value.querySelectorAll('[tabindex]'), el => el.tabIndex > -1);
21593
21637
 
21594
- target !== null && target !== void 0 && target.focus();
21638
+ target !== null && target !== void 0 && target.focus({ preventScroll: true });
21595
21639
  });
21596
21640
  }
21597
21641
 
@@ -21608,6 +21652,16 @@
21608
21652
  }
21609
21653
  });
21610
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
+
21611
21665
  vue.onMounted(() => {
21612
21666
  props.autofocus === true && focus();
21613
21667
  });
@@ -22165,7 +22219,6 @@
22165
22219
  const rootRef = vue.ref(null);
22166
22220
 
22167
22221
  let index = props.initialIndex || 0;
22168
- let scrollPos = false;
22169
22222
  let localScrollTarget, poll;
22170
22223
 
22171
22224
  const classes = vue.computed(() =>
@@ -22304,8 +22357,10 @@
22304
22357
  vue.watch(() => props.scrollTarget, updateScrollTarget);
22305
22358
  vue.watch(() => props.debounce, setDebounce);
22306
22359
 
22360
+ let scrollPos = false;
22361
+
22307
22362
  vue.onActivated(() => {
22308
- if (localScrollTarget && scrollPos !== false) {
22363
+ if (scrollPos !== false && localScrollTarget) {
22309
22364
  setVerticalScrollPosition(localScrollTarget, scrollPos);
22310
22365
  }
22311
22366
  });
@@ -23164,7 +23219,7 @@
23164
23219
  && inputRef.value !== el
23165
23220
  && (el === null || el.id !== state.targetUid.value)
23166
23221
  ) {
23167
- inputRef.value.focus();
23222
+ inputRef.value.focus({ preventScroll: true });
23168
23223
  }
23169
23224
  });
23170
23225
  }
@@ -26829,6 +26884,9 @@
26829
26884
  && panning.value === false
26830
26885
  ) || scroll.vertical.size.value <= container.vertical.value + 1
26831
26886
  );
26887
+ scroll.vertical.thumbStart = vue.computed(() =>
26888
+ scroll.vertical.percentage.value * (container.vertical.value - scroll.vertical.thumbSize.value)
26889
+ );
26832
26890
  scroll.vertical.thumbSize = vue.computed(() =>
26833
26891
  Math.round(
26834
26892
  between(
@@ -26839,13 +26897,11 @@
26839
26897
  )
26840
26898
  );
26841
26899
  scroll.vertical.style = vue.computed(() => {
26842
- const thumbSize = scroll.vertical.thumbSize.value;
26843
- const pos = scroll.vertical.percentage.value * (container.vertical.value - thumbSize);
26844
26900
  return {
26845
26901
  ...props.thumbStyle,
26846
26902
  ...props.verticalThumbStyle,
26847
- top: `${ pos }px`,
26848
- height: `${ thumbSize }px`
26903
+ top: `${ scroll.vertical.thumbStart.value }px`,
26904
+ height: `${ scroll.vertical.thumbSize.value }px`
26849
26905
  }
26850
26906
  });
26851
26907
  scroll.vertical.thumbClass = vue.computed(() =>
@@ -26870,6 +26926,9 @@
26870
26926
  && panning.value === false
26871
26927
  ) || scroll.horizontal.size.value <= container.horizontal.value + 1
26872
26928
  );
26929
+ scroll.horizontal.thumbStart = vue.computed(() =>
26930
+ scroll.horizontal.percentage.value * (container.horizontal.value - scroll.horizontal.thumbSize.value)
26931
+ );
26873
26932
  scroll.horizontal.thumbSize = vue.computed(() =>
26874
26933
  Math.round(
26875
26934
  between(
@@ -26880,13 +26939,11 @@
26880
26939
  )
26881
26940
  );
26882
26941
  scroll.horizontal.style = vue.computed(() => {
26883
- const thumbSize = scroll.horizontal.thumbSize.value;
26884
- const pos = scroll.horizontal.percentage.value * (container.horizontal.value - thumbSize);
26885
26942
  return {
26886
26943
  ...props.thumbStyle,
26887
26944
  ...props.horizontalThumbStyle,
26888
- left: `${ pos }px`,
26889
- width: `${ thumbSize }px`
26945
+ left: `${ scroll.horizontal.thumbStart.value }px`,
26946
+ width: `${ scroll.horizontal.thumbSize.value }px`
26890
26947
  }
26891
26948
  });
26892
26949
  scroll.horizontal.thumbClass = vue.computed(() =>
@@ -27032,8 +27089,11 @@
27032
27089
  const data = scroll[ axis ];
27033
27090
 
27034
27091
  if (data.thumbHidden.value !== true) {
27035
- const pos = evt[ dirProps[ axis ].offset ] - data.thumbSize.value / 2;
27036
- setScroll(pos / container[ axis ].value * data.size.value, axis);
27092
+ const offset = evt[ dirProps[ axis ].offset ];
27093
+ if (offset < data.thumbStart.value || offset > data.thumbStart.value + data.thumbSize.value) {
27094
+ const pos = offset - data.thumbSize.value / 2;
27095
+ setScroll(pos / container[ axis ].value * data.size.value, axis);
27096
+ }
27037
27097
 
27038
27098
  // activate thumb pan
27039
27099
  if (data.ref.value !== null) {
@@ -27096,6 +27156,26 @@
27096
27156
  }
27097
27157
  });
27098
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
+
27099
27179
  vue.onBeforeUnmount(emitScroll.cancel);
27100
27180
 
27101
27181
  return () => {
@@ -27723,13 +27803,14 @@
27723
27803
  prevToIndex = -1;
27724
27804
  prevScrollStart = void 0;
27725
27805
 
27806
+ virtualScrollPaddingBefore.value = sumSize(virtualScrollSizesAgg, virtualScrollSizes, 0, virtualScrollSliceRange.value.from);
27807
+ virtualScrollPaddingAfter.value = sumSize(virtualScrollSizesAgg, virtualScrollSizes, virtualScrollSliceRange.value.to, virtualScrollLength.value);
27808
+
27726
27809
  if (toIndex >= 0) {
27727
27810
  updateVirtualScrollSizes(virtualScrollSliceRange.value.from);
27728
27811
  vue.nextTick(() => { scrollTo(toIndex); });
27729
27812
  }
27730
27813
  else {
27731
- virtualScrollPaddingBefore.value = sumSize(virtualScrollSizesAgg, virtualScrollSizes, 0, virtualScrollSliceRange.value.from);
27732
- virtualScrollPaddingAfter.value = sumSize(virtualScrollSizesAgg, virtualScrollSizes, virtualScrollSliceRange.value.to, virtualScrollLength.value);
27733
27814
  onVirtualScrollEvt();
27734
27815
  }
27735
27816
  }
@@ -27760,9 +27841,9 @@
27760
27841
  : Math.ceil(scrollViewSize / virtualScrollItemSizeComputed.value);
27761
27842
 
27762
27843
  const baseSize = Math.max(
27763
- 10,
27844
+ 1,
27764
27845
  view,
27765
- Math.ceil(props.virtualScrollSliceSize / multiplier)
27846
+ Math.ceil((props.virtualScrollSliceSize > 0 ? props.virtualScrollSliceSize : 10) / multiplier)
27766
27847
  );
27767
27848
 
27768
27849
  virtualScrollSliceSizeComputed.value = {
@@ -27855,7 +27936,15 @@
27855
27936
  setVirtualScrollSize();
27856
27937
  });
27857
27938
 
27939
+ let shouldActivate = false;
27940
+
27941
+ vue.onDeactivated(() => {
27942
+ shouldActivate = true;
27943
+ });
27944
+
27858
27945
  vue.onActivated(() => {
27946
+ if (shouldActivate !== true) { return }
27947
+
27859
27948
  const scrollEl = getVirtualScrollTarget();
27860
27949
 
27861
27950
  if (prevScrollStart !== void 0 && scrollEl !== void 0 && scrollEl !== null && scrollEl.nodeType !== 8) {
@@ -28482,8 +28571,12 @@
28482
28571
  return innerOptionsValue.value.find(v => isDeepEqual(v, val)) !== void 0
28483
28572
  }
28484
28573
 
28485
- function selectInputText () {
28486
- if (props.useInput === true && targetRef.value !== null) {
28574
+ function selectInputText (e) {
28575
+ if (
28576
+ props.useInput === true
28577
+ && targetRef.value !== null
28578
+ && (e === void 0 || (targetRef.value === e.target && e.target.value === selectedString.value))
28579
+ ) {
28487
28580
  targetRef.value.select();
28488
28581
  }
28489
28582
  }
@@ -28516,34 +28609,34 @@
28516
28609
 
28517
28610
  if (typeof value === 'string' && value.length > 0) {
28518
28611
  const needle = value.toLocaleLowerCase();
28612
+ const findFn = extractFn => {
28613
+ const option = props.options.find(opt => extractFn.value(opt).toLocaleLowerCase() === needle);
28519
28614
 
28520
- let fn = opt => getOptionValue.value(opt).toLocaleLowerCase() === needle;
28521
- let option = props.options.find(fn);
28615
+ if (option === void 0) {
28616
+ return false
28617
+ }
28522
28618
 
28523
- if (option !== void 0) {
28524
28619
  if (innerValue.value.indexOf(option) === -1) {
28525
28620
  toggleOption(option);
28526
28621
  }
28527
28622
  else {
28528
28623
  hidePopup();
28529
28624
  }
28530
- }
28531
- else {
28532
- fn = opt => getOptionLabel.value(opt).toLocaleLowerCase() === needle;
28533
- option = props.options.find(fn);
28534
28625
 
28535
- if (option !== void 0) {
28536
- if (innerValue.value.indexOf(option) === -1) {
28537
- toggleOption(option);
28538
- }
28539
- else {
28540
- hidePopup();
28541
- }
28626
+ return true
28627
+ };
28628
+ const fillFn = afterFilter => {
28629
+ if (findFn(getOptionValue) === true) {
28630
+ return
28542
28631
  }
28543
- else {
28544
- filter(value, true);
28632
+ if (findFn(getOptionLabel) === true || afterFilter === true) {
28633
+ return
28545
28634
  }
28546
- }
28635
+
28636
+ filter(value, true, () => fillFn(true));
28637
+ };
28638
+
28639
+ fillFn();
28547
28640
  }
28548
28641
  else {
28549
28642
  state.clearValue(e);
@@ -28853,7 +28946,7 @@
28853
28946
  type: 'search',
28854
28947
  ...comboboxAttrs.value,
28855
28948
  ...state.splitAttrs.attributes.value,
28856
- id: state.targetUid.value,
28949
+ id: isTarget === true ? state.targetUid.value : void 0,
28857
28950
  maxlength: props.maxlength,
28858
28951
  autocomplete: props.autocomplete,
28859
28952
  'data-autofocus': (fromDialog !== true && props.autofocus === true) || void 0,
@@ -28864,7 +28957,7 @@
28864
28957
 
28865
28958
  if (fromDialog !== true && hasDialog === true) {
28866
28959
  if (Array.isArray(data.class) === true) {
28867
- data.class[ 0 ] += ' no-pointer-events';
28960
+ data.class = [ ...data.class, 'no-pointer-events' ];
28868
28961
  }
28869
28962
  else {
28870
28963
  data.class += ' no-pointer-events';
@@ -28922,7 +29015,7 @@
28922
29015
  }
28923
29016
  }
28924
29017
 
28925
- function filter (val, keepClosed) {
29018
+ function filter (val, keepClosed, afterUpdateFn) {
28926
29019
  if (props.onFilter === void 0 || (keepClosed !== true && state.focused.value !== true)) {
28927
29020
  return
28928
29021
  }
@@ -28980,6 +29073,7 @@
28980
29073
  }
28981
29074
 
28982
29075
  typeof afterFn === 'function' && vue.nextTick(() => { afterFn(proxy); });
29076
+ typeof afterUpdateFn === 'function' && vue.nextTick(() => { afterUpdateFn(proxy); });
28983
29077
  });
28984
29078
  }
28985
29079
  },
@@ -29329,13 +29423,13 @@
29329
29423
  child.push(getInput(fromDialog, isTarget));
29330
29424
  }
29331
29425
  // there can be only one (when dialog is opened the control in dialog should be target)
29332
- else if (state.editable.value === true && isTarget === true) {
29426
+ else if (state.editable.value === true) {
29333
29427
  child.push(
29334
29428
  vue.h('div', {
29335
- ref: targetRef,
29429
+ ref: isTarget === true ? targetRef : void 0,
29336
29430
  key: 'd_t',
29337
- class: 'no-outline',
29338
- id: state.targetUid.value,
29431
+ class: 'q-select__focus-target',
29432
+ id: isTarget === true ? state.targetUid.value : void 0,
29339
29433
  ...comboboxAttrs.value,
29340
29434
  onKeydown: onTargetKeydown,
29341
29435
  onKeyup: onTargetKeyup,
@@ -29343,10 +29437,10 @@
29343
29437
  })
29344
29438
  );
29345
29439
 
29346
- if (typeof props.autocomplete === 'string' && props.autocomplete.length > 0) {
29440
+ if (isTarget === true && typeof props.autocomplete === 'string' && props.autocomplete.length > 0) {
29347
29441
  child.push(
29348
29442
  vue.h('input', {
29349
- class: 'q-select__autocomplete-input no-outline',
29443
+ class: 'q-select__autocomplete-input',
29350
29444
  autocomplete: props.autocomplete,
29351
29445
  onKeyup: onTargetAutocomplete
29352
29446
  })
@@ -32052,7 +32146,9 @@
32052
32146
  error: Boolean
32053
32147
  },
32054
32148
 
32055
- setup (props, { slots }) {
32149
+ setup (props, { attrs, slots }) {
32150
+ const { proxy: { $q } } = vue.getCurrentInstance();
32151
+
32056
32152
  const $stepper = vue.inject(stepperKey, () => {
32057
32153
  console.error('QStep needs to be child of QStepper');
32058
32154
  });
@@ -32063,18 +32159,21 @@
32063
32159
 
32064
32160
  const isActive = vue.computed(() => $stepper.value.modelValue === props.name);
32065
32161
 
32066
- vue.watch(isActive, active => {
32067
- if (
32068
- active === true
32069
- && $stepper.value.vertical === true
32070
- ) {
32071
- vue.nextTick(() => {
32072
- if (rootRef.value !== null) {
32073
- rootRef.value.scrollTop = 0;
32162
+ const scrollEvent = vue.computed(() => (
32163
+ ($q.platform.is.ios !== true && $q.platform.is.safari !== true)
32164
+ || isActive.value !== true
32165
+ || $stepper.value.vertical !== true
32166
+ ? {}
32167
+ : {
32168
+ onScroll (e) {
32169
+ const { target } = e;
32170
+ if (target.scrollTop > 0) {
32171
+ target.scrollTop = 0;
32172
+ }
32173
+ attrs.onScroll !== void 0 && attrs.onScroll(e);
32074
32174
  }
32075
- });
32076
- }
32077
- });
32175
+ }
32176
+ ));
32078
32177
 
32079
32178
  const contentKey = vue.computed(() => (
32080
32179
  typeof props.name === 'string' || typeof props.name === 'number'
@@ -32110,7 +32209,7 @@
32110
32209
 
32111
32210
  return () => vue.h(
32112
32211
  'div',
32113
- { ref: rootRef, class: 'q-stepper__step' },
32212
+ { ref: rootRef, class: 'q-stepper__step', ...scrollEvent.value },
32114
32213
  $stepper.value.vertical === true
32115
32214
  ? [
32116
32215
  vue.h(StepHeader, {
@@ -35321,6 +35420,8 @@
35321
35420
  expanded: Array, // v-model:expanded
35322
35421
  selected: {}, // v-model:selected
35323
35422
 
35423
+ noSelectionUnset: Boolean,
35424
+
35324
35425
  defaultExpandAll: Boolean,
35325
35426
  accordion: Boolean,
35326
35427
 
@@ -35878,7 +35979,12 @@
35878
35979
 
35879
35980
  if (hasSelection.value) {
35880
35981
  if (meta.selectable) {
35881
- emit('update:selected', meta.key !== props.selected ? meta.key : null);
35982
+ if (props.noSelectionUnset === false) {
35983
+ emit('update:selected', meta.key !== props.selected ? meta.key : null);
35984
+ }
35985
+ else if (meta.key !== props.selected) {
35986
+ emit('update:selected', meta.key || null);
35987
+ }
35882
35988
  }
35883
35989
  }
35884
35990
  else {
@@ -38091,8 +38197,8 @@
38091
38197
  color: vmColor.value,
38092
38198
  label: okLabel.value,
38093
38199
  ripple: false,
38094
- ...(Object(props.ok) === props.ok ? props.ok : { flat: true }),
38095
38200
  disable: okDisabled.value,
38201
+ ...(Object(props.ok) === props.ok ? props.ok : { flat: true }),
38096
38202
  'data-autofocus': (props.focus === 'ok' && hasForm.value !== true) || void 0,
38097
38203
  onClick: onOk
38098
38204
  }));
@@ -38319,11 +38425,11 @@
38319
38425
  Object.assign(this, {
38320
38426
  start (speed) {
38321
38427
  barRef.value.start(speed);
38322
- Plugin$3.isActive = barRef.value.calls > 0;
38428
+ Plugin$3.isActive = true;
38323
38429
  },
38324
38430
  stop () {
38325
- barRef.value.stop();
38326
- Plugin$3.isActive = barRef.value.calls > 0;
38431
+ const sessions = barRef.value.stop();
38432
+ Plugin$3.isActive = sessions > 0;
38327
38433
  },
38328
38434
  increment () {
38329
38435
  barRef.value.increment.apply(null, arguments);
@@ -39261,7 +39367,7 @@
39261
39367
  });
39262
39368
 
39263
39369
  var index_umd = {
39264
- version: '2.4.8',
39370
+ version: '2.4.12',
39265
39371
  install (app, opts) {
39266
39372
  installQuasar(app, {
39267
39373
  components,