@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.
- package/build/esm/skillViewControllers/Root.svc.js +1 -1
- package/build/esm/toolBelt/states/AbstractCalendarEventToolBeltState.d.ts +1 -0
- package/build/esm/toolBelt/states/AbstractCalendarEventToolBeltState.js +6 -1
- package/build/skillViewControllers/Root.svc.js +1 -1
- package/build/toolBelt/states/AbstractCalendarEventToolBeltState.d.ts +1 -0
- package/build/toolBelt/states/AbstractCalendarEventToolBeltState.js +4 -1
- package/package.json +1 -1
|
@@ -538,7 +538,7 @@ class RootSkillViewController extends AbstractSkillViewController {
|
|
|
538
538
|
}
|
|
539
539
|
}
|
|
540
540
|
RootSkillViewController.id = 'root';
|
|
541
|
-
RootSkillViewController.shouldConfirmDrops =
|
|
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.
|
|
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 =
|
|
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.
|
|
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();
|