@forcecalendar/interface 1.0.54 → 1.0.56

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.54",
3
+ "version": "1.0.56",
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",
@@ -676,7 +676,7 @@ export class ForceCalendar extends BaseComponent {
676
676
  <button class="fc-nav-arrow" data-action="previous" title="Previous">
677
677
  ${this.getIcon('chevron-left')}
678
678
  </button>
679
- <h2 class="fc-title">${title}</h2>
679
+ <h2 class="fc-title">${DOMUtils.escapeHTML(title)}</h2>
680
680
  <button class="fc-nav-arrow" data-action="next" title="Next">
681
681
  ${this.getIcon('chevron-right')}
682
682
  </button>
package/src/index.js CHANGED
@@ -22,5 +22,4 @@ export { WeekViewRenderer } from './renderers/WeekViewRenderer.js';
22
22
  export { DayViewRenderer } from './renderers/DayViewRenderer.js';
23
23
 
24
24
  // Components
25
- import './components/ForceCalendar.js';
26
25
  export { ForceCalendar } from './components/ForceCalendar.js';
@@ -102,10 +102,10 @@ export class DayViewRenderer extends BaseViewRenderer {
102
102
  <div style="border-right: 1px solid var(--fc-border-color);"></div>
103
103
  <div style="padding: 16px 24px;">
104
104
  <div style="font-size: 12px; font-weight: 700; color: var(--fc-text-light); text-transform: uppercase; letter-spacing: 0.1em;">
105
- ${dayName}
105
+ ${this.escapeHTML(dayName)}
106
106
  </div>
107
107
  <div style="font-size: 24px; font-weight: 600; margin-top: 4px; ${isToday ? 'color: var(--fc-danger-color);' : 'color: var(--fc-text-color);'}">
108
- ${dayDate.getDate()}
108
+ ${this.escapeHTML(String(dayDate.getDate()))}
109
109
  </div>
110
110
  </div>
111
111
  </div>
@@ -37,7 +37,7 @@ export class MonthViewRenderer extends BaseViewRenderer {
37
37
  let html = `
38
38
  <div class="fc-month-view" style="display: flex; flex-direction: column; height: 100%; min-height: 400px; background: var(--fc-background); border: 1px solid var(--fc-border-color);">
39
39
  <div class="fc-month-header" style="display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--fc-border-color); background: var(--fc-background-alt);">
40
- ${dayNames.map(d => `<div class="fc-month-header-cell" style="padding: 12px 8px; text-align: center; font-size: 11px; font-weight: 600; color: var(--fc-text-light); text-transform: uppercase;">${d}</div>`).join('')}
40
+ ${dayNames.map(d => `<div class="fc-month-header-cell" style="padding: 12px 8px; text-align: center; font-size: 11px; font-weight: 600; color: var(--fc-text-light); text-transform: uppercase;">${this.escapeHTML(d)}</div>`).join('')}
41
41
  </div>
42
42
  <div class="fc-month-body" style="display: flex; flex-direction: column; flex: 1;">
43
43
  `;
@@ -87,10 +87,10 @@ export class MonthViewRenderer extends BaseViewRenderer {
87
87
  const moreCount = events.length - this.maxEventsToShow;
88
88
 
89
89
  return `
90
- <div class="fc-month-day" data-date="${day.date}"
90
+ <div class="fc-month-day" data-date="${this.escapeHTML(day.date)}"
91
91
  style="background: ${dayBg}; border-right: 1px solid var(--fc-border-color); border-bottom: 1px solid var(--fc-border-color); padding: 4px; min-height: 80px; cursor: pointer; display: flex; flex-direction: column;">
92
92
  <div class="fc-day-number" style="font-size: 13px; font-weight: 500; color: ${dayNumColor}; padding: 2px 4px; margin-bottom: 4px; ${todayStyle}">
93
- ${day.dayOfMonth}
93
+ ${this.escapeHTML(String(day.dayOfMonth))}
94
94
  </div>
95
95
  <div class="fc-day-events" style="display: flex; flex-direction: column; gap: 2px; flex: 1; overflow: hidden;">
96
96
  ${visibleEvents.map(evt => this._renderEvent(evt)).join('')}
@@ -72,10 +72,10 @@ export class WeekViewRenderer extends BaseViewRenderer {
72
72
  day => `
73
73
  <div style="padding: 12px 8px; text-align: center; border-right: 1px solid var(--fc-border-color);">
74
74
  <div style="font-size: 10px; font-weight: 700; color: var(--fc-text-light); text-transform: uppercase; letter-spacing: 0.1em;">
75
- ${day.dayName}
75
+ ${this.escapeHTML(day.dayName)}
76
76
  </div>
77
77
  <div style="font-size: 16px; font-weight: 500; margin-top: 4px; ${day.isToday ? 'background: var(--fc-danger-color); color: white; border-radius: 50%; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;' : 'color: var(--fc-text-color);'}">
78
- ${day.dayOfMonth}
78
+ ${this.escapeHTML(String(day.dayOfMonth))}
79
79
  </div>
80
80
  </div>
81
81
  `