@progress/kendo-angular-grid 7.0.1 → 7.1.0-dev.202206011456
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/bundles/kendo-angular-grid.umd.js +1 -1
- package/esm2015/column-menu/column-menu.component.js +2 -2
- package/esm2015/filtering/base-filter-cell.component.js +0 -1
- package/esm2015/filtering/menu/filter-menu.component.js +2 -2
- package/esm2015/grid.component.js +48 -37
- package/esm2015/main.js +3 -0
- package/esm2015/navigation/logical-cell.directive.js +3 -3
- package/esm2015/navigation/navigable-settings.js +5 -0
- package/esm2015/navigation/navigation.service.js +14 -1
- package/esm2015/package-metadata.js +1 -1
- package/esm2015/pager/pager.component.js +11 -11
- package/esm2015/rendering/header/header.component.js +1 -11
- package/esm2015/rendering/list.component.js +1 -1
- package/fesm2015/kendo-angular-grid.js +84 -71
- package/filtering/base-filter-cell.component.d.ts +0 -1
- package/grid.component.d.ts +8 -3
- package/main.d.ts +3 -0
- package/navigation/navigable-settings.d.ts +12 -0
- package/navigation/navigation.service.d.ts +7 -1
- package/package.json +1 -1
|
@@ -128,7 +128,7 @@ export class ColumnMenuComponent {
|
|
|
128
128
|
this.expandedPosition = this.getExpandedState(this.settings.setColumnPosition);
|
|
129
129
|
this.popupRef = this.popupService.open(anchor, template, this.popupRef, POPUP_CLASS);
|
|
130
130
|
if (!this.popupRef) {
|
|
131
|
-
if (this.navigationService.
|
|
131
|
+
if (this.navigationService.tableEnabled) {
|
|
132
132
|
this.navigationService.focusCell(0, this.column.leafIndex);
|
|
133
133
|
}
|
|
134
134
|
else {
|
|
@@ -142,7 +142,7 @@ export class ColumnMenuComponent {
|
|
|
142
142
|
close() {
|
|
143
143
|
this.popupService.destroy();
|
|
144
144
|
this.popupRef = null;
|
|
145
|
-
if (this.navigationService.
|
|
145
|
+
if (this.navigationService.tableEnabled) {
|
|
146
146
|
this.navigationService.focusCell(0, this.column.leafIndex);
|
|
147
147
|
}
|
|
148
148
|
else {
|
|
@@ -85,7 +85,6 @@ export const localizeOperators = operators => localization => Object.keys(operat
|
|
|
85
85
|
}));
|
|
86
86
|
/**
|
|
87
87
|
* An abstract base class for the filter-cell component ([see example]({% slug reusablecustomfilters_grid %}#toc-filter-row)).
|
|
88
|
-
* @hidden
|
|
89
88
|
*/
|
|
90
89
|
export class BaseFilterCellComponent {
|
|
91
90
|
constructor(filterService) {
|
|
@@ -37,7 +37,7 @@ export class FilterMenuComponent {
|
|
|
37
37
|
toggle(anchor, template) {
|
|
38
38
|
this.popupRef = this.popupService.open(anchor, template, this.popupRef);
|
|
39
39
|
if (!this.popupRef) {
|
|
40
|
-
if (this.navigationService.
|
|
40
|
+
if (this.navigationService.tableEnabled) {
|
|
41
41
|
this.navigationService.focusCell(0, this.column.leafIndex);
|
|
42
42
|
}
|
|
43
43
|
else {
|
|
@@ -48,7 +48,7 @@ export class FilterMenuComponent {
|
|
|
48
48
|
}
|
|
49
49
|
close() {
|
|
50
50
|
this.popupService.destroy();
|
|
51
|
-
if (this.navigationService.
|
|
51
|
+
if (this.navigationService.tableEnabled) {
|
|
52
52
|
this.navigationService.focusCell(0, this.column.leafIndex);
|
|
53
53
|
}
|
|
54
54
|
else {
|
|
@@ -278,11 +278,6 @@ export class GridComponent {
|
|
|
278
278
|
* By default, grouping is disabled ([see example]({% slug groupingbasics_grid %})).
|
|
279
279
|
*/
|
|
280
280
|
this.groupable = false;
|
|
281
|
-
/**
|
|
282
|
-
* If set to `true`, the user can use dedicated shortcuts to interact with the Grid.
|
|
283
|
-
* By default, navigation is disabled and the Grid content is accessible in the normal tab sequence.
|
|
284
|
-
*/
|
|
285
|
-
this.navigable = false;
|
|
286
281
|
/**
|
|
287
282
|
* Indicates whether the Grid columns will be resized during initialization so that
|
|
288
283
|
* they fit their headers and row content. Defaults to `false`.
|
|
@@ -458,6 +453,7 @@ export class GridComponent {
|
|
|
458
453
|
this.cachedWindowWidth = 0;
|
|
459
454
|
this._rowSelected = null;
|
|
460
455
|
this._cellSelected = null;
|
|
456
|
+
this._navigable = [];
|
|
461
457
|
this.rtl = false;
|
|
462
458
|
this._rowClass = () => null;
|
|
463
459
|
validatePackage(packageMetadata);
|
|
@@ -589,6 +585,21 @@ export class GridComponent {
|
|
|
589
585
|
get marqueeSelection() {
|
|
590
586
|
return this.selectionService.enableMarquee || this.cellSelectionService.enableMarquee;
|
|
591
587
|
}
|
|
588
|
+
/**
|
|
589
|
+
* If set to `true`, the user can use dedicated shortcuts to interact with the Grid.
|
|
590
|
+
* By default, navigation is disabled and the Grid content is accessible in the normal tab sequence.
|
|
591
|
+
* To enable navigation through separate Grid sections only, provide a [`GridNavigableSection`]({% slug api_grid_gridnavigablesection %}) array.
|
|
592
|
+
*/
|
|
593
|
+
set navigable(value) {
|
|
594
|
+
if (typeof value === 'boolean') {
|
|
595
|
+
this._navigable = value ? ['table', 'pager'] : [];
|
|
596
|
+
return;
|
|
597
|
+
}
|
|
598
|
+
this._navigable = value;
|
|
599
|
+
}
|
|
600
|
+
get navigable() {
|
|
601
|
+
return this._navigable;
|
|
602
|
+
}
|
|
592
603
|
/**
|
|
593
604
|
* @hidden
|
|
594
605
|
*
|
|
@@ -812,6 +823,9 @@ export class GridComponent {
|
|
|
812
823
|
get ariaColCount() {
|
|
813
824
|
return this.columnsContainer.leafColumnsToRender.length;
|
|
814
825
|
}
|
|
826
|
+
get navigation() {
|
|
827
|
+
return this.navigationService;
|
|
828
|
+
}
|
|
815
829
|
get isVirtual() {
|
|
816
830
|
return this.scrollable === 'virtual';
|
|
817
831
|
}
|
|
@@ -1007,6 +1021,16 @@ export class GridComponent {
|
|
|
1007
1021
|
if (isChanged('groupable', changes, true)) {
|
|
1008
1022
|
this.groupable = changes.groupable.currentValue;
|
|
1009
1023
|
}
|
|
1024
|
+
if (isChanged('navigable', changes, true)) {
|
|
1025
|
+
if (this.navigationService.enabled) {
|
|
1026
|
+
this.navigationService.setActiveSections(this.navigable);
|
|
1027
|
+
}
|
|
1028
|
+
else {
|
|
1029
|
+
if (this.navigable.length) {
|
|
1030
|
+
this.navigationService.init(this.navigationMetadata(), this.navigable);
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1010
1034
|
}
|
|
1011
1035
|
ngAfterViewInit() {
|
|
1012
1036
|
this.attachScrollSync();
|
|
@@ -1026,8 +1050,8 @@ export class GridComponent {
|
|
|
1026
1050
|
this.columnsChangeSubscription = this.columns.changes.subscribe(() => this.verifySettings());
|
|
1027
1051
|
}
|
|
1028
1052
|
ngOnInit() {
|
|
1029
|
-
if (this.navigable) {
|
|
1030
|
-
this.navigationService.init(this.navigationMetadata());
|
|
1053
|
+
if (this.navigable.length) {
|
|
1054
|
+
this.navigationService.init(this.navigationMetadata(), this.navigable);
|
|
1031
1055
|
}
|
|
1032
1056
|
}
|
|
1033
1057
|
ngOnDestroy() {
|
|
@@ -1988,8 +2012,8 @@ export class GridComponent {
|
|
|
1988
2012
|
this.columnResize.emit(args);
|
|
1989
2013
|
}
|
|
1990
2014
|
assertNavigable() {
|
|
1991
|
-
if (isDevMode() && !this.
|
|
1992
|
-
throw new Error('The Grid should be configured as
|
|
2015
|
+
if (isDevMode() && !this.navigationService.enabled) {
|
|
2016
|
+
throw new Error('The Grid should be configured as navigable to control focus');
|
|
1993
2017
|
}
|
|
1994
2018
|
}
|
|
1995
2019
|
navigationMetadata() {
|
|
@@ -2355,8 +2379,8 @@ GridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version:
|
|
|
2355
2379
|
<kendo-grid-toolbar class="k-toolbar k-grid-toolbar" *ngIf="showTopToolbar" position="top"></kendo-grid-toolbar>
|
|
2356
2380
|
<kendo-pager
|
|
2357
2381
|
*ngIf="showTopPager"
|
|
2358
|
-
[tabindex]="
|
|
2359
|
-
[attr.role]="
|
|
2382
|
+
[tabindex]="navigation.pagerEnabled ? '0' : '-1'"
|
|
2383
|
+
[attr.role]="navigation.pagerEnabled ? 'application' : undefined"
|
|
2360
2384
|
class="k-grid-pager-top"
|
|
2361
2385
|
[template]="pagerTemplate"
|
|
2362
2386
|
[pageSize]="pageSize"
|
|
@@ -2410,7 +2434,7 @@ GridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version:
|
|
|
2410
2434
|
[columnMenuTemplate]="columnMenuTemplate"
|
|
2411
2435
|
[totalColumnsCount]="leafColumns.length"
|
|
2412
2436
|
[detailTemplate]="detailTemplate"
|
|
2413
|
-
[tabIndex]="
|
|
2437
|
+
[tabIndex]="navigation.tableEnabled ? '-1' : '0'">
|
|
2414
2438
|
</thead>
|
|
2415
2439
|
</table>
|
|
2416
2440
|
</div><div #header class="k-grid-header-wrap" role="presentation" data-scrollable
|
|
@@ -2441,7 +2465,7 @@ GridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version:
|
|
|
2441
2465
|
[lockedColumnsCount]="lockedLeafColumns.length"
|
|
2442
2466
|
[totalColumnsCount]="leafColumns.length"
|
|
2443
2467
|
[detailTemplate]="detailTemplate"
|
|
2444
|
-
[tabIndex]="
|
|
2468
|
+
[tabIndex]="navigation.tableEnabled ? '-1' : '0'">
|
|
2445
2469
|
</thead>
|
|
2446
2470
|
</table>
|
|
2447
2471
|
<div *ngIf="virtualColumns" class="k-width-container" role="presentation">
|
|
@@ -2546,7 +2570,7 @@ GridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version:
|
|
|
2546
2570
|
[columnMenu]="columnMenuOptions"
|
|
2547
2571
|
[columnMenuTemplate]="columnMenuTemplate"
|
|
2548
2572
|
[detailTemplate]="detailTemplate"
|
|
2549
|
-
[tabIndex]="
|
|
2573
|
+
[tabIndex]="navigation.tableEnabled ? '-1' : '0'">
|
|
2550
2574
|
</thead>
|
|
2551
2575
|
<tbody kendoGridTableBody
|
|
2552
2576
|
[isLoading]="loading"
|
|
@@ -2580,8 +2604,8 @@ GridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version:
|
|
|
2580
2604
|
</div>
|
|
2581
2605
|
<kendo-pager
|
|
2582
2606
|
*ngIf="showBottomPager"
|
|
2583
|
-
[tabindex]="
|
|
2584
|
-
[attr.role]="
|
|
2607
|
+
[tabindex]="navigation.pagerEnabled ? '0' : '-1'"
|
|
2608
|
+
[attr.role]="navigation.pagerEnabled ? 'application' : undefined"
|
|
2585
2609
|
[template]="pagerTemplate"
|
|
2586
2610
|
[pageSize]="pageSize"
|
|
2587
2611
|
[total]="view.total"
|
|
@@ -2590,7 +2614,7 @@ GridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version:
|
|
|
2590
2614
|
(pageChange)="notifyPageChange('pager', $event)">
|
|
2591
2615
|
</kendo-pager>
|
|
2592
2616
|
<kendo-grid-toolbar class="k-toolbar k-grid-toolbar k-grid-toolbar-bottom" *ngIf="showBottomToolbar" position="bottom"></kendo-grid-toolbar>
|
|
2593
|
-
`, isInline: true,
|
|
2617
|
+
`, isInline: true, components: [{ type: i23.ToolbarComponent, selector: "kendo-grid-toolbar", inputs: ["position"] }, { type: i24.PagerComponent, selector: "kendo-pager", inputs: ["total", "skip", "pageSize", "options", "template"], outputs: ["pageChange"] }, { type: i25.GroupPanelComponent, selector: "kendo-grid-group-panel", inputs: ["text", "groups"], outputs: ["change"] }, { type: i26.ColGroupComponent, selector: "[kendoGridColGroup]", inputs: ["columns", "groups", "detailTemplate"] }, { type: i27.HeaderComponent, selector: "[kendoGridHeader]", inputs: ["totalColumnLevels", "columns", "groups", "detailTemplate", "scrollable", "filterable", "sort", "filter", "sortable", "groupable", "lockedColumnsCount", "resizable", "reorderable", "columnMenu", "columnMenuTemplate", "totalColumnsCount", "tabIndex"] }, { type: i28.ListComponent, selector: "kendo-grid-list", inputs: ["data", "groups", "total", "rowHeight", "stickyRowHeight", "detailRowHeight", "take", "skip", "columns", "detailTemplate", "noRecordsTemplate", "selectable", "groupable", "filterable", "rowClass", "rowSticky", "loading", "trackBy", "virtualColumns", "isVirtual", "cellLoadingTemplate", "loadingTemplate"], outputs: ["contentScroll", "pageChange", "scrollBottom"] }, { type: i29.FooterComponent, selector: "[kendoGridFooter]", inputs: ["columns", "groups", "detailTemplate", "scrollable", "lockedColumnsCount", "logicalRowIndex"] }, { type: i30.TableBodyComponent, selector: "[kendoGridTableBody]", inputs: ["columns", "allColumns", "groups", "detailTemplate", "noRecordsTemplate", "data", "skip", "selectable", "filterable", "noRecordsText", "isLocked", "isLoading", "isVirtual", "cellLoadingTemplate", "skipGroupDecoration", "showGroupFooters", "lockedColumnsCount", "totalColumnsCount", "virtualColumns", "trackBy", "rowSticky", "rowClass"] }, { type: i31.LoadingComponent, selector: "[kendoGridLoading]", inputs: ["loadingTemplate"] }], directives: [{ type: i32.LocalizedMessagesDirective, selector: "[kendoGridLocalizedMessages]" }, { type: i33.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i34.TableDirective, selector: "table", inputs: ["locked", "virtualColumns"] }, { type: i35.ResizableContainerDirective, selector: "[kendoGridResizableContainer]", inputs: ["lockedWidth", "kendoGridResizableContainer"] }, { type: i36.DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { type: i37.GridMarqueeDirective, selector: "[kendoGridSelectionMarquee]" }], encapsulation: i0.ViewEncapsulation.None });
|
|
2594
2618
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: GridComponent, decorators: [{
|
|
2595
2619
|
type: Component,
|
|
2596
2620
|
args: [{
|
|
@@ -2639,19 +2663,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2639
2663
|
ContextService
|
|
2640
2664
|
],
|
|
2641
2665
|
selector: 'kendo-grid',
|
|
2642
|
-
styles: [
|
|
2643
|
-
// Styles for backwards compatibility with kendo-theme-default@v2.46.0 and earlier.
|
|
2644
|
-
` .k-grid .k-grid-aria-root {
|
|
2645
|
-
display: flex;
|
|
2646
|
-
flex-direction: column;
|
|
2647
|
-
flex: 1 1 auto;
|
|
2648
|
-
overflow: hidden;
|
|
2649
|
-
}
|
|
2650
|
-
|
|
2651
|
-
.k-grid .k-filter-row td {
|
|
2652
|
-
white-space: nowrap;
|
|
2653
|
-
}`
|
|
2654
|
-
],
|
|
2655
2666
|
template: `
|
|
2656
2667
|
<ng-container kendoGridLocalizedMessages
|
|
2657
2668
|
i18n-groupPanelEmpty="kendo.grid.groupPanelEmpty|The label visible in the Grid group panel when it is empty"
|
|
@@ -2865,8 +2876,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2865
2876
|
<kendo-grid-toolbar class="k-toolbar k-grid-toolbar" *ngIf="showTopToolbar" position="top"></kendo-grid-toolbar>
|
|
2866
2877
|
<kendo-pager
|
|
2867
2878
|
*ngIf="showTopPager"
|
|
2868
|
-
[tabindex]="
|
|
2869
|
-
[attr.role]="
|
|
2879
|
+
[tabindex]="navigation.pagerEnabled ? '0' : '-1'"
|
|
2880
|
+
[attr.role]="navigation.pagerEnabled ? 'application' : undefined"
|
|
2870
2881
|
class="k-grid-pager-top"
|
|
2871
2882
|
[template]="pagerTemplate"
|
|
2872
2883
|
[pageSize]="pageSize"
|
|
@@ -2920,7 +2931,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2920
2931
|
[columnMenuTemplate]="columnMenuTemplate"
|
|
2921
2932
|
[totalColumnsCount]="leafColumns.length"
|
|
2922
2933
|
[detailTemplate]="detailTemplate"
|
|
2923
|
-
[tabIndex]="
|
|
2934
|
+
[tabIndex]="navigation.tableEnabled ? '-1' : '0'">
|
|
2924
2935
|
</thead>
|
|
2925
2936
|
</table>
|
|
2926
2937
|
</div><div #header class="k-grid-header-wrap" role="presentation" data-scrollable
|
|
@@ -2951,7 +2962,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2951
2962
|
[lockedColumnsCount]="lockedLeafColumns.length"
|
|
2952
2963
|
[totalColumnsCount]="leafColumns.length"
|
|
2953
2964
|
[detailTemplate]="detailTemplate"
|
|
2954
|
-
[tabIndex]="
|
|
2965
|
+
[tabIndex]="navigation.tableEnabled ? '-1' : '0'">
|
|
2955
2966
|
</thead>
|
|
2956
2967
|
</table>
|
|
2957
2968
|
<div *ngIf="virtualColumns" class="k-width-container" role="presentation">
|
|
@@ -3056,7 +3067,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
3056
3067
|
[columnMenu]="columnMenuOptions"
|
|
3057
3068
|
[columnMenuTemplate]="columnMenuTemplate"
|
|
3058
3069
|
[detailTemplate]="detailTemplate"
|
|
3059
|
-
[tabIndex]="
|
|
3070
|
+
[tabIndex]="navigation.tableEnabled ? '-1' : '0'">
|
|
3060
3071
|
</thead>
|
|
3061
3072
|
<tbody kendoGridTableBody
|
|
3062
3073
|
[isLoading]="loading"
|
|
@@ -3090,8 +3101,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
3090
3101
|
</div>
|
|
3091
3102
|
<kendo-pager
|
|
3092
3103
|
*ngIf="showBottomPager"
|
|
3093
|
-
[tabindex]="
|
|
3094
|
-
[attr.role]="
|
|
3104
|
+
[tabindex]="navigation.pagerEnabled ? '0' : '-1'"
|
|
3105
|
+
[attr.role]="navigation.pagerEnabled ? 'application' : undefined"
|
|
3095
3106
|
[template]="pagerTemplate"
|
|
3096
3107
|
[pageSize]="pageSize"
|
|
3097
3108
|
[total]="view.total"
|
package/esm2015/main.js
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
export { GridModule } from './grid.module';
|
|
6
6
|
export { SharedModule } from './shared.module';
|
|
7
7
|
export { GridComponent } from './grid.component';
|
|
8
|
+
export { ColumnsContainer } from './columns/columns-container';
|
|
8
9
|
export { ColumnBase } from './columns/column-base';
|
|
9
10
|
export { ColumnComponent } from './columns/column.component';
|
|
10
11
|
export { CommandColumnComponent } from './columns/command-column.component';
|
|
@@ -104,10 +105,12 @@ export { ExcelComponent } from './excel/excel.component';
|
|
|
104
105
|
export { ExcelService } from './excel/excel.service';
|
|
105
106
|
export { ExcelExportEvent } from './excel/excel-export-event';
|
|
106
107
|
export { CellCloseEvent } from './editing/cell-close-event';
|
|
108
|
+
export { ColumnInfoService } from './common/column-info.service';
|
|
107
109
|
export { SuspendService } from './scrolling/suspend.service';
|
|
108
110
|
export { GroupBindingDirective, slice, count } from './grouping/group-scroll-binding.directive';
|
|
109
111
|
export { Skip } from './utils';
|
|
110
112
|
export { ColumnReorderEvent } from './dragdrop/column-reorder-event';
|
|
113
|
+
// KB Nav
|
|
111
114
|
export { FocusableDirective } from './navigation/focusable.directive';
|
|
112
115
|
export { ColumnVisibilityChangeEvent } from './column-menu/column-visibility-change-event';
|
|
113
116
|
export { ColumnMenuComponent } from './column-menu/column-menu.component';
|
|
@@ -47,13 +47,13 @@ export class LogicalCellDirective {
|
|
|
47
47
|
return this.logicalColIndex + 1;
|
|
48
48
|
}
|
|
49
49
|
ngOnInit() {
|
|
50
|
-
if (!this.navigationService.
|
|
50
|
+
if (!this.navigationService.tableEnabled) {
|
|
51
51
|
return;
|
|
52
52
|
}
|
|
53
53
|
this.navigationChange = this.navigationService.changes.subscribe((e) => this.onNavigationChange(e));
|
|
54
54
|
}
|
|
55
55
|
ngDoCheck() {
|
|
56
|
-
if (!this.navigationService.
|
|
56
|
+
if (!this.navigationService.tableEnabled || this.logicalColIndex === -1) {
|
|
57
57
|
return;
|
|
58
58
|
}
|
|
59
59
|
if (this.cellContext) {
|
|
@@ -62,7 +62,7 @@ export class LogicalCellDirective {
|
|
|
62
62
|
this.registerNoChanges();
|
|
63
63
|
}
|
|
64
64
|
ngOnChanges(changes) {
|
|
65
|
-
if (!this.navigationService.
|
|
65
|
+
if (!this.navigationService.tableEnabled) {
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
68
|
const keys = Object.keys(changes);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
export {};
|
|
@@ -94,6 +94,8 @@ export class NavigationService {
|
|
|
94
94
|
this.mode = 0 /* Standby */;
|
|
95
95
|
this.model = new NavigationModel();
|
|
96
96
|
this.cursor = new NavigationCursor(this.model);
|
|
97
|
+
this.pagerIsNavigable = false;
|
|
98
|
+
this.tableIsNavigable = false;
|
|
97
99
|
this.changes = this.cursor.changes;
|
|
98
100
|
}
|
|
99
101
|
set metadata(value) {
|
|
@@ -106,6 +108,12 @@ export class NavigationService {
|
|
|
106
108
|
get enabled() {
|
|
107
109
|
return this.alive;
|
|
108
110
|
}
|
|
111
|
+
get pagerEnabled() {
|
|
112
|
+
return this.alive && this.pagerIsNavigable;
|
|
113
|
+
}
|
|
114
|
+
get tableEnabled() {
|
|
115
|
+
return this.alive && this.tableIsNavigable;
|
|
116
|
+
}
|
|
109
117
|
get activeCell() {
|
|
110
118
|
if (this.mode !== 0 /* Standby */) {
|
|
111
119
|
return this.cursor.cell;
|
|
@@ -121,7 +129,8 @@ export class NavigationService {
|
|
|
121
129
|
get activeDataRow() {
|
|
122
130
|
return Math.max(0, this.activeRowIndex - this.meta.headerRows);
|
|
123
131
|
}
|
|
124
|
-
init(meta) {
|
|
132
|
+
init(meta, navigableOptions) {
|
|
133
|
+
this.setActiveSections(navigableOptions);
|
|
125
134
|
this.alive = true;
|
|
126
135
|
this.focusRoot.active = true;
|
|
127
136
|
this.metadata = meta;
|
|
@@ -297,6 +306,10 @@ export class NavigationService {
|
|
|
297
306
|
autoFocusCell(start, end) {
|
|
298
307
|
return !this.meta.virtualColumns || end < this.meta.columns.lockedLeafColumns.length || this.columnViewport.intersects(start, end);
|
|
299
308
|
}
|
|
309
|
+
setActiveSections(navigableOptions) {
|
|
310
|
+
this.pagerIsNavigable = navigableOptions.includes('pager');
|
|
311
|
+
this.tableIsNavigable = navigableOptions.includes('table');
|
|
312
|
+
}
|
|
300
313
|
focusAdjacentCell(fwd, wrap) {
|
|
301
314
|
this.focusCell();
|
|
302
315
|
let success = fwd ? this.moveCursorFwd() : this.moveCursorBwd();
|
|
@@ -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:
|
|
12
|
+
publishDate: 1654095302,
|
|
13
13
|
version: '',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
15
15
|
};
|
|
@@ -75,7 +75,7 @@ export class PagerComponent {
|
|
|
75
75
|
return this._isFocused;
|
|
76
76
|
}
|
|
77
77
|
get pagerAriaLabel() {
|
|
78
|
-
return this.navigationService.
|
|
78
|
+
return this.navigationService.pagerEnabled ? this.pagerLabel : undefined;
|
|
79
79
|
}
|
|
80
80
|
/**
|
|
81
81
|
* @hidden
|
|
@@ -88,7 +88,7 @@ export class PagerComponent {
|
|
|
88
88
|
return this.focusGroup.isActive ? '0' : '-1';
|
|
89
89
|
}
|
|
90
90
|
onFocusIn(event) {
|
|
91
|
-
if (this.navigationService.
|
|
91
|
+
if (this.navigationService.pagerEnabled) {
|
|
92
92
|
const shouldFocusPager = event.target === this.element.nativeElement;
|
|
93
93
|
if (shouldFocusPager) {
|
|
94
94
|
this._isFocused = true;
|
|
@@ -100,18 +100,18 @@ export class PagerComponent {
|
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
onFocusOut() {
|
|
103
|
-
if (this.navigationService.
|
|
103
|
+
if (this.navigationService.pagerEnabled) {
|
|
104
104
|
this._isFocused = false;
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
onEscape() {
|
|
108
|
-
if (this.navigationService.
|
|
108
|
+
if (this.navigationService.pagerEnabled) {
|
|
109
109
|
this.focusRoot.deactivate();
|
|
110
110
|
this.element.nativeElement.focus();
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
onEnter(event) {
|
|
114
|
-
if (this.navigationService.
|
|
114
|
+
if (this.navigationService.pagerEnabled && event.target === this.element.nativeElement) {
|
|
115
115
|
this.focusRoot.activate();
|
|
116
116
|
this.focusFirstElement();
|
|
117
117
|
}
|
|
@@ -153,7 +153,7 @@ export class PagerComponent {
|
|
|
153
153
|
}
|
|
154
154
|
ngOnInit() {
|
|
155
155
|
this.subscriptions.add(this.pagerContext.pageChange.subscribe(this.changePage.bind(this)));
|
|
156
|
-
if (this.navigationService.
|
|
156
|
+
if (this.navigationService.pagerEnabled) {
|
|
157
157
|
this.focusRoot.deactivate();
|
|
158
158
|
}
|
|
159
159
|
}
|
|
@@ -206,7 +206,7 @@ export class PagerComponent {
|
|
|
206
206
|
this.renderer.removeClass(element, 'k-pager-md');
|
|
207
207
|
}
|
|
208
208
|
shouldTriggerPageChange(target, condition) {
|
|
209
|
-
return this.navigationService.
|
|
209
|
+
return this.navigationService.pagerEnabled &&
|
|
210
210
|
target === this.element.nativeElement &&
|
|
211
211
|
condition;
|
|
212
212
|
}
|
|
@@ -242,7 +242,7 @@ PagerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version
|
|
|
242
242
|
useClass: FocusGroup
|
|
243
243
|
}], usesOnChanges: true, ngImport: i0, template: `
|
|
244
244
|
<div
|
|
245
|
-
*ngIf="navigationService.
|
|
245
|
+
*ngIf="navigationService.pagerEnabled"
|
|
246
246
|
class="k-sr-only"
|
|
247
247
|
[tabindex]="focusTrapTabIndex"
|
|
248
248
|
[attr.aria-hidden]="true"
|
|
@@ -269,7 +269,7 @@ PagerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version
|
|
|
269
269
|
></kendo-pager-page-sizes>
|
|
270
270
|
</ng-container>
|
|
271
271
|
<div
|
|
272
|
-
*ngIf="navigationService.
|
|
272
|
+
*ngIf="navigationService.pagerEnabled"
|
|
273
273
|
class="k-sr-only"
|
|
274
274
|
[tabindex]="focusTrapTabIndex"
|
|
275
275
|
[attr.aria-hidden]="true"
|
|
@@ -295,7 +295,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
295
295
|
}],
|
|
296
296
|
template: `
|
|
297
297
|
<div
|
|
298
|
-
*ngIf="navigationService.
|
|
298
|
+
*ngIf="navigationService.pagerEnabled"
|
|
299
299
|
class="k-sr-only"
|
|
300
300
|
[tabindex]="focusTrapTabIndex"
|
|
301
301
|
[attr.aria-hidden]="true"
|
|
@@ -322,7 +322,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
322
322
|
></kendo-pager-page-sizes>
|
|
323
323
|
</ng-container>
|
|
324
324
|
<div
|
|
325
|
-
*ngIf="navigationService.
|
|
325
|
+
*ngIf="navigationService.pagerEnabled"
|
|
326
326
|
class="k-sr-only"
|
|
327
327
|
[tabindex]="focusTrapTabIndex"
|
|
328
328
|
[attr.aria-hidden]="true"
|
|
@@ -615,21 +615,11 @@ HeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
|
|
|
615
615
|
[logicalSlaveCellsCount]="unlockedColumnsCount"
|
|
616
616
|
></tr>
|
|
617
617
|
</ng-container>
|
|
618
|
-
`, isInline: true,
|
|
618
|
+
`, isInline: true, components: [{ type: i9.FilterMenuComponent, selector: "kendo-grid-filter-menu", inputs: ["column", "filter", "tabIndex"] }, { type: i10.ColumnMenuComponent, selector: "kendo-grid-column-menu", inputs: ["standalone", "column", "settings", "sort", "filter", "sortable", "columnMenuTemplate", "tabIndex"] }, { type: i11.FilterRowComponent, selector: "[kendoGridFilterRow]", inputs: ["columns", "filter", "groups", "detailTemplate", "logicalRowIndex", "lockedColumnsCount"] }], directives: [{ type: i12.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i13.LogicalRowDirective, selector: "[kendoGridLogicalRow]", inputs: ["logicalRowIndex", "logicalSlaveRow", "logicalCellsCount", "logicalSlaveCellsCount", "dataRowIndex", "dataItem"] }, { type: i12.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i14.LogicalCellDirective, selector: "[kendoGridLogicalCell]", inputs: ["logicalColIndex", "logicalRowIndex", "logicalSlaveCell", "colIndex", "colSpan", "rowSpan", "groupItem", "dataRowIndex", "dataItem", "detailExpandCell", "headerLabelText"] }, { type: i15.DropTargetDirective, selector: "[kendoDropTarget]", inputs: ["context"], outputs: ["enter", "leave", "drop"] }, { type: i16.DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { type: i17.DraggableColumnDirective, selector: "[kendoDraggableColumn]", inputs: ["context", "enableDrag"], outputs: ["drag"] }, { type: i12.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i12.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i18.TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }, { type: i19.SelectAllCheckboxDirective, selector: "[kendoGridSelectAllCheckbox]", inputs: ["state"], outputs: ["selectAllChange"] }, { type: i20.FocusableDirective, selector: "[kendoGridFocusable],\n [kendoGridEditCommand],\n [kendoGridRemoveCommand],\n [kendoGridSaveCommand],\n [kendoGridCancelCommand],\n [kendoGridSelectionCheckbox]\n ", inputs: ["kendoGridFocusable"] }, { type: i21.ColumnHandleDirective, selector: "[kendoGridColumnHandle]", inputs: ["columns", "column"] }] });
|
|
619
619
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: HeaderComponent, decorators: [{
|
|
620
620
|
type: Component,
|
|
621
621
|
args: [{
|
|
622
622
|
selector: '[kendoGridHeader]',
|
|
623
|
-
styles: [`
|
|
624
|
-
.k-column-resizer {
|
|
625
|
-
cursor: col-resize;
|
|
626
|
-
display: block;
|
|
627
|
-
height: 1000%;
|
|
628
|
-
position: absolute;
|
|
629
|
-
top: 0;
|
|
630
|
-
width: .5em;
|
|
631
|
-
}
|
|
632
|
-
`],
|
|
633
623
|
template: `
|
|
634
624
|
<ng-container>
|
|
635
625
|
<tr *ngFor="let i of columnLevels; let levelIndex = index"
|
|
@@ -409,7 +409,7 @@ export class ListComponent {
|
|
|
409
409
|
}
|
|
410
410
|
}
|
|
411
411
|
resetNavigationViewport() {
|
|
412
|
-
if (!this.container || !this.navigationService.
|
|
412
|
+
if (!this.container || !this.navigationService.tableEnabled ||
|
|
413
413
|
!this.navigationService.needsViewport() || this.data.length === 0) {
|
|
414
414
|
return;
|
|
415
415
|
}
|