UNPKG

ng-business-hours

Version:

Angular component allows you to show and manage business hours

43 lines (42 loc) 1.69 kB
import { OnDestroy, OnInit } from '@angular/core'; import { AbstractControl, ControlValueAccessor, FormBuilder, FormGroup, ValidationErrors, Validator } from '@angular/forms'; import { Subscription } from 'rxjs'; import { LocalizedDatePipe } from './localized-date.pipe'; import { NgBusinessHoursDaySettings } from './ng-business-hours-day-settings.model'; export declare class NgBusinessHoursComponent implements OnInit, OnDestroy, ControlValueAccessor, Validator { private localizedDatePipe; private fb; timeFromLabel: string | undefined; timeToLabel: string | undefined; validationErrorMessage: string | undefined; timeFrom: string; timeTo: string; isoWeek: boolean; val: string; disabled: boolean; form: FormGroup; formValueChangesSubscription: Subscription; startTime: string; maxTime: string; interval: number; timeFormat: string; timeOptions: string[]; weekdays: number[]; defaultBusinessHours: NgBusinessHoursDaySettings[]; businessHours: NgBusinessHoursDaySettings[]; onChange: (obj: NgBusinessHoursDaySettings[]) => void; onValuesChange: (value: NgBusinessHoursDaySettings[]) => void; onTouched: () => void; constructor(localizedDatePipe: LocalizedDatePipe, fb: FormBuilder); ngOnInit(): void; registerOnChange(fn: any): void; registerOnTouched(fn: any): void; setDisabledState(isDisabled: boolean): void; writeValue(obj: []): void; validate(control: AbstractControl): ValidationErrors | null; onChangeOperationState(i: number): void; getDateForWeekDay(num: number): Date; private initForm; private getTimeOptions; ngOnDestroy(): void; }