quasar 2.11.4 → 2.11.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/dist/api/QCarouselSlide.json +1 -1
  2. package/dist/api/QChatMessage.json +1 -1
  3. package/dist/api/QForm.json +3 -2
  4. package/dist/api/QImg.json +2 -2
  5. package/dist/api/QTimelineEntry.json +1 -1
  6. package/dist/api/QVirtualScroll.json +2 -2
  7. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  8. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  9. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  10. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  11. package/dist/icon-set/fontawesome-v6-pro.umd.prod.js +1 -1
  12. package/dist/icon-set/fontawesome-v6.umd.prod.js +1 -1
  13. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  14. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  15. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  16. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  17. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  18. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  19. package/dist/icon-set/material-symbols-outlined.umd.prod.js +1 -1
  20. package/dist/icon-set/material-symbols-rounded.umd.prod.js +1 -1
  21. package/dist/icon-set/material-symbols-sharp.umd.prod.js +1 -1
  22. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  23. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  24. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  25. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  26. package/dist/icon-set/mdi-v7.umd.prod.js +1 -1
  27. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  28. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  29. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  30. package/dist/icon-set/svg-fontawesome-v6.umd.prod.js +2 -2
  31. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  32. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  33. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
  34. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  35. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  36. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  37. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  38. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  39. package/dist/icon-set/svg-material-symbols-outlined.umd.prod.js +2 -2
  40. package/dist/icon-set/svg-material-symbols-rounded.umd.prod.js +2 -2
  41. package/dist/icon-set/svg-material-symbols-sharp.umd.prod.js +2 -2
  42. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  43. package/dist/icon-set/svg-mdi-v7.umd.prod.js +1 -1
  44. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  45. package/dist/icon-set/themify.umd.prod.js +1 -1
  46. package/dist/lang/ar-TN.umd.prod.js +1 -1
  47. package/dist/lang/ar.umd.prod.js +1 -1
  48. package/dist/lang/az-Latn.umd.prod.js +1 -1
  49. package/dist/lang/bg.umd.prod.js +1 -1
  50. package/dist/lang/bn.umd.prod.js +1 -1
  51. package/dist/lang/ca.umd.prod.js +1 -1
  52. package/dist/lang/cs.umd.prod.js +1 -1
  53. package/dist/lang/da.umd.prod.js +1 -1
  54. package/dist/lang/de.umd.prod.js +1 -1
  55. package/dist/lang/el.umd.prod.js +1 -1
  56. package/dist/lang/en-GB.umd.prod.js +1 -1
  57. package/dist/lang/en-US.umd.prod.js +1 -1
  58. package/dist/lang/eo.umd.prod.js +1 -1
  59. package/dist/lang/es.umd.prod.js +1 -1
  60. package/dist/lang/et.umd.prod.js +1 -1
  61. package/dist/lang/eu.umd.prod.js +1 -1
  62. package/dist/lang/fa-IR.umd.prod.js +1 -1
  63. package/dist/lang/fa.umd.prod.js +1 -1
  64. package/dist/lang/fi.umd.prod.js +1 -1
  65. package/dist/lang/fr.umd.prod.js +1 -1
  66. package/dist/lang/gn.umd.prod.js +1 -1
  67. package/dist/lang/he.umd.prod.js +1 -1
  68. package/dist/lang/hr.umd.prod.js +1 -1
  69. package/dist/lang/hu.umd.prod.js +1 -1
  70. package/dist/lang/id.umd.prod.js +1 -1
  71. package/dist/lang/is.umd.prod.js +1 -1
  72. package/dist/lang/it.umd.prod.js +1 -1
  73. package/dist/lang/ja.umd.prod.js +1 -1
  74. package/dist/lang/kk.umd.prod.js +1 -1
  75. package/dist/lang/km.umd.prod.js +1 -1
  76. package/dist/lang/ko-KR.umd.prod.js +1 -1
  77. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  78. package/dist/lang/lt.umd.prod.js +1 -1
  79. package/dist/lang/lu.umd.prod.js +1 -1
  80. package/dist/lang/lv.umd.prod.js +1 -1
  81. package/dist/lang/ml.umd.prod.js +1 -1
  82. package/dist/lang/mm.umd.prod.js +1 -1
  83. package/dist/lang/ms.umd.prod.js +1 -1
  84. package/dist/lang/my.umd.prod.js +1 -1
  85. package/dist/lang/nb-NO.umd.prod.js +1 -1
  86. package/dist/lang/nl.umd.prod.js +1 -1
  87. package/dist/lang/pl.umd.prod.js +1 -1
  88. package/dist/lang/pt-BR.umd.prod.js +1 -1
  89. package/dist/lang/pt.umd.prod.js +1 -1
  90. package/dist/lang/ro.umd.prod.js +1 -1
  91. package/dist/lang/ru.umd.prod.js +1 -1
  92. package/dist/lang/sk.umd.prod.js +1 -1
  93. package/dist/lang/sl.umd.prod.js +2 -2
  94. package/dist/lang/sm.umd.prod.js +1 -1
  95. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  96. package/dist/lang/sr.umd.prod.js +1 -1
  97. package/dist/lang/sv.umd.prod.js +1 -1
  98. package/dist/lang/ta.umd.prod.js +1 -1
  99. package/dist/lang/th.umd.prod.js +1 -1
  100. package/dist/lang/tr.umd.prod.js +1 -1
  101. package/dist/lang/ug.umd.prod.js +1 -1
  102. package/dist/lang/uk.umd.prod.js +1 -1
  103. package/dist/lang/uz-Cyrl.umd.prod.js +1 -1
  104. package/dist/lang/uz-Latn.umd.prod.js +1 -1
  105. package/dist/lang/vi.umd.prod.js +1 -1
  106. package/dist/lang/zh-CN.umd.prod.js +1 -1
  107. package/dist/lang/zh-TW.umd.prod.js +1 -1
  108. package/dist/quasar.cjs.prod.js +2 -2
  109. package/dist/quasar.css +1 -4
  110. package/dist/quasar.esm.js +83 -32
  111. package/dist/quasar.esm.prod.js +2 -2
  112. package/dist/quasar.prod.css +1 -1
  113. package/dist/quasar.rtl.css +1 -4
  114. package/dist/quasar.rtl.prod.css +1 -1
  115. package/dist/quasar.sass +4 -5
  116. package/dist/quasar.umd.js +83 -32
  117. package/dist/quasar.umd.prod.js +2 -2
  118. package/dist/types/api/dialog.d.ts +13 -11
  119. package/dist/types/api/qform.d.ts +5 -0
  120. package/dist/types/api/qinput.d.ts +0 -2
  121. package/dist/types/api/qloading.d.ts +1 -3
  122. package/dist/types/api/qnotify.d.ts +7 -5
  123. package/dist/types/api/qtable.d.ts +0 -2
  124. package/dist/types/api/slider.d.ts +6 -4
  125. package/dist/types/api/vue-prop-types.d.ts +9 -0
  126. package/dist/types/api/web-storage.d.ts +1 -2
  127. package/dist/types/api.d.ts +1 -0
  128. package/dist/types/composables.d.ts +2 -4
  129. package/dist/types/extras/icon-set.d.ts +42 -29
  130. package/dist/types/index.d.ts +6 -5
  131. package/dist/types/shim-icon-set.d.ts +0 -2
  132. package/dist/types/shim-lang.d.ts +0 -2
  133. package/dist/types/ts-helpers.d.ts +33 -10
  134. package/dist/types/tsconfig.json +15 -2
  135. package/dist/types/utils/colors.d.ts +4 -1
  136. package/dist/types/utils/date.d.ts +58 -12
  137. package/dist/types/utils/dom.d.ts +4 -1
  138. package/dist/types/utils/format.d.ts +6 -6
  139. package/dist/types/utils/scroll.d.ts +29 -6
  140. package/dist/types/utils.d.ts +26 -24
  141. package/dist/web-types/web-types.json +6 -6
  142. package/lang/sl.js +1 -1
  143. package/lang/sl.mjs +1 -1
  144. package/package.json +11 -9
  145. package/src/components/carousel/QCarouselSlide.json +1 -1
  146. package/src/components/chat/QChatMessage.json +1 -1
  147. package/src/components/date/use-datetime.js +1 -1
  148. package/src/components/dialog/QDialog.js +2 -4
  149. package/src/components/form/QForm.json +3 -2
  150. package/src/components/img/QImg.json +2 -2
  151. package/src/components/infinite-scroll/QInfiniteScroll.js +26 -4
  152. package/src/components/input/use-mask.js +1 -1
  153. package/src/components/layout/QLayout.sass +1 -0
  154. package/src/components/rating/QRating.js +3 -3
  155. package/src/components/slide-transition/QSlideTransition.js +6 -1
  156. package/src/components/timeline/QTimelineEntry.json +1 -1
  157. package/src/components/uploader/xhr-uploader-plugin.js +2 -2
  158. package/src/components/virtual-scroll/QVirtualScroll.json +2 -2
  159. package/src/components/virtual-scroll/use-virtual-scroll.js +5 -1
  160. package/src/composables/private/use-timeout.js +1 -1
  161. package/src/css/core/visibility.sass +0 -2
  162. package/src/css/variables.sass +2 -2
  163. package/src/plugins/Loading.js +11 -6
  164. package/src/plugins/Platform.js +1 -1
  165. package/src/utils/copy-to-clipboard.js +8 -0
  166. package/src/utils/is.js +11 -6
  167. package/src/utils/prevent-scroll.js +9 -1
  168. package/src/utils/private/define-reactive-plugin.js +1 -1
  169. package/dist/types/api/vue-prop-types.ts +0 -15
  170. package/dist/types/typings.json +0 -4
@@ -1,12 +1,5 @@
1
- // Error on "quasar" import shown in IDE is normal, as we only have Components/Directives/Plugins types after the build step
2
- // The import will work correctly at runtime
3
1
  import { QInputProps, QOptionGroupProps } from "quasar";
4
-
5
- // Taken from https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html#distributive-conditional-types
6
- type NonFunctionPropertyNames<T> = {
7
- [K in keyof T]: T[K] extends Function ? never : K;
8
- }[keyof T];
9
- type NonFunctionProperties<T> = Pick<T, NonFunctionPropertyNames<T>>;
2
+ import { InputHTMLAttributes, HTMLAttributes } from "vue";
10
3
 
11
4
  // https://html.spec.whatwg.org/multipage/input.html#attr-input-type
12
5
  type InputType =
@@ -36,6 +29,13 @@ type DatalessInputType = Extract<InputType, "submit" | "reset">;
36
29
 
37
30
  type PromptInputType = "textarea" | Exclude<InputType, DatalessInputType>;
38
31
 
32
+ type DataAttributes = {
33
+ // Has type-checking but no autocompletion: https://github.com/microsoft/TypeScript/issues/41620
34
+ [dataAttributes in `data-${string}`]?: any;
35
+ } & {
36
+ "data-cy"?: string;
37
+ };
38
+
39
39
  export type QDialogInputPrompt<T = string> = {
40
40
  /**
41
41
  * The initial value of the input
@@ -56,9 +56,10 @@ export type QDialogInputPrompt<T = string> = {
56
56
  */
57
57
  isValid?: (value: T) => boolean;
58
58
  } & Partial<Omit<QInputProps, "modelValue" | "onUpdate:modelValue" | "type">> &
59
- Partial<NonFunctionProperties<HTMLInputElement>>;
59
+ Omit<InputHTMLAttributes, "type"> &
60
+ DataAttributes;
60
61
 
61
- type SelectionPromptType = NonNullable<QOptionGroupProps["type"]>
62
+ type SelectionPromptType = NonNullable<QOptionGroupProps["type"]>;
62
63
  export type QDialogSelectionPrompt<
63
64
  // As this gets used as is in generated types, we must define default values for generic params.
64
65
  // Example: `options?: QDialogSelectionPrompt;` <- notice the missing type params.
@@ -98,4 +99,5 @@ export type QDialogSelectionPrompt<
98
99
  "modelValue" | "onUpdate:modelValue" | "type" | "options"
99
100
  >
100
101
  > &
101
- Partial<NonFunctionProperties<HTMLElement>>;
102
+ HTMLAttributes &
103
+ DataAttributes;
@@ -0,0 +1,5 @@
1
+ import { QField } from "quasar";
2
+ import { ComponentPublicInstance } from "vue";
3
+
4
+ export type QFormChildComponent = ComponentPublicInstance &
5
+ Pick<QField, "validate" | "resetValidation">;
@@ -1,5 +1,3 @@
1
- // Error on "quasar" import shown in IDE is normal, as we only have Components/Directives/Plugins types after the build step
2
- // The import will work correctly at runtime
3
1
  import { QInputProps } from "quasar";
4
2
 
5
3
  type QInputType = NonNullable<QInputProps["type"]>;
@@ -1,5 +1,3 @@
1
- // Error on "quasar" import shown in IDE is normal, as we only have Components/Directives/Plugins types after the build step
2
- // The import will work correctly at runtime
3
1
  import { QLoadingShowOptions } from "quasar";
4
2
 
5
- export type QLoadingUpdateOptions = Omit<QLoadingShowOptions, 'group'>;
3
+ export type QLoadingUpdateOptions = Omit<QLoadingShowOptions, "group">;
@@ -1,9 +1,11 @@
1
- // Error on "quasar" import shown in IDE is normal, as we only have Components/Directives/Plugins types after the build step
2
- // The import will work correctly at runtime
3
1
  import { QNotifyCreateOptions, QBtnProps } from "quasar";
4
2
  import { ButtonHTMLAttributes } from "vue";
5
3
 
6
- export type QNotifyUpdateOptions = Omit<QNotifyCreateOptions, 'group' | 'position'>;
7
- export type QNotifyOptions = Omit<QNotifyCreateOptions, 'ignoreDefaults'>;
4
+ export type QNotifyUpdateOptions = Omit<
5
+ QNotifyCreateOptions,
6
+ "group" | "position"
7
+ >;
8
+ export type QNotifyOptions = Omit<QNotifyCreateOptions, "ignoreDefaults">;
8
9
 
9
- export type QNotifyAction = Omit<QBtnProps, 'onClick'> & ButtonHTMLAttributes & { noDismiss?: boolean; handler?: () => void };
10
+ export type QNotifyAction = Omit<QBtnProps, "onClick"> &
11
+ ButtonHTMLAttributes & { noDismiss?: boolean; handler?: () => void };
@@ -1,5 +1,3 @@
1
- // Error on "quasar" import shown in IDE is normal, as we only have Components/Directives/Plugins types after the build step
2
- // The import will work correctly at runtime
3
1
  import { QTableProps } from "quasar";
4
2
 
5
3
  export type QTableColumn<
@@ -10,11 +10,13 @@ interface SliderMarkerLabelPartialDefinition {
10
10
  style?: VueStyleObjectProp;
11
11
  }
12
12
 
13
- interface SliderMarkerLabelDefinition extends SliderMarkerLabelPartialDefinition {
13
+ interface SliderMarkerLabelDefinition
14
+ extends SliderMarkerLabelPartialDefinition {
14
15
  value?: number;
15
16
  }
16
17
 
17
- interface SliderMarkerLabelDefinitionRequiredValue extends SliderMarkerLabelPartialDefinition {
18
+ interface SliderMarkerLabelDefinitionRequiredValue
19
+ extends SliderMarkerLabelPartialDefinition {
18
20
  value: number;
19
21
  }
20
22
 
@@ -26,7 +28,7 @@ export type SliderMarkerLabels =
26
28
  | boolean
27
29
  | Array<SliderMarkerLabelDefinitionRequiredValue>
28
30
  | SliderMarkerLabelObjectDefinition
29
- | ((value: number) => string | SliderMarkerLabelDefinition)
31
+ | ((value: number) => string | SliderMarkerLabelDefinition);
30
32
 
31
33
  // --- Slots
32
34
 
@@ -35,7 +37,7 @@ export type SliderMarkerLabelConfig = {
35
37
  value: number;
36
38
  label: number | string;
37
39
  classes: string;
38
- style: VueStyleObjectProp
40
+ style: VueStyleObjectProp;
39
41
  };
40
42
 
41
43
  export type SliderMarkerLabelArrayConfig = SliderMarkerLabelConfig[];
@@ -0,0 +1,9 @@
1
+ export type VueClassObjectProp = {
2
+ [value: string]: any;
3
+ };
4
+
5
+ export type VueClassProp = string | Array<VueClassProp> | VueClassObjectProp;
6
+
7
+ export type VueStyleObjectProp = Partial<CSSStyleDeclaration>;
8
+
9
+ export type VueStyleProp = string | Array<VueStyleProp> | VueStyleObjectProp;
@@ -6,8 +6,7 @@ type WebStorageGetMethodReturnType =
6
6
  | string
7
7
  | object;
8
8
 
9
- type WebStorageGetKeyMethodReturnType =
10
- | string
9
+ type WebStorageGetKeyMethodReturnType = string;
11
10
 
12
11
  export type WebStorageGetItemMethodType = <
13
12
  T extends WebStorageGetMethodReturnType = WebStorageGetMethodReturnType
@@ -2,6 +2,7 @@ export * from "./api/vue-prop-types";
2
2
  export * from "./api/cookies";
3
3
  export * from "./api/dialog";
4
4
  export * from "./api/qfile";
5
+ export * from "./api/qform";
5
6
  export * from "./api/qinput";
6
7
  export * from "./api/qselect";
7
8
  export * from "./api/qtable";
@@ -1,5 +1,3 @@
1
- // Error on "quasar" import shown in IDE is normal, as we only have Components/Directives/Plugins types after the build step
2
- // The import will work correctly at runtime
3
1
  import { QDialog } from "quasar";
4
2
  import { MetaOptions } from "./meta";
5
3
  import { Ref } from "vue";
@@ -12,11 +10,11 @@ interface useDialogPluginComponent {
12
10
  onDialogOK: (payload?: T) => void;
13
11
  onDialogCancel: () => void;
14
12
  };
15
- emits: ['ok', 'hide'];
13
+ emits: ["ok", "hide"];
16
14
  emitsObject: {
17
15
  ok: (payload?: any) => true;
18
16
  hide: () => true;
19
- }
17
+ };
20
18
  }
21
19
 
22
20
  export const useDialogPluginComponent: useDialogPluginComponent;
@@ -5,7 +5,12 @@ type QuasarIconSetArrow = "up" | "right" | "down" | "left" | "dropdown";
5
5
  type QuasarIconSetChevron = "left" | "right";
6
6
  type QuasarIconSetColorPicker = "spectrum" | "tune" | "palette";
7
7
  type QuasarIconSetPullToRefresh = "icon";
8
- type QuasarIconSetCarousel = "left" | "right" | "up" | "down" | "navigationIcon";
8
+ type QuasarIconSetCarousel =
9
+ | "left"
10
+ | "right"
11
+ | "up"
12
+ | "down"
13
+ | "navigationIcon";
9
14
  type QuasarIconSetChip = "remove" | "selected";
10
15
  type QuasarIconSetDatetime = "arrowLeft" | "arrowRight" | "now" | "today";
11
16
  type QuasarIconSetEditor =
@@ -59,7 +64,13 @@ type QuasarIconSetPagination = "first" | "prev" | "next" | "last";
59
64
  type QuasarIconSetRating = "icon";
60
65
  type QuasarIconSetStepper = "done" | "active" | "error";
61
66
  type QuasarIconSetTabs = "left" | "right" | "up" | "down";
62
- type QuasarIconSetTable = "arrowUp" | "warning" | "firstPage" | "prevPage" | "nextPage" | "lastPage";
67
+ type QuasarIconSetTable =
68
+ | "arrowUp"
69
+ | "warning"
70
+ | "firstPage"
71
+ | "prevPage"
72
+ | "nextPage"
73
+ | "lastPage";
63
74
  type QuasarIconSetTree = "icon";
64
75
  type QuasarIconSetUploader =
65
76
  | "done"
@@ -93,42 +104,44 @@ export interface QuasarIconSet {
93
104
  }
94
105
 
95
106
  export type QuasarIconSets =
107
+ | "bootstrap-icons"
108
+ | "eva-icons"
109
+ | "fontawesome-v5"
110
+ | "fontawesome-v5-pro"
111
+ | "fontawesome-v6"
112
+ | "fontawesome-v6-pro"
113
+ | "ionicons-v4"
114
+ | "line-awesome"
96
115
  | "material-icons"
97
- | "svg-material-icons"
98
116
  | "material-icons-outlined"
99
- | "svg-material-icons-outlined"
100
117
  | "material-icons-round"
101
- | "svg-material-icons-round"
102
118
  | "material-icons-sharp"
103
- | "svg-material-icons-sharp"
104
119
  | "material-symbols-outlined"
105
- | "svg-material-symbols-outlined"
106
120
  | "material-symbols-rounded"
107
- | "svg-material-symbols-rounded"
108
121
  | "material-symbols-sharp"
109
- | "svg-material-symbols-sharp"
110
- | "mdi-v6"
111
- | "svg-mdi-v6"
112
- | "mdi-v5"
113
- | "svg-mdi-v5"
114
- | "mdi-v4"
115
- | "svg-mdi-v4"
116
122
  | "mdi-v3"
117
- | "fontawesome-v5"
118
- | "fontawesome-v6"
119
- | "fontawesome-v5-pro"
120
- | "fontawesome-v6-pro"
123
+ | "mdi-v4"
124
+ | "mdi-v5"
125
+ | "mdi-v6"
126
+ | "mdi-v7"
127
+ | "themify"
128
+ | "svg-bootstrap-icons"
129
+ | "svg-eva-icons"
121
130
  | "svg-fontawesome-v5"
122
131
  | "svg-fontawesome-v6"
123
- | "svg-ionicons-v6"
124
- | "svg-ionicons-v5"
125
- | "ionicons-v4"
126
132
  | "svg-ionicons-v4"
127
- | "eva-icons"
128
- | "svg-eva-icons"
129
- | "themify"
130
- | "svg-themify"
131
- | "line-awesome"
133
+ | "svg-ionicons-v5"
134
+ | "svg-ionicons-v6"
132
135
  | "svg-line-awesome"
133
- | "bootstrap-icons"
134
- | "svg-bootstrap-icons";
136
+ | "svg-material-icons"
137
+ | "svg-material-icons-outlined"
138
+ | "svg-material-icons-round"
139
+ | "svg-material-icons-sharp"
140
+ | "svg-material-symbols-outlined"
141
+ | "svg-material-symbols-rounded"
142
+ | "svg-material-symbols-sharp"
143
+ | "svg-mdi-v4"
144
+ | "svg-mdi-v5"
145
+ | "svg-mdi-v6"
146
+ | "svg-mdi-v7"
147
+ | "svg-themify";
@@ -4789,10 +4789,10 @@ export interface QForm extends ComponentPublicInstance<QFormProps> {
4789
4789
  */
4790
4790
  reset: (evt?: Event) => void;
4791
4791
  /**
4792
- * Get array of children vue components that support validation
4793
- * @returns Vue components that support Quasar validation API
4792
+ * Get an array of children Vue component instances that support Quasar validation API (derived from QField, or using useFormChild()/QFormChildMixin)
4793
+ * @returns Quasar validation API-compatible Vue component instances
4794
4794
  */
4795
- getValidationComponents: () => readonly any[];
4795
+ getValidationComponents: () => QFormChildComponent[];
4796
4796
  }
4797
4797
 
4798
4798
  export interface QFormChildMixinProps {}
@@ -13204,11 +13204,11 @@ export interface QVirtualScrollSlots {
13204
13204
  */
13205
13205
  default: (scope: {
13206
13206
  /**
13207
- * Item index in the options list
13207
+ * Item index in the items list
13208
13208
  */
13209
13209
  index: number;
13210
13210
  /**
13211
- * Item data -- its value is taken from 'options' prop
13211
+ * Item data -- its value is taken from 'items' prop
13212
13212
  */
13213
13213
  item: any;
13214
13214
  }) => VNode[];
@@ -13677,6 +13677,7 @@ import { QEditorCaret } from "./api";
13677
13677
  import { ValidationRule } from "./api";
13678
13678
  import { QRejectedEntry } from "./api";
13679
13679
  import { QFileNativeElement } from "./api";
13680
+ import { QFormChildComponent } from "./api";
13680
13681
  import { QInputNativeElement } from "./api";
13681
13682
  import { QPopupProxyInnerComponent } from "./api";
13682
13683
  import { SliderMarkerLabels } from "./api";
@@ -1,6 +1,4 @@
1
1
  declare module "quasar/icon-set/*" {
2
- // We know "quasar" will exists at runtime, we can safely ignore the TS error
3
- // @ts-ignore
4
2
  import { QuasarIconSet } from "quasar";
5
3
  const iconSet: QuasarIconSet;
6
4
  export default iconSet;
@@ -1,6 +1,4 @@
1
1
  declare module "quasar/lang/*" {
2
- // We know "quasar" will exists at runtime, we can safely ignore the TS error
3
- // @ts-ignore
4
2
  import { QuasarLanguage } from "quasar";
5
3
  const lang: QuasarLanguage;
6
4
  export default lang;
@@ -1,8 +1,16 @@
1
- import { ComponentOptions, ComponentPublicInstance, ComputedOptions, MethodOptions, VNodeProps, AllowedComponentProps, ComponentCustomProps } from 'vue';
1
+ import {
2
+ ComponentOptions,
3
+ ComponentPublicInstance,
4
+ ComputedOptions,
5
+ MethodOptions,
6
+ VNodeProps,
7
+ AllowedComponentProps,
8
+ ComponentCustomProps,
9
+ } from "vue";
2
10
 
3
- export type StringDictionary<T extends string> = Required<
4
- { [index in T]: string }
5
- >;
11
+ export type StringDictionary<T extends string> = Required<{
12
+ [index in T]: string;
13
+ }>;
6
14
 
7
15
  // Needed to prevent TS to collapse `'value1' | 'value2' | string` to `string`, which breaks first parameter autocomplete
8
16
  // See: https://github.com/microsoft/TypeScript/issues/29729#issuecomment-832522611
@@ -23,11 +31,26 @@ export type DeepPartial<T> = {
23
31
  // especially into VTU to automatically infer Quasar components type when using `findComponent`
24
32
  // This type is compatible with the Vue private `ComponentPublicInstanceConstructor` type
25
33
  // https://github.com/vuejs/vue-next/blob/011dee8644bb52f5bdc6365c6e8404936d57e2cd/packages/runtime-core/src/componentPublicInstance.ts#L111
26
- export type ComponentConstructor<Component extends ComponentPublicInstance<Props, RawBindings, D, C, M> = ComponentPublicInstance<any>, Props = any, RawBindings = any, D = any, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions > = { new(): Component } & ComponentOptions<Props, RawBindings, D, C, M>
34
+ export type ComponentConstructor<
35
+ Component extends ComponentPublicInstance<
36
+ Props,
37
+ RawBindings,
38
+ D,
39
+ C,
40
+ M
41
+ > = ComponentPublicInstance<any>,
42
+ Props = any,
43
+ RawBindings = any,
44
+ D = any,
45
+ C extends ComputedOptions = ComputedOptions,
46
+ M extends MethodOptions = MethodOptions
47
+ > = { new (): Component } & ComponentOptions<Props, RawBindings, D, C, M>;
27
48
 
28
49
  // https://github.com/vuejs/vue-next/blob/d84d5ecdbdf709570122175d6565bb61fae877f2/packages/runtime-core/src/apiDefineComponent.ts#L29-L31
29
50
  // TODO: This can be imported from vue directly once this PR gets merged: https://github.com/vuejs/vue-next/pull/2403
30
- export type PublicProps = VNodeProps & AllowedComponentProps & ComponentCustomProps;
51
+ export type PublicProps = VNodeProps &
52
+ AllowedComponentProps &
53
+ ComponentCustomProps;
31
54
 
32
55
  // Can't use `DefineComponent` because of the false prop inferring behavior, it doesn't pick up the required types when an interface is passed
33
56
  // This PR will probably solve the problem as it moves the prop inferring behavior to `defineComponent` function: https://github.com/vuejs/vue-next/pull/4465
@@ -36,7 +59,7 @@ export type PublicProps = VNodeProps & AllowedComponentProps & ComponentCustomPr
36
59
  // TODO: This can be replaced with `DefineComponent` once this PR gets merged: https://github.com/vuejs/vue-next/pull/4465
37
60
  export type GlobalComponentConstructor<Props = {}, Slots = {}> = {
38
61
  new (): {
39
- $props: PublicProps & Props
40
- $slots: Slots
41
- }
42
- }
62
+ $props: PublicProps & Props;
63
+ $slots: Slots;
64
+ };
65
+ };
@@ -1,7 +1,20 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "strict": true,
4
- "lib": ["es2015", "dom"]
4
+ "lib": ["es2015", "dom"],
5
+ "paths": {
6
+ "quasar": [
7
+ // index.d.ts is auto-generated by the build process ("yarn build js types")
8
+ // It contains auto-generated types like QInput, QInputProps, etc.
9
+ // To reference those types, import them from "quasar"
10
+ // For other types defined in this directory, use relative imports
11
+
12
+ // For the built version
13
+ "./index.d.ts",
14
+ // For IDE support when working on the source code
15
+ "../dist/types/index.d.ts"
16
+ ]
17
+ }
5
18
  },
6
- "include": ["./*.ts"]
19
+ "include": ["./**/*.d.ts"]
7
20
  }
@@ -22,7 +22,10 @@ export namespace colors {
22
22
  function lighten(color: string, percent: number): string;
23
23
  function luminosity(color: string | colorsRgba): number;
24
24
  function brightness(color: string | colorsRgba): number;
25
- function blend(fgColor: string | colorsRgba, bColor: string | colorsRgba): string;
25
+ function blend(
26
+ fgColor: string | colorsRgba,
27
+ bColor: string | colorsRgba
28
+ ): string;
26
29
  function changeAlpha(color: string, offset: number): string;
27
30
  function getPaletteColor(colorName: string): string;
28
31
  }
@@ -44,20 +44,66 @@ export namespace date {
44
44
  function buildDate(options: DateOptions, utc?: boolean): Date;
45
45
  function getDayOfWeek(date: Date): number;
46
46
  function getWeekOfYear(date: Date | number | string): number;
47
- function isBetweenDates(date: Date | number | string, from: Date | number | string, to: Date | number | string, opts?: { inclusiveFrom: boolean; inclusiveTo: boolean; onlyDate: boolean }): boolean;
47
+ function isBetweenDates(
48
+ date: Date | number | string,
49
+ from: Date | number | string,
50
+ to: Date | number | string,
51
+ opts?: { inclusiveFrom: boolean; inclusiveTo: boolean; onlyDate: boolean }
52
+ ): boolean;
48
53
  function addToDate(date: Date | number | string, options: DateOptions): Date;
49
- function subtractFromDate(date: Date | number | string, options: DateOptions): Date;
50
- function adjustDate(date: Date | number | string, options: DateOptions, utc?: boolean): Date;
51
- function startOfDate(date: Date | number | string, option: DateUnitOptions, utc?: boolean): Date;
52
- function endOfDate(date: Date | number | string, option: DateUnitOptions, utc?: boolean): Date;
53
- function getMaxDate(date: Date | number | string, ...args: (Date | number | string)[]): Date;
54
- function getMinDate(date: Date | number | string, ...args: (Date | number | string)[]): Date;
55
- function getDateDiff(date: Date | number | string, subtract: Date | number | string, unit?: `${DateUnitOptions}s`): number;
54
+ function subtractFromDate(
55
+ date: Date | number | string,
56
+ options: DateOptions
57
+ ): Date;
58
+ function adjustDate(
59
+ date: Date | number | string,
60
+ options: DateOptions,
61
+ utc?: boolean
62
+ ): Date;
63
+ function startOfDate(
64
+ date: Date | number | string,
65
+ option: DateUnitOptions,
66
+ utc?: boolean
67
+ ): Date;
68
+ function endOfDate(
69
+ date: Date | number | string,
70
+ option: DateUnitOptions,
71
+ utc?: boolean
72
+ ): Date;
73
+ function getMaxDate(
74
+ date: Date | number | string,
75
+ ...args: (Date | number | string)[]
76
+ ): Date;
77
+ function getMinDate(
78
+ date: Date | number | string,
79
+ ...args: (Date | number | string)[]
80
+ ): Date;
81
+ function getDateDiff(
82
+ date: Date | number | string,
83
+ subtract: Date | number | string,
84
+ unit?: `${DateUnitOptions}s`
85
+ ): number;
56
86
  function getDayOfYear(date: Date | number | string): number;
57
- function inferDateFormat(date: Date | number | string): "date" | "number" | "string";
58
- function getDateBetween(date: Date | number | string, min?: Date | number | string, max?: Date | number | string): Date;
59
- function isSameDate(date: Date | number | string, date2: Date | number | string, unit?: DateUnitOptions): boolean;
87
+ function inferDateFormat(
88
+ date: Date | number | string
89
+ ): "date" | "number" | "string";
90
+ function getDateBetween(
91
+ date: Date | number | string,
92
+ min?: Date | number | string,
93
+ max?: Date | number | string
94
+ ): Date;
95
+ function isSameDate(
96
+ date: Date | number | string,
97
+ date2: Date | number | string,
98
+ unit?: DateUnitOptions
99
+ ): boolean;
60
100
  function daysInMonth(date: Date | number | string): number;
61
- function formatDate(date: Date | number | string | undefined, format?: string, locale?: DateLocale, __forcedYear?: number, __forcedTimezoneOffset?: number): string;
101
+ function formatDate(
102
+ date: Date | number | string | undefined,
103
+ format?: string,
104
+ locale?: DateLocale,
105
+ __forcedYear?: number,
106
+ __forcedTimezoneOffset?: number
107
+ ): string;
62
108
  function clone<D extends Date | number | string>(date: D): D;
63
109
  }
@@ -11,6 +11,9 @@ export namespace dom {
11
11
  function height(el: Element): number;
12
12
  function width(el: Element): number;
13
13
  function css(el: Element, css: VueStyleObjectProp): void;
14
- function cssBatch(elements: readonly Element[], css: VueStyleObjectProp): void;
14
+ function cssBatch(
15
+ elements: readonly Element[],
16
+ css: VueStyleObjectProp
17
+ ): void;
15
18
  function ready<F extends (...args: any[]) => any>(fn: F): ReturnType<F>;
16
19
  }
@@ -1,7 +1,7 @@
1
1
  export namespace format {
2
- function humanStorageSize(size: number) : string;
3
- function capitalize(text: string) : string;
4
- function between(v: number, min: number, max: number) : number;
5
- function normalizeToInterval(v: number, min: number, max: number) : number;
6
- function pad(v: string, length?: number, char?: string) : string;
7
- }
2
+ function humanStorageSize(size: number): string;
3
+ function capitalize(text: string): string;
4
+ function between(v: number, min: number, max: number): number;
5
+ function normalizeToInterval(v: number, min: number, max: number): number;
6
+ function pad(v: string, length?: number, char?: string): string;
7
+ }
@@ -1,7 +1,14 @@
1
- import { Ref, ComponentPublicInstance } from 'vue'
1
+ import { Ref, ComponentPublicInstance } from "vue";
2
2
 
3
3
  export namespace scroll {
4
- function getScrollTarget(el: Element, selector?: string | Element | Window | Ref<ComponentPublicInstance | undefined>): Element | Window;
4
+ function getScrollTarget(
5
+ el: Element,
6
+ selector?:
7
+ | string
8
+ | Element
9
+ | Window
10
+ | Ref<ComponentPublicInstance | undefined>
11
+ ): Element | Window;
5
12
 
6
13
  function getScrollHeight(el: Element | Window): number;
7
14
  function getScrollWidth(el: Element | Window): number;
@@ -9,11 +16,27 @@ export namespace scroll {
9
16
  function getVerticalScrollPosition(scrollTarget: Element | Window): number;
10
17
  function getHorizontalScrollPosition(scrollTarget: Element | Window): number;
11
18
 
12
- function animVerticalScrollTo(el: Element | Window, to: number, duration: number): void;
13
- function animHorizontalScrollTo(el: Element | Window, to: number, duration: number): void;
19
+ function animVerticalScrollTo(
20
+ el: Element | Window,
21
+ to: number,
22
+ duration: number
23
+ ): void;
24
+ function animHorizontalScrollTo(
25
+ el: Element | Window,
26
+ to: number,
27
+ duration: number
28
+ ): void;
14
29
 
15
- function setVerticalScrollPosition(scrollTarget: Element | Window, offset: number, duration?: number): void;
16
- function setHorizontalScrollPosition(scrollTarget: Element | Window, offset: number, duration?: number): void;
30
+ function setVerticalScrollPosition(
31
+ scrollTarget: Element | Window,
32
+ offset: number,
33
+ duration?: number
34
+ ): void;
35
+ function setHorizontalScrollPosition(
36
+ scrollTarget: Element | Window,
37
+ offset: number,
38
+ duration?: number
39
+ ): void;
17
40
 
18
41
  function getScrollbarWidth(): number;
19
42
  function hasScrollbar(el: Element | Window, onY?: boolean): boolean;