@progress/kendo-angular-scheduler 16.11.0 → 17.0.0-develop.1

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.
@@ -26,7 +26,8 @@ export declare class SlotRange {
26
26
  unregisterItem(component: MonthViewItemComponent, index: number): void;
27
27
  registerSlot(slot: any): void;
28
28
  unregisterSlot(slot: any): void;
29
- layout(eventHeight: number): void;
29
+ layout(eventHeight: number | 'auto', eventsPerDay: number | 'auto', adaptiveSlotHeight: boolean): void;
30
+ private renderAutoHeightEvents;
30
31
  }
31
32
  /**
32
33
  * @hidden
@@ -48,7 +49,7 @@ export declare class MonthResourceGroup implements ResourceGroup {
48
49
  * @hidden
49
50
  */
50
51
  export declare class MonthSlotService extends BaseSlotService {
51
- layout(eventHeight: number): void;
52
+ layout(eventHeight: number | 'auto', eventsPerDay: number | 'auto', adaptiveSlotHeight: boolean): void;
52
53
  slotByIndex(slotIndex: string): any;
53
54
  forEachSlot(callback: any): void;
54
55
  forEachItem(callback: (e: MonthViewItemComponent) => void): void;
@@ -22,6 +22,8 @@ export declare class MonthViewRendererComponent extends BaseView implements OnCh
22
22
  monthDaySlotTemplate: TemplateRef<any>;
23
23
  highlightOngoingEvents: any;
24
24
  type: 'month' | 'multiWeek';
25
+ eventsPerDay: number | 'auto';
26
+ adaptiveSlotHeight: boolean;
25
27
  /**
26
28
  * The number of weeks to be rendered in the view
27
29
  */
@@ -42,6 +44,7 @@ export declare class MonthViewRendererComponent extends BaseView implements OnCh
42
44
  private schedulerMonthDaySlotTemplate;
43
45
  constructor(viewContext: ViewContextService, viewState: ViewStateService, intl: IntlService, slotService: MonthSlotService, zone: NgZone, element: ElementRef, renderer: Renderer2, pdfService: PDFService, localization: LocalizationService, changeDetector: ChangeDetectorRef, scrollBarWidthService: ScrollbarWidthService);
44
46
  ngOnChanges(changes: any): void;
47
+ ngOnInit(): void;
45
48
  ngAfterViewInit(): void;
46
49
  ngOnDestroy(): void;
47
50
  horizontalColspan(resourceIndex: number): any;
@@ -69,5 +72,5 @@ export declare class MonthViewRendererComponent extends BaseView implements OnCh
69
72
  protected toggleOngoingClass(): void;
70
73
  private createDaySlots;
71
74
  static ɵfac: i0.ɵɵFactoryDeclaration<MonthViewRendererComponent, never>;
72
- static ɵcmp: i0.ɵɵComponentDeclaration<MonthViewRendererComponent, "month-view", never, { "monthDaySlotTemplate": "monthDaySlotTemplate"; "highlightOngoingEvents": "highlightOngoingEvents"; "type": "type"; "numberOfWeeks": "numberOfWeeks"; "newRange": "newRange"; "dateRangeFn": "dateRangeFn"; }, {}, never, never, true, never>;
75
+ static ɵcmp: i0.ɵɵComponentDeclaration<MonthViewRendererComponent, "month-view", never, { "monthDaySlotTemplate": "monthDaySlotTemplate"; "highlightOngoingEvents": "highlightOngoingEvents"; "type": "type"; "eventsPerDay": "eventsPerDay"; "adaptiveSlotHeight": "adaptiveSlotHeight"; "numberOfWeeks": "numberOfWeeks"; "newRange": "newRange"; "dateRangeFn": "dateRangeFn"; }, {}, never, never, true, never>;
73
76
  }
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- import { OnDestroy, ChangeDetectorRef } from '@angular/core';
5
+ import { OnDestroy, ChangeDetectorRef, SimpleChanges, OnChanges } from '@angular/core';
6
6
  import { LocalizationService } from '@progress/kendo-angular-l10n';
7
7
  import { IntlService } from '@progress/kendo-angular-intl';
8
8
  import { DateRange } from '../../types';
@@ -15,16 +15,34 @@ import * as i0 from "@angular/core";
15
15
  /**
16
16
  * The component for rendering the **Month** view.
17
17
  */
18
- export declare class MonthViewComponent extends ConfigurationViewBase implements OnDestroy {
18
+ export declare class MonthViewComponent extends ConfigurationViewBase implements OnDestroy, OnChanges {
19
19
  private intl;
20
20
  /**
21
21
  * @hidden
22
22
  */
23
23
  get title(): string;
24
24
  /**
25
- * The height of the rendered events.
25
+ * The number of events to be rendered per day. Setting this property to 'auto'
26
+ * will display all events in the respective slot.
27
+ * > When set to `'auto'` it will automatically set the `adaptiveSlotHeight` property to `true`.
28
+ * > If set to `0` it will be normalized internally to `1`.
29
+ * @default 2
26
30
  */
27
- eventHeight: number;
31
+ set eventsPerDay(events: number | 'auto');
32
+ get eventsPerDay(): number | 'auto';
33
+ private _eventsPerDay;
34
+ /**
35
+ * The height of the rendered events. Setting this property to 'auto' will
36
+ * set the height of each event automatically based on its content.
37
+ * > When set to `'auto'` it will automatically set the `adaptiveSlotHeight` property to `true`.
38
+ */
39
+ eventHeight: number | 'auto';
40
+ /**
41
+ * Increases the slot group (row) height when containing events up to the number of displayed events
42
+ * and reduces its height if there are less events for that specific slot group (row).
43
+ * @default false
44
+ */
45
+ adaptiveSlotHeight: boolean;
28
46
  /**
29
47
  * The long-date format for displaying the
30
48
  * selected date in the Scheduler toolbar.
@@ -45,8 +63,9 @@ export declare class MonthViewComponent extends ConfigurationViewBase implements
45
63
  * @default 'month'
46
64
  */
47
65
  readonly name: string;
48
- get viewEventHeight(): number;
66
+ get viewEventHeight(): number | 'auto';
49
67
  constructor(localization: LocalizationService, changeDetector: ChangeDetectorRef, viewContext: ViewContextService, viewState: ViewStateService, intl: IntlService);
68
+ ngOnChanges(changes: SimpleChanges): void;
50
69
  /**
51
70
  * @hidden
52
71
  */
@@ -56,5 +75,5 @@ export declare class MonthViewComponent extends ConfigurationViewBase implements
56
75
  */
57
76
  newRange(date: Date, direction?: 1 | -1): Date;
58
77
  static ɵfac: i0.ɵɵFactoryDeclaration<MonthViewComponent, never>;
59
- static ɵcmp: i0.ɵɵComponentDeclaration<MonthViewComponent, "kendo-scheduler-month-view", never, { "eventHeight": "eventHeight"; "selectedDateFormat": "selectedDateFormat"; "selectedShortDateFormat": "selectedShortDateFormat"; }, {}, ["monthDaySlotTemplate"], never, true, never>;
78
+ static ɵcmp: i0.ɵɵComponentDeclaration<MonthViewComponent, "kendo-scheduler-month-view", never, { "eventsPerDay": "eventsPerDay"; "eventHeight": "eventHeight"; "adaptiveSlotHeight": "adaptiveSlotHeight"; "selectedDateFormat": "selectedDateFormat"; "selectedShortDateFormat": "selectedShortDateFormat"; }, {}, ["monthDaySlotTemplate"], never, true, never>;
60
79
  }
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- import { OnDestroy, ChangeDetectorRef } from '@angular/core';
5
+ import { OnDestroy, ChangeDetectorRef, SimpleChanges, OnChanges } from '@angular/core';
6
6
  import { LocalizationService } from '@progress/kendo-angular-l10n';
7
7
  import { IntlService } from '@progress/kendo-angular-intl';
8
8
  import { Day } from '@progress/kendo-date-math';
@@ -15,16 +15,34 @@ import * as i0 from "@angular/core";
15
15
  /**
16
16
  * The component for rendering the **Multi-Week** view.
17
17
  */
18
- export declare class MultiWeekViewComponent extends ConfigurationViewBase implements OnDestroy {
18
+ export declare class MultiWeekViewComponent extends ConfigurationViewBase implements OnDestroy, OnChanges {
19
19
  private intl;
20
20
  /**
21
21
  * @hidden
22
22
  */
23
23
  get title(): string;
24
24
  /**
25
- * The height of the rendered events.
25
+ * The height of the rendered events. Setting this property to `'auto'` will
26
+ * set the height of each event automatically based on its content.
27
+ * > When set to `'auto'` it will automatically set the `adaptiveSlotHeight` property to `true`.
26
28
  */
27
- eventHeight: number;
29
+ eventHeight: number | 'auto';
30
+ /**
31
+ * The number of events to be rendered per day. Setting this property to 'auto'
32
+ * will display all events in the respective slot.
33
+ * > When set to `'auto'` it will automatically set the `adaptiveSlotHeight` property to `true`.
34
+ * > If set to `0` it will be normalized internally to `1`.
35
+ * @default 2
36
+ */
37
+ set eventsPerDay(events: number | 'auto');
38
+ get eventsPerDay(): number | 'auto';
39
+ private _eventsPerDay;
40
+ /**
41
+ * Increases the slot group (row) height when containing events up to the number of displayed events
42
+ * and reduces its height if there are less events for that specific slot group (row).
43
+ * @default false
44
+ */
45
+ adaptiveSlotHeight: boolean;
28
46
  /**
29
47
  * The number of weeks to be rendered.
30
48
  * @default 6
@@ -49,8 +67,9 @@ export declare class MultiWeekViewComponent extends ConfigurationViewBase implem
49
67
  * The invariant name for this view (`multiWeek`).
50
68
  */
51
69
  readonly name: string;
52
- get viewEventHeight(): number;
70
+ get viewEventHeight(): number | 'auto';
53
71
  constructor(localization: LocalizationService, changeDetector: ChangeDetectorRef, viewContext: ViewContextService, viewState: ViewStateService, intl: IntlService);
72
+ ngOnChanges(changes: SimpleChanges): void;
54
73
  /**
55
74
  * @hidden
56
75
  */
@@ -60,5 +79,5 @@ export declare class MultiWeekViewComponent extends ConfigurationViewBase implem
60
79
  */
61
80
  newRange(date: Date, direction?: -1 | 1): Date;
62
81
  static ɵfac: i0.ɵɵFactoryDeclaration<MultiWeekViewComponent, never>;
63
- static ɵcmp: i0.ɵɵComponentDeclaration<MultiWeekViewComponent, "kendo-scheduler-multi-week-view", never, { "eventHeight": "eventHeight"; "numberOfWeeks": "numberOfWeeks"; "selectedDateFormat": "selectedDateFormat"; "selectedShortDateFormat": "selectedShortDateFormat"; }, {}, ["multiWeekDaySlotTemplate"], never, true, never>;
82
+ static ɵcmp: i0.ɵɵComponentDeclaration<MultiWeekViewComponent, "kendo-scheduler-multi-week-view", never, { "eventHeight": "eventHeight"; "eventsPerDay": "eventsPerDay"; "adaptiveSlotHeight": "adaptiveSlotHeight"; "numberOfWeeks": "numberOfWeeks"; "selectedDateFormat": "selectedDateFormat"; "selectedShortDateFormat": "selectedShortDateFormat"; }, {}, ["multiWeekDaySlotTemplate"], never, true, never>;
64
83
  }