From 51acf5e64ab326e8ab2f43750377ad90863bc954 Mon Sep 17 00:00:00 2001 From: Barin Britva Date: Sun, 14 Jul 2024 23:30:03 +0700 Subject: [PATCH] Implement reminder feature for `ics` files. --- docs/assets/main.js | 28 ++++----- docs/assets/search.js | 2 +- docs/classes/Event.html | 103 +++++++++++++++++++++---------- docs/classes/Google.html | 10 +-- docs/classes/ICalendar.html | 16 ++--- docs/classes/MultiGenerator.html | 12 ++-- docs/classes/Office365.html | 12 ++-- docs/classes/Outlook.html | 12 ++-- docs/classes/Yahoo.html | 10 +-- docs/index.html | 3 +- docs/modules.html | 7 ++- docs/types/Attendee.html | 5 +- docs/variables/Methods.html | 68 ++++++++++++++++++++ src/Event.ts | 18 ++++++ src/Generator/ICalendar.ts | 37 +++++++++-- tests/event.spec.ts | 7 +++ tests/i-calendar.spec.ts | 3 +- 17 files changed, 259 insertions(+), 94 deletions(-) create mode 100644 docs/variables/Methods.html diff --git a/docs/assets/main.js b/docs/assets/main.js index bd33b82..2654ff9 100644 --- a/docs/assets/main.js +++ b/docs/assets/main.js @@ -126,8 +126,8 @@ return e === t.Set.complete ? t.Set.complete : e === t.Set.empty - ? this - : new t.Set(Object.keys(this.elements).concat(Object.keys(e.elements))); + ? this + : new t.Set(Object.keys(this.elements).concat(Object.keys(e.elements))); }), (t.idf = function (e, n) { var r = 0; @@ -309,8 +309,8 @@ a < u ? (l += 2) : a > u - ? (h += 2) - : a == u && ((n += r[l + 1] * i[h + 1]), (l += 2), (h += 2)); + ? (h += 2) + : a == u && ((n += r[l + 1] * i[h + 1]), (l += 2), (h += 2)); return n; }), (t.Vector.prototype.similarity = function (e) { @@ -409,8 +409,8 @@ x.test(c) ? (c = c + 'e') : O.test(c) - ? ((d = w), (c = c.replace(d, ''))) - : D.test(c) && (c = c + 'e')); + ? ((d = w), (c = c.replace(d, ''))) + : D.test(c) && (c = c + 'e')); } if (((d = H), d.test(c))) { var L = d.exec(c); @@ -1458,8 +1458,8 @@ typeof define == 'function' && define.amd ? define(n) : typeof ce == 'object' - ? (he.exports = n()) - : (e.lunr = n()); + ? (he.exports = n()) + : (e.lunr = n()); })(this, function () { return t; }); @@ -1687,12 +1687,12 @@ s.key == 'Enter' ? Ve(e, n) : s.key == 'Escape' - ? n.blur() - : s.key == 'ArrowUp' - ? pe(e, -1) - : s.key === 'ArrowDown' - ? pe(e, 1) - : (i = !1); + ? n.blur() + : s.key == 'ArrowUp' + ? pe(e, -1) + : s.key === 'ArrowDown' + ? pe(e, 1) + : (i = !1); }), n.addEventListener('keypress', (s) => { i && s.preventDefault(); diff --git a/docs/assets/search.js b/docs/assets/search.js index 67a95d9..adb90d9 100644 --- a/docs/assets/search.js +++ b/docs/assets/search.js @@ -1,3 +1,3 @@ window.searchData = JSON.parse( - '{"kinds":{"128":"Class","512":"Constructor","1024":"Property","2048":"Method","262144":"Accessor","4194304":"Type alias"},"rows":[{"kind":128,"name":"Event","url":"classes/Event.html","classes":"tsd-kind-class"},{"kind":512,"name":"constructor","url":"classes/Event.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"Event"},{"kind":1024,"name":"_startDate","url":"classes/Event.html#_startDate","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"Event"},{"kind":1024,"name":"_endDate","url":"classes/Event.html#_endDate","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"Event"},{"kind":1024,"name":"duration","url":"classes/Event.html#duration","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"Event"},{"kind":1024,"name":"_attendees","url":"classes/Event.html#_attendees","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"Event"},{"kind":1024,"name":"title","url":"classes/Event.html#title","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Event"},{"kind":1024,"name":"description","url":"classes/Event.html#description","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Event"},{"kind":1024,"name":"location","url":"classes/Event.html#location","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Event"},{"kind":1024,"name":"uid","url":"classes/Event.html#uid","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Event"},{"kind":262144,"name":"startDate","url":"classes/Event.html#startDate","classes":"tsd-kind-accessor tsd-parent-kind-class","parent":"Event"},{"kind":262144,"name":"endDate","url":"classes/Event.html#endDate","classes":"tsd-kind-accessor tsd-parent-kind-class","parent":"Event"},{"kind":262144,"name":"locationName","url":"classes/Event.html#locationName","classes":"tsd-kind-accessor tsd-parent-kind-class","parent":"Event"},{"kind":262144,"name":"locationCoordinates","url":"classes/Event.html#locationCoordinates","classes":"tsd-kind-accessor tsd-parent-kind-class","parent":"Event"},{"kind":262144,"name":"attendees","url":"classes/Event.html#attendees","classes":"tsd-kind-accessor tsd-parent-kind-class","parent":"Event"},{"kind":2048,"name":"reschedule","url":"classes/Event.html#reschedule","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Event"},{"kind":2048,"name":"isAllDayEvent","url":"classes/Event.html#isAllDayEvent","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Event"},{"kind":2048,"name":"getStartDateAsString","url":"classes/Event.html#getStartDateAsString","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Event"},{"kind":2048,"name":"getEndDateAsString","url":"classes/Event.html#getEndDateAsString","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Event"},{"kind":2048,"name":"changeTitle","url":"classes/Event.html#changeTitle","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Event"},{"kind":2048,"name":"changeDescription","url":"classes/Event.html#changeDescription","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Event"},{"kind":2048,"name":"changeLocation","url":"classes/Event.html#changeLocation","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Event"},{"kind":2048,"name":"addAttendees","url":"classes/Event.html#addAttendees","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Event"},{"kind":2048,"name":"clearAttendees","url":"classes/Event.html#clearAttendees","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Event"},{"kind":2048,"name":"hasAttendees","url":"classes/Event.html#hasAttendees","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Event"},{"kind":2048,"name":"changeUid","url":"classes/Event.html#changeUid","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Event"},{"kind":2048,"name":"getNextDayAfterStartDate","url":"classes/Event.html#getNextDayAfterStartDate","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-private","parent":"Event"},{"kind":2048,"name":"setEndDate","url":"classes/Event.html#setEndDate","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-private","parent":"Event"},{"kind":2048,"name":"assertDatesAreCorrect","url":"classes/Event.html#assertDatesAreCorrect","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-private","parent":"Event"},{"kind":2048,"name":"getDateAsString","url":"classes/Event.html#getDateAsString","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-private","parent":"Event"},{"kind":2048,"name":"handleDurationInput","url":"classes/Event.html#handleDurationInput","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-private","parent":"Event"},{"kind":4194304,"name":"Attendee","url":"types/Attendee.html","classes":"tsd-kind-type-alias"},{"kind":128,"name":"Outlook","url":"classes/Outlook.html","classes":"tsd-kind-class"},{"kind":512,"name":"constructor","url":"classes/Outlook.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited","parent":"Outlook"},{"kind":1024,"name":"urlBase","url":"classes/Outlook.html#urlBase","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"Outlook"},{"kind":2048,"name":"convertEventToQueryObject","url":"classes/Outlook.html#convertEventToQueryObject","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"Outlook"},{"kind":2048,"name":"createLink","url":"classes/Outlook.html#createLink","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited","parent":"Outlook"},{"kind":2048,"name":"convertAttendeesToString","url":"classes/Outlook.html#convertAttendeesToString","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-inherited","parent":"Outlook"},{"kind":128,"name":"Office365","url":"classes/Office365.html","classes":"tsd-kind-class"},{"kind":512,"name":"constructor","url":"classes/Office365.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited","parent":"Office365"},{"kind":1024,"name":"urlBase","url":"classes/Office365.html#urlBase","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"Office365"},{"kind":2048,"name":"convertEventToQueryObject","url":"classes/Office365.html#convertEventToQueryObject","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-inherited","parent":"Office365"},{"kind":2048,"name":"createLink","url":"classes/Office365.html#createLink","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited","parent":"Office365"},{"kind":2048,"name":"convertAttendeesToString","url":"classes/Office365.html#convertAttendeesToString","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-inherited","parent":"Office365"},{"kind":128,"name":"Google","url":"classes/Google.html","classes":"tsd-kind-class"},{"kind":512,"name":"constructor","url":"classes/Google.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited","parent":"Google"},{"kind":1024,"name":"urlBase","url":"classes/Google.html#urlBase","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"Google"},{"kind":2048,"name":"convertEventToQueryObject","url":"classes/Google.html#convertEventToQueryObject","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"Google"},{"kind":2048,"name":"createLink","url":"classes/Google.html#createLink","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited","parent":"Google"},{"kind":2048,"name":"convertAttendeesToString","url":"classes/Google.html#convertAttendeesToString","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-inherited","parent":"Google"},{"kind":128,"name":"Yahoo","url":"classes/Yahoo.html","classes":"tsd-kind-class"},{"kind":512,"name":"constructor","url":"classes/Yahoo.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited","parent":"Yahoo"},{"kind":1024,"name":"urlBase","url":"classes/Yahoo.html#urlBase","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"Yahoo"},{"kind":2048,"name":"convertEventToQueryObject","url":"classes/Yahoo.html#convertEventToQueryObject","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"Yahoo"},{"kind":2048,"name":"createLink","url":"classes/Yahoo.html#createLink","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited","parent":"Yahoo"},{"kind":2048,"name":"convertAttendeesToString","url":"classes/Yahoo.html#convertAttendeesToString","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-inherited","parent":"Yahoo"},{"kind":128,"name":"ICalendar","url":"classes/ICalendar.html","classes":"tsd-kind-class"},{"kind":512,"name":"constructor","url":"classes/ICalendar.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"ICalendar"},{"kind":1024,"name":"invitationMeta","url":"classes/ICalendar.html#invitationMeta","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"ICalendar"},{"kind":2048,"name":"configure","url":"classes/ICalendar.html#configure","classes":"tsd-kind-method tsd-parent-kind-class","parent":"ICalendar"},{"kind":2048,"name":"createLink","url":"classes/ICalendar.html#createLink","classes":"tsd-kind-method tsd-parent-kind-class","parent":"ICalendar"},{"kind":2048,"name":"createFile","url":"classes/ICalendar.html#createFile","classes":"tsd-kind-method tsd-parent-kind-class","parent":"ICalendar"},{"kind":2048,"name":"convertEventToData","url":"classes/ICalendar.html#convertEventToData","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-private","parent":"ICalendar"},{"kind":2048,"name":"escapeSpecialChars","url":"classes/ICalendar.html#escapeSpecialChars","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-private","parent":"ICalendar"},{"kind":2048,"name":"dataPiecesToContent","url":"classes/ICalendar.html#dataPiecesToContent","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-private","parent":"ICalendar"},{"kind":128,"name":"MultiGenerator","url":"classes/MultiGenerator.html","classes":"tsd-kind-class"},{"kind":512,"name":"constructor","url":"classes/MultiGenerator.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"MultiGenerator"},{"kind":1024,"name":"generators","url":"classes/MultiGenerator.html#generators","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"MultiGenerator"},{"kind":2048,"name":"createLinks","url":"classes/MultiGenerator.html#createLinks","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGenerator"}],"index":{"version":"2.3.9","fields":["name","comment"],"fieldVectors":[["name/0",[0,38.43]],["comment/0",[]],["name/1",[1,22.336]],["comment/1",[]],["name/2",[2,38.43]],["comment/2",[]],["name/3",[3,38.43]],["comment/3",[]],["name/4",[4,38.43]],["comment/4",[]],["name/5",[5,38.43]],["comment/5",[]],["name/6",[6,38.43]],["comment/6",[]],["name/7",[7,38.43]],["comment/7",[]],["name/8",[8,38.43]],["comment/8",[]],["name/9",[9,38.43]],["comment/9",[]],["name/10",[10,38.43]],["comment/10",[]],["name/11",[11,38.43]],["comment/11",[]],["name/12",[12,38.43]],["comment/12",[]],["name/13",[13,38.43]],["comment/13",[]],["name/14",[14,38.43]],["comment/14",[]],["name/15",[15,38.43]],["comment/15",[]],["name/16",[16,38.43]],["comment/16",[]],["name/17",[17,38.43]],["comment/17",[]],["name/18",[18,38.43]],["comment/18",[]],["name/19",[19,38.43]],["comment/19",[]],["name/20",[20,38.43]],["comment/20",[]],["name/21",[21,38.43]],["comment/21",[]],["name/22",[22,38.43]],["comment/22",[]],["name/23",[23,38.43]],["comment/23",[]],["name/24",[24,38.43]],["comment/24",[]],["name/25",[25,38.43]],["comment/25",[]],["name/26",[26,38.43]],["comment/26",[]],["name/27",[27,38.43]],["comment/27",[]],["name/28",[28,38.43]],["comment/28",[]],["name/29",[29,38.43]],["comment/29",[]],["name/30",[30,38.43]],["comment/30",[]],["name/31",[31,38.43]],["comment/31",[]],["name/32",[32,38.43]],["comment/32",[]],["name/33",[1,22.336]],["comment/33",[]],["name/34",[33,27.444]],["comment/34",[]],["name/35",[34,27.444]],["comment/35",[]],["name/36",[35,25.437]],["comment/36",[]],["name/37",[36,27.444]],["comment/37",[]],["name/38",[37,38.43]],["comment/38",[]],["name/39",[1,22.336]],["comment/39",[]],["name/40",[33,27.444]],["comment/40",[]],["name/41",[34,27.444]],["comment/41",[]],["name/42",[35,25.437]],["comment/42",[]],["name/43",[36,27.444]],["comment/43",[]],["name/44",[38,38.43]],["comment/44",[]],["name/45",[1,22.336]],["comment/45",[]],["name/46",[33,27.444]],["comment/46",[]],["name/47",[34,27.444]],["comment/47",[]],["name/48",[35,25.437]],["comment/48",[]],["name/49",[36,27.444]],["comment/49",[]],["name/50",[39,38.43]],["comment/50",[]],["name/51",[1,22.336]],["comment/51",[]],["name/52",[33,27.444]],["comment/52",[]],["name/53",[34,27.444]],["comment/53",[]],["name/54",[35,25.437]],["comment/54",[]],["name/55",[36,27.444]],["comment/55",[]],["name/56",[40,38.43]],["comment/56",[]],["name/57",[1,22.336]],["comment/57",[]],["name/58",[41,38.43]],["comment/58",[]],["name/59",[42,38.43]],["comment/59",[]],["name/60",[35,25.437]],["comment/60",[]],["name/61",[43,38.43]],["comment/61",[]],["name/62",[44,38.43]],["comment/62",[]],["name/63",[45,38.43]],["comment/63",[]],["name/64",[46,38.43]],["comment/64",[]],["name/65",[47,38.43]],["comment/65",[]],["name/66",[1,22.336]],["comment/66",[]],["name/67",[48,38.43]],["comment/67",[]],["name/68",[49,38.43]],["comment/68",[]]],"invertedIndex":[["_attendees",{"_index":5,"name":{"5":{}},"comment":{}}],["_enddate",{"_index":3,"name":{"3":{}},"comment":{}}],["_startdate",{"_index":2,"name":{"2":{}},"comment":{}}],["addattendees",{"_index":22,"name":{"22":{}},"comment":{}}],["assertdatesarecorrect",{"_index":28,"name":{"28":{}},"comment":{}}],["attendee",{"_index":31,"name":{"31":{}},"comment":{}}],["attendees",{"_index":14,"name":{"14":{}},"comment":{}}],["changedescription",{"_index":20,"name":{"20":{}},"comment":{}}],["changelocation",{"_index":21,"name":{"21":{}},"comment":{}}],["changetitle",{"_index":19,"name":{"19":{}},"comment":{}}],["changeuid",{"_index":25,"name":{"25":{}},"comment":{}}],["clearattendees",{"_index":23,"name":{"23":{}},"comment":{}}],["configure",{"_index":42,"name":{"59":{}},"comment":{}}],["constructor",{"_index":1,"name":{"1":{},"33":{},"39":{},"45":{},"51":{},"57":{},"66":{}},"comment":{}}],["convertattendeestostring",{"_index":36,"name":{"37":{},"43":{},"49":{},"55":{}},"comment":{}}],["converteventtodata",{"_index":44,"name":{"62":{}},"comment":{}}],["converteventtoqueryobject",{"_index":34,"name":{"35":{},"41":{},"47":{},"53":{}},"comment":{}}],["createfile",{"_index":43,"name":{"61":{}},"comment":{}}],["createlink",{"_index":35,"name":{"36":{},"42":{},"48":{},"54":{},"60":{}},"comment":{}}],["createlinks",{"_index":49,"name":{"68":{}},"comment":{}}],["datapiecestocontent",{"_index":46,"name":{"64":{}},"comment":{}}],["description",{"_index":7,"name":{"7":{}},"comment":{}}],["duration",{"_index":4,"name":{"4":{}},"comment":{}}],["enddate",{"_index":11,"name":{"11":{}},"comment":{}}],["escapespecialchars",{"_index":45,"name":{"63":{}},"comment":{}}],["event",{"_index":0,"name":{"0":{}},"comment":{}}],["generators",{"_index":48,"name":{"67":{}},"comment":{}}],["getdateasstring",{"_index":29,"name":{"29":{}},"comment":{}}],["getenddateasstring",{"_index":18,"name":{"18":{}},"comment":{}}],["getnextdayafterstartdate",{"_index":26,"name":{"26":{}},"comment":{}}],["getstartdateasstring",{"_index":17,"name":{"17":{}},"comment":{}}],["google",{"_index":38,"name":{"44":{}},"comment":{}}],["handledurationinput",{"_index":30,"name":{"30":{}},"comment":{}}],["hasattendees",{"_index":24,"name":{"24":{}},"comment":{}}],["icalendar",{"_index":40,"name":{"56":{}},"comment":{}}],["invitationmeta",{"_index":41,"name":{"58":{}},"comment":{}}],["isalldayevent",{"_index":16,"name":{"16":{}},"comment":{}}],["location",{"_index":8,"name":{"8":{}},"comment":{}}],["locationcoordinates",{"_index":13,"name":{"13":{}},"comment":{}}],["locationname",{"_index":12,"name":{"12":{}},"comment":{}}],["multigenerator",{"_index":47,"name":{"65":{}},"comment":{}}],["office365",{"_index":37,"name":{"38":{}},"comment":{}}],["outlook",{"_index":32,"name":{"32":{}},"comment":{}}],["reschedule",{"_index":15,"name":{"15":{}},"comment":{}}],["setenddate",{"_index":27,"name":{"27":{}},"comment":{}}],["startdate",{"_index":10,"name":{"10":{}},"comment":{}}],["title",{"_index":6,"name":{"6":{}},"comment":{}}],["uid",{"_index":9,"name":{"9":{}},"comment":{}}],["urlbase",{"_index":33,"name":{"34":{},"40":{},"46":{},"52":{}},"comment":{}}],["yahoo",{"_index":39,"name":{"50":{}},"comment":{}}]],"pipeline":[]}}' + '{"kinds":{"32":"Variable","128":"Class","512":"Constructor","1024":"Property","2048":"Method","65536":"Type literal","262144":"Accessor","4194304":"Type alias"},"rows":[{"kind":128,"name":"Event","url":"classes/Event.html","classes":"tsd-kind-class"},{"kind":512,"name":"constructor","url":"classes/Event.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"Event"},{"kind":1024,"name":"_startDate","url":"classes/Event.html#_startDate","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"Event"},{"kind":1024,"name":"_endDate","url":"classes/Event.html#_endDate","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"Event"},{"kind":1024,"name":"duration","url":"classes/Event.html#duration","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"Event"},{"kind":1024,"name":"_attendees","url":"classes/Event.html#_attendees","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"Event"},{"kind":1024,"name":"_reminderInMinuets","url":"classes/Event.html#_reminderInMinuets","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"Event"},{"kind":1024,"name":"title","url":"classes/Event.html#title","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Event"},{"kind":1024,"name":"description","url":"classes/Event.html#description","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Event"},{"kind":1024,"name":"location","url":"classes/Event.html#location","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Event"},{"kind":1024,"name":"uid","url":"classes/Event.html#uid","classes":"tsd-kind-property tsd-parent-kind-class","parent":"Event"},{"kind":262144,"name":"startDate","url":"classes/Event.html#startDate","classes":"tsd-kind-accessor tsd-parent-kind-class","parent":"Event"},{"kind":262144,"name":"endDate","url":"classes/Event.html#endDate","classes":"tsd-kind-accessor tsd-parent-kind-class","parent":"Event"},{"kind":262144,"name":"locationName","url":"classes/Event.html#locationName","classes":"tsd-kind-accessor tsd-parent-kind-class","parent":"Event"},{"kind":262144,"name":"locationCoordinates","url":"classes/Event.html#locationCoordinates","classes":"tsd-kind-accessor tsd-parent-kind-class","parent":"Event"},{"kind":262144,"name":"attendees","url":"classes/Event.html#attendees","classes":"tsd-kind-accessor tsd-parent-kind-class","parent":"Event"},{"kind":262144,"name":"reminder","url":"classes/Event.html#reminder","classes":"tsd-kind-accessor tsd-parent-kind-class","parent":"Event"},{"kind":2048,"name":"reschedule","url":"classes/Event.html#reschedule","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Event"},{"kind":2048,"name":"isAllDayEvent","url":"classes/Event.html#isAllDayEvent","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Event"},{"kind":2048,"name":"getStartDateAsString","url":"classes/Event.html#getStartDateAsString","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Event"},{"kind":2048,"name":"getEndDateAsString","url":"classes/Event.html#getEndDateAsString","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Event"},{"kind":2048,"name":"changeTitle","url":"classes/Event.html#changeTitle","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Event"},{"kind":2048,"name":"changeDescription","url":"classes/Event.html#changeDescription","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Event"},{"kind":2048,"name":"changeLocation","url":"classes/Event.html#changeLocation","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Event"},{"kind":2048,"name":"addAttendees","url":"classes/Event.html#addAttendees","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Event"},{"kind":2048,"name":"clearAttendees","url":"classes/Event.html#clearAttendees","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Event"},{"kind":2048,"name":"hasAttendees","url":"classes/Event.html#hasAttendees","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Event"},{"kind":2048,"name":"changeUid","url":"classes/Event.html#changeUid","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Event"},{"kind":2048,"name":"setReminder","url":"classes/Event.html#setReminder","classes":"tsd-kind-method tsd-parent-kind-class","parent":"Event"},{"kind":2048,"name":"getNextDayAfterStartDate","url":"classes/Event.html#getNextDayAfterStartDate","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-private","parent":"Event"},{"kind":2048,"name":"setEndDate","url":"classes/Event.html#setEndDate","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-private","parent":"Event"},{"kind":2048,"name":"assertDatesAreCorrect","url":"classes/Event.html#assertDatesAreCorrect","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-private","parent":"Event"},{"kind":2048,"name":"getDateAsString","url":"classes/Event.html#getDateAsString","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-private","parent":"Event"},{"kind":2048,"name":"handleDurationInput","url":"classes/Event.html#handleDurationInput","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-private","parent":"Event"},{"kind":4194304,"name":"Attendee","url":"types/Attendee.html","classes":"tsd-kind-type-alias"},{"kind":128,"name":"Outlook","url":"classes/Outlook.html","classes":"tsd-kind-class"},{"kind":512,"name":"constructor","url":"classes/Outlook.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited","parent":"Outlook"},{"kind":1024,"name":"urlBase","url":"classes/Outlook.html#urlBase","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"Outlook"},{"kind":2048,"name":"convertEventToQueryObject","url":"classes/Outlook.html#convertEventToQueryObject","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"Outlook"},{"kind":2048,"name":"createLink","url":"classes/Outlook.html#createLink","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited","parent":"Outlook"},{"kind":2048,"name":"convertAttendeesToString","url":"classes/Outlook.html#convertAttendeesToString","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-inherited","parent":"Outlook"},{"kind":128,"name":"Office365","url":"classes/Office365.html","classes":"tsd-kind-class"},{"kind":512,"name":"constructor","url":"classes/Office365.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited","parent":"Office365"},{"kind":1024,"name":"urlBase","url":"classes/Office365.html#urlBase","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"Office365"},{"kind":2048,"name":"convertEventToQueryObject","url":"classes/Office365.html#convertEventToQueryObject","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-inherited","parent":"Office365"},{"kind":2048,"name":"createLink","url":"classes/Office365.html#createLink","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited","parent":"Office365"},{"kind":2048,"name":"convertAttendeesToString","url":"classes/Office365.html#convertAttendeesToString","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-inherited","parent":"Office365"},{"kind":128,"name":"Google","url":"classes/Google.html","classes":"tsd-kind-class"},{"kind":512,"name":"constructor","url":"classes/Google.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited","parent":"Google"},{"kind":1024,"name":"urlBase","url":"classes/Google.html#urlBase","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"Google"},{"kind":2048,"name":"convertEventToQueryObject","url":"classes/Google.html#convertEventToQueryObject","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"Google"},{"kind":2048,"name":"createLink","url":"classes/Google.html#createLink","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited","parent":"Google"},{"kind":2048,"name":"convertAttendeesToString","url":"classes/Google.html#convertAttendeesToString","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-inherited","parent":"Google"},{"kind":128,"name":"Yahoo","url":"classes/Yahoo.html","classes":"tsd-kind-class"},{"kind":512,"name":"constructor","url":"classes/Yahoo.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited","parent":"Yahoo"},{"kind":1024,"name":"urlBase","url":"classes/Yahoo.html#urlBase","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"Yahoo"},{"kind":2048,"name":"convertEventToQueryObject","url":"classes/Yahoo.html#convertEventToQueryObject","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"Yahoo"},{"kind":2048,"name":"createLink","url":"classes/Yahoo.html#createLink","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited","parent":"Yahoo"},{"kind":2048,"name":"convertAttendeesToString","url":"classes/Yahoo.html#convertAttendeesToString","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected tsd-is-inherited","parent":"Yahoo"},{"kind":128,"name":"ICalendar","url":"classes/ICalendar.html","classes":"tsd-kind-class"},{"kind":512,"name":"constructor","url":"classes/ICalendar.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"ICalendar"},{"kind":1024,"name":"invitationMeta","url":"classes/ICalendar.html#invitationMeta","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"ICalendar"},{"kind":2048,"name":"configure","url":"classes/ICalendar.html#configure","classes":"tsd-kind-method tsd-parent-kind-class","parent":"ICalendar"},{"kind":2048,"name":"createLink","url":"classes/ICalendar.html#createLink","classes":"tsd-kind-method tsd-parent-kind-class","parent":"ICalendar"},{"kind":2048,"name":"createFile","url":"classes/ICalendar.html#createFile","classes":"tsd-kind-method tsd-parent-kind-class","parent":"ICalendar"},{"kind":2048,"name":"convertEventToData","url":"classes/ICalendar.html#convertEventToData","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-private","parent":"ICalendar"},{"kind":2048,"name":"escapeSpecialChars","url":"classes/ICalendar.html#escapeSpecialChars","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-private","parent":"ICalendar"},{"kind":2048,"name":"dataPiecesToContent","url":"classes/ICalendar.html#dataPiecesToContent","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-private","parent":"ICalendar"},{"kind":32,"name":"Methods","url":"variables/Methods.html","classes":"tsd-kind-variable"},{"kind":65536,"name":"__type","url":"variables/Methods.html#__type","classes":"tsd-kind-type-literal tsd-parent-kind-variable","parent":"Methods"},{"kind":1024,"name":"Publish","url":"variables/Methods.html#__type.Publish","classes":"tsd-kind-property tsd-parent-kind-type-literal","parent":"Methods.__type"},{"kind":1024,"name":"Request","url":"variables/Methods.html#__type.Request","classes":"tsd-kind-property tsd-parent-kind-type-literal","parent":"Methods.__type"},{"kind":1024,"name":"Reply","url":"variables/Methods.html#__type.Reply","classes":"tsd-kind-property tsd-parent-kind-type-literal","parent":"Methods.__type"},{"kind":1024,"name":"Add","url":"variables/Methods.html#__type.Add","classes":"tsd-kind-property tsd-parent-kind-type-literal","parent":"Methods.__type"},{"kind":1024,"name":"Cancel","url":"variables/Methods.html#__type.Cancel","classes":"tsd-kind-property tsd-parent-kind-type-literal","parent":"Methods.__type"},{"kind":128,"name":"MultiGenerator","url":"classes/MultiGenerator.html","classes":"tsd-kind-class"},{"kind":512,"name":"constructor","url":"classes/MultiGenerator.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"MultiGenerator"},{"kind":1024,"name":"generators","url":"classes/MultiGenerator.html#generators","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"MultiGenerator"},{"kind":2048,"name":"createLinks","url":"classes/MultiGenerator.html#createLinks","classes":"tsd-kind-method tsd-parent-kind-class","parent":"MultiGenerator"}],"index":{"version":"2.3.9","fields":["name","comment"],"fieldVectors":[["name/0",[0,39.766]],["comment/0",[]],["name/1",[1,23.671]],["comment/1",[]],["name/2",[2,39.766]],["comment/2",[]],["name/3",[3,39.766]],["comment/3",[]],["name/4",[4,39.766]],["comment/4",[]],["name/5",[5,39.766]],["comment/5",[]],["name/6",[6,39.766]],["comment/6",[]],["name/7",[7,39.766]],["comment/7",[]],["name/8",[8,39.766]],["comment/8",[]],["name/9",[9,39.766]],["comment/9",[]],["name/10",[10,39.766]],["comment/10",[]],["name/11",[11,39.766]],["comment/11",[]],["name/12",[12,39.766]],["comment/12",[]],["name/13",[13,39.766]],["comment/13",[]],["name/14",[14,39.766]],["comment/14",[]],["name/15",[15,39.766]],["comment/15",[]],["name/16",[16,39.766]],["comment/16",[]],["name/17",[17,39.766]],["comment/17",[]],["name/18",[18,39.766]],["comment/18",[]],["name/19",[19,39.766]],["comment/19",[]],["name/20",[20,39.766]],["comment/20",[]],["name/21",[21,39.766]],["comment/21",[]],["name/22",[22,39.766]],["comment/22",[]],["name/23",[23,39.766]],["comment/23",[]],["name/24",[24,39.766]],["comment/24",[]],["name/25",[25,39.766]],["comment/25",[]],["name/26",[26,39.766]],["comment/26",[]],["name/27",[27,39.766]],["comment/27",[]],["name/28",[28,39.766]],["comment/28",[]],["name/29",[29,39.766]],["comment/29",[]],["name/30",[30,39.766]],["comment/30",[]],["name/31",[31,39.766]],["comment/31",[]],["name/32",[32,39.766]],["comment/32",[]],["name/33",[33,39.766]],["comment/33",[]],["name/34",[34,39.766]],["comment/34",[]],["name/35",[35,39.766]],["comment/35",[]],["name/36",[1,23.671]],["comment/36",[]],["name/37",[36,28.779]],["comment/37",[]],["name/38",[37,28.779]],["comment/38",[]],["name/39",[38,26.773]],["comment/39",[]],["name/40",[39,28.779]],["comment/40",[]],["name/41",[40,39.766]],["comment/41",[]],["name/42",[1,23.671]],["comment/42",[]],["name/43",[36,28.779]],["comment/43",[]],["name/44",[37,28.779]],["comment/44",[]],["name/45",[38,26.773]],["comment/45",[]],["name/46",[39,28.779]],["comment/46",[]],["name/47",[41,39.766]],["comment/47",[]],["name/48",[1,23.671]],["comment/48",[]],["name/49",[36,28.779]],["comment/49",[]],["name/50",[37,28.779]],["comment/50",[]],["name/51",[38,26.773]],["comment/51",[]],["name/52",[39,28.779]],["comment/52",[]],["name/53",[42,39.766]],["comment/53",[]],["name/54",[1,23.671]],["comment/54",[]],["name/55",[36,28.779]],["comment/55",[]],["name/56",[37,28.779]],["comment/56",[]],["name/57",[38,26.773]],["comment/57",[]],["name/58",[39,28.779]],["comment/58",[]],["name/59",[43,39.766]],["comment/59",[]],["name/60",[1,23.671]],["comment/60",[]],["name/61",[44,39.766]],["comment/61",[]],["name/62",[45,39.766]],["comment/62",[]],["name/63",[38,26.773]],["comment/63",[]],["name/64",[46,39.766]],["comment/64",[]],["name/65",[47,39.766]],["comment/65",[]],["name/66",[48,39.766]],["comment/66",[]],["name/67",[49,39.766]],["comment/67",[]],["name/68",[50,39.766]],["comment/68",[]],["name/69",[51,39.766]],["comment/69",[]],["name/70",[52,39.766]],["comment/70",[]],["name/71",[53,39.766]],["comment/71",[]],["name/72",[54,39.766]],["comment/72",[]],["name/73",[55,39.766]],["comment/73",[]],["name/74",[56,39.766]],["comment/74",[]],["name/75",[57,39.766]],["comment/75",[]],["name/76",[1,23.671]],["comment/76",[]],["name/77",[58,39.766]],["comment/77",[]],["name/78",[59,39.766]],["comment/78",[]]],"invertedIndex":[["__type",{"_index":51,"name":{"69":{}},"comment":{}}],["_attendees",{"_index":5,"name":{"5":{}},"comment":{}}],["_enddate",{"_index":3,"name":{"3":{}},"comment":{}}],["_reminderinminuets",{"_index":6,"name":{"6":{}},"comment":{}}],["_startdate",{"_index":2,"name":{"2":{}},"comment":{}}],["add",{"_index":55,"name":{"73":{}},"comment":{}}],["addattendees",{"_index":24,"name":{"24":{}},"comment":{}}],["assertdatesarecorrect",{"_index":31,"name":{"31":{}},"comment":{}}],["attendee",{"_index":34,"name":{"34":{}},"comment":{}}],["attendees",{"_index":15,"name":{"15":{}},"comment":{}}],["cancel",{"_index":56,"name":{"74":{}},"comment":{}}],["changedescription",{"_index":22,"name":{"22":{}},"comment":{}}],["changelocation",{"_index":23,"name":{"23":{}},"comment":{}}],["changetitle",{"_index":21,"name":{"21":{}},"comment":{}}],["changeuid",{"_index":27,"name":{"27":{}},"comment":{}}],["clearattendees",{"_index":25,"name":{"25":{}},"comment":{}}],["configure",{"_index":45,"name":{"62":{}},"comment":{}}],["constructor",{"_index":1,"name":{"1":{},"36":{},"42":{},"48":{},"54":{},"60":{},"76":{}},"comment":{}}],["convertattendeestostring",{"_index":39,"name":{"40":{},"46":{},"52":{},"58":{}},"comment":{}}],["converteventtodata",{"_index":47,"name":{"65":{}},"comment":{}}],["converteventtoqueryobject",{"_index":37,"name":{"38":{},"44":{},"50":{},"56":{}},"comment":{}}],["createfile",{"_index":46,"name":{"64":{}},"comment":{}}],["createlink",{"_index":38,"name":{"39":{},"45":{},"51":{},"57":{},"63":{}},"comment":{}}],["createlinks",{"_index":59,"name":{"78":{}},"comment":{}}],["datapiecestocontent",{"_index":49,"name":{"67":{}},"comment":{}}],["description",{"_index":8,"name":{"8":{}},"comment":{}}],["duration",{"_index":4,"name":{"4":{}},"comment":{}}],["enddate",{"_index":12,"name":{"12":{}},"comment":{}}],["escapespecialchars",{"_index":48,"name":{"66":{}},"comment":{}}],["event",{"_index":0,"name":{"0":{}},"comment":{}}],["generators",{"_index":58,"name":{"77":{}},"comment":{}}],["getdateasstring",{"_index":32,"name":{"32":{}},"comment":{}}],["getenddateasstring",{"_index":20,"name":{"20":{}},"comment":{}}],["getnextdayafterstartdate",{"_index":29,"name":{"29":{}},"comment":{}}],["getstartdateasstring",{"_index":19,"name":{"19":{}},"comment":{}}],["google",{"_index":41,"name":{"47":{}},"comment":{}}],["handledurationinput",{"_index":33,"name":{"33":{}},"comment":{}}],["hasattendees",{"_index":26,"name":{"26":{}},"comment":{}}],["icalendar",{"_index":43,"name":{"59":{}},"comment":{}}],["invitationmeta",{"_index":44,"name":{"61":{}},"comment":{}}],["isalldayevent",{"_index":18,"name":{"18":{}},"comment":{}}],["location",{"_index":9,"name":{"9":{}},"comment":{}}],["locationcoordinates",{"_index":14,"name":{"14":{}},"comment":{}}],["locationname",{"_index":13,"name":{"13":{}},"comment":{}}],["methods",{"_index":50,"name":{"68":{}},"comment":{}}],["multigenerator",{"_index":57,"name":{"75":{}},"comment":{}}],["office365",{"_index":40,"name":{"41":{}},"comment":{}}],["outlook",{"_index":35,"name":{"35":{}},"comment":{}}],["publish",{"_index":52,"name":{"70":{}},"comment":{}}],["reminder",{"_index":16,"name":{"16":{}},"comment":{}}],["reply",{"_index":54,"name":{"72":{}},"comment":{}}],["request",{"_index":53,"name":{"71":{}},"comment":{}}],["reschedule",{"_index":17,"name":{"17":{}},"comment":{}}],["setenddate",{"_index":30,"name":{"30":{}},"comment":{}}],["setreminder",{"_index":28,"name":{"28":{}},"comment":{}}],["startdate",{"_index":11,"name":{"11":{}},"comment":{}}],["title",{"_index":7,"name":{"7":{}},"comment":{}}],["uid",{"_index":10,"name":{"10":{}},"comment":{}}],["urlbase",{"_index":36,"name":{"37":{},"43":{},"49":{},"55":{}},"comment":{}}],["yahoo",{"_index":42,"name":{"53":{}},"comment":{}}]],"pipeline":[]}}' ); diff --git a/docs/classes/Event.html b/docs/classes/Event.html index 8a948a9..ef5abc8 100644 --- a/docs/classes/Event.html +++ b/docs/classes/Event.html @@ -24,7 +24,7 @@

Hierarchy

+
  • Defined in Event.ts:10
  • @@ -38,6 +38,7 @@

    Constructors

    Properties

    @@ -71,6 +73,7 @@

    Methods

    isAllDayEvent reschedule setEndDate +setReminder

    Constructors

    @@ -112,57 +115,62 @@
    Optional uid: Returns Event
    +
  • Defined in Event.ts:26
  • Properties

    _attendees: Attendee[]
    +
  • Defined in Event.ts:14
  • _endDate: null | Date = null
    +
  • Defined in Event.ts:12
  • +
    + +
    _reminderInMinuets: null | number = null
    _startDate: Date
    +
  • Defined in Event.ts:11
  • description?: string

    Details about the event.

    +
  • Defined in Event.ts:30
  • duration: null | number = null
    +
  • Defined in Event.ts:13
  • location?: Location

    Place of the event. Place name are required, geo coordinates are optional.

    +
  • Defined in Event.ts:31
  • title: string

    Event title.

    +
  • Defined in Event.ts:27
  • uid?: string

    Unique identifier of the event. Applicable only to ics files. Gives possibility to update the event invitation in the future by follow up email. If not provided, it will be generated automatically.

    +
  • Defined in Event.ts:33
  • Accessors

    @@ -172,7 +180,7 @@
    +
  • Defined in Event.ts:69
  • +
  • Defined in Event.ts:49
  • +
  • Defined in Event.ts:61
  • +
  • Defined in Event.ts:53
  • +
    + +
    +
  • Defined in Event.ts:45
  • Methods

    @@ -219,7 +235,7 @@

    Parameters

    Rest ...attendees: Attendee[]

    Returns Event

    +
  • Defined in Event.ts:147
  • +
  • Defined in Event.ts:201
  • Returns Event

    +
  • Defined in Event.ts:137
  • Returns Event

    +
  • Defined in Event.ts:142
  • Returns Event

    +
  • Defined in Event.ts:132
  • Returns Event

    +
  • Defined in Event.ts:161
  • +
  • Defined in Event.ts:152
  • Returns string

    +
  • Defined in Event.ts:215
  • +
  • Defined in Event.ts:128
  • +
  • Defined in Event.ts:179
  • +
  • Defined in Event.ts:124
  • Returns undefined | null | number | Date

    +
  • Defined in Event.ts:223
  • +
  • Defined in Event.ts:157
  • +
  • Defined in Event.ts:120
  • Returns Event

    +
  • Defined in Event.ts:102
  • Returns void

    +
  • Defined in Event.ts:187
  • +
    + +
    +
  • setEndDate
  • +
  • setReminder
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/classes/Google.html b/docs/classes/Google.html index 20348cd..0c19100 100644 --- a/docs/classes/Google.html +++ b/docs/classes/Google.html @@ -22,7 +22,7 @@

    Hierarchy

    +
  • Defined in Generator/Google.ts:17
  • @@ -58,7 +58,7 @@
    +
  • Defined in Generator/Google.ts:18
  • Methods

    @@ -74,7 +74,7 @@
    attendees: Returns string
    +
  • Defined in Generator/UrlGenerator.ts:17
  • +
  • Defined in Generator/Google.ts:20
  • +
  • Defined in Generator/UrlGenerator.ts:11
  • Returns DataPiece[]

    +
  • Defined in Generator/ICalendar.ts:49
    • @@ -102,7 +102,7 @@

      Parameters

      event: Event

    Returns string

    +
  • Defined in Generator/ICalendar.ts:43
  • +
  • Defined in Generator/ICalendar.ts:37
    • @@ -131,7 +131,7 @@
      data: DataPieceboolean = false

    Returns string

    +
  • Defined in Generator/ICalendar.ts:189
    • @@ -144,7 +144,7 @@

      Parameters

      Optional text: string

    Returns undefined | string

    +
  • Defined in Generator/ICalendar.ts:177
  • Returns Record<string, string>

    +
  • Defined in Generator/MultiGenerator.ts:11
  • @@ -86,7 +86,7 @@
    event: asArray: false
  • Returns Record<string, string>

    +
  • Defined in Generator/MultiGenerator.ts:12
  • @@ -98,7 +98,7 @@
    event: asArray: true
  • Returns [string, string][]

    +
  • Defined in Generator/MultiGenerator.ts:13
  • +
  • Defined in Generator/UrlGenerator.ts:11
  • +
  • Attendee
  • +
  • Methods
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/modules.html b/docs/modules.html index d26cfa5..9c86939 100644 --- a/docs/modules.html +++ b/docs/modules.html @@ -28,6 +28,10 @@

    Classes

    Type Aliases

    +
    +

    Variables

    +
    +
  • Attendee
  • +
  • Methods
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/Attendee.html b/docs/types/Attendee.html index 2d8bb80..38598d7 100644 --- a/docs/types/Attendee.html +++ b/docs/types/Attendee.html @@ -17,7 +17,7 @@

    Type alias Attendee

    Attendee: Email | [Email, Name?]
    +
  • Defined in Attendee.ts:4
  • +
  • Attendee
  • +
  • Methods
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/variables/Methods.html b/docs/variables/Methods.html new file mode 100644 index 0000000..7d2c281 --- /dev/null +++ b/docs/variables/Methods.html @@ -0,0 +1,68 @@ +Methods | @barinbritva/add-to-calendar
    +
    + +
    +
    +
    +
    + +

    Variable MethodsConst

    +
    Methods: {
        Add: "ADD";
        Cancel: "CANCEL";
        Publish: "PUBLISH";
        Reply: "REPLY";
        Request: "REQUEST";
    } = ...
    +
    +

    Type declaration

    +
      +
    • +
      Readonly Add: "ADD"
    • +
    • +
      Readonly Cancel: "CANCEL"
    • +
    • +
      Readonly Publish: "PUBLISH"
    • +
    • +
      Readonly Reply: "REPLY"
    • +
    • +
      Readonly Request: "REQUEST"
    +
    +
    +

    Generated using TypeDoc

    +
    \ No newline at end of file diff --git a/src/Event.ts b/src/Event.ts index d674d19..1074d22 100644 --- a/src/Event.ts +++ b/src/Event.ts @@ -12,6 +12,7 @@ export class Event { private _endDate: Date | null = null; private duration: number | null = null; private _attendees: Attendee[]; + private _reminderInMinuets: number | null = null; /** * @param title - Event title. @@ -69,6 +70,10 @@ export class Event { return this._attendees; } + get reminder(): number | null { + return this._reminderInMinuets; + } + /** * Reschedule the event. * @@ -158,6 +163,19 @@ export class Event { return this; } + /** + * Set a reminder for the event. + * + * Applicable only for the `ICS` files. Web links don't support reminder parameter. + * + * @param minutes - Minutes before the event to remind. + * @returns The event. You can chain this method. + */ + public setReminder(minutes: number): this { + this._reminderInMinuets = minutes; + return this; + } + private getNextDayAfterStartDate(): Date { const startDate = this.startDate; const endDate = DateHelper.cloneDate(startDate); diff --git a/src/Generator/ICalendar.ts b/src/Generator/ICalendar.ts index 1ff7335..c30ff5f 100644 --- a/src/Generator/ICalendar.ts +++ b/src/Generator/ICalendar.ts @@ -11,12 +11,12 @@ export interface DataPiece { export type Method = 'PUBLISH' | 'REQUEST' | 'REPLY' | 'ADD' | 'CANCEL'; export const Methods = { - Publish: 'PUBLISH' as const, - Request: 'REQUEST' as const, - Reply: 'REPLY' as const, - Add: 'ADD' as const, - Cancel: 'CANCEL' as const -}; + Publish: 'PUBLISH', + Request: 'REQUEST', + Reply: 'REPLY', + Add: 'ADD', + Cancel: 'CANCEL' +} as const; export interface InvitationMeta { contentLanguage: string; @@ -135,6 +135,31 @@ export class ICalendar implements Generator { }); } + if (event.reminder != null) { + data.push( + { + key: 'BEGIN', + value: 'VALARM' + }, + { + key: 'TRIGGER', + value: `-PT${event.reminder}M` + }, + { + key: 'ACTION', + value: 'DISPLAY' + }, + { + key: 'DESCRIPTION', + value: this.escapeSpecialChars(event.title) + }, + { + key: 'END', + value: 'VALARM' + } + ); + } + data.push( { key: 'END', diff --git a/tests/event.spec.ts b/tests/event.spec.ts index f327d20..751e18b 100644 --- a/tests/event.spec.ts +++ b/tests/event.spec.ts @@ -160,4 +160,11 @@ describe('class Event', () => { expect(event.uid).toBe('constructor-provided-uid'); }); + + it('should have a reminder', () => { + const event = new Event('Meet with friends', new Date(Date.UTC(2021, 5, 18, 15, 0))); + event.setReminder(11); + + expect(event.reminder).toBe(11); + }); }); diff --git a/tests/i-calendar.spec.ts b/tests/i-calendar.spec.ts index cd1ad6e..a47131b 100644 --- a/tests/i-calendar.spec.ts +++ b/tests/i-calendar.spec.ts @@ -30,13 +30,14 @@ describe('class ICalendar method createFile', () => { [['jane@example.com', 'Jane'], ['fred@example.com'], 'joe@example.com'], 'unique-id' ); + event.setReminder(23); const clock = sinon.useFakeTimers(new Date(Date.UTC(2021, 5, 17, 6, 36, 30))); const fileContent = iCalendar.createFile(event); clock.restore(); expect(fileContent).toBe( - 'BEGIN:VCALENDAR\nVERSION:2.0\nPRODID:-//barinbritva//add-to-calendar//EN-US\nCALSCALE:GREGORIAN\nMETHOD:REQUEST\nBEGIN:VEVENT\nUID:unique-id\nDTSTAMP:20210617T063630Z\nDTSTART:20210618T150000Z\nDTEND:20210618T170000Z\nSUMMARY:Meet with friends\nDESCRIPTION:Let\'s grab some coffee!\nLOCATION:Blue Bottle Coffee, 300 S Broadway, Los Angeles\nGEO:34.0391997;-118.2327653\nORGANIZER;CN="Jane":mailto:jane@example.com\nATTENDEE;CN="fred@example.com":mailto:fred@example.com\nATTENDEE;CN="joe@example.com":mailto:joe@example.com\nEND:VEVENT\nEND:VCALENDAR' + 'BEGIN:VCALENDAR\nVERSION:2.0\nPRODID:-//barinbritva//add-to-calendar//EN-US\nCALSCALE:GREGORIAN\nMETHOD:REQUEST\nBEGIN:VEVENT\nUID:unique-id\nDTSTAMP:20210617T063630Z\nDTSTART:20210618T150000Z\nDTEND:20210618T170000Z\nSUMMARY:Meet with friends\nDESCRIPTION:Let\'s grab some coffee!\nLOCATION:Blue Bottle Coffee, 300 S Broadway, Los Angeles\nGEO:34.0391997;-118.2327653\nORGANIZER;CN="Jane":mailto:jane@example.com\nATTENDEE;CN="fred@example.com":mailto:fred@example.com\nATTENDEE;CN="joe@example.com":mailto:joe@example.com\nBEGIN:VALARM\nTRIGGER:-PT23M\nACTION:DISPLAY\nDESCRIPTION:Meet with friends\nEND:VALARM\nEND:VEVENT\nEND:VCALENDAR' ); }); });