quasar 2.11.10 → 2.12.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/dist/api/QDrawer.json +11 -5
- package/dist/api/QIntersection.json +4 -0
- 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 +1 -1
- package/dist/icon-set/fontawesome-v6.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/material-symbols-outlined.umd.prod.js +1 -1
- package/dist/icon-set/material-symbols-rounded.umd.prod.js +1 -1
- package/dist/icon-set/material-symbols-sharp.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/mdi-v7.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-fontawesome-v6.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-material-symbols-outlined.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-symbols-rounded.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-symbols-sharp.umd.prod.js +1 -1
- package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
- package/dist/icon-set/svg-mdi-v7.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-TN.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 +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/kk.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/mk.umd.prod.js +6 -0
- package/dist/lang/ml.umd.prod.js +1 -1
- package/dist/lang/mm.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/sm.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/uz-Cyrl.umd.prod.js +1 -1
- package/dist/lang/uz-Latn.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.esm.js +109 -86
- package/dist/quasar.esm.prod.js +2 -2
- package/dist/quasar.sass +1 -1
- package/dist/quasar.umd.js +109 -86
- package/dist/quasar.umd.prod.js +2 -2
- package/dist/types/index.d.ts +13 -4
- package/dist/types/utils.d.ts +21 -5
- package/dist/vetur/quasar-attributes.json +8 -4
- package/dist/vetur/quasar-tags.json +2 -1
- package/dist/web-types/web-types.json +20 -5
- package/lang/index.json +4 -0
- package/lang/mk.js +98 -0
- package/lang/mk.mjs +93 -0
- package/package.json +1 -1
- package/src/components/btn-group/QBtnGroup.js +1 -1
- package/src/components/color/QColor.js +1 -1
- package/src/components/date/QDate.js +2 -2
- package/src/components/drawer/QDrawer.js +2 -0
- package/src/components/drawer/QDrawer.json +11 -4
- package/src/components/editor/QEditor.js +1 -1
- package/src/components/editor/editor-caret.js +1 -1
- package/src/components/file/QFile.js +2 -2
- package/src/components/input/QInput.js +1 -1
- package/src/components/input/use-mask.js +4 -4
- package/src/components/intersection/QIntersection.js +7 -3
- package/src/components/intersection/QIntersection.json +5 -0
- package/src/components/rating/QRating.js +1 -1
- package/src/components/select/QSelect.js +10 -10
- package/src/components/table/QTable.js +1 -1
- package/src/components/table/table-pagination.js +1 -1
- package/src/components/table/table-row-selection.js +1 -1
- package/src/components/time/QTime.js +2 -2
- package/src/components/tree/QTree.js +10 -11
- package/src/components/uploader/__tests__/QUploader.cy.js +2 -2
- package/src/components/uploader/uploader-core.js +5 -5
- package/src/components/uploader/xhr-uploader-plugin.js +2 -2
- package/src/composables/private/use-field.js +2 -2
- package/src/composables/private/use-file.js +4 -4
- package/src/composables/private/use-panel.js +1 -1
- package/src/composables/private/use-validate.js +2 -2
- package/src/directives/Morph.js +1 -1
- package/src/directives/TouchHold.js +1 -1
- package/src/directives/TouchRepeat.js +1 -1
- package/src/directives/TouchSwipe.js +7 -0
- package/src/lang.js +1 -1
- package/src/plugins/Meta.js +5 -5
- package/src/plugins/Screen.js +1 -1
- package/src/utils/EventBus.js +17 -13
- package/src/utils/morph.js +2 -2
- package/src/utils/private/focus-manager.js +1 -1
- package/src/utils/private/touch.js +9 -1
|
@@ -658,7 +658,7 @@ export default createComponent({
|
|
|
658
658
|
|
|
659
659
|
resetInputValue()
|
|
660
660
|
|
|
661
|
-
if (typeof value === 'string' && value.length
|
|
661
|
+
if (typeof value === 'string' && value.length !== 0) {
|
|
662
662
|
const needle = value.toLocaleLowerCase()
|
|
663
663
|
const findFn = extractFn => {
|
|
664
664
|
const option = props.options.find(opt => extractFn.value(opt).toLocaleLowerCase() === needle)
|
|
@@ -705,7 +705,7 @@ export default createComponent({
|
|
|
705
705
|
return
|
|
706
706
|
}
|
|
707
707
|
|
|
708
|
-
const newValueModeValid = inputValue.value.length
|
|
708
|
+
const newValueModeValid = inputValue.value.length !== 0
|
|
709
709
|
&& (props.newValueMode !== void 0 || props.onNewValue !== void 0)
|
|
710
710
|
|
|
711
711
|
const tabShouldSelect = e.shiftKey !== true
|
|
@@ -800,7 +800,7 @@ export default createComponent({
|
|
|
800
800
|
&& e.altKey === false // not kbd shortcut
|
|
801
801
|
&& e.ctrlKey === false // not kbd shortcut
|
|
802
802
|
&& e.metaKey === false // not kbd shortcut, especially on macOS with Command key
|
|
803
|
-
&& (e.keyCode !== 32 || searchBuffer.length
|
|
803
|
+
&& (e.keyCode !== 32 || searchBuffer.length !== 0) // space in middle of search
|
|
804
804
|
) {
|
|
805
805
|
menu.value !== true && showPopup(e)
|
|
806
806
|
|
|
@@ -1087,7 +1087,7 @@ export default createComponent({
|
|
|
1087
1087
|
if (
|
|
1088
1088
|
val !== ''
|
|
1089
1089
|
&& props.multiple !== true
|
|
1090
|
-
&& innerValue.value.length
|
|
1090
|
+
&& innerValue.value.length !== 0
|
|
1091
1091
|
&& userInputValue !== true
|
|
1092
1092
|
&& val === getOptionLabel.value(innerValue.value[ 0 ])
|
|
1093
1093
|
) {
|
|
@@ -1206,7 +1206,7 @@ export default createComponent({
|
|
|
1206
1206
|
loading: innerLoadingIndicator.value,
|
|
1207
1207
|
itemAligned: false,
|
|
1208
1208
|
filled: true,
|
|
1209
|
-
stackLabel: inputValue.value.length
|
|
1209
|
+
stackLabel: inputValue.value.length !== 0,
|
|
1210
1210
|
...state.splitAttrs.listeners.value,
|
|
1211
1211
|
onFocus: onDialogFieldFocus,
|
|
1212
1212
|
onBlur: onDialogFieldBlur
|
|
@@ -1334,7 +1334,7 @@ export default createComponent({
|
|
|
1334
1334
|
|
|
1335
1335
|
function resetInputValue () {
|
|
1336
1336
|
props.useInput === true && updateInputValue(
|
|
1337
|
-
props.multiple !== true && props.fillInput === true && innerValue.value.length
|
|
1337
|
+
props.multiple !== true && props.fillInput === true && innerValue.value.length !== 0
|
|
1338
1338
|
? getOptionLabel.value(innerValue.value[ 0 ]) || ''
|
|
1339
1339
|
: '',
|
|
1340
1340
|
true,
|
|
@@ -1346,7 +1346,7 @@ export default createComponent({
|
|
|
1346
1346
|
let optionIndex = -1
|
|
1347
1347
|
|
|
1348
1348
|
if (show === true) {
|
|
1349
|
-
if (innerValue.value.length
|
|
1349
|
+
if (innerValue.value.length !== 0) {
|
|
1350
1350
|
const val = getOptionValue.value(innerValue.value[ 0 ])
|
|
1351
1351
|
optionIndex = props.options.findIndex(v => isDeepEqual(getOptionValue.value(v), val))
|
|
1352
1352
|
}
|
|
@@ -1448,7 +1448,7 @@ export default createComponent({
|
|
|
1448
1448
|
floatingLabel: computed(() =>
|
|
1449
1449
|
(props.hideSelected !== true && hasValue.value === true)
|
|
1450
1450
|
|| typeof inputValue.value === 'number'
|
|
1451
|
-
|| inputValue.value.length
|
|
1451
|
+
|| inputValue.value.length !== 0
|
|
1452
1452
|
|| fieldValueIsFilled(props.displayValue)
|
|
1453
1453
|
),
|
|
1454
1454
|
|
|
@@ -1517,7 +1517,7 @@ export default createComponent({
|
|
|
1517
1517
|
})
|
|
1518
1518
|
)
|
|
1519
1519
|
|
|
1520
|
-
if (isTarget === true && typeof props.autocomplete === 'string' && props.autocomplete.length
|
|
1520
|
+
if (isTarget === true && typeof props.autocomplete === 'string' && props.autocomplete.length !== 0) {
|
|
1521
1521
|
child.push(
|
|
1522
1522
|
h('input', {
|
|
1523
1523
|
class: 'q-select__autocomplete-input',
|
|
@@ -1529,7 +1529,7 @@ export default createComponent({
|
|
|
1529
1529
|
}
|
|
1530
1530
|
}
|
|
1531
1531
|
|
|
1532
|
-
if (nameProp.value !== void 0 && props.disable !== true && innerOptionsValue.value.length
|
|
1532
|
+
if (nameProp.value !== void 0 && props.disable !== true && innerOptionsValue.value.length !== 0) {
|
|
1533
1533
|
const opts = innerOptionsValue.value.map(value => h('option', { value, selected: true }))
|
|
1534
1534
|
|
|
1535
1535
|
child.push(
|
|
@@ -37,7 +37,7 @@ export function useTablePaginationState (vm, getCellValue) {
|
|
|
37
37
|
sortBy: null,
|
|
38
38
|
descending: false,
|
|
39
39
|
page: 1,
|
|
40
|
-
rowsPerPage: props.rowsPerPageOptions.length
|
|
40
|
+
rowsPerPage: props.rowsPerPageOptions.length !== 0
|
|
41
41
|
? props.rowsPerPageOptions[ 0 ]
|
|
42
42
|
: 5
|
|
43
43
|
}, props.pagination)
|
|
@@ -36,7 +36,7 @@ export function useTableRowSelection (props, emit, computedRows, getRowKey) {
|
|
|
36
36
|
})
|
|
37
37
|
|
|
38
38
|
const allRowsSelected = computed(() =>
|
|
39
|
-
computedRows.value.length
|
|
39
|
+
computedRows.value.length !== 0 && computedRows.value.every(
|
|
40
40
|
row => selectedKeys.value[ getRowKey.value(row) ] === true
|
|
41
41
|
)
|
|
42
42
|
)
|
|
@@ -470,9 +470,9 @@ export default createComponent({
|
|
|
470
470
|
const am = computedFormat24h.value !== true
|
|
471
471
|
? isAM.value === true
|
|
472
472
|
: (
|
|
473
|
-
validHours.value.am.values.length
|
|
473
|
+
validHours.value.am.values.length !== 0 && validHours.value.pm.values.length !== 0
|
|
474
474
|
? distance >= clockRect.dist
|
|
475
|
-
: validHours.value.am.values.length
|
|
475
|
+
: validHours.value.am.values.length !== 0
|
|
476
476
|
)
|
|
477
477
|
|
|
478
478
|
val = getNormalizedClockValue(
|
|
@@ -140,7 +140,7 @@ export default createComponent({
|
|
|
140
140
|
const tickStrategy = node.tickStrategy || (parent ? parent.tickStrategy : props.tickStrategy)
|
|
141
141
|
const
|
|
142
142
|
key = node[ props.nodeKey ],
|
|
143
|
-
isParent = node[ props.childrenKey ] && node[ props.childrenKey ].length
|
|
143
|
+
isParent = node[ props.childrenKey ] && node[ props.childrenKey ].length !== 0,
|
|
144
144
|
selectable = node.disabled !== true && hasSelection.value === true && node.selectable !== false,
|
|
145
145
|
expandable = node.disabled !== true && node.expandable !== false,
|
|
146
146
|
hasTicking = tickStrategy !== 'none',
|
|
@@ -298,16 +298,15 @@ export default createComponent({
|
|
|
298
298
|
}
|
|
299
299
|
|
|
300
300
|
function expandAll () {
|
|
301
|
-
const
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
if (node
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
node[ props.childrenKey ].forEach(travel)
|
|
308
|
-
}
|
|
301
|
+
const expanded = []
|
|
302
|
+
const travel = node => {
|
|
303
|
+
if (node[ props.childrenKey ] && node[ props.childrenKey ].length !== 0) {
|
|
304
|
+
if (node.expandable !== false && node.disabled !== true) {
|
|
305
|
+
expanded.push(node[ props.nodeKey ])
|
|
306
|
+
node[ props.childrenKey ].forEach(travel)
|
|
309
307
|
}
|
|
310
308
|
}
|
|
309
|
+
}
|
|
311
310
|
|
|
312
311
|
props.nodes.forEach(travel)
|
|
313
312
|
|
|
@@ -382,7 +381,7 @@ export default createComponent({
|
|
|
382
381
|
}
|
|
383
382
|
})
|
|
384
383
|
}
|
|
385
|
-
if (collapse.length
|
|
384
|
+
if (collapse.length !== 0) {
|
|
386
385
|
target = target.filter(k => collapse.includes(k) === false)
|
|
387
386
|
}
|
|
388
387
|
}
|
|
@@ -495,7 +494,7 @@ export default createComponent({
|
|
|
495
494
|
? getChildren(node[ props.childrenKey ])
|
|
496
495
|
: []
|
|
497
496
|
|
|
498
|
-
const isParent = children.length
|
|
497
|
+
const isParent = children.length !== 0 || (m.lazy && m.lazy !== 'loaded')
|
|
499
498
|
|
|
500
499
|
let body = node.body
|
|
501
500
|
? slots[ `body-${ node.body }` ] || slots[ 'default-body' ]
|
|
@@ -90,8 +90,8 @@ describe('Uploader API', () => {
|
|
|
90
90
|
const headerSlot = `
|
|
91
91
|
<template #header="scope">
|
|
92
92
|
<div class="row no-wrap items-center q-pa-sm q-gutter-xs">
|
|
93
|
-
<q-btn v-if="scope.queuedFiles.length
|
|
94
|
-
<q-btn v-if="scope.uploadedFiles.length
|
|
93
|
+
<q-btn v-if="scope.queuedFiles.length !== 0" icon="clear_all" @click="scope.removeQueuedFiles" round dense flat />
|
|
94
|
+
<q-btn v-if="scope.uploadedFiles.length !== 0" icon="done_all" @click="scope.removeUploadedFiles" round dense flat />
|
|
95
95
|
<q-spinner v-if="scope.isUploading" class="q-uploader__spinner" />
|
|
96
96
|
<div class="col">
|
|
97
97
|
<div class="q-uploader__title">
|
|
@@ -135,7 +135,7 @@ export function getRenderer (getPlugin) {
|
|
|
135
135
|
editable.value === true
|
|
136
136
|
&& state.isBusy.value !== true
|
|
137
137
|
&& state.isUploading.value !== true
|
|
138
|
-
&& state.queuedFiles.value.length
|
|
138
|
+
&& state.queuedFiles.value.length !== 0
|
|
139
139
|
)
|
|
140
140
|
|
|
141
141
|
provide(uploaderKey, renderInput)
|
|
@@ -215,7 +215,7 @@ export function getRenderer (getPlugin) {
|
|
|
215
215
|
return false
|
|
216
216
|
})
|
|
217
217
|
|
|
218
|
-
if (removed.files.length
|
|
218
|
+
if (removed.files.length !== 0) {
|
|
219
219
|
state.files.value = localFiles
|
|
220
220
|
cb(removed)
|
|
221
221
|
emit('removed', removed.files)
|
|
@@ -343,8 +343,8 @@ export function getRenderer (getPlugin) {
|
|
|
343
343
|
h('div', {
|
|
344
344
|
class: 'flex flex-center no-wrap q-gutter-xs'
|
|
345
345
|
}, [
|
|
346
|
-
getBtn(state.queuedFiles.value.length
|
|
347
|
-
getBtn(state.uploadedFiles.value.length
|
|
346
|
+
getBtn(state.queuedFiles.value.length !== 0, 'removeQueue', removeQueuedFiles),
|
|
347
|
+
getBtn(state.uploadedFiles.value.length !== 0, 'removeUploaded', removeUploadedFiles),
|
|
348
348
|
|
|
349
349
|
state.isUploading.value === true
|
|
350
350
|
? h(QSpinner, { class: 'q-uploader__spinner' })
|
|
@@ -426,7 +426,7 @@ export function getRenderer (getPlugin) {
|
|
|
426
426
|
|
|
427
427
|
onBeforeUnmount(() => {
|
|
428
428
|
state.isUploading.value === true && state.abort()
|
|
429
|
-
state.files.value.length
|
|
429
|
+
state.files.value.length !== 0 && revokeImgURLs()
|
|
430
430
|
})
|
|
431
431
|
|
|
432
432
|
const publicApi = {}
|
|
@@ -46,14 +46,14 @@ function injectPlugin ({ props, emit, helpers }) {
|
|
|
46
46
|
}))
|
|
47
47
|
|
|
48
48
|
const isUploading = computed(() => workingThreads.value > 0)
|
|
49
|
-
const isBusy = computed(() => promises.value.length
|
|
49
|
+
const isBusy = computed(() => promises.value.length !== 0)
|
|
50
50
|
|
|
51
51
|
let abortPromises
|
|
52
52
|
|
|
53
53
|
function abort () {
|
|
54
54
|
xhrs.value.forEach(x => { x.abort() })
|
|
55
55
|
|
|
56
|
-
if (promises.value.length
|
|
56
|
+
if (promises.value.length !== 0) {
|
|
57
57
|
abortPromises = true
|
|
58
58
|
}
|
|
59
59
|
}
|
|
@@ -21,7 +21,7 @@ function getTargetUid (val) {
|
|
|
21
21
|
export function fieldValueIsFilled (val) {
|
|
22
22
|
return val !== void 0
|
|
23
23
|
&& val !== null
|
|
24
|
-
&& ('' + val).length
|
|
24
|
+
&& ('' + val).length !== 0
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
export const useFieldProps = {
|
|
@@ -217,7 +217,7 @@ export default function (state) {
|
|
|
217
217
|
hasError.value === true
|
|
218
218
|
? ' text-negative'
|
|
219
219
|
: (
|
|
220
|
-
typeof props.standout === 'string' && props.standout.length
|
|
220
|
+
typeof props.standout === 'string' && props.standout.length !== 0 && state.focused.value === true
|
|
221
221
|
? ` ${ props.standout }`
|
|
222
222
|
: (props.color !== void 0 ? ` text-${ props.color }` : '')
|
|
223
223
|
)
|
|
@@ -91,7 +91,7 @@ export default function ({
|
|
|
91
91
|
const rejectedFiles = []
|
|
92
92
|
|
|
93
93
|
const done = () => {
|
|
94
|
-
if (rejectedFiles.length
|
|
94
|
+
if (rejectedFiles.length !== 0) {
|
|
95
95
|
emit('rejected', rejectedFiles)
|
|
96
96
|
}
|
|
97
97
|
}
|
|
@@ -121,7 +121,7 @@ export default function ({
|
|
|
121
121
|
// Cordova/iOS allows selecting multiple files even when the
|
|
122
122
|
// multiple attribute is not specified. We also normalize drag'n'dropped
|
|
123
123
|
// files here:
|
|
124
|
-
if (props.multiple !== true && files.length
|
|
124
|
+
if (props.multiple !== true && files.length !== 0) {
|
|
125
125
|
files = [ files[ 0 ] ]
|
|
126
126
|
}
|
|
127
127
|
|
|
@@ -176,7 +176,7 @@ export default function ({
|
|
|
176
176
|
|
|
177
177
|
done()
|
|
178
178
|
|
|
179
|
-
if (files.length
|
|
179
|
+
if (files.length !== 0) {
|
|
180
180
|
return files
|
|
181
181
|
}
|
|
182
182
|
}
|
|
@@ -202,7 +202,7 @@ export default function ({
|
|
|
202
202
|
stopAndPreventDrag(e)
|
|
203
203
|
const files = e.dataTransfer.files
|
|
204
204
|
|
|
205
|
-
if (files.length
|
|
205
|
+
if (files.length !== 0) {
|
|
206
206
|
addFilesToQueue(null, files)
|
|
207
207
|
}
|
|
208
208
|
|
|
@@ -182,7 +182,7 @@ export default function () {
|
|
|
182
182
|
index += direction
|
|
183
183
|
}
|
|
184
184
|
|
|
185
|
-
if (props.infinite === true && panels.length
|
|
185
|
+
if (props.infinite === true && panels.length !== 0 && startIndex !== -1 && startIndex !== panels.length) {
|
|
186
186
|
goToPanelByOffset(direction, direction === -1 ? panels.length : -1)
|
|
187
187
|
}
|
|
188
188
|
}
|
|
@@ -39,7 +39,7 @@ export default function (focused, innerLoading) {
|
|
|
39
39
|
const hasRules = computed(() =>
|
|
40
40
|
props.rules !== void 0
|
|
41
41
|
&& props.rules !== null
|
|
42
|
-
&& props.rules.length
|
|
42
|
+
&& props.rules.length !== 0
|
|
43
43
|
)
|
|
44
44
|
|
|
45
45
|
const hasActiveRules = computed(() =>
|
|
@@ -52,7 +52,7 @@ export default function (focused, innerLoading) {
|
|
|
52
52
|
)
|
|
53
53
|
|
|
54
54
|
const errorMessage = computed(() => (
|
|
55
|
-
typeof props.errorMessage === 'string' && props.errorMessage.length
|
|
55
|
+
typeof props.errorMessage === 'string' && props.errorMessage.length !== 0
|
|
56
56
|
? props.errorMessage
|
|
57
57
|
: innerErrorMessage.value
|
|
58
58
|
))
|
package/src/directives/Morph.js
CHANGED
|
@@ -120,7 +120,7 @@ export default createDirective(__QUASAR_SSR_SERVER__
|
|
|
120
120
|
// duration in ms, touch in pixels, mouse in pixels
|
|
121
121
|
const data = [ 600, 5, 7 ]
|
|
122
122
|
|
|
123
|
-
if (typeof binding.arg === 'string' && binding.arg.length
|
|
123
|
+
if (typeof binding.arg === 'string' && binding.arg.length !== 0) {
|
|
124
124
|
binding.arg.split(':').forEach((val, index) => {
|
|
125
125
|
const v = parseInt(val, 10)
|
|
126
126
|
v && (data[ index ] = v)
|
|
@@ -50,7 +50,7 @@ export default createDirective(__QUASAR_SSR_SERVER__
|
|
|
50
50
|
return
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
const durations = typeof arg === 'string' && arg.length
|
|
53
|
+
const durations = typeof arg === 'string' && arg.length !== 0
|
|
54
54
|
? arg.split(':').map(val => parseInt(val, 10))
|
|
55
55
|
: [ 0, 600, 300 ]
|
|
56
56
|
|
|
@@ -107,6 +107,13 @@ export default createDirective(__QUASAR_SSR_SERVER__
|
|
|
107
107
|
return
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
+
// is user trying to select text?
|
|
111
|
+
// if so, then something should be reported here
|
|
112
|
+
// (previous selection, if any, was discarded when swipe started)
|
|
113
|
+
else if (window.getSelection().toString() !== '') {
|
|
114
|
+
ctx.end(evt)
|
|
115
|
+
return
|
|
116
|
+
}
|
|
110
117
|
else if (absX < ctx.sensitivity[ 2 ] && absY < ctx.sensitivity[ 2 ]) {
|
|
111
118
|
return
|
|
112
119
|
}
|
package/src/lang.js
CHANGED
|
@@ -5,7 +5,7 @@ import defaultLang from '../lang/en-US'
|
|
|
5
5
|
function getLocale () {
|
|
6
6
|
if (__QUASAR_SSR_SERVER__) { return }
|
|
7
7
|
|
|
8
|
-
const val = Array.isArray(navigator.languages) === true && navigator.languages.length
|
|
8
|
+
const val = Array.isArray(navigator.languages) === true && navigator.languages.length !== 0
|
|
9
9
|
? navigator.languages[ 0 ]
|
|
10
10
|
: navigator.language
|
|
11
11
|
|
package/src/plugins/Meta.js
CHANGED
|
@@ -98,7 +98,7 @@ function apply ({ add, remove }) {
|
|
|
98
98
|
document.title = add.title
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
if (Object.keys(remove).length
|
|
101
|
+
if (Object.keys(remove).length !== 0) {
|
|
102
102
|
[ 'meta', 'link', 'script' ].forEach(type => {
|
|
103
103
|
remove[ type ].forEach(name => {
|
|
104
104
|
document.head.querySelector(`${ type }[data-qmeta="${ name }"]`).remove()
|
|
@@ -193,9 +193,9 @@ function injectServerMeta (ssrContext) {
|
|
|
193
193
|
|
|
194
194
|
const htmlAttr = Object.keys(data.htmlAttr).filter(htmlFilter)
|
|
195
195
|
|
|
196
|
-
if (htmlAttr.length
|
|
196
|
+
if (htmlAttr.length !== 0) {
|
|
197
197
|
ctx.htmlAttrs += (
|
|
198
|
-
(ctx.htmlAttrs.length
|
|
198
|
+
(ctx.htmlAttrs.length !== 0 ? ' ' : '')
|
|
199
199
|
+ htmlAttr.map(getAttr(data.htmlAttr)).join(' ')
|
|
200
200
|
)
|
|
201
201
|
}
|
|
@@ -204,9 +204,9 @@ function injectServerMeta (ssrContext) {
|
|
|
204
204
|
|
|
205
205
|
const bodyAttr = Object.keys(data.bodyAttr).filter(bodyFilter)
|
|
206
206
|
|
|
207
|
-
if (bodyAttr.length
|
|
207
|
+
if (bodyAttr.length !== 0) {
|
|
208
208
|
ctx.bodyAttrs += (
|
|
209
|
-
(ctx.bodyAttrs.length
|
|
209
|
+
(ctx.bodyAttrs.length !== 0 ? ' ' : '')
|
|
210
210
|
+ bodyAttr.map(getAttr(data.bodyAttr)).join(' ')
|
|
211
211
|
)
|
|
212
212
|
}
|
package/src/plugins/Screen.js
CHANGED
|
@@ -160,7 +160,7 @@ export default defineReactivePlugin({
|
|
|
160
160
|
|
|
161
161
|
this.setDebounce(updateDebounce)
|
|
162
162
|
|
|
163
|
-
if (Object.keys(updateSizes).length
|
|
163
|
+
if (Object.keys(updateSizes).length !== 0) {
|
|
164
164
|
this.setSizes(updateSizes)
|
|
165
165
|
updateSizes = void 0 // free up memory
|
|
166
166
|
}
|
package/src/utils/EventBus.js
CHANGED
|
@@ -42,21 +42,25 @@ export default class EventBus {
|
|
|
42
42
|
|
|
43
43
|
off (name, callback) {
|
|
44
44
|
const list = this.__stack[ name ]
|
|
45
|
-
const liveEvents = []
|
|
46
45
|
|
|
47
|
-
if (list
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
liveEvents.push(entry)
|
|
51
|
-
}
|
|
52
|
-
})
|
|
46
|
+
if (list === void 0) {
|
|
47
|
+
return this // chainable
|
|
48
|
+
}
|
|
53
49
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
50
|
+
if (callback === void 0) {
|
|
51
|
+
delete this.__stack[ name ]
|
|
52
|
+
return this // chainable
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const liveEvents = list.filter(
|
|
56
|
+
entry => entry.fn !== callback && entry.fn.__callback !== callback
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
if (liveEvents.length !== 0) {
|
|
60
|
+
this.__stack[ name ] = liveEvents
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
delete this.__stack[ name ]
|
|
60
64
|
}
|
|
61
65
|
|
|
62
66
|
return this // chainable
|
package/src/utils/morph.js
CHANGED
|
@@ -149,9 +149,9 @@ function normalizeOptions (options) {
|
|
|
149
149
|
waitFor: options.waitFor === void 0 ? 0 : options.waitFor,
|
|
150
150
|
|
|
151
151
|
duration: isNaN(options.duration) === true ? 300 : parseInt(options.duration, 10),
|
|
152
|
-
easing: typeof options.easing === 'string' && options.easing.length
|
|
152
|
+
easing: typeof options.easing === 'string' && options.easing.length !== 0 ? options.easing : 'ease-in-out',
|
|
153
153
|
delay: isNaN(options.delay) === true ? 0 : parseInt(options.delay, 10),
|
|
154
|
-
fill: typeof options.fill === 'string' && options.fill.length
|
|
154
|
+
fill: typeof options.fill === 'string' && options.fill.length !== 0 ? options.fill : 'none',
|
|
155
155
|
|
|
156
156
|
resize: options.resize === true,
|
|
157
157
|
|
|
@@ -13,7 +13,7 @@ export function addFocusWaitFlag (flag) {
|
|
|
13
13
|
export function removeFocusWaitFlag (flag) {
|
|
14
14
|
clearFlag(flag)
|
|
15
15
|
|
|
16
|
-
if (waitFlags.length === 0 && queue.length
|
|
16
|
+
if (waitFlags.length === 0 && queue.length !== 0) {
|
|
17
17
|
// only call last focus handler (can't focus multiple things at once)
|
|
18
18
|
queue[ queue.length - 1 ]()
|
|
19
19
|
queue = []
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
|
|
1
2
|
const modifiersAll = {
|
|
2
3
|
left: true,
|
|
3
4
|
right: true,
|
|
@@ -45,11 +46,18 @@ export function getModifierDirections (mod) {
|
|
|
45
46
|
return dir
|
|
46
47
|
}
|
|
47
48
|
|
|
49
|
+
// This is especially important (not the main reason, but important)
|
|
50
|
+
// for TouchSwipe directive running on Firefox
|
|
51
|
+
// because text selection on such elements cannot be determined
|
|
52
|
+
// without additional work (on top of getSelection() API)
|
|
53
|
+
// https://bugzilla.mozilla.org/show_bug.cgi?id=85686
|
|
54
|
+
const avoidNodeNamesList = [ 'INPUT', 'TEXTAREA' ]
|
|
55
|
+
|
|
48
56
|
export function shouldStart (evt, ctx) {
|
|
49
57
|
return ctx.event === void 0
|
|
50
58
|
&& evt.target !== void 0
|
|
51
59
|
&& evt.target.draggable !== true
|
|
52
60
|
&& typeof ctx.handler === 'function'
|
|
53
|
-
&& evt.target.nodeName.toUpperCase()
|
|
61
|
+
&& avoidNodeNamesList.includes(evt.target.nodeName.toUpperCase()) === false
|
|
54
62
|
&& (evt.qClonedBy === void 0 || evt.qClonedBy.indexOf(ctx.uid) === -1)
|
|
55
63
|
}
|