UNPKG

moh-common-lib

Version:

A library of Angular components, services, and styles for B.C. Government Ministry of Health (MoH).

43 lines (42 loc) 1.51 kB
import { EventEmitter, OnInit } from '@angular/core'; import { Base } from '../../models/base'; import { ControlValueAccessor, NgControl } from '@angular/forms'; import { ErrorMessage } from '../../models/error-message.interface'; /** Interface for countries */ export interface CountryList { countryCode: string; description: string; } export declare const CANADA = "CAN"; export declare const UNITED_STATES = "USA"; /** Default list of countries */ export declare const COUNTRY_LIST: CountryList[]; export declare function getCountryDescription(countryCode: string): string; export declare class CountryComponent extends Base implements OnInit, ControlValueAccessor { controlDir: NgControl; label: string; countryList: CountryList[]; labelforId: string; disabled: boolean; required: boolean; useDropDownList: boolean; maxlen: string; errorMessage: ErrorMessage; placeholder: string; value: string; valueChange: EventEmitter<string>; blurEvent: EventEmitter<any>; country: string; defaultErrMsg: ErrorMessage; _onChange: (_: any) => void; _onTouched: (_: any) => void; constructor(controlDir: NgControl); ngOnInit(): void; onValueChange(value: any): void; onBlurEvent(event: any): void; writeValue(value: any): void; registerOnChange(fn: any): void; registerOnTouched(fn: any): void; setDisabledState(isDisabled: boolean): void; private setErrorMsg; }