Adds I-prefix to all interfaces
This commit is contained in:
parent
80aaab46f2
commit
8ec5f52872
44 changed files with 1731 additions and 1949 deletions
|
|
@ -2,8 +2,8 @@
|
|||
* Type definitions for calendar events and drag operations
|
||||
*/
|
||||
|
||||
import { ColumnBounds } from "../utils/ColumnDetectionUtils";
|
||||
import { CalendarEvent } from "./CalendarTypes";
|
||||
import { IColumnBounds } from "../utils/ColumnDetectionUtils";
|
||||
import { ICalendarEvent } from "./CalendarTypes";
|
||||
|
||||
/**
|
||||
* Drag Event Payload Interfaces
|
||||
|
|
@ -11,89 +11,89 @@ import { CalendarEvent } from "./CalendarTypes";
|
|||
*/
|
||||
|
||||
// Common position interface
|
||||
export interface MousePosition {
|
||||
export interface IMousePosition {
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
|
||||
// Drag start event payload
|
||||
export interface DragStartEventPayload {
|
||||
export interface IDragStartEventPayload {
|
||||
originalElement: HTMLElement;
|
||||
draggedClone: HTMLElement | null;
|
||||
mousePosition: MousePosition;
|
||||
mouseOffset: MousePosition;
|
||||
columnBounds: ColumnBounds | null;
|
||||
mousePosition: IMousePosition;
|
||||
mouseOffset: IMousePosition;
|
||||
columnBounds: IColumnBounds | null;
|
||||
}
|
||||
|
||||
// Drag move event payload
|
||||
export interface DragMoveEventPayload {
|
||||
export interface IDragMoveEventPayload {
|
||||
originalElement: HTMLElement;
|
||||
draggedClone: HTMLElement;
|
||||
mousePosition: MousePosition;
|
||||
mouseOffset: MousePosition;
|
||||
columnBounds: ColumnBounds | null;
|
||||
mousePosition: IMousePosition;
|
||||
mouseOffset: IMousePosition;
|
||||
columnBounds: IColumnBounds | null;
|
||||
snappedY: number;
|
||||
}
|
||||
|
||||
// Drag end event payload
|
||||
export interface DragEndEventPayload {
|
||||
export interface IDragEndEventPayload {
|
||||
originalElement: HTMLElement;
|
||||
draggedClone: HTMLElement | null;
|
||||
mousePosition: MousePosition;
|
||||
sourceColumn: ColumnBounds;
|
||||
mousePosition: IMousePosition;
|
||||
sourceColumn: IColumnBounds;
|
||||
finalPosition: {
|
||||
column: ColumnBounds | null; // Where drag ended
|
||||
column: IColumnBounds | null; // Where drag ended
|
||||
snappedY: number;
|
||||
};
|
||||
target: 'swp-day-column' | 'swp-day-header' | null;
|
||||
}
|
||||
|
||||
// Drag mouse enter header event payload
|
||||
export interface DragMouseEnterHeaderEventPayload {
|
||||
targetColumn: ColumnBounds;
|
||||
mousePosition: MousePosition;
|
||||
export interface IDragMouseEnterHeaderEventPayload {
|
||||
targetColumn: IColumnBounds;
|
||||
mousePosition: IMousePosition;
|
||||
originalElement: HTMLElement | null;
|
||||
draggedClone: HTMLElement;
|
||||
calendarEvent: CalendarEvent;
|
||||
calendarEvent: ICalendarEvent;
|
||||
replaceClone: (newClone: HTMLElement) => void;
|
||||
}
|
||||
|
||||
// Drag mouse leave header event payload
|
||||
export interface DragMouseLeaveHeaderEventPayload {
|
||||
export interface IDragMouseLeaveHeaderEventPayload {
|
||||
targetDate: string | null;
|
||||
mousePosition: MousePosition;
|
||||
mousePosition: IMousePosition;
|
||||
originalElement: HTMLElement| null;
|
||||
draggedClone: HTMLElement| null;
|
||||
}
|
||||
|
||||
// Drag mouse enter column event payload
|
||||
export interface DragMouseEnterColumnEventPayload {
|
||||
targetColumn: ColumnBounds;
|
||||
mousePosition: MousePosition;
|
||||
export interface IDragMouseEnterColumnEventPayload {
|
||||
targetColumn: IColumnBounds;
|
||||
mousePosition: IMousePosition;
|
||||
snappedY: number;
|
||||
originalElement: HTMLElement | null;
|
||||
draggedClone: HTMLElement;
|
||||
calendarEvent: CalendarEvent;
|
||||
calendarEvent: ICalendarEvent;
|
||||
replaceClone: (newClone: HTMLElement) => void;
|
||||
}
|
||||
|
||||
// Drag column change event payload
|
||||
export interface DragColumnChangeEventPayload {
|
||||
export interface IDragColumnChangeEventPayload {
|
||||
originalElement: HTMLElement;
|
||||
draggedClone: HTMLElement;
|
||||
previousColumn: ColumnBounds | null;
|
||||
newColumn: ColumnBounds;
|
||||
mousePosition: MousePosition;
|
||||
previousColumn: IColumnBounds | null;
|
||||
newColumn: IColumnBounds;
|
||||
mousePosition: IMousePosition;
|
||||
}
|
||||
|
||||
// Header ready event payload
|
||||
export interface HeaderReadyEventPayload {
|
||||
headerElements: ColumnBounds[];
|
||||
export interface IHeaderReadyEventPayload {
|
||||
headerElements: IColumnBounds[];
|
||||
|
||||
}
|
||||
|
||||
// Resize end event payload
|
||||
export interface ResizeEndEventPayload {
|
||||
export interface IResizeEndEventPayload {
|
||||
eventId: string;
|
||||
element: HTMLElement;
|
||||
finalHeight: number;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue