@progress/kendo-angular-grid 19.3.0-develop.9 → 19.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/columns/columns-container.d.ts +2 -0
- package/common/data-layout-mode.d.ts +21 -0
- package/common/grid-col-size.d.ts +13 -0
- package/common/provider.service.d.ts +2 -0
- package/common/toolbar-tool-base.directive.d.ts +2 -1
- package/data/data-mapping.service.d.ts +3 -1
- package/directives.d.ts +7 -4
- package/editing/toolbar-editing-tool-base.directive.d.ts +3 -2
- package/editing-directives/editing-directive-base.d.ts +3 -0
- package/editing-directives/in-cell-editing.directive.d.ts +1 -1
- package/editing-directives/reactive-editing.directive.d.ts +1 -1
- package/editing-directives/template-editing.directive.d.ts +1 -1
- package/esm2022/column-menu/column-chooser.component.mjs +1 -1
- package/esm2022/column-menu/column-list.component.mjs +8 -7
- package/esm2022/column-menu/column-menu-item.directive.mjs +1 -1
- package/esm2022/columns/column-base.mjs +4 -4
- package/esm2022/columns/column.component.mjs +1 -1
- package/esm2022/columns/columns-container.mjs +3 -0
- package/esm2022/common/column-info.service.mjs +1 -1
- package/esm2022/common/data-layout-mode.mjs +5 -0
- package/esm2022/common/grid-col-size.mjs +5 -0
- package/esm2022/common/provider.service.mjs +1 -0
- package/esm2022/common/toolbar-tool-base.directive.mjs +6 -2
- package/esm2022/data/data-mapping.service.mjs +14 -3
- package/esm2022/directives.mjs +8 -1
- package/esm2022/editing/toolbar-editing-tool-base.directive.mjs +5 -0
- package/esm2022/editing-directives/editing-directive-base.mjs +17 -2
- package/esm2022/editing-directives/in-cell-editing.directive.mjs +5 -3
- package/esm2022/editing-directives/reactive-editing.directive.mjs +1 -1
- package/esm2022/editing-directives/template-editing.directive.mjs +1 -1
- package/esm2022/filtering/cell/filter-cell-operators.component.mjs +2 -2
- package/esm2022/filtering/filter-row.component.mjs +5 -2
- package/esm2022/filtering/menu/filter-menu-dropdownlist.directive.mjs +1 -1
- package/esm2022/grid.component.mjs +191 -39
- package/esm2022/grid.module.mjs +103 -100
- package/esm2022/grouping/group-header.component.mjs +39 -4
- package/esm2022/grouping/group-panel.component.mjs +13 -8
- package/esm2022/highlight/highlight-item.mjs +5 -0
- package/esm2022/highlight/highlight.directive.mjs +132 -0
- package/esm2022/index.mjs +4 -0
- package/esm2022/localization/messages.mjs +57 -3
- package/esm2022/navigation/navigation-cursor.mjs +7 -1
- package/esm2022/navigation/navigation-metadata.mjs +3 -1
- package/esm2022/navigation/navigation.service.mjs +168 -16
- package/esm2022/navigation/toolbar-tool-name.mjs +2 -1
- package/esm2022/package-metadata.mjs +2 -2
- package/esm2022/pdf/export-element.mjs +14 -5
- package/esm2022/pdf/pdf.component.mjs +3 -1
- package/esm2022/rendering/cell.component.mjs +466 -188
- package/esm2022/rendering/common/col-group.component.mjs +21 -7
- package/esm2022/rendering/details-expand.directive.mjs +5 -2
- package/esm2022/rendering/footer/footer.component.mjs +117 -54
- package/esm2022/rendering/header/header.component.mjs +13 -9
- package/esm2022/rendering/list.component.mjs +19 -12
- package/esm2022/rendering/loading-template.directive.mjs +1 -0
- package/esm2022/rendering/table-body.component.mjs +394 -174
- package/esm2022/rendering/toolbar/tools/ai-assistant/ai-assistant.component.mjs +305 -0
- package/esm2022/rendering/toolbar/tools/ai-assistant/ai-tool.directive.mjs +273 -0
- package/esm2022/rendering/toolbar/tools/ai-assistant/utils.mjs +74 -0
- package/esm2022/rendering/toolbar/tools/column-chooser-tool.directive.mjs +5 -4
- package/esm2022/rendering/toolbar/tools/group-toolbar-tool.component.mjs +11 -9
- package/esm2022/rendering/toolbar/tools/select-all-command-tool.directive.mjs +93 -0
- package/esm2022/row-reordering/row-reorder.service.mjs +2 -2
- package/esm2022/row-reordering/utils.mjs +6 -4
- package/esm2022/selection/cell-selection.service.mjs +6 -3
- package/esm2022/selection/pair-set.mjs +87 -10
- package/esm2022/selection/selection-checkbox.directive.mjs +1 -1
- package/esm2022/selection/selection.directive.mjs +1 -1
- package/fesm2022/progress-kendo-angular-grid.mjs +2583 -639
- package/filtering/filter-row.component.d.ts +1 -0
- package/grid.component.d.ts +29 -1
- package/grid.module.d.ts +102 -99
- package/grouping/group-header.component.d.ts +1 -0
- package/grouping/group-panel.component.d.ts +1 -1
- package/highlight/highlight-item.d.ts +17 -0
- package/highlight/highlight.directive.d.ts +56 -0
- package/index.d.ts +8 -1
- package/localization/messages.d.ts +39 -3
- package/navigation/focus-group.d.ts +1 -1
- package/navigation/navigation-metadata.d.ts +2 -1
- package/navigation/navigation.service.d.ts +6 -0
- package/navigation/toolbar-tool-name.d.ts +1 -0
- package/package.json +22 -21
- package/rendering/cell.component.d.ts +30 -15
- package/rendering/common/col-group.component.d.ts +5 -0
- package/rendering/details-expand.directive.d.ts +5 -2
- package/rendering/footer/footer.component.d.ts +4 -1
- package/rendering/header/header.component.d.ts +1 -0
- package/rendering/list.component.d.ts +4 -1
- package/rendering/loading-template.directive.d.ts +1 -0
- package/rendering/table-body.component.d.ts +3 -1
- package/rendering/toolbar/tools/ai-assistant/ai-assistant.component.d.ts +49 -0
- package/rendering/toolbar/tools/ai-assistant/ai-tool.directive.d.ts +115 -0
- package/rendering/toolbar/tools/ai-assistant/utils.d.ts +131 -0
- package/rendering/toolbar/tools/column-chooser-tool.directive.d.ts +0 -1
- package/rendering/toolbar/tools/select-all-command-tool.directive.d.ts +36 -0
- package/row-reordering/row-reorder.service.d.ts +1 -1
- package/row-reordering/utils.d.ts +1 -1
- package/schematics/ngAdd/index.js +4 -4
- package/selection/cell-selection.service.d.ts +1 -0
- package/selection/pair-set.d.ts +36 -8
- package/selection/selection.directive.d.ts +1 -1
|
@@ -4,20 +4,34 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { Component, Input } from '@angular/core';
|
|
6
6
|
import { DetailTemplateDirective } from '../details/detail-template.directive';
|
|
7
|
+
import { ColumnBase } from "../../columns/column-base";
|
|
7
8
|
import { columnsToRender } from '../../columns/column-common';
|
|
8
9
|
import { isNullOrEmptyString, isTruthy } from '../../utils';
|
|
9
10
|
import { NgFor, NgIf } from '@angular/common';
|
|
11
|
+
import { ContextService } from '../../common/provider.service';
|
|
10
12
|
import * as i0 from "@angular/core";
|
|
13
|
+
import * as i1 from "../../common/provider.service";
|
|
11
14
|
/**
|
|
12
15
|
* @hidden
|
|
13
16
|
*/
|
|
14
17
|
export class ColGroupComponent {
|
|
18
|
+
ctx;
|
|
15
19
|
columns = [];
|
|
16
20
|
groups = [];
|
|
17
21
|
detailTemplate;
|
|
18
22
|
sort = new Array();
|
|
23
|
+
constructor(ctx) {
|
|
24
|
+
this.ctx = ctx;
|
|
25
|
+
}
|
|
26
|
+
getColumnWidth(column) {
|
|
27
|
+
const columnWidth = column.width ? `${column.width}px` : undefined;
|
|
28
|
+
return this.isStacked ? '100%' : columnWidth;
|
|
29
|
+
}
|
|
19
30
|
get columnsToRender() {
|
|
20
|
-
return columnsToRender(this.columns);
|
|
31
|
+
return this.isStacked ? [new ColumnBase()] : columnsToRender(this.columns);
|
|
32
|
+
}
|
|
33
|
+
get isStacked() {
|
|
34
|
+
return this.ctx.grid?.isStacked;
|
|
21
35
|
}
|
|
22
36
|
trackBy(index) {
|
|
23
37
|
return index;
|
|
@@ -35,13 +49,13 @@ export class ColGroupComponent {
|
|
|
35
49
|
sortDescriptor(field) {
|
|
36
50
|
return this.sort.find(item => item.field === field) || { field };
|
|
37
51
|
}
|
|
38
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
52
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColGroupComponent, deps: [{ token: i1.ContextService }], target: i0.ɵɵFactoryTarget.Component });
|
|
39
53
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ColGroupComponent, isStandalone: true, selector: "[kendoGridColGroup]", inputs: { columns: "columns", groups: "groups", detailTemplate: "detailTemplate", sort: "sort" }, ngImport: i0, template: `
|
|
40
54
|
<ng-container>
|
|
41
55
|
<col [class.k-group-col]="true" *ngFor="let g of groups" />
|
|
42
|
-
<col [class.k-hierarchy-col]="true" *ngIf="detailTemplate?.templateRef"/>
|
|
56
|
+
<col [class.k-hierarchy-col]="true" *ngIf="detailTemplate?.templateRef && !isStacked"/>
|
|
43
57
|
<col *ngFor="let column of columnsToRender; trackBy: trackBy;"
|
|
44
|
-
[style.width
|
|
58
|
+
[style.width]="getColumnWidth(column)"
|
|
45
59
|
[class.k-sorted]="isSorted(getColumnComponent(column))"/>
|
|
46
60
|
</ng-container>
|
|
47
61
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
@@ -53,16 +67,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
53
67
|
template: `
|
|
54
68
|
<ng-container>
|
|
55
69
|
<col [class.k-group-col]="true" *ngFor="let g of groups" />
|
|
56
|
-
<col [class.k-hierarchy-col]="true" *ngIf="detailTemplate?.templateRef"/>
|
|
70
|
+
<col [class.k-hierarchy-col]="true" *ngIf="detailTemplate?.templateRef && !isStacked"/>
|
|
57
71
|
<col *ngFor="let column of columnsToRender; trackBy: trackBy;"
|
|
58
|
-
[style.width
|
|
72
|
+
[style.width]="getColumnWidth(column)"
|
|
59
73
|
[class.k-sorted]="isSorted(getColumnComponent(column))"/>
|
|
60
74
|
</ng-container>
|
|
61
75
|
`,
|
|
62
76
|
standalone: true,
|
|
63
77
|
imports: [NgFor, NgIf]
|
|
64
78
|
}]
|
|
65
|
-
}], propDecorators: { columns: [{
|
|
79
|
+
}], ctorParameters: function () { return [{ type: i1.ContextService }]; }, propDecorators: { columns: [{
|
|
66
80
|
type: Input
|
|
67
81
|
}], groups: [{
|
|
68
82
|
type: Input
|
|
@@ -16,8 +16,11 @@ import * as i1 from "../grid.component";
|
|
|
16
16
|
* ([see example](slug:master_detail_expanded_state_grid#toc-built-in-directive))
|
|
17
17
|
*
|
|
18
18
|
* @example
|
|
19
|
-
* ```
|
|
20
|
-
* <kendo-grid
|
|
19
|
+
* ```html
|
|
20
|
+
* <kendo-grid
|
|
21
|
+
* [kendoGridExpandDetailsBy]="expandDetailsKey"
|
|
22
|
+
* [expandedDetailKeys]="expandedDetailKeys">
|
|
23
|
+
* </kendo-grid>
|
|
21
24
|
* ```
|
|
22
25
|
* @remarks
|
|
23
26
|
* Applied to: {@link GridComponent}.
|
|
@@ -13,13 +13,16 @@ import { LogicalCellDirective } from '../../navigation/logical-cell.directive';
|
|
|
13
13
|
import { NgFor, NgIf, NgClass, NgStyle } from '@angular/common';
|
|
14
14
|
import { LogicalRowDirective } from '../../navigation/logical-row.directive';
|
|
15
15
|
import { TemplateContextDirective } from '@progress/kendo-angular-common';
|
|
16
|
+
import { ContextService } from '../../common/provider.service';
|
|
16
17
|
import * as i0 from "@angular/core";
|
|
17
18
|
import * as i1 from "./../../common/column-info.service";
|
|
19
|
+
import * as i2 from "../../common/provider.service";
|
|
18
20
|
/**
|
|
19
21
|
* @hidden
|
|
20
22
|
*/
|
|
21
23
|
export class FooterComponent {
|
|
22
24
|
columnInfoService;
|
|
25
|
+
ctx;
|
|
23
26
|
columns = [];
|
|
24
27
|
groups = [];
|
|
25
28
|
detailTemplate;
|
|
@@ -33,15 +36,16 @@ export class FooterComponent {
|
|
|
33
36
|
}
|
|
34
37
|
hostClass = true;
|
|
35
38
|
hostRole = 'rowgroup';
|
|
36
|
-
constructor(columnInfoService) {
|
|
39
|
+
constructor(columnInfoService, ctx) {
|
|
37
40
|
this.columnInfoService = columnInfoService;
|
|
41
|
+
this.ctx = ctx;
|
|
38
42
|
}
|
|
39
43
|
get columnsToRender() {
|
|
40
44
|
return columnsToRender(this.columns || []);
|
|
41
45
|
}
|
|
42
46
|
// Number of unlocked columns in the next table, if any
|
|
43
47
|
get unlockedColumnsCount() {
|
|
44
|
-
return this.totalColumnsCount - this.lockedColumnsCount - this.columns.length;
|
|
48
|
+
return this.totalColumnsCount - (this.isStacked ? 0 : this.lockedColumnsCount) - this.columns.length;
|
|
45
49
|
}
|
|
46
50
|
trackByIndex(index) {
|
|
47
51
|
return index;
|
|
@@ -60,47 +64,78 @@ export class FooterComponent {
|
|
|
60
64
|
isColumnGroupComponent(column) {
|
|
61
65
|
return isColumnGroupComponent(column);
|
|
62
66
|
}
|
|
63
|
-
|
|
67
|
+
get isStacked() {
|
|
68
|
+
return this.ctx.grid?.isStacked;
|
|
69
|
+
}
|
|
70
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FooterComponent, deps: [{ token: i1.ColumnInfoService }, { token: i2.ContextService }], target: i0.ɵɵFactoryTarget.Component });
|
|
64
71
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FooterComponent, isStandalone: true, selector: "[kendoGridFooter]", inputs: { columns: "columns", groups: "groups", detailTemplate: "detailTemplate", scrollable: "scrollable", lockedColumnsCount: "lockedColumnsCount", logicalRowIndex: "logicalRowIndex", totalColumns: "totalColumns", totalColumnsCount: "totalColumnsCount" }, host: { properties: { "class.k-grid-footer": "this.footerClass", "class.k-table-tfoot": "this.hostClass", "attr.role": "this.hostRole" } }, ngImport: i0, template: `
|
|
65
72
|
<ng-container>
|
|
66
73
|
<tr
|
|
67
74
|
class="k-footer-template"
|
|
68
75
|
kendoGridLogicalRow
|
|
69
76
|
[logicalRowIndex]="logicalRowIndex"
|
|
70
|
-
[logicalSlaveRow]="lockedColumnsCount > 0"
|
|
77
|
+
[logicalSlaveRow]="lockedColumnsCount > 0 && !isStacked"
|
|
71
78
|
[logicalCellsCount]="columns.length"
|
|
72
79
|
[logicalSlaveCellsCount]="unlockedColumnsCount"
|
|
73
80
|
[totalColumns]="totalColumns"
|
|
74
81
|
>
|
|
75
|
-
<
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
82
|
+
<ng-container *ngIf="!isStacked">
|
|
83
|
+
<td
|
|
84
|
+
class="k-table-td k-group-cell k-table-group-td"
|
|
85
|
+
role="presentation"
|
|
86
|
+
*ngFor="let g of groups">
|
|
87
|
+
</td>
|
|
88
|
+
</ng-container>
|
|
80
89
|
<td
|
|
81
90
|
role="presentation"
|
|
82
91
|
class="k-table-td k-hierarchy-cell"
|
|
83
|
-
*ngIf="detailTemplate?.templateRef">
|
|
92
|
+
*ngIf="detailTemplate?.templateRef && !isStacked">
|
|
84
93
|
</td>
|
|
85
|
-
<ng-container *
|
|
86
|
-
<
|
|
87
|
-
|
|
94
|
+
<ng-container *ngIf="!isStacked">
|
|
95
|
+
<ng-container *ngFor="let column of columnsToRender; let columnIndex = index; trackBy: trackByIndex;">
|
|
96
|
+
<td *ngIf="!isColumnGroupComponent(column)"
|
|
97
|
+
kendoGridLogicalCell
|
|
98
|
+
class="k-table-td"
|
|
99
|
+
[logicalRowIndex]="logicalRowIndex"
|
|
100
|
+
[logicalColIndex]="logicalColumnIndex(column)"
|
|
101
|
+
role="gridcell"
|
|
102
|
+
aria-selected="false"
|
|
103
|
+
[class.k-grid-footer-sticky]="column.sticky"
|
|
104
|
+
[ngClass]="column.footerClass"
|
|
105
|
+
[ngStyle]="column.sticky ? addStickyStyles(column) : column.footerStyle">
|
|
106
|
+
<ng-template
|
|
107
|
+
[templateContext]="{
|
|
108
|
+
templateRef: column.footerTemplateRef,
|
|
109
|
+
columnIndex: column.leafIndex,
|
|
110
|
+
column: column,
|
|
111
|
+
$implicit: column
|
|
112
|
+
}">
|
|
113
|
+
</ng-template>
|
|
114
|
+
</td>
|
|
115
|
+
</ng-container>
|
|
116
|
+
</ng-container>
|
|
117
|
+
|
|
118
|
+
<ng-container *ngIf="isStacked">
|
|
119
|
+
<td kendoGridLogicalCell
|
|
88
120
|
class="k-table-td"
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
121
|
+
[logicalRowIndex]="logicalRowIndex"
|
|
122
|
+
[logicalColIndex]="detailTemplate ? 1 : 0"
|
|
123
|
+
role="gridcell"
|
|
124
|
+
aria-selected="false">
|
|
125
|
+
<div class="k-grid-column-template">
|
|
126
|
+
<ng-container *ngFor="let column of columnsToRender; trackBy: trackByIndex;">
|
|
127
|
+
<div class="k-column-template-item" *ngIf="column.footerTemplateRef">
|
|
128
|
+
<ng-template
|
|
129
|
+
[templateContext]="{
|
|
130
|
+
templateRef: column.footerTemplateRef,
|
|
131
|
+
columnIndex: column.leafIndex,
|
|
132
|
+
column: column,
|
|
133
|
+
$implicit: column
|
|
134
|
+
}">
|
|
135
|
+
</ng-template>
|
|
136
|
+
</div>
|
|
137
|
+
</ng-container>
|
|
138
|
+
</div>
|
|
104
139
|
</td>
|
|
105
140
|
</ng-container>
|
|
106
141
|
</tr>
|
|
@@ -117,40 +152,68 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
117
152
|
class="k-footer-template"
|
|
118
153
|
kendoGridLogicalRow
|
|
119
154
|
[logicalRowIndex]="logicalRowIndex"
|
|
120
|
-
[logicalSlaveRow]="lockedColumnsCount > 0"
|
|
155
|
+
[logicalSlaveRow]="lockedColumnsCount > 0 && !isStacked"
|
|
121
156
|
[logicalCellsCount]="columns.length"
|
|
122
157
|
[logicalSlaveCellsCount]="unlockedColumnsCount"
|
|
123
158
|
[totalColumns]="totalColumns"
|
|
124
159
|
>
|
|
125
|
-
<
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
160
|
+
<ng-container *ngIf="!isStacked">
|
|
161
|
+
<td
|
|
162
|
+
class="k-table-td k-group-cell k-table-group-td"
|
|
163
|
+
role="presentation"
|
|
164
|
+
*ngFor="let g of groups">
|
|
165
|
+
</td>
|
|
166
|
+
</ng-container>
|
|
130
167
|
<td
|
|
131
168
|
role="presentation"
|
|
132
169
|
class="k-table-td k-hierarchy-cell"
|
|
133
|
-
*ngIf="detailTemplate?.templateRef">
|
|
170
|
+
*ngIf="detailTemplate?.templateRef && !isStacked">
|
|
134
171
|
</td>
|
|
135
|
-
<ng-container *
|
|
136
|
-
<
|
|
137
|
-
|
|
172
|
+
<ng-container *ngIf="!isStacked">
|
|
173
|
+
<ng-container *ngFor="let column of columnsToRender; let columnIndex = index; trackBy: trackByIndex;">
|
|
174
|
+
<td *ngIf="!isColumnGroupComponent(column)"
|
|
175
|
+
kendoGridLogicalCell
|
|
176
|
+
class="k-table-td"
|
|
177
|
+
[logicalRowIndex]="logicalRowIndex"
|
|
178
|
+
[logicalColIndex]="logicalColumnIndex(column)"
|
|
179
|
+
role="gridcell"
|
|
180
|
+
aria-selected="false"
|
|
181
|
+
[class.k-grid-footer-sticky]="column.sticky"
|
|
182
|
+
[ngClass]="column.footerClass"
|
|
183
|
+
[ngStyle]="column.sticky ? addStickyStyles(column) : column.footerStyle">
|
|
184
|
+
<ng-template
|
|
185
|
+
[templateContext]="{
|
|
186
|
+
templateRef: column.footerTemplateRef,
|
|
187
|
+
columnIndex: column.leafIndex,
|
|
188
|
+
column: column,
|
|
189
|
+
$implicit: column
|
|
190
|
+
}">
|
|
191
|
+
</ng-template>
|
|
192
|
+
</td>
|
|
193
|
+
</ng-container>
|
|
194
|
+
</ng-container>
|
|
195
|
+
|
|
196
|
+
<ng-container *ngIf="isStacked">
|
|
197
|
+
<td kendoGridLogicalCell
|
|
138
198
|
class="k-table-td"
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
199
|
+
[logicalRowIndex]="logicalRowIndex"
|
|
200
|
+
[logicalColIndex]="detailTemplate ? 1 : 0"
|
|
201
|
+
role="gridcell"
|
|
202
|
+
aria-selected="false">
|
|
203
|
+
<div class="k-grid-column-template">
|
|
204
|
+
<ng-container *ngFor="let column of columnsToRender; trackBy: trackByIndex;">
|
|
205
|
+
<div class="k-column-template-item" *ngIf="column.footerTemplateRef">
|
|
206
|
+
<ng-template
|
|
207
|
+
[templateContext]="{
|
|
208
|
+
templateRef: column.footerTemplateRef,
|
|
209
|
+
columnIndex: column.leafIndex,
|
|
210
|
+
column: column,
|
|
211
|
+
$implicit: column
|
|
212
|
+
}">
|
|
213
|
+
</ng-template>
|
|
214
|
+
</div>
|
|
215
|
+
</ng-container>
|
|
216
|
+
</div>
|
|
154
217
|
</td>
|
|
155
218
|
</ng-container>
|
|
156
219
|
</tr>
|
|
@@ -159,7 +222,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
159
222
|
standalone: true,
|
|
160
223
|
imports: [LogicalRowDirective, NgFor, NgIf, LogicalCellDirective, NgClass, NgStyle, TemplateContextDirective]
|
|
161
224
|
}]
|
|
162
|
-
}], ctorParameters: function () { return [{ type: i1.ColumnInfoService }]; }, propDecorators: { columns: [{
|
|
225
|
+
}], ctorParameters: function () { return [{ type: i1.ColumnInfoService }, { type: i2.ContextService }]; }, propDecorators: { columns: [{
|
|
163
226
|
type: Input
|
|
164
227
|
}], groups: [{
|
|
165
228
|
type: Input
|
|
@@ -16,7 +16,7 @@ import { columnsToRender, sortColumns, isInSpanColumn } from "../../columns/colu
|
|
|
16
16
|
import { SinglePopupService } from '../../common/single-popup.service';
|
|
17
17
|
import { hasFilterMenu, hasFilterRow } from '../../filtering/filterable';
|
|
18
18
|
import { IdService } from '../../common/id.service';
|
|
19
|
-
import { DraggableDirective, isDocumentAvailable, Keys, TemplateContextDirective } from '@progress/kendo-angular-common';
|
|
19
|
+
import { DraggableDirective, isDocumentAvailable, Keys, normalizeNumpadKeys, TemplateContextDirective } from '@progress/kendo-angular-common';
|
|
20
20
|
import { DropTargetDirective } from '../../dragdrop/drop-target.directive';
|
|
21
21
|
import { DraggableColumnDirective } from '../../dragdrop/draggable-column.directive';
|
|
22
22
|
import { DragHintService } from '../../dragdrop/drag-hint.service';
|
|
@@ -168,14 +168,15 @@ export class HeaderComponent {
|
|
|
168
168
|
this.sortColumn(toggledColumn);
|
|
169
169
|
}
|
|
170
170
|
onHeaderKeydown(column, args) {
|
|
171
|
-
|
|
171
|
+
const code = normalizeNumpadKeys(args);
|
|
172
|
+
if (code === Keys.ArrowDown && args.altKey && this.showFilterMenu) {
|
|
172
173
|
args.preventDefault();
|
|
173
174
|
args.stopImmediatePropagation();
|
|
174
175
|
const filterMenu = this.filterMenus.find(fm => fm.column === column);
|
|
175
176
|
filterMenu.toggle(filterMenu.anchor.nativeElement, filterMenu.template);
|
|
176
177
|
return;
|
|
177
178
|
}
|
|
178
|
-
if (
|
|
179
|
+
if (code === Keys.ArrowDown && args.altKey && this.showColumnMenu(column)) {
|
|
179
180
|
args.preventDefault();
|
|
180
181
|
args.stopImmediatePropagation();
|
|
181
182
|
const columnMenu = this.columnMenus.find(cm => cm.column === column);
|
|
@@ -183,7 +184,7 @@ export class HeaderComponent {
|
|
|
183
184
|
return;
|
|
184
185
|
}
|
|
185
186
|
const isCtrlOrMeta = args.ctrlKey || args.metaKey;
|
|
186
|
-
const isGroupingKeyShortcut = (
|
|
187
|
+
const isGroupingKeyShortcut = (code === Keys.Enter || code === Keys.Space) && isCtrlOrMeta;
|
|
187
188
|
if (isGroupingKeyShortcut && this.isGroupable(column)) {
|
|
188
189
|
args.preventDefault();
|
|
189
190
|
args.stopImmediatePropagation();
|
|
@@ -199,12 +200,12 @@ export class HeaderComponent {
|
|
|
199
200
|
this.contextService.grid.groupChange.emit(this.groups);
|
|
200
201
|
return;
|
|
201
202
|
}
|
|
202
|
-
const isLeftOrRightArrow =
|
|
203
|
+
const isLeftOrRightArrow = code === Keys.ArrowLeft || code === Keys.ArrowRight;
|
|
203
204
|
const isReorderingKeyShortcut = isLeftOrRightArrow && isCtrlOrMeta;
|
|
204
205
|
if (isReorderingKeyShortcut && this.isReorderable(column)) {
|
|
205
206
|
args.preventDefault();
|
|
206
207
|
const columnsCount = this.columnInfoService.leafNamedColumns.length;
|
|
207
|
-
const reorderDirection =
|
|
208
|
+
const reorderDirection = code === Keys.ArrowLeft ? -1 : 1;
|
|
208
209
|
const rtlMultiplier = this.contextService.localization.rtl ? -1 : 1;
|
|
209
210
|
const reorderDirectionOffset = reorderDirection * rtlMultiplier;
|
|
210
211
|
const newIndex = column.leafIndex + reorderDirectionOffset;
|
|
@@ -221,7 +222,7 @@ export class HeaderComponent {
|
|
|
221
222
|
if (!this.sortable || args.defaultPrevented || column.sortable === false) {
|
|
222
223
|
return;
|
|
223
224
|
}
|
|
224
|
-
if (
|
|
225
|
+
if (code === Keys.Enter && isPresent(column.field)) {
|
|
225
226
|
const modifier = this.matchModifier(args);
|
|
226
227
|
this.sortService.sort(this.toggleSort(column, modifier));
|
|
227
228
|
}
|
|
@@ -400,6 +401,9 @@ export class HeaderComponent {
|
|
|
400
401
|
get leafColumns() {
|
|
401
402
|
return this._leafColumns;
|
|
402
403
|
}
|
|
404
|
+
get isStacked() {
|
|
405
|
+
return this.contextService.grid?.isStacked;
|
|
406
|
+
}
|
|
403
407
|
isReorderable(column) {
|
|
404
408
|
return this.reorderable && column.reorderable;
|
|
405
409
|
}
|
|
@@ -502,7 +506,7 @@ export class HeaderComponent {
|
|
|
502
506
|
</th>
|
|
503
507
|
<th class="k-hierarchy-cell k-header k-table-th"
|
|
504
508
|
role="presentation"
|
|
505
|
-
*ngIf="detailTemplate?.templateRef"
|
|
509
|
+
*ngIf="detailTemplate?.templateRef && !isStacked"
|
|
506
510
|
>
|
|
507
511
|
</th>
|
|
508
512
|
<ng-container *ngFor="let column of columnsForLevel(levelIndex); let columnIndex = index; let last = last;">
|
|
@@ -726,7 +730,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
726
730
|
</th>
|
|
727
731
|
<th class="k-hierarchy-cell k-header k-table-th"
|
|
728
732
|
role="presentation"
|
|
729
|
-
*ngIf="detailTemplate?.templateRef"
|
|
733
|
+
*ngIf="detailTemplate?.templateRef && !isStacked"
|
|
730
734
|
>
|
|
731
735
|
</th>
|
|
732
736
|
<ng-container *ngFor="let column of columnsForLevel(levelIndex); let columnIndex = index; let last = last;">
|
|
@@ -21,7 +21,7 @@ import { GroupsService } from "../grouping/groups.service";
|
|
|
21
21
|
import { expandColumns, sumColumnWidths } from "../columns/column-common";
|
|
22
22
|
import { ScrollSyncService } from "../scrolling/scroll-sync.service";
|
|
23
23
|
import { ResizeService } from "../layout/resize.service";
|
|
24
|
-
import { EventsOutsideAngularDirective, isDocumentAvailable, ResizeSensorComponent } from "@progress/kendo-angular-common";
|
|
24
|
+
import { EventsOutsideAngularDirective, isDocumentAvailable, normalizeNumpadKeys, ResizeSensorComponent } from "@progress/kendo-angular-common";
|
|
25
25
|
import { BrowserSupportService } from "../layout/browser-support.service";
|
|
26
26
|
import { EditService } from '../editing/edit.service';
|
|
27
27
|
import { NavigationService } from '../navigation/navigation.service';
|
|
@@ -178,7 +178,6 @@ export class ListComponent {
|
|
|
178
178
|
columnsEndIdx;
|
|
179
179
|
viewportColumnsWidth;
|
|
180
180
|
scrollLeft = 0;
|
|
181
|
-
recalculateRowspan = true;
|
|
182
181
|
observer;
|
|
183
182
|
get lockedLeafColumns() {
|
|
184
183
|
return this.columns.lockedLeafColumns;
|
|
@@ -187,7 +186,7 @@ export class ListComponent {
|
|
|
187
186
|
return this.columns.nonLockedLeafColumns;
|
|
188
187
|
}
|
|
189
188
|
get nonLockedColumnsToRender() {
|
|
190
|
-
if (this.virtualColumns && !this.pdfService.exporting) {
|
|
189
|
+
if (this.virtualColumns && !this.pdfService.exporting && !this.isStacked) {
|
|
191
190
|
return this.viewportColumns;
|
|
192
191
|
}
|
|
193
192
|
return this.nonLockedLeafColumns;
|
|
@@ -200,13 +199,13 @@ export class ListComponent {
|
|
|
200
199
|
return expandColumns(this.lockedLeafColumns.toArray()).reduce((prev, curr) => prev + (curr.width || 0), groupCellsWidth);
|
|
201
200
|
}
|
|
202
201
|
get nonLockedWidth() {
|
|
203
|
-
if ((!this.rtl && this.lockedLeafColumns.length) || this.virtualColumns) {
|
|
202
|
+
if (((!this.rtl && this.lockedLeafColumns.length) || this.virtualColumns) && !this.isStacked) {
|
|
204
203
|
return sumColumnWidths(expandColumns(this.nonLockedColumnsToRender.toArray()));
|
|
205
204
|
}
|
|
206
205
|
return undefined;
|
|
207
206
|
}
|
|
208
207
|
get isLocked() {
|
|
209
|
-
return this.lockedLeafColumns.length > 0;
|
|
208
|
+
return this.lockedLeafColumns.length > 0 && !this.isStacked;
|
|
210
209
|
}
|
|
211
210
|
rtl = false;
|
|
212
211
|
columnUpdateFrame;
|
|
@@ -270,7 +269,7 @@ export class ListComponent {
|
|
|
270
269
|
if (this.virtualColumns && (!this.viewportColumns || this.viewportWidthChange())) {
|
|
271
270
|
this.updateViewportColumns();
|
|
272
271
|
}
|
|
273
|
-
const shouldCalculatePageSize = isDocumentAvailable() && this.isVirtual && this.ctx.grid && !this.ctx.grid.pageSize;
|
|
272
|
+
const shouldCalculatePageSize = isDocumentAvailable() && this.isVirtual && this.ctx.grid && !isPresent(this.ctx.grid.pageSize);
|
|
274
273
|
if (shouldCalculatePageSize) {
|
|
275
274
|
const calculatedPageSize = this.calcVirtualPageSize();
|
|
276
275
|
if (calculatedPageSize > 0) {
|
|
@@ -346,8 +345,10 @@ export class ListComponent {
|
|
|
346
345
|
}
|
|
347
346
|
}
|
|
348
347
|
lockedKeydown(args) {
|
|
349
|
-
|
|
350
|
-
|
|
348
|
+
// on some keyboards arrow keys, PageUp/Down, and Home/End are mapped to Numpad keys
|
|
349
|
+
const code = normalizeNumpadKeys(args);
|
|
350
|
+
if (code === Keys.PageDown || code === Keys.PageUp) {
|
|
351
|
+
const dir = code === Keys.PageDown ? 1 : -1;
|
|
351
352
|
const element = this.container.nativeElement;
|
|
352
353
|
element.scrollTop += element.offsetHeight * dir * 0.8;
|
|
353
354
|
args.preventDefault();
|
|
@@ -383,6 +384,12 @@ export class ListComponent {
|
|
|
383
384
|
this.updateColumnViewport(startIdx, endIdx);
|
|
384
385
|
}
|
|
385
386
|
}
|
|
387
|
+
/**
|
|
388
|
+
* @hidden
|
|
389
|
+
*/
|
|
390
|
+
get isStacked() {
|
|
391
|
+
return this.ctx.grid?.isStacked;
|
|
392
|
+
}
|
|
386
393
|
detailExpand({ index, expand }) {
|
|
387
394
|
if (expand) {
|
|
388
395
|
this.rowHeightService.expandDetail(index);
|
|
@@ -694,7 +701,7 @@ export class ListComponent {
|
|
|
694
701
|
}
|
|
695
702
|
], viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, static: true }, { propertyName: "lockedContainer", first: true, predicate: ["lockedContainer"], descendants: true }, { propertyName: "lockedTable", first: true, predicate: ["lockedTable"], descendants: true }, { propertyName: "table", first: true, predicate: ["table"], descendants: true, static: true }, { propertyName: "resizeSensors", predicate: ResizeSensorComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
696
703
|
<div #lockedContainer class="k-grid-content-locked" role="presentation"
|
|
697
|
-
*ngIf="isLocked" [style.width.px]="lockedWidth" tabindex="-1"
|
|
704
|
+
*ngIf="isLocked && !isStacked" [style.width.px]="lockedWidth" tabindex="-1"
|
|
698
705
|
[kendoEventsOutsideAngular]="{
|
|
699
706
|
keydown: lockedKeydown,
|
|
700
707
|
scroll: lockedScroll,
|
|
@@ -797,7 +804,7 @@ export class ListComponent {
|
|
|
797
804
|
<div *ngIf="isVirtual" class="k-height-container" role="presentation">
|
|
798
805
|
<div [style.height.px]="totalHeight"></div>
|
|
799
806
|
</div>
|
|
800
|
-
<div *ngIf="virtualColumns" class="k-width-container" role="presentation">
|
|
807
|
+
<div *ngIf="virtualColumns && !isStacked" class="k-width-container" role="presentation">
|
|
801
808
|
<div [style.width.px]="totalWidth"></div>
|
|
802
809
|
</div>
|
|
803
810
|
</div>
|
|
@@ -815,7 +822,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
815
822
|
selector: 'kendo-grid-list',
|
|
816
823
|
template: `
|
|
817
824
|
<div #lockedContainer class="k-grid-content-locked" role="presentation"
|
|
818
|
-
*ngIf="isLocked" [style.width.px]="lockedWidth" tabindex="-1"
|
|
825
|
+
*ngIf="isLocked && !isStacked" [style.width.px]="lockedWidth" tabindex="-1"
|
|
819
826
|
[kendoEventsOutsideAngular]="{
|
|
820
827
|
keydown: lockedKeydown,
|
|
821
828
|
scroll: lockedScroll,
|
|
@@ -918,7 +925,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
918
925
|
<div *ngIf="isVirtual" class="k-height-container" role="presentation">
|
|
919
926
|
<div [style.height.px]="totalHeight"></div>
|
|
920
927
|
</div>
|
|
921
|
-
<div *ngIf="virtualColumns" class="k-width-container" role="presentation">
|
|
928
|
+
<div *ngIf="virtualColumns && !isStacked" class="k-width-container" role="presentation">
|
|
922
929
|
<div [style.width.px]="totalWidth"></div>
|
|
923
930
|
</div>
|
|
924
931
|
</div>
|