@forcecalendar/interface 1.0.21 → 1.0.22
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.
|
@@ -6851,7 +6851,7 @@ class ne extends O {
|
|
|
6851
6851
|
return ["view", "date", "locale", "timezone", "week-starts-on", "height"];
|
|
6852
6852
|
}
|
|
6853
6853
|
constructor() {
|
|
6854
|
-
super(), this.stateManager = null, this.currentView = null, this._hasRendered = !1, this._cachedStyles = null;
|
|
6854
|
+
super(), this.stateManager = null, this.currentView = null, this._hasRendered = !1, this._cachedStyles = null, this._busUnsubscribers = [];
|
|
6855
6855
|
}
|
|
6856
6856
|
initialize() {
|
|
6857
6857
|
const e = {
|
|
@@ -6864,15 +6864,15 @@ class ne extends O {
|
|
|
6864
6864
|
this.stateManager = new ie(e), this.stateManager.subscribe(this.handleStateChange.bind(this)), this.setupEventListeners();
|
|
6865
6865
|
}
|
|
6866
6866
|
setupEventListeners() {
|
|
6867
|
-
m.on("navigation:*", (e, t) => {
|
|
6867
|
+
this._busUnsubscribers.forEach((e) => e()), this._busUnsubscribers = [], this._busUnsubscribers.push(m.on("navigation:*", (e, t) => {
|
|
6868
6868
|
this.emit("calendar-navigate", { action: t.split(":")[1], ...e });
|
|
6869
|
-
}), m.on("view:changed", (e) => {
|
|
6869
|
+
})), this._busUnsubscribers.push(m.on("view:changed", (e) => {
|
|
6870
6870
|
this.emit("calendar-view-change", e);
|
|
6871
|
-
}), m.on("event:*", (e, t) => {
|
|
6871
|
+
})), this._busUnsubscribers.push(m.on("event:*", (e, t) => {
|
|
6872
6872
|
this.emit(`calendar-event-${t.split(":")[1]}`, e);
|
|
6873
|
-
}), m.on("date:selected", (e) => {
|
|
6873
|
+
})), this._busUnsubscribers.push(m.on("date:selected", (e) => {
|
|
6874
6874
|
this.emit("calendar-date-select", e);
|
|
6875
|
-
});
|
|
6875
|
+
}));
|
|
6876
6876
|
}
|
|
6877
6877
|
handleStateChange(e, t) {
|
|
6878
6878
|
var o, c;
|
|
@@ -7518,7 +7518,7 @@ class ne extends O {
|
|
|
7518
7518
|
this.stateManager.today();
|
|
7519
7519
|
}
|
|
7520
7520
|
destroy() {
|
|
7521
|
-
this.stateManager && this.stateManager.destroy(),
|
|
7521
|
+
this._busUnsubscribers.forEach((e) => e()), this._busUnsubscribers = [], this.stateManager && this.stateManager.destroy(), super.cleanup();
|
|
7522
7522
|
}
|
|
7523
7523
|
}
|
|
7524
7524
|
customElements.get("forcecal-main") || customElements.define("forcecal-main", ne);
|