@progress/kendo-angular-grid 15.0.2-develop.6 → 15.0.2-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.
- package/common/provider.service.d.ts +1 -0
- package/esm2020/editing-directives/editing-directive-base.mjs +3 -2
- package/esm2020/grid.component.mjs +4 -0
- package/esm2020/navigation/focusable.directive.mjs +7 -4
- package/esm2020/package-metadata.mjs +2 -2
- package/fesm2015/progress-kendo-angular-grid.mjs +13 -7
- package/fesm2020/progress-kendo-angular-grid.mjs +83 -77
- package/navigation/focusable.directive.d.ts +4 -2
- package/package.json +17 -17
- package/schematics/ngAdd/index.js +3 -3
|
@@ -22,6 +22,7 @@ export declare class ContextService {
|
|
|
22
22
|
grid: GridComponent;
|
|
23
23
|
topToolbarNavigation: GridToolbarNavigationService;
|
|
24
24
|
bottomToolbarNavigation: GridToolbarNavigationService;
|
|
25
|
+
navigable: boolean;
|
|
25
26
|
constructor(renderer: Renderer2, localization: LocalizationService);
|
|
26
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<ContextService, never>;
|
|
27
28
|
static ɵprov: i0.ɵɵInjectableDeclaration<ContextService>;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { Input, Directive } from '@angular/core';
|
|
6
6
|
import { GridComponent } from '../grid.component';
|
|
7
7
|
import { LocalEditService } from './local-edit.service';
|
|
8
|
-
import { Observable } from 'rxjs';
|
|
8
|
+
import { Subscription, Observable } from 'rxjs';
|
|
9
9
|
import { LocalDataChangesService } from '../editing/local-data-changes.service';
|
|
10
10
|
import { take } from 'rxjs/operators';
|
|
11
11
|
import * as i0 from "@angular/core";
|
|
@@ -18,6 +18,7 @@ export class EditingDirectiveBase {
|
|
|
18
18
|
constructor(grid, localDataChangesService) {
|
|
19
19
|
this.grid = grid;
|
|
20
20
|
this.localDataChangesService = localDataChangesService;
|
|
21
|
+
this.subscriptions = new Subscription();
|
|
21
22
|
this.defaultEditService = this.createDefaultService();
|
|
22
23
|
}
|
|
23
24
|
// Consider adding support for the dependency injection of the service to allow for specifying a generic service without code.
|
|
@@ -35,7 +36,7 @@ export class EditingDirectiveBase {
|
|
|
35
36
|
* @hidden
|
|
36
37
|
*/
|
|
37
38
|
ngOnInit() {
|
|
38
|
-
this.subscriptions
|
|
39
|
+
this.subscriptions.add(this.grid.add.subscribe(this.addHandler.bind(this)));
|
|
39
40
|
this.subscriptions.add(this.grid.remove.subscribe(this.removeHandler.bind(this)));
|
|
40
41
|
this.subscriptions.add(this.grid.cancel.subscribe(this.cancelHandler.bind(this)));
|
|
41
42
|
this.subscriptions.add(this.grid.save.subscribe(this.saveHandler.bind(this)));
|
|
@@ -618,8 +618,12 @@ export class GridComponent {
|
|
|
618
618
|
set navigable(value) {
|
|
619
619
|
if (typeof value === 'boolean') {
|
|
620
620
|
this._navigable = value ? ['table', 'pager', 'toolbar'] : [];
|
|
621
|
+
this.ctx.navigable = value;
|
|
621
622
|
return;
|
|
622
623
|
}
|
|
624
|
+
else {
|
|
625
|
+
this.ctx.navigable = value.includes('table');
|
|
626
|
+
}
|
|
623
627
|
this._navigable = value;
|
|
624
628
|
}
|
|
625
629
|
get navigable() {
|
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
import { Directive, ElementRef, Inject, Input, Optional, Renderer2, SkipSelf } from '@angular/core';
|
|
6
6
|
import { DefaultFocusableElement } from './default-focusable-element';
|
|
7
7
|
import { CELL_CONTEXT } from '../rendering/common/cell-context';
|
|
8
|
+
import { ContextService } from '../common/provider.service';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
10
|
+
import * as i1 from "../common/provider.service";
|
|
9
11
|
/**
|
|
10
12
|
* A directive that controls the way focusable elements receive
|
|
11
13
|
* [focus in a navigable Grid]({% slug keyboard_navigation_grid %}).
|
|
@@ -24,10 +26,11 @@ import * as i0 from "@angular/core";
|
|
|
24
26
|
* ```
|
|
25
27
|
*/
|
|
26
28
|
export class FocusableDirective {
|
|
27
|
-
constructor(cellContext, hostElement, renderer) {
|
|
29
|
+
constructor(cellContext, hostElement, renderer, ctx) {
|
|
28
30
|
this.cellContext = cellContext;
|
|
29
31
|
this.hostElement = hostElement;
|
|
30
32
|
this.renderer = renderer;
|
|
33
|
+
this.ctx = ctx;
|
|
31
34
|
this.active = true;
|
|
32
35
|
this._enabled = true;
|
|
33
36
|
if (this.cellContext) {
|
|
@@ -58,7 +61,7 @@ export class FocusableDirective {
|
|
|
58
61
|
return this._enabled;
|
|
59
62
|
}
|
|
60
63
|
ngAfterViewInit() {
|
|
61
|
-
if (!this.element) {
|
|
64
|
+
if (!this.element && this.ctx.navigable) {
|
|
62
65
|
this.element = new DefaultFocusableElement(this.hostElement, this.renderer);
|
|
63
66
|
}
|
|
64
67
|
if (this.group && this.element) {
|
|
@@ -112,7 +115,7 @@ export class FocusableDirective {
|
|
|
112
115
|
this.element = element;
|
|
113
116
|
}
|
|
114
117
|
}
|
|
115
|
-
FocusableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FocusableDirective, deps: [{ token: CELL_CONTEXT, optional: true, skipSelf: true }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
118
|
+
FocusableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FocusableDirective, deps: [{ token: CELL_CONTEXT, optional: true, skipSelf: true }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.ContextService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
116
119
|
FocusableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: FocusableDirective, selector: "[kendoGridFocusable],\n [kendoGridEditCommand],\n [kendoGridRemoveCommand],\n [kendoGridSaveCommand],\n [kendoGridCancelCommand],\n [kendoGridSelectionCheckbox]\n ", inputs: { enabled: ["kendoGridFocusable", "enabled"] }, ngImport: i0 });
|
|
117
120
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FocusableDirective, decorators: [{
|
|
118
121
|
type: Directive,
|
|
@@ -132,7 +135,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
132
135
|
args: [CELL_CONTEXT]
|
|
133
136
|
}, {
|
|
134
137
|
type: SkipSelf
|
|
135
|
-
}] }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { enabled: [{
|
|
138
|
+
}] }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1.ContextService }]; }, propDecorators: { enabled: [{
|
|
136
139
|
type: Input,
|
|
137
140
|
args: ['kendoGridFocusable']
|
|
138
141
|
}] } });
|
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-grid',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
13
|
-
version: '15.0.2-develop.
|
|
12
|
+
publishDate: 1708007841,
|
|
13
|
+
version: '15.0.2-develop.8',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
15
15
|
};
|
|
@@ -2968,10 +2968,11 @@ const EMPTY_CELL_CONTEXT = {};
|
|
|
2968
2968
|
* ```
|
|
2969
2969
|
*/
|
|
2970
2970
|
class FocusableDirective {
|
|
2971
|
-
constructor(cellContext, hostElement, renderer) {
|
|
2971
|
+
constructor(cellContext, hostElement, renderer, ctx) {
|
|
2972
2972
|
this.cellContext = cellContext;
|
|
2973
2973
|
this.hostElement = hostElement;
|
|
2974
2974
|
this.renderer = renderer;
|
|
2975
|
+
this.ctx = ctx;
|
|
2975
2976
|
this.active = true;
|
|
2976
2977
|
this._enabled = true;
|
|
2977
2978
|
if (this.cellContext) {
|
|
@@ -3002,7 +3003,7 @@ class FocusableDirective {
|
|
|
3002
3003
|
return this._enabled;
|
|
3003
3004
|
}
|
|
3004
3005
|
ngAfterViewInit() {
|
|
3005
|
-
if (!this.element) {
|
|
3006
|
+
if (!this.element && this.ctx.navigable) {
|
|
3006
3007
|
this.element = new DefaultFocusableElement(this.hostElement, this.renderer);
|
|
3007
3008
|
}
|
|
3008
3009
|
if (this.group && this.element) {
|
|
@@ -3056,7 +3057,7 @@ class FocusableDirective {
|
|
|
3056
3057
|
this.element = element;
|
|
3057
3058
|
}
|
|
3058
3059
|
}
|
|
3059
|
-
FocusableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FocusableDirective, deps: [{ token: CELL_CONTEXT, optional: true, skipSelf: true }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3060
|
+
FocusableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FocusableDirective, deps: [{ token: CELL_CONTEXT, optional: true, skipSelf: true }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: ContextService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3060
3061
|
FocusableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: FocusableDirective, selector: "[kendoGridFocusable],\n [kendoGridEditCommand],\n [kendoGridRemoveCommand],\n [kendoGridSaveCommand],\n [kendoGridCancelCommand],\n [kendoGridSelectionCheckbox]\n ", inputs: { enabled: ["kendoGridFocusable", "enabled"] }, ngImport: i0 });
|
|
3061
3062
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FocusableDirective, decorators: [{
|
|
3062
3063
|
type: Directive,
|
|
@@ -3077,7 +3078,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
3077
3078
|
args: [CELL_CONTEXT]
|
|
3078
3079
|
}, {
|
|
3079
3080
|
type: SkipSelf
|
|
3080
|
-
}] }, { type: i0.ElementRef }, { type: i0.Renderer2 }];
|
|
3081
|
+
}] }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: ContextService }];
|
|
3081
3082
|
}, propDecorators: { enabled: [{
|
|
3082
3083
|
type: Input,
|
|
3083
3084
|
args: ['kendoGridFocusable']
|
|
@@ -4532,8 +4533,8 @@ const packageMetadata = {
|
|
|
4532
4533
|
name: '@progress/kendo-angular-grid',
|
|
4533
4534
|
productName: 'Kendo UI for Angular',
|
|
4534
4535
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
4535
|
-
publishDate:
|
|
4536
|
-
version: '15.0.2-develop.
|
|
4536
|
+
publishDate: 1708007841,
|
|
4537
|
+
version: '15.0.2-develop.8',
|
|
4537
4538
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
4538
4539
|
};
|
|
4539
4540
|
|
|
@@ -20552,8 +20553,12 @@ class GridComponent {
|
|
|
20552
20553
|
set navigable(value) {
|
|
20553
20554
|
if (typeof value === 'boolean') {
|
|
20554
20555
|
this._navigable = value ? ['table', 'pager', 'toolbar'] : [];
|
|
20556
|
+
this.ctx.navigable = value;
|
|
20555
20557
|
return;
|
|
20556
20558
|
}
|
|
20559
|
+
else {
|
|
20560
|
+
this.ctx.navigable = value.includes('table');
|
|
20561
|
+
}
|
|
20557
20562
|
this._navigable = value;
|
|
20558
20563
|
}
|
|
20559
20564
|
get navigable() {
|
|
@@ -26087,6 +26092,7 @@ class EditingDirectiveBase {
|
|
|
26087
26092
|
constructor(grid, localDataChangesService) {
|
|
26088
26093
|
this.grid = grid;
|
|
26089
26094
|
this.localDataChangesService = localDataChangesService;
|
|
26095
|
+
this.subscriptions = new Subscription();
|
|
26090
26096
|
this.defaultEditService = this.createDefaultService();
|
|
26091
26097
|
}
|
|
26092
26098
|
// Consider adding support for the dependency injection of the service to allow for specifying a generic service without code.
|
|
@@ -26104,7 +26110,7 @@ class EditingDirectiveBase {
|
|
|
26104
26110
|
* @hidden
|
|
26105
26111
|
*/
|
|
26106
26112
|
ngOnInit() {
|
|
26107
|
-
this.subscriptions
|
|
26113
|
+
this.subscriptions.add(this.grid.add.subscribe(this.addHandler.bind(this)));
|
|
26108
26114
|
this.subscriptions.add(this.grid.remove.subscribe(this.removeHandler.bind(this)));
|
|
26109
26115
|
this.subscriptions.add(this.grid.cancel.subscribe(this.cancelHandler.bind(this)));
|
|
26110
26116
|
this.subscriptions.add(this.grid.save.subscribe(this.saveHandler.bind(this)));
|
|
@@ -503,6 +503,76 @@ const CELL_CONTEXT = new InjectionToken('grid-cell-context');
|
|
|
503
503
|
*/
|
|
504
504
|
const EMPTY_CELL_CONTEXT = {};
|
|
505
505
|
|
|
506
|
+
/**
|
|
507
|
+
* @hidden
|
|
508
|
+
*/
|
|
509
|
+
class GridToolbarNavigationService {
|
|
510
|
+
constructor(renderer) {
|
|
511
|
+
this.renderer = renderer;
|
|
512
|
+
this.navigableElements = [];
|
|
513
|
+
this.currentActiveIndex = 0;
|
|
514
|
+
this.defaultFocusableSelector = `
|
|
515
|
+
[kendogridtoolbarfocusable],
|
|
516
|
+
[kendogridaddcommand],
|
|
517
|
+
[kendogridcancelcommand],
|
|
518
|
+
[kendogrideditcommand],
|
|
519
|
+
[kendogridremovecommand],
|
|
520
|
+
[kendogridsavecommand],
|
|
521
|
+
[kendogridexcelcommand],
|
|
522
|
+
[kendogridpdfcommand]
|
|
523
|
+
`;
|
|
524
|
+
}
|
|
525
|
+
notify() {
|
|
526
|
+
// ensure focusable elements are in the same order as in the DOM
|
|
527
|
+
this.navigableElements = this.navigableElements.length && Array.from(this.navigableElements[0].parentElement.querySelectorAll(this.defaultFocusableSelector)) || [];
|
|
528
|
+
this.currentActiveIndex = 0;
|
|
529
|
+
this.updateFocus();
|
|
530
|
+
}
|
|
531
|
+
focus() {
|
|
532
|
+
this.navigableElements[this.currentActiveIndex]?.focus();
|
|
533
|
+
}
|
|
534
|
+
updateFocus() {
|
|
535
|
+
if (!this.navigableElements.length) {
|
|
536
|
+
return;
|
|
537
|
+
}
|
|
538
|
+
this.navigableElements.forEach(el => {
|
|
539
|
+
this.renderer.setAttribute(el, 'tabindex', '-1');
|
|
540
|
+
});
|
|
541
|
+
this.renderer.setAttribute(this.navigableElements[this.currentActiveIndex], 'tabindex', '0');
|
|
542
|
+
if (isDocumentAvailable() && document.activeElement.closest('.k-toolbar')) {
|
|
543
|
+
this.navigableElements[this.currentActiveIndex].focus();
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
GridToolbarNavigationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GridToolbarNavigationService, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
548
|
+
GridToolbarNavigationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GridToolbarNavigationService });
|
|
549
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GridToolbarNavigationService, decorators: [{
|
|
550
|
+
type: Injectable
|
|
551
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }]; } });
|
|
552
|
+
|
|
553
|
+
/**
|
|
554
|
+
* @hidden
|
|
555
|
+
*
|
|
556
|
+
* The Context service is used to provide common
|
|
557
|
+
* services and DI tokens for a Grid instance.
|
|
558
|
+
*
|
|
559
|
+
* This keeps the constructor parameters stable
|
|
560
|
+
* and a avoids dependency cycles between components.
|
|
561
|
+
*/
|
|
562
|
+
class ContextService {
|
|
563
|
+
constructor(renderer, localization) {
|
|
564
|
+
this.renderer = renderer;
|
|
565
|
+
this.localization = localization;
|
|
566
|
+
this.topToolbarNavigation = new GridToolbarNavigationService(this.renderer);
|
|
567
|
+
this.bottomToolbarNavigation = new GridToolbarNavigationService(this.renderer);
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
ContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ContextService, deps: [{ token: i0.Renderer2 }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
571
|
+
ContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ContextService });
|
|
572
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ContextService, decorators: [{
|
|
573
|
+
type: Injectable
|
|
574
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i1.LocalizationService }]; } });
|
|
575
|
+
|
|
506
576
|
/**
|
|
507
577
|
* A directive that controls the way focusable elements receive
|
|
508
578
|
* [focus in a navigable Grid]({% slug keyboard_navigation_grid %}).
|
|
@@ -521,10 +591,11 @@ const EMPTY_CELL_CONTEXT = {};
|
|
|
521
591
|
* ```
|
|
522
592
|
*/
|
|
523
593
|
class FocusableDirective {
|
|
524
|
-
constructor(cellContext, hostElement, renderer) {
|
|
594
|
+
constructor(cellContext, hostElement, renderer, ctx) {
|
|
525
595
|
this.cellContext = cellContext;
|
|
526
596
|
this.hostElement = hostElement;
|
|
527
597
|
this.renderer = renderer;
|
|
598
|
+
this.ctx = ctx;
|
|
528
599
|
this.active = true;
|
|
529
600
|
this._enabled = true;
|
|
530
601
|
if (this.cellContext) {
|
|
@@ -555,7 +626,7 @@ class FocusableDirective {
|
|
|
555
626
|
return this._enabled;
|
|
556
627
|
}
|
|
557
628
|
ngAfterViewInit() {
|
|
558
|
-
if (!this.element) {
|
|
629
|
+
if (!this.element && this.ctx.navigable) {
|
|
559
630
|
this.element = new DefaultFocusableElement(this.hostElement, this.renderer);
|
|
560
631
|
}
|
|
561
632
|
if (this.group && this.element) {
|
|
@@ -609,7 +680,7 @@ class FocusableDirective {
|
|
|
609
680
|
this.element = element;
|
|
610
681
|
}
|
|
611
682
|
}
|
|
612
|
-
FocusableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FocusableDirective, deps: [{ token: CELL_CONTEXT, optional: true, skipSelf: true }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
683
|
+
FocusableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FocusableDirective, deps: [{ token: CELL_CONTEXT, optional: true, skipSelf: true }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: ContextService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
613
684
|
FocusableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: FocusableDirective, selector: "[kendoGridFocusable],\n [kendoGridEditCommand],\n [kendoGridRemoveCommand],\n [kendoGridSaveCommand],\n [kendoGridCancelCommand],\n [kendoGridSelectionCheckbox]\n ", inputs: { enabled: ["kendoGridFocusable", "enabled"] }, ngImport: i0 });
|
|
614
685
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FocusableDirective, decorators: [{
|
|
615
686
|
type: Directive,
|
|
@@ -629,7 +700,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
629
700
|
args: [CELL_CONTEXT]
|
|
630
701
|
}, {
|
|
631
702
|
type: SkipSelf
|
|
632
|
-
}] }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { enabled: [{
|
|
703
|
+
}] }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: ContextService }]; }, propDecorators: { enabled: [{
|
|
633
704
|
type: Input,
|
|
634
705
|
args: ['kendoGridFocusable']
|
|
635
706
|
}] } });
|
|
@@ -1454,76 +1525,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1454
1525
|
type: Injectable
|
|
1455
1526
|
}] });
|
|
1456
1527
|
|
|
1457
|
-
/**
|
|
1458
|
-
* @hidden
|
|
1459
|
-
*/
|
|
1460
|
-
class GridToolbarNavigationService {
|
|
1461
|
-
constructor(renderer) {
|
|
1462
|
-
this.renderer = renderer;
|
|
1463
|
-
this.navigableElements = [];
|
|
1464
|
-
this.currentActiveIndex = 0;
|
|
1465
|
-
this.defaultFocusableSelector = `
|
|
1466
|
-
[kendogridtoolbarfocusable],
|
|
1467
|
-
[kendogridaddcommand],
|
|
1468
|
-
[kendogridcancelcommand],
|
|
1469
|
-
[kendogrideditcommand],
|
|
1470
|
-
[kendogridremovecommand],
|
|
1471
|
-
[kendogridsavecommand],
|
|
1472
|
-
[kendogridexcelcommand],
|
|
1473
|
-
[kendogridpdfcommand]
|
|
1474
|
-
`;
|
|
1475
|
-
}
|
|
1476
|
-
notify() {
|
|
1477
|
-
// ensure focusable elements are in the same order as in the DOM
|
|
1478
|
-
this.navigableElements = this.navigableElements.length && Array.from(this.navigableElements[0].parentElement.querySelectorAll(this.defaultFocusableSelector)) || [];
|
|
1479
|
-
this.currentActiveIndex = 0;
|
|
1480
|
-
this.updateFocus();
|
|
1481
|
-
}
|
|
1482
|
-
focus() {
|
|
1483
|
-
this.navigableElements[this.currentActiveIndex]?.focus();
|
|
1484
|
-
}
|
|
1485
|
-
updateFocus() {
|
|
1486
|
-
if (!this.navigableElements.length) {
|
|
1487
|
-
return;
|
|
1488
|
-
}
|
|
1489
|
-
this.navigableElements.forEach(el => {
|
|
1490
|
-
this.renderer.setAttribute(el, 'tabindex', '-1');
|
|
1491
|
-
});
|
|
1492
|
-
this.renderer.setAttribute(this.navigableElements[this.currentActiveIndex], 'tabindex', '0');
|
|
1493
|
-
if (isDocumentAvailable() && document.activeElement.closest('.k-toolbar')) {
|
|
1494
|
-
this.navigableElements[this.currentActiveIndex].focus();
|
|
1495
|
-
}
|
|
1496
|
-
}
|
|
1497
|
-
}
|
|
1498
|
-
GridToolbarNavigationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GridToolbarNavigationService, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1499
|
-
GridToolbarNavigationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GridToolbarNavigationService });
|
|
1500
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GridToolbarNavigationService, decorators: [{
|
|
1501
|
-
type: Injectable
|
|
1502
|
-
}], ctorParameters: function () { return [{ type: i0.Renderer2 }]; } });
|
|
1503
|
-
|
|
1504
|
-
/**
|
|
1505
|
-
* @hidden
|
|
1506
|
-
*
|
|
1507
|
-
* The Context service is used to provide common
|
|
1508
|
-
* services and DI tokens for a Grid instance.
|
|
1509
|
-
*
|
|
1510
|
-
* This keeps the constructor parameters stable
|
|
1511
|
-
* and a avoids dependency cycles between components.
|
|
1512
|
-
*/
|
|
1513
|
-
class ContextService {
|
|
1514
|
-
constructor(renderer, localization) {
|
|
1515
|
-
this.renderer = renderer;
|
|
1516
|
-
this.localization = localization;
|
|
1517
|
-
this.topToolbarNavigation = new GridToolbarNavigationService(this.renderer);
|
|
1518
|
-
this.bottomToolbarNavigation = new GridToolbarNavigationService(this.renderer);
|
|
1519
|
-
}
|
|
1520
|
-
}
|
|
1521
|
-
ContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ContextService, deps: [{ token: i0.Renderer2 }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1522
|
-
ContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ContextService });
|
|
1523
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ContextService, decorators: [{
|
|
1524
|
-
type: Injectable
|
|
1525
|
-
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i1.LocalizationService }]; } });
|
|
1526
|
-
|
|
1527
1528
|
const isInSameGrid = (element, gridElement) => closest(element, matchesNodeName('kendo-grid')) === gridElement;
|
|
1528
1529
|
const matchHeaderCell = matchesNodeName('th');
|
|
1529
1530
|
const matchDataCell = matchesNodeName('td');
|
|
@@ -4500,8 +4501,8 @@ const packageMetadata = {
|
|
|
4500
4501
|
name: '@progress/kendo-angular-grid',
|
|
4501
4502
|
productName: 'Kendo UI for Angular',
|
|
4502
4503
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
4503
|
-
publishDate:
|
|
4504
|
-
version: '15.0.2-develop.
|
|
4504
|
+
publishDate: 1708007841,
|
|
4505
|
+
version: '15.0.2-develop.8',
|
|
4505
4506
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
4506
4507
|
};
|
|
4507
4508
|
|
|
@@ -20465,8 +20466,12 @@ class GridComponent {
|
|
|
20465
20466
|
set navigable(value) {
|
|
20466
20467
|
if (typeof value === 'boolean') {
|
|
20467
20468
|
this._navigable = value ? ['table', 'pager', 'toolbar'] : [];
|
|
20469
|
+
this.ctx.navigable = value;
|
|
20468
20470
|
return;
|
|
20469
20471
|
}
|
|
20472
|
+
else {
|
|
20473
|
+
this.ctx.navigable = value.includes('table');
|
|
20474
|
+
}
|
|
20470
20475
|
this._navigable = value;
|
|
20471
20476
|
}
|
|
20472
20477
|
get navigable() {
|
|
@@ -25984,6 +25989,7 @@ class EditingDirectiveBase {
|
|
|
25984
25989
|
constructor(grid, localDataChangesService) {
|
|
25985
25990
|
this.grid = grid;
|
|
25986
25991
|
this.localDataChangesService = localDataChangesService;
|
|
25992
|
+
this.subscriptions = new Subscription();
|
|
25987
25993
|
this.defaultEditService = this.createDefaultService();
|
|
25988
25994
|
}
|
|
25989
25995
|
// Consider adding support for the dependency injection of the service to allow for specifying a generic service without code.
|
|
@@ -26001,7 +26007,7 @@ class EditingDirectiveBase {
|
|
|
26001
26007
|
* @hidden
|
|
26002
26008
|
*/
|
|
26003
26009
|
ngOnInit() {
|
|
26004
|
-
this.subscriptions
|
|
26010
|
+
this.subscriptions.add(this.grid.add.subscribe(this.addHandler.bind(this)));
|
|
26005
26011
|
this.subscriptions.add(this.grid.remove.subscribe(this.removeHandler.bind(this)));
|
|
26006
26012
|
this.subscriptions.add(this.grid.cancel.subscribe(this.cancelHandler.bind(this)));
|
|
26007
26013
|
this.subscriptions.add(this.grid.save.subscribe(this.saveHandler.bind(this)));
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { AfterViewInit, ElementRef, OnDestroy, Renderer2 } from '@angular/core';
|
|
6
6
|
import { FocusableElement } from './focusable-element.interface';
|
|
7
7
|
import { CellContext } from '../rendering/common/cell-context';
|
|
8
|
+
import { ContextService } from '../common/provider.service';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
9
10
|
/**
|
|
10
11
|
* A directive that controls the way focusable elements receive
|
|
@@ -27,6 +28,7 @@ export declare class FocusableDirective implements FocusableElement, AfterViewIn
|
|
|
27
28
|
private cellContext;
|
|
28
29
|
private hostElement;
|
|
29
30
|
private renderer;
|
|
31
|
+
private ctx;
|
|
30
32
|
private active;
|
|
31
33
|
private group;
|
|
32
34
|
private element;
|
|
@@ -36,7 +38,7 @@ export declare class FocusableDirective implements FocusableElement, AfterViewIn
|
|
|
36
38
|
*/
|
|
37
39
|
set enabled(value: any);
|
|
38
40
|
get enabled(): any;
|
|
39
|
-
constructor(cellContext: CellContext, hostElement: ElementRef, renderer: Renderer2);
|
|
41
|
+
constructor(cellContext: CellContext, hostElement: ElementRef, renderer: Renderer2, ctx: ContextService);
|
|
40
42
|
ngAfterViewInit(): void;
|
|
41
43
|
ngOnDestroy(): void;
|
|
42
44
|
/**
|
|
@@ -63,6 +65,6 @@ export declare class FocusableDirective implements FocusableElement, AfterViewIn
|
|
|
63
65
|
* @hidden
|
|
64
66
|
*/
|
|
65
67
|
registerElement(element: FocusableElement): void;
|
|
66
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FocusableDirective, [{ optional: true; skipSelf: true; }, null, null]>;
|
|
68
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FocusableDirective, [{ optional: true; skipSelf: true; }, null, null, null]>;
|
|
67
69
|
static ɵdir: i0.ɵɵDirectiveDeclaration<FocusableDirective, "[kendoGridFocusable], [kendoGridEditCommand], [kendoGridRemoveCommand], [kendoGridSaveCommand], [kendoGridCancelCommand], [kendoGridSelectionCheckbox] ", never, { "enabled": "kendoGridFocusable"; }, {}, never>;
|
|
68
70
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-grid",
|
|
3
|
-
"version": "15.0.2-develop.
|
|
3
|
+
"version": "15.0.2-develop.8",
|
|
4
4
|
"description": "Kendo UI Grid for Angular - high performance data grid with paging, filtering, virtualization, CRUD, and more.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -33,26 +33,26 @@
|
|
|
33
33
|
"@progress/kendo-data-query": "^1.0.0",
|
|
34
34
|
"@progress/kendo-drawing": "^1.19.0",
|
|
35
35
|
"@progress/kendo-licensing": "^1.0.2",
|
|
36
|
-
"@progress/kendo-angular-buttons": "15.0.2-develop.
|
|
37
|
-
"@progress/kendo-angular-common": "15.0.2-develop.
|
|
38
|
-
"@progress/kendo-angular-dateinputs": "15.0.2-develop.
|
|
39
|
-
"@progress/kendo-angular-layout": "15.0.2-develop.
|
|
40
|
-
"@progress/kendo-angular-dropdowns": "15.0.2-develop.
|
|
41
|
-
"@progress/kendo-angular-excel-export": "15.0.2-develop.
|
|
42
|
-
"@progress/kendo-angular-icons": "15.0.2-develop.
|
|
43
|
-
"@progress/kendo-angular-inputs": "15.0.2-develop.
|
|
44
|
-
"@progress/kendo-angular-intl": "15.0.2-develop.
|
|
45
|
-
"@progress/kendo-angular-l10n": "15.0.2-develop.
|
|
46
|
-
"@progress/kendo-angular-label": "15.0.2-develop.
|
|
47
|
-
"@progress/kendo-angular-pdf-export": "15.0.2-develop.
|
|
48
|
-
"@progress/kendo-angular-popup": "15.0.2-develop.
|
|
49
|
-
"@progress/kendo-angular-utils": "15.0.2-develop.
|
|
36
|
+
"@progress/kendo-angular-buttons": "15.0.2-develop.8",
|
|
37
|
+
"@progress/kendo-angular-common": "15.0.2-develop.8",
|
|
38
|
+
"@progress/kendo-angular-dateinputs": "15.0.2-develop.8",
|
|
39
|
+
"@progress/kendo-angular-layout": "15.0.2-develop.8",
|
|
40
|
+
"@progress/kendo-angular-dropdowns": "15.0.2-develop.8",
|
|
41
|
+
"@progress/kendo-angular-excel-export": "15.0.2-develop.8",
|
|
42
|
+
"@progress/kendo-angular-icons": "15.0.2-develop.8",
|
|
43
|
+
"@progress/kendo-angular-inputs": "15.0.2-develop.8",
|
|
44
|
+
"@progress/kendo-angular-intl": "15.0.2-develop.8",
|
|
45
|
+
"@progress/kendo-angular-l10n": "15.0.2-develop.8",
|
|
46
|
+
"@progress/kendo-angular-label": "15.0.2-develop.8",
|
|
47
|
+
"@progress/kendo-angular-pdf-export": "15.0.2-develop.8",
|
|
48
|
+
"@progress/kendo-angular-popup": "15.0.2-develop.8",
|
|
49
|
+
"@progress/kendo-angular-utils": "15.0.2-develop.8",
|
|
50
50
|
"rxjs": "^6.5.3 || ^7.0.0",
|
|
51
|
-
"@progress/kendo-angular-spreadsheet": "15.0.2-develop.
|
|
51
|
+
"@progress/kendo-angular-spreadsheet": "15.0.2-develop.8"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"tslib": "^2.3.1",
|
|
55
|
-
"@progress/kendo-angular-schematics": "15.0.2-develop.
|
|
55
|
+
"@progress/kendo-angular-schematics": "15.0.2-develop.8",
|
|
56
56
|
"@progress/kendo-common": "^0.2.0",
|
|
57
57
|
"@progress/kendo-file-saver": "^1.0.0"
|
|
58
58
|
},
|
|
@@ -4,13 +4,13 @@ const schematics_1 = require("@angular-devkit/schematics");
|
|
|
4
4
|
function default_1(options) {
|
|
5
5
|
const finalOptions = Object.assign(Object.assign({}, options), { mainNgModule: 'GridModule', package: 'grid', peerDependencies: {
|
|
6
6
|
// peer dep of the dropdowns
|
|
7
|
-
'@progress/kendo-angular-treeview': '15.0.2-develop.
|
|
7
|
+
'@progress/kendo-angular-treeview': '15.0.2-develop.8',
|
|
8
8
|
// peer dependency of kendo-angular-inputs
|
|
9
|
-
'@progress/kendo-angular-dialog': '15.0.2-develop.
|
|
9
|
+
'@progress/kendo-angular-dialog': '15.0.2-develop.8',
|
|
10
10
|
// peer dependency of kendo-angular-icons
|
|
11
11
|
'@progress/kendo-svg-icons': '^2.0.0',
|
|
12
12
|
// peer dependency of kendo-angular-layout
|
|
13
|
-
'@progress/kendo-angular-progressbar': '15.0.2-develop.
|
|
13
|
+
'@progress/kendo-angular-progressbar': '15.0.2-develop.8'
|
|
14
14
|
} });
|
|
15
15
|
return (0, schematics_1.externalSchematic)('@progress/kendo-angular-schematics', 'ng-add', finalOptions);
|
|
16
16
|
}
|