@forcecalendar/core 2.1.40 → 2.1.42

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.
@@ -304,10 +304,20 @@ export class RecurrenceEngineV2 {
304
304
  } else if (rule.byDay && rule.byDay.length > 0) {
305
305
  // Nth weekday of month (e.g., "2nd Tuesday")
306
306
  const byDay = rule.byDay[0];
307
- const nthOccurrence = byDay.nth || 1;
307
+ let weekday, nthOccurrence;
308
+
309
+ if (typeof byDay === 'string') {
310
+ // Parse string format from RRuleParser: "MO", "2TU", "-1FR"
311
+ const match = byDay.match(/^(-?\d*)([A-Z]{2})$/);
312
+ weekday = match ? match[2] : byDay;
313
+ nthOccurrence = match && match[1] ? parseInt(match[1], 10) : 1;
314
+ } else {
315
+ weekday = byDay.weekday;
316
+ nthOccurrence = byDay.nth || 1;
317
+ }
308
318
 
309
319
  next.setMonth(next.getMonth() + rule.interval);
310
- this.setToNthWeekdayOfMonth(next, byDay.weekday, nthOccurrence);
320
+ this.setToNthWeekdayOfMonth(next, weekday, nthOccurrence);
311
321
  } else if (rule.bySetPos && rule.bySetPos.length > 0) {
312
322
  // BYSETPOS for selecting from set
313
323
  next.setMonth(next.getMonth() + rule.interval);
@@ -281,6 +281,8 @@ export class SearchWorkerManager {
281
281
 
282
282
  this.pendingSearches.push({
283
283
  id: searchId,
284
+ query,
285
+ options,
284
286
  resolve
285
287
  });
286
288
 
@@ -349,7 +351,14 @@ export class SearchWorkerManager {
349
351
  processPendingSearches() {
350
352
  // Re-trigger pending searches after indexing
351
353
  for (const search of this.pendingSearches) {
352
- // Will be handled by worker
354
+ this.worker.postMessage({
355
+ type: 'search',
356
+ data: {
357
+ id: search.id,
358
+ query: search.query,
359
+ options: search.options
360
+ }
361
+ });
353
362
  }
354
363
  }
355
364
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forcecalendar/core",
3
- "version": "2.1.40",
3
+ "version": "2.1.42",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "description": "A modern, lightweight, framework-agnostic calendar engine optimized for Salesforce",