Commit graph

34 commits

Author SHA1 Message Date
Janus C. H. Knudsen
b566aafb19 Refactors calendar managers to components
Reorganizes navigation, view selector, and workweek preset managers into separate component files

Improves code organization by moving specialized manager classes to a more descriptive components directory

Adds enhanced logging for all-day event management and drag-and-drop interactions
2025-11-08 14:30:18 +01:00
Janus C. H. Knudsen
bd8f5ae6c6 Adds navigation buttons management and refactors navigation
Introduces NavigationButtonsManager to handle navigation button interactions
Renames NavigationRenderer to WeekInfoRenderer for clarity
Adds new NAV_BUTTON_CLICKED event for better separation of concerns

Improves event-driven navigation workflow
2025-11-07 23:23:19 +01:00
Janus C. H. Knudsen
29ba0bfa37 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
2025-11-07 23:07:00 +01:00
Janus C. H. Knudsen
c72ab9aaf1 Adds WorkweekPresetsManager and ConfigManager integration
Registers new managers in the dependency injection container
Exposes WorkweekPresetsManager and ConfigManager in calendar debugging context

Enhances calendar initialization with additional management capabilities
2025-11-07 21:05:59 +01:00
Janus C. H. Knudsen
04b6847f55 Remove DragHoverManager and update hover styles
Replaces custom hover tracking with native CSS :hover pseudo-class
Simplifies event hover handling by removing dedicated manager

Reduces complexity of hover interactions
2025-11-06 21:11:45 +01:00
Janus C. H. Knudsen
3b6f0407fb Refactors event rendering and drag-and-drop logic
Simplifies event drag handling by removing redundant clone management
Optimizes single column event rendering and cleanup process
Removes unnecessary logging and console output
Improves event update and re-rendering strategies

Enhances performance and reduces complexity in event manipulation
2025-11-06 21:11:22 +01:00
Janus C. H. Knudsen
a1bee99d8e Refactor offline-first architecture with IndexedDB
Improves dependency injection and service initialization for IndexedDB-based calendar application

Implements lazy initialization for IndexedDB
Fixes race conditions in async event handling
Adds proper dependency injection with registerType
Enhances sync manager and repository pattern

Key improvements:
- Lazy database initialization
- Proper service lifecycle management
- Improved network awareness for sync operations
- Cleaned up initialization logic in index.ts
2025-11-05 20:35:21 +01:00
Janus C. H. Knudsen
e7011526e3 Implements offline-first calendar sync infrastructure
Adds IndexedDB and operation queue for robust offline synchronization
Introduces SyncManager to handle background data synchronization
Supports local event operations with automatic remote sync queuing

Enhances application reliability and user experience in low/no connectivity scenarios
2025-11-05 00:37:57 +01:00
Janus C. H. Knudsen
989c9bd69d Batch update, WIP 2025-11-03 22:04:37 +01:00
Janus C. H. Knudsen
8ec5f52872 Adds I-prefix to all interfaces 2025-11-03 21:30:50 +01:00
Janus C. H. Knudsen
80aaab46f2 WIP on master 2025-11-03 14:54:57 +01:00
Janus C. H. Knudsen
1ae4f00f2b Refactor renderer interfaces and update type names
Renames renderer interfaces to use 'I' prefix for clarity
Updates type references across related files
Improves type consistency in rendering strategies
2025-11-01 16:28:45 +01:00
Janus C. H. Knudsen
cda201301c Remove resource calendar mode support
Simplifies calendar configuration and removes resource-specific code paths

Eliminates complexity around resource-based calendar rendering by:
- Removing ResourceCalendarData type
- Removing resource-specific renderers and managers
- Streamlining event and grid management logic
- Consolidating to single date-based calendar implementation
2025-11-01 01:10:10 +01:00
Janus C. H. Knudsen
349e1e8293 Refactor CalendarConfig to static configuration class
Converts CalendarConfig to a pure static configuration management class with improved initialization and dependency handling

Removes event bus dependencies and simplifies configuration loading
Adds static methods for config management and initialization
Improves flexibility and reduces class complexity
2025-10-31 15:26:07 +01:00
Janus C. H. Knudsen
8bbb2f05d3 Refactors dependency injection and configuration management
Replaces global singleton configuration with dependency injection
Introduces more modular and testable approach to configuration
Removes direct references to calendarConfig in multiple components
Adds explicit configuration passing to constructors

Improves code maintainability and reduces global state dependencies
2025-10-30 23:47:30 +01:00
Janus C. H. Knudsen
fb48e410ea Refactors calendar configuration and DI container setup
Removes singleton export for CalendarConfig
Updates dependency injection to use type registration
Adds more flexible renderer and service configuration
Integrates CalendarConfig with DateService initialization
2025-10-30 22:05:06 +01:00
Janus C. H. Knudsen
10cb3792f4 Updates build config and removes unused dependencies
Migrates from Brandi DI to @novadi/core dependency injection
Simplifies project structure by removing deprecated modules
Adds Novadi unplugin to esbuild configuration for enhanced build process
2025-10-30 21:46:38 +01:00
Janus C. H. Knudsen
a80e4a7603 Implements dependency injection with Brandi
Replaces manual manager creation with Brandi DI container
for improved dependency management and testability.

Removes the ManagerFactory and its usages.
2025-10-15 20:09:12 +02:00
Janus C. H. Knudsen
f7c67e6253 Implements dependency injection with Brandi
Introduces Brandi DI container for managing application dependencies.

This change replaces the existing factory pattern with a proper
dependency injection mechanism, improving code modularity,
testability, and maintainability. It configures all managers and core
services within the container, ensuring proper dependency resolution.
2025-10-14 22:53:28 +02:00
Janus C. H. Knudsen
6bbf2d8adb Refactors date handling with DateService
Replaces DateCalculator with DateService for improved date and time operations, including timezone handling.

This change enhances the calendar's accuracy and flexibility in managing dates, especially concerning timezone configurations.
It also corrects a typo in the `allDay` dataset attribute.
2025-10-03 20:50:40 +02:00
Janus C. H. Knudsen
48d1fd681c Major refactor into type safe TS
With a risk oof rolling it all back
2025-09-23 20:44:15 +02:00
Janus Knudsen
ff067cfac3 Implements event overlap rendering
Adds logic to handle event overlaps in the calendar view. It introduces two patterns: column sharing for events with the same start time (rendered using flexbox) and stacking for events with a >30 min difference (rendered with reduced width and z-index).

It also introduces deep linking to specific events via URL parameters.
2025-09-04 00:16:35 +02:00
Janus Knudsen
2083c6921e Refactors calendar configuration and event handling
Streamlines calendar configuration by adopting a singleton pattern for consistent access and simplifies event handling.

- Removes direct `CalendarConfig` dependency injection in favor of the `calendarConfig` singleton, reducing code complexity.
- Replaces specific event emissions for grid, date, and resource settings updates with a general `REFRESH_REQUESTED` event.
- Updates event names to be more descriptive and consistent ("NAVIGATION_COMPLETED", "PERIOD_INFO_UPDATE").
- Removes the need to pass the calendar config to renderers since it is now a singleton.

This improves code maintainability and simplifies the event emission process.
2025-09-03 20:04:47 +02:00
Janus Knudsen
b8b44ddae8 Refactors DateCalculator to be a static class
This change refactors the DateCalculator class to be a static class.
This removes the need to instantiate DateCalculator in multiple
managers and renderers, simplifying dependency management and
ensuring consistent date calculations across the application.
The configuration is now initialized once at the application start.
2025-09-03 18:38:52 +02:00
Janus Knudsen
fafad16926 Removes excessive logging statements
Cleans up the codebase by removing unnecessary console log statements.

These logs were primarily used for debugging and are no longer needed in the production code.
This reduces noise in the console and improves overall performance.
2025-08-31 22:39:09 +02:00
Janus Knudsen
26f0cb8aaa Refactors calendar initialization with factory
Implements a factory pattern for manager creation and
initialization, improving dependency management and
extensibility.

This change replaces direct manager instantiation with a
`ManagerFactory` that handles dependency injection. This
enhances code organization and testability. It also includes
an initialization sequence diagram for better understanding
of the calendar's architecture and data flow.
2025-08-17 23:44:30 +02:00
Janus Knudsen
32ee35eb02 Refactors grid and navigation rendering
Attempt 1
2025-08-17 22:54:00 +02:00
Janus Knudsen
a03f314c4a Refactors event rendering to be event-driven
Moves event rendering logic into a dedicated EventRenderer class that uses a strategy pattern for different calendar types.

The rendering is now triggered by `GRID_RENDERED` and `CONTAINER_READY_FOR_EVENTS` events, emitted by the GridManager and NavigationManager respectively.

This change decouples the CalendarManager from direct event rendering and allows for more flexible and efficient event updates. The EventManager now has a method to fetch events for a given time period.

Removes direct calls to event rendering from CalendarManager. Improves animation transitions by using pre-rendered containers in the NavigationManager.
2025-08-16 00:51:12 +02:00
Janus Knudsen
b111f121ba wip 2025-08-09 01:16:04 +02:00
Janus Knudsen
59b3c64c55 Major refactorering to get a hold on all these events 2025-08-09 00:31:44 +02:00
Janus Knudsen
29811fd4b5 Renaming part 1 2025-08-07 00:15:44 +02:00
Janus Knudsen
9f6d4333cb Implements custom scroll and event logging
Adds custom scroll management for the calendar week view, replacing native scrollbars with a custom handle.

Introduces categorized event logging with console grouping and styling, enhancing debug output. It also allows configuring logging for specific event categories.
2025-07-29 00:52:01 +02:00
Janus Knudsen
b443649ced Improves grid layout and navigation
Refactors the calendar grid to support smoother navigation transitions by using separate week containers.

This change introduces a GridManager to handle grid rendering and interactions within these containers, enabling scroll synchronization and click event handling for each week view.

Also, configures the calendar to start at midnight and span a full 24-hour day, providing a more comprehensive view.
2025-07-25 00:24:15 +02:00
Janus Knudsen
f06c02121c Initial commit: Calendar Plantempus project setup with TypeScript, ASP.NET Core, and event-driven architecture 2025-07-24 22:17:38 +02:00