@sprucelabs/spruce-calendar-components 25.2.7 → 25.2.9

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.
@@ -538,7 +538,7 @@ class RootSkillViewController extends AbstractSkillViewController {
538
538
  }
539
539
  }
540
540
  RootSkillViewController.id = 'root';
541
- RootSkillViewController.shouldConfirmDrops = true;
541
+ RootSkillViewController.shouldConfirmDrops = false;
542
542
  RootSkillViewController.shouldUpdateOnInterval = true;
543
543
  RootSkillViewController.refreshInterval = 1000 * 60;
544
544
  export default RootSkillViewController;
@@ -14,6 +14,7 @@ export default abstract class AbstractCalendarEventToolBeltState implements Tool
14
14
  getIsLoaded(): boolean;
15
15
  protected loadRemoteCards(): Promise<void>;
16
16
  protected handleClickSave(): Promise<void>;
17
+ protected handleClickCancel(eventId: string): Promise<boolean | void>;
17
18
  private deselectEvent;
18
19
  private handleDidUpdateContext;
19
20
  protected getContext(): CalendarToolBeltContext;
@@ -21,7 +21,7 @@ export default class AbstractCalendarEventToolBeltState {
21
21
  this.sm = sm;
22
22
  this.toolBeltVc = sm.getToolBeltVc();
23
23
  this.isLoaded = true;
24
- this.controlsVc = sm.Controller('calendar.event-controls-card', Object.assign(Object.assign({ onCancel: this.clearPendingContextChanges.bind(this), onSave: this.handleClickSave.bind(this) }, this.buildVcConstructorOptions('controls')), { onCancelEvent: this.sm.getContext().cancelEvent }));
24
+ this.controlsVc = sm.Controller('calendar.event-controls-card', Object.assign(Object.assign({ onCancel: this.clearPendingContextChanges.bind(this), onSave: this.handleClickSave.bind(this) }, this.buildVcConstructorOptions('controls')), { onCancelEvent: this.handleClickCancel.bind(this) }));
25
25
  this.events = sm.getContext().events;
26
26
  this.events.setUpdateContextHandler((updates) => __awaiter(this, void 0, void 0, function* () {
27
27
  return this.handleUpdateContextFromTool(updates, 'eventManager', {
@@ -58,6 +58,11 @@ export default class AbstractCalendarEventToolBeltState {
58
58
  yield this.deselectEvent();
59
59
  });
60
60
  }
61
+ handleClickCancel(eventId) {
62
+ return __awaiter(this, void 0, void 0, function* () {
63
+ return this.sm.getContext().cancelEvent(eventId);
64
+ });
65
+ }
61
66
  deselectEvent() {
62
67
  return __awaiter(this, void 0, void 0, function* () {
63
68
  const { events } = this.sm.getContext();
@@ -472,7 +472,7 @@ class RootSkillViewController extends heartwood_view_controllers_1.AbstractSkill
472
472
  }
473
473
  }
474
474
  RootSkillViewController.id = 'root';
475
- RootSkillViewController.shouldConfirmDrops = true;
475
+ RootSkillViewController.shouldConfirmDrops = false;
476
476
  RootSkillViewController.shouldUpdateOnInterval = true;
477
477
  RootSkillViewController.refreshInterval = 1000 * 60;
478
478
  exports.default = RootSkillViewController;
@@ -14,6 +14,7 @@ export default abstract class AbstractCalendarEventToolBeltState implements Tool
14
14
  getIsLoaded(): boolean;
15
15
  protected loadRemoteCards(): Promise<void>;
16
16
  protected handleClickSave(): Promise<void>;
17
+ protected handleClickCancel(eventId: string): Promise<boolean | void>;
17
18
  private deselectEvent;
18
19
  private handleDidUpdateContext;
19
20
  protected getContext(): CalendarToolBeltContext;
@@ -16,7 +16,7 @@ class AbstractCalendarEventToolBeltState {
16
16
  this.sm = sm;
17
17
  this.toolBeltVc = sm.getToolBeltVc();
18
18
  this.isLoaded = true;
19
- this.controlsVc = sm.Controller('calendar.event-controls-card', Object.assign(Object.assign({ onCancel: this.clearPendingContextChanges.bind(this), onSave: this.handleClickSave.bind(this) }, this.buildVcConstructorOptions('controls')), { onCancelEvent: this.sm.getContext().cancelEvent }));
19
+ this.controlsVc = sm.Controller('calendar.event-controls-card', Object.assign(Object.assign({ onCancel: this.clearPendingContextChanges.bind(this), onSave: this.handleClickSave.bind(this) }, this.buildVcConstructorOptions('controls')), { onCancelEvent: this.handleClickCancel.bind(this) }));
20
20
  this.events = sm.getContext().events;
21
21
  this.events.setUpdateContextHandler(async (updates) => {
22
22
  return this.handleUpdateContextFromTool(updates, 'eventManager', {
@@ -48,6 +48,9 @@ class AbstractCalendarEventToolBeltState {
48
48
  await this.sm.updateContext(Object.assign({}, updates));
49
49
  await this.deselectEvent();
50
50
  }
51
+ async handleClickCancel(eventId) {
52
+ return this.sm.getContext().cancelEvent(eventId);
53
+ }
51
54
  async deselectEvent() {
52
55
  const { events } = this.sm.getContext();
53
56
  await events.deselectEvent();
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": "25.2.7",
4
+ "version": "25.2.9",
5
5
  "skill": {
6
6
  "namespace": "calendar"
7
7
  },