Socket
Socket
Sign inDemoInstall

vue-calendar-heatmap

Package Overview
Dependencies
16
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.7.5 to 0.8.0

.babelrc

28

.eslintrc.js
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
parser: 'babel-eslint',
ecmaVersion: 2017,
sourceType: 'module'
},
parserOptions: {
sourceType: 'module'
},
// https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
extends: 'standard',
extends: ['standard', 'plugin:vue/essential'],
// required to lint *.vue files
plugins: [
'html'
],
env: {
browser: true,
jest: true,
},
// add your custom rules here
'rules': {
// allow paren-less arrow functions
'arrow-parens': 0,
// allow async-await
'generator-star-spacing': 0,
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
// trailing comma
'comma-dangle': ['error', 'always-multiline'],
// beware of returning assignement
'no-return-assign': 'off',
'no-extend-native': 'warn',
'indent': ['error', 'tab'],
'no-tabs': 'off',
}
'rules': {}
}

@@ -1,3 +0,4 @@

import CalendarHeatmap from './src/CalendarHeatmap.vue'
import './dist/vue-calendar-heatmap.css'
export default CalendarHeatmap
export { default } from './dist/vue-calendar-heatmap.common'
export * from './dist/vue-calendar-heatmap.common'
{
"name": "vue-calendar-heatmap",
"version": "0.7.5",
"description": "A calendar heatmap Vuejs component built on SVG, inspired by github's contribution calendar graph",
"author": "Julien Rabin <julien@wildcodeschool.fr>",
"main": "dist/vue-calendar-heatmap.umd.js",
"module": "dist/vue-calendar-heatmap.esm.js",
"unpkg": "dist/vue-calendar-heatmap.umd.min.js",
"scripts": {
"build": "npm run build:browser && npm run build:es && npm run build:umd",
"build:browser": "rollup --config build/rollup.config.browser.js",
"build:es": "rollup --config build/rollup.config.es.js",
"build:umd": "rollup --config build/rollup.config.umd.js",
"dev": "cross-env NODE_ENV=development rollup --config build/rollup.config.es.js --watch",
"test": "npm run test:unit",
"test:unit": "jest --config tests/unit/jest.config.js --coverage"
"version": "0.8.0",
"author": {
"name": "Rabin Julien",
"email": "julienr114@gmail.com"
},
"repository": {
"type": "git",
"url": "git+https://github.com/WildCodeSchool/vue-calendar-heatmap"
},
"keywords": [
"vue",
"component",
"calendar-heatmap",
"heatmap"
"vuejs",
"plugin"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/WildCodeSchool/vue-calendar-heatmap/issues"
"main": "dist/vue-calendar-heatmap.common.js",
"unpkg": "dist/vue-calendar-heatmap.browser.js",
"module": "index.js",
"scripts": {
"dev": "cross-env NODE_ENV=development webpack --config config/webpack.config.dev.js --progress --watch",
"build": "npm run build:browser && npm run build:common",
"build:browser": "cross-env NODE_ENV=production webpack --config config/webpack.config.browser.js --progress --hide-modules",
"build:common": "cross-env NODE_ENV=production webpack --config config/webpack.config.common.js --progress --hide-modules",
"prepublish": "npm run build"
},
"homepage": "https://github.com/WildCodeSchool/vue-calendar-heatmap#readme",
"dependencies": {
"rollup-plugin-css-only": "^0.4.0",
"v-tooltip": "^2.0.0-rc.32"
},
"devDependencies": {
"babel-core": "^6.0.0",
"babel-eslint": "^7.1.1",
"babel-jest": "^21.2.0",
"babel-plugin-dynamic-import-node": "^1.1.0",
"babel-plugin-external-helpers": "^6.22.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.6.0",
"babel-loader": "^6.0.0",
"babel-preset-es2015": "^6.14.0",
"babel-preset-stage-0": "^6.16.0",
"clean-css": "^4.1.8",
"cross-env": "^5.0.5",
"eslint": "^4.7.2",
"eslint-config-standard": "^10.2.1",
"eslint-plugin-html": "^3.2.1",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-node": "^5.1.1",
"cross-env": "^3.1.3",
"css-loader": "^0.26.1",
"eslint": "^3.12.1",
"eslint-config-standard": "^6.2.1",
"eslint-loader": "^1.6.1",
"eslint-plugin-html": "^1.6.0",
"eslint-plugin-promise": "^3.4.0",
"eslint-plugin-standard": "^3.0.1",
"jest": "^21.2.1",
"jest-serializer-vue": "^0.3.0",
"jest-vue": "^0.8.2",
"rollup": "^0.51.8",
"rollup-plugin-babel": "^3.0.2",
"rollup-plugin-commonjs": "^8.2.0",
"rollup-plugin-node-resolve": "^3.0.0",
"rollup-plugin-replace": "^2.0.0",
"rollup-plugin-uglify": "^2.0.1",
"rollup-plugin-vue": "^2.4.1",
"uglify-es": "^3.0.28",
"vue-server-renderer": "^2.5.3",
"vue-template-compiler": "^2.5.2",
"vue-test-utils": "^1.0.0-beta.4"
"eslint-plugin-standard": "^2.0.1",
"eslint-plugin-vue": "^4.5.0",
"extract-text-webpack-plugin": "^2.0.0-beta.4",
"pug": "^2.0.3",
"pug-loader": "^2.4.0",
"vue-loader": "^10.0.0",
"vue-template-compiler": "^2.1.6",
"webpack": "^2.1.0-beta.28",
"webpack-merge": "^1.1.2"
},
"dependencies": {
"v-tooltip": "^2.0.0-rc.32"
}
}
# vue-calendar-heatmap
<p align="center">
<img src="https://i.imgur.com/ntYYTKX.png" alt="Screenshot"/>
</p>
![](https://i.imgur.com/ntYYTKX.png)
<p align="center">
<a href="https://www.npmjs.com/package/vue-calendar-heatmap">
<img src="https://img.shields.io/npm/v/vue-calendar-heatmap.svg"/>
<img src="https://img.shields.io/npm/dm/vue-calendar-heatmap.svg"/>
</a>
<a href="https://vuejs.org/">
<img src="https://img.shields.io/badge/vue-2.x-brightgreen.svg"/>
</a>
</p>
[![npm](https://img.shields.io/npm/v/vue-calendar-heatmap.svg) ![npm](https://img.shields.io/npm/dm/vue-calendar-heatmap.svg)](https://www.npmjs.com/package/vue-calendar-heatmap)
[![vue2](https://img.shields.io/badge/vue-2.x-brightgreen.svg)](https://vuejs.org/)
A lightweight calendar heatmap Vuejs component built on SVG, inspired by github's contribution calendar graph. With vertical mode, tooltip powered by [v-tooltip](https://github.com/Akryum/v-tooltip).
## Getting started
## Table of contents
1. Load Module
``` shell
npm insall --save vue-calendar-heatmap
- [Installation](#installation)
- [Usage](#usage)
# Installation
```
2. Import in your vuejs application
``` javascript
import CalendarHeatmap from 'vue-calendar-heatmap'
npm install --save vue-calendar-heatmap
```
// in a parent component script
export default {
components: {
CalendarHeatmap
},
data () {
return {
today: new Date(),
values: [{ date: '2017-11-09', count: 1 }, { date: '2017-11-20', count: 1 }]
}
// ...
}
## Default import
Install all the components:
```javascript
import Vue from 'vue'
import VueCalendarHeatmap from 'vue-calendar-heatmap'
Vue.use(VueCalendarHeatmap)
```
``` html
<!-- in a parent component template -->
<template>
<div id="parent">
<calendar-heatmap :end-date="today" :values="values" />
</div>
</template>
Use specific components:
```javascript
import Vue from 'vue'
import { CalendarHeatmap } from 'vue-calendar-heatmap'
Vue.component('calendarHeatmap', CalendarHeatmap)
```
**⚠️ A css file is included when importing the package. You may have to setup your bundler to embed the css in your page.**
## Distribution import
Install all the components:
```javascript
import 'vue-calendar-heatmap/dist/vue-calendar-heatmap.css'
import VueCalendarHeatmap from 'vue-calendar-heatmap/dist/vue-calendar-heatmap.common'
Vue.use(VueCalendarHeatmap)
```
Use specific components:
```javascript
import 'vue-calendar-heatmap/dist/vue-calendar-heatmap.css'
import { CalendarHeatmap } from 'vue-calendar-heatmap/dist/vue-calendar-heatmap.common'
Vue.component('calendarHeatmap', CalendarHeatmap)
```
**⚠️ You may have to setup your bundler to embed the css file in your page.**
## Browser
```html
<link rel="stylesheet" href="vue-calendar-heatmap/dist/vue-calendar-heatmap.css"/>
<script src="vue.js"></script>
<script src="vue-calendar-heatmap/dist/vue-calendar-heatmap.browser.js"></script>
```
The plugin should be auto-installed. If not, you can install it manually with the instructions below.
Install all the components:
```javascript
Vue.use(VueCalendarHeatmap)
```
Use specific components:
```javascript
Vue.component('calendarHeatmap', VueCalendarHeatmap.CalendarHeatmap)
```
## Source import
Install all the components:
```javascript
import Vue from 'vue'
import VueCalendarHeatmap from 'vue-calendar-heatmap/src'
Vue.use(VueCalendarHeatmap)
```
Use specific components:
```javascript
import Vue from 'vue'
import { CalendarHeatmap } from 'vue-calendar-heatmap/src'
Vue.component('calendarHeatmap', CalendarHeatmap)
```
**⚠️ You need to configure your bundler to compile `.vue` files.** More info [in the official documentation](https://vuejs.org/v2/guide/single-file-components.html).
# Usage
## Availables props
### **values** - `values` - _required_

@@ -91,2 +151,6 @@ Array of objects with `date` and `count` keys. `date` values can be a date parseable string, a millisecond timestamp, or a Date object. `count` value should be a number.

<vue-calendar-heatmap :vertical="true" ... />
```
```
## License
[MIT](http://opensource.org/licenses/MIT)

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc