ngx-color-picker
Version:
Color picker widget for Angular
108 lines (107 loc) • 6.83 kB
TypeScript
import { OnChanges, OnDestroy, EventEmitter, ApplicationRef, ElementRef, ViewContainerRef, Injector, TemplateRef } from '@angular/core';
import { AlphaChannel, ColorMode, OutputFormat } from './helpers';
import './ng-dev-mode';
import * as i0 from "@angular/core";
export declare class ColorPickerDirective implements OnChanges, OnDestroy {
private readonly injector;
private readonly appRef;
private readonly vcRef;
private readonly elRef;
private dialog;
private dialogCreated;
private ignoreChanges;
private cmpRef;
private viewAttachedToAppRef;
colorPicker: string;
cpWidth: string;
cpHeight: string;
cpToggle: boolean;
cpDisabled: boolean;
cpIgnoredElements: any;
cpFallbackColor: string;
cpColorMode: ColorMode;
cpCmykEnabled: boolean;
cpOutputFormat: OutputFormat;
cpAlphaChannel: AlphaChannel;
cpDisableInput: boolean;
cpDialogDisplay: string;
cpSaveClickOutside: boolean;
cpCloseClickOutside: boolean;
cpUseRootViewContainer: boolean;
cpPosition: string;
cpPositionOffset: string;
cpPositionRelativeToArrow: boolean;
cpOKButton: boolean;
cpOKButtonText: string;
cpOKButtonClass: string;
cpCancelButton: boolean;
cpCancelButtonText: string;
cpCancelButtonClass: string;
cpEyeDropper: boolean;
cpPresetLabel: string;
cpPresetColors: string[];
cpPresetColorsClass: string;
cpMaxPresetColorsLength: number;
cpPresetEmptyMessage: string;
cpPresetEmptyMessageClass: string;
cpAddColorButton: boolean;
cpAddColorButtonText: string;
cpAddColorButtonClass: string;
cpRemoveColorButtonClass: string;
cpArrowPosition: number;
cpExtraTemplate: TemplateRef<any>;
cpInputChange: EventEmitter<{
input: string;
value: number | string;
color: string;
}>;
cpToggleChange: EventEmitter<boolean>;
cpSliderChange: EventEmitter<{
slider: string;
value: string | number;
color: string;
}>;
cpSliderDragEnd: EventEmitter<{
slider: string;
color: string;
}>;
cpSliderDragStart: EventEmitter<{
slider: string;
color: string;
}>;
colorPickerOpen: EventEmitter<string>;
colorPickerClose: EventEmitter<string>;
colorPickerCancel: EventEmitter<string>;
colorPickerSelect: EventEmitter<string>;
colorPickerChange: EventEmitter<string>;
cpCmykColorChange: EventEmitter<string>;
cpPresetColorsChange: EventEmitter<any>;
handleClick(): void;
handleFocus(): void;
handleInput(event: any): void;
constructor(injector: Injector, appRef: ApplicationRef, vcRef: ViewContainerRef, elRef: ElementRef);
ngOnDestroy(): void;
ngOnChanges(changes: any): void;
openDialog(): void;
closeDialog(): void;
cmykChanged(value: string): void;
stateChanged(state: boolean): void;
colorChanged(value: string, ignore?: boolean): void;
colorSelected(value: string): void;
colorCanceled(): void;
inputFocus(): void;
inputChange(event: any): void;
inputChanged(event: any): void;
sliderChanged(event: any): void;
sliderDragEnd(event: {
slider: string;
color: string;
}): void;
sliderDragStart(event: {
slider: string;
color: string;
}): void;
presetColorsChanged(value: any[]): void;
static ɵfac: i0.ɵɵFactoryDeclaration<ColorPickerDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<ColorPickerDirective, "[colorPicker]", ["ngxColorPicker"], { "colorPicker": { "alias": "colorPicker"; "required": false; }; "cpWidth": { "alias": "cpWidth"; "required": false; }; "cpHeight": { "alias": "cpHeight"; "required": false; }; "cpToggle": { "alias": "cpToggle"; "required": false; }; "cpDisabled": { "alias": "cpDisabled"; "required": false; }; "cpIgnoredElements": { "alias": "cpIgnoredElements"; "required": false; }; "cpFallbackColor": { "alias": "cpFallbackColor"; "required": false; }; "cpColorMode": { "alias": "cpColorMode"; "required": false; }; "cpCmykEnabled": { "alias": "cpCmykEnabled"; "required": false; }; "cpOutputFormat": { "alias": "cpOutputFormat"; "required": false; }; "cpAlphaChannel": { "alias": "cpAlphaChannel"; "required": false; }; "cpDisableInput": { "alias": "cpDisableInput"; "required": false; }; "cpDialogDisplay": { "alias": "cpDialogDisplay"; "required": false; }; "cpSaveClickOutside": { "alias": "cpSaveClickOutside"; "required": false; }; "cpCloseClickOutside": { "alias": "cpCloseClickOutside"; "required": false; }; "cpUseRootViewContainer": { "alias": "cpUseRootViewContainer"; "required": false; }; "cpPosition": { "alias": "cpPosition"; "required": false; }; "cpPositionOffset": { "alias": "cpPositionOffset"; "required": false; }; "cpPositionRelativeToArrow": { "alias": "cpPositionRelativeToArrow"; "required": false; }; "cpOKButton": { "alias": "cpOKButton"; "required": false; }; "cpOKButtonText": { "alias": "cpOKButtonText"; "required": false; }; "cpOKButtonClass": { "alias": "cpOKButtonClass"; "required": false; }; "cpCancelButton": { "alias": "cpCancelButton"; "required": false; }; "cpCancelButtonText": { "alias": "cpCancelButtonText"; "required": false; }; "cpCancelButtonClass": { "alias": "cpCancelButtonClass"; "required": false; }; "cpEyeDropper": { "alias": "cpEyeDropper"; "required": false; }; "cpPresetLabel": { "alias": "cpPresetLabel"; "required": false; }; "cpPresetColors": { "alias": "cpPresetColors"; "required": false; }; "cpPresetColorsClass": { "alias": "cpPresetColorsClass"; "required": false; }; "cpMaxPresetColorsLength": { "alias": "cpMaxPresetColorsLength"; "required": false; }; "cpPresetEmptyMessage": { "alias": "cpPresetEmptyMessage"; "required": false; }; "cpPresetEmptyMessageClass": { "alias": "cpPresetEmptyMessageClass"; "required": false; }; "cpAddColorButton": { "alias": "cpAddColorButton"; "required": false; }; "cpAddColorButtonText": { "alias": "cpAddColorButtonText"; "required": false; }; "cpAddColorButtonClass": { "alias": "cpAddColorButtonClass"; "required": false; }; "cpRemoveColorButtonClass": { "alias": "cpRemoveColorButtonClass"; "required": false; }; "cpArrowPosition": { "alias": "cpArrowPosition"; "required": false; }; "cpExtraTemplate": { "alias": "cpExtraTemplate"; "required": false; }; }, { "cpInputChange": "cpInputChange"; "cpToggleChange": "cpToggleChange"; "cpSliderChange": "cpSliderChange"; "cpSliderDragEnd": "cpSliderDragEnd"; "cpSliderDragStart": "cpSliderDragStart"; "colorPickerOpen": "colorPickerOpen"; "colorPickerClose": "colorPickerClose"; "colorPickerCancel": "colorPickerCancel"; "colorPickerSelect": "colorPickerSelect"; "colorPickerChange": "colorPickerChange"; "cpCmykColorChange": "cpCmykColorChange"; "cpPresetColorsChange": "cpPresetColorsChange"; }, never, never, true, never>;
}