@forcecalendar/interface 1.2.0 → 1.4.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.
@@ -0,0 +1,56 @@
1
+ /**
2
+ * DragController - pointer-driven interactions for calendar views.
3
+ *
4
+ * Implements drag-to-move (month and time grids), drag-to-resize, and
5
+ * drag-to-create using Pointer Events only: no HTML5 drag-and-drop (which
6
+ * misbehaves in shadow roots), no dependencies, Locker Service safe.
7
+ *
8
+ * Keyboard users have equivalent paths via the WAI-ARIA grid navigation
9
+ * (arrow keys + Enter) that every view already implements.
10
+ */
11
+ /** Snap a minute offset to the grid. Exported for tests. */
12
+ export declare function snapMinutes(minutes: any, snap?: number): number;
13
+ /** Clamp a start minute so [start, start+duration] stays inside a day. */
14
+ export declare function clampStartMinutes(startMinutes: any, durationMinutes: any): number;
15
+ /**
16
+ * Combine a target day with an original start's time-of-day.
17
+ * Exported for tests.
18
+ */
19
+ export declare function moveDatePreservingTime(targetDay: any, originalStart: any): Date;
20
+ export declare class DragController {
21
+ renderer: any;
22
+ container: any;
23
+ stateManager: any;
24
+ _active: any;
25
+ _docListeners: any[];
26
+ _columnSelector: any;
27
+ _selectionEl: any;
28
+ constructor(renderer: any);
29
+ /** Month view: drag an event chip onto another day cell. */
30
+ enableMonthMove(): void;
31
+ /**
32
+ * Time grids (week/day): drag events vertically/across columns to move,
33
+ * drag the bottom handle to resize, drag empty grid to create.
34
+ */
35
+ enableTimeGrid(columnSelector: any): void;
36
+ /** Track from pointerdown; promote to a drag past the threshold. */
37
+ _arm(e: any, spec: any): void;
38
+ _onPointerMove(e: any): void;
39
+ _onPointerUp(e: any): void;
40
+ _cancel(): void;
41
+ _teardownDocListeners(): void;
42
+ _cleanupVisuals(a: any): void;
43
+ _cellAtPoint(x: any, y: any): any;
44
+ _monthDragMove(e: any): void;
45
+ _monthDrop(): void;
46
+ _columnAtPoint(x: any): any;
47
+ _timeMoveDragMove(e: any): void;
48
+ _timeMoveDrop(): void;
49
+ _resizeDragMove(e: any): void;
50
+ _resizeDrop(): void;
51
+ _createDragMove(e: any): void;
52
+ _createDrop(): void;
53
+ /** Append a resize handle to every timed event (idempotent per render). */
54
+ _injectResizeHandles(): void;
55
+ }
56
+ export default DragController;
@@ -10,6 +10,13 @@ export declare class BaseViewRenderer {
10
10
  _listeners: any[];
11
11
  _scrolled: boolean;
12
12
  _nowIndicatorTimer: number | null;
13
+ _pendingSlotFocus: {
14
+ colIndex: number;
15
+ hour: number;
16
+ } | {
17
+ colIndex: number;
18
+ hour: number;
19
+ } | null | undefined;
13
20
  /**
14
21
  * @param {HTMLElement} container - The DOM element to render into
15
22
  * @param {StateManager} stateManager - The state manager instance
@@ -113,6 +120,28 @@ export declare class BaseViewRenderer {
113
120
  */
114
121
  attachCommonEventHandlers(): void;
115
122
  _selectEventFromElement(eventEl: any): void;
123
+ /**
124
+ * WAI-ARIA semantics and keyboard navigation for time grids (week/day
125
+ * views). The DOM is column-major (a column per day, an hour line per
126
+ * slot), so each day column is exposed as a row of 24 hour gridcells.
127
+ * Arrow keys navigate visually: Up/Down moves hours, Left/Right moves
128
+ * days, Home/End jumps to the day's bounds, PageUp/PageDown navigates
129
+ * periods, Enter/Space selects the slot's date and time.
130
+ * @param {string} columnSelector - Selector for the day columns
131
+ * @param {string} gridLabel - Accessible label for the grid
132
+ */
133
+ _enhanceTimeGridAccessibility(columnSelector: string, gridLabel: string): void;
134
+ /**
135
+ * Get the hour slot at a column/hour position
136
+ * @private
137
+ */
138
+ private _slotAt;
139
+ /**
140
+ * Keep exactly one hour slot tabbable. Defaults to 9:00 AM in the
141
+ * first column (today's column when present).
142
+ * @private
143
+ */
144
+ private _applySlotRovingTabindex;
116
145
  /**
117
146
  * Make rendered events keyboard-reachable and screen-reader labeled.
118
147
  * Runs after every render, across all views.