quasar 2.4.9 → 2.4.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/dist/api/BottomSheet.json +4 -0
  2. package/dist/api/Dialog.json +5 -1
  3. package/dist/api/LoadingBar.json +7 -0
  4. package/dist/api/Notify.json +20 -10
  5. package/dist/api/Platform.json +171 -0
  6. package/dist/api/QAjaxBar.json +13 -1
  7. package/dist/api/QBtnDropdown.json +4 -2
  8. package/dist/api/QEditor.json +4 -2
  9. package/dist/api/QExpansionItem.json +6 -3
  10. package/dist/api/QFab.json +4 -2
  11. package/dist/api/QFabAction.json +4 -2
  12. package/dist/api/QFile.json +5 -2
  13. package/dist/api/QImg.json +1 -2
  14. package/dist/api/QInnerLoading.json +2 -1
  15. package/dist/api/QInput.json +4 -2
  16. package/dist/api/QPagination.json +4 -2
  17. package/dist/api/QRange.json +9 -0
  18. package/dist/api/QScrollArea.json +13 -5
  19. package/dist/api/QSelect.json +6 -3
  20. package/dist/api/QSlider.json +9 -0
  21. package/dist/api/QSplitter.json +8 -4
  22. package/dist/api/QTable.json +9 -0
  23. package/dist/api/QTree.json +7 -0
  24. package/dist/api/QUploader.json +3 -1
  25. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  26. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  27. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  28. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  29. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  30. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  31. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  32. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  33. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  34. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  35. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  36. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  37. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  38. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  39. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  40. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  41. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  42. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  43. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  44. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
  45. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  46. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  47. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  48. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  49. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  50. package/dist/icon-set/svg-mdi-v4.umd.prod.js +1 -1
  51. package/dist/icon-set/svg-mdi-v5.umd.prod.js +1 -1
  52. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  53. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  54. package/dist/icon-set/themify.umd.prod.js +1 -1
  55. package/dist/lang/ar.umd.prod.js +1 -1
  56. package/dist/lang/az-Latn.umd.prod.js +1 -1
  57. package/dist/lang/bg.umd.prod.js +1 -1
  58. package/dist/lang/bn.umd.prod.js +1 -1
  59. package/dist/lang/ca.umd.prod.js +1 -1
  60. package/dist/lang/cs.umd.prod.js +1 -1
  61. package/dist/lang/da.umd.prod.js +1 -1
  62. package/dist/lang/de.umd.prod.js +1 -1
  63. package/dist/lang/el.umd.prod.js +1 -1
  64. package/dist/lang/en-GB.umd.prod.js +1 -1
  65. package/dist/lang/en-US.umd.prod.js +1 -1
  66. package/dist/lang/eo.umd.prod.js +1 -1
  67. package/dist/lang/es.umd.prod.js +1 -1
  68. package/dist/lang/et.umd.prod.js +1 -1
  69. package/dist/lang/fa-IR.umd.prod.js +1 -1
  70. package/dist/lang/fa.umd.prod.js +1 -1
  71. package/dist/lang/fi.umd.prod.js +1 -1
  72. package/dist/lang/fr.umd.prod.js +1 -1
  73. package/dist/lang/gn.umd.prod.js +1 -1
  74. package/dist/lang/he.umd.prod.js +1 -1
  75. package/dist/lang/hr.umd.prod.js +1 -1
  76. package/dist/lang/hu.umd.prod.js +1 -1
  77. package/dist/lang/id.umd.prod.js +1 -1
  78. package/dist/lang/is.umd.prod.js +1 -1
  79. package/dist/lang/it.umd.prod.js +1 -1
  80. package/dist/lang/ja.umd.prod.js +1 -1
  81. package/dist/lang/km.umd.prod.js +1 -1
  82. package/dist/lang/ko-KR.umd.prod.js +1 -1
  83. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  84. package/dist/lang/lt.umd.prod.js +1 -1
  85. package/dist/lang/lu.umd.prod.js +1 -1
  86. package/dist/lang/lv.umd.prod.js +1 -1
  87. package/dist/lang/ml.umd.prod.js +1 -1
  88. package/dist/lang/ms.umd.prod.js +1 -1
  89. package/dist/lang/my.umd.prod.js +1 -1
  90. package/dist/lang/nb-NO.umd.prod.js +1 -1
  91. package/dist/lang/nl.umd.prod.js +1 -1
  92. package/dist/lang/pl.umd.prod.js +1 -1
  93. package/dist/lang/pt-BR.umd.prod.js +1 -1
  94. package/dist/lang/pt.umd.prod.js +1 -1
  95. package/dist/lang/ro.umd.prod.js +1 -1
  96. package/dist/lang/ru.umd.prod.js +1 -1
  97. package/dist/lang/sk.umd.prod.js +1 -1
  98. package/dist/lang/sl.umd.prod.js +1 -1
  99. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  100. package/dist/lang/sr.umd.prod.js +1 -1
  101. package/dist/lang/sv.umd.prod.js +1 -1
  102. package/dist/lang/ta.umd.prod.js +1 -1
  103. package/dist/lang/th.umd.prod.js +1 -1
  104. package/dist/lang/tr.umd.prod.js +1 -1
  105. package/dist/lang/ug.umd.prod.js +1 -1
  106. package/dist/lang/uk.umd.prod.js +1 -1
  107. package/dist/lang/vi.umd.prod.js +1 -1
  108. package/dist/lang/zh-CN.umd.prod.js +1 -1
  109. package/dist/lang/zh-TW.umd.prod.js +1 -1
  110. package/dist/quasar.cjs.prod.js +2 -2
  111. package/dist/quasar.css +8 -1
  112. package/dist/quasar.esm.prod.js +2 -2
  113. package/dist/quasar.prod.css +1 -1
  114. package/dist/quasar.rtl.css +8 -1
  115. package/dist/quasar.rtl.prod.css +1 -1
  116. package/dist/quasar.sass +7 -1
  117. package/dist/quasar.umd.js +193 -92
  118. package/dist/quasar.umd.prod.js +2 -2
  119. package/dist/ssr-directives/Morph.js +1 -1
  120. package/dist/types/api/qfile.d.ts +8 -0
  121. package/dist/types/api/qselect.d.ts +4 -0
  122. package/dist/types/api/qtable.d.ts +12 -0
  123. package/dist/types/api/qtree.d.ts +31 -0
  124. package/dist/types/api/quploader.d.ts +28 -0
  125. package/dist/types/api/slider.d.ts +6 -7
  126. package/dist/types/api/touchswipe.d.ts +11 -0
  127. package/dist/types/api/validation.d.ts +1 -1
  128. package/dist/types/api/vue-prop-types.ts +15 -0
  129. package/dist/types/api.d.ts +7 -0
  130. package/dist/types/index.d.ts +426 -415
  131. package/dist/types/ts-helpers.d.ts +6 -2
  132. package/dist/types/utils/dom.d.ts +4 -2
  133. package/dist/types/utils.d.ts +7 -2
  134. package/dist/vetur/quasar-attributes.json +34 -30
  135. package/dist/vetur/quasar-tags.json +1 -0
  136. package/dist/web-types/web-types.json +41 -31
  137. package/package.json +1 -1
  138. package/src/components/ajax-bar/QAjaxBar.js +22 -12
  139. package/src/components/ajax-bar/QAjaxBar.json +16 -1
  140. package/src/components/btn-dropdown/QBtnDropdown.json +4 -2
  141. package/src/components/date/QDate.js +6 -1
  142. package/src/components/dialog/QDialog.js +1 -1
  143. package/src/components/dialog-plugin/DialogPlugin.js +1 -1
  144. package/src/components/editor/QEditor.js +1 -1
  145. package/src/components/editor/QEditor.json +3 -1
  146. package/src/components/expansion-item/QExpansionItem.json +6 -3
  147. package/src/components/fab/use-fab.json +4 -2
  148. package/src/components/file/QFile.json +4 -2
  149. package/src/components/form/QForm.js +12 -2
  150. package/src/components/img/QImg.json +2 -3
  151. package/src/components/infinite-scroll/QInfiniteScroll.js +3 -2
  152. package/src/components/inner-loading/QInnerLoading.json +2 -1
  153. package/src/components/input/QInput.js +1 -1
  154. package/src/components/input/QInput.json +4 -2
  155. package/src/components/menu/QMenu.js +2 -1
  156. package/src/components/pagination/QPagination.json +4 -2
  157. package/src/components/scroll-area/QScrollArea.js +21 -1
  158. package/src/components/scroll-area/QScrollArea.json +13 -5
  159. package/src/components/select/QSelect.js +32 -27
  160. package/src/components/select/QSelect.json +6 -3
  161. package/src/components/select/QSelect.sass +4 -0
  162. package/src/components/slider/use-slider.json +9 -0
  163. package/src/components/splitter/QSplitter.json +8 -4
  164. package/src/components/stepper/QStep.js +19 -14
  165. package/src/components/stepper/QStepper.sass +3 -0
  166. package/src/components/table/QTable.json +9 -0
  167. package/src/components/tabs/QTabs.js +10 -2
  168. package/src/components/tree/QTree.js +8 -1
  169. package/src/components/tree/QTree.json +8 -0
  170. package/src/components/uploader/uploader-core.js +2 -0
  171. package/src/components/uploader/xhr-uploader-plugin.json +2 -1
  172. package/src/components/virtual-scroll/use-virtual-scroll.js +20 -9
  173. package/src/composables/private/use-field.js +16 -9
  174. package/src/composables/private/use-file.json +1 -0
  175. package/src/plugins/BottomSheet.json +1 -0
  176. package/src/plugins/Dialog.json +1 -0
  177. package/src/plugins/LoadingBar.js +3 -3
  178. package/src/plugins/LoadingBar.json +8 -0
  179. package/src/plugins/Notify.json +20 -10
  180. package/src/plugins/Platform.js +15 -8
  181. package/src/plugins/Platform.json +166 -0
  182. package/src/utils/private/global-dialog.json +3 -0
@@ -224,7 +224,8 @@
224
224
  },
225
225
 
226
226
  "popup-content-style": {
227
- "type": [ "Array", "String", "Object" ],
227
+ "type": [ "String", "Array", "Object" ],
228
+ "tsType": "VueStyleProp",
228
229
  "desc": "Style definitions to be attributed to the popup content",
229
230
  "examples": [
230
231
  "background-color: #ff0000",
@@ -279,7 +280,8 @@
279
280
  },
280
281
 
281
282
  "input-class": {
282
- "type": [ "Array", "String", "Object" ],
283
+ "type": [ "String", "Array", "Object" ],
284
+ "tsType": "VueClassProp",
283
285
  "desc": "Class definitions to be attributed to the underlying input tag",
284
286
  "examples": [
285
287
  "my-special-class",
@@ -289,7 +291,8 @@
289
291
  },
290
292
 
291
293
  "input-style": {
292
- "type": [ "Array", "String", "Object" ],
294
+ "type": [ "String", "Array", "Object" ],
295
+ "tsType": "VueStyleProp",
293
296
  "desc": "Style definitions to be attributed to the underlying input tag",
294
297
  "examples": [
295
298
  "background-color: #ff0000",
@@ -8,11 +8,15 @@
8
8
 
9
9
  .q-field__input
10
10
  min-width: 50px !important
11
+ cursor: text
11
12
 
12
13
  &--padding
13
14
  padding-left: 4px
14
15
 
16
+ &__focus-target,
15
17
  &__autocomplete-input
18
+ position: absolute
19
+ outline: 0 !important
16
20
  width: 0
17
21
  height: 0
18
22
  padding: 0
@@ -164,11 +164,13 @@
164
164
  },
165
165
  "classes": {
166
166
  "type": [ "String", "Array", "Object" ],
167
+ "tsType": "VueClassProp",
167
168
  "desc": "CSS classes to be attributed to the marker label",
168
169
  "examples": [ "my-class-name" ]
169
170
  },
170
171
  "style": {
171
172
  "type": "Object",
173
+ "tsType": "VueStyleObjectProp",
172
174
  "desc": "Style definitions to be attributed to the marker label",
173
175
  "examples": [ "{ height: '24px' }" ]
174
176
  }
@@ -197,11 +199,13 @@
197
199
  },
198
200
  "classes": {
199
201
  "type": [ "String", "Array", "Object" ],
202
+ "tsType": "VueClassProp",
200
203
  "desc": "CSS classes to be attributed to the marker label",
201
204
  "examples": [ "my-class-name" ]
202
205
  },
203
206
  "style": {
204
207
  "type": "Object",
208
+ "tsType": "VueStyleObjectProp",
205
209
  "desc": "Style definitions to be attributed to the marker label",
206
210
  "examples": [ "{ height: '24px' }" ]
207
211
  }
@@ -317,6 +321,7 @@
317
321
  },
318
322
  "style": {
319
323
  "type": "Object",
324
+ "tsType": "VueStyleObjectProp",
320
325
  "desc": "Style definitions to be attributed to the marker label",
321
326
  "examples": [ "{ height: '24px' }" ]
322
327
  }
@@ -350,6 +355,7 @@
350
355
  },
351
356
  "style": {
352
357
  "type": "Object",
358
+ "tsType": "VueStyleObjectProp",
353
359
  "desc": "Style definitions to be attributed to the marker label",
354
360
  "examples": [ "{ height: '24px' }" ]
355
361
  }
@@ -387,6 +393,7 @@
387
393
  },
388
394
  "style": {
389
395
  "type": "Object",
396
+ "tsType": "VueStyleObjectProp",
390
397
  "desc": "Style definitions to be attributed to the marker label",
391
398
  "examples": [ "{ height: '24px' }" ]
392
399
  }
@@ -453,6 +460,7 @@
453
460
  },
454
461
  "style": {
455
462
  "type": "Object",
463
+ "tsType": "VueStyleObjectProp",
456
464
  "desc": "Style definitions to be attributed to the marker label",
457
465
  "examples": [ "{ height: '24px' }" ]
458
466
  }
@@ -490,6 +498,7 @@
490
498
  },
491
499
  "style": {
492
500
  "type": "Object",
501
+ "tsType": "VueStyleObjectProp",
493
502
  "desc": "Style definitions to be attributed to the marker label",
494
503
  "examples": [ "{ height: '24px' }" ]
495
504
  }
@@ -50,7 +50,8 @@
50
50
  },
51
51
 
52
52
  "before-class": {
53
- "type": [ "Array", "String", "Object" ],
53
+ "type": [ "String", "Array", "Object" ],
54
+ "tsType": "VueClassProp",
54
55
  "desc": "Class definitions to be attributed to the 'before' panel",
55
56
  "examples": [
56
57
  "bg-deep-orange",
@@ -60,7 +61,8 @@
60
61
  },
61
62
 
62
63
  "after-class": {
63
- "type": [ "Array", "String", "Object" ],
64
+ "type": [ "String", "Array", "Object" ],
65
+ "tsType": "VueClassProp",
64
66
  "desc": "Class definitions to be attributed to the 'after' panel",
65
67
  "examples": [
66
68
  "bg-deep-orange",
@@ -70,7 +72,8 @@
70
72
  },
71
73
 
72
74
  "separator-class": {
73
- "type": [ "Array", "String", "Object" ],
75
+ "type": [ "String", "Array", "Object" ],
76
+ "tsType": "VueClassProp",
74
77
  "desc": "Class definitions to be attributed to the splitter separator",
75
78
  "examples": [
76
79
  "bg-deep-orange",
@@ -80,7 +83,8 @@
80
83
  },
81
84
 
82
85
  "separator-style": {
83
- "type": [ "Array", "String", "Object" ],
86
+ "type": [ "String", "Array", "Object" ],
87
+ "tsType": "VueStyleProp",
84
88
  "desc": "Style definitions to be attributed to the splitter separator",
85
89
  "examples": [
86
90
  "background-color: #ff0000",
@@ -1,4 +1,4 @@
1
- import { h, ref, computed, watch, nextTick, inject, KeepAlive } from 'vue'
1
+ import { h, ref, computed, inject, getCurrentInstance, KeepAlive } from 'vue'
2
2
 
3
3
  import QSlideTransition from '../slide-transition/QSlideTransition.js'
4
4
  import StepHeader from './StepHeader.js'
@@ -56,7 +56,9 @@ export default createComponent({
56
56
  error: Boolean
57
57
  },
58
58
 
59
- setup (props, { slots }) {
59
+ setup (props, { attrs, slots }) {
60
+ const { proxy: { $q } } = getCurrentInstance()
61
+
60
62
  const $stepper = inject(stepperKey, () => {
61
63
  console.error('QStep needs to be child of QStepper')
62
64
  })
@@ -67,18 +69,21 @@ export default createComponent({
67
69
 
68
70
  const isActive = computed(() => $stepper.value.modelValue === props.name)
69
71
 
70
- watch(isActive, active => {
71
- if (
72
- active === true
73
- && $stepper.value.vertical === true
74
- ) {
75
- nextTick(() => {
76
- if (rootRef.value !== null) {
77
- rootRef.value.scrollTop = 0
72
+ const scrollEvent = computed(() => (
73
+ ($q.platform.is.ios !== true && $q.platform.is.chrome === true)
74
+ || isActive.value !== true
75
+ || $stepper.value.vertical !== true
76
+ ? {}
77
+ : {
78
+ onScroll (e) {
79
+ const { target } = e
80
+ if (target.scrollTop > 0) {
81
+ target.scrollTop = 0
82
+ }
83
+ attrs.onScroll !== void 0 && attrs.onScroll(e)
78
84
  }
79
- })
80
- }
81
- })
85
+ }
86
+ ))
82
87
 
83
88
  const contentKey = computed(() => (
84
89
  typeof props.name === 'string' || typeof props.name === 'number'
@@ -114,7 +119,7 @@ export default createComponent({
114
119
 
115
120
  return () => h(
116
121
  'div',
117
- { ref: rootRef, class: 'q-stepper__step' },
122
+ { ref: rootRef, class: 'q-stepper__step', ...scrollEvent.value },
118
123
  $stepper.value.vertical === true
119
124
  ? [
120
125
  h(StepHeader, {
@@ -13,6 +13,7 @@
13
13
  line-height: 14px
14
14
 
15
15
  &__dot
16
+ contain: layout
16
17
  margin-right: 8px
17
18
  font-size: 14px
18
19
  width: 24px
@@ -20,6 +21,7 @@
20
21
  height: 24px
21
22
  border-radius: 50%
22
23
  background: currentColor
24
+
23
25
  span
24
26
  color: #fff
25
27
 
@@ -133,6 +135,7 @@
133
135
  .q-stepper__tab
134
136
  overflow: hidden
135
137
  .q-stepper__line
138
+ contain: layout
136
139
  &:before, &:after
137
140
  position: absolute
138
141
  top: 50%
@@ -482,6 +482,7 @@
482
482
 
483
483
  "table-style": {
484
484
  "type": [ "String", "Array", "Object" ],
485
+ "tsType": "VueStyleProp",
485
486
  "desc": "CSS style to apply to native HTML <table> element's wrapper (which is a DIV)",
486
487
  "examples": [
487
488
  "background-color: #ff0000",
@@ -492,6 +493,7 @@
492
493
 
493
494
  "table-class": {
494
495
  "type": [ "String", "Array", "Object" ],
496
+ "tsType": "VueClassProp",
495
497
  "desc": "CSS classes to apply to native HTML <table> element's wrapper (which is a DIV)",
496
498
  "examples": [
497
499
  "my-special-class",
@@ -502,6 +504,7 @@
502
504
 
503
505
  "table-header-style": {
504
506
  "type": [ "String", "Array", "Object" ],
507
+ "tsType": "VueStyleProp",
505
508
  "desc": "CSS style to apply to header of native HTML <table> (which is a TR)",
506
509
  "examples": [
507
510
  "background-color: #ff0000",
@@ -512,6 +515,7 @@
512
515
 
513
516
  "table-header-class": {
514
517
  "type": [ "String", "Array", "Object" ],
518
+ "tsType": "VueClassProp",
515
519
  "desc": "CSS classes to apply to header of native HTML <table> (which is a TR)",
516
520
  "examples": [
517
521
  "my-special-class",
@@ -522,6 +526,7 @@
522
526
 
523
527
  "card-container-style": {
524
528
  "type": [ "String", "Array", "Object" ],
529
+ "tsType": "VueStyleProp",
525
530
  "desc": "CSS style to apply to the cards container (when in grid mode)",
526
531
  "examples": [
527
532
  "background-color: #ff0000",
@@ -532,6 +537,7 @@
532
537
 
533
538
  "card-container-class": {
534
539
  "type": [ "String", "Array", "Object" ],
540
+ "tsType": "VueClassProp",
535
541
  "desc": "CSS classes to apply to the cards container (when in grid mode)",
536
542
  "examples": [
537
543
  "my-special-class",
@@ -543,6 +549,7 @@
543
549
 
544
550
  "card-style": {
545
551
  "type": [ "String", "Array", "Object" ],
552
+ "tsType": "VueStyleProp",
546
553
  "desc": "CSS style to apply to the card (when in grid mode) or container card (when not in grid mode)",
547
554
  "examples": [
548
555
  "background-color: #ff0000",
@@ -553,6 +560,7 @@
553
560
 
554
561
  "card-class": {
555
562
  "type": [ "String", "Array", "Object" ],
563
+ "tsType": "VueClassProp",
556
564
  "desc": "CSS classes to apply to the card (when in grid mode) or container card (when not in grid mode)",
557
565
  "examples": [
558
566
  "my-special-class",
@@ -563,6 +571,7 @@
563
571
 
564
572
  "title-class": {
565
573
  "type": [ "String", "Array", "Object" ],
574
+ "tsType": "VueClassProp",
566
575
  "desc": "CSS classes to apply to the title (if using 'title' prop)",
567
576
  "examples": [
568
577
  "my-special-class",
@@ -1,4 +1,4 @@
1
- import { h, ref, computed, watch, nextTick, onBeforeUnmount, onActivated, getCurrentInstance, provide } from 'vue'
1
+ import { h, ref, computed, watch, nextTick, onBeforeUnmount, onActivated, onDeactivated, getCurrentInstance, provide } from 'vue'
2
2
 
3
3
  import QIcon from '../icon/QIcon.js'
4
4
  import QResizeObserver from '../resize-observer/QResizeObserver.js'
@@ -568,7 +568,15 @@ export default createComponent({
568
568
  unwatchRoute !== void 0 && unwatchRoute()
569
569
  })
570
570
 
571
- onActivated(recalculateScroll)
571
+ let shouldActivate = false
572
+
573
+ onDeactivated(() => {
574
+ shouldActivate = true
575
+ })
576
+
577
+ onActivated(() => {
578
+ shouldActivate === true && recalculateScroll()
579
+ })
572
580
 
573
581
  return () => {
574
582
  const child = [
@@ -58,6 +58,8 @@ export default createComponent({
58
58
  expanded: Array, // v-model:expanded
59
59
  selected: {}, // v-model:selected
60
60
 
61
+ noSelectionUnset: Boolean,
62
+
61
63
  defaultExpandAll: Boolean,
62
64
  accordion: Boolean,
63
65
 
@@ -615,7 +617,12 @@ export default createComponent({
615
617
 
616
618
  if (hasSelection.value) {
617
619
  if (meta.selectable) {
618
- emit('update:selected', meta.key !== props.selected ? meta.key : null)
620
+ if (props.noSelectionUnset === false) {
621
+ emit('update:selected', meta.key !== props.selected ? meta.key : null)
622
+ }
623
+ else if (meta.key !== props.selected) {
624
+ emit('update:selected', meta.key || null)
625
+ }
619
626
  }
620
627
  }
621
628
  else {
@@ -6,6 +6,7 @@
6
6
  "props": {
7
7
  "nodes": {
8
8
  "type": "Array",
9
+ "tsType": "QTreeNode",
9
10
  "desc": "The array of nodes that designates the tree structure",
10
11
  "required": true,
11
12
  "examples": [ "[ {...}, {...} ]" ],
@@ -106,6 +107,13 @@
106
107
  "category": "state"
107
108
  },
108
109
 
110
+ "no-selection-unset": {
111
+ "type": "Boolean",
112
+ "desc": "Do not allow un-selection when clicking currently selected node",
113
+ "category": "behavior",
114
+ "addedIn": "v2.4.10"
115
+ },
116
+
109
117
  "default-expand-all": {
110
118
  "type": "Boolean",
111
119
  "desc": "Allow the tree to have all its branches expanded, when first rendered",
@@ -436,6 +436,8 @@ export function getRenderer (getPlugin) {
436
436
  abort: state.abort
437
437
  }
438
438
 
439
+ // TODO: the result of this computed, especially the dynamic part, isn't currently typed
440
+ // This result in an error with Volar when accessing the state (eg. files array)
439
441
  const slotScope = computed(() => {
440
442
  const acc = {
441
443
  canAddFiles: canAddFiles.value,
@@ -2,6 +2,7 @@
2
2
  "props": {
3
3
  "factory": {
4
4
  "type": "Function",
5
+ "tsType": "QUploaderFactoryFn",
5
6
  "desc": "Function which should return an Object or a Promise resolving with an Object; For best performance, reference it from your scope and do not define it inline",
6
7
  "params": {
7
8
  "files": {
@@ -112,7 +113,7 @@
112
113
  },
113
114
  "returns": {
114
115
  "type": "String",
115
- "desc": "An array consists of objects with header definitions",
116
+ "desc": "An array consisting of objects with header definitions",
116
117
  "__exemption": [ "examples" ]
117
118
  },
118
119
  "category": "upload"
@@ -1,4 +1,4 @@
1
- import { h, ref, computed, watch, onActivated, onBeforeMount, onBeforeUnmount, nextTick, getCurrentInstance } from 'vue'
1
+ import { h, ref, computed, watch, onActivated, onDeactivated, onBeforeMount, onBeforeUnmount, nextTick, getCurrentInstance } from 'vue'
2
2
 
3
3
  import debounce from '../../utils/debounce.js'
4
4
  import { noop } from '../../utils/event.js'
@@ -559,13 +559,14 @@ export function useVirtualScroll ({
559
559
  prevToIndex = -1
560
560
  prevScrollStart = void 0
561
561
 
562
+ virtualScrollPaddingBefore.value = sumSize(virtualScrollSizesAgg, virtualScrollSizes, 0, virtualScrollSliceRange.value.from)
563
+ virtualScrollPaddingAfter.value = sumSize(virtualScrollSizesAgg, virtualScrollSizes, virtualScrollSliceRange.value.to, virtualScrollLength.value)
564
+
562
565
  if (toIndex >= 0) {
563
566
  updateVirtualScrollSizes(virtualScrollSliceRange.value.from)
564
567
  nextTick(() => { scrollTo(toIndex) })
565
568
  }
566
569
  else {
567
- virtualScrollPaddingBefore.value = sumSize(virtualScrollSizesAgg, virtualScrollSizes, 0, virtualScrollSliceRange.value.from)
568
- virtualScrollPaddingAfter.value = sumSize(virtualScrollSizesAgg, virtualScrollSizes, virtualScrollSliceRange.value.to, virtualScrollLength.value)
569
570
  onVirtualScrollEvt()
570
571
  }
571
572
  }
@@ -590,22 +591,24 @@ export function useVirtualScroll ({
590
591
 
591
592
  localScrollViewSize = scrollViewSize
592
593
 
593
- const multiplier = 1 + props.virtualScrollSliceRatioBefore + props.virtualScrollSliceRatioAfter
594
+ const virtualScrollSliceRatioBefore = parseFloat(props.virtualScrollSliceRatioBefore) || 0
595
+ const virtualScrollSliceRatioAfter = parseFloat(props.virtualScrollSliceRatioAfter) || 0
596
+ const multiplier = 1 + virtualScrollSliceRatioBefore + virtualScrollSliceRatioAfter
594
597
  const view = scrollViewSize === void 0 || scrollViewSize <= 0
595
598
  ? 1
596
599
  : Math.ceil(scrollViewSize / virtualScrollItemSizeComputed.value)
597
600
 
598
601
  const baseSize = Math.max(
599
- 10,
602
+ 1,
600
603
  view,
601
- Math.ceil(props.virtualScrollSliceSize / multiplier)
604
+ Math.ceil((props.virtualScrollSliceSize > 0 ? props.virtualScrollSliceSize : 10) / multiplier)
602
605
  )
603
606
 
604
607
  virtualScrollSliceSizeComputed.value = {
605
608
  total: Math.ceil(baseSize * multiplier),
606
- start: Math.ceil(baseSize * props.virtualScrollSliceRatioBefore),
607
- center: Math.ceil(baseSize * (0.5 + props.virtualScrollSliceRatioBefore)),
608
- end: Math.ceil(baseSize * (1 + props.virtualScrollSliceRatioBefore)),
609
+ start: Math.ceil(baseSize * virtualScrollSliceRatioBefore),
610
+ center: Math.ceil(baseSize * (0.5 + virtualScrollSliceRatioBefore)),
611
+ end: Math.ceil(baseSize * (1 + virtualScrollSliceRatioBefore)),
609
612
  view
610
613
  }
611
614
  }
@@ -691,7 +694,15 @@ export function useVirtualScroll ({
691
694
  setVirtualScrollSize()
692
695
  })
693
696
 
697
+ let shouldActivate = false
698
+
699
+ onDeactivated(() => {
700
+ shouldActivate = true
701
+ })
702
+
694
703
  onActivated(() => {
704
+ if (shouldActivate !== true) { return }
705
+
695
706
  const scrollEl = getVirtualScrollTarget()
696
707
 
697
708
  if (prevScrollStart !== void 0 && scrollEl !== void 0 && scrollEl !== null && scrollEl.nodeType !== 8) {
@@ -1,4 +1,4 @@
1
- import { h, ref, computed, watch, Transition, nextTick, onBeforeUnmount, onMounted, getCurrentInstance } from 'vue'
1
+ import { h, ref, computed, watch, Transition, nextTick, onActivated, onDeactivated, onBeforeUnmount, onMounted, getCurrentInstance } from 'vue'
2
2
 
3
3
  import { isRuntimeSsrPreHydration } from '../../plugins/Platform.js'
4
4
 
@@ -270,7 +270,7 @@ export default function (state) {
270
270
  if (target && (el === null || el.id !== state.targetUid.value)) {
271
271
  target.hasAttribute('tabindex') === true || (target = target.querySelector('[tabindex]'))
272
272
  if (target && target !== el) {
273
- target.focus()
273
+ target.focus({ preventScroll: true })
274
274
  }
275
275
  }
276
276
  }
@@ -288,6 +288,7 @@ export default function (state) {
288
288
  }
289
289
 
290
290
  function onControlFocusin (e) {
291
+ clearTimeout(focusoutTimer)
291
292
  if (state.editable.value === true && state.focused.value === false) {
292
293
  state.focused.value = true
293
294
  emit('focus', e)
@@ -300,13 +301,9 @@ export default function (state) {
300
301
  if (
301
302
  document.hasFocus() === true && (
302
303
  state.hasPopupOpen === true
303
- || (
304
- state.controlRef !== void 0
305
- && (
306
- state.controlRef.value === null
307
- || state.controlRef.value.contains(document.activeElement) !== false
308
- )
309
- )
304
+ || state.controlRef === void 0
305
+ || state.controlRef.value === null
306
+ || state.controlRef.value.contains(document.activeElement) !== false
310
307
  )
311
308
  ) {
312
309
  return
@@ -532,6 +529,16 @@ export default function (state) {
532
529
  // expose public methods
533
530
  Object.assign(proxy, { focus, blur })
534
531
 
532
+ let shouldActivate = false
533
+
534
+ onDeactivated(() => {
535
+ shouldActivate = true
536
+ })
537
+
538
+ onActivated(() => {
539
+ shouldActivate === true && props.autofocus === true && proxy.focus()
540
+ })
541
+
535
542
  onMounted(() => {
536
543
  if (isRuntimeSsrPreHydration.value === true && props.for === void 0) {
537
544
  state.targetUid.value = getTargetUid()
@@ -72,6 +72,7 @@
72
72
  "params": {
73
73
  "rejectedEntries": {
74
74
  "type": "Array",
75
+ "tsType": "QRejectedEntry",
75
76
  "desc": "Array of { failedPropValidation: string, file: File } Objects for files that do not pass the validation",
76
77
  "__exemption": ["examples"]
77
78
  }
@@ -33,6 +33,7 @@
33
33
  "definition": {
34
34
  "classes": {
35
35
  "type": [ "String", "Array", "Object" ],
36
+ "tsType": "VueClassProp",
36
37
  "desc": "CSS classes for this action",
37
38
  "examples": [ "my-class" ]
38
39
  },
@@ -14,6 +14,7 @@
14
14
  "opts": {
15
15
  "desc": "Dialog options",
16
16
  "tsType": "QDialogOptions",
17
+ "autoDefineTsType": true,
17
18
  "definition": {
18
19
  "title": {
19
20
  "type": "String",
@@ -49,11 +49,11 @@ const Plugin = defineReactivePlugin({
49
49
  Object.assign(this, {
50
50
  start (speed) {
51
51
  barRef.value.start(speed)
52
- Plugin.isActive = barRef.value.calls > 0
52
+ Plugin.isActive = true
53
53
  },
54
54
  stop () {
55
- barRef.value.stop()
56
- Plugin.isActive = barRef.value.calls > 0
55
+ const sessions = barRef.value.stop()
56
+ Plugin.isActive = sessions > 0
57
57
  },
58
58
  increment () {
59
59
  barRef.value.increment.apply(null, arguments)
@@ -16,6 +16,14 @@
16
16
  }
17
17
  },
18
18
 
19
+ "props": {
20
+ "isActive": {
21
+ "type": "Boolean",
22
+ "desc": "Is LoadingBar active?",
23
+ "reactive": true
24
+ }
25
+ },
26
+
19
27
  "methods": {
20
28
  "start": {
21
29
  "desc": "Notify bar you've started a background activity",