Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/components/AppNavigation/CalendarList/Trashbin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down
4 changes: 4 additions & 0 deletions src/components/CalendarGrid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/components/Shared/CalendarPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/fullcalendar/interaction/eventClick.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/mixins/EditorMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/mixins/PropertyLinksMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default {
},

/**
* @param {boolean} hasFocus
* @param {boolean} hasFocus Whether the textarea currently has focus
*/
handleToggleTextareaFocus(hasFocus) {
if (this.linkifyLinks === false) {
Expand Down
4 changes: 2 additions & 2 deletions src/models/appointmentConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
2 changes: 1 addition & 1 deletion src/models/recurrenceRule.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
18 changes: 9 additions & 9 deletions src/services/appointmentService.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}', {
Expand All @@ -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', {
Expand Down
6 changes: 3 additions & 3 deletions src/services/attachmentService.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
12 changes: 6 additions & 6 deletions src/services/attendeeDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') || '[]')
Expand Down Expand Up @@ -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 = {
Expand All @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/services/caldavService.js
Original file line number Diff line number Diff line change
Expand Up @@ -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<CalendarHome>}
*/
const getCalendarHome = (headers) => getClient(headers).calendarHomes[0]
Expand Down
6 changes: 4 additions & 2 deletions src/services/freeBusySlotService.js
Original file line number Diff line number Diff line change
Expand Up @@ -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<>}
*/
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down
8 changes: 8 additions & 0 deletions src/services/timezoneOffsetService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
19 changes: 9 additions & 10 deletions src/store/calendarObjectInstance.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
8 changes: 5 additions & 3 deletions src/store/delegation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> {
const principalsStore = usePrincipalsStore()
Expand All @@ -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<void> {
const principalsStore = usePrincipalsStore()
Expand Down
8 changes: 4 additions & 4 deletions src/store/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(`
Expand Down
8 changes: 4 additions & 4 deletions src/store/unscheduledTasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]) {
Expand All @@ -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]) {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/alarms.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/date.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) {
Expand Down
8 changes: 4 additions & 4 deletions src/utils/localeTime.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions src/utils/nextcloudVersion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/propfindErrorParse.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading
Loading