UNPKG

ngx-interactive-org-chart

Version:

Modern Angular organizational chart component with interactive pan/zoom functionality and more..

1 lines 51.3 kB
{"version":3,"file":"ngx-interactive-org-chart.mjs","sources":["../../../projects/ngx-interactive-org-chart/src/lib/helpers/ngx-interactive-org-chart.helper.ts","../../../projects/ngx-interactive-org-chart/src/lib/components/ngx-interactive-org-chart/default-theme-options.ts","../../../projects/ngx-interactive-org-chart/src/lib/components/ngx-interactive-org-chart/ngx-interactive-org-chart.component.ts","../../../projects/ngx-interactive-org-chart/src/lib/components/ngx-interactive-org-chart/ngx-interactive-org-chart.component.html","../../../projects/ngx-interactive-org-chart/src/public-api.ts","../../../projects/ngx-interactive-org-chart/src/ngx-interactive-org-chart.ts"],"sourcesContent":["import { OrgChartNode, OrgChartToggleNodeArgs } from '../models';\n\nexport function toggleNodeCollapse<T>({\n node,\n targetNode,\n collapse,\n}: OrgChartToggleNodeArgs<T>): OrgChartNode<T> {\n if (node.id === targetNode) {\n const newCollapse = collapse ?? !node.collapsed;\n\n return {\n ...node,\n collapsed: newCollapse,\n children: node.children?.map(child =>\n setCollapseRecursively(child, newCollapse)\n ),\n };\n }\n\n if (node.children?.length) {\n return {\n ...node,\n children: node.children.map(child =>\n toggleNodeCollapse({ node: child, targetNode, collapse })\n ),\n };\n }\n\n return node;\n}\n\nfunction setCollapseRecursively<T>(\n node: OrgChartNode<T>,\n collapse: boolean\n): OrgChartNode<T> {\n return {\n ...node,\n collapsed: collapse,\n children: node.children?.map(child =>\n setCollapseRecursively(child, collapse)\n ),\n };\n}\n\nexport function mapNodesRecursively<T>(\n node: OrgChartNode<T>,\n collapsed?: boolean\n): OrgChartNode<T> {\n const mappedChildren =\n node.children?.map(child =>\n mapNodesRecursively(child as OrgChartNode<T>, collapsed)\n ) || [];\n\n const descendantsCount = mappedChildren.reduce(\n (acc, child) => acc + 1 + (child.descendantsCount ?? 0),\n 0\n );\n\n return {\n ...node,\n id: node.id ?? crypto.randomUUID(),\n collapsed: collapsed ?? node.collapsed ?? false,\n hidden: node.hidden ?? false,\n children: mappedChildren,\n descendantsCount,\n };\n}\n","import { NgxInteractiveOrgChartTheme } from '../../models';\n\nexport const DEFAULT_THEME_OPTIONS: NgxInteractiveOrgChartTheme = {\n node: {\n background: '#ffffff',\n color: '#4a4a4a',\n activeOutlineColor: '#3b82f6',\n outlineWidth: '2px',\n shadow: '0 2px 10px rgba(0, 0, 0, 0.1)',\n outlineColor: '#d1d5db',\n highlightShadowColor: '#3b82f6',\n padding: '12px 16px',\n borderRadius: '8px',\n containerSpacing: '20px',\n activeColor: '#3b82f6',\n maxWidth: 'auto',\n minWidth: 'auto',\n maxHeight: 'auto',\n minHeight: 'auto',\n },\n connector: {\n color: '#d1d5db',\n activeColor: '#3b82f6',\n borderRadius: '10px',\n width: '1.5px',\n },\n collapseButton: {\n size: '20px',\n borderColor: '#d1d5db',\n borderRadius: '0.25rem',\n color: '#4a4a4a',\n background: '#ffffff',\n hoverColor: '#3b82f6',\n hoverBackground: '#f3f4f6',\n hoverShadow: '0 2px 4px rgba(0, 0, 0, 0.1)',\n hoverTransformScale: '1.05',\n focusOutline: '2px solid #3b82f6',\n countFontSize: '0.75rem',\n },\n container: {\n background: 'transparent',\n border: 'none',\n },\n};\n","import { NgClass, NgStyle, NgTemplateOutlet } from '@angular/common';\nimport {\n AfterViewInit,\n Component,\n computed,\n contentChild,\n ContentChild,\n contentChildren,\n effect,\n ElementRef,\n inject,\n input,\n OnDestroy,\n signal,\n TemplateRef,\n viewChild,\n} from '@angular/core';\nimport {\n NgxInteractiveOrgChartLayout,\n NgxInteractiveOrgChartTheme,\n OrgChartNode,\n} from '../../models';\nimport { mapNodesRecursively, toggleNodeCollapse } from '../../helpers';\n\nimport createPanZoom, { PanZoom } from 'panzoom';\nimport { animate, style, transition, trigger } from '@angular/animations';\nimport { DEFAULT_THEME_OPTIONS } from './default-theme-options';\n\nconst RESET_DELAY = 300; // ms\n\n@Component({\n standalone: true,\n selector: 'ngx-interactive-org-chart',\n imports: [NgTemplateOutlet, NgClass, NgStyle],\n templateUrl: './ngx-interactive-org-chart.component.html',\n styleUrls: ['./ngx-interactive-org-chart.component.scss'],\n animations: [\n trigger('toggleNode', [\n transition(':enter', [\n style({ width: '0', height: '0', opacity: 0, transform: 'scale(0.8)' }),\n animate(\n '300ms ease-out',\n style({ width: '*', height: '*', opacity: 1, transform: 'scale(1)' })\n ),\n ]),\n transition(':leave', [\n style({ width: '*', height: '*' }),\n animate(\n '300ms ease-out',\n style({\n width: '0',\n height: '0',\n opacity: 0,\n transform: 'scale(0.8)',\n })\n ),\n ]),\n ]),\n ],\n host: {\n '[style.--node-background]': 'finalThemeOptions().node.background',\n '[style.--node-color]': 'finalThemeOptions().node.color',\n '[style.--node-shadow]': 'finalThemeOptions().node.shadow',\n '[style.--node-outline-color]': 'finalThemeOptions().node.outlineColor',\n '[style.--node-outline-width]': 'finalThemeOptions().node.outlineWidth',\n '[style.--node-active-outline-color]':\n 'finalThemeOptions().node.activeOutlineColor',\n '[style.--node-highlight-shadow-color]':\n 'finalThemeOptions().node.highlightShadowColor',\n '[style.--node-padding]': 'finalThemeOptions().node.padding',\n '[style.--node-border-radius]': 'finalThemeOptions().node.borderRadius',\n '[style.--node-active-color]': 'finalThemeOptions().node.activeColor',\n '[style.--node-max-width]': 'finalThemeOptions().node.maxWidth',\n '[style.--node-min-width]': 'finalThemeOptions().node.minWidth',\n '[style.--node-max-height]': 'finalThemeOptions().node.maxHeight',\n '[style.--node-min-height]': 'finalThemeOptions().node.minHeight',\n '[style.--connector-color]': 'finalThemeOptions().connector.color',\n '[style.--connector-active-color]':\n 'finalThemeOptions().connector.activeColor',\n '[style.--connector-border-radius]':\n 'finalThemeOptions().connector.borderRadius',\n '[style.--node-container-spacing]':\n 'finalThemeOptions().node.containerSpacing',\n '[style.--connector-width]': 'finalThemeOptions().connector.width',\n '[style.--collapse-button-size]': 'finalThemeOptions().collapseButton.size',\n '[style.--collapse-button-border-color]':\n 'finalThemeOptions().collapseButton.borderColor',\n '[style.--collapse-button-border-radius]':\n 'finalThemeOptions().collapseButton.borderRadius',\n '[style.--collapse-button-color]':\n 'finalThemeOptions().collapseButton.color',\n '[style.--collapse-button-background]':\n 'finalThemeOptions().collapseButton.background',\n '[style.--collapse-button-hover-color]':\n 'finalThemeOptions().collapseButton.hoverColor',\n '[style.--collapse-button-hover-background]':\n 'finalThemeOptions().collapseButton.hoverBackground',\n '[style.--collapse-button-hover-shadow]':\n 'finalThemeOptions().collapseButton.hoverShadow',\n '[style.--collapse-button-hover-transform-scale]':\n 'finalThemeOptions().collapseButton.hoverTransformScale',\n '[style.--collapse-button-focus-outline]':\n 'finalThemeOptions().collapseButton.focusOutline',\n '[style.--collapse-button-count-font-size]':\n 'finalThemeOptions().collapseButton.countFontSize',\n '[style.--container-background]':\n 'finalThemeOptions().container.background',\n '[style.--container-border]': 'finalThemeOptions().container.border',\n '[attr.data-layout]': 'layout()',\n },\n})\nexport class NgxInteractiveOrgChart<T> implements AfterViewInit, OnDestroy {\n readonly #elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n @ContentChild('nodeTemplate', { static: false })\n protected readonly customNodeTemplate?: TemplateRef<unknown>;\n\n protected readonly panZoomContainer =\n viewChild.required<ElementRef<HTMLElement>>('panZoomContainer');\n\n private readonly orgChartContainer =\n viewChild.required<ElementRef<HTMLElement>>('orgChartContainer');\n\n /**\n * The data for the org chart.\n */\n readonly data = input.required<OrgChartNode<T>>();\n /**\n * The initial zoom level for the chart.\n */\n readonly initialZoom = input<number>();\n /**\n * The minimum zoom level for the chart\n */\n readonly minZoom = input<number>(0.1);\n /**\n * The maximum zoom level for the chart.\n */\n readonly maxZoom = input<number>(5);\n /**\n * The speed at which the chart zooms in/out on wheel or pinch.\n */\n readonly zoomSpeed = input<number>(1);\n /**\n * The speed at which the chart zooms in/out on double-click.\n */\n readonly zoomDoubleClickSpeed = input<number>(2);\n /**\n * Whether the nodes can be collapsed/expanded.\n */\n readonly collapsible = input<boolean>(true);\n /**\n * The CSS class to apply to each node element.\n */\n readonly nodeClass = input<string>();\n /**\n * If set to `true`, all the nodes will be initially collapsed.\n */\n readonly initialCollapsed = input<boolean>();\n /**\n * Whether to enable RTL (right-to-left) layout.\n */\n readonly isRtl = input<boolean>();\n /**\n * The layout direction of the org chart tree.\n * - 'vertical': Traditional top-to-bottom tree layout\n * - 'horizontal': Left-to-right tree layout\n */\n readonly layout = input<NgxInteractiveOrgChartLayout>('vertical');\n /**\n * Whether to focus on the node when it is collapsed and focus on its children when it is expanded.\n */\n readonly focusOnCollapseOrExpand = input<boolean>(false);\n /**\n * Whether to display the count of children for each node on expand/collapse button.\n */\n readonly displayChildrenCount = input<boolean>(true);\n /**\n * The ratio of the node's width to the viewport's width when highlighting.\n */\n readonly highlightZoomNodeWidthRatio = input<number>(0.3);\n\n /**\n * The ratio of the node's height to the viewport's height when highlighting.\n */\n readonly highlightZoomNodeHeightRatio = input<number>(0.4);\n /**\n * The minimum zoom level for the chart when highlighting a node.\n */\n readonly highlightZoomMinimum = input<number>(0.8);\n\n /**\n * The theme options for the org chart.\n * This allows customization of the chart's appearance, including node styles, connector styles, and\n * other visual elements.\n */\n readonly themeOptions = input<NgxInteractiveOrgChartTheme>();\n\n private readonly defaultThemeOptions: NgxInteractiveOrgChartTheme =\n DEFAULT_THEME_OPTIONS;\n\n protected panZoomInstance: PanZoom | null = null;\n\n protected readonly finalThemeOptions = computed<NgxInteractiveOrgChartTheme>(\n () => {\n const themeOptions = this.themeOptions();\n\n return {\n node: {\n ...this.defaultThemeOptions.node,\n ...themeOptions?.node,\n },\n connector: {\n ...this.defaultThemeOptions.connector,\n ...themeOptions?.connector,\n },\n collapseButton: {\n ...this.defaultThemeOptions.collapseButton,\n ...themeOptions?.collapseButton,\n },\n container: {\n ...this.defaultThemeOptions.container,\n ...themeOptions?.container,\n },\n };\n }\n );\n\n protected readonly nodes = signal<OrgChartNode<T> | null>(null);\n\n protected readonly scale = signal<number>(0);\n\n /**\n * A computed property that returns the current scale of the org chart.\n * @returns {number} The current scale of the org chart.\n */\n readonly getScale = computed(() => this.scale());\n\n /**\n * A computed property that flattens the org chart nodes into a single array.\n * It recursively traverses the nodes and their children, returning a flat array of OrgChartNode<T>.\n * This is useful for operations that require a single list of all nodes, such as searching or displaying all nodes in a list.\n * @returns {OrgChartNode<T>[]} An array of all nodes in the org chart, flattened from the hierarchical structure.\n */\n readonly flattenedNodes = computed(() => {\n const nodes = this.nodes();\n\n if (!nodes) return [];\n\n const flatten = (node: OrgChartNode<T>): OrgChartNode<T>[] => {\n const children: OrgChartNode<T>[] =\n (node.children as OrgChartNode<T>[] | undefined)?.flatMap(flatten) ||\n [];\n return [node, ...children];\n };\n\n return nodes ? flatten(nodes) : [];\n });\n\n private readonly setNodes = effect(() => {\n const data = this.data();\n const initialCollapsed = this.initialCollapsed();\n\n if (data) {\n this.nodes.set(mapNodesRecursively(data, initialCollapsed));\n }\n });\n\n ngAfterViewInit(): void {\n this.initiatePanZoom();\n }\n\n /**\n * Initializes the pan-zoom functionality for the org chart.\n * This method creates a new panZoom instance and sets it up with the container element.\n * It also ensures that any existing panZoom instance is disposed of before creating a new one.\n */\n initiatePanZoom(): void {\n if (this.panZoomInstance) {\n this.panZoomInstance.dispose();\n }\n\n const container = this.panZoomContainer()?.nativeElement;\n const hostingElement = this.#elementRef.nativeElement;\n\n this.panZoomInstance = createPanZoom(container, {\n initialZoom: this.getFitScale(),\n initialX: hostingElement.offsetWidth / 2,\n initialY: hostingElement.offsetHeight / 2,\n enableTextSelection: false,\n minZoom: this.minZoom(),\n maxZoom: this.maxZoom(),\n zoomSpeed: this.zoomSpeed(),\n smoothScroll: true,\n zoomDoubleClickSpeed: this.zoomDoubleClickSpeed(),\n });\n\n this.calculateScale();\n\n this.panZoomInstance?.on('zoom', e => {\n this.calculateScale();\n });\n }\n\n /**\n * Zooms in of the org chart.\n * @param {Object} options - Options for zooming.\n * @param {number} [options.by=10] - The percentage to zoom in or out by.\n * @param {boolean} [options.relative=true] - Whether to zoom relative to the current zoom level.\n * If true, zooms in by a percentage of the current zoom level.\n * If false, zooms to an absolute scale.\n */\n zoomIn(\n { by, relative }: { by?: number; relative?: boolean } = { relative: true }\n ): void {\n this.zoom({ type: 'in', by, relative });\n }\n\n /**\n * Zooms out of the org chart.\n * @param {Object} options - Options for zooming.\n * @param {number} [options.by=10] - The percentage to zoom in or out by.\n * @param {boolean} [options.relative=true] - Whether to zoom relative to the current zoom level.\n * If true, zooms out by a percentage of the current zoom level.\n * If false, zooms to an absolute scale.\n */\n zoomOut(\n { by, relative }: { by?: number; relative?: boolean } = { relative: true }\n ): void {\n this.zoom({ type: 'out', by, relative });\n }\n\n /**\n * Highlights a specific node in the org chart and pans to it.\n * @param {string} nodeId - The ID of the node to highlight.\n */\n highlightNode(nodeId: string | number): void {\n this.toggleCollapseAll(false);\n\n setTimeout(() => {\n const nodeElement = this.#elementRef?.nativeElement.querySelector(\n `#${this.getNodeId(nodeId)}`\n ) as HTMLElement;\n\n this.panZoomToNode({\n nodeElement,\n });\n }, 200);\n }\n\n /**\n * Pans the view of the org chart.\n * @param x The horizontal offset to pan to.\n * @param y The vertical offset to pan to.\n * @param smooth Whether to animate the panning.\n * @returns void\n */\n pan(x: number, y: number, smooth: boolean): void {\n const container = this.orgChartContainer()?.nativeElement;\n\n if (!container || !this.panZoomInstance) {\n return;\n }\n\n const containerRect = container.getBoundingClientRect();\n const panZoomRect =\n this.panZoomContainer()?.nativeElement.getBoundingClientRect();\n\n const transformedX = x - containerRect.x + panZoomRect.x;\n const transformedY = y - containerRect.y + panZoomRect.y;\n\n if (smooth) {\n this.panZoomInstance.smoothMoveTo(transformedX, transformedY);\n } else {\n this.panZoomInstance.moveTo(transformedX, transformedY);\n }\n }\n\n /**\n * Resets the pan position of the org chart to center it horizontally and vertically.\n * This method calculates the center position based on the container's dimensions\n * and the hosting element's dimensions, then moves the panZoom instance to that position.\n */\n resetPan(): void {\n const container = this.panZoomContainer()?.nativeElement;\n\n if (!container || !this.panZoomInstance) {\n return;\n }\n\n const containerRect = container.getBoundingClientRect();\n const hostingElement = this.#elementRef.nativeElement;\n const windowWidth = hostingElement.getBoundingClientRect().width;\n const windowHeight = hostingElement.getBoundingClientRect().height;\n\n this.panZoomInstance?.smoothMoveTo(\n (-1 * containerRect.width) / 2 + windowWidth / 2,\n (-1 * containerRect.height) / 2 + windowHeight / 2\n );\n }\n\n /**\n * Resets the zoom level of the org chart to fit the content within the container.\n * This method calculates the optimal scale to fit the content and applies it.\n * @param {number} [padding=20] - Optional padding around the content when calculating the fit scale.\n */\n resetZoom(padding: number = 20): void {\n if (!this.panZoomInstance) {\n return;\n }\n\n const container = this.panZoomContainer()?.nativeElement;\n\n if (!container) {\n return;\n }\n\n this.zoomOut({ by: this.getFitScale(padding) });\n }\n\n /**\n * Resets both the pan position and zoom level of the org chart.\n * This method first resets the pan position, then resets the zoom level after a short delay.\n * @param {number} [padding=20] - Optional padding around the content when calculating the fit scale.\n */\n resetPanAndZoom(padding = 20): void {\n this.resetPan();\n\n setTimeout(() => {\n this.resetZoom(padding);\n }, RESET_DELAY);\n }\n\n /**\n * Toggles the collapse state of all nodes in the org chart.\n * If `collapse` is provided, it will collapse or expand all nodes accordingly.\n * If not provided, it will toggle the current state of the root node.\n */\n toggleCollapseAll(collapse?: boolean): void {\n const nodes = this.nodes();\n\n if (nodes?.children?.length && this.collapsible()) {\n this.onToggleCollapse({ node: nodes, collapse });\n }\n }\n\n /**\n * Toggles the collapse state of a specific node in the org chart.\n * If `collapse` is provided, it will collapse or expand the node accordingly.\n * If not provided, it will toggle the current state of the node.\n * @param {Object} options - Options for toggling collapse.\n * @param {OrgChartNode<T>} options.node - The node to toggle.\n * @param {boolean} [options.collapse] - Whether to collapse or expand the node.\n * @param {boolean} [options.highlightNode=false] - Whether to highlight the node after toggling.\n * @param {boolean} [options.playAnimation=false] - Whether to play animation when highlighting.\n */\n onToggleCollapse({\n node,\n collapse,\n highlightNode = false,\n playAnimation = false,\n }: {\n node: OrgChartNode<T>;\n collapse?: boolean;\n highlightNode?: boolean;\n playAnimation?: boolean;\n }): void {\n if (!this.collapsible()) {\n return;\n }\n\n const nodeId = node.id as string;\n const wasCollapsed = node.collapsed;\n\n const nodes = toggleNodeCollapse<T>({\n node: this.nodes() as OrgChartNode<T>,\n targetNode: nodeId,\n collapse,\n });\n\n this.nodes.set(nodes);\n\n this.panZoomInstance?.resume();\n\n if (highlightNode) {\n setTimeout(() => {\n const nodeElement = this.#elementRef?.nativeElement.querySelector(\n `#${\n wasCollapsed\n ? this.getNodeChildrenId(nodeId)\n : this.getNodeId(nodeId)\n }`\n ) as HTMLElement;\n\n this.panZoomToNode({\n nodeElement,\n skipZoom: true,\n playAnimation,\n });\n }, 200); // allow the DOM finish animation before highlighting\n }\n }\n\n protected zoom({\n type,\n by = 10,\n relative,\n }: {\n type: 'in' | 'out';\n by?: number;\n relative?: boolean;\n }): void {\n const containerEl = this.panZoomContainer()?.nativeElement;\n const containerRect = containerEl.getBoundingClientRect();\n const hostElement = this.#elementRef?.nativeElement;\n const hostElementRect = hostElement.getBoundingClientRect();\n const { scale } = this.panZoomInstance?.getTransform() ?? {\n scale: 1,\n };\n\n const centerX =\n containerRect.width / 2 + containerRect.x - hostElementRect.x;\n const centerY =\n containerRect.height / 2 + containerRect.y - hostElementRect.y;\n\n const newScale = relative\n ? type === 'in'\n ? scale * (1 + by / 100)\n : scale / (1 + by / 100)\n : by;\n\n this.panZoomInstance?.smoothZoomAbs(centerX, centerY, newScale);\n }\n\n protected panZoomToNode({\n nodeElement,\n skipZoom,\n playAnimation = true,\n }: {\n nodeElement: HTMLElement;\n skipZoom?: boolean;\n playAnimation?: boolean;\n }): void {\n const container = this.panZoomContainer()?.nativeElement;\n\n if (!container || !nodeElement || !this.panZoomInstance) {\n return;\n }\n\n const highlightedElements = container.querySelectorAll('.highlighted');\n highlightedElements.forEach(el => {\n el.classList.remove('highlighted');\n });\n\n this.panZoomInstance?.pause();\n this.panZoomInstance?.resume();\n\n setTimeout(() => {\n const hostElementRect =\n this.#elementRef.nativeElement.getBoundingClientRect();\n\n const nodeRect1 = nodeElement.getBoundingClientRect();\n const clientX = nodeRect1.x - nodeRect1.width / 2 - hostElementRect.x;\n const clientY = nodeRect1.y - nodeRect1.height / 2 - hostElementRect.y;\n\n if (!skipZoom) {\n const dynamicZoom = this.calculateOptimalZoom(nodeElement);\n this.panZoomInstance?.smoothZoomAbs(clientX, clientY, dynamicZoom);\n }\n }, 10);\n\n setTimeout(() => {\n const containerRect = container.getBoundingClientRect();\n const nodeRect = nodeElement.getBoundingClientRect();\n const hostingElement = this.#elementRef.nativeElement;\n const windowWidth = hostingElement.getBoundingClientRect().width;\n const windowHeight = hostingElement.getBoundingClientRect().height;\n\n const transformedNodeX = -1 * (nodeRect.x - containerRect.x);\n const transformedNodeY = -1 * (nodeRect.y - containerRect.y);\n\n const windowCenterX = windowWidth / 2;\n const windowCenterY = windowHeight / 2;\n const x = transformedNodeX + windowCenterX - nodeRect.width / 2;\n const y = transformedNodeY + windowCenterY - nodeRect.height / 2;\n\n this.panZoomInstance?.smoothMoveTo(x, y);\n\n if (playAnimation) {\n nodeElement.classList.add('highlighted');\n setTimeout(() => {\n nodeElement.classList.remove('highlighted');\n }, 2300);\n }\n }, 200); // allow some time for the zoom to take effect\n }\n\n protected getNodeId(nodeId: string | number): string {\n return `node-${nodeId}`;\n }\n\n protected getNodeChildrenId(nodeId: string | number): string {\n return `node-children-${nodeId}`;\n }\n\n private calculateScale(): void {\n const transform = this.panZoomInstance?.getTransform();\n const currentScale = transform?.scale ?? 0;\n\n const minZoom = this.minZoom();\n const maxZoom = this.maxZoom();\n\n if (minZoom === maxZoom) {\n this.scale.set(0);\n return;\n }\n\n const ratio = (currentScale - minZoom) / (maxZoom - minZoom);\n const scalePercentage = Math.round(ratio * 10000) / 100;\n\n this.scale.set(scalePercentage);\n }\n\n private getFitScale(padding: number = 20): number {\n const hostingElement = this.#elementRef?.nativeElement;\n const contentEl = this.orgChartContainer()?.nativeElement;\n\n if (!hostingElement || !contentEl) return 1;\n\n const containerRect = hostingElement.getBoundingClientRect();\n const containerWidth = containerRect.width;\n const containerHeight = containerRect.height;\n\n // Use actual unscaled dimensions of content\n const contentWidth = contentEl.clientWidth;\n const contentHeight = contentEl.clientHeight;\n\n // Optional padding around the content\n const availableWidth = containerWidth - padding * 2;\n const availableHeight = containerHeight - padding * 2;\n\n const scaleX = availableWidth / contentWidth;\n const scaleY = availableHeight / contentHeight;\n\n // Never upscale beyond 1\n const fitScale = Math.min(scaleX, scaleY, 1);\n\n return fitScale;\n }\n\n /**\n * Calculates the optimal zoom level for highlighting a specific node.\n * The zoom is calculated to ensure the node is appropriately sized relative to the container,\n * while respecting the minimum and maximum zoom constraints.\n * @param {HTMLElement} nodeElement - The node element to calculate zoom for.\n * @returns {number} The optimal zoom level for the node.\n */\n private calculateOptimalZoom(nodeElement: HTMLElement): number {\n const hostingElement = this.#elementRef?.nativeElement;\n\n if (!hostingElement || !nodeElement) {\n return 1.5; // fallback to original value\n }\n\n const containerRect = hostingElement.getBoundingClientRect();\n const nodeRect = nodeElement.getBoundingClientRect();\n\n // Calculate the current transform to get actual node dimensions\n const currentTransform = this.panZoomInstance?.getTransform();\n const currentScale = currentTransform?.scale || 1;\n\n // Get the actual unscaled node dimensions\n const actualNodeWidth = nodeRect.width / currentScale;\n const actualNodeHeight = nodeRect.height / currentScale;\n\n // Use configurable ratios for target node size\n const targetNodeWidthRatio = this.highlightZoomNodeWidthRatio();\n const targetNodeHeightRatio = this.highlightZoomNodeHeightRatio();\n\n // Calculate zoom levels needed for width and height constraints\n const zoomForWidth =\n (containerRect.width * targetNodeWidthRatio) / actualNodeWidth;\n const zoomForHeight =\n (containerRect.height * targetNodeHeightRatio) / actualNodeHeight;\n\n // Use the smaller zoom to ensure the node fits well in both dimensions\n let optimalZoom = Math.min(zoomForWidth, zoomForHeight);\n\n // Apply zoom constraints\n const minZoom = this.minZoom();\n const maxZoom = this.maxZoom();\n optimalZoom = Math.max(minZoom, Math.min(maxZoom, optimalZoom));\n\n // Ensure a configurable minimum reasonable zoom for visibility\n const minimumZoom = this.highlightZoomMinimum();\n optimalZoom = Math.max(minimumZoom, optimalZoom);\n\n return optimalZoom;\n }\n\n ngOnDestroy(): void {\n this.panZoomInstance?.dispose();\n }\n}\n","<section class=\"org-chart-container\">\n <section class=\"org-chart\" #panZoomContainer>\n @if (nodes()?.id) {\n <ul class=\"node-container\">\n <ng-container\n [ngTemplateOutlet]=\"nodeTemplate\"\n [ngTemplateOutletContext]=\"{ node: nodes() }\"\n ></ng-container>\n </ul>\n }\n </section>\n</section>\n\n<ng-template #nodeTemplate let-node=\"node\">\n <li class=\"org-node\" [class.collapsed]=\"node.collapsed\" #orgChartContainer>\n <a\n [ngClass]=\"[node?.nodeClass ?? '', nodeClass() ?? '', 'node-content']\"\n [ngStyle]=\"node.style\"\n [id]=\"getNodeId(node.id)\"\n [attr.aria-expanded]=\"node.children?.length ? !node.collapsed : null\"\n [attr.aria-label]=\"\n node.name + (node.children?.length ? (node.collapsed ? ' (collapsed)' : ' (expanded)') : '')\n \"\n [dir]=\"isRtl() ? 'rtl' : 'ltr'\"\n >\n @if (customNodeTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"customNodeTemplate\"\n [ngTemplateOutletContext]=\"{\n $implicit: node,\n node: node,\n }\"\n ></ng-container>\n } @else {\n <span>{{ node.name }}</span>\n }\n @if (collapsible() && node.children?.length) {\n <button\n class=\"collapse-btn\"\n (click)=\"onToggleCollapse({ node, highlightNode: focusOnCollapseOrExpand() })\"\n [class.collapsed]=\"node.collapsed\"\n (mouseenter)=\"panZoomInstance?.pause()\"\n (mousewheel)=\"panZoomInstance?.resume()\"\n (mouseleave)=\"panZoomInstance?.resume()\"\n (pointerenter)=\"panZoomInstance?.pause()\"\n (pointerleave)=\"panZoomInstance?.resume()\"\n [attr.aria-label]=\"(node.collapsed ? 'Expand' : 'Collapse') + ' ' + node.name\"\n type=\"button\"\n >\n @if (displayChildrenCount()) {\n <small class=\"children-count\">{{ node.descendantsCount }}</small>\n }\n <svg fill=\"none\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M11.9995 16.8001C11.2995 16.8001 10.5995 16.5301 10.0695 16.0001L3.54953 9.48014C3.25953 9.19014 3.25953 8.71014 3.54953 8.42014C3.83953 8.13014 4.31953 8.13014 4.60953 8.42014L11.1295 14.9401C11.6095 15.4201 12.3895 15.4201 12.8695 14.9401L19.3895 8.42014C19.6795 8.13014 20.1595 8.13014 20.4495 8.42014C20.7395 8.71014 20.7395 9.19014 20.4495 9.48014L13.9295 16.0001C13.3995 16.5301 12.6995 16.8001 11.9995 16.8001Z\"\n fill=\"currentColor\"\n />\n </svg>\n </button>\n }\n </a>\n\n @if (node.children?.length && !node.hidden && !node.collapsed) {\n <ul\n class=\"node-container\"\n [id]=\"getNodeChildrenId(node.id)\"\n [class.collapsed]=\"node.collapsed\"\n [class.instant-animation]=\"true\"\n [attr.aria-hidden]=\"node.collapsed\"\n @toggleNode\n >\n @for (child of node.children; track child.id) {\n @if (!child.hidden) {\n <ng-container\n [ngTemplateOutlet]=\"nodeTemplate\"\n [ngTemplateOutletContext]=\"{\n node: child,\n nodeTemplate: nodeTemplate,\n }\"\n ></ng-container>\n }\n }\n </ul>\n }\n </li>\n</ng-template>\n","/*\n * Public API Surface of org-chart\n */\n\nexport * from './lib/components';\nexport * from './lib/models';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAEM,SAAU,kBAAkB,CAAI,EACpC,IAAI,EACJ,UAAU,EACV,QAAQ,GACkB,EAAA;AAC1B,IAAA,IAAI,IAAI,CAAC,EAAE,KAAK,UAAU,EAAE;QAC1B,MAAM,WAAW,GAAG,QAAQ,IAAI,CAAC,IAAI,CAAC,SAAS;QAE/C,OAAO;AACL,YAAA,GAAG,IAAI;AACP,YAAA,SAAS,EAAE,WAAW;AACtB,YAAA,QAAQ,EAAE,IA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