@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.
Files changed (197) hide show
  1. package/editing/recurrence/localization/messages.d.ts +1 -1
  2. package/editing/resource-editor-base.d.ts +1 -1
  3. package/editing-directives/editing-directive-base.d.ts +1 -1
  4. package/fesm2022/progress-kendo-angular-scheduler.mjs +313 -313
  5. package/localization/messages.d.ts +1 -1
  6. package/package.json +20 -28
  7. package/schematics/ngAdd/index.js +3 -3
  8. package/views/common/base-view.d.ts +1 -1
  9. package/views/common/configuration-view-base.d.ts +1 -1
  10. package/views/day-time/day-time-view-base.d.ts +1 -1
  11. package/views/day-time/day-time-view.component.d.ts +1 -1
  12. package/views/multi-day/multi-day-view-base.d.ts +1 -1
  13. package/views/timeline/timeline-base.d.ts +1 -1
  14. package/views/view-items/base-slot.directive.d.ts +1 -1
  15. package/views/view-items/base-view-item.d.ts +1 -1
  16. package/esm2022/common/constants.mjs +0 -8
  17. package/esm2022/common/default-model-fields.mjs +0 -20
  18. package/esm2022/common/dom-queries.mjs +0 -107
  19. package/esm2022/common/modifiers.mjs +0 -31
  20. package/esm2022/common/util.mjs +0 -227
  21. package/esm2022/data-binding.directive.mjs +0 -162
  22. package/esm2022/directives.mjs +0 -136
  23. package/esm2022/editing/date-time-picker.component.mjs +0 -190
  24. package/esm2022/editing/dialogs.service.mjs +0 -96
  25. package/esm2022/editing/edit-dialog-template.directive.mjs +0 -53
  26. package/esm2022/editing/edit-dialog.component.mjs +0 -679
  27. package/esm2022/editing/edit.service.mjs +0 -107
  28. package/esm2022/editing/local-data-changes.service.mjs +0 -18
  29. package/esm2022/editing/recurrence/end-rule-radio-button.directive.mjs +0 -77
  30. package/esm2022/editing/recurrence/localization/custom-messages.component.mjs +0 -44
  31. package/esm2022/editing/recurrence/localization/localized-messages.directive.mjs +0 -39
  32. package/esm2022/editing/recurrence/localization/messages.mjs +0 -239
  33. package/esm2022/editing/recurrence/localization/recurrence-localization.service.mjs +0 -47
  34. package/esm2022/editing/recurrence/recurrence-editor.component.mjs +0 -497
  35. package/esm2022/editing/recurrence/recurrence-end-rule-editor.component.mjs +0 -334
  36. package/esm2022/editing/recurrence/recurrence-frequency-editor.component.mjs +0 -105
  37. package/esm2022/editing/recurrence/recurrence-interval-editor.component.mjs +0 -169
  38. package/esm2022/editing/recurrence/recurrence-monthly-yearly-editor.component.mjs +0 -468
  39. package/esm2022/editing/recurrence/recurrence-weekday-rule-editor.component.mjs +0 -138
  40. package/esm2022/editing/recurrence/recurrence.service.mjs +0 -254
  41. package/esm2022/editing/recurrence/repeat-on-radio-button.directive.mjs +0 -81
  42. package/esm2022/editing/resource-editor-base.mjs +0 -59
  43. package/esm2022/editing/resource-multiple-editor.component.mjs +0 -101
  44. package/esm2022/editing/resource-single-editor.component.mjs +0 -82
  45. package/esm2022/editing/timezone-editor.component.mjs +0 -193
  46. package/esm2022/editing-directives/base-edit.service.mjs +0 -320
  47. package/esm2022/editing-directives/edit-service.interface.mjs +0 -5
  48. package/esm2022/editing-directives/editing-directive-base.mjs +0 -242
  49. package/esm2022/editing-directives/local-edit.service.mjs +0 -122
  50. package/esm2022/editing-directives/reactive-editing.directive.mjs +0 -132
  51. package/esm2022/editing-directives/utils.mjs +0 -107
  52. package/esm2022/events/add-event.mjs +0 -26
  53. package/esm2022/events/cancel-event.mjs +0 -14
  54. package/esm2022/events/create-event.mjs +0 -40
  55. package/esm2022/events/date-change-event.mjs +0 -29
  56. package/esm2022/events/drag-end-event.mjs +0 -46
  57. package/esm2022/events/drag-event.mjs +0 -54
  58. package/esm2022/events/drag-start-event.mjs +0 -30
  59. package/esm2022/events/edit-event-base.mjs +0 -32
  60. package/esm2022/events/edit-event.mjs +0 -30
  61. package/esm2022/events/event-click-event.mjs +0 -32
  62. package/esm2022/events/event-keydown-event.mjs +0 -28
  63. package/esm2022/events/more-events-click.mjs +0 -24
  64. package/esm2022/events/navigate-event.mjs +0 -26
  65. package/esm2022/events/preventable-event.mjs +0 -28
  66. package/esm2022/events/remove-event.mjs +0 -30
  67. package/esm2022/events/resize-end-event.mjs +0 -38
  68. package/esm2022/events/resize-event.mjs +0 -46
  69. package/esm2022/events/resize-start-event.mjs +0 -30
  70. package/esm2022/events/save-event.mjs +0 -18
  71. package/esm2022/events/slot-click-event.mjs +0 -44
  72. package/esm2022/events/slot-drag-end-event.mjs +0 -10
  73. package/esm2022/events/slot-drag-event.mjs +0 -40
  74. package/esm2022/events/slot-drag-start-event.mjs +0 -44
  75. package/esm2022/events/view-event-map.mjs +0 -35
  76. package/esm2022/events.mjs +0 -27
  77. package/esm2022/index.mjs +0 -83
  78. package/esm2022/loading.component.mjs +0 -52
  79. package/esm2022/localization/custom-messages.component.mjs +0 -56
  80. package/esm2022/localization/localized-messages.directive.mjs +0 -39
  81. package/esm2022/localization/messages.mjs +0 -614
  82. package/esm2022/localization/scheduler-localization.service.mjs +0 -31
  83. package/esm2022/navigation/focus-position.interface.mjs +0 -5
  84. package/esm2022/navigation/focus.service.mjs +0 -202
  85. package/esm2022/navigation/focusable-element.interface.mjs +0 -5
  86. package/esm2022/navigation/focusable.directive.mjs +0 -98
  87. package/esm2022/navigation/shortcuts.directive.mjs +0 -239
  88. package/esm2022/navigation.mjs +0 -6
  89. package/esm2022/package-metadata.mjs +0 -16
  90. package/esm2022/pdf/pdf-command.directive.mjs +0 -96
  91. package/esm2022/pdf/pdf-export-event.mjs +0 -10
  92. package/esm2022/pdf/pdf.component.mjs +0 -241
  93. package/esm2022/pdf/pdf.module.mjs +0 -42
  94. package/esm2022/pdf/pdf.service.mjs +0 -36
  95. package/esm2022/progress-kendo-angular-scheduler.mjs +0 -8
  96. package/esm2022/scheduler.component.mjs +0 -1981
  97. package/esm2022/scheduler.module.mjs +0 -138
  98. package/esm2022/toolbar/navigation.component.mjs +0 -391
  99. package/esm2022/toolbar/toolbar-context.mjs +0 -5
  100. package/esm2022/toolbar/toolbar-template.directive.mjs +0 -50
  101. package/esm2022/toolbar/toolbar.component.mjs +0 -168
  102. package/esm2022/toolbar/toolbar.service.mjs +0 -46
  103. package/esm2022/toolbar/view-selector.component.mjs +0 -181
  104. package/esm2022/types/actions.mjs +0 -5
  105. package/esm2022/types/create-form-group-args.interface.mjs +0 -5
  106. package/esm2022/types/crud-operation.enum.mjs +0 -18
  107. package/esm2022/types/current-time-settings.interface.mjs +0 -5
  108. package/esm2022/types/date-range.interface.mjs +0 -5
  109. package/esm2022/types/datepicker-options.interface.mjs +0 -5
  110. package/esm2022/types/edit-event-args.interface.mjs +0 -5
  111. package/esm2022/types/edit-mode.enum.mjs +0 -23
  112. package/esm2022/types/editable-settings.interface.mjs +0 -5
  113. package/esm2022/types/event-style-args.interface.mjs +0 -5
  114. package/esm2022/types/focusable-container.mjs +0 -5
  115. package/esm2022/types/group.interface.mjs +0 -5
  116. package/esm2022/types/numeric-options.interface.mjs +0 -5
  117. package/esm2022/types/ongoing-events-settings.interface.mjs +0 -5
  118. package/esm2022/types/resource.interface.mjs +0 -5
  119. package/esm2022/types/scheduler-event.mjs +0 -5
  120. package/esm2022/types/scheduler-model-fields.interface.mjs +0 -5
  121. package/esm2022/types/scheduler-slot.interface.mjs +0 -5
  122. package/esm2022/types/scheduler-view.mjs +0 -9
  123. package/esm2022/types/slot-class-args.interface.mjs +0 -5
  124. package/esm2022/types/slot-selection.mjs +0 -35
  125. package/esm2022/types/view-item.interface.mjs +0 -5
  126. package/esm2022/types.mjs +0 -12
  127. package/esm2022/views/agenda/agenda-header-item.component.mjs +0 -85
  128. package/esm2022/views/agenda/agenda-header.component.mjs +0 -75
  129. package/esm2022/views/agenda/agenda-task-item.component.mjs +0 -137
  130. package/esm2022/views/agenda/agenda-view-internal.component.mjs +0 -424
  131. package/esm2022/views/agenda/agenda-view-list.component.mjs +0 -256
  132. package/esm2022/views/agenda/agenda-view.component.mjs +0 -130
  133. package/esm2022/views/agenda/tasks.collection.mjs +0 -96
  134. package/esm2022/views/agenda/utils.mjs +0 -176
  135. package/esm2022/views/common/base-view.mjs +0 -1099
  136. package/esm2022/views/common/configuration-view-base.mjs +0 -164
  137. package/esm2022/views/common/dom-events.service.mjs +0 -22
  138. package/esm2022/views/common/hint-container.component.mjs +0 -41
  139. package/esm2022/views/common/repeat.pipe.mjs +0 -36
  140. package/esm2022/views/common/resize-hint.component.mjs +0 -97
  141. package/esm2022/views/common/resource-iterator.pipe.mjs +0 -49
  142. package/esm2022/views/common/scheduler-task.mjs +0 -5
  143. package/esm2022/views/common/slot-selectable.directive.mjs +0 -137
  144. package/esm2022/views/common/view-footer.component.mjs +0 -103
  145. package/esm2022/views/common/work-hours-footer.directive.mjs +0 -45
  146. package/esm2022/views/constants.mjs +0 -31
  147. package/esm2022/views/day-time/day-time-slot.service.mjs +0 -633
  148. package/esm2022/views/day-time/day-time-view-base.mjs +0 -244
  149. package/esm2022/views/day-time/day-time-view-item.component.mjs +0 -216
  150. package/esm2022/views/day-time/day-time-view.component.mjs +0 -437
  151. package/esm2022/views/day-time/event-slot.directive.mjs +0 -138
  152. package/esm2022/views/day-time/utils.mjs +0 -32
  153. package/esm2022/views/month/month-slot.component.mjs +0 -166
  154. package/esm2022/views/month/month-slot.service.mjs +0 -404
  155. package/esm2022/views/month/month-view-item.component.mjs +0 -161
  156. package/esm2022/views/month/month-view-renderer.component.mjs +0 -683
  157. package/esm2022/views/month/month-view.component.mjs +0 -203
  158. package/esm2022/views/month/multi-week-view.component.mjs +0 -202
  159. package/esm2022/views/month/utils.mjs +0 -107
  160. package/esm2022/views/multi-day/day-view.component.mjs +0 -186
  161. package/esm2022/views/multi-day/multi-day-view-base.mjs +0 -55
  162. package/esm2022/views/multi-day/multi-day-view-renderer.component.mjs +0 -1002
  163. package/esm2022/views/multi-day/multi-day-view.component.mjs +0 -197
  164. package/esm2022/views/multi-day/utils.mjs +0 -63
  165. package/esm2022/views/multi-day/week-view.component.mjs +0 -189
  166. package/esm2022/views/multi-day/work-week-view.component.mjs +0 -172
  167. package/esm2022/views/scheduler-view.directive.mjs +0 -65
  168. package/esm2022/views/templates/agenda-date-template.directive.mjs +0 -41
  169. package/esm2022/views/templates/agenda-time-template.directive.mjs +0 -46
  170. package/esm2022/views/templates/all-day-event-template.directive.mjs +0 -42
  171. package/esm2022/views/templates/all-day-slot-template.directive.mjs +0 -42
  172. package/esm2022/views/templates/date-header-template.directive.mjs +0 -42
  173. package/esm2022/views/templates/event-template.directive.mjs +0 -42
  174. package/esm2022/views/templates/group-header-template.directive.mjs +0 -42
  175. package/esm2022/views/templates/major-time-header-template.directive.mjs +0 -41
  176. package/esm2022/views/templates/minor-time-header-template.directive.mjs +0 -41
  177. package/esm2022/views/templates/month-day-slot-template.directive.mjs +0 -42
  178. package/esm2022/views/templates/multi-week-day-slot-template.directive.mjs +0 -42
  179. package/esm2022/views/templates/time-slot-template.directive.mjs +0 -43
  180. package/esm2022/views/templates.mjs +0 -16
  181. package/esm2022/views/timeline/timeline-base.mjs +0 -39
  182. package/esm2022/views/timeline/timeline-month-view.component.mjs +0 -211
  183. package/esm2022/views/timeline/timeline-multi-day-view.component.mjs +0 -649
  184. package/esm2022/views/timeline/timeline-view.component.mjs +0 -189
  185. package/esm2022/views/timeline/timeline-week-view.component.mjs +0 -181
  186. package/esm2022/views/timeline/utils.mjs +0 -60
  187. package/esm2022/views/utils.mjs +0 -373
  188. package/esm2022/views/view-context.service.mjs +0 -111
  189. package/esm2022/views/view-items/base-slot.directive.mjs +0 -104
  190. package/esm2022/views/view-items/base-slot.service.mjs +0 -82
  191. package/esm2022/views/view-items/base-view-item.mjs +0 -194
  192. package/esm2022/views/view-items/item-map.mjs +0 -38
  193. package/esm2022/views/view-items/types.mjs +0 -5
  194. package/esm2022/views/view-state.service.mjs +0 -144
  195. package/esm2022/views/year/utils.mjs +0 -60
  196. package/esm2022/views/year/year-view-internal.component.mjs +0 -471
  197. package/esm2022/views/year/year-view.component.mjs +0 -136
@@ -1,471 +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 { ChangeDetectorRef, Component, ElementRef, Input, NgZone, Renderer2, ViewChild, } from '@angular/core';
6
- import { ScrollbarWidthService } from '@progress/kendo-angular-common';
7
- import { ViewContextService } from '../view-context.service';
8
- import { ViewStateService } from '../view-state.service';
9
- import { IntlService } from '@progress/kendo-angular-intl';
10
- import { PDFService } from '../../pdf/pdf.service';
11
- import { LocalizationService } from '@progress/kendo-angular-l10n';
12
- import { addDays, addYears, toLocalDate } from '@progress/kendo-date-math';
13
- import { TooltipDirective } from '@progress/kendo-angular-tooltip';
14
- import { formatEventTime, toUTCDate } from '../utils';
15
- import { caretAltLeftIcon, caretAltRightIcon } from '@progress/kendo-svg-icons';
16
- import { FocusService } from '../../navigation';
17
- import { MultiViewCalendarComponent, MonthCellTemplateDirective } from '@progress/kendo-angular-dateinputs';
18
- import { BaseView } from '../common/base-view';
19
- import { createTasks, noop, yearEnd, yearStart } from './utils';
20
- import { MonthSlotService } from '../month/month-slot.service';
21
- import { IconWrapperComponent } from '@progress/kendo-angular-icons';
22
- import { NgClass, NgStyle } from '@angular/common';
23
- import { take } from 'rxjs/operators';
24
- import * as i0 from "@angular/core";
25
- import * as i1 from "@progress/kendo-angular-l10n";
26
- import * as i2 from "../../navigation";
27
- import * as i3 from "@progress/kendo-angular-intl";
28
- import * as i4 from "../view-context.service";
29
- import * as i5 from "../view-state.service";
30
- import * as i6 from "../../pdf/pdf.service";
31
- import * as i7 from "../month/month-slot.service";
32
- import * as i8 from "@progress/kendo-angular-common";
33
- const today = new Date(Date.now());
34
- const getDateAttribute = (element) => element?.querySelector('span>span[date]')?.getAttribute('date');
35
- /**
36
- * @hidden
37
- */
38
- export class YearViewInternalComponent extends BaseView {
39
- localization;
40
- focusService;
41
- intl;
42
- /**
43
- * Calculates the next or previous range to be displayed
44
- */
45
- newRange;
46
- /**
47
- * Determines the displayed date range and formats the selected date
48
- */
49
- dateRangeFn;
50
- calendar;
51
- tooltip;
52
- get arrowIcons() {
53
- return !this.localization.rtl
54
- ? ['caret-alt-left', 'caret-alt-right']
55
- : ['caret-alt-right', 'caret-alt-left'];
56
- }
57
- get arrowSVGIcons() {
58
- return !this.localization.rtl
59
- ? [this.caretAltLeftIcon, this.caretAltRightIcon]
60
- : [this.caretAltRightIcon, this.caretAltLeftIcon];
61
- }
62
- caretAltLeftIcon = caretAltLeftIcon;
63
- caretAltRightIcon = caretAltRightIcon;
64
- eventsPerSelectedDay = [];
65
- days = [];
66
- focusedDate;
67
- currentTd;
68
- tds = [];
69
- isTooltipClicked = false;
70
- constructor(localization, focusService, intl, viewContext, viewState, zone, renderer, pdfService, element, slotService, scrollBarWidthService, changeDetector) {
71
- super(viewContext, viewState, intl, slotService, zone, renderer, element, pdfService, localization, changeDetector, scrollBarWidthService);
72
- this.localization = localization;
73
- this.focusService = focusService;
74
- this.intl = intl;
75
- }
76
- ngAfterViewInit() {
77
- this.updateTds();
78
- super.ngAfterViewInit();
79
- this.focusedDate = new Date(this.selectedDate.getFullYear(), today.getMonth(), today.getDate());
80
- }
81
- getSlotClass(date) {
82
- if (this.slotClass) {
83
- const slotClassValue = this.slotClass({
84
- start: date,
85
- end: addDays(date, 1),
86
- events: this.eventsPerDay(date),
87
- });
88
- return this.convertNgClassBindings(slotClassValue);
89
- }
90
- return [];
91
- }
92
- getEventClasses(item, resources, isAllDay) {
93
- if (this.eventClass) {
94
- return this.eventClass({
95
- event: item.event,
96
- resources,
97
- isAllDay,
98
- });
99
- }
100
- }
101
- onBlur() {
102
- if (!this.isTooltipClicked) {
103
- this.tooltip.hide();
104
- }
105
- this.isTooltipClicked = false;
106
- }
107
- getDate(element) {
108
- return new Date(getDateAttribute(element.nativeElement));
109
- }
110
- eventTitle(event) {
111
- const startTime = toLocalDate(event.startTime);
112
- const endTime = toLocalDate(event.endTime);
113
- const time = formatEventTime(startTime, endTime, event.isAllDay, this.intl.localeId);
114
- return `${time}, ${event.event.title}`;
115
- }
116
- onClick(event) {
117
- if (event.target.tagName === 'SPAN') {
118
- const clickedDate = getDateAttribute(event.target.closest('td.k-calendar-td'));
119
- if (clickedDate === getDateAttribute(this.currentTd)) {
120
- this.tooltip.show(this.currentTd);
121
- }
122
- }
123
- else {
124
- this.tooltip.hide();
125
- }
126
- }
127
- onMouseDown() {
128
- this.isTooltipClicked = true;
129
- }
130
- onKeydown(event) {
131
- if (event.key === 'Backspace' || event.key === 'Delete') {
132
- this.tooltip.hide();
133
- }
134
- if (event.key === 'Enter' && !this.tooltip.popupRef) {
135
- this.tooltip.show(this.currentTd);
136
- return;
137
- }
138
- if (event.key === 'Enter' && this.tooltip.popupRef && (getDateAttribute(this.currentTd) === this.calendar.focusedDate.toString())) {
139
- this.navigateToDay(new Date(getDateAttribute(this.currentTd)));
140
- }
141
- }
142
- navigateToDay(date) {
143
- this.tooltip.hide();
144
- this.zone.run(() => {
145
- this.viewState.navigateTo({ viewName: 'day', date: new Date(date) });
146
- });
147
- }
148
- eventsPerDay(date) {
149
- return this.tasksPerDay(date)?.map((task) => task.event) || [];
150
- }
151
- tasksPerDay(date) {
152
- if (this.resources?.length > 0) {
153
- return this.tasks?.filter((event) => event.resources.length > 0 &&
154
- event.startTime.getUTCDate() === date.getDate() &&
155
- event.startTime.getUTCMonth() === date.getMonth());
156
- }
157
- else {
158
- return this.tasks?.filter((event) => event.startTime.getUTCDate() === date.getDate() && event.startTime.getUTCMonth() === date.getMonth());
159
- }
160
- }
161
- onValueChange(date) {
162
- this.eventsPerSelectedDay = this.tasksPerDay(date);
163
- this.currentTd = this.tds.find((td) => getDateAttribute(td) === date.toString());
164
- if (this.tooltip.popupRef) {
165
- this.tooltip.hide();
166
- }
167
- }
168
- hasEvent(date) {
169
- return this.tasksPerDay(date).length > 0;
170
- }
171
- createPDFElement() {
172
- const element = this.element.nativeElement.cloneNode(true);
173
- element.style.width = `${this.element.nativeElement.offsetWidth}px`;
174
- element.querySelector('.k-scheduler-layout').style.height = 'auto';
175
- this.pdfService.elementReady.emit({
176
- element: element,
177
- });
178
- }
179
- onSelectDate(date) {
180
- const year = date.getFullYear();
181
- const start = yearStart(year);
182
- this.focusedDate = new Date(year, start.getMonth(), today.getDate());
183
- this.selectedDate = start;
184
- const dateRange = this.dateRange(date);
185
- this.viewState.notifyDateRange(dateRange);
186
- this.days = this.createDaySlots(dateRange);
187
- if (this.calendar) {
188
- this.calendar.min = start;
189
- this.calendar.max = yearEnd(start.getFullYear());
190
- // wait for the view to update to get the new tds
191
- this.zone.onStable.pipe(take(1)).subscribe(() => this.updateTds());
192
- }
193
- }
194
- onAction(e) {
195
- const now = this.selectedDate;
196
- if (e.type === 'next' || e.type === 'prev') {
197
- const offset = e.type === 'next' ? 1 : -1;
198
- const next = addYears(now, offset);
199
- this.viewState.notifyNextDate(next);
200
- this.calendar.min = next;
201
- this.calendar.max = yearEnd(next.getFullYear());
202
- this.focusedDate = new Date(next.getFullYear(), today.getMonth(), today.getDate());
203
- }
204
- }
205
- createTasks(items, dateRange) {
206
- this.days = this.createDaySlots(dateRange);
207
- return createTasks(dateRange.start, dateRange.end, items, this.days);
208
- }
209
- reflow() {
210
- this.updateContentHeight();
211
- const content = this.content.nativeElement;
212
- if (this.contentHeight === 'auto') {
213
- // bigger size changes cause the table to overflow the container and in horizontal scrollbars
214
- // this changes the table and slots size during rendering before the browser re-adjusts the 100% table width
215
- content.style.overflow = 'visible';
216
- }
217
- if (this.contentHeight === 'auto') {
218
- content.style.overflow = '';
219
- }
220
- }
221
- dateRange(date = this.selectedDate) {
222
- return this.dateRangeFn(date);
223
- }
224
- onTasksChange() {
225
- this.items.next(this.tasks);
226
- }
227
- slotByIndex = (slotIndex, _args) => noop(slotIndex);
228
- dragHintSize = (startSlot, _endSlot) => noop(startSlot);
229
- dragRanges = (slot) => noop(slot);
230
- slotByPosition = (x, _y, _container) => noop(x);
231
- createDaySlots({ start }) {
232
- const days = [];
233
- const monthsPerYear = 12;
234
- let date = start;
235
- for (let idx = 0; idx < monthsPerYear; idx++) {
236
- const monthTotalDays = this.getLastDayOfMonth(date.getFullYear(), date.getMonth());
237
- for (let dayIdx = 0; dayIdx < monthTotalDays; dayIdx++) {
238
- days.push(date);
239
- const nextDay = addDays(date, 1);
240
- date = nextDay;
241
- }
242
- }
243
- return days;
244
- }
245
- getLastDayOfMonth(year, month) {
246
- return new Date(year, month + 1, 0).getDate();
247
- }
248
- cachedTds = [];
249
- updateTds() {
250
- this.cachedTds.forEach((td) => {
251
- this.renderer.setAttribute(td, 'class', 'k-calendar-td');
252
- });
253
- this.cachedTds = [];
254
- this.tds = Array.from(this.calendar.element.nativeElement.querySelectorAll('.k-calendar-td:not(.k-empty)'));
255
- if (this.calendar.value instanceof Date &&
256
- this.calendar.value.getFullYear() === this.calendar.min?.getFullYear()) {
257
- this.currentTd = this.tds.find((td) => getDateAttribute(td) === this.calendar.value.toString());
258
- }
259
- if (this.slotClass) {
260
- this.tds.forEach((td) => {
261
- const date = toUTCDate(new Date(getDateAttribute(td)));
262
- const userClasses = this.getSlotClass(date);
263
- userClasses.forEach(userClass => {
264
- if (userClass && userClass.trim() !== '') {
265
- this.renderer.addClass(td, userClass);
266
- }
267
- });
268
- this.cachedTds.push(td);
269
- });
270
- }
271
- }
272
- convertNgClassBindings(value) {
273
- if (typeof value === 'string') {
274
- return [value];
275
- }
276
- if (Array.isArray(value)) {
277
- return value;
278
- }
279
- if (value instanceof Set) {
280
- return Array.from(value);
281
- }
282
- if (typeof value === 'object' && value !== null) {
283
- return Object.keys(value).filter(key => value[key]);
284
- }
285
- return [];
286
- }
287
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: YearViewInternalComponent, deps: [{ token: i1.LocalizationService }, { token: i2.FocusService }, { token: i3.IntlService }, { token: i4.ViewContextService }, { token: i5.ViewStateService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i6.PDFService }, { token: i0.ElementRef }, { token: i7.MonthSlotService }, { token: i8.ScrollbarWidthService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
288
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: YearViewInternalComponent, isStandalone: true, selector: "year-view-internal", inputs: { newRange: "newRange", dateRangeFn: "dateRangeFn" }, providers: [MonthSlotService], viewQueries: [{ propertyName: "calendar", first: true, predicate: MultiViewCalendarComponent, descendants: true }, { propertyName: "tooltip", first: true, predicate: TooltipDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: `
289
- <div #content class="k-scheduler-layout k-scheduler-layout-flex k-scheduler-yearview">
290
- <div class="k-scheduler-body">
291
- <kendo-multiviewcalendar
292
- [showOtherMonthDays]="false"
293
- [showCalendarHeader]="false"
294
- [showViewHeader]="true"
295
- [views]="12"
296
- [focusedDate]="focusedDate"
297
- kendoTooltip
298
- filter=".k-calendar-td"
299
- showOn="none"
300
- [tooltipTemplate]="template"
301
- position="right"
302
- tooltipContentClass="k-scheduler-tooltip"
303
- [tooltipWidth]="220"
304
- [collision]="{ horizontal: 'flip', vertical: 'flip' }"
305
- (valueChange)="onValueChange($event)"
306
- (blur)="onBlur()"
307
- >
308
- <ng-template kendoCalendarMonthCellTemplate let-date let-context="cellContext">
309
- @if (!context.isOtherMonth) {
310
- <span [attr.date]="date">{{ date.getDate() }}</span>
311
- }
312
- @if (!context.isOtherMonth && hasEvent(date)) {
313
- <span class="k-day-indicator"></span>
314
- }
315
- </ng-template>
316
- </kendo-multiviewcalendar>
317
- </div>
318
- </div>
319
- <ng-template #template let-anchor>
320
- <div
321
- class="k-tooltip-title k-text-center"
322
- (click)="navigateToDay(getDate(anchor))"
323
- (mousedown)="onMouseDown()"
324
- >
325
- <div class="k-month">{{ intl.formatDate(getDate(anchor), 'MMM') }}</div>
326
- <div class="k-link k-day k-text-primary">{{ intl.formatDate(getDate(anchor), 'dd') }}</div>
327
- </div>
328
- <div class="k-tooltip-events-container" (mousedown)="onMouseDown()">
329
- <div class="k-tooltip-events">
330
- @for (event of eventsPerSelectedDay; track event) {
331
- <div
332
- class="k-tooltip-event k-event"
333
- [title]="eventTitle(event)"
334
- [ngClass]="getEventClasses(event, event.resources)"
335
- [ngStyle]="getEventStyles(event, event.resources[0], event.isAllDay)"
336
- >
337
- @if (event.tail || event.mid) {
338
- <kendo-icon-wrapper
339
- [name]="arrowIcons[0]"
340
- [svgIcon]="arrowSVGIcons[0]"
341
- >
342
- </kendo-icon-wrapper>
343
- }
344
- <div class="k-event-title k-text-ellipsis">{{ event.event.title }}</div>
345
- <span class="k-spacer"></span>
346
- @if ((event.isMultiDay && event.head && !event.isAllDay) || !event.isMultiDay) {
347
- <span
348
- class="k-event-time"
349
- >{{ intl.formatDate(event.start, 't') }}</span
350
- >
351
- }
352
- @if (event.head || event.mid) {
353
- <kendo-icon-wrapper
354
- [name]="arrowIcons[1]"
355
- [svgIcon]="arrowSVGIcons[1]"
356
- >
357
- </kendo-icon-wrapper>
358
- }
359
- </div>
360
- }
361
- </div>
362
- </div>
363
- @if (eventsPerSelectedDay.length === 0) {
364
- <div class="k-no-data k-text-center">
365
- {{ localization.get('yearViewNoEvents') }}
366
- </div>
367
- }
368
- </ng-template>
369
- `, isInline: true, dependencies: [{ kind: "component", type: MultiViewCalendarComponent, selector: "kendo-multiviewcalendar", inputs: ["showOtherMonthDays", "showCalendarHeader", "size", "id", "focusedDate", "footer", "min", "max", "rangeValidation", "disabledDatesRangeValidation", "selection", "allowReverse", "value", "disabled", "tabindex", "tabIndex", "weekDaysFormat", "isActive", "disabledDates", "activeView", "bottomView", "topView", "showViewHeader", "animateNavigation", "weekNumber", "activeRangeEnd", "selectionRange", "views", "orientation", "cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "footerTemplate", "headerTitleTemplate", "headerTemplate"], outputs: ["activeViewChange", "navigate", "cellEnter", "cellLeave", "valueChange", "rangeSelectionChange", "blur", "focus", "focusCalendar", "onClosePopup", "onTabPress", "onShiftTabPress"], exportAs: ["kendo-multiviewcalendar"] }, { kind: "directive", type: TooltipDirective, selector: "[kendoTooltip]", inputs: ["filter", "position", "titleTemplate", "showOn", "showAfter", "callout", "closable", "offset", "tooltipWidth", "tooltipHeight", "tooltipClass", "tooltipContentClass", "collision", "closeTitle", "tooltipTemplate"], exportAs: ["kendoTooltip"] }, { kind: "directive", type: MonthCellTemplateDirective, selector: "[kendoCalendarMonthCellTemplate]" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }] });
370
- }
371
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: YearViewInternalComponent, decorators: [{
372
- type: Component,
373
- args: [{
374
- selector: 'year-view-internal',
375
- providers: [MonthSlotService],
376
- template: `
377
- <div #content class="k-scheduler-layout k-scheduler-layout-flex k-scheduler-yearview">
378
- <div class="k-scheduler-body">
379
- <kendo-multiviewcalendar
380
- [showOtherMonthDays]="false"
381
- [showCalendarHeader]="false"
382
- [showViewHeader]="true"
383
- [views]="12"
384
- [focusedDate]="focusedDate"
385
- kendoTooltip
386
- filter=".k-calendar-td"
387
- showOn="none"
388
- [tooltipTemplate]="template"
389
- position="right"
390
- tooltipContentClass="k-scheduler-tooltip"
391
- [tooltipWidth]="220"
392
- [collision]="{ horizontal: 'flip', vertical: 'flip' }"
393
- (valueChange)="onValueChange($event)"
394
- (blur)="onBlur()"
395
- >
396
- <ng-template kendoCalendarMonthCellTemplate let-date let-context="cellContext">
397
- @if (!context.isOtherMonth) {
398
- <span [attr.date]="date">{{ date.getDate() }}</span>
399
- }
400
- @if (!context.isOtherMonth && hasEvent(date)) {
401
- <span class="k-day-indicator"></span>
402
- }
403
- </ng-template>
404
- </kendo-multiviewcalendar>
405
- </div>
406
- </div>
407
- <ng-template #template let-anchor>
408
- <div
409
- class="k-tooltip-title k-text-center"
410
- (click)="navigateToDay(getDate(anchor))"
411
- (mousedown)="onMouseDown()"
412
- >
413
- <div class="k-month">{{ intl.formatDate(getDate(anchor), 'MMM') }}</div>
414
- <div class="k-link k-day k-text-primary">{{ intl.formatDate(getDate(anchor), 'dd') }}</div>
415
- </div>
416
- <div class="k-tooltip-events-container" (mousedown)="onMouseDown()">
417
- <div class="k-tooltip-events">
418
- @for (event of eventsPerSelectedDay; track event) {
419
- <div
420
- class="k-tooltip-event k-event"
421
- [title]="eventTitle(event)"
422
- [ngClass]="getEventClasses(event, event.resources)"
423
- [ngStyle]="getEventStyles(event, event.resources[0], event.isAllDay)"
424
- >
425
- @if (event.tail || event.mid) {
426
- <kendo-icon-wrapper
427
- [name]="arrowIcons[0]"
428
- [svgIcon]="arrowSVGIcons[0]"
429
- >
430
- </kendo-icon-wrapper>
431
- }
432
- <div class="k-event-title k-text-ellipsis">{{ event.event.title }}</div>
433
- <span class="k-spacer"></span>
434
- @if ((event.isMultiDay && event.head && !event.isAllDay) || !event.isMultiDay) {
435
- <span
436
- class="k-event-time"
437
- >{{ intl.formatDate(event.start, 't') }}</span
438
- >
439
- }
440
- @if (event.head || event.mid) {
441
- <kendo-icon-wrapper
442
- [name]="arrowIcons[1]"
443
- [svgIcon]="arrowSVGIcons[1]"
444
- >
445
- </kendo-icon-wrapper>
446
- }
447
- </div>
448
- }
449
- </div>
450
- </div>
451
- @if (eventsPerSelectedDay.length === 0) {
452
- <div class="k-no-data k-text-center">
453
- {{ localization.get('yearViewNoEvents') }}
454
- </div>
455
- }
456
- </ng-template>
457
- `,
458
- standalone: true,
459
- imports: [MultiViewCalendarComponent, TooltipDirective, MonthCellTemplateDirective, NgClass, NgStyle, IconWrapperComponent]
460
- }]
461
- }], ctorParameters: () => [{ type: i1.LocalizationService }, { type: i2.FocusService }, { type: i3.IntlService }, { type: i4.ViewContextService }, { type: i5.ViewStateService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i6.PDFService }, { type: i0.ElementRef }, { type: i7.MonthSlotService }, { type: i8.ScrollbarWidthService }, { type: i0.ChangeDetectorRef }], propDecorators: { newRange: [{
462
- type: Input
463
- }], dateRangeFn: [{
464
- type: Input
465
- }], calendar: [{
466
- type: ViewChild,
467
- args: [MultiViewCalendarComponent]
468
- }], tooltip: [{
469
- type: ViewChild,
470
- args: [TooltipDirective]
471
- }] } });
@@ -1,136 +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, forwardRef, ChangeDetectionStrategy, ChangeDetectorRef, Input } from '@angular/core';
6
- import { LocalizationService } from '@progress/kendo-angular-l10n';
7
- import { SchedulerView } from '../../types';
8
- import { ViewContextService } from '../view-context.service';
9
- import { ViewStateService } from '../view-state.service';
10
- import { ConfigurationViewBase } from '../common/configuration-view-base';
11
- import { addYears } from '@progress/kendo-date-math';
12
- import { IntlService } from '@progress/kendo-angular-intl';
13
- import { yearEnd, yearStart } from './utils';
14
- import { YearViewInternalComponent } from './year-view-internal.component';
15
- import * as i0 from "@angular/core";
16
- import * as i1 from "@progress/kendo-angular-l10n";
17
- import * as i2 from "../view-context.service";
18
- import * as i3 from "../view-state.service";
19
- import * as i4 from "@progress/kendo-angular-intl";
20
- /**
21
- * Represents the component that renders the **Year** view in the Scheduler.
22
- *
23
- * @example
24
- * ```html
25
- * <kendo-scheduler>
26
- * <kendo-scheduler-year-view></kendo-scheduler-year-view>
27
- * </kendo-scheduler>
28
- * ```
29
- */
30
- export class YearViewComponent extends ConfigurationViewBase {
31
- intl;
32
- /**
33
- * Sets the long-date format for the selected year in the Scheduler toolbar.
34
- * For more information, see [Parsing and Formatting Dates and Numbers](slug:parsingandformatting_intl#date-formatting).
35
- * @default '{0:yyy}'
36
- */
37
- selectedDateFormat = '{0:yyy}';
38
- /**
39
- * Sets the short-date format for the selected year in the Scheduler toolbar.
40
- * For more information, see [Parsing and Formatting Dates and Numbers](slug:parsingandformatting_intl#date-formatting).
41
- * @default '{0:yyy}'
42
- */
43
- selectedShortDateFormat = '{0:yyy}';
44
- /**
45
- * @hidden
46
- */
47
- get title() {
48
- return this.localization.get('yearViewTitle');
49
- }
50
- /**
51
- * @hidden
52
- */
53
- highlightOngoingEvents;
54
- /**
55
- * The invariant name for this view.
56
- * @default 'year'
57
- */
58
- name = 'year';
59
- /**
60
- * @hidden
61
- * Used to override the hiddenDays as this options is not applicable for Year view.
62
- */
63
- set hiddenDays(_hiddenDays) {
64
- // no-op
65
- }
66
- constructor(localization, changeDetector, viewContext, viewState, intl) {
67
- super(localization, changeDetector, viewContext, viewState);
68
- this.intl = intl;
69
- }
70
- /**
71
- * @hidden
72
- */
73
- dateRange(date) {
74
- const year = date.getFullYear();
75
- const start = yearStart(year);
76
- const end = yearEnd(year);
77
- const text = this.intl.format(this.selectedDateFormat, start);
78
- const shortText = this.intl.format(this.selectedShortDateFormat, start);
79
- return { start, end, text, shortText };
80
- }
81
- /**
82
- * @hidden
83
- */
84
- newRange(date, direction = 1) {
85
- return new Date(addYears(date, direction));
86
- }
87
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: YearViewComponent, deps: [{ token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i2.ViewContextService }, { token: i3.ViewStateService }, { token: i4.IntlService }], target: i0.ɵɵFactoryTarget.Component });
88
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: YearViewComponent, isStandalone: true, selector: "kendo-scheduler-year-view", inputs: { selectedDateFormat: "selectedDateFormat", selectedShortDateFormat: "selectedShortDateFormat", highlightOngoingEvents: "highlightOngoingEvents" }, providers: [{
89
- provide: SchedulerView,
90
- useExisting: forwardRef(() => YearViewComponent)
91
- }], usesInheritance: true, ngImport: i0, template: `
92
- <ng-template #content>
93
- <year-view-internal
94
- [selectedDateFormat]="selectedDateFormat"
95
- [selectedShortDateFormat]="selectedShortDateFormat"
96
- [slotClass]="viewSlotClass"
97
- [eventClass]="viewEventClass"
98
- [eventStyles]="viewEventStyles"
99
- [dateRangeFn]="dateRange"
100
- [newRange]="newRange">
101
- </year-view-internal>
102
- </ng-template>
103
- `, isInline: true, dependencies: [{ kind: "component", type: YearViewInternalComponent, selector: "year-view-internal", inputs: ["newRange", "dateRangeFn"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
104
- }
105
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: YearViewComponent, decorators: [{
106
- type: Component,
107
- args: [{
108
- changeDetection: ChangeDetectionStrategy.OnPush,
109
- selector: 'kendo-scheduler-year-view',
110
- providers: [{
111
- provide: SchedulerView,
112
- useExisting: forwardRef(() => YearViewComponent)
113
- }],
114
- template: `
115
- <ng-template #content>
116
- <year-view-internal
117
- [selectedDateFormat]="selectedDateFormat"
118
- [selectedShortDateFormat]="selectedShortDateFormat"
119
- [slotClass]="viewSlotClass"
120
- [eventClass]="viewEventClass"
121
- [eventStyles]="viewEventStyles"
122
- [dateRangeFn]="dateRange"
123
- [newRange]="newRange">
124
- </year-view-internal>
125
- </ng-template>
126
- `,
127
- standalone: true,
128
- imports: [YearViewInternalComponent]
129
- }]
130
- }], ctorParameters: () => [{ type: i1.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: i2.ViewContextService }, { type: i3.ViewStateService }, { type: i4.IntlService }], propDecorators: { selectedDateFormat: [{
131
- type: Input
132
- }], selectedShortDateFormat: [{
133
- type: Input
134
- }], highlightOngoingEvents: [{
135
- type: Input
136
- }] } });