@forcecalendar/interface 1.0.38 → 1.0.39
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 +18 -22
- package/dist/force-calendar-interface.esm.js.map +1 -1
- package/dist/force-calendar-interface.umd.js +7 -7
- package/dist/force-calendar-interface.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/renderers/DayViewRenderer.js +6 -5
- package/src/renderers/WeekViewRenderer.js +6 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _ = Object.defineProperty;
|
|
2
2
|
var $ = (h, e, t) => e in h ? _(h, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : h[e] = t;
|
|
3
|
-
var
|
|
3
|
+
var v = (h, e, t) => $(h, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
import { Calendar as M, DateUtils as T } from "@forcecalendar/core";
|
|
5
5
|
class k extends HTMLElement {
|
|
6
6
|
constructor() {
|
|
@@ -1136,7 +1136,7 @@ class u {
|
|
|
1136
1136
|
/**
|
|
1137
1137
|
* Default theme colors
|
|
1138
1138
|
*/
|
|
1139
|
-
|
|
1139
|
+
v(u, "colors", {
|
|
1140
1140
|
primary: "#3B82F6",
|
|
1141
1141
|
// Modern Blue
|
|
1142
1142
|
secondary: "#64748B",
|
|
@@ -1169,7 +1169,7 @@ m(u, "colors", {
|
|
|
1169
1169
|
}), /**
|
|
1170
1170
|
* Common CSS variables
|
|
1171
1171
|
*/
|
|
1172
|
-
|
|
1172
|
+
v(u, "cssVariables", {
|
|
1173
1173
|
// "Pro" Palette - Functional & Sharp
|
|
1174
1174
|
"--fc-primary-color": "#2563EB",
|
|
1175
1175
|
// International Blue (Focus)
|
|
@@ -1237,7 +1237,7 @@ m(u, "cssVariables", {
|
|
|
1237
1237
|
}), /**
|
|
1238
1238
|
* Get responsive breakpoints
|
|
1239
1239
|
*/
|
|
1240
|
-
|
|
1240
|
+
v(u, "breakpoints", {
|
|
1241
1241
|
xs: "320px",
|
|
1242
1242
|
sm: "576px",
|
|
1243
1243
|
md: "768px",
|
|
@@ -1394,7 +1394,7 @@ class w {
|
|
|
1394
1394
|
});
|
|
1395
1395
|
}
|
|
1396
1396
|
}
|
|
1397
|
-
class
|
|
1397
|
+
class m extends w {
|
|
1398
1398
|
constructor(e, t) {
|
|
1399
1399
|
super(e, t), this.maxEventsToShow = 3;
|
|
1400
1400
|
}
|
|
@@ -1588,12 +1588,10 @@ class b extends w {
|
|
|
1588
1588
|
this.addListener(this.container, "click", (e) => {
|
|
1589
1589
|
const t = e.target.closest(".fc-week-day-column");
|
|
1590
1590
|
if (!t || !this.container.contains(t) || e.target.closest(".fc-event")) return;
|
|
1591
|
-
const r = new Date(t.dataset.date), i = t.getBoundingClientRect();
|
|
1592
|
-
this.container.querySelector("#week-scroll-container");
|
|
1593
|
-
const s = e.clientY - i.top;
|
|
1591
|
+
const r = new Date(t.dataset.date), i = this.container.querySelector("#week-scroll-container"), s = t.offsetTop, n = e.clientY - t.getBoundingClientRect().top + (i ? i.scrollTop : 0) - s, a = Math.max(0, Math.min(n + s, this.totalHeight));
|
|
1594
1592
|
r.setHours(
|
|
1595
|
-
Math.floor(
|
|
1596
|
-
Math.floor(
|
|
1593
|
+
Math.floor(a / this.hourHeight),
|
|
1594
|
+
Math.floor(a % this.hourHeight / (this.hourHeight / 60)),
|
|
1597
1595
|
0,
|
|
1598
1596
|
0
|
|
1599
1597
|
), this.stateManager.selectDate(r);
|
|
@@ -1731,12 +1729,10 @@ class y extends w {
|
|
|
1731
1729
|
this.addListener(this.container, "click", (e) => {
|
|
1732
1730
|
const t = e.target.closest(".fc-day-column");
|
|
1733
1731
|
if (!t || !this.container.contains(t) || e.target.closest(".fc-event")) return;
|
|
1734
|
-
const r = new Date(t.dataset.date), i = t.getBoundingClientRect();
|
|
1735
|
-
this.container.querySelector("#day-scroll-container");
|
|
1736
|
-
const s = e.clientY - i.top;
|
|
1732
|
+
const r = new Date(t.dataset.date), i = this.container.querySelector("#day-scroll-container"), s = t.offsetTop, n = e.clientY - t.getBoundingClientRect().top + (i ? i.scrollTop : 0) - s, a = Math.max(0, Math.min(n + s, this.totalHeight));
|
|
1737
1733
|
r.setHours(
|
|
1738
|
-
Math.floor(
|
|
1739
|
-
Math.floor(
|
|
1734
|
+
Math.floor(a / this.hourHeight),
|
|
1735
|
+
Math.floor(a % this.hourHeight / (this.hourHeight / 60)),
|
|
1740
1736
|
0,
|
|
1741
1737
|
0
|
|
1742
1738
|
), this.stateManager.selectDate(r);
|
|
@@ -2158,10 +2154,10 @@ class H extends k {
|
|
|
2158
2154
|
this._currentViewInstance && this._currentViewInstance.cleanup && this._currentViewInstance.cleanup();
|
|
2159
2155
|
try {
|
|
2160
2156
|
const r = {
|
|
2161
|
-
month:
|
|
2157
|
+
month: m,
|
|
2162
2158
|
week: b,
|
|
2163
2159
|
day: y
|
|
2164
|
-
}[this.currentView] ||
|
|
2160
|
+
}[this.currentView] || m, i = new r(e, this.stateManager);
|
|
2165
2161
|
i._viewType = this.currentView, this._currentViewInstance = i, i.render();
|
|
2166
2162
|
} catch (t) {
|
|
2167
2163
|
console.error("[ForceCalendar] Error switching view:", t);
|
|
@@ -2646,10 +2642,10 @@ class H extends k {
|
|
|
2646
2642
|
this._currentViewInstance && (this._currentViewInstance.cleanup && this._currentViewInstance.cleanup(), this._viewUnsubscribe && (this._viewUnsubscribe(), this._viewUnsubscribe = null));
|
|
2647
2643
|
try {
|
|
2648
2644
|
const s = {
|
|
2649
|
-
month:
|
|
2645
|
+
month: m,
|
|
2650
2646
|
week: b,
|
|
2651
2647
|
day: y
|
|
2652
|
-
}[this.currentView] ||
|
|
2648
|
+
}[this.currentView] || m, n = new s(e, this.stateManager);
|
|
2653
2649
|
n._viewType = this.currentView, this._currentViewInstance = n, n.render();
|
|
2654
2650
|
} catch (i) {
|
|
2655
2651
|
console.error("[ForceCalendar] Error creating/rendering view:", i);
|
|
@@ -2681,10 +2677,10 @@ class H extends k {
|
|
|
2681
2677
|
*/
|
|
2682
2678
|
_createViewRenderer(e) {
|
|
2683
2679
|
const r = {
|
|
2684
|
-
month:
|
|
2680
|
+
month: m,
|
|
2685
2681
|
week: b,
|
|
2686
2682
|
day: y
|
|
2687
|
-
}[e] ||
|
|
2683
|
+
}[e] || m;
|
|
2688
2684
|
return new r(null, null);
|
|
2689
2685
|
}
|
|
2690
2686
|
handleNavigation(e) {
|
|
@@ -2779,7 +2775,7 @@ export {
|
|
|
2779
2775
|
y as DayViewRenderer,
|
|
2780
2776
|
S as EventBus,
|
|
2781
2777
|
H as ForceCalendar,
|
|
2782
|
-
|
|
2778
|
+
m as MonthViewRenderer,
|
|
2783
2779
|
C as StateManager,
|
|
2784
2780
|
u as StyleUtils,
|
|
2785
2781
|
b as WeekViewRenderer,
|