@progress/kendo-angular-buttons 19.3.0-develop.31 → 19.3.0-develop.33

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.
@@ -84,7 +84,7 @@ export declare class ButtonGroupComponent implements OnInit, OnDestroy, AfterCon
84
84
  ngAfterViewChecked(): void;
85
85
  ngOnDestroy(): void;
86
86
  ngAfterContentChecked(): void;
87
- protected navigateFocus(event: any): void;
87
+ protected navigateFocus(event: KeyboardEvent): void;
88
88
  protected deactivate(buttons: Array<ButtonComponent>): void;
89
89
  protected activate(buttons: Array<ButtonComponent>): void;
90
90
  protected defocus(buttons: Array<ButtonComponent>): void;
@@ -5,7 +5,7 @@
5
5
  import { ButtonComponent } from '../button/button.component';
6
6
  import { Component, EventEmitter, Output, Input, ContentChildren, QueryList, HostBinding, isDevMode, ElementRef, Renderer2 } from '@angular/core';
7
7
  import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
8
- import { isChanged, Keys } from '@progress/kendo-angular-common';
8
+ import { isChanged, Keys, normalizeNumpadKeys } from '@progress/kendo-angular-common';
9
9
  import { KendoButtonService } from '../button/button.service';
10
10
  import { fromEvent, Subscription } from 'rxjs';
11
11
  import { filter } from 'rxjs/operators';
@@ -193,7 +193,8 @@ export class ButtonGroupComponent {
193
193
  const firstIndex = 0;
194
194
  const lastIndex = navigationButtons.length - 1;
195
195
  const eventArgs = new PreventableEvent();
196
- if (event.keyCode === Keys.ArrowRight && focusedIndex < lastIndex) {
196
+ const code = normalizeNumpadKeys(event);
197
+ if (code === Keys.ArrowRight && focusedIndex < lastIndex) {
197
198
  this.navigate.emit(eventArgs);
198
199
  if (!eventArgs.isDefaultPrevented()) {
199
200
  this.defocus(navigationButtons);
@@ -202,7 +203,7 @@ export class ButtonGroupComponent {
202
203
  }));
203
204
  }
204
205
  }
205
- if (event.keyCode === Keys.ArrowLeft && focusedIndex > firstIndex) {
206
+ if (code === Keys.ArrowLeft && focusedIndex > firstIndex) {
206
207
  this.navigate.emit(eventArgs);
207
208
  if (!eventArgs.isDefaultPrevented()) {
208
209
  this.defocus(navigationButtons);
@@ -9,7 +9,7 @@ import { ChipComponent } from './chip.component';
9
9
  import { closest, getStylingClasses } from '../util';
10
10
  import { validatePackage } from '@progress/kendo-licensing';
11
11
  import { packageMetadata } from '../package-metadata';
12
- import { isDocumentAvailable, Keys } from '@progress/kendo-angular-common';
12
+ import { isDocumentAvailable, Keys, normalizeNumpadKeys } from '@progress/kendo-angular-common';
13
13
  import * as i0 from "@angular/core";
14
14
  import * as i1 from "@progress/kendo-angular-l10n";
15
15
  /**
@@ -191,10 +191,12 @@ export class ChipListComponent {
191
191
  });
192
192
  }
193
193
  keyDownHandler(e) {
194
- const isEnterOrSpace = e.keyCode === Keys.Enter || e.keyCode === Keys.Space;
195
- const isDeleteOrBackspace = e.keyCode === Keys.Delete || e.keyCode === Keys.Backspace;
196
- const isLeftArrow = e.keyCode === Keys.ArrowLeft;
197
- const isRightArrow = e.keyCode === Keys.ArrowRight;
194
+ // on some keyboards, arrow keys, page up/down, home/end, Enter are mapped to numpad keys
195
+ const code = normalizeNumpadKeys(e);
196
+ const isEnterOrSpace = code === Keys.Enter || code === Keys.Space;
197
+ const isDeleteOrBackspace = code === Keys.Delete || code === Keys.Backspace;
198
+ const isLeftArrow = code === Keys.ArrowLeft;
199
+ const isRightArrow = code === Keys.ArrowRight;
198
200
  if (isEnterOrSpace) {
199
201
  const target = e.target;
200
202
  const clickedChip = closest(target, '.k-chip');
@@ -4,7 +4,7 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { Component, HostBinding, Input, Output, EventEmitter, ElementRef, Renderer2, NgZone, isDevMode } from '@angular/core';
6
6
  import { Subscription } from 'rxjs';
7
- import { isDocumentAvailable, Keys } from '@progress/kendo-angular-common';
7
+ import { isDocumentAvailable, Keys, normalizeNumpadKeys } from '@progress/kendo-angular-common';
8
8
  import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
9
9
  import { validatePackage } from '@progress/kendo-licensing';
10
10
  import { packageMetadata } from '../package-metadata';
@@ -345,8 +345,9 @@ export class ChipComponent {
345
345
  }
346
346
  }
347
347
  keyDownHandler(e) {
348
- const isEnterOrSpace = e.keyCode === Keys.Enter || e.keyCode === Keys.Space;
349
- const isDeleteOrBackspace = e.keyCode === Keys.Delete || e.keyCode === Keys.Backspace;
348
+ const code = normalizeNumpadKeys(e);
349
+ const isEnterOrSpace = code === Keys.Enter || code === Keys.Space;
350
+ const isDeleteOrBackspace = code === Keys.Delete || code === Keys.Backspace;
350
351
  if (this.disabled) {
351
352
  return;
352
353
  }
@@ -5,7 +5,7 @@
5
5
  import { Component, ContentChild, ElementRef, EventEmitter, HostBinding, HostListener, Input, Output, NgZone, ChangeDetectorRef, Renderer2 } from '@angular/core';
6
6
  import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
7
7
  import { PopupService } from '@progress/kendo-angular-popup';
8
- import { isDocumentAvailable, Keys, isPresent } from '@progress/kendo-angular-common';
8
+ import { isDocumentAvailable, Keys, isPresent, normalizeNumpadKeys } from '@progress/kendo-angular-common';
9
9
  import { ButtonItemTemplateDirective } from '../listbutton/button-item-template.directive';
10
10
  import { closest } from '../util';
11
11
  import { ListButton } from '../listbutton/list-button';
@@ -165,10 +165,12 @@ export class DropDownButtonComponent extends ListButton {
165
165
  */
166
166
  keydown(event) {
167
167
  this.keyDownHandler(event, true);
168
- if (event.keyCode === Keys.Space || event.keyCode === Keys.Enter) {
168
+ const code = normalizeNumpadKeys(event);
169
+ if (code === Keys.Space) {
169
170
  this._active = true;
170
171
  }
171
- if (event.keyCode === Keys.Enter) {
172
+ if (code === Keys.Enter) {
173
+ this._active = true;
172
174
  event.preventDefault();
173
175
  }
174
176
  }
@@ -9,7 +9,7 @@ import { take } from 'rxjs/operators';
9
9
  import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
10
10
  import { validatePackage } from '@progress/kendo-licensing';
11
11
  import { packageMetadata } from '../package-metadata';
12
- import { guid, isDocumentAvailable } from '@progress/kendo-angular-common';
12
+ import { guid, isDocumentAvailable, normalizeNumpadKeys } from '@progress/kendo-angular-common';
13
13
  import { PopupService } from '@progress/kendo-angular-popup';
14
14
  import { FocusService } from '../focusable/focus.service';
15
15
  import { NavigationAction } from '../navigation/navigation-action';
@@ -387,11 +387,11 @@ export class FloatingActionButtonComponent {
387
387
  return;
388
388
  }
389
389
  const focused = this.focusService.focused || 0;
390
- const keyCode = event.keyCode;
390
+ const code = normalizeNumpadKeys(event);
391
391
  const action = this.navigationService.process({
392
392
  altKey: event.altKey,
393
393
  current: focused,
394
- keyCode,
394
+ code: code,
395
395
  max: this.dialItems ? this.dialItems.length - 1 : 0,
396
396
  min: 0,
397
397
  flipNavigation: this.align.vertical === 'bottom'
@@ -9,7 +9,7 @@ import { FocusService } from './../focusable/focus.service';
9
9
  import { KeyEvents } from './../navigation/key-events';
10
10
  import { NavigationService } from './../navigation/navigation.service';
11
11
  import { NavigationAction } from './../navigation/navigation-action';
12
- import { isDocumentAvailable, guid, Keys, isChanged, hasObservers } from '@progress/kendo-angular-common';
12
+ import { isDocumentAvailable, guid, Keys, isChanged, hasObservers, normalizeNumpadKeys } from '@progress/kendo-angular-common';
13
13
  import { LocalizationService } from '@progress/kendo-angular-l10n';
14
14
  import { validatePackage } from '@progress/kendo-licensing';
15
15
  import { packageMetadata } from '../package-metadata';
@@ -283,10 +283,11 @@ export class ListButton extends MultiTabStop {
283
283
  eventData.stopImmediatePropagation();
284
284
  }
285
285
  const focused = this.focusService.focused || 0;
286
+ const code = normalizeNumpadKeys(eventData);
286
287
  const action = this.navigationService.process({
287
288
  altKey: eventData.altKey,
288
289
  current: focused,
289
- keyCode: eventData.keyCode,
290
+ code: code,
290
291
  keyEvent: keyEvent,
291
292
  max: this._data ? this._data.length - 1 : 0,
292
293
  min: 0,
@@ -295,7 +296,7 @@ export class ListButton extends MultiTabStop {
295
296
  if (action !== NavigationAction.Undefined &&
296
297
  action !== NavigationAction.Tab &&
297
298
  (action !== NavigationAction.Enter || (action === NavigationAction.Enter && this.openState))) {
298
- if (!(event.keyCode === Keys.Space && action === NavigationAction.EnterUp)) {
299
+ if (!(code === Keys.Space && action === NavigationAction.EnterUp)) {
299
300
  eventData.preventDefault();
300
301
  }
301
302
  }
@@ -26,7 +26,7 @@ export class NavigationService {
26
26
  this.useLeftRightArrows = config.useLeftRightArrows;
27
27
  }
28
28
  process(args) {
29
- const keyCode = args.keyCode;
29
+ const keyCode = args.code;
30
30
  const keyEvent = args.keyEvent;
31
31
  let index;
32
32
  let action = NavigationAction.Undefined;
@@ -10,7 +10,7 @@ export const packageMetadata = {
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCode: 'KENDOUIANGULAR',
12
12
  productCodes: ['KENDOUIANGULAR'],
13
- publishDate: 1754576416,
14
- version: '19.3.0-develop.31',
13
+ publishDate: 1754589555,
14
+ version: '19.3.0-develop.33',
15
15
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
16
16
  };
@@ -323,7 +323,7 @@ export class SplitButtonComponent extends ListButton {
323
323
  */
324
324
  keydown(event) {
325
325
  this.keyDownHandler(event, true);
326
- if (event.keyCode === Keys.Space) {
326
+ if (event.code === Keys.Space) {
327
327
  this._active = true;
328
328
  }
329
329
  }
@@ -332,7 +332,7 @@ export class SplitButtonComponent extends ListButton {
332
332
  */
333
333
  keyup(event) {
334
334
  this._active = false;
335
- if (event.keyCode !== Keys.Space) {
335
+ if (event.code !== Keys.Space) {
336
336
  this.keyUpHandler(event);
337
337
  }
338
338
  }
@@ -6,7 +6,7 @@ import * as i0 from '@angular/core';
6
6
  import { Injectable, isDevMode, EventEmitter, Component, Optional, Input, Output, HostBinding, HostListener, ContentChildren, Directive, InjectionToken, Inject, ElementRef, ViewContainerRef, ViewChild, ContentChild, forwardRef, NgModule } from '@angular/core';
7
7
  import { Subject, Subscription, fromEvent, merge, of, Observable, from } from 'rxjs';
8
8
  import * as i12 from '@progress/kendo-angular-common';
9
- import { isDocumentAvailable, isFirefox, isSafari, isChanged, hasObservers, Keys, TemplateContextDirective, MultiTabStop, guid, isPresent as isPresent$1, EventsOutsideAngularDirective, replaceMessagePlaceholder, anyChanged, ToggleButtonTabStopDirective, ResizeBatchService, KENDO_TOGGLEBUTTONTABSTOP } from '@progress/kendo-angular-common';
9
+ import { isDocumentAvailable, isFirefox, isSafari, isChanged, hasObservers, normalizeNumpadKeys, Keys, TemplateContextDirective, MultiTabStop, guid, isPresent as isPresent$1, EventsOutsideAngularDirective, replaceMessagePlaceholder, anyChanged, ToggleButtonTabStopDirective, ResizeBatchService, KENDO_TOGGLEBUTTONTABSTOP } from '@progress/kendo-angular-common';
10
10
  export { ToggleButtonTabStopDirective } from '@progress/kendo-angular-common';
11
11
  import { caretAltDownIcon, xCircleIcon, moreVerticalIcon, microphoneOutlineIcon, stopSmIcon } from '@progress/kendo-svg-icons';
12
12
  import * as i1 from '@progress/kendo-angular-l10n';
@@ -45,8 +45,8 @@ const packageMetadata = {
45
45
  productName: 'Kendo UI for Angular',
46
46
  productCode: 'KENDOUIANGULAR',
47
47
  productCodes: ['KENDOUIANGULAR'],
48
- publishDate: 1754576416,
49
- version: '19.3.0-develop.31',
48
+ publishDate: 1754589555,
49
+ version: '19.3.0-develop.33',
50
50
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
51
51
  };
52
52
 
@@ -877,7 +877,8 @@ class ButtonGroupComponent {
877
877
  const firstIndex = 0;
878
878
  const lastIndex = navigationButtons.length - 1;
879
879
  const eventArgs = new PreventableEvent();
880
- if (event.keyCode === Keys.ArrowRight && focusedIndex < lastIndex) {
880
+ const code = normalizeNumpadKeys(event);
881
+ if (code === Keys.ArrowRight && focusedIndex < lastIndex) {
881
882
  this.navigate.emit(eventArgs);
882
883
  if (!eventArgs.isDefaultPrevented()) {
883
884
  this.defocus(navigationButtons);
@@ -886,7 +887,7 @@ class ButtonGroupComponent {
886
887
  }));
887
888
  }
888
889
  }
889
- if (event.keyCode === Keys.ArrowLeft && focusedIndex > firstIndex) {
890
+ if (code === Keys.ArrowLeft && focusedIndex > firstIndex) {
890
891
  this.navigate.emit(eventArgs);
891
892
  if (!eventArgs.isDefaultPrevented()) {
892
893
  this.defocus(navigationButtons);
@@ -1353,8 +1354,9 @@ class ChipComponent {
1353
1354
  }
1354
1355
  }
1355
1356
  keyDownHandler(e) {
1356
- const isEnterOrSpace = e.keyCode === Keys.Enter || e.keyCode === Keys.Space;
1357
- const isDeleteOrBackspace = e.keyCode === Keys.Delete || e.keyCode === Keys.Backspace;
1357
+ const code = normalizeNumpadKeys(e);
1358
+ const isEnterOrSpace = code === Keys.Enter || code === Keys.Space;
1359
+ const isDeleteOrBackspace = code === Keys.Delete || code === Keys.Backspace;
1358
1360
  if (this.disabled) {
1359
1361
  return;
1360
1362
  }
@@ -1748,10 +1750,12 @@ class ChipListComponent {
1748
1750
  });
1749
1751
  }
1750
1752
  keyDownHandler(e) {
1751
- const isEnterOrSpace = e.keyCode === Keys.Enter || e.keyCode === Keys.Space;
1752
- const isDeleteOrBackspace = e.keyCode === Keys.Delete || e.keyCode === Keys.Backspace;
1753
- const isLeftArrow = e.keyCode === Keys.ArrowLeft;
1754
- const isRightArrow = e.keyCode === Keys.ArrowRight;
1753
+ // on some keyboards, arrow keys, page up/down, home/end, Enter are mapped to numpad keys
1754
+ const code = normalizeNumpadKeys(e);
1755
+ const isEnterOrSpace = code === Keys.Enter || code === Keys.Space;
1756
+ const isDeleteOrBackspace = code === Keys.Delete || code === Keys.Backspace;
1757
+ const isLeftArrow = code === Keys.ArrowLeft;
1758
+ const isRightArrow = code === Keys.ArrowRight;
1755
1759
  if (isEnterOrSpace) {
1756
1760
  const target = e.target;
1757
1761
  const clickedChip = closest(target, '.k-chip');
@@ -2028,7 +2032,7 @@ class NavigationService {
2028
2032
  this.useLeftRightArrows = config.useLeftRightArrows;
2029
2033
  }
2030
2034
  process(args) {
2031
- const keyCode = args.keyCode;
2035
+ const keyCode = args.code;
2032
2036
  const keyEvent = args.keyEvent;
2033
2037
  let index;
2034
2038
  let action = NavigationAction.Undefined;
@@ -2595,10 +2599,11 @@ class ListButton extends MultiTabStop {
2595
2599
  eventData.stopImmediatePropagation();
2596
2600
  }
2597
2601
  const focused = this.focusService.focused || 0;
2602
+ const code = normalizeNumpadKeys(eventData);
2598
2603
  const action = this.navigationService.process({
2599
2604
  altKey: eventData.altKey,
2600
2605
  current: focused,
2601
- keyCode: eventData.keyCode,
2606
+ code: code,
2602
2607
  keyEvent: keyEvent,
2603
2608
  max: this._data ? this._data.length - 1 : 0,
2604
2609
  min: 0,
@@ -2607,7 +2612,7 @@ class ListButton extends MultiTabStop {
2607
2612
  if (action !== NavigationAction.Undefined &&
2608
2613
  action !== NavigationAction.Tab &&
2609
2614
  (action !== NavigationAction.Enter || (action === NavigationAction.Enter && this.openState))) {
2610
- if (!(event.keyCode === Keys.Space && action === NavigationAction.EnterUp)) {
2615
+ if (!(code === Keys.Space && action === NavigationAction.EnterUp)) {
2611
2616
  eventData.preventDefault();
2612
2617
  }
2613
2618
  }
@@ -2908,10 +2913,12 @@ class DropDownButtonComponent extends ListButton {
2908
2913
  */
2909
2914
  keydown(event) {
2910
2915
  this.keyDownHandler(event, true);
2911
- if (event.keyCode === Keys.Space || event.keyCode === Keys.Enter) {
2916
+ const code = normalizeNumpadKeys(event);
2917
+ if (code === Keys.Space) {
2912
2918
  this._active = true;
2913
2919
  }
2914
- if (event.keyCode === Keys.Enter) {
2920
+ if (code === Keys.Enter) {
2921
+ this._active = true;
2915
2922
  event.preventDefault();
2916
2923
  }
2917
2924
  }
@@ -3935,11 +3942,11 @@ class FloatingActionButtonComponent {
3935
3942
  return;
3936
3943
  }
3937
3944
  const focused = this.focusService.focused || 0;
3938
- const keyCode = event.keyCode;
3945
+ const code = normalizeNumpadKeys(event);
3939
3946
  const action = this.navigationService.process({
3940
3947
  altKey: event.altKey,
3941
3948
  current: focused,
3942
- keyCode,
3949
+ code: code,
3943
3950
  max: this.dialItems ? this.dialItems.length - 1 : 0,
3944
3951
  min: 0,
3945
3952
  flipNavigation: this.align.vertical === 'bottom'
@@ -4883,7 +4890,7 @@ class SplitButtonComponent extends ListButton {
4883
4890
  */
4884
4891
  keydown(event) {
4885
4892
  this.keyDownHandler(event, true);
4886
- if (event.keyCode === Keys.Space) {
4893
+ if (event.code === Keys.Space) {
4887
4894
  this._active = true;
4888
4895
  }
4889
4896
  }
@@ -4892,7 +4899,7 @@ class SplitButtonComponent extends ListButton {
4892
4899
  */
4893
4900
  keyup(event) {
4894
4901
  this._active = false;
4895
- if (event.keyCode !== Keys.Space) {
4902
+ if (event.code !== Keys.Space) {
4896
4903
  this.keyUpHandler(event);
4897
4904
  }
4898
4905
  }
@@ -231,7 +231,7 @@ export declare class FloatingActionButtonComponent implements AfterViewInit, OnD
231
231
  /**
232
232
  * @hidden
233
233
  */
234
- keyDownHandler(event: any): void;
234
+ keyDownHandler(event: KeyboardEvent): void;
235
235
  /**
236
236
  * @hidden
237
237
  */
@@ -143,7 +143,7 @@ export declare class ListButton extends MultiTabStop implements OnDestroy {
143
143
  /**
144
144
  * @hidden
145
145
  */
146
- keyHandler(event: any, keyEvent?: KeyEvents, isHost?: boolean): void;
146
+ keyHandler(event: KeyboardEvent, keyEvent?: KeyEvents, isHost?: boolean): void;
147
147
  protected emitItemClickHandler(index: number): void;
148
148
  protected focusWrapper(): void;
149
149
  protected wrapperContains(element: any): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-buttons",
3
- "version": "19.3.0-develop.31",
3
+ "version": "19.3.0-develop.33",
4
4
  "description": "Buttons Package for Angular",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -21,7 +21,7 @@
21
21
  "package": {
22
22
  "productName": "Kendo UI for Angular",
23
23
  "productCode": "KENDOUIANGULAR",
24
- "publishDate": 1754576416,
24
+ "publishDate": 1754589555,
25
25
  "licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
26
26
  }
27
27
  },
@@ -31,15 +31,15 @@
31
31
  "@angular/core": "16 - 20",
32
32
  "@angular/platform-browser": "16 - 20",
33
33
  "@progress/kendo-licensing": "^1.7.0",
34
- "@progress/kendo-angular-common": "19.3.0-develop.31",
35
- "@progress/kendo-angular-l10n": "19.3.0-develop.31",
36
- "@progress/kendo-angular-popup": "19.3.0-develop.31",
37
- "@progress/kendo-angular-icons": "19.3.0-develop.31",
34
+ "@progress/kendo-angular-common": "19.3.0-develop.33",
35
+ "@progress/kendo-angular-l10n": "19.3.0-develop.33",
36
+ "@progress/kendo-angular-popup": "19.3.0-develop.33",
37
+ "@progress/kendo-angular-icons": "19.3.0-develop.33",
38
38
  "rxjs": "^6.5.3 || ^7.0.0"
39
39
  },
40
40
  "dependencies": {
41
41
  "tslib": "^2.3.1",
42
- "@progress/kendo-angular-schematics": "19.3.0-develop.31",
42
+ "@progress/kendo-angular-schematics": "19.3.0-develop.33",
43
43
  "@progress/kendo-common": "^1.0.1",
44
44
  "@progress/kendo-webspeech-common": "1.0.1"
45
45
  },