quasar 1.17.2 → 1.17.6

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 (131) hide show
  1. package/dist/api/LoadingBar.json +7 -0
  2. package/dist/api/QAjaxBar.json +13 -1
  3. package/dist/api/QTree.json +6 -0
  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/ionicons-v4.umd.min.js +1 -1
  9. package/dist/icon-set/line-awesome.umd.min.js +1 -1
  10. package/dist/icon-set/material-icons-outlined.umd.min.js +1 -1
  11. package/dist/icon-set/material-icons-round.umd.min.js +1 -1
  12. package/dist/icon-set/material-icons-sharp.umd.min.js +1 -1
  13. package/dist/icon-set/material-icons.umd.min.js +1 -1
  14. package/dist/icon-set/mdi-v3.umd.min.js +1 -1
  15. package/dist/icon-set/mdi-v4.umd.min.js +1 -1
  16. package/dist/icon-set/mdi-v5.umd.min.js +1 -1
  17. package/dist/icon-set/mdi-v6.umd.min.js +1 -1
  18. package/dist/icon-set/svg-bootstrap-icons.umd.min.js +1 -1
  19. package/dist/icon-set/svg-eva-icons.umd.min.js +1 -1
  20. package/dist/icon-set/svg-fontawesome-v5.umd.min.js +1 -1
  21. package/dist/icon-set/svg-ionicons-v4.umd.min.js +1 -1
  22. package/dist/icon-set/svg-ionicons-v5.umd.min.js +1 -1
  23. package/dist/icon-set/svg-ionicons-v6.umd.min.js +1 -1
  24. package/dist/icon-set/svg-line-awesome.umd.min.js +1 -1
  25. package/dist/icon-set/svg-material-icons-outlined.umd.min.js +1 -1
  26. package/dist/icon-set/svg-material-icons-round.umd.min.js +1 -1
  27. package/dist/icon-set/svg-material-icons-sharp.umd.min.js +1 -1
  28. package/dist/icon-set/svg-material-icons.umd.min.js +1 -1
  29. package/dist/icon-set/svg-mdi-v4.umd.min.js +1 -1
  30. package/dist/icon-set/svg-mdi-v5.umd.min.js +1 -1
  31. package/dist/icon-set/svg-mdi-v6.umd.min.js +1 -1
  32. package/dist/icon-set/svg-themify.umd.min.js +1 -1
  33. package/dist/icon-set/themify.umd.min.js +1 -1
  34. package/dist/lang/ar.umd.min.js +1 -1
  35. package/dist/lang/az-latn.umd.min.js +1 -1
  36. package/dist/lang/bg.umd.min.js +1 -1
  37. package/dist/lang/ca.umd.min.js +1 -1
  38. package/dist/lang/cs.umd.min.js +1 -1
  39. package/dist/lang/da.umd.min.js +1 -1
  40. package/dist/lang/de.umd.min.js +1 -1
  41. package/dist/lang/el.umd.min.js +1 -1
  42. package/dist/lang/en-gb.umd.min.js +1 -1
  43. package/dist/lang/en-us.umd.min.js +1 -1
  44. package/dist/lang/eo.umd.min.js +1 -1
  45. package/dist/lang/es.umd.min.js +1 -1
  46. package/dist/lang/et.umd.min.js +1 -1
  47. package/dist/lang/fa-ir.umd.min.js +1 -1
  48. package/dist/lang/fa.umd.min.js +1 -1
  49. package/dist/lang/fi.umd.min.js +1 -1
  50. package/dist/lang/fr.umd.min.js +1 -1
  51. package/dist/lang/gn.umd.min.js +1 -1
  52. package/dist/lang/he.umd.min.js +1 -1
  53. package/dist/lang/hr.umd.min.js +1 -1
  54. package/dist/lang/hu.umd.min.js +1 -1
  55. package/dist/lang/id.umd.min.js +1 -1
  56. package/dist/lang/is.umd.min.js +1 -1
  57. package/dist/lang/it.umd.min.js +1 -1
  58. package/dist/lang/ja.umd.min.js +1 -1
  59. package/dist/lang/km.umd.min.js +1 -1
  60. package/dist/lang/ko-kr.umd.min.js +1 -1
  61. package/dist/lang/kur-ckb.umd.min.js +1 -1
  62. package/dist/lang/lu.umd.min.js +1 -1
  63. package/dist/lang/lv.umd.min.js +1 -1
  64. package/dist/lang/ml.umd.min.js +1 -1
  65. package/dist/lang/ms.umd.min.js +1 -1
  66. package/dist/lang/my.umd.min.js +6 -0
  67. package/dist/lang/nb-no.umd.min.js +1 -1
  68. package/dist/lang/nl.umd.min.js +1 -1
  69. package/dist/lang/pl.umd.min.js +1 -1
  70. package/dist/lang/pt-br.umd.min.js +1 -1
  71. package/dist/lang/pt.umd.min.js +1 -1
  72. package/dist/lang/ro.umd.min.js +1 -1
  73. package/dist/lang/ru.umd.min.js +1 -1
  74. package/dist/lang/sk.umd.min.js +1 -1
  75. package/dist/lang/sl.umd.min.js +1 -1
  76. package/dist/lang/sr.umd.min.js +1 -1
  77. package/dist/lang/sv.umd.min.js +1 -1
  78. package/dist/lang/ta.umd.min.js +1 -1
  79. package/dist/lang/th.umd.min.js +1 -1
  80. package/dist/lang/tr.umd.min.js +1 -1
  81. package/dist/lang/ug.umd.min.js +1 -1
  82. package/dist/lang/uk.umd.min.js +1 -1
  83. package/dist/lang/vi.umd.min.js +1 -1
  84. package/dist/lang/zh-hans.umd.min.js +1 -1
  85. package/dist/lang/zh-hant.umd.min.js +1 -1
  86. package/dist/quasar.addon.css +1 -1
  87. package/dist/quasar.addon.rtl.css +1 -1
  88. package/dist/quasar.common.js +2 -2
  89. package/dist/quasar.css +8 -4
  90. package/dist/quasar.esm.js +2 -2
  91. package/dist/quasar.ie.polyfills.js +1 -1
  92. package/dist/quasar.ie.polyfills.umd.min.js +1 -1
  93. package/dist/quasar.min.css +1 -1
  94. package/dist/quasar.rtl.css +9 -5
  95. package/dist/quasar.rtl.min.css +1 -1
  96. package/dist/quasar.sass +8 -4
  97. package/dist/quasar.styl +8 -4
  98. package/dist/quasar.umd.js +148 -81
  99. package/dist/quasar.umd.min.js +2 -2
  100. package/dist/quasar.umd.modern.js +141 -77
  101. package/dist/quasar.umd.modern.min.js +2 -2
  102. package/dist/types/index.d.ts +15 -3
  103. package/dist/vetur/quasar-attributes.json +4 -0
  104. package/dist/vetur/quasar-tags.json +1 -0
  105. package/dist/web-types/web-types.json +11 -1
  106. package/lang/index.json +4 -0
  107. package/lang/my.js +96 -0
  108. package/package.json +1 -1
  109. package/src/components/ajax-bar/QAjaxBar.js +22 -11
  110. package/src/components/ajax-bar/QAjaxBar.json +16 -1
  111. package/src/components/date/QDate.js +6 -1
  112. package/src/components/dialog-plugin/DialogPlugin.js +2 -2
  113. package/src/components/field/QField.js +11 -2
  114. package/src/components/form/QForm.js +9 -0
  115. package/src/components/icon/QIcon.js +3 -6
  116. package/src/components/icon/QIcon.sass +4 -3
  117. package/src/components/icon/QIcon.styl +4 -3
  118. package/src/components/infinite-scroll/QInfiniteScroll.js +1 -1
  119. package/src/components/scroll-area/QScrollArea.js +20 -7
  120. package/src/components/scroll-observer/QScrollObserver.js +11 -13
  121. package/src/components/select/QSelect.js +20 -19
  122. package/src/components/select/QSelect.sass +3 -0
  123. package/src/components/select/QSelect.styl +3 -0
  124. package/src/components/tabs/QTabs.js +9 -4
  125. package/src/components/tree/QTree.js +8 -1
  126. package/src/components/tree/QTree.json +7 -0
  127. package/src/mixins/attrs.js +2 -0
  128. package/src/mixins/virtual-scroll.js +8 -2
  129. package/src/plugins/LoadingBar.js +6 -5
  130. package/src/plugins/LoadingBar.json +8 -0
  131. package/src/plugins/Notify.js +1 -1
@@ -313,6 +313,10 @@ export interface Loading {
313
313
  }
314
314
 
315
315
  export interface LoadingBar {
316
+ /**
317
+ * Is LoadingBar active?
318
+ */
319
+ isActive : boolean
316
320
  /**
317
321
  * Notify bar you've started a background activity
318
322
  * @param speed Delay (in milliseconds) between bar progress increments
@@ -999,17 +1003,20 @@ export interface QAjaxBar extends Vue {
999
1003
  /**
1000
1004
  * Notify bar you are waiting for a new process to finish
1001
1005
  * @param speed Delay (in milliseconds) between progress auto-increments; If delay is 0 then it disables auto-incrementing
1006
+ * @returns Number of active simultaneous sessions
1002
1007
  */
1003
- start (speed? : number): void
1008
+ start (speed? : number): number
1004
1009
  /**
1005
1010
  * Manually trigger a bar progress increment
1006
1011
  * @param amount Amount (0 < x <= 100) to increment with
1012
+ * @returns Number of active simultaneous sessions
1007
1013
  */
1008
- increment (amount? : number): void
1014
+ increment (amount? : number): number
1009
1015
  /**
1010
1016
  * Notify bar that one process you were waiting has finished
1017
+ * @returns Number of active simultaneous sessions
1011
1018
  */
1012
- stop (): void
1019
+ stop (): number
1013
1020
  }
1014
1021
 
1015
1022
  export interface QAvatar extends Vue {
@@ -7886,6 +7893,10 @@ export interface QTree extends Vue {
7886
7893
  * Key of node currently selected
7887
7894
  */
7888
7895
  selected? : any
7896
+ /**
7897
+ * Do not allow un-selection when clicking currently selected node
7898
+ */
7899
+ noSelectionUnset? : boolean
7889
7900
  /**
7890
7901
  * Allow the tree to have all its branches expanded, when first rendered
7891
7902
  */
@@ -8983,6 +8994,7 @@ declare module './lang' {
8983
8994
  'lv': true
8984
8995
  'ml': true
8985
8996
  'ms': true
8997
+ 'my': true
8986
8998
  'nb-no': true
8987
8999
  'nl': true
8988
9000
  'pl': true
@@ -5547,6 +5547,10 @@
5547
5547
  "type": "any",
5548
5548
  "description": "Key of node currently selected"
5549
5549
  },
5550
+ "q-tree/no-selection-unset": {
5551
+ "type": "boolean",
5552
+ "description": "Do not allow un-selection when clicking currently selected node"
5553
+ },
5550
5554
  "q-tree/default-expand-all": {
5551
5555
  "type": "boolean",
5552
5556
  "description": "Allow the tree to have all its branches expanded, when first rendered"
@@ -1970,6 +1970,7 @@
1970
1970
  "ticked",
1971
1971
  "expanded",
1972
1972
  "selected",
1973
+ "no-selection-unset",
1973
1974
  "default-expand-all",
1974
1975
  "accordion",
1975
1976
  "filter",
@@ -2,7 +2,7 @@
2
2
  "$schema": "",
3
3
  "framework": "vue",
4
4
  "name": "quasar",
5
- "version": "1.17.2",
5
+ "version": "1.17.6",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "types-syntax": "typescript",
@@ -19788,6 +19788,16 @@
19788
19788
  "description": "Key of node currently selected\n\nExamples:\n:selected.sync=\"selectedKey\"",
19789
19789
  "doc-url": "https://v1.quasar.dev/vue-components/tree"
19790
19790
  },
19791
+ {
19792
+ "name": "no-selection-unset",
19793
+ "value": {
19794
+ "kind": "expression",
19795
+ "type": "boolean"
19796
+ },
19797
+ "description": "Do not allow un-selection when clicking currently selected node",
19798
+ "doc-url": "https://v1.quasar.dev/vue-components/tree",
19799
+ "type": "boolean"
19800
+ },
19791
19801
  {
19792
19802
  "name": "default-expand-all",
19793
19803
  "value": {
package/lang/index.json CHANGED
@@ -127,6 +127,10 @@
127
127
  "isoName": "ms",
128
128
  "nativeName": "Bahasa Melayu"
129
129
  },
130
+ {
131
+ "isoName": "my",
132
+ "nativeName": "Malaysia"
133
+ },
130
134
  {
131
135
  "isoName": "nb-no",
132
136
  "nativeName": "Norsk"
package/lang/my.js ADDED
@@ -0,0 +1,96 @@
1
+ export default {
2
+ isoName: 'my',
3
+ nativeName: 'Malaysia',
4
+ label: {
5
+ clear: 'kosong',
6
+ ok: 'pasti',
7
+ cancel: 'Batal',
8
+ close: 'penutupan',
9
+ set: 'sediakan',
10
+ select: 'pilih',
11
+ reset: 'set semula',
12
+ remove: 'keluarkan',
13
+ update: 'memperbaharui',
14
+ create: 'cipta',
15
+ search: 'cari',
16
+ filter: 'penapis',
17
+ refresh: 'segarkan semula'
18
+ },
19
+ date: {
20
+ days: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
21
+ daysShort: 'Aha_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
22
+ months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'),
23
+ monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogo_Sep_Okt_Nov_Dis'.split('_'),
24
+ headerTitle: function (date) {
25
+ return new Intl.DateTimeFormat('my', {
26
+ weekday: 'short', month: 'short', day: 'numeric'
27
+ }).format(date)
28
+ },
29
+ firstDayOfWeek: 0, // 0-6, 0 - Sunday, 1 Monday, ...
30
+ format24h: false,
31
+ pluralDay: 'langit'
32
+ },
33
+ table: {
34
+ noData: 'tiada data tersedia',
35
+ noResults: 'Tiada data yang sepadan ditemui',
36
+ loading: 'memuatkan...',
37
+ selectedRecords: function (rows) {
38
+ return 'dipilih' + rows + 'baris'
39
+ },
40
+ recordsPerPage: 'baris setiap muka surat:',
41
+ allRows: 'semua',
42
+ pagination: function (start, end, total) {
43
+ return start + '-' + end + ' / ' + total
44
+ },
45
+ columns: 'Senaraikan'
46
+ },
47
+ editor: {
48
+ url: 'URL',
49
+ bold: 'berani',
50
+ italic: 'condong',
51
+ strikethrough: 'tembus',
52
+ underline: 'gariskan',
53
+ unorderedList: 'senarai tidak teratur',
54
+ orderedList: 'senarai pesanan',
55
+ subscript: 'subskrip',
56
+ superscript: 'superskrip',
57
+ hyperlink: 'Hiperpautan',
58
+ toggleFullscreen: 'togol skrin penuh',
59
+ quote: 'tanda petikan',
60
+ left: 'Jajar ke kiri',
61
+ center: 'penjajaran tengah',
62
+ right: 'Sejajar ke kanan',
63
+ justify: 'wajar',
64
+ print: 'Cetak',
65
+ outdent: 'mengurangkan lekukan',
66
+ indent: 'meningkatkan inden',
67
+ removeFormat: 'gaya yang jelas',
68
+ formatting: 'format',
69
+ fontSize: 'Saiz huruf',
70
+ align: 'selaraskan',
71
+ hr: 'Masukkan garisan mendatar',
72
+ undo: 'membatalkan',
73
+ redo: 'buat semula',
74
+ heading1: 'Tajuk satu',
75
+ heading2: 'Tajuk dua',
76
+ heading3: 'Tajuk tiga',
77
+ heading4: 'Tajuk Empat',
78
+ heading5: 'Tajuk Lima',
79
+ heading6: 'Tajuk Enam',
80
+ paragraph: 'perenggan',
81
+ code: 'kod',
82
+ size1: 'sangat kecil',
83
+ size2: 'lebih kecil',
84
+ size3: 'biasa',
85
+ size4: 'sederhana hingga besar',
86
+ size5: 'besar',
87
+ size6: 'sangat besar',
88
+ size7: 'super besar',
89
+ defaultFont: 'fon lalai',
90
+ viewSource: 'menyemak data'
91
+ },
92
+ tree: {
93
+ noNodes: 'tiada nod tersedia',
94
+ noResults: 'Tiada nod yang sepadan ditemui'
95
+ }
96
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quasar",
3
- "version": "1.17.2",
3
+ "version": "1.17.6",
4
4
  "description": "Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time",
5
5
  "module": "src/index.esm.js",
6
6
  "typings": "dist/types/index.d.ts",
@@ -171,18 +171,19 @@ export default Vue.extend({
171
171
  methods: {
172
172
  start (speed = 300) {
173
173
  const oldSpeed = this.speed
174
- this.speed = Math.max(0, speed) || 0
174
+ const newSpeed = this.speed = Math.max(0, speed) || 0
175
175
 
176
176
  this.calls++
177
177
 
178
178
  if (this.calls > 1) {
179
- if (oldSpeed === 0 && speed > 0) {
179
+ if (oldSpeed === 0 && newSpeed > 0) {
180
180
  this.__work()
181
181
  }
182
- else if (oldSpeed > 0 && speed <= 0) {
182
+ else if (oldSpeed > 0 && newSpeed <= 0) {
183
183
  clearTimeout(this.timer)
184
184
  }
185
- return
185
+
186
+ return this.calls
186
187
  }
187
188
 
188
189
  clearTimeout(this.timer)
@@ -190,25 +191,33 @@ export default Vue.extend({
190
191
 
191
192
  this.progress = 0
192
193
 
193
- if (this.onScreen === true) { return }
194
-
195
- this.onScreen = true
196
- this.animate = false
197
194
  this.timer = setTimeout(() => {
198
195
  this.animate = true
199
- speed > 0 && this.__work()
200
- }, 100)
196
+ newSpeed > 0 && this.__work()
197
+ }, this.onScreen === true ? 500 : 1)
198
+
199
+ if (this.onScreen !== true) {
200
+ this.onScreen = true
201
+ this.animate = false
202
+ }
203
+
204
+ return this.calls
201
205
  },
202
206
 
203
207
  increment (amount) {
204
208
  if (this.calls > 0) {
205
209
  this.progress = inc(this.progress, amount)
206
210
  }
211
+
212
+ return this.calls
207
213
  },
208
214
 
209
215
  stop () {
210
216
  this.calls = Math.max(0, this.calls - 1)
211
- if (this.calls > 0) { return }
217
+
218
+ if (this.calls > 0) {
219
+ return this.calls
220
+ }
212
221
 
213
222
  clearTimeout(this.timer)
214
223
  this.$emit('stop')
@@ -227,6 +236,8 @@ export default Vue.extend({
227
236
  else {
228
237
  end()
229
238
  }
239
+
240
+ return this.calls
230
241
  },
231
242
 
232
243
  __work () {
@@ -73,6 +73,11 @@
73
73
  "desc": "Delay (in milliseconds) between progress auto-increments; If delay is 0 then it disables auto-incrementing",
74
74
  "examples": [ 400, 0 ]
75
75
  }
76
+ },
77
+ "returns": {
78
+ "type": "Number",
79
+ "desc": "Number of active simultaneous sessions",
80
+ "__exemption": [ "examples" ]
76
81
  }
77
82
  },
78
83
 
@@ -84,11 +89,21 @@
84
89
  "desc": "Amount (0 < x <= 100) to increment with",
85
90
  "examples": [ 1 ]
86
91
  }
92
+ },
93
+ "returns": {
94
+ "type": "Number",
95
+ "desc": "Number of active simultaneous sessions",
96
+ "__exemption": [ "examples" ]
87
97
  }
88
98
  },
89
99
 
90
100
  "stop": {
91
- "desc": "Notify bar that one process you were waiting has finished"
101
+ "desc": "Notify bar that one process you were waiting has finished",
102
+ "returns": {
103
+ "type": "Number",
104
+ "desc": "Number of active simultaneous sessions",
105
+ "__exemption": [ "examples" ]
106
+ }
92
107
  }
93
108
  }
94
109
  }
@@ -150,7 +150,12 @@ export default Vue.extend({
150
150
  return this.normalizedModel
151
151
  .filter(date => typeof date === 'string')
152
152
  .map(date => this.__decodeString(date, this.innerMask, this.innerLocale))
153
- .filter(date => date.dateHash !== null)
153
+ .filter(date =>
154
+ date.dateHash !== null &&
155
+ date.day !== null &&
156
+ date.month !== null &&
157
+ date.year !== null
158
+ )
154
159
  },
155
160
 
156
161
  rangeModel () {
@@ -120,8 +120,8 @@ export default Vue.extend({
120
120
  color: this.vmColor,
121
121
  label: this.okLabel,
122
122
  ripple: false,
123
- ...(Object(this.ok) === this.ok ? this.ok : { flat: true }),
124
- disable: this.okDisabled
123
+ disable: this.okDisabled,
124
+ ...(Object(this.ok) === this.ok ? this.ok : { flat: true })
125
125
  }
126
126
  },
127
127
 
@@ -7,7 +7,7 @@ import QSpinner from '../spinner/QSpinner.js'
7
7
 
8
8
  import ValidateMixin from '../../mixins/validate.js'
9
9
  import DarkMixin from '../../mixins/dark.js'
10
- import AttrsMixin from '../../mixins/attrs.js'
10
+ import AttrsMixin, { iconAsButton } from '../../mixins/attrs.js'
11
11
 
12
12
  import { slot } from '../../utils/slot.js'
13
13
  import uid from '../../utils/uid.js'
@@ -319,7 +319,7 @@ export default Vue.extend({
319
319
  h(QIcon, {
320
320
  staticClass: 'q-field__focusable-action',
321
321
  props: { tag: 'button', name: this.clearIcon || this.$q.iconSet.field.clear },
322
- attrs: { tabindex: 0, type: 'button' },
322
+ attrs: iconAsButton,
323
323
  on: this.clearableEvents
324
324
  })
325
325
  ])
@@ -596,6 +596,15 @@ export default Vue.extend({
596
596
  this.autofocus === true && this.focus()
597
597
  },
598
598
 
599
+ activated () {
600
+ if (this.shouldActivate !== true) { return }
601
+ this.autofocus === true && this.focus()
602
+ },
603
+
604
+ deactivated () {
605
+ this.shouldActivate = true
606
+ },
607
+
599
608
  beforeDestroy () {
600
609
  clearTimeout(this.focusoutTimer)
601
610
  }
@@ -33,6 +33,15 @@ export default Vue.extend({
33
33
  this.autofocus === true && this.focus()
34
34
  },
35
35
 
36
+ activated () {
37
+ if (this.shouldActivate !== true) { return }
38
+ this.autofocus === true && this.focus()
39
+ },
40
+
41
+ deactivated () {
42
+ this.shouldActivate = true
43
+ },
44
+
36
45
  methods: {
37
46
  validate (shouldFocus) {
38
47
  const promises = []
@@ -173,18 +173,16 @@ export default Vue.extend({
173
173
  }
174
174
 
175
175
  if (this.type.img === true) {
176
- return h('div', data, mergeSlot([
176
+ return h('span', data, mergeSlot([
177
177
  h('img', {
178
- class: this.type.cls,
179
178
  attrs: { src: this.type.src }
180
179
  })
181
180
  ], this, 'default'))
182
181
  }
183
182
 
184
183
  if (this.type.svg === true) {
185
- return h('div', data, mergeSlot([
184
+ return h('span', data, mergeSlot([
186
185
  h('svg', {
187
- class: this.type.cls,
188
186
  attrs: {
189
187
  viewBox: this.type.viewBox,
190
188
  focusable: 'false' /* needed for IE11 */
@@ -194,9 +192,8 @@ export default Vue.extend({
194
192
  }
195
193
 
196
194
  if (this.type.svguse === true) {
197
- return h('div', data, mergeSlot([
195
+ return h('span', data, mergeSlot([
198
196
  h('svg', {
199
- class: this.type.cls,
200
197
  attrs: {
201
198
  viewBox: this.type.viewBox,
202
199
  focusable: 'false' /* needed for IE11 */
@@ -19,9 +19,10 @@
19
19
  align-items: center
20
20
  justify-content: center
21
21
 
22
- > svg
23
- width: 100%
24
- height: 100%
22
+ > svg,
23
+ > img
24
+ width: 1em
25
+ height: 1em
25
26
 
26
27
  .q-icon,
27
28
  .material-icons,
@@ -19,9 +19,10 @@
19
19
  align-items: center
20
20
  justify-content: center
21
21
 
22
- > svg
23
- width: 100%
24
- height: 100%
22
+ > svg,
23
+ > img
24
+ width: 1em
25
+ height: 1em
25
26
 
26
27
  .q-icon,
27
28
  .material-icons,
@@ -194,7 +194,7 @@ export default Vue.extend({
194
194
  },
195
195
 
196
196
  activated () {
197
- if (this.__scrollTarget && this.__scrollPosition !== void 0) {
197
+ if (this.__scrollPosition !== void 0 && this.__scrollTarget) {
198
198
  setScrollPosition(this.__scrollTarget, this.__scrollPosition)
199
199
  }
200
200
  },
@@ -119,6 +119,14 @@ export default Vue.extend({
119
119
  ) || this.scroll.horizontal.size <= this.container.horizontal + 1
120
120
  },
121
121
 
122
+ verticalThumbStart () {
123
+ return this.verticalScrollPercentage * (this.container.vertical - this.verticalThumbSize)
124
+ },
125
+
126
+ horizontalThumbStart () {
127
+ return this.horizontalScrollPercentage * (this.container.horizontal - this.horizontalThumbSize)
128
+ },
129
+
122
130
  verticalThumbSize () {
123
131
  return Math.round(
124
132
  between(
@@ -140,21 +148,19 @@ export default Vue.extend({
140
148
  },
141
149
 
142
150
  verticalStyle () {
143
- const pos = this.verticalScrollPercentage * (this.container.vertical - this.verticalThumbSize)
144
151
  return {
145
152
  ...this.thumbStyle,
146
153
  ...this.verticalThumbStyle,
147
- top: `${pos}px`,
154
+ top: `${this.verticalThumbStart}px`,
148
155
  height: `${this.verticalThumbSize}px`
149
156
  }
150
157
  },
151
158
 
152
159
  horizontalStyle () {
153
- const pos = this.horizontalScrollPercentage * (this.container.horizontal - this.horizontalThumbSize)
154
160
  return {
155
161
  ...this.thumbStyle,
156
162
  ...this.horizontalThumbStyle,
157
- left: `${pos}px`,
163
+ left: `${this.horizontalThumbStart}px`,
158
164
  width: `${this.horizontalThumbSize}px`
159
165
  }
160
166
  },
@@ -185,6 +191,7 @@ export default Vue.extend({
185
191
  ...this.scroll.vertical,
186
192
  percentage: this.verticalScrollPercentage,
187
193
  thumbHidden: this.verticalThumbHidden,
194
+ thumbStart: this.verticalThumbStart,
188
195
  thumbSize: this.verticalThumbSize,
189
196
  style: this.verticalStyle,
190
197
  thumbClass: this.verticalThumbClass,
@@ -194,6 +201,7 @@ export default Vue.extend({
194
201
  ...this.scroll.horizontal,
195
202
  percentage: this.horizontalScrollPercentage,
196
203
  thumbHidden: this.horizontalThumbHidden,
204
+ thumbStart: this.horizontalThumbStart,
197
205
  thumbSize: this.horizontalThumbSize,
198
206
  style: this.horizontalStyle,
199
207
  thumbClass: this.horizontalThumbClass,
@@ -407,8 +415,11 @@ export default Vue.extend({
407
415
  const data = this.scrollComputed[ axis ]
408
416
 
409
417
  if (data.thumbHidden !== true) {
410
- const pos = evt[ dirProps[ axis ].offset ] - data.thumbSize / 2
411
- this.__setScroll(pos / this.container[ axis ] * data.size, axis)
418
+ const offset = evt[ dirProps[ axis ].offset ]
419
+ if (offset < data.thumbStart || offset > data.thumbStart + data.thumbSize) {
420
+ const pos = offset - data.thumbSize / 2
421
+ this.__setScroll(pos / this.container[ axis ] * data.size, axis)
422
+ }
412
423
 
413
424
  const ref = axis === 'vertical' ? this.$refs.verticalThumb : this.$refs.horizontalThumb
414
425
  // activate thumb pan
@@ -537,9 +548,11 @@ export default Vue.extend({
537
548
  },
538
549
 
539
550
  activated () {
551
+ if (this.__scrollPosition === void 0) { return }
552
+
540
553
  const scrollTarget = this.getScrollTarget()
541
554
 
542
- if (scrollTarget !== void 0 && this.__scrollPosition !== void 0) {
555
+ if (scrollTarget !== void 0) {
543
556
  setHorizontalScrollPosition(scrollTarget, this.__scrollPosition.left)
544
557
  setVerticalScrollPosition(scrollTarget, this.__scrollPosition.top)
545
558
  }
@@ -49,19 +49,20 @@ export default Vue.extend({
49
49
  if (immediately === true || this.debounce === 0 || this.debounce === '0') {
50
50
  this.__emit()
51
51
  }
52
- else if (this.timer === null) {
53
- this.timer = this.debounce
54
- ? setTimeout(this.__emit, this.debounce)
55
- : requestAnimationFrame(this.__emit)
52
+ else if (this.clearTimer === void 0) {
53
+ const [ timer, fn ] = this.debounce
54
+ ? [ setTimeout(this.__emit, this.debounce), clearTimeout ]
55
+ : [ requestAnimationFrame(this.__emit), cancelAnimationFrame ]
56
+
57
+ this.clearTimer = () => {
58
+ fn(timer)
59
+ this.clearTimer = void 0
60
+ }
56
61
  }
57
62
  },
58
63
 
59
64
  __emit () {
60
- if (this.timer !== null) {
61
- clearTimeout(this.timer)
62
- cancelAnimationFrame(this.timer)
63
- this.timer = null
64
- }
65
+ this.clearTimer !== void 0 && this.clearTimer()
65
66
 
66
67
  const fn = this.horizontal === true
67
68
  ? getHorizontalScrollPosition
@@ -100,14 +101,11 @@ export default Vue.extend({
100
101
  },
101
102
 
102
103
  mounted () {
103
- this.timer = null
104
-
105
104
  this.__configureScrollTarget()
106
105
  },
107
106
 
108
107
  beforeDestroy () {
109
- clearTimeout(this.timer)
110
- cancelAnimationFrame(this.timer)
108
+ this.clearTimer !== void 0 && this.clearTimer()
111
109
  this.__unconfigureScrollTarget()
112
110
  }
113
111
  })