@forcecalendar/interface 1.0.14 → 1.0.15
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
var V = Object.defineProperty;
|
|
2
|
+
var P = (p, e, t) => e in p ? V(p, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : p[e] = t;
|
|
3
|
+
var _ = (p, e, t) => P(p, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
class $ extends HTMLElement {
|
|
5
5
|
constructor() {
|
|
6
6
|
super(), this.attachShadow({ mode: "open" }), this._listeners = [], this._state = null, this._props = /* @__PURE__ */ new Map(), this._initialized = !1;
|
|
@@ -108,7 +108,7 @@ class $ extends HTMLElement {
|
|
|
108
108
|
this.setProp(e, s), this._initialized && this.render();
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
class
|
|
111
|
+
class U {
|
|
112
112
|
constructor() {
|
|
113
113
|
this.timezones = {
|
|
114
114
|
// UTC
|
|
@@ -691,7 +691,7 @@ class S {
|
|
|
691
691
|
E && E.clearCache(), E = null;
|
|
692
692
|
}
|
|
693
693
|
constructor() {
|
|
694
|
-
this.database = new
|
|
694
|
+
this.database = new U(), this.offsetCache = /* @__PURE__ */ new Map(), this.dstCache = /* @__PURE__ */ new Map(), this.maxCacheSize = 1e3, this.cacheHits = 0, this.cacheMisses = 0;
|
|
695
695
|
}
|
|
696
696
|
/**
|
|
697
697
|
* Convert date from one timezone to another
|
|
@@ -976,7 +976,7 @@ class S {
|
|
|
976
976
|
}
|
|
977
977
|
}
|
|
978
978
|
}
|
|
979
|
-
class
|
|
979
|
+
class M {
|
|
980
980
|
/**
|
|
981
981
|
* Normalize event data
|
|
982
982
|
* @param {import('../../types.js').EventData} data - Raw event data
|
|
@@ -1046,20 +1046,20 @@ class T {
|
|
|
1046
1046
|
endTimeZone: f = null,
|
|
1047
1047
|
status: k = "confirmed",
|
|
1048
1048
|
visibility: b = "public",
|
|
1049
|
-
organizer:
|
|
1049
|
+
organizer: T = null,
|
|
1050
1050
|
attendees: A = [],
|
|
1051
1051
|
reminders: I = [],
|
|
1052
1052
|
category: L,
|
|
1053
1053
|
// Support singular category (no default)
|
|
1054
|
-
categories:
|
|
1054
|
+
categories: O,
|
|
1055
1055
|
// Support plural categories (no default)
|
|
1056
|
-
attachments:
|
|
1056
|
+
attachments: F = [],
|
|
1057
1057
|
conferenceData: R = null,
|
|
1058
1058
|
metadata: H = {},
|
|
1059
1059
|
...B
|
|
1060
1060
|
// Capture any extra properties
|
|
1061
1061
|
}) {
|
|
1062
|
-
const m =
|
|
1062
|
+
const m = M.normalize({
|
|
1063
1063
|
id: e,
|
|
1064
1064
|
title: t,
|
|
1065
1065
|
start: s,
|
|
@@ -1077,20 +1077,20 @@ class T {
|
|
|
1077
1077
|
endTimeZone: f,
|
|
1078
1078
|
status: k,
|
|
1079
1079
|
visibility: b,
|
|
1080
|
-
organizer:
|
|
1080
|
+
organizer: T,
|
|
1081
1081
|
attendees: A,
|
|
1082
1082
|
reminders: I,
|
|
1083
1083
|
category: L,
|
|
1084
1084
|
// Pass category to normalize
|
|
1085
|
-
categories:
|
|
1085
|
+
categories: O,
|
|
1086
1086
|
// Pass categories to normalize
|
|
1087
|
-
attachments:
|
|
1087
|
+
attachments: F,
|
|
1088
1088
|
conferenceData: R,
|
|
1089
1089
|
metadata: H,
|
|
1090
1090
|
...B
|
|
1091
1091
|
// Pass any extra properties
|
|
1092
1092
|
});
|
|
1093
|
-
|
|
1093
|
+
M.validate(m), this.id = m.id, this.title = m.title, this._timezoneManager = S.getInstance(), this.timeZone = m.timeZone || this._timezoneManager.getSystemTimezone(), this.endTimeZone = m.endTimeZone || this.timeZone, this.start = m.start, this.end = m.end, this.startUTC = this._timezoneManager.toUTC(this.start, this.timeZone), this.endUTC = this._timezoneManager.toUTC(this.end, this.endTimeZone), this.allDay = m.allDay, this.description = m.description, this.location = m.location, this.color = m.color, this.backgroundColor = m.backgroundColor, this.borderColor = m.borderColor, this.textColor = m.textColor, this.recurring = m.recurring, this.recurrenceRule = m.recurrenceRule, this._originalTimeZone = m.timeZone || null, this.status = m.status, this.visibility = m.visibility, this.organizer = m.organizer, this.attendees = [...m.attendees], this.reminders = [...m.reminders], this.categories = m.categories ? [...m.categories] : [], this.attachments = [...m.attachments], this.conferenceData = m.conferenceData, this.metadata = { ...m.metadata }, this._cache = {}, this._validateAttendees(), this._validateReminders();
|
|
1094
1094
|
}
|
|
1095
1095
|
/**
|
|
1096
1096
|
* Get event duration in milliseconds
|
|
@@ -1180,7 +1180,7 @@ class T {
|
|
|
1180
1180
|
* @throws {Error} If otherEvent is not an Event instance or doesn't have start/end
|
|
1181
1181
|
*/
|
|
1182
1182
|
overlaps(e) {
|
|
1183
|
-
if (e instanceof
|
|
1183
|
+
if (e instanceof M)
|
|
1184
1184
|
return !(this.end <= e.start || this.start >= e.end);
|
|
1185
1185
|
if (e && e.start && e.end)
|
|
1186
1186
|
return !(this.end <= e.start || this.start >= e.end);
|
|
@@ -1200,7 +1200,7 @@ class T {
|
|
|
1200
1200
|
* @returns {Event} New Event instance with updated properties
|
|
1201
1201
|
*/
|
|
1202
1202
|
clone(e = {}) {
|
|
1203
|
-
return new
|
|
1203
|
+
return new M({
|
|
1204
1204
|
id: this.id,
|
|
1205
1205
|
title: this.title,
|
|
1206
1206
|
start: new Date(this.start),
|
|
@@ -1264,7 +1264,7 @@ class T {
|
|
|
1264
1264
|
* @returns {Event} New Event instance
|
|
1265
1265
|
*/
|
|
1266
1266
|
static fromObject(e) {
|
|
1267
|
-
return new
|
|
1267
|
+
return new M(e);
|
|
1268
1268
|
}
|
|
1269
1269
|
/**
|
|
1270
1270
|
* Compare events for equality
|
|
@@ -1272,7 +1272,7 @@ class T {
|
|
|
1272
1272
|
* @returns {boolean} True if events are equal
|
|
1273
1273
|
*/
|
|
1274
1274
|
equals(e) {
|
|
1275
|
-
return e instanceof
|
|
1275
|
+
return e instanceof M ? this.id === e.id && this.title === e.title && this.start.getTime() === e.start.getTime() && this.end.getTime() === e.end.getTime() && this.allDay === e.allDay && this.description === e.description && this.location === e.location && this.recurring === e.recurring && this.recurrenceRule === e.recurrenceRule && this.status === e.status : !1;
|
|
1276
1276
|
}
|
|
1277
1277
|
// ============ Attendee Management Methods ============
|
|
1278
1278
|
/**
|
|
@@ -2226,14 +2226,14 @@ class N {
|
|
|
2226
2226
|
const f = 3;
|
|
2227
2227
|
for (; d <= s && h < i; ) {
|
|
2228
2228
|
if (d >= t) {
|
|
2229
|
-
const b = new Date(d),
|
|
2229
|
+
const b = new Date(d), T = new Date(d.getTime() + o), A = l.getTimezoneOffset(b, c);
|
|
2230
2230
|
if (A !== g) {
|
|
2231
2231
|
const I = g - A;
|
|
2232
|
-
b.setMinutes(b.getMinutes() + I),
|
|
2232
|
+
b.setMinutes(b.getMinutes() + I), T.setMinutes(T.getMinutes() + I);
|
|
2233
2233
|
}
|
|
2234
2234
|
g = A, this.isException(b, n, e.id) || a.push({
|
|
2235
2235
|
start: b,
|
|
2236
|
-
end:
|
|
2236
|
+
end: T,
|
|
2237
2237
|
recurringEventId: e.id,
|
|
2238
2238
|
timezone: c,
|
|
2239
2239
|
originalStart: e.start
|
|
@@ -2446,7 +2446,7 @@ class N {
|
|
|
2446
2446
|
return r && (n = `${r === -1 ? "Last" : ["", "1st", "2nd", "3rd", "4th", "5th"][r] || `${r}th`} ${n}`), n;
|
|
2447
2447
|
}
|
|
2448
2448
|
}
|
|
2449
|
-
class
|
|
2449
|
+
class z {
|
|
2450
2450
|
/**
|
|
2451
2451
|
* Create a new LRU Cache
|
|
2452
2452
|
* @param {number} capacity - Maximum number of items in cache
|
|
@@ -2766,7 +2766,7 @@ class W {
|
|
|
2766
2766
|
enableAdaptiveMemory: !0,
|
|
2767
2767
|
// Enable adaptive memory management
|
|
2768
2768
|
...e
|
|
2769
|
-
}, this.eventCache = new
|
|
2769
|
+
}, this.eventCache = new z(this.config.cacheCapacity), this.queryCache = new z(Math.floor(this.config.cacheCapacity / 2)), this.dateRangeCache = new z(Math.floor(this.config.cacheCapacity / 4)), this.config.enableAdaptiveMemory && (this.memoryManager = new j({
|
|
2770
2770
|
checkInterval: 3e4,
|
|
2771
2771
|
memoryThreshold: 0.75,
|
|
2772
2772
|
criticalThreshold: 0.9
|
|
@@ -3366,7 +3366,7 @@ class q {
|
|
|
3366
3366
|
*/
|
|
3367
3367
|
addEvent(e) {
|
|
3368
3368
|
return this.optimizer.measure("addEvent", () => {
|
|
3369
|
-
if (e instanceof
|
|
3369
|
+
if (e instanceof M || (e = new M(e)), this.events.has(e.id))
|
|
3370
3370
|
throw new Error(`Event with id ${e.id} already exists`);
|
|
3371
3371
|
return this.events.set(e.id, e), this.optimizer.cache(e.id, e, "event"), this._indexEvent(e), this.isBatchMode ? this.batchNotifications.push({
|
|
3372
3372
|
type: "add",
|
|
@@ -4516,7 +4516,7 @@ class G {
|
|
|
4516
4516
|
* @returns {import('../events/Event.js').Event} The added event
|
|
4517
4517
|
*/
|
|
4518
4518
|
addEvent(e) {
|
|
4519
|
-
!(e instanceof
|
|
4519
|
+
!(e instanceof M) && !e.timeZone && (e = { ...e, timeZone: this.config.timeZone });
|
|
4520
4520
|
const t = this.eventStore.addEvent(e);
|
|
4521
4521
|
return this._emit("eventAdd", { event: t }), t;
|
|
4522
4522
|
}
|
|
@@ -4723,13 +4723,13 @@ class G {
|
|
|
4723
4723
|
days: []
|
|
4724
4724
|
};
|
|
4725
4725
|
for (let w = 0; w < 7; w++) {
|
|
4726
|
-
const f = new Date(l), k = f.getMonth() === s, b = u.isToday(f),
|
|
4726
|
+
const f = new Date(l), k = f.getMonth() === s, b = u.isToday(f), T = f.getDay() === 0 || f.getDay() === 6;
|
|
4727
4727
|
g.days.push({
|
|
4728
4728
|
date: f,
|
|
4729
4729
|
dayOfMonth: f.getDate(),
|
|
4730
4730
|
isCurrentMonth: k,
|
|
4731
4731
|
isToday: b,
|
|
4732
|
-
isWeekend:
|
|
4732
|
+
isWeekend: T,
|
|
4733
4733
|
events: this.getEventsForDate(f)
|
|
4734
4734
|
}), l = u.addDays(l, 1);
|
|
4735
4735
|
}
|
|
@@ -5864,7 +5864,7 @@ class v {
|
|
|
5864
5864
|
/**
|
|
5865
5865
|
* Default theme colors
|
|
5866
5866
|
*/
|
|
5867
|
-
|
|
5867
|
+
_(v, "colors", {
|
|
5868
5868
|
primary: "#3B82F6",
|
|
5869
5869
|
// Modern Blue
|
|
5870
5870
|
secondary: "#64748B",
|
|
@@ -5897,7 +5897,7 @@ z(v, "colors", {
|
|
|
5897
5897
|
}), /**
|
|
5898
5898
|
* Common CSS variables
|
|
5899
5899
|
*/
|
|
5900
|
-
|
|
5900
|
+
_(v, "cssVariables", {
|
|
5901
5901
|
// "Pro" Palette - Functional & Sharp
|
|
5902
5902
|
"--fc-primary-color": "#2563EB",
|
|
5903
5903
|
// International Blue (Focus)
|
|
@@ -5965,7 +5965,7 @@ z(v, "cssVariables", {
|
|
|
5965
5965
|
}), /**
|
|
5966
5966
|
* Get responsive breakpoints
|
|
5967
5967
|
*/
|
|
5968
|
-
|
|
5968
|
+
_(v, "breakpoints", {
|
|
5969
5969
|
xs: "320px",
|
|
5970
5970
|
sm: "576px",
|
|
5971
5971
|
md: "768px",
|
|
@@ -7403,7 +7403,7 @@ class ie extends $ {
|
|
|
7403
7403
|
return ["view", "date", "locale", "timezone", "week-starts-on", "height"];
|
|
7404
7404
|
}
|
|
7405
7405
|
constructor() {
|
|
7406
|
-
super(), this.stateManager = null, this.currentView = null;
|
|
7406
|
+
super(), this.stateManager = null, this.currentView = null, this._hasRendered = !1, this._cachedStyles = null;
|
|
7407
7407
|
}
|
|
7408
7408
|
initialize() {
|
|
7409
7409
|
const e = {
|
|
@@ -7427,7 +7427,56 @@ class ie extends $ {
|
|
|
7427
7427
|
});
|
|
7428
7428
|
}
|
|
7429
7429
|
handleStateChange(e, t) {
|
|
7430
|
-
|
|
7430
|
+
var o, c;
|
|
7431
|
+
if (!this._hasRendered)
|
|
7432
|
+
return;
|
|
7433
|
+
const s = e.view !== (t == null ? void 0 : t.view), i = ((o = e.currentDate) == null ? void 0 : o.getTime()) !== ((c = t == null ? void 0 : t.currentDate) == null ? void 0 : c.getTime()), r = e.events !== (t == null ? void 0 : t.events), n = e.loading !== (t == null ? void 0 : t.loading), a = e.error !== (t == null ? void 0 : t.error);
|
|
7434
|
+
if (n || a) {
|
|
7435
|
+
this.render();
|
|
7436
|
+
return;
|
|
7437
|
+
}
|
|
7438
|
+
s && (this.currentView = e.view), s ? (this._updateTitle(), this._updateViewButtons(), this._switchView()) : i ? (this._updateTitle(), this._updateViewContent()) : r && this._updateViewContent();
|
|
7439
|
+
}
|
|
7440
|
+
/**
|
|
7441
|
+
* Update only the title text (no DOM recreation)
|
|
7442
|
+
*/
|
|
7443
|
+
_updateTitle() {
|
|
7444
|
+
const e = this.$(".fc-title");
|
|
7445
|
+
if (e) {
|
|
7446
|
+
const t = this.stateManager.getState();
|
|
7447
|
+
e.textContent = this.getTitle(t.currentDate, t.view);
|
|
7448
|
+
}
|
|
7449
|
+
}
|
|
7450
|
+
/**
|
|
7451
|
+
* Update view button active states (no DOM recreation)
|
|
7452
|
+
*/
|
|
7453
|
+
_updateViewButtons() {
|
|
7454
|
+
const e = this.stateManager.getState();
|
|
7455
|
+
this.$$("[data-view]").forEach((t) => {
|
|
7456
|
+
const s = t.dataset.view === e.view;
|
|
7457
|
+
t.classList.toggle("active", s);
|
|
7458
|
+
});
|
|
7459
|
+
}
|
|
7460
|
+
/**
|
|
7461
|
+
* Switch to a different view type
|
|
7462
|
+
*/
|
|
7463
|
+
_switchView() {
|
|
7464
|
+
const e = this.$("#calendar-view-container");
|
|
7465
|
+
if (e) {
|
|
7466
|
+
this._currentViewInstance && this._currentViewInstance.cleanup && this._currentViewInstance.cleanup();
|
|
7467
|
+
try {
|
|
7468
|
+
const t = this._createViewRenderer(this.currentView);
|
|
7469
|
+
t && (t._viewType = this.currentView, this._currentViewInstance = t, t.stateManager = this.stateManager, t.container = e, t.render());
|
|
7470
|
+
} catch (t) {
|
|
7471
|
+
console.error("[ForceCalendar] Error switching view:", t);
|
|
7472
|
+
}
|
|
7473
|
+
}
|
|
7474
|
+
}
|
|
7475
|
+
/**
|
|
7476
|
+
* Re-render only the view content (not header)
|
|
7477
|
+
*/
|
|
7478
|
+
_updateViewContent() {
|
|
7479
|
+
this._currentViewInstance && this._currentViewInstance.render && this._currentViewInstance.render();
|
|
7431
7480
|
}
|
|
7432
7481
|
mount() {
|
|
7433
7482
|
super.mount(), this.loadView(this.stateManager.getView());
|
|
@@ -7830,7 +7879,7 @@ class ie extends $ {
|
|
|
7830
7879
|
return `
|
|
7831
7880
|
<div class="force-calendar">
|
|
7832
7881
|
<div class="fc-error">
|
|
7833
|
-
<p><strong>Error:</strong> ${r.message || "An error occurred"}</p>
|
|
7882
|
+
<p><strong>Error:</strong> ${C.escapeHTML(r.message || "An error occurred")}</p>
|
|
7834
7883
|
</div>
|
|
7835
7884
|
</div>
|
|
7836
7885
|
`;
|
|
@@ -7891,17 +7940,13 @@ class ie extends $ {
|
|
|
7891
7940
|
}
|
|
7892
7941
|
afterRender() {
|
|
7893
7942
|
const e = this.$("#calendar-view-container");
|
|
7894
|
-
if (
|
|
7895
|
-
if (this._currentViewInstance && this._currentViewInstance._viewType === this.currentView && e.children.length > 0)
|
|
7896
|
-
console.log("[ForceCalendar] View already exists with content, skipping creation");
|
|
7943
|
+
if (e && this.stateManager && this.currentView) {
|
|
7944
|
+
if (this._currentViewInstance && this._currentViewInstance._viewType === this.currentView && e.children.length > 0)
|
|
7897
7945
|
return;
|
|
7898
|
-
|
|
7899
|
-
this._currentViewInstance && (this._currentViewInstance.cleanup && this._currentViewInstance.cleanup(), this._viewUnsubscribe && (this._viewUnsubscribe(), this._viewUnsubscribe = null)), console.log("[ForceCalendar] Creating view for:", this.currentView);
|
|
7946
|
+
this._currentViewInstance && (this._currentViewInstance.cleanup && this._currentViewInstance.cleanup(), this._viewUnsubscribe && (this._viewUnsubscribe(), this._viewUnsubscribe = null));
|
|
7900
7947
|
try {
|
|
7901
7948
|
const i = this._createViewRenderer(this.currentView);
|
|
7902
|
-
i && (i._viewType = this.currentView, this._currentViewInstance = i, i.stateManager = this.stateManager, i.container = e,
|
|
7903
|
-
(r.events !== (n == null ? void 0 : n.events) || r.currentDate !== (n == null ? void 0 : n.currentDate)) && i && i.render && i.render();
|
|
7904
|
-
}));
|
|
7949
|
+
i && (i._viewType = this.currentView, this._currentViewInstance = i, i.stateManager = this.stateManager, i.container = e, i.render());
|
|
7905
7950
|
} catch (i) {
|
|
7906
7951
|
console.error("[ForceCalendar] Error creating/rendering view:", i);
|
|
7907
7952
|
}
|
|
@@ -7922,7 +7967,7 @@ class ie extends $ {
|
|
|
7922
7967
|
id: n,
|
|
7923
7968
|
...r
|
|
7924
7969
|
});
|
|
7925
|
-
});
|
|
7970
|
+
}), this._hasRendered = !0;
|
|
7926
7971
|
}
|
|
7927
7972
|
_createViewRenderer(e) {
|
|
7928
7973
|
const t = e;
|
|
@@ -7931,6 +7976,9 @@ class ie extends $ {
|
|
|
7931
7976
|
container: null,
|
|
7932
7977
|
_listeners: [],
|
|
7933
7978
|
_scrolled: !1,
|
|
7979
|
+
_escapeHTML(s) {
|
|
7980
|
+
return s == null ? "" : C.escapeHTML(String(s));
|
|
7981
|
+
},
|
|
7934
7982
|
cleanup() {
|
|
7935
7983
|
this._listeners.forEach(({ element: s, event: i, handler: r }) => {
|
|
7936
7984
|
s.removeEventListener(i, r);
|
|
@@ -7987,9 +8035,9 @@ class ie extends $ {
|
|
|
7987
8035
|
<div class="fc-month-day" data-date="${c.date}" style="background: ${h}; border-right: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb; padding: 4px; min-height: 80px; cursor: pointer;">
|
|
7988
8036
|
<div class="fc-day-number" style="font-size: 13px; font-weight: 500; color: ${g}; padding: 2px 4px; margin-bottom: 4px; ${w}">${c.dayOfMonth}</div>
|
|
7989
8037
|
<div class="fc-day-events" style="display: flex; flex-direction: column; gap: 2px;">
|
|
7990
|
-
${k.map((
|
|
7991
|
-
<div class="fc-event" data-event-id="${
|
|
7992
|
-
${
|
|
8038
|
+
${k.map((T) => `
|
|
8039
|
+
<div class="fc-event" data-event-id="${this._escapeHTML(T.id)}" style="background-color: ${T.backgroundColor || "#2563eb"}; font-size: 11px; padding: 2px 6px; border-radius: 3px; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;">
|
|
8040
|
+
${this._escapeHTML(T.title)}
|
|
7993
8041
|
</div>
|
|
7994
8042
|
`).join("")}
|
|
7995
8043
|
${b > 0 ? `<div class="fc-more-events" style="font-size: 10px; color: #6b7280; padding: 2px 4px; font-weight: 500;">+${b} more</div>` : ""}
|
|
@@ -8035,8 +8083,8 @@ class ie extends $ {
|
|
|
8035
8083
|
${o.map((l) => `
|
|
8036
8084
|
<div style="border-right: 1px solid #e5e7eb; padding: 4px; display: flex; flex-direction: column; gap: 2px;">
|
|
8037
8085
|
${l.allDayEvents.map((d) => `
|
|
8038
|
-
<div class="fc-event" data-event-id="${d.id}" style="background-color: ${d.backgroundColor || "#2563eb"}; font-size: 10px; padding: 2px 4px; border-radius: 2px; color: white; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">
|
|
8039
|
-
${d.title}
|
|
8086
|
+
<div class="fc-event" data-event-id="${this._escapeHTML(d.id)}" style="background-color: ${d.backgroundColor || "#2563eb"}; font-size: 10px; padding: 2px 4px; border-radius: 2px; color: white; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">
|
|
8087
|
+
${this._escapeHTML(d.title)}
|
|
8040
8088
|
</div>
|
|
8041
8089
|
`).join("")}
|
|
8042
8090
|
</div>
|
|
@@ -8111,8 +8159,8 @@ class ie extends $ {
|
|
|
8111
8159
|
<div style="font-size: 9px; color: #6b7280; display: flex; align-items: center; justify-content: center; border-right: 1px solid #e5e7eb; text-transform: uppercase; font-weight: 700;">All day</div>
|
|
8112
8160
|
<div style="padding: 6px 12px; display: flex; flex-wrap: wrap; gap: 4px;">
|
|
8113
8161
|
${c.map((f) => `
|
|
8114
|
-
<div class="fc-event" data-event-id="${f.id}" style="background-color: ${f.backgroundColor || "#2563eb"}; font-size: 12px; padding: 4px 8px; border-radius: 4px; color: white; cursor: pointer; font-weight: 500;">
|
|
8115
|
-
${f.title}
|
|
8162
|
+
<div class="fc-event" data-event-id="${this._escapeHTML(f.id)}" style="background-color: ${f.backgroundColor || "#2563eb"}; font-size: 12px; padding: 4px 8px; border-radius: 4px; color: white; cursor: pointer; font-weight: 500;">
|
|
8163
|
+
${this._escapeHTML(f.title)}
|
|
8116
8164
|
</div>
|
|
8117
8165
|
`).join("")}
|
|
8118
8166
|
</div>
|
|
@@ -8149,12 +8197,12 @@ class ie extends $ {
|
|
|
8149
8197
|
_renderTimedEvent(s) {
|
|
8150
8198
|
const i = new Date(s.start), r = new Date(s.end), n = i.getHours() * 60 + i.getMinutes(), a = Math.max((r - i) / (1e3 * 60), 20), o = s.backgroundColor || "#2563eb";
|
|
8151
8199
|
return `
|
|
8152
|
-
<div class="fc-event" data-event-id="${s.id}"
|
|
8200
|
+
<div class="fc-event" data-event-id="${this._escapeHTML(s.id)}"
|
|
8153
8201
|
style="position: absolute; top: ${n}px; height: ${a}px; left: 2px; right: 2px;
|
|
8154
8202
|
background-color: ${o}; border-radius: 4px; padding: 4px 8px; font-size: 11px;
|
|
8155
8203
|
font-weight: 500; color: white; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,0.1);
|
|
8156
8204
|
cursor: pointer; z-index: 5;">
|
|
8157
|
-
<div style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">${s.title}</div>
|
|
8205
|
+
<div style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">${this._escapeHTML(s.title)}</div>
|
|
8158
8206
|
<div style="font-size: 10px; opacity: 0.9;">${this._formatTime(i)}</div>
|
|
8159
8207
|
</div>
|
|
8160
8208
|
`;
|
|
@@ -8162,12 +8210,12 @@ class ie extends $ {
|
|
|
8162
8210
|
_renderTimedEventDay(s) {
|
|
8163
8211
|
const i = new Date(s.start), r = new Date(s.end), n = i.getHours() * 60 + i.getMinutes(), a = Math.max((r - i) / (1e3 * 60), 30), o = s.backgroundColor || "#2563eb";
|
|
8164
8212
|
return `
|
|
8165
|
-
<div class="fc-event" data-event-id="${s.id}"
|
|
8213
|
+
<div class="fc-event" data-event-id="${this._escapeHTML(s.id)}"
|
|
8166
8214
|
style="position: absolute; top: ${n}px; height: ${a}px; left: 12px; right: 24px;
|
|
8167
8215
|
background-color: ${o}; border-radius: 6px; padding: 8px 12px; font-size: 13px;
|
|
8168
8216
|
font-weight: 500; color: white; overflow: hidden; box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
8169
8217
|
cursor: pointer; z-index: 5;">
|
|
8170
|
-
<div style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">${s.title}</div>
|
|
8218
|
+
<div style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">${this._escapeHTML(s.title)}</div>
|
|
8171
8219
|
<div style="font-size: 11px; opacity: 0.9;">${this._formatTime(i)} - ${this._formatTime(r)}</div>
|
|
8172
8220
|
</div>
|
|
8173
8221
|
`;
|