| 1087 | }); |
| 1088 | |
| 1089 | @Component({ |
| 1090 | template: ` |
| 1091 | <table ngGrid |
| 1092 | [disabled]="disabled()" |
| 1093 | [multi]="multi()" |
| 1094 | [rowWrap]="rowWrap()" |
| 1095 | [colWrap]="colWrap()" |
| 1096 | [focusMode]="focusMode()" |
| 1097 | [softDisabled]="softDisabled()" |
| 1098 | [enableSelection]="enableSelection()" |
| 1099 | [selectionMode]="selectionMode()" |
| 1100 | [tabindex]="tabIndex()"> |
| 1101 | @for (row of gridData(); track row; let rIndex = $index) { |
| 1102 | <tr ngGridRow [rowIndex]="row.rowIndex"> |
| 1103 | @for (cell of row.cells; track cell; let cIndex = $index) { |
| 1104 | <td ngGridCell |
| 1105 | [id]="cell.id" |
| 1106 | [disabled]="cell.disabled ?? false" |
| 1107 | [role]="cell.role ?? 'gridcell'" |
| 1108 | [rowIndex]="cell.rowIndex" |
| 1109 | [colIndex]="cell.colIndex" |
| 1110 | [rowSpan]="cell.rowSpan ?? 1" |
| 1111 | [colSpan]="cell.colSpan ?? 1" |
| 1112 | [selectable]="cell.selectable ?? true"> |
| 1113 | Cell {{rIndex}}-{{cIndex}} |
| 1114 | @for (widget of cell.widgets || []; track $index; let wIndex = $index) { |
| 1115 | @if (widget.hasTarget) { |
| 1116 | <button ngGridCellWidget |
| 1117 | [id]="widget.id ?? ('w' + rIndex + '-' + cIndex + '-' + wIndex)" |
| 1118 | [widgetType]="widget.type ?? 'simple'" |
| 1119 | [disabled]="widget.disabled ?? false" |
| 1120 | [tabindex]="widget.tabindex" |
| 1121 | [focusTarget]="targetInput" |
| 1122 | (activated)="onActivated($event)" |
| 1123 | (deactivated)="onDeactivated($event)"> |
| 1124 | Widget |
| 1125 | </button> |
| 1126 | <input #targetInput id="target-{{widget.id}}" type="text" /> |
| 1127 | } @else { |
| 1128 | <button ngGridCellWidget |
| 1129 | [id]="widget.id ?? ('w' + rIndex + '-' + cIndex + '-' + wIndex)" |
| 1130 | [widgetType]="widget.type ?? 'simple'" |
| 1131 | [disabled]="widget.disabled ?? false" |
| 1132 | [tabindex]="widget.tabindex" |
| 1133 | (activated)="onActivated($event)" |
| 1134 | (deactivated)="onDeactivated($event)"> |
| 1135 | Widget |
| 1136 | </button> |
| 1137 | } |
| 1138 | } |
| 1139 | </td> |
| 1140 | } |
| 1141 | </tr> |
| 1142 | } |
| 1143 | </table> |
| 1144 | `, |
| 1145 | imports: [Grid, GridRow, GridCell, GridCellWidget], |
| 1146 | changeDetection: ChangeDetectionStrategy.Eager, |
nothing calls this directly
no test coverage detected
searching dependent graphs…