Some ignored filles was missing

This commit is contained in:
Janus C. H. Knudsen 2026-02-03 00:02:25 +01:00
parent 7db22245e2
commit fd5ab6bc0d
268 changed files with 31970 additions and 4 deletions

View file

@ -0,0 +1,55 @@
import { IColumnDataSource } from '../types/ColumnDataSource';
import { DateService } from '../utils/DateService';
import { Configuration } from '../configurations/CalendarConfig';
import { CalendarView } from '../types/CalendarTypes';
/**
* DateColumnDataSource - Provides date-based columns
*
* Calculates which dates to display based on:
* - Current date
* - Current view (day/week/month)
* - Workweek settings
*/
export declare class DateColumnDataSource implements IColumnDataSource {
private dateService;
private config;
private currentDate;
private currentView;
constructor(dateService: DateService, config: Configuration, currentDate: Date, currentView: CalendarView);
/**
* Get columns (dates) to display
*/
getColumns(): Date[];
/**
* Get type of datasource
*/
getType(): 'date' | 'resource';
/**
* Update current date
*/
setCurrentDate(date: Date): void;
/**
* Update current view
*/
setCurrentView(view: CalendarView): void;
/**
* Get dates for week view based on workweek settings
*/
private getWeekDates;
/**
* Get all dates in current month
*/
private getMonthDates;
/**
* Get ISO week start (Monday)
*/
private getISOWeekStart;
/**
* Get month start
*/
private getMonthStart;
/**
* Get month end
*/
private getMonthEnd;
}

View file

@ -0,0 +1,94 @@
/**
* DateColumnDataSource - Provides date-based columns
*
* Calculates which dates to display based on:
* - Current date
* - Current view (day/week/month)
* - Workweek settings
*/
export class DateColumnDataSource {
constructor(dateService, config, currentDate, currentView) {
this.dateService = dateService;
this.config = config;
this.currentDate = currentDate;
this.currentView = currentView;
}
/**
* Get columns (dates) to display
*/
getColumns() {
switch (this.currentView) {
case 'week':
return this.getWeekDates();
case 'month':
return this.getMonthDates();
case 'day':
return [this.currentDate];
default:
return this.getWeekDates();
}
}
/**
* Get type of datasource
*/
getType() {
return 'date';
}
/**
* Update current date
*/
setCurrentDate(date) {
this.currentDate = date;
}
/**
* Update current view
*/
setCurrentView(view) {
this.currentView = view;
}
/**
* Get dates for week view based on workweek settings
*/
getWeekDates() {
const weekStart = this.getISOWeekStart(this.currentDate);
const workWeekSettings = this.config.getWorkWeekSettings();
return this.dateService.getWorkWeekDates(weekStart, workWeekSettings.workDays);
}
/**
* Get all dates in current month
*/
getMonthDates() {
const dates = [];
const monthStart = this.getMonthStart(this.currentDate);
const monthEnd = this.getMonthEnd(this.currentDate);
const totalDays = Math.ceil((monthEnd.getTime() - monthStart.getTime()) / (1000 * 60 * 60 * 24)) + 1;
for (let i = 0; i < totalDays; i++) {
dates.push(this.dateService.addDays(monthStart, i));
}
return dates;
}
/**
* Get ISO week start (Monday)
*/
getISOWeekStart(date) {
const weekBounds = this.dateService.getWeekBounds(date);
return this.dateService.startOfDay(weekBounds.start);
}
/**
* Get month start
*/
getMonthStart(date) {
const year = date.getFullYear();
const month = date.getMonth();
return this.dateService.startOfDay(new Date(year, month, 1));
}
/**
* Get month end
*/
getMonthEnd(date) {
const nextMonth = this.dateService.addMonths(date, 1);
const firstOfNextMonth = this.getMonthStart(nextMonth);
return this.dateService.endOfDay(this.dateService.addDays(firstOfNextMonth, -1));
}
}
//# sourceMappingURL=DateColumnDataSource.js.map

View file

@ -0,0 +1 @@
{"version":3,"file":"DateColumnDataSource.js","sourceRoot":"","sources":["../../../src/datasources/DateColumnDataSource.ts"],"names":[],"mappings":"AAKA;;;;;;;GAOG;AACH,MAAM,OAAO,oBAAoB;IAM/B,YACE,WAAwB,EACxB,MAAqB,EACrB,WAAiB,EACjB,WAAyB;QAEzB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;IAED;;OAEG;IACI,UAAU;QACf,QAAQ,IAAI,CAAC,WAAW,EAAE,CAAC;YACzB,KAAK,MAAM;gBACT,OAAO,IAAI,CAAC,YAAY,EAAE,CAAC;YAC7B,KAAK,OAAO;gBACV,OAAO,IAAI,CAAC,aAAa,EAAE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