Some ignored filles was missing
This commit is contained in:
parent
7db22245e2
commit
fd5ab6bc0d
268 changed files with 31970 additions and 4 deletions
85
wwwroot/js/configurations/CalendarConfig.js
Normal file
85
wwwroot/js/configurations/CalendarConfig.js
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
/**
|
||||
* All-day event layout constants
|
||||
*/
|
||||
export const ALL_DAY_CONSTANTS = {
|
||||
EVENT_HEIGHT: 22,
|
||||
EVENT_GAP: 2,
|
||||
CONTAINER_PADDING: 4,
|
||||
MAX_COLLAPSED_ROWS: 4,
|
||||
get SINGLE_ROW_HEIGHT() {
|
||||
return this.EVENT_HEIGHT + this.EVENT_GAP; // 28px
|
||||
}
|
||||
};
|
||||
/**
|
||||
* Work week presets - Configuration data
|
||||
*/
|
||||
export const WORK_WEEK_PRESETS = {
|
||||
'standard': {
|
||||
id: 'standard',
|
||||
workDays: [1, 2, 3, 4, 5],
|
||||
totalDays: 5,
|
||||
firstWorkDay: 1
|
||||
},
|
||||
'compressed': {
|
||||
id: 'compressed',
|
||||
workDays: [1, 2, 3, 4],
|
||||
totalDays: 4,
|
||||
firstWorkDay: 1
|
||||
},
|
||||
'midweek': {
|
||||
id: 'midweek',
|
||||
workDays: [3, 4, 5],
|
||||
totalDays: 3,
|
||||
firstWorkDay: 3
|
||||
},
|
||||
'weekend': {
|
||||
id: 'weekend',
|
||||
workDays: [6, 7],
|
||||
totalDays: 2,
|
||||
firstWorkDay: 6
|
||||
},
|
||||
'fullweek': {
|
||||
id: 'fullweek',
|
||||
workDays: [1, 2, 3, 4, 5, 6, 7],
|
||||
totalDays: 7,
|
||||
firstWorkDay: 1
|
||||
}
|
||||
};
|
||||
/**
|
||||
* Configuration - DTO container for all configuration
|
||||
* Pure data object loaded from JSON via ConfigManager
|
||||
*/
|
||||
export class Configuration {
|
||||
constructor(config, gridSettings, dateViewSettings, timeFormatConfig, currentWorkWeek, currentView, selectedDate = new Date()) {
|
||||
this.apiEndpoint = '/api';
|
||||
this.config = config;
|
||||
this.gridSettings = gridSettings;
|
||||
this.dateViewSettings = dateViewSettings;
|
||||
this.timeFormatConfig = timeFormatConfig;
|
||||
this.currentWorkWeek = currentWorkWeek;
|
||||
this.currentView = currentView;
|
||||
this.selectedDate = selectedDate;
|
||||
// Store as singleton instance for web components
|
||||
Configuration._instance = this;
|
||||
}
|
||||
/**
|
||||
* Get the current Configuration instance
|
||||
* Used by web components that can't use dependency injection
|
||||
*/
|
||||
static getInstance() {
|
||||
if (!Configuration._instance) {
|
||||
throw new Error('Configuration has not been initialized. Call ConfigManager.load() first.');
|
||||
}
|
||||
return Configuration._instance;
|
||||
}
|
||||
setSelectedDate(date) {
|
||||
this.selectedDate = date;
|
||||
}
|
||||
getWorkWeekSettings() {
|
||||
return WORK_WEEK_PRESETS[this.currentWorkWeek] || WORK_WEEK_PRESETS['standard'];
|
||||
}
|
||||
}
|
||||
Configuration._instance = null;
|
||||
// Backward compatibility alias
|
||||
export { Configuration as CalendarConfig };
|
||||
//# sourceMappingURL=CalendarConfig.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue