@webpieces/nx-webpieces-rules 0.4.977 → 0.4.979
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -21
- package/package.json +7 -7
- package/src/lib/graph-filter.client.d.ts +25 -11
- package/src/lib/graph-filter.client.js +65 -29
- package/src/lib/graph-filter.client.js.map +1 -1
- package/src/lib/graph-multi-select.client.d.ts +57 -0
- package/src/lib/graph-multi-select.client.js +222 -0
- package/src/lib/graph-multi-select.client.js.map +1 -0
- package/src/lib/graph-node-menu.d.ts +1 -1
- package/src/lib/graph-node-menu.js +1 -1
- package/src/lib/graph-node-menu.js.map +1 -1
- package/src/lib/graph-page-shell.d.ts +23 -2
- package/src/lib/graph-page-shell.js +63 -13
- package/src/lib/graph-page-shell.js.map +1 -1
- package/src/lib/graph-page-styles.d.ts +6 -0
- package/src/lib/graph-page-styles.js +38 -10
- package/src/lib/graph-page-styles.js.map +1 -1
- package/src/lib/graph-render-model.js +2 -2
- package/src/lib/graph-render-model.js.map +1 -1
- package/src/lib/graph-visualizer.client.d.ts +39 -19
- package/src/lib/graph-visualizer.client.js +96 -110
- package/src/lib/graph-visualizer.client.js.map +1 -1
- package/src/lib/graph-visualizer.d.ts +7 -11
- package/src/lib/graph-visualizer.js +14 -32
- package/src/lib/graph-visualizer.js.map +1 -1
- package/src/lib/runtime-html-page.d.ts +6 -1
- package/src/lib/runtime-html-page.js +13 -6
- package/src/lib/runtime-html-page.js.map +1 -1
- package/src/lib/runtime-visualizer.client.js +3 -1
- package/src/lib/runtime-visualizer.client.js.map +1 -1
- package/src/lib/runtime-visualizer.js +5 -3
- package/src/lib/runtime-visualizer.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph-visualizer.client.js","sourceRoot":"","sources":["../../../../../../packages/tooling/nx-webpieces-rules/src/lib/graph-visualizer.client.ts"],"names":[],"mappings":";AAAA;;;GAGG;AACH,MAAM,cAAc;IAChB,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AM,IAAI,GAAG,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;YAC5C,IAAI,CAAC,SAAS,CAAC,MAAM,CACjB,WAAW,EACX,IAAI,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAC9D,CAAC;QACN,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AAED,IAAI,SAAS,CAAC,gBAAgB,CAAC,CAAC,MAAM,EAAE,CAAC","sourcesContent":["/**\n * One state of the Filter popover: a change scope plus the selected Runtime, Role and Product chips.\n * The page holds the APPLIED one; the popover edits a copy until \"Show N projects\".\n */\nclass WpFilterChoice {\n scope = 'everything';\n readonly runtimes = new Set<string>();\n readonly roles = new Set<string>();\n readonly products = new Set<string>();\n\n copy(): WpFilterChoice {\n const copy = new WpFilterChoice();\n copy.scope = this.scope;\n for (const runtime of this.runtimes) copy.runtimes.add(runtime);\n for (const role of this.roles) copy.roles.add(role);\n for (const product of this.products) copy.products.add(product);\n return copy;\n }\n\n /** How many filters are active: the drawer button's badge. */\n count(): number {\n return (this.scope === 'everything' ? 0 : 1) + this.runtimes.size + this.roles.size + this.products.size;\n }\n\n /** The chip set a `data-wp-chip-group` (or a pill's group) names. */\n group(name: string): Set<string> {\n if (name === 'role') return this.roles;\n if (name === 'product') return this.products;\n return this.runtimes;\n }\n}\n\n/**\n * The Filter popover's four groups, INTERSECTED: a box stays when it is in the change scope, AND has\n * any selected runtime chip (when one is selected), AND has any selected role chip (likewise), AND\n * belongs to any selected product (likewise — several products are the UNION of their closures).\n */\nclass WpProjectFilter {\n constructor(\n private readonly model: RenderModelJson,\n private readonly modes: WpModeState,\n ) {}\n\n /** The node ids a change scope keeps; null for \"everything\" (and whenever Impact is unavailable). */\n scopeSet(scope: string): Set<string> | null {\n const impact = this.modes.impact;\n if (scope === 'everything' || impact === null || this.modes.impactReason() !== '') return null;\n if (scope === 'edges') return this.modes.edgeEnds();\n const ids: string[] = [...impact.touched];\n if (scope === 'dependents' || scope === 'build') ids.push(...this.modes.affected());\n if (scope === 'dependencies') ids.push(...impact.dependencies);\n if (scope === 'build') ids.push(...impact.buildInputs);\n return new Set(ids);\n }\n\n /** How many drawn projects a scope keeps on its own: the count beside each option. */\n scopeCount(scope: string): number {\n const set = this.scopeSet(scope);\n return this.model.nodes.filter((node: RenderNodeJson): boolean => this.isService(node) && (set === null || set.has(node.id))).length;\n }\n\n /** `base` (everything, or the Hide-unconnected chain) narrowed by `choice`. */\n apply(base: Set<string>, choice: WpFilterChoice): Set<string> {\n const scope = this.scopeSet(choice.scope);\n const kept = new Set<string>();\n for (const node of this.model.nodes) {\n if (!base.has(node.id) || !this.isService(node)) continue;\n if (scope !== null && !scope.has(node.id)) continue;\n if (!this.anyOf(choice.runtimes, node.tags?.frameworks ?? [])) continue;\n if (!this.anyOf(choice.roles, node.tags === null ? [] : [node.tags.role])) continue;\n if (!this.anyOf(choice.products, node.products)) continue;\n kept.add(node.id);\n }\n if (this.model.viewer === 'runtime') {\n for (const node of this.model.nodes) {\n if (node.tags !== null || !base.has(node.id)) continue;\n if (this.model.edges.some(edge => (edge.from === node.id && kept.has(edge.to)) || (edge.to === node.id && kept.has(edge.from)))) kept.add(node.id);\n }\n }\n return kept;\n }\n\n isService(node: RenderNodeJson): boolean { return this.model.viewer !== 'runtime' || node.tags !== null; }\n\n /** An empty chip group matches every box; otherwise the box must carry one of the chips. */\n private anyOf(selected: Set<string>, carried: string[]): boolean {\n return selected.size === 0 || carried.some((value: string): boolean => selected.has(value));\n }\n}\n\n/** Architecture interactions bind to each new SVG; logical Lock/Filter state belongs to the page. */\nclass GraphHighlighter {\n private readonly nodeByName = new Map<string, SVGGElement>();\n private hovered: string | null = null;\n\n constructor(\n private readonly svg: SVGSVGElement,\n private readonly chain: WpGraphChain,\n private readonly model: RenderModelJson,\n private readonly page: GraphPage,\n ) {}\n\n wire(): void {\n this.svg.querySelectorAll<SVGGElement>('g.node').forEach((g: SVGGElement) => {\n if (g.classList.contains('wp-layout')) return;\n const name = g.querySelector('title')?.textContent;\n if (name !== null && name !== undefined) this.nodeByName.set(name, g);\n });\n this.wireHover();\n this.wireMenu();\n this.relight();\n }\n\n private clear(): void {\n this.svg.classList.remove('wp-dim');\n this.svg.querySelectorAll('.wp-focus, .wp-neighbor, .wp-hl, .wp-locked').forEach((el: Element) => {\n el.classList.remove('wp-focus', 'wp-neighbor', 'wp-hl', 'wp-locked');\n });\n }\n\n relight(): void {\n this.clear();\n const locked = this.page.lockSelection();\n if (locked !== null) this.nodeByName.get(locked)?.classList.add('wp-locked');\n // A filtered-out Lock is suspended, including its otherwise visible relatives.\n const anchors = [locked, this.hovered].filter(\n (name: string | null): name is string => name !== null && this.nodeByName.has(name),\n );\n if (anchors.length === 0) return;\n const lit = new Set<string>();\n for (const name of anchors) {\n this.nodeByName.get(name)?.classList.add('wp-focus');\n for (const id of this.chain.nodes(name)) {\n if (this.nodeByName.has(id)) lit.add(id);\n }\n }\n this.svg.classList.add('wp-dim');\n for (const id of lit) this.nodeByName.get(id)?.classList.add('wp-neighbor');\n for (const edge of this.model.edges) {\n if (lit.has(edge.from) && lit.has(edge.to)) {\n this.svg.querySelector(`[id=\"${edge.id}\"]`)?.classList.add('wp-hl');\n }\n }\n }\n\n private wireHover(): void {\n this.nodeByName.forEach((g: SVGGElement, name: string) => {\n g.addEventListener('mouseenter', () => {\n this.hovered = name;\n this.relight();\n });\n g.addEventListener('mouseleave', () => {\n this.hovered = null;\n this.relight();\n });\n });\n }\n\n private wireMenu(): void {\n const designs = new Map<string, string>();\n for (const link of __DESIGN_LINKS__) designs.set(link.nodeId, link.href);\n WpNodeMenu.wire(this.svg, (name: string, node: SVGGElement): WpNodeMenuItem[] => {\n const items: WpNodeMenuItem[] = [];\n const href = designs.get(name);\n if (href !== undefined)\n items.push(new WpNodeMenuItem('View Design', () => window.open(href, '_blank')));\n const locked = this.page.lockSelection() === name;\n items.push(\n new WpNodeMenuItem(locked ? 'Unlock' : 'Lock', () =>\n locked ? this.page.clearSelection() : this.page.setLock(name),\n ),\n );\n items.push(this.page.filterItem(name));\n items.unshift(...this.page.impactItems(name, node));\n const implemented = window.__WP_RUNTIME__?.implementsItem(name, node);\n if (implemented) items.push(implemented);\n const goal = window.__WP_GOAL__?.item(name, node);\n if (goal) items.push(goal);\n return items;\n });\n }\n}\n\n/**\n * The Filter popover: edits a COPY of the page's applied filter, shows what each choice would keep,\n * and hands the copy to the page on \"Show N projects\". Closing it any other way discards the edit.\n */\nclass GraphFilterPopover {\n private draft = new WpFilterChoice();\n\n constructor(private readonly page: GraphPage) {}\n\n wire(): void {\n this.byId('wp-filter-open')?.addEventListener('click', (ev: MouseEvent) => {\n ev.stopPropagation();\n if (this.isOpen()) this.close();\n else this.open();\n });\n this.byId('wp-filter-close')?.addEventListener('click', () => this.close());\n this.byId('wp-filter-clear')?.addEventListener('click', () => {\n this.draft = new WpFilterChoice();\n this.paint();\n });\n this.byId('wp-filter-apply')?.addEventListener('click', () => {\n this.page.applyFilter(this.draft.copy());\n this.close();\n });\n document.querySelectorAll<HTMLInputElement>('input[name=\"wp-scope\"]').forEach((radio: HTMLInputElement) => {\n radio.addEventListener('change', () => {\n if (!radio.checked) return;\n this.draft.scope = radio.value;\n this.paint();\n });\n });\n document.querySelectorAll<HTMLButtonElement>('.wp-chip[data-wp-chip]').forEach((chip: HTMLButtonElement) => {\n chip.addEventListener('click', () => {\n const set = this.draft.group(chip.dataset['wpChipGroup'] ?? '');\n const value = chip.dataset['wpChip'] ?? '';\n if (set.has(value)) set.delete(value);\n else set.add(value);\n this.paint();\n });\n });\n }\n\n isOpen(): boolean {\n return this.byId('wp-filter-pop')?.hidden === false;\n }\n\n /** The active Impact scan changed: an open popover's counts and labels follow it. */\n refresh(): void {\n if (this.isOpen()) this.paint();\n }\n\n open(): void {\n const pop = this.byId('wp-filter-pop');\n if (pop === null) return;\n this.draft = this.page.appliedFilter().copy();\n this.paint();\n pop.hidden = false;\n this.byId('wp-filter-open')?.setAttribute('aria-expanded', 'true');\n }\n\n close(): void {\n const pop = this.byId('wp-filter-pop');\n if (pop === null || pop.hidden) return;\n pop.hidden = true;\n this.byId('wp-filter-open')?.setAttribute('aria-expanded', 'false');\n }\n\n /** Repaint the controls from the draft: checked scope, pressed chips, counts and the footer. */\n private paint(): void {\n const reason = this.page.scopeReason();\n const group = this.byId('wp-scope-group') as HTMLFieldSetElement | null;\n if (group !== null) group.disabled = reason !== '';\n const reasonEl = this.byId('wp-scope-reason');\n if (reasonEl !== null) {\n reasonEl.textContent = reason;\n reasonEl.hidden = reason === '';\n }\n document.querySelectorAll<HTMLInputElement>('input[name=\"wp-scope\"]').forEach((radio: HTMLInputElement) => {\n radio.checked = radio.value === this.draft.scope;\n });\n document.querySelectorAll<HTMLElement>('[data-wp-scope-count]').forEach((count: HTMLElement) => {\n count.textContent = reason === '' ? String(this.page.scopeCount(count.dataset['wpScopeCount'] ?? '')) : '';\n });\n document.querySelectorAll<HTMLButtonElement>('.wp-chip[data-wp-chip]').forEach((chip: HTMLButtonElement) => {\n const set = this.draft.group(chip.dataset['wpChipGroup'] ?? '');\n chip.setAttribute('aria-pressed', String(set.has(chip.dataset['wpChip'] ?? '')));\n });\n const apply = this.byId('wp-filter-apply');\n if (apply !== null) {\n const shown = this.page.preview(this.draft);\n apply.textContent = `Show ${shown} ${this.page.noun()}${shown === 1 ? '' : 's'}`;\n }\n }\n\n private byId(id: string): HTMLElement | null {\n return document.getElementById(id);\n }\n}\n\n/**\n * The drawer and its floating panels: every control outside the graph itself. Holds no graph state —\n * each control calls back into the page, and `sync()` repaints the controls from the page's state.\n */\nclass GraphDrawer {\n readonly popover: GraphFilterPopover;\n private readonly openers = new Map<string, HTMLElement>();\n\n constructor(private readonly page: GraphPage) {\n this.popover = new GraphFilterPopover(page);\n }\n\n wire(): void {\n this.wireModeMenu();\n this.popover.wire();\n this.wireImpactKinds();\n this.wireLock();\n this.byId('wp-lock-toggle')?.addEventListener('click', () => this.page.toggleLock());\n this.byId('wp-filter-toggle')?.addEventListener('click', () => this.page.toggleFilter());\n this.toggles('wp-collapse', 'wp-shell', true);\n this.toggles('wp-help-btn', 'wp-help', false);\n this.toggles('wp-help-close', 'wp-help', false);\n this.toggles('wp-legend-pop', 'wp-legend-popout', false);\n this.toggles('wp-legend-close', 'wp-legend-popout', false);\n this.toggles('wp-resp-open', 'wp-resp-panel', false);\n this.toggles('wp-resp-close', 'wp-resp-panel', false);\n this.toggles('wp-snapshot-open', 'wp-snapshot', false);\n window.addEventListener('keydown', (ev: KeyboardEvent) => this.onKey(ev), true);\n window.addEventListener('hashchange', () => this.page.setMode(location.hash.slice(1)));\n document.addEventListener('click', (ev: MouseEvent) => {\n const target = ev.target;\n if (target instanceof Node && this.byId('wp-mode-menu')?.parentElement?.contains(target)) return;\n this.closeModeMenu(false);\n this.dismissOutside(target);\n });\n }\n\n /** \"Color by\": the pill trigger opens the menu of four; picking one switches and closes it. */\n private wireModeMenu(): void {\n this.byId('wp-mode-trigger')?.addEventListener('click', (ev: MouseEvent) => {\n ev.stopPropagation();\n const menu = this.byId('wp-mode-menu');\n if (menu === null) return;\n if (!menu.hidden) {\n this.closeModeMenu(false);\n return;\n }\n menu.hidden = false;\n this.byId('wp-mode-trigger')?.setAttribute('aria-expanded', 'true');\n menu.querySelector<HTMLButtonElement>('.wp-mode[aria-checked=\"true\"]')?.focus({ preventScroll: true });\n });\n document.querySelectorAll<HTMLButtonElement>('.wp-mode[data-wp-mode]').forEach((button: HTMLButtonElement) => {\n button.addEventListener('click', (ev: MouseEvent) => {\n ev.stopPropagation();\n this.closeModeMenu(true);\n this.page.setMode(button.dataset['wpMode'] ?? 'runtime');\n });\n });\n }\n\n /** The \"Changed on this branch\" / \"Last commit\" toggle, in the drawer and in the Filter popover. */\n private wireImpactKinds(): void {\n document.querySelectorAll<HTMLButtonElement>('[data-wp-impact-kind]').forEach((button: HTMLButtonElement) => {\n button.addEventListener('click', (ev: MouseEvent) => {\n ev.stopPropagation();\n this.page.setImpactKind(button.dataset['wpImpactKind'] ?? '');\n this.popover.refresh();\n });\n });\n }\n\n /** Shown only when two scans exist; the drawer's copy only while Impact colors the graph. */\n private syncImpactKinds(modes: WpModeState): void {\n document.querySelectorAll<HTMLElement>('[data-wp-impact-kinds]').forEach((group: HTMLElement) => {\n const inDrawer = group.dataset['wpImpactKinds'] === 'drawer';\n group.hidden = modes.scans.length < 2 || (inDrawer && modes.mode !== 'impact');\n });\n document.querySelectorAll<HTMLButtonElement>('[data-wp-impact-kind]').forEach((button: HTMLButtonElement) => {\n const kind = button.dataset['wpImpactKind'] ?? '';\n button.setAttribute('aria-pressed', String(kind === modes.kind));\n button.disabled = !modes.kindAvailable(kind);\n const scan = modes.scans.find((candidate: ImpactJson): boolean => candidate.kind === kind);\n button.title = scan === undefined ? '' : scan.available ? scan.label : scan.reason;\n });\n const legend = this.byId('wp-scope-legend');\n if (legend !== null) legend.textContent = modes.impact?.label ?? 'Changes on this branch';\n }\n\n private closeModeMenu(returnFocus: boolean): void {\n const menu = this.byId('wp-mode-menu');\n if (menu === null || menu.hidden) return;\n menu.hidden = true;\n const trigger = this.byId('wp-mode-trigger');\n trigger?.setAttribute('aria-expanded', 'false');\n if (returnFocus) trigger?.focus({ preventScroll: true });\n }\n\n /** Type-to-search lock: an exact project id (or a unique short name) locks, empty or Esc unlocks. */\n private wireLock(): void {\n const input = this.lockInput();\n if (input === null) return;\n input.addEventListener('input', () => {\n const value = input.value.trim();\n if (value === '') this.page.clearSelection();\n else if (this.page.hasNode(value)) this.page.setLock(value);\n });\n input.addEventListener('change', () => {\n const match = this.page.resolveName(input.value.trim());\n if (match !== null) this.page.setLock(match);\n else input.value = this.page.lockSelection() ?? '';\n });\n input.addEventListener('keydown', (ev: KeyboardEvent) => {\n if (ev.key !== 'Escape') return;\n ev.preventDefault();\n input.value = '';\n this.page.clearSelection();\n input.blur();\n });\n }\n\n /**\n * Page keys, in the CAPTURE phase so the open/closed state of the node menu is read before the\n * menu's own Escape handler closes it: Esc with a menu open only closes the menu. Esc closes an\n * open Color-by menu or Filter popover first, too.\n */\n private onKey(ev: KeyboardEvent): void {\n if (ev.altKey || ev.ctrlKey || ev.metaKey) return;\n if (ev.key === 'Escape' && this.byId('wp-mode-menu')?.hidden === false) {\n this.closeModeMenu(true);\n return;\n }\n if (ev.key === 'Escape' && this.popover.isOpen()) {\n this.popover.close();\n return;\n }\n if (ev.key === 'Escape' && this.dismissOverlay()) return;\n const target = ev.target;\n if (target instanceof HTMLInputElement || target instanceof HTMLTextAreaElement) return;\n const menuOpen = document.getElementById('wp-node-menu') !== null || document.querySelector('.wp-graph-details:not([hidden]), .wp-goal-details:not([hidden]), .wp-impact-why:not([hidden])') !== null;\n if (ev.key === '/') {\n this.byId('wp-shell')?.classList.remove('wp-collapsed');\n this.byId('wp-collapse')?.setAttribute('aria-expanded', 'true');\n ev.preventDefault();\n this.lockInput()?.focus();\n return;\n }\n const index = ['1', '2', '3', '4', '5'].indexOf(ev.key);\n if (index >= 0 && !menuOpen) {\n this.page.setMode(WpModeState.MODES[index]);\n return;\n }\n if (ev.key === 'Escape' && !menuOpen && this.page.lockSelection() !== null) this.page.setLock(null);\n }\n\n /** `button` shows/hides `target`; for the drawer itself it toggles the collapsed class instead. */\n private toggles(buttonId: string, targetId: string, collapse: boolean): void {\n const button = this.byId(buttonId);\n const target = this.byId(targetId);\n if (button === null || target === null) return;\n button.addEventListener('click', (ev: MouseEvent) => {\n ev.stopPropagation();\n let expanded: boolean;\n if (collapse) {\n expanded = !target.classList.toggle('wp-collapsed');\n } else {\n target.hidden = !target.hidden;\n expanded = !target.hidden;\n if (expanded) this.openers.set(targetId, button);\n else this.openers.get(targetId)?.focus({ preventScroll: true });\n }\n document.querySelectorAll(`[aria-controls=\"${targetId}\"], #${buttonId}[aria-expanded]`).forEach(\n (el: Element) => el.setAttribute('aria-expanded', String(expanded)),\n );\n });\n }\n\n private dismissOverlay(): boolean {\n for (const id of ['wp-help', 'wp-legend-popout', 'wp-snapshot', 'wp-resp-panel']) {\n const panel = this.byId(id);\n if (!panel || panel.hidden) continue;\n panel.hidden = true;\n this.openers.get(id)?.focus({ preventScroll: true });\n this.openers.get(id)?.setAttribute('aria-expanded', 'false');\n return true;\n }\n return false;\n }\n\n private dismissOutside(target: EventTarget | null): void {\n if (!(target instanceof Node)) return;\n const filter = this.byId('wp-filter-pop');\n if (this.popover.isOpen() && !filter?.contains(target) && !this.byId('wp-filter-open')?.contains(target)) this.popover.close();\n for (const entry of this.openers) {\n const id = entry[0];\n const opener = entry[1];\n const panel = this.byId(id);\n if (panel && !panel.hidden && !panel.contains(target) && !opener.contains(target)) {\n panel.hidden = true;\n opener.setAttribute('aria-expanded', 'false');\n }\n }\n }\n\n /** Repaint every control from the page's state. */\n sync(modes: WpModeState, locked: string | null, filtering: boolean, filter: WpFilterChoice): void {\n const reason = modes.impactReason();\n document.querySelectorAll<HTMLButtonElement>('.wp-mode[data-wp-mode]').forEach((button: HTMLButtonElement) => {\n const mode = button.dataset['wpMode'] ?? '';\n button.setAttribute('aria-checked', String(mode === modes.mode));\n button.disabled = !modes.available(mode);\n if (mode === 'impact') button.title = reason === '' ? 'Key 3' : reason;\n if (mode === 'product') button.title = modes.productReason() === '' ? 'Key 4' : modes.productReason();\n if (mode === 'goal') {\n // Unavailable is said in the menu itself, never shown as \"no differences\" (#1239).\n button.title = modes.goalReason() === '' ? 'Key 5' : modes.goalReason();\n const sub = button.querySelector('.wp-mode-sub');\n if (sub !== null) sub.textContent = modes.goalSubtitle();\n }\n });\n this.text('wp-mode-current', modes.name(modes.mode));\n this.text('wp-mode-current-sub', modes.subtitle(modes.mode));\n const reasonEl = this.byId('wp-impact-reason');\n if (reasonEl !== null) {\n reasonEl.textContent = reason;\n reasonEl.hidden = reason === '';\n }\n document.querySelectorAll<HTMLElement>('[data-wp-legend-mode]').forEach((section: HTMLElement) => {\n section.hidden = section.dataset['wpLegendMode'] !== modes.mode;\n });\n document.querySelectorAll<HTMLElement>('[data-wp-impact-note]').forEach((note: HTMLElement) => {\n note.textContent = this.impactNote(modes);\n });\n // \"unexplained\" is a row only when the active scan has one.\n document.querySelectorAll<HTMLElement>('[data-wp-legend=\"unexplained\"]').forEach((row: HTMLElement) => {\n row.hidden = (modes.impact?.unexplained.length ?? 0) === 0;\n });\n this.syncImpactKinds(modes);\n const title = this.byId('wp-legend-pop-title');\n if (title !== null) title.textContent = `Legend · ${modes.name(modes.mode)}`;\n const input = this.lockInput();\n if (input !== null && document.activeElement !== input) input.value = this.page.focusSelection() ?? '';\n const lockToggle = this.byId('wp-lock-toggle') as HTMLButtonElement | null;\n if (lockToggle !== null) {\n lockToggle.setAttribute('aria-pressed', String(locked !== null));\n lockToggle.disabled = locked === null && this.page.focusSelection() === null;\n lockToggle.title = lockToggle.disabled ? 'Select a node in Focus first' : '';\n }\n this.syncFilterToggle(locked, filtering);\n this.syncFilter(filter);\n this.crumb(modes.name(modes.mode), locked);\n }\n\n private syncFilterToggle(locked: string | null, filtering: boolean): void {\n const toggle = this.byId('wp-filter-toggle') as HTMLButtonElement | null;\n if (toggle === null) return;\n toggle.setAttribute('aria-pressed', String(filtering));\n toggle.disabled = !filtering && locked === null;\n toggle.title = toggle.disabled ? 'Lock a project first' : '';\n }\n\n /** The drawer button's count badge, and one removable pill per active filter in the top bar. */\n private syncFilter(filter: WpFilterChoice): void {\n const badge = this.byId('wp-filter-badge');\n if (badge !== null) {\n badge.textContent = String(filter.count());\n badge.hidden = filter.count() === 0;\n }\n const pills = this.byId('wp-filter-pills');\n if (pills === null) return;\n const items: HTMLElement[] = [];\n if (filter.scope !== 'everything') items.push(this.pill(this.scopeLabel(filter.scope), 'scope', filter.scope));\n for (const runtime of filter.runtimes) items.push(this.pill(runtime, 'runtime', runtime));\n for (const role of filter.roles) items.push(this.pill(role, 'role', role));\n for (const product of filter.products) items.push(this.pill(`product: ${product}`, 'product', product));\n pills.replaceChildren(...items);\n }\n\n /** A change scope's name, read from the Filter popover's markup: the shell owns the ONE copy. */\n private scopeLabel(scope: string): string {\n return document.querySelector(`[data-wp-scope-label=\"${scope}\"]`)?.textContent ?? scope;\n }\n\n /** A pill, built with text nodes so no value is parsed as HTML. */\n private pill(label: string, group: string, value: string): HTMLElement {\n const pill = document.createElement('span');\n pill.className = 'wp-pill';\n pill.dataset['wpPill'] = `${group}:${value}`;\n pill.append(label);\n const remove = document.createElement('button');\n remove.type = 'button';\n remove.textContent = '✕';\n remove.setAttribute('aria-label', `Remove filter ${label}`);\n remove.addEventListener('click', (ev: MouseEvent) => {\n ev.stopPropagation();\n this.page.removeFilter(group, value);\n });\n pill.append(remove);\n return pill;\n }\n\n private impactNote(modes: WpModeState): string {\n const impact = modes.impact;\n if (impact === null || !impact.available) return '';\n // An available scan with a note is an EMPTY one, e.g. \"Nothing changed on this branch yet\".\n if (impact.reason !== '') return `${impact.label}: ${impact.reason}.`;\n const stats = `${impact.label}: ${new WpImpactWhy().counts(impact)} — nx affected, ${impact.changedFiles} changed files.`;\n const cause = this.globalCause(impact, modes.affected().length);\n return [cause === '' ? '' : `${cause}.`, stats, modes.edgeNote()].filter((part: string): boolean => part !== '').join(' ');\n }\n\n /**\n * When files changed but no project owns one, everything nx affected is affected by a\n * workspace-global input (a lockfile, the workspace manifest). That is correct for CI, and\n * baffling on a graph, so the note names the cause.\n */\n private globalCause(impact: ImpactJson, affected: number): string {\n if (impact.touched.length > 0 || impact.changedFiles === 0) return '';\n const who = affected >= this.page.projectCount() ? 'Every project affected' : `${affected} projects affected`;\n const files = impact.globalFiles;\n if (files.length === 0)\n return `${who}: ${impact.changedFiles} changed files that no project owns (workspace-global input)`;\n const named = files.slice(0, 2).join(', ') + (files.length > 2 ? ` and ${files.length - 2} more` : '');\n return `${who}: ${named} changed (workspace-global input${files.length > 1 ? 's' : ''})`;\n }\n\n /** \"Mode: <b>Runtime</b> · Locked: <b>x</b>\", built with text nodes so no name is parsed as HTML. */\n private crumb(mode: string, locked: string | null): void {\n const crumb = this.byId('wp-crumb');\n if (crumb === null) return;\n const bold = (text: string): HTMLElement => {\n const b = document.createElement('b');\n b.textContent = text;\n return b;\n };\n const parts: (string | Node)[] = ['Mode: ', bold(mode)];\n if (locked !== null) parts.push(' · Locked: ', bold(locked));\n crumb.replaceChildren(...parts);\n }\n\n private text(id: string, value: string): void {\n const el = this.byId(id);\n if (el !== null) el.textContent = value;\n }\n\n private lockInput(): HTMLInputElement | null {\n return document.getElementById('wp-lock') as HTMLInputElement | null;\n }\n\n private byId(id: string): HTMLElement | null {\n return document.getElementById(id);\n }\n}\n\nclass GraphPage extends WpFilterPage {\n private highlighter: GraphHighlighter | null = null;\n private selected: string | null = null;\n /** The page's own graph; Goal vs Current swaps in its overlay and back (#1239). */\n private readonly base: RenderModelJson = this.model;\n private readonly modes = new WpModeState(\n this.model.nodes.some((node: RenderNodeJson): boolean => node.products.length > 0),\n this.model.viewer ?? 'architecture',\n this.goalUnavailable(),\n this.model.comparison?.menuNote || this.goalUnavailable(),\n );\n private projects = new WpProjectFilter(this.model, this.modes);\n private applied = new WpFilterChoice();\n private readonly drawer = new GraphDrawer(this);\n private readonly why = new ImpactWhyPanel();\n\n private readonly edges = new WpEdgeOverlay(this.modes);\n /**\n * The products switched ON in the Product legend (#1319): the first two in legend order at EVERY\n * load. Never persisted — no storage, no hash — so the page stays stateless.\n */\n private readonly toggles = new WpProductToggles();\n private readonly productsOn: Set<string> = new WpProductSelection().initialOn(this.toggles.products());\n private painter: WpProductPainter = this.toggles.painter(this.base.legend.palette.colors, this.productsOn);\n\n /** In Impact mode a box's menu leads with WHY it is in the build, and its edge changes (#1264). */\n impactItems(name: string, node: SVGGElement): WpNodeMenuItem[] {\n if (this.modes.mode !== 'impact') return [];\n const items: WpNodeMenuItem[] = [];\n const reason = this.modes.reason(name);\n const title = reason === null ? '' : (WpImpactWhy.TITLES[reason.kind] ?? reason.kind).toLowerCase();\n if (reason !== null) items.push(new WpNodeMenuItem(`Why in this build? (${title})`, () => this.why.open(node, reason)));\n const lines = this.edges.nodeLines(name);\n if (lines.length > 0) items.push(new WpNodeMenuItem(`Edge changes (${lines.length})`, () => this.why.show(node, `Edge changes: ${name}`, lines)));\n return items;\n }\n\n protected override captureBinding(_svg: SVGSVGElement | null): () => void {\n const previous = this.highlighter;\n return (): void => {\n this.highlighter = previous;\n this.filterCards();\n this.syncControls();\n };\n }\n\n protected override wireControls(): void {\n this.syncModel();\n this.drawer.wire();\n this.toggles.wire((product: string, on: boolean): void => this.setProductOn(product, on));\n this.syncControls();\n }\n\n /** '' when this page can show Goal vs Current, else why not. */\n private goalUnavailable(): string {\n if (this.model.viewer !== 'runtime') return 'Goal vs Current compares runtime architecture only.';\n const comparison = this.model.comparison;\n if (comparison === undefined || comparison === null)\n return 'This page carries no Goal vs Current data. Re-open it with pnpm nx run architecture:visualize-runtime.';\n return comparison.available ? '' : comparison.reason;\n }\n\n /** Goal vs Current draws its overlay topology; every other mode draws the page's own graph. */\n private syncModel(): void {\n const overlay = this.base.comparison?.model ?? null;\n let next = this.modes.mode === 'goal' && overlay !== null ? overlay : this.base;\n if (this.modes.mode === 'impact' && this.edges.any()) next = this.edges.model(this.base);\n if (next === this.model) return;\n this.useModel(next);\n this.projects = new WpProjectFilter(next, this.modes);\n }\n\n protected override nodeDot(node: RenderNodeJson): string {\n const modes = node.modes;\n if (modes === null) return node.dot;\n if (this.modes.mode === 'architecture') return modes.architecture;\n if (this.modes.mode === 'impact') return modes[this.modes.status(node.id)];\n if (this.modes.mode === 'product') return this.painter.nodeDot(modes.product, node.products);\n return modes.runtime;\n }\n\n /**\n * Product mode dashes a dependency that crosses into another product (#1204) while that product is\n * ON (#1319); every other mode draws it plain.\n */\n protected override edgeDot(edge: RenderEdgeJson): string {\n if (this.modes.mode === 'product') return this.painter.edgeDot(edge);\n if (this.modes.mode === 'impact') return this.edges.edgeDot(edge) ?? edge.dot;\n return edge.dot;\n }\n\n protected override usesFullDot(): boolean {\n return (this.modes.mode === 'runtime' || this.modes.mode === 'goal') && this.applied.count() === 0;\n }\n\n protected override narrow(retained: Set<string>): Set<string> {\n return this.projects.apply(retained, this.applied);\n }\n\n /** Filtering keeps every box in its own L-row: an emptied level stays as a thin labeled band. */\n protected override keepsEmptyLevels(): boolean {\n return true;\n }\n\n protected override prepareSvg(svg: SVGSVGElement): void { window.__WP_RUNTIME__?.prepare(svg); }\n\n protected wireSvg(svg: SVGSVGElement): void {\n this.highlighter = new GraphHighlighter(svg, this.chain, this.model, this);\n this.highlighter.wire();\n if (this.modes.mode === 'impact') this.edges.decorate(svg, this.why);\n this.filterCards();\n this.syncControls();\n svg.querySelectorAll<SVGGElement>('g.node').forEach((node: SVGGElement) => {\n if (node.querySelector('title')?.textContent === this.anchor)\n node.classList.add('wp-filter-anchor');\n });\n }\n\n lockSelection(): string | null {\n return this.locked;\n }\n\n hasNode(id: string): boolean {\n return this.model.nodes.some((node: RenderNodeJson): boolean => node.id === id);\n }\n\n noun(): string { return this.model.viewer === 'runtime' ? 'service' : 'project'; }\n\n projectCount(): number { return this.model.nodes.filter(node => this.projects.isService(node)).length; }\n\n focusSelection(): string | null { return this.selected; }\n\n toggleLock(): void {\n if (this.locked !== null) this.setLock(null);\n else if (this.selected !== null) this.setLock(this.selected);\n }\n\n /** An exact id, else the one id whose short name (after any scope) is `text`; null if none or several. */\n resolveName(text: string): string | null {\n if (text === '') return null;\n if (this.hasNode(text)) return text;\n const matches = this.model.nodes.filter(\n (node: RenderNodeJson): boolean => node.id.split('/').pop() === text,\n );\n return matches.length === 1 ? matches[0].id : null;\n }\n\n setLock(name: string | null): void {\n this.locked = name;\n if (name !== null) this.selected = name;\n this.highlighter?.relight();\n this.filterCards();\n this.syncControls();\n }\n\n clearSelection(): void { this.selected = null; this.setLock(null); }\n\n setMode(mode: string): void {\n if (mode === this.modes.mode || !this.modes.set(mode)) return;\n this.syncModel();\n this.syncControls();\n this.redraw();\n }\n\n /** A product legend toggle (#1319): repaint at once from the new ON set. */\n setProductOn(product: string, on: boolean): void {\n if (on) this.productsOn.add(product);\n else this.productsOn.delete(product);\n this.painter = this.toggles.painter(this.base.legend.palette.colors, this.productsOn);\n this.syncControls();\n if (this.modes.mode === 'product') this.redraw();\n }\n\n /** Switch the active Impact scan: Impact recolours and an active change-scope filter re-applies. */\n setImpactKind(kind: string): void {\n if (kind === this.modes.kind || !this.modes.setKind(kind)) return;\n this.syncControls();\n this.redraw();\n }\n\n /** The drawer's \"Hide unconnected\": filter to the locked box's chain, or turn the filter off. */\n toggleFilter(): void {\n if (this.anchor !== null) this.filter(null);\n else if (this.locked !== null) this.filter(this.locked);\n }\n\n appliedFilter(): WpFilterChoice {\n return this.applied;\n }\n\n /** '' when the change-scope group can be used, else Impact's reason (the group is disabled). */\n scopeReason(): string {\n return this.modes.impactReason();\n }\n\n scopeCount(scope: string): number {\n if (this.model.viewer !== 'runtime') return this.projects.scopeCount(scope);\n const choice = new WpFilterChoice(); choice.scope = scope;\n return this.preview(choice);\n }\n\n /** How many boxes `choice` would show, with the current Hide-unconnected chain. */\n preview(choice: WpFilterChoice): number {\n const base =\n this.anchor === null\n ? new Set(this.model.nodes.map((node: RenderNodeJson): string => node.id))\n : this.chain.nodes(this.anchor);\n const kept = this.projects.apply(base, choice);\n return this.model.nodes.filter(node => kept.has(node.id) && this.projects.isService(node)).length;\n }\n\n applyFilter(choice: WpFilterChoice): void {\n if (this.scopeReason() !== '') choice.scope = 'everything';\n this.applied = choice;\n this.syncControls();\n this.redraw();\n }\n\n /** A top-bar pill's ✕. */\n removeFilter(group: string, value: string): void {\n const next = this.applied.copy();\n if (group === 'scope') next.scope = 'everything';\n else next.group(group).delete(value);\n this.applyFilter(next);\n }\n\n private syncControls(): void {\n document.body.dataset['wpMode'] = this.modes.mode;\n this.drawer.sync(this.modes, this.locked, this.anchor !== null, this.applied);\n this.toggles.sync(this.productsOn);\n const count = this.model.nodes.filter(node => this.retained.has(node.id) && this.projects.isService(node)).length;\n const empty = document.getElementById('wp-empty');\n if (empty !== null) empty.hidden = count !== 0;\n const context = document.getElementById('wp-context-count');\n if (context !== null) context.textContent = `${count} services · ${this.retained.size - count} contextual nodes`;\n this.syncLegend();\n }\n\n private syncLegend(): void {\n document.querySelectorAll<HTMLElement>('[data-wp-legend-value]').forEach(row => {\n const group = row.dataset['wpLegendGroup'];\n const value = row.dataset['wpLegendValue'] ?? '';\n row.hidden = !this.model.nodes.some(node => this.retained.has(node.id) &&\n (group === 'runtime' ? (value === 'unknown' ? node.tags !== null && node.tags.frameworks.length === 0 : node.tags?.frameworks.includes(value)) : group === 'role' ? node.tags?.role === value : node.products.includes(value)));\n });\n }\n\n private filterCards(): void {\n const lit = this.locked === null ? this.retained : this.chain.nodes(this.locked);\n document.querySelectorAll('.wp-resp-card').forEach((card: Element) => {\n const name = card.getAttribute('data-node');\n card.classList.toggle(\n 'wp-hidden',\n name === null || !this.retained.has(name) || !lit.has(name),\n );\n });\n }\n}\n\nnew GraphPage(__RENDER_MODEL__).render();\n"]}
|
|
1
|
+
{"version":3,"file":"graph-visualizer.client.js","sourceRoot":"","sources":["../../../../../../packages/tooling/nx-webpieces-rules/src/lib/graph-visualizer.client.ts"],"names":[],"mappings":";AAAA;;;GAGG;AACH,MAAM,cAAc;IAChB,KAAK,GAAG,YAAY,CAAC;IACZ,QAAQ,GAAG,IAAI,GAAG,EAAU,CAAC;IAC7B,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;IAC1B,QAAQ,GAAG,IAAI,GAAG,EAAU,CAAC;IAEtC,IAAI;QACA,MAAM,IAAI,GAAG,IAAI,cAAc,EAAE,CAAC;QAClC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACxB,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,QAAQ;YAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAChE,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK;YAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAA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AC,CAC9D,CAAC;QACN,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AAED,IAAI,SAAS,CAAC,gBAAgB,CAAC,CAAC,MAAM,EAAE,CAAC","sourcesContent":["/**\n * One state of the Filter popover: a change scope plus the selected Runtime, Role and Product chips.\n * The page holds the APPLIED one; the popover edits a copy until \"Show N projects\".\n */\nclass WpFilterChoice {\n scope = 'everything';\n readonly runtimes = new Set<string>();\n readonly roles = new Set<string>();\n readonly products = new Set<string>();\n\n copy(): WpFilterChoice {\n const copy = new WpFilterChoice();\n copy.scope = this.scope;\n for (const runtime of this.runtimes) copy.runtimes.add(runtime);\n for (const role of this.roles) copy.roles.add(role);\n for (const product of this.products) copy.products.add(product);\n return copy;\n }\n\n /** How many filters are active: the drawer button's badge. */\n count(): number {\n return (this.scope === 'everything' ? 0 : 1) + this.runtimes.size + this.roles.size + this.products.size;\n }\n\n /** The chip set a `data-wp-chip-group` (or a pill's group) names. */\n group(name: string): Set<string> {\n if (name === 'role') return this.roles;\n if (name === 'product') return this.products;\n return this.runtimes;\n }\n}\n\n/**\n * The Filter popover's four groups, INTERSECTED: a box stays when it is in the change scope, AND has\n * any selected runtime chip (when one is selected), AND has any selected role chip (likewise), AND\n * belongs to any selected product (likewise — several products are the UNION of their closures).\n */\nclass WpProjectFilter {\n constructor(\n private readonly model: RenderModelJson,\n private readonly modes: WpModeState,\n ) {}\n\n /** The node ids a change scope keeps; null for \"everything\" (and whenever Impact is unavailable). */\n scopeSet(scope: string): Set<string> | null {\n const impact = this.modes.impact;\n if (scope === 'everything' || impact === null || this.modes.impactReason() !== '') return null;\n if (scope === 'edges') return this.modes.edgeEnds();\n const ids: string[] = [...impact.touched];\n if (scope === 'dependents' || scope === 'build') ids.push(...this.modes.affected());\n if (scope === 'dependencies') ids.push(...impact.dependencies);\n if (scope === 'build') ids.push(...impact.buildInputs);\n return new Set(ids);\n }\n\n /** How many drawn projects a scope keeps on its own: the count beside each option. */\n scopeCount(scope: string): number {\n const set = this.scopeSet(scope);\n return this.model.nodes.filter((node: RenderNodeJson): boolean => this.isService(node) && (set === null || set.has(node.id))).length;\n }\n\n /** `base` (everything, or the Hide-unconnected chain) narrowed by `choice`. */\n apply(base: Set<string>, choice: WpFilterChoice): Set<string> {\n const scope = this.scopeSet(choice.scope);\n const kept = new Set<string>();\n for (const node of this.model.nodes) {\n if (!base.has(node.id) || !this.isService(node)) continue;\n if (scope !== null && !scope.has(node.id)) continue;\n if (!this.anyOf(choice.runtimes, node.tags?.frameworks ?? [])) continue;\n if (!this.anyOf(choice.roles, node.tags === null ? [] : [node.tags.role])) continue;\n if (!this.anyOf(choice.products, node.products)) continue;\n kept.add(node.id);\n }\n if (this.model.viewer === 'runtime') {\n for (const node of this.model.nodes) {\n if (node.tags !== null || !base.has(node.id)) continue;\n if (this.model.edges.some(edge => (edge.from === node.id && kept.has(edge.to)) || (edge.to === node.id && kept.has(edge.from)))) kept.add(node.id);\n }\n }\n return kept;\n }\n\n isService(node: RenderNodeJson): boolean { return this.model.viewer !== 'runtime' || node.tags !== null; }\n\n /** An empty chip group matches every box; otherwise the box must carry one of the chips. */\n private anyOf(selected: Set<string>, carried: string[]): boolean {\n return selected.size === 0 || carried.some((value: string): boolean => selected.has(value));\n }\n}\n\n/** Architecture interactions bind to each new SVG; logical Focus/Keep state belongs to the page. */\nclass GraphHighlighter {\n private readonly nodeByName = new Map<string, SVGGElement>();\n private hovered: string | null = null;\n\n constructor(\n private readonly svg: SVGSVGElement,\n private readonly chain: WpGraphChain,\n private readonly model: RenderModelJson,\n private readonly page: GraphPage,\n ) {}\n\n wire(): void {\n this.svg.querySelectorAll<SVGGElement>('g.node').forEach((g: SVGGElement) => {\n if (g.classList.contains('wp-layout')) return;\n const name = g.querySelector('title')?.textContent;\n if (name !== null && name !== undefined) this.nodeByName.set(name, g);\n });\n this.wireHover();\n this.wireMenu();\n this.relight();\n }\n\n private clear(): void {\n this.svg.classList.remove('wp-dim');\n this.svg.querySelectorAll('.wp-focus, .wp-neighbor, .wp-hl, .wp-locked').forEach((el: Element) => {\n el.classList.remove('wp-focus', 'wp-neighbor', 'wp-hl', 'wp-locked');\n });\n }\n\n /**\n * Light the UNION of every focused box's chains, plus the hovered box's. A focused box that is not\n * drawn right now is suspended, its otherwise visible relatives included, until it is drawn again.\n */\n relight(): void {\n this.clear();\n const focused = [...this.page.focusSelection()].filter((name: string): boolean => this.nodeByName.has(name));\n for (const name of focused) this.nodeByName.get(name)?.classList.add('wp-locked');\n const anchors = this.hovered !== null && this.nodeByName.has(this.hovered) ? [...focused, this.hovered] : focused;\n if (anchors.length === 0) return;\n const lit = new Set<string>();\n for (const name of anchors) {\n this.nodeByName.get(name)?.classList.add('wp-focus');\n for (const id of this.chain.nodes(name)) {\n if (this.nodeByName.has(id)) lit.add(id);\n }\n }\n this.svg.classList.add('wp-dim');\n for (const id of lit) this.nodeByName.get(id)?.classList.add('wp-neighbor');\n for (const edge of this.model.edges) {\n if (lit.has(edge.from) && lit.has(edge.to)) {\n this.svg.querySelector(`[id=\"${edge.id}\"]`)?.classList.add('wp-hl');\n }\n }\n }\n\n private wireHover(): void {\n this.nodeByName.forEach((g: SVGGElement, name: string) => {\n g.addEventListener('mouseenter', () => {\n this.hovered = name;\n this.relight();\n });\n g.addEventListener('mouseleave', () => {\n this.hovered = null;\n this.relight();\n });\n });\n }\n\n private wireMenu(): void {\n const designs = new Map<string, string>();\n for (const link of __DESIGN_LINKS__) designs.set(link.nodeId, link.href);\n WpNodeMenu.wire(this.svg, (name: string, node: SVGGElement): WpNodeMenuItem[] => {\n const items: WpNodeMenuItem[] = [];\n const href = designs.get(name);\n if (href !== undefined)\n items.push(new WpNodeMenuItem('View Design', () => window.open(href, '_blank')));\n const focused = this.page.focusSelection().has(name);\n items.push(new WpNodeMenuItem(focused ? 'Remove from Focus' : 'Add to Focus', () => this.page.toggleFocus(name)));\n items.push(this.page.keepItem(name));\n items.unshift(...this.page.impactItems(name, node));\n const implemented = window.__WP_RUNTIME__?.implementsItem(name, node);\n if (implemented) items.push(implemented);\n const goal = window.__WP_GOAL__?.item(name, node);\n if (goal) items.push(goal);\n return items;\n });\n }\n}\n\n/**\n * The Filter popover: edits a COPY of the page's applied filter, shows what each choice would keep,\n * and hands the copy to the page on \"Show N projects\". Closing it any other way discards the edit.\n */\nclass GraphFilterPopover {\n private draft = new WpFilterChoice();\n\n constructor(private readonly page: GraphPage) {}\n\n wire(): void {\n this.byId('wp-filter-open')?.addEventListener('click', (ev: MouseEvent) => {\n ev.stopPropagation();\n if (this.isOpen()) this.close();\n else this.open();\n });\n this.byId('wp-filter-close')?.addEventListener('click', () => this.close());\n this.byId('wp-filter-clear')?.addEventListener('click', () => {\n this.draft = new WpFilterChoice();\n this.paint();\n });\n this.byId('wp-filter-apply')?.addEventListener('click', () => {\n this.page.applyFilter(this.draft.copy());\n this.close();\n });\n document.querySelectorAll<HTMLInputElement>('input[name=\"wp-scope\"]').forEach((radio: HTMLInputElement) => {\n radio.addEventListener('change', () => {\n if (!radio.checked) return;\n this.draft.scope = radio.value;\n this.paint();\n });\n });\n document.querySelectorAll<HTMLButtonElement>('.wp-chip[data-wp-chip]').forEach((chip: HTMLButtonElement) => {\n chip.addEventListener('click', () => {\n const set = this.draft.group(chip.dataset['wpChipGroup'] ?? '');\n const value = chip.dataset['wpChip'] ?? '';\n if (set.has(value)) set.delete(value);\n else set.add(value);\n this.paint();\n });\n });\n }\n\n isOpen(): boolean {\n return this.byId('wp-filter-pop')?.hidden === false;\n }\n\n /** The active Impact scan changed: an open popover's counts and labels follow it. */\n refresh(): void {\n if (this.isOpen()) this.paint();\n }\n\n open(): void {\n const pop = this.byId('wp-filter-pop');\n if (pop === null) return;\n this.draft = this.page.appliedFilter().copy();\n this.paint();\n pop.hidden = false;\n this.byId('wp-filter-open')?.setAttribute('aria-expanded', 'true');\n }\n\n close(): void {\n const pop = this.byId('wp-filter-pop');\n if (pop === null || pop.hidden) return;\n pop.hidden = true;\n this.byId('wp-filter-open')?.setAttribute('aria-expanded', 'false');\n }\n\n /** Repaint the controls from the draft: checked scope, pressed chips, counts and the footer. */\n private paint(): void {\n const reason = this.page.scopeReason();\n const group = this.byId('wp-scope-group') as HTMLFieldSetElement | null;\n if (group !== null) group.disabled = reason !== '';\n const reasonEl = this.byId('wp-scope-reason');\n if (reasonEl !== null) {\n reasonEl.textContent = reason;\n reasonEl.hidden = reason === '';\n }\n document.querySelectorAll<HTMLInputElement>('input[name=\"wp-scope\"]').forEach((radio: HTMLInputElement) => {\n radio.checked = radio.value === this.draft.scope;\n });\n document.querySelectorAll<HTMLElement>('[data-wp-scope-count]').forEach((count: HTMLElement) => {\n count.textContent = reason === '' ? String(this.page.scopeCount(count.dataset['wpScopeCount'] ?? '')) : '';\n });\n document.querySelectorAll<HTMLButtonElement>('.wp-chip[data-wp-chip]').forEach((chip: HTMLButtonElement) => {\n const set = this.draft.group(chip.dataset['wpChipGroup'] ?? '');\n chip.setAttribute('aria-pressed', String(set.has(chip.dataset['wpChip'] ?? '')));\n });\n const apply = this.byId('wp-filter-apply');\n if (apply !== null) {\n const shown = this.page.preview(this.draft);\n apply.textContent = `Show ${shown} ${this.page.noun()}${shown === 1 ? '' : 's'}`;\n }\n }\n\n private byId(id: string): HTMLElement | null {\n return document.getElementById(id);\n }\n}\n\n/**\n * The drawer and its floating panels: every control outside the graph itself. Holds no graph state —\n * each control calls back into the page, and `sync()` repaints the controls from the page's state.\n */\nclass GraphDrawer {\n readonly popover: GraphFilterPopover;\n private readonly openers = new Map<string, HTMLElement>();\n /** The two multi-selects (#1385): one implementation, two instances. */\n private readonly keep: WpMultiSelect;\n private readonly focus: WpMultiSelect;\n\n constructor(private readonly page: GraphPage) {\n this.popover = new GraphFilterPopover(page);\n this.keep = new WpMultiSelect('keep', new WpKeepSource(page));\n this.focus = new WpMultiSelect('focus', new WpFocusSource(page));\n }\n\n wire(): void {\n this.wireModeMenu();\n this.popover.wire();\n this.wireImpactKinds();\n this.keep.wire();\n this.focus.wire();\n this.toggles('wp-collapse', 'wp-shell', true);\n this.toggles('wp-help-btn', 'wp-help', false);\n this.toggles('wp-help-close', 'wp-help', false);\n this.toggles('wp-legend-pop', 'wp-legend-popout', false);\n this.toggles('wp-legend-close', 'wp-legend-popout', false);\n this.toggles('wp-resp-open', 'wp-resp-panel', false);\n this.toggles('wp-resp-close', 'wp-resp-panel', false);\n this.toggles('wp-snapshot-open', 'wp-snapshot', false);\n window.addEventListener('keydown', (ev: KeyboardEvent) => this.onKey(ev), true);\n window.addEventListener('hashchange', () => this.page.setMode(location.hash.slice(1)));\n document.addEventListener('click', (ev: MouseEvent) => {\n for (const multi of [this.keep, this.focus]) {\n if (multi.isOpen() && !multi.clicked(ev)) multi.close(false);\n }\n const target = ev.target;\n if (target instanceof Node && this.byId('wp-mode-menu')?.parentElement?.contains(target)) return;\n this.closeModeMenu(false);\n this.dismissOutside(target);\n });\n }\n\n /** \"Color by\": the pill trigger opens the menu of four; picking one switches and closes it. */\n private wireModeMenu(): void {\n this.byId('wp-mode-trigger')?.addEventListener('click', (ev: MouseEvent) => {\n ev.stopPropagation();\n const menu = this.byId('wp-mode-menu');\n if (menu === null) return;\n if (!menu.hidden) {\n this.closeModeMenu(false);\n return;\n }\n menu.hidden = false;\n this.byId('wp-mode-trigger')?.setAttribute('aria-expanded', 'true');\n menu.querySelector<HTMLButtonElement>('.wp-mode[aria-checked=\"true\"]')?.focus({ preventScroll: true });\n });\n document.querySelectorAll<HTMLButtonElement>('.wp-mode[data-wp-mode]').forEach((button: HTMLButtonElement) => {\n button.addEventListener('click', (ev: MouseEvent) => {\n ev.stopPropagation();\n this.closeModeMenu(true);\n this.page.setMode(button.dataset['wpMode'] ?? 'runtime');\n });\n });\n }\n\n /** The \"Changed on this branch\" / \"Last commit\" toggle, in the drawer and in the Filter popover. */\n private wireImpactKinds(): void {\n document.querySelectorAll<HTMLButtonElement>('[data-wp-impact-kind]').forEach((button: HTMLButtonElement) => {\n button.addEventListener('click', (ev: MouseEvent) => {\n ev.stopPropagation();\n this.page.setImpactKind(button.dataset['wpImpactKind'] ?? '');\n this.popover.refresh();\n });\n });\n }\n\n /** Shown only when two scans exist; the drawer's copy only while Impact colors the graph. */\n private syncImpactKinds(modes: WpModeState): void {\n document.querySelectorAll<HTMLElement>('[data-wp-impact-kinds]').forEach((group: HTMLElement) => {\n const inDrawer = group.dataset['wpImpactKinds'] === 'drawer';\n group.hidden = modes.scans.length < 2 || (inDrawer && modes.mode !== 'impact');\n });\n document.querySelectorAll<HTMLButtonElement>('[data-wp-impact-kind]').forEach((button: HTMLButtonElement) => {\n const kind = button.dataset['wpImpactKind'] ?? '';\n button.setAttribute('aria-pressed', String(kind === modes.kind));\n button.disabled = !modes.kindAvailable(kind);\n const scan = modes.scans.find((candidate: ImpactJson): boolean => candidate.kind === kind);\n button.title = scan === undefined ? '' : scan.available ? scan.label : scan.reason;\n });\n const legend = this.byId('wp-scope-legend');\n if (legend !== null) legend.textContent = modes.impact?.label ?? 'Changes on this branch';\n }\n\n private closeModeMenu(returnFocus: boolean): void {\n const menu = this.byId('wp-mode-menu');\n if (menu === null || menu.hidden) return;\n menu.hidden = true;\n const trigger = this.byId('wp-mode-trigger');\n trigger?.setAttribute('aria-expanded', 'false');\n if (returnFocus) trigger?.focus({ preventScroll: true });\n }\n\n /**\n * Page keys, in the CAPTURE phase so the open/closed state of the node menu is read before the\n * menu's own Escape handler closes it: Esc with a menu open only closes the menu. Esc closes an\n * open Color-by menu, Filter popover or Keep/Focus pulldown first, too; with nothing open it clears\n * Focus. `/` opens Focus with the cursor in its search.\n */\n private onKey(ev: KeyboardEvent): void {\n if (ev.altKey || ev.ctrlKey || ev.metaKey) return;\n if (ev.key === 'Escape' && this.byId('wp-mode-menu')?.hidden === false) {\n this.closeModeMenu(true);\n return;\n }\n if (ev.key === 'Escape' && this.popover.isOpen()) {\n this.popover.close();\n return;\n }\n const pulldown = [this.keep, this.focus].find((multi: WpMultiSelect): boolean => multi.isOpen());\n if (ev.key === 'Escape' && pulldown !== undefined) {\n ev.preventDefault();\n pulldown.close(true);\n return;\n }\n if (ev.key === 'Escape' && this.dismissOverlay()) return;\n const target = ev.target;\n if (target instanceof HTMLInputElement || target instanceof HTMLTextAreaElement) return;\n const menuOpen = document.getElementById('wp-node-menu') !== null || document.querySelector('.wp-graph-details:not([hidden]), .wp-goal-details:not([hidden]), .wp-impact-why:not([hidden])') !== null;\n if (ev.key === '/') {\n this.byId('wp-shell')?.classList.remove('wp-collapsed');\n this.byId('wp-collapse')?.setAttribute('aria-expanded', 'true');\n ev.preventDefault();\n this.keep.close(false);\n this.focus.open();\n return;\n }\n const index = ['1', '2', '3', '4', '5'].indexOf(ev.key);\n if (index >= 0 && !menuOpen) {\n this.page.setMode(WpModeState.MODES[index]);\n return;\n }\n if (ev.key === 'Escape' && !menuOpen && this.page.focusSelection().size > 0) this.page.clearFocus();\n }\n\n /** `button` shows/hides `target`; for the drawer itself it toggles the collapsed class instead. */\n private toggles(buttonId: string, targetId: string, collapse: boolean): void {\n const button = this.byId(buttonId);\n const target = this.byId(targetId);\n if (button === null || target === null) return;\n button.addEventListener('click', (ev: MouseEvent) => {\n ev.stopPropagation();\n let expanded: boolean;\n if (collapse) {\n expanded = !target.classList.toggle('wp-collapsed');\n } else {\n target.hidden = !target.hidden;\n expanded = !target.hidden;\n if (expanded) this.openers.set(targetId, button);\n else this.openers.get(targetId)?.focus({ preventScroll: true });\n }\n document.querySelectorAll(`[aria-controls=\"${targetId}\"], #${buttonId}[aria-expanded]`).forEach(\n (el: Element) => el.setAttribute('aria-expanded', String(expanded)),\n );\n });\n }\n\n private dismissOverlay(): boolean {\n for (const id of ['wp-help', 'wp-legend-popout', 'wp-snapshot', 'wp-resp-panel']) {\n const panel = this.byId(id);\n if (!panel || panel.hidden) continue;\n panel.hidden = true;\n this.openers.get(id)?.focus({ preventScroll: true });\n this.openers.get(id)?.setAttribute('aria-expanded', 'false');\n return true;\n }\n return false;\n }\n\n private dismissOutside(target: EventTarget | null): void {\n if (!(target instanceof Node)) return;\n const filter = this.byId('wp-filter-pop');\n if (this.popover.isOpen() && !filter?.contains(target) && !this.byId('wp-filter-open')?.contains(target)) this.popover.close();\n for (const entry of this.openers) {\n const id = entry[0];\n const opener = entry[1];\n const panel = this.byId(id);\n if (panel && !panel.hidden && !panel.contains(target) && !opener.contains(target)) {\n panel.hidden = true;\n opener.setAttribute('aria-expanded', 'false');\n }\n }\n }\n\n /** Repaint every control from the page's state. */\n sync(modes: WpModeState, filter: WpFilterChoice): void {\n const reason = modes.impactReason();\n document.querySelectorAll<HTMLButtonElement>('.wp-mode[data-wp-mode]').forEach((button: HTMLButtonElement) => {\n const mode = button.dataset['wpMode'] ?? '';\n button.setAttribute('aria-checked', String(mode === modes.mode));\n button.disabled = !modes.available(mode);\n if (mode === 'impact') button.title = reason === '' ? 'Key 3' : reason;\n if (mode === 'product') button.title = modes.productReason() === '' ? 'Key 4' : modes.productReason();\n if (mode === 'goal') {\n // Unavailable is said in the menu itself, never shown as \"no differences\" (#1239).\n button.title = modes.goalReason() === '' ? 'Key 5' : modes.goalReason();\n const sub = button.querySelector('.wp-mode-sub');\n if (sub !== null) sub.textContent = modes.goalSubtitle();\n }\n });\n this.text('wp-mode-current', modes.name(modes.mode));\n this.text('wp-mode-current-sub', modes.subtitle(modes.mode));\n const reasonEl = this.byId('wp-impact-reason');\n if (reasonEl !== null) {\n reasonEl.textContent = reason;\n reasonEl.hidden = reason === '';\n }\n document.querySelectorAll<HTMLElement>('[data-wp-legend-mode]').forEach((section: HTMLElement) => {\n section.hidden = section.dataset['wpLegendMode'] !== modes.mode;\n });\n document.querySelectorAll<HTMLElement>('[data-wp-impact-note]').forEach((note: HTMLElement) => {\n note.textContent = this.impactNote(modes);\n });\n // \"unexplained\" is a row only when the active scan has one.\n document.querySelectorAll<HTMLElement>('[data-wp-legend=\"unexplained\"]').forEach((row: HTMLElement) => {\n row.hidden = (modes.impact?.unexplained.length ?? 0) === 0;\n });\n this.syncImpactKinds(modes);\n const title = this.byId('wp-legend-pop-title');\n if (title !== null) title.textContent = `Legend · ${modes.name(modes.mode)}`;\n this.keep.sync();\n this.focus.sync();\n this.syncFilter(filter);\n this.crumb(modes.name(modes.mode), this.page.focusSelection());\n }\n\n /** The drawer button's count badge, and one removable pill per active filter in the top bar. */\n private syncFilter(filter: WpFilterChoice): void {\n const badge = this.byId('wp-filter-badge');\n if (badge !== null) {\n badge.textContent = String(filter.count());\n badge.hidden = filter.count() === 0;\n }\n const pills = this.byId('wp-filter-pills');\n if (pills === null) return;\n const items: HTMLElement[] = [];\n if (filter.scope !== 'everything') items.push(this.pill(this.scopeLabel(filter.scope), 'scope', filter.scope));\n for (const runtime of filter.runtimes) items.push(this.pill(runtime, 'runtime', runtime));\n for (const role of filter.roles) items.push(this.pill(role, 'role', role));\n for (const product of filter.products) items.push(this.pill(`product: ${product}`, 'product', product));\n pills.replaceChildren(...items);\n }\n\n /** A change scope's name, read from the Filter popover's markup: the shell owns the ONE copy. */\n private scopeLabel(scope: string): string {\n return document.querySelector(`[data-wp-scope-label=\"${scope}\"]`)?.textContent ?? scope;\n }\n\n /** A pill, built with text nodes so no value is parsed as HTML. */\n private pill(label: string, group: string, value: string): HTMLElement {\n const pill = document.createElement('span');\n pill.className = 'wp-pill';\n pill.dataset['wpPill'] = `${group}:${value}`;\n pill.append(label);\n const remove = document.createElement('button');\n remove.type = 'button';\n remove.textContent = '✕';\n remove.setAttribute('aria-label', `Remove filter ${label}`);\n remove.addEventListener('click', (ev: MouseEvent) => {\n ev.stopPropagation();\n this.page.removeFilter(group, value);\n });\n pill.append(remove);\n return pill;\n }\n\n private impactNote(modes: WpModeState): string {\n const impact = modes.impact;\n if (impact === null || !impact.available) return '';\n // An available scan with a note is an EMPTY one, e.g. \"Nothing changed on this branch yet\".\n if (impact.reason !== '') return `${impact.label}: ${impact.reason}.`;\n const stats = `${impact.label}: ${new WpImpactWhy().counts(impact)} — nx affected, ${impact.changedFiles} changed files.`;\n const cause = this.globalCause(impact, modes.affected().length);\n return [cause === '' ? '' : `${cause}.`, stats, modes.edgeNote()].filter((part: string): boolean => part !== '').join(' ');\n }\n\n /**\n * When files changed but no project owns one, everything nx affected is affected by a\n * workspace-global input (a lockfile, the workspace manifest). That is correct for CI, and\n * baffling on a graph, so the note names the cause.\n */\n private globalCause(impact: ImpactJson, affected: number): string {\n if (impact.touched.length > 0 || impact.changedFiles === 0) return '';\n const who = affected >= this.page.projectCount() ? 'Every project affected' : `${affected} projects affected`;\n const files = impact.globalFiles;\n if (files.length === 0)\n return `${who}: ${impact.changedFiles} changed files that no project owns (workspace-global input)`;\n const named = files.slice(0, 2).join(', ') + (files.length > 2 ? ` and ${files.length - 2} more` : '');\n return `${who}: ${named} changed (workspace-global input${files.length > 1 ? 's' : ''})`;\n }\n\n /** \"Mode: <b>Runtime</b> · Focus: <b>a</b>, <b>b</b> +N\", built with text nodes so no name is parsed as HTML. */\n private crumb(mode: string, focused: ReadonlySet<string>): void {\n const crumb = this.byId('wp-crumb');\n if (crumb === null) return;\n const bold = (text: string): HTMLElement => {\n const b = document.createElement('b');\n b.textContent = text;\n return b;\n };\n const parts: (string | Node)[] = ['Mode: ', bold(mode)];\n const names = [...focused].sort((a: string, b: string): number => a.toLowerCase().localeCompare(b.toLowerCase()));\n if (names.length > 0) parts.push(' · Focus: ');\n names.slice(0, 2).forEach((name: string, index: number): void => {\n parts.push(...(index === 0 ? [] : [', ']), bold(name));\n });\n if (names.length > 2) parts.push(` +${names.length - 2}`);\n crumb.replaceChildren(...parts);\n }\n\n private text(id: string, value: string): void {\n const el = this.byId(id);\n if (el !== null) el.textContent = value;\n }\n\n private byId(id: string): HTMLElement | null {\n return document.getElementById(id);\n }\n}\n\n/** \"Focus\": lights the picks' chains; offers only the boxes drawn after Filter and Keep connected to. */\nclass WpFocusSource implements WpMultiSource {\n constructor(private readonly page: GraphPage) {}\n selected(): ReadonlySet<string> { return this.page.focusSelection(); }\n available(id: string): boolean { return this.page.isDrawn(id); }\n toggle(id: string): void { this.page.toggleFocus(id); }\n clear(): void { this.page.clearFocus(); }\n}\n\n/** \"Keep connected to\": redraws with the union of the picks' chains; offers every box of the graph. */\nclass WpKeepSource implements WpMultiSource {\n constructor(private readonly page: GraphPage) {}\n selected(): ReadonlySet<string> { return this.page.keepSelection(); }\n available(id: string): boolean { return this.page.hasNode(id); }\n toggle(id: string): void { this.page.toggleKeep(id); }\n clear(): void { this.page.clearKeep(); }\n}\n\nclass GraphPage extends WpFilterPage {\n private highlighter: GraphHighlighter | null = null;\n /** The page's own graph; Goal vs Current swaps in its overlay and back (#1239). */\n private readonly base: RenderModelJson = this.model;\n private readonly modes = new WpModeState(\n this.model.nodes.some((node: RenderNodeJson): boolean => node.products.length > 0),\n this.model.viewer ?? 'architecture',\n this.goalUnavailable(),\n this.model.comparison?.menuNote || this.goalUnavailable(),\n );\n private projects = new WpProjectFilter(this.model, this.modes);\n private applied = new WpFilterChoice();\n private readonly drawer = new GraphDrawer(this);\n private readonly why = new ImpactWhyPanel();\n\n private readonly edges = new WpEdgeOverlay(this.modes);\n /**\n * The products switched ON in the Product legend (#1319): the first two in legend order at EVERY\n * load. Never persisted — no storage, no hash — so the page stays stateless.\n */\n private readonly toggles = new WpProductToggles();\n private readonly productsOn: Set<string> = new WpProductSelection().initialOn(this.toggles.products());\n private painter: WpProductPainter = this.toggles.painter(this.base.legend.palette.colors, this.productsOn);\n\n /** In Impact mode a box's menu leads with WHY it is in the build, and its edge changes (#1264). */\n impactItems(name: string, node: SVGGElement): WpNodeMenuItem[] {\n if (this.modes.mode !== 'impact') return [];\n const items: WpNodeMenuItem[] = [];\n const reason = this.modes.reason(name);\n const title = reason === null ? '' : (WpImpactWhy.TITLES[reason.kind] ?? reason.kind).toLowerCase();\n if (reason !== null) items.push(new WpNodeMenuItem(`Why in this build? (${title})`, () => this.why.open(node, reason)));\n const lines = this.edges.nodeLines(name);\n if (lines.length > 0) items.push(new WpNodeMenuItem(`Edge changes (${lines.length})`, () => this.why.show(node, `Edge changes: ${name}`, lines)));\n return items;\n }\n\n protected override captureBinding(_svg: SVGSVGElement | null): () => void {\n const previous = this.highlighter;\n return (): void => {\n this.highlighter = previous;\n this.filterCards();\n this.syncControls();\n };\n }\n\n protected override wireControls(): void {\n this.syncModel();\n this.drawer.wire();\n this.toggles.wire((product: string, on: boolean): void => this.setProductOn(product, on));\n this.syncControls();\n }\n\n /** '' when this page can show Goal vs Current, else why not. */\n private goalUnavailable(): string {\n if (this.model.viewer !== 'runtime') return 'Goal vs Current compares runtime architecture only.';\n const comparison = this.model.comparison;\n if (comparison === undefined || comparison === null)\n return 'This page carries no Goal vs Current data. Re-open it with pnpm nx run architecture:visualize-runtime.';\n return comparison.available ? '' : comparison.reason;\n }\n\n /** Goal vs Current draws its overlay topology; every other mode draws the page's own graph. */\n private syncModel(): void {\n const overlay = this.base.comparison?.model ?? null;\n let next = this.modes.mode === 'goal' && overlay !== null ? overlay : this.base;\n if (this.modes.mode === 'impact' && this.edges.any()) next = this.edges.model(this.base);\n if (next === this.model) return;\n this.useModel(next);\n this.projects = new WpProjectFilter(next, this.modes);\n }\n\n protected override nodeDot(node: RenderNodeJson): string {\n const modes = node.modes;\n if (modes === null) return node.dot;\n if (this.modes.mode === 'architecture') return modes.architecture;\n if (this.modes.mode === 'impact') return modes[this.modes.status(node.id)];\n if (this.modes.mode === 'product') return this.painter.nodeDot(modes.product, node.products);\n return modes.runtime;\n }\n\n /**\n * Product mode dashes a dependency that crosses into another product (#1204) while that product is\n * ON (#1319); every other mode draws it plain.\n */\n protected override edgeDot(edge: RenderEdgeJson): string {\n if (this.modes.mode === 'product') return this.painter.edgeDot(edge);\n if (this.modes.mode === 'impact') return this.edges.edgeDot(edge) ?? edge.dot;\n return edge.dot;\n }\n\n protected override usesFullDot(): boolean {\n return (this.modes.mode === 'runtime' || this.modes.mode === 'goal') && this.applied.count() === 0;\n }\n\n protected override narrow(retained: Set<string>): Set<string> {\n return this.projects.apply(retained, this.applied);\n }\n\n /** Filtering keeps every box in its own L-row: an emptied level stays as a thin labeled band. */\n protected override keepsEmptyLevels(): boolean {\n return true;\n }\n\n protected override prepareSvg(svg: SVGSVGElement): void { window.__WP_RUNTIME__?.prepare(svg); }\n\n protected wireSvg(svg: SVGSVGElement): void {\n this.highlighter = new GraphHighlighter(svg, this.chain, this.model, this);\n this.highlighter.wire();\n if (this.modes.mode === 'impact') this.edges.decorate(svg, this.why);\n this.filterCards();\n this.syncControls();\n svg.querySelectorAll<SVGGElement>('g.node').forEach((node: SVGGElement) => {\n if (this.keep.has(node.querySelector('title')?.textContent ?? '')) node.classList.add('wp-filter-anchor');\n });\n }\n\n focusSelection(): ReadonlySet<string> {\n return this.focused;\n }\n\n /** Whether `id` is drawn right now: what Focus may offer, and a focused box's chip is not \"hidden\". */\n isDrawn(id: string): boolean {\n return this.retained.has(id) && this.hasNode(id);\n }\n\n toggleFocus(id: string): void {\n if (this.focused.has(id)) this.focused.delete(id);\n else this.focused.add(id);\n this.refocus();\n }\n\n clearFocus(): void {\n this.focused.clear();\n this.refocus();\n }\n\n hasNode(id: string): boolean {\n return this.model.nodes.some((node: RenderNodeJson): boolean => node.id === id);\n }\n\n noun(): string { return this.model.viewer === 'runtime' ? 'service' : 'project'; }\n\n projectCount(): number { return this.model.nodes.filter(node => this.projects.isService(node)).length; }\n\n\n /** Focus changed: relight, refilter the cards, and repaint the drawer — no relayout. */\n private refocus(): void {\n this.highlighter?.relight();\n this.filterCards();\n this.syncControls();\n }\n\n setMode(mode: string): void {\n if (mode === this.modes.mode || !this.modes.set(mode)) return;\n this.syncModel();\n this.syncControls();\n this.redraw();\n }\n\n /** A product legend toggle (#1319): repaint at once from the new ON set. */\n setProductOn(product: string, on: boolean): void {\n if (on) this.productsOn.add(product);\n else this.productsOn.delete(product);\n this.painter = this.toggles.painter(this.base.legend.palette.colors, this.productsOn);\n this.syncControls();\n if (this.modes.mode === 'product') this.redraw();\n }\n\n /** Switch the active Impact scan: Impact recolours and an active change-scope filter re-applies. */\n setImpactKind(kind: string): void {\n if (kind === this.modes.kind || !this.modes.setKind(kind)) return;\n this.syncControls();\n this.redraw();\n }\n\n appliedFilter(): WpFilterChoice {\n return this.applied;\n }\n\n /** '' when the change-scope group can be used, else Impact's reason (the group is disabled). */\n scopeReason(): string {\n return this.modes.impactReason();\n }\n\n scopeCount(scope: string): number {\n if (this.model.viewer !== 'runtime') return this.projects.scopeCount(scope);\n const choice = new WpFilterChoice(); choice.scope = scope;\n return this.preview(choice);\n }\n\n /** How many boxes `choice` would show, with the current \"Keep connected to\" picks. */\n preview(choice: WpFilterChoice): number {\n const kept = this.projects.apply(this.kept(this.keep), choice);\n return this.model.nodes.filter(node => kept.has(node.id) && this.projects.isService(node)).length;\n }\n\n applyFilter(choice: WpFilterChoice): void {\n if (this.scopeReason() !== '') choice.scope = 'everything';\n this.applied = choice;\n this.syncControls();\n this.redraw();\n }\n\n /** A top-bar pill's ✕. */\n removeFilter(group: string, value: string): void {\n const next = this.applied.copy();\n if (group === 'scope') next.scope = 'everything';\n else next.group(group).delete(value);\n this.applyFilter(next);\n }\n\n private syncControls(): void {\n document.body.dataset['wpMode'] = this.modes.mode;\n this.drawer.sync(this.modes, this.applied);\n this.toggles.sync(this.productsOn);\n const count = this.model.nodes.filter(node => this.retained.has(node.id) && this.projects.isService(node)).length;\n const empty = document.getElementById('wp-empty');\n if (empty !== null) empty.hidden = count !== 0;\n const context = document.getElementById('wp-context-count');\n if (context !== null) context.textContent = `${count} services · ${this.retained.size - count} contextual nodes`;\n this.syncLegend();\n }\n\n private syncLegend(): void {\n document.querySelectorAll<HTMLElement>('[data-wp-legend-value]').forEach(row => {\n const group = row.dataset['wpLegendGroup'];\n const value = row.dataset['wpLegendValue'] ?? '';\n row.hidden = !this.model.nodes.some(node => this.retained.has(node.id) &&\n (group === 'runtime' ? (value === 'unknown' ? node.tags !== null && node.tags.frameworks.length === 0 : node.tags?.frameworks.includes(value)) : group === 'role' ? node.tags?.role === value : node.products.includes(value)));\n });\n }\n\n /** The cards of the drawn boxes, narrowed by Focus to the union of the focused boxes' chains. */\n private filterCards(): void {\n const lit = this.focused.size === 0 ? this.retained : this.kept(this.focused);\n document.querySelectorAll('.wp-resp-card').forEach((card: Element) => {\n const name = card.getAttribute('data-node');\n card.classList.toggle(\n 'wp-hidden',\n name === null || !this.retained.has(name) || !lit.has(name),\n );\n });\n }\n}\n\nnew GraphPage(__RENDER_MODEL__).render();\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { EnhancedGraph } from './graph-sorter';
|
|
2
2
|
import { GraphRenderModel } from './graph-render-model';
|
|
3
3
|
import { ProductDependencyMatrix } from './product-dependencies';
|
|
4
|
+
import { GraphPickOption } from './graph-page-shell';
|
|
4
5
|
/**
|
|
5
6
|
* One node's design page, handed to the browser so the node menu can offer "View Design" for the
|
|
6
7
|
* boxes that HAVE one and omit the item entirely for the boxes that do not.
|
|
@@ -59,7 +60,7 @@ export declare class GraphVisualizer {
|
|
|
59
60
|
constructor(clientJs?: () => string, filterJs?: () => string);
|
|
60
61
|
/**
|
|
61
62
|
* A project tagged `drawOnGraph:false` is hidden from the rendered graph —
|
|
62
|
-
* its node, its rank placement, its
|
|
63
|
+
* its node, its rank placement, its Keep/Focus pulldown option, its responsibilities
|
|
63
64
|
* card, and every edge touching it are all omitted. It stays in the JSON.
|
|
64
65
|
*/
|
|
65
66
|
private isHidden;
|
|
@@ -136,20 +137,15 @@ export declare class GraphVisualizer {
|
|
|
136
137
|
* the branch's impact when it first draws. It is per-branch and gitignored (graph-impact.ts):
|
|
137
138
|
* when it is absent the browser skips it and Impact is disabled with its reason.
|
|
138
139
|
*/
|
|
139
|
-
generateHTML(model: GraphRenderModel, links: DesignLink[], title?: string,
|
|
140
|
+
generateHTML(model: GraphRenderModel, links: DesignLink[], title?: string, pickOptions?: readonly GraphPickOption[], responsibilitiesHtml?: string): string;
|
|
140
141
|
/** Shared menu/dim/filter/zoom rules first, then the page's own, so its `#graph` rules win. */
|
|
141
142
|
private styles;
|
|
142
143
|
/**
|
|
143
|
-
* The drawer's
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
* the responsibilities panel to that chain. Clearing the field, or Esc, unlocks.
|
|
147
|
-
*
|
|
148
|
-
* Each option's VALUE is the node id the SVG is keyed on; its label is the level and short name.
|
|
149
|
-
* Options are ordered by level DESCENDING to match the responsibilities cards.
|
|
144
|
+
* The boxes the drawer's "Keep connected to" and "Focus" pulldowns offer (#1385): one per drawn
|
|
145
|
+
* project, its VALUE the node id the SVG is keyed on, its grey label the level. The shell sorts them
|
|
146
|
+
* alphabetically and renders the same rows into both pulldowns.
|
|
150
147
|
*/
|
|
151
|
-
|
|
152
|
-
private escapeHtml;
|
|
148
|
+
pickOptions(graph: EnhancedGraph): GraphPickOption[];
|
|
153
149
|
/**
|
|
154
150
|
* The page script. The browser code lives in graph-visualizer.client.ts — real, linted TypeScript
|
|
155
151
|
* that tsc compiles in place, so what this inlines is its COMPILED .js sitting beside this file.
|
|
@@ -89,7 +89,7 @@ function readCompiledClient(name) {
|
|
|
89
89
|
const source = fs.readFileSync(file, 'utf-8');
|
|
90
90
|
if (name !== 'graph-visualizer.client.js')
|
|
91
91
|
return source;
|
|
92
|
-
return readCompiledClient('graph-mode-state.client.js') + readCompiledClient('graph-product-paint.client.js') + source;
|
|
92
|
+
return readCompiledClient('graph-mode-state.client.js') + readCompiledClient('graph-product-paint.client.js') + readCompiledClient('graph-multi-select.client.js') + source;
|
|
93
93
|
}
|
|
94
94
|
class GraphVisualizer {
|
|
95
95
|
clientJs;
|
|
@@ -120,7 +120,7 @@ class GraphVisualizer {
|
|
|
120
120
|
}
|
|
121
121
|
/**
|
|
122
122
|
* A project tagged `drawOnGraph:false` is hidden from the rendered graph —
|
|
123
|
-
* its node, its rank placement, its
|
|
123
|
+
* its node, its rank placement, its Keep/Focus pulldown option, its responsibilities
|
|
124
124
|
* card, and every edge touching it are all omitted. It stays in the JSON.
|
|
125
125
|
*/
|
|
126
126
|
isHidden(entry) {
|
|
@@ -329,8 +329,8 @@ class GraphVisualizer {
|
|
|
329
329
|
* the branch's impact when it first draws. It is per-branch and gitignored (graph-impact.ts):
|
|
330
330
|
* when it is absent the browser skips it and Impact is disabled with its reason.
|
|
331
331
|
*/
|
|
332
|
-
generateHTML(model, links, title = 'Monorepo Dependency Architecture',
|
|
333
|
-
const parts = new graph_page_shell_1.ShellParts(title,
|
|
332
|
+
generateHTML(model, links, title = 'Monorepo Dependency Architecture', pickOptions = [], responsibilitiesHtml = '') {
|
|
333
|
+
const parts = new graph_page_shell_1.ShellParts(title, pickOptions, this.legend.sections(model.legend), this.legend.edgeKey(), this.filterAssets.html(), this.snapshot.html(), responsibilitiesHtml, model.legend.palette.colors);
|
|
334
334
|
return `<!DOCTYPE html>
|
|
335
335
|
<html>
|
|
336
336
|
<head>
|
|
@@ -359,36 +359,18 @@ class GraphVisualizer {
|
|
|
359
359
|
this.pageStyles.css());
|
|
360
360
|
}
|
|
361
361
|
/**
|
|
362
|
-
* The drawer's
|
|
363
|
-
*
|
|
364
|
-
*
|
|
365
|
-
* the responsibilities panel to that chain. Clearing the field, or Esc, unlocks.
|
|
366
|
-
*
|
|
367
|
-
* Each option's VALUE is the node id the SVG is keyed on; its label is the level and short name.
|
|
368
|
-
* Options are ordered by level DESCENDING to match the responsibilities cards.
|
|
362
|
+
* The boxes the drawer's "Keep connected to" and "Focus" pulldowns offer (#1385): one per drawn
|
|
363
|
+
* project, its VALUE the node id the SVG is keyed on, its grey label the level. The shell sorts them
|
|
364
|
+
* alphabetically and renders the same rows into both pulldowns.
|
|
369
365
|
*/
|
|
370
|
-
|
|
371
|
-
const
|
|
372
|
-
|
|
373
|
-
const levelDiff = graph[b].level - graph[a].level;
|
|
374
|
-
if (levelDiff !== 0)
|
|
375
|
-
return levelDiff;
|
|
376
|
-
return a.localeCompare(b);
|
|
377
|
-
});
|
|
378
|
-
let options = '';
|
|
379
|
-
for (const project of projects) {
|
|
366
|
+
pickOptions(graph) {
|
|
367
|
+
const options = [];
|
|
368
|
+
for (const project of Object.keys(graph)) {
|
|
380
369
|
if (this.isHidden(graph[project]))
|
|
381
370
|
continue;
|
|
382
|
-
|
|
383
|
-
const shortName = this.escapeHtml(this.names.getShortName(project));
|
|
384
|
-
options += `<option value="${nodeId}">L${graph[project].level} · ${shortName}</option>`;
|
|
371
|
+
options.push(new graph_page_shell_1.GraphPickOption(this.names.getNodeId(project), `L${graph[project].level}`));
|
|
385
372
|
}
|
|
386
|
-
return
|
|
387
|
-
'autocomplete="off" spellcheck="false">' +
|
|
388
|
-
`<datalist id="wp-lock-options">${options}</datalist>`);
|
|
389
|
-
}
|
|
390
|
-
escapeHtml(text) {
|
|
391
|
-
return text.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
|
|
373
|
+
return options;
|
|
392
374
|
}
|
|
393
375
|
/**
|
|
394
376
|
* The page script. The browser code lives in graph-visualizer.client.ts — real, linted TypeScript
|
|
@@ -424,11 +406,11 @@ class GraphVisualizer {
|
|
|
424
406
|
if (!fs.existsSync(outputDir)) {
|
|
425
407
|
fs.mkdirSync(outputDir, { recursive: true });
|
|
426
408
|
}
|
|
427
|
-
const
|
|
409
|
+
const pickOptions = this.pickOptions(graph);
|
|
428
410
|
const responsibilities = this.responsibilities.generateSection(graph, workspaceRoot);
|
|
429
411
|
const model = this.generateRenderModel(graph, title);
|
|
430
412
|
model.legend.productDependencies = productDependencies === null ? null : [...productDependencies.entries];
|
|
431
|
-
const html = this.generateHTML(model, this.designLinks(graph), title,
|
|
413
|
+
const html = this.generateHTML(model, this.designLinks(graph), title, pickOptions, responsibilities);
|
|
432
414
|
const htmlPath = path.join(outputDir, 'dependencies.html');
|
|
433
415
|
fs.writeFileSync(htmlPath, html, 'utf-8');
|
|
434
416
|
return new VisualizationPaths(htmlPath);
|