@ebarooni/capacitor-calendar 0.11.0 → 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 +4 -2
- package/dist/docs.json +23 -11
- package/dist/esm/definitions.d.ts +18 -12
- package/dist/esm/definitions.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 +1 -1
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +4 -4
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +4 -4
- package/dist/plugin.js.map +1 -1
- package/ios/Plugin/CapacitorCalendarPlugin.swift +2 -2
- package/ios/Plugin/CapacitorReminders.swift +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -253,7 +253,7 @@ Retrieves all available reminders lists on the device.
|
|
|
253
253
|
### createReminder(...)
|
|
254
254
|
|
|
255
255
|
```typescript
|
|
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<{
|
|
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; }>
|
|
257
257
|
```
|
|
258
258
|
|
|
259
259
|
Creates a reminder with the provided options.
|
|
@@ -262,7 +262,9 @@ Creates a reminder with the provided options.
|
|
|
262
262
|
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
|
|
263
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. |
|
|
264
264
|
|
|
265
|
-
**Returns:** <code>Promise<{
|
|
265
|
+
**Returns:** <code>Promise<{ result: string; }></code>
|
|
266
|
+
|
|
267
|
+
**Since:** 0.5.0
|
|
266
268
|
|
|
267
269
|
--------------------
|
|
268
270
|
|
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.",
|
|
@@ -507,7 +515,7 @@
|
|
|
507
515
|
},
|
|
508
516
|
{
|
|
509
517
|
"name": "permissions",
|
|
510
|
-
"text": "<h3>Runtime Permissions:</h3>\n<ul>\n <li><strong>iOS
|
|
518
|
+
"text": "<h3>Runtime Permissions:</h3>\n<ul>\n <li><strong>iOS:</strong> readCalendar</li>\n <li><strong>Android:</strong> readCalendar</li>\n</ul>"
|
|
511
519
|
},
|
|
512
520
|
{
|
|
513
521
|
"name": "param",
|
|
@@ -554,7 +562,7 @@
|
|
|
554
562
|
},
|
|
555
563
|
{
|
|
556
564
|
"name": "permissions",
|
|
557
|
-
"text": "<h3>Runtime Permissions:</h3>\n<ul>\n <li><strong>iOS
|
|
565
|
+
"text": "<h3>Runtime Permissions:</h3>\n<ul>\n <li><strong>iOS:</strong> writeCalendar</li>\n <li><strong>Android:</strong> writeCalendar</li>\n</ul>"
|
|
558
566
|
},
|
|
559
567
|
{
|
|
560
568
|
"name": "param",
|
|
@@ -563,6 +571,10 @@
|
|
|
563
571
|
{
|
|
564
572
|
"name": "returns",
|
|
565
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']"
|
|
566
578
|
}
|
|
567
579
|
],
|
|
568
580
|
"docs": "Deletes events from the calendar given their IDs.",
|
|
@@ -913,7 +925,7 @@
|
|
|
913
925
|
"name": "platform"
|
|
914
926
|
},
|
|
915
927
|
{
|
|
916
|
-
"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>",
|
|
917
929
|
"name": "permissions"
|
|
918
930
|
}
|
|
919
931
|
],
|
|
@@ -928,7 +940,7 @@
|
|
|
928
940
|
"name": "platform"
|
|
929
941
|
},
|
|
930
942
|
{
|
|
931
|
-
"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>",
|
|
932
944
|
"name": "permissions"
|
|
933
945
|
}
|
|
934
946
|
],
|
|
@@ -943,7 +955,7 @@
|
|
|
943
955
|
"name": "platform"
|
|
944
956
|
},
|
|
945
957
|
{
|
|
946
|
-
"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>",
|
|
947
959
|
"name": "permissions"
|
|
948
960
|
}
|
|
949
961
|
],
|
|
@@ -958,7 +970,7 @@
|
|
|
958
970
|
"name": "platform"
|
|
959
971
|
},
|
|
960
972
|
{
|
|
961
|
-
"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>",
|
|
962
974
|
"name": "permissions"
|
|
963
975
|
}
|
|
964
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.
|
|
@@ -294,8 +298,7 @@ export interface CapacitorCalendarPlugin {
|
|
|
294
298
|
* @permissions
|
|
295
299
|
* <h3>Runtime Permissions:</h3>
|
|
296
300
|
* <ul>
|
|
297
|
-
* <li><strong>iOS
|
|
298
|
-
* <li><strong>iOS 10 ≤ x ≤ iOS 16:</strong> readCalendar</li>
|
|
301
|
+
* <li><strong>iOS:</strong> readCalendar</li>
|
|
299
302
|
* <li><strong>Android:</strong> readCalendar</li>
|
|
300
303
|
* </ul>
|
|
301
304
|
* @param {object} options Options for defining the date range.
|
|
@@ -323,8 +326,7 @@ export interface CapacitorCalendarPlugin {
|
|
|
323
326
|
* @permissions
|
|
324
327
|
* <h3>Runtime Permissions:</h3>
|
|
325
328
|
* <ul>
|
|
326
|
-
* <li><strong>iOS
|
|
327
|
-
* <li><strong>iOS 10 ≤ x ≤ iOS 16:</strong> writeCalendar</li>
|
|
329
|
+
* <li><strong>iOS:</strong> writeCalendar</li>
|
|
328
330
|
* <li><strong>Android:</strong> writeCalendar</li>
|
|
329
331
|
* </ul>
|
|
330
332
|
* @param {object} options Options for defining event IDs.
|
|
@@ -333,7 +335,11 @@ export interface CapacitorCalendarPlugin {
|
|
|
333
335
|
* A promise that resolves to an object with two properties:
|
|
334
336
|
* - deleted: string[] - An array of IDs that were successfully deleted.
|
|
335
337
|
* - failed: string[] - An array of IDs that could not be deleted.
|
|
336
|
-
*
|
|
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']
|
|
337
343
|
*/
|
|
338
344
|
deleteEventsById(options: {
|
|
339
345
|
ids: string[];
|
|
@@ -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 * @since 0.10.0\n * @platform iOS, Android\n * @permissions\n * <h3>Runtime Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 ≤:</strong> readCalendar</li>\n * <li><strong>iOS 10 ≤ x ≤ iOS 16:</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 17 ≤:</strong> writeCalendar</li>\n * <li><strong>iOS 10 ≤ x ≤ iOS 16:</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 *\n */\n deleteEventsById(options: { ids: string[] }): Promise<{ result: { deleted: string[]; failed: string[] } }>;\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"]}
|
|
@@ -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;
|
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;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,qBAAqB;QAC1B,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,qBAAqB,CAAC,IAAI,gCAAgC,CAAC,CAAC;IAC/F,CAAC;IAEM,yBAAyB;QAC9B,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,qBAAqB,CAAC,IAAI,gCAAgC,CAAC,CAAC;IAC/F,CAAC;IAEM,aAAa;QAClB,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,gCAAgC,CAAC,CAAC;IACvF,CAAC;IAEM,kBAAkB;QACvB,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,gCAAgC,CAAC,CAAC;IAC5F,CAAC;IAEM,WAAW,CAAC,QAOlB;QAGC,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,gCAAgC,CAAC,CAAC;IACrF,CAAC;IAEM,cAAc,CAAC,QAYrB;QACC,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,gCAAgC,CAAC,CAAC;IACxF,CAAC;IAEM,uBAAuB;QAC5B,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,gCAAgC,CAAC,CAAC;IACxF,CAAC;IAEM,iBAAiB;QACtB,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,gCAAgC,CAAC,CAAC;IACxF,CAAC;IAEM,YAAY,CAAC,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;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<{
|
|
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,qBAAqB;QAC1B,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,qBAAqB,CAAC,IAAI,gCAAgC,CAAC,CAAC;IAC/F,CAAC;IAEM,yBAAyB;QAC9B,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,qBAAqB,CAAC,IAAI,gCAAgC,CAAC,CAAC;IAC/F,CAAC;IAEM,aAAa;QAClB,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,gCAAgC,CAAC,CAAC;IACvF,CAAC;IAEM,kBAAkB;QACvB,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,gCAAgC,CAAC,CAAC;IAC5F,CAAC;IAEM,WAAW,CAAC,QAOlB;QAGC,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,gCAAgC,CAAC,CAAC;IACrF,CAAC;IAEM,cAAc,CAAC,QAYrB;QACC,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,gCAAgC,CAAC,CAAC;IACxF,CAAC;IAEM,uBAAuB;QAC5B,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,gCAAgC,CAAC,CAAC;IACxF,CAAC;IAEM,iBAAiB;QACtB,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,gCAAgC,CAAC,CAAC;IACxF,CAAC;IAEM,YAAY,CAAC,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;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";
|
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 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":";;;;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,mCAA2B,KAAKA,mCAA2B,GAAG,EAAE,CAAC,CAAC;;AChBrE;AACA;AACA;AACA;AACA;AACA;AACWC,+CAA8B;AACzC,CAAC,UAAU,6BAA6B,EAAE;AAC1C;AACA;AACA;AACA,IAAI,6BAA6B,CAAC,6BAA6B,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC;AAC1F;AACA;AACA;AACA,IAAI,6BAA6B,CAAC,6BAA6B,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC;AAC9F,CAAC,EAAEA,qCAA6B,KAAKA,qCAA6B,GAAG,EAAE,CAAC,CAAC;;AChBzE;AACA;AACA;AACA;AACA;AACA;AACWC,kCAAiB;AAC5B,CAAC,UAAU,gBAAgB,EAAE;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,gBAAgB,CAAC,eAAe,CAAC,GAAG,cAAc,CAAC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,gBAAgB,CAAC,gBAAgB,CAAC,GAAG,e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,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","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,mCAA2B,KAAKA,mCAA2B,GAAG,EAAE,CAAC,CAAC;;AChBrE;AACA;AACA;AACA;AACA;AACA;AACWC,+CAA8B;AACzC,CAAC,UAAU,6BAA6B,EAAE;AAC1C;AACA;AACA;AACA,IAAI,6BAA6B,CAAC,6BAA6B,CAAC,QAAQ,CAAC,GAAG,CA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C;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,IAAI,gBAAgB,CAAC,QAAQ,EAAE;AAC/B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,CAAC,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC,CAAC;AAChG,KAAK;AACL;;;;;;;;;"}
|
package/dist/plugin.js
CHANGED
|
@@ -53,7 +53,7 @@ var capacitorCapacitorCalendar = (function (exports, core) {
|
|
|
53
53
|
* <h3>Manifest Permissions:</h3>
|
|
54
54
|
* <ul>
|
|
55
55
|
* <li><strong>iOS 17 ≤:</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";
|
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 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,G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;IAChG,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,G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AC,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,IAAI,gBAAgB,CAAC,QAAQ,EAAE;IAC/B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,CAAC,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC,CAAC;IAChG,KAAK;IACL;;;;;;;;;;;;;;;"}
|
|
@@ -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
|
|
@@ -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
|
}
|
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",
|