@progress/kendo-angular-dateinputs 13.0.0-develop.6 → 13.0.0-develop.8

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.
@@ -62,6 +62,7 @@ export declare class HorizontalViewListComponent implements OnChanges, AfterView
62
62
  get getComponentDecadeClass(): boolean;
63
63
  get getComponentCenturyClass(): boolean;
64
64
  get role(): string;
65
+ get tabindex(): string;
65
66
  get getActiveDescendant(): string;
66
67
  get getTabIndex(): number;
67
68
  service: ViewService;
@@ -26,4 +26,12 @@ export interface KeyDown {
26
26
  * @hidden
27
27
  */
28
28
  preventDefault?: Function;
29
+ /**
30
+ * @hidden
31
+ */
32
+ stopPropagation?: Function;
33
+ /**
34
+ * @hidden
35
+ */
36
+ altKey: boolean;
29
37
  }
@@ -250,6 +250,18 @@ export declare class MultiViewCalendarComponent implements AfterViewInit, Contro
250
250
  * @hidden
251
251
  */
252
252
  focusCalendar: EventEmitter<any>;
253
+ /**
254
+ * @hidden
255
+ */
256
+ onClosePopup: EventEmitter<KeyDown>;
257
+ /**
258
+ * @hidden
259
+ */
260
+ onTabPress: EventEmitter<KeyDown>;
261
+ /**
262
+ * @hidden
263
+ */
264
+ onShiftTabPress: EventEmitter<KeyDown>;
253
265
  /**
254
266
  * @hidden
255
267
  *
@@ -523,5 +535,5 @@ export declare class MultiViewCalendarComponent implements AfterViewInit, Contro
523
535
  private parseSelectionToValue;
524
536
  private performSelection;
525
537
  static ɵfac: i0.ɵɵFactoryDeclaration<MultiViewCalendarComponent, never>;
526
- static ɵcmp: i0.ɵɵComponentDeclaration<MultiViewCalendarComponent, "kendo-multiviewcalendar", ["kendo-multiviewcalendar"], { "id": "id"; "focusedDate": "focusedDate"; "min": "min"; "max": "max"; "rangeValidation": "rangeValidation"; "disabledDatesRangeValidation": "disabledDatesRangeValidation"; "selection": "selection"; "value": "value"; "disabled": "disabled"; "tabindex": "tabindex"; "tabIndex": "tabIndex"; "isActive": "isActive"; "disabledDates": "disabledDates"; "activeView": "activeView"; "bottomView": "bottomView"; "topView": "topView"; "showViewHeader": "showViewHeader"; "animateNavigation": "animateNavigation"; "weekNumber": "weekNumber"; "activeRangeEnd": "activeRangeEnd"; "selectionRange": "selectionRange"; "views": "views"; "orientation": "orientation"; "cellTemplateRef": "cellTemplate"; "monthCellTemplateRef": "monthCellTemplate"; "yearCellTemplateRef": "yearCellTemplate"; "decadeCellTemplateRef": "decadeCellTemplate"; "centuryCellTemplateRef": "centuryCellTemplate"; "weekNumberTemplateRef": "weekNumberTemplate"; "headerTitleTemplateRef": "headerTitleTemplate"; }, { "activeViewChange": "activeViewChange"; "navigate": "navigate"; "cellEnter": "cellEnter"; "cellLeave": "cellLeave"; "valueChange": "valueChange"; "blurEvent": "blur"; "focusEvent": "focus"; "focusCalendar": "focusCalendar"; }, ["cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate"], never>;
538
+ static ɵcmp: i0.ɵɵComponentDeclaration<MultiViewCalendarComponent, "kendo-multiviewcalendar", ["kendo-multiviewcalendar"], { "id": "id"; "focusedDate": "focusedDate"; "min": "min"; "max": "max"; "rangeValidation": "rangeValidation"; "disabledDatesRangeValidation": "disabledDatesRangeValidation"; "selection": "selection"; "value": "value"; "disabled": "disabled"; "tabindex": "tabindex"; "tabIndex": "tabIndex"; "isActive": "isActive"; "disabledDates": "disabledDates"; "activeView": "activeView"; "bottomView": "bottomView"; "topView": "topView"; "showViewHeader": "showViewHeader"; "animateNavigation": "animateNavigation"; "weekNumber": "weekNumber"; "activeRangeEnd": "activeRangeEnd"; "selectionRange": "selectionRange"; "views": "views"; "orientation": "orientation"; "cellTemplateRef": "cellTemplate"; "monthCellTemplateRef": "monthCellTemplate"; "yearCellTemplateRef": "yearCellTemplate"; "decadeCellTemplateRef": "decadeCellTemplate"; "centuryCellTemplateRef": "centuryCellTemplate"; "weekNumberTemplateRef": "weekNumberTemplate"; "headerTitleTemplateRef": "headerTitleTemplate"; }, { "activeViewChange": "activeViewChange"; "navigate": "navigate"; "cellEnter": "cellEnter"; "cellLeave": "cellLeave"; "valueChange": "valueChange"; "blurEvent": "blur"; "focusEvent": "focus"; "focusCalendar": "focusCalendar"; "onClosePopup": "onClosePopup"; "onTabPress": "onTabPress"; "onShiftTabPress": "onShiftTabPress"; }, ["cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate"], never>;
527
539
  }
@@ -13,6 +13,7 @@ import { AdaptiveMode } from '../util';
13
13
  import { SVGIcon } from '@progress/kendo-svg-icons';
14
14
  import { DateRangeSelectionDirective } from './date-range-selection.directive';
15
15
  import { ActionSheetComponent } from '@progress/kendo-angular-navigation';
16
+ import { KeyDown } from '../calendar/models/keydown.interface';
16
17
  import * as i0 from "@angular/core";
17
18
  /**
18
19
  * Represents the Kendo UI DateRangePopup component for Angular.
@@ -219,6 +220,18 @@ export declare class DateRangePopupComponent implements OnInit, OnDestroy {
219
220
  * @hidden
220
221
  */
221
222
  onResize(): void;
223
+ /**
224
+ * @hidden
225
+ */
226
+ closePopup(event: KeyDown): void;
227
+ /**
228
+ * @hidden
229
+ */
230
+ handleTab(event: KeyDown): void;
231
+ /**
232
+ * @hidden
233
+ */
234
+ handleShiftTab(event: KeyDown): void;
222
235
  private handleWindowBlur;
223
236
  private handleMouseLeave;
224
237
  private handleKeydown;
@@ -1067,7 +1067,7 @@ CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
1067
1067
  </kendo-multiviewcalendar-messages>
1068
1068
  </kendo-multiviewcalendar>
1069
1069
  </ng-container>
1070
- `, isInline: true, components: [{ type: i9.NavigationComponent, selector: "kendo-calendar-navigation", inputs: ["activeView", "min", "max", "focusedDate", "templateRef"], outputs: ["valueChange", "pageChange"] }, { type: i10.ViewListComponent, selector: "kendo-calendar-viewlist", inputs: ["cellTemplateRef", "weekNumberTemplateRef", "headerTitleTemplateRef", "activeView", "cellUID", "focusedDate", "isActive", "min", "max", "selectedDates", "tabIndex", "disabled", "id", "weekNumber"], outputs: ["cellClick", "weekNumberCellClick", "activeDateChange", "todayButtonClick", "pageChange", "focusCalendar", "blurCalendar", "focusedCellChange"] }, { type: i11.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { type: i12.MultiViewCalendarComponent, selector: "kendo-multiviewcalendar", inputs: ["id", "focusedDate", "min", "max", "rangeValidation", "disabledDatesRangeValidation", "selection", "value", "disabled", "tabindex", "tabIndex", "isActive", "disabledDates", "activeView", "bottomView", "topView", "showViewHeader", "animateNavigation", "weekNumber", "activeRangeEnd", "selectionRange", "views", "orientation", "cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate"], outputs: ["activeViewChange", "navigate", "cellEnter", "cellLeave", "valueChange", "blur", "focus", "focusCalendar"], exportAs: ["kendo-multiviewcalendar"] }, { type: i13.MultiViewCalendarCustomMessagesComponent, selector: "kendo-multiviewcalendar-messages" }], directives: [{ type: i14.CalendarLocalizedMessagesDirective, selector: "[kendoCalendarLocalizedMessages]" }, { type: i15.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1070
+ `, isInline: true, components: [{ type: i9.NavigationComponent, selector: "kendo-calendar-navigation", inputs: ["activeView", "min", "max", "focusedDate", "templateRef"], outputs: ["valueChange", "pageChange"] }, { type: i10.ViewListComponent, selector: "kendo-calendar-viewlist", inputs: ["cellTemplateRef", "weekNumberTemplateRef", "headerTitleTemplateRef", "activeView", "cellUID", "focusedDate", "isActive", "min", "max", "selectedDates", "tabIndex", "disabled", "id", "weekNumber"], outputs: ["cellClick", "weekNumberCellClick", "activeDateChange", "todayButtonClick", "pageChange", "focusCalendar", "blurCalendar", "focusedCellChange"] }, { type: i11.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { type: i12.MultiViewCalendarComponent, selector: "kendo-multiviewcalendar", inputs: ["id", "focusedDate", "min", "max", "rangeValidation", "disabledDatesRangeValidation", "selection", "value", "disabled", "tabindex", "tabIndex", "isActive", "disabledDates", "activeView", "bottomView", "topView", "showViewHeader", "animateNavigation", "weekNumber", "activeRangeEnd", "selectionRange", "views", "orientation", "cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate"], outputs: ["activeViewChange", "navigate", "cellEnter", "cellLeave", "valueChange", "blur", "focus", "focusCalendar", "onClosePopup", "onTabPress", "onShiftTabPress"], exportAs: ["kendo-multiviewcalendar"] }, { type: i13.MultiViewCalendarCustomMessagesComponent, selector: "kendo-multiviewcalendar-messages" }], directives: [{ type: i14.CalendarLocalizedMessagesDirective, selector: "[kendoCalendarLocalizedMessages]" }, { type: i15.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1071
1071
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CalendarComponent, decorators: [{
1072
1072
  type: Component,
1073
1073
  args: [{
@@ -89,13 +89,16 @@ export class HorizontalViewListComponent {
89
89
  return this.activeView === CalendarViewEnum.century;
90
90
  }
91
91
  get role() {
92
- return this.views === 2 ? 'grid' : null;
92
+ return this.views >= 2 ? 'grid' : null;
93
+ }
94
+ get tabindex() {
95
+ return this.views >= 2 ? '0' : null;
93
96
  }
94
97
  get getActiveDescendant() {
95
98
  return this.views === 1 ? this.activeDescendant : null;
96
99
  }
97
100
  get getTabIndex() {
98
- return this.disabled || this.views === 2 ? null : this.tabIndex;
101
+ return this.disabled || this.views >= 2 ? null : this.tabIndex;
99
102
  }
100
103
  ngOnChanges(changes) {
101
104
  this.initService();
@@ -120,7 +123,7 @@ export class HorizontalViewListComponent {
120
123
  }
121
124
  this.setAriaActivedescendant();
122
125
  //set tabindex for MultiViewCalendar
123
- if (this.views === 2) {
126
+ if (this.views >= 2) {
124
127
  this.renderer.setAttribute(this.element.nativeElement, 'tabindex', this.tabIndex.toString());
125
128
  }
126
129
  }
@@ -267,16 +270,16 @@ export class HorizontalViewListComponent {
267
270
  return Math.min(this.total - skip, this.views);
268
271
  }
269
272
  setAriaActivedescendant() {
270
- if (this.views === 2) {
273
+ if (this.views >= 2) {
271
274
  this.renderer.setAttribute(this.element.nativeElement, attributeNames.ariaActiveDescendant, this.activeDescendant);
272
275
  }
273
276
  }
274
277
  }
275
278
  HorizontalViewListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: HorizontalViewListComponent, deps: [{ token: i1.BusViewService }, { token: i2.IntlService }, { token: i3.WeekNamesService }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
276
- HorizontalViewListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: HorizontalViewListComponent, selector: "kendo-calendar-horizontal", inputs: { cellTemplateRef: "cellTemplateRef", weekNumberTemplateRef: "weekNumberTemplateRef", activeRangeEnd: "activeRangeEnd", activeView: "activeView", cellUID: "cellUID", focusedDate: "focusedDate", isActive: "isActive", min: "min", max: "max", selectionRange: "selectionRange", selectedDates: "selectedDates", views: "views", showViewHeader: "showViewHeader", animateNavigation: "animateNavigation", orientation: "orientation", activeDescendant: "activeDescendant", tabIndex: "tabIndex", disabled: "disabled", id: "id", weekNumber: "weekNumber" }, outputs: { cellClick: "cellClick", weekNumberCellClick: "weekNumberCellClick", cellEnter: "cellEnter", cellLeave: "cellLeave", activeDateChange: "activeDateChange", focusCalendar: "focusCalendar", blurCalendar: "blurCalendar", focusedCellChange: "focusedCellChange" }, host: { listeners: { "focus": "handleMultiViewCalendarFocus()", "blur": "handleMultiViewCalendarBlur($event)" }, properties: { "class.k-calendar-view": "this.getComponentClass", "class.k-align-items-start": "this.getComponentClass", "class.k-justify-content-center": "this.getComponentClass", "class.k-hstack": "this.horizontalHostClass", "class.k-vstack": "this.verticalHostClass", "class.k-calendar-monthview": "this.getComponentMonthClass", "class.k-calendar-yearview": "this.getComponentYearClass", "class.k-calendar-decadeview": "this.getComponentDecadeClass", "class.k-calendar-centuryview": "this.getComponentCenturyClass", "attr.role": "this.role" } }, usesOnChanges: true, ngImport: i0, template: `
279
+ HorizontalViewListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: HorizontalViewListComponent, selector: "kendo-calendar-horizontal", inputs: { cellTemplateRef: "cellTemplateRef", weekNumberTemplateRef: "weekNumberTemplateRef", activeRangeEnd: "activeRangeEnd", activeView: "activeView", cellUID: "cellUID", focusedDate: "focusedDate", isActive: "isActive", min: "min", max: "max", selectionRange: "selectionRange", selectedDates: "selectedDates", views: "views", showViewHeader: "showViewHeader", animateNavigation: "animateNavigation", orientation: "orientation", activeDescendant: "activeDescendant", tabIndex: "tabIndex", disabled: "disabled", id: "id", weekNumber: "weekNumber" }, outputs: { cellClick: "cellClick", weekNumberCellClick: "weekNumberCellClick", cellEnter: "cellEnter", cellLeave: "cellLeave", activeDateChange: "activeDateChange", focusCalendar: "focusCalendar", blurCalendar: "blurCalendar", focusedCellChange: "focusedCellChange" }, host: { listeners: { "focus": "handleMultiViewCalendarFocus()", "blur": "handleMultiViewCalendarBlur($event)" }, properties: { "class.k-calendar-view": "this.getComponentClass", "class.k-align-items-start": "this.getComponentClass", "class.k-justify-content-center": "this.getComponentClass", "class.k-hstack": "this.horizontalHostClass", "class.k-vstack": "this.verticalHostClass", "class.k-calendar-monthview": "this.getComponentMonthClass", "class.k-calendar-yearview": "this.getComponentYearClass", "class.k-calendar-decadeview": "this.getComponentDecadeClass", "class.k-calendar-centuryview": "this.getComponentCenturyClass", "attr.role": "this.role", "attr.tabindex": "this.tabindex" } }, usesOnChanges: true, ngImport: i0, template: `
277
280
  <ng-template #tableTemplate let-date="date" let-class="className">
278
281
  <table
279
- [attr.role]="views === 2 ? 'none' : 'grid'"
282
+ [attr.role]="views >= 2 ? 'none' : 'grid'"
280
283
  class="k-content k-calendar-table"
281
284
  [ngClass]="class"
282
285
  [attr.aria-labelledby]="id"
@@ -363,7 +366,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
363
366
  template: `
364
367
  <ng-template #tableTemplate let-date="date" let-class="className">
365
368
  <table
366
- [attr.role]="views === 2 ? 'none' : 'grid'"
369
+ [attr.role]="views >= 2 ? 'none' : 'grid'"
367
370
  class="k-content k-calendar-table"
368
371
  [ngClass]="class"
369
372
  [attr.aria-labelledby]="id"
@@ -535,4 +538,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
535
538
  }], role: [{
536
539
  type: HostBinding,
537
540
  args: ['attr.role']
541
+ }], tabindex: [{
542
+ type: HostBinding,
543
+ args: ['attr.tabindex']
538
544
  }] } });
@@ -201,6 +201,18 @@ export class MultiViewCalendarComponent {
201
201
  * @hidden
202
202
  */
203
203
  this.focusCalendar = new EventEmitter();
204
+ /**
205
+ * @hidden
206
+ */
207
+ this.onClosePopup = new EventEmitter();
208
+ /**
209
+ * @hidden
210
+ */
211
+ this.onTabPress = new EventEmitter();
212
+ /**
213
+ * @hidden
214
+ */
215
+ this.onShiftTabPress = new EventEmitter();
204
216
  this.cellUID = guid();
205
217
  this.isHovered = false;
206
218
  this.isPrevDisabled = true;
@@ -245,7 +257,7 @@ export class MultiViewCalendarComponent {
245
257
  * @hidden
246
258
  */
247
259
  get multiViewCalendarHeaderIdLabel() {
248
- return this.views === 2 ? this.id + 'header-' : null;
260
+ return this.views >= 2 ? this.id + 'header-' : null;
249
261
  }
250
262
  /**
251
263
  * @hidden
@@ -423,7 +435,7 @@ export class MultiViewCalendarComponent {
423
435
  return CalendarViewEnum[this.topView];
424
436
  }
425
437
  get widgetId() {
426
- return this.views === 2 ? this.id : null;
438
+ return this.views >= 2 ? this.id : null;
427
439
  }
428
440
  get ariaDisabled() {
429
441
  return this.disabled;
@@ -493,6 +505,11 @@ export class MultiViewCalendarComponent {
493
505
  const onArrowLeftAndControl = event.keyCode === Keys.ArrowLeft && ctrlKey;
494
506
  const onTKeyPress = event.keyCode === Keys.KeyT;
495
507
  const onEnterKeyPress = event.keyCode === Keys.Enter;
508
+ const onArrowUpPress = event.keyCode === Keys.ArrowUp;
509
+ const altKey = event.altKey;
510
+ const escKey = event.keyCode === Keys.Escape;
511
+ const tabKeyPress = event.keyCode === Keys.Tab;
512
+ const shiftKeyPress = event.shiftKey;
496
513
  if (onArrowRightAndControl) {
497
514
  event.preventDefault();
498
515
  this.navigateView(this.nextView);
@@ -515,6 +532,17 @@ export class MultiViewCalendarComponent {
515
532
  this.selectionService.lastClicked = this.focusedDate;
516
533
  this.performSelection(this.focusedDate, event);
517
534
  }
535
+ if (this.views >= 2) {
536
+ if ((escKey || (altKey && onArrowUpPress))) {
537
+ this.onClosePopup.emit(event);
538
+ }
539
+ else if ((tabKeyPress && shiftKeyPress)) {
540
+ this.onShiftTabPress.emit(event);
541
+ }
542
+ else if ((tabKeyPress && !shiftKeyPress)) {
543
+ this.onTabPress.emit(event);
544
+ }
545
+ }
518
546
  const candidate = dateInRange(this.navigator.move(this.focusedDate, this.navigator.action(event), this.activeViewEnum), this.min, this.max);
519
547
  if (isEqual(this.focusedDate, candidate)) {
520
548
  return;
@@ -590,7 +618,7 @@ export class MultiViewCalendarComponent {
590
618
  if (!this.element) {
591
619
  return;
592
620
  }
593
- const activeElement = this.views === 2 ? this.element.nativeElement.querySelector('.k-calendar-view') :
621
+ const activeElement = this.views >= 2 ? this.element.nativeElement.querySelector('.k-calendar-view') :
594
622
  this.element.nativeElement.querySelector('.k-content.k-calendar-table');
595
623
  activeElement.blur();
596
624
  }
@@ -800,7 +828,7 @@ export class MultiViewCalendarComponent {
800
828
  }
801
829
  }
802
830
  MultiViewCalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: MultiViewCalendarComponent, deps: [{ token: i1.BusViewService }, { token: i0.ElementRef }, { token: i2.NavigationService }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i3.DisabledDatesService }, { token: i4.SelectionService }], target: i0.ɵɵFactoryTarget.Component });
803
- MultiViewCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: MultiViewCalendarComponent, selector: "kendo-multiviewcalendar", inputs: { id: "id", focusedDate: "focusedDate", min: "min", max: "max", rangeValidation: "rangeValidation", disabledDatesRangeValidation: "disabledDatesRangeValidation", selection: "selection", value: "value", disabled: "disabled", tabindex: "tabindex", tabIndex: "tabIndex", isActive: "isActive", disabledDates: "disabledDates", activeView: "activeView", bottomView: "bottomView", topView: "topView", showViewHeader: "showViewHeader", animateNavigation: "animateNavigation", weekNumber: "weekNumber", activeRangeEnd: "activeRangeEnd", selectionRange: "selectionRange", views: "views", orientation: "orientation", cellTemplateRef: ["cellTemplate", "cellTemplateRef"], monthCellTemplateRef: ["monthCellTemplate", "monthCellTemplateRef"], yearCellTemplateRef: ["yearCellTemplate", "yearCellTemplateRef"], decadeCellTemplateRef: ["decadeCellTemplate", "decadeCellTemplateRef"], centuryCellTemplateRef: ["centuryCellTemplate", "centuryCellTemplateRef"], weekNumberTemplateRef: ["weekNumberTemplate", "weekNumberTemplateRef"], headerTitleTemplateRef: ["headerTitleTemplate", "headerTitleTemplateRef"] }, outputs: { activeViewChange: "activeViewChange", navigate: "navigate", cellEnter: "cellEnter", cellLeave: "cellLeave", valueChange: "valueChange", blurEvent: "blur", focusEvent: "focus", focusCalendar: "focusCalendar" }, host: { listeners: { "mouseenter": "handleMouseEnter()", "mouseleave": "handleMouseLeave()", "mousedown": "handleMousedown($event)", "click": "handleClick()", "keydown": "keydown($event)" }, properties: { "attr.id": "this.widgetId", "attr.aria-disabled": "this.ariaDisabled", "class.k-disabled": "this.ariaDisabled" } }, providers: [
831
+ MultiViewCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: MultiViewCalendarComponent, selector: "kendo-multiviewcalendar", inputs: { id: "id", focusedDate: "focusedDate", min: "min", max: "max", rangeValidation: "rangeValidation", disabledDatesRangeValidation: "disabledDatesRangeValidation", selection: "selection", value: "value", disabled: "disabled", tabindex: "tabindex", tabIndex: "tabIndex", isActive: "isActive", disabledDates: "disabledDates", activeView: "activeView", bottomView: "bottomView", topView: "topView", showViewHeader: "showViewHeader", animateNavigation: "animateNavigation", weekNumber: "weekNumber", activeRangeEnd: "activeRangeEnd", selectionRange: "selectionRange", views: "views", orientation: "orientation", cellTemplateRef: ["cellTemplate", "cellTemplateRef"], monthCellTemplateRef: ["monthCellTemplate", "monthCellTemplateRef"], yearCellTemplateRef: ["yearCellTemplate", "yearCellTemplateRef"], decadeCellTemplateRef: ["decadeCellTemplate", "decadeCellTemplateRef"], centuryCellTemplateRef: ["centuryCellTemplate", "centuryCellTemplateRef"], weekNumberTemplateRef: ["weekNumberTemplate", "weekNumberTemplateRef"], headerTitleTemplateRef: ["headerTitleTemplate", "headerTitleTemplateRef"] }, outputs: { activeViewChange: "activeViewChange", navigate: "navigate", cellEnter: "cellEnter", cellLeave: "cellLeave", valueChange: "valueChange", blurEvent: "blur", focusEvent: "focus", focusCalendar: "focusCalendar", onClosePopup: "onClosePopup", onTabPress: "onTabPress", onShiftTabPress: "onShiftTabPress" }, host: { listeners: { "mouseenter": "handleMouseEnter()", "mouseleave": "handleMouseLeave()", "mousedown": "handleMousedown($event)", "click": "handleClick()", "keydown": "keydown($event)" }, properties: { "attr.id": "this.widgetId", "attr.aria-disabled": "this.ariaDisabled", "class.k-disabled": "this.ariaDisabled" } }, providers: [
804
832
  BusViewService,
805
833
  RANGE_CALENDAR_VALUE_ACCESSOR,
806
834
  RANGE_CALENDAR_RANGE_VALIDATORS,
@@ -1024,6 +1052,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
1024
1052
  args: ['focus']
1025
1053
  }], focusCalendar: [{
1026
1054
  type: Output
1055
+ }], onClosePopup: [{
1056
+ type: Output
1057
+ }], onTabPress: [{
1058
+ type: Output
1059
+ }], onShiftTabPress: [{
1060
+ type: Output
1027
1061
  }], cellTemplate: [{
1028
1062
  type: ContentChild,
1029
1063
  args: [CellTemplateDirective, { static: false }]
@@ -6,7 +6,6 @@ import { ElementRef, Renderer2, NgZone, Directive } from '@angular/core';
6
6
  import { cloneDate } from '@progress/kendo-date-math';
7
7
  import { Keys } from '@progress/kendo-angular-common';
8
8
  import { Subscription, fromEvent } from 'rxjs';
9
- import { filter } from 'rxjs/operators';
10
9
  import { DateInputComponent } from '../dateinput/dateinput.component';
11
10
  import { DateRangeService } from './date-range.service';
12
11
  import { isPresent } from '../common/utils';
@@ -43,7 +42,6 @@ export class DateRangeInput {
43
42
  }
44
43
  [
45
44
  this.input.onBlur.subscribe(() => this.deactivate()),
46
- this.input.onFocus.pipe(filter(() => !this.popupCalendarActivated)).subscribe(() => this.activate()),
47
45
  this.input.valueUpdate.subscribe(value => this.updateRange(value, 'change')),
48
46
  this.dateRangeService.activeRangeEnd$.subscribe(() => {
49
47
  if (this.navigateCalendarOnFocus) {
@@ -301,6 +301,48 @@ export class DateRangePopupComponent {
301
301
  }
302
302
  this.windowSize = windowSize();
303
303
  }
304
+ /**
305
+ * @hidden
306
+ */
307
+ closePopup(event) {
308
+ event.preventDefault();
309
+ event.stopPropagation();
310
+ this.toggle(false);
311
+ if (this.dateRangeService.activeRangeEnd === 'start' || !this.dateRangeService.activeRangeEnd) {
312
+ this.dateRangeService.startInput$.value.focus();
313
+ }
314
+ else {
315
+ this.dateRangeService.endInput$.value.focus();
316
+ }
317
+ ;
318
+ }
319
+ /**
320
+ * @hidden
321
+ */
322
+ handleTab(event) {
323
+ event.preventDefault();
324
+ event.stopPropagation();
325
+ if (this.dateRangeService.activeRangeEnd === 'start' || !this.dateRangeService.activeRangeEnd) {
326
+ this.dateRangeService.setActiveRangeEnd('end');
327
+ }
328
+ else {
329
+ this.dateRangeService.endInput$.value.focus();
330
+ }
331
+ }
332
+ ;
333
+ /**
334
+ * @hidden
335
+ */
336
+ handleShiftTab(event) {
337
+ event.preventDefault();
338
+ event.stopPropagation();
339
+ if (this.dateRangeService.activeRangeEnd === 'end') {
340
+ this.dateRangeService.setActiveRangeEnd('start');
341
+ }
342
+ else {
343
+ this.dateRangeService.startInput$.value.focus();
344
+ }
345
+ }
304
346
  handleWindowBlur() {
305
347
  if (!this.show || this.actionSheet.expanded) {
306
348
  return;
@@ -445,7 +487,7 @@ DateRangePopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
445
487
  </ng-container>
446
488
  <ng-container #container></ng-container>
447
489
  <ng-template #defaultTemplate>
448
- <kendo-multiviewcalendar kendoDateRangeSelection></kendo-multiviewcalendar>
490
+ <kendo-multiviewcalendar kendoDateRangeSelection (onClosePopup)="closePopup($event)" (onTabPress)="handleTab($event)" (onShiftTabPress)="handleShiftTab($event)"></kendo-multiviewcalendar>
449
491
  </ng-template>
450
492
 
451
493
  <kendo-actionsheet
@@ -513,7 +555,7 @@ DateRangePopupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
513
555
  </div>
514
556
  </ng-template>
515
557
  </kendo-actionsheet>
516
- `, isInline: true, components: [{ type: i4.MultiViewCalendarComponent, selector: "kendo-multiviewcalendar", inputs: ["id", "focusedDate", "min", "max", "rangeValidation", "disabledDatesRangeValidation", "selection", "value", "disabled", "tabindex", "tabIndex", "isActive", "disabledDates", "activeView", "bottomView", "topView", "showViewHeader", "animateNavigation", "weekNumber", "activeRangeEnd", "selectionRange", "views", "orientation", "cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate"], outputs: ["activeViewChange", "navigate", "cellEnter", "cellLeave", "valueChange", "blur", "focus", "focusCalendar"], exportAs: ["kendo-multiviewcalendar"] }, { type: i5.ActionSheetComponent, selector: "kendo-actionsheet", inputs: ["title", "subtitle", "items", "cssClass", "animation", "expanded", "titleId"], outputs: ["expandedChange", "expand", "collapse", "itemClick", "overlayClick"], exportAs: ["kendoActionSheet"] }, { type: i6.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { type: i7.Button, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }], directives: [{ type: i8.DateRangePopupLocalizedMessagesDirective, selector: "[kendoDateRangePopupLocalizedMessages]" }, { type: i9.DateRangeSelectionDirective, selector: "[kendoDateRangeSelection]", inputs: ["autoCorrectOn", "selectionRange", "activeRangeEnd", "shouldSetRange"], outputs: ["activeRangeEndChange", "selectionRangeChange"] }, { type: i5.ActionSheetTemplateDirective, selector: "[kendoActionSheetTemplate]" }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
558
+ `, isInline: true, components: [{ type: i4.MultiViewCalendarComponent, selector: "kendo-multiviewcalendar", inputs: ["id", "focusedDate", "min", "max", "rangeValidation", "disabledDatesRangeValidation", "selection", "value", "disabled", "tabindex", "tabIndex", "isActive", "disabledDates", "activeView", "bottomView", "topView", "showViewHeader", "animateNavigation", "weekNumber", "activeRangeEnd", "selectionRange", "views", "orientation", "cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate"], outputs: ["activeViewChange", "navigate", "cellEnter", "cellLeave", "valueChange", "blur", "focus", "focusCalendar", "onClosePopup", "onTabPress", "onShiftTabPress"], exportAs: ["kendo-multiviewcalendar"] }, { type: i5.ActionSheetComponent, selector: "kendo-actionsheet", inputs: ["title", "subtitle", "items", "cssClass", "animation", "expanded", "titleId"], outputs: ["expandedChange", "expand", "collapse", "itemClick", "overlayClick"], exportAs: ["kendoActionSheet"] }, { type: i6.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { type: i7.Button, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }], directives: [{ type: i8.DateRangePopupLocalizedMessagesDirective, selector: "[kendoDateRangePopupLocalizedMessages]" }, { type: i9.DateRangeSelectionDirective, selector: "[kendoDateRangeSelection]", inputs: ["autoCorrectOn", "selectionRange", "activeRangeEnd", "shouldSetRange"], outputs: ["activeRangeEndChange", "selectionRangeChange"] }, { type: i5.ActionSheetTemplateDirective, selector: "[kendoActionSheetTemplate]" }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
517
559
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DateRangePopupComponent, decorators: [{
518
560
  type: Component,
519
561
  args: [{
@@ -543,7 +585,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
543
585
  </ng-container>
544
586
  <ng-container #container></ng-container>
545
587
  <ng-template #defaultTemplate>
546
- <kendo-multiviewcalendar kendoDateRangeSelection></kendo-multiviewcalendar>
588
+ <kendo-multiviewcalendar kendoDateRangeSelection (onClosePopup)="closePopup($event)" (onTabPress)="handleTab($event)" (onShiftTabPress)="handleShiftTab($event)"></kendo-multiviewcalendar>
547
589
  </ng-template>
548
590
 
549
591
  <kendo-actionsheet
@@ -1531,7 +1531,7 @@ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
1531
1531
  </div>
1532
1532
  <div
1533
1533
  *ngIf="!isAdaptive"
1534
- class="k-datetime-footer k-action-buttons k-actions k-hstack k-justify-content-stretch"
1534
+ class="k-datetime-footer k-actions k-actions-stretched k-actions-horizontal"
1535
1535
  [kendoEventsOutsideAngular]="{
1536
1536
  focusin: handleFocus,
1537
1537
  focusout: handleBlur
@@ -1539,34 +1539,34 @@ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
1539
1539
  [scope]="this"
1540
1540
  >
1541
1541
  <button
1542
- *ngIf="cancelButton"
1543
1542
  type="button"
1544
- class="k-button k-time-cancel"
1545
- [ngClass]="popupButtonsClasses()"
1546
- [attr.title]="localization.get('cancelLabel')"
1547
- [attr.aria-label]="localization.get('cancelLabel')"
1543
+ class="k-button k-time-accept"
1544
+ [ngClass]="popupButtonsClasses('primary')"
1545
+ [attr.title]="localization.get('acceptLabel')"
1546
+ [attr.aria-label]="localization.get('acceptLabel')"
1547
+ [disabled]="!calendarValue"
1548
1548
  [kendoEventsOutsideAngular]="{
1549
- click: handleCancel,
1549
+ click: handleAccept,
1550
1550
  'keydown.tab': handleTab
1551
1551
  }"
1552
1552
  [scope]="this"
1553
1553
  >
1554
- {{localization.get('cancel')}}
1554
+ {{localization.get('accept')}}
1555
1555
  </button>
1556
1556
  <button
1557
+ *ngIf="cancelButton"
1557
1558
  type="button"
1558
- class="k-button k-time-accept"
1559
- [ngClass]="popupButtonsClasses('primary')"
1560
- [attr.title]="localization.get('acceptLabel')"
1561
- [attr.aria-label]="localization.get('acceptLabel')"
1562
- [disabled]="!calendarValue"
1559
+ class="k-button k-time-cancel"
1560
+ [ngClass]="popupButtonsClasses()"
1561
+ [attr.title]="localization.get('cancelLabel')"
1562
+ [attr.aria-label]="localization.get('cancelLabel')"
1563
1563
  [kendoEventsOutsideAngular]="{
1564
- click: handleAccept,
1564
+ click: handleCancel,
1565
1565
  'keydown.tab': handleTab
1566
1566
  }"
1567
1567
  [scope]="this"
1568
1568
  >
1569
- {{localization.get('accept')}}
1569
+ {{localization.get('cancel')}}
1570
1570
  </button>
1571
1571
  </div>
1572
1572
  </div>
@@ -1893,7 +1893,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
1893
1893
  </div>
1894
1894
  <div
1895
1895
  *ngIf="!isAdaptive"
1896
- class="k-datetime-footer k-action-buttons k-actions k-hstack k-justify-content-stretch"
1896
+ class="k-datetime-footer k-actions k-actions-stretched k-actions-horizontal"
1897
1897
  [kendoEventsOutsideAngular]="{
1898
1898
  focusin: handleFocus,
1899
1899
  focusout: handleBlur
@@ -1901,34 +1901,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
1901
1901
  [scope]="this"
1902
1902
  >
1903
1903
  <button
1904
- *ngIf="cancelButton"
1905
1904
  type="button"
1906
- class="k-button k-time-cancel"
1907
- [ngClass]="popupButtonsClasses()"
1908
- [attr.title]="localization.get('cancelLabel')"
1909
- [attr.aria-label]="localization.get('cancelLabel')"
1905
+ class="k-button k-time-accept"
1906
+ [ngClass]="popupButtonsClasses('primary')"
1907
+ [attr.title]="localization.get('acceptLabel')"
1908
+ [attr.aria-label]="localization.get('acceptLabel')"
1909
+ [disabled]="!calendarValue"
1910
1910
  [kendoEventsOutsideAngular]="{
1911
- click: handleCancel,
1911
+ click: handleAccept,
1912
1912
  'keydown.tab': handleTab
1913
1913
  }"
1914
1914
  [scope]="this"
1915
1915
  >
1916
- {{localization.get('cancel')}}
1916
+ {{localization.get('accept')}}
1917
1917
  </button>
1918
1918
  <button
1919
+ *ngIf="cancelButton"
1919
1920
  type="button"
1920
- class="k-button k-time-accept"
1921
- [ngClass]="popupButtonsClasses('primary')"
1922
- [attr.title]="localization.get('acceptLabel')"
1923
- [attr.aria-label]="localization.get('acceptLabel')"
1924
- [disabled]="!calendarValue"
1921
+ class="k-button k-time-cancel"
1922
+ [ngClass]="popupButtonsClasses()"
1923
+ [attr.title]="localization.get('cancelLabel')"
1924
+ [attr.aria-label]="localization.get('cancelLabel')"
1925
1925
  [kendoEventsOutsideAngular]="{
1926
- click: handleAccept,
1926
+ click: handleCancel,
1927
1927
  'keydown.tab': handleTab
1928
1928
  }"
1929
1929
  [scope]="this"
1930
1930
  >
1931
- {{localization.get('accept')}}
1931
+ {{localization.get('cancel')}}
1932
1932
  </button>
1933
1933
  </div>
1934
1934
  </div>
@@ -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: 1685095143,
13
- version: '13.0.0-develop.6',
12
+ publishDate: 1685107115,
13
+ version: '13.0.0-develop.8',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
15
15
  };
@@ -482,22 +482,7 @@ TimeSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
482
482
  </div>
483
483
  </ng-template>
484
484
  </div>
485
- <div class="k-time-footer k-action-buttons k-actions k-actions-stretched" *ngIf="setButton || cancelButton">
486
- <button
487
- #cancel
488
- *ngIf="cancelButton"
489
- class="k-button k-time-cancel k-button-md k-rounded-md k-button-solid k-button-solid-base"
490
- type="button"
491
- [attr.title]="localization.get('cancelLabel')"
492
- [attr.aria-label]="localization.get('cancelLabel')"
493
- [kendoEventsOutsideAngular]="{
494
- click: handleReject,
495
- focus: handleFocus,
496
- blur: handleBlur
497
- }"
498
- [scope]="this"
499
- [disabled]="disabled"
500
- >{{localization.get('cancel')}}</button>
485
+ <div class="k-time-footer k-actions k-actions-stretched k-actions-horizontal" *ngIf="setButton || cancelButton">
501
486
  <button
502
487
  #accept
503
488
  *ngIf="setButton"
@@ -514,6 +499,21 @@ TimeSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
514
499
  [scope]="this"
515
500
  [disabled]="disabled"
516
501
  >{{localization.get('accept')}}</button>
502
+ <button
503
+ #cancel
504
+ *ngIf="cancelButton"
505
+ class="k-button k-time-cancel k-button-md k-rounded-md k-button-solid k-button-solid-base"
506
+ type="button"
507
+ [attr.title]="localization.get('cancelLabel')"
508
+ [attr.aria-label]="localization.get('cancelLabel')"
509
+ [kendoEventsOutsideAngular]="{
510
+ click: handleReject,
511
+ focus: handleFocus,
512
+ blur: handleBlur
513
+ }"
514
+ [scope]="this"
515
+ [disabled]="disabled"
516
+ >{{localization.get('cancel')}}</button>
517
517
  </div>
518
518
  `, isInline: true, components: [{ type: i5.TimeListComponent, selector: "kendo-timelist", inputs: ["min", "max", "part", "step", "disabled", "value", "isLast"], outputs: ["valueChange", "tabOutLastPart"] }], directives: [{ type: i6.TimeSelectorLocalizedMessagesDirective, selector: "[kendoTimeSelectorLocalizedMessages]" }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
519
519
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TimeSelectorComponent, decorators: [{
@@ -602,22 +602,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
602
602
  </div>
603
603
  </ng-template>
604
604
  </div>
605
- <div class="k-time-footer k-action-buttons k-actions k-actions-stretched" *ngIf="setButton || cancelButton">
606
- <button
607
- #cancel
608
- *ngIf="cancelButton"
609
- class="k-button k-time-cancel k-button-md k-rounded-md k-button-solid k-button-solid-base"
610
- type="button"
611
- [attr.title]="localization.get('cancelLabel')"
612
- [attr.aria-label]="localization.get('cancelLabel')"
613
- [kendoEventsOutsideAngular]="{
614
- click: handleReject,
615
- focus: handleFocus,
616
- blur: handleBlur
617
- }"
618
- [scope]="this"
619
- [disabled]="disabled"
620
- >{{localization.get('cancel')}}</button>
605
+ <div class="k-time-footer k-actions k-actions-stretched k-actions-horizontal" *ngIf="setButton || cancelButton">
621
606
  <button
622
607
  #accept
623
608
  *ngIf="setButton"
@@ -634,6 +619,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
634
619
  [scope]="this"
635
620
  [disabled]="disabled"
636
621
  >{{localization.get('accept')}}</button>
622
+ <button
623
+ #cancel
624
+ *ngIf="cancelButton"
625
+ class="k-button k-time-cancel k-button-md k-rounded-md k-button-solid k-button-solid-base"
626
+ type="button"
627
+ [attr.title]="localization.get('cancelLabel')"
628
+ [attr.aria-label]="localization.get('cancelLabel')"
629
+ [kendoEventsOutsideAngular]="{
630
+ click: handleReject,
631
+ focus: handleFocus,
632
+ blur: handleBlur
633
+ }"
634
+ [scope]="this"
635
+ [disabled]="disabled"
636
+ >{{localization.get('cancel')}}</button>
637
637
  </div>
638
638
  `
639
639
  }]