quasar 1.19.4 → 1.20.0

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 (132) hide show
  1. package/dist/api/Loading.json +51 -1
  2. package/dist/api/QBtnDropdown.json +4 -0
  3. package/dist/api/QExpansionItem.json +11 -2
  4. package/dist/icon-set/bootstrap-icons.umd.min.js +1 -1
  5. package/dist/icon-set/eva-icons.umd.min.js +1 -1
  6. package/dist/icon-set/fontawesome-v5-pro.umd.min.js +1 -1
  7. package/dist/icon-set/fontawesome-v5.umd.min.js +1 -1
  8. package/dist/icon-set/fontawesome-v6-pro.umd.min.js +1 -1
  9. package/dist/icon-set/fontawesome-v6.umd.min.js +1 -1
  10. package/dist/icon-set/ionicons-v4.umd.min.js +1 -1
  11. package/dist/icon-set/line-awesome.umd.min.js +1 -1
  12. package/dist/icon-set/material-icons-outlined.umd.min.js +1 -1
  13. package/dist/icon-set/material-icons-round.umd.min.js +1 -1
  14. package/dist/icon-set/material-icons-sharp.umd.min.js +1 -1
  15. package/dist/icon-set/material-icons.umd.min.js +1 -1
  16. package/dist/icon-set/material-symbols-outlined.umd.min.js +1 -1
  17. package/dist/icon-set/material-symbols-rounded.umd.min.js +1 -1
  18. package/dist/icon-set/material-symbols-sharp.umd.min.js +1 -1
  19. package/dist/icon-set/mdi-v3.umd.min.js +1 -1
  20. package/dist/icon-set/mdi-v4.umd.min.js +1 -1
  21. package/dist/icon-set/mdi-v5.umd.min.js +1 -1
  22. package/dist/icon-set/mdi-v6.umd.min.js +1 -1
  23. package/dist/icon-set/svg-bootstrap-icons.umd.min.js +1 -1
  24. package/dist/icon-set/svg-eva-icons.umd.min.js +1 -1
  25. package/dist/icon-set/svg-fontawesome-v5.umd.min.js +1 -1
  26. package/dist/icon-set/svg-fontawesome-v6.umd.min.js +1 -1
  27. package/dist/icon-set/svg-ionicons-v4.umd.min.js +1 -1
  28. package/dist/icon-set/svg-ionicons-v5.umd.min.js +1 -1
  29. package/dist/icon-set/svg-ionicons-v6.umd.min.js +1 -1
  30. package/dist/icon-set/svg-line-awesome.umd.min.js +1 -1
  31. package/dist/icon-set/svg-material-icons-outlined.umd.min.js +1 -1
  32. package/dist/icon-set/svg-material-icons-round.umd.min.js +1 -1
  33. package/dist/icon-set/svg-material-icons-sharp.umd.min.js +1 -1
  34. package/dist/icon-set/svg-material-icons.umd.min.js +1 -1
  35. package/dist/icon-set/svg-material-symbols-outlined.umd.min.js +2 -2
  36. package/dist/icon-set/svg-material-symbols-rounded.umd.min.js +1 -1
  37. package/dist/icon-set/svg-material-symbols-sharp.umd.min.js +2 -2
  38. package/dist/icon-set/svg-mdi-v4.umd.min.js +1 -1
  39. package/dist/icon-set/svg-mdi-v5.umd.min.js +1 -1
  40. package/dist/icon-set/svg-mdi-v6.umd.min.js +1 -1
  41. package/dist/icon-set/svg-themify.umd.min.js +1 -1
  42. package/dist/icon-set/themify.umd.min.js +1 -1
  43. package/dist/lang/ar.umd.min.js +1 -1
  44. package/dist/lang/az-latn.umd.min.js +1 -1
  45. package/dist/lang/bg.umd.min.js +1 -1
  46. package/dist/lang/ca.umd.min.js +1 -1
  47. package/dist/lang/cs.umd.min.js +1 -1
  48. package/dist/lang/da.umd.min.js +1 -1
  49. package/dist/lang/de.umd.min.js +1 -1
  50. package/dist/lang/el.umd.min.js +1 -1
  51. package/dist/lang/en-gb.umd.min.js +1 -1
  52. package/dist/lang/en-us.umd.min.js +1 -1
  53. package/dist/lang/eo.umd.min.js +1 -1
  54. package/dist/lang/es.umd.min.js +1 -1
  55. package/dist/lang/et.umd.min.js +1 -1
  56. package/dist/lang/eu.umd.min.js +1 -1
  57. package/dist/lang/fa-ir.umd.min.js +1 -1
  58. package/dist/lang/fa.umd.min.js +1 -1
  59. package/dist/lang/fi.umd.min.js +1 -1
  60. package/dist/lang/fr.umd.min.js +1 -1
  61. package/dist/lang/gn.umd.min.js +1 -1
  62. package/dist/lang/he.umd.min.js +1 -1
  63. package/dist/lang/hr.umd.min.js +1 -1
  64. package/dist/lang/hu.umd.min.js +1 -1
  65. package/dist/lang/id.umd.min.js +1 -1
  66. package/dist/lang/is.umd.min.js +1 -1
  67. package/dist/lang/it.umd.min.js +1 -1
  68. package/dist/lang/ja.umd.min.js +1 -1
  69. package/dist/lang/km.umd.min.js +1 -1
  70. package/dist/lang/ko-kr.umd.min.js +1 -1
  71. package/dist/lang/kur-ckb.umd.min.js +1 -1
  72. package/dist/lang/kz.umd.min.js +1 -1
  73. package/dist/lang/lu.umd.min.js +1 -1
  74. package/dist/lang/lv.umd.min.js +1 -1
  75. package/dist/lang/ml.umd.min.js +1 -1
  76. package/dist/lang/mm.umd.min.js +1 -1
  77. package/dist/lang/ms.umd.min.js +1 -1
  78. package/dist/lang/my.umd.min.js +1 -1
  79. package/dist/lang/nb-no.umd.min.js +1 -1
  80. package/dist/lang/nl.umd.min.js +1 -1
  81. package/dist/lang/pl.umd.min.js +1 -1
  82. package/dist/lang/pt-br.umd.min.js +1 -1
  83. package/dist/lang/pt.umd.min.js +1 -1
  84. package/dist/lang/ro.umd.min.js +1 -1
  85. package/dist/lang/ru.umd.min.js +1 -1
  86. package/dist/lang/sk.umd.min.js +1 -1
  87. package/dist/lang/sl.umd.min.js +1 -1
  88. package/dist/lang/sm.umd.min.js +1 -1
  89. package/dist/lang/sr.umd.min.js +1 -1
  90. package/dist/lang/sv.umd.min.js +1 -1
  91. package/dist/lang/ta.umd.min.js +1 -1
  92. package/dist/lang/th.umd.min.js +1 -1
  93. package/dist/lang/tr.umd.min.js +1 -1
  94. package/dist/lang/ug.umd.min.js +1 -1
  95. package/dist/lang/uk.umd.min.js +1 -1
  96. package/dist/lang/uz-Cyrl.umd.min.js +1 -1
  97. package/dist/lang/uz-Latn.umd.min.js +1 -1
  98. package/dist/lang/vi.umd.min.js +1 -1
  99. package/dist/lang/zh-hans.umd.min.js +1 -1
  100. package/dist/lang/zh-hant.umd.min.js +1 -1
  101. package/dist/quasar.addon.css +1 -1
  102. package/dist/quasar.addon.rtl.css +1 -1
  103. package/dist/quasar.common.js +2 -2
  104. package/dist/quasar.css +4 -7
  105. package/dist/quasar.esm.js +2 -2
  106. package/dist/quasar.ie.polyfills.js +1 -1
  107. package/dist/quasar.ie.polyfills.umd.min.js +1 -1
  108. package/dist/quasar.min.css +1 -1
  109. package/dist/quasar.rtl.css +4 -7
  110. package/dist/quasar.rtl.min.css +1 -1
  111. package/dist/quasar.sass +1 -1
  112. package/dist/quasar.styl +1 -1
  113. package/dist/quasar.umd.js +225 -136
  114. package/dist/quasar.umd.min.js +2 -2
  115. package/dist/quasar.umd.modern.js +225 -137
  116. package/dist/quasar.umd.modern.min.js +2 -2
  117. package/dist/types/index.d.ts +12 -2
  118. package/dist/web-types/web-types.json +14 -1
  119. package/package.json +1 -1
  120. package/src/components/btn-dropdown/QBtnDropdown.js +8 -2
  121. package/src/components/btn-dropdown/QBtnDropdown.json +5 -0
  122. package/src/components/expansion-item/QExpansionItem.js +1 -1
  123. package/src/components/expansion-item/QExpansionItem.json +11 -2
  124. package/src/components/field/QField.js +3 -1
  125. package/src/components/file/QFile.js +5 -0
  126. package/src/components/range/QRange.js +5 -1
  127. package/src/components/select/QSelect.js +66 -50
  128. package/src/components/slider/QSlider.js +6 -2
  129. package/src/components/uploader/QUploaderBase.js +3 -3
  130. package/src/plugins/Loading.js +133 -83
  131. package/src/plugins/Loading.json +44 -1
  132. package/src/utils/patterns.js +1 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Quasar Framework v1.19.4
2
+ * Quasar Framework v1.20.0
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.19.4";
15
+ var version = "1.20.0";
16
16
 
17
17
  /* eslint-disable no-useless-escape */
18
18
 
@@ -5699,7 +5699,10 @@
5699
5699
  click: e => {
5700
5700
  this.$emit('click', e);
5701
5701
  }
5702
- })
5702
+ }),
5703
+ scopedSlots: {
5704
+ loading: this.$scopedSlots.loading
5705
+ }
5703
5706
  }, label.concat(Arrow))
5704
5707
  }
5705
5708
 
@@ -5719,7 +5722,10 @@
5719
5722
  this.hide();
5720
5723
  this.$emit('click', e);
5721
5724
  }
5722
- })
5725
+ }),
5726
+ scopedSlots: {
5727
+ loading: this.$scopedSlots.loading
5728
+ }
5723
5729
  }, label);
5724
5730
 
5725
5731
  return h(QBtnGroup, {
@@ -8067,7 +8073,7 @@
8067
8073
  timeOrFulltime: v => /^([0-1]?\d|2[0-3]):[0-5]\d(:[0-5]\d)?$/.test(v),
8068
8074
 
8069
8075
  // -- RFC 5322 --
8070
- // -- Added in v2.6.6 --
8076
+ // -- Added in v1.18.10 --
8071
8077
  // This is a basic helper validation.
8072
8078
  // For something more complex (like RFC 822) you should write and use your own rule.
8073
8079
  // We won't be accepting PRs to enhance the one below because of the reason above.
@@ -9292,8 +9298,12 @@
9292
9298
  stopAndPrevent(evt);
9293
9299
 
9294
9300
  const
9295
- step = ([34, 33].includes(evt.keyCode) ? 10 : 1) * this.computedStep,
9296
- offset = ([ 34, 37, 40 ].includes(evt.keyCode) ? -1 : 1) * (this.isReversed === true ? -1 : 1) * step;
9301
+ stepVal = ([34, 33].includes(evt.keyCode) ? 10 : 1) * this.computedStep,
9302
+ offset = (
9303
+ ([ 34, 37, 40 ].includes(evt.keyCode) ? -1 : 1) *
9304
+ (this.isReversed === true ? -1 : 1) *
9305
+ (this.vertical === true ? -1 : 1) * stepVal
9306
+ );
9297
9307
 
9298
9308
  this.model = between(
9299
9309
  parseFloat((this.model + offset).toFixed(this.computedDecimals)),
@@ -17519,7 +17529,7 @@
17519
17529
  let child;
17520
17530
 
17521
17531
  if (this.$scopedSlots.header !== void 0) {
17522
- child = [].concat(this.$scopedSlots.header());
17532
+ child = [].concat(this.$scopedSlots.header({ expanded: this.showing === true }));
17523
17533
  }
17524
17534
  else {
17525
17535
  child = [
@@ -18389,6 +18399,7 @@
18389
18399
  floatingLabel () {
18390
18400
  return this.stackLabel === true ||
18391
18401
  this.focused === true ||
18402
+ typeof this.inputValue === 'number' ||
18392
18403
  (typeof this.inputValue === 'string' && this.inputValue.length > 0) ||
18393
18404
  (this.hideSelected !== true && this.hasValue === true) ||
18394
18405
  (
@@ -18698,7 +18709,8 @@
18698
18709
 
18699
18710
  return h('div', {
18700
18711
  staticClass: 'q-field__bottom row items-start q-field__bottom--' +
18701
- (this.hideBottomSpace !== true ? 'animated' : 'stale')
18712
+ (this.hideBottomSpace !== true ? 'animated' : 'stale'),
18713
+ on: { click: prevent }
18702
18714
  }, [
18703
18715
  this.hideBottomSpace === true
18704
18716
  ? main
@@ -19260,6 +19272,11 @@
19260
19272
 
19261
19273
  __addFiles (e, fileList) {
19262
19274
  const files = this.__processFiles(e, fileList, this.innerValue, this.isAppending);
19275
+ const fileInput = this.__getFileInput();
19276
+
19277
+ if (fileInput !== void 0) {
19278
+ fileInput.value = '';
19279
+ }
19263
19280
 
19264
19281
  // if nothing to do...
19265
19282
  if (files === void 0) { return }
@@ -24917,7 +24934,11 @@
24917
24934
 
24918
24935
  const
24919
24936
  stepVal = ([ 34, 33 ].includes(evt.keyCode) ? 10 : 1) * this.computedStep,
24920
- offset = ([ 34, 37, 40 ].includes(evt.keyCode) ? -1 : 1) * (this.isReversed === true ? -1 : 1) * stepVal;
24937
+ offset = (
24938
+ ([ 34, 37, 40 ].includes(evt.keyCode) ? -1 : 1) *
24939
+ (this.isReversed === true ? -1 : 1) *
24940
+ (this.vertical === true ? -1 : 1) * stepVal
24941
+ );
24921
24942
 
24922
24943
  if (this.focus === 'both') {
24923
24944
  const interval = this.model.max - this.model.min;
@@ -26909,20 +26930,35 @@
26909
26930
  },
26910
26931
 
26911
26932
  comboboxAttrs () {
26912
- return {
26933
+ const attrs = {
26934
+ tabindex: this.tabindex,
26913
26935
  role: 'combobox',
26914
- 'aria-multiselectable': this.multiple === true ? 'true' : 'false',
26936
+ 'aria-label': this.label,
26937
+ 'aria-autocomplete': this.useInput === true ? 'list' : 'none',
26915
26938
  'aria-expanded': this.menu === true ? 'true' : 'false',
26916
26939
  'aria-owns': `${this.targetUid}_lb`,
26917
- 'aria-activedescendant': `${this.targetUid}_${this.optionIndex}`
26940
+ 'aria-controls': `${this.targetUid}_lb`
26941
+ };
26942
+
26943
+ if (this.optionIndex >= 0) {
26944
+ attrs['aria-activedescendant'] = `${this.targetUid}_${this.optionIndex}`;
26918
26945
  }
26946
+
26947
+ return attrs
26919
26948
  },
26920
26949
 
26921
26950
  listboxAttrs () {
26922
- return {
26951
+ const attrs = {
26952
+ id: `${this.targetUid}_lb`,
26923
26953
  role: 'listbox',
26924
- id: `${this.targetUid}_lb`
26954
+ 'aria-multiselectable': this.multiple === true ? 'true' : 'false'
26955
+ };
26956
+
26957
+ if (this.optionIndex >= 0) {
26958
+ attrs['aria-activedescendant'] = `${this.targetUid}_${this.optionIndex}`;
26925
26959
  }
26960
+
26961
+ return attrs
26926
26962
  }
26927
26963
  },
26928
26964
 
@@ -27001,6 +27037,9 @@
27001
27037
  true
27002
27038
  );
27003
27039
 
27040
+ this.dialogFieldFocused = false;
27041
+ document.activeElement.blur();
27042
+
27004
27043
  this.hidePopup();
27005
27044
  }
27006
27045
 
@@ -27072,15 +27111,18 @@
27072
27111
  while (index !== -1 && index !== this.optionIndex && this.isOptionDisabled(this.options[index]) === true)
27073
27112
 
27074
27113
  if (this.optionIndex !== index) {
27075
- this.setOptionIndex(index);
27076
- this.scrollTo(index);
27114
+ cancelAnimationFrame(this.moveAnimationFrame);
27115
+ this.moveAnimationFrame = requestAnimationFrame(() => {
27116
+ this.setOptionIndex(index);
27117
+ this.scrollTo(index);
27077
27118
 
27078
- if (skipInputValue !== true && this.useInput === true && this.fillInput === true) {
27079
- this.__setInputValue(index >= 0
27080
- ? this.getOptionLabel(this.options[index])
27081
- : this.defaultInputValue
27082
- );
27083
- }
27119
+ if (skipInputValue !== true && this.useInput === true && this.fillInput === true) {
27120
+ this.__setInputValue(index >= 0
27121
+ ? this.getOptionLabel(this.options[index])
27122
+ : this.defaultInputValue
27123
+ );
27124
+ }
27125
+ });
27084
27126
  }
27085
27127
  }
27086
27128
  },
@@ -27414,7 +27456,7 @@
27414
27456
 
27415
27457
  if (this.useChips === true) {
27416
27458
  return this.selectedScope.map((scope, i) => h(QChip, {
27417
- key: 'option-' + i,
27459
+ key: 'rem#' + i,
27418
27460
  props: {
27419
27461
  removable: this.editable === true && this.isOptionDisabled(scope.opt) !== true,
27420
27462
  dense: true,
@@ -27457,14 +27499,14 @@
27457
27499
  const attrs = isTarget === true ? this.comboboxAttrs : void 0;
27458
27500
 
27459
27501
  child.push(
27460
- h('div', {
27502
+ h('input', {
27461
27503
  ref: isTarget === true ? 'target' : void 0,
27462
27504
  key: 'd_t',
27463
27505
  staticClass: 'q-select__focus-target',
27464
27506
  attrs: {
27465
27507
  id: isTarget === true ? this.targetUid : void 0,
27466
- tabindex: this.tabindex,
27467
- 'data-autofocus': (fromDialog !== true && this.autofocus) || void 0,
27508
+ readonly: true,
27509
+ 'data-autofocus': (fromDialog === true ? isTarget === true : this.autofocus) || void 0,
27468
27510
  ...attrs
27469
27511
  },
27470
27512
  on: cache(this, 'f-tget', {
@@ -27478,8 +27520,9 @@
27478
27520
  if (isTarget === true && typeof this.autocomplete === 'string' && this.autocomplete.length > 0) {
27479
27521
  child.push(
27480
27522
  h('input', {
27523
+ key: 'autoinp',
27481
27524
  staticClass: 'q-select__autocomplete-input',
27482
- attrs: { autocomplete: this.autocomplete },
27525
+ attrs: { autocomplete: this.autocomplete, tabindex: -1 },
27483
27526
  on: cache(this, 'autoinp', {
27484
27527
  keyup: this.__onTargetAutocomplete
27485
27528
  })
@@ -27514,6 +27557,12 @@
27514
27557
  return void 0
27515
27558
  }
27516
27559
 
27560
+ if (this.noOptions === true) {
27561
+ return this.$scopedSlots['no-option'] !== void 0
27562
+ ? this.$scopedSlots['no-option']({ inputValue: this.inputValue })
27563
+ : void 0
27564
+ }
27565
+
27517
27566
  if (
27518
27567
  this.$scopedSlots.option !== void 0 &&
27519
27568
  this.__optionScopeCache.optionSlot !== this.$scopedSlots.option
@@ -27583,9 +27632,8 @@
27583
27632
  ...attrs,
27584
27633
  id: isTarget === true ? this.targetUid : void 0,
27585
27634
  maxlength: this.maxlength, // this is converted to prop by QField
27586
- tabindex: this.tabindex,
27587
27635
  autocomplete: this.autocomplete,
27588
- 'data-autofocus': (fromDialog !== true && this.autofocus) || void 0,
27636
+ 'data-autofocus': (fromDialog === true ? isTarget === true : this.autofocus) || void 0,
27589
27637
  disabled: this.disable === true,
27590
27638
  readonly: this.readonly === true
27591
27639
  },
@@ -27704,6 +27752,7 @@
27704
27752
  }
27705
27753
  else {
27706
27754
  this.menu = true;
27755
+ this.hasDialog === true && (this.dialog = true);
27707
27756
  }
27708
27757
  }
27709
27758
 
@@ -27742,15 +27791,13 @@
27742
27791
  focusout(e);
27743
27792
  },
27744
27793
  click: e => {
27745
- if (this.hasDialog !== true) {
27746
- // label from QField will propagate click on the input (except IE)
27747
- prevent(e);
27794
+ // label from QField will propagate click on the input (except IE)
27795
+ prevent(e);
27748
27796
 
27749
- if (this.menu === true) {
27750
- this.__closeMenu();
27751
- this.$refs.target !== void 0 && this.$refs.target.focus();
27752
- return
27753
- }
27797
+ if (this.hasDialog !== true && this.menu === true) {
27798
+ this.__closeMenu();
27799
+ this.$refs.target !== void 0 && this.$refs.target.focus();
27800
+ return
27754
27801
  }
27755
27802
 
27756
27803
  this.showPopup(e);
@@ -27771,15 +27818,8 @@
27771
27818
  },
27772
27819
 
27773
27820
  __getMenu (h) {
27774
- const child = this.noOptions === true
27775
- ? (
27776
- this.$scopedSlots['no-option'] !== void 0
27777
- ? this.$scopedSlots['no-option']({ inputValue: this.inputValue })
27778
- : null
27779
- )
27780
- : this.__getOptions(h);
27781
-
27782
27821
  return h(QMenu, {
27822
+ key: 'menu',
27783
27823
  ref: 'menu',
27784
27824
  props: {
27785
27825
  value: this.menu,
@@ -27805,7 +27845,7 @@
27805
27845
  'before-hide': this.__closeMenu,
27806
27846
  show: this.__onMenuShow
27807
27847
  })
27808
- }, child)
27848
+ }, this.__getOptions(h))
27809
27849
  },
27810
27850
 
27811
27851
  __onMenuShow () {
@@ -27856,8 +27896,9 @@
27856
27896
 
27857
27897
  this.menu === true && content.push(
27858
27898
  h('div', {
27899
+ key: 'virtMenu',
27859
27900
  ref: 'menuContent',
27860
- staticClass: 'scroll',
27901
+ staticClass: 'col scroll',
27861
27902
  class: this.menuContentClass,
27862
27903
  style: this.popupContentStyle,
27863
27904
  attrs: this.listboxAttrs,
@@ -27865,18 +27906,11 @@
27865
27906
  click: prevent,
27866
27907
  '&scroll': this.__onVirtualScrollEvt
27867
27908
  })
27868
- }, (
27869
- this.noOptions === true
27870
- ? (
27871
- this.$scopedSlots['no-option'] !== void 0
27872
- ? this.$scopedSlots['no-option']({ inputValue: this.inputValue })
27873
- : null
27874
- )
27875
- : this.__getOptions(h)
27876
- ))
27909
+ }, this.__getOptions(h))
27877
27910
  );
27878
27911
 
27879
27912
  return h(QDialog, {
27913
+ key: 'dialog',
27880
27914
  ref: 'dialog',
27881
27915
  props: {
27882
27916
  value: this.dialog,
@@ -27900,13 +27934,17 @@
27900
27934
  },
27901
27935
 
27902
27936
  __onDialogBeforeHide () {
27903
- if (client.is.mobile !== true) {
27937
+ if (this.useInput !== true || this.$q.platform.is.desktop === true) {
27904
27938
  this.$refs.dialog.__refocusTarget = this.$el.querySelector('.q-field__native > [tabindex]:last-child');
27905
27939
  }
27906
27940
  this.focused = false;
27941
+ this.dialogFieldFocused = false;
27907
27942
  },
27908
27943
 
27909
27944
  __onDialogHide (e) {
27945
+ if (this.$q.platform.is.desktop !== true) {
27946
+ document.activeElement.blur();
27947
+ }
27910
27948
  this.hidePopup();
27911
27949
  this.focused === false && this.$emit('blur', e);
27912
27950
  this.__resetInputValue();
@@ -35359,14 +35397,14 @@
35359
35397
 
35360
35398
  __addFiles (e, fileList) {
35361
35399
  const localFiles = this.__processFiles(e, fileList, this.files, true);
35362
-
35363
- if (localFiles === void 0) { return }
35364
-
35365
35400
  const fileInput = this.__getFileInput();
35401
+
35366
35402
  if (fileInput !== void 0) {
35367
35403
  fileInput.value = '';
35368
35404
  }
35369
35405
 
35406
+ if (localFiles === void 0) { return }
35407
+
35370
35408
  localFiles.forEach(file => {
35371
35409
  this.__updateFile(file, 'idle');
35372
35410
  this.uploadSize += file.size;
@@ -39127,19 +39165,35 @@
39127
39165
  vm,
39128
39166
  uid$3 = 0,
39129
39167
  timeout,
39130
- props$1 = {};
39131
- const
39132
- originalDefaults = {
39133
- delay: 0,
39134
- message: false,
39135
- spinnerSize: 80,
39136
- spinnerColor: 'white',
39137
- messageColor: 'white',
39138
- backgroundColor: 'black',
39139
- spinner: QSpinner,
39140
- customClass: ''
39141
- },
39142
- defaults = { ...originalDefaults };
39168
+ props$1 = {},
39169
+ activeGroups = {};
39170
+
39171
+ const originalDefaults = {
39172
+ group: '__default_quasar_group__',
39173
+ delay: 0,
39174
+ message: false,
39175
+ spinnerSize: 80,
39176
+ spinnerColor: 'white',
39177
+ messageColor: 'white',
39178
+ backgroundColor: 'black',
39179
+ spinner: QSpinner,
39180
+ customClass: ''
39181
+ };
39182
+
39183
+ const defaults = { ...originalDefaults };
39184
+
39185
+ function registerProps (opts) {
39186
+ if (opts && opts.group !== void 0 && activeGroups[ opts.group ] !== void 0) {
39187
+ return Object.assign(activeGroups[ opts.group ], opts)
39188
+ }
39189
+
39190
+ const newProps = isObject(opts) === true && opts.ignoreDefaults === true
39191
+ ? { ...originalDefaults, ...opts }
39192
+ : { ...defaults, ...opts };
39193
+
39194
+ activeGroups[ newProps.group ] = newProps;
39195
+ return newProps
39196
+ }
39143
39197
 
39144
39198
  const Loading = {
39145
39199
  isActive: false,
@@ -39147,9 +39201,8 @@
39147
39201
  show (opts) {
39148
39202
  if (isSSR === true) { return }
39149
39203
 
39150
- props$1 = isObject(opts) === true && opts.ignoreDefaults === true
39151
- ? { ...originalDefaults, ...opts }
39152
- : { ...defaults, ...opts };
39204
+ props$1 = registerProps(opts);
39205
+ const { group } = props$1;
39153
39206
 
39154
39207
  props$1.customClass += ` text-${props$1.backgroundColor}`;
39155
39208
 
@@ -39158,81 +39211,116 @@
39158
39211
  if (vm !== void 0) {
39159
39212
  props$1.uid = uid$3;
39160
39213
  vm.$forceUpdate();
39161
- return
39162
39214
  }
39215
+ else {
39216
+ props$1.uid = ++uid$3;
39217
+ clearTimeout(timeout);
39163
39218
 
39164
- props$1.uid = ++uid$3;
39165
- clearTimeout(timeout);
39219
+ timeout = setTimeout(() => {
39220
+ timeout = void 0;
39166
39221
 
39167
- timeout = setTimeout(() => {
39168
- timeout = void 0;
39222
+ const node = document.createElement('div');
39223
+ document.body.appendChild(node);
39169
39224
 
39170
- const node = document.createElement('div');
39171
- document.body.appendChild(node);
39225
+ vm = new Vue({
39226
+ name: 'QLoading',
39172
39227
 
39173
- vm = new Vue({
39174
- name: 'QLoading',
39228
+ // hide App from Vue devtools
39229
+ devtools: { hide: true },
39175
39230
 
39176
- // hide App from Vue devtools
39177
- devtools: { hide: true },
39178
-
39179
- beforeCreate () {
39180
- // prevent error in Vue devtools
39181
- this._routerRoot === void 0 && (this._routerRoot = {});
39182
- },
39231
+ beforeCreate () {
39232
+ // prevent error in Vue devtools
39233
+ this._routerRoot === void 0 && (this._routerRoot = {});
39234
+ },
39183
39235
 
39184
- el: node,
39236
+ el: node,
39185
39237
 
39186
- mounted () {
39187
- preventScroll(true);
39188
- },
39238
+ mounted () {
39239
+ preventScroll(true);
39240
+ },
39189
39241
 
39190
- render: (h) => {
39191
- return h('transition', {
39192
- props: {
39193
- name: 'q-transition--fade',
39194
- appear: true
39195
- },
39196
- on: cache(this, 'tr', {
39197
- 'after-leave': () => {
39198
- // might be called to finalize
39199
- // previous leave, even if it was cancelled
39200
- if (this.isActive !== true && vm !== void 0) {
39201
- preventScroll(false);
39202
- vm.$destroy();
39203
- vm.$el.remove();
39204
- vm = void 0;
39242
+ render: (h) => {
39243
+ return h('transition', {
39244
+ props: {
39245
+ name: 'q-transition--fade',
39246
+ appear: true
39247
+ },
39248
+ on: cache(this, 'tr', {
39249
+ 'after-leave': () => {
39250
+ // might be called to finalize
39251
+ // previous leave, even if it was cancelled
39252
+ if (this.isActive !== true && vm !== void 0) {
39253
+ preventScroll(false);
39254
+ vm.$destroy();
39255
+ vm.$el.remove();
39256
+ vm = void 0;
39257
+ }
39205
39258
  }
39206
- }
39207
- })
39208
- }, [
39209
- this.isActive === true ? h('div', {
39210
- staticClass: 'q-loading fullscreen column flex-center z-max',
39211
- key: props$1.uid,
39212
- class: props$1.customClass.trim()
39259
+ })
39213
39260
  }, [
39214
- h(props$1.spinner, {
39215
- props: {
39216
- color: props$1.spinnerColor,
39217
- size: props$1.spinnerSize
39218
- }
39219
- }),
39261
+ this.isActive === true ? h('div', {
39262
+ staticClass: 'q-loading fullscreen column flex-center z-max',
39263
+ key: props$1.uid,
39264
+ class: props$1.customClass.trim()
39265
+ }, [
39266
+ h(props$1.spinner, {
39267
+ props: {
39268
+ color: props$1.spinnerColor,
39269
+ size: props$1.spinnerSize
39270
+ }
39271
+ }),
39220
39272
 
39221
- (props$1.message && h('div', {
39222
- class: `text-${props$1.messageColor}`,
39223
- domProps: {
39224
- [props$1.sanitize === true ? 'textContent' : 'innerHTML']: props$1.message
39225
- }
39226
- })) || void 0
39227
- ]) : null
39228
- ])
39229
- }
39230
- });
39231
- }, props$1.delay);
39273
+ (props$1.message && h('div', {
39274
+ class: `text-${props$1.messageColor}`,
39275
+ domProps: {
39276
+ [props$1.sanitize === true ? 'textContent' : 'innerHTML']: props$1.message
39277
+ }
39278
+ })) || void 0
39279
+ ]) : null
39280
+ ])
39281
+ }
39282
+ });
39283
+ }, props$1.delay);
39284
+ }
39285
+
39286
+ return paramProps => {
39287
+ // if we don't have params (or not an Object param) then we need to hide this group
39288
+ if (paramProps === void 0 || Object(paramProps) !== paramProps) {
39289
+ this.hide(group);
39290
+ return
39291
+ }
39292
+
39293
+ // else we have params so we need to update this group
39294
+ this.show({ ...paramProps, group });
39295
+ }
39232
39296
  },
39233
39297
 
39234
- hide () {
39298
+ hide (group) {
39235
39299
  if (this.isActive === true) {
39300
+ if (group === void 0) {
39301
+ // clear out any active groups
39302
+ activeGroups = {};
39303
+ }
39304
+ else if (activeGroups[ group ] === void 0) {
39305
+ // we've already hidden it so nothing to do
39306
+ return
39307
+ }
39308
+ else {
39309
+ // remove active group
39310
+ delete activeGroups[ group ];
39311
+
39312
+ const keys = Object.keys(activeGroups);
39313
+
39314
+ // if there are other groups registered then
39315
+ // show last registered one since that one is still active
39316
+ if (keys.length !== 0) {
39317
+ // get last registered group
39318
+ const lastGroup = keys[ keys.length - 1 ];
39319
+ this.show({ group: lastGroup });
39320
+ return
39321
+ }
39322
+ }
39323
+
39236
39324
  if (timeout !== void 0) {
39237
39325
  clearTimeout(timeout);
39238
39326
  timeout = void 0;