@ebarooni/capacitor-calendar 6.4.1 → 6.6.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 (40) hide show
  1. package/README.md +53 -5
  2. package/android/build.gradle +2 -2
  3. package/android/src/main/java/dev/barooni/capacitor/calendar/CapacitorCalendar.kt +200 -117
  4. package/android/src/main/java/dev/barooni/capacitor/calendar/CapacitorCalendarPlugin.kt +85 -3
  5. package/assets/images/text-logo.png +0 -0
  6. package/dist/docs.json +467 -70
  7. package/dist/esm/definitions.d.ts +205 -57
  8. package/dist/esm/definitions.js.map +1 -1
  9. package/dist/esm/index.d.ts +18 -14
  10. package/dist/esm/index.js +12 -9
  11. package/dist/esm/index.js.map +1 -1
  12. package/dist/esm/schemas/enums/calendar-source-type.d.ts +38 -0
  13. package/dist/esm/schemas/enums/calendar-source-type.js +40 -0
  14. package/dist/esm/schemas/enums/calendar-source-type.js.map +1 -0
  15. package/dist/esm/schemas/enums/calendar-type.d.ts +28 -0
  16. package/dist/esm/schemas/enums/calendar-type.js +30 -0
  17. package/dist/esm/schemas/enums/calendar-type.js.map +1 -0
  18. package/dist/esm/schemas/enums/event-span.d.ts +16 -0
  19. package/dist/esm/schemas/enums/event-span.js +18 -0
  20. package/dist/esm/schemas/enums/event-span.js.map +1 -0
  21. package/dist/esm/schemas/interfaces/calendar-event.d.ts +14 -3
  22. package/dist/esm/schemas/interfaces/calendar-event.js.map +1 -1
  23. package/dist/esm/schemas/interfaces/calendar-source.d.ts +15 -0
  24. package/dist/esm/schemas/interfaces/calendar-source.js +2 -0
  25. package/dist/esm/schemas/interfaces/calendar-source.js.map +1 -0
  26. package/dist/esm/schemas/interfaces/calendar.d.ts +43 -2
  27. package/dist/esm/schemas/interfaces/calendar.js.map +1 -1
  28. package/dist/esm/web.d.ts +55 -11
  29. package/dist/esm/web.js +13 -2
  30. package/dist/esm/web.js.map +1 -1
  31. package/dist/plugin.cjs.js +101 -2
  32. package/dist/plugin.cjs.js.map +1 -1
  33. package/dist/plugin.js +101 -2
  34. package/dist/plugin.js.map +1 -1
  35. package/ios/Plugin/CapacitorCalendar.swift +238 -21
  36. package/ios/Plugin/CapacitorCalendarPlugin.m +4 -0
  37. package/ios/Plugin/CapacitorCalendarPlugin.swift +141 -15
  38. package/ios/Plugin/CapacitorReminders.swift +62 -8
  39. package/ios/Plugin/EventCreationParameters.swift +5 -2
  40. package/package.json +28 -18
package/dist/esm/index.js CHANGED
@@ -1,11 +1,14 @@
1
- import { registerPlugin } from '@capacitor/core';
2
- import { CalendarChooserDisplayStyle } from './schemas/enums/calendar-chooser-display-style';
3
- import { CalendarChooserSelectionStyle } from './schemas/enums/calendar-chooser-selection-style';
4
- import { PluginPermission } from './schemas/enums/plugin-permission';
5
- import { ReminderRecurrenceFrequency } from './schemas/enums/reminder-recurrence-frequency';
6
- const CapacitorCalendar = registerPlugin('CapacitorCalendar', {
7
- web: () => import('./web').then((m) => new m.CapacitorCalendarWeb()),
1
+ import { registerPlugin } from "@capacitor/core";
2
+ import { CalendarChooserDisplayStyle } from "./schemas/enums/calendar-chooser-display-style";
3
+ import { CalendarChooserSelectionStyle } from "./schemas/enums/calendar-chooser-selection-style";
4
+ import { PluginPermission } from "./schemas/enums/plugin-permission";
5
+ import { ReminderRecurrenceFrequency } from "./schemas/enums/reminder-recurrence-frequency";
6
+ import { EventSpan } from "./schemas/enums/event-span";
7
+ import { CalendarSourceType } from "./schemas/enums/calendar-source-type";
8
+ import { CalendarType } from "./schemas/enums/calendar-type";
9
+ const CapacitorCalendar = registerPlugin("CapacitorCalendar", {
10
+ web: () => import("./web").then((m) => new m.CapacitorCalendarWeb()),
8
11
  });
9
- export * from './definitions';
10
- export { CalendarChooserSelectionStyle, CalendarChooserDisplayStyle, PluginPermission, ReminderRecurrenceFrequency, CapacitorCalendar, };
12
+ export * from "./definitions";
13
+ export { CalendarChooserSelectionStyle, CalendarChooserDisplayStyle, PluginPermission, ReminderRecurrenceFrequency, EventSpan, CalendarSourceType, CalendarType, CapacitorCalendar, };
11
14
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAC7F,OAAO,EAAE,6BAA6B,EAAE,MAAM,kDAAkD,CAAC;AACjG,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AAS5F,MAAM,iBAAiB,GAAG,cAAc,CAA0B,mBAAmB,EAAE;IACrF,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,oBAAoB,EAAE,CAAC;CACrE,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAE9B,OAAO,EACL,6BAA6B,EAC7B,2BAA2B,EAC3B,gBAAgB,EAEhB,2BAA2B,EAG3B,iBAAiB,GAClB,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\nimport { CalendarChooserDisplayStyle } from './schemas/enums/calendar-chooser-display-style';\nimport { CalendarChooserSelectionStyle } from './schemas/enums/calendar-chooser-selection-style';\nimport { PluginPermission } from './schemas/enums/plugin-permission';\nimport { ReminderRecurrenceFrequency } from './schemas/enums/reminder-recurrence-frequency';\nimport type { CapacitorCalendarPlugin } from './definitions';\nimport type { Calendar } from './schemas/interfaces/calendar';\nimport type { RemindersList } from './schemas/interfaces/reminders-list';\nimport type { PluginPermissionsMap } from './schemas/interfaces/plugin-permissions-map';\nimport type { ReminderRecurrenceRule } from './schemas/interfaces/reminder-recurrence-rule';\nimport type { CalendarEvent } from './schemas/interfaces/calendar-event';\nimport type { Reminder } from './schemas/interfaces/reminder';\n\nconst CapacitorCalendar = registerPlugin<CapacitorCalendarPlugin>('CapacitorCalendar', {\n web: () => import('./web').then((m) => new m.CapacitorCalendarWeb()),\n});\n\nexport * from './definitions';\nexport type { Calendar, RemindersList, ReminderRecurrenceRule };\nexport {\n CalendarChooserSelectionStyle,\n CalendarChooserDisplayStyle,\n PluginPermission,\n PluginPermissionsMap,\n ReminderRecurrenceFrequency,\n CalendarEvent,\n Reminder,\n CapacitorCalendar,\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAC7F,OAAO,EAAE,6BAA6B,EAAE,MAAM,kDAAkD,CAAC;AACjG,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AAC5F,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAU7D,MAAM,iBAAiB,GAAG,cAAc,CACtC,mBAAmB,EACnB;IACE,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,oBAAoB,EAAE,CAAC;CACrE,CACF,CAAC;AAEF,cAAc,eAAe,CAAC;AAE9B,OAAO,EACL,6BAA6B,EAC7B,2BAA2B,EAC3B,gBAAgB,EAEhB,2BAA2B,EAG3B,SAAS,EACT,kBAAkB,EAClB,YAAY,EACZ,iBAAiB,GAClB,CAAC","sourcesContent":["import { registerPlugin } from \"@capacitor/core\";\nimport { CalendarChooserDisplayStyle } from \"./schemas/enums/calendar-chooser-display-style\";\nimport { CalendarChooserSelectionStyle } from \"./schemas/enums/calendar-chooser-selection-style\";\nimport { PluginPermission } from \"./schemas/enums/plugin-permission\";\nimport { ReminderRecurrenceFrequency } from \"./schemas/enums/reminder-recurrence-frequency\";\nimport { EventSpan } from \"./schemas/enums/event-span\";\nimport { CalendarSourceType } from \"./schemas/enums/calendar-source-type\";\nimport { CalendarType } from \"./schemas/enums/calendar-type\";\nimport type { CapacitorCalendarPlugin } from \"./definitions\";\nimport type { Calendar } from \"./schemas/interfaces/calendar\";\nimport type { RemindersList } from \"./schemas/interfaces/reminders-list\";\nimport type { PluginPermissionsMap } from \"./schemas/interfaces/plugin-permissions-map\";\nimport type { ReminderRecurrenceRule } from \"./schemas/interfaces/reminder-recurrence-rule\";\nimport type { CalendarEvent } from \"./schemas/interfaces/calendar-event\";\nimport type { Reminder } from \"./schemas/interfaces/reminder\";\nimport type { CalendarSource } from \"./schemas/interfaces/calendar-source\";\n\nconst CapacitorCalendar = registerPlugin<CapacitorCalendarPlugin>(\n \"CapacitorCalendar\",\n {\n web: () => import(\"./web\").then((m) => new m.CapacitorCalendarWeb()),\n },\n);\n\nexport * from \"./definitions\";\nexport type { Calendar, RemindersList, ReminderRecurrenceRule, CalendarSource };\nexport {\n CalendarChooserSelectionStyle,\n CalendarChooserDisplayStyle,\n PluginPermission,\n PluginPermissionsMap,\n ReminderRecurrenceFrequency,\n CalendarEvent,\n Reminder,\n EventSpan,\n CalendarSourceType,\n CalendarType,\n CapacitorCalendar,\n};\n"]}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Represents the different types of sources from which calendars can originate.
3
+ *
4
+ * @enum CalendarSourceType
5
+ * @platform iOS
6
+ */
7
+ export declare enum CalendarSourceType {
8
+ /**
9
+ * Calendars that are stored locally on the device. These calendars are not
10
+ * synced with any external service.
11
+ */
12
+ LOCAL = 0,
13
+ /**
14
+ * Calendars that are associated with an Exchange server. Exchange is a
15
+ * popular calendar and email service used by many enterprises.
16
+ */
17
+ EXCHANGE = 1,
18
+ /**
19
+ * Calendars that use the CalDAV protocol for synchronization.
20
+ * This includes calendars from services like Google Calendar and Yahoo Calendar.
21
+ */
22
+ CAL_DAV = 2,
23
+ /**
24
+ * Calendars that were previously associated with MobileMe, Apple's cloud
25
+ * service before iCloud. This source type is largely obsolete now.
26
+ */
27
+ MOBILE_ME = 3,
28
+ /**
29
+ * Calendars that the user has subscribed to. These are read-only calendars
30
+ * that can be added by subscribing to a calendar URL.
31
+ */
32
+ SUBSCRIBED = 4,
33
+ /**
34
+ * The built-in Birthdays calendar, which shows birthdays of contacts from the user's address book.
35
+ * This calendar is typically read-only and is managed by the system.
36
+ */
37
+ BIRTHDAYS = 5
38
+ }
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Represents the different types of sources from which calendars can originate.
3
+ *
4
+ * @enum CalendarSourceType
5
+ * @platform iOS
6
+ */
7
+ export var CalendarSourceType;
8
+ (function (CalendarSourceType) {
9
+ /**
10
+ * Calendars that are stored locally on the device. These calendars are not
11
+ * synced with any external service.
12
+ */
13
+ CalendarSourceType[CalendarSourceType["LOCAL"] = 0] = "LOCAL";
14
+ /**
15
+ * Calendars that are associated with an Exchange server. Exchange is a
16
+ * popular calendar and email service used by many enterprises.
17
+ */
18
+ CalendarSourceType[CalendarSourceType["EXCHANGE"] = 1] = "EXCHANGE";
19
+ /**
20
+ * Calendars that use the CalDAV protocol for synchronization.
21
+ * This includes calendars from services like Google Calendar and Yahoo Calendar.
22
+ */
23
+ CalendarSourceType[CalendarSourceType["CAL_DAV"] = 2] = "CAL_DAV";
24
+ /**
25
+ * Calendars that were previously associated with MobileMe, Apple's cloud
26
+ * service before iCloud. This source type is largely obsolete now.
27
+ */
28
+ CalendarSourceType[CalendarSourceType["MOBILE_ME"] = 3] = "MOBILE_ME";
29
+ /**
30
+ * Calendars that the user has subscribed to. These are read-only calendars
31
+ * that can be added by subscribing to a calendar URL.
32
+ */
33
+ CalendarSourceType[CalendarSourceType["SUBSCRIBED"] = 4] = "SUBSCRIBED";
34
+ /**
35
+ * The built-in Birthdays calendar, which shows birthdays of contacts from the user's address book.
36
+ * This calendar is typically read-only and is managed by the system.
37
+ */
38
+ CalendarSourceType[CalendarSourceType["BIRTHDAYS"] = 5] = "BIRTHDAYS";
39
+ })(CalendarSourceType || (CalendarSourceType = {}));
40
+ //# sourceMappingURL=calendar-source-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendar-source-type.js","sourceRoot":"","sources":["../../../../src/schemas/enums/calendar-source-type.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAN,IAAY,kBAoCX;AApCD,WAAY,kBAAkB;IAC5B;;;OAGG;IACH,6DAAK,CAAA;IAEL;;;OAGG;IACH,mEAAQ,CAAA;IAER;;;OAGG;IACH,iEAAO,CAAA;IAEP;;;OAGG;IACH,qEAAS,CAAA;IAET;;;OAGG;IACH,uEAAU,CAAA;IAEV;;;OAGG;IACH,qEAAS,CAAA;AACX,CAAC,EApCW,kBAAkB,KAAlB,kBAAkB,QAoC7B","sourcesContent":["/**\n * Represents the different types of sources from which calendars can originate.\n *\n * @enum CalendarSourceType\n * @platform iOS\n */\nexport enum CalendarSourceType {\n /**\n * Calendars that are stored locally on the device. These calendars are not\n * synced with any external service.\n */\n LOCAL,\n\n /**\n * Calendars that are associated with an Exchange server. Exchange is a\n * popular calendar and email service used by many enterprises.\n */\n EXCHANGE,\n\n /**\n * Calendars that use the CalDAV protocol for synchronization.\n * This includes calendars from services like Google Calendar and Yahoo Calendar.\n */\n CAL_DAV,\n\n /**\n * Calendars that were previously associated with MobileMe, Apple's cloud\n * service before iCloud. This source type is largely obsolete now.\n */\n MOBILE_ME,\n\n /**\n * Calendars that the user has subscribed to. These are read-only calendars\n * that can be added by subscribing to a calendar URL.\n */\n SUBSCRIBED,\n\n /**\n * The built-in Birthdays calendar, which shows birthdays of contacts from the user's address book.\n * This calendar is typically read-only and is managed by the system.\n */\n BIRTHDAYS,\n}\n"]}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * An enum representing the type of calendar.
3
+ *
4
+ * @enum CalendarType
5
+ * @platform iOS
6
+ */
7
+ export declare enum CalendarType {
8
+ /**
9
+ * This calendar is sync'd from either Mobile Me or tethered.
10
+ */
11
+ LOCAL = 0,
12
+ /**
13
+ * This calendar is from a CalDAV server.
14
+ */
15
+ CAL_DAV = 1,
16
+ /**
17
+ * This calendar comes from an Exchange server.
18
+ */
19
+ EXCHANGE = 2,
20
+ /**
21
+ * This is a locally subscribed calendar.
22
+ */
23
+ SUBSCRIPTION = 3,
24
+ /**
25
+ * This is the built-in birthday calendar.
26
+ */
27
+ BIRTHDAY = 4
28
+ }
@@ -0,0 +1,30 @@
1
+ /**
2
+ * An enum representing the type of calendar.
3
+ *
4
+ * @enum CalendarType
5
+ * @platform iOS
6
+ */
7
+ export var CalendarType;
8
+ (function (CalendarType) {
9
+ /**
10
+ * This calendar is sync'd from either Mobile Me or tethered.
11
+ */
12
+ CalendarType[CalendarType["LOCAL"] = 0] = "LOCAL";
13
+ /**
14
+ * This calendar is from a CalDAV server.
15
+ */
16
+ CalendarType[CalendarType["CAL_DAV"] = 1] = "CAL_DAV";
17
+ /**
18
+ * This calendar comes from an Exchange server.
19
+ */
20
+ CalendarType[CalendarType["EXCHANGE"] = 2] = "EXCHANGE";
21
+ /**
22
+ * This is a locally subscribed calendar.
23
+ */
24
+ CalendarType[CalendarType["SUBSCRIPTION"] = 3] = "SUBSCRIPTION";
25
+ /**
26
+ * This is the built-in birthday calendar.
27
+ */
28
+ CalendarType[CalendarType["BIRTHDAY"] = 4] = "BIRTHDAY";
29
+ })(CalendarType || (CalendarType = {}));
30
+ //# sourceMappingURL=calendar-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendar-type.js","sourceRoot":"","sources":["../../../../src/schemas/enums/calendar-type.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAN,IAAY,YAyBX;AAzBD,WAAY,YAAY;IACtB;;OAEG;IACH,iDAAK,CAAA;IAEL;;OAEG;IACH,qDAAO,CAAA;IAEP;;OAEG;IACH,uDAAQ,CAAA;IAER;;OAEG;IACH,+DAAY,CAAA;IAEZ;;OAEG;IACH,uDAAQ,CAAA;AACV,CAAC,EAzBW,YAAY,KAAZ,YAAY,QAyBvB","sourcesContent":["/**\n * An enum representing the type of calendar.\n *\n * @enum CalendarType\n * @platform iOS\n */\nexport enum CalendarType {\n /**\n * This calendar is sync'd from either Mobile Me or tethered.\n */\n LOCAL,\n\n /**\n * This calendar is from a CalDAV server.\n */\n CAL_DAV,\n\n /**\n * This calendar comes from an Exchange server.\n */\n EXCHANGE,\n\n /**\n * This is a locally subscribed calendar.\n */\n SUBSCRIPTION,\n\n /**\n * This is the built-in birthday calendar.\n */\n BIRTHDAY,\n}\n"]}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Enum representing the span of modifications.
3
+ *
4
+ * @enum EventSpan
5
+ * @platform iOS
6
+ */
7
+ export declare enum EventSpan {
8
+ /**
9
+ * The modifications should only be applied to this event.
10
+ */
11
+ THIS_EVENT = 0,
12
+ /**
13
+ * The modifications to this event should also be applied to the future instances of this event.
14
+ */
15
+ THIS_AND_FUTURE_EVENTS = 1
16
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Enum representing the span of modifications.
3
+ *
4
+ * @enum EventSpan
5
+ * @platform iOS
6
+ */
7
+ export var EventSpan;
8
+ (function (EventSpan) {
9
+ /**
10
+ * The modifications should only be applied to this event.
11
+ */
12
+ EventSpan[EventSpan["THIS_EVENT"] = 0] = "THIS_EVENT";
13
+ /**
14
+ * The modifications to this event should also be applied to the future instances of this event.
15
+ */
16
+ EventSpan[EventSpan["THIS_AND_FUTURE_EVENTS"] = 1] = "THIS_AND_FUTURE_EVENTS";
17
+ })(EventSpan || (EventSpan = {}));
18
+ //# sourceMappingURL=event-span.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-span.js","sourceRoot":"","sources":["../../../../src/schemas/enums/event-span.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAN,IAAY,SAUX;AAVD,WAAY,SAAS;IACnB;;OAEG;IACH,qDAAU,CAAA;IAEV;;OAEG;IACH,6EAAsB,CAAA;AACxB,CAAC,EAVW,SAAS,KAAT,SAAS,QAUpB","sourcesContent":["/**\n * Enum representing the span of modifications.\n *\n * @enum EventSpan\n * @platform iOS\n */\nexport enum EventSpan {\n /**\n * The modifications should only be applied to this event.\n */\n THIS_EVENT,\n\n /**\n * The modifications to this event should also be applied to the future instances of this event.\n */\n THIS_AND_FUTURE_EVENTS,\n}\n"]}
@@ -15,6 +15,7 @@
15
15
  * @property {string} duration The duration of the event. (Optional)
16
16
  * @property {boolean} isAllDay Indicates if the event is all day. (Optional)
17
17
  * @property {string} calendarId The calendar that the event belongs to. (Optional)
18
+ * @property {string} url The URL of the event. (Optional)
18
19
  */
19
20
  export interface CalendarEvent {
20
21
  /**
@@ -30,7 +31,7 @@ export interface CalendarEvent {
30
31
  */
31
32
  location?: string;
32
33
  /**
33
- * @platform Android
34
+ * @platform iOS, Android
34
35
  */
35
36
  eventColor?: string;
36
37
  /**
@@ -52,11 +53,17 @@ export interface CalendarEvent {
52
53
  /**
53
54
  * @platform iOS, Android
54
55
  */
55
- eventTimezone?: string;
56
+ eventTimezone?: {
57
+ region: string;
58
+ abbreviation: string;
59
+ };
56
60
  /**
57
61
  * @platform iOS, Android
58
62
  */
59
- eventEndTimezone?: string;
63
+ eventEndTimezone?: {
64
+ region: string;
65
+ abbreviation: string;
66
+ };
60
67
  /**
61
68
  * @platform Android
62
69
  */
@@ -69,4 +76,8 @@ export interface CalendarEvent {
69
76
  * @platform iOS, Android
70
77
  */
71
78
  calendarId: string;
79
+ /**
80
+ * @platform iOS
81
+ */
82
+ url: string;
72
83
  }
@@ -1 +1 @@
1
- {"version":3,"file":"calendar-event.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/calendar-event.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Represents an event in the calendar.\n *\n * @interface CalendarEvent\n * @property {string} id The unique identifier of the event.\n * @property {string} title The title or name of the event. (Optional)\n * @property {string} location The location of the event. (Optional)\n * @property {string} eventColor The color of the individual event. (Optional)\n * @property {string} organizer The organizer of the event. (Optional)\n * @property {string} description The description of the event. (Optional)\n * @property {number} startDate The start date of the event. (Optional)\n * @property {number} endDate The end date of the event. (Optional)\n * @property {string} eventTimezone The timezone of the start date. (optional)\n * @property {string} eventEndTimezone The timezone of the end date. (optional)\n * @property {string} duration The duration of the event. (Optional)\n * @property {boolean} isAllDay Indicates if the event is all day. (Optional)\n * @property {string} calendarId The calendar that the event belongs to. (Optional)\n */\nexport interface CalendarEvent {\n /**\n * @platform iOS, Android\n */\n id: string;\n\n /**\n * @platform iOS, Android\n */\n title?: string;\n\n /**\n * @platform iOS, Android\n */\n location?: string;\n\n /**\n * @platform Android\n */\n eventColor?: string;\n\n /**\n * @platform iOS, Android\n */\n organizer?: string;\n\n /**\n * @platform iOS, Android\n */\n description?: string;\n\n /**\n * @platform iOS, Android\n */\n startDate?: number;\n\n /**\n * @platform iOS, Android\n */\n endDate?: number;\n\n /**\n * @platform iOS, Android\n */\n eventTimezone?: string;\n\n /**\n * @platform iOS, Android\n */\n eventEndTimezone?: string;\n\n /**\n * @platform Android\n */\n duration?: string;\n\n /**\n * @platform iOS, Android\n */\n isAllDay?: boolean;\n\n /**\n * @platform iOS, Android\n */\n calendarId: string;\n}\n"]}
1
+ {"version":3,"file":"calendar-event.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/calendar-event.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Represents an event in the calendar.\n *\n * @interface CalendarEvent\n * @property {string} id The unique identifier of the event.\n * @property {string} title The title or name of the event. (Optional)\n * @property {string} location The location of the event. (Optional)\n * @property {string} eventColor The color of the individual event. (Optional)\n * @property {string} organizer The organizer of the event. (Optional)\n * @property {string} description The description of the event. (Optional)\n * @property {number} startDate The start date of the event. (Optional)\n * @property {number} endDate The end date of the event. (Optional)\n * @property {string} eventTimezone The timezone of the start date. (optional)\n * @property {string} eventEndTimezone The timezone of the end date. (optional)\n * @property {string} duration The duration of the event. (Optional)\n * @property {boolean} isAllDay Indicates if the event is all day. (Optional)\n * @property {string} calendarId The calendar that the event belongs to. (Optional)\n * @property {string} url The URL of the event. (Optional)\n */\nexport interface CalendarEvent {\n /**\n * @platform iOS, Android\n */\n id: string;\n\n /**\n * @platform iOS, Android\n */\n title?: string;\n\n /**\n * @platform iOS, Android\n */\n location?: string;\n\n /**\n * @platform iOS, Android\n */\n eventColor?: string;\n\n /**\n * @platform iOS, Android\n */\n organizer?: string;\n\n /**\n * @platform iOS, Android\n */\n description?: string;\n\n /**\n * @platform iOS, Android\n */\n startDate?: number;\n\n /**\n * @platform iOS, Android\n */\n endDate?: number;\n\n /**\n * @platform iOS, Android\n */\n eventTimezone?: {\n region: string;\n abbreviation: string;\n };\n\n /**\n * @platform iOS, Android\n */\n eventEndTimezone?: {\n region: string;\n abbreviation: string;\n };\n\n /**\n * @platform Android\n */\n duration?: string;\n\n /**\n * @platform iOS, Android\n */\n isAllDay?: boolean;\n\n /**\n * @platform iOS, Android\n */\n calendarId: string;\n\n /**\n * @platform iOS\n */\n url: string;\n}\n"]}
@@ -0,0 +1,15 @@
1
+ import { CalendarSourceType } from "../enums/calendar-source-type";
2
+ /**
3
+ * Represents the account a calendar belongs to
4
+ *
5
+ * @enum CalendarSource
6
+ * @platform iOS
7
+ * @property {CalendarSourceType} type The type of the source object.
8
+ * @property {string} id A unique identifier for the source object.
9
+ * @property {string} title The name of the source object.
10
+ */
11
+ export interface CalendarSource {
12
+ type: CalendarSourceType;
13
+ id: string;
14
+ title: string;
15
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=calendar-source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendar-source.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/calendar-source.ts"],"names":[],"mappings":"","sourcesContent":["import { CalendarSourceType } from \"../enums/calendar-source-type\";\n\n/**\n * Represents the account a calendar belongs to\n *\n * @enum CalendarSource\n * @platform iOS\n * @property {CalendarSourceType} type The type of the source object.\n * @property {string} id A unique identifier for the source object.\n * @property {string} title The name of the source object.\n */\nexport interface CalendarSource {\n type: CalendarSourceType;\n id: string;\n title: string;\n}\n"]}
@@ -1,12 +1,53 @@
1
+ import { CalendarSource } from "./calendar-source";
2
+ import { CalendarType } from "../enums/calendar-type";
1
3
  /**
2
4
  * Represents a calendar object.
3
5
  *
4
6
  * @interface Calendar
5
7
  * @platform iOS, Android
6
- * @property {string} id - The unique identifier of the calendar.
7
- * @property {string} title - The title or name of the calendar.
8
+ * @property {string} id The unique identifier of the calendar.
9
+ * @property {string} title The title or name of the calendar.
10
+ * @property {string} color The color of the calendar.
11
+ * @property {boolean} isImmutable Indicating whether the calendar's properties
12
+ * can be modified.
13
+ * @property {boolean} allowsContentModifications Indicating whether the calendar's
14
+ * items (events or reminders) can be modified.
15
+ * @property {CalendarType} type The type of the calendar. On iOS the type is of type
16
+ * CalendarSourceType.
17
+ * @property {boolean} isSubscribed Indicating whether the calendar is a subscribed calendar.
18
+ * @property {CalendarSource} source The source of the calendar.
8
19
  */
9
20
  export interface Calendar {
21
+ /**
22
+ * @platform iOS, Android
23
+ */
10
24
  id: string;
25
+ /**
26
+ * @platform iOS, Android
27
+ */
11
28
  title: string;
29
+ /**
30
+ * @platform iOS, Android
31
+ */
32
+ color: string;
33
+ /**
34
+ * @platform iOS
35
+ */
36
+ isImmutable?: boolean;
37
+ /**
38
+ * @platform iOS
39
+ */
40
+ allowsContentModifications?: boolean;
41
+ /**
42
+ * @platform iOS, Android
43
+ */
44
+ type?: CalendarType;
45
+ /**
46
+ * @platform iOS
47
+ */
48
+ isSubscribed?: boolean;
49
+ /**
50
+ * @platform iOS
51
+ */
52
+ source?: CalendarSource;
12
53
  }
@@ -1 +1 @@
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"]}
1
+ {"version":3,"file":"calendar.js","sourceRoot":"","sources":["../../../../src/schemas/interfaces/calendar.ts"],"names":[],"mappings":"","sourcesContent":["import { CalendarSource } from \"./calendar-source\";\nimport { CalendarType } from \"../enums/calendar-type\";\n\n/**\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 * @property {string} color The color of the calendar.\n * @property {boolean} isImmutable Indicating whether the calendar's properties\n * can be modified.\n * @property {boolean} allowsContentModifications Indicating whether the calendar's\n * items (events or reminders) can be modified.\n * @property {CalendarType} type The type of the calendar. On iOS the type is of type\n * CalendarSourceType.\n * @property {boolean} isSubscribed Indicating whether the calendar is a subscribed calendar.\n * @property {CalendarSource} source The source of the calendar.\n */\nexport interface Calendar {\n /**\n * @platform iOS, Android\n */\n id: string;\n\n /**\n * @platform iOS, Android\n */\n title: string;\n\n /**\n * @platform iOS, Android\n */\n color: string;\n\n /**\n * @platform iOS\n */\n isImmutable?: boolean;\n\n /**\n * @platform iOS\n */\n allowsContentModifications?: boolean;\n\n /**\n * @platform iOS, Android\n */\n type?: CalendarType;\n\n /**\n * @platform iOS\n */\n isSubscribed?: boolean;\n\n /**\n * @platform iOS\n */\n source?: CalendarSource;\n}\n"]}
package/dist/esm/web.d.ts CHANGED
@@ -1,12 +1,14 @@
1
- import { PermissionState, WebPlugin } from '@capacitor/core';
2
- import { CapacitorCalendarPlugin } from './definitions';
3
- import { PluginPermission } from './schemas/enums/plugin-permission';
4
- import { ReminderRecurrenceRule } from './schemas/interfaces/reminder-recurrence-rule';
5
- import type { Calendar } from './schemas/interfaces/calendar';
6
- import type { RemindersList } from './schemas/interfaces/reminders-list';
7
- import type { PluginPermissionsMap } from './schemas/interfaces/plugin-permissions-map';
8
- import type { CalendarEvent } from './schemas/interfaces/calendar-event';
9
- import type { Reminder } from './schemas/interfaces/reminder';
1
+ import { PermissionState, WebPlugin } from "@capacitor/core";
2
+ import { CapacitorCalendarPlugin } from "./definitions";
3
+ import { PluginPermission } from "./schemas/enums/plugin-permission";
4
+ import { ReminderRecurrenceRule } from "./schemas/interfaces/reminder-recurrence-rule";
5
+ import { EventSpan } from "./schemas/enums/event-span";
6
+ import type { Calendar } from "./schemas/interfaces/calendar";
7
+ import type { RemindersList } from "./schemas/interfaces/reminders-list";
8
+ import type { PluginPermissionsMap } from "./schemas/interfaces/plugin-permissions-map";
9
+ import type { CalendarEvent } from "./schemas/interfaces/calendar-event";
10
+ import type { Reminder } from "./schemas/interfaces/reminder";
11
+ import type { CalendarSource } from "./schemas/interfaces/calendar-source";
10
12
  export declare class CapacitorCalendarWeb extends WebPlugin implements CapacitorCalendarPlugin {
11
13
  checkPermission(_options: {
12
14
  alias: PluginPermission;
@@ -27,7 +29,9 @@ export declare class CapacitorCalendarWeb extends WebPlugin implements Capacitor
27
29
  startDate?: number;
28
30
  endDate?: number;
29
31
  isAllDay?: boolean;
30
- alertOffsetInMinutes?: number;
32
+ alertOffsetInMinutes?: number | number[];
33
+ url?: string;
34
+ notes?: string;
31
35
  }): Promise<{
32
36
  result: string[];
33
37
  }>;
@@ -47,7 +51,9 @@ export declare class CapacitorCalendarWeb extends WebPlugin implements Capacitor
47
51
  startDate?: number;
48
52
  endDate?: number;
49
53
  isAllDay?: boolean;
50
- alertOffsetInMinutes?: number;
54
+ alertOffsetInMinutes?: number | number[];
55
+ url?: string;
56
+ notes?: string;
51
57
  }): Promise<{
52
58
  result: string;
53
59
  }>;
@@ -93,6 +99,7 @@ export declare class CapacitorCalendarWeb extends WebPlugin implements Capacitor
93
99
  createCalendar(_options: {
94
100
  title: string;
95
101
  color?: string;
102
+ sourceId?: string;
96
103
  }): Promise<{
97
104
  result: string;
98
105
  }>;
@@ -124,4 +131,41 @@ export declare class CapacitorCalendarWeb extends WebPlugin implements Capacitor
124
131
  requestFullRemindersAccess(): Promise<{
125
132
  result: PermissionState;
126
133
  }>;
134
+ modifyEventWithPrompt(_options: {
135
+ id: string;
136
+ update?: {
137
+ title?: string;
138
+ calendarId?: string;
139
+ location?: string;
140
+ startDate?: number;
141
+ endDate?: number;
142
+ isAllDay?: boolean;
143
+ alertOffsetInMinutes?: number | number[];
144
+ url?: string;
145
+ notes?: string;
146
+ };
147
+ }): Promise<{
148
+ result: string[];
149
+ }>;
150
+ modifyEvent(_options: {
151
+ id: string;
152
+ span?: EventSpan;
153
+ update: {
154
+ title?: string;
155
+ calendarId?: string;
156
+ location?: string;
157
+ startDate?: number;
158
+ endDate?: number;
159
+ isAllDay?: boolean;
160
+ alertOffsetInMinutes?: number | number[];
161
+ url?: string;
162
+ notes?: string;
163
+ };
164
+ }): Promise<void>;
165
+ fetchAllCalendarSources(): Promise<{
166
+ result: CalendarSource[];
167
+ }>;
168
+ fetchAllRemindersSources(): Promise<{
169
+ result: CalendarSource[];
170
+ }>;
127
171
  }
package/dist/esm/web.js CHANGED
@@ -1,5 +1,4 @@
1
- /* eslint-disable @typescript-eslint/no-unused-vars */
2
- import { WebPlugin } from '@capacitor/core';
1
+ import { WebPlugin } from "@capacitor/core";
3
2
  export class CapacitorCalendarWeb extends WebPlugin {
4
3
  checkPermission(_options) {
5
4
  throw this.unimplemented(`${this.checkPermission.name} is not implemented on the web`);
@@ -73,5 +72,17 @@ export class CapacitorCalendarWeb extends WebPlugin {
73
72
  requestFullRemindersAccess() {
74
73
  throw this.unimplemented(`${this.requestFullRemindersAccess.name} is not implemented on the web`);
75
74
  }
75
+ modifyEventWithPrompt(_options) {
76
+ throw this.unimplemented(`${this.modifyEventWithPrompt.name} is not implemented on the web`);
77
+ }
78
+ modifyEvent(_options) {
79
+ throw this.unimplemented(`${this.modifyEvent.name} is not implemented on the web`);
80
+ }
81
+ fetchAllCalendarSources() {
82
+ throw this.unimplemented(`${this.fetchAllCalendarSources.name} is not implemented on the web`);
83
+ }
84
+ fetchAllRemindersSources() {
85
+ throw this.unimplemented(`${this.fetchAllRemindersSources.name} is not implemented on the web`);
86
+ }
76
87
  }
77
88
  //# 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;AAU7D,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,CAAC,QAQ5B;QACC,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,yBAAyB,CAAC,IAAI,gCAAgC,CAAC,CAAC;IACnG,CAAC;IAEM,aAAa;QAClB,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,aAAa,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AAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,gCAAgC,CAAC,CAAC;IACxF,CAAC;IAEM,cAAc,CAAC,QAAwB;QAC5C,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,gCAAgC,CAAC,CAAC;IACxF,CAAC;IAEM,qBAAqB,CAAC,QAAgC;QAC3D,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,qBAAqB,CAAC,IAAI,gCAAgC,CAAC,CAAC;IAC/F,CAAC;IAEM,mBAAmB,CAAC,QAE1B;QACC,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,mBAAmB,CAAC,IAAI,gCAAgC,CAAC,CAAC;IAC7F,CAAC;IAEM,8BAA8B;QACnC,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,8BAA8B,CAAC,IAAI,gCAAgC,CAAC,CAAC;IACxG,CAAC;IAEM,6BAA6B;QAClC,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,6BAA6B,CAAC,IAAI,gCAAgC,CAAC,CAAC;IACvG,CAAC;IAEM,yBAAyB;QAC9B,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,yBAAyB,CAAC,IAAI,gCAAgC,CAAC,CAAC;IACnG,CAAC;IAEM,0BAA0B;QAC/B,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,0BAA0B,CAAC,IAAI,gCAAgC,CAAC,CAAC;IACpG,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';\nimport type { Reminder } from './schemas/interfaces/reminder';\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(_options: {\n title: string;\n calendarId?: string;\n location?: string;\n startDate?: number;\n endDate?: number;\n isAllDay?: boolean;\n alertOffsetInMinutes?: number;\n }): 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.selectCalendarsWithPrompt.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 | null }> {\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 alertOffsetInMinutes?: number;\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.getDefaultRemindersList.name} is not implemented on the web`);\n }\n\n public getRemindersLists(): Promise<{ result: RemindersList[] }> {\n throw this.unimplemented(`${this.getRemindersLists.name} is not implemented on the web`);\n }\n\n public openCalendar(_options: { date?: number }): Promise<void> {\n throw this.unimplemented(`${this.openCalendar.name} is not implemented on the web`);\n }\n\n public openReminders(): Promise<void> {\n throw this.unimplemented(`${this.openReminders.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.listEventsInRange.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 public createCalendar(_options: { title: string; color?: string }): Promise<{ result: string }> {\n throw this.unimplemented(`${this.createCalendar.name} is not implemented on the web`);\n }\n\n public deleteCalendar(_options: { id: string }): Promise<void> {\n throw this.unimplemented(`${this.deleteCalendar.name} is not implemented on the web`);\n }\n\n public getRemindersFromLists(_options?: { listIds: string[] }): Promise<{ result: Reminder[] }> {\n throw this.unimplemented(`${this.getRemindersFromLists.name} is not implemented on the web`);\n }\n\n public deleteRemindersById(_options: {\n ids: string[];\n }): Promise<{ result: { deleted: string[]; failed: string[] } }> {\n throw this.unimplemented(`${this.deleteRemindersById.name} is not implemented on the web`);\n }\n\n public requestWriteOnlyCalendarAccess(): Promise<{ result: PermissionState }> {\n throw this.unimplemented(`${this.requestWriteOnlyCalendarAccess.name} is not implemented on the web`);\n }\n\n public requestReadOnlyCalendarAccess(): Promise<{ result: PermissionState }> {\n throw this.unimplemented(`${this.requestReadOnlyCalendarAccess.name} is not implemented on the web`);\n }\n\n public requestFullCalendarAccess(): Promise<{ result: PermissionState }> {\n throw this.unimplemented(`${this.requestFullCalendarAccess.name} is not implemented on the web`);\n }\n\n public requestFullRemindersAccess(): Promise<{ result: PermissionState }> {\n throw this.unimplemented(`${this.requestFullRemindersAccess.name} is not implemented on the web`);\n }\n}\n"]}
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAY7D,MAAM,OAAO,oBACX,SAAQ,SAAS;IAGV,eAAe,CAAC,QAEtB;QACC,MAAM,IAAI,CAAC,aAAa,CACtB,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,gCAAgC,CAC7D,CAAC;IACJ,CAAC;IAEM,mBAAmB;QACxB,MAAM,IAAI,CAAC,aAAa,CACtB,GAAG,IAAI,CAAC,mBAAmB,CAAC,IAAI,gCAAgC,CACjE,CAAC;IACJ,CAAC;IAEM,iBAAiB,CAAC,QAExB;QACC,MAAM,IAAI,CAAC,aAAa,CACtB,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,gCAAgC,CAC/D,CAAC;IACJ,CAAC;IAEM,qBAAqB;QAC1B,MAAM,IAAI,CAAC,aAAa,CACtB,GAAG,IAAI,CAAC,qBAAqB,CAAC,IAAI,gCAAgC,CACnE,CAAC;IACJ,CAAC;IAEM,qBAAqB,CAAC,QAU5B;QACC,MAAM,IAAI,CAAC,aAAa,CACtB,GAAG,IAAI,CAAC,qBAAqB,CAAC,IAAI,gCAAgC,CACnE,CAAC;IACJ,CAAC;IAEM,yBAAyB;QAC9B,MAAM,IAAI,CAAC,aAAa,CACtB,GAAG,IAAI,CAAC,yBAAyB,CAAC,IAAI,gCAAgC,CACvE,CAAC;IACJ,CAAC;IAEM,aAAa;QAClB,MAAM,IAAI,CAAC,aAAa,CACtB,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,gCA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EM,uBAAuB;QAC5B,MAAM,IAAI,CAAC,aAAa,CACtB,GAAG,IAAI,CAAC,uBAAuB,CAAC,IAAI,gCAAgC,CACrE,CAAC;IACJ,CAAC;IAEM,wBAAwB;QAC7B,MAAM,IAAI,CAAC,aAAa,CACtB,GAAG,IAAI,CAAC,wBAAwB,CAAC,IAAI,gCAAgC,CACtE,CAAC;IACJ,CAAC;CACF","sourcesContent":["import { 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 { EventSpan } from \"./schemas/enums/event-span\";\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\";\nimport type { Reminder } from \"./schemas/interfaces/reminder\";\nimport type { CalendarSource } from \"./schemas/interfaces/calendar-source\";\n\nexport class CapacitorCalendarWeb\n extends WebPlugin\n implements CapacitorCalendarPlugin\n{\n public checkPermission(_options: {\n alias: PluginPermission;\n }): Promise<{ result: PermissionState }> {\n throw this.unimplemented(\n `${this.checkPermission.name} is not implemented on the web`,\n );\n }\n\n public checkAllPermissions(): Promise<PluginPermissionsMap> {\n throw this.unimplemented(\n `${this.checkAllPermissions.name} is not implemented on the web`,\n );\n }\n\n public requestPermission(_options: {\n alias: PluginPermission;\n }): Promise<{ result: PermissionState }> {\n throw this.unimplemented(\n `${this.requestPermission.name} is not implemented on the web`,\n );\n }\n\n public requestAllPermissions(): Promise<PluginPermissionsMap> {\n throw this.unimplemented(\n `${this.requestAllPermissions.name} is not implemented on the web`,\n );\n }\n\n public createEventWithPrompt(_options: {\n title: string;\n calendarId?: string;\n location?: string;\n startDate?: number;\n endDate?: number;\n isAllDay?: boolean;\n alertOffsetInMinutes?: number | number[];\n url?: string;\n notes?: string;\n }): Promise<{ result: string[] }> {\n throw this.unimplemented(\n `${this.createEventWithPrompt.name} is not implemented on the web`,\n );\n }\n\n public selectCalendarsWithPrompt(): Promise<{ result: Calendar[] }> {\n throw this.unimplemented(\n `${this.selectCalendarsWithPrompt.name} is not implemented on the web`,\n );\n }\n\n public listCalendars(): Promise<{ result: Calendar[] }> {\n throw this.unimplemented(\n `${this.listCalendars.name} is not implemented on the web`,\n );\n }\n\n public getDefaultCalendar(): Promise<{ result: Calendar | null }> {\n throw this.unimplemented(\n `${this.getDefaultCalendar.name} is not implemented on the web`,\n );\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 alertOffsetInMinutes?: number | number[];\n url?: string;\n notes?: string;\n }): Promise<{\n result: string;\n }> {\n throw this.unimplemented(\n `${this.createEvent.name} is not implemented on the web`,\n );\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(\n `${this.createReminder.name} is not implemented on the web`,\n );\n }\n\n public getDefaultRemindersList(): Promise<{ result: RemindersList }> {\n throw this.unimplemented(\n `${this.getDefaultRemindersList.name} is not implemented on the web`,\n );\n }\n\n public getRemindersLists(): Promise<{ result: RemindersList[] }> {\n throw this.unimplemented(\n `${this.getRemindersLists.name} is not implemented on the web`,\n );\n }\n\n public openCalendar(_options: { date?: number }): Promise<void> {\n throw this.unimplemented(\n `${this.openCalendar.name} is not implemented on the web`,\n );\n }\n\n public openReminders(): Promise<void> {\n throw this.unimplemented(\n `${this.openReminders.name} is not implemented on the web`,\n );\n }\n\n public listEventsInRange(_options: {\n startDate: number;\n endDate: number;\n }): Promise<{ result: CalendarEvent[] }> {\n throw this.unimplemented(\n `${this.listEventsInRange.name} is not implemented on the web`,\n );\n }\n\n public deleteEventsById(_options: { ids: string[] }): Promise<{\n result: { deleted: string[]; failed: string[] };\n }> {\n throw this.unimplemented(\n `${this.deleteEventsById.name} is not implemented on the web`,\n );\n }\n\n public createCalendar(_options: {\n title: string;\n color?: string;\n sourceId?: string;\n }): Promise<{ result: string }> {\n throw this.unimplemented(\n `${this.createCalendar.name} is not implemented on the web`,\n );\n }\n\n public deleteCalendar(_options: { id: string }): Promise<void> {\n throw this.unimplemented(\n `${this.deleteCalendar.name} is not implemented on the web`,\n );\n }\n\n public getRemindersFromLists(_options?: {\n listIds: string[];\n }): Promise<{ result: Reminder[] }> {\n throw this.unimplemented(\n `${this.getRemindersFromLists.name} is not implemented on the web`,\n );\n }\n\n public deleteRemindersById(_options: {\n ids: string[];\n }): Promise<{ result: { deleted: string[]; failed: string[] } }> {\n throw this.unimplemented(\n `${this.deleteRemindersById.name} is not implemented on the web`,\n );\n }\n\n public requestWriteOnlyCalendarAccess(): Promise<{\n result: PermissionState;\n }> {\n throw this.unimplemented(\n `${this.requestWriteOnlyCalendarAccess.name} is not implemented on the web`,\n );\n }\n\n public requestReadOnlyCalendarAccess(): Promise<{ result: PermissionState }> {\n throw this.unimplemented(\n `${this.requestReadOnlyCalendarAccess.name} is not implemented on the web`,\n );\n }\n\n public requestFullCalendarAccess(): Promise<{ result: PermissionState }> {\n throw this.unimplemented(\n `${this.requestFullCalendarAccess.name} is not implemented on the web`,\n );\n }\n\n public requestFullRemindersAccess(): Promise<{ result: PermissionState }> {\n throw this.unimplemented(\n `${this.requestFullRemindersAccess.name} is not implemented on the web`,\n );\n }\n\n public modifyEventWithPrompt(_options: {\n id: string;\n update?: {\n title?: string;\n calendarId?: string;\n location?: string;\n startDate?: number;\n endDate?: number;\n isAllDay?: boolean;\n alertOffsetInMinutes?: number | number[];\n url?: string;\n notes?: string;\n };\n }): Promise<{ result: string[] }> {\n throw this.unimplemented(\n `${this.modifyEventWithPrompt.name} is not implemented on the web`,\n );\n }\n\n public modifyEvent(_options: {\n id: string;\n span?: EventSpan;\n update: {\n title?: string;\n calendarId?: string;\n location?: string;\n startDate?: number;\n endDate?: number;\n isAllDay?: boolean;\n alertOffsetInMinutes?: number | number[];\n url?: string;\n notes?: string;\n };\n }): Promise<void> {\n throw this.unimplemented(\n `${this.modifyEvent.name} is not implemented on the web`,\n );\n }\n\n public fetchAllCalendarSources(): Promise<{ result: CalendarSource[] }> {\n throw this.unimplemented(\n `${this.fetchAllCalendarSources.name} is not implemented on the web`,\n );\n }\n\n public fetchAllRemindersSources(): Promise<{ result: CalendarSource[] }> {\n throw this.unimplemented(\n `${this.fetchAllRemindersSources.name} is not implemented on the web`,\n );\n }\n}\n"]}