Some ignored filles was missing
This commit is contained in:
parent
7db22245e2
commit
fd5ab6bc0d
268 changed files with 31970 additions and 4 deletions
56
wwwroot/js/types/CalendarTypes.d.ts
vendored
Normal file
56
wwwroot/js/types/CalendarTypes.d.ts
vendored
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
export type ViewPeriod = 'day' | 'week' | 'month';
|
||||
export type CalendarView = ViewPeriod;
|
||||
export type SyncStatus = 'synced' | 'pending' | 'error';
|
||||
export interface IRenderContext {
|
||||
container: HTMLElement;
|
||||
startDate: Date;
|
||||
endDate: Date;
|
||||
}
|
||||
export interface ICalendarEvent {
|
||||
id: string;
|
||||
title: string;
|
||||
description?: string;
|
||||
start: Date;
|
||||
end: Date;
|
||||
type: string;
|
||||
allDay: boolean;
|
||||
syncStatus: SyncStatus;
|
||||
recurringId?: string;
|
||||
metadata?: Record<string, any>;
|
||||
}
|
||||
export interface ICalendarConfig {
|
||||
scrollbarWidth: number;
|
||||
scrollbarColor: string;
|
||||
scrollbarTrackColor: string;
|
||||
scrollbarHoverColor: string;
|
||||
scrollbarBorderRadius: number;
|
||||
allowDrag: boolean;
|
||||
allowResize: boolean;
|
||||
allowCreate: boolean;
|
||||
apiEndpoint: string;
|
||||
dateFormat: string;
|
||||
timeFormat: string;
|
||||
enableSearch: boolean;
|
||||
enableTouch: boolean;
|
||||
defaultEventDuration: number;
|
||||
minEventDuration: number;
|
||||
maxEventDuration: number;
|
||||
}
|
||||
export interface IEventLogEntry {
|
||||
type: string;
|
||||
detail: unknown;
|
||||
timestamp: number;
|
||||
}
|
||||
export interface IListenerEntry {
|
||||
eventType: string;
|
||||
handler: EventListener;
|
||||
options?: AddEventListenerOptions;
|
||||
}
|
||||
export interface IEventBus {
|
||||
on(eventType: string, handler: EventListener, options?: AddEventListenerOptions): () => void;
|
||||
once(eventType: string, handler: EventListener): () => void;
|
||||
off(eventType: string, handler: EventListener): void;
|
||||
emit(eventType: string, detail?: unknown): boolean;
|
||||
getEventLog(eventType?: string): IEventLogEntry[];
|
||||
setDebug(enabled: boolean): void;
|
||||
}
|
||||
3
wwwroot/js/types/CalendarTypes.js
Normal file
3
wwwroot/js/types/CalendarTypes.js
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
// Calendar type definitions
|
||||
export {};
|
||||
//# sourceMappingURL=CalendarTypes.js.map
|
||||
1
wwwroot/js/types/CalendarTypes.js.map
Normal file
1
wwwroot/js/types/CalendarTypes.js.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"CalendarTypes.js","sourceRoot":"","sources":["../../../src/types/CalendarTypes.ts"],"names":[],"mappings":"AAAA,4BAA4B"}
|
||||
17
wwwroot/js/types/ColumnDataSource.d.ts
vendored
Normal file
17
wwwroot/js/types/ColumnDataSource.d.ts
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* IColumnDataSource - Defines the contract for providing column data
|
||||
*
|
||||
* This interface abstracts away whether columns represent dates or resources,
|
||||
* allowing the calendar to switch between date-based and resource-based views.
|
||||
*/
|
||||
export interface IColumnDataSource {
|
||||
/**
|
||||
* Get the list of column identifiers to render
|
||||
* @returns Array of identifiers (dates or resource IDs)
|
||||
*/
|
||||
getColumns(): Date[];
|
||||
/**
|
||||
* Get the type of columns this datasource provides
|
||||
*/
|
||||
getType(): 'date' | 'resource';
|
||||
}
|
||||
2
wwwroot/js/types/ColumnDataSource.js
Normal file
2
wwwroot/js/types/ColumnDataSource.js
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
export {};
|
||||
//# sourceMappingURL=ColumnDataSource.js.map
|
||||
1
wwwroot/js/types/ColumnDataSource.js.map
Normal file
1
wwwroot/js/types/ColumnDataSource.js.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"ColumnDataSource.js","sourceRoot":"","sources":["../../../src/types/ColumnDataSource.ts"],"names":[],"mappings":""}
|
||||
41
wwwroot/js/types/DragDropTypes.d.ts
vendored
Normal file
41
wwwroot/js/types/DragDropTypes.d.ts
vendored
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
/**
|
||||
* Type definitions for drag and drop functionality
|
||||
*/
|
||||
export interface IMousePosition {
|
||||
x: number;
|
||||
y: number;
|
||||
clientX?: number;
|
||||
clientY?: number;
|
||||
}
|
||||
export interface IDragOffset {
|
||||
x: number;
|
||||
y: number;
|
||||
offsetX?: number;
|
||||
offsetY?: number;
|
||||
}
|
||||
export interface IDragState {
|
||||
isDragging: boolean;
|
||||
draggedElement: HTMLElement | null;
|
||||
draggedClone: HTMLElement | null;
|
||||
eventId: string | null;
|
||||
startColumn: string | null;
|
||||
currentColumn: string | null;
|
||||
mouseOffset: IDragOffset;
|
||||
}
|
||||
export interface IDragEndPosition {
|
||||
column: string;
|
||||
y: number;
|
||||
snappedY: number;
|
||||
time?: Date;
|
||||
}
|
||||
export interface IStackLinkData {
|
||||
prev?: string;
|
||||
next?: string;
|
||||
isFirst?: boolean;
|
||||
isLast?: boolean;
|
||||
}
|
||||
export interface IDragEventHandlers {
|
||||
handleDragStart?(originalElement: HTMLElement, eventId: string, mouseOffset: IDragOffset, column: string): void;
|
||||
handleDragMove?(eventId: string, snappedY: number, column: string, mouseOffset: IDragOffset): void;
|
||||
handleDragEnd?(eventId: string, originalElement: HTMLElement, draggedClone: HTMLElement, finalColumn: string, finalY: number): void;
|
||||
}
|
||||
5
wwwroot/js/types/DragDropTypes.js
Normal file
5
wwwroot/js/types/DragDropTypes.js
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
/**
|
||||
* Type definitions for drag and drop functionality
|
||||
*/
|
||||
export {};
|
||||
//# sourceMappingURL=DragDropTypes.js.map
|
||||
1
wwwroot/js/types/DragDropTypes.js.map
Normal file
1
wwwroot/js/types/DragDropTypes.js.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"DragDropTypes.js","sourceRoot":"","sources":["../../../src/types/DragDropTypes.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
||||
133
wwwroot/js/types/EventPayloadMap.d.ts
vendored
Normal file
133
wwwroot/js/types/EventPayloadMap.d.ts
vendored
Normal file
|
|
@ -0,0 +1,133 @@
|
|||
import { CalendarEvent, CalendarView } from './CalendarTypes';
|
||||
import { DragStartEventPayload, DragMoveEventPayload, DragEndEventPayload, DragMouseEnterHeaderEventPayload, DragMouseLeaveHeaderEventPayload, HeaderReadyEventPayload } from './EventTypes';
|
||||
import { CoreEvents } from '../constants/CoreEvents';
|
||||
/**
|
||||
* Complete type mapping for all calendar events
|
||||
* This enables type-safe event emission and handling
|
||||
*/
|
||||
export interface CalendarEventPayloadMap {
|
||||
[CoreEvents.INITIALIZED]: {
|
||||
initialized: boolean;
|
||||
timestamp: number;
|
||||
};
|
||||
[CoreEvents.READY]: undefined;
|
||||
[CoreEvents.DESTROYED]: undefined;
|
||||
[CoreEvents.VIEW_CHANGED]: {
|
||||
view: CalendarView;
|
||||
previousView?: CalendarView;
|
||||
};
|
||||
[CoreEvents.VIEW_RENDERED]: {
|
||||
view: CalendarView;
|
||||
};
|
||||
[CoreEvents.WORKWEEK_CHANGED]: {
|
||||
settings: unknown;
|
||||
};
|
||||
[CoreEvents.DATE_CHANGED]: {
|
||||
date: Date;
|
||||
view?: CalendarView;
|
||||
};
|
||||
[CoreEvents.NAVIGATION_COMPLETED]: {
|
||||
direction: 'previous' | 'next' | 'today';
|
||||
};
|
||||
[CoreEvents.PERIOD_INFO_UPDATE]: {
|
||||
label: string;
|
||||
startDate: Date;
|
||||
endDate: Date;
|
||||
};
|
||||
[CoreEvents.NAVIGATE_TO_EVENT]: {
|
||||
eventId: string;
|
||||
};
|
||||
[CoreEvents.DATA_LOADING]: undefined;
|
||||
[CoreEvents.DATA_LOADED]: {
|
||||
events: CalendarEvent[];
|
||||
count: number;
|
||||
};
|
||||
[CoreEvents.DATA_ERROR]: {
|
||||
error: Error;
|
||||
};
|
||||
[CoreEvents.EVENTS_FILTERED]: {
|
||||
filteredEvents: CalendarEvent[];
|
||||
};
|
||||
[CoreEvents.GRID_RENDERED]: {
|
||||
container: HTMLElement;
|
||||
currentDate: Date;
|
||||
startDate: Date;
|
||||
endDate: Date;
|
||||
columnCount: number;
|
||||
};
|
||||
[CoreEvents.GRID_CLICKED]: {
|
||||
column: string;
|
||||
row: number;
|
||||
};
|
||||
[CoreEvents.CELL_SELECTED]: {
|
||||
cell: HTMLElement;
|
||||
};
|
||||
[CoreEvents.EVENT_CREATED]: {
|
||||
event: CalendarEvent;
|
||||
};
|
||||
[CoreEvents.EVENT_UPDATED]: {
|
||||
event: CalendarEvent;
|
||||
previousData?: Partial<CalendarEvent>;
|
||||
};
|
||||
[CoreEvents.EVENT_DELETED]: {
|
||||
eventId: string;
|
||||
};
|
||||
[CoreEvents.EVENT_SELECTED]: {
|
||||
eventId: string;
|
||||
event?: CalendarEvent;
|
||||
};
|
||||
[CoreEvents.ERROR]: {
|
||||
error: Error;
|
||||
context?: string;
|
||||
};
|
||||
[CoreEvents.REFRESH_REQUESTED]: {
|
||||
view?: CalendarView;
|
||||
date?: Date;
|
||||
};
|
||||
[CoreEvents.FILTER_CHANGED]: {
|
||||
activeFilters: string[];
|
||||
visibleEvents: CalendarEvent[];
|
||||
};
|
||||
[CoreEvents.EVENTS_RENDERED]: {
|
||||
eventCount: number;
|
||||
};
|
||||
'drag:start': DragStartEventPayload;
|
||||
'drag:move': DragMoveEventPayload;
|
||||
'drag:end': DragEndEventPayload;
|
||||
'drag:mouseenter-header': DragMouseEnterHeaderEventPayload;
|
||||
'drag:mouseleave-header': DragMouseLeaveHeaderEventPayload;
|
||||
'drag:cancelled': {
|
||||
reason: string;
|
||||
};
|
||||
'header:ready': HeaderReadyEventPayload;
|
||||
'header:height-changed': {
|
||||
height: number;
|
||||
rowCount: number;
|
||||
};
|
||||
'allday:checkHeight': undefined;
|
||||
'allday:convert-to-allday': {
|
||||
eventId: string;
|
||||
element: HTMLElement;
|
||||
};
|
||||
'allday:convert-from-allday': {
|
||||
eventId: string;
|
||||
element: HTMLElement;
|
||||
};
|
||||
'scroll:sync': {
|
||||
scrollTop: number;
|
||||
source: string;
|
||||
};
|
||||
'scroll:to-hour': {
|
||||
hour: number;
|
||||
};
|
||||
'filter:updated': {
|
||||
activeFilters: string[];
|
||||
visibleEvents: CalendarEvent[];
|
||||
};
|
||||
'filter:search': {
|
||||
query: string;
|
||||
results: CalendarEvent[];
|
||||
};
|
||||
}
|
||||
export type EventPayload<T extends keyof CalendarEventPayloadMap> = CalendarEventPayloadMap[T];
|
||||
export declare function hasPayload<T extends keyof CalendarEventPayloadMap>(eventType: T, payload: unknown): payload is CalendarEventPayloadMap[T];
|
||||
6
wwwroot/js/types/EventPayloadMap.js
Normal file
6
wwwroot/js/types/EventPayloadMap.js
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
import { CoreEvents } from '../constants/CoreEvents';
|
||||
// Type guard to check if an event has a payload
|
||||
export function hasPayload(eventType, payload) {
|
||||
return payload !== undefined;
|
||||
}
|
||||
//# sourceMappingURL=EventPayloadMap.js.map
|
||||
1
wwwroot/js/types/EventPayloadMap.js.map
Normal file
1
wwwroot/js/types/EventPayloadMap.js.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"EventPayloadMap.js","sourceRoot":"","sources":["../../../src/types/EventPayloadMap.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAiKrD,gDAAgD;AAChD,MAAM,UAAU,UAAU,CACxB,SAAY,EACZ,OAAgB;IAEhB,OAAO,OAAO,KAAK,SAAS,CAAC;AAC/B,CAAC"}
|
||||
81
wwwroot/js/types/EventTypes.d.ts
vendored
Normal file
81
wwwroot/js/types/EventTypes.d.ts
vendored
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
/**
|
||||
* Type definitions for calendar events and drag operations
|
||||
*/
|
||||
import { IColumnBounds } from "../utils/ColumnDetectionUtils";
|
||||
import { ICalendarEvent } from "./CalendarTypes";
|
||||
/**
|
||||
* Drag Event Payload Interfaces
|
||||
* Type-safe interfaces for drag and drop events
|
||||
*/
|
||||
export interface IMousePosition {
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
export interface IDragStartEventPayload {
|
||||
originalElement: HTMLElement;
|
||||
draggedClone: HTMLElement | null;
|
||||
mousePosition: IMousePosition;
|
||||
mouseOffset: IMousePosition;
|
||||
columnBounds: IColumnBounds | null;
|
||||
}
|
||||
export interface IDragMoveEventPayload {
|
||||
originalElement: HTMLElement;
|
||||
draggedClone: HTMLElement;
|
||||
mousePosition: IMousePosition;
|
||||
mouseOffset: IMousePosition;
|
||||
columnBounds: IColumnBounds | null;
|
||||
snappedY: number;
|
||||
}
|
||||
export interface IDragEndEventPayload {
|
||||
originalElement: HTMLElement;
|
||||
draggedClone: HTMLElement | null;
|
||||
mousePosition: IMousePosition;
|
||||
originalSourceColumn: IColumnBounds;
|
||||
finalPosition: {
|
||||
column: IColumnBounds | null;
|
||||
snappedY: number;
|
||||
};
|
||||
target: 'swp-day-column' | 'swp-day-header' | null;
|
||||
}
|
||||
export interface IDragMouseEnterHeaderEventPayload {
|
||||
targetColumn: IColumnBounds;
|
||||
mousePosition: IMousePosition;
|
||||
originalElement: HTMLElement | null;
|
||||
draggedClone: HTMLElement;
|
||||
calendarEvent: ICalendarEvent;
|
||||
replaceClone: (newClone: HTMLElement) => void;
|
||||
}
|
||||
export interface IDragMouseLeaveHeaderEventPayload {
|
||||
targetDate: string | null;
|
||||
mousePosition: IMousePosition;
|
||||
originalElement: HTMLElement | null;
|
||||
draggedClone: HTMLElement | null;
|
||||
}
|
||||
export interface IDragMouseEnterColumnEventPayload {
|
||||
targetColumn: IColumnBounds;
|
||||
mousePosition: IMousePosition;
|
||||
snappedY: number;
|
||||
originalElement: HTMLElement | null;
|
||||
draggedClone: HTMLElement;
|
||||
calendarEvent: ICalendarEvent;
|
||||
replaceClone: (newClone: HTMLElement) => void;
|
||||
}
|
||||
export interface IDragColumnChangeEventPayload {
|
||||
originalElement: HTMLElement;
|
||||
draggedClone: HTMLElement;
|
||||
previousColumn: IColumnBounds | null;
|
||||
newColumn: IColumnBounds;
|
||||
mousePosition: IMousePosition;
|
||||
}
|
||||
export interface IHeaderReadyEventPayload {
|
||||
headerElements: IColumnBounds[];
|
||||
}
|
||||
export interface IResizeEndEventPayload {
|
||||
eventId: string;
|
||||
element: HTMLElement;
|
||||
finalHeight: number;
|
||||
}
|
||||
export interface INavButtonClickedEventPayload {
|
||||
direction: 'next' | 'previous' | 'today';
|
||||
newDate: Date;
|
||||
}
|
||||
5
wwwroot/js/types/EventTypes.js
Normal file
5
wwwroot/js/types/EventTypes.js
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
/**
|
||||
* Type definitions for calendar events and drag operations
|
||||
*/
|
||||
export {};
|
||||
//# sourceMappingURL=EventTypes.js.map
|
||||
1
wwwroot/js/types/EventTypes.js.map
Normal file
1
wwwroot/js/types/EventTypes.js.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"EventTypes.js","sourceRoot":"","sources":["../../../src/types/EventTypes.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
||||
59
wwwroot/js/types/ManagerTypes.d.ts
vendored
Normal file
59
wwwroot/js/types/ManagerTypes.d.ts
vendored
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
import { ICalendarEvent, CalendarView } from './CalendarTypes';
|
||||
/**
|
||||
* Complete type definition for all managers returned by ManagerFactory
|
||||
*/
|
||||
export interface ICalendarManagers {
|
||||
eventManager: IEventManager;
|
||||
eventRenderer: IEventRenderingService;
|
||||
gridManager: IGridManager;
|
||||
scrollManager: IScrollManager;
|
||||
navigationManager: unknown;
|
||||
viewManager: IViewManager;
|
||||
calendarManager: ICalendarManager;
|
||||
dragDropManager: unknown;
|
||||
allDayManager: unknown;
|
||||
resizeHandleManager: IResizeHandleManager;
|
||||
edgeScrollManager: unknown;
|
||||
dragHoverManager: unknown;
|
||||
headerManager: unknown;
|
||||
}
|
||||
/**
|
||||
* Base interface for managers with optional initialization and refresh
|
||||
*/
|
||||
interface IManager {
|
||||
initialize?(): Promise<void> | void;
|
||||
refresh?(): void;
|
||||
}
|
||||
export interface IEventManager extends IManager {
|
||||
loadData(): Promise<void>;
|
||||
getEvents(): ICalendarEvent[];
|
||||
getEventsForPeriod(startDate: Date, endDate: Date): ICalendarEvent[];
|
||||
navigateToEvent(eventId: string): boolean;
|
||||
}
|
||||
export interface IEventRenderingService extends IManager {
|
||||
}
|
||||
export interface IGridManager extends IManager {
|
||||
render(): Promise<void>;
|
||||
}
|
||||
export interface IScrollManager extends IManager {
|
||||
scrollTo(scrollTop: number): void;
|
||||
scrollToHour(hour: number): void;
|
||||
}
|
||||
export interface INavigationManager extends IManager {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
export interface IViewManager extends IManager {
|
||||
getCurrentView?(): CalendarView;
|
||||
}
|
||||
export interface ICalendarManager extends IManager {
|
||||
setView(view: CalendarView): void;
|
||||
setCurrentDate(date: Date): void;
|
||||
}
|
||||
export interface IDragDropManager extends IManager {
|
||||
}
|
||||
export interface IAllDayManager extends IManager {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
export interface IResizeHandleManager extends IManager {
|
||||
}
|
||||
export {};
|
||||
2
wwwroot/js/types/ManagerTypes.js
Normal file
2
wwwroot/js/types/ManagerTypes.js
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
export {};
|
||||
//# sourceMappingURL=ManagerTypes.js.map
|
||||
1
wwwroot/js/types/ManagerTypes.js.map
Normal file
1
wwwroot/js/types/ManagerTypes.js.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"ManagerTypes.js","sourceRoot":"","sources":["../../../src/types/ManagerTypes.ts"],"names":[],"mappings":""}
|
||||
Loading…
Add table
Add a link
Reference in a new issue