quasar 2.4.9 → 2.4.10
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.
- package/dist/api/QFile.json +1 -0
- package/dist/api/QTree.json +7 -0
- package/dist/api/QUploader.json +3 -1
- package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
- package/dist/icon-set/eva-icons.umd.prod.js +1 -1
- package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
- package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
- package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
- package/dist/icon-set/line-awesome.umd.prod.js +1 -1
- package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
- package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
- package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
- package/dist/icon-set/material-icons.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
- package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
- package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
- package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
- package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
- package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
- package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
- package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
- package/dist/icon-set/svg-mdi-v4.umd.prod.js +1 -1
- package/dist/icon-set/svg-mdi-v5.umd.prod.js +1 -1
- package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
- package/dist/icon-set/svg-themify.umd.prod.js +1 -1
- package/dist/icon-set/themify.umd.prod.js +1 -1
- package/dist/lang/ar.umd.prod.js +1 -1
- package/dist/lang/az-Latn.umd.prod.js +1 -1
- package/dist/lang/bg.umd.prod.js +1 -1
- package/dist/lang/bn.umd.prod.js +1 -1
- package/dist/lang/ca.umd.prod.js +1 -1
- package/dist/lang/cs.umd.prod.js +1 -1
- package/dist/lang/da.umd.prod.js +1 -1
- package/dist/lang/de.umd.prod.js +1 -1
- package/dist/lang/el.umd.prod.js +1 -1
- package/dist/lang/en-GB.umd.prod.js +1 -1
- package/dist/lang/en-US.umd.prod.js +1 -1
- package/dist/lang/eo.umd.prod.js +1 -1
- package/dist/lang/es.umd.prod.js +1 -1
- package/dist/lang/et.umd.prod.js +1 -1
- package/dist/lang/fa-IR.umd.prod.js +1 -1
- package/dist/lang/fa.umd.prod.js +1 -1
- package/dist/lang/fi.umd.prod.js +1 -1
- package/dist/lang/fr.umd.prod.js +1 -1
- package/dist/lang/gn.umd.prod.js +1 -1
- package/dist/lang/he.umd.prod.js +1 -1
- package/dist/lang/hr.umd.prod.js +1 -1
- package/dist/lang/hu.umd.prod.js +1 -1
- package/dist/lang/id.umd.prod.js +1 -1
- package/dist/lang/is.umd.prod.js +1 -1
- package/dist/lang/it.umd.prod.js +1 -1
- package/dist/lang/ja.umd.prod.js +1 -1
- package/dist/lang/km.umd.prod.js +1 -1
- package/dist/lang/ko-KR.umd.prod.js +1 -1
- package/dist/lang/kur-CKB.umd.prod.js +1 -1
- package/dist/lang/lt.umd.prod.js +1 -1
- package/dist/lang/lu.umd.prod.js +1 -1
- package/dist/lang/lv.umd.prod.js +1 -1
- package/dist/lang/ml.umd.prod.js +1 -1
- package/dist/lang/ms.umd.prod.js +1 -1
- package/dist/lang/my.umd.prod.js +1 -1
- package/dist/lang/nb-NO.umd.prod.js +1 -1
- package/dist/lang/nl.umd.prod.js +1 -1
- package/dist/lang/pl.umd.prod.js +1 -1
- package/dist/lang/pt-BR.umd.prod.js +1 -1
- package/dist/lang/pt.umd.prod.js +1 -1
- package/dist/lang/ro.umd.prod.js +1 -1
- package/dist/lang/ru.umd.prod.js +1 -1
- package/dist/lang/sk.umd.prod.js +1 -1
- package/dist/lang/sl.umd.prod.js +1 -1
- package/dist/lang/sr-CYR.umd.prod.js +1 -1
- package/dist/lang/sr.umd.prod.js +1 -1
- package/dist/lang/sv.umd.prod.js +1 -1
- package/dist/lang/ta.umd.prod.js +1 -1
- package/dist/lang/th.umd.prod.js +1 -1
- package/dist/lang/tr.umd.prod.js +1 -1
- package/dist/lang/ug.umd.prod.js +1 -1
- package/dist/lang/uk.umd.prod.js +1 -1
- package/dist/lang/vi.umd.prod.js +1 -1
- package/dist/lang/zh-CN.umd.prod.js +1 -1
- package/dist/lang/zh-TW.umd.prod.js +1 -1
- package/dist/quasar.cjs.prod.js +2 -2
- package/dist/quasar.css +3 -1
- package/dist/quasar.esm.prod.js +2 -2
- package/dist/quasar.prod.css +1 -1
- package/dist/quasar.rtl.css +3 -1
- package/dist/quasar.rtl.prod.css +1 -1
- package/dist/quasar.sass +4 -1
- package/dist/quasar.umd.js +39 -26
- package/dist/quasar.umd.prod.js +2 -2
- package/dist/ssr-directives/Morph.js +1 -1
- package/dist/types/api/qfile.d.ts +8 -0
- package/dist/types/api/qselect.d.ts +4 -0
- package/dist/types/api/qtable.d.ts +12 -0
- package/dist/types/api/qtree.d.ts +31 -0
- package/dist/types/api/quploader.d.ts +28 -0
- package/dist/types/api/touchswipe.d.ts +11 -0
- package/dist/types/api.d.ts +6 -0
- package/dist/types/index.d.ts +286 -311
- package/dist/types/ts-helpers.d.ts +6 -2
- package/dist/types/utils.d.ts +4 -1
- package/dist/vetur/quasar-attributes.json +4 -0
- package/dist/vetur/quasar-tags.json +1 -0
- package/dist/web-types/web-types.json +11 -1
- package/package.json +1 -1
- package/src/components/date/QDate.js +6 -1
- package/src/components/dialog-plugin/DialogPlugin.js +1 -1
- package/src/components/select/QSelect.js +20 -19
- package/src/components/select/QSelect.sass +3 -0
- package/src/components/tree/QTree.js +6 -1
- package/src/components/tree/QTree.json +8 -0
- package/src/components/uploader/uploader-core.js +2 -0
- package/src/components/uploader/xhr-uploader-plugin.json +2 -1
- package/src/composables/private/use-file.json +1 -0
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { ComponentOptions, ComponentPublicInstance, ComputedOptions, MethodOptions, VNodeProps, AllowedComponentProps, ComponentCustomProps } from 'vue';
|
|
2
2
|
|
|
3
|
-
export type LooseDictionary = { [index in string]: any };
|
|
4
|
-
|
|
5
3
|
export type StringDictionary<T extends string> = Required<
|
|
6
4
|
{ [index in T]: string }
|
|
7
5
|
>;
|
|
8
6
|
|
|
7
|
+
// Needed to prevent TS to collapse `'value1' | 'value2' | string` to `string`, which breaks first parameter autocomplete
|
|
8
|
+
// See: https://github.com/microsoft/TypeScript/issues/29729#issuecomment-832522611
|
|
9
|
+
export type LiteralUnion<T extends U, U = string> =
|
|
10
|
+
| T
|
|
11
|
+
| (U & Record<never, never>);
|
|
12
|
+
|
|
9
13
|
// See: https://stackoverflow.com/a/49936686/7931540
|
|
10
14
|
export type DeepPartial<T> = {
|
|
11
15
|
[P in keyof T]?: T[P] extends Array<infer U>
|
package/dist/types/utils.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
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
|
+
import { QUploader } from "quasar";
|
|
1
4
|
import {
|
|
2
5
|
ComponentOptionsMixin,
|
|
3
6
|
ComponentPropsOptions,
|
|
@@ -135,4 +138,4 @@ export function createUploaderComponent<
|
|
|
135
138
|
Emits extends EmitsOptions = []
|
|
136
139
|
>(
|
|
137
140
|
options: CreateUploaderComponentOptions<Props, Emits>
|
|
138
|
-
): DefineComponent<Props, {}, {}, {}, {}, {}, {},
|
|
141
|
+
): QUploader & DefineComponent<Props, {}, {}, {}, {}, {}, {}, Emits>;
|
|
@@ -5559,6 +5559,10 @@
|
|
|
5559
5559
|
"type": "any",
|
|
5560
5560
|
"description": "Key of node currently selected"
|
|
5561
5561
|
},
|
|
5562
|
+
"q-tree/no-selection-unset": {
|
|
5563
|
+
"type": "boolean",
|
|
5564
|
+
"description": "Do not allow un-selection when clicking currently selected node"
|
|
5565
|
+
},
|
|
5562
5566
|
"q-tree/default-expand-all": {
|
|
5563
5567
|
"type": "boolean",
|
|
5564
5568
|
"description": "Allow the tree to have all its branches expanded, when first rendered"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "",
|
|
3
3
|
"framework": "vue",
|
|
4
4
|
"name": "quasar",
|
|
5
|
-
"version": "2.4.
|
|
5
|
+
"version": "2.4.10",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"types-syntax": "typescript",
|
|
@@ -17964,6 +17964,16 @@
|
|
|
17964
17964
|
"description": "Key of node currently selected\n\nExamples:\nv-model:selected=\"selectedKey\"",
|
|
17965
17965
|
"doc-url": "https://v2.quasar.dev/vue-components/tree"
|
|
17966
17966
|
},
|
|
17967
|
+
{
|
|
17968
|
+
"name": "no-selection-unset",
|
|
17969
|
+
"value": {
|
|
17970
|
+
"kind": "expression",
|
|
17971
|
+
"type": "boolean"
|
|
17972
|
+
},
|
|
17973
|
+
"description": "Do not allow un-selection when clicking currently selected node",
|
|
17974
|
+
"doc-url": "https://v2.quasar.dev/vue-components/tree",
|
|
17975
|
+
"type": "boolean"
|
|
17976
|
+
},
|
|
17967
17977
|
{
|
|
17968
17978
|
"name": "default-expand-all",
|
|
17969
17979
|
"value": {
|
package/package.json
CHANGED
|
@@ -153,7 +153,12 @@ export default createComponent({
|
|
|
153
153
|
normalizedModel.value
|
|
154
154
|
.filter(date => typeof date === 'string')
|
|
155
155
|
.map(date => decodeString(date, innerMask.value, innerLocale.value))
|
|
156
|
-
.filter(date =>
|
|
156
|
+
.filter(date =>
|
|
157
|
+
date.dateHash !== null
|
|
158
|
+
&& date.day !== null
|
|
159
|
+
&& date.month !== null
|
|
160
|
+
&& date.year !== null
|
|
161
|
+
)
|
|
157
162
|
)
|
|
158
163
|
|
|
159
164
|
const rangeModel = computed(() => {
|
|
@@ -144,8 +144,8 @@ export default createComponent({
|
|
|
144
144
|
color: vmColor.value,
|
|
145
145
|
label: okLabel.value,
|
|
146
146
|
ripple: false,
|
|
147
|
-
...(Object(props.ok) === props.ok ? props.ok : { flat: true }),
|
|
148
147
|
disable: okDisabled.value,
|
|
148
|
+
...(Object(props.ok) === props.ok ? props.ok : { flat: true }),
|
|
149
149
|
'data-autofocus': (props.focus === 'ok' && hasForm.value !== true) || void 0,
|
|
150
150
|
onClick: onOk
|
|
151
151
|
}))
|
|
@@ -644,34 +644,34 @@ export default createComponent({
|
|
|
644
644
|
|
|
645
645
|
if (typeof value === 'string' && value.length > 0) {
|
|
646
646
|
const needle = value.toLocaleLowerCase()
|
|
647
|
+
const findFn = extractFn => {
|
|
648
|
+
const option = props.options.find(opt => extractFn.value(opt).toLocaleLowerCase() === needle)
|
|
647
649
|
|
|
648
|
-
|
|
649
|
-
|
|
650
|
+
if (option === void 0) {
|
|
651
|
+
return false
|
|
652
|
+
}
|
|
650
653
|
|
|
651
|
-
if (option !== void 0) {
|
|
652
654
|
if (innerValue.value.indexOf(option) === -1) {
|
|
653
655
|
toggleOption(option)
|
|
654
656
|
}
|
|
655
657
|
else {
|
|
656
658
|
hidePopup()
|
|
657
659
|
}
|
|
658
|
-
}
|
|
659
|
-
else {
|
|
660
|
-
fn = opt => getOptionLabel.value(opt).toLocaleLowerCase() === needle
|
|
661
|
-
option = props.options.find(fn)
|
|
662
660
|
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
hidePopup()
|
|
669
|
-
}
|
|
661
|
+
return true
|
|
662
|
+
}
|
|
663
|
+
const fillFn = afterFilter => {
|
|
664
|
+
if (findFn(getOptionValue) === true) {
|
|
665
|
+
return
|
|
670
666
|
}
|
|
671
|
-
|
|
672
|
-
|
|
667
|
+
if (findFn(getOptionLabel) === true || afterFilter === true) {
|
|
668
|
+
return
|
|
673
669
|
}
|
|
670
|
+
|
|
671
|
+
filter(value, true, () => fillFn(true))
|
|
674
672
|
}
|
|
673
|
+
|
|
674
|
+
fillFn()
|
|
675
675
|
}
|
|
676
676
|
else {
|
|
677
677
|
state.clearValue(e)
|
|
@@ -1050,7 +1050,7 @@ export default createComponent({
|
|
|
1050
1050
|
}
|
|
1051
1051
|
}
|
|
1052
1052
|
|
|
1053
|
-
function filter (val, keepClosed) {
|
|
1053
|
+
function filter (val, keepClosed, afterUpdateFn) {
|
|
1054
1054
|
if (props.onFilter === void 0 || (keepClosed !== true && state.focused.value !== true)) {
|
|
1055
1055
|
return
|
|
1056
1056
|
}
|
|
@@ -1108,6 +1108,7 @@ export default createComponent({
|
|
|
1108
1108
|
}
|
|
1109
1109
|
|
|
1110
1110
|
typeof afterFn === 'function' && nextTick(() => { afterFn(proxy) })
|
|
1111
|
+
typeof afterUpdateFn === 'function' && nextTick(() => { afterUpdateFn(proxy) })
|
|
1111
1112
|
})
|
|
1112
1113
|
}
|
|
1113
1114
|
},
|
|
@@ -1462,7 +1463,7 @@ export default createComponent({
|
|
|
1462
1463
|
h('div', {
|
|
1463
1464
|
ref: targetRef,
|
|
1464
1465
|
key: 'd_t',
|
|
1465
|
-
class: '
|
|
1466
|
+
class: 'q-select__focus-target',
|
|
1466
1467
|
id: state.targetUid.value,
|
|
1467
1468
|
...comboboxAttrs.value,
|
|
1468
1469
|
onKeydown: onTargetKeydown,
|
|
@@ -1474,7 +1475,7 @@ export default createComponent({
|
|
|
1474
1475
|
if (typeof props.autocomplete === 'string' && props.autocomplete.length > 0) {
|
|
1475
1476
|
child.push(
|
|
1476
1477
|
h('input', {
|
|
1477
|
-
class: 'q-select__autocomplete-input
|
|
1478
|
+
class: 'q-select__autocomplete-input',
|
|
1478
1479
|
autocomplete: props.autocomplete,
|
|
1479
1480
|
onKeyup: onTargetAutocomplete
|
|
1480
1481
|
})
|
|
@@ -58,6 +58,8 @@ export default createComponent({
|
|
|
58
58
|
expanded: Array, // v-model:expanded
|
|
59
59
|
selected: {}, // v-model:selected
|
|
60
60
|
|
|
61
|
+
noSelectionUnset: Boolean,
|
|
62
|
+
|
|
61
63
|
defaultExpandAll: Boolean,
|
|
62
64
|
accordion: Boolean,
|
|
63
65
|
|
|
@@ -615,7 +617,10 @@ export default createComponent({
|
|
|
615
617
|
|
|
616
618
|
if (hasSelection.value) {
|
|
617
619
|
if (meta.selectable) {
|
|
618
|
-
|
|
620
|
+
const val = meta.key !== props.selected ? meta.key : null
|
|
621
|
+
if (props.noSelectionUnset !== true || val !== null) {
|
|
622
|
+
emit('update:selected', val)
|
|
623
|
+
}
|
|
619
624
|
}
|
|
620
625
|
}
|
|
621
626
|
else {
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
"props": {
|
|
7
7
|
"nodes": {
|
|
8
8
|
"type": "Array",
|
|
9
|
+
"tsType": "QTreeNode",
|
|
9
10
|
"desc": "The array of nodes that designates the tree structure",
|
|
10
11
|
"required": true,
|
|
11
12
|
"examples": [ "[ {...}, {...} ]" ],
|
|
@@ -106,6 +107,13 @@
|
|
|
106
107
|
"category": "state"
|
|
107
108
|
},
|
|
108
109
|
|
|
110
|
+
"no-selection-unset": {
|
|
111
|
+
"type": "Boolean",
|
|
112
|
+
"desc": "Do not allow un-selection when clicking currently selected node",
|
|
113
|
+
"category": "behavior",
|
|
114
|
+
"addedIn": "v2.4.10"
|
|
115
|
+
},
|
|
116
|
+
|
|
109
117
|
"default-expand-all": {
|
|
110
118
|
"type": "Boolean",
|
|
111
119
|
"desc": "Allow the tree to have all its branches expanded, when first rendered",
|
|
@@ -436,6 +436,8 @@ export function getRenderer (getPlugin) {
|
|
|
436
436
|
abort: state.abort
|
|
437
437
|
}
|
|
438
438
|
|
|
439
|
+
// TODO: the result of this computed, especially the dynamic part, isn't currently typed
|
|
440
|
+
// This result in an error with Volar when accessing the state (eg. files array)
|
|
439
441
|
const slotScope = computed(() => {
|
|
440
442
|
const acc = {
|
|
441
443
|
canAddFiles: canAddFiles.value,
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"props": {
|
|
3
3
|
"factory": {
|
|
4
4
|
"type": "Function",
|
|
5
|
+
"tsType": "QUploaderFactoryFn",
|
|
5
6
|
"desc": "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",
|
|
6
7
|
"params": {
|
|
7
8
|
"files": {
|
|
@@ -112,7 +113,7 @@
|
|
|
112
113
|
},
|
|
113
114
|
"returns": {
|
|
114
115
|
"type": "String",
|
|
115
|
-
"desc": "An array
|
|
116
|
+
"desc": "An array consisting of objects with header definitions",
|
|
116
117
|
"__exemption": [ "examples" ]
|
|
117
118
|
},
|
|
118
119
|
"category": "upload"
|