@forcecalendar/interface 1.0.33 → 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.
|
@@ -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) {
|