@daypilot/daypilot-lite-javascript 3.33.1 → 3.34.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.
@@ -558,11 +558,16 @@ export module DayPilot {
558
558
  selectionStart?: DayPilot.Date;
559
559
  selectMode?: "Day" | "Week" | "Month" | "None";
560
560
  showMonths?: number;
561
+ showToday?: boolean;
561
562
  showWeekNumbers?: boolean;
562
563
  skipMonths?: number;
563
564
  startDate?: DayPilot.Date | string;
564
565
  theme?: string;
565
566
  titleHeight?: number;
567
+ todayHeight?: number;
568
+ todayHtml?: string;
569
+ todayPosition?: "Top" | "Bottom";
570
+ todayText?: string;
566
571
  weekStarts?: "Auto" | number;
567
572
  weekNumberAlgorithm?: "Auto" | "US" | "ISO8601";
568
573
  timeRangeSelectedHandling?: "Bind" | "None";
@@ -571,6 +576,7 @@ export module DayPilot {
571
576
  onBeforeCellRender?: EventHandler<NavigatorBeforeCellRenderArgs>;
572
577
  onTimeRangeSelect?: EventHandler<NavigatorTimeRangeSelectArgs>;
573
578
  onTimeRangeSelected?: EventHandler<NavigatorTimeRangeSelectedArgs>;
579
+ onTodayClick?: EventHandler<NavigatorTodayClickArgs>;
574
580
  onVisibleRangeChange?: EventHandler<NavigatorVisibleRangeChangeArgs>;
575
581
  onVisibleRangeChanged?: EventHandler<NavigatorVisibleRangeChangedArgs>;
576
582
  }
@@ -638,6 +644,10 @@ export module DayPilot {
638
644
  readonly mode: "Day" | "Week" | "Month" | "None" | "FreeHand";
639
645
  }
640
646
 
647
+ export interface NavigatorTodayClickArgs {
648
+ preventDefault(): void;
649
+ }
650
+
641
651
  interface NavigatorVisibleRangeChangeArgs {
642
652
  readonly start: DayPilot.Date;
643
653
  readonly end: DayPilot.Date;
@@ -913,38 +923,23 @@ export module DayPilot {
913
923
  static contrasting(color: string, light?: string, dark?: string): string;
914
924
  }
915
925
 
916
- export class Http {
917
- static get(url: string, options?: HttpGetOptions): Promise<HttpPromiseArgs>;
918
- static post(url: string, data?: object | string, options?: HttpPostOptions): Promise<HttpPromiseArgs>;
919
- static put(url: string, data?: object | string, options?: HttpPutOptions): Promise<HttpPromiseArgs>;
920
- static delete(url: string, options?: HttpDeleteOptions): Promise<HttpPromiseArgs>;
921
- }
922
-
923
- export interface HttpDeleteOptions {
924
- headers?: HttpHeaders;
925
- }
926
-
927
- export interface HttpGetOptions {
928
- headers?: HttpHeaders;
926
+ class Http {
927
+ static get<T = any>(url: string, params?: Http.RequestParams): Promise<Http.Result<T>>;
928
+ static post<T = any, B = any>(url: string, data: B, params?: Http.RequestParams): Promise<Http.Result<T>>;
929
+ static put<T = any, B = any>(url: string, data: B, params?: Http.RequestParams): Promise<Http.Result<T>>;
930
+ static patch<T = any, B = any>(url: string, data: B, params?: Http.RequestParams): Promise<Http.Result<T>>;
931
+ static delete<T = any>(url: string, params?: Http.RequestParams): Promise<Http.Result<T>>;
929
932
  }
930
933
 
931
- export interface HttpPostOptions {
932
- headers?: HttpHeaders;
933
- contentType?: string;
934
- }
935
-
936
- export interface HttpPutOptions {
937
- headers?: HttpHeaders;
938
- contentType?: string;
939
- }
940
-
941
- export interface HttpPromiseArgs {
942
- readonly data: any;
943
- readonly request: XMLHttpRequest;
944
- }
945
-
946
- export interface HttpHeaders {
947
- [header: string]: string;
934
+ namespace Http {
935
+ interface RequestParams {
936
+ contentType?: string;
937
+ headers?: Record<string, string>;
938
+ }
939
+ interface Result<T = any> {
940
+ request: XMLHttpRequest;
941
+ data?: T;
942
+ }
948
943
  }
949
944
 
950
945
  export class Duration {