| 1333 | } |
| 1334 | |
| 1335 | @Component({ |
| 1336 | template: ` |
| 1337 | <div> |
| 1338 | <input |
| 1339 | ngCombobox |
| 1340 | #combobox="ngCombobox" |
| 1341 | placeholder="Search..." |
| 1342 | [(value)]="searchString" |
| 1343 | [(expanded)]="popupExpanded" |
| 1344 | [disabled]="readonly()" |
| 1345 | (focusout)="onBlur()" |
| 1346 | /> |
| 1347 | |
| 1348 | <ng-template ngComboboxPopup [combobox]="combobox" popupType="tree"> |
| 1349 | <ul ngComboboxWidget ngTree #tree="ngTree" id="tree" focusMode="activedescendant" [tabIndex]="-1" selectionMode="explicit" [(value)]="value" (click)="onCommit()" (keydown.enter)="onCommit()" [activeDescendant]="tree.activeDescendant()"> |
| 1350 | <ng-template |
| 1351 | [ngTemplateOutlet]="treeNodes" |
| 1352 | [ngTemplateOutletContext]="{nodes: nodes(), parent: tree}" |
| 1353 | /> |
| 1354 | </ul> |
| 1355 | </ng-template> |
| 1356 | </div> |
| 1357 | |
| 1358 | <ng-template #treeNodes let-nodes="nodes" let-parent="parent"> |
| 1359 | @for (node of nodes; track node.name) { |
| 1360 | <li ngTreeItem |
| 1361 | [parent]="parent" |
| 1362 | [value]="node.name" |
| 1363 | [label]="node.name" |
| 1364 | [(expanded)]="node.expanded" |
| 1365 | #treeItem="ngTreeItem" |
| 1366 | > |
| 1367 | {{ node.name }} |
| 1368 | </li> |
| 1369 | |
| 1370 | @if (node.children) { |
| 1371 | <ul role="group"> |
| 1372 | <ng-template ngTreeItemGroup [ownedBy]="treeItem" #group="ngTreeItemGroup"> |
| 1373 | <ng-template |
| 1374 | [ngTemplateOutlet]="treeNodes" |
| 1375 | [ngTemplateOutletContext]="{nodes: node.children, parent: group}" |
| 1376 | /> |
| 1377 | </ng-template> |
| 1378 | </ul> |
| 1379 | } |
| 1380 | } |
| 1381 | </ng-template> |
| 1382 | `, |
| 1383 | imports: [ |
| 1384 | Combobox, |
| 1385 | ComboboxPopup, |
| 1386 | ComboboxWidget, |
| 1387 | Tree, |
| 1388 | TreeItem, |
| 1389 | TreeItemGroup, |
| 1390 | NgTemplateOutlet, |
| 1391 | ], |
| 1392 | }) |
nothing calls this directly
no test coverage detected