@forcecalendar/interface 1.0.57 → 1.0.58

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.
@@ -249,9 +249,11 @@ class S {
249
249
  }
250
250
  /**
251
251
  * Check if event name matches a pattern
252
+ * Only `*` acts as a wildcard; all other characters match literally
252
253
  */
253
254
  matchesPattern(t, e) {
254
- return new RegExp("^" + e.replace(/\*/g, ".*") + "$").test(t);
255
+ const r = e.replace(/[.+?^${}()|[\]\\]/g, "\\$&");
256
+ return new RegExp("^" + r.replace(/\*/g, ".*") + "$").test(t);
255
257
  }
256
258
  /**
257
259
  * Clear all event subscriptions
@@ -1541,10 +1543,10 @@ class _ extends k {
1541
1543
  `;
1542
1544
  }
1543
1545
  _renderEvent(t) {
1544
- const e = this.getEventColor(t);
1546
+ const e = this.getEventColor(t), r = this.getContrastingTextColor(e);
1545
1547
  return `
1546
1548
  <div class="fc-event" data-event-id="${this.escapeHTML(t.id)}"
1547
- style="background-color: ${e}; font-size: 11px; padding: 2px 6px; border-radius: 3px; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;">
1549
+ style="background-color: ${e}; font-size: 11px; padding: 2px 6px; border-radius: 3px; color: ${r}; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;">
1548
1550
  ${this.escapeHTML(t.title)}
1549
1551
  </div>
1550
1552
  `;