kwikid-camera
Version:
KwikID's Camera Component
61 lines (60 loc) • 2.57 kB
TypeScript
import { EventEmitter, OnChanges, OnInit, SimpleChanges } from "@angular/core";
import { ControlValueAccessor, FormControl, FormGroup } from "@angular/forms";
import { Subscription } from "rxjs";
import { TKwikUIInputCameraSize, TKwikUIInputCameraType } from "./input-camera.definitions";
import * as i0 from "@angular/core";
export declare class KwikUIInputCameraComponent implements OnInit, OnChanges, ControlValueAccessor {
buttonText: string;
disabled: boolean;
focus: boolean;
formControl: FormControl;
formControlName: string;
icon: string;
id: string;
invalid: boolean;
mediaFiles: any[];
properties: {
readOnly: boolean;
};
showMediaFiles: boolean;
size: TKwikUIInputCameraSize;
type: TKwikUIInputCameraType;
validators: {
required: boolean;
};
onClick: EventEmitter<any>;
getRemovedFile: EventEmitter<any>;
openDropdown: boolean;
formGroup: FormGroup;
subscriptions: Subscription;
ngOnInit(): void;
ngOnChanges(changes: SimpleChanges): void;
ngOnDestroy(): void;
private validateInputProperty;
/**
* @description Handles setting up of error and focus on the input field is it is invalid
*/
setDisabled(): void;
/**
* @description Handles setting up of error and focus on the input field is it is invalid
*/
setError(): void;
loadMediaFiles(files: any[]): void;
filterDuplicatesAndEmpty(files: any[]): any[];
/**
* @description Handles firing of 2 events on (keyup) event
*
* @param value
*/
handleOnClick(e: any): void;
handleOnClickRemoveFile(mediaFile: any): void;
handleFocusedChange(e: any): void;
emitEvent(event: any, data: any): void;
/** Method Implementations for Abstract Control */
writeValue(value: any): void;
registerOnChange(fn: any): void;
registerOnTouched(fn: any): void;
setDisabledState?(isDisabled: boolean): void;
static ɵfac: i0.ɵɵFactoryDeclaration<KwikUIInputCameraComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<KwikUIInputCameraComponent, "kwikui-input-camera", never, { "buttonText": "buttonText"; "disabled": "disabled"; "focus": "focus"; "formControl": "formControl"; "formControlName": "formControlName"; "icon": "icon"; "id": "id"; "invalid": "invalid"; "mediaFiles": "mediaFiles"; "properties": "properties"; "showMediaFiles": "showMediaFiles"; "size": "size"; "type": "type"; "validators": "validators"; }, { "onClick": "onClick"; "getRemovedFile": "getRemovedFile"; }, never, never>;
}