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: 1 addition & 1 deletion src/fullcalendar/eventSources/eventSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { eventSourceFunction } from './eventSourceFunction.js'
/**
* Returns a function to generate a FullCalendar event-source based on the Vuex calendar model
*
* @return {function(*=): {backgroundColor: *, borderColor: *, className: *, id: *, textColor: *, events: events}}
* @return {(calendar: object) => {id: string, backgroundColor: string, borderColor: string, editable?: boolean, events: (info: {start: Date, end: Date, timeZone: string}, successCallback: (events: object[]) => void, failureCallback: (error: Error) => void) => Promise<void>}}
*/
export default function() {
const fetchedTimeRangesStore = useFetchedTimeRangesStore()
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 @@ -23,7 +23,7 @@ import { errorCatchAsync } from '../utils/errors.js'
* @param {Window} window The window object
* @param {boolean} isWidget Whether the calendar is embedded in a widget
* @param {object} ref The ref object of CalendarGrid component
* @return {Function}
* @return {(info: {event: EventDef}) => Promise<void>}
*/
export default function(router, route, window, isWidget = false, ref = undefined) {
const widgetStore = useWidgetStore()
Expand Down
2 changes: 1 addition & 1 deletion src/fullcalendar/interaction/eventDrop.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { errorCatchAsync } from '../utils/errors.js'
* Returns a function to drop an event at a different position
*
* @param {object} fcAPI The fullcalendar api
* @return {Function}
* @return {(info: {event: EventDef, delta: object, revert: () => void}) => Promise<void>}
*/
export default function(fcAPI) {
const calendarsStore = useCalendarsStore()
Expand Down
2 changes: 1 addition & 1 deletion src/fullcalendar/interaction/eventResize.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import logger from '@/utils/logger.js'
/**
* Returns a function to resize an event
*
* @return {Function}
* @return {(info: {event: EventDef, startDelta: object, endDelta: object, revert: () => void}) => Promise<void>}
*/
export default function() {
const calendarsStore = useCalendarsStore()
Expand Down
2 changes: 1 addition & 1 deletion src/fullcalendar/interaction/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { errorCatch } from '../utils/errors.js'
* @param {object} router The Vue router
* @param {object} route The Vue route
* @param {Window} window The window object
* @return {Function}
* @return {(info: {start: Date, end: Date, allDay: boolean}) => void}
*/
export default function(router, route, window) {
const settingsStore = useSettingsStore()
Expand Down
12 changes: 7 additions & 5 deletions src/fullcalendar/utils/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ import logger from '@/utils/logger.js'
/**
* Wraps a FullCalendar hook function with error logging
*
* @param {Function} hookFn The hook function to wrap
* @template {(...args: unknown[]) => unknown} T
* @param {T} hookFn The hook function to wrap
* @param {string} hookName The name of the hook for logging
* @param {*} [defaultReturn] The default return value if the hook throws an error
* @return {Function} The wrapped hook function
* @param {ReturnType<T>} [defaultReturn] The default return value if the hook throws an error
* @return {T} The wrapped hook function
*/
export function errorCatch(hookFn, hookName, defaultReturn = undefined) {
return function(...args) {
Expand All @@ -27,9 +28,10 @@ export function errorCatch(hookFn, hookName, defaultReturn = undefined) {
/**
* Wraps an async FullCalendar hook function with error logging
*
* @param {Function} hookFn The async hook function to wrap
* @template {(...args: unknown[]) => unknown} T
* @param {T} hookFn The async hook function to wrap
* @param {string} hookName The name of the hook for logging
* @return {Function} The wrapped async hook function
* @return {(...args: Parameters<T>) => Promise<Awaited<ReturnType<T>>|undefined>} The wrapped async hook function
*/
export function errorCatchAsync(hookFn, hookName) {
return async function(...args) {
Expand Down
8 changes: 4 additions & 4 deletions src/mixins/EditorMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export default {
* Returns the color of the calendar selected by the user
* This is used to color illustration
*
* @return {string|*}
* @return {string}
*/
selectedCalendarColor() {
if (!this.selectedCalendar) {
Expand Down Expand Up @@ -939,7 +939,7 @@ export default {
*
* @param {object} to The route to navigate to
* @param {object} from The route coming from
* @param {Function} next Function to be called when ready to load the next view
* @param {(vm?: object) => void} next Function to be called when ready to load the next view
*/
async beforeRouteEnter(to, from, next) {
if (to.name === 'NewFullView' || to.name === 'NewPopoverView') {
Expand Down Expand Up @@ -1014,7 +1014,7 @@ export default {
*
* @param {object} to The route to navigate to
* @param {object} from The route coming from
* @param {Function} next Function to be called when ready to load the next view
* @param {(vm?: object) => void} next Function to be called when ready to load the next view
*/
async beforeRouteUpdate(to, from, next) {
// If we are in the New Event dialog, we want to update the selected time
Expand Down Expand Up @@ -1092,7 +1092,7 @@ export default {
*
* @param {object} to The route to navigate to
* @param {object} from The route coming from
* @param {Function} next Function to be called when ready to load the next view
* @param {(vm?: object) => void} next Function to be called when ready to load the next view
*/
async beforeRouteLeave(to, from, next) {
// requiresActionOnRouteLeave is false when an action like deleting / saving / cancelling was already taken.
Expand Down
2 changes: 1 addition & 1 deletion src/models/principal.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { mapDavToRoomPrincipalProperties } from '@/models/principal/principal'
* Creates a complete principal-object based on given props
*
* @param {object} props Principal-props already provided
* @return {any}
* @return {object}
*/
function getDefaultPrincipalObject(props) {
return { // Id of the principal
Expand Down
10 changes: 9 additions & 1 deletion src/models/rfcProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,15 @@ import { getDefaultCategories } from '../defaults/defaultCategories.js'
/**
* Gets all supported RFC properties
*
* @return {{color: {readableName: *, icon: string, multiple: boolean, info: *}, timeTransparency: {readableName: *, defaultValue: string, icon: string, multiple: boolean, options: *[], info: *}, description: {readableName: *, icon: string, placeholder: *, defaultNumberOfRows: number}, location: {readableName: *, icon: string, placeholder: *}, categories: {readableName: *, icon: string, multiple: boolean, options: *, tagPlaceholder: *, placeholder: *, info: *}, accessClass: {readableName: *, defaultValue: string, icon: string, options: *[], multiple: boolean, info: *}, status: {readableName: *, defaultValue: string, icon: string, options: *[], multiple: boolean, info: *}}}
* @return {{
* accessClass: {readableName: string, icon: string, options: {value: string, label: string}[], multiple: boolean, info: string, defaultValue: string},
* location: {readableName: string, placeholder: string, icon: string},
* description: {readableName: string, placeholder: string, icon: string, defaultNumberOfRows: number},
* status: {readableName: string, icon: string, options: {value: string, label: string}[], multiple: boolean, info: string, defaultValue: string},
* timeTransparency: {readableName: string, icon: string, multiple: boolean, info: string, options: {value: string, label: string}[], defaultValue: string},
* categories: {readableName: string, icon: string, multiple: boolean, info: string, placeholder: string, tagPlaceholder: string, options: {value: string, label: string}[]},
* color: {readableName: string, icon: string, multiple: boolean, info: string},
* }}
*/
function getRFCProperties() {
return {
Expand Down
2 changes: 1 addition & 1 deletion src/models/schedulingObject.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ function mapCalendarJsToSchedulingObject(calendarComponent) {
* Extracts the first object from the calendar-component
*
* @param {CalendarComponent} calendarComponent The calendar-component
* @return {any} First VEvent / VJournal / VTodo / VFreeBusy
* @return {object|undefined} First VEvent / VJournal / VTodo / VFreeBusy
*/
function getFirstObjectFromCalendarComponent(calendarComponent) {
const vObjectIterator = calendarComponent.getVObjectIterator()
Expand Down
2 changes: 1 addition & 1 deletion src/services/attachmentService.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ async function shareFile(path) {
* @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}]>}
* @return {Promise<{path: string, permissions: number, scope: string, name: string, backend: string, type: string}>}
*/
async function shareFileWith(path, sharedWith, permissions = 17) {
try {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/alarms.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export function getTotalSecondsFromAmountAndUnitForTimedEvents(amount, unit, isB
* Gets the amount of days / weeks, unit, hours and minutes from total seconds
*
* @param {number} totalSeconds Total amount of seconds
* @return {{amount: *, unit: *, hours: *, minutes: *}}
* @return {{amount: number, unit: string, hours: number, minutes: number}}
*/
export function getAmountHoursMinutesAndUnitForAllDayEvents(totalSeconds) {
const dayFactor = getFactorForAlarmUnit('days')
Expand Down
2 changes: 1 addition & 1 deletion src/utils/color.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export function uidToHexColor(uid) {
* Detects a color from a given string
*
* @param {string} color The color to get the real RGB hex string from
* @return {string|boolean|*} String if color detected, boolean if not
* @return {string|boolean} String if color detected, boolean if not
*/
export function detectColor(color) {
if (/^(#)((?:[A-Fa-f0-9]{3}){1,2})$/.test(color)) { // #ff00ff and #f0f
Expand Down
Loading