quasar 1.17.1 → 1.17.2

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 (109) hide show
  1. package/dist/api/LoadingBar.json +1 -1
  2. package/dist/api/QAjaxBar.json +23 -4
  3. package/dist/icon-set/bootstrap-icons.umd.min.js +1 -1
  4. package/dist/icon-set/eva-icons.umd.min.js +1 -1
  5. package/dist/icon-set/fontawesome-v5-pro.umd.min.js +1 -1
  6. package/dist/icon-set/fontawesome-v5.umd.min.js +1 -1
  7. package/dist/icon-set/ionicons-v4.umd.min.js +1 -1
  8. package/dist/icon-set/line-awesome.umd.min.js +1 -1
  9. package/dist/icon-set/material-icons-outlined.umd.min.js +1 -1
  10. package/dist/icon-set/material-icons-round.umd.min.js +1 -1
  11. package/dist/icon-set/material-icons-sharp.umd.min.js +1 -1
  12. package/dist/icon-set/material-icons.umd.min.js +1 -1
  13. package/dist/icon-set/mdi-v3.umd.min.js +1 -1
  14. package/dist/icon-set/mdi-v4.umd.min.js +1 -1
  15. package/dist/icon-set/mdi-v5.umd.min.js +1 -1
  16. package/dist/icon-set/mdi-v6.umd.min.js +1 -1
  17. package/dist/icon-set/svg-bootstrap-icons.umd.min.js +1 -1
  18. package/dist/icon-set/svg-eva-icons.umd.min.js +1 -1
  19. package/dist/icon-set/svg-fontawesome-v5.umd.min.js +1 -1
  20. package/dist/icon-set/svg-ionicons-v4.umd.min.js +1 -1
  21. package/dist/icon-set/svg-ionicons-v5.umd.min.js +1 -1
  22. package/dist/icon-set/svg-ionicons-v6.umd.min.js +1 -1
  23. package/dist/icon-set/svg-line-awesome.umd.min.js +1 -1
  24. package/dist/icon-set/svg-material-icons-outlined.umd.min.js +1 -1
  25. package/dist/icon-set/svg-material-icons-round.umd.min.js +1 -1
  26. package/dist/icon-set/svg-material-icons-sharp.umd.min.js +1 -1
  27. package/dist/icon-set/svg-material-icons.umd.min.js +1 -1
  28. package/dist/icon-set/svg-mdi-v4.umd.min.js +1 -1
  29. package/dist/icon-set/svg-mdi-v5.umd.min.js +1 -1
  30. package/dist/icon-set/svg-mdi-v6.umd.min.js +1 -1
  31. package/dist/icon-set/svg-themify.umd.min.js +1 -1
  32. package/dist/icon-set/themify.umd.min.js +1 -1
  33. package/dist/lang/ar.umd.min.js +1 -1
  34. package/dist/lang/az-latn.umd.min.js +1 -1
  35. package/dist/lang/bg.umd.min.js +1 -1
  36. package/dist/lang/ca.umd.min.js +1 -1
  37. package/dist/lang/cs.umd.min.js +1 -1
  38. package/dist/lang/da.umd.min.js +1 -1
  39. package/dist/lang/de.umd.min.js +1 -1
  40. package/dist/lang/el.umd.min.js +1 -1
  41. package/dist/lang/en-gb.umd.min.js +1 -1
  42. package/dist/lang/en-us.umd.min.js +1 -1
  43. package/dist/lang/eo.umd.min.js +1 -1
  44. package/dist/lang/es.umd.min.js +1 -1
  45. package/dist/lang/et.umd.min.js +1 -1
  46. package/dist/lang/fa-ir.umd.min.js +1 -1
  47. package/dist/lang/fa.umd.min.js +1 -1
  48. package/dist/lang/fi.umd.min.js +1 -1
  49. package/dist/lang/fr.umd.min.js +1 -1
  50. package/dist/lang/gn.umd.min.js +1 -1
  51. package/dist/lang/he.umd.min.js +1 -1
  52. package/dist/lang/hr.umd.min.js +1 -1
  53. package/dist/lang/hu.umd.min.js +1 -1
  54. package/dist/lang/id.umd.min.js +1 -1
  55. package/dist/lang/is.umd.min.js +1 -1
  56. package/dist/lang/it.umd.min.js +1 -1
  57. package/dist/lang/ja.umd.min.js +1 -1
  58. package/dist/lang/km.umd.min.js +1 -1
  59. package/dist/lang/ko-kr.umd.min.js +1 -1
  60. package/dist/lang/kur-ckb.umd.min.js +1 -1
  61. package/dist/lang/lu.umd.min.js +1 -1
  62. package/dist/lang/lv.umd.min.js +1 -1
  63. package/dist/lang/ml.umd.min.js +1 -1
  64. package/dist/lang/ms.umd.min.js +1 -1
  65. package/dist/lang/nb-no.umd.min.js +1 -1
  66. package/dist/lang/nl.umd.min.js +1 -1
  67. package/dist/lang/pl.umd.min.js +1 -1
  68. package/dist/lang/pt-br.umd.min.js +1 -1
  69. package/dist/lang/pt.umd.min.js +1 -1
  70. package/dist/lang/ro.umd.min.js +1 -1
  71. package/dist/lang/ru.umd.min.js +1 -1
  72. package/dist/lang/sk.umd.min.js +1 -1
  73. package/dist/lang/sl.umd.min.js +1 -1
  74. package/dist/lang/sr.umd.min.js +1 -1
  75. package/dist/lang/sv.umd.min.js +1 -1
  76. package/dist/lang/ta.umd.min.js +1 -1
  77. package/dist/lang/th.umd.min.js +1 -1
  78. package/dist/lang/tr.umd.min.js +1 -1
  79. package/dist/lang/ug.umd.min.js +1 -1
  80. package/dist/lang/uk.umd.min.js +1 -1
  81. package/dist/lang/vi.umd.min.js +1 -1
  82. package/dist/lang/zh-hans.umd.min.js +1 -1
  83. package/dist/lang/zh-hant.umd.min.js +1 -1
  84. package/dist/quasar.addon.css +1 -1
  85. package/dist/quasar.addon.rtl.css +1 -1
  86. package/dist/quasar.common.js +2 -2
  87. package/dist/quasar.css +1 -1
  88. package/dist/quasar.esm.js +2 -2
  89. package/dist/quasar.ie.polyfills.js +1 -1
  90. package/dist/quasar.ie.polyfills.umd.min.js +1 -1
  91. package/dist/quasar.rtl.css +1 -1
  92. package/dist/quasar.sass +1 -1
  93. package/dist/quasar.styl +1 -1
  94. package/dist/quasar.umd.js +143 -58
  95. package/dist/quasar.umd.min.js +2 -2
  96. package/dist/quasar.umd.modern.js +141 -58
  97. package/dist/quasar.umd.modern.min.js +2 -2
  98. package/dist/types/index.d.ts +6 -2
  99. package/dist/vetur/quasar-attributes.json +7 -3
  100. package/dist/vetur/quasar-tags.json +2 -1
  101. package/dist/web-types/web-types.json +14 -5
  102. package/package.json +1 -1
  103. package/src/components/ajax-bar/QAjaxBar.js +48 -26
  104. package/src/components/ajax-bar/QAjaxBar.json +22 -4
  105. package/src/components/icon/QIcon.js +42 -30
  106. package/src/components/icon/QIcon.sass +0 -1
  107. package/src/components/icon/QIcon.styl +0 -1
  108. package/src/components/layout/QLayout.js +49 -0
  109. package/src/plugins/LoadingBar.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Quasar Framework v1.17.1
2
+ * Quasar Framework v1.17.2
3
3
  * (c) 2015-present Razvan Stoenescu
4
4
  * Released under the MIT License.
5
5
  */
@@ -12,7 +12,7 @@
12
12
 
13
13
  Vue = Vue && Object.prototype.hasOwnProperty.call(Vue, 'default') ? Vue['default'] : Vue;
14
14
 
15
- var version = "1.17.1";
15
+ var version = "1.17.2";
16
16
 
17
17
  /* eslint-disable no-useless-escape */
18
18
 
@@ -1944,22 +1944,22 @@
1944
1944
 
1945
1945
  const
1946
1946
  xhr = isSSR ? null : XMLHttpRequest,
1947
- send = isSSR ? null : xhr.prototype.send,
1948
- stackStart = [],
1949
- stackStop = [];
1947
+ open = isSSR ? null : xhr.prototype.open,
1948
+ positionValues = [ 'top', 'right', 'bottom', 'left' ];
1950
1949
 
1950
+ let stack = [];
1951
1951
  let highjackCount = 0;
1952
1952
 
1953
1953
  function translate ({ p, pos, active, horiz, reverse, dir }) {
1954
1954
  let x = 1, y = 1;
1955
1955
 
1956
- if (horiz) {
1957
- if (reverse) { x = -1; }
1956
+ if (horiz === true) {
1957
+ if (reverse === true) { x = -1; }
1958
1958
  if (pos === 'bottom') { y = -1; }
1959
1959
  return { transform: `translate3d(${x * (p - 100)}%,${active ? 0 : y * -200}%,0)` }
1960
1960
  }
1961
1961
 
1962
- if (reverse) { y = -1; }
1962
+ if (reverse === true) { y = -1; }
1963
1963
  if (pos === 'right') { x = -1; }
1964
1964
  return { transform: `translate3d(${active ? 0 : dir * x * -200}%,${y * (p - 100)}%,0)` }
1965
1965
  }
@@ -1985,32 +1985,46 @@
1985
1985
  return between(p + amount, 0, 100)
1986
1986
  }
1987
1987
 
1988
- function highjackAjax (start, stop) {
1989
- stackStart.push(start);
1990
- stackStop.push(stop);
1991
-
1988
+ function highjackAjax (stackEntry) {
1992
1989
  highjackCount++;
1993
1990
 
1991
+ stack.push(stackEntry);
1992
+
1994
1993
  if (highjackCount > 1) { return }
1995
1994
 
1996
- function endHandler () {
1997
- stackStop.forEach(fn => { fn(); });
1998
- }
1995
+ xhr.prototype.open = function (_, url) {
1996
+ const stopStack = [];
1997
+
1998
+ const loadStart = () => {
1999
+ stack.forEach(entry => {
2000
+ const hijackFilter = entry.getHijackFilter();
2001
+ if (
2002
+ hijackFilter === null ||
2003
+ hijackFilter(url) === true
2004
+ ) {
2005
+ entry.start();
2006
+ stopStack.push(entry.stop);
2007
+ }
2008
+ });
2009
+ };
1999
2010
 
2000
- xhr.prototype.send = function (/* ...args */) {
2001
- stackStart.forEach(fn => { fn(); });
2002
- this.addEventListener('loadend', endHandler, false);
2003
- send.apply(this, arguments);
2011
+ const loadEnd = () => {
2012
+ stopStack.forEach(stop => { stop(); });
2013
+ };
2014
+
2015
+ this.addEventListener('loadstart', loadStart, { once: true });
2016
+ this.addEventListener('loadend', loadEnd, { once: true });
2017
+
2018
+ open.apply(this, arguments);
2004
2019
  };
2005
2020
  }
2006
2021
 
2007
- function restoreAjax (start, stop) {
2008
- stackStart.splice(stackStart.indexOf(start), 1);
2009
- stackStop.splice(stackStop.indexOf(stop), 1);
2022
+ function restoreAjax (start) {
2023
+ stack = stack.filter(entry => entry.start !== start);
2010
2024
 
2011
2025
  highjackCount = Math.max(0, highjackCount - 1);
2012
2026
  if (!highjackCount) {
2013
- xhr.prototype.send = send;
2027
+ xhr.prototype.open = open;
2014
2028
  }
2015
2029
  }
2016
2030
 
@@ -2021,15 +2035,19 @@
2021
2035
  position: {
2022
2036
  type: String,
2023
2037
  default: 'top',
2024
- validator: val => ['top', 'right', 'bottom', 'left'].includes(val)
2038
+ validator: val => positionValues.includes(val)
2025
2039
  },
2040
+
2026
2041
  size: {
2027
2042
  type: String,
2028
2043
  default: '2px'
2029
2044
  },
2045
+
2030
2046
  color: String,
2047
+ reverse: Boolean,
2048
+
2031
2049
  skipHijack: Boolean,
2032
- reverse: Boolean
2050
+ hijackFilter: Function
2033
2051
  },
2034
2052
 
2035
2053
  data () {
@@ -2057,7 +2075,7 @@
2057
2075
  active,
2058
2076
  horiz: this.horizontal,
2059
2077
  reverse: this.$q.lang.rtl === true && ['top', 'bottom'].includes(this.position)
2060
- ? !this.reverse
2078
+ ? this.reverse === false
2061
2079
  : this.reverse,
2062
2080
  dir: this.$q.lang.rtl === true ? -1 : 1
2063
2081
  });
@@ -2162,13 +2180,17 @@
2162
2180
  mounted () {
2163
2181
  if (this.skipHijack !== true) {
2164
2182
  this.hijacked = true;
2165
- highjackAjax(this.start, this.stop);
2183
+ highjackAjax({
2184
+ start: this.start,
2185
+ stop: this.stop,
2186
+ getHijackFilter: () => this.hijackFilter || null
2187
+ });
2166
2188
  }
2167
2189
  },
2168
2190
 
2169
2191
  beforeDestroy () {
2170
2192
  clearTimeout(this.timer);
2171
- this.hijacked === true && restoreAjax(this.start, this.stop);
2193
+ this.hijacked === true && restoreAjax(this.start);
2172
2194
  },
2173
2195
 
2174
2196
  render (h) {
@@ -2254,6 +2276,8 @@
2254
2276
  : slot
2255
2277
  }
2256
2278
 
2279
+ const defaultViewBox = '0 0 24 24';
2280
+
2257
2281
  const sameFn = i => i;
2258
2282
  const ionFn = i => `ionicons ${i}`;
2259
2283
 
@@ -2314,10 +2338,7 @@
2314
2338
  let icon = this.name;
2315
2339
 
2316
2340
  if (!icon) {
2317
- return {
2318
- none: true,
2319
- cls: this.classes
2320
- }
2341
+ return { none: true }
2321
2342
  }
2322
2343
 
2323
2344
  if (this.$q.iconMapFn !== void 0) {
@@ -2328,7 +2349,7 @@
2328
2349
  }
2329
2350
  else {
2330
2351
  return {
2331
- cls: res.cls + ' ' + this.classes,
2352
+ cls: res.cls,
2332
2353
  content: res.content !== void 0
2333
2354
  ? res.content
2334
2355
  : ' '
@@ -2338,41 +2359,35 @@
2338
2359
  }
2339
2360
 
2340
2361
  if (mRE.test(icon) === true) {
2341
- const [ def, viewBox ] = icon.split('|');
2362
+ const [ def, viewBox = defaultViewBox ] = icon.split('|');
2342
2363
 
2343
2364
  return {
2344
2365
  svg: true,
2345
- cls: this.classes,
2366
+ viewBox,
2346
2367
  nodes: def.split('&&').map(path => {
2347
2368
  const [ d, style, transform ] = path.split('@@');
2348
2369
  return this.$createElement('path', {
2349
- attrs: {
2350
- d,
2351
- transform
2352
- },
2370
+ attrs: { d, transform },
2353
2371
  style
2354
2372
  })
2355
- }),
2356
- viewBox: viewBox !== void 0 ? viewBox : '0 0 24 24'
2373
+ })
2357
2374
  }
2358
2375
  }
2359
2376
 
2360
2377
  if (imgRE.test(icon) === true) {
2361
2378
  return {
2362
2379
  img: true,
2363
- cls: this.classes,
2364
2380
  src: icon.substring(4)
2365
2381
  }
2366
2382
  }
2367
2383
 
2368
2384
  if (svgUseRE.test(icon) === true) {
2369
- const [ def, viewBox ] = icon.split('|');
2385
+ const [ def, viewBox = defaultViewBox ] = icon.split('|');
2370
2386
 
2371
2387
  return {
2372
2388
  svguse: true,
2373
- cls: this.classes,
2374
2389
  src: def.substring(7),
2375
- viewBox: viewBox !== void 0 ? viewBox : '0 0 24 24'
2390
+ viewBox
2376
2391
  }
2377
2392
  }
2378
2393
 
@@ -2406,7 +2421,7 @@
2406
2421
  }
2407
2422
 
2408
2423
  return {
2409
- cls: cls + ' ' + this.classes,
2424
+ cls,
2410
2425
  content
2411
2426
  }
2412
2427
  }
@@ -2414,7 +2429,7 @@
2414
2429
 
2415
2430
  render (h) {
2416
2431
  const data = {
2417
- class: this.type.cls,
2432
+ class: this.classes,
2418
2433
  style: this.sizeStyle,
2419
2434
  on: { ...this.qListeners },
2420
2435
  attrs: {
@@ -2428,25 +2443,44 @@
2428
2443
  }
2429
2444
 
2430
2445
  if (this.type.img === true) {
2431
- data.attrs.src = this.type.src;
2432
- return h('img', data)
2446
+ return h('div', data, mergeSlot([
2447
+ h('img', {
2448
+ class: this.type.cls,
2449
+ attrs: { src: this.type.src }
2450
+ })
2451
+ ], this, 'default'))
2433
2452
  }
2434
2453
 
2435
2454
  if (this.type.svg === true) {
2436
- data.attrs.focusable = 'false'; /* needed for IE11 */
2437
- data.attrs.viewBox = this.type.viewBox;
2438
-
2439
- return h('svg', data, mergeSlot(this.type.nodes, this, 'default'))
2455
+ return h('div', data, mergeSlot([
2456
+ h('svg', {
2457
+ class: this.type.cls,
2458
+ attrs: {
2459
+ viewBox: this.type.viewBox,
2460
+ focusable: 'false' /* needed for IE11 */
2461
+ }
2462
+ }, this.type.nodes)
2463
+ ], this, 'default'))
2440
2464
  }
2441
- if (this.type.svguse === true) {
2442
- data.attrs.focusable = 'false'; /* needed for IE11 */
2443
- data.attrs.viewBox = this.type.viewBox;
2444
2465
 
2445
- return h('svg', data, mergeSlot([
2446
- h('use', { attrs: { 'xlink:href': this.type.src } })
2466
+ if (this.type.svguse === true) {
2467
+ return h('div', data, mergeSlot([
2468
+ h('svg', {
2469
+ class: this.type.cls,
2470
+ attrs: {
2471
+ viewBox: this.type.viewBox,
2472
+ focusable: 'false' /* needed for IE11 */
2473
+ }
2474
+ }, [
2475
+ h('use', { attrs: { 'xlink:href': this.type.src } })
2476
+ ])
2447
2477
  ], this, 'default'))
2448
2478
  }
2449
2479
 
2480
+ if (this.type.cls !== void 0) {
2481
+ data.class += ' ' + this.type.cls;
2482
+ }
2483
+
2450
2484
  return h(this.tag, data, mergeSlot([
2451
2485
  this.type.content
2452
2486
  ], this, 'default'))
@@ -21964,13 +21998,30 @@
21964
21998
  classes () {
21965
21999
  return 'q-layout q-layout--' +
21966
22000
  (this.container === true ? 'containerized' : 'standard')
22001
+ },
22002
+
22003
+ scrollbarEvtAction () {
22004
+ return this.container !== true && this.scrollbarWidth > 0
22005
+ ? 'add' : 'remove'
21967
22006
  }
21968
22007
  },
21969
22008
 
22009
+ watch: {
22010
+ scrollbarEvtAction: '__updateScrollEvent'
22011
+ },
22012
+
21970
22013
  created () {
21971
22014
  this.instances = {};
21972
22015
  },
21973
22016
 
22017
+ mounted () {
22018
+ this.scrollbarEvtAction === 'add' && this.__updateScrollEvent('add');
22019
+ },
22020
+
22021
+ beforeDestroy () {
22022
+ this.scrollbarEvtAction === 'add' && this.__updateScrollEvent('remove');
22023
+ },
22024
+
21974
22025
  render (h) {
21975
22026
  const layout = h('div', {
21976
22027
  class: this.classes,
@@ -22065,6 +22116,38 @@
22065
22116
  this.scrollbarWidth = width;
22066
22117
  }
22067
22118
  }
22119
+ },
22120
+
22121
+ __updateScrollEvent (action) {
22122
+ if (this.timerScrollbar !== void 0 && action === 'remove') {
22123
+ clearTimeout(this.timerScrollbar);
22124
+ this.__restoreScrollbar();
22125
+ }
22126
+
22127
+ window[`${action}EventListener`]('resize', this.__hideScrollbar);
22128
+ },
22129
+
22130
+ __hideScrollbar () {
22131
+ if (this.timerScrollbar === void 0) {
22132
+ const el = document.body;
22133
+
22134
+ // if it has no scrollbar then there's nothing to do
22135
+ if (el.scrollHeight > this.$q.screen.height) {
22136
+ return
22137
+ }
22138
+
22139
+ el.classList.add('hide-scrollbar');
22140
+ }
22141
+ else {
22142
+ clearTimeout(this.timerScrollbar);
22143
+ }
22144
+
22145
+ this.timerScrollbar = setTimeout(this.__restoreScrollbar, 200);
22146
+ },
22147
+
22148
+ __restoreScrollbar () {
22149
+ this.timerScrollbar = void 0;
22150
+ document.body.classList.remove('hide-scrollbar');
22068
22151
  }
22069
22152
  }
22070
22153
  });