Batch update, WIP

This commit is contained in:
Janus C. H. Knudsen 2025-11-03 22:04:37 +01:00
parent 8ec5f52872
commit 989c9bd69d
25 changed files with 68 additions and 123 deletions

View file

@ -1,7 +1,7 @@
// All-day row height management and animations
import { eventBus } from '../core/EventBus';
import { ALL_DAY_CONSTANTS } from '../configuration/CalendarConfig';
import { ALL_DAY_CONSTANTS } from '../configurations/CalendarConfig';
import { AllDayEventRenderer } from '../renderers/AllDayEventRenderer';
import { AllDayLayoutEngine, IEventLayout } from '../utils/AllDayLayoutEngine';
import { IColumnBounds, ColumnDetectionUtils } from '../utils/ColumnDetectionUtils';

View file

@ -1,5 +1,5 @@
import { CoreEvents } from '../constants/CoreEvents';
import { Configuration } from '../configuration/CalendarConfig';
import { Configuration } from '../configurations/CalendarConfig';
import { CalendarView, IEventBus } from '../types/CalendarTypes';
import { EventManager } from './EventManager';
import { GridManager } from './GridManager';
@ -206,7 +206,7 @@ export class CalendarManager {
this.eventBus.emit('workweek:header-update', {
currentDate: this.currentDate,
currentView: this.currentView,
workweek: this.config.getCurrentWorkWeek()
workweek: this.config.currentWorkWeek
});
}

View file

@ -8,7 +8,7 @@
import { ICalendarEvent } from '../types/CalendarTypes';
import { EventStackManager, IEventGroup, IStackLink } from './EventStackManager';
import { PositionUtils } from '../utils/PositionUtils';
import { Configuration } from '../configuration/CalendarConfig';
import { Configuration } from '../configurations/CalendarConfig';
export interface IGridGroupLayout {
events: ICalendarEvent[];
@ -59,7 +59,7 @@ export class EventLayoutCoordinator {
// Find events that could be in GRID with first event
// Use expanding search to find chains (A→B→C where each conflicts with next)
const gridSettings = this.config.getGridSettings();
const gridSettings = this.config.gridSettings;
const thresholdMinutes = gridSettings.gridStartThresholdMinutes;
// Use refactored method for expanding grid candidates

View file

@ -1,6 +1,6 @@
import { IEventBus, ICalendarEvent } from '../types/CalendarTypes';
import { CoreEvents } from '../constants/CoreEvents';
import { Configuration } from '../configuration/CalendarConfig';
import { Configuration } from '../configurations/CalendarConfig';
import { DateService } from '../utils/DateService';
import { IEventRepository } from '../repositories/IEventRepository';

View file

@ -14,7 +14,7 @@
*/
import { ICalendarEvent } from '../types/CalendarTypes';
import { Configuration } from '../configuration/CalendarConfig';
import { Configuration } from '../configurations/CalendarConfig';
export interface IStackLink {
prev?: string; // Event ID of previous event in stack
@ -51,7 +51,7 @@ export class EventStackManager {
if (events.length === 0) return [];
// Get threshold from config
const gridSettings = this.config.getGridSettings();
const gridSettings = this.config.gridSettings;
const thresholdMinutes = gridSettings.gridStartThresholdMinutes;
// Sort events by start time

View file

@ -1,5 +1,5 @@
import { eventBus } from '../core/EventBus';
import { Configuration } from '../configuration/CalendarConfig';
import { Configuration } from '../configurations/CalendarConfig';
import { CoreEvents } from '../constants/CoreEvents';
import { IHeaderRenderer, IHeaderRenderContext } from '../renderers/DateHeaderRenderer';
import { IDragMouseEnterHeaderEventPayload, IDragMouseLeaveHeaderEventPayload, IHeaderReadyEventPayload } from '../types/EventTypes';

View file

@ -1,6 +1,6 @@
import { eventBus } from '../core/EventBus';
import { CoreEvents } from '../constants/CoreEvents';
import { Configuration } from '../configuration/CalendarConfig';
import { Configuration } from '../configurations/CalendarConfig';
import { IResizeEndEventPayload } from '../types/EventTypes';
type SwpEventEl = HTMLElement & { updateHeight?: (h: number) => void };
@ -33,7 +33,7 @@ export class ResizeHandleManager {
constructor(config: Configuration) {
this.config = config;
const grid = this.config.getGridSettings();
const grid = this.config.gridSettings;
this.hourHeightPx = grid.hourHeight;
this.snapMin = grid.snapInterval;
this.minDurationMin = this.snapMin; // Use snap interval as minimum duration

View file

@ -1,5 +1,5 @@
import { CalendarView, IEventBus } from '../types/CalendarTypes';
import { Configuration } from '../configuration/CalendarConfig';
import { Configuration } from '../configurations/CalendarConfig';
import { CoreEvents } from '../constants/CoreEvents';
@ -113,7 +113,7 @@ export class ViewManager {
this.updateButtonGroup(
this.getWorkweekButtons(),
'data-workweek',
this.config.getCurrentWorkWeek()
this.config.currentWorkWeek
);
}

View file

@ -1,7 +1,7 @@
// Work hours management for per-column scheduling
import { DateService } from '../utils/DateService';
import { Configuration } from '../configuration/CalendarConfig';
import { Configuration } from '../configurations/CalendarConfig';
import { PositionUtils } from '../utils/PositionUtils';
/**
@ -102,7 +102,7 @@ export class WorkHoursManager {
return null; // Full day will be colored via CSS background
}
const gridSettings = this.config.getGridSettings();
const gridSettings = this.config.gridSettings;
const dayStartHour = gridSettings.dayStartHour;
const hourHeight = gridSettings.hourHeight;