@mintplayer/scheduler-wc 1.0.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.
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@mintplayer/scheduler-wc",
3
+ "private": false,
4
+ "type": "module",
5
+ "version": "1.0.0",
6
+ "description": "Web Component for the MintPlayer Scheduler",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/MintPlayer/mintplayer-ng-bootstrap",
10
+ "directory": "libs/mp-scheduler-wc"
11
+ },
12
+ "main": "./src/index.js",
13
+ "types": "./src/index.d.ts",
14
+ "dependencies": {
15
+ "tslib": "^2.3.0"
16
+ },
17
+ "peerDependencies": {
18
+ "@mintplayer/scheduler-core": "^0.0.1"
19
+ },
20
+ "author": {
21
+ "name": "Pieterjan De Clippel",
22
+ "url": "https://github.com/MintPlayer",
23
+ "email": "info@mintplayer.com"
24
+ },
25
+ "keywords": [
26
+ "scheduler",
27
+ "calendar",
28
+ "web-component",
29
+ "custom-element",
30
+ "timeline"
31
+ ],
32
+ "module": "./src/index.js"
33
+ }
@@ -0,0 +1,91 @@
1
+ import { ViewType, SchedulerEvent, Resource, ResourceGroup, SchedulerOptions } from '@mintplayer/scheduler-core';
2
+ /**
3
+ * MpScheduler Web Component
4
+ *
5
+ * A fully-featured scheduler/calendar component
6
+ */
7
+ export declare class MpScheduler extends HTMLElement {
8
+ static observedAttributes: string[];
9
+ private shadow;
10
+ private stateManager;
11
+ private currentView;
12
+ private contentContainer;
13
+ private previousView;
14
+ private previousDate;
15
+ private previousSelectedEventId;
16
+ private pendingDrag;
17
+ private readonly DRAG_THRESHOLD;
18
+ private touchHoldTimer;
19
+ private touchStartPosition;
20
+ private isTouchDragMode;
21
+ private touchHoldTarget;
22
+ private readonly TOUCH_HOLD_DURATION;
23
+ private readonly TOUCH_MOVE_THRESHOLD;
24
+ private boundHandleMouseDown;
25
+ private boundHandleMouseMove;
26
+ private boundHandleMouseUp;
27
+ private boundHandleClick;
28
+ private boundHandleDblClick;
29
+ private boundHandleKeyDown;
30
+ private boundHandleTouchStart;
31
+ private boundHandleTouchMove;
32
+ private boundHandleTouchEnd;
33
+ private boundHandleTouchCancel;
34
+ constructor();
35
+ connectedCallback(): void;
36
+ disconnectedCallback(): void;
37
+ attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
38
+ get view(): ViewType;
39
+ set view(value: ViewType);
40
+ get date(): Date;
41
+ set date(value: Date);
42
+ get events(): SchedulerEvent[];
43
+ set events(value: SchedulerEvent[]);
44
+ get resources(): (Resource | ResourceGroup)[];
45
+ set resources(value: (Resource | ResourceGroup)[]);
46
+ get options(): SchedulerOptions;
47
+ set options(value: Partial<SchedulerOptions>);
48
+ get selectedEvent(): SchedulerEvent | null;
49
+ set selectedEvent(value: SchedulerEvent | null);
50
+ get selectedRange(): {
51
+ start: Date;
52
+ end: Date;
53
+ } | null;
54
+ next(): void;
55
+ prev(): void;
56
+ today(): void;
57
+ gotoDate(date: Date): void;
58
+ changeView(view: ViewType): void;
59
+ addEvent(event: SchedulerEvent): void;
60
+ updateEvent(event: SchedulerEvent): void;
61
+ removeEvent(eventId: string): void;
62
+ getEventById(eventId: string): SchedulerEvent | null;
63
+ refetchEvents(): void;
64
+ private render;
65
+ private createHeader;
66
+ private updateTitle;
67
+ private renderView;
68
+ private onStateChange;
69
+ private viewTypeChanged;
70
+ private attachEventListeners;
71
+ private detachEventListeners;
72
+ private handleMouseDown;
73
+ private handleMouseMove;
74
+ private handleMouseUp;
75
+ private handleClick;
76
+ private handleDblClick;
77
+ private handleKeyDown;
78
+ private startDrag;
79
+ private calculatePreview;
80
+ private getSlotAtPosition;
81
+ private getSlotFromElement;
82
+ private handleTouchStart;
83
+ private activateTouchDragMode;
84
+ private handleTouchMove;
85
+ private handleTouchEnd;
86
+ private handleTouchCancel;
87
+ private cancelTouchHold;
88
+ private exitTouchDragMode;
89
+ private triggerHapticFeedback;
90
+ private startDragFromTouch;
91
+ }