ical-generator 3.6.2-develop.4 → 4.0.0-develop.1
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/README.md +2 -2
- package/dist/index.d.mts +2108 -0
- package/dist/index.d.ts +2073 -11
- package/dist/index.js +76 -78
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +77 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +18 -11
- package/src/calendar.ts +2 -2
- package/src/event.ts +1 -1
- package/src/index.ts +2 -7
- package/src/tools.ts +1 -1
- package/dist/alarm.d.ts +0 -326
- package/dist/alarm.js +0 -279
- package/dist/alarm.js.map +0 -1
- package/dist/attendee.d.ts +0 -306
- package/dist/attendee.js +0 -324
- package/dist/attendee.js.map +0 -1
- package/dist/calendar.d.ts +0 -490
- package/dist/calendar.js +0 -417
- package/dist/calendar.js.map +0 -1
- package/dist/category.d.ts +0 -57
- package/dist/category.js +0 -65
- package/dist/category.js.map +0 -1
- package/dist/event.d.ts +0 -776
- package/dist/event.js +0 -820
- package/dist/event.js.map +0 -1
- package/dist/tools.d.ts +0 -67
- package/dist/tools.js +0 -341
- package/dist/tools.js.map +0 -1
- package/dist/types.d.ts +0 -97
- package/dist/types.js +0 -24
- package/dist/types.js.map +0 -1
package/dist/alarm.d.ts
DELETED
|
@@ -1,326 +0,0 @@
|
|
|
1
|
-
import ICalEvent from './event';
|
|
2
|
-
import { ICalDateTimeValue } from './types';
|
|
3
|
-
export declare enum ICalAlarmType {
|
|
4
|
-
display = "display",
|
|
5
|
-
audio = "audio"
|
|
6
|
-
}
|
|
7
|
-
export type ICalAlarmTypeValue = keyof ICalAlarmType;
|
|
8
|
-
export interface ICalAttachment {
|
|
9
|
-
uri: string;
|
|
10
|
-
mime: string | null;
|
|
11
|
-
}
|
|
12
|
-
export interface ICalAlarmData {
|
|
13
|
-
type?: ICalAlarmType | null;
|
|
14
|
-
trigger?: number | ICalDateTimeValue | null;
|
|
15
|
-
triggerBefore?: number | ICalDateTimeValue | null;
|
|
16
|
-
triggerAfter?: number | ICalDateTimeValue | null;
|
|
17
|
-
repeat?: number | null;
|
|
18
|
-
interval?: number | null;
|
|
19
|
-
attach?: string | ICalAttachment | null;
|
|
20
|
-
description?: string | null;
|
|
21
|
-
x?: {
|
|
22
|
-
key: string;
|
|
23
|
-
value: string;
|
|
24
|
-
}[] | [string, string][] | Record<string, string>;
|
|
25
|
-
}
|
|
26
|
-
export interface ICalAlarmJSONData {
|
|
27
|
-
type: ICalAlarmType | null;
|
|
28
|
-
trigger: string | number | null;
|
|
29
|
-
repeat: number | null;
|
|
30
|
-
interval: number | null;
|
|
31
|
-
attach: ICalAttachment | null;
|
|
32
|
-
description: string | null;
|
|
33
|
-
x: {
|
|
34
|
-
key: string;
|
|
35
|
-
value: string;
|
|
36
|
-
}[];
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Usually you get an `ICalAlarm` object like this:
|
|
40
|
-
*
|
|
41
|
-
* ```javascript
|
|
42
|
-
* import ical from 'ical-generator';
|
|
43
|
-
* const calendar = ical();
|
|
44
|
-
* const event = calendar.createEvent();
|
|
45
|
-
* const alarm = event.createAlarm();
|
|
46
|
-
* ```
|
|
47
|
-
*
|
|
48
|
-
* You can also use the [[`ICalAlarm`]] object directly:
|
|
49
|
-
*
|
|
50
|
-
* ```javascript
|
|
51
|
-
* import ical, {ICalAlarm} from 'ical-generator';
|
|
52
|
-
* const alarm = new ICalAlarm();
|
|
53
|
-
* event.alarms([alarm]);
|
|
54
|
-
* ```
|
|
55
|
-
*/
|
|
56
|
-
export default class ICalAlarm {
|
|
57
|
-
private readonly data;
|
|
58
|
-
private readonly event;
|
|
59
|
-
/**
|
|
60
|
-
* Constructor of [[`ICalAttendee`]]. The event reference is required
|
|
61
|
-
* to query the calendar's timezone and summary when required.
|
|
62
|
-
*
|
|
63
|
-
* @param data Alarm Data
|
|
64
|
-
* @param calendar Reference to ICalEvent object
|
|
65
|
-
*/
|
|
66
|
-
constructor(data: ICalAlarmData, event: ICalEvent);
|
|
67
|
-
/**
|
|
68
|
-
* Get the alarm type
|
|
69
|
-
* @since 0.2.1
|
|
70
|
-
*/
|
|
71
|
-
type(type: ICalAlarmType | null): this;
|
|
72
|
-
/**
|
|
73
|
-
* Set the alarm type. See [[`ICalAlarmType`]]
|
|
74
|
-
* for available status options.
|
|
75
|
-
* @since 0.2.1
|
|
76
|
-
*/
|
|
77
|
-
type(): ICalAlarmType | null;
|
|
78
|
-
/**
|
|
79
|
-
* Get the trigger time for the alarm. Can either
|
|
80
|
-
* be a date and time value ([[`ICalDateTimeValue`]]) or
|
|
81
|
-
* a number, which will represent the seconds between
|
|
82
|
-
* alarm and event start. The number is negative, if the
|
|
83
|
-
* alarm is triggered after the event started.
|
|
84
|
-
*
|
|
85
|
-
* @since 0.2.1
|
|
86
|
-
*/
|
|
87
|
-
trigger(): number | ICalDateTimeValue | null;
|
|
88
|
-
/**
|
|
89
|
-
* Use this method to set the alarm time.
|
|
90
|
-
*
|
|
91
|
-
* ```javascript
|
|
92
|
-
* const cal = ical();
|
|
93
|
-
* const event = cal.createEvent();
|
|
94
|
-
* const alarm = cal.createAlarm();
|
|
95
|
-
*
|
|
96
|
-
* alarm.trigger(600); // -> 10 minutes before event starts
|
|
97
|
-
* alarm.trigger(new Date()); // -> now
|
|
98
|
-
* ```
|
|
99
|
-
*
|
|
100
|
-
* You can use any supported date object, see
|
|
101
|
-
* [readme](https://github.com/sebbo2002/ical-generator#-date-time--timezones)
|
|
102
|
-
* for details about supported values and timezone handling.
|
|
103
|
-
*
|
|
104
|
-
* @since 0.2.1
|
|
105
|
-
*/
|
|
106
|
-
trigger(trigger: number | ICalDateTimeValue | Date | null): this;
|
|
107
|
-
/**
|
|
108
|
-
* Get the trigger time for the alarm. Can either
|
|
109
|
-
* be a date and time value ([[`ICalDateTimeValue`]]) or
|
|
110
|
-
* a number, which will represent the seconds between
|
|
111
|
-
* alarm and event start. The number is negative, if the
|
|
112
|
-
* alarm is triggered before the event started.
|
|
113
|
-
*
|
|
114
|
-
* @since 0.2.1
|
|
115
|
-
*/
|
|
116
|
-
triggerAfter(): number | ICalDateTimeValue | null;
|
|
117
|
-
/**
|
|
118
|
-
* Use this method to set the alarm time. Unlike `trigger`, this time
|
|
119
|
-
* the alarm takes place after the event has started.
|
|
120
|
-
*
|
|
121
|
-
* ```javascript
|
|
122
|
-
* const cal = ical();
|
|
123
|
-
* const event = cal.createEvent();
|
|
124
|
-
* const alarm = cal.createAlarm();
|
|
125
|
-
*
|
|
126
|
-
* alarm.trigger(600); // -> 10 minutes after event starts
|
|
127
|
-
* ```
|
|
128
|
-
*
|
|
129
|
-
* You can use any supported date object, see
|
|
130
|
-
* [readme](https://github.com/sebbo2002/ical-generator#-date-time--timezones)
|
|
131
|
-
* for details about supported values and timezone handling.
|
|
132
|
-
*
|
|
133
|
-
* @since 0.2.1
|
|
134
|
-
*/
|
|
135
|
-
triggerAfter(trigger: number | ICalDateTimeValue | null): this;
|
|
136
|
-
/**
|
|
137
|
-
* Get the trigger time for the alarm. Can either
|
|
138
|
-
* be a date and time value ([[`ICalDateTimeValue`]]) or
|
|
139
|
-
* a number, which will represent the seconds between
|
|
140
|
-
* alarm and event start. The number is negative, if the
|
|
141
|
-
* alarm is triggered after the event started.
|
|
142
|
-
*
|
|
143
|
-
* @since 0.2.1
|
|
144
|
-
* @alias trigger
|
|
145
|
-
*/
|
|
146
|
-
triggerBefore(trigger: number | ICalDateTimeValue | null): this;
|
|
147
|
-
/**
|
|
148
|
-
* Use this method to set the alarm time.
|
|
149
|
-
*
|
|
150
|
-
* ```javascript
|
|
151
|
-
* const cal = ical();
|
|
152
|
-
* const event = cal.createEvent();
|
|
153
|
-
* const alarm = cal.createAlarm();
|
|
154
|
-
*
|
|
155
|
-
* alarm.trigger(600); // -> 10 minutes before event starts
|
|
156
|
-
* alarm.trigger(new Date()); // -> now
|
|
157
|
-
* ```
|
|
158
|
-
*
|
|
159
|
-
* You can use any supported date object, see
|
|
160
|
-
* [readme](https://github.com/sebbo2002/ical-generator#-date-time--timezones)
|
|
161
|
-
* for details about supported values and timezone handling.
|
|
162
|
-
*
|
|
163
|
-
* @since 0.2.1
|
|
164
|
-
* @alias trigger
|
|
165
|
-
*/
|
|
166
|
-
triggerBefore(): number | ICalDateTimeValue | null;
|
|
167
|
-
/**
|
|
168
|
-
* Get Alarm Repetitions
|
|
169
|
-
* @since 0.2.1
|
|
170
|
-
*/
|
|
171
|
-
repeat(): number | null;
|
|
172
|
-
/**
|
|
173
|
-
* Set Alarm Repetitions. Use this to repeat the alarm.
|
|
174
|
-
*
|
|
175
|
-
* ```javascript
|
|
176
|
-
* const cal = ical();
|
|
177
|
-
* const event = cal.createEvent();
|
|
178
|
-
*
|
|
179
|
-
* // repeat the alarm 4 times every 5 minutes…
|
|
180
|
-
* cal.createAlarm({
|
|
181
|
-
* repeat: 4,
|
|
182
|
-
* interval: 300
|
|
183
|
-
* });
|
|
184
|
-
* ```
|
|
185
|
-
*
|
|
186
|
-
* @since 0.2.1
|
|
187
|
-
*/
|
|
188
|
-
repeat(repeat: number | null): this;
|
|
189
|
-
/**
|
|
190
|
-
* Get Repeat Interval
|
|
191
|
-
* @since 0.2.1
|
|
192
|
-
*/
|
|
193
|
-
interval(interval: number | null): this;
|
|
194
|
-
/**
|
|
195
|
-
* Set Repeat Interval
|
|
196
|
-
*
|
|
197
|
-
* ```javascript
|
|
198
|
-
* const cal = ical();
|
|
199
|
-
* const event = cal.createEvent();
|
|
200
|
-
*
|
|
201
|
-
* // repeat the alarm 4 times every 5 minutes…
|
|
202
|
-
* cal.createAlarm({
|
|
203
|
-
* repeat: 4,
|
|
204
|
-
* interval: 300
|
|
205
|
-
* });
|
|
206
|
-
* ```
|
|
207
|
-
*
|
|
208
|
-
* @since 0.2.1
|
|
209
|
-
*/
|
|
210
|
-
interval(): number | null;
|
|
211
|
-
/**
|
|
212
|
-
* Get Attachment
|
|
213
|
-
* @since 0.2.1
|
|
214
|
-
*/
|
|
215
|
-
attach(): {
|
|
216
|
-
uri: string;
|
|
217
|
-
mime: string | null;
|
|
218
|
-
} | null;
|
|
219
|
-
/**
|
|
220
|
-
* Set Alarm attachment. Used to set the alarm sound
|
|
221
|
-
* if alarm type is audio. Defaults to "Basso".
|
|
222
|
-
*
|
|
223
|
-
* ```javascript
|
|
224
|
-
* const cal = ical();
|
|
225
|
-
* const event = cal.createEvent();
|
|
226
|
-
*
|
|
227
|
-
* event.createAlarm({
|
|
228
|
-
* attach: 'https://example.com/notification.aud'
|
|
229
|
-
* });
|
|
230
|
-
*
|
|
231
|
-
* // OR
|
|
232
|
-
*
|
|
233
|
-
* event.createAlarm({
|
|
234
|
-
* attach: {
|
|
235
|
-
* uri: 'https://example.com/notification.aud',
|
|
236
|
-
* mime: 'audio/basic'
|
|
237
|
-
* }
|
|
238
|
-
* });
|
|
239
|
-
* ```
|
|
240
|
-
*
|
|
241
|
-
* @since 0.2.1
|
|
242
|
-
*/
|
|
243
|
-
attach(attachment: {
|
|
244
|
-
uri: string;
|
|
245
|
-
mime?: string | null;
|
|
246
|
-
} | string | null): this;
|
|
247
|
-
/**
|
|
248
|
-
* Get the alarm description. Used to set the alarm message
|
|
249
|
-
* if alarm type is display. Defaults to the event's summary.
|
|
250
|
-
*
|
|
251
|
-
* @since 0.2.1
|
|
252
|
-
*/
|
|
253
|
-
description(): string | null;
|
|
254
|
-
/**
|
|
255
|
-
* Set the alarm description. Used to set the alarm message
|
|
256
|
-
* if alarm type is display. Defaults to the event's summary.
|
|
257
|
-
*
|
|
258
|
-
* @since 0.2.1
|
|
259
|
-
*/
|
|
260
|
-
description(description: string | null): this;
|
|
261
|
-
/**
|
|
262
|
-
* Set X-* attributes. Woun't filter double attributes,
|
|
263
|
-
* which are also added by another method (e.g. type),
|
|
264
|
-
* so these attributes may be inserted twice.
|
|
265
|
-
*
|
|
266
|
-
* ```javascript
|
|
267
|
-
* alarm.x([
|
|
268
|
-
* {
|
|
269
|
-
* key: "X-MY-CUSTOM-ATTR",
|
|
270
|
-
* value: "1337!"
|
|
271
|
-
* }
|
|
272
|
-
* ]);
|
|
273
|
-
*
|
|
274
|
-
* alarm.x([
|
|
275
|
-
* ["X-MY-CUSTOM-ATTR", "1337!"]
|
|
276
|
-
* ]);
|
|
277
|
-
*
|
|
278
|
-
* alarm.x({
|
|
279
|
-
* "X-MY-CUSTOM-ATTR": "1337!"
|
|
280
|
-
* });
|
|
281
|
-
* ```
|
|
282
|
-
*
|
|
283
|
-
* @since 1.9.0
|
|
284
|
-
*/
|
|
285
|
-
x(keyOrArray: {
|
|
286
|
-
key: string;
|
|
287
|
-
value: string;
|
|
288
|
-
}[] | [string, string][] | Record<string, string>): this;
|
|
289
|
-
/**
|
|
290
|
-
* Set a X-* attribute. Woun't filter double attributes,
|
|
291
|
-
* which are also added by another method (e.g. type),
|
|
292
|
-
* so these attributes may be inserted twice.
|
|
293
|
-
*
|
|
294
|
-
* ```javascript
|
|
295
|
-
* alarm.x("X-MY-CUSTOM-ATTR", "1337!");
|
|
296
|
-
* ```
|
|
297
|
-
*
|
|
298
|
-
* @since 1.9.0
|
|
299
|
-
*/
|
|
300
|
-
x(keyOrArray: string, value: string): this;
|
|
301
|
-
/**
|
|
302
|
-
* Get all custom X-* attributes.
|
|
303
|
-
* @since 1.9.0
|
|
304
|
-
*/
|
|
305
|
-
x(): {
|
|
306
|
-
key: string;
|
|
307
|
-
value: string;
|
|
308
|
-
}[];
|
|
309
|
-
/**
|
|
310
|
-
* Return a shallow copy of the alarm's options for JSON stringification.
|
|
311
|
-
* Third party objects like moment.js values are stringified as well. Can
|
|
312
|
-
* be used for persistence.
|
|
313
|
-
*
|
|
314
|
-
* @since 0.2.4
|
|
315
|
-
*/
|
|
316
|
-
toJSON(): ICalAlarmJSONData;
|
|
317
|
-
/**
|
|
318
|
-
* Return generated event as a string.
|
|
319
|
-
*
|
|
320
|
-
* ```javascript
|
|
321
|
-
* const alarm = event.createAlarm();
|
|
322
|
-
* console.log(alarm.toString()); // → BEGIN:VALARM…
|
|
323
|
-
* ```
|
|
324
|
-
*/
|
|
325
|
-
toString(): string;
|
|
326
|
-
}
|
package/dist/alarm.js
DELETED
|
@@ -1,279 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ICalAlarmType = void 0;
|
|
4
|
-
const tools_1 = require("./tools");
|
|
5
|
-
var ICalAlarmType;
|
|
6
|
-
(function (ICalAlarmType) {
|
|
7
|
-
ICalAlarmType["display"] = "display";
|
|
8
|
-
ICalAlarmType["audio"] = "audio";
|
|
9
|
-
})(ICalAlarmType = exports.ICalAlarmType || (exports.ICalAlarmType = {}));
|
|
10
|
-
/**
|
|
11
|
-
* Usually you get an `ICalAlarm` object like this:
|
|
12
|
-
*
|
|
13
|
-
* ```javascript
|
|
14
|
-
* import ical from 'ical-generator';
|
|
15
|
-
* const calendar = ical();
|
|
16
|
-
* const event = calendar.createEvent();
|
|
17
|
-
* const alarm = event.createAlarm();
|
|
18
|
-
* ```
|
|
19
|
-
*
|
|
20
|
-
* You can also use the [[`ICalAlarm`]] object directly:
|
|
21
|
-
*
|
|
22
|
-
* ```javascript
|
|
23
|
-
* import ical, {ICalAlarm} from 'ical-generator';
|
|
24
|
-
* const alarm = new ICalAlarm();
|
|
25
|
-
* event.alarms([alarm]);
|
|
26
|
-
* ```
|
|
27
|
-
*/
|
|
28
|
-
class ICalAlarm {
|
|
29
|
-
/**
|
|
30
|
-
* Constructor of [[`ICalAttendee`]]. The event reference is required
|
|
31
|
-
* to query the calendar's timezone and summary when required.
|
|
32
|
-
*
|
|
33
|
-
* @param data Alarm Data
|
|
34
|
-
* @param calendar Reference to ICalEvent object
|
|
35
|
-
*/
|
|
36
|
-
constructor(data, event) {
|
|
37
|
-
this.data = {
|
|
38
|
-
type: null,
|
|
39
|
-
trigger: null,
|
|
40
|
-
repeat: null,
|
|
41
|
-
interval: null,
|
|
42
|
-
attach: null,
|
|
43
|
-
description: null,
|
|
44
|
-
x: []
|
|
45
|
-
};
|
|
46
|
-
this.event = event;
|
|
47
|
-
if (!event) {
|
|
48
|
-
throw new Error('`event` option required!');
|
|
49
|
-
}
|
|
50
|
-
data.type !== undefined && this.type(data.type);
|
|
51
|
-
data.trigger !== undefined && this.trigger(data.trigger);
|
|
52
|
-
data.triggerBefore !== undefined && this.triggerBefore(data.triggerBefore);
|
|
53
|
-
data.triggerAfter !== undefined && this.triggerAfter(data.triggerAfter);
|
|
54
|
-
data.repeat !== undefined && this.repeat(data.repeat);
|
|
55
|
-
data.interval !== undefined && this.interval(data.interval);
|
|
56
|
-
data.attach !== undefined && this.attach(data.attach);
|
|
57
|
-
data.description !== undefined && this.description(data.description);
|
|
58
|
-
data.x !== undefined && this.x(data.x);
|
|
59
|
-
}
|
|
60
|
-
type(type) {
|
|
61
|
-
if (type === undefined) {
|
|
62
|
-
return this.data.type;
|
|
63
|
-
}
|
|
64
|
-
if (!type) {
|
|
65
|
-
this.data.type = null;
|
|
66
|
-
return this;
|
|
67
|
-
}
|
|
68
|
-
if (!Object.keys(ICalAlarmType).includes(type)) {
|
|
69
|
-
throw new Error('`type` is not correct, must be either `display` or `audio`!');
|
|
70
|
-
}
|
|
71
|
-
this.data.type = type;
|
|
72
|
-
return this;
|
|
73
|
-
}
|
|
74
|
-
trigger(trigger) {
|
|
75
|
-
// Getter
|
|
76
|
-
if (trigger === undefined && typeof this.data.trigger === 'number') {
|
|
77
|
-
return -1 * this.data.trigger;
|
|
78
|
-
}
|
|
79
|
-
if (trigger === undefined && this.data.trigger) {
|
|
80
|
-
return this.data.trigger;
|
|
81
|
-
}
|
|
82
|
-
if (trigger === undefined) {
|
|
83
|
-
return null;
|
|
84
|
-
}
|
|
85
|
-
// Setter
|
|
86
|
-
if (!trigger) {
|
|
87
|
-
this.data.trigger = null;
|
|
88
|
-
}
|
|
89
|
-
else if (typeof trigger === 'number' && isFinite(trigger)) {
|
|
90
|
-
this.data.trigger = -1 * trigger;
|
|
91
|
-
}
|
|
92
|
-
else if (typeof trigger === 'number') {
|
|
93
|
-
throw new Error('`trigger` is not correct, must be a finite number or a supported date!');
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
this.data.trigger = (0, tools_1.checkDate)(trigger, 'trigger');
|
|
97
|
-
}
|
|
98
|
-
return this;
|
|
99
|
-
}
|
|
100
|
-
triggerAfter(trigger) {
|
|
101
|
-
if (trigger === undefined) {
|
|
102
|
-
return this.data.trigger;
|
|
103
|
-
}
|
|
104
|
-
return this.trigger(typeof trigger === 'number' ? -1 * trigger : trigger);
|
|
105
|
-
}
|
|
106
|
-
triggerBefore(trigger) {
|
|
107
|
-
if (trigger === undefined) {
|
|
108
|
-
return this.trigger();
|
|
109
|
-
}
|
|
110
|
-
return this.trigger(trigger);
|
|
111
|
-
}
|
|
112
|
-
repeat(repeat) {
|
|
113
|
-
if (repeat === undefined) {
|
|
114
|
-
return this.data.repeat;
|
|
115
|
-
}
|
|
116
|
-
if (!repeat) {
|
|
117
|
-
this.data.repeat = null;
|
|
118
|
-
return this;
|
|
119
|
-
}
|
|
120
|
-
if (typeof repeat !== 'number' || !isFinite(repeat)) {
|
|
121
|
-
throw new Error('`repeat` is not correct, must be numeric!');
|
|
122
|
-
}
|
|
123
|
-
this.data.repeat = repeat;
|
|
124
|
-
return this;
|
|
125
|
-
}
|
|
126
|
-
interval(interval) {
|
|
127
|
-
if (interval === undefined) {
|
|
128
|
-
return this.data.interval || null;
|
|
129
|
-
}
|
|
130
|
-
if (!interval) {
|
|
131
|
-
this.data.interval = null;
|
|
132
|
-
return this;
|
|
133
|
-
}
|
|
134
|
-
if (typeof interval !== 'number' || !isFinite(interval)) {
|
|
135
|
-
throw new Error('`interval` is not correct, must be numeric!');
|
|
136
|
-
}
|
|
137
|
-
this.data.interval = interval;
|
|
138
|
-
return this;
|
|
139
|
-
}
|
|
140
|
-
attach(attachment) {
|
|
141
|
-
if (attachment === undefined) {
|
|
142
|
-
return this.data.attach;
|
|
143
|
-
}
|
|
144
|
-
if (!attachment) {
|
|
145
|
-
this.data.attach = null;
|
|
146
|
-
return this;
|
|
147
|
-
}
|
|
148
|
-
let _attach = null;
|
|
149
|
-
if (typeof attachment === 'string') {
|
|
150
|
-
_attach = {
|
|
151
|
-
uri: attachment,
|
|
152
|
-
mime: null
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
else if (typeof attachment === 'object') {
|
|
156
|
-
_attach = {
|
|
157
|
-
uri: attachment.uri,
|
|
158
|
-
mime: attachment.mime || null
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
else {
|
|
162
|
-
throw new Error('`attachment` needs to be a valid formed string or an object. See https://sebbo2002.github.io/' +
|
|
163
|
-
'ical-generator/develop/reference/classes/ICalAlarm.html#attach');
|
|
164
|
-
}
|
|
165
|
-
if (!_attach.uri) {
|
|
166
|
-
throw new Error('`attach.uri` is empty!');
|
|
167
|
-
}
|
|
168
|
-
this.data.attach = {
|
|
169
|
-
uri: _attach.uri,
|
|
170
|
-
mime: _attach.mime
|
|
171
|
-
};
|
|
172
|
-
return this;
|
|
173
|
-
}
|
|
174
|
-
description(description) {
|
|
175
|
-
if (description === undefined) {
|
|
176
|
-
return this.data.description;
|
|
177
|
-
}
|
|
178
|
-
if (!description) {
|
|
179
|
-
this.data.description = null;
|
|
180
|
-
return this;
|
|
181
|
-
}
|
|
182
|
-
this.data.description = description;
|
|
183
|
-
return this;
|
|
184
|
-
}
|
|
185
|
-
x(keyOrArray, value) {
|
|
186
|
-
if (keyOrArray === undefined) {
|
|
187
|
-
return (0, tools_1.addOrGetCustomAttributes)(this.data);
|
|
188
|
-
}
|
|
189
|
-
if (typeof keyOrArray === 'string' && typeof value === 'string') {
|
|
190
|
-
(0, tools_1.addOrGetCustomAttributes)(this.data, keyOrArray, value);
|
|
191
|
-
}
|
|
192
|
-
else if (typeof keyOrArray === 'object') {
|
|
193
|
-
(0, tools_1.addOrGetCustomAttributes)(this.data, keyOrArray);
|
|
194
|
-
}
|
|
195
|
-
else {
|
|
196
|
-
throw new Error('Either key or value is not a string!');
|
|
197
|
-
}
|
|
198
|
-
return this;
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* Return a shallow copy of the alarm's options for JSON stringification.
|
|
202
|
-
* Third party objects like moment.js values are stringified as well. Can
|
|
203
|
-
* be used for persistence.
|
|
204
|
-
*
|
|
205
|
-
* @since 0.2.4
|
|
206
|
-
*/
|
|
207
|
-
toJSON() {
|
|
208
|
-
const trigger = this.trigger();
|
|
209
|
-
return Object.assign({}, this.data, {
|
|
210
|
-
trigger: typeof trigger === 'number' ? trigger : (0, tools_1.toJSON)(trigger),
|
|
211
|
-
x: this.x()
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
/**
|
|
215
|
-
* Return generated event as a string.
|
|
216
|
-
*
|
|
217
|
-
* ```javascript
|
|
218
|
-
* const alarm = event.createAlarm();
|
|
219
|
-
* console.log(alarm.toString()); // → BEGIN:VALARM…
|
|
220
|
-
* ```
|
|
221
|
-
*/
|
|
222
|
-
toString() {
|
|
223
|
-
let g = 'BEGIN:VALARM\r\n';
|
|
224
|
-
if (!this.data.type) {
|
|
225
|
-
throw new Error('No value for `type` in ICalAlarm given!');
|
|
226
|
-
}
|
|
227
|
-
if (!this.data.trigger) {
|
|
228
|
-
throw new Error('No value for `trigger` in ICalAlarm given!');
|
|
229
|
-
}
|
|
230
|
-
// ACTION
|
|
231
|
-
g += 'ACTION:' + this.data.type.toUpperCase() + '\r\n';
|
|
232
|
-
if (typeof this.data.trigger === 'number' && this.data.trigger > 0) {
|
|
233
|
-
g += 'TRIGGER;RELATED=END:' + (0, tools_1.toDurationString)(this.data.trigger) + '\r\n';
|
|
234
|
-
}
|
|
235
|
-
else if (typeof this.data.trigger === 'number') {
|
|
236
|
-
g += 'TRIGGER:' + (0, tools_1.toDurationString)(this.data.trigger) + '\r\n';
|
|
237
|
-
}
|
|
238
|
-
else {
|
|
239
|
-
g += 'TRIGGER;VALUE=DATE-TIME:' + (0, tools_1.formatDate)(this.event.timezone(), this.data.trigger) + '\r\n';
|
|
240
|
-
}
|
|
241
|
-
// REPEAT
|
|
242
|
-
if (this.data.repeat && !this.data.interval) {
|
|
243
|
-
throw new Error('No value for `interval` in ICalAlarm given, but required for `repeat`!');
|
|
244
|
-
}
|
|
245
|
-
if (this.data.repeat) {
|
|
246
|
-
g += 'REPEAT:' + this.data.repeat + '\r\n';
|
|
247
|
-
}
|
|
248
|
-
// INTERVAL
|
|
249
|
-
if (this.data.interval && !this.data.repeat) {
|
|
250
|
-
throw new Error('No value for `repeat` in ICalAlarm given, but required for `interval`!');
|
|
251
|
-
}
|
|
252
|
-
if (this.data.interval) {
|
|
253
|
-
g += 'DURATION:' + (0, tools_1.toDurationString)(this.data.interval) + '\r\n';
|
|
254
|
-
}
|
|
255
|
-
// ATTACH
|
|
256
|
-
if (this.data.type === 'audio' && this.data.attach && this.data.attach.mime) {
|
|
257
|
-
g += 'ATTACH;FMTTYPE=' + (0, tools_1.escape)(this.data.attach.mime, false) + ':' + (0, tools_1.escape)(this.data.attach.uri, false) + '\r\n';
|
|
258
|
-
}
|
|
259
|
-
else if (this.data.type === 'audio' && this.data.attach) {
|
|
260
|
-
g += 'ATTACH;VALUE=URI:' + (0, tools_1.escape)(this.data.attach.uri, false) + '\r\n';
|
|
261
|
-
}
|
|
262
|
-
else if (this.data.type === 'audio') {
|
|
263
|
-
g += 'ATTACH;VALUE=URI:Basso\r\n';
|
|
264
|
-
}
|
|
265
|
-
// DESCRIPTION
|
|
266
|
-
if (this.data.type === 'display' && this.data.description) {
|
|
267
|
-
g += 'DESCRIPTION:' + (0, tools_1.escape)(this.data.description, false) + '\r\n';
|
|
268
|
-
}
|
|
269
|
-
else if (this.data.type === 'display') {
|
|
270
|
-
g += 'DESCRIPTION:' + (0, tools_1.escape)(this.event.summary(), false) + '\r\n';
|
|
271
|
-
}
|
|
272
|
-
// CUSTOM X ATTRIBUTES
|
|
273
|
-
g += (0, tools_1.generateCustomAttributes)(this.data);
|
|
274
|
-
g += 'END:VALARM\r\n';
|
|
275
|
-
return g;
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
exports.default = ICalAlarm;
|
|
279
|
-
//# sourceMappingURL=alarm.js.map
|
package/dist/alarm.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"alarm.js","sourceRoot":"","sources":["../src/alarm.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAGb,mCAQiB;AAIjB,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,oCAAmB,CAAA;IACnB,gCAAe,CAAA;AACnB,CAAC,EAHW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAGxB;AA0CD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAqB,SAAS;IAI1B;;;;;;OAMG;IACH,YAAa,IAAmB,EAAE,KAAgB;QAC9C,IAAI,CAAC,IAAI,GAAG;YACR,IAAI,EAAE,IAAI;YACV,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,IAAI;YACZ,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE,IAAI;YACZ,WAAW,EAAE,IAAI;YACjB,CAAC,EAAE,EAAE;SACR,CAAC;QAEF,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,EAAE;YACR,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;SAC/C;QAED,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChD,IAAI,CAAC,OAAO,KAAK,SAAS,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzD,IAAI,CAAC,aAAa,KAAK,SAAS,IAAI,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC3E,IAAI,CAAC,YAAY,KAAK,SAAS,IAAI,IAAI,CAAC,YA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