@progress/kendo-angular-dateinputs 12.1.0-develop.1 → 12.1.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.
@@ -36,8 +36,8 @@ const packageMetadata = {
36
36
  name: '@progress/kendo-angular-dateinputs',
37
37
  productName: 'Kendo UI for Angular',
38
38
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
39
- publishDate: 1684148954,
40
- version: '12.1.0-develop.1',
39
+ publishDate: 1684310705,
40
+ version: '12.1.0',
41
41
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
42
42
  };
43
43
 
@@ -10913,7 +10913,9 @@ class TimeListComponent {
10913
10913
  this.max = cloneDate(MAX_TIME);
10914
10914
  this.step = 1;
10915
10915
  this.disabled = false;
10916
+ this.isLast = false;
10916
10917
  this.valueChange = new EventEmitter();
10918
+ this.tabOutLastPart = new EventEmitter();
10917
10919
  this.componentClass = true;
10918
10920
  this.animateToIndex = true;
10919
10921
  this.isActive = false;
@@ -11090,6 +11092,10 @@ class TimeListComponent {
11090
11092
  return oldData && newData && oldData.text !== newData.text;
11091
11093
  }
11092
11094
  handleKeyDown(e) {
11095
+ if (e.keyCode === Keys$1.Tab && !e.shiftKey && this.isLast) {
11096
+ e.preventDefault();
11097
+ this.tabOutLastPart.emit();
11098
+ }
11093
11099
  const getter = getters[e.keyCode] || nil;
11094
11100
  const dataItem = getter(this.data, this.service.selectedIndex(this.value));
11095
11101
  if (dataItem) {
@@ -11110,7 +11116,7 @@ class TimeListComponent {
11110
11116
  }
11111
11117
  }
11112
11118
  TimeListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TimeListComponent, deps: [{ token: i0.ElementRef }, { token: i0.Injector }, { token: TimePickerDOMService }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i1$1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
11113
- TimeListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: TimeListComponent, selector: "kendo-timelist", inputs: { min: "min", max: "max", part: "part", step: "step", disabled: "disabled", value: "value" }, outputs: { valueChange: "valueChange" }, host: { properties: { "attr.role": "this.roleAttribute", "attr.aria-label": "this.ariaLabel", "attr.tabindex": "this.tabIndex", "class.k-time-list": "this.componentClass" } }, viewQueries: [{ propertyName: "virtualization", first: true, predicate: VirtualizationComponent, descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: `
11119
+ TimeListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: TimeListComponent, selector: "kendo-timelist", inputs: { min: "min", max: "max", part: "part", step: "step", disabled: "disabled", value: "value", isLast: "isLast" }, outputs: { valueChange: "valueChange", tabOutLastPart: "tabOutLastPart" }, host: { properties: { "attr.role": "this.roleAttribute", "attr.aria-label": "this.ariaLabel", "attr.tabindex": "this.tabIndex", "class.k-time-list": "this.componentClass" } }, viewQueries: [{ propertyName: "virtualization", first: true, predicate: VirtualizationComponent, descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: `
11114
11120
  <kendo-virtualization
11115
11121
  [skip]="skip"
11116
11122
  [take]="total"
@@ -11185,8 +11191,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
11185
11191
  type: Input
11186
11192
  }], value: [{
11187
11193
  type: Input
11194
+ }], isLast: [{
11195
+ type: Input
11188
11196
  }], valueChange: [{
11189
11197
  type: Output
11198
+ }], tabOutLastPart: [{
11199
+ type: Output
11190
11200
  }], virtualization: [{
11191
11201
  type: ViewChild,
11192
11202
  args: [VirtualizationComponent, { static: true }]
@@ -11408,6 +11418,7 @@ class TimeSelectorComponent {
11408
11418
  * Fires each time the user cancels the selected value.
11409
11419
  */
11410
11420
  this.valueReject = new EventEmitter();
11421
+ this.tabOutLastPart = new EventEmitter();
11411
11422
  this.isActive = false;
11412
11423
  this.showNowButton = true;
11413
11424
  this._activeListIndex = -1;
@@ -11497,6 +11508,22 @@ class TimeSelectorComponent {
11497
11508
  this.init();
11498
11509
  this.bindEvents();
11499
11510
  }
11511
+ ngAfterViewInit() {
11512
+ this.subscriptions.add(fromEvent(this.timeListWrappers.first.nativeElement, 'keydown').subscribe((event) => {
11513
+ const { keyCode, shiftKey } = event;
11514
+ if (keyCode === Keys$1.Tab && shiftKey) {
11515
+ event.preventDefault();
11516
+ this.renderer.removeClass(this.timeListWrappers.first.nativeElement, 'k-focus');
11517
+ this.accept.nativeElement.focus();
11518
+ }
11519
+ }));
11520
+ this.subscriptions.add(fromEvent(this.timeListWrappers.last.nativeElement, 'keydown').subscribe((event) => {
11521
+ const { keyCode, shiftKey } = event;
11522
+ if (keyCode === Keys$1.Tab && !shiftKey) {
11523
+ this.renderer.removeClass(this.timeListWrappers.last.nativeElement, 'k-focus');
11524
+ }
11525
+ }));
11526
+ }
11500
11527
  /**
11501
11528
  * @hidden
11502
11529
  */
@@ -11601,6 +11628,16 @@ class TimeSelectorComponent {
11601
11628
  containsElement(element) {
11602
11629
  return Boolean(closest(element, node => node === this.element.nativeElement));
11603
11630
  }
11631
+ /**
11632
+ * @hidden
11633
+ */
11634
+ handleTabOut(event) {
11635
+ const { keyCode, shiftKey } = event;
11636
+ if (keyCode === Keys$1.Tab && !shiftKey) {
11637
+ event.preventDefault();
11638
+ this.timeLists.first.focus();
11639
+ }
11640
+ }
11604
11641
  partStep(part) {
11605
11642
  return this.steps[part.type] || 1;
11606
11643
  }
@@ -11688,7 +11725,7 @@ class TimeSelectorComponent {
11688
11725
  }
11689
11726
  }
11690
11727
  TimeSelectorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TimeSelectorComponent, deps: [{ token: i1$1.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i1.IntlService }, { token: TimePickerDOMService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: PickerService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
11691
- TimeSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: TimeSelectorComponent, selector: "kendo-timeselector", inputs: { format: "format", min: "min", max: "max", cancelButton: "cancelButton", setButton: "setButton", nowButton: "nowButton", disabled: "disabled", isAdaptiveEnabled: "isAdaptiveEnabled", isDateTimePicker: "isDateTimePicker", steps: "steps", value: "value" }, outputs: { valueChange: "valueChange", valueReject: "valueReject" }, host: { properties: { "class.k-disabled": "this.disabledClass" } }, providers: [
11728
+ TimeSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: TimeSelectorComponent, selector: "kendo-timeselector", inputs: { format: "format", min: "min", max: "max", cancelButton: "cancelButton", setButton: "setButton", nowButton: "nowButton", disabled: "disabled", isAdaptiveEnabled: "isAdaptiveEnabled", isDateTimePicker: "isDateTimePicker", steps: "steps", value: "value" }, outputs: { valueChange: "valueChange", valueReject: "valueReject", tabOutLastPart: "tabOutLastPart" }, host: { properties: { "class.k-disabled": "this.disabledClass" } }, providers: [
11692
11729
  LocalizationService,
11693
11730
  {
11694
11731
  provide: L10N_PREFIX,
@@ -11746,12 +11783,14 @@ TimeSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
11746
11783
  >
11747
11784
  <span class="k-title k-timeselector-title">{{intl.dateFieldName(part)}}</span>
11748
11785
  <kendo-timelist
11786
+ [isLast]="idx === dateFormatParts.length - 1"
11749
11787
  [min]="min"
11750
11788
  [max]="max"
11751
11789
  [part]="part"
11752
11790
  [step]="partStep(part)"
11753
11791
  [disabled]="disabled"
11754
11792
  [(value)]="current"
11793
+ (tabOutLastPart)="tabOutLastPart.emit()"
11755
11794
  [kendoEventsOutsideAngular]="{
11756
11795
  focus: handleListFocus,
11757
11796
  blur: handleBlur
@@ -11791,13 +11830,14 @@ TimeSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
11791
11830
  [kendoEventsOutsideAngular]="{
11792
11831
  click: handleAccept,
11793
11832
  focus: handleFocus,
11794
- blur: handleBlur
11833
+ blur: handleBlur,
11834
+ keydown: handleTabOut
11795
11835
  }"
11796
11836
  [scope]="this"
11797
11837
  [disabled]="disabled"
11798
11838
  >{{localization.get('accept')}}</button>
11799
11839
  </div>
11800
- `, isInline: true, components: [{ type: TimeListComponent, selector: "kendo-timelist", inputs: ["min", "max", "part", "step", "disabled", "value"], outputs: ["valueChange"] }], directives: [{ type: 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 });
11840
+ `, isInline: true, components: [{ type: TimeListComponent, selector: "kendo-timelist", inputs: ["min", "max", "part", "step", "disabled", "value", "isLast"], outputs: ["valueChange", "tabOutLastPart"] }], directives: [{ type: 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 });
11801
11841
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TimeSelectorComponent, decorators: [{
11802
11842
  type: Component,
11803
11843
  args: [{
@@ -11863,12 +11903,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
11863
11903
  >
11864
11904
  <span class="k-title k-timeselector-title">{{intl.dateFieldName(part)}}</span>
11865
11905
  <kendo-timelist
11906
+ [isLast]="idx === dateFormatParts.length - 1"
11866
11907
  [min]="min"
11867
11908
  [max]="max"
11868
11909
  [part]="part"
11869
11910
  [step]="partStep(part)"
11870
11911
  [disabled]="disabled"
11871
11912
  [(value)]="current"
11913
+ (tabOutLastPart)="tabOutLastPart.emit()"
11872
11914
  [kendoEventsOutsideAngular]="{
11873
11915
  focus: handleListFocus,
11874
11916
  blur: handleBlur
@@ -11908,7 +11950,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
11908
11950
  [kendoEventsOutsideAngular]="{
11909
11951
  click: handleAccept,
11910
11952
  focus: handleFocus,
11911
- blur: handleBlur
11953
+ blur: handleBlur,
11954
+ keydown: handleTabOut
11912
11955
  }"
11913
11956
  [scope]="this"
11914
11957
  [disabled]="disabled"
@@ -11962,6 +12005,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
11962
12005
  type: Output
11963
12006
  }], valueReject: [{
11964
12007
  type: Output
12008
+ }], tabOutLastPart: [{
12009
+ type: Output
11965
12010
  }] } });
11966
12011
 
11967
12012
  /**
@@ -12736,6 +12781,17 @@ class TimePickerComponent {
12736
12781
  }
12737
12782
  this.windowSize = windowSize();
12738
12783
  }
12784
+ /**
12785
+ * @hidden
12786
+ */
12787
+ onTabOutLastPart() {
12788
+ if (this.cancelButton) {
12789
+ this.timeSelector.cancel.nativeElement.focus();
12790
+ }
12791
+ else {
12792
+ this.timeSelector.accept.nativeElement.focus();
12793
+ }
12794
+ }
12739
12795
  toggleTimeSelector(show) {
12740
12796
  this.windowSize = windowSize();
12741
12797
  if (this.isAdaptive) {
@@ -13094,6 +13150,7 @@ TimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
13094
13150
  [scope]="this"
13095
13151
  (valueChange)="handleChange($event)"
13096
13152
  (valueReject)="handleReject()"
13153
+ (tabOutLastPart)="onTabOutLastPart()"
13097
13154
  >
13098
13155
  <kendo-timeselector-messages
13099
13156
  [acceptLabel]="localization.get('acceptLabel')"
@@ -13111,7 +13168,7 @@ TimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
13111
13168
  </kendo-timeselector-messages>
13112
13169
  </kendo-timeselector>
13113
13170
  </ng-template>
13114
- `, isInline: true, components: [{ type: DateInputComponent, selector: "kendo-dateinput", inputs: ["focusableId", "pickerType", "disabled", "readonly", "title", "tabindex", "role", "ariaReadOnly", "tabIndex", "format", "formatPlaceholder", "placeholder", "steps", "max", "min", "rangeValidation", "autoCorrect", "incompleteDateValidation", "twoDigitYearMax", "value", "spinners", "isPopupOpen", "hasPopup", "size", "rounded", "fillMode"], outputs: ["valueChange", "valueUpdate", "focus", "blur"], exportAs: ["kendo-dateinput"] }, { type: i7$1.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }, { type: i8.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { type: i9.ActionSheetComponent, selector: "kendo-actionsheet", inputs: ["title", "subtitle", "items", "cssClass", "animation", "expanded"], outputs: ["expandedChange", "expand", "collapse", "itemClick", "overlayClick"], exportAs: ["kendoActionSheet"] }, { type: i10.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"] }, { type: TimeSelectorComponent, selector: "kendo-timeselector", inputs: ["format", "min", "max", "cancelButton", "setButton", "nowButton", "disabled", "isAdaptiveEnabled", "isDateTimePicker", "steps", "value"], outputs: ["valueChange", "valueReject"], exportAs: ["kendo-timeselector"] }, { type: TimeSelectorCustomMessagesComponent, selector: "kendo-timeselector-messages" }], directives: [{ type: TimePickerLocalizedMessagesDirective, selector: "[kendoTimePickerLocalizedMessages]" }, { type: i8.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { type: i7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9.ActionSheetTemplateDirective, selector: "[kendoActionSheetTemplate]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
13171
+ `, isInline: true, components: [{ type: DateInputComponent, selector: "kendo-dateinput", inputs: ["focusableId", "pickerType", "disabled", "readonly", "title", "tabindex", "role", "ariaReadOnly", "tabIndex", "format", "formatPlaceholder", "placeholder", "steps", "max", "min", "rangeValidation", "autoCorrect", "incompleteDateValidation", "twoDigitYearMax", "value", "spinners", "isPopupOpen", "hasPopup", "size", "rounded", "fillMode"], outputs: ["valueChange", "valueUpdate", "focus", "blur"], exportAs: ["kendo-dateinput"] }, { type: i7$1.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }, { type: i8.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { type: i9.ActionSheetComponent, selector: "kendo-actionsheet", inputs: ["title", "subtitle", "items", "cssClass", "animation", "expanded"], outputs: ["expandedChange", "expand", "collapse", "itemClick", "overlayClick"], exportAs: ["kendoActionSheet"] }, { type: i10.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"] }, { type: TimeSelectorComponent, selector: "kendo-timeselector", inputs: ["format", "min", "max", "cancelButton", "setButton", "nowButton", "disabled", "isAdaptiveEnabled", "isDateTimePicker", "steps", "value"], outputs: ["valueChange", "valueReject", "tabOutLastPart"], exportAs: ["kendo-timeselector"] }, { type: TimeSelectorCustomMessagesComponent, selector: "kendo-timeselector-messages" }], directives: [{ type: TimePickerLocalizedMessagesDirective, selector: "[kendoTimePickerLocalizedMessages]" }, { type: i8.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { type: i7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9.ActionSheetTemplateDirective, selector: "[kendoActionSheetTemplate]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
13115
13172
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TimePickerComponent, decorators: [{
13116
13173
  type: Component,
13117
13174
  args: [{
@@ -13293,6 +13350,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
13293
13350
  [scope]="this"
13294
13351
  (valueChange)="handleChange($event)"
13295
13352
  (valueReject)="handleReject()"
13353
+ (tabOutLastPart)="onTabOutLastPart()"
13296
13354
  >
13297
13355
  <kendo-timeselector-messages
13298
13356
  [acceptLabel]="localization.get('acceptLabel')"
@@ -13489,6 +13547,9 @@ const DEFAULT_ACTIVE_TAB = 'date';
13489
13547
  const DEFAULT_DATEINPUT_FORMAT = 'g';
13490
13548
  const DEFAULT_TIMESELECTOR_FORMAT = 't';
13491
13549
  const TWO_DIGIT_YEAR_MAX = 68;
13550
+ const ACCEPT_BUTTON_SELECTOR = '.k-button.k-time-accept';
13551
+ const CANCEL_BUTTON_SELECOTR = '.k-button.k-time-cancel';
13552
+ const DATE_TAB_BUTTON_SELECTOR = '.k-button.k-date-tab';
13492
13553
  /**
13493
13554
  * Represents the [Kendo UI DateTimePicker component for Angular]({% slug overview_datetimepicker %}).
13494
13555
  */
@@ -14010,6 +14071,18 @@ class DateTimePickerComponent {
14010
14071
  return this.calendar?.popupId;
14011
14072
  }
14012
14073
  ;
14074
+ get acceptButton() {
14075
+ return this.popupRef?.popup.instance.container.nativeElement.querySelector(ACCEPT_BUTTON_SELECTOR);
14076
+ }
14077
+ ;
14078
+ get cancelButtonElement() {
14079
+ return this.popupRef?.popup.instance.container.nativeElement.querySelector(CANCEL_BUTTON_SELECOTR);
14080
+ }
14081
+ ;
14082
+ get dateTabButton() {
14083
+ return this.popupRef?.popup.instance.container.nativeElement.querySelector(DATE_TAB_BUTTON_SELECTOR);
14084
+ }
14085
+ ;
14013
14086
  ngOnInit() {
14014
14087
  this.subscriptions.add(this.pickerService.onFocus
14015
14088
  // detect popup changes to disable the inactive view mark-up when the popup is open
@@ -14215,6 +14288,20 @@ class DateTimePickerComponent {
14215
14288
  }
14216
14289
  this.activeTabComponent.focus();
14217
14290
  }
14291
+ /**
14292
+ * @hidden
14293
+ */
14294
+ onTabOutLastPart() {
14295
+ if (!this.cancelButton && !this.calendarValue) {
14296
+ this.dateTabButton.focus();
14297
+ }
14298
+ else if (!this.cancelButton && this.calendarValue) {
14299
+ this.acceptButton.focus();
14300
+ }
14301
+ else if (this.cancelButton) {
14302
+ this.cancelButtonElement.focus();
14303
+ }
14304
+ }
14218
14305
  /**
14219
14306
  * @hidden
14220
14307
  */
@@ -14297,22 +14384,41 @@ class DateTimePickerComponent {
14297
14384
  /**
14298
14385
  * @hidden
14299
14386
  */
14300
- handleTabOut(event) {
14301
- const { keyCode, shiftKey, target } = event;
14302
- // if no focusable next sibling elements exist in the controls sections, the user is tabbing out of the popup
14303
- const focusableSiblingAvailable = isPresent(target.nextElementSibling) && !target.nextElementSibling.disabled;
14304
- if (keyCode === Keys$1.Tab && !shiftKey && !focusableSiblingAvailable) {
14305
- this.input.focus();
14306
- this.handleCancel();
14307
- }
14308
- }
14309
- /**
14310
- * @hidden
14311
- */
14312
- handleBackTabOut(event) {
14313
- const { keyCode, shiftKey } = event;
14314
- if (keyCode === Keys$1.Tab && shiftKey) {
14315
- this.input.focus();
14387
+ handleTab(event) {
14388
+ event.preventDefault();
14389
+ const { shiftKey } = event;
14390
+ switch (event.target) {
14391
+ case this.acceptButton:
14392
+ if (!shiftKey && this.calendarValue) {
14393
+ this.dateTabButton.focus();
14394
+ }
14395
+ break;
14396
+ case this.cancelButtonElement:
14397
+ if (!shiftKey && !this.calendarValue) {
14398
+ this.dateTabButton.focus();
14399
+ }
14400
+ else if (!shiftKey && this.calendarValue) {
14401
+ this.acceptButton.focus();
14402
+ }
14403
+ break;
14404
+ case this.dateTabButton:
14405
+ if (this.calendarValue) {
14406
+ this.acceptButton.focus();
14407
+ }
14408
+ else if (!this.calendarValue && this.cancelButton) {
14409
+ this.cancelButtonElement.focus();
14410
+ }
14411
+ else if (!this.calendarValue && !this.cancelButton) {
14412
+ if (this.activeTab === 'date') {
14413
+ this.calendar.monthView.list.nativeElement.focus();
14414
+ }
14415
+ else {
14416
+ this.timeSelector.focus();
14417
+ }
14418
+ }
14419
+ break;
14420
+ default:
14421
+ break;
14316
14422
  }
14317
14423
  }
14318
14424
  /**
@@ -14497,6 +14603,15 @@ class DateTimePickerComponent {
14497
14603
  this.renderer.setAttribute(this.inputElement, attributeNames.ariaControls, this.popupUID);
14498
14604
  this.setAriaActiveDescendant();
14499
14605
  this.popupRef.popupAnchorViewportLeave.subscribe(() => this.handleCancel());
14606
+ if (this.calendar.type === 'infinite') {
14607
+ this.subscriptions.add(fromEvent(this.calendar.monthView.list.nativeElement, 'keydown').subscribe((event) => {
14608
+ const { keyCode, shiftKey } = event;
14609
+ if (keyCode === Keys$1.Tab && !shiftKey && !this.cancelButton && !this.calendarValue) {
14610
+ event.preventDefault();
14611
+ this.dateTabButton.focus();
14612
+ }
14613
+ }));
14614
+ }
14500
14615
  }
14501
14616
  setAriaActiveDescendant() {
14502
14617
  const focusedCellChangeEvent = this.calendar.type === 'infinite' ?
@@ -14805,7 +14920,7 @@ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
14805
14920
  [attr.aria-label]="localization.get('dateTabLabel')"
14806
14921
  [kendoEventsOutsideAngular]="{
14807
14922
  click: changeActiveTab.bind(this, 'date'),
14808
- keydown: handleBackTabOut
14923
+ 'keydown.shift.tab': handleTab
14809
14924
  }"
14810
14925
  [scope]="this"
14811
14926
  >
@@ -14878,6 +14993,7 @@ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
14878
14993
  [disabled]="disableTimeSelector"
14879
14994
  [isAdaptiveEnabled]="isAdaptiveModeEnabled"
14880
14995
  [isDateTimePicker]="true"
14996
+ (tabOutLastPart)="onTabOutLastPart()"
14881
14997
  >
14882
14998
  <kendo-timeselector-messages
14883
14999
  [acceptLabel]="localization.get('acceptLabel')"
@@ -14900,7 +15016,6 @@ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
14900
15016
  *ngIf="!isAdaptive"
14901
15017
  class="k-datetime-footer k-action-buttons k-actions k-hstack k-justify-content-stretch"
14902
15018
  [kendoEventsOutsideAngular]="{
14903
- keydown: handleTabOut,
14904
15019
  focusin: handleFocus,
14905
15020
  focusout: handleBlur
14906
15021
  }"
@@ -14914,7 +15029,8 @@ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
14914
15029
  [attr.title]="localization.get('cancelLabel')"
14915
15030
  [attr.aria-label]="localization.get('cancelLabel')"
14916
15031
  [kendoEventsOutsideAngular]="{
14917
- click: handleCancel
15032
+ click: handleCancel,
15033
+ 'keydown.tab': handleTab
14918
15034
  }"
14919
15035
  [scope]="this"
14920
15036
  >
@@ -14928,7 +15044,8 @@ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
14928
15044
  [attr.aria-label]="localization.get('acceptLabel')"
14929
15045
  [disabled]="!calendarValue"
14930
15046
  [kendoEventsOutsideAngular]="{
14931
- click: handleAccept
15047
+ click: handleAccept,
15048
+ 'keydown.tab': handleTab
14932
15049
  }"
14933
15050
  [scope]="this"
14934
15051
  >
@@ -14937,7 +15054,7 @@ DateTimePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
14937
15054
  </div>
14938
15055
  </div>
14939
15056
  </ng-template>
14940
- `, isInline: true, components: [{ type: DateInputComponent, selector: "kendo-dateinput", inputs: ["focusableId", "pickerType", "disabled", "readonly", "title", "tabindex", "role", "ariaReadOnly", "tabIndex", "format", "formatPlaceholder", "placeholder", "steps", "max", "min", "rangeValidation", "autoCorrect", "incompleteDateValidation", "twoDigitYearMax", "value", "spinners", "isPopupOpen", "hasPopup", "size", "rounded", "fillMode"], outputs: ["valueChange", "valueUpdate", "focus", "blur"], exportAs: ["kendo-dateinput"] }, { type: i7$1.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }, { type: i8.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { type: i9.ActionSheetComponent, selector: "kendo-actionsheet", inputs: ["title", "subtitle", "items", "cssClass", "animation", "expanded"], outputs: ["expandedChange", "expand", "collapse", "itemClick", "overlayClick"], exportAs: ["kendoActionSheet"] }, { type: i10.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"] }, { type: CalendarComponent, selector: "kendo-calendar", inputs: ["id", "focusedDate", "min", "max", "rangeValidation", "selection", "value", "disabled", "tabindex", "tabIndex", "disabledDates", "navigation", "activeView", "bottomView", "topView", "type", "animateNavigation", "weekNumber", "cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate", "navigationItemTemplate", "size"], outputs: ["activeViewChange", "navigate", "activeViewDateChange", "blur", "focus", "valueChange"], exportAs: ["kendo-calendar"] }, { type: CalendarCustomMessagesComponent, selector: "kendo-calendar-messages" }, { type: TimeSelectorComponent, selector: "kendo-timeselector", inputs: ["format", "min", "max", "cancelButton", "setButton", "nowButton", "disabled", "isAdaptiveEnabled", "isDateTimePicker", "steps", "value"], outputs: ["valueChange", "valueReject"], exportAs: ["kendo-timeselector"] }, { type: TimeSelectorCustomMessagesComponent, selector: "kendo-timeselector-messages" }], directives: [{ type: LocalizedMessagesDirective, selector: "[kendoDateTimePickerLocalizedMessages]" }, { type: i8.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i9.ActionSheetTemplateDirective, selector: "[kendoActionSheetTemplate]" }, { type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
15057
+ `, isInline: true, components: [{ type: DateInputComponent, selector: "kendo-dateinput", inputs: ["focusableId", "pickerType", "disabled", "readonly", "title", "tabindex", "role", "ariaReadOnly", "tabIndex", "format", "formatPlaceholder", "placeholder", "steps", "max", "min", "rangeValidation", "autoCorrect", "incompleteDateValidation", "twoDigitYearMax", "value", "spinners", "isPopupOpen", "hasPopup", "size", "rounded", "fillMode"], outputs: ["valueChange", "valueUpdate", "focus", "blur"], exportAs: ["kendo-dateinput"] }, { type: i7$1.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }, { type: i8.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { type: i9.ActionSheetComponent, selector: "kendo-actionsheet", inputs: ["title", "subtitle", "items", "cssClass", "animation", "expanded"], outputs: ["expandedChange", "expand", "collapse", "itemClick", "overlayClick"], exportAs: ["kendoActionSheet"] }, { type: i10.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"] }, { type: CalendarComponent, selector: "kendo-calendar", inputs: ["id", "focusedDate", "min", "max", "rangeValidation", "selection", "value", "disabled", "tabindex", "tabIndex", "disabledDates", "navigation", "activeView", "bottomView", "topView", "type", "animateNavigation", "weekNumber", "cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate", "navigationItemTemplate", "size"], outputs: ["activeViewChange", "navigate", "activeViewDateChange", "blur", "focus", "valueChange"], exportAs: ["kendo-calendar"] }, { type: CalendarCustomMessagesComponent, selector: "kendo-calendar-messages" }, { type: TimeSelectorComponent, selector: "kendo-timeselector", inputs: ["format", "min", "max", "cancelButton", "setButton", "nowButton", "disabled", "isAdaptiveEnabled", "isDateTimePicker", "steps", "value"], outputs: ["valueChange", "valueReject", "tabOutLastPart"], exportAs: ["kendo-timeselector"] }, { type: TimeSelectorCustomMessagesComponent, selector: "kendo-timeselector-messages" }], directives: [{ type: LocalizedMessagesDirective, selector: "[kendoDateTimePickerLocalizedMessages]" }, { type: i8.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i9.ActionSheetTemplateDirective, selector: "[kendoActionSheetTemplate]" }, { type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
14941
15058
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: DateTimePickerComponent, decorators: [{
14942
15059
  type: Component,
14943
15060
  args: [{
@@ -15163,7 +15280,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
15163
15280
  [attr.aria-label]="localization.get('dateTabLabel')"
15164
15281
  [kendoEventsOutsideAngular]="{
15165
15282
  click: changeActiveTab.bind(this, 'date'),
15166
- keydown: handleBackTabOut
15283
+ 'keydown.shift.tab': handleTab
15167
15284
  }"
15168
15285
  [scope]="this"
15169
15286
  >
@@ -15236,6 +15353,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
15236
15353
  [disabled]="disableTimeSelector"
15237
15354
  [isAdaptiveEnabled]="isAdaptiveModeEnabled"
15238
15355
  [isDateTimePicker]="true"
15356
+ (tabOutLastPart)="onTabOutLastPart()"
15239
15357
  >
15240
15358
  <kendo-timeselector-messages
15241
15359
  [acceptLabel]="localization.get('acceptLabel')"
@@ -15258,7 +15376,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
15258
15376
  *ngIf="!isAdaptive"
15259
15377
  class="k-datetime-footer k-action-buttons k-actions k-hstack k-justify-content-stretch"
15260
15378
  [kendoEventsOutsideAngular]="{
15261
- keydown: handleTabOut,
15262
15379
  focusin: handleFocus,
15263
15380
  focusout: handleBlur
15264
15381
  }"
@@ -15272,7 +15389,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
15272
15389
  [attr.title]="localization.get('cancelLabel')"
15273
15390
  [attr.aria-label]="localization.get('cancelLabel')"
15274
15391
  [kendoEventsOutsideAngular]="{
15275
- click: handleCancel
15392
+ click: handleCancel,
15393
+ 'keydown.tab': handleTab
15276
15394
  }"
15277
15395
  [scope]="this"
15278
15396
  >
@@ -15286,7 +15404,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
15286
15404
  [attr.aria-label]="localization.get('acceptLabel')"
15287
15405
  [disabled]="!calendarValue"
15288
15406
  [kendoEventsOutsideAngular]="{
15289
- click: handleAccept
15407
+ click: handleAccept,
15408
+ 'keydown.tab': handleTab
15290
15409
  }"
15291
15410
  [scope]="this"
15292
15411
  >
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-dateinputs",
3
- "version": "12.1.0-develop.1",
3
+ "version": "12.1.0",
4
4
  "description": "Kendo UI for Angular Date Inputs Package - Everything you need to add date selection functionality to apps (DatePicker, TimePicker, DateInput, DateRangePicker, DateTimePicker, Calendar, and MultiViewCalendar).",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -33,20 +33,20 @@
33
33
  "@angular/core": "13 - 16",
34
34
  "@angular/platform-browser": "13 - 16",
35
35
  "@progress/kendo-licensing": "^1.0.2",
36
- "@progress/kendo-angular-common": "12.1.0-develop.1",
37
- "@progress/kendo-angular-intl": "12.1.0-develop.1",
38
- "@progress/kendo-angular-l10n": "12.1.0-develop.1",
39
- "@progress/kendo-angular-icons": "12.1.0-develop.1",
40
- "@progress/kendo-angular-popup": "12.1.0-develop.1",
41
- "@progress/kendo-angular-navigation": "12.1.0-develop.1",
36
+ "@progress/kendo-angular-common": "12.1.0",
37
+ "@progress/kendo-angular-intl": "12.1.0",
38
+ "@progress/kendo-angular-l10n": "12.1.0",
39
+ "@progress/kendo-angular-icons": "12.1.0",
40
+ "@progress/kendo-angular-popup": "12.1.0",
41
+ "@progress/kendo-angular-navigation": "12.1.0",
42
42
  "rxjs": "^6.5.3 || ^7.0.0",
43
- "@progress/kendo-angular-buttons": "12.1.0-develop.1",
44
- "@progress/kendo-angular-inputs": "12.1.0-develop.1",
45
- "@progress/kendo-angular-label": "12.1.0-develop.1"
43
+ "@progress/kendo-angular-buttons": "12.1.0",
44
+ "@progress/kendo-angular-inputs": "12.1.0",
45
+ "@progress/kendo-angular-label": "12.1.0"
46
46
  },
47
47
  "dependencies": {
48
48
  "tslib": "^2.3.1",
49
- "@progress/kendo-angular-schematics": "12.1.0-develop.1",
49
+ "@progress/kendo-angular-schematics": "12.1.0",
50
50
  "@progress/kendo-common": "^0.2.0",
51
51
  "@progress/kendo-date-math": "^1.1.0"
52
52
  },
@@ -26,7 +26,9 @@ export declare class TimeListComponent implements OnChanges, OnInit, OnDestroy {
26
26
  step: number;
27
27
  disabled: boolean;
28
28
  value: Date;
29
+ isLast: boolean;
29
30
  valueChange: EventEmitter<Date>;
31
+ tabOutLastPart: EventEmitter<any>;
30
32
  virtualization: VirtualizationComponent;
31
33
  get roleAttribute(): string;
32
34
  get ariaLabel(): string;
@@ -88,5 +90,5 @@ export declare class TimeListComponent implements OnChanges, OnInit, OnDestroy {
88
90
  private handleKeyDown;
89
91
  private bindEvents;
90
92
  static ɵfac: i0.ɵɵFactoryDeclaration<TimeListComponent, never>;
91
- static ɵcmp: i0.ɵɵComponentDeclaration<TimeListComponent, "kendo-timelist", never, { "min": "min"; "max": "max"; "part": "part"; "step": "step"; "disabled": "disabled"; "value": "value"; }, { "valueChange": "valueChange"; }, never, never>;
93
+ static ɵcmp: i0.ɵɵComponentDeclaration<TimeListComponent, "kendo-timelist", never, { "min": "min"; "max": "max"; "part": "part"; "step": "step"; "disabled": "disabled"; "value": "value"; "isLast": "isLast"; }, { "valueChange": "valueChange"; "tabOutLastPart": "tabOutLastPart"; }, never, never>;
92
94
  }
@@ -516,6 +516,10 @@ export declare class TimePickerComponent implements ControlValueAccessor, OnInit
516
516
  * @hidden
517
517
  */
518
518
  onResize(): void;
519
+ /**
520
+ * @hidden
521
+ */
522
+ onTabOutLastPart(): void;
519
523
  private toggleTimeSelector;
520
524
  private toggleActionSheet;
521
525
  private togglePopup;
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- import { ChangeDetectorRef, ElementRef, EventEmitter, NgZone, QueryList, OnInit, OnChanges, OnDestroy, Renderer2 } from '@angular/core';
5
+ import { ChangeDetectorRef, ElementRef, EventEmitter, NgZone, QueryList, OnInit, OnChanges, OnDestroy, Renderer2, AfterViewInit } from '@angular/core';
6
6
  import { LocalizationService } from '@progress/kendo-angular-l10n';
7
7
  import { IntlService } from '@progress/kendo-angular-intl';
8
8
  import { TimeListComponent } from './timelist.component';
@@ -15,7 +15,7 @@ import * as i0 from "@angular/core";
15
15
  *
16
16
  * Represents the Kendo UI TimeSelector component for Angular.
17
17
  */
18
- export declare class TimeSelectorComponent implements OnChanges, OnInit, OnDestroy {
18
+ export declare class TimeSelectorComponent implements OnChanges, OnInit, OnDestroy, AfterViewInit {
19
19
  localization: LocalizationService;
20
20
  private cdr;
21
21
  element: ElementRef;
@@ -105,6 +105,7 @@ export declare class TimeSelectorComponent implements OnChanges, OnInit, OnDestr
105
105
  * Fires each time the user cancels the selected value.
106
106
  */
107
107
  valueReject: EventEmitter<any>;
108
+ tabOutLastPart: EventEmitter<any>;
108
109
  dateFormatParts: any[];
109
110
  isActive: boolean;
110
111
  showNowButton: boolean;
@@ -124,6 +125,7 @@ export declare class TimeSelectorComponent implements OnChanges, OnInit, OnDestr
124
125
  * @hidden
125
126
  */
126
127
  ngOnInit(): void;
128
+ ngAfterViewInit(): void;
127
129
  /**
128
130
  * @hidden
129
131
  */
@@ -177,6 +179,10 @@ export declare class TimeSelectorComponent implements OnChanges, OnInit, OnDestr
177
179
  * @hidden
178
180
  */
179
181
  containsElement(element: any): boolean;
182
+ /**
183
+ * @hidden
184
+ */
185
+ handleTabOut(event: KeyboardEvent): void;
180
186
  partStep(part: any): number;
181
187
  private init;
182
188
  private focusList;
@@ -190,5 +196,5 @@ export declare class TimeSelectorComponent implements OnChanges, OnInit, OnDestr
190
196
  private emitFocus;
191
197
  private listIndex;
192
198
  static ɵfac: i0.ɵɵFactoryDeclaration<TimeSelectorComponent, [null, null, null, null, null, null, null, { optional: true; }]>;
193
- static ɵcmp: i0.ɵɵComponentDeclaration<TimeSelectorComponent, "kendo-timeselector", ["kendo-timeselector"], { "format": "format"; "min": "min"; "max": "max"; "cancelButton": "cancelButton"; "setButton": "setButton"; "nowButton": "nowButton"; "disabled": "disabled"; "isAdaptiveEnabled": "isAdaptiveEnabled"; "isDateTimePicker": "isDateTimePicker"; "steps": "steps"; "value": "value"; }, { "valueChange": "valueChange"; "valueReject": "valueReject"; }, never, never>;
199
+ static ɵcmp: i0.ɵɵComponentDeclaration<TimeSelectorComponent, "kendo-timeselector", ["kendo-timeselector"], { "format": "format"; "min": "min"; "max": "max"; "cancelButton": "cancelButton"; "setButton": "setButton"; "nowButton": "nowButton"; "disabled": "disabled"; "isAdaptiveEnabled": "isAdaptiveEnabled"; "isDateTimePicker": "isDateTimePicker"; "steps": "steps"; "value": "value"; }, { "valueChange": "valueChange"; "valueReject": "valueReject"; "tabOutLastPart": "tabOutLastPart"; }, never, never>;
194
200
  }