├── .babelrc ├── .circleci └── config.yml ├── .editorconfig ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── .postcssrc.js ├── LICENSE ├── README.md ├── build ├── build-lib.js ├── build.js ├── check-versions.js ├── dev-client.js ├── dev-server.js ├── utils.js ├── vue-loader.conf.js ├── webpack.base.conf.js ├── webpack.dev.conf.js ├── webpack.lib.conf.js ├── webpack.prod.conf.js └── webpack.test.conf.js ├── config ├── dev.env.js ├── index.js ├── prod.env.js └── test.env.js ├── dist ├── docs │ ├── css │ │ ├── docs.06a6ff44c7113bb1e575ac527728ff4e.css │ │ ├── docs.06a6ff44c7113bb1e575ac527728ff4e.css.map │ │ ├── vue-monthly-picker.ed5188bba752cc6b43447265b57c525f.css │ │ └── vue-monthly-picker.ed5188bba752cc6b43447265b57c525f.css.map │ └── js │ │ ├── docs.d3e7853f615e0fe9389f.js │ │ ├── docs.d3e7853f615e0fe9389f.js.map │ │ ├── manifest.fc19899dc75921758888.js │ │ ├── manifest.fc19899dc75921758888.js.map │ │ ├── vendor.e3858ebe321f0f5cebfb.js │ │ ├── vendor.e3858ebe321f0f5cebfb.js.map │ │ ├── vue-monthly-picker.45a8717d3bb00baff749.js │ │ └── vue-monthly-picker.45a8717d3bb00baff749.js.map └── lib │ ├── vue-monthly-picker.min.js │ └── vue-monthly-picker.min.js.map ├── index-template.html ├── index.html ├── package-lock.json ├── package.json ├── src ├── app.vue ├── assets │ └── logo.png ├── common │ └── ForkGithub.vue ├── components │ └── VueMonthlyPicker.vue ├── docs.js ├── lib.js ├── router │ └── index.js └── styles │ ├── app.scss │ ├── lib.scss │ └── lib.styl ├── static └── .gitkeep └── test └── unit ├── .eslintrc ├── index.js ├── karma.conf.js └── specs └── VueMonthlyPicker.spec.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false, 5 | "targets": { 6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 7 | } 8 | }], 9 | "stage-2" 10 | ], 11 | "plugins": ["transform-runtime"], 12 | "env": { 13 | "test": { 14 | "presets": ["env", "stage-2"], 15 | "plugins": ["istanbul"] 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | # Javascript Node CircleCI 2.0 configuration file 2 | # 3 | # Check https://circleci.com/docs/2.0/language-javascript/ for more details 4 | # 5 | version: 2 6 | jobs: 7 | build: 8 | docker: 9 | - image: circleci/node:12.16.1 10 | working_directory: ~/repo 11 | 12 | steps: 13 | - checkout 14 | 15 | # Download and cache dependencies 16 | - restore_cache: 17 | keys: 18 | - v1-dependencies-{{ checksum "package.json" }} 19 | # fallback to using the latest cache if no exact match is found 20 | - v1-dependencies- 21 | 22 | - run: npm install 23 | 24 | - save_cache: 25 | paths: 26 | - node_modules 27 | key: v1-dependencies-{{ checksum "package.json" }} 28 | # run lint! 29 | - run: npm run lint 30 | # run tests! 31 | - run: npm run test 32 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | build/*.js 2 | config/*.js 3 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | // http://eslint.org/docs/user-guide/configuring 2 | 3 | module.exports = { 4 | root: true, 5 | parserOptions: { 6 | parser: 'babel-eslint', 7 | sourceType: 'module' 8 | }, 9 | env: { 10 | browser: true, 11 | }, 12 | // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style 13 | extends: [ 14 | 'standard', 15 | 'plugin:vue/recommended' 16 | ], 17 | // required to lint *.vue files 18 | plugins: [ 19 | 'html' 20 | ], 21 | 'settings': { 22 | 'html/html-extensions': ['.html'], // don't include .vue 23 | }, 24 | // add your custom rules here 25 | 'rules': { 26 | // allow paren-less arrow functions 27 | 'arrow-parens': 0, 28 | // allow async-await 29 | 'generator-star-spacing': 0, 30 | // allow debugger during development 31 | 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | npm-debug.log* 4 | yarn-debug.log* 5 | yarn-error.log* 6 | test/unit/coverage 7 | test/e2e/reports 8 | selenium-debug.log 9 | 10 | # Editor directories and files 11 | .idea 12 | *.suo 13 | *.ntvs* 14 | *.njsproj 15 | *.sln 16 | -------------------------------------------------------------------------------- /.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | // to edit target browsers: use "browserslist" field in package.json 6 | "autoprefixer": {} 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Thang Minh Vu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vue-monthly-picker 2 | 3 | > Vue Monthly Picker Components 4 | 5 | [![npm version](https://badge.fury.io/js/vue-monthly-picker.svg)](https://badge.fury.io/js/vue-monthly-picker) 6 | [![CircleCI](https://circleci.com/gh/ittus/vue-monthly-picker.svg?style=shield&circle-token=fa41e296ca28a346dfcea28addb1d5f671f187a8)](https://circleci.com/gh/ittus/vue-monthly-picker) 7 | 8 | Checkout demo at https://ittus.github.io/vue-monthly-picker/ 9 | 10 | # Support 11 | Buy Me A Coffee 12 | 13 | # Install 14 | ``` 15 | npm install vue-monthly-picker --save 16 | ``` 17 | ```javascript 18 | import VueMonthlyPicker from 'vue-monthly-picker' 19 | Vue.component('my-component', { 20 | components: { 21 | VueMonthlyPicker 22 | } 23 | }); 24 | ``` 25 | # Usage 26 | 27 | ```html 28 | 30 | 31 | ``` 32 | 33 | **Note**: `v-model` binding value need to be a **moment** object 34 | ## Available props 35 | 36 | 37 | | Prop | Type | Default | Description | 38 | |-----------------------|-----------------|-------------|------------------------------------------| 39 | | disabled | Boolean | `false` | Enable/disable component | 40 | | monthLabels | Array | `['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12']` | Customize month labels | 41 | | placeHolder | String | '' | Place holder when value is null | 42 | | min | moment | `null` | Minimum time to select | 43 | | max | moment | `null` | Maximum time to select | 44 | | dateFormat | String | `YYYY/MM` | Display format. | 45 | | value | moment | `null` | Moment value of selected month and year | 46 | | alignment | String | `left` | Alignment of input value, possible value: `left`, `right`, `center` | 47 | | selectedBackgroundColor | String | `#007bff` | Background color of selected value. It can be HTML color name (red, green, blue) or hexa color code (`#00FF00`, `#0000FF`) | 48 | | clearOption | Boolean | true | Show/Hide clear option | 49 | | inputClass | String | `input` | Customize css class for visible element | 50 | 51 | 52 | ## Events 53 | 54 | | Event | Params | Description | 55 | |-------|--------|-------------| 56 | |selected| selected month in `moment`| A month has been selected | 57 | 58 | ## Build Setup 59 | 60 | ``` bash 61 | # install dependencies 62 | npm install 63 | 64 | # serve with hot reload at localhost:8080 65 | npm run dev 66 | 67 | # build for production with minification 68 | npm run build 69 | 70 | # run all tests 71 | npm run test 72 | ``` 73 | -------------------------------------------------------------------------------- /build/build-lib.js: -------------------------------------------------------------------------------- 1 | require('./check-versions')() 2 | 3 | process.env.NODE_ENV = 'production' 4 | process.env.IS_LIB = 'true' 5 | 6 | var ora = require('ora') 7 | var rm = require('rimraf') 8 | var path = require('path') 9 | var chalk = require('chalk') 10 | var webpack = require('webpack') 11 | var config = require('../config') 12 | var webpackConfig = require('./webpack.lib.conf') 13 | 14 | var spinner = ora('building for library...') 15 | spinner.start() 16 | 17 | rm(path.join(config.lib.assetsRoot, config.lib.assetsSubDirectory), err => { 18 | if (err) throw err 19 | webpack(webpackConfig, function (err, stats) { 20 | spinner.stop() 21 | if (err) throw err 22 | process.stdout.write(stats.toString({ 23 | colors: true, 24 | modules: false, 25 | children: false, 26 | chunks: false, 27 | chunkModules: false 28 | }) + '\n\n') 29 | 30 | console.log(chalk.cyan(' Build complete.\n')) 31 | console.log(chalk.yellow( 32 | ' Tip: Now you are ready to publish your library to npm.\n' + 33 | ' Then users can import it as an es6 module: import vue-monthly-picker from \'vue-monthly-picker\'\n' 34 | )) 35 | }) 36 | }) 37 | -------------------------------------------------------------------------------- /build/build.js: -------------------------------------------------------------------------------- 1 | require('./check-versions')() 2 | 3 | process.env.NODE_ENV = 'production' 4 | 5 | var ora = require('ora') 6 | var rm = require('rimraf') 7 | var path = require('path') 8 | var chalk = require('chalk') 9 | var webpack = require('webpack') 10 | var config = require('../config') 11 | var webpackConfig = require('./webpack.prod.conf') 12 | 13 | var spinner = ora('building for production...') 14 | spinner.start() 15 | 16 | rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => { 17 | if (err) throw err 18 | webpack(webpackConfig, function (err, stats) { 19 | spinner.stop() 20 | if (err) throw err 21 | process.stdout.write(stats.toString({ 22 | colors: true, 23 | modules: false, 24 | children: false, 25 | chunks: false, 26 | chunkModules: false 27 | }) + '\n\n') 28 | 29 | console.log(chalk.cyan(' Build complete.\n')) 30 | console.log(chalk.yellow( 31 | ' Tip: built files are meant to be served over an HTTP server.\n' + 32 | ' Opening index.html over file:// won\'t work.\n' 33 | )) 34 | }) 35 | }) 36 | -------------------------------------------------------------------------------- /build/check-versions.js: -------------------------------------------------------------------------------- 1 | var chalk = require('chalk') 2 | var semver = require('semver') 3 | var packageConfig = require('../package.json') 4 | var shell = require('shelljs') 5 | function exec (cmd) { 6 | return require('child_process').execSync(cmd).toString().trim() 7 | } 8 | 9 | var versionRequirements = [ 10 | { 11 | name: 'node', 12 | currentVersion: semver.clean(process.version), 13 | versionRequirement: packageConfig.engines.node 14 | }, 15 | ] 16 | 17 | if (shell.which('npm')) { 18 | versionRequirements.push({ 19 | name: 'npm', 20 | currentVersion: exec('npm --version'), 21 | versionRequirement: packageConfig.engines.npm 22 | }) 23 | } 24 | 25 | module.exports = function () { 26 | var warnings = [] 27 | for (var i = 0; i < versionRequirements.length; i++) { 28 | var mod = versionRequirements[i] 29 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) { 30 | warnings.push(mod.name + ': ' + 31 | chalk.red(mod.currentVersion) + ' should be ' + 32 | chalk.green(mod.versionRequirement) 33 | ) 34 | } 35 | } 36 | 37 | if (warnings.length) { 38 | console.log('') 39 | console.log(chalk.yellow('To use this template, you must update following to modules:')) 40 | console.log() 41 | for (var i = 0; i < warnings.length; i++) { 42 | var warning = warnings[i] 43 | console.log(' ' + warning) 44 | } 45 | console.log() 46 | process.exit(1) 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /build/dev-client.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | require('eventsource-polyfill') 3 | var hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true') 4 | 5 | hotClient.subscribe(function (event) { 6 | if (event.action === 'reload') { 7 | window.location.reload() 8 | } 9 | }) 10 | -------------------------------------------------------------------------------- /build/dev-server.js: -------------------------------------------------------------------------------- 1 | require('./check-versions')() 2 | 3 | var config = require('../config') 4 | if (!process.env.NODE_ENV) { 5 | process.env.NODE_ENV = JSON.parse(config.dev.env.NODE_ENV) 6 | } 7 | 8 | var opn = require('opn') 9 | var path = require('path') 10 | var express = require('express') 11 | var webpack = require('webpack') 12 | var proxyMiddleware = require('http-proxy-middleware') 13 | var webpackConfig = process.env.NODE_ENV === 'testing' 14 | ? require('./webpack.prod.conf') 15 | : require('./webpack.dev.conf') 16 | 17 | // default port where dev server listens for incoming traffic 18 | var port = process.env.PORT || config.dev.port 19 | // automatically open browser, if not set will be false 20 | var autoOpenBrowser = !!config.dev.autoOpenBrowser 21 | // Define HTTP proxies to your custom API backend 22 | // https://github.com/chimurai/http-proxy-middleware 23 | var proxyTable = config.dev.proxyTable 24 | 25 | var app = express() 26 | var compiler = webpack(webpackConfig) 27 | 28 | var devMiddleware = require('webpack-dev-middleware')(compiler, { 29 | publicPath: webpackConfig.output.publicPath, 30 | quiet: true 31 | }) 32 | 33 | var hotMiddleware = require('webpack-hot-middleware')(compiler, { 34 | log: () => {}, 35 | heartbeat: 2000 36 | }) 37 | // force page reload when html-webpack-plugin template changes 38 | compiler.plugin('compilation', function (compilation) { 39 | compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) { 40 | hotMiddleware.publish({ action: 'reload' }) 41 | cb() 42 | }) 43 | }) 44 | 45 | // proxy api requests 46 | Object.keys(proxyTable).forEach(function (context) { 47 | var options = proxyTable[context] 48 | if (typeof options === 'string') { 49 | options = { target: options } 50 | } 51 | app.use(proxyMiddleware(options.filter || context, options)) 52 | }) 53 | 54 | // handle fallback for HTML5 history API 55 | app.use(require('connect-history-api-fallback')()) 56 | 57 | // serve webpack bundle output 58 | app.use(devMiddleware) 59 | 60 | // enable hot-reload and state-preserving 61 | // compilation error display 62 | app.use(hotMiddleware) 63 | 64 | // serve pure static assets 65 | var staticPath = path.posix.join(config.dev.assetsPublicPath, config.dev.assetsSubDirectory) 66 | app.use(staticPath, express.static('./static')) 67 | 68 | var uri = 'http://localhost:' + port 69 | 70 | var _resolve 71 | var readyPromise = new Promise(resolve => { 72 | _resolve = resolve 73 | }) 74 | 75 | console.log('> Starting dev server...') 76 | devMiddleware.waitUntilValid(() => { 77 | console.log('> Listening at ' + uri + '\n') 78 | // when env is testing, don't need open it 79 | if (autoOpenBrowser && process.env.NODE_ENV !== 'testing') { 80 | opn(uri) 81 | } 82 | _resolve() 83 | }) 84 | 85 | var server = app.listen(port) 86 | 87 | module.exports = { 88 | ready: readyPromise, 89 | close: () => { 90 | server.close() 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /build/utils.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var config = require('../config') 3 | var ExtractTextPlugin = require('extract-text-webpack-plugin') 4 | 5 | exports.assetsPath = function (_path) { 6 | var assetsSubDirectory = process.env.NODE_ENV === 'production' 7 | ? config.build.assetsSubDirectory 8 | : config.dev.assetsSubDirectory 9 | return path.posix.join(assetsSubDirectory, _path) 10 | } 11 | 12 | exports.assetsLibPath = function (_path) { 13 | return path.posix.join(config.lib.assetsSubDirectory, _path) 14 | } 15 | 16 | exports.cssLoaders = function (options) { 17 | options = options || {} 18 | 19 | var cssLoader = { 20 | loader: 'css-loader', 21 | options: { 22 | minimize: process.env.NODE_ENV === 'production', 23 | sourceMap: options.sourceMap 24 | } 25 | } 26 | 27 | // generate loader string to be used with extract text plugin 28 | function generateLoaders (loader, loaderOptions) { 29 | var loaders = [cssLoader] 30 | if (loader) { 31 | loaders.push({ 32 | loader: loader + '-loader', 33 | options: Object.assign({}, loaderOptions, { 34 | sourceMap: options.sourceMap 35 | }) 36 | }) 37 | } 38 | 39 | // Extract CSS when that option is specified 40 | // (which is the case during production build) 41 | if (options.extract) { 42 | return ExtractTextPlugin.extract({ 43 | use: loaders, 44 | fallback: 'vue-style-loader' 45 | }) 46 | } else { 47 | return ['vue-style-loader'].concat(loaders) 48 | } 49 | } 50 | 51 | // https://vue-loader.vuejs.org/en/configurations/extract-css.html 52 | return { 53 | css: generateLoaders(), 54 | postcss: generateLoaders(), 55 | less: generateLoaders('less'), 56 | sass: generateLoaders('sass', { indentedSyntax: true }), 57 | scss: generateLoaders('sass'), 58 | stylus: generateLoaders('stylus'), 59 | styl: generateLoaders('stylus') 60 | } 61 | } 62 | 63 | // Generate loaders for standalone style files (outside of .vue) 64 | exports.styleLoaders = function (options) { 65 | var output = [] 66 | var loaders = exports.cssLoaders(options) 67 | for (var extension in loaders) { 68 | var loader = loaders[extension] 69 | output.push({ 70 | test: new RegExp('\\.' + extension + '$'), 71 | use: loader 72 | }) 73 | } 74 | return output 75 | } 76 | -------------------------------------------------------------------------------- /build/vue-loader.conf.js: -------------------------------------------------------------------------------- 1 | var utils = require('./utils') 2 | var config = require('../config') 3 | var isProduction = process.env.NODE_ENV === 'production' 4 | var isLibrary = process.env.IS_LIB === 'true' 5 | 6 | module.exports = { 7 | loaders: utils.cssLoaders({ 8 | sourceMap: isProduction 9 | ? config.build.productionSourceMap 10 | : config.dev.cssSourceMap, 11 | extract: isProduction && (!isLibrary) 12 | }), 13 | transformToRequire: { 14 | video: 'src', 15 | source: 'src', 16 | img: 'src', 17 | image: 'xlink:href' 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /build/webpack.base.conf.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var utils = require('./utils') 3 | var config = require('../config') 4 | var vueLoaderConfig = require('./vue-loader.conf') 5 | 6 | function resolve (dir) { 7 | return path.join(__dirname, '..', dir) 8 | } 9 | 10 | module.exports = { 11 | entry: { 12 | docs: './src/docs.js', 13 | ['vue-monthly-picker']: './src/lib.js' 14 | }, 15 | output: { 16 | path: config.build.assetsRoot, 17 | filename: '[name].js', 18 | publicPath: process.env.NODE_ENV === 'production' 19 | ? config.build.assetsPublicPath 20 | : config.dev.assetsPublicPath 21 | }, 22 | resolve: { 23 | extensions: ['.js', '.vue', '.json'], 24 | alias: { 25 | '@': resolve('src') 26 | } 27 | }, 28 | module: { 29 | rules: [ 30 | { 31 | test: /\.(js|vue)$/, 32 | loader: 'eslint-loader', 33 | enforce: 'pre', 34 | include: [resolve('src'), resolve('test')], 35 | options: { 36 | formatter: require('eslint-friendly-formatter') 37 | } 38 | }, 39 | { 40 | test: /\.vue$/, 41 | loader: 'vue-loader', 42 | options: vueLoaderConfig 43 | }, 44 | { 45 | test: /\.js$/, 46 | loader: 'babel-loader', 47 | include: [resolve('src'), resolve('test')] 48 | }, 49 | { 50 | test: /\.(png|jpe?g|gif|svg)(\?.*)?$/, 51 | loader: 'url-loader', 52 | options: { 53 | limit: 10000, 54 | name: utils.assetsPath('img/[name].[hash:7].[ext]') 55 | } 56 | }, 57 | { 58 | test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/, 59 | loader: 'url-loader', 60 | options: { 61 | limit: 10000, 62 | name: utils.assetsPath('media/[name].[hash:7].[ext]') 63 | } 64 | }, 65 | { 66 | test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/, 67 | loader: 'url-loader', 68 | options: { 69 | limit: 10000, 70 | name: utils.assetsPath('fonts/[name].[hash:7].[ext]') 71 | } 72 | } 73 | ] 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /build/webpack.dev.conf.js: -------------------------------------------------------------------------------- 1 | var utils = require('./utils') 2 | var webpack = require('webpack') 3 | var config = require('../config') 4 | var merge = require('webpack-merge') 5 | var baseWebpackConfig = require('./webpack.base.conf') 6 | var HtmlWebpackPlugin = require('html-webpack-plugin') 7 | var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin') 8 | 9 | // add hot-reload related code to entry chunks 10 | Object.keys(baseWebpackConfig.entry).forEach(function (name) { 11 | baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name]) 12 | }) 13 | 14 | module.exports = merge(baseWebpackConfig, { 15 | module: { 16 | rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap }) 17 | }, 18 | // cheap-module-eval-source-map is faster for development 19 | devtool: '#cheap-module-eval-source-map', 20 | plugins: [ 21 | new webpack.DefinePlugin({ 22 | 'process.env': config.dev.env 23 | }), 24 | // https://github.com/glenjamin/webpack-hot-middleware#installation--usage 25 | new webpack.HotModuleReplacementPlugin(), 26 | new webpack.NoEmitOnErrorsPlugin(), 27 | // https://github.com/ampedandwired/html-webpack-plugin 28 | new HtmlWebpackPlugin({ 29 | filename: 'index.html', 30 | template: 'index-template.html', 31 | inject: true 32 | }), 33 | new FriendlyErrorsPlugin() 34 | ] 35 | }) 36 | -------------------------------------------------------------------------------- /build/webpack.lib.conf.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var utils = require('./utils') 3 | var webpack = require('webpack') 4 | var config = require('../config') 5 | var merge = require('webpack-merge') 6 | var baseWebpackConfig = require('./webpack.base.conf') 7 | var OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') 8 | var PeerDepsExternalsPlugin = require('peer-deps-externals-webpack-plugin'); 9 | 10 | var env = process.env.NODE_ENV === 'testing' 11 | ? require('../config/test.env') 12 | : config.lib.env 13 | 14 | baseWebpackConfig.entry = { 15 | 'vue-monthly-picker': './src/lib.js' 16 | } 17 | 18 | var webpackConfig = merge(baseWebpackConfig, { 19 | module: { 20 | rules: utils.styleLoaders({ 21 | sourceMap: config.lib.productionSourceMap 22 | }) 23 | }, 24 | devtool: config.lib.productionSourceMap ? '#source-map' : false, 25 | output: { 26 | path: config.lib.assetsRoot, 27 | filename: utils.assetsLibPath('[name].min.js'), 28 | library: '[name]', 29 | libraryTarget: 'umd' 30 | }, 31 | plugins: [ 32 | // http://vuejs.github.io/vue-loader/en/workflow/production.html 33 | new PeerDepsExternalsPlugin(), 34 | new webpack.DefinePlugin({ 35 | 'process.env': env 36 | }), 37 | new webpack.optimize.UglifyJsPlugin({ 38 | compress: { 39 | warnings: false 40 | }, 41 | sourceMap: true 42 | }) 43 | ] 44 | }) 45 | 46 | if (config.lib.productionGzip) { 47 | var CompressionWebpackPlugin = require('compression-webpack-plugin') 48 | 49 | webpackConfig.plugins.push( 50 | new CompressionWebpackPlugin({ 51 | asset: '[path].gz[query]', 52 | algorithm: 'gzip', 53 | test: new RegExp( 54 | '\\.(' + 55 | config.lib.productionGzipExtensions.join('|') + 56 | ')$' 57 | ), 58 | threshold: 10240, 59 | minRatio: 0.8 60 | }) 61 | ) 62 | } 63 | 64 | if (config.lib.bundleAnalyzerReport) { 65 | var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin 66 | webpackConfig.plugins.push(new BundleAnalyzerPlugin()) 67 | } 68 | 69 | module.exports = webpackConfig 70 | -------------------------------------------------------------------------------- /build/webpack.prod.conf.js: -------------------------------------------------------------------------------- 1 | var path = require('path') 2 | var utils = require('./utils') 3 | var webpack = require('webpack') 4 | var config = require('../config') 5 | var merge = require('webpack-merge') 6 | var baseWebpackConfig = require('./webpack.base.conf') 7 | var CopyWebpackPlugin = require('copy-webpack-plugin') 8 | var HtmlWebpackPlugin = require('html-webpack-plugin') 9 | var ExtractTextPlugin = require('extract-text-webpack-plugin') 10 | var OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin') 11 | 12 | var env = process.env.NODE_ENV === 'testing' 13 | ? require('../config/test.env') 14 | : config.build.env 15 | 16 | var webpackConfig = merge(baseWebpackConfig, { 17 | module: { 18 | rules: utils.styleLoaders({ 19 | sourceMap: config.build.productionSourceMap, 20 | extract: true 21 | }) 22 | }, 23 | devtool: config.build.productionSourceMap ? '#source-map' : false, 24 | output: { 25 | path: config.build.assetsRoot, 26 | filename: utils.assetsPath('js/[name].[chunkhash].js'), 27 | chunkFilename: utils.assetsPath('js/[id].[chunkhash].js') 28 | }, 29 | plugins: [ 30 | new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), 31 | // http://vuejs.github.io/vue-loader/en/workflow/production.html 32 | new webpack.DefinePlugin({ 33 | 'process.env': env 34 | }), 35 | new webpack.optimize.UglifyJsPlugin({ 36 | compress: { 37 | warnings: false 38 | }, 39 | sourceMap: true 40 | }), 41 | // extract css into its own file 42 | new ExtractTextPlugin({ 43 | filename: utils.assetsPath('css/[name].[contenthash].css') 44 | }), 45 | // Compress extracted CSS. We are using this plugin so that possible 46 | // duplicated CSS from different components can be deduped. 47 | new OptimizeCSSPlugin({ 48 | cssProcessorOptions: { 49 | safe: true 50 | } 51 | }), 52 | // generate dist index.html with correct asset hash for caching. 53 | // you can customize output by editing /index.html 54 | // see https://github.com/ampedandwired/html-webpack-plugin 55 | new HtmlWebpackPlugin({ 56 | filename: process.env.NODE_ENV === 'testing' 57 | ? 'index.html' 58 | : config.build.index, 59 | template: 'index-template.html', 60 | inject: true, 61 | minify: { 62 | removeComments: true, 63 | collapseWhitespace: true, 64 | removeAttributeQuotes: true 65 | // more options: 66 | // https://github.com/kangax/html-minifier#options-quick-reference 67 | }, 68 | // necessary to consistently work with multiple chunks via CommonsChunkPlugin 69 | chunksSortMode: 'dependency' 70 | }), 71 | // split your library css/js into separate files 72 | new webpack.optimize.CommonsChunkPlugin({ 73 | name: 'vue-monthly-picker' 74 | }), 75 | // split vendor js into its own file 76 | new webpack.optimize.CommonsChunkPlugin({ 77 | name: 'vendor', 78 | minChunks: function (module, count) { 79 | // any required modules inside node_modules are extracted to vendor 80 | return ( 81 | module.resource && 82 | /\.js$/.test(module.resource) && 83 | module.resource.indexOf( 84 | path.join(__dirname, '../node_modules') 85 | ) === 0 86 | ) 87 | } 88 | }), 89 | // extract webpack runtime and module manifest to its own file in order to 90 | // prevent vendor hash from being updated whenever app bundle is updated 91 | new webpack.optimize.CommonsChunkPlugin({ 92 | name: 'manifest', 93 | chunks: ['vendor'] 94 | }), 95 | // copy custom static assets 96 | new CopyWebpackPlugin([ 97 | { 98 | from: path.resolve(__dirname, '../static'), 99 | to: config.build.assetsSubDirectory, 100 | ignore: ['.*'] 101 | } 102 | ]) 103 | ] 104 | }) 105 | 106 | if (config.build.productionGzip) { 107 | var CompressionWebpackPlugin = require('compression-webpack-plugin') 108 | 109 | webpackConfig.plugins.push( 110 | new CompressionWebpackPlugin({ 111 | asset: '[path].gz[query]', 112 | algorithm: 'gzip', 113 | test: new RegExp( 114 | '\\.(' + 115 | config.build.productionGzipExtensions.join('|') + 116 | ')$' 117 | ), 118 | threshold: 10240, 119 | minRatio: 0.8 120 | }) 121 | ) 122 | } 123 | 124 | if (config.build.bundleAnalyzerReport) { 125 | var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin 126 | webpackConfig.plugins.push(new BundleAnalyzerPlugin()) 127 | } 128 | 129 | module.exports = webpackConfig 130 | -------------------------------------------------------------------------------- /build/webpack.test.conf.js: -------------------------------------------------------------------------------- 1 | // This is the webpack config used for unit tests. 2 | 3 | var utils = require('./utils') 4 | var webpack = require('webpack') 5 | var merge = require('webpack-merge') 6 | var baseConfig = require('./webpack.base.conf') 7 | 8 | var webpackConfig = merge(baseConfig, { 9 | // use inline sourcemap for karma-sourcemap-loader 10 | module: { 11 | rules: utils.styleLoaders() 12 | }, 13 | devtool: '#inline-source-map', 14 | resolveLoader: { 15 | alias: { 16 | // necessary to to make lang="scss" work in test when using vue-loader's ?inject option 17 | // see discussion at https://github.com/vuejs/vue-loader/issues/724 18 | 'scss-loader': 'sass-loader' 19 | } 20 | }, 21 | plugins: [ 22 | new webpack.DefinePlugin({ 23 | 'process.env': require('../config/test.env') 24 | }) 25 | ] 26 | }) 27 | 28 | // no need for app entry during tests 29 | delete webpackConfig.entry 30 | 31 | module.exports = webpackConfig 32 | -------------------------------------------------------------------------------- /config/dev.env.js: -------------------------------------------------------------------------------- 1 | var merge = require('webpack-merge') 2 | var prodEnv = require('./prod.env') 3 | 4 | module.exports = merge(prodEnv, { 5 | NODE_ENV: '"development"' 6 | }) 7 | -------------------------------------------------------------------------------- /config/index.js: -------------------------------------------------------------------------------- 1 | // see http://vuejs-templates.github.io/webpack for documentation. 2 | var path = require('path') 3 | 4 | module.exports = { 5 | build: { 6 | env: require('./prod.env'), 7 | index: path.resolve(__dirname, '../index.html'), 8 | assetsRoot: path.resolve(__dirname, '../dist'), 9 | assetsSubDirectory: 'docs', 10 | assetsPublicPath: '/vue-monthly-picker/dist', 11 | productionSourceMap: true, 12 | // Gzip off by default as many popular static hosts such as 13 | // Surge or Netlify already gzip all static assets for you. 14 | // Before setting to `true`, make sure to: 15 | // npm install --save-dev compression-webpack-plugin 16 | productionGzip: false, 17 | productionGzipExtensions: ['js', 'css'], 18 | // Run the build command with an extra argument to 19 | // View the bundle analyzer report after build finishes: 20 | // `npm run build --report` 21 | // Set to `true` or `false` to always turn it on or off 22 | bundleAnalyzerReport: process.env.npm_config_report 23 | }, 24 | lib: { 25 | env: require('./prod.env'), 26 | assetsRoot: path.resolve(__dirname, '../dist'), 27 | assetsSubDirectory: 'lib', 28 | assetsPublicPath: '/', 29 | productionSourceMap: true, 30 | productionGzip: false, 31 | productionGzipExtensions: ['js', 'css'], 32 | bundleAnalyzerReport: process.env.npm_config_report 33 | }, 34 | dev: { 35 | env: require('./dev.env'), 36 | port: 8080, 37 | autoOpenBrowser: true, 38 | assetsSubDirectory: 'docs', 39 | assetsPublicPath: '/', 40 | proxyTable: {}, 41 | // CSS Sourcemaps off by default because relative paths are "buggy" 42 | // with this option, according to the CSS-Loader README 43 | // (https://github.com/webpack/css-loader#sourcemaps) 44 | // In our experience, they generally work as expected, 45 | // just be aware of this issue when enabling this option. 46 | cssSourceMap: false 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /config/prod.env.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | NODE_ENV: '"production"' 3 | } 4 | -------------------------------------------------------------------------------- /config/test.env.js: -------------------------------------------------------------------------------- 1 | var merge = require('webpack-merge') 2 | var devEnv = require('./dev.env') 3 | 4 | module.exports = merge(devEnv, { 5 | NODE_ENV: '"testing"' 6 | }) 7 | -------------------------------------------------------------------------------- /dist/docs/css/vue-monthly-picker.ed5188bba752cc6b43447265b57c525f.css: -------------------------------------------------------------------------------- 1 | .vue-monthly-picker .picker .next:hover,.vue-monthly-picker .picker .prev:hover{cursor:pointer}.vue-monthly-picker .picker .monthItem .item{border-top:1px solid #d4d4d4}.vue-monthly-picker .picker .monthItem .item.active:hover{cursor:pointer;background-color:#d4d4d4}.vue-monthly-picker .picker .flexbox{padding:0;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.vue-monthly-picker .picker .flexbox div{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;padding:15px 0}.vue-monthly-picker .picker .flexbox .item{-webkit-box-flex:1;-ms-flex:1;flex:1;-ms-flex-preferred-size:25%;flex-basis:25%}.vue-monthly-picker .placeholder{color:#8b8b8b}.vue-monthly-picker .date-popover{overflow-x:hidden;overflow-y:hidden;outline:none;max-width:350px;width:100%;border-radius:0 0 .28571429rem .28571429rem;-webkit-box-shadow:0 2px 3px 0 rgba(34,36,38,.15);box-shadow:0 2px 3px 0 rgba(34,36,38,.15);background:#fff;-webkit-transition:opacity .1s ease;transition:opacity .1s ease;position:absolute;margin:auto;z-index:10;border:1px solid #d4d4d4;font-size:1rem;font-weight:200}.vue-monthly-picker .month-picker-wrapper{position:relative;display:block;min-width:200px}.vue-monthly-picker .month-year-label{outline:none}.vue-monthly-picker .month-year-label .vmp-input-append{display:none}.vue-monthly-picker .month-year-label:hover .vmp-input-append{display:block}.vue-monthly-picker .text{position:relative;z-index:2}.vue-monthly-picker .month-year-display:hover{cursor:pointer}.vue-monthly-picker .next,.vue-monthly-picker .prev{width:16%;float:left;text-indent:-10000px;position:relative}.vue-monthly-picker .next:after,.vue-monthly-picker .prev:after{content:"";position:absolute;left:50%;top:50%;-webkit-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);border:6px solid transparent}.vue-monthly-picker .next:after{border-left:10px solid #000;margin-left:5px}.vue-monthly-picker .next.deactive:hover{cursor:default}.vue-monthly-picker .next.deactive:after{border-left:10px solid #999}.vue-monthly-picker .prev:after{border-right:10px solid #000;margin-left:-5px}.vue-monthly-picker .prev.deactive:hover{cursor:default}.vue-monthly-picker .prev.deactive:after{border-right:10px solid #999}.vue-monthly-picker .input{-moz-appearance:none;-webkit-appearance:none;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;font-size:1rem;height:2.25em;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;line-height:1.5;padding:2px calc(.625em - 1px);position:relative;vertical-align:top;background-color:#fff;border:1px solid #dbdbdb;color:#363636;-webkit-box-shadow:inset 0 1px 2px hsla(0,0%,4%,.1);box-shadow:inset 0 1px 2px hsla(0,0%,4%,.1);max-width:100%;width:100%}.vue-monthly-picker .deactive{color:#999}.vue-monthly-picker .selected{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25);font-weight:700}.vue-monthly-picker .display-text{width:100%}.vue-monthly-picker .display-text-right{margin-right:20px}.vue-monthly-picker .vmp-input-append{position:absolute;top:0;right:0;width:30px;height:100%;padding:6px}.vue-monthly-picker .vmp-clear-icon{display:inline-block;width:100%;height:100%;font-style:normal;color:#555;text-align:center;cursor:pointer}.vue-monthly-picker .vmp-clear-icon:before{display:inline-block;content:"\2716";vertical-align:middle} -------------------------------------------------------------------------------- /dist/docs/css/vue-monthly-picker.ed5188bba752cc6b43447265b57c525f.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///./src/components/VueMonthlyPicker.vue"],"names":[],"mappings":"AACA,gFAEE,cAAgB,CAElB,6CACE,4BAA8B,CAEhC,0DACI,eACA,wBAA0B,CAE9B,qCACE,UACA,oBACA,oBACA,aACA,mBACI,cAAgB,CAEtB,yCACI,mBACI,oBACI,YACR,cAAgB,CAEpB,2CACI,mBACI,WACI,OACR,4BACI,cAAgB,CAExB,iCACE,aAAe,CAEjB,kCACE,kBACA,kBACA,aACA,gBACA,WACA,4CACA,kDACQ,0CACR,gBACA,oCACA,4BACA,kBACA,YACA,WACA,yBACA,eACA,eAAiB,CAEnB,0CACE,kBACA,cACA,eAAiB,CAEnB,sCACE,YAAc,CAEhB,wDACI,YAAc,CAElB,8DACI,aAAe,CAEnB,0BACE,kBACA,SAAW,CAEb,8CACE,cAAgB,CAElB,oDAEE,UACA,WACA,qBACA,iBAAmB,CAErB,gEAEI,WACA,kBACA,SACA,QACA,oDACA,4CACA,4BAA8B,CAElC,gCACE,4BACA,eAAiB,CAEnB,yCACE,cAAgB,CAElB,yCACE,2BAAgC,CAElC,gCACE,6BACA,gBAAkB,CAEpB,yCACE,cAAgB,CAElB,yCACE,4BAAiC,CAEnC,2BACE,qBACA,wBACA,yBACI,sBACI,mBACR,6BACA,kBACA,wBACQ,gBACR,2BACA,2BACA,oBACA,eACA,cACA,uBACI,oBACI,2BACR,gBACA,+BACA,kBACA,mBACA,sBACA,qBACA,cACA,oDACQ,4CACR,eACA,UAAY,CAEd,8BACE,UAAe,CAEjB,8BACE,WACA,qCACA,eAAkB,CAEpB,kCACE,UAAY,CAEd,wCACE,iBAAmB,CAErB,sCACE,kBACA,MACA,QACA,WACA,YACA,WAAa,CAEf,oCACE,qBACA,WACA,YACA,kBACA,WACA,kBACA,cAAgB,CAElB,2CACI,qBACA,gBACA,qBAAuB","file":"docs/css/vue-monthly-picker.ed5188bba752cc6b43447265b57c525f.css","sourcesContent":["\n.vue-monthly-picker .picker .next:hover,\n.vue-monthly-picker .picker .prev:hover {\n cursor: pointer;\n}\n.vue-monthly-picker .picker .monthItem .item {\n border-top: 1px solid #d4d4d4;\n}\n.vue-monthly-picker .picker .monthItem .item.active:hover {\n cursor: pointer;\n background-color: #d4d4d4;\n}\n.vue-monthly-picker .picker .flexbox {\n padding: 0px;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n}\n.vue-monthly-picker .picker .flexbox div {\n -webkit-box-flex: 1;\n -ms-flex-positive: 1;\n flex-grow: 1;\n padding: 15px 0;\n}\n.vue-monthly-picker .picker .flexbox .item {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n -ms-flex-preferred-size: 25%;\n flex-basis: 25%;\n}\n.vue-monthly-picker .placeholder {\n color: #8b8b8b;\n}\n.vue-monthly-picker .date-popover {\n overflow-x: hidden;\n overflow-y: hidden;\n outline: none;\n max-width: 350px;\n width: 100%;\n border-radius: 0 0 .28571429rem .28571429rem;\n -webkit-box-shadow: 0 2px 3px 0 rgba(34, 36, 38, 0.15);\n box-shadow: 0 2px 3px 0 rgba(34, 36, 38, 0.15);\n background: #fff;\n -webkit-transition: opacity .1s ease;\n transition: opacity .1s ease;\n position: absolute;\n margin: auto;\n z-index: 10;\n border: 1px solid #d4d4d4;\n font-size: 1rem;\n font-weight: 200;\n}\n.vue-monthly-picker .month-picker-wrapper {\n position: relative;\n display: block;\n min-width: 200px;\n}\n.vue-monthly-picker .month-year-label {\n outline: none;\n}\n.vue-monthly-picker .month-year-label .vmp-input-append {\n display: none;\n}\n.vue-monthly-picker .month-year-label:hover .vmp-input-append {\n display: block;\n}\n.vue-monthly-picker .text {\n position: relative;\n z-index: 2;\n}\n.vue-monthly-picker .month-year-display:hover {\n cursor: pointer;\n}\n.vue-monthly-picker .next,\n.vue-monthly-picker .prev {\n width: 16%;\n float: left;\n text-indent: -10000px;\n position: relative;\n}\n.vue-monthly-picker .next:after,\n .vue-monthly-picker .prev:after {\n content: \"\";\n position: absolute;\n left: 50%;\n top: 50%;\n -webkit-transform: translateX(-50%) translateY(-50%);\n transform: translateX(-50%) translateY(-50%);\n border: 6px solid transparent;\n}\n.vue-monthly-picker .next:after {\n border-left: 10px solid #000;\n margin-left: 5px;\n}\n.vue-monthly-picker .next.deactive:hover {\n cursor: default;\n}\n.vue-monthly-picker .next.deactive:after {\n border-left: 10px solid #999999;\n}\n.vue-monthly-picker .prev:after {\n border-right: 10px solid #000;\n margin-left: -5px;\n}\n.vue-monthly-picker .prev.deactive:hover {\n cursor: default;\n}\n.vue-monthly-picker .prev.deactive:after {\n border-right: 10px solid #999999;\n}\n.vue-monthly-picker .input {\n -moz-appearance: none;\n -webkit-appearance: none;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n border: 1px solid transparent;\n border-radius: 3px;\n -webkit-box-shadow: none;\n box-shadow: none;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n font-size: 1rem;\n height: 2.25em;\n -webkit-box-pack: start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n line-height: 1.5;\n padding: 2px calc(.625em - 1px);\n position: relative;\n vertical-align: top;\n background-color: #fff;\n border-color: #dbdbdb;\n color: #363636;\n -webkit-box-shadow: inset 0 1px 2px rgba(10, 10, 10, 0.1);\n box-shadow: inset 0 1px 2px rgba(10, 10, 10, 0.1);\n max-width: 100%;\n width: 100%;\n}\n.vue-monthly-picker .deactive {\n color: #999999;\n}\n.vue-monthly-picker .selected {\n color: #fff;\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n font-weight: bold;\n}\n.vue-monthly-picker .display-text {\n width: 100%;\n}\n.vue-monthly-picker .display-text-right {\n margin-right: 20px;\n}\n.vue-monthly-picker .vmp-input-append {\n position: absolute;\n top: 0;\n right: 0;\n width: 30px;\n height: 100%;\n padding: 6px;\n}\n.vue-monthly-picker .vmp-clear-icon {\n display: inline-block;\n width: 100%;\n height: 100%;\n font-style: normal;\n color: #555;\n text-align: center;\n cursor: pointer;\n}\n.vue-monthly-picker .vmp-clear-icon:before {\n display: inline-block;\n content: '\\2716';\n vertical-align: middle;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/components/VueMonthlyPicker.vue"],"sourceRoot":""} -------------------------------------------------------------------------------- /dist/docs/js/manifest.fc19899dc75921758888.js: -------------------------------------------------------------------------------- 1 | !function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var r=window.webpackJsonp;window.webpackJsonp=function(t,c,i){for(var u,a,f,s=0,l=[];sn.parts.length&&(s.parts.length=n.parts.length)}else{for(var a=[],r=0;r0)for(n=0;n=0?n?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+s}function T(e,t,n,s){var r=s;"string"==typeof s&&(r=function(){return this[s]()}),e&&(cr[e]=r),t&&(cr[t[0]]=function(){return x(r.apply(this,arguments),t[1],t[2])}),n&&(cr[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),e)})}function N(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function R(e){var t,n,s=e.match(lr);for(t=0,n=s.length;t=0&&dr.test(e);)e=e.replace(dr,n),dr.lastIndex=0,s-=1;return e}function W(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(lr).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])}function U(){return this._invalidDate}function H(e){return this._ordinal.replace("%d",e)}function F(e,t,n,s){var r=this._relativeTime[n];return S(r)?r(e,t,n,s):r.replace(/%d/i,e)}function L(e,t){var n=this._relativeTime[e>0?"future":"past"];return S(n)?n(t):n.replace(/%s/i,t)}function E(e,t){var n=e.toLowerCase();yr[n]=yr[n+"s"]=yr[t]=e}function V(e){return"string"==typeof e?yr[e]||yr[e.toLowerCase()]:void 0}function G(e){var t,n,s={};for(n in e)i(e,n)&&(t=V(n))&&(s[t]=e[n]);return s}function A(e,t){gr[e]=t}function j(e){var t,n=[];for(t in e)i(e,t)&&n.push({unit:t,priority:gr[t]});return n.sort(function(e,t){return e.priority-t.priority}),n}function I(e){return e%4==0&&e%100!=0||e%400==0}function Z(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function z(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=Z(t)),n}function $(e,t){return function(s){return null!=s?(J(this,e,s),n.updateOffset(this,t),this):B(this,e)}}function B(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function J(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&I(e.year())&&1===e.month()&&29===e.date()?(n=z(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),ae(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function q(e){return e=V(e),S(this[e])?this[e]():this}function Q(e,t){if("object"==typeof e){e=G(e);var n,s=j(e);for(n=0;n=0?(o=new Date(e+400,t,n,s,r,i,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,s,r,i,a),o}function we(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Me(e,t,n){var s=7+t-n;return-(7+we(e,0,s).getUTCDay()-t)%7+s-1}function ke(e,t,n,s,r){var i,a,o=(7+n-s)%7,u=Me(e,s,r),l=1+7*(t-1)+o+u;return l<=0?(i=e-1,a=ge(i)+l):l>ge(e)?(i=e+1,a=l-ge(e)):(i=e,a=l),{year:i,dayOfYear:a}}function Se(e,t,n){var s,r,i=Me(e.year(),t,n),a=Math.floor((e.dayOfYear()-i-1)/7)+1;return a<1?(r=e.year()-1,s=a+De(r,t,n)):a>De(e.year(),t,n)?(s=a-De(e.year(),t,n),r=e.year()+1):(r=e.year(),s=a),{week:s,year:r}}function De(e,t,n){var s=Me(e,t,n),r=Me(e+1,t,n);return(ge(e)-s+r)/7}function Ye(e){return Se(e,this._week.dow,this._week.doy).week}function be(){return this._week.dow}function Oe(){return this._week.doy}function xe(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Te(e){var t=Se(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Ne(e,t){return"string"!=typeof e?e:isNaN(e)?(e=t.weekdaysParse(e),"number"==typeof e?e:null):parseInt(e,10)}function Re(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Ce(e,t){return e.slice(t,7).concat(e.slice(0,t))}function Pe(e,t){var n=s(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Ce(n,this._week.dow):e?n[e.day()]:n}function We(e){return!0===e?Ce(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Ue(e){return!0===e?Ce(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function He(e,t,n){var s,r,i,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)i=c([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(i,"").toLocaleLowerCase();return n?"dddd"===t?(r=Ur.call(this._weekdaysParse,a),-1!==r?r:null):"ddd"===t?(r=Ur.call(this._shortWeekdaysParse,a),-1!==r?r:null):(r=Ur.call(this._minWeekdaysParse,a),-1!==r?r:null):"dddd"===t?-1!==(r=Ur.call(this._weekdaysParse,a))?r:-1!==(r=Ur.call(this._shortWeekdaysParse,a))?r:(r=Ur.call(this._minWeekdaysParse,a),-1!==r?r:null):"ddd"===t?-1!==(r=Ur.call(this._shortWeekdaysParse,a))?r:-1!==(r=Ur.call(this._weekdaysParse,a))?r:(r=Ur.call(this._minWeekdaysParse,a),-1!==r?r:null):-1!==(r=Ur.call(this._minWeekdaysParse,a))?r:-1!==(r=Ur.call(this._weekdaysParse,a))?r:(r=Ur.call(this._shortWeekdaysParse,a),-1!==r?r:null)}function Fe(e,t,n){var s,r,i;if(this._weekdaysParseExact)return He.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(r=c([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(i="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[s]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[s].test(e))return s;if(n&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}}function Le(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=Ne(e,this.localeData()),this.add(e-t,"d")):t}function Ee(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Ve(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Re(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Ge(e){return this._weekdaysParseExact?(i(this,"_weekdaysRegex")||Ie.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(i(this,"_weekdaysRegex")||(this._weekdaysRegex=ni),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Ae(e){return this._weekdaysParseExact?(i(this,"_weekdaysRegex")||Ie.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(i(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=si),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function je(e){return this._weekdaysParseExact?(i(this,"_weekdaysRegex")||Ie.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(i(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ri),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Ie(){function e(e,t){return t.length-e.length}var t,n,s,r,i,a=[],o=[],u=[],l=[];for(t=0;t<7;t++)n=c([2e3,1]).day(t),s=te(this.weekdaysMin(n,"")),r=te(this.weekdaysShort(n,"")),i=te(this.weekdays(n,"")),a.push(s),o.push(r),u.push(i),l.push(s),l.push(r),l.push(i);a.sort(e),o.sort(e),u.sort(e),l.sort(e),this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Ze(){return this.hours()%12||12}function ze(){return this.hours()||24}function $e(e,t){T(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Be(e,t){return t._meridiemParse}function Je(e){return"p"===(e+"").toLowerCase().charAt(0)}function qe(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}function Qe(e,t){var n,s=Math.min(e.length,t.length);for(n=0;n0;){if(s=et(r.slice(0,t).join("-")))return s;if(n&&n.length>=t&&Qe(r,n)>=t-1)break;t--}i++}return ii}function et(n){var s=null;if(void 0===li[n]&&void 0!==e&&e&&e.exports)try{s=ii._abbr,t,function(){var e=new Error('Cannot find module "./locale"');throw e.code="MODULE_NOT_FOUND",e}(),tt(s)}catch(e){li[n]=null}return li[n]}function tt(e,t){var n;return e&&(n=o(t)?rt(e):nt(e,t),n?ii=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),ii._abbr}function nt(e,t){if(null!==t){var n,s=ui;if(t.abbr=e,null!=li[e])k("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=li[e]._config;else if(null!=t.parentLocale)if(null!=li[t.parentLocale])s=li[t.parentLocale]._config;else{if(null==(n=et(t.parentLocale)))return di[t.parentLocale]||(di[t.parentLocale]=[]),di[t.parentLocale].push({name:e,config:t}),null;s=n._config}return li[e]=new b(Y(s,t)),di[e]&&di[e].forEach(function(e){nt(e.name,e.config)}),tt(e),li[e]}return delete li[e],null}function st(e,t){if(null!=t){var n,s,r=ui;null!=li[e]&&null!=li[e].parentLocale?li[e].set(Y(li[e]._config,t)):(s=et(e),null!=s&&(r=s._config),t=Y(r,t),null==s&&(t.abbr=e),n=new b(t),n.parentLocale=li[e],li[e]=n),tt(e)}else null!=li[e]&&(null!=li[e].parentLocale?(li[e]=li[e].parentLocale,e===tt()&&tt(e)):null!=li[e]&&delete li[e]);return li[e]}function rt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return ii;if(!s(e)){if(t=et(e))return t;e=[e]}return Ke(e)}function it(){return ar(li)}function at(e){var t,n=e._a;return n&&-2===m(e).overflow&&(t=n[Lr]<0||n[Lr]>11?Lr:n[Er]<1||n[Er]>ae(n[Fr],n[Lr])?Er:n[Vr]<0||n[Vr]>24||24===n[Vr]&&(0!==n[Gr]||0!==n[Ar]||0!==n[jr])?Vr:n[Gr]<0||n[Gr]>59?Gr:n[Ar]<0||n[Ar]>59?Ar:n[jr]<0||n[jr]>999?jr:-1,m(e)._overflowDayOfYear&&(tEr)&&(t=Er),m(e)._overflowWeeks&&-1===t&&(t=Ir),m(e)._overflowWeekday&&-1===t&&(t=Zr),m(e).overflow=t),e}function ot(e){var t,n,s,r,i,a,o=e._i,u=hi.exec(o)||ci.exec(o);if(u){for(m(e).iso=!0,t=0,n=mi.length;tge(i)||0===e._dayOfYear)&&(m(e)._overflowDayOfYear=!0),n=we(i,0,e._dayOfYear),e._a[Lr]=n.getUTCMonth(),e._a[Er]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=s[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Vr]&&0===e._a[Gr]&&0===e._a[Ar]&&0===e._a[jr]&&(e._nextDay=!0,e._a[Vr]=0),e._d=(e._useUTC?we:ve).apply(null,a),r=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Vr]=24),e._w&&void 0!==e._w.d&&e._w.d!==r&&(m(e).weekdayMismatch=!0)}}function pt(e){var t,n,s,r,i,a,o,u,l;t=e._w,null!=t.GG||null!=t.W||null!=t.E?(i=1,a=4,n=_t(t.GG,e._a[Fr],Se(Ot(),1,4).year),s=_t(t.W,1),((r=_t(t.E,1))<1||r>7)&&(u=!0)):(i=e._locale._week.dow,a=e._locale._week.doy,l=Se(Ot(),i,a),n=_t(t.gg,e._a[Fr],l.year),s=_t(t.w,l.week),null!=t.d?((r=t.d)<0||r>6)&&(u=!0):null!=t.e?(r=t.e+i,(t.e<0||t.e>6)&&(u=!0)):r=i),s<1||s>De(n,i,a)?m(e)._overflowWeeks=!0:null!=u?m(e)._overflowWeekday=!0:(o=ke(n,s,r,i,a),e._a[Fr]=o.year,e._dayOfYear=o.dayOfYear)}function vt(e){if(e._f===n.ISO_8601)return void ot(e);if(e._f===n.RFC_2822)return void ft(e);e._a=[],m(e).empty=!0;var t,s,r,i,a,o,u=""+e._i,l=u.length,d=0;for(r=P(e._f,e._locale).match(lr)||[],t=0;t0&&m(e).unusedInput.push(a),u=u.slice(u.indexOf(s)+s.length),d+=s.length),cr[i]?(s?m(e).empty=!1:m(e).unusedTokens.push(i),re(i,s,e)):e._strict&&!s&&m(e).unusedTokens.push(i);m(e).charsLeftOver=l-d,u.length>0&&m(e).unusedInput.push(u),e._a[Vr]<=12&&!0===m(e).bigHour&&e._a[Vr]>0&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[Vr]=wt(e._locale,e._a[Vr],e._meridiem),o=m(e).era,null!==o&&(e._a[Fr]=e._locale.erasConvertYear(o,e._a[Fr])),gt(e),at(e)}function wt(e,t,n){var s;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?(s=e.isPM(n),s&&t<12&&(t+=12),s||12!==t||(t=0),t):t}function Mt(e){var t,n,s,r,i,a,o=!1;if(0===e._f.length)return m(e).invalidFormat=!0,void(e._d=new Date(NaN));for(r=0;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Jt(){if(!o(this._isDSTShifted))return this._isDSTShifted;var e,t={};return g(t,this),t=Dt(t),t._a?(e=t._isUTC?c(t._a):Ot(t._a),this._isDSTShifted=this.isValid()&&Ft(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function qt(){return!!this.isValid()&&!this._isUTC}function Qt(){return!!this.isValid()&&this._isUTC}function Xt(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Kt(e,t){var n,s,r,a=e,o=null;return Ut(e)?a={ms:e._milliseconds,d:e._days,M:e._months}:u(e)||!isNaN(+e)?(a={},t?a[t]=+e:a.milliseconds=+e):(o=Di.exec(e))?(n="-"===o[1]?-1:1,a={y:0,d:z(o[Er])*n,h:z(o[Vr])*n,m:z(o[Gr])*n,s:z(o[Ar])*n,ms:z(Ht(1e3*o[jr]))*n}):(o=Yi.exec(e))?(n="-"===o[1]?-1:1,a={y:en(o[2],n),M:en(o[3],n),w:en(o[4],n),d:en(o[5],n),h:en(o[6],n),m:en(o[7],n),s:en(o[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(r=nn(Ot(a.from),Ot(a.to)),a={},a.ms=r.milliseconds,a.M=r.months),s=new Wt(a),Ut(e)&&i(e,"_locale")&&(s._locale=e._locale),Ut(e)&&i(e,"_isValid")&&(s._isValid=e._isValid),s}function en(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function tn(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function nn(e,t){var n;return e.isValid()&&t.isValid()?(t=Vt(t,e),e.isBefore(t)?n=tn(e,t):(n=tn(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function sn(e,t){return function(n,s){var r,i;return null===s||isNaN(+s)||(k(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=s,s=i),r=Kt(n,s),rn(this,r,e),this}}function rn(e,t,s,r){var i=t._milliseconds,a=Ht(t._days),o=Ht(t._months);e.isValid()&&(r=null==r||r,o&&he(e,B(e,"Month")+o*s),a&&J(e,"Date",B(e,"Date")+a*s),i&&e._d.setTime(e._d.valueOf()+i*s),r&&n.updateOffset(e,a||o))}function an(e){return"string"==typeof e||e instanceof String}function on(e){return v(e)||l(e)||an(e)||u(e)||ln(e)||un(e)||null===e||void 0===e}function un(e){var t,n,s=r(e)&&!a(e),o=!1,u=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"];for(t=0;tn.valueOf():n.valueOf()9999?C(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):S(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",C(n,"Z")):C(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Dn(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,s,r="moment",i="";return this.isLocal()||(r=0===this.utcOffset()?"moment.utc":"moment.parseZone",i="Z"),e="["+r+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",s=i+'[")]',this.format(e+t+n+s)}function Yn(e){e||(e=this.isUtc()?n.defaultFormatUtc:n.defaultFormat);var t=C(this,e);return this.localeData().postformat(t)}function bn(e,t){return this.isValid()&&(v(e)&&e.isValid()||Ot(e).isValid())?Kt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function On(e){return this.from(Ot(),e)}function xn(e,t){return this.isValid()&&(v(e)&&e.isValid()||Ot(e).isValid())?Kt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Tn(e){return this.to(Ot(),e)}function Nn(e){var t;return void 0===e?this._locale._abbr:(t=rt(e),null!=t&&(this._locale=t),this)}function Rn(){return this._locale}function Cn(e,t){return(e%t+t)%t}function Pn(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-Ci:new Date(e,t,n).valueOf()}function Wn(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-Ci:Date.UTC(e,t,n)}function Un(e){var t,s;if(void 0===(e=V(e))||"millisecond"===e||!this.isValid())return this;switch(s=this._isUTC?Wn:Pn,e){case"year":t=s(this.year(),0,1);break;case"quarter":t=s(this.year(),this.month()-this.month()%3,1);break;case"month":t=s(this.year(),this.month(),1);break;case"week":t=s(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=s(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=s(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Cn(t+(this._isUTC?0:this.utcOffset()*Ni),Ri);break;case"minute":t=this._d.valueOf(),t-=Cn(t,Ni);break;case"second":t=this._d.valueOf(),t-=Cn(t,Ti)}return this._d.setTime(t),n.updateOffset(this,!0),this}function Hn(e){var t,s;if(void 0===(e=V(e))||"millisecond"===e||!this.isValid())return this;switch(s=this._isUTC?Wn:Pn,e){case"year":t=s(this.year()+1,0,1)-1;break;case"quarter":t=s(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=s(this.year(),this.month()+1,1)-1;break;case"week":t=s(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=s(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=s(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Ri-Cn(t+(this._isUTC?0:this.utcOffset()*Ni),Ri)-1;break;case"minute":t=this._d.valueOf(),t+=Ni-Cn(t,Ni)-1;break;case"second":t=this._d.valueOf(),t+=Ti-Cn(t,Ti)-1}return this._d.setTime(t),n.updateOffset(this,!0),this}function Fn(){return this._d.valueOf()-6e4*(this._offset||0)}function Ln(){return Math.floor(this.valueOf()/1e3)}function En(){return new Date(this.valueOf())}function Vn(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Gn(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function An(){return this.isValid()?this.toISOString():null}function jn(){return _(this)}function In(){return h({},m(this))}function Zn(){return m(this).overflow}function zn(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function $n(e,t){var s,r,i,a=this._eras||rt("en")._eras;for(s=0,r=a.length;s=0)return u[s]}function Jn(e,t){var s=e.since<=e.until?1:-1;return void 0===t?n(e.since).year():n(e.since).year()+(t-e.offset)*s}function qn(){var e,t,n,s=this.localeData().eras();for(e=0,t=s.length;ei&&(t=i),ys.call(this,e,t,n,s,r))}function ys(e,t,n,s,r){var i=ke(e,t,n,s,r),a=we(i.year,0,i.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function gs(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}function ps(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}function vs(e,t){t[jr]=z(1e3*("0."+e))}function ws(){return this._isUTC?"UTC":""}function Ms(){return this._isUTC?"Coordinated Universal Time":""}function ks(e){return Ot(1e3*e)}function Ss(){return Ot.apply(null,arguments).parseZone()}function Ds(e){return e}function Ys(e,t,n,s){var r=rt(),i=c().set(s,t);return r[n](i,e)}function bs(e,t,n){if(u(e)&&(t=e,e=void 0),e=e||"",null!=t)return Ys(e,t,n,"month");var s,r=[];for(s=0;s<12;s++)r[s]=Ys(e,s,n,"month");return r}function Os(e,t,n,s){"boolean"==typeof e?(u(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,u(t)&&(n=t,t=void 0),t=t||"");var r,i=rt(),a=e?i._week.dow:0,o=[];if(null!=n)return Ys(t,(n+a)%7,s,"day");for(r=0;r<7;r++)o[r]=Ys(t,(r+a)%7,s,"day");return o}function xs(e,t){return bs(e,t,"months")}function Ts(e,t){return bs(e,t,"monthsShort")}function Ns(e,t,n){return Os(e,t,n,"weekdays")}function Rs(e,t,n){return Os(e,t,n,"weekdaysShort")}function Cs(e,t,n){return Os(e,t,n,"weekdaysMin")}function Ps(){var e=this._data;return this._milliseconds=Vi(this._milliseconds),this._days=Vi(this._days),this._months=Vi(this._months),e.milliseconds=Vi(e.milliseconds),e.seconds=Vi(e.seconds),e.minutes=Vi(e.minutes),e.hours=Vi(e.hours),e.months=Vi(e.months),e.years=Vi(e.years),this}function Ws(e,t,n,s){var r=Kt(t,n);return e._milliseconds+=s*r._milliseconds,e._days+=s*r._days,e._months+=s*r._months,e._bubble()}function Us(e,t){return Ws(this,e,t,1)}function Hs(e,t){return Ws(this,e,t,-1)}function Fs(e){return e<0?Math.floor(e):Math.ceil(e)}function Ls(){var e,t,n,s,r,i=this._milliseconds,a=this._days,o=this._months,u=this._data;return i>=0&&a>=0&&o>=0||i<=0&&a<=0&&o<=0||(i+=864e5*Fs(Vs(o)+a),a=0,o=0),u.milliseconds=i%1e3,e=Z(i/1e3),u.seconds=e%60,t=Z(e/60),u.minutes=t%60,n=Z(t/60),u.hours=n%24,a+=Z(n/24),r=Z(Es(a)),o+=r,a-=Fs(Vs(r)),s=Z(o/12),o%=12,u.days=a,u.months=o,u.years=s,this}function Es(e){return 4800*e/146097}function Vs(e){return 146097*e/4800}function Gs(e){if(!this.isValid())return NaN;var t,n,s=this._milliseconds;if("month"===(e=V(e))||"quarter"===e||"year"===e)switch(t=this._days+s/864e5,n=this._months+Es(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Vs(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw new Error("Unknown unit "+e)}}function As(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*z(this._months/12):NaN}function js(e){return function(){return this.as(e)}}function Is(){return Kt(this)}function Zs(e){return e=V(e),this.isValid()?this[e+"s"]():NaN}function zs(e){return function(){return this.isValid()?this._data[e]:NaN}}function $s(){return Z(this.days()/7)}function Bs(e,t,n,s,r){return r.relativeTime(t||1,!!n,e,s)}function Js(e,t,n,s){var r=Kt(e).abs(),i=sa(r.as("s")),a=sa(r.as("m")),o=sa(r.as("h")),u=sa(r.as("d")),l=sa(r.as("M")),d=sa(r.as("w")),h=sa(r.as("y")),c=i<=n.ss&&["s",i]||i0,c[4]=s,Bs.apply(null,c)}function qs(e){return void 0===e?sa:"function"==typeof e&&(sa=e,!0)}function Qs(e,t){return void 0!==ra[e]&&(void 0===t?ra[e]:(ra[e]=t,"s"===e&&(ra.ss=t-1),!0))}function Xs(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,s,r=!1,i=ra;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(r=e),"object"==typeof t&&(i=Object.assign({},ra,t),null!=t.s&&null==t.ss&&(i.ss=t.s-1)),n=this.localeData(),s=Js(this,!r,i,n),r&&(s=n.pastFuture(+this,s)),n.postformat(s)}function Ks(e){return(e>0)-(e<0)||+e}function er(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,s,r,i,a,o,u=ia(this._milliseconds)/1e3,l=ia(this._days),d=ia(this._months),h=this.asSeconds();return h?(e=Z(u/60),t=Z(e/60),u%=60,e%=60,n=Z(d/12),d%=12,s=u?u.toFixed(3).replace(/\.?0+$/,""):"",r=h<0?"-":"",i=Ks(this._months)!==Ks(h)?"-":"",a=Ks(this._days)!==Ks(h)?"-":"",o=Ks(this._milliseconds)!==Ks(h)?"-":"",r+"P"+(n?i+n+"Y":"")+(d?i+d+"M":"")+(l?a+l+"D":"")+(t||e||u?"T":"")+(t?o+t+"H":"")+(e?o+e+"M":"")+(u?o+s+"S":"")):"P0D"}var tr,nr;nr=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),s=n.length>>>0;for(t=0;t68?1900:2e3)};var Qr=$("FullYear",!0);T("w",["ww",2],"wo","week"),T("W",["WW",2],"Wo","isoWeek"),E("week","w"),E("isoWeek","W"),A("week",5),A("isoWeek",5),X("w",Sr),X("ww",Sr,vr),X("W",Sr),X("WW",Sr,vr),se(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=z(e)});var Xr={dow:0,doy:6};T("d",0,"do","day"),T("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),T("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),T("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),T("e",0,0,"weekday"),T("E",0,0,"isoWeekday"),E("day","d"),E("weekday","e"),E("isoWeekday","E"),A("day",11),A("weekday",11),A("isoWeekday",11),X("d",Sr),X("e",Sr),X("E",Sr),X("dd",function(e,t){return t.weekdaysMinRegex(e)}),X("ddd",function(e,t){return t.weekdaysShortRegex(e)}),X("dddd",function(e,t){return t.weekdaysRegex(e)}),se(["dd","ddd","dddd"],function(e,t,n,s){var r=n._locale.weekdaysParse(e,s,n._strict);null!=r?t.d=r:m(n).invalidWeekday=e}),se(["d","e","E"],function(e,t,n,s){t[s]=z(e)});var Kr="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ei="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),ti="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ni=Wr,si=Wr,ri=Wr;T("H",["HH",2],0,"hour"),T("h",["hh",2],0,Ze),T("k",["kk",2],0,ze),T("hmm",0,0,function(){return""+Ze.apply(this)+x(this.minutes(),2)}),T("hmmss",0,0,function(){return""+Ze.apply(this)+x(this.minutes(),2)+x(this.seconds(),2)}),T("Hmm",0,0,function(){return""+this.hours()+x(this.minutes(),2)}),T("Hmmss",0,0,function(){return""+this.hours()+x(this.minutes(),2)+x(this.seconds(),2)}),$e("a",!0),$e("A",!1),E("hour","h"),A("hour",13),X("a",Be),X("A",Be),X("H",Sr),X("h",Sr),X("k",Sr),X("HH",Sr,vr),X("hh",Sr,vr),X("kk",Sr,vr),X("hmm",Dr),X("hmmss",Yr),X("Hmm",Dr),X("Hmmss",Yr),ne(["H","HH"],Vr),ne(["k","kk"],function(e,t,n){var s=z(e);t[Vr]=24===s?0:s}),ne(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ne(["h","hh"],function(e,t,n){t[Vr]=z(e),m(n).bigHour=!0}),ne("hmm",function(e,t,n){var s=e.length-2;t[Vr]=z(e.substr(0,s)),t[Gr]=z(e.substr(s)),m(n).bigHour=!0}),ne("hmmss",function(e,t,n){var s=e.length-4,r=e.length-2;t[Vr]=z(e.substr(0,s)),t[Gr]=z(e.substr(s,2)),t[Ar]=z(e.substr(r)),m(n).bigHour=!0}),ne("Hmm",function(e,t,n){var s=e.length-2;t[Vr]=z(e.substr(0,s)),t[Gr]=z(e.substr(s))}),ne("Hmmss",function(e,t,n){var s=e.length-4,r=e.length-2;t[Vr]=z(e.substr(0,s)),t[Gr]=z(e.substr(s,2)),t[Ar]=z(e.substr(r))});var ii,ai=/[ap]\.?m?\.?/i,oi=$("Hours",!0),ui={calendar:ur,longDateFormat:fr,invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:mr,relativeTime:_r,months:zr,monthsShort:$r,week:Xr,weekdays:Kr,weekdaysMin:ti,weekdaysShort:ei,meridiemParse:ai},li={},di={},hi=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ci=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,fi=/Z|[+-]\d\d(?::?\d\d)?/,mi=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],_i=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],yi=/^\/?Date\((-?\d+)/i,gi=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,pi={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};n.createFromInputFallback=M("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),n.ISO_8601=function(){},n.RFC_2822=function(){};var vi=M("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Ot.apply(null,arguments);return this.isValid()&&e.isValid()?ethis?this:e:y()}),Mi=function(){return Date.now?Date.now():+new Date},ki=["year","quarter","month","week","day","hour","minute","second","millisecond"];Lt("Z",":"),Lt("ZZ",""),X("Z",Cr),X("ZZ",Cr),ne(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Et(Cr,e)});var Si=/([\+\-]|\d\d)/gi;n.updateOffset=function(){};var Di=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Yi=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;Kt.fn=Wt.prototype,Kt.invalid=Pt;var bi=sn(1,"add"),Oi=sn(-1,"subtract");n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",n.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var xi=M("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)}),Ti=1e3,Ni=60*Ti,Ri=60*Ni,Ci=3506328*Ri;T("N",0,0,"eraAbbr"),T("NN",0,0,"eraAbbr"),T("NNN",0,0,"eraAbbr"),T("NNNN",0,0,"eraName"),T("NNNNN",0,0,"eraNarrow"),T("y",["y",1],"yo","eraYear"),T("y",["yy",2],0,"eraYear"),T("y",["yyy",3],0,"eraYear"),T("y",["yyyy",4],0,"eraYear"),X("N",ss),X("NN",ss),X("NNN",ss),X("NNNN",rs),X("NNNNN",is),ne(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,s){var r=n._locale.erasParse(e,s,n._strict);r?m(n).era=r:m(n).invalidEra=e}),X("y",Tr),X("yy",Tr),X("yyy",Tr),X("yyyy",Tr),X("yo",as),ne(["y","yy","yyy","yyyy"],Fr),ne(["yo"],function(e,t,n,s){var r;n._locale._eraYearOrdinalRegex&&(r=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Fr]=n._locale.eraYearOrdinalParse(e,r):t[Fr]=parseInt(e,10)}),T(0,["gg",2],0,function(){return this.weekYear()%100}),T(0,["GG",2],0,function(){return this.isoWeekYear()%100}),us("gggg","weekYear"),us("ggggg","weekYear"),us("GGGG","isoWeekYear"),us("GGGGG","isoWeekYear"),E("weekYear","gg"),E("isoWeekYear","GG"),A("weekYear",1),A("isoWeekYear",1),X("G",Nr),X("g",Nr),X("GG",Sr,vr),X("gg",Sr,vr),X("GGGG",Or,Mr),X("gggg",Or,Mr),X("GGGGG",xr,kr),X("ggggg",xr,kr),se(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,s){t[s.substr(0,2)]=z(e)}),se(["gg","GG"],function(e,t,s,r){t[r]=n.parseTwoDigitYear(e)}),T("Q",0,"Qo","quarter"),E("quarter","Q"),A("quarter",7),X("Q",pr),ne("Q",function(e,t){t[Lr]=3*(z(e)-1)}),T("D",["DD",2],"Do","date"),E("date","D"),A("date",9),X("D",Sr),X("DD",Sr,vr),X("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),ne(["D","DD"],Er),ne("Do",function(e,t){t[Er]=z(e.match(Sr)[0])});var Pi=$("Date",!0);T("DDD",["DDDD",3],"DDDo","dayOfYear"),E("dayOfYear","DDD"),A("dayOfYear",4),X("DDD",br),X("DDDD",wr),ne(["DDD","DDDD"],function(e,t,n){n._dayOfYear=z(e)}),T("m",["mm",2],0,"minute"),E("minute","m"),A("minute",14),X("m",Sr),X("mm",Sr,vr),ne(["m","mm"],Gr);var Wi=$("Minutes",!1);T("s",["ss",2],0,"second"),E("second","s"),A("second",15),X("s",Sr),X("ss",Sr,vr),ne(["s","ss"],Ar);var Ui=$("Seconds",!1);T("S",0,0,function(){return~~(this.millisecond()/100)}),T(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),T(0,["SSS",3],0,"millisecond"),T(0,["SSSS",4],0,function(){return 10*this.millisecond()}),T(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),T(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),T(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),T(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),T(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),E("millisecond","ms"),A("millisecond",16),X("S",br,pr),X("SS",br,vr),X("SSS",br,wr);var Hi,Fi;for(Hi="SSSS";Hi.length<=9;Hi+="S")X(Hi,Tr);for(Hi="S";Hi.length<=9;Hi+="S")ne(Hi,vs);Fi=$("Milliseconds",!1),T("z",0,0,"zoneAbbr"),T("zz",0,0,"zoneName");var Li=p.prototype;Li.add=bi,Li.calendar=cn,Li.clone=fn,Li.diff=wn,Li.endOf=Hn,Li.format=Yn,Li.from=bn,Li.fromNow=On,Li.to=xn,Li.toNow=Tn,Li.get=q,Li.invalidAt=Zn,Li.isAfter=mn,Li.isBefore=_n,Li.isBetween=yn,Li.isSame=gn,Li.isSameOrAfter=pn,Li.isSameOrBefore=vn,Li.isValid=jn,Li.lang=xi,Li.locale=Nn,Li.localeData=Rn,Li.max=wi,Li.min=vi,Li.parsingFlags=In,Li.set=Q,Li.startOf=Un,Li.subtract=Oi,Li.toArray=Vn,Li.toObject=Gn,Li.toDate=En,Li.toISOString=Sn,Li.inspect=Dn,"undefined"!=typeof Symbol&&null!=Symbol.for&&(Li[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),Li.toJSON=An,Li.toString=kn,Li.unix=Ln,Li.valueOf=Fn,Li.creationData=zn,Li.eraName=qn,Li.eraNarrow=Qn,Li.eraAbbr=Xn,Li.eraYear=Kn,Li.year=Qr,Li.isLeapYear=pe,Li.weekYear=ls,Li.isoWeekYear=ds,Li.quarter=Li.quarters=gs,Li.month=ce,Li.daysInMonth=fe,Li.week=Li.weeks=xe,Li.isoWeek=Li.isoWeeks=Te,Li.weeksInYear=fs,Li.weeksInWeekYear=ms,Li.isoWeeksInYear=hs,Li.isoWeeksInISOWeekYear=cs,Li.date=Pi,Li.day=Li.days=Le,Li.weekday=Ee,Li.isoWeekday=Ve,Li.dayOfYear=ps,Li.hour=Li.hours=oi,Li.minute=Li.minutes=Wi,Li.second=Li.seconds=Ui,Li.millisecond=Li.milliseconds=Fi,Li.utcOffset=At,Li.utc=It,Li.local=Zt,Li.parseZone=zt,Li.hasAlignedHourOffset=$t,Li.isDST=Bt,Li.isLocal=qt,Li.isUtcOffset=Qt,Li.isUtc=Xt,Li.isUTC=Xt,Li.zoneAbbr=ws,Li.zoneName=Ms,Li.dates=M("dates accessor is deprecated. Use date instead.",Pi),Li.months=M("months accessor is deprecated. Use month instead",ce),Li.years=M("years accessor is deprecated. Use year instead",Qr),Li.zone=M("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",jt),Li.isDSTShifted=M("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Jt);var Ei=b.prototype;Ei.calendar=O,Ei.longDateFormat=W,Ei.invalidDate=U,Ei.ordinal=H,Ei.preparse=Ds,Ei.postformat=Ds,Ei.relativeTime=F,Ei.pastFuture=L,Ei.set=D,Ei.eras=$n,Ei.erasParse=Bn,Ei.erasConvertYear=Jn,Ei.erasAbbrRegex=ts,Ei.erasNameRegex=es,Ei.erasNarrowRegex=ns,Ei.months=oe,Ei.monthsShort=ue,Ei.monthsParse=de,Ei.monthsRegex=_e,Ei.monthsShortRegex=me,Ei.week=Ye,Ei.firstDayOfYear=Oe,Ei.firstDayOfWeek=be,Ei.weekdays=Pe,Ei.weekdaysMin=Ue,Ei.weekdaysShort=We,Ei.weekdaysParse=Fe,Ei.weekdaysRegex=Ge,Ei.weekdaysShortRegex=Ae,Ei.weekdaysMinRegex=je,Ei.isPM=Je,Ei.meridiem=qe,tt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===z(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),n.lang=M("moment.lang is deprecated. Use moment.locale instead.",tt),n.langData=M("moment.langData is deprecated. Use moment.localeData instead.",rt);var Vi=Math.abs,Gi=js("ms"),Ai=js("s"),ji=js("m"),Ii=js("h"),Zi=js("d"),zi=js("w"),$i=js("M"),Bi=js("Q"),Ji=js("y"),qi=zs("milliseconds"),Qi=zs("seconds"),Xi=zs("minutes"),Ki=zs("hours"),ea=zs("days"),ta=zs("months"),na=zs("years"),sa=Math.round,ra={ss:44,s:45,m:45,h:22,d:26,w:null,M:11},ia=Math.abs,aa=Wt.prototype; 2 | //! moment.js 3 | return aa.isValid=Ct,aa.abs=Ps,aa.add=Us,aa.subtract=Hs,aa.as=Gs,aa.asMilliseconds=Gi,aa.asSeconds=Ai,aa.asMinutes=ji,aa.asHours=Ii,aa.asDays=Zi,aa.asWeeks=zi,aa.asMonths=$i,aa.asQuarters=Bi,aa.asYears=Ji,aa.valueOf=As,aa._bubble=Ls,aa.clone=Is,aa.get=Zs,aa.milliseconds=qi,aa.seconds=Qi,aa.minutes=Xi,aa.hours=Ki,aa.days=ea,aa.weeks=$s,aa.months=ta,aa.years=na,aa.humanize=Xs,aa.toISOString=er,aa.toString=er,aa.toJSON=er,aa.locale=Nn,aa.localeData=Rn,aa.toIsoString=M("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",er),aa.lang=xi,T("X",0,0,"unix"),T("x",0,0,"valueOf"),X("x",Nr),X("X",Pr),ne("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e))}),ne("x",function(e,t,n){n._d=new Date(z(e))}),n.version="2.27.0",function(e){tr=e}(Ot),n.fn=Li,n.min=Tt,n.max=Nt,n.now=Mi,n.utc=c,n.unix=ks,n.months=xs,n.isDate=l,n.locale=tt,n.invalid=y,n.duration=Kt,n.isMoment=v,n.weekdays=Ns,n.parseZone=Ss,n.localeData=rt,n.isDuration=Ut,n.monthsShort=Ts,n.weekdaysMin=Cs,n.defineLocale=nt,n.updateLocale=st,n.locales=it,n.weekdaysShort=Rs,n.normalizeUnits=V,n.relativeTimeRounding=qs,n.relativeTimeThreshold=Qs,n.calendarFormat=hn,n.prototype=Li,n.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},n})}).call(t,n(28)(e))}}); 4 | //# sourceMappingURL=vendor.e3858ebe321f0f5cebfb.js.map -------------------------------------------------------------------------------- /dist/docs/js/vue-monthly-picker.45a8717d3bb00baff749.js: -------------------------------------------------------------------------------- 1 | webpackJsonp([2],{14:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),a=n.n(i);e.default={name:"vue-monthly-picker",props:{value:{default:null},disabled:{type:Boolean,default:!1},inputClass:{default:"input"},placeHolder:{type:String,default:""},alignment:{type:String,default:"left",validator:function(t){return-1!==["left","right","center"].indexOf(t)}},selectedBackgroundColor:{type:String,default:"#007bff"},monthLabels:{type:Array,default:function(){return["1","2","3","4","5","6","7","8","9","10","11","12"]}},min:{default:null},max:{default:null},dateFormat:{type:String,default:"YYYY/MM"},clearOption:{type:Boolean,default:!0}},data:function(){return{showMenu:!1,year:a()().format("YYYY"),month:a()().format("MM")}},mounted:function(){this.init()},watch:{value:function(t){this.setValue(t)}},computed:{menuClass:function(){return{visible:this.showMenu,hidden:!this.showMenu}},menuStyle:function(){return{display:this.showMenu?"block":"none",left:"right"===this.alignment?"100%":"center"===this.alignment?"50%":"",transform:"right"===this.alignment?"translate(-100%,0)":"center"===this.alignment?"translate(-50%,0)":""}},displayText:function(){if(!this.value)return this.placeHolder;var t=null;return(t="string"==typeof this.value?a()(this.value):this.value)&&t.isValid()?t.format(this.dateFormat):void 0},canBack:function(){if(!this.min)return!0;var t=this.internalMomentValue.clone().startOf("year");return this.min.isBefore(t)},canNext:function(){return!this.max||this.internalMomentValue.clone().endOf("year").isBefore(this.max)},internalMomentValue:function(){var t=this.year+"/"+this.month;return a()(t,"YYYY/MM")}},methods:{init:function(){var t=this;document.addEventListener("click",function(e){t.$el&&!t.$el.contains(e.target)&&t.closeMenu()},!1),this.setValue(this.value)},openMenu:function(){this.disabled||(this.showMenu=!0)},closeMenu:function(){this.showMenu=!1},prevYear:function(){if(this.canBack){var t=parseInt(this.year)-1;this.year=t.toString()}},nextYear:function(){if(this.canNext){var t=parseInt(this.year)+1;this.year=t.toString()}},selectMonth:function(t){this.month=(parseInt(t)+1).toString(),this.selectPicker(),this.closeMenu()},selectPicker:function(){this.$emit("input",this.internalMomentValue.clone()),this.$emit("selected",this.internalMomentValue.clone())},setValue:function(t){"string"==typeof t&&(t=a()(t)),t&&t.isValid()&&(this.month=t.format("MM"),this.year=t.format("YYYY"))},isActive:function(t){var e=t+1,n=this.year+"/"+(e<10?"0"+e:e);return(!this.min||!a()(n,"YYYY/MM").isBefore(this.min))&&(!this.max||!a()(n,"YYYY/MM").isAfter(this.max))},isCurrentSelected:function(t,e){if(!this.value)return!1;var n=this.value;if("string"==typeof this.value&&(n=a()(this.value)),n&&n.isValid()){var i=n.format("MM"),s=n.format("YYYY");return Number(i)===Number(e+1)&&Number(s)===Number(t)}return!1},getBackgroundColor:function(t,e){if(this.isCurrentSelected(t,e))return this.selectedBackgroundColor},clearSelect:function(){this.$emit("input",null),this.$emit("selected",null)}}}},17:function(t,e){},2:function(t,e,n){function i(t){n(17)}var a=n(0)(n(14),n(25),i,null,null);t.exports=a.exports},25:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vue-monthly-picker"},[n("div",{staticClass:"month-picker-wrapper",class:{"active visible":t.showMenu}},[n("div",{staticClass:"month-year-label picker",attrs:{type:"text",autocomplete:"off",tabindex:"0"},on:{click:t.openMenu}},[n("div",{staticClass:"month-year-display",class:[t.inputClass,{placeholder:!t.value}],attrs:{disabled:t.disabled},on:{click:t.openMenu}},[n("div",{staticClass:"display-text",class:"display-text-"+t.alignment,style:[{"text-align":t.alignment}]},[t._v(t._s(t.displayText))]),t._v(" "),t.clearOption&&t.value?n("span",{staticClass:"vmp-input-append",on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.clearSelect(e)}}},[n("i",{staticClass:"vmp-clear-icon"})]):t._e()])]),t._v(" "),n("div",{staticClass:"text"}),t._v(" "),n("div",{staticClass:"date-popover",class:t.menuClass,style:t.menuStyle,attrs:{tabindex:"-1"}},[n("div",{staticClass:"picker",staticStyle:{"text-align":"center"}},[n("div",{staticClass:"flexbox"},[n("span",{staticClass:"prev",class:{deactive:!t.canBack},on:{click:t.prevYear}}),t._v(" "),n("div",[t._v(t._s(t.year))]),t._v(" "),n("span",{staticClass:"next",class:{deactive:!t.canNext},on:{click:t.nextYear}})]),t._v(" "),n("div",{staticClass:"flexbox monthItem"},[t._l(t.monthLabels,function(e,i){return[t.isActive(i)?n("div",{key:i,staticClass:"item active",class:{selected:t.isCurrentSelected(t.year,i)},style:[{"background-color":t.getBackgroundColor(t.year,i)}],on:{click:function(e){return t.selectMonth(i)}}},[t._v(t._s(e)+"\n ")]):n("div",{key:i,staticClass:"item deactive",class:{selected:t.isCurrentSelected(t.year,i)}},[t._v("\n "+t._s(e)+"\n ")])]})],2)])])])])},staticRenderFns:[]}},4:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),a=n.n(i),s=n(9);n.n(s);e.default=a.a},9:function(t,e){}},[4]); 2 | //# sourceMappingURL=vue-monthly-picker.45a8717d3bb00baff749.js.map -------------------------------------------------------------------------------- /dist/docs/js/vue-monthly-picker.45a8717d3bb00baff749.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["webpack:///docs/js/vue-monthly-picker.45a8717d3bb00baff749.js","webpack:///VueMonthlyPicker.vue","webpack:///./src/components/VueMonthlyPicker.vue?dc17","webpack:///./src/components/VueMonthlyPicker.vue?c587","webpack:///./src/lib.js"],"names":["webpackJsonp","14","module","__webpack_exports__","__webpack_require__","Object","defineProperty","value","__WEBPACK_IMPORTED_MODULE_0_moment__","__WEBPACK_IMPORTED_MODULE_0_moment___default","n","name","props","default","type","Boolean","String","validator","indexOf","monthLabels","Array","min","max","dateFormat","clearOption","data","showMenu","year","month","mounted","this","init","watch","setValue","computed","menuClass","visible","hidden","menuStyle","display","alignment","displayText","placeHolder","valueMoment","isValid","format","canBack","isBefore","currentVal","canNext","internalMomentValue","methods","document","addEventListener","openMenu","disabled","closeMenu","prevYear","newYear","toString","nextYear","selectMonth","parseInt","idx","selectPicker","$emit","clone","isActive","isCurrentSelected","checkValue","Number","currentMonth","monthIdx","currentYear","getBackgroundColor","selectedBackgroundColor","clearSelect","17","exports","2","injectStyle","ssrContext","Component","25","render","_vm","_h","$createElement","_c","_self","staticClass","class","attrs","on","inputClass","style","_v","_s","$event","stopPropagation","preventDefault","_e","staticStyle","deactive","_l","key","staticRenderFns","4","VueMonthlyPicker","9"],"mappings":"AAAAA,cAAc,IAERC,GACA,SAAUC,EAAQC,EAAqBC,GAE7C,YACAC,QAAOC,eAAeH,EAAqB,cAAgBI,OAAO,GAC7C,IAAIC,GAAuCJ,EAAoB,GAC3DK,EAA+CL,EAAoBM,EAAEF,ECyC9F,YACEG,KAAM,qBACNC,OACE,OACEC,QAAS,MAEX,UACEC,KAAMC,QACNF,SAAS,GAEX,YACEA,QAAS,SAEX,aACEC,KAAME,OACNH,QAAS,IAEX,WACEC,KAAME,OACNH,QAAS,OACTI,UAAW,SAAjB,GAEQ,OAAuD,KAA/C,OAAQ,QAAS,UAAUC,QAAQX,KAG/C,yBACEO,KAAME,OACNH,QAAS,WAEXM,aACEL,KAAMM,MACNP,QAAS,WACP,OAAQ,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,KAAM,KAAM,QAGrEQ,KACER,QAAS,MAEXS,KACET,QAAS,MAEXU,YACET,KAAME,OACNH,QAAS,WAEXW,aACEV,KAAMC,QACNF,SAAS,IAGbY,KAlDF,WAmDI,OACEC,UAAU,EACVC,KAAM,MAAZ,eACMC,MAAO,MAAb,eAGEC,QAzDF,WA0DIC,KAAKC,QAEPC,OACEzB,MAAO,SAAX,GACMuB,KAAKG,SAAS,KAGlBC,UACEC,UADJ,WAEM,OACEC,QAASN,KAAKJ,SACdW,QAASP,KAAKJ,WAGlBY,UAPJ,WAQM,OACEC,QAAST,KAAKJ,SAAW,QAAU,OACnC,KAA2B,UAAnBI,KAAKU,UAAwB,OAA4B,WAAnBV,KAAKU,UAAyB,MAAQ,GACpF,UAAgC,UAAnBV,KAAKU,UAAwB,qBAA0C,WAAnBV,KAAKU,UAAyB,oBAAsB,KAGzHC,YAdJ,WAeM,IAAIX,KAAKvB,MAWP,MAAOuB,MAAKY,WAVZ,IAAR,OAMQ,QAJEC,EADwB,gBAAfb,MAAKvB,MACA,IAAxB,YAEwBuB,KAAKvB,QAEFoC,EAAYC,UACtBD,EAAYE,OAAOf,KAAKP,gBADjC,IAOJuB,QA7BJ,WA8BM,IAAKhB,KAAKT,IAAK,OAAO,CACtB,IAAN,mDACM,OAAOS,MAAKT,IAAI0B,SAASC,IAE3BC,QAlCJ,WAmCM,OAAKnB,KAAKR,KAChB,+CACwByB,SAASjB,KAAKR,MAElC4B,oBAvCJ,WAwCM,GAAN,2BACM,OAAO,KAAb,eAGEC,SACEpB,KADJ,WACA,UACMqB,UAASC,iBAAiB,QAAS,SAAzC,GACY,EAAZ,gCACU,EAAV,cAEA,GACMvB,KAAKG,SAASH,KAAKvB,QAErB+C,SATJ,WAUWxB,KAAKyB,WACRzB,KAAKJ,UAAW,IAGpB8B,UAdJ,WAeM1B,KAAKJ,UAAW,GAElB+B,SAjBJ,WAkBM,GAAK3B,KAAKgB,QAAV,CACA,GAAN,wBACMhB,MAAKH,KAAO+B,EAAQC,aAEtBC,SAtBJ,WAuBM,GAAK9B,KAAKmB,QAAV,CACA,GAAN,wBACMnB,MAAKH,KAAO+B,EAAQC,aAEtBE,YA3BJ,SA2BA,GACM/B,KAAKF,OAASkC,SAASC,GAAO,GAAGJ,WACjC7B,KAAKkC,eACLlC,KAAK0B,aAEPQ,aAhCJ,WAiCMlC,KAAKmC,MAAM,QAASnC,KAAKoB,oBAAoBgB,SAC7CpC,KAAKmC,MAAM,WAAYnC,KAAKoB,oBAAoBgB,UAElDjC,SApCJ,SAoCA,GAC2B,gBAAV1B,KACTA,EAAQ,IAAhB,IAEUA,GAASA,EAAMqC,YACjBd,KAAKF,MAAQrB,EAAMsC,OAAO,MAC1Bf,KAAKH,KAAOpB,EAAMsC,OAAO,UAG7BsB,SA7CJ,SA6CA,GACM,GAAN,OACA,8BACM,SAAIrC,KAAKT,MAAO,IAAtB,oCAGUS,KAAKR,MAAO,IAAtB,iCAKI8C,kBAxDJ,SAwDA,KACM,IAAKtC,KAAKvB,MACR,OAAO,CAET,IAAN,aAIM,IAH0B,gBAAfuB,MAAKvB,QACd8D,EAAa,IAArB,aAEUA,GAAcA,EAAWzB,UAAW,CACtC,GAAR,kBACA,kBACQ,OAAO0B,QAAOC,KAAkBD,OAAOE,EAAW,IAAMF,OAAOG,KAAiBH,OAAO3C,GAEzF,OAAO,GAET+C,mBAvEJ,SAuEA,KACM,GAAI5C,KAAKsC,kBAAkBzC,EAAM6C,GAC/B,MAAO1C,MAAK6C,yBAGhBC,YA5EJ,WA6EM9C,KAAKmC,MAAM,QAAS,MACpBnC,KAAKmC,MAAM,WAAY,UDmBvBY,GACA,SAAU3E,EAAQ4E,KAMlBC,EACA,SAAU7E,EAAQ4E,EAAS1E,GEvQjC,QAAS4E,GAAaC,GACpB,EAAQ,IAEV,GAAIC,GAAY,EAAQ,GAEtB,EAAQ,IAER,EAAQ,IAERF,EAEA,KAEA,KAGF9E,GAAO4E,QAAUI,EAAUJ,SF8QrBK,GACA,SAAUjF,EAAQ4E,GG/RxB5E,EAAO4E,SAASM,OAAO,WAAY,GAAIC,GAAIvD,KAASwD,EAAGD,EAAIE,eAAmBC,EAAGH,EAAII,MAAMD,IAAIF,CAC7F,OAAOE,GAAG,OACRE,YAAa,uBACXF,EAAG,OACLE,YAAa,uBACbC,OACE,iBAAkBN,EAAI3D,YAEtB8D,EAAG,OACLE,YAAa,0BACbE,OACE,KAAQ,OACR,aAAgB,MAChB,SAAY,KAEdC,IACE,MAASR,EAAI/B,YAEbkC,EAAG,OACLE,YAAa,qBACbC,OAAQN,EAAIS,YACV,aAAgBT,EAAI9E,QAEtBqF,OACE,SAAYP,EAAI9B,UAElBsC,IACE,MAASR,EAAI/B,YAEbkC,EAAG,OACLE,YAAa,eACbC,MAAO,gBAAkBN,EAAI7C,UAC7BuD,QACE,aAAcV,EAAI7C,cAElB6C,EAAIW,GAAGX,EAAIY,GAAGZ,EAAI5C,gBAAiB4C,EAAIW,GAAG,KAAOX,EAAI7D,aAAe6D,EAAI9E,MAASiF,EAAG,QACtFE,YAAa,mBACbG,IACE,MAAS,SAASK,GAGhB,MAFAA,GAAOC,kBACPD,EAAOE,iBACAf,EAAIT,YAAYsB,OAGzBV,EAAG,KACLE,YAAa,qBACRL,EAAIgB,SAAUhB,EAAIW,GAAG,KAAMR,EAAG,OACnCE,YAAa,SACXL,EAAIW,GAAG,KAAMR,EAAG,OAClBE,YAAa,eACbC,MAAON,EAAIlD,UACX4D,MAAQV,EAAa,UACrBO,OACE,SAAY,QAEZJ,EAAG,OACLE,YAAa,SACbY,aACE,aAAc,YAEdd,EAAG,OACLE,YAAa,YACXF,EAAG,QACLE,YAAa,OACbC,OACEY,UAAWlB,EAAIvC,SAEjB+C,IACE,MAASR,EAAI5B,YAEb4B,EAAIW,GAAG,KAAMR,EAAG,OAAQH,EAAIW,GAAGX,EAAIY,GAAGZ,EAAI1D,SAAU0D,EAAIW,GAAG,KAAMR,EAAG,QACtEE,YAAa,OACbC,OACEY,UAAWlB,EAAIpC,SAEjB4C,IACE,MAASR,EAAIzB,cAEXyB,EAAIW,GAAG,KAAMR,EAAG,OACpBE,YAAa,sBACXL,EAAImB,GAAInB,EAAe,YAAG,SAASzD,EAAOmC,GAC5C,OAASsB,EAAIlB,SAASJ,GAAQyB,EAAG,OAC/BiB,IAAK1C,EACL2B,YAAa,cACbC,OACE,SAAYN,EAAIjB,kBAAkBiB,EAAI1D,KAAMoC,IAE9CgC,QACE,mBAAoBV,EAAIX,mBAAmBW,EAAI1D,KAAMoC,KAEvD8B,IACE,MAAS,SAASK,GAChB,MAAOb,GAAIxB,YAAYE,OAGzBsB,EAAIW,GAAGX,EAAIY,GAAGrE,GAAS,oBAAsB4D,EAAG,OAClDiB,IAAK1C,EACL2B,YAAa,gBACbC,OACE,SAAYN,EAAIjB,kBAAkBiB,EAAI1D,KAAMoC,MAE5CsB,EAAIW,GAAG,mBAAqBX,EAAIY,GAAGrE,GAAS,wBAC7C,YACL8E,qBHqSIC,EACA,SAAUzG,EAAQC,EAAqBC,GAE7C,YI/YA,mFAGewG,aAAf,GJyZMC,EACA,SAAU3G,EAAQ4E,OAMrB","file":"docs/js/vue-monthly-picker.45a8717d3bb00baff749.js","sourcesContent":["webpackJsonp([2],{\n\n/***/ 14:\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_moment__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_moment___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_moment__);\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'vue-monthly-picker',\n props: {\n 'value': {\n default: null\n },\n 'disabled': {\n type: Boolean,\n default: false\n },\n 'inputClass': {\n default: 'input'\n },\n 'placeHolder': {\n type: String,\n default: ''\n },\n 'alignment': {\n type: String,\n default: 'left',\n validator: function validator(value) {\n // The value must match one of these strings\n return ['left', 'right', 'center'].indexOf(value) !== -1;\n }\n },\n 'selectedBackgroundColor': {\n type: String,\n default: '#007bff'\n },\n monthLabels: {\n type: Array,\n default: function _default() {\n return ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'];\n }\n },\n min: {\n default: null\n },\n max: {\n default: null\n },\n dateFormat: {\n type: String,\n default: 'YYYY/MM'\n },\n clearOption: {\n type: Boolean,\n default: true\n }\n },\n data: function data() {\n return {\n showMenu: false,\n year: __WEBPACK_IMPORTED_MODULE_0_moment___default()().format('YYYY'),\n month: __WEBPACK_IMPORTED_MODULE_0_moment___default()().format('MM')\n };\n },\n mounted: function mounted() {\n this.init();\n },\n\n watch: {\n value: function value(_value) {\n this.setValue(_value);\n }\n },\n computed: {\n menuClass: function menuClass() {\n return {\n visible: this.showMenu,\n hidden: !this.showMenu\n };\n },\n menuStyle: function menuStyle() {\n return {\n display: this.showMenu ? 'block' : 'none',\n 'left': this.alignment === 'right' ? '100%' : this.alignment === 'center' ? '50%' : '',\n 'transform': this.alignment === 'right' ? 'translate(-100%,0)' : this.alignment === 'center' ? 'translate(-50%,0)' : ''\n };\n },\n displayText: function displayText() {\n if (this.value) {\n var valueMoment = null;\n if (typeof this.value === 'string') {\n valueMoment = __WEBPACK_IMPORTED_MODULE_0_moment___default()(this.value);\n } else {\n valueMoment = this.value;\n }\n if (valueMoment && valueMoment.isValid()) {\n return valueMoment.format(this.dateFormat);\n }\n } else {\n return this.placeHolder;\n }\n },\n canBack: function canBack() {\n if (!this.min) return true;\n var currentVal = this.internalMomentValue.clone().startOf('year');\n return this.min.isBefore(currentVal);\n },\n canNext: function canNext() {\n if (!this.max) return true;\n var currentVal = this.internalMomentValue.clone().endOf('year');\n return currentVal.isBefore(this.max);\n },\n internalMomentValue: function internalMomentValue() {\n var yrMonth = this.year + '/' + this.month;\n return __WEBPACK_IMPORTED_MODULE_0_moment___default()(yrMonth, 'YYYY/MM');\n }\n },\n methods: {\n init: function init() {\n var _this = this;\n\n document.addEventListener('click', function (e) {\n if (_this.$el && !_this.$el.contains(e.target)) {\n _this.closeMenu();\n }\n }, false);\n this.setValue(this.value);\n },\n openMenu: function openMenu() {\n if (!this.disabled) {\n this.showMenu = true;\n }\n },\n closeMenu: function closeMenu() {\n this.showMenu = false;\n },\n prevYear: function prevYear() {\n if (!this.canBack) return;\n var newYear = parseInt(this.year) - 1;\n this.year = newYear.toString();\n },\n nextYear: function nextYear() {\n if (!this.canNext) return;\n var newYear = parseInt(this.year) + 1;\n this.year = newYear.toString();\n },\n selectMonth: function selectMonth(idx) {\n this.month = (parseInt(idx) + 1).toString();\n this.selectPicker();\n this.closeMenu();\n },\n selectPicker: function selectPicker() {\n this.$emit('input', this.internalMomentValue.clone());\n this.$emit('selected', this.internalMomentValue.clone());\n },\n setValue: function setValue(value) {\n if (typeof value === 'string') {\n value = __WEBPACK_IMPORTED_MODULE_0_moment___default()(value);\n }\n if (value && value.isValid()) {\n this.month = value.format('MM');\n this.year = value.format('YYYY');\n }\n },\n isActive: function isActive(idx) {\n var realMonth = idx + 1;\n var yrMonth = this.year + '/' + (realMonth < 10 ? '0' + realMonth : realMonth);\n if (this.min && __WEBPACK_IMPORTED_MODULE_0_moment___default()(yrMonth, 'YYYY/MM').isBefore(this.min)) {\n return false;\n }\n if (this.max && __WEBPACK_IMPORTED_MODULE_0_moment___default()(yrMonth, 'YYYY/MM').isAfter(this.max)) {\n return false;\n }\n return true;\n },\n isCurrentSelected: function isCurrentSelected(year, monthIdx) {\n if (!this.value) {\n return false;\n }\n var checkValue = this.value;\n if (typeof this.value === 'string') {\n checkValue = __WEBPACK_IMPORTED_MODULE_0_moment___default()(this.value);\n }\n if (checkValue && checkValue.isValid()) {\n var currentMonth = checkValue.format('MM');\n var currentYear = checkValue.format('YYYY');\n return Number(currentMonth) === Number(monthIdx + 1) && Number(currentYear) === Number(year);\n }\n return false;\n },\n getBackgroundColor: function getBackgroundColor(year, monthIdx) {\n if (this.isCurrentSelected(year, monthIdx)) {\n return this.selectedBackgroundColor;\n }\n },\n clearSelect: function clearSelect() {\n this.$emit('input', null);\n this.$emit('selected', null);\n }\n }\n});\n\n/***/ }),\n\n/***/ 17:\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ }),\n\n/***/ 2:\n/***/ (function(module, exports, __webpack_require__) {\n\nfunction injectStyle (ssrContext) {\n __webpack_require__(17)\n}\nvar Component = __webpack_require__(0)(\n /* script */\n __webpack_require__(14),\n /* template */\n __webpack_require__(25),\n /* styles */\n injectStyle,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n/***/ }),\n\n/***/ 25:\n/***/ (function(module, exports) {\n\nmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"vue-monthly-picker\"\n }, [_c('div', {\n staticClass: \"month-picker-wrapper\",\n class: {\n 'active visible': _vm.showMenu\n }\n }, [_c('div', {\n staticClass: \"month-year-label picker\",\n attrs: {\n \"type\": \"text\",\n \"autocomplete\": \"off\",\n \"tabindex\": \"0\"\n },\n on: {\n \"click\": _vm.openMenu\n }\n }, [_c('div', {\n staticClass: \"month-year-display\",\n class: [_vm.inputClass, {\n 'placeholder': !_vm.value\n }],\n attrs: {\n \"disabled\": _vm.disabled\n },\n on: {\n \"click\": _vm.openMenu\n }\n }, [_c('div', {\n staticClass: \"display-text\",\n class: 'display-text-' + _vm.alignment,\n style: ([{\n 'text-align': _vm.alignment\n }])\n }, [_vm._v(_vm._s(_vm.displayText))]), _vm._v(\" \"), (_vm.clearOption && _vm.value) ? _c('span', {\n staticClass: \"vmp-input-append\",\n on: {\n \"click\": function($event) {\n $event.stopPropagation();\n $event.preventDefault();\n return _vm.clearSelect($event)\n }\n }\n }, [_c('i', {\n staticClass: \"vmp-clear-icon\"\n })]) : _vm._e()])]), _vm._v(\" \"), _c('div', {\n staticClass: \"text\"\n }), _vm._v(\" \"), _c('div', {\n staticClass: \"date-popover\",\n class: _vm.menuClass,\n style: (_vm.menuStyle),\n attrs: {\n \"tabindex\": \"-1\"\n }\n }, [_c('div', {\n staticClass: \"picker\",\n staticStyle: {\n \"text-align\": \"center\"\n }\n }, [_c('div', {\n staticClass: \"flexbox\"\n }, [_c('span', {\n staticClass: \"prev\",\n class: {\n deactive: !_vm.canBack\n },\n on: {\n \"click\": _vm.prevYear\n }\n }), _vm._v(\" \"), _c('div', [_vm._v(_vm._s(_vm.year))]), _vm._v(\" \"), _c('span', {\n staticClass: \"next\",\n class: {\n deactive: !_vm.canNext\n },\n on: {\n \"click\": _vm.nextYear\n }\n })]), _vm._v(\" \"), _c('div', {\n staticClass: \"flexbox monthItem\"\n }, [_vm._l((_vm.monthLabels), function(month, idx) {\n return [(_vm.isActive(idx)) ? _c('div', {\n key: idx,\n staticClass: \"item active\",\n class: {\n 'selected': _vm.isCurrentSelected(_vm.year, idx)\n },\n style: ([{\n 'background-color': _vm.getBackgroundColor(_vm.year, idx)\n }]),\n on: {\n \"click\": function($event) {\n return _vm.selectMonth(idx)\n }\n }\n }, [_vm._v(_vm._s(month) + \"\\n \")]) : _c('div', {\n key: idx,\n staticClass: \"item deactive\",\n class: {\n 'selected': _vm.isCurrentSelected(_vm.year, idx)\n }\n }, [_vm._v(\"\\n \" + _vm._s(month) + \"\\n \")])]\n })], 2)])])])])\n},staticRenderFns: []}\n\n/***/ }),\n\n/***/ 4:\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_VueMonthlyPicker__ = __webpack_require__(2);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__components_VueMonthlyPicker___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__components_VueMonthlyPicker__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__styles_lib_scss__ = __webpack_require__(9);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__styles_lib_scss___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__styles_lib_scss__);\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (__WEBPACK_IMPORTED_MODULE_0__components_VueMonthlyPicker___default.a);\n\n/***/ }),\n\n/***/ 9:\n/***/ (function(module, exports) {\n\n// removed by extract-text-webpack-plugin\n\n/***/ })\n\n},[4]);\n\n\n// WEBPACK FOOTER //\n// docs/js/vue-monthly-picker.45a8717d3bb00baff749.js","\n\n\n\n\n\n\n\n// WEBPACK FOOTER //\n// VueMonthlyPicker.vue?40db69ec","function injectStyle (ssrContext) {\n require(\"!!../../node_modules/extract-text-webpack-plugin/loader.js?{\\\"omit\\\":1,\\\"remove\\\":true}!vue-style-loader!css-loader?{\\\"minimize\\\":true,\\\"sourceMap\\\":true}!../../node_modules/vue-loader/lib/style-compiler/index?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-d606cf52\\\",\\\"scoped\\\":false,\\\"hasInlineConfig\\\":false}!sass-loader?{\\\"sourceMap\\\":true}!../../node_modules/vue-loader/lib/selector?type=styles&index=0!./VueMonthlyPicker.vue\")\n}\nvar Component = require(\"!../../node_modules/vue-loader/lib/component-normalizer\")(\n /* script */\n require(\"!!babel-loader!../../node_modules/vue-loader/lib/selector?type=script&index=0!./VueMonthlyPicker.vue\"),\n /* template */\n require(\"!!../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-d606cf52\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":\\\"src\\\",\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"}}!../../node_modules/vue-loader/lib/selector?type=template&index=0!./VueMonthlyPicker.vue\"),\n /* styles */\n injectStyle,\n /* scopeId */\n null,\n /* moduleIdentifier (server only) */\n null\n)\n\nmodule.exports = Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/VueMonthlyPicker.vue\n// module id = 2\n// module chunks = 2","module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\n return _c('div', {\n staticClass: \"vue-monthly-picker\"\n }, [_c('div', {\n staticClass: \"month-picker-wrapper\",\n class: {\n 'active visible': _vm.showMenu\n }\n }, [_c('div', {\n staticClass: \"month-year-label picker\",\n attrs: {\n \"type\": \"text\",\n \"autocomplete\": \"off\",\n \"tabindex\": \"0\"\n },\n on: {\n \"click\": _vm.openMenu\n }\n }, [_c('div', {\n staticClass: \"month-year-display\",\n class: [_vm.inputClass, {\n 'placeholder': !_vm.value\n }],\n attrs: {\n \"disabled\": _vm.disabled\n },\n on: {\n \"click\": _vm.openMenu\n }\n }, [_c('div', {\n staticClass: \"display-text\",\n class: 'display-text-' + _vm.alignment,\n style: ([{\n 'text-align': _vm.alignment\n }])\n }, [_vm._v(_vm._s(_vm.displayText))]), _vm._v(\" \"), (_vm.clearOption && _vm.value) ? _c('span', {\n staticClass: \"vmp-input-append\",\n on: {\n \"click\": function($event) {\n $event.stopPropagation();\n $event.preventDefault();\n return _vm.clearSelect($event)\n }\n }\n }, [_c('i', {\n staticClass: \"vmp-clear-icon\"\n })]) : _vm._e()])]), _vm._v(\" \"), _c('div', {\n staticClass: \"text\"\n }), _vm._v(\" \"), _c('div', {\n staticClass: \"date-popover\",\n class: _vm.menuClass,\n style: (_vm.menuStyle),\n attrs: {\n \"tabindex\": \"-1\"\n }\n }, [_c('div', {\n staticClass: \"picker\",\n staticStyle: {\n \"text-align\": \"center\"\n }\n }, [_c('div', {\n staticClass: \"flexbox\"\n }, [_c('span', {\n staticClass: \"prev\",\n class: {\n deactive: !_vm.canBack\n },\n on: {\n \"click\": _vm.prevYear\n }\n }), _vm._v(\" \"), _c('div', [_vm._v(_vm._s(_vm.year))]), _vm._v(\" \"), _c('span', {\n staticClass: \"next\",\n class: {\n deactive: !_vm.canNext\n },\n on: {\n \"click\": _vm.nextYear\n }\n })]), _vm._v(\" \"), _c('div', {\n staticClass: \"flexbox monthItem\"\n }, [_vm._l((_vm.monthLabels), function(month, idx) {\n return [(_vm.isActive(idx)) ? _c('div', {\n key: idx,\n staticClass: \"item active\",\n class: {\n 'selected': _vm.isCurrentSelected(_vm.year, idx)\n },\n style: ([{\n 'background-color': _vm.getBackgroundColor(_vm.year, idx)\n }]),\n on: {\n \"click\": function($event) {\n return _vm.selectMonth(idx)\n }\n }\n }, [_vm._v(_vm._s(month) + \"\\n \")]) : _c('div', {\n key: idx,\n staticClass: \"item deactive\",\n class: {\n 'selected': _vm.isCurrentSelected(_vm.year, idx)\n }\n }, [_vm._v(\"\\n \" + _vm._s(month) + \"\\n \")])]\n })], 2)])])])])\n},staticRenderFns: []}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/vue-loader/lib/template-compiler?{\"id\":\"data-v-d606cf52\",\"hasScoped\":false,\"transformToRequire\":{\"video\":\"src\",\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"}}!./~/vue-loader/lib/selector.js?type=template&index=0!./src/components/VueMonthlyPicker.vue\n// module id = 25\n// module chunks = 2","import VueMonthlyPicker from './components/VueMonthlyPicker'\nimport './styles/lib.scss'\n\nexport default VueMonthlyPicker\n\n\n\n// WEBPACK FOOTER //\n// ./src/lib.js"],"sourceRoot":""} -------------------------------------------------------------------------------- /dist/lib/vue-monthly-picker.min.js: -------------------------------------------------------------------------------- 1 | !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("moment")):"function"==typeof define&&define.amd?define(["moment"],t):"object"==typeof exports?exports["vue-monthly-picker"]=t(require("moment")):e["vue-monthly-picker"]=t(e.moment)}(this,function(e){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/vue-monthly-picker/dist",t(t.s=4)}([function(e,t){function n(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var o=i(r);return[n].concat(r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"})).concat([o]).join("\n")}return[n].join("\n")}function i(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var i=n(t,e);return t[2]?"@media "+t[2]+"{"+i+"}":i}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var i={},r=0;rn.parts.length&&(i.parts.length=n.parts.length)}else{for(var a=[],r=0;r 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Vue Monthly Picker Component 11 | 12 | 13 |
14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | Vue Monthly Picker Component
-------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-monthly-picker", 3 | "version": "0.2.8", 4 | "description": "Vue Monthly Picker", 5 | "author": "Vu Minh Thang ", 6 | "main": "dist/lib/vue-monthly-picker.min.js", 7 | "private": false, 8 | "license": "MIT", 9 | "homepage": "https://github.com/ittus/vue-monthly-picker", 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/ittus/vue-monthly-picker" 13 | }, 14 | "keywords": [ 15 | "month-select", 16 | "month-option", 17 | "monthpicker", 18 | "month-picker", 19 | "vue-component", 20 | "vuejs" 21 | ], 22 | "scripts": { 23 | "prepublishOnly": "npm run build", 24 | "dev": "npm-run-all --parallel dev:lib dev:docs", 25 | "dev:lib": "webpack --config build/webpack.lib.conf.js --watch --progress --hide-modules", 26 | "dev:docs": "node build/dev-server.js", 27 | "build": "npm run build:lib && npm run build:docs", 28 | "build:lib": "node build/build-lib.js", 29 | "build:docs": "node build/build.js", 30 | "unit": "cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run", 31 | "test": "npm run unit", 32 | "lint": "eslint --ext .js,.vue src test/unit/specs" 33 | }, 34 | "dependencies": {}, 35 | "devDependencies": { 36 | "autoprefixer": "^7.1.2", 37 | "babel-core": "^6.22.1", 38 | "babel-eslint": "^7.1.1", 39 | "babel-loader": "^7.1.1", 40 | "babel-plugin-istanbul": "^4.1.1", 41 | "babel-plugin-transform-runtime": "^6.22.0", 42 | "babel-preset-env": "^1.3.2", 43 | "babel-preset-stage-2": "^6.22.0", 44 | "babel-register": "^6.22.0", 45 | "buefy": "^0.4.6", 46 | "chai": "^3.5.0", 47 | "chalk": "^2.0.1", 48 | "connect-history-api-fallback": "^1.3.0", 49 | "copy-webpack-plugin": "^4.0.1", 50 | "cross-env": "^5.0.1", 51 | "cross-spawn": "^5.0.1", 52 | "css-loader": "^0.28.0", 53 | "cssnano": "^4.1.10", 54 | "eslint": "^3.19.0", 55 | "eslint-config-standard": "^6.2.1", 56 | "eslint-friendly-formatter": "^3.0.0", 57 | "eslint-loader": "^1.7.1", 58 | "eslint-plugin-html": "^3.0.0", 59 | "eslint-plugin-promise": "^3.4.0", 60 | "eslint-plugin-standard": "^2.0.1", 61 | "eslint-plugin-vue": "beta", 62 | "eventsource-polyfill": "^0.9.6", 63 | "express": "^4.14.1", 64 | "extract-text-webpack-plugin": "^2.0.0", 65 | "file-loader": "^0.11.1", 66 | "friendly-errors-webpack-plugin": "^1.1.3", 67 | "html-webpack-plugin": "^2.28.0", 68 | "http-proxy-middleware": "^0.17.3", 69 | "inject-loader": "^3.0.0", 70 | "karma": "^4.2.0", 71 | "karma-coverage": "^1.1.2", 72 | "karma-mocha": "^1.3.0", 73 | "karma-phantomjs-launcher": "^1.0.2", 74 | "karma-phantomjs-shim": "^1.4.0", 75 | "karma-sinon-chai": "^1.3.1", 76 | "karma-sourcemap-loader": "^0.3.7", 77 | "karma-spec-reporter": "0.0.31", 78 | "karma-webpack": "^2.0.2", 79 | "lolex": "^1.5.2", 80 | "mocha": "^3.2.0", 81 | "moment": "^2.18.1", 82 | "node-sass": "^4.12.0", 83 | "npm-run-all": "^4.0.2", 84 | "opn": "^5.1.0", 85 | "optimize-css-assets-webpack-plugin": "^2.0.0", 86 | "ora": "^1.2.0", 87 | "peer-deps-externals-webpack-plugin": "^1.0.2", 88 | "phantomjs-prebuilt": "^2.1.14", 89 | "rimraf": "^2.6.0", 90 | "sass-loader": "^6.0.5", 91 | "semver": "^5.3.0", 92 | "shelljs": "^0.7.6", 93 | "sinon": "^2.1.0", 94 | "sinon-chai": "^2.8.0", 95 | "url-loader": "^0.5.8", 96 | "vue": "^2.2.1", 97 | "vue-loader": "^12.1.0", 98 | "vue-router": "^2.6.0", 99 | "vue-style-loader": "^3.0.1", 100 | "vue-template-compiler": "^2.5.16", 101 | "webpack": "2.7.0", 102 | "webpack-bundle-analyzer": "^2.2.1", 103 | "webpack-dev-middleware": "^1.10.0", 104 | "webpack-hot-middleware": "^2.18.0", 105 | "webpack-merge": "^4.1.0" 106 | }, 107 | "engines": { 108 | "node": ">= 4.0.0", 109 | "npm": ">= 3.0.0" 110 | }, 111 | "browserslist": [ 112 | "> 1%", 113 | "last 2 versions", 114 | "not ie <= 8" 115 | ], 116 | "peerDependencies": { 117 | "moment": "^2.18.1", 118 | "vue": "^2.2.1" 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /src/app.vue: -------------------------------------------------------------------------------- 1 | 92 | 93 | 165 | 166 | 190 | -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ittus/vue-monthly-picker/0343c7f2bcc8b4685ae4d211b03b5b6541122d80/src/assets/logo.png -------------------------------------------------------------------------------- /src/common/ForkGithub.vue: -------------------------------------------------------------------------------- 1 | 7 | 23 | 48 | -------------------------------------------------------------------------------- /src/components/VueMonthlyPicker.vue: -------------------------------------------------------------------------------- 1 | 46 | 47 | 242 | 243 | 439 | -------------------------------------------------------------------------------- /src/docs.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Buefy from 'buefy' 3 | Vue.use(Buefy) 4 | import App from './app' 5 | import router from './router' 6 | 7 | import './styles/app.scss' 8 | 9 | Vue.config.productionTip = false 10 | 11 | /* eslint-disable no-new */ 12 | new Vue({ 13 | el: '#app', 14 | router, 15 | render: h => h(App) 16 | }) 17 | -------------------------------------------------------------------------------- /src/lib.js: -------------------------------------------------------------------------------- 1 | import VueMonthlyPicker from './components/VueMonthlyPicker' 2 | import './styles/lib.scss' 3 | 4 | export default VueMonthlyPicker 5 | -------------------------------------------------------------------------------- /src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Router from 'vue-router' 3 | import VueMonthlyPicker from '@/components/VueMonthlyPicker' 4 | 5 | Vue.use(Router) 6 | 7 | export default new Router({ 8 | routes: [ 9 | { 10 | path: '/', 11 | name: 'VueMonthlyPicker', 12 | component: VueMonthlyPicker 13 | } 14 | ] 15 | }) 16 | -------------------------------------------------------------------------------- /src/styles/app.scss: -------------------------------------------------------------------------------- 1 | // See Buefy customization docs for more: https://buefy.github.io/#/documentation/customization 2 | 3 | // Import Bulma's core 4 | @import "~bulma/sass/utilities/_all"; 5 | 6 | // Set your colors 7 | $primary: #8c67ef; 8 | $primary-invert: findColorInvert($primary); 9 | $twitter: #4099FF; 10 | $twitter-invert: findColorInvert($twitter); 11 | 12 | // Setup $colors to use as bulma classes (e.g. 'is-twitter') 13 | $colors: ( 14 | "white": ($white, $black), 15 | "black": ($black, $white), 16 | "light": ($light, $light-invert), 17 | "dark": ($dark, $dark-invert), 18 | "primary": ($primary, $primary-invert), 19 | "info": ($info, $info-invert), 20 | "success": ($success, $success-invert), 21 | "warning": ($warning, $warning-invert), 22 | "danger": ($danger, $danger-invert), 23 | "twitter": ($twitter, $twitter-invert) 24 | ); 25 | 26 | // Links 27 | $link: $primary; 28 | $link-invert: $primary-invert; 29 | $link-focus-border: $primary; 30 | 31 | // Import Bulma and Buefy styles 32 | @import "~bulma"; 33 | @import "~buefy/src/scss/buefy"; 34 | 35 | // Import your library's styles 36 | @import 'lib' 37 | -------------------------------------------------------------------------------- /src/styles/lib.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ittus/vue-monthly-picker/0343c7f2bcc8b4685ae4d211b03b5b6541122d80/src/styles/lib.scss -------------------------------------------------------------------------------- /src/styles/lib.styl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ittus/vue-monthly-picker/0343c7f2bcc8b4685ae4d211b03b5b6541122d80/src/styles/lib.styl -------------------------------------------------------------------------------- /static/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ittus/vue-monthly-picker/0343c7f2bcc8b4685ae4d211b03b5b6541122d80/static/.gitkeep -------------------------------------------------------------------------------- /test/unit/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "mocha": true 4 | }, 5 | "globals": { 6 | "expect": true, 7 | "sinon": true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/unit/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | Vue.config.productionTip = false 4 | 5 | // require all test files (files that ends with .spec.js) 6 | const testsContext = require.context('./specs', true, /\.spec$/) 7 | testsContext.keys().forEach(testsContext) 8 | 9 | // require all src files except main.js for coverage. 10 | // you can also change this to match only the subset of files that 11 | // you want coverage for. 12 | const srcContext = require.context('../../src', true, /^\.\/(?!main(\.js)?$)/) 13 | srcContext.keys().forEach(srcContext) 14 | -------------------------------------------------------------------------------- /test/unit/karma.conf.js: -------------------------------------------------------------------------------- 1 | // This is a karma config file. For more details see 2 | // http://karma-runner.github.io/0.13/config/configuration-file.html 3 | // we are also using it with karma-webpack 4 | // https://github.com/webpack/karma-webpack 5 | 6 | var webpackConfig = require('../../build/webpack.test.conf') 7 | 8 | module.exports = function (config) { 9 | config.set({ 10 | // to run in additional browsers: 11 | // 1. install corresponding karma launcher 12 | // http://karma-runner.github.io/0.13/config/browsers.html 13 | // 2. add it to the `browsers` array below. 14 | browsers: ['PhantomJS'], 15 | frameworks: ['mocha', 'sinon-chai', 'phantomjs-shim'], 16 | reporters: ['spec', 'coverage'], 17 | files: ['./index.js'], 18 | preprocessors: { 19 | './index.js': ['webpack', 'sourcemap'] 20 | }, 21 | webpack: webpackConfig, 22 | webpackMiddleware: { 23 | noInfo: true 24 | }, 25 | coverageReporter: { 26 | dir: './coverage', 27 | reporters: [ 28 | { type: 'lcov', subdir: '.' }, 29 | { type: 'text-summary' } 30 | ] 31 | } 32 | }) 33 | } 34 | -------------------------------------------------------------------------------- /test/unit/specs/VueMonthlyPicker.spec.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Hello from '@/components/VueMonthlyPicker' 3 | 4 | describe('VueMonthlyPicker.vue', () => { 5 | it('should render correct contents', () => { 6 | const Constructor = Vue.extend(Hello) 7 | const vm = new Constructor().$mount() 8 | expect(vm.$el.querySelector('div:first-child').className) 9 | .to.equal('month-picker-wrapper') 10 | }) 11 | }) 12 | --------------------------------------------------------------------------------