quasar 2.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/dist/api/QBreadcrumbs.json +1 -2
  2. package/dist/api/QDialog.json +6 -1
  3. package/dist/api/QTable.json +1 -1
  4. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  5. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  6. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  7. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  8. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  9. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  10. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  11. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  12. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  13. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  14. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  15. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  16. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  17. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  18. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  19. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  20. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  21. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  22. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  23. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  24. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  25. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  26. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  27. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  28. package/dist/icon-set/svg-mdi-v4.umd.prod.js +1 -1
  29. package/dist/icon-set/svg-mdi-v5.umd.prod.js +1 -1
  30. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  31. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  32. package/dist/icon-set/themify.umd.prod.js +1 -1
  33. package/dist/lang/ar.umd.prod.js +1 -1
  34. package/dist/lang/az-Latn.umd.prod.js +1 -1
  35. package/dist/lang/bg.umd.prod.js +1 -1
  36. package/dist/lang/bn.umd.prod.js +1 -1
  37. package/dist/lang/ca.umd.prod.js +1 -1
  38. package/dist/lang/cs.umd.prod.js +1 -1
  39. package/dist/lang/da.umd.prod.js +1 -1
  40. package/dist/lang/de.umd.prod.js +2 -2
  41. package/dist/lang/el.umd.prod.js +1 -1
  42. package/dist/lang/en-GB.umd.prod.js +1 -1
  43. package/dist/lang/en-US.umd.prod.js +1 -1
  44. package/dist/lang/eo.umd.prod.js +1 -1
  45. package/dist/lang/es.umd.prod.js +1 -1
  46. package/dist/lang/et.umd.prod.js +1 -1
  47. package/dist/lang/fa-IR.umd.prod.js +1 -1
  48. package/dist/lang/fa.umd.prod.js +1 -1
  49. package/dist/lang/fi.umd.prod.js +1 -1
  50. package/dist/lang/fr.umd.prod.js +1 -1
  51. package/dist/lang/gn.umd.prod.js +1 -1
  52. package/dist/lang/he.umd.prod.js +1 -1
  53. package/dist/lang/hr.umd.prod.js +1 -1
  54. package/dist/lang/hu.umd.prod.js +1 -1
  55. package/dist/lang/id.umd.prod.js +1 -1
  56. package/dist/lang/is.umd.prod.js +1 -1
  57. package/dist/lang/it.umd.prod.js +1 -1
  58. package/dist/lang/ja.umd.prod.js +1 -1
  59. package/dist/lang/km.umd.prod.js +1 -1
  60. package/dist/lang/ko-KR.umd.prod.js +1 -1
  61. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  62. package/dist/lang/lu.umd.prod.js +1 -1
  63. package/dist/lang/lv.umd.prod.js +1 -1
  64. package/dist/lang/ml.umd.prod.js +1 -1
  65. package/dist/lang/ms.umd.prod.js +1 -1
  66. package/dist/lang/nb-NO.umd.prod.js +1 -1
  67. package/dist/lang/nl.umd.prod.js +1 -1
  68. package/dist/lang/pl.umd.prod.js +1 -1
  69. package/dist/lang/pt-BR.umd.prod.js +1 -1
  70. package/dist/lang/pt.umd.prod.js +1 -1
  71. package/dist/lang/ro.umd.prod.js +1 -1
  72. package/dist/lang/ru.umd.prod.js +1 -1
  73. package/dist/lang/sk.umd.prod.js +1 -1
  74. package/dist/lang/sl.umd.prod.js +1 -1
  75. package/dist/lang/sr.umd.prod.js +1 -1
  76. package/dist/lang/sv.umd.prod.js +1 -1
  77. package/dist/lang/ta.umd.prod.js +1 -1
  78. package/dist/lang/th.umd.prod.js +1 -1
  79. package/dist/lang/tr.umd.prod.js +1 -1
  80. package/dist/lang/ug.umd.prod.js +1 -1
  81. package/dist/lang/uk.umd.prod.js +1 -1
  82. package/dist/lang/vi.umd.prod.js +1 -1
  83. package/dist/lang/zh-CN.umd.prod.js +1 -1
  84. package/dist/lang/zh-TW.umd.prod.js +1 -1
  85. package/dist/quasar.cjs.prod.js +2 -2
  86. package/dist/quasar.css +0 -15
  87. package/dist/quasar.esm.prod.js +2 -2
  88. package/dist/quasar.prod.css +1 -1
  89. package/dist/quasar.rtl.css +0 -15
  90. package/dist/quasar.rtl.prod.css +1 -1
  91. package/dist/quasar.sass +1 -1
  92. package/dist/quasar.umd.js +23 -10
  93. package/dist/quasar.umd.prod.js +2 -2
  94. package/dist/ssr-directives/Morph.js +1 -1
  95. package/dist/types/extras/icon-set.d.ts +1 -0
  96. package/dist/types/index.d.ts +12688 -8107
  97. package/dist/types/ts-helpers.d.ts +18 -2
  98. package/dist/vetur/quasar-attributes.json +5 -1
  99. package/dist/vetur/quasar-tags.json +2 -1
  100. package/dist/web-types/web-types.json +13 -3
  101. package/lang/de.js +1 -1
  102. package/package.json +2 -1
  103. package/src/components/breadcrumbs/QBreadcrumbs.json +1 -2
  104. package/src/components/dialog/QDialog.js +3 -2
  105. package/src/components/dialog/QDialog.json +7 -1
  106. package/src/components/table/QTable.json +1 -1
  107. package/src/utils/dom.js +1 -1
  108. package/src/utils/private/global-dialog.js +14 -2
@@ -1,4 +1,4 @@
1
- import { ComponentOptions, ComponentPublicInstance, ComputedOptions, MethodOptions } from 'vue';
1
+ import { ComponentOptions, ComponentPublicInstance, ComputedOptions, MethodOptions, VNodeProps, AllowedComponentProps, ComponentCustomProps } from 'vue';
2
2
 
3
3
  export type LooseDictionary = { [index in string]: any };
4
4
 
@@ -19,4 +19,20 @@ export type DeepPartial<T> = {
19
19
  // especially into VTU to automatically infer Quasar components type when using `findComponent`
20
20
  // This type is compatible with the Vue private `ComponentPublicInstanceConstructor` type
21
21
  // https://github.com/vuejs/vue-next/blob/011dee8644bb52f5bdc6365c6e8404936d57e2cd/packages/runtime-core/src/componentPublicInstance.ts#L111
22
- 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>
22
+ 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>
23
+
24
+ // https://github.com/vuejs/vue-next/blob/d84d5ecdbdf709570122175d6565bb61fae877f2/packages/runtime-core/src/apiDefineComponent.ts#L29-L31
25
+ // TODO: This can be imported from vue directly once this PR gets merged: https://github.com/vuejs/vue-next/pull/2403
26
+ export type PublicProps = VNodeProps & AllowedComponentProps & ComponentCustomProps;
27
+
28
+ // Can't use `DefineComponent` because of the false prop inferring behavior, it doesn't pick up the required types when an interface is passed
29
+ // 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
30
+ // GlobalComponentConstructor helper is kind of like the ComponentConstructor type helper, but simpler and keeps the Volar errors simpler,
31
+ // and also similar to the usage in official Vue packages: https://github.com/vuejs/vue-next/blob/d84d5ecdbdf709570122175d6565bb61fae877f2/packages/runtime-core/src/components/BaseTransition.ts#L258-L264 or https://github.com/vuejs/vue-router-next/blob/5dd5f47515186ce34efb9118dda5aad0bb773439/src/RouterView.ts#L160-L172 etc.
32
+ // TODO: This can be replaced with `DefineComponent` once this PR gets merged: https://github.com/vuejs/vue-next/pull/4465
33
+ export type GlobalComponentConstructor<Props = {}, Slots = {}> = {
34
+ new (): {
35
+ $props: PublicProps & Props
36
+ $slots: Slots
37
+ }
38
+ }
@@ -1267,6 +1267,10 @@
1267
1267
  "type": "boolean",
1268
1268
  "description": "(Accessibility) When Dialog gets shown, do not switch focus on it"
1269
1269
  },
1270
+ "q-dialog/no-shake": {
1271
+ "type": "boolean",
1272
+ "description": "Do not shake up the Dialog to catch user's attention"
1273
+ },
1270
1274
  "q-drawer/model-value": {
1271
1275
  "type": "boolean",
1272
1276
  "description": "Model of the component defining shown/hidden state; Either use this property (along with a listener for 'update:model-value' event) OR use v-model directive"
@@ -4613,7 +4617,7 @@
4613
4617
  },
4614
4618
  "q-table/loading": {
4615
4619
  "type": "boolean",
4616
- "description": "Put Table into 'loading' state; Notify the user something is happening under the covers"
4620
+ "description": "Put Table into 'loading' state; Notify the user something is happening behind the scenes"
4617
4621
  },
4618
4622
  "q-table/title": {
4619
4623
  "type": "string",
@@ -432,7 +432,8 @@
432
432
  "transition-hide",
433
433
  "square",
434
434
  "no-refocus",
435
- "no-focus"
435
+ "no-focus",
436
+ "no-shake"
436
437
  ],
437
438
  "description": ""
438
439
  },
@@ -2,7 +2,7 @@
2
2
  "$schema": "",
3
3
  "framework": "vue",
4
4
  "name": "quasar",
5
- "version": "2.1.0",
5
+ "version": "2.1.1",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "types-syntax": "typescript",
@@ -3887,6 +3887,16 @@
3887
3887
  "description": "(Accessibility) When Dialog gets shown, do not switch focus on it",
3888
3888
  "doc-url": "https://v2.quasar.dev/vue-components/dialog",
3889
3889
  "type": "boolean"
3890
+ },
3891
+ {
3892
+ "name": "no-shake",
3893
+ "value": {
3894
+ "kind": "expression",
3895
+ "type": "boolean"
3896
+ },
3897
+ "description": "Do not shake up the Dialog to catch user's attention",
3898
+ "doc-url": "https://v2.quasar.dev/vue-components/dialog",
3899
+ "type": "boolean"
3890
3900
  }
3891
3901
  ],
3892
3902
  "events": [
@@ -3957,7 +3967,7 @@
3957
3967
  },
3958
3968
  {
3959
3969
  "name": "shake",
3960
- "description": "Shakes up the Dialog in order to catch user's attention",
3970
+ "description": "Emitted when the Dialog shakes in order to catch user's attention, unless the 'no-shake' property is set",
3961
3971
  "doc-url": "https://v2.quasar.dev/vue-components/dialog"
3962
3972
  },
3963
3973
  {
@@ -15016,7 +15026,7 @@
15016
15026
  "kind": "expression",
15017
15027
  "type": "boolean"
15018
15028
  },
15019
- "description": "Put Table into 'loading' state; Notify the user something is happening under the covers",
15029
+ "description": "Put Table into 'loading' state; Notify the user something is happening behind the scenes",
15020
15030
  "doc-url": "https://v2.quasar.dev/vue-components/table",
15021
15031
  "type": "boolean"
15022
15032
  },
package/lang/de.js CHANGED
@@ -23,7 +23,7 @@ export default {
23
23
  monthsShort: 'Jan_Feb_Mar_Apr_Mai_Jun_Jul_Aug_Sep_Okt_Nov_Dez'.split('_'),
24
24
  firstDayOfWeek: 1, // 0-6, 0 - Sunday, 1 Monday, ...
25
25
  format24h: true,
26
- pluralDay: 'tage'
26
+ pluralDay: 'Tage'
27
27
  },
28
28
  table: {
29
29
  noData: 'Keine Daten vorhanden.',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quasar",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time",
5
5
  "main": "dist/quasar.cjs.prod.js",
6
6
  "module": "dist/quasar.esm.prod.js",
@@ -77,6 +77,7 @@
77
77
  "eslint-webpack-plugin": "^2.4.1",
78
78
  "json-beautify": "^1.1.1",
79
79
  "module-alias": "^2.2.2",
80
+ "prettier": "^2.4.1",
80
81
  "recast": "^0.18.5",
81
82
  "rimraf": "^3.0.1",
82
83
  "rollup": "^2.34.0",
@@ -50,8 +50,7 @@
50
50
  },
51
51
 
52
52
  "separator": {
53
- "desc": "HTML or component you can slot in to separate the breadcrumbs",
54
- "scope": {}
53
+ "desc": "HTML or component you can slot in to separate the breadcrumbs"
55
54
  }
56
55
  }
57
56
  }
@@ -52,6 +52,7 @@ export default defineComponent({
52
52
  noRouteDismiss: Boolean,
53
53
  noRefocus: Boolean,
54
54
  noFocus: Boolean,
55
+ noShake: Boolean,
55
56
 
56
57
  seamless: Boolean,
57
58
 
@@ -279,7 +280,7 @@ export default defineComponent({
279
280
  function onEscapeKey () {
280
281
  if (props.seamless !== true) {
281
282
  if (props.persistent === true || props.noEscDismiss === true) {
282
- props.maximized !== true && shake()
283
+ props.maximized !== true && props.noShake !== true && shake()
283
284
  }
284
285
  else {
285
286
  emit('escape-key')
@@ -332,7 +333,7 @@ export default defineComponent({
332
333
  if (props.persistent !== true && props.noBackdropDismiss !== true) {
333
334
  hide(e)
334
335
  }
335
- else {
336
+ else if (props.noShake !== true) {
336
337
  shake()
337
338
  }
338
339
  }
@@ -95,12 +95,18 @@
95
95
  "type": "Boolean",
96
96
  "desc": "(Accessibility) When Dialog gets shown, do not switch focus on it",
97
97
  "category": "behavior"
98
+ },
99
+
100
+ "no-shake": {
101
+ "type": "Boolean",
102
+ "desc": "Do not shake up the Dialog to catch user's attention",
103
+ "category": "behavior"
98
104
  }
99
105
  },
100
106
 
101
107
  "events": {
102
108
  "shake": {
103
- "desc": "Shakes up the Dialog in order to catch user's attention"
109
+ "desc": "Emitted when the Dialog shakes in order to catch user's attention, unless the 'no-shake' property is set"
104
110
  },
105
111
 
106
112
  "escape-key": {
@@ -268,7 +268,7 @@
268
268
 
269
269
  "loading": {
270
270
  "type": "Boolean",
271
- "desc": "Put Table into 'loading' state; Notify the user something is happening under the covers",
271
+ "desc": "Put Table into 'loading' state; Notify the user something is happening behind the scenes",
272
272
  "category": "behavior|content"
273
273
  },
274
274
 
package/src/utils/dom.js CHANGED
@@ -74,7 +74,7 @@ export function getElement (el) {
74
74
 
75
75
  // internal
76
76
  export function childHasFocus (el, focusedEl) {
77
- if (el === void 0 || el.contains(focusedEl) === true) {
77
+ if (el === void 0 || el === null || el.contains(focusedEl) === true) {
78
78
  return true
79
79
  }
80
80
 
@@ -69,9 +69,21 @@ export default function (DefaultComponent, supportsCustomComponent, parentApp) {
69
69
  return API
70
70
  },
71
71
  hide () {
72
- if (dialogRef.value !== null) {
72
+ if (dialogRef.value !== null && dialogRef.value.hide !== void 0) {
73
73
  dialogRef.value.hide()
74
74
  }
75
+ else if (
76
+ // account for "script setup" way of declaring component
77
+ vm.$.subTree &&
78
+ vm.$.subTree.component &&
79
+ vm.$.subTree.component.proxy &&
80
+ vm.$.subTree.component.proxy.hide
81
+ ) {
82
+ vm.$.subTree.component.proxy.hide();
83
+ }
84
+ else {
85
+ console.error("[Quasar] Incorrectly defined Dialog component");
86
+ }
75
87
  return API
76
88
  },
77
89
  update (componentProps) {
@@ -131,7 +143,7 @@ export default function (DefaultComponent, supportsCustomComponent, parentApp) {
131
143
  let vm = app.mount(el)
132
144
 
133
145
  function show () {
134
- if (dialogRef.value.show !== void 0) {
146
+ if (dialogRef.value !== null && dialogRef.value.show !== void 0) {
135
147
  dialogRef.value.show()
136
148
  }
137
149
  else if ( // account for "script setup" way of declaring component