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.
- package/dist/api/BottomSheet.json +1 -1
- 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 +18 -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 +19 -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/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 +2 -2
- package/dist/quasar.esm.prod.js +2 -2
- package/dist/quasar.prod.css +1 -1
- package/dist/quasar.rtl.css +2 -2
- package/dist/quasar.rtl.prod.css +1 -1
- package/dist/quasar.sass +2 -1
- package/dist/quasar.umd.js +358 -343
- package/dist/quasar.umd.prod.js +2 -2
- package/dist/ssr-directives/Morph.js +1 -1
- package/dist/types/index.d.ts +245 -135
- package/dist/vetur/quasar-attributes.json +46 -38
- package/dist/vetur/quasar-tags.json +2 -0
- package/dist/web-types/web-types.json +119 -93
- 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.json +3 -6
- 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-plugin/DialogPlugin.js +9 -8
- package/src/components/fab/QFabAction.json +1 -3
- package/src/components/field/QField.json +2 -6
- package/src/components/form/QForm.json +10 -7
- package/src/components/icon/QIcon.js +4 -1
- package/src/components/icon/QIcon.json +1 -3
- package/src/components/input/QInput.json +2 -6
- package/src/components/input/use-mask.js +2 -2
- package/src/components/knob/QKnob.js +46 -40
- package/src/components/knob/QKnob.json +16 -0
- package/src/components/radio/QRadio.json +2 -4
- package/src/components/select/QSelect.js +4 -3
- package/src/components/select/QSelect.json +17 -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.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-sort.js +2 -2
- package/src/components/tabs/QRouteTab.json +2 -3
- package/src/components/tabs/use-tab.js +11 -8
- package/src/components/time/QTime.js +5 -5
- package/src/components/tree/QTree.js +39 -41
- package/src/composables/private/use-file.json +1 -3
- package/src/composables/private/use-router-link.js +1 -1
- 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/Loading.js +3 -2
- package/src/plugins/LoadingBar.js +2 -1
- package/src/plugins/Notify.js +11 -4
- package/src/plugins/Notify.json +102 -2
- package/src/plugins/Screen.js +9 -5
- package/src/utils/create-uploader-component.js +2 -1
- package/src/utils/extend.js +6 -34
- package/src/utils/morph.js +19 -17
- package/src/utils/private/is.js +2 -15
- package/src/utils/private/web-storage.js +3 -2
package/package.json
CHANGED
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"desc": "Emitted on QChip click if 'clickable' property is set",
|
|
64
64
|
"params": {
|
|
65
65
|
"evt": {
|
|
66
|
-
"type": "
|
|
66
|
+
"type": "Event",
|
|
67
67
|
"desc": "JS event object"
|
|
68
68
|
}
|
|
69
69
|
}
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"hide": {
|
|
84
84
|
"params": {
|
|
85
85
|
"evt": {
|
|
86
|
-
"type": "
|
|
86
|
+
"type": "Event",
|
|
87
87
|
"required": false,
|
|
88
88
|
"desc": "JS event object"
|
|
89
89
|
}
|
package/src/api.extends.json
CHANGED
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
|
|
48
48
|
"icon": {
|
|
49
49
|
"type": "String",
|
|
50
|
-
"desc": "Icon name following Quasar convention; Make sure you have the icon library installed unless you are using 'img:' prefix",
|
|
50
|
+
"desc": "Icon name following Quasar convention; Make sure you have the icon library installed unless you are using 'img:' prefix; If 'none' (String) is used as value then no icon is rendered (but screen real estate will still be used for it)",
|
|
51
51
|
"examples": [
|
|
52
52
|
"map",
|
|
53
53
|
"ion-add",
|
|
@@ -139,6 +139,11 @@
|
|
|
139
139
|
"default": true,
|
|
140
140
|
"examples": [ false, "{ early: true, center: true, color: 'teal', keyCodes: [] }" ],
|
|
141
141
|
"category": "style"
|
|
142
|
+
},
|
|
143
|
+
|
|
144
|
+
"evt": {
|
|
145
|
+
"type": "Event",
|
|
146
|
+
"desc": "JS event object"
|
|
142
147
|
}
|
|
143
148
|
},
|
|
144
149
|
|
|
@@ -165,10 +170,8 @@
|
|
|
165
170
|
"desc": "Emitted after component has triggered show()",
|
|
166
171
|
"params": {
|
|
167
172
|
"evt": {
|
|
168
|
-
"
|
|
169
|
-
"
|
|
170
|
-
"required": true,
|
|
171
|
-
"__exemption": [ "examples" ]
|
|
173
|
+
"extends": "evt",
|
|
174
|
+
"required": true
|
|
172
175
|
}
|
|
173
176
|
}
|
|
174
177
|
},
|
|
@@ -177,10 +180,8 @@
|
|
|
177
180
|
"desc": "Emitted when component triggers show() but before it finishes doing it",
|
|
178
181
|
"params": {
|
|
179
182
|
"evt": {
|
|
180
|
-
"
|
|
181
|
-
"
|
|
182
|
-
"required": true,
|
|
183
|
-
"__exemption": [ "examples" ]
|
|
183
|
+
"extends": "evt",
|
|
184
|
+
"required": true
|
|
184
185
|
}
|
|
185
186
|
}
|
|
186
187
|
},
|
|
@@ -193,10 +194,8 @@
|
|
|
193
194
|
"desc": "Emitted after component has triggered hide()",
|
|
194
195
|
"params": {
|
|
195
196
|
"evt": {
|
|
196
|
-
"
|
|
197
|
-
"
|
|
198
|
-
"required": true,
|
|
199
|
-
"__exemption": [ "examples" ]
|
|
197
|
+
"extends": "evt",
|
|
198
|
+
"required": true
|
|
200
199
|
}
|
|
201
200
|
}
|
|
202
201
|
},
|
|
@@ -205,10 +204,8 @@
|
|
|
205
204
|
"desc": "Emitted when component triggers hide() but before it finishes doing it",
|
|
206
205
|
"params": {
|
|
207
206
|
"evt": {
|
|
208
|
-
"
|
|
209
|
-
"
|
|
210
|
-
"required": true,
|
|
211
|
-
"__exemption": [ "examples" ]
|
|
207
|
+
"extends": "evt",
|
|
208
|
+
"required": true
|
|
212
209
|
}
|
|
213
210
|
}
|
|
214
211
|
},
|
|
@@ -221,10 +218,8 @@
|
|
|
221
218
|
"desc": "Emitted when user clicks/taps on the component",
|
|
222
219
|
"params": {
|
|
223
220
|
"evt": {
|
|
224
|
-
"
|
|
225
|
-
"
|
|
226
|
-
"required": true,
|
|
227
|
-
"__exemption": [ "examples" ]
|
|
221
|
+
"extends": "evt",
|
|
222
|
+
"required": true
|
|
228
223
|
}
|
|
229
224
|
}
|
|
230
225
|
}
|
|
@@ -235,10 +230,8 @@
|
|
|
235
230
|
"desc": "Triggers component to show",
|
|
236
231
|
"params": {
|
|
237
232
|
"evt": {
|
|
238
|
-
"
|
|
239
|
-
"required": false
|
|
240
|
-
"desc": "JS event object",
|
|
241
|
-
"__exemption": [ "examples" ]
|
|
233
|
+
"extends": "evt",
|
|
234
|
+
"required": false
|
|
242
235
|
}
|
|
243
236
|
}
|
|
244
237
|
},
|
|
@@ -247,10 +240,8 @@
|
|
|
247
240
|
"desc": "Triggers component to hide",
|
|
248
241
|
"params": {
|
|
249
242
|
"evt": {
|
|
250
|
-
"
|
|
251
|
-
"required": false
|
|
252
|
-
"desc": "JS event object",
|
|
253
|
-
"__exemption": [ "examples" ]
|
|
243
|
+
"extends": "evt",
|
|
244
|
+
"required": false
|
|
254
245
|
}
|
|
255
246
|
}
|
|
256
247
|
},
|
|
@@ -258,10 +249,8 @@
|
|
|
258
249
|
"toggle": {
|
|
259
250
|
"params": {
|
|
260
251
|
"evt": {
|
|
261
|
-
"
|
|
262
|
-
"required": false
|
|
263
|
-
"desc": "JS event object",
|
|
264
|
-
"__exemption": [ "examples" ]
|
|
252
|
+
"extends": "evt",
|
|
253
|
+
"required": false
|
|
265
254
|
}
|
|
266
255
|
},
|
|
267
256
|
"desc": "Triggers component to toggle between show/hide"
|
|
@@ -41,9 +41,7 @@
|
|
|
41
41
|
"desc": "Emulate click on QBtn",
|
|
42
42
|
"params": {
|
|
43
43
|
"evt": {
|
|
44
|
-
"
|
|
45
|
-
"desc": "JS event object",
|
|
46
|
-
"__exemption": [ "examples" ]
|
|
44
|
+
"extends": "evt"
|
|
47
45
|
}
|
|
48
46
|
}
|
|
49
47
|
}
|
|
@@ -54,9 +52,8 @@
|
|
|
54
52
|
"desc": "Emitted when component is clicked (activated)",
|
|
55
53
|
"params": {
|
|
56
54
|
"evt": {
|
|
57
|
-
"
|
|
58
|
-
"desc": "JS event object; If you want to cancel navigation set synchronously 'evt.navigate' to false"
|
|
59
|
-
"__exemption": [ "examples" ]
|
|
55
|
+
"extends": "evt",
|
|
56
|
+
"desc": "JS event object; If you want to cancel navigation set synchronously 'evt.navigate' to false"
|
|
60
57
|
},
|
|
61
58
|
"navigateFn": {
|
|
62
59
|
"type": "Function",
|
|
@@ -144,10 +144,8 @@
|
|
|
144
144
|
"desc": "Default trigger when clicked/tapped on",
|
|
145
145
|
"params": {
|
|
146
146
|
"evt": {
|
|
147
|
-
"
|
|
148
|
-
"
|
|
149
|
-
"required": true,
|
|
150
|
-
"__exemption": [ "examples" ]
|
|
147
|
+
"extends": "evt",
|
|
148
|
+
"required": true
|
|
151
149
|
}
|
|
152
150
|
},
|
|
153
151
|
"returns": null
|
|
@@ -12,6 +12,7 @@ import { hSlot } from '../../utils/private/render.js'
|
|
|
12
12
|
import { formatDate, __splitDate, getDateDiff } from '../../utils/date.js'
|
|
13
13
|
import { pad } from '../../utils/format.js'
|
|
14
14
|
import { jalaaliMonthLength, toGregorian } from '../../utils/private/date-persian.js'
|
|
15
|
+
import { isPlainObject } from '../../utils/private/is.js'
|
|
15
16
|
|
|
16
17
|
const yearsInterval = 20
|
|
17
18
|
const views = [ 'Calendar', 'Years', 'Months' ]
|
|
@@ -164,7 +165,7 @@ export default createComponent({
|
|
|
164
165
|
const rangeModel = computed(() => {
|
|
165
166
|
const fn = date => decodeString(date, innerMask.value, innerLocale.value)
|
|
166
167
|
return normalizedModel.value
|
|
167
|
-
.filter(date =>
|
|
168
|
+
.filter(date => isPlainObject(date) === true && date.from !== void 0 && date.to !== void 0)
|
|
168
169
|
.map(range => ({ from: fn(range.from), to: fn(range.to) }))
|
|
169
170
|
.filter(range => range.from.dateHash !== null && range.to.dateHash !== null && range.from.dateHash < range.to.dateHash)
|
|
170
171
|
})
|
|
@@ -1217,24 +1218,24 @@ export default createComponent({
|
|
|
1217
1218
|
}, days.value.map(day => h('div', { class: day.classes }, [
|
|
1218
1219
|
day.in === true
|
|
1219
1220
|
? h(
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1221
|
+
QBtn, {
|
|
1222
|
+
class: day.today === true ? 'q-date__today' : '',
|
|
1223
|
+
dense: true,
|
|
1224
|
+
flat: day.flat,
|
|
1225
|
+
unelevated: day.unelevated,
|
|
1226
|
+
color: day.color,
|
|
1227
|
+
textColor: day.textColor,
|
|
1228
|
+
label: day.i,
|
|
1229
|
+
tabindex: tabindex.value,
|
|
1230
|
+
...getCache('day#' + day.i, {
|
|
1231
|
+
onClick: () => { onDayClick(day.i) },
|
|
1232
|
+
onMouseover: () => { onDayMouseover(day.i) }
|
|
1233
|
+
})
|
|
1234
|
+
},
|
|
1235
|
+
day.event !== false
|
|
1236
|
+
? () => h('div', { class: 'q-date__event bg-' + day.event })
|
|
1237
|
+
: null
|
|
1238
|
+
)
|
|
1238
1239
|
: h('div', '' + day.i)
|
|
1239
1240
|
]))))
|
|
1240
1241
|
])
|
|
@@ -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 { isPlainObject } 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
|
+
isPlainObject(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
|
+
isPlainObject(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
|
+
isPlainObject(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
|
+
...(isPlainObject(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
|
+
...(isPlainObject(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
|
|
|
@@ -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
|
}
|
|
@@ -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
|
},
|
|
@@ -69,7 +69,7 @@ export default createComponent({
|
|
|
69
69
|
let cls
|
|
70
70
|
let icon = props.name
|
|
71
71
|
|
|
72
|
-
if (!icon) {
|
|
72
|
+
if (icon === 'none' || !icon) {
|
|
73
73
|
return { none: true }
|
|
74
74
|
}
|
|
75
75
|
|
|
@@ -78,6 +78,9 @@ export default createComponent({
|
|
|
78
78
|
if (res !== void 0) {
|
|
79
79
|
if (res.icon !== void 0) {
|
|
80
80
|
icon = res.icon
|
|
81
|
+
if (icon === 'none' || !icon) {
|
|
82
|
+
return { none: true }
|
|
83
|
+
}
|
|
81
84
|
}
|
|
82
85
|
else {
|
|
83
86
|
return {
|
|
@@ -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()
|
|
@@ -212,7 +222,7 @@ export default createComponent({
|
|
|
212
222
|
newModel = parseFloat(newModel.toFixed(decimals.value))
|
|
213
223
|
}
|
|
214
224
|
|
|
215
|
-
newModel = between(newModel,
|
|
225
|
+
newModel = between(newModel, innerMin.value, innerMax.value)
|
|
216
226
|
|
|
217
227
|
emit('drag-value', newModel)
|
|
218
228
|
|
|
@@ -240,16 +250,12 @@ export default createComponent({
|
|
|
240
250
|
return h('input', formAttrs.value)
|
|
241
251
|
}
|
|
242
252
|
|
|
243
|
-
onMounted(() => {
|
|
244
|
-
$el = proxy.$el
|
|
245
|
-
})
|
|
246
|
-
|
|
247
253
|
return () => {
|
|
248
254
|
const data = {
|
|
249
255
|
class: classes.value,
|
|
250
256
|
role: 'slider',
|
|
251
|
-
'aria-valuemin':
|
|
252
|
-
'aria-valuemax':
|
|
257
|
+
'aria-valuemin': innerMin.value,
|
|
258
|
+
'aria-valuemax': innerMax.value,
|
|
253
259
|
'aria-valuenow': props.modelValue,
|
|
254
260
|
...attrs.value,
|
|
255
261
|
...circularProps.value,
|
|
@@ -262,18 +268,18 @@ export default createComponent({
|
|
|
262
268
|
default: slots.default
|
|
263
269
|
}
|
|
264
270
|
|
|
265
|
-
if (editable.value === true) {
|
|
266
|
-
|
|
267
|
-
child.internal = getNameInput
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
return withDirectives(
|
|
271
|
-
h(QCircularProgress, data, child),
|
|
272
|
-
directives.value
|
|
273
|
-
)
|
|
271
|
+
if (editable.value === true && props.name !== void 0) {
|
|
272
|
+
child.internal = getNameInput
|
|
274
273
|
}
|
|
275
274
|
|
|
276
|
-
return
|
|
275
|
+
return hDir(
|
|
276
|
+
QCircularProgress,
|
|
277
|
+
data,
|
|
278
|
+
child,
|
|
279
|
+
'knob',
|
|
280
|
+
editable.value,
|
|
281
|
+
() => directives.value
|
|
282
|
+
)
|
|
277
283
|
}
|
|
278
284
|
}
|
|
279
285
|
})
|
|
@@ -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",
|