Comparing version 1.0.0-rc.5 to 1.0.0
@@ -33,4 +33,4 @@ { | ||
"type": "String", | ||
"desc": "Forces a certain model format upon the model", | ||
"default": "auto", | ||
"desc": "Forces a certain model format upon the model", | ||
"values": [ | ||
@@ -48,6 +48,15 @@ "auto", | ||
}, | ||
"palette": { | ||
"type": "Array", | ||
"desc": "Use a custom palette of colors for the palette tab", | ||
"default": "(hard-coded palette)", | ||
"examples": [ | ||
":palette=\"[ '#019A9D', '#D9B801', 'rgb(23,120,0)', '#B2028A' ]\"" | ||
], | ||
"category": "content" | ||
}, | ||
"no-header": { | ||
"type": "Boolean", | ||
"desc": "Do not render header", | ||
"category": "behavior" | ||
"category": "content" | ||
}, | ||
@@ -57,3 +66,3 @@ "no-footer": { | ||
"desc": "Do not render footer; Useful when you want a specific view ('default-view' prop) and don't want the user to be able to switch it", | ||
"category": "behavior" | ||
"category": "content" | ||
}, | ||
@@ -60,0 +69,0 @@ "disable": { |
@@ -50,2 +50,7 @@ { | ||
}, | ||
"mini-to-overlay": { | ||
"type": "Boolean", | ||
"desc": "Mini mode will expand as an overlay", | ||
"category": "behavior" | ||
}, | ||
"breakpoint": { | ||
@@ -52,0 +57,0 @@ "type": "Number", |
@@ -58,3 +58,8 @@ { | ||
"desc": "Function to call when you made all necessary updates. DO NOT forget to call it otherwise your loading message will continue to be displayed", | ||
"params": null, | ||
"params": { | ||
"stop": { | ||
"type": "Boolean", | ||
"desc": "Stops QInfiniteScroll if it's Boolean 'true'; Specify it in case there's nothing more to load" | ||
} | ||
}, | ||
"returns": null | ||
@@ -61,0 +66,0 @@ } |
@@ -95,2 +95,7 @@ { | ||
}, | ||
"stretch": { | ||
"type": "Boolean", | ||
"desc": "When used on flexbox parent, tabs will stretch to parent's height", | ||
"category": "content" | ||
}, | ||
"shrink": { | ||
@@ -97,0 +102,0 @@ "type": "Boolean", |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
/*! | ||
* Quasar Framework v1.0.0-rc.5 | ||
* Quasar Framework v1.0.0 | ||
* (c) 2016-present Razvan Stoenescu | ||
@@ -4,0 +4,0 @@ * Released under the MIT License. |
@@ -542,2 +542,3 @@ import Vue, { VueConstructor } from 'vue' | ||
formatModel? : string | ||
palette? : any[] | ||
noHeader? : boolean | ||
@@ -869,2 +870,3 @@ noFooter? : boolean | ||
miniWidth? : number | ||
miniToOverlay? : boolean | ||
breakpoint? : number | ||
@@ -1621,2 +1623,3 @@ behavior? : string | ||
rightIcon? : string | ||
stretch? : boolean | ||
shrink? : boolean | ||
@@ -1623,0 +1626,0 @@ switchIndicator? : boolean |
@@ -333,2 +333,3 @@ { | ||
"format-model", | ||
"palette", | ||
"no-header", | ||
@@ -641,2 +642,3 @@ "no-footer", | ||
"mini-width", | ||
"mini-to-overlay", | ||
"breakpoint", | ||
@@ -1453,2 +1455,3 @@ "behavior", | ||
"right-icon", | ||
"stretch", | ||
"shrink", | ||
@@ -1455,0 +1458,0 @@ "switch-indicator", |
{ | ||
"name": "quasar", | ||
"version": "1.0.0-rc.5", | ||
"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", | ||
"version": "1.0.0", | ||
"description": "Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time", | ||
"module": "src/index.esm.js", | ||
@@ -54,10 +54,10 @@ "typings": "dist/types/index.d.ts", | ||
"@babel/core": "^7.4.5", | ||
"@quasar/babel-preset-app": "^1.0.2", | ||
"@quasar/extras": "^1.1.3", | ||
"@quasar/babel-preset-app": "^1.1.3", | ||
"@quasar/extras": "^1.1.4", | ||
"autoprefixer": "^9.5.0", | ||
"babel-eslint": "^10.0.1", | ||
"babel-eslint": "^10.0.2", | ||
"babel-loader": "^8.0.6", | ||
"babel-preset-es2015-rollup": "^3.0.0", | ||
"chokidar": "^3.0.0", | ||
"css-loader": "^2.1.1", | ||
"css-loader": "^3.0.0", | ||
"cssnano": "^4.1.10", | ||
@@ -73,3 +73,3 @@ "eslint": "^5.15.3", | ||
"eslint-plugin-vue": "^5.2.1", | ||
"file-loader": "^3.0.1", | ||
"file-loader": "^4.0.0", | ||
"friendly-errors-webpack-plugin": "^1.6.1", | ||
@@ -80,10 +80,10 @@ "html-webpack-plugin": "^3.2.0", | ||
"memory-fs": "^0.4.1", | ||
"open": "^6.3.0", | ||
"open": "^6.4.0", | ||
"postcss-loader": "^3.0.0", | ||
"postcss-rtl": "^1.3.3", | ||
"rimraf": "^2.6.3", | ||
"rollup": "^1.15.5", | ||
"rollup": "^1.16.3", | ||
"rollup-plugin-buble": "^0.19.6", | ||
"rollup-plugin-json": "^4.0.0", | ||
"rollup-plugin-node-resolve": "^5.0.2", | ||
"rollup-plugin-node-resolve": "^5.2.0", | ||
"style-resources-loader": "^1.2.1", | ||
@@ -93,3 +93,3 @@ "stylus": "^0.54.5", | ||
"uglify-es": "^3.3.9", | ||
"url-loader": "^1.1.2", | ||
"url-loader": "^2.0.1", | ||
"vue": "^2.6.10", | ||
@@ -101,6 +101,6 @@ "vue-loader": "^15.7.0", | ||
"vue-template-compiler": "^2.6.10", | ||
"webpack": "^4.34.0", | ||
"webpack": "^4.35.2", | ||
"webpack-chain": "^6.0.0", | ||
"webpack-dev-middleware": "^3.7.0", | ||
"webpack-dev-server": "^3.4.1", | ||
"webpack-dev-server": "^3.7.2", | ||
"webpack-hot-middleware": "^2.25.0", | ||
@@ -107,0 +107,0 @@ "webpack-merge": "^4.2.1", |
@@ -110,3 +110,4 @@ import Vue from 'vue' | ||
disable: this.disable === true || this.disableMainBtn === true, | ||
noWrap: true | ||
noWrap: true, | ||
round: false | ||
}, | ||
@@ -127,3 +128,4 @@ on: { | ||
noWrap: true, | ||
iconRight: this.iconRight | ||
iconRight: this.iconRight, | ||
round: false | ||
}, | ||
@@ -130,0 +132,0 @@ on: { |
@@ -53,2 +53,4 @@ import Vue from 'vue' | ||
palette: Array, | ||
noHeader: Boolean, | ||
@@ -161,2 +163,8 @@ noFooter: Boolean, | ||
return inp | ||
}, | ||
computedPalette () { | ||
return this.palette !== void 0 && this.palette.length > 0 | ||
? this.palette | ||
: palette | ||
} | ||
@@ -367,3 +375,3 @@ }, | ||
input: this.__onHueChange, | ||
dragend: val => this.__onHueChange(val, true) | ||
change: val => this.__onHueChange(val, true) | ||
} | ||
@@ -384,3 +392,3 @@ }) | ||
input: value => this.__onNumericChange({ target: { value } }, 'a', 100), | ||
dragend: value => this.__onNumericChange({ target: { value } }, 'a', 100, true) | ||
change: value => this.__onNumericChange({ target: { value } }, 'a', 100, true) | ||
} | ||
@@ -408,3 +416,4 @@ }) | ||
on: { | ||
input: value => this.__onNumericChange({ target: { value } }, 'r', 255) | ||
input: value => this.__onNumericChange({ target: { value } }, 'r', 255), | ||
change: value => this.__onNumericChange({ target: { value } }, 'r', 255, true) | ||
} | ||
@@ -439,3 +448,4 @@ }), | ||
on: { | ||
input: value => this.__onNumericChange({ target: { value } }, 'g', 255) | ||
input: value => this.__onNumericChange({ target: { value } }, 'g', 255), | ||
change: value => this.__onNumericChange({ target: { value } }, 'g', 255, true) | ||
} | ||
@@ -470,3 +480,4 @@ }), | ||
on: { | ||
input: value => this.__onNumericChange({ target: { value } }, 'b', 255) | ||
input: value => this.__onNumericChange({ target: { value } }, 'b', 255), | ||
change: value => this.__onNumericChange({ target: { value } }, 'b', 255, true) | ||
} | ||
@@ -499,3 +510,4 @@ }), | ||
on: { | ||
input: value => this.__onNumericChange({ target: { value } }, 'a', 100) | ||
input: value => this.__onNumericChange({ target: { value } }, 'a', 100), | ||
change: value => this.__onNumericChange({ target: { value } }, 'a', 100, true) | ||
} | ||
@@ -523,5 +535,7 @@ }), | ||
h('div', { | ||
staticClass: 'row items-center', | ||
class: this.editable ? 'cursor-pointer' : null | ||
}, palette.map(color => h('div', { | ||
staticClass: 'row items-center q-color-picker__palette-rows', | ||
class: this.editable === true | ||
? 'q-color-picker__palette-rows--editable' | ||
: null | ||
}, this.computedPalette.map(color => h('div', { | ||
staticClass: 'q-color-picker__cube col-auto', | ||
@@ -714,15 +728,12 @@ style: { backgroundColor: color }, | ||
__onPalettePick (color) { | ||
const model = color.substring(4, color.length - 1).split(',') | ||
const def = this.__parseModel(color) | ||
const rgb = { r: def.r, g: def.g, b: def.b, a: def.a } | ||
const rgb = { | ||
r: parseInt(model[0], 10), | ||
g: parseInt(model[1], 10), | ||
b: parseInt(model[2], 10), | ||
a: this.model.a | ||
if (rgb.a === void 0) { | ||
rgb.a = this.model.a | ||
} | ||
const hsv = rgbToHsv(rgb) | ||
this.model.h = hsv.h | ||
this.model.s = hsv.s | ||
this.model.v = hsv.v | ||
this.model.h = def.h | ||
this.model.s = def.s | ||
this.model.v = def.v | ||
@@ -745,3 +756,3 @@ this.__update(rgb, true) | ||
this.$emit('input', value) | ||
change && value !== this.value && this.$emit('change', value) | ||
change === true && this.$emit('change', value) | ||
}, | ||
@@ -748,0 +759,0 @@ |
@@ -26,4 +26,4 @@ { | ||
"type": "String", | ||
"desc": "Forces a certain model format upon the model", | ||
"default": "auto", | ||
"desc": "Forces a certain model format upon the model", | ||
"values": [ "auto", "hex", "rgb", "hexa", "rgba" ], | ||
@@ -34,6 +34,16 @@ "examples": [ "hex" ], | ||
"palette": { | ||
"type": "Array", | ||
"desc": "Use a custom palette of colors for the palette tab", | ||
"default": "(hard-coded palette)", | ||
"examples": [ | ||
":palette=\"[ '#019A9D', '#D9B801', 'rgb(23,120,0)', '#B2028A' ]\"" | ||
], | ||
"category": "content" | ||
}, | ||
"no-header": { | ||
"type": "Boolean", | ||
"desc": "Do not render header", | ||
"category": "behavior" | ||
"category": "content" | ||
}, | ||
@@ -44,3 +54,3 @@ | ||
"desc": "Do not render footer; Useful when you want a specific view ('default-view' prop) and don't want the user to be able to switch it", | ||
"category": "behavior" | ||
"category": "content" | ||
}, | ||
@@ -47,0 +57,0 @@ |
@@ -121,3 +121,3 @@ import Vue from 'vue' | ||
// if ENTER key | ||
if (evt.keyCode === 13) { | ||
if (this.prompt.type !== 'textarea' && evt.keyCode === 13) { | ||
this.onOk() | ||
@@ -124,0 +124,0 @@ } |
@@ -138,3 +138,3 @@ import Vue from 'vue' | ||
focus () { | ||
let node = this.__portal.$refs !== void 0 ? this.__portal.$refs.inner : void 0 | ||
let node = this.__getInnerNode() | ||
@@ -159,3 +159,3 @@ if (node === void 0 || node.contains(document.activeElement) === true) { | ||
const node = this.__portal.$refs !== void 0 ? this.__portal.$refs.inner : void 0 | ||
const node = this.__getInnerNode() | ||
@@ -172,2 +172,8 @@ if (node !== void 0) { | ||
__getInnerNode () { | ||
return this.__portal !== void 0 && this.__portal.$refs !== void 0 | ||
? this.__portal.$refs.inner | ||
: void 0 | ||
}, | ||
__show (evt) { | ||
@@ -277,4 +283,6 @@ clearTimeout(this.timer) | ||
__onFocusChange (e) { | ||
const node = this.__getInnerNode() | ||
if ( | ||
this.__portal !== void 0 && | ||
node !== void 0 && | ||
this.__portal.$el !== void 0 && | ||
@@ -285,3 +293,3 @@ // we don't have another portal opened: | ||
) { | ||
this.__portal.$refs.inner.focus() | ||
node.focus() | ||
} | ||
@@ -288,0 +296,0 @@ }, |
@@ -174,2 +174,5 @@ function getBlockElement (el, parent) { | ||
} | ||
if (name === 'link') { | ||
return this.selection || this.is('link') | ||
} | ||
} | ||
@@ -214,4 +217,4 @@ | ||
} | ||
this.vm.editLinkUrl = urlRegex.test(url) ? url : '' | ||
document.execCommand('createLink', false, this.vm.editLinkUrl === '' ? ' ' : this.vm.editLinkUrl) | ||
this.vm.editLinkUrl = urlRegex.test(url) ? url : 'https://' | ||
document.execCommand('createLink', false, this.vm.editLinkUrl) | ||
} | ||
@@ -221,4 +224,6 @@ else { | ||
} | ||
this.range.selectNodeContents(this.parent) | ||
this.save() | ||
this.vm.$nextTick(() => { | ||
this.range.selectNodeContents(this.parent) | ||
this.save() | ||
}) | ||
return | ||
@@ -248,3 +253,3 @@ } | ||
selectWord (sel) { | ||
if (!sel.isCollapsed) { | ||
if (!sel || !sel.isCollapsed) { | ||
return sel | ||
@@ -251,0 +256,0 @@ } |
@@ -258,3 +258,5 @@ import QBtn from '../btn/QBtn.js' | ||
vm.caret.restore() | ||
!vm.editLinkUrl && document.execCommand('unlink') | ||
if (!vm.editLinkUrl || vm.editLinkUrl === 'https://') { | ||
document.execCommand('unlink') | ||
} | ||
vm.editLinkUrl = null | ||
@@ -261,0 +263,0 @@ break |
@@ -83,2 +83,3 @@ import Vue from 'vue' | ||
return { | ||
type: 'a', | ||
flat, | ||
@@ -110,3 +111,3 @@ noWrap: true, | ||
superscript: { cmd: 'superscript', icon: i.superscript, tip: e.superscript, htmlTip: 'x<superscript>2</superscript>' }, | ||
link: { cmd: 'link', icon: i.hyperlink, tip: e.hyperlink, key: 76 }, | ||
link: { cmd: 'link', disable: vm => vm.caret && !vm.caret.can('link'), icon: i.hyperlink, tip: e.hyperlink, key: 76 }, | ||
fullscreen: { cmd: 'fullscreen', icon: i.toggleFullscreen, tip: e.toggleFullscreen, key: 70 }, | ||
@@ -275,2 +276,4 @@ | ||
__onKeydown (e) { | ||
this.$emit('keydown', e) | ||
if (!e.ctrlKey) { | ||
@@ -291,2 +294,12 @@ this.refreshToolbar() | ||
__onClick (e) { | ||
this.refreshToolbar() | ||
this.$emit('click', e) | ||
}, | ||
__onBlur () { | ||
this.caret.save() | ||
this.$emit('blur') | ||
}, | ||
runCmd (cmd, param, update = true) { | ||
@@ -392,8 +405,7 @@ this.focus() | ||
on: { | ||
...this.$listeners, | ||
input: this.__onInput, | ||
keydown: this.__onKeydown, | ||
click: this.refreshToolbar, | ||
blur: () => { | ||
this.caret.save() | ||
} | ||
click: this.__onClick, | ||
blur: this.__onBlur | ||
} | ||
@@ -400,0 +412,0 @@ } |
@@ -179,2 +179,11 @@ import Vue from 'vue' | ||
this.__focus() | ||
}, | ||
blur () { | ||
const el = document.activeElement | ||
this.$el.contains(el) && el.blur() | ||
}, | ||
__focus () { | ||
let target = this.$refs.target | ||
@@ -187,7 +196,2 @@ if (target !== void 0) { | ||
blur () { | ||
const el = document.activeElement | ||
this.$el.contains(el) && el.blur() | ||
}, | ||
__getContent (h) { | ||
@@ -194,0 +198,0 @@ const node = [] |
@@ -103,3 +103,3 @@ import Vue from 'vue' | ||
this.validate().then(val => { | ||
val === true && this.$emit('submit') | ||
val === true && this.$emit('submit', evt) | ||
}) | ||
@@ -106,0 +106,0 @@ }, |
@@ -78,3 +78,3 @@ import Vue from 'vue' | ||
this.$emit('load', this.index, () => { | ||
this.$emit('load', this.index, stop => { | ||
if (this.working === true) { | ||
@@ -92,3 +92,8 @@ this.fetching = false | ||
this.$el.closest('body') && this.poll() | ||
if (stop === true) { | ||
this.stop() | ||
} | ||
else { | ||
this.$el.closest('body') && this.poll() | ||
} | ||
}) | ||
@@ -95,0 +100,0 @@ } |
@@ -54,3 +54,8 @@ { | ||
"desc": "Function to call when you made all necessary updates. DO NOT forget to call it otherwise your loading message will continue to be displayed", | ||
"params": null, | ||
"params": { | ||
"stop": { | ||
"type": "Boolean", | ||
"desc": "Stops QInfiniteScroll if it's Boolean 'true'; Specify it in case there's nothing more to load" | ||
} | ||
}, | ||
"returns": null | ||
@@ -57,0 +62,0 @@ } |
@@ -99,2 +99,6 @@ import Vue from 'vue' | ||
__onInput (e) { | ||
if (e && e.target && e.target.composing === true) { | ||
return | ||
} | ||
if (this.type === 'file') { | ||
@@ -156,2 +160,18 @@ this.$emit('input', e.target.files) | ||
__onCompositionStart (e) { | ||
e.target.composing = true | ||
}, | ||
__onCompositionEnd (e) { | ||
if (e.target.composing !== true) { return } | ||
e.target.composing = false | ||
this.__onInput(e) | ||
}, | ||
__onChange (e) { | ||
this.__onCompositionEnd(e) | ||
this.$emit('change', e) | ||
}, | ||
__getControl (h) { | ||
@@ -161,2 +181,9 @@ const on = { | ||
input: this.__onInput, | ||
// 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.__onChange, | ||
compositionstart: this.__onCompositionStart, | ||
compositionend: this.__onCompositionEnd, | ||
focus: stop, | ||
@@ -185,3 +212,3 @@ blur: stop | ||
return h(this.isTextarea ? 'textarea' : 'input', { | ||
return h(this.isTextarea === true ? 'textarea' : 'input', { | ||
ref: 'input', | ||
@@ -188,0 +215,0 @@ staticClass: 'q-field__native q-placeholder', |
@@ -40,2 +40,3 @@ import Vue from 'vue' | ||
mini: Boolean, | ||
miniToOverlay: Boolean, | ||
miniWidth: { | ||
@@ -164,5 +165,9 @@ type: Number, | ||
this.applyPosition() | ||
this.__update('size', val) | ||
this.__updateSizeOnLayout(this.miniToOverlay, val) | ||
}, | ||
miniToOverlay (val) { | ||
this.__updateSizeOnLayout(val, this.size) | ||
}, | ||
'$q.lang.rtl' () { | ||
@@ -187,3 +192,3 @@ this.applyPosition() | ||
return this.showing === true && this.mobileOpened === false && this.overlay === false | ||
? this.size | ||
? (this.miniToOverlay === true ? this.miniWidth : this.size) | ||
: 0 | ||
@@ -193,7 +198,11 @@ }, | ||
size () { | ||
return this.isMini === true ? this.miniWidth : this.width | ||
return this.isMini === true | ||
? this.miniWidth | ||
: this.width | ||
}, | ||
fixed () { | ||
return this.overlay === true || this.layout.view.indexOf(this.rightSide ? 'R' : 'L') > -1 | ||
return this.overlay === true || | ||
this.miniToOverlay === true || | ||
this.layout.view.indexOf(this.rightSide ? 'R' : 'L') > -1 | ||
}, | ||
@@ -267,5 +276,5 @@ | ||
: ` q-drawer--${this.isMini === true ? 'mini' : 'standard'}` + | ||
(this.fixed === true || this.onLayout !== true ? ' fixed' : '') + | ||
(this.overlay === true ? ' q-drawer--on-top' : '') + | ||
(this.headerSlot === true ? ' q-drawer--top-padding' : '') | ||
(this.fixed === true || this.onLayout !== true ? ' fixed' : '') + | ||
(this.overlay === true || this.miniToOverlay === true ? ' q-drawer--on-top' : '') + | ||
(this.headerSlot === true ? ' q-drawer--top-padding' : '') | ||
) | ||
@@ -473,2 +482,6 @@ }, | ||
} | ||
}, | ||
__updateSizeOnLayout (miniToOverlay, size) { | ||
this.__update('size', miniToOverlay === true ? this.miniWidth : size) | ||
} | ||
@@ -479,3 +492,3 @@ }, | ||
this.layout.instances[this.side] = this | ||
this.__update('size', this.size) | ||
this.__updateSizeOnLayout(this.miniToOverlay, this.size) | ||
this.__update('space', this.onLayout) | ||
@@ -482,0 +495,0 @@ this.__update('offset', this.offset) |
@@ -42,2 +42,8 @@ { | ||
"mini-to-overlay": { | ||
"type": "Boolean", | ||
"desc": "Mini mode will expand as an overlay", | ||
"category": "behavior" | ||
}, | ||
"breakpoint": { | ||
@@ -44,0 +50,0 @@ "type": "Number", |
@@ -124,3 +124,3 @@ import Vue from 'vue' | ||
h('div', { | ||
staticClass: 'overflow-auto', | ||
staticClass: 'scroll', | ||
style: this.targetChildStyle | ||
@@ -181,3 +181,3 @@ }, [ layout ]) | ||
__updateScrollbarWidth () { | ||
if (this.container) { | ||
if (this.container === true) { | ||
const width = this.height > this.containerHeight | ||
@@ -184,0 +184,0 @@ ? getScrollbarWidth() |
@@ -32,7 +32,7 @@ import Vue from 'vue' | ||
const minHeight = this.layout.container === true | ||
? (this.layout.containerHeight - offset) + 'px' | ||
: (offset !== 0 ? `calc(100vh - ${offset}px)` : `100vh`) | ||
const height = this.layout.container === true | ||
? this.layout.containerHeight | ||
: this.$q.screen.height | ||
return { minHeight } | ||
return { minHeight: (height - offset) + 'px' } | ||
}, | ||
@@ -39,0 +39,0 @@ |
@@ -55,2 +55,20 @@ import Vue from 'vue' | ||
this.$emit('resize', this.size) | ||
}, | ||
__cleanup () { | ||
if (this.curDocView !== void 0) { | ||
this.curDocView.removeEventListener('resize', this.trigger, listenOpts.passive) | ||
this.curDocView = null | ||
} | ||
}, | ||
__onObjLoad () { | ||
this.__cleanup() | ||
if (this.$el.contentDocument) { | ||
this.curDocView = this.$el.contentDocument.defaultView | ||
this.curDocView.addEventListener('resize', this.trigger, listenOpts.passive) | ||
} | ||
this.trigger(true) | ||
} | ||
@@ -73,8 +91,3 @@ }, | ||
on: { | ||
load: () => { | ||
if (this.$el.contentDocument) { | ||
this.$el.contentDocument.defaultView.addEventListener('resize', this.trigger, listenOpts.passive) | ||
} | ||
this.trigger(true) | ||
} | ||
load: this.__onObjLoad | ||
} | ||
@@ -102,7 +115,9 @@ }) | ||
this.trigger(true) | ||
if (this.$q.platform.is.ie) { | ||
this.url = 'about:blank' | ||
this.trigger(true) | ||
} | ||
else { | ||
this.__onObjLoad() | ||
} | ||
}, | ||
@@ -118,6 +133,4 @@ | ||
if (this.$el.contentDocument) { | ||
this.$el.contentDocument.defaultView.removeEventListener('resize', this.trigger, listenOpts.passive) | ||
} | ||
this.__cleanup() | ||
} | ||
}) |
@@ -6,3 +6,4 @@ import Vue from 'vue' | ||
getModel, | ||
SliderMixin | ||
SliderMixin, | ||
keyCodes | ||
} from '../slider/slider-utils.js' | ||
@@ -197,4 +198,4 @@ | ||
this.$emit('input', this.model) | ||
change === true && this.$emit('change', this.model) | ||
} | ||
change === true && this.$emit('change', this.model) | ||
}, | ||
@@ -336,4 +337,3 @@ | ||
__keydown (evt) { | ||
// PGDOWN, LEFT, DOWN, PGUP, RIGHT, UP | ||
if (![34, 37, 40, 33, 39, 38].includes(evt.keyCode)) { | ||
if (!keyCodes.includes(evt.keyCode)) { | ||
return | ||
@@ -351,3 +351,3 @@ } | ||
this.model.min = between( | ||
const min = between( | ||
parseFloat((this.model.min + offset).toFixed(this.decimals)), | ||
@@ -358,12 +358,21 @@ this.min, | ||
this.model.max = parseFloat((this.model.min + interval).toFixed(this.decimals)) | ||
this.model = { | ||
min, | ||
max: parseFloat((min + interval).toFixed(this.decimals)) | ||
} | ||
} | ||
else if (this.focus === false) { | ||
return | ||
} | ||
else { | ||
const which = this.focus | ||
this.model[which] = between( | ||
parseFloat((this.model[which] + offset).toFixed(this.decimals)), | ||
which === 'min' ? this.min : this.model.min, | ||
which === 'max' ? this.max : this.model.max | ||
) | ||
this.model = { | ||
...this.model, | ||
[which]: between( | ||
parseFloat((this.model[which] + offset).toFixed(this.decimals)), | ||
which === 'min' ? this.min : this.model.min, | ||
which === 'max' ? this.max : this.model.max | ||
) | ||
} | ||
} | ||
@@ -370,0 +379,0 @@ |
@@ -16,2 +16,4 @@ import Vue from 'vue' | ||
import { stop, prevent, stopAndPrevent } from '../../utils/event.js' | ||
import debounce from '../../utils/debounce' | ||
import frameDebounce from '../../utils/frame-debounce.js' | ||
import { normalizeToInterval } from '../../utils/format.js' | ||
@@ -21,2 +23,7 @@ | ||
const | ||
optionsSliceSize = 31, | ||
optionDefaultHeight = 24, | ||
optionsListMaxPadding = 100000 | ||
export default Vue.extend({ | ||
@@ -94,3 +101,3 @@ name: 'QSelect', | ||
optionIndex: -1, | ||
optionsToShow: 20, | ||
optionsSliceRange: { from: 0, to: 0 }, | ||
inputValue: '' | ||
@@ -123,2 +130,12 @@ } | ||
this.__updateMenu(show) | ||
}, | ||
options: { | ||
handler (options) { | ||
const optionsLength = Array.isArray(options) === false ? 0 : options.length | ||
this.optionsHeights = Array.from(Array(optionsLength), () => optionDefaultHeight) | ||
this.optionsHeight = optionsLength * optionDefaultHeight | ||
this.optionsMarginTop = this.optionsHeight | ||
}, | ||
immediate: true | ||
} | ||
@@ -187,4 +204,5 @@ }, | ||
optionScope () { | ||
return this.options.slice(0, this.optionsToShow).map((opt, i) => { | ||
return this.options.slice(this.optionsSliceRange.from, this.optionsSliceRange.to).map((opt, i) => { | ||
const disable = this.__isDisabled(opt) | ||
const index = this.optionsSliceRange.from + i | ||
@@ -205,3 +223,3 @@ const itemProps = { | ||
this.__isSelected(opt) === true && (itemProps.active = true) | ||
this.optionIndex === i && (itemProps.focused = true) | ||
this.optionIndex === index && (itemProps.focused = true) | ||
} | ||
@@ -214,7 +232,7 @@ | ||
if (this.$q.platform.is.desktop === true) { | ||
itemEvents.mousemove = () => { this.setOptionIndex(i) } | ||
itemEvents.mousemove = () => { this.setOptionIndex(index) } | ||
} | ||
return { | ||
index: i, | ||
index, | ||
opt, | ||
@@ -305,5 +323,6 @@ sanitize: this.optionsSanitize === true || opt.sanitize === true, | ||
this.multiple !== true && this.updateInputValue( | ||
this.fillInput === true ? this.__getOptionLabel(opt) : '', true | ||
this.fillInput === true ? this.__getOptionLabel(opt) : '', | ||
true | ||
) | ||
this.focus() | ||
this.__focus() | ||
@@ -350,3 +369,3 @@ if (this.multiple !== true) { | ||
const val = index >= -1 && index < this.optionsToShow | ||
const val = index > -1 && index < this.options.length | ||
? index | ||
@@ -438,2 +457,4 @@ : -1 | ||
// up, down | ||
const optionsLength = this.options.length | ||
if (e.keyCode === 38 || e.keyCode === 40) { | ||
@@ -448,26 +469,14 @@ stopAndPrevent(e) | ||
-1, | ||
Math.min(this.optionsToShow, this.options.length) - 1 | ||
optionsLength - 1 | ||
) | ||
if (index === -1) { | ||
this.optionIndex = -1 | ||
return | ||
} | ||
} | ||
while (index !== this.optionIndex && this.__isDisabled(this.options[index]) === true) | ||
while (index !== -1 && index !== this.optionIndex && this.__isDisabled(this.options[index]) === true) | ||
const dir = index > this.optionIndex ? 1 : -1 | ||
this.optionIndex = index | ||
if (this.optionIndex !== index) { | ||
this.__setPreventNextScroll() | ||
this.$nextTick(() => { | ||
const el = this.__getMenuContentEl().querySelector('.q-manual-focusable--focused') | ||
if (el !== null && el.scrollIntoView !== void 0) { | ||
if (el.scrollIntoViewIfNeeded !== void 0) { | ||
el.scrollIntoViewIfNeeded(false) | ||
} | ||
else { | ||
el.scrollIntoView(dir === -1) | ||
} | ||
} | ||
}) | ||
this.optionIndex = index | ||
this.__hydrateOptions({ target: this.__getMenuContentEl() }, index) | ||
} | ||
} | ||
@@ -481,3 +490,3 @@ } | ||
if (this.optionIndex > -1 && this.optionIndex < this.optionsToShow) { | ||
if (this.optionIndex > -1 && this.optionIndex < optionsLength) { | ||
this.toggleOption(this.options[this.optionIndex]) | ||
@@ -542,19 +551,128 @@ return | ||
__hydrateOptions () { | ||
if (this.avoidScroll !== true) { | ||
if (this.optionsToShow < this.options.length) { | ||
const el = this.__getMenuContentEl() | ||
__hydrateOptions (ev, toIndex) { | ||
clearTimeout(this.hidrateTimer) | ||
if (el.scrollHeight - el.scrollTop - el.clientHeight < 200) { | ||
this.optionsToShow += 20 | ||
this.avoidScroll = true | ||
this.$nextTick(() => { | ||
this.avoidScroll = false | ||
this.__hydrateOptions() | ||
}) | ||
} | ||
if (ev === void 0 || (this.preventNextScroll === true && toIndex === void 0)) { | ||
return | ||
} | ||
const | ||
delayNextScroll = this.delayNextScroll === true && toIndex === void 0, | ||
target = delayNextScroll === true || ev.target === void 0 || ev.target.nodeType === 8 ? void 0 : ev.target, | ||
content = target === void 0 ? null : target.querySelector('.q-select__options--content') | ||
if (content === null) { | ||
this.hidrateTimer = setTimeout(() => { | ||
this.__hydrateOptions({ target: this.__getMenuContentEl() }, toIndex) | ||
}, 10) | ||
return | ||
} | ||
const | ||
scrollTop = target.scrollTop, | ||
viewHeight = target.clientHeight, | ||
child = content.children[toIndex - this.optionsSliceRange.from], | ||
childPosTop = child === void 0 ? -1 : content.offsetTop + child.offsetTop, | ||
childPosBottom = child === void 0 ? -1 : childPosTop + child.clientHeight, | ||
fromScroll = toIndex === void 0 | ||
if (fromScroll === true) { | ||
const toIndexMax = this.options.length - 1 | ||
toIndex = -1 | ||
for (let i = Math.trunc(scrollTop + viewHeight / 2); i >= 0 && toIndex < toIndexMax;) { | ||
toIndex++ | ||
i -= this.optionsHeights[toIndex] | ||
} | ||
} | ||
toIndex = toIndex < 0 ? 0 : toIndex | ||
// destination option is not in view | ||
if (childPosTop < scrollTop || childPosBottom > scrollTop + viewHeight) { | ||
this.__setOptionsSliceRange(toIndex, target, fromScroll) | ||
} | ||
}, | ||
__setPreventNextScroll (delay) { | ||
clearTimeout(this.preventNextScrollTimer) | ||
this.preventNextScroll = delay !== true | ||
this.delayNextScroll = delay === true | ||
this.preventNextScrollTimer = setTimeout(() => { | ||
this.preventNextScroll = false | ||
this.delayNextScroll = false | ||
}, 10) | ||
}, | ||
__setOptionsSliceRange (toIndex, target, fromScroll) { | ||
const | ||
from = Math.max(0, Math.min(toIndex - Math.round(optionsSliceSize / 2), this.options.length - optionsSliceSize)), | ||
to = from + optionsSliceSize, | ||
repositionScroll = fromScroll !== true || from < this.optionsSliceRange.from | ||
if (from === this.optionsSliceRange.from && to === this.optionsSliceRange.to) { | ||
if (fromScroll === true) { | ||
return | ||
} | ||
} | ||
else { | ||
this.__setPreventNextScroll(fromScroll) | ||
this.optionsSliceRange = { from, to } | ||
} | ||
this.$nextTick(() => { | ||
const content = target === void 0 ? null : target.querySelector('.q-select__options--content') | ||
if (content === null) { | ||
return | ||
} | ||
const children = content.children | ||
let marginTopDiff = 0 | ||
for (let i = children.length - 1; i >= 0; i--) { | ||
const diff = children[i].clientHeight - this.optionsHeights[from + i] | ||
if (diff !== 0) { | ||
marginTopDiff += diff | ||
this.optionsHeights[from + i] += diff | ||
} | ||
} | ||
const | ||
marginTop = this.optionsHeights.slice(from).reduce((acc, h) => acc + h, 0), | ||
height = marginTop + this.optionsHeights.slice(0, from).reduce((acc, h) => acc + h, 0), | ||
padding = this.optionsHeight % optionsListMaxPadding + height - this.optionsHeight | ||
if (this.optionsMarginTop !== marginTop || this.optionsHeight !== height) { | ||
this.optionsMarginTop = marginTop | ||
this.optionsHeight = height | ||
this.__setPreventNextScroll(fromScroll) | ||
// content.previousSibling is the last padding block | ||
content.previousSibling.style.cssText = padding >= 0 ? `height: ${padding}px; margin-top: 0px` : `height: 0px; margin-top: ${padding}px` | ||
content.style.marginTop = `-${marginTop}px` | ||
} | ||
if (repositionScroll === true) { | ||
if (fromScroll !== true) { | ||
this.__setPreventNextScroll(fromScroll) | ||
target.scrollTop = this.optionsHeights.slice(0, toIndex).reduce((acc, h) => acc + h, 0) + ( | ||
this.$q.platform.is.mobile === true | ||
? 0 | ||
: Math.trunc(this.optionsHeights[toIndex] / 2 - target.clientHeight / 2) | ||
) | ||
} | ||
else if (marginTopDiff !== 0) { | ||
this.__setPreventNextScroll(fromScroll) | ||
target.scrollTop += marginTopDiff | ||
} | ||
} | ||
}) | ||
}, | ||
__getSelection (h, fromDialog) { | ||
@@ -658,3 +776,17 @@ if (this.hideSelected === true) { | ||
return this.optionScope.map(fn) | ||
const list = [] | ||
for (let i = Math.trunc(this.optionsHeight / optionsListMaxPadding); i > 0; i--) { | ||
list.push(h('div', { staticClass: 'q-select__options--padding', style: { height: `${optionsListMaxPadding}px` } })) | ||
} | ||
list.push(h('div', { staticClass: 'q-select__options--padding', style: { height: `${this.optionsHeight % optionsListMaxPadding}px` } })) | ||
list.push(h('div', { | ||
staticClass: 'q-select__options--content', | ||
style: { | ||
marginTop: `-${this.optionsMarginTop}px` | ||
} | ||
}, this.optionScope.map(fn))) | ||
return list | ||
}, | ||
@@ -673,2 +805,13 @@ | ||
__onCompositionStart (e) { | ||
e.target.composing = true | ||
}, | ||
__onCompositionEnd (e) { | ||
if (e.target.composing !== true) { return } | ||
e.target.composing = false | ||
this.__onInputValue(e) | ||
}, | ||
__getInput (h) { | ||
@@ -690,2 +833,9 @@ return h('input', { | ||
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 | ||
@@ -698,2 +848,7 @@ } | ||
clearTimeout(this.inputTimer) | ||
if (e && e.target && e.target.composing === true) { | ||
return | ||
} | ||
this.inputValue = e.target.value || '' | ||
@@ -756,3 +911,3 @@ | ||
if (this.menu === true) { | ||
this.__updateMenu(true) | ||
this.__updateMenu() | ||
} | ||
@@ -968,10 +1123,16 @@ else { | ||
__updateMenu (show) { | ||
this.optionIndex = -1 | ||
let optionIndex = -1 | ||
if (show === true) { | ||
this.optionsToShow = 20 | ||
this.$nextTick(() => { | ||
this.__hydrateOptions() | ||
}) | ||
if (this.innerValue.length > 0) { | ||
const val = this.__getOptionValue(this.innerValue[0]) | ||
optionIndex = this.options.findIndex(v => isDeepEqual(this.__getOptionValue(v), val)) | ||
} | ||
this.__setPreventNextScroll(true) | ||
this.optionsSliceRange = { from: 0, to: 0 } | ||
this.__hydrateOptions({ target: this.__getMenuContentEl() }, optionIndex) | ||
} | ||
this.optionIndex = optionIndex | ||
}, | ||
@@ -1000,5 +1161,12 @@ | ||
mounted () { | ||
this.__setOptionsSliceRange = this.$q.platform.is.android === true | ||
? debounce(this.__setOptionsSliceRange, 50) | ||
: frameDebounce(this.__setOptionsSliceRange) | ||
}, | ||
beforeDestroy () { | ||
clearTimeout(this.inputTimer) | ||
clearTimeout(this.hidrateTimer) | ||
} | ||
}) |
@@ -100,4 +100,4 @@ import Vue from 'vue' | ||
this.$emit('input', this.model) | ||
change === true && this.$emit('change', this.model) | ||
} | ||
change === true && this.$emit('change', this.model) | ||
}, | ||
@@ -104,0 +104,0 @@ |
@@ -121,3 +121,4 @@ import { between } from '../../utils/format.js' | ||
this.__updatePosition(event.evt) | ||
this.__updateValue(true) | ||
// only if touch, because we also have mousedown/up: | ||
event.touch === true && this.__updateValue(true) | ||
this.dragging = false | ||
@@ -124,0 +125,0 @@ } |
@@ -84,3 +84,5 @@ import QCheckbox from '../checkbox/QCheckbox.js' | ||
this.__updateSelection([data.key], [data.row], adding) | ||
} | ||
}, | ||
configurable: true, | ||
enumerable: true | ||
}) | ||
@@ -92,3 +94,5 @@ | ||
this.$set(this.rowsExpanded, data.key, val) | ||
} | ||
}, | ||
configurable: true, | ||
enumerable: true | ||
}) | ||
@@ -99,3 +103,5 @@ | ||
Object.defineProperty(c, 'value', { | ||
get: () => this.getCellValue(col, data.row) | ||
get: () => this.getCellValue(col, data.row), | ||
configurable: true, | ||
enumerable: true | ||
}) | ||
@@ -110,3 +116,5 @@ return c | ||
Object.defineProperty(data, 'value', { | ||
get: () => this.getCellValue(data.col, data.row) | ||
get: () => this.getCellValue(data.col, data.row), | ||
configurable: true, | ||
enumerable: true | ||
}) | ||
@@ -113,0 +121,0 @@ return data |
@@ -110,3 +110,5 @@ import QLinearProgress from '../linear-progress/QLinearProgress.js' | ||
) | ||
} | ||
}, | ||
configurable: true, | ||
enumerable: true | ||
}) | ||
@@ -113,0 +115,0 @@ data.partialSelected = this.someRowsSelected |
@@ -41,3 +41,3 @@ import { sortDate } from '../../utils/sort.js' | ||
if (typeof A === 'boolean' && typeof B === 'boolean') { | ||
return (a - b) * dir | ||
return (A - B) * dir | ||
} | ||
@@ -44,0 +44,0 @@ |
@@ -106,3 +106,3 @@ import Vue from 'vue' | ||
h('div', { | ||
staticClass: 'q-tab__content flex-center relative-position no-pointer-events non-selectable', | ||
staticClass: 'q-tab__content self-stretch flex-center relative-position no-pointer-events non-selectable', | ||
class: this.tabs.inlineLabel === true ? 'row no-wrap q-tab__content--inline' : 'column' | ||
@@ -109,0 +109,0 @@ }, content.concat(slot(this, 'default'))) |
@@ -68,2 +68,3 @@ import Vue from 'vue' | ||
shrink: Boolean, | ||
stretch: Boolean, | ||
@@ -158,2 +159,3 @@ activeColor: String, | ||
(this.shrink === true ? ' col-shrink' : '') + | ||
(this.stretch === true ? ' self-stretch' : '') + | ||
(this.vertical === true ? ' q-tabs--vertical' : '') | ||
@@ -382,3 +384,3 @@ } | ||
ref: 'content', | ||
staticClass: 'q-tabs__content row no-wrap items-center', | ||
staticClass: 'q-tabs__content row no-wrap items-center self-stretch', | ||
class: this.alignClass | ||
@@ -385,0 +387,0 @@ }, slot(this, 'default')), |
@@ -69,2 +69,8 @@ { | ||
"stretch": { | ||
"type": "Boolean", | ||
"desc": "When used on flexbox parent, tabs will stretch to parent's height", | ||
"category": "content" | ||
}, | ||
"shrink": { | ||
@@ -71,0 +77,0 @@ "type": "Boolean", |
@@ -398,7 +398,11 @@ import Vue from 'vue' | ||
get: () => { return meta.expanded }, | ||
set: val => { val !== meta.expanded && this.setExpanded(key, val) } | ||
set: val => { val !== meta.expanded && this.setExpanded(key, val) }, | ||
configurable: true, | ||
enumerable: true | ||
}) | ||
Object.defineProperty(scope, 'ticked', { | ||
get: () => { return meta.ticked }, | ||
set: val => { val !== meta.ticked && this.setTicked([ key ], val) } | ||
set: val => { val !== meta.ticked && this.setTicked([ key ], val) }, | ||
configurable: true, | ||
enumerable: true | ||
}) | ||
@@ -405,0 +409,0 @@ |
@@ -149,3 +149,3 @@ // leave NAMED_MASKS at top of file (code referenced from docs) | ||
else if (esc !== void 0) { | ||
unmaskChar = '\\' + esc | ||
unmaskChar = '\\' + (esc === '\\' ? '' : esc) | ||
mask.push(esc) | ||
@@ -156,3 +156,3 @@ unmask.push('([^' + unmaskChar + ']+)?' + unmaskChar + '?') | ||
const c = char1 !== void 0 ? char1 : char2 | ||
unmaskChar = c.replace(escRegex, '\\\\$&') | ||
unmaskChar = c === '\\' ? '\\\\\\\\' : c.replace(escRegex, '\\\\$&') | ||
mask.push(c) | ||
@@ -170,11 +170,18 @@ unmask.push('([^' + unmaskChar + ']+)?' + unmaskChar + '?') | ||
), | ||
extractMatcher = new RegExp( | ||
'^' + | ||
(this.reverseFillMask === true ? fillCharEscaped + '*' : '') + | ||
extract.join('') + | ||
'(' + (negateChar === '' ? '.' : negateChar) + '+)?' + | ||
(this.reverseFillMask === true ? '' : fillCharEscaped + '*') + | ||
'$' | ||
) | ||
extractLast = extract.length - 1, | ||
extractMatcher = extract.map((re, index) => { | ||
if (index === 0 && this.reverseFillMask === true) { | ||
return new RegExp('^' + fillCharEscaped + '*' + re) | ||
} | ||
else if (index === extractLast) { | ||
return new RegExp( | ||
'^' + re + | ||
'(' + (negateChar === '' ? '.' : negateChar) + '+)?' + | ||
(this.reverseFillMask === true ? '$' : fillCharEscaped + '*') | ||
) | ||
} | ||
return new RegExp('^' + re) | ||
}) | ||
this.computedMask = mask | ||
@@ -187,6 +194,19 @@ this.computedUnmask = val => { | ||
const extractMatch = extractMatcher.exec(val) | ||
if (extractMatch !== null) { | ||
return extractMatch.slice(1).join('') | ||
const | ||
extractMatch = [], | ||
extractMatcherLength = extractMatcher.length | ||
for (let i = 0, str = val; i < extractMatcherLength; i++) { | ||
const m = extractMatcher[i].exec(str) | ||
if (m === null) { | ||
break | ||
} | ||
str = str.slice(m.shift().length) | ||
extractMatch.push(...m) | ||
} | ||
if (extractMatch.length > 0) { | ||
return extractMatch.join('') | ||
} | ||
@@ -193,0 +213,0 @@ return val |
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 not supported yet
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 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
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 not supported yet
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 not supported yet
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 not supported yet
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 not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
5766684
125989
2