|
1 | | - <!-- Row Dimension --> |
2 | | - <div #rowDimensionContainer> |
3 | | - <igx-pivot-header-row class="igx-grid-thead" tabindex="0" |
4 | | - [grid]="grid" |
5 | | - [hasMRL]="grid.hasColumnLayouts" |
6 | | - [density]="grid.displayDensity" |
7 | | - [activeDescendant]="grid.activeDescendant" |
8 | | - [width]="grid.pivotRowWidths" |
9 | | - [unpinnedColumnCollection]="rowDimension" |
10 | | - (scroll)="grid.preventHeaderScroll($event)" |
11 | | - [row]="this" |
12 | | - > |
13 | | - </igx-pivot-header-row> |
14 | | - </div> |
| 1 | +<!-- Row Dimension --> |
| 2 | +<div #rowDimensionContainer> |
| 3 | + <igx-pivot-header-row class="igx-grid-thead" tabindex="0" [grid]="grid" [hasMRL]="grid.hasColumnLayouts" |
| 4 | + [density]="grid.displayDensity" [activeDescendant]="grid.activeDescendant" [width]="grid.pivotRowWidths" |
| 5 | + [unpinnedColumnCollection]="rowDimension" (scroll)="grid.preventHeaderScroll($event)" [row]="this"> |
| 6 | + </igx-pivot-header-row> |
| 7 | +</div> |
| 8 | + |
15 | 9 |
|
| 10 | +<ng-container *ngIf="pinnedColumns.length > 0 && grid.isPinningToStart"> |
| 11 | + <ng-template *ngTemplateOutlet="pinnedCellsTemplate; context: this"></ng-template> |
| 12 | +</ng-container> |
16 | 13 |
|
17 | | - <ng-container *ngIf="pinnedColumns.length > 0 && grid.isPinningToStart"> |
18 | | - <ng-template *ngTemplateOutlet="pinnedCellsTemplate; context: this"></ng-template> |
19 | | - </ng-container> |
| 14 | +<ng-template igxGridFor let-col [igxGridForOf]="unpinnedColumns | igxNotGrouped" |
| 15 | + [igxForScrollContainer]="grid.parentVirtDir" let-colIndex="index" [igxForSizePropName]='"calcPixelWidth"' |
| 16 | + [igxForScrollOrientation]="'horizontal'" [igxForContainerSize]='grid.unpinnedWidth' |
| 17 | + [igxForTrackBy]='grid.trackColumnChanges' #igxDirRef> |
| 18 | + <igx-grid-cell #cell class="igx-grid__td igx-grid__td--fw" |
| 19 | + [class.igx-grid__td--edited]="rowID | transactionState:col.field:grid.rowEditable:grid.transactions:grid.pipeTrigger:grid.gridAPI.crudService.cell:grid.gridAPI.crudService.row" |
| 20 | + [attr.aria-describedby]="gridID + '_' + col.field | igxStringReplace:'.':'_'" |
| 21 | + [class.igx-grid__td--number]="col.dataType === 'number' || col.dataType === 'percent' || col.dataType === 'currency'" |
| 22 | + [class.igx-grid__td--bool]="col.dataType === 'boolean'" |
| 23 | + [ngClass]="this.getCellClass(col) | igxCellStyleClasses:rowData[col.field]:rowData:col.field:viewIndex:grid.pipeTrigger" |
| 24 | + [ngStyle]="col.cellStyles | igxCellStyles:rowData[col.field]:rowData:col.field:viewIndex:grid.pipeTrigger" |
| 25 | + [editMode]="col.editable && this.grid.crudService.targetInEdit(index, col.index)" [column]="col" |
| 26 | + [formatter]="col.formatter" [intRow]="this" [active]="isCellActive(col.visibleIndex)" |
| 27 | + [style.min-height.px]="cellHeight" [rowData]="rowData" [style.min-width]="col.width" |
| 28 | + [style.max-width]="col.width" [style.flex-basis]="col.width" [width]="col.getCellWidth()" |
| 29 | + [visibleColumnIndex]="col.visibleIndex" |
| 30 | + [value]="rowData | dataMapper:col.field:grid.pipeTrigger:rowData[col.field]:col.hasNestedPath" |
| 31 | + [cellTemplate]="col.bodyTemplate" [lastSearchInfo]="grid.lastSearchInfo" |
| 32 | + [cellSelectionMode]="grid.cellSelection" [displayPinnedChip]="shouldDisplayPinnedChip(col.visibleIndex)"> |
| 33 | + </igx-grid-cell> |
| 34 | +</ng-template> |
20 | 35 |
|
21 | | - <ng-template igxGridFor let-col [igxGridForOf]="unpinnedColumns | igxNotGrouped" [igxForScrollContainer]="grid.parentVirtDir" let-colIndex="index" [igxForSizePropName]='"calcPixelWidth"' [igxForScrollOrientation]="'horizontal'" [igxForContainerSize]='grid.unpinnedWidth' [igxForTrackBy]='grid.trackColumnChanges' #igxDirRef> |
22 | | - <igx-grid-cell |
23 | | - #cell |
24 | | - class="igx-grid__td igx-grid__td--fw" |
25 | | - [class.igx-grid__td--edited]="rowID | transactionState:col.field:grid.rowEditable:grid.transactions:grid.pipeTrigger:grid.gridAPI.crudService.cell:grid.gridAPI.crudService.row" |
26 | | - [attr.aria-describedby]="gridID + '_' + col.field | igxStringReplace:'.':'_'" |
27 | | - [class.igx-grid__td--number]="col.dataType === 'number' || col.dataType === 'percent' || col.dataType === 'currency'" |
28 | | - [class.igx-grid__td--bool]="col.dataType === 'boolean'" |
29 | | - [ngClass]="this.getCellClass(col) | igxCellStyleClasses:rowData[col.field]:rowData:col.field:viewIndex:grid.pipeTrigger" |
30 | | - [ngStyle]="col.cellStyles | igxCellStyles:rowData[col.field]:rowData:col.field:viewIndex:grid.pipeTrigger" |
31 | | - [editMode]="col.editable && this.grid.crudService.targetInEdit(index, col.index)" |
32 | | - [column]="col" |
33 | | - [formatter]="col.formatter" |
34 | | - [intRow]="this" |
35 | | - [active]="isCellActive(col.visibleIndex)" |
36 | | - [style.min-height.px]="cellHeight" |
37 | | - [rowData]="rowData" |
38 | | - [style.min-width]="col.width" |
39 | | - [style.max-width]="col.width" |
40 | | - [style.flex-basis]="col.width" |
41 | | - [width]="col.getCellWidth()" |
42 | | - [visibleColumnIndex]="col.visibleIndex" |
43 | | - [value]="rowData | dataMapper:col.field:grid.pipeTrigger:rowData[col.field]:col.hasNestedPath" |
44 | | - [cellTemplate]="col.bodyTemplate" |
45 | | - [lastSearchInfo]="grid.lastSearchInfo" |
46 | | - [cellSelectionMode]="grid.cellSelection" |
47 | | - [displayPinnedChip]="shouldDisplayPinnedChip(col.visibleIndex)"> |
48 | | - </igx-grid-cell> |
49 | | - </ng-template> |
| 36 | +<ng-container *ngIf="pinnedColumns.length > 0 && !grid.isPinningToStart"> |
| 37 | + <ng-template *ngTemplateOutlet="pinnedCellsTemplate; context: this"></ng-template> |
| 38 | +</ng-container> |
50 | 39 |
|
51 | | - <ng-container *ngIf="pinnedColumns.length > 0 && !grid.isPinningToStart"> |
52 | | - <ng-template *ngTemplateOutlet="pinnedCellsTemplate; context: this"></ng-template> |
53 | | - </ng-container> |
| 40 | +<ng-template #rowSelectorBaseTemplate> |
| 41 | + <div class="igx-grid__cbx-padding"> |
| 42 | + <igx-checkbox [tabindex]="-1" [readonly]="true" [checked]="selected" [disableRipple]="true" [disabled]="deleted" |
| 43 | + [disableTransitions]="grid.disableTransitions" [aria-label]="rowCheckboxAriaLabel"> |
| 44 | + </igx-checkbox> |
| 45 | + </div> |
| 46 | +</ng-template> |
54 | 47 |
|
55 | | - <ng-template #rowSelectorBaseTemplate> |
56 | | - <div class="igx-grid__cbx-padding"> |
57 | | - <igx-checkbox |
58 | | - [tabindex]="-1" |
59 | | - [readonly]="true" |
60 | | - [checked]="selected" |
61 | | - [disableRipple]="true" |
62 | | - [disabled]="deleted" |
63 | | - [disableTransitions]="grid.disableTransitions" |
64 | | - [aria-label]="rowCheckboxAriaLabel"> |
65 | | - </igx-checkbox> |
66 | | - </div> |
67 | | - </ng-template> |
| 48 | +<ng-template #pinnedCellsTemplate let-col> |
| 49 | + <igx-grid-cell *ngFor="let col of pinnedColumns | igxNotGrouped" |
| 50 | + class="igx-grid__td igx-grid__td--fw igx-grid__td--pinned" |
| 51 | + [class.igx-grid__td--edited]="rowID | transactionState:col.field:grid.rowEditable:grid.transactions:grid.pipeTrigger:grid.gridAPI.crudService.cell:grid.gridAPI.crudService.row" |
| 52 | + [attr.aria-describedby]="gridID + '_' + col.field | igxStringReplace:'.':'_'" |
| 53 | + [class.igx-grid__td--number]="col.dataType === 'number' || col.dataType === 'percent' || col.dataType === 'currency'" |
| 54 | + [ngClass]="col.cellClasses | igxCellStyleClasses:rowData[col.field]:rowData:col.field:viewIndex:grid.pipeTrigger" |
| 55 | + [ngStyle]="col.cellStyles | igxCellStyles:rowData[col.field]:rowData:col.field:viewIndex:grid.pipeTrigger" |
| 56 | + [editMode]="col.editable && this.grid.crudService.targetInEdit(index, col.index)" [column]="col" |
| 57 | + [formatter]="col.formatter" [intRow]="this" [active]="isCellActive(col.visibleIndex)" |
| 58 | + [firstPinned]="col.isFirstPinned" [lastPinned]="col.isLastPinned" [style.min-height.px]="cellHeight" |
| 59 | + [rowData]="rowData" [style.min-width]="col.width" [style.max-width]="col.width" [style.flex-basis]="col.width" |
| 60 | + [style.left]="col.rightPinnedOffset" [width]="col.getCellWidth()" [visibleColumnIndex]="col.visibleIndex" |
| 61 | + [value]="rowData | dataMapper:col.field:grid.pipeTrigger:rowData[col.field]:col.hasNestedPath" |
| 62 | + [cellTemplate]="col.bodyTemplate" [lastSearchInfo]="grid.lastSearchInfo" |
| 63 | + [cellSelectionMode]="grid.cellSelection" [displayPinnedChip]="shouldDisplayPinnedChip(col.visibleIndex)"> |
| 64 | + </igx-grid-cell> |
| 65 | +</ng-template> |
68 | 66 |
|
69 | | - <ng-template #pinnedCellsTemplate let-col> |
70 | | - <igx-grid-cell *ngFor="let col of pinnedColumns | igxNotGrouped" |
71 | | - class="igx-grid__td igx-grid__td--fw igx-grid__td--pinned" |
72 | | - [class.igx-grid__td--edited]="rowID | transactionState:col.field:grid.rowEditable:grid.transactions:grid.pipeTrigger:grid.gridAPI.crudService.cell:grid.gridAPI.crudService.row" |
73 | | - [attr.aria-describedby]="gridID + '_' + col.field | igxStringReplace:'.':'_'" |
74 | | - [class.igx-grid__td--number]="col.dataType === 'number' || col.dataType === 'percent' || col.dataType === 'currency'" |
75 | | - [ngClass]="col.cellClasses | igxCellStyleClasses:rowData[col.field]:rowData:col.field:viewIndex:grid.pipeTrigger" |
76 | | - [ngStyle]="col.cellStyles | igxCellStyles:rowData[col.field]:rowData:col.field:viewIndex:grid.pipeTrigger" |
77 | | - [editMode]="col.editable && this.grid.crudService.targetInEdit(index, col.index)" |
78 | | - [column]="col" |
79 | | - [formatter]="col.formatter" |
80 | | - [intRow]="this" |
81 | | - [active]="isCellActive(col.visibleIndex)" |
82 | | - [firstPinned]="col.isFirstPinned" |
83 | | - [lastPinned]="col.isLastPinned" |
84 | | - [style.min-height.px]="cellHeight" |
85 | | - [rowData]="rowData" |
86 | | - [style.min-width]="col.width" |
87 | | - [style.max-width]="col.width" |
88 | | - [style.flex-basis]="col.width" |
89 | | - [style.left]="col.rightPinnedOffset" |
90 | | - [width]="col.getCellWidth()" |
91 | | - [visibleColumnIndex]="col.visibleIndex" |
92 | | - [value]="rowData | dataMapper:col.field:grid.pipeTrigger:rowData[col.field]:col.hasNestedPath" |
93 | | - [cellTemplate]="col.bodyTemplate" |
94 | | - [lastSearchInfo]="grid.lastSearchInfo" |
95 | | - [cellSelectionMode]="grid.cellSelection" |
96 | | - [displayPinnedChip]="shouldDisplayPinnedChip(col.visibleIndex)"> |
97 | | - </igx-grid-cell> |
98 | | - </ng-template> |
99 | 67 |
|
| 68 | +<ng-template #headerTemplate let-column> |
| 69 | + <div class="igx-grid__tr--header" (click)="this.selectPivotRow(column, $event)"> |
| 70 | + <igx-icon [attr.draggable]="false" (click)="grid.toggleRow(getRowDimensionKey(column))" |
| 71 | + style='cursor: pointer;'> |
| 72 | + {{ getExpandState(column) ? 'expand_more' : 'expand_less'}}</igx-icon> |
| 73 | + {{column.header}} |
| 74 | + </div> |
| 75 | +</ng-template> |
100 | 76 |
|
101 | | - <ng-template #headerTemplate let-column> |
102 | | - <div class="igx-grid__tr--header"> |
103 | | - <igx-icon [attr.draggable]="false" |
104 | | - (click)="grid.toggleRow(getRowDimensionKey(column))" |
105 | | - style='cursor: pointer;'> |
106 | | - {{ getExpandState(column) ? 'expand_more' : 'expand_less'}}</igx-icon> |
107 | | - {{column.header}} |
108 | | - </div> |
109 | | - </ng-template> |
| 77 | +<ng-template #headerTemplateGray let-column> |
| 78 | + <div class="igx-grid__tr--header" style='color:gray' (click)="this.selectPivotRow(column, $event)"> |
| 79 | + {{column.header}} |
| 80 | + </div> |
| 81 | +</ng-template> |
110 | 82 |
|
111 | | - <ng-template #headerTemplateGray let-column> |
112 | | - <div class="igx-grid__tr--header" style='color:gray'> |
113 | | - {{column.header}} |
114 | | - </div> |
115 | | - </ng-template> |
| 83 | +<ng-template #headerDefaultTemplate let-column> |
| 84 | + <div class="igx-grid__tr--header" (click)="this.selectPivotRow(column, $event)"> |
| 85 | + {{column.header}} |
| 86 | + </div> |
| 87 | +</ng-template> |
0 commit comments