@sprucelabs/spruce-calendar-components 22.3.19 → 22.3.20
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.
|
@@ -249,7 +249,6 @@ export default class RootSkillViewController extends AbstractSkillViewController
|
|
|
249
249
|
}
|
|
250
250
|
handleDraftEventAdded(event) {
|
|
251
251
|
return __awaiter(this, void 0, void 0, function* () {
|
|
252
|
-
console.log('handle draft event added');
|
|
253
252
|
yield this.events.addDraftEvent(event, !event.eventTypeSlug);
|
|
254
253
|
if (!event.eventTypeSlug) {
|
|
255
254
|
this.toolBeltVc.open({ shouldStayOpen: true });
|
|
@@ -90,10 +90,13 @@ export default class CalendarEventManager {
|
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
92
|
silentlySwapEvent(oldId, event) {
|
|
93
|
+
var _a;
|
|
93
94
|
return __awaiter(this, void 0, void 0, function* () {
|
|
94
95
|
const events = this.getEvents().filter((e) => e.id !== oldId);
|
|
95
96
|
this.allEvents = [...events, event];
|
|
96
|
-
|
|
97
|
+
if (((_a = this.sm.getContext().event) === null || _a === void 0 ? void 0 : _a.id) === oldId) {
|
|
98
|
+
yield this.updateEventInContext(event);
|
|
99
|
+
}
|
|
97
100
|
});
|
|
98
101
|
}
|
|
99
102
|
handleDropEvent(id, updates) {
|
|
@@ -220,7 +220,6 @@ class RootSkillViewController extends heartwood_view_controllers_1.AbstractSkill
|
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
async handleDraftEventAdded(event) {
|
|
223
|
-
console.log('handle draft event added');
|
|
224
223
|
await this.events.addDraftEvent(event, !event.eventTypeSlug);
|
|
225
224
|
if (!event.eventTypeSlug) {
|
|
226
225
|
this.toolBeltVc.open({ shouldStayOpen: true });
|
|
@@ -84,9 +84,12 @@ class CalendarEventManager {
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
async silentlySwapEvent(oldId, event) {
|
|
87
|
+
var _a;
|
|
87
88
|
const events = this.getEvents().filter((e) => e.id !== oldId);
|
|
88
89
|
this.allEvents = [...events, event];
|
|
89
|
-
|
|
90
|
+
if (((_a = this.sm.getContext().event) === null || _a === void 0 ? void 0 : _a.id) === oldId) {
|
|
91
|
+
await this.updateEventInContext(event);
|
|
92
|
+
}
|
|
90
93
|
}
|
|
91
94
|
async handleDropEvent(id, updates) {
|
|
92
95
|
const event = Object.assign(Object.assign({}, this.calendarVc.getEvent(id)), updates);
|