1- import { createPlugin , PluginDef } from '@fullcalendar/core' ;
1+ import { createPlugin , type PluginDef } from '@fullcalendar/core' ;
22import { computePosition , flip , shift , offset } from '@floating-ui/dom' ;
33
44export interface ActivityPeriod {
@@ -11,13 +11,6 @@ export interface ActivityStatusPluginOptions {
1111 activityPeriods ?: ActivityPeriod [ ] ;
1212}
1313
14- // Extend FullCalendar's options interface
15- declare module '@fullcalendar/core' {
16- interface CalendarOptions {
17- activityPeriods ?: ActivityPeriod [ ] ;
18- }
19- }
20-
2114/**
2215 * Creates and manages a tooltip element for activity status boxes
2316 */
@@ -107,9 +100,6 @@ export function renderActivityStatusBoxes(
107100 // Create a single tooltip instance to be reused
108101 const tooltip = createTooltip ( ) ;
109102
110- // Get the calendar's current view to determine dates
111- const dateHeaders = calendarEl . querySelectorAll ( '.fc-col-header-cell' ) ;
112-
113103 lanes . forEach ( ( lane : Element , dayIndex : number ) => {
114104 // Get the date for this lane from the data attribute
115105 const laneEl = lane as HTMLElement ;
@@ -126,8 +116,6 @@ export function renderActivityStatusBoxes(
126116 const laneDateEnd = new Date ( laneDate ) ;
127117 laneDateEnd . setHours ( 23 , 59 , 59 , 999 ) ;
128118
129- console . log ( 'Processing lane' , dayIndex , 'date:' , dateStr ) ;
130-
131119 let hasActivityStatusForThisDay = false ;
132120
133121 activityPeriods . forEach ( ( period ) => {
@@ -139,15 +127,6 @@ export function renderActivityStatusBoxes(
139127 return ;
140128 }
141129
142- console . log (
143- 'Rendering period' ,
144- period . isIdle ? 'idle' : 'active' ,
145- 'from' ,
146- periodStart ,
147- 'to' ,
148- periodEnd
149- ) ;
150-
151130 // Calculate the position and height of the idle box
152131 const { top, height } = calculateBoxPosition (
153132 calendarEl ,
@@ -252,9 +231,9 @@ const activityStatusPlugin: PluginDef = createPlugin({
252231 name : '@solidtime/activity-status' ,
253232
254233 optionRefiners : {
255- activityPeriods : ( rawVal : any ) => {
234+ activityPeriods : ( rawVal : unknown ) : ActivityPeriod [ ] => {
256235 if ( ! Array . isArray ( rawVal ) ) return [ ] ;
257- return rawVal ;
236+ return rawVal as ActivityPeriod [ ] ;
258237 } ,
259238 } ,
260239} ) ;
0 commit comments