@daypilot/daypilot-lite-react 3.33.1 → 4.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/README.md +6 -4
- package/daypilot-react.min.d.ts +502 -30
- package/daypilot-react.min.js +14 -10
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
# DayPilot Lite for React
|
|
2
2
|
|
|
3
3
|
[DayPilot Lite for JavaScript](https://javascript.daypilot.org/open-source/) is a library of JavaScript/HTML5 scheduling components that can display calendar/scheduler UI:
|
|
4
|
-
* day
|
|
5
|
-
* week
|
|
6
|
-
* month
|
|
4
|
+
* day, week, month
|
|
7
5
|
* resource calendar (resources as columns)
|
|
6
|
+
* horizontal timeline (resources as rows)
|
|
8
7
|
* custom number of days as columns
|
|
9
8
|
|
|
10
9
|
This is the DayPilot Lite for React package.
|
|
@@ -19,13 +18,16 @@ Customize the scheduling components using an online [UI Builder](https://builder
|
|
|
19
18
|
|
|
20
19
|
## Online Demo
|
|
21
20
|
|
|
22
|
-
[](https://javascript.daypilot.org/demo/lite/scheduler/)
|
|
22
|
+
|
|
23
|
+
[](https://javascript.daypilot.org/demo/lite/calendar/)
|
|
23
24
|
|
|
24
25
|
[Online Demo](https://javascript.daypilot.org/demo/lite/)
|
|
25
26
|
|
|
26
27
|
## Features
|
|
27
28
|
|
|
28
29
|
* Calendar/scheduler views: day, week, work week, month, resource calendar
|
|
30
|
+
* Horizontal timeline view
|
|
29
31
|
* Event creation using drag and drop
|
|
30
32
|
* Drag and drop event moving and resizing
|
|
31
33
|
* Integrated delete icon
|
package/daypilot-react.min.d.ts
CHANGED
|
@@ -23,6 +23,476 @@ type GlobalDate = Date;
|
|
|
23
23
|
|
|
24
24
|
export module DayPilot {
|
|
25
25
|
|
|
26
|
+
export class SchedulerPropsAndEvents {
|
|
27
|
+
backendUrl?: string;
|
|
28
|
+
businessBeginsHour?: number;
|
|
29
|
+
businessEndsHour?: number;
|
|
30
|
+
businessWeekends?: boolean;
|
|
31
|
+
cellDuration?: number;
|
|
32
|
+
cellGroupBy?: GroupBy;
|
|
33
|
+
cellSweeping?: boolean;
|
|
34
|
+
cellSweepingCacheSize?: number;
|
|
35
|
+
cellWidth?: number;
|
|
36
|
+
cellsMarkBusiness?: boolean;
|
|
37
|
+
contextMenu?: DayPilot.Menu;
|
|
38
|
+
days?: number;
|
|
39
|
+
durationBarHeight?: number;
|
|
40
|
+
durationBarVisible?: boolean;
|
|
41
|
+
dynamicEventRendering?: "Progressive" | "Disabled";
|
|
42
|
+
dynamicEventRenderingCacheSize?: number;
|
|
43
|
+
dynamicEventRenderingCacheSweeping?: boolean;
|
|
44
|
+
dynamicEventRenderingMargin?: number;
|
|
45
|
+
dynamicEventRenderingMarginX?: number;
|
|
46
|
+
dynamicEventRenderingMarginY?: number;
|
|
47
|
+
// eventBorderRadius?: string | number;eventBubbleShowForMargins?: boolean;
|
|
48
|
+
eventClickHandling?: "Enabled" | "Disabled";
|
|
49
|
+
eventDeleteHandling?: "Update" | "Disabled";
|
|
50
|
+
eventEndSpec?: "DateTime" | "Date";
|
|
51
|
+
eventHeight?: number;
|
|
52
|
+
eventMinWidth?: number;
|
|
53
|
+
eventMoveHandling?: "Update" | "Disabled";
|
|
54
|
+
eventResizeHandling?: "Update" | "Disabled";
|
|
55
|
+
eventResizeMargin?: number;
|
|
56
|
+
eventRightClickHandling?: "Enabled" | "Disabled" | "ContextMenu";
|
|
57
|
+
eventTapAndHoldHandling?: "Move" | "ContextMenu";
|
|
58
|
+
eventTextWrappingEnabled?: boolean;
|
|
59
|
+
eventsLoadMethod?: "GET" | "POST";
|
|
60
|
+
floatingEvents?: boolean;
|
|
61
|
+
floatingTimeHeaders?: boolean;
|
|
62
|
+
headerHeight?: number;
|
|
63
|
+
height?: number;
|
|
64
|
+
heightSpec?: "Auto" | "Max" | "Fixed";
|
|
65
|
+
locale?: string | DayPilot.Locale;
|
|
66
|
+
progressiveRowRendering?: boolean;
|
|
67
|
+
progressiveRowRenderingPreload?: number;
|
|
68
|
+
resources?: ResourceData[];
|
|
69
|
+
// rowClickHandling?: "Enabled" | "Disabled" | "CallBack" | "Edit" | "Select";
|
|
70
|
+
rowHeaderWidth?: number;
|
|
71
|
+
rowsLoadMethod?: "GET" | "POST";
|
|
72
|
+
scale?: "CellDuration" | "Minute" | "Hour" | "Day" | "Week";
|
|
73
|
+
scrollDelayCells?: number;
|
|
74
|
+
scrollDelayEvents?: number;
|
|
75
|
+
scrollDelayFloats?: number;
|
|
76
|
+
scrollDelayRows?: number;
|
|
77
|
+
showToolTip?: boolean;
|
|
78
|
+
snapToGrid?: boolean;
|
|
79
|
+
startDate?: DayPilot.Date | string;
|
|
80
|
+
tapAndHoldTimeout?: number;
|
|
81
|
+
theme?: string;
|
|
82
|
+
timeFormat?: "Auto" | "Clock12Hours" | "Clock24Hours";
|
|
83
|
+
timeHeaderClickHandling?: "Enabled" | "Disabled";
|
|
84
|
+
timeHeaderTextWrappingEnabled?: boolean;
|
|
85
|
+
timeHeaders?: TimeHeaderData[];
|
|
86
|
+
timeRangeClickHandling?: "Enabled" | "Disabled";
|
|
87
|
+
timeRangeSelectedHandling?: "Enabled" | "Disabled";
|
|
88
|
+
useEventBoxes?: "Always" | "Never";
|
|
89
|
+
visible?: boolean;
|
|
90
|
+
weekStarts?: "Auto" | number;
|
|
91
|
+
width?: string;
|
|
92
|
+
xssProtection?: "Enabled" | "Disabled";
|
|
93
|
+
|
|
94
|
+
onAfterUpdate?: EventHandler<SchedulerAfterUpdateArgs>;
|
|
95
|
+
onBeforeEventRender?: EventHandler<SchedulerBeforeEventRenderArgs>;
|
|
96
|
+
onBeforeRowHeaderRender?: EventHandler<SchedulerBeforeRowHeaderRenderArgs>;
|
|
97
|
+
onBeforeTimeHeaderRender?: EventHandler<SchedulerBeforeTimeHeaderRenderArgs>;
|
|
98
|
+
|
|
99
|
+
onEventClick?: EventHandler<SchedulerEventClickArgs>;
|
|
100
|
+
onEventClicked?: EventHandler<SchedulerEventClickedArgs>;
|
|
101
|
+
onEventDelete?: EventHandler<SchedulerEventDeleteArgs>;
|
|
102
|
+
onEventDeleted?: EventHandler<SchedulerEventDeletedArgs>;
|
|
103
|
+
onEventMove?: EventHandler<SchedulerEventMoveArgs>;
|
|
104
|
+
onEventMoved?: EventHandler<SchedulerEventMovedArgs>;
|
|
105
|
+
onEventResize?: EventHandler<SchedulerEventResizeArgs>;
|
|
106
|
+
onEventResized?: EventHandler<SchedulerEventResizedArgs>;
|
|
107
|
+
onEventRightClick?: EventHandler<SchedulerEventRightClickArgs>;
|
|
108
|
+
onEventRightClicked?: EventHandler<SchedulerEventRightClickedArgs>;
|
|
109
|
+
onRowClick?: EventHandler<SchedulerRowClickArgs>;
|
|
110
|
+
onRowClicked?: EventHandler<SchedulerRowClickedArgs>;
|
|
111
|
+
onTimeHeaderClick?: EventHandler<SchedulerTimeHeaderClickArgs>;
|
|
112
|
+
onTimeHeaderClicked?: EventHandler<SchedulerTimeHeaderClickedArgs>;
|
|
113
|
+
onTimeHeaderRightClick?: EventHandler<SchedulerTimeHeaderRightClickArgs>;
|
|
114
|
+
onTimeHeaderRightClicked?: EventHandler<SchedulerTimeHeaderRightClickedArgs>;
|
|
115
|
+
onTimeRangeClick?: EventHandler<SchedulerTimeRangeClickArgs>;
|
|
116
|
+
onTimeRangeClicked?: EventHandler<SchedulerTimeRangeClickedArgs>;
|
|
117
|
+
onTimeRangeSelect?: EventHandler<SchedulerTimeRangeSelectArgs>;
|
|
118
|
+
onTimeRangeSelected?: EventHandler<SchedulerTimeRangeSelectedArgs>;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export class SchedulerConfig extends SchedulerPropsAndEvents {
|
|
122
|
+
events?: EventData[];
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export class Scheduler extends SchedulerPropsAndEvents {
|
|
126
|
+
v: string;
|
|
127
|
+
events: {
|
|
128
|
+
list: EventData[];
|
|
129
|
+
|
|
130
|
+
add(e: DayPilot.Event): void;
|
|
131
|
+
add(data: EventData): void;
|
|
132
|
+
all(): DayPilot.Event[];
|
|
133
|
+
find(id: EventId): DayPilot.Event;
|
|
134
|
+
find(filter: (e: DayPilot.Event) => boolean): DayPilot.Event;
|
|
135
|
+
findAll(filter: (e: DayPilot.Event) => boolean): DayPilot.Event[];
|
|
136
|
+
findAll(example: any): DayPilot.Event[];
|
|
137
|
+
forRange(start?: DayPilot.Date | string, end?: DayPilot.Date | string): DayPilot.Event[];
|
|
138
|
+
load(url: string,
|
|
139
|
+
success: (args: { data: any; preventDefault(): void; }) => void,
|
|
140
|
+
error: (args: { request: XMLHttpRequest, exception: any; }) => void
|
|
141
|
+
): void;
|
|
142
|
+
remove(e: DayPilot.Event): void;
|
|
143
|
+
remove(data: EventData): void;
|
|
144
|
+
remove(id: EventId): void;
|
|
145
|
+
scrollIntoView(e: DayPilot.Event): void;
|
|
146
|
+
update(e: DayPilot.Event): void;
|
|
147
|
+
update(data: EventData): void;
|
|
148
|
+
};
|
|
149
|
+
rows: {
|
|
150
|
+
add(data: ResourceData): void;
|
|
151
|
+
all(): DayPilot.Row[];
|
|
152
|
+
each(f: () => DayPilot.Row): void;
|
|
153
|
+
find(filter: (row: DayPilot.Row) => boolean, startIndex?: number): DayPilot.Row;
|
|
154
|
+
find(id: ResourceId, start?: DayPilot.Date | string): DayPilot.Row;
|
|
155
|
+
load(url: string,
|
|
156
|
+
success: (args: { data: any; preventDefault(): void; }) => void,
|
|
157
|
+
error: (args: { request: XMLHttpRequest, exception: any; }) => void
|
|
158
|
+
): void;
|
|
159
|
+
remove(row: DayPilot.Row): void;
|
|
160
|
+
remove(id: ResourceId): void;
|
|
161
|
+
sort(spec?: string | { field: string, order?: "asc" | "desc" }): void;
|
|
162
|
+
update(row: DayPilot.Row | ResourceData): void;
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
constructor(id: string | HTMLElement, options?: SchedulerConfig);
|
|
166
|
+
|
|
167
|
+
clearSelection(): void;
|
|
168
|
+
|
|
169
|
+
dispose(): void;
|
|
170
|
+
|
|
171
|
+
disposed(): boolean;
|
|
172
|
+
|
|
173
|
+
dragInProgress(): boolean;
|
|
174
|
+
|
|
175
|
+
getDate(pixels: number, precise?: boolean, isEnd?: boolean): DayPilot.Date;
|
|
176
|
+
|
|
177
|
+
getScrollX(): number;
|
|
178
|
+
|
|
179
|
+
getScrollY(): number;
|
|
180
|
+
|
|
181
|
+
getViewport(): SchedulerViewport;
|
|
182
|
+
|
|
183
|
+
hide(): void;
|
|
184
|
+
|
|
185
|
+
init(): void;
|
|
186
|
+
|
|
187
|
+
scrollTo(date: string | DayPilot.Date): void;
|
|
188
|
+
|
|
189
|
+
scrollToResource(id: ResourceId | DayPilot.Row): void;
|
|
190
|
+
|
|
191
|
+
selectTimeRange(start: DayPilot.Date | string, end: DayPilot.Date | string, resource: ResourceId, dontFireEvent?: boolean): void;
|
|
192
|
+
|
|
193
|
+
setHeight(pixels: number): void;
|
|
194
|
+
|
|
195
|
+
setScroll(scrollX: number, scrollY: number): void;
|
|
196
|
+
|
|
197
|
+
setScrollX(scrollX: number): void;
|
|
198
|
+
|
|
199
|
+
setScrollY(scrollY: number): void;
|
|
200
|
+
|
|
201
|
+
show(): void;
|
|
202
|
+
|
|
203
|
+
update(options?: SchedulerConfig): void;
|
|
204
|
+
|
|
205
|
+
visibleStart(): DayPilot.Date;
|
|
206
|
+
|
|
207
|
+
visibleEnd(): DayPilot.Date;
|
|
208
|
+
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export interface SchedulerAfterUpdateArgs {
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export interface SchedulerBeforeEventRenderArgs {
|
|
215
|
+
readonly control: DayPilot.Scheduler;
|
|
216
|
+
readonly data: EventData;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export interface SchedulerBeforeRowHeaderRenderArgs {
|
|
220
|
+
readonly row: RenderRow;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export interface SchedulerBeforeTimeHeaderRenderArgs {
|
|
224
|
+
readonly control: Scheduler;
|
|
225
|
+
readonly header: {
|
|
226
|
+
readonly start: DayPilot.Date;
|
|
227
|
+
readonly end: DayPilot.Date;
|
|
228
|
+
readonly level: number;
|
|
229
|
+
areas: AreaData[];
|
|
230
|
+
text: string;
|
|
231
|
+
html: string;
|
|
232
|
+
toolTip: string;
|
|
233
|
+
backColor: string;
|
|
234
|
+
fontColor: string;
|
|
235
|
+
cssClass: string;
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export interface SchedulerEventClickArgs {
|
|
240
|
+
readonly e: DayPilot.Event;
|
|
241
|
+
readonly div: HTMLElement;
|
|
242
|
+
readonly ctrl: boolean;
|
|
243
|
+
readonly meta: boolean;
|
|
244
|
+
readonly shift: boolean;
|
|
245
|
+
readonly control: DayPilot.Scheduler;
|
|
246
|
+
readonly originalEvent: MouseEvent;
|
|
247
|
+
preventDefault(): void;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export interface SchedulerEventClickedArgs {
|
|
251
|
+
readonly e: DayPilot.Event;
|
|
252
|
+
readonly div: HTMLElement;
|
|
253
|
+
readonly ctrl: boolean;
|
|
254
|
+
readonly meta: boolean;
|
|
255
|
+
readonly shift: boolean;
|
|
256
|
+
readonly control: DayPilot.Scheduler;
|
|
257
|
+
readonly originalEvent: MouseEvent;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
export interface SchedulerEventDeleteArgs {
|
|
261
|
+
readonly e: DayPilot.Event;
|
|
262
|
+
readonly control: DayPilot.Scheduler;
|
|
263
|
+
preventDefault(): void;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
export interface SchedulerEventDeletedArgs {
|
|
267
|
+
readonly e: DayPilot.Event;
|
|
268
|
+
readonly control: DayPilot.Scheduler;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
export interface SchedulerEventMoveArgs {
|
|
272
|
+
async: boolean;
|
|
273
|
+
readonly areaData: any;
|
|
274
|
+
readonly control: DayPilot.Scheduler;
|
|
275
|
+
readonly e: DayPilot.Event;
|
|
276
|
+
newStart: DayPilot.Date;
|
|
277
|
+
newEnd: DayPilot.Date;
|
|
278
|
+
newResource: ResourceId;
|
|
279
|
+
readonly ctrl: boolean;
|
|
280
|
+
readonly shift: boolean;
|
|
281
|
+
readonly meta: boolean;
|
|
282
|
+
|
|
283
|
+
loaded(): void;
|
|
284
|
+
preventDefault(): void;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
export interface SchedulerEventMovedArgs {
|
|
288
|
+
readonly async: boolean;
|
|
289
|
+
readonly areaData: any;
|
|
290
|
+
readonly control: DayPilot.Scheduler;
|
|
291
|
+
readonly e: DayPilot.Event;
|
|
292
|
+
readonly newStart: DayPilot.Date;
|
|
293
|
+
readonly newEnd: DayPilot.Date;
|
|
294
|
+
readonly newResource: ResourceId;
|
|
295
|
+
readonly ctrl: boolean;
|
|
296
|
+
readonly shift: boolean;
|
|
297
|
+
readonly meta: boolean;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
export interface SchedulerEventResizeArgs {
|
|
301
|
+
readonly areaData: any;
|
|
302
|
+
async: boolean;
|
|
303
|
+
readonly control: DayPilot.Scheduler;
|
|
304
|
+
readonly e: DayPilot.Event;
|
|
305
|
+
newStart: DayPilot.Date;
|
|
306
|
+
newEnd: DayPilot.Date;
|
|
307
|
+
readonly what: "start" | "end"; // TODO check
|
|
308
|
+
|
|
309
|
+
loaded(): void;
|
|
310
|
+
preventDefault(): void;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
export interface SchedulerEventResizedArgs {
|
|
314
|
+
readonly areaData: any;
|
|
315
|
+
readonly async: boolean;
|
|
316
|
+
readonly control: DayPilot.Scheduler;
|
|
317
|
+
readonly e: DayPilot.Event;
|
|
318
|
+
readonly newStart: DayPilot.Date;
|
|
319
|
+
readonly newEnd: DayPilot.Date;
|
|
320
|
+
readonly what: "start" | "end";
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
export interface SchedulerEventRightClickArgs {
|
|
324
|
+
readonly e: DayPilot.Event;
|
|
325
|
+
readonly div: HTMLElement;
|
|
326
|
+
readonly originalEvent: MouseEvent;
|
|
327
|
+
|
|
328
|
+
preventDefault(): void;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
export interface SchedulerEventRightClickedArgs {
|
|
332
|
+
readonly e: DayPilot.Event;
|
|
333
|
+
readonly div: HTMLElement;
|
|
334
|
+
readonly originalEvent: MouseEvent;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
export interface SchedulerRowClickArgs {
|
|
338
|
+
readonly row: DayPilot.Row;
|
|
339
|
+
readonly ctrl: boolean;
|
|
340
|
+
readonly shift: boolean;
|
|
341
|
+
readonly meta: boolean;
|
|
342
|
+
readonly originalEvent: MouseEvent;
|
|
343
|
+
preventDefault(): void;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
export interface SchedulerRowClickedArgs {
|
|
347
|
+
readonly row: DayPilot.Row;
|
|
348
|
+
readonly ctrl: boolean;
|
|
349
|
+
readonly shift: boolean;
|
|
350
|
+
readonly meta: boolean;
|
|
351
|
+
readonly originalEvent: MouseEvent;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
export interface SchedulerTimeHeaderClickArgs {
|
|
355
|
+
readonly control: Scheduler;
|
|
356
|
+
readonly header: {
|
|
357
|
+
readonly start: DayPilot.Date;
|
|
358
|
+
readonly end: DayPilot.Date;
|
|
359
|
+
readonly level: number;
|
|
360
|
+
};
|
|
361
|
+
readonly originalEvent: MouseEvent;
|
|
362
|
+
readonly ctrl: boolean;
|
|
363
|
+
readonly shift: boolean;
|
|
364
|
+
readonly meta: boolean;
|
|
365
|
+
|
|
366
|
+
preventDefault(): void;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
export interface SchedulerTimeHeaderClickedArgs {
|
|
370
|
+
readonly control: Scheduler;
|
|
371
|
+
readonly header: {
|
|
372
|
+
readonly start: DayPilot.Date;
|
|
373
|
+
readonly end: DayPilot.Date;
|
|
374
|
+
readonly level: number;
|
|
375
|
+
};
|
|
376
|
+
readonly originalEvent: MouseEvent;
|
|
377
|
+
readonly ctrl: boolean;
|
|
378
|
+
readonly shift: boolean;
|
|
379
|
+
readonly meta: boolean;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
export interface SchedulerTimeHeaderRightClickArgs {
|
|
383
|
+
readonly header: {
|
|
384
|
+
readonly start: DayPilot.Date;
|
|
385
|
+
readonly end: DayPilot.Date;
|
|
386
|
+
readonly level: number;
|
|
387
|
+
};
|
|
388
|
+
|
|
389
|
+
preventDefault(): void;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
export interface SchedulerTimeHeaderRightClickedArgs {
|
|
393
|
+
readonly header: {
|
|
394
|
+
readonly start: DayPilot.Date;
|
|
395
|
+
readonly end: DayPilot.Date;
|
|
396
|
+
readonly level: number;
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
export interface SchedulerTimeRangeClickArgs {
|
|
401
|
+
readonly start: DayPilot.Date;
|
|
402
|
+
readonly end: DayPilot.Date;
|
|
403
|
+
readonly resource: ResourceId;
|
|
404
|
+
|
|
405
|
+
preventDefault(): void;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
export interface SchedulerTimeRangeClickedArgs {
|
|
409
|
+
readonly start: DayPilot.Date;
|
|
410
|
+
readonly end: DayPilot.Date;
|
|
411
|
+
readonly resource: ResourceId;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
export interface SchedulerTimeRangeSelectArgs {
|
|
415
|
+
readonly start: DayPilot.Date;
|
|
416
|
+
readonly end: DayPilot.Date;
|
|
417
|
+
readonly resource: ResourceId;
|
|
418
|
+
readonly control: DayPilot.Scheduler;
|
|
419
|
+
|
|
420
|
+
preventDefault(): void;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
export interface SchedulerTimeRangeSelectedArgs {
|
|
424
|
+
readonly start: DayPilot.Date;
|
|
425
|
+
readonly end: DayPilot.Date;
|
|
426
|
+
readonly resource: ResourceId;
|
|
427
|
+
readonly control: DayPilot.Scheduler;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
// TODO check if all values are supported
|
|
431
|
+
export type GroupBy = "Minute" | "Hour" | "Day" | "Week" | "Month" | "Quarter" | "Year" | "Cell" | "None";
|
|
432
|
+
|
|
433
|
+
export interface SchedulerViewport {
|
|
434
|
+
start: DayPilot.Date,
|
|
435
|
+
end: DayPilot.Date,
|
|
436
|
+
resources: ResourceId[]
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
export interface ResourceData {
|
|
440
|
+
id?: ResourceId;
|
|
441
|
+
name?: string;
|
|
442
|
+
start?: DayPilot.Date | string;
|
|
443
|
+
end?: DayPilot.Date | string;
|
|
444
|
+
|
|
445
|
+
areas?: AreaData[];
|
|
446
|
+
ariaLabel?: string;
|
|
447
|
+
backColor?: string;
|
|
448
|
+
fontColor?: string;
|
|
449
|
+
cssClass?: string;
|
|
450
|
+
html?: string;
|
|
451
|
+
tags?: any;
|
|
452
|
+
toolTip?: string;
|
|
453
|
+
|
|
454
|
+
[prop: string]: any;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
export interface TimeHeaderData {
|
|
458
|
+
groupBy: GroupBy;
|
|
459
|
+
format?: string;
|
|
460
|
+
height?: number;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
export class Row {
|
|
464
|
+
events: {
|
|
465
|
+
all(): DayPilot.Event[];
|
|
466
|
+
isEmpty(): boolean;
|
|
467
|
+
forRange(start: string | DayPilot.Date, end: string | DayPilot.Date): DayPilot.Event[];
|
|
468
|
+
totalDuration(): DayPilot.Duration;
|
|
469
|
+
};
|
|
470
|
+
readonly calendar: DayPilot.Scheduler;
|
|
471
|
+
readonly data: any;
|
|
472
|
+
readonly id: ResourceId;
|
|
473
|
+
readonly index: number;
|
|
474
|
+
readonly level: number;
|
|
475
|
+
readonly name: string;
|
|
476
|
+
|
|
477
|
+
addClass(className: string): void;
|
|
478
|
+
|
|
479
|
+
remove(): void;
|
|
480
|
+
|
|
481
|
+
removeClass(className: string): void;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
export class RenderRow extends Row {
|
|
485
|
+
areas: AreaData[];
|
|
486
|
+
backColor: string;
|
|
487
|
+
cssClass: string;
|
|
488
|
+
fontColor: string;
|
|
489
|
+
horizontalAlignment: HorizontalAlignment;
|
|
490
|
+
html: string;
|
|
491
|
+
text: string;
|
|
492
|
+
toolTip: string;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
|
|
26
496
|
export class CalendarPropsAndEvents {
|
|
27
497
|
backendUrl?: string;
|
|
28
498
|
businessBeginsHour?: number;
|
|
@@ -558,11 +1028,16 @@ export module DayPilot {
|
|
|
558
1028
|
selectionStart?: DayPilot.Date;
|
|
559
1029
|
selectMode?: "Day" | "Week" | "Month" | "None";
|
|
560
1030
|
showMonths?: number;
|
|
1031
|
+
showToday?: boolean;
|
|
561
1032
|
showWeekNumbers?: boolean;
|
|
562
1033
|
skipMonths?: number;
|
|
563
1034
|
startDate?: DayPilot.Date | string;
|
|
564
1035
|
theme?: string;
|
|
565
1036
|
titleHeight?: number;
|
|
1037
|
+
todayHeight?: number;
|
|
1038
|
+
todayHtml?: string;
|
|
1039
|
+
todayPosition?: "Top" | "Bottom";
|
|
1040
|
+
todayText?: string;
|
|
566
1041
|
weekStarts?: "Auto" | number;
|
|
567
1042
|
weekNumberAlgorithm?: "Auto" | "US" | "ISO8601";
|
|
568
1043
|
timeRangeSelectedHandling?: "Bind" | "None";
|
|
@@ -571,6 +1046,7 @@ export module DayPilot {
|
|
|
571
1046
|
onBeforeCellRender?: EventHandler<NavigatorBeforeCellRenderArgs>;
|
|
572
1047
|
onTimeRangeSelect?: EventHandler<NavigatorTimeRangeSelectArgs>;
|
|
573
1048
|
onTimeRangeSelected?: EventHandler<NavigatorTimeRangeSelectedArgs>;
|
|
1049
|
+
onTodayClick?: EventHandler<NavigatorTodayClickArgs>;
|
|
574
1050
|
onVisibleRangeChange?: EventHandler<NavigatorVisibleRangeChangeArgs>;
|
|
575
1051
|
onVisibleRangeChanged?: EventHandler<NavigatorVisibleRangeChangedArgs>;
|
|
576
1052
|
}
|
|
@@ -638,6 +1114,10 @@ export module DayPilot {
|
|
|
638
1114
|
readonly mode: "Day" | "Week" | "Month" | "None" | "FreeHand";
|
|
639
1115
|
}
|
|
640
1116
|
|
|
1117
|
+
export interface NavigatorTodayClickArgs {
|
|
1118
|
+
preventDefault(): void;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
641
1121
|
interface NavigatorVisibleRangeChangeArgs {
|
|
642
1122
|
readonly start: DayPilot.Date;
|
|
643
1123
|
readonly end: DayPilot.Date;
|
|
@@ -913,38 +1393,23 @@ export module DayPilot {
|
|
|
913
1393
|
static contrasting(color: string, light?: string, dark?: string): string;
|
|
914
1394
|
}
|
|
915
1395
|
|
|
916
|
-
|
|
917
|
-
static get(url: string,
|
|
918
|
-
static post(url: string, data
|
|
919
|
-
static put(url: string, data
|
|
920
|
-
static
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
export interface HttpDeleteOptions {
|
|
924
|
-
headers?: HttpHeaders;
|
|
925
|
-
}
|
|
926
|
-
|
|
927
|
-
export interface HttpGetOptions {
|
|
928
|
-
headers?: HttpHeaders;
|
|
929
|
-
}
|
|
930
|
-
|
|
931
|
-
export interface HttpPostOptions {
|
|
932
|
-
headers?: HttpHeaders;
|
|
933
|
-
contentType?: string;
|
|
934
|
-
}
|
|
935
|
-
|
|
936
|
-
export interface HttpPutOptions {
|
|
937
|
-
headers?: HttpHeaders;
|
|
938
|
-
contentType?: string;
|
|
1396
|
+
class Http {
|
|
1397
|
+
static get<T = any>(url: string, params?: Http.RequestParams): Promise<Http.Result<T>>;
|
|
1398
|
+
static post<T = any, B = any>(url: string, data: B, params?: Http.RequestParams): Promise<Http.Result<T>>;
|
|
1399
|
+
static put<T = any, B = any>(url: string, data: B, params?: Http.RequestParams): Promise<Http.Result<T>>;
|
|
1400
|
+
static patch<T = any, B = any>(url: string, data: B, params?: Http.RequestParams): Promise<Http.Result<T>>;
|
|
1401
|
+
static delete<T = any>(url: string, params?: Http.RequestParams): Promise<Http.Result<T>>;
|
|
939
1402
|
}
|
|
940
1403
|
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
1404
|
+
namespace Http {
|
|
1405
|
+
interface RequestParams {
|
|
1406
|
+
contentType?: string;
|
|
1407
|
+
headers?: Record<string, string>;
|
|
1408
|
+
}
|
|
1409
|
+
interface Result<T = any> {
|
|
1410
|
+
request: XMLHttpRequest;
|
|
1411
|
+
data?: T;
|
|
1412
|
+
}
|
|
948
1413
|
}
|
|
949
1414
|
|
|
950
1415
|
export class Duration {
|
|
@@ -1231,6 +1696,10 @@ export module DayPilot {
|
|
|
1231
1696
|
}
|
|
1232
1697
|
import React from 'react';
|
|
1233
1698
|
|
|
1699
|
+
export declare class DayPilotScheduler extends React.Component<SchedulerProps> {
|
|
1700
|
+
control: DayPilot.Scheduler;
|
|
1701
|
+
}
|
|
1702
|
+
|
|
1234
1703
|
export declare class DayPilotCalendar extends React.Component<CalendarProps> {
|
|
1235
1704
|
control: DayPilot.Calendar;
|
|
1236
1705
|
}
|
|
@@ -1243,6 +1712,9 @@ export declare class DayPilotNavigator extends React.Component<NavigatorProps> {
|
|
|
1243
1712
|
control: DayPilot.Navigator;
|
|
1244
1713
|
}
|
|
1245
1714
|
|
|
1715
|
+
export class SchedulerProps extends DayPilot.SchedulerConfig {
|
|
1716
|
+
controlRef?: React.MutableRefObject | ((component: DayPilot.Scheduler) => void);
|
|
1717
|
+
}
|
|
1246
1718
|
|
|
1247
1719
|
export class CalendarProps extends DayPilot.CalendarConfig {
|
|
1248
1720
|
controlRef?: React.MutableRefObject | ((component: DayPilot.Calendar) => void);
|