🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →

vue-add-to-calendar

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-add-to-calendar - npm Package Compare versions

Comparing version

to
1.0.1

@@ -0,3 +1,7 @@

<a name="1.0.1"></a>
# [1.0.1](https://github.com/nicolasbeauvais/vue-social-sharing/compare/1.0.0...1.0.1) (2017-02-11)
- Fix error when using null start or end parameters
<a name="1.0.0"></a>
# 1.0.0 (2017-02-10)
- Initial version
/*!
* vue-add-to-calendar v1.0.0
* vue-add-to-calendar v1.0.1
* (c) 2017 nicolasbeauvais

@@ -96,3 +96,3 @@ * Released under the MIT License.

formattedDate: function formattedDate (date) {
return date.toISOString().replace(/-|:|\.\d+/g, '');
return date ? date.toISOString().replace(/-|:|\.\d+/g, '') : null;
}

@@ -120,3 +120,3 @@ },

AddToCalendar.version = '1.0.0';
AddToCalendar.version = '1.0.1';

@@ -123,0 +123,0 @@ AddToCalendar.install = function (Vue) {

/*!
* vue-add-to-calendar v1.0.0
* vue-add-to-calendar v1.0.1
* (c) 2017 nicolasbeauvais

@@ -100,3 +100,3 @@ * Released under the MIT License.

formattedDate: function formattedDate (date) {
return date.toISOString().replace(/-|:|\.\d+/g, '');
return date ? date.toISOString().replace(/-|:|\.\d+/g, '') : null;
}

@@ -124,3 +124,3 @@ },

AddToCalendar.version = '1.0.0';
AddToCalendar.version = '1.0.1';

@@ -127,0 +127,0 @@ AddToCalendar.install = function (Vue) {

/*!
* vue-add-to-calendar v1.0.0
* vue-add-to-calendar v1.0.1
* (c) 2017 nicolasbeauvais
* Released under the MIT License.
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.VueAddToCalendar=e()}(this,function(){"use strict";var t={template:'<a :href="$parent.calendarUrl(calendar)" v-bind:class="`vue-add-to-calendar ${calendar}-calendar`" target="_blank"><slot></slot></a>'},e={google:{url:"http://www.google.com/calendar/event?action=TEMPLATE&trp=false&text=@title&dates=@start/@end&location=@location&details=@details"},microsoft:{url:"http://calendar.live.com/calendar/calendar.aspx?rru=addevent&dtstart=@start&dtend=@end&summary=@title&location=@location"}},a={props:{title:{type:String,default:""},start:{type:Date,default:null},end:{type:Date,default:null},location:{type:String,default:""},details:{type:String,default:""}},data:function(){return{calendars:e}},methods:{calendarUrl:function(t){return this.calendars[t].url.replace(/@title/g,this.title).replace(/@start/g,this.formattedDate(this.start)).replace(/@end/g,this.formattedDate(this.end)).replace(/@location/g,this.location).replace(/@details/g,this.details)},formattedDate:function(t){return t.toISOString().replace(/-|:|\.\d+/g,"")}},mounted:function(){},components:{"google-calendar":{mixins:[t],data:function(){return{calendar:"google"}}},"microsoft-calendar":{mixins:[t],data:function(){return{calendar:"microsoft"}}}}};return a.version="1.0.0",a.install=function(t){t.component("add-to-calendar",a)},"undefined"!=typeof window&&(window.AddToCalendar=a),a});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.VueAddToCalendar=e()}(this,function(){"use strict";var t={template:'<a :href="$parent.calendarUrl(calendar)" v-bind:class="`vue-add-to-calendar ${calendar}-calendar`" target="_blank"><slot></slot></a>'},e={google:{url:"http://www.google.com/calendar/event?action=TEMPLATE&trp=false&text=@title&dates=@start/@end&location=@location&details=@details"},microsoft:{url:"http://calendar.live.com/calendar/calendar.aspx?rru=addevent&dtstart=@start&dtend=@end&summary=@title&location=@location"}},a={props:{title:{type:String,default:""},start:{type:Date,default:null},end:{type:Date,default:null},location:{type:String,default:""},details:{type:String,default:""}},data:function(){return{calendars:e}},methods:{calendarUrl:function(t){return this.calendars[t].url.replace(/@title/g,this.title).replace(/@start/g,this.formattedDate(this.start)).replace(/@end/g,this.formattedDate(this.end)).replace(/@location/g,this.location).replace(/@details/g,this.details)},formattedDate:function(t){return t?t.toISOString().replace(/-|:|\.\d+/g,""):null}},mounted:function(){},components:{"google-calendar":{mixins:[t],data:function(){return{calendar:"google"}}},"microsoft-calendar":{mixins:[t],data:function(){return{calendar:"microsoft"}}}}};return a.version="1.0.1",a.install=function(t){t.component("add-to-calendar",a)},"undefined"!=typeof window&&(window.AddToCalendar=a),a});
{
"name": "vue-add-to-calendar",
"description": "A Vue.js component that provides 'Add to Calendar' functionality",
"version": "1.0.0",
"version": "1.0.1",
"author": {

@@ -6,0 +6,0 @@ "name": "nicolasbeauvais",

# vue-add-to-calendar
[![Release](https://img.shields.io/github/release/nicolasbeauvais/vue-add-to-calendar.svg?style=flat-square)](https://github.com/nicolasbeauvais/vue-add-to-calendar/releases)
[![Build Status](https://travis-ci.org/nicolasbeauvais/vue-add-to-calendar.svg?branch=master)](https://travis-ci.org/nicolasbeauvais/vue-add-to-calendar)
[![Build Status](https://img.shields.io/travis/nicolasbeauvais/vue-add-to-calendar.svg?style=flat-square)](https://travis-ci.org/nicolasbeauvais/vue-add-to-calendar)

@@ -54,3 +55,14 @@ [![Coverage Status](https://img.shields.io/coveralls/nicolasbeauvais/vue-add-to-calendar/master.svg?style=flat-square)](https://coveralls.io/github/nicolasbeauvais/vue-add-to-calendar?branch=master)

```html
<demo></demo>
<add-to-calendar title="VueConf" location="WROCŁAW, POLAND" :start="new Date()"
:end="new Date((new Date).setDate((new Date).getDate() + 1))"
details="The first Official Vue.js Conference in the world!" v-cloak inline-template>
<div>
<google-calendar id="google-calendar">
<i class="fa fa-google"></i> Add to Google calendar
</google-calendar>
<microsoft-calendar id="microsoft-calendar">
<i class="fa fa-windows"></i> Add to Microsoft live calendar
</microsoft-calendar>
</div>
</add-to-calendar>
```

@@ -64,2 +76,7 @@

-------------- | ---------- | --------- | -----------
`title` | String | | Event title
`details` | String | | Event details
`location` | String | | Event location
`start` | Date | | Event start date
`end` | Date | | Event end date

@@ -66,0 +83,0 @@ ## Feature request

@@ -87,3 +87,3 @@ import AddToCalendarMixin from './add-to-calendar-mixin';

formattedDate (date) {
return date.toISOString().replace(/-|:|\.\d+/g, '');
return date ? date.toISOString().replace(/-|:|\.\d+/g, '') : null;
}

@@ -90,0 +90,0 @@ },

import AddToCalendar from './add-to-calendar';
AddToCalendar.version = '1.0.0';
AddToCalendar.version = '1.0.1';

@@ -5,0 +5,0 @@ AddToCalendar.install = (Vue) => {