@progress/kendo-angular-dateinputs 17.1.2-develop.4 → 17.2.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.
@@ -34,6 +34,7 @@ import { ActionSheetComponent } from '@progress/kendo-angular-navigation';
34
34
  import { HeaderTemplateDirective } from '../calendar/templates/header-template.directive';
35
35
  import { FooterTemplateDirective } from '../calendar/templates/footer-template.directive';
36
36
  import { WeekDaysFormat } from '../common/models/week-days-format';
37
+ import { AdaptiveService } from '@progress/kendo-angular-utils';
37
38
  import * as i0 from "@angular/core";
38
39
  /**
39
40
  * Represents the [Kendo UI DatePicker component for Angular](slug:overview_datepicker).
@@ -48,6 +49,7 @@ export declare class DatePickerComponent extends MultiTabStop implements Control
48
49
  private injector;
49
50
  private pickerService;
50
51
  private disabledDatesService;
52
+ private adaptiveService;
51
53
  /**
52
54
  * @hidden
53
55
  */
@@ -543,7 +545,7 @@ export declare class DatePickerComponent extends MultiTabStop implements Control
543
545
  private _rounded;
544
546
  private _fillMode;
545
547
  private windowSize;
546
- constructor(zone: NgZone, localization: LocalizationService, cdr: ChangeDetectorRef, popupService: PopupService, wrapper: ElementRef, renderer: Renderer2, injector: Injector, pickerService: PickerService, disabledDatesService: DisabledDatesService);
548
+ constructor(zone: NgZone, localization: LocalizationService, cdr: ChangeDetectorRef, popupService: PopupService, wrapper: ElementRef, renderer: Renderer2, injector: Injector, pickerService: PickerService, disabledDatesService: DisabledDatesService, adaptiveService: AdaptiveService);
547
549
  /**
548
550
  * @hidden
549
551
  * Used by the TextBoxContainer to determine if the component is empty.
@@ -9,6 +9,7 @@ import { DateRangePopupTemplateDirective } from './date-range-popup-template.dir
9
9
  import { DateRangeService } from './date-range.service';
10
10
  import { MultiViewCalendarComponent } from '../calendar/multiview-calendar.component';
11
11
  import { PreventableEvent } from '../preventable-event';
12
+ import { AdaptiveService } from '@progress/kendo-angular-utils';
12
13
  import { AdaptiveMode } from '../util';
13
14
  import { SVGIcon } from '@progress/kendo-svg-icons';
14
15
  import { DateRangeSelectionDirective } from './date-range-selection.directive';
@@ -45,6 +46,7 @@ export declare class DateRangePopupComponent implements OnInit, OnDestroy {
45
46
  localization: LocalizationService;
46
47
  private cdr;
47
48
  private rtl;
49
+ private adaptiveService;
48
50
  container: ViewContainerRef;
49
51
  actionSheet: ActionSheetComponent;
50
52
  defaultTemplate: TemplateRef<any>;
@@ -287,7 +289,7 @@ export declare class DateRangePopupComponent implements OnInit, OnDestroy {
287
289
  private _show;
288
290
  private _rangeSelection;
289
291
  private windowSize;
290
- constructor(popupService: PopupService, dateRangeService: DateRangeService, zone: NgZone, renderer: Renderer2, localization: LocalizationService, cdr: ChangeDetectorRef, rtl: boolean);
292
+ constructor(popupService: PopupService, dateRangeService: DateRangeService, zone: NgZone, renderer: Renderer2, localization: LocalizationService, cdr: ChangeDetectorRef, rtl: boolean, adaptiveService: AdaptiveService);
291
293
  ngOnInit(): void;
292
294
  ngAfterViewInit(): void;
293
295
  ngOnDestroy(): void;
@@ -355,6 +357,6 @@ export declare class DateRangePopupComponent implements OnInit, OnDestroy {
355
357
  private toggleDateRange;
356
358
  private toggleActionSheet;
357
359
  private updateActionSheetAdaptiveAppearance;
358
- static ɵfac: i0.ɵɵFactoryDeclaration<DateRangePopupComponent, [null, null, null, null, null, null, { optional: true; }]>;
360
+ static ɵfac: i0.ɵɵFactoryDeclaration<DateRangePopupComponent, [null, null, null, null, null, null, { optional: true; }, null]>;
359
361
  static ɵcmp: i0.ɵɵComponentDeclaration<DateRangePopupComponent, "kendo-daterange-popup", ["kendo-daterange-popup"], { "showCalendarHeader": { "alias": "showCalendarHeader"; "required": false; }; "focusedDate": { "alias": "focusedDate"; "required": false; }; "disabledDates": { "alias": "disabledDates"; "required": false; }; "activeView": { "alias": "activeView"; "required": false; }; "bottomView": { "alias": "bottomView"; "required": false; }; "topView": { "alias": "topView"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "allowReverse": { "alias": "allowReverse"; "required": false; }; "animateNavigation": { "alias": "animateNavigation"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "views": { "alias": "views"; "required": false; }; "weekNumber": { "alias": "weekNumber"; "required": false; }; "animate": { "alias": "animate"; "required": false; }; "anchor": { "alias": "anchor"; "required": false; }; "anchorAlign": { "alias": "anchorAlign"; "required": false; }; "showViewHeader": { "alias": "showViewHeader"; "required": false; }; "showOtherMonthDays": { "alias": "showOtherMonthDays"; "required": false; }; "appendTo": { "alias": "appendTo"; "required": false; }; "collision": { "alias": "collision"; "required": false; }; "popupAlign": { "alias": "popupAlign"; "required": false; }; "margin": { "alias": "margin"; "required": false; }; "adaptiveMode": { "alias": "adaptiveMode"; "required": false; }; "title": { "alias": "title"; "required": false; }; "subtitle": { "alias": "subtitle"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, { "open": "open"; "close": "close"; "onBlur": "blur"; "onFocus": "focus"; "cancel": "cancel"; }, ["contentTemplate", "contentCalendar"], never, true, never>;
360
362
  }
@@ -8,6 +8,7 @@ import { Day } from '@progress/kendo-date-math';
8
8
  import { PopupService } from '@progress/kendo-angular-popup';
9
9
  import { IntlService } from '@progress/kendo-angular-intl';
10
10
  import { MultiTabStop } from '@progress/kendo-angular-common';
11
+ import { AdaptiveService } from '@progress/kendo-angular-utils';
11
12
  import { LocalizationService } from '@progress/kendo-angular-l10n';
12
13
  import { PickerService } from '../common/picker.service';
13
14
  import { DisabledDatesService } from '../calendar/services/disabled-dates.service';
@@ -52,6 +53,7 @@ export declare class DateTimePickerComponent extends MultiTabStop implements OnI
52
53
  private disabledDatesService;
53
54
  private renderer;
54
55
  private injector;
56
+ private adaptiveService;
55
57
  /**
56
58
  * @hidden
57
59
  */
@@ -554,7 +556,7 @@ export declare class DateTimePickerComponent extends MultiTabStop implements OnI
554
556
  private _rounded;
555
557
  private _fillMode;
556
558
  private windowSize;
557
- constructor(popupService: PopupService, intl: IntlService, cdr: ChangeDetectorRef, pickerService: PickerService, ngZone: NgZone, wrapper: ElementRef<HTMLElement>, localization: LocalizationService, disabledDatesService: DisabledDatesService, renderer: Renderer2, injector: Injector);
559
+ constructor(popupService: PopupService, intl: IntlService, cdr: ChangeDetectorRef, pickerService: PickerService, ngZone: NgZone, wrapper: ElementRef<HTMLElement>, localization: LocalizationService, disabledDatesService: DisabledDatesService, renderer: Renderer2, injector: Injector, adaptiveService: AdaptiveService);
558
560
  ngOnInit(): void;
559
561
  ngAfterViewInit(): void;
560
562
  ngOnChanges(changes: SimpleChanges): void;
@@ -4,7 +4,7 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { NgModule } from '@angular/core';
6
6
  import { KENDO_DATEINPUTS } from './directives';
7
- import { KENDO_TOGGLEBUTTONTABSTOP, ResizeBatchService } from '@progress/kendo-angular-common';
7
+ import { ResizeBatchService, KENDO_TOGGLEBUTTONTABSTOP } from '@progress/kendo-angular-common';
8
8
  import { IconsService } from '@progress/kendo-angular-icons';
9
9
  import { PopupService } from '@progress/kendo-angular-popup';
10
10
  import { CenturyViewService } from './calendar/services/century-view.service';
@@ -19,6 +19,7 @@ import { HoursService } from './timepicker/services/hours.service';
19
19
  import { MillisecondsService } from './timepicker/services/milliseconds.service';
20
20
  import { MinutesService } from './timepicker/services/minutes.service';
21
21
  import { SecondsService } from './timepicker/services/seconds.service';
22
+ import { AdaptiveService } from '@progress/kendo-angular-utils';
22
23
  import * as i0 from "@angular/core";
23
24
  import * as i1 from "./calendar/localization/calendar-custom-messages.component";
24
25
  import * as i2 from "./calendar/calendar.component";
@@ -102,7 +103,8 @@ export class DateInputsModule {
102
103
  MinutesService,
103
104
  SecondsService,
104
105
  MillisecondsService,
105
- DayPeriodService
106
+ DayPeriodService,
107
+ AdaptiveService
106
108
  ], imports: [i2.CalendarComponent, i14.MultiViewCalendarComponent, i16.DateInputComponent, i18.DatePickerComponent, i16.DateInputComponent, i23.DateRangeComponent, i24.DateRangePopupComponent, i28.DateTimePickerComponent, i30.TimePickerComponent] });
107
109
  }
108
110
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DateInputsModule, decorators: [{
@@ -127,7 +129,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
127
129
  MinutesService,
128
130
  SecondsService,
129
131
  MillisecondsService,
130
- DayPeriodService
132
+ DayPeriodService,
133
+ AdaptiveService
131
134
  ]
132
135
  }]
133
136
  }] });
@@ -25,7 +25,7 @@ import { HeaderTitleTemplateDirective } from '../calendar/templates/header-title
25
25
  import { NavigationItemTemplateDirective } from '../calendar/templates/navigation-item-template.directive';
26
26
  import { PickerService } from '../common/picker.service';
27
27
  import { DisabledDatesService } from '../calendar/services/disabled-dates.service';
28
- import { noop, isValidRange, setTime, isWindowAvailable, isTabExitingCalendar, getSizeClass, getRoundedClass, getFillModeClass, DEFAULT_FILL_MODE, DEFAULT_ROUNDED, DEFAULT_SIZE, windowSize } from '../util';
28
+ import { noop, isValidRange, setTime, isWindowAvailable, isTabExitingCalendar, getSizeClass, getRoundedClass, getFillModeClass, DEFAULT_FILL_MODE, DEFAULT_ROUNDED, DEFAULT_SIZE } from '../util';
29
29
  import { requiresZoneOnBlur, currentFocusTarget, attributeNames } from '../common/utils';
30
30
  import { fromEvent } from 'rxjs';
31
31
  import { incompleteDateValidator } from '../validators/incomplete-date.validator';
@@ -43,11 +43,13 @@ import { IconWrapperComponent } from '@progress/kendo-angular-icons';
43
43
  import { DateInputCustomMessagesComponent } from '../dateinput/localization/dateinput-custom-messages.component';
44
44
  import { DatePickerLocalizedMessagesDirective } from './localization/datepicker-localized-messages.directive';
45
45
  import { touchEnabled } from '@progress/kendo-common';
46
+ import { AdaptiveService } from '@progress/kendo-angular-utils';
46
47
  import * as i0 from "@angular/core";
47
48
  import * as i1 from "@progress/kendo-angular-l10n";
48
49
  import * as i2 from "@progress/kendo-angular-popup";
49
50
  import * as i3 from "../common/picker.service";
50
51
  import * as i4 from "../calendar/services/disabled-dates.service";
52
+ import * as i5 from "@progress/kendo-angular-utils";
51
53
  const MIN_DOC_LINK = 'https://www.telerik.com/kendo-angular-ui/components/dateinputs/api/DatePickerComponent/#toc-min';
52
54
  const MAX_DOC_LINK = 'https://www.telerik.com/kendo-angular-ui/components/dateinputs/api/DatePickerComponent/#toc-max';
53
55
  const VALUE_DOC_LINK = 'https://www.telerik.com/kendo-angular-ui/components/dateinputs/datepicker/#toc-using-with-json';
@@ -66,6 +68,7 @@ export class DatePickerComponent extends MultiTabStop {
66
68
  injector;
67
69
  pickerService;
68
70
  disabledDatesService;
71
+ adaptiveService;
69
72
  /**
70
73
  * @hidden
71
74
  */
@@ -686,7 +689,7 @@ export class DatePickerComponent extends MultiTabStop {
686
689
  _rounded = DEFAULT_ROUNDED;
687
690
  _fillMode = DEFAULT_FILL_MODE;
688
691
  windowSize;
689
- constructor(zone, localization, cdr, popupService, wrapper, renderer, injector, pickerService, disabledDatesService) {
692
+ constructor(zone, localization, cdr, popupService, wrapper, renderer, injector, pickerService, disabledDatesService, adaptiveService) {
690
693
  super();
691
694
  this.zone = zone;
692
695
  this.localization = localization;
@@ -697,6 +700,7 @@ export class DatePickerComponent extends MultiTabStop {
697
700
  this.injector = injector;
698
701
  this.pickerService = pickerService;
699
702
  this.disabledDatesService = disabledDatesService;
703
+ this.adaptiveService = adaptiveService;
700
704
  validatePackage(packageMetadata);
701
705
  this.pickerSubscriptions = this.pickerService.onFocus.subscribe(this.handleFocus.bind(this));
702
706
  this.pickerSubscriptions.add(this.pickerService.onBlur.subscribe(this.handleBlur.bind(this)));
@@ -728,6 +732,7 @@ export class DatePickerComponent extends MultiTabStop {
728
732
  }
729
733
  ngAfterViewInit() {
730
734
  this.setComponentClasses();
735
+ this.windowSize = this.adaptiveService.size;
731
736
  if (this.actionSheet && isDocumentAvailable()) {
732
737
  // The following syntax is used as it does not violate CSP compliance
733
738
  this.actionSheet.element.nativeElement.style.setProperty('--kendo-actionsheet-height', '60vh');
@@ -888,7 +893,7 @@ export class DatePickerComponent extends MultiTabStop {
888
893
  * @hidden
889
894
  */
890
895
  handleDateInputClick() {
891
- this.windowSize = windowSize();
896
+ this.windowSize = this.adaptiveService.size;
892
897
  if (this.isAdaptive) {
893
898
  this.show = true;
894
899
  }
@@ -960,7 +965,8 @@ export class DatePickerComponent extends MultiTabStop {
960
965
  * @hidden
961
966
  */
962
967
  onResize() {
963
- if (!this.isOpen || this.windowSize === windowSize()) {
968
+ const currentWindowSize = this.adaptiveService.size;
969
+ if (!this.isOpen || this.windowSize === currentWindowSize) {
964
970
  return;
965
971
  }
966
972
  if (this.actionSheet.expanded) {
@@ -969,7 +975,7 @@ export class DatePickerComponent extends MultiTabStop {
969
975
  else {
970
976
  this.togglePopup(false);
971
977
  }
972
- this.windowSize = windowSize();
978
+ this.windowSize = currentWindowSize;
973
979
  }
974
980
  /**
975
981
  * @hidden
@@ -1002,12 +1008,23 @@ export class DatePickerComponent extends MultiTabStop {
1002
1008
  }
1003
1009
  }
1004
1010
  toggleCalendar(show) {
1005
- this.windowSize = windowSize();
1006
- if (this.isAdaptive) {
1007
- this.toggleActionSheet(show);
1011
+ const previousWindowSize = this.windowSize;
1012
+ this.windowSize = this.adaptiveService.size;
1013
+ if (previousWindowSize !== this.windowSize && !show) {
1014
+ if (previousWindowSize !== 'large') {
1015
+ this.toggleActionSheet(show);
1016
+ }
1017
+ else {
1018
+ this.togglePopup(show);
1019
+ }
1008
1020
  }
1009
1021
  else {
1010
- this.togglePopup(show);
1022
+ if (this.isAdaptive) {
1023
+ this.toggleActionSheet(show);
1024
+ }
1025
+ else {
1026
+ this.togglePopup(show);
1027
+ }
1011
1028
  }
1012
1029
  this.toggleFocus();
1013
1030
  }
@@ -1206,7 +1223,7 @@ export class DatePickerComponent extends MultiTabStop {
1206
1223
  this.renderer.addClass(this.toggleButton.nativeElement, `k-button-${this.fillMode}-base`);
1207
1224
  }
1208
1225
  }
1209
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DatePickerComponent, deps: [{ token: i0.NgZone }, { token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i2.PopupService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.Injector }, { token: i3.PickerService }, { token: i4.DisabledDatesService }], target: i0.ɵɵFactoryTarget.Component });
1226
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DatePickerComponent, deps: [{ token: i0.NgZone }, { token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i2.PopupService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.Injector }, { token: i3.PickerService }, { token: i4.DisabledDatesService }, { token: i5.AdaptiveService }], target: i0.ɵɵFactoryTarget.Component });
1210
1227
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DatePickerComponent, isStandalone: true, selector: "kendo-datepicker", inputs: { focusableId: "focusableId", cellTemplateRef: ["cellTemplate", "cellTemplateRef"], clearButton: "clearButton", inputAttributes: "inputAttributes", monthCellTemplateRef: ["monthCellTemplate", "monthCellTemplateRef"], yearCellTemplateRef: ["yearCellTemplate", "yearCellTemplateRef"], decadeCellTemplateRef: ["decadeCellTemplate", "decadeCellTemplateRef"], centuryCellTemplateRef: ["centuryCellTemplate", "centuryCellTemplateRef"], weekNumberTemplateRef: ["weekNumberTemplate", "weekNumberTemplateRef"], headerTitleTemplateRef: ["headerTitleTemplate", "headerTitleTemplateRef"], headerTemplateRef: ["headerTemplate", "headerTemplateRef"], footerTemplateRef: ["footerTemplate", "footerTemplateRef"], footer: "footer", navigationItemTemplateRef: ["navigationItemTemplate", "navigationItemTemplateRef"], weekDaysFormat: "weekDaysFormat", showOtherMonthDays: "showOtherMonthDays", activeView: "activeView", bottomView: "bottomView", topView: "topView", calendarType: "calendarType", animateCalendarNavigation: "animateCalendarNavigation", disabled: "disabled", readonly: "readonly", readOnlyInput: "readOnlyInput", popupSettings: "popupSettings", navigation: "navigation", min: "min", max: "max", incompleteDateValidation: "incompleteDateValidation", autoCorrectParts: "autoCorrectParts", autoSwitchParts: "autoSwitchParts", autoSwitchKeys: "autoSwitchKeys", enableMouseWheel: "enableMouseWheel", allowCaretMode: "allowCaretMode", autoFill: "autoFill", focusedDate: "focusedDate", value: "value", format: "format", twoDigitYearMax: "twoDigitYearMax", formatPlaceholder: "formatPlaceholder", placeholder: "placeholder", tabindex: "tabindex", tabIndex: "tabIndex", disabledDates: "disabledDates", title: "title", subtitle: "subtitle", rangeValidation: "rangeValidation", disabledDatesValidation: "disabledDatesValidation", weekNumber: "weekNumber", size: "size", rounded: "rounded", fillMode: "fillMode", adaptiveMode: "adaptiveMode" }, outputs: { valueChange: "valueChange", onFocus: "focus", onBlur: "blur", open: "open", close: "close", escape: "escape" }, host: { properties: { "class.k-readonly": "this.readonly", "class.k-datepicker": "this.wrapperClasses", "class.k-input": "this.wrapperClasses", "class.k-disabled": "this.disabledClass" } }, providers: [
1211
1228
  { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => DatePickerComponent), multi: true },
1212
1229
  { provide: NG_VALIDATORS, useExisting: forwardRef(() => DatePickerComponent), multi: true },
@@ -1590,7 +1607,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1590
1607
  standalone: true,
1591
1608
  imports: [DatePickerLocalizedMessagesDirective, DateInputComponent, DateInputCustomMessagesComponent, EventsOutsideAngularDirective, IconWrapperComponent, NgTemplateOutlet, NgIf, ResizeSensorComponent, ActionSheetComponent, ActionSheetTemplateDirective, ButtonComponent, CalendarComponent, CalendarCustomMessagesComponent]
1592
1609
  }]
1593
- }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i1.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: i2.PopupService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.Injector }, { type: i3.PickerService }, { type: i4.DisabledDatesService }]; }, propDecorators: { container: [{
1610
+ }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i1.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: i2.PopupService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.Injector }, { type: i3.PickerService }, { type: i4.DisabledDatesService }, { type: i5.AdaptiveService }]; }, propDecorators: { container: [{
1594
1611
  type: ViewChild,
1595
1612
  args: ['container', { read: ViewContainerRef, static: true }]
1596
1613
  }], popupTemplate: [{
@@ -5,7 +5,7 @@
5
5
  import { NgModule } from '@angular/core';
6
6
  import { KENDO_DATEPICKER } from '../directives';
7
7
  import { IconsService } from '@progress/kendo-angular-icons';
8
- import { KENDO_TOGGLEBUTTONTABSTOP, ResizeBatchService } from '@progress/kendo-angular-common';
8
+ import { ResizeBatchService, KENDO_TOGGLEBUTTONTABSTOP } from '@progress/kendo-angular-common';
9
9
  import { PopupService } from '@progress/kendo-angular-popup';
10
10
  import { CenturyViewService } from '../calendar/services/century-view.service';
11
11
  import { DecadeViewService } from '../calendar/services/decade-view.service';
@@ -13,6 +13,7 @@ import { CalendarDOMService } from '../calendar/services/dom.service';
13
13
  import { MonthViewService } from '../calendar/services/month-view.service';
14
14
  import { NavigationService } from '../calendar/services/navigation.service';
15
15
  import { YearViewService } from '../calendar/services/year-view.service';
16
+ import { AdaptiveService } from '@progress/kendo-angular-utils';
16
17
  import * as i0 from "@angular/core";
17
18
  import * as i1 from "./localization/datepicker-custom-messages.component";
18
19
  import * as i2 from "./datepicker.component";
@@ -46,7 +47,8 @@ export class DatePickerModule {
46
47
  MonthViewService,
47
48
  YearViewService,
48
49
  PopupService,
49
- NavigationService
50
+ NavigationService,
51
+ AdaptiveService
50
52
  ], imports: [i2.DatePickerComponent] });
51
53
  }
52
54
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DatePickerModule, decorators: [{
@@ -65,7 +67,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
65
67
  MonthViewService,
66
68
  YearViewService,
67
69
  PopupService,
68
- NavigationService
70
+ NavigationService,
71
+ AdaptiveService
69
72
  ]
70
73
  }]
71
74
  }] });
@@ -10,9 +10,10 @@ import { DateRangeService } from './date-range.service';
10
10
  import { MultiViewCalendarComponent } from '../calendar/multiview-calendar.component';
11
11
  import { PreventableEvent } from '../preventable-event';
12
12
  import { isDocumentAvailable, guid, Keys, hasObservers, ResizeSensorComponent } from '@progress/kendo-angular-common';
13
+ import { AdaptiveService } from '@progress/kendo-angular-utils';
13
14
  import { Subscription, fromEvent, merge } from 'rxjs';
14
15
  import { filter, map } from 'rxjs/operators';
15
- import { isWindowAvailable, windowSize } from '../util';
16
+ import { isWindowAvailable } from '../util';
16
17
  import { isPresent } from '../common/utils';
17
18
  import { xIcon } from '@progress/kendo-svg-icons';
18
19
  import { DateRangeSelectionDirective } from './date-range-selection.directive';
@@ -25,6 +26,7 @@ import * as i0 from "@angular/core";
25
26
  import * as i1 from "@progress/kendo-angular-popup";
26
27
  import * as i2 from "./date-range.service";
27
28
  import * as i3 from "@progress/kendo-angular-l10n";
29
+ import * as i4 from "@progress/kendo-angular-utils";
28
30
  /**
29
31
  * Represents the Kendo UI DateRangePopup component for Angular.
30
32
  *
@@ -52,6 +54,7 @@ export class DateRangePopupComponent {
52
54
  localization;
53
55
  cdr;
54
56
  rtl;
57
+ adaptiveService;
55
58
  container;
56
59
  actionSheet;
57
60
  defaultTemplate;
@@ -330,7 +333,7 @@ export class DateRangePopupComponent {
330
333
  _show;
331
334
  _rangeSelection;
332
335
  windowSize;
333
- constructor(popupService, dateRangeService, zone, renderer, localization, cdr, rtl) {
336
+ constructor(popupService, dateRangeService, zone, renderer, localization, cdr, rtl, adaptiveService) {
334
337
  this.popupService = popupService;
335
338
  this.dateRangeService = dateRangeService;
336
339
  this.zone = zone;
@@ -338,6 +341,7 @@ export class DateRangePopupComponent {
338
341
  this.localization = localization;
339
342
  this.cdr = cdr;
340
343
  this.rtl = rtl;
344
+ this.adaptiveService = adaptiveService;
341
345
  }
342
346
  ngOnInit() {
343
347
  this.dateRangeService.registerPopup(this);
@@ -478,7 +482,8 @@ export class DateRangePopupComponent {
478
482
  * @hidden
479
483
  */
480
484
  onResize() {
481
- if (!this.show || this.windowSize === windowSize()) {
485
+ const currentWindowSize = this.adaptiveService.size;
486
+ if (!this.show || this.windowSize === currentWindowSize) {
482
487
  return;
483
488
  }
484
489
  if (this.actionSheet.expanded) {
@@ -487,7 +492,7 @@ export class DateRangePopupComponent {
487
492
  else {
488
493
  this.togglePopup(false);
489
494
  }
490
- this.windowSize = windowSize();
495
+ this.windowSize = currentWindowSize;
491
496
  }
492
497
  /**
493
498
  * @hidden
@@ -608,7 +613,7 @@ export class DateRangePopupComponent {
608
613
  }
609
614
  }
610
615
  toggleDateRange(show) {
611
- this.windowSize = windowSize();
616
+ this.windowSize = this.adaptiveService.size;
612
617
  if (this.isAdaptive) {
613
618
  this.toggleActionSheet(show);
614
619
  }
@@ -649,7 +654,7 @@ export class DateRangePopupComponent {
649
654
  this.renderer.setStyle(animationContainer, 'bottom', '0px');
650
655
  }
651
656
  }
652
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DateRangePopupComponent, deps: [{ token: i1.PopupService }, { token: i2.DateRangeService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i3.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: RTL, optional: true }], target: i0.ɵɵFactoryTarget.Component });
657
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DateRangePopupComponent, deps: [{ token: i1.PopupService }, { token: i2.DateRangeService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i3.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: RTL, optional: true }, { token: i4.AdaptiveService }], target: i0.ɵɵFactoryTarget.Component });
653
658
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DateRangePopupComponent, isStandalone: true, selector: "kendo-daterange-popup", inputs: { showCalendarHeader: "showCalendarHeader", focusedDate: "focusedDate", disabledDates: "disabledDates", activeView: "activeView", bottomView: "bottomView", topView: "topView", min: "min", max: "max", allowReverse: "allowReverse", animateNavigation: "animateNavigation", disabled: "disabled", views: "views", weekNumber: "weekNumber", animate: "animate", anchor: "anchor", anchorAlign: "anchorAlign", showViewHeader: "showViewHeader", showOtherMonthDays: "showOtherMonthDays", appendTo: "appendTo", collision: "collision", popupAlign: "popupAlign", margin: "margin", adaptiveMode: "adaptiveMode", title: "title", subtitle: "subtitle", size: "size" }, outputs: { open: "open", close: "close", onBlur: "blur", onFocus: "focus", cancel: "cancel" }, providers: [
654
659
  LocalizationService,
655
660
  {
@@ -937,7 +942,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
937
942
  }, {
938
943
  type: Inject,
939
944
  args: [RTL]
940
- }] }]; }, propDecorators: { container: [{
945
+ }] }, { type: i4.AdaptiveService }]; }, propDecorators: { container: [{
941
946
  type: ViewChild,
942
947
  args: ['container', { read: ViewContainerRef, static: false }]
943
948
  }], actionSheet: [{
@@ -12,6 +12,7 @@ import { NavigationService } from '../calendar/services/navigation.service';
12
12
  import { YearViewService } from '../calendar/services/year-view.service';
13
13
  import { IconsService } from '@progress/kendo-angular-icons';
14
14
  import { ResizeBatchService } from '@progress/kendo-angular-common';
15
+ import { AdaptiveService } from '@progress/kendo-angular-utils';
15
16
  import * as i0 from "@angular/core";
16
17
  import * as i1 from "./localization/daterange-popup-custom-messages.component";
17
18
  import * as i2 from "../dateinput/localization/dateinput-custom-messages.component";
@@ -75,7 +76,8 @@ export class DateRangeModule {
75
76
  // DateInputModule providers
76
77
  IconsService,
77
78
  // AdaptiveModule providers
78
- ResizeBatchService
79
+ ResizeBatchService,
80
+ AdaptiveService
79
81
  ], imports: [i3.DateInputComponent, i6.DateRangeComponent, i7.DateRangePopupComponent] });
80
82
  }
81
83
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DateRangeModule, decorators: [{
@@ -94,7 +96,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
94
96
  // DateInputModule providers
95
97
  IconsService,
96
98
  // AdaptiveModule providers
97
- ResizeBatchService
99
+ ResizeBatchService,
100
+ AdaptiveService
98
101
  ]
99
102
  }]
100
103
  }] });
@@ -10,13 +10,14 @@ import { cloneDate, isEqual, getDate } from '@progress/kendo-date-math';
10
10
  import { PopupService } from '@progress/kendo-angular-popup';
11
11
  import { IntlService } from '@progress/kendo-angular-intl';
12
12
  import { hasObservers, isControlRequired, isDocumentAvailable, KendoInput, Keys, MultiTabStop, ResizeSensorComponent, EventsOutsideAngularDirective } from '@progress/kendo-angular-common';
13
+ import { AdaptiveService } from '@progress/kendo-angular-utils';
13
14
  import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
14
15
  import { validatePackage } from '@progress/kendo-licensing';
15
16
  import { packageMetadata } from '../package-metadata';
16
17
  import { PickerService } from '../common/picker.service';
17
18
  import { DisabledDatesService } from '../calendar/services/disabled-dates.service';
18
19
  import { attributeNames, isPresent, isTruthy } from '../common/utils';
19
- import { mergeDateAndTime, noop, lastMillisecondOfDate, isInRange, isValidRange, isWindowAvailable, getFillModeClass, getRoundedClass, getSizeClass, DEFAULT_FILL_MODE, DEFAULT_ROUNDED, DEFAULT_SIZE, windowSize } from '../util';
20
+ import { mergeDateAndTime, noop, lastMillisecondOfDate, isInRange, isValidRange, isWindowAvailable, getFillModeClass, getRoundedClass, getSizeClass, DEFAULT_FILL_MODE, DEFAULT_ROUNDED, DEFAULT_SIZE } from '../util';
20
21
  import { CalendarComponent } from '../calendar/calendar.component';
21
22
  import { TimeSelectorComponent } from '../timepicker/timeselector.component';
22
23
  import { DateInputComponent } from '../dateinput/dateinput.component';
@@ -52,6 +53,7 @@ import * as i2 from "@progress/kendo-angular-intl";
52
53
  import * as i3 from "../common/picker.service";
53
54
  import * as i4 from "@progress/kendo-angular-l10n";
54
55
  import * as i5 from "../calendar/services/disabled-dates.service";
56
+ import * as i6 from "@progress/kendo-angular-utils";
55
57
  const timeFormatRegExp = new RegExp(`${TIME_PART.hour}|${TIME_PART.minute}|${TIME_PART.second}|${TIME_PART.dayperiod}|literal`);
56
58
  const VALUE_DOC_LINK = 'https://www.telerik.com/kendo-angular-ui/components/dateinputs/datetimepicker/integration-with-json/';
57
59
  const MIN_MAX_DOC_LINK = 'https://www.telerik.com/kendo-angular-ui/components/dateinputs/datetimepicker/date-time-limits/';
@@ -78,6 +80,7 @@ export class DateTimePickerComponent extends MultiTabStop {
78
80
  disabledDatesService;
79
81
  renderer;
80
82
  injector;
83
+ adaptiveService;
81
84
  /**
82
85
  * @hidden
83
86
  */
@@ -422,10 +425,7 @@ export class DateTimePickerComponent extends MultiTabStop {
422
425
  * Indicates whether the component is currently open. That is when the popup or actionSheet is open.
423
426
  */
424
427
  get isOpen() {
425
- if (!this.isAdaptive) {
426
- return isPresent(this.popupRef);
427
- }
428
- return isTruthy(this.actionSheet?.expanded);
428
+ return isTruthy(this.actionSheet?.expanded) || isPresent(this.popupRef);
429
429
  }
430
430
  /**
431
431
  * Indicates whether the component or its popup content is focused.
@@ -569,7 +569,8 @@ export class DateTimePickerComponent extends MultiTabStop {
569
569
  * @hidden
570
570
  */
571
571
  onResize() {
572
- if (!this.isOpen || this.windowSize === windowSize()) {
572
+ const currentWindowSize = this.adaptiveService.size;
573
+ if (!this.isOpen || this.windowSize === currentWindowSize) {
573
574
  return;
574
575
  }
575
576
  if (this.actionSheet.expanded) {
@@ -578,7 +579,7 @@ export class DateTimePickerComponent extends MultiTabStop {
578
579
  else {
579
580
  this._togglePopup(false);
580
581
  }
581
- this.windowSize = windowSize();
582
+ this.windowSize = currentWindowSize;
582
583
  }
583
584
  /**
584
585
  * @hidden
@@ -768,7 +769,7 @@ export class DateTimePickerComponent extends MultiTabStop {
768
769
  _rounded = DEFAULT_ROUNDED;
769
770
  _fillMode = DEFAULT_FILL_MODE;
770
771
  windowSize;
771
- constructor(popupService, intl, cdr, pickerService, ngZone, wrapper, localization, disabledDatesService, renderer, injector) {
772
+ constructor(popupService, intl, cdr, pickerService, ngZone, wrapper, localization, disabledDatesService, renderer, injector, adaptiveService) {
772
773
  super();
773
774
  this.popupService = popupService;
774
775
  this.intl = intl;
@@ -780,6 +781,7 @@ export class DateTimePickerComponent extends MultiTabStop {
780
781
  this.disabledDatesService = disabledDatesService;
781
782
  this.renderer = renderer;
782
783
  this.injector = injector;
784
+ this.adaptiveService = adaptiveService;
783
785
  validatePackage(packageMetadata);
784
786
  }
785
787
  ngOnInit() {
@@ -802,6 +804,7 @@ export class DateTimePickerComponent extends MultiTabStop {
802
804
  }
803
805
  ngAfterViewInit() {
804
806
  this.setComponentClasses();
807
+ this.windowSize = this.adaptiveService.size;
805
808
  if (this.actionSheet && isDocumentAvailable()) {
806
809
  // The following syntax is used as it does not violate CSP compliance
807
810
  this.actionSheet.element.nativeElement.style.setProperty('--kendo-actionsheet-height', '60vh');
@@ -866,12 +869,23 @@ export class DateTimePickerComponent extends MultiTabStop {
866
869
  if (this.disabled || this.readonly || show === this.isOpen) {
867
870
  return;
868
871
  }
869
- this.windowSize = windowSize();
870
- if (this.isAdaptive) {
871
- this.toggleActionSheet(show);
872
+ const previousWindowSize = this.windowSize;
873
+ this.windowSize = this.adaptiveService.size;
874
+ if (previousWindowSize !== this.windowSize && !show) {
875
+ if (previousWindowSize !== 'large') {
876
+ this.toggleActionSheet(show);
877
+ }
878
+ else {
879
+ this._togglePopup(show);
880
+ }
872
881
  }
873
882
  else {
874
- this._togglePopup(show);
883
+ if (this.isAdaptive) {
884
+ this.toggleActionSheet(show);
885
+ }
886
+ else {
887
+ this._togglePopup(show);
888
+ }
875
889
  }
876
890
  }
877
891
  /**
@@ -1073,7 +1087,7 @@ export class DateTimePickerComponent extends MultiTabStop {
1073
1087
  * @hidden
1074
1088
  */
1075
1089
  handleDateInputClick() {
1076
- this.windowSize = windowSize();
1090
+ this.windowSize = this.adaptiveService.size;
1077
1091
  if (this.isAdaptive) {
1078
1092
  this.toggleDateTime(true);
1079
1093
  }
@@ -1476,7 +1490,7 @@ export class DateTimePickerComponent extends MultiTabStop {
1476
1490
  this.renderer.addClass(this.toggleButton.nativeElement, `k-button-${this.fillMode}-base`);
1477
1491
  }
1478
1492
  }
1479
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DateTimePickerComponent, deps: [{ token: i1.PopupService }, { token: i2.IntlService }, { token: i0.ChangeDetectorRef }, { token: i3.PickerService }, { token: i0.NgZone }, { token: i0.ElementRef }, { token: i4.LocalizationService }, { token: i5.DisabledDatesService }, { token: i0.Renderer2 }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
1493
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DateTimePickerComponent, deps: [{ token: i1.PopupService }, { token: i2.IntlService }, { token: i0.ChangeDetectorRef }, { token: i3.PickerService }, { token: i0.NgZone }, { token: i0.ElementRef }, { token: i4.LocalizationService }, { token: i5.DisabledDatesService }, { token: i0.Renderer2 }, { token: i0.Injector }, { token: i6.AdaptiveService }], target: i0.ɵɵFactoryTarget.Component });
1480
1494
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DateTimePickerComponent, isStandalone: true, selector: "kendo-datetimepicker", inputs: { focusableId: "focusableId", weekDaysFormat: "weekDaysFormat", showOtherMonthDays: "showOtherMonthDays", value: "value", format: "format", twoDigitYearMax: "twoDigitYearMax", tabindex: "tabindex", disabledDates: "disabledDates", popupSettings: "popupSettings", title: "title", subtitle: "subtitle", disabled: "disabled", readonly: "readonly", readOnlyInput: "readOnlyInput", cancelButton: "cancelButton", formatPlaceholder: "formatPlaceholder", placeholder: "placeholder", steps: "steps", focusedDate: "focusedDate", calendarType: "calendarType", animateCalendarNavigation: "animateCalendarNavigation", weekNumber: "weekNumber", min: "min", max: "max", rangeValidation: "rangeValidation", disabledDatesValidation: "disabledDatesValidation", incompleteDateValidation: "incompleteDateValidation", autoCorrectParts: "autoCorrectParts", autoSwitchParts: "autoSwitchParts", autoSwitchKeys: "autoSwitchKeys", enableMouseWheel: "enableMouseWheel", allowCaretMode: "allowCaretMode", clearButton: "clearButton", autoFill: "autoFill", adaptiveMode: "adaptiveMode", inputAttributes: "inputAttributes", defaultTab: "defaultTab", size: "size", rounded: "rounded", fillMode: "fillMode", headerTemplateRef: ["headerTemplate", "headerTemplateRef"], footerTemplateRef: ["footerTemplate", "footerTemplateRef"], footer: "footer" }, outputs: { valueChange: "valueChange", open: "open", close: "close", onFocus: "focus", onBlur: "blur", escape: "escape" }, host: { properties: { "class.k-datetimepicker": "this.hostClasses", "class.k-input": "this.hostClasses", "class.k-disabled": "this.disabledClass", "class.k-readonly": "this.readonly" } }, providers: [
1481
1495
  PickerService,
1482
1496
  LocalizationService,
@@ -2292,7 +2306,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2292
2306
  standalone: true,
2293
2307
  imports: [LocalizedMessagesDirective, DateInputComponent, EventsOutsideAngularDirective, DateInputCustomMessagesComponent, NgIf, IconWrapperComponent, NgTemplateOutlet, ResizeSensorComponent, ActionSheetComponent, ActionSheetTemplateDirective, ButtonComponent, NgClass, CalendarComponent, CalendarCustomMessagesComponent, TimeSelectorComponent, TimeSelectorCustomMessagesComponent]
2294
2308
  }]
2295
- }], ctorParameters: function () { return [{ type: i1.PopupService }, { type: i2.IntlService }, { type: i0.ChangeDetectorRef }, { type: i3.PickerService }, { type: i0.NgZone }, { type: i0.ElementRef }, { type: i4.LocalizationService }, { type: i5.DisabledDatesService }, { type: i0.Renderer2 }, { type: i0.Injector }]; }, propDecorators: { hostClasses: [{
2309
+ }], ctorParameters: function () { return [{ type: i1.PopupService }, { type: i2.IntlService }, { type: i0.ChangeDetectorRef }, { type: i3.PickerService }, { type: i0.NgZone }, { type: i0.ElementRef }, { type: i4.LocalizationService }, { type: i5.DisabledDatesService }, { type: i0.Renderer2 }, { type: i0.Injector }, { type: i6.AdaptiveService }]; }, propDecorators: { hostClasses: [{
2296
2310
  type: HostBinding,
2297
2311
  args: ['class.k-datetimepicker']
2298
2312
  }, {
@@ -5,7 +5,7 @@
5
5
  import { NgModule } from '@angular/core';
6
6
  import { KENDO_DATETIMEPICKER } from '../directives';
7
7
  import { IconsService } from '@progress/kendo-angular-icons';
8
- import { KENDO_TOGGLEBUTTONTABSTOP, ResizeBatchService } from '@progress/kendo-angular-common';
8
+ import { ResizeBatchService, KENDO_TOGGLEBUTTONTABSTOP } from '@progress/kendo-angular-common';
9
9
  import { PopupService } from '@progress/kendo-angular-popup';
10
10
  import { CenturyViewService } from '../calendar/services/century-view.service';
11
11
  import { DecadeViewService } from '../calendar/services/decade-view.service';
@@ -19,6 +19,7 @@ import { HoursService } from '../timepicker/services/hours.service';
19
19
  import { MillisecondsService } from '../timepicker/services/milliseconds.service';
20
20
  import { MinutesService } from '../timepicker/services/minutes.service';
21
21
  import { SecondsService } from '../timepicker/services/seconds.service';
22
+ import { AdaptiveService } from '@progress/kendo-angular-utils';
22
23
  import * as i0 from "@angular/core";
23
24
  import * as i1 from "./localization/datetimepicker-custom-messages.component";
24
25
  import * as i2 from "./datetimepicker.component";
@@ -59,6 +60,7 @@ export class DateTimePickerModule {
59
60
  SecondsService,
60
61
  MillisecondsService,
61
62
  DayPeriodService,
63
+ AdaptiveService
62
64
  ], imports: [i2.DateTimePickerComponent] });
63
65
  }
64
66
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DateTimePickerModule, decorators: [{
@@ -84,6 +86,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
84
86
  SecondsService,
85
87
  MillisecondsService,
86
88
  DayPeriodService,
89
+ AdaptiveService
87
90
  ]
88
91
  }]
89
92
  }] });
@@ -9,7 +9,7 @@ export const packageMetadata = {
9
9
  name: '@progress/kendo-angular-dateinputs',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1734358896,
13
- version: '17.1.2-develop.4',
12
+ publishDate: 1734364421,
13
+ version: '17.2.0-develop.1',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
15
15
  };