quasar 2.7.7 → 2.8.1

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 (175) hide show
  1. package/dist/api/Loading.json +57 -1
  2. package/dist/api/QBtnDropdown.json +4 -0
  3. package/dist/api/QEditor.json +105 -97
  4. package/dist/api/QField.json +6 -0
  5. package/dist/api/QFile.json +6 -0
  6. package/dist/api/QInput.json +6 -0
  7. package/dist/api/QSelect.json +6 -0
  8. package/dist/api/QTable.json +36 -49
  9. package/dist/api/QUploader.json +86 -8
  10. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  11. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  12. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  13. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  14. package/dist/icon-set/fontawesome-v6-pro.umd.prod.js +1 -1
  15. package/dist/icon-set/fontawesome-v6.umd.prod.js +1 -1
  16. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  17. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  18. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  19. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  20. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  21. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  22. package/dist/icon-set/material-symbols-outlined.umd.prod.js +1 -1
  23. package/dist/icon-set/material-symbols-rounded.umd.prod.js +1 -1
  24. package/dist/icon-set/material-symbols-sharp.umd.prod.js +1 -1
  25. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  26. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  27. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  28. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  29. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  30. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  31. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  32. package/dist/icon-set/svg-fontawesome-v6.umd.prod.js +2 -2
  33. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  34. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  35. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
  36. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  37. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  38. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  39. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  40. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  41. package/dist/icon-set/svg-material-symbols-outlined.umd.prod.js +2 -2
  42. package/dist/icon-set/svg-material-symbols-rounded.umd.prod.js +2 -2
  43. package/dist/icon-set/svg-material-symbols-sharp.umd.prod.js +2 -2
  44. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  45. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  46. package/dist/icon-set/themify.umd.prod.js +1 -1
  47. package/dist/lang/ar-TN.umd.prod.js +1 -1
  48. package/dist/lang/ar.umd.prod.js +1 -1
  49. package/dist/lang/az-Latn.umd.prod.js +1 -1
  50. package/dist/lang/bg.umd.prod.js +1 -1
  51. package/dist/lang/bn.umd.prod.js +1 -1
  52. package/dist/lang/ca.umd.prod.js +1 -1
  53. package/dist/lang/cs.umd.prod.js +1 -1
  54. package/dist/lang/da.umd.prod.js +1 -1
  55. package/dist/lang/de.umd.prod.js +1 -1
  56. package/dist/lang/el.umd.prod.js +1 -1
  57. package/dist/lang/en-GB.umd.prod.js +1 -1
  58. package/dist/lang/en-US.umd.prod.js +1 -1
  59. package/dist/lang/eo.umd.prod.js +1 -1
  60. package/dist/lang/es.umd.prod.js +1 -1
  61. package/dist/lang/et.umd.prod.js +1 -1
  62. package/dist/lang/eu.umd.prod.js +1 -1
  63. package/dist/lang/fa-IR.umd.prod.js +1 -1
  64. package/dist/lang/fa.umd.prod.js +1 -1
  65. package/dist/lang/fi.umd.prod.js +1 -1
  66. package/dist/lang/fr.umd.prod.js +1 -1
  67. package/dist/lang/gn.umd.prod.js +1 -1
  68. package/dist/lang/he.umd.prod.js +1 -1
  69. package/dist/lang/hr.umd.prod.js +1 -1
  70. package/dist/lang/hu.umd.prod.js +1 -1
  71. package/dist/lang/id.umd.prod.js +1 -1
  72. package/dist/lang/is.umd.prod.js +1 -1
  73. package/dist/lang/it.umd.prod.js +1 -1
  74. package/dist/lang/ja.umd.prod.js +1 -1
  75. package/dist/lang/km.umd.prod.js +1 -1
  76. package/dist/lang/ko-KR.umd.prod.js +1 -1
  77. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  78. package/dist/lang/kz.umd.prod.js +1 -1
  79. package/dist/lang/lt.umd.prod.js +1 -1
  80. package/dist/lang/lu.umd.prod.js +1 -1
  81. package/dist/lang/lv.umd.prod.js +1 -1
  82. package/dist/lang/ml.umd.prod.js +1 -1
  83. package/dist/lang/mm.umd.prod.js +1 -1
  84. package/dist/lang/ms.umd.prod.js +1 -1
  85. package/dist/lang/my.umd.prod.js +1 -1
  86. package/dist/lang/nb-NO.umd.prod.js +1 -1
  87. package/dist/lang/nl.umd.prod.js +1 -1
  88. package/dist/lang/pl.umd.prod.js +1 -1
  89. package/dist/lang/pt-BR.umd.prod.js +1 -1
  90. package/dist/lang/pt.umd.prod.js +1 -1
  91. package/dist/lang/ro.umd.prod.js +1 -1
  92. package/dist/lang/ru.umd.prod.js +1 -1
  93. package/dist/lang/sk.umd.prod.js +1 -1
  94. package/dist/lang/sl.umd.prod.js +1 -1
  95. package/dist/lang/sm.umd.prod.js +1 -1
  96. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  97. package/dist/lang/sr.umd.prod.js +1 -1
  98. package/dist/lang/sv.umd.prod.js +1 -1
  99. package/dist/lang/ta.umd.prod.js +1 -1
  100. package/dist/lang/th.umd.prod.js +1 -1
  101. package/dist/lang/tr.umd.prod.js +1 -1
  102. package/dist/lang/ug.umd.prod.js +1 -1
  103. package/dist/lang/uk.umd.prod.js +1 -1
  104. package/dist/lang/uz-Cyrl.umd.prod.js +1 -1
  105. package/dist/lang/uz-Latn.umd.prod.js +1 -1
  106. package/dist/lang/vi.umd.prod.js +1 -1
  107. package/dist/lang/zh-CN.umd.prod.js +1 -1
  108. package/dist/lang/zh-TW.umd.prod.js +1 -1
  109. package/dist/quasar.cjs.prod.js +2 -2
  110. package/dist/quasar.esm.js +39647 -0
  111. package/dist/quasar.esm.prod.js +2 -2
  112. package/dist/quasar.sass +1 -1
  113. package/dist/quasar.umd.js +355 -295
  114. package/dist/quasar.umd.prod.js +2 -2
  115. package/dist/transforms/import-map.json +1 -0
  116. package/dist/types/index.d.ts +223 -117
  117. package/dist/web-types/web-types.json +6 -1
  118. package/package.json +1 -1
  119. package/src/components/banner/QBanner.js +2 -2
  120. package/src/components/bar/QBar.js +2 -2
  121. package/src/components/btn-dropdown/QBtnDropdown.js +8 -2
  122. package/src/components/btn-dropdown/QBtnDropdown.json +5 -0
  123. package/src/components/card/QCard.js +2 -2
  124. package/src/components/carousel/QCarousel.js +1 -1
  125. package/src/components/date/QDate.js +6 -6
  126. package/src/components/dialog-plugin/DialogPlugin.js +1 -1
  127. package/src/components/editor/QEditor.js +5 -5
  128. package/src/components/editor/QEditor.json +76 -67
  129. package/src/components/infinite-scroll/QInfiniteScroll.js +7 -7
  130. package/src/components/page-sticky/use-page-sticky.js +1 -2
  131. package/src/components/popup-edit/QPopupEdit.js +10 -10
  132. package/src/components/popup-proxy/QPopupProxy.js +7 -7
  133. package/src/components/pull-to-refresh/QPullToRefresh.js +3 -3
  134. package/src/components/range/QRange.js +5 -1
  135. package/src/components/resize-observer/QResizeObserver.js +6 -6
  136. package/src/components/scroll-area/QScrollArea.js +25 -25
  137. package/src/components/scroll-observer/QScrollObserver.js +3 -3
  138. package/src/components/select/QSelect.js +2 -1
  139. package/src/components/slider/QSlider.js +5 -1
  140. package/src/components/slider/use-slider.js +1 -1
  141. package/src/components/table/QTable.json +28 -50
  142. package/src/components/table/table-column-selection.js +1 -1
  143. package/src/components/table/table-pagination.js +0 -4
  144. package/src/components/table/table-sort.js +1 -1
  145. package/src/components/time/QTime.js +5 -5
  146. package/src/components/tree/QTree.js +2 -2
  147. package/src/components/uploader/QUploader.json +107 -0
  148. package/src/components/uploader/__tests__/QUploader.spec.js +33 -2
  149. package/src/components/uploader/uploader-core.js +48 -53
  150. package/src/composables/private/use-field.js +5 -4
  151. package/src/composables/private/use-file.js +1 -0
  152. package/src/composables/private/use-panel.js +7 -7
  153. package/src/composables/private/use-portal.js +7 -7
  154. package/src/composables/private/use-validate.json +7 -0
  155. package/src/directives/ClosePopup.js +4 -4
  156. package/src/directives/Intersection.js +1 -1
  157. package/src/index.dev.js +16 -0
  158. package/src/{index.all.js → index.ssr.js} +0 -0
  159. package/src/install-quasar.js +1 -1
  160. package/src/plugins/Loading.js +122 -73
  161. package/src/plugins/Loading.json +48 -1
  162. package/src/plugins/LoadingBar.js +1 -1
  163. package/src/plugins/Notify.js +1 -1
  164. package/src/utils/create-uploader-component.js +1 -1
  165. package/src/utils/date.js +1 -1
  166. package/src/utils/dom.js +2 -5
  167. package/src/utils/{private/is.js → is.js} +11 -7
  168. package/src/utils/morph.js +1 -1
  169. package/src/utils/open-url.js +7 -2
  170. package/src/utils/private/click-outside.js +3 -3
  171. package/src/utils/private/date-persian.js +12 -12
  172. package/src/utils/private/portal.js +24 -24
  173. package/src/utils/private/vm.js +10 -9
  174. package/src/utils/private/web-storage.js +1 -1
  175. package/src/utils.js +2 -0
@@ -76,74 +76,83 @@
76
76
  ":definitions=\"{ save: { tip: 'Save your work', icon: 'save', label: 'Save', handler: saveWork }, upload: { tip: 'Upload to cloud', icon: 'cloud_upload', label: 'Upload', handler: uploadIt } }\""
77
77
  ],
78
78
  "definition": {
79
- "label": {
80
- "type": "String",
81
- "desc": "Label of the button",
82
- "examples": [ "Addresses" ]
83
- },
84
- "tip": {
85
- "type": "String",
86
- "desc": "Text to be displayed as a tooltip on hover",
87
- "examples": [ "Add a contact from the Address Book" ]
88
- },
89
- "htmlTip": {
90
- "type": "String",
91
- "desc": "HTML formatted text to be displayed within a tooltip on hover",
92
- "examples": [ "Add a <span class=\"red\">user</span> from the address book" ]
93
- },
94
- "icon": {
95
- "type": "String",
96
- "desc": "Icon of the button",
97
- "examples": [ "fas fa-address-book" ]
98
- },
99
- "key": {
100
- "type": "Number",
101
- "desc": "Keycode of a key to be used together with the <ctrl> key for use as a shortcut to trigger this element",
102
- "examples": [ "12", "36" ]
103
- },
104
- "handler": {
105
- "type": "Function",
106
- "desc": "Either this or \"cmd\" is required. Function for when button gets clicked/tapped.",
107
- "params": null,
108
- "returns": null,
109
- "examples": [ "() => this.uploadFile()" ]
110
- },
111
- "cmd": {
112
- "type": "String",
113
- "desc": "Either this or \"handler\" is required. This must be a valid execCommand method according to the designMode API.",
114
- "examples": [ "insertHTML", "justifyFull" ]
115
- },
116
- "param": {
117
- "type": "String",
118
- "desc": "Only set a param if using a \"cmd\". This is commonly text or HTML to inject, but is highly dependent upon the specific cmd being called.",
119
- "examples": [ "<img src=\"://uploads/001.jpg\" alt=\"nice pic\" />" ]
120
- },
121
- "disable": {
122
- "type": [ "Boolean", "Function" ],
123
- "desc": "Is button disabled?",
124
- "returns": {
125
- "type": "Boolean",
126
- "desc": "If true, the button will be disabled"
79
+ "...commandName": {
80
+ "type": "Object",
81
+ "tsType": "QEditorCommand",
82
+ "autoDefineTsType": true,
83
+ "desc": "Command definition",
84
+ "definition": {
85
+ "label": {
86
+ "type": "String",
87
+ "desc": "Label of the button",
88
+ "examples": [ "Addresses" ]
89
+ },
90
+ "tip": {
91
+ "type": "String",
92
+ "desc": "Text to be displayed as a tooltip on hover",
93
+ "examples": [ "Add a contact from the Address Book" ]
94
+ },
95
+ "htmlTip": {
96
+ "type": "String",
97
+ "desc": "HTML formatted text to be displayed within a tooltip on hover",
98
+ "examples": [ "Add a <span class=\"red\">user</span> from the address book" ]
99
+ },
100
+ "icon": {
101
+ "type": "String",
102
+ "desc": "Icon of the button",
103
+ "examples": [ "fas fa-address-book" ]
104
+ },
105
+ "key": {
106
+ "type": "Number",
107
+ "desc": "Keycode of a key to be used together with the <ctrl> key for use as a shortcut to trigger this element",
108
+ "examples": [ "12", "36" ]
109
+ },
110
+ "handler": {
111
+ "type": "Function",
112
+ "desc": "Either this or \"cmd\" is required. Function for when button gets clicked/tapped.",
113
+ "params": null,
114
+ "returns": null,
115
+ "examples": [ "() => this.uploadFile()" ]
116
+ },
117
+ "cmd": {
118
+ "type": "String",
119
+ "desc": "Either this or \"handler\" is required. This must be a valid execCommand method according to the designMode API.",
120
+ "examples": [ "insertHTML", "justifyFull" ]
121
+ },
122
+ "param": {
123
+ "type": "String",
124
+ "desc": "Only set a param if using a \"cmd\". This is commonly text or HTML to inject, but is highly dependent upon the specific cmd being called.",
125
+ "examples": [ "<img src=\"://uploads/001.jpg\" alt=\"nice pic\" />" ]
126
+ },
127
+ "disable": {
128
+ "type": [ "Boolean", "Function" ],
129
+ "desc": "Is button disabled?",
130
+ "returns": {
131
+ "type": "Boolean",
132
+ "desc": "If true, the button will be disabled"
133
+ },
134
+ "examples": [ "!user.active", "() => !checkIfUserIsActive()" ]
135
+ },
136
+ "type": {
137
+ "type": "String",
138
+ "desc": "Pass the value \"no-state\" if the button should not have an \"active\" state",
139
+ "values": [ null, "no-state" ],
140
+ "examples": [ "no-state" ]
141
+ },
142
+ "fixedLabel": {
143
+ "type": "Boolean",
144
+ "desc": "Lock the button label, so it doesn't change based on the child option selected."
145
+ },
146
+ "fixedIcon": {
147
+ "type": "Boolean",
148
+ "desc": "Lock the button icon, so it doesn't change based on the child option selected."
149
+ },
150
+ "highlight": {
151
+ "type": "Boolean",
152
+ "desc": "Highlight the toolbar button, when a child option has been selected."
153
+ }
127
154
  },
128
- "examples": [ "!user.active", "() => !checkIfUserIsActive()" ]
129
- },
130
- "type": {
131
- "type": "String",
132
- "desc": "Pass the value \"no-state\" if the button should not have an \"active\" state",
133
- "values": [ null, "no-state" ],
134
- "examples": [ "no-state" ]
135
- },
136
- "fixedLabel": {
137
- "type": "Boolean",
138
- "desc": "Lock the button label, so it doesn't change based on the child option selected."
139
- },
140
- "fixedIcon": {
141
- "type": "Boolean",
142
- "desc": "Lock the button icon, so it doesn't change based on the child option selected."
143
- },
144
- "highlight": {
145
- "type": "Boolean",
146
- "desc": "Highlight the toolbar button, when a child option has been selected."
155
+ "__exemption": [ "examples" ]
147
156
  }
148
157
  },
149
158
  "category": "toolbar"
@@ -152,13 +152,6 @@ export default createComponent({
152
152
  index = newIndex
153
153
  }
154
154
 
155
- // expose public methods
156
- const vm = getCurrentInstance()
157
- Object.assign(vm.proxy, {
158
- poll: () => { poll !== void 0 && poll() },
159
- trigger, stop, reset, resume, setIndex
160
- })
161
-
162
155
  function setDebounce (val) {
163
156
  val = parseInt(val, 10)
164
157
 
@@ -217,6 +210,13 @@ export default createComponent({
217
210
  updateScrollTarget()
218
211
  })
219
212
 
213
+ // expose public methods
214
+ const vm = getCurrentInstance()
215
+ Object.assign(vm.proxy, {
216
+ poll: () => { poll !== void 0 && poll() },
217
+ trigger, stop, reset, resume, setIndex
218
+ })
219
+
220
220
  return () => {
221
221
  const child = hUniqueSlot(slots.default, [])
222
222
 
@@ -21,8 +21,7 @@ export const usePageStickyProps = {
21
21
  }
22
22
 
23
23
  export default function () {
24
- const { props, proxy } = getCurrentInstance()
25
- const { $q } = proxy
24
+ const { props, proxy: { $q } } = getCurrentInstance()
26
25
 
27
26
  const $layout = inject(layoutKey, () => {
28
27
  console.error('QPageSticky needs to be child of QLayout')
@@ -5,7 +5,7 @@ import QBtn from '../btn/QBtn.js'
5
5
 
6
6
  import { createComponent } from '../../utils/private/create.js'
7
7
  import clone from '../../utils/clone.js'
8
- import { isDeepEqual } from '../../utils/private/is.js'
8
+ import { isDeepEqual } from '../../utils/is.js'
9
9
  import { injectProp } from '../../utils/private/inject-obj-prop.js'
10
10
 
11
11
  export default createComponent({
@@ -135,15 +135,6 @@ export default createComponent({
135
135
  emit('hide')
136
136
  }
137
137
 
138
- // expose public methods
139
- Object.assign(proxy, {
140
- set,
141
- cancel,
142
- show (e) { menuRef.value !== null && menuRef.value.show(e) },
143
- hide (e) { menuRef.value !== null && menuRef.value.hide(e) },
144
- updatePosition
145
- })
146
-
147
138
  function getContent () {
148
139
  const child = slots.default !== void 0
149
140
  ? [].concat(slots.default(scope.value))
@@ -173,6 +164,15 @@ export default createComponent({
173
164
  return child
174
165
  }
175
166
 
167
+ // expose public methods
168
+ Object.assign(proxy, {
169
+ set,
170
+ cancel,
171
+ show (e) { menuRef.value !== null && menuRef.value.show(e) },
172
+ hide (e) { menuRef.value !== null && menuRef.value.hide(e) },
173
+ updatePosition
174
+ })
175
+
176
176
  return () => {
177
177
  if (props.disable === true) { return }
178
178
 
@@ -49,13 +49,6 @@ export default createComponent({
49
49
  }
50
50
  })
51
51
 
52
- // expose public methods
53
- Object.assign(proxy, {
54
- show (evt) { canShow(evt) === true && popupRef.value.show(evt) },
55
- hide (evt) { popupRef.value.hide(evt) },
56
- toggle (evt) { popupRef.value.toggle(evt) }
57
- })
58
-
59
52
  function onShow (evt) {
60
53
  showing.value = true
61
54
  emit('show', evt)
@@ -67,6 +60,13 @@ export default createComponent({
67
60
  emit('hide', evt)
68
61
  }
69
62
 
63
+ // expose public methods
64
+ Object.assign(proxy, {
65
+ show (evt) { canShow(evt) === true && popupRef.value.show(evt) },
66
+ hide (evt) { popupRef.value.hide(evt) },
67
+ toggle (evt) { popupRef.value.toggle(evt) }
68
+ })
69
+
70
70
  return () => {
71
71
  const data = {
72
72
  ref: popupRef,
@@ -155,9 +155,6 @@ export default createComponent({
155
155
  }, 300)
156
156
  }
157
157
 
158
- // expose public methods
159
- Object.assign(proxy, { trigger, updateScrollTarget })
160
-
161
158
  let $el, localScrollTarget, timer
162
159
 
163
160
  function updateScrollTarget () {
@@ -175,6 +172,9 @@ export default createComponent({
175
172
  clearTimeout(timer)
176
173
  })
177
174
 
175
+ // expose public methods
176
+ Object.assign(proxy, { trigger, updateScrollTarget })
177
+
178
178
  return () => {
179
179
  const child = [
180
180
  h('div', { class: contentClass.value }, hSlot(slots.default)),
@@ -327,7 +327,11 @@ export default createComponent({
327
327
 
328
328
  const
329
329
  stepVal = ([ 34, 33 ].includes(evt.keyCode) ? 10 : 1) * state.step.value,
330
- offset = ([ 34, 37, 40 ].includes(evt.keyCode) ? -1 : 1) * (state.isReversed.value === true ? -1 : 1) * stepVal
330
+ offset = (
331
+ ([ 34, 37, 40 ].includes(evt.keyCode) ? -1 : 1)
332
+ * (state.isReversed.value === true ? -1 : 1)
333
+ * (props.vertical === true ? -1 : 1) * stepVal
334
+ )
331
335
 
332
336
  if (state.focus.value === 'both') {
333
337
  const interval = model.value.max - model.value.min
@@ -53,17 +53,14 @@ export default createComponent({
53
53
  }
54
54
  }
55
55
 
56
- const vm = getCurrentInstance()
57
-
58
- // expose public methods
59
- Object.assign(vm.proxy, { trigger })
56
+ const { proxy } = getCurrentInstance()
60
57
 
61
58
  if (hasObserver === true) {
62
59
  let observer
63
60
 
64
61
  onMounted(() => {
65
62
  nextTick(() => {
66
- targetEl = vm.proxy.$el.parentNode
63
+ targetEl = proxy.$el.parentNode
67
64
 
68
65
  if (targetEl) {
69
66
  observer = new ResizeObserver(trigger)
@@ -117,13 +114,16 @@ export default createComponent({
117
114
 
118
115
  onMounted(() => {
119
116
  nextTick(() => {
120
- targetEl = vm.proxy.$el
117
+ targetEl = proxy.$el
121
118
  targetEl && onObjLoad()
122
119
  })
123
120
  })
124
121
 
125
122
  onBeforeUnmount(cleanup)
126
123
 
124
+ // expose public method
125
+ proxy.trigger = trigger
126
+
127
127
  return () => {
128
128
  if (canRender.value === true) {
129
129
  return h('object', {
@@ -84,9 +84,9 @@ export default createComponent({
84
84
  }
85
85
  }
86
86
 
87
- const vm = getCurrentInstance()
87
+ const { proxy } = getCurrentInstance()
88
88
 
89
- const isDark = useDark(props, vm.proxy.$q)
89
+ const isDark = useDark(props, proxy.$q)
90
90
 
91
91
  let timer, panRefPos
92
92
 
@@ -221,7 +221,7 @@ export default createComponent({
221
221
  // multiple times
222
222
  const emitScroll = debounce(() => {
223
223
  const info = getScroll()
224
- info.ref = vm.proxy
224
+ info.ref = proxy
225
225
  emit('scroll', info)
226
226
  }, 0)
227
227
 
@@ -360,28 +360,6 @@ export default createComponent({
360
360
  hover.value = false
361
361
  }
362
362
 
363
- // expose public methods
364
- Object.assign(vm.proxy, {
365
- getScrollTarget: () => targetRef.value,
366
- getScroll,
367
- getScrollPosition: () => ({
368
- top: scroll.vertical.position.value,
369
- left: scroll.horizontal.position.value
370
- }),
371
- getScrollPercentage: () => ({
372
- top: scroll.vertical.percentage.value,
373
- left: scroll.horizontal.percentage.value
374
- }),
375
- setScrollPosition: localSetScrollPosition,
376
- setScrollPercentage (axis, percentage, duration) {
377
- localSetScrollPosition(
378
- axis,
379
- percentage * (scroll[ axis ].size.value - container[ axis ].value),
380
- duration
381
- )
382
- }
383
- })
384
-
385
363
  let scrollPosition = null
386
364
 
387
365
  onDeactivated(() => {
@@ -404,6 +382,28 @@ export default createComponent({
404
382
 
405
383
  onBeforeUnmount(emitScroll.cancel)
406
384
 
385
+ // expose public methods
386
+ Object.assign(proxy, {
387
+ getScrollTarget: () => targetRef.value,
388
+ getScroll,
389
+ getScrollPosition: () => ({
390
+ top: scroll.vertical.position.value,
391
+ left: scroll.horizontal.position.value
392
+ }),
393
+ getScrollPercentage: () => ({
394
+ top: scroll.vertical.percentage.value,
395
+ left: scroll.horizontal.percentage.value
396
+ }),
397
+ setScrollPosition: localSetScrollPosition,
398
+ setScrollPercentage (axis, percentage, duration) {
399
+ localSetScrollPosition(
400
+ axis,
401
+ percentage * (scroll[ axis ].size.value - container[ axis ].value),
402
+ duration
403
+ )
404
+ }
405
+ })
406
+
407
407
  return () => {
408
408
  return h('div', {
409
409
  class: classes.value,
@@ -117,10 +117,10 @@ export default createComponent({
117
117
  }
118
118
  }
119
119
 
120
- const vm = getCurrentInstance()
120
+ const { proxy } = getCurrentInstance()
121
121
 
122
122
  onMounted(() => {
123
- parentEl = vm.proxy.$el.parentNode
123
+ parentEl = proxy.$el.parentNode
124
124
  configureScrollTarget()
125
125
  })
126
126
 
@@ -130,7 +130,7 @@ export default createComponent({
130
130
  })
131
131
 
132
132
  // expose public methods
133
- Object.assign(vm.proxy, {
133
+ Object.assign(proxy, {
134
134
  trigger,
135
135
  getPosition: () => scroll
136
136
  })
@@ -17,7 +17,7 @@ import { useFormProps, useFormInputNameAttr } from '../../composables/private/us
17
17
  import useKeyComposition from '../../composables/private/use-key-composition.js'
18
18
 
19
19
  import { createComponent } from '../../utils/private/create.js'
20
- import { isDeepEqual } from '../../utils/private/is.js'
20
+ import { isDeepEqual } from '../../utils/is.js'
21
21
  import { stop, prevent, stopAndPrevent } from '../../utils/event.js'
22
22
  import { normalizeToInterval } from '../../utils/format.js'
23
23
  import { shouldIgnoreKey, isKeyCode } from '../../utils/private/key-composition.js'
@@ -1513,6 +1513,7 @@ export default createComponent({
1513
1513
  h('input', {
1514
1514
  class: 'q-select__autocomplete-input',
1515
1515
  autocomplete: props.autocomplete,
1516
+ tabindex: -1,
1516
1517
  onKeyup: onTargetAutocomplete
1517
1518
  })
1518
1519
  )
@@ -134,7 +134,11 @@ export default createComponent({
134
134
 
135
135
  const
136
136
  stepVal = ([ 34, 33 ].includes(evt.keyCode) ? 10 : 1) * state.step.value,
137
- offset = ([ 34, 37, 40 ].includes(evt.keyCode) ? -1 : 1) * (state.isReversed.value === true ? -1 : 1) * stepVal
137
+ offset = (
138
+ ([ 34, 37, 40 ].includes(evt.keyCode) ? -1 : 1)
139
+ * (state.isReversed.value === true ? -1 : 1)
140
+ * (props.vertical === true ? -1 : 1) * stepVal
141
+ )
138
142
 
139
143
  model.value = between(
140
144
  parseFloat((model.value + offset).toFixed(state.decimals.value)),
@@ -7,7 +7,7 @@ import { useFormProps, useFormInject } from '../../composables/private/use-form.
7
7
 
8
8
  import { between } from '../../utils/format.js'
9
9
  import { position } from '../../utils/event.js'
10
- import { isNumber, isObject } from '../../utils/private/is.js'
10
+ import { isNumber, isObject } from '../../utils/is.js'
11
11
  import { hDir } from '../../utils/private/render.js'
12
12
 
13
13
  const markerPrefixClass = 'q-slider__marker-labels'
@@ -1971,56 +1971,9 @@
1971
1971
  }
1972
1972
  },
1973
1973
  "filter": {
1974
- "type": "Function",
1975
- "required": true,
1976
- "desc": "Filter method (the 'filter-method' prop)",
1977
- "params": {
1978
- "rows": {
1979
- "type": "Array",
1980
- "required": true,
1981
- "desc": "Array of rows",
1982
- "__exemption": [ "examples" ]
1983
- },
1984
- "terms": {
1985
- "type": [ "String", "Object" ],
1986
- "required": true,
1987
- "desc": "Terms to filter with (is essentially the 'filter' prop value)",
1988
- "__exemption": [ "examples" ]
1989
- },
1990
- "cols": {
1991
- "type": "Array",
1992
- "desc": "Optional column definitions",
1993
- "__exemption": [ "examples" ]
1994
- },
1995
- "getCellValue": {
1996
- "type": "Function",
1997
- "desc": "Optional function to get a cell value",
1998
- "params": {
1999
- "col": {
2000
- "type": "Object",
2001
- "required": true,
2002
- "desc": "Column name from column definitions",
2003
- "__exemption": [ "examples" ]
2004
- },
2005
- "row": {
2006
- "type": "Object",
2007
- "required": true,
2008
- "desc": "The row object",
2009
- "__exemption": [ "examples" ]
2010
- }
2011
- },
2012
- "returns": {
2013
- "type": "Any",
2014
- "desc": "Parsed/Processed cell value",
2015
- "examples": [ "Ice Cream Sandwich" ]
2016
- }
2017
- }
2018
- },
2019
- "returns": {
2020
- "type": "Array",
2021
- "desc": "Filtered rows",
2022
- "__exemption": [ "examples" ]
2023
- }
1974
+ "type": [ "String", "Object" ],
1975
+ "desc": "String/Object to filter table with (the 'filter' prop)",
1976
+ "__exemption": [ "examples" ]
2024
1977
  },
2025
1978
  "getCellValue": {
2026
1979
  "type": "Function",
@@ -2220,6 +2173,11 @@
2220
2173
  "type": "Number",
2221
2174
  "desc": "How many rows per page? 0 means Infinite",
2222
2175
  "examples": [ 10 ]
2176
+ },
2177
+ "rowsNumber": {
2178
+ "type": "Number",
2179
+ "desc": "For server-side fetching only. How many total database rows are there to be added to the table.",
2180
+ "examples": [ 100, 200 ]
2223
2181
  }
2224
2182
  }
2225
2183
  },
@@ -2414,5 +2372,25 @@
2414
2372
  }
2415
2373
  }
2416
2374
  }
2375
+ },
2376
+
2377
+ "computedProps": {
2378
+ "filteredSortedRows": {
2379
+ "desc": "The filtered and sorted rows (same as the rows prop if using server-side fetching)",
2380
+ "type": "Array",
2381
+ "examples": [ "[ { name: 'Ice Cream Sandwich', calories: 237, fat: 9.0, carbs: 37, protein: 4.3, sodium: 129, calcium: 8, iron: 1 }, ... ]" ]
2382
+ },
2383
+
2384
+ "computedRows": {
2385
+ "desc": "Paginated, filtered, and sorted rows (same as the rows prop if using server-side fetching)",
2386
+ "type": "Array",
2387
+ "examples": [ "[ { name: 'Ice Cream Sandwich', calories: 237, fat: 9.0, carbs: 37, protein: 4.3, sodium: 129, calcium: 8, iron: 1 }, ... ]" ]
2388
+ },
2389
+
2390
+ "computedRowsNumber": {
2391
+ "desc": "The number of computed rows",
2392
+ "type": "Number",
2393
+ "examples": [ 10 ]
2394
+ }
2417
2395
  }
2418
2396
  }
@@ -1,6 +1,6 @@
1
1
  import { computed } from 'vue'
2
2
 
3
- import { isNumber } from '../../utils/private/is.js'
3
+ import { isNumber } from '../../utils/is.js'
4
4
 
5
5
  export const useTableColumnSelectionProps = {
6
6
  visibleColumns: Array
@@ -64,10 +64,6 @@ export function useTablePaginationState (vm, getCellValue) {
64
64
  nextTick(() => {
65
65
  emit('request', {
66
66
  pagination: prop.pagination || computedPagination.value,
67
- // FIXME: 'props.filter' is string/object, but 'prop.filter' can be controlled by the user, and the docs are suggesting 'prop.filter' is a function
68
- // So, value of 'filter' becomes function/string/object, which makes a lot of things unpredictable and can break things
69
- // Either update the docs to say 'prop.filter' should be a string/object, or use 'prop.filter || props.filterMethod' or maybe get 'computedFilterFunction' here and use that instead of 'props.filterMethod'
70
- // The examples on our docs are using 'filter' as a string in onRequest handler, but the JSON API is saying 'filter' is a function
71
67
  filter: prop.filter || props.filter,
72
68
  getCellValue
73
69
  })
@@ -1,7 +1,7 @@
1
1
  import { computed } from 'vue'
2
2
 
3
3
  import { sortDate } from '../../utils/private/sort.js'
4
- import { isNumber, isDate, isObject } from '../../utils/private/is.js'
4
+ import { isNumber, isDate, isObject } from '../../utils/is.js'
5
5
 
6
6
  export const useTableSortProps = {
7
7
  sortMethod: Function,
@@ -71,7 +71,8 @@ export default createComponent({
71
71
  emits: useDatetimeEmits,
72
72
 
73
73
  setup (props, { slots, emit }) {
74
- const { proxy: { $q } } = getCurrentInstance()
74
+ const vm = getCurrentInstance()
75
+ const { $q } = vm.proxy
75
76
 
76
77
  const isDark = useDark(props, $q)
77
78
  const { tabindex, headerClass, getLocale, getCurrentDate } = useDatetime(props, $q)
@@ -759,10 +760,6 @@ export default createComponent({
759
760
  emit('update:modelValue', val, date)
760
761
  }
761
762
 
762
- // expose public methods
763
- const vm = getCurrentInstance()
764
- Object.assign(vm.proxy, { setNow })
765
-
766
763
  function getHeader () {
767
764
  const label = [
768
765
  h('div', {
@@ -900,6 +897,9 @@ export default createComponent({
900
897
  ])
901
898
  }
902
899
 
900
+ // expose public method
901
+ vm.proxy.setNow = setNow
902
+
903
903
  return () => {
904
904
  const child = [ getClock() ]
905
905
 
@@ -671,6 +671,8 @@ export default createComponent({
671
671
  }
672
672
  }
673
673
 
674
+ props.defaultExpandAll === true && expandAll()
675
+
674
676
  // expose public methods
675
677
  Object.assign(proxy, {
676
678
  getNodeByKey,
@@ -684,8 +686,6 @@ export default createComponent({
684
686
  setTicked
685
687
  })
686
688
 
687
- props.defaultExpandAll === true && expandAll()
688
-
689
689
  return () => {
690
690
  const children = getChildren(props.nodes)
691
691