import { ChangeDetectorRef, ElementRef, OnDestroy, OnInit, QueryList, EventEmitter } from '@angular/core'; import { BehaviorSubject, Observable, Subject } from 'rxjs'; import Konva from 'konva'; import { ModelBuilding, ModelComplex, ModelFilterComplex, ModelFloor, ModelSection } from 'spm-core/models'; declare enum EnumKonvaItemType { SECTION = 0, BUILDING_SINGLE_SECTION = 1, BUILDING_MULTI_SECTION = 2 } export declare class SectionsSelectCanvasComponent implements OnInit, OnDestroy { private _cd; /** * enent about comp destroy */ private _compDestroyed$; /** * input model ModelFilterComplex. Work if key "useFilters" enabled */ private _filterComplex; private _filterComplexChanged$; /** * store for konva lines */ private _konvaLinesStore$; /** * input instance ModelComplex for rendering konva */ model: ModelComplex; imageUrlPrefix: string; set filterComplex(filterCom: ModelFilterComplex); useFilters: boolean; /** * conditions */ blockEvent: boolean; colorSectionStrokeDefault: string; colorSectionFill: string; colorSectionFillDefault: string; colorSectionStroke: string; sectiontrokeWidth: number; showAvailable: boolean; /** * this label will be added to default building tooltip */ labelForBuildingWord: string; labelSectionWord: string; /** * Select Section */ selectSection$: Subject; set selectSection(id: number); stage: any; layer: any; beforeWidthContainer: number; itemTypes: typeof EnumKonvaItemType; imageSize$: BehaviorSubject<[number, number]>; konvaLines: any[]; konvaSections: any[]; selectedId: string; eventSelectBuilding: EventEmitter; eventSelectSection: EventEmitter; eventSelectFloor: EventEmitter; eventReady: EventEmitter; img: ElementRef; container: QueryList; circleTooltip: boolean; houseTitle: string; sectionTitle: string; saleStartTitle: string; saleStartLiveTitle: string; quarterTranslate: string; soldOutTitle: string; openTooltip: EventEmitter; constructor(_cd: ChangeDetectorRef); ngOnInit(): void; ngOnDestroy(): void; buildImageSrc(): string; /**************************************************************************************************** **************************** api for working with buildings and sections *************************** ****************************************************************************************************/ /**************************************************************************************************** * draw konva lines from incoming coordinates of buildings and sections ****************************************************************************************************/ drawInputCoords(imgWidth: number, buildings: ModelBuilding[]): void; /** * highlight konva Line border and fill, change pointer * @param target Line */ private _selectItem; /** * unhighlight konva Line border and fill, change pointer * @param target Line */ private _unSelectItem; /** * unhighlight from all konva Lines * @param target Line */ private _unselectAll; private _selectSection; /**************************************************************************************************** * events section *****************************************************************************************************/ loadedImg(): void; click({ currentTarget, evt, pointerId, target, type }: { currentTarget: any; evt: any; pointerId: any; target: any; type: any; }, emitEvent?: boolean): void; mouseOver({ currentTarget, evt, pointerId, target, type }: { currentTarget: any; evt: any; pointerId: any; target: any; type: any; }): void; mouseOut({ currentTarget, evt, pointerId, target, type }: { currentTarget: any; evt: any; pointerId: any; target: any; type: any; }): void; onResize(): void; getToolTipLeftTop(target: Konva.Line, type: 'buildingPoint' | 'sectionPoint'): Observable<{ left: string; top: string; }>; getMainContainerSize(): [number, number]; private _recalcCoord; /***************************************************************************************************** * utils *****************************************************************************************************/ private _initKonva; private _initKonvaLinesArray; private _getFillRGBA; private _getStrokeRGBA; private _parseCoord; private _findBuilding; private _findSection; /** * filters the building and the section which have the same unit type as selected filter * @param models array of ModelBuilding * @param unitType selected filter of EnumUnityTypes */ private _filterByUnitTypes; openFloorTooltip(flag: any): void; updateDate(date: any): string; getQuarterNumber(month: number): string; isHideStroke(target: Konva.Line): boolean; } export {};