@forcecalendar/interface 1.0.32 → 1.0.34
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 +21 -21
- package/dist/force-calendar-interface.esm.js.map +1 -1
- package/dist/force-calendar-interface.umd.js +2 -2
- package/dist/force-calendar-interface.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ForceCalendar.js +5 -3
- package/src/core/StateManager.js +13 -9
|
@@ -5316,30 +5316,30 @@ class ie {
|
|
|
5316
5316
|
return this.enrichViewData(e);
|
|
5317
5317
|
}
|
|
5318
5318
|
enrichViewData(e) {
|
|
5319
|
-
var
|
|
5320
|
-
const t =
|
|
5321
|
-
if (
|
|
5322
|
-
...
|
|
5323
|
-
days:
|
|
5324
|
-
const
|
|
5319
|
+
var i;
|
|
5320
|
+
const t = { ...e }, s = (i = this.state.selectedDate) == null ? void 0 : i.toDateString();
|
|
5321
|
+
if (t.weeks && (t.weeks = t.weeks.map((r) => ({
|
|
5322
|
+
...r,
|
|
5323
|
+
days: r.days.map((n) => {
|
|
5324
|
+
const a = new Date(n.date);
|
|
5325
5325
|
return {
|
|
5326
|
-
...
|
|
5327
|
-
isSelected:
|
|
5328
|
-
events:
|
|
5326
|
+
...n,
|
|
5327
|
+
isSelected: a.toDateString() === s,
|
|
5328
|
+
events: n.events || this.getEventsForDate(a)
|
|
5329
5329
|
};
|
|
5330
5330
|
})
|
|
5331
|
-
}))),
|
|
5332
|
-
const
|
|
5331
|
+
}))), t.days && (t.days = t.days.map((r) => {
|
|
5332
|
+
const n = new Date(r.date);
|
|
5333
5333
|
return {
|
|
5334
|
-
...
|
|
5335
|
-
isSelected:
|
|
5336
|
-
events:
|
|
5334
|
+
...r,
|
|
5335
|
+
isSelected: n.toDateString() === s,
|
|
5336
|
+
events: r.events || this.getEventsForDate(n)
|
|
5337
5337
|
};
|
|
5338
|
-
})),
|
|
5339
|
-
const
|
|
5340
|
-
|
|
5338
|
+
})), t.date && !t.days && !t.weeks) {
|
|
5339
|
+
const r = new Date(t.date);
|
|
5340
|
+
t.isSelected = r.toDateString() === s, t.events = t.events || this.getEventsForDate(r);
|
|
5341
5341
|
}
|
|
5342
|
-
return
|
|
5342
|
+
return t;
|
|
5343
5343
|
}
|
|
5344
5344
|
// Selection management
|
|
5345
5345
|
selectEvent(e) {
|
|
@@ -6998,15 +6998,15 @@ class ne extends O {
|
|
|
6998
6998
|
})
|
|
6999
6999
|
), this._busUnsubscribers.push(
|
|
7000
7000
|
u.on("event:added", (t) => {
|
|
7001
|
-
|
|
7001
|
+
this.emit("calendar-event-added", t);
|
|
7002
7002
|
})
|
|
7003
7003
|
), this._busUnsubscribers.push(
|
|
7004
7004
|
u.on("event:updated", (t) => {
|
|
7005
|
-
|
|
7005
|
+
this.emit("calendar-event-updated", t);
|
|
7006
7006
|
})
|
|
7007
7007
|
), this._busUnsubscribers.push(
|
|
7008
7008
|
u.on("event:deleted", (t) => {
|
|
7009
|
-
|
|
7009
|
+
this.emit("calendar-event-deleted", t);
|
|
7010
7010
|
})
|
|
7011
7011
|
), this._busUnsubscribers.push(
|
|
7012
7012
|
u.on("date:selected", (t) => {
|