| 1177 | }); |
| 1178 | |
| 1179 | @Component({ |
| 1180 | template: ` |
| 1181 | <table ngGrid |
| 1182 | [disabled]="disabled()" |
| 1183 | [multi]="multi()" |
| 1184 | [rowWrap]="rowWrap()" |
| 1185 | [colWrap]="colWrap()" |
| 1186 | [focusMode]="focusMode()" |
| 1187 | [softDisabled]="softDisabled()" |
| 1188 | [enableSelection]="enableSelection()" |
| 1189 | [selectionMode]="selectionMode()" |
| 1190 | [tabindex]="tabIndex()"> |
| 1191 | @for (row of gridData(); track row; let rIndex = $index) { |
| 1192 | <tr ngGridRow [rowIndex]="row.rowIndex"> |
| 1193 | @for (cell of row.cells; track cell; let cIndex = $index) { |
| 1194 | <td ngGridCell |
| 1195 | [id]="cell.id" |
| 1196 | [disabled]="cell.disabled ?? false" |
| 1197 | [role]="cell.role ?? 'gridcell'" |
| 1198 | [rowIndex]="cell.rowIndex" |
| 1199 | [colIndex]="cell.colIndex" |
| 1200 | [rowSpan]="cell.rowSpan ?? 1" |
| 1201 | [colSpan]="cell.colSpan ?? 1" |
| 1202 | [selectable]="cell.selectable ?? true"> |
| 1203 | Cell {{rIndex}}-{{cIndex}} |
| 1204 | @for (widget of cell.widgets || []; track $index; let wIndex = $index) { |
| 1205 | @if (widget.hasTarget) { |
| 1206 | <button ngGridCellWidget |
| 1207 | [id]="widget.id ?? ('w' + rIndex + '-' + cIndex + '-' + wIndex)" |
| 1208 | [widgetType]="widget.type ?? 'simple'" |
| 1209 | [disabled]="widget.disabled ?? false" |
| 1210 | [tabindex]="widget.tabindex" |
| 1211 | [focusTarget]="targetInput" |
| 1212 | (activated)="onActivated($event)" |
| 1213 | (deactivated)="onDeactivated($event)"> |
| 1214 | Widget |
| 1215 | </button> |
| 1216 | <input #targetInput id="target-{{widget.id}}" type="text" /> |
| 1217 | } @else { |
| 1218 | <button ngGridCellWidget |
| 1219 | [id]="widget.id ?? ('w' + rIndex + '-' + cIndex + '-' + wIndex)" |
| 1220 | [widgetType]="widget.type ?? 'simple'" |
| 1221 | [disabled]="widget.disabled ?? false" |
| 1222 | [tabindex]="widget.tabindex" |
| 1223 | (activated)="onActivated($event)" |
| 1224 | (deactivated)="onDeactivated($event)"> |
| 1225 | Widget |
| 1226 | </button> |
| 1227 | } |
| 1228 | } |
| 1229 | </td> |
| 1230 | } |
| 1231 | </tr> |
| 1232 | } |
| 1233 | </table> |
| 1234 | `, |
| 1235 | imports: [Grid, GridRow, GridCell, GridCellWidget], |
| 1236 | changeDetection: ChangeDetectionStrategy.Eager, |
nothing calls this directly
no test coverage detected