1 | import { Duration, CssDimValue } from '@fullcalendar/core';
|
2 | import { Splitter, DateSpan, EventDef, DateMarker, DateEnv, PositionCache, DateProfile, DateComponent, ViewProps, ChunkContentCallbackArgs, DateProfileGenerator, DayTableModel, Seg, DateRange, EventStore, EventUiHash, EventInteractionState, Slicer, ScrollRequest, Hit, DayTableCell, EventSegUiInteractionState } from '@fullcalendar/core/internal';
|
3 | import { RefObject, VNode, createElement } from '@fullcalendar/core/preact';
|
4 |
|
5 | declare class AllDaySplitter extends Splitter {
|
6 | getKeyInfo(): {
|
7 | allDay: {};
|
8 | timed: {};
|
9 | };
|
10 | getKeysForDateSpan(dateSpan: DateSpan): string[];
|
11 | getKeysForEventDef(eventDef: EventDef): string[];
|
12 | }
|
13 |
|
14 | interface TimeSlatMeta {
|
15 | date: DateMarker;
|
16 | time: Duration;
|
17 | key: string;
|
18 | isoTimeStr: string;
|
19 | isLabeled: boolean;
|
20 | }
|
21 | declare function buildSlatMetas(slotMinTime: Duration, slotMaxTime: Duration, explicitLabelInterval: Duration | null, slotDuration: Duration, dateEnv: DateEnv): TimeSlatMeta[];
|
22 |
|
23 | declare class TimeColsSlatsCoords {
|
24 | positions: PositionCache;
|
25 | private dateProfile;
|
26 | private slotDuration;
|
27 | constructor(positions: PositionCache, dateProfile: DateProfile, slotDuration: Duration);
|
28 | safeComputeTop(date: DateMarker): number;
|
29 | computeDateTop(when: DateMarker, startOfDayDate?: DateMarker): number;
|
30 | computeTimeTop(duration: Duration): number;
|
31 | }
|
32 |
|
33 | interface TimeColsViewState {
|
34 | slatCoords: TimeColsSlatsCoords | null;
|
35 | }
|
36 | declare abstract class TimeColsView extends DateComponent<ViewProps, TimeColsViewState> {
|
37 | protected allDaySplitter: AllDaySplitter;
|
38 | protected headerElRef: RefObject<HTMLTableCellElement>;
|
39 | private rootElRef;
|
40 | private scrollerElRef;
|
41 | state: {
|
42 | slatCoords: any;
|
43 | };
|
44 | renderSimpleLayout(headerRowContent: VNode | null, allDayContent: ((contentArg: ChunkContentCallbackArgs) => VNode) | null, timeContent: ((contentArg: ChunkContentCallbackArgs) => VNode) | null): createElement.JSX.Element;
|
45 | renderHScrollLayout(headerRowContent: VNode | null, allDayContent: ((contentArg: ChunkContentCallbackArgs) => VNode) | null, timeContent: ((contentArg: ChunkContentCallbackArgs) => VNode) | null, colCnt: number, dayMinWidth: number, slatMetas: TimeSlatMeta[], slatCoords: TimeColsSlatsCoords | null): createElement.JSX.Element;
|
46 | handleScrollTopRequest: (scrollTop: number) => void;
|
47 | getAllDayMaxEventProps(): {
|
48 | dayMaxEvents: number | boolean;
|
49 | dayMaxEventRows: number | false;
|
50 | };
|
51 | renderHeadAxis: (rowKey: 'day' | string, frameHeight?: CssDimValue) => createElement.JSX.Element;
|
52 | renderTableRowAxis: (rowHeight?: number) => createElement.JSX.Element;
|
53 | handleSlatCoords: (slatCoords: TimeColsSlatsCoords) => void;
|
54 | }
|
55 |
|
56 | declare class DayTimeColsView extends TimeColsView {
|
57 | private buildTimeColsModel;
|
58 | private buildSlatMetas;
|
59 | render(): createElement.JSX.Element;
|
60 | }
|
61 | declare function buildTimeColsModel(dateProfile: DateProfile, dateProfileGenerator: DateProfileGenerator): DayTableModel;
|
62 |
|
63 | interface TimeColsSeg extends Seg {
|
64 | col: number;
|
65 | start: DateMarker;
|
66 | end: DateMarker;
|
67 | }
|
68 |
|
69 | interface DayTimeColsProps {
|
70 | dateProfile: DateProfile;
|
71 | dayTableModel: DayTableModel;
|
72 | axis: boolean;
|
73 | slotDuration: Duration;
|
74 | slatMetas: TimeSlatMeta[];
|
75 | businessHours: EventStore;
|
76 | eventStore: EventStore;
|
77 | eventUiBases: EventUiHash;
|
78 | dateSelection: DateSpan | null;
|
79 | eventSelection: string;
|
80 | eventDrag: EventInteractionState | null;
|
81 | eventResize: EventInteractionState | null;
|
82 | tableColGroupNode: VNode;
|
83 | tableMinWidth: CssDimValue;
|
84 | clientWidth: number | null;
|
85 | clientHeight: number | null;
|
86 | expandRows: boolean;
|
87 | onScrollTopRequest?: (scrollTop: number) => void;
|
88 | forPrint: boolean;
|
89 | onSlatCoords?: (slatCoords: TimeColsSlatsCoords) => void;
|
90 | }
|
91 | declare class DayTimeCols extends DateComponent<DayTimeColsProps> {
|
92 | private buildDayRanges;
|
93 | private slicer;
|
94 | private timeColsRef;
|
95 | render(): createElement.JSX.Element;
|
96 | }
|
97 | declare function buildDayRanges(dayTableModel: DayTableModel, dateProfile: DateProfile, dateEnv: DateEnv): DateRange[];
|
98 |
|
99 | declare class DayTimeColsSlicer extends Slicer<TimeColsSeg, [DateRange[]]> {
|
100 | sliceRange(range: DateRange, dayRanges: DateRange[]): TimeColsSeg[];
|
101 | }
|
102 |
|
103 | interface TimeColsProps {
|
104 | cells: DayTableCell[];
|
105 | dateProfile: DateProfile;
|
106 | slotDuration: Duration;
|
107 | nowDate: DateMarker;
|
108 | todayRange: DateRange;
|
109 | businessHourSegs: TimeColsSeg[];
|
110 | bgEventSegs: TimeColsSeg[];
|
111 | fgEventSegs: TimeColsSeg[];
|
112 | dateSelectionSegs: TimeColsSeg[];
|
113 | eventSelection: string;
|
114 | eventDrag: EventSegUiInteractionState | null;
|
115 | eventResize: EventSegUiInteractionState | null;
|
116 | tableColGroupNode: VNode;
|
117 | tableMinWidth: CssDimValue;
|
118 | clientWidth: number | null;
|
119 | clientHeight: number | null;
|
120 | expandRows: boolean;
|
121 | nowIndicatorSegs: TimeColsSeg[];
|
122 | onScrollTopRequest?: (scrollTop: number) => void;
|
123 | forPrint: boolean;
|
124 | axis: boolean;
|
125 | slatMetas: TimeSlatMeta[];
|
126 | onSlatCoords?: (slatCoords: TimeColsSlatsCoords) => void;
|
127 | isHitComboAllowed?: (hit0: Hit, hit1: Hit) => boolean;
|
128 | }
|
129 | interface TimeColsState {
|
130 | slatCoords: TimeColsSlatsCoords | null;
|
131 | }
|
132 | declare class TimeCols extends DateComponent<TimeColsProps, TimeColsState> {
|
133 | private processSlotOptions;
|
134 | private scrollResponder;
|
135 | private colCoords;
|
136 | state: {
|
137 | slatCoords: any;
|
138 | };
|
139 | render(): createElement.JSX.Element;
|
140 | handleRootEl: (el: HTMLElement | null) => void;
|
141 | componentDidMount(): void;
|
142 | componentDidUpdate(prevProps: TimeColsProps): void;
|
143 | componentWillUnmount(): void;
|
144 | handleScrollRequest: (request: ScrollRequest) => boolean;
|
145 | handleColCoords: (colCoords: PositionCache | null) => void;
|
146 | handleSlatCoords: (slatCoords: TimeColsSlatsCoords | null) => void;
|
147 | queryHit(positionLeft: number, positionTop: number): Hit;
|
148 | }
|
149 |
|
150 | export { DayTimeCols, DayTimeColsSlicer, DayTimeColsView, TimeCols, TimeColsSeg, TimeColsSlatsCoords, TimeColsView, TimeSlatMeta, buildDayRanges, buildSlatMetas, buildTimeColsModel };
|