(node: TreeNodeData)
| 80 | const ChevronWidth = 16; |
| 81 | |
| 82 | function normalizeLabel(node: TreeNodeData): string { |
| 83 | if (node.label?.trim()) { |
| 84 | return node.label; |
| 85 | } |
| 86 | const path = node.path ?? node.id; |
| 87 | const chunks = path.split("/").filter(Boolean); |
| 88 | return chunks[chunks.length - 1] ?? path; |
| 89 | } |
| 90 | |
| 91 | function sortIdsByNode(nodesById: Map<string, TreeNodeData>, ids: string[]): string[] { |
| 92 | return [...ids].sort((leftId, rightId) => { |
no outgoing calls
no test coverage detected