@progress/kendo-angular-grid 19.1.2-develop.8 → 19.2.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/data/data-mapping.service.d.ts +46 -0
- package/esm2022/data/data-mapping.service.mjs +125 -0
- package/esm2022/databinding.directive.mjs +6 -0
- package/esm2022/grid.component.mjs +24 -23
- package/esm2022/package-metadata.mjs +2 -2
- package/esm2022/rendering/list.component.mjs +45 -27
- package/esm2022/rendering/table-body.component.mjs +37 -128
- package/esm2022/utils.mjs +15 -0
- package/fesm2022/progress-kendo-angular-grid.mjs +256 -192
- package/grid.component.d.ts +10 -3
- package/package.json +20 -20
- package/rendering/list.component.d.ts +8 -5
- package/rendering/table-body.component.d.ts +9 -27
- package/schematics/ngAdd/index.js +4 -4
- package/utils.d.ts +5 -0
|
@@ -526,6 +526,21 @@ const isMultipleRangesEnabled = (selectableSettings) => {
|
|
|
526
526
|
typeof selectableSettings === 'object' &&
|
|
527
527
|
selectableSettings.selectable.multipleRanges;
|
|
528
528
|
};
|
|
529
|
+
/**
|
|
530
|
+
* @hidden
|
|
531
|
+
* Calculates the height of a table row by inserting a temporary row into the table body when the `rowHeight` option is not set.
|
|
532
|
+
*/
|
|
533
|
+
const calcRowHeight = (tableBody) => {
|
|
534
|
+
let result = 0;
|
|
535
|
+
if (tableBody) {
|
|
536
|
+
const row = tableBody.insertRow(0);
|
|
537
|
+
const cell = row.insertCell(0);
|
|
538
|
+
cell.textContent = ' ';
|
|
539
|
+
result = row.getBoundingClientRect().height;
|
|
540
|
+
tableBody.deleteRow(0);
|
|
541
|
+
}
|
|
542
|
+
return result;
|
|
543
|
+
};
|
|
529
544
|
|
|
530
545
|
/**
|
|
531
546
|
* @hidden
|
|
@@ -19573,27 +19588,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
19573
19588
|
type: Input
|
|
19574
19589
|
}] } });
|
|
19575
19590
|
|
|
19576
|
-
/**
|
|
19577
|
-
* @hidden
|
|
19578
|
-
*/
|
|
19579
|
-
class RowspanService {
|
|
19580
|
-
skipCells = [];
|
|
19581
|
-
addCells(rowIndex, colIndex, rowspan) {
|
|
19582
|
-
for (let i = 1; i < rowspan; i++) {
|
|
19583
|
-
if (!this.skipCells.some(this.cellExists(rowIndex + i, colIndex))) {
|
|
19584
|
-
this.skipCells.push({ rowIndex: rowIndex + i, colIndex });
|
|
19585
|
-
}
|
|
19586
|
-
}
|
|
19587
|
-
}
|
|
19588
|
-
reset() {
|
|
19589
|
-
this.skipCells = [];
|
|
19590
|
-
}
|
|
19591
|
-
shouldSkip(rowIndex, colIndex) {
|
|
19592
|
-
return !!this.skipCells.find(this.cellExists(rowIndex, colIndex));
|
|
19593
|
-
}
|
|
19594
|
-
cellExists = (rowIndex, colIndex) => cell => cell.rowIndex === rowIndex && cell.colIndex === colIndex;
|
|
19595
|
-
}
|
|
19596
|
-
|
|
19597
19591
|
const columnCellIndex = (cell, cells) => {
|
|
19598
19592
|
let cellIndex = 0;
|
|
19599
19593
|
for (let idx = 0; idx < cells.length; idx++) {
|
|
@@ -19622,13 +19616,12 @@ class TableBodyComponent {
|
|
|
19622
19616
|
cellSelectionService;
|
|
19623
19617
|
columnInfoService;
|
|
19624
19618
|
navigationService;
|
|
19625
|
-
rowspanService;
|
|
19626
19619
|
columns = [];
|
|
19627
19620
|
allColumns;
|
|
19628
19621
|
groups = [];
|
|
19629
19622
|
detailTemplate;
|
|
19630
19623
|
noRecordsTemplate;
|
|
19631
|
-
|
|
19624
|
+
rowsToRender;
|
|
19632
19625
|
skip = 0;
|
|
19633
19626
|
selectable;
|
|
19634
19627
|
filterable;
|
|
@@ -19638,7 +19631,6 @@ class TableBodyComponent {
|
|
|
19638
19631
|
isVirtual;
|
|
19639
19632
|
cellLoadingTemplate;
|
|
19640
19633
|
skipGroupDecoration = false;
|
|
19641
|
-
showGroupFooters = false;
|
|
19642
19634
|
lockedColumnsCount = 0;
|
|
19643
19635
|
totalColumnsCount = 0;
|
|
19644
19636
|
virtualColumns;
|
|
@@ -19656,9 +19648,7 @@ class TableBodyComponent {
|
|
|
19656
19648
|
clickTimeout;
|
|
19657
19649
|
minusIcon = minusIcon;
|
|
19658
19650
|
plusIcon = plusIcon;
|
|
19659
|
-
|
|
19660
|
-
rerender = false;
|
|
19661
|
-
constructor(detailsService, groupsService, changeNotification, editService, ctx, ngZone, renderer, element, domEvents, selectionService, cellSelectionService, columnInfoService, navigationService, rowspanService) {
|
|
19651
|
+
constructor(detailsService, groupsService, changeNotification, editService, ctx, ngZone, renderer, element, domEvents, selectionService, cellSelectionService, columnInfoService, navigationService) {
|
|
19662
19652
|
this.detailsService = detailsService;
|
|
19663
19653
|
this.groupsService = groupsService;
|
|
19664
19654
|
this.changeNotification = changeNotification;
|
|
@@ -19672,7 +19662,6 @@ class TableBodyComponent {
|
|
|
19672
19662
|
this.cellSelectionService = cellSelectionService;
|
|
19673
19663
|
this.columnInfoService = columnInfoService;
|
|
19674
19664
|
this.navigationService = navigationService;
|
|
19675
|
-
this.rowspanService = rowspanService;
|
|
19676
19665
|
this.noRecordsText = this.ctx.localization.get('noRecords');
|
|
19677
19666
|
this.cellKeydownSubscription = this.navigationService.cellKeydown.subscribe((args) => this.cellKeydownHandler(args));
|
|
19678
19667
|
this.trackByWrapper = this.trackByWrapper.bind(this);
|
|
@@ -19681,12 +19670,6 @@ class TableBodyComponent {
|
|
|
19681
19670
|
get newDataItem() {
|
|
19682
19671
|
return this.editService.newDataItem;
|
|
19683
19672
|
}
|
|
19684
|
-
get cachedDataArray() {
|
|
19685
|
-
if (!this.dataArray) {
|
|
19686
|
-
this.dataArray = this.data.map(item => item);
|
|
19687
|
-
}
|
|
19688
|
-
return this.dataArray;
|
|
19689
|
-
}
|
|
19690
19673
|
// Number of unlocked columns in the next table, if any
|
|
19691
19674
|
unlockedColumnsCount(item) {
|
|
19692
19675
|
const allColumns = this.allColumns || this.columns;
|
|
@@ -19698,25 +19681,7 @@ class TableBodyComponent {
|
|
|
19698
19681
|
});
|
|
19699
19682
|
const contentColumnsCount = this.totalColumnsCount - this.lockedColumnsCount - allColumnsCount;
|
|
19700
19683
|
const headerFooterColumnsCount = this.totalColumnsCount - this.lockedColumnsCount - allColumns.length;
|
|
19701
|
-
return item &&
|
|
19702
|
-
}
|
|
19703
|
-
shouldSkipCell(rowIndex, colIndex) {
|
|
19704
|
-
return this.rowspanService.shouldSkip(rowIndex, colIndex);
|
|
19705
|
-
}
|
|
19706
|
-
getRowspan(row, column, colIndex) {
|
|
19707
|
-
if (this.rerender) {
|
|
19708
|
-
this.dataArray = null;
|
|
19709
|
-
this.rerender = false;
|
|
19710
|
-
}
|
|
19711
|
-
const rowspan = column.cellRowspan(row, column, this.cachedDataArray);
|
|
19712
|
-
if (rowspan > 1) {
|
|
19713
|
-
this.rowspanService.addCells(row.index, colIndex, rowspan);
|
|
19714
|
-
}
|
|
19715
|
-
this.ngZone.runOutsideAngular(() => setTimeout(() => {
|
|
19716
|
-
this.rerender = true;
|
|
19717
|
-
this.rowspanService.reset();
|
|
19718
|
-
}));
|
|
19719
|
-
return rowspan;
|
|
19684
|
+
return item && item.type === 'data' ? contentColumnsCount : headerFooterColumnsCount;
|
|
19720
19685
|
}
|
|
19721
19686
|
isAriaSelected(item, column) {
|
|
19722
19687
|
return this.cellSelectionService.isCellSelected(item, column) ||
|
|
@@ -19726,44 +19691,16 @@ class TableBodyComponent {
|
|
|
19726
19691
|
this.detailsService.toggleRow(index, dataItem);
|
|
19727
19692
|
return false;
|
|
19728
19693
|
}
|
|
19729
|
-
isExpanded(viewItem) {
|
|
19730
|
-
return this.detailsService.isExpanded(viewItem.index, viewItem.data);
|
|
19731
|
-
}
|
|
19732
19694
|
detailButtonIconName(viewItem) {
|
|
19733
|
-
|
|
19734
|
-
return expanded ? 'minus' : 'plus';
|
|
19695
|
+
return viewItem.isExpanded ? 'minus' : 'plus';
|
|
19735
19696
|
}
|
|
19736
19697
|
detailButtonSvgIcon(viewItem) {
|
|
19737
|
-
|
|
19738
|
-
return expanded ? this.minusIcon : this.plusIcon;
|
|
19698
|
+
return viewItem.isExpanded ? this.minusIcon : this.plusIcon;
|
|
19739
19699
|
}
|
|
19740
19700
|
detailButtonTitle(viewItem) {
|
|
19741
|
-
const messageKey =
|
|
19701
|
+
const messageKey = viewItem.isExpanded ? 'detailCollapse' : 'detailExpand';
|
|
19742
19702
|
return this.ctx.localization.get(messageKey);
|
|
19743
19703
|
}
|
|
19744
|
-
isGroup(item) {
|
|
19745
|
-
return item.type === 'group';
|
|
19746
|
-
}
|
|
19747
|
-
isDataItem(item) {
|
|
19748
|
-
return !this.isGroup(item) && !this.isFooter(item);
|
|
19749
|
-
}
|
|
19750
|
-
isFooter(item) {
|
|
19751
|
-
return item.type === 'footer';
|
|
19752
|
-
}
|
|
19753
|
-
isFooterItemInExpandedGroup(item) {
|
|
19754
|
-
const footerItem = { data: item.data, index: item.groupIndex, parentGroup: item.group.parentGroup };
|
|
19755
|
-
return this.isInExpandedGroup(footerItem);
|
|
19756
|
-
}
|
|
19757
|
-
isDataItemInExpandedGroup(item) {
|
|
19758
|
-
const dataItem = { data: item.group.data, index: item.groupIndex, parentGroup: item.group.parentGroup };
|
|
19759
|
-
return this.isInExpandedGroup(dataItem);
|
|
19760
|
-
}
|
|
19761
|
-
isInExpandedGroup(item) {
|
|
19762
|
-
return this.groupsService.isInExpandedGroup(item);
|
|
19763
|
-
}
|
|
19764
|
-
isParentGroupExpanded(item) {
|
|
19765
|
-
return this.groupsService.isInExpandedGroup(item.parentGroup);
|
|
19766
|
-
}
|
|
19767
19704
|
isOdd(item) {
|
|
19768
19705
|
return item.index % 2 !== 0;
|
|
19769
19706
|
}
|
|
@@ -19986,7 +19923,7 @@ class TableBodyComponent {
|
|
|
19986
19923
|
const columnIndex = this.lockedColumnsCount + index;
|
|
19987
19924
|
let rowIndex = row.getAttribute('data-kendo-grid-item-index');
|
|
19988
19925
|
rowIndex = rowIndex ? parseInt(rowIndex, 10) : -1;
|
|
19989
|
-
const dataItem = rowIndex === -1 ? this.editService.newDataItem : this.
|
|
19926
|
+
const dataItem = rowIndex === -1 ? this.editService.newDataItem : this.rowsToRender.find(item => +item.index === rowIndex && item.type === 'data')?.data;
|
|
19990
19927
|
const isEditedColumn = this.editService.isEditedColumn(rowIndex, column);
|
|
19991
19928
|
const isEditedRow = this.editService.isEdited(rowIndex);
|
|
19992
19929
|
const type = eventArg.type === 'keydown' ? 'click' : eventArg.type;
|
|
@@ -20031,8 +19968,8 @@ class TableBodyComponent {
|
|
|
20031
19968
|
});
|
|
20032
19969
|
}
|
|
20033
19970
|
}
|
|
20034
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TableBodyComponent, deps: [{ token: DetailsService }, { token: GroupsService }, { token: ChangeNotificationService }, { token: EditService }, { token: ContextService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: DomEventsService }, { token: SelectionService }, { token: CellSelectionService }, { token: ColumnInfoService }, { token: NavigationService }
|
|
20035
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TableBodyComponent, isStandalone: true, selector: "[kendoGridTableBody]", inputs: { columns: "columns", allColumns: "allColumns", groups: "groups", detailTemplate: "detailTemplate", noRecordsTemplate: "noRecordsTemplate",
|
|
19971
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TableBodyComponent, deps: [{ token: DetailsService }, { token: GroupsService }, { token: ChangeNotificationService }, { token: EditService }, { token: ContextService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: DomEventsService }, { token: SelectionService }, { token: CellSelectionService }, { token: ColumnInfoService }, { token: NavigationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
19972
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TableBodyComponent, isStandalone: true, selector: "[kendoGridTableBody]", inputs: { columns: "columns", allColumns: "allColumns", groups: "groups", detailTemplate: "detailTemplate", noRecordsTemplate: "noRecordsTemplate", rowsToRender: "rowsToRender", skip: "skip", selectable: "selectable", filterable: "filterable", noRecordsText: "noRecordsText", isLocked: "isLocked", isLoading: "isLoading", isVirtual: "isVirtual", cellLoadingTemplate: "cellLoadingTemplate", skipGroupDecoration: "skipGroupDecoration", lockedColumnsCount: "lockedColumnsCount", totalColumnsCount: "totalColumnsCount", virtualColumns: "virtualColumns", trackBy: "trackBy", rowSticky: "rowSticky", totalColumns: "totalColumns", rowClass: "rowClass" }, host: { properties: { "class.k-table-tbody": "this.hostClass" } }, usesOnChanges: true, ngImport: i0, template: `
|
|
20036
19973
|
<ng-container *ngIf="editService.hasNewItem">
|
|
20037
19974
|
<tr class="k-grid-add-row k-grid-edit-row k-master-row"
|
|
20038
19975
|
kendoGridLogicalRow
|
|
@@ -20073,7 +20010,7 @@ class TableBodyComponent {
|
|
|
20073
20010
|
</td>
|
|
20074
20011
|
</tr>
|
|
20075
20012
|
</ng-container>
|
|
20076
|
-
<tr *ngIf="
|
|
20013
|
+
<tr *ngIf="!rowsToRender?.length" class="k-grid-norecords" role="row">
|
|
20077
20014
|
<td [attr.colspan]="colSpan" class="k-table-td">
|
|
20078
20015
|
<ng-template
|
|
20079
20016
|
*ngIf="noRecordsTemplate?.templateRef"
|
|
@@ -20086,8 +20023,8 @@ class TableBodyComponent {
|
|
|
20086
20023
|
</ng-container>
|
|
20087
20024
|
</td>
|
|
20088
20025
|
</tr>
|
|
20089
|
-
<ng-container *ngFor="let item of
|
|
20090
|
-
<tr *ngIf="
|
|
20026
|
+
<ng-container *ngFor="let item of rowsToRender; trackBy: trackByWrapper; let rowIndex = index;">
|
|
20027
|
+
<tr *ngIf="item.type === 'group'"
|
|
20091
20028
|
kendoGridGroupHeader
|
|
20092
20029
|
[columns]="columns"
|
|
20093
20030
|
[groups]="groups"
|
|
@@ -20105,8 +20042,7 @@ class TableBodyComponent {
|
|
|
20105
20042
|
[logicalCellsCount]="columns.length"
|
|
20106
20043
|
[logicalSlaveCellsCount]="groupHeaderSlaveCellsCount">
|
|
20107
20044
|
</tr>
|
|
20108
|
-
<tr
|
|
20109
|
-
*ngIf="isDataItem(item) && (!$any(item).group || isDataItemInExpandedGroup($any(item)))"
|
|
20045
|
+
<tr *ngIf="item.showDataItem"
|
|
20110
20046
|
kendoGridLogicalRow
|
|
20111
20047
|
[dataRowIndex]="$any(item).index"
|
|
20112
20048
|
[dataItem]="item.data"
|
|
@@ -20119,7 +20055,7 @@ class TableBodyComponent {
|
|
|
20119
20055
|
[class.k-grid-row-sticky]="rowSticky ? rowSticky({ dataItem: item.data, index: $any(item).index }) : false"
|
|
20120
20056
|
[ngClass]="rowClass({ dataItem: item.data, index: $any(item).index })"
|
|
20121
20057
|
[class.k-master-row]="true"
|
|
20122
|
-
[class.k-expanded]="
|
|
20058
|
+
[class.k-expanded]="item.isExpanded"
|
|
20123
20059
|
[class.k-grid-edit-row]="isEditingRow($any(item).index)"
|
|
20124
20060
|
[attr.aria-selected]="lockedColumnsCount < 1 ? isSelectable({ dataItem: item.data, index: $any(item).index }) && isRowSelected(item) : undefined"
|
|
20125
20061
|
[attr.data-kendo-grid-item-index]="$any(item).index"
|
|
@@ -20148,7 +20084,7 @@ class TableBodyComponent {
|
|
|
20148
20084
|
</a>
|
|
20149
20085
|
</td>
|
|
20150
20086
|
<ng-container *ngFor="let column of columns; let columnIndex = index; trackBy: trackByColumns;">
|
|
20151
|
-
<td *ngIf="
|
|
20087
|
+
<td *ngIf="!item.cells?.[lockedColumnsCount + columnIndex]?.skip"
|
|
20152
20088
|
kendoGridCell
|
|
20153
20089
|
[rowIndex]="$any(item).index"
|
|
20154
20090
|
[columnIndex]="lockedColumnsCount + columnIndex"
|
|
@@ -20165,10 +20101,7 @@ class TableBodyComponent {
|
|
|
20165
20101
|
[dataItem]="item.data"
|
|
20166
20102
|
[colIndex]="columnIndex"
|
|
20167
20103
|
[colSpan]="column.colspan"
|
|
20168
|
-
[rowSpan]="
|
|
20169
|
-
index: rowIndex,
|
|
20170
|
-
dataItem: item
|
|
20171
|
-
}, column, lockedColumnsCount + columnIndex) : 1"
|
|
20104
|
+
[rowSpan]="item.cells[lockedColumnsCount + columnIndex]?.rowspan"
|
|
20172
20105
|
[attr.role]="column.tableCellsRole"
|
|
20173
20106
|
class="k-table-td"
|
|
20174
20107
|
[attr.aria-selected]="lockedColumnsCount < 1 && isSelectable({ dataItem: item.data, index: $any(item).index }) ? isAriaSelected(item, column) : undefined"
|
|
@@ -20178,24 +20111,18 @@ class TableBodyComponent {
|
|
|
20178
20111
|
[class.k-grid-edit-cell]="isEditingCell($any(item).index, column)"
|
|
20179
20112
|
[ngStyle]="column.sticky ? addStickyColumnStyles(column) : column.style"
|
|
20180
20113
|
[attr.colspan]="column.colspan"
|
|
20181
|
-
[class.k-selected]="isSelectable && cellSelectionService.isCellSelected(item, column)"
|
|
20182
|
-
>
|
|
20114
|
+
[class.k-selected]="isSelectable && cellSelectionService.isCellSelected(item, column)">
|
|
20183
20115
|
</td>
|
|
20184
20116
|
</ng-container>
|
|
20185
20117
|
</tr>
|
|
20186
|
-
<tr *ngIf="
|
|
20187
|
-
(!$any(item).group || isDataItemInExpandedGroup($any(item))) &&
|
|
20188
|
-
detailTemplate?.templateRef &&
|
|
20189
|
-
detailTemplate.showIf(item.data, $any(item).index) &&
|
|
20190
|
-
isExpanded(item)"
|
|
20118
|
+
<tr *ngIf="item.showDetailRow"
|
|
20191
20119
|
class="k-detail-row"
|
|
20192
20120
|
kendoGridLogicalRow
|
|
20193
20121
|
[dataRowIndex]="$any(item).index"
|
|
20194
20122
|
[dataItem]="item.data"
|
|
20195
20123
|
[logicalRowIndex]="logicalRowIndex(rowIndex) + 1"
|
|
20196
20124
|
[logicalSlaveRow]="false"
|
|
20197
|
-
[logicalCellsCount]="1"
|
|
20198
|
-
>
|
|
20125
|
+
[logicalCellsCount]="1">
|
|
20199
20126
|
<td class="k-group-cell k-table-td k-table-group-td" *ngFor="let g of groups"></td>
|
|
20200
20127
|
<td class="k-hierarchy-cell k-table-td"></td>
|
|
20201
20128
|
<td class="k-detail-cell k-table-td"
|
|
@@ -20207,8 +20134,7 @@ class TableBodyComponent {
|
|
|
20207
20134
|
[dataItem]="item.data"
|
|
20208
20135
|
[colIndex]="0"
|
|
20209
20136
|
[colSpan]="allColumnsSpan + 1"
|
|
20210
|
-
role="gridcell" aria-selected="false"
|
|
20211
|
-
>
|
|
20137
|
+
role="gridcell" aria-selected="false">
|
|
20212
20138
|
<ng-template
|
|
20213
20139
|
[ngTemplateOutlet]="detailTemplate.templateRef"
|
|
20214
20140
|
[ngTemplateOutletContext]="{
|
|
@@ -20219,10 +20145,7 @@ class TableBodyComponent {
|
|
|
20219
20145
|
</ng-template>
|
|
20220
20146
|
</td>
|
|
20221
20147
|
</tr>
|
|
20222
|
-
<tr *ngIf="
|
|
20223
|
-
$any(item).group &&
|
|
20224
|
-
(isFooterItemInExpandedGroup($any(item)) || (showGroupFooters && isParentGroupExpanded($any(item).group))) &&
|
|
20225
|
-
!$any(item.data).hideFooter"
|
|
20148
|
+
<tr *ngIf="item.type === 'footer'"
|
|
20226
20149
|
class="k-group-footer"
|
|
20227
20150
|
kendoGridLogicalRow
|
|
20228
20151
|
[logicalRowIndex]="logicalRowIndex(rowIndex)"
|
|
@@ -20238,8 +20161,7 @@ class TableBodyComponent {
|
|
|
20238
20161
|
kendoGridLogicalCell
|
|
20239
20162
|
[logicalRowIndex]="logicalRowIndex(rowIndex)"
|
|
20240
20163
|
[logicalColIndex]="0"
|
|
20241
|
-
aria-selected="false"
|
|
20242
|
-
>
|
|
20164
|
+
aria-selected="false">
|
|
20243
20165
|
</td>
|
|
20244
20166
|
<td kendoGridLogicalCell
|
|
20245
20167
|
[logicalRowIndex]="logicalRowIndex(rowIndex)"
|
|
@@ -20308,7 +20230,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
20308
20230
|
</td>
|
|
20309
20231
|
</tr>
|
|
20310
20232
|
</ng-container>
|
|
20311
|
-
<tr *ngIf="
|
|
20233
|
+
<tr *ngIf="!rowsToRender?.length" class="k-grid-norecords" role="row">
|
|
20312
20234
|
<td [attr.colspan]="colSpan" class="k-table-td">
|
|
20313
20235
|
<ng-template
|
|
20314
20236
|
*ngIf="noRecordsTemplate?.templateRef"
|
|
@@ -20321,8 +20243,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
20321
20243
|
</ng-container>
|
|
20322
20244
|
</td>
|
|
20323
20245
|
</tr>
|
|
20324
|
-
<ng-container *ngFor="let item of
|
|
20325
|
-
<tr *ngIf="
|
|
20246
|
+
<ng-container *ngFor="let item of rowsToRender; trackBy: trackByWrapper; let rowIndex = index;">
|
|
20247
|
+
<tr *ngIf="item.type === 'group'"
|
|
20326
20248
|
kendoGridGroupHeader
|
|
20327
20249
|
[columns]="columns"
|
|
20328
20250
|
[groups]="groups"
|
|
@@ -20340,8 +20262,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
20340
20262
|
[logicalCellsCount]="columns.length"
|
|
20341
20263
|
[logicalSlaveCellsCount]="groupHeaderSlaveCellsCount">
|
|
20342
20264
|
</tr>
|
|
20343
|
-
<tr
|
|
20344
|
-
*ngIf="isDataItem(item) && (!$any(item).group || isDataItemInExpandedGroup($any(item)))"
|
|
20265
|
+
<tr *ngIf="item.showDataItem"
|
|
20345
20266
|
kendoGridLogicalRow
|
|
20346
20267
|
[dataRowIndex]="$any(item).index"
|
|
20347
20268
|
[dataItem]="item.data"
|
|
@@ -20354,7 +20275,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
20354
20275
|
[class.k-grid-row-sticky]="rowSticky ? rowSticky({ dataItem: item.data, index: $any(item).index }) : false"
|
|
20355
20276
|
[ngClass]="rowClass({ dataItem: item.data, index: $any(item).index })"
|
|
20356
20277
|
[class.k-master-row]="true"
|
|
20357
|
-
[class.k-expanded]="
|
|
20278
|
+
[class.k-expanded]="item.isExpanded"
|
|
20358
20279
|
[class.k-grid-edit-row]="isEditingRow($any(item).index)"
|
|
20359
20280
|
[attr.aria-selected]="lockedColumnsCount < 1 ? isSelectable({ dataItem: item.data, index: $any(item).index }) && isRowSelected(item) : undefined"
|
|
20360
20281
|
[attr.data-kendo-grid-item-index]="$any(item).index"
|
|
@@ -20383,7 +20304,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
20383
20304
|
</a>
|
|
20384
20305
|
</td>
|
|
20385
20306
|
<ng-container *ngFor="let column of columns; let columnIndex = index; trackBy: trackByColumns;">
|
|
20386
|
-
<td *ngIf="
|
|
20307
|
+
<td *ngIf="!item.cells?.[lockedColumnsCount + columnIndex]?.skip"
|
|
20387
20308
|
kendoGridCell
|
|
20388
20309
|
[rowIndex]="$any(item).index"
|
|
20389
20310
|
[columnIndex]="lockedColumnsCount + columnIndex"
|
|
@@ -20400,10 +20321,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
20400
20321
|
[dataItem]="item.data"
|
|
20401
20322
|
[colIndex]="columnIndex"
|
|
20402
20323
|
[colSpan]="column.colspan"
|
|
20403
|
-
[rowSpan]="
|
|
20404
|
-
index: rowIndex,
|
|
20405
|
-
dataItem: item
|
|
20406
|
-
}, column, lockedColumnsCount + columnIndex) : 1"
|
|
20324
|
+
[rowSpan]="item.cells[lockedColumnsCount + columnIndex]?.rowspan"
|
|
20407
20325
|
[attr.role]="column.tableCellsRole"
|
|
20408
20326
|
class="k-table-td"
|
|
20409
20327
|
[attr.aria-selected]="lockedColumnsCount < 1 && isSelectable({ dataItem: item.data, index: $any(item).index }) ? isAriaSelected(item, column) : undefined"
|
|
@@ -20413,24 +20331,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
20413
20331
|
[class.k-grid-edit-cell]="isEditingCell($any(item).index, column)"
|
|
20414
20332
|
[ngStyle]="column.sticky ? addStickyColumnStyles(column) : column.style"
|
|
20415
20333
|
[attr.colspan]="column.colspan"
|
|
20416
|
-
[class.k-selected]="isSelectable && cellSelectionService.isCellSelected(item, column)"
|
|
20417
|
-
>
|
|
20334
|
+
[class.k-selected]="isSelectable && cellSelectionService.isCellSelected(item, column)">
|
|
20418
20335
|
</td>
|
|
20419
20336
|
</ng-container>
|
|
20420
20337
|
</tr>
|
|
20421
|
-
<tr *ngIf="
|
|
20422
|
-
(!$any(item).group || isDataItemInExpandedGroup($any(item))) &&
|
|
20423
|
-
detailTemplate?.templateRef &&
|
|
20424
|
-
detailTemplate.showIf(item.data, $any(item).index) &&
|
|
20425
|
-
isExpanded(item)"
|
|
20338
|
+
<tr *ngIf="item.showDetailRow"
|
|
20426
20339
|
class="k-detail-row"
|
|
20427
20340
|
kendoGridLogicalRow
|
|
20428
20341
|
[dataRowIndex]="$any(item).index"
|
|
20429
20342
|
[dataItem]="item.data"
|
|
20430
20343
|
[logicalRowIndex]="logicalRowIndex(rowIndex) + 1"
|
|
20431
20344
|
[logicalSlaveRow]="false"
|
|
20432
|
-
[logicalCellsCount]="1"
|
|
20433
|
-
>
|
|
20345
|
+
[logicalCellsCount]="1">
|
|
20434
20346
|
<td class="k-group-cell k-table-td k-table-group-td" *ngFor="let g of groups"></td>
|
|
20435
20347
|
<td class="k-hierarchy-cell k-table-td"></td>
|
|
20436
20348
|
<td class="k-detail-cell k-table-td"
|
|
@@ -20442,8 +20354,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
20442
20354
|
[dataItem]="item.data"
|
|
20443
20355
|
[colIndex]="0"
|
|
20444
20356
|
[colSpan]="allColumnsSpan + 1"
|
|
20445
|
-
role="gridcell" aria-selected="false"
|
|
20446
|
-
>
|
|
20357
|
+
role="gridcell" aria-selected="false">
|
|
20447
20358
|
<ng-template
|
|
20448
20359
|
[ngTemplateOutlet]="detailTemplate.templateRef"
|
|
20449
20360
|
[ngTemplateOutletContext]="{
|
|
@@ -20454,10 +20365,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
20454
20365
|
</ng-template>
|
|
20455
20366
|
</td>
|
|
20456
20367
|
</tr>
|
|
20457
|
-
<tr *ngIf="
|
|
20458
|
-
$any(item).group &&
|
|
20459
|
-
(isFooterItemInExpandedGroup($any(item)) || (showGroupFooters && isParentGroupExpanded($any(item).group))) &&
|
|
20460
|
-
!$any(item.data).hideFooter"
|
|
20368
|
+
<tr *ngIf="item.type === 'footer'"
|
|
20461
20369
|
class="k-group-footer"
|
|
20462
20370
|
kendoGridLogicalRow
|
|
20463
20371
|
[logicalRowIndex]="logicalRowIndex(rowIndex)"
|
|
@@ -20473,8 +20381,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
20473
20381
|
kendoGridLogicalCell
|
|
20474
20382
|
[logicalRowIndex]="logicalRowIndex(rowIndex)"
|
|
20475
20383
|
[logicalColIndex]="0"
|
|
20476
|
-
aria-selected="false"
|
|
20477
|
-
>
|
|
20384
|
+
aria-selected="false">
|
|
20478
20385
|
</td>
|
|
20479
20386
|
<td kendoGridLogicalCell
|
|
20480
20387
|
[logicalRowIndex]="logicalRowIndex(rowIndex)"
|
|
@@ -20503,7 +20410,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
20503
20410
|
GroupHeaderComponent, IconWrapperComponent, NgTemplateOutlet, ResizeSensorComponent
|
|
20504
20411
|
]
|
|
20505
20412
|
}]
|
|
20506
|
-
}], ctorParameters: function () { return [{ type: DetailsService }, { type: GroupsService }, { type: ChangeNotificationService }, { type: EditService }, { type: ContextService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: DomEventsService }, { type: SelectionService }, { type: CellSelectionService }, { type: ColumnInfoService }, { type: NavigationService }
|
|
20413
|
+
}], ctorParameters: function () { return [{ type: DetailsService }, { type: GroupsService }, { type: ChangeNotificationService }, { type: EditService }, { type: ContextService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: DomEventsService }, { type: SelectionService }, { type: CellSelectionService }, { type: ColumnInfoService }, { type: NavigationService }]; }, propDecorators: { columns: [{
|
|
20507
20414
|
type: Input
|
|
20508
20415
|
}], allColumns: [{
|
|
20509
20416
|
type: Input
|
|
@@ -20513,7 +20420,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
20513
20420
|
type: Input
|
|
20514
20421
|
}], noRecordsTemplate: [{
|
|
20515
20422
|
type: Input
|
|
20516
|
-
}],
|
|
20423
|
+
}], rowsToRender: [{
|
|
20517
20424
|
type: Input
|
|
20518
20425
|
}], skip: [{
|
|
20519
20426
|
type: Input
|
|
@@ -20533,8 +20440,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
20533
20440
|
type: Input
|
|
20534
20441
|
}], skipGroupDecoration: [{
|
|
20535
20442
|
type: Input
|
|
20536
|
-
}], showGroupFooters: [{
|
|
20537
|
-
type: Input
|
|
20538
20443
|
}], lockedColumnsCount: [{
|
|
20539
20444
|
type: Input
|
|
20540
20445
|
}], totalColumnsCount: [{
|
|
@@ -21289,8 +21194,8 @@ const packageMetadata = {
|
|
|
21289
21194
|
productName: 'Kendo UI for Angular',
|
|
21290
21195
|
productCode: 'KENDOUIANGULAR',
|
|
21291
21196
|
productCodes: ['KENDOUIANGULAR'],
|
|
21292
|
-
publishDate:
|
|
21293
|
-
version: '19.
|
|
21197
|
+
publishDate: 1750784754,
|
|
21198
|
+
version: '19.2.0-develop.1',
|
|
21294
21199
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
21295
21200
|
};
|
|
21296
21201
|
|
|
@@ -23323,6 +23228,141 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
23323
23228
|
args: ['style.min-width']
|
|
23324
23229
|
}] } });
|
|
23325
23230
|
|
|
23231
|
+
/**
|
|
23232
|
+
* @hidden
|
|
23233
|
+
*/
|
|
23234
|
+
class RowspanService {
|
|
23235
|
+
skipCells = [];
|
|
23236
|
+
addCells(rowIndex, colIndex, rowspan) {
|
|
23237
|
+
for (let i = 1; i < rowspan; i++) {
|
|
23238
|
+
if (!this.skipCells.some(this.cellExists(rowIndex + i, colIndex))) {
|
|
23239
|
+
this.skipCells.push({ rowIndex: rowIndex + i, colIndex });
|
|
23240
|
+
}
|
|
23241
|
+
}
|
|
23242
|
+
}
|
|
23243
|
+
reset() {
|
|
23244
|
+
this.skipCells = [];
|
|
23245
|
+
}
|
|
23246
|
+
shouldSkip(rowIndex, colIndex) {
|
|
23247
|
+
return !!this.skipCells.find(this.cellExists(rowIndex, colIndex));
|
|
23248
|
+
}
|
|
23249
|
+
cellExists = (rowIndex, colIndex) => cell => cell.rowIndex === rowIndex && cell.colIndex === colIndex;
|
|
23250
|
+
}
|
|
23251
|
+
|
|
23252
|
+
/**
|
|
23253
|
+
* @hidden
|
|
23254
|
+
*/
|
|
23255
|
+
class DataMappingService {
|
|
23256
|
+
rowspanService;
|
|
23257
|
+
groupsService;
|
|
23258
|
+
detailsService;
|
|
23259
|
+
recalculateRowspan = true;
|
|
23260
|
+
dataArray = null;
|
|
23261
|
+
constructor(rowspanService, groupsService, detailsService) {
|
|
23262
|
+
this.rowspanService = rowspanService;
|
|
23263
|
+
this.groupsService = groupsService;
|
|
23264
|
+
this.detailsService = detailsService;
|
|
23265
|
+
}
|
|
23266
|
+
isGroup(item) {
|
|
23267
|
+
return item.type === 'group';
|
|
23268
|
+
}
|
|
23269
|
+
/**
|
|
23270
|
+
* Maps the data to the Grid row items, applying rowspan and detail row logic.
|
|
23271
|
+
*/
|
|
23272
|
+
dataMapper(data, nonLockedColumnsToRender, lockedLeafColumns, detailTemplate, showFooter) {
|
|
23273
|
+
const result = [];
|
|
23274
|
+
if (!data || !nonLockedColumnsToRender && !lockedLeafColumns) {
|
|
23275
|
+
return [];
|
|
23276
|
+
}
|
|
23277
|
+
let dataIndex = 0;
|
|
23278
|
+
for (const item of data) {
|
|
23279
|
+
if (this.shouldRenderItem(item, detailTemplate, showFooter)) {
|
|
23280
|
+
if (item.type === 'data') {
|
|
23281
|
+
item.cells = [];
|
|
23282
|
+
for (let i = 0; i < (lockedLeafColumns.length + nonLockedColumnsToRender.length); i++) {
|
|
23283
|
+
const column = i < lockedLeafColumns.length ? lockedLeafColumns.get(i) : nonLockedColumnsToRender.get(i - lockedLeafColumns.length);
|
|
23284
|
+
const cell = {};
|
|
23285
|
+
if (column.cellRowspan && this.shouldSkipCell(dataIndex, i)) {
|
|
23286
|
+
cell.skip = true;
|
|
23287
|
+
}
|
|
23288
|
+
else {
|
|
23289
|
+
cell.rowspan = column.cellRowspan ? this.getRowspan({
|
|
23290
|
+
index: dataIndex,
|
|
23291
|
+
dataItem: item
|
|
23292
|
+
}, column, i, data) : 1;
|
|
23293
|
+
}
|
|
23294
|
+
item.cells.push(cell);
|
|
23295
|
+
}
|
|
23296
|
+
}
|
|
23297
|
+
result.push(item);
|
|
23298
|
+
}
|
|
23299
|
+
dataIndex++;
|
|
23300
|
+
}
|
|
23301
|
+
this.recalculateRowspan = true;
|
|
23302
|
+
this.rowspanService.reset();
|
|
23303
|
+
return result;
|
|
23304
|
+
}
|
|
23305
|
+
isDataItem(item) {
|
|
23306
|
+
return !this.isGroup(item) && !this.isFooter(item);
|
|
23307
|
+
}
|
|
23308
|
+
isFooter(item) {
|
|
23309
|
+
return item.type === 'footer';
|
|
23310
|
+
}
|
|
23311
|
+
isFooterItemInExpandedGroup(item) {
|
|
23312
|
+
const footerItem = { data: item.data, index: item.groupIndex, parentGroup: item.group.parentGroup };
|
|
23313
|
+
return this.isInExpandedGroup(footerItem);
|
|
23314
|
+
}
|
|
23315
|
+
isDataItemInExpandedGroup(item) {
|
|
23316
|
+
const dataItem = { data: item.group.data, index: item.groupIndex, parentGroup: item.group.parentGroup };
|
|
23317
|
+
return this.isInExpandedGroup(dataItem);
|
|
23318
|
+
}
|
|
23319
|
+
isInExpandedGroup(item) {
|
|
23320
|
+
return this.groupsService.isInExpandedGroup(item);
|
|
23321
|
+
}
|
|
23322
|
+
isParentGroupExpanded(item) {
|
|
23323
|
+
return this.groupsService.isInExpandedGroup(item.parentGroup);
|
|
23324
|
+
}
|
|
23325
|
+
isExpanded(viewItem) {
|
|
23326
|
+
return this.detailsService.isExpanded(viewItem.index, viewItem.data);
|
|
23327
|
+
}
|
|
23328
|
+
shouldRenderItem(item, detailTemplate, showFooter) {
|
|
23329
|
+
const renderGroupHeader = this.isGroup(item) && this.isParentGroupExpanded(item);
|
|
23330
|
+
const renderDataItem = this.isDataItem(item) && (!item.group || this.isDataItemInExpandedGroup(item));
|
|
23331
|
+
const renderDetailTemplate = renderDataItem && detailTemplate?.templateRef && detailTemplate.showIf(item.data, item.index) && this.isExpanded(item);
|
|
23332
|
+
const isVisibleFooter = this.isFooter(item) && item.group && (this.isFooterItemInExpandedGroup(item) || (showFooter && this.isParentGroupExpanded(item.group)));
|
|
23333
|
+
const renderFooter = isVisibleFooter && !item.data.hideFooter;
|
|
23334
|
+
item.showDataItem = renderDataItem;
|
|
23335
|
+
item.showDetailRow = renderDataItem && renderDetailTemplate;
|
|
23336
|
+
item.isExpanded = this.isExpanded(item);
|
|
23337
|
+
return renderGroupHeader || renderDataItem || renderDetailTemplate || renderFooter;
|
|
23338
|
+
}
|
|
23339
|
+
shouldSkipCell(rowIndex, colIndex) {
|
|
23340
|
+
return this.rowspanService.shouldSkip(rowIndex, colIndex);
|
|
23341
|
+
}
|
|
23342
|
+
cachedDataArray(data) {
|
|
23343
|
+
if (!this.dataArray) {
|
|
23344
|
+
this.dataArray = data.map(item => item);
|
|
23345
|
+
}
|
|
23346
|
+
return this.dataArray;
|
|
23347
|
+
}
|
|
23348
|
+
getRowspan(row, column, colIndex, data) {
|
|
23349
|
+
if (this.recalculateRowspan) {
|
|
23350
|
+
this.dataArray = null;
|
|
23351
|
+
this.recalculateRowspan = false;
|
|
23352
|
+
}
|
|
23353
|
+
const rowspan = column.cellRowspan(row, column, this.cachedDataArray(data));
|
|
23354
|
+
if (rowspan > 1) {
|
|
23355
|
+
this.rowspanService.addCells(row.index, colIndex, rowspan);
|
|
23356
|
+
}
|
|
23357
|
+
return rowspan;
|
|
23358
|
+
}
|
|
23359
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DataMappingService, deps: [{ token: RowspanService }, { token: GroupsService }, { token: DetailsService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
23360
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DataMappingService });
|
|
23361
|
+
}
|
|
23362
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DataMappingService, decorators: [{
|
|
23363
|
+
type: Injectable
|
|
23364
|
+
}], ctorParameters: function () { return [{ type: RowspanService }, { type: GroupsService }, { type: DetailsService }]; } });
|
|
23365
|
+
|
|
23326
23366
|
const elementAt = (index, elements, elementOffset) => {
|
|
23327
23367
|
for (let idx = 0, elementIdx = 0; idx < elements.length; idx++) {
|
|
23328
23368
|
const offset = elementOffset(elements[idx]);
|
|
@@ -23387,14 +23427,13 @@ class ListComponent {
|
|
|
23387
23427
|
changeDetector;
|
|
23388
23428
|
pdfService;
|
|
23389
23429
|
columnInfo;
|
|
23390
|
-
|
|
23430
|
+
dataMappingService;
|
|
23391
23431
|
hostClass = true;
|
|
23392
23432
|
hostRole = 'presentation';
|
|
23393
23433
|
data;
|
|
23394
23434
|
groups = [];
|
|
23395
23435
|
total;
|
|
23396
23436
|
rowHeight;
|
|
23397
|
-
stickyRowHeight;
|
|
23398
23437
|
detailRowHeight;
|
|
23399
23438
|
take;
|
|
23400
23439
|
skip = 0;
|
|
@@ -23419,6 +23458,7 @@ class ListComponent {
|
|
|
23419
23458
|
scrollBottom = new EventEmitter();
|
|
23420
23459
|
totalHeight;
|
|
23421
23460
|
columnsStartIdx = 0;
|
|
23461
|
+
allItems = [];
|
|
23422
23462
|
get showFooter() {
|
|
23423
23463
|
return this.groupable && this.groupable.showFooter;
|
|
23424
23464
|
}
|
|
@@ -23444,6 +23484,7 @@ class ListComponent {
|
|
|
23444
23484
|
columnsEndIdx;
|
|
23445
23485
|
viewportColumnsWidth;
|
|
23446
23486
|
scrollLeft = 0;
|
|
23487
|
+
recalculateRowspan = true;
|
|
23447
23488
|
observer;
|
|
23448
23489
|
get lockedLeafColumns() {
|
|
23449
23490
|
return this.columns.lockedLeafColumns;
|
|
@@ -23476,7 +23517,8 @@ class ListComponent {
|
|
|
23476
23517
|
rtl = false;
|
|
23477
23518
|
columnUpdateFrame;
|
|
23478
23519
|
hasLockedContainer;
|
|
23479
|
-
|
|
23520
|
+
minRowHeight;
|
|
23521
|
+
constructor(scrollerFactory, detailsService, changeNotification, suspendService, groupsService, ngZone, renderer, scrollSyncService, resizeService, editService, supportService, navigationService, scrollRequestService, ctx, columnResizingService, changeDetector, pdfService, columnInfo, dataMappingService) {
|
|
23480
23522
|
this.changeNotification = changeNotification;
|
|
23481
23523
|
this.suspendService = suspendService;
|
|
23482
23524
|
this.groupsService = groupsService;
|
|
@@ -23492,12 +23534,13 @@ class ListComponent {
|
|
|
23492
23534
|
this.changeDetector = changeDetector;
|
|
23493
23535
|
this.pdfService = pdfService;
|
|
23494
23536
|
this.columnInfo = columnInfo;
|
|
23495
|
-
this.
|
|
23537
|
+
this.dataMappingService = dataMappingService;
|
|
23496
23538
|
this.scroller = scrollerFactory(this.dispatcher);
|
|
23497
23539
|
this.subscriptions = detailsService.changes.subscribe(x => this.detailExpand(x));
|
|
23498
23540
|
this.subscriptions.add(scrollRequestService.requests.subscribe(req => isPresent(req.adjustIndex) ? this.scrollTo(req.request, req.adjustIndex) : this.scrollToItem(req.request)));
|
|
23499
23541
|
}
|
|
23500
23542
|
ngOnInit() {
|
|
23543
|
+
this.minRowHeight = this.isVirtual ? this.rowHeight || calcRowHeight(this.table.nativeElement) : this.rowHeight;
|
|
23501
23544
|
this.init();
|
|
23502
23545
|
this.subscriptions.add(this.ngZone.runOutsideAngular(this.handleRowSync.bind(this)));
|
|
23503
23546
|
this.subscriptions.add(this.ngZone.runOutsideAngular(this.handleRowNavigationLocked.bind(this)));
|
|
@@ -23533,6 +23576,21 @@ class ListComponent {
|
|
|
23533
23576
|
if (this.virtualColumns && (!this.viewportColumns || this.viewportWidthChange())) {
|
|
23534
23577
|
this.updateViewportColumns();
|
|
23535
23578
|
}
|
|
23579
|
+
if (this.isVirtual && this.ctx.grid && !this.ctx.grid.pageSize) {
|
|
23580
|
+
const calculatedPageSize = this.calcVirtualPageSize();
|
|
23581
|
+
if (calculatedPageSize > 0) {
|
|
23582
|
+
this.ngZone.onMicrotaskEmpty.pipe(take(1)).subscribe(() => {
|
|
23583
|
+
this.ctx.grid.pageSize = calculatedPageSize;
|
|
23584
|
+
this.ngZone.run(() => {
|
|
23585
|
+
this.pageChange.emit({
|
|
23586
|
+
skip: this.skip || 0,
|
|
23587
|
+
take: calculatedPageSize
|
|
23588
|
+
});
|
|
23589
|
+
});
|
|
23590
|
+
});
|
|
23591
|
+
}
|
|
23592
|
+
}
|
|
23593
|
+
this.allItems = this.dataMappingService.dataMapper(this.data, this.nonLockedColumnsToRender, this.lockedLeafColumns, this.detailTemplate, this.showFooter);
|
|
23536
23594
|
}
|
|
23537
23595
|
ngAfterViewInit() {
|
|
23538
23596
|
if (!isDocumentAvailable()) {
|
|
@@ -23571,7 +23629,7 @@ class ListComponent {
|
|
|
23571
23629
|
if (this.suspendService.scroll) {
|
|
23572
23630
|
return;
|
|
23573
23631
|
}
|
|
23574
|
-
this.rowHeightService = new RowHeightService(this.total, this.rowHeight, this.detailRowHeight);
|
|
23632
|
+
this.rowHeightService = new RowHeightService(this.total, this.rowHeight || this.minRowHeight, this.detailRowHeight);
|
|
23575
23633
|
this.totalHeight = this.rowHeightService.totalHeight();
|
|
23576
23634
|
if (!isUniversal()) {
|
|
23577
23635
|
this.ngZone.runOutsideAngular(this.createScroller.bind(this));
|
|
@@ -23640,10 +23698,10 @@ class ListComponent {
|
|
|
23640
23698
|
const observable = this.scroller
|
|
23641
23699
|
.create(this.rowHeightService, this.skip, this.take, this.total);
|
|
23642
23700
|
this.skipScroll = false;
|
|
23643
|
-
this.scrollerSubscription = observable.pipe(filter((x) => x instanceof PageAction), filter(() => {
|
|
23701
|
+
this.scrollerSubscription = observable.pipe(filter((x) => x instanceof PageAction), filter((x) => {
|
|
23644
23702
|
const temp = this.skipScroll;
|
|
23645
23703
|
this.skipScroll = false;
|
|
23646
|
-
return !temp;
|
|
23704
|
+
return !temp && x.skip !== this.skip;
|
|
23647
23705
|
}), tap(() => this.rebind = true))
|
|
23648
23706
|
.subscribe((x) => this.ngZone.run(() => this.pageChange.emit(x)));
|
|
23649
23707
|
this.scrollerSubscription.add(observable.pipe(filter((x) => x instanceof ScrollAction))
|
|
@@ -23682,7 +23740,6 @@ class ListComponent {
|
|
|
23682
23740
|
.pipe(filter(isLocked), switchMapTo(onStable())), this.editService.changed, this.resizeService.changes, this.columnResizingService.changes
|
|
23683
23741
|
.pipe(filter(change => change.type === 'end')), this.supportService.changes)
|
|
23684
23742
|
.pipe(tap(() => {
|
|
23685
|
-
this.ngZone.run(() => this.rowspanService.reset());
|
|
23686
23743
|
this.resetNavigationViewport();
|
|
23687
23744
|
}), filter(isLocked))
|
|
23688
23745
|
.subscribe(() => {
|
|
@@ -23927,8 +23984,15 @@ class ListComponent {
|
|
|
23927
23984
|
}
|
|
23928
23985
|
return element.offsetLeft;
|
|
23929
23986
|
}
|
|
23930
|
-
|
|
23931
|
-
|
|
23987
|
+
calcVirtualPageSize = () => {
|
|
23988
|
+
const containerHeight = this.container.nativeElement.offsetHeight;
|
|
23989
|
+
if (containerHeight && (this.rowHeight ?? this.minRowHeight)) {
|
|
23990
|
+
return Math.ceil((containerHeight / (this.rowHeight ?? this.minRowHeight)) * 1.5);
|
|
23991
|
+
}
|
|
23992
|
+
return 0;
|
|
23993
|
+
};
|
|
23994
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ListComponent, deps: [{ token: SCROLLER_FACTORY_TOKEN }, { token: DetailsService }, { token: ChangeNotificationService }, { token: SuspendService }, { token: GroupsService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: ScrollSyncService }, { token: ResizeService }, { token: EditService }, { token: BrowserSupportService }, { token: NavigationService }, { token: ScrollRequestService }, { token: ContextService }, { token: ColumnResizingService }, { token: i0.ChangeDetectorRef }, { token: PDFService }, { token: ColumnInfoService }, { token: DataMappingService }], target: i0.ɵɵFactoryTarget.Component });
|
|
23995
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ListComponent, isStandalone: true, selector: "kendo-grid-list", inputs: { data: "data", groups: "groups", total: "total", rowHeight: "rowHeight", detailRowHeight: "detailRowHeight", take: "take", skip: "skip", columns: "columns", detailTemplate: "detailTemplate", noRecordsTemplate: "noRecordsTemplate", selectable: "selectable", groupable: "groupable", filterable: "filterable", rowClass: "rowClass", rowSticky: "rowSticky", loading: "loading", trackBy: "trackBy", virtualColumns: "virtualColumns", isVirtual: "isVirtual", cellLoadingTemplate: "cellLoadingTemplate", loadingTemplate: "loadingTemplate", sort: "sort", size: "size" }, outputs: { contentScroll: "contentScroll", pageChange: "pageChange", scrollBottom: "scrollBottom" }, host: { properties: { "class.k-grid-container": "this.hostClass", "attr.role": "this.hostRole" } }, providers: [
|
|
23932
23996
|
{
|
|
23933
23997
|
provide: SCROLLER_FACTORY_TOKEN,
|
|
23934
23998
|
useValue: DEFAULT_SCROLLER_FACTORY
|
|
@@ -23964,13 +24028,12 @@ class ListComponent {
|
|
|
23964
24028
|
role="presentation"
|
|
23965
24029
|
[groups]="groups"
|
|
23966
24030
|
[isLocked]="true"
|
|
23967
|
-
[
|
|
24031
|
+
[rowsToRender]="allItems"
|
|
23968
24032
|
[noRecordsText]="''"
|
|
23969
24033
|
[columns]="$any(lockedLeafColumns)"
|
|
23970
24034
|
[totalColumnsCount]="leafColumns.length"
|
|
23971
24035
|
[totalColumns]="columns"
|
|
23972
24036
|
[detailTemplate]="detailTemplate"
|
|
23973
|
-
[showGroupFooters]="showFooter"
|
|
23974
24037
|
[skip]="skip"
|
|
23975
24038
|
[selectable]="selectable"
|
|
23976
24039
|
[trackBy]="trackBy"
|
|
@@ -24012,9 +24075,8 @@ class ListComponent {
|
|
|
24012
24075
|
<tbody kendoGridTableBody
|
|
24013
24076
|
role="rowgroup"
|
|
24014
24077
|
[skipGroupDecoration]="isLocked"
|
|
24015
|
-
[
|
|
24078
|
+
[rowsToRender]="allItems"
|
|
24016
24079
|
[groups]="groups"
|
|
24017
|
-
[showGroupFooters]="showFooter"
|
|
24018
24080
|
[columns]="$any(nonLockedColumnsToRender)"
|
|
24019
24081
|
[allColumns]="$any(nonLockedLeafColumns)"
|
|
24020
24082
|
[detailTemplate]="detailTemplate"
|
|
@@ -24044,7 +24106,7 @@ class ListComponent {
|
|
|
24044
24106
|
<div [style.width.px]="totalWidth"></div>
|
|
24045
24107
|
</div>
|
|
24046
24108
|
</div>
|
|
24047
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { kind: "directive", type: TableDirective, selector: "[kendoGridResizableTable]", inputs: ["locked", "virtualColumns"] }, { kind: "directive", type: GridTableDirective, selector: "[kendoGridTable]", inputs: ["size"] }, { kind: "component", type: ColGroupComponent, selector: "[kendoGridColGroup]", inputs: ["columns", "groups", "detailTemplate", "sort"] }, { kind: "component", type: TableBodyComponent, selector: "[kendoGridTableBody]", inputs: ["columns", "allColumns", "groups", "detailTemplate", "noRecordsTemplate", "
|
|
24109
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { kind: "directive", type: TableDirective, selector: "[kendoGridResizableTable]", inputs: ["locked", "virtualColumns"] }, { kind: "directive", type: GridTableDirective, selector: "[kendoGridTable]", inputs: ["size"] }, { kind: "component", type: ColGroupComponent, selector: "[kendoGridColGroup]", inputs: ["columns", "groups", "detailTemplate", "sort"] }, { kind: "component", type: TableBodyComponent, selector: "[kendoGridTableBody]", inputs: ["columns", "allColumns", "groups", "detailTemplate", "noRecordsTemplate", "rowsToRender", "skip", "selectable", "filterable", "noRecordsText", "isLocked", "isLoading", "isVirtual", "cellLoadingTemplate", "skipGroupDecoration", "lockedColumnsCount", "totalColumnsCount", "virtualColumns", "trackBy", "rowSticky", "totalColumns", "rowClass"] }, { kind: "component", type: ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { kind: "directive", type: ResizableContainerDirective, selector: "[kendoGridResizableContainer]", inputs: ["lockedWidth", "kendoGridResizableContainer"] }] });
|
|
24048
24110
|
}
|
|
24049
24111
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ListComponent, decorators: [{
|
|
24050
24112
|
type: Component,
|
|
@@ -24087,13 +24149,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
24087
24149
|
role="presentation"
|
|
24088
24150
|
[groups]="groups"
|
|
24089
24151
|
[isLocked]="true"
|
|
24090
|
-
[
|
|
24152
|
+
[rowsToRender]="allItems"
|
|
24091
24153
|
[noRecordsText]="''"
|
|
24092
24154
|
[columns]="$any(lockedLeafColumns)"
|
|
24093
24155
|
[totalColumnsCount]="leafColumns.length"
|
|
24094
24156
|
[totalColumns]="columns"
|
|
24095
24157
|
[detailTemplate]="detailTemplate"
|
|
24096
|
-
[showGroupFooters]="showFooter"
|
|
24097
24158
|
[skip]="skip"
|
|
24098
24159
|
[selectable]="selectable"
|
|
24099
24160
|
[trackBy]="trackBy"
|
|
@@ -24135,9 +24196,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
24135
24196
|
<tbody kendoGridTableBody
|
|
24136
24197
|
role="rowgroup"
|
|
24137
24198
|
[skipGroupDecoration]="isLocked"
|
|
24138
|
-
[
|
|
24199
|
+
[rowsToRender]="allItems"
|
|
24139
24200
|
[groups]="groups"
|
|
24140
|
-
[showGroupFooters]="showFooter"
|
|
24141
24201
|
[columns]="$any(nonLockedColumnsToRender)"
|
|
24142
24202
|
[allColumns]="$any(nonLockedLeafColumns)"
|
|
24143
24203
|
[detailTemplate]="detailTemplate"
|
|
@@ -24174,7 +24234,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
24174
24234
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
24175
24235
|
type: Inject,
|
|
24176
24236
|
args: [SCROLLER_FACTORY_TOKEN]
|
|
24177
|
-
}] }, { type: DetailsService }, { type: ChangeNotificationService }, { type: SuspendService }, { type: GroupsService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: ScrollSyncService }, { type: ResizeService }, { type: EditService }, { type: BrowserSupportService }, { type: NavigationService }, { type: ScrollRequestService }, { type: ContextService }, { type: ColumnResizingService }, { type: i0.ChangeDetectorRef }, { type: PDFService }, { type: ColumnInfoService }, { type:
|
|
24237
|
+
}] }, { type: DetailsService }, { type: ChangeNotificationService }, { type: SuspendService }, { type: GroupsService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: ScrollSyncService }, { type: ResizeService }, { type: EditService }, { type: BrowserSupportService }, { type: NavigationService }, { type: ScrollRequestService }, { type: ContextService }, { type: ColumnResizingService }, { type: i0.ChangeDetectorRef }, { type: PDFService }, { type: ColumnInfoService }, { type: DataMappingService }]; }, propDecorators: { hostClass: [{
|
|
24178
24238
|
type: HostBinding,
|
|
24179
24239
|
args: ['class.k-grid-container']
|
|
24180
24240
|
}], hostRole: [{
|
|
@@ -24188,8 +24248,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
24188
24248
|
type: Input
|
|
24189
24249
|
}], rowHeight: [{
|
|
24190
24250
|
type: Input
|
|
24191
|
-
}], stickyRowHeight: [{
|
|
24192
|
-
type: Input
|
|
24193
24251
|
}], detailRowHeight: [{
|
|
24194
24252
|
type: Input
|
|
24195
24253
|
}], take: [{
|
|
@@ -24239,10 +24297,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
24239
24297
|
args: ['container', { static: true }]
|
|
24240
24298
|
}], lockedContainer: [{
|
|
24241
24299
|
type: ViewChild,
|
|
24242
|
-
args: ['lockedContainer'
|
|
24300
|
+
args: ['lockedContainer']
|
|
24243
24301
|
}], lockedTable: [{
|
|
24244
24302
|
type: ViewChild,
|
|
24245
|
-
args: ['lockedTable'
|
|
24303
|
+
args: ['lockedTable']
|
|
24246
24304
|
}], table: [{
|
|
24247
24305
|
type: ViewChild,
|
|
24248
24306
|
args: ['table', { static: true }]
|
|
@@ -27644,9 +27702,9 @@ class GridComponent {
|
|
|
27644
27702
|
localization;
|
|
27645
27703
|
ctx;
|
|
27646
27704
|
sizingService;
|
|
27647
|
-
adaptiveService;
|
|
27648
27705
|
adaptiveGridService;
|
|
27649
27706
|
rowReorderService;
|
|
27707
|
+
dataMappingService;
|
|
27650
27708
|
/**
|
|
27651
27709
|
* Sets the data of the Grid. If you provide an array, the Grid gets the total count automatically.
|
|
27652
27710
|
* ([more information and example]({% slug binding_grid %})).
|
|
@@ -28557,6 +28615,7 @@ class GridComponent {
|
|
|
28557
28615
|
*/
|
|
28558
28616
|
blockArrowSelection = false;
|
|
28559
28617
|
undoRedoService;
|
|
28618
|
+
rowsToRender;
|
|
28560
28619
|
selectionSubscription;
|
|
28561
28620
|
stateChangeSubscription;
|
|
28562
28621
|
groupExpandCollapseSubscription;
|
|
@@ -28582,7 +28641,7 @@ class GridComponent {
|
|
|
28582
28641
|
rowReorderSubscription;
|
|
28583
28642
|
rtl = false;
|
|
28584
28643
|
_rowSticky;
|
|
28585
|
-
constructor(supportService, selectionService, cellSelectionService, wrapper, groupInfoService, groupsService, changeNotification, detailsService, editService, filterService, pdfService, responsiveService, renderer, excelService, ngZone, scrollSyncService, domEvents, columnResizingService, changeDetectorRef, columnReorderService, columnInfoService, navigationService, sortService, scrollRequestService, localization, ctx, sizingService,
|
|
28644
|
+
constructor(supportService, selectionService, cellSelectionService, wrapper, groupInfoService, groupsService, changeNotification, detailsService, editService, filterService, pdfService, responsiveService, renderer, excelService, ngZone, scrollSyncService, domEvents, columnResizingService, changeDetectorRef, columnReorderService, columnInfoService, navigationService, sortService, scrollRequestService, localization, ctx, sizingService, adaptiveGridService, rowReorderService, dataMappingService) {
|
|
28586
28645
|
this.supportService = supportService;
|
|
28587
28646
|
this.selectionService = selectionService;
|
|
28588
28647
|
this.cellSelectionService = cellSelectionService;
|
|
@@ -28610,9 +28669,9 @@ class GridComponent {
|
|
|
28610
28669
|
this.localization = localization;
|
|
28611
28670
|
this.ctx = ctx;
|
|
28612
28671
|
this.sizingService = sizingService;
|
|
28613
|
-
this.adaptiveService = adaptiveService;
|
|
28614
28672
|
this.adaptiveGridService = adaptiveGridService;
|
|
28615
28673
|
this.rowReorderService = rowReorderService;
|
|
28674
|
+
this.dataMappingService = dataMappingService;
|
|
28616
28675
|
const isValid = validatePackage(packageMetadata);
|
|
28617
28676
|
this.showLicenseWatermark = shouldShowValidationUI(isValid);
|
|
28618
28677
|
this.ctx.grid = this;
|
|
@@ -28719,6 +28778,11 @@ class GridComponent {
|
|
|
28719
28778
|
this.initSelectionService();
|
|
28720
28779
|
this.updateNavigationMetadata();
|
|
28721
28780
|
}
|
|
28781
|
+
ngDoCheck() {
|
|
28782
|
+
if (!this.isScrollable) {
|
|
28783
|
+
this.rowsToRender = this.dataMappingService.dataMapper(this.view, this.nonLockedLeafColumns, this.lockedLeafColumns, this.detailTemplate, this.showGroupFooters);
|
|
28784
|
+
}
|
|
28785
|
+
}
|
|
28722
28786
|
ngOnChanges(changes) {
|
|
28723
28787
|
if (isChanged$1("data", changes)) {
|
|
28724
28788
|
this.onDataChange();
|
|
@@ -29414,10 +29478,7 @@ class GridComponent {
|
|
|
29414
29478
|
if (this.columnList.filter(x => x.locked && x.parent && !x.parent.isLocked).length) {
|
|
29415
29479
|
throw new Error(ColumnConfigurationErrorMessages.lockedParent);
|
|
29416
29480
|
}
|
|
29417
|
-
if (
|
|
29418
|
-
console.warn(GridConfigurationErrorMessages.rowHeightVirtual);
|
|
29419
|
-
}
|
|
29420
|
-
if (!this.rowHeight && this.isVirtual) {
|
|
29481
|
+
if (this.detailRowHeight && !this.isVirtual) {
|
|
29421
29482
|
console.warn(GridConfigurationErrorMessages.rowHeightVirtual);
|
|
29422
29483
|
}
|
|
29423
29484
|
if (!this.detailRowHeight && this.isVirtual && this.detailTemplate) {
|
|
@@ -29464,9 +29525,6 @@ class GridComponent {
|
|
|
29464
29525
|
}
|
|
29465
29526
|
this.dataStateChange.emit(x);
|
|
29466
29527
|
hasObservers(this.gridStateChange) && this.gridStateChange.emit({ ...this.currentState, ...x });
|
|
29467
|
-
if (this.undoRedoService) {
|
|
29468
|
-
this.undoRedoService.originalEvent = x;
|
|
29469
|
-
}
|
|
29470
29528
|
});
|
|
29471
29529
|
this.stateChangeSubscription.add(merge(this.columnReorder, this.columnResize, this.columnVisibilityChange, this.columnLockedChange, this.columnStickyChange).pipe(flatMap(() => this.ngZone.onStable.pipe(take(1))))
|
|
29472
29530
|
.subscribe(() => this.ngZone.run(() => hasObservers(this.gridStateChange) && this.gridStateChange.emit(this.currentState))));
|
|
@@ -29762,7 +29820,7 @@ class GridComponent {
|
|
|
29762
29820
|
this.dragTargetContainer?.notify();
|
|
29763
29821
|
this.dropTargetContainer?.notify();
|
|
29764
29822
|
}
|
|
29765
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GridComponent, deps: [{ token: BrowserSupportService }, { token: SelectionService }, { token: CellSelectionService }, { token: i0.ElementRef }, { token: GroupInfoService }, { token: GroupsService }, { token: ChangeNotificationService }, { token: DetailsService }, { token: EditService }, { token: FilterService }, { token: PDFService }, { token: ResponsiveService }, { token: i0.Renderer2 }, { token: ExcelService }, { token: i0.NgZone }, { token: ScrollSyncService }, { token: DomEventsService }, { token: ColumnResizingService }, { token: i0.ChangeDetectorRef }, { token: ColumnReorderService }, { token: ColumnInfoService }, { token: NavigationService }, { token: SortService }, { token: ScrollRequestService }, { token: i1$2.LocalizationService }, { token: ContextService }, { token: SizingOptionsService }, { token:
|
|
29823
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GridComponent, deps: [{ token: BrowserSupportService }, { token: SelectionService }, { token: CellSelectionService }, { token: i0.ElementRef }, { token: GroupInfoService }, { token: GroupsService }, { token: ChangeNotificationService }, { token: DetailsService }, { token: EditService }, { token: FilterService }, { token: PDFService }, { token: ResponsiveService }, { token: i0.Renderer2 }, { token: ExcelService }, { token: i0.NgZone }, { token: ScrollSyncService }, { token: DomEventsService }, { token: ColumnResizingService }, { token: i0.ChangeDetectorRef }, { token: ColumnReorderService }, { token: ColumnInfoService }, { token: NavigationService }, { token: SortService }, { token: ScrollRequestService }, { token: i1$2.LocalizationService }, { token: ContextService }, { token: SizingOptionsService }, { token: AdaptiveGridService }, { token: RowReorderService }, { token: DataMappingService }], target: i0.ɵɵFactoryTarget.Component });
|
|
29766
29824
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: GridComponent, isStandalone: true, selector: "kendo-grid", inputs: { data: "data", pageSize: "pageSize", height: "height", rowHeight: "rowHeight", adaptiveMode: "adaptiveMode", detailRowHeight: "detailRowHeight", skip: "skip", scrollable: "scrollable", selectable: "selectable", sort: "sort", size: "size", trackBy: "trackBy", filter: "filter", group: "group", virtualColumns: "virtualColumns", filterable: "filterable", sortable: "sortable", pageable: "pageable", groupable: "groupable", gridResizable: "gridResizable", rowReorderable: "rowReorderable", navigable: "navigable", autoSize: "autoSize", rowClass: "rowClass", rowSticky: "rowSticky", rowSelected: "rowSelected", isRowSelectable: "isRowSelectable", cellSelected: "cellSelected", resizable: "resizable", reorderable: "reorderable", loading: "loading", columnMenu: "columnMenu", hideHeader: "hideHeader", showInactiveTools: "showInactiveTools", isDetailExpanded: "isDetailExpanded", isGroupExpanded: "isGroupExpanded" }, outputs: { filterChange: "filterChange", pageChange: "pageChange", groupChange: "groupChange", sortChange: "sortChange", selectionChange: "selectionChange", rowReorder: "rowReorder", dataStateChange: "dataStateChange", gridStateChange: "gridStateChange", groupExpand: "groupExpand", groupCollapse: "groupCollapse", detailExpand: "detailExpand", detailCollapse: "detailCollapse", edit: "edit", cancel: "cancel", save: "save", remove: "remove", add: "add", cellClose: "cellClose", cellClick: "cellClick", pdfExport: "pdfExport", excelExport: "excelExport", columnResize: "columnResize", columnReorder: "columnReorder", columnVisibilityChange: "columnVisibilityChange", columnLockedChange: "columnLockedChange", columnStickyChange: "columnStickyChange", scrollBottom: "scrollBottom", contentScroll: "contentScroll" }, host: { properties: { "attr.dir": "this.dir", "class.k-grid": "this.hostClass", "class.k-grid-sm": "this.sizeSmallClass", "class.k-grid-md": "this.sizeMediumClass", "class.k-grid-lockedcolumns": "this.lockedClasses", "class.k-grid-virtual": "this.virtualClasses", "class.k-grid-no-scrollbar": "this.noScrollbarClass", "class.k-grid-resizable": "this.isResizable", "style.minWidth": "this.minWidth", "style.maxWidth": "this.maxWidth", "style.minHeight": "this.minHeight", "style.maxHeight": "this.maxHeight" } }, providers: [
|
|
29767
29825
|
BrowserSupportService,
|
|
29768
29826
|
LocalizationService,
|
|
@@ -29812,7 +29870,8 @@ class GridComponent {
|
|
|
29812
29870
|
RowspanService,
|
|
29813
29871
|
AdaptiveGridService,
|
|
29814
29872
|
ColumnMenuService,
|
|
29815
|
-
MenuTabbingService
|
|
29873
|
+
MenuTabbingService,
|
|
29874
|
+
DataMappingService
|
|
29816
29875
|
], queries: [{ propertyName: "columns", predicate: ColumnBase }, { propertyName: "detailTemplateChildren", predicate: DetailTemplateDirective }, { propertyName: "cellLoadingTemplateChildren", predicate: CellLoadingTemplateDirective }, { propertyName: "loadingTemplateChildren", predicate: LoadingTemplateDirective }, { propertyName: "statusBarTemplateChildren", predicate: StatusBarTemplateDirective }, { propertyName: "noRecordsTemplateChildren", predicate: NoRecordsTemplateDirective }, { propertyName: "pagerTemplateChildren", predicate: PagerTemplateDirective }, { propertyName: "toolbarTemplateChildren", predicate: ToolbarTemplateDirective }, { propertyName: "columnMenuTemplates", predicate: ColumnMenuTemplateDirective }], viewQueries: [{ propertyName: "lockedHeader", first: true, predicate: ["lockedHeader"], descendants: true }, { propertyName: "header", first: true, predicate: ["header"], descendants: true }, { propertyName: "ariaRoot", first: true, predicate: ["ariaRoot"], descendants: true, static: true }, { propertyName: "dragTargetContainer", first: true, predicate: DragTargetContainerDirective, descendants: true }, { propertyName: "dropTargetContainer", first: true, predicate: DropTargetContainerDirective, descendants: true }, { propertyName: "dialogContainer", first: true, predicate: ["dialogContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "adaptiveRenderer", first: true, predicate: AdaptiveRendererComponent, descendants: true }, { propertyName: "footer", predicate: ["footer"], descendants: true }], exportAs: ["kendoGrid"], usesOnChanges: true, ngImport: i0, template: `
|
|
29817
29876
|
<ng-container kendoGridLocalizedMessages
|
|
29818
29877
|
i18n-groupPanelEmpty="kendo.grid.groupPanelEmpty|The label visible in the Grid group panel when it is empty"
|
|
@@ -30464,7 +30523,7 @@ class GridComponent {
|
|
|
30464
30523
|
<tbody kendoGridTableBody
|
|
30465
30524
|
[isLoading]="loading"
|
|
30466
30525
|
[groups]="group"
|
|
30467
|
-
[
|
|
30526
|
+
[rowsToRender]="rowsToRender"
|
|
30468
30527
|
[skip]="skip"
|
|
30469
30528
|
[columns]="$any(leafColumns)"
|
|
30470
30529
|
[totalColumnsCount]="leafColumns.length"
|
|
@@ -30473,7 +30532,6 @@ class GridComponent {
|
|
|
30473
30532
|
[filterable]="filterable"
|
|
30474
30533
|
[noRecordsTemplate]="noRecordsTemplate"
|
|
30475
30534
|
[detailTemplate]="detailTemplate"
|
|
30476
|
-
[showGroupFooters]="showGroupFooters"
|
|
30477
30535
|
[trackBy]="trackBy"
|
|
30478
30536
|
[rowClass]="rowClass"
|
|
30479
30537
|
kendoDraggable
|
|
@@ -30580,7 +30638,7 @@ class GridComponent {
|
|
|
30580
30638
|
<kendo-grid-adaptive-renderer *ngIf="isAdaptiveModeEnabled"></kendo-grid-adaptive-renderer>
|
|
30581
30639
|
|
|
30582
30640
|
<div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
|
|
30583
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective, selector: "[kendoGridLocalizedMessages]" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ToolbarComponent, selector: "kendo-grid-toolbar", inputs: ["position", "size", "navigable"] }, { kind: "component", type: GroupPanelComponent, selector: "kendo-grid-group-panel", inputs: ["text", "navigable", "groups"], outputs: ["change"] }, { kind: "directive", type: TableDirective, selector: "[kendoGridResizableTable]", inputs: ["locked", "virtualColumns"] }, { kind: "directive", type: GridTableDirective, selector: "[kendoGridTable]", inputs: ["size"] }, { kind: "component", type: ColGroupComponent, selector: "[kendoGridColGroup]", inputs: ["columns", "groups", "detailTemplate", "sort"] }, { kind: "component", type: HeaderComponent, selector: "[kendoGridHeader]", inputs: ["totalColumnLevels", "columns", "groups", "detailTemplate", "scrollable", "filterable", "sort", "filter", "sortable", "groupable", "lockedColumnsCount", "resizable", "reorderable", "columnMenu", "columnMenuTemplate", "totalColumnsCount", "totalColumns", "tabIndex", "size"] }, { kind: "directive", type: ResizableContainerDirective, selector: "[kendoGridResizableContainer]", inputs: ["lockedWidth", "kendoGridResizableContainer"] }, { kind: "component", type: ListComponent, selector: "kendo-grid-list", inputs: ["data", "groups", "total", "rowHeight", "
|
|
30641
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective, selector: "[kendoGridLocalizedMessages]" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ToolbarComponent, selector: "kendo-grid-toolbar", inputs: ["position", "size", "navigable"] }, { kind: "component", type: GroupPanelComponent, selector: "kendo-grid-group-panel", inputs: ["text", "navigable", "groups"], outputs: ["change"] }, { kind: "directive", type: TableDirective, selector: "[kendoGridResizableTable]", inputs: ["locked", "virtualColumns"] }, { kind: "directive", type: GridTableDirective, selector: "[kendoGridTable]", inputs: ["size"] }, { kind: "component", type: ColGroupComponent, selector: "[kendoGridColGroup]", inputs: ["columns", "groups", "detailTemplate", "sort"] }, { kind: "component", type: HeaderComponent, selector: "[kendoGridHeader]", inputs: ["totalColumnLevels", "columns", "groups", "detailTemplate", "scrollable", "filterable", "sort", "filter", "sortable", "groupable", "lockedColumnsCount", "resizable", "reorderable", "columnMenu", "columnMenuTemplate", "totalColumnsCount", "totalColumns", "tabIndex", "size"] }, { kind: "directive", type: ResizableContainerDirective, selector: "[kendoGridResizableContainer]", inputs: ["lockedWidth", "kendoGridResizableContainer"] }, { kind: "component", type: ListComponent, selector: "kendo-grid-list", inputs: ["data", "groups", "total", "rowHeight", "detailRowHeight", "take", "skip", "columns", "detailTemplate", "noRecordsTemplate", "selectable", "groupable", "filterable", "rowClass", "rowSticky", "loading", "trackBy", "virtualColumns", "isVirtual", "cellLoadingTemplate", "loadingTemplate", "sort", "size"], outputs: ["contentScroll", "pageChange", "scrollBottom"] }, { kind: "directive", type: DragTargetContainerDirective, selector: "[kendoDragTargetContainer]", inputs: ["hint", "dragTargetFilter", "dragHandle", "dragDelay", "threshold", "dragTargetId", "dragData", "dragDisabled", "mode", "cursorStyle", "hintContext"], outputs: ["onDragReady", "onPress", "onDragStart", "onDrag", "onRelease", "onDragEnd"], exportAs: ["kendoDragTargetContainer"] }, { kind: "directive", type: DropTargetContainerDirective, selector: "[kendoDropTargetContainer]", inputs: ["dropTargetFilter", "dropDisabled"], outputs: ["onDragEnter", "onDragOver", "onDragLeave", "onDrop"], exportAs: ["kendoDropTargetContainer"] }, { kind: "directive", type: DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { kind: "directive", type: GridMarqueeDirective, selector: "[kendoGridSelectionMarquee]" }, { kind: "component", type: FooterComponent, selector: "[kendoGridFooter]", inputs: ["columns", "groups", "detailTemplate", "scrollable", "lockedColumnsCount", "logicalRowIndex", "totalColumns", "totalColumnsCount"] }, { kind: "component", type: TableBodyComponent, selector: "[kendoGridTableBody]", inputs: ["columns", "allColumns", "groups", "detailTemplate", "noRecordsTemplate", "rowsToRender", "skip", "selectable", "filterable", "noRecordsText", "isLocked", "isLoading", "isVirtual", "cellLoadingTemplate", "skipGroupDecoration", "lockedColumnsCount", "totalColumnsCount", "virtualColumns", "trackBy", "rowSticky", "totalColumns", "rowClass"] }, { kind: "component", type: LoadingComponent, selector: "[kendoGridLoading]", inputs: ["loadingTemplate"] }, { kind: "component", type: StatusBarComponent, selector: "kendo-grid-status-bar", inputs: ["statusBarTemplate"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: WatermarkOverlayComponent, selector: "div[kendoWatermarkOverlay]" }, { kind: "component", type: i51.CustomMessagesComponent, selector: "kendo-datapager-messages, kendo-pager-messages" }, { kind: "component", type: i51.PagerInfoComponent, selector: "kendo-datapager-info, kendo-pager-info" }, { kind: "component", type: i51.PagerInputComponent, selector: "kendo-datapager-input, kendo-pager-input", inputs: ["showPageText", "size"] }, { kind: "component", type: i51.PagerNextButtonsComponent, selector: "kendo-datapager-next-buttons, kendo-pager-next-buttons", inputs: ["size"] }, { kind: "component", type: i51.PagerNumericButtonsComponent, selector: "kendo-datapager-numeric-buttons, kendo-pager-numeric-buttons", inputs: ["buttonCount", "size"] }, { kind: "component", type: i51.PagerPageSizesComponent, selector: "kendo-datapager-page-sizes, kendo-pager-page-sizes", inputs: ["showItemsText", "pageSizes", "size", "adaptiveMode"] }, { kind: "component", type: i51.PagerPrevButtonsComponent, selector: "kendo-datapager-prev-buttons, kendo-pager-prev-buttons", inputs: ["size"] }, { kind: "directive", type: i51.PagerTemplateDirective, selector: "[kendoDataPagerTemplate], [kendoPagerTemplate]" }, { kind: "component", type: i51.PagerComponent, selector: "kendo-datapager, kendo-pager", inputs: ["externalTemplate", "total", "skip", "pageSize", "buttonCount", "info", "type", "pageSizeValues", "previousNext", "navigable", "size", "responsive", "adaptiveMode"], outputs: ["pageChange", "pageSizeChange", "pagerInputVisibilityChange", "pageTextVisibilityChange", "itemsTextVisibilityChange"], exportAs: ["kendoDataPager", "kendoPager"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: AdaptiveRendererComponent, selector: "kendo-grid-adaptive-renderer" }], encapsulation: i0.ViewEncapsulation.None });
|
|
30584
30642
|
}
|
|
30585
30643
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: GridComponent, decorators: [{
|
|
30586
30644
|
type: Component,
|
|
@@ -30636,7 +30694,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
30636
30694
|
RowspanService,
|
|
30637
30695
|
AdaptiveGridService,
|
|
30638
30696
|
ColumnMenuService,
|
|
30639
|
-
MenuTabbingService
|
|
30697
|
+
MenuTabbingService,
|
|
30698
|
+
DataMappingService
|
|
30640
30699
|
],
|
|
30641
30700
|
selector: 'kendo-grid',
|
|
30642
30701
|
template: `
|
|
@@ -31290,7 +31349,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
31290
31349
|
<tbody kendoGridTableBody
|
|
31291
31350
|
[isLoading]="loading"
|
|
31292
31351
|
[groups]="group"
|
|
31293
|
-
[
|
|
31352
|
+
[rowsToRender]="rowsToRender"
|
|
31294
31353
|
[skip]="skip"
|
|
31295
31354
|
[columns]="$any(leafColumns)"
|
|
31296
31355
|
[totalColumnsCount]="leafColumns.length"
|
|
@@ -31299,7 +31358,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
31299
31358
|
[filterable]="filterable"
|
|
31300
31359
|
[noRecordsTemplate]="noRecordsTemplate"
|
|
31301
31360
|
[detailTemplate]="detailTemplate"
|
|
31302
|
-
[showGroupFooters]="showGroupFooters"
|
|
31303
31361
|
[trackBy]="trackBy"
|
|
31304
31362
|
[rowClass]="rowClass"
|
|
31305
31363
|
kendoDraggable
|
|
@@ -31416,7 +31474,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
31416
31474
|
IconWrapperComponent, WatermarkOverlayComponent, ...KENDO_PAGER, NgTemplateOutlet, AdaptiveRendererComponent
|
|
31417
31475
|
]
|
|
31418
31476
|
}]
|
|
31419
|
-
}], ctorParameters: function () { return [{ type: BrowserSupportService }, { type: SelectionService }, { type: CellSelectionService }, { type: i0.ElementRef }, { type: GroupInfoService }, { type: GroupsService }, { type: ChangeNotificationService }, { type: DetailsService }, { type: EditService }, { type: FilterService }, { type: PDFService }, { type: ResponsiveService }, { type: i0.Renderer2 }, { type: ExcelService }, { type: i0.NgZone }, { type: ScrollSyncService }, { type: DomEventsService }, { type: ColumnResizingService }, { type: i0.ChangeDetectorRef }, { type: ColumnReorderService }, { type: ColumnInfoService }, { type: NavigationService }, { type: SortService }, { type: ScrollRequestService }, { type: i1$2.LocalizationService }, { type: ContextService }, { type: SizingOptionsService }, { type:
|
|
31477
|
+
}], ctorParameters: function () { return [{ type: BrowserSupportService }, { type: SelectionService }, { type: CellSelectionService }, { type: i0.ElementRef }, { type: GroupInfoService }, { type: GroupsService }, { type: ChangeNotificationService }, { type: DetailsService }, { type: EditService }, { type: FilterService }, { type: PDFService }, { type: ResponsiveService }, { type: i0.Renderer2 }, { type: ExcelService }, { type: i0.NgZone }, { type: ScrollSyncService }, { type: DomEventsService }, { type: ColumnResizingService }, { type: i0.ChangeDetectorRef }, { type: ColumnReorderService }, { type: ColumnInfoService }, { type: NavigationService }, { type: SortService }, { type: ScrollRequestService }, { type: i1$2.LocalizationService }, { type: ContextService }, { type: SizingOptionsService }, { type: AdaptiveGridService }, { type: RowReorderService }, { type: DataMappingService }]; }, propDecorators: { data: [{
|
|
31420
31478
|
type: Input
|
|
31421
31479
|
}], pageSize: [{
|
|
31422
31480
|
type: Input
|
|
@@ -31841,6 +31899,12 @@ class DataBindingDirective {
|
|
|
31841
31899
|
}
|
|
31842
31900
|
}
|
|
31843
31901
|
process(state) {
|
|
31902
|
+
if (this.grid.isVirtual && (!isPresent(state.take) || state.take === 0)) {
|
|
31903
|
+
return {
|
|
31904
|
+
data: [],
|
|
31905
|
+
total: this.originalData?.length || 0
|
|
31906
|
+
};
|
|
31907
|
+
}
|
|
31844
31908
|
return process(this.originalData, state);
|
|
31845
31909
|
}
|
|
31846
31910
|
applyState({ skip, take, sort, group, filter }) {
|