@progress/kendo-angular-toolbar 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.
- package/esm2022/package-metadata.mjs +2 -2
- package/esm2022/toolbar.component.mjs +9 -4
- package/esm2022/tools/toolbar-dropdownbutton.component.mjs +3 -1
- package/esm2022/tools/toolbar-splitbutton.component.mjs +3 -1
- package/esm2022/util.mjs +6 -4
- package/fesm2022/progress-kendo-angular-toolbar.mjs +20 -11
- package/package.json +9 -9
- package/util.d.ts +2 -2
|
@@ -10,7 +10,7 @@ export const packageMetadata = {
|
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCode: 'KENDOUIANGULAR',
|
|
12
12
|
productCodes: ['KENDOUIANGULAR'],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: '19.3.0-develop.
|
|
13
|
+
publishDate: 1754589759,
|
|
14
|
+
version: '19.3.0-develop.33',
|
|
15
15
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
16
16
|
};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/* eslint-disable no-case-declarations */
|
|
6
6
|
import { Component, HostBinding, ViewChild, TemplateRef, ElementRef, QueryList, ContentChildren, Input, HostListener, Output, EventEmitter, ViewContainerRef, NgZone, Renderer2, ChangeDetectorRef } from '@angular/core';
|
|
7
7
|
import { PopupService } from '@progress/kendo-angular-popup';
|
|
8
|
-
import { guid, ResizeSensorComponent } from '@progress/kendo-angular-common';
|
|
8
|
+
import { guid, normalizeNumpadKeys, ResizeSensorComponent } from '@progress/kendo-angular-common';
|
|
9
9
|
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
10
10
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
11
11
|
import { packageMetadata } from './package-metadata';
|
|
@@ -391,7 +391,9 @@ export class ToolBarComponent {
|
|
|
391
391
|
}
|
|
392
392
|
this.zone.runOutsideAngular(() => {
|
|
393
393
|
this.toolbarKeydownListener = this.renderer.listen(this.element.nativeElement, 'keydown', (ev) => {
|
|
394
|
-
|
|
394
|
+
// on some keyboards arrow keys, PageUp/Down, and Home/End are mapped to Numpad keys
|
|
395
|
+
const code = normalizeNumpadKeys(ev);
|
|
396
|
+
switch (code) {
|
|
395
397
|
case Keys.ArrowLeft:
|
|
396
398
|
this.zone.run(() => {
|
|
397
399
|
ev.preventDefault();
|
|
@@ -655,7 +657,8 @@ export class ToolBarComponent {
|
|
|
655
657
|
this.zone.runOutsideAngular(() => {
|
|
656
658
|
if (this.normalizedOverflow.mode === 'section') {
|
|
657
659
|
this.sectionKeydownListener = this.renderer.listen(this.popupRef.popupElement, 'keydown', (ev) => {
|
|
658
|
-
|
|
660
|
+
const code = normalizeNumpadKeys(ev);
|
|
661
|
+
switch (code) {
|
|
659
662
|
case Keys.ArrowLeft:
|
|
660
663
|
this.zone.run(() => {
|
|
661
664
|
ev.preventDefault();
|
|
@@ -701,7 +704,8 @@ export class ToolBarComponent {
|
|
|
701
704
|
}
|
|
702
705
|
else {
|
|
703
706
|
this.overflowKeydownListener = this.renderer.listen(this.popupRef.popupElement, 'keydown', (ev) => {
|
|
704
|
-
|
|
707
|
+
const code = normalizeNumpadKeys(ev);
|
|
708
|
+
switch (code) {
|
|
705
709
|
case Keys.ArrowUp:
|
|
706
710
|
this.zone.run(() => {
|
|
707
711
|
ev.preventDefault();
|
|
@@ -726,6 +730,7 @@ export class ToolBarComponent {
|
|
|
726
730
|
this.navigationService.resetNavigation();
|
|
727
731
|
});
|
|
728
732
|
break;
|
|
733
|
+
case Keys.NumpadEnter:
|
|
729
734
|
case Keys.Enter:
|
|
730
735
|
case Keys.Space:
|
|
731
736
|
this.zone.run(() => {
|
|
@@ -10,6 +10,7 @@ import { IconWrapperComponent } from '@progress/kendo-angular-icons';
|
|
|
10
10
|
import { NgClass, NgIf, NgFor } from '@angular/common';
|
|
11
11
|
import { take } from 'rxjs/operators';
|
|
12
12
|
import { ToolBarComponent } from '../toolbar.component';
|
|
13
|
+
import { normalizeNumpadKeys } from '@progress/kendo-angular-common';
|
|
13
14
|
import * as i0 from "@angular/core";
|
|
14
15
|
import * as i1 from "../toolbar.component";
|
|
15
16
|
/**
|
|
@@ -290,7 +291,8 @@ export class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
290
291
|
* @hidden
|
|
291
292
|
*/
|
|
292
293
|
handleKey(ev) {
|
|
293
|
-
|
|
294
|
+
const code = normalizeNumpadKeys(ev);
|
|
295
|
+
if (!this.overflows && (code === this.getPrevKey(this.overflows) || code === this.getNextKey(this.overflows))) {
|
|
294
296
|
return false;
|
|
295
297
|
}
|
|
296
298
|
if (this.overflows && this.location !== 'section') {
|
|
@@ -10,6 +10,7 @@ import { caretAltDownIcon } from '@progress/kendo-svg-icons';
|
|
|
10
10
|
import { IconWrapperComponent } from '@progress/kendo-angular-icons';
|
|
11
11
|
import { NgClass, NgIf, NgFor } from '@angular/common';
|
|
12
12
|
import { ToolBarComponent } from '../toolbar.component';
|
|
13
|
+
import { normalizeNumpadKeys } from '@progress/kendo-angular-common';
|
|
13
14
|
import * as i0 from "@angular/core";
|
|
14
15
|
import * as i1 from "../toolbar.component";
|
|
15
16
|
/**
|
|
@@ -286,7 +287,8 @@ export class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
286
287
|
* @hidden
|
|
287
288
|
*/
|
|
288
289
|
handleKey(ev) {
|
|
289
|
-
|
|
290
|
+
const code = normalizeNumpadKeys(ev);
|
|
291
|
+
if (!this.overflows && (code === this.getPrevKey(this.overflows) || code === this.getNextKey(this.overflows))) {
|
|
290
292
|
return false;
|
|
291
293
|
}
|
|
292
294
|
if (this.overflows) {
|
package/esm2022/util.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright © 2025 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 { Keys } from '@progress/kendo-angular-common';
|
|
5
|
+
import { Keys, normalizeNumpadKeys } from '@progress/kendo-angular-common';
|
|
6
6
|
/**
|
|
7
7
|
* @hidden
|
|
8
8
|
*/
|
|
@@ -130,12 +130,13 @@ export const makePeeker = (collection) => (index) => isPresent(collection[index]
|
|
|
130
130
|
* @hidden
|
|
131
131
|
*/
|
|
132
132
|
export const getIndexOfFocused = (prevKeyCode, nextKeyCode, collection) => (ev) => {
|
|
133
|
+
const code = normalizeNumpadKeys(ev);
|
|
133
134
|
switch (ev.type) {
|
|
134
135
|
case 'keydown':
|
|
135
|
-
if (
|
|
136
|
+
if (code === prevKeyCode) {
|
|
136
137
|
return collection.length - 1;
|
|
137
138
|
}
|
|
138
|
-
if (
|
|
139
|
+
if (code === nextKeyCode) {
|
|
139
140
|
return 0;
|
|
140
141
|
}
|
|
141
142
|
break;
|
|
@@ -151,7 +152,8 @@ export const getIndexOfFocused = (prevKeyCode, nextKeyCode, collection) => (ev)
|
|
|
151
152
|
* @hidden
|
|
152
153
|
*/
|
|
153
154
|
export const seekFocusedIndex = (prevKeyCode, nextKeyCode, seeker) => (startIndex, ev) => {
|
|
154
|
-
|
|
155
|
+
const code = normalizeNumpadKeys(ev);
|
|
156
|
+
switch (code) {
|
|
155
157
|
case prevKeyCode:
|
|
156
158
|
return seeker(startIndex - 1) ? startIndex - 1 : startIndex;
|
|
157
159
|
case nextKeyCode:
|
|
@@ -6,7 +6,7 @@ import * as i0 from '@angular/core';
|
|
|
6
6
|
import { EventEmitter, Injectable, inject, ElementRef, Directive, ViewChild, Input, Output, forwardRef, Component, HostBinding, ViewContainerRef, ContentChildren, HostListener, isDevMode, ViewChildren, NgModule } from '@angular/core';
|
|
7
7
|
import * as i2 from '@progress/kendo-angular-popup';
|
|
8
8
|
import { PopupService } from '@progress/kendo-angular-popup';
|
|
9
|
-
import { Keys, isPresent as isPresent$1, isDocumentAvailable, guid, ResizeSensorComponent, ResizeBatchService } from '@progress/kendo-angular-common';
|
|
9
|
+
import { normalizeNumpadKeys, Keys, isPresent as isPresent$1, isDocumentAvailable, guid, ResizeSensorComponent, ResizeBatchService } from '@progress/kendo-angular-common';
|
|
10
10
|
import * as i1 from '@progress/kendo-angular-l10n';
|
|
11
11
|
import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
12
12
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
@@ -26,8 +26,8 @@ const packageMetadata = {
|
|
|
26
26
|
productName: 'Kendo UI for Angular',
|
|
27
27
|
productCode: 'KENDOUIANGULAR',
|
|
28
28
|
productCodes: ['KENDOUIANGULAR'],
|
|
29
|
-
publishDate:
|
|
30
|
-
version: '19.3.0-develop.
|
|
29
|
+
publishDate: 1754589759,
|
|
30
|
+
version: '19.3.0-develop.33',
|
|
31
31
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
32
32
|
};
|
|
33
33
|
|
|
@@ -173,12 +173,13 @@ const makePeeker = (collection) => (index) => isPresent(collection[index]);
|
|
|
173
173
|
* @hidden
|
|
174
174
|
*/
|
|
175
175
|
const getIndexOfFocused = (prevKeyCode, nextKeyCode, collection) => (ev) => {
|
|
176
|
+
const code = normalizeNumpadKeys(ev);
|
|
176
177
|
switch (ev.type) {
|
|
177
178
|
case 'keydown':
|
|
178
|
-
if (
|
|
179
|
+
if (code === prevKeyCode) {
|
|
179
180
|
return collection.length - 1;
|
|
180
181
|
}
|
|
181
|
-
if (
|
|
182
|
+
if (code === nextKeyCode) {
|
|
182
183
|
return 0;
|
|
183
184
|
}
|
|
184
185
|
break;
|
|
@@ -194,7 +195,8 @@ const getIndexOfFocused = (prevKeyCode, nextKeyCode, collection) => (ev) => {
|
|
|
194
195
|
* @hidden
|
|
195
196
|
*/
|
|
196
197
|
const seekFocusedIndex = (prevKeyCode, nextKeyCode, seeker) => (startIndex, ev) => {
|
|
197
|
-
|
|
198
|
+
const code = normalizeNumpadKeys(ev);
|
|
199
|
+
switch (code) {
|
|
198
200
|
case prevKeyCode:
|
|
199
201
|
return seeker(startIndex - 1) ? startIndex - 1 : startIndex;
|
|
200
202
|
case nextKeyCode:
|
|
@@ -1466,7 +1468,9 @@ class ToolBarComponent {
|
|
|
1466
1468
|
}
|
|
1467
1469
|
this.zone.runOutsideAngular(() => {
|
|
1468
1470
|
this.toolbarKeydownListener = this.renderer.listen(this.element.nativeElement, 'keydown', (ev) => {
|
|
1469
|
-
|
|
1471
|
+
// on some keyboards arrow keys, PageUp/Down, and Home/End are mapped to Numpad keys
|
|
1472
|
+
const code = normalizeNumpadKeys(ev);
|
|
1473
|
+
switch (code) {
|
|
1470
1474
|
case Keys.ArrowLeft:
|
|
1471
1475
|
this.zone.run(() => {
|
|
1472
1476
|
ev.preventDefault();
|
|
@@ -1730,7 +1734,8 @@ class ToolBarComponent {
|
|
|
1730
1734
|
this.zone.runOutsideAngular(() => {
|
|
1731
1735
|
if (this.normalizedOverflow.mode === 'section') {
|
|
1732
1736
|
this.sectionKeydownListener = this.renderer.listen(this.popupRef.popupElement, 'keydown', (ev) => {
|
|
1733
|
-
|
|
1737
|
+
const code = normalizeNumpadKeys(ev);
|
|
1738
|
+
switch (code) {
|
|
1734
1739
|
case Keys.ArrowLeft:
|
|
1735
1740
|
this.zone.run(() => {
|
|
1736
1741
|
ev.preventDefault();
|
|
@@ -1776,7 +1781,8 @@ class ToolBarComponent {
|
|
|
1776
1781
|
}
|
|
1777
1782
|
else {
|
|
1778
1783
|
this.overflowKeydownListener = this.renderer.listen(this.popupRef.popupElement, 'keydown', (ev) => {
|
|
1779
|
-
|
|
1784
|
+
const code = normalizeNumpadKeys(ev);
|
|
1785
|
+
switch (code) {
|
|
1780
1786
|
case Keys.ArrowUp:
|
|
1781
1787
|
this.zone.run(() => {
|
|
1782
1788
|
ev.preventDefault();
|
|
@@ -1801,6 +1807,7 @@ class ToolBarComponent {
|
|
|
1801
1807
|
this.navigationService.resetNavigation();
|
|
1802
1808
|
});
|
|
1803
1809
|
break;
|
|
1810
|
+
case Keys.NumpadEnter:
|
|
1804
1811
|
case Keys.Enter:
|
|
1805
1812
|
case Keys.Space:
|
|
1806
1813
|
this.zone.run(() => {
|
|
@@ -3965,7 +3972,8 @@ class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
3965
3972
|
* @hidden
|
|
3966
3973
|
*/
|
|
3967
3974
|
handleKey(ev) {
|
|
3968
|
-
|
|
3975
|
+
const code = normalizeNumpadKeys(ev);
|
|
3976
|
+
if (!this.overflows && (code === this.getPrevKey(this.overflows) || code === this.getNextKey(this.overflows))) {
|
|
3969
3977
|
return false;
|
|
3970
3978
|
}
|
|
3971
3979
|
if (this.overflows && this.location !== 'section') {
|
|
@@ -4529,7 +4537,8 @@ class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
4529
4537
|
* @hidden
|
|
4530
4538
|
*/
|
|
4531
4539
|
handleKey(ev) {
|
|
4532
|
-
|
|
4540
|
+
const code = normalizeNumpadKeys(ev);
|
|
4541
|
+
if (!this.overflows && (code === this.getPrevKey(this.overflows) || code === this.getNextKey(this.overflows))) {
|
|
4533
4542
|
return false;
|
|
4534
4543
|
}
|
|
4535
4544
|
if (this.overflows) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-toolbar",
|
|
3
|
-
"version": "19.3.0-develop.
|
|
3
|
+
"version": "19.3.0-develop.33",
|
|
4
4
|
"description": "Kendo UI Angular Toolbar component - a single UI element that organizes buttons and other navigation elements",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"package": {
|
|
46
46
|
"productName": "Kendo UI for Angular",
|
|
47
47
|
"productCode": "KENDOUIANGULAR",
|
|
48
|
-
"publishDate":
|
|
48
|
+
"publishDate": 1754589759,
|
|
49
49
|
"licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
|
|
50
50
|
}
|
|
51
51
|
},
|
|
@@ -55,17 +55,17 @@
|
|
|
55
55
|
"@angular/core": "16 - 20",
|
|
56
56
|
"@angular/platform-browser": "16 - 20",
|
|
57
57
|
"@progress/kendo-licensing": "^1.7.0",
|
|
58
|
-
"@progress/kendo-angular-buttons": "19.3.0-develop.
|
|
59
|
-
"@progress/kendo-angular-common": "19.3.0-develop.
|
|
60
|
-
"@progress/kendo-angular-l10n": "19.3.0-develop.
|
|
61
|
-
"@progress/kendo-angular-icons": "19.3.0-develop.
|
|
62
|
-
"@progress/kendo-angular-indicators": "19.3.0-develop.
|
|
63
|
-
"@progress/kendo-angular-popup": "19.3.0-develop.
|
|
58
|
+
"@progress/kendo-angular-buttons": "19.3.0-develop.33",
|
|
59
|
+
"@progress/kendo-angular-common": "19.3.0-develop.33",
|
|
60
|
+
"@progress/kendo-angular-l10n": "19.3.0-develop.33",
|
|
61
|
+
"@progress/kendo-angular-icons": "19.3.0-develop.33",
|
|
62
|
+
"@progress/kendo-angular-indicators": "19.3.0-develop.33",
|
|
63
|
+
"@progress/kendo-angular-popup": "19.3.0-develop.33",
|
|
64
64
|
"rxjs": "^6.5.3 || ^7.0.0"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"tslib": "^2.3.1",
|
|
68
|
-
"@progress/kendo-angular-schematics": "19.3.0-develop.
|
|
68
|
+
"@progress/kendo-angular-schematics": "19.3.0-develop.33",
|
|
69
69
|
"node-html-parser": "^7.0.1"
|
|
70
70
|
},
|
|
71
71
|
"schematics": "./schematics/collection.json",
|
package/util.d.ts
CHANGED
|
@@ -63,11 +63,11 @@ export declare const makePeeker: (collection: any[]) => (index: number) => boole
|
|
|
63
63
|
/**
|
|
64
64
|
* @hidden
|
|
65
65
|
*/
|
|
66
|
-
export declare const getIndexOfFocused: (prevKeyCode:
|
|
66
|
+
export declare const getIndexOfFocused: (prevKeyCode: string, nextKeyCode: string, collection: HTMLElement[]) => (ev: any) => number;
|
|
67
67
|
/**
|
|
68
68
|
* @hidden
|
|
69
69
|
*/
|
|
70
|
-
export declare const seekFocusedIndex: (prevKeyCode:
|
|
70
|
+
export declare const seekFocusedIndex: (prevKeyCode: string, nextKeyCode: string, seeker: (i: number) => boolean) => (startIndex: number, ev: any) => number;
|
|
71
71
|
/**
|
|
72
72
|
* @hidden
|
|
73
73
|
*/
|