Comparing version 1.0.3 to 1.0.4
@@ -233,3 +233,4 @@ { | ||
}, | ||
"desc": "Dialog options" | ||
"desc": "Dialog options", | ||
"tsType": "QDialogOptions" | ||
} | ||
@@ -236,0 +237,0 @@ }, |
@@ -5,2 +5,9 @@ { | ||
"props": { | ||
"userAgent": { | ||
"type": "String", | ||
"desc": "Client browser User Agent", | ||
"examples": [ | ||
"mozilla/5.0 (macintosh; intel mac os x 10_14_5) applewebkit/537.36 (khtml, like gecko) chrome/75.0.3770.100 safari/537.36" | ||
] | ||
}, | ||
"is": { | ||
@@ -7,0 +14,0 @@ "type": "Object", |
@@ -14,3 +14,3 @@ { | ||
"type": "String", | ||
"desc": "The default value to show when the model doesn't has one", | ||
"desc": "The default value to show when the model doesn't have one", | ||
"examples": [ | ||
@@ -17,0 +17,0 @@ "default-value=\"#c0c0c0\"" |
@@ -6,3 +6,3 @@ { | ||
"type": "Boolean", | ||
"desc": "Does field has validation errors?", | ||
"desc": "Does field have validation errors?", | ||
"category": "behavior" | ||
@@ -9,0 +9,0 @@ }, |
@@ -48,3 +48,3 @@ { | ||
"type": "Boolean", | ||
"desc": "Does field has validation errors?", | ||
"desc": "Does field have validation errors?", | ||
"category": "behavior" | ||
@@ -51,0 +51,0 @@ }, |
@@ -6,3 +6,3 @@ { | ||
"type": "Boolean", | ||
"desc": "Does field has validation errors?", | ||
"desc": "Does field have validation errors?", | ||
"category": "behavior" | ||
@@ -9,0 +9,0 @@ }, |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.3 | ||
* Quasar Framework v1.0.4 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
@@ -51,33 +51,3 @@ import Vue, { VueConstructor } from 'vue' | ||
export interface Dialog { | ||
create(opts : { | ||
class? : string | any[] | any | ||
style? : string | any[] | any | ||
title? : string | ||
message? : string | ||
html? : boolean | ||
position? : string | ||
prompt? : { | ||
model? : any[] | string | ||
type? : string } | ||
options? : { | ||
type? : string | ||
model? : any[] | ||
items? : any[] } | ||
ok? : string | any | boolean | ||
cancel? : string | any | boolean | ||
stackButtons? : boolean | ||
color? : string | ||
dark? : boolean | ||
persistent? : boolean | ||
noEscDismiss? : boolean | ||
noBackdropDismiss? : boolean | ||
noRouteDismiss? : boolean | ||
seamless? : boolean | ||
maximized? : boolean | ||
fullWidth? : boolean | ||
fullHeight? : boolean | ||
transitionShow? : string | ||
transitionHide? : string | ||
component? : any | ||
root? : any }): DialogChainObject | ||
create(opts : QDialogOptions): DialogChainObject | ||
} | ||
@@ -163,2 +133,3 @@ | ||
export interface Platform { | ||
userAgent : string | ||
is : any | ||
@@ -1780,2 +1751,35 @@ has : { | ||
export interface QDialogOptions { | ||
class? : string | any[] | any | ||
style? : string | any[] | any | ||
title? : string | ||
message? : string | ||
html? : boolean | ||
position? : string | ||
prompt? : { | ||
model? : any[] | string | ||
type? : string } | ||
options? : { | ||
type? : string | ||
model? : any[] | ||
items? : any[] } | ||
ok? : string | any | boolean | ||
cancel? : string | any | boolean | ||
stackButtons? : boolean | ||
color? : string | ||
dark? : boolean | ||
persistent? : boolean | ||
noEscDismiss? : boolean | ||
noBackdropDismiss? : boolean | ||
noRouteDismiss? : boolean | ||
seamless? : boolean | ||
maximized? : boolean | ||
fullWidth? : boolean | ||
fullHeight? : boolean | ||
transitionShow? : string | ||
transitionHide? : string | ||
component? : any | ||
root? : any | ||
} | ||
export interface QVueGlobals { | ||
@@ -1796,33 +1800,3 @@ addressbarColor: AddressbarColor | ||
cookies: Cookies | ||
dialog (opts : { | ||
class? : string | any[] | any | ||
style? : string | any[] | any | ||
title? : string | ||
message? : string | ||
html? : boolean | ||
position? : string | ||
prompt? : { | ||
model? : any[] | string | ||
type? : string } | ||
options? : { | ||
type? : string | ||
model? : any[] | ||
items? : any[] } | ||
ok? : string | any | boolean | ||
cancel? : string | any | boolean | ||
stackButtons? : boolean | ||
color? : string | ||
dark? : boolean | ||
persistent? : boolean | ||
noEscDismiss? : boolean | ||
noBackdropDismiss? : boolean | ||
noRouteDismiss? : boolean | ||
seamless? : boolean | ||
maximized? : boolean | ||
fullWidth? : boolean | ||
fullHeight? : boolean | ||
transitionShow? : string | ||
transitionHide? : string | ||
component? : any | ||
root? : any }): DialogChainObject | ||
dialog (opts : QDialogOptions): DialogChainObject | ||
loading: Loading | ||
@@ -1829,0 +1803,0 @@ loadingBar: LoadingBar |
{ | ||
"name": "quasar", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time", | ||
@@ -5,0 +5,0 @@ "module": "src/index.esm.js", |
@@ -11,3 +11,3 @@ { | ||
"type": "String", | ||
"desc": "The default value to show when the model doesn't has one", | ||
"desc": "The default value to show when the model doesn't have one", | ||
"examples": [ "default-value=\"#c0c0c0\"" ], | ||
@@ -14,0 +14,0 @@ "category": "model" |
@@ -67,3 +67,3 @@ import Vue from 'vue' | ||
// if it has a number of rows set respect it | ||
else if (this.$attrs.rows > 0) { | ||
else if (this.$attrs.rows > 0 && this.$refs.input !== void 0) { | ||
const inp = this.$refs.input | ||
@@ -92,7 +92,7 @@ inp.style.height = 'auto' | ||
focus () { | ||
this.$refs.input.focus() | ||
this.$refs.input !== void 0 && this.$refs.input.focus() | ||
}, | ||
select () { | ||
this.$refs.input.select() | ||
this.$refs.input !== void 0 && this.$refs.input.select() | ||
}, | ||
@@ -157,4 +157,6 @@ | ||
const inp = this.$refs.input | ||
inp.style.height = '1px' | ||
inp.style.height = inp.scrollHeight + 'px' | ||
if (inp !== void 0) { | ||
inp.style.height = '1px' | ||
inp.style.height = inp.scrollHeight + 'px' | ||
} | ||
}, | ||
@@ -166,2 +168,8 @@ | ||
__onCompositionUpdate (e) { | ||
if (typeof e.data === 'string' && e.data.codePointAt(0) < 256) { | ||
e.target.composing = false | ||
} | ||
}, | ||
__onCompositionEnd (e) { | ||
@@ -194,2 +202,6 @@ if (e.target.composing !== true) { return } | ||
if (this.$q.platform.is.android === true) { | ||
on.compositionupdate = this.__onCompositionUpdate | ||
} | ||
if (this.hasMask === true) { | ||
@@ -196,0 +208,0 @@ on.keydown = this.__onMaskedKeydown |
@@ -60,3 +60,3 @@ import Vue from 'vue' | ||
this.curDocView.removeEventListener('resize', this.trigger, listenOpts.passive) | ||
this.curDocView = null | ||
this.curDocView = void 0 | ||
} | ||
@@ -63,0 +63,0 @@ }, |
@@ -132,3 +132,9 @@ import Vue from 'vue' | ||
const optionsLength = Array.isArray(options) === false ? 0 : options.length | ||
this.optionsHeights = Array.from(Array(optionsLength), () => optionDefaultHeight) | ||
const optionsHeights = new Array(optionsLength) | ||
for (let i = optionsLength - 1; i >= 0; i--) { | ||
optionsHeights[i] = optionDefaultHeight | ||
} | ||
this.optionsHeights = optionsHeights | ||
this.optionsHeight = optionsLength * optionDefaultHeight | ||
@@ -796,2 +802,8 @@ this.optionsMarginTop = this.optionsHeight | ||
__onCompositionUpdate (e) { | ||
if (typeof e.data === 'string' && e.data.codePointAt(0) < 256) { | ||
e.target.composing = false | ||
} | ||
}, | ||
__onCompositionEnd (e) { | ||
@@ -805,2 +817,18 @@ if (e.target.composing !== true) { return } | ||
__getInput (h) { | ||
const on = { | ||
input: this.__onInputValue, | ||
// Safari < 10.2 & UIWebView doesn't fire compositionend when | ||
// switching focus before confirming composition choice | ||
// this also fixes the issue where some browsers e.g. iOS Chrome | ||
// fires "change" instead of "input" on autocomplete. | ||
change: this.__onCompositionEnd, | ||
compositionstart: this.__onCompositionStart, | ||
compositionend: this.__onCompositionEnd, | ||
keydown: this.__onTargetKeydown | ||
} | ||
if (this.$q.platform.is.android === true) { | ||
on.compositionupdate = this.__onCompositionUpdate | ||
} | ||
return h('input', { | ||
@@ -819,13 +847,3 @@ ref: 'target', | ||
}, | ||
on: { | ||
input: this.__onInputValue, | ||
// Safari < 10.2 & UIWebView doesn't fire compositionend when | ||
// switching focus before confirming composition choice | ||
// this also fixes the issue where some browsers e.g. iOS Chrome | ||
// fires "change" instead of "input" on autocomplete. | ||
change: this.__onCompositionEnd, | ||
compositionstart: this.__onCompositionStart, | ||
compositionend: this.__onCompositionEnd, | ||
keydown: this.__onTargetKeydown | ||
} | ||
on | ||
}) | ||
@@ -1147,5 +1165,5 @@ }, | ||
mounted () { | ||
this.__setOptionsSliceRange = this.$q.platform.is.android === true | ||
? debounce(this.__setOptionsSliceRange, 50) | ||
: frameDebounce(this.__setOptionsSliceRange) | ||
this.__setOptionsSliceRange = this.$q.platform.is.ios === true || this.$q.platform.is.safari === true | ||
? frameDebounce(this.__setOptionsSliceRange) | ||
: debounce(this.__setOptionsSliceRange, 50) | ||
}, | ||
@@ -1152,0 +1170,0 @@ |
import Platform from '../plugins/Platform.js' | ||
import { setObserver, removeObserver, getModifierDirections, updateModifiers } from '../utils/touch.js' | ||
import { position, leftClick, listenOpts, prevent, stop, stopAndPrevent } from '../utils/event.js' | ||
import { position, leftClick, listenOpts, prevent, stop, stopAndPrevent, preventDraggable } from '../utils/event.js' | ||
import { clearSelection } from '../utils/selection.js' | ||
@@ -150,2 +150,3 @@ | ||
start (evt, mouseEvent) { | ||
Platform.is.firefox === true && preventDraggable(el, true) | ||
removeObserver(ctx) | ||
@@ -242,2 +243,3 @@ mouseEvent !== true && setObserver(el, evt, ctx) | ||
Platform.is.firefox === true && preventDraggable(el, false) | ||
ctx.event.mouse !== true && removeObserver(ctx) | ||
@@ -291,2 +293,3 @@ | ||
if (ctx !== void 0) { | ||
Platform.is.firefox === true && preventDraggable(el, false) | ||
removeObserver(ctx) | ||
@@ -293,0 +296,0 @@ |
import Platform from '../plugins/Platform.js' | ||
import { setObserver, removeObserver, getModifierDirections, updateModifiers } from '../utils/touch.js' | ||
import { position, leftClick, stopAndPrevent, listenOpts } from '../utils/event.js' | ||
import { position, leftClick, stopAndPrevent, listenOpts, preventDraggable } from '../utils/event.js' | ||
import { clearSelection } from '../utils/selection.js' | ||
@@ -57,2 +57,3 @@ | ||
start (evt, mouseEvent) { | ||
Platform.is.firefox === true && preventDraggable(el, true) | ||
removeObserver(ctx) | ||
@@ -195,2 +196,3 @@ mouseEvent !== true && setObserver(el, evt, ctx) | ||
Platform.is.firefox === true && preventDraggable(el, false) | ||
removeObserver(ctx) | ||
@@ -235,2 +237,3 @@ | ||
if (ctx !== void 0) { | ||
Platform.is.firefox === true && preventDraggable(el, false) | ||
removeObserver(ctx) | ||
@@ -237,0 +240,0 @@ document.body.classList.remove('no-pointer-events') |
@@ -5,3 +5,3 @@ { | ||
"type": "Boolean", | ||
"desc": "Does field has validation errors?", | ||
"desc": "Does field have validation errors?", | ||
"category": "behavior" | ||
@@ -8,0 +8,0 @@ }, |
@@ -12,2 +12,3 @@ { | ||
"desc": "Dialog options", | ||
"tsType": "QDialogOptions", | ||
"definition": { | ||
@@ -14,0 +15,0 @@ "title": { |
@@ -12,9 +12,10 @@ /* eslint-disable no-useless-escape */ | ||
function getMatch (userAgent, platformMatch) { | ||
const match = /(edge)\/([\w.]+)/.exec(userAgent) || | ||
const match = /(edge|edga|edgios)\/([\w.]+)/.exec(userAgent) || | ||
/(opr)[\/]([\w.]+)/.exec(userAgent) || | ||
/(vivaldi)[\/]([\w.]+)/.exec(userAgent) || | ||
/(chrome)[\/]([\w.]+)/.exec(userAgent) || | ||
/(chrome|crios)[\/]([\w.]+)/.exec(userAgent) || | ||
/(iemobile)[\/]([\w.]+)/.exec(userAgent) || | ||
/(version)(applewebkit)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(userAgent) || | ||
/(webkit)[\/]([\w.]+).*(version)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(userAgent) || | ||
/(firefox|fxios)[\/]([\w.]+)/.exec(userAgent) || | ||
/(webkit)[\/]([\w.]+)/.exec(userAgent) || | ||
@@ -35,2 +36,6 @@ /(opera)(?:.*version|)[\/]([\w.]+)/.exec(userAgent) || | ||
function getClientUserAgent () { | ||
return (navigator.userAgent || navigator.vendor || window.opera).toLowerCase() | ||
} | ||
function getPlatformMatch (userAgent) { | ||
@@ -55,4 +60,2 @@ return /(ipad)/.exec(userAgent) || | ||
function getPlatform (userAgent) { | ||
userAgent = (userAgent || navigator.userAgent || navigator.vendor || window.opera).toLowerCase() | ||
const | ||
@@ -74,2 +77,3 @@ platformMatch = getPlatformMatch(userAgent), | ||
const knownMobiles = browser.android || | ||
browser.ios || | ||
browser.bb || | ||
@@ -88,2 +92,15 @@ browser.blackberry || | ||
browser.mobile = true | ||
if (browser.edga || browser.edgios) { | ||
browser.edge = true | ||
matched.browser = 'edge' | ||
} | ||
else if (browser.crios) { | ||
browser.chrome = true | ||
matched.browser = 'chrome' | ||
} | ||
else if (browser.fxios) { | ||
browser.firefox = true | ||
matched.browser = 'firefox' | ||
} | ||
} | ||
@@ -129,8 +146,2 @@ // If it's not mobile we should consider it's desktop platform, meaning it runs a desktop browser | ||
// Edge is officially known as Microsoft Edge, so rewrite the key to match | ||
if (browser.edge) { | ||
matched.browser = 'edge' | ||
browser.edge = true | ||
} | ||
// Blackberry browsers are marked as Safari on BlackBerry | ||
@@ -243,8 +254,16 @@ if (browser.safari && browser.blackberry || browser.bb) { | ||
parseSSR (/* ssrContext */ ssr) { | ||
return ssr ? { | ||
is: getPlatform(ssr.req.headers['user-agent'] || ssr.req.headers['User-Agent']), | ||
has: this.has, | ||
within: this.within | ||
} : { | ||
is: getPlatform(), | ||
if (ssr) { | ||
const userAgent = (ssr.req.headers['user-agent'] || ssr.req.headers['User-Agent'] || '').toLowerCase() | ||
return { | ||
userAgent, | ||
is: getPlatform(userAgent), | ||
has: this.has, | ||
within: this.within | ||
} | ||
} | ||
const userAgent = getClientUserAgent() | ||
return { | ||
userAgent, | ||
is: getPlatform(userAgent), | ||
...getClientProperties() | ||
@@ -262,3 +281,4 @@ } | ||
this.is = getPlatform() | ||
this.userAgent = getClientUserAgent() | ||
this.is = getPlatform(this.userAgent) | ||
@@ -265,0 +285,0 @@ if (fromSSR === true) { |
@@ -5,2 +5,10 @@ { | ||
"props": { | ||
"userAgent": { | ||
"type": "String", | ||
"desc": "Client browser User Agent", | ||
"examples": [ | ||
"mozilla/5.0 (macintosh; intel mac os x 10_14_5) applewebkit/537.36 (khtml, like gecko) chrome/75.0.3770.100 safari/537.36" | ||
] | ||
}, | ||
"is": { | ||
@@ -7,0 +15,0 @@ "type": "Object", |
@@ -108,2 +108,20 @@ export const listenOpts = { | ||
export function preventDraggable (el, status) { | ||
if (el === void 0 || (status === true && el.__dragPrevented === true)) { | ||
return | ||
} | ||
const fn = status === true | ||
? el => { | ||
el.__dragPrevented = true | ||
el.addEventListener('dragstart', prevent) | ||
} | ||
: el => { | ||
delete el.__dragPrevented | ||
el.removeEventListener('dragstart', prevent) | ||
} | ||
el.querySelectorAll('a, img').forEach(fn) | ||
} | ||
export function create (name, { bubbles = false, cancelable = false } = {}) { | ||
@@ -132,3 +150,4 @@ try { | ||
stopAndPrevent, | ||
preventDraggable, | ||
create | ||
} |
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
5775741
126112