import { AfterViewInit, ElementRef, OnInit, Renderer2, Signal } from '@angular/core'; import { EnumTranslateKey } from 'alpha-global-constants'; import { Router } from '@angular/router'; import { BehaviorSubject } from 'rxjs'; import { EnumImageResolverType } from '../../directives/image-error-resolver.directive'; import { BaseComponent } from '../base-component/base/base.component'; import { MultiLanguageService } from '../../services/multi-language.service'; import { OrganizationService } from '../../services/organization.service'; import { LayoutService } from '../../services/layout.service'; import { RecursiveService } from '../services/recursive.service'; import { AppService } from '../../services/app.service'; import { RandomAvatarService } from '../../services/random-avatar.service'; import { AlertService } from '../alert/alert.service'; import { FileService } from '../services/file.service'; import { ICoreButtonVNS } from '../core-button-group-vns/core-button-group-vns/ICoreButtonVNS'; import { AppConfigService } from '../../services/app-config.service'; import * as i0 from "@angular/core"; export interface CardColorTheme { header: string; background: string; avatarBg: string; avatarSmallBg: string; } export declare const CARD_COLORS: Record; export interface IHuPositionMinimum { id?: number | null; code?: string | null; name?: string | null; master?: number | null; masterFullname?: string | null; masterEmployeeCode?: string | null; masterAvatar?: string | null; masterIsFemale?: boolean | null; interim?: number | null; interimFullname?: string | null; interimEmployeeCode?: string | null; interimAvatar?: string | null; interimIsFemale?: boolean | null; orgId?: number | null; isTdv?: boolean | null; concurrent?: number | null; concurrentFullname?: string | null; concurrentEmployeeCode?: string | null; concurrentAvatar?: string | null; concurrentIsFemale?: boolean | null; jobName?: string | null; positionName?: string | null; } export interface IHuOrganizationMinimum { id: number; name: string; parentId?: number | null; orderNum?: number | null; isActive?: boolean | null; protected?: boolean | null; } export interface IHuOrganizationMinimumWithPosition extends IHuOrganizationMinimum { tdvs?: IHuPositionMinimum[] | null; masterPositions?: IHuPositionMinimum[] | null; concurrentPositions?: IHuPositionMinimum[] | null; interimPositions?: IHuPositionMinimum[] | null; positionCount?: number | null; } export interface IOrgTreeNode { id: number; name: string; parentId?: number | null; orderNum?: number | null; isActive?: boolean | null; protected?: boolean | null; tdvs?: IHuPositionMinimum[] | null; masterPositions?: IHuPositionMinimum[] | null; concurrentPositions?: IHuPositionMinimum[] | null; interimPositions?: IHuPositionMinimum[] | null; positionCount?: number | null; tree$Key: number | string; tree$Title: string; tree$Parent: number | string | null; tree$Children: IOrgTreeNode[]; tree$Tier: number; tree$Path: string; tree$HasChildren: boolean; tree$HasActiveChildren: boolean; tree$HasGrandchildren: boolean; tree$Active: boolean; tree$Checked: boolean; tree$Expanded: boolean; tree$Highlighted: boolean; tree$Selected: boolean; occupiedRecursive?: number; quotaRecursive?: number; } export type IOrgFlatNode = IHuOrganizationMinimumWithPosition; export declare class CoreOrgchartflexWrapperComponent extends BaseComponent implements OnInit, AfterViewInit { mls: MultiLanguageService; private organizationService; private layoutService; private appService; private recursiveService; private ras; private renderer; private router; private alertService; private fileService; $customQueryOrgWithPositionsApi: import("@angular/core").InputSignal; $forComParty: import("@angular/core").InputSignal; $loading: import("@angular/core").WritableSignal; CARD_COLORS: Record; dropdown: ElementRef; printArea: ElementRef; printFlag$: BehaviorSubject; title: EnumTranslateKey; $linearItems: import("@angular/core").WritableSignal; nestedItems: IOrgTreeNode[]; defaultAvatar: string; width: number; height: number; showSettings: boolean; showTdvs: boolean; showMasters: boolean; showInterims: boolean; showDissolved: boolean; compactMode: boolean; acs: AppConfigService; $defaultView: import("@angular/core").WritableSignal; $hideEmptyNodes: import("@angular/core").WritableSignal; listenerFn: () => void; avatarResolverType: EnumImageResolverType; $lang: Signal; constructor(mls: MultiLanguageService, organizationService: OrganizationService, layoutService: LayoutService, appService: AppService, recursiveService: RecursiveService, ras: RandomAvatarService, renderer: Renderer2, router: Router, alertService: AlertService, fileService: FileService); ngOnInit(): void; compactModeDetect(): void; onCorePageHedearButtonClick(e: ICoreButtonVNS): void; toggleShowSettings(): void; onPrintAreaRendered(e: ElementRef): void; ngAfterViewInit(): void; onPersonClick(employeeId: number): void; ngOnDestroy(): void; private computeTotalEmployeesAcrossAllRoots; private computeRecursiveCounts; /** * A node is "locally empty" if it does not have ANY real person (employeeId) * assigned to any of its positions. * * Position slots (e.g. TDV, MasterPositions) DO NOT count. * Only real employeeId values (master/interim/concurrent) indicate occupation. */ private isNodeContentEmpty; private isEmptyRecursive; /** * Remove nodes that are "empty" and whose ENTIRE subtree is empty. * * A node is kept if: * - it has any occupant (local), OR * - any descendant is non-empty */ private removeEmptyNodesFromTree; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }