react-icalendar-link
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -79,2 +79,18 @@ import * as React from 'react'; | ||
body.push("SUMMARY:" + event.title); | ||
event.attendees && event.attendees.forEach(function (attendee) { | ||
var regExp = /^([^<]+)\s*<(.+)>/; | ||
var matches = attendee.match(regExp); | ||
if (matches) { | ||
var name_1 = matches[1]; | ||
var email = matches[2]; | ||
body.push([ | ||
'ATTENDEE', | ||
"CN=" + name_1, | ||
'CUTYPE=INDIVIDUAL', | ||
'PARTSTAT=NEEDS-ACTION', | ||
'ROLE=REQ-PARTICIPANT', | ||
"RSVP=TRUE:mailto:" + email | ||
].join(';')); | ||
} | ||
}); | ||
event.endTime && body.push("DTEND:" + formatDate(event.endTime)); | ||
@@ -81,0 +97,0 @@ event.description && body.push("DESCRIPTION:" + event.description); |
@@ -105,2 +105,18 @@ 'use strict'; | ||
body.push("SUMMARY:" + event.title); | ||
event.attendees && event.attendees.forEach(function (attendee) { | ||
var regExp = /^([^<]+)\s*<(.+)>/; | ||
var matches = attendee.match(regExp); | ||
if (matches) { | ||
var name_1 = matches[1]; | ||
var email = matches[2]; | ||
body.push([ | ||
'ATTENDEE', | ||
"CN=" + name_1, | ||
'CUTYPE=INDIVIDUAL', | ||
'PARTSTAT=NEEDS-ACTION', | ||
'ROLE=REQ-PARTICIPANT', | ||
"RSVP=TRUE:mailto:" + email | ||
].join(';')); | ||
} | ||
}); | ||
event.endTime && body.push("DTEND:" + formatDate(event.endTime)); | ||
@@ -107,0 +123,0 @@ event.description && body.push("DESCRIPTION:" + event.description); |
@@ -7,2 +7,3 @@ export interface ICalEvent { | ||
location?: string; | ||
attendees?: string[]; | ||
url?: string; | ||
@@ -9,0 +10,0 @@ } |
{ | ||
"name": "react-icalendar-link", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "Ability to create link for downloading ics file", | ||
@@ -5,0 +5,0 @@ "author": "josephj", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
61999
406