Batch update, WIP
This commit is contained in:
parent
8ec5f52872
commit
989c9bd69d
25 changed files with 68 additions and 123 deletions
|
|
@ -1,6 +1,6 @@
|
|||
// Column rendering strategy interface and implementations
|
||||
|
||||
import { Configuration } from '../configuration/CalendarConfig';
|
||||
import { Configuration } from '../configurations/CalendarConfig';
|
||||
import { DateService } from '../utils/DateService';
|
||||
import { WorkHoursManager } from '../managers/WorkHoursManager';
|
||||
|
||||
|
|
@ -36,10 +36,10 @@ export class DateColumnRenderer implements IColumnRenderer {
|
|||
|
||||
render(columnContainer: HTMLElement, context: IColumnRenderContext): void {
|
||||
const { currentWeek, config } = context;
|
||||
|
||||
|
||||
const workWeekSettings = config.getWorkWeekSettings();
|
||||
const dates = this.dateService.getWorkWeekDates(currentWeek, workWeekSettings.workDays);
|
||||
const dateSettings = config.getDateViewSettings();
|
||||
const dateSettings = config.dateViewSettings;
|
||||
const daysToShow = dates.slice(0, dateSettings.weekDays);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// Header rendering strategy interface and implementations
|
||||
|
||||
import { Configuration } from '../configuration/CalendarConfig';
|
||||
import { Configuration } from '../configurations/CalendarConfig';
|
||||
import { DateService } from '../utils/DateService';
|
||||
|
||||
/**
|
||||
|
|
@ -33,13 +33,13 @@ export class DateHeaderRenderer implements IHeaderRenderer {
|
|||
calendarHeader.appendChild(allDayContainer);
|
||||
|
||||
// Initialize date service with timezone and locale from config
|
||||
const timezone = config.getTimezone();
|
||||
const locale = config.getLocale();
|
||||
const timezone = config.timeFormatConfig.timezone;
|
||||
const locale = config.timeFormatConfig.locale;
|
||||
this.dateService = new DateService(config);
|
||||
|
||||
const workWeekSettings = config.getWorkWeekSettings();
|
||||
const dates = this.dateService.getWorkWeekDates(currentWeek, workWeekSettings.workDays);
|
||||
const weekDays = config.getDateViewSettings().weekDays;
|
||||
const weekDays = config.dateViewSettings.weekDays;
|
||||
const daysToShow = dates.slice(0, weekDays);
|
||||
|
||||
daysToShow.forEach((date, index) => {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Event rendering strategy interface and implementations
|
||||
|
||||
import { ICalendarEvent } from '../types/CalendarTypes';
|
||||
import { Configuration } from '../configuration/CalendarConfig';
|
||||
import { Configuration } from '../configurations/CalendarConfig';
|
||||
import { SwpEventElement } from '../elements/SwpEventElement';
|
||||
import { PositionUtils } from '../utils/PositionUtils';
|
||||
import { IColumnBounds } from '../utils/ColumnDetectionUtils';
|
||||
|
|
@ -312,7 +312,7 @@ export class DateEventRenderer implements IEventRenderer {
|
|||
// (e.g., if container starts at 07:00 and event starts at 08:15, offset = 75 min)
|
||||
const timeDiffMs = event.start.getTime() - containerStart.getTime();
|
||||
const timeDiffMinutes = timeDiffMs / (1000 * 60);
|
||||
const gridSettings = this.config.getGridSettings();
|
||||
const gridSettings = this.config.gridSettings;
|
||||
const relativeTop = timeDiffMinutes > 0 ? (timeDiffMinutes / 60) * gridSettings.hourHeight : 0;
|
||||
|
||||
// Events in grid columns are positioned absolutely within their column container
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Configuration } from '../configuration/CalendarConfig';
|
||||
import { Configuration } from '../configurations/CalendarConfig';
|
||||
import { CalendarView } from '../types/CalendarTypes';
|
||||
import { IColumnRenderer, IColumnRenderContext } from './ColumnRenderer';
|
||||
import { eventBus } from '../core/EventBus';
|
||||
|
|
@ -179,7 +179,7 @@ export class GridRenderer {
|
|||
private createOptimizedTimeAxis(): HTMLElement {
|
||||
const timeAxis = document.createElement('swp-time-axis');
|
||||
const timeAxisContent = document.createElement('swp-time-axis-content');
|
||||
const gridSettings = this.config.getGridSettings();
|
||||
const gridSettings = this.config.gridSettings;
|
||||
const startHour = gridSettings.dayStartHour;
|
||||
const endHour = gridSettings.dayEndHour;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue