import { OnInit, EventEmitter, OnChanges } from '@angular/core'; import { CdkDragDrop } from '@angular/cdk/drag-drop'; import { MapMarker } from '../../models/map-marker.model'; import { MatSidenav } from '@angular/material/sidenav'; import { MatDialog } from '@angular/material/dialog'; import { UserMap } from '../../models/user-map.model'; import { MarkerInfo } from '../../models/marker-info.model'; export declare class LegendComponent implements OnInit, OnChanges { Dialog: MatDialog; /** * The maximum amount of time in milliseconds the average person expects between clicks of a double-click */ protected expectedDoubleClickElapsedTime: number; /** * double click to show more info modal */ protected isDoubleClick: boolean; /** * and array with all teh hiddenLocation ids to check against */ protected hiddenLocationIds: Array; /** * width of the sidenav */ matContentWidth: string; /** * height of the sidenav */ matContentHeight: string; /** * track tools view */ Tools: string; /** * editMode for checking unchecking items */ EditMode: boolean; /** * legend height */ LegendContentHeight: string; /** * The Title of the map which is displayed at the top of the Legend */ MapTitle: string; /** * The List of locations that will be displayed in the legend */ LocationsList: Array; /** * is the legend open */ LegendOpen: boolean; /** * List of locations that are hidden */ HiddenLocations: Array; /** * to determine if the hidden list is visible */ HiddenListVisible: boolean; /** * tracker so if a location is selected and the user scrolls the list, the scroll function doesnt scroll * * away from the location that the user scrolled to */ protected scrolled: boolean; /** * to determine if the selectedLocation has changed */ protected PreviousSelectedLocation: MapMarker; /** * The MarkerInfo where the icon url can be refrenced */ protected iconList: Array; /** * Used for getting the title of the map to display at top */ protected _currentMapModel: UserMap; /** * all locations within view */ protected VisibleLocations: Array; /** * if no map is selected the layer title will display at top */ protected _currentlyActiveLayers: Array; /** * the location to highlight in the legend */ SelectedLocation: MapMarker; ExcludedLocations: Array; DisplayBasicInfo: EventEmitter; DisplayMoreInfo: EventEmitter; EditLegendLocations: EventEmitter>; DeleteLegendLocations: EventEmitter>; IsLegendOpen: EventEmitter; UpdateVisibleLocations: EventEmitter>; TopListClicked: EventEmitter; UpdateExcludedCurations: EventEmitter; drawer: MatSidenav; constructor(Dialog: MatDialog); ngOnInit(): void; ngOnChanges(): void; /** * Toggles the HiddenLocation list in the legend */ ToggleHiddenListVisibility(): void; /** * Checks to see if any locations should be hidden coming from the back-end */ CheckIfHidden(): void; /** * Marks the MapMarker as being checked * * @param event Marker to check */ CheckMarker(event: MapMarker): void; /** * Hides the checked locations in the _currentlyActiveLocations and pushes them to the HiddenLocation Array */ HideLocations(): void; protected BuildExcludedLocationList(locs: Array): string; /** * Makes the the markers from the HiddenLocations that are checked visible again. */ MakeVisible(): void; /** * Pulls up the Delete-location modal for users to confirm deletion * * delets both hidden and visible locations */ DeleteLocationConfirmation(): void; /** * informs the map service that the TopLists button was clicked * * TODO change if making lcu */ TopListsClicked(): void; /** * toggles tools view based on current view */ ToggleTools(): void; /** * Toggles Tools view to advanced */ ShowMoreTools(): void; /** * When an item from the legend is double-clicked it will display the mor info-window * @param item marker to display */ ShowMoreInfo(item: MapMarker): void; /** * normalizes lat and long and emits marker to map for it to display */ MarkerClicked(marker: MapMarker): void; /** * @param event * * This is needed for the drag and drop to reflect the changes * * UpdateVisibleLocations assigns the newly ordered LocationsList to the VisibleLocations in mapService */ drop(event: CdkDragDrop): void; /** * @param map the map config that is passed in * * this function loops through the map cofig and fills the LocationsList * * (this is what is displayed on the drop down) */ SetLocationList(): void; /** * To track whether or not the legend is closed */ CloseLegend(): void; /** * To track whether or not the legend is open */ OpenLegend(): void; /** * Toggles the side nav where the legend lives */ toggleDrawer(): void; /** * @param locList an array of the mapMarkers * * assigns icon Url based on icon name vs the icon lookup */ protected assignIconUrl(locList: Array): MapMarker[]; /** * Gives order to the MapMarkers based on how the user orders the legend */ protected giveOrder(): void; /** * compares and sorts the objects based on orderIndex * * if the indexes are the same then it compares based on title so it is alphabetical */ protected compareObject(marker1: MapMarker, marker2: MapMarker): 1 | 0 | -1; /** * without this the MapMarker objects that have an undefined indexOrder are put at the top * * this method sets the undefined indexOrder aside and appends them to the end of the array/legend */ protected moveUndefinedToBottom(list: Array): MapMarker[]; /** * Removes the Hidden locations from the _currentlyActiveLocations so they do not display in the legend */ protected removeHiddenLocations(): void; /** * Called when a user selects a location from the map while the legend is open * * @param element #Selected */ protected scroll(element: any): void; /** * Checks to see if the @child element is outside the @parent element */ protected isOutOfParentElement(child: HTMLElement, parent: HTMLElement): boolean; }