UNPKG

@metadev/lux

Version:

Lux: Library with User Interface components for Angular.

124 lines (123 loc) 5.2 kB
import { ElementRef, EventEmitter, OnInit, TemplateRef } from '@angular/core'; import { AbstractControl, ValidationErrors } from '@angular/forms'; import { Observable } from 'rxjs'; import { DataSource } from '../datasource'; import { GeoPoint } from '../map/geopoint'; import { ModalService } from '../modal/modal.service'; import { GeolocationService } from './geolocation.service'; import * as i0 from "@angular/core"; export declare class GeolocationComponent implements OnInit { private modalService; locationService: GeolocationService; static idCounter: number; latitude: ElementRef; longitude: ElementRef; map?: ElementRef; touched: boolean; dirty: boolean; lastErrors: ValidationErrors | null; private _disabled; private _required; private _value; latitudeValue?: number; longitudeValue?: number; isValidNumber: (value: string | number | undefined | null) => boolean; i18n: { en: { lat: string; lon: string; selectLocation: string; location: string; selectAction: string; cancelAction: string; closeAction: string; typeToSearch: string; cardinalPoints: { north: string; south: string; east: string; west: string; }; userErrors: { required: string; minLatitude: string; maxLatitude: string; minLongitude: string; maxLongitude: string; }; }; es: { lat: string; lon: string; selectLocation: string; location: string; selectAction: string; cancelAction: string; closeAction: string; typeToSearch: string; cardinalPoints: { north: string; south: string; east: string; west: string; }; userErrors: { required: string; minLatitude: string; maxLatitude: string; minLongitude: string; maxLongitude: string; }; }; }; minLatitude: number; maxLatitude: number; minLongitude: number; maxLongitude: number; step: number; zoom: number; get className(): string; lang: string; inlineErrors: boolean; inputId: string; ariaLabel: string; readonly: boolean | null; set disabled(v: string | boolean); get disabled(): string | boolean; set required(v: boolean); get required(): boolean; set value(v: GeoPoint); get value(): GeoPoint; valueChange: EventEmitter<GeoPoint>; keyPress: EventEmitter<KeyboardEvent>; onChange: (value: any) => void; onTouched: () => void; constructor(modalService: ModalService, locationService: GeolocationService); writeValue(value: any): void; registerOnChange(onChange: any): void; registerOnTouched(onTouched: any): void; markAsTouched(): void; setDisabledState(disabled: boolean): void; private setLatitudeInControl; private setLongitudeInControl; clear(): void; isClearable(): boolean; registerOnValidatorChange(): void; validate(control: AbstractControl): ValidationErrors | null; ngOnInit(): void; roundToStepAndUpdateLatitudeAndLongitude(newLatitudeAndLongitude: number[]): void; onLostFocus(): void; onEventLatitude(newLatitude: string): void; onEventLongitude(newLongitude: string): void; onKeyPress(event: KeyboardEvent): void; checkClassName(): string; openModalMap(modal: TemplateRef<any>): void; onSearchLocationChanged(newValue: GeoPoint, map: any): void; get mapTitle(): string; get self(): GeolocationComponent; getLabels(instance: GeolocationComponent, keys: GeoPoint[]): Observable<DataSource<GeoPoint, string>>; getData(instance: GeolocationComponent, search: string): Observable<DataSource<GeoPoint, string>>; setPatterns(): void; static ɵfac: i0.ɵɵFactoryDeclaration<GeolocationComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<GeolocationComponent, "lux-geolocation", never, { "minLatitude": { "alias": "minLatitude"; "required": false; }; "maxLatitude": { "alias": "maxLatitude"; "required": false; }; "minLongitude": { "alias": "minLongitude"; "required": false; }; "maxLongitude": { "alias": "maxLongitude"; "required": false; }; "step": { "alias": "step"; "required": false; }; "zoom": { "alias": "zoom"; "required": false; }; "lang": { "alias": "lang"; "required": false; }; "inlineErrors": { "alias": "inlineErrors"; "required": false; }; "inputId": { "alias": "inputId"; "required": false; }; "ariaLabel": { "alias": "aria-label"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "valueChange": "valueChange"; "keyPress": "keyPress"; }, never, never, false, never>; }