quasar 2.5.1 → 2.5.5

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 (193) hide show
  1. package/dist/api/BottomSheet.json +1 -1
  2. package/dist/api/Notify.json +205 -5
  3. package/dist/api/QAvatar.json +1 -1
  4. package/dist/api/QBreadcrumbsEl.json +1 -1
  5. package/dist/api/QBtn.json +4 -4
  6. package/dist/api/QBtnDropdown.json +17 -17
  7. package/dist/api/QCarousel.json +4 -4
  8. package/dist/api/QCheckbox.json +1 -1
  9. package/dist/api/QChip.json +5 -5
  10. package/dist/api/QDialog.json +13 -13
  11. package/dist/api/QDrawer.json +16 -16
  12. package/dist/api/QExpansionItem.json +15 -15
  13. package/dist/api/QFab.json +15 -15
  14. package/dist/api/QFabAction.json +3 -3
  15. package/dist/api/QField.json +2 -2
  16. package/dist/api/QFile.json +1 -1
  17. package/dist/api/QForm.json +12 -3
  18. package/dist/api/QIcon.json +4 -2
  19. package/dist/api/QInput.json +2 -2
  20. package/dist/api/QKnob.json +18 -0
  21. package/dist/api/QMenu.json +13 -13
  22. package/dist/api/QPagination.json +4 -4
  23. package/dist/api/QPopupEdit.json +6 -6
  24. package/dist/api/QPopupProxy.json +13 -13
  25. package/dist/api/QRadio.json +1 -1
  26. package/dist/api/QRange.json +1 -1
  27. package/dist/api/QRouteTab.json +2 -2
  28. package/dist/api/QSelect.json +19 -5
  29. package/dist/api/QSlider.json +1 -1
  30. package/dist/api/QStep.json +4 -4
  31. package/dist/api/QStepper.json +4 -4
  32. package/dist/api/QTab.json +1 -1
  33. package/dist/api/QTable.json +6 -6
  34. package/dist/api/QTimelineEntry.json +1 -1
  35. package/dist/api/QToggle.json +2 -2
  36. package/dist/api/QTooltip.json +13 -13
  37. package/dist/api/QTree.json +1 -1
  38. package/dist/api/QUploader.json +1 -1
  39. package/dist/api/TouchHold.json +1 -1
  40. package/dist/api/TouchPan.json +1 -1
  41. package/dist/api/TouchRepeat.json +1 -1
  42. package/dist/api/TouchSwipe.json +1 -1
  43. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  44. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  45. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  46. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  47. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  48. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  49. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  50. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  51. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  52. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  53. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  54. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  55. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  56. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  57. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  58. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  59. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  60. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  61. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  62. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
  63. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  64. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  65. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  66. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  67. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  68. package/dist/icon-set/svg-mdi-v4.umd.prod.js +1 -1
  69. package/dist/icon-set/svg-mdi-v5.umd.prod.js +1 -1
  70. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  71. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  72. package/dist/icon-set/themify.umd.prod.js +1 -1
  73. package/dist/lang/ar.umd.prod.js +1 -1
  74. package/dist/lang/az-Latn.umd.prod.js +1 -1
  75. package/dist/lang/bg.umd.prod.js +1 -1
  76. package/dist/lang/bn.umd.prod.js +1 -1
  77. package/dist/lang/ca.umd.prod.js +1 -1
  78. package/dist/lang/cs.umd.prod.js +1 -1
  79. package/dist/lang/da.umd.prod.js +1 -1
  80. package/dist/lang/de.umd.prod.js +1 -1
  81. package/dist/lang/el.umd.prod.js +1 -1
  82. package/dist/lang/en-GB.umd.prod.js +1 -1
  83. package/dist/lang/en-US.umd.prod.js +1 -1
  84. package/dist/lang/eo.umd.prod.js +1 -1
  85. package/dist/lang/es.umd.prod.js +1 -1
  86. package/dist/lang/et.umd.prod.js +1 -1
  87. package/dist/lang/fa-IR.umd.prod.js +1 -1
  88. package/dist/lang/fa.umd.prod.js +1 -1
  89. package/dist/lang/fi.umd.prod.js +1 -1
  90. package/dist/lang/fr.umd.prod.js +1 -1
  91. package/dist/lang/gn.umd.prod.js +1 -1
  92. package/dist/lang/he.umd.prod.js +1 -1
  93. package/dist/lang/hr.umd.prod.js +1 -1
  94. package/dist/lang/hu.umd.prod.js +1 -1
  95. package/dist/lang/id.umd.prod.js +1 -1
  96. package/dist/lang/is.umd.prod.js +1 -1
  97. package/dist/lang/it.umd.prod.js +1 -1
  98. package/dist/lang/ja.umd.prod.js +1 -1
  99. package/dist/lang/km.umd.prod.js +1 -1
  100. package/dist/lang/ko-KR.umd.prod.js +1 -1
  101. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  102. package/dist/lang/lt.umd.prod.js +1 -1
  103. package/dist/lang/lu.umd.prod.js +1 -1
  104. package/dist/lang/lv.umd.prod.js +1 -1
  105. package/dist/lang/ml.umd.prod.js +1 -1
  106. package/dist/lang/ms.umd.prod.js +1 -1
  107. package/dist/lang/my.umd.prod.js +1 -1
  108. package/dist/lang/nb-NO.umd.prod.js +1 -1
  109. package/dist/lang/nl.umd.prod.js +1 -1
  110. package/dist/lang/pl.umd.prod.js +1 -1
  111. package/dist/lang/pt-BR.umd.prod.js +1 -1
  112. package/dist/lang/pt.umd.prod.js +1 -1
  113. package/dist/lang/ro.umd.prod.js +1 -1
  114. package/dist/lang/ru.umd.prod.js +1 -1
  115. package/dist/lang/sk.umd.prod.js +1 -1
  116. package/dist/lang/sl.umd.prod.js +1 -1
  117. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  118. package/dist/lang/sr.umd.prod.js +1 -1
  119. package/dist/lang/sv.umd.prod.js +1 -1
  120. package/dist/lang/ta.umd.prod.js +1 -1
  121. package/dist/lang/th.umd.prod.js +1 -1
  122. package/dist/lang/tr.umd.prod.js +1 -1
  123. package/dist/lang/ug.umd.prod.js +1 -1
  124. package/dist/lang/uk.umd.prod.js +1 -1
  125. package/dist/lang/vi.umd.prod.js +1 -1
  126. package/dist/lang/zh-CN.umd.prod.js +1 -1
  127. package/dist/lang/zh-TW.umd.prod.js +1 -1
  128. package/dist/quasar.cjs.prod.js +2 -2
  129. package/dist/quasar.css +2 -2
  130. package/dist/quasar.esm.prod.js +2 -2
  131. package/dist/quasar.prod.css +1 -1
  132. package/dist/quasar.rtl.css +2 -2
  133. package/dist/quasar.rtl.prod.css +1 -1
  134. package/dist/quasar.sass +2 -1
  135. package/dist/quasar.umd.js +358 -343
  136. package/dist/quasar.umd.prod.js +2 -2
  137. package/dist/ssr-directives/Morph.js +1 -1
  138. package/dist/types/index.d.ts +245 -135
  139. package/dist/vetur/quasar-attributes.json +46 -38
  140. package/dist/vetur/quasar-tags.json +2 -0
  141. package/dist/web-types/web-types.json +119 -93
  142. package/package.json +1 -1
  143. package/src/api-file-example.json +2 -2
  144. package/src/api.extends.json +22 -33
  145. package/src/components/btn/QBtn.json +3 -6
  146. package/src/components/carousel/QCarousel.json +2 -4
  147. package/src/components/checkbox/use-checkbox.json +2 -4
  148. package/src/components/chip/QChip.json +1 -3
  149. package/src/components/date/QDate.js +20 -19
  150. package/src/components/date/use-datetime.js +3 -1
  151. package/src/components/dialog-plugin/DialogPlugin.js +9 -8
  152. package/src/components/fab/QFabAction.json +1 -3
  153. package/src/components/field/QField.json +2 -6
  154. package/src/components/form/QForm.json +10 -7
  155. package/src/components/icon/QIcon.js +4 -1
  156. package/src/components/icon/QIcon.json +1 -3
  157. package/src/components/input/QInput.json +2 -6
  158. package/src/components/input/use-mask.js +2 -2
  159. package/src/components/knob/QKnob.js +46 -40
  160. package/src/components/knob/QKnob.json +16 -0
  161. package/src/components/radio/QRadio.json +2 -4
  162. package/src/components/select/QSelect.js +4 -3
  163. package/src/components/select/QSelect.json +17 -8
  164. package/src/components/slide-transition/QSlideTransition.js +4 -4
  165. package/src/components/slider/use-slider.js +4 -4
  166. package/src/components/slider/use-slider.json +1 -1
  167. package/src/components/stepper/QStep.json +3 -0
  168. package/src/components/stepper/QStepper.json +3 -0
  169. package/src/components/stepper/QStepper.sass +1 -0
  170. package/src/components/stepper/StepHeader.js +23 -8
  171. package/src/components/table/QTable.json +5 -13
  172. package/src/components/table/table-sort.js +2 -2
  173. package/src/components/tabs/QRouteTab.json +2 -3
  174. package/src/components/tabs/use-tab.js +11 -8
  175. package/src/components/time/QTime.js +5 -5
  176. package/src/components/tree/QTree.js +39 -41
  177. package/src/composables/private/use-file.json +1 -3
  178. package/src/composables/private/use-router-link.js +1 -1
  179. package/src/directives/TouchHold.json +2 -3
  180. package/src/directives/TouchPan.json +2 -3
  181. package/src/directives/TouchRepeat.json +2 -3
  182. package/src/directives/TouchSwipe.json +2 -3
  183. package/src/install-quasar.js +37 -36
  184. package/src/plugins/Loading.js +3 -2
  185. package/src/plugins/LoadingBar.js +2 -1
  186. package/src/plugins/Notify.js +11 -4
  187. package/src/plugins/Notify.json +102 -2
  188. package/src/plugins/Screen.js +9 -5
  189. package/src/utils/create-uploader-component.js +2 -1
  190. package/src/utils/extend.js +6 -34
  191. package/src/utils/morph.js +19 -17
  192. package/src/utils/private/is.js +2 -15
  193. package/src/utils/private/web-storage.js +3 -2
@@ -93,10 +93,8 @@
93
93
  "__exemption": [ "examples" ]
94
94
  },
95
95
  "evt": {
96
- "type": "Object",
97
- "desc": "JS event object",
98
- "required": true,
99
- "__exemption": [ "examples" ]
96
+ "extends": "evt",
97
+ "required": true
100
98
  }
101
99
  }
102
100
  }
@@ -17,7 +17,7 @@ import { useFormProps, useFormInputNameAttr } from '../../composables/private/us
17
17
  import useKeyComposition from '../../composables/private/use-key-composition.js'
18
18
 
19
19
  import { createComponent } from '../../utils/private/create.js'
20
- import { isDeepEqual } from '../../utils/private/is.js'
20
+ import { isDeepEqual, isPlainObject } from '../../utils/private/is.js'
21
21
  import { stop, prevent, stopAndPrevent } from '../../utils/event.js'
22
22
  import { normalizeToInterval } from '../../utils/format.js'
23
23
  import { shouldIgnoreKey, isKeyCode } from '../../utils/private/key-composition.js'
@@ -337,7 +337,7 @@ export default createComponent({
337
337
  itemProps[ 'aria-selected' ] = itemProps.active === true ? 'true' : 'false'
338
338
 
339
339
  if ($q.platform.is.desktop === true) {
340
- itemProps.onMousemove = () => { setOptionIndex(index) }
340
+ itemProps.onMousemove = () => { menu.value === true && setOptionIndex(index) }
341
341
  }
342
342
  }
343
343
 
@@ -602,7 +602,7 @@ export default createComponent({
602
602
 
603
603
  return typeof val === 'function'
604
604
  ? val
605
- : opt => (Object(opt) === opt && val in opt ? opt[ val ] : opt)
605
+ : opt => (isPlainObject(opt) === true && val in opt ? opt[ val ] : opt)
606
606
  }
607
607
 
608
608
  function isOptionSelected (opt) {
@@ -1385,6 +1385,7 @@ export default createComponent({
1385
1385
  Object.assign(proxy, {
1386
1386
  showPopup, hidePopup,
1387
1387
  removeAtIndex, add, toggleOption,
1388
+ getOptionIndex: () => optionIndex.value,
1388
1389
  setOptionIndex, moveOptionSelection,
1389
1390
  filter, updateMenuPosition, updateInputValue,
1390
1391
  isOptionSelected,
@@ -628,9 +628,7 @@
628
628
  "desc": "Emitted when the select options menu or dialog is shown.",
629
629
  "params": {
630
630
  "evt": {
631
- "type": "Object",
632
- "desc": "JS event object",
633
- "__exemption": [ "examples" ]
631
+ "extends": "evt"
634
632
  }
635
633
  }
636
634
  },
@@ -639,9 +637,7 @@
639
637
  "desc": "Emitted when the select options menu or dialog is hidden.",
640
638
  "params": {
641
639
  "evt": {
642
- "type": "Object",
643
- "desc": "JS event object",
644
- "__exemption": [ "examples" ]
640
+ "extends": "evt"
645
641
  }
646
642
  }
647
643
  },
@@ -718,13 +714,26 @@
718
714
  }
719
715
  },
720
716
 
717
+ "getOptionIndex": {
718
+ "desc": "Gets current focused option index from menu; It's -1 if no option is focused",
719
+ "params": {
720
+ "index": {
721
+ "type": "Number",
722
+ "required": true,
723
+ "desc": "Index of option from menu; -1 if no option is focused",
724
+ "examples": [ 10 ]
725
+ }
726
+ },
727
+ "addedIn": "v2.5.4"
728
+ },
729
+
721
730
  "setOptionIndex": {
722
- "desc": "Sets option from menu as 'focused'",
731
+ "desc": "Sets option from menu as 'focused'; -1 to focus none",
723
732
  "params": {
724
733
  "index": {
725
734
  "type": "Number",
726
735
  "required": true,
727
- "desc": "Index of option from menu",
736
+ "desc": "Index of option from menu; -1 to focus none",
728
737
  "examples": [ 10 ]
729
738
  }
730
739
  }
@@ -65,8 +65,8 @@ export default createComponent({
65
65
 
66
66
  timer = setTimeout(() => {
67
67
  el.style.height = `${ el.scrollHeight }px`
68
- animListener = ev => {
69
- if (Object(ev) !== ev || ev.target === el) {
68
+ animListener = evt => {
69
+ if (Object(evt) !== evt || evt.target === el) {
70
70
  end(el, 'show')
71
71
  }
72
72
  }
@@ -91,8 +91,8 @@ export default createComponent({
91
91
 
92
92
  timer = setTimeout(() => {
93
93
  el.style.height = 0
94
- animListener = ev => {
95
- if (Object(ev) !== ev || ev.target === el) {
94
+ animListener = evt => {
95
+ if (Object(evt) !== evt || evt.target === el) {
96
96
  end(el, 'hide')
97
97
  }
98
98
  }
@@ -7,7 +7,7 @@ import { useFormProps, useFormInject } from '../../composables/private/use-form.
7
7
 
8
8
  import { between } from '../../utils/format.js'
9
9
  import { position } from '../../utils/event.js'
10
- import { isNumber } from '../../utils/private/is.js'
10
+ import { isNumber, isPlainObject } from '../../utils/private/is.js'
11
11
  import { hDir } from '../../utils/private/render.js'
12
12
 
13
13
  const markerPrefixClass = 'q-slider__marker-labels'
@@ -340,7 +340,7 @@ export default function ({ updateValue, updatePosition, getDragging, formAttrs }
340
340
  if (typeof def === 'function') {
341
341
  return markerTicks.value.map(value => {
342
342
  const item = def(value)
343
- return Object(item) === item ? { ...item, value } : { value, label: item }
343
+ return isPlainObject(item) === true ? { ...item, value } : { value, label: item }
344
344
  })
345
345
  }
346
346
 
@@ -348,14 +348,14 @@ export default function ({ updateValue, updatePosition, getDragging, formAttrs }
348
348
 
349
349
  if (Array.isArray(def) === true) {
350
350
  return def
351
- .map(item => (Object(item) === item ? item : { value: item }))
351
+ .map(item => (isPlainObject(item) === true ? item : { value: item }))
352
352
  .filter(filterFn)
353
353
  }
354
354
 
355
355
  return Object.keys(def).map(key => {
356
356
  const item = def[ key ]
357
357
  const value = Number(key)
358
- return Object(item) === item ? { ...item, value } : { value, label: item }
358
+ return isPlainObject(item) === true ? { ...item, value } : { value, label: item }
359
359
  }).filter(filterFn)
360
360
  }
361
361
 
@@ -29,7 +29,7 @@
29
29
  "inner-max": {
30
30
  "type": "Number",
31
31
  "desc": "Inner maximum value of the model; Use in case you need the model value to be inside of the track's min-max values; Needs to be lower or equal to 'max' prop; Defaults to 'max' prop",
32
- "examples": [ ":max-value=\"100\"" ],
32
+ "examples": [ ":inner-max=\"100\"" ],
33
33
  "category": "model",
34
34
  "addedIn": "v2.4"
35
35
  },
@@ -45,6 +45,7 @@
45
45
 
46
46
  "done-icon": {
47
47
  "extends": "icon",
48
+ "desc": "Icon name following Quasar convention; If 'none' (String) is used as value, then it will defer to prefix or the regular icon for this state; Make sure you have the icon library installed unless you are using 'img:' prefix",
48
49
  "category": "header"
49
50
  },
50
51
 
@@ -55,6 +56,7 @@
55
56
 
56
57
  "active-icon": {
57
58
  "extends": "icon",
59
+ "desc": "Icon name following Quasar convention; If 'none' (String) is used as value, then it will defer to prefix or the regular icon for this state; Make sure you have the icon library installed unless you are using 'img:' prefix",
58
60
  "category": "header"
59
61
  },
60
62
 
@@ -65,6 +67,7 @@
65
67
 
66
68
  "error-icon": {
67
69
  "extends": "icon",
70
+ "desc": "Icon name following Quasar convention; If 'none' (String) is used as value, then it will defer to prefix or the regular icon for this state; Make sure you have the icon library installed unless you are using 'img:' prefix",
68
71
  "category": "header"
69
72
  },
70
73
 
@@ -54,6 +54,7 @@
54
54
 
55
55
  "done-icon": {
56
56
  "extends": "icon",
57
+ "desc": "Icon name following Quasar convention; If 'none' (String) is used as value, then it will defer to prefix or the regular icon for this state; Make sure you have the icon library installed unless you are using 'img:' prefix",
57
58
  "category": "header"
58
59
  },
59
60
 
@@ -64,6 +65,7 @@
64
65
 
65
66
  "active-icon": {
66
67
  "extends": "icon",
68
+ "desc": "Icon name following Quasar convention; If 'none' (String) is used as value, then it will defer to prefix or the regular icon for this state; Make sure you have the icon library installed unless you are using 'img:' prefix",
67
69
  "category": "header"
68
70
  },
69
71
 
@@ -74,6 +76,7 @@
74
76
 
75
77
  "error-icon": {
76
78
  "extends": "icon",
79
+ "desc": "Icon name following Quasar convention; If 'none' (String) is used as value, then it will defer to prefix or the regular icon for this state; Make sure you have the icon library installed unless you are using 'img:' prefix",
77
80
  "category": "header"
78
81
  },
79
82
 
@@ -52,6 +52,7 @@
52
52
  &--error
53
53
  color: var(--q-negative)
54
54
 
55
+ &--error-with-icon
55
56
  .q-stepper__dot
56
57
  background: transparent !important
57
58
  span
@@ -47,23 +47,36 @@ export default createComponent({
47
47
 
48
48
  const hasPrefix = computed(() => {
49
49
  return props.step.prefix
50
- && isActive.value === false
51
- && isError.value === false
52
- && isDone.value === false
50
+ && (isActive.value === false || props.stepper.activeIcon === 'none')
51
+ && (isError.value === false || props.stepper.errorIcon === 'none')
52
+ && (isDone.value === false || props.stepper.doneIcon === 'none')
53
53
  })
54
54
 
55
55
  const icon = computed(() => {
56
+ const defaultIcon = props.step.icon || props.stepper.inactiveIcon
57
+
56
58
  if (isActive.value === true) {
57
- return props.step.activeIcon || props.stepper.activeIcon || $q.iconSet.stepper.active
59
+ const icon = props.step.activeIcon || props.stepper.activeIcon
60
+ return icon === 'none'
61
+ ? defaultIcon
62
+ : icon || $q.iconSet.stepper.active
58
63
  }
64
+
59
65
  if (isError.value === true) {
60
- return props.step.errorIcon || props.stepper.errorIcon || $q.iconSet.stepper.error
66
+ const icon = props.step.errorIcon || props.stepper.errorIcon
67
+ return icon === 'none'
68
+ ? defaultIcon
69
+ : icon || $q.iconSet.stepper.error
61
70
  }
71
+
62
72
  if (isDisable.value === false && isDone.value === true) {
63
- return props.step.doneIcon || props.stepper.doneIcon || $q.iconSet.stepper.done
73
+ const icon = props.step.doneIcon || props.stepper.doneIcon
74
+ return icon === 'none'
75
+ ? defaultIcon
76
+ : icon || $q.iconSet.stepper.done
64
77
  }
65
78
 
66
- return props.step.icon || props.stepper.inactiveIcon
79
+ return defaultIcon
67
80
  })
68
81
 
69
82
  const color = computed(() => {
@@ -90,7 +103,9 @@ export default createComponent({
90
103
  const classes = computed(() => {
91
104
  return 'q-stepper__tab col-grow flex items-center no-wrap relative-position'
92
105
  + (color.value !== void 0 ? ` text-${ color.value }` : '')
93
- + (isError.value === true ? ' q-stepper__tab--error' : '')
106
+ + (isError.value === true
107
+ ? ' q-stepper__tab--error q-stepper__tab--error-with-' + (hasPrefix.value === true ? 'prefix' : 'icon')
108
+ : '')
94
109
  + (isActive.value === true ? ' q-stepper__tab--active' : '')
95
110
  + (isDone.value === true ? ' q-stepper__tab--done' : '')
96
111
  + (headerNav.value === true ? ' q-stepper__tab--navigation q-focusable q-hoverable' : '')
@@ -1867,9 +1867,7 @@
1867
1867
  "desc": "Emitted when user clicks/taps on a row; Is not emitted when using body/row/item scoped slots",
1868
1868
  "params": {
1869
1869
  "evt": {
1870
- "type": "Object",
1871
- "desc": "JS event object",
1872
- "__exemption": [ "examples" ]
1870
+ "extends": "evt"
1873
1871
  },
1874
1872
 
1875
1873
  "row": {
@@ -1890,9 +1888,7 @@
1890
1888
  "desc": "Emitted when user quickly double clicks/taps on a row; Is not emitted when using body/row/item scoped slots; Please check JS dblclick event support before using",
1891
1889
  "params": {
1892
1890
  "evt": {
1893
- "type": "Object",
1894
- "desc": "JS event object",
1895
- "__exemption": [ "examples" ]
1891
+ "extends": "evt"
1896
1892
  },
1897
1893
 
1898
1894
  "row": {
@@ -1913,9 +1909,7 @@
1913
1909
  "desc": "Emitted when user right clicks/long taps on a row; Is not emitted when using body/row/item scoped slots",
1914
1910
  "params": {
1915
1911
  "evt": {
1916
- "type": "Object",
1917
- "desc": "JS event object",
1918
- "__exemption": [ "examples" ]
1912
+ "extends": "evt"
1919
1913
  },
1920
1914
 
1921
1915
  "row": {
@@ -2075,10 +2069,8 @@
2075
2069
  "desc": "Were the rows added to selection (true) or removed from selection (false)"
2076
2070
  },
2077
2071
  "evt": {
2078
- "type": "Object",
2079
- "required": true,
2080
- "desc": "JS event object",
2081
- "__exemption": [ "examples" ]
2072
+ "extends": "evt",
2073
+ "required": true
2082
2074
  }
2083
2075
  }
2084
2076
  }
@@ -1,7 +1,7 @@
1
1
  import { computed } from 'vue'
2
2
 
3
3
  import { sortDate } from '../../utils/private/sort.js'
4
- import { isNumber, isDate } from '../../utils/private/is.js'
4
+ import { isNumber, isDate, isPlainObject } from '../../utils/private/is.js'
5
5
 
6
6
  export const useTableSortProps = {
7
7
  sortMethod: Function,
@@ -73,7 +73,7 @@ export function useTableSort (props, computedPagination, colList, setPagination)
73
73
  function sort (col /* String(col name) or Object(col definition) */) {
74
74
  let sortOrder = props.columnSortOrder
75
75
 
76
- if (col === Object(col)) {
76
+ if (isPlainObject(col) === true) {
77
77
  if (col.sortOrder) {
78
78
  sortOrder = col.sortOrder
79
79
  }
@@ -10,9 +10,8 @@
10
10
  "desc": "Emitted when component is clicked (activated)",
11
11
  "params": {
12
12
  "evt": {
13
- "type": "Object",
14
- "desc": "JS event object; If you want to cancel navigation set synchronously 'evt.navigate' to false",
15
- "__exemption": [ "examples" ]
13
+ "extends": "evt",
14
+ "desc": "JS event object; If you want to cancel navigation set synchronously 'evt.navigate' to false"
16
15
  },
17
16
  "navigateFn": {
18
17
  "type": "Function",
@@ -108,9 +108,12 @@ export default function (props, slots, emit, routerProps) {
108
108
  $tabs.avoidRouteWatcher = false
109
109
  }
110
110
  else {
111
- res.then(() => {
111
+ res.then(err => {
112
112
  $tabs.avoidRouteWatcher = false
113
- $tabs.updateModel({ name: props.name, fromRoute: true })
113
+
114
+ if (err === void 0) {
115
+ $tabs.updateModel({ name: props.name, fromRoute: true })
116
+ }
114
117
  })
115
118
  }
116
119
  }
@@ -167,12 +170,12 @@ export default function (props, slots, emit, routerProps) {
167
170
  props.alert !== false && content.push(
168
171
  props.alertIcon !== void 0
169
172
  ? h(QIcon, {
170
- class: 'q-tab__alert-icon',
171
- color: props.alert !== true
172
- ? props.alert
173
- : void 0,
174
- name: props.alertIcon
175
- })
173
+ class: 'q-tab__alert-icon',
174
+ color: props.alert !== true
175
+ ? props.alert
176
+ : void 0,
177
+ name: props.alertIcon
178
+ })
176
179
  : h('div', {
177
180
  class: 'q-tab__alert'
178
181
  + (props.alert !== true ? ` text-${ props.alert }` : '')
@@ -86,12 +86,14 @@ export default createComponent({
86
86
  const mask = computed(() => getMask())
87
87
  const locale = computed(() => getLocale())
88
88
 
89
+ const defaultDateModel = computed(() => getDefaultDateModel())
90
+
89
91
  const model = __splitDate(
90
92
  props.modelValue,
91
- getMask(),
92
- getLocale(),
93
+ mask.value, // initial mask
94
+ locale.value, // initial locale
93
95
  props.calendar,
94
- getDefaultDateModel()
96
+ defaultDateModel.value
95
97
  )
96
98
 
97
99
  const view = ref(getViewByModel(model))
@@ -131,8 +133,6 @@ export default createComponent({
131
133
  }
132
134
  })
133
135
 
134
- const defaultDateModel = computed(() => getDefaultDateModel())
135
-
136
136
  const computedFormat24h = computed(() => (
137
137
  props.format24h !== null
138
138
  ? props.format24h
@@ -542,34 +542,34 @@ export default createComponent({
542
542
 
543
543
  m.lazy === 'loading'
544
544
  ? h(QSpinner, {
545
- class: 'q-tree__spinner',
546
- color: computedControlColor.value
547
- })
545
+ class: 'q-tree__spinner',
546
+ color: computedControlColor.value
547
+ })
548
548
  : (
549
549
  isParent === true
550
550
  ? h(QIcon, {
551
- class: 'q-tree__arrow'
551
+ class: 'q-tree__arrow'
552
552
  + (m.expanded === true ? ' q-tree__arrow--rotate' : ''),
553
- name: computedIcon.value,
554
- onClick (e) { onExpandClick(node, m, e) }
555
- })
553
+ name: computedIcon.value,
554
+ onClick (e) { onExpandClick(node, m, e) }
555
+ })
556
556
  : null
557
557
  ),
558
558
 
559
559
  m.hasTicking === true && m.noTick !== true
560
560
  ? h(QCheckbox, {
561
- class: 'q-tree__tickbox',
562
- modelValue: m.indeterminate === true ? null : m.ticked,
563
- color: computedControlColor.value,
564
- dark: isDark.value,
565
- dense: true,
566
- keepColor: true,
567
- disable: m.tickable !== true,
568
- onKeydown: stopAndPrevent,
569
- 'onUpdate:modelValue': v => {
570
- onTickedClick(m, v)
571
- }
572
- })
561
+ class: 'q-tree__tickbox',
562
+ modelValue: m.indeterminate === true ? null : m.ticked,
563
+ color: computedControlColor.value,
564
+ dark: isDark.value,
565
+ dense: true,
566
+ keepColor: true,
567
+ disable: m.tickable !== true,
568
+ onKeydown: stopAndPrevent,
569
+ 'onUpdate:modelValue': v => {
570
+ onTickedClick(m, v)
571
+ }
572
+ })
573
573
  : null,
574
574
 
575
575
  h('div', {
@@ -587,22 +587,22 @@ export default createComponent({
587
587
 
588
588
  isParent === true
589
589
  ? h(QSlideTransition, {
590
- duration: props.duration,
591
- onShow,
592
- onHide
593
- }, () => withDirectives(
590
+ duration: props.duration,
591
+ onShow,
592
+ onHide
593
+ }, () => withDirectives(
594
+ h('div', {
595
+ class: 'q-tree__node-collapsible' + textColorClass.value,
596
+ key: `${ key }__q`
597
+ }, [
598
+ body,
594
599
  h('div', {
595
- class: 'q-tree__node-collapsible' + textColorClass.value,
596
- key: `${ key }__q`
597
- }, [
598
- body,
599
- h('div', {
600
- class: 'q-tree__children'
600
+ class: 'q-tree__children'
601
601
  + (m.disabled === true ? ' q-tree__node--disabled' : '')
602
- }, children)
603
- ]),
604
- [ [ vShow, m.expanded ] ]
605
- ))
602
+ }, children)
603
+ ]),
604
+ [ [ vShow, m.expanded ] ]
605
+ ))
606
606
  : body
607
607
  ])
608
608
  }
@@ -615,14 +615,12 @@ export default createComponent({
615
615
  function onClick (node, meta, e, keyboard) {
616
616
  keyboard !== true && blur(meta.key)
617
617
 
618
- if (hasSelection.value) {
619
- if (meta.selectable) {
620
- if (props.noSelectionUnset === false) {
621
- emit('update:selected', meta.key !== props.selected ? meta.key : null)
622
- }
623
- else if (meta.key !== props.selected) {
624
- emit('update:selected', meta.key || null)
625
- }
618
+ if (hasSelection.value && meta.selectable) {
619
+ if (props.noSelectionUnset === false) {
620
+ emit('update:selected', meta.key !== props.selected ? meta.key : null)
621
+ }
622
+ else if (meta.key !== props.selected) {
623
+ emit('update:selected', meta.key || null)
626
624
  }
627
625
  }
628
626
  else {
@@ -85,9 +85,7 @@
85
85
  "desc": "Trigger file pick; Must be called as a direct consequence of user interaction (eg. in a click handler), due to browsers security policy",
86
86
  "params": {
87
87
  "evt": {
88
- "type": "Object",
89
- "desc": "JS event object",
90
- "__exemption": [ "examples" ]
88
+ "extends": "evt"
91
89
  }
92
90
  }
93
91
  },
@@ -248,7 +248,7 @@ export default function (fallbackTag) {
248
248
  prevent(e)
249
249
 
250
250
  return proxy.$router[ props.replace === true ? 'replace' : 'push' ](props.to)
251
- .catch(() => {})
251
+ .catch(err => err)
252
252
  }
253
253
 
254
254
  return {
@@ -12,9 +12,8 @@
12
12
  "desc": "Event details",
13
13
  "definition": {
14
14
  "evt": {
15
- "type": "Object",
16
- "desc": "Original JS event Object",
17
- "__exemption": [ "examples" ]
15
+ "extends": "evt",
16
+ "desc": "Original JS event Object"
18
17
  },
19
18
  "touch": {
20
19
  "type": "Boolean",
@@ -12,9 +12,8 @@
12
12
  "desc": "Event details",
13
13
  "definition": {
14
14
  "evt": {
15
- "type": "Object",
16
- "desc": "Original JS event Object",
17
- "__exemption": [ "examples" ]
15
+ "extends": "evt",
16
+ "desc": "Original JS event Object"
18
17
  },
19
18
  "touch": {
20
19
  "type": "Boolean",
@@ -12,9 +12,8 @@
12
12
  "desc": "Event details",
13
13
  "definition": {
14
14
  "evt": {
15
- "type": "Object",
16
- "desc": "Original JS event Object",
17
- "__exemption": [ "examples" ]
15
+ "extends": "evt",
16
+ "desc": "Original JS event Object"
18
17
  },
19
18
  "touch": {
20
19
  "type": "Boolean",
@@ -12,9 +12,8 @@
12
12
  "desc": "Event details",
13
13
  "definition": {
14
14
  "evt": {
15
- "type": "Object",
16
- "desc": "Original JS event Object",
17
- "__exemption": [ "examples" ]
15
+ "extends": "evt",
16
+ "desc": "Original JS event Object"
18
17
  },
19
18
  "touch": {
20
19
  "type": "Boolean",