@ebarooni/capacitor-calendar 0.6.0 → 0.7.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.
Files changed (33) hide show
  1. package/README.md +28 -62
  2. package/android/src/main/java/dev/barooni/capacitor/calendar/CapacitorCalendar.kt +12 -10
  3. package/android/src/main/java/dev/barooni/capacitor/calendar/CapacitorCalendarPlugin.kt +13 -2
  4. package/dist/docs.json +61 -783
  5. package/dist/esm/definitions.d.ts +20 -6
  6. package/dist/esm/definitions.js.map +1 -1
  7. package/dist/esm/schemas/enums/calendar-chooser-display-style.d.ts +2 -1
  8. package/dist/esm/schemas/enums/calendar-chooser-display-style.js +2 -1
  9. package/dist/esm/schemas/enums/calendar-chooser-display-style.js.map +1 -1
  10. package/dist/esm/schemas/enums/calendar-chooser-selection-style.d.ts +2 -1
  11. package/dist/esm/schemas/enums/calendar-chooser-selection-style.js +2 -1
  12. package/dist/esm/schemas/enums/calendar-chooser-selection-style.js.map +1 -1
  13. package/dist/esm/schemas/enums/plugin-permission.d.ts +36 -0
  14. package/dist/esm/schemas/enums/plugin-permission.js +36 -0
  15. package/dist/esm/schemas/enums/plugin-permission.js.map +1 -1
  16. package/dist/esm/schemas/enums/reminder-recurrence-frequency.d.ts +18 -0
  17. package/dist/esm/schemas/enums/reminder-recurrence-frequency.js +18 -0
  18. package/dist/esm/schemas/enums/reminder-recurrence-frequency.js.map +1 -1
  19. package/dist/esm/schemas/interfaces/calendar.d.ts +1 -1
  20. package/dist/esm/schemas/interfaces/calendar.js.map +1 -1
  21. package/dist/esm/web.d.ts +5 -2
  22. package/dist/esm/web.js +3 -0
  23. package/dist/esm/web.js.map +1 -1
  24. package/dist/plugin.cjs.js +61 -2
  25. package/dist/plugin.cjs.js.map +1 -1
  26. package/dist/plugin.js +61 -2
  27. package/dist/plugin.js.map +1 -1
  28. package/ios/Plugin/CapacitorCalendar.swift +31 -2
  29. package/ios/Plugin/CapacitorCalendarPlugin.m +1 -0
  30. package/ios/Plugin/CapacitorCalendarPlugin.swift +20 -2
  31. package/ios/Plugin/CapacitorCalendarPluginError.swift +1 -0
  32. package/ios/Plugin/EventCreationParameters.swift +2 -2
  33. package/package.json +1 -1
@@ -142,8 +142,8 @@ export interface CapacitorCalendarPlugin {
142
142
  * @param {string} options.title - The title of the event.
143
143
  * @param {string} options.calendarId - The id of the destination calendar. (Optional)
144
144
  * @param {string} [options.location] - The location of the event. (Optional)
145
- * @param {Date} [options.startDate] - The start date and time of the event. (Optional)
146
- * @param {Date} [options.endDate] - The end date and time of the event. (Optional)
145
+ * @param {number} [options.startDate] - The start date and time of the event. (Optional)
146
+ * @param {number} [options.endDate] - The end date and time of the event. (Optional)
147
147
  * @param {boolean} [options.isAllDay] - Weather the event is for the entire day or not. (Optional)
148
148
  * @returns {Promise<{ eventCreated: boolean }>} A Promise that resolves with an object indicating whether the event was created successfully.
149
149
  * The resolved object has a property 'eventCreated' which is a boolean value representing whether the event was created.
@@ -152,8 +152,8 @@ export interface CapacitorCalendarPlugin {
152
152
  * const eventOptions = {
153
153
  * title: 'Team Meeting',
154
154
  * location: 'Conference Room A',
155
- * startDate: new Date(now),
156
- * endDate: new Date(now + 2 * 60 * 60 * 1000),
155
+ * startDate: now,
156
+ * endDate: now + 2 * 60 * 60 * 1000,
157
157
  * isAllDay: false
158
158
  * };
159
159
  * const { eventCreated } = await createEvent(eventOptions);
@@ -163,8 +163,8 @@ export interface CapacitorCalendarPlugin {
163
163
  title: string;
164
164
  calendarId?: string;
165
165
  location?: string;
166
- startDate?: Date;
167
- endDate?: Date;
166
+ startDate?: number;
167
+ endDate?: number;
168
168
  isAllDay?: boolean;
169
169
  }): Promise<{
170
170
  eventCreated: boolean;
@@ -255,4 +255,18 @@ export interface CapacitorCalendarPlugin {
255
255
  }): Promise<{
256
256
  reminderCreated: boolean;
257
257
  }>;
258
+ /**
259
+ * Opens the calendar app. Since the user leaves your app, use this method with caution.
260
+ *
261
+ * @method openCalendar
262
+ * @platform iOS, Android
263
+ * @param {object} options - Options for opening the calendar.
264
+ * @param {number} options.date - The date at which the calendar should be opened. (Optional)
265
+ * @returns {Promise<void>}
266
+ * @example
267
+ * void CapacitorCalendar.openCalendar({ date: Date.now() })
268
+ */
269
+ openCalendar(options: {
270
+ date?: number;
271
+ }): Promise<void>;
258
272
  }
@@ -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';\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&lt;{ result: PermissionState }&gt;} – 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&lt;PluginPermissionsMap&gt;} – 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&lt;{ result: PermissionState }&gt;} – 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&lt;PluginPermissionsMap&gt;} – 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 * This method does not need any read or write authorization from the user on iOS. However, the entries in the Info.plist file are still needed.\n * On Android, the user has to authorize for read access.\n *\n * @method\n * @platform iOS, Android\n * @returns {Promise&lt;{ eventCreated: boolean }&gt;} – A promise that resolves with the result of the action.\n * @example\n * let result: CalendarEventActionResult;\n * if (capacitor.getPlatform() === 'android') {\n * const readCalendarStatus = (await this.requestPermission({ alias: 'readCalendar' })).result;\n * if (readCalendarStatus === 'granted') {\n * result = await this.createEventWithPrompt();\n * } else {\n * // handle the case when user rejects the permission\n * }\n * } else {\n * result = await this.createEventWithPrompt();\n * }\n */\n createEventWithPrompt(): Promise<{ eventCreated: boolean }>;\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 * @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 {Date} [options.startDate] - The start date and time of the event. (Optional)\n * @param {Date} [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<{ eventCreated: boolean }>} A Promise that resolves with an object indicating whether the event was created successfully.\n * The resolved object has a property 'eventCreated' which is a boolean value representing whether the event was created.\n * @example\n * const now = Date.now();\n * const eventOptions = {\n * title: 'Team Meeting',\n * location: 'Conference Room A',\n * startDate: new Date(now),\n * endDate: new Date(now + 2 * 60 * 60 * 1000),\n * isAllDay: false\n * };\n * const { eventCreated } = await createEvent(eventOptions);\n * console.log(eventCreated); // true\n */\n createEvent(options: {\n title: string;\n calendarId?: string;\n location?: string;\n startDate?: Date;\n endDate?: Date;\n isAllDay?: boolean;\n }): Promise<{ eventCreated: boolean }>;\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"]}
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';\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&lt;{ result: PermissionState }&gt;} – 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&lt;PluginPermissionsMap&gt;} – 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&lt;{ result: PermissionState }&gt;} – 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&lt;PluginPermissionsMap&gt;} – 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 * This method does not need any read or write authorization from the user on iOS. However, the entries in the Info.plist file are still needed.\n * On Android, the user has to authorize for read access.\n *\n * @method\n * @platform iOS, Android\n * @returns {Promise&lt;{ eventCreated: boolean }&gt;} – A promise that resolves with the result of the action.\n * @example\n * let result: CalendarEventActionResult;\n * if (capacitor.getPlatform() === 'android') {\n * const readCalendarStatus = (await this.requestPermission({ alias: 'readCalendar' })).result;\n * if (readCalendarStatus === 'granted') {\n * result = await this.createEventWithPrompt();\n * } else {\n * // handle the case when user rejects the permission\n * }\n * } else {\n * result = await this.createEventWithPrompt();\n * }\n */\n createEventWithPrompt(): Promise<{ eventCreated: boolean }>;\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 * @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<{ eventCreated: boolean }>} A Promise that resolves with an object indicating whether the event was created successfully.\n * The resolved object has a property 'eventCreated' which is a boolean value representing whether the event was created.\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 { eventCreated } = await createEvent(eventOptions);\n * console.log(eventCreated); // true\n */\n createEvent(options: {\n title: string;\n calendarId?: string;\n location?: string;\n startDate?: number;\n endDate?: number;\n isAllDay?: boolean;\n }): Promise<{ eventCreated: boolean }>;\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 *\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"]}
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * Enum representing the display styles for the calendar chooser.
3
- * @enum
3
+ *
4
+ * @enum CalendarChooserDisplayStyle
4
5
  * @platform iOS
5
6
  */
6
7
  export declare enum CalendarChooserDisplayStyle {
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * Enum representing the display styles for the calendar chooser.
3
- * @enum
3
+ *
4
+ * @enum CalendarChooserDisplayStyle
4
5
  * @platform iOS
5
6
  */
6
7
  export var CalendarChooserDisplayStyle;
@@ -1 +1 @@
1
- {"version":3,"file":"calendar-chooser-display-style.js","sourceRoot":"","sources":["../../../../src/schemas/enums/calendar-chooser-display-style.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAN,IAAY,2BAUX;AAVD,WAAY,2BAA2B;IACrC;;OAEG;IACH,+FAAa,CAAA;IAEb;;OAEG;IACH,mHAAuB,CAAA;AACzB,CAAC,EAVW,2BAA2B,KAA3B,2BAA2B,QAUtC","sourcesContent":["/**\n * Enum representing the display styles for the calendar chooser.\n * @enum\n * @platform iOS\n */\nexport enum CalendarChooserDisplayStyle {\n /**\n * Display all calendars available for selection.\n */\n ALL_CALENDARS,\n\n /**\n * Display only writable calendars available for selection.\n */\n WRITABLE_CALENDARS_ONLY,\n}\n"]}
1
+ {"version":3,"file":"calendar-chooser-display-style.js","sourceRoot":"","sources":["../../../../src/schemas/enums/calendar-chooser-display-style.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAN,IAAY,2BAUX;AAVD,WAAY,2BAA2B;IACrC;;OAEG;IACH,+FAAa,CAAA;IAEb;;OAEG;IACH,mHAAuB,CAAA;AACzB,CAAC,EAVW,2BAA2B,KAA3B,2BAA2B,QAUtC","sourcesContent":["/**\n * Enum representing the display styles for the calendar chooser.\n *\n * @enum CalendarChooserDisplayStyle\n * @platform iOS\n */\nexport enum CalendarChooserDisplayStyle {\n /**\n * Display all calendars available for selection.\n */\n ALL_CALENDARS,\n\n /**\n * Display only writable calendars available for selection.\n */\n WRITABLE_CALENDARS_ONLY,\n}\n"]}
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * Enum representing the selection style for the calendar chooser.
3
- * @enum
3
+ *
4
+ * @enum CalendarChooserSelectionStyle
4
5
  * @platform iOS
5
6
  */
6
7
  export declare enum CalendarChooserSelectionStyle {
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * Enum representing the selection style for the calendar chooser.
3
- * @enum
3
+ *
4
+ * @enum CalendarChooserSelectionStyle
4
5
  * @platform iOS
5
6
  */
6
7
  export var CalendarChooserSelectionStyle;
@@ -1 +1 @@
1
- {"version":3,"file":"calendar-chooser-selection-style.js","sourceRoot":"","sources":["../../../../src/schemas/enums/calendar-chooser-selection-style.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAN,IAAY,6BAUX;AAVD,WAAY,6BAA6B;IACvC;;OAEG;IACH,qFAAM,CAAA;IAEN;;OAEG;IACH,yFAAQ,CAAA;AACV,CAAC,EAVW,6BAA6B,KAA7B,6BAA6B,QAUxC","sourcesContent":["/**\n * Enum representing the selection style for the calendar chooser.\n * @enum\n * @platform iOS\n */\nexport enum CalendarChooserSelectionStyle {\n /**\n * Allows only a single selection in the calendar chooser.\n */\n SINGLE,\n\n /**\n * Allows multiple selections in the calendar chooser.\n */\n MULTIPLE,\n}\n"]}
1
+ {"version":3,"file":"calendar-chooser-selection-style.js","sourceRoot":"","sources":["../../../../src/schemas/enums/calendar-chooser-selection-style.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAN,IAAY,6BAUX;AAVD,WAAY,6BAA6B;IACvC;;OAEG;IACH,qFAAM,CAAA;IAEN;;OAEG;IACH,yFAAQ,CAAA;AACV,CAAC,EAVW,6BAA6B,KAA7B,6BAA6B,QAUxC","sourcesContent":["/**\n * Enum representing the selection style for the calendar chooser.\n *\n * @enum CalendarChooserSelectionStyle\n * @platform iOS\n */\nexport enum CalendarChooserSelectionStyle {\n /**\n * Allows only a single selection in the calendar chooser.\n */\n SINGLE,\n\n /**\n * Allows multiple selections in the calendar chooser.\n */\n MULTIPLE,\n}\n"]}
@@ -1,22 +1,58 @@
1
+ /**
2
+ * Enum representing the available runtime permissions for the plugin.
3
+ *
4
+ * @enum PluginPermission
5
+ * @platform iOS, Android
6
+ */
1
7
  export declare enum PluginPermission {
2
8
  /**
3
9
  * Represents the permission state for reading calendar.
10
+ *
4
11
  * @platform iOS, Android
12
+ * @permissions
13
+ * <h3>Manifest Permissions:</h3>
14
+ * <ul>
15
+ * <li><strong>iOS 17 &le;:</strong> NSCalendarsFullAccessUsageDescription</li>
16
+ * <li><strong>iOS 10 &le; x &le; iOS 16:</strong> NSCalendarsUsageDescription</li>
17
+ * <li><strong>Android:</strong> android.permission.READ_CALENDAR</li>
18
+ * </ul>
5
19
  */
6
20
  READ_CALENDAR = "readCalendar",
7
21
  /**
8
22
  * Represents the permission state for writing calendar.
23
+ *
9
24
  * @platform iOS, Android
25
+ * @permissions
26
+ * <h3>Manifest Permissions:</h3>
27
+ * <ul>
28
+ * <li><strong>iOS 17 &le;:</strong> NSCalendarsWriteOnlyAccessUsageDescription</li>
29
+ * <li><strong>iOS 10 &le; x &le; iOS 16:</strong> NSCalendarsUsageDescription</li>
30
+ * <li><strong>Android:</strong> android.permission.WRITE_CALENDAR</li>
31
+ * </ul>
10
32
  */
11
33
  WRITE_CALENDAR = "writeCalendar",
12
34
  /**
13
35
  * Represents the permission state for reading reminders.
36
+ *
14
37
  * @platform iOS
38
+ * @permissions
39
+ * <h3>Manifest Permissions:</h3>
40
+ * <ul>
41
+ * <li><strong>iOS 17 &le;:</strong> NSRemindersFullAccessUsageDescription</li>
42
+ * <li><strong>iOS 10 &le; x &le; iOS 16:</strong> NSRemindersUsageDescription</li>
43
+ * </ul>
15
44
  */
16
45
  READ_REMINDERS = "readReminders",
17
46
  /**
18
47
  * Represents the permission state for writing reminders.
48
+ *
19
49
  * @platform iOS
50
+ * @permissions
51
+ * <h3>Manifest Permissions:</h3>
52
+ * <ul>
53
+ * <li><strong>iOS 17 &le;:</strong> NSRemindersFullAccessUsageDescription</li>
54
+ * <li><strong>iOS 10 &le; x &le; iOS 16:</strong> NSRemindersUsageDescription</li>
55
+ * </ul>
20
56
  */
21
57
  WRITE_REMINDERS = "writeReminders"
22
58
  }
@@ -1,23 +1,59 @@
1
+ /**
2
+ * Enum representing the available runtime permissions for the plugin.
3
+ *
4
+ * @enum PluginPermission
5
+ * @platform iOS, Android
6
+ */
1
7
  export var PluginPermission;
2
8
  (function (PluginPermission) {
3
9
  /**
4
10
  * Represents the permission state for reading calendar.
11
+ *
5
12
  * @platform iOS, Android
13
+ * @permissions
14
+ * <h3>Manifest Permissions:</h3>
15
+ * <ul>
16
+ * <li><strong>iOS 17 &le;:</strong> NSCalendarsFullAccessUsageDescription</li>
17
+ * <li><strong>iOS 10 &le; x &le; iOS 16:</strong> NSCalendarsUsageDescription</li>
18
+ * <li><strong>Android:</strong> android.permission.READ_CALENDAR</li>
19
+ * </ul>
6
20
  */
7
21
  PluginPermission["READ_CALENDAR"] = "readCalendar";
8
22
  /**
9
23
  * Represents the permission state for writing calendar.
24
+ *
10
25
  * @platform iOS, Android
26
+ * @permissions
27
+ * <h3>Manifest Permissions:</h3>
28
+ * <ul>
29
+ * <li><strong>iOS 17 &le;:</strong> NSCalendarsWriteOnlyAccessUsageDescription</li>
30
+ * <li><strong>iOS 10 &le; x &le; iOS 16:</strong> NSCalendarsUsageDescription</li>
31
+ * <li><strong>Android:</strong> android.permission.WRITE_CALENDAR</li>
32
+ * </ul>
11
33
  */
12
34
  PluginPermission["WRITE_CALENDAR"] = "writeCalendar";
13
35
  /**
14
36
  * Represents the permission state for reading reminders.
37
+ *
15
38
  * @platform iOS
39
+ * @permissions
40
+ * <h3>Manifest Permissions:</h3>
41
+ * <ul>
42
+ * <li><strong>iOS 17 &le;:</strong> NSRemindersFullAccessUsageDescription</li>
43
+ * <li><strong>iOS 10 &le; x &le; iOS 16:</strong> NSRemindersUsageDescription</li>
44
+ * </ul>
16
45
  */
17
46
  PluginPermission["READ_REMINDERS"] = "readReminders";
18
47
  /**
19
48
  * Represents the permission state for writing reminders.
49
+ *
20
50
  * @platform iOS
51
+ * @permissions
52
+ * <h3>Manifest Permissions:</h3>
53
+ * <ul>
54
+ * <li><strong>iOS 17 &le;:</strong> NSRemindersFullAccessUsageDescription</li>
55
+ * <li><strong>iOS 10 &le; x &le; iOS 16:</strong> NSRemindersUsageDescription</li>
56
+ * </ul>
21
57
  */
22
58
  PluginPermission["WRITE_REMINDERS"] = "writeReminders";
23
59
  })(PluginPermission || (PluginPermission = {}));
@@ -1 +1 @@
1
- {"version":3,"file":"plugin-permission.js","sourceRoot":"","sources":["../../../../src/schemas/enums/plugin-permission.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,gBAwBX;AAxBD,WAAY,gBAAgB;IAC1B;;;OAGG;IACH,kDAA8B,CAAA;IAE9B;;;OAGG;IACH,oDAAgC,CAAA;IAEhC;;;OAGG;IACH,oDAAgC,CAAA;IAEhC;;;OAGG;IACH,sDAAkC,CAAA;AACpC,CAAC,EAxBW,gBAAgB,KAAhB,gBAAgB,QAwB3B","sourcesContent":["export enum PluginPermission {\n /**\n * Represents the permission state for reading calendar.\n * @platform iOS, Android\n */\n READ_CALENDAR = 'readCalendar',\n\n /**\n * Represents the permission state for writing calendar.\n * @platform iOS, Android\n */\n WRITE_CALENDAR = 'writeCalendar',\n\n /**\n * Represents the permission state for reading reminders.\n * @platform iOS\n */\n READ_REMINDERS = 'readReminders',\n\n /**\n * Represents the permission state for writing reminders.\n * @platform iOS\n */\n WRITE_REMINDERS = 'writeReminders',\n}\n"]}
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 &le;:</strong> NSCalendarsFullAccessUsageDescription</li>\n * <li><strong>iOS 10 &le; x &le; 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 &le;:</strong> NSCalendarsWriteOnlyAccessUsageDescription</li>\n * <li><strong>iOS 10 &le; x &le; 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 &le;:</strong> NSRemindersFullAccessUsageDescription</li>\n * <li><strong>iOS 10 &le; x &le; 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 &le;:</strong> NSRemindersFullAccessUsageDescription</li>\n * <li><strong>iOS 10 &le; x &le; iOS 16:</strong> NSRemindersUsageDescription</li>\n * </ul>\n */\n WRITE_REMINDERS = 'writeReminders',\n}\n"]}
@@ -1,6 +1,24 @@
1
+ /**
2
+ * Enum representing the repeating frequency of the reminder.
3
+ *
4
+ * @enum ReminderRecurrenceFrequency
5
+ * @platform iOS
6
+ */
1
7
  export declare enum ReminderRecurrenceFrequency {
8
+ /**
9
+ * The reminder repeats on a daily basis
10
+ */
2
11
  DAILY = 0,
12
+ /**
13
+ * The reminder repeats on a weekly basis
14
+ */
3
15
  WEEKLY = 1,
16
+ /**
17
+ * The reminder repeats on a monthly basis
18
+ */
4
19
  MONTHLY = 2,
20
+ /**
21
+ * The reminder repeats on a yearly basis
22
+ */
5
23
  YEARLY = 3
6
24
  }
@@ -1,8 +1,26 @@
1
+ /**
2
+ * Enum representing the repeating frequency of the reminder.
3
+ *
4
+ * @enum ReminderRecurrenceFrequency
5
+ * @platform iOS
6
+ */
1
7
  export var ReminderRecurrenceFrequency;
2
8
  (function (ReminderRecurrenceFrequency) {
9
+ /**
10
+ * The reminder repeats on a daily basis
11
+ */
3
12
  ReminderRecurrenceFrequency[ReminderRecurrenceFrequency["DAILY"] = 0] = "DAILY";
13
+ /**
14
+ * The reminder repeats on a weekly basis
15
+ */
4
16
  ReminderRecurrenceFrequency[ReminderRecurrenceFrequency["WEEKLY"] = 1] = "WEEKLY";
17
+ /**
18
+ * The reminder repeats on a monthly basis
19
+ */
5
20
  ReminderRecurrenceFrequency[ReminderRecurrenceFrequency["MONTHLY"] = 2] = "MONTHLY";
21
+ /**
22
+ * The reminder repeats on a yearly basis
23
+ */
6
24
  ReminderRecurrenceFrequency[ReminderRecurrenceFrequency["YEARLY"] = 3] = "YEARLY";
7
25
  })(ReminderRecurrenceFrequency || (ReminderRecurrenceFrequency = {}));
8
26
  //# sourceMappingURL=reminder-recurrence-frequency.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"reminder-recurrence-frequency.js","sourceRoot":"","sources":["../../../../src/schemas/enums/reminder-recurrence-frequency.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,2BAKX;AALD,WAAY,2BAA2B;IACrC,+EAAK,CAAA;IACL,iFAAM,CAAA;IACN,mFAAO,CAAA;IACP,iFAAM,CAAA;AACR,CAAC,EALW,2BAA2B,KAA3B,2BAA2B,QAKtC","sourcesContent":["export enum ReminderRecurrenceFrequency {\n DAILY,\n WEEKLY,\n MONTHLY,\n YEARLY,\n}\n"]}
1
+ {"version":3,"file":"reminder-recurrence-frequency.js","sourceRoot":"","sources":["../../../../src/schemas/enums/reminder-recurrence-frequency.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAN,IAAY,2BAiBX;AAjBD,WAAY,2BAA2B;IACrC;;OAEG;IACH,+EAAK,CAAA;IACL;;OAEG;IACH,iFAAM,CAAA;IACN;;OAEG;IACH,mFAAO,CAAA;IACP;;OAEG;IACH,iFAAM,CAAA;AACR,CAAC,EAjBW,2BAA2B,KAA3B,2BAA2B,QAiBtC","sourcesContent":["/**\n * Enum representing the repeating frequency of the reminder.\n *\n * @enum ReminderRecurrenceFrequency\n * @platform iOS\n */\nexport enum ReminderRecurrenceFrequency {\n /**\n * The reminder repeats on a daily basis\n */\n DAILY,\n /**\n * The reminder repeats on a weekly basis\n */\n WEEKLY,\n /**\n * The reminder repeats on a monthly basis\n */\n MONTHLY,\n /**\n * The reminder repeats on a yearly basis\n */\n YEARLY,\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Represents a calendar object with an ID and title.
2
+ * Represents a calendar object.
3
3
  *
4
4
  * @interface Calendar
5
5
  * @platform iOS, Android
@@ -1 +1 @@
1
- {"version":3,"file":"calendar.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/calendar.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Represents a calendar object with an ID and title.\n *\n * @interface Calendar\n * @platform iOS, Android\n * @property {string} id - The unique identifier of the calendar.\n * @property {string} title - The title or name of the calendar.\n */\nexport interface Calendar {\n id: string;\n title: string;\n}\n"]}
1
+ {"version":3,"file":"calendar.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/calendar.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Represents a calendar object.\n *\n * @interface Calendar\n * @platform iOS, Android\n * @property {string} id - The unique identifier of the calendar.\n * @property {string} title - The title or name of the calendar.\n */\nexport interface Calendar {\n id: string;\n title: string;\n}\n"]}
package/dist/esm/web.d.ts CHANGED
@@ -34,8 +34,8 @@ export declare class CapacitorCalendarWeb extends WebPlugin implements Capacitor
34
34
  title: string;
35
35
  calendarId?: string;
36
36
  location?: string;
37
- startDate?: Date;
38
- endDate?: Date;
37
+ startDate?: number;
38
+ endDate?: number;
39
39
  isAllDay?: boolean;
40
40
  }): Promise<{
41
41
  eventCreated: boolean;
@@ -61,4 +61,7 @@ export declare class CapacitorCalendarWeb extends WebPlugin implements Capacitor
61
61
  getRemindersLists(): Promise<{
62
62
  result: RemindersList[];
63
63
  }>;
64
+ openCalendar(_options: {
65
+ date?: number;
66
+ }): Promise<void>;
64
67
  }
package/dist/esm/web.js CHANGED
@@ -37,5 +37,8 @@ export class CapacitorCalendarWeb extends WebPlugin {
37
37
  getRemindersLists() {
38
38
  throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);
39
39
  }
40
+ openCalendar(_options) {
41
+ throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);
42
+ }
40
43
  }
41
44
  //# sourceMappingURL=web.js.map
@@ -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;AAQ7D,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;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';\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<{ eventCreated: boolean }> {\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?: Date;\n endDate?: Date;\n isAllDay?: boolean;\n }): Promise<{\n eventCreated: boolean;\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<{ reminderCreated: boolean }> {\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"]}
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,OAAO,EAAmB,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAQ7D,M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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;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';\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<{ eventCreated: boolean }> {\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 eventCreated: boolean;\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<{ reminderCreated: boolean }> {\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"]}
@@ -4,7 +4,8 @@ var core = require('@capacitor/core');
4
4
 
5
5
  /**
6
6
  * Enum representing the display styles for the calendar chooser.
7
- * @enum
7
+ *
8
+ * @enum CalendarChooserDisplayStyle
8
9
  * @platform iOS
9
10
  */
10
11
  exports.CalendarChooserDisplayStyle = void 0;
@@ -21,7 +22,8 @@ exports.CalendarChooserDisplayStyle = void 0;
21
22
 
22
23
  /**
23
24
  * Enum representing the selection style for the calendar chooser.
24
- * @enum
25
+ *
26
+ * @enum CalendarChooserSelectionStyle
25
27
  * @platform iOS
26
28
  */
27
29
  exports.CalendarChooserSelectionStyle = void 0;
@@ -36,35 +38,89 @@ exports.CalendarChooserSelectionStyle = void 0;
36
38
  CalendarChooserSelectionStyle[CalendarChooserSelectionStyle["MULTIPLE"] = 1] = "MULTIPLE";
37
39
  })(exports.CalendarChooserSelectionStyle || (exports.CalendarChooserSelectionStyle = {}));
38
40
 
41
+ /**
42
+ * Enum representing the available runtime permissions for the plugin.
43
+ *
44
+ * @enum PluginPermission
45
+ * @platform iOS, Android
46
+ */
39
47
  exports.PluginPermission = void 0;
40
48
  (function (PluginPermission) {
41
49
  /**
42
50
  * Represents the permission state for reading calendar.
51
+ *
43
52
  * @platform iOS, Android
53
+ * @permissions
54
+ * <h3>Manifest Permissions:</h3>
55
+ * <ul>
56
+ * <li><strong>iOS 17 &le;:</strong> NSCalendarsFullAccessUsageDescription</li>
57
+ * <li><strong>iOS 10 &le; x &le; iOS 16:</strong> NSCalendarsUsageDescription</li>
58
+ * <li><strong>Android:</strong> android.permission.READ_CALENDAR</li>
59
+ * </ul>
44
60
  */
45
61
  PluginPermission["READ_CALENDAR"] = "readCalendar";
46
62
  /**
47
63
  * Represents the permission state for writing calendar.
64
+ *
48
65
  * @platform iOS, Android
66
+ * @permissions
67
+ * <h3>Manifest Permissions:</h3>
68
+ * <ul>
69
+ * <li><strong>iOS 17 &le;:</strong> NSCalendarsWriteOnlyAccessUsageDescription</li>
70
+ * <li><strong>iOS 10 &le; x &le; iOS 16:</strong> NSCalendarsUsageDescription</li>
71
+ * <li><strong>Android:</strong> android.permission.WRITE_CALENDAR</li>
72
+ * </ul>
49
73
  */
50
74
  PluginPermission["WRITE_CALENDAR"] = "writeCalendar";
51
75
  /**
52
76
  * Represents the permission state for reading reminders.
77
+ *
53
78
  * @platform iOS
79
+ * @permissions
80
+ * <h3>Manifest Permissions:</h3>
81
+ * <ul>
82
+ * <li><strong>iOS 17 &le;:</strong> NSRemindersFullAccessUsageDescription</li>
83
+ * <li><strong>iOS 10 &le; x &le; iOS 16:</strong> NSRemindersUsageDescription</li>
84
+ * </ul>
54
85
  */
55
86
  PluginPermission["READ_REMINDERS"] = "readReminders";
56
87
  /**
57
88
  * Represents the permission state for writing reminders.
89
+ *
58
90
  * @platform iOS
91
+ * @permissions
92
+ * <h3>Manifest Permissions:</h3>
93
+ * <ul>
94
+ * <li><strong>iOS 17 &le;:</strong> NSRemindersFullAccessUsageDescription</li>
95
+ * <li><strong>iOS 10 &le; x &le; iOS 16:</strong> NSRemindersUsageDescription</li>
96
+ * </ul>
59
97
  */
60
98
  PluginPermission["WRITE_REMINDERS"] = "writeReminders";
61
99
  })(exports.PluginPermission || (exports.PluginPermission = {}));
62
100
 
101
+ /**
102
+ * Enum representing the repeating frequency of the reminder.
103
+ *
104
+ * @enum ReminderRecurrenceFrequency
105
+ * @platform iOS
106
+ */
63
107
  exports.ReminderRecurrenceFrequency = void 0;
64
108
  (function (ReminderRecurrenceFrequency) {
109
+ /**
110
+ * The reminder repeats on a daily basis
111
+ */
65
112
  ReminderRecurrenceFrequency[ReminderRecurrenceFrequency["DAILY"] = 0] = "DAILY";
113
+ /**
114
+ * The reminder repeats on a weekly basis
115
+ */
66
116
  ReminderRecurrenceFrequency[ReminderRecurrenceFrequency["WEEKLY"] = 1] = "WEEKLY";
117
+ /**
118
+ * The reminder repeats on a monthly basis
119
+ */
67
120
  ReminderRecurrenceFrequency[ReminderRecurrenceFrequency["MONTHLY"] = 2] = "MONTHLY";
121
+ /**
122
+ * The reminder repeats on a yearly basis
123
+ */
68
124
  ReminderRecurrenceFrequency[ReminderRecurrenceFrequency["YEARLY"] = 3] = "YEARLY";
69
125
  })(exports.ReminderRecurrenceFrequency || (exports.ReminderRecurrenceFrequency = {}));
70
126
 
@@ -110,6 +166,9 @@ class CapacitorCalendarWeb extends core.WebPlugin {
110
166
  getRemindersLists() {
111
167
  throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);
112
168
  }
169
+ openCalendar(_options) {
170
+ throw this.unimplemented(`${this.createReminder.name} is not implemented on the web`);
171
+ }
113
172
  }
114
173
 
115
174
  var web = /*#__PURE__*/Object.freeze({
@@ -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 * @enum\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 * @enum\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","export var PluginPermission;\n(function (PluginPermission) {\n /**\n * Represents the permission state for reading calendar.\n * @platform iOS, Android\n */\n PluginPermission[\"READ_CALENDAR\"] = \"readCalendar\";\n /**\n * Represents the permission state for writing calendar.\n * @platform iOS, Android\n */\n PluginPermission[\"WRITE_CALENDAR\"] = \"writeCalendar\";\n /**\n * Represents the permission state for reading reminders.\n * @platform iOS\n */\n PluginPermission[\"READ_REMINDERS\"] = \"readReminders\";\n /**\n * Represents the permission state for writing reminders.\n * @platform iOS\n */\n PluginPermission[\"WRITE_REMINDERS\"] = \"writeReminders\";\n})(PluginPermission || (PluginPermission = {}));\n//# sourceMappingURL=plugin-permission.js.map","export var ReminderRecurrenceFrequency;\n(function (ReminderRecurrenceFrequency) {\n ReminderRecurrenceFrequency[ReminderRecurrenceFrequency[\"DAILY\"] = 0] = \"DAILY\";\n ReminderRecurrenceFrequency[ReminderRecurrenceFrequency[\"WEEKLY\"] = 1] = \"WEEKLY\";\n ReminderRecurrenceFrequency[ReminderRecurrenceFrequency[\"MONTHLY\"] = 2] = \"MONTHLY\";\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}\n//# sourceMappingURL=web.js.map"],"names":["CalendarChooserDisplayStyle","CalendarChooserSelectionStyle","PluginPermission","ReminderRecurrenceFrequency","registerPlugin","WebPlugin"],"mappings":";;;;AAAA;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;;ACfrE;AACA;AACA;AACA;AACA;AACWC,+CAA8B;AACzC,CAAC,UAAU,6BAA6B,EAAE;AAC1C;AACA;AACA;AACA,IAAI,6BAA6B,CAAC,6BAA6B,CAAC,QAAQ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,CAAC,CAAC;AAC7F,KAAK;AACL,IAAI,kBAAkB,GAAG;AACzB,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,CAAC,EAAE,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC,CAAC;AAClG,KAAK;AACL,IAAI,WAAW,CAAC,QAAQ,EAAE;AAC1B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC,CAAC;AAC3F,KAAK;AACL,IAAI,cAAc,CAAC,QAAQ,EAAE;AAC7B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC,CAAC;AAC9F,KAAK;AACL,IAAI,uBAAuB,GAAG;AAC9B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC,CAAC;AAC9F,KAAK;AACL,IAAI,iBAAiB,GAAG;AACxB,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC,CAAC;AAC9F,KAAK;AACL;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/schemas/enums/calendar-chooser-display-style.js","esm/schemas/enums/calendar-chooser-selection-style.js","esm/schemas/enums/plugin-permission.js","esm/schemas/enums/reminder-recurrence-frequency.js","esm/index.js","esm/web.js"],"sourcesContent":["/**\n * Enum representing the display styles for the calendar chooser.\n *\n * @enum CalendarChooserDisplayStyle\n * @platform iOS\n */\nexport var CalendarChooserDisplayStyle;\n(function (CalendarChooserDisplayStyle) {\n /**\n * Display all calendars available for selection.\n */\n CalendarChooserDisplayStyle[CalendarChooserDisplayStyle[\"ALL_CALENDARS\"] = 0] = \"ALL_CALENDARS\";\n /**\n * Display only writable calendars available for selection.\n */\n CalendarChooserDisplayStyle[CalendarChooserDisplayStyle[\"WRITABLE_CALENDARS_ONLY\"] = 1] = \"WRITABLE_CALENDARS_ONLY\";\n})(CalendarChooserDisplayStyle || (CalendarChooserDisplayStyle = {}));\n//# sourceMappingURL=calendar-chooser-display-style.js.map","/**\n * Enum representing the selection style for the calendar chooser.\n *\n * @enum CalendarChooserSelectionStyle\n * @platform iOS\n */\nexport var CalendarChooserSelectionStyle;\n(function (CalendarChooserSelectionStyle) {\n /**\n * Allows only a single selection in the calendar chooser.\n */\n CalendarChooserSelectionStyle[CalendarChooserSelectionStyle[\"SINGLE\"] = 0] = \"SINGLE\";\n /**\n * Allows multiple selections in the calendar chooser.\n */\n CalendarChooserSelectionStyle[CalendarChooserSelectionStyle[\"MULTIPLE\"] = 1] = \"MULTIPLE\";\n})(CalendarChooserSelectionStyle || (CalendarChooserSelectionStyle = {}));\n//# sourceMappingURL=calendar-chooser-selection-style.js.map","/**\n * Enum representing the available runtime permissions for the plugin.\n *\n * @enum PluginPermission\n * @platform iOS, Android\n */\nexport var PluginPermission;\n(function (PluginPermission) {\n /**\n * Represents the permission state for reading calendar.\n *\n * @platform iOS, Android\n * @permissions\n * <h3>Manifest Permissions:</h3>\n * <ul>\n * <li><strong>iOS 17 &le;:</strong> NSCalendarsFullAccessUsageDescription</li>\n * <li><strong>iOS 10 &le; x &le; 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 &le;:</strong> NSCalendarsWriteOnlyAccessUsageDescription</li>\n * <li><strong>iOS 10 &le; x &le; 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 &le;:</strong> NSRemindersFullAccessUsageDescription</li>\n * <li><strong>iOS 10 &le; x &le; 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 &le;:</strong> NSRemindersFullAccessUsageDescription</li>\n * <li><strong>iOS 10 &le; x &le; 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}\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,eAAe,CAAC;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,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