@progress/kendo-angular-pivotgrid 21.4.1-develop.1 → 22.0.0-develop.1
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/configurator/chip-menu/chip-menu-item-base.d.ts +1 -1
- package/data-binding/base-binding-directive.d.ts +1 -1
- package/fesm2022/progress-kendo-angular-pivotgrid.mjs +120 -120
- package/localization/messages.d.ts +1 -1
- package/package.json +18 -26
- package/schematics/ngAdd/index.js +2 -2
- package/esm2022/configurator/chip-kb-nav.directive.mjs +0 -69
- package/esm2022/configurator/chip-menu/chip-menu-container.component.mjs +0 -51
- package/esm2022/configurator/chip-menu/chip-menu-filter.component.mjs +0 -135
- package/esm2022/configurator/chip-menu/chip-menu-item-base.mjs +0 -40
- package/esm2022/configurator/chip-menu/chip-menu-item-content-template.directive.mjs +0 -29
- package/esm2022/configurator/chip-menu/chip-menu-item.component.mjs +0 -206
- package/esm2022/configurator/chip-menu/chip-menu-item.directive.mjs +0 -98
- package/esm2022/configurator/chip-menu/chip-menu-reorder.component.mjs +0 -198
- package/esm2022/configurator/chip-menu/chip-menu-sort.component.mjs +0 -104
- package/esm2022/configurator/chip-menu/chip-menu.component.mjs +0 -165
- package/esm2022/configurator/chip-menu/chip-menu.service.mjs +0 -40
- package/esm2022/configurator/chip-menu/filtering/filter-menu-container.component.mjs +0 -186
- package/esm2022/configurator/chip-menu/filtering/filter-menu-dropdownlist.directive.mjs +0 -44
- package/esm2022/configurator/chip-menu/filtering/menu-tabbing.service.mjs +0 -20
- package/esm2022/configurator/chip-menu/filtering/string-filter-menu.component.mjs +0 -148
- package/esm2022/configurator/chip-menu/single-popup.service.mjs +0 -136
- package/esm2022/configurator/configurator.component.mjs +0 -806
- package/esm2022/configurator/configurator.service.mjs +0 -53
- package/esm2022/configurator/draggable.directive.mjs +0 -131
- package/esm2022/configurator/drop-cue.service.mjs +0 -86
- package/esm2022/configurator/drop-target.directive.mjs +0 -190
- package/esm2022/data-binding/base-binding-directive.mjs +0 -164
- package/esm2022/data-binding/local-binding.directive.mjs +0 -107
- package/esm2022/data-binding/olap-binding.directive.mjs +0 -204
- package/esm2022/data-binding/pivotgrid-data.service.mjs +0 -76
- package/esm2022/directives.mjs +0 -97
- package/esm2022/index.mjs +0 -28
- package/esm2022/localization/custom-messages.component.mjs +0 -57
- package/esm2022/localization/localized-messages.directive.mjs +0 -39
- package/esm2022/localization/messages.mjs +0 -254
- package/esm2022/localization/pivot-localization.service.mjs +0 -30
- package/esm2022/models/configuration-change-event.mjs +0 -37
- package/esm2022/models/configurator-chipmenu-reorder-target.mjs +0 -5
- package/esm2022/models/configurator-orientation.mjs +0 -5
- package/esm2022/models/configurator-position.mjs +0 -5
- package/esm2022/models/configurator-settings.mjs +0 -21
- package/esm2022/models/data-row-item.mjs +0 -5
- package/esm2022/models/drop-section.mjs +0 -5
- package/esm2022/models/drop-target.mjs +0 -5
- package/esm2022/models/expanded-change-event.mjs +0 -29
- package/esm2022/models/expanded-state-action.mjs +0 -5
- package/esm2022/models/loader-settings.mjs +0 -5
- package/esm2022/models/virtualization-settings.mjs +0 -25
- package/esm2022/package-metadata.mjs +0 -16
- package/esm2022/pivotgrid.component.mjs +0 -729
- package/esm2022/pivotgrid.module.mjs +0 -87
- package/esm2022/progress-kendo-angular-pivotgrid.mjs +0 -8
- package/esm2022/rendering/pivotgrid-cell.directive.mjs +0 -247
- package/esm2022/rendering/pivotgrid-table.component.mjs +0 -386
- package/esm2022/rendering/templates/pivotgrid-cell-template.directive.mjs +0 -44
- package/esm2022/rendering/templates/pivotgrid-column-header-cell-template.directive.mjs +0 -44
- package/esm2022/rendering/templates/pivotgrid-row-header-cell-template.directive.mjs +0 -44
- package/esm2022/rendering/templates/pivotgrid-value-cell-template.directive.mjs +0 -43
- package/esm2022/util.mjs +0 -223
- package/esm2022/virtual/scroll.service.mjs +0 -18
- package/esm2022/virtual/scrollable-container.mjs +0 -128
|
@@ -1,386 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Component, ElementRef, Input, NgZone } from '@angular/core';
|
|
6
|
-
import { Subscription } from 'rxjs';
|
|
7
|
-
import { PivotGridDataService } from '../data-binding/pivotgrid-data.service';
|
|
8
|
-
import { CellTemplateDirective } from './templates/pivotgrid-cell-template.directive';
|
|
9
|
-
import { ValueCellTemplateDirective } from './templates/pivotgrid-value-cell-template.directive';
|
|
10
|
-
import { ColumnHeaderCellTemplateDirective } from './templates/pivotgrid-column-header-cell-template.directive';
|
|
11
|
-
import { RowHeaderCellTemplateDirective } from './templates/pivotgrid-row-header-cell-template.directive';
|
|
12
|
-
import { ScrollableTable } from '../virtual/scrollable-container';
|
|
13
|
-
import { PivotGridCellDirective } from './pivotgrid-cell.directive';
|
|
14
|
-
import { NgStyle } from '@angular/common';
|
|
15
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
16
|
-
import { Keys, isDocumentAvailable, normalizeKeys } from '@progress/kendo-angular-common';
|
|
17
|
-
import { isVisible, matchAriaAttributes } from '../util';
|
|
18
|
-
import { PivotGridScrollService } from '../virtual/scroll.service';
|
|
19
|
-
import * as i0 from "@angular/core";
|
|
20
|
-
import * as i1 from "../data-binding/pivotgrid-data.service";
|
|
21
|
-
import * as i2 from "@progress/kendo-angular-l10n";
|
|
22
|
-
import * as i3 from "../virtual/scroll.service";
|
|
23
|
-
/**
|
|
24
|
-
* @hidden
|
|
25
|
-
*/
|
|
26
|
-
export class PivotGridTableComponent {
|
|
27
|
-
host;
|
|
28
|
-
dataService;
|
|
29
|
-
localization;
|
|
30
|
-
zone;
|
|
31
|
-
scrollService;
|
|
32
|
-
headerItems;
|
|
33
|
-
rows;
|
|
34
|
-
renderedRows;
|
|
35
|
-
renderedCols;
|
|
36
|
-
totalRows;
|
|
37
|
-
startRowIndex = 0;
|
|
38
|
-
startColIndex = 0;
|
|
39
|
-
rtl = false;
|
|
40
|
-
itemIdCounter = 0;
|
|
41
|
-
itemIdMap = new WeakMap();
|
|
42
|
-
rowIdMap = new WeakMap();
|
|
43
|
-
cellIdMap = new WeakMap();
|
|
44
|
-
tableType;
|
|
45
|
-
colWidth;
|
|
46
|
-
customCellTemplate;
|
|
47
|
-
valueCellTemplate;
|
|
48
|
-
rowHeaderCellTemplate;
|
|
49
|
-
columnHeaderCellTemplate;
|
|
50
|
-
scrollableSettings;
|
|
51
|
-
get pivotGridId() {
|
|
52
|
-
return `kendo-pivotgrid-${this.dataService.pivotGridId}-`;
|
|
53
|
-
}
|
|
54
|
-
get columnVirtualization() {
|
|
55
|
-
return this.scrollableSettings?.type && this.scrollableSettings?.type !== 'row';
|
|
56
|
-
}
|
|
57
|
-
get rowVirtualization() {
|
|
58
|
-
return this.scrollableSettings?.type && this.scrollableSettings?.type !== 'column';
|
|
59
|
-
}
|
|
60
|
-
subs = new Subscription();
|
|
61
|
-
scrollable;
|
|
62
|
-
constructor(host, dataService, localization, zone, scrollService) {
|
|
63
|
-
this.host = host;
|
|
64
|
-
this.dataService = dataService;
|
|
65
|
-
this.localization = localization;
|
|
66
|
-
this.zone = zone;
|
|
67
|
-
this.scrollService = scrollService;
|
|
68
|
-
this.subs.add(this.localization.changes.subscribe(({ rtl }) => {
|
|
69
|
-
this.rtl = rtl;
|
|
70
|
-
this.scrollable && (this.scrollable.rtl = rtl);
|
|
71
|
-
}));
|
|
72
|
-
}
|
|
73
|
-
ngOnInit() {
|
|
74
|
-
this.subs.add(this.dataService[`${this.tableType}Rows`].subscribe(rows => {
|
|
75
|
-
this.rows = rows;
|
|
76
|
-
this.renderedRows = this.scrollableSettings ? rows.slice(this.startRowIndex, this.startRowIndex + this.scrollableSettings.rows) : rows;
|
|
77
|
-
this.totalRows && this.totalRows !== rows.length && this.scrollable && (this.scrollable.total = rows.length);
|
|
78
|
-
this.scrollable && this.scrollable.onNewData(this.totalRows && this.totalRows !== rows.length);
|
|
79
|
-
this.totalRows = rows.length;
|
|
80
|
-
}));
|
|
81
|
-
this.subs.add(this.tableType === 'values' ?
|
|
82
|
-
this.dataService.columnHeaderCols.subscribe(this.colsUpdateCallback) :
|
|
83
|
-
this.dataService[`${this.tableType}Cols`].subscribe(this.colsUpdateCallback));
|
|
84
|
-
}
|
|
85
|
-
ngAfterViewInit() {
|
|
86
|
-
if (isDocumentAvailable() && this.scrollService.virtualScrolling) {
|
|
87
|
-
this.initScrollableKeyboardNavigation();
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
ngOnDestroy() {
|
|
91
|
-
this.subs.unsubscribe();
|
|
92
|
-
this.scrollable?.destroy();
|
|
93
|
-
}
|
|
94
|
-
trackByColIndex(index, item) {
|
|
95
|
-
// Always include index to ensure uniqueness even if same object appears multiple times
|
|
96
|
-
if (!item || typeof item !== 'object') {
|
|
97
|
-
return `col-${index + this.startColIndex}-${item}`;
|
|
98
|
-
}
|
|
99
|
-
// Get or assign stable ID for this object
|
|
100
|
-
if (!this.itemIdMap.has(item)) {
|
|
101
|
-
this.itemIdMap.set(item, ++this.itemIdCounter);
|
|
102
|
-
}
|
|
103
|
-
const objectId = this.itemIdMap.get(item);
|
|
104
|
-
// Combine object ID with position to handle same object at different indices
|
|
105
|
-
return `col-${index + this.startColIndex}-obj${objectId}`;
|
|
106
|
-
}
|
|
107
|
-
trackByRowIndex(index, row) {
|
|
108
|
-
// Always include index to ensure uniqueness even if same object appears multiple times
|
|
109
|
-
if (!row || typeof row !== 'object') {
|
|
110
|
-
return `row-${index + this.startRowIndex}-${row}`;
|
|
111
|
-
}
|
|
112
|
-
// Get or assign stable ID for this object
|
|
113
|
-
if (!this.rowIdMap.has(row)) {
|
|
114
|
-
this.rowIdMap.set(row, ++this.itemIdCounter);
|
|
115
|
-
}
|
|
116
|
-
const objectId = this.rowIdMap.get(row);
|
|
117
|
-
// Combine object ID with position to handle same object at different indices
|
|
118
|
-
return `row-${index + this.startRowIndex}-obj${objectId}`;
|
|
119
|
-
}
|
|
120
|
-
trackByCellIndex(index, cell) {
|
|
121
|
-
// Always include index to ensure uniqueness even if same object appears multiple times
|
|
122
|
-
if (!cell || typeof cell !== 'object') {
|
|
123
|
-
return `cell-${index + this.startColIndex}-${cell}`;
|
|
124
|
-
}
|
|
125
|
-
// Get or assign stable ID for this object
|
|
126
|
-
if (!this.cellIdMap.has(cell)) {
|
|
127
|
-
this.cellIdMap.set(cell, ++this.itemIdCounter);
|
|
128
|
-
}
|
|
129
|
-
const objectId = this.cellIdMap.get(cell);
|
|
130
|
-
// Combine object ID with position to handle same object at different indices
|
|
131
|
-
return `cell-${index + this.startColIndex}-obj${objectId}`;
|
|
132
|
-
}
|
|
133
|
-
colsUpdateCallback = (cols) => {
|
|
134
|
-
this.renderedCols = Math.min(cols.length, this.scrollableSettings?.columns);
|
|
135
|
-
this.renderedCols && this.scrollable && (this.scrollable.totalCols = cols.length);
|
|
136
|
-
(this.scrollableSettings && this.scrollableSettings.type !== 'row') && this.scrollable?.onNewData(true);
|
|
137
|
-
this.headerItems = cols;
|
|
138
|
-
isDocumentAvailable() && !this.scrollable && this.tableType === 'values' && (this.columnVirtualization || this.rowVirtualization) && this.initScrollable();
|
|
139
|
-
};
|
|
140
|
-
initScrollable = () => {
|
|
141
|
-
this.scrollable = new ScrollableTable(this.host.nativeElement, {
|
|
142
|
-
onScroll: () => {
|
|
143
|
-
this.startRowIndex = this.scrollable.startRow;
|
|
144
|
-
this.startColIndex = this.scrollable.startCol;
|
|
145
|
-
this.renderedRows = this.rows.slice(this.startRowIndex, this.startRowIndex + this.scrollableSettings.rows);
|
|
146
|
-
this.scrollable.renderedRows = this.renderedRows.length;
|
|
147
|
-
this.scrollable.renderedCols = this.renderedCols;
|
|
148
|
-
},
|
|
149
|
-
onScrollEnd: () => {
|
|
150
|
-
matchAriaAttributes(this.host.nativeElement.closest('.k-pivotgrid'));
|
|
151
|
-
}
|
|
152
|
-
}, {
|
|
153
|
-
itemHeight: this.scrollableSettings.rowHeight,
|
|
154
|
-
itemWidth: this.colWidth || 200,
|
|
155
|
-
total: this.totalRows,
|
|
156
|
-
totalCols: this.headerItems.length,
|
|
157
|
-
renderedRows: this.scrollableSettings.rows,
|
|
158
|
-
renderedCols: this.scrollableSettings.columns,
|
|
159
|
-
columnVirtualization: this.columnVirtualization,
|
|
160
|
-
rowVirtualization: this.rowVirtualization,
|
|
161
|
-
rtl: this.rtl
|
|
162
|
-
});
|
|
163
|
-
};
|
|
164
|
-
initScrollableKeyboardNavigation() {
|
|
165
|
-
const pivotGrid = this.scrollService.pivotGrid;
|
|
166
|
-
this.host.nativeElement.addEventListener('keydown', (e) => {
|
|
167
|
-
const code = normalizeKeys(e);
|
|
168
|
-
if (this.tableType === 'values' && e.targe.tagName === 'TD') {
|
|
169
|
-
e.stopImmediatePropagation();
|
|
170
|
-
e.preventDefault();
|
|
171
|
-
if (code === Keys.ArrowLeft) {
|
|
172
|
-
const id = e.target.getAttribute('id');
|
|
173
|
-
if (id.split('-')[5] === '1') {
|
|
174
|
-
const target = document.querySelector(`tr[aria-owns*="${id}"]`);
|
|
175
|
-
pivotGrid.navigation.focusElement(target.lastElementChild, e.target);
|
|
176
|
-
}
|
|
177
|
-
else {
|
|
178
|
-
pivotGrid.navigation.focusElement(e.target.previousElementSibling, e.target);
|
|
179
|
-
if (!isVisible(e.target.previousElementSibling, this.host.nativeElement, this.scrollable.offsetFirst, this.rtl).visibleX) {
|
|
180
|
-
e.target.previousElementSibling.scrollIntoView({ behavior: 'auto', block: 'nearest', inline: 'start' });
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
else if (code === Keys.ArrowRight) {
|
|
185
|
-
const id = e.target.getAttribute('id');
|
|
186
|
-
if (id.split('-')[5] !== this.headerItems.length.toString()) {
|
|
187
|
-
pivotGrid.navigation.focusElement(e.target.nextElementSibling, e.target);
|
|
188
|
-
if (!isVisible(e.target.nextElementSibling, this.host.nativeElement, this.scrollable.offsetFirst, this.rtl).visibleX) {
|
|
189
|
-
e.target.nextElementSibling.scrollIntoView({ behavior: 'auto', block: 'nearest', inline: 'start' });
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
else if (code === Keys.ArrowUp) {
|
|
194
|
-
const id = e.target.getAttribute('id');
|
|
195
|
-
if (id.split('-')[4] === '1') {
|
|
196
|
-
const target = document.getElementById(e.target.getAttribute('aria-describedby').split(' ').pop());
|
|
197
|
-
pivotGrid.navigation.focusElement(target, e.target);
|
|
198
|
-
}
|
|
199
|
-
else {
|
|
200
|
-
const index = Array.from(e.target.parentElement.children).findIndex(el => el === e.target);
|
|
201
|
-
const elementToFocus = e.target.parentElement.previousElementSibling.children[index];
|
|
202
|
-
pivotGrid.navigation.focusElement(elementToFocus, e.target);
|
|
203
|
-
if (!isVisible(elementToFocus, this.host.nativeElement, this.scrollable.offsetFirst, this.rtl).visibleY) {
|
|
204
|
-
elementToFocus.scrollIntoView();
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
else if (code === Keys.ArrowDown) {
|
|
209
|
-
const id = e.target.getAttribute('id');
|
|
210
|
-
if (id.split('-')[4] !== this.totalRows.toString()) {
|
|
211
|
-
const index = Array.from(e.target.parentElement.children).findIndex(el => el === e.target);
|
|
212
|
-
const elementToFocus = e.target.parentElement.nextElementSibling.children[index];
|
|
213
|
-
pivotGrid.navigation.focusElement(elementToFocus, e.target);
|
|
214
|
-
if (!isVisible(elementToFocus, this.host.nativeElement, this.scrollable.offsetFirst, this.rtl).visibleY) {
|
|
215
|
-
elementToFocus.scrollIntoView(false);
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
if (this.tableType === 'rowHeader' && e.target.tagName === 'TH' && code === Keys.ArrowRight) {
|
|
221
|
-
if (e.target.matches(':last-child')) {
|
|
222
|
-
e.stopImmediatePropagation();
|
|
223
|
-
e.preventDefault();
|
|
224
|
-
const valuesContainer = this.host.nativeElement.nextElementSibling;
|
|
225
|
-
valuesContainer.scrollLeft = this.rtl ? valuesContainer.scrollWidth : 0;
|
|
226
|
-
this.zone.runOutsideAngular(() => setTimeout(() => {
|
|
227
|
-
const elementToFocusId = e.target.parentElement.getAttribute('aria-owns').split(' ')[0];
|
|
228
|
-
const elementToFocus = document.getElementById(elementToFocusId);
|
|
229
|
-
pivotGrid.navigation.focusElement(elementToFocus, e.target);
|
|
230
|
-
}));
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
if (this.tableType === 'columnHeader' && e.target.tagName === 'TH' && code === Keys.ArrowDown) {
|
|
234
|
-
if (e.target.parentElement.matches(':last-child')) {
|
|
235
|
-
e.stopImmediatePropagation();
|
|
236
|
-
e.preventDefault();
|
|
237
|
-
const valuesContainer = this.host.nativeElement.nextElementSibling.nextElementSibling;
|
|
238
|
-
valuesContainer.scrollTop = 0;
|
|
239
|
-
this.zone.runOutsideAngular(() => setTimeout(() => {
|
|
240
|
-
const elementToFocus = valuesContainer.querySelector(`td[aria-describedby*="${e.target.getAttribute('id')}"]`);
|
|
241
|
-
pivotGrid.navigation.focusElement(elementToFocus, e.target);
|
|
242
|
-
}));
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
}, true);
|
|
246
|
-
}
|
|
247
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PivotGridTableComponent, deps: [{ token: i0.ElementRef }, { token: i1.PivotGridDataService }, { token: i2.LocalizationService }, { token: i0.NgZone }, { token: i3.PivotGridScrollService }], target: i0.ɵɵFactoryTarget.Component });
|
|
248
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: PivotGridTableComponent, isStandalone: true, selector: "kendo-pivotgrid-table", inputs: { tableType: "tableType", colWidth: "colWidth", customCellTemplate: "customCellTemplate", valueCellTemplate: "valueCellTemplate", rowHeaderCellTemplate: "rowHeaderCellTemplate", columnHeaderCellTemplate: "columnHeaderCellTemplate", scrollableSettings: "scrollableSettings" }, ngImport: i0, template: `
|
|
249
|
-
<table
|
|
250
|
-
class="k-pivotgrid-table"
|
|
251
|
-
role="presentation"
|
|
252
|
-
[ngStyle]="{
|
|
253
|
-
float: tableType === 'values' ? this.rtl ? 'right' : 'left' : 'initial',
|
|
254
|
-
overflow: 'scroll',
|
|
255
|
-
'-ms-overflow-style': tableType !== 'values' ? 'none' : 'auto',
|
|
256
|
-
'scrollbar-width': tableType !== 'values' ? 'none' : 'auto'
|
|
257
|
-
}">
|
|
258
|
-
<colgroup>
|
|
259
|
-
@if (tableType === 'values' && columnVirtualization && startColIndex > 0) {
|
|
260
|
-
<col [style.width]="startColIndex * (colWidth >= 0 ? colWidth : 200) + 'px'"/>
|
|
261
|
-
}
|
|
262
|
-
@for (item of (tableType === 'values' && columnVirtualization ? headerItems?.slice(0, renderedCols) : headerItems); track trackByColIndex($index, item)) {
|
|
263
|
-
<col
|
|
264
|
-
[style.width]="tableType !== 'rowHeader' ? colWidth >= 0 ? colWidth + 'px' : '200px' : undefined" />
|
|
265
|
-
}
|
|
266
|
-
</colgroup>
|
|
267
|
-
<tbody class="k-pivotgrid-tbody" [attr.role]="tableType === 'values' ? 'none' : 'rowgroup'">
|
|
268
|
-
@for (row of (tableType === 'values' && rowVirtualization ? renderedRows : rows); track trackByRowIndex($index, row); let rowIndex = $index) {
|
|
269
|
-
<tr
|
|
270
|
-
class="k-pivotgrid-row"
|
|
271
|
-
[attr.role]="tableType === 'values' ? 'none' : 'row'">
|
|
272
|
-
@if (tableType === 'values' && columnVirtualization && startColIndex > 0) {
|
|
273
|
-
<td class="k-pivotgrid-cell"></td>
|
|
274
|
-
}
|
|
275
|
-
@for (cell of (tableType === 'values' && columnVirtualization ? row?.cells.slice(startColIndex, (startColIndex + renderedCols)) : row?.cells); track trackByCellIndex($index, cell); let colIndex = $index) {
|
|
276
|
-
@if (cell && tableType !== 'values') {
|
|
277
|
-
<th
|
|
278
|
-
[kendoPivotGridCell]="cell"
|
|
279
|
-
[customCellTemplate]="customCellTemplate"
|
|
280
|
-
[rowHeaderCellTemplate]="rowHeaderCellTemplate"
|
|
281
|
-
[columnHeaderCellTemplate]="columnHeaderCellTemplate"
|
|
282
|
-
[tableType]="tableType"
|
|
283
|
-
[colIndex]="colIndex + startColIndex"
|
|
284
|
-
[rowIndex]="rowIndex + startRowIndex"
|
|
285
|
-
[attr.aria-expanded]="cell.hasChildren && cell.children.length ? 'true' : 'false'"
|
|
286
|
-
[attr.role]="tableType === 'columnHeader' ? 'columnheader' : tableType === 'rowHeader' ? 'rowheader' : 'none'"
|
|
287
|
-
[attr.id]="pivotGridId + (tableType === 'columnHeader' ? 'ch-' : 'rh-') + (rowIndex + 1) + '-' + (colIndex + 1)"></th>
|
|
288
|
-
}
|
|
289
|
-
@if (cell && tableType === 'values') {
|
|
290
|
-
<td
|
|
291
|
-
[customCellTemplate]="customCellTemplate"
|
|
292
|
-
[valueCellTemplate]="valueCellTemplate"
|
|
293
|
-
[kendoPivotGridCell]="cell"
|
|
294
|
-
tableType="values"
|
|
295
|
-
[colIndex]="colIndex + startColIndex"
|
|
296
|
-
[rowIndex]="rowIndex + startRowIndex"
|
|
297
|
-
role="gridcell"
|
|
298
|
-
[attr.id]="pivotGridId + 'cell-' + (rowIndex + startRowIndex + 1) + '-' + (colIndex + startColIndex + 1)"></td>
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
</tr>
|
|
302
|
-
}
|
|
303
|
-
</tbody>
|
|
304
|
-
</table>
|
|
305
|
-
`, isInline: true, dependencies: [{ kind: "component", type: PivotGridCellDirective, selector: "[kendoPivotGridCell]", inputs: ["kendoPivotGridCell", "tableType", "rowIndex", "colIndex", "customCellTemplate", "valueCellTemplate", "rowHeaderCellTemplate", "columnHeaderCellTemplate"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
306
|
-
}
|
|
307
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PivotGridTableComponent, decorators: [{
|
|
308
|
-
type: Component,
|
|
309
|
-
args: [{
|
|
310
|
-
selector: 'kendo-pivotgrid-table',
|
|
311
|
-
template: `
|
|
312
|
-
<table
|
|
313
|
-
class="k-pivotgrid-table"
|
|
314
|
-
role="presentation"
|
|
315
|
-
[ngStyle]="{
|
|
316
|
-
float: tableType === 'values' ? this.rtl ? 'right' : 'left' : 'initial',
|
|
317
|
-
overflow: 'scroll',
|
|
318
|
-
'-ms-overflow-style': tableType !== 'values' ? 'none' : 'auto',
|
|
319
|
-
'scrollbar-width': tableType !== 'values' ? 'none' : 'auto'
|
|
320
|
-
}">
|
|
321
|
-
<colgroup>
|
|
322
|
-
@if (tableType === 'values' && columnVirtualization && startColIndex > 0) {
|
|
323
|
-
<col [style.width]="startColIndex * (colWidth >= 0 ? colWidth : 200) + 'px'"/>
|
|
324
|
-
}
|
|
325
|
-
@for (item of (tableType === 'values' && columnVirtualization ? headerItems?.slice(0, renderedCols) : headerItems); track trackByColIndex($index, item)) {
|
|
326
|
-
<col
|
|
327
|
-
[style.width]="tableType !== 'rowHeader' ? colWidth >= 0 ? colWidth + 'px' : '200px' : undefined" />
|
|
328
|
-
}
|
|
329
|
-
</colgroup>
|
|
330
|
-
<tbody class="k-pivotgrid-tbody" [attr.role]="tableType === 'values' ? 'none' : 'rowgroup'">
|
|
331
|
-
@for (row of (tableType === 'values' && rowVirtualization ? renderedRows : rows); track trackByRowIndex($index, row); let rowIndex = $index) {
|
|
332
|
-
<tr
|
|
333
|
-
class="k-pivotgrid-row"
|
|
334
|
-
[attr.role]="tableType === 'values' ? 'none' : 'row'">
|
|
335
|
-
@if (tableType === 'values' && columnVirtualization && startColIndex > 0) {
|
|
336
|
-
<td class="k-pivotgrid-cell"></td>
|
|
337
|
-
}
|
|
338
|
-
@for (cell of (tableType === 'values' && columnVirtualization ? row?.cells.slice(startColIndex, (startColIndex + renderedCols)) : row?.cells); track trackByCellIndex($index, cell); let colIndex = $index) {
|
|
339
|
-
@if (cell && tableType !== 'values') {
|
|
340
|
-
<th
|
|
341
|
-
[kendoPivotGridCell]="cell"
|
|
342
|
-
[customCellTemplate]="customCellTemplate"
|
|
343
|
-
[rowHeaderCellTemplate]="rowHeaderCellTemplate"
|
|
344
|
-
[columnHeaderCellTemplate]="columnHeaderCellTemplate"
|
|
345
|
-
[tableType]="tableType"
|
|
346
|
-
[colIndex]="colIndex + startColIndex"
|
|
347
|
-
[rowIndex]="rowIndex + startRowIndex"
|
|
348
|
-
[attr.aria-expanded]="cell.hasChildren && cell.children.length ? 'true' : 'false'"
|
|
349
|
-
[attr.role]="tableType === 'columnHeader' ? 'columnheader' : tableType === 'rowHeader' ? 'rowheader' : 'none'"
|
|
350
|
-
[attr.id]="pivotGridId + (tableType === 'columnHeader' ? 'ch-' : 'rh-') + (rowIndex + 1) + '-' + (colIndex + 1)"></th>
|
|
351
|
-
}
|
|
352
|
-
@if (cell && tableType === 'values') {
|
|
353
|
-
<td
|
|
354
|
-
[customCellTemplate]="customCellTemplate"
|
|
355
|
-
[valueCellTemplate]="valueCellTemplate"
|
|
356
|
-
[kendoPivotGridCell]="cell"
|
|
357
|
-
tableType="values"
|
|
358
|
-
[colIndex]="colIndex + startColIndex"
|
|
359
|
-
[rowIndex]="rowIndex + startRowIndex"
|
|
360
|
-
role="gridcell"
|
|
361
|
-
[attr.id]="pivotGridId + 'cell-' + (rowIndex + startRowIndex + 1) + '-' + (colIndex + startColIndex + 1)"></td>
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
</tr>
|
|
365
|
-
}
|
|
366
|
-
</tbody>
|
|
367
|
-
</table>
|
|
368
|
-
`,
|
|
369
|
-
standalone: true,
|
|
370
|
-
imports: [PivotGridCellDirective, NgStyle]
|
|
371
|
-
}]
|
|
372
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.PivotGridDataService }, { type: i2.LocalizationService }, { type: i0.NgZone }, { type: i3.PivotGridScrollService }], propDecorators: { tableType: [{
|
|
373
|
-
type: Input
|
|
374
|
-
}], colWidth: [{
|
|
375
|
-
type: Input
|
|
376
|
-
}], customCellTemplate: [{
|
|
377
|
-
type: Input
|
|
378
|
-
}], valueCellTemplate: [{
|
|
379
|
-
type: Input
|
|
380
|
-
}], rowHeaderCellTemplate: [{
|
|
381
|
-
type: Input
|
|
382
|
-
}], columnHeaderCellTemplate: [{
|
|
383
|
-
type: Input
|
|
384
|
-
}], scrollableSettings: [{
|
|
385
|
-
type: Input
|
|
386
|
-
}] } });
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Directive, TemplateRef } from '@angular/core';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* Represents the cell template of the PivotGrid. Allows customizing the content of the cells.
|
|
9
|
-
*
|
|
10
|
-
* To define the cell template, nest an `<ng-template>` tag with the
|
|
11
|
-
* `kendoPivotGridCellTemplate` directive inside a `<kendo-pivot-grid>` tag ([see example](slug:templates_pivotgrid#toc-cell-template)).
|
|
12
|
-
*
|
|
13
|
-
* The template context provides the current cell item and the following additional fields:
|
|
14
|
-
* - `cellItem`—The current cell item. This is the default template context that you can access with any `let-x` syntax—for example, `let-cellItem`.
|
|
15
|
-
* - `columnIndex`—The current column index. Use `let-columnIndex="columnIndex"` to access this variable in your template.
|
|
16
|
-
* - `rowIndex`—The current row index. Use `let-rowIndex="rowIndex"` to access this variable in your template.
|
|
17
|
-
* - `expanded`—The expanded state of the cell. Use `let-expanded="expanded"` to access this boolean variable in your template.
|
|
18
|
-
* - `tableType`—The table type identifier. Use `let-tableType="tableType"` to access this variable in your template.
|
|
19
|
-
* - `text`—The default cell text. Use `let-text="text"` to access this variable in your template.
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* ```html
|
|
23
|
-
* <kendo-pivot-grid [data]="data" ...>
|
|
24
|
-
* <ng-template kendoPivotGridCellTemplate let-cellItem let-rowIndex="rowIndex" let-column="column">
|
|
25
|
-
* Row: {{rowIndex}}
|
|
26
|
-
* </ng-template>
|
|
27
|
-
* </kendo-pivot-grid>
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
export class CellTemplateDirective {
|
|
31
|
-
templateRef;
|
|
32
|
-
constructor(templateRef) {
|
|
33
|
-
this.templateRef = templateRef;
|
|
34
|
-
}
|
|
35
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CellTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
36
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: CellTemplateDirective, isStandalone: true, selector: "[kendoPivotGridCellTemplate]", ngImport: i0 });
|
|
37
|
-
}
|
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CellTemplateDirective, decorators: [{
|
|
39
|
-
type: Directive,
|
|
40
|
-
args: [{
|
|
41
|
-
selector: '[kendoPivotGridCellTemplate]',
|
|
42
|
-
standalone: true
|
|
43
|
-
}]
|
|
44
|
-
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Directive, TemplateRef } from '@angular/core';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* Represents the column header cell template of the PivotGrid. Allows customizing the content of the column header cells.
|
|
9
|
-
*
|
|
10
|
-
* To define the column header cell template, nest an `<ng-template>` tag with the
|
|
11
|
-
* `kendoPivotGridColumnHeaderCellTemplate` directive inside a `<kendo-pivot-grid>` tag ([see example](slug:templates_pivotgrid#toc-column-header-cell-template)).
|
|
12
|
-
*
|
|
13
|
-
* The template context provides the current cell item and the following additional fields:
|
|
14
|
-
* - `cellItem`—The current cell item. This is the default template context that you can access with any `let-x` syntax—for example, `let-cellItem`.
|
|
15
|
-
* - `columnIndex`—The current column index. Use `let-columnIndex="columnIndex"` to access this variable in your template.
|
|
16
|
-
* - `rowIndex`—The current row index. Use `let-rowIndex="rowIndex"` to access this variable in your template.
|
|
17
|
-
* - `expanded`—The expanded state of the cell. Use `let-expanded="expanded"` to access this boolean variable in your template.
|
|
18
|
-
* - `tableType`—The table type identifier. Use `let-tableType="tableType"` to access this variable in your template.
|
|
19
|
-
* - `text`—The default cell text. Use `let-text="text"` to access this variable in your template.
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* ```html
|
|
23
|
-
* <kendo-pivot-grid [data]="data" ...>
|
|
24
|
-
* <ng-template kendoPivotGridColumnHeaderCellTemplate let-cellItem let-rowIndex="rowIndex" let-column="column">
|
|
25
|
-
* Row: {{rowIndex}}
|
|
26
|
-
* </ng-template>
|
|
27
|
-
* </kendo-pivot-grid>
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
export class ColumnHeaderCellTemplateDirective {
|
|
31
|
-
templateRef;
|
|
32
|
-
constructor(templateRef) {
|
|
33
|
-
this.templateRef = templateRef;
|
|
34
|
-
}
|
|
35
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ColumnHeaderCellTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
36
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: ColumnHeaderCellTemplateDirective, isStandalone: true, selector: "[kendoPivotGridColumnHeaderCellTemplate]", ngImport: i0 });
|
|
37
|
-
}
|
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ColumnHeaderCellTemplateDirective, decorators: [{
|
|
39
|
-
type: Directive,
|
|
40
|
-
args: [{
|
|
41
|
-
selector: '[kendoPivotGridColumnHeaderCellTemplate]',
|
|
42
|
-
standalone: true
|
|
43
|
-
}]
|
|
44
|
-
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Directive, TemplateRef } from '@angular/core';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* Represents the row header cell template of the PivotGrid. Allows customizing the content of the row header cells.
|
|
9
|
-
*
|
|
10
|
-
* To define the row header cell template, nest an `<ng-template>` tag with the
|
|
11
|
-
* `kendoPivotGridRowHeaderCellTemplate` directive inside a `<kendo-pivot-grid>` tag ([see example](slug:templates_pivotgrid#toc-row-header-cell-template)).
|
|
12
|
-
*
|
|
13
|
-
* The template context provides the current cell item and the following additional fields:
|
|
14
|
-
* - `cellItem`—The current cell item. This is the default template context that you can access with any `let-x` syntax—for example, `let-cellItem`.
|
|
15
|
-
* - `columnIndex`—The current column index. Use `let-columnIndex="columnIndex"` to access this variable in your template.
|
|
16
|
-
* - `rowIndex`—The current row index. Use `let-rowIndex="rowIndex"` to access this variable in your template.
|
|
17
|
-
* - `expanded`—The expanded state of the cell. Use `let-expanded="expanded"` to access this boolean variable in your template.
|
|
18
|
-
* - `tableType`—The table type identifier. Use `let-tableType="tableType"` to access this variable in your template.
|
|
19
|
-
* - `text`—The default cell text. Use `let-text="text"` to access this variable in your template.
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* ```html
|
|
23
|
-
* <kendo-pivot-grid [data]="data" ...>
|
|
24
|
-
* <ng-template kendoPivotGridRowHeaderCellTemplate let-cellItem let-rowIndex="rowIndex" let-column="column">
|
|
25
|
-
* Row: {{rowIndex}}
|
|
26
|
-
* </ng-template>
|
|
27
|
-
* </kendo-pivot-grid>
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
export class RowHeaderCellTemplateDirective {
|
|
31
|
-
templateRef;
|
|
32
|
-
constructor(templateRef) {
|
|
33
|
-
this.templateRef = templateRef;
|
|
34
|
-
}
|
|
35
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RowHeaderCellTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
36
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: RowHeaderCellTemplateDirective, isStandalone: true, selector: "[kendoPivotGridRowHeaderCellTemplate]", ngImport: i0 });
|
|
37
|
-
}
|
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RowHeaderCellTemplateDirective, decorators: [{
|
|
39
|
-
type: Directive,
|
|
40
|
-
args: [{
|
|
41
|
-
selector: '[kendoPivotGridRowHeaderCellTemplate]',
|
|
42
|
-
standalone: true
|
|
43
|
-
}]
|
|
44
|
-
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Directive, TemplateRef } from '@angular/core';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* Represents the value cell template of the PivotGrid. Allows customizing the content of the value cells.
|
|
9
|
-
*
|
|
10
|
-
* To define the value cell template, nest an `<ng-template>` tag with the
|
|
11
|
-
* `kendoPivotGridValueCellTemplate` directive inside a `<kendo-pivot-grid>` tag ([see example](slug:templates_pivotgrid#toc-value-cell-template)).
|
|
12
|
-
*
|
|
13
|
-
* The template context provides the current cell item and the following additional fields:
|
|
14
|
-
* - `cellItem`—The current cell item. This is the default template context that you can access with any `let-x` syntax—for example, `let-cellItem`.
|
|
15
|
-
* - `columnIndex`—The current column index. Use `let-columnIndex="columnIndex"` to access this variable in your template.
|
|
16
|
-
* - `rowIndex`—The current row index. Use `let-rowIndex="rowIndex"` to access this variable in your template.
|
|
17
|
-
* - `tableType`—The table type identifier. Use `let-tableType="tableType"` to access this variable in your template.
|
|
18
|
-
* - `value`—The default cell value. Use `let-value="value"` to access this variable in your template.
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* ```html
|
|
22
|
-
* <kendo-pivot-grid [data]="data" ...>
|
|
23
|
-
* <ng-template kendoPivotGridValueCellTemplate let-cellItem let-rowIndex="rowIndex" let-column="column">
|
|
24
|
-
* Row: {{rowIndex}}
|
|
25
|
-
* </ng-template>
|
|
26
|
-
* </kendo-pivot-grid>
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
|
-
export class ValueCellTemplateDirective {
|
|
30
|
-
templateRef;
|
|
31
|
-
constructor(templateRef) {
|
|
32
|
-
this.templateRef = templateRef;
|
|
33
|
-
}
|
|
34
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ValueCellTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
35
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: ValueCellTemplateDirective, isStandalone: true, selector: "[kendoPivotGridValueCellTemplate]", ngImport: i0 });
|
|
36
|
-
}
|
|
37
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ValueCellTemplateDirective, decorators: [{
|
|
38
|
-
type: Directive,
|
|
39
|
-
args: [{
|
|
40
|
-
selector: '[kendoPivotGridValueCellTemplate]',
|
|
41
|
-
standalone: true
|
|
42
|
-
}]
|
|
43
|
-
}], ctorParameters: () => [{ type: i0.TemplateRef }] });
|