Enhances date validation and timezone handling using DateService, ensuring data integrity and consistency.
Refactors event rendering and dragging to correctly handle date transformations.
Adds a test plan for event stacking and z-index management.
Fixes edge cases in navigation and date calculations for week/year boundaries and DST transitions.
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.
Addresses two key issues related to dragging events to the header: the premature removal of the original event element and the creation of duplicate all-day events.
The original event is no longer removed when dragging to the header; it is now only removed upon a successful drop.
Also, it prevents the creation of duplicate all-day events by checking for existing all-day events before creating new ones, using DOM queries to ensure accurate state.
Improves drag and drop event handling, including conversion between all-day and timed events.
Introduces HeaderManager to handle header-related event logic and
centralizes header event handling for better code organization and
separation of concerns.
Optimizes event listeners and throttles events for improved performance.
Removes redundant code and improves the overall drag and drop
experience.
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.
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.
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.
Improves event rendering by introducing dedicated event
renderers and streamlining event display logic.
- Adds a base event renderer and specialized date and
resource-based renderers to handle event display logic.
- Renders all-day events within a dedicated container in the
calendar header.
- Removes the direct filtering of all-day events from the
`GridManager`.
- Fixes an issue where the 'Summer Festival' event started on the
wrong date.
The changes enhance the flexibility and maintainability of the
calendar, provide dedicated containers and styling for allday events and fix date issues related to certain events
Implements a fuzzy search filter system using Fuse.js to enhance event searching.
This system allows users to quickly find events by typing partial matches of event titles or descriptions, providing visual feedback by dimming non-matching events. The filter persists during navigation and includes escape key support for quick clearing. It also includes performance optimizations like requestAnimationFrame debouncing.
Updates the codebase to utilize `CalendarMode` instead of the deprecated `CalendarType`.
Simplifies `CalendarConfig` by removing legacy methods and related type aliases, enhancing code maintainability and clarity.
Improves event rendering by ensuring `GRID_RENDERED` events include explicit start and end dates, preventing errors and ensuring correct data filtering.
Improves calendar performance and data flow by streamlining event emissions and grid rendering logic.
- Replaces generic CONFIG_UPDATE events with REFRESH_REQUESTED
for more specific refresh triggers.
- Removes redundant grid re-renders on DATE_CHANGED and
WEEK_CHANGED events, delegating navigation to NavigationManager.
- Introduces VIEW_CHANGED and DATE_CHANGED events for calendar
mode and date selection, respectively.
- NavigationManager now handles date validation.
- Moves rendering logic from NavigationManager to NavigationRenderer.
- Syncs scroll position based on PERIOD_CHANGED instead of
NAVIGATION_ANIMATION_COMPLETE.
This change optimizes the calendar's responsiveness and reduces
unnecessary re-renders, leading to a smoother user experience.
Migrates the application to use a new CoreEvents system.
This change removes the legacy EventTypes constant file and updates all managers, renderers, and core components to use the CoreEvents constant file for event emission and subscription.
This improves code maintainability and promotes a consistent eventing strategy across the application. Adds validation to EventBus emit and extractCategory functions.
Centralizes date calculation logic into a dedicated DateCalculator
class for improved maintainability and testability.
Removes redundant date calculation methods from CalendarManager,
ColumnRenderer, HeaderRenderer and NavigationRenderer, and utilizes
the DateCalculator for these calculations.
Updates components to use DateCalculator for consistent date
handling, including week start determination, date formatting,
and "is today" checks.
Refactors how the calendar week information is updated to use the actual rendered column dates, ensuring accuracy after workweek changes. It also adjusts event rendering to target the swp-calendar-container element, preventing rendering issues. The change also addresses a styling issue that was preventing the scroll bar from appearing in the correct location.
Implements configurable work week presets, allowing users to customize the days displayed in the calendar.
This includes:
- Defining work week settings (work days, day names, total days).
- Providing predefined work week presets (standard, compressed, weekend, full week).
- Adding UI elements to switch between presets.
- Updating grid and header rendering logic to reflect the selected work week.
- Emitting events when the work week changes, triggering necessary UI updates and data re-renders.
This provides a more flexible and personalized calendar experience.
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.
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.
Improves resource calendar mode by passing resource data
to the grid manager for rendering, enabling specific
resource-based views. Also, it stores raw event data
to improve data management.