@progress/kendo-angular-scheduler 21.4.1-develop.1 → 22.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.
- package/editing/recurrence/localization/messages.d.ts +1 -1
- package/editing/resource-editor-base.d.ts +1 -1
- package/editing-directives/editing-directive-base.d.ts +1 -1
- package/fesm2022/progress-kendo-angular-scheduler.mjs +313 -313
- package/localization/messages.d.ts +1 -1
- package/package.json +20 -28
- package/schematics/ngAdd/index.js +3 -3
- package/views/common/base-view.d.ts +1 -1
- package/views/common/configuration-view-base.d.ts +1 -1
- package/views/day-time/day-time-view-base.d.ts +1 -1
- package/views/day-time/day-time-view.component.d.ts +1 -1
- package/views/multi-day/multi-day-view-base.d.ts +1 -1
- package/views/timeline/timeline-base.d.ts +1 -1
- package/views/view-items/base-slot.directive.d.ts +1 -1
- package/views/view-items/base-view-item.d.ts +1 -1
- package/esm2022/common/constants.mjs +0 -8
- package/esm2022/common/default-model-fields.mjs +0 -20
- package/esm2022/common/dom-queries.mjs +0 -107
- package/esm2022/common/modifiers.mjs +0 -31
- package/esm2022/common/util.mjs +0 -227
- package/esm2022/data-binding.directive.mjs +0 -162
- package/esm2022/directives.mjs +0 -136
- package/esm2022/editing/date-time-picker.component.mjs +0 -190
- package/esm2022/editing/dialogs.service.mjs +0 -96
- package/esm2022/editing/edit-dialog-template.directive.mjs +0 -53
- package/esm2022/editing/edit-dialog.component.mjs +0 -679
- package/esm2022/editing/edit.service.mjs +0 -107
- package/esm2022/editing/local-data-changes.service.mjs +0 -18
- package/esm2022/editing/recurrence/end-rule-radio-button.directive.mjs +0 -77
- package/esm2022/editing/recurrence/localization/custom-messages.component.mjs +0 -44
- package/esm2022/editing/recurrence/localization/localized-messages.directive.mjs +0 -39
- package/esm2022/editing/recurrence/localization/messages.mjs +0 -239
- package/esm2022/editing/recurrence/localization/recurrence-localization.service.mjs +0 -47
- package/esm2022/editing/recurrence/recurrence-editor.component.mjs +0 -497
- package/esm2022/editing/recurrence/recurrence-end-rule-editor.component.mjs +0 -334
- package/esm2022/editing/recurrence/recurrence-frequency-editor.component.mjs +0 -105
- package/esm2022/editing/recurrence/recurrence-interval-editor.component.mjs +0 -169
- package/esm2022/editing/recurrence/recurrence-monthly-yearly-editor.component.mjs +0 -468
- package/esm2022/editing/recurrence/recurrence-weekday-rule-editor.component.mjs +0 -138
- package/esm2022/editing/recurrence/recurrence.service.mjs +0 -254
- package/esm2022/editing/recurrence/repeat-on-radio-button.directive.mjs +0 -81
- package/esm2022/editing/resource-editor-base.mjs +0 -59
- package/esm2022/editing/resource-multiple-editor.component.mjs +0 -101
- package/esm2022/editing/resource-single-editor.component.mjs +0 -82
- package/esm2022/editing/timezone-editor.component.mjs +0 -193
- package/esm2022/editing-directives/base-edit.service.mjs +0 -320
- package/esm2022/editing-directives/edit-service.interface.mjs +0 -5
- package/esm2022/editing-directives/editing-directive-base.mjs +0 -242
- package/esm2022/editing-directives/local-edit.service.mjs +0 -122
- package/esm2022/editing-directives/reactive-editing.directive.mjs +0 -132
- package/esm2022/editing-directives/utils.mjs +0 -107
- package/esm2022/events/add-event.mjs +0 -26
- package/esm2022/events/cancel-event.mjs +0 -14
- package/esm2022/events/create-event.mjs +0 -40
- package/esm2022/events/date-change-event.mjs +0 -29
- package/esm2022/events/drag-end-event.mjs +0 -46
- package/esm2022/events/drag-event.mjs +0 -54
- package/esm2022/events/drag-start-event.mjs +0 -30
- package/esm2022/events/edit-event-base.mjs +0 -32
- package/esm2022/events/edit-event.mjs +0 -30
- package/esm2022/events/event-click-event.mjs +0 -32
- package/esm2022/events/event-keydown-event.mjs +0 -28
- package/esm2022/events/more-events-click.mjs +0 -24
- package/esm2022/events/navigate-event.mjs +0 -26
- package/esm2022/events/preventable-event.mjs +0 -28
- package/esm2022/events/remove-event.mjs +0 -30
- package/esm2022/events/resize-end-event.mjs +0 -38
- package/esm2022/events/resize-event.mjs +0 -46
- package/esm2022/events/resize-start-event.mjs +0 -30
- package/esm2022/events/save-event.mjs +0 -18
- package/esm2022/events/slot-click-event.mjs +0 -44
- package/esm2022/events/slot-drag-end-event.mjs +0 -10
- package/esm2022/events/slot-drag-event.mjs +0 -40
- package/esm2022/events/slot-drag-start-event.mjs +0 -44
- package/esm2022/events/view-event-map.mjs +0 -35
- package/esm2022/events.mjs +0 -27
- package/esm2022/index.mjs +0 -83
- package/esm2022/loading.component.mjs +0 -52
- package/esm2022/localization/custom-messages.component.mjs +0 -56
- package/esm2022/localization/localized-messages.directive.mjs +0 -39
- package/esm2022/localization/messages.mjs +0 -614
- package/esm2022/localization/scheduler-localization.service.mjs +0 -31
- package/esm2022/navigation/focus-position.interface.mjs +0 -5
- package/esm2022/navigation/focus.service.mjs +0 -202
- package/esm2022/navigation/focusable-element.interface.mjs +0 -5
- package/esm2022/navigation/focusable.directive.mjs +0 -98
- package/esm2022/navigation/shortcuts.directive.mjs +0 -239
- package/esm2022/navigation.mjs +0 -6
- package/esm2022/package-metadata.mjs +0 -16
- package/esm2022/pdf/pdf-command.directive.mjs +0 -96
- package/esm2022/pdf/pdf-export-event.mjs +0 -10
- package/esm2022/pdf/pdf.component.mjs +0 -241
- package/esm2022/pdf/pdf.module.mjs +0 -42
- package/esm2022/pdf/pdf.service.mjs +0 -36
- package/esm2022/progress-kendo-angular-scheduler.mjs +0 -8
- package/esm2022/scheduler.component.mjs +0 -1981
- package/esm2022/scheduler.module.mjs +0 -138
- package/esm2022/toolbar/navigation.component.mjs +0 -391
- package/esm2022/toolbar/toolbar-context.mjs +0 -5
- package/esm2022/toolbar/toolbar-template.directive.mjs +0 -50
- package/esm2022/toolbar/toolbar.component.mjs +0 -168
- package/esm2022/toolbar/toolbar.service.mjs +0 -46
- package/esm2022/toolbar/view-selector.component.mjs +0 -181
- package/esm2022/types/actions.mjs +0 -5
- package/esm2022/types/create-form-group-args.interface.mjs +0 -5
- package/esm2022/types/crud-operation.enum.mjs +0 -18
- package/esm2022/types/current-time-settings.interface.mjs +0 -5
- package/esm2022/types/date-range.interface.mjs +0 -5
- package/esm2022/types/datepicker-options.interface.mjs +0 -5
- package/esm2022/types/edit-event-args.interface.mjs +0 -5
- package/esm2022/types/edit-mode.enum.mjs +0 -23
- package/esm2022/types/editable-settings.interface.mjs +0 -5
- package/esm2022/types/event-style-args.interface.mjs +0 -5
- package/esm2022/types/focusable-container.mjs +0 -5
- package/esm2022/types/group.interface.mjs +0 -5
- package/esm2022/types/numeric-options.interface.mjs +0 -5
- package/esm2022/types/ongoing-events-settings.interface.mjs +0 -5
- package/esm2022/types/resource.interface.mjs +0 -5
- package/esm2022/types/scheduler-event.mjs +0 -5
- package/esm2022/types/scheduler-model-fields.interface.mjs +0 -5
- package/esm2022/types/scheduler-slot.interface.mjs +0 -5
- package/esm2022/types/scheduler-view.mjs +0 -9
- package/esm2022/types/slot-class-args.interface.mjs +0 -5
- package/esm2022/types/slot-selection.mjs +0 -35
- package/esm2022/types/view-item.interface.mjs +0 -5
- package/esm2022/types.mjs +0 -12
- package/esm2022/views/agenda/agenda-header-item.component.mjs +0 -85
- package/esm2022/views/agenda/agenda-header.component.mjs +0 -75
- package/esm2022/views/agenda/agenda-task-item.component.mjs +0 -137
- package/esm2022/views/agenda/agenda-view-internal.component.mjs +0 -424
- package/esm2022/views/agenda/agenda-view-list.component.mjs +0 -256
- package/esm2022/views/agenda/agenda-view.component.mjs +0 -130
- package/esm2022/views/agenda/tasks.collection.mjs +0 -96
- package/esm2022/views/agenda/utils.mjs +0 -176
- package/esm2022/views/common/base-view.mjs +0 -1099
- package/esm2022/views/common/configuration-view-base.mjs +0 -164
- package/esm2022/views/common/dom-events.service.mjs +0 -22
- package/esm2022/views/common/hint-container.component.mjs +0 -41
- package/esm2022/views/common/repeat.pipe.mjs +0 -36
- package/esm2022/views/common/resize-hint.component.mjs +0 -97
- package/esm2022/views/common/resource-iterator.pipe.mjs +0 -49
- package/esm2022/views/common/scheduler-task.mjs +0 -5
- package/esm2022/views/common/slot-selectable.directive.mjs +0 -137
- package/esm2022/views/common/view-footer.component.mjs +0 -103
- package/esm2022/views/common/work-hours-footer.directive.mjs +0 -45
- package/esm2022/views/constants.mjs +0 -31
- package/esm2022/views/day-time/day-time-slot.service.mjs +0 -633
- package/esm2022/views/day-time/day-time-view-base.mjs +0 -244
- package/esm2022/views/day-time/day-time-view-item.component.mjs +0 -216
- package/esm2022/views/day-time/day-time-view.component.mjs +0 -437
- package/esm2022/views/day-time/event-slot.directive.mjs +0 -138
- package/esm2022/views/day-time/utils.mjs +0 -32
- package/esm2022/views/month/month-slot.component.mjs +0 -166
- package/esm2022/views/month/month-slot.service.mjs +0 -404
- package/esm2022/views/month/month-view-item.component.mjs +0 -161
- package/esm2022/views/month/month-view-renderer.component.mjs +0 -683
- package/esm2022/views/month/month-view.component.mjs +0 -203
- package/esm2022/views/month/multi-week-view.component.mjs +0 -202
- package/esm2022/views/month/utils.mjs +0 -107
- package/esm2022/views/multi-day/day-view.component.mjs +0 -186
- package/esm2022/views/multi-day/multi-day-view-base.mjs +0 -55
- package/esm2022/views/multi-day/multi-day-view-renderer.component.mjs +0 -1002
- package/esm2022/views/multi-day/multi-day-view.component.mjs +0 -197
- package/esm2022/views/multi-day/utils.mjs +0 -63
- package/esm2022/views/multi-day/week-view.component.mjs +0 -189
- package/esm2022/views/multi-day/work-week-view.component.mjs +0 -172
- package/esm2022/views/scheduler-view.directive.mjs +0 -65
- package/esm2022/views/templates/agenda-date-template.directive.mjs +0 -41
- package/esm2022/views/templates/agenda-time-template.directive.mjs +0 -46
- package/esm2022/views/templates/all-day-event-template.directive.mjs +0 -42
- package/esm2022/views/templates/all-day-slot-template.directive.mjs +0 -42
- package/esm2022/views/templates/date-header-template.directive.mjs +0 -42
- package/esm2022/views/templates/event-template.directive.mjs +0 -42
- package/esm2022/views/templates/group-header-template.directive.mjs +0 -42
- package/esm2022/views/templates/major-time-header-template.directive.mjs +0 -41
- package/esm2022/views/templates/minor-time-header-template.directive.mjs +0 -41
- package/esm2022/views/templates/month-day-slot-template.directive.mjs +0 -42
- package/esm2022/views/templates/multi-week-day-slot-template.directive.mjs +0 -42
- package/esm2022/views/templates/time-slot-template.directive.mjs +0 -43
- package/esm2022/views/templates.mjs +0 -16
- package/esm2022/views/timeline/timeline-base.mjs +0 -39
- package/esm2022/views/timeline/timeline-month-view.component.mjs +0 -211
- package/esm2022/views/timeline/timeline-multi-day-view.component.mjs +0 -649
- package/esm2022/views/timeline/timeline-view.component.mjs +0 -189
- package/esm2022/views/timeline/timeline-week-view.component.mjs +0 -181
- package/esm2022/views/timeline/utils.mjs +0 -60
- package/esm2022/views/utils.mjs +0 -373
- package/esm2022/views/view-context.service.mjs +0 -111
- package/esm2022/views/view-items/base-slot.directive.mjs +0 -104
- package/esm2022/views/view-items/base-slot.service.mjs +0 -82
- package/esm2022/views/view-items/base-view-item.mjs +0 -194
- package/esm2022/views/view-items/item-map.mjs +0 -38
- package/esm2022/views/view-items/types.mjs +0 -5
- package/esm2022/views/view-state.service.mjs +0 -144
- package/esm2022/views/year/utils.mjs +0 -60
- package/esm2022/views/year/year-view-internal.component.mjs +0 -471
- package/esm2022/views/year/year-view.component.mjs +0 -136
|
@@ -1,683 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Component, Input, NgZone, ElementRef, Renderer2, TemplateRef, ChangeDetectorRef, QueryList, ViewChildren, Output, EventEmitter } from '@angular/core';
|
|
6
|
-
import { IntlService, DatePipe } from '@progress/kendo-angular-intl';
|
|
7
|
-
import { isChanged, isDocumentAvailable, ScrollbarWidthService } from '@progress/kendo-angular-common';
|
|
8
|
-
import { addDays, firstDayOfMonth, getDate, lastDayOfMonth, toLocalDate } from '@progress/kendo-date-math';
|
|
9
|
-
import { ViewContextService } from '../view-context.service';
|
|
10
|
-
import { ViewStateService } from '../view-state.service';
|
|
11
|
-
import { closestInScope, hasClasses } from '../../common/dom-queries';
|
|
12
|
-
import { MonthSlotService } from './month-slot.service';
|
|
13
|
-
import { updateTaskData, createTasks } from './utils';
|
|
14
|
-
import { toPx, dateInRange } from '../utils';
|
|
15
|
-
import { BaseView } from '../common/base-view';
|
|
16
|
-
import { PDFService } from '../../pdf/pdf.service';
|
|
17
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
18
|
-
import { MonthViewItemComponent } from './month-view-item.component';
|
|
19
|
-
import { isPresent } from '../../common/util';
|
|
20
|
-
import { DAYS_IN_WEEK_COUNT, WEEKS_COUNT, MS_PER_MINUTE, ONGOING_EVENT_CSS_CLASS } from '../constants';
|
|
21
|
-
import { ResourceIteratorPipe } from '../common/resource-iterator.pipe';
|
|
22
|
-
import { RepeatPipe } from '../common/repeat.pipe';
|
|
23
|
-
import { ResizeHintComponent } from '../common/resize-hint.component';
|
|
24
|
-
import { HintContainerComponent } from '../common/hint-container.component';
|
|
25
|
-
import { FocusableDirective } from '../../navigation/focusable.directive';
|
|
26
|
-
import { MonthSlotComponent } from './month-slot.component';
|
|
27
|
-
import { NgTemplateOutlet, NgClass, NgStyle, AsyncPipe } from '@angular/common';
|
|
28
|
-
import { MoreEventsClickEvent } from '../../events/more-events-click';
|
|
29
|
-
import * as i0 from "@angular/core";
|
|
30
|
-
import * as i1 from "../view-context.service";
|
|
31
|
-
import * as i2 from "../view-state.service";
|
|
32
|
-
import * as i3 from "@progress/kendo-angular-intl";
|
|
33
|
-
import * as i4 from "./month-slot.service";
|
|
34
|
-
import * as i5 from "../../pdf/pdf.service";
|
|
35
|
-
import * as i6 from "@progress/kendo-angular-l10n";
|
|
36
|
-
import * as i7 from "@progress/kendo-angular-common";
|
|
37
|
-
/**
|
|
38
|
-
* @hidden
|
|
39
|
-
*/
|
|
40
|
-
export class MonthViewRendererComponent extends BaseView {
|
|
41
|
-
hiddenDays;
|
|
42
|
-
monthDaySlotTemplate;
|
|
43
|
-
highlightOngoingEvents;
|
|
44
|
-
type;
|
|
45
|
-
eventsPerDay;
|
|
46
|
-
adaptiveSlotHeight;
|
|
47
|
-
/**
|
|
48
|
-
* The number of weeks to be rendered in the view
|
|
49
|
-
*/
|
|
50
|
-
numberOfWeeks = WEEKS_COUNT;
|
|
51
|
-
/**
|
|
52
|
-
* Calculates the next or previous range to be displayed (for Month and Multi-Week views)
|
|
53
|
-
*/
|
|
54
|
-
newRange;
|
|
55
|
-
/**
|
|
56
|
-
* Determines the displayed date range and formats the selected date (for Month and Multi-Week views)
|
|
57
|
-
*/
|
|
58
|
-
dateRangeFn;
|
|
59
|
-
moreEventsClick = new EventEmitter();
|
|
60
|
-
resizeHintFormat = { skeleton: 'Md' };
|
|
61
|
-
weeks = [];
|
|
62
|
-
eventElements;
|
|
63
|
-
get monthDaySlotTemplateRef() {
|
|
64
|
-
return this.monthDaySlotTemplate || (this.schedulerMonthDaySlotTemplate || {}).templateRef;
|
|
65
|
-
}
|
|
66
|
-
ongoingEventsTimeout;
|
|
67
|
-
schedulerMonthDaySlotTemplate;
|
|
68
|
-
constructor(viewContext, viewState, intl, slotService, zone, element, renderer, pdfService, localization, changeDetector, scrollBarWidthService) {
|
|
69
|
-
super(viewContext, viewState, intl, slotService, zone, renderer, element, pdfService, localization, changeDetector, scrollBarWidthService);
|
|
70
|
-
this.updateOngoingEvents = this.updateOngoingEvents.bind(this);
|
|
71
|
-
}
|
|
72
|
-
ngOnChanges(changes) {
|
|
73
|
-
if (isChanged('weekStart', changes) || isChanged('hiddenDays', changes)) {
|
|
74
|
-
this.onSelectDate(this.selectedDate);
|
|
75
|
-
}
|
|
76
|
-
super.ngOnChanges(changes);
|
|
77
|
-
}
|
|
78
|
-
ngOnInit() {
|
|
79
|
-
this.viewState.layoutEnd.subscribe(() => {
|
|
80
|
-
if (this.adaptiveSlotHeight) {
|
|
81
|
-
this.slotService.invalidate();
|
|
82
|
-
this.reflow();
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
super.ngOnInit();
|
|
86
|
-
}
|
|
87
|
-
ngAfterViewInit() {
|
|
88
|
-
this.updateOngoingEvents();
|
|
89
|
-
super.ngAfterViewInit();
|
|
90
|
-
}
|
|
91
|
-
ngOnDestroy() {
|
|
92
|
-
clearTimeout(this.ongoingEventsTimeout);
|
|
93
|
-
super.ngOnDestroy();
|
|
94
|
-
}
|
|
95
|
-
horizontalColspan(resourceIndex) {
|
|
96
|
-
const resources = this.horizontalResources;
|
|
97
|
-
let result = DAYS_IN_WEEK_COUNT;
|
|
98
|
-
for (let idx = resourceIndex + 1; idx < resources.length; idx++) {
|
|
99
|
-
result *= (resources[idx].data || []).length || 1;
|
|
100
|
-
}
|
|
101
|
-
return result;
|
|
102
|
-
}
|
|
103
|
-
verticalRowspan(resourceIndex) {
|
|
104
|
-
const resources = this.verticalResources;
|
|
105
|
-
let result = this.numberOfWeeks;
|
|
106
|
-
for (let idx = resourceIndex + 1; idx < resources.length; idx++) {
|
|
107
|
-
result *= (resources[idx].data || []).length || 1;
|
|
108
|
-
}
|
|
109
|
-
return result;
|
|
110
|
-
}
|
|
111
|
-
verticalItem(leafIndex, resourceIndex) {
|
|
112
|
-
const data = this.verticalResources[resourceIndex].data || [];
|
|
113
|
-
const resources = this.verticalResources;
|
|
114
|
-
let result = 1;
|
|
115
|
-
for (let idx = resourceIndex + 1; idx < resources.length; idx++) {
|
|
116
|
-
result *= ((resources[idx].data || []).length || 1);
|
|
117
|
-
}
|
|
118
|
-
return data[(leafIndex / result) % data.length];
|
|
119
|
-
}
|
|
120
|
-
daySlotClass(day, resourceIndex) {
|
|
121
|
-
if (this.slotClass) {
|
|
122
|
-
return this.slotClass({
|
|
123
|
-
start: day,
|
|
124
|
-
end: addDays(day, 1),
|
|
125
|
-
resources: this.resourcesByIndex(resourceIndex),
|
|
126
|
-
isAllDay: false
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
cellTitle(value) {
|
|
131
|
-
return this.intl.formatDate(value, 'D');
|
|
132
|
-
}
|
|
133
|
-
addDay(dayStart) {
|
|
134
|
-
return addDays(dayStart, 1);
|
|
135
|
-
}
|
|
136
|
-
isDayInPreviousMonth(day) {
|
|
137
|
-
const beginningOfMonth = new Date(firstDayOfMonth(this.selectedDate).setHours(0, 0, 0, 0));
|
|
138
|
-
return day < beginningOfMonth;
|
|
139
|
-
}
|
|
140
|
-
isDayInNextMonth(day) {
|
|
141
|
-
const endOfMonth = new Date(lastDayOfMonth(this.selectedDate).setHours(23, 59, 59, 59));
|
|
142
|
-
return day > endOfMonth;
|
|
143
|
-
}
|
|
144
|
-
optionsChange(changes) {
|
|
145
|
-
this.schedulerMonthDaySlotTemplate = changes[`${this.type}DaySlotTemplate`];
|
|
146
|
-
super.optionsChange(changes);
|
|
147
|
-
}
|
|
148
|
-
createTasks(items, dateRange) {
|
|
149
|
-
this.weeks = this.createDaySlots(dateRange);
|
|
150
|
-
return createTasks(dateRange.start, dateRange.end, items, this.weeks, this.hiddenDays);
|
|
151
|
-
}
|
|
152
|
-
onTasksChange() {
|
|
153
|
-
updateTaskData(this.tasks);
|
|
154
|
-
this.items.next(this.tasks);
|
|
155
|
-
}
|
|
156
|
-
reflow() {
|
|
157
|
-
this.updateContentHeight();
|
|
158
|
-
const content = this.content.nativeElement;
|
|
159
|
-
this.slotService.containerSize = content.scrollWidth;
|
|
160
|
-
if (this.contentHeight === 'auto') {
|
|
161
|
-
// bigger size changes cause the table to overflow the container and in horizontal scrollbars
|
|
162
|
-
// this changes the table and slots size during rendering before the browser re-adjusts the 100% table width
|
|
163
|
-
content.style.overflow = 'visible';
|
|
164
|
-
}
|
|
165
|
-
this.slotService.layout(this.eventHeight, this.eventsPerDay, this.adaptiveSlotHeight);
|
|
166
|
-
if (this.contentHeight === 'auto') {
|
|
167
|
-
content.style.overflow = 'auto';
|
|
168
|
-
}
|
|
169
|
-
this.syncTables();
|
|
170
|
-
}
|
|
171
|
-
onClick(e, eventType = e.type) {
|
|
172
|
-
if (eventType === 'click') {
|
|
173
|
-
const eventSlot = closestInScope(e.target, node => node.hasAttribute('data-slot-index'), this.element.nativeElement);
|
|
174
|
-
const navigateToDay = closestInScope(e.target, node => hasClasses(node, 'k-more-events k-nav-day'), eventSlot);
|
|
175
|
-
if (eventSlot && navigateToDay) {
|
|
176
|
-
const index = eventSlot.getAttribute('data-slot-index');
|
|
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];
|
|
181
|
-
this.zone.run(() => {
|
|
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
|
-
}
|
|
197
|
-
});
|
|
198
|
-
return;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
super.onClick(e, eventType);
|
|
202
|
-
}
|
|
203
|
-
slotByIndex(index, _args) {
|
|
204
|
-
return this.slotService.slotByIndex(index);
|
|
205
|
-
}
|
|
206
|
-
onSelectDate(date) {
|
|
207
|
-
const dateRange = this.dateRange(date);
|
|
208
|
-
this.selectedDate = date;
|
|
209
|
-
this.viewState.notifyDateRange(dateRange);
|
|
210
|
-
this.weeks = this.createDaySlots(dateRange);
|
|
211
|
-
}
|
|
212
|
-
onAction(e) {
|
|
213
|
-
const now = getDate(this.selectedDate);
|
|
214
|
-
if (e.type === 'next') {
|
|
215
|
-
const next = this.newRange(now);
|
|
216
|
-
if (this.isInRange(next)) {
|
|
217
|
-
this.viewState.notifyNextDate(next);
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
if (e.type === 'prev') {
|
|
221
|
-
const next = this.newRange(now, -1);
|
|
222
|
-
if (this.isInRange(next)) {
|
|
223
|
-
this.viewState.notifyNextDate(next);
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
dateRange(date = this.selectedDate) {
|
|
228
|
-
return this.dateRangeFn(date, this.weekStart);
|
|
229
|
-
}
|
|
230
|
-
dragRanges(slot) {
|
|
231
|
-
return this.slotService.dragRanges(slot, this.dragging.offset);
|
|
232
|
-
}
|
|
233
|
-
dragHintSize(first, last) {
|
|
234
|
-
return {
|
|
235
|
-
width: toPx(last.rect.left - first.rect.left + last.rect.width),
|
|
236
|
-
height: toPx(first.height)
|
|
237
|
-
};
|
|
238
|
-
}
|
|
239
|
-
slotByPosition(x, y) {
|
|
240
|
-
return this.slotService.slotByPosition(x, y);
|
|
241
|
-
}
|
|
242
|
-
updateOngoingEvents() {
|
|
243
|
-
const disabled = !this.highlightOngoingEvents || this.highlightOngoingEvents.enabled === false;
|
|
244
|
-
if (!isDocumentAvailable() || disabled) {
|
|
245
|
-
return;
|
|
246
|
-
}
|
|
247
|
-
clearTimeout(this.ongoingEventsTimeout);
|
|
248
|
-
this.zone.runOutsideAngular(() => {
|
|
249
|
-
this.ongoingEventsTimeout = setTimeout(this.updateOngoingEvents, this.highlightOngoingEvents.updateInterval || MS_PER_MINUTE);
|
|
250
|
-
});
|
|
251
|
-
this.toggleOngoingClass();
|
|
252
|
-
}
|
|
253
|
-
currentTime() {
|
|
254
|
-
return new Date();
|
|
255
|
-
}
|
|
256
|
-
toggleOngoingClass() {
|
|
257
|
-
const now = this.currentTime();
|
|
258
|
-
const cssClass = isPresent(this.highlightOngoingEvents.cssClass) ? this.highlightOngoingEvents.cssClass : ONGOING_EVENT_CSS_CLASS;
|
|
259
|
-
this.eventElements.forEach((event) => {
|
|
260
|
-
const isOngoing = dateInRange(now, event.item.start, event.item.end);
|
|
261
|
-
this.renderer[isOngoing ? 'addClass' : 'removeClass'](event.nativeElement, cssClass);
|
|
262
|
-
});
|
|
263
|
-
}
|
|
264
|
-
createDaySlots({ start }) {
|
|
265
|
-
const weeks = [];
|
|
266
|
-
let date = start;
|
|
267
|
-
for (let idx = 0; idx < this.numberOfWeeks; idx++) {
|
|
268
|
-
const week = [];
|
|
269
|
-
weeks.push(week);
|
|
270
|
-
for (let dayIdx = 0; dayIdx < DAYS_IN_WEEK_COUNT; dayIdx++) {
|
|
271
|
-
if ((this.hiddenDays || []).indexOf(date.getDay()) === -1) {
|
|
272
|
-
week.push(date);
|
|
273
|
-
}
|
|
274
|
-
date = addDays(date, 1);
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
return weeks;
|
|
278
|
-
}
|
|
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 });
|
|
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: [
|
|
281
|
-
MonthSlotService
|
|
282
|
-
], viewQueries: [{ propertyName: "eventElements", predicate: MonthViewItemComponent, descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `
|
|
283
|
-
<table class="k-scheduler-layout k-scheduler-monthview">
|
|
284
|
-
<tbody>
|
|
285
|
-
<tr class="k-scheduler-head">
|
|
286
|
-
@if (verticalResources.length) {
|
|
287
|
-
<td>
|
|
288
|
-
@if (verticalResources.length) {
|
|
289
|
-
<div class="k-scheduler-times" #timesHeader>
|
|
290
|
-
<table class="k-scheduler-table" aria-hidden="true">
|
|
291
|
-
<tbody>
|
|
292
|
-
<tr>
|
|
293
|
-
<th class="k-scheduler-cell k-heading-cell"></th>
|
|
294
|
-
</tr>
|
|
295
|
-
</tbody>
|
|
296
|
-
</table>
|
|
297
|
-
</div>
|
|
298
|
-
}
|
|
299
|
-
</td>
|
|
300
|
-
}
|
|
301
|
-
<td>
|
|
302
|
-
<div class="k-scheduler-header" #header>
|
|
303
|
-
<div class="k-scheduler-header-wrap" #headerWrap>
|
|
304
|
-
<!-- Days of the weeks titles -->
|
|
305
|
-
<table class="k-scheduler-table" aria-hidden="true">
|
|
306
|
-
<tbody>
|
|
307
|
-
@for (resource of horizontalResources; track itemIndex(resourceIndex, resource); let resourceIndex = $index) {
|
|
308
|
-
<tr>
|
|
309
|
-
@for (item of horizontalResources | resourceIterator : resourceIndex; track itemIndex($index, item)) {
|
|
310
|
-
<th
|
|
311
|
-
class="k-scheduler-cell k-heading-cell" [attr.colspan]="horizontalColspan(resourceIndex)">
|
|
312
|
-
@if (!groupHeaderTemplateRef) {
|
|
313
|
-
{{ getField(item, resource.textField) }}
|
|
314
|
-
}
|
|
315
|
-
@if (groupHeaderTemplateRef) {
|
|
316
|
-
<ng-container [ngTemplateOutlet]="groupHeaderTemplateRef" [ngTemplateOutletContext]="{ resource: item }"></ng-container>
|
|
317
|
-
}
|
|
318
|
-
</th>
|
|
319
|
-
}
|
|
320
|
-
</tr>
|
|
321
|
-
}
|
|
322
|
-
<tr>
|
|
323
|
-
@for (resource of horizontalResources | resourceIterator; track itemIndex($index, resource)) {
|
|
324
|
-
@for (day of weeks[0]; track itemIndex($index, day)) {
|
|
325
|
-
<th class="k-scheduler-cell k-heading-cell">
|
|
326
|
-
{{ day | kendoDate: 'EEEE' }}
|
|
327
|
-
</th>
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
</tr>
|
|
331
|
-
</tbody>
|
|
332
|
-
</table>
|
|
333
|
-
</div>
|
|
334
|
-
</div>
|
|
335
|
-
</td>
|
|
336
|
-
</tr>
|
|
337
|
-
<tr class="k-scheduler-body">
|
|
338
|
-
@if (verticalResources.length) {
|
|
339
|
-
<td>
|
|
340
|
-
<div class="k-scheduler-times k-scheduler-resources" #times>
|
|
341
|
-
<table class="k-scheduler-table" #timesTable aria-hidden="true">
|
|
342
|
-
<tbody>
|
|
343
|
-
@for (resourceItem of verticalResources | resourceIterator; track itemIndex(leafIndex, resourceItem); let leafIndex = $index) {
|
|
344
|
-
<tr>
|
|
345
|
-
@for (resource of verticalResources; track itemIndex(resourceIndex, resource); let resourceIndex = $index) {
|
|
346
|
-
@if (verticalItem(leafIndex, resourceIndex)) {
|
|
347
|
-
<th [attr.rowspan]="verticalRowspan(resourceIndex)" class="k-slot-cell k-heading-cell" [ngClass]="{ 'k-last-resource': resourceIndex === verticalResources.length - 1 }">
|
|
348
|
-
@if (!groupHeaderTemplateRef) {
|
|
349
|
-
{{ getField(verticalItem(leafIndex, resourceIndex), resource.textField) }}
|
|
350
|
-
}
|
|
351
|
-
@if (groupHeaderTemplateRef) {
|
|
352
|
-
<ng-container [ngTemplateOutlet]="groupHeaderTemplateRef"
|
|
353
|
-
[ngTemplateOutletContext]="{ resource: verticalItem(leafIndex, resourceIndex) }"></ng-container>
|
|
354
|
-
}
|
|
355
|
-
</th>
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
<th class="k-slot-cell k-heading-cell k-empty-slot">
|
|
359
|
-
</th>
|
|
360
|
-
</tr>
|
|
361
|
-
@for (index of (numberOfWeeks - 1) | repeat; track itemIndex($index, index)) {
|
|
362
|
-
<tr>
|
|
363
|
-
<th class="k-slot-cell k-heading-cell k-empty-slot"></th>
|
|
364
|
-
</tr>
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
</tbody>
|
|
368
|
-
</table>
|
|
369
|
-
</div>
|
|
370
|
-
</td>
|
|
371
|
-
}
|
|
372
|
-
<td>
|
|
373
|
-
<div
|
|
374
|
-
class="k-scheduler-content"
|
|
375
|
-
tabindex="0"
|
|
376
|
-
#content
|
|
377
|
-
role="group"
|
|
378
|
-
[attr.aria-owns]="matchOwned(items | async)"
|
|
379
|
-
[style.overflowY]="'auto'">
|
|
380
|
-
<!-- Main content -->
|
|
381
|
-
<table class="k-scheduler-table" [class.k-scheduler-table-auto]="adaptiveSlotHeight" #contentTable role="presentation">
|
|
382
|
-
<tbody>
|
|
383
|
-
@for (resourceItem of verticalResources | resourceIterator; track itemIndex(verticalIndex, resourceItem); let verticalIndex = $index) {
|
|
384
|
-
@for (week of weeks; track itemIndex(rangeIndex, week); let rangeIndex = $index) {
|
|
385
|
-
<tr>
|
|
386
|
-
@for (resource of horizontalResources | resourceIterator; track itemIndex(horizontalIndex, resource); let horizontalIndex = $index) {
|
|
387
|
-
@for (day of week; track itemIndex(index, day); let index = $index) {
|
|
388
|
-
<td
|
|
389
|
-
[monthSlot]="day"
|
|
390
|
-
[eventHeight]="eventHeight"
|
|
391
|
-
[eventsPerDay]="eventsPerDay"
|
|
392
|
-
[adaptiveSlotHeight]="adaptiveSlotHeight"
|
|
393
|
-
[monthDaySlotTemplateRef]="monthDaySlotTemplateRef"
|
|
394
|
-
[resourcesByIndex]="resourcesByIndex(verticalResources.length ? verticalIndex : horizontalIndex)"
|
|
395
|
-
[ngClass]="daySlotClass(day, verticalResources.length ? verticalIndex : horizontalIndex)"
|
|
396
|
-
[id]="{ resourceIndex: verticalResources.length ? verticalIndex : horizontalIndex, rangeIndex: rangeIndex, index: index }"
|
|
397
|
-
[title]="cellTitle(day)"
|
|
398
|
-
[class.k-selected]="isSlotSelected({
|
|
399
|
-
start: toPlainDate(day),
|
|
400
|
-
end: addDay(toPlainDate(day)),
|
|
401
|
-
isAllDay: true,
|
|
402
|
-
resources: resourcesByIndex(verticalResources.length ? verticalIndex : horizontalIndex)
|
|
403
|
-
})"
|
|
404
|
-
class="k-scheduler-cell"
|
|
405
|
-
[class.k-other-month]="isDayInPreviousMonth(day) || isDayInNextMonth(day)"
|
|
406
|
-
>
|
|
407
|
-
</td>
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
</tr>
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
</tbody>
|
|
414
|
-
</table>
|
|
415
|
-
@for (item of items | async; track itemIndex($index, item)) {
|
|
416
|
-
@for (itemResource of item.resources; track itemIndex($index, itemResource)) {
|
|
417
|
-
<div
|
|
418
|
-
[ngClass]="getEventClasses(item, itemResource.resources)"
|
|
419
|
-
[ngStyle]="getEventStyles(item, itemResource)"
|
|
420
|
-
role="button"
|
|
421
|
-
[kendoSchedulerFocusIndex]="itemResource.leafIdx"
|
|
422
|
-
[id]="item.elementId + '_' + itemResource.leafIdx"
|
|
423
|
-
monthViewItem
|
|
424
|
-
[editable]="editable"
|
|
425
|
-
[item]="item"
|
|
426
|
-
[index]="item.index"
|
|
427
|
-
[rangeIndex]="item.rangeIndex"
|
|
428
|
-
[eventTemplate]="eventTemplateRef"
|
|
429
|
-
[resources]="itemResource.resources"
|
|
430
|
-
[resourceIndex]="itemResource.leafIdx">
|
|
431
|
-
</div>
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
<kendo-hint-container #hintContainer>
|
|
435
|
-
<ng-template>
|
|
436
|
-
@for (hint of dragHints; track itemIndex($index, hint)) {
|
|
437
|
-
<div
|
|
438
|
-
class="k-event-drag-hint"
|
|
439
|
-
monthViewItem
|
|
440
|
-
[ngStyle]="hint.style"
|
|
441
|
-
[ngClass]="hint.class"
|
|
442
|
-
[dragHint]="true"
|
|
443
|
-
[eventTemplate]="eventTemplateRef"
|
|
444
|
-
[item]="hint.item"
|
|
445
|
-
[resources]="hint.resources">
|
|
446
|
-
</div>
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
@for (hint of resizeHints; track itemIndex($index, hint)) {
|
|
450
|
-
<div
|
|
451
|
-
kendoResizeHint
|
|
452
|
-
[hint]="hint"
|
|
453
|
-
[ngClass]="hint.class"
|
|
454
|
-
[format]="resizeHintFormat">
|
|
455
|
-
</div>
|
|
456
|
-
}
|
|
457
|
-
</ng-template>
|
|
458
|
-
</kendo-hint-container>
|
|
459
|
-
</div>
|
|
460
|
-
</td>
|
|
461
|
-
</tr>
|
|
462
|
-
</tbody>
|
|
463
|
-
</table>
|
|
464
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MonthSlotComponent, selector: "[monthSlot]", inputs: ["resourcesByIndex", "monthDaySlotTemplateRef", "eventsPerDay", "eventHeight", "adaptiveSlotHeight", "monthSlot"] }, { kind: "component", type: MonthViewItemComponent, selector: "[monthViewItem]" }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: FocusableDirective, selector: "[kendoSchedulerFocusIndex]", inputs: ["kendoSchedulerFocusIndex", "containerType"] }, { kind: "component", type: HintContainerComponent, selector: "kendo-hint-container" }, { kind: "component", type: ResizeHintComponent, selector: "[kendoResizeHint]", inputs: ["hint", "format"] }, { kind: "pipe", type: RepeatPipe, name: "repeat" }, { kind: "pipe", type: ResourceIteratorPipe, name: "resourceIterator" }, { kind: "pipe", type: DatePipe, name: "kendoDate" }, { kind: "pipe", type: AsyncPipe, name: "async" }] });
|
|
465
|
-
}
|
|
466
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MonthViewRendererComponent, decorators: [{
|
|
467
|
-
type: Component,
|
|
468
|
-
args: [{
|
|
469
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
|
470
|
-
selector: 'month-view',
|
|
471
|
-
providers: [
|
|
472
|
-
MonthSlotService
|
|
473
|
-
],
|
|
474
|
-
template: `
|
|
475
|
-
<table class="k-scheduler-layout k-scheduler-monthview">
|
|
476
|
-
<tbody>
|
|
477
|
-
<tr class="k-scheduler-head">
|
|
478
|
-
@if (verticalResources.length) {
|
|
479
|
-
<td>
|
|
480
|
-
@if (verticalResources.length) {
|
|
481
|
-
<div class="k-scheduler-times" #timesHeader>
|
|
482
|
-
<table class="k-scheduler-table" aria-hidden="true">
|
|
483
|
-
<tbody>
|
|
484
|
-
<tr>
|
|
485
|
-
<th class="k-scheduler-cell k-heading-cell"></th>
|
|
486
|
-
</tr>
|
|
487
|
-
</tbody>
|
|
488
|
-
</table>
|
|
489
|
-
</div>
|
|
490
|
-
}
|
|
491
|
-
</td>
|
|
492
|
-
}
|
|
493
|
-
<td>
|
|
494
|
-
<div class="k-scheduler-header" #header>
|
|
495
|
-
<div class="k-scheduler-header-wrap" #headerWrap>
|
|
496
|
-
<!-- Days of the weeks titles -->
|
|
497
|
-
<table class="k-scheduler-table" aria-hidden="true">
|
|
498
|
-
<tbody>
|
|
499
|
-
@for (resource of horizontalResources; track itemIndex(resourceIndex, resource); let resourceIndex = $index) {
|
|
500
|
-
<tr>
|
|
501
|
-
@for (item of horizontalResources | resourceIterator : resourceIndex; track itemIndex($index, item)) {
|
|
502
|
-
<th
|
|
503
|
-
class="k-scheduler-cell k-heading-cell" [attr.colspan]="horizontalColspan(resourceIndex)">
|
|
504
|
-
@if (!groupHeaderTemplateRef) {
|
|
505
|
-
{{ getField(item, resource.textField) }}
|
|
506
|
-
}
|
|
507
|
-
@if (groupHeaderTemplateRef) {
|
|
508
|
-
<ng-container [ngTemplateOutlet]="groupHeaderTemplateRef" [ngTemplateOutletContext]="{ resource: item }"></ng-container>
|
|
509
|
-
}
|
|
510
|
-
</th>
|
|
511
|
-
}
|
|
512
|
-
</tr>
|
|
513
|
-
}
|
|
514
|
-
<tr>
|
|
515
|
-
@for (resource of horizontalResources | resourceIterator; track itemIndex($index, resource)) {
|
|
516
|
-
@for (day of weeks[0]; track itemIndex($index, day)) {
|
|
517
|
-
<th class="k-scheduler-cell k-heading-cell">
|
|
518
|
-
{{ day | kendoDate: 'EEEE' }}
|
|
519
|
-
</th>
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
</tr>
|
|
523
|
-
</tbody>
|
|
524
|
-
</table>
|
|
525
|
-
</div>
|
|
526
|
-
</div>
|
|
527
|
-
</td>
|
|
528
|
-
</tr>
|
|
529
|
-
<tr class="k-scheduler-body">
|
|
530
|
-
@if (verticalResources.length) {
|
|
531
|
-
<td>
|
|
532
|
-
<div class="k-scheduler-times k-scheduler-resources" #times>
|
|
533
|
-
<table class="k-scheduler-table" #timesTable aria-hidden="true">
|
|
534
|
-
<tbody>
|
|
535
|
-
@for (resourceItem of verticalResources | resourceIterator; track itemIndex(leafIndex, resourceItem); let leafIndex = $index) {
|
|
536
|
-
<tr>
|
|
537
|
-
@for (resource of verticalResources; track itemIndex(resourceIndex, resource); let resourceIndex = $index) {
|
|
538
|
-
@if (verticalItem(leafIndex, resourceIndex)) {
|
|
539
|
-
<th [attr.rowspan]="verticalRowspan(resourceIndex)" class="k-slot-cell k-heading-cell" [ngClass]="{ 'k-last-resource': resourceIndex === verticalResources.length - 1 }">
|
|
540
|
-
@if (!groupHeaderTemplateRef) {
|
|
541
|
-
{{ getField(verticalItem(leafIndex, resourceIndex), resource.textField) }}
|
|
542
|
-
}
|
|
543
|
-
@if (groupHeaderTemplateRef) {
|
|
544
|
-
<ng-container [ngTemplateOutlet]="groupHeaderTemplateRef"
|
|
545
|
-
[ngTemplateOutletContext]="{ resource: verticalItem(leafIndex, resourceIndex) }"></ng-container>
|
|
546
|
-
}
|
|
547
|
-
</th>
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
<th class="k-slot-cell k-heading-cell k-empty-slot">
|
|
551
|
-
</th>
|
|
552
|
-
</tr>
|
|
553
|
-
@for (index of (numberOfWeeks - 1) | repeat; track itemIndex($index, index)) {
|
|
554
|
-
<tr>
|
|
555
|
-
<th class="k-slot-cell k-heading-cell k-empty-slot"></th>
|
|
556
|
-
</tr>
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
</tbody>
|
|
560
|
-
</table>
|
|
561
|
-
</div>
|
|
562
|
-
</td>
|
|
563
|
-
}
|
|
564
|
-
<td>
|
|
565
|
-
<div
|
|
566
|
-
class="k-scheduler-content"
|
|
567
|
-
tabindex="0"
|
|
568
|
-
#content
|
|
569
|
-
role="group"
|
|
570
|
-
[attr.aria-owns]="matchOwned(items | async)"
|
|
571
|
-
[style.overflowY]="'auto'">
|
|
572
|
-
<!-- Main content -->
|
|
573
|
-
<table class="k-scheduler-table" [class.k-scheduler-table-auto]="adaptiveSlotHeight" #contentTable role="presentation">
|
|
574
|
-
<tbody>
|
|
575
|
-
@for (resourceItem of verticalResources | resourceIterator; track itemIndex(verticalIndex, resourceItem); let verticalIndex = $index) {
|
|
576
|
-
@for (week of weeks; track itemIndex(rangeIndex, week); let rangeIndex = $index) {
|
|
577
|
-
<tr>
|
|
578
|
-
@for (resource of horizontalResources | resourceIterator; track itemIndex(horizontalIndex, resource); let horizontalIndex = $index) {
|
|
579
|
-
@for (day of week; track itemIndex(index, day); let index = $index) {
|
|
580
|
-
<td
|
|
581
|
-
[monthSlot]="day"
|
|
582
|
-
[eventHeight]="eventHeight"
|
|
583
|
-
[eventsPerDay]="eventsPerDay"
|
|
584
|
-
[adaptiveSlotHeight]="adaptiveSlotHeight"
|
|
585
|
-
[monthDaySlotTemplateRef]="monthDaySlotTemplateRef"
|
|
586
|
-
[resourcesByIndex]="resourcesByIndex(verticalResources.length ? verticalIndex : horizontalIndex)"
|
|
587
|
-
[ngClass]="daySlotClass(day, verticalResources.length ? verticalIndex : horizontalIndex)"
|
|
588
|
-
[id]="{ resourceIndex: verticalResources.length ? verticalIndex : horizontalIndex, rangeIndex: rangeIndex, index: index }"
|
|
589
|
-
[title]="cellTitle(day)"
|
|
590
|
-
[class.k-selected]="isSlotSelected({
|
|
591
|
-
start: toPlainDate(day),
|
|
592
|
-
end: addDay(toPlainDate(day)),
|
|
593
|
-
isAllDay: true,
|
|
594
|
-
resources: resourcesByIndex(verticalResources.length ? verticalIndex : horizontalIndex)
|
|
595
|
-
})"
|
|
596
|
-
class="k-scheduler-cell"
|
|
597
|
-
[class.k-other-month]="isDayInPreviousMonth(day) || isDayInNextMonth(day)"
|
|
598
|
-
>
|
|
599
|
-
</td>
|
|
600
|
-
}
|
|
601
|
-
}
|
|
602
|
-
</tr>
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
</tbody>
|
|
606
|
-
</table>
|
|
607
|
-
@for (item of items | async; track itemIndex($index, item)) {
|
|
608
|
-
@for (itemResource of item.resources; track itemIndex($index, itemResource)) {
|
|
609
|
-
<div
|
|
610
|
-
[ngClass]="getEventClasses(item, itemResource.resources)"
|
|
611
|
-
[ngStyle]="getEventStyles(item, itemResource)"
|
|
612
|
-
role="button"
|
|
613
|
-
[kendoSchedulerFocusIndex]="itemResource.leafIdx"
|
|
614
|
-
[id]="item.elementId + '_' + itemResource.leafIdx"
|
|
615
|
-
monthViewItem
|
|
616
|
-
[editable]="editable"
|
|
617
|
-
[item]="item"
|
|
618
|
-
[index]="item.index"
|
|
619
|
-
[rangeIndex]="item.rangeIndex"
|
|
620
|
-
[eventTemplate]="eventTemplateRef"
|
|
621
|
-
[resources]="itemResource.resources"
|
|
622
|
-
[resourceIndex]="itemResource.leafIdx">
|
|
623
|
-
</div>
|
|
624
|
-
}
|
|
625
|
-
}
|
|
626
|
-
<kendo-hint-container #hintContainer>
|
|
627
|
-
<ng-template>
|
|
628
|
-
@for (hint of dragHints; track itemIndex($index, hint)) {
|
|
629
|
-
<div
|
|
630
|
-
class="k-event-drag-hint"
|
|
631
|
-
monthViewItem
|
|
632
|
-
[ngStyle]="hint.style"
|
|
633
|
-
[ngClass]="hint.class"
|
|
634
|
-
[dragHint]="true"
|
|
635
|
-
[eventTemplate]="eventTemplateRef"
|
|
636
|
-
[item]="hint.item"
|
|
637
|
-
[resources]="hint.resources">
|
|
638
|
-
</div>
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
@for (hint of resizeHints; track itemIndex($index, hint)) {
|
|
642
|
-
<div
|
|
643
|
-
kendoResizeHint
|
|
644
|
-
[hint]="hint"
|
|
645
|
-
[ngClass]="hint.class"
|
|
646
|
-
[format]="resizeHintFormat">
|
|
647
|
-
</div>
|
|
648
|
-
}
|
|
649
|
-
</ng-template>
|
|
650
|
-
</kendo-hint-container>
|
|
651
|
-
</div>
|
|
652
|
-
</td>
|
|
653
|
-
</tr>
|
|
654
|
-
</tbody>
|
|
655
|
-
</table>
|
|
656
|
-
`,
|
|
657
|
-
standalone: true,
|
|
658
|
-
imports: [NgTemplateOutlet, NgClass, MonthSlotComponent, MonthViewItemComponent, NgStyle, FocusableDirective, HintContainerComponent, ResizeHintComponent, RepeatPipe, ResourceIteratorPipe, DatePipe, AsyncPipe]
|
|
659
|
-
}]
|
|
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: [{
|
|
663
|
-
type: Input
|
|
664
|
-
}], highlightOngoingEvents: [{
|
|
665
|
-
type: Input
|
|
666
|
-
}], type: [{
|
|
667
|
-
type: Input
|
|
668
|
-
}], eventsPerDay: [{
|
|
669
|
-
type: Input
|
|
670
|
-
}], adaptiveSlotHeight: [{
|
|
671
|
-
type: Input
|
|
672
|
-
}], numberOfWeeks: [{
|
|
673
|
-
type: Input
|
|
674
|
-
}], newRange: [{
|
|
675
|
-
type: Input
|
|
676
|
-
}], dateRangeFn: [{
|
|
677
|
-
type: Input
|
|
678
|
-
}], moreEventsClick: [{
|
|
679
|
-
type: Output
|
|
680
|
-
}], eventElements: [{
|
|
681
|
-
type: ViewChildren,
|
|
682
|
-
args: [MonthViewItemComponent]
|
|
683
|
-
}] } });
|