quasar 2.11.3 → 2.11.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  2. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  3. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  4. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  5. package/dist/icon-set/fontawesome-v6-pro.umd.prod.js +1 -1
  6. package/dist/icon-set/fontawesome-v6.umd.prod.js +1 -1
  7. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  8. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  9. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  10. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  11. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  12. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  13. package/dist/icon-set/material-symbols-outlined.umd.prod.js +1 -1
  14. package/dist/icon-set/material-symbols-rounded.umd.prod.js +1 -1
  15. package/dist/icon-set/material-symbols-sharp.umd.prod.js +1 -1
  16. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  17. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  18. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  19. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  20. package/dist/icon-set/mdi-v7.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-fontawesome-v6.umd.prod.js +1 -1
  25. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  26. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  27. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
  28. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  29. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  30. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  31. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  32. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  33. package/dist/icon-set/svg-material-symbols-outlined.umd.prod.js +1 -1
  34. package/dist/icon-set/svg-material-symbols-rounded.umd.prod.js +1 -1
  35. package/dist/icon-set/svg-material-symbols-sharp.umd.prod.js +1 -1
  36. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  37. package/dist/icon-set/svg-mdi-v7.umd.prod.js +1 -1
  38. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  39. package/dist/icon-set/themify.umd.prod.js +1 -1
  40. package/dist/lang/ar-TN.umd.prod.js +1 -1
  41. package/dist/lang/ar.umd.prod.js +1 -1
  42. package/dist/lang/az-Latn.umd.prod.js +1 -1
  43. package/dist/lang/bg.umd.prod.js +1 -1
  44. package/dist/lang/bn.umd.prod.js +1 -1
  45. package/dist/lang/ca.umd.prod.js +1 -1
  46. package/dist/lang/cs.umd.prod.js +1 -1
  47. package/dist/lang/da.umd.prod.js +1 -1
  48. package/dist/lang/de.umd.prod.js +1 -1
  49. package/dist/lang/el.umd.prod.js +1 -1
  50. package/dist/lang/en-GB.umd.prod.js +1 -1
  51. package/dist/lang/en-US.umd.prod.js +1 -1
  52. package/dist/lang/eo.umd.prod.js +1 -1
  53. package/dist/lang/es.umd.prod.js +1 -1
  54. package/dist/lang/et.umd.prod.js +1 -1
  55. package/dist/lang/eu.umd.prod.js +1 -1
  56. package/dist/lang/fa-IR.umd.prod.js +1 -1
  57. package/dist/lang/fa.umd.prod.js +1 -1
  58. package/dist/lang/fi.umd.prod.js +1 -1
  59. package/dist/lang/fr.umd.prod.js +1 -1
  60. package/dist/lang/gn.umd.prod.js +1 -1
  61. package/dist/lang/he.umd.prod.js +1 -1
  62. package/dist/lang/hr.umd.prod.js +1 -1
  63. package/dist/lang/hu.umd.prod.js +1 -1
  64. package/dist/lang/id.umd.prod.js +1 -1
  65. package/dist/lang/is.umd.prod.js +1 -1
  66. package/dist/lang/it.umd.prod.js +1 -1
  67. package/dist/lang/ja.umd.prod.js +1 -1
  68. package/dist/lang/kk.umd.prod.js +1 -1
  69. package/dist/lang/km.umd.prod.js +1 -1
  70. package/dist/lang/ko-KR.umd.prod.js +1 -1
  71. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  72. package/dist/lang/lt.umd.prod.js +1 -1
  73. package/dist/lang/lu.umd.prod.js +1 -1
  74. package/dist/lang/lv.umd.prod.js +1 -1
  75. package/dist/lang/ml.umd.prod.js +1 -1
  76. package/dist/lang/mm.umd.prod.js +1 -1
  77. package/dist/lang/ms.umd.prod.js +1 -1
  78. package/dist/lang/my.umd.prod.js +1 -1
  79. package/dist/lang/nb-NO.umd.prod.js +1 -1
  80. package/dist/lang/nl.umd.prod.js +1 -1
  81. package/dist/lang/pl.umd.prod.js +1 -1
  82. package/dist/lang/pt-BR.umd.prod.js +1 -1
  83. package/dist/lang/pt.umd.prod.js +1 -1
  84. package/dist/lang/ro.umd.prod.js +1 -1
  85. package/dist/lang/ru.umd.prod.js +1 -1
  86. package/dist/lang/sk.umd.prod.js +1 -1
  87. package/dist/lang/sl.umd.prod.js +1 -1
  88. package/dist/lang/sm.umd.prod.js +1 -1
  89. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  90. package/dist/lang/sr.umd.prod.js +1 -1
  91. package/dist/lang/sv.umd.prod.js +1 -1
  92. package/dist/lang/ta.umd.prod.js +1 -1
  93. package/dist/lang/th.umd.prod.js +1 -1
  94. package/dist/lang/tr.umd.prod.js +1 -1
  95. package/dist/lang/ug.umd.prod.js +1 -1
  96. package/dist/lang/uk.umd.prod.js +1 -1
  97. package/dist/lang/uz-Cyrl.umd.prod.js +1 -1
  98. package/dist/lang/uz-Latn.umd.prod.js +1 -1
  99. package/dist/lang/vi.umd.prod.js +1 -1
  100. package/dist/lang/zh-CN.umd.prod.js +1 -1
  101. package/dist/lang/zh-TW.umd.prod.js +1 -1
  102. package/dist/quasar.cjs.prod.js +2 -2
  103. package/dist/quasar.css +4 -0
  104. package/dist/quasar.esm.js +375 -175
  105. package/dist/quasar.esm.prod.js +2 -2
  106. package/dist/quasar.prod.css +1 -1
  107. package/dist/quasar.rtl.css +4 -0
  108. package/dist/quasar.rtl.prod.css +1 -1
  109. package/dist/quasar.sass +3 -1
  110. package/dist/quasar.umd.js +375 -175
  111. package/dist/quasar.umd.prod.js +2 -2
  112. package/dist/web-types/web-types.json +1 -1
  113. package/package.json +1 -1
  114. package/src/components/ajax-bar/QAjaxBar.js +13 -5
  115. package/src/components/btn/QBtn.js +3 -2
  116. package/src/components/carousel/QCarousel.js +17 -10
  117. package/src/components/dialog/QDialog.js +8 -4
  118. package/src/components/drawer/QDrawer.js +8 -3
  119. package/src/components/img/QImg.js +25 -11
  120. package/src/components/input/QInput.js +14 -4
  121. package/src/components/layout/QLayout.js +5 -5
  122. package/src/components/menu/QMenu.js +1 -1
  123. package/src/components/pull-to-refresh/QPullToRefresh.js +5 -4
  124. package/src/components/resize-observer/QResizeObserver.js +9 -4
  125. package/src/components/scroll-area/QScrollArea.js +8 -8
  126. package/src/components/select/QSelect.js +19 -8
  127. package/src/components/slide-item/QSlideItem.js +4 -2
  128. package/src/components/slide-transition/QSlideTransition.js +17 -3
  129. package/src/components/tabs/QTabs.js +12 -5
  130. package/src/components/tooltip/QTooltip.js +1 -1
  131. package/src/composables/private/use-anchor.js +8 -3
  132. package/src/composables/private/use-field.js +10 -4
  133. package/src/composables/private/use-portal.js +3 -3
  134. package/src/composables/private/use-timeout.js +6 -3
  135. package/src/css/core/visibility.sass +2 -0
  136. package/src/directives/TouchHold.js +9 -4
  137. package/src/directives/TouchRepeat.js +10 -3
  138. package/src/plugins/Loading.js +5 -5
  139. package/src/plugins/Meta.js +4 -2
  140. package/src/plugins/Notify.js +13 -3
  141. package/src/utils/debounce.js +9 -6
  142. package/src/utils/morph.js +7 -6
  143. package/src/utils/prevent-scroll.js +5 -6
  144. package/src/utils/private/click-outside.js +10 -3
  145. package/src/utils/private/global-dialog.js +1 -1
  146. package/src/utils/private/global-nodes.js +44 -13
  147. package/src/utils/private/position-engine.js +67 -25
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Quasar Framework v2.11.3
2
+ * Quasar Framework v2.11.4
3
3
  * (c) 2015-present Razvan Stoenescu
4
4
  * Released under the MIT License.
5
5
  */
@@ -557,27 +557,30 @@
557
557
  };
558
558
 
559
559
  function debounce (fn, wait = 250, immediate) {
560
- let timeout;
560
+ let timer = null;
561
561
 
562
562
  function debounced (/* ...args */) {
563
563
  const args = arguments;
564
564
 
565
565
  const later = () => {
566
- timeout = void 0;
566
+ timer = null;
567
567
  if (immediate !== true) {
568
568
  fn.apply(this, args);
569
569
  }
570
570
  };
571
571
 
572
- clearTimeout(timeout);
573
- if (immediate === true && timeout === void 0) {
572
+ if (timer !== null) {
573
+ clearTimeout(timer);
574
+ }
575
+ else if (immediate === true) {
574
576
  fn.apply(this, args);
575
577
  }
576
- timeout = setTimeout(later, wait);
578
+
579
+ timer = setTimeout(later, wait);
577
580
  }
578
581
 
579
582
  debounced.cancel = () => {
580
- clearTimeout(timeout);
583
+ timer !== null && clearTimeout(timer);
581
584
  };
582
585
 
583
586
  return debounced
@@ -1645,7 +1648,7 @@
1645
1648
  }
1646
1649
 
1647
1650
  var installQuasar = function (parentApp, opts = {}) {
1648
- const $q = { version: '2.11.3' };
1651
+ const $q = { version: '2.11.4' };
1649
1652
 
1650
1653
  if (globalConfigIsFrozen === false) {
1651
1654
  if (opts.config !== void 0) {
@@ -1844,7 +1847,7 @@
1844
1847
  const onScreen = vue.ref(false);
1845
1848
  const animate = vue.ref(true);
1846
1849
 
1847
- let sessions = 0, timer, speed;
1850
+ let sessions = 0, timer = null, speed;
1848
1851
 
1849
1852
  const classes = vue.computed(() =>
1850
1853
  `q-loading-bar q-loading-bar--${ props.position }`
@@ -1896,19 +1899,21 @@
1896
1899
  if (oldSpeed === 0 && newSpeed > 0) {
1897
1900
  planNextStep();
1898
1901
  }
1899
- else if (oldSpeed > 0 && newSpeed <= 0) {
1902
+ else if (timer !== null && oldSpeed > 0 && newSpeed <= 0) {
1900
1903
  clearTimeout(timer);
1904
+ timer = null;
1901
1905
  }
1902
1906
 
1903
1907
  return sessions
1904
1908
  }
1905
1909
 
1906
- clearTimeout(timer);
1910
+ timer !== null && clearTimeout(timer);
1907
1911
  emit('start');
1908
1912
 
1909
1913
  progress.value = 0;
1910
1914
 
1911
1915
  timer = setTimeout(() => {
1916
+ timer = null;
1912
1917
  animate.value = true;
1913
1918
  newSpeed > 0 && planNextStep();
1914
1919
  }, onScreen.value === true ? 500 : 1);
@@ -1935,13 +1940,18 @@
1935
1940
  return sessions
1936
1941
  }
1937
1942
 
1938
- clearTimeout(timer);
1943
+ if (timer !== null) {
1944
+ clearTimeout(timer);
1945
+ timer = null;
1946
+ }
1947
+
1939
1948
  emit('stop');
1940
1949
 
1941
1950
  const end = () => {
1942
1951
  animate.value = true;
1943
1952
  progress.value = 100;
1944
1953
  timer = setTimeout(() => {
1954
+ timer = null;
1945
1955
  onScreen.value = false;
1946
1956
  }, 1000);
1947
1957
  };
@@ -1959,6 +1969,7 @@
1959
1969
  function planNextStep () {
1960
1970
  if (progress.value < 100) {
1961
1971
  timer = setTimeout(() => {
1972
+ timer = null;
1962
1973
  increment();
1963
1974
  planNextStep();
1964
1975
  }, speed);
@@ -1979,7 +1990,7 @@
1979
1990
  });
1980
1991
 
1981
1992
  vue.onBeforeUnmount(() => {
1982
- clearTimeout(timer);
1993
+ timer !== null && clearTimeout(timer);
1983
1994
  hijacked === true && restoreAjax(start);
1984
1995
  });
1985
1996
 
@@ -3583,7 +3594,7 @@
3583
3594
  const rootRef = vue.ref(null);
3584
3595
  const blurTargetRef = vue.ref(null);
3585
3596
 
3586
- let localTouchTargetEl = null, avoidMouseRipple, mouseTimer;
3597
+ let localTouchTargetEl = null, avoidMouseRipple, mouseTimer = null;
3587
3598
 
3588
3599
  const hasLabel = vue.computed(() =>
3589
3600
  props.label !== void 0 && props.label !== null && props.label !== ''
@@ -3729,8 +3740,9 @@
3729
3740
  // avoid duplicated mousedown event
3730
3741
  // triggering another early ripple
3731
3742
  avoidMouseRipple = true;
3732
- clearTimeout(mouseTimer);
3743
+ mouseTimer !== null && clearTimeout(mouseTimer);
3733
3744
  mouseTimer = setTimeout(() => {
3745
+ mouseTimer = null;
3734
3746
  avoidMouseRipple = false;
3735
3747
  }, 200);
3736
3748
  }
@@ -3976,7 +3988,7 @@
3976
3988
 
3977
3989
  const anchorEl = vue.ref(null);
3978
3990
 
3979
- let touchTimer;
3991
+ let touchTimer = null;
3980
3992
 
3981
3993
  function canShow (evt) {
3982
3994
  // abort with no parent configured or on multi-touch
@@ -4035,6 +4047,7 @@
4035
4047
  ]);
4036
4048
 
4037
4049
  touchTimer = setTimeout(() => {
4050
+ touchTimer = null;
4038
4051
  proxy.show(evt);
4039
4052
  evt.qAnchorHandled = true;
4040
4053
  }, 300);
@@ -4042,7 +4055,11 @@
4042
4055
 
4043
4056
  mobileCleanup (evt) {
4044
4057
  anchorEl.value.classList.remove('non-selectable');
4045
- clearTimeout(touchTimer);
4058
+
4059
+ if (touchTimer !== null) {
4060
+ clearTimeout(touchTimer);
4061
+ touchTimer = null;
4062
+ }
4046
4063
 
4047
4064
  if (showing.value === true && evt !== void 0) {
4048
4065
  clearSelection();
@@ -4156,7 +4173,7 @@
4156
4173
  });
4157
4174
 
4158
4175
  vue.onBeforeUnmount(() => {
4159
- clearTimeout(touchTimer);
4176
+ touchTimer !== null && clearTimeout(touchTimer);
4160
4177
  unconfigureAnchorEl();
4161
4178
  });
4162
4179
 
@@ -4397,15 +4414,18 @@
4397
4414
  queue = queue.filter(entry => entry !== fn);
4398
4415
  }
4399
4416
 
4400
- const globalNodes = [];
4417
+ const nodesList = [];
4418
+ const portalTypeList = [];
4419
+
4420
+ let portalIndex = 1;
4401
4421
  let target = document.body;
4402
4422
 
4403
- function createGlobalNode (id) {
4423
+ function createGlobalNode (id, portalType) {
4404
4424
  const el = document.createElement('div');
4405
4425
 
4406
- if (id !== void 0) {
4407
- el.id = id;
4408
- }
4426
+ el.id = portalType !== void 0
4427
+ ? `q-portal--${ portalType }--${ portalIndex++ }`
4428
+ : id;
4409
4429
 
4410
4430
  if (globalConfig.globalNodes !== void 0) {
4411
4431
  const cls = globalConfig.globalNodes.class;
@@ -4415,25 +4435,53 @@
4415
4435
  }
4416
4436
 
4417
4437
  target.appendChild(el);
4418
- globalNodes.push(el);
4438
+ nodesList.push(el);
4439
+ portalTypeList.push(portalType);
4419
4440
 
4420
4441
  return el
4421
4442
  }
4422
4443
 
4423
4444
  function removeGlobalNode (el) {
4424
- globalNodes.splice(globalNodes.indexOf(el), 1);
4445
+ const nodeIndex = nodesList.indexOf(el);
4446
+
4447
+ nodesList.splice(nodeIndex, 1);
4448
+ portalTypeList.splice(nodeIndex, 1);
4449
+
4425
4450
  el.remove();
4426
4451
  }
4427
4452
 
4428
- function changeGlobalNodesTarget (el) {
4429
- if (el !== target) {
4430
- target = el;
4453
+ function changeGlobalNodesTarget (newTarget) {
4454
+ if (newTarget === target) {
4455
+ return
4456
+ }
4431
4457
 
4432
- globalNodes.forEach(el => {
4433
- if (el.contains(target) === false) {
4434
- target.appendChild(el);
4458
+ target = newTarget;
4459
+
4460
+ if (
4461
+ target === document.body
4462
+ // or we have less than 2 dialogs:
4463
+ || portalTypeList.reduce((acc, type) => (type === 'dialog' ? acc + 1 : acc), 0) < 2
4464
+ ) {
4465
+ nodesList.forEach(node => {
4466
+ if (node.contains(target) === false) {
4467
+ target.appendChild(node);
4435
4468
  }
4436
4469
  });
4470
+
4471
+ return
4472
+ }
4473
+
4474
+ const lastDialogIndex = portalTypeList.lastIndexOf('dialog');
4475
+
4476
+ for (let i = 0; i < nodesList.length; i++) {
4477
+ const el = nodesList[ i ];
4478
+
4479
+ if (
4480
+ (i === lastDialogIndex || portalTypeList[ i ] !== 'dialog')
4481
+ && el.contains(target) === false
4482
+ ) {
4483
+ target.appendChild(el);
4484
+ }
4437
4485
  }
4438
4486
  }
4439
4487
 
@@ -4512,7 +4560,7 @@
4512
4560
  // Warning!
4513
4561
  // You MUST specify "inheritAttrs: false" in your component
4514
4562
 
4515
- function usePortal (vm, innerRef, renderPortalContent, checkGlobalDialog) {
4563
+ function usePortal (vm, innerRef, renderPortalContent, type) {
4516
4564
  // showing, including while in show/hide transition
4517
4565
  const portalIsActive = vue.ref(false);
4518
4566
 
@@ -4521,7 +4569,7 @@
4521
4569
 
4522
4570
  let portalEl = null;
4523
4571
  const focusObj = {};
4524
- const onGlobalDialog = checkGlobalDialog === true && isOnGlobalDialog(vm);
4572
+ const onGlobalDialog = type === 'dialog' && isOnGlobalDialog(vm);
4525
4573
 
4526
4574
  function showPortal (isReady) {
4527
4575
  if (isReady === true) {
@@ -4534,7 +4582,7 @@
4534
4582
 
4535
4583
  if (portalIsActive.value === false) {
4536
4584
  if (onGlobalDialog === false && portalEl === null) {
4537
- portalEl = createGlobalNode();
4585
+ portalEl = createGlobalNode(false, type);
4538
4586
  }
4539
4587
 
4540
4588
  portalIsActive.value = true;
@@ -4675,11 +4723,14 @@
4675
4723
  */
4676
4724
 
4677
4725
  function useTimeout () {
4678
- let timer;
4726
+ let timer = null;
4679
4727
  const vm = vue.getCurrentInstance();
4680
4728
 
4681
4729
  function removeTimeout () {
4682
- clearTimeout(timer);
4730
+ if (timer !== null) {
4731
+ clearTimeout(timer);
4732
+ timer = null;
4733
+ }
4683
4734
  }
4684
4735
 
4685
4736
  vue.onDeactivated(removeTimeout);
@@ -4689,7 +4740,7 @@
4689
4740
  removeTimeout,
4690
4741
 
4691
4742
  registerTimeout (fn, delay) {
4692
- clearTimeout(timer);
4743
+ removeTimeout();
4693
4744
 
4694
4745
  if (vmIsDestroyed(vm) === false) {
4695
4746
  timer = setTimeout(fn, delay);
@@ -4971,14 +5022,11 @@
4971
5022
  }
4972
5023
  }
4973
5024
 
4974
- let timer;
4975
-
4976
5025
  const
4977
5026
  { notPassiveCapture } = listenOpts,
4978
5027
  registeredList = [];
4979
5028
 
4980
5029
  function globalHandler (evt) {
4981
- clearTimeout(timer);
4982
5030
 
4983
5031
  const target = evt.target;
4984
5032
 
@@ -5051,7 +5099,7 @@
5051
5099
  registeredList.splice(index, 1);
5052
5100
 
5053
5101
  if (registeredList.length === 0) {
5054
- clearTimeout(timer);
5102
+
5055
5103
  document.removeEventListener('mousedown', globalHandler, notPassiveCapture);
5056
5104
  document.removeEventListener('touchstart', globalHandler, notPassiveCapture);
5057
5105
  }
@@ -5119,17 +5167,32 @@
5119
5167
  }
5120
5168
 
5121
5169
  return {
5122
- top,
5123
- left,
5124
- right,
5125
- bottom,
5126
- width,
5127
- height,
5170
+ top, bottom, height,
5171
+ left, right, width,
5128
5172
  middle: left + (right - left) / 2,
5129
5173
  center: top + (bottom - top) / 2
5130
5174
  }
5131
5175
  }
5132
5176
 
5177
+ function getAbsoluteAnchorProps (el, absoluteOffset, offset) {
5178
+ let { top, left } = el.getBoundingClientRect();
5179
+
5180
+ top += absoluteOffset.top;
5181
+ left += absoluteOffset.left;
5182
+
5183
+ if (offset !== void 0) {
5184
+ top += offset[ 1 ];
5185
+ left += offset[ 0 ];
5186
+ }
5187
+
5188
+ return {
5189
+ top, bottom: top + 1, height: 1,
5190
+ left, right: left + 1, width: 1,
5191
+ middle: left,
5192
+ center: top
5193
+ }
5194
+ }
5195
+
5133
5196
  function getTargetProps (el) {
5134
5197
  return {
5135
5198
  top: 0,
@@ -5141,6 +5204,13 @@
5141
5204
  }
5142
5205
  }
5143
5206
 
5207
+ function getTopLeftProps (anchorProps, targetProps, cfg) {
5208
+ return {
5209
+ top: anchorProps[ cfg.anchorOrigin.vertical ] - targetProps[ cfg.selfOrigin.vertical ],
5210
+ left: anchorProps[ cfg.anchorOrigin.horizontal ] - targetProps[ cfg.selfOrigin.horizontal ]
5211
+ }
5212
+ }
5213
+
5144
5214
  // cfg: { el, anchorEl, anchorOrigin, selfOrigin, offset, absoluteOffset, cover, fit, maxHeight, maxWidth }
5145
5215
  function setPosition (cfg) {
5146
5216
  if (client.is.ios === true && window.visualViewport !== void 0) {
@@ -5159,25 +5229,15 @@
5159
5229
  }
5160
5230
  }
5161
5231
 
5162
- let anchorProps;
5163
-
5164
5232
  // scroll position might change
5165
5233
  // if max-height/-width changes, so we
5166
5234
  // need to restore it after we calculate
5167
5235
  // the new positioning
5168
5236
  const { scrollLeft, scrollTop } = cfg.el;
5169
5237
 
5170
- if (cfg.absoluteOffset === void 0) {
5171
- anchorProps = getAnchorProps(cfg.anchorEl, cfg.cover === true ? [ 0, 0 ] : cfg.offset);
5172
- }
5173
- else {
5174
- const
5175
- { top: anchorTop, left: anchorLeft } = cfg.anchorEl.getBoundingClientRect(),
5176
- top = anchorTop + cfg.absoluteOffset.top,
5177
- left = anchorLeft + cfg.absoluteOffset.left;
5178
-
5179
- anchorProps = { top, left, width: 1, height: 1, right: left + 1, center: top, middle: left, bottom: top + 1 };
5180
- }
5238
+ const anchorProps = cfg.absoluteOffset === void 0
5239
+ ? getAnchorProps(cfg.anchorEl, cfg.cover === true ? [ 0, 0 ] : cfg.offset)
5240
+ : getAbsoluteAnchorProps(cfg.anchorEl, cfg.absoluteOffset, cfg.offset);
5181
5241
 
5182
5242
  let elStyle = {
5183
5243
  maxHeight: cfg.maxHeight,
@@ -5194,14 +5254,44 @@
5194
5254
 
5195
5255
  Object.assign(cfg.el.style, elStyle);
5196
5256
 
5197
- const
5198
- targetProps = getTargetProps(cfg.el),
5199
- props = {
5200
- top: anchorProps[ cfg.anchorOrigin.vertical ] - targetProps[ cfg.selfOrigin.vertical ],
5201
- left: anchorProps[ cfg.anchorOrigin.horizontal ] - targetProps[ cfg.selfOrigin.horizontal ]
5202
- };
5257
+ const targetProps = getTargetProps(cfg.el);
5258
+ let props = getTopLeftProps(anchorProps, targetProps, cfg);
5203
5259
 
5204
- applyBoundaries(props, anchorProps, targetProps, cfg.anchorOrigin, cfg.selfOrigin);
5260
+ if (cfg.absoluteOffset === void 0 || cfg.offset === void 0) {
5261
+ applyBoundaries(props, anchorProps, targetProps, cfg.anchorOrigin, cfg.selfOrigin);
5262
+ }
5263
+ else { // we have touch position or context menu with offset
5264
+ const { top, left } = props; // cache initial values
5265
+
5266
+ // apply initial boundaries
5267
+ applyBoundaries(props, anchorProps, targetProps, cfg.anchorOrigin, cfg.selfOrigin);
5268
+
5269
+ let hasChanged = false;
5270
+
5271
+ // did it flip vertically?
5272
+ if (props.top !== top) {
5273
+ hasChanged = true;
5274
+ const offsetY = 2 * cfg.offset[ 1 ];
5275
+ anchorProps.center = anchorProps.top -= offsetY;
5276
+ anchorProps.bottom -= offsetY + 2;
5277
+ }
5278
+
5279
+ // did it flip horizontally?
5280
+ if (props.left !== left) {
5281
+ hasChanged = true;
5282
+ const offsetX = 2 * cfg.offset[ 0 ];
5283
+ anchorProps.middle = anchorProps.left -= offsetX;
5284
+ anchorProps.right -= offsetX + 2;
5285
+ }
5286
+
5287
+ if (hasChanged === true) {
5288
+ // re-calculate props with the new anchor
5289
+ props = getTopLeftProps(anchorProps, targetProps, cfg);
5290
+
5291
+ // and re-apply boundaries
5292
+ applyBoundaries(props, anchorProps, targetProps, cfg.anchorOrigin, cfg.selfOrigin);
5293
+ }
5294
+ }
5205
5295
 
5206
5296
  elStyle = {
5207
5297
  top: props.top + 'px',
@@ -5382,7 +5472,7 @@
5382
5472
  processOnMount: true
5383
5473
  });
5384
5474
 
5385
- const { showPortal, hidePortal, renderPortal } = usePortal(vm, innerRef, renderPortalContent);
5475
+ const { showPortal, hidePortal, renderPortal } = usePortal(vm, innerRef, renderPortalContent, 'menu');
5386
5476
 
5387
5477
  const clickOutsideProps = {
5388
5478
  anchorEl,
@@ -6999,7 +7089,7 @@
6999
7089
 
7000
7090
  const isDark = useDark(props, $q);
7001
7091
 
7002
- let timer, panelsLen;
7092
+ let timer = null, panelsLen;
7003
7093
 
7004
7094
  const {
7005
7095
  updatePanelsList, getPanelContent,
@@ -7053,7 +7143,6 @@
7053
7143
 
7054
7144
  vue.watch(() => props.modelValue, () => {
7055
7145
  if (props.autoplay) {
7056
- clearInterval(timer);
7057
7146
  startTimer();
7058
7147
  }
7059
7148
  });
@@ -7062,20 +7151,28 @@
7062
7151
  if (val) {
7063
7152
  startTimer();
7064
7153
  }
7065
- else {
7066
- clearInterval(timer);
7154
+ else if (timer !== null) {
7155
+ clearTimeout(timer);
7156
+ timer = null;
7067
7157
  }
7068
7158
  });
7069
7159
 
7070
7160
  function startTimer () {
7071
7161
  const duration = isNumber(props.autoplay) === true
7072
- ? props.autoplay
7162
+ ? Math.abs(props.autoplay)
7073
7163
  : 5000;
7074
7164
 
7075
- timer = setTimeout(
7076
- duration >= 0 ? nextPanel : previousPanel,
7077
- Math.abs(duration)
7078
- );
7165
+ timer !== null && clearTimeout(timer);
7166
+ timer = setTimeout(() => {
7167
+ timer = null;
7168
+
7169
+ if (duration >= 0) {
7170
+ nextPanel();
7171
+ }
7172
+ else {
7173
+ previousPanel();
7174
+ }
7175
+ }, duration);
7079
7176
  }
7080
7177
 
7081
7178
  vue.onMounted(() => {
@@ -7083,7 +7180,7 @@
7083
7180
  });
7084
7181
 
7085
7182
  vue.onBeforeUnmount(() => {
7086
- clearInterval(timer);
7183
+ timer !== null && clearTimeout(timer);
7087
7184
  });
7088
7185
 
7089
7186
  function getNavigationContainer (type, mapping) {
@@ -9401,8 +9498,10 @@
9401
9498
  }
9402
9499
 
9403
9500
  function emitEvent () {
9404
- clearTimeout(timer);
9405
- timer = null;
9501
+ if (timer !== null) {
9502
+ clearTimeout(timer);
9503
+ timer = null;
9504
+ }
9406
9505
 
9407
9506
  if (targetEl) {
9408
9507
  const { offsetWidth: width, offsetHeight: height } = targetEl;
@@ -9436,7 +9535,7 @@
9436
9535
  vue.onMounted(() => { init(); });
9437
9536
 
9438
9537
  vue.onBeforeUnmount(() => {
9439
- clearTimeout(timer);
9538
+ timer !== null && clearTimeout(timer);
9440
9539
 
9441
9540
  if (observer !== void 0) {
9442
9541
  if (observer.disconnect !== void 0) {
@@ -9456,7 +9555,10 @@
9456
9555
  let curDocView;
9457
9556
 
9458
9557
  function cleanup () {
9459
- clearTimeout(timer);
9558
+ if (timer !== null) {
9559
+ clearTimeout(timer);
9560
+ timer = null;
9561
+ }
9460
9562
 
9461
9563
  if (curDocView !== void 0) {
9462
9564
  // iOS is fuzzy, need to check it first
@@ -9609,7 +9711,7 @@
9609
9711
  const tabDataListLen = vue.ref(0);
9610
9712
  const hasFocus = vue.ref(false);
9611
9713
 
9612
- let animateTimer, scrollTimer, unwatchRoute;
9714
+ let animateTimer = null, scrollTimer = null, unwatchRoute;
9613
9715
 
9614
9716
  const tabProps = vue.computed(() => ({
9615
9717
  activeClass: props.activeClass,
@@ -9745,7 +9847,10 @@
9745
9847
  oldEl = oldTab.tabIndicatorRef.value,
9746
9848
  newEl = newTab.tabIndicatorRef.value;
9747
9849
 
9748
- clearTimeout(animateTimer);
9850
+ if (animateTimer !== null) {
9851
+ clearTimeout(animateTimer);
9852
+ animateTimer = null;
9853
+ }
9749
9854
 
9750
9855
  oldEl.style.transition = 'none';
9751
9856
  oldEl.style.transform = 'none';
@@ -9763,6 +9868,7 @@
9763
9868
  // allow scope updates to kick in (QRouteTab needs more time)
9764
9869
  registerAnimateTick(() => {
9765
9870
  animateTimer = setTimeout(() => {
9871
+ animateTimer = null;
9766
9872
  newEl.style.transition = 'transform .25s cubic-bezier(.4, 0, .2, 1)';
9767
9873
  newEl.style.transform = 'none';
9768
9874
  }, 70);
@@ -9815,7 +9921,7 @@
9815
9921
  }
9816
9922
 
9817
9923
  function animScrollTo (value) {
9818
- stopAnimScroll();
9924
+ scrollTimer !== null && clearInterval(scrollTimer);
9819
9925
  scrollTimer = setInterval(() => {
9820
9926
  if (scrollTowards(value) === true) {
9821
9927
  stopAnimScroll();
@@ -9832,7 +9938,10 @@
9832
9938
  }
9833
9939
 
9834
9940
  function stopAnimScroll () {
9835
- clearInterval(scrollTimer);
9941
+ if (scrollTimer !== null) {
9942
+ clearInterval(scrollTimer);
9943
+ scrollTimer = null;
9944
+ }
9836
9945
  }
9837
9946
 
9838
9947
  function onKbdNavigate (keyCode, fromEl) {
@@ -10136,7 +10245,7 @@
10136
10245
  vue.provide(tabsKey, $tabs);
10137
10246
 
10138
10247
  function cleanup () {
10139
- clearTimeout(animateTimer);
10248
+ animateTimer !== null && clearTimeout(animateTimer);
10140
10249
  stopAnimScroll();
10141
10250
  unwatchRoute !== void 0 && unwatchRoute();
10142
10251
  }
@@ -14528,7 +14637,7 @@
14528
14637
  vpPendingUpdate = false,
14529
14638
  bodyLeft,
14530
14639
  bodyTop,
14531
- closeTimer;
14640
+ closeTimer = null;
14532
14641
 
14533
14642
  function onWheel (e) {
14534
14643
  if (shouldPreventScroll(e)) {
@@ -14675,9 +14784,9 @@
14675
14784
  if (state === true) {
14676
14785
  registered++;
14677
14786
 
14678
- if (closeTimer !== void 0) {
14787
+ if (closeTimer !== null) {
14679
14788
  clearTimeout(closeTimer);
14680
- closeTimer = void 0;
14789
+ closeTimer = null;
14681
14790
  return
14682
14791
  }
14683
14792
 
@@ -14699,11 +14808,10 @@
14699
14808
  action = 'remove';
14700
14809
 
14701
14810
  if (client.is.ios === true && client.is.nativeMobile === true) {
14702
- clearTimeout(closeTimer);
14703
-
14811
+ closeTimer !== null && clearTimeout(closeTimer);
14704
14812
  closeTimer = setTimeout(() => {
14705
14813
  apply$1(action);
14706
- closeTimer = void 0;
14814
+ closeTimer = null;
14707
14815
  }, 100);
14708
14816
  return
14709
14817
  }
@@ -14797,7 +14905,7 @@
14797
14905
  const showing = vue.ref(false);
14798
14906
  const animating = vue.ref(false);
14799
14907
 
14800
- let shakeTimeout, refocusTarget = null, isMaximized, avoidAutoClose;
14908
+ let shakeTimeout = null, refocusTarget = null, isMaximized, avoidAutoClose;
14801
14909
 
14802
14910
  const hideOnRouteChange = vue.computed(() =>
14803
14911
  props.persistent !== true
@@ -14816,7 +14924,7 @@
14816
14924
  );
14817
14925
 
14818
14926
  const { showPortal, hidePortal, portalIsAccessible, renderPortal } = usePortal(
14819
- vm, innerRef, renderPortalContent, /* pls do check if on a global dialog */ true
14927
+ vm, innerRef, renderPortalContent, 'dialog'
14820
14928
  );
14821
14929
 
14822
14930
  const { hide } = useModelToggle({
@@ -14979,8 +15087,9 @@
14979
15087
  if (node !== null) {
14980
15088
  node.classList.remove('q-animate--scale');
14981
15089
  node.classList.add('q-animate--scale');
14982
- clearTimeout(shakeTimeout);
15090
+ shakeTimeout !== null && clearTimeout(shakeTimeout);
14983
15091
  shakeTimeout = setTimeout(() => {
15092
+ shakeTimeout = null;
14984
15093
  if (innerRef.value !== null) {
14985
15094
  node.classList.remove('q-animate--scale');
14986
15095
  // some platforms (like desktop Chrome)
@@ -15004,7 +15113,10 @@
15004
15113
  }
15005
15114
 
15006
15115
  function cleanup (hiding) {
15007
- clearTimeout(shakeTimeout);
15116
+ if (shakeTimeout !== null) {
15117
+ clearTimeout(shakeTimeout);
15118
+ shakeTimeout = null;
15119
+ }
15008
15120
 
15009
15121
  if (hiding === true || showing.value === true) {
15010
15122
  updateMaximized(false);
@@ -15195,7 +15307,7 @@
15195
15307
  return emptyRenderFn
15196
15308
  }
15197
15309
 
15198
- let lastDesktopState, timerMini, layoutTotalWidthWatcher;
15310
+ let lastDesktopState, timerMini = null, layoutTotalWidthWatcher;
15199
15311
 
15200
15312
  const belowBreakpoint = vue.ref(
15201
15313
  props.behavior === 'mobile'
@@ -15570,7 +15682,7 @@
15570
15682
  }
15571
15683
 
15572
15684
  function animateMini () {
15573
- clearTimeout(timerMini);
15685
+ timerMini !== null && clearTimeout(timerMini);
15574
15686
 
15575
15687
  if (vm.proxy && vm.proxy.$el) {
15576
15688
  // need to speed it up and apply it immediately,
@@ -15580,6 +15692,7 @@
15580
15692
 
15581
15693
  flagMiniAnimate.value = true;
15582
15694
  timerMini = setTimeout(() => {
15695
+ timerMini = null;
15583
15696
  flagMiniAnimate.value = false;
15584
15697
  if (vm && vm.proxy && vm.proxy.$el) {
15585
15698
  vm.proxy.$el.classList.remove('q-drawer--mini-animate');
@@ -15732,7 +15845,11 @@
15732
15845
 
15733
15846
  vue.onBeforeUnmount(() => {
15734
15847
  layoutTotalWidthWatcher !== void 0 && layoutTotalWidthWatcher();
15735
- clearTimeout(timerMini);
15848
+
15849
+ if (timerMini !== null) {
15850
+ clearTimeout(timerMini);
15851
+ timerMini = null;
15852
+ }
15736
15853
 
15737
15854
  showing.value === true && cleanup();
15738
15855
 
@@ -16267,7 +16384,7 @@
16267
16384
 
16268
16385
  Object.assign(anchorEvents, { delayShow, delayHide });
16269
16386
 
16270
- const { showPortal, hidePortal, renderPortal } = usePortal(vm, innerRef, renderPortalContent);
16387
+ const { showPortal, hidePortal, renderPortal } = usePortal(vm, innerRef, renderPortalContent, 'tooltip');
16271
16388
 
16272
16389
  // if we're on mobile, let's improve the experience
16273
16390
  // by closing it when user taps outside of it
@@ -17602,15 +17719,23 @@
17602
17719
 
17603
17720
  setup (props, { slots, emit }) {
17604
17721
  let animating = false, doneFn, element;
17605
- let timer, timerFallback, animListener, lastEvent;
17722
+ let timer = null, timerFallback = null, animListener, lastEvent;
17606
17723
 
17607
17724
  function cleanup () {
17608
17725
  doneFn && doneFn();
17609
17726
  doneFn = null;
17610
17727
  animating = false;
17611
17728
 
17612
- clearTimeout(timer);
17613
- clearTimeout(timerFallback);
17729
+ if (timer !== null) {
17730
+ clearTimeout(timer);
17731
+ timer = null;
17732
+ }
17733
+
17734
+ if (timerFallback !== null) {
17735
+ clearTimeout(timerFallback);
17736
+ timerFallback = null;
17737
+ }
17738
+
17614
17739
  element !== void 0 && element.removeEventListener('transitionend', animListener);
17615
17740
  animListener = null;
17616
17741
  }
@@ -17649,8 +17774,11 @@
17649
17774
  begin(el, pos, done);
17650
17775
 
17651
17776
  timer = setTimeout(() => {
17777
+ timer = null;
17652
17778
  el.style.height = `${ el.scrollHeight }px`;
17653
17779
  animListener = evt => {
17780
+ timerFallback = null;
17781
+
17654
17782
  if (Object(evt) !== evt || evt.target === el) {
17655
17783
  end(el, 'show');
17656
17784
  }
@@ -17675,8 +17803,11 @@
17675
17803
  begin(el, pos, done);
17676
17804
 
17677
17805
  timer = setTimeout(() => {
17806
+ timer = null;
17678
17807
  el.style.height = 0;
17679
17808
  animListener = evt => {
17809
+ timerFallback = null;
17810
+
17680
17811
  if (Object(evt) !== evt || evt.target === el) {
17681
17812
  end(el, 'hide');
17682
17813
  }
@@ -18812,7 +18943,7 @@
18812
18943
  const { props, emit, slots, attrs, proxy } = vue.getCurrentInstance();
18813
18944
  const { $q } = proxy;
18814
18945
 
18815
- let focusoutTimer;
18946
+ let focusoutTimer = null;
18816
18947
 
18817
18948
  if (state.hasValue === void 0) {
18818
18949
  state.hasValue = vue.computed(() => fieldValueIsFilled(props.modelValue));
@@ -18978,7 +19109,11 @@
18978
19109
  }
18979
19110
 
18980
19111
  function onControlFocusin (e) {
18981
- clearTimeout(focusoutTimer);
19112
+ if (focusoutTimer !== null) {
19113
+ clearTimeout(focusoutTimer);
19114
+ focusoutTimer = null;
19115
+ }
19116
+
18982
19117
  if (state.editable.value === true && state.focused.value === false) {
18983
19118
  state.focused.value = true;
18984
19119
  emit('focus', e);
@@ -18986,8 +19121,10 @@
18986
19121
  }
18987
19122
 
18988
19123
  function onControlFocusout (e, then) {
18989
- clearTimeout(focusoutTimer);
19124
+ focusoutTimer !== null && clearTimeout(focusoutTimer);
18990
19125
  focusoutTimer = setTimeout(() => {
19126
+ focusoutTimer = null;
19127
+
18991
19128
  if (
18992
19129
  document.hasFocus() === true && (
18993
19130
  state.hasPopupOpen === true
@@ -19237,7 +19374,7 @@
19237
19374
  });
19238
19375
 
19239
19376
  vue.onBeforeUnmount(() => {
19240
- clearTimeout(focusoutTimer);
19377
+ focusoutTimer !== null && clearTimeout(focusoutTimer);
19241
19378
  });
19242
19379
 
19243
19380
  // expose public methods
@@ -20540,7 +20677,7 @@
20540
20677
  const naturalRatio = vue.ref(props.initialRatio);
20541
20678
  const ratioStyle = useRatio(props, naturalRatio);
20542
20679
 
20543
- let loadTimer;
20680
+ let loadTimer = null, isDestroyed = false;
20544
20681
 
20545
20682
  const images = [
20546
20683
  vue.ref(null),
@@ -20591,7 +20728,11 @@
20591
20728
  }
20592
20729
 
20593
20730
  function addImage (imgProps) {
20594
- clearTimeout(loadTimer);
20731
+ if (loadTimer !== null) {
20732
+ clearTimeout(loadTimer);
20733
+ loadTimer = null;
20734
+ }
20735
+
20595
20736
  hasError.value = false;
20596
20737
 
20597
20738
  if (imgProps === null) {
@@ -20606,10 +20747,12 @@
20606
20747
  }
20607
20748
 
20608
20749
  function onLoad ({ target }) {
20609
- // if component has been already destroyed
20610
- if (loadTimer === null) { return }
20750
+ if (isDestroyed === true) { return }
20611
20751
 
20612
- clearTimeout(loadTimer);
20752
+ if (loadTimer !== null) {
20753
+ clearTimeout(loadTimer);
20754
+ loadTimer = null;
20755
+ }
20613
20756
 
20614
20757
  naturalRatio.value = target.naturalHeight === 0
20615
20758
  ? 0.5
@@ -20620,21 +20763,21 @@
20620
20763
 
20621
20764
  function waitForCompleteness (target, count) {
20622
20765
  // protect against running forever
20623
- if (loadTimer === null || count === 1000) { return }
20766
+ if (isDestroyed === true || count === 1000) { return }
20624
20767
 
20625
20768
  if (target.complete === true) {
20626
20769
  onReady(target);
20627
20770
  }
20628
20771
  else {
20629
20772
  loadTimer = setTimeout(() => {
20773
+ loadTimer = null;
20630
20774
  waitForCompleteness(target, count + 1);
20631
20775
  }, 50);
20632
20776
  }
20633
20777
  }
20634
20778
 
20635
20779
  function onReady (img) {
20636
- // if component has been already destroyed
20637
- if (loadTimer === null) { return }
20780
+ if (isDestroyed === true) { return }
20638
20781
 
20639
20782
  position.value = position.value ^ 1;
20640
20783
  images[ position.value ].value = null;
@@ -20644,7 +20787,11 @@
20644
20787
  }
20645
20788
 
20646
20789
  function onError (err) {
20647
- clearTimeout(loadTimer);
20790
+ if (loadTimer !== null) {
20791
+ clearTimeout(loadTimer);
20792
+ loadTimer = null;
20793
+ }
20794
+
20648
20795
  isLoading.value = false;
20649
20796
  hasError.value = true;
20650
20797
  images[ position.value ].value = null;
@@ -20719,8 +20866,12 @@
20719
20866
  }
20720
20867
 
20721
20868
  vue.onBeforeUnmount(() => {
20722
- clearTimeout(loadTimer);
20723
- loadTimer = null;
20869
+ isDestroyed = true;
20870
+
20871
+ if (loadTimer !== null) {
20872
+ clearTimeout(loadTimer);
20873
+ loadTimer = null;
20874
+ }
20724
20875
  });
20725
20876
  }
20726
20877
 
@@ -21664,7 +21815,7 @@
21664
21815
  const { $q } = proxy;
21665
21816
 
21666
21817
  const temp = {};
21667
- let emitCachedValue = NaN, typedNumber, stopValueWatcher, emitTimer, emitValueFn;
21818
+ let emitCachedValue = NaN, typedNumber, stopValueWatcher, emitTimer = null, emitValueFn;
21668
21819
 
21669
21820
  const inputRef = vue.ref(null);
21670
21821
  const nameProp = useFormInputNameAttr(props);
@@ -21876,6 +22027,8 @@
21876
22027
 
21877
22028
  function emitValue (val, stopWatcher) {
21878
22029
  emitValueFn = () => {
22030
+ emitTimer = null;
22031
+
21879
22032
  if (
21880
22033
  props.type !== 'number'
21881
22034
  && temp.hasOwnProperty('value') === true
@@ -21903,7 +22056,7 @@
21903
22056
  }
21904
22057
 
21905
22058
  if (props.debounce !== void 0) {
21906
- clearTimeout(emitTimer);
22059
+ emitTimer !== null && clearTimeout(emitTimer);
21907
22060
  temp.value = val;
21908
22061
  emitTimer = setTimeout(emitValueFn, props.debounce);
21909
22062
  }
@@ -21937,7 +22090,11 @@
21937
22090
  function onChange (e) {
21938
22091
  onComposition(e);
21939
22092
 
21940
- clearTimeout(emitTimer);
22093
+ if (emitTimer !== null) {
22094
+ clearTimeout(emitTimer);
22095
+ emitTimer = null;
22096
+ }
22097
+
21941
22098
  emitValueFn !== void 0 && emitValueFn();
21942
22099
 
21943
22100
  emit('change', e.target.value);
@@ -21946,7 +22103,11 @@
21946
22103
  function onFinishEditing (e) {
21947
22104
  e !== void 0 && stop(e);
21948
22105
 
21949
- clearTimeout(emitTimer);
22106
+ if (emitTimer !== null) {
22107
+ clearTimeout(emitTimer);
22108
+ emitTimer = null;
22109
+ }
22110
+
21950
22111
  emitValueFn !== void 0 && emitValueFn();
21951
22112
 
21952
22113
  typedNumber = false;
@@ -22790,7 +22951,7 @@
22790
22951
  }
22791
22952
  }
22792
22953
 
22793
- let timer;
22954
+ let animateTimer = null;
22794
22955
 
22795
22956
  const $layout = {
22796
22957
  instances: {},
@@ -22821,16 +22982,16 @@
22821
22982
  scroll,
22822
22983
 
22823
22984
  animate () {
22824
- if (timer !== void 0) {
22825
- clearTimeout(timer);
22985
+ if (animateTimer !== null) {
22986
+ clearTimeout(animateTimer);
22826
22987
  }
22827
22988
  else {
22828
22989
  document.body.classList.add('q-body--layout-animate');
22829
22990
  }
22830
22991
 
22831
- timer = setTimeout(() => {
22992
+ animateTimer = setTimeout(() => {
22993
+ animateTimer = null;
22832
22994
  document.body.classList.remove('q-body--layout-animate');
22833
- timer = void 0;
22834
22995
  }, 155);
22835
22996
  },
22836
22997
 
@@ -24898,6 +25059,8 @@
24898
25059
  });
24899
25060
  }
24900
25061
 
25062
+ let $el, localScrollTarget, timer = null;
25063
+
24901
25064
  function animateTo ({ pos, ratio }, done) {
24902
25065
  animating.value = true;
24903
25066
  pullPosition.value = pos;
@@ -24906,15 +25069,14 @@
24906
25069
  pullRatio.value = ratio;
24907
25070
  }
24908
25071
 
24909
- clearTimeout(timer);
25072
+ timer !== null && clearTimeout(timer);
24910
25073
  timer = setTimeout(() => {
25074
+ timer = null;
24911
25075
  animating.value = false;
24912
25076
  done && done();
24913
25077
  }, 300);
24914
25078
  }
24915
25079
 
24916
- let $el, localScrollTarget, timer;
24917
-
24918
25080
  function updateScrollTarget () {
24919
25081
  localScrollTarget = getScrollTarget($el, props.scrollTarget);
24920
25082
  }
@@ -24927,7 +25089,7 @@
24927
25089
  });
24928
25090
 
24929
25091
  vue.onBeforeUnmount(() => {
24930
- clearTimeout(timer);
25092
+ timer !== null && clearTimeout(timer);
24931
25093
  });
24932
25094
 
24933
25095
  // expose public methods
@@ -25716,7 +25878,7 @@
25716
25878
 
25717
25879
  const isDark = useDark(props, proxy.$q);
25718
25880
 
25719
- let timer, panRefPos;
25881
+ let timer = null, panRefPos;
25720
25882
 
25721
25883
  const targetRef = vue.ref(null);
25722
25884
 
@@ -25965,14 +26127,14 @@
25965
26127
  }
25966
26128
 
25967
26129
  function startTimer () {
25968
- if (tempShowing.value === true) {
25969
- clearTimeout(timer);
25970
- }
25971
- else {
25972
- tempShowing.value = true;
25973
- }
26130
+ tempShowing.value = true;
26131
+
26132
+ timer !== null && clearTimeout(timer);
26133
+ timer = setTimeout(() => {
26134
+ timer = null;
26135
+ tempShowing.value = false;
26136
+ }, props.delay);
25974
26137
 
25975
- timer = setTimeout(() => { tempShowing.value = false; }, props.delay);
25976
26138
  props.onScroll !== void 0 && emitScroll();
25977
26139
  }
25978
26140
 
@@ -26974,8 +27136,8 @@
26974
27136
  const dialogFieldFocused = vue.ref(false);
26975
27137
  const innerLoadingIndicator = vue.ref(false);
26976
27138
 
26977
- let inputTimer, innerValueCache,
26978
- hasDialog, userInputValue, filterId, defaultInputValue,
27139
+ let inputTimer = null, innerValueCache,
27140
+ hasDialog, userInputValue, filterId = null, defaultInputValue,
26979
27141
  transitionShowComputed, searchBuffer, searchBufferExp;
26980
27142
 
26981
27143
  const inputRef = vue.ref(null);
@@ -27481,7 +27643,12 @@
27481
27643
  }
27482
27644
 
27483
27645
  e.target.value = '';
27484
- clearTimeout(inputTimer);
27646
+
27647
+ if (inputTimer !== null) {
27648
+ clearTimeout(inputTimer);
27649
+ inputTimer = null;
27650
+ }
27651
+
27485
27652
  resetInputValue();
27486
27653
 
27487
27654
  if (typeof value === 'string' && value.length > 0) {
@@ -27846,7 +28013,10 @@
27846
28013
  }
27847
28014
 
27848
28015
  function onInput (e) {
27849
- clearTimeout(inputTimer);
28016
+ if (inputTimer !== null) {
28017
+ clearTimeout(inputTimer);
28018
+ inputTimer = null;
28019
+ }
27850
28020
 
27851
28021
  if (e && e.target && e.target.qComposing === true) {
27852
28022
  return
@@ -27867,6 +28037,7 @@
27867
28037
 
27868
28038
  if (props.onFilter !== void 0) {
27869
28039
  inputTimer = setTimeout(() => {
28040
+ inputTimer = null;
27870
28041
  filter(inputValue.value);
27871
28042
  }, props.inputDebounce);
27872
28043
  }
@@ -27920,7 +28091,7 @@
27920
28091
  menu.value === true && (menu.value = false);
27921
28092
  }, 10);
27922
28093
 
27923
- clearTimeout(filterId);
28094
+ filterId !== null && clearTimeout(filterId);
27924
28095
  filterId = localFilterId;
27925
28096
 
27926
28097
  emit(
@@ -28112,8 +28283,10 @@
28112
28283
  }
28113
28284
 
28114
28285
  if (state.focused.value === false) {
28115
- clearTimeout(filterId);
28116
- filterId = void 0;
28286
+ if (filterId !== null) {
28287
+ clearTimeout(filterId);
28288
+ filterId = null;
28289
+ }
28117
28290
 
28118
28291
  if (state.innerLoading.value === true) {
28119
28292
  emit('filterAbort');
@@ -28234,7 +28407,7 @@
28234
28407
  updatePreState();
28235
28408
 
28236
28409
  vue.onBeforeUnmount(() => {
28237
- clearTimeout(inputTimer);
28410
+ inputTimer !== null && clearTimeout(inputTimer);
28238
28411
  });
28239
28412
 
28240
28413
  // expose public methods
@@ -28494,7 +28667,7 @@
28494
28667
 
28495
28668
  const contentRef = vue.ref(null);
28496
28669
 
28497
- let timer, pan = {}, dirRefs = {}, dirContentRefs = {};
28670
+ let timer = null, pan = {}, dirRefs = {}, dirContentRefs = {};
28498
28671
 
28499
28672
  const langDir = vue.computed(() => (
28500
28673
  $q.lang.rtl === true
@@ -28545,7 +28718,9 @@
28545
28718
  if (pan.scale === 1) {
28546
28719
  node.style.transform = `translate${ pan.axis }(${ pan.dir * 100 }%)`;
28547
28720
 
28721
+ timer !== null && clearTimeout(timer);
28548
28722
  timer = setTimeout(() => {
28723
+ timer = null;
28549
28724
  emit(pan.showing, { reset });
28550
28725
  emit('action', { side: pan.showing, reset });
28551
28726
  }, 230);
@@ -28616,7 +28791,7 @@
28616
28791
  });
28617
28792
 
28618
28793
  vue.onBeforeUnmount(() => {
28619
- clearTimeout(timer);
28794
+ timer !== null && clearTimeout(timer);
28620
28795
  });
28621
28796
 
28622
28797
  // expose public methods
@@ -36978,12 +37153,11 @@
36978
37153
  : (
36979
37154
  options.waitFor === 'transitionend'
36980
37155
  ? new Promise(resolve => {
36981
- const timer = setTimeout(() => {
36982
- endFn();
36983
- }, 400);
36984
-
36985
- const endFn = ev => {
36986
- clearTimeout(timer);
37156
+ const endFn = () => {
37157
+ if (timer !== null) {
37158
+ clearTimeout(timer);
37159
+ timer = null;
37160
+ }
36987
37161
 
36988
37162
  if (elTo) {
36989
37163
  elTo.removeEventListener('transitionend', endFn);
@@ -36993,6 +37167,8 @@
36993
37167
  resolve();
36994
37168
  };
36995
37169
 
37170
+ let timer = setTimeout(endFn, 400);
37171
+
36996
37172
  elTo.addEventListener('transitionend', endFn);
36997
37173
  elTo.addEventListener('transitioncancel', endFn);
36998
37174
  })
@@ -37461,6 +37637,7 @@
37461
37637
  : ctx.touchSensitivity;
37462
37638
 
37463
37639
  ctx.timer = setTimeout(() => {
37640
+ ctx.timer = void 0;
37464
37641
  clearSelection();
37465
37642
  ctx.triggered = true;
37466
37643
 
@@ -37477,10 +37654,13 @@
37477
37654
  move (evt) {
37478
37655
  const { top, left } = position(evt);
37479
37656
  if (
37480
- Math.abs(left - ctx.origin.left) >= ctx.sensitivity
37481
- || Math.abs(top - ctx.origin.top) >= ctx.sensitivity
37657
+ ctx.timer !== void 0 && (
37658
+ Math.abs(left - ctx.origin.left) >= ctx.sensitivity
37659
+ || Math.abs(top - ctx.origin.top) >= ctx.sensitivity
37660
+ )
37482
37661
  ) {
37483
37662
  clearTimeout(ctx.timer);
37663
+ ctx.timer = void 0;
37484
37664
  }
37485
37665
  },
37486
37666
 
@@ -37493,8 +37673,9 @@
37493
37673
  if (ctx.triggered === true) {
37494
37674
  evt !== void 0 && stopAndPrevent(evt);
37495
37675
  }
37496
- else {
37676
+ else if (ctx.timer !== void 0) {
37497
37677
  clearTimeout(ctx.timer);
37678
+ ctx.timer = void 0;
37498
37679
  }
37499
37680
  }
37500
37681
  };
@@ -37546,7 +37727,7 @@
37546
37727
  cleanEvt(ctx, 'main');
37547
37728
  cleanEvt(ctx, 'temp');
37548
37729
 
37549
- clearTimeout(ctx.timer);
37730
+ ctx.timer !== void 0 && clearTimeout(ctx.timer);
37550
37731
  ctx.styleCleanup !== void 0 && ctx.styleCleanup();
37551
37732
 
37552
37733
  delete el.__qtouchhold;
@@ -37685,6 +37866,8 @@
37685
37866
  };
37686
37867
 
37687
37868
  const fn = () => {
37869
+ ctx.timer = void 0;
37870
+
37688
37871
  if (ctx.event === void 0) {
37689
37872
  return
37690
37873
  }
@@ -37728,8 +37911,9 @@
37728
37911
  },
37729
37912
 
37730
37913
  move (evt) {
37731
- if (ctx.event !== void 0 && shouldEnd(evt, ctx.origin) === true) {
37914
+ if (ctx.event !== void 0 && ctx.timer !== void 0 && shouldEnd(evt, ctx.origin) === true) {
37732
37915
  clearTimeout(ctx.timer);
37916
+ ctx.timer = void 0;
37733
37917
  }
37734
37918
  },
37735
37919
 
@@ -37742,7 +37926,11 @@
37742
37926
  evt !== void 0 && ctx.event.repeatCount > 0 && stopAndPrevent(evt);
37743
37927
 
37744
37928
  cleanEvt(ctx, 'temp');
37745
- clearTimeout(ctx.timer);
37929
+
37930
+ if (ctx.timer !== void 0) {
37931
+ clearTimeout(ctx.timer);
37932
+ ctx.timer = void 0;
37933
+ }
37746
37934
 
37747
37935
  ctx.event = void 0;
37748
37936
  }
@@ -37791,7 +37979,7 @@
37791
37979
  const ctx = el.__qtouchrepeat;
37792
37980
 
37793
37981
  if (ctx !== void 0) {
37794
- clearTimeout(ctx.timer);
37982
+ ctx.timer !== void 0 && clearTimeout(ctx.timer);
37795
37983
 
37796
37984
  cleanEvt(ctx, 'main');
37797
37985
  cleanEvt(ctx, 'temp');
@@ -38255,7 +38443,7 @@
38255
38443
 
38256
38444
  let vm, emittedOK = false;
38257
38445
  const dialogRef = vue.ref(null);
38258
- const el = createGlobalNode();
38446
+ const el = createGlobalNode(false, 'dialog');
38259
38447
 
38260
38448
  const applyState = cmd => {
38261
38449
  if (dialogRef.value !== null && dialogRef.value[ cmd ] !== void 0) {
@@ -38955,7 +39143,7 @@
38955
39143
  app,
38956
39144
  vm,
38957
39145
  uid$1 = 0,
38958
- timeout,
39146
+ timeout = null,
38959
39147
  props = {},
38960
39148
  activeGroups = {};
38961
39149
 
@@ -39004,10 +39192,10 @@
39004
39192
  }
39005
39193
  else {
39006
39194
  props.uid = ++uid$1;
39007
- clearTimeout(timeout);
39195
+ timeout !== null && clearTimeout(timeout);
39008
39196
 
39009
39197
  timeout = setTimeout(() => {
39010
- timeout = void 0;
39198
+ timeout = null;
39011
39199
 
39012
39200
  const el = createGlobalNode('q-loading');
39013
39201
 
@@ -39117,9 +39305,9 @@
39117
39305
  }
39118
39306
  }
39119
39307
 
39120
- if (timeout !== void 0) {
39308
+ if (timeout !== null) {
39121
39309
  clearTimeout(timeout);
39122
- timeout = void 0;
39310
+ timeout = null;
39123
39311
  }
39124
39312
 
39125
39313
  Plugin$2.isActive = false;
@@ -39141,7 +39329,7 @@
39141
39329
  }
39142
39330
  });
39143
39331
 
39144
- let updateId, currentClientMeta;
39332
+ let updateId = null, currentClientMeta;
39145
39333
  const clientList = [];
39146
39334
 
39147
39335
  function normalize (meta) {
@@ -39275,6 +39463,8 @@
39275
39463
  }
39276
39464
 
39277
39465
  function updateClientMeta () {
39466
+ updateId = null;
39467
+
39278
39468
  const data = {
39279
39469
  title: '',
39280
39470
  titleTemplate: null,
@@ -39300,7 +39490,7 @@
39300
39490
  }
39301
39491
 
39302
39492
  function planClientUpdate () {
39303
- clearTimeout(updateId);
39493
+ updateId !== null && clearTimeout(updateId);
39304
39494
  updateId = setTimeout(updateClientMeta, 50);
39305
39495
  }
39306
39496
 
@@ -39527,7 +39717,10 @@
39527
39717
 
39528
39718
  if (originalApi !== void 0) {
39529
39719
  // reset timeout if any
39530
- clearTimeout(originalApi.notif.meta.timer);
39720
+ if (originalApi.notif.meta.timer) {
39721
+ clearTimeout(originalApi.notif.meta.timer);
39722
+ originalApi.notif.meta.timer = void 0;
39723
+ }
39531
39724
 
39532
39725
  // retain uid
39533
39726
  notif.meta.uid = originalApi.notif.meta.uid;
@@ -39563,7 +39756,10 @@
39563
39756
  // ok, so it's NOT a new one
39564
39757
  else {
39565
39758
  // reset timeout if any
39566
- clearTimeout(original.meta.timer);
39759
+ if (original.meta.timer) {
39760
+ clearTimeout(original.meta.timer);
39761
+ original.meta.timer = void 0;
39762
+ }
39567
39763
 
39568
39764
  if (notif.badgePosition !== void 0) {
39569
39765
  if (badgePositions.includes(notif.badgePosition) === false) {
@@ -39593,6 +39789,7 @@
39593
39789
 
39594
39790
  if (notif.timeout > 0) {
39595
39791
  notif.meta.timer = setTimeout(() => {
39792
+ notif.meta.timer = void 0;
39596
39793
  dismiss();
39597
39794
  }, notif.timeout + /* show duration */ 1000);
39598
39795
  }
@@ -39641,7 +39838,10 @@
39641
39838
  }
39642
39839
 
39643
39840
  function removeNotification (notif) {
39644
- clearTimeout(notif.meta.timer);
39841
+ if (notif.meta.timer) {
39842
+ clearTimeout(notif.meta.timer);
39843
+ notif.meta.timer = void 0;
39844
+ }
39645
39845
 
39646
39846
  const index = notificationsList[ notif.position ].value.indexOf(notif);
39647
39847
  if (index !== -1) {
@@ -40527,7 +40727,7 @@
40527
40727
  */
40528
40728
 
40529
40729
  var index_umd = {
40530
- version: '2.11.3',
40730
+ version: '2.11.4',
40531
40731
  install (app, opts) {
40532
40732
  installQuasar(app, {
40533
40733
  components,