@sprucelabs/spruce-calendar-components 20.4.10 → 20.5.2
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.
|
@@ -5,7 +5,7 @@ declare type Calendar = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.Calen
|
|
|
5
5
|
declare type Event = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarEvent;
|
|
6
6
|
declare type DraftAddedHandler = (event: Event) => void | Promise<void>;
|
|
7
7
|
declare type EventSwappedHandler = (event: Event) => void | Promise<void>;
|
|
8
|
-
declare type EventDroppedHandler = (updates: Partial<Event>) => void | Promise<void>;
|
|
8
|
+
declare type EventDroppedHandler = (id: string, updates: Partial<Event>) => void | Promise<void>;
|
|
9
9
|
declare type DraftRemovedHandler = () => void | Promise<void>;
|
|
10
10
|
declare type ClickEventHandler = (options: ClickEventOptions) => void | Promise<void>;
|
|
11
11
|
declare type StartDateTimeChangeHandler = (date: number) => void | Promise<void>;
|
|
@@ -93,6 +93,7 @@ export default class CalendarViewController extends CoreCalendarViewController {
|
|
|
93
93
|
onDropEvent?: ((options: DropEventOptions) => boolean | void | Promise<boolean | void>) | null | undefined;
|
|
94
94
|
onDeselectEvent?: ((options: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarEvent) => void | Promise<void>) | null | undefined;
|
|
95
95
|
onSelectEvent?: ((options: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarEvent) => void | Promise<void>) | null | undefined;
|
|
96
|
+
shifts?: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarShift[] | null | undefined;
|
|
96
97
|
};
|
|
97
98
|
}
|
|
98
99
|
export {};
|
|
@@ -59,8 +59,7 @@ export default class CalendarViewController extends CoreCalendarViewController {
|
|
|
59
59
|
update.durationSec / 60;
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
this.
|
|
63
|
-
yield ((_a = this.dropEventHandler) === null || _a === void 0 ? void 0 : _a.call(this, Object.assign({}, updates)));
|
|
62
|
+
yield ((_a = this.dropEventHandler) === null || _a === void 0 ? void 0 : _a.call(this, event.id, Object.assign({}, updates)));
|
|
64
63
|
return true;
|
|
65
64
|
});
|
|
66
65
|
}
|
|
@@ -5,7 +5,7 @@ declare type Calendar = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.Calen
|
|
|
5
5
|
declare type Event = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarEvent;
|
|
6
6
|
declare type DraftAddedHandler = (event: Event) => void | Promise<void>;
|
|
7
7
|
declare type EventSwappedHandler = (event: Event) => void | Promise<void>;
|
|
8
|
-
declare type EventDroppedHandler = (updates: Partial<Event>) => void | Promise<void>;
|
|
8
|
+
declare type EventDroppedHandler = (id: string, updates: Partial<Event>) => void | Promise<void>;
|
|
9
9
|
declare type DraftRemovedHandler = () => void | Promise<void>;
|
|
10
10
|
declare type ClickEventHandler = (options: ClickEventOptions) => void | Promise<void>;
|
|
11
11
|
declare type StartDateTimeChangeHandler = (date: number) => void | Promise<void>;
|
|
@@ -93,6 +93,7 @@ export default class CalendarViewController extends CoreCalendarViewController {
|
|
|
93
93
|
onDropEvent?: ((options: DropEventOptions) => boolean | void | Promise<boolean | void>) | null | undefined;
|
|
94
94
|
onDeselectEvent?: ((options: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarEvent) => void | Promise<void>) | null | undefined;
|
|
95
95
|
onSelectEvent?: ((options: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarEvent) => void | Promise<void>) | null | undefined;
|
|
96
|
+
shifts?: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarShift[] | null | undefined;
|
|
96
97
|
};
|
|
97
98
|
}
|
|
98
99
|
export {};
|
|
@@ -54,8 +54,7 @@ class CalendarViewController extends heartwood_view_controllers_1.CalendarViewCo
|
|
|
54
54
|
update.durationSec / 60;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
this.
|
|
58
|
-
await ((_a = this.dropEventHandler) === null || _a === void 0 ? void 0 : _a.call(this, Object.assign({}, updates)));
|
|
57
|
+
await ((_a = this.dropEventHandler) === null || _a === void 0 ? void 0 : _a.call(this, event.id, Object.assign({}, updates)));
|
|
59
58
|
return true;
|
|
60
59
|
}
|
|
61
60
|
getCalendarVc() {
|