@ebarooni/capacitor-calendar 7.2.0 → 7.4.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 (269) hide show
  1. package/EbarooniCapacitorCalendar.podspec +1 -1
  2. package/Package.swift +2 -2
  3. package/README.md +932 -466
  4. package/android/src/main/java/dev/barooni/capacitor/calendar/CapacitorCalendarPlugin.kt +128 -31
  5. package/android/src/main/java/dev/barooni/capacitor/calendar/PluginError.kt +43 -19
  6. package/android/src/main/java/dev/barooni/capacitor/calendar/implementation/CapacitorCalendar.kt +312 -85
  7. package/android/src/main/java/dev/barooni/capacitor/calendar/models/data/CalendarEvent.kt +4 -0
  8. package/android/src/main/java/dev/barooni/capacitor/calendar/models/data/EventDeleteInfo.kt +8 -0
  9. package/android/src/main/java/dev/barooni/capacitor/calendar/models/data/EventRecurrenceRule.kt +135 -0
  10. package/android/src/main/java/dev/barooni/capacitor/calendar/models/enums/EventSpan.kt +13 -0
  11. package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/CheckPermissionInput.kt +0 -4
  12. package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/CreateCalendarInput.kt +3 -1
  13. package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/CreateEventInput.kt +1 -0
  14. package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/CreateEventWithPromptInput.kt +5 -0
  15. package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/DeleteCalendarInput.kt +4 -1
  16. package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/DeleteEventInput.kt +4 -1
  17. package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/DeleteEventWithPromptInput.kt +4 -1
  18. package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/DeleteEventsByIdInput.kt +2 -0
  19. package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/GetDefaultCalendarInput.kt +9 -0
  20. package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/ModifyCalendarInput.kt +10 -1
  21. package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/ModifyEvent.kt +3 -1
  22. package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/ModifyEventWithPromptInput.kt +3 -0
  23. package/android/src/main/java/dev/barooni/capacitor/calendar/models/inputs/RequestPermissionInput.kt +3 -5
  24. package/android/src/main/java/dev/barooni/capacitor/calendar/models/results/CheckAllPermissionsResult.kt +3 -2
  25. package/android/src/main/java/dev/barooni/capacitor/calendar/models/results/CreateEventResult.kt +1 -0
  26. package/android/src/main/java/dev/barooni/capacitor/calendar/models/results/CreateEventWithPromptResult.kt +1 -0
  27. package/android/src/main/java/dev/barooni/capacitor/calendar/models/results/GetDefaultCalendarResult.kt +1 -0
  28. package/android/src/main/java/dev/barooni/capacitor/calendar/models/results/ListCalendarsResult.kt +1 -0
  29. package/android/src/main/java/dev/barooni/capacitor/calendar/models/results/ListEventsInRangeResult.kt +4 -0
  30. package/android/src/main/java/dev/barooni/capacitor/calendar/models/results/RequestAllPermissionsResult.kt +1 -1
  31. package/android/src/main/java/dev/barooni/capacitor/calendar/models/templates/PluginCompletion.kt +8 -0
  32. package/android/src/main/java/dev/barooni/capacitor/calendar/utils/DeclarationCheck.kt +59 -0
  33. package/android/src/main/java/dev/barooni/capacitor/calendar/utils/ImplementationHelper.kt +468 -39
  34. package/dist/docs.json +3046 -1048
  35. package/dist/esm/definitions.d.ts +5 -5
  36. package/dist/esm/definitions.js.map +1 -1
  37. package/dist/esm/index.d.ts +72 -48
  38. package/dist/esm/index.js +18 -17
  39. package/dist/esm/index.js.map +1 -1
  40. package/dist/esm/schemas/enums/attendee-role.js.map +1 -1
  41. package/dist/esm/schemas/enums/attendee-status.js.map +1 -1
  42. package/dist/esm/schemas/enums/attendee-type.js.map +1 -1
  43. package/dist/esm/schemas/enums/calendar-permission-scope.d.ts +9 -1
  44. package/dist/esm/schemas/enums/calendar-permission-scope.js +9 -1
  45. package/dist/esm/schemas/enums/calendar-permission-scope.js.map +1 -1
  46. package/dist/esm/schemas/enums/capacitor-calendar-error-code.d.ts +13 -0
  47. package/dist/esm/schemas/enums/capacitor-calendar-error-code.js +15 -0
  48. package/dist/esm/schemas/enums/capacitor-calendar-error-code.js.map +1 -0
  49. package/dist/esm/schemas/enums/event-span.d.ts +4 -0
  50. package/dist/esm/schemas/enums/event-span.js +4 -0
  51. package/dist/esm/schemas/enums/event-span.js.map +1 -1
  52. package/dist/esm/schemas/enums/event-status.js.map +1 -1
  53. package/dist/esm/schemas/enums/reminder-recurrence-frequency.d.ts +5 -5
  54. package/dist/esm/schemas/enums/reminder-recurrence-frequency.js +5 -5
  55. package/dist/esm/schemas/enums/reminder-recurrence-frequency.js.map +1 -1
  56. package/dist/esm/schemas/interfaces/calendar-event.d.ts +145 -70
  57. package/dist/esm/schemas/interfaces/calendar-event.js.map +1 -1
  58. package/dist/esm/schemas/interfaces/calendar-source.d.ts +4 -1
  59. package/dist/esm/schemas/interfaces/calendar-source.js.map +1 -1
  60. package/dist/esm/schemas/interfaces/calendar.d.ts +22 -4
  61. package/dist/esm/schemas/interfaces/calendar.js.map +1 -1
  62. package/dist/esm/schemas/interfaces/check-permission-options.d.ts +19 -0
  63. package/dist/esm/schemas/interfaces/check-permission-options.js +2 -0
  64. package/dist/esm/schemas/interfaces/check-permission-options.js.map +1 -0
  65. package/dist/esm/schemas/interfaces/create-calendar-options.d.ts +19 -6
  66. package/dist/esm/schemas/interfaces/create-calendar-options.js.map +1 -1
  67. package/dist/esm/schemas/interfaces/create-calendar-result.d.ts +12 -0
  68. package/dist/esm/schemas/interfaces/create-calendar-result.js +2 -0
  69. package/dist/esm/schemas/interfaces/create-calendar-result.js.map +1 -0
  70. package/dist/esm/schemas/interfaces/create-event-options.d.ts +86 -51
  71. package/dist/esm/schemas/interfaces/create-event-options.js.map +1 -1
  72. package/dist/esm/schemas/interfaces/create-event-result.d.ts +22 -0
  73. package/dist/esm/schemas/interfaces/create-event-result.js +2 -0
  74. package/dist/esm/schemas/interfaces/create-event-result.js.map +1 -0
  75. package/dist/esm/schemas/interfaces/create-event-with-prompt-options.d.ts +73 -36
  76. package/dist/esm/schemas/interfaces/create-event-with-prompt-options.js.map +1 -1
  77. package/dist/esm/schemas/interfaces/create-event-with-prompt-result.d.ts +23 -0
  78. package/dist/esm/schemas/interfaces/create-event-with-prompt-result.js +2 -0
  79. package/dist/esm/schemas/interfaces/create-event-with-prompt-result.js.map +1 -0
  80. package/dist/esm/schemas/interfaces/create-reminder-options.d.ts +42 -12
  81. package/dist/esm/schemas/interfaces/create-reminder-options.js.map +1 -1
  82. package/dist/esm/schemas/interfaces/create-reminder-result.d.ts +12 -0
  83. package/dist/esm/schemas/interfaces/create-reminder-result.js +2 -0
  84. package/dist/esm/schemas/interfaces/create-reminder-result.js.map +1 -0
  85. package/dist/esm/schemas/interfaces/create-reminders-list-options.d.ts +46 -0
  86. package/dist/esm/schemas/interfaces/create-reminders-list-options.js +2 -0
  87. package/dist/esm/schemas/interfaces/create-reminders-list-options.js.map +1 -0
  88. package/dist/esm/schemas/interfaces/create-reminders-list-result.d.ts +12 -0
  89. package/dist/esm/schemas/interfaces/create-reminders-list-result.js +2 -0
  90. package/dist/esm/schemas/interfaces/create-reminders-list-result.js.map +1 -0
  91. package/dist/esm/schemas/interfaces/delete-calendar-options.d.ts +1 -0
  92. package/dist/esm/schemas/interfaces/delete-calendar-options.js.map +1 -1
  93. package/dist/esm/schemas/interfaces/delete-event-options.d.ts +29 -4
  94. package/dist/esm/schemas/interfaces/delete-event-options.js.map +1 -1
  95. package/dist/esm/schemas/interfaces/delete-event-with-prompt-options.d.ts +39 -14
  96. package/dist/esm/schemas/interfaces/delete-event-with-prompt-options.js.map +1 -1
  97. package/dist/esm/schemas/interfaces/delete-events-by-id-options.d.ts +16 -4
  98. package/dist/esm/schemas/interfaces/delete-events-by-id-options.js.map +1 -1
  99. package/dist/esm/schemas/interfaces/delete-reminder-options.d.ts +10 -0
  100. package/dist/esm/schemas/interfaces/delete-reminder-options.js.map +1 -1
  101. package/dist/esm/schemas/interfaces/delete-reminder-with-prompt-result.d.ts +12 -0
  102. package/dist/esm/schemas/interfaces/delete-reminder-with-prompt-result.js +2 -0
  103. package/dist/esm/schemas/interfaces/delete-reminder-with-prompt-result.js.map +1 -0
  104. package/dist/esm/schemas/interfaces/delete-reminders-by-id-result.d.ts +13 -0
  105. package/dist/esm/schemas/interfaces/delete-reminders-by-id-result.js +2 -0
  106. package/dist/esm/schemas/interfaces/delete-reminders-by-id-result.js.map +1 -0
  107. package/dist/esm/schemas/interfaces/delete-reminders-list-options.d.ts +23 -0
  108. package/dist/esm/schemas/interfaces/delete-reminders-list-options.js +2 -0
  109. package/dist/esm/schemas/interfaces/delete-reminders-list-options.js.map +1 -0
  110. package/dist/esm/schemas/interfaces/event-recurrence-rule.d.ts +96 -0
  111. package/dist/esm/schemas/interfaces/event-recurrence-rule.js +2 -0
  112. package/dist/esm/schemas/interfaces/event-recurrence-rule.js.map +1 -0
  113. package/dist/esm/schemas/interfaces/fetch-all-calendar-sources-result.d.ts +13 -0
  114. package/dist/esm/schemas/interfaces/fetch-all-calendar-sources-result.js +2 -0
  115. package/dist/esm/schemas/interfaces/fetch-all-calendar-sources-result.js.map +1 -0
  116. package/dist/esm/schemas/interfaces/get-default-calendar-options.d.ts +13 -0
  117. package/dist/esm/schemas/interfaces/get-default-calendar-options.js +2 -0
  118. package/dist/esm/schemas/interfaces/get-default-calendar-options.js.map +1 -0
  119. package/dist/esm/schemas/interfaces/get-default-reminders-list-result.d.ts +13 -0
  120. package/dist/esm/schemas/interfaces/get-default-reminders-list-result.js +2 -0
  121. package/dist/esm/schemas/interfaces/get-default-reminders-list-result.js.map +1 -0
  122. package/dist/esm/schemas/interfaces/get-reminder-by-id-result.d.ts +13 -0
  123. package/dist/esm/schemas/interfaces/get-reminder-by-id-result.js +2 -0
  124. package/dist/esm/schemas/interfaces/get-reminder-by-id-result.js.map +1 -0
  125. package/dist/esm/schemas/interfaces/get-reminders-from-lists-result.d.ts +13 -0
  126. package/dist/esm/schemas/interfaces/get-reminders-from-lists-result.js +2 -0
  127. package/dist/esm/schemas/interfaces/get-reminders-from-lists-result.js.map +1 -0
  128. package/dist/esm/schemas/interfaces/get-reminders-lists-result.d.ts +13 -0
  129. package/dist/esm/schemas/interfaces/get-reminders-lists-result.js +2 -0
  130. package/dist/esm/schemas/interfaces/get-reminders-lists-result.js.map +1 -0
  131. package/dist/esm/schemas/interfaces/list-calendars-result.d.ts +13 -0
  132. package/dist/esm/schemas/interfaces/list-calendars-result.js +2 -0
  133. package/dist/esm/schemas/interfaces/list-calendars-result.js.map +1 -0
  134. package/dist/esm/schemas/interfaces/list-events-in-range-options.d.ts +7 -2
  135. package/dist/esm/schemas/interfaces/list-events-in-range-options.js.map +1 -1
  136. package/dist/esm/schemas/interfaces/list-events-in-range-result.d.ts +13 -0
  137. package/dist/esm/schemas/interfaces/list-events-in-range-result.js +2 -0
  138. package/dist/esm/schemas/interfaces/list-events-in-range-result.js.map +1 -0
  139. package/dist/esm/schemas/interfaces/modify-calendar-options.d.ts +13 -2
  140. package/dist/esm/schemas/interfaces/modify-calendar-options.js.map +1 -1
  141. package/dist/esm/schemas/interfaces/modify-event-options.d.ts +61 -44
  142. package/dist/esm/schemas/interfaces/modify-event-options.js.map +1 -1
  143. package/dist/esm/schemas/interfaces/modify-event-with-prompt-options.d.ts +77 -2
  144. package/dist/esm/schemas/interfaces/modify-event-with-prompt-options.js.map +1 -1
  145. package/dist/esm/schemas/interfaces/modify-reminder-options.d.ts +77 -13
  146. package/dist/esm/schemas/interfaces/modify-reminder-options.js.map +1 -1
  147. package/dist/esm/schemas/interfaces/open-calendar-options.d.ts +5 -1
  148. package/dist/esm/schemas/interfaces/open-calendar-options.js.map +1 -1
  149. package/dist/esm/schemas/interfaces/recurrence-rule.d.ts +8 -2
  150. package/dist/esm/schemas/interfaces/recurrence-rule.js.map +1 -1
  151. package/dist/esm/schemas/interfaces/reminder-recurrence-rule.d.ts +1 -1
  152. package/dist/esm/schemas/interfaces/reminder-recurrence-rule.js.map +1 -1
  153. package/dist/esm/schemas/interfaces/reminder.d.ts +4 -1
  154. package/dist/esm/schemas/interfaces/reminder.js.map +1 -1
  155. package/dist/esm/schemas/interfaces/reminders-list.d.ts +8 -2
  156. package/dist/esm/schemas/interfaces/reminders-list.js.map +1 -1
  157. package/dist/esm/schemas/interfaces/request-permission-options.d.ts +16 -0
  158. package/dist/esm/schemas/interfaces/request-permission-options.js +2 -0
  159. package/dist/esm/schemas/interfaces/request-permission-options.js.map +1 -0
  160. package/dist/esm/schemas/interfaces/select-calendars-with-prompt-options.d.ts +1 -1
  161. package/dist/esm/schemas/interfaces/select-calendars-with-prompt-options.js.map +1 -1
  162. package/dist/esm/schemas/interfaces/select-calendars-with-prompt-result.d.ts +14 -0
  163. package/dist/esm/schemas/interfaces/select-calendars-with-prompt-result.js +2 -0
  164. package/dist/esm/schemas/interfaces/select-calendars-with-prompt-result.js.map +1 -0
  165. package/dist/esm/schemas/interfaces/update-reminders-list-options.d.ts +43 -0
  166. package/dist/esm/schemas/interfaces/update-reminders-list-options.js +2 -0
  167. package/dist/esm/schemas/interfaces/update-reminders-list-options.js.map +1 -0
  168. package/dist/esm/schemas/interfaces/update-reminders-list-result.d.ts +12 -0
  169. package/dist/esm/schemas/interfaces/update-reminders-list-result.js +2 -0
  170. package/dist/esm/schemas/interfaces/update-reminders-list-result.js.map +1 -0
  171. package/dist/esm/schemas/types/event-edit-action.d.ts +1 -1
  172. package/dist/esm/schemas/types/event-edit-action.js.map +1 -1
  173. package/dist/esm/schemas/types/recurrence-frequency.d.ts +4 -0
  174. package/dist/esm/schemas/types/recurrence-frequency.js +2 -0
  175. package/dist/esm/schemas/types/recurrence-frequency.js.map +1 -0
  176. package/dist/esm/schemas/types/system-color-name.d.ts +6 -0
  177. package/dist/esm/schemas/types/system-color-name.js +2 -0
  178. package/dist/esm/schemas/types/system-color-name.js.map +1 -0
  179. package/dist/esm/sub-definitions/calendar-access.d.ts +26 -14
  180. package/dist/esm/sub-definitions/calendar-access.js.map +1 -1
  181. package/dist/esm/sub-definitions/calendar-operations.d.ts +68 -21
  182. package/dist/esm/sub-definitions/calendar-operations.js.map +1 -1
  183. package/dist/esm/sub-definitions/event-operations.d.ts +46 -25
  184. package/dist/esm/sub-definitions/event-operations.js.map +1 -1
  185. package/dist/esm/sub-definitions/reminders-access.d.ts +6 -2
  186. package/dist/esm/sub-definitions/reminders-access.js.map +1 -1
  187. package/dist/esm/sub-definitions/reminders-operations.d.ts +78 -43
  188. package/dist/esm/sub-definitions/reminders-operations.js.map +1 -1
  189. package/dist/esm/web/download-ics-file.d.ts +18 -0
  190. package/dist/esm/web/download-ics-file.js +33 -0
  191. package/dist/esm/web/download-ics-file.js.map +1 -0
  192. package/dist/esm/web/ics.d.ts +27 -0
  193. package/dist/esm/web/ics.js +294 -0
  194. package/dist/esm/web/ics.js.map +1 -0
  195. package/dist/esm/web.d.ts +70 -82
  196. package/dist/esm/web.js +121 -6
  197. package/dist/esm/web.js.map +1 -1
  198. package/dist/plugin.cjs.js +479 -35
  199. package/dist/plugin.cjs.js.map +1 -1
  200. package/dist/plugin.js +479 -35
  201. package/dist/plugin.js.map +1 -1
  202. package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/CapacitorCalendarPlugin.swift +190 -77
  203. package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Implementation/CapacitorCalendar.swift +203 -110
  204. package/ios/Plugin/Info.plist +24 -0
  205. package/ios/Plugin/Models/Enums/EventSpan.swift +8 -0
  206. package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/CreateCalendarInput.swift +6 -4
  207. package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/CreateEventInput.swift +25 -21
  208. package/ios/Plugin/Models/Inputs/CreateEventWithPromptInput.swift +171 -0
  209. package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/CreateReminderInput.swift +14 -4
  210. package/ios/Plugin/Models/Inputs/CreateRemindersListInput.swift +43 -0
  211. package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/DeleteCalendarInput.swift +1 -1
  212. package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/DeleteEventInput.swift +9 -4
  213. package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/DeleteEventWithPromptInput.swift +9 -4
  214. package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/DeleteEventsByIdInput.swift +9 -4
  215. package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/DeleteReminderInput.swift +7 -1
  216. package/ios/Plugin/Models/Inputs/DeleteRemindersListInput.swift +22 -0
  217. package/ios/Plugin/Models/Inputs/GetDefaultCalendarInput.swift +13 -0
  218. package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/ModifyCalendarInput.swift +6 -3
  219. package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/ModifyEventInput.swift +63 -41
  220. package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/ModifyReminderInput.swift +66 -5
  221. package/ios/Plugin/Models/Inputs/UpdateRemindersListInput.swift +41 -0
  222. package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Results/CreateEventResult.swift +1 -0
  223. package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Results/CreateEventWithPromptResult.swift +1 -0
  224. package/ios/Plugin/Models/Results/CreateRemindersListResult.swift +15 -0
  225. package/ios/Plugin/Models/Results/ListEventsInRangeResult.swift +29 -0
  226. package/ios/Plugin/Models/Results/UpdateRemindersListResult.swift +15 -0
  227. package/ios/Plugin/Models/Structs/RecurrenceInput.swift +41 -0
  228. package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/PluginConfig.swift +30 -27
  229. package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/PluginError.swift +87 -56
  230. package/ios/Plugin/Utils/DeclarationCheck.swift +63 -0
  231. package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Utils/ImplementationHelper.swift +140 -24
  232. package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Utils/UIColorFromHexExtension.swift +5 -0
  233. package/package.json +36 -43
  234. package/dist/esm/schemas/enums/recurrence-frequency.d.ts +0 -21
  235. package/dist/esm/schemas/enums/recurrence-frequency.js +0 -23
  236. package/dist/esm/schemas/enums/recurrence-frequency.js.map +0 -1
  237. package/ios/Sources/CapacitorCalendarPlugin/Models/Inputs/CreateEventWithPromptInput.swift +0 -89
  238. package/ios/Sources/CapacitorCalendarPlugin/Models/Results/ListEventsInRangeResult.swift +0 -16
  239. package/ios/Tests/CapacitorCalendarPluginTests/CapacitorCalendarPluginTests.swift +0 -15
  240. /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Enums/CAPPermissionState.swift +0 -0
  241. /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Enums/CalendarPermissionScope.swift +0 -0
  242. /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Enums/EventEditAction.swift +0 -0
  243. /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/CheckPermissionInput.swift +0 -0
  244. /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/DeleteReminderWithPromptInput.swift +0 -0
  245. /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/DeleteRemindersByIdInput.swift +0 -0
  246. /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/GetReminderByIdInput.swift +0 -0
  247. /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/GetRemindersFromListsInput.swift +0 -0
  248. /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/ListEventsInRangeInput.swift +0 -0
  249. /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/ModifyEventWithPromptInput.swift +0 -0
  250. /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/OpenCalendarInput.swift +0 -0
  251. /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/RequestPermissionInput.swift +0 -0
  252. /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Inputs/SelectCalendarsWithPromptInput.swift +0 -0
  253. /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Results/CheckAllPermissionsResult.swift +0 -0
  254. /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Results/CheckPermissionResult.swift +0 -0
  255. /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Results/CreateCalendarResult.swift +0 -0
  256. /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Results/CreateReminderResult.swift +0 -0
  257. /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Results/DeleteEventWithPromptResult.swift +0 -0
  258. /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Results/DeleteEventsByIdResult.swift +0 -0
  259. /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Results/DeleteRemindersByIdResult.swift +0 -0
  260. /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Results/FetchAllCalendarSourcesResult.swift +0 -0
  261. /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Results/GetDefaultCalendarResult.swift +0 -0
  262. /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Results/GetReminderByIdResult.swift +0 -0
  263. /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Results/GetRemindersFromListsResult.swift +0 -0
  264. /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Results/ListCalendarsResult.swift +0 -0
  265. /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Results/ModifyEventWithPromptResult.swift +0 -0
  266. /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Results/RequestAllPermissionsResult.swift +0 -0
  267. /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Results/RequestPermissionResult.swift +0 -0
  268. /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Results/SelectCalendarsWithPromptResult.swift +0 -0
  269. /package/ios/{Sources/CapacitorCalendarPlugin → Plugin}/Models/Templates/JSResult.swift +0 -0
package/dist/esm/web.d.ts CHANGED
@@ -1,49 +1,64 @@
1
- import { CheckAllPermissionsResult, RequestAllPermissionsResult } from "./sub-definitions/calendar-access";
2
- import { PermissionState, WebPlugin } from "@capacitor/core";
3
- import type { Calendar } from "./schemas/interfaces/calendar";
4
- import type { CalendarEvent } from "./schemas/interfaces/calendar-event";
5
- import { CalendarPermissionScope } from "./schemas/enums/calendar-permission-scope";
6
- import type { CalendarSource } from "./schemas/interfaces/calendar-source";
7
- import type { CapacitorCalendarPlugin } from "./definitions";
8
- import type { CreateCalendarOptions } from "./schemas/interfaces/create-calendar-options";
9
- import type { CreateEventOptions } from "./schemas/interfaces/create-event-options";
10
- import type { CreateEventWithPromptOptions } from "./schemas/interfaces/create-event-with-prompt-options";
11
- import type { CreateReminderOptions } from "./schemas/interfaces/create-reminder-options";
12
- import type { DeleteCalendarOptions } from "./schemas/interfaces/delete-calendar-options";
13
- import type { DeleteEventOptions } from "./schemas/interfaces/delete-event-options";
14
- import type { DeleteEventWithPromptOptions } from "./schemas/interfaces/delete-event-with-prompt-options";
15
- import type { DeleteEventsByIdOptions } from "./schemas/interfaces/delete-events-by-id-options";
16
- import type { DeleteEventsByIdResult } from "./sub-definitions/event-operations";
17
- import type { DeleteReminderOptions } from "./schemas/interfaces/delete-reminder-options";
18
- import type { DeleteReminderWithPromptOptions } from "./schemas/interfaces/delete-reminder-with-prompt-options";
19
- import type { DeleteRemindersByIdOptions } from "./schemas/interfaces/delete-reminders-by-id-options";
20
- import type { DeleteRemindersByIdResult } from "./sub-definitions/reminders-operations";
21
- import type { EventEditAction } from "./schemas/types/event-edit-action";
22
- import type { GetReminderByIdOptions } from "./schemas/interfaces/get-reminder-by-id-options";
23
- import type { GetRemindersFromListsOptions } from "./schemas/interfaces/get-reminders-from-lists-options";
24
- import type { ListEventsInRangeOptions } from "./schemas/interfaces/list-events-in-range-options";
25
- import type { ModifyCalendarOptions } from "./schemas/interfaces/modify-calendar-options";
26
- import type { ModifyEventOptions } from "./schemas/interfaces/modify-event-options";
27
- import type { ModifyEventWithPromptOptions } from "./schemas/interfaces/modify-event-with-prompt-options";
28
- import type { ModifyReminderOptions } from "./schemas/interfaces/modify-reminder-options";
29
- import type { OpenCalendarOptions } from "./schemas/interfaces/open-calendar-options";
30
- import type { Reminder } from "./schemas/interfaces/reminder";
31
- import type { RemindersList } from "./schemas/interfaces/reminders-list";
32
- import type { SelectCalendarsWithPromptOptions } from "./schemas/interfaces/select-calendars-with-prompt-options";
1
+ import type { PermissionState } from '@capacitor/core';
2
+ import { WebPlugin } from '@capacitor/core';
3
+ import type { CapacitorCalendarPlugin } from './definitions';
4
+ import type { Calendar } from './schemas/interfaces/calendar';
5
+ import type { CheckPermissionOptions } from './schemas/interfaces/check-permission-options';
6
+ import type { CreateCalendarOptions } from './schemas/interfaces/create-calendar-options';
7
+ import type { CreateCalendarResult } from './schemas/interfaces/create-calendar-result';
8
+ import type { CreateEventOptions } from './schemas/interfaces/create-event-options';
9
+ import type { CreateEventResult } from './schemas/interfaces/create-event-result';
10
+ import type { CreateEventWithPromptOptions } from './schemas/interfaces/create-event-with-prompt-options';
11
+ import type { CreateEventWithPromptResult } from './schemas/interfaces/create-event-with-prompt-result';
12
+ import type { CreateReminderOptions } from './schemas/interfaces/create-reminder-options';
13
+ import type { CreateReminderResult } from './schemas/interfaces/create-reminder-result';
14
+ import type { CreateRemindersListOptions } from './schemas/interfaces/create-reminders-list-options';
15
+ import type { CreateRemindersListResult } from './schemas/interfaces/create-reminders-list-result';
16
+ import type { DeleteCalendarOptions } from './schemas/interfaces/delete-calendar-options';
17
+ import type { DeleteEventOptions } from './schemas/interfaces/delete-event-options';
18
+ import type { DeleteEventWithPromptOptions } from './schemas/interfaces/delete-event-with-prompt-options';
19
+ import type { DeleteEventsByIdOptions } from './schemas/interfaces/delete-events-by-id-options';
20
+ import type { DeleteReminderOptions } from './schemas/interfaces/delete-reminder-options';
21
+ import type { DeleteReminderWithPromptOptions } from './schemas/interfaces/delete-reminder-with-prompt-options';
22
+ import type { DeleteReminderWithPromptResult } from './schemas/interfaces/delete-reminder-with-prompt-result';
23
+ import type { DeleteRemindersByIdOptions } from './schemas/interfaces/delete-reminders-by-id-options';
24
+ import type { DeleteRemindersByIdResult } from './schemas/interfaces/delete-reminders-by-id-result';
25
+ import type { DeleteRemindersListOptions } from './schemas/interfaces/delete-reminders-list-options';
26
+ import type { FetchAllCalendarSourcesResult } from './schemas/interfaces/fetch-all-calendar-sources-result';
27
+ import type { GetDefaultCalendarOptions } from './schemas/interfaces/get-default-calendar-options';
28
+ import type { GetDefaultRemindersListResult } from './schemas/interfaces/get-default-reminders-list-result';
29
+ import type { GetReminderByIdOptions } from './schemas/interfaces/get-reminder-by-id-options';
30
+ import type { GetReminderByIdResult } from './schemas/interfaces/get-reminder-by-id-result';
31
+ import type { GetRemindersFromListsOptions } from './schemas/interfaces/get-reminders-from-lists-options';
32
+ import type { GetRemindersFromListsResult } from './schemas/interfaces/get-reminders-from-lists-result';
33
+ import type { GetRemindersListsResult } from './schemas/interfaces/get-reminders-lists-result';
34
+ import type { ListCalendarsResult } from './schemas/interfaces/list-calendars-result';
35
+ import type { ListEventsInRangeOptions } from './schemas/interfaces/list-events-in-range-options';
36
+ import type { ListEventsInRangeResult } from './schemas/interfaces/list-events-in-range-result';
37
+ import type { ModifyCalendarOptions } from './schemas/interfaces/modify-calendar-options';
38
+ import type { ModifyEventOptions } from './schemas/interfaces/modify-event-options';
39
+ import type { ModifyEventWithPromptOptions } from './schemas/interfaces/modify-event-with-prompt-options';
40
+ import type { ModifyReminderOptions } from './schemas/interfaces/modify-reminder-options';
41
+ import type { OpenCalendarOptions } from './schemas/interfaces/open-calendar-options';
42
+ import type { RequestPermissionOptions } from './schemas/interfaces/request-permission-options';
43
+ import type { SelectCalendarsWithPromptOptions } from './schemas/interfaces/select-calendars-with-prompt-options';
44
+ import type { SelectCalendarsWithPromptResult } from './schemas/interfaces/select-calendars-with-prompt-result';
45
+ import type { UpdateRemindersListOptions } from './schemas/interfaces/update-reminders-list-options';
46
+ import type { UpdateRemindersListResult } from './schemas/interfaces/update-reminders-list-result';
47
+ import type { EventEditAction } from './schemas/types/event-edit-action';
48
+ import type { CheckAllPermissionsResult, RequestAllPermissionsResult } from './sub-definitions/calendar-access';
49
+ import type { DeleteEventsByIdResult } from './sub-definitions/event-operations';
33
50
  export declare class CapacitorCalendarWeb extends WebPlugin implements CapacitorCalendarPlugin {
34
- checkPermission(_options: {
35
- scope: CalendarPermissionScope;
36
- }): Promise<{
51
+ checkPermission(_options: CheckPermissionOptions): Promise<{
37
52
  result: PermissionState;
38
53
  }>;
39
54
  checkAllPermissions(): Promise<{
40
55
  result: CheckAllPermissionsResult;
41
56
  }>;
42
- requestPermission(_options: {
43
- scope: CalendarPermissionScope;
44
- }): Promise<{
57
+ requestPermission(_options: RequestPermissionOptions): Promise<{
45
58
  result: PermissionState;
46
59
  }>;
60
+ createRemindersList(_options: CreateRemindersListOptions): Promise<CreateRemindersListResult>;
61
+ deleteRemindersList(_options: DeleteRemindersListOptions): Promise<void>;
47
62
  requestAllPermissions(): Promise<{
48
63
  result: RequestAllPermissionsResult;
49
64
  }>;
@@ -59,58 +74,34 @@ export declare class CapacitorCalendarWeb extends WebPlugin implements Capacitor
59
74
  requestFullRemindersAccess(): Promise<{
60
75
  result: PermissionState;
61
76
  }>;
62
- createEventWithPrompt(_options: CreateEventWithPromptOptions): Promise<{
63
- id: string | null;
64
- }>;
77
+ createEventWithPrompt(options?: CreateEventWithPromptOptions): Promise<CreateEventWithPromptResult>;
65
78
  modifyEventWithPrompt(_options: ModifyEventWithPromptOptions): Promise<{
66
79
  result: EventEditAction | null;
67
80
  }>;
68
- createEvent(_options: CreateEventOptions): Promise<{
69
- id: string;
70
- }>;
81
+ createEvent(options: CreateEventOptions): Promise<CreateEventResult>;
71
82
  commit(): Promise<void>;
72
83
  modifyEvent(_options: ModifyEventOptions): Promise<void>;
73
- selectCalendarsWithPrompt(_options?: SelectCalendarsWithPromptOptions): Promise<{
74
- result: Calendar[];
75
- }>;
76
- fetchAllCalendarSources(): Promise<{
77
- result: CalendarSource[];
78
- }>;
79
- listCalendars(): Promise<{
80
- result: Calendar[];
81
- }>;
82
- fetchAllRemindersSources(): Promise<{
83
- result: CalendarSource[];
84
- }>;
85
- getDefaultCalendar(): Promise<{
84
+ selectCalendarsWithPrompt(_options?: SelectCalendarsWithPromptOptions): Promise<SelectCalendarsWithPromptResult>;
85
+ fetchAllCalendarSources(): Promise<FetchAllCalendarSourcesResult>;
86
+ listCalendars(): Promise<ListCalendarsResult>;
87
+ fetchAllRemindersSources(): Promise<FetchAllCalendarSourcesResult>;
88
+ getDefaultCalendar(_options?: GetDefaultCalendarOptions): Promise<{
86
89
  result: Calendar | null;
87
90
  }>;
88
- getDefaultRemindersList(): Promise<{
89
- result: RemindersList | null;
90
- }>;
91
+ getDefaultRemindersList(): Promise<GetDefaultRemindersListResult>;
91
92
  openReminders(): Promise<void>;
92
- getRemindersLists(): Promise<{
93
- result: RemindersList[];
94
- }>;
95
- openCalendar(_options: OpenCalendarOptions): Promise<void>;
96
- createCalendar(_options: CreateCalendarOptions): Promise<{
97
- id: string;
98
- }>;
93
+ getRemindersLists(): Promise<GetRemindersListsResult>;
94
+ openCalendar(_options?: OpenCalendarOptions): Promise<void>;
95
+ createCalendar(_options: CreateCalendarOptions): Promise<CreateCalendarResult>;
99
96
  deleteCalendar(_options: DeleteCalendarOptions): Promise<void>;
100
- createReminder(_options: CreateReminderOptions): Promise<{
101
- id: string;
102
- }>;
97
+ createReminder(_options: CreateReminderOptions): Promise<CreateReminderResult>;
103
98
  deleteRemindersById(_options: DeleteRemindersByIdOptions): Promise<{
104
99
  result: DeleteRemindersByIdResult;
105
100
  }>;
106
101
  deleteReminder(_options: DeleteReminderOptions): Promise<void>;
107
102
  modifyReminder(_options: ModifyReminderOptions): Promise<void>;
108
- getReminderById(_options: GetReminderByIdOptions): Promise<{
109
- result: Reminder | null;
110
- }>;
111
- getRemindersFromLists(_options: GetRemindersFromListsOptions): Promise<{
112
- result: Reminder[];
113
- }>;
103
+ getReminderById(_options: GetReminderByIdOptions): Promise<GetReminderByIdResult>;
104
+ getRemindersFromLists(_options: GetRemindersFromListsOptions): Promise<GetRemindersFromListsResult>;
114
105
  deleteEventsById(_options: DeleteEventsByIdOptions): Promise<{
115
106
  result: DeleteEventsByIdResult;
116
107
  }>;
@@ -118,12 +109,9 @@ export declare class CapacitorCalendarWeb extends WebPlugin implements Capacitor
118
109
  deleteEventWithPrompt(_options: DeleteEventWithPromptOptions): Promise<{
119
110
  deleted: boolean;
120
111
  }>;
121
- listEventsInRange(_options: ListEventsInRangeOptions): Promise<{
122
- result: CalendarEvent[];
123
- }>;
112
+ listEventsInRange(_options: ListEventsInRangeOptions): Promise<ListEventsInRangeResult>;
124
113
  modifyCalendar(_options: ModifyCalendarOptions): Promise<void>;
125
- deleteReminderWithPrompt(_options: DeleteReminderWithPromptOptions): Promise<{
126
- deleted: boolean;
127
- }>;
114
+ deleteReminderWithPrompt(_options: DeleteReminderWithPromptOptions): Promise<DeleteReminderWithPromptResult>;
115
+ updateRemindersList(_options: UpdateRemindersListOptions): Promise<UpdateRemindersListResult>;
128
116
  private throwUnimplemented;
129
117
  }
package/dist/esm/web.js CHANGED
@@ -1,4 +1,7 @@
1
- import { WebPlugin } from "@capacitor/core";
1
+ import { WebPlugin } from '@capacitor/core';
2
+ import { downloadIcsFile } from './web/download-ics-file';
3
+ import { buildEventIcs, resolveEndDate, resolveIcsFileName } from './web/ics';
4
+ const DAY_MS = 24 * 60 * 60 * 1000;
2
5
  export class CapacitorCalendarWeb extends WebPlugin {
3
6
  checkPermission(_options) {
4
7
  return this.throwUnimplemented(this.checkPermission.name);
@@ -9,6 +12,12 @@ export class CapacitorCalendarWeb extends WebPlugin {
9
12
  requestPermission(_options) {
10
13
  return this.throwUnimplemented(this.requestPermission.name);
11
14
  }
15
+ createRemindersList(_options) {
16
+ return this.throwUnimplemented(this.createRemindersList.name);
17
+ }
18
+ deleteRemindersList(_options) {
19
+ return this.throwUnimplemented(this.deleteRemindersList.name);
20
+ }
12
21
  requestAllPermissions() {
13
22
  return this.throwUnimplemented(this.requestAllPermissions.name);
14
23
  }
@@ -24,14 +33,45 @@ export class CapacitorCalendarWeb extends WebPlugin {
24
33
  requestFullRemindersAccess() {
25
34
  return this.throwUnimplemented(this.requestFullRemindersAccess.name);
26
35
  }
27
- createEventWithPrompt(_options) {
28
- return this.throwUnimplemented(this.createEventWithPrompt.name);
36
+ async createEventWithPrompt(options = {}) {
37
+ try {
38
+ const confirmed = window.confirm(buildCreateEventConfirmMessage(options));
39
+ if (!confirmed) {
40
+ return { id: null, ics: null };
41
+ }
42
+ const createOptions = mapPromptOptionsToCreateEvent(options);
43
+ const content = buildEventIcs(createOptions);
44
+ const ics = new File([content], resolveIcsFileName(createOptions), {
45
+ type: 'text/calendar;charset=utf-8',
46
+ });
47
+ if (options.autoDownloadIcsFile !== false) {
48
+ await downloadIcsFile(ics);
49
+ }
50
+ return { id: null, ics };
51
+ }
52
+ catch (error) {
53
+ const message = error instanceof Error ? error.message : String(error);
54
+ return Promise.reject(new Error(message));
55
+ }
29
56
  }
30
57
  modifyEventWithPrompt(_options) {
31
58
  return this.throwUnimplemented(this.modifyEventWithPrompt.name);
32
59
  }
33
- createEvent(_options) {
34
- return this.throwUnimplemented(this.createEvent.name);
60
+ async createEvent(options) {
61
+ try {
62
+ const content = buildEventIcs(options);
63
+ const ics = new File([content], resolveIcsFileName(options), {
64
+ type: 'text/calendar;charset=utf-8',
65
+ });
66
+ if (options.autoDownloadIcsFile === true) {
67
+ await downloadIcsFile(ics);
68
+ }
69
+ return { id: null, ics };
70
+ }
71
+ catch (error) {
72
+ const message = error instanceof Error ? error.message : String(error);
73
+ return Promise.reject(new Error(message));
74
+ }
35
75
  }
36
76
  commit() {
37
77
  return this.throwUnimplemented(this.commit.name);
@@ -51,7 +91,7 @@ export class CapacitorCalendarWeb extends WebPlugin {
51
91
  fetchAllRemindersSources() {
52
92
  return this.throwUnimplemented(this.fetchAllRemindersSources.name);
53
93
  }
54
- getDefaultCalendar() {
94
+ getDefaultCalendar(_options) {
55
95
  return this.throwUnimplemented(this.getDefaultCalendar.name);
56
96
  }
57
97
  getDefaultRemindersList() {
@@ -108,8 +148,83 @@ export class CapacitorCalendarWeb extends WebPlugin {
108
148
  deleteReminderWithPrompt(_options) {
109
149
  return this.throwUnimplemented(this.deleteReminderWithPrompt.name);
110
150
  }
151
+ updateRemindersList(_options) {
152
+ return this.throwUnimplemented(this.updateRemindersList.name);
153
+ }
111
154
  throwUnimplemented(methodName) {
112
155
  return Promise.reject(this.unimplemented(`${methodName} is not implemented on the web.`));
113
156
  }
114
157
  }
158
+ function mapPromptOptionsToCreateEvent(options) {
159
+ var _a;
160
+ return {
161
+ alerts: options.alerts,
162
+ availability: options.availability,
163
+ description: options.description,
164
+ endDate: options.endDate,
165
+ icsFileName: options.icsFileName,
166
+ isAllDay: options.isAllDay,
167
+ location: options.location,
168
+ recurrence: options.recurrence,
169
+ startDate: options.startDate,
170
+ title: (_a = options.title) !== null && _a !== void 0 ? _a : '',
171
+ url: options.url,
172
+ };
173
+ }
174
+ function buildCreateEventConfirmMessage(options) {
175
+ var _a;
176
+ const custom = (_a = options.promptMessage) === null || _a === void 0 ? void 0 : _a.trim();
177
+ if (custom != null && custom.length > 0) {
178
+ return custom;
179
+ }
180
+ const title = normalizeConfirmTitle(options.title);
181
+ const timeSummary = formatEventTimeSummary(options);
182
+ return `Create event?\n\n${title}\n${timeSummary}`;
183
+ }
184
+ function normalizeConfirmTitle(title) {
185
+ const collapsed = (title !== null && title !== void 0 ? title : '')
186
+ .replace(/[\r\n]+/g, ' ')
187
+ .replace(/\s+/g, ' ')
188
+ .trim();
189
+ return collapsed.length > 0 ? collapsed : 'Untitled event';
190
+ }
191
+ function formatEventTimeSummary(options) {
192
+ var _a;
193
+ const startDate = (_a = options.startDate) !== null && _a !== void 0 ? _a : Date.now();
194
+ const isAllDay = options.isAllDay === true;
195
+ const endDate = resolveEndDate(startDate, options.endDate, undefined, isAllDay);
196
+ if (isAllDay) {
197
+ const startDay = formatLocalDate(startDate);
198
+ const lastInclusiveMs = endDate - DAY_MS;
199
+ const lastDay = formatLocalDate(lastInclusiveMs);
200
+ if (lastDay <= startDay) {
201
+ return `All day · ${formatDisplayDate(startDate)}`;
202
+ }
203
+ return `All day · ${formatDisplayDate(startDate)} – ${formatDisplayDate(lastInclusiveMs)}`;
204
+ }
205
+ return `${formatDisplayDateTime(startDate)} – ${formatDisplayDateTime(endDate)}`;
206
+ }
207
+ function formatLocalDate(ms) {
208
+ const date = new Date(ms);
209
+ const fullYear = date.getFullYear();
210
+ const month = String(date.getMonth() + 1).padStart(2, '0');
211
+ const dayOfMonth = String(date.getDate()).padStart(2, '0');
212
+ return `${fullYear}-${month}-${dayOfMonth}`;
213
+ }
214
+ function formatDisplayDate(ms) {
215
+ return new Date(ms).toLocaleDateString(undefined, {
216
+ year: 'numeric',
217
+ month: 'short',
218
+ day: 'numeric',
219
+ });
220
+ }
221
+ function formatDisplayDateTime(ms) {
222
+ return new Date(ms).toLocaleString(undefined, {
223
+ year: 'numeric',
224
+ month: 'short',
225
+ day: 'numeric',
226
+ hour: 'numeric',
227
+ minute: '2-digit',
228
+ });
229
+ }
115
230
  //# sourceMappingURL=web.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAIA,OAAO,EAAmB,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAgC7D,MAAM,OAAO,oBACX,SAAQ,SAAS;IAGV,eAAe,CAAC,QAEtB;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,qBAAqB,CAC1B,QAAsC;QAEtC,OAAO,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;IAClE,CAAC;IAEM,iBAAiB,CACtB,QAAkC;QAElC,OAAO,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC9D,CAAC;IAEM,cAAc,CAAC,QAA+B;QACnD,OAAO,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IAC3D,CAAC;IAEM,wBAAwB,CAC7B,QAAyC;QAEzC,OAAO,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC;IACrE,CAAC;IAEO,kBAAkB,CAAI,UAAkB;QAC9C,OAAO,OAAO,CAAC,MAAM,CACnB,IAAI,CAAC,aAAa,CAAC,GAAG,UAAU,iCAAiC,CAAC,CACnE,CAAC;IACJ,CAAC;CACF","sourcesContent":["import {\n CheckAllPermissionsResult,\n RequestAllPermissionsResult,\n} from \"./sub-definitions/calendar-access\";\nimport { PermissionState, WebPlugin } from \"@capacitor/core\";\nimport type { Calendar } from \"./schemas/interfaces/calendar\";\nimport type { CalendarEvent } from \"./schemas/interfaces/calendar-event\";\nimport { CalendarPermissionScope } from \"./schemas/enums/calendar-permission-scope\";\nimport type { CalendarSource } from \"./schemas/interfaces/calendar-source\";\nimport type { CapacitorCalendarPlugin } from \"./definitions\";\nimport type { CreateCalendarOptions } from \"./schemas/interfaces/create-calendar-options\";\nimport type { CreateEventOptions } from \"./schemas/interfaces/create-event-options\";\nimport type { CreateEventWithPromptOptions } from \"./schemas/interfaces/create-event-with-prompt-options\";\nimport type { CreateReminderOptions } from \"./schemas/interfaces/create-reminder-options\";\nimport type { DeleteCalendarOptions } from \"./schemas/interfaces/delete-calendar-options\";\nimport type { DeleteEventOptions } from \"./schemas/interfaces/delete-event-options\";\nimport type { DeleteEventWithPromptOptions } from \"./schemas/interfaces/delete-event-with-prompt-options\";\nimport type { DeleteEventsByIdOptions } from \"./schemas/interfaces/delete-events-by-id-options\";\nimport type { DeleteEventsByIdResult } from \"./sub-definitions/event-operations\";\nimport type { DeleteReminderOptions } from \"./schemas/interfaces/delete-reminder-options\";\nimport type { DeleteReminderWithPromptOptions } from \"./schemas/interfaces/delete-reminder-with-prompt-options\";\nimport type { DeleteRemindersByIdOptions } from \"./schemas/interfaces/delete-reminders-by-id-options\";\nimport type { DeleteRemindersByIdResult } from \"./sub-definitions/reminders-operations\";\nimport type { EventEditAction } from \"./schemas/types/event-edit-action\";\nimport type { GetReminderByIdOptions } from \"./schemas/interfaces/get-reminder-by-id-options\";\nimport type { GetRemindersFromListsOptions } from \"./schemas/interfaces/get-reminders-from-lists-options\";\nimport type { ListEventsInRangeOptions } from \"./schemas/interfaces/list-events-in-range-options\";\nimport type { ModifyCalendarOptions } from \"./schemas/interfaces/modify-calendar-options\";\nimport type { ModifyEventOptions } from \"./schemas/interfaces/modify-event-options\";\nimport type { ModifyEventWithPromptOptions } from \"./schemas/interfaces/modify-event-with-prompt-options\";\nimport type { ModifyReminderOptions } from \"./schemas/interfaces/modify-reminder-options\";\nimport type { OpenCalendarOptions } from \"./schemas/interfaces/open-calendar-options\";\nimport type { Reminder } from \"./schemas/interfaces/reminder\";\nimport type { RemindersList } from \"./schemas/interfaces/reminders-list\";\nimport type { SelectCalendarsWithPromptOptions } from \"./schemas/interfaces/select-calendars-with-prompt-options\";\n\nexport class CapacitorCalendarWeb\n extends WebPlugin\n implements CapacitorCalendarPlugin\n{\n public checkPermission(_options: {\n scope: CalendarPermissionScope;\n }): Promise<{ result: PermissionState }> {\n return this.throwUnimplemented(this.checkPermission.name);\n }\n\n public checkAllPermissions(): Promise<{ result: CheckAllPermissionsResult }> {\n return this.throwUnimplemented(this.checkAllPermissions.name);\n }\n\n public requestPermission(_options: {\n scope: CalendarPermissionScope;\n }): Promise<{ result: PermissionState }> {\n return this.throwUnimplemented(this.requestPermission.name);\n }\n\n public requestAllPermissions(): Promise<{\n result: RequestAllPermissionsResult;\n }> {\n return this.throwUnimplemented(this.requestAllPermissions.name);\n }\n\n public requestWriteOnlyCalendarAccess(): Promise<{\n result: PermissionState;\n }> {\n return this.throwUnimplemented(this.requestWriteOnlyCalendarAccess.name);\n }\n\n public requestReadOnlyCalendarAccess(): Promise<{ result: PermissionState }> {\n return this.throwUnimplemented(this.requestReadOnlyCalendarAccess.name);\n }\n\n public requestFullCalendarAccess(): Promise<{ result: PermissionState }> {\n return this.throwUnimplemented(this.requestFullCalendarAccess.name);\n }\n\n public requestFullRemindersAccess(): Promise<{ result: PermissionState }> {\n return this.throwUnimplemented(this.requestFullRemindersAccess.name);\n }\n\n public createEventWithPrompt(\n _options: CreateEventWithPromptOptions,\n ): Promise<{ id: string | null }> {\n return this.throwUnimplemented(this.createEventWithPrompt.name);\n }\n\n public modifyEventWithPrompt(\n _options: ModifyEventWithPromptOptions,\n ): Promise<{ result: EventEditAction | null }> {\n return this.throwUnimplemented(this.modifyEventWithPrompt.name);\n }\n\n public createEvent(_options: CreateEventOptions): Promise<{\n id: string;\n }> {\n return this.throwUnimplemented(this.createEvent.name);\n }\n\n public commit(): Promise<void> {\n return this.throwUnimplemented(this.commit.name);\n }\n\n public modifyEvent(_options: ModifyEventOptions): Promise<void> {\n return this.throwUnimplemented(this.modifyEvent.name);\n }\n\n public selectCalendarsWithPrompt(\n _options?: SelectCalendarsWithPromptOptions,\n ): Promise<{ result: Calendar[] }> {\n return this.throwUnimplemented(this.selectCalendarsWithPrompt.name);\n }\n\n public fetchAllCalendarSources(): Promise<{ result: CalendarSource[] }> {\n return this.throwUnimplemented(this.fetchAllCalendarSources.name);\n }\n\n public listCalendars(): Promise<{ result: Calendar[] }> {\n return this.throwUnimplemented(this.listCalendars.name);\n }\n\n public fetchAllRemindersSources(): Promise<{ result: CalendarSource[] }> {\n return this.throwUnimplemented(this.fetchAllRemindersSources.name);\n }\n\n public getDefaultCalendar(): Promise<{ result: Calendar | null }> {\n return this.throwUnimplemented(this.getDefaultCalendar.name);\n }\n\n public getDefaultRemindersList(): Promise<{ result: RemindersList | null }> {\n return this.throwUnimplemented(this.getDefaultRemindersList.name);\n }\n\n public openReminders(): Promise<void> {\n return this.throwUnimplemented(this.openReminders.name);\n }\n\n public getRemindersLists(): Promise<{ result: RemindersList[] }> {\n return this.throwUnimplemented(this.getRemindersLists.name);\n }\n\n public openCalendar(_options: OpenCalendarOptions): Promise<void> {\n return this.throwUnimplemented(this.openCalendar.name);\n }\n\n public createCalendar(\n _options: CreateCalendarOptions,\n ): Promise<{ id: string }> {\n return this.throwUnimplemented(this.createCalendar.name);\n }\n\n public deleteCalendar(_options: DeleteCalendarOptions): Promise<void> {\n return this.throwUnimplemented(this.deleteCalendar.name);\n }\n\n public createReminder(\n _options: CreateReminderOptions,\n ): Promise<{ id: string }> {\n return this.throwUnimplemented(this.createReminder.name);\n }\n\n public deleteRemindersById(\n _options: DeleteRemindersByIdOptions,\n ): Promise<{ result: DeleteRemindersByIdResult }> {\n return this.throwUnimplemented(this.deleteRemindersById.name);\n }\n\n public deleteReminder(_options: DeleteReminderOptions): Promise<void> {\n return this.throwUnimplemented(this.deleteReminder.name);\n }\n\n public modifyReminder(_options: ModifyReminderOptions): Promise<void> {\n return this.throwUnimplemented(this.modifyReminder.name);\n }\n\n public getReminderById(\n _options: GetReminderByIdOptions,\n ): Promise<{ result: Reminder | null }> {\n return this.throwUnimplemented(this.getReminderById.name);\n }\n\n public getRemindersFromLists(\n _options: GetRemindersFromListsOptions,\n ): Promise<{ result: Reminder[] }> {\n return this.throwUnimplemented(this.getRemindersFromLists.name);\n }\n\n public deleteEventsById(_options: DeleteEventsByIdOptions): Promise<{\n result: DeleteEventsByIdResult;\n }> {\n return this.throwUnimplemented(this.deleteEventsById.name);\n }\n\n public deleteEvent(_options: DeleteEventOptions): Promise<void> {\n return this.throwUnimplemented(this.deleteEvent.name);\n }\n\n public deleteEventWithPrompt(\n _options: DeleteEventWithPromptOptions,\n ): Promise<{ deleted: boolean }> {\n return this.throwUnimplemented(this.deleteEventWithPrompt.name);\n }\n\n public listEventsInRange(\n _options: ListEventsInRangeOptions,\n ): Promise<{ result: CalendarEvent[] }> {\n return this.throwUnimplemented(this.listEventsInRange.name);\n }\n\n public modifyCalendar(_options: ModifyCalendarOptions): Promise<void> {\n return this.throwUnimplemented(this.modifyCalendar.name);\n }\n\n public deleteReminderWithPrompt(\n _options: DeleteReminderWithPromptOptions,\n ): Promise<{ deleted: boolean }> {\n return this.throwUnimplemented(this.deleteReminderWithPrompt.name);\n }\n\n private throwUnimplemented<T>(methodName: string): Promise<T> {\n return Promise.reject(\n this.unimplemented(`${methodName} is not implemented on the web.`),\n );\n }\n}\n"]}
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAiD5C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE9E,MAAM,MAAM,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAEnC,MAAM,OAAO,oBAAqB,SAAQ,SAAS;IAC1C,eAAe,CAAC,QAAgC;QACrD,OAAO,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IAC5D,CAAC;IAEM,mBAAmB;QACxB,OAAO,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAChE,CAAC;IAEM,iBAAiB,CAAC,QAAkC;QACzD,OAAO,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC9D,CAAC;IAEM,mBAAmB,CAAC,QAAoC;QAC7D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AG,EAAE,SAAS;QACd,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,SAAS;KAClB,CAAC,CAAC;AACL,CAAC","sourcesContent":["import type { PermissionState } from '@capacitor/core';\nimport { WebPlugin } from '@capacitor/core';\n\nimport type { CapacitorCalendarPlugin } from './definitions';\nimport type { Calendar } from './schemas/interfaces/calendar';\nimport type { CheckPermissionOptions } from './schemas/interfaces/check-permission-options';\nimport type { CreateCalendarOptions } from './schemas/interfaces/create-calendar-options';\nimport type { CreateCalendarResult } from './schemas/interfaces/create-calendar-result';\nimport type { CreateEventOptions } from './schemas/interfaces/create-event-options';\nimport type { CreateEventResult } from './schemas/interfaces/create-event-result';\nimport type { CreateEventWithPromptOptions } from './schemas/interfaces/create-event-with-prompt-options';\nimport type { CreateEventWithPromptResult } from './schemas/interfaces/create-event-with-prompt-result';\nimport type { CreateReminderOptions } from './schemas/interfaces/create-reminder-options';\nimport type { CreateReminderResult } from './schemas/interfaces/create-reminder-result';\nimport type { CreateRemindersListOptions } from './schemas/interfaces/create-reminders-list-options';\nimport type { CreateRemindersListResult } from './schemas/interfaces/create-reminders-list-result';\nimport type { DeleteCalendarOptions } from './schemas/interfaces/delete-calendar-options';\nimport type { DeleteEventOptions } from './schemas/interfaces/delete-event-options';\nimport type { DeleteEventWithPromptOptions } from './schemas/interfaces/delete-event-with-prompt-options';\nimport type { DeleteEventsByIdOptions } from './schemas/interfaces/delete-events-by-id-options';\nimport type { DeleteReminderOptions } from './schemas/interfaces/delete-reminder-options';\nimport type { DeleteReminderWithPromptOptions } from './schemas/interfaces/delete-reminder-with-prompt-options';\nimport type { DeleteReminderWithPromptResult } from './schemas/interfaces/delete-reminder-with-prompt-result';\nimport type { DeleteRemindersByIdOptions } from './schemas/interfaces/delete-reminders-by-id-options';\nimport type { DeleteRemindersByIdResult } from './schemas/interfaces/delete-reminders-by-id-result';\nimport type { DeleteRemindersListOptions } from './schemas/interfaces/delete-reminders-list-options';\nimport type { FetchAllCalendarSourcesResult } from './schemas/interfaces/fetch-all-calendar-sources-result';\nimport type { GetDefaultCalendarOptions } from './schemas/interfaces/get-default-calendar-options';\nimport type { GetDefaultRemindersListResult } from './schemas/interfaces/get-default-reminders-list-result';\nimport type { GetReminderByIdOptions } from './schemas/interfaces/get-reminder-by-id-options';\nimport type { GetReminderByIdResult } from './schemas/interfaces/get-reminder-by-id-result';\nimport type { GetRemindersFromListsOptions } from './schemas/interfaces/get-reminders-from-lists-options';\nimport type { GetRemindersFromListsResult } from './schemas/interfaces/get-reminders-from-lists-result';\nimport type { GetRemindersListsResult } from './schemas/interfaces/get-reminders-lists-result';\nimport type { ListCalendarsResult } from './schemas/interfaces/list-calendars-result';\nimport type { ListEventsInRangeOptions } from './schemas/interfaces/list-events-in-range-options';\nimport type { ListEventsInRangeResult } from './schemas/interfaces/list-events-in-range-result';\nimport type { ModifyCalendarOptions } from './schemas/interfaces/modify-calendar-options';\nimport type { ModifyEventOptions } from './schemas/interfaces/modify-event-options';\nimport type { ModifyEventWithPromptOptions } from './schemas/interfaces/modify-event-with-prompt-options';\nimport type { ModifyReminderOptions } from './schemas/interfaces/modify-reminder-options';\nimport type { OpenCalendarOptions } from './schemas/interfaces/open-calendar-options';\nimport type { RequestPermissionOptions } from './schemas/interfaces/request-permission-options';\nimport type { SelectCalendarsWithPromptOptions } from './schemas/interfaces/select-calendars-with-prompt-options';\nimport type { SelectCalendarsWithPromptResult } from './schemas/interfaces/select-calendars-with-prompt-result';\nimport type { UpdateRemindersListOptions } from './schemas/interfaces/update-reminders-list-options';\nimport type { UpdateRemindersListResult } from './schemas/interfaces/update-reminders-list-result';\nimport type { EventEditAction } from './schemas/types/event-edit-action';\nimport type { CheckAllPermissionsResult, RequestAllPermissionsResult } from './sub-definitions/calendar-access';\nimport type { DeleteEventsByIdResult } from './sub-definitions/event-operations';\nimport { downloadIcsFile } from './web/download-ics-file';\nimport { buildEventIcs, resolveEndDate, resolveIcsFileName } from './web/ics';\n\nconst DAY_MS = 24 * 60 * 60 * 1000;\n\nexport class CapacitorCalendarWeb extends WebPlugin implements CapacitorCalendarPlugin {\n public checkPermission(_options: CheckPermissionOptions): Promise<{ result: PermissionState }> {\n return this.throwUnimplemented(this.checkPermission.name);\n }\n\n public checkAllPermissions(): Promise<{ result: CheckAllPermissionsResult }> {\n return this.throwUnimplemented(this.checkAllPermissions.name);\n }\n\n public requestPermission(_options: RequestPermissionOptions): Promise<{ result: PermissionState }> {\n return this.throwUnimplemented(this.requestPermission.name);\n }\n\n public createRemindersList(_options: CreateRemindersListOptions): Promise<CreateRemindersListResult> {\n return this.throwUnimplemented(this.createRemindersList.name);\n }\n\n public deleteRemindersList(_options: DeleteRemindersListOptions): Promise<void> {\n return this.throwUnimplemented(this.deleteRemindersList.name);\n }\n\n public requestAllPermissions(): Promise<{\n result: RequestAllPermissionsResult;\n }> {\n return this.throwUnimplemented(this.requestAllPermissions.name);\n }\n\n public requestWriteOnlyCalendarAccess(): Promise<{\n result: PermissionState;\n }> {\n return this.throwUnimplemented(this.requestWriteOnlyCalendarAccess.name);\n }\n\n public requestReadOnlyCalendarAccess(): Promise<{ result: PermissionState }> {\n return this.throwUnimplemented(this.requestReadOnlyCalendarAccess.name);\n }\n\n public requestFullCalendarAccess(): Promise<{ result: PermissionState }> {\n return this.throwUnimplemented(this.requestFullCalendarAccess.name);\n }\n\n public requestFullRemindersAccess(): Promise<{ result: PermissionState }> {\n return this.throwUnimplemented(this.requestFullRemindersAccess.name);\n }\n\n public async createEventWithPrompt(options: CreateEventWithPromptOptions = {}): Promise<CreateEventWithPromptResult> {\n try {\n const confirmed = window.confirm(buildCreateEventConfirmMessage(options));\n if (!confirmed) {\n return { id: null, ics: null };\n }\n\n const createOptions = mapPromptOptionsToCreateEvent(options);\n const content = buildEventIcs(createOptions);\n const ics = new File([content], resolveIcsFileName(createOptions), {\n type: 'text/calendar;charset=utf-8',\n });\n\n if (options.autoDownloadIcsFile !== false) {\n await downloadIcsFile(ics);\n }\n\n return { id: null, ics };\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error);\n return Promise.reject(new Error(message));\n }\n }\n\n public modifyEventWithPrompt(_options: ModifyEventWithPromptOptions): Promise<{ result: EventEditAction | null }> {\n return this.throwUnimplemented(this.modifyEventWithPrompt.name);\n }\n\n public async createEvent(options: CreateEventOptions): Promise<CreateEventResult> {\n try {\n const content = buildEventIcs(options);\n const ics = new File([content], resolveIcsFileName(options), {\n type: 'text/calendar;charset=utf-8',\n });\n if (options.autoDownloadIcsFile === true) {\n await downloadIcsFile(ics);\n }\n return { id: null, ics };\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error);\n return Promise.reject(new Error(message));\n }\n }\n\n public commit(): Promise<void> {\n return this.throwUnimplemented(this.commit.name);\n }\n\n public modifyEvent(_options: ModifyEventOptions): Promise<void> {\n return this.throwUnimplemented(this.modifyEvent.name);\n }\n\n public selectCalendarsWithPrompt(\n _options?: SelectCalendarsWithPromptOptions,\n ): Promise<SelectCalendarsWithPromptResult> {\n return this.throwUnimplemented(this.selectCalendarsWithPrompt.name);\n }\n\n public fetchAllCalendarSources(): Promise<FetchAllCalendarSourcesResult> {\n return this.throwUnimplemented(this.fetchAllCalendarSources.name);\n }\n\n public listCalendars(): Promise<ListCalendarsResult> {\n return this.throwUnimplemented(this.listCalendars.name);\n }\n\n public fetchAllRemindersSources(): Promise<FetchAllCalendarSourcesResult> {\n return this.throwUnimplemented(this.fetchAllRemindersSources.name);\n }\n\n public getDefaultCalendar(_options?: GetDefaultCalendarOptions): Promise<{ result: Calendar | null }> {\n return this.throwUnimplemented(this.getDefaultCalendar.name);\n }\n\n public getDefaultRemindersList(): Promise<GetDefaultRemindersListResult> {\n return this.throwUnimplemented(this.getDefaultRemindersList.name);\n }\n\n public openReminders(): Promise<void> {\n return this.throwUnimplemented(this.openReminders.name);\n }\n\n public getRemindersLists(): Promise<GetRemindersListsResult> {\n return this.throwUnimplemented(this.getRemindersLists.name);\n }\n\n public openCalendar(_options?: OpenCalendarOptions): Promise<void> {\n return this.throwUnimplemented(this.openCalendar.name);\n }\n\n public createCalendar(_options: CreateCalendarOptions): Promise<CreateCalendarResult> {\n return this.throwUnimplemented(this.createCalendar.name);\n }\n\n public deleteCalendar(_options: DeleteCalendarOptions): Promise<void> {\n return this.throwUnimplemented(this.deleteCalendar.name);\n }\n\n public createReminder(_options: CreateReminderOptions): Promise<CreateReminderResult> {\n return this.throwUnimplemented(this.createReminder.name);\n }\n\n public deleteRemindersById(_options: DeleteRemindersByIdOptions): Promise<{ result: DeleteRemindersByIdResult }> {\n return this.throwUnimplemented(this.deleteRemindersById.name);\n }\n\n public deleteReminder(_options: DeleteReminderOptions): Promise<void> {\n return this.throwUnimplemented(this.deleteReminder.name);\n }\n\n public modifyReminder(_options: ModifyReminderOptions): Promise<void> {\n return this.throwUnimplemented(this.modifyReminder.name);\n }\n\n public getReminderById(_options: GetReminderByIdOptions): Promise<GetReminderByIdResult> {\n return this.throwUnimplemented(this.getReminderById.name);\n }\n\n public getRemindersFromLists(_options: GetRemindersFromListsOptions): Promise<GetRemindersFromListsResult> {\n return this.throwUnimplemented(this.getRemindersFromLists.name);\n }\n\n public deleteEventsById(_options: DeleteEventsByIdOptions): Promise<{\n result: DeleteEventsByIdResult;\n }> {\n return this.throwUnimplemented(this.deleteEventsById.name);\n }\n\n public deleteEvent(_options: DeleteEventOptions): Promise<void> {\n return this.throwUnimplemented(this.deleteEvent.name);\n }\n\n public deleteEventWithPrompt(_options: DeleteEventWithPromptOptions): Promise<{ deleted: boolean }> {\n return this.throwUnimplemented(this.deleteEventWithPrompt.name);\n }\n\n public listEventsInRange(_options: ListEventsInRangeOptions): Promise<ListEventsInRangeResult> {\n return this.throwUnimplemented(this.listEventsInRange.name);\n }\n\n public modifyCalendar(_options: ModifyCalendarOptions): Promise<void> {\n return this.throwUnimplemented(this.modifyCalendar.name);\n }\n\n public deleteReminderWithPrompt(_options: DeleteReminderWithPromptOptions): Promise<DeleteReminderWithPromptResult> {\n return this.throwUnimplemented(this.deleteReminderWithPrompt.name);\n }\n\n public updateRemindersList(_options: UpdateRemindersListOptions): Promise<UpdateRemindersListResult> {\n return this.throwUnimplemented(this.updateRemindersList.name);\n }\n\n private throwUnimplemented<T>(methodName: string): Promise<T> {\n return Promise.reject(this.unimplemented(`${methodName} is not implemented on the web.`));\n }\n}\n\nfunction mapPromptOptionsToCreateEvent(options: CreateEventWithPromptOptions): CreateEventOptions {\n return {\n alerts: options.alerts,\n availability: options.availability,\n description: options.description,\n endDate: options.endDate,\n icsFileName: options.icsFileName,\n isAllDay: options.isAllDay,\n location: options.location,\n recurrence: options.recurrence,\n startDate: options.startDate,\n title: options.title ?? '',\n url: options.url,\n };\n}\n\nfunction buildCreateEventConfirmMessage(options: CreateEventWithPromptOptions): string {\n const custom = options.promptMessage?.trim();\n if (custom != null && custom.length > 0) {\n return custom;\n }\n\n const title = normalizeConfirmTitle(options.title);\n const timeSummary = formatEventTimeSummary(options);\n return `Create event?\\n\\n${title}\\n${timeSummary}`;\n}\n\nfunction normalizeConfirmTitle(title?: string): string {\n const collapsed = (title ?? '')\n .replace(/[\\r\\n]+/g, ' ')\n .replace(/\\s+/g, ' ')\n .trim();\n return collapsed.length > 0 ? collapsed : 'Untitled event';\n}\n\nfunction formatEventTimeSummary(options: CreateEventWithPromptOptions): string {\n const startDate = options.startDate ?? Date.now();\n const isAllDay = options.isAllDay === true;\n const endDate = resolveEndDate(startDate, options.endDate, undefined, isAllDay);\n\n if (isAllDay) {\n const startDay = formatLocalDate(startDate);\n const lastInclusiveMs = endDate - DAY_MS;\n const lastDay = formatLocalDate(lastInclusiveMs);\n if (lastDay <= startDay) {\n return `All day · ${formatDisplayDate(startDate)}`;\n }\n return `All day · ${formatDisplayDate(startDate)} – ${formatDisplayDate(lastInclusiveMs)}`;\n }\n\n return `${formatDisplayDateTime(startDate)} – ${formatDisplayDateTime(endDate)}`;\n}\n\nfunction formatLocalDate(ms: number): string {\n const date = new Date(ms);\n const fullYear = date.getFullYear();\n const month = String(date.getMonth() + 1).padStart(2, '0');\n const dayOfMonth = String(date.getDate()).padStart(2, '0');\n return `${fullYear}-${month}-${dayOfMonth}`;\n}\n\nfunction formatDisplayDate(ms: number): string {\n return new Date(ms).toLocaleDateString(undefined, {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n });\n}\n\nfunction formatDisplayDateTime(ms: number): string {\n return new Date(ms).toLocaleString(undefined, {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n hour: 'numeric',\n minute: '2-digit',\n });\n}\n"]}