input-color-picker
Version:
Color picker library produced in Angular language.
68 lines (63 loc) • 2.85 kB
TypeScript
import * as i0 from '@angular/core';
import { OnChanges, AfterViewInit, ElementRef } from '@angular/core';
import * as i1 from '@angular/forms';
import { ControlValueAccessor } from '@angular/forms';
import * as i2 from '@angular/common';
declare class Color {
x: number;
y: number;
palette: Palette;
constructor(x: number, y: number, palette: Palette);
}
declare class Palette {
code: string;
name: string;
constructor(code: string, name: string);
}
declare class InputColorPickerDirective implements ControlValueAccessor {
raw: string | undefined;
onChange: any;
onTouched: any;
col: number;
palette?: Array<Palette>;
boxHeight: number;
colorWidth: number;
colorHeight: number;
placeholder: string;
constructor();
get value(): string | undefined;
set value(raw: string | undefined);
writeValue(raw: string): void;
registerOnChange(func: any): void;
registerOnTouched(func: any): void;
static ɵfac: i0.ɵɵFactoryDeclaration<InputColorPickerDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<InputColorPickerDirective, "[col], [palette], [boxHeight], [colorWidth], [colorHeight], [placeholder]", never, { "col": { "alias": "col"; "required": false; }; "palette": { "alias": "palette"; "required": false; }; "boxHeight": { "alias": "boxHeight"; "required": false; }; "colorWidth": { "alias": "colorWidth"; "required": false; }; "colorHeight": { "alias": "colorHeight"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; }, {}, never, never, true, never>;
}
declare class InputColorPickerComponent extends InputColorPickerDirective implements OnChanges, AfterViewInit {
private platformId;
private element;
box: any;
hover?: Color;
picker: Array<Color>;
svg: ElementRef;
constructor(platformId: Object, element: ElementRef);
ngOnChanges(): void;
ngAfterViewInit(): void;
setPicker(): void;
onOpen(): void;
onClose(): void;
onClick(i: number): void;
onInput(): void;
onEnter(event?: any, index?: number): void;
onLeave(): void;
get getGray(): boolean;
get getText(): string;
static ɵfac: i0.ɵɵFactoryDeclaration<InputColorPickerComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<InputColorPickerComponent, "input-color-picker", never, {}, {}, never, never, true, never>;
}
declare class InputColorPickerModule {
static ɵfac: i0.ɵɵFactoryDeclaration<InputColorPickerModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<InputColorPickerModule, never, [typeof i1.FormsModule, typeof i2.CommonModule, typeof InputColorPickerComponent], [typeof InputColorPickerComponent]>;
static ɵinj: i0.ɵɵInjectorDeclaration<InputColorPickerModule>;
}
export { InputColorPickerComponent, InputColorPickerModule };