Introduces BaseEntityService and SyncPlugin to eliminate code duplication across entity services
Improves:
- Code reusability through inheritance and composition
- Sync infrastructure for all entity types
- Polymorphic sync status management
- Reduced boilerplate code by ~75%
Supports generic sync for Event, Booking, Customer, and Resource entities
Centralizes date calculation logic into DateColumnDataSource
Improves separation of concerns across rendering components
Key changes:
- Introduces IColumnInfo interface for flexible column data
- Moves date calculation from multiple managers to dedicated datasource
- Removes duplicate date rendering logic
- Prepares architecture for future resource-based views
Introduces DateColumnDataSource to centralize date column generation logic
Simplifies GridManager by delegating date calculations to dedicated data source
Enhances flexibility for different calendar views and date rendering strategies
Improves separation of concerns and makes calendar view management more modular
Removes redundant period info update event and consolidates week information calculation
Streamlines navigation event flow by using navigation completed event for week info updates
Removes separate week info update method and moves calculation into renderer
Reduces complexity of event management and improves code efficiency
Replaces getPeriodRange with getDisplayDates approach
Simplifies event rendering by using flexible date array
Updates event rendering to work with dynamic date lists
Improves code modularity and reduces complexity
Modifies element selectors for all-day events to use more specific tag names
Replaces generic 'swp-event' with 'swp-allday-event' in event removal
Adds exclusion for max event indicator elements when clearing events
Improves event removal process with enhanced fade-out and logging
Adds data-removing attribute to exclude events during height calculations
Prevents unnecessary removal of all-day events during drag operations
Enhances event rendering and management for better performance and user experience
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
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
Introduces originalSourceColumn to accurately track the starting column during drag events
Improves event rendering by ensuring correct column updates and maintaining drag context
Modifies drag end handling to use original source column for re-rendering
Adds async support for column rendering methods
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
Renames renderer interfaces to use 'I' prefix for clarity
Updates type references across related files
Improves type consistency in rendering strategies
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
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
Replaces manual manager creation with Brandi DI container
for improved dependency management and testability.
Removes the ManagerFactory and its usages.
Resets scroll state and stops edge scrolling when a drag event converts between all-day and timed events, preventing unexpected scrolling behavior during conversion.
Refactors drag and drop event handling for smoother updates.
Tracks the current mouse position during drag operations to improve the accuracy of position updates.
Adjusts edge scrolling behavior.
Refactors drag and drop to use the original element as the source and introduces edge scrolling.
This change aims to enhance the user experience during drag and drop operations by ensuring the correct element is used as the source, fixing issues, and by automatically scrolling the view when the dragged element reaches the edge of the scrollable area.
Adds edge scrolling to automatically scroll the calendar
when dragging an event near the edges of the view.
This improves the drag-and-drop experience by allowing users
to move events beyond the visible area.
Removes auto-scroll logic from the event renderer, centralizing
the scrolling behavior within the new edge scroll manager.
Streamlines drag and drop logic by removing unnecessary state variables
and simplifying column change handling, enhancing performance
and code maintainability.
Streamlines the conversion of all-day events to timed events during drag and drop operations. This change improves the event rendering process by ensuring proper handling of element replacement and position updates.
Removes redundant code and simplifies the logic for updating the dragged clone.
Implements drag-and-drop conversion from all-day events to timed events in day columns. This change introduces a new event type (`drag:mouseenter-column`) and delegates rendering logic to the `DateEventRenderer` to maintain architectural consistency.
Allows users to convert all-day events to timed events by dragging them over a day column.
This implementation adds logic to the DragDropManager to detect when an all-day event is dragged over a column.
It then emits a new event, 'drag:mouseenter-column', carrying the event data and target column information.
The event rendering service handles this event.
Adds locale support to the date header renderer and date service.
This change ensures that the day names are displayed correctly based on the user's configured locale.
The date header now uses the configured locale to display the day name in the correct language.
The day name is now displayed in uppercase.
Additionally, styles the date header to highlight today's date.
Enhances the visual feedback during and after event drag and drop operations in the calendar.
- Preserves the full opacity of the dragged event clone during the drag operation for better visibility.
- Applies a highlight class to the event after it's dropped to visually indicate the new location.
- Adds specific styling for the highlighted state based on event type.
Improves event dragging by tracking the source column and using the updated event data for re-rendering affected columns.
Also, enhances event resizing by updating the event data and re-rendering the column to recalculate stacking/grouping.
Uses snap interval as minimum duration when resizing.
Enhances the event drag and drop functionality by setting the initial position of the dragged event to prevent it from jumping to the top of the column.
Also adjust event transition for a smoother user experience.
Removes unused resize logic.
Refactors the event layout and stacking logic based on review feedback.
This includes:
- Merging conflicting event groups to prevent inconsistencies.
- Implementing minimal stack level assignment using a min-heap.
- Consolidating styling and using DateService for drag operations.
- Adding reflow after drag and drop.
- Improving the column event filtering to include events overlapping midnight.
- Ensuring explicit sorting of events for grid layout.
Moves complex layout determination logic (grid grouping, stack levels, positioning) from `EventRenderer` to a new `EventLayoutCoordinator` class.
Delegates layout responsibilities to the coordinator, significantly simplifying the `EventRenderer`'s `renderColumnEvents` method. Refines `EventStackManager` by removing deprecated layout methods, consolidating its role to event grouping and core stack level management.
Improves modularity and separation of concerns within the rendering pipeline.
Introduces a 3-phase algorithm in `EventStackManager` for dynamic event positioning. Groups events by start time proximity to determine optimal layout.
Optimizes horizontal space by using side-by-side grid columns for simultaneous events and allowing non-overlapping events to share stack levels. Supports nested stacking for late-arriving events within grid columns.
Includes comprehensive documentation (`STACKING_CONCEPT.md`) and a visual demonstration (`stacking-visualization.html`) to explain the new layout logic. Updates event rendering to utilize the new manager and adds extensive test coverage.
Relocates event CSS positioning logic from the `SwpEventElement` to the `DateEventRenderer`. This improves separation of concerns, making the renderer responsible for event layout.
Introduces web components for event elements, separating timed and all-day events into distinct components for better organization and reusability.
This change also simplifies event rendering and drag-and-drop operations by leveraging the properties and lifecycle methods of web components.
Refactors event rendering to handle transitive overlaps, ensuring that entire chains of overlapping events are correctly processed.
Fixes an issue where only direct overlaps were re-rendered after a drag and drop, leading to inconsistent stacking.
Now collects and re-renders all events in the stack.
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.
Standardizes date manipulation across the application by leveraging the DateService.
This change improves consistency and reduces code duplication by removing redundant date calculations.