quasar 1.20.1 → 1.20.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 (202) hide show
  1. package/dist/api/QBtnDropdown.json +9 -0
  2. package/dist/api/QChip.json +9 -0
  3. package/dist/api/QCircularProgress.json +6 -0
  4. package/dist/api/QExpansionItem.json +59 -0
  5. package/dist/api/QTable.json +2 -2
  6. package/dist/babel-transforms/imports.js +1 -0
  7. package/dist/icon-set/bootstrap-icons.umd.min.js +1 -1
  8. package/dist/icon-set/eva-icons.umd.min.js +1 -1
  9. package/dist/icon-set/fontawesome-v5-pro.umd.min.js +1 -1
  10. package/dist/icon-set/fontawesome-v5.umd.min.js +1 -1
  11. package/dist/icon-set/fontawesome-v6-pro.umd.min.js +1 -1
  12. package/dist/icon-set/fontawesome-v6.umd.min.js +1 -1
  13. package/dist/icon-set/ionicons-v4.umd.min.js +1 -1
  14. package/dist/icon-set/line-awesome.umd.min.js +1 -1
  15. package/dist/icon-set/material-icons-outlined.umd.min.js +1 -1
  16. package/dist/icon-set/material-icons-round.umd.min.js +1 -1
  17. package/dist/icon-set/material-icons-sharp.umd.min.js +1 -1
  18. package/dist/icon-set/material-icons.umd.min.js +1 -1
  19. package/dist/icon-set/material-symbols-outlined.umd.min.js +1 -1
  20. package/dist/icon-set/material-symbols-rounded.umd.min.js +1 -1
  21. package/dist/icon-set/material-symbols-sharp.umd.min.js +1 -1
  22. package/dist/icon-set/mdi-v3.umd.min.js +1 -1
  23. package/dist/icon-set/mdi-v4.umd.min.js +1 -1
  24. package/dist/icon-set/mdi-v5.umd.min.js +1 -1
  25. package/dist/icon-set/mdi-v6.umd.min.js +1 -1
  26. package/dist/icon-set/svg-bootstrap-icons.umd.min.js +1 -1
  27. package/dist/icon-set/svg-eva-icons.umd.min.js +1 -1
  28. package/dist/icon-set/svg-fontawesome-v5.umd.min.js +1 -1
  29. package/dist/icon-set/svg-fontawesome-v6.umd.min.js +1 -1
  30. package/dist/icon-set/svg-ionicons-v4.umd.min.js +1 -1
  31. package/dist/icon-set/svg-ionicons-v5.umd.min.js +1 -1
  32. package/dist/icon-set/svg-ionicons-v6.umd.min.js +1 -1
  33. package/dist/icon-set/svg-line-awesome.umd.min.js +1 -1
  34. package/dist/icon-set/svg-material-icons-outlined.umd.min.js +1 -1
  35. package/dist/icon-set/svg-material-icons-round.umd.min.js +1 -1
  36. package/dist/icon-set/svg-material-icons-sharp.umd.min.js +1 -1
  37. package/dist/icon-set/svg-material-icons.umd.min.js +1 -1
  38. package/dist/icon-set/svg-material-symbols-outlined.umd.min.js +1 -1
  39. package/dist/icon-set/svg-material-symbols-rounded.umd.min.js +1 -1
  40. package/dist/icon-set/svg-material-symbols-sharp.umd.min.js +1 -1
  41. package/dist/icon-set/svg-mdi-v4.umd.min.js +1 -1
  42. package/dist/icon-set/svg-mdi-v5.umd.min.js +1 -1
  43. package/dist/icon-set/svg-mdi-v6.umd.min.js +1 -1
  44. package/dist/icon-set/svg-themify.umd.min.js +1 -1
  45. package/dist/icon-set/themify.umd.min.js +1 -1
  46. package/dist/lang/ar.umd.min.js +2 -2
  47. package/dist/lang/az-latn.umd.min.js +2 -2
  48. package/dist/lang/bg.umd.min.js +2 -2
  49. package/dist/lang/ca.umd.min.js +2 -2
  50. package/dist/lang/cs.umd.min.js +2 -2
  51. package/dist/lang/da.umd.min.js +2 -2
  52. package/dist/lang/de.umd.min.js +2 -2
  53. package/dist/lang/el.umd.min.js +2 -2
  54. package/dist/lang/en-gb.umd.min.js +2 -2
  55. package/dist/lang/en-us.umd.min.js +2 -2
  56. package/dist/lang/eo.umd.min.js +2 -2
  57. package/dist/lang/es.umd.min.js +2 -2
  58. package/dist/lang/et.umd.min.js +2 -2
  59. package/dist/lang/eu.umd.min.js +2 -2
  60. package/dist/lang/fa-ir.umd.min.js +2 -2
  61. package/dist/lang/fa.umd.min.js +2 -2
  62. package/dist/lang/fi.umd.min.js +2 -2
  63. package/dist/lang/fr.umd.min.js +2 -2
  64. package/dist/lang/gn.umd.min.js +2 -2
  65. package/dist/lang/he.umd.min.js +2 -2
  66. package/dist/lang/hr.umd.min.js +2 -2
  67. package/dist/lang/hu.umd.min.js +2 -2
  68. package/dist/lang/id.umd.min.js +2 -2
  69. package/dist/lang/is.umd.min.js +2 -2
  70. package/dist/lang/it.umd.min.js +2 -2
  71. package/dist/lang/ja.umd.min.js +2 -2
  72. package/dist/lang/km.umd.min.js +2 -2
  73. package/dist/lang/ko-kr.umd.min.js +2 -2
  74. package/dist/lang/kur-ckb.umd.min.js +2 -2
  75. package/dist/lang/kz.umd.min.js +2 -2
  76. package/dist/lang/lu.umd.min.js +2 -2
  77. package/dist/lang/lv.umd.min.js +2 -2
  78. package/dist/lang/ml.umd.min.js +2 -2
  79. package/dist/lang/mm.umd.min.js +2 -2
  80. package/dist/lang/ms.umd.min.js +2 -2
  81. package/dist/lang/my.umd.min.js +2 -2
  82. package/dist/lang/nb-no.umd.min.js +2 -2
  83. package/dist/lang/nl.umd.min.js +2 -2
  84. package/dist/lang/pl.umd.min.js +2 -2
  85. package/dist/lang/pt-br.umd.min.js +2 -2
  86. package/dist/lang/pt.umd.min.js +2 -2
  87. package/dist/lang/ro.umd.min.js +2 -2
  88. package/dist/lang/ru.umd.min.js +2 -2
  89. package/dist/lang/sk.umd.min.js +2 -2
  90. package/dist/lang/sl.umd.min.js +2 -2
  91. package/dist/lang/sm.umd.min.js +2 -2
  92. package/dist/lang/sr.umd.min.js +2 -2
  93. package/dist/lang/sv.umd.min.js +2 -2
  94. package/dist/lang/ta.umd.min.js +2 -2
  95. package/dist/lang/th.umd.min.js +2 -2
  96. package/dist/lang/tr.umd.min.js +2 -2
  97. package/dist/lang/ug.umd.min.js +2 -2
  98. package/dist/lang/uk.umd.min.js +2 -2
  99. package/dist/lang/uz-Cyrl.umd.min.js +2 -2
  100. package/dist/lang/uz-Latn.umd.min.js +2 -2
  101. package/dist/lang/vi.umd.min.js +2 -2
  102. package/dist/lang/zh-hans.umd.min.js +2 -2
  103. package/dist/lang/zh-hant.umd.min.js +2 -2
  104. package/dist/quasar.addon.css +1 -1
  105. package/dist/quasar.addon.rtl.css +1 -1
  106. package/dist/quasar.common.js +2 -2
  107. package/dist/quasar.css +1 -1
  108. package/dist/quasar.esm.js +2 -2
  109. package/dist/quasar.ie.polyfills.js +1 -1
  110. package/dist/quasar.ie.polyfills.umd.min.js +1 -1
  111. package/dist/quasar.rtl.css +1 -1
  112. package/dist/quasar.sass +1 -1
  113. package/dist/quasar.styl +1 -1
  114. package/dist/quasar.umd.js +360 -160
  115. package/dist/quasar.umd.min.js +2 -2
  116. package/dist/quasar.umd.modern.js +349 -153
  117. package/dist/quasar.umd.modern.min.js +2 -2
  118. package/dist/types/index.d.ts +21 -1
  119. package/dist/types/utils/is.d.ts +67 -0
  120. package/dist/types/utils/run-sequential-promises.d.ts +119 -0
  121. package/dist/types/utils.d.ts +2 -0
  122. package/dist/vetur/quasar-attributes.json +21 -1
  123. package/dist/vetur/quasar-tags.json +6 -1
  124. package/dist/web-types/web-types.json +73 -2
  125. package/lang/ar.js +3 -1
  126. package/lang/az-latn.js +3 -1
  127. package/lang/bg.js +3 -1
  128. package/lang/ca.js +3 -1
  129. package/lang/cs.js +3 -1
  130. package/lang/da.js +3 -1
  131. package/lang/de.js +3 -1
  132. package/lang/el.js +3 -1
  133. package/lang/en-gb.js +3 -1
  134. package/lang/en-us.js +3 -1
  135. package/lang/eo.js +3 -1
  136. package/lang/es.js +3 -1
  137. package/lang/et.js +3 -1
  138. package/lang/eu.js +3 -1
  139. package/lang/fa-ir.js +3 -1
  140. package/lang/fa.js +3 -1
  141. package/lang/fi.js +3 -1
  142. package/lang/fr.js +3 -1
  143. package/lang/gn.js +3 -1
  144. package/lang/he.js +3 -1
  145. package/lang/hr.js +3 -1
  146. package/lang/hu.js +3 -1
  147. package/lang/id.js +3 -1
  148. package/lang/is.js +3 -1
  149. package/lang/it.js +3 -1
  150. package/lang/ja.js +3 -1
  151. package/lang/km.js +3 -1
  152. package/lang/ko-kr.js +3 -1
  153. package/lang/kur-ckb.js +3 -1
  154. package/lang/kz.js +3 -1
  155. package/lang/lu.js +3 -1
  156. package/lang/lv.js +3 -1
  157. package/lang/ml.js +3 -1
  158. package/lang/mm.js +3 -1
  159. package/lang/ms.js +3 -1
  160. package/lang/my.js +3 -1
  161. package/lang/nb-no.js +3 -1
  162. package/lang/nl.js +3 -1
  163. package/lang/pl.js +3 -1
  164. package/lang/pt-br.js +3 -1
  165. package/lang/pt.js +3 -1
  166. package/lang/ro.js +3 -1
  167. package/lang/ru.js +3 -1
  168. package/lang/sk.js +3 -1
  169. package/lang/sl.js +3 -1
  170. package/lang/sm.js +3 -1
  171. package/lang/sr.js +3 -1
  172. package/lang/sv.js +3 -1
  173. package/lang/ta.js +3 -1
  174. package/lang/th.js +3 -1
  175. package/lang/tr.js +3 -1
  176. package/lang/ug.js +3 -1
  177. package/lang/uk.js +3 -1
  178. package/lang/uz-Cyrl.js +3 -1
  179. package/lang/uz-Latn.js +3 -1
  180. package/lang/vi.js +3 -1
  181. package/lang/zh-hans.js +3 -1
  182. package/lang/zh-hant.js +3 -1
  183. package/package.json +1 -1
  184. package/src/components/btn-dropdown/QBtnDropdown.js +17 -4
  185. package/src/components/btn-dropdown/QBtnDropdown.json +8 -0
  186. package/src/components/chip/QChip.js +8 -1
  187. package/src/components/chip/QChip.json +8 -0
  188. package/src/components/circular-progress/QCircularProgress.js +5 -2
  189. package/src/components/circular-progress/QCircularProgress.json +7 -0
  190. package/src/components/dialog/QDialog.js +7 -1
  191. package/src/components/expansion-item/QExpansionItem.js +38 -3
  192. package/src/components/expansion-item/QExpansionItem.json +67 -0
  193. package/src/components/fab/QFab.js +24 -1
  194. package/src/components/form/QForm.js +43 -49
  195. package/src/components/menu/QMenu.js +1 -0
  196. package/src/components/select/QSelect.js +1 -4
  197. package/src/components/table/QTable.js +1 -1
  198. package/src/components/table/QTable.json +2 -2
  199. package/src/mixins/file.js +1 -1
  200. package/src/mixins/validate.js +5 -3
  201. package/src/utils/run-sequential-promises.js +115 -0
  202. package/src/utils.js +2 -0
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Quasar Framework v1.20.1
2
+ * Quasar Framework v1.20.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.20.1";
15
+ var version = "1.20.2";
16
16
 
17
17
  /* eslint-disable no-useless-escape */
18
18
 
@@ -980,7 +980,9 @@
980
980
  create: 'Create',
981
981
  search: 'Search',
982
982
  filter: 'Filter',
983
- refresh: 'Refresh'
983
+ refresh: 'Refresh',
984
+ expand: function (label) { return label ? `Expand "${label}"` : 'Expand' },
985
+ collapse: function (label) { return label ? `Collapse "${label}"` : 'Collapse' }
984
986
  },
985
987
  date: {
986
988
  days: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
@@ -5340,6 +5342,7 @@
5340
5342
  attrs () {
5341
5343
  return {
5342
5344
  tabindex: -1,
5345
+ role: 'menu',
5343
5346
  ...this.qAttrs
5344
5347
  }
5345
5348
  }
@@ -5567,6 +5570,79 @@
5567
5570
  }
5568
5571
  });
5569
5572
 
5573
+ /**
5574
+ * Based on the work of https://github.com/jchook/uuid-random
5575
+ */
5576
+
5577
+ let
5578
+ buf,
5579
+ bufIdx = 0;
5580
+ const hexBytes = new Array(256);
5581
+
5582
+ // Pre-calculate toString(16) for speed
5583
+ for (let i = 0; i < 256; i++) {
5584
+ hexBytes[i] = (i + 0x100).toString(16).substr(1);
5585
+ }
5586
+
5587
+ // Use best available PRNG
5588
+ const randomBytes = (() => {
5589
+ // Node & Browser support
5590
+ const lib = typeof crypto !== 'undefined'
5591
+ ? crypto
5592
+ : (
5593
+ typeof window !== 'undefined'
5594
+ ? window.msCrypto // IE11
5595
+ : void 0
5596
+ );
5597
+
5598
+ if (lib !== void 0) {
5599
+ if (lib.randomBytes !== void 0) {
5600
+ return lib.randomBytes
5601
+ }
5602
+ if (lib.getRandomValues !== void 0) {
5603
+ return n => {
5604
+ var bytes = new Uint8Array(n);
5605
+ lib.getRandomValues(bytes);
5606
+ return bytes
5607
+ }
5608
+ }
5609
+ }
5610
+
5611
+ return n => {
5612
+ const r = [];
5613
+ for (let i = n; i > 0; i--) {
5614
+ r.push(Math.floor(Math.random() * 256));
5615
+ }
5616
+ return r
5617
+ }
5618
+ })();
5619
+
5620
+ // Buffer random numbers for speed
5621
+ // Reduce memory usage by decreasing this number (min 16)
5622
+ // or improve speed by increasing this number (try 16384)
5623
+ const BUFFER_SIZE = 4096;
5624
+
5625
+ function uid () {
5626
+ // Buffer some random bytes for speed
5627
+ if (buf === void 0 || (bufIdx + 16 > BUFFER_SIZE)) {
5628
+ bufIdx = 0;
5629
+ buf = randomBytes(BUFFER_SIZE);
5630
+ }
5631
+
5632
+ const b = Array.prototype.slice.call(buf, bufIdx, (bufIdx += 16));
5633
+ b[6] = (b[6] & 0x0f) | 0x40;
5634
+ b[8] = (b[8] & 0x3f) | 0x80;
5635
+
5636
+ return hexBytes[b[0]] + hexBytes[b[1]] +
5637
+ hexBytes[b[2]] + hexBytes[b[3]] + '-' +
5638
+ hexBytes[b[4]] + hexBytes[b[5]] + '-' +
5639
+ hexBytes[b[6]] + hexBytes[b[7]] + '-' +
5640
+ hexBytes[b[8]] + hexBytes[b[9]] + '-' +
5641
+ hexBytes[b[10]] + hexBytes[b[11]] +
5642
+ hexBytes[b[12]] + hexBytes[b[13]] +
5643
+ hexBytes[b[14]] + hexBytes[b[15]]
5644
+ }
5645
+
5570
5646
  var QBtnDropdown = Vue.extend({
5571
5647
  name: 'QBtnDropdown',
5572
5648
 
@@ -5600,7 +5676,9 @@
5600
5676
  disableMainBtn: Boolean,
5601
5677
  disableDropdown: Boolean,
5602
5678
 
5603
- noIconAnimation: Boolean
5679
+ noIconAnimation: Boolean,
5680
+
5681
+ toggleAriaLabel: String
5604
5682
  },
5605
5683
 
5606
5684
  data () {
@@ -5623,7 +5701,10 @@
5623
5701
  const label = slot(this, 'label', []);
5624
5702
  const attrs = {
5625
5703
  'aria-expanded': this.showing === true ? 'true' : 'false',
5626
- 'aria-haspopup': 'true'
5704
+ 'aria-haspopup': 'true',
5705
+ 'aria-controls': this.targetUid,
5706
+ 'aria-owns': this.targetUid,
5707
+ 'aria-label': this.toggleAriaLabel || this.$q.lang.label[ this.showing === true ? 'collapse' : 'expand' ](this.label)
5627
5708
  };
5628
5709
 
5629
5710
  if (
@@ -5648,6 +5729,9 @@
5648
5729
  this.disableDropdown !== true && Arrow.push(
5649
5730
  h(QMenu, {
5650
5731
  ref: 'menu',
5732
+ attrs: {
5733
+ id: this.targetUid
5734
+ },
5651
5735
  props: {
5652
5736
  cover: this.cover,
5653
5737
  fit: true,
@@ -5692,8 +5776,8 @@
5692
5776
  round: false
5693
5777
  },
5694
5778
  attrs: {
5695
- ...this.qAttrs,
5696
- ...attrs
5779
+ ...attrs,
5780
+ ...this.qAttrs
5697
5781
  },
5698
5782
  on: cache(this, 'nonSpl', {
5699
5783
  click: e => {
@@ -5775,6 +5859,10 @@
5775
5859
  }
5776
5860
  },
5777
5861
 
5862
+ created () {
5863
+ this.targetUid = `d_${uid()}`;
5864
+ },
5865
+
5778
5866
  mounted () {
5779
5867
  this.value === true && this.show();
5780
5868
  }
@@ -7745,6 +7833,8 @@
7745
7833
  clickable: Boolean,
7746
7834
  removable: Boolean,
7747
7835
 
7836
+ removeAriaLabel: String,
7837
+
7748
7838
  tabindex: [String, Number],
7749
7839
  disable: Boolean
7750
7840
  },
@@ -7789,7 +7879,12 @@
7789
7879
  attrs () {
7790
7880
  return this.disable === true
7791
7881
  ? { tabindex: -1, 'aria-disabled': 'true' }
7792
- : { tabindex: this.tabindex || 0 }
7882
+ : {
7883
+ tabindex: this.tabindex || 0,
7884
+ role: 'button',
7885
+ 'aria-hidden': 'false',
7886
+ 'aria-label': this.removeAriaLabel || this.$q.lang.label.remove
7887
+ }
7793
7888
  }
7794
7889
  },
7795
7890
 
@@ -7914,6 +8009,7 @@
7914
8009
  trackColor: String,
7915
8010
 
7916
8011
  fontSize: String,
8012
+ rounded: Boolean,
7917
8013
 
7918
8014
  // ratio
7919
8015
  thickness: {
@@ -7983,7 +8079,7 @@
7983
8079
  },
7984
8080
 
7985
8081
  methods: {
7986
- __getCircle (h, { thickness, offset, color, cls }) {
8082
+ __getCircle (h, { thickness, offset, color, cls, rounded }) {
7987
8083
  return h('circle', {
7988
8084
  staticClass: 'q-circular-progress__' + cls,
7989
8085
  class: color !== void 0 ? `text-${color}` : null,
@@ -7994,6 +8090,7 @@
7994
8090
  'stroke-width': thickness,
7995
8091
  'stroke-dasharray': strokeDashArray,
7996
8092
  'stroke-dashoffset': offset,
8093
+ 'stroke-linecap': rounded,
7997
8094
  cx: this.viewBox,
7998
8095
  cy: this.viewBox,
7999
8096
  r: radius
@@ -8032,7 +8129,8 @@
8032
8129
  cls: 'circle',
8033
8130
  thickness: this.strokeWidth,
8034
8131
  offset: this.strokeDashOffset,
8035
- color: this.color
8132
+ color: this.color,
8133
+ rounded: this.rounded === true ? 'round' : void 0
8036
8134
  })
8037
8135
  );
8038
8136
 
@@ -8233,7 +8331,7 @@
8233
8331
  }
8234
8332
  }
8235
8333
 
8236
- let uid = 0;
8334
+ let uid$1 = 0;
8237
8335
 
8238
8336
  var TouchPan = {
8239
8337
  name: 'touch-pan',
@@ -8260,7 +8358,7 @@
8260
8358
  }
8261
8359
 
8262
8360
  const ctx = {
8263
- uid: 'qvtp_' + (uid++),
8361
+ uid: 'qvtp_' + (uid$1++),
8264
8362
  handler: value,
8265
8363
  modifiers,
8266
8364
  direction: getModifierDirections(modifiers),
@@ -10156,7 +10254,7 @@
10156
10254
  }
10157
10255
  });
10158
10256
 
10159
- let uid$1 = 0;
10257
+ let uid$2 = 0;
10160
10258
 
10161
10259
  var QTab = Vue.extend({
10162
10260
  name: 'QTab',
@@ -10183,7 +10281,7 @@
10183
10281
 
10184
10282
  name: {
10185
10283
  type: [Number, String],
10186
- default: () => `t_${uid$1++}`
10284
+ default: () => `t_${uid$2++}`
10187
10285
  },
10188
10286
 
10189
10287
  noCaps: Boolean,
@@ -14501,6 +14599,12 @@
14501
14599
  }
14502
14600
 
14503
14601
  return on
14602
+ },
14603
+
14604
+ attrs () {
14605
+ return this.useBackdrop === true
14606
+ ? { 'aria-modal': 'true', ...this.qAttrs }
14607
+ : this.qAttrs
14504
14608
  }
14505
14609
  },
14506
14610
 
@@ -14694,7 +14798,7 @@
14694
14798
  staticClass: `q-dialog fullscreen no-pointer-events q-dialog--${this.useBackdrop === true ? 'modal' : 'seamless'}`,
14695
14799
  class: this.contentClass,
14696
14800
  style: this.contentStyle,
14697
- attrs: this.qAttrs
14801
+ attrs: this.attrs
14698
14802
  }, [
14699
14803
  h('transition', {
14700
14804
  props: { name: 'q-transition--fade' }
@@ -17399,6 +17503,7 @@
17399
17503
 
17400
17504
  dense: Boolean,
17401
17505
 
17506
+ toggleAriaLabel: String,
17402
17507
  expandIcon: String,
17403
17508
  expandedIcon: String,
17404
17509
  expandIconClass: [ Array, String, Object ],
@@ -17409,6 +17514,7 @@
17409
17514
 
17410
17515
  expandSeparator: Boolean,
17411
17516
  defaultOpened: Boolean,
17517
+ hideExpandIcon: Boolean,
17412
17518
  expandIconToggle: Boolean,
17413
17519
  switchToggleSide: Boolean,
17414
17520
  denseToggle: Boolean,
@@ -17469,6 +17575,30 @@
17469
17575
 
17470
17576
  activeToggleIcon () {
17471
17577
  return this.disable !== true && (this.hasLink === true || this.expandIconToggle === true)
17578
+ },
17579
+
17580
+ headerSlotScope () {
17581
+ return {
17582
+ expanded: this.showing === true,
17583
+ detailsId: this.targetUid,
17584
+ toggle: this.toggle,
17585
+ show: this.show,
17586
+ hide: this.hide
17587
+ }
17588
+ },
17589
+
17590
+ toggleAriaAttrs () {
17591
+ const toggleAriaLabel = this.toggleAriaLabel !== void 0
17592
+ ? this.toggleAriaLabel
17593
+ : this.$q.lang.label[ this.showing === true ? 'collapse' : 'expand' ](this.label);
17594
+
17595
+ return {
17596
+ role: 'button',
17597
+ 'aria-expanded': this.showing === true ? 'true' : 'false',
17598
+ 'aria-owns': this.targetUid,
17599
+ 'aria-controls': this.targetUid,
17600
+ 'aria-label': toggleAriaLabel
17601
+ }
17472
17602
  }
17473
17603
  },
17474
17604
 
@@ -17514,7 +17644,10 @@
17514
17644
 
17515
17645
  if (this.activeToggleIcon === true) {
17516
17646
  Object.assign(data, {
17517
- attrs: { tabindex: 0 },
17647
+ attrs: {
17648
+ tabindex: 0,
17649
+ ...this.toggleAriaAttrs
17650
+ },
17518
17651
  on: cache(this, 'inpExt', {
17519
17652
  click: this.__toggleIcon,
17520
17653
  keyup: this.__toggleIconKeyboard
@@ -17537,7 +17670,7 @@
17537
17670
  let child;
17538
17671
 
17539
17672
  if (this.$scopedSlots.header !== void 0) {
17540
- child = [].concat(this.$scopedSlots.header({ expanded: this.showing === true }));
17673
+ child = [].concat(this.$scopedSlots.header(this.headerSlotScope));
17541
17674
  }
17542
17675
  else {
17543
17676
  child = [
@@ -17568,7 +17701,7 @@
17568
17701
  );
17569
17702
  }
17570
17703
 
17571
- this.disable !== true && child[this.switchToggleSide === true ? 'unshift' : 'push'](
17704
+ this.disable !== true && this.hideExpandIcon !== true && child[this.switchToggleSide === true ? 'unshift' : 'push'](
17572
17705
  this.__getToggleIcon(h)
17573
17706
  );
17574
17707
 
@@ -17599,6 +17732,9 @@
17599
17732
 
17600
17733
  data.attrs = this.linkProps.attrs;
17601
17734
  }
17735
+ else {
17736
+ data.attrs = this.toggleAriaAttrs;
17737
+ }
17602
17738
  }
17603
17739
 
17604
17740
  return h(QItem, data, child)
@@ -17618,6 +17754,7 @@
17618
17754
  h('div', {
17619
17755
  staticClass: 'q-expansion-item__content relative-position',
17620
17756
  style: this.contentStyle,
17757
+ attrs: { id: this.targetUid },
17621
17758
  directives: [{ name: 'show', value: this.showing }]
17622
17759
  }, slot(this, 'default'))
17623
17760
  ])
@@ -17655,6 +17792,7 @@
17655
17792
 
17656
17793
  created () {
17657
17794
  this.group !== void 0 && this.$root.$on(eventName, this.__eventHandler);
17795
+ this.targetUid = `e_${uid()}`;
17658
17796
  },
17659
17797
 
17660
17798
  beforeDestroy () {
@@ -17808,6 +17946,21 @@
17808
17946
  return `q-fab__actions--${this.direction}` + (this.showing === true ? ' q-fab__actions--opened' : '')
17809
17947
  },
17810
17948
 
17949
+ actionsAttrs () {
17950
+ const attrs = {
17951
+ id: this.targetUid
17952
+ };
17953
+
17954
+ if (this.showing === true) {
17955
+ attrs.role = 'menu';
17956
+ }
17957
+ else {
17958
+ attrs['aria-hidden'] = 'true';
17959
+ }
17960
+
17961
+ return attrs
17962
+ },
17963
+
17811
17964
  iconHolderClasses () {
17812
17965
  return this.showing === true ? 'q-fab__icon-holder--opened' : ''
17813
17966
  },
@@ -17816,6 +17969,8 @@
17816
17969
  return {
17817
17970
  'aria-expanded': this.showing === true ? 'true' : 'false',
17818
17971
  'aria-haspopup': 'true',
17972
+ 'aria-controls': this.targetUid,
17973
+ 'aria-owns': this.targetUid,
17819
17974
  ...this.qAttrs
17820
17975
  }
17821
17976
  },
@@ -17886,9 +18041,14 @@
17886
18041
 
17887
18042
  h('div', {
17888
18043
  staticClass: 'q-fab__actions flex no-wrap inline',
17889
- class: this.actionsClasses
18044
+ class: this.actionsClasses,
18045
+ attrs: this.actionsAttrs
17890
18046
  }, slot(this, 'default'))
17891
18047
  ])
18048
+ },
18049
+
18050
+ created () {
18051
+ this.targetUid = `fb_${uid()}`;
17892
18052
  }
17893
18053
  });
17894
18054
 
@@ -18135,11 +18295,13 @@
18135
18295
 
18136
18296
  const index = ++this.validateIndex;
18137
18297
 
18138
- if (this.innerLoading !== true && this.lazyRules !== true) {
18139
- this.isDirty = true;
18140
- }
18298
+ const setDirty = this.innerLoading !== true
18299
+ ? () => this.isDirty !== true && (this.isDirty = true)
18300
+ : () => {};
18141
18301
 
18142
18302
  const update = (err, msg) => {
18303
+ err === true && setDirty();
18304
+
18143
18305
  if (this.innerError !== err) {
18144
18306
  this.innerError = err;
18145
18307
  }
@@ -18228,81 +18390,8 @@
18228
18390
  }
18229
18391
  };
18230
18392
 
18231
- /**
18232
- * Based on the work of https://github.com/jchook/uuid-random
18233
- */
18234
-
18235
- let
18236
- buf,
18237
- bufIdx = 0;
18238
- const hexBytes = new Array(256);
18239
-
18240
- // Pre-calculate toString(16) for speed
18241
- for (let i = 0; i < 256; i++) {
18242
- hexBytes[i] = (i + 0x100).toString(16).substr(1);
18243
- }
18244
-
18245
- // Use best available PRNG
18246
- const randomBytes = (() => {
18247
- // Node & Browser support
18248
- const lib = typeof crypto !== 'undefined'
18249
- ? crypto
18250
- : (
18251
- typeof window !== 'undefined'
18252
- ? window.msCrypto // IE11
18253
- : void 0
18254
- );
18255
-
18256
- if (lib !== void 0) {
18257
- if (lib.randomBytes !== void 0) {
18258
- return lib.randomBytes
18259
- }
18260
- if (lib.getRandomValues !== void 0) {
18261
- return n => {
18262
- var bytes = new Uint8Array(n);
18263
- lib.getRandomValues(bytes);
18264
- return bytes
18265
- }
18266
- }
18267
- }
18268
-
18269
- return n => {
18270
- const r = [];
18271
- for (let i = n; i > 0; i--) {
18272
- r.push(Math.floor(Math.random() * 256));
18273
- }
18274
- return r
18275
- }
18276
- })();
18277
-
18278
- // Buffer random numbers for speed
18279
- // Reduce memory usage by decreasing this number (min 16)
18280
- // or improve speed by increasing this number (try 16384)
18281
- const BUFFER_SIZE = 4096;
18282
-
18283
- function uid$2 () {
18284
- // Buffer some random bytes for speed
18285
- if (buf === void 0 || (bufIdx + 16 > BUFFER_SIZE)) {
18286
- bufIdx = 0;
18287
- buf = randomBytes(BUFFER_SIZE);
18288
- }
18289
-
18290
- const b = Array.prototype.slice.call(buf, bufIdx, (bufIdx += 16));
18291
- b[6] = (b[6] & 0x0f) | 0x40;
18292
- b[8] = (b[8] & 0x3f) | 0x80;
18293
-
18294
- return hexBytes[b[0]] + hexBytes[b[1]] +
18295
- hexBytes[b[2]] + hexBytes[b[3]] + '-' +
18296
- hexBytes[b[4]] + hexBytes[b[5]] + '-' +
18297
- hexBytes[b[6]] + hexBytes[b[7]] + '-' +
18298
- hexBytes[b[8]] + hexBytes[b[9]] + '-' +
18299
- hexBytes[b[10]] + hexBytes[b[11]] +
18300
- hexBytes[b[12]] + hexBytes[b[13]] +
18301
- hexBytes[b[14]] + hexBytes[b[15]]
18302
- }
18303
-
18304
18393
  function getTargetUid (val) {
18305
- return val === void 0 ? `f_${uid$2()}` : val
18394
+ return val === void 0 ? `f_${uid()}` : val
18306
18395
  }
18307
18396
 
18308
18397
  var QField = Vue.extend({
@@ -19029,7 +19118,7 @@
19029
19118
  file.__key = file.webkitRelativePath + file.lastModified + file.name + file.size;
19030
19119
  });
19031
19120
 
19032
- if (append !== true) {
19121
+ if (append === true) {
19033
19122
  // Avoid duplicate files
19034
19123
  const filenameMap = currentFileList.map(entry => entry.__key);
19035
19124
  files = filterFiles(files, rejectedFiles, 'duplicate', file => {
@@ -19673,79 +19762,73 @@
19673
19762
 
19674
19763
  methods: {
19675
19764
  validate (shouldFocus) {
19676
- const promises = [];
19677
19765
  const focus = typeof shouldFocus === 'boolean'
19678
19766
  ? shouldFocus
19679
19767
  : this.noErrorFocus !== true;
19680
19768
 
19681
19769
  const index = ++this.validateIndex;
19682
19770
 
19683
- const components = this.getValidationComponents().filter(c => c.disable !== true);
19771
+ const registeredComponents = this.getValidationComponents().filter(c => c.disable !== true);
19684
19772
 
19685
19773
  const emit = (res, ref) => {
19686
19774
  this.$emit('validation-' + (res === true ? 'success' : 'error'), ref);
19687
19775
  };
19688
19776
 
19689
- for (let i = 0; i < components.length; i++) {
19690
- const comp = components[i];
19777
+ const validateComponent = comp => {
19691
19778
  const valid = comp.validate();
19692
19779
 
19693
- if (typeof valid.then === 'function') {
19694
- promises.push(
19695
- valid.then(
19696
- valid => ({ valid, comp }),
19697
- err => ({ valid: false, comp, err })
19698
- )
19699
- );
19700
- }
19701
- else if (valid !== true) {
19702
- if (this.greedy === false) {
19703
- emit(false, comp);
19704
-
19705
- if (focus === true && typeof comp.focus === 'function') {
19706
- comp.focus();
19707
- }
19780
+ return typeof valid.then === 'function'
19781
+ ? valid.then(
19782
+ valid => ({ valid, comp }),
19783
+ err => ({ valid: false, comp, err })
19784
+ )
19785
+ : Promise.resolve({ valid, comp })
19786
+ };
19708
19787
 
19709
- return Promise.resolve(false)
19710
- }
19788
+ const errorsPromise = this.greedy === true
19789
+ ? Promise
19790
+ .all(registeredComponents.map(validateComponent))
19791
+ .then(res => res.filter(r => r.valid !== true))
19792
+ : registeredComponents
19793
+ .reduce(
19794
+ (acc, comp) => acc.then(() => {
19795
+ return validateComponent(comp).then(r => {
19796
+ if (r.valid === false) { return Promise.reject(r) }
19797
+ })
19798
+ }),
19799
+ Promise.resolve()
19800
+ )
19801
+ .catch(error => [ error ]);
19711
19802
 
19712
- promises.push({ valid: false, comp });
19803
+ return errorsPromise.then(errors => {
19804
+ if (errors.length === 0) {
19805
+ index === this.validateIndex && emit(true);
19806
+ return true
19713
19807
  }
19714
- }
19715
19808
 
19716
- if (promises.length === 0) {
19717
- emit(true);
19718
- return Promise.resolve(true)
19719
- }
19720
-
19721
- return Promise.all(promises).then(
19722
- res => {
19723
- const errors = res.filter(r => r.valid !== true);
19809
+ if (index === this.validateIndex) {
19810
+ const { comp, err } = errors[0];
19724
19811
 
19725
- if (errors.length === 0) {
19726
- index === this.validateIndex && emit(true);
19727
- return true
19728
- }
19812
+ err !== void 0 && console.error(err);
19813
+ emit(false, comp);
19729
19814
 
19730
- const { valid, comp, err } = errors[0];
19731
-
19732
- if (index === this.validateIndex) {
19733
- err !== void 0 && console.error(err);
19815
+ if (focus === true) {
19816
+ // Try to focus first mounted and active component
19817
+ const activeError = errors.find(({ comp }) => (
19818
+ typeof comp.focus === 'function' &&
19819
+ comp._isBeingDestroyed !== true &&
19820
+ comp._isDestroyed !== true &&
19821
+ comp._inactive !== true
19822
+ ));
19734
19823
 
19735
- emit(false, comp);
19736
-
19737
- if (
19738
- focus === true &&
19739
- valid !== true &&
19740
- typeof comp.focus === 'function'
19741
- ) {
19742
- comp.focus();
19824
+ if (activeError !== void 0) {
19825
+ activeError.comp.focus();
19743
19826
  }
19744
19827
  }
19745
-
19746
- return false
19747
19828
  }
19748
- )
19829
+
19830
+ return false
19831
+ })
19749
19832
  },
19750
19833
 
19751
19834
  resetValidation () {
@@ -26947,6 +27030,7 @@
26947
27030
  tabindex: this.tabindex,
26948
27031
  role: 'combobox',
26949
27032
  'aria-label': this.label,
27033
+ 'aria-readonly': this.readonly === true ? 'true' : 'false',
26950
27034
  'aria-autocomplete': this.useInput === true ? 'list' : 'none',
26951
27035
  'aria-expanded': this.menu === true ? 'true' : 'false',
26952
27036
  'aria-owns': `${this.targetUid}_lb`,
@@ -26967,10 +27051,6 @@
26967
27051
  'aria-multiselectable': this.multiple === true ? 'true' : 'false'
26968
27052
  };
26969
27053
 
26970
- if (this.optionIndex >= 0) {
26971
- attrs['aria-activedescendant'] = `${this.targetUid}_${this.optionIndex}`;
26972
- }
26973
-
26974
27054
  return attrs
26975
27055
  }
26976
27056
  },
@@ -33116,7 +33196,7 @@
33116
33196
 
33117
33197
  if (rowEl !== null) {
33118
33198
  const scrollTarget = this.$el.querySelector('.q-table__middle.scroll');
33119
- const { offsetTop } = rowEl;
33199
+ const offsetTop = rowEl.offsetTop - this.virtualScrollStickySizeStart;
33120
33200
  const direction = offsetTop < scrollTarget.scrollTop ? 'decrease' : 'increase';
33121
33201
 
33122
33202
  scrollTarget.scrollTop = offsetTop;
@@ -40526,6 +40606,121 @@
40526
40606
  return openWindow(url, reject, windowFeatures)
40527
40607
  };
40528
40608
 
40609
+ function parsePromises (sequentialPromises) {
40610
+ const isList = Array.isArray(sequentialPromises);
40611
+
40612
+ if (isList === true) {
40613
+ const totalJobs = sequentialPromises.length;
40614
+ return {
40615
+ isList,
40616
+ totalJobs,
40617
+ resultAggregator: Array(totalJobs).fill(null)
40618
+ }
40619
+ }
40620
+
40621
+ const resultKeys = Object.keys(sequentialPromises);
40622
+ const resultAggregator = {};
40623
+ resultKeys.forEach(keyName => { resultAggregator[ keyName ] = null; });
40624
+
40625
+ return {
40626
+ isList,
40627
+ totalJobs: resultKeys.length,
40628
+ resultAggregator,
40629
+ resultKeys
40630
+ }
40631
+ }
40632
+
40633
+ /**
40634
+ * Run a list of Promises sequentially, optionally on multiple threads.
40635
+ *
40636
+ * @param {*} sequentialPromises - Array of Functions or Object with Functions as values
40637
+ * Array of Function form: [ (resultAggregator: Array) => Promise<any>, ... ]
40638
+ * Object form: { [key: string]: (resultAggregator: object) => Promise<any>, ... }
40639
+ * @param {*} opts - Optional options Object
40640
+ * Object form: { threadsNumber?: number, abortOnFail?: boolean }
40641
+ * Default: { threadsNumber: 1, abortOnFail: true }
40642
+ * When configuring threadsNumber AND using http requests, be
40643
+ * aware of the maximum threads that the hosting browser
40644
+ * supports (usually 3); any number of threads above that
40645
+ * won't add any real benefits
40646
+ * @returns Promise<Array<Object> | Object>
40647
+ * With opts.abortOnFail set to true (which is default):
40648
+ * When sequentialPromises param is Array:
40649
+ * The Promise resolves with an Array of Objects of the following form:
40650
+ * [ { key: number, status: 'fulfilled', value: any }, ... ]
40651
+ * The Promise rejects with an Object of the following form:
40652
+ * { key: number, status: 'rejected', reason: Error, resultAggregator: array }
40653
+ * When sequentialPromises param is Object:
40654
+ * The Promise resolves with an Object of the following form:
40655
+ * { [key: string]: { key: string, status: 'fulfilled', value: any }, ... }
40656
+ * The Promise rejects with an Object of the following form:
40657
+ * { key: string, status: 'rejected', reason: Error, resultAggregator: object }
40658
+ * With opts.abortOnFail set to false:
40659
+ * The Promise is never rejected (no catch() needed)
40660
+ * The Promise resolves with:
40661
+ * An Array of Objects (when sequentialPromises param is also an Array) of the following form:
40662
+ * [ { key: number, status: 'fulfilled', value: any } | { status: 'rejected', reason: Error }, ... ]
40663
+ * An Object (when sequentialPromises param is also an Object) of the following form:
40664
+ * { [key: string]: { key: string, status: 'fulfilled', value: any } | { key: string, status: 'rejected', reason: Error }, ... }
40665
+ */
40666
+ function runSequentialPromises (
40667
+ sequentialPromises,
40668
+ { threadsNumber = 1, abortOnFail = true } = {}
40669
+ ) {
40670
+ let jobIndex = -1, hasAborted = false;
40671
+
40672
+ const { isList, totalJobs, resultAggregator, resultKeys } = parsePromises(sequentialPromises);
40673
+
40674
+ const getPromiseThread = () => new Promise((resolve, reject) => {
40675
+ function runNextPromise () {
40676
+ const currentJobIndex = ++jobIndex;
40677
+
40678
+ if (hasAborted === true || currentJobIndex >= totalJobs) {
40679
+ resolve();
40680
+ return
40681
+ }
40682
+
40683
+ const key = isList === true ? currentJobIndex : resultKeys[ currentJobIndex ];
40684
+
40685
+ sequentialPromises[ key ](resultAggregator)
40686
+ .then(value => {
40687
+ if (hasAborted === true) {
40688
+ resolve();
40689
+ return // early exit
40690
+ }
40691
+
40692
+ resultAggregator[ key ] = { key, status: 'fulfilled', value };
40693
+
40694
+ // timeout so it doesn't interfere with the .catch() below
40695
+ setTimeout(runNextPromise);
40696
+ })
40697
+ .catch(reason => {
40698
+ if (hasAborted === true) {
40699
+ resolve();
40700
+ return // early exit
40701
+ }
40702
+
40703
+ const result = { key, status: 'rejected', reason };
40704
+ resultAggregator[ key ] = result;
40705
+
40706
+ if (abortOnFail === true) {
40707
+ hasAborted = true;
40708
+ reject({ ...result, resultAggregator });
40709
+ return // early exit
40710
+ }
40711
+
40712
+ // timeout so no interference
40713
+ setTimeout(runNextPromise);
40714
+ });
40715
+ }
40716
+
40717
+ runNextPromise();
40718
+ });
40719
+
40720
+ const threads = Array(threadsNumber).fill(getPromiseThread());
40721
+ return Promise.all(threads).then(() => resultAggregator)
40722
+ }
40723
+
40529
40724
 
40530
40725
 
40531
40726
  var utils = /*#__PURE__*/Object.freeze({
@@ -40546,9 +40741,10 @@
40546
40741
  openURL: openUrl,
40547
40742
  morph: morph,
40548
40743
  patterns: patterns,
40744
+ runSequentialPromises: runSequentialPromises,
40549
40745
  scroll: scroll,
40550
40746
  throttle: throttle,
40551
- uid: uid$2
40747
+ uid: uid
40552
40748
  });
40553
40749
 
40554
40750
  Vue.use({ install }, {