@forcecalendar/interface 1.0.29 → 1.0.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forcecalendar/interface",
3
- "version": "1.0.29",
3
+ "version": "1.0.31",
4
4
  "type": "module",
5
5
  "description": "Official interface layer for forceCalendar Core - Enterprise calendar components",
6
6
  "main": "dist/force-calendar-interface.umd.js",
@@ -347,7 +347,10 @@ export class EventForm extends BaseComponent {
347
347
  this.endInput.value = this.formatDateForInput(this._formData.end);
348
348
  this.updateColorSelection();
349
349
 
350
- // Focus trapping
350
+ // Clean up previous focus trap before creating a new one
351
+ if (this._cleanupFocusTrap) {
352
+ this._cleanupFocusTrap();
353
+ }
351
354
  this._cleanupFocusTrap = DOMUtils.trapFocus(this.modalContent);
352
355
  }
353
356
  }
@@ -71,7 +71,11 @@ class StateManager {
71
71
 
72
72
  // State management
73
73
  getState() {
74
- return { ...this.state };
74
+ return {
75
+ ...this.state,
76
+ config: { ...this.state.config },
77
+ events: [...this.state.events]
78
+ };
75
79
  }
76
80
 
77
81
  setState(updates, options = {}) {
@@ -182,7 +182,7 @@ export class DayViewRenderer extends BaseViewRenderer {
182
182
  const date = new Date(dayEl.dataset.date);
183
183
  const rect = dayEl.getBoundingClientRect();
184
184
  const scrollContainer = this.container.querySelector('#day-scroll-container');
185
- const y = e.clientY - rect.top + (scrollContainer ? scrollContainer.scrollTop : 0);
185
+ const y = e.clientY - rect.top;
186
186
 
187
187
  // Calculate time from click position
188
188
  date.setHours(
@@ -161,7 +161,7 @@ export class WeekViewRenderer extends BaseViewRenderer {
161
161
  const date = new Date(dayEl.dataset.date);
162
162
  const rect = dayEl.getBoundingClientRect();
163
163
  const scrollContainer = this.container.querySelector('#week-scroll-container');
164
- const y = e.clientY - rect.top + (scrollContainer ? scrollContainer.scrollTop : 0);
164
+ const y = e.clientY - rect.top;
165
165
 
166
166
  // Calculate time from click position
167
167
  date.setHours(