Initial commit: Calendar Plantempus project setup with TypeScript, ASP.NET Core, and event-driven architecture
This commit is contained in:
commit
f06c02121c
38 changed files with 8233 additions and 0 deletions
50
src/index.ts
Normal file
50
src/index.ts
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
// Main entry point for Calendar Plantempus
|
||||
import { eventBus } from './core/EventBus.js';
|
||||
import { CalendarManager } from './managers/CalendarManager.js';
|
||||
import { NavigationManager } from './managers/NavigationManager.js';
|
||||
import { ViewManager } from './managers/ViewManager.js';
|
||||
import { EventManager } from './managers/EventManager.js';
|
||||
import { EventRenderer } from './managers/EventRenderer.js';
|
||||
import { CalendarConfig } from './core/CalendarConfig.js';
|
||||
|
||||
/**
|
||||
* Initialize the calendar application
|
||||
*/
|
||||
function initializeCalendar(): void {
|
||||
console.log('🗓️ Initializing Calendar Plantempus...');
|
||||
|
||||
// Create calendar configuration
|
||||
const config = new CalendarConfig();
|
||||
|
||||
// Initialize managers
|
||||
const calendarManager = new CalendarManager(eventBus, config);
|
||||
const navigationManager = new NavigationManager(eventBus);
|
||||
const viewManager = new ViewManager(eventBus);
|
||||
const eventManager = new EventManager(eventBus);
|
||||
const eventRenderer = new EventRenderer(eventBus);
|
||||
|
||||
// Enable debug mode for development
|
||||
eventBus.setDebug(true);
|
||||
|
||||
// Initialize all managers
|
||||
calendarManager.initialize();
|
||||
|
||||
console.log('✅ Calendar Plantempus initialized successfully with all core managers');
|
||||
|
||||
// Expose to window for debugging
|
||||
(window as any).calendarDebug = {
|
||||
eventBus,
|
||||
calendarManager,
|
||||
navigationManager,
|
||||
viewManager,
|
||||
eventManager,
|
||||
eventRenderer
|
||||
};
|
||||
}
|
||||
|
||||
// Initialize when DOM is ready
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', initializeCalendar);
|
||||
} else {
|
||||
initializeCalendar();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue