@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
|
-
|
|
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,
|
|
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
|
-
|
|
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
|
|