quasar 2.3.0 → 2.3.4

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 (255) hide show
  1. package/dist/api/AppFullscreen.json +15 -8
  2. package/dist/api/BottomSheet.json +23 -2
  3. package/dist/api/Cookies.json +4 -3
  4. package/dist/api/Dialog.json +41 -12
  5. package/dist/api/Loading.json +4 -2
  6. package/dist/api/LoadingBar.json +8 -3
  7. package/dist/api/LocalStorage.json +8 -0
  8. package/dist/api/Morph.json +14 -7
  9. package/dist/api/Mutation.json +1 -1
  10. package/dist/api/Notify.json +41 -27
  11. package/dist/api/QAjaxBar.json +6 -3
  12. package/dist/api/QBreadcrumbs.json +8 -4
  13. package/dist/api/QBreadcrumbsEl.json +4 -2
  14. package/dist/api/QBtn.json +6 -3
  15. package/dist/api/QBtnDropdown.json +11 -6
  16. package/dist/api/QBtnToggle.json +4 -2
  17. package/dist/api/QCard.json +2 -1
  18. package/dist/api/QCardActions.json +2 -1
  19. package/dist/api/QCardSection.json +2 -1
  20. package/dist/api/QCarousel.json +10 -5
  21. package/dist/api/QCarouselControl.json +4 -2
  22. package/dist/api/QChatMessage.json +8 -4
  23. package/dist/api/QCheckbox.json +8 -4
  24. package/dist/api/QChip.json +2 -1
  25. package/dist/api/QCircularProgress.json +14 -7
  26. package/dist/api/QColor.json +6 -3
  27. package/dist/api/QDate.json +79 -5
  28. package/dist/api/QDialog.json +8 -4
  29. package/dist/api/QDrawer.json +10 -5
  30. package/dist/api/QEditor.json +17 -7
  31. package/dist/api/QExpansionItem.json +5 -3
  32. package/dist/api/QFab.json +11 -6
  33. package/dist/api/QFabAction.json +4 -2
  34. package/dist/api/QField.json +2 -1
  35. package/dist/api/QFile.json +7 -2
  36. package/dist/api/QFooter.json +3 -2
  37. package/dist/api/QForm.json +1 -1
  38. package/dist/api/QHeader.json +5 -3
  39. package/dist/api/QIcon.json +2 -1
  40. package/dist/api/QImg.json +8 -4
  41. package/dist/api/QInfiniteScroll.json +6 -3
  42. package/dist/api/QInnerLoading.json +8 -4
  43. package/dist/api/QInput.json +2 -1
  44. package/dist/api/QIntersection.json +17 -1
  45. package/dist/api/QItem.json +2 -1
  46. package/dist/api/QKnob.json +8 -4
  47. package/dist/api/QLayout.json +9 -1
  48. package/dist/api/QLinearProgress.json +4 -2
  49. package/dist/api/QMarkupTable.json +2 -1
  50. package/dist/api/QMenu.json +8 -4
  51. package/dist/api/QNoSsr.json +2 -1
  52. package/dist/api/QOptionGroup.json +2 -1
  53. package/dist/api/QPage.json +2 -1
  54. package/dist/api/QPageScroller.json +8 -4
  55. package/dist/api/QPageSticky.json +2 -1
  56. package/dist/api/QPagination.json +10 -6
  57. package/dist/api/QParallax.json +2 -1
  58. package/dist/api/QPopupEdit.json +5 -2
  59. package/dist/api/QPopupProxy.json +7 -4
  60. package/dist/api/QRange.json +8 -4
  61. package/dist/api/QRating.json +5 -2
  62. package/dist/api/QResizeObserver.json +4 -1
  63. package/dist/api/QRouteTab.json +5 -26
  64. package/dist/api/QScrollArea.json +32 -6
  65. package/dist/api/QScrollObserver.json +13 -1
  66. package/dist/api/QSelect.json +141 -47
  67. package/dist/api/QSeparator.json +2 -1
  68. package/dist/api/QSkeleton.json +8 -4
  69. package/dist/api/QSlideItem.json +9 -0
  70. package/dist/api/QSlideTransition.json +2 -1
  71. package/dist/api/QSlider.json +8 -4
  72. package/dist/api/QSpinner.json +2 -1
  73. package/dist/api/QSplitter.json +4 -2
  74. package/dist/api/QStep.json +2 -1
  75. package/dist/api/QStepper.json +6 -3
  76. package/dist/api/QTab.json +4 -2
  77. package/dist/api/QTabPanels.json +6 -3
  78. package/dist/api/QTable.json +216 -93
  79. package/dist/api/QTabs.json +4 -2
  80. package/dist/api/QTime.json +16 -4
  81. package/dist/api/QTimeline.json +4 -2
  82. package/dist/api/QTimelineEntry.json +4 -2
  83. package/dist/api/QToggle.json +8 -4
  84. package/dist/api/QTooltip.json +18 -9
  85. package/dist/api/QTree.json +34 -19
  86. package/dist/api/QUploader.json +93 -5
  87. package/dist/api/QVirtualScroll.json +26 -11
  88. package/dist/api/ScrollFire.json +1 -1
  89. package/dist/api/SessionStorage.json +8 -0
  90. package/dist/api/TouchHold.json +2 -1
  91. package/dist/api/TouchRepeat.json +2 -1
  92. package/dist/api/TouchSwipe.json +2 -1
  93. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  94. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  95. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  96. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  97. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  98. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  99. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  100. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  101. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  102. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  103. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  104. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  105. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  106. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  107. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  108. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  109. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  110. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  111. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  112. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +6 -0
  113. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  114. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  115. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  116. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  117. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  118. package/dist/icon-set/svg-mdi-v4.umd.prod.js +1 -1
  119. package/dist/icon-set/svg-mdi-v5.umd.prod.js +1 -1
  120. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  121. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  122. package/dist/icon-set/themify.umd.prod.js +1 -1
  123. package/dist/lang/ar.umd.prod.js +1 -1
  124. package/dist/lang/az-Latn.umd.prod.js +1 -1
  125. package/dist/lang/bg.umd.prod.js +1 -1
  126. package/dist/lang/bn.umd.prod.js +1 -1
  127. package/dist/lang/ca.umd.prod.js +1 -1
  128. package/dist/lang/cs.umd.prod.js +1 -1
  129. package/dist/lang/da.umd.prod.js +1 -1
  130. package/dist/lang/de.umd.prod.js +1 -1
  131. package/dist/lang/el.umd.prod.js +1 -1
  132. package/dist/lang/en-GB.umd.prod.js +1 -1
  133. package/dist/lang/en-US.umd.prod.js +1 -1
  134. package/dist/lang/eo.umd.prod.js +1 -1
  135. package/dist/lang/es.umd.prod.js +1 -1
  136. package/dist/lang/et.umd.prod.js +1 -1
  137. package/dist/lang/fa-IR.umd.prod.js +1 -1
  138. package/dist/lang/fa.umd.prod.js +1 -1
  139. package/dist/lang/fi.umd.prod.js +1 -1
  140. package/dist/lang/fr.umd.prod.js +1 -1
  141. package/dist/lang/gn.umd.prod.js +1 -1
  142. package/dist/lang/he.umd.prod.js +1 -1
  143. package/dist/lang/hr.umd.prod.js +1 -1
  144. package/dist/lang/hu.umd.prod.js +1 -1
  145. package/dist/lang/id.umd.prod.js +1 -1
  146. package/dist/lang/is.umd.prod.js +1 -1
  147. package/dist/lang/it.umd.prod.js +1 -1
  148. package/dist/lang/ja.umd.prod.js +1 -1
  149. package/dist/lang/km.umd.prod.js +1 -1
  150. package/dist/lang/ko-KR.umd.prod.js +1 -1
  151. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  152. package/dist/lang/lt.umd.prod.js +1 -1
  153. package/dist/lang/lu.umd.prod.js +1 -1
  154. package/dist/lang/lv.umd.prod.js +1 -1
  155. package/dist/lang/ml.umd.prod.js +1 -1
  156. package/dist/lang/ms.umd.prod.js +1 -1
  157. package/dist/lang/nb-NO.umd.prod.js +1 -1
  158. package/dist/lang/nl.umd.prod.js +1 -1
  159. package/dist/lang/pl.umd.prod.js +1 -1
  160. package/dist/lang/pt-BR.umd.prod.js +1 -1
  161. package/dist/lang/pt.umd.prod.js +1 -1
  162. package/dist/lang/ro.umd.prod.js +1 -1
  163. package/dist/lang/ru.umd.prod.js +1 -1
  164. package/dist/lang/sk.umd.prod.js +1 -1
  165. package/dist/lang/sl.umd.prod.js +1 -1
  166. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  167. package/dist/lang/sr.umd.prod.js +1 -1
  168. package/dist/lang/sv.umd.prod.js +1 -1
  169. package/dist/lang/ta.umd.prod.js +1 -1
  170. package/dist/lang/th.umd.prod.js +1 -1
  171. package/dist/lang/tr.umd.prod.js +1 -1
  172. package/dist/lang/ug.umd.prod.js +1 -1
  173. package/dist/lang/uk.umd.prod.js +1 -1
  174. package/dist/lang/vi.umd.prod.js +1 -1
  175. package/dist/lang/zh-CN.umd.prod.js +1 -1
  176. package/dist/lang/zh-TW.umd.prod.js +1 -1
  177. package/dist/quasar.cjs.prod.js +2 -2
  178. package/dist/quasar.css +8 -1
  179. package/dist/quasar.esm.prod.js +2 -2
  180. package/dist/quasar.prod.css +1 -1
  181. package/dist/quasar.rtl.css +13 -1
  182. package/dist/quasar.rtl.prod.css +1 -1
  183. package/dist/quasar.sass +40 -35
  184. package/dist/quasar.umd.js +74 -48
  185. package/dist/quasar.umd.prod.js +2 -2
  186. package/dist/ssr-directives/Morph.js +1 -1
  187. package/dist/types/api/cookies.d.ts +1 -1
  188. package/dist/types/composables.d.ts +5 -1
  189. package/dist/types/extras/icon-set.d.ts +1 -0
  190. package/dist/types/index.d.ts +519 -192
  191. package/dist/vetur/quasar-attributes.json +7 -3
  192. package/dist/vetur/quasar-tags.json +1 -0
  193. package/dist/web-types/web-types.json +26 -12
  194. package/icon-set/svg-ionicons-v6.js +225 -0
  195. package/package.json +5 -2
  196. package/src/body.js +14 -4
  197. package/src/components/btn/QBtn.js +1 -0
  198. package/src/components/btn-dropdown/QBtnDropdown.json +1 -0
  199. package/src/components/chip/QChip.json +1 -2
  200. package/src/components/circular-progress/QCircularProgress.json +1 -1
  201. package/src/components/date/QDate.json +59 -1
  202. package/src/components/editor/QEditor.js +2 -2
  203. package/src/components/editor/QEditor.json +6 -2
  204. package/src/components/expansion-item/QExpansionItem.json +2 -1
  205. package/src/components/fab/QFab.json +3 -1
  206. package/src/components/field/QField.json +3 -3
  207. package/src/components/file/QFile.json +9 -6
  208. package/src/components/footer/QFooter.json +1 -1
  209. package/src/components/form/QForm.json +2 -3
  210. package/src/components/header/QHeader.json +1 -1
  211. package/src/components/icon/QIcon.js +2 -2
  212. package/src/components/intersection/QIntersection.js +9 -1
  213. package/src/components/intersection/QIntersection.json +9 -0
  214. package/src/components/layout/QLayout.json +8 -1
  215. package/src/components/linear-progress/QLinearProgress.js +3 -2
  216. package/src/components/linear-progress/QLinearProgress.json +1 -1
  217. package/src/components/linear-progress/QLinearProgress.sass +1 -1
  218. package/src/components/pagination/QPagination.json +0 -1
  219. package/src/components/popup-edit/QPopupEdit.json +1 -0
  220. package/src/components/popup-proxy/QPopupProxy.json +2 -1
  221. package/src/components/rating/QRating.json +1 -1
  222. package/src/components/resize-observer/QResizeObserver.json +2 -0
  223. package/src/components/scroll-area/QScrollArea.js +8 -13
  224. package/src/components/scroll-area/QScrollArea.json +33 -10
  225. package/src/components/scroll-observer/QScrollObserver.json +11 -0
  226. package/src/components/select/QSelect.js +7 -3
  227. package/src/components/select/QSelect.json +88 -15
  228. package/src/components/slide-item/QSlideItem.json +9 -0
  229. package/src/components/slider/use-slider.js +3 -3
  230. package/src/components/table/QTable.js +1 -1
  231. package/src/components/table/QTable.json +155 -60
  232. package/src/components/table/table-pagination.js +4 -0
  233. package/src/components/tabs/QRouteTab.json +1 -23
  234. package/src/components/time/QTime.json +8 -0
  235. package/src/components/tree/QTree.json +26 -21
  236. package/src/components/tree/QTree.sass +45 -41
  237. package/src/components/uploader/xhr-uploader-plugin.json +105 -4
  238. package/src/components/virtual-scroll/QVirtualScroll.json +15 -0
  239. package/src/components/virtual-scroll/use-virtual-scroll.json +7 -5
  240. package/src/composables/private/use-field.js +4 -4
  241. package/src/composables/private/use-refocus-target.js +12 -3
  242. package/src/composables/private/use-split-attrs.js +10 -7
  243. package/src/composables/use-dialog-plugin-component.js +1 -0
  244. package/src/css/core/transitions.sass +3 -1
  245. package/src/directives/Mutation.json +2 -3
  246. package/src/directives/ScrollFire.json +2 -3
  247. package/src/install-quasar.js +1 -0
  248. package/src/plugins/AppFullscreen.json +8 -8
  249. package/src/plugins/Cookies.json +2 -2
  250. package/src/plugins/Dialog.json +6 -5
  251. package/src/plugins/LoadingBar.json +4 -3
  252. package/src/plugins/Notify.json +13 -19
  253. package/src/utils/private/global-dialog.json +16 -2
  254. package/src/utils/private/web-storage.json +10 -0
  255. package/wrappers/index.js +4 -0
@@ -27,24 +27,24 @@ export interface AppFullscreen {
27
27
  /**
28
28
  * The DOM element used as root for fullscreen, otherwise 'null'
29
29
  */
30
- activeEl: LooseDictionary;
30
+ activeEl: Element | null;
31
31
  /**
32
32
  * Request going into Fullscreen (with optional target)
33
33
  * @param target Optional Element of target to request Fullscreen on
34
- * @returns A Promise with the outcome (true -> validation was a success, false -> invalid models detected)
34
+ * @returns A Promise which is resolved when transitioned to fullscreen mode. It gets rejected with 'Not capable' if the browser is not capable, and with an Error object if something else went wrong.
35
35
  */
36
- request: (target?: Element) => Promise<any>;
36
+ request: (target?: Element) => Promise<void>;
37
37
  /**
38
38
  * Request exiting out of Fullscreen mode
39
- * @returns A Promise with the outcome (true -> validation was a success, false -> invalid models detected)
39
+ * @returns A Promise which is resolved when exited out of fullscreen mode. It gets rejected with 'Not capable' if the browser is not capable, and with an Error object if something else went wrong.
40
40
  */
41
- exit: () => Promise<any>;
41
+ exit: () => Promise<void>;
42
42
  /**
43
43
  * Request toggling Fullscreen mode (with optional target if requesting going into Fullscreen only)
44
44
  * @param target Optional Element of target to request Fullscreen on
45
- * @returns A Promise with the outcome (true -> validation was a success, false -> invalid models detected)
45
+ * @returns A Promise which is resolved when transitioned to / exited out of fullscreen mode. It gets rejected with 'Not capable' if the browser is not capable, and with an Error object if something else went wrong.
46
46
  */
47
- toggle: (target?: Element) => Promise<any>;
47
+ toggle: (target?: Element) => Promise<void>;
48
48
  }
49
49
 
50
50
  export interface AppVisibility {
@@ -156,9 +156,9 @@ export interface Cookies {
156
156
  */
157
157
  domain?: string;
158
158
  /**
159
- * SameSite cookie option (not supported by IE11)
159
+ * SameSite cookie option
160
160
  */
161
- sameSite?: string;
161
+ sameSite?: "Lax" | "Strict" | "None";
162
162
  /**
163
163
  * Is cookie Http Only?
164
164
  */
@@ -351,9 +351,9 @@ export interface LoadingBar {
351
351
  increment: (amount?: number) => void;
352
352
  /**
353
353
  * Set the inner QAjaxBar's props
354
- * @param ...props QAjaxBar component props
354
+ * @param props QAjaxBar component props
355
355
  */
356
- setDefaults: (...props: any[]) => void;
356
+ setDefaults: (props: LooseDictionary) => void;
357
357
  }
358
358
 
359
359
  export interface LocalStorage {
@@ -408,7 +408,7 @@ export interface LocalStorage {
408
408
  | RegExp
409
409
  | number
410
410
  | boolean
411
- | Function
411
+ | ((...params: any[]) => any)
412
412
  | LooseDictionary
413
413
  | any[]
414
414
  | string
@@ -549,7 +549,7 @@ export interface Notify {
549
549
  /**
550
550
  * Function to call when notification gets dismissed
551
551
  */
552
- onDismiss?: Function;
552
+ onDismiss?: () => void;
553
553
  /**
554
554
  * Convenience way to add a dismiss button with a specific label, without using the 'actions' prop; If set to true, it uses a label accordding to the current Quasar language
555
555
  */
@@ -564,7 +564,85 @@ export interface Notify {
564
564
  ignoreDefaults?: boolean;
565
565
  }
566
566
  | string
567
- ) => Function;
567
+ ) => (props?: {
568
+ /**
569
+ * Optional type (that has been previously registered) or one of the out of the box ones ('positive', 'negative', 'warning', 'info', 'ongoing')
570
+ */
571
+ type?: string;
572
+ /**
573
+ * Color name for component from the Quasar Color Palette
574
+ */
575
+ color?: string;
576
+ /**
577
+ * Color name for component from the Quasar Color Palette
578
+ */
579
+ textColor?: string;
580
+ /**
581
+ * The content of your message
582
+ */
583
+ message?: string;
584
+ /**
585
+ * The content of your optional caption
586
+ */
587
+ caption?: string;
588
+ /**
589
+ * Render message as HTML; This can lead to XSS attacks, so make sure that you sanitize the message first
590
+ */
591
+ html?: boolean;
592
+ /**
593
+ * Icon name following Quasar convention; Make sure you have the icon library installed unless you are using 'img:' prefix
594
+ */
595
+ icon?: string;
596
+ /**
597
+ * URL to an avatar/image; Suggestion: use statics folder
598
+ */
599
+ avatar?: string;
600
+ /**
601
+ * Useful for notifications that are updated; Displays a Quasar spinner instead of an avatar or icon; If value is Boolean 'true' then the default QSpinner is shown
602
+ */
603
+ spinner?: boolean | Component;
604
+ /**
605
+ * Show progress bar to detail when notification will disappear automatically (unless timeout is 0)
606
+ */
607
+ progress?: boolean;
608
+ /**
609
+ * Class definitions to be attributed to the progress bar
610
+ */
611
+ progressClass?: any[] | string | LooseDictionary;
612
+ /**
613
+ * Add CSS class(es) to the notification for easier customization
614
+ */
615
+ classes?: string;
616
+ /**
617
+ * Key-value for attributes to be set on the notification
618
+ */
619
+ attrs?: LooseDictionary;
620
+ /**
621
+ * Amount of time to display (in milliseconds)
622
+ * Default value: 5000
623
+ */
624
+ timeout?: number;
625
+ /**
626
+ * Notification actions (buttons); If a 'handler' is specified or not, clicking/tapping on the button will also close the notification; Also check 'closeBtn' convenience prop
627
+ */
628
+ actions?: any[];
629
+ /**
630
+ * Function to call when notification gets dismissed
631
+ */
632
+ onDismiss?: () => void;
633
+ /**
634
+ * Convenience way to add a dismiss button with a specific label, without using the 'actions' prop; If set to true, it uses a label accordding to the current Quasar language
635
+ */
636
+ closeBtn?: boolean | string;
637
+ /**
638
+ * Put notification into multi-line mode; If this prop isn't used and more than one 'action' is specified then notification goes into multi-line mode by default
639
+ */
640
+ multiLine?: boolean;
641
+ /**
642
+ * Ignore the default configuration (set by setDefaults()) for this instance only
643
+ */
644
+ ignoreDefaults?: boolean;
645
+ }) => void;
568
646
  /**
569
647
  * Merge options into the default ones
570
648
  * @param opts Notification options
@@ -669,7 +747,7 @@ export interface Notify {
669
747
  /**
670
748
  * Function to call when notification gets dismissed
671
749
  */
672
- onDismiss?: Function;
750
+ onDismiss?: () => void;
673
751
  /**
674
752
  * Convenience way to add a dismiss button with a specific label, without using the 'actions' prop; If set to true, it uses a label accordding to the current Quasar language
675
753
  */
@@ -786,7 +864,7 @@ export interface Notify {
786
864
  /**
787
865
  * Function to call when notification gets dismissed
788
866
  */
789
- onDismiss?: Function;
867
+ onDismiss?: () => void;
790
868
  /**
791
869
  * Convenience way to add a dismiss button with a specific label, without using the 'actions' prop; If set to true, it uses a label accordding to the current Quasar language
792
870
  */
@@ -1015,7 +1093,7 @@ export interface SessionStorage {
1015
1093
  | RegExp
1016
1094
  | number
1017
1095
  | boolean
1018
- | Function
1096
+ | ((...params: any[]) => any)
1019
1097
  | LooseDictionary
1020
1098
  | any[]
1021
1099
  | string
@@ -1362,7 +1440,7 @@ export interface QBtnDropdownProps {
1362
1440
  /**
1363
1441
  * Controls Menu show/hidden state; Either use this property (along with a listener for 'update:modelValue' event) OR use v-model directive
1364
1442
  */
1365
- modelValue: boolean;
1443
+ modelValue?: boolean;
1366
1444
  /**
1367
1445
  * Size in CSS units, including unit name or standard size name (xs|sm|md|lg|xl)
1368
1446
  */
@@ -1974,7 +2052,7 @@ export interface QBtnProps {
1974
2052
  * @param evt JS event object; If you want to cancel navigation set synchronously 'evt.navigate' to false
1975
2053
  * @param navigateFn When you need to control the time at which the button should trigger the route navigation then set 'evt.navigate' to false and call this function; Useful if you have async work to be done before the actual route navigation
1976
2054
  */
1977
- onClick?: (evt: LooseDictionary, navigateFn: Function) => void;
2055
+ onClick?: (evt: LooseDictionary, navigateFn: () => void) => void;
1978
2056
  }
1979
2057
 
1980
2058
  export interface QBtnSlots {
@@ -2266,8 +2344,9 @@ export interface QCarouselSlots {
2266
2344
  btnProps: LooseDictionary;
2267
2345
  /**
2268
2346
  * Default trigger when clicked/tapped on
2347
+ * @param evt JS event object
2269
2348
  */
2270
- onClick: Function;
2349
+ onClick: (evt: LooseDictionary) => void;
2271
2350
  }) => VNode[];
2272
2351
  }
2273
2352
 
@@ -2897,16 +2976,22 @@ export interface QDateProps {
2897
2976
  yearsInMonthView?: boolean | undefined;
2898
2977
  /**
2899
2978
  * A list of events to highlight on the calendar; If using a function, it receives the date as a String and must return a Boolean (matches or not); If using a function then for best performance, reference it from your scope and do not define it inline
2979
+ * @param date The current date being processed.
2980
+ * @returns If true, the current date will be highlighted
2900
2981
  */
2901
- events?: any[] | Function | undefined;
2982
+ events?: any[] | ((date: string) => boolean) | undefined;
2902
2983
  /**
2903
2984
  * Color name (from the Quasar Color Palette); If using a function, it receives the date as a String and must return a String (color for the received date); If using a function then for best performance, reference it from your scope and do not define it inline
2985
+ * @param date The current date being processed.
2986
+ * @returns Color for the current date.
2904
2987
  */
2905
- eventColor?: string | Function | undefined;
2988
+ eventColor?: string | ((date: string) => string) | undefined;
2906
2989
  /**
2907
2990
  * Optionally configure the days that are selectable; If using a function, it receives the date as a String and must return a Boolean (is date acceptable or not); If using a function then for best performance, reference it from your scope and do not define it inline; Incompatible with 'range' prop
2991
+ * @param date The current date being processed.
2992
+ * @returns If true, the current date will be made available for selection
2908
2993
  */
2909
- options?: any[] | Function | undefined;
2994
+ options?: any[] | ((date: string) => boolean) | undefined;
2910
2995
  /**
2911
2996
  * Lock user from navigating below a specific year+month (in YYYY/MM format); This prop is not used to correct the model; You might want to also use 'default-year-month' prop
2912
2997
  */
@@ -2977,7 +3062,7 @@ export interface QDateProps {
2977
3062
  /**
2978
3063
  * Object of properties of the range starting point (only if range)
2979
3064
  */
2980
- from: {
3065
+ from?: {
2981
3066
  /**
2982
3067
  * The year
2983
3068
  */
@@ -2994,7 +3079,7 @@ export interface QDateProps {
2994
3079
  /**
2995
3080
  * Object of properties of the range ending point (only if range)
2996
3081
  */
2997
- to: {
3082
+ to?: {
2998
3083
  /**
2999
3084
  * The year
3000
3085
  */
@@ -3528,7 +3613,7 @@ export interface QEditorProps {
3528
3613
  /**
3529
3614
  * Either this or "cmd" is required. Function for when button gets clicked/tapped.
3530
3615
  */
3531
- handler?: Function;
3616
+ handler?: () => void;
3532
3617
  /**
3533
3618
  * Either this or "handler" is required. This must be a valid execCommand method according to the designMode API.
3534
3619
  */
@@ -3538,9 +3623,10 @@ export interface QEditorProps {
3538
3623
  */
3539
3624
  param?: string;
3540
3625
  /**
3541
- * Is button disabled? If specifying a function, return a Boolean value.
3626
+ * Is button disabled?
3627
+ * @returns If true, the button will be disabled
3542
3628
  */
3543
- disable?: boolean | Function;
3629
+ disable?: boolean | (() => boolean);
3544
3630
  /**
3545
3631
  * Pass the value "no-state" if the button should not have an "active" state
3546
3632
  */
@@ -4341,7 +4427,7 @@ export interface QFieldSlots {
4341
4427
  /**
4342
4428
  * DOM element of the field
4343
4429
  */
4344
- field: LooseDictionary;
4430
+ field: Element;
4345
4431
  /**
4346
4432
  * Field is editable
4347
4433
  */
@@ -4360,8 +4446,9 @@ export interface QFieldSlots {
4360
4446
  modelValue: any;
4361
4447
  /**
4362
4448
  * Function that emits an @input event in the context of the field
4449
+ * @param value Value to be emitted
4363
4450
  */
4364
- emitValue: Function;
4451
+ emitValue: (value: any) => void;
4365
4452
  }) => VNode[];
4366
4453
  /**
4367
4454
  * undefined
@@ -4421,8 +4508,10 @@ export interface QFileProps {
4421
4508
  maxFiles?: number | string | undefined;
4422
4509
  /**
4423
4510
  * Custom filter for added files; Only files that pass this filter will be added to the queue and uploaded; For best performance, reference it from your scope and do not define it inline
4511
+ * @param files Candidate files to be added to queue
4512
+ * @returns Filtered files to be added to queue
4424
4513
  */
4425
- filter?: Function | undefined;
4514
+ filter?: ((files: FileList | any[]) => any[]) | undefined;
4426
4515
  /**
4427
4516
  * Model of the component; Must be FileList or Array if using 'multiple' prop; Either use this property (along with a listener for 'update:modelValue' event) OR use v-model directive
4428
4517
  */
@@ -4581,8 +4670,25 @@ export interface QFileProps {
4581
4670
  useChips?: boolean | undefined;
4582
4671
  /**
4583
4672
  * Label for the counter; The 'counter' prop is necessary to enable this one
4673
+ * @param props Object containing counter label information
4674
+ * @returns String to display for the counter label
4584
4675
  */
4585
- counterLabel?: Function | undefined;
4676
+ counterLabel?:
4677
+ | ((props: {
4678
+ /**
4679
+ * The total size of files in human readable format
4680
+ */
4681
+ totalSize: string;
4682
+ /**
4683
+ * Number of picked files
4684
+ */
4685
+ filesNumber: number;
4686
+ /**
4687
+ * Maximum number of files (same as 'max-files' prop, if specified); When 'max-files' is not specified, this has 'void 0' as value
4688
+ */
4689
+ maxFiles: number | string;
4690
+ }) => string)
4691
+ | undefined;
4586
4692
  /**
4587
4693
  * Tabindex HTML attribute value
4588
4694
  */
@@ -4669,7 +4775,7 @@ export interface QFileSlots {
4669
4775
  /**
4670
4776
  * Reference to the QFile component
4671
4777
  */
4672
- ref: LooseDictionary;
4778
+ ref: QFile;
4673
4779
  }) => VNode[];
4674
4780
  /**
4675
4781
  * Override default selection slot; Suggestion: QChip
@@ -4683,7 +4789,7 @@ export interface QFileSlots {
4683
4789
  /**
4684
4790
  * Reference to the QFile component
4685
4791
  */
4686
- ref: LooseDictionary;
4792
+ ref: QFile;
4687
4793
  }) => VNode[];
4688
4794
  }
4689
4795
 
@@ -4805,7 +4911,7 @@ export interface QFormProps {
4805
4911
  * Emitted after a validation was triggered and at least one of the inner Quasar components models are NOT valid
4806
4912
  * @param ref Vue reference to the first component that triggered the validation error
4807
4913
  */
4808
- onValidationError?: (ref: LooseDictionary) => void;
4914
+ onValidationError?: (ref: Component) => void;
4809
4915
  }
4810
4916
 
4811
4917
  export interface QFormSlots {
@@ -5103,7 +5209,7 @@ export interface QInfiniteScrollProps {
5103
5209
  * @param index The index parameter can be used to make some sort of pagination on the content you load. It takes numeric values starting with 1 and incrementing with each call
5104
5210
  * @param done Function to call when you made all necessary updates. DO NOT forget to call it otherwise your loading message will continue to be displayed
5105
5211
  */
5106
- onLoad?: (index: number, done: Function) => void;
5212
+ onLoad?: (index: number, done: (stop?: boolean) => void) => void;
5107
5213
  }
5108
5214
 
5109
5215
  export interface QInfiniteScrollSlots {
@@ -5537,6 +5643,11 @@ export interface QIntersectionProps {
5537
5643
  * One of Quasar's embedded transitions
5538
5644
  */
5539
5645
  transition?: string | undefined;
5646
+ /**
5647
+ * Transition duration (in milliseconds, without unit)
5648
+ * Default value: 300
5649
+ */
5650
+ transitionDuration?: string | number | undefined;
5540
5651
  /**
5541
5652
  * Disable visibility observable (content will remain as it was, visible or hidden)
5542
5653
  */
@@ -6405,8 +6516,11 @@ export interface QPageProps {
6405
6516
  /**
6406
6517
  * Override default CSS style applied to the component (sets minHeight); Function(offset: Number) => CSS props/value: Object; For best performance, reference it from your scope and do not define it inline
6407
6518
  * Default value: (see source code)
6519
+ * @param offset Header + Footer height (in pixels)
6520
+ * @param height Value in pixels of container height (if containerized) or window height otherwise
6521
+ * @returns Object with CSS properties to apply to Page DOM element
6408
6522
  */
6409
- styleFn?: Function | undefined;
6523
+ styleFn?: ((offset: number, height: number) => LooseDictionary) | undefined;
6410
6524
  }
6411
6525
 
6412
6526
  export interface QPageSlots {
@@ -6442,7 +6556,6 @@ export interface QPaginationProps {
6442
6556
  min?: number | undefined;
6443
6557
  /**
6444
6558
  * Number of last page (must be higher than 'min')
6445
- * Default value: 100
6446
6559
  */
6447
6560
  max: number;
6448
6561
  /**
@@ -6505,8 +6618,10 @@ export interface QPaginationProps {
6505
6618
  iconLast?: string | undefined;
6506
6619
  /**
6507
6620
  * Generate link for page buttons; For best performance, reference it from your scope and do not define it inline
6621
+ * @param page Page number to navigate to
6622
+ * @returns Object or String that can be passed to a <router-link> as `to` parameter
6508
6623
  */
6509
- toFn?: Function | undefined;
6624
+ toFn?: ((page: number) => LooseDictionary | string) | undefined;
6510
6625
  /**
6511
6626
  * Show boundary button links
6512
6627
  */
@@ -6670,8 +6785,10 @@ export interface QPopupEditProps {
6670
6785
  color?: string | undefined;
6671
6786
  /**
6672
6787
  * Validates model then triggers 'save' and closes Popup; Returns a Boolean ('true' means valid, 'false' means abort); Syntax: validate(value); For best performance, reference it from your scope and do not define it inline
6788
+ * @param value Model to validate
6789
+ * @returns Is the model valid or not?
6673
6790
  */
6674
- validate?: Function | undefined;
6791
+ validate?: ((value: any) => boolean) | undefined;
6675
6792
  /**
6676
6793
  * Put component in disabled mode
6677
6794
  */
@@ -6804,20 +6921,22 @@ export interface QPopupEditSlots {
6804
6921
  value: any;
6805
6922
  /**
6806
6923
  * Function that checks if the value is valid
6924
+ * @param value Value to be checked
6925
+ * @returns Checked value is valid or not
6807
6926
  */
6808
- validate: Function;
6927
+ validate: (value: any) => boolean;
6809
6928
  /**
6810
6929
  * Function that sets the value and closes the popup
6811
6930
  */
6812
- set: Function;
6931
+ set: () => void;
6813
6932
  /**
6814
6933
  * Function that cancels the editing and reverts the value to the initialValue
6815
6934
  */
6816
- cancel: Function;
6935
+ cancel: () => void;
6817
6936
  /**
6818
6937
  * There are some custom scenarios for which Quasar cannot automatically reposition the component without significant performance drawbacks so the optimal solution is for you to call this method when you need it
6819
6938
  */
6820
- updatePosition: Function;
6939
+ updatePosition: () => void;
6821
6940
  }) => VNode[];
6822
6941
  }
6823
6942
 
@@ -6950,7 +7069,7 @@ export interface QPullToRefreshProps {
6950
7069
  * Called whenever a refresh is triggered; at this time, your function should load more data
6951
7070
  * @param done Call the done() function when your data has been refreshed
6952
7071
  */
6953
- onRefresh?: (done: Function) => void;
7072
+ onRefresh?: (done: () => void) => void;
6954
7073
  }
6955
7074
 
6956
7075
  export interface QPullToRefreshSlots {
@@ -7368,13 +7487,13 @@ export interface QScrollAreaProps {
7368
7487
  tabindex?: number | string | undefined;
7369
7488
  /**
7370
7489
  * Emitted when scroll information changes (and listener is configured)
7371
- * @param info
7490
+ * @param info An object containing scroll information
7372
7491
  */
7373
7492
  onScroll?: (info: {
7374
7493
  /**
7375
7494
  * Vue reference to the QScrollArea which triggered the event
7376
7495
  */
7377
- ref: LooseDictionary;
7496
+ ref: QScrollArea;
7378
7497
  /**
7379
7498
  * Vertical scroll position (in px)
7380
7499
  */
@@ -7422,7 +7541,7 @@ export interface QScrollArea extends ComponentPublicInstance<QScrollAreaProps> {
7422
7541
  * Get the scrolling DOM element target
7423
7542
  * @returns DOM element upon which scrolling takes place
7424
7543
  */
7425
- getScrollTarget: () => LooseDictionary;
7544
+ getScrollTarget: () => Element;
7426
7545
  /**
7427
7546
  * Get the current scroll information
7428
7547
  * @returns Scroll information
@@ -7431,61 +7550,63 @@ export interface QScrollArea extends ComponentPublicInstance<QScrollAreaProps> {
7431
7550
  /**
7432
7551
  * Vertical scroll position (in px)
7433
7552
  */
7434
- verticalPosition?: number;
7553
+ verticalPosition: number;
7435
7554
  /**
7436
7555
  * Vertical scroll percentage (0.0 <= x <= 1.0)
7437
7556
  */
7438
- verticalPercentage?: number;
7557
+ verticalPercentage: number;
7439
7558
  /**
7440
7559
  * Vertical scroll size (in px)
7441
7560
  */
7442
- verticalSize?: number;
7561
+ verticalSize: number;
7443
7562
  /**
7444
7563
  * Height of the container (in px)
7445
7564
  */
7446
- verticalContainerSize?: number;
7565
+ verticalContainerSize: number;
7447
7566
  /**
7448
7567
  * Horizontal scroll position (in px)
7449
7568
  */
7450
- horizontalPosition?: number;
7569
+ horizontalPosition: number;
7451
7570
  /**
7452
7571
  * Horizontal scroll percentage (0.0 <= x <= 1.0)
7453
7572
  */
7454
- horizontalPercentage?: number;
7573
+ horizontalPercentage: number;
7455
7574
  /**
7456
7575
  * Horizontal scroll size (in px)
7457
7576
  */
7458
- horizontalSize?: number;
7577
+ horizontalSize: number;
7459
7578
  /**
7460
7579
  * Width of the container (in px)
7461
7580
  */
7462
- horizontalContainerSize?: number;
7581
+ horizontalContainerSize: number;
7463
7582
  };
7464
7583
  /**
7465
7584
  * Get current scroll position
7585
+ * @returns An object containing scroll position information
7466
7586
  */
7467
7587
  getScrollPosition: () => {
7468
7588
  /**
7469
7589
  * Scroll offset from top (vertical)
7470
7590
  */
7471
- top?: number;
7591
+ top: number;
7472
7592
  /**
7473
7593
  * Scroll offset from left (horizontal)
7474
7594
  */
7475
- left?: number;
7595
+ left: number;
7476
7596
  };
7477
7597
  /**
7478
7598
  * Get current scroll position in percentage (0.0 <= x <= 1.0)
7599
+ * @returns An object containing scroll position information in percentage
7479
7600
  */
7480
7601
  getScrollPercentage: () => {
7481
7602
  /**
7482
7603
  * Scroll percentage (0.0 <= x <= 1.0) offset from top (vertical)
7483
7604
  */
7484
- top?: number;
7605
+ top: number;
7485
7606
  /**
7486
7607
  * Scroll percentage (0.0 <= x <= 1.0) offset from left (horizontal)
7487
7608
  */
7488
- left?: number;
7609
+ left: number;
7489
7610
  };
7490
7611
  /**
7491
7612
  * Set scroll position to an offset; If a duration (in milliseconds) is specified then the scroll is animated
@@ -7641,7 +7762,7 @@ export interface QSelectProps {
7641
7762
  /**
7642
7763
  * Model of the component; Must be Array if using 'multiple' prop; Either use this property (along with a listener for 'update:modelValue' event) OR use v-model directive
7643
7764
  */
7644
- modelValue: number | string | any[] | null | undefined;
7765
+ modelValue: any;
7645
7766
  /**
7646
7767
  * Does field have validation errors?
7647
7768
  */
@@ -7803,18 +7924,33 @@ export interface QSelectProps {
7803
7924
  /**
7804
7925
  * Property of option which holds the 'value'; If using a function then for best performance, reference it from your scope and do not define it inline
7805
7926
  * Default value: value
7927
+ * @param option The current option being processed
7928
+ * @returns Value of the current option
7806
7929
  */
7807
- optionValue?: Function | string | undefined;
7930
+ optionValue?:
7931
+ | ((option: string | LooseDictionary) => any)
7932
+ | string
7933
+ | undefined;
7808
7934
  /**
7809
7935
  * Property of option which holds the 'label'; If using a function then for best performance, reference it from your scope and do not define it inline
7810
7936
  * Default value: label
7937
+ * @param option The current option being processed
7938
+ * @returns Label of the current option
7811
7939
  */
7812
- optionLabel?: Function | string | undefined;
7940
+ optionLabel?:
7941
+ | ((option: string | LooseDictionary) => string)
7942
+ | string
7943
+ | undefined;
7813
7944
  /**
7814
7945
  * Property of option which tells it's disabled; The value of the property must be a Boolean; If using a function then for best performance, reference it from your scope and do not define it inline
7815
7946
  * Default value: disable
7947
+ * @param option The current option being processed
7948
+ * @returns If true, the current option will be disabled
7816
7949
  */
7817
- optionDisable?: Function | string | undefined;
7950
+ optionDisable?:
7951
+ | ((option: string | LooseDictionary) => boolean)
7952
+ | string
7953
+ | undefined;
7818
7954
  /**
7819
7955
  * Hides selection; Use the underlying input tag to hold the label (instead of showing it to the right of the input) of the selected option; Only works for non 'multiple' Selects
7820
7956
  */
@@ -7995,9 +8131,9 @@ export interface QSelectProps {
7995
8131
  */
7996
8132
  direction: "increase" | "decrease";
7997
8133
  /**
7998
- * Vue reference to the QVirtualList which triggered the event
8134
+ * Vue reference to the QSelect
7999
8135
  */
8000
- ref: LooseDictionary;
8136
+ ref: QSelect;
8001
8137
  }) => void;
8002
8138
  /**
8003
8139
  * When using the 'clearable' property, this event is emitted when the clear icon is clicked
@@ -8047,14 +8183,21 @@ export interface QSelectProps {
8047
8183
  * @param inputValue What the user typed
8048
8184
  * @param doneFn Adds (optional) value to the model; Do not forget to call it after you validate the newly created value; Call it with no parameters if nothing should be added
8049
8185
  */
8050
- onNewValue?: (inputValue: string, doneFn: Function) => void;
8186
+ onNewValue?: (
8187
+ inputValue: string,
8188
+ doneFn: (item?: any, mode?: "add" | "add-unique" | "toggle") => void
8189
+ ) => void;
8051
8190
  /**
8052
8191
  * Emitted when user wants to filter a value
8053
8192
  * @param inputValue What the user typed
8054
8193
  * @param doneFn Supply a function which makes the necessary updates
8055
8194
  * @param abortFn Call this function if something went wrong
8056
8195
  */
8057
- onFilter?: (inputValue: string, doneFn: Function, abortFn: Function) => void;
8196
+ onFilter?: (
8197
+ inputValue: string,
8198
+ doneFn: (callbackFn: () => void, afterFn?: (ref: QSelect) => void) => void,
8199
+ abortFn: () => void
8200
+ ) => void;
8058
8201
  /**
8059
8202
  * Emitted when a filtering was aborted; Probably a new one was requested?
8060
8203
  */
@@ -8153,12 +8296,14 @@ export interface QSelectSlots {
8153
8296
  selected: boolean;
8154
8297
  /**
8155
8298
  * Remove selected option located at specific index
8299
+ * @param index Index at which to remove selection
8156
8300
  */
8157
- removeAtIndex: Function;
8301
+ removeAtIndex: (index: number) => void;
8158
8302
  /**
8159
8303
  * Add/remove option from model
8304
+ * @param opt Option to add to model
8160
8305
  */
8161
- toggleOption: Function;
8306
+ toggleOption: (opt: any) => void;
8162
8307
  /**
8163
8308
  * Tabindex HTML attribute value associated with respective option
8164
8309
  */
@@ -8187,12 +8332,14 @@ export interface QSelectSlots {
8187
8332
  focused: boolean;
8188
8333
  /**
8189
8334
  * Add/remove option from model
8335
+ * @param opt Option to add to model
8190
8336
  */
8191
- toggleOption: Function;
8337
+ toggleOption: (opt: any) => void;
8192
8338
  /**
8193
8339
  * Sets option from menu as 'focused'
8340
+ * @param index Index of option from menu
8194
8341
  */
8195
- setOptionIndex: Function;
8342
+ setOptionIndex: (index: number) => void;
8196
8343
  /**
8197
8344
  * Computed properties passed down to QItem
8198
8345
  */
@@ -8293,7 +8440,7 @@ export interface QSelect extends ComponentPublicInstance<QSelectProps> {
8293
8440
  * @param value String to set the input value to
8294
8441
  * @param noFilter Set to true if you don't want the filter (if any) to be also triggered
8295
8442
  */
8296
- updateInputValue: (value?: string, noFilter?: boolean) => void;
8443
+ updateInputValue: (value: string, noFilter?: boolean) => void;
8297
8444
  /**
8298
8445
  * Tells if an option is selected
8299
8446
  * @param opt Option entry
@@ -8466,7 +8613,7 @@ export interface QSlideItemProps {
8466
8613
  /**
8467
8614
  * When called, it resets the component to its initial non-slided state
8468
8615
  */
8469
- reset: Function;
8616
+ reset: () => void;
8470
8617
  }) => void;
8471
8618
  /**
8472
8619
  * Emitted when user finished sliding the item to the right
@@ -8476,7 +8623,7 @@ export interface QSlideItemProps {
8476
8623
  /**
8477
8624
  * When called, it resets the component to its initial non-slided state
8478
8625
  */
8479
- reset: Function;
8626
+ reset: () => void;
8480
8627
  }) => void;
8481
8628
  /**
8482
8629
  * Emitted when user finished sliding the item up
@@ -8486,7 +8633,7 @@ export interface QSlideItemProps {
8486
8633
  /**
8487
8634
  * When called, it resets the component to its initial non-slided state
8488
8635
  */
8489
- reset: Function;
8636
+ reset: () => void;
8490
8637
  }) => void;
8491
8638
  /**
8492
8639
  * Emitted when user finished sliding the item down
@@ -8496,7 +8643,7 @@ export interface QSlideItemProps {
8496
8643
  /**
8497
8644
  * When called, it resets the component to its initial non-slided state
8498
8645
  */
8499
- reset: Function;
8646
+ reset: () => void;
8500
8647
  }) => void;
8501
8648
  /**
8502
8649
  * Emitted while user is sliding the item to one of the available sides
@@ -8528,7 +8675,7 @@ export interface QSlideItemProps {
8528
8675
  /**
8529
8676
  * When called, it resets the component to its initial non-slided state
8530
8677
  */
8531
- reset: Function;
8678
+ reset: () => void;
8532
8679
  }) => void;
8533
8680
  }
8534
8681
 
@@ -9549,8 +9696,10 @@ export interface QTableProps {
9549
9696
  /**
9550
9697
  * Property of each row that defines the unique key of each row (the result must be a primitive, not Object, Array, etc); The value of property must be string or a function taking a row and returning the desired (nested) key in the row; If supplying a function then for best performance, reference it from your scope and do not define it inline
9551
9698
  * Default value: id
9699
+ * @param row The current row being processed
9700
+ * @returns Current row's key
9552
9701
  */
9553
- rowKey?: string | Function | undefined;
9702
+ rowKey?: string | ((row: LooseDictionary) => any) | undefined;
9554
9703
  /**
9555
9704
  * Display data using QVirtualScroll (for non-grid mode only)
9556
9705
  */
@@ -9637,8 +9786,10 @@ export interface QTableProps {
9637
9786
  label: string;
9638
9787
  /**
9639
9788
  * Row Object property to determine value for this column or function which maps to the required property
9789
+ * @param row The current row being processed
9790
+ * @returns Value for this column
9640
9791
  */
9641
- field: string | Function;
9792
+ field: string | ((row: LooseDictionary) => any);
9642
9793
  /**
9643
9794
  * If we use visible-columns, this col will always be visible
9644
9795
  */
@@ -9654,8 +9805,18 @@ export interface QTableProps {
9654
9805
  sortable?: boolean;
9655
9806
  /**
9656
9807
  * Compare function if you have some custom data or want a specific way to compare two rows
9808
+ * @param a Value of the first comparison term
9809
+ * @param b Value of the second comparison term
9810
+ * @param rowA Full Row object in which is contained the first term
9811
+ * @param rowB Full Row object in which is contained the second term
9812
+ * @returns Comparison result of term 'a' with term 'b'. Less than 0 when 'a' should come first; greater than 0 if 'b' should come first; equal to 0 if their position must not be changed with respect to each other
9657
9813
  */
9658
- sort?: Function;
9814
+ sort?: (
9815
+ a: any,
9816
+ b: any,
9817
+ rowA: LooseDictionary,
9818
+ rowB: LooseDictionary
9819
+ ) => number;
9659
9820
  /**
9660
9821
  * Set column sort order: 'ad' (ascending-descending) or 'da' (descending-ascending); Overrides the 'column-sort-order' prop
9661
9822
  * Default value: ad
@@ -9663,16 +9824,21 @@ export interface QTableProps {
9663
9824
  sortOrder?: "ad" | "da";
9664
9825
  /**
9665
9826
  * Function you can apply to format your data
9827
+ * @param val Value of the cell
9828
+ * @param row Full Row object in which the cell is contained
9829
+ * @returns The resulting formatted value
9666
9830
  */
9667
- format?: Function;
9831
+ format?: (val: any, row: LooseDictionary) => any;
9668
9832
  /**
9669
9833
  * Style to apply on normal cells of the column
9834
+ * @param row The current row being processed
9670
9835
  */
9671
- style?: string | Function;
9836
+ style?: string | ((row: LooseDictionary) => string);
9672
9837
  /**
9673
9838
  * Classes to add on normal cells of the column
9839
+ * @param row The current row being processed
9674
9840
  */
9675
- classes?: string | Function;
9841
+ classes?: string | ((row: LooseDictionary) => string);
9676
9842
  /**
9677
9843
  * Style to apply on header cells of the column
9678
9844
  */
@@ -9763,16 +9929,28 @@ export interface QTableProps {
9763
9929
  loadingLabel?: string | undefined;
9764
9930
  /**
9765
9931
  * Text to display when user selected at least one row; For best performance, reference it from your scope and do not define it inline
9932
+ * @param numberOfRows Number of rows available
9933
+ * @returns Label to display
9766
9934
  */
9767
- selectedRowsLabel?: Function | undefined;
9935
+ selectedRowsLabel?: ((numberOfRows: number) => string) | undefined;
9768
9936
  /**
9769
9937
  * Text to override default rows per page label at bottom of table
9770
9938
  */
9771
9939
  rowsPerPageLabel?: string | undefined;
9772
9940
  /**
9773
9941
  * Text to override default pagination label at bottom of table (unless 'pagination' scoped slot is used); For best performance, reference it from your scope and do not define it inline
9774
- */
9775
- paginationLabel?: Function | undefined;
9942
+ * @param firstRowIndex Index of first displayed row
9943
+ * @param endRowIndex Index of last displayed row
9944
+ * @param totalRowsNumber Number of total rows available in data
9945
+ * @returns Label to display
9946
+ */
9947
+ paginationLabel?:
9948
+ | ((
9949
+ firstRowIndex: number,
9950
+ endRowIndex: number,
9951
+ totalRowsNumber: number
9952
+ ) => string)
9953
+ | undefined;
9776
9954
  /**
9777
9955
  * CSS style to apply to native HTML <table> element's wrapper (which is a DIV)
9778
9956
  */
@@ -9816,8 +9994,20 @@ export interface QTableProps {
9816
9994
  /**
9817
9995
  * The actual filtering mechanism; For best performance, reference it from your scope and do not define it inline
9818
9996
  * Default value: (see source code)
9819
- */
9820
- filterMethod?: Function | undefined;
9997
+ * @param rows Array of rows
9998
+ * @param terms Terms to filter with (is essentially the 'filter' prop value)
9999
+ * @param cols Column definitions
10000
+ * @param getCellValue Optional function to get a cell value
10001
+ * @returns Filtered rows
10002
+ */
10003
+ filterMethod?:
10004
+ | ((
10005
+ rows: any[],
10006
+ terms: string | LooseDictionary,
10007
+ cols: any[],
10008
+ getCellValue: (col: LooseDictionary, row: LooseDictionary) => any
10009
+ ) => any[])
10010
+ | undefined;
9821
10011
  /**
9822
10012
  * Pagination object; You can also use the 'v-model:pagination' for synching; When not synching it simply initializes the pagination on first render
9823
10013
  */
@@ -9868,8 +10058,14 @@ export interface QTableProps {
9868
10058
  /**
9869
10059
  * The actual sort mechanism. Function (rows, sortBy, descending) => sorted rows; For best performance, reference it from your scope and do not define it inline
9870
10060
  * Default value: (see source code)
10061
+ * @param rows Array with rows
10062
+ * @param sortBy Column name (from column definition)
10063
+ * @param descending Is sorting in descending order?
10064
+ * @returns Sorted rows
9871
10065
  */
9872
- sortMethod?: Function | undefined;
10066
+ sortMethod?:
10067
+ | ((rows: any[], sortBy: string, descending: boolean) => any[])
10068
+ | undefined;
9873
10069
  /**
9874
10070
  * Emitted when user clicks/taps on a row; Is not emitted when using body/row/item scoped slots
9875
10071
  * @param evt JS event object
@@ -9931,12 +10127,25 @@ export interface QTableProps {
9931
10127
  };
9932
10128
  /**
9933
10129
  * Filter method (the 'filter-method' prop)
9934
- */
9935
- filter: Function;
9936
- /**
9937
- * Optional function to get a cell value
9938
- */
9939
- getCellValue: Function;
10130
+ * @param rows Array of rows
10131
+ * @param terms Terms to filter with (is essentially the 'filter' prop value)
10132
+ * @param cols Optional column definitions
10133
+ * @param getCellValue Optional function to get a cell value
10134
+ * @returns Filtered rows
10135
+ */
10136
+ filter: (
10137
+ rows: any[],
10138
+ terms: string | LooseDictionary,
10139
+ cols?: any[],
10140
+ getCellValue?: (col: LooseDictionary, row: LooseDictionary) => any
10141
+ ) => any[];
10142
+ /**
10143
+ * Function to get a cell value
10144
+ * @param col Column name from column definitions
10145
+ * @param row The row object
10146
+ * @returns Parsed/Processed cell value
10147
+ */
10148
+ getCellValue: (col: LooseDictionary, row: LooseDictionary) => any;
9940
10149
  }) => void;
9941
10150
  /**
9942
10151
  * Emitted when user selects/unselects row(s)
@@ -9981,6 +10190,10 @@ export interface QTableProps {
9981
10190
  * How many rows per page? 0 means Infinite
9982
10191
  */
9983
10192
  rowsPerPage: number;
10193
+ /**
10194
+ * For server-side fetching only. How many total database rows are there to be added to the table.
10195
+ */
10196
+ rowsNumber?: number;
9984
10197
  }) => void;
9985
10198
  /**
9986
10199
  * Used by Vue on 'v-model:selected' prop for updating its value
@@ -10052,8 +10265,9 @@ export interface QTableSlots {
10052
10265
  colsMap: LooseDictionary;
10053
10266
  /**
10054
10267
  * Trigger a table sort
10268
+ * @param col Column name or column definition object
10055
10269
  */
10056
- sort: Function;
10270
+ sort: (col: string | LooseDictionary) => void;
10057
10271
  /**
10058
10272
  * (Only if using selection) Is row/item selected? Can directly be assigned new Boolean value which changes selection state
10059
10273
  */
@@ -10064,7 +10278,6 @@ export interface QTableSlots {
10064
10278
  expand: boolean;
10065
10279
  /**
10066
10280
  * Color name for component from the Quasar Color Palette
10067
- * Default value: grey-8
10068
10281
  */
10069
10282
  color: string;
10070
10283
  /**
@@ -10107,8 +10320,9 @@ export interface QTableSlots {
10107
10320
  colsMap: LooseDictionary;
10108
10321
  /**
10109
10322
  * Trigger a table sort
10323
+ * @param col Column name or column definition object
10110
10324
  */
10111
- sort: Function;
10325
+ sort: (col: string | LooseDictionary) => void;
10112
10326
  /**
10113
10327
  * (Only if using selection) Is row selected? Can directly be assigned new Boolean value which changes selection state
10114
10328
  */
@@ -10119,7 +10333,6 @@ export interface QTableSlots {
10119
10333
  expand: boolean;
10120
10334
  /**
10121
10335
  * Color name for component from the Quasar Color Palette
10122
- * Default value: grey-8
10123
10336
  */
10124
10337
  color: string;
10125
10338
  /**
@@ -10174,8 +10387,9 @@ export interface QTableSlots {
10174
10387
  colsMap: LooseDictionary;
10175
10388
  /**
10176
10389
  * Trigger a table sort
10390
+ * @param col Column name or column definition object
10177
10391
  */
10178
- sort: Function;
10392
+ sort: (col: string | LooseDictionary) => void;
10179
10393
  /**
10180
10394
  * (Only if using selection) Is row selected? Can directly be assigned new Boolean value which changes selection state
10181
10395
  */
@@ -10186,7 +10400,6 @@ export interface QTableSlots {
10186
10400
  expand: boolean;
10187
10401
  /**
10188
10402
  * Color name for component from the Quasar Color Palette
10189
- * Default value: grey-8
10190
10403
  */
10191
10404
  color: string;
10192
10405
  /**
@@ -10237,8 +10450,9 @@ export interface QTableSlots {
10237
10450
  colsMap: LooseDictionary;
10238
10451
  /**
10239
10452
  * Trigger a table sort
10453
+ * @param col Column name or column definition object
10240
10454
  */
10241
- sort: Function;
10455
+ sort: (col: string | LooseDictionary) => void;
10242
10456
  /**
10243
10457
  * (Only if using selection) Is row selected? Can directly be assigned new Boolean value which changes selection state
10244
10458
  */
@@ -10249,7 +10463,6 @@ export interface QTableSlots {
10249
10463
  expand: boolean;
10250
10464
  /**
10251
10465
  * Color name for component from the Quasar Color Palette
10252
- * Default value: grey-8
10253
10466
  */
10254
10467
  color: string;
10255
10468
  /**
@@ -10276,8 +10489,9 @@ export interface QTableSlots {
10276
10489
  colsMap: LooseDictionary;
10277
10490
  /**
10278
10491
  * Trigger a table sort
10492
+ * @param col Column name or column definition object
10279
10493
  */
10280
- sort: Function;
10494
+ sort: (col: string | LooseDictionary) => void;
10281
10495
  /**
10282
10496
  * (Only if using selection) Is row selected? Can directly be assigned new Boolean value which changes selection state
10283
10497
  */
@@ -10288,7 +10502,6 @@ export interface QTableSlots {
10288
10502
  expand: boolean;
10289
10503
  /**
10290
10504
  * Color name for component from the Quasar Color Palette
10291
- * Default value: grey-8
10292
10505
  */
10293
10506
  color: string;
10294
10507
  /**
@@ -10327,8 +10540,9 @@ export interface QTableSlots {
10327
10540
  colsMap: LooseDictionary;
10328
10541
  /**
10329
10542
  * Trigger a table sort
10543
+ * @param col Column name or column definition object
10330
10544
  */
10331
- sort: Function;
10545
+ sort: (col: string | LooseDictionary) => void;
10332
10546
  /**
10333
10547
  * (Only if using selection) Is row selected? Can directly be assigned new Boolean value which changes selection state
10334
10548
  */
@@ -10339,7 +10553,6 @@ export interface QTableSlots {
10339
10553
  expand: boolean;
10340
10554
  /**
10341
10555
  * Color name for component from the Quasar Color Palette
10342
- * Default value: grey-8
10343
10556
  */
10344
10557
  color: string;
10345
10558
  /**
@@ -10370,8 +10583,9 @@ export interface QTableSlots {
10370
10583
  colsMap: LooseDictionary;
10371
10584
  /**
10372
10585
  * Trigger a table sort
10586
+ * @param col Column name or column definition object
10373
10587
  */
10374
- sort: Function;
10588
+ sort: (col: string | LooseDictionary) => void;
10375
10589
  /**
10376
10590
  * (Only if using selection) Is row selected? Can directly be assigned new Boolean value which changes selection state
10377
10591
  */
@@ -10382,7 +10596,6 @@ export interface QTableSlots {
10382
10596
  expand: boolean;
10383
10597
  /**
10384
10598
  * Color name for component from the Quasar Color Palette
10385
- * Default value: grey-8
10386
10599
  */
10387
10600
  color: string;
10388
10601
  /**
@@ -10425,8 +10638,9 @@ export interface QTableSlots {
10425
10638
  colsMap: LooseDictionary;
10426
10639
  /**
10427
10640
  * Trigger a table sort
10641
+ * @param col Column name or column definition object
10428
10642
  */
10429
- sort: Function;
10643
+ sort: (col: string | LooseDictionary) => void;
10430
10644
  /**
10431
10645
  * (Only if using selection) Is row selected? Can directly be assigned new Boolean value which changes selection state
10432
10646
  */
@@ -10437,7 +10651,6 @@ export interface QTableSlots {
10437
10651
  expand: boolean;
10438
10652
  /**
10439
10653
  * Color name for component from the Quasar Color Palette
10440
- * Default value: grey-8
10441
10654
  */
10442
10655
  color: string;
10443
10656
  /**
@@ -10464,8 +10677,9 @@ export interface QTableSlots {
10464
10677
  colsMap: LooseDictionary;
10465
10678
  /**
10466
10679
  * Trigger a table sort
10680
+ * @param col Column name or column definition object
10467
10681
  */
10468
- sort: Function;
10682
+ sort: (col: string | LooseDictionary) => void;
10469
10683
  /**
10470
10684
  * (Only if using selection) Is row selected? Can directly be assigned new Boolean value which changes selection state
10471
10685
  */
@@ -10476,7 +10690,6 @@ export interface QTableSlots {
10476
10690
  expand: boolean;
10477
10691
  /**
10478
10692
  * Color name for component from the Quasar Color Palette
10479
- * Default value: grey-8
10480
10693
  */
10481
10694
  color: string;
10482
10695
  /**
@@ -10549,19 +10762,19 @@ export interface QTableSlots {
10549
10762
  /**
10550
10763
  * Navigates to first page
10551
10764
  */
10552
- firstPage: Function;
10765
+ firstPage: () => void;
10553
10766
  /**
10554
10767
  * Navigates to previous page, if available
10555
10768
  */
10556
- prevPage: Function;
10769
+ prevPage: () => void;
10557
10770
  /**
10558
10771
  * Navigates to next page, if available
10559
10772
  */
10560
- nextPage: Function;
10773
+ nextPage: () => void;
10561
10774
  /**
10562
10775
  * Navigates to last page
10563
10776
  */
10564
- lastPage: Function;
10777
+ lastPage: () => void;
10565
10778
  /**
10566
10779
  * Is table in fullscreen mode?
10567
10780
  */
@@ -10569,7 +10782,7 @@ export interface QTableSlots {
10569
10782
  /**
10570
10783
  * Toggles fullscreen mode
10571
10784
  */
10572
- toggleFullscreen: Function;
10785
+ toggleFullscreen: () => void;
10573
10786
  }) => VNode[];
10574
10787
  /**
10575
10788
  * Slot to define how table bottom looks like
@@ -10612,19 +10825,19 @@ export interface QTableSlots {
10612
10825
  /**
10613
10826
  * Navigates to first page
10614
10827
  */
10615
- firstPage: Function;
10828
+ firstPage: () => void;
10616
10829
  /**
10617
10830
  * Navigates to previous page, if available
10618
10831
  */
10619
- prevPage: Function;
10832
+ prevPage: () => void;
10620
10833
  /**
10621
10834
  * Navigates to next page, if available
10622
10835
  */
10623
- nextPage: Function;
10836
+ nextPage: () => void;
10624
10837
  /**
10625
10838
  * Navigates to last page
10626
10839
  */
10627
- lastPage: Function;
10840
+ lastPage: () => void;
10628
10841
  /**
10629
10842
  * Is table in fullscreen mode?
10630
10843
  */
@@ -10632,7 +10845,7 @@ export interface QTableSlots {
10632
10845
  /**
10633
10846
  * Toggles fullscreen mode
10634
10847
  */
10635
- toggleFullscreen: Function;
10848
+ toggleFullscreen: () => void;
10636
10849
  }) => VNode[];
10637
10850
  /**
10638
10851
  * Slot to override default pagination label and buttons
@@ -10675,19 +10888,19 @@ export interface QTableSlots {
10675
10888
  /**
10676
10889
  * Navigates to first page
10677
10890
  */
10678
- firstPage: Function;
10891
+ firstPage: () => void;
10679
10892
  /**
10680
10893
  * Navigates to previous page, if available
10681
10894
  */
10682
- prevPage: Function;
10895
+ prevPage: () => void;
10683
10896
  /**
10684
10897
  * Navigates to next page, if available
10685
10898
  */
10686
- nextPage: Function;
10899
+ nextPage: () => void;
10687
10900
  /**
10688
10901
  * Navigates to last page
10689
10902
  */
10690
- lastPage: Function;
10903
+ lastPage: () => void;
10691
10904
  /**
10692
10905
  * Is table in fullscreen mode?
10693
10906
  */
@@ -10695,7 +10908,7 @@ export interface QTableSlots {
10695
10908
  /**
10696
10909
  * Toggles fullscreen mode
10697
10910
  */
10698
- toggleFullscreen: Function;
10911
+ toggleFullscreen: () => void;
10699
10912
  }) => VNode[];
10700
10913
  /**
10701
10914
  * Slot to define how left part of the table top looks like
@@ -10738,19 +10951,19 @@ export interface QTableSlots {
10738
10951
  /**
10739
10952
  * Navigates to first page
10740
10953
  */
10741
- firstPage: Function;
10954
+ firstPage: () => void;
10742
10955
  /**
10743
10956
  * Navigates to previous page, if available
10744
10957
  */
10745
- prevPage: Function;
10958
+ prevPage: () => void;
10746
10959
  /**
10747
10960
  * Navigates to next page, if available
10748
10961
  */
10749
- nextPage: Function;
10962
+ nextPage: () => void;
10750
10963
  /**
10751
10964
  * Navigates to last page
10752
10965
  */
10753
- lastPage: Function;
10966
+ lastPage: () => void;
10754
10967
  /**
10755
10968
  * Is table in fullscreen mode?
10756
10969
  */
@@ -10758,7 +10971,7 @@ export interface QTableSlots {
10758
10971
  /**
10759
10972
  * Toggles fullscreen mode
10760
10973
  */
10761
- toggleFullscreen: Function;
10974
+ toggleFullscreen: () => void;
10762
10975
  }) => VNode[];
10763
10976
  /**
10764
10977
  * Slot to define how right part of the table top looks like
@@ -10801,19 +11014,19 @@ export interface QTableSlots {
10801
11014
  /**
10802
11015
  * Navigates to first page
10803
11016
  */
10804
- firstPage: Function;
11017
+ firstPage: () => void;
10805
11018
  /**
10806
11019
  * Navigates to previous page, if available
10807
11020
  */
10808
- prevPage: Function;
11021
+ prevPage: () => void;
10809
11022
  /**
10810
11023
  * Navigates to next page, if available
10811
11024
  */
10812
- nextPage: Function;
11025
+ nextPage: () => void;
10813
11026
  /**
10814
11027
  * Navigates to last page
10815
11028
  */
10816
- lastPage: Function;
11029
+ lastPage: () => void;
10817
11030
  /**
10818
11031
  * Is table in fullscreen mode?
10819
11032
  */
@@ -10821,7 +11034,7 @@ export interface QTableSlots {
10821
11034
  /**
10822
11035
  * Toggles fullscreen mode
10823
11036
  */
10824
- toggleFullscreen: Function;
11037
+ toggleFullscreen: () => void;
10825
11038
  }) => VNode[];
10826
11039
  /**
10827
11040
  * Slot to define how top table section looks like when user has selected at least one row
@@ -10864,19 +11077,19 @@ export interface QTableSlots {
10864
11077
  /**
10865
11078
  * Navigates to first page
10866
11079
  */
10867
- firstPage: Function;
11080
+ firstPage: () => void;
10868
11081
  /**
10869
11082
  * Navigates to previous page, if available
10870
11083
  */
10871
- prevPage: Function;
11084
+ prevPage: () => void;
10872
11085
  /**
10873
11086
  * Navigates to next page, if available
10874
11087
  */
10875
- nextPage: Function;
11088
+ nextPage: () => void;
10876
11089
  /**
10877
11090
  * Navigates to last page
10878
11091
  */
10879
- lastPage: Function;
11092
+ lastPage: () => void;
10880
11093
  /**
10881
11094
  * Is table in fullscreen mode?
10882
11095
  */
@@ -10884,7 +11097,7 @@ export interface QTableSlots {
10884
11097
  /**
10885
11098
  * Toggles fullscreen mode
10886
11099
  */
10887
- toggleFullscreen: Function;
11100
+ toggleFullscreen: () => void;
10888
11101
  }) => VNode[];
10889
11102
  /**
10890
11103
  * Slot to define how the bottom will look like when is nothing to display
@@ -10943,8 +11156,18 @@ export interface QTable extends ComponentPublicInstance<QTableProps> {
10943
11156
  };
10944
11157
  /**
10945
11158
  * Filtering method (the 'filter-method' prop)
10946
- */
10947
- filter?: Function;
11159
+ * @param rows Array of rows
11160
+ * @param terms Terms to filter with (is essentially the 'filter' prop value)
11161
+ * @param cols Optional column definitions
11162
+ * @param getCellValue Optional function to get a cell value
11163
+ * @returns Filtered rows
11164
+ */
11165
+ filter?: (
11166
+ rows: any[],
11167
+ terms: string | LooseDictionary,
11168
+ cols?: any[],
11169
+ getCellValue?: (col?: LooseDictionary, row?: LooseDictionary) => any
11170
+ ) => any[];
10948
11171
  }) => void;
10949
11172
  /**
10950
11173
  * Unless using an external pagination Object (through 'v-model:pagination' prop), you can use this method and force the internal pagination to change
@@ -11021,7 +11244,7 @@ export interface QTable extends ComponentPublicInstance<QTableProps> {
11021
11244
  /**
11022
11245
  * Scroll the table to the row with the specified index in page (0 based)
11023
11246
  * @param index The index of the row in page (0 based)
11024
- * @param edge Only for virtual scroll - the edge to align to if the row is not visible already (by default it aligns to end if scrolling towards the end and to start otherwise); If the '-force' version is used then it always aligns
11247
+ * @param edge Only for virtual scroll - the edge to align to if the row is not visible already; If the '-force' version is used then it always aligns
11025
11248
  */
11026
11249
  scrollTo: (
11027
11250
  index: string | number,
@@ -11167,7 +11390,7 @@ export interface QRouteTabProps {
11167
11390
  * @param evt JS event object; If you want to cancel navigation set synchronously 'evt.navigate' to false
11168
11391
  * @param navigateFn When you need to control the time at which the tab should trigger the route navigation then set 'evt.navigate' to false and call this function; Useful if you have async work to be done before the actual route navigation
11169
11392
  */
11170
- onClick?: (evt: LooseDictionary, navigateFn: Function) => void;
11393
+ onClick?: (evt: LooseDictionary, navigateFn: () => void) => void;
11171
11394
  }
11172
11395
 
11173
11396
  export interface QRouteTabSlots {
@@ -11422,8 +11645,11 @@ export interface QTimeProps {
11422
11645
  defaultDate?: string | undefined;
11423
11646
  /**
11424
11647
  * Optionally configure what time is the user allowed to set; Overridden by 'hour-options', 'minute-options' and 'second-options' if those are set; For best performance, reference it from your scope and do not define it inline
11648
+ * @param hr Hour
11649
+ * @param min Minutes
11650
+ * @param sec Seconds
11425
11651
  */
11426
- options?: Function | undefined;
11652
+ options?: ((hr: number, min: number, sec: number) => void) | undefined;
11427
11653
  /**
11428
11654
  * Optionally configure what hours is the user allowed to set; Overrides 'options' prop if that is also set
11429
11655
  */
@@ -11972,8 +12198,13 @@ export interface QTreeProps {
11972
12198
  /**
11973
12199
  * The function to use to filter the tree nodes; For best performance, reference it from your scope and do not define it inline
11974
12200
  * Default value: (see source code)
12201
+ * @param node Node currently being filtered
12202
+ * @param filter Filter text to match against
12203
+ * @returns Matches or not
11975
12204
  */
11976
- filterMethod?: Function | undefined;
12205
+ filterMethod?:
12206
+ | ((node: LooseDictionary, filter: string) => boolean)
12207
+ | undefined;
11977
12208
  /**
11978
12209
  * Toggle animation duration (in milliseconds)
11979
12210
  * Default value: 300
@@ -12007,12 +12238,13 @@ export interface QTreeProps {
12007
12238
  key: string;
12008
12239
  /**
12009
12240
  * The callback to be carried out when the loading is successful
12241
+ * @param children Array of nodes
12010
12242
  */
12011
- done: Function;
12243
+ done: (children?: any[]) => void;
12012
12244
  /**
12013
12245
  * The callback to be carried out should the loading fails
12014
12246
  */
12015
- fail: Function;
12247
+ fail: () => void;
12016
12248
  }) => void;
12017
12249
  /**
12018
12250
  * Emitted when nodes are ticked/unticked via the checkbox; Used by Vue on 'v-model:ticked' to update its value
@@ -12051,7 +12283,7 @@ export interface QTreeSlots {
12051
12283
  /**
12052
12284
  * QTree instance
12053
12285
  */
12054
- tree: LooseDictionary;
12286
+ tree: QTree;
12055
12287
  /**
12056
12288
  * Node object
12057
12289
  */
@@ -12085,7 +12317,7 @@ export interface QTreeSlots {
12085
12317
  /**
12086
12318
  * QTree instance
12087
12319
  */
12088
- tree: LooseDictionary;
12320
+ tree: QTree;
12089
12321
  /**
12090
12322
  * Node object
12091
12323
  */
@@ -12119,7 +12351,7 @@ export interface QTreeSlots {
12119
12351
  /**
12120
12352
  * QTree instance
12121
12353
  */
12122
- tree: LooseDictionary;
12354
+ tree: QTree;
12123
12355
  /**
12124
12356
  * Node object
12125
12357
  */
@@ -12153,7 +12385,7 @@ export interface QTreeSlots {
12153
12385
  /**
12154
12386
  * QTree instance
12155
12387
  */
12156
- tree: LooseDictionary;
12388
+ tree: QTree;
12157
12389
  /**
12158
12390
  * Node object
12159
12391
  */
@@ -12227,24 +12459,34 @@ export interface QTree extends ComponentPublicInstance<QTreeProps> {
12227
12459
  export interface QUploaderProps {
12228
12460
  /**
12229
12461
  * 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
12462
+ * @param files Uploaded files
12463
+ * @returns Optional configuration for the upload process; You can override QUploader props in this Object (url, method, headers, formFields, fieldName, withCredentials, sendRaw); Props of these Object can also be Functions with the form of (file[s]) => value
12230
12464
  */
12231
- factory?: Function | undefined;
12465
+ factory?: ((files: any[]) => LooseDictionary | Promise<any>) | undefined;
12232
12466
  /**
12233
12467
  * URL or path to the server which handles the upload. Takes String or factory function, which returns String. Function is called right before upload; If using a function then for best performance, reference it from your scope and do not define it inline
12468
+ * @param files Uploaded files
12469
+ * @returns URL or path to the server which handles the upload
12234
12470
  */
12235
- url?: string | Function | undefined;
12471
+ url?: string | ((files: any[]) => string) | undefined;
12236
12472
  /**
12237
12473
  * HTTP method to use for upload; Takes String or factory function which returns a String; Function is called right before upload; If using a function then for best performance, reference it from your scope and do not define it inline
12238
12474
  * Default value: POST
12475
+ * @param files Uploaded files
12476
+ * @returns HTTP method to use for upload
12239
12477
  */
12240
- method?: "POST" | "PUT" | Function | undefined;
12478
+ method?: "POST" | "PUT" | ((files: any[]) => string) | undefined;
12241
12479
  /**
12242
12480
  * Field name for each file upload; This goes into the following header: 'Content-Disposition: form-data; name="__HERE__"; filename="somefile.png"; If using a function then for best performance, reference it from your scope and do not define it inline
12243
12481
  * Default value: (file) => file.name
12482
+ * @param files The current file being processed
12483
+ * @returns Field name for the current file upload
12244
12484
  */
12245
- fieldName?: string | Function | undefined;
12485
+ fieldName?: string | ((files: File) => string) | undefined;
12246
12486
  /**
12247
12487
  * Array or a factory function which returns an array; Array consists of objects with header definitions; Function is called right before upload; If using a function then for best performance, reference it from your scope and do not define it inline
12488
+ * @param files Uploaded files
12489
+ * @returns An array consists of objects with header definitions
12248
12490
  */
12249
12491
  headers?:
12250
12492
  | {
@@ -12257,10 +12499,12 @@ export interface QUploaderProps {
12257
12499
  */
12258
12500
  value: string;
12259
12501
  }[]
12260
- | Function
12502
+ | ((files: any[]) => string)
12261
12503
  | undefined;
12262
12504
  /**
12263
12505
  * Array or a factory function which returns an array; Array consists of objects with additional fields definitions (used by Form to be uploaded); Function is called right before upload; If using a function then for best performance, reference it from your scope and do not define it inline
12506
+ * @param files Uploaded files
12507
+ * @returns An array consists of objects with additional fields definitions (used by Form to be uploaded)
12264
12508
  */
12265
12509
  formFields?:
12266
12510
  | {
@@ -12273,20 +12517,26 @@ export interface QUploaderProps {
12273
12517
  */
12274
12518
  value: string;
12275
12519
  }[]
12276
- | Function
12520
+ | ((files: any[]) => string)
12277
12521
  | undefined;
12278
12522
  /**
12279
12523
  * Sets withCredentials to true on the XHR that manages the upload; Takes boolean or factory function for Boolean; Function is called right before upload; If using a function then for best performance, reference it from your scope and do not define it inline
12524
+ * @param files Uploaded files
12525
+ * @returns If true, withCredentials will be set to true on the XHR that manages the upload
12280
12526
  */
12281
- withCredentials?: boolean | Function | undefined;
12527
+ withCredentials?: boolean | ((files: any[]) => boolean) | undefined;
12282
12528
  /**
12283
12529
  * Send raw files without wrapping into a Form(); Takes boolean or factory function for Boolean; Function is called right before upload; If using a function then for best performance, reference it from your scope and do not define it inline
12530
+ * @param files Uploaded files
12531
+ * @returns If true, raw files will get sent without wrapping into a Form()
12284
12532
  */
12285
- sendRaw?: boolean | Function | undefined;
12533
+ sendRaw?: boolean | ((files: any[]) => boolean) | undefined;
12286
12534
  /**
12287
12535
  * Upload files in batch (in one XHR request); Takes boolean or factory function for Boolean; Function is called right before upload; If using a function then for best performance, reference it from your scope and do not define it inline
12536
+ * @param files Uploaded files
12537
+ * @returns If true, files will be uploaded in a batch (in one XHR request)
12288
12538
  */
12289
- batch?: boolean | Function | undefined;
12539
+ batch?: boolean | ((files: any[]) => boolean) | undefined;
12290
12540
  /**
12291
12541
  * Allow multiple file uploads
12292
12542
  */
@@ -12313,8 +12563,10 @@ export interface QUploaderProps {
12313
12563
  maxFiles?: number | string | undefined;
12314
12564
  /**
12315
12565
  * Custom filter for added files; Only files that pass this filter will be added to the queue and uploaded; For best performance, reference it from your scope and do not define it inline
12566
+ * @param files Candidate files to be added to queue
12567
+ * @returns Filtered files to be added to queue
12316
12568
  */
12317
- filter?: Function | undefined;
12569
+ filter?: ((files: FileList | any[]) => any[]) | undefined;
12318
12570
  /**
12319
12571
  * Label for the uploader
12320
12572
  */
@@ -12407,10 +12659,10 @@ export interface QUploaderProps {
12407
12659
  }) => void;
12408
12660
  /**
12409
12661
  * Emitted when factory function is supplied with a Promise which is rejected
12410
- * @param err Error Object which is the Promise rejection reason
12662
+ * @param err Error object which is the Promise rejection reason
12411
12663
  * @param files Files which were to get uploaded
12412
12664
  */
12413
- onFactoryFailed?: (err: LooseDictionary, files: any[]) => void;
12665
+ onFactoryFailed?: (err: Error, files: any[]) => void;
12414
12666
  /**
12415
12667
  * Emitted after files are picked and some do not pass the validation props (accept, max-file-size, max-total-size, filter, etc)
12416
12668
  * @param rejectedEntries Array of { failedPropValidation: string, file: File } Objects for files that do not pass the validation
@@ -12563,8 +12815,11 @@ export interface QVirtualScrollProps {
12563
12815
  itemsSize?: number | undefined;
12564
12816
  /**
12565
12817
  * Function to return the scope for the items to be displayed; Should return an array for items starting from 'from' index for size length; For best performance, reference it from your scope and do not define it inline
12818
+ * @param from Index of the first item (0 based)
12819
+ * @param size Number of items to return
12820
+ * @returns List of scope for items to be displayed
12566
12821
  */
12567
- itemsFn?: Function | undefined;
12822
+ itemsFn?: ((from: number, size: number) => any[]) | undefined;
12568
12823
  /**
12569
12824
  * CSS selector or DOM element to be used as a custom scroll container instead of the auto detected one
12570
12825
  */
@@ -12591,9 +12846,9 @@ export interface QVirtualScrollProps {
12591
12846
  */
12592
12847
  direction: "increase" | "decrease";
12593
12848
  /**
12594
- * Vue reference to the QVirtualList which triggered the event
12849
+ * Vue reference to the QVirtualScroll
12595
12850
  */
12596
- ref: LooseDictionary;
12851
+ ref: QVirtualScroll;
12597
12852
  }) => void;
12598
12853
  }
12599
12854
 
@@ -12656,19 +12911,19 @@ export interface DialogChainObject {
12656
12911
  * @param callbackFn Tell what to do
12657
12912
  * @returns Chained Object
12658
12913
  */
12659
- onOk: (callbackFn: Function) => DialogChainObject;
12914
+ onOk: (callbackFn: (payload?: any) => void) => DialogChainObject;
12660
12915
  /**
12661
12916
  * Receives a Function as param to tell what to do when Cancel is pressed / dialog is dismissed
12662
12917
  * @param callbackFn Tell what to do
12663
12918
  * @returns Chained Object
12664
12919
  */
12665
- onCancel: (callbackFn: Function) => DialogChainObject;
12920
+ onCancel: (callbackFn: () => void) => DialogChainObject;
12666
12921
  /**
12667
12922
  * Receives a Function param to tell what to do when the dialog is closed
12668
12923
  * @param callbackFn Tell what to do
12669
12924
  * @returns Chained Object
12670
12925
  */
12671
- onDismiss: (callbackFn: Function) => DialogChainObject;
12926
+ onDismiss: (callbackFn: () => void) => DialogChainObject;
12672
12927
  /**
12673
12928
  * Hides the dialog when called
12674
12929
  * @returns Chained Object
@@ -12679,7 +12934,7 @@ export interface DialogChainObject {
12679
12934
  * @param opts Props (except 'component') which will overwrite the initial create() params; If create() was invoked with a custom dialog component then this param should contain the new componentProps
12680
12935
  * @returns Chained Object
12681
12936
  */
12682
- update: (opts?: LooseDictionary) => DialogChainObject;
12937
+ update: (opts: LooseDictionary) => DialogChainObject;
12683
12938
  }
12684
12939
 
12685
12940
  import { CookiesGetMethodType } from "./api";
@@ -12724,8 +12979,10 @@ export interface QDialogOptions {
12724
12979
  type?: string;
12725
12980
  /**
12726
12981
  * Is typed content valid?
12982
+ * @param val The value of the input
12983
+ * @returns The text passed validation or not
12727
12984
  */
12728
- isValid?: Function;
12985
+ isValid?: (val: string) => boolean;
12729
12986
  /**
12730
12987
  * Attributes to pass to prompt control
12731
12988
  */
@@ -12794,8 +13051,10 @@ export interface QDialogOptions {
12794
13051
  items?: any[];
12795
13052
  /**
12796
13053
  * Is the model valid?
13054
+ * @param model The current model (String if it's of type radio or Array otherwise)
13055
+ * @returns The selection passed validation or not
12797
13056
  */
12798
- isValid?: Function;
13057
+ isValid?: (model: string | any[]) => boolean;
12799
13058
  };
12800
13059
  /**
12801
13060
  * Display a Quasar spinner (if value is true, then the defaults are used); Useful for conveying the idea that something is happening behind the covers; Tip: use along with persistent, ok: false and update() method
@@ -12815,21 +13074,11 @@ export interface QDialogOptions {
12815
13074
  /**
12816
13075
  * Props for an 'OK' button
12817
13076
  */
12818
- ok?:
12819
- | string
12820
- | {
12821
- [index: string]: any;
12822
- }
12823
- | boolean;
13077
+ ok?: string | { [index: string]: any } | boolean;
12824
13078
  /**
12825
13079
  * Props for a 'CANCEL' button
12826
13080
  */
12827
- cancel?:
12828
- | string
12829
- | {
12830
- [index: string]: any;
12831
- }
12832
- | boolean;
13081
+ cancel?: string | { [index: string]: any } | boolean;
12833
13082
  /**
12834
13083
  * What button to focus, unless you also have 'prompt' or 'options'
12835
13084
  * Default value: ok
@@ -12892,7 +13141,7 @@ export interface QDialogOptions {
12892
13141
  /**
12893
13142
  * Use custom dialog component; use along with 'componentProps' prop where possible
12894
13143
  */
12895
- component?: any;
13144
+ component?: Component;
12896
13145
  /**
12897
13146
  * User defined props which will be forwarded to underlying custom component if 'component' prop is used
12898
13147
  */
@@ -13103,7 +13352,7 @@ declare module "./globals" {
13103
13352
  /**
13104
13353
  * Function to call when notification gets dismissed
13105
13354
  */
13106
- onDismiss?: Function;
13355
+ onDismiss?: () => void;
13107
13356
  /**
13108
13357
  * Convenience way to add a dismiss button with a specific label, without using the 'actions' prop; If set to true, it uses a label accordding to the current Quasar language
13109
13358
  */
@@ -13118,7 +13367,85 @@ declare module "./globals" {
13118
13367
  ignoreDefaults?: boolean;
13119
13368
  }
13120
13369
  | string
13121
- ) => Function;
13370
+ ) => (props?: {
13371
+ /**
13372
+ * Optional type (that has been previously registered) or one of the out of the box ones ('positive', 'negative', 'warning', 'info', 'ongoing')
13373
+ */
13374
+ type?: string;
13375
+ /**
13376
+ * Color name for component from the Quasar Color Palette
13377
+ */
13378
+ color?: string;
13379
+ /**
13380
+ * Color name for component from the Quasar Color Palette
13381
+ */
13382
+ textColor?: string;
13383
+ /**
13384
+ * The content of your message
13385
+ */
13386
+ message?: string;
13387
+ /**
13388
+ * The content of your optional caption
13389
+ */
13390
+ caption?: string;
13391
+ /**
13392
+ * Render message as HTML; This can lead to XSS attacks, so make sure that you sanitize the message first
13393
+ */
13394
+ html?: boolean;
13395
+ /**
13396
+ * Icon name following Quasar convention; Make sure you have the icon library installed unless you are using 'img:' prefix
13397
+ */
13398
+ icon?: string;
13399
+ /**
13400
+ * URL to an avatar/image; Suggestion: use statics folder
13401
+ */
13402
+ avatar?: string;
13403
+ /**
13404
+ * Useful for notifications that are updated; Displays a Quasar spinner instead of an avatar or icon; If value is Boolean 'true' then the default QSpinner is shown
13405
+ */
13406
+ spinner?: boolean | Component;
13407
+ /**
13408
+ * Show progress bar to detail when notification will disappear automatically (unless timeout is 0)
13409
+ */
13410
+ progress?: boolean;
13411
+ /**
13412
+ * Class definitions to be attributed to the progress bar
13413
+ */
13414
+ progressClass?: any[] | string | LooseDictionary;
13415
+ /**
13416
+ * Add CSS class(es) to the notification for easier customization
13417
+ */
13418
+ classes?: string;
13419
+ /**
13420
+ * Key-value for attributes to be set on the notification
13421
+ */
13422
+ attrs?: LooseDictionary;
13423
+ /**
13424
+ * Amount of time to display (in milliseconds)
13425
+ * Default value: 5000
13426
+ */
13427
+ timeout?: number;
13428
+ /**
13429
+ * Notification actions (buttons); If a 'handler' is specified or not, clicking/tapping on the button will also close the notification; Also check 'closeBtn' convenience prop
13430
+ */
13431
+ actions?: any[];
13432
+ /**
13433
+ * Function to call when notification gets dismissed
13434
+ */
13435
+ onDismiss?: () => void;
13436
+ /**
13437
+ * Convenience way to add a dismiss button with a specific label, without using the 'actions' prop; If set to true, it uses a label accordding to the current Quasar language
13438
+ */
13439
+ closeBtn?: boolean | string;
13440
+ /**
13441
+ * Put notification into multi-line mode; If this prop isn't used and more than one 'action' is specified then notification goes into multi-line mode by default
13442
+ */
13443
+ multiLine?: boolean;
13444
+ /**
13445
+ * Ignore the default configuration (set by setDefaults()) for this instance only
13446
+ */
13447
+ ignoreDefaults?: boolean;
13448
+ }) => void;
13122
13449
  platform: Platform;
13123
13450
  screen: Screen;
13124
13451
  sessionStorage: SessionStorage;