@memberjunction/ng-clustering 5.43.0 → 5.44.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"cluster-scatter.component.js","sourceRoot":"","sources":["../../src/lib/cluster-scatter.component.ts","../../src/lib/cluster-scatter.component.html"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EACH,SAAS,EACT,KAAK,EACL,MAAM,EACN,YAAY,EACZ,UAAU,EACV,iBAAiB,EAKjB,SAAS,EACT,iBAAiB,EACjB,MAAM,GACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAQH,cAAc,GACjB,MAAM,oBAAoB,CAAC;;;;;;;;IClDhB,AADJ,8BAA6B,aACI;IACzB,wBAAgD;IAChD,4BAAM;IAAA,qCAAqB;IAEnC,AADI,AAD+B,iBAAO,EAChC,EACJ;;;IAKN,8BAAyB;IACrB,wBAAyC;IACzC,yBAAG;IAAA,kCAAkB;IAAA,iBAAI;IACzB,6BAAsB;IAAA,2DAA2C;IACrE,AADqE,iBAAI,EACnE;;;;IAgBM,0CAC0C;IAEtC,AADA,2BAA0E,eACD;IAC7E,iBAAiB;;;;IAFK,cAAkC;;IAChC,cAAkC;;;;;IAQ1D,uBAAkE;;;;;;;IAGlE,uBAAiE;;;;;;;IAOjE,yBAGuE;;;;;;;IAInE,gCAImC;IAAA,YAAW;IAAA,iBAAO;;;;IAAlB,cAAW;IAAX,yBAAW;;;IALlD,mIAAyD;;;;;IAAzD,mGAMC;;;IAbL,sKAKC;IACD,6JAQC;;;IAdD,sCAKC;IACD,eAQC;IARD,sCAQC;;;;;IAKD,kCAQiE;IAAzD,AADA,AADA,8OAAc,0CAAgC,KAAC,gMACjC,0BAAmB,KAAC,iMACzB,6BAAmB,wBAAE,wBAAwB,KAAC;IAR/D,iBAQiE;;;;;;;;IAOzD,gCAI8B;IAAA,YAAU;IAAA,iB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M,KAAK,YACP,oBAAoB,iBAGf,iBAAiB,CAAC,IAAI;;kBAepC,KAAK;;kBAKL,KAAK;;kBAOL,KAAK;;kBAML,KAAK;;kBAWL,KAAK;;kBASL,KAAK;;kBAOL,KAAK;;kBAOL,KAAK;;kBAUL,KAAK;;kBAeL,KAAK;;kBAaL,KAAK;;kBASL,KAAK;;kBAOL,KAAK;;kBAWL,KAAK;;kBAOL,KAAK;;kBAOL,KAAK;;kBAOL,KAAK;;kBAmBL,KAAK;;kBAUL,KAAK;;kBAUL,KAAK;;kBAUL,MAAM;;kBAMN,MAAM;;kBAMN,MAAM;;kBAmBN,MAAM;;kBAMN,MAAM;;kBAQN,MAAM;;kBAUN,MAAM;;kBAKN,MAAM;;kBAMN,MAAM;;kBAKN,MAAM;;kBAMN,MAAM;;kBAwHN,SAAS;mBAAC,YAAY,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;;kFA7YjC,uBAAuB","sourcesContent":["/**\n * @fileoverview SVG scatter plot component for cluster visualization.\n *\n * `ClusterScatterComponent` renders an interactive 2D scatter plot where each\n * dot represents a clustered entity record. It supports:\n *\n * - **Zoom / pan** via mouse wheel and drag (SVG viewBox manipulation)\n * - **Tooltips** on hover showing point metadata\n * - **Legend** overlay in the bottom-left corner\n * - **Radial gradient glow** per cluster centroid\n * - **Cancelable `BeforeXXX` events** so consumers can intercept interactions\n * - **Programmatic selection and zoom** via public methods\n * - **Full customization** of dot radius, opacity, color palette, and more\n *\n * @example\n * ```html\n * <mj-cluster-scatter\n * [Points]=\"result.Points\"\n * [Clusters]=\"result.Clusters\"\n * [DotRadius]=\"6\"\n * [ShowTooltip]=\"true\"\n * [ColorPalette]=\"['#ff0000','#00ff00','#0000ff']\"\n * (BeforePointClick)=\"onBeforeClick($event)\"\n * (PointClicked)=\"onPointClicked($event)\"\n * (AfterClusteringComplete)=\"onClustered($event)\"\n * (SelectionChanged)=\"onSelectionChanged($event)\">\n * </mj-cluster-scatter>\n * ```\n */\n\nimport {\n Component,\n Input,\n Output,\n EventEmitter,\n ElementRef,\n ChangeDetectorRef,\n AfterViewInit,\n OnDestroy,\n OnChanges,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\nimport {\n ClusterPoint,\n ClusterInfo,\n ClusterVisualizationResult,\n CancelableEvent,\n ViewportRect,\n ViewportTransform,\n ClusterSelectedEvent,\n CLUSTER_COLORS,\n} from './clustering.types';\n\n@Component({\n standalone: false,\n selector: 'mj-cluster-scatter',\n templateUrl: './cluster-scatter.component.html',\n styleUrls: ['./cluster-scatter.component.css'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class ClusterScatterComponent implements AfterViewInit, OnDestroy, OnChanges {\n private cdr = inject(ChangeDetectorRef);\n\n // ================================================================\n // Data Inputs\n // ================================================================\n\n /**\n * Array of 2D-projected points to render.\n *\n * Each point carries its cluster assignment, label, and metadata.\n * Typically produced by `ClusteringService.RunPipeline()`.\n */\n @Input() Points: ClusterPoint[] = [];\n\n /**\n * Cluster summary information used for the legend and color mapping.\n */\n @Input() Clusters: ClusterInfo[] = [];\n\n /**\n * Legend / color mode. `'cluster'` (default) colors each point by its assigned\n * cluster; `'entity'` colors by the point's source entity (`Metadata.EntityName`),\n * which is the useful mode for multi-entity analyses.\n */\n @Input() ColorBy: 'cluster' | 'entity' = 'cluster';\n\n /**\n * When `true`, a semi-transparent loading overlay is displayed\n * on top of the scatter plot.\n */\n @Input() IsLoading = false;\n\n // ================================================================\n // Customization Inputs\n // ================================================================\n\n /**\n * Base radius (in SVG units) for each data point dot.\n *\n * @default 5\n */\n @Input() DotRadius = 5;\n\n /**\n * Base opacity for data point dots (0 to 1).\n *\n * When a point is hovered, non-hovered points are dimmed below this value.\n *\n * @default 0.75\n */\n @Input() DotOpacity = 0.75;\n\n /**\n * Radius used for the highlight ring on hovered or selected points.\n *\n * @default 8\n */\n @Input() HighlightRadius = 8;\n\n /**\n * Whether to show the color-coded cluster legend overlay.\n *\n * @default true\n */\n @Input() ShowLegend = true;\n\n /**\n * Whether to show the tooltip popup on point hover.\n *\n * When `false`, `BeforePointHover` and `PointHovered` still fire but\n * the built-in tooltip DOM is not rendered.\n *\n * @default true\n */\n @Input() ShowTooltip = true;\n\n /**\n * Which metadata keys to display inside the tooltip.\n *\n * When empty (the default), **all** metadata keys are shown.\n *\n * @default []\n *\n * @example\n * ```html\n * <mj-cluster-scatter [TooltipFields]=\"['EntityRecordID', 'Score']\">\n * </mj-cluster-scatter>\n * ```\n */\n @Input() TooltipFields: string[] = [];\n\n /**\n * Ordered list of metadata field keys for prioritized display in tooltips\n * and the detail panel. When set, fields are displayed in this order instead\n * of raw metadata key order. Fields not in this list appear after the\n * prioritized fields.\n *\n * Typically computed from entity metadata (DefaultInView, Sequence) by the\n * consuming component and passed in.\n *\n * @default [] (no prioritization — original key order)\n */\n @Input() FieldPriority: string[] = [];\n\n /**\n * Map of field names to human-readable display names.\n * Used to show \"First Name\" instead of \"FirstName\" in tooltips and detail panels.\n * If a field is not in this map, the raw key is shown.\n *\n * @default {} (use raw key names)\n */\n @Input() FieldDisplayNames: Record<string, string> = {};\n\n /**\n * The entity name for metadata-driven field display in tooltips and\n * detail panels. When set, the mj-entity-card component uses EntityInfo\n * to prioritize fields by IsNameField and DefaultInView.\n */\n @Input() EntityName: string | null = null;\n\n /**\n * Override the default cluster color palette.\n *\n * Colors are assigned to clusters by index: cluster 0 gets\n * `ColorPalette[0]`, cluster 1 gets `ColorPalette[1]`, etc.\n * Wraps around when there are more clusters than colors.\n *\n * @default CLUSTER_COLORS (10 accessible colors)\n */\n @Input() ColorPalette: string[] = [];\n\n /**\n * Enable or disable zoom via mouse wheel.\n *\n * @default true\n */\n @Input() EnableZoom = true;\n\n /**\n * Enable or disable panning via click-and-drag.\n *\n * @default true\n */\n @Input() EnablePan = true;\n\n /**\n * Whether scatter plot transitions (zoom, highlight) should be animated.\n *\n * @default true\n */\n @Input() AnimateTransitions = true;\n\n /**\n * Externally controlled set of selected point IDs (by `VectorKey`).\n *\n * When provided, the component renders selection rings for matching\n * points and emits `SelectionChanged` when the user modifies the set\n * interactively.\n *\n * @default (empty Set)\n *\n * @example\n * ```html\n * <mj-cluster-scatter\n * [SelectedPointIds]=\"mySelectedIds\"\n * (SelectionChanged)=\"mySelectedIds = $event\">\n * </mj-cluster-scatter>\n * ```\n */\n @Input() SelectedPointIds: Set<string> = new Set<string>();\n\n /**\n * Minimum zoom level (smallest allowed viewBox multiplier).\n *\n * A value of `0.5` means the user can zoom in until the viewBox is\n * half of the default 1000x700 size.\n *\n * @default 0.5\n */\n @Input() MinZoom = 0.5;\n\n /**\n * Maximum zoom level (largest allowed viewBox multiplier).\n *\n * A value of `10` means the user can zoom out until the viewBox is\n * 10x the default 1000x700 size.\n *\n * @default 10\n */\n @Input() MaxZoom = 10;\n\n // ================================================================\n // Outputs (standard events)\n // ================================================================\n\n /**\n * Emitted when a point is clicked (after `BeforePointClick` completes\n * without cancellation).\n */\n @Output() PointClicked = new EventEmitter<ClusterPoint>();\n\n /**\n * Emitted when the user clicks \"Open Record\" in the detail panel.\n * The parent should wire this to `NavigationService.OpenEntityRecord()`.\n */\n @Output() OpenRecordRequested = new EventEmitter<ClusterPoint>();\n\n /**\n * Emitted when the mouse enters or leaves a data point.\n * Emits `null` on mouse-leave.\n */\n @Output() PointHovered = new EventEmitter<ClusterPoint | null>();\n\n // ================================================================\n // Outputs (cancelable \"Before\" events)\n // ================================================================\n\n /**\n * Fires **before** `PointClicked`. Set `event.Cancel = true` to\n * suppress the click entirely.\n *\n * @example\n * ```typescript\n * onBeforeClick(event: CancelableEvent<ClusterPoint>): void {\n * if (event.Data.ClusterId === -1) {\n * event.Cancel = true; // ignore outlier clicks\n * }\n * }\n * ```\n */\n @Output() BeforePointClick = new EventEmitter<CancelableEvent<ClusterPoint>>();\n\n /**\n * Fires **before** the tooltip is shown on hover. Set\n * `event.Cancel = true` to suppress the tooltip for this point.\n */\n @Output() BeforePointHover = new EventEmitter<CancelableEvent<ClusterPoint>>();\n\n /**\n * Fires **before** a zoom or pan operation is applied. Set\n * `event.Cancel = true` to reject the viewport change.\n *\n * The payload contains the **proposed** viewport rectangle.\n */\n @Output() BeforeZoom = new EventEmitter<CancelableEvent<ViewportRect>>();\n\n // ================================================================\n // Outputs (informational events)\n // ================================================================\n\n /**\n * Fires after new `Points` and `Clusters` are received and centroids\n * have been computed, delivering the full visualization result.\n */\n @Output() AfterClusteringComplete = new EventEmitter<ClusterVisualizationResult>();\n\n /**\n * Fires when the user clicks a cluster label or legend swatch.\n */\n @Output() ClusterSelected = new EventEmitter<ClusterSelectedEvent>();\n\n /**\n * Fires whenever the set of selected point IDs changes\n * (via user click or programmatic `SelectPoints` / `ClearSelection`).\n */\n @Output() SelectionChanged = new EventEmitter<Set<string>>();\n\n /**\n * Fires after every zoom or pan that changes the visible viewport.\n */\n @Output() ViewportChanged = new EventEmitter<ViewportRect>();\n\n /**\n * Fires when the user edits a cluster label inline.\n * Payload: `{ ClusterId, OldLabel, NewLabel }`.\n */\n @Output() LabelEdited = new EventEmitter<{ ClusterId: number; OldLabel: string; NewLabel: string }>();\n\n // ================================================================\n // Label Editing State\n // ================================================================\n\n /** The cluster ID currently being edited, or null if none. */\n public EditingClusterId: number | null = null;\n /** The draft label text during editing. */\n public EditingLabelDraft = '';\n\n /** Start inline editing for a cluster label. */\n public StartLabelEdit(cluster: ClusterInfo, event: MouseEvent): void {\n event.stopPropagation();\n this.EditingClusterId = cluster.Id;\n this.EditingLabelDraft = cluster.Label;\n this.cdr.detectChanges();\n }\n\n /** Commit the edited label. */\n public CommitLabelEdit(cluster: ClusterInfo): void {\n const oldLabel = cluster.Label;\n const newLabel = this.EditingLabelDraft.trim();\n if (newLabel.length > 0 && newLabel !== oldLabel) {\n cluster.Label = newLabel;\n this.LabelEdited.emit({ ClusterId: cluster.Id, OldLabel: oldLabel, NewLabel: newLabel });\n }\n this.EditingClusterId = null;\n this.cdr.detectChanges();\n }\n\n /** Cancel editing. */\n public CancelLabelEdit(): void {\n this.EditingClusterId = null;\n this.cdr.detectChanges();\n }\n\n /** Handle keydown in the edit input. */\n public OnLabelEditKeydown(event: KeyboardEvent, cluster: ClusterInfo): void {\n if (event.key === 'Enter') {\n this.CommitLabelEdit(cluster);\n } else if (event.key === 'Escape') {\n this.CancelLabelEdit();\n }\n }\n\n // ================================================================\n // Internal State\n // ================================================================\n\n /** SVG viewBox parameters: [minX, minY, width, height]. */\n private _viewBox = [0, 0, 1000, 700];\n\n /** Cached viewBox string for template binding (avoids NG0100 on recalc). */\n public ViewBoxString = '0 0 1000 700';\n\n public get ViewBox(): number[] {\n return this._viewBox;\n }\n\n public set ViewBox(value: number[]) {\n this._viewBox = value;\n this.ViewBoxString = value.join(' ');\n }\n\n /** Get the current viewport transform for saving/restoring. */\n public GetViewportTransform(): ViewportTransform {\n return {\n TranslateX: this.ViewBox[0],\n TranslateY: this.ViewBox[1],\n Scale: this.defaultWidth / this.ViewBox[2],\n };\n }\n\n /** Restore a previously saved viewport transform. */\n public SetViewportTransform(vt: ViewportTransform): void {\n const width = this.defaultWidth / vt.Scale;\n const height = this.defaultHeight / vt.Scale;\n this.ViewBox = [vt.TranslateX, vt.TranslateY, width, height];\n }\n\n /** Currently hovered point (null when idle). */\n public HoveredPoint: ClusterPoint | null = null;\n /** Screen-space tooltip X position. */\n public TooltipX = 0;\n /** Screen-space tooltip Y position. */\n public TooltipY = 0;\n /** Currently highlighted (single-clicked) point key. */\n public HighlightedKey: string | null = null;\n\n /** Background grid lines for visual orientation. */\n public HorizontalGridLines: number[] = [175, 350, 525];\n /** Background vertical grid lines. */\n public VerticalGridLines: number[] = [250, 500, 750];\n\n /** Computed cluster centroids used for radial glow effects. */\n public ClusterCentroids: Array<{ ClusterId: number; Cx: number; Cy: number; R: number; Color: string }> = [];\n\n /** Filtered metadata entries for the tooltip (computed on hover). */\n public TooltipEntries: Array<{ Key: string; Value: unknown }> = [];\n\n // ================================================================\n // Detail Panel State\n // ================================================================\n\n /** The currently selected point shown in the detail panel. */\n public SelectedPoint: ClusterPoint | null = null;\n\n /** Whether the detail panel is visible. */\n public ShowDetailPanel = false;\n\n /** Metadata entries for the detail panel (computed on selection). */\n public DetailEntries: Array<{ Key: string; Value: unknown }> = [];\n\n /** Cluster members for the selected point's cluster. */\n public ClusterMembers: ClusterPoint[] = [];\n\n /** Whether the cluster members list is expanded. */\n public ClusterMembersExpanded = true;\n\n @ViewChild('svgElement', { static: false }) private svgRef!: ElementRef<SVGSVGElement>;\n\n // Pan/zoom state\n private isPanning = false;\n private panStartX = 0;\n private panStartY = 0;\n private panStartViewBox = [0, 0, 1000, 700];\n // 3D orbit-drag state\n private isRotating = false;\n private rotateStartX = 0;\n private rotateStartY = 0;\n private rotateStartYaw = 0;\n private rotateStartPitch = 0;\n private boundOnMouseMove: ((e: MouseEvent) => void) | null = null;\n private boundOnMouseUp: ((e: MouseEvent) => void) | null = null;\n\n /** Default viewBox dimensions used for zoom-limit calculations. */\n private readonly defaultWidth = 1000;\n private readonly defaultHeight = 700;\n\n // ================================================================\n // Lifecycle\n // ================================================================\n\n ngAfterViewInit(): void {\n this.boundOnMouseMove = this.onMouseMove.bind(this);\n this.boundOnMouseUp = this.onMouseUp.bind(this);\n document.addEventListener('mousemove', this.boundOnMouseMove);\n document.addEventListener('mouseup', this.boundOnMouseUp);\n }\n\n ngOnDestroy(): void {\n if (this.boundOnMouseMove) document.removeEventListener('mousemove', this.boundOnMouseMove);\n if (this.boundOnMouseUp) document.removeEventListener('mouseup', this.boundOnMouseUp);\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.computeCentroids();\n\n // Emit AfterClusteringComplete when new data arrives\n if ((changes['Points'] || changes['Clusters']) && this.Points.length > 0 && this.Clusters.length > 0) {\n this.AfterClusteringComplete.emit({\n Points: this.Points,\n Clusters: this.Clusters,\n Metrics: {\n SilhouetteScore: 0,\n ClusterCount: this.Clusters.length,\n ComputationTimeMs: 0,\n RecordCount: this.Points.length,\n OutlierCount: this.Points.filter(p => p.ClusterId < 0).length,\n },\n Config: {\n EntityName: '',\n EntityDocumentID: '',\n Algorithm: 'kmeans',\n K: this.Clusters.length,\n Epsilon: 0,\n MinPoints: 0,\n DistanceMetric: 'cosine',\n MaxRecords: this.Points.length,\n Filter: '',\n },\n });\n }\n }\n\n // ================================================================\n // Template Helpers\n // ================================================================\n\n /**\n * Returns the current SVG `viewBox` as a space-separated string.\n *\n * @returns e.g. `\"0 0 1000 700\"`\n */\n public GetViewBoxString(): string {\n return this.ViewBox.join(' ');\n }\n\n /**\n * Resolve the display color for a given point based on its cluster\n * assignment and the active `ColorPalette`.\n *\n * @param point The point to colorize.\n * @returns CSS color string.\n */\n public GetPointColor(point: ClusterPoint): string {\n if (this.ColorBy === 'entity') {\n return this.getEntityColor(point);\n }\n if (point.ClusterId < 0) return '#64748b'; // outlier gray\n const palette = this.getActivePalette();\n const cluster = this.Clusters.find(c => c.Id === point.ClusterId);\n return cluster?.Color ?? palette[point.ClusterId % palette.length];\n }\n\n // ================================================================\n // Color-by-entity (multi-entity analyses)\n // ================================================================\n\n /** Stable entity-name → color map, assigned in first-seen order. */\n private entityColorMap = new Map<string, string>();\n\n /** Resolve a color for a point keyed by its source entity name. */\n private getEntityColor(point: ClusterPoint): string {\n const name = (point.Metadata?.['EntityName'] as string) || (point.Metadata?.['Entity'] as string) || 'Unknown';\n let color = this.entityColorMap.get(name);\n if (!color) {\n const palette = this.getActivePalette();\n color = palette[this.entityColorMap.size % palette.length];\n this.entityColorMap.set(name, color);\n }\n return color;\n }\n\n /** Distinct source entities present in the data (for the entity legend). */\n public get EntityLegend(): Array<{ Name: string; Color: string; Count: number }> {\n if (this.ColorBy !== 'entity') return [];\n const counts = new Map<string, number>();\n for (const p of this.Points) {\n const name = (p.Metadata?.['EntityName'] as string) || (p.Metadata?.['Entity'] as string) || 'Unknown';\n counts.set(name, (counts.get(name) ?? 0) + 1);\n }\n return [...counts.entries()].map(([Name, Count]) => ({\n Name,\n Count,\n Color: this.getEntityColor({ Metadata: { EntityName: Name } } as unknown as ClusterPoint),\n }));\n }\n\n // ================================================================\n // 3D projection (static isometric, depth-cued)\n // ================================================================\n\n /** True when any point carries a Z coordinate (a 3D projection). */\n public get Is3D(): boolean {\n return this.Points.some(p => p.Z != null);\n }\n\n /** Orbit angles (radians) for the interactive 3D projection. Updated by drag. */\n public Yaw = 0.6;\n public Pitch = 0.45;\n\n /** Rotate a centered (x,y,z) by the current yaw (around Y) then pitch (around X). */\n private rotate(point: ClusterPoint): { x: number; y: number; z: number } {\n const x0 = point.X - 500;\n const y0 = point.Y - 350;\n const z0 = (point.Z ?? 500) - 500;\n const cy = Math.cos(this.Yaw), sy = Math.sin(this.Yaw);\n // yaw around vertical (Y) axis\n const x1 = x0 * cy + z0 * sy;\n const z1 = -x0 * sy + z0 * cy;\n const y1 = y0;\n // pitch around horizontal (X) axis\n const cp = Math.cos(this.Pitch), sp = Math.sin(this.Pitch);\n const y2 = y1 * cp - z1 * sp;\n const z2 = y1 * sp + z1 * cp;\n return { x: x1, y: y2, z: z2 };\n }\n\n /** Project a point's (X,Y,Z) to a screen X in the SVG coordinate space. */\n public PX(point: ClusterPoint): number {\n if (!this.Is3D || point.Z == null) return point.X;\n return 500 + this.rotate(point).x;\n }\n\n /** Project a point's (X,Y,Z) to a screen Y in the SVG coordinate space. */\n public PY(point: ClusterPoint): number {\n if (!this.Is3D || point.Z == null) return point.Y;\n return 350 + this.rotate(point).y;\n }\n\n /** Normalized depth [0=far, 1=near] for a point, used for size/opacity cues. */\n private depthNorm(point: ClusterPoint): number {\n if (!this.Is3D || point.Z == null) return 1;\n const depth = this.rotate(point).z;\n // centered coords span roughly ±440 per axis; combined depth ~[-760, 760]\n return Math.max(0, Math.min(1, (depth + 600) / 1200));\n }\n\n /** Reset the 3D orbit to the default viewing angle. */\n public ResetRotation(): void {\n this.Yaw = 0.6;\n this.Pitch = 0.45;\n this.cdr.detectChanges();\n }\n\n /**\n * Cluster labels positioned at each cluster's centroid in *projected* space.\n * Used to label clusters in 3D (where the 2D centroid-glow path is disabled).\n * Recomputes as the user orbits because it depends on PX/PY (yaw/pitch).\n */\n public get ProjectedClusterLabels(): Array<{ X: number; Y: number; ClusterId: number; Color: string }> {\n if (!this.Is3D) return [];\n const groups = new Map<number, ClusterPoint[]>();\n for (const p of this.Points) {\n if (p.ClusterId < 0) continue;\n const arr = groups.get(p.ClusterId);\n if (arr) arr.push(p); else groups.set(p.ClusterId, [p]);\n }\n const palette = this.getActivePalette();\n const out: Array<{ X: number; Y: number; ClusterId: number; Color: string }> = [];\n for (const [cid, pts] of groups) {\n const sx = pts.reduce((s, p) => s + this.PX(p), 0) / pts.length;\n const sy = pts.reduce((s, p) => s + this.PY(p), 0) / pts.length;\n const cluster = this.Clusters.find(c => c.Id === cid);\n out.push({ X: sx, Y: sy, ClusterId: cid, Color: cluster?.Color ?? palette[cid % palette.length] });\n }\n return out;\n }\n\n /**\n * Points in render order. In 3D, far points are drawn first so nearer points\n * paint on top (SVG has no z-index); in 2D the original order is preserved.\n */\n public get RenderPoints(): ClusterPoint[] {\n if (!this.Is3D) return this.Points;\n return [...this.Points].sort((a, b) => this.depthNorm(a) - this.depthNorm(b));\n }\n\n /**\n * Compute the SVG radius for a data point.\n *\n * Selected points use the larger `HighlightRadius`; all others use `DotRadius`.\n *\n * @param point The point to size.\n * @returns Radius in SVG units.\n */\n public GetPointRadius(point: ClusterPoint): number {\n if (this.SelectedPointIds.has(point.VectorKey)) {\n return this.HighlightRadius;\n }\n if (this.Is3D) {\n // Nearer points (depth→1) render larger to convey depth.\n return this.DotRadius * (0.6 + 0.7 * this.depthNorm(point));\n }\n return this.DotRadius;\n }\n\n /**\n * Compute the fill opacity for a data point.\n *\n * Non-hovered points are dimmed when another point is hovered.\n *\n * @param point The point to evaluate.\n * @returns Opacity value between 0 and 1.\n */\n public GetPointOpacity(point: ClusterPoint): number {\n if (this.HoveredPoint && this.HoveredPoint.VectorKey !== point.VectorKey) {\n return this.DotOpacity * 0.5;\n }\n if (this.Is3D) {\n // Fade far points slightly for depth perception.\n return this.DotOpacity * (0.55 + 0.45 * this.depthNorm(point));\n }\n return this.DotOpacity;\n }\n\n /**\n * Handle mouseenter on a data point: show tooltip, fire hover events.\n *\n * @param point The hovered point.\n * @param event The native mouse event (used for tooltip positioning).\n */\n public OnPointMouseEnter(point: ClusterPoint, event: MouseEvent): void {\n const cancelable: CancelableEvent<ClusterPoint> = { Data: point, Cancel: false };\n this.BeforePointHover.emit(cancelable);\n if (cancelable.Cancel) return;\n\n this.HoveredPoint = point;\n this.TooltipX = event.clientX + 16;\n this.TooltipY = event.clientY - 10;\n this.computeTooltipEntries(point);\n this.PointHovered.emit(point);\n this.cdr.detectChanges();\n }\n\n /**\n * Handle mouseleave on a data point: hide tooltip, emit null hover.\n */\n public OnPointMouseLeave(): void {\n this.HoveredPoint = null;\n this.TooltipEntries = [];\n this.PointHovered.emit(null);\n this.cdr.detectChanges();\n }\n\n /**\n * Handle click on a data point: fires `BeforePointClick`, toggles\n * selection, opens the detail panel, then fires `PointClicked` and\n * `SelectionChanged`.\n *\n * @param point The clicked point.\n */\n public OnPointClick(point: ClusterPoint): void {\n const cancelable: CancelableEvent<ClusterPoint> = { Data: point, Cancel: false };\n this.BeforePointClick.emit(cancelable);\n if (cancelable.Cancel) return;\n\n this.HighlightedKey = point.VectorKey;\n\n // Toggle selection\n const newSelection = new Set(this.SelectedPointIds);\n if (newSelection.has(point.VectorKey)) {\n newSelection.delete(point.VectorKey);\n } else {\n newSelection.add(point.VectorKey);\n }\n this.SelectedPointIds = newSelection;\n this.SelectionChanged.emit(newSelection);\n\n // Open detail panel for the clicked point\n this.selectPointForDetail(point);\n\n this.PointClicked.emit(point);\n this.cdr.detectChanges();\n }\n\n /**\n * Whether the given point is the currently highlighted (last-clicked) point.\n *\n * @param point The point to check.\n * @returns `true` if highlighted.\n */\n public IsHighlighted(point: ClusterPoint): boolean {\n return this.HighlightedKey === point.VectorKey;\n }\n\n /**\n * Whether the given point is in the current selection set.\n *\n * @param point The point to check.\n * @returns `true` if selected.\n */\n public IsSelected(point: ClusterPoint): boolean {\n return this.SelectedPointIds.has(point.VectorKey);\n }\n\n /**\n * Handle mouse wheel events for zooming.\n *\n * Fires `BeforeZoom` and `ViewportChanged`. Respects `EnableZoom`,\n * `MinZoom`, and `MaxZoom` constraints.\n *\n * @param event The native wheel event.\n */\n public OnWheel(event: WheelEvent): void {\n event.preventDefault();\n if (!this.EnableZoom) return;\n\n const zoomFactor = event.deltaY > 0 ? 1.1 : 0.9;\n const [minX, minY, width, height] = this.ViewBox;\n\n const minWidth = this.defaultWidth * this.MinZoom;\n const maxWidth = this.defaultWidth * this.MaxZoom;\n const minHeight = this.defaultHeight * this.MinZoom;\n const maxHeight = this.defaultHeight * this.MaxZoom;\n\n const newWidth = Math.max(minWidth, Math.min(maxWidth, width * zoomFactor));\n const newHeight = Math.max(minHeight, Math.min(maxHeight, height * zoomFactor));\n\n const centerX = minX + width / 2;\n const centerY = minY + height / 2;\n\n const proposed: ViewportRect = {\n MinX: centerX - newWidth / 2,\n MinY: centerY - newHeight / 2,\n Width: newWidth,\n Height: newHeight,\n };\n\n const cancelable: CancelableEvent<ViewportRect> = { Data: proposed, Cancel: false };\n this.BeforeZoom.emit(cancelable);\n if (cancelable.Cancel) return;\n\n this.ViewBox = [proposed.MinX, proposed.MinY, proposed.Width, proposed.Height];\n this.ViewportChanged.emit(proposed);\n this.cdr.detectChanges();\n }\n\n /**\n * Start panning on left-mousedown.\n *\n * @param event The native mouse event.\n */\n public OnMouseDown(event: MouseEvent): void {\n if (event.button !== 0) return;\n // In 3D mode a left-drag orbits the camera (so depth is perceivable);\n // in 2D it pans the viewBox.\n if (this.Is3D) {\n this.isRotating = true;\n this.rotateStartX = event.clientX;\n this.rotateStartY = event.clientY;\n this.rotateStartYaw = this.Yaw;\n this.rotateStartPitch = this.Pitch;\n return;\n }\n if (!this.EnablePan) return;\n this.isPanning = true;\n this.panStartX = event.clientX;\n this.panStartY = event.clientY;\n this.panStartViewBox = [...this.ViewBox];\n }\n\n /**\n * Handle a click on a cluster legend item.\n *\n * @param cluster The cluster that was clicked.\n */\n public OnClusterLegendClick(cluster: ClusterInfo): void {\n this.ClusterSelected.emit({\n ClusterId: cluster.Id,\n Label: cluster.Label,\n Color: cluster.Color,\n MemberCount: cluster.MemberCount,\n });\n }\n\n /**\n * Resolve the human-readable label for a point's cluster.\n *\n * @param point The point to look up.\n * @returns Cluster label string, or `\"Outlier\"` for noise points.\n */\n public GetClusterLabel(point: ClusterPoint): string {\n if (point.ClusterId < 0) return 'Outlier';\n const cluster = this.Clusters.find(c => c.Id === point.ClusterId);\n return cluster?.Label ?? `Cluster ${point.ClusterId + 1}`;\n }\n\n /** Get the label for a cluster by ID (used for SVG text labels on the chart). */\n public GetClusterLabelById(clusterId: number): string {\n const cluster = this.Clusters.find(c => c.Id === clusterId);\n return cluster?.Label ?? '';\n }\n\n /** @internal TrackBy function for point loops. */\n public TrackPointBy(_index: number, point: ClusterPoint): string {\n return point.VectorKey;\n }\n\n /** @internal TrackBy function for cluster loops. */\n public TrackClusterBy(_index: number, cluster: ClusterInfo): number {\n return cluster.Id;\n }\n\n /** @internal TrackBy function for centroid loops. */\n public TrackCentroidBy(_index: number, centroid: { ClusterId: number }): number {\n return centroid.ClusterId;\n }\n\n // ================================================================\n // Public API Methods\n // ================================================================\n\n /**\n * Animate the viewport to center on a specific cluster's centroid.\n *\n * The zoom level is adjusted so that all cluster members are visible\n * with some padding.\n *\n * @param clusterId The numeric ID of the cluster to zoom into.\n *\n * @example\n * ```typescript\n * @ViewChild(ClusterScatterComponent) scatter!: ClusterScatterComponent;\n * this.scatter.ZoomToCluster(2);\n * ```\n */\n public ZoomToCluster(clusterId: number): void {\n const members = this.Points.filter(p => p.ClusterId === clusterId);\n if (members.length === 0) return;\n\n const bounds = this.computeBounds(members);\n const padding = 80;\n const proposed: ViewportRect = {\n MinX: bounds.minX - padding,\n MinY: bounds.minY - padding,\n Width: (bounds.maxX - bounds.minX) + padding * 2,\n Height: (bounds.maxY - bounds.minY) + padding * 2,\n };\n\n // Ensure minimum dimensions\n if (proposed.Width < 200) {\n const cx = proposed.MinX + proposed.Width / 2;\n proposed.Width = 200;\n proposed.MinX = cx - 100;\n }\n if (proposed.Height < 140) {\n const cy = proposed.MinY + proposed.Height / 2;\n proposed.Height = 140;\n proposed.MinY = cy - 70;\n }\n\n this.ViewBox = [proposed.MinX, proposed.MinY, proposed.Width, proposed.Height];\n this.ViewportChanged.emit(proposed);\n this.cdr.detectChanges();\n }\n\n /**\n * Reset the viewport to the default zoom level (full view).\n *\n * @example\n * ```typescript\n * this.scatter.ResetZoom();\n * ```\n */\n public ResetZoom(): void {\n const proposed: ViewportRect = {\n MinX: 0,\n MinY: 0,\n Width: this.defaultWidth,\n Height: this.defaultHeight,\n };\n this.ViewBox = [0, 0, this.defaultWidth, this.defaultHeight];\n this.ViewportChanged.emit(proposed);\n this.cdr.detectChanges();\n }\n\n /**\n * Return all points currently visible within the viewport bounds.\n *\n * @returns Array of `ClusterPoint` objects whose X/Y fall inside the\n * current viewBox.\n */\n public GetVisiblePoints(): ClusterPoint[] {\n const [minX, minY, width, height] = this.ViewBox;\n const maxX = minX + width;\n const maxY = minY + height;\n return this.Points.filter(p =>\n p.X >= minX && p.X <= maxX && p.Y >= minY && p.Y <= maxY\n );\n }\n\n /**\n * Programmatically select points by their `VectorKey` IDs.\n *\n * Merges with the existing selection. Use `ClearSelection()` first\n * to replace the selection entirely.\n *\n * @param ids Array of `VectorKey` strings to select.\n *\n * @example\n * ```typescript\n * this.scatter.SelectPoints(['abc-123', 'def-456']);\n * ```\n */\n public SelectPoints(ids: string[]): void {\n const newSelection = new Set(this.SelectedPointIds);\n for (const id of ids) {\n newSelection.add(id);\n }\n this.SelectedPointIds = newSelection;\n this.SelectionChanged.emit(newSelection);\n this.cdr.detectChanges();\n }\n\n /**\n * Clear all selected points.\n */\n public ClearSelection(): void {\n this.SelectedPointIds = new Set<string>();\n this.HighlightedKey = null;\n this.SelectionChanged.emit(this.SelectedPointIds);\n this.cdr.detectChanges();\n }\n\n /**\n * Export the current scatter plot as an SVG string.\n *\n * The returned string is a self-contained `<svg>` element that can be\n * saved to a file or embedded in HTML.\n *\n * @returns SVG markup string, or empty string if the SVG element is\n * not yet rendered.\n */\n public ExportSVG(): string {\n if (!this.svgRef?.nativeElement) return '';\n const svgElement = this.svgRef.nativeElement;\n const serializer = new XMLSerializer();\n return serializer.serializeToString(svgElement);\n }\n\n /**\n * Visually emphasize all points belonging to a cluster by increasing\n * their radius and dimming non-members.\n *\n * Call `ResetZoom()` or re-assign `Points` to clear the highlight.\n *\n * @param clusterId The numeric cluster ID to emphasize.\n */\n public HighlightCluster(clusterId: number): void {\n const memberKeys = this.Points\n .filter(p => p.ClusterId === clusterId)\n .map(p => p.VectorKey);\n this.SelectedPointIds = new Set(memberKeys);\n this.SelectionChanged.emit(this.SelectedPointIds);\n this.cdr.detectChanges();\n }\n\n // ================================================================\n // Detail Panel Methods\n // ================================================================\n\n /**\n * Close the detail panel.\n */\n public CloseDetailPanel(): void {\n this.ShowDetailPanel = false;\n this.SelectedPoint = null;\n this.DetailEntries = [];\n this.ClusterMembers = [];\n this.cdr.detectChanges();\n }\n\n /**\n * Emit the `OpenRecordRequested` event for the currently selected point\n * (triggered by the \"Open Record\" button in the detail panel).\n */\n public OnOpenRecordClick(): void {\n if (this.SelectedPoint) {\n this.OpenRecordRequested.emit(this.SelectedPoint);\n }\n }\n\n /**\n * Select a point from the cluster members list, updating the detail\n * panel and highlighting the point on the chart.\n *\n * @param point The cluster member point to select.\n */\n public OnClusterMemberClick(point: ClusterPoint): void {\n this.HighlightedKey = point.VectorKey;\n this.selectPointForDetail(point);\n this.cdr.detectChanges();\n }\n\n /**\n * Toggle the cluster members list expansion state.\n */\n public ToggleClusterMembers(): void {\n this.ClusterMembersExpanded = !this.ClusterMembersExpanded;\n }\n\n /**\n * Get the color for a cluster by its ID, used in the detail panel.\n *\n * @param clusterId The cluster ID.\n * @returns CSS color string.\n */\n public GetClusterColor(clusterId: number): string {\n if (clusterId < 0) return '#64748b';\n const cluster = this.Clusters.find(c => c.Id === clusterId);\n if (cluster?.Color) return cluster.Color;\n const palette = this.getActivePalette();\n return palette[clusterId % palette.length];\n }\n\n /**\n * Return the metadata keys that should be hidden in the detail panel.\n */\n private get internalMetadataKeys(): Set<string> {\n return new Set([\n 'Name', 'Entity', 'EntityIcon', 'RecordID',\n 'TemplateID', '__mj_UpdatedAt', '__mj_CreatedAt',\n ]);\n }\n\n /**\n * Select a point and populate the detail panel state.\n */\n private selectPointForDetail(point: ClusterPoint): void {\n this.SelectedPoint = point;\n this.ShowDetailPanel = true;\n this.computeDetailEntries(point);\n this.computeClusterMembers(point);\n }\n\n /**\n * Compute the metadata entries for the detail panel, excluding internal fields.\n * Uses FieldPriority for ordering when available.\n */\n private computeDetailEntries(point: ClusterPoint): void {\n const hidden = this.internalMetadataKeys;\n const raw = Object.entries(point.Metadata)\n .filter(([key]) => !hidden.has(key))\n .filter(([, value]) => value != null && String(value).trim() !== '')\n .map(([Key, Value]) => ({ Key, Value }));\n\n this.DetailEntries = this.sortEntriesByPriority(raw);\n }\n\n /**\n * Compute the list of cluster members for the selected point's cluster.\n */\n private computeClusterMembers(point: ClusterPoint): void {\n this.ClusterMembers = this.Points\n .filter(p => p.ClusterId === point.ClusterId)\n .sort((a, b) => a.Label.localeCompare(b.Label));\n }\n\n /** @internal TrackBy function for cluster member loops. */\n public TrackMemberBy(_index: number, point: ClusterPoint): string {\n return point.VectorKey;\n }\n\n // ================================================================\n // Private Methods\n // ================================================================\n\n private onMouseMove(event: MouseEvent): void {\n if (this.isRotating) {\n const dx = event.clientX - this.rotateStartX;\n const dy = event.clientY - this.rotateStartY;\n this.Yaw = this.rotateStartYaw + dx * 0.01;\n // clamp pitch so the scene never flips upside down\n this.Pitch = Math.max(-1.3, Math.min(1.3, this.rotateStartPitch + dy * 0.01));\n this.cdr.detectChanges();\n return;\n }\n if (!this.isPanning || !this.svgRef) return;\n const svg = this.svgRef.nativeElement;\n const rect = svg.getBoundingClientRect();\n const scaleX = this.panStartViewBox[2] / rect.width;\n const scaleY = this.panStartViewBox[3] / rect.height;\n\n const dx = (event.clientX - this.panStartX) * scaleX;\n const dy = (event.clientY - this.panStartY) * scaleY;\n\n const proposed: ViewportRect = {\n MinX: this.panStartViewBox[0] - dx,\n MinY: this.panStartViewBox[1] - dy,\n Width: this.panStartViewBox[2],\n Height: this.panStartViewBox[3],\n };\n\n this.ViewBox = [proposed.MinX, proposed.MinY, proposed.Width, proposed.Height];\n this.ViewportChanged.emit(proposed);\n this.cdr.detectChanges();\n }\n\n private onMouseUp(_event: MouseEvent): void {\n this.isPanning = false;\n this.isRotating = false;\n }\n\n private computeCentroids(): void {\n if (!this.Points.length || !this.Clusters.length) {\n this.ClusterCentroids = [];\n return;\n }\n\n this.ClusterCentroids = this.Clusters.map(cluster => {\n const members = this.Points.filter(p => p.ClusterId === cluster.Id);\n if (members.length === 0) {\n return { ClusterId: cluster.Id, Cx: 500, Cy: 350, R: 80, Color: cluster.Color };\n }\n const cx = members.reduce((s, p) => s + p.X, 0) / members.length;\n const cy = members.reduce((s, p) => s + p.Y, 0) / members.length;\n const maxDist = Math.max(\n ...members.map(p => Math.sqrt((p.X - cx) ** 2 + (p.Y - cy) ** 2)),\n 40\n );\n return {\n ClusterId: cluster.Id,\n Cx: cx,\n Cy: cy,\n R: Math.min(maxDist + 30, 200),\n Color: cluster.Color,\n };\n });\n }\n\n /**\n * Compute the bounding box for a set of points.\n */\n private computeBounds(points: ClusterPoint[]): { minX: number; minY: number; maxX: number; maxY: number } {\n let minX = Infinity, maxX = -Infinity, minY = Infinity, maxY = -Infinity;\n for (const p of points) {\n if (p.X < minX) minX = p.X;\n if (p.X > maxX) maxX = p.X;\n if (p.Y < minY) minY = p.Y;\n if (p.Y > maxY) maxY = p.Y;\n }\n return { minX, minY, maxX, maxY };\n }\n\n /**\n * Resolve the effective color palette (custom override or default).\n */\n private getActivePalette(): string[] {\n return this.ColorPalette.length > 0 ? this.ColorPalette : CLUSTER_COLORS;\n }\n\n /**\n * Compute the tooltip entries based on TooltipFields filter.\n * Uses FieldPriority for ordering when available.\n */\n private computeTooltipEntries(point: ClusterPoint): void {\n const entries = Object.entries(point.Metadata);\n let mapped: { Key: string; Value: unknown }[];\n if (this.TooltipFields.length > 0) {\n mapped = entries\n .filter(([key]) => this.TooltipFields.includes(key))\n .map(([Key, Value]) => ({ Key, Value }));\n } else {\n mapped = entries.map(([Key, Value]) => ({ Key, Value }));\n }\n this.TooltipEntries = this.sortEntriesByPriority(mapped);\n }\n\n /**\n * Sort entries using the FieldPriority ordering.\n * Fields in FieldPriority come first (in priority order), then remaining fields.\n */\n private sortEntriesByPriority(entries: { Key: string; Value: unknown }[]): { Key: string; Value: unknown }[] {\n if (this.FieldPriority.length === 0) return entries;\n\n const priorityIndex = new Map(this.FieldPriority.map((key, idx) => [key, idx]));\n return [...entries].sort((a, b) => {\n const aIdx = priorityIndex.get(a.Key) ?? 99999;\n const bIdx = priorityIndex.get(b.Key) ?? 99999;\n return aIdx - bIdx;\n });\n }\n}\n","<div class=\"scatter-container\">\n <!-- Loading overlay -->\n @if (IsLoading) {\n <div class=\"loading-overlay\">\n <div class=\"loading-spinner\">\n <i class=\"fa-solid fa-circle-nodes fa-spin\"></i>\n <span>Computing clusters...</span>\n </div>\n </div>\n }\n\n <!-- Empty state -->\n @if (!IsLoading && Points.length === 0) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-chart-scatter\"></i>\n <p>No data to display</p>\n <p class=\"empty-hint\">Configure and run clustering to see results</p>\n </div>\n }\n\n <!-- SVG scatter plot -->\n @if (Points.length > 0) {\n <svg #svgElement\n class=\"scatter-svg\"\n [class.no-transitions]=\"!AnimateTransitions\"\n [attr.viewBox]=\"ViewBoxString\"\n preserveAspectRatio=\"xMidYMid meet\"\n (wheel)=\"OnWheel($event)\"\n (mousedown)=\"OnMouseDown($event)\">\n\n <!-- Gradient definitions for cluster glow -->\n <defs>\n @for (centroid of ClusterCentroids; track TrackCentroidBy($index, centroid)) {\n <radialGradient [attr.id]=\"'cluster-glow-' + centroid.ClusterId\"\n cx=\"50%\" cy=\"50%\" r=\"50%\">\n <stop offset=\"0%\" [attr.stop-color]=\"centroid.Color\" stop-opacity=\"0.12\"/>\n <stop offset=\"100%\" [attr.stop-color]=\"centroid.Color\" stop-opacity=\"0\"/>\n </radialGradient>\n }\n </defs>\n\n <!-- Background grid lines -->\n <g class=\"grid-lines\">\n @for (y of HorizontalGridLines; track y) {\n <line [attr.x1]=\"0\" [attr.y1]=\"y\" [attr.x2]=\"1000\" [attr.y2]=\"y\"/>\n }\n @for (x of VerticalGridLines; track x) {\n <line [attr.x1]=\"x\" [attr.y1]=\"0\" [attr.x2]=\"x\" [attr.y2]=\"700\"/>\n }\n </g>\n\n <!-- Cluster glow + labels (2D only; centroids are 2D aesthetics) -->\n @if (!Is3D) {\n @for (centroid of ClusterCentroids; track TrackCentroidBy($index, centroid)) {\n <circle [attr.cx]=\"centroid.Cx\"\n [attr.cy]=\"centroid.Cy\"\n [attr.r]=\"centroid.R\"\n [attr.fill]=\"'url(#cluster-glow-' + centroid.ClusterId + ')'\"/>\n }\n @for (centroid of ClusterCentroids; track TrackCentroidBy($index, centroid)) {\n @if (GetClusterLabelById(centroid.ClusterId); as label) {\n <text class=\"cluster-label\"\n [attr.x]=\"centroid.Cx\"\n [attr.y]=\"centroid.Cy - centroid.R - 8\"\n text-anchor=\"middle\"\n [attr.fill]=\"centroid.Color\">{{ label }}</text>\n }\n }\n }\n\n <!-- Data points (RenderPoints is depth-sorted in 3D) -->\n @for (point of RenderPoints; track TrackPointBy($index, point)) {\n <circle class=\"data-point\"\n [attr.cx]=\"PX(point)\"\n [attr.cy]=\"PY(point)\"\n [attr.r]=\"GetPointRadius(point)\"\n [attr.fill]=\"GetPointColor(point)\"\n [attr.opacity]=\"GetPointOpacity(point)\"\n (mouseenter)=\"OnPointMouseEnter(point, $event)\"\n (mouseleave)=\"OnPointMouseLeave()\"\n (click)=\"OnPointClick(point); $event.stopPropagation()\"/>\n }\n\n <!-- 3D cluster labels (at projected centroids; follow rotation) -->\n @if (Is3D && ColorBy !== 'entity') {\n @for (lbl of ProjectedClusterLabels; track lbl.ClusterId) {\n @if (GetClusterLabelById(lbl.ClusterId); as text) {\n <text class=\"cluster-label cluster-label-3d\"\n [attr.x]=\"lbl.X\"\n [attr.y]=\"lbl.Y\"\n text-anchor=\"middle\"\n [attr.fill]=\"lbl.Color\">{{ text }}</text>\n }\n }\n }\n\n <!-- Selection rings for selected points -->\n @for (point of Points; track TrackPointBy($index, point)) {\n @if (IsSelected(point)) {\n <circle class=\"selection-ring\"\n [attr.cx]=\"PX(point)\"\n [attr.cy]=\"PY(point)\"\n [attr.r]=\"HighlightRadius + 2\"\n fill=\"none\"\n [attr.stroke]=\"GetPointColor(point)\"\n stroke-width=\"2\"\n opacity=\"0.8\"/>\n }\n }\n\n <!-- Highlight ring for last-clicked point -->\n @if (HighlightedKey) {\n @for (point of Points; track TrackPointBy($index, point)) {\n @if (IsHighlighted(point)) {\n <circle [attr.cx]=\"PX(point)\"\n [attr.cy]=\"PY(point)\"\n [attr.r]=\"HighlightRadius + 4\"\n fill=\"none\"\n [attr.stroke]=\"GetPointColor(point)\"\n stroke-width=\"2.5\"\n opacity=\"0.9\"/>\n }\n }\n }\n </svg>\n }\n\n <!-- 3D orbit hint + reset -->\n @if (Points.length > 0 && Is3D) {\n <div class=\"threed-hint\">\n <i class=\"fa-solid fa-cube\"></i>\n <span>3D · drag to rotate</span>\n <button class=\"threed-reset\" (click)=\"ResetRotation()\" title=\"Reset view\">\n <i class=\"fa-solid fa-rotate-left\"></i>\n </button>\n </div>\n }\n\n <!-- Entity legend (multi-entity color mode) -->\n @if (ShowLegend && ColorBy === 'entity' && EntityLegend.length > 0) {\n <div class=\"legend\">\n <div class=\"legend-title\">Entities</div>\n @for (ent of EntityLegend; track ent.Name) {\n <div class=\"legend-item\">\n <div class=\"legend-dot\" [style.background]=\"ent.Color\"></div>\n <span class=\"legend-label\">{{ ent.Name }}</span>\n <span class=\"legend-count\">{{ ent.Count }}</span>\n </div>\n }\n </div>\n }\n\n <!-- Legend overlay (cluster color mode) -->\n @if (ShowLegend && ColorBy !== 'entity' && Clusters.length > 0) {\n <div class=\"legend\">\n <div class=\"legend-title\">Clusters</div>\n @for (cluster of Clusters; track TrackClusterBy($index, cluster)) {\n <div class=\"legend-item\" (click)=\"OnClusterLegendClick(cluster)\">\n <div class=\"legend-dot\" [style.background]=\"cluster.Color\"></div>\n @if (EditingClusterId === cluster.Id) {\n <input class=\"legend-label-input\"\n [(ngModel)]=\"EditingLabelDraft\"\n (keydown)=\"OnLabelEditKeydown($event, cluster)\"\n (blur)=\"CommitLabelEdit(cluster)\"\n (click)=\"$event.stopPropagation()\"\n autofocus />\n } @else {\n <span class=\"legend-label\">{{ cluster.Label }}</span>\n <button class=\"legend-edit-btn\"\n title=\"Edit label\"\n (click)=\"StartLabelEdit(cluster, $event)\">\n <i class=\"fa-solid fa-pencil\"></i>\n </button>\n }\n <span class=\"legend-count\">{{ cluster.MemberCount }}</span>\n </div>\n }\n </div>\n }\n\n <!-- Tooltip -->\n @if (ShowTooltip && HoveredPoint) {\n <div class=\"tooltip\"\n [style.left.px]=\"TooltipX\"\n [style.top.px]=\"TooltipY\">\n <mj-entity-card\n [EntityName]=\"EntityName\"\n [Record]=\"HoveredPoint.Metadata\"\n Variant=\"compact\">\n </mj-entity-card>\n <div class=\"tt-cluster\">\n <i class=\"fa-solid fa-circle\" style=\"font-size: 7px; vertical-align: middle\"></i>\n {{ GetClusterLabel(HoveredPoint) }}\n </div>\n <div class=\"tt-action\">\n <i class=\"fa-solid fa-arrow-up-right-from-square\"></i> Click to view details\n </div>\n </div>\n }\n\n <!-- Detail Panel (slide-in from right) -->\n <div class=\"detail-panel\" [class.detail-panel-open]=\"ShowDetailPanel && SelectedPoint\">\n @if (SelectedPoint) {\n <!-- Panel Header -->\n <div class=\"detail-header\">\n <div class=\"detail-header-content\">\n @if (SelectedPoint.Metadata?.['EntityIcon']) {\n <div class=\"detail-icon\">\n <i [class]=\"SelectedPoint.Metadata['EntityIcon']\"></i>\n </div>\n }\n <div class=\"detail-header-text\">\n <div class=\"detail-name\">{{ SelectedPoint.Label }}</div>\n @if (SelectedPoint.Metadata?.['Entity']) {\n <span class=\"detail-entity-badge\">{{ SelectedPoint.Metadata['Entity'] }}</span>\n }\n </div>\n </div>\n <button class=\"detail-close\" (click)=\"CloseDetailPanel()\" title=\"Close\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n\n <!-- Cluster badge -->\n <div class=\"detail-cluster\">\n <span class=\"detail-cluster-dot\"\n [style.background]=\"GetClusterColor(SelectedPoint.ClusterId)\"></span>\n {{ GetClusterLabel(SelectedPoint) }}\n </div>\n\n <!-- Metadata fields via entity card -->\n <mj-entity-card\n [EntityName]=\"EntityName\"\n [Record]=\"SelectedPoint.Metadata\"\n Variant=\"detail\"\n CssClass=\"detail-entity-card\">\n </mj-entity-card>\n\n <!-- Cluster Members -->\n <div class=\"detail-members-section\">\n <button class=\"detail-members-toggle\" (click)=\"ToggleClusterMembers()\">\n <i class=\"fa-solid\"\n [class.fa-chevron-down]=\"ClusterMembersExpanded\"\n [class.fa-chevron-right]=\"!ClusterMembersExpanded\"></i>\n <span>Cluster Members</span>\n <span class=\"detail-members-count\">{{ ClusterMembers.length }}</span>\n </button>\n\n @if (ClusterMembersExpanded) {\n <div class=\"detail-members-list\">\n @for (member of ClusterMembers; track TrackMemberBy($index, member)) {\n <div class=\"detail-member-row\"\n [class.active]=\"member.VectorKey === SelectedPoint.VectorKey\"\n (click)=\"OnClusterMemberClick(member)\">\n @if (member.Metadata?.['EntityIcon']) {\n <i [class]=\"member.Metadata['EntityIcon']\" class=\"member-icon\"></i>\n }\n <span class=\"member-label\">{{ member.Label }}</span>\n </div>\n }\n </div>\n }\n </div>\n\n <!-- Open Record button -->\n <div class=\"detail-footer\">\n <button class=\"detail-open-btn\" (click)=\"OnOpenRecordClick()\">\n <i class=\"fa-solid fa-arrow-up-right-from-square\"></i>\n Open Record\n </button>\n </div>\n }\n </div>\n</div>\n"]}
1
+ {"version":3,"file":"cluster-scatter.component.js","sourceRoot":"","sources":["../../src/lib/cluster-scatter.component.ts","../../src/lib/cluster-scatter.component.html"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EACH,SAAS,EACT,KAAK,EACL,MAAM,EACN,YAAY,EACZ,UAAU,EACV,iBAAiB,EAKjB,SAAS,EACT,iBAAiB,EACjB,MAAM,GACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAQH,cAAc,GACjB,MAAM,oBAAoB,CAAC;;;;;;;;;IClDhB,AADJ,8BAA6B,aACI;IACzB,wBAAgD;IAChD,4BAAM;IAAA,qCAAqB;IAEnC,AADI,AAD+B,iBAAO,EAChC,EACJ;;;IAKN,oCAI4D;;;;IAgBhD,0CAC0C;IAEtC,AADA,2BAA0E,eACD;IAC7E,iBAAiB;;;;IAFK,cAAkC;;IAChC,cAAkC;;;;;IAQ1D,uBAAkE;;;;;;;IAGlE,uBAAiE;;;;;;;IAOjE,yBAGuE;;;;;;;IAInE,gCAImC;IAAA,YAAW;IAAA,iBAAO;;;;IAAlB,cAAW;IAAX,yBAAW;;;IALlD,mIAAyD;;;;;IAAzD,mGAMC;;;IAbL,sKAKC;IACD,6JAQC;;;IAdD,sCAKC;IACD,eAQC;IARD,sCAQC;;;;;IAKD,kCAQiE;IAAzD,AADA,AADA,8OAAc,0CAAgC,KAAC,gMACjC,0BAAmB,KAAC,iMACzB,6BAAmB,wBAAE,wBAAwB,KAAC;IAR/D,iBAQiE;;;;;;;;IAOzD,gCAI8B;IAAA,YAAU;IAAA,iBAAO;;;;IAAjB,cAAU;IAAV,yBAAU;;;IAL5C,mIAAmD;;;;;IAAnD,+FAMC;;;IAPL,yHAQC;;;IARD,4CAQC;;;;IAMG,6B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BAUL,KAAK;;kBAeL,KAAK;;kBAaL,KAAK;;kBASL,KAAK;;kBAOL,KAAK;;kBAWL,KAAK;;kBAOL,KAAK;;kBAOL,KAAK;;kBAOL,KAAK;;kBAmBL,KAAK;;kBAUL,KAAK;;kBAUL,KAAK;;kBAUL,MAAM;;kBAMN,MAAM;;kBAMN,MAAM;;kBAmBN,MAAM;;kBAMN,MAAM;;kBAQN,MAAM;;kBAUN,MAAM;;kBAKN,MAAM;;kBAMN,MAAM;;kBAKN,MAAM;;kBAMN,MAAM;;kBAwHN,SAAS;mBAAC,YAAY,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;;kFA7YjC,uBAAuB","sourcesContent":["/**\n * @fileoverview SVG scatter plot component for cluster visualization.\n *\n * `ClusterScatterComponent` renders an interactive 2D scatter plot where each\n * dot represents a clustered entity record. It supports:\n *\n * - **Zoom / pan** via mouse wheel and drag (SVG viewBox manipulation)\n * - **Tooltips** on hover showing point metadata\n * - **Legend** overlay in the bottom-left corner\n * - **Radial gradient glow** per cluster centroid\n * - **Cancelable `BeforeXXX` events** so consumers can intercept interactions\n * - **Programmatic selection and zoom** via public methods\n * - **Full customization** of dot radius, opacity, color palette, and more\n *\n * @example\n * ```html\n * <mj-cluster-scatter\n * [Points]=\"result.Points\"\n * [Clusters]=\"result.Clusters\"\n * [DotRadius]=\"6\"\n * [ShowTooltip]=\"true\"\n * [ColorPalette]=\"['#ff0000','#00ff00','#0000ff']\"\n * (BeforePointClick)=\"onBeforeClick($event)\"\n * (PointClicked)=\"onPointClicked($event)\"\n * (AfterClusteringComplete)=\"onClustered($event)\"\n * (SelectionChanged)=\"onSelectionChanged($event)\">\n * </mj-cluster-scatter>\n * ```\n */\n\nimport {\n Component,\n Input,\n Output,\n EventEmitter,\n ElementRef,\n ChangeDetectorRef,\n AfterViewInit,\n OnDestroy,\n OnChanges,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\nimport {\n ClusterPoint,\n ClusterInfo,\n ClusterVisualizationResult,\n CancelableEvent,\n ViewportRect,\n ViewportTransform,\n ClusterSelectedEvent,\n CLUSTER_COLORS,\n} from './clustering.types';\n\n@Component({\n standalone: false,\n selector: 'mj-cluster-scatter',\n templateUrl: './cluster-scatter.component.html',\n styleUrls: ['./cluster-scatter.component.css'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class ClusterScatterComponent implements AfterViewInit, OnDestroy, OnChanges {\n private cdr = inject(ChangeDetectorRef);\n\n // ================================================================\n // Data Inputs\n // ================================================================\n\n /**\n * Array of 2D-projected points to render.\n *\n * Each point carries its cluster assignment, label, and metadata.\n * Typically produced by `ClusteringService.RunPipeline()`.\n */\n @Input() Points: ClusterPoint[] = [];\n\n /**\n * Cluster summary information used for the legend and color mapping.\n */\n @Input() Clusters: ClusterInfo[] = [];\n\n /**\n * Legend / color mode. `'cluster'` (default) colors each point by its assigned\n * cluster; `'entity'` colors by the point's source entity (`Metadata.EntityName`),\n * which is the useful mode for multi-entity analyses.\n */\n @Input() ColorBy: 'cluster' | 'entity' = 'cluster';\n\n /**\n * When `true`, a semi-transparent loading overlay is displayed\n * on top of the scatter plot.\n */\n @Input() IsLoading = false;\n\n // ================================================================\n // Customization Inputs\n // ================================================================\n\n /**\n * Base radius (in SVG units) for each data point dot.\n *\n * @default 5\n */\n @Input() DotRadius = 5;\n\n /**\n * Base opacity for data point dots (0 to 1).\n *\n * When a point is hovered, non-hovered points are dimmed below this value.\n *\n * @default 0.75\n */\n @Input() DotOpacity = 0.75;\n\n /**\n * Radius used for the highlight ring on hovered or selected points.\n *\n * @default 8\n */\n @Input() HighlightRadius = 8;\n\n /**\n * Whether to show the color-coded cluster legend overlay.\n *\n * @default true\n */\n @Input() ShowLegend = true;\n\n /**\n * Whether to show the tooltip popup on point hover.\n *\n * When `false`, `BeforePointHover` and `PointHovered` still fire but\n * the built-in tooltip DOM is not rendered.\n *\n * @default true\n */\n @Input() ShowTooltip = true;\n\n /**\n * Which metadata keys to display inside the tooltip.\n *\n * When empty (the default), **all** metadata keys are shown.\n *\n * @default []\n *\n * @example\n * ```html\n * <mj-cluster-scatter [TooltipFields]=\"['EntityRecordID', 'Score']\">\n * </mj-cluster-scatter>\n * ```\n */\n @Input() TooltipFields: string[] = [];\n\n /**\n * Ordered list of metadata field keys for prioritized display in tooltips\n * and the detail panel. When set, fields are displayed in this order instead\n * of raw metadata key order. Fields not in this list appear after the\n * prioritized fields.\n *\n * Typically computed from entity metadata (DefaultInView, Sequence) by the\n * consuming component and passed in.\n *\n * @default [] (no prioritization — original key order)\n */\n @Input() FieldPriority: string[] = [];\n\n /**\n * Map of field names to human-readable display names.\n * Used to show \"First Name\" instead of \"FirstName\" in tooltips and detail panels.\n * If a field is not in this map, the raw key is shown.\n *\n * @default {} (use raw key names)\n */\n @Input() FieldDisplayNames: Record<string, string> = {};\n\n /**\n * The entity name for metadata-driven field display in tooltips and\n * detail panels. When set, the mj-entity-card component uses EntityInfo\n * to prioritize fields by IsNameField and DefaultInView.\n */\n @Input() EntityName: string | null = null;\n\n /**\n * Override the default cluster color palette.\n *\n * Colors are assigned to clusters by index: cluster 0 gets\n * `ColorPalette[0]`, cluster 1 gets `ColorPalette[1]`, etc.\n * Wraps around when there are more clusters than colors.\n *\n * @default CLUSTER_COLORS (10 accessible colors)\n */\n @Input() ColorPalette: string[] = [];\n\n /**\n * Enable or disable zoom via mouse wheel.\n *\n * @default true\n */\n @Input() EnableZoom = true;\n\n /**\n * Enable or disable panning via click-and-drag.\n *\n * @default true\n */\n @Input() EnablePan = true;\n\n /**\n * Whether scatter plot transitions (zoom, highlight) should be animated.\n *\n * @default true\n */\n @Input() AnimateTransitions = true;\n\n /**\n * Externally controlled set of selected point IDs (by `VectorKey`).\n *\n * When provided, the component renders selection rings for matching\n * points and emits `SelectionChanged` when the user modifies the set\n * interactively.\n *\n * @default (empty Set)\n *\n * @example\n * ```html\n * <mj-cluster-scatter\n * [SelectedPointIds]=\"mySelectedIds\"\n * (SelectionChanged)=\"mySelectedIds = $event\">\n * </mj-cluster-scatter>\n * ```\n */\n @Input() SelectedPointIds: Set<string> = new Set<string>();\n\n /**\n * Minimum zoom level (smallest allowed viewBox multiplier).\n *\n * A value of `0.5` means the user can zoom in until the viewBox is\n * half of the default 1000x700 size.\n *\n * @default 0.5\n */\n @Input() MinZoom = 0.5;\n\n /**\n * Maximum zoom level (largest allowed viewBox multiplier).\n *\n * A value of `10` means the user can zoom out until the viewBox is\n * 10x the default 1000x700 size.\n *\n * @default 10\n */\n @Input() MaxZoom = 10;\n\n // ================================================================\n // Outputs (standard events)\n // ================================================================\n\n /**\n * Emitted when a point is clicked (after `BeforePointClick` completes\n * without cancellation).\n */\n @Output() PointClicked = new EventEmitter<ClusterPoint>();\n\n /**\n * Emitted when the user clicks \"Open Record\" in the detail panel.\n * The parent should wire this to `NavigationService.OpenEntityRecord()`.\n */\n @Output() OpenRecordRequested = new EventEmitter<ClusterPoint>();\n\n /**\n * Emitted when the mouse enters or leaves a data point.\n * Emits `null` on mouse-leave.\n */\n @Output() PointHovered = new EventEmitter<ClusterPoint | null>();\n\n // ================================================================\n // Outputs (cancelable \"Before\" events)\n // ================================================================\n\n /**\n * Fires **before** `PointClicked`. Set `event.Cancel = true` to\n * suppress the click entirely.\n *\n * @example\n * ```typescript\n * onBeforeClick(event: CancelableEvent<ClusterPoint>): void {\n * if (event.Data.ClusterId === -1) {\n * event.Cancel = true; // ignore outlier clicks\n * }\n * }\n * ```\n */\n @Output() BeforePointClick = new EventEmitter<CancelableEvent<ClusterPoint>>();\n\n /**\n * Fires **before** the tooltip is shown on hover. Set\n * `event.Cancel = true` to suppress the tooltip for this point.\n */\n @Output() BeforePointHover = new EventEmitter<CancelableEvent<ClusterPoint>>();\n\n /**\n * Fires **before** a zoom or pan operation is applied. Set\n * `event.Cancel = true` to reject the viewport change.\n *\n * The payload contains the **proposed** viewport rectangle.\n */\n @Output() BeforeZoom = new EventEmitter<CancelableEvent<ViewportRect>>();\n\n // ================================================================\n // Outputs (informational events)\n // ================================================================\n\n /**\n * Fires after new `Points` and `Clusters` are received and centroids\n * have been computed, delivering the full visualization result.\n */\n @Output() AfterClusteringComplete = new EventEmitter<ClusterVisualizationResult>();\n\n /**\n * Fires when the user clicks a cluster label or legend swatch.\n */\n @Output() ClusterSelected = new EventEmitter<ClusterSelectedEvent>();\n\n /**\n * Fires whenever the set of selected point IDs changes\n * (via user click or programmatic `SelectPoints` / `ClearSelection`).\n */\n @Output() SelectionChanged = new EventEmitter<Set<string>>();\n\n /**\n * Fires after every zoom or pan that changes the visible viewport.\n */\n @Output() ViewportChanged = new EventEmitter<ViewportRect>();\n\n /**\n * Fires when the user edits a cluster label inline.\n * Payload: `{ ClusterId, OldLabel, NewLabel }`.\n */\n @Output() LabelEdited = new EventEmitter<{ ClusterId: number; OldLabel: string; NewLabel: string }>();\n\n // ================================================================\n // Label Editing State\n // ================================================================\n\n /** The cluster ID currently being edited, or null if none. */\n public EditingClusterId: number | null = null;\n /** The draft label text during editing. */\n public EditingLabelDraft = '';\n\n /** Start inline editing for a cluster label. */\n public StartLabelEdit(cluster: ClusterInfo, event: MouseEvent): void {\n event.stopPropagation();\n this.EditingClusterId = cluster.Id;\n this.EditingLabelDraft = cluster.Label;\n this.cdr.detectChanges();\n }\n\n /** Commit the edited label. */\n public CommitLabelEdit(cluster: ClusterInfo): void {\n const oldLabel = cluster.Label;\n const newLabel = this.EditingLabelDraft.trim();\n if (newLabel.length > 0 && newLabel !== oldLabel) {\n cluster.Label = newLabel;\n this.LabelEdited.emit({ ClusterId: cluster.Id, OldLabel: oldLabel, NewLabel: newLabel });\n }\n this.EditingClusterId = null;\n this.cdr.detectChanges();\n }\n\n /** Cancel editing. */\n public CancelLabelEdit(): void {\n this.EditingClusterId = null;\n this.cdr.detectChanges();\n }\n\n /** Handle keydown in the edit input. */\n public OnLabelEditKeydown(event: KeyboardEvent, cluster: ClusterInfo): void {\n if (event.key === 'Enter') {\n this.CommitLabelEdit(cluster);\n } else if (event.key === 'Escape') {\n this.CancelLabelEdit();\n }\n }\n\n // ================================================================\n // Internal State\n // ================================================================\n\n /** SVG viewBox parameters: [minX, minY, width, height]. */\n private _viewBox = [0, 0, 1000, 700];\n\n /** Cached viewBox string for template binding (avoids NG0100 on recalc). */\n public ViewBoxString = '0 0 1000 700';\n\n public get ViewBox(): number[] {\n return this._viewBox;\n }\n\n public set ViewBox(value: number[]) {\n this._viewBox = value;\n this.ViewBoxString = value.join(' ');\n }\n\n /** Get the current viewport transform for saving/restoring. */\n public GetViewportTransform(): ViewportTransform {\n return {\n TranslateX: this.ViewBox[0],\n TranslateY: this.ViewBox[1],\n Scale: this.defaultWidth / this.ViewBox[2],\n };\n }\n\n /** Restore a previously saved viewport transform. */\n public SetViewportTransform(vt: ViewportTransform): void {\n const width = this.defaultWidth / vt.Scale;\n const height = this.defaultHeight / vt.Scale;\n this.ViewBox = [vt.TranslateX, vt.TranslateY, width, height];\n }\n\n /** Currently hovered point (null when idle). */\n public HoveredPoint: ClusterPoint | null = null;\n /** Screen-space tooltip X position. */\n public TooltipX = 0;\n /** Screen-space tooltip Y position. */\n public TooltipY = 0;\n /** Currently highlighted (single-clicked) point key. */\n public HighlightedKey: string | null = null;\n\n /** Background grid lines for visual orientation. */\n public HorizontalGridLines: number[] = [175, 350, 525];\n /** Background vertical grid lines. */\n public VerticalGridLines: number[] = [250, 500, 750];\n\n /** Computed cluster centroids used for radial glow effects. */\n public ClusterCentroids: Array<{ ClusterId: number; Cx: number; Cy: number; R: number; Color: string }> = [];\n\n /** Filtered metadata entries for the tooltip (computed on hover). */\n public TooltipEntries: Array<{ Key: string; Value: unknown }> = [];\n\n // ================================================================\n // Detail Panel State\n // ================================================================\n\n /** The currently selected point shown in the detail panel. */\n public SelectedPoint: ClusterPoint | null = null;\n\n /** Whether the detail panel is visible. */\n public ShowDetailPanel = false;\n\n /** Metadata entries for the detail panel (computed on selection). */\n public DetailEntries: Array<{ Key: string; Value: unknown }> = [];\n\n /** Cluster members for the selected point's cluster. */\n public ClusterMembers: ClusterPoint[] = [];\n\n /** Whether the cluster members list is expanded. */\n public ClusterMembersExpanded = true;\n\n @ViewChild('svgElement', { static: false }) private svgRef!: ElementRef<SVGSVGElement>;\n\n // Pan/zoom state\n private isPanning = false;\n private panStartX = 0;\n private panStartY = 0;\n private panStartViewBox = [0, 0, 1000, 700];\n // 3D orbit-drag state\n private isRotating = false;\n private rotateStartX = 0;\n private rotateStartY = 0;\n private rotateStartYaw = 0;\n private rotateStartPitch = 0;\n private boundOnMouseMove: ((e: MouseEvent) => void) | null = null;\n private boundOnMouseUp: ((e: MouseEvent) => void) | null = null;\n\n /** Default viewBox dimensions used for zoom-limit calculations. */\n private readonly defaultWidth = 1000;\n private readonly defaultHeight = 700;\n\n // ================================================================\n // Lifecycle\n // ================================================================\n\n ngAfterViewInit(): void {\n this.boundOnMouseMove = this.onMouseMove.bind(this);\n this.boundOnMouseUp = this.onMouseUp.bind(this);\n document.addEventListener('mousemove', this.boundOnMouseMove);\n document.addEventListener('mouseup', this.boundOnMouseUp);\n }\n\n ngOnDestroy(): void {\n if (this.boundOnMouseMove) document.removeEventListener('mousemove', this.boundOnMouseMove);\n if (this.boundOnMouseUp) document.removeEventListener('mouseup', this.boundOnMouseUp);\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.computeCentroids();\n\n // Emit AfterClusteringComplete when new data arrives\n if ((changes['Points'] || changes['Clusters']) && this.Points.length > 0 && this.Clusters.length > 0) {\n this.AfterClusteringComplete.emit({\n Points: this.Points,\n Clusters: this.Clusters,\n Metrics: {\n SilhouetteScore: 0,\n ClusterCount: this.Clusters.length,\n ComputationTimeMs: 0,\n RecordCount: this.Points.length,\n OutlierCount: this.Points.filter(p => p.ClusterId < 0).length,\n },\n Config: {\n EntityName: '',\n EntityDocumentID: '',\n Algorithm: 'kmeans',\n K: this.Clusters.length,\n Epsilon: 0,\n MinPoints: 0,\n DistanceMetric: 'cosine',\n MaxRecords: this.Points.length,\n Filter: '',\n },\n });\n }\n }\n\n // ================================================================\n // Template Helpers\n // ================================================================\n\n /**\n * Returns the current SVG `viewBox` as a space-separated string.\n *\n * @returns e.g. `\"0 0 1000 700\"`\n */\n public GetViewBoxString(): string {\n return this.ViewBox.join(' ');\n }\n\n /**\n * Resolve the display color for a given point based on its cluster\n * assignment and the active `ColorPalette`.\n *\n * @param point The point to colorize.\n * @returns CSS color string.\n */\n public GetPointColor(point: ClusterPoint): string {\n if (this.ColorBy === 'entity') {\n return this.getEntityColor(point);\n }\n if (point.ClusterId < 0) return '#64748b'; // outlier gray\n const palette = this.getActivePalette();\n const cluster = this.Clusters.find(c => c.Id === point.ClusterId);\n return cluster?.Color ?? palette[point.ClusterId % palette.length];\n }\n\n // ================================================================\n // Color-by-entity (multi-entity analyses)\n // ================================================================\n\n /** Stable entity-name → color map, assigned in first-seen order. */\n private entityColorMap = new Map<string, string>();\n\n /** Resolve a color for a point keyed by its source entity name. */\n private getEntityColor(point: ClusterPoint): string {\n const name = (point.Metadata?.['EntityName'] as string) || (point.Metadata?.['Entity'] as string) || 'Unknown';\n let color = this.entityColorMap.get(name);\n if (!color) {\n const palette = this.getActivePalette();\n color = palette[this.entityColorMap.size % palette.length];\n this.entityColorMap.set(name, color);\n }\n return color;\n }\n\n /** Distinct source entities present in the data (for the entity legend). */\n public get EntityLegend(): Array<{ Name: string; Color: string; Count: number }> {\n if (this.ColorBy !== 'entity') return [];\n const counts = new Map<string, number>();\n for (const p of this.Points) {\n const name = (p.Metadata?.['EntityName'] as string) || (p.Metadata?.['Entity'] as string) || 'Unknown';\n counts.set(name, (counts.get(name) ?? 0) + 1);\n }\n return [...counts.entries()].map(([Name, Count]) => ({\n Name,\n Count,\n Color: this.getEntityColor({ Metadata: { EntityName: Name } } as unknown as ClusterPoint),\n }));\n }\n\n // ================================================================\n // 3D projection (static isometric, depth-cued)\n // ================================================================\n\n /** True when any point carries a Z coordinate (a 3D projection). */\n public get Is3D(): boolean {\n return this.Points.some(p => p.Z != null);\n }\n\n /** Orbit angles (radians) for the interactive 3D projection. Updated by drag. */\n public Yaw = 0.6;\n public Pitch = 0.45;\n\n /** Rotate a centered (x,y,z) by the current yaw (around Y) then pitch (around X). */\n private rotate(point: ClusterPoint): { x: number; y: number; z: number } {\n const x0 = point.X - 500;\n const y0 = point.Y - 350;\n const z0 = (point.Z ?? 500) - 500;\n const cy = Math.cos(this.Yaw), sy = Math.sin(this.Yaw);\n // yaw around vertical (Y) axis\n const x1 = x0 * cy + z0 * sy;\n const z1 = -x0 * sy + z0 * cy;\n const y1 = y0;\n // pitch around horizontal (X) axis\n const cp = Math.cos(this.Pitch), sp = Math.sin(this.Pitch);\n const y2 = y1 * cp - z1 * sp;\n const z2 = y1 * sp + z1 * cp;\n return { x: x1, y: y2, z: z2 };\n }\n\n /** Project a point's (X,Y,Z) to a screen X in the SVG coordinate space. */\n public PX(point: ClusterPoint): number {\n if (!this.Is3D || point.Z == null) return point.X;\n return 500 + this.rotate(point).x;\n }\n\n /** Project a point's (X,Y,Z) to a screen Y in the SVG coordinate space. */\n public PY(point: ClusterPoint): number {\n if (!this.Is3D || point.Z == null) return point.Y;\n return 350 + this.rotate(point).y;\n }\n\n /** Normalized depth [0=far, 1=near] for a point, used for size/opacity cues. */\n private depthNorm(point: ClusterPoint): number {\n if (!this.Is3D || point.Z == null) return 1;\n const depth = this.rotate(point).z;\n // centered coords span roughly ±440 per axis; combined depth ~[-760, 760]\n return Math.max(0, Math.min(1, (depth + 600) / 1200));\n }\n\n /** Reset the 3D orbit to the default viewing angle. */\n public ResetRotation(): void {\n this.Yaw = 0.6;\n this.Pitch = 0.45;\n this.cdr.detectChanges();\n }\n\n /**\n * Cluster labels positioned at each cluster's centroid in *projected* space.\n * Used to label clusters in 3D (where the 2D centroid-glow path is disabled).\n * Recomputes as the user orbits because it depends on PX/PY (yaw/pitch).\n */\n public get ProjectedClusterLabels(): Array<{ X: number; Y: number; ClusterId: number; Color: string }> {\n if (!this.Is3D) return [];\n const groups = new Map<number, ClusterPoint[]>();\n for (const p of this.Points) {\n if (p.ClusterId < 0) continue;\n const arr = groups.get(p.ClusterId);\n if (arr) arr.push(p); else groups.set(p.ClusterId, [p]);\n }\n const palette = this.getActivePalette();\n const out: Array<{ X: number; Y: number; ClusterId: number; Color: string }> = [];\n for (const [cid, pts] of groups) {\n const sx = pts.reduce((s, p) => s + this.PX(p), 0) / pts.length;\n const sy = pts.reduce((s, p) => s + this.PY(p), 0) / pts.length;\n const cluster = this.Clusters.find(c => c.Id === cid);\n out.push({ X: sx, Y: sy, ClusterId: cid, Color: cluster?.Color ?? palette[cid % palette.length] });\n }\n return out;\n }\n\n /**\n * Points in render order. In 3D, far points are drawn first so nearer points\n * paint on top (SVG has no z-index); in 2D the original order is preserved.\n */\n public get RenderPoints(): ClusterPoint[] {\n if (!this.Is3D) return this.Points;\n return [...this.Points].sort((a, b) => this.depthNorm(a) - this.depthNorm(b));\n }\n\n /**\n * Compute the SVG radius for a data point.\n *\n * Selected points use the larger `HighlightRadius`; all others use `DotRadius`.\n *\n * @param point The point to size.\n * @returns Radius in SVG units.\n */\n public GetPointRadius(point: ClusterPoint): number {\n if (this.SelectedPointIds.has(point.VectorKey)) {\n return this.HighlightRadius;\n }\n if (this.Is3D) {\n // Nearer points (depth→1) render larger to convey depth.\n return this.DotRadius * (0.6 + 0.7 * this.depthNorm(point));\n }\n return this.DotRadius;\n }\n\n /**\n * Compute the fill opacity for a data point.\n *\n * Non-hovered points are dimmed when another point is hovered.\n *\n * @param point The point to evaluate.\n * @returns Opacity value between 0 and 1.\n */\n public GetPointOpacity(point: ClusterPoint): number {\n if (this.HoveredPoint && this.HoveredPoint.VectorKey !== point.VectorKey) {\n return this.DotOpacity * 0.5;\n }\n if (this.Is3D) {\n // Fade far points slightly for depth perception.\n return this.DotOpacity * (0.55 + 0.45 * this.depthNorm(point));\n }\n return this.DotOpacity;\n }\n\n /**\n * Handle mouseenter on a data point: show tooltip, fire hover events.\n *\n * @param point The hovered point.\n * @param event The native mouse event (used for tooltip positioning).\n */\n public OnPointMouseEnter(point: ClusterPoint, event: MouseEvent): void {\n const cancelable: CancelableEvent<ClusterPoint> = { Data: point, Cancel: false };\n this.BeforePointHover.emit(cancelable);\n if (cancelable.Cancel) return;\n\n this.HoveredPoint = point;\n this.TooltipX = event.clientX + 16;\n this.TooltipY = event.clientY - 10;\n this.computeTooltipEntries(point);\n this.PointHovered.emit(point);\n this.cdr.detectChanges();\n }\n\n /**\n * Handle mouseleave on a data point: hide tooltip, emit null hover.\n */\n public OnPointMouseLeave(): void {\n this.HoveredPoint = null;\n this.TooltipEntries = [];\n this.PointHovered.emit(null);\n this.cdr.detectChanges();\n }\n\n /**\n * Handle click on a data point: fires `BeforePointClick`, toggles\n * selection, opens the detail panel, then fires `PointClicked` and\n * `SelectionChanged`.\n *\n * @param point The clicked point.\n */\n public OnPointClick(point: ClusterPoint): void {\n const cancelable: CancelableEvent<ClusterPoint> = { Data: point, Cancel: false };\n this.BeforePointClick.emit(cancelable);\n if (cancelable.Cancel) return;\n\n this.HighlightedKey = point.VectorKey;\n\n // Toggle selection\n const newSelection = new Set(this.SelectedPointIds);\n if (newSelection.has(point.VectorKey)) {\n newSelection.delete(point.VectorKey);\n } else {\n newSelection.add(point.VectorKey);\n }\n this.SelectedPointIds = newSelection;\n this.SelectionChanged.emit(newSelection);\n\n // Open detail panel for the clicked point\n this.selectPointForDetail(point);\n\n this.PointClicked.emit(point);\n this.cdr.detectChanges();\n }\n\n /**\n * Whether the given point is the currently highlighted (last-clicked) point.\n *\n * @param point The point to check.\n * @returns `true` if highlighted.\n */\n public IsHighlighted(point: ClusterPoint): boolean {\n return this.HighlightedKey === point.VectorKey;\n }\n\n /**\n * Whether the given point is in the current selection set.\n *\n * @param point The point to check.\n * @returns `true` if selected.\n */\n public IsSelected(point: ClusterPoint): boolean {\n return this.SelectedPointIds.has(point.VectorKey);\n }\n\n /**\n * Handle mouse wheel events for zooming.\n *\n * Fires `BeforeZoom` and `ViewportChanged`. Respects `EnableZoom`,\n * `MinZoom`, and `MaxZoom` constraints.\n *\n * @param event The native wheel event.\n */\n public OnWheel(event: WheelEvent): void {\n event.preventDefault();\n if (!this.EnableZoom) return;\n\n const zoomFactor = event.deltaY > 0 ? 1.1 : 0.9;\n const [minX, minY, width, height] = this.ViewBox;\n\n const minWidth = this.defaultWidth * this.MinZoom;\n const maxWidth = this.defaultWidth * this.MaxZoom;\n const minHeight = this.defaultHeight * this.MinZoom;\n const maxHeight = this.defaultHeight * this.MaxZoom;\n\n const newWidth = Math.max(minWidth, Math.min(maxWidth, width * zoomFactor));\n const newHeight = Math.max(minHeight, Math.min(maxHeight, height * zoomFactor));\n\n const centerX = minX + width / 2;\n const centerY = minY + height / 2;\n\n const proposed: ViewportRect = {\n MinX: centerX - newWidth / 2,\n MinY: centerY - newHeight / 2,\n Width: newWidth,\n Height: newHeight,\n };\n\n const cancelable: CancelableEvent<ViewportRect> = { Data: proposed, Cancel: false };\n this.BeforeZoom.emit(cancelable);\n if (cancelable.Cancel) return;\n\n this.ViewBox = [proposed.MinX, proposed.MinY, proposed.Width, proposed.Height];\n this.ViewportChanged.emit(proposed);\n this.cdr.detectChanges();\n }\n\n /**\n * Start panning on left-mousedown.\n *\n * @param event The native mouse event.\n */\n public OnMouseDown(event: MouseEvent): void {\n if (event.button !== 0) return;\n // In 3D mode a left-drag orbits the camera (so depth is perceivable);\n // in 2D it pans the viewBox.\n if (this.Is3D) {\n this.isRotating = true;\n this.rotateStartX = event.clientX;\n this.rotateStartY = event.clientY;\n this.rotateStartYaw = this.Yaw;\n this.rotateStartPitch = this.Pitch;\n return;\n }\n if (!this.EnablePan) return;\n this.isPanning = true;\n this.panStartX = event.clientX;\n this.panStartY = event.clientY;\n this.panStartViewBox = [...this.ViewBox];\n }\n\n /**\n * Handle a click on a cluster legend item.\n *\n * @param cluster The cluster that was clicked.\n */\n public OnClusterLegendClick(cluster: ClusterInfo): void {\n this.ClusterSelected.emit({\n ClusterId: cluster.Id,\n Label: cluster.Label,\n Color: cluster.Color,\n MemberCount: cluster.MemberCount,\n });\n }\n\n /**\n * Resolve the human-readable label for a point's cluster.\n *\n * @param point The point to look up.\n * @returns Cluster label string, or `\"Outlier\"` for noise points.\n */\n public GetClusterLabel(point: ClusterPoint): string {\n if (point.ClusterId < 0) return 'Outlier';\n const cluster = this.Clusters.find(c => c.Id === point.ClusterId);\n return cluster?.Label ?? `Cluster ${point.ClusterId + 1}`;\n }\n\n /** Get the label for a cluster by ID (used for SVG text labels on the chart). */\n public GetClusterLabelById(clusterId: number): string {\n const cluster = this.Clusters.find(c => c.Id === clusterId);\n return cluster?.Label ?? '';\n }\n\n /** @internal TrackBy function for point loops. */\n public TrackPointBy(_index: number, point: ClusterPoint): string {\n return point.VectorKey;\n }\n\n /** @internal TrackBy function for cluster loops. */\n public TrackClusterBy(_index: number, cluster: ClusterInfo): number {\n return cluster.Id;\n }\n\n /** @internal TrackBy function for centroid loops. */\n public TrackCentroidBy(_index: number, centroid: { ClusterId: number }): number {\n return centroid.ClusterId;\n }\n\n // ================================================================\n // Public API Methods\n // ================================================================\n\n /**\n * Animate the viewport to center on a specific cluster's centroid.\n *\n * The zoom level is adjusted so that all cluster members are visible\n * with some padding.\n *\n * @param clusterId The numeric ID of the cluster to zoom into.\n *\n * @example\n * ```typescript\n * @ViewChild(ClusterScatterComponent) scatter!: ClusterScatterComponent;\n * this.scatter.ZoomToCluster(2);\n * ```\n */\n public ZoomToCluster(clusterId: number): void {\n const members = this.Points.filter(p => p.ClusterId === clusterId);\n if (members.length === 0) return;\n\n const bounds = this.computeBounds(members);\n const padding = 80;\n const proposed: ViewportRect = {\n MinX: bounds.minX - padding,\n MinY: bounds.minY - padding,\n Width: (bounds.maxX - bounds.minX) + padding * 2,\n Height: (bounds.maxY - bounds.minY) + padding * 2,\n };\n\n // Ensure minimum dimensions\n if (proposed.Width < 200) {\n const cx = proposed.MinX + proposed.Width / 2;\n proposed.Width = 200;\n proposed.MinX = cx - 100;\n }\n if (proposed.Height < 140) {\n const cy = proposed.MinY + proposed.Height / 2;\n proposed.Height = 140;\n proposed.MinY = cy - 70;\n }\n\n this.ViewBox = [proposed.MinX, proposed.MinY, proposed.Width, proposed.Height];\n this.ViewportChanged.emit(proposed);\n this.cdr.detectChanges();\n }\n\n /**\n * Reset the viewport to the default zoom level (full view).\n *\n * @example\n * ```typescript\n * this.scatter.ResetZoom();\n * ```\n */\n public ResetZoom(): void {\n const proposed: ViewportRect = {\n MinX: 0,\n MinY: 0,\n Width: this.defaultWidth,\n Height: this.defaultHeight,\n };\n this.ViewBox = [0, 0, this.defaultWidth, this.defaultHeight];\n this.ViewportChanged.emit(proposed);\n this.cdr.detectChanges();\n }\n\n /**\n * Return all points currently visible within the viewport bounds.\n *\n * @returns Array of `ClusterPoint` objects whose X/Y fall inside the\n * current viewBox.\n */\n public GetVisiblePoints(): ClusterPoint[] {\n const [minX, minY, width, height] = this.ViewBox;\n const maxX = minX + width;\n const maxY = minY + height;\n return this.Points.filter(p =>\n p.X >= minX && p.X <= maxX && p.Y >= minY && p.Y <= maxY\n );\n }\n\n /**\n * Programmatically select points by their `VectorKey` IDs.\n *\n * Merges with the existing selection. Use `ClearSelection()` first\n * to replace the selection entirely.\n *\n * @param ids Array of `VectorKey` strings to select.\n *\n * @example\n * ```typescript\n * this.scatter.SelectPoints(['abc-123', 'def-456']);\n * ```\n */\n public SelectPoints(ids: string[]): void {\n const newSelection = new Set(this.SelectedPointIds);\n for (const id of ids) {\n newSelection.add(id);\n }\n this.SelectedPointIds = newSelection;\n this.SelectionChanged.emit(newSelection);\n this.cdr.detectChanges();\n }\n\n /**\n * Clear all selected points.\n */\n public ClearSelection(): void {\n this.SelectedPointIds = new Set<string>();\n this.HighlightedKey = null;\n this.SelectionChanged.emit(this.SelectedPointIds);\n this.cdr.detectChanges();\n }\n\n /**\n * Export the current scatter plot as an SVG string.\n *\n * The returned string is a self-contained `<svg>` element that can be\n * saved to a file or embedded in HTML.\n *\n * @returns SVG markup string, or empty string if the SVG element is\n * not yet rendered.\n */\n public ExportSVG(): string {\n if (!this.svgRef?.nativeElement) return '';\n const svgElement = this.svgRef.nativeElement;\n const serializer = new XMLSerializer();\n return serializer.serializeToString(svgElement);\n }\n\n /**\n * Visually emphasize all points belonging to a cluster by increasing\n * their radius and dimming non-members.\n *\n * Call `ResetZoom()` or re-assign `Points` to clear the highlight.\n *\n * @param clusterId The numeric cluster ID to emphasize.\n */\n public HighlightCluster(clusterId: number): void {\n const memberKeys = this.Points\n .filter(p => p.ClusterId === clusterId)\n .map(p => p.VectorKey);\n this.SelectedPointIds = new Set(memberKeys);\n this.SelectionChanged.emit(this.SelectedPointIds);\n this.cdr.detectChanges();\n }\n\n // ================================================================\n // Detail Panel Methods\n // ================================================================\n\n /**\n * Close the detail panel.\n */\n public CloseDetailPanel(): void {\n this.ShowDetailPanel = false;\n this.SelectedPoint = null;\n this.DetailEntries = [];\n this.ClusterMembers = [];\n this.cdr.detectChanges();\n }\n\n /**\n * Emit the `OpenRecordRequested` event for the currently selected point\n * (triggered by the \"Open Record\" button in the detail panel).\n */\n public OnOpenRecordClick(): void {\n if (this.SelectedPoint) {\n this.OpenRecordRequested.emit(this.SelectedPoint);\n }\n }\n\n /**\n * Select a point from the cluster members list, updating the detail\n * panel and highlighting the point on the chart.\n *\n * @param point The cluster member point to select.\n */\n public OnClusterMemberClick(point: ClusterPoint): void {\n this.HighlightedKey = point.VectorKey;\n this.selectPointForDetail(point);\n this.cdr.detectChanges();\n }\n\n /**\n * Toggle the cluster members list expansion state.\n */\n public ToggleClusterMembers(): void {\n this.ClusterMembersExpanded = !this.ClusterMembersExpanded;\n }\n\n /**\n * Get the color for a cluster by its ID, used in the detail panel.\n *\n * @param clusterId The cluster ID.\n * @returns CSS color string.\n */\n public GetClusterColor(clusterId: number): string {\n if (clusterId < 0) return '#64748b';\n const cluster = this.Clusters.find(c => c.Id === clusterId);\n if (cluster?.Color) return cluster.Color;\n const palette = this.getActivePalette();\n return palette[clusterId % palette.length];\n }\n\n /**\n * Return the metadata keys that should be hidden in the detail panel.\n */\n private get internalMetadataKeys(): Set<string> {\n return new Set([\n 'Name', 'Entity', 'EntityIcon', 'RecordID',\n 'TemplateID', '__mj_UpdatedAt', '__mj_CreatedAt',\n ]);\n }\n\n /**\n * Select a point and populate the detail panel state.\n */\n private selectPointForDetail(point: ClusterPoint): void {\n this.SelectedPoint = point;\n this.ShowDetailPanel = true;\n this.computeDetailEntries(point);\n this.computeClusterMembers(point);\n }\n\n /**\n * Compute the metadata entries for the detail panel, excluding internal fields.\n * Uses FieldPriority for ordering when available.\n */\n private computeDetailEntries(point: ClusterPoint): void {\n const hidden = this.internalMetadataKeys;\n const raw = Object.entries(point.Metadata)\n .filter(([key]) => !hidden.has(key))\n .filter(([, value]) => value != null && String(value).trim() !== '')\n .map(([Key, Value]) => ({ Key, Value }));\n\n this.DetailEntries = this.sortEntriesByPriority(raw);\n }\n\n /**\n * Compute the list of cluster members for the selected point's cluster.\n */\n private computeClusterMembers(point: ClusterPoint): void {\n this.ClusterMembers = this.Points\n .filter(p => p.ClusterId === point.ClusterId)\n .sort((a, b) => a.Label.localeCompare(b.Label));\n }\n\n /** @internal TrackBy function for cluster member loops. */\n public TrackMemberBy(_index: number, point: ClusterPoint): string {\n return point.VectorKey;\n }\n\n // ================================================================\n // Private Methods\n // ================================================================\n\n private onMouseMove(event: MouseEvent): void {\n if (this.isRotating) {\n const dx = event.clientX - this.rotateStartX;\n const dy = event.clientY - this.rotateStartY;\n this.Yaw = this.rotateStartYaw + dx * 0.01;\n // clamp pitch so the scene never flips upside down\n this.Pitch = Math.max(-1.3, Math.min(1.3, this.rotateStartPitch + dy * 0.01));\n this.cdr.detectChanges();\n return;\n }\n if (!this.isPanning || !this.svgRef) return;\n const svg = this.svgRef.nativeElement;\n const rect = svg.getBoundingClientRect();\n const scaleX = this.panStartViewBox[2] / rect.width;\n const scaleY = this.panStartViewBox[3] / rect.height;\n\n const dx = (event.clientX - this.panStartX) * scaleX;\n const dy = (event.clientY - this.panStartY) * scaleY;\n\n const proposed: ViewportRect = {\n MinX: this.panStartViewBox[0] - dx,\n MinY: this.panStartViewBox[1] - dy,\n Width: this.panStartViewBox[2],\n Height: this.panStartViewBox[3],\n };\n\n this.ViewBox = [proposed.MinX, proposed.MinY, proposed.Width, proposed.Height];\n this.ViewportChanged.emit(proposed);\n this.cdr.detectChanges();\n }\n\n private onMouseUp(_event: MouseEvent): void {\n this.isPanning = false;\n this.isRotating = false;\n }\n\n private computeCentroids(): void {\n if (!this.Points.length || !this.Clusters.length) {\n this.ClusterCentroids = [];\n return;\n }\n\n this.ClusterCentroids = this.Clusters.map(cluster => {\n const members = this.Points.filter(p => p.ClusterId === cluster.Id);\n if (members.length === 0) {\n return { ClusterId: cluster.Id, Cx: 500, Cy: 350, R: 80, Color: cluster.Color };\n }\n const cx = members.reduce((s, p) => s + p.X, 0) / members.length;\n const cy = members.reduce((s, p) => s + p.Y, 0) / members.length;\n const maxDist = Math.max(\n ...members.map(p => Math.sqrt((p.X - cx) ** 2 + (p.Y - cy) ** 2)),\n 40\n );\n return {\n ClusterId: cluster.Id,\n Cx: cx,\n Cy: cy,\n R: Math.min(maxDist + 30, 200),\n Color: cluster.Color,\n };\n });\n }\n\n /**\n * Compute the bounding box for a set of points.\n */\n private computeBounds(points: ClusterPoint[]): { minX: number; minY: number; maxX: number; maxY: number } {\n let minX = Infinity, maxX = -Infinity, minY = Infinity, maxY = -Infinity;\n for (const p of points) {\n if (p.X < minX) minX = p.X;\n if (p.X > maxX) maxX = p.X;\n if (p.Y < minY) minY = p.Y;\n if (p.Y > maxY) maxY = p.Y;\n }\n return { minX, minY, maxX, maxY };\n }\n\n /**\n * Resolve the effective color palette (custom override or default).\n */\n private getActivePalette(): string[] {\n return this.ColorPalette.length > 0 ? this.ColorPalette : CLUSTER_COLORS;\n }\n\n /**\n * Compute the tooltip entries based on TooltipFields filter.\n * Uses FieldPriority for ordering when available.\n */\n private computeTooltipEntries(point: ClusterPoint): void {\n const entries = Object.entries(point.Metadata);\n let mapped: { Key: string; Value: unknown }[];\n if (this.TooltipFields.length > 0) {\n mapped = entries\n .filter(([key]) => this.TooltipFields.includes(key))\n .map(([Key, Value]) => ({ Key, Value }));\n } else {\n mapped = entries.map(([Key, Value]) => ({ Key, Value }));\n }\n this.TooltipEntries = this.sortEntriesByPriority(mapped);\n }\n\n /**\n * Sort entries using the FieldPriority ordering.\n * Fields in FieldPriority come first (in priority order), then remaining fields.\n */\n private sortEntriesByPriority(entries: { Key: string; Value: unknown }[]): { Key: string; Value: unknown }[] {\n if (this.FieldPriority.length === 0) return entries;\n\n const priorityIndex = new Map(this.FieldPriority.map((key, idx) => [key, idx]));\n return [...entries].sort((a, b) => {\n const aIdx = priorityIndex.get(a.Key) ?? 99999;\n const bIdx = priorityIndex.get(b.Key) ?? 99999;\n return aIdx - bIdx;\n });\n }\n}\n","<div class=\"scatter-container\">\n <!-- Loading overlay -->\n @if (IsLoading) {\n <div class=\"loading-overlay\">\n <div class=\"loading-spinner\">\n <i class=\"fa-solid fa-circle-nodes fa-spin\"></i>\n <span>Computing clusters...</span>\n </div>\n </div>\n }\n\n <!-- Empty state -->\n @if (!IsLoading && Points.length === 0) {\n <mj-empty-state\n class=\"empty-state-fill\"\n Icon=\"fa-solid fa-chart-simple\"\n Title=\"No data to display\"\n Message=\"Configure and run clustering to see results\" />\n }\n\n <!-- SVG scatter plot -->\n @if (Points.length > 0) {\n <svg #svgElement\n class=\"scatter-svg\"\n [class.no-transitions]=\"!AnimateTransitions\"\n [attr.viewBox]=\"ViewBoxString\"\n preserveAspectRatio=\"xMidYMid meet\"\n (wheel)=\"OnWheel($event)\"\n (mousedown)=\"OnMouseDown($event)\">\n\n <!-- Gradient definitions for cluster glow -->\n <defs>\n @for (centroid of ClusterCentroids; track TrackCentroidBy($index, centroid)) {\n <radialGradient [attr.id]=\"'cluster-glow-' + centroid.ClusterId\"\n cx=\"50%\" cy=\"50%\" r=\"50%\">\n <stop offset=\"0%\" [attr.stop-color]=\"centroid.Color\" stop-opacity=\"0.12\"/>\n <stop offset=\"100%\" [attr.stop-color]=\"centroid.Color\" stop-opacity=\"0\"/>\n </radialGradient>\n }\n </defs>\n\n <!-- Background grid lines -->\n <g class=\"grid-lines\">\n @for (y of HorizontalGridLines; track y) {\n <line [attr.x1]=\"0\" [attr.y1]=\"y\" [attr.x2]=\"1000\" [attr.y2]=\"y\"/>\n }\n @for (x of VerticalGridLines; track x) {\n <line [attr.x1]=\"x\" [attr.y1]=\"0\" [attr.x2]=\"x\" [attr.y2]=\"700\"/>\n }\n </g>\n\n <!-- Cluster glow + labels (2D only; centroids are 2D aesthetics) -->\n @if (!Is3D) {\n @for (centroid of ClusterCentroids; track TrackCentroidBy($index, centroid)) {\n <circle [attr.cx]=\"centroid.Cx\"\n [attr.cy]=\"centroid.Cy\"\n [attr.r]=\"centroid.R\"\n [attr.fill]=\"'url(#cluster-glow-' + centroid.ClusterId + ')'\"/>\n }\n @for (centroid of ClusterCentroids; track TrackCentroidBy($index, centroid)) {\n @if (GetClusterLabelById(centroid.ClusterId); as label) {\n <text class=\"cluster-label\"\n [attr.x]=\"centroid.Cx\"\n [attr.y]=\"centroid.Cy - centroid.R - 8\"\n text-anchor=\"middle\"\n [attr.fill]=\"centroid.Color\">{{ label }}</text>\n }\n }\n }\n\n <!-- Data points (RenderPoints is depth-sorted in 3D) -->\n @for (point of RenderPoints; track TrackPointBy($index, point)) {\n <circle class=\"data-point\"\n [attr.cx]=\"PX(point)\"\n [attr.cy]=\"PY(point)\"\n [attr.r]=\"GetPointRadius(point)\"\n [attr.fill]=\"GetPointColor(point)\"\n [attr.opacity]=\"GetPointOpacity(point)\"\n (mouseenter)=\"OnPointMouseEnter(point, $event)\"\n (mouseleave)=\"OnPointMouseLeave()\"\n (click)=\"OnPointClick(point); $event.stopPropagation()\"/>\n }\n\n <!-- 3D cluster labels (at projected centroids; follow rotation) -->\n @if (Is3D && ColorBy !== 'entity') {\n @for (lbl of ProjectedClusterLabels; track lbl.ClusterId) {\n @if (GetClusterLabelById(lbl.ClusterId); as text) {\n <text class=\"cluster-label cluster-label-3d\"\n [attr.x]=\"lbl.X\"\n [attr.y]=\"lbl.Y\"\n text-anchor=\"middle\"\n [attr.fill]=\"lbl.Color\">{{ text }}</text>\n }\n }\n }\n\n <!-- Selection rings for selected points -->\n @for (point of Points; track TrackPointBy($index, point)) {\n @if (IsSelected(point)) {\n <circle class=\"selection-ring\"\n [attr.cx]=\"PX(point)\"\n [attr.cy]=\"PY(point)\"\n [attr.r]=\"HighlightRadius + 2\"\n fill=\"none\"\n [attr.stroke]=\"GetPointColor(point)\"\n stroke-width=\"2\"\n opacity=\"0.8\"/>\n }\n }\n\n <!-- Highlight ring for last-clicked point -->\n @if (HighlightedKey) {\n @for (point of Points; track TrackPointBy($index, point)) {\n @if (IsHighlighted(point)) {\n <circle [attr.cx]=\"PX(point)\"\n [attr.cy]=\"PY(point)\"\n [attr.r]=\"HighlightRadius + 4\"\n fill=\"none\"\n [attr.stroke]=\"GetPointColor(point)\"\n stroke-width=\"2.5\"\n opacity=\"0.9\"/>\n }\n }\n }\n </svg>\n }\n\n <!-- 3D orbit hint + reset -->\n @if (Points.length > 0 && Is3D) {\n <div class=\"threed-hint\">\n <i class=\"fa-solid fa-cube\"></i>\n <span>3D · drag to rotate</span>\n <button class=\"threed-reset\" (click)=\"ResetRotation()\" title=\"Reset view\">\n <i class=\"fa-solid fa-rotate-left\"></i>\n </button>\n </div>\n }\n\n <!-- Entity legend (multi-entity color mode) -->\n @if (ShowLegend && ColorBy === 'entity' && EntityLegend.length > 0) {\n <div class=\"legend\">\n <div class=\"legend-title\">Entities</div>\n @for (ent of EntityLegend; track ent.Name) {\n <div class=\"legend-item\">\n <div class=\"legend-dot\" [style.background]=\"ent.Color\"></div>\n <span class=\"legend-label\">{{ ent.Name }}</span>\n <span class=\"legend-count\">{{ ent.Count }}</span>\n </div>\n }\n </div>\n }\n\n <!-- Legend overlay (cluster color mode) -->\n @if (ShowLegend && ColorBy !== 'entity' && Clusters.length > 0) {\n <div class=\"legend\">\n <div class=\"legend-title\">Clusters</div>\n @for (cluster of Clusters; track TrackClusterBy($index, cluster)) {\n <div class=\"legend-item\" (click)=\"OnClusterLegendClick(cluster)\">\n <div class=\"legend-dot\" [style.background]=\"cluster.Color\"></div>\n @if (EditingClusterId === cluster.Id) {\n <input class=\"legend-label-input\"\n [(ngModel)]=\"EditingLabelDraft\"\n (keydown)=\"OnLabelEditKeydown($event, cluster)\"\n (blur)=\"CommitLabelEdit(cluster)\"\n (click)=\"$event.stopPropagation()\"\n autofocus />\n } @else {\n <span class=\"legend-label\">{{ cluster.Label }}</span>\n <button class=\"legend-edit-btn\"\n title=\"Edit label\"\n (click)=\"StartLabelEdit(cluster, $event)\">\n <i class=\"fa-solid fa-pencil\"></i>\n </button>\n }\n <span class=\"legend-count\">{{ cluster.MemberCount }}</span>\n </div>\n }\n </div>\n }\n\n <!-- Tooltip -->\n @if (ShowTooltip && HoveredPoint) {\n <div class=\"tooltip\"\n [style.left.px]=\"TooltipX\"\n [style.top.px]=\"TooltipY\">\n <mj-entity-card\n [EntityName]=\"EntityName\"\n [Record]=\"HoveredPoint.Metadata\"\n Variant=\"compact\">\n </mj-entity-card>\n <div class=\"tt-cluster\">\n <i class=\"fa-solid fa-circle\" style=\"font-size: 7px; vertical-align: middle\"></i>\n {{ GetClusterLabel(HoveredPoint) }}\n </div>\n <div class=\"tt-action\">\n <i class=\"fa-solid fa-arrow-up-right-from-square\"></i> Click to view details\n </div>\n </div>\n }\n\n <!-- Detail Panel (slide-in from right) -->\n <div class=\"detail-panel\" [class.detail-panel-open]=\"ShowDetailPanel && SelectedPoint\">\n @if (SelectedPoint) {\n <!-- Panel Header -->\n <div class=\"detail-header\">\n <div class=\"detail-header-content\">\n @if (SelectedPoint.Metadata?.['EntityIcon']) {\n <div class=\"detail-icon\">\n <i [class]=\"SelectedPoint.Metadata['EntityIcon']\"></i>\n </div>\n }\n <div class=\"detail-header-text\">\n <div class=\"detail-name\">{{ SelectedPoint.Label }}</div>\n @if (SelectedPoint.Metadata?.['Entity']) {\n <span class=\"detail-entity-badge\">{{ SelectedPoint.Metadata['Entity'] }}</span>\n }\n </div>\n </div>\n <button class=\"detail-close\" (click)=\"CloseDetailPanel()\" title=\"Close\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n\n <!-- Cluster badge -->\n <div class=\"detail-cluster\">\n <span class=\"detail-cluster-dot\"\n [style.background]=\"GetClusterColor(SelectedPoint.ClusterId)\"></span>\n {{ GetClusterLabel(SelectedPoint) }}\n </div>\n\n <!-- Metadata fields via entity card -->\n <mj-entity-card\n [EntityName]=\"EntityName\"\n [Record]=\"SelectedPoint.Metadata\"\n Variant=\"detail\"\n CssClass=\"detail-entity-card\">\n </mj-entity-card>\n\n <!-- Cluster Members -->\n <div class=\"detail-members-section\">\n <mj-accordion-panel\n Size=\"sm\"\n [Fill]=\"true\"\n [FlushBody]=\"true\"\n [(Expanded)]=\"ClusterMembersExpanded\">\n <ng-template mjAccordionTitle>\n Cluster Members\n <span class=\"mj-accordion-badge mj-accordion-badge--right\">{{ ClusterMembers.length }}</span>\n </ng-template>\n <ng-template mjAccordionBody>\n <div class=\"detail-members-list\">\n @for (member of ClusterMembers; track TrackMemberBy($index, member)) {\n <div class=\"detail-member-row\"\n [class.active]=\"member.VectorKey === SelectedPoint?.VectorKey\"\n (click)=\"OnClusterMemberClick(member)\">\n @if (member.Metadata?.['EntityIcon']) {\n <i [class]=\"member.Metadata['EntityIcon']\" class=\"member-icon\"></i>\n }\n <span class=\"member-label\">{{ member.Label }}</span>\n </div>\n }\n </div>\n </ng-template>\n </mj-accordion-panel>\n </div>\n\n <!-- Open Record button -->\n <div class=\"detail-footer\">\n <button class=\"detail-open-btn\" (click)=\"OnOpenRecordClick()\">\n <i class=\"fa-solid fa-arrow-up-right-from-square\"></i>\n Open Record\n </button>\n </div>\n }\n </div>\n</div>\n"]}
@@ -6,10 +6,11 @@ import * as i4 from "./view-type/cluster-view-prop-sheet.component";
6
6
  import * as i5 from "@angular/common";
7
7
  import * as i6 from "@angular/forms";
8
8
  import * as i7 from "@memberjunction/ng-entity-card";
9
+ import * as i8 from "@memberjunction/ng-ui-components";
9
10
  export declare class ClusteringModule {
10
11
  constructor();
11
12
  static ɵfac: i0.ɵɵFactoryDeclaration<ClusteringModule, never>;
12
- static ɵmod: i0.ɵɵNgModuleDeclaration<ClusteringModule, [typeof i1.ClusterScatterComponent, typeof i2.ClusterConfigPanelComponent, typeof i3.ClusterViewRendererComponent, typeof i4.ClusterViewPropSheetComponent], [typeof i5.CommonModule, typeof i6.FormsModule, typeof i7.MJEntityCardComponent], [typeof i1.ClusterScatterComponent, typeof i2.ClusterConfigPanelComponent, typeof i3.ClusterViewRendererComponent, typeof i4.ClusterViewPropSheetComponent]>;
13
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ClusteringModule, [typeof i1.ClusterScatterComponent, typeof i2.ClusterConfigPanelComponent, typeof i3.ClusterViewRendererComponent, typeof i4.ClusterViewPropSheetComponent], [typeof i5.CommonModule, typeof i6.FormsModule, typeof i7.MJEntityCardComponent, typeof i8.MJEmptyStateComponent, typeof i8.MJAccordionModule], [typeof i1.ClusterScatterComponent, typeof i2.ClusterConfigPanelComponent, typeof i3.ClusterViewRendererComponent, typeof i4.ClusterViewPropSheetComponent]>;
13
14
  static ɵinj: i0.ɵɵInjectorDeclaration<ClusteringModule>;
14
15
  }
15
16
  //# sourceMappingURL=clustering.module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"clustering.module.d.ts","sourceRoot":"","sources":["../../src/lib/clustering.module.ts"],"names":[],"mappings":";;;;;;;;AAWA,qBAmBa,gBAAgB;;yCAAhB,gBAAgB;0CAAhB,gBAAgB;0CAAhB,gBAAgB;CAO5B"}
1
+ {"version":3,"file":"clustering.module.d.ts","sourceRoot":"","sources":["../../src/lib/clustering.module.ts"],"names":[],"mappings":";;;;;;;;;AAYA,qBAqBa,gBAAgB;;yCAAhB,gBAAgB;0CAAhB,gBAAgB;0CAAhB,gBAAgB;CAO5B"}
@@ -7,6 +7,7 @@ import { ClusterViewRendererComponent } from './view-type/cluster-view-renderer.
7
7
  import { ClusterViewPropSheetComponent } from './view-type/cluster-view-prop-sheet.component';
8
8
  import { LoadClusterViewType } from './view-type/cluster-view-type';
9
9
  import { MJEntityCardComponent } from '@memberjunction/ng-entity-card';
10
+ import { MJEmptyStateComponent, MJAccordionModule } from '@memberjunction/ng-ui-components';
10
11
  import * as i0 from "@angular/core";
11
12
  export class ClusteringModule {
12
13
  constructor() {
@@ -19,7 +20,9 @@ export class ClusteringModule {
19
20
  static { this.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: ClusteringModule }); }
20
21
  static { this.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule,
21
22
  FormsModule,
22
- MJEntityCardComponent] }); }
23
+ MJEntityCardComponent,
24
+ MJEmptyStateComponent,
25
+ MJAccordionModule] }); }
23
26
  }
24
27
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ClusteringModule, [{
25
28
  type: NgModule,
@@ -34,6 +37,8 @@ export class ClusteringModule {
34
37
  CommonModule,
35
38
  FormsModule,
36
39
  MJEntityCardComponent,
40
+ MJEmptyStateComponent,
41
+ MJAccordionModule,
37
42
  ],
38
43
  exports: [
39
44
  ClusterScatterComponent,
@@ -48,7 +53,9 @@ export class ClusteringModule {
48
53
  ClusterViewRendererComponent,
49
54
  ClusterViewPropSheetComponent], imports: [CommonModule,
50
55
  FormsModule,
51
- MJEntityCardComponent], exports: [ClusterScatterComponent,
56
+ MJEntityCardComponent,
57
+ MJEmptyStateComponent,
58
+ MJAccordionModule], exports: [ClusterScatterComponent,
52
59
  ClusterConfigPanelComponent,
53
60
  ClusterViewRendererComponent,
54
61
  ClusterViewPropSheetComponent] }); })();
@@ -1 +1 @@
1
- {"version":3,"file":"clustering.module.js","sourceRoot":"","sources":["../../src/lib/clustering.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAC;AAC3F,OAAO,EAAE,6BAA6B,EAAE,MAAM,+CAA+C,CAAC;AAC9F,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;;AAqBvE,MAAM,OAAO,gBAAgB;IACzB;QACI,gFAAgF;QAChF,4EAA4E;QAC5E,6EAA6E;QAC7E,mBAAmB,EAAE,CAAC;IAC1B,CAAC;iHANQ,gBAAgB;mEAAhB,gBAAgB;uEAXrB,YAAY;YACZ,WAAW;YACX,qBAAqB;;iFAShB,gBAAgB;cAnB5B,QAAQ;eAAC;gBACN,YAAY,EAAE;oBACV,uBAAuB;oBACvB,2BAA2B;oBAC3B,4BAA4B;oBAC5B,6BAA6B;iBAChC;gBACD,OAAO,EAAE;oBACL,YAAY;oBACZ,WAAW;oBACX,qBAAqB;iBACxB;gBACD,OAAO,EAAE;oBACL,uBAAuB;oBACvB,2BAA2B;oBAC3B,4BAA4B;oBAC5B,6BAA6B;iBAChC;aACJ;;wFACY,gBAAgB,mBAjBrB,uBAAuB;QACvB,2BAA2B;QAC3B,4BAA4B;QAC5B,6BAA6B,aAG7B,YAAY;QACZ,WAAW;QACX,qBAAqB,aAGrB,uBAAuB;QACvB,2BAA2B;QAC3B,4BAA4B;QAC5B,6BAA6B","sourcesContent":["import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\nimport { ClusterScatterComponent } from './cluster-scatter.component';\nimport { ClusterConfigPanelComponent } from './cluster-config-panel.component';\nimport { ClusterViewRendererComponent } from './view-type/cluster-view-renderer.component';\nimport { ClusterViewPropSheetComponent } from './view-type/cluster-view-prop-sheet.component';\nimport { LoadClusterViewType } from './view-type/cluster-view-type';\nimport { MJEntityCardComponent } from '@memberjunction/ng-entity-card';\n\n@NgModule({\n declarations: [\n ClusterScatterComponent,\n ClusterConfigPanelComponent,\n ClusterViewRendererComponent,\n ClusterViewPropSheetComponent,\n ],\n imports: [\n CommonModule,\n FormsModule,\n MJEntityCardComponent,\n ],\n exports: [\n ClusterScatterComponent,\n ClusterConfigPanelComponent,\n ClusterViewRendererComponent,\n ClusterViewPropSheetComponent,\n ],\n})\nexport class ClusteringModule {\n constructor() {\n // Guarantee the Cluster view-type descriptor's @RegisterClass runs whenever the\n // clustering feature loads (ng-clustering sets sideEffects:false). App-wide\n // registration is also covered by the generated ng-bootstrap class manifest.\n LoadClusterViewType();\n }\n}\n"]}
1
+ {"version":3,"file":"clustering.module.js","sourceRoot":"","sources":["../../src/lib/clustering.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAC;AAC3F,OAAO,EAAE,6BAA6B,EAAE,MAAM,+CAA+C,CAAC;AAC9F,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;;AAuB5F,MAAM,OAAO,gBAAgB;IACzB;QACI,gFAAgF;QAChF,4EAA4E;QAC5E,6EAA6E;QAC7E,mBAAmB,EAAE,CAAC;IAC1B,CAAC;iHANQ,gBAAgB;mEAAhB,gBAAgB;uEAbrB,YAAY;YACZ,WAAW;YACX,qBAAqB;YACrB,qBAAqB;YACrB,iBAAiB;;iFASZ,gBAAgB;cArB5B,QAAQ;eAAC;gBACN,YAAY,EAAE;oBACV,uBAAuB;oBACvB,2BAA2B;oBAC3B,4BAA4B;oBAC5B,6BAA6B;iBAChC;gBACD,OAAO,EAAE;oBACL,YAAY;oBACZ,WAAW;oBACX,qBAAqB;oBACrB,qBAAqB;oBACrB,iBAAiB;iBACpB;gBACD,OAAO,EAAE;oBACL,uBAAuB;oBACvB,2BAA2B;oBAC3B,4BAA4B;oBAC5B,6BAA6B;iBAChC;aACJ;;wFACY,gBAAgB,mBAnBrB,uBAAuB;QACvB,2BAA2B;QAC3B,4BAA4B;QAC5B,6BAA6B,aAG7B,YAAY;QACZ,WAAW;QACX,qBAAqB;QACrB,qBAAqB;QACrB,iBAAiB,aAGjB,uBAAuB;QACvB,2BAA2B;QAC3B,4BAA4B;QAC5B,6BAA6B","sourcesContent":["import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\nimport { ClusterScatterComponent } from './cluster-scatter.component';\nimport { ClusterConfigPanelComponent } from './cluster-config-panel.component';\nimport { ClusterViewRendererComponent } from './view-type/cluster-view-renderer.component';\nimport { ClusterViewPropSheetComponent } from './view-type/cluster-view-prop-sheet.component';\nimport { LoadClusterViewType } from './view-type/cluster-view-type';\nimport { MJEntityCardComponent } from '@memberjunction/ng-entity-card';\nimport { MJEmptyStateComponent, MJAccordionModule } from '@memberjunction/ng-ui-components';\n\n@NgModule({\n declarations: [\n ClusterScatterComponent,\n ClusterConfigPanelComponent,\n ClusterViewRendererComponent,\n ClusterViewPropSheetComponent,\n ],\n imports: [\n CommonModule,\n FormsModule,\n MJEntityCardComponent,\n MJEmptyStateComponent,\n MJAccordionModule,\n ],\n exports: [\n ClusterScatterComponent,\n ClusterConfigPanelComponent,\n ClusterViewRendererComponent,\n ClusterViewPropSheetComponent,\n ],\n})\nexport class ClusteringModule {\n constructor() {\n // Guarantee the Cluster view-type descriptor's @RegisterClass runs whenever the\n // clustering feature loads (ng-clustering sets sideEffects:false). App-wide\n // registration is also covered by the generated ng-bootstrap class manifest.\n LoadClusterViewType();\n }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=cluster-view-prop-sheet.component.dom.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cluster-view-prop-sheet.component.dom.test.d.ts","sourceRoot":"","sources":["../../../src/lib/view-type/cluster-view-prop-sheet.component.dom.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,64 @@
1
+ import { describe, it, expect } from 'vitest';
2
+ import { CommonModule } from '@angular/common';
3
+ import { renderComponentFixture, query, queryAll, capture } from '@memberjunction/ng-test-utils';
4
+ import { ClusterViewPropSheetComponent } from './cluster-view-prop-sheet.component';
5
+ /**
6
+ * DOM-level spec for <mj-cluster-view-prop-sheet>. Module-declared, inline template,
7
+ * no external data — configured via the `config` @Input (an opaque host map). The
8
+ * template uses native [value]/(change), so only CommonModule is needed (for @if).
9
+ */
10
+ function renderSheet(config = {}) {
11
+ return renderComponentFixture(ClusterViewPropSheetComponent, {
12
+ imports: [CommonModule],
13
+ declarations: [ClusterViewPropSheetComponent],
14
+ inputs: { config },
15
+ });
16
+ }
17
+ describe('ClusterViewPropSheetComponent (DOM)', () => {
18
+ it('renders the K (clusters) input when algorithm is kmeans', () => {
19
+ const fixture = renderSheet({ algorithm: 'kmeans' });
20
+ const labels = queryAll(fixture, '.cluster-prop-row span').map((s) => s.textContent?.trim());
21
+ expect(labels).toContain('Clusters (K)');
22
+ });
23
+ it('hides the K input when algorithm is dbscan', () => {
24
+ const fixture = renderSheet({ algorithm: 'dbscan' });
25
+ const labels = queryAll(fixture, '.cluster-prop-row span').map((s) => s.textContent?.trim());
26
+ expect(labels).not.toContain('Clusters (K)');
27
+ });
28
+ it('reflects the algorithm value in the algorithm <select>', () => {
29
+ const fixture = renderSheet({ algorithm: 'dbscan' });
30
+ const algSelect = query(fixture, '.cluster-prop-row select');
31
+ expect(algSelect.value).toBe('dbscan');
32
+ });
33
+ it('emits the full config map with the patched algorithm on change', () => {
34
+ const fixture = renderSheet({ algorithm: 'kmeans', k: 4 });
35
+ const changes = capture(fixture.componentInstance.configChange);
36
+ const algSelect = query(fixture, '.cluster-prop-row select');
37
+ algSelect.value = 'dbscan';
38
+ algSelect.dispatchEvent(new Event('change'));
39
+ expect(changes.length).toBe(1);
40
+ expect(changes[0]['algorithm']).toBe('dbscan');
41
+ });
42
+ it('reflects the nameClusters flag on the checkbox and emits when toggled', () => {
43
+ const fixture = renderSheet({ nameClusters: false });
44
+ const checkbox = query(fixture, 'input[type="checkbox"]');
45
+ expect(checkbox.checked).toBe(false);
46
+ const changes = capture(fixture.componentInstance.configChange);
47
+ checkbox.checked = true;
48
+ checkbox.dispatchEvent(new Event('change'));
49
+ expect(changes.length).toBe(1);
50
+ expect(changes[0]['nameClusters']).toBe(true);
51
+ });
52
+ it('emits a patched maxRecords on input', () => {
53
+ const fixture = renderSheet({ maxRecords: 500 });
54
+ const changes = capture(fixture.componentInstance.configChange);
55
+ // Max records is the number input that is not the K input (K hidden here is false; kmeans default).
56
+ const numberInputs = queryAll(fixture, 'input[type="number"]');
57
+ const maxRecordsInput = numberInputs[numberInputs.length - 1];
58
+ maxRecordsInput.value = '1000';
59
+ maxRecordsInput.dispatchEvent(new Event('input'));
60
+ expect(changes.length).toBe(1);
61
+ expect(changes[0]['maxRecords']).toBe(1000);
62
+ });
63
+ });
64
+ //# sourceMappingURL=cluster-view-prop-sheet.component.dom.test.js.map