@mintplayer/web-components 2.3.0 → 2.5.0

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.
@@ -1,58 +0,0 @@
1
- import { SchedulerEvent, ViewType } from '@mintplayer/web-components/scheduler-core';
2
- /**
3
- * Time range carried by selection-change and event-create. `start` is the
4
- * inclusive lower edge, `end` is the exclusive upper edge of the last
5
- * selected slot — matching the natural slot-pair shape produced by
6
- * `selectionRange()` in `views/base-view.ts`.
7
- */
8
- export interface TimeRange {
9
- start: Date;
10
- end: Date;
11
- }
12
- /**
13
- * All custom events the scheduler can emit.
14
- * Using a discriminated union for type safety.
15
- */
16
- export type SchedulerCustomEvent = {
17
- type: 'event-selected';
18
- event: SchedulerEvent;
19
- originalEvent: Event;
20
- } | {
21
- type: 'event-dblclick';
22
- event: SchedulerEvent;
23
- originalEvent: Event;
24
- } | {
25
- type: 'event-create';
26
- range: TimeRange;
27
- view: ViewType;
28
- resourceId?: string;
29
- originalEvent: Event;
30
- } | {
31
- type: 'event-update';
32
- event: SchedulerEvent;
33
- oldEvent: SchedulerEvent;
34
- originalEvent: Event;
35
- } | {
36
- type: 'event-delete';
37
- event: SchedulerEvent;
38
- } | {
39
- type: 'date-click';
40
- date: Date;
41
- originalEvent: Event;
42
- } | {
43
- type: 'view-change';
44
- view: ViewType;
45
- date: Date;
46
- } | {
47
- type: 'selection-change';
48
- selectedEvent: SchedulerEvent | null;
49
- range: TimeRange | null;
50
- view: ViewType;
51
- resourceId?: string;
52
- };
53
- /**
54
- * Type helper to extract the detail type for a specific event.
55
- */
56
- export type EventDetail<T extends SchedulerCustomEvent['type']> = Omit<Extract<SchedulerCustomEvent, {
57
- type: T;
58
- }>, 'type'>;