├── .browserslistrc ├── .eslintignore ├── docs ├── favicon.ico └── index.html ├── public ├── favicon.ico └── index.html ├── babel.config.js ├── coverage ├── sort-arrow-sprite.png ├── lcov-report │ ├── sort-arrow-sprite.png │ ├── prettify.css │ ├── block-navigation.js │ ├── index.html │ ├── sorter.js │ ├── base.css │ └── prettify.js ├── prettify.css ├── block-navigation.js ├── lcov.info ├── index.html ├── sorter.js ├── clover.xml ├── base.css ├── prettify.js └── coverage-final.json ├── src ├── main.js ├── index.js ├── vue-numeric-input.vue └── App.vue ├── vue.config.js ├── codecov.yml ├── .npmignore ├── dist ├── demo.html └── vue-numeric-input.umd.min.js ├── .travis.yml ├── .gitignore ├── .eslintrc.js ├── LICENSE ├── tests ├── util │ └── index.js └── unit │ └── vue-numeric-input.spec.js ├── package.json └── README.md /.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | /build/ 2 | /config/ 3 | /dist/ 4 | /*.js 5 | /test/unit/coverage/ 6 | -------------------------------------------------------------------------------- /docs/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JayeshLab/vue-numeric-input/HEAD/docs/favicon.ico -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JayeshLab/vue-numeric-input/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /coverage/sort-arrow-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JayeshLab/vue-numeric-input/HEAD/coverage/sort-arrow-sprite.png -------------------------------------------------------------------------------- /coverage/lcov-report/sort-arrow-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JayeshLab/vue-numeric-input/HEAD/coverage/lcov-report/sort-arrow-sprite.png -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App.vue' 3 | 4 | Vue.config.productionTip = false 5 | 6 | new Vue({ 7 | render: h => h(App) 8 | }).$mount('#app') 9 | -------------------------------------------------------------------------------- /vue.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | publicPath: '', 3 | productionSourceMap: false, 4 | filenameHashing: false, 5 | css: { 6 | extract: false 7 | } 8 | } -------------------------------------------------------------------------------- /codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | status: 3 | project: 4 | default: 5 | target: 80% # the required coverage value 6 | threshold: 1% # the leniency in hitting the target 7 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | docs 2 | node_modules 3 | public 4 | .eslintrc.js 5 | .browserslistrc 6 | .gitignore 7 | .eslintignore 8 | .travis.yml 9 | package-lock.json 10 | *.iml 11 | .idea 12 | tests 13 | coverage 14 | -------------------------------------------------------------------------------- /dist/demo.html: -------------------------------------------------------------------------------- 1 | 2 | vue-numeric-input demo 3 | 4 | 5 | 6 | 9 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "node" 4 | install: 5 | - npm install 6 | script: 7 | - npm run lint 8 | - npm run lib 9 | - npm run build:docs 10 | - npm run test:unit 11 | - npm run codecov 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | 4 | # local env files 5 | .env.local 6 | .env.*.local 7 | package-lock.json 8 | 9 | # Editor directories and files 10 | .idea 11 | .vscode 12 | *.suo 13 | *.ntvs* 14 | *.njsproj 15 | *.sln 16 | *.sw? 17 | 18 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import VueNumericInput from './vue-numeric-input.vue' 2 | 3 | const plugin = { 4 | install (Vue) { 5 | Vue.component(VueNumericInput.name, VueNumericInput) 6 | } 7 | } 8 | VueNumericInput.install = plugin.install 9 | 10 | export default VueNumericInput 11 | -------------------------------------------------------------------------------- /coverage/prettify.css: -------------------------------------------------------------------------------- 1 | .pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} 2 | -------------------------------------------------------------------------------- /coverage/lcov-report/prettify.css: -------------------------------------------------------------------------------- 1 | .pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} 2 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true 5 | }, 6 | 'extends': [ 7 | 'plugin:vue/essential', 8 | 'eslint:recommended' 9 | ], 10 | rules: { 11 | 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', 12 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' 13 | }, 14 | parserOptions: { 15 | parser: 'babel-eslint' 16 | }, 17 | overrides: [ 18 | { 19 | files: [ 20 | '**/__tests__/*.{j,t}s?(x)' 21 | ], 22 | env: { 23 | mocha: true 24 | } 25 | }, 26 | { 27 | files: [ 28 | '**/__tests__/*.{j,t}s?(x)', 29 | '**/tests/unit/**/*.spec.{j,t}s?(x)' 30 | ], 31 | env: { 32 | jest: true 33 | } 34 | } 35 | ] 36 | } 37 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright 2018-present Jayesh Vachhani 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | vue-numeric-input
-------------------------------------------------------------------------------- /tests/util/index.js: -------------------------------------------------------------------------------- 1 | exports.triggerEvent = function (elm, name, ...opts) { 2 | let eventName 3 | const el = Object.prototype.hasOwnProperty.call(elm, 'element') ? elm.element : elm; 4 | 5 | if (/^mouse|click/.test(name)) { 6 | eventName = 'MouseEvents' 7 | } else if (/^key/.test(name)) { 8 | eventName = 'KeyboardEvent' 9 | } else { 10 | eventName = 'HTMLEvents' 11 | } 12 | const evt = document.createEvent(eventName) 13 | evt.initEvent(name, ...opts) 14 | el.dispatchEvent 15 | ? el.dispatchEvent(evt) 16 | : el.fireEvent('on' + name, evt) 17 | 18 | return el 19 | } 20 | 21 | exports.triggerClick = function (elm, ...opts) { 22 | exports.triggerEvent(elm, 'mousedown', ...opts) 23 | exports.triggerEvent(elm, 'mouseup', ...opts) 24 | return elm 25 | } 26 | 27 | exports.triggerKeyDown = function (el, keyCode) { 28 | const evt = document.createEvent('Events') 29 | evt.initEvent('keydown', true, true) 30 | evt.keyCode = keyCode 31 | el.dispatchEvent(evt) 32 | } 33 | exports.triggerMouseWheel = function(el, delta) { 34 | var evt = document.createEvent('MouseEvents'); 35 | evt.initEvent('wheel', true, true); 36 | evt.deltaY = delta; 37 | el.dispatchEvent(evt); 38 | } 39 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | vue-numeric-input 11 | 24 | 25 | 26 | 29 |
30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-numeric-input", 3 | "version": "2.0.0", 4 | "private": false, 5 | "description": "Vue Numeric Input Component", 6 | "author": "JayeshLab ", 7 | "scripts": { 8 | "serve": "vue-cli-service serve", 9 | "build": "vue-cli-service build", 10 | "test:unit": "vue-cli-service test:unit", 11 | "lint": "vue-cli-service lint", 12 | "build:docs": "vue-cli-service build --dest docs --name vue-numeric-input src/main.js", 13 | "lib": "vue-cli-service build --target lib --name vue-numeric-input src/index.js", 14 | "codecov": "codecov --token=5c23e3b3-9053-4959-91a8-4e92322c433d" 15 | }, 16 | "main": "dist/vue-numeric-input.umd.js", 17 | "unpkg": "dist/vue-numeric-input.umd.min.js", 18 | "files": [ 19 | "dist/**", 20 | "src/*", 21 | "*.json", 22 | "*.js" 23 | ], 24 | "dependencies": { 25 | "core-js": "^3.18.1", 26 | "vue": "^2.6.14" 27 | }, 28 | "devDependencies": { 29 | "@vue/cli-plugin-babel": "^4.5.13", 30 | "@vue/cli-plugin-eslint": "^4.5.13", 31 | "@vue/cli-plugin-unit-jest": "^4.5.13", 32 | "@vue/cli-service": "^4.5.13", 33 | "@vue/test-utils": "^1.2.2", 34 | "babel-eslint": "^10.1.0", 35 | "codecov": "^3.8.3", 36 | "eslint": "^6.7.2", 37 | "eslint-plugin-vue": "^6.2.2", 38 | "node-sass": "^6.0.0", 39 | "sass-loader": "^10.2.0", 40 | "vue-template-compiler": "^2.6.14" 41 | }, 42 | "bugs": { 43 | "url": "https://github.com/JayeshLab/vue-numeric-input/issues" 44 | }, 45 | "homepage": "https://github.com/JayeshLab/vue-numeric-input/#readme", 46 | "keywords": [ 47 | "input", 48 | "text", 49 | "component", 50 | "number", 51 | "numeric", 52 | "vue", 53 | "vue.js" 54 | ], 55 | "license": "MIT", 56 | "repository": { 57 | "type": "git", 58 | "url": "git+https://github.com/JayeshLab/vue-numeric-input.git" 59 | }, 60 | "jest": { 61 | "verbose": true, 62 | "preset": "@vue/cli-plugin-unit-jest", 63 | "collectCoverage": true, 64 | "coverageReporters": [ 65 | "clover", 66 | "json", 67 | "lcov", 68 | "html", 69 | "text-summary" 70 | ], 71 | "collectCoverageFrom": [ 72 | "**/*.vue", 73 | "!**/App.vue", 74 | "!**/Test.vue", 75 | "!**/*.js", 76 | "!**/node_modules/**", 77 | "!**/tests/**" 78 | ] 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /coverage/block-navigation.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | var jumpToCode = (function init() { 3 | // Classes of code we would like to highlight in the file view 4 | var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no']; 5 | 6 | // Elements to highlight in the file listing view 7 | var fileListingElements = ['td.pct.low']; 8 | 9 | // We don't want to select elements that are direct descendants of another match 10 | var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > ` 11 | 12 | // Selecter that finds elements on the page to which we can jump 13 | var selector = 14 | fileListingElements.join(', ') + 15 | ', ' + 16 | notSelector + 17 | missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b` 18 | 19 | // The NodeList of matching elements 20 | var missingCoverageElements = document.querySelectorAll(selector); 21 | 22 | var currentIndex; 23 | 24 | function toggleClass(index) { 25 | missingCoverageElements 26 | .item(currentIndex) 27 | .classList.remove('highlighted'); 28 | missingCoverageElements.item(index).classList.add('highlighted'); 29 | } 30 | 31 | function makeCurrent(index) { 32 | toggleClass(index); 33 | currentIndex = index; 34 | missingCoverageElements.item(index).scrollIntoView({ 35 | behavior: 'smooth', 36 | block: 'center', 37 | inline: 'center' 38 | }); 39 | } 40 | 41 | function goToPrevious() { 42 | var nextIndex = 0; 43 | if (typeof currentIndex !== 'number' || currentIndex === 0) { 44 | nextIndex = missingCoverageElements.length - 1; 45 | } else if (missingCoverageElements.length > 1) { 46 | nextIndex = currentIndex - 1; 47 | } 48 | 49 | makeCurrent(nextIndex); 50 | } 51 | 52 | function goToNext() { 53 | var nextIndex = 0; 54 | 55 | if ( 56 | typeof currentIndex === 'number' && 57 | currentIndex < missingCoverageElements.length - 1 58 | ) { 59 | nextIndex = currentIndex + 1; 60 | } 61 | 62 | makeCurrent(nextIndex); 63 | } 64 | 65 | return function jump(event) { 66 | switch (event.which) { 67 | case 78: // n 68 | case 74: // j 69 | goToNext(); 70 | break; 71 | case 66: // b 72 | case 75: // k 73 | case 80: // p 74 | goToPrevious(); 75 | break; 76 | } 77 | }; 78 | })(); 79 | window.addEventListener('keydown', jumpToCode); 80 | -------------------------------------------------------------------------------- /coverage/lcov-report/block-navigation.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | var jumpToCode = (function init() { 3 | // Classes of code we would like to highlight in the file view 4 | var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no']; 5 | 6 | // Elements to highlight in the file listing view 7 | var fileListingElements = ['td.pct.low']; 8 | 9 | // We don't want to select elements that are direct descendants of another match 10 | var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > ` 11 | 12 | // Selecter that finds elements on the page to which we can jump 13 | var selector = 14 | fileListingElements.join(', ') + 15 | ', ' + 16 | notSelector + 17 | missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b` 18 | 19 | // The NodeList of matching elements 20 | var missingCoverageElements = document.querySelectorAll(selector); 21 | 22 | var currentIndex; 23 | 24 | function toggleClass(index) { 25 | missingCoverageElements 26 | .item(currentIndex) 27 | .classList.remove('highlighted'); 28 | missingCoverageElements.item(index).classList.add('highlighted'); 29 | } 30 | 31 | function makeCurrent(index) { 32 | toggleClass(index); 33 | currentIndex = index; 34 | missingCoverageElements.item(index).scrollIntoView({ 35 | behavior: 'smooth', 36 | block: 'center', 37 | inline: 'center' 38 | }); 39 | } 40 | 41 | function goToPrevious() { 42 | var nextIndex = 0; 43 | if (typeof currentIndex !== 'number' || currentIndex === 0) { 44 | nextIndex = missingCoverageElements.length - 1; 45 | } else if (missingCoverageElements.length > 1) { 46 | nextIndex = currentIndex - 1; 47 | } 48 | 49 | makeCurrent(nextIndex); 50 | } 51 | 52 | function goToNext() { 53 | var nextIndex = 0; 54 | 55 | if ( 56 | typeof currentIndex === 'number' && 57 | currentIndex < missingCoverageElements.length - 1 58 | ) { 59 | nextIndex = currentIndex + 1; 60 | } 61 | 62 | makeCurrent(nextIndex); 63 | } 64 | 65 | return function jump(event) { 66 | switch (event.which) { 67 | case 78: // n 68 | case 74: // j 69 | goToNext(); 70 | break; 71 | case 66: // b 72 | case 75: // k 73 | case 80: // p 74 | goToPrevious(); 75 | break; 76 | } 77 | }; 78 | })(); 79 | window.addEventListener('keydown', jumpToCode); 80 | -------------------------------------------------------------------------------- /coverage/lcov.info: -------------------------------------------------------------------------------- 1 | TN: 2 | SF:D:\GitHub\VueNumericInputNew\vue-numeric-input\src\vue-numeric-input.vue 3 | FN:93,(anonymous_1) 4 | FN:99,(anonymous_2) 5 | FN:136,(anonymous_3) 6 | FN:149,(anonymous_4) 7 | FN:173,(anonymous_5) 8 | FN:183,(anonymous_6) 9 | FN:194,(anonymous_7) 10 | FN:207,(anonymous_8) 11 | FN:225,(anonymous_9) 12 | FN:243,(anonymous_10) 13 | FN:244,(anonymous_11) 14 | FN:254,(anonymous_12) 15 | FN:265,(anonymous_13) 16 | FN:281,(anonymous_14) 17 | FN:288,(anonymous_15) 18 | FN:295,(anonymous_16) 19 | FN:301,(anonymous_17) 20 | FN:309,(anonymous_18) 21 | FN:312,(anonymous_19) 22 | FN:322,(anonymous_20) 23 | FN:324,(anonymous_21) 24 | FN:336,(anonymous_22) 25 | FN:339,(anonymous_23) 26 | FN:344,(anonymous_24) 27 | FN:355,(anonymous_25) 28 | FN:362,(anonymous_26) 29 | FN:365,(anonymous_27) 30 | FN:375,(anonymous_28) 31 | FNF:28 32 | FNH:28 33 | FNDA:31,(anonymous_1) 34 | FNDA:3,(anonymous_2) 35 | FNDA:31,(anonymous_3) 36 | FNDA:31,(anonymous_4) 37 | FNDA:1,(anonymous_5) 38 | FNDA:3,(anonymous_6) 39 | FNDA:19,(anonymous_7) 40 | FNDA:8,(anonymous_8) 41 | FNDA:4,(anonymous_9) 42 | FNDA:1,(anonymous_10) 43 | FNDA:1,(anonymous_11) 44 | FNDA:9,(anonymous_12) 45 | FNDA:9,(anonymous_13) 46 | FNDA:4,(anonymous_14) 47 | FNDA:5,(anonymous_15) 48 | FNDA:1,(anonymous_16) 49 | FNDA:1,(anonymous_17) 50 | FNDA:1,(anonymous_18) 51 | FNDA:3,(anonymous_19) 52 | FNDA:6,(anonymous_20) 53 | FNDA:3,(anonymous_21) 54 | FNDA:39,(anonymous_22) 55 | FNDA:9,(anonymous_23) 56 | FNDA:10,(anonymous_24) 57 | FNDA:31,(anonymous_25) 58 | FNDA:31,(anonymous_26) 59 | FNDA:31,(anonymous_27) 60 | FNDA:27,(anonymous_28) 61 | DA:64,1 62 | DA:94,31 63 | DA:100,3 64 | DA:137,31 65 | DA:150,31 66 | DA:151,3 67 | DA:153,31 68 | DA:154,2 69 | DA:155,29 70 | DA:156,2 71 | DA:158,27 72 | DA:161,31 73 | DA:162,3 74 | DA:174,1 75 | DA:175,1 76 | DA:184,3 77 | DA:185,3 78 | DA:195,19 79 | DA:196,19 80 | DA:197,19 81 | DA:198,19 82 | DA:199,19 83 | DA:200,1 84 | DA:202,19 85 | DA:208,8 86 | DA:209,6 87 | DA:210,6 88 | DA:211,6 89 | DA:214,6 90 | DA:215,5 91 | DA:216,5 92 | DA:218,1 93 | DA:226,4 94 | DA:227,4 95 | DA:228,4 96 | DA:229,4 97 | DA:232,4 98 | DA:233,3 99 | DA:234,3 100 | DA:236,1 101 | DA:244,1 102 | DA:245,1 103 | DA:246,1 104 | DA:255,9 105 | DA:256,9 106 | DA:257,9 107 | DA:258,9 108 | DA:259,9 109 | DA:266,9 110 | DA:267,9 111 | DA:268,9 112 | DA:270,9 113 | DA:271,9 114 | DA:272,9 115 | DA:273,9 116 | DA:274,15 117 | DA:282,4 118 | DA:289,5 119 | DA:296,1 120 | DA:302,1 121 | DA:303,1 122 | DA:310,1 123 | DA:313,3 124 | DA:314,3 125 | DA:315,3 126 | DA:316,1 127 | DA:318,2 128 | DA:320,3 129 | DA:323,6 130 | DA:324,6 131 | DA:325,3 132 | DA:326,3 133 | DA:327,0 134 | DA:329,3 135 | DA:330,3 136 | DA:337,39 137 | DA:340,9 138 | DA:341,9 139 | DA:345,10 140 | DA:346,10 141 | DA:347,1 142 | DA:349,9 143 | DA:356,31 144 | DA:363,31 145 | DA:366,31 146 | DA:367,31 147 | DA:368,1 148 | DA:369,30 149 | DA:370,1 150 | DA:372,31 151 | DA:376,27 152 | DA:377,27 153 | DA:378,27 154 | DA:379,27 155 | LF:94 156 | LH:93 157 | BRDA:100,0,0,3 158 | BRDA:100,0,1,3 159 | BRDA:150,1,0,3 160 | BRDA:150,1,1,28 161 | BRDA:153,2,0,2 162 | BRDA:153,2,1,29 163 | BRDA:153,3,0,31 164 | BRDA:153,3,1,31 165 | BRDA:155,4,0,2 166 | BRDA:155,4,1,27 167 | BRDA:155,5,0,29 168 | BRDA:155,5,1,29 169 | BRDA:161,6,0,3 170 | BRDA:161,6,1,28 171 | BRDA:175,7,0,0 172 | BRDA:175,7,1,1 173 | BRDA:184,8,0,0 174 | BRDA:184,8,1,3 175 | BRDA:195,9,0,0 176 | BRDA:195,9,1,19 177 | BRDA:199,10,0,1 178 | BRDA:199,10,1,18 179 | BRDA:208,11,0,6 180 | BRDA:208,11,1,2 181 | BRDA:208,12,0,8 182 | BRDA:208,12,1,7 183 | BRDA:209,13,0,6 184 | BRDA:209,13,1,0 185 | BRDA:214,14,0,5 186 | BRDA:214,14,1,1 187 | BRDA:226,15,0,4 188 | BRDA:226,15,1,0 189 | BRDA:226,16,0,4 190 | BRDA:226,16,1,4 191 | BRDA:227,17,0,4 192 | BRDA:227,17,1,0 193 | BRDA:232,18,0,3 194 | BRDA:232,18,1,1 195 | BRDA:245,19,0,1 196 | BRDA:245,19,1,0 197 | BRDA:267,20,0,9 198 | BRDA:267,20,1,0 199 | BRDA:274,21,0,6 200 | BRDA:274,21,1,3 201 | BRDA:302,22,0,1 202 | BRDA:302,22,1,0 203 | BRDA:315,23,0,1 204 | BRDA:315,23,1,2 205 | BRDA:326,24,0,0 206 | BRDA:326,24,1,3 207 | BRDA:346,25,0,1 208 | BRDA:346,25,1,9 209 | BRDA:349,26,0,9 210 | BRDA:349,26,1,0 211 | BRDA:356,27,0,30 212 | BRDA:356,27,1,32 213 | BRDA:367,28,0,1 214 | BRDA:367,28,1,30 215 | BRDA:369,29,0,1 216 | BRDA:369,29,1,29 217 | BRDA:372,30,0,1 218 | BRDA:372,30,1,30 219 | BRF:62 220 | BRH:51 221 | end_of_record 222 | -------------------------------------------------------------------------------- /coverage/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Code coverage report for All files 7 | 8 | 9 | 10 | 11 | 16 | 17 | 18 | 19 |
20 |
21 |

All files

22 |
23 | 24 |
25 | 98.94% 26 | Statements 27 | 93/94 28 |
29 | 30 | 31 |
32 | 82.26% 33 | Branches 34 | 51/62 35 |
36 | 37 | 38 |
39 | 100% 40 | Functions 41 | 28/28 42 |
43 | 44 | 45 |
46 | 98.94% 47 | Lines 48 | 93/94 49 |
50 | 51 | 52 |
53 |

54 | Press n or j to go to the next uncovered block, b, p or k for the previous block. 55 |

56 |
57 |
58 |
59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 |
FileStatementsBranchesFunctionsLines
vue-numeric-input.vue 77 |
78 |
98.94%93/9482.26%51/62100%28/2898.94%93/94
91 |
92 |
93 |
94 | 99 | 100 | 101 | 106 | 107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /coverage/lcov-report/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Code coverage report for All files 7 | 8 | 9 | 10 | 11 | 16 | 17 | 18 | 19 |
20 |
21 |

All files

22 |
23 | 24 |
25 | 98.94% 26 | Statements 27 | 93/94 28 |
29 | 30 | 31 |
32 | 82.26% 33 | Branches 34 | 51/62 35 |
36 | 37 | 38 |
39 | 100% 40 | Functions 41 | 28/28 42 |
43 | 44 | 45 |
46 | 98.94% 47 | Lines 48 | 93/94 49 |
50 | 51 | 52 |
53 |

54 | Press n or j to go to the next uncovered block, b, p or k for the previous block. 55 |

56 |
57 |
58 |
59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 |
FileStatementsBranchesFunctionsLines
vue-numeric-input.vue 77 |
78 |
98.94%93/9482.26%51/62100%28/2898.94%93/94
91 |
92 |
93 |
94 | 99 | 100 | 101 | 106 | 107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Vue Numeric Input 2 | 3 | [![npm](https://img.shields.io/npm/v/vue-numeric-input.svg?style=flat-square)](https://www.npmjs.com/package/vue-numeric-input) 4 | [![npm](https://img.shields.io/npm/dt/vue-numeric-input.svg?style=flat-square)](https://www.npmjs.com/package/vue-numeric-input) 5 | [![Build Status](https://api.travis-ci.com/JayeshLab/vue3-resize-text.svg?branch=master)](https://app.travis-ci.com/github/JayeshLab/vue-numeric-input) 6 | [![codecov](https://codecov.io/gh/JayeshLab/vue-numeric-input/branch/master/graph/badge.svg?token=a4re2w3cGy)](https://codecov.io/gh/JayeshLab/vue-numeric-input) 7 | [![npm](https://img.shields.io/npm/l/vue-numeric-input.svg?style=flat-square)](http://opensource.org/licenses/MIT) 8 | 9 | Number input component based on Vue that is a replacement of native input number with optional control. 10 | 11 | ![vue-numeric-input](https://user-images.githubusercontent.com/36194663/44717643-33e4ea00-aadb-11e8-82bf-e1fdeeea3bb5.gif) 12 | 13 | [Live Demo & Doc](https://jayeshlab.github.io/vue-numeric-input/) 14 | 15 | ### Installation 16 | 17 | Install via NPM 18 | 19 | `$ npm install vue-numeric-input --save` 20 | 21 | Install via CDN 22 | 23 | ```html 24 | 25 | 26 | ``` 27 | 28 | #### Global 29 | 30 | Register VueNumericInput globally: 31 | 32 | ```javascript 33 | import Vue from 'Vue'; 34 | import VueNumericInput from 'vue-numeric-input'; 35 | 36 | Vue.use(VueNumericInput) 37 | ``` 38 | 39 | #### Local 40 | 41 | Include the VueNumericInput directly into your component using import: 42 | 43 | ```javascript 44 | import VueNumericInput from 'vue-numeric-input' 45 | 46 | export default { 47 | components: { 48 | VueNumericInput 49 | } 50 | } 51 | ``` 52 | ### Usage 53 | 54 | #### Basic usage 55 | 56 | ```html 57 | 62 | 63 | 72 | ``` 73 | 74 | #### PROPS: 75 | 76 | | Name | Description | Type | Default | Options | 77 | | ----------- | --------------- | ------------ | ------------ | ------------ | 78 | | name | Component name | String | - | - | 79 | | value | Binding value | Number | - | - | 80 | | placeholder | Input placeholder | String | - | - | 81 | | min | Minimum allowed value | Number | -Infinity | - | 82 | | max | Maximum allowed value | Number | Infinity | - | 83 | | step | Incremental Step | Number | 1 | - | 84 | | align | Alignment of Numeric Value | String | left | left, center, right | 85 | | width | Component Width | String | 150px | width in px, em, rem etc e.g. ‘20px’ | 86 | | size | Component Size | String | normal | size value can be 'small', 'normal', 'large' | 87 | | precision | Number of decimals | Number | 0 | Integer value| 88 | | controls | Enable/Disable Controls | Boolean | true | true/false| 89 | | controlsType | Controls Type | String | plusminus | plusminus/updown| 90 | | autofocus | Autofocus on Page Load | Boolean | false | true/false| 91 | | readonly | Is Readonly | Boolean | false | true/false| 92 | | disabled | Is Disabled | Boolean | false | true/false| 93 | | isinput | enable/disable keyboard input of number | Boolean | false | true/false| 94 | | mousewheel | Enable increment/decrement with mousewheel event | Boolean | false | true/false| 95 | | className | Css Class for Input Component | String | - | css class name | 96 | 97 | 98 | #### EVENTS: 99 | 100 | Event Name | Description | Parameters 101 | -----------|--------------------|-------------- 102 | input | triggers when input| (newValue) 103 | change | triggers when the value changes| (newValue) 104 | blur | triggers when Input blurs| (event: Event) 105 | focus | triggers when Input focus| (event: Event) 106 | 107 | 108 | #### METHODS: 109 | 110 | Method | Description | Parameters 111 | ---|--- | ---- 112 | focus | focus the Input component| - 113 | blur | blur the Input component| - 114 | 115 | Inspired by [react-numeric-input](https://github.com/vlad-ignatov/react-numeric-input) 116 | 117 | ## License 118 | 119 | MIT 120 | -------------------------------------------------------------------------------- /coverage/sorter.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | var addSorting = (function() { 3 | 'use strict'; 4 | var cols, 5 | currentSort = { 6 | index: 0, 7 | desc: false 8 | }; 9 | 10 | // returns the summary table element 11 | function getTable() { 12 | return document.querySelector('.coverage-summary'); 13 | } 14 | // returns the thead element of the summary table 15 | function getTableHeader() { 16 | return getTable().querySelector('thead tr'); 17 | } 18 | // returns the tbody element of the summary table 19 | function getTableBody() { 20 | return getTable().querySelector('tbody'); 21 | } 22 | // returns the th element for nth column 23 | function getNthColumn(n) { 24 | return getTableHeader().querySelectorAll('th')[n]; 25 | } 26 | 27 | // loads all columns 28 | function loadColumns() { 29 | var colNodes = getTableHeader().querySelectorAll('th'), 30 | colNode, 31 | cols = [], 32 | col, 33 | i; 34 | 35 | for (i = 0; i < colNodes.length; i += 1) { 36 | colNode = colNodes[i]; 37 | col = { 38 | key: colNode.getAttribute('data-col'), 39 | sortable: !colNode.getAttribute('data-nosort'), 40 | type: colNode.getAttribute('data-type') || 'string' 41 | }; 42 | cols.push(col); 43 | if (col.sortable) { 44 | col.defaultDescSort = col.type === 'number'; 45 | colNode.innerHTML = 46 | colNode.innerHTML + ''; 47 | } 48 | } 49 | return cols; 50 | } 51 | // attaches a data attribute to every tr element with an object 52 | // of data values keyed by column name 53 | function loadRowData(tableRow) { 54 | var tableCols = tableRow.querySelectorAll('td'), 55 | colNode, 56 | col, 57 | data = {}, 58 | i, 59 | val; 60 | for (i = 0; i < tableCols.length; i += 1) { 61 | colNode = tableCols[i]; 62 | col = cols[i]; 63 | val = colNode.getAttribute('data-value'); 64 | if (col.type === 'number') { 65 | val = Number(val); 66 | } 67 | data[col.key] = val; 68 | } 69 | return data; 70 | } 71 | // loads all row data 72 | function loadData() { 73 | var rows = getTableBody().querySelectorAll('tr'), 74 | i; 75 | 76 | for (i = 0; i < rows.length; i += 1) { 77 | rows[i].data = loadRowData(rows[i]); 78 | } 79 | } 80 | // sorts the table using the data for the ith column 81 | function sortByIndex(index, desc) { 82 | var key = cols[index].key, 83 | sorter = function(a, b) { 84 | a = a.data[key]; 85 | b = b.data[key]; 86 | return a < b ? -1 : a > b ? 1 : 0; 87 | }, 88 | finalSorter = sorter, 89 | tableBody = document.querySelector('.coverage-summary tbody'), 90 | rowNodes = tableBody.querySelectorAll('tr'), 91 | rows = [], 92 | i; 93 | 94 | if (desc) { 95 | finalSorter = function(a, b) { 96 | return -1 * sorter(a, b); 97 | }; 98 | } 99 | 100 | for (i = 0; i < rowNodes.length; i += 1) { 101 | rows.push(rowNodes[i]); 102 | tableBody.removeChild(rowNodes[i]); 103 | } 104 | 105 | rows.sort(finalSorter); 106 | 107 | for (i = 0; i < rows.length; i += 1) { 108 | tableBody.appendChild(rows[i]); 109 | } 110 | } 111 | // removes sort indicators for current column being sorted 112 | function removeSortIndicators() { 113 | var col = getNthColumn(currentSort.index), 114 | cls = col.className; 115 | 116 | cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, ''); 117 | col.className = cls; 118 | } 119 | // adds sort indicators for current column being sorted 120 | function addSortIndicators() { 121 | getNthColumn(currentSort.index).className += currentSort.desc 122 | ? ' sorted-desc' 123 | : ' sorted'; 124 | } 125 | // adds event listeners for all sorter widgets 126 | function enableUI() { 127 | var i, 128 | el, 129 | ithSorter = function ithSorter(i) { 130 | var col = cols[i]; 131 | 132 | return function() { 133 | var desc = col.defaultDescSort; 134 | 135 | if (currentSort.index === i) { 136 | desc = !currentSort.desc; 137 | } 138 | sortByIndex(i, desc); 139 | removeSortIndicators(); 140 | currentSort.index = i; 141 | currentSort.desc = desc; 142 | addSortIndicators(); 143 | }; 144 | }; 145 | for (i = 0; i < cols.length; i += 1) { 146 | if (cols[i].sortable) { 147 | // add the click event handler on the th so users 148 | // dont have to click on those tiny arrows 149 | el = getNthColumn(i).querySelector('.sorter').parentElement; 150 | if (el.addEventListener) { 151 | el.addEventListener('click', ithSorter(i)); 152 | } else { 153 | el.attachEvent('onclick', ithSorter(i)); 154 | } 155 | } 156 | } 157 | } 158 | // adds sorting functionality to the UI 159 | return function() { 160 | if (!getTable()) { 161 | return; 162 | } 163 | cols = loadColumns(); 164 | loadData(); 165 | addSortIndicators(); 166 | enableUI(); 167 | }; 168 | })(); 169 | 170 | window.addEventListener('load', addSorting); 171 | -------------------------------------------------------------------------------- /coverage/lcov-report/sorter.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | var addSorting = (function() { 3 | 'use strict'; 4 | var cols, 5 | currentSort = { 6 | index: 0, 7 | desc: false 8 | }; 9 | 10 | // returns the summary table element 11 | function getTable() { 12 | return document.querySelector('.coverage-summary'); 13 | } 14 | // returns the thead element of the summary table 15 | function getTableHeader() { 16 | return getTable().querySelector('thead tr'); 17 | } 18 | // returns the tbody element of the summary table 19 | function getTableBody() { 20 | return getTable().querySelector('tbody'); 21 | } 22 | // returns the th element for nth column 23 | function getNthColumn(n) { 24 | return getTableHeader().querySelectorAll('th')[n]; 25 | } 26 | 27 | // loads all columns 28 | function loadColumns() { 29 | var colNodes = getTableHeader().querySelectorAll('th'), 30 | colNode, 31 | cols = [], 32 | col, 33 | i; 34 | 35 | for (i = 0; i < colNodes.length; i += 1) { 36 | colNode = colNodes[i]; 37 | col = { 38 | key: colNode.getAttribute('data-col'), 39 | sortable: !colNode.getAttribute('data-nosort'), 40 | type: colNode.getAttribute('data-type') || 'string' 41 | }; 42 | cols.push(col); 43 | if (col.sortable) { 44 | col.defaultDescSort = col.type === 'number'; 45 | colNode.innerHTML = 46 | colNode.innerHTML + ''; 47 | } 48 | } 49 | return cols; 50 | } 51 | // attaches a data attribute to every tr element with an object 52 | // of data values keyed by column name 53 | function loadRowData(tableRow) { 54 | var tableCols = tableRow.querySelectorAll('td'), 55 | colNode, 56 | col, 57 | data = {}, 58 | i, 59 | val; 60 | for (i = 0; i < tableCols.length; i += 1) { 61 | colNode = tableCols[i]; 62 | col = cols[i]; 63 | val = colNode.getAttribute('data-value'); 64 | if (col.type === 'number') { 65 | val = Number(val); 66 | } 67 | data[col.key] = val; 68 | } 69 | return data; 70 | } 71 | // loads all row data 72 | function loadData() { 73 | var rows = getTableBody().querySelectorAll('tr'), 74 | i; 75 | 76 | for (i = 0; i < rows.length; i += 1) { 77 | rows[i].data = loadRowData(rows[i]); 78 | } 79 | } 80 | // sorts the table using the data for the ith column 81 | function sortByIndex(index, desc) { 82 | var key = cols[index].key, 83 | sorter = function(a, b) { 84 | a = a.data[key]; 85 | b = b.data[key]; 86 | return a < b ? -1 : a > b ? 1 : 0; 87 | }, 88 | finalSorter = sorter, 89 | tableBody = document.querySelector('.coverage-summary tbody'), 90 | rowNodes = tableBody.querySelectorAll('tr'), 91 | rows = [], 92 | i; 93 | 94 | if (desc) { 95 | finalSorter = function(a, b) { 96 | return -1 * sorter(a, b); 97 | }; 98 | } 99 | 100 | for (i = 0; i < rowNodes.length; i += 1) { 101 | rows.push(rowNodes[i]); 102 | tableBody.removeChild(rowNodes[i]); 103 | } 104 | 105 | rows.sort(finalSorter); 106 | 107 | for (i = 0; i < rows.length; i += 1) { 108 | tableBody.appendChild(rows[i]); 109 | } 110 | } 111 | // removes sort indicators for current column being sorted 112 | function removeSortIndicators() { 113 | var col = getNthColumn(currentSort.index), 114 | cls = col.className; 115 | 116 | cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, ''); 117 | col.className = cls; 118 | } 119 | // adds sort indicators for current column being sorted 120 | function addSortIndicators() { 121 | getNthColumn(currentSort.index).className += currentSort.desc 122 | ? ' sorted-desc' 123 | : ' sorted'; 124 | } 125 | // adds event listeners for all sorter widgets 126 | function enableUI() { 127 | var i, 128 | el, 129 | ithSorter = function ithSorter(i) { 130 | var col = cols[i]; 131 | 132 | return function() { 133 | var desc = col.defaultDescSort; 134 | 135 | if (currentSort.index === i) { 136 | desc = !currentSort.desc; 137 | } 138 | sortByIndex(i, desc); 139 | removeSortIndicators(); 140 | currentSort.index = i; 141 | currentSort.desc = desc; 142 | addSortIndicators(); 143 | }; 144 | }; 145 | for (i = 0; i < cols.length; i += 1) { 146 | if (cols[i].sortable) { 147 | // add the click event handler on the th so users 148 | // dont have to click on those tiny arrows 149 | el = getNthColumn(i).querySelector('.sorter').parentElement; 150 | if (el.addEventListener) { 151 | el.addEventListener('click', ithSorter(i)); 152 | } else { 153 | el.attachEvent('onclick', ithSorter(i)); 154 | } 155 | } 156 | } 157 | } 158 | // adds sorting functionality to the UI 159 | return function() { 160 | if (!getTable()) { 161 | return; 162 | } 163 | cols = loadColumns(); 164 | loadData(); 165 | addSortIndicators(); 166 | enableUI(); 167 | }; 168 | })(); 169 | 170 | window.addEventListener('load', addSorting); 171 | -------------------------------------------------------------------------------- /coverage/clover.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /coverage/base.css: -------------------------------------------------------------------------------- 1 | body, html { 2 | margin:0; padding: 0; 3 | height: 100%; 4 | } 5 | body { 6 | font-family: Helvetica Neue, Helvetica, Arial; 7 | font-size: 14px; 8 | color:#333; 9 | } 10 | .small { font-size: 12px; } 11 | *, *:after, *:before { 12 | -webkit-box-sizing:border-box; 13 | -moz-box-sizing:border-box; 14 | box-sizing:border-box; 15 | } 16 | h1 { font-size: 20px; margin: 0;} 17 | h2 { font-size: 14px; } 18 | pre { 19 | font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace; 20 | margin: 0; 21 | padding: 0; 22 | -moz-tab-size: 2; 23 | -o-tab-size: 2; 24 | tab-size: 2; 25 | } 26 | a { color:#0074D9; text-decoration:none; } 27 | a:hover { text-decoration:underline; } 28 | .strong { font-weight: bold; } 29 | .space-top1 { padding: 10px 0 0 0; } 30 | .pad2y { padding: 20px 0; } 31 | .pad1y { padding: 10px 0; } 32 | .pad2x { padding: 0 20px; } 33 | .pad2 { padding: 20px; } 34 | .pad1 { padding: 10px; } 35 | .space-left2 { padding-left:55px; } 36 | .space-right2 { padding-right:20px; } 37 | .center { text-align:center; } 38 | .clearfix { display:block; } 39 | .clearfix:after { 40 | content:''; 41 | display:block; 42 | height:0; 43 | clear:both; 44 | visibility:hidden; 45 | } 46 | .fl { float: left; } 47 | @media only screen and (max-width:640px) { 48 | .col3 { width:100%; max-width:100%; } 49 | .hide-mobile { display:none!important; } 50 | } 51 | 52 | .quiet { 53 | color: #7f7f7f; 54 | color: rgba(0,0,0,0.5); 55 | } 56 | .quiet a { opacity: 0.7; } 57 | 58 | .fraction { 59 | font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; 60 | font-size: 10px; 61 | color: #555; 62 | background: #E8E8E8; 63 | padding: 4px 5px; 64 | border-radius: 3px; 65 | vertical-align: middle; 66 | } 67 | 68 | div.path a:link, div.path a:visited { color: #333; } 69 | table.coverage { 70 | border-collapse: collapse; 71 | margin: 10px 0 0 0; 72 | padding: 0; 73 | } 74 | 75 | table.coverage td { 76 | margin: 0; 77 | padding: 0; 78 | vertical-align: top; 79 | } 80 | table.coverage td.line-count { 81 | text-align: right; 82 | padding: 0 5px 0 20px; 83 | } 84 | table.coverage td.line-coverage { 85 | text-align: right; 86 | padding-right: 10px; 87 | min-width:20px; 88 | } 89 | 90 | table.coverage td span.cline-any { 91 | display: inline-block; 92 | padding: 0 5px; 93 | width: 100%; 94 | } 95 | .missing-if-branch { 96 | display: inline-block; 97 | margin-right: 5px; 98 | border-radius: 3px; 99 | position: relative; 100 | padding: 0 4px; 101 | background: #333; 102 | color: yellow; 103 | } 104 | 105 | .skip-if-branch { 106 | display: none; 107 | margin-right: 10px; 108 | position: relative; 109 | padding: 0 4px; 110 | background: #ccc; 111 | color: white; 112 | } 113 | .missing-if-branch .typ, .skip-if-branch .typ { 114 | color: inherit !important; 115 | } 116 | .coverage-summary { 117 | border-collapse: collapse; 118 | width: 100%; 119 | } 120 | .coverage-summary tr { border-bottom: 1px solid #bbb; } 121 | .keyline-all { border: 1px solid #ddd; } 122 | .coverage-summary td, .coverage-summary th { padding: 10px; } 123 | .coverage-summary tbody { border: 1px solid #bbb; } 124 | .coverage-summary td { border-right: 1px solid #bbb; } 125 | .coverage-summary td:last-child { border-right: none; } 126 | .coverage-summary th { 127 | text-align: left; 128 | font-weight: normal; 129 | white-space: nowrap; 130 | } 131 | .coverage-summary th.file { border-right: none !important; } 132 | .coverage-summary th.pct { } 133 | .coverage-summary th.pic, 134 | .coverage-summary th.abs, 135 | .coverage-summary td.pct, 136 | .coverage-summary td.abs { text-align: right; } 137 | .coverage-summary td.file { white-space: nowrap; } 138 | .coverage-summary td.pic { min-width: 120px !important; } 139 | .coverage-summary tfoot td { } 140 | 141 | .coverage-summary .sorter { 142 | height: 10px; 143 | width: 7px; 144 | display: inline-block; 145 | margin-left: 0.5em; 146 | background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent; 147 | } 148 | .coverage-summary .sorted .sorter { 149 | background-position: 0 -20px; 150 | } 151 | .coverage-summary .sorted-desc .sorter { 152 | background-position: 0 -10px; 153 | } 154 | .status-line { height: 10px; } 155 | /* yellow */ 156 | .cbranch-no { background: yellow !important; color: #111; } 157 | /* dark red */ 158 | .red.solid, .status-line.low, .low .cover-fill { background:#C21F39 } 159 | .low .chart { border:1px solid #C21F39 } 160 | .highlighted, 161 | .highlighted .cstat-no, .highlighted .fstat-no, .highlighted .cbranch-no{ 162 | background: #C21F39 !important; 163 | } 164 | /* medium red */ 165 | .cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE } 166 | /* light red */ 167 | .low, .cline-no { background:#FCE1E5 } 168 | /* light green */ 169 | .high, .cline-yes { background:rgb(230,245,208) } 170 | /* medium green */ 171 | .cstat-yes { background:rgb(161,215,106) } 172 | /* dark green */ 173 | .status-line.high, .high .cover-fill { background:rgb(77,146,33) } 174 | .high .chart { border:1px solid rgb(77,146,33) } 175 | /* dark yellow (gold) */ 176 | .status-line.medium, .medium .cover-fill { background: #f9cd0b; } 177 | .medium .chart { border:1px solid #f9cd0b; } 178 | /* light yellow */ 179 | .medium { background: #fff4c2; } 180 | 181 | .cstat-skip { background: #ddd; color: #111; } 182 | .fstat-skip { background: #ddd; color: #111 !important; } 183 | .cbranch-skip { background: #ddd !important; color: #111; } 184 | 185 | span.cline-neutral { background: #eaeaea; } 186 | 187 | .coverage-summary td.empty { 188 | opacity: .5; 189 | padding-top: 4px; 190 | padding-bottom: 4px; 191 | line-height: 1; 192 | color: #888; 193 | } 194 | 195 | .cover-fill, .cover-empty { 196 | display:inline-block; 197 | height: 12px; 198 | } 199 | .chart { 200 | line-height: 0; 201 | } 202 | .cover-empty { 203 | background: white; 204 | } 205 | .cover-full { 206 | border-right: none !important; 207 | } 208 | pre.prettyprint { 209 | border: none !important; 210 | padding: 0 !important; 211 | margin: 0 !important; 212 | } 213 | .com { color: #999 !important; } 214 | .ignore-none { color: #999; font-weight: normal; } 215 | 216 | .wrapper { 217 | min-height: 100%; 218 | height: auto !important; 219 | height: 100%; 220 | margin: 0 auto -48px; 221 | } 222 | .footer, .push { 223 | height: 48px; 224 | } 225 | -------------------------------------------------------------------------------- /coverage/lcov-report/base.css: -------------------------------------------------------------------------------- 1 | body, html { 2 | margin:0; padding: 0; 3 | height: 100%; 4 | } 5 | body { 6 | font-family: Helvetica Neue, Helvetica, Arial; 7 | font-size: 14px; 8 | color:#333; 9 | } 10 | .small { font-size: 12px; } 11 | *, *:after, *:before { 12 | -webkit-box-sizing:border-box; 13 | -moz-box-sizing:border-box; 14 | box-sizing:border-box; 15 | } 16 | h1 { font-size: 20px; margin: 0;} 17 | h2 { font-size: 14px; } 18 | pre { 19 | font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace; 20 | margin: 0; 21 | padding: 0; 22 | -moz-tab-size: 2; 23 | -o-tab-size: 2; 24 | tab-size: 2; 25 | } 26 | a { color:#0074D9; text-decoration:none; } 27 | a:hover { text-decoration:underline; } 28 | .strong { font-weight: bold; } 29 | .space-top1 { padding: 10px 0 0 0; } 30 | .pad2y { padding: 20px 0; } 31 | .pad1y { padding: 10px 0; } 32 | .pad2x { padding: 0 20px; } 33 | .pad2 { padding: 20px; } 34 | .pad1 { padding: 10px; } 35 | .space-left2 { padding-left:55px; } 36 | .space-right2 { padding-right:20px; } 37 | .center { text-align:center; } 38 | .clearfix { display:block; } 39 | .clearfix:after { 40 | content:''; 41 | display:block; 42 | height:0; 43 | clear:both; 44 | visibility:hidden; 45 | } 46 | .fl { float: left; } 47 | @media only screen and (max-width:640px) { 48 | .col3 { width:100%; max-width:100%; } 49 | .hide-mobile { display:none!important; } 50 | } 51 | 52 | .quiet { 53 | color: #7f7f7f; 54 | color: rgba(0,0,0,0.5); 55 | } 56 | .quiet a { opacity: 0.7; } 57 | 58 | .fraction { 59 | font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; 60 | font-size: 10px; 61 | color: #555; 62 | background: #E8E8E8; 63 | padding: 4px 5px; 64 | border-radius: 3px; 65 | vertical-align: middle; 66 | } 67 | 68 | div.path a:link, div.path a:visited { color: #333; } 69 | table.coverage { 70 | border-collapse: collapse; 71 | margin: 10px 0 0 0; 72 | padding: 0; 73 | } 74 | 75 | table.coverage td { 76 | margin: 0; 77 | padding: 0; 78 | vertical-align: top; 79 | } 80 | table.coverage td.line-count { 81 | text-align: right; 82 | padding: 0 5px 0 20px; 83 | } 84 | table.coverage td.line-coverage { 85 | text-align: right; 86 | padding-right: 10px; 87 | min-width:20px; 88 | } 89 | 90 | table.coverage td span.cline-any { 91 | display: inline-block; 92 | padding: 0 5px; 93 | width: 100%; 94 | } 95 | .missing-if-branch { 96 | display: inline-block; 97 | margin-right: 5px; 98 | border-radius: 3px; 99 | position: relative; 100 | padding: 0 4px; 101 | background: #333; 102 | color: yellow; 103 | } 104 | 105 | .skip-if-branch { 106 | display: none; 107 | margin-right: 10px; 108 | position: relative; 109 | padding: 0 4px; 110 | background: #ccc; 111 | color: white; 112 | } 113 | .missing-if-branch .typ, .skip-if-branch .typ { 114 | color: inherit !important; 115 | } 116 | .coverage-summary { 117 | border-collapse: collapse; 118 | width: 100%; 119 | } 120 | .coverage-summary tr { border-bottom: 1px solid #bbb; } 121 | .keyline-all { border: 1px solid #ddd; } 122 | .coverage-summary td, .coverage-summary th { padding: 10px; } 123 | .coverage-summary tbody { border: 1px solid #bbb; } 124 | .coverage-summary td { border-right: 1px solid #bbb; } 125 | .coverage-summary td:last-child { border-right: none; } 126 | .coverage-summary th { 127 | text-align: left; 128 | font-weight: normal; 129 | white-space: nowrap; 130 | } 131 | .coverage-summary th.file { border-right: none !important; } 132 | .coverage-summary th.pct { } 133 | .coverage-summary th.pic, 134 | .coverage-summary th.abs, 135 | .coverage-summary td.pct, 136 | .coverage-summary td.abs { text-align: right; } 137 | .coverage-summary td.file { white-space: nowrap; } 138 | .coverage-summary td.pic { min-width: 120px !important; } 139 | .coverage-summary tfoot td { } 140 | 141 | .coverage-summary .sorter { 142 | height: 10px; 143 | width: 7px; 144 | display: inline-block; 145 | margin-left: 0.5em; 146 | background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent; 147 | } 148 | .coverage-summary .sorted .sorter { 149 | background-position: 0 -20px; 150 | } 151 | .coverage-summary .sorted-desc .sorter { 152 | background-position: 0 -10px; 153 | } 154 | .status-line { height: 10px; } 155 | /* yellow */ 156 | .cbranch-no { background: yellow !important; color: #111; } 157 | /* dark red */ 158 | .red.solid, .status-line.low, .low .cover-fill { background:#C21F39 } 159 | .low .chart { border:1px solid #C21F39 } 160 | .highlighted, 161 | .highlighted .cstat-no, .highlighted .fstat-no, .highlighted .cbranch-no{ 162 | background: #C21F39 !important; 163 | } 164 | /* medium red */ 165 | .cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE } 166 | /* light red */ 167 | .low, .cline-no { background:#FCE1E5 } 168 | /* light green */ 169 | .high, .cline-yes { background:rgb(230,245,208) } 170 | /* medium green */ 171 | .cstat-yes { background:rgb(161,215,106) } 172 | /* dark green */ 173 | .status-line.high, .high .cover-fill { background:rgb(77,146,33) } 174 | .high .chart { border:1px solid rgb(77,146,33) } 175 | /* dark yellow (gold) */ 176 | .status-line.medium, .medium .cover-fill { background: #f9cd0b; } 177 | .medium .chart { border:1px solid #f9cd0b; } 178 | /* light yellow */ 179 | .medium { background: #fff4c2; } 180 | 181 | .cstat-skip { background: #ddd; color: #111; } 182 | .fstat-skip { background: #ddd; color: #111 !important; } 183 | .cbranch-skip { background: #ddd !important; color: #111; } 184 | 185 | span.cline-neutral { background: #eaeaea; } 186 | 187 | .coverage-summary td.empty { 188 | opacity: .5; 189 | padding-top: 4px; 190 | padding-bottom: 4px; 191 | line-height: 1; 192 | color: #888; 193 | } 194 | 195 | .cover-fill, .cover-empty { 196 | display:inline-block; 197 | height: 12px; 198 | } 199 | .chart { 200 | line-height: 0; 201 | } 202 | .cover-empty { 203 | background: white; 204 | } 205 | .cover-full { 206 | border-right: none !important; 207 | } 208 | pre.prettyprint { 209 | border: none !important; 210 | padding: 0 !important; 211 | margin: 0 !important; 212 | } 213 | .com { color: #999 !important; } 214 | .ignore-none { color: #999; font-weight: normal; } 215 | 216 | .wrapper { 217 | min-height: 100%; 218 | height: auto !important; 219 | height: 100%; 220 | margin: 0 auto -48px; 221 | } 222 | .footer, .push { 223 | height: 48px; 224 | } 225 | -------------------------------------------------------------------------------- /tests/unit/vue-numeric-input.spec.js: -------------------------------------------------------------------------------- 1 | import { shallowMount } from '@vue/test-utils' 2 | import VueNumericInput from '@/vue-numeric-input.vue' 3 | import { triggerEvent, triggerClick, triggerMouseWheel } from '../util' 4 | import Vue from 'vue'; 5 | 6 | const originalError= console.error; 7 | afterEach(() => (console.error = originalError)); 8 | 9 | describe('VueNumericInput', () => { 10 | let consoleOutput = []; 11 | const mockedError = output => consoleOutput.push(output); 12 | beforeEach(() => (console.error = mockedError)); 13 | const strExpected = [ 14 | expect.stringMatching(/Invalid prop/) 15 | ]; 16 | it('value', () => { 17 | const wrapper = shallowMount(VueNumericInput, { 18 | propsData: { 19 | value: 10 20 | } 21 | }); 22 | const val = wrapper.find('.numeric-input').element.value; 23 | expect(parseInt(val)).toBe(10); 24 | wrapper.destroy(); 25 | }); 26 | it('increment', done => { 27 | const wrapper = shallowMount(VueNumericInput, { 28 | propsData: { 29 | value: 10 30 | } 31 | }); 32 | const incrementBtn = wrapper.find('.btn-increment'); 33 | triggerEvent(incrementBtn, 'mousedown'); 34 | triggerClick(document, 'mouseup'); 35 | Vue.nextTick(() => { 36 | expect(parseInt(wrapper.find('.numeric-input').element.value)).toBe(11); 37 | wrapper.destroy(); 38 | done() 39 | }) 40 | }); 41 | it('decrement', done => { 42 | const wrapper = shallowMount(VueNumericInput, { 43 | propsData: { 44 | value: 10 45 | } 46 | }); 47 | const decrementBtn = wrapper.find('.btn-decrement'); 48 | triggerEvent(decrementBtn, 'mousedown'); 49 | triggerClick(document, 'mouseup'); 50 | Vue.nextTick(() => { 51 | expect(parseInt(wrapper.find('.numeric-input').element.value)).toBe(9); 52 | wrapper.destroy(); 53 | done() 54 | }) 55 | }); 56 | it('disabled', done => { 57 | const wrapper = shallowMount(VueNumericInput, { 58 | propsData: { 59 | value: 8, 60 | disabled: true 61 | } 62 | }); 63 | let incrementBtn = wrapper.find('.btn-increment'); 64 | // let decrementBtn = wrapper.find('.btn-decrement'); 65 | let input = wrapper.find('.numeric-input'); 66 | triggerEvent(incrementBtn, 'mousedown'); 67 | triggerClick(document, 'mouseup'); 68 | Vue.nextTick(() => { 69 | expect(parseInt(input.element.value)).toBe(8); 70 | wrapper.destroy(); 71 | done(); 72 | }) 73 | }); 74 | it('readonly', done => { 75 | const wrapper = shallowMount(VueNumericInput, { 76 | propsData: { 77 | value: 8, 78 | readonly: true 79 | } 80 | }); 81 | let incrementBtn = wrapper.find('.btn-increment'); 82 | let input = wrapper.find('.numeric-input'); 83 | triggerEvent(incrementBtn, 'mousedown'); 84 | triggerClick(document, 'mouseup'); 85 | Vue.nextTick(() => { 86 | expect(parseInt(input.element.value)).toBe(8); 87 | wrapper.destroy(); 88 | done(); 89 | }); 90 | }); 91 | it('step', done => { 92 | const wrapper = shallowMount(VueNumericInput, { 93 | propsData: { 94 | value: 10, 95 | step: 1.5 96 | } 97 | }); 98 | const incrementBtn = wrapper.find('.btn-increment'); 99 | const input = wrapper.find('.numeric-input'); 100 | triggerEvent(incrementBtn, 'mousedown'); 101 | triggerClick(document, 'mouseup'); 102 | Vue.nextTick(() => { 103 | expect(parseFloat(input.element.value)).toBe(11.5); 104 | wrapper.destroy(); 105 | done(); 106 | }); 107 | }); 108 | it('max', () => { 109 | const wrapper = shallowMount(VueNumericInput, { 110 | propsData: { 111 | value: 30, 112 | max: 20 113 | } 114 | }); 115 | const input = wrapper.find('.numeric-input'); 116 | expect(parseInt(input.element.value)).toBe(20); 117 | }); 118 | it('greater then max is entered', (done) => { 119 | const wrapper = shallowMount(VueNumericInput, { 120 | propsData: { 121 | value: 22, 122 | max: 20 123 | } 124 | }); 125 | const incrementBtn = wrapper.find('.btn-increment'); 126 | triggerEvent(incrementBtn, 'mousedown'); 127 | triggerClick(document, 'mouseup'); 128 | Vue.nextTick(() => { 129 | const input = wrapper.find('.numeric-input'); 130 | expect(parseFloat(input.element.value)).toBe(20); 131 | wrapper.destroy(); 132 | done(); 133 | }); 134 | }); 135 | it('min', () => { 136 | const wrapper = shallowMount(VueNumericInput, { 137 | propsData: { 138 | value: 10, 139 | min: 15 140 | } 141 | }); 142 | const input = wrapper.find('.numeric-input'); 143 | expect(parseInt(input.element.value)).toBe(15); 144 | wrapper.destroy(); 145 | }); 146 | it('less then min is entered', (done) => { 147 | const wrapper = shallowMount(VueNumericInput, { 148 | propsData: { 149 | value: 10, 150 | min: 10 151 | } 152 | }); 153 | const decrementBtn = wrapper.find('.btn-decrement'); 154 | const input = wrapper.find('.numeric-input'); 155 | triggerEvent(decrementBtn, 'mousedown'); 156 | triggerClick(document, 'mouseup'); 157 | Vue.nextTick(() => { 158 | expect(parseInt(input.element.value)).toBe(10); 159 | wrapper.destroy(); 160 | done(); 161 | }); 162 | }) 163 | it('align', () => { 164 | const wrapper = shallowMount(VueNumericInput, { 165 | propsData: { 166 | value: 10, 167 | align: "center" 168 | } 169 | }); 170 | const input = wrapper.find('.numeric-input'); 171 | expect(input.element.style.textAlign).toBe('center'); 172 | wrapper.destroy(); 173 | }) 174 | it('controls', () => { 175 | const wrapper = shallowMount(VueNumericInput, { 176 | propsData: { 177 | controls: true 178 | } 179 | }); 180 | expect(wrapper.findAll('button').exists()).toBe(true); 181 | wrapper.destroy(); 182 | }) 183 | it('controls false', () => { 184 | const wrapper = shallowMount(VueNumericInput, { 185 | propsData: { 186 | controls: false 187 | } 188 | }); 189 | const input = wrapper.find('.numeric-input'); 190 | expect(wrapper.findAll('button').exists()).toBe(false); 191 | expect(input.classes()).toContain('no-control'); 192 | wrapper.destroy(); 193 | }) 194 | it('controlsType', () => { 195 | const wrapper = shallowMount(VueNumericInput, { 196 | propsData: { 197 | controlsType : "updown" 198 | } 199 | }); 200 | expect(wrapper.classes()).toContain('updown'); 201 | }); 202 | it('width', () => { 203 | const wrapper = shallowMount(VueNumericInput, { 204 | propsData: { 205 | width : "200px" 206 | } 207 | }); 208 | expect(wrapper.attributes().style).toBe("width: 200px;"); 209 | wrapper.destroy(); 210 | }); 211 | it('size', () => { 212 | const wrapper = shallowMount(VueNumericInput, { 213 | propsData: { 214 | size : "large" 215 | } 216 | }); 217 | expect(wrapper.classes()).toContain("large"); 218 | wrapper.destroy(); 219 | }); 220 | it('small size', () => { 221 | const wrapper = shallowMount(VueNumericInput, { 222 | propsData: { 223 | size : "small" 224 | } 225 | }); 226 | expect(wrapper.classes()).toContain("small"); 227 | wrapper.destroy(); 228 | }); 229 | it('validate precision to be integer', () => { 230 | const wrapper = shallowMount(VueNumericInput, { 231 | propsData: { 232 | value: 10, 233 | precision: 0.5 234 | } 235 | }); 236 | const val = wrapper.find('.numeric-input').element.value; 237 | expect(parseInt(val)).toBe(10); 238 | expect(consoleOutput).toEqual(expect.arrayContaining(strExpected)); 239 | wrapper.destroy(); 240 | }); 241 | it('precision', () => { 242 | const wrapper = shallowMount(VueNumericInput, { 243 | propsData: { 244 | value: 10.564, 245 | precision: 2 246 | } 247 | }); 248 | let input = wrapper.find('.numeric-input'); 249 | expect(parseFloat(input.element.value)).toBe(10.56); 250 | wrapper.destroy(); 251 | }); 252 | it('increment with precision', async() => { 253 | const wrapper = shallowMount(VueNumericInput, { 254 | propsData: { 255 | value: 10.562, 256 | precision: 2 257 | } 258 | }); 259 | const incrementBtn = wrapper.find('.btn-increment'); 260 | triggerEvent(incrementBtn, 'mousedown'); 261 | triggerClick(document, 'mouseup'); 262 | await Vue.nextTick(); 263 | expect(parseFloat(wrapper.find('.numeric-input').element.value)).toBe(11.56); 264 | }); 265 | it('test stop mouse event when called before time interval', () => { 266 | const wrapper = shallowMount(VueNumericInput, { 267 | propsData: { 268 | value: 10 269 | } 270 | }); 271 | const spy = jest.spyOn(wrapper.vm, 'increment'); 272 | wrapper.vm.start(wrapper.vm.increment); 273 | wrapper.vm.stop(new Event('mouseup')); 274 | expect(wrapper.vm.increment).toHaveBeenCalled(); 275 | spy.mockReset(); 276 | }); 277 | it('test input event', () => { 278 | const spy = jest.spyOn(VueNumericInput.methods, 'onInput'); 279 | const wrapper = shallowMount(VueNumericInput, { 280 | propsData: { 281 | value: 10 282 | } 283 | }); 284 | const input = wrapper.find('.numeric-input'); 285 | input.element.value = 15; 286 | input.trigger('input'); 287 | expect(spy).toHaveBeenCalled(); 288 | wrapper.destroy(); 289 | }); 290 | it('test focus event', () => { 291 | const wrapper = shallowMount(VueNumericInput, { 292 | propsData: { 293 | value: 10 294 | } 295 | }); 296 | wrapper.vm.$refs["input"].focus(); 297 | expect(wrapper.emitted('focus')).toHaveLength(1); 298 | wrapper.destroy(); 299 | }); 300 | it('test focus method', () => { 301 | const wrapper = shallowMount(VueNumericInput, { 302 | propsData: { 303 | value: 10 304 | } 305 | }); 306 | wrapper.vm.focus(); 307 | expect(wrapper.emitted('focus')).toHaveLength(1); 308 | wrapper.destroy(); 309 | }); 310 | it('test blur event', () => { 311 | const wrapper = shallowMount(VueNumericInput, { 312 | propsData: { 313 | value: 10 314 | } 315 | }); 316 | wrapper.vm.$refs["input"].focus(); 317 | wrapper.vm.$refs["input"].blur(); 318 | expect(wrapper.emitted('blur')).toHaveLength(1); 319 | wrapper.destroy(); 320 | }); 321 | it('test blur method', () => { 322 | const wrapper = shallowMount(VueNumericInput, { 323 | propsData: { 324 | value: 10 325 | } 326 | }); 327 | wrapper.vm.$refs["input"].focus(); 328 | wrapper.vm.blur(); 329 | expect(wrapper.emitted('blur')).toHaveLength(1); 330 | wrapper.destroy(); 331 | }); 332 | it('emit change', () => { 333 | const wrapper = shallowMount(VueNumericInput, { 334 | propsData: { 335 | value: 10 336 | } 337 | }); 338 | triggerEvent(wrapper.vm.$refs["input"], 'change'); 339 | expect(wrapper.emitted('change')).toHaveLength(1); 340 | wrapper.destroy(); 341 | }); 342 | it('instance gets destroyed', () => { 343 | const beforeDestroyedSpy = jest.spyOn(VueNumericInput, 'beforeDestroy'); 344 | const wrapper = shallowMount(VueNumericInput,{ 345 | propsData: { 346 | value: 10 347 | } 348 | }); 349 | wrapper.destroy(); 350 | expect(beforeDestroyedSpy).toHaveBeenCalled(); 351 | wrapper.destroy(); 352 | }); 353 | it('test mouse wheel increment', (done) => { 354 | const wrapper = shallowMount(VueNumericInput, { 355 | propsData: { 356 | value: 10, 357 | mousewheel: true 358 | } 359 | }); 360 | triggerMouseWheel(wrapper.vm.$refs["input"], -100); 361 | Vue.nextTick(() => { 362 | expect(parseInt(wrapper.find('.numeric-input').element.value)).toBeGreaterThanOrEqual(11); 363 | wrapper.destroy(); 364 | done() 365 | }) 366 | }); 367 | it('test mouse wheel decrement', (done) => { 368 | const wrapper = shallowMount(VueNumericInput, { 369 | propsData: { 370 | value: 10, 371 | mousewheel: true 372 | } 373 | }); 374 | triggerMouseWheel(wrapper.vm.$refs["input"], 100); 375 | Vue.nextTick(() => { 376 | expect(parseInt(wrapper.find('.numeric-input').element.value)).toBeLessThan(10); 377 | wrapper.destroy(); 378 | done() 379 | }) 380 | }); 381 | it('test mouse wheel event', (done) => { 382 | const wrapper = shallowMount(VueNumericInput, { 383 | propsData: { 384 | value: 10, 385 | mousewheel: true 386 | } 387 | }); 388 | const input = wrapper.find('.numeric-input'); 389 | input.element.focus(); 390 | triggerMouseWheel(input.element, 200); 391 | Vue.nextTick(() => { 392 | console.log('VALUE ' + input.element.value); 393 | expect(parseInt(input.element.value)).toBeLessThan(10); 394 | wrapper.destroy(); 395 | done(); 396 | }); 397 | }); 398 | }); 399 | -------------------------------------------------------------------------------- /src/vue-numeric-input.vue: -------------------------------------------------------------------------------- 1 | 63 | 383 | 578 | -------------------------------------------------------------------------------- /coverage/prettify.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);c(g([[F,/^[\s]+/,null," \t\r\n"],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);c(g([],[[n,/^[\s\S]+/]]),["uq.val"]);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),["c","cc","cpp","cxx","cyc","m"]);c(i({keywords:"null,true,false"}),["json"]);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),["cs"]);c(i({keywords:x,cStyleComments:true}),["java"]);c(i({keywords:H,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),["js"]);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);c(g([],[[C,/^[\s\S]+/]]),["regex"]);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V)}catch(W){if("console" in window){console.log(W&&W.stack?W.stack:W)}}}function y(W,V,U){var S=document.createElement("PRE");S.innerHTML=W;if(U){Q(S,U)}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML}function b(ad){function Y(af){return document.getElementsByTagName(af)}var ac=[Y("pre"),Y("code"),Y("xmp")];var T=[];for(var aa=0;aa=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&"CODE"===am.tagName){ah=am.className.match(ab)}if(ah){ah=ah[1]}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==="pre"||ak.tagName==="code"||ak.tagName==="xmp")&&ak.className&&ak.className.indexOf("prettyprint")>=0){al=true;break}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af)}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S)}}}if(X]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); 3 | -------------------------------------------------------------------------------- /coverage/lcov-report/prettify.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);c(g([[F,/^[\s]+/,null," \t\r\n"],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);c(g([],[[n,/^[\s\S]+/]]),["uq.val"]);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),["c","cc","cpp","cxx","cyc","m"]);c(i({keywords:"null,true,false"}),["json"]);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),["cs"]);c(i({keywords:x,cStyleComments:true}),["java"]);c(i({keywords:H,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),["js"]);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);c(g([],[[C,/^[\s\S]+/]]),["regex"]);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V)}catch(W){if("console" in window){console.log(W&&W.stack?W.stack:W)}}}function y(W,V,U){var S=document.createElement("PRE");S.innerHTML=W;if(U){Q(S,U)}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML}function b(ad){function Y(af){return document.getElementsByTagName(af)}var ac=[Y("pre"),Y("code"),Y("xmp")];var T=[];for(var aa=0;aa=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&"CODE"===am.tagName){ah=am.className.match(ab)}if(ah){ah=ah[1]}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==="pre"||ak.tagName==="code"||ak.tagName==="xmp")&&ak.className&&ak.className.indexOf("prettyprint")>=0){al=true;break}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af)}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S)}}}if(X]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); 3 | -------------------------------------------------------------------------------- /coverage/coverage-final.json: -------------------------------------------------------------------------------- 1 | {"D:\\GitHub\\VueNumericInputNew\\vue-numeric-input\\src\\vue-numeric-input.vue": {"path":"D:\\GitHub\\VueNumericInputNew\\vue-numeric-input\\src\\vue-numeric-input.vue","statementMap":{"0":{"start":{"line":64,"column":0},"end":{"line":64,"column":null}},"1":{"start":{"line":94,"column":0},"end":{"line":94,"column":null}},"2":{"start":{"line":100,"column":0},"end":{"line":100,"column":null}},"3":{"start":{"line":137,"column":0},"end":{"line":137,"column":null}},"4":{"start":{"line":150,"column":0},"end":{"line":152,"column":null}},"5":{"start":{"line":151,"column":0},"end":{"line":151,"column":null}},"6":{"start":{"line":153,"column":0},"end":{"line":159,"column":null}},"7":{"start":{"line":154,"column":0},"end":{"line":154,"column":null}},"8":{"start":{"line":155,"column":0},"end":{"line":159,"column":null}},"9":{"start":{"line":156,"column":0},"end":{"line":156,"column":null}},"10":{"start":{"line":158,"column":0},"end":{"line":158,"column":null}},"11":{"start":{"line":161,"column":0},"end":{"line":163,"column":null}},"12":{"start":{"line":162,"column":0},"end":{"line":162,"column":null}},"13":{"start":{"line":174,"column":0},"end":{"line":174,"column":null}},"14":{"start":{"line":175,"column":0},"end":{"line":175,"column":null}},"15":{"start":{"line":184,"column":0},"end":{"line":184,"column":null}},"16":{"start":{"line":185,"column":0},"end":{"line":185,"column":null}},"17":{"start":{"line":195,"column":0},"end":{"line":195,"column":null}},"18":{"start":{"line":196,"column":0},"end":{"line":196,"column":null}},"19":{"start":{"line":197,"column":0},"end":{"line":197,"column":null}},"20":{"start":{"line":198,"column":0},"end":{"line":198,"column":null}},"21":{"start":{"line":199,"column":0},"end":{"line":201,"column":null}},"22":{"start":{"line":200,"column":0},"end":{"line":200,"column":null}},"23":{"start":{"line":202,"column":0},"end":{"line":202,"column":null}},"24":{"start":{"line":208,"column":0},"end":{"line":220,"column":null}},"25":{"start":{"line":209,"column":0},"end":{"line":209,"column":null}},"26":{"start":{"line":210,"column":0},"end":{"line":210,"column":null}},"27":{"start":{"line":211,"column":0},"end":{"line":211,"column":null}},"28":{"start":{"line":214,"column":0},"end":{"line":219,"column":null}},"29":{"start":{"line":215,"column":0},"end":{"line":215,"column":null}},"30":{"start":{"line":216,"column":0},"end":{"line":216,"column":null}},"31":{"start":{"line":218,"column":0},"end":{"line":218,"column":null}},"32":{"start":{"line":226,"column":0},"end":{"line":238,"column":null}},"33":{"start":{"line":227,"column":0},"end":{"line":227,"column":null}},"34":{"start":{"line":228,"column":0},"end":{"line":228,"column":null}},"35":{"start":{"line":229,"column":0},"end":{"line":229,"column":null}},"36":{"start":{"line":232,"column":0},"end":{"line":237,"column":null}},"37":{"start":{"line":233,"column":0},"end":{"line":233,"column":null}},"38":{"start":{"line":234,"column":0},"end":{"line":234,"column":null}},"39":{"start":{"line":236,"column":0},"end":{"line":236,"column":null}},"40":{"start":{"line":244,"column":0},"end":{"line":248,"column":null}},"41":{"start":{"line":245,"column":0},"end":{"line":247,"column":null}},"42":{"start":{"line":246,"column":0},"end":{"line":246,"column":null}},"43":{"start":{"line":255,"column":0},"end":{"line":255,"column":null}},"44":{"start":{"line":256,"column":0},"end":{"line":256,"column":null}},"45":{"start":{"line":257,"column":0},"end":{"line":257,"column":null}},"46":{"start":{"line":258,"column":0},"end":{"line":258,"column":null}},"47":{"start":{"line":259,"column":0},"end":{"line":259,"column":null}},"48":{"start":{"line":266,"column":0},"end":{"line":266,"column":null}},"49":{"start":{"line":267,"column":0},"end":{"line":269,"column":null}},"50":{"start":{"line":268,"column":0},"end":{"line":268,"column":null}},"51":{"start":{"line":270,"column":0},"end":{"line":270,"column":null}},"52":{"start":{"line":271,"column":0},"end":{"line":271,"column":null}},"53":{"start":{"line":272,"column":0},"end":{"line":272,"column":null}},"54":{"start":{"line":273,"column":0},"end":{"line":273,"column":null}},"55":{"start":{"line":274,"column":0},"end":{"line":274,"column":null}},"56":{"start":{"line":282,"column":0},"end":{"line":282,"column":null}},"57":{"start":{"line":289,"column":0},"end":{"line":289,"column":null}},"58":{"start":{"line":296,"column":0},"end":{"line":296,"column":null}},"59":{"start":{"line":302,"column":0},"end":{"line":304,"column":null}},"60":{"start":{"line":303,"column":0},"end":{"line":303,"column":null}},"61":{"start":{"line":310,"column":0},"end":{"line":310,"column":null}},"62":{"start":{"line":313,"column":0},"end":{"line":313,"column":null}},"63":{"start":{"line":314,"column":0},"end":{"line":314,"column":null}},"64":{"start":{"line":315,"column":0},"end":{"line":319,"column":null}},"65":{"start":{"line":316,"column":0},"end":{"line":316,"column":null}},"66":{"start":{"line":318,"column":0},"end":{"line":318,"column":null}},"67":{"start":{"line":320,"column":0},"end":{"line":320,"column":null}},"68":{"start":{"line":323,"column":0},"end":{"line":323,"column":null}},"69":{"start":{"line":324,"column":0},"end":{"line":331,"column":null}},"70":{"start":{"line":325,"column":0},"end":{"line":325,"column":null}},"71":{"start":{"line":326,"column":0},"end":{"line":328,"column":null}},"72":{"start":{"line":327,"column":0},"end":{"line":327,"column":null}},"73":{"start":{"line":329,"column":0},"end":{"line":329,"column":null}},"74":{"start":{"line":330,"column":0},"end":{"line":330,"column":null}},"75":{"start":{"line":337,"column":0},"end":{"line":337,"column":null}},"76":{"start":{"line":340,"column":0},"end":{"line":340,"column":null}},"77":{"start":{"line":341,"column":0},"end":{"line":341,"column":null}},"78":{"start":{"line":345,"column":0},"end":{"line":345,"column":null}},"79":{"start":{"line":346,"column":0},"end":{"line":353,"column":null}},"80":{"start":{"line":347,"column":0},"end":{"line":347,"column":null}},"81":{"start":{"line":349,"column":0},"end":{"line":349,"column":null}},"82":{"start":{"line":356,"column":0},"end":{"line":356,"column":null}},"83":{"start":{"line":363,"column":0},"end":{"line":363,"column":null}},"84":{"start":{"line":366,"column":0},"end":{"line":366,"column":null}},"85":{"start":{"line":367,"column":0},"end":{"line":371,"column":null}},"86":{"start":{"line":368,"column":0},"end":{"line":368,"column":null}},"87":{"start":{"line":369,"column":0},"end":{"line":371,"column":null}},"88":{"start":{"line":370,"column":0},"end":{"line":370,"column":null}},"89":{"start":{"line":372,"column":0},"end":{"line":372,"column":null}},"90":{"start":{"line":376,"column":0},"end":{"line":376,"column":null}},"91":{"start":{"line":377,"column":0},"end":{"line":377,"column":null}},"92":{"start":{"line":378,"column":0},"end":{"line":378,"column":null}},"93":{"start":{"line":379,"column":0},"end":{"line":379,"column":null}}},"fnMap":{"0":{"name":"(anonymous_1)","decl":{"start":{"line":93,"column":0},"end":{"line":93,"column":null}},"loc":{"start":{"line":93,"column":0},"end":{"line":95,"column":null}}},"1":{"name":"(anonymous_2)","decl":{"start":{"line":99,"column":0},"end":{"line":99,"column":null}},"loc":{"start":{"line":99,"column":0},"end":{"line":101,"column":null}}},"2":{"name":"(anonymous_3)","decl":{"start":{"line":136,"column":0},"end":{"line":136,"column":null}},"loc":{"start":{"line":136,"column":0},"end":{"line":145,"column":null}}},"3":{"name":"(anonymous_4)","decl":{"start":{"line":149,"column":0},"end":{"line":149,"column":null}},"loc":{"start":{"line":149,"column":0},"end":{"line":164,"column":null}}},"4":{"name":"(anonymous_5)","decl":{"start":{"line":173,"column":0},"end":{"line":173,"column":null}},"loc":{"start":{"line":173,"column":0},"end":{"line":176,"column":null}}},"5":{"name":"(anonymous_6)","decl":{"start":{"line":183,"column":0},"end":{"line":183,"column":null}},"loc":{"start":{"line":183,"column":0},"end":{"line":188,"column":null}}},"6":{"name":"(anonymous_7)","decl":{"start":{"line":194,"column":0},"end":{"line":194,"column":null}},"loc":{"start":{"line":194,"column":0},"end":{"line":203,"column":null}}},"7":{"name":"(anonymous_8)","decl":{"start":{"line":207,"column":0},"end":{"line":207,"column":null}},"loc":{"start":{"line":207,"column":0},"end":{"line":221,"column":null}}},"8":{"name":"(anonymous_9)","decl":{"start":{"line":225,"column":0},"end":{"line":225,"column":null}},"loc":{"start":{"line":225,"column":0},"end":{"line":239,"column":null}}},"9":{"name":"(anonymous_10)","decl":{"start":{"line":243,"column":0},"end":{"line":243,"column":null}},"loc":{"start":{"line":243,"column":0},"end":{"line":249,"column":null}}},"10":{"name":"(anonymous_11)","decl":{"start":{"line":244,"column":0},"end":{"line":244,"column":null}},"loc":{"start":{"line":244,"column":0},"end":{"line":248,"column":null}}},"11":{"name":"(anonymous_12)","decl":{"start":{"line":254,"column":0},"end":{"line":254,"column":null}},"loc":{"start":{"line":254,"column":0},"end":{"line":260,"column":null}}},"12":{"name":"(anonymous_13)","decl":{"start":{"line":265,"column":0},"end":{"line":265,"column":null}},"loc":{"start":{"line":265,"column":0},"end":{"line":276,"column":null}}},"13":{"name":"(anonymous_14)","decl":{"start":{"line":281,"column":0},"end":{"line":281,"column":null}},"loc":{"start":{"line":281,"column":0},"end":{"line":283,"column":null}}},"14":{"name":"(anonymous_15)","decl":{"start":{"line":288,"column":0},"end":{"line":288,"column":null}},"loc":{"start":{"line":288,"column":0},"end":{"line":290,"column":null}}},"15":{"name":"(anonymous_16)","decl":{"start":{"line":295,"column":0},"end":{"line":295,"column":null}},"loc":{"start":{"line":295,"column":0},"end":{"line":297,"column":null}}},"16":{"name":"(anonymous_17)","decl":{"start":{"line":301,"column":0},"end":{"line":301,"column":null}},"loc":{"start":{"line":301,"column":0},"end":{"line":305,"column":null}}},"17":{"name":"(anonymous_18)","decl":{"start":{"line":309,"column":0},"end":{"line":309,"column":null}},"loc":{"start":{"line":309,"column":0},"end":{"line":311,"column":null}}},"18":{"name":"(anonymous_19)","decl":{"start":{"line":312,"column":0},"end":{"line":312,"column":null}},"loc":{"start":{"line":312,"column":0},"end":{"line":321,"column":null}}},"19":{"name":"(anonymous_20)","decl":{"start":{"line":322,"column":0},"end":{"line":322,"column":null}},"loc":{"start":{"line":322,"column":0},"end":{"line":332,"column":null}}},"20":{"name":"(anonymous_21)","decl":{"start":{"line":324,"column":0},"end":{"line":324,"column":null}},"loc":{"start":{"line":324,"column":0},"end":{"line":331,"column":null}}},"21":{"name":"(anonymous_22)","decl":{"start":{"line":336,"column":0},"end":{"line":336,"column":null}},"loc":{"start":{"line":336,"column":0},"end":{"line":338,"column":null}}},"22":{"name":"(anonymous_23)","decl":{"start":{"line":339,"column":0},"end":{"line":339,"column":null}},"loc":{"start":{"line":339,"column":0},"end":{"line":342,"column":null}}},"23":{"name":"(anonymous_24)","decl":{"start":{"line":344,"column":0},"end":{"line":344,"column":null}},"loc":{"start":{"line":344,"column":0},"end":{"line":354,"column":null}}},"24":{"name":"(anonymous_25)","decl":{"start":{"line":355,"column":0},"end":{"line":355,"column":null}},"loc":{"start":{"line":355,"column":0},"end":{"line":361,"column":null}}},"25":{"name":"(anonymous_26)","decl":{"start":{"line":362,"column":0},"end":{"line":362,"column":null}},"loc":{"start":{"line":362,"column":0},"end":{"line":364,"column":null}}},"26":{"name":"(anonymous_27)","decl":{"start":{"line":365,"column":0},"end":{"line":365,"column":null}},"loc":{"start":{"line":365,"column":0},"end":{"line":373,"column":null}}},"27":{"name":"(anonymous_28)","decl":{"start":{"line":375,"column":0},"end":{"line":375,"column":null}},"loc":{"start":{"line":375,"column":0},"end":{"line":380,"column":null}}}},"branchMap":{"0":{"loc":{"start":{"line":100,"column":0},"end":{"line":100,"column":null}},"type":"binary-expr","locations":[{"start":{"line":100,"column":0},"end":{"line":100,"column":null}},{"start":{"line":100,"column":0},"end":{"line":100,"column":null}}]},"1":{"loc":{"start":{"line":150,"column":0},"end":{"line":152,"column":null}},"type":"if","locations":[{"start":{"line":150,"column":0},"end":{"line":152,"column":null}},{"start":{"line":150,"column":0},"end":{"line":152,"column":null}}]},"2":{"loc":{"start":{"line":153,"column":0},"end":{"line":159,"column":null}},"type":"if","locations":[{"start":{"line":153,"column":0},"end":{"line":159,"column":null}},{"start":{"line":153,"column":0},"end":{"line":159,"column":null}}]},"3":{"loc":{"start":{"line":153,"column":0},"end":{"line":153,"column":null}},"type":"binary-expr","locations":[{"start":{"line":153,"column":0},"end":{"line":153,"column":null}},{"start":{"line":153,"column":0},"end":{"line":153,"column":null}}]},"4":{"loc":{"start":{"line":155,"column":0},"end":{"line":159,"column":null}},"type":"if","locations":[{"start":{"line":155,"column":0},"end":{"line":159,"column":null}},{"start":{"line":155,"column":0},"end":{"line":159,"column":null}}]},"5":{"loc":{"start":{"line":155,"column":0},"end":{"line":155,"column":null}},"type":"binary-expr","locations":[{"start":{"line":155,"column":0},"end":{"line":155,"column":null}},{"start":{"line":155,"column":0},"end":{"line":155,"column":null}}]},"6":{"loc":{"start":{"line":161,"column":0},"end":{"line":163,"column":null}},"type":"if","locations":[{"start":{"line":161,"column":0},"end":{"line":163,"column":null}},{"start":{"line":161,"column":0},"end":{"line":163,"column":null}}]},"7":{"loc":{"start":{"line":175,"column":0},"end":{"line":175,"column":null}},"type":"cond-expr","locations":[{"start":{"line":175,"column":0},"end":{"line":175,"column":null}},{"start":{"line":175,"column":0},"end":{"line":175,"column":null}}]},"8":{"loc":{"start":{"line":184,"column":0},"end":{"line":184,"column":null}},"type":"if","locations":[{"start":{"line":184,"column":0},"end":{"line":184,"column":null}},{"start":{"line":184,"column":0},"end":{"line":184,"column":null}}]},"9":{"loc":{"start":{"line":195,"column":0},"end":{"line":195,"column":null}},"type":"if","locations":[{"start":{"line":195,"column":0},"end":{"line":195,"column":null}},{"start":{"line":195,"column":0},"end":{"line":195,"column":null}}]},"10":{"loc":{"start":{"line":199,"column":0},"end":{"line":201,"column":null}},"type":"if","locations":[{"start":{"line":199,"column":0},"end":{"line":201,"column":null}},{"start":{"line":199,"column":0},"end":{"line":201,"column":null}}]},"11":{"loc":{"start":{"line":208,"column":0},"end":{"line":220,"column":null}},"type":"if","locations":[{"start":{"line":208,"column":0},"end":{"line":220,"column":null}},{"start":{"line":208,"column":0},"end":{"line":220,"column":null}}]},"12":{"loc":{"start":{"line":208,"column":0},"end":{"line":208,"column":null}},"type":"binary-expr","locations":[{"start":{"line":208,"column":0},"end":{"line":208,"column":null}},{"start":{"line":208,"column":0},"end":{"line":208,"column":null}}]},"13":{"loc":{"start":{"line":209,"column":0},"end":{"line":209,"column":null}},"type":"binary-expr","locations":[{"start":{"line":209,"column":0},"end":{"line":209,"column":null}},{"start":{"line":209,"column":0},"end":{"line":209,"column":null}}]},"14":{"loc":{"start":{"line":214,"column":0},"end":{"line":219,"column":null}},"type":"if","locations":[{"start":{"line":214,"column":0},"end":{"line":219,"column":null}},{"start":{"line":214,"column":0},"end":{"line":219,"column":null}}]},"15":{"loc":{"start":{"line":226,"column":0},"end":{"line":238,"column":null}},"type":"if","locations":[{"start":{"line":226,"column":0},"end":{"line":238,"column":null}},{"start":{"line":226,"column":0},"end":{"line":238,"column":null}}]},"16":{"loc":{"start":{"line":226,"column":0},"end":{"line":226,"column":null}},"type":"binary-expr","locations":[{"start":{"line":226,"column":0},"end":{"line":226,"column":null}},{"start":{"line":226,"column":0},"end":{"line":226,"column":null}}]},"17":{"loc":{"start":{"line":227,"column":0},"end":{"line":227,"column":null}},"type":"binary-expr","locations":[{"start":{"line":227,"column":0},"end":{"line":227,"column":null}},{"start":{"line":227,"column":0},"end":{"line":227,"column":null}}]},"18":{"loc":{"start":{"line":232,"column":0},"end":{"line":237,"column":null}},"type":"if","locations":[{"start":{"line":232,"column":0},"end":{"line":237,"column":null}},{"start":{"line":232,"column":0},"end":{"line":237,"column":null}}]},"19":{"loc":{"start":{"line":245,"column":0},"end":{"line":247,"column":null}},"type":"if","locations":[{"start":{"line":245,"column":0},"end":{"line":247,"column":null}},{"start":{"line":245,"column":0},"end":{"line":247,"column":null}}]},"20":{"loc":{"start":{"line":267,"column":0},"end":{"line":269,"column":null}},"type":"if","locations":[{"start":{"line":267,"column":0},"end":{"line":269,"column":null}},{"start":{"line":267,"column":0},"end":{"line":269,"column":null}}]},"21":{"loc":{"start":{"line":274,"column":0},"end":{"line":274,"column":null}},"type":"if","locations":[{"start":{"line":274,"column":0},"end":{"line":274,"column":null}},{"start":{"line":274,"column":0},"end":{"line":274,"column":null}}]},"22":{"loc":{"start":{"line":302,"column":0},"end":{"line":304,"column":null}},"type":"if","locations":[{"start":{"line":302,"column":0},"end":{"line":304,"column":null}},{"start":{"line":302,"column":0},"end":{"line":304,"column":null}}]},"23":{"loc":{"start":{"line":315,"column":0},"end":{"line":319,"column":null}},"type":"if","locations":[{"start":{"line":315,"column":0},"end":{"line":319,"column":null}},{"start":{"line":315,"column":0},"end":{"line":319,"column":null}}]},"24":{"loc":{"start":{"line":326,"column":0},"end":{"line":328,"column":null}},"type":"if","locations":[{"start":{"line":326,"column":0},"end":{"line":328,"column":null}},{"start":{"line":326,"column":0},"end":{"line":328,"column":null}}]},"25":{"loc":{"start":{"line":346,"column":0},"end":{"line":353,"column":null}},"type":"if","locations":[{"start":{"line":346,"column":0},"end":{"line":353,"column":null}},{"start":{"line":346,"column":0},"end":{"line":353,"column":null}}]},"26":{"loc":{"start":{"line":349,"column":0},"end":{"line":349,"column":null}},"type":"binary-expr","locations":[{"start":{"line":349,"column":0},"end":{"line":349,"column":null}},{"start":{"line":349,"column":0},"end":{"line":349,"column":null}}]},"27":{"loc":{"start":{"line":356,"column":0},"end":{"line":356,"column":null}},"type":"cond-expr","locations":[{"start":{"line":356,"column":0},"end":{"line":356,"column":null}},{"start":{"line":356,"column":0},"end":{"line":356,"column":null}}]},"28":{"loc":{"start":{"line":367,"column":0},"end":{"line":371,"column":null}},"type":"if","locations":[{"start":{"line":367,"column":0},"end":{"line":371,"column":null}},{"start":{"line":367,"column":0},"end":{"line":371,"column":null}}]},"29":{"loc":{"start":{"line":369,"column":0},"end":{"line":371,"column":null}},"type":"if","locations":[{"start":{"line":369,"column":0},"end":{"line":371,"column":null}},{"start":{"line":369,"column":0},"end":{"line":371,"column":null}}]},"30":{"loc":{"start":{"line":372,"column":0},"end":{"line":372,"column":null}},"type":"cond-expr","locations":[{"start":{"line":372,"column":0},"end":{"line":372,"column":null}},{"start":{"line":372,"column":0},"end":{"line":372,"column":null}}]}},"s":{"0":1,"1":31,"2":3,"3":31,"4":31,"5":3,"6":31,"7":2,"8":29,"9":2,"10":27,"11":31,"12":3,"13":1,"14":1,"15":3,"16":3,"17":19,"18":19,"19":19,"20":19,"21":19,"22":1,"23":19,"24":8,"25":6,"26":6,"27":6,"28":6,"29":5,"30":5,"31":1,"32":4,"33":4,"34":4,"35":4,"36":4,"37":3,"38":3,"39":1,"40":1,"41":1,"42":1,"43":9,"44":9,"45":9,"46":9,"47":9,"48":9,"49":9,"50":9,"51":9,"52":9,"53":9,"54":9,"55":15,"56":4,"57":5,"58":1,"59":1,"60":1,"61":1,"62":3,"63":3,"64":3,"65":1,"66":2,"67":3,"68":6,"69":6,"70":3,"71":3,"72":0,"73":3,"74":3,"75":39,"76":9,"77":9,"78":10,"79":10,"80":1,"81":9,"82":31,"83":31,"84":31,"85":31,"86":1,"87":30,"88":1,"89":31,"90":27,"91":27,"92":27,"93":27},"f":{"0":31,"1":3,"2":31,"3":31,"4":1,"5":3,"6":19,"7":8,"8":4,"9":1,"10":1,"11":9,"12":9,"13":4,"14":5,"15":1,"16":1,"17":1,"18":3,"19":6,"20":3,"21":39,"22":9,"23":10,"24":31,"25":31,"26":31,"27":27},"b":{"0":[3,3],"1":[3,28],"2":[2,29],"3":[31,31],"4":[2,27],"5":[29,29],"6":[3,28],"7":[0,1],"8":[0,3],"9":[0,19],"10":[1,18],"11":[6,2],"12":[8,7],"13":[6,0],"14":[5,1],"15":[4,0],"16":[4,4],"17":[4,0],"18":[3,1],"19":[1,0],"20":[9,0],"21":[6,3],"22":[1,0],"23":[1,2],"24":[0,3],"25":[1,9],"26":[9,0],"27":[30,32],"28":[1,30],"29":[1,29],"30":[1,30]}} 2 | } 3 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 469 | 470 | 499 | 567 | -------------------------------------------------------------------------------- /dist/vue-numeric-input.umd.min.js: -------------------------------------------------------------------------------- 1 | (function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["vue-numeric-input"]=e():t["vue-numeric-input"]=e()})("undefined"!==typeof self?self:this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="fb15")}({"00ee":function(t,e,n){var r=n("b622"),i=r("toStringTag"),o={};o[i]="z",t.exports="[object z]"===String(o)},"06cf":function(t,e,n){var r=n("83ab"),i=n("d1e7"),o=n("5c6c"),u=n("fc6a"),a=n("a04b"),c=n("5135"),s=n("0cfb"),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(t,e){if(t=u(t),e=a(e),s)try{return f(t,e)}catch(n){}if(c(t,e))return o(!i.f.call(t,e),t[e])}},"0cfb":function(t,e,n){var r=n("83ab"),i=n("d039"),o=n("cc12");t.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},"0d51":function(t,e){t.exports=function(t){try{return String(t)}catch(e){return"Object"}}},"12b3":function(t,e,n){"use strict";n("4500")},1626:function(t,e){t.exports=function(t){return"function"===typeof t}},"1be4":function(t,e,n){var r=n("d066");t.exports=r("document","documentElement")},"1d80":function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},"23cb":function(t,e,n){var r=n("a691"),i=Math.max,o=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):o(n,e)}},"23e7":function(t,e,n){var r=n("da84"),i=n("06cf").f,o=n("9112"),u=n("6eeb"),a=n("ce4e"),c=n("e893"),s=n("94ca");t.exports=function(t,e){var n,f,l,p,d,b,h=t.target,m=t.global,v=t.stat;if(f=m?r:v?r[h]||a(h,{}):(r[h]||{}).prototype,f)for(l in e){if(d=e[l],t.noTargetGet?(b=i(f,l),p=b&&b.value):p=f[l],n=s(m?l:h+(v?".":"#")+l,t.forced),!n&&void 0!==p){if(typeof d===typeof p)continue;c(d,p)}(t.sham||p&&p.sham)&&o(d,"sham",!0),u(f,l,d,t)}}},"241c":function(t,e,n){var r=n("ca84"),i=n("7839"),o=i.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},"24fb":function(t,e,n){"use strict";function r(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"===typeof btoa){var o=i(r),u=r.sources.map((function(t){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(t," */")}));return[n].concat(u).concat([o]).join("\n")}return[n].join("\n")}function i(t){var e=btoa(unescape(encodeURIComponent(JSON.stringify(t)))),n="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(e);return"/*# ".concat(n," */")}t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=r(e,t);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,r){"string"===typeof t&&(t=[[null,t,""]]);var i={};if(r)for(var o=0;o=74)&&(r=u.match(/Chrome\/(\d+)/),r&&(i=r[1]))),t.exports=i&&+i},"342f":function(t,e,n){var r=n("d066");t.exports=r("navigator","userAgent")||""},"37e8":function(t,e,n){var r=n("83ab"),i=n("9bf2"),o=n("825a"),u=n("df75");t.exports=r?Object.defineProperties:function(t,e){o(t);var n,r=u(e),a=r.length,c=0;while(a>c)i.f(t,n=r[c++],e[n]);return t}},"3bbe":function(t,e,n){var r=n("1626");t.exports=function(t){if("object"===typeof t||r(t))return t;throw TypeError("Can't set "+String(t)+" as a prototype")}},"44ad":function(t,e,n){var r=n("d039"),i=n("c6b6"),o="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?o.call(t,""):Object(t)}:Object},"44d2":function(t,e,n){var r=n("b622"),i=n("7c73"),o=n("9bf2"),u=r("unscopables"),a=Array.prototype;void 0==a[u]&&o.f(a,u,{configurable:!0,value:i(null)}),t.exports=function(t){a[u][t]=!0}},4500:function(t,e,n){var r=n("b0bb");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var i=n("499e").default;i("d740a91a",r,!0,{sourceMap:!1,shadowMode:!1})},"485a":function(t,e,n){var r=n("1626"),i=n("861d");t.exports=function(t,e){var n,o;if("string"===e&&r(n=t.toString)&&!i(o=n.call(t)))return o;if(r(n=t.valueOf)&&!i(o=n.call(t)))return o;if("string"!==e&&r(n=t.toString)&&!i(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},4930:function(t,e,n){var r=n("2d00"),i=n("d039");t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},"499e":function(t,e,n){"use strict";function r(t,e){for(var n=[],r={},i=0;in.parts.length&&(r.parts.length=n.parts.length)}else{var u=[];for(i=0;if)if(a=c[f++],a!=a)return!0}else for(;s>f;f++)if((t||f in c)&&c[f]===n)return t||f||0;return!t&&-1}};t.exports={includes:u(!0),indexOf:u(!1)}},"50c4":function(t,e,n){var r=n("a691"),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},5135:function(t,e,n){var r=n("7b0b"),i={}.hasOwnProperty;t.exports=Object.hasOwn||function(t,e){return i.call(r(t),e)}},5692:function(t,e,n){var r=n("c430"),i=n("c6cd");(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.18.1",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},"56ef":function(t,e,n){var r=n("d066"),i=n("241c"),o=n("7418"),u=n("825a");t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(u(t)),n=o.f;return n?e.concat(n(t)):e}},"577e":function(t,e,n){var r=n("f5df");t.exports=function(t){if("Symbol"===r(t))throw TypeError("Cannot convert a Symbol value to a string");return String(t)}},5899:function(t,e){t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},"58a8":function(t,e,n){var r=n("1d80"),i=n("577e"),o=n("5899"),u="["+o+"]",a=RegExp("^"+u+u+"*"),c=RegExp(u+u+"*$"),s=function(t){return function(e){var n=i(r(e));return 1&t&&(n=n.replace(a,"")),2&t&&(n=n.replace(c,"")),n}};t.exports={start:s(1),end:s(2),trim:s(3)}},"59ed":function(t,e,n){var r=n("1626"),i=n("0d51");t.exports=function(t){if(r(t))return t;throw TypeError(i(t)+" is not a function")}},"5c6c":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"5e77":function(t,e,n){var r=n("83ab"),i=n("5135"),o=Function.prototype,u=r&&Object.getOwnPropertyDescriptor,a=i(o,"name"),c=a&&"something"===function(){}.name,s=a&&(!r||r&&u(o,"name").configurable);t.exports={EXISTS:a,PROPER:c,CONFIGURABLE:s}},"5e89":function(t,e,n){var r=n("861d"),i=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&i(t)===t}},"69f3":function(t,e,n){var r,i,o,u=n("7f9a"),a=n("da84"),c=n("861d"),s=n("9112"),f=n("5135"),l=n("c6cd"),p=n("f772"),d=n("d012"),b="Object already initialized",h=a.WeakMap,m=function(t){return o(t)?i(t):r(t,{})},v=function(t){return function(e){var n;if(!c(e)||(n=i(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}};if(u||l.state){var g=l.state||(l.state=new h),y=g.get,x=g.has,w=g.set;r=function(t,e){if(x.call(g,t))throw new TypeError(b);return e.facade=t,w.call(g,t,e),e},i=function(t){return y.call(g,t)||{}},o=function(t){return x.call(g,t)}}else{var S=p("state");d[S]=!0,r=function(t,e){if(f(t,S))throw new TypeError(b);return e.facade=t,s(t,S,e),e},i=function(t){return f(t,S)?t[S]:{}},o=function(t){return f(t,S)}}t.exports={set:r,get:i,has:o,enforce:m,getterFor:v}},"6eeb":function(t,e,n){var r=n("da84"),i=n("1626"),o=n("5135"),u=n("9112"),a=n("ce4e"),c=n("8925"),s=n("69f3"),f=n("5e77").CONFIGURABLE,l=s.get,p=s.enforce,d=String(String).split("String");(t.exports=function(t,e,n,c){var s,l=!!c&&!!c.unsafe,b=!!c&&!!c.enumerable,h=!!c&&!!c.noTargetGet,m=c&&void 0!==c.name?c.name:e;i(n)&&("Symbol("===String(m).slice(0,7)&&(m="["+String(m).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!o(n,"name")||f&&n.name!==m)&&u(n,"name",m),s=p(n),s.source||(s.source=d.join("string"==typeof m?m:""))),t!==r?(l?!h&&t[e]&&(b=!0):delete t[e],b?t[e]=n:u(t,e,n)):b?t[e]=n:a(e,n)})(Function.prototype,"toString",(function(){return i(this)&&l(this).source||c(this)}))},7156:function(t,e,n){var r=n("1626"),i=n("861d"),o=n("d2bb");t.exports=function(t,e,n){var u,a;return o&&r(u=e.constructor)&&u!==n&&i(a=u.prototype)&&a!==n.prototype&&o(t,a),t}},7418:function(t,e){e.f=Object.getOwnPropertySymbols},7839:function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(t,e,n){var r=n("1d80");t.exports=function(t){return Object(r(t))}},"7c73":function(t,e,n){var r,i=n("825a"),o=n("37e8"),u=n("7839"),a=n("d012"),c=n("1be4"),s=n("cc12"),f=n("f772"),l=">",p="<",d="prototype",b="script",h=f("IE_PROTO"),m=function(){},v=function(t){return p+b+l+t+p+"/"+b+l},g=function(t){t.write(v("")),t.close();var e=t.parentWindow.Object;return t=null,e},y=function(){var t,e=s("iframe"),n="java"+b+":";return e.style.display="none",c.appendChild(e),e.src=String(n),t=e.contentWindow.document,t.open(),t.write(v("document.F=Object")),t.close(),t.F},x=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}x="undefined"!=typeof document?document.domain&&r?g(r):y():g(r);var t=u.length;while(t--)delete x[d][u[t]];return x()};a[h]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(m[d]=i(t),n=new m,m[d]=null,n[h]=t):n=x(),void 0===e?n:o(n,e)}},"7f9a":function(t,e,n){var r=n("da84"),i=n("1626"),o=n("8925"),u=r.WeakMap;t.exports=i(u)&&/native code/.test(o(u))},"825a":function(t,e,n){var r=n("861d");t.exports=function(t){if(r(t))return t;throw TypeError(String(t)+" is not an object")}},"83ab":function(t,e,n){var r=n("d039");t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},"861d":function(t,e,n){var r=n("1626");t.exports=function(t){return"object"===typeof t?null!==t:r(t)}},8875:function(t,e,n){var r,i,o;(function(n,u){i=[],r=u,o="function"===typeof r?r.apply(e,i):r,void 0===o||(t.exports=o)})("undefined"!==typeof self&&self,(function(){function t(){var e=Object.getOwnPropertyDescriptor(document,"currentScript");if(!e&&"currentScript"in document&&document.currentScript)return document.currentScript;if(e&&e.get!==t&&document.currentScript)return document.currentScript;try{throw new Error}catch(d){var n,r,i,o=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,u=/@([^@]*):(\d+):(\d+)\s*$/gi,a=o.exec(d.stack)||u.exec(d.stack),c=a&&a[1]||!1,s=a&&a[2]||!1,f=document.location.href.replace(document.location.hash,""),l=document.getElementsByTagName("script");c===f&&(n=document.documentElement.outerHTML,r=new RegExp("(?:[^\\n]+?\\n){0,"+(s-2)+"}[^<]*