MCPcopy
hub / github.com/angular/components / getTreeStructure

Method getTreeStructure

src/aria/tree/testing/tree-harness.ts:40–46  ·  view source on GitHub ↗

* Gets an object representation for the visible tree structure * If an item is under an unexpanded item it will not be included.

()

Source from the content-addressed store, hash-verified

38 * If an item is under an unexpanded item it will not be included.
39 */
40 async getTreeStructure(): Promise<TextTree> {
41 const items = await this.getItems();
42 const itemInformation = await parallel(() =>
43 items.map(item => parallel(() => [item.getLevel(), item.getText(), item.isExpanded()])),
44 );
45 return this._getTreeStructure(itemInformation, 1, true);
46 }
47
48 /**
49 * Recursively collect the structured text of the tree items.

Callers 2

Calls 6

getItemsMethod · 0.95
_getTreeStructureMethod · 0.95
parallelFunction · 0.90
isExpandedMethod · 0.65
getLevelMethod · 0.45
getTextMethod · 0.45

Tested by

no test coverage detected