diff --git a/src/components/AppNavigation/CalendarList/Trashbin.vue b/src/components/AppNavigation/CalendarList/Trashbin.vue index b3d5e47426..57599996b8 100644 --- a/src/components/AppNavigation/CalendarList/Trashbin.vue +++ b/src/components/AppNavigation/CalendarList/Trashbin.vue @@ -297,6 +297,7 @@ export default { /** * Whether the current user is allowed to restore a deleted calendar. * + * @param {object} calendar The calendar to check * @return {boolean} */ canRestoreCalendar(calendar) { @@ -308,6 +309,7 @@ export default { /** * Whether the current user is allowed to permanently delete a deleted calendar. * + * @param {object} calendar The calendar to check * @return {boolean} */ canDeleteCalendar(calendar) { diff --git a/src/components/CalendarGrid.vue b/src/components/CalendarGrid.vue index 13089335f7..a547063877 100644 --- a/src/components/CalendarGrid.vue +++ b/src/components/CalendarGrid.vue @@ -323,6 +323,8 @@ export default { /** * Scroll the month view to today when loading the calendar, * so people can directly see today's date and events. + * + * @param {boolean} isLoading Whether the calendar is still loading */ scrollMonthViewToToday(isLoading) { if (isLoading) { @@ -352,6 +354,8 @@ export default { /** * Add a todo task without end date to the calendar + * + * @param {object} info The FullCalendar eventReceive info */ async handleEventReceive(info) { const { event } = info diff --git a/src/components/Shared/CalendarPicker.vue b/src/components/Shared/CalendarPicker.vue index 4857b42a1b..10992b62b2 100644 --- a/src/components/Shared/CalendarPicker.vue +++ b/src/components/Shared/CalendarPicker.vue @@ -137,7 +137,7 @@ export default { /** * TODO: this should emit the calendar id instead * - * @param {{id: string}|{id: string}[]} options All selected options (including the new one) + * @param {{id: string}} optionId The selected option */ change(optionId) { if (!optionId) { diff --git a/src/fullcalendar/interaction/eventClick.js b/src/fullcalendar/interaction/eventClick.js index a42266dbfe..c2e1cb4f25 100644 --- a/src/fullcalendar/interaction/eventClick.js +++ b/src/fullcalendar/interaction/eventClick.js @@ -94,7 +94,7 @@ function handleEventClick(event, router, route, window, isWidget = false) { * @param {EventDef} event FullCalendar event * @param {object} route The current Vue route * @param {Window} window The window object - * @param isWidget + * @param {boolean} isWidget Whether the calendar is embedded as a widget */ function handleToDoClick(event, route, window, isWidget = false) { const settingsStore = useSettingsStore() diff --git a/src/mixins/EditorMixin.js b/src/mixins/EditorMixin.js index 64bd30a829..71e4eb68ef 100644 --- a/src/mixins/EditorMixin.js +++ b/src/mixins/EditorMixin.js @@ -604,7 +604,7 @@ export default { /** * Resets the calendar-object back to its original state and closes the editor * - * @param force whether to not show a confirmation modal before executing + * @param {boolean} force whether to not show a confirmation modal before executing */ async cancel(force = false) { if (this.isLoading) { diff --git a/src/mixins/PropertyLinksMixin.js b/src/mixins/PropertyLinksMixin.js index d920e37e67..bf95603599 100644 --- a/src/mixins/PropertyLinksMixin.js +++ b/src/mixins/PropertyLinksMixin.js @@ -64,7 +64,7 @@ export default { }, /** - * @param {boolean} hasFocus + * @param {boolean} hasFocus Whether the textarea currently has focus */ handleToggleTextareaFocus(hasFocus) { if (this.linkifyLinks === false) { diff --git a/src/models/appointmentConfig.js b/src/models/appointmentConfig.js index e70485540b..62f7780d1a 100644 --- a/src/models/appointmentConfig.js +++ b/src/models/appointmentConfig.js @@ -108,8 +108,8 @@ export default class AppointmentConfig { /** * Create a default appointment config instance * - * @param {string} targetCalendarUri - * @param {ScheduleInbox} scheduleInbox + * @param {string} targetCalendarUri URI of the calendar new appointments are booked into + * @param {ScheduleInbox} scheduleInbox The schedule inbox to derive default availability from * @param {string} timezoneId fallback time zone when no schedule inbox availability is set * @return {AppointmentConfig} Default appointment config instance */ diff --git a/src/models/recurrenceRule.js b/src/models/recurrenceRule.js index fbd5f6eb0a..b6568ed462 100644 --- a/src/models/recurrenceRule.js +++ b/src/models/recurrenceRule.js @@ -120,7 +120,7 @@ const SUPPORTED_BY_MONTH_YEARLY = [...Array(12).keys().map((i) => i + 1)] /** * Maps a daily calendar-js recurrence-rule-value to an recurrence-rule-object * - * @param recurrenceRuleValue + * @param {RecurValue} recurrenceRuleValue The calendar-js recurrence rule value * @return {object} */ function mapDailyRuleValueToRecurrenceRuleObject(recurrenceRuleValue) { diff --git a/src/services/appointmentService.js b/src/services/appointmentService.js index 1402449004..d00f2f9224 100644 --- a/src/services/appointmentService.js +++ b/src/services/appointmentService.js @@ -7,9 +7,9 @@ import axios from '@nextcloud/axios' import { generateUrl } from '@nextcloud/router' /** - * @param config {object} the appointment config object - * @param date {string} selected availability date in yyyy-m-d format - * @param timeZone {String} target time zone for the time stamps + * @param {object} config the appointment config object + * @param {string} date selected availability date in yyyy-m-d format + * @param {string} timeZone target time zone for the time stamps */ export async function findSlots(config, date, timeZone) { const url = generateUrl('/apps/calendar/appointment/{token}/slots?dateSelected={date}&timeZone={timeZone}', { @@ -24,12 +24,12 @@ export async function findSlots(config, date, timeZone) { } /** - * @param config - * @param slot - * @param displayName - * @param email - * @param description - * @param timeZone + * @param {object} config the appointment config object + * @param {object} slot the selected availability slot to book + * @param {string} displayName display name of the person booking the slot + * @param {string} email email address of the person booking the slot + * @param {string} description description for the booked appointment + * @param {string} timeZone time zone the slot was selected in */ export async function bookSlot(config, slot, displayName, email, description, timeZone) { const url = generateUrl('/apps/calendar/appointment/{token}/book', { diff --git a/src/services/attachmentService.js b/src/services/attachmentService.js index 7119ba959f..3e81c89a7e 100644 --- a/src/services/attachmentService.js +++ b/src/services/attachmentService.js @@ -40,9 +40,9 @@ async function shareFile(path) { /** * Share file with a user with permissions * - * @param path - * @param sharedWith - * @param permissions + * @param {string} path The file path from the user's root directory. e.g. `/myfile.txt` + * @param {string} sharedWith The user id to share the file with + * @param {number} permissions The share permissions bitmask * @return {Promise<[{path: string, permissions, scope: string, name: string, backend: string, type: string},{path: string, permissions: *, scope: string, name: string, backend: string, type: string}]>} */ async function shareFileWith(path, sharedWith, permissions = 17) { diff --git a/src/services/attendeeDetails.js b/src/services/attendeeDetails.js index f61ca9a788..6bdb0defed 100644 --- a/src/services/attendeeDetails.js +++ b/src/services/attendeeDetails.js @@ -11,7 +11,7 @@ import logger from '@/utils/logger.js' /** * - * @param email {string} email of nextcloud user or contact + * @param {string} email email of nextcloud user or contact */ export async function getAttendeeDetails(email) { const allDetails = JSON.parse(localStorage.getItem('calendar-attendee-details') || '[]') @@ -61,9 +61,9 @@ export async function getAttendeeDetails(email) { /** * - * @param allDetails all the localstorage information - * @param email attendee email - * @param timezone fetched attendee timezone + * @param {object[]} allDetails all the localstorage information + * @param {string} email attendee email + * @param {string} timezone fetched attendee timezone */ function generateDetails(allDetails, email, timezone) { const newAttendeeDetails = { @@ -87,8 +87,8 @@ function generateDetails(allDetails, email, timezone) { /** * - * @param startDate starting date of event - * @param timezone timezone of attendee + * @param {Date|string} startDate starting date of event + * @param {string} timezone timezone of attendee */ export function adjustAttendeeTime(startDate, timezone) { if (!timezone || !startDate) { diff --git a/src/services/caldavService.js b/src/services/caldavService.js index a61defe695..d3bf0996e6 100644 --- a/src/services/caldavService.js +++ b/src/services/caldavService.js @@ -44,7 +44,7 @@ async function initializeClientForPublicView() { /** * Fetch all calendars from the server * - * @param {object} headers + * @param {object} headers Additional headers to send with the request * @return {Promise} */ const getCalendarHome = (headers) => getClient(headers).calendarHomes[0] diff --git a/src/services/freeBusySlotService.js b/src/services/freeBusySlotService.js index e61e022f36..3476b659dd 100644 --- a/src/services/freeBusySlotService.js +++ b/src/services/freeBusySlotService.js @@ -18,7 +18,7 @@ const daysToSearch = 7 * @param {AttendeeProperty[]} attendees Array of the event's attendees * @param {Date} start The start date and time of the event * @param {Date} end The end date and time of the event - * @param timeZoneId + * @param {string} timeZoneId The time zone id to interpret start and end in * @param {boolean} bulk fetch all attendees in one request * @return {Promise<>} */ @@ -73,7 +73,7 @@ export async function getBusySlots(organizer, attendees, start, end, timeZoneId, * * @param {Date} start The start date and time of the event * @param {Date} end The end date and time of the event - * @param retrievedEvents Events found by the freebusy API + * @param {object[]} retrievedEvents Events found by the freebusy API * @return [] */ export function getFirstFreeSlot(start, end, retrievedEvents) { @@ -120,6 +120,8 @@ export function getFirstFreeSlot(start, end, retrievedEvents) { } /** + * @param {Date|string} start The start date and time + * @param {Date|string} end The end date and time * @return {number} */ function getDurationInSeconds(start, end) { diff --git a/src/services/timezoneOffsetService.ts b/src/services/timezoneOffsetService.ts index 0852fc2aaf..446a1ae514 100644 --- a/src/services/timezoneOffsetService.ts +++ b/src/services/timezoneOffsetService.ts @@ -2,6 +2,14 @@ * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ + +/** + * Get the offset in minutes between a date's timezone and the given timezone + * + * @param proposalDate The date to compute the offset for + * @param timezoneId The timezone id to compute the offset against + * @return The offset in minutes + */ export function getTimezoneOffset(proposalDate: Date, timezoneId: string): number { let timezoneOffset = 0 diff --git a/src/store/calendarObjectInstance.js b/src/store/calendarObjectInstance.js index 317f749550..f73c7325df 100644 --- a/src/store/calendarObjectInstance.js +++ b/src/store/calendarObjectInstance.js @@ -1143,6 +1143,7 @@ export default defineStore('calendarObjectInstance', { * @param {object} data.calendarObjectInstance The calendarObjectInstance object * @param {string} data.type Type of alarm * @param {number} data.totalSeconds Total amount of seconds for new alarm + * @param {boolean=} data.isDefault Whether this is the default alarm */ addAlarmToCalendarObjectInstance({ calendarObjectInstance, @@ -1203,10 +1204,9 @@ export default defineStore('calendarObjectInstance', { /** * @deprecated - * @param calendarObjectInstance.calendarObjectInstance - * @param calendarObjectInstance - * @param calendarObjectInstance.sharedData - * @param sharedData + * @param {object} data The destructuring object + * @param {object} data.calendarObjectInstance The calendarObjectInstance object + * @param {object} data.sharedData The shared file data to attach */ addAttachmentBySharedData({ calendarObjectInstance, @@ -1245,10 +1245,9 @@ export default defineStore('calendarObjectInstance', { /** * - * @param calendarObjectInstance.calendarObjectInstance - * @param calendarObjectInstance - * @param sharedData - * @param calendarObjectInstance.sharedData + * @param {object} data The destructuring object + * @param {object} data.calendarObjectInstance The calendarObjectInstance object + * @param {object} data.sharedData The shared file data to attach */ addAttachmentWithProperty({ calendarObjectInstance, @@ -1594,7 +1593,7 @@ export default defineStore('calendarObjectInstance', { * @param {object} data.calendarObjectInstance The calendarObjectInstance object * @param {Date} data.startDate The new start-date * @param {boolean} data.onlyTime Only update time - * @param data.changeEndDate + * @param {boolean=} data.changeEndDate Whether to also shift the end-date to preserve the duration */ changeStartDate({ calendarObjectInstance, @@ -1894,8 +1893,8 @@ export default defineStore('calendarObjectInstance', { /** * * @param {object} data The destructuring object for data + * @param {object} data.calendarObjectInstance The calendarObjectInstance object * @param {object} data.recurrenceRule The recurrenceRule object to modify - * @param {string} data.byDay The new until to set */ enableRecurrenceLimitByUntil({ calendarObjectInstance, diff --git a/src/store/delegation.ts b/src/store/delegation.ts index 0035378257..d06ef8d381 100644 --- a/src/store/delegation.ts +++ b/src/store/delegation.ts @@ -126,8 +126,9 @@ export default defineStore('delegation', () => { /** * Add a user as a delegate with the given permission level. * - * @param principalUrl - Absolute URL of the principal to add - * @param permission - The permission level to grant + * @param data The destructuring object + * @param data.principalUrl - Absolute URL of the principal to add + * @param data.permission - The permission level to grant */ async function addDelegate({ principalUrl, permission = 'write' as 'write' | 'read' }): Promise { const principalsStore = usePrincipalsStore() @@ -143,7 +144,8 @@ export default defineStore('delegation', () => { /** * Remove a delegate from whichever proxy group(s) they are in. * - * @param principalUrl - Absolute URL of the principal to remove + * @param data The destructuring object + * @param data.principalUrl - Absolute URL of the principal to remove */ async function removeDelegate({ principalUrl }: { principalUrl: string }): Promise { const principalsStore = usePrincipalsStore() diff --git a/src/store/settings.js b/src/store/settings.js index c9d20d42db..912ce21629 100644 --- a/src/store/settings.js +++ b/src/store/settings.js @@ -339,14 +339,14 @@ export default defineStore('settings', { * @param {boolean} data.talkEnabled Whether or not the talk app is enabled * @param {boolean} data.tasksEnabled Whether ot not the tasks app is enabled * @param {string} data.timezone The timezone to view the calendar in. Either an Olsen timezone or "automatic" - * @param {boolean} data.hideEventExport - * @param {string} data.forceEventAlarmType + * @param {boolean} data.hideEventExport Whether or not to hide the event export option + * @param {string} data.forceEventAlarmType Forces newly created alarms to be of this type * @param {boolean} data.disableAppointments Allow to disable the appointments feature * @param {boolean} data.tasksSidebar Enable the tasks sidebar for unscheduled tasks - * @param {boolean} data.canSubscribeLink + * @param {boolean} data.canSubscribeLink Whether or not the user can subscribe to calendars via link * @param {string} data.attachmentsFolder Default user's attachments folder * @param {boolean} data.showResources Show or hide the resources tab - * @param {string} data.publicCalendars + * @param {string} data.publicCalendars The list of public calendars configured by the administrator */ loadSettingsFromServer({ appVersion, eventLimit, firstRun, showWeekNumbers, showTasks, showWeekends, skipPopover, slotDuration, defaultReminder, defaultReminderPartDay, defaultReminderFullDay, talkEnabled, tasksEnabled, timezone, hideEventExport, forceEventAlarmType, disableAppointments, tasksSidebar, canSubscribeLink, attachmentsFolder, showResources, publicCalendars }) { logInfo(` diff --git a/src/store/unscheduledTasks.js b/src/store/unscheduledTasks.js index c98ee408a5..89b6fb9770 100644 --- a/src/store/unscheduledTasks.js +++ b/src/store/unscheduledTasks.js @@ -47,8 +47,8 @@ export default defineStore('tasks', { /** * Append a single task to the store * - * @param calendarid calendar id of the task - * @param task The task to append to the store + * @param {string} calendarid calendar id of the task + * @param {object} task The task to append to the store */ appendTask(calendarid, task) { if (!this.map[calendarid]) { @@ -66,8 +66,8 @@ export default defineStore('tasks', { /** * Removes a single task from the store * - * @param calendarid calendar id of the task - * @param task The task to remove from the store + * @param {string} calendarid calendar id of the task + * @param {object} task The task to remove from the store */ removeTask(calendarid, task) { if (!this.map[calendarid]) { diff --git a/src/utils/alarms.js b/src/utils/alarms.js index a007bd3ef0..5e7e0fbadc 100644 --- a/src/utils/alarms.js +++ b/src/utils/alarms.js @@ -296,7 +296,7 @@ export function getDefaultReminderForEvent({ calendar, isAllDay }) { * * https://www.rfc-editor.org/rfc/rfc5545#section-3.6.6 * - * @param {AbstractRecurringComponent} eventComponent + * @param {AbstractRecurringComponent} eventComponent The event component to propagate alarm data for */ export function updateAlarms(eventComponent) { for (const alarmComponent of eventComponent.getAlarmIterator()) { diff --git a/src/utils/date.js b/src/utils/date.js index baa06c48ab..4e81090fa7 100644 --- a/src/utils/date.js +++ b/src/utils/date.js @@ -106,7 +106,7 @@ export function getDateFromDateTimeValue(dateTimeValue) { * @param {number} data.day Number of days to add * @param {number} data.week Number of weeks to add * @param {number} data.month Number of months to add - * @param data.year + * @param {number} data.year Number of years to add * @return {Date} */ export function modifyDate(date, { day = 0, week = 0, month = 0, year = 0 }) { diff --git a/src/utils/localeTime.js b/src/utils/localeTime.js index e05f7afceb..527b70c392 100644 --- a/src/utils/localeTime.js +++ b/src/utils/localeTime.js @@ -18,8 +18,8 @@ const locale = [getCanonicalLocale(), undefined].find((locale) => { /** * Format a time stamp as local time * - * @param timeStamp {Number} unix times stamp in seconds - * @param timeZoneId {string} IANA time zone identifier + * @param {number} timeStamp unix times stamp in seconds + * @param {string} timeZoneId IANA time zone identifier * @return {string} the formatted time */ export function timeStampToLocaleTime(timeStamp, timeZoneId) { @@ -33,8 +33,8 @@ export function timeStampToLocaleTime(timeStamp, timeZoneId) { /** * Format a time stamp as local date * - * @param timeStamp {Number} unix times stamp in seconds - * @param timeZoneId {string} IANA time zone identifier + * @param {number} timeStamp unix times stamp in seconds + * @param {string} timeZoneId IANA time zone identifier * @return {string} the formatted date */ export function timeStampToLocaleDate(timeStamp, timeZoneId) { diff --git a/src/utils/nextcloudVersion.ts b/src/utils/nextcloudVersion.ts index b41ae10945..e9090db182 100644 --- a/src/utils/nextcloudVersion.ts +++ b/src/utils/nextcloudVersion.ts @@ -15,6 +15,7 @@ export function getNextcloudVersion(): number { /** * Whether the current Nextcloud version is equal or higher than the given version * + * @param version The major version number to compare against * @return True if supported */ export function isAfterVersion(version: number): boolean { diff --git a/src/utils/propfindErrorParse.js b/src/utils/propfindErrorParse.js index 6d857ec65f..32f8e2be3f 100644 --- a/src/utils/propfindErrorParse.js +++ b/src/utils/propfindErrorParse.js @@ -9,7 +9,7 @@ import logger from '@/utils/logger.js' /** * Parse PROPFIND error when uploading a file and return a readable message. * - * @param exception the error object + * @param {Error} exception the error object */ async function parseUploadError(exception) { try { diff --git a/src/views/EditSimple.vue b/src/views/EditSimple.vue index a6626a53b8..e379783036 100644 --- a/src/views/EditSimple.vue +++ b/src/views/EditSimple.vue @@ -665,6 +665,8 @@ export default { /** * Calculate the popover position based on target element + * + * @param {Element} targetElement The element to position the popover relative to */ calculateAndApplyPosition(targetElement) { const SPACING = 16