quasar 2.5.3 → 2.6.0
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/README.md +1 -1
- package/dist/api/BottomSheet.json +1 -1
- package/dist/api/Dialog.json +9 -2
- package/dist/api/Notify.json +205 -5
- package/dist/api/QAvatar.json +1 -1
- package/dist/api/QBreadcrumbsEl.json +1 -1
- package/dist/api/QBtn.json +4 -4
- package/dist/api/QBtnDropdown.json +17 -17
- package/dist/api/QCarousel.json +4 -4
- package/dist/api/QCheckbox.json +1 -1
- package/dist/api/QChip.json +5 -5
- package/dist/api/QDialog.json +13 -13
- package/dist/api/QDrawer.json +16 -16
- package/dist/api/QExpansionItem.json +15 -15
- package/dist/api/QFab.json +15 -15
- package/dist/api/QFabAction.json +3 -3
- package/dist/api/QField.json +2 -2
- package/dist/api/QFile.json +1 -1
- package/dist/api/QForm.json +12 -3
- package/dist/api/QIcon.json +4 -2
- package/dist/api/QInput.json +2 -2
- package/dist/api/QKnob.json +23 -0
- package/dist/api/QMenu.json +13 -13
- package/dist/api/QPagination.json +4 -4
- package/dist/api/QPopupEdit.json +6 -6
- package/dist/api/QPopupProxy.json +13 -13
- package/dist/api/QRadio.json +1 -1
- package/dist/api/QRange.json +1 -1
- package/dist/api/QRouteTab.json +2 -2
- package/dist/api/QSelect.json +18 -5
- package/dist/api/QSlider.json +1 -1
- package/dist/api/QStep.json +4 -4
- package/dist/api/QStepper.json +4 -4
- package/dist/api/QTab.json +1 -1
- package/dist/api/QTable.json +6 -6
- package/dist/api/QTimelineEntry.json +1 -1
- package/dist/api/QToggle.json +2 -2
- package/dist/api/QTooltip.json +13 -13
- package/dist/api/QTree.json +1 -1
- package/dist/api/QUploader.json +1 -1
- package/dist/api/TouchHold.json +1 -1
- package/dist/api/TouchPan.json +1 -1
- package/dist/api/TouchRepeat.json +1 -1
- package/dist/api/TouchSwipe.json +1 -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/fontawesome-v6-pro.umd.prod.js +6 -0
- package/dist/icon-set/fontawesome-v6.umd.prod.js +6 -0
- 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 +2 -2
- package/dist/icon-set/svg-eva-icons.umd.prod.js +2 -2
- package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +2 -2
- package/dist/icon-set/svg-fontawesome-v6.umd.prod.js +6 -0
- 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 +2 -2
- 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 +2 -2
- package/dist/icon-set/svg-themify.umd.prod.js +2 -2
- 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/eu.umd.prod.js +6 -0
- 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/kz.umd.prod.js +6 -0
- 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 +2 -2
- 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 +4 -6
- package/dist/quasar.esm.prod.js +2 -2
- package/dist/quasar.prod.css +1 -1
- package/dist/quasar.rtl.css +4 -6
- package/dist/quasar.rtl.prod.css +1 -1
- package/dist/quasar.sass +3 -1
- package/dist/quasar.umd.js +560 -505
- package/dist/quasar.umd.prod.js +2 -2
- package/dist/types/extras/icon-set.d.ts +3 -0
- package/dist/types/globals.d.ts +2 -2
- package/dist/types/index.d.ts +254 -136
- package/dist/vetur/quasar-attributes.json +50 -38
- package/dist/vetur/quasar-tags.json +3 -0
- package/dist/web-types/web-types.json +129 -93
- package/icon-set/fontawesome-v6-pro.js +128 -0
- package/icon-set/fontawesome-v6.js +128 -0
- package/icon-set/svg-fontawesome-v6.js +198 -0
- package/lang/eu.js +91 -0
- package/lang/index.json +8 -0
- package/lang/kz.js +95 -0
- package/lang/ug.js +49 -50
- package/package.json +1 -1
- package/src/api-file-example.json +2 -2
- package/src/api.extends.json +22 -33
- package/src/components/btn/QBtn.js +16 -14
- package/src/components/btn/QBtn.json +3 -6
- package/src/components/btn/use-btn.js +7 -7
- package/src/components/carousel/QCarousel.json +2 -4
- package/src/components/checkbox/use-checkbox.json +2 -4
- package/src/components/chip/QChip.json +1 -3
- package/src/components/date/QDate.js +20 -19
- package/src/components/date/use-datetime.js +3 -1
- package/src/components/dialog/QDialog.js +11 -11
- package/src/components/dialog-bottom-sheet/BottomSheet.js +11 -11
- package/src/components/dialog-plugin/DialogPlugin.js +9 -8
- package/src/components/editor/QEditor.js +10 -10
- package/src/components/editor/editor-utils.js +2 -2
- package/src/components/fab/QFabAction.json +1 -3
- package/src/components/field/QField.json +2 -6
- package/src/components/file/QFile.js +2 -1
- package/src/components/form/QForm.json +10 -7
- package/src/components/icon/QIcon.js +6 -2
- package/src/components/icon/QIcon.json +1 -3
- package/src/components/infinite-scroll/QInfiniteScroll.js +3 -1
- package/src/components/inner-loading/QInnerLoading.js +7 -7
- package/src/components/input/QInput.js +4 -1
- package/src/components/input/QInput.json +2 -6
- package/src/components/input/use-mask.js +2 -2
- package/src/components/knob/QKnob.js +51 -42
- package/src/components/knob/QKnob.json +22 -0
- package/src/components/linear-progress/QLinearProgress.sass +1 -0
- package/src/components/menu/QMenu.js +13 -13
- package/src/components/page-scroller/QPageScroller.js +4 -4
- package/src/components/pull-to-refresh/QPullToRefresh.js +5 -5
- package/src/components/radio/QRadio.json +2 -4
- package/src/components/select/QSelect.js +14 -7
- package/src/components/select/QSelect.json +14 -8
- package/src/components/slide-transition/QSlideTransition.js +4 -4
- package/src/components/slider/use-slider.js +4 -4
- package/src/components/slider/use-slider.json +1 -1
- package/src/components/stepper/QStep.js +6 -6
- package/src/components/stepper/QStep.json +3 -0
- package/src/components/stepper/QStepper.json +3 -0
- package/src/components/stepper/QStepper.sass +1 -0
- package/src/components/stepper/StepHeader.js +23 -8
- package/src/components/table/QTable.json +5 -13
- package/src/components/table/table-column-selection.js +6 -6
- package/src/components/table/table-sort.js +2 -2
- package/src/components/tabs/QRouteTab.json +2 -3
- package/src/components/tabs/QTabs.js +4 -4
- package/src/components/tabs/use-tab.js +11 -8
- package/src/components/time/QTime.js +5 -5
- package/src/components/tooltip/QTooltip.js +12 -12
- package/src/components/uploader/uploader-core.js +11 -10
- package/src/components/virtual-scroll/QVirtualScroll.js +3 -3
- package/src/components/virtual-scroll/use-virtual-scroll.js +20 -20
- package/src/composables/private/use-field.js +25 -17
- package/src/composables/private/use-file-dom-props.js +5 -5
- package/src/composables/private/use-file.js +15 -12
- package/src/composables/private/use-file.json +1 -3
- package/src/composables/private/use-router-link.js +3 -3
- package/src/directives/Morph.js +12 -3
- package/src/directives/TouchHold.json +2 -3
- package/src/directives/TouchPan.json +2 -3
- package/src/directives/TouchRepeat.json +2 -3
- package/src/directives/TouchSwipe.json +2 -3
- package/src/install-quasar.js +37 -36
- package/src/plugins/AddressbarColor.js +7 -7
- package/src/plugins/Cookies.js +5 -1
- package/src/plugins/Dialog.json +3 -2
- package/src/plugins/Loading.js +3 -2
- package/src/plugins/LoadingBar.js +12 -5
- package/src/plugins/Notify.js +11 -4
- package/src/plugins/Notify.json +102 -2
- package/src/utils/create-meta-mixin.js +4 -4
- package/src/utils/create-uploader-component.js +2 -1
- package/src/utils/event.js +3 -3
- package/src/utils/extend.js +6 -34
- package/src/utils/morph.js +19 -17
- package/src/utils/private/is.js +3 -14
- package/src/utils/private/noop-ssr-directive-transform.js +1 -1
- package/src/utils/private/web-storage.js +3 -2
- package/wrappers/index.js +33 -5
- package/wrappers/index.mjs +63 -0
- package/dist/ssr-directives/Morph.js +0 -55
- package/dist/ssr-directives/index.js +0 -14
- package/src/directives/Morph.ssr.js +0 -45
|
@@ -17,6 +17,7 @@ import { createComponent } from '../../utils/private/create.js'
|
|
|
17
17
|
import useDark, { useDarkProps } from '../../composables/private/use-dark.js'
|
|
18
18
|
|
|
19
19
|
import { isKeyCode } from '../../utils/private/key-composition.js'
|
|
20
|
+
import { isObject } from '../../utils/private/is.js'
|
|
20
21
|
|
|
21
22
|
export default createComponent({
|
|
22
23
|
name: 'DialogPlugin',
|
|
@@ -80,7 +81,7 @@ export default createComponent({
|
|
|
80
81
|
props.progress === false
|
|
81
82
|
? null
|
|
82
83
|
: (
|
|
83
|
-
|
|
84
|
+
isObject(props.progress) === true
|
|
84
85
|
? {
|
|
85
86
|
component: props.progress.spinner || QSpinner,
|
|
86
87
|
props: { color: props.progress.color || vmColor.value }
|
|
@@ -109,7 +110,7 @@ export default createComponent({
|
|
|
109
110
|
})
|
|
110
111
|
|
|
111
112
|
const okLabel = computed(() => (
|
|
112
|
-
|
|
113
|
+
isObject(props.ok) === true
|
|
113
114
|
? $q.lang.label.ok
|
|
114
115
|
: (
|
|
115
116
|
props.ok === true
|
|
@@ -119,7 +120,7 @@ export default createComponent({
|
|
|
119
120
|
))
|
|
120
121
|
|
|
121
122
|
const cancelLabel = computed(() => (
|
|
122
|
-
|
|
123
|
+
isObject(props.cancel) === true
|
|
123
124
|
? $q.lang.label.cancel
|
|
124
125
|
: (
|
|
125
126
|
props.cancel === true
|
|
@@ -145,7 +146,7 @@ export default createComponent({
|
|
|
145
146
|
label: okLabel.value,
|
|
146
147
|
ripple: false,
|
|
147
148
|
disable: okDisabled.value,
|
|
148
|
-
...(
|
|
149
|
+
...(isObject(props.ok) === true ? props.ok : { flat: true }),
|
|
149
150
|
'data-autofocus': (props.focus === 'ok' && hasForm.value !== true) || void 0,
|
|
150
151
|
onClick: onOk
|
|
151
152
|
}))
|
|
@@ -154,7 +155,7 @@ export default createComponent({
|
|
|
154
155
|
color: vmColor.value,
|
|
155
156
|
label: cancelLabel.value,
|
|
156
157
|
ripple: false,
|
|
157
|
-
...(
|
|
158
|
+
...(isObject(props.cancel) === true ? props.cancel : { flat: true }),
|
|
158
159
|
'data-autofocus': (props.focus === 'cancel' && hasForm.value !== true) || void 0,
|
|
159
160
|
onClick: onCancel
|
|
160
161
|
}))
|
|
@@ -201,9 +202,9 @@ export default createComponent({
|
|
|
201
202
|
function getSection (classes, text) {
|
|
202
203
|
return props.html === true
|
|
203
204
|
? h(QCardSection, {
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
205
|
+
class: classes,
|
|
206
|
+
innerHTML: text
|
|
207
|
+
})
|
|
207
208
|
: h(QCardSection, { class: classes }, () => text)
|
|
208
209
|
}
|
|
209
210
|
|
|
@@ -180,17 +180,17 @@ export default createComponent({
|
|
|
180
180
|
const userDef = props.definitions || {}
|
|
181
181
|
const def = props.definitions || props.fonts
|
|
182
182
|
? extend(
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
)
|
|
183
|
+
true,
|
|
184
|
+
{},
|
|
185
|
+
buttonDef.value,
|
|
186
|
+
userDef,
|
|
187
|
+
getFonts(
|
|
188
|
+
defaultFont,
|
|
189
|
+
$q.lang.editor.defaultFont,
|
|
190
|
+
$q.iconSet.editor.font,
|
|
191
|
+
props.fonts
|
|
193
192
|
)
|
|
193
|
+
)
|
|
194
194
|
: buttonDef.value
|
|
195
195
|
|
|
196
196
|
return props.toolbar.map(
|
|
@@ -34,8 +34,8 @@ function getBtn (eVm, btn, clickHandler, active = false) {
|
|
|
34
34
|
if (btn.tip && eVm.$q.platform.is.desktop) {
|
|
35
35
|
const Key = btn.key
|
|
36
36
|
? h('div', [
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
h('small', `(CTRL + ${ String.fromCharCode(btn.key) })`)
|
|
38
|
+
])
|
|
39
39
|
: null
|
|
40
40
|
child.push(
|
|
41
41
|
h(QTooltip, { delay: 1000 }, () => [
|
|
@@ -81,9 +81,7 @@
|
|
|
81
81
|
"desc": "Emitted when component gets focused",
|
|
82
82
|
"params": {
|
|
83
83
|
"evt": {
|
|
84
|
-
"
|
|
85
|
-
"desc": "JS event object",
|
|
86
|
-
"__exemption": [ "examples" ]
|
|
84
|
+
"extends": "evt"
|
|
87
85
|
}
|
|
88
86
|
}
|
|
89
87
|
},
|
|
@@ -92,9 +90,7 @@
|
|
|
92
90
|
"desc": "Emitted when component loses focus",
|
|
93
91
|
"params": {
|
|
94
92
|
"evt": {
|
|
95
|
-
"
|
|
96
|
-
"desc": "JS event object",
|
|
97
|
-
"__exemption": [ "examples" ]
|
|
93
|
+
"extends": "evt"
|
|
98
94
|
}
|
|
99
95
|
}
|
|
100
96
|
}
|
|
@@ -58,6 +58,7 @@ export default createComponent({
|
|
|
58
58
|
const {
|
|
59
59
|
pickFiles,
|
|
60
60
|
onDragover,
|
|
61
|
+
onDragleave,
|
|
61
62
|
processFiles,
|
|
62
63
|
getDndNode
|
|
63
64
|
} = useFile({ editable: state.editable, dnd, getFileInput, addFilesToQueue })
|
|
@@ -263,7 +264,7 @@ export default createComponent({
|
|
|
263
264
|
}
|
|
264
265
|
|
|
265
266
|
if (state.editable.value === true) {
|
|
266
|
-
Object.assign(data, { onDragover, onKeydown, onKeyup })
|
|
267
|
+
Object.assign(data, { onDragover, onDragleave, onKeydown, onKeyup })
|
|
267
268
|
}
|
|
268
269
|
|
|
269
270
|
return h('div', data, [ getInput() ].concat(getSelection()))
|
|
@@ -37,7 +37,14 @@
|
|
|
37
37
|
|
|
38
38
|
"events": {
|
|
39
39
|
"submit": {
|
|
40
|
-
"desc": "Emitted when all validations have passed when tethered to a submit button"
|
|
40
|
+
"desc": "Emitted when all validations have passed when tethered to a submit button",
|
|
41
|
+
"params": {
|
|
42
|
+
"evt": {
|
|
43
|
+
"type": [ "Event", "SubmitEvent" ],
|
|
44
|
+
"desc": "Form submission event object",
|
|
45
|
+
"__exemption": [ "examples" ]
|
|
46
|
+
}
|
|
47
|
+
}
|
|
41
48
|
},
|
|
42
49
|
|
|
43
50
|
"reset": {
|
|
@@ -89,9 +96,7 @@
|
|
|
89
96
|
"desc": "Manually trigger form validation and submit",
|
|
90
97
|
"params": {
|
|
91
98
|
"evt": {
|
|
92
|
-
"
|
|
93
|
-
"desc": "JS event object",
|
|
94
|
-
"__exemption": [ "examples" ]
|
|
99
|
+
"extends": "evt"
|
|
95
100
|
}
|
|
96
101
|
}
|
|
97
102
|
},
|
|
@@ -100,9 +105,7 @@
|
|
|
100
105
|
"desc": "Manually trigger form reset",
|
|
101
106
|
"params": {
|
|
102
107
|
"evt": {
|
|
103
|
-
"
|
|
104
|
-
"desc": "JS event object",
|
|
105
|
-
"__exemption": [ "examples" ]
|
|
108
|
+
"extends": "evt"
|
|
106
109
|
}
|
|
107
110
|
}
|
|
108
111
|
},
|
|
@@ -36,6 +36,7 @@ const imgRE = /^img:/
|
|
|
36
36
|
const svgUseRE = /^svguse:/
|
|
37
37
|
const ionRE = /^ion-/
|
|
38
38
|
const faLaRE = /^[lf]a[srlbdk]? /
|
|
39
|
+
const fa6RE = /^fa-(brand|regular|solid)/
|
|
39
40
|
|
|
40
41
|
export default createComponent({
|
|
41
42
|
name: 'QIcon',
|
|
@@ -69,7 +70,7 @@ export default createComponent({
|
|
|
69
70
|
let cls
|
|
70
71
|
let icon = props.name
|
|
71
72
|
|
|
72
|
-
if (!icon) {
|
|
73
|
+
if (icon === 'none' || !icon) {
|
|
73
74
|
return { none: true }
|
|
74
75
|
}
|
|
75
76
|
|
|
@@ -78,6 +79,9 @@ export default createComponent({
|
|
|
78
79
|
if (res !== void 0) {
|
|
79
80
|
if (res.icon !== void 0) {
|
|
80
81
|
icon = res.icon
|
|
82
|
+
if (icon === 'none' || !icon) {
|
|
83
|
+
return { none: true }
|
|
84
|
+
}
|
|
81
85
|
}
|
|
82
86
|
else {
|
|
83
87
|
return {
|
|
@@ -126,7 +130,7 @@ export default createComponent({
|
|
|
126
130
|
if (matches !== null) {
|
|
127
131
|
cls = libMap[ matches[ 1 ] ](icon)
|
|
128
132
|
}
|
|
129
|
-
else if (faLaRE.test(icon) === true) {
|
|
133
|
+
else if (faLaRE.test(icon) === true || fa6RE.test(icon) === true) {
|
|
130
134
|
cls = icon
|
|
131
135
|
}
|
|
132
136
|
else if (ionRE.test(icon) === true) {
|
|
@@ -120,7 +120,9 @@ export default createComponent({
|
|
|
120
120
|
isWorking.value = false
|
|
121
121
|
isFetching.value = false
|
|
122
122
|
localScrollTarget.removeEventListener('scroll', poll, passive)
|
|
123
|
-
poll !== void 0 && poll.cancel
|
|
123
|
+
if (poll !== void 0 && poll.cancel !== void 0) {
|
|
124
|
+
poll.cancel()
|
|
125
|
+
}
|
|
124
126
|
}
|
|
125
127
|
}
|
|
126
128
|
|
|
@@ -39,7 +39,7 @@ export default createComponent({
|
|
|
39
39
|
|
|
40
40
|
const labelClass = computed(() =>
|
|
41
41
|
'q-inner-loading__label'
|
|
42
|
-
+ (props.labelClass !== void 0 ? ` ${ props.labelClass}` : '')
|
|
42
|
+
+ (props.labelClass !== void 0 ? ` ${ props.labelClass }` : '')
|
|
43
43
|
)
|
|
44
44
|
|
|
45
45
|
function getInner () {
|
|
@@ -65,12 +65,12 @@ export default createComponent({
|
|
|
65
65
|
function getContent () {
|
|
66
66
|
return props.showing === true
|
|
67
67
|
? h(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
68
|
+
'div',
|
|
69
|
+
{ class: classes.value, style: transitionStyle.value },
|
|
70
|
+
slots.default !== void 0
|
|
71
|
+
? slots.default()
|
|
72
|
+
: getInner()
|
|
73
|
+
)
|
|
74
74
|
: null
|
|
75
75
|
}
|
|
76
76
|
|
|
@@ -89,9 +89,7 @@
|
|
|
89
89
|
"desc": "Emitted when component gets focused",
|
|
90
90
|
"params": {
|
|
91
91
|
"evt": {
|
|
92
|
-
"
|
|
93
|
-
"desc": "JS event object",
|
|
94
|
-
"__exemption": [ "examples" ]
|
|
92
|
+
"extends": "evt"
|
|
95
93
|
}
|
|
96
94
|
}
|
|
97
95
|
},
|
|
@@ -100,9 +98,7 @@
|
|
|
100
98
|
"desc": "Emitted when component loses focus",
|
|
101
99
|
"params": {
|
|
102
100
|
"evt": {
|
|
103
|
-
"
|
|
104
|
-
"desc": "JS event object",
|
|
105
|
-
"__exemption": [ "examples" ]
|
|
101
|
+
"extends": "evt"
|
|
106
102
|
}
|
|
107
103
|
}
|
|
108
104
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref,
|
|
1
|
+
import { ref, watch, nextTick } from 'vue'
|
|
2
2
|
|
|
3
3
|
import { shouldIgnoreKey } from '../../utils/private/key-composition.js'
|
|
4
4
|
|
|
@@ -297,7 +297,7 @@ export default function (props, emit, emitValue, inputRef) {
|
|
|
297
297
|
? unmaskValue(masked)
|
|
298
298
|
: masked
|
|
299
299
|
|
|
300
|
-
props.modelValue !== val && emitValue(val, true)
|
|
300
|
+
String(props.modelValue) !== val && emitValue(val, true)
|
|
301
301
|
}
|
|
302
302
|
|
|
303
303
|
function moveCursorForPaste (inp, start, end) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, ref, computed, watch,
|
|
1
|
+
import { h, ref, computed, watch, getCurrentInstance } from 'vue'
|
|
2
2
|
|
|
3
3
|
import QCircularProgress from '../circular-progress/QCircularProgress.js'
|
|
4
4
|
import TouchPan from '../../directives/TouchPan.js'
|
|
@@ -6,6 +6,7 @@ import TouchPan from '../../directives/TouchPan.js'
|
|
|
6
6
|
import { createComponent } from '../../utils/private/create.js'
|
|
7
7
|
import { position, stopAndPrevent } from '../../utils/event.js'
|
|
8
8
|
import { between, normalizeToInterval } from '../../utils/format.js'
|
|
9
|
+
import { hDir } from '../../utils/private/render.js'
|
|
9
10
|
|
|
10
11
|
import { useFormProps, useFormAttrs } from '../../composables/private/use-form.js'
|
|
11
12
|
import { useCircularCommonProps } from '../circular-progress/use-circular-progress.js'
|
|
@@ -26,6 +27,9 @@ export default createComponent({
|
|
|
26
27
|
required: true
|
|
27
28
|
},
|
|
28
29
|
|
|
30
|
+
innerMin: Number,
|
|
31
|
+
innerMax: Number,
|
|
32
|
+
|
|
29
33
|
step: {
|
|
30
34
|
type: Number,
|
|
31
35
|
default: 1,
|
|
@@ -50,27 +54,33 @@ export default createComponent({
|
|
|
50
54
|
const model = ref(props.modelValue)
|
|
51
55
|
const dragging = ref(false)
|
|
52
56
|
|
|
53
|
-
|
|
57
|
+
const innerMin = computed(() => (
|
|
58
|
+
isNaN(props.innerMin) === true || props.innerMin < props.min
|
|
59
|
+
? props.min
|
|
60
|
+
: props.innerMin
|
|
61
|
+
))
|
|
62
|
+
const innerMax = computed(() => (
|
|
63
|
+
isNaN(props.innerMax) === true || props.innerMax > props.max
|
|
64
|
+
? props.max
|
|
65
|
+
: props.innerMax
|
|
66
|
+
))
|
|
54
67
|
|
|
55
|
-
|
|
56
|
-
if (val < props.min) {
|
|
57
|
-
model.value = props.min
|
|
58
|
-
}
|
|
59
|
-
else if (val > props.max) {
|
|
60
|
-
model.value = props.max
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
if (val !== model.value) {
|
|
64
|
-
model.value = val
|
|
65
|
-
}
|
|
66
|
-
return
|
|
67
|
-
}
|
|
68
|
+
let centerPosition
|
|
68
69
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
function normalizeModel () {
|
|
71
|
+
model.value = props.modelValue === null
|
|
72
|
+
? innerMin.value
|
|
73
|
+
: between(props.modelValue, innerMin.value, innerMax.value)
|
|
74
|
+
|
|
75
|
+
updateValue(true)
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
watch(
|
|
79
|
+
() => `${ props.modelValue }|${ innerMin.value }|${ innerMax.value }`,
|
|
80
|
+
normalizeModel
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
normalizeModel()
|
|
74
84
|
|
|
75
85
|
const editable = computed(() => props.disable === false && props.readonly === false)
|
|
76
86
|
|
|
@@ -138,7 +148,7 @@ export default createComponent({
|
|
|
138
148
|
})
|
|
139
149
|
|
|
140
150
|
function updateCenterPosition () {
|
|
141
|
-
const { top, left, width, height } =
|
|
151
|
+
const { top, left, width, height } = proxy.$el.getBoundingClientRect()
|
|
142
152
|
centerPosition = {
|
|
143
153
|
top: top + height / 2,
|
|
144
154
|
left: left + width / 2
|
|
@@ -168,8 +178,8 @@ export default createComponent({
|
|
|
168
178
|
|
|
169
179
|
model.value = between(
|
|
170
180
|
parseFloat((model.value + offset).toFixed(decimals.value)),
|
|
171
|
-
|
|
172
|
-
|
|
181
|
+
innerMin.value,
|
|
182
|
+
innerMax.value
|
|
173
183
|
)
|
|
174
184
|
|
|
175
185
|
updateValue()
|
|
@@ -193,11 +203,14 @@ export default createComponent({
|
|
|
193
203
|
angle = centerPosition.left < pos.left ? angle + 90 : 270 - angle
|
|
194
204
|
}
|
|
195
205
|
|
|
196
|
-
if (
|
|
206
|
+
if ($q.lang.rtl === true) {
|
|
207
|
+
angle = normalizeToInterval(-angle - props.angle, 0, 360)
|
|
208
|
+
}
|
|
209
|
+
else if (props.angle) {
|
|
197
210
|
angle = normalizeToInterval(angle - props.angle, 0, 360)
|
|
198
211
|
}
|
|
199
212
|
|
|
200
|
-
if (
|
|
213
|
+
if (props.reverse === true) {
|
|
201
214
|
angle = 360 - angle
|
|
202
215
|
}
|
|
203
216
|
|
|
@@ -212,7 +225,7 @@ export default createComponent({
|
|
|
212
225
|
newModel = parseFloat(newModel.toFixed(decimals.value))
|
|
213
226
|
}
|
|
214
227
|
|
|
215
|
-
newModel = between(newModel,
|
|
228
|
+
newModel = between(newModel, innerMin.value, innerMax.value)
|
|
216
229
|
|
|
217
230
|
emit('drag-value', newModel)
|
|
218
231
|
|
|
@@ -240,16 +253,12 @@ export default createComponent({
|
|
|
240
253
|
return h('input', formAttrs.value)
|
|
241
254
|
}
|
|
242
255
|
|
|
243
|
-
onMounted(() => {
|
|
244
|
-
$el = proxy.$el
|
|
245
|
-
})
|
|
246
|
-
|
|
247
256
|
return () => {
|
|
248
257
|
const data = {
|
|
249
258
|
class: classes.value,
|
|
250
259
|
role: 'slider',
|
|
251
|
-
'aria-valuemin':
|
|
252
|
-
'aria-valuemax':
|
|
260
|
+
'aria-valuemin': innerMin.value,
|
|
261
|
+
'aria-valuemax': innerMax.value,
|
|
253
262
|
'aria-valuenow': props.modelValue,
|
|
254
263
|
...attrs.value,
|
|
255
264
|
...circularProps.value,
|
|
@@ -262,18 +271,18 @@ export default createComponent({
|
|
|
262
271
|
default: slots.default
|
|
263
272
|
}
|
|
264
273
|
|
|
265
|
-
if (editable.value === true) {
|
|
266
|
-
|
|
267
|
-
child.internal = getNameInput
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
return withDirectives(
|
|
271
|
-
h(QCircularProgress, data, child),
|
|
272
|
-
directives.value
|
|
273
|
-
)
|
|
274
|
+
if (editable.value === true && props.name !== void 0) {
|
|
275
|
+
child.internal = getNameInput
|
|
274
276
|
}
|
|
275
277
|
|
|
276
|
-
return
|
|
278
|
+
return hDir(
|
|
279
|
+
QCircularProgress,
|
|
280
|
+
data,
|
|
281
|
+
child,
|
|
282
|
+
'knob',
|
|
283
|
+
editable.value,
|
|
284
|
+
() => directives.value
|
|
285
|
+
)
|
|
277
286
|
}
|
|
278
287
|
}
|
|
279
288
|
})
|
|
@@ -27,6 +27,22 @@
|
|
|
27
27
|
"category": "model"
|
|
28
28
|
},
|
|
29
29
|
|
|
30
|
+
"inner-min": {
|
|
31
|
+
"type": "Number",
|
|
32
|
+
"desc": "Inner minimum 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 higher or equal to 'min' prop; Defaults to 'min' prop",
|
|
33
|
+
"examples": [ ":inner-min=\"0\"" ],
|
|
34
|
+
"category": "model",
|
|
35
|
+
"addedIn": "v2.5.4"
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
"inner-max": {
|
|
39
|
+
"type": "Number",
|
|
40
|
+
"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",
|
|
41
|
+
"examples": [ ":inner-max=\"100\"" ],
|
|
42
|
+
"category": "model",
|
|
43
|
+
"addedIn": "v2.5.4"
|
|
44
|
+
},
|
|
45
|
+
|
|
30
46
|
"step": {
|
|
31
47
|
"type": "Number",
|
|
32
48
|
"default": "1",
|
|
@@ -35,6 +51,12 @@
|
|
|
35
51
|
"category": "model"
|
|
36
52
|
},
|
|
37
53
|
|
|
54
|
+
"reverse": {
|
|
55
|
+
"type": "Boolean",
|
|
56
|
+
"desc": "Reverses the direction of progress",
|
|
57
|
+
"category": "behavior"
|
|
58
|
+
},
|
|
59
|
+
|
|
38
60
|
"instant-feedback": {
|
|
39
61
|
"type": "Boolean",
|
|
40
62
|
"desc": "No animation when model changes",
|
|
@@ -349,19 +349,19 @@ export default createComponent({
|
|
|
349
349
|
() => (
|
|
350
350
|
showing.value === true
|
|
351
351
|
? h('div', {
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
352
|
+
...attrs,
|
|
353
|
+
ref: innerRef,
|
|
354
|
+
tabindex: -1,
|
|
355
|
+
class: [
|
|
356
|
+
'q-menu q-position-engine scroll' + menuClass.value,
|
|
357
|
+
attrs.class
|
|
358
|
+
],
|
|
359
|
+
style: [
|
|
360
|
+
attrs.style,
|
|
361
|
+
transitionStyle.value
|
|
362
|
+
],
|
|
363
|
+
...onEvents.value
|
|
364
|
+
}, hSlot(slots.default))
|
|
365
365
|
: null
|
|
366
366
|
)
|
|
367
367
|
)
|
|
@@ -98,10 +98,10 @@ export default createComponent({
|
|
|
98
98
|
function getContent () {
|
|
99
99
|
return showing.value === true
|
|
100
100
|
? h('div', {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
101
|
+
ref: rootRef,
|
|
102
|
+
class: 'q-page-scroller',
|
|
103
|
+
onClick
|
|
104
|
+
}, getStickyContent(slots))
|
|
105
105
|
: null
|
|
106
106
|
}
|
|
107
107
|
|
|
@@ -76,7 +76,7 @@ export default createComponent({
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
if (event.isFirst === true) {
|
|
79
|
-
if (getVerticalScrollPosition(localScrollTarget) !== 0 || event.direction !==
|
|
79
|
+
if (getVerticalScrollPosition(localScrollTarget) !== 0 || event.direction !== 'down') {
|
|
80
80
|
if (pulling.value === true) {
|
|
81
81
|
pulling.value = false
|
|
82
82
|
state.value = 'pull'
|
|
@@ -189,10 +189,10 @@ export default createComponent({
|
|
|
189
189
|
}, [
|
|
190
190
|
state.value !== 'refreshing'
|
|
191
191
|
? h(QIcon, {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
192
|
+
name: props.icon || $q.iconSet.pullToRefresh.icon,
|
|
193
|
+
color: props.color,
|
|
194
|
+
size: '32px'
|
|
195
|
+
})
|
|
196
196
|
: h(QSpinner, {
|
|
197
197
|
size: '24px',
|
|
198
198
|
color: props.color
|