@forcecalendar/core 2.1.51 → 2.1.53

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.
@@ -320,16 +320,11 @@ export class ConflictDetector {
320
320
  return conflicts;
321
321
  }
322
322
 
323
- const conflictingAttendees = [];
324
-
325
- for (const attendee1 of event1.attendees) {
326
- for (const attendee2 of event2.attendees) {
327
- if (attendee1.email === attendee2.email) {
328
- // Same attendee in both events
329
- conflictingAttendees.push(attendee1.email);
330
- }
331
- }
332
- }
323
+ // Use Set for O(1) lookup instead of O(n*m) nested loops
324
+ const emails1 = new Set(event1.attendees.map(a => a.email));
325
+ const conflictingAttendees = event2.attendees
326
+ .filter(a => emails1.has(a.email))
327
+ .map(a => a.email);
333
328
 
334
329
  if (conflictingAttendees.length > 0) {
335
330
  // Determine severity based on attendee responses
@@ -662,9 +662,11 @@ export class EventStore {
662
662
  loadEvents(events) {
663
663
  this.clear();
664
664
 
665
+ this.startBatch();
665
666
  for (const eventData of events) {
666
667
  this.addEvent(eventData);
667
668
  }
669
+ this.commitBatch();
668
670
  }
669
671
 
670
672
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forcecalendar/core",
3
- "version": "2.1.51",
3
+ "version": "2.1.53",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "description": "A modern, lightweight, framework-agnostic calendar engine optimized for Salesforce",