()
| 3816 | } |
| 3817 | |
| 3818 | function renderWikiList() { |
| 3819 | const nodes = state.wikiNodes.length ? state.wikiNodes : state.wikiGraph?.nodes?.length ? state.wikiGraph.nodes : DEMO_MODE ? demoWikiNodes : []; |
| 3820 | if (!nodes.length) { |
| 3821 | $("wikiGraph").innerHTML = ` |
| 3822 | <div class="wiki-empty-state"> |
| 3823 | <strong>${escapeHtml(ui().wiki.emptyListTitle)}</strong> |
| 3824 | <p>${escapeHtml(ui().wiki.emptyListBody)}</p> |
| 3825 | </div> |
| 3826 | `; |
| 3827 | return; |
| 3828 | } |
| 3829 | $("wikiGraph").innerHTML = ` |
| 3830 | <div class="wiki-list-view"> |
| 3831 | ${nodes.map((node) => ` |
| 3832 | <button class="result-item" data-node-id="${escapeHtml(graphId(node))}" data-node-title="${escapeHtml(rawGraphTitle(node))}" data-node-body="${escapeHtml(rawGraphBody(node))}" type="button"> |
| 3833 | <h3>${escapeHtml(graphTitle(node))} <span class="status-chip">${escapeHtml(graphTypeLabel(node))}</span></h3> |
| 3834 | <p>${escapeHtml(graphBody(node) || ui().wiki.noSummary)}</p> |
| 3835 | </button> |
| 3836 | `).join("")} |
| 3837 | </div> |
| 3838 | `; |
| 3839 | } |
| 3840 | |
| 3841 | function graphNodesById() { |
| 3842 | const nodes = uniqueGraphNodes([ |
no test coverage detected