@fullcalendar/icalendar 6.0.0-beta.1 → 6.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{LICENSE.txt → LICENSE.md} +0 -0
- package/{main.cjs.js → index.cjs} +29 -71
- package/index.d.ts +6 -0
- package/{main.global.js → index.global.js} +32 -70
- package/index.global.min.js +6 -0
- package/{main.js → index.js} +25 -66
- package/package.json +38 -18
- package/main.d.ts +0 -6
- package/main.global.min.js +0 -6
- package/main.js.map +0 -1
|
File without changes
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
FullCalendar v6.0.0-beta.1
|
|
3
|
-
Docs & License: https://fullcalendar.io/
|
|
4
|
-
(c) 2022 Adam Shaw
|
|
5
|
-
*/
|
|
6
1
|
'use strict';
|
|
7
2
|
|
|
8
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
4
|
|
|
10
|
-
var
|
|
5
|
+
var index_cjs = require('@fullcalendar/core/index.cjs');
|
|
6
|
+
var internal_cjs = require('@fullcalendar/core/internal.cjs');
|
|
11
7
|
var ICAL = require('ical.js');
|
|
12
8
|
|
|
13
9
|
function _interopNamespace(e) {
|
|
@@ -19,14 +15,12 @@ function _interopNamespace(e) {
|
|
|
19
15
|
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
20
16
|
Object.defineProperty(n, k, d.get ? d : {
|
|
21
17
|
enumerable: true,
|
|
22
|
-
get: function () {
|
|
23
|
-
return e[k];
|
|
24
|
-
}
|
|
18
|
+
get: function () { return e[k]; }
|
|
25
19
|
});
|
|
26
20
|
}
|
|
27
21
|
});
|
|
28
22
|
}
|
|
29
|
-
n[
|
|
23
|
+
n["default"] = e;
|
|
30
24
|
return Object.freeze(n);
|
|
31
25
|
}
|
|
32
26
|
|
|
@@ -132,7 +126,7 @@ class IcalExpander {
|
|
|
132
126
|
}
|
|
133
127
|
}
|
|
134
128
|
|
|
135
|
-
|
|
129
|
+
const eventSourceDef = {
|
|
136
130
|
parseMeta(refined) {
|
|
137
131
|
if (refined.url && refined.format === 'ics') {
|
|
138
132
|
return {
|
|
@@ -142,78 +136,40 @@ let eventSourceDef = {
|
|
|
142
136
|
}
|
|
143
137
|
return null;
|
|
144
138
|
},
|
|
145
|
-
fetch(arg,
|
|
146
|
-
let
|
|
139
|
+
fetch(arg, successCallback, errorCallback) {
|
|
140
|
+
let meta = arg.eventSource.meta;
|
|
147
141
|
let { internalState } = meta;
|
|
148
|
-
function handleICalEvents(errorMessage, iCalExpander, xhr) {
|
|
149
|
-
if (errorMessage) {
|
|
150
|
-
onFailure({ message: errorMessage, xhr });
|
|
151
|
-
}
|
|
152
|
-
else {
|
|
153
|
-
onSuccess({ rawEvents: expandICalEvents(iCalExpander, arg.range), xhr });
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
142
|
/*
|
|
157
143
|
NOTE: isRefetch is a HACK. we would do the recurring-expanding in a separate plugin hook,
|
|
158
144
|
but we couldn't leverage built-in allDay-guessing, among other things.
|
|
159
145
|
*/
|
|
160
146
|
if (!internalState || arg.isRefetch) {
|
|
161
147
|
internalState = meta.internalState = {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
148
|
+
response: null,
|
|
149
|
+
iCalExpanderPromise: fetch(meta.url, { method: 'GET' }).then((response) => {
|
|
150
|
+
return response.text().then((icsText) => {
|
|
151
|
+
internalState.response = response;
|
|
152
|
+
return new IcalExpander({
|
|
153
|
+
ics: icsText,
|
|
154
|
+
skipInvalidDates: true,
|
|
155
|
+
});
|
|
156
|
+
});
|
|
157
|
+
}),
|
|
167
158
|
};
|
|
168
|
-
requestICal(meta.url, (rawFeed, xhr) => {
|
|
169
|
-
let iCalExpander = new IcalExpander({
|
|
170
|
-
ics: rawFeed,
|
|
171
|
-
skipInvalidDates: true,
|
|
172
|
-
});
|
|
173
|
-
for (let callback of internalState.callbacks) {
|
|
174
|
-
callback('', iCalExpander, xhr);
|
|
175
|
-
}
|
|
176
|
-
internalState.completed = true;
|
|
177
|
-
internalState.callbacks = [];
|
|
178
|
-
internalState.iCalExpander = iCalExpander;
|
|
179
|
-
internalState.xhr = xhr;
|
|
180
|
-
}, (errorMessage, xhr) => {
|
|
181
|
-
for (let callback of internalState.callbacks) {
|
|
182
|
-
callback(errorMessage, null, xhr);
|
|
183
|
-
}
|
|
184
|
-
internalState.completed = true;
|
|
185
|
-
internalState.callbacks = [];
|
|
186
|
-
internalState.errorMessage = errorMessage;
|
|
187
|
-
internalState.xhr = xhr;
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
else if (!internalState.completed) {
|
|
191
|
-
internalState.callbacks.push(handleICalEvents);
|
|
192
|
-
}
|
|
193
|
-
else {
|
|
194
|
-
handleICalEvents(internalState.errorMessage, internalState.iCalExpander, internalState.xhr);
|
|
195
159
|
}
|
|
160
|
+
internalState.iCalExpanderPromise.then((iCalExpander) => {
|
|
161
|
+
successCallback({
|
|
162
|
+
rawEvents: expandICalEvents(iCalExpander, arg.range),
|
|
163
|
+
response: internalState.response,
|
|
164
|
+
});
|
|
165
|
+
}, errorCallback);
|
|
196
166
|
},
|
|
197
167
|
};
|
|
198
|
-
function requestICal(url, successCallback, failureCallback) {
|
|
199
|
-
const xhr = new XMLHttpRequest();
|
|
200
|
-
xhr.open('GET', url, true);
|
|
201
|
-
xhr.onload = () => {
|
|
202
|
-
if (xhr.status >= 200 && xhr.status < 400) {
|
|
203
|
-
successCallback(xhr.responseText, xhr);
|
|
204
|
-
}
|
|
205
|
-
else {
|
|
206
|
-
failureCallback('Request failed', xhr);
|
|
207
|
-
}
|
|
208
|
-
};
|
|
209
|
-
xhr.onerror = () => failureCallback('Request failed', xhr);
|
|
210
|
-
xhr.send(null);
|
|
211
|
-
}
|
|
212
168
|
function expandICalEvents(iCalExpander, range) {
|
|
213
169
|
// expand the range. because our `range` is timeZone-agnostic UTC
|
|
214
170
|
// or maybe because ical.js always produces dates in local time? i forget
|
|
215
|
-
let rangeStart =
|
|
216
|
-
let rangeEnd =
|
|
171
|
+
let rangeStart = internal_cjs.addDays(range.start, -1);
|
|
172
|
+
let rangeEnd = internal_cjs.addDays(range.end, 1);
|
|
217
173
|
let iCalRes = iCalExpander.between(rangeStart, rangeEnd); // end inclusive. will give extra results
|
|
218
174
|
let expanded = [];
|
|
219
175
|
// TODO: instead of using startDate/endDate.toString to communicate allDay,
|
|
@@ -252,8 +208,10 @@ function specifiesEnd(iCalEvent) {
|
|
|
252
208
|
return Boolean(iCalEvent.component.getFirstProperty('dtend')) ||
|
|
253
209
|
Boolean(iCalEvent.component.getFirstProperty('duration'));
|
|
254
210
|
}
|
|
255
|
-
|
|
211
|
+
|
|
212
|
+
var index = index_cjs.createPlugin({
|
|
213
|
+
name: '@fullcalendar/icalendar',
|
|
256
214
|
eventSourceDefs: [eventSourceDef],
|
|
257
215
|
});
|
|
258
216
|
|
|
259
|
-
exports
|
|
217
|
+
exports["default"] = index;
|
package/index.d.ts
ADDED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
FullCalendar v6.0.0-beta.
|
|
2
|
+
FullCalendar iCalendar Plugin v6.0.0-beta.2
|
|
3
3
|
Docs & License: https://fullcalendar.io/
|
|
4
4
|
(c) 2022 Adam Shaw
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
FullCalendar.ICalendar = (function (exports, internal, core, ICAL) {
|
|
7
7
|
'use strict';
|
|
8
8
|
|
|
9
9
|
function _interopNamespace(e) {
|
|
@@ -15,15 +15,13 @@ var FullCalendarICalendar = (function (exports, common, ICAL) {
|
|
|
15
15
|
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
16
|
Object.defineProperty(n, k, d.get ? d : {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () {
|
|
19
|
-
return e[k];
|
|
20
|
-
}
|
|
18
|
+
get: function () { return e[k]; }
|
|
21
19
|
});
|
|
22
20
|
}
|
|
23
21
|
});
|
|
24
22
|
}
|
|
25
|
-
n[
|
|
26
|
-
return
|
|
23
|
+
n["default"] = e;
|
|
24
|
+
return n;
|
|
27
25
|
}
|
|
28
26
|
|
|
29
27
|
var ICAL__namespace = /*#__PURE__*/_interopNamespace(ICAL);
|
|
@@ -128,7 +126,7 @@ var FullCalendarICalendar = (function (exports, common, ICAL) {
|
|
|
128
126
|
}
|
|
129
127
|
}
|
|
130
128
|
|
|
131
|
-
|
|
129
|
+
const eventSourceDef = {
|
|
132
130
|
parseMeta(refined) {
|
|
133
131
|
if (refined.url && refined.format === 'ics') {
|
|
134
132
|
return {
|
|
@@ -138,78 +136,40 @@ var FullCalendarICalendar = (function (exports, common, ICAL) {
|
|
|
138
136
|
}
|
|
139
137
|
return null;
|
|
140
138
|
},
|
|
141
|
-
fetch(arg,
|
|
142
|
-
let
|
|
139
|
+
fetch(arg, successCallback, errorCallback) {
|
|
140
|
+
let meta = arg.eventSource.meta;
|
|
143
141
|
let { internalState } = meta;
|
|
144
|
-
function handleICalEvents(errorMessage, iCalExpander, xhr) {
|
|
145
|
-
if (errorMessage) {
|
|
146
|
-
onFailure({ message: errorMessage, xhr });
|
|
147
|
-
}
|
|
148
|
-
else {
|
|
149
|
-
onSuccess({ rawEvents: expandICalEvents(iCalExpander, arg.range), xhr });
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
142
|
/*
|
|
153
143
|
NOTE: isRefetch is a HACK. we would do the recurring-expanding in a separate plugin hook,
|
|
154
144
|
but we couldn't leverage built-in allDay-guessing, among other things.
|
|
155
145
|
*/
|
|
156
146
|
if (!internalState || arg.isRefetch) {
|
|
157
147
|
internalState = meta.internalState = {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
148
|
+
response: null,
|
|
149
|
+
iCalExpanderPromise: fetch(meta.url, { method: 'GET' }).then((response) => {
|
|
150
|
+
return response.text().then((icsText) => {
|
|
151
|
+
internalState.response = response;
|
|
152
|
+
return new IcalExpander({
|
|
153
|
+
ics: icsText,
|
|
154
|
+
skipInvalidDates: true,
|
|
155
|
+
});
|
|
156
|
+
});
|
|
157
|
+
}),
|
|
163
158
|
};
|
|
164
|
-
requestICal(meta.url, (rawFeed, xhr) => {
|
|
165
|
-
let iCalExpander = new IcalExpander({
|
|
166
|
-
ics: rawFeed,
|
|
167
|
-
skipInvalidDates: true,
|
|
168
|
-
});
|
|
169
|
-
for (let callback of internalState.callbacks) {
|
|
170
|
-
callback('', iCalExpander, xhr);
|
|
171
|
-
}
|
|
172
|
-
internalState.completed = true;
|
|
173
|
-
internalState.callbacks = [];
|
|
174
|
-
internalState.iCalExpander = iCalExpander;
|
|
175
|
-
internalState.xhr = xhr;
|
|
176
|
-
}, (errorMessage, xhr) => {
|
|
177
|
-
for (let callback of internalState.callbacks) {
|
|
178
|
-
callback(errorMessage, null, xhr);
|
|
179
|
-
}
|
|
180
|
-
internalState.completed = true;
|
|
181
|
-
internalState.callbacks = [];
|
|
182
|
-
internalState.errorMessage = errorMessage;
|
|
183
|
-
internalState.xhr = xhr;
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
else if (!internalState.completed) {
|
|
187
|
-
internalState.callbacks.push(handleICalEvents);
|
|
188
|
-
}
|
|
189
|
-
else {
|
|
190
|
-
handleICalEvents(internalState.errorMessage, internalState.iCalExpander, internalState.xhr);
|
|
191
159
|
}
|
|
160
|
+
internalState.iCalExpanderPromise.then((iCalExpander) => {
|
|
161
|
+
successCallback({
|
|
162
|
+
rawEvents: expandICalEvents(iCalExpander, arg.range),
|
|
163
|
+
response: internalState.response,
|
|
164
|
+
});
|
|
165
|
+
}, errorCallback);
|
|
192
166
|
},
|
|
193
167
|
};
|
|
194
|
-
function requestICal(url, successCallback, failureCallback) {
|
|
195
|
-
const xhr = new XMLHttpRequest();
|
|
196
|
-
xhr.open('GET', url, true);
|
|
197
|
-
xhr.onload = () => {
|
|
198
|
-
if (xhr.status >= 200 && xhr.status < 400) {
|
|
199
|
-
successCallback(xhr.responseText, xhr);
|
|
200
|
-
}
|
|
201
|
-
else {
|
|
202
|
-
failureCallback('Request failed', xhr);
|
|
203
|
-
}
|
|
204
|
-
};
|
|
205
|
-
xhr.onerror = () => failureCallback('Request failed', xhr);
|
|
206
|
-
xhr.send(null);
|
|
207
|
-
}
|
|
208
168
|
function expandICalEvents(iCalExpander, range) {
|
|
209
169
|
// expand the range. because our `range` is timeZone-agnostic UTC
|
|
210
170
|
// or maybe because ical.js always produces dates in local time? i forget
|
|
211
|
-
let rangeStart =
|
|
212
|
-
let rangeEnd =
|
|
171
|
+
let rangeStart = internal.addDays(range.start, -1);
|
|
172
|
+
let rangeEnd = internal.addDays(range.end, 1);
|
|
213
173
|
let iCalRes = iCalExpander.between(rangeStart, rangeEnd); // end inclusive. will give extra results
|
|
214
174
|
let expanded = [];
|
|
215
175
|
// TODO: instead of using startDate/endDate.toString to communicate allDay,
|
|
@@ -248,16 +208,18 @@ var FullCalendarICalendar = (function (exports, common, ICAL) {
|
|
|
248
208
|
return Boolean(iCalEvent.component.getFirstProperty('dtend')) ||
|
|
249
209
|
Boolean(iCalEvent.component.getFirstProperty('duration'));
|
|
250
210
|
}
|
|
251
|
-
|
|
211
|
+
|
|
212
|
+
var plugin = core.createPlugin({
|
|
213
|
+
name: '@fullcalendar/icalendar',
|
|
252
214
|
eventSourceDefs: [eventSourceDef],
|
|
253
215
|
});
|
|
254
216
|
|
|
255
|
-
|
|
217
|
+
internal.globalPlugins.push(plugin);
|
|
256
218
|
|
|
257
|
-
exports
|
|
219
|
+
exports["default"] = plugin;
|
|
258
220
|
|
|
259
221
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
260
222
|
|
|
261
223
|
return exports;
|
|
262
224
|
|
|
263
|
-
}({}, FullCalendar, ICAL)
|
|
225
|
+
})({}, FullCalendar.Internal, FullCalendar, ICAL);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
FullCalendar iCalendar Plugin v6.0.0-beta.2
|
|
3
|
+
Docs & License: https://fullcalendar.io/
|
|
4
|
+
(c) 2022 Adam Shaw
|
|
5
|
+
*/
|
|
6
|
+
FullCalendar.ICalendar=function(e,t,n,r){"use strict";function a(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,t}var s=a(r);class i{constructor(e){this.maxIterations=null!=e.maxIterations?e.maxIterations:1e3,this.skipInvalidDates=null!=e.skipInvalidDates&&e.skipInvalidDates,this.jCalData=s.parse(e.ics),this.component=new s.Component(this.jCalData),this.events=this.component.getAllSubcomponents("vevent").map(e=>new s.Event(e)),this.skipInvalidDates&&(this.events=this.events.filter(e=>{try{return e.startDate.toJSDate(),e.endDate.toJSDate(),!0}catch(e){return!1}}))}between(e,t){function n(n,r){return(!e||r>=e.getTime())&&(!t||n<=t.getTime())}function r(e){const t=e.startDate.toJSDate().getTime();let n=e.endDate.toJSDate().getTime();return e.endDate.isDate&&n>t&&(n-=1),{startTime:t,endTime:n}}const a=[];this.events.forEach(e=>{e.isRecurrenceException()&&a.push(e)});const s={events:[],occurrences:[]};return this.events.filter(e=>!e.isRecurrenceException()).forEach(e=>{const i=[];if(e.component.getAllProperties("exdate").forEach(e=>{const t=e.getFirstValue();i.push(t.toJSDate().getTime())}),e.isRecurring()){const o=e.iterator();let c,l=0;do{if(l+=1,c=o.next(),c){const o=e.getOccurrenceDetails(c),{startTime:l,endTime:u}=r(o),d=-1!==i.indexOf(l),p=a.find(t=>t.uid===e.uid&&t.recurrenceId.toJSDate().getTime()===o.startDate.toJSDate().getTime());if(t&&l>t.getTime())break;n(l,u)&&(p?s.events.push(p):d||s.occurrences.push(o))}}while(c&&(!this.maxIterations||l<this.maxIterations));return}const{startTime:o,endTime:c}=r(e);n(o,c)&&s.events.push(e)}),s}before(e){return this.between(void 0,e)}after(e){return this.between(e)}all(){return this.between()}}const o={parseMeta:e=>e.url&&"ics"===e.format?{url:e.url,format:"ics"}:null,fetch(e,t,n){let r=e.eventSource.meta,{internalState:a}=r;a&&!e.isRefetch||(a=r.internalState={response:null,iCalExpanderPromise:fetch(r.url,{method:"GET"}).then(e=>e.text().then(t=>(a.response=e,new i({ics:t,skipInvalidDates:!0}))))}),a.iCalExpanderPromise.then(n=>{t({rawEvents:c(n,e.range),response:a.response})},n)}};function c(e,n){let r=t.addDays(n.start,-1),a=t.addDays(n.end,1),s=e.between(r,a),i=[];for(let e of s.events)i.push(Object.assign(Object.assign({},l(e)),{start:e.startDate.toString(),end:d(e)&&e.endDate?e.endDate.toString():null}));for(let e of s.occurrences){let t=e.item;i.push(Object.assign(Object.assign({},l(t)),{start:e.startDate.toString(),end:d(t)&&e.endDate?e.endDate.toString():null}))}return i}function l(e){return{title:e.summary,url:u(e),extendedProps:{location:e.location,organizer:e.organizer,description:e.description}}}function u(e){let t=e.component.getFirstProperty("url");return t?t.getFirstValue():""}function d(e){return Boolean(e.component.getFirstProperty("dtend"))||Boolean(e.component.getFirstProperty("duration"))}var p=n.createPlugin({name:"@fullcalendar/icalendar",eventSourceDefs:[o]});return t.globalPlugins.push(p),e.default=p,Object.defineProperty(e,"__esModule",{value:!0}),e}({},FullCalendar.Internal,FullCalendar,ICAL);
|
package/{main.js → index.js}
RENAMED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Docs & License: https://fullcalendar.io/
|
|
4
|
-
(c) 2022 Adam Shaw
|
|
5
|
-
*/
|
|
6
|
-
import { createPlugin, addDays } from '@fullcalendar/common';
|
|
1
|
+
import { createPlugin } from '@fullcalendar/core/index.js';
|
|
2
|
+
import { addDays } from '@fullcalendar/core/internal.js';
|
|
7
3
|
import * as ICAL from 'ical.js';
|
|
8
4
|
|
|
9
5
|
/* eslint-disable */
|
|
@@ -106,7 +102,7 @@ class IcalExpander {
|
|
|
106
102
|
}
|
|
107
103
|
}
|
|
108
104
|
|
|
109
|
-
|
|
105
|
+
const eventSourceDef = {
|
|
110
106
|
parseMeta(refined) {
|
|
111
107
|
if (refined.url && refined.format === 'ics') {
|
|
112
108
|
return {
|
|
@@ -116,73 +112,35 @@ let eventSourceDef = {
|
|
|
116
112
|
}
|
|
117
113
|
return null;
|
|
118
114
|
},
|
|
119
|
-
fetch(arg,
|
|
120
|
-
let
|
|
115
|
+
fetch(arg, successCallback, errorCallback) {
|
|
116
|
+
let meta = arg.eventSource.meta;
|
|
121
117
|
let { internalState } = meta;
|
|
122
|
-
function handleICalEvents(errorMessage, iCalExpander, xhr) {
|
|
123
|
-
if (errorMessage) {
|
|
124
|
-
onFailure({ message: errorMessage, xhr });
|
|
125
|
-
}
|
|
126
|
-
else {
|
|
127
|
-
onSuccess({ rawEvents: expandICalEvents(iCalExpander, arg.range), xhr });
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
118
|
/*
|
|
131
119
|
NOTE: isRefetch is a HACK. we would do the recurring-expanding in a separate plugin hook,
|
|
132
120
|
but we couldn't leverage built-in allDay-guessing, among other things.
|
|
133
121
|
*/
|
|
134
122
|
if (!internalState || arg.isRefetch) {
|
|
135
123
|
internalState = meta.internalState = {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
124
|
+
response: null,
|
|
125
|
+
iCalExpanderPromise: fetch(meta.url, { method: 'GET' }).then((response) => {
|
|
126
|
+
return response.text().then((icsText) => {
|
|
127
|
+
internalState.response = response;
|
|
128
|
+
return new IcalExpander({
|
|
129
|
+
ics: icsText,
|
|
130
|
+
skipInvalidDates: true,
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
}),
|
|
141
134
|
};
|
|
142
|
-
requestICal(meta.url, (rawFeed, xhr) => {
|
|
143
|
-
let iCalExpander = new IcalExpander({
|
|
144
|
-
ics: rawFeed,
|
|
145
|
-
skipInvalidDates: true,
|
|
146
|
-
});
|
|
147
|
-
for (let callback of internalState.callbacks) {
|
|
148
|
-
callback('', iCalExpander, xhr);
|
|
149
|
-
}
|
|
150
|
-
internalState.completed = true;
|
|
151
|
-
internalState.callbacks = [];
|
|
152
|
-
internalState.iCalExpander = iCalExpander;
|
|
153
|
-
internalState.xhr = xhr;
|
|
154
|
-
}, (errorMessage, xhr) => {
|
|
155
|
-
for (let callback of internalState.callbacks) {
|
|
156
|
-
callback(errorMessage, null, xhr);
|
|
157
|
-
}
|
|
158
|
-
internalState.completed = true;
|
|
159
|
-
internalState.callbacks = [];
|
|
160
|
-
internalState.errorMessage = errorMessage;
|
|
161
|
-
internalState.xhr = xhr;
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
else if (!internalState.completed) {
|
|
165
|
-
internalState.callbacks.push(handleICalEvents);
|
|
166
|
-
}
|
|
167
|
-
else {
|
|
168
|
-
handleICalEvents(internalState.errorMessage, internalState.iCalExpander, internalState.xhr);
|
|
169
135
|
}
|
|
136
|
+
internalState.iCalExpanderPromise.then((iCalExpander) => {
|
|
137
|
+
successCallback({
|
|
138
|
+
rawEvents: expandICalEvents(iCalExpander, arg.range),
|
|
139
|
+
response: internalState.response,
|
|
140
|
+
});
|
|
141
|
+
}, errorCallback);
|
|
170
142
|
},
|
|
171
143
|
};
|
|
172
|
-
function requestICal(url, successCallback, failureCallback) {
|
|
173
|
-
const xhr = new XMLHttpRequest();
|
|
174
|
-
xhr.open('GET', url, true);
|
|
175
|
-
xhr.onload = () => {
|
|
176
|
-
if (xhr.status >= 200 && xhr.status < 400) {
|
|
177
|
-
successCallback(xhr.responseText, xhr);
|
|
178
|
-
}
|
|
179
|
-
else {
|
|
180
|
-
failureCallback('Request failed', xhr);
|
|
181
|
-
}
|
|
182
|
-
};
|
|
183
|
-
xhr.onerror = () => failureCallback('Request failed', xhr);
|
|
184
|
-
xhr.send(null);
|
|
185
|
-
}
|
|
186
144
|
function expandICalEvents(iCalExpander, range) {
|
|
187
145
|
// expand the range. because our `range` is timeZone-agnostic UTC
|
|
188
146
|
// or maybe because ical.js always produces dates in local time? i forget
|
|
@@ -226,9 +184,10 @@ function specifiesEnd(iCalEvent) {
|
|
|
226
184
|
return Boolean(iCalEvent.component.getFirstProperty('dtend')) ||
|
|
227
185
|
Boolean(iCalEvent.component.getFirstProperty('duration'));
|
|
228
186
|
}
|
|
229
|
-
|
|
187
|
+
|
|
188
|
+
var index = createPlugin({
|
|
189
|
+
name: '@fullcalendar/icalendar',
|
|
230
190
|
eventSourceDefs: [eventSourceDef],
|
|
231
191
|
});
|
|
232
192
|
|
|
233
|
-
export default
|
|
234
|
-
//# sourceMappingURL=main.js.map
|
|
193
|
+
export { index as default };
|
package/package.json
CHANGED
|
@@ -1,30 +1,50 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fullcalendar/icalendar",
|
|
3
|
-
"version": "6.0.0-beta.
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"ical.js": "^1.4.0",
|
|
10
|
-
"tslib": "^2.1.0"
|
|
11
|
-
},
|
|
12
|
-
"main": "main.cjs.js",
|
|
13
|
-
"module": "main.js",
|
|
14
|
-
"types": "main.d.ts",
|
|
15
|
-
"jsdelivr": "main.global.min.js",
|
|
16
|
-
"browserGlobal": "FullCalendarICalendar",
|
|
3
|
+
"version": "6.0.0-beta.2",
|
|
4
|
+
"keywords": [
|
|
5
|
+
"calendar",
|
|
6
|
+
"event",
|
|
7
|
+
"full-sized"
|
|
8
|
+
],
|
|
17
9
|
"homepage": "https://fullcalendar.io/",
|
|
10
|
+
"docs": "https://fullcalendar.io/docs/icalendar",
|
|
18
11
|
"bugs": "https://fullcalendar.io/reporting-bugs",
|
|
19
12
|
"repository": {
|
|
20
13
|
"type": "git",
|
|
21
14
|
"url": "https://github.com/fullcalendar/fullcalendar.git",
|
|
22
|
-
"homepage": "https://github.com/fullcalendar/fullcalendar"
|
|
15
|
+
"homepage": "https://github.com/fullcalendar/fullcalendar",
|
|
16
|
+
"directory": "packages/icalendar"
|
|
23
17
|
},
|
|
24
18
|
"license": "MIT",
|
|
25
19
|
"author": {
|
|
26
|
-
"name": "
|
|
27
|
-
"email": "
|
|
28
|
-
"url": "
|
|
20
|
+
"name": "Adam Shaw",
|
|
21
|
+
"email": "arshaw@arshaw.com",
|
|
22
|
+
"url": "http://arshaw.com/"
|
|
23
|
+
},
|
|
24
|
+
"copyright": "2022 Adam Shaw",
|
|
25
|
+
"type": "module",
|
|
26
|
+
"title": "FullCalendar iCalendar Plugin",
|
|
27
|
+
"description": "Fetch events from a public iCalendar / .ics feed",
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"ical.js": "^1.4.0"
|
|
30
|
+
},
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"@fullcalendar/core": "6.0.0-beta.2"
|
|
33
|
+
},
|
|
34
|
+
"main": "./index.cjs",
|
|
35
|
+
"module": "./index.js",
|
|
36
|
+
"types": "./index.d.ts",
|
|
37
|
+
"unpkg": "./index.global.min.js",
|
|
38
|
+
"jsdelvr": "./index.global.min.js",
|
|
39
|
+
"exports": {
|
|
40
|
+
"./package.json": "./package.json",
|
|
41
|
+
"./index.cjs": "./index.cjs",
|
|
42
|
+
"./index.js": "./index.js",
|
|
43
|
+
".": {
|
|
44
|
+
"require": "./index.cjs",
|
|
45
|
+
"import": "./index.js",
|
|
46
|
+
"types": "./index.d.ts",
|
|
47
|
+
"default": "./index.global.js"
|
|
48
|
+
}
|
|
29
49
|
}
|
|
30
50
|
}
|
package/main.d.ts
DELETED
package/main.global.min.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
FullCalendar v6.0.0-beta.1
|
|
3
|
-
Docs & License: https://fullcalendar.io/
|
|
4
|
-
(c) 2022 Adam Shaw
|
|
5
|
-
*/
|
|
6
|
-
var FullCalendarICalendar=function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var a=r(n);class s{constructor(e){this.maxIterations=null!=e.maxIterations?e.maxIterations:1e3,this.skipInvalidDates=null!=e.skipInvalidDates&&e.skipInvalidDates,this.jCalData=a.parse(e.ics),this.component=new a.Component(this.jCalData),this.events=this.component.getAllSubcomponents("vevent").map((e=>new a.Event(e))),this.skipInvalidDates&&(this.events=this.events.filter((e=>{try{return e.startDate.toJSDate(),e.endDate.toJSDate(),!0}catch(e){return!1}})))}between(e,t){function n(n,r){return(!e||r>=e.getTime())&&(!t||n<=t.getTime())}function r(e){const t=e.startDate.toJSDate().getTime();let n=e.endDate.toJSDate().getTime();return e.endDate.isDate&&n>t&&(n-=1),{startTime:t,endTime:n}}const a=[];this.events.forEach((e=>{e.isRecurrenceException()&&a.push(e)}));const s={events:[],occurrences:[]};return this.events.filter((e=>!e.isRecurrenceException())).forEach((e=>{const i=[];if(e.component.getAllProperties("exdate").forEach((e=>{const t=e.getFirstValue();i.push(t.toJSDate().getTime())})),e.isRecurring()){const o=e.iterator();let l,c=0;do{if(c+=1,l=o.next(),l){const o=e.getOccurrenceDetails(l),{startTime:c,endTime:u}=r(o),d=-1!==i.indexOf(c),f=a.find((t=>t.uid===e.uid&&t.recurrenceId.toJSDate().getTime()===o.startDate.toJSDate().getTime()));if(t&&c>t.getTime())break;n(c,u)&&(f?s.events.push(f):d||s.occurrences.push(o))}}while(l&&(!this.maxIterations||c<this.maxIterations));return}const{startTime:o,endTime:l}=r(e);n(o,l)&&s.events.push(e)})),s}before(e){return this.between(void 0,e)}after(e){return this.between(e)}all(){return this.between()}}let i={parseMeta:e=>e.url&&"ics"===e.format?{url:e.url,format:"ics"}:null,fetch(e,t,n){let{meta:r}=e.eventSource,{internalState:a}=r;function i(r,a,s){r?n({message:r,xhr:s}):t({rawEvents:o(a,e.range),xhr:s})}!a||e.isRefetch?(a=r.internalState={completed:!1,callbacks:[i],errorMessage:"",iCalExpander:null,xhr:null},function(e,t,n){const r=new XMLHttpRequest;r.open("GET",e,!0),r.onload=()=>{r.status>=200&&r.status<400?t(r.responseText,r):n("Request failed",r)},r.onerror=()=>n("Request failed",r),r.send(null)}(r.url,((e,t)=>{let n=new s({ics:e,skipInvalidDates:!0});for(let e of a.callbacks)e("",n,t);a.completed=!0,a.callbacks=[],a.iCalExpander=n,a.xhr=t}),((e,t)=>{for(let n of a.callbacks)n(e,null,t);a.completed=!0,a.callbacks=[],a.errorMessage=e,a.xhr=t}))):a.completed?i(a.errorMessage,a.iCalExpander,a.xhr):a.callbacks.push(i)}};function o(e,n){let r=t.addDays(n.start,-1),a=t.addDays(n.end,1),s=e.between(r,a),i=[];for(let e of s.events)i.push(Object.assign(Object.assign({},l(e)),{start:e.startDate.toString(),end:u(e)&&e.endDate?e.endDate.toString():null}));for(let e of s.occurrences){let t=e.item;i.push(Object.assign(Object.assign({},l(t)),{start:e.startDate.toString(),end:u(t)&&e.endDate?e.endDate.toString():null}))}return i}function l(e){return{title:e.summary,url:c(e),extendedProps:{location:e.location,organizer:e.organizer,description:e.description}}}function c(e){let t=e.component.getFirstProperty("url");return t?t.getFirstValue():""}function u(e){return Boolean(e.component.getFirstProperty("dtend"))||Boolean(e.component.getFirstProperty("duration"))}var d=t.createPlugin({eventSourceDefs:[i]});return t.globalPlugins.push(d),e.default=d,Object.defineProperty(e,"__esModule",{value:!0}),e}({},FullCalendar,ICAL);
|
package/main.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sources":["src/ical-expander/IcalExpander.js","src/main.ts"],"sourcesContent":["/* eslint-disable */\n/*\nfrom https://github.com/mifi/ical-expander\nreleased under https://github.com/mifi/ical-expander/blob/master/LICENSE\noperates entirely in UTC\n*/\n\nimport * as ICAL from 'ical.js'\n\nexport class IcalExpander {\n constructor(opts) {\n this.maxIterations = opts.maxIterations != null ? opts.maxIterations : 1000;\n this.skipInvalidDates = opts.skipInvalidDates != null ? opts.skipInvalidDates : false;\n\n this.jCalData = ICAL.parse(opts.ics);\n this.component = new ICAL.Component(this.jCalData);\n this.events = this.component.getAllSubcomponents('vevent').map(vevent => new ICAL.Event(vevent));\n\n if (this.skipInvalidDates) {\n this.events = this.events.filter((evt) => {\n try {\n evt.startDate.toJSDate();\n evt.endDate.toJSDate();\n return true;\n } catch (err) {\n // skipping events with invalid time\n return false;\n }\n });\n }\n }\n\n between(after, before) {\n function isEventWithinRange(startTime, endTime) {\n return (!after || endTime >= after.getTime()) &&\n (!before || startTime <= before.getTime());\n }\n\n function getTimes(eventOrOccurrence) {\n const startTime = eventOrOccurrence.startDate.toJSDate().getTime();\n let endTime = eventOrOccurrence.endDate.toJSDate().getTime();\n\n // If it is an all day event, the end date is set to 00:00 of the next day\n // So we need to make it be 23:59:59 to compare correctly with the given range\n if (eventOrOccurrence.endDate.isDate && (endTime > startTime)) {\n endTime -= 1;\n }\n\n return { startTime, endTime };\n }\n\n const exceptions = [];\n\n this.events.forEach((event) => {\n if (event.isRecurrenceException()) exceptions.push(event);\n });\n\n const ret = {\n events: [],\n occurrences: [],\n };\n\n this.events.filter(e => !e.isRecurrenceException()).forEach((event) => {\n const exdates = [];\n\n event.component.getAllProperties('exdate').forEach((exdateProp) => {\n const exdate = exdateProp.getFirstValue();\n exdates.push(exdate.toJSDate().getTime());\n });\n\n // Recurring event is handled differently\n if (event.isRecurring()) {\n const iterator = event.iterator();\n\n let next;\n let i = 0;\n\n do {\n i += 1;\n next = iterator.next();\n if (next) {\n const occurrence = event.getOccurrenceDetails(next);\n\n const { startTime, endTime } = getTimes(occurrence);\n\n const isOccurrenceExcluded = exdates.indexOf(startTime) !== -1;\n\n // TODO check that within same day?\n const exception = exceptions.find(ex => ex.uid === event.uid && ex.recurrenceId.toJSDate().getTime() === occurrence.startDate.toJSDate().getTime());\n\n // We have passed the max date, stop\n if (before && startTime > before.getTime()) break;\n\n // Check that we are within our range\n if (isEventWithinRange(startTime, endTime)) {\n if (exception) {\n ret.events.push(exception);\n } else if (!isOccurrenceExcluded) {\n ret.occurrences.push(occurrence);\n }\n }\n }\n }\n while (next && (!this.maxIterations || i < this.maxIterations));\n\n return;\n }\n\n // Non-recurring event:\n const { startTime, endTime } = getTimes(event);\n\n if (isEventWithinRange(startTime, endTime)) ret.events.push(event);\n });\n\n return ret;\n }\n\n before(before) {\n return this.between(undefined, before);\n }\n\n after(after) {\n return this.between(after);\n }\n\n all() {\n return this.between();\n }\n}\n","import { createPlugin, EventSourceDef, EventInput, DateRange, addDays } from '@fullcalendar/common'\nimport * as ICAL from 'ical.js'\nimport { IcalExpander } from './ical-expander/IcalExpander'\n\ntype Success = (rawFeed: string, xhr: XMLHttpRequest) => void\ntype Failure = (error: string, xhr: XMLHttpRequest) => void\n\ninterface ICalFeedMeta {\n url: string\n format: 'ics', // for EventSourceApi\n internalState?: InternalState // HACK. TODO: use classes in future\n}\n\ninterface InternalState {\n completed: boolean\n callbacks: ((errorMessage: string, iCalExpander: IcalExpander, xhr: XMLHttpRequest) => void)[]\n errorMessage: string\n iCalExpander: IcalExpander\n xhr: XMLHttpRequest | null\n}\n\nlet eventSourceDef: EventSourceDef<ICalFeedMeta> = {\n\n parseMeta(refined) {\n if (refined.url && refined.format === 'ics') {\n return {\n url: refined.url,\n format: 'ics',\n }\n }\n return null\n },\n\n fetch(arg, onSuccess, onFailure) {\n let { meta } = arg.eventSource\n let { internalState } = meta\n\n function handleICalEvents(errorMessage, iCalExpander: IcalExpander, xhr) {\n if (errorMessage) {\n onFailure({ message: errorMessage, xhr })\n } else {\n onSuccess({ rawEvents: expandICalEvents(iCalExpander, arg.range), xhr })\n }\n }\n\n /*\n NOTE: isRefetch is a HACK. we would do the recurring-expanding in a separate plugin hook,\n but we couldn't leverage built-in allDay-guessing, among other things.\n */\n if (!internalState || arg.isRefetch) {\n internalState = meta.internalState = { // our ghetto Promise\n completed: false,\n callbacks: [handleICalEvents],\n errorMessage: '',\n iCalExpander: null,\n xhr: null,\n }\n\n requestICal(\n meta.url,\n (rawFeed, xhr) => {\n let iCalExpander = new IcalExpander({\n ics: rawFeed,\n skipInvalidDates: true,\n })\n\n for (let callback of internalState.callbacks) {\n callback('', iCalExpander, xhr)\n }\n\n internalState.completed = true\n internalState.callbacks = []\n internalState.iCalExpander = iCalExpander\n internalState.xhr = xhr\n },\n (errorMessage, xhr) => {\n for (let callback of internalState.callbacks) {\n callback(errorMessage, null, xhr)\n }\n\n internalState.completed = true\n internalState.callbacks = []\n internalState.errorMessage = errorMessage\n internalState.xhr = xhr\n },\n )\n } else if (!internalState.completed) {\n internalState.callbacks.push(handleICalEvents)\n } else {\n handleICalEvents(internalState.errorMessage, internalState.iCalExpander, internalState.xhr)\n }\n },\n}\n\nfunction requestICal(url: string, successCallback: Success, failureCallback: Failure) {\n const xhr = new XMLHttpRequest()\n xhr.open('GET', url, true)\n xhr.onload = () => {\n if (xhr.status >= 200 && xhr.status < 400) {\n successCallback(xhr.responseText, xhr)\n } else {\n failureCallback('Request failed', xhr)\n }\n }\n xhr.onerror = () => failureCallback('Request failed', xhr)\n xhr.send(null)\n}\n\nfunction expandICalEvents(iCalExpander: IcalExpander, range: DateRange): EventInput[] {\n // expand the range. because our `range` is timeZone-agnostic UTC\n // or maybe because ical.js always produces dates in local time? i forget\n let rangeStart = addDays(range.start, -1)\n let rangeEnd = addDays(range.end, 1)\n\n let iCalRes = iCalExpander.between(rangeStart, rangeEnd) // end inclusive. will give extra results\n let expanded: EventInput[] = []\n\n // TODO: instead of using startDate/endDate.toString to communicate allDay,\n // we can query startDate/endDate.isDate. More efficient to avoid formatting/reparsing.\n\n // single events\n for (let iCalEvent of iCalRes.events) {\n expanded.push({\n ...buildNonDateProps(iCalEvent),\n start: iCalEvent.startDate.toString(),\n end: (specifiesEnd(iCalEvent) && iCalEvent.endDate)\n ? iCalEvent.endDate.toString()\n : null,\n })\n }\n\n // recurring event instances\n for (let iCalOccurence of iCalRes.occurrences) {\n let iCalEvent = iCalOccurence.item\n expanded.push({\n ...buildNonDateProps(iCalEvent),\n start: iCalOccurence.startDate.toString(),\n end: (specifiesEnd(iCalEvent) && iCalOccurence.endDate)\n ? iCalOccurence.endDate.toString()\n : null,\n })\n }\n\n return expanded\n}\n\nfunction buildNonDateProps(iCalEvent: ICAL.Event): EventInput {\n return {\n title: iCalEvent.summary,\n url: extractEventUrl(iCalEvent),\n extendedProps: {\n location: iCalEvent.location,\n organizer: iCalEvent.organizer,\n description: iCalEvent.description,\n },\n }\n}\n\nfunction extractEventUrl(iCalEvent: ICAL.Event): string {\n let urlProp = iCalEvent.component.getFirstProperty('url')\n return urlProp ? urlProp.getFirstValue() : ''\n}\n\nfunction specifiesEnd(iCalEvent: ICAL.Event) {\n return Boolean(iCalEvent.component.getFirstProperty('dtend')) ||\n Boolean(iCalEvent.component.getFirstProperty('duration'))\n}\n\nexport default createPlugin({\n eventSourceDefs: [eventSourceDef],\n})\n"],"names":[],"mappings":";;;;;;;;AAAA;MASa,YAAY;IACvB,YAAY,IAAI;QACd,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,IAAI,IAAI,GAAG,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAC5E,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,IAAI,IAAI,GAAG,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;QAEtF,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACrC,IAAI,CAAC,SAAS,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACnD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;QAEjG,IAAI,IAAI,C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