Refactors calendar event rendering and management

Improves code organization and maintainability by separating concerns related to all-day event rendering, header management, and event resizing.

Moves all-day event rendering logic into a dedicated `AllDayEventRenderer` class, utilizing the factory pattern for event element creation.

Refactors `AllDayManager` to handle all-day row height animations, separated from `HeaderManager`.

Removes the `ResizeManager` and related functionality.

These changes aim to reduce code duplication, improve testability, and enhance the overall architecture of the calendar component.
This commit is contained in:
Janus Knudsen 2025-09-12 00:36:02 +02:00
parent e0b83ebd70
commit c07d83d86f
13 changed files with 599 additions and 1306 deletions

View file

@ -102,7 +102,7 @@ swp-header-cell,
swp-time-cell,
swp-day-cell,
swp-events-container,
swp-event,
swp-day-columns swp-event,
swp-loading-overlay,
swp-nav-group,
swp-nav-button,
@ -117,7 +117,7 @@ swp-date-range,
swp-day-name,
swp-day-date,
swp-event-time,
swp-event-title,
swp-day-columns swp-event-title,
swp-spinner {
display: block;
}
@ -151,11 +151,11 @@ swp-spinner {
swp-calendar-container,
swp-calendar-grid,
swp-day-column,
swp-event,
swp-event-group,
swp-day-columns swp-event,
swp-day-columns swp-event-group,
swp-time-axis,
swp-event-title,
swp-event-time {
swp-day-columns swp-event-title,
swp-day-columns swp-event-time {
user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
@ -163,8 +163,8 @@ swp-event-time {
}
/* Enable text selection for events when double-clicked */
swp-event.text-selectable swp-event-title,
swp-event.text-selectable swp-event-time {
swp-day-columns swp-event.text-selectable swp-day-columns swp-event-title,
swp-day-columns swp-event.text-selectable swp-day-columns swp-event-time {
user-select: text;
-webkit-user-select: text;
-moz-user-select: text;