@sprucelabs/spruce-calendar-components 24.2.13 → 24.2.15

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.
@@ -87,6 +87,7 @@ export default class CalendarEventManager {
87
87
  setUpdateContextHandler(handler: UpdateCalendarToolBeltContextHandler<CalendarToolBeltContext>): void;
88
88
  clearUpdateContextHandler(): void;
89
89
  selectEvent(eventId: string): Promise<void>;
90
+ getSelectedEvent(): import("@sprucelabs/calendar-utils").SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarEvent | undefined;
90
91
  load(): Promise<void>;
91
92
  getEvent(id: string): CalendarEvent;
92
93
  private loadCalendars;
@@ -253,13 +253,16 @@ class CalendarEventManager {
253
253
  delete this.updateContext;
254
254
  }
255
255
  async selectEvent(eventId) {
256
- const lastSelected = this.calendarVc.getSelectedEvent();
256
+ const lastSelected = this.getSelectedEvent();
257
257
  const event = this.calendarVc.getEvent(eventId);
258
258
  await this.calendarVc.selectEvent(event.id);
259
259
  if ((lastSelected === null || lastSelected === void 0 ? void 0 : lastSelected.id) !== event.id) {
260
260
  await this.setEventInContext(event);
261
261
  }
262
262
  }
263
+ getSelectedEvent() {
264
+ return this.calendarVc.getSelectedEvent();
265
+ }
263
266
  async load() {
264
267
  await this.sm.on('will-update-context', this.handleWillUpdateContext.bind(this));
265
268
  await this.sm.on('did-update-context', this.handleDidUpdateContext.bind(this));