@sprucelabs/spruce-calendar-components 26.0.22 → 26.0.23

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.
@@ -23,8 +23,8 @@ export default abstract class AbstractCalendarEventToolBeltState implements Tool
23
23
  protected get context(): CalendarToolBeltContext;
24
24
  protected get event(): import("@sprucelabs/heartwood-view-controllers").SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarEvent;
25
25
  private deselectEvent;
26
- private handleWillUpdateContext;
27
- private handleDidUpdateContext;
26
+ private _handleWillUpdateContext;
27
+ private _handleDidUpdateContext;
28
28
  protected getContextWithPendingChanges(): CalendarToolBeltContext;
29
29
  clearPendingContextChanges(shouldEmitDidUpdate?: boolean): Promise<void>;
30
30
  addTool(options: AddToolOptions): Promise<CalendarTool>;
@@ -16,8 +16,8 @@ export default class AbstractCalendarEventToolBeltState {
16
16
  this.pendingContextUpdates = {};
17
17
  this.isLoaded = false;
18
18
  this.shouldLoadToolsRightAway = true;
19
- this.handleDidUpdateContext = this.handleDidUpdateContext.bind(this);
20
- this.handleWillUpdateContext = this.handleWillUpdateContext.bind(this);
19
+ this._handleDidUpdateContext = this._handleDidUpdateContext.bind(this);
20
+ this._handleWillUpdateContext = this._handleWillUpdateContext.bind(this);
21
21
  }
22
22
  load(sm) {
23
23
  var _a;
@@ -38,8 +38,8 @@ export default class AbstractCalendarEventToolBeltState {
38
38
  lineIcon: 'send',
39
39
  position: 'bottom',
40
40
  });
41
- void this.sm.on('did-update-context', this.handleDidUpdateContext);
42
- void this.sm.on('will-update-context', this.handleWillUpdateContext);
41
+ void this.sm.on('did-update-context', this._handleDidUpdateContext);
42
+ void this.sm.on('will-update-context', this._handleWillUpdateContext);
43
43
  this.lastEventId = (_a = this.event) === null || _a === void 0 ? void 0 : _a.id;
44
44
  });
45
45
  }
@@ -79,7 +79,7 @@ export default class AbstractCalendarEventToolBeltState {
79
79
  yield this.context.events.deselectEvent();
80
80
  });
81
81
  }
82
- handleWillUpdateContext({ updates, }) {
82
+ _handleWillUpdateContext({ updates, }) {
83
83
  return __awaiter(this, void 0, void 0, function* () {
84
84
  const { event } = updates;
85
85
  if (event && this.lastEventId !== event.id) {
@@ -87,7 +87,7 @@ export default class AbstractCalendarEventToolBeltState {
87
87
  }
88
88
  });
89
89
  }
90
- handleDidUpdateContext(skipToolWithId) {
90
+ _handleDidUpdateContext(skipToolWithId) {
91
91
  return __awaiter(this, void 0, void 0, function* () {
92
92
  const context = this.getContextWithPendingChanges();
93
93
  const { event } = context;
@@ -110,7 +110,7 @@ export default class AbstractCalendarEventToolBeltState {
110
110
  return __awaiter(this, void 0, void 0, function* () {
111
111
  this.pendingContextUpdates = {};
112
112
  if (shouldEmitDidUpdate) {
113
- yield this.handleDidUpdateContext();
113
+ yield this._handleDidUpdateContext();
114
114
  }
115
115
  });
116
116
  }
@@ -204,7 +204,7 @@ export default class AbstractCalendarEventToolBeltState {
204
204
  return this.sm.updateContext(Object.assign({}, updates));
205
205
  }
206
206
  else {
207
- yield this.handleDidUpdateContext(fromToolId);
207
+ yield this._handleDidUpdateContext(fromToolId);
208
208
  }
209
209
  return false;
210
210
  });
@@ -230,7 +230,7 @@ export default class AbstractCalendarEventToolBeltState {
230
230
  }
231
231
  destroy() {
232
232
  return __awaiter(this, void 0, void 0, function* () {
233
- yield this.sm.off('did-update-context', this.handleDidUpdateContext);
233
+ yield this.sm.off('did-update-context', this._handleDidUpdateContext);
234
234
  this.events.clearUpdateContextHandler();
235
235
  });
236
236
  }
@@ -23,8 +23,8 @@ export default abstract class AbstractCalendarEventToolBeltState implements Tool
23
23
  protected get context(): CalendarToolBeltContext;
24
24
  protected get event(): import("@sprucelabs/heartwood-view-controllers").SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarEvent;
25
25
  private deselectEvent;
26
- private handleWillUpdateContext;
27
- private handleDidUpdateContext;
26
+ private _handleWillUpdateContext;
27
+ private _handleDidUpdateContext;
28
28
  protected getContextWithPendingChanges(): CalendarToolBeltContext;
29
29
  clearPendingContextChanges(shouldEmitDidUpdate?: boolean): Promise<void>;
30
30
  addTool(options: AddToolOptions): Promise<CalendarTool>;
@@ -12,8 +12,8 @@ class AbstractCalendarEventToolBeltState {
12
12
  this.pendingContextUpdates = {};
13
13
  this.isLoaded = false;
14
14
  this.shouldLoadToolsRightAway = true;
15
- this.handleDidUpdateContext = this.handleDidUpdateContext.bind(this);
16
- this.handleWillUpdateContext = this.handleWillUpdateContext.bind(this);
15
+ this._handleDidUpdateContext = this._handleDidUpdateContext.bind(this);
16
+ this._handleWillUpdateContext = this._handleWillUpdateContext.bind(this);
17
17
  }
18
18
  async load(sm) {
19
19
  var _a;
@@ -33,8 +33,8 @@ class AbstractCalendarEventToolBeltState {
33
33
  lineIcon: 'send',
34
34
  position: 'bottom',
35
35
  });
36
- void this.sm.on('did-update-context', this.handleDidUpdateContext);
37
- void this.sm.on('will-update-context', this.handleWillUpdateContext);
36
+ void this.sm.on('did-update-context', this._handleDidUpdateContext);
37
+ void this.sm.on('will-update-context', this._handleWillUpdateContext);
38
38
  this.lastEventId = (_a = this.event) === null || _a === void 0 ? void 0 : _a.id;
39
39
  }
40
40
  getIsLoaded() {
@@ -65,13 +65,13 @@ class AbstractCalendarEventToolBeltState {
65
65
  async deselectEvent() {
66
66
  await this.context.events.deselectEvent();
67
67
  }
68
- async handleWillUpdateContext({ updates, }) {
68
+ async _handleWillUpdateContext({ updates, }) {
69
69
  const { event } = updates;
70
70
  if (event && this.lastEventId !== event.id) {
71
71
  this.pendingContextUpdates = {};
72
72
  }
73
73
  }
74
- async handleDidUpdateContext(skipToolWithId) {
74
+ async _handleDidUpdateContext(skipToolWithId) {
75
75
  const context = this.getContextWithPendingChanges();
76
76
  const { event } = context;
77
77
  if (!context.event) {
@@ -91,7 +91,7 @@ class AbstractCalendarEventToolBeltState {
91
91
  async clearPendingContextChanges(shouldEmitDidUpdate = true) {
92
92
  this.pendingContextUpdates = {};
93
93
  if (shouldEmitDidUpdate) {
94
- await this.handleDidUpdateContext();
94
+ await this._handleDidUpdateContext();
95
95
  }
96
96
  }
97
97
  async addTool(options) {
@@ -171,7 +171,7 @@ class AbstractCalendarEventToolBeltState {
171
171
  return this.sm.updateContext(Object.assign({}, updates));
172
172
  }
173
173
  else {
174
- await this.handleDidUpdateContext(fromToolId);
174
+ await this._handleDidUpdateContext(fromToolId);
175
175
  }
176
176
  return false;
177
177
  }
@@ -195,7 +195,7 @@ class AbstractCalendarEventToolBeltState {
195
195
  return this.controlsVc;
196
196
  }
197
197
  async destroy() {
198
- await this.sm.off('did-update-context', this.handleDidUpdateContext);
198
+ await this.sm.off('did-update-context', this._handleDidUpdateContext);
199
199
  this.events.clearUpdateContextHandler();
200
200
  }
201
201
  }
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": "26.0.22",
4
+ "version": "26.0.23",
5
5
  "skill": {
6
6
  "namespace": "calendar"
7
7
  },