@forcecalendar/interface 1.0.25 → 1.0.26
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/dist/force-calendar-interface.esm.js +36 -39
- package/dist/force-calendar-interface.esm.js.map +1 -1
- package/dist/force-calendar-interface.umd.js +29 -29
- package/dist/force-calendar-interface.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/renderers/BaseViewRenderer.js +11 -10
- package/src/renderers/DayViewRenderer.js +13 -14
- package/src/renderers/MonthViewRenderer.js +7 -7
- package/src/renderers/WeekViewRenderer.js +13 -14
|
@@ -5315,7 +5315,7 @@ class ie {
|
|
|
5315
5315
|
this.subscribers.clear(), this._subscriberIds && (this._subscriberIds.clear(), this._subscriberIds = null), this.state = null, this.calendar = null;
|
|
5316
5316
|
}
|
|
5317
5317
|
}
|
|
5318
|
-
class
|
|
5318
|
+
class E extends f {
|
|
5319
5319
|
/**
|
|
5320
5320
|
* Format date for display
|
|
5321
5321
|
*/
|
|
@@ -6210,16 +6210,16 @@ class H {
|
|
|
6210
6210
|
* Attach common event handlers for day/event clicks
|
|
6211
6211
|
*/
|
|
6212
6212
|
attachCommonEventHandlers() {
|
|
6213
|
-
this.
|
|
6214
|
-
|
|
6215
|
-
|
|
6216
|
-
|
|
6217
|
-
|
|
6218
|
-
|
|
6213
|
+
this.addListener(this.container, "click", (e) => {
|
|
6214
|
+
const t = e.target.closest(".fc-event");
|
|
6215
|
+
if (!t || !this.container.contains(t)) return;
|
|
6216
|
+
e.stopPropagation();
|
|
6217
|
+
const s = t.dataset.eventId, i = this.stateManager.getEvents().find((r) => r.id === s);
|
|
6218
|
+
i && this.stateManager.selectEvent(i);
|
|
6219
6219
|
});
|
|
6220
6220
|
}
|
|
6221
6221
|
}
|
|
6222
|
-
class
|
|
6222
|
+
class S extends H {
|
|
6223
6223
|
constructor(e, t) {
|
|
6224
6224
|
super(e, t), this.maxEventsToShow = 3;
|
|
6225
6225
|
}
|
|
@@ -6286,12 +6286,11 @@ class E extends H {
|
|
|
6286
6286
|
`;
|
|
6287
6287
|
}
|
|
6288
6288
|
_attachEventHandlers() {
|
|
6289
|
-
this.
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
});
|
|
6289
|
+
this.addListener(this.container, "click", (e) => {
|
|
6290
|
+
const t = e.target.closest(".fc-month-day");
|
|
6291
|
+
if (!t || !this.container.contains(t) || e.target.closest(".fc-event")) return;
|
|
6292
|
+
const s = new Date(t.dataset.date);
|
|
6293
|
+
this.stateManager.selectDate(s);
|
|
6295
6294
|
}), this.attachCommonEventHandlers();
|
|
6296
6295
|
}
|
|
6297
6296
|
}
|
|
@@ -6403,12 +6402,11 @@ class z extends H {
|
|
|
6403
6402
|
`;
|
|
6404
6403
|
}
|
|
6405
6404
|
_attachEventHandlers() {
|
|
6406
|
-
this.
|
|
6407
|
-
|
|
6408
|
-
|
|
6409
|
-
|
|
6410
|
-
|
|
6411
|
-
});
|
|
6405
|
+
this.addListener(this.container, "click", (e) => {
|
|
6406
|
+
const t = e.target.closest(".fc-week-day-column");
|
|
6407
|
+
if (!t || !this.container.contains(t) || e.target.closest(".fc-event")) return;
|
|
6408
|
+
const s = new Date(t.dataset.date), i = t.getBoundingClientRect(), r = this.container.querySelector("#week-scroll-container"), n = e.clientY - i.top + (r ? r.scrollTop : 0);
|
|
6409
|
+
s.setHours(Math.floor(n / this.hourHeight), Math.floor(n % this.hourHeight / (this.hourHeight / 60)), 0, 0), this.stateManager.selectDate(s);
|
|
6412
6410
|
}), this.attachCommonEventHandlers();
|
|
6413
6411
|
}
|
|
6414
6412
|
_scrollToCurrentTime() {
|
|
@@ -6536,12 +6534,11 @@ class L extends H {
|
|
|
6536
6534
|
`;
|
|
6537
6535
|
}
|
|
6538
6536
|
_attachEventHandlers() {
|
|
6539
|
-
this.
|
|
6540
|
-
|
|
6541
|
-
|
|
6542
|
-
|
|
6543
|
-
|
|
6544
|
-
});
|
|
6537
|
+
this.addListener(this.container, "click", (e) => {
|
|
6538
|
+
const t = e.target.closest(".fc-day-column");
|
|
6539
|
+
if (!t || !this.container.contains(t) || e.target.closest(".fc-event")) return;
|
|
6540
|
+
const s = new Date(t.dataset.date), i = t.getBoundingClientRect(), r = this.container.querySelector("#day-scroll-container"), n = e.clientY - i.top + (r ? r.scrollTop : 0);
|
|
6541
|
+
s.setHours(Math.floor(n / this.hourHeight), Math.floor(n % this.hourHeight / (this.hourHeight / 60)), 0, 0), this.stateManager.selectDate(s);
|
|
6545
6542
|
}), this.attachCommonEventHandlers();
|
|
6546
6543
|
}
|
|
6547
6544
|
_scrollToCurrentTime() {
|
|
@@ -6940,10 +6937,10 @@ class ne extends O {
|
|
|
6940
6937
|
this._currentViewInstance && this._currentViewInstance.cleanup && this._currentViewInstance.cleanup();
|
|
6941
6938
|
try {
|
|
6942
6939
|
const s = {
|
|
6943
|
-
month:
|
|
6940
|
+
month: S,
|
|
6944
6941
|
week: z,
|
|
6945
6942
|
day: L
|
|
6946
|
-
}[this.currentView] ||
|
|
6943
|
+
}[this.currentView] || S, i = new s(e, this.stateManager);
|
|
6947
6944
|
i._viewType = this.currentView, this._currentViewInstance = i, i.render();
|
|
6948
6945
|
} catch (t) {
|
|
6949
6946
|
console.error("[ForceCalendar] Error switching view:", t);
|
|
@@ -7428,10 +7425,10 @@ class ne extends O {
|
|
|
7428
7425
|
this._currentViewInstance && (this._currentViewInstance.cleanup && this._currentViewInstance.cleanup(), this._viewUnsubscribe && (this._viewUnsubscribe(), this._viewUnsubscribe = null));
|
|
7429
7426
|
try {
|
|
7430
7427
|
const r = {
|
|
7431
|
-
month:
|
|
7428
|
+
month: S,
|
|
7432
7429
|
week: z,
|
|
7433
7430
|
day: L
|
|
7434
|
-
}[this.currentView] ||
|
|
7431
|
+
}[this.currentView] || S, n = new r(e, this.stateManager);
|
|
7435
7432
|
n._viewType = this.currentView, this._currentViewInstance = n, n.render();
|
|
7436
7433
|
} catch (i) {
|
|
7437
7434
|
console.error("[ForceCalendar] Error creating/rendering view:", i);
|
|
@@ -7463,10 +7460,10 @@ class ne extends O {
|
|
|
7463
7460
|
*/
|
|
7464
7461
|
_createViewRenderer(e) {
|
|
7465
7462
|
const s = {
|
|
7466
|
-
month:
|
|
7463
|
+
month: S,
|
|
7467
7464
|
week: z,
|
|
7468
7465
|
day: L
|
|
7469
|
-
}[e] ||
|
|
7466
|
+
}[e] || S;
|
|
7470
7467
|
return new s(null, null);
|
|
7471
7468
|
}
|
|
7472
7469
|
handleNavigation(e) {
|
|
@@ -7490,14 +7487,14 @@ class ne extends O {
|
|
|
7490
7487
|
const s = this.stateManager.state.config.locale;
|
|
7491
7488
|
switch (t) {
|
|
7492
7489
|
case "month":
|
|
7493
|
-
return
|
|
7490
|
+
return E.formatDate(e, "month", s);
|
|
7494
7491
|
case "week":
|
|
7495
|
-
const i =
|
|
7496
|
-
return
|
|
7492
|
+
const i = E.startOfWeek(e), r = E.endOfWeek(e);
|
|
7493
|
+
return E.formatDateRange(i, r, s);
|
|
7497
7494
|
case "day":
|
|
7498
|
-
return
|
|
7495
|
+
return E.formatDate(e, "long", s);
|
|
7499
7496
|
default:
|
|
7500
|
-
return
|
|
7497
|
+
return E.formatDate(e, "month", s);
|
|
7501
7498
|
}
|
|
7502
7499
|
}
|
|
7503
7500
|
getIcon(e) {
|
|
@@ -7557,11 +7554,11 @@ export {
|
|
|
7557
7554
|
O as BaseComponent,
|
|
7558
7555
|
H as BaseViewRenderer,
|
|
7559
7556
|
F as DOMUtils,
|
|
7560
|
-
|
|
7557
|
+
E as DateUtils,
|
|
7561
7558
|
L as DayViewRenderer,
|
|
7562
7559
|
se as EventBus,
|
|
7563
7560
|
ne as ForceCalendar,
|
|
7564
|
-
|
|
7561
|
+
S as MonthViewRenderer,
|
|
7565
7562
|
ie as StateManager,
|
|
7566
7563
|
D as StyleUtils,
|
|
7567
7564
|
z as WeekViewRenderer,
|