@sprucelabs/spruce-calendar-components 22.8.9 → 22.8.10

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.
@@ -22,6 +22,7 @@ export interface CalendarViewControllerOptions {
22
22
  onDeselectEvent?: DeselectEventHandler;
23
23
  }
24
24
  export default class CalendarViewController extends CoreCalendarViewController {
25
+ static shouldDelayStartingAnimationOnSwap: boolean;
25
26
  static id: string;
26
27
  private remoteEventStore?;
27
28
  private draftAddedHandler;
@@ -167,6 +167,9 @@ export default class CalendarViewController extends CoreCalendarViewController {
167
167
  }
168
168
  catch (_a) { }
169
169
  this.isSwapping = false;
170
+ if (CalendarViewController.shouldDelayStartingAnimationOnSwap) {
171
+ yield new Promise((r) => setTimeout(r, 500));
172
+ }
170
173
  this.enableAnimation();
171
174
  });
172
175
  }
@@ -251,4 +254,5 @@ export default class CalendarViewController extends CoreCalendarViewController {
251
254
  return Object.assign(Object.assign({}, super.render()), { people: this.getPeople() });
252
255
  }
253
256
  }
257
+ CalendarViewController.shouldDelayStartingAnimationOnSwap = true;
254
258
  CalendarViewController.id = 'calendar';
@@ -22,6 +22,7 @@ export interface CalendarViewControllerOptions {
22
22
  onDeselectEvent?: DeselectEventHandler;
23
23
  }
24
24
  export default class CalendarViewController extends CoreCalendarViewController {
25
+ static shouldDelayStartingAnimationOnSwap: boolean;
25
26
  static id: string;
26
27
  private remoteEventStore?;
27
28
  private draftAddedHandler;
@@ -149,6 +149,9 @@ class CalendarViewController extends heartwood_view_controllers_1.CalendarViewCo
149
149
  }
150
150
  catch (_a) { }
151
151
  this.isSwapping = false;
152
+ if (CalendarViewController.shouldDelayStartingAnimationOnSwap) {
153
+ await new Promise((r) => setTimeout(r, 500));
154
+ }
152
155
  this.enableAnimation();
153
156
  }
154
157
  updateEvent(id, updates) {
@@ -224,4 +227,5 @@ class CalendarViewController extends heartwood_view_controllers_1.CalendarViewCo
224
227
  }
225
228
  }
226
229
  exports.default = CalendarViewController;
230
+ CalendarViewController.shouldDelayStartingAnimationOnSwap = true;
227
231
  CalendarViewController.id = 'calendar';
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.8.9",
4
+ "version": "22.8.10",
5
5
  "skill": {
6
6
  "namespace": "calendar"
7
7
  },