@sprucelabs/spruce-calendar-components 22.6.23 → 22.6.26

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.
@@ -160,6 +160,7 @@ export default class RootSkillViewController extends AbstractSkillViewController
160
160
  this.transitionPromise,
161
161
  this.loadEventsPromise,
162
162
  this.sm.waitForContextUpdate(),
163
+ this.calendarVc.waitForPendingSaves(),
163
164
  ]);
164
165
  });
165
166
  }
@@ -305,10 +306,10 @@ export default class RootSkillViewController extends AbstractSkillViewController
305
306
  yield router.redirect('heartwood.root');
306
307
  }
307
308
  const { startDate = this.dates.date() } = args;
308
- yield this.calendarVc.renderOnce(() => {
309
+ yield this.calendarVc.renderOnce(() => __awaiter(this, void 0, void 0, function* () {
309
310
  this.syncOffsetWithLocale(locale);
310
- this.calendarVc.setStartDate(startDate);
311
- });
311
+ yield this.calendarVc.setStartDate(startDate);
312
+ }));
312
313
  yield this.transitionToRoot();
313
314
  this.setSelectedDateInDateSelectVc(startDate);
314
315
  yield this.waitUntilDoneSaving();
@@ -54,8 +54,10 @@ export class RootToolBeltState {
54
54
  }
55
55
  }
56
56
  handleSelectDate(date) {
57
- const { calendarVc } = this.sm.getContext();
58
- calendarVc.setStartDate(date);
57
+ return __awaiter(this, void 0, void 0, function* () {
58
+ const { calendarVc } = this.sm.getContext();
59
+ yield calendarVc.setStartDate(date);
60
+ });
59
61
  }
60
62
  resetToolBelt() {
61
63
  var _a;
@@ -95,7 +95,7 @@ export default class CalendarEventManager {
95
95
  return __awaiter(this, void 0, void 0, function* () {
96
96
  this.allEvents.push(event);
97
97
  if (shouldSelectEvent) {
98
- this.calendarVc.selectEvent(event.id);
98
+ yield this.calendarVc.selectEvent(event.id);
99
99
  yield this.updateEventInContext(event);
100
100
  }
101
101
  });
@@ -149,7 +149,7 @@ export default class CalendarEventManager {
149
149
  return __awaiter(this, void 0, void 0, function* () {
150
150
  this.allEvents = this.allEvents.filter((e) => e.id !== id);
151
151
  const event = this.calendarVc.getEvent(id);
152
- this.calendarVc.removeEvent(id);
152
+ yield this.calendarVc.removeEvent(id);
153
153
  if ((options === null || options === void 0 ? void 0 : options.shouldPersist) === false) {
154
154
  return;
155
155
  }
@@ -178,7 +178,7 @@ export default class CalendarEventManager {
178
178
  for (const event of this.allEvents) {
179
179
  if (event.calendarId === calendarId &&
180
180
  this.calendarVc.hasEvent(event.id)) {
181
- this.calendarVc.removeEvent(event.id);
181
+ yield this.calendarVc.removeEvent(event.id);
182
182
  }
183
183
  }
184
184
  yield this.prefs.setVisibleCalendarIds(visibleCalendarIds);
@@ -278,7 +278,7 @@ export default class CalendarEventManager {
278
278
  return __awaiter(this, void 0, void 0, function* () {
279
279
  const lastSelected = this.calendarVc.getSelectedEvent();
280
280
  const event = this.calendarVc.getEvent(eventId);
281
- this.calendarVc.selectEvent(event.id);
281
+ yield this.calendarVc.selectEvent(event.id);
282
282
  if ((lastSelected === null || lastSelected === void 0 ? void 0 : lastSelected.id) !== event.id) {
283
283
  yield this.setEventInContext(event);
284
284
  }
@@ -327,7 +327,7 @@ export default class CalendarEventManager {
327
327
  }
328
328
  deselectEvent() {
329
329
  return __awaiter(this, void 0, void 0, function* () {
330
- this.calendarVc.deselectEvent();
330
+ yield this.calendarVc.deselectEvent();
331
331
  });
332
332
  }
333
333
  handleDidUpdateContext() {
@@ -32,6 +32,7 @@ export default class CalendarViewController extends CoreCalendarViewController {
32
32
  private isSwapping;
33
33
  private lastSwappedId?;
34
34
  private activelyPersisting;
35
+ private persistPromise?;
35
36
  constructor(options: ViewControllerOptions & CalendarViewControllerOptions);
36
37
  private handleDropEvent;
37
38
  getCalendarVc(): this;
@@ -41,38 +42,15 @@ export default class CalendarViewController extends CoreCalendarViewController {
41
42
  private getDraftEvent;
42
43
  private removeDraftEvent;
43
44
  private addDraftEventFromClick;
44
- addDraftEvent(e: Omit<Event, 'id'>): Promise<SpruceSchemas.CalendarUtils.v2021_05_19.CalendarEvent | {
45
- id: string;
46
- isSelected?: boolean | null | undefined;
47
- isBusy?: boolean | null | undefined;
48
- controller?: import("@sprucelabs/heartwood-view-controllers").CalendarEventViewController | null | undefined;
49
- daysOfWeek?: ("sun" | "mon" | "tue" | "wed" | "thur" | "fri" | "sat")[] | null | undefined;
50
- target: SpruceSchemas.CalendarUtils.v2021_05_19.CalendarEventTarget;
51
- calendarId: string;
52
- eventTypeSlug?: string | null | undefined;
53
- startDateTimeMs: number;
54
- isResizeable?: boolean | null | undefined;
55
- style?: "draft" | "tentative" | "upcoming" | "unavailable" | "blocked" | "active" | "past" | "warn" | "critical" | null | undefined;
56
- groupId?: string | null | undefined;
57
- timeBlocks: SpruceSchemas.CalendarUtils.v2021_05_19.EventTimeBlock[];
58
- repeats?: "weekly" | "monthly" | "daily" | null | undefined;
59
- daysOfMonth?: ("1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "19" | "20" | "21" | "22" | "23" | "24" | "25" | "26" | "27" | "28" | "29" | "30" | "31")[] | null | undefined;
60
- repeatsUntil?: number | null | undefined;
61
- occurrences?: number | null | undefined;
62
- interval?: number | null | undefined;
63
- nthOccurrences?: number[] | null | undefined;
64
- activeUntilDate?: number | null | undefined;
65
- exclusionDates?: SpruceSchemas.CalendarUtils.v2021_05_19.EventExclusionDate[] | null | undefined;
66
- nthInRepeating?: number | null | undefined;
67
- totalInRepeating?: number | null | undefined;
68
- error?: Error | null | undefined;
69
- }>;
45
+ addDraftEvent(e: Omit<Event, 'id'>): Promise<SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarEvent>;
70
46
  getIsSwappingEvent(): boolean;
71
47
  private swapEvent;
72
48
  updateEvent(id: string, updates: Partial<UpdateEvent> & {
73
49
  shouldPersist?: boolean;
74
50
  }): any;
75
51
  private persist;
52
+ waitForPendingSaves(): Promise<void>;
53
+ private _persist;
76
54
  getPeople(): SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarPerson[];
77
55
  render(): {
78
56
  people: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarPerson[];
@@ -79,7 +79,7 @@ export default class CalendarViewController extends CoreCalendarViewController {
79
79
  ]);
80
80
  const selected = this.getSelectedEvent();
81
81
  if (selected && selected.style !== 'draft') {
82
- this.deselectEvent();
82
+ yield this.deselectEvent();
83
83
  return;
84
84
  }
85
85
  const draft = this.getDraftEvent();
@@ -99,7 +99,7 @@ export default class CalendarViewController extends CoreCalendarViewController {
99
99
  removeDraftEvent(id) {
100
100
  var _a, _b, _c;
101
101
  return __awaiter(this, void 0, void 0, function* () {
102
- this.removeEvent(id);
102
+ yield this.removeEvent(id);
103
103
  yield ((_a = this.draftRemovedHandler) === null || _a === void 0 ? void 0 : _a.call(this));
104
104
  try {
105
105
  yield ((_b = this.remoteEventStore) === null || _b === void 0 ? void 0 : _b.cancelEvent(id));
@@ -154,15 +154,15 @@ export default class CalendarViewController extends CoreCalendarViewController {
154
154
  this.disableAnimations();
155
155
  this.isSwapping = true;
156
156
  try {
157
- yield this.renderOnce(() => {
157
+ yield this.renderOnce(() => __awaiter(this, void 0, void 0, function* () {
158
158
  const selected = this.getSelectedEvent();
159
- this.removeEvent(from.id);
159
+ yield this.removeEvent(from.id);
160
160
  to.isBusy = false;
161
161
  this.addEvent(to);
162
162
  if (selected) {
163
- this.selectEvent(to.id);
163
+ yield this.selectEvent(to.id);
164
164
  }
165
- });
165
+ }));
166
166
  // eslint-disable-next-line no-empty
167
167
  }
168
168
  catch (_a) { }
@@ -184,12 +184,24 @@ export default class CalendarViewController extends CoreCalendarViewController {
184
184
  return Object.assign({}, updates);
185
185
  }
186
186
  persist(event) {
187
+ return __awaiter(this, void 0, void 0, function* () {
188
+ this.persistPromise = this._persist(event);
189
+ return this.persistPromise;
190
+ });
191
+ }
192
+ waitForPendingSaves() {
193
+ return __awaiter(this, void 0, void 0, function* () {
194
+ yield this.persistPromise;
195
+ });
196
+ }
197
+ _persist(event) {
187
198
  const _super = Object.create(null, {
188
199
  updateEvent: { get: () => super.updateEvent }
189
200
  });
190
201
  var _a, _b;
191
202
  return __awaiter(this, void 0, void 0, function* () {
192
- const id = event.id;
203
+ let updated = event;
204
+ const id = updated.id;
193
205
  try {
194
206
  if (!this.activelyPersisting[id]) {
195
207
  this.activelyPersisting[id] = 1;
@@ -200,7 +212,7 @@ export default class CalendarViewController extends CoreCalendarViewController {
200
212
  const saved = yield ((_a = this.remoteEventStore) === null || _a === void 0 ? void 0 : _a.persist(Object.assign({}, event)));
201
213
  this.activelyPersisting[id]--;
202
214
  if (!saved) {
203
- return;
215
+ return undefined;
204
216
  }
205
217
  if (id !== saved.id) {
206
218
  if (this.lastSwappedId === id) {
@@ -17,7 +17,7 @@ export default class DateSelectCardViewController extends AbstractViewController
17
17
  private dateSelectHandler;
18
18
  constructor(options: ViewControllerOptions & DateSelectOptions);
19
19
  getStartDate(): number | null | undefined;
20
- setStartDate(startDate: number): void;
20
+ setStartDate(startDate: number): Promise<void>;
21
21
  private CalendarVc;
22
22
  private handleDateSelect;
23
23
  private CardVc;
@@ -28,7 +28,9 @@ export default class DateSelectCardViewController extends AbstractViewController
28
28
  return this.calendarVc.getStartDate();
29
29
  }
30
30
  setStartDate(startDate) {
31
- this.calendarVc.setStartDate(startDate);
31
+ return __awaiter(this, void 0, void 0, function* () {
32
+ yield this.calendarVc.setStartDate(startDate);
33
+ });
32
34
  }
33
35
  CalendarVc(options) {
34
36
  return this.Controller('calendar', Object.assign({ view: 'month', onClick: ({ dateTimeMs }) => this.handleDateSelect(dateTimeMs), selectedDates: [] }, options));
@@ -36,11 +38,11 @@ export default class DateSelectCardViewController extends AbstractViewController
36
38
  handleDateSelect(dateTimeMs) {
37
39
  return __awaiter(this, void 0, void 0, function* () {
38
40
  const { year, month, day } = dateUtil.splitDate(dateTimeMs);
39
- yield this.calendarVc.renderOnce(() => {
40
- this.calendarVc.setStartDate(dateTimeMs);
41
+ yield this.calendarVc.renderOnce(() => __awaiter(this, void 0, void 0, function* () {
42
+ yield this.calendarVc.setStartDate(dateTimeMs);
41
43
  this.calendarVc.clearSelectedDates();
42
44
  this.calendarVc.selectDate(year, month, day);
43
- });
45
+ }));
44
46
  yield this.dateSelectHandler(dateTimeMs !== null && dateTimeMs !== void 0 ? dateTimeMs : 0);
45
47
  });
46
48
  }
@@ -59,8 +59,8 @@ export default class EventDateTimeToolViewController extends AbstractViewControl
59
59
  onClick: () => __awaiter(this, void 0, void 0, function* () {
60
60
  shouldBail = true;
61
61
  const { calendarVc } = this.getContext();
62
- calendarVc.setStartDate(dateTimeMs);
63
- calendarVc.deselectEvent();
62
+ yield calendarVc.setStartDate(dateTimeMs);
63
+ yield calendarVc.deselectEvent();
64
64
  yield dlg.hide();
65
65
  }),
66
66
  },
@@ -141,6 +141,7 @@ class RootSkillViewController extends heartwood_view_controllers_1.AbstractSkill
141
141
  this.transitionPromise,
142
142
  this.loadEventsPromise,
143
143
  this.sm.waitForContextUpdate(),
144
+ this.calendarVc.waitForPendingSaves(),
144
145
  ]);
145
146
  }
146
147
  handleSelectCalendar(calendar) {
@@ -268,9 +269,9 @@ class RootSkillViewController extends heartwood_view_controllers_1.AbstractSkill
268
269
  await router.redirect('heartwood.root');
269
270
  }
270
271
  const { startDate = this.dates.date() } = args;
271
- await this.calendarVc.renderOnce(() => {
272
+ await this.calendarVc.renderOnce(async () => {
272
273
  this.syncOffsetWithLocale(locale);
273
- this.calendarVc.setStartDate(startDate);
274
+ await this.calendarVc.setStartDate(startDate);
274
275
  });
275
276
  await this.transitionToRoot();
276
277
  this.setSelectedDateInDateSelectVc(startDate);
@@ -45,9 +45,9 @@ class RootToolBeltState {
45
45
  this.toolBeltVc.removeStickyTool('bottom');
46
46
  }
47
47
  }
48
- handleSelectDate(date) {
48
+ async handleSelectDate(date) {
49
49
  const { calendarVc } = this.sm.getContext();
50
- calendarVc.setStartDate(date);
50
+ await calendarVc.setStartDate(date);
51
51
  }
52
52
  resetToolBelt() {
53
53
  var _a;
@@ -90,7 +90,7 @@ class CalendarEventManager {
90
90
  async addDraftEvent(event, shouldSelectEvent = true) {
91
91
  this.allEvents.push(event);
92
92
  if (shouldSelectEvent) {
93
- this.calendarVc.selectEvent(event.id);
93
+ await this.calendarVc.selectEvent(event.id);
94
94
  await this.updateEventInContext(event);
95
95
  }
96
96
  }
@@ -134,7 +134,7 @@ class CalendarEventManager {
134
134
  var _a;
135
135
  this.allEvents = this.allEvents.filter((e) => e.id !== id);
136
136
  const event = this.calendarVc.getEvent(id);
137
- this.calendarVc.removeEvent(id);
137
+ await this.calendarVc.removeEvent(id);
138
138
  if ((options === null || options === void 0 ? void 0 : options.shouldPersist) === false) {
139
139
  return;
140
140
  }
@@ -159,7 +159,7 @@ class CalendarEventManager {
159
159
  for (const event of this.allEvents) {
160
160
  if (event.calendarId === calendarId &&
161
161
  this.calendarVc.hasEvent(event.id)) {
162
- this.calendarVc.removeEvent(event.id);
162
+ await this.calendarVc.removeEvent(event.id);
163
163
  }
164
164
  }
165
165
  await this.prefs.setVisibleCalendarIds(visibleCalendarIds);
@@ -247,7 +247,7 @@ class CalendarEventManager {
247
247
  async selectEvent(eventId) {
248
248
  const lastSelected = this.calendarVc.getSelectedEvent();
249
249
  const event = this.calendarVc.getEvent(eventId);
250
- this.calendarVc.selectEvent(event.id);
250
+ await this.calendarVc.selectEvent(event.id);
251
251
  if ((lastSelected === null || lastSelected === void 0 ? void 0 : lastSelected.id) !== event.id) {
252
252
  await this.setEventInContext(event);
253
253
  }
@@ -288,7 +288,7 @@ class CalendarEventManager {
288
288
  };
289
289
  }
290
290
  async deselectEvent() {
291
- this.calendarVc.deselectEvent();
291
+ await this.calendarVc.deselectEvent();
292
292
  }
293
293
  async handleDidUpdateContext() {
294
294
  if (this.shouldIgnoreNextContextUpdate) {
@@ -32,6 +32,7 @@ export default class CalendarViewController extends CoreCalendarViewController {
32
32
  private isSwapping;
33
33
  private lastSwappedId?;
34
34
  private activelyPersisting;
35
+ private persistPromise?;
35
36
  constructor(options: ViewControllerOptions & CalendarViewControllerOptions);
36
37
  private handleDropEvent;
37
38
  getCalendarVc(): this;
@@ -41,38 +42,15 @@ export default class CalendarViewController extends CoreCalendarViewController {
41
42
  private getDraftEvent;
42
43
  private removeDraftEvent;
43
44
  private addDraftEventFromClick;
44
- addDraftEvent(e: Omit<Event, 'id'>): Promise<SpruceSchemas.CalendarUtils.v2021_05_19.CalendarEvent | {
45
- id: string;
46
- isSelected?: boolean | null | undefined;
47
- isBusy?: boolean | null | undefined;
48
- controller?: import("@sprucelabs/heartwood-view-controllers").CalendarEventViewController | null | undefined;
49
- daysOfWeek?: ("sun" | "mon" | "tue" | "wed" | "thur" | "fri" | "sat")[] | null | undefined;
50
- target: SpruceSchemas.CalendarUtils.v2021_05_19.CalendarEventTarget;
51
- calendarId: string;
52
- eventTypeSlug?: string | null | undefined;
53
- startDateTimeMs: number;
54
- isResizeable?: boolean | null | undefined;
55
- style?: "draft" | "tentative" | "upcoming" | "unavailable" | "blocked" | "active" | "past" | "warn" | "critical" | null | undefined;
56
- groupId?: string | null | undefined;
57
- timeBlocks: SpruceSchemas.CalendarUtils.v2021_05_19.EventTimeBlock[];
58
- repeats?: "weekly" | "monthly" | "daily" | null | undefined;
59
- daysOfMonth?: ("1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "19" | "20" | "21" | "22" | "23" | "24" | "25" | "26" | "27" | "28" | "29" | "30" | "31")[] | null | undefined;
60
- repeatsUntil?: number | null | undefined;
61
- occurrences?: number | null | undefined;
62
- interval?: number | null | undefined;
63
- nthOccurrences?: number[] | null | undefined;
64
- activeUntilDate?: number | null | undefined;
65
- exclusionDates?: SpruceSchemas.CalendarUtils.v2021_05_19.EventExclusionDate[] | null | undefined;
66
- nthInRepeating?: number | null | undefined;
67
- totalInRepeating?: number | null | undefined;
68
- error?: Error | null | undefined;
69
- }>;
45
+ addDraftEvent(e: Omit<Event, 'id'>): Promise<SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarEvent>;
70
46
  getIsSwappingEvent(): boolean;
71
47
  private swapEvent;
72
48
  updateEvent(id: string, updates: Partial<UpdateEvent> & {
73
49
  shouldPersist?: boolean;
74
50
  }): any;
75
51
  private persist;
52
+ waitForPendingSaves(): Promise<void>;
53
+ private _persist;
76
54
  getPeople(): SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarPerson[];
77
55
  render(): {
78
56
  people: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarPerson[];
@@ -72,7 +72,7 @@ class CalendarViewController extends heartwood_view_controllers_1.CalendarViewCo
72
72
  ]);
73
73
  const selected = this.getSelectedEvent();
74
74
  if (selected && selected.style !== 'draft') {
75
- this.deselectEvent();
75
+ await this.deselectEvent();
76
76
  return;
77
77
  }
78
78
  const draft = this.getDraftEvent();
@@ -90,7 +90,7 @@ class CalendarViewController extends heartwood_view_controllers_1.CalendarViewCo
90
90
  }
91
91
  async removeDraftEvent(id) {
92
92
  var _a, _b, _c;
93
- this.removeEvent(id);
93
+ await this.removeEvent(id);
94
94
  await ((_a = this.draftRemovedHandler) === null || _a === void 0 ? void 0 : _a.call(this));
95
95
  try {
96
96
  await ((_b = this.remoteEventStore) === null || _b === void 0 ? void 0 : _b.cancelEvent(id));
@@ -136,13 +136,13 @@ class CalendarViewController extends heartwood_view_controllers_1.CalendarViewCo
136
136
  this.disableAnimations();
137
137
  this.isSwapping = true;
138
138
  try {
139
- await this.renderOnce(() => {
139
+ await this.renderOnce(async () => {
140
140
  const selected = this.getSelectedEvent();
141
- this.removeEvent(from.id);
141
+ await this.removeEvent(from.id);
142
142
  to.isBusy = false;
143
143
  this.addEvent(to);
144
144
  if (selected) {
145
- this.selectEvent(to.id);
145
+ await this.selectEvent(to.id);
146
146
  }
147
147
  });
148
148
  // eslint-disable-next-line no-empty
@@ -165,8 +165,16 @@ class CalendarViewController extends heartwood_view_controllers_1.CalendarViewCo
165
165
  return Object.assign({}, updates);
166
166
  }
167
167
  async persist(event) {
168
+ this.persistPromise = this._persist(event);
169
+ return this.persistPromise;
170
+ }
171
+ async waitForPendingSaves() {
172
+ await this.persistPromise;
173
+ }
174
+ async _persist(event) {
168
175
  var _a, _b;
169
- const id = event.id;
176
+ let updated = event;
177
+ const id = updated.id;
170
178
  try {
171
179
  if (!this.activelyPersisting[id]) {
172
180
  this.activelyPersisting[id] = 1;
@@ -177,7 +185,7 @@ class CalendarViewController extends heartwood_view_controllers_1.CalendarViewCo
177
185
  const saved = await ((_a = this.remoteEventStore) === null || _a === void 0 ? void 0 : _a.persist(Object.assign({}, event)));
178
186
  this.activelyPersisting[id]--;
179
187
  if (!saved) {
180
- return;
188
+ return undefined;
181
189
  }
182
190
  if (id !== saved.id) {
183
191
  if (this.lastSwappedId === id) {
@@ -17,7 +17,7 @@ export default class DateSelectCardViewController extends AbstractViewController
17
17
  private dateSelectHandler;
18
18
  constructor(options: ViewControllerOptions & DateSelectOptions);
19
19
  getStartDate(): number | null | undefined;
20
- setStartDate(startDate: number): void;
20
+ setStartDate(startDate: number): Promise<void>;
21
21
  private CalendarVc;
22
22
  private handleDateSelect;
23
23
  private CardVc;
@@ -20,16 +20,16 @@ class DateSelectCardViewController extends heartwood_view_controllers_1.Abstract
20
20
  getStartDate() {
21
21
  return this.calendarVc.getStartDate();
22
22
  }
23
- setStartDate(startDate) {
24
- this.calendarVc.setStartDate(startDate);
23
+ async setStartDate(startDate) {
24
+ await this.calendarVc.setStartDate(startDate);
25
25
  }
26
26
  CalendarVc(options) {
27
27
  return this.Controller('calendar', Object.assign({ view: 'month', onClick: ({ dateTimeMs }) => this.handleDateSelect(dateTimeMs), selectedDates: [] }, options));
28
28
  }
29
29
  async handleDateSelect(dateTimeMs) {
30
30
  const { year, month, day } = calendar_utils_1.dateUtil.splitDate(dateTimeMs);
31
- await this.calendarVc.renderOnce(() => {
32
- this.calendarVc.setStartDate(dateTimeMs);
31
+ await this.calendarVc.renderOnce(async () => {
32
+ await this.calendarVc.setStartDate(dateTimeMs);
33
33
  this.calendarVc.clearSelectedDates();
34
34
  this.calendarVc.selectDate(year, month, day);
35
35
  });
@@ -51,8 +51,8 @@ class EventDateTimeToolViewController extends heartwood_view_controllers_1.Abstr
51
51
  onClick: async () => {
52
52
  shouldBail = true;
53
53
  const { calendarVc } = this.getContext();
54
- calendarVc.setStartDate(dateTimeMs);
55
- calendarVc.deselectEvent();
54
+ await calendarVc.setStartDate(dateTimeMs);
55
+ await calendarVc.deselectEvent();
56
56
  await dlg.hide();
57
57
  },
58
58
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sprucelabs/spruce-calendar-components",
3
3
  "description": "Calendar components for working with calendars and Sprucebot.",
4
- "version": "22.6.23",
4
+ "version": "22.6.26",
5
5
  "skill": {
6
6
  "namespace": "calendar"
7
7
  },