(name: 'incoming' | 'outgoing')
| 34 | const { direction, types, state } = scopeParts(evidence, words); |
| 35 | const reach = evidence.depth === 0 ? text.selectionOnly : text.reach(words.hops(evidence.depth), direction, evidence.direction === 'both'); |
| 36 | const side = (name: 'incoming' | 'outgoing'): string => { |
| 37 | if (!sideLoaded(evidence, name)) return name === 'incoming' ? words.incomingNotLoaded : words.outgoingNotLoaded; |
| 38 | const groups = evidence.relationships[name]; |
| 39 | if (!groups.length) return evidence.truncated ? words.cut(name) : name === 'incoming' ? words.noIncoming : words.noOutgoing; |
| 40 | const lines = groups.slice(0, TYPES_PER_SIDE).map(group => typeLine(group, words)); |
| 41 | if (groups.length > TYPES_PER_SIDE) lines.push(`- ${words.moreTypes(groups.length - TYPES_PER_SIDE)}`); |
| 42 | return `${text.side(name, hierarchy)}\n${lines.join('\n')}`; |
| 43 | }; |
| 44 | const { internal, beyond } = evidence.relationships; |
| 45 | // The picture is read in the view the reader has; where the evidence does not say which, nothing is said about it. |
| 46 | const reading = evidence.display === 'hierarchy' ? text.readHierarchy(evidence.direction, evidence.depth >= 2) : evidence.display === 'galaxy' ? text.readGalaxy : undefined; |
no test coverage detected