Refactors view management in calendar component
Introduces ViewSelectorManager to handle view state and UI interactions Separates view logic from configuration management Adds explicit tracking of current calendar view Enhances view selection and state management Improves modularity and separation of concerns
This commit is contained in:
parent
c1e0da056c
commit
29ba0bfa37
6 changed files with 162 additions and 123 deletions
|
|
@ -3,6 +3,7 @@ import { IGridSettings } from './GridSettings';
|
|||
import { IDateViewSettings } from './DateViewSettings';
|
||||
import { ITimeFormatConfig } from './TimeFormatConfig';
|
||||
import { IWorkWeekSettings } from './WorkWeekSettings';
|
||||
import { CalendarView } from '../types/CalendarTypes';
|
||||
|
||||
/**
|
||||
* All-day event layout constants
|
||||
|
|
@ -65,6 +66,7 @@ export class Configuration {
|
|||
public dateViewSettings: IDateViewSettings;
|
||||
public timeFormatConfig: ITimeFormatConfig;
|
||||
public currentWorkWeek: string;
|
||||
public currentView: CalendarView;
|
||||
public selectedDate: Date;
|
||||
public apiEndpoint: string = '/api';
|
||||
|
||||
|
|
@ -74,6 +76,7 @@ export class Configuration {
|
|||
dateViewSettings: IDateViewSettings,
|
||||
timeFormatConfig: ITimeFormatConfig,
|
||||
currentWorkWeek: string,
|
||||
currentView: CalendarView,
|
||||
selectedDate: Date = new Date()
|
||||
) {
|
||||
this.config = config;
|
||||
|
|
@ -81,6 +84,7 @@ export class Configuration {
|
|||
this.dateViewSettings = dateViewSettings;
|
||||
this.timeFormatConfig = timeFormatConfig;
|
||||
this.currentWorkWeek = currentWorkWeek;
|
||||
this.currentView = currentView;
|
||||
this.selectedDate = selectedDate;
|
||||
|
||||
// Store as singleton instance for web components
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue