quasar 2.4.1 → 2.4.5

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 +6 -2
  2. package/dist/api/LoadingBar.json +1 -1
  3. package/dist/api/Notify.json +25 -25
  4. package/dist/api/QAjaxBar.json +23 -4
  5. package/dist/api/QAvatar.json +1 -1
  6. package/dist/api/QBreadcrumbsEl.json +1 -1
  7. package/dist/api/QBtn.json +2 -2
  8. package/dist/api/QBtnDropdown.json +3 -3
  9. package/dist/api/QBtnToggle.json +1 -1
  10. package/dist/api/QCarousel.json +4 -4
  11. package/dist/api/QCarouselSlide.json +2 -2
  12. package/dist/api/QChatMessage.json +1 -1
  13. package/dist/api/QChip.json +4 -4
  14. package/dist/api/QExpansionItem.json +3 -3
  15. package/dist/api/QFab.json +2 -2
  16. package/dist/api/QFabAction.json +1 -1
  17. package/dist/api/QImg.json +2 -2
  18. package/dist/api/QLinearProgress.json +1 -1
  19. package/dist/api/QPagination.json +4 -4
  20. package/dist/api/QParallax.json +1 -1
  21. package/dist/api/QPullToRefresh.json +1 -1
  22. package/dist/api/QRadio.json +3 -1
  23. package/dist/api/QRating.json +3 -3
  24. package/dist/api/QRouteTab.json +1 -1
  25. package/dist/api/QSelect.json +2 -2
  26. package/dist/api/QStep.json +4 -4
  27. package/dist/api/QStepper.json +4 -4
  28. package/dist/api/QTab.json +1 -1
  29. package/dist/api/QTable.json +4 -4
  30. package/dist/api/QTimelineEntry.json +2 -2
  31. package/dist/api/QToggle.json +1 -1
  32. package/dist/api/QTree.json +1 -1
  33. package/dist/api/QVideo.json +11 -1
  34. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  35. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  36. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  37. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  38. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  39. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  40. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  41. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  42. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  43. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  44. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  45. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  46. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  47. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  48. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  49. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  50. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  51. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  52. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  53. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
  54. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  55. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  56. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  57. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  58. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  59. package/dist/icon-set/svg-mdi-v4.umd.prod.js +1 -1
  60. package/dist/icon-set/svg-mdi-v5.umd.prod.js +1 -1
  61. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  62. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  63. package/dist/icon-set/themify.umd.prod.js +1 -1
  64. package/dist/lang/ar.umd.prod.js +1 -1
  65. package/dist/lang/az-Latn.umd.prod.js +1 -1
  66. package/dist/lang/bg.umd.prod.js +1 -1
  67. package/dist/lang/bn.umd.prod.js +1 -1
  68. package/dist/lang/ca.umd.prod.js +1 -1
  69. package/dist/lang/cs.umd.prod.js +1 -1
  70. package/dist/lang/da.umd.prod.js +1 -1
  71. package/dist/lang/de.umd.prod.js +1 -1
  72. package/dist/lang/el.umd.prod.js +1 -1
  73. package/dist/lang/en-GB.umd.prod.js +1 -1
  74. package/dist/lang/en-US.umd.prod.js +1 -1
  75. package/dist/lang/eo.umd.prod.js +1 -1
  76. package/dist/lang/es.umd.prod.js +1 -1
  77. package/dist/lang/et.umd.prod.js +1 -1
  78. package/dist/lang/fa-IR.umd.prod.js +1 -1
  79. package/dist/lang/fa.umd.prod.js +1 -1
  80. package/dist/lang/fi.umd.prod.js +1 -1
  81. package/dist/lang/fr.umd.prod.js +1 -1
  82. package/dist/lang/gn.umd.prod.js +1 -1
  83. package/dist/lang/he.umd.prod.js +1 -1
  84. package/dist/lang/hr.umd.prod.js +1 -1
  85. package/dist/lang/hu.umd.prod.js +1 -1
  86. package/dist/lang/id.umd.prod.js +1 -1
  87. package/dist/lang/is.umd.prod.js +1 -1
  88. package/dist/lang/it.umd.prod.js +1 -1
  89. package/dist/lang/ja.umd.prod.js +1 -1
  90. package/dist/lang/km.umd.prod.js +1 -1
  91. package/dist/lang/ko-KR.umd.prod.js +1 -1
  92. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  93. package/dist/lang/lt.umd.prod.js +1 -1
  94. package/dist/lang/lu.umd.prod.js +1 -1
  95. package/dist/lang/lv.umd.prod.js +1 -1
  96. package/dist/lang/ml.umd.prod.js +1 -1
  97. package/dist/lang/ms.umd.prod.js +1 -1
  98. package/dist/lang/nb-NO.umd.prod.js +1 -1
  99. package/dist/lang/nl.umd.prod.js +1 -1
  100. package/dist/lang/pl.umd.prod.js +1 -1
  101. package/dist/lang/pt-BR.umd.prod.js +1 -1
  102. package/dist/lang/pt.umd.prod.js +1 -1
  103. package/dist/lang/ro.umd.prod.js +1 -1
  104. package/dist/lang/ru.umd.prod.js +1 -1
  105. package/dist/lang/sk.umd.prod.js +1 -1
  106. package/dist/lang/sl.umd.prod.js +1 -1
  107. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  108. package/dist/lang/sr.umd.prod.js +1 -1
  109. package/dist/lang/sv.umd.prod.js +1 -1
  110. package/dist/lang/ta.umd.prod.js +1 -1
  111. package/dist/lang/th.umd.prod.js +1 -1
  112. package/dist/lang/tr.umd.prod.js +1 -1
  113. package/dist/lang/ug.umd.prod.js +1 -1
  114. package/dist/lang/uk.umd.prod.js +1 -1
  115. package/dist/lang/vi.umd.prod.js +1 -1
  116. package/dist/lang/zh-CN.umd.prod.js +1 -1
  117. package/dist/lang/zh-TW.umd.prod.js +1 -1
  118. package/dist/quasar.cjs.prod.js +2 -2
  119. package/dist/quasar.css +15 -14
  120. package/dist/quasar.esm.prod.js +2 -2
  121. package/dist/quasar.prod.css +1 -1
  122. package/dist/quasar.rtl.css +15 -14
  123. package/dist/quasar.rtl.prod.css +1 -1
  124. package/dist/quasar.sass +11 -13
  125. package/dist/quasar.umd.js +425 -286
  126. package/dist/quasar.umd.prod.js +2 -2
  127. package/dist/ssr-directives/Morph.js +1 -1
  128. package/dist/types/index.d.ts +29 -11
  129. package/dist/types/utils/date.d.ts +2 -1
  130. package/dist/vetur/quasar-attributes.json +13 -5
  131. package/dist/vetur/quasar-tags.json +4 -2
  132. package/dist/web-types/web-types.json +80 -62
  133. package/package.json +1 -1
  134. package/src/api.extends.json +1 -1
  135. package/src/components/ajax-bar/QAjaxBar.js +47 -26
  136. package/src/components/ajax-bar/QAjaxBar.json +22 -4
  137. package/src/components/breadcrumbs/QBreadcrumbs.js +3 -3
  138. package/src/components/breadcrumbs/QBreadcrumbsEl.js +2 -2
  139. package/src/components/btn/use-btn.js +5 -2
  140. package/src/components/btn-toggle/QBtnToggle.js +2 -0
  141. package/src/components/carousel/QCarouselSlide.json +2 -2
  142. package/src/components/chat/QChatMessage.json +1 -1
  143. package/src/components/dialog/QDialog.js +7 -5
  144. package/src/components/icon/QIcon.js +36 -32
  145. package/src/components/icon/QIcon.sass +0 -1
  146. package/src/components/img/QImg.json +2 -2
  147. package/src/components/layout/QLayout.js +49 -1
  148. package/src/components/linear-progress/QLinearProgress.json +1 -1
  149. package/src/components/menu/QMenu.js +6 -2
  150. package/src/components/pagination/QPagination.js +4 -4
  151. package/src/components/parallax/QParallax.json +1 -1
  152. package/src/components/radio/QRadio.js +2 -6
  153. package/src/components/radio/QRadio.json +1 -1
  154. package/src/components/range/QRange.js +67 -89
  155. package/src/components/rating/QRating.json +3 -3
  156. package/src/components/resize-observer/QResizeObserver.js +11 -10
  157. package/src/components/scroll-area/QScrollArea.js +5 -1
  158. package/src/components/scroll-area/QScrollArea.sass +1 -0
  159. package/src/components/scroll-observer/QScrollObserver.js +2 -0
  160. package/src/components/select/QSelect.js +4 -1
  161. package/src/components/select/QSelect.json +1 -1
  162. package/src/components/slider/QSlider.js +20 -10
  163. package/src/components/slider/QSlider.sass +5 -6
  164. package/src/components/slider/use-slider.js +19 -16
  165. package/src/components/tabs/QTabs.js +27 -11
  166. package/src/components/timeline/QTimeline.sass +1 -2
  167. package/src/components/timeline/QTimelineEntry.json +1 -1
  168. package/src/components/tooltip/QTooltip.js +1 -2
  169. package/src/components/video/QVideo.js +4 -1
  170. package/src/components/video/QVideo.json +12 -1
  171. package/src/composables/private/use-field.js +13 -15
  172. package/src/composables/private/use-model-toggle.js +1 -1
  173. package/src/composables/private/use-portal.js +9 -7
  174. package/src/composables/private/use-tick.js +7 -14
  175. package/src/css/core/visibility.sass +0 -1
  176. package/src/css/variables.sass +4 -6
  177. package/src/plugins/BottomSheet.json +7 -1
  178. package/src/plugins/LoadingBar.json +1 -1
  179. package/src/plugins/Notify.json +22 -22
  180. package/src/utils/clone.js +53 -4
  181. package/src/utils/private/focus-manager.js +8 -10
  182. package/src/utils/private/global-dialog.js +4 -4
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Quasar Framework v2.4.1
2
+ * Quasar Framework v2.4.5
3
3
  * (c) 2015-present Razvan Stoenescu
4
4
  * Released under the MIT License.
5
5
  */
@@ -1447,7 +1447,7 @@
1447
1447
  }
1448
1448
 
1449
1449
  var installQuasar = function (parentApp, opts = {}) {
1450
- const $q = { version: '2.4.1' };
1450
+ const $q = { version: '2.4.5' };
1451
1451
 
1452
1452
  if (globalConfigIsFrozen === false) {
1453
1453
  if (opts.config !== void 0) {
@@ -1532,22 +1532,22 @@
1532
1532
 
1533
1533
  const
1534
1534
  xhr = XMLHttpRequest,
1535
- send = xhr.prototype.send,
1536
- stackStart = [],
1537
- stackStop = [];
1535
+ open = xhr.prototype.open,
1536
+ positionValues = [ 'top', 'right', 'bottom', 'left' ];
1538
1537
 
1538
+ let stack = [];
1539
1539
  let highjackCount = 0;
1540
1540
 
1541
1541
  function translate ({ p, pos, active, horiz, reverse, dir }) {
1542
1542
  let x = 1, y = 1;
1543
1543
 
1544
- if (horiz) {
1545
- if (reverse) { x = -1; }
1544
+ if (horiz === true) {
1545
+ if (reverse === true) { x = -1; }
1546
1546
  if (pos === 'bottom') { y = -1; }
1547
1547
  return { transform: `translate3d(${ x * (p - 100) }%,${ active ? 0 : y * -200 }%,0)` }
1548
1548
  }
1549
1549
 
1550
- if (reverse) { y = -1; }
1550
+ if (reverse === true) { y = -1; }
1551
1551
  if (pos === 'right') { x = -1; }
1552
1552
  return { transform: `translate3d(${ active ? 0 : dir * x * -200 }%,${ y * (p - 100) }%,0)` }
1553
1553
  }
@@ -1573,32 +1573,45 @@
1573
1573
  return between(p + amount, 0, 100)
1574
1574
  }
1575
1575
 
1576
- function highjackAjax (start, stop) {
1577
- stackStart.push(start);
1578
- stackStop.push(stop);
1579
-
1576
+ function highjackAjax (stackEntry) {
1580
1577
  highjackCount++;
1581
1578
 
1579
+ stack.push(stackEntry);
1580
+
1582
1581
  if (highjackCount > 1) { return }
1583
1582
 
1584
- function endHandler () {
1585
- stackStop.forEach(fn => { fn(); });
1586
- }
1583
+ xhr.prototype.open = function (_, url) {
1584
+ const stopStack = [];
1585
+
1586
+ const loadStart = () => {
1587
+ stack.forEach(entry => {
1588
+ if (
1589
+ entry.hijackFilter.value === null
1590
+ || (entry.hijackFilter.value(url) === true)
1591
+ ) {
1592
+ entry.start();
1593
+ stopStack.push(entry.stop);
1594
+ }
1595
+ });
1596
+ };
1597
+
1598
+ const loadEnd = () => {
1599
+ stopStack.forEach(stop => { stop(); });
1600
+ };
1587
1601
 
1588
- xhr.prototype.send = function (/* ...args */) {
1589
- stackStart.forEach(fn => { fn(); });
1590
- this.addEventListener('loadend', endHandler, false);
1591
- send.apply(this, arguments);
1602
+ this.addEventListener('loadstart', loadStart, { once: true });
1603
+ this.addEventListener('loadend', loadEnd, { once: true });
1604
+
1605
+ open.apply(this, arguments);
1592
1606
  };
1593
1607
  }
1594
1608
 
1595
- function restoreAjax (start, stop) {
1596
- stackStart.splice(stackStart.indexOf(start), 1);
1597
- stackStop.splice(stackStop.indexOf(stop), 1);
1609
+ function restoreAjax (start) {
1610
+ stack = stack.filter(entry => entry.start !== start);
1598
1611
 
1599
1612
  highjackCount = Math.max(0, highjackCount - 1);
1600
1613
  if (highjackCount === 0) {
1601
- xhr.prototype.send = send;
1614
+ xhr.prototype.open = open;
1602
1615
  }
1603
1616
  }
1604
1617
 
@@ -1609,15 +1622,19 @@
1609
1622
  position: {
1610
1623
  type: String,
1611
1624
  default: 'top',
1612
- validator: val => [ 'top', 'right', 'bottom', 'left' ].includes(val)
1625
+ validator: val => positionValues.includes(val)
1613
1626
  },
1627
+
1614
1628
  size: {
1615
1629
  type: String,
1616
1630
  default: '2px'
1617
1631
  },
1632
+
1618
1633
  color: String,
1619
1634
  skipHijack: Boolean,
1620
- reverse: Boolean
1635
+ reverse: Boolean,
1636
+
1637
+ hijackFilter: Function
1621
1638
  },
1622
1639
 
1623
1640
  emits: [ 'start', 'stop' ],
@@ -1649,7 +1666,7 @@
1649
1666
  active,
1650
1667
  horiz: horizontal.value,
1651
1668
  reverse: proxy.$q.lang.rtl === true && [ 'top', 'bottom' ].includes(props.position)
1652
- ? !props.reverse
1669
+ ? props.reverse === false
1653
1670
  : props.reverse,
1654
1671
  dir: proxy.$q.lang.rtl === true ? -1 : 1
1655
1672
  });
@@ -1745,13 +1762,17 @@
1745
1762
  vue.onMounted(() => {
1746
1763
  if (props.skipHijack !== true) {
1747
1764
  hijacked = true;
1748
- highjackAjax(start, stop);
1765
+ highjackAjax({
1766
+ start,
1767
+ stop,
1768
+ hijackFilter: vue.computed(() => props.hijackFilter || null)
1769
+ });
1749
1770
  }
1750
1771
  });
1751
1772
 
1752
1773
  vue.onBeforeUnmount(() => {
1753
1774
  clearTimeout(timer);
1754
- hijacked === true && restoreAjax(start, stop);
1775
+ hijacked === true && restoreAjax(start);
1755
1776
  });
1756
1777
 
1757
1778
  // expose public methods
@@ -1848,6 +1869,8 @@
1848
1869
  : vnode
1849
1870
  }
1850
1871
 
1872
+ const defaultViewBox = '0 0 24 24';
1873
+
1851
1874
  const sameFn = i => i;
1852
1875
  const ionFn = i => `ionicons ${ i }`;
1853
1876
 
@@ -1901,7 +1924,7 @@
1901
1924
 
1902
1925
  const classes = vue.computed(() =>
1903
1926
  'q-icon'
1904
- + (props.left === true ? ' on-left' : '')
1927
+ + (props.left === true ? ' on-left' : '') // TODO Qv3: drop this
1905
1928
  + (props.right === true ? ' on-right' : '')
1906
1929
  + (props.color !== void 0 ? ` text-${ props.color }` : '')
1907
1930
  );
@@ -1911,10 +1934,7 @@
1911
1934
  let icon = props.name;
1912
1935
 
1913
1936
  if (!icon) {
1914
- return {
1915
- none: true,
1916
- cls: classes.value
1917
- }
1937
+ return { none: true }
1918
1938
  }
1919
1939
 
1920
1940
  if ($q.iconMapFn !== null) {
@@ -1925,7 +1945,7 @@
1925
1945
  }
1926
1946
  else {
1927
1947
  return {
1928
- cls: res.cls + ' ' + classes.value,
1948
+ cls: res.cls,
1929
1949
  content: res.content !== void 0
1930
1950
  ? res.content
1931
1951
  : ' '
@@ -1935,39 +1955,32 @@
1935
1955
  }
1936
1956
 
1937
1957
  if (mRE.test(icon) === true) {
1938
- const [ def, viewBox ] = icon.split('|');
1958
+ const [ def, viewBox = defaultViewBox ] = icon.split('|');
1939
1959
 
1940
1960
  return {
1941
1961
  svg: true,
1942
- cls: classes.value,
1962
+ viewBox,
1943
1963
  nodes: def.split('&&').map(path => {
1944
1964
  const [ d, style, transform ] = path.split('@@');
1945
- return vue.h('path', {
1946
- style,
1947
- d,
1948
- transform
1949
- })
1950
- }),
1951
- viewBox: viewBox !== void 0 ? viewBox : '0 0 24 24'
1965
+ return vue.h('path', { style, d, transform })
1966
+ })
1952
1967
  }
1953
1968
  }
1954
1969
 
1955
1970
  if (imgRE.test(icon) === true) {
1956
1971
  return {
1957
1972
  img: true,
1958
- cls: classes.value,
1959
1973
  src: icon.substring(4)
1960
1974
  }
1961
1975
  }
1962
1976
 
1963
1977
  if (svgUseRE.test(icon) === true) {
1964
- const [ def, viewBox ] = icon.split('|');
1978
+ const [ def, viewBox = defaultViewBox ] = icon.split('|');
1965
1979
 
1966
1980
  return {
1967
1981
  svguse: true,
1968
- cls: classes.value,
1969
1982
  src: def.substring(7),
1970
- viewBox: viewBox !== void 0 ? viewBox : '0 0 24 24'
1983
+ viewBox
1971
1984
  }
1972
1985
  }
1973
1986
 
@@ -2001,14 +2014,14 @@
2001
2014
  }
2002
2015
 
2003
2016
  return {
2004
- cls: cls + ' ' + classes.value,
2017
+ cls,
2005
2018
  content
2006
2019
  }
2007
2020
  });
2008
2021
 
2009
2022
  return () => {
2010
2023
  const data = {
2011
- class: type.value.cls,
2024
+ class: classes.value,
2012
2025
  style: sizeStyle.value,
2013
2026
  'aria-hidden': 'true',
2014
2027
  role: 'presentation'
@@ -2019,24 +2032,36 @@
2019
2032
  }
2020
2033
 
2021
2034
  if (type.value.img === true) {
2022
- data.src = type.value.src;
2023
- return vue.h('img', data)
2035
+ return vue.h('div', data, hMergeSlot(slots.default, [
2036
+ vue.h('img', {
2037
+ class: type.value.cls,
2038
+ src: type.value.src
2039
+ })
2040
+ ]))
2024
2041
  }
2025
2042
 
2026
2043
  if (type.value.svg === true) {
2027
- data.viewBox = type.value.viewBox;
2028
-
2029
- return vue.h('svg', data, hMergeSlot(slots.default, type.value.nodes))
2044
+ return vue.h('div', data, hMergeSlot(slots.default, [
2045
+ vue.h('svg', {
2046
+ class: type.value.cls,
2047
+ viewBox: type.value.viewBox
2048
+ }, type.value.nodes)
2049
+ ]))
2030
2050
  }
2031
2051
 
2032
2052
  if (type.value.svguse === true) {
2033
- data.viewBox = type.value.viewBox;
2053
+ return vue.h('div', data, hMergeSlot(slots.default, [
2054
+ vue.h('svg', {
2055
+ class: type.value.cls,
2056
+ viewBox: type.value.viewBox
2057
+ }, [
2058
+ vue.h('use', { 'xlink:href': type.value.src })
2059
+ ])
2060
+ ]))
2061
+ }
2034
2062
 
2035
- return vue.h(
2036
- 'svg',
2037
- data,
2038
- hMergeSlot(slots.default, [ vue.h('use', { 'xlink:href': type.value.src }) ])
2039
- )
2063
+ if (type.value.cls !== void 0) {
2064
+ data.class += ' ' + type.value.cls;
2040
2065
  }
2041
2066
 
2042
2067
  return vue.h(props.tag, data, hMergeSlot(slots.default, [
@@ -2352,7 +2377,7 @@
2352
2377
  );
2353
2378
 
2354
2379
  const sepClass = vue.computed(() => (props.separatorColor ? ` text-${ props.separatorColor }` : ''));
2355
- const activeClass = vue.computed(() => `text-${ props.activeColor }`);
2380
+ const activeClass = vue.computed(() => ` text-${ props.activeColor }`);
2356
2381
 
2357
2382
  return () => {
2358
2383
  const vnodes = getNormalizedVNodes(
@@ -2374,8 +2399,8 @@
2374
2399
  if (comp.type !== void 0 && comp.type.name === 'QBreadcrumbsEl') {
2375
2400
  const middle = els < len;
2376
2401
  const disabled = comp.props !== null && disabledValues.includes(comp.props.disable);
2377
- const cls = (middle === true ? ' q-breadcrumbs--last' : '')
2378
- + (disabled !== true && middle === true ? ' ' + activeClass.value : '');
2402
+ const cls = (middle === true ? '' : ' q-breadcrumbs--last')
2403
+ + (disabled !== true && middle === true ? activeClass.value : '');
2379
2404
 
2380
2405
  els++;
2381
2406
 
@@ -2687,13 +2712,13 @@
2687
2712
  },
2688
2713
 
2689
2714
  setup (props, { slots }) {
2690
- const { linkTag, linkProps, hasRouterLink, navigateToRouterLink } = useRouterLink();
2715
+ const { linkTag, linkProps, linkClass, hasRouterLink, navigateToRouterLink } = useRouterLink();
2691
2716
 
2692
2717
  const data = vue.computed(() => {
2693
2718
  const acc = {
2694
2719
  class: 'q-breadcrumbs__el q-link '
2695
2720
  + 'flex inline items-center relative-position '
2696
- + (props.disable !== true ? 'q-link--focusable' : 'q-breadcrumbs__el--disable'),
2721
+ + (props.disable !== true ? 'q-link--focusable' + linkClass.value : 'q-breadcrumbs__el--disable'),
2697
2722
  ...linkProps.value
2698
2723
  };
2699
2724
  if (hasRouterLink.value === true) {
@@ -3048,7 +3073,7 @@
3048
3073
  xl: 24
3049
3074
  };
3050
3075
 
3051
- const formTypes = [ 'submit', 'reset' ];
3076
+ const formTypes = [ 'button', 'submit', 'reset' ];
3052
3077
  const mediaTypeRE = /[^\s]\/[^\s]/;
3053
3078
 
3054
3079
  const useBtnProps = {
@@ -3156,7 +3181,10 @@
3156
3181
  }
3157
3182
 
3158
3183
  if (linkTag.value === 'a') {
3159
- if (acc.href === void 0) {
3184
+ if (props.disable === true) {
3185
+ acc[ 'aria-disabled' ] = 'true';
3186
+ }
3187
+ else if (acc.href === void 0) {
3160
3188
  acc.role = 'button';
3161
3189
  }
3162
3190
  if (hasRouterLink.value !== true && mediaTypeRE.test(props.type) === true) {
@@ -3896,7 +3924,7 @@
3896
3924
  'before-show', 'show', 'before-hide', 'hide'
3897
3925
  ];
3898
3926
 
3899
- // handleShow/handleHide -> removeTick(), self (& emit show), prepareTick()
3927
+ // handleShow/handleHide -> removeTick(), self (& emit show)
3900
3928
 
3901
3929
  function useModelToggle ({
3902
3930
  showing,
@@ -4036,17 +4064,19 @@
4036
4064
  }
4037
4065
 
4038
4066
  let queue = [];
4039
- const waitFlags = [];
4067
+ let waitFlags = [];
4068
+
4069
+ function clearFlag (flag) {
4070
+ waitFlags = waitFlags.filter(entry => entry !== flag);
4071
+ }
4040
4072
 
4041
4073
  function addFocusWaitFlag (flag) {
4074
+ clearFlag(flag);
4042
4075
  waitFlags.push(flag);
4043
4076
  }
4044
4077
 
4045
4078
  function removeFocusWaitFlag (flag) {
4046
- const index = waitFlags.indexOf(flag);
4047
- if (index !== -1) {
4048
- waitFlags.splice(index, 1);
4049
- }
4079
+ clearFlag(flag);
4050
4080
 
4051
4081
  if (waitFlags.length === 0 && queue.length > 0) {
4052
4082
  // only call last focus handler (can't focus multiple things at once)
@@ -4061,15 +4091,11 @@
4061
4091
  }
4062
4092
  else {
4063
4093
  queue.push(fn);
4064
- return fn
4065
4094
  }
4066
4095
  }
4067
4096
 
4068
4097
  function removeFocusFn (fn) {
4069
- const index = queue.indexOf(fn);
4070
- if (index !== -1) {
4071
- queue.splice(index, 1);
4072
- }
4098
+ queue = queue.filter(entry => entry !== fn);
4073
4099
  }
4074
4100
 
4075
4101
  const globalNodes = [];
@@ -4200,16 +4226,18 @@
4200
4226
  return
4201
4227
  }
4202
4228
 
4203
- if (onGlobalDialog === false && portalEl === null) {
4204
- portalEl = createGlobalNode();
4205
- }
4229
+ if (portalIsActive.value === false) {
4230
+ if (onGlobalDialog === false && portalEl === null) {
4231
+ portalEl = createGlobalNode();
4232
+ }
4206
4233
 
4207
- portalIsActive.value = true;
4234
+ portalIsActive.value = true;
4208
4235
 
4209
- // register portal
4210
- portalList.push(vm.proxy);
4236
+ // register portal
4237
+ portalList.push(vm.proxy);
4211
4238
 
4212
- addFocusWaitFlag(focusObj);
4239
+ addFocusWaitFlag(focusObj);
4240
+ }
4213
4241
  }
4214
4242
 
4215
4243
  function hidePortal () {
@@ -4289,8 +4317,6 @@
4289
4317
  * Usage:
4290
4318
  * registerTick(fn)
4291
4319
  * registerTick(fn)
4292
- * ....
4293
- * prepareTick()
4294
4320
  */
4295
4321
 
4296
4322
  function useTick () {
@@ -4303,22 +4329,17 @@
4303
4329
  return {
4304
4330
  registerTick (fn) {
4305
4331
  tickFn = fn;
4332
+
4333
+ vue.nextTick(() => {
4334
+ if (tickFn === fn) {
4335
+ tickFn();
4336
+ tickFn = void 0;
4337
+ }
4338
+ });
4306
4339
  },
4307
4340
 
4308
4341
  removeTick () {
4309
4342
  tickFn = void 0;
4310
- },
4311
-
4312
- prepareTick () {
4313
- if (tickFn !== void 0) {
4314
- const fn = tickFn;
4315
- vue.nextTick(() => {
4316
- if (tickFn === fn) {
4317
- tickFn();
4318
- tickFn = void 0;
4319
- }
4320
- });
4321
- }
4322
4343
  }
4323
4344
  }
4324
4345
  }
@@ -5013,7 +5034,7 @@
5013
5034
  );
5014
5035
 
5015
5036
  const isDark = useDark(props, $q);
5016
- const { registerTick, removeTick, prepareTick } = useTick();
5037
+ const { registerTick, removeTick } = useTick();
5017
5038
  const { registerTimeout, removeTimeout } = useTimeout();
5018
5039
  const { transition, transitionStyle } = useTransition(props, showing);
5019
5040
  const { localScrollTarget, changeScrollEvent, unconfigureScrollTarget } = useScrollTarget(props, configureScrollTarget);
@@ -5140,7 +5161,6 @@
5140
5161
  updatePosition();
5141
5162
  props.noFocus !== true && focus();
5142
5163
  });
5143
- prepareTick();
5144
5164
 
5145
5165
  registerTimeout(() => {
5146
5166
  // required in order to avoid the "double-tap needed" issue
@@ -5173,6 +5193,7 @@
5173
5193
  )
5174
5194
  ) {
5175
5195
  refocusTarget.focus();
5196
+ refocusTarget = null;
5176
5197
  }
5177
5198
 
5178
5199
  registerTimeout(() => {
@@ -5195,6 +5216,10 @@
5195
5216
  removeClickOutside(clickOutsideProps);
5196
5217
  removeEscapeKey(onEscapeKey);
5197
5218
  }
5219
+
5220
+ if (hiding !== true) {
5221
+ refocusTarget = null;
5222
+ }
5198
5223
  }
5199
5224
 
5200
5225
  function configureScrollTarget () {
@@ -5598,6 +5623,8 @@
5598
5623
  key: i,
5599
5624
  onClick (e) { set(value, item, e); },
5600
5625
 
5626
+ 'aria-pressed': value === props.modelValue ? 'true' : 'false',
5627
+
5601
5628
  ...attrs,
5602
5629
  ...opt,
5603
5630
 
@@ -8278,7 +8305,7 @@
8278
8305
  const positionProp = vue.computed(() => (
8279
8306
  props.vertical === true
8280
8307
  ? (isReversed.value === true ? 'bottom' : 'top')
8281
- : isReversed.value === true ? 'right' : 'left'
8308
+ : (isReversed.value === true ? 'right' : 'left')
8282
8309
  ));
8283
8310
 
8284
8311
  const sizeProp = vue.computed(() => (props.vertical === true ? 'height' : 'width'));
@@ -8288,8 +8315,8 @@
8288
8315
  const attributes = vue.computed(() => {
8289
8316
  const acc = {
8290
8317
  role: 'slider',
8291
- 'aria-valuemin': props.min,
8292
- 'aria-valuemax': props.max,
8318
+ 'aria-valuemin': innerMin.value,
8319
+ 'aria-valuemax': innerMax.value,
8293
8320
  'aria-orientation': orientation.value,
8294
8321
  'data-step': props.step
8295
8322
  };
@@ -8480,15 +8507,19 @@
8480
8507
  })
8481
8508
  }
8482
8509
 
8510
+ const filterFn = ({ value }) => value >= props.min && value <= props.max;
8511
+
8483
8512
  if (Array.isArray(def) === true) {
8484
- return def.map(item => (Object(item) === item ? item : { value: item }))
8513
+ return def
8514
+ .map(item => (Object(item) === item ? item : { value: item }))
8515
+ .filter(filterFn)
8485
8516
  }
8486
8517
 
8487
8518
  return Object.keys(def).map(key => {
8488
8519
  const item = def[ key ];
8489
8520
  const value = Number(key);
8490
8521
  return Object(item) === item ? { ...item, value } : { value, label: item }
8491
- })
8522
+ }).filter(filterFn)
8492
8523
  }
8493
8524
 
8494
8525
  function getMarkerLabelStyle (val) {
@@ -8543,6 +8574,7 @@
8543
8574
  emit('pan', 'end');
8544
8575
  }
8545
8576
  active.value = false;
8577
+ focus.value = false;
8546
8578
  }
8547
8579
  else if (event.isFirst === true) {
8548
8580
  dragging.value = getDragging(event.evt);
@@ -8603,7 +8635,7 @@
8603
8635
 
8604
8636
  function getThumbRenderFn (thumb) {
8605
8637
  const focusClass = vue.computed(() => (
8606
- preventFocus.value === false && focus.value === thumb.focusValue
8638
+ preventFocus.value === false && (focus.value === thumb.focusValue || focus.value === 'both')
8607
8639
  ? ' q-slider--focus'
8608
8640
  : ''
8609
8641
  ));
@@ -8618,9 +8650,7 @@
8618
8650
  width: props.thumbSize,
8619
8651
  height: props.thumbSize,
8620
8652
  [ positionProp.value ]: `${ 100 * thumb.ratio.value }%`,
8621
- 'z-index': thumb.nextFocus !== void 0
8622
- ? thumb.nextFocus.value === 'min' ? 2 : void 0
8623
- : void 0
8653
+ zIndex: focus.value === thumb.focusValue ? 2 : void 0
8624
8654
  }));
8625
8655
 
8626
8656
  const pinColor = vue.computed(() => (
@@ -8676,12 +8706,12 @@
8676
8706
  return vue.h('div', {
8677
8707
  class: classes.value,
8678
8708
  style: style.value,
8679
- ...(thumb.getNodeData !== void 0 ? thumb.getNodeData() : {})
8709
+ ...thumb.getNodeData()
8680
8710
  }, thumbContent)
8681
8711
  }
8682
8712
  }
8683
8713
 
8684
- function getContent (selectionBarStyle, events, injectThumb) {
8714
+ function getContent (selectionBarStyle, trackContainerTabindex, trackContainerEvents, injectThumb) {
8685
8715
  const trackContent = [];
8686
8716
 
8687
8717
  props.innerTrackColor !== 'transparent' && trackContent.push(
@@ -8716,15 +8746,14 @@
8716
8746
  {
8717
8747
  key: 'trackC',
8718
8748
  class: trackContainerClass.value,
8719
- tabindex: tabindex.value,
8720
- ...events.value
8749
+ tabindex: trackContainerTabindex.value,
8750
+ ...trackContainerEvents.value
8721
8751
  },
8722
8752
  [
8723
8753
  vue.h('div', {
8724
8754
  class: trackClass.value,
8725
8755
  style: trackStyle.value
8726
- },
8727
- trackContent)
8756
+ }, trackContent)
8728
8757
  ],
8729
8758
  'slide',
8730
8759
  editable.value, () => panDirective.value
@@ -8771,7 +8800,8 @@
8771
8800
  innerMax,
8772
8801
  innerMaxRatio,
8773
8802
  positionProp,
8774
- sizeProp
8803
+ sizeProp,
8804
+ isReversed
8775
8805
  },
8776
8806
 
8777
8807
  methods: {
@@ -8788,6 +8818,8 @@
8788
8818
  }
8789
8819
  }
8790
8820
 
8821
+ const getNodeData = () => ({});
8822
+
8791
8823
  var QSlider = createComponent({
8792
8824
  name: 'QSlider',
8793
8825
 
@@ -8815,8 +8847,20 @@
8815
8847
 
8816
8848
  const rootRef = vue.ref(null);
8817
8849
  const curRatio = vue.ref(0);
8850
+ const model = vue.ref(0);
8851
+
8852
+ function normalizeModel () {
8853
+ model.value = props.modelValue === null
8854
+ ? state.innerMin.value
8855
+ : between(props.modelValue, state.innerMin.value, state.innerMax.value);
8856
+ }
8818
8857
 
8819
- const model = vue.ref(props.modelValue === null ? state.innerMin.value : props.modelValue);
8858
+ vue.watch(
8859
+ () => `${ props.modelValue }|${ state.innerMin.value }|${ state.innerMax.value }`,
8860
+ normalizeModel
8861
+ );
8862
+
8863
+ normalizeModel();
8820
8864
 
8821
8865
  const modelRatio = vue.computed(() => methods.convertModelToRatio(model.value));
8822
8866
  const ratio = vue.computed(() => (state.active.value === true ? curRatio.value : modelRatio.value));
@@ -8834,6 +8878,7 @@
8834
8878
 
8835
8879
  const getThumb = methods.getThumbRenderFn({
8836
8880
  focusValue: true,
8881
+ getNodeData,
8837
8882
  ratio,
8838
8883
  label: vue.computed(() => (
8839
8884
  props.labelValue !== void 0
@@ -8845,7 +8890,7 @@
8845
8890
  labelTextColor: vue.computed(() => props.labelTextColor)
8846
8891
  });
8847
8892
 
8848
- const events = vue.computed(() => {
8893
+ const trackContainerEvents = vue.computed(() => {
8849
8894
  if (state.editable.value !== true) {
8850
8895
  return {}
8851
8896
  }
@@ -8861,12 +8906,6 @@
8861
8906
  }
8862
8907
  });
8863
8908
 
8864
- vue.watch(() => props.modelValue + state.innerMin.value + state.innerMax.value, () => {
8865
- model.value = props.modelValue === null
8866
- ? state.innerMin.value
8867
- : between(props.modelValue, state.innerMin.value, state.innerMax.value);
8868
- });
8869
-
8870
8909
  function updateValue (change) {
8871
8910
  if (model.value !== props.modelValue) {
8872
8911
  emit('update:modelValue', model.value);
@@ -8901,7 +8940,7 @@
8901
8940
 
8902
8941
  const
8903
8942
  stepVal = ([ 34, 33 ].includes(evt.keyCode) ? 10 : 1) * state.step.value,
8904
- offset = [ 34, 37, 40 ].includes(evt.keyCode) ? -stepVal : stepVal;
8943
+ offset = ([ 34, 37, 40 ].includes(evt.keyCode) ? -1 : 1) * (state.isReversed.value === true ? -1 : 1) * stepVal;
8905
8944
 
8906
8945
  model.value = between(
8907
8946
  parseFloat((model.value + offset).toFixed(state.decimals.value)),
@@ -8915,7 +8954,8 @@
8915
8954
  return () => {
8916
8955
  const content = methods.getContent(
8917
8956
  selectionBarStyle,
8918
- events,
8957
+ state.tabindex,
8958
+ trackContainerEvents,
8919
8959
  node => { node.push(getThumb()); }
8920
8960
  );
8921
8961
 
@@ -8963,19 +9003,20 @@
8963
9003
 
8964
9004
  setup (props, { emit }) {
8965
9005
 
8966
- let timer, targetEl, size = { width: -1, height: -1 };
9006
+ let timer = null, targetEl, size = { width: -1, height: -1 };
8967
9007
 
8968
- function trigger (now) {
8969
- if (now === true || props.debounce === 0 || props.debounce === '0') {
8970
- onResize();
9008
+ function trigger (immediately) {
9009
+ if (immediately === true || props.debounce === 0 || props.debounce === '0') {
9010
+ emitEvent();
8971
9011
  }
8972
- else if (!timer) {
8973
- timer = setTimeout(onResize, props.debounce);
9012
+ else if (timer === null) {
9013
+ timer = setTimeout(emitEvent, props.debounce);
8974
9014
  }
8975
9015
  }
8976
9016
 
8977
- function onResize () {
8978
- timer = void 0;
9017
+ function emitEvent () {
9018
+ clearTimeout(timer);
9019
+ timer = null;
8979
9020
 
8980
9021
  if (targetEl) {
8981
9022
  const { offsetWidth: width, offsetHeight: height } = targetEl;
@@ -9002,7 +9043,7 @@
9002
9043
  if (targetEl) {
9003
9044
  observer = new ResizeObserver(trigger);
9004
9045
  observer.observe(targetEl);
9005
- onResize();
9046
+ emitEvent();
9006
9047
  }
9007
9048
  });
9008
9049
  });
@@ -9045,7 +9086,7 @@
9045
9086
  if (targetEl && targetEl.contentDocument) {
9046
9087
  curDocView = targetEl.contentDocument.defaultView;
9047
9088
  curDocView.addEventListener('resize', trigger, listenOpts.passive);
9048
- onResize();
9089
+ emitEvent();
9049
9090
  }
9050
9091
  }
9051
9092
 
@@ -9156,7 +9197,8 @@
9156
9197
  const vm = vue.getCurrentInstance();
9157
9198
  const { proxy: { $q } } = vm;
9158
9199
 
9159
- const { registerTick, prepareTick } = useTick();
9200
+ const { registerTick: registerScrollTick } = useTick();
9201
+ const { registerTimeout: registerFocusTimeout, removeTimeout: removeFocusTimeout } = useTimeout();
9160
9202
  const { registerTimeout } = useTimeout();
9161
9203
 
9162
9204
  const rootRef = vue.ref(null);
@@ -9264,7 +9306,7 @@
9264
9306
  }
9265
9307
 
9266
9308
  function recalculateScroll () {
9267
- registerTick(() => {
9309
+ registerScrollTick(() => {
9268
9310
  if (vm.isDeactivated !== true && vm.isUnmounted !== true) {
9269
9311
  updateContainer({
9270
9312
  width: rootRef.value.offsetWidth,
@@ -9272,8 +9314,6 @@
9272
9314
  });
9273
9315
  }
9274
9316
  });
9275
-
9276
- prepareTick();
9277
9317
  }
9278
9318
 
9279
9319
  function updateContainer (domSize) {
@@ -9432,11 +9472,8 @@
9432
9472
  return true
9433
9473
  }
9434
9474
 
9435
- const dirPrev = (props.vertical === true && keyCode === 38 /* ArrowUp */)
9436
- || (props.vertical !== true && keyCode === 37 /* ArrowLeft */);
9437
-
9438
- const dirNext = (props.vertical === true && keyCode === 40 /* ArrowDown */)
9439
- || (props.vertical !== true && keyCode === 39 /* ArrowRight */);
9475
+ const dirPrev = keyCode === (props.vertical === true ? 38 /* ArrowUp */ : 37 /* ArrowLeft */);
9476
+ const dirNext = keyCode === (props.vertical === true ? 40 /* ArrowDown */ : 39 /* ArrowRight */);
9440
9477
 
9441
9478
  const dir = dirPrev === true ? -1 : (dirNext === true ? 1 : void 0);
9442
9479
 
@@ -9570,8 +9607,28 @@
9570
9607
  }
9571
9608
  }
9572
9609
 
9573
- function onFocusin () { hasFocus.value = true; }
9574
- function onFocusout () { hasFocus.value = false; }
9610
+ function onFocusin (e) {
9611
+ removeFocusTimeout();
9612
+
9613
+ if (
9614
+ hasFocus.value !== true
9615
+ && rootRef.value !== null
9616
+ && e.target
9617
+ && typeof e.target.closest === 'function'
9618
+ ) {
9619
+ const tab = e.target.closest('.q-tab');
9620
+
9621
+ // if the target is contained by a QTab/QRouteTab
9622
+ // (it might be other elements focused, like additional QBtn)
9623
+ if (tab && rootRef.value.contains(tab) === true) {
9624
+ hasFocus.value = true;
9625
+ }
9626
+ }
9627
+ }
9628
+
9629
+ function onFocusout () {
9630
+ registerFocusTimeout(() => { hasFocus.value = false; }, 30);
9631
+ }
9575
9632
 
9576
9633
  function verifyRouteModel () {
9577
9634
  if ($tabs.avoidRouteWatcher !== true) {
@@ -12381,7 +12438,7 @@
12381
12438
  )
12382
12439
  }
12383
12440
 
12384
- function clone$1 (date) {
12441
+ function clone (date) {
12385
12442
  return isDate(date) === true
12386
12443
  ? new Date(date.getTime())
12387
12444
  : date
@@ -12408,7 +12465,7 @@
12408
12465
  isSameDate,
12409
12466
  daysInMonth,
12410
12467
  formatDate,
12411
- clone: clone$1
12468
+ clone
12412
12469
  };
12413
12470
 
12414
12471
  const yearsInterval = 20;
@@ -14170,7 +14227,7 @@
14170
14227
 
14171
14228
  const { preventBodyScroll } = usePreventScroll();
14172
14229
  const { registerTimeout, removeTimeout } = useTimeout();
14173
- const { registerTick, removeTick, prepareTick } = useTick();
14230
+ const { registerTick, removeTick } = useTick();
14174
14231
 
14175
14232
  const { showPortal, hidePortal, portalIsActive, renderPortal } = usePortal(
14176
14233
  vm, innerRef, renderPortalContent, /* pls do check if on a global dialog */ true
@@ -14269,7 +14326,6 @@
14269
14326
  if (props.noFocus !== true) {
14270
14327
  document.activeElement !== null && document.activeElement.blur();
14271
14328
  registerTick(focus);
14272
- prepareTick();
14273
14329
  }
14274
14330
 
14275
14331
  registerTimeout(() => {
@@ -14315,6 +14371,7 @@
14315
14371
 
14316
14372
  if (refocusTarget !== null) {
14317
14373
  refocusTarget.focus();
14374
+ refocusTarget = null;
14318
14375
  }
14319
14376
 
14320
14377
  registerTimeout(() => {
@@ -14382,6 +14439,10 @@
14382
14439
  removeEscapeKey(onEscapeKey);
14383
14440
  }
14384
14441
  }
14442
+
14443
+ if (hiding !== true) {
14444
+ refocusTarget = null;
14445
+ }
14385
14446
  }
14386
14447
 
14387
14448
  function updateMaximized (active) {
@@ -14440,9 +14501,7 @@
14440
14501
  }
14441
14502
  });
14442
14503
 
14443
- vue.onBeforeUnmount(() => {
14444
- cleanup();
14445
- });
14504
+ vue.onBeforeUnmount(cleanup);
14446
14505
 
14447
14506
  function renderPortalContent () {
14448
14507
  return vue.h('div', {
@@ -15607,7 +15666,7 @@
15607
15666
  const selfOrigin = vue.computed(() => parsePosition(props.self, $q.lang.rtl));
15608
15667
  const hideOnRouteChange = vue.computed(() => props.persistent !== true);
15609
15668
 
15610
- const { registerTick, removeTick, prepareTick } = useTick();
15669
+ const { registerTick, removeTick } = useTick();
15611
15670
  const { registerTimeout, removeTimeout } = useTimeout();
15612
15671
  const { transition, transitionStyle } = useTransition(props, showing);
15613
15672
  const { localScrollTarget, changeScrollEvent, unconfigureScrollTarget } = useScrollTarget(props, configureScrollTarget);
@@ -15673,7 +15732,6 @@
15673
15732
  updatePosition();
15674
15733
  configureScrollTarget();
15675
15734
  });
15676
- prepareTick();
15677
15735
 
15678
15736
  if (unwatchPosition === void 0) {
15679
15737
  unwatchPosition = vue.watch(
@@ -17892,11 +17950,60 @@
17892
17950
  }
17893
17951
  }
17894
17952
 
17895
- function clone (data) {
17896
- const s = JSON.stringify(data);
17897
- if (s) {
17898
- return JSON.parse(s)
17953
+ // adapted from https://stackoverflow.com/a/40294058
17954
+
17955
+ function cloneDeep (data, hash = new WeakMap()) {
17956
+ if (Object(data) !== data) return data
17957
+ if (hash.has(data)) return hash.get(data)
17958
+
17959
+ const result = data instanceof Date
17960
+ ? new Date(data)
17961
+ : (data instanceof RegExp
17962
+ ? new RegExp(data.source, data.flags)
17963
+ : (data instanceof Set
17964
+ ? new Set()
17965
+ : (data instanceof Map
17966
+ ? new Map()
17967
+ : (typeof data.constructor !== 'function'
17968
+ ? Object.create(null)
17969
+ : (data.prototype !== void 0 && typeof data.prototype.constructor === 'function'
17970
+ ? data
17971
+ : new data.constructor()
17972
+ )
17973
+ )
17974
+ )
17975
+ )
17976
+ );
17977
+
17978
+ if (typeof data.constructor === 'function' && typeof data.valueOf === 'function') {
17979
+ const val = data.valueOf();
17980
+
17981
+ if (Object(val) !== val) {
17982
+ const result = new data.constructor(val);
17983
+
17984
+ hash.set(data, result);
17985
+
17986
+ return result
17987
+ }
17988
+ }
17989
+
17990
+ hash.set(data, result);
17991
+
17992
+ if (data instanceof Set) {
17993
+ data.forEach(val => {
17994
+ result.add(cloneDeep(val, hash));
17995
+ });
17899
17996
  }
17997
+ else if (data instanceof Map) {
17998
+ data.forEach((val, key) => {
17999
+ result.set(key, cloneDeep(val, hash));
18000
+ });
18001
+ }
18002
+
18003
+ return Object.assign(
18004
+ result,
18005
+ ...Object.keys(data).map(key => ({ [ key ]: cloneDeep(data[ key ], hash) }))
18006
+ )
17900
18007
  }
17901
18008
 
17902
18009
  function fallback (text) {
@@ -20025,7 +20132,7 @@
20025
20132
 
20026
20133
  var utils = /*#__PURE__*/Object.freeze({
20027
20134
  __proto__: null,
20028
- clone: clone,
20135
+ clone: cloneDeep,
20029
20136
  colors: colors,
20030
20137
  copyToClipboard: copyToClipboard,
20031
20138
  createMetaMixin: createMetaMixin,
@@ -20513,26 +20620,24 @@
20513
20620
  state.targetUid.value = getTargetUid(val);
20514
20621
  });
20515
20622
 
20516
- let focusFn;
20517
-
20518
- function focus () {
20519
- focusFn !== void 0 && removeFocusFn(focusFn);
20520
- focusFn = addFocusFn(() => {
20521
- focusFn = void 0;
20522
- const el = document.activeElement;
20523
- let target = state.targetRef !== void 0 && state.targetRef.value;
20623
+ function focusHandler () {
20624
+ const el = document.activeElement;
20625
+ let target = state.targetRef !== void 0 && state.targetRef.value;
20524
20626
 
20525
- if (target && (el === null || el.id !== state.targetUid.value)) {
20526
- target.hasAttribute('tabindex') === true || (target = target.querySelector('[tabindex]'));
20527
- if (target && target !== el) {
20528
- target.focus();
20529
- }
20627
+ if (target && (el === null || el.id !== state.targetUid.value)) {
20628
+ target.hasAttribute('tabindex') === true || (target = target.querySelector('[tabindex]'));
20629
+ if (target && target !== el) {
20630
+ target.focus();
20530
20631
  }
20531
- });
20632
+ }
20633
+ }
20634
+
20635
+ function focus () {
20636
+ addFocusFn(focusHandler);
20532
20637
  }
20533
20638
 
20534
20639
  function blur () {
20535
- focusFn !== void 0 && removeFocusFn(focusFn);
20640
+ removeFocusFn(focusHandler);
20536
20641
  const el = document.activeElement;
20537
20642
  if (el !== null && state.rootRef.value.contains(el)) {
20538
20643
  el.blur();
@@ -23814,6 +23919,8 @@
23814
23919
  });
23815
23920
 
23816
23921
  function emitEvent () {
23922
+ clearTimeout(timer);
23923
+ cancelAnimationFrame(timer);
23817
23924
  timer = null;
23818
23925
 
23819
23926
  const top = Math.max(0, getVerticalScrollPosition(localScrollTarget));
@@ -24057,6 +24164,54 @@
24057
24164
 
24058
24165
  vue.provide(layoutKey, $layout);
24059
24166
 
24167
+ // prevent scrollbar flicker while resizing window height
24168
+ // if no page scrollbar is already present
24169
+ {
24170
+ let timer = null;
24171
+ const el = document.body;
24172
+
24173
+ function restoreScrollbar () {
24174
+ timer = null;
24175
+ el.classList.remove('hide-scrollbar');
24176
+ }
24177
+
24178
+ function hideScrollbar () {
24179
+ if (timer === null) {
24180
+ // if it has no scrollbar then there's nothing to do
24181
+
24182
+ if (el.scrollHeight > $q.screen.height) {
24183
+ return
24184
+ }
24185
+
24186
+ el.classList.add('hide-scrollbar');
24187
+ }
24188
+ else {
24189
+ clearTimeout(timer);
24190
+ }
24191
+
24192
+ timer = setTimeout(restoreScrollbar, 300);
24193
+ }
24194
+
24195
+ function updateScrollEvent (action) {
24196
+ if (timer !== null && action === 'remove') {
24197
+ clearTimeout(timer);
24198
+ restoreScrollbar();
24199
+ }
24200
+
24201
+ window[ `${ action }EventListener` ]('resize', hideScrollbar);
24202
+ }
24203
+
24204
+ vue.watch(
24205
+ () => (props.container !== true && scrollbarWidth.value > 0 ? 'add' : 'remove'),
24206
+ updateScrollEvent,
24207
+ { immediate: true }
24208
+ );
24209
+
24210
+ vue.onUnmounted(() => {
24211
+ updateScrollEvent('remove');
24212
+ });
24213
+ }
24214
+
24060
24215
  return () => {
24061
24216
  const content = hMergeSlot(slots.default, [
24062
24217
  vue.h(QScrollObserver, { onScroll: onPageScroll }),
@@ -24200,12 +24355,8 @@
24200
24355
  ...useSizeProps,
24201
24356
  ...useFormProps,
24202
24357
 
24203
- modelValue: {
24204
- required: true
24205
- },
24206
- val: {
24207
- required: true
24208
- },
24358
+ modelValue: { required: true },
24359
+ val: { required: true },
24209
24360
 
24210
24361
  label: String,
24211
24362
  leftLabel: Boolean,
@@ -25138,8 +25289,8 @@
25138
25289
  style,
25139
25290
  disable: props.disable,
25140
25291
  flat: !active,
25141
- textColor: active ? props.textColor : void 0,
25142
- label: props.min
25292
+ label: props.min,
25293
+ ...(active ? activeBtnProps.value : {})
25143
25294
  }, props.min));
25144
25295
  }
25145
25296
  if (boundaryEnd) {
@@ -25149,8 +25300,8 @@
25149
25300
  style,
25150
25301
  disable: props.disable,
25151
25302
  flat: !active,
25152
- textColor: active ? props.textColor : void 0,
25153
- label: props.max
25303
+ label: props.max,
25304
+ ...(active ? activeBtnProps.value : {})
25154
25305
  }, props.max));
25155
25306
  }
25156
25307
  if (ellipsesStart) {
@@ -25464,8 +25615,8 @@
25464
25615
 
25465
25616
  function onBeforeShow () {
25466
25617
  validated = false;
25467
- initialValue.value = clone(props.modelValue);
25468
- currentModel.value = clone(props.modelValue);
25618
+ initialValue.value = cloneDeep(props.modelValue);
25619
+ currentModel.value = cloneDeep(props.modelValue);
25469
25620
  emit('before-show');
25470
25621
  }
25471
25622
 
@@ -25971,13 +26122,8 @@
25971
26122
 
25972
26123
  modelValue: {
25973
26124
  type: Object,
25974
- default: () => ({
25975
- min: null,
25976
- max: null
25977
- }),
25978
- validator (val) {
25979
- return 'min' in val && 'max' in val
25980
- }
26125
+ default: () => ({ min: null, max: null }),
26126
+ validator: v => 'min' in v && 'max' in v
25981
26127
  },
25982
26128
 
25983
26129
  dragRange: Boolean,
@@ -26012,13 +26158,24 @@
26012
26158
  const rootRef = vue.ref(null);
26013
26159
  const curMinRatio = vue.ref(0);
26014
26160
  const curMaxRatio = vue.ref(0);
26161
+ const model = vue.ref({ min: 0, max: 0 });
26015
26162
 
26016
- const model = vue.ref({
26017
- min: props.modelValue.min === null ? state.innerMin.value : props.modelValue.min,
26018
- max: props.modelValue.max === null ? state.innerMax.value : props.modelValue.max
26019
- });
26163
+ function normalizeModel () {
26164
+ model.value.min = props.modelValue.min === null
26165
+ ? state.innerMin.value
26166
+ : between(props.modelValue.min, state.innerMin.value, state.innerMax.value);
26167
+
26168
+ model.value.max = props.modelValue.max === null
26169
+ ? state.innerMax.value
26170
+ : between(props.modelValue.max, state.innerMin.value, state.innerMax.value);
26171
+ }
26172
+
26173
+ vue.watch(
26174
+ () => `${ props.modelValue.min }|${ props.modelValue.max }|${ state.innerMin.value }|${ state.innerMax.value }`,
26175
+ normalizeModel
26176
+ );
26020
26177
 
26021
- const nextFocus = vue.ref(null);
26178
+ normalizeModel();
26022
26179
 
26023
26180
  const modelMinRatio = vue.computed(() => methods.convertModelToRatio(model.value.min));
26024
26181
  const modelMaxRatio = vue.computed(() => methods.convertModelToRatio(model.value.max));
@@ -26041,7 +26198,7 @@
26041
26198
  return acc
26042
26199
  });
26043
26200
 
26044
- const events = vue.computed(() => {
26201
+ const trackContainerEvents = vue.computed(() => {
26045
26202
  if (state.editable.value !== true) {
26046
26203
  return {}
26047
26204
  }
@@ -26052,34 +26209,45 @@
26052
26209
 
26053
26210
  const evt = { onMousedown: methods.onActivate };
26054
26211
 
26055
- props.dragOnlyRange === true && Object.assign(evt, {
26056
- onFocus: () => { onFocus('both'); },
26057
- onBlur: methods.onBlur,
26058
- onKeydown,
26059
- onKeyup: methods.onKeyup
26060
- });
26212
+ if (props.dragRange === true || props.dragOnlyRange === true) {
26213
+ Object.assign(evt, {
26214
+ onFocus: () => { state.focus.value = 'both'; },
26215
+ onBlur: methods.onBlur,
26216
+ onKeydown,
26217
+ onKeyup: methods.onKeyup
26218
+ });
26219
+ }
26061
26220
 
26062
26221
  return evt
26063
26222
  });
26064
26223
 
26065
- const minThumbRef = vue.ref(null);
26066
- const minEvents = vue.computed(() => (
26067
- state.editable.value === true && $q.platform.is.mobile !== true && props.dragOnlyRange !== true
26224
+ function getEvents (side) {
26225
+ return $q.platform.is.mobile !== true && state.editable.value === true && props.dragOnlyRange !== true
26068
26226
  ? {
26069
- onFocus: () => { onFocus('min'); },
26227
+ onFocus: () => { state.focus.value = side; },
26070
26228
  onBlur: methods.onBlur,
26071
26229
  onKeydown,
26072
26230
  onKeyup: methods.onKeyup
26073
26231
  }
26074
26232
  : {}
26233
+ }
26234
+
26235
+ const thumbTabindex = vue.computed(() => (props.dragOnlyRange !== true ? state.tabindex.value : null));
26236
+ const trackContainerTabindex = vue.computed(() => (
26237
+ $q.platform.is.mobile !== true && (props.dragRange || props.dragOnlyRange === true)
26238
+ ? state.tabindex.value
26239
+ : null
26075
26240
  ));
26241
+
26242
+ const minThumbRef = vue.ref(null);
26243
+ const minEvents = vue.computed(() => getEvents('min'));
26076
26244
  const getMinThumb = methods.getThumbRenderFn({
26077
26245
  focusValue: 'min',
26078
- nextFocus,
26079
26246
  getNodeData: () => ({
26080
26247
  ref: minThumbRef,
26248
+ key: 'tmin',
26081
26249
  ...minEvents.value,
26082
- tabindex: props.dragOnlyRange !== true ? state.tabindex.value : null
26250
+ tabindex: thumbTabindex.value
26083
26251
  }),
26084
26252
  ratio: ratioMin,
26085
26253
  label: vue.computed(() => (
@@ -26092,22 +26260,13 @@
26092
26260
  labelTextColor: vue.computed(() => props.leftLabelTextColor || props.labelTextColor)
26093
26261
  });
26094
26262
 
26095
- const maxEvents = vue.computed(() => (
26096
- state.editable.value === true && $q.platform.is.mobile !== true && props.dragOnlyRange !== true
26097
- ? {
26098
- onFocus: () => { onFocus('max'); },
26099
- onBlur: methods.onBlur,
26100
- onKeydown,
26101
- onKeyup: methods.onKeyup
26102
- }
26103
- : {}
26104
- ));
26263
+ const maxEvents = vue.computed(() => getEvents('max'));
26105
26264
  const getMaxThumb = methods.getThumbRenderFn({
26106
26265
  focusValue: 'max',
26107
- nextFocus,
26108
26266
  getNodeData: () => ({
26109
26267
  ...maxEvents.value,
26110
- tabindex: props.dragOnlyRange !== true ? state.tabindex.value : null
26268
+ key: 'tmax',
26269
+ tabindex: thumbTabindex.value
26111
26270
  }),
26112
26271
  ratio: ratioMax,
26113
26272
  label: vue.computed(() => (
@@ -26120,19 +26279,6 @@
26120
26279
  labelTextColor: vue.computed(() => props.rightLabelTextColor || props.labelTextColor)
26121
26280
  });
26122
26281
 
26123
- vue.watch(
26124
- () => props.modelValue.min + props.modelValue.max + state.innerMin.value + state.innerMax.value,
26125
- () => {
26126
- model.value.min = props.modelValue.min === null
26127
- ? state.innerMin.value
26128
- : between(props.modelValue.min, state.innerMin.value, state.innerMax.value);
26129
-
26130
- model.value.max = props.modelValue.max === null
26131
- ? state.innerMax.value
26132
- : between(props.modelValue.max, state.innerMin.value, state.innerMax.value);
26133
- }
26134
- );
26135
-
26136
26282
  function updateValue (change) {
26137
26283
  if (model.value.min !== props.modelValue.min || model.value.max !== props.modelValue.max) {
26138
26284
  emit('update:modelValue', { ...model.value });
@@ -26161,15 +26307,14 @@
26161
26307
  ratioMax: modelMaxRatio.value
26162
26308
  };
26163
26309
 
26164
- let type;
26165
26310
  const ratio = methods.getDraggingRatio(event, dragging);
26166
26311
 
26167
26312
  if (props.dragOnlyRange !== true && ratio < dragging.ratioMin + sensitivity) {
26168
- type = dragType.MIN;
26313
+ dragging.type = dragType.MIN;
26169
26314
  }
26170
26315
  else if (props.dragOnlyRange === true || ratio < dragging.ratioMax - sensitivity) {
26171
26316
  if (props.dragRange === true || props.dragOnlyRange === true) {
26172
- type = dragType.RANGE;
26317
+ dragging.type = dragType.RANGE;
26173
26318
  Object.assign(dragging, {
26174
26319
  offsetRatio: ratio,
26175
26320
  offsetModel: methods.convertRatioToModel(ratio),
@@ -26178,18 +26323,15 @@
26178
26323
  });
26179
26324
  }
26180
26325
  else {
26181
- type = dragging.ratioMax - ratio < ratio - dragging.ratioMin
26326
+ dragging.type = dragging.ratioMax - ratio < ratio - dragging.ratioMin
26182
26327
  ? dragType.MAX
26183
26328
  : dragType.MIN;
26184
26329
  }
26185
26330
  }
26186
26331
  else {
26187
- type = dragType.MAX;
26332
+ dragging.type = dragType.MAX;
26188
26333
  }
26189
26334
 
26190
- dragging.type = type;
26191
- nextFocus.value = null;
26192
-
26193
26335
  return dragging
26194
26336
  }
26195
26337
 
@@ -26207,7 +26349,7 @@
26207
26349
  min: localModel,
26208
26350
  max: dragging.valueMax
26209
26351
  };
26210
- nextFocus.value = 'min';
26352
+ state.focus.value = 'min';
26211
26353
  }
26212
26354
  else {
26213
26355
  pos = {
@@ -26216,7 +26358,7 @@
26216
26358
  min: dragging.valueMax,
26217
26359
  max: localModel
26218
26360
  };
26219
- nextFocus.value = 'max';
26361
+ state.focus.value = 'max';
26220
26362
  }
26221
26363
  break
26222
26364
 
@@ -26228,7 +26370,7 @@
26228
26370
  min: dragging.valueMin,
26229
26371
  max: localModel
26230
26372
  };
26231
- nextFocus.value = 'max';
26373
+ state.focus.value = 'max';
26232
26374
  }
26233
26375
  else {
26234
26376
  pos = {
@@ -26237,7 +26379,7 @@
26237
26379
  min: localModel,
26238
26380
  max: dragging.valueMin
26239
26381
  };
26240
- nextFocus.value = 'min';
26382
+ state.focus.value = 'min';
26241
26383
  }
26242
26384
  break
26243
26385
 
@@ -26254,34 +26396,26 @@
26254
26396
  min: parseFloat(min.toFixed(state.decimals.value)),
26255
26397
  max: parseFloat((min + dragging.rangeValue).toFixed(state.decimals.value))
26256
26398
  };
26399
+
26400
+ state.focus.value = 'both';
26257
26401
  break
26258
26402
  }
26259
26403
 
26260
- model.value = {
26261
- min: pos.min,
26262
- max: pos.max
26263
- };
26264
-
26265
26404
  // If either of the values to be emitted are null, set them to the defaults the user has entered.
26266
- if (model.value.min === null || model.value.max === null) {
26267
- model.value.min = pos.min || props.min;
26268
- model.value.max = pos.max || props.max;
26269
- }
26405
+ model.value = model.value.min === null || model.value.max === null
26406
+ ? { min: pos.min || props.min, max: pos.max || props.max }
26407
+ : { min: pos.min, max: pos.max };
26270
26408
 
26271
26409
  if (props.snap !== true || props.step === 0) {
26272
26410
  curMinRatio.value = pos.minR;
26273
26411
  curMaxRatio.value = pos.maxR;
26274
26412
  }
26275
26413
  else {
26276
- curMinRatio.value = state.trackLen.value === 0 ? 0 : (model.value.min - props.min) / state.trackLen.value;
26277
- curMaxRatio.value = state.trackLen.value === 0 ? 0 : (model.value.max - props.min) / state.trackLen.value;
26414
+ curMinRatio.value = methods.convertModelToRatio(model.value.min);
26415
+ curMaxRatio.value = methods.convertModelToRatio(model.value.max);
26278
26416
  }
26279
26417
  }
26280
26418
 
26281
- function onFocus (which) {
26282
- state.focus.value = which;
26283
- }
26284
-
26285
26419
  function onKeydown (evt) {
26286
26420
  if (!keyCodes$2.includes(evt.keyCode)) {
26287
26421
  return
@@ -26290,14 +26424,11 @@
26290
26424
  stopAndPrevent(evt);
26291
26425
 
26292
26426
  const
26293
- stepVal = ([ 34, 33 ].includes(evt.keyCode) ? 10 : 1) * props.step,
26294
- offset = [ 34, 37, 40 ].includes(evt.keyCode) ? -stepVal : stepVal;
26295
-
26296
- if (props.dragOnlyRange) {
26297
- const interval = props.dragOnlyRange
26298
- ? model.value.max - model.value.min
26299
- : 0;
26427
+ stepVal = ([ 34, 33 ].includes(evt.keyCode) ? 10 : 1) * state.step.value,
26428
+ offset = ([ 34, 37, 40 ].includes(evt.keyCode) ? -1 : 1) * (state.isReversed.value === true ? -1 : 1) * stepVal;
26300
26429
 
26430
+ if (state.focus.value === 'both') {
26431
+ const interval = model.value.max - model.value.min;
26301
26432
  const min = between(
26302
26433
  parseFloat((model.value.min + offset).toFixed(state.decimals.value)),
26303
26434
  state.innerMin.value,
@@ -26331,7 +26462,8 @@
26331
26462
  return () => {
26332
26463
  const content = methods.getContent(
26333
26464
  selectionBarStyle,
26334
- events,
26465
+ trackContainerTabindex,
26466
+ trackContainerEvents,
26335
26467
  node => {
26336
26468
  node.push(
26337
26469
  getMinThumb(),
@@ -26348,10 +26480,7 @@
26348
26480
  : ''
26349
26481
  ),
26350
26482
  ...state.attributes.value,
26351
- 'aria-valuenow': props.modelValue.min + '|' + props.modelValue.max,
26352
- tabindex: props.dragOnlyRange === true && $q.platform.is.mobile !== true
26353
- ? state.tabindex.value
26354
- : null
26483
+ 'aria-valuenow': props.modelValue.min + '|' + props.modelValue.max
26355
26484
  }, content)
26356
26485
  }
26357
26486
  }
@@ -26987,6 +27116,7 @@
26987
27116
  style: mainStyle.value
26988
27117
  }, hMergeSlot(slots.default, [
26989
27118
  vue.h(QResizeObserver, {
27119
+ debounce: 0,
26990
27120
  onResize: updateScrollSize
26991
27121
  })
26992
27122
  ])),
@@ -26997,7 +27127,10 @@
26997
27127
  })
26998
27128
  ]),
26999
27129
 
27000
- vue.h(QResizeObserver, { onResize: updateContainer }),
27130
+ vue.h(QResizeObserver, {
27131
+ debounce: 0,
27132
+ onResize: updateContainer
27133
+ }),
27001
27134
 
27002
27135
  vue.h('div', {
27003
27136
  class: scroll.vertical.barClass.value,
@@ -28252,7 +28385,10 @@
28252
28385
 
28253
28386
  targetRef.value !== null && targetRef.value.focus();
28254
28387
 
28255
- if (isDeepEqual(getOptionValue.value(innerValue.value[ 0 ]), optValue) !== true) {
28388
+ if (
28389
+ innerValue.value.length === 0
28390
+ || isDeepEqual(getOptionValue.value(innerValue.value[ 0 ]), optValue) !== true
28391
+ ) {
28256
28392
  emit('update:modelValue', props.emitValue === true ? optValue : opt);
28257
28393
  }
28258
28394
  return
@@ -36107,7 +36243,9 @@
36107
36243
  src: {
36108
36244
  type: String,
36109
36245
  required: true
36110
- }
36246
+ },
36247
+
36248
+ title: String
36111
36249
  },
36112
36250
 
36113
36251
  setup (props) {
@@ -36124,6 +36262,7 @@
36124
36262
  }, [
36125
36263
  vue.h('iframe', {
36126
36264
  src: props.src,
36265
+ title: props.title,
36127
36266
  frameborder: '0',
36128
36267
  allowfullscreen: true
36129
36268
  })
@@ -37613,14 +37752,14 @@
37613
37752
  applyState('show');
37614
37753
  }
37615
37754
 
37616
- if (dialogRef.value !== null) {
37617
- show();
37618
- }
37619
- else if (typeof DialogComponent.__asyncLoader === 'function') {
37755
+ if (typeof DialogComponent.__asyncLoader === 'function') {
37620
37756
  DialogComponent.__asyncLoader().then(() => {
37621
37757
  vue.nextTick(show);
37622
37758
  });
37623
37759
  }
37760
+ else {
37761
+ vue.nextTick(show);
37762
+ }
37624
37763
 
37625
37764
  return API
37626
37765
  }
@@ -39124,7 +39263,7 @@
39124
39263
  });
39125
39264
 
39126
39265
  var index_umd = {
39127
- version: '2.4.1',
39266
+ version: '2.4.5',
39128
39267
  install (app, opts) {
39129
39268
  installQuasar(app, {
39130
39269
  components,