@ngx-mce/color-picker 22.2.8 → 22.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,392 +1,478 @@
1
- import * as i0 from '@angular/core';
2
- import { OnDestroy, AfterViewInit, NgZone, OnInit, OnChanges, SimpleChanges, Provider, EventEmitter, ElementRef, InjectionToken, AfterContentInit } from '@angular/core';
3
- import { ThemePalette } from '@angular/material/core';
4
- import { AbstractControl, FormGroup, ControlValueAccessor, Validator, ValidationErrors } from '@angular/forms';
5
- import { Subject } from 'rxjs';
6
- import { ScrollStrategy, Overlay, OverlayRef } from '@angular/cdk/overlay';
7
- import { MatButton } from '@angular/material/button';
8
-
9
- type ColorInputFormat = 'rgb' | 'hex' | 'hex6' | 'hex3' | 'hex4' | 'hex8';
10
-
11
- declare class Color {
12
- r: number;
13
- g: number;
14
- b: number;
15
- a: number;
16
- roundA: number;
17
- hex: string;
18
- rgba: string;
19
- constructor(_r: number, _g: number, _b: number, _a?: number);
20
- toHex(allow3Char?: boolean): string;
21
- toRgba(): string;
22
- toHexString(allow3Char?: boolean): string;
23
- toRgbString(): string;
24
- toHex8(allow4Char?: boolean): string;
25
- toHex8String(allow4Char?: boolean): string;
26
- toString(format: ColorInputFormat): string;
1
+ import { ThemePalette } from "@angular/material/core";
2
+ import * as i0 from "@angular/core";
3
+ import { AfterContentInit, AfterViewInit, ElementRef, EventEmitter, InjectionToken, NgZone, OnChanges, OnDestroy, OnInit, Provider, SimpleChanges } from "@angular/core";
4
+ import { AbstractControl, ControlValueAccessor, FormGroup, ValidationErrors, Validator } from "@angular/forms";
5
+ import { Subject } from "rxjs";
6
+ import { Overlay, OverlayRef, ScrollStrategy } from "@angular/cdk/overlay";
7
+ import { MatButton } from "@angular/material/button";
8
+ export type ColorInputFormat = 'rgb' | 'hex' | 'hex6' | 'hex3' | 'hex4' | 'hex8';
9
+ export declare class Color {
10
+ r: number;
11
+ g: number;
12
+ b: number;
13
+ a: number;
14
+ roundA: number;
15
+ hex: string;
16
+ rgba: string;
17
+ constructor(_r: number, _g: number, _b: number, _a?: number);
18
+ toHex(allow3Char?: boolean): string;
19
+ toRgba(): string;
20
+ toHexString(allow3Char?: boolean): string;
21
+ toRgbString(): string;
22
+ toHex8(allow4Char?: boolean): string;
23
+ toHex8String(allow4Char?: boolean): string;
24
+ toString(format: ColorInputFormat): string;
27
25
  }
28
-
29
- declare class NgxMatColorPaletteComponent {
30
- readonly colorChanged: i0.OutputEmitterRef<Color>;
31
- readonly color: i0.InputSignal<Color | null | undefined>;
32
- readonly theme: i0.InputSignal<ThemePalette>;
33
- handleColorChanged(color: Color): void;
34
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatColorPaletteComponent, never>;
35
- static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatColorPaletteComponent, "ngx-mat-color-palette", never, { "color": { "alias": "color"; "required": false; "isSignal": true; }; "theme": { "alias": "theme"; "required": false; "isSignal": true; }; }, { "colorChanged": "colorChanged"; }, never, never, true, never>;
26
+ export declare class NgxMatColorPaletteComponent {
27
+ readonly colorChanged: import("@angular/core").OutputEmitterRef<Color>;
28
+ readonly color: import("@angular/core").InputSignal<Color | null | undefined>;
29
+ readonly theme: import("@angular/core").InputSignal<ThemePalette>;
30
+ handleColorChanged(color: Color): void;
31
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatColorPaletteComponent, never>;
32
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatColorPaletteComponent, "ngx-mat-color-palette", never, {
33
+ "color": {
34
+ "alias": "color";
35
+ "required": false;
36
+ "isSignal": true;
37
+ };
38
+ "theme": {
39
+ "alias": "theme";
40
+ "required": false;
41
+ "isSignal": true;
42
+ };
43
+ }, {
44
+ "colorChanged": "colorChanged";
45
+ }, never, never, true, never>;
36
46
  }
37
-
38
47
  declare abstract class NgxMatBaseColorCanvas implements OnDestroy, AfterViewInit {
39
- readonly colorChanged: i0.OutputEmitterRef<Color>;
40
- readonly theme: i0.InputSignal<ThemePalette>;
41
- readonly color: i0.WritableSignal<Color | null | undefined>;
42
- set setColor(color: Color | undefined | null);
43
- canvas: HTMLCanvasElement | null;
44
- elementId: string;
45
- ctx: CanvasRenderingContext2D | null;
46
- width: number;
47
- height: number;
48
- x: number;
49
- y: number;
50
- drag: boolean;
51
- protected _destroyed: Subject<void>;
52
- protected zone: NgZone | null;
53
- constructor(elementId: string);
54
- ngOnDestroy(): void;
55
- ngAfterViewInit(): void;
56
- protected draw(): void;
57
- onMousedown(e: MouseEvent): void;
58
- onMousemove(e: MouseEvent): void;
59
- onMouseup(_: MouseEvent): void;
60
- emitChange(color: Color): void;
61
- abstract changeColor(e: MouseEvent): void;
62
- abstract fillGradient(): void;
63
- abstract redrawIndicator(x: number, y: number): void;
64
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatBaseColorCanvas, never>;
65
- static ɵdir: i0.ɵɵDirectiveDeclaration<NgxMatBaseColorCanvas, never, never, { "theme": { "alias": "theme"; "required": false; "isSignal": true; }; "setColor": { "alias": "color"; "required": false; }; }, { "colorChanged": "colorChanged"; }, never, never, true, never>;
48
+ readonly colorChanged: import("@angular/core").OutputEmitterRef<Color>;
49
+ readonly theme: import("@angular/core").InputSignal<ThemePalette>;
50
+ readonly color: import("@angular/core").WritableSignal<Color | null | undefined>;
51
+ set setColor(color: Color | undefined | null);
52
+ canvas: HTMLCanvasElement | null;
53
+ elementId: string;
54
+ ctx: CanvasRenderingContext2D | null;
55
+ width: number;
56
+ height: number;
57
+ x: number;
58
+ y: number;
59
+ drag: boolean;
60
+ protected _destroyed: Subject<void>;
61
+ protected zone: NgZone | null;
62
+ constructor(elementId: string);
63
+ ngOnDestroy(): void;
64
+ ngAfterViewInit(): void;
65
+ protected draw(): void;
66
+ onMousedown(e: MouseEvent): void;
67
+ onMousemove(e: MouseEvent): void;
68
+ onMouseup(_: MouseEvent): void;
69
+ emitChange(color: Color): void;
70
+ abstract changeColor(e: MouseEvent): void;
71
+ abstract fillGradient(): void;
72
+ abstract redrawIndicator(x: number, y: number): void;
73
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatBaseColorCanvas, never>;
74
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgxMatBaseColorCanvas, never, never, {
75
+ "theme": {
76
+ "alias": "theme";
77
+ "required": false;
78
+ "isSignal": true;
79
+ };
80
+ "setColor": {
81
+ "alias": "color";
82
+ "required": false;
83
+ };
84
+ }, {
85
+ "colorChanged": "colorChanged";
86
+ }, never, never, true, never>;
66
87
  }
67
-
68
- declare class NgxMatColorCanvasComponent extends NgxMatBaseColorCanvas implements OnInit, AfterViewInit, OnChanges, OnDestroy {
69
- private _baseColor;
70
- get rCtrl(): AbstractControl | null;
71
- get gCtrl(): AbstractControl | null;
72
- get bCtrl(): AbstractControl | null;
73
- get aCtrl(): AbstractControl | null;
74
- get hexCtrl(): AbstractControl | null;
75
- _resetBaseColor: boolean;
76
- formGroup: FormGroup;
77
- rgba: string;
78
- protected zone: NgZone;
79
- constructor();
80
- ngOnInit(): void;
81
- ngOnChanges(changes: SimpleChanges): void;
82
- private updateForm;
83
- redrawIndicator(x: number, y: number): void;
84
- fillGradient(): void;
85
- onSliderColorChanged(c: Color): void;
86
- changeColor(e: MouseEvent): void;
87
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatColorCanvasComponent, never>;
88
- static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatColorCanvasComponent, "ngx-mat-color-canvas", never, {}, {}, never, never, true, never>;
88
+ export declare class NgxMatColorCanvasComponent extends NgxMatBaseColorCanvas implements OnInit, AfterViewInit, OnChanges, OnDestroy {
89
+ private _baseColor;
90
+ get rCtrl(): AbstractControl | null;
91
+ get gCtrl(): AbstractControl | null;
92
+ get bCtrl(): AbstractControl | null;
93
+ get aCtrl(): AbstractControl | null;
94
+ get hexCtrl(): AbstractControl | null;
95
+ _resetBaseColor: boolean;
96
+ formGroup: FormGroup;
97
+ rgba: string;
98
+ protected zone: NgZone;
99
+ constructor();
100
+ ngOnInit(): void;
101
+ ngOnChanges(changes: SimpleChanges): void;
102
+ private updateForm;
103
+ redrawIndicator(x: number, y: number): void;
104
+ fillGradient(): void;
105
+ onSliderColorChanged(c: Color): void;
106
+ changeColor(e: MouseEvent): void;
107
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatColorCanvasComponent, never>;
108
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatColorCanvasComponent, "ngx-mat-color-canvas", never, {}, {}, never, never, true, never>;
89
109
  }
90
-
91
- declare class NgxMatColorCollectionComponent {
92
- readonly colorChanged: i0.OutputEmitterRef<Color>;
93
- set color(c: Color | undefined | null);
94
- readonly selectedColor: i0.WritableSignal<string>;
95
- colors1: string[];
96
- colors2: string[];
97
- select(hex: string): void;
98
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatColorCollectionComponent, never>;
99
- static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatColorCollectionComponent, "ngx-mat-color-collection", never, { "color": { "alias": "color"; "required": false; }; }, { "colorChanged": "colorChanged"; }, never, never, true, never>;
110
+ export declare class NgxMatColorCollectionComponent {
111
+ readonly colorChanged: import("@angular/core").OutputEmitterRef<Color>;
112
+ set color(c: Color | undefined | null);
113
+ readonly selectedColor: import("@angular/core").WritableSignal<string>;
114
+ colors1: string[];
115
+ colors2: string[];
116
+ select(hex: string): void;
117
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatColorCollectionComponent, never>;
118
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatColorCollectionComponent, "ngx-mat-color-collection", never, {
119
+ "color": {
120
+ "alias": "color";
121
+ "required": false;
122
+ };
123
+ }, {
124
+ "colorChanged": "colorChanged";
125
+ }, never, never, true, never>;
100
126
  }
101
-
102
- declare class NgxMatColorSliderComponent extends NgxMatBaseColorCanvas {
103
- protected zone: NgZone;
104
- constructor();
105
- ngAfterViewInit(): void;
106
- fillGradient(): void;
107
- redrawIndicator(x: number, y: number): void;
108
- changeColor(e: MouseEvent): void;
109
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatColorSliderComponent, never>;
110
- static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatColorSliderComponent, "ngx-mat-color-slider", never, {}, {}, never, never, true, never>;
127
+ export declare class NgxMatColorSliderComponent extends NgxMatBaseColorCanvas {
128
+ protected zone: NgZone;
129
+ constructor();
130
+ ngAfterViewInit(): void;
131
+ fillGradient(): void;
132
+ redrawIndicator(x: number, y: number): void;
133
+ changeColor(e: MouseEvent): void;
134
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatColorSliderComponent, never>;
135
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatColorSliderComponent, "ngx-mat-color-slider", never, {}, {}, never, never, true, never>;
111
136
  }
112
-
113
- declare class NgxMatColorPickerInputEvent {
114
- /** Reference to the colorpicker input component that emitted the event. */
115
- target: NgxMatColorPickerInput;
116
- /** Reference to the native input element associated with the colorpicker input. */
117
- targetElement: HTMLElement;
118
- /** The new value for the target colorpicker input. */
119
- value: Color | null;
120
- constructor(
121
- /** Reference to the colorpicker input component that emitted the event. */
122
- target: NgxMatColorPickerInput,
123
- /** Reference to the native input element associated with the colorpicker input. */
124
- targetElement: HTMLElement);
137
+ export declare class NgxMatColorPickerInputEvent {
138
+ /** Reference to the colorpicker input component that emitted the event. */
139
+ target: NgxMatColorPickerInput;
140
+ /** Reference to the native input element associated with the colorpicker input. */
141
+ targetElement: HTMLElement;
142
+ /** The new value for the target colorpicker input. */
143
+ value: Color | null;
144
+ constructor(
145
+ /** Reference to the colorpicker input component that emitted the event. */
146
+ target: NgxMatColorPickerInput,
147
+ /** Reference to the native input element associated with the colorpicker input. */
148
+ targetElement: HTMLElement);
125
149
  }
126
- declare const MAT_COLORPICKER_VALUE_ACCESSOR: Provider;
127
- declare const MAT_COLORPICKER_VALIDATORS: Provider;
128
- declare class NgxMatColorPickerInput implements ControlValueAccessor, OnDestroy, Validator {
129
- set ngxMatColorPicker(value: NgxMatColorPickerComponent);
130
- _picker: NgxMatColorPickerComponent | null;
131
- /** Whether the colorpicker-input is disabled. */
132
- get disabled(): boolean;
133
- set disabled(value: boolean);
134
- private _disabled;
135
- /** The value of the input. */
136
- get value(): Color | null;
137
- set value(value: Color | null);
138
- private _value;
139
- /** Emits when a `change` event is fired on this `<input>`. */
140
- readonly colorChange: i0.OutputEmitterRef<NgxMatColorPickerInputEvent>;
141
- /** Emits when an `input` event is fired on this `<input>`. */
142
- readonly colorInput: i0.OutputEmitterRef<NgxMatColorPickerInputEvent>;
143
- /** Emits when the disabled state has changed */
144
- _disabledChange: EventEmitter<boolean>;
145
- /** Emits when the value changes (either due to user input or programmatic change). */
146
- _valueChange: EventEmitter<Color | null>;
147
- _onTouched: () => void;
148
- private _cvaOnChange;
149
- private _validatorOnChange;
150
- private _pickerSubscription;
151
- /** The combined form control validator for this input. */
152
- private _validator;
153
- /** Whether the last value set on the input was valid. */
154
- private _lastValueValid;
155
- private _elementRef;
156
- private _formField;
157
- private _colorFormats;
158
- private _adapter;
159
- constructor();
160
- /** Returns the palette used by the input's form field, if any. */
161
- getThemePalette(): ThemePalette;
162
- registerOnValidatorChange(fn: () => void): void;
163
- validate(c: AbstractControl): ValidationErrors | null;
164
- /**
165
- * @deprecated
166
- * @breaking-change 8.0.0 Use `getConnectedOverlayOrigin` instead
167
- */
168
- getPopupConnectionElementRef(): ElementRef;
169
- /**
170
- * Gets the element that the colorpicker popup should be connected to.
171
- * @return The element to connect the popup to.
172
- */
173
- getConnectedOverlayOrigin(): ElementRef;
174
- ngOnDestroy(): void;
175
- writeValue(value: Color): void;
176
- registerOnChange(fn: (value: Color | null) => void): void;
177
- registerOnTouched(fn: () => void): void;
178
- setDisabledState(isDisabled: boolean): void;
179
- _onChange(): void;
180
- _onKeydown(event: KeyboardEvent): void;
181
- /** Handles blur events on the input. */
182
- _onBlur(): void;
183
- /** Formats a value and sets it on the input element. */
184
- private _formatValue;
185
- _onInput(event?: Event): void;
186
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatColorPickerInput, never>;
187
- static ɵdir: i0.ɵɵDirectiveDeclaration<NgxMatColorPickerInput, "input[ngxMatColorPicker]", ["ngxMatColorPickerInput"], { "ngxMatColorPicker": { "alias": "ngxMatColorPicker"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "colorChange": "colorChange"; "colorInput": "colorInput"; }, never, never, true, never>;
150
+ export declare const MAT_COLORPICKER_VALUE_ACCESSOR: Provider;
151
+ export declare const MAT_COLORPICKER_VALIDATORS: Provider;
152
+ export declare class NgxMatColorPickerInput implements ControlValueAccessor, OnDestroy, Validator {
153
+ set ngxMatColorPicker(value: NgxMatColorPickerComponent);
154
+ _picker: NgxMatColorPickerComponent | null;
155
+ /** Whether the colorpicker-input is disabled. */
156
+ get disabled(): boolean;
157
+ set disabled(value: boolean);
158
+ private _disabled;
159
+ /** The value of the input. */
160
+ get value(): Color | null;
161
+ set value(value: Color | null);
162
+ private _value;
163
+ /** Emits when a `change` event is fired on this `<input>`. */
164
+ readonly colorChange: import("@angular/core").OutputEmitterRef<NgxMatColorPickerInputEvent>;
165
+ /** Emits when an `input` event is fired on this `<input>`. */
166
+ readonly colorInput: import("@angular/core").OutputEmitterRef<NgxMatColorPickerInputEvent>;
167
+ /** Emits when the disabled state has changed */
168
+ _disabledChange: EventEmitter<boolean>;
169
+ /** Emits when the value changes (either due to user input or programmatic change). */
170
+ _valueChange: EventEmitter<Color | null>;
171
+ _onTouched: () => void;
172
+ private _cvaOnChange;
173
+ private _validatorOnChange;
174
+ private _pickerSubscription;
175
+ /** The combined form control validator for this input. */
176
+ private _validator;
177
+ /** Whether the last value set on the input was valid. */
178
+ private _lastValueValid;
179
+ private _elementRef;
180
+ private _formField;
181
+ private _colorFormats;
182
+ private _adapter;
183
+ constructor();
184
+ /** Returns the palette used by the input's form field, if any. */
185
+ getThemePalette(): ThemePalette;
186
+ registerOnValidatorChange(fn: () => void): void;
187
+ validate(c: AbstractControl): ValidationErrors | null;
188
+ /**
189
+ * @deprecated
190
+ * @breaking-change 8.0.0 Use `getConnectedOverlayOrigin` instead
191
+ */
192
+ getPopupConnectionElementRef(): ElementRef;
193
+ /**
194
+ * Gets the element that the colorpicker popup should be connected to.
195
+ * @return The element to connect the popup to.
196
+ */
197
+ getConnectedOverlayOrigin(): ElementRef;
198
+ ngOnDestroy(): void;
199
+ writeValue(value: Color): void;
200
+ registerOnChange(fn: (value: Color | null) => void): void;
201
+ registerOnTouched(fn: () => void): void;
202
+ setDisabledState(isDisabled: boolean): void;
203
+ _onChange(): void;
204
+ _onKeydown(event: KeyboardEvent): void;
205
+ /** Handles blur events on the input. */
206
+ _onBlur(): void;
207
+ /** Formats a value and sets it on the input element. */
208
+ private _formatValue;
209
+ _onInput(event?: Event): void;
210
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatColorPickerInput, never>;
211
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgxMatColorPickerInput, "input[ngxMatColorPicker]", ["ngxMatColorPickerInput"], {
212
+ "ngxMatColorPicker": {
213
+ "alias": "ngxMatColorPicker";
214
+ "required": false;
215
+ };
216
+ "disabled": {
217
+ "alias": "disabled";
218
+ "required": false;
219
+ };
220
+ "value": {
221
+ "alias": "value";
222
+ "required": false;
223
+ };
224
+ }, {
225
+ "colorChange": "colorChange";
226
+ "colorInput": "colorInput";
227
+ }, never, never, true, never>;
188
228
  }
189
-
190
229
  /** Injection token that determines the scroll handling while the calendar is open. */
191
- declare const NGX_MAT_COLOR_PICKER_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
192
- declare function NGX_MAT_COLOR_PICKER_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy;
193
- declare const NGX_MAT_COLOR_PICKER_SCROLL_STRATEGY_FACTORY_PROVIDER: {
194
- provide: InjectionToken<() => ScrollStrategy>;
195
- deps: (typeof Overlay)[];
196
- useFactory: typeof NGX_MAT_COLOR_PICKER_SCROLL_STRATEGY_FACTORY;
230
+ export declare const NGX_MAT_COLOR_PICKER_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
231
+ export declare function NGX_MAT_COLOR_PICKER_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy;
232
+ export declare const NGX_MAT_COLOR_PICKER_SCROLL_STRATEGY_FACTORY_PROVIDER: {
233
+ provide: InjectionToken<() => ScrollStrategy>;
234
+ deps: (typeof Overlay)[];
235
+ useFactory: typeof NGX_MAT_COLOR_PICKER_SCROLL_STRATEGY_FACTORY;
197
236
  };
198
- declare class NgxMatColorPickerContentComponent implements OnInit {
199
- /** Reference to the internal calendar component. */
200
- _palette: i0.Signal<NgxMatColorPaletteComponent | undefined>;
201
- picker: NgxMatColorPickerComponent | null;
202
- color: ThemePalette;
203
- _isLeaving: boolean;
204
- _panelEnterClass: 'enter-dropdown' | 'enter-dialog' | null;
205
- readonly _animationDone: Subject<void>;
206
- private _cdr;
207
- get isEnterDropdown(): boolean;
208
- get isEnterDialog(): boolean;
209
- get isLeaving(): boolean;
210
- ngOnInit(): void;
211
- _startExitAnimation(): void;
212
- _onAnimationEnd(event: AnimationEvent): void;
213
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatColorPickerContentComponent, never>;
214
- static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatColorPickerContentComponent, "ngx-mat-color-picker-content", ["ngxMatColorPickerContent"], { "color": { "alias": "color"; "required": false; }; }, { "_animationDone": "_animationDone"; }, never, never, true, never>;
237
+ export declare class NgxMatColorPickerContentComponent implements OnInit {
238
+ /** Reference to the internal calendar component. */
239
+ _palette: import("@angular/core").Signal<NgxMatColorPaletteComponent | undefined>;
240
+ picker: NgxMatColorPickerComponent | null;
241
+ color: ThemePalette;
242
+ _isLeaving: boolean;
243
+ _panelEnterClass: 'enter-dropdown' | 'enter-dialog' | null;
244
+ readonly _animationDone: Subject<void>;
245
+ private _cdr;
246
+ get isEnterDropdown(): boolean;
247
+ get isEnterDialog(): boolean;
248
+ get isLeaving(): boolean;
249
+ ngOnInit(): void;
250
+ _startExitAnimation(): void;
251
+ _onAnimationEnd(event: AnimationEvent): void;
252
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatColorPickerContentComponent, never>;
253
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatColorPickerContentComponent, "ngx-mat-color-picker-content", ["ngxMatColorPickerContent"], {
254
+ "color": {
255
+ "alias": "color";
256
+ "required": false;
257
+ };
258
+ }, {
259
+ "_animationDone": "_animationDone";
260
+ }, never, never, true, never>;
215
261
  }
216
- declare class NgxMatColorPickerComponent implements OnDestroy {
217
- id: string;
218
- /** Emits when the datepicker has been opened. */
219
- openedStream: EventEmitter<void>;
220
- /** Emits when the datepicker has been closed. */
221
- closedStream: EventEmitter<void>;
222
- get disabled(): boolean;
223
- set disabled(value: boolean);
224
- private _disabled;
225
- get touchUi(): boolean;
226
- set touchUi(value: boolean);
227
- private _touchUi;
228
- /** Whether the calendar is open. */
229
- get opened(): boolean;
230
- set opened(value: boolean);
231
- private _opened;
232
- /** Default Color palette to use on the datepicker's calendar. */
233
- get defaultColor(): ThemePalette;
234
- set defaultColor(value: ThemePalette);
235
- _defaultColor: ThemePalette;
236
- /** Color palette to use on the datepicker's calendar. */
237
- get color(): ThemePalette;
238
- set color(value: ThemePalette);
239
- _color: ThemePalette;
240
- get isPrimary(): boolean;
241
- get isAccent(): boolean;
242
- get isWarn(): boolean;
243
- /** The currently selected date. */
244
- get _selected(): Color | null;
245
- set _selected(value: Color);
246
- private _validSelected;
247
- _pickerInput: NgxMatColorPickerInput | null;
248
- /** A reference to the overlay when the picker is opened as a popup. */
249
- _popupRef: OverlayRef | null;
250
- /** A reference to the dialog when the picker is opened as a dialog. */
251
- private _dialogRef;
252
- /** Reference to the component instantiated in popup mode. */
253
- private _popupComponentRef;
254
- /** A portal containing the content for this picker. */
255
- private _portal;
256
- /** Emits when the datepicker is disabled. */
257
- readonly _disabledChange: EventEmitter<boolean>;
258
- /** The element that was focused before the datepicker was opened. */
259
- private _focusedElementBeforeOpen;
260
- /** Subscription to value changes in the associated input element. */
261
- private _inputSubscription;
262
- /** Emits new selected date when selected date changes. */
263
- readonly _selectedChanged: Subject<Color>;
264
- /** Whether an animation is currently in progress. */
265
- private _isAnimating;
266
- private _dialog;
267
- private _overlay;
268
- private _zone;
269
- private _adapter;
270
- private _dir;
271
- private _scrollStrategy;
272
- private _document;
273
- private _viewContainerRef;
274
- ngOnDestroy(): void;
275
- /** Selects the given date */
276
- select(nextVal: Color): void;
277
- /**
278
- * Register an input with this datepicker.
279
- * @param input The datepicker input to register with this datepicker.
280
- */
281
- registerInput(input: NgxMatColorPickerInput): void;
282
- open(): void;
283
- /** Open the calendar as a dialog. */
284
- private _openAsDialog;
285
- private _handleDialogClosed;
286
- /** Open the calendar as a popup. */
287
- private _openAsPopup;
288
- /** Create the popup. */
289
- private _createPopup;
290
- close(): void;
291
- /** Passes the current theme color along to the calendar overlay. */
292
- private _setColor;
293
- /** Create the popup PositionStrategy. */
294
- private _createPopupPositionStrategy;
295
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatColorPickerComponent, never>;
296
- static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatColorPickerComponent, "ngx-mat-color-picker", ["ngxMatColorPicker"], { "id": { "alias": "id"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "touchUi": { "alias": "touchUi"; "required": false; }; "opened": { "alias": "opened"; "required": false; }; "defaultColor": { "alias": "defaultColor"; "required": false; }; "color": { "alias": "color"; "required": false; }; }, { "openedStream": "opened"; "closedStream": "closed"; }, never, never, true, never>;
262
+ export declare class NgxMatColorPickerComponent implements OnDestroy {
263
+ id: string;
264
+ /** Emits when the datepicker has been opened. */
265
+ openedStream: EventEmitter<void>;
266
+ /** Emits when the datepicker has been closed. */
267
+ closedStream: EventEmitter<void>;
268
+ get disabled(): boolean;
269
+ set disabled(value: boolean);
270
+ private _disabled;
271
+ get touchUi(): boolean;
272
+ set touchUi(value: boolean);
273
+ private _touchUi;
274
+ /** Whether the calendar is open. */
275
+ get opened(): boolean;
276
+ set opened(value: boolean);
277
+ private _opened;
278
+ /** Default Color palette to use on the datepicker's calendar. */
279
+ get defaultColor(): ThemePalette;
280
+ set defaultColor(value: ThemePalette);
281
+ _defaultColor: ThemePalette;
282
+ /** Color palette to use on the datepicker's calendar. */
283
+ get color(): ThemePalette;
284
+ set color(value: ThemePalette);
285
+ _color: ThemePalette;
286
+ get isPrimary(): boolean;
287
+ get isAccent(): boolean;
288
+ get isWarn(): boolean;
289
+ /** The currently selected date. */
290
+ get _selected(): Color | null;
291
+ set _selected(value: Color);
292
+ private _validSelected;
293
+ _pickerInput: NgxMatColorPickerInput | null;
294
+ /** A reference to the overlay when the picker is opened as a popup. */
295
+ _popupRef: OverlayRef | null;
296
+ /** A reference to the dialog when the picker is opened as a dialog. */
297
+ private _dialogRef;
298
+ /** Reference to the component instantiated in popup mode. */
299
+ private _popupComponentRef;
300
+ /** A portal containing the content for this picker. */
301
+ private _portal;
302
+ /** Emits when the datepicker is disabled. */
303
+ readonly _disabledChange: EventEmitter<boolean>;
304
+ /** The element that was focused before the datepicker was opened. */
305
+ private _focusedElementBeforeOpen;
306
+ /** Subscription to value changes in the associated input element. */
307
+ private _inputSubscription;
308
+ /** Emits new selected date when selected date changes. */
309
+ readonly _selectedChanged: Subject<Color>;
310
+ /** Whether an animation is currently in progress. */
311
+ private _isAnimating;
312
+ private _dialog;
313
+ private _overlay;
314
+ private _zone;
315
+ private _adapter;
316
+ private _dir;
317
+ private _scrollStrategy;
318
+ private _document;
319
+ private _viewContainerRef;
320
+ ngOnDestroy(): void;
321
+ /** Selects the given date */
322
+ select(nextVal: Color): void;
323
+ /**
324
+ * Register an input with this datepicker.
325
+ * @param input The datepicker input to register with this datepicker.
326
+ */
327
+ registerInput(input: NgxMatColorPickerInput): void;
328
+ open(): void;
329
+ /** Open the calendar as a dialog. */
330
+ private _openAsDialog;
331
+ private _handleDialogClosed;
332
+ /** Open the calendar as a popup. */
333
+ private _openAsPopup;
334
+ /** Create the popup. */
335
+ private _createPopup;
336
+ close(): void;
337
+ /** Passes the current theme color along to the calendar overlay. */
338
+ private _setColor;
339
+ /** Create the popup PositionStrategy. */
340
+ private _createPopupPositionStrategy;
341
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatColorPickerComponent, never>;
342
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatColorPickerComponent, "ngx-mat-color-picker", ["ngxMatColorPicker"], {
343
+ "id": {
344
+ "alias": "id";
345
+ "required": false;
346
+ };
347
+ "disabled": {
348
+ "alias": "disabled";
349
+ "required": false;
350
+ };
351
+ "touchUi": {
352
+ "alias": "touchUi";
353
+ "required": false;
354
+ };
355
+ "opened": {
356
+ "alias": "opened";
357
+ "required": false;
358
+ };
359
+ "defaultColor": {
360
+ "alias": "defaultColor";
361
+ "required": false;
362
+ };
363
+ "color": {
364
+ "alias": "color";
365
+ "required": false;
366
+ };
367
+ }, {
368
+ "openedStream": "opened";
369
+ "closedStream": "closed";
370
+ }, never, never, true, never>;
297
371
  }
298
-
299
- declare class NgxMatColorpickerToggleIcon {
300
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatColorpickerToggleIcon, never>;
301
- static ɵdir: i0.ɵɵDirectiveDeclaration<NgxMatColorpickerToggleIcon, "[ngxMatColorpickerToggleIcon]", never, {}, {}, never, never, true, never>;
372
+ export declare class NgxMatColorpickerToggleIcon {
373
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatColorpickerToggleIcon, never>;
374
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NgxMatColorpickerToggleIcon, "[ngxMatColorpickerToggleIcon]", never, {}, {}, never, never, true, never>;
302
375
  }
303
- declare class NgxMatColorToggleComponent implements AfterContentInit, OnDestroy {
304
- private _stateChanges;
305
- picker: i0.InputSignal<NgxMatColorPickerComponent | undefined>;
306
- tabIndex: i0.InputSignal<number | undefined>;
307
- get disabled(): boolean | undefined;
308
- set disabled(value: boolean);
309
- private _disabled;
310
- /** Whether ripples on the toggle should be disabled. */
311
- disableRipple: i0.InputSignal<boolean | undefined>;
312
- _button: i0.Signal<MatButton | undefined>;
313
- private _cd;
314
- constructor();
315
- ngOnDestroy(): void;
316
- ngAfterContentInit(): void;
317
- open(event: Event): void;
318
- private _watchStateChanges;
319
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatColorToggleComponent, never>;
320
- static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatColorToggleComponent, "ngx-mat-color-toggle", ["ngxMatColorPickerToggle"], { "picker": { "alias": "for"; "required": false; "isSignal": true; }; "tabIndex": { "alias": "tabIndex"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; "isSignal": true; }; }, {}, never, ["[ngxMatColorpickerToggleIcon]"], true, never>;
376
+ export declare class NgxMatColorToggleComponent implements AfterContentInit, OnDestroy {
377
+ private _stateChanges;
378
+ picker: import("@angular/core").InputSignal<NgxMatColorPickerComponent | undefined>;
379
+ tabIndex: import("@angular/core").InputSignal<number | undefined>;
380
+ get disabled(): boolean | undefined;
381
+ set disabled(value: boolean);
382
+ private _disabled;
383
+ /** Whether ripples on the toggle should be disabled. */
384
+ disableRipple: import("@angular/core").InputSignal<boolean | undefined>;
385
+ _button: import("@angular/core").Signal<MatButton | undefined>;
386
+ private _cd;
387
+ constructor();
388
+ ngOnDestroy(): void;
389
+ ngAfterContentInit(): void;
390
+ open(event: Event): void;
391
+ private _watchStateChanges;
392
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatColorToggleComponent, never>;
393
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatColorToggleComponent, "ngx-mat-color-toggle", ["ngxMatColorPickerToggle"], {
394
+ "picker": {
395
+ "alias": "for";
396
+ "required": false;
397
+ "isSignal": true;
398
+ };
399
+ "tabIndex": {
400
+ "alias": "tabIndex";
401
+ "required": false;
402
+ "isSignal": true;
403
+ };
404
+ "disabled": {
405
+ "alias": "disabled";
406
+ "required": false;
407
+ };
408
+ "disableRipple": {
409
+ "alias": "disableRipple";
410
+ "required": false;
411
+ "isSignal": true;
412
+ };
413
+ }, {}, never, ["[ngxMatColorpickerToggleIcon]"], true, never>;
321
414
  }
322
-
323
- declare class NumericColorInputDirective {
324
- onInput($event: InputEvent): void;
325
- /**
326
- * Format input
327
- * @param input
328
- */
329
- private _formatInput;
330
- static ɵfac: i0.ɵɵFactoryDeclaration<NumericColorInputDirective, never>;
331
- static ɵdir: i0.ɵɵDirectiveDeclaration<NumericColorInputDirective, "[ngxMatNumericColorInput]", never, {}, {}, never, never, true, never>;
415
+ export declare class NumericColorInputDirective {
416
+ onInput($event: InputEvent): void;
417
+ /**
418
+ * Format input
419
+ * @param input
420
+ */
421
+ private _formatInput;
422
+ static ɵfac: i0.ɵɵFactoryDeclaration<NumericColorInputDirective, never>;
423
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NumericColorInputDirective, "[ngxMatNumericColorInput]", never, {}, {}, never, never, true, never>;
332
424
  }
333
-
334
- declare const NUMERIC_REGEX: RegExp;
335
- declare const MAX_RGB = 255;
336
- declare const MIN_RGB = 0;
425
+ export declare const NUMERIC_REGEX: RegExp;
426
+ export declare const MAX_RGB = 255;
427
+ export declare const MIN_RGB = 0;
337
428
  /** List basic colors */
338
- declare const BASIC_COLORS: string[];
429
+ export declare const BASIC_COLORS: string[];
339
430
  /**
340
431
  * Get color at position
341
432
  * @param ctx
342
433
  * @param x
343
434
  * @param y
344
435
  */
345
- declare function getColorAtPosition(ctx: CanvasRenderingContext2D, x: number, y: number): {
346
- r: number;
347
- g: number;
348
- b: number;
436
+ export declare function getColorAtPosition(ctx: CanvasRenderingContext2D, x: number, y: number): {
437
+ r: number;
438
+ g: number;
439
+ b: number;
349
440
  };
350
- declare function rgbaToHex(r: number, g: number, b: number, a: number, allow4Char?: boolean): string;
351
- declare function pad2(c: string): string;
352
- declare function convertDecimalToHex(d: string): string;
353
- declare function rgbToHex(r: number, g: number, b: number, allow3Char?: boolean): string;
354
- declare const matchers: {
355
- CSS_UNIT: RegExp;
356
- rgb: RegExp;
357
- rgba: RegExp;
358
- hsl: RegExp;
359
- hsla: RegExp;
360
- hsv: RegExp;
361
- hsva: RegExp;
362
- hex3: RegExp;
363
- hex6: RegExp;
364
- hex4: RegExp;
365
- hex8: RegExp;
441
+ export declare function rgbaToHex(r: number, g: number, b: number, a: number, allow4Char?: boolean): string;
442
+ export declare function pad2(c: string): string;
443
+ export declare function convertDecimalToHex(d: string): string;
444
+ export declare function rgbToHex(r: number, g: number, b: number, allow3Char?: boolean): string;
445
+ export declare const matchers: {
446
+ CSS_UNIT: RegExp;
447
+ rgb: RegExp;
448
+ rgba: RegExp;
449
+ hsl: RegExp;
450
+ hsla: RegExp;
451
+ hsv: RegExp;
452
+ hsva: RegExp;
453
+ hex3: RegExp;
454
+ hex6: RegExp;
455
+ hex4: RegExp;
456
+ hex8: RegExp;
366
457
  };
367
- declare function stringInputToObject(color: string): {
368
- r: number;
369
- g: number;
370
- b: number;
371
- a: number;
458
+ export declare function stringInputToObject(color: string): {
459
+ r: number;
460
+ g: number;
461
+ b: number;
462
+ a: number;
372
463
  } | null;
373
- declare function createMissingDateImplError(provider: string): Error;
374
-
375
- declare class ColorAdapter {
376
- sameColor(a: Color, b: Color): boolean;
377
- format(c: Color, format: ColorInputFormat): string;
378
- parse(value: string): Color | null;
379
- static ɵfac: i0.ɵɵFactoryDeclaration<ColorAdapter, never>;
380
- static ɵprov: i0.ɵɵInjectableDeclaration<any>;
464
+ export declare function createMissingDateImplError(provider: string): Error;
465
+ export declare class ColorAdapter {
466
+ sameColor(a: Color, b: Color): boolean;
467
+ format(c: Color, format: ColorInputFormat): string;
468
+ parse(value: string): Color | null;
469
+ static ɵfac: i0.ɵɵFactoryDeclaration<ColorAdapter, never>;
470
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
381
471
  }
382
-
383
- interface MatColorFormats {
384
- display: {
385
- colorInput: ColorInputFormat;
386
- };
472
+ export interface MatColorFormats {
473
+ display: {
474
+ colorInput: ColorInputFormat;
475
+ };
387
476
  }
388
- declare const NGX_MAT_COLOR_FORMATS: MatColorFormats;
389
- declare const MAT_COLOR_FORMATS: InjectionToken<MatColorFormats>;
390
-
391
- export { BASIC_COLORS, Color, ColorAdapter, MAT_COLORPICKER_VALIDATORS, MAT_COLORPICKER_VALUE_ACCESSOR, MAT_COLOR_FORMATS, MAX_RGB, MIN_RGB, NGX_MAT_COLOR_FORMATS, NGX_MAT_COLOR_PICKER_SCROLL_STRATEGY, NGX_MAT_COLOR_PICKER_SCROLL_STRATEGY_FACTORY, NGX_MAT_COLOR_PICKER_SCROLL_STRATEGY_FACTORY_PROVIDER, NUMERIC_REGEX, NgxMatColorCanvasComponent, NgxMatColorCollectionComponent, NgxMatColorPaletteComponent, NgxMatColorPickerComponent, NgxMatColorPickerContentComponent, NgxMatColorPickerInput, NgxMatColorPickerInputEvent, NgxMatColorSliderComponent, NgxMatColorToggleComponent, NgxMatColorpickerToggleIcon, NumericColorInputDirective, convertDecimalToHex, createMissingDateImplError, getColorAtPosition, matchers, pad2, rgbToHex, rgbaToHex, stringInputToObject };
392
- export type { ColorInputFormat, MatColorFormats };
477
+ export declare const NGX_MAT_COLOR_FORMATS: MatColorFormats;
478
+ export declare const MAT_COLOR_FORMATS: InjectionToken<MatColorFormats>;