@forcecalendar/interface 1.0.57 → 1.0.59

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.57",
3
+ "version": "1.0.59",
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",
@@ -52,9 +52,9 @@
52
52
  "@forcecalendar/core": ">=2.0.0"
53
53
  },
54
54
  "devDependencies": {
55
- "@forcecalendar/core": "^2.1.18",
56
55
  "@babel/core": "^7.28.5",
57
56
  "@babel/preset-env": "^7.28.5",
57
+ "@forcecalendar/core": "^2.1.54",
58
58
  "babel-jest": "^30.2.0",
59
59
  "eslint": "^8.57.1",
60
60
  "jest": "^30.2.0",
@@ -167,9 +167,11 @@ class EventBus {
167
167
 
168
168
  /**
169
169
  * Check if event name matches a pattern
170
+ * Only `*` acts as a wildcard; all other characters match literally
170
171
  */
171
172
  matchesPattern(eventName, pattern) {
172
- const regex = new RegExp('^' + pattern.replace(/\*/g, '.*') + '$');
173
+ const escaped = pattern.replace(/[.+?^${}()|[\]\\]/g, '\\$&');
174
+ const regex = new RegExp('^' + escaped.replace(/\*/g, '.*') + '$');
173
175
  return regex.test(eventName);
174
176
  }
175
177
 
@@ -102,9 +102,10 @@ export class MonthViewRenderer extends BaseViewRenderer {
102
102
 
103
103
  _renderEvent(event) {
104
104
  const color = this.getEventColor(event);
105
+ const textColor = this.getContrastingTextColor(color);
105
106
  return `
106
107
  <div class="fc-event" data-event-id="${this.escapeHTML(event.id)}"
107
- style="background-color: ${color}; font-size: 11px; padding: 2px 6px; border-radius: 3px; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;">
108
+ style="background-color: ${color}; font-size: 11px; padding: 2px 6px; border-radius: 3px; color: ${textColor}; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;">
108
109
  ${this.escapeHTML(event.title)}
109
110
  </div>
110
111
  `;