@progress/kendo-angular-scheduler 21.4.0-develop.1 → 21.4.0-develop.3
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/esm2022/events/more-events-click.mjs +24 -0
- package/esm2022/events/navigate-event.mjs +1 -1
- package/esm2022/events.mjs +1 -0
- package/esm2022/package-metadata.mjs +2 -2
- package/esm2022/scheduler.component.mjs +12 -2
- package/esm2022/views/agenda/agenda-view-internal.component.mjs +8 -4
- package/esm2022/views/agenda/agenda-view.component.mjs +3 -1
- package/esm2022/views/agenda/tasks.collection.mjs +7 -1
- package/esm2022/views/agenda/utils.mjs +2 -2
- package/esm2022/views/common/configuration-view-base.mjs +22 -2
- package/esm2022/views/common/slot-selectable.directive.mjs +3 -3
- package/esm2022/views/day-time/day-time-slot.service.mjs +1 -0
- package/esm2022/views/day-time/day-time-view.component.mjs +23 -10
- package/esm2022/views/month/month-view-renderer.component.mjs +33 -7
- package/esm2022/views/month/month-view.component.mjs +17 -5
- package/esm2022/views/month/multi-week-view.component.mjs +3 -1
- package/esm2022/views/month/utils.mjs +31 -1
- package/esm2022/views/multi-day/day-view.component.mjs +8 -1
- package/esm2022/views/multi-day/multi-day-view-renderer.component.mjs +18 -8
- package/esm2022/views/multi-day/multi-day-view.component.mjs +16 -2
- package/esm2022/views/multi-day/utils.mjs +7 -1
- package/esm2022/views/multi-day/week-view.component.mjs +3 -1
- package/esm2022/views/multi-day/work-week-view.component.mjs +3 -1
- package/esm2022/views/timeline/timeline-month-view.component.mjs +5 -1
- package/esm2022/views/timeline/timeline-multi-day-view.component.mjs +14 -4
- package/esm2022/views/timeline/timeline-view.component.mjs +8 -1
- package/esm2022/views/timeline/timeline-week-view.component.mjs +3 -1
- package/esm2022/views/timeline/utils.mjs +7 -1
- package/esm2022/views/utils.mjs +25 -3
- package/esm2022/views/year/year-view.component.mjs +7 -0
- package/events/more-events-click.d.ts +23 -0
- package/events/navigate-event.d.ts +1 -1
- package/events.d.ts +1 -0
- package/fesm2022/progress-kendo-angular-scheduler.mjs +333 -89
- package/package.json +15 -15
- package/scheduler.component.d.ts +8 -1
- package/schematics/ngAdd/index.js +3 -3
- package/views/agenda/agenda-view-internal.component.d.ts +3 -1
- package/views/agenda/tasks.collection.d.ts +3 -1
- package/views/agenda/utils.d.ts +1 -1
- package/views/common/configuration-view-base.d.ts +13 -1
- package/views/day-time/day-time-slot.service.d.ts +2 -0
- package/views/day-time/day-time-view.component.d.ts +2 -1
- package/views/month/month-view-renderer.component.d.ts +5 -2
- package/views/month/month-view.component.d.ts +9 -2
- package/views/month/utils.d.ts +2 -1
- package/views/multi-day/day-view.component.d.ts +6 -0
- package/views/multi-day/multi-day-view-renderer.component.d.ts +4 -2
- package/views/multi-day/multi-day-view.component.d.ts +8 -1
- package/views/multi-day/utils.d.ts +2 -1
- package/views/timeline/timeline-multi-day-view.component.d.ts +3 -1
- package/views/timeline/timeline-view.component.d.ts +6 -0
- package/views/timeline/utils.d.ts +2 -1
- package/views/utils.d.ts +7 -3
- package/views/year/year-view.component.d.ts +6 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { PreventableEvent } from './preventable-event';
|
|
6
|
+
/**
|
|
7
|
+
* Represents the arguments for the `moreEventsClick` event.
|
|
8
|
+
*/
|
|
9
|
+
export class MoreEventsClickEvent extends PreventableEvent {
|
|
10
|
+
/**
|
|
11
|
+
* The events that are displayed in the day slot.
|
|
12
|
+
*/
|
|
13
|
+
displayedEvents;
|
|
14
|
+
/**
|
|
15
|
+
* The events that are hidden from the day slot.
|
|
16
|
+
*/
|
|
17
|
+
moreEvents;
|
|
18
|
+
/**
|
|
19
|
+
* @hidden
|
|
20
|
+
*/
|
|
21
|
+
constructor() {
|
|
22
|
+
super();
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright © 2025 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 { PreventableEvent } from '
|
|
5
|
+
import { PreventableEvent } from './preventable-event';
|
|
6
6
|
/**
|
|
7
7
|
* Represents the arguments for the `navigate` event.
|
|
8
8
|
*/
|
package/esm2022/events.mjs
CHANGED
|
@@ -20,6 +20,7 @@ export { DragEvent } from './events/drag-event';
|
|
|
20
20
|
export { DragEndEvent } from './events/drag-end-event';
|
|
21
21
|
export { EditEvent } from './events/edit-event';
|
|
22
22
|
export { AddEvent } from './events/add-event';
|
|
23
|
+
export { MoreEventsClickEvent } from './events/more-events-click';
|
|
23
24
|
export { SlotDragStartEvent } from './events/slot-drag-start-event';
|
|
24
25
|
export { SlotDragEvent } from './events/slot-drag-event';
|
|
25
26
|
export { SlotDragEndEvent } from './events/slot-drag-end-event';
|
|
@@ -10,7 +10,7 @@ export const packageMetadata = {
|
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCode: 'KENDOUIANGULAR',
|
|
12
12
|
productCodes: ['KENDOUIANGULAR'],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: '21.4.0-develop.
|
|
13
|
+
publishDate: 1765793778,
|
|
14
|
+
version: '21.4.0-develop.3',
|
|
15
15
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
16
16
|
};
|
|
@@ -312,6 +312,13 @@ export class SchedulerComponent {
|
|
|
312
312
|
* The function returns a value supported by [`ngStyle`](link:site.data.urls.angular['ngstyleapi']).
|
|
313
313
|
*/
|
|
314
314
|
eventStyles;
|
|
315
|
+
/**
|
|
316
|
+
* Specifies the days that will be hidden from the view.
|
|
317
|
+
* Applies to **Week**, **MultiWeek**, **WorkWeek**, **Month**, **MultiDay**, **TimeLineWeek**, **TimeLineMonth**, and **Agenda** views.
|
|
318
|
+
* Accepts an array of `Day` enum values.
|
|
319
|
+
*
|
|
320
|
+
*/
|
|
321
|
+
hiddenDays;
|
|
315
322
|
/**
|
|
316
323
|
* A callback that is executed for each slot of the Scheduler view.
|
|
317
324
|
* If it returns `true`, the `k-selected` CSS class will be added to the cell, making it visibly selected.
|
|
@@ -680,7 +687,7 @@ export class SchedulerComponent {
|
|
|
680
687
|
'group', 'resources', 'min', 'max', 'showWorkHours', 'startTime', 'scrollTime', 'endTime', 'eventHeight',
|
|
681
688
|
'workDayStart', 'workDayEnd', 'workWeekStart', 'workWeekEnd', 'weekStart', 'slotDuration', 'slotDivisions',
|
|
682
689
|
'editable', 'timezone', 'slotClass', 'slotFill', 'columnWidth', 'eventClass', 'eventStyles', 'isSlotSelected',
|
|
683
|
-
'selectable', 'allDaySlot', 'showToolbar', 'showFooter'
|
|
690
|
+
'selectable', 'allDaySlot', 'showToolbar', 'showFooter', 'hiddenDays'
|
|
684
691
|
], changes)) {
|
|
685
692
|
this.notifyOptionsChange(changes);
|
|
686
693
|
}
|
|
@@ -943,6 +950,7 @@ export class SchedulerComponent {
|
|
|
943
950
|
columnWidth: this.columnWidth,
|
|
944
951
|
eventClass: this.eventClass,
|
|
945
952
|
eventStyles: this.eventStyles,
|
|
953
|
+
hiddenDays: this.hiddenDays,
|
|
946
954
|
isSlotSelected: this.isSlotSelected,
|
|
947
955
|
changes: changes
|
|
948
956
|
});
|
|
@@ -1068,7 +1076,7 @@ export class SchedulerComponent {
|
|
|
1068
1076
|
});
|
|
1069
1077
|
}
|
|
1070
1078
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SchedulerComponent, deps: [{ token: i0.ElementRef }, { token: i1.ViewContextService }, { token: i2.ViewStateService }, { token: i3.EditService }, { token: i4.DialogsService }, { token: i5.IntlService }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i6.PDFService }, { token: i7.LocalizationService }, { token: i8.DomEventsService }, { token: i0.Renderer2 }, { token: i9.FocusService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1071
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: SchedulerComponent, isStandalone: true, selector: "kendo-scheduler", inputs: { selectedViewIndex: "selectedViewIndex", editable: "editable", selectable: "selectable", min: "min", max: "max", eventHeight: "eventHeight", columnWidth: "columnWidth", showWorkHours: "showWorkHours", startTime: "startTime", endTime: "endTime", workDayStart: "workDayStart", workDayEnd: "workDayEnd", workWeekStart: "workWeekStart", workWeekEnd: "workWeekEnd", weekStart: "weekStart", slotDuration: "slotDuration", slotDivisions: "slotDivisions", slotFill: "slotFill", allDaySlot: "allDaySlot", scrollTime: "scrollTime", group: "group", resources: "resources", loading: "loading", timezone: "timezone", events: "events", selectedDate: "selectedDate", modelFields: "modelFields", currentTimeMarker: "currentTimeMarker", highlightOngoingEvents: "highlightOngoingEvents", showToolbar: "showToolbar", showFooter: "showFooter", slotClass: "slotClass", eventClass: "eventClass", eventStyles: "eventStyles", isSlotSelected: "isSlotSelected" }, outputs: { selectedViewIndexChange: "selectedViewIndexChange", navigate: "navigate", dateChange: "dateChange", slotClick: "slotClick", slotDblClick: "slotDblClick", create: "create", eventClick: "eventClick", eventDblClick: "eventDblClick", eventKeydown: "eventKeydown", cancel: "cancel", save: "save", remove: "remove", resizeStart: "resizeStart", resize: "resize", resizeEnd: "resizeEnd", dragStart: "dragStart", drag: "drag", dragEnd: "dragEnd", slotDragStart: "slotDragStart", slotDrag: "slotDrag", slotDragEnd: "slotDragEnd", pdfExport: "pdfExport", schedulerResize: "schedulerResize" }, host: { properties: { "class.k-scheduler": "this.hostClasses", "attr.role": "this.ariaRole", "class.k-rtl": "this.rtl", "attr.dir": "this.dir" } }, providers: [
|
|
1079
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: SchedulerComponent, isStandalone: true, selector: "kendo-scheduler", inputs: { selectedViewIndex: "selectedViewIndex", editable: "editable", selectable: "selectable", min: "min", max: "max", eventHeight: "eventHeight", columnWidth: "columnWidth", showWorkHours: "showWorkHours", startTime: "startTime", endTime: "endTime", workDayStart: "workDayStart", workDayEnd: "workDayEnd", workWeekStart: "workWeekStart", workWeekEnd: "workWeekEnd", weekStart: "weekStart", slotDuration: "slotDuration", slotDivisions: "slotDivisions", slotFill: "slotFill", allDaySlot: "allDaySlot", scrollTime: "scrollTime", group: "group", resources: "resources", loading: "loading", timezone: "timezone", events: "events", selectedDate: "selectedDate", modelFields: "modelFields", currentTimeMarker: "currentTimeMarker", highlightOngoingEvents: "highlightOngoingEvents", showToolbar: "showToolbar", showFooter: "showFooter", slotClass: "slotClass", eventClass: "eventClass", eventStyles: "eventStyles", hiddenDays: "hiddenDays", isSlotSelected: "isSlotSelected" }, outputs: { selectedViewIndexChange: "selectedViewIndexChange", navigate: "navigate", dateChange: "dateChange", slotClick: "slotClick", slotDblClick: "slotDblClick", create: "create", eventClick: "eventClick", eventDblClick: "eventDblClick", eventKeydown: "eventKeydown", cancel: "cancel", save: "save", remove: "remove", resizeStart: "resizeStart", resize: "resize", resizeEnd: "resizeEnd", dragStart: "dragStart", drag: "drag", dragEnd: "dragEnd", slotDragStart: "slotDragStart", slotDrag: "slotDrag", slotDragEnd: "slotDragEnd", pdfExport: "pdfExport", schedulerResize: "schedulerResize" }, host: { properties: { "class.k-scheduler": "this.hostClasses", "attr.role": "this.ariaRole", "class.k-rtl": "this.rtl", "attr.dir": "this.dir" } }, providers: [
|
|
1072
1080
|
EditService,
|
|
1073
1081
|
DialogsService,
|
|
1074
1082
|
DomEventsService,
|
|
@@ -1866,6 +1874,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
1866
1874
|
type: Input
|
|
1867
1875
|
}], eventStyles: [{
|
|
1868
1876
|
type: Input
|
|
1877
|
+
}], hiddenDays: [{
|
|
1878
|
+
type: Input
|
|
1869
1879
|
}], isSlotSelected: [{
|
|
1870
1880
|
type: Input
|
|
1871
1881
|
}], selectedViewIndexChange: [{
|
|
@@ -37,6 +37,7 @@ export class AgendaViewInternalComponent {
|
|
|
37
37
|
pdfService;
|
|
38
38
|
localization;
|
|
39
39
|
selectedDate;
|
|
40
|
+
hiddenDays;
|
|
40
41
|
eventTemplate;
|
|
41
42
|
slotClass;
|
|
42
43
|
eventClass;
|
|
@@ -106,7 +107,7 @@ export class AgendaViewInternalComponent {
|
|
|
106
107
|
this.subs.add(this.pdfService.createElement.subscribe(this.createPDFElement.bind(this)));
|
|
107
108
|
}
|
|
108
109
|
ngOnChanges(changes) {
|
|
109
|
-
if (anyChanged(['selectedDateFormat', 'selectedShortDateFormat', 'numberOfDays'], changes)) {
|
|
110
|
+
if (anyChanged(['selectedDateFormat', 'selectedShortDateFormat', 'numberOfDays', 'hiddenDays'], changes)) {
|
|
110
111
|
this.viewState.notifyDateRange(this.dateRange(this.selectedDate));
|
|
111
112
|
}
|
|
112
113
|
}
|
|
@@ -220,7 +221,8 @@ export class AgendaViewInternalComponent {
|
|
|
220
221
|
resourceGroups,
|
|
221
222
|
allResources: this.resources,
|
|
222
223
|
spans: this.spans,
|
|
223
|
-
dateRange: this.range
|
|
224
|
+
dateRange: this.range,
|
|
225
|
+
hiddenDays: this.hiddenDays
|
|
224
226
|
});
|
|
225
227
|
return eventGroups;
|
|
226
228
|
}
|
|
@@ -334,7 +336,7 @@ export class AgendaViewInternalComponent {
|
|
|
334
336
|
}
|
|
335
337
|
}
|
|
336
338
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgendaViewInternalComponent, deps: [{ token: i1.ViewContextService }, { token: i2.ViewStateService }, { token: i3.IntlService }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i4.PDFService }, { token: i5.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
337
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: AgendaViewInternalComponent, isStandalone: true, selector: "agenda-view-internal", inputs: { eventTemplate: "eventTemplate", slotClass: "slotClass", eventClass: "eventClass", eventStyles: "eventStyles", agendaTimeTemplate: "agendaTimeTemplate", agendaDateTemplate: "agendaDateTemplate", selectedDateFormat: "selectedDateFormat", selectedShortDateFormat: "selectedShortDateFormat", numberOfDays: "numberOfDays" }, viewQueries: [{ propertyName: "headerWrap", first: true, predicate: ["headerWrap"], descendants: true, read: ElementRef, static: true }, { propertyName: "content", first: true, predicate: ["content"], descendants: true, read: ElementRef, static: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
339
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: AgendaViewInternalComponent, isStandalone: true, selector: "agenda-view-internal", inputs: { hiddenDays: "hiddenDays", eventTemplate: "eventTemplate", slotClass: "slotClass", eventClass: "eventClass", eventStyles: "eventStyles", agendaTimeTemplate: "agendaTimeTemplate", agendaDateTemplate: "agendaDateTemplate", selectedDateFormat: "selectedDateFormat", selectedShortDateFormat: "selectedShortDateFormat", numberOfDays: "numberOfDays" }, viewQueries: [{ propertyName: "headerWrap", first: true, predicate: ["headerWrap"], descendants: true, read: ElementRef, static: true }, { propertyName: "content", first: true, predicate: ["content"], descendants: true, read: ElementRef, static: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
338
340
|
<table class="k-scheduler-layout k-scheduler-agendaview" role="grid">
|
|
339
341
|
<tbody role="none">
|
|
340
342
|
<tr class="k-scheduler-head">
|
|
@@ -393,7 +395,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
393
395
|
standalone: true,
|
|
394
396
|
imports: [AgendaHeaderComponent, AgendaListComponent, AsyncPipe]
|
|
395
397
|
}]
|
|
396
|
-
}], ctorParameters: () => [{ type: i1.ViewContextService }, { type: i2.ViewStateService }, { type: i3.IntlService }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i4.PDFService }, { type: i5.LocalizationService }], propDecorators: {
|
|
398
|
+
}], ctorParameters: () => [{ type: i1.ViewContextService }, { type: i2.ViewStateService }, { type: i3.IntlService }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i4.PDFService }, { type: i5.LocalizationService }], propDecorators: { hiddenDays: [{
|
|
399
|
+
type: Input
|
|
400
|
+
}], eventTemplate: [{
|
|
397
401
|
type: Input
|
|
398
402
|
}], slotClass: [{
|
|
399
403
|
type: Input
|
|
@@ -74,6 +74,7 @@ export class AgendaViewComponent extends ConfigurationViewBase {
|
|
|
74
74
|
<ng-template #content>
|
|
75
75
|
<agenda-view-internal
|
|
76
76
|
[numberOfDays]="numberOfDays"
|
|
77
|
+
[hiddenDays]="viewHiddenDays"
|
|
77
78
|
[eventTemplate]="eventTemplate?.templateRef"
|
|
78
79
|
[slotClass]="viewSlotClass"
|
|
79
80
|
[eventClass]="viewEventClass"
|
|
@@ -84,7 +85,7 @@ export class AgendaViewComponent extends ConfigurationViewBase {
|
|
|
84
85
|
[selectedShortDateFormat]="selectedShortDateFormat">
|
|
85
86
|
</agenda-view-internal>
|
|
86
87
|
</ng-template>
|
|
87
|
-
`, isInline: true, dependencies: [{ kind: "component", type: AgendaViewInternalComponent, selector: "agenda-view-internal", inputs: ["eventTemplate", "slotClass", "eventClass", "eventStyles", "agendaTimeTemplate", "agendaDateTemplate", "selectedDateFormat", "selectedShortDateFormat", "numberOfDays"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
88
|
+
`, isInline: true, dependencies: [{ kind: "component", type: AgendaViewInternalComponent, selector: "agenda-view-internal", inputs: ["hiddenDays", "eventTemplate", "slotClass", "eventClass", "eventStyles", "agendaTimeTemplate", "agendaDateTemplate", "selectedDateFormat", "selectedShortDateFormat", "numberOfDays"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
88
89
|
}
|
|
89
90
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: AgendaViewComponent, decorators: [{
|
|
90
91
|
type: Component,
|
|
@@ -99,6 +100,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
99
100
|
<ng-template #content>
|
|
100
101
|
<agenda-view-internal
|
|
101
102
|
[numberOfDays]="numberOfDays"
|
|
103
|
+
[hiddenDays]="viewHiddenDays"
|
|
102
104
|
[eventTemplate]="eventTemplate?.templateRef"
|
|
103
105
|
[slotClass]="viewSlotClass"
|
|
104
106
|
[eventClass]="viewEventClass"
|
|
@@ -19,6 +19,10 @@ function flattenGroupsAndAddIds(scope) {
|
|
|
19
19
|
return function* flattenGroups(groups) {
|
|
20
20
|
for (let index = 0; index < groups.length; index++) {
|
|
21
21
|
const groupItem = groups[index];
|
|
22
|
+
const dayOfWeek = groupItem.items[0]?.startDate?.getDay();
|
|
23
|
+
if (scope.hiddenDays?.includes(dayOfWeek)) {
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
22
26
|
yield {
|
|
23
27
|
type: "group",
|
|
24
28
|
dataItem: groupItem,
|
|
@@ -56,13 +60,15 @@ export class TaskCollection {
|
|
|
56
60
|
end;
|
|
57
61
|
events;
|
|
58
62
|
counter; // used to give unique ids to event elements
|
|
63
|
+
hiddenDays;
|
|
59
64
|
static empty() {
|
|
60
65
|
return (new EmptyIterator());
|
|
61
66
|
}
|
|
62
|
-
constructor(start, end, events) {
|
|
67
|
+
constructor(start, end, events, hiddenDays) {
|
|
63
68
|
this.start = start;
|
|
64
69
|
this.end = end;
|
|
65
70
|
this.events = events;
|
|
71
|
+
this.hiddenDays = hiddenDays || [];
|
|
66
72
|
this.counter = seed;
|
|
67
73
|
seed++;
|
|
68
74
|
this.createIterator = compose(flattenGroupsAndAddIds(this), processEvents(this.start, this.end));
|
|
@@ -148,7 +148,7 @@ function groupByResource(groupedResources, resourceGroups, dateRange) {
|
|
|
148
148
|
/**
|
|
149
149
|
* @hidden
|
|
150
150
|
*/
|
|
151
|
-
export function groupEvents(items, { taskResources, resourceGroups, spans, allResources, dateRange }) {
|
|
151
|
+
export function groupEvents(items, { taskResources, resourceGroups, spans, allResources, dateRange, hiddenDays }) {
|
|
152
152
|
const groups = resourceGroups || [{}];
|
|
153
153
|
const periodStart = toUTCDate(dateRange.start);
|
|
154
154
|
const periodEnd = toUTCDate(dateRange.end);
|
|
@@ -171,6 +171,6 @@ export function groupEvents(items, { taskResources, resourceGroups, spans, allRe
|
|
|
171
171
|
if (resourceGroups) {
|
|
172
172
|
return groupByResource(taskResources, groups, dateRange);
|
|
173
173
|
}
|
|
174
|
-
groups[0].tasks = new TaskCollection(periodStart, periodEnd, splitTasks(periodStart, periodEnd, groups[0].tasks || []));
|
|
174
|
+
groups[0].tasks = new TaskCollection(periodStart, periodEnd, splitTasks(periodStart, periodEnd, groups[0].tasks || []), hiddenDays);
|
|
175
175
|
return groups;
|
|
176
176
|
}
|
|
@@ -22,6 +22,16 @@ export class ConfigurationViewBase extends SchedulerView {
|
|
|
22
22
|
changeDetector;
|
|
23
23
|
viewContext;
|
|
24
24
|
viewState;
|
|
25
|
+
/**
|
|
26
|
+
* Specifies the days that will be hidden from the view.
|
|
27
|
+
* Accepts an array of `Day` enum values.
|
|
28
|
+
**/
|
|
29
|
+
set hiddenDays(_hiddenDays) {
|
|
30
|
+
this._hiddenDays = _hiddenDays;
|
|
31
|
+
}
|
|
32
|
+
get hiddenDays() {
|
|
33
|
+
return this._hiddenDays;
|
|
34
|
+
}
|
|
25
35
|
/**
|
|
26
36
|
* Defines a function that is executed for every slot in the view.
|
|
27
37
|
* The function returns a value which is supported by [`ngClass`](link:site.data.urls.angular['ngclassapi']) [see example](slug:styling_scheduler#slot-styling).
|
|
@@ -93,8 +103,16 @@ export class ConfigurationViewBase extends SchedulerView {
|
|
|
93
103
|
get viewWeekStart() {
|
|
94
104
|
return this.schedulerOptions.weekStart;
|
|
95
105
|
}
|
|
106
|
+
/**
|
|
107
|
+
* @hidden
|
|
108
|
+
*/
|
|
109
|
+
get viewHiddenDays() {
|
|
110
|
+
const result = isPresent(this.hiddenDays) ? this.hiddenDays : (this.schedulerOptions.hiddenDays);
|
|
111
|
+
return result;
|
|
112
|
+
}
|
|
96
113
|
subs;
|
|
97
114
|
schedulerOptions = {};
|
|
115
|
+
_hiddenDays;
|
|
98
116
|
constructor(localization, changeDetector, viewContext, viewState) {
|
|
99
117
|
super();
|
|
100
118
|
this.localization = localization;
|
|
@@ -118,11 +136,13 @@ export class ConfigurationViewBase extends SchedulerView {
|
|
|
118
136
|
}
|
|
119
137
|
_showToolbar;
|
|
120
138
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ConfigurationViewBase, deps: [{ token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i2.ViewContextService }, { token: i3.ViewStateService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
121
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: ConfigurationViewBase, inputs: { slotClass: "slotClass", eventClass: "eventClass", eventStyles: "eventStyles", highlightOngoingEvents: "highlightOngoingEvents", showToolbar: "showToolbar" }, queries: [{ propertyName: "eventTemplate", first: true, predicate: EventTemplateDirective, descendants: true }, { propertyName: "groupHeaderTemplate", first: true, predicate: GroupHeaderTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "template", first: true, predicate: ["content"], descendants: true, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
|
|
139
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: ConfigurationViewBase, inputs: { hiddenDays: "hiddenDays", slotClass: "slotClass", eventClass: "eventClass", eventStyles: "eventStyles", highlightOngoingEvents: "highlightOngoingEvents", showToolbar: "showToolbar" }, queries: [{ propertyName: "eventTemplate", first: true, predicate: EventTemplateDirective, descendants: true }, { propertyName: "groupHeaderTemplate", first: true, predicate: GroupHeaderTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "template", first: true, predicate: ["content"], descendants: true, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
|
|
122
140
|
}
|
|
123
141
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ConfigurationViewBase, decorators: [{
|
|
124
142
|
type: Directive
|
|
125
|
-
}], ctorParameters: () => [{ type: i1.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: i2.ViewContextService }, { type: i3.ViewStateService }], propDecorators: {
|
|
143
|
+
}], ctorParameters: () => [{ type: i1.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: i2.ViewContextService }, { type: i3.ViewStateService }], propDecorators: { hiddenDays: [{
|
|
144
|
+
type: Input
|
|
145
|
+
}], slotClass: [{
|
|
126
146
|
type: Input
|
|
127
147
|
}], eventClass: [{
|
|
128
148
|
type: Input
|
|
@@ -51,7 +51,7 @@ export class SlotSelectableDirective {
|
|
|
51
51
|
this.cdr = cdr;
|
|
52
52
|
this.scheduler.selectable = true;
|
|
53
53
|
this.subscriptions.add(this.slotSelectionChangeSource
|
|
54
|
-
.pipe(distinctUntilChanged(isSameRange)).subscribe((v) => {
|
|
54
|
+
.pipe(distinctUntilChanged((range1, range2) => isSameRange(range1, range2, this.scheduler.resources))).subscribe((v) => {
|
|
55
55
|
this.slotSelectionChange.emit(v);
|
|
56
56
|
}));
|
|
57
57
|
const start$ = this.scheduler.slotDragStart;
|
|
@@ -85,7 +85,7 @@ export class SlotSelectableDirective {
|
|
|
85
85
|
if (!start || !end || !this.selectedRange) {
|
|
86
86
|
return false;
|
|
87
87
|
}
|
|
88
|
-
const match = resourcesMatch(this.selectedRange.resources, resources);
|
|
88
|
+
const match = resourcesMatch(this.selectedRange.resources, resources, this.scheduler.resources);
|
|
89
89
|
if (!match) {
|
|
90
90
|
return false; // Limit selection to the grouped resource where the drag started.
|
|
91
91
|
}
|
|
@@ -97,7 +97,7 @@ export class SlotSelectableDirective {
|
|
|
97
97
|
this.cdr.markForCheck();
|
|
98
98
|
}
|
|
99
99
|
onDrag({ start, end, resources }) {
|
|
100
|
-
const match = resourcesMatch(this.selectionOriginResources, resources);
|
|
100
|
+
const match = resourcesMatch(this.selectionOriginResources, resources, this.scheduler.resources);
|
|
101
101
|
if (!match) {
|
|
102
102
|
return; // Don't change selection when dragging over a different grouped resource's cells.
|
|
103
103
|
}
|
|
@@ -426,6 +426,7 @@ export class DayTimeResourceGroup {
|
|
|
426
426
|
* @hidden
|
|
427
427
|
*/
|
|
428
428
|
export class DayTimeSlotService extends BaseSlotService {
|
|
429
|
+
hiddenDays = [];
|
|
429
430
|
layoutDays(eventHeight = 25) {
|
|
430
431
|
this.groups.forEach((group) => group.forEachDateRange(range => range?.slots.forEach(slot => {
|
|
431
432
|
slot.element.nativeElement.style.height = '';
|
|
@@ -6,7 +6,7 @@ import { Input, TemplateRef, ViewChildren, QueryList, ElementRef, ChangeDetector
|
|
|
6
6
|
import { isChanged, isDocumentAvailable, ScrollbarWidthService } from '@progress/kendo-angular-common';
|
|
7
7
|
import { addDays, getDate, ZonedDate } from '@progress/kendo-date-math';
|
|
8
8
|
import { fromEvent } from 'rxjs';
|
|
9
|
-
import { toInvariantTime, dateInRange, setCoordinates, dateWithTime, toUTCTime, toUTCDateTime } from '../utils';
|
|
9
|
+
import { toInvariantTime, dateInRange, setCoordinates, dateWithTime, toUTCTime, toUTCDateTime, allDaysHidden } from '../utils';
|
|
10
10
|
import { createTimeSlots } from './utils';
|
|
11
11
|
import { DayTimeSlotService } from './day-time-slot.service';
|
|
12
12
|
import { ViewContextService } from '../view-context.service';
|
|
@@ -89,6 +89,7 @@ export class DayTimeViewComponent extends BaseView {
|
|
|
89
89
|
currentDate;
|
|
90
90
|
verticalTime = true;
|
|
91
91
|
initialUpdate = true;
|
|
92
|
+
dates = [];
|
|
92
93
|
constructor(changeDetector, viewContext, viewState, intl, slotService, zone, renderer, element, pdfService, localization, scrollBarWidthService) {
|
|
93
94
|
super(viewContext, viewState, intl, slotService, zone, renderer, element, pdfService, localization, changeDetector, scrollBarWidthService);
|
|
94
95
|
this.changeDetector = changeDetector;
|
|
@@ -147,7 +148,7 @@ export class DayTimeViewComponent extends BaseView {
|
|
|
147
148
|
let date;
|
|
148
149
|
if (typeof time === 'string') {
|
|
149
150
|
const scrollDate = this.intl.parseDate(time);
|
|
150
|
-
if (!scrollDate) {
|
|
151
|
+
if (!(scrollDate && this.daySlots[0]?.start)) {
|
|
151
152
|
return;
|
|
152
153
|
}
|
|
153
154
|
date = toUTCTime(this.daySlots[0].start, scrollDate);
|
|
@@ -315,19 +316,31 @@ export class DayTimeViewComponent extends BaseView {
|
|
|
315
316
|
const shortText = this.intl.format(this.selectedShortDateFormat, start, rangeEnd);
|
|
316
317
|
return { start, end, text, shortText };
|
|
317
318
|
}
|
|
318
|
-
createDaySlots() {
|
|
319
|
+
createDaySlots(multiDayEnd) {
|
|
320
|
+
if (!multiDayEnd) {
|
|
321
|
+
this.dates = [];
|
|
322
|
+
}
|
|
319
323
|
let current = this.getStartDate(this.selectedDate);
|
|
320
|
-
const end = this.getEndDate(current, this.numberOfDays);
|
|
321
|
-
const
|
|
324
|
+
const end = multiDayEnd || this.getEndDate(current, this.numberOfDays);
|
|
325
|
+
const hiddenDays = this.slotService.hiddenDays;
|
|
322
326
|
while (current < end) {
|
|
323
327
|
const next = addDays(current, 1);
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
+
const isTimelineView = this.name === 'timelineWeek' || this.name === 'timelineMonth';
|
|
329
|
+
const isDisplayedDay = hiddenDays.indexOf(current.getDay()) === -1;
|
|
330
|
+
const hasSpace = isTimelineView || this.dates.length < this.numberOfDays;
|
|
331
|
+
if (isDisplayedDay && hasSpace) {
|
|
332
|
+
this.dates.push({
|
|
333
|
+
start: current,
|
|
334
|
+
end: next
|
|
335
|
+
});
|
|
336
|
+
}
|
|
328
337
|
current = next;
|
|
329
338
|
}
|
|
330
|
-
|
|
339
|
+
if (this.name === 'multiDay' && !allDaysHidden(hiddenDays) && this.dates.length < this.numberOfDays) {
|
|
340
|
+
const updatedEnd = addDays(end, this.numberOfDays - this.dates.length);
|
|
341
|
+
return this.createDaySlots(updatedEnd);
|
|
342
|
+
}
|
|
343
|
+
return this.dates;
|
|
331
344
|
}
|
|
332
345
|
createTimeSlots() {
|
|
333
346
|
return createTimeSlots(this.intl, {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright © 2025 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 { Component, Input, NgZone, ElementRef, Renderer2, TemplateRef, ChangeDetectorRef, QueryList, ViewChildren } from '@angular/core';
|
|
5
|
+
import { Component, Input, NgZone, ElementRef, Renderer2, TemplateRef, ChangeDetectorRef, QueryList, ViewChildren, Output, EventEmitter } from '@angular/core';
|
|
6
6
|
import { IntlService, DatePipe } from '@progress/kendo-angular-intl';
|
|
7
7
|
import { isChanged, isDocumentAvailable, ScrollbarWidthService } from '@progress/kendo-angular-common';
|
|
8
8
|
import { addDays, firstDayOfMonth, getDate, lastDayOfMonth, toLocalDate } from '@progress/kendo-date-math';
|
|
@@ -25,6 +25,7 @@ import { HintContainerComponent } from '../common/hint-container.component';
|
|
|
25
25
|
import { FocusableDirective } from '../../navigation/focusable.directive';
|
|
26
26
|
import { MonthSlotComponent } from './month-slot.component';
|
|
27
27
|
import { NgTemplateOutlet, NgClass, NgStyle, AsyncPipe } from '@angular/common';
|
|
28
|
+
import { MoreEventsClickEvent } from '../../events/more-events-click';
|
|
28
29
|
import * as i0 from "@angular/core";
|
|
29
30
|
import * as i1 from "../view-context.service";
|
|
30
31
|
import * as i2 from "../view-state.service";
|
|
@@ -37,6 +38,7 @@ import * as i7 from "@progress/kendo-angular-common";
|
|
|
37
38
|
* @hidden
|
|
38
39
|
*/
|
|
39
40
|
export class MonthViewRendererComponent extends BaseView {
|
|
41
|
+
hiddenDays;
|
|
40
42
|
monthDaySlotTemplate;
|
|
41
43
|
highlightOngoingEvents;
|
|
42
44
|
type;
|
|
@@ -54,6 +56,7 @@ export class MonthViewRendererComponent extends BaseView {
|
|
|
54
56
|
* Determines the displayed date range and formats the selected date (for Month and Multi-Week views)
|
|
55
57
|
*/
|
|
56
58
|
dateRangeFn;
|
|
59
|
+
moreEventsClick = new EventEmitter();
|
|
57
60
|
resizeHintFormat = { skeleton: 'Md' };
|
|
58
61
|
weeks = [];
|
|
59
62
|
eventElements;
|
|
@@ -67,7 +70,7 @@ export class MonthViewRendererComponent extends BaseView {
|
|
|
67
70
|
this.updateOngoingEvents = this.updateOngoingEvents.bind(this);
|
|
68
71
|
}
|
|
69
72
|
ngOnChanges(changes) {
|
|
70
|
-
if (isChanged('weekStart', changes)) {
|
|
73
|
+
if (isChanged('weekStart', changes) || isChanged('hiddenDays', changes)) {
|
|
71
74
|
this.onSelectDate(this.selectedDate);
|
|
72
75
|
}
|
|
73
76
|
super.ngOnChanges(changes);
|
|
@@ -144,7 +147,7 @@ export class MonthViewRendererComponent extends BaseView {
|
|
|
144
147
|
}
|
|
145
148
|
createTasks(items, dateRange) {
|
|
146
149
|
this.weeks = this.createDaySlots(dateRange);
|
|
147
|
-
return createTasks(dateRange.start, dateRange.end, items, this.weeks);
|
|
150
|
+
return createTasks(dateRange.start, dateRange.end, items, this.weeks, this.hiddenDays);
|
|
148
151
|
}
|
|
149
152
|
onTasksChange() {
|
|
150
153
|
updateTaskData(this.tasks);
|
|
@@ -172,8 +175,25 @@ export class MonthViewRendererComponent extends BaseView {
|
|
|
172
175
|
if (eventSlot && navigateToDay) {
|
|
173
176
|
const index = eventSlot.getAttribute('data-slot-index');
|
|
174
177
|
const slot = this.slotService.slotByIndex(index);
|
|
178
|
+
const [resourceIndex, rangeIndex] = index.split(':').map(part => parseInt(part, 10));
|
|
179
|
+
const group = this.slotService['groups'][resourceIndex];
|
|
180
|
+
const range = group.dayRanges[rangeIndex];
|
|
175
181
|
this.zone.run(() => {
|
|
176
|
-
|
|
182
|
+
const moreEventsEvent = new MoreEventsClickEvent();
|
|
183
|
+
const filterSlotEvents = (isHidden) => range.items
|
|
184
|
+
.filter(viewItem => {
|
|
185
|
+
const itemData = viewItem.item.data[resourceIndex];
|
|
186
|
+
return itemData.hidden === isHidden &&
|
|
187
|
+
viewItem.item.startTime < slot.end &&
|
|
188
|
+
viewItem.item.endTime > slot.start;
|
|
189
|
+
})
|
|
190
|
+
.map(viewItem => viewItem.item.event);
|
|
191
|
+
moreEventsEvent.displayedEvents = filterSlotEvents(false);
|
|
192
|
+
moreEventsEvent.moreEvents = filterSlotEvents(true);
|
|
193
|
+
this.moreEventsClick.emit(moreEventsEvent);
|
|
194
|
+
if (!moreEventsEvent.isDefaultPrevented()) {
|
|
195
|
+
this.viewState.navigateTo({ viewName: 'day', date: toLocalDate(slot.start) });
|
|
196
|
+
}
|
|
177
197
|
});
|
|
178
198
|
return;
|
|
179
199
|
}
|
|
@@ -248,14 +268,16 @@ export class MonthViewRendererComponent extends BaseView {
|
|
|
248
268
|
const week = [];
|
|
249
269
|
weeks.push(week);
|
|
250
270
|
for (let dayIdx = 0; dayIdx < DAYS_IN_WEEK_COUNT; dayIdx++) {
|
|
251
|
-
|
|
271
|
+
if ((this.hiddenDays || []).indexOf(date.getDay()) === -1) {
|
|
272
|
+
week.push(date);
|
|
273
|
+
}
|
|
252
274
|
date = addDays(date, 1);
|
|
253
275
|
}
|
|
254
276
|
}
|
|
255
277
|
return weeks;
|
|
256
278
|
}
|
|
257
279
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MonthViewRendererComponent, deps: [{ token: i1.ViewContextService }, { token: i2.ViewStateService }, { token: i3.IntlService }, { token: i4.MonthSlotService }, { token: i0.NgZone }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i5.PDFService }, { token: i6.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i7.ScrollbarWidthService }], target: i0.ɵɵFactoryTarget.Component });
|
|
258
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: MonthViewRendererComponent, isStandalone: true, selector: "month-view", inputs: { monthDaySlotTemplate: "monthDaySlotTemplate", highlightOngoingEvents: "highlightOngoingEvents", type: "type", eventsPerDay: "eventsPerDay", adaptiveSlotHeight: "adaptiveSlotHeight", numberOfWeeks: "numberOfWeeks", newRange: "newRange", dateRangeFn: "dateRangeFn" }, providers: [
|
|
280
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: MonthViewRendererComponent, isStandalone: true, selector: "month-view", inputs: { hiddenDays: "hiddenDays", monthDaySlotTemplate: "monthDaySlotTemplate", highlightOngoingEvents: "highlightOngoingEvents", type: "type", eventsPerDay: "eventsPerDay", adaptiveSlotHeight: "adaptiveSlotHeight", numberOfWeeks: "numberOfWeeks", newRange: "newRange", dateRangeFn: "dateRangeFn" }, outputs: { moreEventsClick: "moreEventsClick" }, providers: [
|
|
259
281
|
MonthSlotService
|
|
260
282
|
], viewQueries: [{ propertyName: "eventElements", predicate: MonthViewItemComponent, descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `
|
|
261
283
|
<table class="k-scheduler-layout k-scheduler-monthview">
|
|
@@ -635,7 +657,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
635
657
|
standalone: true,
|
|
636
658
|
imports: [NgTemplateOutlet, NgClass, MonthSlotComponent, MonthViewItemComponent, NgStyle, FocusableDirective, HintContainerComponent, ResizeHintComponent, RepeatPipe, ResourceIteratorPipe, DatePipe, AsyncPipe]
|
|
637
659
|
}]
|
|
638
|
-
}], ctorParameters: () => [{ type: i1.ViewContextService }, { type: i2.ViewStateService }, { type: i3.IntlService }, { type: i4.MonthSlotService }, { type: i0.NgZone }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i5.PDFService }, { type: i6.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: i7.ScrollbarWidthService }], propDecorators: {
|
|
660
|
+
}], ctorParameters: () => [{ type: i1.ViewContextService }, { type: i2.ViewStateService }, { type: i3.IntlService }, { type: i4.MonthSlotService }, { type: i0.NgZone }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i5.PDFService }, { type: i6.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: i7.ScrollbarWidthService }], propDecorators: { hiddenDays: [{
|
|
661
|
+
type: Input
|
|
662
|
+
}], monthDaySlotTemplate: [{
|
|
639
663
|
type: Input
|
|
640
664
|
}], highlightOngoingEvents: [{
|
|
641
665
|
type: Input
|
|
@@ -651,6 +675,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
651
675
|
type: Input
|
|
652
676
|
}], dateRangeFn: [{
|
|
653
677
|
type: Input
|
|
678
|
+
}], moreEventsClick: [{
|
|
679
|
+
type: Output
|
|
654
680
|
}], eventElements: [{
|
|
655
681
|
type: ViewChildren,
|
|
656
682
|
args: [MonthViewItemComponent]
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright © 2025 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 { Component, ContentChild, forwardRef, Input, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core';
|
|
5
|
+
import { Component, ContentChild, forwardRef, Input, Output, EventEmitter, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core';
|
|
6
6
|
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
7
|
import { IntlService } from '@progress/kendo-angular-intl';
|
|
8
8
|
import { SchedulerView } from '../../types';
|
|
@@ -74,6 +74,12 @@ export class MonthViewComponent extends ConfigurationViewBase {
|
|
|
74
74
|
* @default '{0:y}'
|
|
75
75
|
*/
|
|
76
76
|
selectedShortDateFormat = '{0:y}';
|
|
77
|
+
/**
|
|
78
|
+
* Fires when the **more events** button in the Month view is clicked.
|
|
79
|
+
* Allows you to prevent the default navigation to the Day view or provide custom handling.
|
|
80
|
+
* The event provides arrays of `displayedEvents` and `moreEvents` for the clicked day.
|
|
81
|
+
*/
|
|
82
|
+
moreEventsClick = new EventEmitter();
|
|
77
83
|
monthDaySlotTemplate;
|
|
78
84
|
/**
|
|
79
85
|
* The invariant name for this view.
|
|
@@ -115,7 +121,7 @@ export class MonthViewComponent extends ConfigurationViewBase {
|
|
|
115
121
|
return firstDayOfMonth(addMonths(date, direction));
|
|
116
122
|
}
|
|
117
123
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MonthViewComponent, deps: [{ token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i2.ViewContextService }, { token: i3.ViewStateService }, { token: i4.IntlService }], target: i0.ɵɵFactoryTarget.Component });
|
|
118
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: MonthViewComponent, isStandalone: true, selector: "kendo-scheduler-month-view", inputs: { eventsPerDay: "eventsPerDay", eventHeight: "eventHeight", adaptiveSlotHeight: "adaptiveSlotHeight", selectedDateFormat: "selectedDateFormat", selectedShortDateFormat: "selectedShortDateFormat" }, providers: [{
|
|
124
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: MonthViewComponent, isStandalone: true, selector: "kendo-scheduler-month-view", inputs: { eventsPerDay: "eventsPerDay", eventHeight: "eventHeight", adaptiveSlotHeight: "adaptiveSlotHeight", selectedDateFormat: "selectedDateFormat", selectedShortDateFormat: "selectedShortDateFormat" }, outputs: { moreEventsClick: "moreEventsClick" }, providers: [{
|
|
119
125
|
provide: SchedulerView,
|
|
120
126
|
useExisting: forwardRef(() => MonthViewComponent)
|
|
121
127
|
}], queries: [{ propertyName: "monthDaySlotTemplate", first: true, predicate: MonthDaySlotTemplateDirective, descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `
|
|
@@ -123,6 +129,7 @@ export class MonthViewComponent extends ConfigurationViewBase {
|
|
|
123
129
|
<month-view
|
|
124
130
|
type="month"
|
|
125
131
|
[eventHeight]="viewEventHeight"
|
|
132
|
+
[hiddenDays]="viewHiddenDays"
|
|
126
133
|
[adaptiveSlotHeight]="adaptiveSlotHeight"
|
|
127
134
|
[eventsPerDay]="eventsPerDay"
|
|
128
135
|
[eventTemplate]="eventTemplate?.templateRef"
|
|
@@ -136,10 +143,11 @@ export class MonthViewComponent extends ConfigurationViewBase {
|
|
|
136
143
|
[highlightOngoingEvents]="viewHighlightOngoingEvents"
|
|
137
144
|
[weekStart]="viewWeekStart"
|
|
138
145
|
[dateRangeFn]="dateRange"
|
|
139
|
-
[newRange]="newRange"
|
|
146
|
+
[newRange]="newRange"
|
|
147
|
+
(moreEventsClick)="moreEventsClick.emit($event)">
|
|
140
148
|
</month-view>
|
|
141
149
|
</ng-template>
|
|
142
|
-
`, isInline: true, dependencies: [{ kind: "component", type: MonthViewRendererComponent, selector: "month-view", inputs: ["monthDaySlotTemplate", "highlightOngoingEvents", "type", "eventsPerDay", "adaptiveSlotHeight", "numberOfWeeks", "newRange", "dateRangeFn"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
150
|
+
`, isInline: true, dependencies: [{ kind: "component", type: MonthViewRendererComponent, selector: "month-view", inputs: ["hiddenDays", "monthDaySlotTemplate", "highlightOngoingEvents", "type", "eventsPerDay", "adaptiveSlotHeight", "numberOfWeeks", "newRange", "dateRangeFn"], outputs: ["moreEventsClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
143
151
|
}
|
|
144
152
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MonthViewComponent, decorators: [{
|
|
145
153
|
type: Component,
|
|
@@ -155,6 +163,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
155
163
|
<month-view
|
|
156
164
|
type="month"
|
|
157
165
|
[eventHeight]="viewEventHeight"
|
|
166
|
+
[hiddenDays]="viewHiddenDays"
|
|
158
167
|
[adaptiveSlotHeight]="adaptiveSlotHeight"
|
|
159
168
|
[eventsPerDay]="eventsPerDay"
|
|
160
169
|
[eventTemplate]="eventTemplate?.templateRef"
|
|
@@ -168,7 +177,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
168
177
|
[highlightOngoingEvents]="viewHighlightOngoingEvents"
|
|
169
178
|
[weekStart]="viewWeekStart"
|
|
170
179
|
[dateRangeFn]="dateRange"
|
|
171
|
-
[newRange]="newRange"
|
|
180
|
+
[newRange]="newRange"
|
|
181
|
+
(moreEventsClick)="moreEventsClick.emit($event)">
|
|
172
182
|
</month-view>
|
|
173
183
|
</ng-template>
|
|
174
184
|
`,
|
|
@@ -185,6 +195,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
185
195
|
type: Input
|
|
186
196
|
}], selectedShortDateFormat: [{
|
|
187
197
|
type: Input
|
|
198
|
+
}], moreEventsClick: [{
|
|
199
|
+
type: Output
|
|
188
200
|
}], monthDaySlotTemplate: [{
|
|
189
201
|
type: ContentChild,
|
|
190
202
|
args: [MonthDaySlotTemplateDirective, { static: false }]
|
|
@@ -128,6 +128,7 @@ export class MultiWeekViewComponent extends ConfigurationViewBase {
|
|
|
128
128
|
<month-view
|
|
129
129
|
type="multiWeek"
|
|
130
130
|
[eventHeight]="viewEventHeight"
|
|
131
|
+
[hiddenDays]="viewHiddenDays"
|
|
131
132
|
[adaptiveSlotHeight]="adaptiveSlotHeight"
|
|
132
133
|
[eventsPerDay]="eventsPerDay"
|
|
133
134
|
[eventTemplate]="eventTemplate?.templateRef"
|
|
@@ -145,7 +146,7 @@ export class MultiWeekViewComponent extends ConfigurationViewBase {
|
|
|
145
146
|
[newRange]="newRange">
|
|
146
147
|
</month-view>
|
|
147
148
|
</ng-template>
|
|
148
|
-
`, isInline: true, dependencies: [{ kind: "component", type: MonthViewRendererComponent, selector: "month-view", inputs: ["monthDaySlotTemplate", "highlightOngoingEvents", "type", "eventsPerDay", "adaptiveSlotHeight", "numberOfWeeks", "newRange", "dateRangeFn"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
149
|
+
`, isInline: true, dependencies: [{ kind: "component", type: MonthViewRendererComponent, selector: "month-view", inputs: ["hiddenDays", "monthDaySlotTemplate", "highlightOngoingEvents", "type", "eventsPerDay", "adaptiveSlotHeight", "numberOfWeeks", "newRange", "dateRangeFn"], outputs: ["moreEventsClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
149
150
|
}
|
|
150
151
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MultiWeekViewComponent, decorators: [{
|
|
151
152
|
type: Component,
|
|
@@ -161,6 +162,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
161
162
|
<month-view
|
|
162
163
|
type="multiWeek"
|
|
163
164
|
[eventHeight]="viewEventHeight"
|
|
165
|
+
[hiddenDays]="viewHiddenDays"
|
|
164
166
|
[adaptiveSlotHeight]="adaptiveSlotHeight"
|
|
165
167
|
[eventsPerDay]="eventsPerDay"
|
|
166
168
|
[eventTemplate]="eventTemplate?.templateRef"
|