import { OnInit, Injector } from '@angular/core'; import { FormControl, FormGroup, AbstractControl, ValidationErrors } from '@angular/forms'; import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; import { DatasourceTypesModel } from '../../models/datasource-types.model'; import { DepartureTimeModel } from '../../models/departure-time.model'; import { FathymForecastConfig } from '../../models/weather.config'; import { RouteModel } from '../../models/route.model'; import { RouteDataModel } from '../../models/route-data.model'; import { NotificationService } from '../../services/notification.service'; import { ToastrDisplayService } from '../../services/toastr-display.service'; import { LocationSearchService } from '../../services/location-search.service'; import { SearchModel } from '../../models/search.model'; import { RouteResultsModel } from '../../models/route-results.model'; import { DataService } from '../../services/data.service'; import { DisplayDateFormatPipe } from '../../utils/pipes/ff-pipes'; export declare class SearchFormComponent implements OnInit { protected injector: Injector; protected http: HttpClient; protected ffSvc: DataService; protected notificationService: NotificationService; protected toastrDisplayService: ToastrDisplayService; protected locationService: LocationSearchService; protected displayDatePipe: DisplayDateFormatPipe; /** * Access Origin field within the form group */ get Origin(): AbstractControl; /** * Access Destination field within the form group */ get Destination(): AbstractControl; /** * Access ConditionVariableNames field */ get ConditionVariableNames(): AbstractControl; /** * Access ForecastModelType field */ get ForecastModelType(): AbstractControl; /** * Access DepartureTimes field */ get DepartureTimes(): AbstractControl; /** * Label for departure table button */ ButtonLabelDepartTable: string; /** * Label for geofence button */ ButtonLabelGeofence: string; /** * Lable for routes button */ ButtonLabelRoutes: string; /** * Primary Material raised button type */ ButtonTypePrimary: string; /** * Warn Material raised button type */ ButtonTypeWarn: string; /** * Config for conditions select options */ ConditionsConfig: any; DepartureTimeConfig: any; ForecastModelConfig: any; /** * Selected value from data source select */ protected dataSourceSelected: DatasourceTypesModel; /** * Values for data source select */ ForecastModelList: any; /** * Can / cannot use the geofence tool */ protected canUseGeofence: boolean; DepartureTimesList: Array; DestinationControl: FormControl; DestinationCurrent: any; DestinationOptions: string[]; IsDrawingGeofence: boolean; IncludeAlternatives: boolean; OriginControl: FormControl; OriginCurrent: any; OriginOptions: string[]; FathymForecastConfig: FathymForecastConfig; RouteInputForm: FormGroup; SearchFormControls: FormGroup; SearchTypeControls: FormGroup; SearchConditions: FormGroup; SelectAllObj: object; OriginRoute: Observable; DestinationRoute: Observable; RouteData: Array; searching: boolean; searchFailed: boolean; /** * Search title value */ SearchTitle: string; GeofenceChecked: boolean; DepartureChecked: boolean; RouteChecked: boolean; protected invalidOriginPosition: boolean; protected invalidDesinationPosition: boolean; /** * When searching route(s) */ protected isSearchingRoute: boolean; /** * When searching departure table */ protected isSearchingDepartTable: boolean; /** * End my changes */ constructor(injector: Injector, http: HttpClient, ffSvc: DataService, notificationService: NotificationService, toastrDisplayService: ToastrDisplayService, locationService: LocationSearchService, displayDatePipe: DisplayDateFormatPipe); /** * Utility for finding invalid controls */ protected onChanges(): void; findInvalidControls(): Array; ngOnInit(): void; ngOnDestroy(): void; /** * Get Datasource types */ LoadDataSourceTypes(): void; /** * * @param dataSourceSelected object from data source types */ SelectedDataSourceType(select: DatasourceTypesModel): void; /** * Get search form data * * @param searchType type of search to perform */ protected getFormValues(searchType: string): SearchModel; /** * Display the selected route * * @param location address and position of selected route */ DisplayResults(location: RouteResultsModel): string; protected updateSearchTitle(): void; /** * Set disabled state of formControls * * @param state value to test */ protected disabledState(state: boolean): string; /** * Running a search using search buttons */ Search(): void; /** * Clear search form */ ClearSearchForm(): void; /** * Searching departure table * * @param searchType search type */ protected searchDepartureTable(searchType: string): void; /** * Clearing departure table */ protected clearDepartureTable(): void; /** * Searching routes * * @param searchType search type */ SearchRoutes(searchType: string): void; /** * Clear routes */ protected clearRoutes(): void; protected clearGeofence(): void; /** * Event handler to start/stop geofence drawing on the map */ protected startGeofenceDrawing(): void; /** * Toggle search and clear buttons */ DisableSearchButton(): boolean; DisableClearButton(): boolean; /** * Get departure times */ protected createDepartureTimes(): void; /** * Set default departure time */ protected defaultDepartureTimes(): void; /** VALIDATIONS */ /** * Validate whether or not we can run a geofence search */ protected enableGeofenceSearch(): void; /** * Validate lat / long properties exist * * @param control form control to validate */ protected validateOriginLatLong(control: AbstractControl): ValidationErrors; /** * Validate lat / long properties exist * * @param control form control to validate */ protected validateDestinationLatLong(control: AbstractControl): ValidationErrors | null; /** RESET HELPERS */ /** * Reset search form back to defautls */ ResetSearchForm(): void; /** * Set default select options */ protected defaultSelects(): void; }