@doku-dev/doku-fragment
Version:
A new Angular UI library that moving away from Bootstrap and built from scratch.
55 lines (54 loc) • 2.52 kB
TypeScript
import { NgClass } from '@angular/common';
import { ChangeDetectorRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
import { ControlValueAccessor, NgControl } from '@angular/forms';
import { DokuFormField, DokuFormFieldAccessor, DokuFormFieldAccessorValidateValue, DokuFormFieldOptions } from '../form-field';
import * as i0 from "@angular/core";
export declare class DokuColorPicker implements DokuFormFieldAccessor, ControlValueAccessor, OnInit, OnDestroy, OnChanges {
private cdr;
private ngControl;
protected formField?: DokuFormField | undefined;
/**
* Whether to disable the color picker.
* @default false
*/
disabled: boolean;
/**
* Whether color picker is readonly.
* @default false
*/
readonly: boolean;
/**
* Value of the color picker in hexadecimal format.
* @default ''
*/
get value(): string;
set value(hexColor: string | null | undefined);
private _value;
/**
* An event emitted when value changes.
*/
valueChange: EventEmitter<string>;
protected readonly classes: NgClass['ngClass'];
private value$;
private destroy$;
constructor(cdr: ChangeDetectorRef, ngControl: NgControl, formField?: DokuFormField | undefined);
fieldOptions?: DokuFormFieldOptions | undefined;
onDisable?: ((value: boolean) => void) | undefined;
onReadonly?: ((value: boolean) => void) | undefined;
onValidate?: ((value?: DokuFormFieldAccessorValidateValue | undefined) => void) | undefined;
registerOnDisable(fn: (value: boolean) => void): void;
registerOnReadonly(fn: (value: boolean) => void): void;
registerOnValidate?(fn: (value?: DokuFormFieldAccessorValidateValue | undefined) => void): void;
onChange?: (value: any) => void;
onTouched?: () => void;
writeValue(value?: string): void;
registerOnChange(fn: any): void;
registerOnTouched(fn: any): void;
setDisabledState?(isDisabled: boolean): void;
ngOnInit(): void;
ngOnChanges(changes: SimpleChanges): void;
ngOnDestroy(): void;
protected onColorChange(event: Event): void;
static ɵfac: i0.ɵɵFactoryDeclaration<DokuColorPicker, [null, { optional: true; self: true; }, { optional: true; host: true; }]>;
static ɵcmp: i0.ɵɵComponentDeclaration<DokuColorPicker, "doku-color-picker", ["dokuColorPicker"], { "disabled": "disabled"; "readonly": "readonly"; "value": "value"; }, { "valueChange": "valueChange"; }, never, never, true>;
}