@ebarooni/capacitor-calendar 0.10.1 → 0.12.0
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 +41 -33
- package/android/src/main/java/dev/barooni/capacitor/calendar/CapacitorCalendar.kt +30 -0
- package/android/src/main/java/dev/barooni/capacitor/calendar/CapacitorCalendarPlugin.kt +18 -3
- package/dist/docs.json +70 -9
- package/dist/esm/definitions.d.ts +50 -7
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/index.d.ts +2 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/schemas/enums/plugin-permission.d.ts +4 -4
- package/dist/esm/schemas/enums/plugin-permission.js +4 -4
- package/dist/esm/schemas/enums/plugin-permission.js.map +1 -1
- package/dist/esm/web.d.ts +9 -1
- package/dist/esm/web.js +3 -0
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +7 -4
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +7 -4
- package/dist/plugin.js.map +1 -1
- package/ios/Plugin/CapacitorCalendar.swift +31 -0
- package/ios/Plugin/CapacitorCalendarPlugin.m +1 -0
- package/ios/Plugin/CapacitorCalendarPlugin.swift +24 -2
- package/ios/Plugin/CapacitorReminders.swift +2 -1
- package/ios/Plugin/EventDeleteResults.swift +14 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,15 +9,17 @@
|
|
|
9
9
|
<a href="https://capacitor-calendar.pages.dev/"><strong>https://capacitor-calendar.pages.dev</strong></a>
|
|
10
10
|
<br>
|
|
11
11
|
</p>
|
|
12
|
+
<p align="center">
|
|
13
|
+
<a href="SECURITY.md#deployment-targets">Deployment Targets</a>
|
|
14
|
+
<br>
|
|
15
|
+
</p>
|
|
12
16
|
|
|
13
17
|
## Table of Contents
|
|
14
18
|
|
|
15
19
|
- [Install](#install)
|
|
16
|
-
- [Support Range](#support-range)
|
|
17
20
|
- [Demo](#demo--click-for-details-)
|
|
18
|
-
- [MVP](#mvp)
|
|
19
21
|
- [Permissions](#permissions)
|
|
20
|
-
- [Contributions](
|
|
22
|
+
- [Contributions](#-contributions)
|
|
21
23
|
- [API](#api)
|
|
22
24
|
|
|
23
25
|
## Install
|
|
@@ -27,13 +29,6 @@ npm install @ebarooni/capacitor-calendar
|
|
|
27
29
|
npx cap sync
|
|
28
30
|
```
|
|
29
31
|
|
|
30
|
-
## Support Range
|
|
31
|
-
|
|
32
|
-
| Platform | range |
|
|
33
|
-
| :------: | :-----------------------: |
|
|
34
|
-
| iOS | ≥ 13 |
|
|
35
|
-
| Android | ≥ 7 (SDK 24 or Nougat) |
|
|
36
|
-
|
|
37
32
|
## [Demo (click for details)](./example/README.md)
|
|
38
33
|
|
|
39
34
|
| iOS 17 | Android 14 |
|
|
@@ -45,18 +40,6 @@ On iOS, `readCalendar` permission is not needed when you a
|
|
|
45
40
|
re creating an event using the native prompt.
|
|
46
41
|
The video is just for showing the functionality, otherwise the `createEventWithPrompt` method works without the `readCalendar` authorization.
|
|
47
42
|
|
|
48
|
-
## MVP
|
|
49
|
-
|
|
50
|
-
- ✅ Choose calendars with prompt (iOS)
|
|
51
|
-
- ✅ Get list of available calendars
|
|
52
|
-
- ✅ Get default calendar
|
|
53
|
-
- ✅ Create calendar events without native prompts
|
|
54
|
-
- ✅️ Create reminders (iOS)
|
|
55
|
-
- ✅ Open calendar app at a specific date
|
|
56
|
-
- ✅ Open reminders app (iOS)
|
|
57
|
-
- ✅️ Find calendar events
|
|
58
|
-
- ⌛️ Delete calendar events
|
|
59
|
-
|
|
60
43
|
## Permissions
|
|
61
44
|
|
|
62
45
|
To be able to use the plugin, you will need to add the required permissions to your app. The required platform-specific
|
|
@@ -65,16 +48,17 @@ permissions can be found below:
|
|
|
65
48
|
- [iOS](./ios/PERMISSIONS.md)
|
|
66
49
|
- [Android](./android/PERMISSIONS.md)
|
|
67
50
|
|
|
68
|
-
## Contributions
|
|
69
|
-
|
|
70
|
-
Thank you for your interest in contributing to the project! At the moment, the focus is on reaching the first major
|
|
71
|
-
release. Until then, the contributions will not be accepted. This approach allows to set a solid
|
|
72
|
-
foundation and maintain consistency throughout the development process.
|
|
73
|
-
|
|
74
|
-
Community input is highly valued, and you are encouraged to engage with the project by providing feedback and suggestions.
|
|
75
|
-
Feel free to open issues for bugs you've discovered or enhancements you'd like to see.
|
|
51
|
+
## 💙 Contributions
|
|
76
52
|
|
|
77
|
-
|
|
53
|
+
> [!WARNING]
|
|
54
|
+
> Thank you for your interest in contributing to the project! At the moment, the focus is on reaching the first major
|
|
55
|
+
> release. Until then, the contributions will not be accepted. This approach allows to set a solid
|
|
56
|
+
> foundation and maintain consistency throughout the development process.
|
|
57
|
+
>
|
|
58
|
+
> Community input is highly valued, and you are encouraged to engage with the project by providing feedback and suggestions.
|
|
59
|
+
> Feel free to open issues for bugs you've discovered or enhancements you'd like to see.
|
|
60
|
+
>
|
|
61
|
+
> Stay tuned for updates. Looking forward to collaborating with you in the future once contributions are opened up!
|
|
78
62
|
|
|
79
63
|
## API
|
|
80
64
|
|
|
@@ -95,6 +79,7 @@ Stay tuned for updates. Looking forward to collaborating with you in the future
|
|
|
95
79
|
* [`openCalendar(...)`](#opencalendar)
|
|
96
80
|
* [`openReminders()`](#openreminders)
|
|
97
81
|
* [`listEventsInRange(...)`](#listeventsinrange)
|
|
82
|
+
* [`deleteEventsById(...)`](#deleteeventsbyid)
|
|
98
83
|
* [Interfaces](#interfaces)
|
|
99
84
|
* [Type Aliases](#type-aliases)
|
|
100
85
|
* [Enums](#enums)
|
|
@@ -268,7 +253,7 @@ Retrieves all available reminders lists on the device.
|
|
|
268
253
|
### createReminder(...)
|
|
269
254
|
|
|
270
255
|
```typescript
|
|
271
|
-
createReminder(options: { title: string; listId?: string; priority?: number; isCompleted?: boolean; startDate?: number; dueDate?: number; completionDate?: number; notes?: string; url?: string; location?: string; recurrence?: ReminderRecurrenceRule; }) => Promise<{
|
|
256
|
+
createReminder(options: { title: string; listId?: string; priority?: number; isCompleted?: boolean; startDate?: number; dueDate?: number; completionDate?: number; notes?: string; url?: string; location?: string; recurrence?: ReminderRecurrenceRule; }) => Promise<{ result: string; }>
|
|
272
257
|
```
|
|
273
258
|
|
|
274
259
|
Creates a reminder with the provided options.
|
|
@@ -277,7 +262,9 @@ Creates a reminder with the provided options.
|
|
|
277
262
|
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
|
|
278
263
|
| **`options`** | <code>{ title: string; listId?: string; priority?: number; isCompleted?: boolean; startDate?: number; dueDate?: number; completionDate?: number; notes?: string; url?: string; location?: string; recurrence?: <a href="#reminderrecurrencerule">ReminderRecurrenceRule</a>; }</code> | - Options for creating the reminder. |
|
|
279
264
|
|
|
280
|
-
**Returns:** <code>Promise<{
|
|
265
|
+
**Returns:** <code>Promise<{ result: string; }></code>
|
|
266
|
+
|
|
267
|
+
**Since:** 0.5.0
|
|
281
268
|
|
|
282
269
|
--------------------
|
|
283
270
|
|
|
@@ -323,6 +310,27 @@ Retrieves the list of calendar events present in the given date range.
|
|
|
323
310
|
|
|
324
311
|
**Returns:** <code>Promise<{ result: CalendarEvent[]; }></code>
|
|
325
312
|
|
|
313
|
+
**Since:** 0.10.0
|
|
314
|
+
|
|
315
|
+
--------------------
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
### deleteEventsById(...)
|
|
319
|
+
|
|
320
|
+
```typescript
|
|
321
|
+
deleteEventsById(options: { ids: string[]; }) => Promise<{ result: { deleted: string[]; failed: string[]; }; }>
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
Deletes events from the calendar given their IDs.
|
|
325
|
+
|
|
326
|
+
| Param | Type | Description |
|
|
327
|
+
| ------------- | ------------------------------- | ------------------------------- |
|
|
328
|
+
| **`options`** | <code>{ ids: string[]; }</code> | Options for defining event IDs. |
|
|
329
|
+
|
|
330
|
+
**Returns:** <code>Promise<{ result: { deleted: string[]; failed: string[]; }; }></code>
|
|
331
|
+
|
|
332
|
+
**Since:** 0.11.0
|
|
333
|
+
|
|
326
334
|
--------------------
|
|
327
335
|
|
|
328
336
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
package dev.barooni.capacitor.calendar
|
|
2
2
|
|
|
3
|
+
import android.content.ContentUris
|
|
3
4
|
import android.content.ContentValues
|
|
4
5
|
import android.content.Context
|
|
5
6
|
import android.content.Intent
|
|
@@ -225,4 +226,33 @@ class CapacitorCalendar() {
|
|
|
225
226
|
} ?: throw Exception("Cursor is null")
|
|
226
227
|
return events
|
|
227
228
|
}
|
|
229
|
+
|
|
230
|
+
@Throws(Exception::class)
|
|
231
|
+
fun deleteEventsById(
|
|
232
|
+
context: Context,
|
|
233
|
+
ids: JSArray,
|
|
234
|
+
): JSObject {
|
|
235
|
+
val deletedEvents = JSArray()
|
|
236
|
+
val failedToDeleteEvents = JSArray()
|
|
237
|
+
val contentResolver = context.contentResolver
|
|
238
|
+
|
|
239
|
+
ids.toList<String>().forEach { id ->
|
|
240
|
+
try {
|
|
241
|
+
val uri = ContentUris.withAppendedId(CalendarContract.Events.CONTENT_URI, id.toLong())
|
|
242
|
+
val rowsDeleted = contentResolver.delete(uri, null, null)
|
|
243
|
+
if (rowsDeleted > 0) {
|
|
244
|
+
deletedEvents.put(id)
|
|
245
|
+
} else {
|
|
246
|
+
failedToDeleteEvents.put(id)
|
|
247
|
+
}
|
|
248
|
+
} catch (error: Exception) {
|
|
249
|
+
failedToDeleteEvents.put(id)
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
val ret = JSObject()
|
|
254
|
+
ret.put("deleted", deletedEvents)
|
|
255
|
+
ret.put("failed", failedToDeleteEvents)
|
|
256
|
+
return ret
|
|
257
|
+
}
|
|
228
258
|
}
|
|
@@ -223,15 +223,30 @@ class CapacitorCalendarPlugin : Plugin() {
|
|
|
223
223
|
try {
|
|
224
224
|
val startDate =
|
|
225
225
|
call.getLong("startDate")
|
|
226
|
-
?: throw Exception("[CapacitorCalendar.${::
|
|
226
|
+
?: throw Exception("[CapacitorCalendar.${::listEventsInRange.name}] A start date was not provided")
|
|
227
227
|
val endDate =
|
|
228
228
|
call.getLong("endDate")
|
|
229
|
-
?: throw Exception("[CapacitorCalendar.${::
|
|
229
|
+
?: throw Exception("[CapacitorCalendar.${::listEventsInRange.name}] An end date was not provided")
|
|
230
230
|
val ret = JSObject()
|
|
231
231
|
ret.put("result", implementation.listEventsInRange(context, startDate, endDate))
|
|
232
232
|
call.resolve(ret)
|
|
233
233
|
} catch (error: Exception) {
|
|
234
|
-
call.reject("", "[CapacitorCalendar.${::
|
|
234
|
+
call.reject("", "[CapacitorCalendar.${::listEventsInRange.name}] Could not get the list of events in requested range")
|
|
235
|
+
return
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
@PluginMethod(returnType = PluginMethod.RETURN_PROMISE)
|
|
240
|
+
fun deleteEventsById(call: PluginCall) {
|
|
241
|
+
try {
|
|
242
|
+
val ids =
|
|
243
|
+
call.getArray("ids")
|
|
244
|
+
?: throw Exception("[CapacitorCalendar.${::deleteEventsById.name}] Event ids were not provided")
|
|
245
|
+
val ret = JSObject()
|
|
246
|
+
ret.put("result", implementation.deleteEventsById(context, ids))
|
|
247
|
+
call.resolve(ret)
|
|
248
|
+
} catch (error: Exception) {
|
|
249
|
+
call.reject("", "[CapacitorCalendar.${::deleteEventsById.name}] Could not delete events")
|
|
235
250
|
return
|
|
236
251
|
}
|
|
237
252
|
}
|
package/dist/docs.json
CHANGED
|
@@ -300,7 +300,7 @@
|
|
|
300
300
|
},
|
|
301
301
|
{
|
|
302
302
|
"name": "permissions",
|
|
303
|
-
"text": "<h3>Runtime Permissions:</h3>\n<ul>\n <li><strong>iOS
|
|
303
|
+
"text": "<h3>Runtime Permissions:</h3>\n<ul>\n <li><strong>iOS:</strong> writeCalendar</li>\n <li><strong>Android:</strong> readCalendar, writeCalendar</li>\n</ul>"
|
|
304
304
|
},
|
|
305
305
|
{
|
|
306
306
|
"name": "param",
|
|
@@ -382,7 +382,7 @@
|
|
|
382
382
|
},
|
|
383
383
|
{
|
|
384
384
|
"name": "createReminder",
|
|
385
|
-
"signature": "(options: { title: string; listId?: string; priority?: number; isCompleted?: boolean; startDate?: number; dueDate?: number; completionDate?: number; notes?: string; url?: string; location?: string; recurrence?: ReminderRecurrenceRule; }) => Promise<{
|
|
385
|
+
"signature": "(options: { title: string; listId?: string; priority?: number; isCompleted?: boolean; startDate?: number; dueDate?: number; completionDate?: number; notes?: string; url?: string; location?: string; recurrence?: ReminderRecurrenceRule; }) => Promise<{ result: string; }>",
|
|
386
386
|
"parameters": [
|
|
387
387
|
{
|
|
388
388
|
"name": "options",
|
|
@@ -390,27 +390,35 @@
|
|
|
390
390
|
"type": "{ title: string; listId?: string | undefined; priority?: number | undefined; isCompleted?: boolean | undefined; startDate?: number | undefined; dueDate?: number | undefined; completionDate?: number | undefined; notes?: string | undefined; url?: string | undefined; location?: string | undefined; recurrence?: ReminderRecurrenceRule | undefined; }"
|
|
391
391
|
}
|
|
392
392
|
],
|
|
393
|
-
"returns": "Promise<{
|
|
393
|
+
"returns": "Promise<{ result: string; }>",
|
|
394
394
|
"tags": [
|
|
395
395
|
{
|
|
396
396
|
"name": "method",
|
|
397
397
|
"text": "createReminder"
|
|
398
398
|
},
|
|
399
|
+
{
|
|
400
|
+
"name": "since",
|
|
401
|
+
"text": "0.5.0"
|
|
402
|
+
},
|
|
399
403
|
{
|
|
400
404
|
"name": "platform",
|
|
401
405
|
"text": "iOS"
|
|
402
406
|
},
|
|
407
|
+
{
|
|
408
|
+
"name": "permissions",
|
|
409
|
+
"text": "<h3>Runtime Permissions:</h3>\n<ul>\n <li><strong>iOS:</strong> writeReminders</li>\n</ul>"
|
|
410
|
+
},
|
|
403
411
|
{
|
|
404
412
|
"name": "param",
|
|
405
413
|
"text": "options - Options for creating the reminder."
|
|
406
414
|
},
|
|
407
415
|
{
|
|
408
416
|
"name": "returns",
|
|
409
|
-
"text": "A Promise that resolves with
|
|
417
|
+
"text": "A Promise that resolves with the id of the created reminder"
|
|
410
418
|
},
|
|
411
419
|
{
|
|
412
420
|
"name": "example",
|
|
413
|
-
"text": "const now = Date.now();\nconst rules: ReminderRecurrenceRule = {\n frequency: ReminderRecurrenceFrequency.MONTHLY,\n interval: 10,\n end: Date.now()\n}\nconst reminderOptions = {\n title: 'Buy cucumber',\n listId: 'ABC12',\n priority: 5,\n isCompleted: false,\n startDateComponents: now,\n notes: 'Also buy tomatoes',\n url: 'https://capacitor-calendar.pages.dev/',\n location: 'My Local Supermarket',\n recurrence: rules\n};\nconst {
|
|
421
|
+
"text": "const now = Date.now();\nconst rules: ReminderRecurrenceRule = {\n frequency: ReminderRecurrenceFrequency.MONTHLY,\n interval: 10,\n end: Date.now()\n}\nconst reminderOptions = {\n title: 'Buy cucumber',\n listId: 'ABC12',\n priority: 5,\n isCompleted: false,\n startDateComponents: now,\n notes: 'Also buy tomatoes',\n url: 'https://capacitor-calendar.pages.dev/',\n location: 'My Local Supermarket',\n recurrence: rules\n};\nconst { result } = await createReminder(reminderOptions);\nconsole.log(result); // 'ID_1'"
|
|
414
422
|
}
|
|
415
423
|
],
|
|
416
424
|
"docs": "Creates a reminder with the provided options.",
|
|
@@ -497,10 +505,18 @@
|
|
|
497
505
|
"name": "method",
|
|
498
506
|
"text": "listEventsInRange"
|
|
499
507
|
},
|
|
508
|
+
{
|
|
509
|
+
"name": "since",
|
|
510
|
+
"text": "0.10.0"
|
|
511
|
+
},
|
|
500
512
|
{
|
|
501
513
|
"name": "platform",
|
|
502
514
|
"text": "iOS, Android"
|
|
503
515
|
},
|
|
516
|
+
{
|
|
517
|
+
"name": "permissions",
|
|
518
|
+
"text": "<h3>Runtime Permissions:</h3>\n<ul>\n <li><strong>iOS:</strong> readCalendar</li>\n <li><strong>Android:</strong> readCalendar</li>\n</ul>"
|
|
519
|
+
},
|
|
504
520
|
{
|
|
505
521
|
"name": "param",
|
|
506
522
|
"text": "options Options for defining the date range."
|
|
@@ -519,6 +535,51 @@
|
|
|
519
535
|
"CalendarEvent"
|
|
520
536
|
],
|
|
521
537
|
"slug": "listeventsinrange"
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
"name": "deleteEventsById",
|
|
541
|
+
"signature": "(options: { ids: string[]; }) => Promise<{ result: { deleted: string[]; failed: string[]; }; }>",
|
|
542
|
+
"parameters": [
|
|
543
|
+
{
|
|
544
|
+
"name": "options",
|
|
545
|
+
"docs": "Options for defining event IDs.",
|
|
546
|
+
"type": "{ ids: string[]; }"
|
|
547
|
+
}
|
|
548
|
+
],
|
|
549
|
+
"returns": "Promise<{ result: { deleted: string[]; failed: string[]; }; }>",
|
|
550
|
+
"tags": [
|
|
551
|
+
{
|
|
552
|
+
"name": "method",
|
|
553
|
+
"text": "deleteEventsById"
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
"name": "since",
|
|
557
|
+
"text": "0.11.0"
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
"name": "platform",
|
|
561
|
+
"text": "iOS, Android"
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
"name": "permissions",
|
|
565
|
+
"text": "<h3>Runtime Permissions:</h3>\n<ul>\n <li><strong>iOS:</strong> writeCalendar</li>\n <li><strong>Android:</strong> writeCalendar</li>\n</ul>"
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
"name": "param",
|
|
569
|
+
"text": "options Options for defining event IDs."
|
|
570
|
+
},
|
|
571
|
+
{
|
|
572
|
+
"name": "returns",
|
|
573
|
+
"text": "A promise that resolves to an object with two properties:\n - deleted: string[] - An array of IDs that were successfully deleted.\n - failed: string[] - An array of IDs that could not be deleted."
|
|
574
|
+
},
|
|
575
|
+
{
|
|
576
|
+
"name": "example",
|
|
577
|
+
"text": "const idsToDelete = ['ID_1', 'ID_2', 'ID_DOES_NOT_EXIST'];\nconst { result } = await CapacitorCalendar.deleteEventsById(idsToDelete)\nconsole.log(result.deleted) // ['ID_1', 'ID_2']\nconsole.log(result.failed) // ['ID_DOES_NOT_EXIST']"
|
|
578
|
+
}
|
|
579
|
+
],
|
|
580
|
+
"docs": "Deletes events from the calendar given their IDs.",
|
|
581
|
+
"complexTypes": [],
|
|
582
|
+
"slug": "deleteeventsbyid"
|
|
522
583
|
}
|
|
523
584
|
],
|
|
524
585
|
"properties": []
|
|
@@ -864,7 +925,7 @@
|
|
|
864
925
|
"name": "platform"
|
|
865
926
|
},
|
|
866
927
|
{
|
|
867
|
-
"text": "<h3>Manifest Permissions:</h3>\n<ul>\n <li><strong>iOS 17 ≤:</strong> NSCalendarsFullAccessUsageDescription</li>\n <li><strong>
|
|
928
|
+
"text": "<h3>Manifest Permissions:</h3>\n<ul>\n <li><strong>iOS 17 ≤:</strong> NSCalendarsFullAccessUsageDescription</li>\n <li><strong>13 ≤ iOS ≤ 16:</strong> NSCalendarsUsageDescription</li>\n <li><strong>Android:</strong> android.permission.READ_CALENDAR</li>\n</ul>",
|
|
868
929
|
"name": "permissions"
|
|
869
930
|
}
|
|
870
931
|
],
|
|
@@ -879,7 +940,7 @@
|
|
|
879
940
|
"name": "platform"
|
|
880
941
|
},
|
|
881
942
|
{
|
|
882
|
-
"text": "<h3>Manifest Permissions:</h3>\n<ul>\n <li><strong>iOS 17 ≤:</strong> NSCalendarsWriteOnlyAccessUsageDescription</li>\n <li><strong>
|
|
943
|
+
"text": "<h3>Manifest Permissions:</h3>\n<ul>\n <li><strong>iOS 17 ≤:</strong> NSCalendarsWriteOnlyAccessUsageDescription</li>\n <li><strong>13 ≤ iOS ≤ 16:</strong> NSCalendarsUsageDescription</li>\n <li><strong>Android:</strong> android.permission.WRITE_CALENDAR</li>\n</ul>",
|
|
883
944
|
"name": "permissions"
|
|
884
945
|
}
|
|
885
946
|
],
|
|
@@ -894,7 +955,7 @@
|
|
|
894
955
|
"name": "platform"
|
|
895
956
|
},
|
|
896
957
|
{
|
|
897
|
-
"text": "<h3>Manifest Permissions:</h3>\n<ul>\n <li><strong>iOS 17 ≤:</strong> NSRemindersFullAccessUsageDescription</li>\n <li><strong>
|
|
958
|
+
"text": "<h3>Manifest Permissions:</h3>\n<ul>\n <li><strong>iOS 17 ≤:</strong> NSRemindersFullAccessUsageDescription</li>\n <li><strong>10 ≤ iOS ≤ 16:</strong> NSRemindersUsageDescription</li>\n</ul>",
|
|
898
959
|
"name": "permissions"
|
|
899
960
|
}
|
|
900
961
|
],
|
|
@@ -909,7 +970,7 @@
|
|
|
909
970
|
"name": "platform"
|
|
910
971
|
},
|
|
911
972
|
{
|
|
912
|
-
"text": "<h3>Manifest Permissions:</h3>\n<ul>\n <li><strong>iOS 17 ≤:</strong> NSRemindersFullAccessUsageDescription</li>\n <li><strong>
|
|
973
|
+
"text": "<h3>Manifest Permissions:</h3>\n<ul>\n <li><strong>iOS 17 ≤:</strong> NSRemindersFullAccessUsageDescription</li>\n <li><strong>13 ≤ iOS ≤ 16:</strong> NSRemindersUsageDescription</li>\n</ul>",
|
|
913
974
|
"name": "permissions"
|
|
914
975
|
}
|
|
915
976
|
],
|
|
@@ -141,8 +141,7 @@ export interface CapacitorCalendarPlugin {
|
|
|
141
141
|
* @permissions
|
|
142
142
|
* <h3>Runtime Permissions:</h3>
|
|
143
143
|
* <ul>
|
|
144
|
-
* <li><strong>iOS
|
|
145
|
-
* <li><strong>iOS 10 ≤ x ≤ iOS 16:</strong> writeCalendar</li>
|
|
144
|
+
* <li><strong>iOS:</strong> writeCalendar</li>
|
|
146
145
|
* <li><strong>Android:</strong> readCalendar, writeCalendar</li>
|
|
147
146
|
* </ul>
|
|
148
147
|
* @param {object} options - Options for creating the event.
|
|
@@ -207,7 +206,13 @@ export interface CapacitorCalendarPlugin {
|
|
|
207
206
|
* Creates a reminder with the provided options.
|
|
208
207
|
*
|
|
209
208
|
* @method createReminder
|
|
209
|
+
* @since 0.5.0
|
|
210
210
|
* @platform iOS
|
|
211
|
+
* @permissions
|
|
212
|
+
* <h3>Runtime Permissions:</h3>
|
|
213
|
+
* <ul>
|
|
214
|
+
* <li><strong>iOS:</strong> writeReminders</li>
|
|
215
|
+
* </ul>
|
|
211
216
|
* @param {object} options - Options for creating the reminder.
|
|
212
217
|
* @param {string} options.title - The title of the reminder.
|
|
213
218
|
* @param {string} options.listId - The id of the destination reminders list. (Optional)
|
|
@@ -222,8 +227,7 @@ export interface CapacitorCalendarPlugin {
|
|
|
222
227
|
* @param {string} [options.url] - A URL to save under the reminder. (Optional)
|
|
223
228
|
* @param {string} [options.location] - A location to save under the reminder. (Optional)
|
|
224
229
|
* @param {string} [options.recurrence] - The rules for the recurrence of the reminder. (Optional)
|
|
225
|
-
* @returns {Promise<{
|
|
226
|
-
* The resolved object has a property 'reminderCreated' which is a boolean value representing whether the reminder was created.
|
|
230
|
+
* @returns {Promise<{ result: string }>} A Promise that resolves with the id of the created reminder
|
|
227
231
|
* @example
|
|
228
232
|
* const now = Date.now();
|
|
229
233
|
* const rules: ReminderRecurrenceRule = {
|
|
@@ -242,8 +246,8 @@ export interface CapacitorCalendarPlugin {
|
|
|
242
246
|
* location: 'My Local Supermarket',
|
|
243
247
|
* recurrence: rules
|
|
244
248
|
* };
|
|
245
|
-
* const {
|
|
246
|
-
* console.log(
|
|
249
|
+
* const { result } = await createReminder(reminderOptions);
|
|
250
|
+
* console.log(result); // 'ID_1'
|
|
247
251
|
*/
|
|
248
252
|
createReminder(options: {
|
|
249
253
|
title: string;
|
|
@@ -258,7 +262,7 @@ export interface CapacitorCalendarPlugin {
|
|
|
258
262
|
location?: string;
|
|
259
263
|
recurrence?: ReminderRecurrenceRule;
|
|
260
264
|
}): Promise<{
|
|
261
|
-
|
|
265
|
+
result: string;
|
|
262
266
|
}>;
|
|
263
267
|
/**
|
|
264
268
|
* Opens the calendar app. Since the user leaves your app, use this method with caution.
|
|
@@ -289,7 +293,14 @@ export interface CapacitorCalendarPlugin {
|
|
|
289
293
|
* Retrieves the list of calendar events present in the given date range.
|
|
290
294
|
*
|
|
291
295
|
* @method listEventsInRange
|
|
296
|
+
* @since 0.10.0
|
|
292
297
|
* @platform iOS, Android
|
|
298
|
+
* @permissions
|
|
299
|
+
* <h3>Runtime Permissions:</h3>
|
|
300
|
+
* <ul>
|
|
301
|
+
* <li><strong>iOS:</strong> readCalendar</li>
|
|
302
|
+
* <li><strong>Android:</strong> readCalendar</li>
|
|
303
|
+
* </ul>
|
|
293
304
|
* @param {object} options Options for defining the date range.
|
|
294
305
|
* @param {number} options.startDate The start of the date range.
|
|
295
306
|
* @param {number} options.endDate The end of the date range.
|
|
@@ -306,4 +317,36 @@ export interface CapacitorCalendarPlugin {
|
|
|
306
317
|
}): Promise<{
|
|
307
318
|
result: CalendarEvent[];
|
|
308
319
|
}>;
|
|
320
|
+
/**
|
|
321
|
+
* Deletes events from the calendar given their IDs.
|
|
322
|
+
*
|
|
323
|
+
* @method deleteEventsById
|
|
324
|
+
* @since 0.11.0
|
|
325
|
+
* @platform iOS, Android
|
|
326
|
+
* @permissions
|
|
327
|
+
* <h3>Runtime Permissions:</h3>
|
|
328
|
+
* <ul>
|
|
329
|
+
* <li><strong>iOS:</strong> writeCalendar</li>
|
|
330
|
+
* <li><strong>Android:</strong> writeCalendar</li>
|
|
331
|
+
* </ul>
|
|
332
|
+
* @param {object} options Options for defining event IDs.
|
|
333
|
+
* @param {number} options.ids An array of event IDs to be deleted.
|
|
334
|
+
* @returns {Promise<{ deleted: string[], failed: string[] }>}
|
|
335
|
+
* A promise that resolves to an object with two properties:
|
|
336
|
+
* - deleted: string[] - An array of IDs that were successfully deleted.
|
|
337
|
+
* - failed: string[] - An array of IDs that could not be deleted.
|
|
338
|
+
* @example
|
|
339
|
+
* const idsToDelete = ['ID_1', 'ID_2', 'ID_DOES_NOT_EXIST'];
|
|
340
|
+
* const { result } = await CapacitorCalendar.deleteEventsById(idsToDelete)
|
|
341
|
+
* console.log(result.deleted) // ['ID_1', 'ID_2']
|
|
342
|
+
* console.log(result.failed) // ['ID_DOES_NOT_EXIST']
|
|
343
|
+
*/
|
|
344
|
+
deleteEventsById(options: {
|
|
345
|
+
ids: string[];
|
|
346
|
+
}): Promise<{
|
|
347
|
+
result: {
|
|
348
|
+
deleted: string[];
|
|
349
|
+
failed: string[];
|
|
350
|
+
};
|
|
351
|
+
}>;
|
|
309
352
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import { CalendarChooserDisplayStyle } from './schemas/enums/calendar-chooser-display-style';\nimport { CalendarChooserSelectionStyle } from './schemas/enums/calendar-chooser-selection-style';\nimport { PluginPermission } from './schemas/enums/plugin-permission';\nimport type { PermissionState } from '@capacitor/core';\nimport type { Calendar } from './schemas/interfaces/calendar';\nimport type { RemindersList } from './schemas/interfaces/reminders-list';\nimport type { PluginPermissionsMap } from './schemas/interfaces/plugin-permissions-map';\nimport type { ReminderRecurrenceRule } from './schemas/interfaces/reminder-recurrence-rule';\nimport type { CalendarEvent } from './schemas/interfaces/calendar-event';\n\nexport interface CapacitorCalendarPlugin {\n /**\n * Checks the current authorization status of a specific permission.\n *\n * @method\n * @platform iOS, Android\n * @param options An object with the name of the permission\n * @returns {Promise<{ result: PermissionState }>} – A promise that resolves with the current status of the requested permission.\n * @example\n * const status = await this.checkPermission({ alias: 'readCalendar' });\n */\n checkPermission(options: { alias: PluginPermission }): Promise<{ result: PermissionState }>;\n\n /**\n * Checks the current authorization status of all the required permissions for the plugin.\n *\n * @method\n * @platform iOS, Android\n * @returns {Promise<PluginPermissionsMap>} – A promise that resolves with an object containing all the permissions and their status.\n * @example\n * const permissionsStatus = await this.checkAllPermissions();\n */\n checkAllPermissions(): Promise<PluginPermissionsMap>;\n\n /**\n * Requests authorization to a specific permission, if not already granted.\n * If the permission is already granted, it will directly return the status.\n *\n * @method\n * @platform iOS, Android\n * @param options An object with the name of the permission\n * @returns {Promise<{ result: PermissionState }>} – A promise that resolves with the new permission status after the request is made.\n * @example\n * const result = await this.requestPermission({ alias: 'readCalendar' });\n */\n requestPermission(options: { alias: PluginPermission }): Promise<{ result: PermissionState }>;\n\n /**\n * Requests authorization to all the required permissions for the plugin, if they have not already been granted.\n *\n * @method\n * @platform iOS, Android\n * @returns {Promise<PluginPermissionsMap>} – A promise that resolves with the new permission statuses after the request is made.\n * @example\n * const permissionResults = await this.requestAllPermissions();\n */\n requestAllPermissions(): Promise<PluginPermissionsMap>;\n\n /**\n * Creates an event in the calendar by using the native calendar.\n * On iOS opens a native sheet and on Android opens an intent.\n *\n * @method\n * @platform iOS, Android\n * @permissions\n * <h3>Runtime Permissions:</h3>\n * <ul>\n * <li><strong>Android:</strong> readCalendar</li>\n * </ul>\n * @returns {Promise<{ result: string[] }>} A promise that resolves with an array of the ids of created events.\n * @throws Error If prompt gets cancelled.\n * @example\n * if (capacitor.getPlatform() === 'android') {\n * await this.requestPermission({ alias: 'readCalendar' });\n * { result } = result = await this.createEventWithPrompt();\n * } else {\n * { result } = await this.createEventWithPrompt();\n * }\n */\n createEventWithPrompt(): Promise<{ result: string[] }>;\n\n /**\n * Presents a prompt to the user to select calendars. This method is available only on iOS.\n *\n * @method selectCalendarsWithPrompt\n * @platform iOS\n * @param {object} options - Options for customizing the display and selection styles of the calendar chooser.\n * @async\n * @returns { Promise<{ result: Calendar[] }> } A promise that resolves with an array of selected calendars,\n * where each calendar object contains an ID and a title.\n * @example\n * if (capacitor.getPlatform() === 'ios') {\n * const { result } = await selectCalendarsWithPrompt();\n * console.log(result); // [{ id: '1', title: 'Work Calendar' }]\n * }\n */\n selectCalendarsWithPrompt(options: {\n displayStyle: CalendarChooserDisplayStyle;\n selectionStyle: CalendarChooserSelectionStyle;\n }): Promise<{ result: Calendar[] }>;\n\n /**\n * Retrieves a list of calendars available on the device.\n *\n * @async\n * @method listCalendars\n * @platform iOS, Android\n * @returns {Promise<{ result: Calendar[] }>} A promise that resolves with an array of calendars available on the device.\n * Each calendar object in the array contains an ID and a title.\n * @example\n * const { result } = await listCalendars();\n * console.log(result); // [{ id: '1', title: 'Work Calendar' }, { id: '2', title: 'Personal Calendar' }]\n */\n listCalendars(): Promise<{ result: Calendar[] }>;\n\n /**\n * Retrieves the default calendar set on the device.\n *\n * @method getDefaultCalendar\n * @platform iOS, Android\n * @returns {Promise<{ result: Calendar }>} A promise that resolves with the default calendar set on the device.\n * The returned calendar object contains an ID and a title.\n * @example\n * const { result } = await getDefaultCalendar();\n * console.log(result); // { id: '1', title: 'Default Calendar' }\n */\n getDefaultCalendar(): Promise<{ result: Calendar }>;\n\n /**\n * Creates an event with the provided options.\n *\n * @method createEvent\n * @platform iOS, Android\n * @permissions\n * <h3>Runtime Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> writeCalendar</li>\n * <li><strong>iOS 10 ≤ x ≤ iOS 16:</strong> writeCalendar</li>\n * <li><strong>Android:</strong> readCalendar, writeCalendar</li>\n * </ul>\n * @param {object} options - Options for creating the event.\n * @param {string} options.title - The title of the event.\n * @param {string} options.calendarId - The id of the destination calendar. (Optional)\n * @param {string} [options.location] - The location of the event. (Optional)\n * @param {number} [options.startDate] - The start date and time of the event. (Optional)\n * @param {number} [options.endDate] - The end date and time of the event. (Optional)\n * @param {boolean} [options.isAllDay] - Weather the event is for the entire day or not. (Optional)\n * @returns {Promise<{ result: string }>} A promise that resolves with the id of the created event.\n * @example\n * const now = Date.now();\n * const eventOptions = {\n * title: 'Team Meeting',\n * location: 'Conference Room A',\n * startDate: now,\n * endDate: now + 2 * 60 * 60 * 1000,\n * isAllDay: false\n * };\n * const { result } = await createEvent(eventOptions);\n */\n createEvent(options: {\n title: string;\n calendarId?: string;\n location?: string;\n startDate?: number;\n endDate?: number;\n isAllDay?: boolean;\n }): Promise<{ result: string }>;\n\n /**\n * Retrieves the default reminders list set on the device.\n *\n * @method getDefaultRemindersList\n * @platform iOS\n * @returns {Promise<{ result: RemindersList }>} A promise that resolves with the default reminder list set on the device.\n * The returned reminders list object contains an ID and a title.\n * @example\n * const { result } = await getDefaultRemindersList();\n * console.log(result); // { id: '1', title: 'Default Reminders List' }\n */\n getDefaultRemindersList(): Promise<{ result: RemindersList }>;\n\n /**\n * Retrieves all available reminders lists on the device.\n *\n * @async\n * @method getRemindersLists\n * @platform iOS\n * @returns {Promise<{ result: RemindersList[] }>} A promise that resolves with an array of reminders lists available on the device.\n * Each reminders list object in the array contains an ID and a title.\n * @example\n * const { result } = await getRemindersLists();\n * console.log(result); // [{ id: '1', title: 'Groceries' }, { id: '2', title: 'Subscriptions' }]\n */\n getRemindersLists(): Promise<{ result: RemindersList[] }>;\n\n /**\n * Creates a reminder with the provided options.\n *\n * @method createReminder\n * @platform iOS\n * @param {object} options - Options for creating the reminder.\n * @param {string} options.title - The title of the reminder.\n * @param {string} options.listId - The id of the destination reminders list. (Optional)\n * @param {number} [options.priority] - The priority of the reminder. A number between one and nine where nine\n * has the least priority and 0 means no priority at all. Values outside of this range will be rounded to the\n * nearest border. (Optional)\n * @param {boolean} [options.isCompleted] - Whether the reminder is completed already or not. (Optional)\n * @param {number} [options.startDate] - The start date of the reminder. (Optional)\n * @param {number} [options.dueDate] - The due date of the reminder. (Optional)\n * @param {number} [options.completionDate] - The date at which the reminder was completed. (Optional)\n * @param {string} [options.notes] - Additional notes about the reminder. (Optional)\n * @param {string} [options.url] - A URL to save under the reminder. (Optional)\n * @param {string} [options.location] - A location to save under the reminder. (Optional)\n * @param {string} [options.recurrence] - The rules for the recurrence of the reminder. (Optional)\n * @returns {Promise<{ reminderCreated: boolean }>} A Promise that resolves with an object indicating whether the reminder was created successfully.\n * The resolved object has a property 'reminderCreated' which is a boolean value representing whether the reminder was created.\n * @example\n * const now = Date.now();\n * const rules: ReminderRecurrenceRule = {\n * frequency: ReminderRecurrenceFrequency.MONTHLY,\n * interval: 10,\n * end: Date.now()\n * }\n * const reminderOptions = {\n * title: 'Buy cucumber',\n * listId: 'ABC12',\n * priority: 5,\n * isCompleted: false,\n * startDateComponents: now,\n * notes: 'Also buy tomatoes',\n * url: 'https://capacitor-calendar.pages.dev/',\n * location: 'My Local Supermarket',\n * recurrence: rules\n * };\n * const { reminderCreated } = await createReminder(reminderOptions);\n * console.log(reminderCreated); // true\n */\n createReminder(options: {\n title: string;\n listId?: string;\n priority?: number;\n isCompleted?: boolean;\n startDate?: number;\n dueDate?: number;\n completionDate?: number;\n notes?: string;\n url?: string;\n location?: string;\n recurrence?: ReminderRecurrenceRule;\n }): Promise<{ reminderCreated: boolean }>;\n\n /**\n * Opens the calendar app. Since the user leaves your app, use this method with caution.\n * It will open the calendar on today's date if no date is provided.\n *\n * @method openCalendar\n * @platform iOS, Android\n * @param {object} options - Options for opening the calendar.\n * @param {number} options.date - The date at which the calendar should be opened. (Optional)\n * @returns {Promise<void>}\n * @example\n * void CapacitorCalendar.openCalendar({ date: Date.now() });\n */\n openCalendar(options: { date?: number }): Promise<void>;\n\n /**\n * Opens the reminders app. Since the user leaves your app, use this method with caution.\n *\n * @method openReminders\n * @platform iOS\n * @returns {Promise<void>}\n * @example\n * void CapacitorCalendar.openReminders();\n */\n openReminders(): Promise<void>;\n\n /**\n * Retrieves the list of calendar events present in the given date range.\n *\n * @method listEventsInRange\n * @platform iOS, Android\n * @param {object} options Options for defining the date range.\n * @param {number} options.startDate The start of the date range.\n * @param {number} options.endDate The end of the date range.\n * @returns {Promise<{ result: CalendarEvent[] }>} A Promise that resolves with the list of events.\n * @example\n * const { result } = await CapacitorCalendar.listEventsInRange({\n * startDate: Date.now(),\n * endDate: Date.now() + 6 * 7 * 24 * 60 * 60 * 1000, // 6 weeks from now\n * })\n */\n listEventsInRange(options: { startDate: number; endDate: number }): Promise<{ result: CalendarEvent[] }>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import { CalendarChooserDisplayStyle } from './schemas/enums/calendar-chooser-display-style';\nimport { CalendarChooserSelectionStyle } from './schemas/enums/calendar-chooser-selection-style';\nimport { PluginPermission } from './schemas/enums/plugin-permission';\nimport type { PermissionState } from '@capacitor/core';\nimport type { Calendar } from './schemas/interfaces/calendar';\nimport type { RemindersList } from './schemas/interfaces/reminders-list';\nimport type { PluginPermissionsMap } from './schemas/interfaces/plugin-permissions-map';\nimport type { ReminderRecurrenceRule } from './schemas/interfaces/reminder-recurrence-rule';\nimport type { CalendarEvent } from './schemas/interfaces/calendar-event';\n\nexport interface CapacitorCalendarPlugin {\n /**\n * Checks the current authorization status of a specific permission.\n *\n * @method\n * @platform iOS, Android\n * @param options An object with the name of the permission\n * @returns {Promise<{ result: PermissionState }>} – A promise that resolves with the current status of the requested permission.\n * @example\n * const status = await this.checkPermission({ alias: 'readCalendar' });\n */\n checkPermission(options: { alias: PluginPermission }): Promise<{ result: PermissionState }>;\n\n /**\n * Checks the current authorization status of all the required permissions for the plugin.\n *\n * @method\n * @platform iOS, Android\n * @returns {Promise<PluginPermissionsMap>} – A promise that resolves with an object containing all the permissions and their status.\n * @example\n * const permissionsStatus = await this.checkAllPermissions();\n */\n checkAllPermissions(): Promise<PluginPermissionsMap>;\n\n /**\n * Requests authorization to a specific permission, if not already granted.\n * If the permission is already granted, it will directly return the status.\n *\n * @method\n * @platform iOS, Android\n * @param options An object with the name of the permission\n * @returns {Promise<{ result: PermissionState }>} – A promise that resolves with the new permission status after the request is made.\n * @example\n * const result = await this.requestPermission({ alias: 'readCalendar' });\n */\n requestPermission(options: { alias: PluginPermission }): Promise<{ result: PermissionState }>;\n\n /**\n * Requests authorization to all the required permissions for the plugin, if they have not already been granted.\n *\n * @method\n * @platform iOS, Android\n * @returns {Promise<PluginPermissionsMap>} – A promise that resolves with the new permission statuses after the request is made.\n * @example\n * const permissionResults = await this.requestAllPermissions();\n */\n requestAllPermissions(): Promise<PluginPermissionsMap>;\n\n /**\n * Creates an event in the calendar by using the native calendar.\n * On iOS opens a native sheet and on Android opens an intent.\n *\n * @method\n * @platform iOS, Android\n * @permissions\n * <h3>Runtime Permissions:</h3>\n * <ul>\n * <li><strong>Android:</strong> readCalendar</li>\n * </ul>\n * @returns {Promise<{ result: string[] }>} A promise that resolves with an array of the ids of created events.\n * @throws Error If prompt gets cancelled.\n * @example\n * if (capacitor.getPlatform() === 'android') {\n * await this.requestPermission({ alias: 'readCalendar' });\n * { result } = result = await this.createEventWithPrompt();\n * } else {\n * { result } = await this.createEventWithPrompt();\n * }\n */\n createEventWithPrompt(): Promise<{ result: string[] }>;\n\n /**\n * Presents a prompt to the user to select calendars. This method is available only on iOS.\n *\n * @method selectCalendarsWithPrompt\n * @platform iOS\n * @param {object} options - Options for customizing the display and selection styles of the calendar chooser.\n * @async\n * @returns { Promise<{ result: Calendar[] }> } A promise that resolves with an array of selected calendars,\n * where each calendar object contains an ID and a title.\n * @example\n * if (capacitor.getPlatform() === 'ios') {\n * const { result } = await selectCalendarsWithPrompt();\n * console.log(result); // [{ id: '1', title: 'Work Calendar' }]\n * }\n */\n selectCalendarsWithPrompt(options: {\n displayStyle: CalendarChooserDisplayStyle;\n selectionStyle: CalendarChooserSelectionStyle;\n }): Promise<{ result: Calendar[] }>;\n\n /**\n * Retrieves a list of calendars available on the device.\n *\n * @async\n * @method listCalendars\n * @platform iOS, Android\n * @returns {Promise<{ result: Calendar[] }>} A promise that resolves with an array of calendars available on the device.\n * Each calendar object in the array contains an ID and a title.\n * @example\n * const { result } = await listCalendars();\n * console.log(result); // [{ id: '1', title: 'Work Calendar' }, { id: '2', title: 'Personal Calendar' }]\n */\n listCalendars(): Promise<{ result: Calendar[] }>;\n\n /**\n * Retrieves the default calendar set on the device.\n *\n * @method getDefaultCalendar\n * @platform iOS, Android\n * @returns {Promise<{ result: Calendar }>} A promise that resolves with the default calendar set on the device.\n * The returned calendar object contains an ID and a title.\n * @example\n * const { result } = await getDefaultCalendar();\n * console.log(result); // { id: '1', title: 'Default Calendar' }\n */\n getDefaultCalendar(): Promise<{ result: Calendar }>;\n\n /**\n * Creates an event with the provided options.\n *\n * @method createEvent\n * @platform iOS, Android\n * @permissions\n * <h3>Runtime Permissions:</h3>\n * <ul>\n * <li><strong>iOS:</strong> writeCalendar</li>\n * <li><strong>Android:</strong> readCalendar, writeCalendar</li>\n * </ul>\n * @param {object} options - Options for creating the event.\n * @param {string} options.title - The title of the event.\n * @param {string} options.calendarId - The id of the destination calendar. (Optional)\n * @param {string} [options.location] - The location of the event. (Optional)\n * @param {number} [options.startDate] - The start date and time of the event. (Optional)\n * @param {number} [options.endDate] - The end date and time of the event. (Optional)\n * @param {boolean} [options.isAllDay] - Weather the event is for the entire day or not. (Optional)\n * @returns {Promise<{ result: string }>} A promise that resolves with the id of the created event.\n * @example\n * const now = Date.now();\n * const eventOptions = {\n * title: 'Team Meeting',\n * location: 'Conference Room A',\n * startDate: now,\n * endDate: now + 2 * 60 * 60 * 1000,\n * isAllDay: false\n * };\n * const { result } = await createEvent(eventOptions);\n */\n createEvent(options: {\n title: string;\n calendarId?: string;\n location?: string;\n startDate?: number;\n endDate?: number;\n isAllDay?: boolean;\n }): Promise<{ result: string }>;\n\n /**\n * Retrieves the default reminders list set on the device.\n *\n * @method getDefaultRemindersList\n * @platform iOS\n * @returns {Promise<{ result: RemindersList }>} A promise that resolves with the default reminder list set on the device.\n * The returned reminders list object contains an ID and a title.\n * @example\n * const { result } = await getDefaultRemindersList();\n * console.log(result); // { id: '1', title: 'Default Reminders List' }\n */\n getDefaultRemindersList(): Promise<{ result: RemindersList }>;\n\n /**\n * Retrieves all available reminders lists on the device.\n *\n * @async\n * @method getRemindersLists\n * @platform iOS\n * @returns {Promise<{ result: RemindersList[] }>} A promise that resolves with an array of reminders lists available on the device.\n * Each reminders list object in the array contains an ID and a title.\n * @example\n * const { result } = await getRemindersLists();\n * console.log(result); // [{ id: '1', title: 'Groceries' }, { id: '2', title: 'Subscriptions' }]\n */\n getRemindersLists(): Promise<{ result: RemindersList[] }>;\n\n /**\n * Creates a reminder with the provided options.\n *\n * @method createReminder\n * @since 0.5.0\n * @platform iOS\n * @permissions\n * <h3>Runtime Permissions:</h3>\n * <ul>\n * <li><strong>iOS:</strong> writeReminders</li>\n * </ul>\n * @param {object} options - Options for creating the reminder.\n * @param {string} options.title - The title of the reminder.\n * @param {string} options.listId - The id of the destination reminders list. (Optional)\n * @param {number} [options.priority] - The priority of the reminder. A number between one and nine where nine\n * has the least priority and 0 means no priority at all. Values outside of this range will be rounded to the\n * nearest border. (Optional)\n * @param {boolean} [options.isCompleted] - Whether the reminder is completed already or not. (Optional)\n * @param {number} [options.startDate] - The start date of the reminder. (Optional)\n * @param {number} [options.dueDate] - The due date of the reminder. (Optional)\n * @param {number} [options.completionDate] - The date at which the reminder was completed. (Optional)\n * @param {string} [options.notes] - Additional notes about the reminder. (Optional)\n * @param {string} [options.url] - A URL to save under the reminder. (Optional)\n * @param {string} [options.location] - A location to save under the reminder. (Optional)\n * @param {string} [options.recurrence] - The rules for the recurrence of the reminder. (Optional)\n * @returns {Promise<{ result: string }>} A Promise that resolves with the id of the created reminder\n * @example\n * const now = Date.now();\n * const rules: ReminderRecurrenceRule = {\n * frequency: ReminderRecurrenceFrequency.MONTHLY,\n * interval: 10,\n * end: Date.now()\n * }\n * const reminderOptions = {\n * title: 'Buy cucumber',\n * listId: 'ABC12',\n * priority: 5,\n * isCompleted: false,\n * startDateComponents: now,\n * notes: 'Also buy tomatoes',\n * url: 'https://capacitor-calendar.pages.dev/',\n * location: 'My Local Supermarket',\n * recurrence: rules\n * };\n * const { result } = await createReminder(reminderOptions);\n * console.log(result); // 'ID_1'\n */\n createReminder(options: {\n title: string;\n listId?: string;\n priority?: number;\n isCompleted?: boolean;\n startDate?: number;\n dueDate?: number;\n completionDate?: number;\n notes?: string;\n url?: string;\n location?: string;\n recurrence?: ReminderRecurrenceRule;\n }): Promise<{ result: string }>;\n\n /**\n * Opens the calendar app. Since the user leaves your app, use this method with caution.\n * It will open the calendar on today's date if no date is provided.\n *\n * @method openCalendar\n * @platform iOS, Android\n * @param {object} options - Options for opening the calendar.\n * @param {number} options.date - The date at which the calendar should be opened. (Optional)\n * @returns {Promise<void>}\n * @example\n * void CapacitorCalendar.openCalendar({ date: Date.now() });\n */\n openCalendar(options: { date?: number }): Promise<void>;\n\n /**\n * Opens the reminders app. Since the user leaves your app, use this method with caution.\n *\n * @method openReminders\n * @platform iOS\n * @returns {Promise<void>}\n * @example\n * void CapacitorCalendar.openReminders();\n */\n openReminders(): Promise<void>;\n\n /**\n * Retrieves the list of calendar events present in the given date range.\n *\n * @method listEventsInRange\n * @since 0.10.0\n * @platform iOS, Android\n * @permissions\n * <h3>Runtime Permissions:</h3>\n * <ul>\n * <li><strong>iOS:</strong> readCalendar</li>\n * <li><strong>Android:</strong> readCalendar</li>\n * </ul>\n * @param {object} options Options for defining the date range.\n * @param {number} options.startDate The start of the date range.\n * @param {number} options.endDate The end of the date range.\n * @returns {Promise<{ result: CalendarEvent[] }>} A Promise that resolves with the list of events.\n * @example\n * const { result } = await CapacitorCalendar.listEventsInRange({\n * startDate: Date.now(),\n * endDate: Date.now() + 6 * 7 * 24 * 60 * 60 * 1000, // 6 weeks from now\n * })\n */\n listEventsInRange(options: { startDate: number; endDate: number }): Promise<{ result: CalendarEvent[] }>;\n\n /**\n * Deletes events from the calendar given their IDs.\n *\n * @method deleteEventsById\n * @since 0.11.0\n * @platform iOS, Android\n * @permissions\n * <h3>Runtime Permissions:</h3>\n * <ul>\n * <li><strong>iOS:</strong> writeCalendar</li>\n * <li><strong>Android:</strong> writeCalendar</li>\n * </ul>\n * @param {object} options Options for defining event IDs.\n * @param {number} options.ids An array of event IDs to be deleted.\n * @returns {Promise<{ deleted: string[], failed: string[] }>}\n * A promise that resolves to an object with two properties:\n * - deleted: string[] - An array of IDs that were successfully deleted.\n * - failed: string[] - An array of IDs that could not be deleted.\n * @example\n * const idsToDelete = ['ID_1', 'ID_2', 'ID_DOES_NOT_EXIST'];\n * const { result } = await CapacitorCalendar.deleteEventsById(idsToDelete)\n * console.log(result.deleted) // ['ID_1', 'ID_2']\n * console.log(result.failed) // ['ID_DOES_NOT_EXIST']\n */\n deleteEventsById(options: { ids: string[] }): Promise<{ result: { deleted: string[]; failed: string[] } }>;\n}\n"]}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -7,7 +7,8 @@ import type { Calendar } from './schemas/interfaces/calendar';
|
|
|
7
7
|
import type { RemindersList } from './schemas/interfaces/reminders-list';
|
|
8
8
|
import type { PluginPermissionsMap } from './schemas/interfaces/plugin-permissions-map';
|
|
9
9
|
import type { ReminderRecurrenceRule } from './schemas/interfaces/reminder-recurrence-rule';
|
|
10
|
+
import type { CalendarEvent } from './schemas/interfaces/calendar-event';
|
|
10
11
|
declare const CapacitorCalendar: CapacitorCalendarPlugin;
|
|
11
12
|
export * from './definitions';
|
|
12
13
|
export type { Calendar, RemindersList, ReminderRecurrenceRule };
|
|
13
|
-
export { CalendarChooserSelectionStyle, CalendarChooserDisplayStyle, PluginPermission, PluginPermissionsMap, ReminderRecurrenceFrequency, CapacitorCalendar, };
|
|
14
|
+
export { CalendarChooserSelectionStyle, CalendarChooserDisplayStyle, PluginPermission, PluginPermissionsMap, ReminderRecurrenceFrequency, CalendarEvent, CapacitorCalendar, };
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAC7F,OAAO,EAAE,6BAA6B,EAAE,MAAM,kDAAkD,CAAC;AACjG,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAC7F,OAAO,EAAE,6BAA6B,EAAE,MAAM,kDAAkD,CAAC;AACjG,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AAQ5F,MAAM,iBAAiB,GAAG,cAAc,CAA0B,mBAAmB,EAAE;IACrF,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,oBAAoB,EAAE,CAAC;CACrE,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAE9B,OAAO,EACL,6BAA6B,EAC7B,2BAA2B,EAC3B,gBAAgB,EAEhB,2BAA2B,EAE3B,iBAAiB,GAClB,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\nimport { CalendarChooserDisplayStyle } from './schemas/enums/calendar-chooser-display-style';\nimport { CalendarChooserSelectionStyle } from './schemas/enums/calendar-chooser-selection-style';\nimport { PluginPermission } from './schemas/enums/plugin-permission';\nimport { ReminderRecurrenceFrequency } from './schemas/enums/reminder-recurrence-frequency';\nimport type { CapacitorCalendarPlugin } from './definitions';\nimport type { Calendar } from './schemas/interfaces/calendar';\nimport type { RemindersList } from './schemas/interfaces/reminders-list';\nimport type { PluginPermissionsMap } from './schemas/interfaces/plugin-permissions-map';\nimport type { ReminderRecurrenceRule } from './schemas/interfaces/reminder-recurrence-rule';\nimport type { CalendarEvent } from './schemas/interfaces/calendar-event';\n\nconst CapacitorCalendar = registerPlugin<CapacitorCalendarPlugin>('CapacitorCalendar', {\n web: () => import('./web').then((m) => new m.CapacitorCalendarWeb()),\n});\n\nexport * from './definitions';\nexport type { Calendar, RemindersList, ReminderRecurrenceRule };\nexport {\n CalendarChooserSelectionStyle,\n CalendarChooserDisplayStyle,\n PluginPermission,\n PluginPermissionsMap,\n ReminderRecurrenceFrequency,\n CalendarEvent,\n CapacitorCalendar,\n};\n"]}
|
|
@@ -13,7 +13,7 @@ export declare enum PluginPermission {
|
|
|
13
13
|
* <h3>Manifest Permissions:</h3>
|
|
14
14
|
* <ul>
|
|
15
15
|
* <li><strong>iOS 17 ≤:</strong> NSCalendarsFullAccessUsageDescription</li>
|
|
16
|
-
* <li><strong>
|
|
16
|
+
* <li><strong>13 ≤ iOS ≤ 16:</strong> NSCalendarsUsageDescription</li>
|
|
17
17
|
* <li><strong>Android:</strong> android.permission.READ_CALENDAR</li>
|
|
18
18
|
* </ul>
|
|
19
19
|
*/
|
|
@@ -26,7 +26,7 @@ export declare enum PluginPermission {
|
|
|
26
26
|
* <h3>Manifest Permissions:</h3>
|
|
27
27
|
* <ul>
|
|
28
28
|
* <li><strong>iOS 17 ≤:</strong> NSCalendarsWriteOnlyAccessUsageDescription</li>
|
|
29
|
-
* <li><strong>
|
|
29
|
+
* <li><strong>13 ≤ iOS ≤ 16:</strong> NSCalendarsUsageDescription</li>
|
|
30
30
|
* <li><strong>Android:</strong> android.permission.WRITE_CALENDAR</li>
|
|
31
31
|
* </ul>
|
|
32
32
|
*/
|
|
@@ -39,7 +39,7 @@ export declare enum PluginPermission {
|
|
|
39
39
|
* <h3>Manifest Permissions:</h3>
|
|
40
40
|
* <ul>
|
|
41
41
|
* <li><strong>iOS 17 ≤:</strong> NSRemindersFullAccessUsageDescription</li>
|
|
42
|
-
* <li><strong>
|
|
42
|
+
* <li><strong>10 ≤ iOS ≤ 16:</strong> NSRemindersUsageDescription</li>
|
|
43
43
|
* </ul>
|
|
44
44
|
*/
|
|
45
45
|
READ_REMINDERS = "readReminders",
|
|
@@ -51,7 +51,7 @@ export declare enum PluginPermission {
|
|
|
51
51
|
* <h3>Manifest Permissions:</h3>
|
|
52
52
|
* <ul>
|
|
53
53
|
* <li><strong>iOS 17 ≤:</strong> NSRemindersFullAccessUsageDescription</li>
|
|
54
|
-
* <li><strong>
|
|
54
|
+
* <li><strong>13 ≤ iOS ≤ 16:</strong> NSRemindersUsageDescription</li>
|
|
55
55
|
* </ul>
|
|
56
56
|
*/
|
|
57
57
|
WRITE_REMINDERS = "writeReminders"
|
|
@@ -14,7 +14,7 @@ export var PluginPermission;
|
|
|
14
14
|
* <h3>Manifest Permissions:</h3>
|
|
15
15
|
* <ul>
|
|
16
16
|
* <li><strong>iOS 17 ≤:</strong> NSCalendarsFullAccessUsageDescription</li>
|
|
17
|
-
* <li><strong>
|
|
17
|
+
* <li><strong>13 ≤ iOS ≤ 16:</strong> NSCalendarsUsageDescription</li>
|
|
18
18
|
* <li><strong>Android:</strong> android.permission.READ_CALENDAR</li>
|
|
19
19
|
* </ul>
|
|
20
20
|
*/
|
|
@@ -27,7 +27,7 @@ export var PluginPermission;
|
|
|
27
27
|
* <h3>Manifest Permissions:</h3>
|
|
28
28
|
* <ul>
|
|
29
29
|
* <li><strong>iOS 17 ≤:</strong> NSCalendarsWriteOnlyAccessUsageDescription</li>
|
|
30
|
-
* <li><strong>
|
|
30
|
+
* <li><strong>13 ≤ iOS ≤ 16:</strong> NSCalendarsUsageDescription</li>
|
|
31
31
|
* <li><strong>Android:</strong> android.permission.WRITE_CALENDAR</li>
|
|
32
32
|
* </ul>
|
|
33
33
|
*/
|
|
@@ -40,7 +40,7 @@ export var PluginPermission;
|
|
|
40
40
|
* <h3>Manifest Permissions:</h3>
|
|
41
41
|
* <ul>
|
|
42
42
|
* <li><strong>iOS 17 ≤:</strong> NSRemindersFullAccessUsageDescription</li>
|
|
43
|
-
* <li><strong>
|
|
43
|
+
* <li><strong>10 ≤ iOS ≤ 16:</strong> NSRemindersUsageDescription</li>
|
|
44
44
|
* </ul>
|
|
45
45
|
*/
|
|
46
46
|
PluginPermission["READ_REMINDERS"] = "readReminders";
|
|
@@ -52,7 +52,7 @@ export var PluginPermission;
|
|
|
52
52
|
* <h3>Manifest Permissions:</h3>
|
|
53
53
|
* <ul>
|
|
54
54
|
* <li><strong>iOS 17 ≤:</strong> NSRemindersFullAccessUsageDescription</li>
|
|
55
|
-
* <li><strong>
|
|
55
|
+
* <li><strong>13 ≤ iOS ≤ 16:</strong> NSRemindersUsageDescription</li>
|
|
56
56
|
* </ul>
|
|
57
57
|
*/
|
|
58
58
|
PluginPermission["WRITE_REMINDERS"] = "writeReminders";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-permission.js","sourceRoot":"","sources":["../../../../src/schemas/enums/plugin-permission.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAN,IAAY,gBAsDX;AAtDD,WAAY,gBAAgB;IAC1B;;;;;;;;;;;OAWG;IACH,kDAA8B,CAAA;IAE9B;;;;;;;;;;;OAWG;IACH,oDAAgC,CAAA;IAEhC;;;;;;;;;;OAUG;IACH,oDAAgC,CAAA;IAEhC;;;;;;;;;;OAUG;IACH,sDAAkC,CAAA;AACpC,CAAC,EAtDW,gBAAgB,KAAhB,gBAAgB,QAsD3B","sourcesContent":["/**\n * Enum representing the available runtime permissions for the plugin.\n *\n * @enum PluginPermission\n * @platform iOS, Android\n */\nexport enum PluginPermission {\n /**\n * Represents the permission state for reading calendar.\n *\n * @platform iOS, Android\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSCalendarsFullAccessUsageDescription</li>\n * <li><strong>
|
|
1
|
+
{"version":3,"file":"plugin-permission.js","sourceRoot":"","sources":["../../../../src/schemas/enums/plugin-permission.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAN,IAAY,gBAsDX;AAtDD,WAAY,gBAAgB;IAC1B;;;;;;;;;;;OAWG;IACH,kDAA8B,CAAA;IAE9B;;;;;;;;;;;OAWG;IACH,oDAAgC,CAAA;IAEhC;;;;;;;;;;OAUG;IACH,oDAAgC,CAAA;IAEhC;;;;;;;;;;OAUG;IACH,sDAAkC,CAAA;AACpC,CAAC,EAtDW,gBAAgB,KAAhB,gBAAgB,QAsD3B","sourcesContent":["/**\n * Enum representing the available runtime permissions for the plugin.\n *\n * @enum PluginPermission\n * @platform iOS, Android\n */\nexport enum PluginPermission {\n /**\n * Represents the permission state for reading calendar.\n *\n * @platform iOS, Android\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSCalendarsFullAccessUsageDescription</li>\n * <li><strong>13 ≤ iOS ≤ 16:</strong> NSCalendarsUsageDescription</li>\n * <li><strong>Android:</strong> android.permission.READ_CALENDAR</li>\n * </ul>\n */\n READ_CALENDAR = 'readCalendar',\n\n /**\n * Represents the permission state for writing calendar.\n *\n * @platform iOS, Android\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSCalendarsWriteOnlyAccessUsageDescription</li>\n * <li><strong>13 ≤ iOS ≤ 16:</strong> NSCalendarsUsageDescription</li>\n * <li><strong>Android:</strong> android.permission.WRITE_CALENDAR</li>\n * </ul>\n */\n WRITE_CALENDAR = 'writeCalendar',\n\n /**\n * Represents the permission state for reading reminders.\n *\n * @platform iOS\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSRemindersFullAccessUsageDescription</li>\n * <li><strong>10 ≤ iOS ≤ 16:</strong> NSRemindersUsageDescription</li>\n * </ul>\n */\n READ_REMINDERS = 'readReminders',\n\n /**\n * Represents the permission state for writing reminders.\n *\n * @platform iOS\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSRemindersFullAccessUsageDescription</li>\n * <li><strong>13 ≤ iOS ≤ 16:</strong> NSRemindersUsageDescription</li>\n * </ul>\n */\n WRITE_REMINDERS = 'writeReminders',\n}\n"]}
|
package/dist/esm/web.d.ts
CHANGED
|
@@ -54,7 +54,7 @@ export declare class CapacitorCalendarWeb extends WebPlugin implements Capacitor
|
|
|
54
54
|
location?: string;
|
|
55
55
|
recurrence?: ReminderRecurrenceRule;
|
|
56
56
|
}): Promise<{
|
|
57
|
-
|
|
57
|
+
result: string;
|
|
58
58
|
}>;
|
|
59
59
|
getDefaultRemindersList(): Promise<{
|
|
60
60
|
result: RemindersList;
|
|
@@ -72,4 +72,12 @@ export declare class CapacitorCalendarWeb extends WebPlugin implements Capacitor
|
|
|
72
72
|
}): Promise<{
|
|
73
73
|
result: CalendarEvent[];
|
|
74
74
|
}>;
|
|
75
|
+
deleteEventsById(_options: {
|
|
76
|
+
ids: string[];
|
|
77
|
+
}): Promise<{
|
|
78
|
+
result: {
|
|
79
|
+
deleted: string[];
|
|
80
|
+
failed: string[];
|
|
81
|
+
};
|
|
82
|
+
}>;
|
|
75
83
|
}
|
package/dist/esm/web.js
CHANGED
|
@@ -46,5 +46,8 @@ export class CapacitorCalendarWeb extends WebPlugin {
|
|
|
46
46
|
listEventsInRange(_options) {
|
|
47
47
|
throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);
|
|
48
48
|
}
|
|
49
|
+
deleteEventsById(_options) {
|
|
50
|
+
throw this.unimplemented(`${this.deleteEventsById.name} is not implemented on the web`);
|
|
51
|
+
}
|
|
49
52
|
}
|
|
50
53
|
//# sourceMappingURL=web.js.map
|
package/dist/esm/web.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,OAAO,EAAmB,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAS7D,MAAM,OAAO,oBAAqB,SAAQ,SAAS;IAC1C,eAAe,CAAC,QAAqC;QAC1D,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,gCAAgC,CAAC,CAAC;IACzF,CAAC;IAEM,mBAAmB;QACxB,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,mBAAmB,CAAC,IAAI,gCAAgC,CAAC,CAAC;IAC7F,CAAC;IAEM,iBAAiB,CAAC,QAAqC;QAC5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QAA2B;QAC7C,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,gCAAgC,CAAC,CAAC;IACxF,CAAC;IAEM,aAAa;QAClB,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,gCAAgC,CAAC,CAAC;IACxF,CAAC;IAEM,iBAAiB,CAAC,QAAgD;QACvE,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,gCAAgC,CAAC,CAAC;IACxF,CAAC;CACF","sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { PermissionState, WebPlugin } from '@capacitor/core';\nimport { CapacitorCalendarPlugin } from './definitions';\nimport { PluginPermission } from './schemas/enums/plugin-permission';\nimport { ReminderRecurrenceRule } from './schemas/interfaces/reminder-recurrence-rule';\nimport type { Calendar } from './schemas/interfaces/calendar';\nimport type { RemindersList } from './schemas/interfaces/reminders-list';\nimport type { PluginPermissionsMap } from './schemas/interfaces/plugin-permissions-map';\nimport type { CalendarEvent } from './schemas/interfaces/calendar-event';\n\nexport class CapacitorCalendarWeb extends WebPlugin implements CapacitorCalendarPlugin {\n public checkPermission(_options: { alias: PluginPermission }): Promise<{ result: PermissionState }> {\n throw this.unimplemented(`${this.checkPermission.name} is not implemented on the web`);\n }\n\n public checkAllPermissions(): Promise<PluginPermissionsMap> {\n throw this.unimplemented(`${this.checkAllPermissions.name} is not implemented on the web`);\n }\n\n public requestPermission(_options: { alias: PluginPermission }): Promise<{ result: PermissionState }> {\n throw this.unimplemented(`${this.requestPermission.name} is not implemented on the web`);\n }\n\n public requestAllPermissions(): Promise<PluginPermissionsMap> {\n throw this.unimplemented(`${this.requestAllPermissions.name} is not implemented on the web`);\n }\n\n public createEventWithPrompt(): Promise<{ result: string[] }> {\n throw this.unimplemented(`${this.createEventWithPrompt.name} is not implemented on the web`);\n }\n\n public selectCalendarsWithPrompt(): Promise<{ result: Calendar[] }> {\n throw this.unimplemented(`${this.createEventWithPrompt.name} is not implemented on the web`);\n }\n\n public listCalendars(): Promise<{ result: Calendar[] }> {\n throw this.unimplemented(`${this.listCalendars.name} is not implemented on the web`);\n }\n\n public getDefaultCalendar(): Promise<{ result: Calendar }> {\n throw this.unimplemented(`${this.getDefaultCalendar.name} is not implemented on the web`);\n }\n\n public createEvent(_options: {\n title: string;\n calendarId?: string;\n location?: string;\n startDate?: number;\n endDate?: number;\n isAllDay?: boolean;\n }): Promise<{\n result: string;\n }> {\n throw this.unimplemented(`${this.createEvent.name} is not implemented on the web`);\n }\n\n public createReminder(_options: {\n title: string;\n listId?: string;\n priority?: number;\n isCompleted?: boolean;\n startDate?: number;\n dueDate?: number;\n completionDate?: number;\n notes?: string;\n url?: string;\n location?: string;\n recurrence?: ReminderRecurrenceRule;\n }): Promise<{
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,OAAO,EAAmB,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAS7D,MAAM,OAAO,oBAAqB,SAAQ,SAAS;IAC1C,eAAe,CAAC,QAAqC;QAC1D,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,gCAAgC,CAAC,CAAC;IACzF,CAAC;IAEM,mBAAmB;QACxB,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,mBAAmB,CAAC,IAAI,gCAAgC,CAAC,CAAC;IAC7F,CAAC;IAEM,iBAAiB,CAAC,QAAqC;QAC5D,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,gCAAgC,CAAC,CAAC;IAC3F,CAAC;IAEM,qBAAqB;QAC1B,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,qBAAqB,CAAC,IAAI,gCAAgC,CAAC,CAAC;IAC/F,CAAC;IAEM,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,iBAAiB,CAAC,QAAgD;QACvE,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,gCAAgC,CAAC,CAAC;IACxF,CAAC;IAEM,gBAAgB,CAAC,QAA2B;QAGjD,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC,IAAI,gCAAgC,CAAC,CAAC;IAC1F,CAAC;CACF","sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { PermissionState, WebPlugin } from '@capacitor/core';\nimport { CapacitorCalendarPlugin } from './definitions';\nimport { PluginPermission } from './schemas/enums/plugin-permission';\nimport { ReminderRecurrenceRule } from './schemas/interfaces/reminder-recurrence-rule';\nimport type { Calendar } from './schemas/interfaces/calendar';\nimport type { RemindersList } from './schemas/interfaces/reminders-list';\nimport type { PluginPermissionsMap } from './schemas/interfaces/plugin-permissions-map';\nimport type { CalendarEvent } from './schemas/interfaces/calendar-event';\n\nexport class CapacitorCalendarWeb extends WebPlugin implements CapacitorCalendarPlugin {\n public checkPermission(_options: { alias: PluginPermission }): Promise<{ result: PermissionState }> {\n throw this.unimplemented(`${this.checkPermission.name} is not implemented on the web`);\n }\n\n public checkAllPermissions(): Promise<PluginPermissionsMap> {\n throw this.unimplemented(`${this.checkAllPermissions.name} is not implemented on the web`);\n }\n\n public requestPermission(_options: { alias: PluginPermission }): Promise<{ result: PermissionState }> {\n throw this.unimplemented(`${this.requestPermission.name} is not implemented on the web`);\n }\n\n public requestAllPermissions(): Promise<PluginPermissionsMap> {\n throw this.unimplemented(`${this.requestAllPermissions.name} is not implemented on the web`);\n }\n\n public createEventWithPrompt(): Promise<{ result: string[] }> {\n throw this.unimplemented(`${this.createEventWithPrompt.name} is not implemented on the web`);\n }\n\n public selectCalendarsWithPrompt(): Promise<{ result: Calendar[] }> {\n throw this.unimplemented(`${this.createEventWithPrompt.name} is not implemented on the web`);\n }\n\n public listCalendars(): Promise<{ result: Calendar[] }> {\n throw this.unimplemented(`${this.listCalendars.name} is not implemented on the web`);\n }\n\n public getDefaultCalendar(): Promise<{ result: Calendar }> {\n throw this.unimplemented(`${this.getDefaultCalendar.name} is not implemented on the web`);\n }\n\n public createEvent(_options: {\n title: string;\n calendarId?: string;\n location?: string;\n startDate?: number;\n endDate?: number;\n isAllDay?: boolean;\n }): Promise<{\n result: string;\n }> {\n throw this.unimplemented(`${this.createEvent.name} is not implemented on the web`);\n }\n\n public createReminder(_options: {\n title: string;\n listId?: string;\n priority?: number;\n isCompleted?: boolean;\n startDate?: number;\n dueDate?: number;\n completionDate?: number;\n notes?: string;\n url?: string;\n location?: string;\n recurrence?: ReminderRecurrenceRule;\n }): Promise<{ result: string }> {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n\n public getDefaultRemindersList(): Promise<{ result: RemindersList }> {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n\n public getRemindersLists(): Promise<{ result: RemindersList[] }> {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n\n public openCalendar(_options: { date?: number }): Promise<void> {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n\n public openReminders(): Promise<void> {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n\n public listEventsInRange(_options: { startDate: number; endDate: number }): Promise<{ result: CalendarEvent[] }> {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n\n public deleteEventsById(_options: { ids: string[] }): Promise<{\n result: { deleted: string[]; failed: string[] };\n }> {\n throw this.unimplemented(`${this.deleteEventsById.name} is not implemented on the web`);\n }\n}\n"]}
|
package/dist/plugin.cjs.js
CHANGED
|
@@ -54,7 +54,7 @@ exports.PluginPermission = void 0;
|
|
|
54
54
|
* <h3>Manifest Permissions:</h3>
|
|
55
55
|
* <ul>
|
|
56
56
|
* <li><strong>iOS 17 ≤:</strong> NSCalendarsFullAccessUsageDescription</li>
|
|
57
|
-
* <li><strong>
|
|
57
|
+
* <li><strong>13 ≤ iOS ≤ 16:</strong> NSCalendarsUsageDescription</li>
|
|
58
58
|
* <li><strong>Android:</strong> android.permission.READ_CALENDAR</li>
|
|
59
59
|
* </ul>
|
|
60
60
|
*/
|
|
@@ -67,7 +67,7 @@ exports.PluginPermission = void 0;
|
|
|
67
67
|
* <h3>Manifest Permissions:</h3>
|
|
68
68
|
* <ul>
|
|
69
69
|
* <li><strong>iOS 17 ≤:</strong> NSCalendarsWriteOnlyAccessUsageDescription</li>
|
|
70
|
-
* <li><strong>
|
|
70
|
+
* <li><strong>13 ≤ iOS ≤ 16:</strong> NSCalendarsUsageDescription</li>
|
|
71
71
|
* <li><strong>Android:</strong> android.permission.WRITE_CALENDAR</li>
|
|
72
72
|
* </ul>
|
|
73
73
|
*/
|
|
@@ -80,7 +80,7 @@ exports.PluginPermission = void 0;
|
|
|
80
80
|
* <h3>Manifest Permissions:</h3>
|
|
81
81
|
* <ul>
|
|
82
82
|
* <li><strong>iOS 17 ≤:</strong> NSRemindersFullAccessUsageDescription</li>
|
|
83
|
-
* <li><strong>
|
|
83
|
+
* <li><strong>10 ≤ iOS ≤ 16:</strong> NSRemindersUsageDescription</li>
|
|
84
84
|
* </ul>
|
|
85
85
|
*/
|
|
86
86
|
PluginPermission["READ_REMINDERS"] = "readReminders";
|
|
@@ -92,7 +92,7 @@ exports.PluginPermission = void 0;
|
|
|
92
92
|
* <h3>Manifest Permissions:</h3>
|
|
93
93
|
* <ul>
|
|
94
94
|
* <li><strong>iOS 17 ≤:</strong> NSRemindersFullAccessUsageDescription</li>
|
|
95
|
-
* <li><strong>
|
|
95
|
+
* <li><strong>13 ≤ iOS ≤ 16:</strong> NSRemindersUsageDescription</li>
|
|
96
96
|
* </ul>
|
|
97
97
|
*/
|
|
98
98
|
PluginPermission["WRITE_REMINDERS"] = "writeReminders";
|
|
@@ -175,6 +175,9 @@ class CapacitorCalendarWeb extends core.WebPlugin {
|
|
|
175
175
|
listEventsInRange(_options) {
|
|
176
176
|
throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);
|
|
177
177
|
}
|
|
178
|
+
deleteEventsById(_options) {
|
|
179
|
+
throw this.unimplemented(`${this.deleteEventsById.name} is not implemented on the web`);
|
|
180
|
+
}
|
|
178
181
|
}
|
|
179
182
|
|
|
180
183
|
var web = /*#__PURE__*/Object.freeze({
|
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/schemas/enums/calendar-chooser-display-style.js","esm/schemas/enums/calendar-chooser-selection-style.js","esm/schemas/enums/plugin-permission.js","esm/schemas/enums/reminder-recurrence-frequency.js","esm/index.js","esm/web.js"],"sourcesContent":["/**\n * Enum representing the display styles for the calendar chooser.\n *\n * @enum CalendarChooserDisplayStyle\n * @platform iOS\n */\nexport var CalendarChooserDisplayStyle;\n(function (CalendarChooserDisplayStyle) {\n /**\n * Display all calendars available for selection.\n */\n CalendarChooserDisplayStyle[CalendarChooserDisplayStyle[\"ALL_CALENDARS\"] = 0] = \"ALL_CALENDARS\";\n /**\n * Display only writable calendars available for selection.\n */\n CalendarChooserDisplayStyle[CalendarChooserDisplayStyle[\"WRITABLE_CALENDARS_ONLY\"] = 1] = \"WRITABLE_CALENDARS_ONLY\";\n})(CalendarChooserDisplayStyle || (CalendarChooserDisplayStyle = {}));\n//# sourceMappingURL=calendar-chooser-display-style.js.map","/**\n * Enum representing the selection style for the calendar chooser.\n *\n * @enum CalendarChooserSelectionStyle\n * @platform iOS\n */\nexport var CalendarChooserSelectionStyle;\n(function (CalendarChooserSelectionStyle) {\n /**\n * Allows only a single selection in the calendar chooser.\n */\n CalendarChooserSelectionStyle[CalendarChooserSelectionStyle[\"SINGLE\"] = 0] = \"SINGLE\";\n /**\n * Allows multiple selections in the calendar chooser.\n */\n CalendarChooserSelectionStyle[CalendarChooserSelectionStyle[\"MULTIPLE\"] = 1] = \"MULTIPLE\";\n})(CalendarChooserSelectionStyle || (CalendarChooserSelectionStyle = {}));\n//# sourceMappingURL=calendar-chooser-selection-style.js.map","/**\n * Enum representing the available runtime permissions for the plugin.\n *\n * @enum PluginPermission\n * @platform iOS, Android\n */\nexport var PluginPermission;\n(function (PluginPermission) {\n /**\n * Represents the permission state for reading calendar.\n *\n * @platform iOS, Android\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSCalendarsFullAccessUsageDescription</li>\n * <li><strong>iOS 10 ≤ x ≤ iOS 16:</strong> NSCalendarsUsageDescription</li>\n * <li><strong>Android:</strong> android.permission.READ_CALENDAR</li>\n * </ul>\n */\n PluginPermission[\"READ_CALENDAR\"] = \"readCalendar\";\n /**\n * Represents the permission state for writing calendar.\n *\n * @platform iOS, Android\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSCalendarsWriteOnlyAccessUsageDescription</li>\n * <li><strong>iOS 10 ≤ x ≤ iOS 16:</strong> NSCalendarsUsageDescription</li>\n * <li><strong>Android:</strong> android.permission.WRITE_CALENDAR</li>\n * </ul>\n */\n PluginPermission[\"WRITE_CALENDAR\"] = \"writeCalendar\";\n /**\n * Represents the permission state for reading reminders.\n *\n * @platform iOS\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSRemindersFullAccessUsageDescription</li>\n * <li><strong>iOS 10 ≤ x ≤ iOS 16:</strong> NSRemindersUsageDescription</li>\n * </ul>\n */\n PluginPermission[\"READ_REMINDERS\"] = \"readReminders\";\n /**\n * Represents the permission state for writing reminders.\n *\n * @platform iOS\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSRemindersFullAccessUsageDescription</li>\n * <li><strong>iOS 10 ≤ x ≤ iOS 16:</strong> NSRemindersUsageDescription</li>\n * </ul>\n */\n PluginPermission[\"WRITE_REMINDERS\"] = \"writeReminders\";\n})(PluginPermission || (PluginPermission = {}));\n//# sourceMappingURL=plugin-permission.js.map","/**\n * Enum representing the repeating frequency of the reminder.\n *\n * @enum ReminderRecurrenceFrequency\n * @platform iOS\n */\nexport var ReminderRecurrenceFrequency;\n(function (ReminderRecurrenceFrequency) {\n /**\n * The reminder repeats on a daily basis\n */\n ReminderRecurrenceFrequency[ReminderRecurrenceFrequency[\"DAILY\"] = 0] = \"DAILY\";\n /**\n * The reminder repeats on a weekly basis\n */\n ReminderRecurrenceFrequency[ReminderRecurrenceFrequency[\"WEEKLY\"] = 1] = \"WEEKLY\";\n /**\n * The reminder repeats on a monthly basis\n */\n ReminderRecurrenceFrequency[ReminderRecurrenceFrequency[\"MONTHLY\"] = 2] = \"MONTHLY\";\n /**\n * The reminder repeats on a yearly basis\n */\n ReminderRecurrenceFrequency[ReminderRecurrenceFrequency[\"YEARLY\"] = 3] = \"YEARLY\";\n})(ReminderRecurrenceFrequency || (ReminderRecurrenceFrequency = {}));\n//# sourceMappingURL=reminder-recurrence-frequency.js.map","import { registerPlugin } from '@capacitor/core';\nimport { CalendarChooserDisplayStyle } from './schemas/enums/calendar-chooser-display-style';\nimport { CalendarChooserSelectionStyle } from './schemas/enums/calendar-chooser-selection-style';\nimport { PluginPermission } from './schemas/enums/plugin-permission';\nimport { ReminderRecurrenceFrequency } from './schemas/enums/reminder-recurrence-frequency';\nconst CapacitorCalendar = registerPlugin('CapacitorCalendar', {\n web: () => import('./web').then((m) => new m.CapacitorCalendarWeb()),\n});\nexport * from './definitions';\nexport { CalendarChooserSelectionStyle, CalendarChooserDisplayStyle, PluginPermission, ReminderRecurrenceFrequency, CapacitorCalendar, };\n//# sourceMappingURL=index.js.map","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { WebPlugin } from '@capacitor/core';\nexport class CapacitorCalendarWeb extends WebPlugin {\n checkPermission(_options) {\n throw this.unimplemented(`${this.checkPermission.name} is not implemented on the web`);\n }\n checkAllPermissions() {\n throw this.unimplemented(`${this.checkAllPermissions.name} is not implemented on the web`);\n }\n requestPermission(_options) {\n throw this.unimplemented(`${this.requestPermission.name} is not implemented on the web`);\n }\n requestAllPermissions() {\n throw this.unimplemented(`${this.requestAllPermissions.name} is not implemented on the web`);\n }\n createEventWithPrompt() {\n throw this.unimplemented(`${this.createEventWithPrompt.name} is not implemented on the web`);\n }\n selectCalendarsWithPrompt() {\n throw this.unimplemented(`${this.createEventWithPrompt.name} is not implemented on the web`);\n }\n listCalendars() {\n throw this.unimplemented(`${this.listCalendars.name} is not implemented on the web`);\n }\n getDefaultCalendar() {\n throw this.unimplemented(`${this.getDefaultCalendar.name} is not implemented on the web`);\n }\n createEvent(_options) {\n throw this.unimplemented(`${this.createEvent.name} is not implemented on the web`);\n }\n createReminder(_options) {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n getDefaultRemindersList() {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n getRemindersLists() {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n openCalendar(_options) {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n openReminders() {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n listEventsInRange(_options) {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["CalendarChooserDisplayStyle","CalendarChooserSelectionStyle","PluginPermission","ReminderRecurrenceFrequency","registerPlugin","WebPlugin"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACWA,6CAA4B;AACvC,CAAC,UAAU,2BAA2B,EAAE;AACxC;AACA;AACA;AACA,IAAI,2BAA2B,CAAC,2BAA2B,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,GAAG,eAAe,CAAC;AACpG;AACA;AACA;AACA,IAAI,2BAA2B,CAAC,2BAA2B,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC,GAAG,yBAAyB,CAAC;AACxH,CAAC,EAAEA,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,IAAI,CAAC,8BAA8B,CAAC,CAAC,CAAC;AAC9F,KAAK;AACL,IAAI,YAAY,CAAC,QAAQ,EAAE;AAC3B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC,CAAC;AAC9F,KAAK;AACL,IAAI,aAAa,GAAG;AACpB,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC,CAAC;AAC9F,KAAK;AACL,IAAI,iBAAiB,CAAC,QAAQ,EAAE;AAChC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC,CAAC;AAC9F,KAAK;AACL;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/schemas/enums/calendar-chooser-display-style.js","esm/schemas/enums/calendar-chooser-selection-style.js","esm/schemas/enums/plugin-permission.js","esm/schemas/enums/reminder-recurrence-frequency.js","esm/index.js","esm/web.js"],"sourcesContent":["/**\n * Enum representing the display styles for the calendar chooser.\n *\n * @enum CalendarChooserDisplayStyle\n * @platform iOS\n */\nexport var CalendarChooserDisplayStyle;\n(function (CalendarChooserDisplayStyle) {\n /**\n * Display all calendars available for selection.\n */\n CalendarChooserDisplayStyle[CalendarChooserDisplayStyle[\"ALL_CALENDARS\"] = 0] = \"ALL_CALENDARS\";\n /**\n * Display only writable calendars available for selection.\n */\n CalendarChooserDisplayStyle[CalendarChooserDisplayStyle[\"WRITABLE_CALENDARS_ONLY\"] = 1] = \"WRITABLE_CALENDARS_ONLY\";\n})(CalendarChooserDisplayStyle || (CalendarChooserDisplayStyle = {}));\n//# sourceMappingURL=calendar-chooser-display-style.js.map","/**\n * Enum representing the selection style for the calendar chooser.\n *\n * @enum CalendarChooserSelectionStyle\n * @platform iOS\n */\nexport var CalendarChooserSelectionStyle;\n(function (CalendarChooserSelectionStyle) {\n /**\n * Allows only a single selection in the calendar chooser.\n */\n CalendarChooserSelectionStyle[CalendarChooserSelectionStyle[\"SINGLE\"] = 0] = \"SINGLE\";\n /**\n * Allows multiple selections in the calendar chooser.\n */\n CalendarChooserSelectionStyle[CalendarChooserSelectionStyle[\"MULTIPLE\"] = 1] = \"MULTIPLE\";\n})(CalendarChooserSelectionStyle || (CalendarChooserSelectionStyle = {}));\n//# sourceMappingURL=calendar-chooser-selection-style.js.map","/**\n * Enum representing the available runtime permissions for the plugin.\n *\n * @enum PluginPermission\n * @platform iOS, Android\n */\nexport var PluginPermission;\n(function (PluginPermission) {\n /**\n * Represents the permission state for reading calendar.\n *\n * @platform iOS, Android\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSCalendarsFullAccessUsageDescription</li>\n * <li><strong>13 ≤ iOS ≤ 16:</strong> NSCalendarsUsageDescription</li>\n * <li><strong>Android:</strong> android.permission.READ_CALENDAR</li>\n * </ul>\n */\n PluginPermission[\"READ_CALENDAR\"] = \"readCalendar\";\n /**\n * Represents the permission state for writing calendar.\n *\n * @platform iOS, Android\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSCalendarsWriteOnlyAccessUsageDescription</li>\n * <li><strong>13 ≤ iOS ≤ 16:</strong> NSCalendarsUsageDescription</li>\n * <li><strong>Android:</strong> android.permission.WRITE_CALENDAR</li>\n * </ul>\n */\n PluginPermission[\"WRITE_CALENDAR\"] = \"writeCalendar\";\n /**\n * Represents the permission state for reading reminders.\n *\n * @platform iOS\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSRemindersFullAccessUsageDescription</li>\n * <li><strong>10 ≤ iOS ≤ 16:</strong> NSRemindersUsageDescription</li>\n * </ul>\n */\n PluginPermission[\"READ_REMINDERS\"] = \"readReminders\";\n /**\n * Represents the permission state for writing reminders.\n *\n * @platform iOS\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSRemindersFullAccessUsageDescription</li>\n * <li><strong>13 ≤ iOS ≤ 16:</strong> NSRemindersUsageDescription</li>\n * </ul>\n */\n PluginPermission[\"WRITE_REMINDERS\"] = \"writeReminders\";\n})(PluginPermission || (PluginPermission = {}));\n//# sourceMappingURL=plugin-permission.js.map","/**\n * Enum representing the repeating frequency of the reminder.\n *\n * @enum ReminderRecurrenceFrequency\n * @platform iOS\n */\nexport var ReminderRecurrenceFrequency;\n(function (ReminderRecurrenceFrequency) {\n /**\n * The reminder repeats on a daily basis\n */\n ReminderRecurrenceFrequency[ReminderRecurrenceFrequency[\"DAILY\"] = 0] = \"DAILY\";\n /**\n * The reminder repeats on a weekly basis\n */\n ReminderRecurrenceFrequency[ReminderRecurrenceFrequency[\"WEEKLY\"] = 1] = \"WEEKLY\";\n /**\n * The reminder repeats on a monthly basis\n */\n ReminderRecurrenceFrequency[ReminderRecurrenceFrequency[\"MONTHLY\"] = 2] = \"MONTHLY\";\n /**\n * The reminder repeats on a yearly basis\n */\n ReminderRecurrenceFrequency[ReminderRecurrenceFrequency[\"YEARLY\"] = 3] = \"YEARLY\";\n})(ReminderRecurrenceFrequency || (ReminderRecurrenceFrequency = {}));\n//# sourceMappingURL=reminder-recurrence-frequency.js.map","import { registerPlugin } from '@capacitor/core';\nimport { CalendarChooserDisplayStyle } from './schemas/enums/calendar-chooser-display-style';\nimport { CalendarChooserSelectionStyle } from './schemas/enums/calendar-chooser-selection-style';\nimport { PluginPermission } from './schemas/enums/plugin-permission';\nimport { ReminderRecurrenceFrequency } from './schemas/enums/reminder-recurrence-frequency';\nconst CapacitorCalendar = registerPlugin('CapacitorCalendar', {\n web: () => import('./web').then((m) => new m.CapacitorCalendarWeb()),\n});\nexport * from './definitions';\nexport { CalendarChooserSelectionStyle, CalendarChooserDisplayStyle, PluginPermission, ReminderRecurrenceFrequency, CapacitorCalendar, };\n//# sourceMappingURL=index.js.map","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { WebPlugin } from '@capacitor/core';\nexport class CapacitorCalendarWeb extends WebPlugin {\n checkPermission(_options) {\n throw this.unimplemented(`${this.checkPermission.name} is not implemented on the web`);\n }\n checkAllPermissions() {\n throw this.unimplemented(`${this.checkAllPermissions.name} is not implemented on the web`);\n }\n requestPermission(_options) {\n throw this.unimplemented(`${this.requestPermission.name} is not implemented on the web`);\n }\n requestAllPermissions() {\n throw this.unimplemented(`${this.requestAllPermissions.name} is not implemented on the web`);\n }\n createEventWithPrompt() {\n throw this.unimplemented(`${this.createEventWithPrompt.name} is not implemented on the web`);\n }\n selectCalendarsWithPrompt() {\n throw this.unimplemented(`${this.createEventWithPrompt.name} is not implemented on the web`);\n }\n listCalendars() {\n throw this.unimplemented(`${this.listCalendars.name} is not implemented on the web`);\n }\n getDefaultCalendar() {\n throw this.unimplemented(`${this.getDefaultCalendar.name} is not implemented on the web`);\n }\n createEvent(_options) {\n throw this.unimplemented(`${this.createEvent.name} is not implemented on the web`);\n }\n createReminder(_options) {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n getDefaultRemindersList() {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n getRemindersLists() {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n openCalendar(_options) {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n openReminders() {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n listEventsInRange(_options) {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n deleteEventsById(_options) {\n throw this.unimplemented(`${this.deleteEventsById.name} is not implemented on the web`);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["CalendarChooserDisplayStyle","CalendarChooserSelectionStyle","PluginPermission","ReminderRecurrenceFrequency","registerPl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strong> NSCalendarsFullAccessUsageDescription</li>
|
|
56
|
-
* <li><strong>
|
|
56
|
+
* <li><strong>13 ≤ iOS ≤ 16:</strong> NSCalendarsUsageDescription</li>
|
|
57
57
|
* <li><strong>Android:</strong> android.permission.READ_CALENDAR</li>
|
|
58
58
|
* </ul>
|
|
59
59
|
*/
|
|
@@ -66,7 +66,7 @@ var capacitorCapacitorCalendar = (function (exports, core) {
|
|
|
66
66
|
* <h3>Manifest Permissions:</h3>
|
|
67
67
|
* <ul>
|
|
68
68
|
* <li><strong>iOS 17 ≤:</strong> NSCalendarsWriteOnlyAccessUsageDescription</li>
|
|
69
|
-
* <li><strong>
|
|
69
|
+
* <li><strong>13 ≤ iOS ≤ 16:</strong> NSCalendarsUsageDescription</li>
|
|
70
70
|
* <li><strong>Android:</strong> android.permission.WRITE_CALENDAR</li>
|
|
71
71
|
* </ul>
|
|
72
72
|
*/
|
|
@@ -79,7 +79,7 @@ var capacitorCapacitorCalendar = (function (exports, core) {
|
|
|
79
79
|
* <h3>Manifest Permissions:</h3>
|
|
80
80
|
* <ul>
|
|
81
81
|
* <li><strong>iOS 17 ≤:</strong> NSRemindersFullAccessUsageDescription</li>
|
|
82
|
-
* <li><strong>
|
|
82
|
+
* <li><strong>10 ≤ iOS ≤ 16:</strong> NSRemindersUsageDescription</li>
|
|
83
83
|
* </ul>
|
|
84
84
|
*/
|
|
85
85
|
PluginPermission["READ_REMINDERS"] = "readReminders";
|
|
@@ -91,7 +91,7 @@ var capacitorCapacitorCalendar = (function (exports, core) {
|
|
|
91
91
|
* <h3>Manifest Permissions:</h3>
|
|
92
92
|
* <ul>
|
|
93
93
|
* <li><strong>iOS 17 ≤:</strong> NSRemindersFullAccessUsageDescription</li>
|
|
94
|
-
* <li><strong>
|
|
94
|
+
* <li><strong>13 ≤ iOS ≤ 16:</strong> NSRemindersUsageDescription</li>
|
|
95
95
|
* </ul>
|
|
96
96
|
*/
|
|
97
97
|
PluginPermission["WRITE_REMINDERS"] = "writeReminders";
|
|
@@ -174,6 +174,9 @@ var capacitorCapacitorCalendar = (function (exports, core) {
|
|
|
174
174
|
listEventsInRange(_options) {
|
|
175
175
|
throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);
|
|
176
176
|
}
|
|
177
|
+
deleteEventsById(_options) {
|
|
178
|
+
throw this.unimplemented(`${this.deleteEventsById.name} is not implemented on the web`);
|
|
179
|
+
}
|
|
177
180
|
}
|
|
178
181
|
|
|
179
182
|
var web = /*#__PURE__*/Object.freeze({
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/schemas/enums/calendar-chooser-display-style.js","esm/schemas/enums/calendar-chooser-selection-style.js","esm/schemas/enums/plugin-permission.js","esm/schemas/enums/reminder-recurrence-frequency.js","esm/index.js","esm/web.js"],"sourcesContent":["/**\n * Enum representing the display styles for the calendar chooser.\n *\n * @enum CalendarChooserDisplayStyle\n * @platform iOS\n */\nexport var CalendarChooserDisplayStyle;\n(function (CalendarChooserDisplayStyle) {\n /**\n * Display all calendars available for selection.\n */\n CalendarChooserDisplayStyle[CalendarChooserDisplayStyle[\"ALL_CALENDARS\"] = 0] = \"ALL_CALENDARS\";\n /**\n * Display only writable calendars available for selection.\n */\n CalendarChooserDisplayStyle[CalendarChooserDisplayStyle[\"WRITABLE_CALENDARS_ONLY\"] = 1] = \"WRITABLE_CALENDARS_ONLY\";\n})(CalendarChooserDisplayStyle || (CalendarChooserDisplayStyle = {}));\n//# sourceMappingURL=calendar-chooser-display-style.js.map","/**\n * Enum representing the selection style for the calendar chooser.\n *\n * @enum CalendarChooserSelectionStyle\n * @platform iOS\n */\nexport var CalendarChooserSelectionStyle;\n(function (CalendarChooserSelectionStyle) {\n /**\n * Allows only a single selection in the calendar chooser.\n */\n CalendarChooserSelectionStyle[CalendarChooserSelectionStyle[\"SINGLE\"] = 0] = \"SINGLE\";\n /**\n * Allows multiple selections in the calendar chooser.\n */\n CalendarChooserSelectionStyle[CalendarChooserSelectionStyle[\"MULTIPLE\"] = 1] = \"MULTIPLE\";\n})(CalendarChooserSelectionStyle || (CalendarChooserSelectionStyle = {}));\n//# sourceMappingURL=calendar-chooser-selection-style.js.map","/**\n * Enum representing the available runtime permissions for the plugin.\n *\n * @enum PluginPermission\n * @platform iOS, Android\n */\nexport var PluginPermission;\n(function (PluginPermission) {\n /**\n * Represents the permission state for reading calendar.\n *\n * @platform iOS, Android\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSCalendarsFullAccessUsageDescription</li>\n * <li><strong>iOS 10 ≤ x ≤ iOS 16:</strong> NSCalendarsUsageDescription</li>\n * <li><strong>Android:</strong> android.permission.READ_CALENDAR</li>\n * </ul>\n */\n PluginPermission[\"READ_CALENDAR\"] = \"readCalendar\";\n /**\n * Represents the permission state for writing calendar.\n *\n * @platform iOS, Android\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSCalendarsWriteOnlyAccessUsageDescription</li>\n * <li><strong>iOS 10 ≤ x ≤ iOS 16:</strong> NSCalendarsUsageDescription</li>\n * <li><strong>Android:</strong> android.permission.WRITE_CALENDAR</li>\n * </ul>\n */\n PluginPermission[\"WRITE_CALENDAR\"] = \"writeCalendar\";\n /**\n * Represents the permission state for reading reminders.\n *\n * @platform iOS\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSRemindersFullAccessUsageDescription</li>\n * <li><strong>iOS 10 ≤ x ≤ iOS 16:</strong> NSRemindersUsageDescription</li>\n * </ul>\n */\n PluginPermission[\"READ_REMINDERS\"] = \"readReminders\";\n /**\n * Represents the permission state for writing reminders.\n *\n * @platform iOS\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSRemindersFullAccessUsageDescription</li>\n * <li><strong>iOS 10 ≤ x ≤ iOS 16:</strong> NSRemindersUsageDescription</li>\n * </ul>\n */\n PluginPermission[\"WRITE_REMINDERS\"] = \"writeReminders\";\n})(PluginPermission || (PluginPermission = {}));\n//# sourceMappingURL=plugin-permission.js.map","/**\n * Enum representing the repeating frequency of the reminder.\n *\n * @enum ReminderRecurrenceFrequency\n * @platform iOS\n */\nexport var ReminderRecurrenceFrequency;\n(function (ReminderRecurrenceFrequency) {\n /**\n * The reminder repeats on a daily basis\n */\n ReminderRecurrenceFrequency[ReminderRecurrenceFrequency[\"DAILY\"] = 0] = \"DAILY\";\n /**\n * The reminder repeats on a weekly basis\n */\n ReminderRecurrenceFrequency[ReminderRecurrenceFrequency[\"WEEKLY\"] = 1] = \"WEEKLY\";\n /**\n * The reminder repeats on a monthly basis\n */\n ReminderRecurrenceFrequency[ReminderRecurrenceFrequency[\"MONTHLY\"] = 2] = \"MONTHLY\";\n /**\n * The reminder repeats on a yearly basis\n */\n ReminderRecurrenceFrequency[ReminderRecurrenceFrequency[\"YEARLY\"] = 3] = \"YEARLY\";\n})(ReminderRecurrenceFrequency || (ReminderRecurrenceFrequency = {}));\n//# sourceMappingURL=reminder-recurrence-frequency.js.map","import { registerPlugin } from '@capacitor/core';\nimport { CalendarChooserDisplayStyle } from './schemas/enums/calendar-chooser-display-style';\nimport { CalendarChooserSelectionStyle } from './schemas/enums/calendar-chooser-selection-style';\nimport { PluginPermission } from './schemas/enums/plugin-permission';\nimport { ReminderRecurrenceFrequency } from './schemas/enums/reminder-recurrence-frequency';\nconst CapacitorCalendar = registerPlugin('CapacitorCalendar', {\n web: () => import('./web').then((m) => new m.CapacitorCalendarWeb()),\n});\nexport * from './definitions';\nexport { CalendarChooserSelectionStyle, CalendarChooserDisplayStyle, PluginPermission, ReminderRecurrenceFrequency, CapacitorCalendar, };\n//# sourceMappingURL=index.js.map","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { WebPlugin } from '@capacitor/core';\nexport class CapacitorCalendarWeb extends WebPlugin {\n checkPermission(_options) {\n throw this.unimplemented(`${this.checkPermission.name} is not implemented on the web`);\n }\n checkAllPermissions() {\n throw this.unimplemented(`${this.checkAllPermissions.name} is not implemented on the web`);\n }\n requestPermission(_options) {\n throw this.unimplemented(`${this.requestPermission.name} is not implemented on the web`);\n }\n requestAllPermissions() {\n throw this.unimplemented(`${this.requestAllPermissions.name} is not implemented on the web`);\n }\n createEventWithPrompt() {\n throw this.unimplemented(`${this.createEventWithPrompt.name} is not implemented on the web`);\n }\n selectCalendarsWithPrompt() {\n throw this.unimplemented(`${this.createEventWithPrompt.name} is not implemented on the web`);\n }\n listCalendars() {\n throw this.unimplemented(`${this.listCalendars.name} is not implemented on the web`);\n }\n getDefaultCalendar() {\n throw this.unimplemented(`${this.getDefaultCalendar.name} is not implemented on the web`);\n }\n createEvent(_options) {\n throw this.unimplemented(`${this.createEvent.name} is not implemented on the web`);\n }\n createReminder(_options) {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n getDefaultRemindersList() {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n getRemindersLists() {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n openCalendar(_options) {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n openReminders() {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n listEventsInRange(_options) {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["CalendarChooserDisplayStyle","CalendarChooserSelectionStyle","PluginPermission","ReminderRecurrenceFrequency","registerPlugin","WebPlugin"],"mappings":";;;IAAA;IACA;IACA;IACA;IACA;IACA;AACWA,iDAA4B;IACvC,CAAC,UAAU,2BAA2B,EAAE;IACxC;IACA;IACA;IACA,IAAI,2BAA2B,CAAC,2BAA2B,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,GAAG,eAAe,CAAC;IACpG;IACA;IACA;IACA,IAAI,2BAA2B,CAAC,2BAA2B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;IACxB,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC,CAAC;IAC9F,KAAK;IACL,IAAI,YAAY,CAAC,QAAQ,EAAE;IAC3B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC,CAAC;IAC9F,KAAK;IACL,IAAI,aAAa,GAAG;IACpB,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC,CAAC;IAC9F,KAAK;IACL,IAAI,iBAAiB,CAAC,QAAQ,EAAE;IAChC,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC,CAAC;IAC9F,KAAK;IACL;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/schemas/enums/calendar-chooser-display-style.js","esm/schemas/enums/calendar-chooser-selection-style.js","esm/schemas/enums/plugin-permission.js","esm/schemas/enums/reminder-recurrence-frequency.js","esm/index.js","esm/web.js"],"sourcesContent":["/**\n * Enum representing the display styles for the calendar chooser.\n *\n * @enum CalendarChooserDisplayStyle\n * @platform iOS\n */\nexport var CalendarChooserDisplayStyle;\n(function (CalendarChooserDisplayStyle) {\n /**\n * Display all calendars available for selection.\n */\n CalendarChooserDisplayStyle[CalendarChooserDisplayStyle[\"ALL_CALENDARS\"] = 0] = \"ALL_CALENDARS\";\n /**\n * Display only writable calendars available for selection.\n */\n CalendarChooserDisplayStyle[CalendarChooserDisplayStyle[\"WRITABLE_CALENDARS_ONLY\"] = 1] = \"WRITABLE_CALENDARS_ONLY\";\n})(CalendarChooserDisplayStyle || (CalendarChooserDisplayStyle = {}));\n//# sourceMappingURL=calendar-chooser-display-style.js.map","/**\n * Enum representing the selection style for the calendar chooser.\n *\n * @enum CalendarChooserSelectionStyle\n * @platform iOS\n */\nexport var CalendarChooserSelectionStyle;\n(function (CalendarChooserSelectionStyle) {\n /**\n * Allows only a single selection in the calendar chooser.\n */\n CalendarChooserSelectionStyle[CalendarChooserSelectionStyle[\"SINGLE\"] = 0] = \"SINGLE\";\n /**\n * Allows multiple selections in the calendar chooser.\n */\n CalendarChooserSelectionStyle[CalendarChooserSelectionStyle[\"MULTIPLE\"] = 1] = \"MULTIPLE\";\n})(CalendarChooserSelectionStyle || (CalendarChooserSelectionStyle = {}));\n//# sourceMappingURL=calendar-chooser-selection-style.js.map","/**\n * Enum representing the available runtime permissions for the plugin.\n *\n * @enum PluginPermission\n * @platform iOS, Android\n */\nexport var PluginPermission;\n(function (PluginPermission) {\n /**\n * Represents the permission state for reading calendar.\n *\n * @platform iOS, Android\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSCalendarsFullAccessUsageDescription</li>\n * <li><strong>13 ≤ iOS ≤ 16:</strong> NSCalendarsUsageDescription</li>\n * <li><strong>Android:</strong> android.permission.READ_CALENDAR</li>\n * </ul>\n */\n PluginPermission[\"READ_CALENDAR\"] = \"readCalendar\";\n /**\n * Represents the permission state for writing calendar.\n *\n * @platform iOS, Android\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSCalendarsWriteOnlyAccessUsageDescription</li>\n * <li><strong>13 ≤ iOS ≤ 16:</strong> NSCalendarsUsageDescription</li>\n * <li><strong>Android:</strong> android.permission.WRITE_CALENDAR</li>\n * </ul>\n */\n PluginPermission[\"WRITE_CALENDAR\"] = \"writeCalendar\";\n /**\n * Represents the permission state for reading reminders.\n *\n * @platform iOS\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSRemindersFullAccessUsageDescription</li>\n * <li><strong>10 ≤ iOS ≤ 16:</strong> NSRemindersUsageDescription</li>\n * </ul>\n */\n PluginPermission[\"READ_REMINDERS\"] = \"readReminders\";\n /**\n * Represents the permission state for writing reminders.\n *\n * @platform iOS\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> NSRemindersFullAccessUsageDescription</li>\n * <li><strong>13 ≤ iOS ≤ 16:</strong> NSRemindersUsageDescription</li>\n * </ul>\n */\n PluginPermission[\"WRITE_REMINDERS\"] = \"writeReminders\";\n})(PluginPermission || (PluginPermission = {}));\n//# sourceMappingURL=plugin-permission.js.map","/**\n * Enum representing the repeating frequency of the reminder.\n *\n * @enum ReminderRecurrenceFrequency\n * @platform iOS\n */\nexport var ReminderRecurrenceFrequency;\n(function (ReminderRecurrenceFrequency) {\n /**\n * The reminder repeats on a daily basis\n */\n ReminderRecurrenceFrequency[ReminderRecurrenceFrequency[\"DAILY\"] = 0] = \"DAILY\";\n /**\n * The reminder repeats on a weekly basis\n */\n ReminderRecurrenceFrequency[ReminderRecurrenceFrequency[\"WEEKLY\"] = 1] = \"WEEKLY\";\n /**\n * The reminder repeats on a monthly basis\n */\n ReminderRecurrenceFrequency[ReminderRecurrenceFrequency[\"MONTHLY\"] = 2] = \"MONTHLY\";\n /**\n * The reminder repeats on a yearly basis\n */\n ReminderRecurrenceFrequency[ReminderRecurrenceFrequency[\"YEARLY\"] = 3] = \"YEARLY\";\n})(ReminderRecurrenceFrequency || (ReminderRecurrenceFrequency = {}));\n//# sourceMappingURL=reminder-recurrence-frequency.js.map","import { registerPlugin } from '@capacitor/core';\nimport { CalendarChooserDisplayStyle } from './schemas/enums/calendar-chooser-display-style';\nimport { CalendarChooserSelectionStyle } from './schemas/enums/calendar-chooser-selection-style';\nimport { PluginPermission } from './schemas/enums/plugin-permission';\nimport { ReminderRecurrenceFrequency } from './schemas/enums/reminder-recurrence-frequency';\nconst CapacitorCalendar = registerPlugin('CapacitorCalendar', {\n web: () => import('./web').then((m) => new m.CapacitorCalendarWeb()),\n});\nexport * from './definitions';\nexport { CalendarChooserSelectionStyle, CalendarChooserDisplayStyle, PluginPermission, ReminderRecurrenceFrequency, CapacitorCalendar, };\n//# sourceMappingURL=index.js.map","/* eslint-disable @typescript-eslint/no-unused-vars */\nimport { WebPlugin } from '@capacitor/core';\nexport class CapacitorCalendarWeb extends WebPlugin {\n checkPermission(_options) {\n throw this.unimplemented(`${this.checkPermission.name} is not implemented on the web`);\n }\n checkAllPermissions() {\n throw this.unimplemented(`${this.checkAllPermissions.name} is not implemented on the web`);\n }\n requestPermission(_options) {\n throw this.unimplemented(`${this.requestPermission.name} is not implemented on the web`);\n }\n requestAllPermissions() {\n throw this.unimplemented(`${this.requestAllPermissions.name} is not implemented on the web`);\n }\n createEventWithPrompt() {\n throw this.unimplemented(`${this.createEventWithPrompt.name} is not implemented on the web`);\n }\n selectCalendarsWithPrompt() {\n throw this.unimplemented(`${this.createEventWithPrompt.name} is not implemented on the web`);\n }\n listCalendars() {\n throw this.unimplemented(`${this.listCalendars.name} is not implemented on the web`);\n }\n getDefaultCalendar() {\n throw this.unimplemented(`${this.getDefaultCalendar.name} is not implemented on the web`);\n }\n createEvent(_options) {\n throw this.unimplemented(`${this.createEvent.name} is not implemented on the web`);\n }\n createReminder(_options) {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n getDefaultRemindersList() {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n getRemindersLists() {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n openCalendar(_options) {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n openReminders() {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n listEventsInRange(_options) {\n throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);\n }\n deleteEventsById(_options) {\n throw this.unimplemented(`${this.deleteEventsById.name} is not implemented on the web`);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["CalendarChooserDisplayStyle","CalendarChooserSelectionStyle","PluginPermission","ReminderRecurrenceFrequency","registerPlugin","WebPlugin"],"mappings":";;;IAAA;IACA;IACA;IACA;IACA;IACA;AACWA,iDAA4B;IACvC,CAAC,UAAU,2BAA2B,EAAE;IACxC;IACA;IACA;IACA,IAAI,2BAA2B,CAAC,2BAA2B,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,GAAG,eAAe,CAAC;IACpG;IACA;IACA;IACA,IAAI,2BAA2B,CAAC,2BAA2B,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC,GAAG,yBAAyB,CAAC;IACxH,CAAC,EAAEA,mCAA2B,KAAKA,mCAA2B,GAAG,EAAE,CAAC,CAAC;;IChBrE;IACA;IACA;IACA;IACA;IACA;AACWC,mDAA8B;IACzC,CAAC,UAAU,6BAA6B,EAAE;IAC1C;IACA;IACA;IACA,IAAI,6BAA6B,CAAC,6BAA6B,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;IAC1F;IACA;IACA;IACA,IAAI,6BAA6B,CAAC,6BAA6B,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;IAC9F,CAAC,EAAEA,qCAA6B,KAAKA,qCAA6B,GAAG,EAAE,CAAC,CAAC;;IChBzE;IACA;IACA;IACA;IACA;IACA;AACWC,sCAAiB;IAC5B,CAAC,UAAU,gBAAgB,EAAE;IAC7B;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,IAAI,gBAAgB,CAAC,eAAe,CAAC,GAAG,cAAc,CAAC;IACvD;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,IAAI,gBAAgB,CAAC,gBAAgB,CAAC,GAAG,eAAe,CAAC;IACzD;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,IAAI,gBAAgB,CAAC,gBAAgB,CAAC,GAAG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
252
252
|
return dictionaryRepresentationOfEvents(events: events)
|
|
253
253
|
}
|
|
254
254
|
|
|
255
|
+
public func deleteEventsById(ids: JSArray) async throws -> EventDeleteResults {
|
|
256
|
+
await withCheckedContinuation { continuation in
|
|
257
|
+
|
|
258
|
+
var deletedEvents: [String] = []
|
|
259
|
+
var failedToDeleteEvents: [String] = []
|
|
260
|
+
|
|
261
|
+
for id in ids {
|
|
262
|
+
guard let event = eventStore.event(withIdentifier: "\(id)") else {
|
|
263
|
+
failedToDeleteEvents.append("\(id)")
|
|
264
|
+
continue
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
do {
|
|
268
|
+
try eventStore.remove(event, span: .thisEvent, commit: false)
|
|
269
|
+
deletedEvents.append("\(id)")
|
|
270
|
+
} catch {
|
|
271
|
+
failedToDeleteEvents.append("\(id)")
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
do {
|
|
276
|
+
try eventStore.commit()
|
|
277
|
+
} catch {
|
|
278
|
+
failedToDeleteEvents.append(contentsOf: deletedEvents)
|
|
279
|
+
deletedEvents.removeAll()
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
continuation.resume(returning: EventDeleteResults(deleted: deletedEvents, failed: failedToDeleteEvents))
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
255
286
|
public func eventEditViewController(
|
|
256
287
|
_ controller: EKEventEditViewController,
|
|
257
288
|
didCompleteWith action: EKEventEditViewAction
|
|
@@ -19,4 +19,5 @@ CAP_PLUGIN(CapacitorCalendarPlugin, "CapacitorCalendar",
|
|
|
19
19
|
CAP_PLUGIN_METHOD(openCalendar, CAPPluginReturnNone);
|
|
20
20
|
CAP_PLUGIN_METHOD(openReminders, CAPPluginReturnNone);
|
|
21
21
|
CAP_PLUGIN_METHOD(listEventsInRange, CAPPluginReturnPromise);
|
|
22
|
+
CAP_PLUGIN_METHOD(deleteEventsById, CAPPluginReturnPromise);
|
|
22
23
|
)
|
|
@@ -258,8 +258,8 @@ public class CapacitorCalendarPlugin: CAPPlugin {
|
|
|
258
258
|
)
|
|
259
259
|
|
|
260
260
|
do {
|
|
261
|
-
try reminders.createReminder(with: reminderParams)
|
|
262
|
-
call.resolve(["
|
|
261
|
+
let id = try reminders.createReminder(with: reminderParams)
|
|
262
|
+
call.resolve(["result": id])
|
|
263
263
|
} catch {
|
|
264
264
|
call.reject("[CapacitorCalendar.\(#function)] Unable to create reminder")
|
|
265
265
|
return
|
|
@@ -312,4 +312,26 @@ public class CapacitorCalendarPlugin: CAPPlugin {
|
|
|
312
312
|
return
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
|
+
|
|
316
|
+
@objc public func deleteEventsById(_ call: CAPPluginCall) {
|
|
317
|
+
guard let eventIds = call.getArray("ids") else {
|
|
318
|
+
call.reject("[CapacitorCalendar.\(#function)] Event ids were not provided")
|
|
319
|
+
return
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
Task {
|
|
323
|
+
do {
|
|
324
|
+
let deleteResult = try await calendar.deleteEventsById(ids: eventIds)
|
|
325
|
+
call.resolve([
|
|
326
|
+
"result": [
|
|
327
|
+
"deleted": deleteResult.deleted,
|
|
328
|
+
"failed": deleteResult.failed
|
|
329
|
+
]
|
|
330
|
+
])
|
|
331
|
+
} catch {
|
|
332
|
+
call.reject("[CapacitorCalendar.\(#function)] Could not delete events")
|
|
333
|
+
return
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
315
337
|
}
|
|
@@ -66,7 +66,7 @@ public class CapacitorReminders: NSObject {
|
|
|
66
66
|
return convertEKCalendarsToDictionaries(calendars: Set(eventStore.calendars(for: .reminder)))
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
public func createReminder(with parameters: ReminderCreationParameters) throws {
|
|
69
|
+
public func createReminder(with parameters: ReminderCreationParameters) throws -> String {
|
|
70
70
|
func setCalendar() {
|
|
71
71
|
if let listId = parameters.listId, let list = eventStore.calendar(withIdentifier: listId) {
|
|
72
72
|
newReminder.calendar = list
|
|
@@ -106,6 +106,7 @@ public class CapacitorReminders: NSObject {
|
|
|
106
106
|
|
|
107
107
|
do {
|
|
108
108
|
try eventStore.save(newReminder, commit: true)
|
|
109
|
+
return newReminder.calendarItemIdentifier
|
|
109
110
|
} catch {
|
|
110
111
|
throw CapacitorCalendarPluginError.unknownActionEventCreationPrompt
|
|
111
112
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//
|
|
2
|
+
// EventDeleteResults.swift
|
|
3
|
+
// Plugin
|
|
4
|
+
//
|
|
5
|
+
// Created by Ehsan Barooni on 13.04.24.
|
|
6
|
+
// Copyright © 2024 Max Lynch. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
import Foundation
|
|
10
|
+
|
|
11
|
+
public struct EventDeleteResults {
|
|
12
|
+
var deleted: [String]
|
|
13
|
+
var failed: [String]
|
|
14
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ebarooni/capacitor-calendar",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "The Capacitor Calendar Plugin enables full calendar functionality on iOS and Android, with added reminder support for iOS devices.",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|