Comparing version 1.0.0-beta.22 to 1.0.0-beta.23
@@ -40,4 +40,14 @@ { | ||
} | ||
}, | ||
"setDefaults": { | ||
"desc": "Set the inner QAjaxBar's props", | ||
"params": { | ||
"...props": { | ||
"type": "Object", | ||
"desc": "QAjaxBar component props", | ||
"required": true | ||
} | ||
} | ||
} | ||
} | ||
} |
@@ -372,2 +372,7 @@ { | ||
}, | ||
"fill-input": { | ||
"type": "Boolean", | ||
"desc": "Fills the input with current value; Useful along with 'hide-selected'; Does NOT works along with 'multiple' selection", | ||
"category": "behavior" | ||
}, | ||
"new-value-mode": { | ||
@@ -721,2 +726,8 @@ "type": "String", | ||
}, | ||
"showPopup": { | ||
"desc": "Focus and open popup" | ||
}, | ||
"hidePopup": { | ||
"desc": "Hide popup" | ||
}, | ||
"removeAtIndex": { | ||
@@ -723,0 +734,0 @@ "desc": "Remove selected option located at specific index", |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-beta.22 | ||
* Quasar Framework v1.0.0-beta.23 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
@@ -120,2 +120,3 @@ import Vue, { VueConstructor } from 'vue' | ||
increment(amount? : number): void | ||
setDefaults(...props : any): void | ||
} | ||
@@ -1237,2 +1238,3 @@ | ||
useChips? : boolean | ||
fillInput? : boolean | ||
newValueMode? : string | ||
@@ -1247,2 +1249,4 @@ mapOptions? : boolean | ||
focus(): void | ||
showPopup(): void | ||
hidePopup(): void | ||
removeAtIndex(index : number): void | ||
@@ -1249,0 +1253,0 @@ add(opt : any): void |
@@ -1039,2 +1039,3 @@ { | ||
"use-chips", | ||
"fill-input", | ||
"new-value-mode", | ||
@@ -1041,0 +1042,0 @@ "map-options", |
{ | ||
"name": "quasar", | ||
"version": "1.0.0-beta.22", | ||
"version": "1.0.0-beta.23", | ||
"description": "High performance, Material Design 2, full front end stack with Vue.js -- build SPA, SSR, PWA, Hybrid Mobile Apps and Electron apps, all simultaneously using the same codebase", | ||
@@ -5,0 +5,0 @@ "module": "src/index.esm.js", |
@@ -109,4 +109,8 @@ import Vue from 'vue' | ||
hasBottom () { | ||
return this.bottomSlots === true || this.hint !== void 0 || this.rules !== void 0 || this.counter === true | ||
shouldRenderBottom () { | ||
return this.bottomSlots === true || | ||
this.hint !== void 0 || | ||
this.rules !== void 0 || | ||
this.counter === true || | ||
this.error !== null | ||
}, | ||
@@ -132,3 +136,3 @@ | ||
'q-field--with-bottom': this.hideBottomSpace !== true && this.hasBottom === true, | ||
'q-field--with-bottom': this.hideBottomSpace !== true && this.shouldRenderBottom === true, | ||
'q-field--error': this.hasError, | ||
@@ -152,3 +156,3 @@ | ||
if (this.hasError) { | ||
if (this.hasError === true) { | ||
cls.push('text-negative') | ||
@@ -173,2 +177,7 @@ } | ||
focus () { | ||
if (this.showPopup !== void 0 && this.$q.platform.is.desktop !== true) { | ||
this.showPopup() | ||
return | ||
} | ||
let target = this.$refs.target | ||
@@ -303,4 +312,2 @@ if (target !== void 0) { | ||
__getBottom (h) { | ||
if (this.hideBottomSpace === true && this.hasBottom !== true) { return } | ||
let msg, key | ||
@@ -336,4 +343,4 @@ | ||
const main = h('div', { | ||
staticClass: 'q-field__messages col', | ||
key | ||
key, | ||
staticClass: 'q-field__messages col' | ||
}, msg) | ||
@@ -351,5 +358,7 @@ | ||
hasCounter === true ? h('div', { | ||
staticClass: 'q-field__counter' | ||
}, this.$scopedSlots.counter !== void 0 ? this.$scopedSlots.counter() : [ this.computedCounter ]) : null | ||
hasCounter === true | ||
? h('div', { | ||
staticClass: 'q-field__counter' | ||
}, this.$scopedSlots.counter !== void 0 ? this.$scopedSlots.counter() : [ this.computedCounter ]) | ||
: null | ||
]) | ||
@@ -420,3 +429,5 @@ }, | ||
this.__getBottom(h) | ||
this.shouldRenderBottom === true | ||
? this.__getBottom(h) | ||
: null | ||
]), | ||
@@ -423,0 +434,0 @@ |
@@ -47,2 +47,3 @@ import Vue from 'vue' | ||
hideDropdownIcon: Boolean, | ||
fillInput: Boolean, | ||
@@ -98,2 +99,17 @@ maxValues: [Number, String], | ||
watch: { | ||
innerValue: { | ||
handler () { | ||
if ( | ||
this.useInput === true && this.fillInput === true && this.multiple !== true && | ||
((this.dialog !== true && this.menu !== true) || this.hasValue !== true) | ||
) { | ||
this.__resetInputValue() | ||
if (this.dialog === true || this.menu === true) { | ||
this.filter('') | ||
} | ||
} | ||
}, | ||
immediate: true | ||
}, | ||
menu (show) { | ||
@@ -276,9 +292,9 @@ this.__updateMenu(show) | ||
this.multiple !== true && this.updateInputValue('', true) | ||
const optValue = this.__getOptionValue(opt) | ||
this.multiple !== true && this.updateInputValue(this.fillInput === true ? optValue : '', true) | ||
this.focus() | ||
const optValue = this.__getOptionValue(opt) | ||
if (this.multiple !== true) { | ||
this.__closePopup() | ||
this.hidePopup() | ||
@@ -393,10 +409,3 @@ if (isDeepEqual(this.__getOptionValue(this.value), optValue) !== true) { | ||
stopAndPrevent(e) | ||
if (this.$listeners.filter !== void 0) { | ||
this.filter(this.inputValue) | ||
} | ||
else { | ||
this.menu = true | ||
} | ||
this.showPopup() | ||
return | ||
@@ -463,32 +472,34 @@ } | ||
if (this.inputValue.length > 0) { | ||
if (this.newValueMode !== void 0 || this.$listeners['new-value'] !== void 0) { | ||
const done = (val, mode) => { | ||
if (mode) { | ||
if (validateNewValueMode(mode) !== true) { | ||
console.error('QSelect: invalid new value mode - ' + mode) | ||
return | ||
} | ||
// below is meant for multiple mode only | ||
if ( | ||
this.inputValue.length > 0 && | ||
(this.newValueMode !== void 0 || this.$listeners['new-value'] !== void 0) | ||
) { | ||
const done = (val, mode) => { | ||
if (mode) { | ||
if (validateNewValueMode(mode) !== true) { | ||
console.error('QSelect: invalid new value mode - ' + mode) | ||
return | ||
} | ||
else { | ||
mode = this.newValueMode | ||
} | ||
} | ||
else { | ||
mode = this.newValueMode | ||
} | ||
if (val !== void 0 && val !== null) { | ||
this[mode === 'toggle' ? 'toggleOption' : 'add']( | ||
val, | ||
mode === 'add-unique' | ||
) | ||
} | ||
this.updateInputValue('') | ||
if (val !== void 0 && val !== null) { | ||
this[mode === 'toggle' ? 'toggleOption' : 'add']( | ||
val, | ||
mode === 'add-unique' | ||
) | ||
} | ||
if (this.$listeners['new-value'] !== void 0) { | ||
this.$emit('new-value', this.inputValue, done) | ||
} | ||
else { | ||
done(this.inputValue) | ||
} | ||
this.updateInputValue('') | ||
} | ||
if (this.$listeners['new-value'] !== void 0) { | ||
this.$emit('new-value', this.inputValue, done) | ||
} | ||
else { | ||
done(this.inputValue) | ||
} | ||
} | ||
@@ -500,6 +511,3 @@ | ||
else if (this.innerLoading !== true) { | ||
this.updateInputValue('') | ||
if (this.$listeners.filter === void 0) { | ||
this.menu = true | ||
} | ||
this.showPopup() | ||
} | ||
@@ -680,7 +688,9 @@ }, | ||
updateInputValue (val, noFiltering) { | ||
if (this.inputValue !== val) { | ||
this.inputValue = val | ||
if (this.useInput === true) { | ||
if (this.inputValue !== val) { | ||
this.inputValue = val | ||
} | ||
noFiltering !== true && this.filter(val) | ||
} | ||
noFiltering !== true && this.filter(val) | ||
}, | ||
@@ -700,2 +710,11 @@ | ||
if ( | ||
val !== '' && | ||
this.multiple !== true && | ||
this.innerValue.length > 0 && | ||
val === this.__getOptionValue(this.innerValue[0]) | ||
) { | ||
val = '' | ||
} | ||
const filterId = setTimeout(() => { | ||
@@ -747,19 +766,8 @@ this.menu === true && (this.menu = false) | ||
click: e => { | ||
if (this.hasDialog === true) { | ||
this.focused = true | ||
this.dialog = true | ||
this.$emit('focus', e) | ||
} | ||
else if (this.menu === true) { | ||
if (this.hasDialog !== true && this.menu === true) { | ||
this.__closeMenu() | ||
return | ||
} | ||
if (this.$listeners.filter !== void 0) { | ||
this.filter(this.inputValue) | ||
else { | ||
this.showPopup(e) | ||
} | ||
else if (this.noOptions !== true || this.$scopedSlots['no-option'] !== void 0) { | ||
this.menu = true | ||
} | ||
} | ||
@@ -790,2 +798,4 @@ } | ||
clearTimeout(this.focusoutTimer) | ||
this.focused = true | ||
@@ -796,3 +806,5 @@ this.$emit('focus', e) | ||
__onControlFocusout (e) { | ||
setTimeout(() => { | ||
clearTimeout(this.focusoutTimer) | ||
this.focusoutTimer = setTimeout(() => { | ||
clearTimeout(this.inputTimer) | ||
@@ -809,3 +821,3 @@ | ||
this.updateInputValue('', true) | ||
this.__resetInputValue() | ||
this.__closeMenu() | ||
@@ -853,3 +865,3 @@ }, 100) | ||
'&scroll': this.__hydrateOptions, | ||
hide: this.__closeMenu | ||
'before-hide': this.__closeMenu | ||
} | ||
@@ -917,5 +929,5 @@ }, child) | ||
hide: e => { | ||
this.__closePopup() | ||
this.hidePopup() | ||
this.$emit('blur', e) | ||
this.updateInputValue('', true) | ||
this.__resetInputValue() | ||
}, | ||
@@ -936,12 +948,36 @@ show: () => { | ||
clearTimeout(this.filterId) | ||
this.filterId = void 0 | ||
if (this.focused === false) { | ||
clearTimeout(this.filterId) | ||
this.filterId = void 0 | ||
if (this.innerLoading === true) { | ||
this.$emit('filter-abort') | ||
this.innerLoading = false | ||
if (this.innerLoading === true) { | ||
this.$emit('filter-abort') | ||
this.innerLoading = false | ||
} | ||
} | ||
}, | ||
__closePopup () { | ||
showPopup (e) { | ||
clearTimeout(this.focusoutTimer) | ||
if (this.hasDialog === true) { | ||
if (this.focused === false) { | ||
this.$emit('focus', e) | ||
} | ||
this.focused = true | ||
this.dialog = true | ||
} | ||
else { | ||
this.focus(e) | ||
} | ||
if (this.$listeners.filter !== void 0) { | ||
this.filter(this.inputValue) | ||
} | ||
else if (this.noOptions !== true || this.$scopedSlots['no-option'] !== void 0) { | ||
this.menu = true | ||
} | ||
}, | ||
hidePopup () { | ||
this.dialog = false | ||
@@ -951,2 +987,11 @@ this.__closeMenu() | ||
__resetInputValue () { | ||
this.useInput === true && this.updateInputValue( | ||
this.multiple !== true && this.fillInput === true && this.innerValue.length > 0 | ||
? this.__getOptionValue(this.innerValue[0]) || '' | ||
: '', | ||
true | ||
) | ||
}, | ||
__updateMenu (show) { | ||
@@ -982,3 +1027,4 @@ this.optionIndex = -1 | ||
clearTimeout(this.inputTimer) | ||
clearTimeout(this.focusoutTimer) | ||
} | ||
}) |
@@ -161,2 +161,8 @@ { | ||
"fill-input": { | ||
"type": "Boolean", | ||
"desc": "Fills the input with current value; Useful along with 'hide-selected'; Does NOT works along with 'multiple' selection", | ||
"category": "behavior" | ||
}, | ||
"new-value-mode": { | ||
@@ -452,2 +458,10 @@ "type": "String", | ||
"showPopup": { | ||
"desc": "Focus and open popup" | ||
}, | ||
"hidePopup": { | ||
"desc": "Hide popup" | ||
}, | ||
"removeAtIndex": { | ||
@@ -454,0 +468,0 @@ "desc": "Remove selected option located at specific index", |
@@ -7,3 +7,6 @@ import { testPattern } from '../utils/patterns.js' | ||
error: Boolean, | ||
error: { | ||
type: Boolean, | ||
default: null | ||
}, | ||
errorMessage: String, | ||
@@ -47,3 +50,3 @@ noErrorIcon: Boolean, | ||
computedErrorMessage () { | ||
return this.errorMessage !== void 0 | ||
return typeof this.errorMessage === 'string' && this.errorMessage.length > 0 | ||
? this.errorMessage | ||
@@ -50,0 +53,0 @@ : this.innerErrorMessage |
@@ -7,5 +7,7 @@ import Vue from 'vue' | ||
export default { | ||
isActive: false, | ||
start () {}, | ||
stop () {}, | ||
increment () {}, | ||
setDefaults () {}, | ||
@@ -18,2 +20,6 @@ install ({ $q, cfg }) { | ||
let props = cfg.loadingBar !== void 0 | ||
? { ...cfg.loadingBar } | ||
: {} | ||
const bar = $q.loadingBar = new Vue({ | ||
@@ -23,3 +29,3 @@ name: 'LoadingBar', | ||
ref: 'bar', | ||
props: cfg.loadingBar | ||
props | ||
}) | ||
@@ -29,9 +35,23 @@ }).$mount().$refs.bar | ||
Object.assign(this, { | ||
start: bar.start, | ||
stop: bar.stop, | ||
increment: bar.increment | ||
start: speed => { | ||
bar.start(speed) | ||
this.isActive = bar.isActive = bar.calls > 0 | ||
}, | ||
stop: () => { | ||
bar.stop() | ||
this.isActive = bar.isActive = bar.calls > 0 | ||
}, | ||
increment: bar.increment, | ||
setDefaults: def => { | ||
Object.assign(props, def || {}) | ||
bar.$parent.$forceUpdate() | ||
} | ||
}) | ||
document.body.appendChild($q.loadingBar.$parent.$el) | ||
Vue.util.defineReactive(this, 'isActive', this.isActive) | ||
Vue.util.defineReactive(bar, 'isActive', this.isActive) | ||
bar.setDefaults = this.setDefaults | ||
document.body.appendChild(bar.$parent.$el) | ||
} | ||
} |
@@ -40,4 +40,16 @@ { | ||
} | ||
}, | ||
"setDefaults": { | ||
"desc": "Set the inner QAjaxBar's props", | ||
"params": { | ||
"...props": { | ||
"type": "Object", | ||
"desc": "QAjaxBar component props", | ||
"required": true, | ||
"__exemption": [ "examples" ] | ||
} | ||
} | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5561777
122303