@progress/kendo-angular-dateinputs 21.4.1 → 22.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/calendar/localization/calendar-messages.d.ts +1 -1
  2. package/calendar/localization/multiview-calendar-messages.d.ts +1 -1
  3. package/dateinput/localization/messages.d.ts +1 -1
  4. package/datepicker/localization/messages.d.ts +1 -1
  5. package/daterange/date-range-input.d.ts +1 -1
  6. package/daterange/localization/messages.d.ts +1 -1
  7. package/datetimepicker/localization/messages.d.ts +1 -1
  8. package/fesm2022/progress-kendo-angular-dateinputs.mjs +262 -262
  9. package/package.json +15 -23
  10. package/timepicker/localization/messages.d.ts +1 -1
  11. package/esm2022/calendar/calendar.component.mjs +0 -1711
  12. package/esm2022/calendar/calendar.module.mjs +0 -91
  13. package/esm2022/calendar/calendars.module.mjs +0 -87
  14. package/esm2022/calendar/footer.component.mjs +0 -77
  15. package/esm2022/calendar/for.directive.mjs +0 -116
  16. package/esm2022/calendar/header.component.mjs +0 -367
  17. package/esm2022/calendar/horizontal-view-list.component.mjs +0 -580
  18. package/esm2022/calendar/localization/calendar-custom-messages.component.mjs +0 -51
  19. package/esm2022/calendar/localization/calendar-localized-messages.directive.mjs +0 -39
  20. package/esm2022/calendar/localization/calendar-messages.mjs +0 -45
  21. package/esm2022/calendar/localization/multiview-calendar-custom-messages.component.mjs +0 -51
  22. package/esm2022/calendar/localization/multiview-calendar-localized-messages.directive.mjs +0 -39
  23. package/esm2022/calendar/localization/multiview-calendar-messages.mjs +0 -45
  24. package/esm2022/calendar/models/cell-context.interface.mjs +0 -5
  25. package/esm2022/calendar/models/navigation-action.enum.mjs +0 -20
  26. package/esm2022/calendar/models/orientation.mjs +0 -5
  27. package/esm2022/calendar/models/row-length-options.interface.mjs +0 -5
  28. package/esm2022/calendar/models/scrollable.interface.mjs +0 -5
  29. package/esm2022/calendar/models/selection-range-end.type.mjs +0 -5
  30. package/esm2022/calendar/models/selection-range.interface.mjs +0 -10
  31. package/esm2022/calendar/models/selection.mjs +0 -50
  32. package/esm2022/calendar/models/type.mjs +0 -5
  33. package/esm2022/calendar/models/view-service.interface.mjs +0 -5
  34. package/esm2022/calendar/models/view.enum.mjs +0 -16
  35. package/esm2022/calendar/models/view.type.mjs +0 -5
  36. package/esm2022/calendar/multiview-calendar.component.mjs +0 -1564
  37. package/esm2022/calendar/multiview-calendar.module.mjs +0 -89
  38. package/esm2022/calendar/navigation.component.mjs +0 -230
  39. package/esm2022/calendar/services/bus-view.service.mjs +0 -83
  40. package/esm2022/calendar/services/century-view.service.mjs +0 -219
  41. package/esm2022/calendar/services/decade-view.service.mjs +0 -217
  42. package/esm2022/calendar/services/disabled-dates.service.mjs +0 -66
  43. package/esm2022/calendar/services/dom.service.mjs +0 -203
  44. package/esm2022/calendar/services/month-view.service.mjs +0 -223
  45. package/esm2022/calendar/services/navigation.service.mjs +0 -60
  46. package/esm2022/calendar/services/scroll-sync.service.mjs +0 -89
  47. package/esm2022/calendar/services/selection.service.mjs +0 -62
  48. package/esm2022/calendar/services/weeknames.service.mjs +0 -33
  49. package/esm2022/calendar/services/year-view.service.mjs +0 -204
  50. package/esm2022/calendar/templates/cell-template.directive.mjs +0 -45
  51. package/esm2022/calendar/templates/century-cell-template.directive.mjs +0 -43
  52. package/esm2022/calendar/templates/decade-cell-template.directive.mjs +0 -43
  53. package/esm2022/calendar/templates/footer-template.directive.mjs +0 -44
  54. package/esm2022/calendar/templates/header-template.directive.mjs +0 -47
  55. package/esm2022/calendar/templates/header-title-template.directive.mjs +0 -43
  56. package/esm2022/calendar/templates/month-cell-template.directive.mjs +0 -43
  57. package/esm2022/calendar/templates/navigation-item-template.directive.mjs +0 -43
  58. package/esm2022/calendar/templates/weeknumber-cell-template.directive.mjs +0 -43
  59. package/esm2022/calendar/templates/year-cell-template.directive.mjs +0 -43
  60. package/esm2022/calendar/view-list.component.mjs +0 -497
  61. package/esm2022/calendar/view.component.mjs +0 -432
  62. package/esm2022/common/dom-queries.mjs +0 -24
  63. package/esm2022/common/models/fillmode.mjs +0 -5
  64. package/esm2022/common/models/rounded.mjs +0 -5
  65. package/esm2022/common/models/size.mjs +0 -5
  66. package/esm2022/common/models/week-days-format.mjs +0 -5
  67. package/esm2022/common/picker.service.mjs +0 -17
  68. package/esm2022/common/utils.mjs +0 -70
  69. package/esm2022/dateinput/arrow.enum.mjs +0 -13
  70. package/esm2022/dateinput/dateinput.component.mjs +0 -1196
  71. package/esm2022/dateinput/dateinput.module.mjs +0 -45
  72. package/esm2022/dateinput/localization/dateinput-custom-messages.component.mjs +0 -60
  73. package/esm2022/dateinput/localization/dateinput-localized-messages.directive.mjs +0 -39
  74. package/esm2022/dateinput/localization/messages.mjs +0 -39
  75. package/esm2022/dateinput/models/format-placeholder.model.mjs +0 -5
  76. package/esm2022/dateinput/models/format-settings.model.mjs +0 -5
  77. package/esm2022/dateinput/models/incremental-steps.model.mjs +0 -5
  78. package/esm2022/dateinputs.module.mjs +0 -136
  79. package/esm2022/datepicker/datepicker.component.mjs +0 -1758
  80. package/esm2022/datepicker/datepicker.module.mjs +0 -83
  81. package/esm2022/datepicker/localization/datepicker-custom-messages.component.mjs +0 -53
  82. package/esm2022/datepicker/localization/datepicker-localized-messages.directive.mjs +0 -39
  83. package/esm2022/datepicker/localization/messages.mjs +0 -63
  84. package/esm2022/daterange/auto-correct-on.type.mjs +0 -5
  85. package/esm2022/daterange/date-range-end-input.directive.mjs +0 -105
  86. package/esm2022/daterange/date-range-input.mjs +0 -138
  87. package/esm2022/daterange/date-range-popup-template.directive.mjs +0 -36
  88. package/esm2022/daterange/date-range-popup.component.mjs +0 -1051
  89. package/esm2022/daterange/date-range-selection.directive.mjs +0 -223
  90. package/esm2022/daterange/date-range-start-input.directive.mjs +0 -109
  91. package/esm2022/daterange/date-range.component.mjs +0 -116
  92. package/esm2022/daterange/date-range.module.mjs +0 -103
  93. package/esm2022/daterange/date-range.service.mjs +0 -225
  94. package/esm2022/daterange/localization/daterange-popup-custom-messages.component.mjs +0 -43
  95. package/esm2022/daterange/localization/daterange-popup-localized-messages.directive.mjs +0 -39
  96. package/esm2022/daterange/localization/messages.mjs +0 -51
  97. package/esm2022/datetimepicker/datetimepicker.component.mjs +0 -2505
  98. package/esm2022/datetimepicker/datetimepicker.module.mjs +0 -106
  99. package/esm2022/datetimepicker/localization/datetimepicker-custom-messages.component.mjs +0 -52
  100. package/esm2022/datetimepicker/localization/localized-messages.directive.mjs +0 -39
  101. package/esm2022/datetimepicker/localization/messages.mjs +0 -153
  102. package/esm2022/datetimepicker/models/active-tab.type.mjs +0 -5
  103. package/esm2022/defaults.mjs +0 -24
  104. package/esm2022/directives.mjs +0 -146
  105. package/esm2022/index.mjs +0 -78
  106. package/esm2022/package-metadata.mjs +0 -16
  107. package/esm2022/popup-settings.model.mjs +0 -5
  108. package/esm2022/preventable-event.mjs +0 -27
  109. package/esm2022/progress-kendo-angular-dateinputs.mjs +0 -8
  110. package/esm2022/timepicker/localization/messages.mjs +0 -105
  111. package/esm2022/timepicker/localization/timepicker-custom-messages.component.mjs +0 -54
  112. package/esm2022/timepicker/localization/timepicker-localized-messages.directive.mjs +0 -39
  113. package/esm2022/timepicker/localization/timeselector-custom-messages.component.mjs +0 -45
  114. package/esm2022/timepicker/localization/timeselector-localized-messages.directive.mjs +0 -39
  115. package/esm2022/timepicker/models/incremental-steps.model.mjs +0 -5
  116. package/esm2022/timepicker/models/list-item.interface.mjs +0 -5
  117. package/esm2022/timepicker/models/list-service-settings.mjs +0 -5
  118. package/esm2022/timepicker/models/list-service.interface.mjs +0 -5
  119. package/esm2022/timepicker/models/time-part.default.mjs +0 -14
  120. package/esm2022/timepicker/services/dayperiod.service.mjs +0 -131
  121. package/esm2022/timepicker/services/dom.service.mjs +0 -126
  122. package/esm2022/timepicker/services/hours.service.mjs +0 -130
  123. package/esm2022/timepicker/services/milliseconds.service.mjs +0 -131
  124. package/esm2022/timepicker/services/minutes.service.mjs +0 -128
  125. package/esm2022/timepicker/services/seconds.service.mjs +0 -128
  126. package/esm2022/timepicker/timelist.component.mjs +0 -388
  127. package/esm2022/timepicker/timepicker.component.mjs +0 -1598
  128. package/esm2022/timepicker/timepicker.module.mjs +0 -71
  129. package/esm2022/timepicker/timeselector.component.mjs +0 -728
  130. package/esm2022/timepicker/util.mjs +0 -70
  131. package/esm2022/util.mjs +0 -406
  132. package/esm2022/validators/disabled-date.validator.mjs +0 -18
  133. package/esm2022/validators/disabled-dates-range.validator.mjs +0 -26
  134. package/esm2022/validators/incomplete-date.validator.mjs +0 -18
  135. package/esm2022/validators/max.validator.mjs +0 -21
  136. package/esm2022/validators/min.validator.mjs +0 -21
  137. package/esm2022/validators/time-range.validator.mjs +0 -23
  138. package/esm2022/virtualization/models/scrollable.interface.mjs +0 -5
  139. package/esm2022/virtualization/services/row-height.service.mjs +0 -73
  140. package/esm2022/virtualization/services/scroller.service.mjs +0 -109
  141. package/esm2022/virtualization/virtualization.component.mjs +0 -324
@@ -1,89 +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 { NgModule } from '@angular/core';
6
- import { KENDO_MULTIVIEWCALENDAR } from '../directives';
7
- import { CenturyViewService } from './services/century-view.service';
8
- import { DecadeViewService } from './services/decade-view.service';
9
- import { MonthViewService } from './services/month-view.service';
10
- import { NavigationService } from './services/navigation.service';
11
- import { YearViewService } from './services/year-view.service';
12
- import { PopupService } from '@progress/kendo-angular-popup';
13
- import * as i0 from "@angular/core";
14
- import * as i1 from "./localization/multiview-calendar-custom-messages.component";
15
- import * as i2 from "./multiview-calendar.component";
16
- import * as i3 from "./templates/cell-template.directive";
17
- import * as i4 from "./templates/century-cell-template.directive";
18
- import * as i5 from "./templates/decade-cell-template.directive";
19
- import * as i6 from "./templates/footer-template.directive";
20
- import * as i7 from "./templates/header-template.directive";
21
- import * as i8 from "./templates/header-title-template.directive";
22
- import * as i9 from "./templates/month-cell-template.directive";
23
- import * as i10 from "./templates/navigation-item-template.directive";
24
- import * as i11 from "./templates/weeknumber-cell-template.directive";
25
- import * as i12 from "./templates/year-cell-template.directive";
26
- // IMPORTANT: NgModule export kept for backwards compatibility
27
- /**
28
- * Required for adding all MultiViewCalendar features in NgModule-based Angular applications.
29
- * The package exports:
30
- * - `CellTemplateDirective`—The month cell template directive.
31
- * - `MonthCellTemplateDirective`—The month cell template directive.
32
- * - `YearCellTemplateDirective`—The year cell template directive.
33
- * - `DecadeCellTemplateDirective`—The decade cell template directive.
34
- * - `CenturyCellTemplateDirective`—The century cell template directive.
35
- * - `WeekNumberCellTemplateDirective`—The month week number cell template directive.
36
- * - `HeaderTitleTemplateDirective`—The header title template directive.
37
- *
38
- * @example
39
- *
40
- * ```ts-no-run
41
- * // Import the MultiViewCalendar module
42
- * import { MultiViewCalendarModule } from '@progress/kendo-angular-dateinputs';
43
- *
44
- * // The browser platform with a compiler
45
- * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
46
- *
47
- * import { NgModule } from '@angular/core';
48
- *
49
- * // Import the app component
50
- * import { AppComponent } from './app.component';
51
- *
52
- * // Define the app module
53
- * _@NgModule({
54
- * declarations: [AppComponent], // declare app component
55
- * imports: [BrowserModule, MultiViewCalendarModule], // import MultiViewCalendar module
56
- * bootstrap: [AppComponent]
57
- * })
58
- * export class AppModule {}
59
- *
60
- * // Compile and launch the module
61
- * platformBrowserDynamic().bootstrapModule(AppModule);
62
- */
63
- export class MultiViewCalendarModule {
64
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MultiViewCalendarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
65
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: MultiViewCalendarModule, imports: [i1.MultiViewCalendarCustomMessagesComponent, i2.MultiViewCalendarComponent, i3.CellTemplateDirective, i4.CenturyCellTemplateDirective, i5.DecadeCellTemplateDirective, i6.FooterTemplateDirective, i7.HeaderTemplateDirective, i8.HeaderTitleTemplateDirective, i9.MonthCellTemplateDirective, i10.NavigationItemTemplateDirective, i11.WeekNumberCellTemplateDirective, i12.YearCellTemplateDirective], exports: [i1.MultiViewCalendarCustomMessagesComponent, i2.MultiViewCalendarComponent, i3.CellTemplateDirective, i4.CenturyCellTemplateDirective, i5.DecadeCellTemplateDirective, i6.FooterTemplateDirective, i7.HeaderTemplateDirective, i8.HeaderTitleTemplateDirective, i9.MonthCellTemplateDirective, i10.NavigationItemTemplateDirective, i11.WeekNumberCellTemplateDirective, i12.YearCellTemplateDirective] });
66
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MultiViewCalendarModule, providers: [
67
- PopupService,
68
- NavigationService,
69
- CenturyViewService,
70
- DecadeViewService,
71
- MonthViewService,
72
- YearViewService
73
- ], imports: [i2.MultiViewCalendarComponent] });
74
- }
75
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: MultiViewCalendarModule, decorators: [{
76
- type: NgModule,
77
- args: [{
78
- exports: [...KENDO_MULTIVIEWCALENDAR],
79
- imports: [...KENDO_MULTIVIEWCALENDAR],
80
- providers: [
81
- PopupService,
82
- NavigationService,
83
- CenturyViewService,
84
- DecadeViewService,
85
- MonthViewService,
86
- YearViewService
87
- ]
88
- }]
89
- }] });
@@ -1,230 +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
- /* eslint-disable @angular-eslint/component-selector */
6
- import { Component, ChangeDetectionStrategy, ChangeDetectorRef, ElementRef, EventEmitter, HostBinding, Input, Output, Renderer2, TemplateRef, ViewChild } from '@angular/core';
7
- import { IntlService } from '@progress/kendo-angular-intl';
8
- import { BusViewService } from './services/bus-view.service';
9
- import { CalendarDOMService } from './services/dom.service';
10
- import { CalendarViewEnum } from './models/view.enum';
11
- import { VirtualizationComponent } from '../virtualization/virtualization.component';
12
- import { MIN_DATE, MAX_DATE } from '../defaults';
13
- import { cloneDate } from '@progress/kendo-date-math';
14
- import { dateInRange } from '../util';
15
- import { closestInScope } from '../common/dom-queries';
16
- import { NgTemplateOutlet } from '@angular/common';
17
- import { KForOf } from './for.directive';
18
- import { EventsOutsideAngularDirective } from '@progress/kendo-angular-common';
19
- import * as i0 from "@angular/core";
20
- import * as i1 from "./services/bus-view.service";
21
- import * as i2 from "./services/dom.service";
22
- import * as i3 from "@progress/kendo-angular-intl";
23
- const ITEMS_COUNT = 30;
24
- /**
25
- * @hidden
26
- */
27
- export class NavigationComponent {
28
- bus;
29
- dom;
30
- intl;
31
- cdr;
32
- renderer;
33
- activeView;
34
- min = new Date(MIN_DATE);
35
- max = new Date(MAX_DATE);
36
- focusedDate = new Date();
37
- templateRef;
38
- valueChange = new EventEmitter();
39
- pageChange = new EventEmitter();
40
- virtualization;
41
- list;
42
- get getComponentClass() {
43
- return true;
44
- }
45
- activeViewValue;
46
- service;
47
- dates = [];
48
- style;
49
- take = ITEMS_COUNT;
50
- skip;
51
- total;
52
- itemHeight;
53
- topOffset;
54
- bottomOffset;
55
- maxViewHeight;
56
- indexToScroll = -1;
57
- intlSubscription;
58
- constructor(bus, dom, intl, cdr, renderer) {
59
- this.bus = bus;
60
- this.dom = dom;
61
- this.intl = intl;
62
- this.cdr = cdr;
63
- this.renderer = renderer;
64
- }
65
- ngOnInit() {
66
- this.dom.ensureHeights();
67
- const calendarHeight = this.dom.calendarHeight;
68
- this.itemHeight = this.dom.navigationItemHeight;
69
- this.maxViewHeight = this.dom.monthViewHeight;
70
- this.topOffset = (calendarHeight - this.itemHeight) / 2;
71
- this.bottomOffset = calendarHeight - this.itemHeight;
72
- this.intlSubscription = this.intl.changes.subscribe(this.intlChange.bind(this));
73
- }
74
- ngOnChanges(changes) {
75
- this.service = this.bus.service(this.activeView);
76
- if (!this.service) {
77
- return;
78
- }
79
- this.activeViewValue = CalendarViewEnum[this.activeView];
80
- const viewDate = dateInRange(this.focusedDate, this.min, this.max);
81
- const total = this.service.total(this.min, this.max);
82
- const totalChanged = this.total && this.total !== total;
83
- this.skip = this.service.skip(viewDate, this.min);
84
- this.total = total;
85
- if (totalChanged || !this.service.isInArray(viewDate, this.dates)) {
86
- this.dates = this.service.datesList(viewDate, this.getTake(this.skip));
87
- }
88
- if (!!changes.focusedDate || totalChanged) {
89
- this.indexToScroll = this.service.skip(this.focusedDate, this.min);
90
- }
91
- }
92
- ngOnDestroy() {
93
- if (this.intlSubscription) {
94
- this.intlSubscription.unsubscribe();
95
- }
96
- }
97
- ngAfterViewInit() {
98
- if (this.indexToScroll === -1) {
99
- return;
100
- }
101
- this.virtualization.scrollToIndex(this.indexToScroll);
102
- this.indexToScroll = -1;
103
- }
104
- ngAfterViewChecked() {
105
- if (this.indexToScroll === -1) {
106
- return;
107
- }
108
- this.virtualization.scrollToIndex(this.indexToScroll);
109
- this.indexToScroll = -1;
110
- }
111
- onPageChange({ skip }) {
112
- this.dates = this.service.datesList(this.service.addToDate(this.min, skip), this.getTake(skip));
113
- this.pageChange.emit();
114
- }
115
- scrollChange({ offset }) {
116
- const el = this.list.nativeElement;
117
- const translate = `translateY(${offset}px)`;
118
- this.renderer.setStyle(el, 'transform', translate);
119
- this.renderer.setStyle(el, '-ms-transform', translate);
120
- }
121
- handleDateChange(args) {
122
- const item = closestInScope(args.target, node => node.hasAttribute('data-date-index'), this.list.nativeElement);
123
- if (item) {
124
- const index = parseInt(item.getAttribute('data-date-index'), 10);
125
- const candidate = this.dates[index];
126
- this.valueChange.emit(cloneDate(candidate));
127
- }
128
- }
129
- getTake(skip) {
130
- return Math.min(this.total - skip, this.take);
131
- }
132
- intlChange() {
133
- if (this.activeView === CalendarViewEnum.month) {
134
- this.cdr.markForCheck();
135
- }
136
- }
137
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NavigationComponent, deps: [{ token: i1.BusViewService }, { token: i2.CalendarDOMService }, { token: i3.IntlService }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
138
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: NavigationComponent, isStandalone: true, selector: "kendo-calendar-navigation", inputs: { activeView: "activeView", min: "min", max: "max", focusedDate: "focusedDate", templateRef: "templateRef" }, outputs: { valueChange: "valueChange", pageChange: "pageChange" }, host: { properties: { "class.k-calendar-navigation": "this.getComponentClass" } }, viewQueries: [{ propertyName: "virtualization", first: true, predicate: VirtualizationComponent, descendants: true }, { propertyName: "list", first: true, predicate: ["list"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: `
139
- <span class="k-calendar-navigation-highlight"></span>
140
- <kendo-virtualization
141
- [skip]="skip"
142
- [take]="take"
143
- [total]="total"
144
- [itemHeight]="itemHeight"
145
- [topOffset]="topOffset"
146
- [bottomOffset]="bottomOffset"
147
- [maxScrollDifference]="maxViewHeight"
148
- (pageChange)="onPageChange($event)"
149
- (scrollChange)="scrollChange($event)"
150
- >
151
- <ul #list class="k-reset" [kendoEventsOutsideAngular]="{ click: handleDateChange }" [scope]="this">
152
- <li *kFor="let date of dates; let index=index" [attr.data-date-index]="index">
153
- <span [class.k-calendar-navigation-marker]="service.isRangeStart(date)">
154
- @if (!templateRef) {
155
- {{service.navigationTitle(date)}}
156
- }
157
- @if (templateRef) {
158
- <ng-template
159
- [ngTemplateOutlet]="templateRef"
160
- [ngTemplateOutletContext]="{ $implicit: service.navigationTitle(date), activeView: activeViewValue, date: date }"
161
- ></ng-template>
162
- }
163
- </span>
164
- </li>
165
- </ul>
166
- </kendo-virtualization>
167
- `, isInline: true, dependencies: [{ kind: "component", type: VirtualizationComponent, selector: "kendo-virtualization", inputs: ["direction", "itemHeight", "itemWidth", "topOffset", "bottomOffset", "maxScrollDifference", "scrollOffsetSize", "scrollDuration", "skip", "take", "total"], outputs: ["activeIndexChange", "pageChange", "scrollChange"] }, { kind: "directive", type: EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { kind: "directive", type: KForOf, selector: "[kFor][kForOf]", inputs: ["kForOf", "kForTrackBy", "kForTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
168
- }
169
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NavigationComponent, decorators: [{
170
- type: Component,
171
- args: [{
172
- changeDetection: ChangeDetectionStrategy.OnPush,
173
- selector: 'kendo-calendar-navigation',
174
- template: `
175
- <span class="k-calendar-navigation-highlight"></span>
176
- <kendo-virtualization
177
- [skip]="skip"
178
- [take]="take"
179
- [total]="total"
180
- [itemHeight]="itemHeight"
181
- [topOffset]="topOffset"
182
- [bottomOffset]="bottomOffset"
183
- [maxScrollDifference]="maxViewHeight"
184
- (pageChange)="onPageChange($event)"
185
- (scrollChange)="scrollChange($event)"
186
- >
187
- <ul #list class="k-reset" [kendoEventsOutsideAngular]="{ click: handleDateChange }" [scope]="this">
188
- <li *kFor="let date of dates; let index=index" [attr.data-date-index]="index">
189
- <span [class.k-calendar-navigation-marker]="service.isRangeStart(date)">
190
- @if (!templateRef) {
191
- {{service.navigationTitle(date)}}
192
- }
193
- @if (templateRef) {
194
- <ng-template
195
- [ngTemplateOutlet]="templateRef"
196
- [ngTemplateOutletContext]="{ $implicit: service.navigationTitle(date), activeView: activeViewValue, date: date }"
197
- ></ng-template>
198
- }
199
- </span>
200
- </li>
201
- </ul>
202
- </kendo-virtualization>
203
- `,
204
- standalone: true,
205
- imports: [VirtualizationComponent, EventsOutsideAngularDirective, KForOf, NgTemplateOutlet]
206
- }]
207
- }], ctorParameters: () => [{ type: i1.BusViewService }, { type: i2.CalendarDOMService }, { type: i3.IntlService }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }], propDecorators: { activeView: [{
208
- type: Input
209
- }], min: [{
210
- type: Input
211
- }], max: [{
212
- type: Input
213
- }], focusedDate: [{
214
- type: Input
215
- }], templateRef: [{
216
- type: Input
217
- }], valueChange: [{
218
- type: Output
219
- }], pageChange: [{
220
- type: Output
221
- }], virtualization: [{
222
- type: ViewChild,
223
- args: [VirtualizationComponent, { static: false }]
224
- }], list: [{
225
- type: ViewChild,
226
- args: ['list', { static: true }]
227
- }], getComponentClass: [{
228
- type: HostBinding,
229
- args: ["class.k-calendar-navigation"]
230
- }] } });
@@ -1,83 +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 { EventEmitter, Injectable, Injector } from '@angular/core';
6
- import { CenturyViewService } from '../services/century-view.service';
7
- import { DecadeViewService } from '../services/decade-view.service';
8
- import { MonthViewService } from '../services/month-view.service';
9
- import { YearViewService } from '../services/year-view.service';
10
- import { CalendarViewEnum } from '../models/view.enum';
11
- import * as i0 from "@angular/core";
12
- const services = {
13
- [CalendarViewEnum.month]: MonthViewService,
14
- [CalendarViewEnum.year]: YearViewService,
15
- [CalendarViewEnum.decade]: DecadeViewService,
16
- [CalendarViewEnum.century]: CenturyViewService
17
- };
18
- const viewOffset = (view, offset) => {
19
- const candidate = CalendarViewEnum[CalendarViewEnum[view + offset]];
20
- return candidate !== undefined ? candidate : view;
21
- };
22
- let nextCalendarId = 0;
23
- /**
24
- * @hidden
25
- */
26
- export class BusViewService {
27
- injector;
28
- viewChanged = new EventEmitter();
29
- bottom = CalendarViewEnum.month;
30
- top = CalendarViewEnum.century;
31
- calendarId;
32
- constructor(injector) {
33
- this.injector = injector;
34
- this.calendarId = nextCalendarId++;
35
- }
36
- configure(bottom, top) {
37
- this.bottom = bottom;
38
- this.top = top;
39
- }
40
- service(view) {
41
- const serviceType = services[view];
42
- return serviceType ? this.injector.get(serviceType) : null;
43
- }
44
- moveDown(view) {
45
- this.move(view, -1);
46
- }
47
- moveUp(view) {
48
- this.move(view, 1);
49
- }
50
- moveToBottom(activeView) {
51
- if (activeView === this.bottom) {
52
- return;
53
- }
54
- this.viewChanged.emit({ view: this.bottom });
55
- }
56
- canMoveDown(view) {
57
- return this.bottom < view;
58
- }
59
- canMoveUp(view) {
60
- return view < this.top;
61
- }
62
- clamp(view) {
63
- if (view < this.bottom) {
64
- return this.bottom;
65
- }
66
- if (view > this.top) {
67
- return this.top;
68
- }
69
- return view;
70
- }
71
- move(view, offset) {
72
- const candidate = this.clamp(viewOffset(view, offset));
73
- if (candidate === view) {
74
- return;
75
- }
76
- this.viewChanged.emit({ view: candidate });
77
- }
78
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BusViewService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
79
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BusViewService });
80
- }
81
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BusViewService, decorators: [{
82
- type: Injectable
83
- }], ctorParameters: () => [{ type: i0.Injector }] });
@@ -1,219 +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 { Injectable } from '@angular/core';
6
- import { addDecades, addCenturies, cloneDate, durationInCenturies, firstYearOfDecade, firstDecadeOfCentury, lastDecadeOfCentury, createDate, lastYearOfDecade, lastMonthOfYear, lastDayOfMonth } from '@progress/kendo-date-math';
7
- import { Action } from '../models/navigation-action.enum';
8
- import { EMPTY_SELECTIONRANGE } from '../models/selection-range.interface';
9
- import { getToday, isInSelectionRange, range } from '../../util';
10
- import { isPresent } from '../../common/utils';
11
- import * as i0 from "@angular/core";
12
- const EMPTY_DATA = [[]];
13
- const CELLS_LENGTH = 4;
14
- const ROWS_LENGTH = 3;
15
- const upStep = (year) => {
16
- const decadeOfCentury = Number(year.toString().slice(-2, -1));
17
- if (decadeOfCentury < 2) {
18
- return -2;
19
- }
20
- if (decadeOfCentury < 4) {
21
- return -6;
22
- }
23
- return -4;
24
- };
25
- const downStep = (year) => {
26
- const decadeOfCentury = Number(year.toString().slice(-2, -1));
27
- if (decadeOfCentury > 7) {
28
- return 2;
29
- }
30
- if (decadeOfCentury > 5) {
31
- return 6;
32
- }
33
- return 4;
34
- };
35
- const ACTIONS = {
36
- [Action.Left]: (date) => addDecades(date, -1),
37
- [Action.Up]: (date) => addDecades(date, upStep(date.getFullYear())),
38
- [Action.Right]: (date) => addDecades(date, 1),
39
- [Action.Down]: (date) => addDecades(date, downStep(date.getFullYear())),
40
- [Action.PrevView]: (date) => addCenturies(date, -1),
41
- [Action.NextView]: (date) => addCenturies(date, 1),
42
- [Action.FirstInView]: (date) => firstDecadeOfCentury(date),
43
- [Action.LastInView]: (date) => lastDecadeOfCentury(date)
44
- };
45
- /**
46
- * @hidden
47
- */
48
- export class CenturyViewService {
49
- addToDate(min, skip) {
50
- return addCenturies(min, skip);
51
- }
52
- datesList(start, count) {
53
- return range(0, count).map(i => addCenturies(start, i));
54
- }
55
- data(options) {
56
- const { cellUID, focusedDate, isActiveView, max, min, selectedDates, selectionRange = EMPTY_SELECTIONRANGE, viewDate, allowReverse } = options;
57
- if (!viewDate) {
58
- return EMPTY_DATA;
59
- }
60
- const cells = range(0, CELLS_LENGTH);
61
- const firstDate = firstDecadeOfCentury(viewDate);
62
- const lastDate = lastDecadeOfCentury(viewDate);
63
- const lastYearOfCentury = lastYearOfDecade(lastDate).getFullYear() + 1;
64
- const today = getToday();
65
- return range(0, ROWS_LENGTH).map(rowOffset => {
66
- const baseDate = addDecades(firstDate, rowOffset * CELLS_LENGTH);
67
- return cells.map(cellOffset => {
68
- const cellDate = this.normalize(addDecades(baseDate, cellOffset), min, max);
69
- const nextCentury = cellDate.getFullYear() >= lastYearOfCentury;
70
- if (!this.isInRange(cellDate, min, max) || nextCentury) {
71
- return null;
72
- }
73
- let isRangeStart = false;
74
- let isRangeEnd = false;
75
- if (allowReverse) {
76
- if ((this.isEqual(cellDate, selectionRange.start) && selectionRange.start <= selectionRange.end) ||
77
- (this.isEqual(cellDate, selectionRange.end) && selectionRange.end <= selectionRange.start)) {
78
- isRangeStart = true;
79
- }
80
- if ((this.isEqual(cellDate, selectionRange.start) && selectionRange.start >= selectionRange.end) ||
81
- (this.isEqual(cellDate, selectionRange.end) && selectionRange.end >= selectionRange.start)) {
82
- isRangeEnd = true;
83
- }
84
- }
85
- else {
86
- isRangeStart = this.isEqual(cellDate, selectionRange.start);
87
- isRangeEnd = this.isEqual(cellDate, selectionRange.end);
88
- }
89
- const isInMiddle = !isRangeStart && !isRangeEnd;
90
- let isRangeMid;
91
- if (allowReverse) {
92
- isRangeMid = isInMiddle && (isInSelectionRange(cellDate, selectionRange) || isInSelectionRange(cellDate, { start: selectionRange.end, end: selectionRange.start }));
93
- }
94
- else {
95
- isRangeMid = isInMiddle && isInSelectionRange(cellDate, selectionRange);
96
- }
97
- return {
98
- formattedValue: this.value(cellDate),
99
- id: `${cellUID}${cellDate.getTime()}`,
100
- isFocused: this.isEqual(cellDate, focusedDate),
101
- isSelected: isActiveView && selectedDates.some(date => this.isEqual(cellDate, date)),
102
- isWeekend: false,
103
- isRangeStart: isRangeStart,
104
- isRangeMid: isRangeMid,
105
- isRangeEnd: isRangeEnd,
106
- isRangeSplitEnd: isRangeMid && this.isEqual(cellDate, lastDate),
107
- isRangeSplitStart: isRangeMid && this.isEqual(cellDate, firstDate),
108
- isToday: this.isEqual(cellDate, today),
109
- title: this.cellTitle(cellDate),
110
- value: cellDate,
111
- allowReverse: allowReverse
112
- };
113
- });
114
- });
115
- }
116
- isEqual(candidate, expected) {
117
- if (!candidate || !expected) {
118
- return false;
119
- }
120
- return firstYearOfDecade(candidate).getFullYear() === firstYearOfDecade(expected).getFullYear();
121
- }
122
- isInArray(date, dates) {
123
- if (!dates.length) {
124
- return false;
125
- }
126
- const year = date.getFullYear();
127
- return dates[0].getFullYear() <= year && year <= (dates[dates.length - 1].getFullYear() + 99);
128
- }
129
- isInRange(candidate, min, max) {
130
- const year = firstYearOfDecade(candidate).getFullYear();
131
- const aboveMin = !min || firstYearOfDecade(min).getFullYear() <= year;
132
- const belowMax = !max || year <= firstYearOfDecade(max).getFullYear();
133
- return aboveMin && belowMax;
134
- }
135
- beginningOfPeriod(date) {
136
- if (!date) {
137
- return date;
138
- }
139
- const firstYear = firstYearOfDecade(firstDecadeOfCentury(date));
140
- return createDate(firstYear.getFullYear(), 0, 1);
141
- }
142
- lastDayOfPeriod(date) {
143
- const decade = lastDecadeOfCentury(date);
144
- const year = lastYearOfDecade(decade);
145
- const month = lastMonthOfYear(year);
146
- return lastDayOfMonth(month);
147
- }
148
- isRangeStart(value) {
149
- return value.getFullYear() % 1000 === 0;
150
- }
151
- move(value, action) {
152
- const modifier = ACTIONS[action];
153
- if (!modifier) {
154
- return value;
155
- }
156
- return modifier(value);
157
- }
158
- cellTitle(value) {
159
- return firstYearOfDecade(value).getFullYear().toString();
160
- }
161
- navigationTitle(value) {
162
- return value ? firstDecadeOfCentury(value).getFullYear().toString() : '';
163
- }
164
- title(value) {
165
- if (!value) {
166
- return '';
167
- }
168
- return `${firstDecadeOfCentury(value).getFullYear()} - ${lastDecadeOfCentury(value).getFullYear()}`;
169
- }
170
- rowLength() {
171
- return CELLS_LENGTH;
172
- }
173
- skip(value, min) {
174
- return durationInCenturies(min, value);
175
- }
176
- total(min, max) {
177
- return durationInCenturies(min, max) + 1;
178
- }
179
- value(current) {
180
- return current ? firstYearOfDecade(current).getFullYear().toString() : '';
181
- }
182
- viewDate(date, max, viewsCount = 1) {
183
- const viewsInRange = this.total(date, max);
184
- if (viewsInRange < viewsCount) {
185
- const centuriesToSubtract = viewsCount - viewsInRange;
186
- return addCenturies(date, -1 * centuriesToSubtract);
187
- }
188
- return date;
189
- }
190
- dateRange = (start, end) => {
191
- if (!isPresent(start) || !isPresent(end)) {
192
- return [];
193
- }
194
- const result = [];
195
- let current = start;
196
- while (current <= end) {
197
- result.push(current);
198
- current = addDecades(current, 1);
199
- }
200
- return result;
201
- };
202
- normalize(cellDate, min, max) {
203
- if (cellDate < min && this.isEqual(cellDate, min)) {
204
- return cloneDate(min);
205
- }
206
- if (cellDate > max && this.isEqual(cellDate, max)) {
207
- return cloneDate(max);
208
- }
209
- return cellDate;
210
- }
211
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CenturyViewService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
212
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CenturyViewService, providedIn: 'root' });
213
- }
214
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CenturyViewService, decorators: [{
215
- type: Injectable,
216
- args: [{
217
- providedIn: 'root'
218
- }]
219
- }] });