quasar 2.2.4 → 2.3.3

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 (253) 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 +40 -11
  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 +10 -5
  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 +27 -6
  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 +2 -1
  32. package/dist/api/QFab.json +8 -4
  33. package/dist/api/QFabAction.json +4 -2
  34. package/dist/api/QField.json +2 -1
  35. package/dist/api/QFile.json +3 -0
  36. package/dist/api/QFooter.json +3 -2
  37. package/dist/api/QHeader.json +5 -3
  38. package/dist/api/QIcon.json +2 -1
  39. package/dist/api/QImg.json +8 -4
  40. package/dist/api/QInfiniteScroll.json +6 -3
  41. package/dist/api/QInnerLoading.json +8 -4
  42. package/dist/api/QInput.json +2 -1
  43. package/dist/api/QIntersection.json +17 -1
  44. package/dist/api/QItem.json +2 -1
  45. package/dist/api/QKnob.json +8 -4
  46. package/dist/api/QLayout.json +9 -1
  47. package/dist/api/QLinearProgress.json +17 -1
  48. package/dist/api/QMarkupTable.json +2 -1
  49. package/dist/api/QMenu.json +8 -4
  50. package/dist/api/QNoSsr.json +2 -1
  51. package/dist/api/QOptionGroup.json +2 -1
  52. package/dist/api/QPage.json +2 -1
  53. package/dist/api/QPageScroller.json +8 -4
  54. package/dist/api/QPageSticky.json +2 -1
  55. package/dist/api/QPagination.json +10 -6
  56. package/dist/api/QParallax.json +2 -1
  57. package/dist/api/QPopupEdit.json +5 -2
  58. package/dist/api/QPopupProxy.json +4 -2
  59. package/dist/api/QRange.json +8 -4
  60. package/dist/api/QRating.json +2 -1
  61. package/dist/api/QResizeObserver.json +4 -1
  62. package/dist/api/QRouteTab.json +5 -26
  63. package/dist/api/QScrollArea.json +29 -4
  64. package/dist/api/QScrollObserver.json +13 -1
  65. package/dist/api/QSelect.json +135 -37
  66. package/dist/api/QSeparator.json +2 -1
  67. package/dist/api/QSkeleton.json +9 -5
  68. package/dist/api/QSlideItem.json +9 -0
  69. package/dist/api/QSlideTransition.json +2 -1
  70. package/dist/api/QSlider.json +8 -4
  71. package/dist/api/QSpinner.json +2 -1
  72. package/dist/api/QSplitter.json +4 -2
  73. package/dist/api/QStep.json +2 -1
  74. package/dist/api/QStepper.json +6 -3
  75. package/dist/api/QTab.json +4 -2
  76. package/dist/api/QTabPanels.json +6 -3
  77. package/dist/api/QTable.json +216 -93
  78. package/dist/api/QTabs.json +4 -2
  79. package/dist/api/QTime.json +16 -4
  80. package/dist/api/QTimeline.json +4 -2
  81. package/dist/api/QTimelineEntry.json +4 -2
  82. package/dist/api/QToggle.json +8 -4
  83. package/dist/api/QTooltip.json +18 -9
  84. package/dist/api/QTree.json +26 -15
  85. package/dist/api/QUploader.json +93 -5
  86. package/dist/api/QVirtualScroll.json +23 -9
  87. package/dist/api/ScrollFire.json +1 -1
  88. package/dist/api/SessionStorage.json +8 -0
  89. package/dist/api/TouchHold.json +2 -1
  90. package/dist/api/TouchRepeat.json +2 -1
  91. package/dist/api/TouchSwipe.json +2 -1
  92. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  93. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  94. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  95. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  96. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  97. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  98. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  99. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  100. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  101. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  102. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  103. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  104. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  105. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  106. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  107. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  108. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  109. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  110. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  111. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +6 -0
  112. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  113. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  114. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  115. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  116. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  117. package/dist/icon-set/svg-mdi-v4.umd.prod.js +1 -1
  118. package/dist/icon-set/svg-mdi-v5.umd.prod.js +1 -1
  119. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  120. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  121. package/dist/icon-set/themify.umd.prod.js +1 -1
  122. package/dist/lang/ar.umd.prod.js +1 -1
  123. package/dist/lang/az-Latn.umd.prod.js +1 -1
  124. package/dist/lang/bg.umd.prod.js +1 -1
  125. package/dist/lang/bn.umd.prod.js +1 -1
  126. package/dist/lang/ca.umd.prod.js +1 -1
  127. package/dist/lang/cs.umd.prod.js +1 -1
  128. package/dist/lang/da.umd.prod.js +1 -1
  129. package/dist/lang/de.umd.prod.js +1 -1
  130. package/dist/lang/el.umd.prod.js +1 -1
  131. package/dist/lang/en-GB.umd.prod.js +1 -1
  132. package/dist/lang/en-US.umd.prod.js +1 -1
  133. package/dist/lang/eo.umd.prod.js +1 -1
  134. package/dist/lang/es.umd.prod.js +1 -1
  135. package/dist/lang/et.umd.prod.js +1 -1
  136. package/dist/lang/fa-IR.umd.prod.js +1 -1
  137. package/dist/lang/fa.umd.prod.js +1 -1
  138. package/dist/lang/fi.umd.prod.js +1 -1
  139. package/dist/lang/fr.umd.prod.js +1 -1
  140. package/dist/lang/gn.umd.prod.js +1 -1
  141. package/dist/lang/he.umd.prod.js +1 -1
  142. package/dist/lang/hr.umd.prod.js +1 -1
  143. package/dist/lang/hu.umd.prod.js +1 -1
  144. package/dist/lang/id.umd.prod.js +1 -1
  145. package/dist/lang/is.umd.prod.js +1 -1
  146. package/dist/lang/it.umd.prod.js +1 -1
  147. package/dist/lang/ja.umd.prod.js +1 -1
  148. package/dist/lang/km.umd.prod.js +1 -1
  149. package/dist/lang/ko-KR.umd.prod.js +1 -1
  150. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  151. package/dist/lang/lt.umd.prod.js +1 -1
  152. package/dist/lang/lu.umd.prod.js +1 -1
  153. package/dist/lang/lv.umd.prod.js +1 -1
  154. package/dist/lang/ml.umd.prod.js +1 -1
  155. package/dist/lang/ms.umd.prod.js +1 -1
  156. package/dist/lang/nb-NO.umd.prod.js +1 -1
  157. package/dist/lang/nl.umd.prod.js +1 -1
  158. package/dist/lang/pl.umd.prod.js +1 -1
  159. package/dist/lang/pt-BR.umd.prod.js +1 -1
  160. package/dist/lang/pt.umd.prod.js +1 -1
  161. package/dist/lang/ro.umd.prod.js +1 -1
  162. package/dist/lang/ru.umd.prod.js +1 -1
  163. package/dist/lang/sk.umd.prod.js +1 -1
  164. package/dist/lang/sl.umd.prod.js +1 -1
  165. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  166. package/dist/lang/sr.umd.prod.js +1 -1
  167. package/dist/lang/sv.umd.prod.js +1 -1
  168. package/dist/lang/ta.umd.prod.js +1 -1
  169. package/dist/lang/th.umd.prod.js +1 -1
  170. package/dist/lang/tr.umd.prod.js +1 -1
  171. package/dist/lang/ug.umd.prod.js +1 -1
  172. package/dist/lang/uk.umd.prod.js +1 -1
  173. package/dist/lang/vi.umd.prod.js +1 -1
  174. package/dist/lang/zh-CN.umd.prod.js +1 -1
  175. package/dist/lang/zh-TW.umd.prod.js +1 -1
  176. package/dist/quasar.cjs.prod.js +2 -2
  177. package/dist/quasar.css +7 -2
  178. package/dist/quasar.esm.prod.js +2 -2
  179. package/dist/quasar.prod.css +1 -1
  180. package/dist/quasar.rtl.css +7 -2
  181. package/dist/quasar.rtl.prod.css +1 -1
  182. package/dist/quasar.sass +6 -3
  183. package/dist/quasar.umd.js +185 -105
  184. package/dist/quasar.umd.prod.js +2 -2
  185. package/dist/ssr-directives/Morph.js +1 -1
  186. package/dist/types/api/cookies.d.ts +1 -1
  187. package/dist/types/composables.d.ts +5 -1
  188. package/dist/types/extras/icon-set.d.ts +1 -0
  189. package/dist/types/index.d.ts +516 -176
  190. package/dist/vetur/quasar-attributes.json +14 -2
  191. package/dist/vetur/quasar-tags.json +5 -2
  192. package/dist/web-types/web-types.json +43 -8
  193. package/icon-set/svg-ionicons-v6.js +225 -0
  194. package/package.json +5 -2
  195. package/src/api.extends.json +7 -0
  196. package/src/body.js +14 -4
  197. package/src/components/btn/QBtn.js +1 -0
  198. package/src/components/circular-progress/QCircularProgress.js +6 -1
  199. package/src/components/circular-progress/QCircularProgress.json +6 -0
  200. package/src/components/date/QDate.json +59 -1
  201. package/src/components/editor/QEditor.js +2 -2
  202. package/src/components/editor/QEditor.json +6 -2
  203. package/src/components/field/QField.json +3 -3
  204. package/src/components/file/QFile.json +3 -0
  205. package/src/components/footer/QFooter.json +1 -1
  206. package/src/components/header/QHeader.json +1 -1
  207. package/src/components/icon/QIcon.js +1 -1
  208. package/src/components/infinite-scroll/QInfiniteScroll.js +48 -31
  209. package/src/components/intersection/QIntersection.js +9 -1
  210. package/src/components/intersection/QIntersection.json +9 -0
  211. package/src/components/layout/QLayout.json +8 -1
  212. package/src/components/linear-progress/QLinearProgress.js +10 -1
  213. package/src/components/linear-progress/QLinearProgress.json +6 -0
  214. package/src/components/linear-progress/QLinearProgress.sass +3 -2
  215. package/src/components/pagination/QPagination.json +0 -1
  216. package/src/components/popup-edit/QPopupEdit.json +1 -0
  217. package/src/components/popup-proxy/QPopupProxy.js +6 -15
  218. package/src/components/resize-observer/QResizeObserver.json +2 -0
  219. package/src/components/scroll-area/QScrollArea.js +8 -13
  220. package/src/components/scroll-area/QScrollArea.json +28 -4
  221. package/src/components/scroll-observer/QScrollObserver.json +11 -0
  222. package/src/components/select/QSelect.js +7 -3
  223. package/src/components/select/QSelect.json +71 -11
  224. package/src/components/skeleton/QSkeleton.json +1 -4
  225. package/src/components/slide-item/QSlideItem.json +9 -0
  226. package/src/components/slider/use-slider.js +3 -3
  227. package/src/components/table/QTable.json +155 -60
  228. package/src/components/table/table-pagination.js +6 -2
  229. package/src/components/tabs/QRouteTab.json +1 -23
  230. package/src/components/time/QTime.json +8 -0
  231. package/src/components/tree/QTree.json +14 -9
  232. package/src/components/uploader/xhr-uploader-plugin.json +105 -4
  233. package/src/components/virtual-scroll/use-virtual-scroll.js +17 -1
  234. package/src/components/virtual-scroll/use-virtual-scroll.json +5 -0
  235. package/src/composables/private/use-field.js +4 -4
  236. package/src/composables/private/use-refocus-target.js +12 -3
  237. package/src/composables/private/use-split-attrs.js +10 -7
  238. package/src/composables/use-dialog-plugin-component.js +7 -1
  239. package/src/css/core/transitions.sass +3 -1
  240. package/src/directives/Mutation.json +2 -3
  241. package/src/directives/ScrollFire.json +2 -3
  242. package/src/install-quasar.js +1 -0
  243. package/src/plugins/AppFullscreen.json +8 -8
  244. package/src/plugins/Cookies.json +2 -2
  245. package/src/plugins/Dialog.json +4 -2
  246. package/src/plugins/LoadingBar.json +4 -3
  247. package/src/plugins/Notify.json +13 -19
  248. package/src/utils/create-uploader-component.js +6 -4
  249. package/src/utils/private/get-emits-object.js +11 -0
  250. package/src/utils/private/global-dialog.json +16 -2
  251. package/src/utils/private/vm.js +3 -3
  252. package/src/utils/private/web-storage.json +10 -0
  253. 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
@@ -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
 
@@ -2699,6 +2778,11 @@ export interface QCircularProgressProps {
2699
2778
  * No animation when model changes
2700
2779
  */
2701
2780
  instantFeedback?: boolean | undefined;
2781
+ /**
2782
+ * Animation speed (in milliseconds, without unit)
2783
+ * Default value: 600
2784
+ */
2785
+ animationSpeed?: string | number | undefined;
2702
2786
  }
2703
2787
 
2704
2788
  export interface QCircularProgressSlots {
@@ -2892,16 +2976,22 @@ export interface QDateProps {
2892
2976
  yearsInMonthView?: boolean | undefined;
2893
2977
  /**
2894
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
2895
2981
  */
2896
- events?: any[] | Function | undefined;
2982
+ events?: any[] | ((date: string) => boolean) | undefined;
2897
2983
  /**
2898
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.
2899
2987
  */
2900
- eventColor?: string | Function | undefined;
2988
+ eventColor?: string | ((date: string) => string) | undefined;
2901
2989
  /**
2902
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
2903
2993
  */
2904
- options?: any[] | Function | undefined;
2994
+ options?: any[] | ((date: string) => boolean) | undefined;
2905
2995
  /**
2906
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
2907
2997
  */
@@ -2972,7 +3062,7 @@ export interface QDateProps {
2972
3062
  /**
2973
3063
  * Object of properties of the range starting point (only if range)
2974
3064
  */
2975
- from: {
3065
+ from?: {
2976
3066
  /**
2977
3067
  * The year
2978
3068
  */
@@ -2989,7 +3079,7 @@ export interface QDateProps {
2989
3079
  /**
2990
3080
  * Object of properties of the range ending point (only if range)
2991
3081
  */
2992
- to: {
3082
+ to?: {
2993
3083
  /**
2994
3084
  * The year
2995
3085
  */
@@ -3523,7 +3613,7 @@ export interface QEditorProps {
3523
3613
  /**
3524
3614
  * Either this or "cmd" is required. Function for when button gets clicked/tapped.
3525
3615
  */
3526
- handler?: Function;
3616
+ handler?: () => void;
3527
3617
  /**
3528
3618
  * Either this or "handler" is required. This must be a valid execCommand method according to the designMode API.
3529
3619
  */
@@ -3533,9 +3623,10 @@ export interface QEditorProps {
3533
3623
  */
3534
3624
  param?: string;
3535
3625
  /**
3536
- * Is button disabled? If specifying a function, return a Boolean value.
3626
+ * Is button disabled?
3627
+ * @returns If true, the button will be disabled
3537
3628
  */
3538
- disable?: boolean | Function;
3629
+ disable?: boolean | (() => boolean);
3539
3630
  /**
3540
3631
  * Pass the value "no-state" if the button should not have an "active" state
3541
3632
  */
@@ -4336,7 +4427,7 @@ export interface QFieldSlots {
4336
4427
  /**
4337
4428
  * DOM element of the field
4338
4429
  */
4339
- field: LooseDictionary;
4430
+ field: Element;
4340
4431
  /**
4341
4432
  * Field is editable
4342
4433
  */
@@ -4355,8 +4446,9 @@ export interface QFieldSlots {
4355
4446
  modelValue: any;
4356
4447
  /**
4357
4448
  * Function that emits an @input event in the context of the field
4449
+ * @param value Value to be emitted
4358
4450
  */
4359
- emitValue: Function;
4451
+ emitValue: (value: any) => void;
4360
4452
  }) => VNode[];
4361
4453
  /**
4362
4454
  * undefined
@@ -4416,8 +4508,10 @@ export interface QFileProps {
4416
4508
  maxFiles?: number | string | undefined;
4417
4509
  /**
4418
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
4419
4513
  */
4420
- filter?: Function | undefined;
4514
+ filter?: ((files: FileList | any[]) => any[]) | undefined;
4421
4515
  /**
4422
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
4423
4517
  */
@@ -4576,8 +4670,25 @@ export interface QFileProps {
4576
4670
  useChips?: boolean | undefined;
4577
4671
  /**
4578
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
4579
4675
  */
4580
- 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;
4581
4692
  /**
4582
4693
  * Tabindex HTML attribute value
4583
4694
  */
@@ -5098,7 +5209,7 @@ export interface QInfiniteScrollProps {
5098
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
5099
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
5100
5211
  */
5101
- onLoad?: (index: number, done: Function) => void;
5212
+ onLoad?: (index: number, done: (stop?: boolean) => void) => void;
5102
5213
  }
5103
5214
 
5104
5215
  export interface QInfiniteScrollSlots {
@@ -5532,6 +5643,11 @@ export interface QIntersectionProps {
5532
5643
  * One of Quasar's embedded transitions
5533
5644
  */
5534
5645
  transition?: string | undefined;
5646
+ /**
5647
+ * Transition duration (in milliseconds, without unit)
5648
+ * Default value: 300
5649
+ */
5650
+ transitionDuration?: string | number | undefined;
5535
5651
  /**
5536
5652
  * Disable visibility observable (content will remain as it was, visible or hidden)
5537
5653
  */
@@ -5932,6 +6048,11 @@ export interface QLinearProgressProps {
5932
6048
  * No transition when model changes
5933
6049
  */
5934
6050
  instantFeedback?: boolean | undefined;
6051
+ /**
6052
+ * Animation speed (in milliseconds, without unit)
6053
+ * Default value: 300
6054
+ */
6055
+ animationSpeed?: string | number | undefined;
5935
6056
  }
5936
6057
 
5937
6058
  export interface QLinearProgressSlots {
@@ -6395,8 +6516,11 @@ export interface QPageProps {
6395
6516
  /**
6396
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
6397
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
6398
6522
  */
6399
- styleFn?: Function | undefined;
6523
+ styleFn?: ((offset: number, height: number) => LooseDictionary) | undefined;
6400
6524
  }
6401
6525
 
6402
6526
  export interface QPageSlots {
@@ -6432,7 +6556,6 @@ export interface QPaginationProps {
6432
6556
  min?: number | undefined;
6433
6557
  /**
6434
6558
  * Number of last page (must be higher than 'min')
6435
- * Default value: 100
6436
6559
  */
6437
6560
  max: number;
6438
6561
  /**
@@ -6495,8 +6618,10 @@ export interface QPaginationProps {
6495
6618
  iconLast?: string | undefined;
6496
6619
  /**
6497
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
6498
6623
  */
6499
- toFn?: Function | undefined;
6624
+ toFn?: ((page: number) => LooseDictionary | string) | undefined;
6500
6625
  /**
6501
6626
  * Show boundary button links
6502
6627
  */
@@ -6660,8 +6785,10 @@ export interface QPopupEditProps {
6660
6785
  color?: string | undefined;
6661
6786
  /**
6662
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?
6663
6790
  */
6664
- validate?: Function | undefined;
6791
+ validate?: ((value: any) => boolean) | undefined;
6665
6792
  /**
6666
6793
  * Put component in disabled mode
6667
6794
  */
@@ -6794,20 +6921,22 @@ export interface QPopupEditSlots {
6794
6921
  value: any;
6795
6922
  /**
6796
6923
  * Function that checks if the value is valid
6924
+ * @param value Value to be checked
6925
+ * @returns Checked value is valid or not
6797
6926
  */
6798
- validate: Function;
6927
+ validate: (value: any) => boolean;
6799
6928
  /**
6800
6929
  * Function that sets the value and closes the popup
6801
6930
  */
6802
- set: Function;
6931
+ set: () => void;
6803
6932
  /**
6804
6933
  * Function that cancels the editing and reverts the value to the initialValue
6805
6934
  */
6806
- cancel: Function;
6935
+ cancel: () => void;
6807
6936
  /**
6808
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
6809
6938
  */
6810
- updatePosition: Function;
6939
+ updatePosition: () => void;
6811
6940
  }) => VNode[];
6812
6941
  }
6813
6942
 
@@ -6940,7 +7069,7 @@ export interface QPullToRefreshProps {
6940
7069
  * Called whenever a refresh is triggered; at this time, your function should load more data
6941
7070
  * @param done Call the done() function when your data has been refreshed
6942
7071
  */
6943
- onRefresh?: (done: Function) => void;
7072
+ onRefresh?: (done: () => void) => void;
6944
7073
  }
6945
7074
 
6946
7075
  export interface QPullToRefreshSlots {
@@ -7358,7 +7487,7 @@ export interface QScrollAreaProps {
7358
7487
  tabindex?: number | string | undefined;
7359
7488
  /**
7360
7489
  * Emitted when scroll information changes (and listener is configured)
7361
- * @param info
7490
+ * @param info An object containing scroll information
7362
7491
  */
7363
7492
  onScroll?: (info: {
7364
7493
  /**
@@ -7421,61 +7550,63 @@ export interface QScrollArea extends ComponentPublicInstance<QScrollAreaProps> {
7421
7550
  /**
7422
7551
  * Vertical scroll position (in px)
7423
7552
  */
7424
- verticalPosition?: number;
7553
+ verticalPosition: number;
7425
7554
  /**
7426
7555
  * Vertical scroll percentage (0.0 <= x <= 1.0)
7427
7556
  */
7428
- verticalPercentage?: number;
7557
+ verticalPercentage: number;
7429
7558
  /**
7430
7559
  * Vertical scroll size (in px)
7431
7560
  */
7432
- verticalSize?: number;
7561
+ verticalSize: number;
7433
7562
  /**
7434
7563
  * Height of the container (in px)
7435
7564
  */
7436
- verticalContainerSize?: number;
7565
+ verticalContainerSize: number;
7437
7566
  /**
7438
7567
  * Horizontal scroll position (in px)
7439
7568
  */
7440
- horizontalPosition?: number;
7569
+ horizontalPosition: number;
7441
7570
  /**
7442
7571
  * Horizontal scroll percentage (0.0 <= x <= 1.0)
7443
7572
  */
7444
- horizontalPercentage?: number;
7573
+ horizontalPercentage: number;
7445
7574
  /**
7446
7575
  * Horizontal scroll size (in px)
7447
7576
  */
7448
- horizontalSize?: number;
7577
+ horizontalSize: number;
7449
7578
  /**
7450
7579
  * Width of the container (in px)
7451
7580
  */
7452
- horizontalContainerSize?: number;
7581
+ horizontalContainerSize: number;
7453
7582
  };
7454
7583
  /**
7455
7584
  * Get current scroll position
7585
+ * @returns An object containing scroll position information
7456
7586
  */
7457
7587
  getScrollPosition: () => {
7458
7588
  /**
7459
7589
  * Scroll offset from top (vertical)
7460
7590
  */
7461
- top?: number;
7591
+ top: number;
7462
7592
  /**
7463
7593
  * Scroll offset from left (horizontal)
7464
7594
  */
7465
- left?: number;
7595
+ left: number;
7466
7596
  };
7467
7597
  /**
7468
7598
  * Get current scroll position in percentage (0.0 <= x <= 1.0)
7599
+ * @returns An object containing scroll position information in percentage
7469
7600
  */
7470
7601
  getScrollPercentage: () => {
7471
7602
  /**
7472
7603
  * Scroll percentage (0.0 <= x <= 1.0) offset from top (vertical)
7473
7604
  */
7474
- top?: number;
7605
+ top: number;
7475
7606
  /**
7476
7607
  * Scroll percentage (0.0 <= x <= 1.0) offset from left (horizontal)
7477
7608
  */
7478
- left?: number;
7609
+ left: number;
7479
7610
  };
7480
7611
  /**
7481
7612
  * Set scroll position to an offset; If a duration (in milliseconds) is specified then the scroll is animated
@@ -7793,18 +7924,33 @@ export interface QSelectProps {
7793
7924
  /**
7794
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
7795
7926
  * Default value: value
7927
+ * @param option The current option being processed
7928
+ * @returns Value of the current option
7796
7929
  */
7797
- optionValue?: Function | string | undefined;
7930
+ optionValue?:
7931
+ | ((option: string | LooseDictionary) => any)
7932
+ | string
7933
+ | undefined;
7798
7934
  /**
7799
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
7800
7936
  * Default value: label
7937
+ * @param option The current option being processed
7938
+ * @returns Label of the current option
7801
7939
  */
7802
- optionLabel?: Function | string | undefined;
7940
+ optionLabel?:
7941
+ | ((option: string | LooseDictionary) => string)
7942
+ | string
7943
+ | undefined;
7803
7944
  /**
7804
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
7805
7946
  * Default value: disable
7947
+ * @param option The current option being processed
7948
+ * @returns If true, the current option will be disabled
7806
7949
  */
7807
- optionDisable?: Function | string | undefined;
7950
+ optionDisable?:
7951
+ | ((option: string | LooseDictionary) => boolean)
7952
+ | string
7953
+ | undefined;
7808
7954
  /**
7809
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
7810
7956
  */
@@ -8037,14 +8183,24 @@ export interface QSelectProps {
8037
8183
  * @param inputValue What the user typed
8038
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
8039
8185
  */
8040
- onNewValue?: (inputValue: string, doneFn: Function) => void;
8186
+ onNewValue?: (
8187
+ inputValue: string,
8188
+ doneFn: (item?: any, mode?: "add" | "add-unique" | "toggle") => void
8189
+ ) => void;
8041
8190
  /**
8042
8191
  * Emitted when user wants to filter a value
8043
8192
  * @param inputValue What the user typed
8044
8193
  * @param doneFn Supply a function which makes the necessary updates
8045
8194
  * @param abortFn Call this function if something went wrong
8046
8195
  */
8047
- onFilter?: (inputValue: string, doneFn: Function, abortFn: Function) => void;
8196
+ onFilter?: (
8197
+ inputValue: string,
8198
+ doneFn: (
8199
+ callbackFn: () => void,
8200
+ afterFn?: (ref: LooseDictionary) => void
8201
+ ) => void,
8202
+ abortFn: () => void
8203
+ ) => void;
8048
8204
  /**
8049
8205
  * Emitted when a filtering was aborted; Probably a new one was requested?
8050
8206
  */
@@ -8143,12 +8299,14 @@ export interface QSelectSlots {
8143
8299
  selected: boolean;
8144
8300
  /**
8145
8301
  * Remove selected option located at specific index
8302
+ * @param index Index at which to remove selection
8146
8303
  */
8147
- removeAtIndex: Function;
8304
+ removeAtIndex: (index: number) => void;
8148
8305
  /**
8149
8306
  * Add/remove option from model
8307
+ * @param opt Option to add to model
8150
8308
  */
8151
- toggleOption: Function;
8309
+ toggleOption: (opt: any) => void;
8152
8310
  /**
8153
8311
  * Tabindex HTML attribute value associated with respective option
8154
8312
  */
@@ -8177,12 +8335,14 @@ export interface QSelectSlots {
8177
8335
  focused: boolean;
8178
8336
  /**
8179
8337
  * Add/remove option from model
8338
+ * @param opt Option to add to model
8180
8339
  */
8181
- toggleOption: Function;
8340
+ toggleOption: (opt: any) => void;
8182
8341
  /**
8183
8342
  * Sets option from menu as 'focused'
8343
+ * @param index Index of option from menu
8184
8344
  */
8185
- setOptionIndex: Function;
8345
+ setOptionIndex: (index: number) => void;
8186
8346
  /**
8187
8347
  * Computed properties passed down to QItem
8188
8348
  */
@@ -8283,7 +8443,7 @@ export interface QSelect extends ComponentPublicInstance<QSelectProps> {
8283
8443
  * @param value String to set the input value to
8284
8444
  * @param noFilter Set to true if you don't want the filter (if any) to be also triggered
8285
8445
  */
8286
- updateInputValue: (value?: string, noFilter?: boolean) => void;
8446
+ updateInputValue: (value: string, noFilter?: boolean) => void;
8287
8447
  /**
8288
8448
  * Tells if an option is selected
8289
8449
  * @param opt Option entry
@@ -8456,7 +8616,7 @@ export interface QSlideItemProps {
8456
8616
  /**
8457
8617
  * When called, it resets the component to its initial non-slided state
8458
8618
  */
8459
- reset: Function;
8619
+ reset: () => void;
8460
8620
  }) => void;
8461
8621
  /**
8462
8622
  * Emitted when user finished sliding the item to the right
@@ -8466,7 +8626,7 @@ export interface QSlideItemProps {
8466
8626
  /**
8467
8627
  * When called, it resets the component to its initial non-slided state
8468
8628
  */
8469
- reset: Function;
8629
+ reset: () => void;
8470
8630
  }) => void;
8471
8631
  /**
8472
8632
  * Emitted when user finished sliding the item up
@@ -8476,7 +8636,7 @@ export interface QSlideItemProps {
8476
8636
  /**
8477
8637
  * When called, it resets the component to its initial non-slided state
8478
8638
  */
8479
- reset: Function;
8639
+ reset: () => void;
8480
8640
  }) => void;
8481
8641
  /**
8482
8642
  * Emitted when user finished sliding the item down
@@ -8486,7 +8646,7 @@ export interface QSlideItemProps {
8486
8646
  /**
8487
8647
  * When called, it resets the component to its initial non-slided state
8488
8648
  */
8489
- reset: Function;
8649
+ reset: () => void;
8490
8650
  }) => void;
8491
8651
  /**
8492
8652
  * Emitted while user is sliding the item to one of the available sides
@@ -8518,7 +8678,7 @@ export interface QSlideItemProps {
8518
8678
  /**
8519
8679
  * When called, it resets the component to its initial non-slided state
8520
8680
  */
8521
- reset: Function;
8681
+ reset: () => void;
8522
8682
  }) => void;
8523
8683
  }
8524
8684
 
@@ -9539,8 +9699,10 @@ export interface QTableProps {
9539
9699
  /**
9540
9700
  * 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
9541
9701
  * Default value: id
9702
+ * @param row The current row being processed
9703
+ * @returns Current row's key
9542
9704
  */
9543
- rowKey?: string | Function | undefined;
9705
+ rowKey?: string | ((row: LooseDictionary) => any) | undefined;
9544
9706
  /**
9545
9707
  * Display data using QVirtualScroll (for non-grid mode only)
9546
9708
  */
@@ -9627,8 +9789,10 @@ export interface QTableProps {
9627
9789
  label: string;
9628
9790
  /**
9629
9791
  * Row Object property to determine value for this column or function which maps to the required property
9792
+ * @param row The current row being processed
9793
+ * @returns Value for this column
9630
9794
  */
9631
- field: string | Function;
9795
+ field: string | ((row: LooseDictionary) => any);
9632
9796
  /**
9633
9797
  * If we use visible-columns, this col will always be visible
9634
9798
  */
@@ -9644,8 +9808,18 @@ export interface QTableProps {
9644
9808
  sortable?: boolean;
9645
9809
  /**
9646
9810
  * Compare function if you have some custom data or want a specific way to compare two rows
9811
+ * @param a Value of the first comparison term
9812
+ * @param b Value of the second comparison term
9813
+ * @param rowA Full Row object in which is contained the first term
9814
+ * @param rowB Full Row object in which is contained the second term
9815
+ * @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
9647
9816
  */
9648
- sort?: Function;
9817
+ sort?: (
9818
+ a: any,
9819
+ b: any,
9820
+ rowA: LooseDictionary,
9821
+ rowB: LooseDictionary
9822
+ ) => number;
9649
9823
  /**
9650
9824
  * Set column sort order: 'ad' (ascending-descending) or 'da' (descending-ascending); Overrides the 'column-sort-order' prop
9651
9825
  * Default value: ad
@@ -9653,16 +9827,21 @@ export interface QTableProps {
9653
9827
  sortOrder?: "ad" | "da";
9654
9828
  /**
9655
9829
  * Function you can apply to format your data
9830
+ * @param val Value of the cell
9831
+ * @param row Full Row object in which the cell is contained
9832
+ * @returns The resulting formatted value
9656
9833
  */
9657
- format?: Function;
9834
+ format?: (val: any, row: LooseDictionary) => any;
9658
9835
  /**
9659
9836
  * Style to apply on normal cells of the column
9837
+ * @param row The current row being processed
9660
9838
  */
9661
- style?: string | Function;
9839
+ style?: string | ((row: LooseDictionary) => string);
9662
9840
  /**
9663
9841
  * Classes to add on normal cells of the column
9842
+ * @param row The current row being processed
9664
9843
  */
9665
- classes?: string | Function;
9844
+ classes?: string | ((row: LooseDictionary) => string);
9666
9845
  /**
9667
9846
  * Style to apply on header cells of the column
9668
9847
  */
@@ -9753,16 +9932,28 @@ export interface QTableProps {
9753
9932
  loadingLabel?: string | undefined;
9754
9933
  /**
9755
9934
  * Text to display when user selected at least one row; For best performance, reference it from your scope and do not define it inline
9935
+ * @param numberOfRows Number of rows available
9936
+ * @returns Label to display
9756
9937
  */
9757
- selectedRowsLabel?: Function | undefined;
9938
+ selectedRowsLabel?: ((numberOfRows: number) => string) | undefined;
9758
9939
  /**
9759
9940
  * Text to override default rows per page label at bottom of table
9760
9941
  */
9761
9942
  rowsPerPageLabel?: string | undefined;
9762
9943
  /**
9763
9944
  * 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
9764
- */
9765
- paginationLabel?: Function | undefined;
9945
+ * @param firstRowIndex Index of first displayed row
9946
+ * @param endRowIndex Index of last displayed row
9947
+ * @param totalRowsNumber Number of total rows available in data
9948
+ * @returns Label to display
9949
+ */
9950
+ paginationLabel?:
9951
+ | ((
9952
+ firstRowIndex: number,
9953
+ endRowIndex: number,
9954
+ totalRowsNumber: number
9955
+ ) => string)
9956
+ | undefined;
9766
9957
  /**
9767
9958
  * CSS style to apply to native HTML <table> element's wrapper (which is a DIV)
9768
9959
  */
@@ -9806,8 +9997,20 @@ export interface QTableProps {
9806
9997
  /**
9807
9998
  * The actual filtering mechanism; For best performance, reference it from your scope and do not define it inline
9808
9999
  * Default value: (see source code)
9809
- */
9810
- filterMethod?: Function | undefined;
10000
+ * @param rows Array of rows
10001
+ * @param terms Terms to filter with (is essentially the 'filter' prop value)
10002
+ * @param cols Column definitions
10003
+ * @param getCellValue Optional function to get a cell value
10004
+ * @returns Filtered rows
10005
+ */
10006
+ filterMethod?:
10007
+ | ((
10008
+ rows: any[],
10009
+ terms: string | LooseDictionary,
10010
+ cols: any[],
10011
+ getCellValue: (col: LooseDictionary, row: LooseDictionary) => any
10012
+ ) => any[])
10013
+ | undefined;
9811
10014
  /**
9812
10015
  * Pagination object; You can also use the 'v-model:pagination' for synching; When not synching it simply initializes the pagination on first render
9813
10016
  */
@@ -9858,8 +10061,14 @@ export interface QTableProps {
9858
10061
  /**
9859
10062
  * The actual sort mechanism. Function (rows, sortBy, descending) => sorted rows; For best performance, reference it from your scope and do not define it inline
9860
10063
  * Default value: (see source code)
10064
+ * @param rows Array with rows
10065
+ * @param sortBy Column name (from column definition)
10066
+ * @param descending Is sorting in descending order?
10067
+ * @returns Sorted rows
9861
10068
  */
9862
- sortMethod?: Function | undefined;
10069
+ sortMethod?:
10070
+ | ((rows: any[], sortBy: string, descending: boolean) => any[])
10071
+ | undefined;
9863
10072
  /**
9864
10073
  * Emitted when user clicks/taps on a row; Is not emitted when using body/row/item scoped slots
9865
10074
  * @param evt JS event object
@@ -9921,12 +10130,25 @@ export interface QTableProps {
9921
10130
  };
9922
10131
  /**
9923
10132
  * Filter method (the 'filter-method' prop)
9924
- */
9925
- filter: Function;
9926
- /**
9927
- * Optional function to get a cell value
9928
- */
9929
- getCellValue: Function;
10133
+ * @param rows Array of rows
10134
+ * @param terms Terms to filter with (is essentially the 'filter' prop value)
10135
+ * @param cols Optional column definitions
10136
+ * @param getCellValue Optional function to get a cell value
10137
+ * @returns Filtered rows
10138
+ */
10139
+ filter: (
10140
+ rows: any[],
10141
+ terms: string | LooseDictionary,
10142
+ cols?: any[],
10143
+ getCellValue?: (col: LooseDictionary, row: LooseDictionary) => any
10144
+ ) => any[];
10145
+ /**
10146
+ * Function to get a cell value
10147
+ * @param col Column name from column definitions
10148
+ * @param row The row object
10149
+ * @returns Parsed/Processed cell value
10150
+ */
10151
+ getCellValue: (col: LooseDictionary, row: LooseDictionary) => any;
9930
10152
  }) => void;
9931
10153
  /**
9932
10154
  * Emitted when user selects/unselects row(s)
@@ -9971,6 +10193,10 @@ export interface QTableProps {
9971
10193
  * How many rows per page? 0 means Infinite
9972
10194
  */
9973
10195
  rowsPerPage: number;
10196
+ /**
10197
+ * For server-side fetching only. How many total database rows are there to be added to the table.
10198
+ */
10199
+ rowsNumber?: number;
9974
10200
  }) => void;
9975
10201
  /**
9976
10202
  * Used by Vue on 'v-model:selected' prop for updating its value
@@ -10042,8 +10268,9 @@ export interface QTableSlots {
10042
10268
  colsMap: LooseDictionary;
10043
10269
  /**
10044
10270
  * Trigger a table sort
10271
+ * @param col Column name or column definition object
10045
10272
  */
10046
- sort: Function;
10273
+ sort: (col: string | LooseDictionary) => void;
10047
10274
  /**
10048
10275
  * (Only if using selection) Is row/item selected? Can directly be assigned new Boolean value which changes selection state
10049
10276
  */
@@ -10054,7 +10281,6 @@ export interface QTableSlots {
10054
10281
  expand: boolean;
10055
10282
  /**
10056
10283
  * Color name for component from the Quasar Color Palette
10057
- * Default value: grey-8
10058
10284
  */
10059
10285
  color: string;
10060
10286
  /**
@@ -10097,8 +10323,9 @@ export interface QTableSlots {
10097
10323
  colsMap: LooseDictionary;
10098
10324
  /**
10099
10325
  * Trigger a table sort
10326
+ * @param col Column name or column definition object
10100
10327
  */
10101
- sort: Function;
10328
+ sort: (col: string | LooseDictionary) => void;
10102
10329
  /**
10103
10330
  * (Only if using selection) Is row selected? Can directly be assigned new Boolean value which changes selection state
10104
10331
  */
@@ -10109,7 +10336,6 @@ export interface QTableSlots {
10109
10336
  expand: boolean;
10110
10337
  /**
10111
10338
  * Color name for component from the Quasar Color Palette
10112
- * Default value: grey-8
10113
10339
  */
10114
10340
  color: string;
10115
10341
  /**
@@ -10164,8 +10390,9 @@ export interface QTableSlots {
10164
10390
  colsMap: LooseDictionary;
10165
10391
  /**
10166
10392
  * Trigger a table sort
10393
+ * @param col Column name or column definition object
10167
10394
  */
10168
- sort: Function;
10395
+ sort: (col: string | LooseDictionary) => void;
10169
10396
  /**
10170
10397
  * (Only if using selection) Is row selected? Can directly be assigned new Boolean value which changes selection state
10171
10398
  */
@@ -10176,7 +10403,6 @@ export interface QTableSlots {
10176
10403
  expand: boolean;
10177
10404
  /**
10178
10405
  * Color name for component from the Quasar Color Palette
10179
- * Default value: grey-8
10180
10406
  */
10181
10407
  color: string;
10182
10408
  /**
@@ -10227,8 +10453,9 @@ export interface QTableSlots {
10227
10453
  colsMap: LooseDictionary;
10228
10454
  /**
10229
10455
  * Trigger a table sort
10456
+ * @param col Column name or column definition object
10230
10457
  */
10231
- sort: Function;
10458
+ sort: (col: string | LooseDictionary) => void;
10232
10459
  /**
10233
10460
  * (Only if using selection) Is row selected? Can directly be assigned new Boolean value which changes selection state
10234
10461
  */
@@ -10239,7 +10466,6 @@ export interface QTableSlots {
10239
10466
  expand: boolean;
10240
10467
  /**
10241
10468
  * Color name for component from the Quasar Color Palette
10242
- * Default value: grey-8
10243
10469
  */
10244
10470
  color: string;
10245
10471
  /**
@@ -10266,8 +10492,9 @@ export interface QTableSlots {
10266
10492
  colsMap: LooseDictionary;
10267
10493
  /**
10268
10494
  * Trigger a table sort
10495
+ * @param col Column name or column definition object
10269
10496
  */
10270
- sort: Function;
10497
+ sort: (col: string | LooseDictionary) => void;
10271
10498
  /**
10272
10499
  * (Only if using selection) Is row selected? Can directly be assigned new Boolean value which changes selection state
10273
10500
  */
@@ -10278,7 +10505,6 @@ export interface QTableSlots {
10278
10505
  expand: boolean;
10279
10506
  /**
10280
10507
  * Color name for component from the Quasar Color Palette
10281
- * Default value: grey-8
10282
10508
  */
10283
10509
  color: string;
10284
10510
  /**
@@ -10317,8 +10543,9 @@ export interface QTableSlots {
10317
10543
  colsMap: LooseDictionary;
10318
10544
  /**
10319
10545
  * Trigger a table sort
10546
+ * @param col Column name or column definition object
10320
10547
  */
10321
- sort: Function;
10548
+ sort: (col: string | LooseDictionary) => void;
10322
10549
  /**
10323
10550
  * (Only if using selection) Is row selected? Can directly be assigned new Boolean value which changes selection state
10324
10551
  */
@@ -10329,7 +10556,6 @@ export interface QTableSlots {
10329
10556
  expand: boolean;
10330
10557
  /**
10331
10558
  * Color name for component from the Quasar Color Palette
10332
- * Default value: grey-8
10333
10559
  */
10334
10560
  color: string;
10335
10561
  /**
@@ -10360,8 +10586,9 @@ export interface QTableSlots {
10360
10586
  colsMap: LooseDictionary;
10361
10587
  /**
10362
10588
  * Trigger a table sort
10589
+ * @param col Column name or column definition object
10363
10590
  */
10364
- sort: Function;
10591
+ sort: (col: string | LooseDictionary) => void;
10365
10592
  /**
10366
10593
  * (Only if using selection) Is row selected? Can directly be assigned new Boolean value which changes selection state
10367
10594
  */
@@ -10372,7 +10599,6 @@ export interface QTableSlots {
10372
10599
  expand: boolean;
10373
10600
  /**
10374
10601
  * Color name for component from the Quasar Color Palette
10375
- * Default value: grey-8
10376
10602
  */
10377
10603
  color: string;
10378
10604
  /**
@@ -10415,8 +10641,9 @@ export interface QTableSlots {
10415
10641
  colsMap: LooseDictionary;
10416
10642
  /**
10417
10643
  * Trigger a table sort
10644
+ * @param col Column name or column definition object
10418
10645
  */
10419
- sort: Function;
10646
+ sort: (col: string | LooseDictionary) => void;
10420
10647
  /**
10421
10648
  * (Only if using selection) Is row selected? Can directly be assigned new Boolean value which changes selection state
10422
10649
  */
@@ -10427,7 +10654,6 @@ export interface QTableSlots {
10427
10654
  expand: boolean;
10428
10655
  /**
10429
10656
  * Color name for component from the Quasar Color Palette
10430
- * Default value: grey-8
10431
10657
  */
10432
10658
  color: string;
10433
10659
  /**
@@ -10454,8 +10680,9 @@ export interface QTableSlots {
10454
10680
  colsMap: LooseDictionary;
10455
10681
  /**
10456
10682
  * Trigger a table sort
10683
+ * @param col Column name or column definition object
10457
10684
  */
10458
- sort: Function;
10685
+ sort: (col: string | LooseDictionary) => void;
10459
10686
  /**
10460
10687
  * (Only if using selection) Is row selected? Can directly be assigned new Boolean value which changes selection state
10461
10688
  */
@@ -10466,7 +10693,6 @@ export interface QTableSlots {
10466
10693
  expand: boolean;
10467
10694
  /**
10468
10695
  * Color name for component from the Quasar Color Palette
10469
- * Default value: grey-8
10470
10696
  */
10471
10697
  color: string;
10472
10698
  /**
@@ -10539,19 +10765,19 @@ export interface QTableSlots {
10539
10765
  /**
10540
10766
  * Navigates to first page
10541
10767
  */
10542
- firstPage: Function;
10768
+ firstPage: () => void;
10543
10769
  /**
10544
10770
  * Navigates to previous page, if available
10545
10771
  */
10546
- prevPage: Function;
10772
+ prevPage: () => void;
10547
10773
  /**
10548
10774
  * Navigates to next page, if available
10549
10775
  */
10550
- nextPage: Function;
10776
+ nextPage: () => void;
10551
10777
  /**
10552
10778
  * Navigates to last page
10553
10779
  */
10554
- lastPage: Function;
10780
+ lastPage: () => void;
10555
10781
  /**
10556
10782
  * Is table in fullscreen mode?
10557
10783
  */
@@ -10559,7 +10785,7 @@ export interface QTableSlots {
10559
10785
  /**
10560
10786
  * Toggles fullscreen mode
10561
10787
  */
10562
- toggleFullscreen: Function;
10788
+ toggleFullscreen: () => void;
10563
10789
  }) => VNode[];
10564
10790
  /**
10565
10791
  * Slot to define how table bottom looks like
@@ -10602,19 +10828,19 @@ export interface QTableSlots {
10602
10828
  /**
10603
10829
  * Navigates to first page
10604
10830
  */
10605
- firstPage: Function;
10831
+ firstPage: () => void;
10606
10832
  /**
10607
10833
  * Navigates to previous page, if available
10608
10834
  */
10609
- prevPage: Function;
10835
+ prevPage: () => void;
10610
10836
  /**
10611
10837
  * Navigates to next page, if available
10612
10838
  */
10613
- nextPage: Function;
10839
+ nextPage: () => void;
10614
10840
  /**
10615
10841
  * Navigates to last page
10616
10842
  */
10617
- lastPage: Function;
10843
+ lastPage: () => void;
10618
10844
  /**
10619
10845
  * Is table in fullscreen mode?
10620
10846
  */
@@ -10622,7 +10848,7 @@ export interface QTableSlots {
10622
10848
  /**
10623
10849
  * Toggles fullscreen mode
10624
10850
  */
10625
- toggleFullscreen: Function;
10851
+ toggleFullscreen: () => void;
10626
10852
  }) => VNode[];
10627
10853
  /**
10628
10854
  * Slot to override default pagination label and buttons
@@ -10665,19 +10891,19 @@ export interface QTableSlots {
10665
10891
  /**
10666
10892
  * Navigates to first page
10667
10893
  */
10668
- firstPage: Function;
10894
+ firstPage: () => void;
10669
10895
  /**
10670
10896
  * Navigates to previous page, if available
10671
10897
  */
10672
- prevPage: Function;
10898
+ prevPage: () => void;
10673
10899
  /**
10674
10900
  * Navigates to next page, if available
10675
10901
  */
10676
- nextPage: Function;
10902
+ nextPage: () => void;
10677
10903
  /**
10678
10904
  * Navigates to last page
10679
10905
  */
10680
- lastPage: Function;
10906
+ lastPage: () => void;
10681
10907
  /**
10682
10908
  * Is table in fullscreen mode?
10683
10909
  */
@@ -10685,7 +10911,7 @@ export interface QTableSlots {
10685
10911
  /**
10686
10912
  * Toggles fullscreen mode
10687
10913
  */
10688
- toggleFullscreen: Function;
10914
+ toggleFullscreen: () => void;
10689
10915
  }) => VNode[];
10690
10916
  /**
10691
10917
  * Slot to define how left part of the table top looks like
@@ -10728,19 +10954,19 @@ export interface QTableSlots {
10728
10954
  /**
10729
10955
  * Navigates to first page
10730
10956
  */
10731
- firstPage: Function;
10957
+ firstPage: () => void;
10732
10958
  /**
10733
10959
  * Navigates to previous page, if available
10734
10960
  */
10735
- prevPage: Function;
10961
+ prevPage: () => void;
10736
10962
  /**
10737
10963
  * Navigates to next page, if available
10738
10964
  */
10739
- nextPage: Function;
10965
+ nextPage: () => void;
10740
10966
  /**
10741
10967
  * Navigates to last page
10742
10968
  */
10743
- lastPage: Function;
10969
+ lastPage: () => void;
10744
10970
  /**
10745
10971
  * Is table in fullscreen mode?
10746
10972
  */
@@ -10748,7 +10974,7 @@ export interface QTableSlots {
10748
10974
  /**
10749
10975
  * Toggles fullscreen mode
10750
10976
  */
10751
- toggleFullscreen: Function;
10977
+ toggleFullscreen: () => void;
10752
10978
  }) => VNode[];
10753
10979
  /**
10754
10980
  * Slot to define how right part of the table top looks like
@@ -10791,19 +11017,19 @@ export interface QTableSlots {
10791
11017
  /**
10792
11018
  * Navigates to first page
10793
11019
  */
10794
- firstPage: Function;
11020
+ firstPage: () => void;
10795
11021
  /**
10796
11022
  * Navigates to previous page, if available
10797
11023
  */
10798
- prevPage: Function;
11024
+ prevPage: () => void;
10799
11025
  /**
10800
11026
  * Navigates to next page, if available
10801
11027
  */
10802
- nextPage: Function;
11028
+ nextPage: () => void;
10803
11029
  /**
10804
11030
  * Navigates to last page
10805
11031
  */
10806
- lastPage: Function;
11032
+ lastPage: () => void;
10807
11033
  /**
10808
11034
  * Is table in fullscreen mode?
10809
11035
  */
@@ -10811,7 +11037,7 @@ export interface QTableSlots {
10811
11037
  /**
10812
11038
  * Toggles fullscreen mode
10813
11039
  */
10814
- toggleFullscreen: Function;
11040
+ toggleFullscreen: () => void;
10815
11041
  }) => VNode[];
10816
11042
  /**
10817
11043
  * Slot to define how top table section looks like when user has selected at least one row
@@ -10854,19 +11080,19 @@ export interface QTableSlots {
10854
11080
  /**
10855
11081
  * Navigates to first page
10856
11082
  */
10857
- firstPage: Function;
11083
+ firstPage: () => void;
10858
11084
  /**
10859
11085
  * Navigates to previous page, if available
10860
11086
  */
10861
- prevPage: Function;
11087
+ prevPage: () => void;
10862
11088
  /**
10863
11089
  * Navigates to next page, if available
10864
11090
  */
10865
- nextPage: Function;
11091
+ nextPage: () => void;
10866
11092
  /**
10867
11093
  * Navigates to last page
10868
11094
  */
10869
- lastPage: Function;
11095
+ lastPage: () => void;
10870
11096
  /**
10871
11097
  * Is table in fullscreen mode?
10872
11098
  */
@@ -10874,7 +11100,7 @@ export interface QTableSlots {
10874
11100
  /**
10875
11101
  * Toggles fullscreen mode
10876
11102
  */
10877
- toggleFullscreen: Function;
11103
+ toggleFullscreen: () => void;
10878
11104
  }) => VNode[];
10879
11105
  /**
10880
11106
  * Slot to define how the bottom will look like when is nothing to display
@@ -10933,8 +11159,18 @@ export interface QTable extends ComponentPublicInstance<QTableProps> {
10933
11159
  };
10934
11160
  /**
10935
11161
  * Filtering method (the 'filter-method' prop)
10936
- */
10937
- filter?: Function;
11162
+ * @param rows Array of rows
11163
+ * @param terms Terms to filter with (is essentially the 'filter' prop value)
11164
+ * @param cols Optional column definitions
11165
+ * @param getCellValue Optional function to get a cell value
11166
+ * @returns Filtered rows
11167
+ */
11168
+ filter?: (
11169
+ rows: any[],
11170
+ terms: string | LooseDictionary,
11171
+ cols?: any[],
11172
+ getCellValue?: (col?: LooseDictionary, row?: LooseDictionary) => any
11173
+ ) => any[];
10938
11174
  }) => void;
10939
11175
  /**
10940
11176
  * Unless using an external pagination Object (through 'v-model:pagination' prop), you can use this method and force the internal pagination to change
@@ -11011,7 +11247,7 @@ export interface QTable extends ComponentPublicInstance<QTableProps> {
11011
11247
  /**
11012
11248
  * Scroll the table to the row with the specified index in page (0 based)
11013
11249
  * @param index The index of the row in page (0 based)
11014
- * @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
11250
+ * @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
11015
11251
  */
11016
11252
  scrollTo: (
11017
11253
  index: string | number,
@@ -11157,7 +11393,7 @@ export interface QRouteTabProps {
11157
11393
  * @param evt JS event object; If you want to cancel navigation set synchronously 'evt.navigate' to false
11158
11394
  * @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
11159
11395
  */
11160
- onClick?: (evt: LooseDictionary, navigateFn: Function) => void;
11396
+ onClick?: (evt: LooseDictionary, navigateFn: () => void) => void;
11161
11397
  }
11162
11398
 
11163
11399
  export interface QRouteTabSlots {
@@ -11412,8 +11648,11 @@ export interface QTimeProps {
11412
11648
  defaultDate?: string | undefined;
11413
11649
  /**
11414
11650
  * 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
11651
+ * @param hr Hour
11652
+ * @param min Minutes
11653
+ * @param sec Seconds
11415
11654
  */
11416
- options?: Function | undefined;
11655
+ options?: ((hr: number, min: number, sec: number) => void) | undefined;
11417
11656
  /**
11418
11657
  * Optionally configure what hours is the user allowed to set; Overrides 'options' prop if that is also set
11419
11658
  */
@@ -11962,8 +12201,13 @@ export interface QTreeProps {
11962
12201
  /**
11963
12202
  * The function to use to filter the tree nodes; For best performance, reference it from your scope and do not define it inline
11964
12203
  * Default value: (see source code)
12204
+ * @param node Node currently being filtered
12205
+ * @param filter Filter text to match against
12206
+ * @returns Matches or not
11965
12207
  */
11966
- filterMethod?: Function | undefined;
12208
+ filterMethod?:
12209
+ | ((node: LooseDictionary, filter: string) => boolean)
12210
+ | undefined;
11967
12211
  /**
11968
12212
  * Toggle animation duration (in milliseconds)
11969
12213
  * Default value: 300
@@ -11997,12 +12241,13 @@ export interface QTreeProps {
11997
12241
  key: string;
11998
12242
  /**
11999
12243
  * The callback to be carried out when the loading is successful
12244
+ * @param children Array of nodes
12000
12245
  */
12001
- done: Function;
12246
+ done: (children?: any[]) => void;
12002
12247
  /**
12003
12248
  * The callback to be carried out should the loading fails
12004
12249
  */
12005
- fail: Function;
12250
+ fail: () => void;
12006
12251
  }) => void;
12007
12252
  /**
12008
12253
  * Emitted when nodes are ticked/unticked via the checkbox; Used by Vue on 'v-model:ticked' to update its value
@@ -12217,24 +12462,34 @@ export interface QTree extends ComponentPublicInstance<QTreeProps> {
12217
12462
  export interface QUploaderProps {
12218
12463
  /**
12219
12464
  * 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
12465
+ * @param files Uploaded files
12466
+ * @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
12220
12467
  */
12221
- factory?: Function | undefined;
12468
+ factory?: ((files: any[]) => LooseDictionary | Promise<any>) | undefined;
12222
12469
  /**
12223
12470
  * 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
12471
+ * @param files Uploaded files
12472
+ * @returns URL or path to the server which handles the upload
12224
12473
  */
12225
- url?: string | Function | undefined;
12474
+ url?: string | ((files: any[]) => string) | undefined;
12226
12475
  /**
12227
12476
  * 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
12228
12477
  * Default value: POST
12478
+ * @param files Uploaded files
12479
+ * @returns HTTP method to use for upload
12229
12480
  */
12230
- method?: "POST" | "PUT" | Function | undefined;
12481
+ method?: "POST" | "PUT" | ((files: any[]) => string) | undefined;
12231
12482
  /**
12232
12483
  * 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
12233
12484
  * Default value: (file) => file.name
12485
+ * @param files The current file being processed
12486
+ * @returns Field name for the current file upload
12234
12487
  */
12235
- fieldName?: string | Function | undefined;
12488
+ fieldName?: string | ((files: File) => string) | undefined;
12236
12489
  /**
12237
12490
  * 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
12491
+ * @param files Uploaded files
12492
+ * @returns An array consists of objects with header definitions
12238
12493
  */
12239
12494
  headers?:
12240
12495
  | {
@@ -12247,10 +12502,12 @@ export interface QUploaderProps {
12247
12502
  */
12248
12503
  value: string;
12249
12504
  }[]
12250
- | Function
12505
+ | ((files: any[]) => string)
12251
12506
  | undefined;
12252
12507
  /**
12253
12508
  * 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
12509
+ * @param files Uploaded files
12510
+ * @returns An array consists of objects with additional fields definitions (used by Form to be uploaded)
12254
12511
  */
12255
12512
  formFields?:
12256
12513
  | {
@@ -12263,20 +12520,26 @@ export interface QUploaderProps {
12263
12520
  */
12264
12521
  value: string;
12265
12522
  }[]
12266
- | Function
12523
+ | ((files: any[]) => string)
12267
12524
  | undefined;
12268
12525
  /**
12269
12526
  * 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
12527
+ * @param files Uploaded files
12528
+ * @returns If true, withCredentials will be set to true on the XHR that manages the upload
12270
12529
  */
12271
- withCredentials?: boolean | Function | undefined;
12530
+ withCredentials?: boolean | ((files: any[]) => boolean) | undefined;
12272
12531
  /**
12273
12532
  * 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
12533
+ * @param files Uploaded files
12534
+ * @returns If true, raw files will get sent without wrapping into a Form()
12274
12535
  */
12275
- sendRaw?: boolean | Function | undefined;
12536
+ sendRaw?: boolean | ((files: any[]) => boolean) | undefined;
12276
12537
  /**
12277
12538
  * 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
12539
+ * @param files Uploaded files
12540
+ * @returns If true, files will be uploaded in a batch (in one XHR request)
12278
12541
  */
12279
- batch?: boolean | Function | undefined;
12542
+ batch?: boolean | ((files: any[]) => boolean) | undefined;
12280
12543
  /**
12281
12544
  * Allow multiple file uploads
12282
12545
  */
@@ -12303,8 +12566,10 @@ export interface QUploaderProps {
12303
12566
  maxFiles?: number | string | undefined;
12304
12567
  /**
12305
12568
  * 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
12569
+ * @param files Candidate files to be added to queue
12570
+ * @returns Filtered files to be added to queue
12306
12571
  */
12307
- filter?: Function | undefined;
12572
+ filter?: ((files: FileList | any[]) => any[]) | undefined;
12308
12573
  /**
12309
12574
  * Label for the uploader
12310
12575
  */
@@ -12397,10 +12662,10 @@ export interface QUploaderProps {
12397
12662
  }) => void;
12398
12663
  /**
12399
12664
  * Emitted when factory function is supplied with a Promise which is rejected
12400
- * @param err Error Object which is the Promise rejection reason
12665
+ * @param err Error object which is the Promise rejection reason
12401
12666
  * @param files Files which were to get uploaded
12402
12667
  */
12403
- onFactoryFailed?: (err: LooseDictionary, files: any[]) => void;
12668
+ onFactoryFailed?: (err: Error, files: any[]) => void;
12404
12669
  /**
12405
12670
  * Emitted after files are picked and some do not pass the validation props (accept, max-file-size, max-total-size, filter, etc)
12406
12671
  * @param rejectedEntries Array of { failedPropValidation: string, file: File } Objects for files that do not pass the validation
@@ -12553,8 +12818,11 @@ export interface QVirtualScrollProps {
12553
12818
  itemsSize?: number | undefined;
12554
12819
  /**
12555
12820
  * 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
12821
+ * @param from Index of the first item (0 based)
12822
+ * @param size Number of items to return
12823
+ * @returns List of scope for items to be displayed
12556
12824
  */
12557
- itemsFn?: Function | undefined;
12825
+ itemsFn?: ((from: number, size: number) => any[]) | undefined;
12558
12826
  /**
12559
12827
  * CSS selector or DOM element to be used as a custom scroll container instead of the auto detected one
12560
12828
  */
@@ -12646,19 +12914,19 @@ export interface DialogChainObject {
12646
12914
  * @param callbackFn Tell what to do
12647
12915
  * @returns Chained Object
12648
12916
  */
12649
- onOk: (callbackFn: Function) => DialogChainObject;
12917
+ onOk: (callbackFn: (payload?: any) => void) => DialogChainObject;
12650
12918
  /**
12651
12919
  * Receives a Function as param to tell what to do when Cancel is pressed / dialog is dismissed
12652
12920
  * @param callbackFn Tell what to do
12653
12921
  * @returns Chained Object
12654
12922
  */
12655
- onCancel: (callbackFn: Function) => DialogChainObject;
12923
+ onCancel: (callbackFn: () => void) => DialogChainObject;
12656
12924
  /**
12657
12925
  * Receives a Function param to tell what to do when the dialog is closed
12658
12926
  * @param callbackFn Tell what to do
12659
12927
  * @returns Chained Object
12660
12928
  */
12661
- onDismiss: (callbackFn: Function) => DialogChainObject;
12929
+ onDismiss: (callbackFn: () => void) => DialogChainObject;
12662
12930
  /**
12663
12931
  * Hides the dialog when called
12664
12932
  * @returns Chained Object
@@ -12669,7 +12937,7 @@ export interface DialogChainObject {
12669
12937
  * @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
12670
12938
  * @returns Chained Object
12671
12939
  */
12672
- update: (opts?: LooseDictionary) => DialogChainObject;
12940
+ update: (opts: LooseDictionary) => DialogChainObject;
12673
12941
  }
12674
12942
 
12675
12943
  import { CookiesGetMethodType } from "./api";
@@ -12714,8 +12982,10 @@ export interface QDialogOptions {
12714
12982
  type?: string;
12715
12983
  /**
12716
12984
  * Is typed content valid?
12985
+ * @param val The value of the input
12986
+ * @returns The text passed validation or not
12717
12987
  */
12718
- isValid?: Function;
12988
+ isValid?: (val: string) => boolean;
12719
12989
  /**
12720
12990
  * Attributes to pass to prompt control
12721
12991
  */
@@ -12784,8 +13054,10 @@ export interface QDialogOptions {
12784
13054
  items?: any[];
12785
13055
  /**
12786
13056
  * Is the model valid?
13057
+ * @param model The current model (String if it's of type radio or Array otherwise)
13058
+ * @returns The selection passed validation or not
12787
13059
  */
12788
- isValid?: Function;
13060
+ isValid?: (model: string | any[]) => boolean;
12789
13061
  };
12790
13062
  /**
12791
13063
  * 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
@@ -12805,21 +13077,11 @@ export interface QDialogOptions {
12805
13077
  /**
12806
13078
  * Props for an 'OK' button
12807
13079
  */
12808
- ok?:
12809
- | string
12810
- | {
12811
- [index: string]: any;
12812
- }
12813
- | boolean;
13080
+ ok?: string | { [index: string]: any } | boolean;
12814
13081
  /**
12815
13082
  * Props for a 'CANCEL' button
12816
13083
  */
12817
- cancel?:
12818
- | string
12819
- | {
12820
- [index: string]: any;
12821
- }
12822
- | boolean;
13084
+ cancel?: string | { [index: string]: any } | boolean;
12823
13085
  /**
12824
13086
  * What button to focus, unless you also have 'prompt' or 'options'
12825
13087
  * Default value: ok
@@ -13093,7 +13355,7 @@ declare module "./globals" {
13093
13355
  /**
13094
13356
  * Function to call when notification gets dismissed
13095
13357
  */
13096
- onDismiss?: Function;
13358
+ onDismiss?: () => void;
13097
13359
  /**
13098
13360
  * 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
13099
13361
  */
@@ -13108,7 +13370,85 @@ declare module "./globals" {
13108
13370
  ignoreDefaults?: boolean;
13109
13371
  }
13110
13372
  | string
13111
- ) => Function;
13373
+ ) => (props?: {
13374
+ /**
13375
+ * Optional type (that has been previously registered) or one of the out of the box ones ('positive', 'negative', 'warning', 'info', 'ongoing')
13376
+ */
13377
+ type?: string;
13378
+ /**
13379
+ * Color name for component from the Quasar Color Palette
13380
+ */
13381
+ color?: string;
13382
+ /**
13383
+ * Color name for component from the Quasar Color Palette
13384
+ */
13385
+ textColor?: string;
13386
+ /**
13387
+ * The content of your message
13388
+ */
13389
+ message?: string;
13390
+ /**
13391
+ * The content of your optional caption
13392
+ */
13393
+ caption?: string;
13394
+ /**
13395
+ * Render message as HTML; This can lead to XSS attacks, so make sure that you sanitize the message first
13396
+ */
13397
+ html?: boolean;
13398
+ /**
13399
+ * Icon name following Quasar convention; Make sure you have the icon library installed unless you are using 'img:' prefix
13400
+ */
13401
+ icon?: string;
13402
+ /**
13403
+ * URL to an avatar/image; Suggestion: use statics folder
13404
+ */
13405
+ avatar?: string;
13406
+ /**
13407
+ * 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
13408
+ */
13409
+ spinner?: boolean | Component;
13410
+ /**
13411
+ * Show progress bar to detail when notification will disappear automatically (unless timeout is 0)
13412
+ */
13413
+ progress?: boolean;
13414
+ /**
13415
+ * Class definitions to be attributed to the progress bar
13416
+ */
13417
+ progressClass?: any[] | string | LooseDictionary;
13418
+ /**
13419
+ * Add CSS class(es) to the notification for easier customization
13420
+ */
13421
+ classes?: string;
13422
+ /**
13423
+ * Key-value for attributes to be set on the notification
13424
+ */
13425
+ attrs?: LooseDictionary;
13426
+ /**
13427
+ * Amount of time to display (in milliseconds)
13428
+ * Default value: 5000
13429
+ */
13430
+ timeout?: number;
13431
+ /**
13432
+ * 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
13433
+ */
13434
+ actions?: any[];
13435
+ /**
13436
+ * Function to call when notification gets dismissed
13437
+ */
13438
+ onDismiss?: () => void;
13439
+ /**
13440
+ * 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
13441
+ */
13442
+ closeBtn?: boolean | string;
13443
+ /**
13444
+ * 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
13445
+ */
13446
+ multiLine?: boolean;
13447
+ /**
13448
+ * Ignore the default configuration (set by setDefaults()) for this instance only
13449
+ */
13450
+ ignoreDefaults?: boolean;
13451
+ }) => void;
13112
13452
  platform: Platform;
13113
13453
  screen: Screen;
13114
13454
  sessionStorage: SessionStorage;