moh-common-lib
Version:
A library of Angular components, services, and styles for B.C. Government Ministry of Health (MoH).
41 lines (40 loc) • 1.65 kB
TypeScript
import { EventEmitter, OnInit } from '@angular/core';
import { NgControl } from '@angular/forms';
import { Observable } from 'rxjs';
import { GeoAddressResult, GeocoderService } from '../../services/geocoder.service';
import { TypeaheadMatch } from 'ngx-bootstrap/typeahead';
import { AbstractFormControl } from '../../models/abstract-form-control';
import { ErrorMessage } from '../../models/error-message.interface';
export declare class StreetComponent extends AbstractFormControl implements OnInit {
controlDir: NgControl;
private geocoderService;
label: string;
maxlength: string;
labelforId: string;
useGeoCoder: boolean;
placeholder: string;
required: boolean;
value: string;
valueChange: EventEmitter<string>;
blur: EventEmitter<any>;
select: EventEmitter<GeoAddressResult>;
street: string;
/**
* The list of results, from API, that is passed to the typeahead list
* Result from GeoCoderService address lookup
*/
typeaheadList$: Observable<GeoAddressResult[]>;
/** Search string to store result from GeoCoder request */
private search;
/** The subject that triggers on user text input and gets typeaheadList$ to update. */
private searchText$;
_defaultErrMsg: ErrorMessage;
constructor(controlDir: NgControl, geocoderService: GeocoderService);
ngOnInit(): void;
onValueChange(value: any): void;
onBlur(event: any): void;
writeValue(value: any): void;
onKeyUp(event: KeyboardEvent): void;
onError(): Observable<GeoAddressResult[]>;
onSelect(event: TypeaheadMatch): void;
}