@ngx-mce/color-picker 21.2.6-next.1 → 21.2.6-next.3
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,9 +1,9 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { output, input, signal, Input, Directive, Component, ViewEncapsulation, Injectable, InjectionToken, viewChild,
|
|
2
|
+
import { output, input, signal, Input, Directive, inject, NgZone, Component, ViewEncapsulation, Injectable, InjectionToken, viewChild, ChangeDetectorRef, HostBinding, Output, ChangeDetectionStrategy, EventEmitter, DOCUMENT, ViewContainerRef, forwardRef, ElementRef, effect, untracked, HostListener } from '@angular/core';
|
|
3
3
|
import * as i3 from '@angular/forms';
|
|
4
4
|
import { FormGroup, FormControl, Validators, ReactiveFormsModule, NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
|
|
5
5
|
import * as i1 from '@angular/material/form-field';
|
|
6
|
-
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
6
|
+
import { MatFormFieldModule, MatFormField } from '@angular/material/form-field';
|
|
7
7
|
import * as i2 from '@angular/material/input';
|
|
8
8
|
import { MatInputModule, MAT_INPUT_VALUE_ACCESSOR } from '@angular/material/input';
|
|
9
9
|
import { Subject, merge, Subscription, of } from 'rxjs';
|
|
@@ -11,23 +11,18 @@ import { takeUntil, debounceTime, distinctUntilChanged, take, filter } from 'rxj
|
|
|
11
11
|
import { NgClass } from '@angular/common';
|
|
12
12
|
import * as i1$1 from '@angular/material/button';
|
|
13
13
|
import { MatButtonModule } from '@angular/material/button';
|
|
14
|
+
import { Directionality } from '@angular/cdk/bidi';
|
|
14
15
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
15
16
|
import { ESCAPE, UP_ARROW, DOWN_ARROW } from '@angular/cdk/keycodes';
|
|
16
|
-
import * as i2$1 from '@angular/cdk/overlay';
|
|
17
17
|
import { Overlay, OverlayConfig } from '@angular/cdk/overlay';
|
|
18
18
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
19
|
-
import
|
|
20
|
-
import * as
|
|
21
|
-
import * as i2$2 from '@angular/material/icon';
|
|
19
|
+
import { MatDialog } from '@angular/material/dialog';
|
|
20
|
+
import * as i2$1 from '@angular/material/icon';
|
|
22
21
|
import { MatIconModule } from '@angular/material/icon';
|
|
23
22
|
|
|
24
23
|
const trimLeft = /^\s+/;
|
|
25
24
|
const trimRight = /\s+$/;
|
|
26
|
-
const tinyCounter = 0;
|
|
27
25
|
const mathRound = Math.round;
|
|
28
|
-
const mathMin = Math.min;
|
|
29
|
-
const mathMax = Math.max;
|
|
30
|
-
const mathRandom = Math.random;
|
|
31
26
|
const NUMERIC_REGEX = /[^0-9]/g;
|
|
32
27
|
const MAX_RGB = 255;
|
|
33
28
|
const MIN_RGB = 0;
|
|
@@ -65,7 +60,7 @@ function getColorAtPosition(ctx, x, y) {
|
|
|
65
60
|
// Assumes r, g, b are contained in the set [0, 255] and
|
|
66
61
|
// a in [0, 1]. Returns a 4 or 8 character rgba hex
|
|
67
62
|
function rgbaToHex(r, g, b, a, allow4Char) {
|
|
68
|
-
|
|
63
|
+
const hex = [
|
|
69
64
|
pad2(mathRound(r).toString(16)),
|
|
70
65
|
pad2(mathRound(g).toString(16)),
|
|
71
66
|
pad2(mathRound(b).toString(16)),
|
|
@@ -102,7 +97,7 @@ function parseIntFromHex(val) {
|
|
|
102
97
|
// Assumes r, g, and b are contained in the set [0, 255]
|
|
103
98
|
// Returns a 3 or 6 character hex
|
|
104
99
|
function rgbToHex(r, g, b, allow3Char) {
|
|
105
|
-
|
|
100
|
+
const hex = [
|
|
106
101
|
pad2(mathRound(r).toString(16)),
|
|
107
102
|
pad2(mathRound(g).toString(16)),
|
|
108
103
|
pad2(mathRound(b).toString(16)),
|
|
@@ -155,7 +150,6 @@ function stringInputToObject(color) {
|
|
|
155
150
|
// Just return an object and let the conversion functions handle that.
|
|
156
151
|
// This way the result will be the same whether the tinycolor is initialized with string or object.
|
|
157
152
|
let match;
|
|
158
|
-
let obj;
|
|
159
153
|
if ((match = matchers.rgb.exec(color))) {
|
|
160
154
|
return {
|
|
161
155
|
r: parseFloat(match[1]),
|
|
@@ -261,10 +255,10 @@ class Color {
|
|
|
261
255
|
return '#' + this.toHex8(allow4Char);
|
|
262
256
|
}
|
|
263
257
|
toString(format) {
|
|
264
|
-
|
|
258
|
+
const formatSet = !!format;
|
|
265
259
|
let formattedString;
|
|
266
|
-
|
|
267
|
-
|
|
260
|
+
const hasAlpha = this.a < 1 && this.a >= 0;
|
|
261
|
+
const needsAlphaFormat = !formatSet &&
|
|
268
262
|
hasAlpha &&
|
|
269
263
|
(format === 'hex' ||
|
|
270
264
|
format === 'hex6' ||
|
|
@@ -294,7 +288,6 @@ class Color {
|
|
|
294
288
|
}
|
|
295
289
|
|
|
296
290
|
class NgxMatBaseColorCanvas {
|
|
297
|
-
zone;
|
|
298
291
|
colorChanged = output();
|
|
299
292
|
theme = input(...(ngDevMode ? [undefined, { debugName: "theme" }] : /* istanbul ignore next */ []));
|
|
300
293
|
color = signal(null, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
@@ -310,8 +303,8 @@ class NgxMatBaseColorCanvas {
|
|
|
310
303
|
y = 0;
|
|
311
304
|
drag = false;
|
|
312
305
|
_destroyed = new Subject();
|
|
313
|
-
|
|
314
|
-
|
|
306
|
+
zone = null;
|
|
307
|
+
constructor(elementId) {
|
|
315
308
|
this.elementId = elementId;
|
|
316
309
|
}
|
|
317
310
|
ngOnDestroy() {
|
|
@@ -336,18 +329,18 @@ class NgxMatBaseColorCanvas {
|
|
|
336
329
|
onMousedown(e) {
|
|
337
330
|
this.drag = true;
|
|
338
331
|
this.changeColor(e);
|
|
339
|
-
this.zone
|
|
332
|
+
this.zone?.runOutsideAngular(() => {
|
|
340
333
|
this.canvas?.addEventListener('mousemove', this.onMousemove.bind(this));
|
|
341
334
|
});
|
|
342
335
|
}
|
|
343
336
|
onMousemove(e) {
|
|
344
337
|
if (this.drag) {
|
|
345
|
-
this.zone
|
|
338
|
+
this.zone?.run(() => {
|
|
346
339
|
this.changeColor(e);
|
|
347
340
|
});
|
|
348
341
|
}
|
|
349
342
|
}
|
|
350
|
-
onMouseup(
|
|
343
|
+
onMouseup(_) {
|
|
351
344
|
this.drag = false;
|
|
352
345
|
this.canvas?.removeEventListener('mousemove', this.onMousemove);
|
|
353
346
|
}
|
|
@@ -359,7 +352,7 @@ class NgxMatBaseColorCanvas {
|
|
|
359
352
|
}
|
|
360
353
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: NgxMatBaseColorCanvas, decorators: [{
|
|
361
354
|
type: Directive
|
|
362
|
-
}], ctorParameters: () => [{ type:
|
|
355
|
+
}], ctorParameters: () => [{ type: undefined }], propDecorators: { colorChanged: [{ type: i0.Output, args: ["colorChanged"] }], theme: [{ type: i0.Input, args: [{ isSignal: true, alias: "theme", required: false }] }], setColor: [{
|
|
363
356
|
type: Input,
|
|
364
357
|
args: [{
|
|
365
358
|
alias: 'color',
|
|
@@ -367,10 +360,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImpor
|
|
|
367
360
|
}] } });
|
|
368
361
|
|
|
369
362
|
class NgxMatColorSliderComponent extends NgxMatBaseColorCanvas {
|
|
370
|
-
zone;
|
|
371
|
-
constructor(
|
|
372
|
-
super(
|
|
373
|
-
this.zone = zone;
|
|
363
|
+
zone = inject(NgZone);
|
|
364
|
+
constructor() {
|
|
365
|
+
super('color-strip');
|
|
374
366
|
}
|
|
375
367
|
ngAfterViewInit() {
|
|
376
368
|
super.ngAfterViewInit();
|
|
@@ -402,17 +394,16 @@ class NgxMatColorSliderComponent extends NgxMatBaseColorCanvas {
|
|
|
402
394
|
const { r, g, b } = getColorAtPosition(this.ctx, e.offsetX, e.offsetY);
|
|
403
395
|
this.emitChange(new Color(r, g, b));
|
|
404
396
|
}
|
|
405
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: NgxMatColorSliderComponent, deps: [
|
|
397
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: NgxMatColorSliderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
406
398
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.6", type: NgxMatColorSliderComponent, isStandalone: true, selector: "ngx-mat-color-slider", usesInheritance: true, ngImport: i0, template: "<canvas\n id=\"color-strip\"\n class=\"zone-strip\"\n (mousedown)=\"onMousedown($event)\"\n (mouseup)=\"onMouseup($event)\"\n width=\"15\"\n height=\"234\"\n></canvas>\n", styles: [""] });
|
|
407
399
|
}
|
|
408
400
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: NgxMatColorSliderComponent, decorators: [{
|
|
409
401
|
type: Component,
|
|
410
402
|
args: [{ selector: 'ngx-mat-color-slider', template: "<canvas\n id=\"color-strip\"\n class=\"zone-strip\"\n (mousedown)=\"onMousedown($event)\"\n (mouseup)=\"onMouseup($event)\"\n width=\"15\"\n height=\"234\"\n></canvas>\n" }]
|
|
411
|
-
}], ctorParameters: () => [
|
|
403
|
+
}], ctorParameters: () => [] });
|
|
412
404
|
|
|
413
405
|
const RADIUS_NOB = 5;
|
|
414
406
|
class NgxMatColorCanvasComponent extends NgxMatBaseColorCanvas {
|
|
415
|
-
zone;
|
|
416
407
|
_baseColor = null;
|
|
417
408
|
get rCtrl() {
|
|
418
409
|
return this.formGroup.get('r');
|
|
@@ -432,9 +423,9 @@ class NgxMatColorCanvasComponent extends NgxMatBaseColorCanvas {
|
|
|
432
423
|
_resetBaseColor = true;
|
|
433
424
|
formGroup;
|
|
434
425
|
rgba = "";
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
426
|
+
zone = inject(NgZone);
|
|
427
|
+
constructor() {
|
|
428
|
+
super('color-block');
|
|
438
429
|
this.formGroup = new FormGroup({
|
|
439
430
|
r: new FormControl(null, [Validators.required]),
|
|
440
431
|
g: new FormControl(null, [Validators.required]),
|
|
@@ -516,7 +507,7 @@ class NgxMatColorCanvasComponent extends NgxMatBaseColorCanvas {
|
|
|
516
507
|
const { r, g, b } = getColorAtPosition(this.ctx, e.offsetX, e.offsetY);
|
|
517
508
|
this.emitChange(new Color(r, g, b));
|
|
518
509
|
}
|
|
519
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: NgxMatColorCanvasComponent, deps: [
|
|
510
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: NgxMatColorCanvasComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
520
511
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.6", type: NgxMatColorCanvasComponent, isStandalone: true, selector: "ngx-mat-color-canvas", host: { classAttribute: "ngx-mat-color-canvas" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<form [formGroup]=\"formGroup\">\n <div class=\"color-canvas-row\">\n <div class=\"zone-canvas\">\n <canvas\n id=\"color-block\"\n class=\"zone-block\"\n (mousedown)=\"onMousedown($event)\"\n (mouseup)=\"onMouseup($event)\"\n width=\"200\"\n height=\"235\"\n ></canvas>\n <ngx-mat-color-slider (colorChanged)=\"onSliderColorChanged($event)\" />\n </div>\n\n <div class=\"zone-inputs\">\n <mat-form-field [color]=\"theme()\">\n <mat-label>R</mat-label>\n <input\n matInput\n formControlName=\"r\"\n ngxMatNumericColorInput\n autocomplete=\"off\"\n />\n </mat-form-field>\n\n <mat-form-field [color]=\"theme()\">\n <mat-label>G</mat-label>\n <input\n matInput\n formControlName=\"g\"\n ngxMatNumericColorInput\n autocomplete=\"off\"\n />\n </mat-form-field>\n\n <mat-form-field [color]=\"theme()\">\n <mat-label>B</mat-label>\n <input\n matInput\n formControlName=\"b\"\n ngxMatNumericColorInput\n autocomplete=\"off\"\n />\n </mat-form-field>\n </div>\n </div>\n\n <div class=\"color-canvas-row\">\n <button\n mat-mini-fab\n [style.background-color]=\"color()?.rgba || 'transparent'\"\n class=\"preview\"\n ></button>\n <mat-form-field [color]=\"theme()\">\n <mat-label>HEX6</mat-label>\n <mat-label matPrefix class=\"symbol\"># </mat-label>\n <input matInput formControlName=\"hex\" autocomplete=\"off\" />\n </mat-form-field>\n <mat-form-field class=\"input-opacity\" [color]=\"theme()\">\n <mat-label>A</mat-label>\n <input\n matInput\n formControlName=\"a\"\n type=\"number\"\n min=\"0\"\n max=\"1\"\n step=\"0.1\"\n autocomplete=\"off\"\n />\n </mat-form-field>\n </div>\n</form>\n", styles: [".ngx-mat-color-canvas .color-canvas-row{display:flex}.ngx-mat-color-canvas .color-canvas-row:first-of-type{height:235px;margin-bottom:12px}.ngx-mat-color-canvas .color-canvas-row:first-of-type .card{height:180px}.ngx-mat-color-canvas .color-canvas-row canvas:hover{cursor:crosshair}.ngx-mat-color-canvas .color-canvas-row .zone{display:flex}.ngx-mat-color-canvas .color-canvas-row .zone-canvas{height:235px}.ngx-mat-color-canvas .color-canvas-row .zone-canvas .zone-block{border:1px solid rgba(0,0,0,.12)}.ngx-mat-color-canvas .color-canvas-row .zone-strip{flex-basis:auto;margin-left:10px}.ngx-mat-color-canvas .color-canvas-row .zone-inputs{display:flex;width:60px;height:235px;flex-direction:column;margin-left:16px;margin-top:12px}.ngx-mat-color-canvas .color-canvas-row:nth-of-type(2){display:flex}.ngx-mat-color-canvas .color-canvas-row:nth-of-type(2) .preview{min-width:40px;min-height:40px;height:40px;width:40px;margin-top:12px}.ngx-mat-color-canvas .color-canvas-row:nth-of-type(2) .mat-mdc-form-field{margin-left:16px}.ngx-mat-color-canvas .color-canvas-row:nth-of-type(2) .mat-mdc-form-field:first-of-type{width:170px}.ngx-mat-color-canvas .color-canvas-row:nth-of-type(2) .mat-mdc-form-field:first-of-type .symbol{font-weight:700;color:#0000008a}.ngx-mat-color-canvas .color-canvas-row:nth-of-type(2) .mat-mdc-form-field:last-of-type{width:60px}.ngx-mat-color-canvas .color-canvas-row:nth-of-type(2) .mat-mdc-form-field:last-of-type .mat-mdc-text-field-wrapper{padding:0 8px}.ngx-mat-color-canvas .mat-mdc-form-field-label{font-weight:700}.ngx-mat-color-canvas .mat-mdc-form-field .mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:transparent}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: NgxMatColorSliderComponent, selector: "ngx-mat-color-slider" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i3.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
521
512
|
}
|
|
522
513
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: NgxMatColorCanvasComponent, decorators: [{
|
|
@@ -524,7 +515,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImpor
|
|
|
524
515
|
args: [{ selector: 'ngx-mat-color-canvas', encapsulation: ViewEncapsulation.None, host: {
|
|
525
516
|
class: 'ngx-mat-color-canvas',
|
|
526
517
|
}, imports: [MatFormFieldModule, MatInputModule, NgxMatColorSliderComponent, ReactiveFormsModule], template: "<form [formGroup]=\"formGroup\">\n <div class=\"color-canvas-row\">\n <div class=\"zone-canvas\">\n <canvas\n id=\"color-block\"\n class=\"zone-block\"\n (mousedown)=\"onMousedown($event)\"\n (mouseup)=\"onMouseup($event)\"\n width=\"200\"\n height=\"235\"\n ></canvas>\n <ngx-mat-color-slider (colorChanged)=\"onSliderColorChanged($event)\" />\n </div>\n\n <div class=\"zone-inputs\">\n <mat-form-field [color]=\"theme()\">\n <mat-label>R</mat-label>\n <input\n matInput\n formControlName=\"r\"\n ngxMatNumericColorInput\n autocomplete=\"off\"\n />\n </mat-form-field>\n\n <mat-form-field [color]=\"theme()\">\n <mat-label>G</mat-label>\n <input\n matInput\n formControlName=\"g\"\n ngxMatNumericColorInput\n autocomplete=\"off\"\n />\n </mat-form-field>\n\n <mat-form-field [color]=\"theme()\">\n <mat-label>B</mat-label>\n <input\n matInput\n formControlName=\"b\"\n ngxMatNumericColorInput\n autocomplete=\"off\"\n />\n </mat-form-field>\n </div>\n </div>\n\n <div class=\"color-canvas-row\">\n <button\n mat-mini-fab\n [style.background-color]=\"color()?.rgba || 'transparent'\"\n class=\"preview\"\n ></button>\n <mat-form-field [color]=\"theme()\">\n <mat-label>HEX6</mat-label>\n <mat-label matPrefix class=\"symbol\"># </mat-label>\n <input matInput formControlName=\"hex\" autocomplete=\"off\" />\n </mat-form-field>\n <mat-form-field class=\"input-opacity\" [color]=\"theme()\">\n <mat-label>A</mat-label>\n <input\n matInput\n formControlName=\"a\"\n type=\"number\"\n min=\"0\"\n max=\"1\"\n step=\"0.1\"\n autocomplete=\"off\"\n />\n </mat-form-field>\n </div>\n</form>\n", styles: [".ngx-mat-color-canvas .color-canvas-row{display:flex}.ngx-mat-color-canvas .color-canvas-row:first-of-type{height:235px;margin-bottom:12px}.ngx-mat-color-canvas .color-canvas-row:first-of-type .card{height:180px}.ngx-mat-color-canvas .color-canvas-row canvas:hover{cursor:crosshair}.ngx-mat-color-canvas .color-canvas-row .zone{display:flex}.ngx-mat-color-canvas .color-canvas-row .zone-canvas{height:235px}.ngx-mat-color-canvas .color-canvas-row .zone-canvas .zone-block{border:1px solid rgba(0,0,0,.12)}.ngx-mat-color-canvas .color-canvas-row .zone-strip{flex-basis:auto;margin-left:10px}.ngx-mat-color-canvas .color-canvas-row .zone-inputs{display:flex;width:60px;height:235px;flex-direction:column;margin-left:16px;margin-top:12px}.ngx-mat-color-canvas .color-canvas-row:nth-of-type(2){display:flex}.ngx-mat-color-canvas .color-canvas-row:nth-of-type(2) .preview{min-width:40px;min-height:40px;height:40px;width:40px;margin-top:12px}.ngx-mat-color-canvas .color-canvas-row:nth-of-type(2) .mat-mdc-form-field{margin-left:16px}.ngx-mat-color-canvas .color-canvas-row:nth-of-type(2) .mat-mdc-form-field:first-of-type{width:170px}.ngx-mat-color-canvas .color-canvas-row:nth-of-type(2) .mat-mdc-form-field:first-of-type .symbol{font-weight:700;color:#0000008a}.ngx-mat-color-canvas .color-canvas-row:nth-of-type(2) .mat-mdc-form-field:last-of-type{width:60px}.ngx-mat-color-canvas .color-canvas-row:nth-of-type(2) .mat-mdc-form-field:last-of-type .mat-mdc-text-field-wrapper{padding:0 8px}.ngx-mat-color-canvas .mat-mdc-form-field-label{font-weight:700}.ngx-mat-color-canvas .mat-mdc-form-field .mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:transparent}\n"] }]
|
|
527
|
-
}], ctorParameters: () => [
|
|
518
|
+
}], ctorParameters: () => [] });
|
|
528
519
|
|
|
529
520
|
class NgxMatColorCollectionComponent {
|
|
530
521
|
colorChanged = output();
|
|
@@ -538,7 +529,7 @@ class NgxMatColorCollectionComponent {
|
|
|
538
529
|
colors2 = BASIC_COLORS.slice(8, 16);
|
|
539
530
|
select(hex) {
|
|
540
531
|
this.selectedColor.set(hex);
|
|
541
|
-
|
|
532
|
+
const rgba = stringInputToObject(hex);
|
|
542
533
|
if (rgba != null) {
|
|
543
534
|
this.colorChanged.emit(new Color(rgba.r, rgba.g, rgba.b, rgba.a));
|
|
544
535
|
}
|
|
@@ -654,8 +645,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImpor
|
|
|
654
645
|
class: 'ngx-mat-colorpicker-content',
|
|
655
646
|
'[class.ngx-mat-colorpicker-content-touch]': 'picker?.touchUi',
|
|
656
647
|
'(animationend)': '_onAnimationEnd($event)',
|
|
657
|
-
}, exportAs: 'ngxMatColorPickerContent', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush,
|
|
658
|
-
}], propDecorators: { _palette: [{ type: i0.ViewChild, args: [i0.forwardRef(() => NgxMatColorPaletteComponent), { isSignal: true }] }],
|
|
648
|
+
}, exportAs: 'ngxMatColorPickerContent', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgxMatColorPaletteComponent], template: "<ngx-mat-color-palette\n (colorChanged)=\"picker?.select($event)\"\n [color]=\"picker!._selected\"\n [theme]=\"color\"></ngx-mat-color-palette>\n", styles: ["@keyframes panelDropdownEnter{0%{opacity:0;transform:scaleY(.8)}to{opacity:1;transform:scale(1)}}@keyframes panelDialogEnter{0%{opacity:0;transform:scale(.7)}to{opacity:1;transform:none}}@keyframes panelLeave{0%{opacity:1}to{opacity:0}}.panel-enter-dropdown{animation:panelDropdownEnter .12s cubic-bezier(0,0,.2,1)}.panel-enter-dialog{animation:panelDialogEnter .15s cubic-bezier(0,0,.2,1)}.panel-leave{animation:panelLeave .1s linear forwards;pointer-events:none}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.calendar-fade-enter{animation:fadeIn .12s .1s cubic-bezier(.55,0,.55,.2) forwards}\n", ".ngx-mat-colorpicker-content{display:block;border-radius:4px;box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f;background-color:#fff;color:#000000de;padding:16px}.ngx-mat-colorpicker-content .ngx-mat-color-palette{width:296px;height:354px}.ngx-mat-colorpicker-content-touch{display:block;max-height:80vh;overflow:auto}.ngx-mat-colorpicker-content-touch .ngx-mat-color-palette{min-width:250px;min-height:312px;max-width:750px;max-height:788px}@media all and (orientation:landscape){.mat-colorpicker-content-touch .ngx-mat-color-palette{width:64vh;height:80vh}}@media all and (orientation:portrait){.mat-colorpicker-content-touch .ngx-mat-color-palette{width:80vw;height:100vw}}\n"] }]
|
|
649
|
+
}], propDecorators: { _palette: [{ type: i0.ViewChild, args: [i0.forwardRef(() => NgxMatColorPaletteComponent), { isSignal: true }] }], color: [{
|
|
650
|
+
type: Input
|
|
651
|
+
}], _animationDone: [{
|
|
659
652
|
type: Output
|
|
660
653
|
}], isEnterDropdown: [{
|
|
661
654
|
type: HostBinding,
|
|
@@ -668,15 +661,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImpor
|
|
|
668
661
|
args: ['class.panel-leave']
|
|
669
662
|
}] } });
|
|
670
663
|
class NgxMatColorPickerComponent {
|
|
671
|
-
_dialog;
|
|
672
|
-
_overlay;
|
|
673
|
-
_zone;
|
|
674
|
-
_adapter;
|
|
675
|
-
_dir;
|
|
676
|
-
_document;
|
|
677
|
-
_viewContainerRef;
|
|
678
664
|
id = `ngx-mat-color-picker-${Math.floor(Math.random() * 1000000)}`;
|
|
679
|
-
_scrollStrategy;
|
|
680
665
|
/** Emits when the datepicker has been opened. */
|
|
681
666
|
openedStream = new EventEmitter();
|
|
682
667
|
/** Emits when the datepicker has been closed. */
|
|
@@ -706,7 +691,10 @@ class NgxMatColorPickerComponent {
|
|
|
706
691
|
return this._opened;
|
|
707
692
|
}
|
|
708
693
|
set opened(value) {
|
|
709
|
-
|
|
694
|
+
if (value)
|
|
695
|
+
this.open();
|
|
696
|
+
else
|
|
697
|
+
this.close();
|
|
710
698
|
}
|
|
711
699
|
_opened = false;
|
|
712
700
|
/** Default Color palette to use on the datepicker's calendar. */
|
|
@@ -761,16 +749,14 @@ class NgxMatColorPickerComponent {
|
|
|
761
749
|
_selectedChanged = new Subject();
|
|
762
750
|
/** Whether an animation is currently in progress. */
|
|
763
751
|
_isAnimating = false;
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
this._scrollStrategy = scrollStrategy;
|
|
773
|
-
}
|
|
752
|
+
_dialog = inject(MatDialog);
|
|
753
|
+
_overlay = inject(Overlay);
|
|
754
|
+
_zone = inject(NgZone);
|
|
755
|
+
_adapter = inject(ColorAdapter);
|
|
756
|
+
_dir = inject(Directionality, { optional: true });
|
|
757
|
+
_scrollStrategy = inject(NGX_MAT_COLOR_PICKER_SCROLL_STRATEGY);
|
|
758
|
+
_document = inject(DOCUMENT, { optional: true });
|
|
759
|
+
_viewContainerRef = inject(ViewContainerRef);
|
|
774
760
|
ngOnDestroy() {
|
|
775
761
|
this.close();
|
|
776
762
|
this._inputSubscription.unsubscribe();
|
|
@@ -782,7 +768,7 @@ class NgxMatColorPickerComponent {
|
|
|
782
768
|
}
|
|
783
769
|
/** Selects the given date */
|
|
784
770
|
select(nextVal) {
|
|
785
|
-
|
|
771
|
+
const oldValue = this._selected;
|
|
786
772
|
this._selected = nextVal;
|
|
787
773
|
if (!this._adapter.sameColor(oldValue, this._selected)) {
|
|
788
774
|
this._selectedChanged.next(nextVal);
|
|
@@ -809,7 +795,10 @@ class NgxMatColorPickerComponent {
|
|
|
809
795
|
if (this._document) {
|
|
810
796
|
this._focusedElementBeforeOpen = this._document.activeElement;
|
|
811
797
|
}
|
|
812
|
-
|
|
798
|
+
if (this.touchUi)
|
|
799
|
+
this._openAsDialog();
|
|
800
|
+
else
|
|
801
|
+
this._openAsPopup();
|
|
813
802
|
this._opened = true;
|
|
814
803
|
this.openedStream.emit();
|
|
815
804
|
}
|
|
@@ -864,7 +853,7 @@ class NgxMatColorPickerComponent {
|
|
|
864
853
|
positionStrategy: this._createPopupPositionStrategy(),
|
|
865
854
|
hasBackdrop: true,
|
|
866
855
|
backdropClass: 'mat-overlay-transparent-backdrop',
|
|
867
|
-
direction: this._dir,
|
|
856
|
+
direction: this._dir ?? "ltr",
|
|
868
857
|
scrollStrategy: this._scrollStrategy(),
|
|
869
858
|
panelClass: 'mat-colorpicker-popup',
|
|
870
859
|
});
|
|
@@ -984,7 +973,7 @@ class NgxMatColorPickerComponent {
|
|
|
984
973
|
},
|
|
985
974
|
]);
|
|
986
975
|
}
|
|
987
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: NgxMatColorPickerComponent, deps: [
|
|
976
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: NgxMatColorPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
988
977
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.6", type: NgxMatColorPickerComponent, isStandalone: true, selector: "ngx-mat-color-picker", inputs: { id: "id", disabled: "disabled", touchUi: "touchUi", opened: "opened", defaultColor: "defaultColor", color: "color" }, outputs: { openedStream: "opened", closedStream: "closed" }, host: { properties: { "class.mat-primary": "this.isPrimary", "class.mat-accent": "this.isAccent", "class.mat-warn": "this.isWarn" } }, providers: [ColorAdapter, NGX_MAT_COLOR_PICKER_SCROLL_STRATEGY_FACTORY_PROVIDER], exportAs: ["ngxMatColorPicker"], ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
989
978
|
}
|
|
990
979
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: NgxMatColorPickerComponent, decorators: [{
|
|
@@ -997,17 +986,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImpor
|
|
|
997
986
|
encapsulation: ViewEncapsulation.None,
|
|
998
987
|
providers: [ColorAdapter, NGX_MAT_COLOR_PICKER_SCROLL_STRATEGY_FACTORY_PROVIDER],
|
|
999
988
|
}]
|
|
1000
|
-
}],
|
|
1001
|
-
type: Optional
|
|
1002
|
-
}] }, { type: undefined, decorators: [{
|
|
1003
|
-
type: Inject,
|
|
1004
|
-
args: [NGX_MAT_COLOR_PICKER_SCROLL_STRATEGY]
|
|
1005
|
-
}] }, { type: undefined, decorators: [{
|
|
1006
|
-
type: Optional
|
|
1007
|
-
}, {
|
|
1008
|
-
type: Inject,
|
|
1009
|
-
args: [DOCUMENT]
|
|
1010
|
-
}] }, { type: i0.ViewContainerRef }], propDecorators: { id: [{
|
|
989
|
+
}], propDecorators: { id: [{
|
|
1011
990
|
type: Input
|
|
1012
991
|
}], openedStream: [{
|
|
1013
992
|
type: Output,
|
|
@@ -1062,10 +1041,6 @@ const MAT_COLORPICKER_VALIDATORS = {
|
|
|
1062
1041
|
multi: true,
|
|
1063
1042
|
};
|
|
1064
1043
|
class NgxMatColorPickerInput {
|
|
1065
|
-
_elementRef;
|
|
1066
|
-
_formField;
|
|
1067
|
-
_colorFormats;
|
|
1068
|
-
_adapter;
|
|
1069
1044
|
set ngxMatColorPicker(value) {
|
|
1070
1045
|
if (!value) {
|
|
1071
1046
|
return;
|
|
@@ -1123,19 +1098,25 @@ class NgxMatColorPickerInput {
|
|
|
1123
1098
|
_disabledChange = new EventEmitter();
|
|
1124
1099
|
/** Emits when the value changes (either due to user input or programmatic change). */
|
|
1125
1100
|
_valueChange = new EventEmitter();
|
|
1126
|
-
_onTouched = () => {
|
|
1127
|
-
|
|
1128
|
-
|
|
1101
|
+
_onTouched = () => {
|
|
1102
|
+
// Intentionally empty.
|
|
1103
|
+
};
|
|
1104
|
+
_cvaOnChange = () => {
|
|
1105
|
+
// Intentionally empty.
|
|
1106
|
+
};
|
|
1107
|
+
_validatorOnChange = () => {
|
|
1108
|
+
// Intentionally empty.
|
|
1109
|
+
};
|
|
1129
1110
|
_pickerSubscription = Subscription.EMPTY;
|
|
1130
1111
|
/** The combined form control validator for this input. */
|
|
1131
1112
|
_validator = Validators.compose([]);
|
|
1132
1113
|
/** Whether the last value set on the input was valid. */
|
|
1133
1114
|
_lastValueValid = false;
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1115
|
+
_elementRef = inject((ElementRef));
|
|
1116
|
+
_formField = inject(MatFormField, { optional: true });
|
|
1117
|
+
_colorFormats = inject(MAT_COLOR_FORMATS, { optional: true });
|
|
1118
|
+
_adapter = inject(ColorAdapter);
|
|
1119
|
+
constructor() {
|
|
1139
1120
|
if (!this._colorFormats) {
|
|
1140
1121
|
throw createMissingDateImplError('MAT_COLOR_FORMATS');
|
|
1141
1122
|
}
|
|
@@ -1164,7 +1145,6 @@ class NgxMatColorPickerInput {
|
|
|
1164
1145
|
getConnectedOverlayOrigin() {
|
|
1165
1146
|
return this._formField ? this._formField.getConnectedOverlayOrigin() : this._elementRef;
|
|
1166
1147
|
}
|
|
1167
|
-
ngOnInit() { }
|
|
1168
1148
|
ngOnDestroy() {
|
|
1169
1149
|
this._pickerSubscription.unsubscribe();
|
|
1170
1150
|
this._valueChange.complete();
|
|
@@ -1206,7 +1186,7 @@ class NgxMatColorPickerInput {
|
|
|
1206
1186
|
}
|
|
1207
1187
|
/** Formats a value and sets it on the input element. */
|
|
1208
1188
|
_formatValue(value) {
|
|
1209
|
-
this._elementRef.nativeElement.value = value
|
|
1189
|
+
this._elementRef.nativeElement.value = this._colorFormats && value
|
|
1210
1190
|
? this._adapter.format(value, this._colorFormats.display.colorInput)
|
|
1211
1191
|
: '';
|
|
1212
1192
|
}
|
|
@@ -1224,7 +1204,7 @@ class NgxMatColorPickerInput {
|
|
|
1224
1204
|
this._validatorOnChange();
|
|
1225
1205
|
}
|
|
1226
1206
|
}
|
|
1227
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: NgxMatColorPickerInput, deps: [
|
|
1207
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: NgxMatColorPickerInput, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1228
1208
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.6", type: NgxMatColorPickerInput, isStandalone: true, selector: "input[ngxMatColorPicker]", inputs: { ngxMatColorPicker: "ngxMatColorPicker", disabled: "disabled", value: "value" }, outputs: { colorChange: "colorChange", colorInput: "colorInput" }, host: { listeners: { "input": "_onInput($event)", "change": "_onChange()", "blur": "_onBlur()", "keydown": "_onKeydown($event)" }, properties: { "attr.aria-haspopup": "_picker ? \"dialog\" : null", "attr.aria-owns": "(_picker?.opened && _picker?.id) || null", "disabled": "disabled" } }, providers: [
|
|
1229
1209
|
{ provide: MAT_INPUT_VALUE_ACCESSOR, useExisting: NgxMatColorPickerInput },
|
|
1230
1210
|
ColorAdapter,
|
|
@@ -1253,14 +1233,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImpor
|
|
|
1253
1233
|
},
|
|
1254
1234
|
exportAs: 'ngxMatColorPickerInput',
|
|
1255
1235
|
}]
|
|
1256
|
-
}], ctorParameters: () => [
|
|
1257
|
-
type: Optional
|
|
1258
|
-
}] }, { type: undefined, decorators: [{
|
|
1259
|
-
type: Optional
|
|
1260
|
-
}, {
|
|
1261
|
-
type: Inject,
|
|
1262
|
-
args: [MAT_COLOR_FORMATS]
|
|
1263
|
-
}] }, { type: ColorAdapter }], propDecorators: { ngxMatColorPicker: [{
|
|
1236
|
+
}], ctorParameters: () => [], propDecorators: { ngxMatColorPicker: [{
|
|
1264
1237
|
type: Input
|
|
1265
1238
|
}], disabled: [{
|
|
1266
1239
|
type: Input
|
|
@@ -1279,7 +1252,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImpor
|
|
|
1279
1252
|
}]
|
|
1280
1253
|
}] });
|
|
1281
1254
|
class NgxMatColorToggleComponent {
|
|
1282
|
-
_cd;
|
|
1283
1255
|
_stateChanges = Subscription.EMPTY;
|
|
1284
1256
|
picker = input(undefined, { ...(ngDevMode ? { debugName: "picker" } : /* istanbul ignore next */ {}), alias: 'for' });
|
|
1285
1257
|
tabIndex = input(...(ngDevMode ? [undefined, { debugName: "tabIndex" }] : /* istanbul ignore next */ []));
|
|
@@ -1296,8 +1268,8 @@ class NgxMatColorToggleComponent {
|
|
|
1296
1268
|
/** Whether ripples on the toggle should be disabled. */
|
|
1297
1269
|
disableRipple = input(...(ngDevMode ? [undefined, { debugName: "disableRipple" }] : /* istanbul ignore next */ []));
|
|
1298
1270
|
_button = viewChild('button', ...(ngDevMode ? [{ debugName: "_button" }] : /* istanbul ignore next */ []));
|
|
1299
|
-
|
|
1300
|
-
|
|
1271
|
+
_cd = inject(ChangeDetectorRef);
|
|
1272
|
+
constructor() {
|
|
1301
1273
|
effect(() => {
|
|
1302
1274
|
this.picker();
|
|
1303
1275
|
untracked(() => this._watchStateChanges());
|
|
@@ -1324,8 +1296,8 @@ class NgxMatColorToggleComponent {
|
|
|
1324
1296
|
this._stateChanges.unsubscribe();
|
|
1325
1297
|
this._stateChanges = merge(disabled$, inputDisabled$, pickerToggled$).subscribe(() => this._cd.markForCheck());
|
|
1326
1298
|
}
|
|
1327
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: NgxMatColorToggleComponent, deps: [
|
|
1328
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.6", type: NgxMatColorToggleComponent, isStandalone: true, selector: "ngx-mat-color-toggle", inputs: { picker: { classPropertyName: "picker", publicName: "for", isSignal: true, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, disableRipple: { classPropertyName: "disableRipple", publicName: "disableRipple", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "focus": "_button()?.focus()" }, properties: { "attr.tabindex": "-1", "class.ngx-mat-color-toggle-active": "picker()?.opened", "class.mat-accent": "picker()?.color === \"accent\"", "class.mat-warn": "picker()?.color === \"warn\"" }, classAttribute: "ngx-mat-color-toggle" }, viewQueries: [{ propertyName: "_button", first: true, predicate: ["button"], descendants: true, isSignal: true }], exportAs: ["ngxMatColorPickerToggle"], ngImport: i0, template: "<button\n #button\n mat-icon-button\n type=\"button\"\n [attr.aria-haspopup]=\"picker() ? 'dialog' : null\"\n [attr.tabindex]=\"disabled ? -1 : tabIndex()\"\n [disabled]=\"disabled\"\n (click)=\"open($event)\"\n [disableRipple]=\"disableRipple()\"\n>\n <ng-content select=\"[ngxMatColorpickerToggleIcon]\">\n <mat-icon [style.color]=\"picker()?._selected?.rgba\">palette</mat-icon>\n </ng-content>\n</button>\n", styles: [".mat-form-field-appearance .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field-appearance .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .mat-icon-button .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .mat-icon-button .ngx-mat-color-toggle-default-icon{margin:auto}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$
|
|
1299
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: NgxMatColorToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1300
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.6", type: NgxMatColorToggleComponent, isStandalone: true, selector: "ngx-mat-color-toggle", inputs: { picker: { classPropertyName: "picker", publicName: "for", isSignal: true, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, disableRipple: { classPropertyName: "disableRipple", publicName: "disableRipple", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "focus": "_button()?.focus()" }, properties: { "attr.tabindex": "-1", "class.ngx-mat-color-toggle-active": "picker()?.opened", "class.mat-accent": "picker()?.color === \"accent\"", "class.mat-warn": "picker()?.color === \"warn\"" }, classAttribute: "ngx-mat-color-toggle" }, viewQueries: [{ propertyName: "_button", first: true, predicate: ["button"], descendants: true, isSignal: true }], exportAs: ["ngxMatColorPickerToggle"], ngImport: i0, template: "<button\n #button\n mat-icon-button\n type=\"button\"\n [attr.aria-haspopup]=\"picker() ? 'dialog' : null\"\n [attr.tabindex]=\"disabled ? -1 : tabIndex()\"\n [disabled]=\"disabled\"\n (click)=\"open($event)\"\n [disableRipple]=\"disableRipple()\"\n>\n <ng-content select=\"[ngxMatColorpickerToggleIcon]\">\n <mat-icon [style.color]=\"picker()?._selected?.rgba\">palette</mat-icon>\n </ng-content>\n</button>\n", styles: [".mat-form-field-appearance .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field-appearance .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .mat-icon-button .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .mat-icon-button .ngx-mat-color-toggle-default-icon{margin:auto}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
1329
1301
|
}
|
|
1330
1302
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: NgxMatColorToggleComponent, decorators: [{
|
|
1331
1303
|
type: Component,
|
|
@@ -1339,7 +1311,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImpor
|
|
|
1339
1311
|
'[class.mat-warn]': 'picker()?.color === "warn"',
|
|
1340
1312
|
'(focus)': '_button()?.focus()',
|
|
1341
1313
|
}, exportAs: 'ngxMatColorPickerToggle', encapsulation: ViewEncapsulation.None, imports: [MatButtonModule, MatIconModule], template: "<button\n #button\n mat-icon-button\n type=\"button\"\n [attr.aria-haspopup]=\"picker() ? 'dialog' : null\"\n [attr.tabindex]=\"disabled ? -1 : tabIndex()\"\n [disabled]=\"disabled\"\n (click)=\"open($event)\"\n [disableRipple]=\"disableRipple()\"\n>\n <ng-content select=\"[ngxMatColorpickerToggleIcon]\">\n <mat-icon [style.color]=\"picker()?._selected?.rgba\">palette</mat-icon>\n </ng-content>\n</button>\n", styles: [".mat-form-field-appearance .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field-appearance .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .ngx-mat-color-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-prefix .mat-icon-button .ngx-mat-color-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance) .mat-form-field-suffix .mat-icon-button .ngx-mat-color-toggle-default-icon{margin:auto}\n"] }]
|
|
1342
|
-
}], ctorParameters: () => [
|
|
1314
|
+
}], ctorParameters: () => [], propDecorators: { picker: [{ type: i0.Input, args: [{ isSignal: true, alias: "for", required: false }] }], tabIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabIndex", required: false }] }], disabled: [{
|
|
1343
1315
|
type: Input
|
|
1344
1316
|
}], disableRipple: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableRipple", required: false }] }], _button: [{ type: i0.ViewChild, args: ['button', { isSignal: true }] }] } });
|
|
1345
1317
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-mce-color-picker.mjs","sources":["../../../projects/color-picker/src/lib/helpers/color-helpers.ts","../../../projects/color-picker/src/lib/models/color.model.ts","../../../projects/color-picker/src/lib/components/color-canvas/base-color-canvas.ts","../../../projects/color-picker/src/lib/components/color-canvas/color-slider/color-slider.component.ts","../../../projects/color-picker/src/lib/components/color-canvas/color-slider/color-slider.component.html","../../../projects/color-picker/src/lib/components/color-canvas/color-canvas.component.ts","../../../projects/color-picker/src/lib/components/color-canvas/color-canvas.component.html","../../../projects/color-picker/src/lib/components/color-collection/color-collection.component.ts","../../../projects/color-picker/src/lib/components/color-collection/color-collection.component.html","../../../projects/color-picker/src/lib/components/color-palette/color-palette.component.ts","../../../projects/color-picker/src/lib/components/color-palette/color-palette.component.html","../../../projects/color-picker/src/lib/services/color-adapter.ts","../../../projects/color-picker/src/lib/services/color-formats.ts","../../../projects/color-picker/src/lib/components/color-picker/color-picker.component.ts","../../../projects/color-picker/src/lib/components/color-picker/color-picker-content.component.html","../../../projects/color-picker/src/lib/components/color-picker/color-input.component.ts","../../../projects/color-picker/src/lib/components/color-toggle/color-toggle.component.ts","../../../projects/color-picker/src/lib/components/color-toggle/color-toggle.component.html","../../../projects/color-picker/src/lib/directives/numeric-color-input.directive.ts","../../../projects/color-picker/src/public-api.ts","../../../projects/color-picker/src/ngx-mce-color-picker.ts"],"sourcesContent":["const trimLeft = /^\\s+/;\nconst trimRight = /\\s+$/;\nconst tinyCounter = 0;\nconst mathRound = Math.round;\nconst mathMin = Math.min;\nconst mathMax = Math.max;\nconst mathRandom = Math.random;\n\nexport const NUMERIC_REGEX = /[^0-9]/g;\nexport const MAX_RGB = 255;\nexport const MIN_RGB = 0;\n\n/** List basic colors */\nexport const BASIC_COLORS = [\n '#ffffff',\n '#ffff00',\n '#ff00ff',\n '#ff0000',\n '#c0c0c0',\n '#808080',\n '#808000',\n '#800080',\n '#800000',\n '#00ffff',\n '#00ff00',\n '#008080',\n '#008000',\n '#0000ff',\n '#000080',\n '#000000',\n];\n\n/**\n * Get color at position\n * @param ctx\n * @param x\n * @param y\n */\nexport function getColorAtPosition(\n ctx: CanvasRenderingContext2D,\n x: number,\n y: number,\n): { r: number; g: number; b: number } {\n const imageData: Uint8ClampedArray = ctx.getImageData(x, y, 1, 1).data;\n return { r: imageData[0], g: imageData[1], b: imageData[2] };\n}\n\n// `rgbaToHex`\n// Converts an RGBA color plus alpha transparency to hex\n// Assumes r, g, b are contained in the set [0, 255] and\n// a in [0, 1]. Returns a 4 or 8 character rgba hex\nexport function rgbaToHex(\n r: number,\n g: number,\n b: number,\n a: number,\n allow4Char?: boolean,\n): string {\n var hex = [\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16)),\n pad2(convertDecimalToHex(a.toString(16))),\n ];\n\n // Return a 4 character hex if possible\n if (\n allow4Char &&\n hex[0].charAt(0) == hex[0].charAt(1) &&\n hex[1].charAt(0) == hex[1].charAt(1) &&\n hex[2].charAt(0) == hex[2].charAt(1) &&\n hex[3].charAt(0) == hex[3].charAt(1)\n ) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n\n return hex.join('');\n}\n\n// Force a hex value to have 2 characters\nexport function pad2(c: string): string {\n return c.length == 1 ? '0' + c : '' + c;\n}\n\n// Converts a decimal to a hex value\nexport function convertDecimalToHex(d: string) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}\n\n// Converts a hex value to a decimal\nfunction convertHexToDecimal(h: string) {\n return parseIntFromHex(h) / 255;\n}\n\n// Parse a base-16 hex value into a base-10 integer\nfunction parseIntFromHex(val: string) {\n return parseInt(val, 16);\n}\n\n// `rgbToHex`\n// Converts an RGB color to hex\n// Assumes r, g, and b are contained in the set [0, 255]\n// Returns a 3 or 6 character hex\nexport function rgbToHex(r: number, g: number, b: number, allow3Char?: boolean) {\n var hex = [\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16)),\n ];\n\n // Return a 3 character hex if possible\n if (\n allow3Char &&\n hex[0].charAt(0) == hex[0].charAt(1) &&\n hex[1].charAt(0) == hex[1].charAt(1) &&\n hex[2].charAt(0) == hex[2].charAt(1)\n ) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n }\n\n return hex.join('');\n}\n\n// Actual matching.\n// Parentheses and commas are optional, but not required.\n// Whitespace can take the place of commas or opening parent\nconst CSS_INTEGER = '[-\\\\+]?\\\\d+%?';\nconst CSS_NUMBER = '[-\\\\+]?\\\\d*\\\\.\\\\d+%?';\nconst CSS_UNIT = '(?:' + CSS_NUMBER + ')|(?:' + CSS_INTEGER + ')';\nconst PERMISSIVE_MATCH3 =\n '[\\\\s|\\\\(]+(' + CSS_UNIT + ')[,|\\\\s]+(' + CSS_UNIT + ')[,|\\\\s]+(' + CSS_UNIT + ')\\\\s*\\\\)?';\nconst PERMISSIVE_MATCH4 =\n '[\\\\s|\\\\(]+(' +\n CSS_UNIT +\n ')[,|\\\\s]+(' +\n CSS_UNIT +\n ')[,|\\\\s]+(' +\n CSS_UNIT +\n ')[,|\\\\s]+(' +\n CSS_UNIT +\n ')\\\\s*\\\\)?';\n\nexport const matchers = {\n CSS_UNIT: new RegExp(CSS_UNIT),\n rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),\n rgba: new RegExp('rgba' + PERMISSIVE_MATCH4),\n hsl: new RegExp('hsl' + PERMISSIVE_MATCH3),\n hsla: new RegExp('hsla' + PERMISSIVE_MATCH4),\n hsv: new RegExp('hsv' + PERMISSIVE_MATCH3),\n hsva: new RegExp('hsva' + PERMISSIVE_MATCH4),\n hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n};\n\n// `stringInputToObject`\n// Permissive string parsing. Take in a number of formats, and output an object\n// based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`\nexport function stringInputToObject(color: string): {\n r: number;\n g: number;\n b: number;\n a: number;\n} | null {\n color = color.replace(trimLeft, '').replace(trimRight, '').toLowerCase();\n\n // Try to match string input using regular expressions.\n // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]\n // Just return an object and let the conversion functions handle that.\n // This way the result will be the same whether the tinycolor is initialized with string or object.\n let match;\n let obj;\n if ((match = matchers.rgb.exec(color))) {\n return {\n r: parseFloat(match[1]),\n g: parseFloat(match[2]),\n b: parseFloat(match[3]),\n a: 1\n };\n }\n if ((match = matchers.rgba.exec(color))) {\n return {\n r: parseFloat(match[1]),\n g: parseFloat(match[2]),\n b: parseFloat(match[3]),\n a: parseFloat(match[4])\n };\n }\n\n if ((match = matchers.hex8.exec(color))) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n a: convertHexToDecimal(match[4]),\n };\n }\n if ((match = matchers.hex6.exec(color))) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n a: 1,\n };\n }\n if ((match = matchers.hex4.exec(color))) {\n return {\n r: parseIntFromHex(match[1] + '' + match[1]),\n g: parseIntFromHex(match[2] + '' + match[2]),\n b: parseIntFromHex(match[3] + '' + match[3]),\n a: convertHexToDecimal(match[4] + '' + match[4]),\n };\n }\n if ((match = matchers.hex3.exec(color))) {\n return {\n r: parseIntFromHex(match[1] + '' + match[1]),\n g: parseIntFromHex(match[2] + '' + match[2]),\n b: parseIntFromHex(match[3] + '' + match[3]),\n a: 1,\n };\n }\n\n return null;\n}\n\nexport function createMissingDateImplError(provider: string) {\n return Error(\n `NgxMatColorPicker: No provider found for ${provider}. You must define MAT_COLOR_FORMATS in your module`,\n );\n}\n","import { MAX_RGB, rgbaToHex, rgbToHex } from '../helpers';\nimport { ColorInputFormat } from './color-input-format';\n\nexport class Color {\n public r: number;\n public g: number;\n public b: number;\n public a: number;\n public roundA: number;\n\n public hex: string;\n public rgba: string;\n\n constructor(_r: number, _g: number, _b: number, _a?: number) {\n this.r = _r > MAX_RGB ? MAX_RGB : _r;\n this.g = _g > MAX_RGB ? MAX_RGB : _g;\n this.b = _b > MAX_RGB ? MAX_RGB : _b;\n if (_a != null) {\n this.a = _a > 1 ? 1 : _a;\n } else {\n this.a = 1;\n }\n this.roundA = Math.round(this.a);\n this.hex = rgbToHex(this.r, this.g, this.b);\n this.rgba = this.toRgba();\n }\n\n public toHex(allow3Char?: boolean): string {\n return rgbToHex(this.r, this.g, this.b, allow3Char);\n }\n\n public toRgba(): string {\n return `rgba(${this.r},${this.g},${this.b},${this.a})`;\n }\n\n public toHexString(allow3Char?: boolean): string {\n return '#' + this.toHex(allow3Char);\n }\n\n public toRgbString(): string {\n return this.a === 1\n ? 'rgb(' + Math.round(this.r) + ', ' + Math.round(this.g) + ', ' + Math.round(this.b) + ')'\n : 'rgba(' +\n Math.round(this.r) +\n ', ' +\n Math.round(this.g) +\n ', ' +\n Math.round(this.b) +\n ', ' +\n this.roundA +\n ')';\n }\n\n public toHex8(allow4Char?: boolean): string {\n return rgbaToHex(this.r, this.g, this.b, this.a, allow4Char);\n }\n\n public toHex8String(allow4Char?: boolean): string {\n return '#' + this.toHex8(allow4Char);\n }\n\n public toString(format: ColorInputFormat): string {\n let formatSet = !!format;\n\n let formattedString;\n let hasAlpha = this.a < 1 && this.a >= 0;\n let needsAlphaFormat =\n !formatSet &&\n hasAlpha &&\n (format === 'hex' ||\n format === 'hex6' ||\n format === 'hex3' ||\n format === 'hex4' ||\n format === 'hex8');\n\n if (needsAlphaFormat) {\n return this.toRgbString();\n }\n if (format === 'rgb') {\n formattedString = this.toRgbString();\n }\n if (format === 'hex' || format === 'hex6') {\n formattedString = this.toHexString();\n }\n if (format === 'hex3') {\n formattedString = this.toHexString(true);\n }\n if (format === 'hex4') {\n formattedString = this.toHex8String(true);\n }\n if (format === 'hex8') {\n formattedString = this.toHex8String();\n }\n\n return formattedString || this.toHexString();\n }\n}\n","import {\n AfterViewInit,\n Directive,\n Input,\n input,\n NgZone,\n OnDestroy,\n output,\n signal,\n} from '@angular/core';\nimport { ThemePalette } from '@angular/material/core';\nimport { Subject } from 'rxjs';\nimport { Color } from '../../models';\n\n@Directive()\nexport abstract class NgxMatBaseColorCanvas implements OnDestroy, AfterViewInit {\n readonly colorChanged = output<Color>();\n readonly theme = input<ThemePalette>();\n readonly color = signal<Color | undefined | null>(null);\n\n @Input({\n alias: 'color',\n })\n set setColor(color: Color | undefined | null) {\n this.color.set(color);\n }\n\n canvas: HTMLCanvasElement | null = null;\n\n elementId: string;\n\n ctx: CanvasRenderingContext2D | null = null;\n width: number = 0;\n height: number = 0;\n\n x: number = 0;\n y: number = 0;\n\n drag = false;\n\n protected _destroyed: Subject<void> = new Subject<void>();\n\n constructor(\n protected zone: NgZone,\n elementId: string,\n ) {\n this.elementId = elementId;\n }\n\n ngOnDestroy(): void {\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n ngAfterViewInit(): void {\n this.canvas = <HTMLCanvasElement>document.getElementById(this.elementId);\n this.ctx = this.canvas.getContext('2d');\n this.width = this.canvas.width;\n this.height = this.canvas.height;\n this.draw();\n }\n\n protected draw() {\n this.ctx?.clearRect(0, 0, this.width, this.height);\n this.ctx?.rect(0, 0, this.width, this.height);\n this.fillGradient();\n if (this.y != 0) {\n this.redrawIndicator(this.x, this.y);\n }\n }\n\n public onMousedown(e: MouseEvent) {\n this.drag = true;\n this.changeColor(e);\n\n this.zone.runOutsideAngular(() => {\n this.canvas?.addEventListener('mousemove', this.onMousemove.bind(this));\n });\n }\n\n public onMousemove(e: MouseEvent) {\n if (this.drag) {\n this.zone.run(() => {\n this.changeColor(e);\n });\n }\n }\n\n public onMouseup(e: MouseEvent) {\n this.drag = false;\n this.canvas?.removeEventListener('mousemove', this.onMousemove);\n }\n\n public emitChange(color: Color) {\n this.colorChanged.emit(color);\n }\n\n abstract changeColor(e: MouseEvent): void;\n abstract fillGradient(): void;\n abstract redrawIndicator(x: number, y: number): void;\n}\n","import { Component, NgZone } from '@angular/core';\nimport { getColorAtPosition } from '../../../helpers';\nimport { Color } from '../../../models';\nimport { NgxMatBaseColorCanvas } from '../base-color-canvas';\n\n@Component({\n selector: 'ngx-mat-color-slider',\n templateUrl: './color-slider.component.html',\n styleUrls: ['./color-slider.component.scss'],\n})\nexport class NgxMatColorSliderComponent extends NgxMatBaseColorCanvas {\n constructor(override zone: NgZone) {\n super(zone, 'color-strip');\n }\n\n override ngAfterViewInit(): void {\n super.ngAfterViewInit();\n }\n\n public fillGradient() {\n const grd = this.ctx?.createLinearGradient(0, 0, 0, this.height);\n grd?.addColorStop(0, 'rgba(255, 0, 0, 1)');\n grd?.addColorStop(0.17, 'rgba(255, 255, 0, 1)');\n grd?.addColorStop(0.34, 'rgba(0, 255, 0, 1)');\n grd?.addColorStop(0.51, 'rgba(0, 255, 255, 1)');\n grd?.addColorStop(0.68, 'rgba(0, 0, 255, 1)');\n grd?.addColorStop(0.85, 'rgba(255, 0, 255, 1)');\n grd?.addColorStop(1, 'rgba(255, 0, 0, 1)');\n\n this.ctx!.fillStyle = grd!;\n this.ctx?.fill();\n }\n\n public redrawIndicator(x: number, y: number) {\n this.ctx?.beginPath();\n this.ctx!.strokeStyle = 'white';\n this.ctx!.lineWidth = 2;\n this.ctx?.arc(7.5, y, 7.5, 0, 2 * Math.PI, false);\n this.ctx?.stroke();\n this.ctx?.closePath();\n }\n\n public changeColor(e: MouseEvent) {\n this.x = e.offsetX;\n this.y = e.offsetY;\n this.draw();\n const { r, g, b } = getColorAtPosition(this.ctx!, e.offsetX, e.offsetY);\n this.emitChange(new Color(r, g, b));\n }\n}\n","<canvas\n id=\"color-strip\"\n class=\"zone-strip\"\n (mousedown)=\"onMousedown($event)\"\n (mouseup)=\"onMouseup($event)\"\n width=\"15\"\n height=\"234\"\n></canvas>\n","import {\n AfterViewInit,\n Component,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n SimpleChanges,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n AbstractControl,\n FormControl,\n FormGroup,\n ReactiveFormsModule,\n Validators,\n} from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { merge } from 'rxjs';\nimport { debounceTime, distinctUntilChanged, takeUntil } from 'rxjs/operators';\nimport { getColorAtPosition, matchers, stringInputToObject } from '../../helpers';\nimport { Color } from '../../models';\nimport { NgxMatBaseColorCanvas } from './base-color-canvas';\nimport { NgxMatColorSliderComponent } from './color-slider/color-slider.component';\n\nconst RADIUS_NOB = 5;\n\n@Component({\n selector: 'ngx-mat-color-canvas',\n templateUrl: './color-canvas.component.html',\n styleUrls: ['./color-canvas.component.scss'],\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'ngx-mat-color-canvas',\n },\n imports: [MatFormFieldModule, MatInputModule, NgxMatColorSliderComponent, ReactiveFormsModule],\n})\nexport class NgxMatColorCanvasComponent\n extends NgxMatBaseColorCanvas\n implements OnInit, AfterViewInit, OnChanges, OnDestroy\n{\n private _baseColor: Color | null = null;\n\n get rCtrl(): AbstractControl | null {\n return this.formGroup.get('r');\n }\n\n get gCtrl(): AbstractControl | null {\n return this.formGroup.get('g');\n }\n\n get bCtrl(): AbstractControl | null {\n return this.formGroup.get('b');\n }\n\n get aCtrl(): AbstractControl | null {\n return this.formGroup.get('a');\n }\n\n get hexCtrl(): AbstractControl | null {\n return this.formGroup.get('hex');\n }\n\n _resetBaseColor = true;\n\n formGroup: FormGroup;\n\n rgba: string = \"\";\n\n constructor(override zone: NgZone) {\n super(zone, 'color-block');\n this.formGroup = new FormGroup({\n r: new FormControl(null, [Validators.required]),\n g: new FormControl(null, [Validators.required]),\n b: new FormControl(null, [Validators.required]),\n a: new FormControl(null, [Validators.required]),\n hex: new FormControl(null, [Validators.required, Validators.pattern(matchers.hex6)]),\n });\n }\n\n ngOnInit() {\n const rgbaCtrl$ = merge(\n this.rCtrl!.valueChanges,\n this.gCtrl!.valueChanges,\n this.bCtrl!.valueChanges,\n this.aCtrl!.valueChanges,\n );\n rgbaCtrl$.pipe(takeUntil(this._destroyed), debounceTime(400)).subscribe((_) => {\n const color = new Color(\n Number(this.rCtrl!.value),\n Number(this.gCtrl!.value),\n Number(this.bCtrl!.value),\n Number(this.aCtrl!.value),\n );\n this.emitChange(color);\n });\n\n const hexCtrl$ = this.hexCtrl!.valueChanges;\n hexCtrl$\n .pipe(takeUntil(this._destroyed), debounceTime(400), distinctUntilChanged())\n .subscribe((hex) => {\n const obj = stringInputToObject(hex);\n if (obj != null) {\n const color = new Color(obj.r, obj.g, obj.b, obj.a);\n this.emitChange(color);\n }\n });\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n const key = \"setColor\";\n \n if (changes[key] && changes[key].currentValue) {\n this.updateForm(changes[key].currentValue);\n if (this._resetBaseColor) {\n this._baseColor = changes[key].currentValue;\n }\n\n this._resetBaseColor = true;\n\n if (!changes[key].firstChange) {\n this.draw();\n }\n }\n }\n\n private updateForm(val: Color): void {\n const config = { emitEvent: false };\n \n this.rCtrl?.setValue(val.r, config);\n this.gCtrl?.setValue(val.g, config);\n this.bCtrl?.setValue(val.b, config);\n this.aCtrl?.setValue(val.a, config);\n this.hexCtrl?.setValue(val.hex, config);\n }\n\n public redrawIndicator(x: number, y: number) {\n this.ctx?.beginPath();\n this.ctx!.strokeStyle = 'white';\n this.ctx?.arc(x, y, RADIUS_NOB, 0, 2 * Math.PI, false);\n this.ctx?.stroke();\n this.ctx?.closePath();\n }\n\n public fillGradient() {\n this.ctx!.fillStyle = this._baseColor ? this._baseColor.rgba : 'rgba(255,255,255,1)';\n this.ctx?.fillRect(0, 0, this.width, this.height);\n\n const grdWhite = this.ctx?.createLinearGradient(0, 0, this.width, 0);\n grdWhite?.addColorStop(0, 'rgba(255,255,255,1)');\n grdWhite?.addColorStop(1, 'rgba(255,255,255,0)');\n this.ctx!.fillStyle = grdWhite!;\n this.ctx?.fillRect(0, 0, this.width, this.height);\n\n const grdBlack = this.ctx?.createLinearGradient(0, 0, 0, this.height);\n grdBlack?.addColorStop(0, 'rgba(0,0,0,0)');\n grdBlack?.addColorStop(1, 'rgba(0,0,0,1)');\n this.ctx!.fillStyle = grdBlack!;\n this.ctx?.fillRect(0, 0, this.width, this.height);\n }\n\n public onSliderColorChanged(c: Color) {\n this._baseColor = c;\n this.color.set(c);\n this.fillGradient();\n this.emitChange(c);\n }\n\n public changeColor(e: MouseEvent): void {\n this.x = e.offsetX;\n this.y = e.offsetY;\n this._resetBaseColor = false;\n this.draw();\n const { r, g, b } = getColorAtPosition(this.ctx!, e.offsetX, e.offsetY);\n this.emitChange(new Color(r, g, b));\n }\n}\n","<form [formGroup]=\"formGroup\">\n <div class=\"color-canvas-row\">\n <div class=\"zone-canvas\">\n <canvas\n id=\"color-block\"\n class=\"zone-block\"\n (mousedown)=\"onMousedown($event)\"\n (mouseup)=\"onMouseup($event)\"\n width=\"200\"\n height=\"235\"\n ></canvas>\n <ngx-mat-color-slider (colorChanged)=\"onSliderColorChanged($event)\" />\n </div>\n\n <div class=\"zone-inputs\">\n <mat-form-field [color]=\"theme()\">\n <mat-label>R</mat-label>\n <input\n matInput\n formControlName=\"r\"\n ngxMatNumericColorInput\n autocomplete=\"off\"\n />\n </mat-form-field>\n\n <mat-form-field [color]=\"theme()\">\n <mat-label>G</mat-label>\n <input\n matInput\n formControlName=\"g\"\n ngxMatNumericColorInput\n autocomplete=\"off\"\n />\n </mat-form-field>\n\n <mat-form-field [color]=\"theme()\">\n <mat-label>B</mat-label>\n <input\n matInput\n formControlName=\"b\"\n ngxMatNumericColorInput\n autocomplete=\"off\"\n />\n </mat-form-field>\n </div>\n </div>\n\n <div class=\"color-canvas-row\">\n <button\n mat-mini-fab\n [style.background-color]=\"color()?.rgba || 'transparent'\"\n class=\"preview\"\n ></button>\n <mat-form-field [color]=\"theme()\">\n <mat-label>HEX6</mat-label>\n <mat-label matPrefix class=\"symbol\"># </mat-label>\n <input matInput formControlName=\"hex\" autocomplete=\"off\" />\n </mat-form-field>\n <mat-form-field class=\"input-opacity\" [color]=\"theme()\">\n <mat-label>A</mat-label>\n <input\n matInput\n formControlName=\"a\"\n type=\"number\"\n min=\"0\"\n max=\"1\"\n step=\"0.1\"\n autocomplete=\"off\"\n />\n </mat-form-field>\n </div>\n</form>\n","import { NgClass } from '@angular/common';\nimport { Component, Input, output, signal, ViewEncapsulation } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { BASIC_COLORS, stringInputToObject } from '../../helpers';\nimport { Color } from '../../models';\n\n@Component({\n selector: 'ngx-mat-color-collection',\n templateUrl: './color-collection.component.html',\n styleUrls: ['./color-collection.component.scss'],\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'ngx-mat-color-collection',\n },\n imports: [MatButtonModule, NgClass],\n})\nexport class NgxMatColorCollectionComponent {\n readonly colorChanged = output<Color>();\n\n @Input()\n set color(c: Color | undefined | null) {\n if (c) {\n this.selectedColor.set(c.toHexString());\n }\n }\n\n readonly selectedColor = signal<string>('');\n\n colors1: string[] = BASIC_COLORS.slice(0, 8);\n colors2: string[] = BASIC_COLORS.slice(8, 16);\n\n select(hex: string) {\n this.selectedColor.set(hex);\n let rgba = stringInputToObject(hex);\n if (rgba != null) {\n this.colorChanged.emit(new Color(rgba.r, rgba.g, rgba.b, rgba.a));\n }\n }\n}\n","<div class=\"color-collection-row\">\n @for (c of colors1; track c) {\n <button\n mat-mini-fab\n [style.background-color]=\"c\"\n class=\"btn-color\"\n (click)=\"select(c)\"\n [ngClass]=\"{ active: selectedColor() === c }\"\n [disableRipple]=\"true\"></button>\n }\n</div>\n<div class=\"color-collection-row\">\n @for (c of colors2; track c) {\n <button\n mat-mini-fab\n [style.background-color]=\"c\"\n class=\"btn-color\"\n (click)=\"select(c)\"\n [ngClass]=\"{ active: selectedColor() === c }\"\n [disableRipple]=\"true\"></button>\n }\n</div>\n","import { Component, ViewEncapsulation, input, output } from '@angular/core';\nimport { ThemePalette } from '@angular/material/core';\nimport { Color } from '../../models';\nimport { NgxMatColorCanvasComponent } from '../color-canvas/color-canvas.component';\nimport { NgxMatColorCollectionComponent } from '../color-collection/color-collection.component';\n\n@Component({\n selector: 'ngx-mat-color-palette',\n templateUrl: 'color-palette.component.html',\n styleUrls: ['color-palette.component.scss'],\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'ngx-mat-color-palette',\n },\n imports: [NgxMatColorCollectionComponent, NgxMatColorCanvasComponent],\n})\nexport class NgxMatColorPaletteComponent {\n readonly colorChanged = output<Color>();\n\n readonly color = input<Color | undefined | null>();\n readonly theme = input<ThemePalette>();\n\n public handleColorChanged(color: Color) {\n this.colorChanged.emit(color);\n }\n}\n","<ngx-mat-color-canvas\n (colorChanged)=\"handleColorChanged($event)\"\n [color]=\"color()\"\n [theme]=\"theme()\"\n/>\n\n<ngx-mat-color-collection\n (colorChanged)=\"handleColorChanged($event)\"\n [color]=\"color()\"\n/>\n","import { Injectable } from '@angular/core';\nimport { stringInputToObject } from '../helpers';\nimport { Color, ColorInputFormat } from '../models';\n\n@Injectable()\nexport class ColorAdapter {\n sameColor(a: Color, b: Color) {\n if (a == null && b == null) return true;\n if (a != null && b != null) return a.rgba === b.rgba;\n return false;\n }\n\n format(c: Color, format: ColorInputFormat): string {\n return c.toString(format);\n }\n\n parse(value: string): Color | null {\n const obj = stringInputToObject(value);\n if (obj) {\n return new Color(obj.r, obj.g, obj.b, obj.a);\n }\n return null;\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { ColorInputFormat } from '../models';\n\nexport type MatColorFormats = {\n display: {\n colorInput: ColorInputFormat;\n };\n};\n\nexport const NGX_MAT_COLOR_FORMATS: MatColorFormats = {\n display: {\n colorInput: 'hex',\n },\n};\n\nexport const MAT_COLOR_FORMATS = new InjectionToken<MatColorFormats>('mat-color-formats');\n","import { Directionality } from '@angular/cdk/bidi';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { ESCAPE, UP_ARROW } from '@angular/cdk/keycodes';\nimport {\n Overlay,\n OverlayConfig,\n OverlayRef,\n PositionStrategy,\n ScrollStrategy,\n} from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\n\nimport {\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n EventEmitter,\n HostBinding,\n Inject,\n InjectionToken,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n Output,\n ViewContainerRef,\n ViewEncapsulation,\n viewChild,\n DOCUMENT,\n ChangeDetectorRef,\n inject,\n OnInit,\n ElementRef,\n} from '@angular/core';\nimport { ThemePalette } from '@angular/material/core';\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\nimport { Subject, Subscription, merge } from 'rxjs';\nimport { filter, take } from 'rxjs/operators';\nimport { Color } from '../../models';\nimport { ColorAdapter } from '../../services';\nimport { NgxMatColorPaletteComponent } from '../color-palette/color-palette.component';\nimport { NgxMatColorPickerInput } from './color-input.component';\n\n/** Injection token that determines the scroll handling while the calendar is open. */\nexport const NGX_MAT_COLOR_PICKER_SCROLL_STRATEGY = new InjectionToken<() => ScrollStrategy>(\n 'ngx-mat-colorpicker-scroll-strategy',\n);\n\nexport function NGX_MAT_COLOR_PICKER_SCROLL_STRATEGY_FACTORY(\n overlay: Overlay,\n): () => ScrollStrategy {\n return () => overlay.scrollStrategies.reposition();\n}\n\nexport const NGX_MAT_COLOR_PICKER_SCROLL_STRATEGY_FACTORY_PROVIDER = {\n provide: NGX_MAT_COLOR_PICKER_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: NGX_MAT_COLOR_PICKER_SCROLL_STRATEGY_FACTORY,\n};\n\n@Component({\n selector: 'ngx-mat-color-picker-content',\n templateUrl: './color-picker-content.component.html',\n styleUrls: ['../../../../../shared/base-animations.scss', 'color-picker-content.component.scss'],\n host: {\n class: 'ngx-mat-colorpicker-content',\n '[class.ngx-mat-colorpicker-content-touch]': 'picker?.touchUi',\n '(animationend)': '_onAnimationEnd($event)',\n },\n exportAs: 'ngxMatColorPickerContent',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n inputs: ['color'],\n imports: [NgxMatColorPaletteComponent],\n})\nexport class NgxMatColorPickerContentComponent implements OnInit {\n /** Reference to the internal calendar component. */\n _palette = viewChild(NgxMatColorPaletteComponent);\n\n picker: NgxMatColorPickerComponent | null = null;\n color: ThemePalette;\n\n _isLeaving = false;\n _panelEnterClass: 'enter-dropdown' | 'enter-dialog' | null = null;\n\n @Output() readonly _animationDone = new Subject<void>();\n\n private _cdr = inject(ChangeDetectorRef);\n\n @HostBinding('class.panel-enter-dropdown')\n get isEnterDropdown() {\n return !this._isLeaving && this._panelEnterClass === 'enter-dropdown';\n }\n\n @HostBinding('class.panel-enter-dialog')\n get isEnterDialog() {\n return !this._isLeaving && this._panelEnterClass === 'enter-dialog';\n }\n\n @HostBinding('class.panel-leave')\n get isLeaving() {\n return this._isLeaving;\n }\n\n ngOnInit(): void {\n this._panelEnterClass = this.picker?.touchUi ? 'enter-dialog' : 'enter-dropdown';\n this._cdr.markForCheck(); // ensure initial class is applied\n }\n\n _startExitAnimation() {\n this._isLeaving = true;\n this._cdr.markForCheck(); // trigger class update\n }\n\n _onAnimationEnd(event: AnimationEvent) {\n if (event.animationName === 'panelLeave') {\n this._animationDone.next();\n }\n }\n}\n\n@Component({\n selector: 'ngx-mat-color-picker',\n template: '',\n exportAs: 'ngxMatColorPicker',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [ColorAdapter, NGX_MAT_COLOR_PICKER_SCROLL_STRATEGY_FACTORY_PROVIDER],\n})\nexport class NgxMatColorPickerComponent implements OnDestroy {\n @Input() id: string = `ngx-mat-color-picker-${Math.floor(Math.random() * 1000000)}`;\n\n private _scrollStrategy: () => ScrollStrategy;\n\n /** Emits when the datepicker has been opened. */\n @Output('opened') openedStream: EventEmitter<void> = new EventEmitter<void>();\n\n /** Emits when the datepicker has been closed. */\n @Output('closed') closedStream: EventEmitter<void> = new EventEmitter<void>();\n\n @Input() get disabled() {\n return this._disabled === undefined && this._pickerInput\n ? this._pickerInput.disabled\n : !!this._disabled;\n }\n set disabled(value: boolean) {\n const newValue = coerceBooleanProperty(value);\n\n if (newValue !== this._disabled) {\n this._disabled = newValue;\n this._disabledChange.next(newValue);\n }\n }\n private _disabled: boolean = false;\n\n @Input()\n get touchUi(): boolean {\n return this._touchUi;\n }\n set touchUi(value: boolean) {\n this._touchUi = coerceBooleanProperty(value);\n }\n private _touchUi = false;\n\n /** Whether the calendar is open. */\n @Input()\n get opened(): boolean {\n return this._opened;\n }\n set opened(value: boolean) {\n value ? this.open() : this.close();\n }\n private _opened = false;\n\n /** Default Color palette to use on the datepicker's calendar. */\n @Input()\n get defaultColor(): ThemePalette {\n return this._defaultColor;\n }\n set defaultColor(value: ThemePalette) {\n this._defaultColor = value;\n }\n _defaultColor: ThemePalette = 'primary';\n\n /** Color palette to use on the datepicker's calendar. */\n @Input()\n get color(): ThemePalette {\n return this._color || (this._pickerInput ? this._pickerInput.getThemePalette() : undefined);\n }\n set color(value: ThemePalette) {\n this._color = value;\n }\n _color: ThemePalette;\n\n @HostBinding('class.mat-primary') get isPrimary() {\n return this.color === 'primary';\n }\n @HostBinding('class.mat-accent') get isAccent() {\n return this.color === 'accent';\n }\n @HostBinding('class.mat-warn') get isWarn() {\n return this.color === 'warn';\n }\n\n /** The currently selected date. */\n get _selected(): Color | null {\n return this._validSelected;\n }\n set _selected(value: Color) {\n this._validSelected = value;\n }\n private _validSelected: Color | null = null;\n\n _pickerInput: NgxMatColorPickerInput | null = null;\n /** A reference to the overlay when the picker is opened as a popup. */\n _popupRef: OverlayRef | null = null;\n\n /** A reference to the dialog when the picker is opened as a dialog. */\n private _dialogRef: MatDialogRef<NgxMatColorPickerContentComponent> | null = null;\n /** Reference to the component instantiated in popup mode. */\n private _popupComponentRef: ComponentRef<NgxMatColorPickerContentComponent> | undefined | null = null;\n /** A portal containing the content for this picker. */\n private _portal: ComponentPortal<NgxMatColorPickerContentComponent> | null = null;\n\n /** Emits when the datepicker is disabled. */\n readonly _disabledChange = new EventEmitter<boolean>();\n\n /** The element that was focused before the datepicker was opened. */\n private _focusedElementBeforeOpen: HTMLElement | null = null;\n\n /** Subscription to value changes in the associated input element. */\n private _inputSubscription = Subscription.EMPTY;\n\n /** Emits new selected date when selected date changes. */\n readonly _selectedChanged = new Subject<Color>();\n\n /** Whether an animation is currently in progress. */\n private _isAnimating = false;\n\n constructor(\n private _dialog: MatDialog,\n private _overlay: Overlay,\n private _zone: NgZone,\n private _adapter: ColorAdapter,\n @Optional() private _dir: Directionality,\n @Inject(NGX_MAT_COLOR_PICKER_SCROLL_STRATEGY) scrollStrategy: any,\n @Optional() @Inject(DOCUMENT) private _document: any,\n private _viewContainerRef: ViewContainerRef,\n ) {\n this._scrollStrategy = scrollStrategy;\n }\n\n ngOnDestroy() {\n this.close();\n this._inputSubscription.unsubscribe();\n this._disabledChange.complete();\n\n if (this._popupRef) {\n this._popupRef.dispose();\n this._popupComponentRef = null;\n }\n }\n\n /** Selects the given date */\n select(nextVal: Color): void {\n let oldValue = this._selected;\n this._selected = nextVal;\n if (!this._adapter.sameColor(oldValue!, this._selected)) {\n this._selectedChanged.next(nextVal);\n }\n }\n\n /**\n * Register an input with this datepicker.\n * @param input The datepicker input to register with this datepicker.\n */\n registerInput(input: NgxMatColorPickerInput): void {\n if (this._pickerInput) {\n throw Error('A ColorPicker can only be associated with a single input.');\n }\n this._pickerInput = input;\n this._inputSubscription = this._pickerInput._valueChange.subscribe(\n (value: Color) => (this._selected = value),\n );\n }\n\n public open(): void {\n if (this._opened || this.disabled || this._isAnimating) {\n return;\n }\n if (!this._pickerInput) {\n throw Error('Attempted to open an ColorPicker with no associated input.');\n }\n\n if (this._document) {\n this._focusedElementBeforeOpen = this._document.activeElement;\n }\n\n this.touchUi ? this._openAsDialog() : this._openAsPopup();\n this._opened = true;\n this.openedStream.emit();\n }\n\n /** Open the calendar as a dialog. */\n private _openAsDialog(): void {\n if (this._dialogRef) {\n this._dialogRef.close();\n }\n\n this._dialogRef = this._dialog.open<NgxMatColorPickerContentComponent>(\n NgxMatColorPickerContentComponent,\n {\n direction: this._dir ? this._dir.value : 'ltr',\n viewContainerRef: this._viewContainerRef,\n panelClass: 'ngx-mat-colorpicker-dialog',\n },\n );\n\n this._dialogRef.afterClosed().subscribe(() => this._handleDialogClosed());\n this._dialogRef.componentInstance.picker = this;\n this._setColor();\n }\n\n private _handleDialogClosed(): void {\n this._opened = false;\n this._isAnimating = false;\n this.closedStream.emit();\n if (this._focusedElementBeforeOpen) {\n this._focusedElementBeforeOpen.focus();\n this._focusedElementBeforeOpen = null;\n }\n this._dialogRef = null;\n }\n\n /** Open the calendar as a popup. */\n private _openAsPopup(): void {\n if (!this._portal) {\n this._portal = new ComponentPortal<NgxMatColorPickerContentComponent>(\n NgxMatColorPickerContentComponent,\n this._viewContainerRef,\n );\n }\n\n if (!this._popupRef) {\n this._createPopup();\n }\n\n if (!this._popupRef?.hasAttached()) {\n this._popupComponentRef = this._popupRef?.attach(this._portal);\n this._popupComponentRef!.instance.picker = this;\n this._setColor();\n\n // Update the position once the calendar has rendered.\n this._zone.onStable\n .asObservable()\n .pipe(take(1))\n .subscribe(() => {\n this._popupRef?.updatePosition();\n });\n }\n }\n\n /** Create the popup. */\n private _createPopup(): void {\n const overlayConfig = new OverlayConfig({\n positionStrategy: this._createPopupPositionStrategy(),\n hasBackdrop: true,\n backdropClass: 'mat-overlay-transparent-backdrop',\n direction: this._dir,\n scrollStrategy: this._scrollStrategy(),\n panelClass: 'mat-colorpicker-popup',\n });\n\n this._popupRef = this._overlay.create(overlayConfig);\n this._popupRef.overlayElement.setAttribute('role', 'dialog');\n\n merge(\n this._popupRef.backdropClick(),\n this._popupRef.detachments(),\n this._popupRef.keydownEvents().pipe(\n filter((event) => {\n // Closing on alt + up is only valid when there's an input associated with the datepicker.\n return (\n event.keyCode === ESCAPE ||\n (this._pickerInput! && event.altKey && event.keyCode === UP_ARROW)\n );\n }),\n ),\n ).subscribe((event) => {\n if (event) {\n event.preventDefault();\n }\n\n this.close();\n });\n }\n\n close(): void {\n if (!this._opened || this._isAnimating) {\n return;\n }\n\n if (this.touchUi) {\n // Dialog mode – close the dialog, state reset happens in afterClosed\n if (this._dialogRef) {\n this._dialogRef.close();\n }\n } else {\n // Popup mode – animate out then clean up\n let contentInstance: NgxMatColorPickerContentComponent | null = null;\n if (this._popupComponentRef) {\n contentInstance = this._popupComponentRef.instance;\n }\n\n const canRestoreFocus =\n this._focusedElementBeforeOpen &&\n typeof this._focusedElementBeforeOpen.focus === 'function';\n\n const completeClose = () => {\n if (this._popupRef && this._popupRef.hasAttached()) {\n this._popupRef.detach();\n }\n if (this._portal && this._portal.isAttached) {\n this._portal.detach();\n }\n this._opened = false;\n this._isAnimating = false;\n this.closedStream.emit();\n if (canRestoreFocus) {\n this._focusedElementBeforeOpen!.focus();\n }\n this._focusedElementBeforeOpen = null;\n };\n\n if (contentInstance) {\n this._isAnimating = true;\n contentInstance._startExitAnimation();\n\n contentInstance._animationDone.pipe(take(1)).subscribe(() => {\n // Restore focus before the timeout to ensure it happens even if the\n // overlay is removed synchronously.\n if (canRestoreFocus) {\n this._focusedElementBeforeOpen!.focus();\n }\n setTimeout(completeClose);\n });\n } else {\n // No content to animate – close immediately\n if (canRestoreFocus) {\n this._focusedElementBeforeOpen!.focus();\n setTimeout(completeClose);\n } else {\n completeClose();\n }\n }\n }\n }\n\n /** Passes the current theme color along to the calendar overlay. */\n private _setColor(): void {\n const color = this.color;\n if (this._popupComponentRef) {\n this._popupComponentRef.instance.color = color;\n }\n if (this._dialogRef) {\n this._dialogRef.componentInstance.color = color;\n }\n }\n\n /** Create the popup PositionStrategy. */\n private _createPopupPositionStrategy(): PositionStrategy {\n return this._overlay\n .position()\n .flexibleConnectedTo(this._pickerInput!.getConnectedOverlayOrigin())\n .withTransformOriginOn('.ngx-mat-colorpicker-content')\n .withFlexibleDimensions(false)\n .withViewportMargin(8)\n .withLockedPosition()\n .withPositions([\n {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'top',\n },\n {\n originX: 'start',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'bottom',\n },\n {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'top',\n },\n {\n originX: 'end',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'bottom',\n },\n ]);\n }\n}\n","<ngx-mat-color-palette\n (colorChanged)=\"picker?.select($event)\"\n [color]=\"picker!._selected\"\n [theme]=\"color\"></ngx-mat-color-palette>\n","import { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { DOWN_ARROW } from '@angular/cdk/keycodes';\nimport {\n Directive,\n ElementRef,\n EventEmitter,\n forwardRef,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n output,\n} from '@angular/core';\nimport {\n AbstractControl,\n ControlValueAccessor,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ValidationErrors,\n Validator,\n ValidatorFn,\n Validators,\n} from '@angular/forms';\nimport { ThemePalette } from '@angular/material/core';\nimport { MatFormField } from '@angular/material/form-field';\nimport { MAT_INPUT_VALUE_ACCESSOR } from '@angular/material/input';\nimport { Subscription } from 'rxjs';\nimport { createMissingDateImplError } from '../../helpers';\nimport { Color } from '../../models';\nimport { ColorAdapter, MAT_COLOR_FORMATS, MatColorFormats } from '../../services';\nimport { NgxMatColorPickerComponent } from './color-picker.component';\n\nexport class NgxMatColorPickerInputEvent {\n /** The new value for the target colorpicker input. */\n value: Color | null;\n\n constructor(\n /** Reference to the colorpicker input component that emitted the event. */\n public target: NgxMatColorPickerInput,\n /** Reference to the native input element associated with the colorpicker input. */\n public targetElement: HTMLElement,\n ) {\n this.value = this.target.value;\n }\n}\n\nexport const MAT_COLORPICKER_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NgxMatColorPickerInput),\n multi: true,\n};\n\nexport const MAT_COLORPICKER_VALIDATORS: any = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => NgxMatColorPickerInput),\n multi: true,\n};\n\n@Directive({\n selector: 'input[ngxMatColorPicker]',\n providers: [\n { provide: MAT_INPUT_VALUE_ACCESSOR, useExisting: NgxMatColorPickerInput },\n ColorAdapter,\n MAT_COLORPICKER_VALIDATORS,\n MAT_COLORPICKER_VALUE_ACCESSOR,\n ],\n host: {\n '[attr.aria-haspopup]': '_picker ? \"dialog\" : null',\n '[attr.aria-owns]': '(_picker?.opened && _picker?.id) || null',\n '[disabled]': 'disabled',\n '(input)': '_onInput($event)',\n '(change)': '_onChange()',\n '(blur)': '_onBlur()',\n '(keydown)': '_onKeydown($event)',\n },\n exportAs: 'ngxMatColorPickerInput',\n})\nexport class NgxMatColorPickerInput implements ControlValueAccessor, OnInit, OnDestroy, Validator {\n @Input()\n set ngxMatColorPicker(value: NgxMatColorPickerComponent) {\n if (!value) {\n return;\n }\n\n this._picker = value;\n this._picker.registerInput(this);\n this._pickerSubscription.unsubscribe();\n\n this._pickerSubscription = this._picker._selectedChanged.subscribe((selected: Color) => {\n this.value = selected;\n this._cvaOnChange(selected);\n this._onTouched();\n this.colorInput.emit(new NgxMatColorPickerInputEvent(this, this._elementRef.nativeElement));\n this.colorChange.emit(new NgxMatColorPickerInputEvent(this, this._elementRef.nativeElement));\n });\n }\n _picker: NgxMatColorPickerComponent | null = null;\n\n /** Whether the colorpicker-input is disabled. */\n @Input()\n get disabled(): boolean {\n return !!this._disabled;\n }\n set disabled(value: boolean) {\n const newValue = coerceBooleanProperty(value);\n const element = this._elementRef.nativeElement;\n\n if (this._disabled !== newValue) {\n this._disabled = newValue;\n this._disabledChange.emit(newValue);\n }\n\n // We need to null check the `blur` method, because it's undefined during SSR.\n if (newValue && element.blur) {\n // Normally, native input elements automatically blur if they turn disabled. This behavior\n // is problematic, because it would mean that it triggers another change detection cycle,\n // which then causes a changed after checked error if the input element was focused before.\n element.blur();\n }\n }\n private _disabled: boolean = false;\n\n /** The value of the input. */\n @Input()\n get value(): Color | null {\n return this._value;\n }\n set value(value: Color | null) {\n const oldValue = this.value;\n this._value = value;\n this._formatValue(value);\n\n if (!this._adapter.sameColor(oldValue!, value!)) {\n this._valueChange.emit(value);\n }\n }\n private _value: Color | null = null;\n\n /** Emits when a `change` event is fired on this `<input>`. */\n readonly colorChange = output<NgxMatColorPickerInputEvent>();\n\n /** Emits when an `input` event is fired on this `<input>`. */\n readonly colorInput = output<NgxMatColorPickerInputEvent>();\n\n /** Emits when the disabled state has changed */\n _disabledChange = new EventEmitter<boolean>();\n\n /** Emits when the value changes (either due to user input or programmatic change). */\n _valueChange = new EventEmitter<Color | null>();\n\n _onTouched = () => {};\n\n private _cvaOnChange: (value: any) => void = () => {};\n\n private _validatorOnChange = () => {};\n\n private _pickerSubscription = Subscription.EMPTY;\n\n /** The combined form control validator for this input. */\n private _validator: ValidatorFn | null = Validators.compose([]);\n\n /** Whether the last value set on the input was valid. */\n private _lastValueValid = false;\n\n constructor(\n private _elementRef: ElementRef<HTMLInputElement>,\n @Optional() private _formField: MatFormField,\n @Optional()\n @Inject(MAT_COLOR_FORMATS)\n private _colorFormats: MatColorFormats,\n private _adapter: ColorAdapter,\n ) {\n if (!this._colorFormats) {\n throw createMissingDateImplError('MAT_COLOR_FORMATS');\n }\n }\n\n /** Returns the palette used by the input's form field, if any. */\n public getThemePalette(): ThemePalette {\n return this._formField ? this._formField.color : undefined;\n }\n\n registerOnValidatorChange(fn: () => void): void {\n this._validatorOnChange = fn;\n }\n\n validate(c: AbstractControl): ValidationErrors | null {\n return this._validator ? this._validator(c) : null;\n }\n\n /**\n * @deprecated\n * @breaking-change 8.0.0 Use `getConnectedOverlayOrigin` instead\n */\n getPopupConnectionElementRef(): ElementRef {\n return this.getConnectedOverlayOrigin();\n }\n\n /**\n * Gets the element that the colorpicker popup should be connected to.\n * @return The element to connect the popup to.\n */\n getConnectedOverlayOrigin(): ElementRef {\n return this._formField ? this._formField.getConnectedOverlayOrigin() : this._elementRef;\n }\n\n ngOnInit() {}\n\n ngOnDestroy(): void {\n this._pickerSubscription.unsubscribe();\n this._valueChange.complete();\n this._disabledChange.complete();\n }\n\n // Implemented as part of ControlValueAccessor.\n writeValue(value: Color): void {\n this.value = value;\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnChange(fn: (value: any) => void): void {\n this._cvaOnChange = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnTouched(fn: () => void): void {\n this._onTouched = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n _onChange() {\n this.colorChange.emit(new NgxMatColorPickerInputEvent(this, this._elementRef.nativeElement));\n }\n\n _onKeydown(event: KeyboardEvent) {\n const isAltDownArrow = event.altKey && event.keyCode === DOWN_ARROW;\n\n if (this._picker && isAltDownArrow && !this._elementRef.nativeElement.readOnly) {\n this._picker.open();\n event.preventDefault();\n }\n }\n\n /** Handles blur events on the input. */\n _onBlur() {\n // Reformat the input only if we have a valid value.\n if (this.value) {\n this._formatValue(this.value);\n }\n\n this._onTouched();\n }\n\n /** Formats a value and sets it on the input element. */\n private _formatValue(value: Color | null) {\n this._elementRef.nativeElement.value = value\n ? this._adapter.format(value, this._colorFormats.display.colorInput)\n : '';\n }\n\n _onInput(event?: Event) {\n const lastValueWasValid = this._lastValueValid;\n const target = event?.target as HTMLInputElement;\n const nextValue = this._adapter.parse(target.value);\n\n if (!this._adapter.sameColor(nextValue!, this._value!)) {\n this._value = nextValue;\n this._cvaOnChange(nextValue);\n this._valueChange.emit(nextValue);\n this.colorInput.emit(new NgxMatColorPickerInputEvent(this, this._elementRef.nativeElement));\n } else if (lastValueWasValid !== this._lastValueValid) {\n this._validatorOnChange();\n }\n }\n}\n","import {\n AfterContentInit,\n ChangeDetectorRef,\n Component,\n Directive,\n EventEmitter,\n Input,\n OnDestroy,\n ViewEncapsulation,\n effect,\n input,\n untracked,\n viewChild,\n} from '@angular/core';\nimport { MatButton, MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { Subscription, merge, of } from 'rxjs';\nimport { NgxMatColorPickerComponent } from '../color-picker/color-picker.component';\n\n@Directive({\n selector: '[ngxMatColorpickerToggleIcon]',\n})\nexport class NgxMatColorpickerToggleIcon {}\n\n@Component({\n selector: 'ngx-mat-color-toggle',\n templateUrl: './color-toggle.component.html',\n styleUrls: ['./color-toggle.component.scss'],\n host: {\n class: 'ngx-mat-color-toggle',\n // Always set the tabindex to -1 so that it doesn't overlap with any custom tabindex the\n // consumer may have provided, while still being able to receive focus.\n '[attr.tabindex]': '-1',\n '[class.ngx-mat-color-toggle-active]': 'picker()?.opened',\n '[class.mat-accent]': 'picker()?.color === \"accent\"',\n '[class.mat-warn]': 'picker()?.color === \"warn\"',\n '(focus)': '_button()?.focus()',\n },\n exportAs: 'ngxMatColorPickerToggle',\n encapsulation: ViewEncapsulation.None,\n imports: [MatButtonModule, MatIconModule],\n})\nexport class NgxMatColorToggleComponent implements AfterContentInit, OnDestroy {\n private _stateChanges = Subscription.EMPTY;\n\n picker = input<NgxMatColorPickerComponent>(undefined, { alias: 'for' });\n tabIndex = input<number>();\n\n @Input() get disabled(): boolean | undefined { \n if (this._disabled == null && this.picker()) {\n return this.picker()?.disabled;\n }\n return undefined;\n }\n set disabled(value: boolean) {\n this._disabled = value;\n }\n private _disabled: boolean = false;\n\n /** Whether ripples on the toggle should be disabled. */\n disableRipple = input<boolean>();\n\n _button = viewChild<MatButton>('button');\n\n constructor(private _cd: ChangeDetectorRef) {\n effect(() => {\n this.picker();\n\n untracked(() => this._watchStateChanges());\n });\n }\n\n ngOnDestroy() {\n this._stateChanges.unsubscribe();\n }\n\n ngAfterContentInit() {\n this._watchStateChanges();\n }\n\n public open(event: Event): void {\n if (this.picker() && !this.disabled) {\n this.picker()?.open();\n event.stopPropagation();\n }\n }\n\n private _watchStateChanges() {\n const disabled$ = this.picker()?._disabledChange ?? new EventEmitter();\n const inputDisabled$ = this.picker()?._pickerInput?._disabledChange ?? new EventEmitter();\n\n const pickerToggled$ = this.picker()\n ? merge(this.picker()!.openedStream, this.picker()!.closedStream)\n : of();\n this._stateChanges.unsubscribe();\n\n this._stateChanges = merge(disabled$, inputDisabled$, pickerToggled$).subscribe(() =>\n this._cd.markForCheck(),\n );\n }\n}\n","<button\n #button\n mat-icon-button\n type=\"button\"\n [attr.aria-haspopup]=\"picker() ? 'dialog' : null\"\n [attr.tabindex]=\"disabled ? -1 : tabIndex()\"\n [disabled]=\"disabled\"\n (click)=\"open($event)\"\n [disableRipple]=\"disableRipple()\"\n>\n <ng-content select=\"[ngxMatColorpickerToggleIcon]\">\n <mat-icon [style.color]=\"picker()?._selected?.rgba\">palette</mat-icon>\n </ng-content>\n</button>\n","import { Directive, HostListener } from '@angular/core';\nimport { NUMERIC_REGEX } from '../helpers';\n\n@Directive({\n selector: '[ngxMatNumericColorInput]',\n})\nexport class NumericColorInputDirective {\n @HostListener('input', ['$event'])\n onInput($event: any) {\n this._formatInput($event.target);\n }\n\n /**\n * Format input\n * @param input\n */\n private _formatInput(input: any) {\n let val = Number(input.value.replace(NUMERIC_REGEX, ''));\n val = isNaN(val) ? 0 : val;\n input.value = val;\n }\n}\n","/*\n * Public API Surface of color-picker\n */\nexport * from './lib/components';\nexport * from './lib/directives';\nexport * from './lib/helpers';\nexport * from './lib/models';\nexport * from './lib/services';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i2","i3.ColorAdapter","i2.ColorAdapter"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,QAAQ,GAAG,MAAM;AACvB,MAAM,SAAS,GAAG,MAAM;AACxB,MAAM,WAAW,GAAG,CAAC;AACrB,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK;AAC5B,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG;AACxB,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG;AACxB,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM;AAEvB,MAAM,aAAa,GAAG;AACtB,MAAM,OAAO,GAAG;AAChB,MAAM,OAAO,GAAG;AAEvB;AACO,MAAM,YAAY,GAAG;IAC1B,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;;AAGX;;;;;AAKG;SACa,kBAAkB,CAChC,GAA6B,EAC7B,CAAS,EACT,CAAS,EAAA;AAET,IAAA,MAAM,SAAS,GAAsB,GAAG,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI;IACtE,OAAO,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE;AAC9D;AAEA;AACA;AACA;AACA;AACM,SAAU,SAAS,CACvB,CAAS,EACT,CAAS,EACT,CAAS,EACT,CAAS,EACT,UAAoB,EAAA;AAEpB,IAAA,IAAI,GAAG,GAAG;QACR,IAAI,CAAC,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A,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAA1B,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAHtC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,2BAA2B;AACtC,iBAAA;;sBAEE,YAAY;uBAAC,OAAO,EAAE,CAAC,QAAQ,CAAC;;;ACPnC;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-mce-color-picker.mjs","sources":["../../../projects/color-picker/src/lib/helpers/color-helpers.ts","../../../projects/color-picker/src/lib/models/color.model.ts","../../../projects/color-picker/src/lib/components/color-canvas/base-color-canvas.ts","../../../projects/color-picker/src/lib/components/color-canvas/color-slider/color-slider.component.ts","../../../projects/color-picker/src/lib/components/color-canvas/color-slider/color-slider.component.html","../../../projects/color-picker/src/lib/components/color-canvas/color-canvas.component.ts","../../../projects/color-picker/src/lib/components/color-canvas/color-canvas.component.html","../../../projects/color-picker/src/lib/components/color-collection/color-collection.component.ts","../../../projects/color-picker/src/lib/components/color-collection/color-collection.component.html","../../../projects/color-picker/src/lib/components/color-palette/color-palette.component.ts","../../../projects/color-picker/src/lib/components/color-palette/color-palette.component.html","../../../projects/color-picker/src/lib/services/color-adapter.ts","../../../projects/color-picker/src/lib/services/color-formats.ts","../../../projects/color-picker/src/lib/components/color-picker/color-picker.component.ts","../../../projects/color-picker/src/lib/components/color-picker/color-picker-content.component.html","../../../projects/color-picker/src/lib/components/color-picker/color-input.component.ts","../../../projects/color-picker/src/lib/components/color-toggle/color-toggle.component.ts","../../../projects/color-picker/src/lib/components/color-toggle/color-toggle.component.html","../../../projects/color-picker/src/lib/directives/numeric-color-input.directive.ts","../../../projects/color-picker/src/public-api.ts","../../../projects/color-picker/src/ngx-mce-color-picker.ts"],"sourcesContent":["const trimLeft = /^\\s+/;\nconst trimRight = /\\s+$/;\nconst mathRound = Math.round;\n\nexport const NUMERIC_REGEX = /[^0-9]/g;\nexport const MAX_RGB = 255;\nexport const MIN_RGB = 0;\n\n/** List basic colors */\nexport const BASIC_COLORS = [\n '#ffffff',\n '#ffff00',\n '#ff00ff',\n '#ff0000',\n '#c0c0c0',\n '#808080',\n '#808000',\n '#800080',\n '#800000',\n '#00ffff',\n '#00ff00',\n '#008080',\n '#008000',\n '#0000ff',\n '#000080',\n '#000000',\n];\n\n/**\n * Get color at position\n * @param ctx\n * @param x\n * @param y\n */\nexport function getColorAtPosition(\n ctx: CanvasRenderingContext2D,\n x: number,\n y: number,\n): { r: number; g: number; b: number } {\n const imageData: Uint8ClampedArray = ctx.getImageData(x, y, 1, 1).data;\n return { r: imageData[0], g: imageData[1], b: imageData[2] };\n}\n\n// `rgbaToHex`\n// Converts an RGBA color plus alpha transparency to hex\n// Assumes r, g, b are contained in the set [0, 255] and\n// a in [0, 1]. Returns a 4 or 8 character rgba hex\nexport function rgbaToHex(\n r: number,\n g: number,\n b: number,\n a: number,\n allow4Char?: boolean,\n): string {\n const hex = [\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16)),\n pad2(convertDecimalToHex(a.toString(16))),\n ];\n\n // Return a 4 character hex if possible\n if (\n allow4Char &&\n hex[0].charAt(0) == hex[0].charAt(1) &&\n hex[1].charAt(0) == hex[1].charAt(1) &&\n hex[2].charAt(0) == hex[2].charAt(1) &&\n hex[3].charAt(0) == hex[3].charAt(1)\n ) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n\n return hex.join('');\n}\n\n// Force a hex value to have 2 characters\nexport function pad2(c: string): string {\n return c.length == 1 ? '0' + c : '' + c;\n}\n\n// Converts a decimal to a hex value\nexport function convertDecimalToHex(d: string) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}\n\n// Converts a hex value to a decimal\nfunction convertHexToDecimal(h: string) {\n return parseIntFromHex(h) / 255;\n}\n\n// Parse a base-16 hex value into a base-10 integer\nfunction parseIntFromHex(val: string) {\n return parseInt(val, 16);\n}\n\n// `rgbToHex`\n// Converts an RGB color to hex\n// Assumes r, g, and b are contained in the set [0, 255]\n// Returns a 3 or 6 character hex\nexport function rgbToHex(r: number, g: number, b: number, allow3Char?: boolean) {\n const hex = [\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16)),\n ];\n\n // Return a 3 character hex if possible\n if (\n allow3Char &&\n hex[0].charAt(0) == hex[0].charAt(1) &&\n hex[1].charAt(0) == hex[1].charAt(1) &&\n hex[2].charAt(0) == hex[2].charAt(1)\n ) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n }\n\n return hex.join('');\n}\n\n// Actual matching.\n// Parentheses and commas are optional, but not required.\n// Whitespace can take the place of commas or opening parent\nconst CSS_INTEGER = '[-\\\\+]?\\\\d+%?';\nconst CSS_NUMBER = '[-\\\\+]?\\\\d*\\\\.\\\\d+%?';\nconst CSS_UNIT = '(?:' + CSS_NUMBER + ')|(?:' + CSS_INTEGER + ')';\nconst PERMISSIVE_MATCH3 =\n '[\\\\s|\\\\(]+(' + CSS_UNIT + ')[,|\\\\s]+(' + CSS_UNIT + ')[,|\\\\s]+(' + CSS_UNIT + ')\\\\s*\\\\)?';\nconst PERMISSIVE_MATCH4 =\n '[\\\\s|\\\\(]+(' +\n CSS_UNIT +\n ')[,|\\\\s]+(' +\n CSS_UNIT +\n ')[,|\\\\s]+(' +\n CSS_UNIT +\n ')[,|\\\\s]+(' +\n CSS_UNIT +\n ')\\\\s*\\\\)?';\n\nexport const matchers = {\n CSS_UNIT: new RegExp(CSS_UNIT),\n rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),\n rgba: new RegExp('rgba' + PERMISSIVE_MATCH4),\n hsl: new RegExp('hsl' + PERMISSIVE_MATCH3),\n hsla: new RegExp('hsla' + PERMISSIVE_MATCH4),\n hsv: new RegExp('hsv' + PERMISSIVE_MATCH3),\n hsva: new RegExp('hsva' + PERMISSIVE_MATCH4),\n hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n};\n\n// `stringInputToObject`\n// Permissive string parsing. Take in a number of formats, and output an object\n// based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`\nexport function stringInputToObject(color: string): {\n r: number;\n g: number;\n b: number;\n a: number;\n} | null {\n color = color.replace(trimLeft, '').replace(trimRight, '').toLowerCase();\n\n // Try to match string input using regular expressions.\n // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]\n // Just return an object and let the conversion functions handle that.\n // This way the result will be the same whether the tinycolor is initialized with string or object.\n let match;\n if ((match = matchers.rgb.exec(color))) {\n return {\n r: parseFloat(match[1]),\n g: parseFloat(match[2]),\n b: parseFloat(match[3]),\n a: 1\n };\n }\n if ((match = matchers.rgba.exec(color))) {\n return {\n r: parseFloat(match[1]),\n g: parseFloat(match[2]),\n b: parseFloat(match[3]),\n a: parseFloat(match[4])\n };\n }\n\n if ((match = matchers.hex8.exec(color))) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n a: convertHexToDecimal(match[4]),\n };\n }\n if ((match = matchers.hex6.exec(color))) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n a: 1,\n };\n }\n if ((match = matchers.hex4.exec(color))) {\n return {\n r: parseIntFromHex(match[1] + '' + match[1]),\n g: parseIntFromHex(match[2] + '' + match[2]),\n b: parseIntFromHex(match[3] + '' + match[3]),\n a: convertHexToDecimal(match[4] + '' + match[4]),\n };\n }\n if ((match = matchers.hex3.exec(color))) {\n return {\n r: parseIntFromHex(match[1] + '' + match[1]),\n g: parseIntFromHex(match[2] + '' + match[2]),\n b: parseIntFromHex(match[3] + '' + match[3]),\n a: 1,\n };\n }\n\n return null;\n}\n\nexport function createMissingDateImplError(provider: string) {\n return Error(\n `NgxMatColorPicker: No provider found for ${provider}. You must define MAT_COLOR_FORMATS in your module`,\n );\n}\n","import { MAX_RGB, rgbaToHex, rgbToHex } from '../helpers';\nimport { ColorInputFormat } from './color-input-format';\n\nexport class Color {\n public r: number;\n public g: number;\n public b: number;\n public a: number;\n public roundA: number;\n\n public hex: string;\n public rgba: string;\n\n constructor(_r: number, _g: number, _b: number, _a?: number) {\n this.r = _r > MAX_RGB ? MAX_RGB : _r;\n this.g = _g > MAX_RGB ? MAX_RGB : _g;\n this.b = _b > MAX_RGB ? MAX_RGB : _b;\n if (_a != null) {\n this.a = _a > 1 ? 1 : _a;\n } else {\n this.a = 1;\n }\n this.roundA = Math.round(this.a);\n this.hex = rgbToHex(this.r, this.g, this.b);\n this.rgba = this.toRgba();\n }\n\n public toHex(allow3Char?: boolean): string {\n return rgbToHex(this.r, this.g, this.b, allow3Char);\n }\n\n public toRgba(): string {\n return `rgba(${this.r},${this.g},${this.b},${this.a})`;\n }\n\n public toHexString(allow3Char?: boolean): string {\n return '#' + this.toHex(allow3Char);\n }\n\n public toRgbString(): string {\n return this.a === 1\n ? 'rgb(' + Math.round(this.r) + ', ' + Math.round(this.g) + ', ' + Math.round(this.b) + ')'\n : 'rgba(' +\n Math.round(this.r) +\n ', ' +\n Math.round(this.g) +\n ', ' +\n Math.round(this.b) +\n ', ' +\n this.roundA +\n ')';\n }\n\n public toHex8(allow4Char?: boolean): string {\n return rgbaToHex(this.r, this.g, this.b, this.a, allow4Char);\n }\n\n public toHex8String(allow4Char?: boolean): string {\n return '#' + this.toHex8(allow4Char);\n }\n\n public toString(format: ColorInputFormat): string {\n const formatSet = !!format;\n\n let formattedString;\n const hasAlpha = this.a < 1 && this.a >= 0;\n const needsAlphaFormat =\n !formatSet &&\n hasAlpha &&\n (format === 'hex' ||\n format === 'hex6' ||\n format === 'hex3' ||\n format === 'hex4' ||\n format === 'hex8');\n\n if (needsAlphaFormat) {\n return this.toRgbString();\n }\n if (format === 'rgb') {\n formattedString = this.toRgbString();\n }\n if (format === 'hex' || format === 'hex6') {\n formattedString = this.toHexString();\n }\n if (format === 'hex3') {\n formattedString = this.toHexString(true);\n }\n if (format === 'hex4') {\n formattedString = this.toHex8String(true);\n }\n if (format === 'hex8') {\n formattedString = this.toHex8String();\n }\n\n return formattedString || this.toHexString();\n }\n}\n","import {\n AfterViewInit,\n Directive,\n Input,\n input,\n NgZone,\n OnDestroy,\n output,\n signal,\n} from '@angular/core';\nimport { ThemePalette } from '@angular/material/core';\nimport { Subject } from 'rxjs';\nimport { Color } from '../../models';\n\n@Directive()\nexport abstract class NgxMatBaseColorCanvas implements OnDestroy, AfterViewInit {\n readonly colorChanged = output<Color>();\n readonly theme = input<ThemePalette>();\n readonly color = signal<Color | undefined | null>(null);\n\n @Input({\n alias: 'color',\n })\n set setColor(color: Color | undefined | null) {\n this.color.set(color);\n }\n\n canvas: HTMLCanvasElement | null = null;\n\n elementId: string;\n\n ctx: CanvasRenderingContext2D | null = null;\n width = 0;\n height = 0;\n\n x = 0;\n y = 0;\n\n drag = false;\n\n protected _destroyed: Subject<void> = new Subject<void>();\n\n protected zone: NgZone | null = null;\n\n constructor(\n elementId: string,\n ) {\n this.elementId = elementId;\n }\n\n ngOnDestroy(): void {\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n ngAfterViewInit(): void {\n this.canvas = document.getElementById(this.elementId) as HTMLCanvasElement;\n this.ctx = this.canvas.getContext('2d');\n this.width = this.canvas.width;\n this.height = this.canvas.height;\n this.draw();\n }\n\n protected draw() {\n this.ctx?.clearRect(0, 0, this.width, this.height);\n this.ctx?.rect(0, 0, this.width, this.height);\n this.fillGradient();\n if (this.y != 0) {\n this.redrawIndicator(this.x, this.y);\n }\n }\n\n public onMousedown(e: MouseEvent) {\n this.drag = true;\n this.changeColor(e);\n\n this.zone?.runOutsideAngular(() => {\n this.canvas?.addEventListener('mousemove', this.onMousemove.bind(this));\n });\n }\n\n public onMousemove(e: MouseEvent) {\n if (this.drag) {\n this.zone?.run(() => {\n this.changeColor(e);\n });\n }\n }\n\n public onMouseup(_: MouseEvent) {\n this.drag = false;\n this.canvas?.removeEventListener('mousemove', this.onMousemove);\n }\n\n public emitChange(color: Color) {\n this.colorChanged.emit(color);\n }\n\n abstract changeColor(e: MouseEvent): void;\n abstract fillGradient(): void;\n abstract redrawIndicator(x: number, y: number): void;\n}\n","import { Component, inject, NgZone } from '@angular/core';\nimport { getColorAtPosition } from '../../../helpers';\nimport { Color } from '../../../models';\nimport { NgxMatBaseColorCanvas } from '../base-color-canvas';\n\n@Component({\n selector: 'ngx-mat-color-slider',\n templateUrl: './color-slider.component.html',\n styleUrls: ['./color-slider.component.scss'],\n})\nexport class NgxMatColorSliderComponent extends NgxMatBaseColorCanvas {\n protected override zone = inject(NgZone);\n\n constructor() {\n super('color-strip');\n }\n\n override ngAfterViewInit(): void {\n super.ngAfterViewInit();\n }\n\n public fillGradient() {\n const grd = this.ctx?.createLinearGradient(0, 0, 0, this.height);\n grd?.addColorStop(0, 'rgba(255, 0, 0, 1)');\n grd?.addColorStop(0.17, 'rgba(255, 255, 0, 1)');\n grd?.addColorStop(0.34, 'rgba(0, 255, 0, 1)');\n grd?.addColorStop(0.51, 'rgba(0, 255, 255, 1)');\n grd?.addColorStop(0.68, 'rgba(0, 0, 255, 1)');\n grd?.addColorStop(0.85, 'rgba(255, 0, 255, 1)');\n grd?.addColorStop(1, 'rgba(255, 0, 0, 1)');\n\n this.ctx!.fillStyle = grd!;\n this.ctx?.fill();\n }\n\n public redrawIndicator(x: number, y: number) {\n this.ctx?.beginPath();\n this.ctx!.strokeStyle = 'white';\n this.ctx!.lineWidth = 2;\n this.ctx?.arc(7.5, y, 7.5, 0, 2 * Math.PI, false);\n this.ctx?.stroke();\n this.ctx?.closePath();\n }\n\n public changeColor(e: MouseEvent) {\n this.x = e.offsetX;\n this.y = e.offsetY;\n this.draw();\n const { r, g, b } = getColorAtPosition(this.ctx!, e.offsetX, e.offsetY);\n this.emitChange(new Color(r, g, b));\n }\n}\n","<canvas\n id=\"color-strip\"\n class=\"zone-strip\"\n (mousedown)=\"onMousedown($event)\"\n (mouseup)=\"onMouseup($event)\"\n width=\"15\"\n height=\"234\"\n></canvas>\n","import {\n AfterViewInit,\n Component,\n inject,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n SimpleChanges,\n ViewEncapsulation,\n} from '@angular/core';\nimport {\n AbstractControl,\n FormControl,\n FormGroup,\n ReactiveFormsModule,\n Validators,\n} from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { merge } from 'rxjs';\nimport { debounceTime, distinctUntilChanged, takeUntil } from 'rxjs/operators';\nimport { getColorAtPosition, matchers, stringInputToObject } from '../../helpers';\nimport { Color } from '../../models';\nimport { NgxMatBaseColorCanvas } from './base-color-canvas';\nimport { NgxMatColorSliderComponent } from './color-slider/color-slider.component';\n\nconst RADIUS_NOB = 5;\n\n@Component({\n selector: 'ngx-mat-color-canvas',\n templateUrl: './color-canvas.component.html',\n styleUrls: ['./color-canvas.component.scss'],\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'ngx-mat-color-canvas',\n },\n imports: [MatFormFieldModule, MatInputModule, NgxMatColorSliderComponent, ReactiveFormsModule],\n})\nexport class NgxMatColorCanvasComponent\n extends NgxMatBaseColorCanvas\n implements OnInit, AfterViewInit, OnChanges, OnDestroy\n{\n private _baseColor: Color | null = null;\n\n get rCtrl(): AbstractControl | null {\n return this.formGroup.get('r');\n }\n\n get gCtrl(): AbstractControl | null {\n return this.formGroup.get('g');\n }\n\n get bCtrl(): AbstractControl | null {\n return this.formGroup.get('b');\n }\n\n get aCtrl(): AbstractControl | null {\n return this.formGroup.get('a');\n }\n\n get hexCtrl(): AbstractControl | null {\n return this.formGroup.get('hex');\n }\n\n _resetBaseColor = true;\n\n formGroup: FormGroup;\n\n rgba = \"\";\n\n protected override zone = inject(NgZone);\n\n constructor() {\n super('color-block');\n this.formGroup = new FormGroup({\n r: new FormControl(null, [Validators.required]),\n g: new FormControl(null, [Validators.required]),\n b: new FormControl(null, [Validators.required]),\n a: new FormControl(null, [Validators.required]),\n hex: new FormControl(null, [Validators.required, Validators.pattern(matchers.hex6)]),\n });\n }\n\n ngOnInit() {\n const rgbaCtrl$ = merge(\n this.rCtrl!.valueChanges,\n this.gCtrl!.valueChanges,\n this.bCtrl!.valueChanges,\n this.aCtrl!.valueChanges,\n );\n rgbaCtrl$.pipe(takeUntil(this._destroyed), debounceTime(400)).subscribe((_) => {\n const color = new Color(\n Number(this.rCtrl!.value),\n Number(this.gCtrl!.value),\n Number(this.bCtrl!.value),\n Number(this.aCtrl!.value),\n );\n this.emitChange(color);\n });\n\n const hexCtrl$ = this.hexCtrl!.valueChanges;\n hexCtrl$\n .pipe(takeUntil(this._destroyed), debounceTime(400), distinctUntilChanged())\n .subscribe((hex) => {\n const obj = stringInputToObject(hex);\n if (obj != null) {\n const color = new Color(obj.r, obj.g, obj.b, obj.a);\n this.emitChange(color);\n }\n });\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n const key = \"setColor\";\n \n if (changes[key] && changes[key].currentValue) {\n this.updateForm(changes[key].currentValue);\n if (this._resetBaseColor) {\n this._baseColor = changes[key].currentValue;\n }\n\n this._resetBaseColor = true;\n\n if (!changes[key].firstChange) {\n this.draw();\n }\n }\n }\n\n private updateForm(val: Color): void {\n const config = { emitEvent: false };\n \n this.rCtrl?.setValue(val.r, config);\n this.gCtrl?.setValue(val.g, config);\n this.bCtrl?.setValue(val.b, config);\n this.aCtrl?.setValue(val.a, config);\n this.hexCtrl?.setValue(val.hex, config);\n }\n\n public redrawIndicator(x: number, y: number) {\n this.ctx?.beginPath();\n this.ctx!.strokeStyle = 'white';\n this.ctx?.arc(x, y, RADIUS_NOB, 0, 2 * Math.PI, false);\n this.ctx?.stroke();\n this.ctx?.closePath();\n }\n\n public fillGradient() {\n this.ctx!.fillStyle = this._baseColor ? this._baseColor.rgba : 'rgba(255,255,255,1)';\n this.ctx?.fillRect(0, 0, this.width, this.height);\n\n const grdWhite = this.ctx?.createLinearGradient(0, 0, this.width, 0);\n grdWhite?.addColorStop(0, 'rgba(255,255,255,1)');\n grdWhite?.addColorStop(1, 'rgba(255,255,255,0)');\n this.ctx!.fillStyle = grdWhite!;\n this.ctx?.fillRect(0, 0, this.width, this.height);\n\n const grdBlack = this.ctx?.createLinearGradient(0, 0, 0, this.height);\n grdBlack?.addColorStop(0, 'rgba(0,0,0,0)');\n grdBlack?.addColorStop(1, 'rgba(0,0,0,1)');\n this.ctx!.fillStyle = grdBlack!;\n this.ctx?.fillRect(0, 0, this.width, this.height);\n }\n\n public onSliderColorChanged(c: Color) {\n this._baseColor = c;\n this.color.set(c);\n this.fillGradient();\n this.emitChange(c);\n }\n\n public changeColor(e: MouseEvent): void {\n this.x = e.offsetX;\n this.y = e.offsetY;\n this._resetBaseColor = false;\n this.draw();\n const { r, g, b } = getColorAtPosition(this.ctx!, e.offsetX, e.offsetY);\n this.emitChange(new Color(r, g, b));\n }\n}\n","<form [formGroup]=\"formGroup\">\n <div class=\"color-canvas-row\">\n <div class=\"zone-canvas\">\n <canvas\n id=\"color-block\"\n class=\"zone-block\"\n (mousedown)=\"onMousedown($event)\"\n (mouseup)=\"onMouseup($event)\"\n width=\"200\"\n height=\"235\"\n ></canvas>\n <ngx-mat-color-slider (colorChanged)=\"onSliderColorChanged($event)\" />\n </div>\n\n <div class=\"zone-inputs\">\n <mat-form-field [color]=\"theme()\">\n <mat-label>R</mat-label>\n <input\n matInput\n formControlName=\"r\"\n ngxMatNumericColorInput\n autocomplete=\"off\"\n />\n </mat-form-field>\n\n <mat-form-field [color]=\"theme()\">\n <mat-label>G</mat-label>\n <input\n matInput\n formControlName=\"g\"\n ngxMatNumericColorInput\n autocomplete=\"off\"\n />\n </mat-form-field>\n\n <mat-form-field [color]=\"theme()\">\n <mat-label>B</mat-label>\n <input\n matInput\n formControlName=\"b\"\n ngxMatNumericColorInput\n autocomplete=\"off\"\n />\n </mat-form-field>\n </div>\n </div>\n\n <div class=\"color-canvas-row\">\n <button\n mat-mini-fab\n [style.background-color]=\"color()?.rgba || 'transparent'\"\n class=\"preview\"\n ></button>\n <mat-form-field [color]=\"theme()\">\n <mat-label>HEX6</mat-label>\n <mat-label matPrefix class=\"symbol\"># </mat-label>\n <input matInput formControlName=\"hex\" autocomplete=\"off\" />\n </mat-form-field>\n <mat-form-field class=\"input-opacity\" [color]=\"theme()\">\n <mat-label>A</mat-label>\n <input\n matInput\n formControlName=\"a\"\n type=\"number\"\n min=\"0\"\n max=\"1\"\n step=\"0.1\"\n autocomplete=\"off\"\n />\n </mat-form-field>\n </div>\n</form>\n","import { NgClass } from '@angular/common';\nimport { Component, Input, output, signal, ViewEncapsulation } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { BASIC_COLORS, stringInputToObject } from '../../helpers';\nimport { Color } from '../../models';\n\n@Component({\n selector: 'ngx-mat-color-collection',\n templateUrl: './color-collection.component.html',\n styleUrls: ['./color-collection.component.scss'],\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'ngx-mat-color-collection',\n },\n imports: [MatButtonModule, NgClass],\n})\nexport class NgxMatColorCollectionComponent {\n readonly colorChanged = output<Color>();\n\n @Input()\n set color(c: Color | undefined | null) {\n if (c) {\n this.selectedColor.set(c.toHexString());\n }\n }\n\n readonly selectedColor = signal<string>('');\n\n colors1: string[] = BASIC_COLORS.slice(0, 8);\n colors2: string[] = BASIC_COLORS.slice(8, 16);\n\n select(hex: string) {\n this.selectedColor.set(hex);\n const rgba = stringInputToObject(hex);\n if (rgba != null) {\n this.colorChanged.emit(new Color(rgba.r, rgba.g, rgba.b, rgba.a));\n }\n }\n}\n","<div class=\"color-collection-row\">\n @for (c of colors1; track c) {\n <button\n mat-mini-fab\n [style.background-color]=\"c\"\n class=\"btn-color\"\n (click)=\"select(c)\"\n [ngClass]=\"{ active: selectedColor() === c }\"\n [disableRipple]=\"true\"></button>\n }\n</div>\n<div class=\"color-collection-row\">\n @for (c of colors2; track c) {\n <button\n mat-mini-fab\n [style.background-color]=\"c\"\n class=\"btn-color\"\n (click)=\"select(c)\"\n [ngClass]=\"{ active: selectedColor() === c }\"\n [disableRipple]=\"true\"></button>\n }\n</div>\n","import { Component, ViewEncapsulation, input, output } from '@angular/core';\nimport { ThemePalette } from '@angular/material/core';\nimport { Color } from '../../models';\nimport { NgxMatColorCanvasComponent } from '../color-canvas/color-canvas.component';\nimport { NgxMatColorCollectionComponent } from '../color-collection/color-collection.component';\n\n@Component({\n selector: 'ngx-mat-color-palette',\n templateUrl: 'color-palette.component.html',\n styleUrls: ['color-palette.component.scss'],\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'ngx-mat-color-palette',\n },\n imports: [NgxMatColorCollectionComponent, NgxMatColorCanvasComponent],\n})\nexport class NgxMatColorPaletteComponent {\n readonly colorChanged = output<Color>();\n\n readonly color = input<Color | undefined | null>();\n readonly theme = input<ThemePalette>();\n\n public handleColorChanged(color: Color) {\n this.colorChanged.emit(color);\n }\n}\n","<ngx-mat-color-canvas\n (colorChanged)=\"handleColorChanged($event)\"\n [color]=\"color()\"\n [theme]=\"theme()\"\n/>\n\n<ngx-mat-color-collection\n (colorChanged)=\"handleColorChanged($event)\"\n [color]=\"color()\"\n/>\n","import { Injectable } from '@angular/core';\nimport { stringInputToObject } from '../helpers';\nimport { Color, ColorInputFormat } from '../models';\n\n@Injectable()\nexport class ColorAdapter {\n sameColor(a: Color, b: Color) {\n if (a == null && b == null) return true;\n if (a != null && b != null) return a.rgba === b.rgba;\n return false;\n }\n\n format(c: Color, format: ColorInputFormat): string {\n return c.toString(format);\n }\n\n parse(value: string): Color | null {\n const obj = stringInputToObject(value);\n if (obj) {\n return new Color(obj.r, obj.g, obj.b, obj.a);\n }\n return null;\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { ColorInputFormat } from '../models';\n\nexport interface MatColorFormats {\n display: {\n colorInput: ColorInputFormat\n };\n}\n\nexport const NGX_MAT_COLOR_FORMATS: MatColorFormats = {\n display: {\n colorInput: 'hex',\n },\n};\n\nexport const MAT_COLOR_FORMATS = new InjectionToken<MatColorFormats>('mat-color-formats');\n","import { Directionality } from '@angular/cdk/bidi';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { ESCAPE, UP_ARROW } from '@angular/cdk/keycodes';\nimport {\n Overlay,\n OverlayConfig,\n OverlayRef,\n PositionStrategy,\n ScrollStrategy,\n} from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\n\nimport {\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n EventEmitter,\n HostBinding,\n InjectionToken,\n Input,\n NgZone,\n OnDestroy,\n Output,\n ViewContainerRef,\n ViewEncapsulation,\n viewChild,\n DOCUMENT,\n ChangeDetectorRef,\n inject,\n OnInit,\n} from '@angular/core';\nimport { ThemePalette } from '@angular/material/core';\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\nimport { Subject, Subscription, merge } from 'rxjs';\nimport { filter, take } from 'rxjs/operators';\nimport { Color } from '../../models';\nimport { ColorAdapter } from '../../services';\nimport { NgxMatColorPaletteComponent } from '../color-palette/color-palette.component';\nimport { NgxMatColorPickerInput } from './color-input.component';\n\n/** Injection token that determines the scroll handling while the calendar is open. */\nexport const NGX_MAT_COLOR_PICKER_SCROLL_STRATEGY = new InjectionToken<() => ScrollStrategy>(\n 'ngx-mat-colorpicker-scroll-strategy',\n);\n\nexport function NGX_MAT_COLOR_PICKER_SCROLL_STRATEGY_FACTORY(\n overlay: Overlay,\n): () => ScrollStrategy {\n return () => overlay.scrollStrategies.reposition();\n}\n\nexport const NGX_MAT_COLOR_PICKER_SCROLL_STRATEGY_FACTORY_PROVIDER = {\n provide: NGX_MAT_COLOR_PICKER_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: NGX_MAT_COLOR_PICKER_SCROLL_STRATEGY_FACTORY,\n};\n\n@Component({\n selector: 'ngx-mat-color-picker-content',\n templateUrl: './color-picker-content.component.html',\n styleUrls: ['../../../../../shared/base-animations.scss', 'color-picker-content.component.scss'],\n host: {\n class: 'ngx-mat-colorpicker-content',\n '[class.ngx-mat-colorpicker-content-touch]': 'picker?.touchUi',\n '(animationend)': '_onAnimationEnd($event)',\n },\n exportAs: 'ngxMatColorPickerContent',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgxMatColorPaletteComponent],\n})\nexport class NgxMatColorPickerContentComponent implements OnInit {\n /** Reference to the internal calendar component. */\n _palette = viewChild(NgxMatColorPaletteComponent);\n\n picker: NgxMatColorPickerComponent | null = null;\n\n @Input() color: ThemePalette;\n\n _isLeaving = false;\n _panelEnterClass: 'enter-dropdown' | 'enter-dialog' | null = null;\n\n @Output() readonly _animationDone = new Subject<void>();\n\n private _cdr = inject(ChangeDetectorRef);\n\n @HostBinding('class.panel-enter-dropdown')\n get isEnterDropdown() {\n return !this._isLeaving && this._panelEnterClass === 'enter-dropdown';\n }\n\n @HostBinding('class.panel-enter-dialog')\n get isEnterDialog() {\n return !this._isLeaving && this._panelEnterClass === 'enter-dialog';\n }\n\n @HostBinding('class.panel-leave')\n get isLeaving() {\n return this._isLeaving;\n }\n\n ngOnInit(): void {\n this._panelEnterClass = this.picker?.touchUi ? 'enter-dialog' : 'enter-dropdown';\n this._cdr.markForCheck(); // ensure initial class is applied\n }\n\n _startExitAnimation() {\n this._isLeaving = true;\n this._cdr.markForCheck(); // trigger class update\n }\n\n _onAnimationEnd(event: AnimationEvent) {\n if (event.animationName === 'panelLeave') {\n this._animationDone.next();\n }\n }\n}\n\n@Component({\n selector: 'ngx-mat-color-picker',\n template: '',\n exportAs: 'ngxMatColorPicker',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [ColorAdapter, NGX_MAT_COLOR_PICKER_SCROLL_STRATEGY_FACTORY_PROVIDER],\n})\nexport class NgxMatColorPickerComponent implements OnDestroy {\n @Input() id = `ngx-mat-color-picker-${Math.floor(Math.random() * 1000000)}`;\n\n /** Emits when the datepicker has been opened. */\n @Output('opened') openedStream: EventEmitter<void> = new EventEmitter<void>();\n\n /** Emits when the datepicker has been closed. */\n @Output('closed') closedStream: EventEmitter<void> = new EventEmitter<void>();\n\n @Input() get disabled() {\n return this._disabled === undefined && this._pickerInput\n ? this._pickerInput.disabled\n : !!this._disabled;\n }\n set disabled(value: boolean) {\n const newValue = coerceBooleanProperty(value);\n\n if (newValue !== this._disabled) {\n this._disabled = newValue;\n this._disabledChange.next(newValue);\n }\n }\n private _disabled = false;\n\n @Input()\n get touchUi(): boolean {\n return this._touchUi;\n }\n set touchUi(value: boolean) {\n this._touchUi = coerceBooleanProperty(value);\n }\n private _touchUi = false;\n\n /** Whether the calendar is open. */\n @Input()\n get opened(): boolean {\n return this._opened;\n }\n set opened(value: boolean) {\n if (value)\n this.open();\n else\n this.close();\n }\n private _opened = false;\n\n /** Default Color palette to use on the datepicker's calendar. */\n @Input()\n get defaultColor(): ThemePalette {\n return this._defaultColor;\n }\n set defaultColor(value: ThemePalette) {\n this._defaultColor = value;\n }\n _defaultColor: ThemePalette = 'primary';\n\n /** Color palette to use on the datepicker's calendar. */\n @Input()\n get color(): ThemePalette {\n return this._color || (this._pickerInput ? this._pickerInput.getThemePalette() : undefined);\n }\n set color(value: ThemePalette) {\n this._color = value;\n }\n _color: ThemePalette;\n\n @HostBinding('class.mat-primary') get isPrimary() {\n return this.color === 'primary';\n }\n @HostBinding('class.mat-accent') get isAccent() {\n return this.color === 'accent';\n }\n @HostBinding('class.mat-warn') get isWarn() {\n return this.color === 'warn';\n }\n\n /** The currently selected date. */\n get _selected(): Color | null {\n return this._validSelected;\n }\n set _selected(value: Color) {\n this._validSelected = value;\n }\n private _validSelected: Color | null = null;\n\n _pickerInput: NgxMatColorPickerInput | null = null;\n /** A reference to the overlay when the picker is opened as a popup. */\n _popupRef: OverlayRef | null = null;\n\n /** A reference to the dialog when the picker is opened as a dialog. */\n private _dialogRef: MatDialogRef<NgxMatColorPickerContentComponent> | null = null;\n /** Reference to the component instantiated in popup mode. */\n private _popupComponentRef: ComponentRef<NgxMatColorPickerContentComponent> | undefined | null = null;\n /** A portal containing the content for this picker. */\n private _portal: ComponentPortal<NgxMatColorPickerContentComponent> | null = null;\n\n /** Emits when the datepicker is disabled. */\n readonly _disabledChange = new EventEmitter<boolean>();\n\n /** The element that was focused before the datepicker was opened. */\n private _focusedElementBeforeOpen: HTMLElement | null = null;\n\n /** Subscription to value changes in the associated input element. */\n private _inputSubscription = Subscription.EMPTY;\n\n /** Emits new selected date when selected date changes. */\n readonly _selectedChanged = new Subject<Color>();\n\n /** Whether an animation is currently in progress. */\n private _isAnimating = false;\n\n private _dialog = inject(MatDialog);\n private _overlay = inject(Overlay);\n private _zone = inject(NgZone);\n private _adapter = inject(ColorAdapter);\n private _dir = inject(Directionality, { optional: true });\n private _scrollStrategy = inject(NGX_MAT_COLOR_PICKER_SCROLL_STRATEGY);\n private _document = inject(DOCUMENT, { optional: true });\n private _viewContainerRef = inject(ViewContainerRef);\n\n ngOnDestroy() {\n this.close();\n this._inputSubscription.unsubscribe();\n this._disabledChange.complete();\n\n if (this._popupRef) {\n this._popupRef.dispose();\n this._popupComponentRef = null;\n }\n }\n\n /** Selects the given date */\n select(nextVal: Color): void {\n const oldValue = this._selected;\n this._selected = nextVal;\n if (!this._adapter.sameColor(oldValue!, this._selected)) {\n this._selectedChanged.next(nextVal);\n }\n }\n\n /**\n * Register an input with this datepicker.\n * @param input The datepicker input to register with this datepicker.\n */\n registerInput(input: NgxMatColorPickerInput): void {\n if (this._pickerInput) {\n throw Error('A ColorPicker can only be associated with a single input.');\n }\n this._pickerInput = input;\n this._inputSubscription = this._pickerInput._valueChange.subscribe(\n (value: Color) => (this._selected = value),\n );\n }\n\n public open(): void {\n if (this._opened || this.disabled || this._isAnimating) {\n return;\n }\n if (!this._pickerInput) {\n throw Error('Attempted to open an ColorPicker with no associated input.');\n }\n\n if (this._document) {\n this._focusedElementBeforeOpen = this._document.activeElement as HTMLElement | null;\n }\n\n if (this.touchUi)\n this._openAsDialog();\n else\n this._openAsPopup();\n\n this._opened = true;\n this.openedStream.emit();\n }\n\n /** Open the calendar as a dialog. */\n private _openAsDialog(): void {\n if (this._dialogRef) {\n this._dialogRef.close();\n }\n\n this._dialogRef = this._dialog.open<NgxMatColorPickerContentComponent>(\n NgxMatColorPickerContentComponent,\n {\n direction: this._dir ? this._dir.value : 'ltr',\n viewContainerRef: this._viewContainerRef,\n panelClass: 'ngx-mat-colorpicker-dialog',\n },\n );\n\n this._dialogRef.afterClosed().subscribe(() => this._handleDialogClosed());\n this._dialogRef.componentInstance.picker = this;\n this._setColor();\n }\n\n private _handleDialogClosed(): void {\n this._opened = false;\n this._isAnimating = false;\n this.closedStream.emit();\n if (this._focusedElementBeforeOpen) {\n this._focusedElementBeforeOpen.focus();\n this._focusedElementBeforeOpen = null;\n }\n this._dialogRef = null;\n }\n\n /** Open the calendar as a popup. */\n private _openAsPopup(): void {\n if (!this._portal) {\n this._portal = new ComponentPortal<NgxMatColorPickerContentComponent>(\n NgxMatColorPickerContentComponent,\n this._viewContainerRef,\n );\n }\n\n if (!this._popupRef) {\n this._createPopup();\n }\n\n if (!this._popupRef?.hasAttached()) {\n this._popupComponentRef = this._popupRef?.attach(this._portal);\n this._popupComponentRef!.instance.picker = this;\n this._setColor();\n\n // Update the position once the calendar has rendered.\n this._zone.onStable\n .asObservable()\n .pipe(take(1))\n .subscribe(() => {\n this._popupRef?.updatePosition();\n });\n }\n }\n\n /** Create the popup. */\n private _createPopup(): void {\n const overlayConfig = new OverlayConfig({\n positionStrategy: this._createPopupPositionStrategy(),\n hasBackdrop: true,\n backdropClass: 'mat-overlay-transparent-backdrop',\n direction: this._dir ?? \"ltr\",\n scrollStrategy: this._scrollStrategy(),\n panelClass: 'mat-colorpicker-popup',\n });\n\n this._popupRef = this._overlay.create(overlayConfig);\n this._popupRef.overlayElement.setAttribute('role', 'dialog');\n\n merge(\n this._popupRef.backdropClick(),\n this._popupRef.detachments(),\n this._popupRef.keydownEvents().pipe(\n filter((event) => {\n // Closing on alt + up is only valid when there's an input associated with the datepicker.\n return (\n event.keyCode === ESCAPE ||\n (this._pickerInput! && event.altKey && event.keyCode === UP_ARROW)\n );\n }),\n ),\n ).subscribe((event) => {\n if (event) {\n event.preventDefault();\n }\n\n this.close();\n });\n }\n\n close(): void {\n if (!this._opened || this._isAnimating) {\n return;\n }\n\n if (this.touchUi) {\n // Dialog mode – close the dialog, state reset happens in afterClosed\n if (this._dialogRef) {\n this._dialogRef.close();\n }\n } else {\n // Popup mode – animate out then clean up\n let contentInstance: NgxMatColorPickerContentComponent | null = null;\n if (this._popupComponentRef) {\n contentInstance = this._popupComponentRef.instance;\n }\n\n const canRestoreFocus =\n this._focusedElementBeforeOpen &&\n typeof this._focusedElementBeforeOpen.focus === 'function';\n\n const completeClose = () => {\n if (this._popupRef && this._popupRef.hasAttached()) {\n this._popupRef.detach();\n }\n if (this._portal && this._portal.isAttached) {\n this._portal.detach();\n }\n this._opened = false;\n this._isAnimating = false;\n this.closedStream.emit();\n if (canRestoreFocus) {\n this._focusedElementBeforeOpen!.focus();\n }\n this._focusedElementBeforeOpen = null;\n };\n\n if (contentInstance) {\n this._isAnimating = true;\n contentInstance._startExitAnimation();\n\n contentInstance._animationDone.pipe(take(1)).subscribe(() => {\n // Restore focus before the timeout to ensure it happens even if the\n // overlay is removed synchronously.\n if (canRestoreFocus) {\n this._focusedElementBeforeOpen!.focus();\n }\n setTimeout(completeClose);\n });\n } else {\n // No content to animate – close immediately\n if (canRestoreFocus) {\n this._focusedElementBeforeOpen!.focus();\n setTimeout(completeClose);\n } else {\n completeClose();\n }\n }\n }\n }\n\n /** Passes the current theme color along to the calendar overlay. */\n private _setColor(): void {\n const color = this.color;\n if (this._popupComponentRef) {\n this._popupComponentRef.instance.color = color;\n }\n if (this._dialogRef) {\n this._dialogRef.componentInstance.color = color;\n }\n }\n\n /** Create the popup PositionStrategy. */\n private _createPopupPositionStrategy(): PositionStrategy {\n return this._overlay\n .position()\n .flexibleConnectedTo(this._pickerInput!.getConnectedOverlayOrigin())\n .withTransformOriginOn('.ngx-mat-colorpicker-content')\n .withFlexibleDimensions(false)\n .withViewportMargin(8)\n .withLockedPosition()\n .withPositions([\n {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'top',\n },\n {\n originX: 'start',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'bottom',\n },\n {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'top',\n },\n {\n originX: 'end',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'bottom',\n },\n ]);\n }\n}\n","<ngx-mat-color-palette\n (colorChanged)=\"picker?.select($event)\"\n [color]=\"picker!._selected\"\n [theme]=\"color\"></ngx-mat-color-palette>\n","import { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { DOWN_ARROW } from '@angular/cdk/keycodes';\nimport {\n Directive,\n ElementRef,\n EventEmitter,\n forwardRef,\n inject,\n Input,\n OnDestroy,\n output,\n Provider,\n} from '@angular/core';\nimport {\n AbstractControl,\n ControlValueAccessor,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ValidationErrors,\n Validator,\n ValidatorFn,\n Validators,\n} from '@angular/forms';\nimport { ThemePalette } from '@angular/material/core';\nimport { MatFormField } from '@angular/material/form-field';\nimport { MAT_INPUT_VALUE_ACCESSOR } from '@angular/material/input';\nimport { Subscription } from 'rxjs';\nimport { createMissingDateImplError } from '../../helpers';\nimport { Color } from '../../models';\nimport { ColorAdapter, MAT_COLOR_FORMATS } from '../../services';\nimport { NgxMatColorPickerComponent } from './color-picker.component';\n\nexport class NgxMatColorPickerInputEvent {\n /** The new value for the target colorpicker input. */\n value: Color | null;\n\n constructor(\n /** Reference to the colorpicker input component that emitted the event. */\n public target: NgxMatColorPickerInput,\n /** Reference to the native input element associated with the colorpicker input. */\n public targetElement: HTMLElement,\n ) {\n this.value = this.target.value;\n }\n}\n\nexport const MAT_COLORPICKER_VALUE_ACCESSOR: Provider = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => NgxMatColorPickerInput),\n multi: true,\n};\n\nexport const MAT_COLORPICKER_VALIDATORS: Provider = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => NgxMatColorPickerInput),\n multi: true,\n};\n\n@Directive({\n selector: 'input[ngxMatColorPicker]',\n providers: [\n { provide: MAT_INPUT_VALUE_ACCESSOR, useExisting: NgxMatColorPickerInput },\n ColorAdapter,\n MAT_COLORPICKER_VALIDATORS,\n MAT_COLORPICKER_VALUE_ACCESSOR,\n ],\n host: {\n '[attr.aria-haspopup]': '_picker ? \"dialog\" : null',\n '[attr.aria-owns]': '(_picker?.opened && _picker?.id) || null',\n '[disabled]': 'disabled',\n '(input)': '_onInput($event)',\n '(change)': '_onChange()',\n '(blur)': '_onBlur()',\n '(keydown)': '_onKeydown($event)',\n },\n exportAs: 'ngxMatColorPickerInput',\n})\nexport class NgxMatColorPickerInput implements ControlValueAccessor, OnDestroy, Validator {\n @Input()\n set ngxMatColorPicker(value: NgxMatColorPickerComponent) {\n if (!value) {\n return;\n }\n\n this._picker = value;\n this._picker.registerInput(this);\n this._pickerSubscription.unsubscribe();\n\n this._pickerSubscription = this._picker._selectedChanged.subscribe((selected: Color) => {\n this.value = selected;\n this._cvaOnChange(selected);\n this._onTouched();\n this.colorInput.emit(new NgxMatColorPickerInputEvent(this, this._elementRef.nativeElement));\n this.colorChange.emit(new NgxMatColorPickerInputEvent(this, this._elementRef.nativeElement));\n });\n }\n _picker: NgxMatColorPickerComponent | null = null;\n\n /** Whether the colorpicker-input is disabled. */\n @Input()\n get disabled(): boolean {\n return !!this._disabled;\n }\n set disabled(value: boolean) {\n const newValue = coerceBooleanProperty(value);\n const element = this._elementRef.nativeElement;\n\n if (this._disabled !== newValue) {\n this._disabled = newValue;\n this._disabledChange.emit(newValue);\n }\n\n // We need to null check the `blur` method, because it's undefined during SSR.\n if (newValue && element.blur) {\n // Normally, native input elements automatically blur if they turn disabled. This behavior\n // is problematic, because it would mean that it triggers another change detection cycle,\n // which then causes a changed after checked error if the input element was focused before.\n element.blur();\n }\n }\n private _disabled = false;\n\n /** The value of the input. */\n @Input()\n get value(): Color | null {\n return this._value;\n }\n set value(value: Color | null) {\n const oldValue = this.value;\n this._value = value;\n this._formatValue(value);\n\n if (!this._adapter.sameColor(oldValue!, value!)) {\n this._valueChange.emit(value);\n }\n }\n private _value: Color | null = null;\n\n /** Emits when a `change` event is fired on this `<input>`. */\n readonly colorChange = output<NgxMatColorPickerInputEvent>();\n\n /** Emits when an `input` event is fired on this `<input>`. */\n readonly colorInput = output<NgxMatColorPickerInputEvent>();\n\n /** Emits when the disabled state has changed */\n _disabledChange = new EventEmitter<boolean>();\n\n /** Emits when the value changes (either due to user input or programmatic change). */\n _valueChange = new EventEmitter<Color | null>();\n\n _onTouched = () => {\n // Intentionally empty.\n };\n\n private _cvaOnChange: (value: any) => void = () => {\n // Intentionally empty.\n };\n\n private _validatorOnChange = () => {\n // Intentionally empty.\n };\n\n private _pickerSubscription = Subscription.EMPTY;\n\n /** The combined form control validator for this input. */\n private _validator: ValidatorFn | null = Validators.compose([]);\n\n /** Whether the last value set on the input was valid. */\n private _lastValueValid = false;\n\n private _elementRef = inject(ElementRef<HTMLInputElement>);\n private _formField = inject(MatFormField, { optional: true });\n private _colorFormats = inject(MAT_COLOR_FORMATS, { optional: true });\n private _adapter = inject(ColorAdapter);\n\n constructor() {\n if (!this._colorFormats) {\n throw createMissingDateImplError('MAT_COLOR_FORMATS');\n }\n }\n\n /** Returns the palette used by the input's form field, if any. */\n public getThemePalette(): ThemePalette {\n return this._formField ? this._formField.color : undefined;\n }\n\n registerOnValidatorChange(fn: () => void): void {\n this._validatorOnChange = fn;\n }\n\n validate(c: AbstractControl): ValidationErrors | null {\n return this._validator ? this._validator(c) : null;\n }\n\n /**\n * @deprecated\n * @breaking-change 8.0.0 Use `getConnectedOverlayOrigin` instead\n */\n getPopupConnectionElementRef(): ElementRef {\n return this.getConnectedOverlayOrigin();\n }\n\n /**\n * Gets the element that the colorpicker popup should be connected to.\n * @return The element to connect the popup to.\n */\n getConnectedOverlayOrigin(): ElementRef {\n return this._formField ? this._formField.getConnectedOverlayOrigin() : this._elementRef;\n }\n\n ngOnDestroy(): void {\n this._pickerSubscription.unsubscribe();\n this._valueChange.complete();\n this._disabledChange.complete();\n }\n\n // Implemented as part of ControlValueAccessor.\n writeValue(value: Color): void {\n this.value = value;\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnChange(fn: (value: any) => void): void {\n this._cvaOnChange = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnTouched(fn: () => void): void {\n this._onTouched = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n _onChange() {\n this.colorChange.emit(new NgxMatColorPickerInputEvent(this, this._elementRef.nativeElement));\n }\n\n _onKeydown(event: KeyboardEvent) {\n const isAltDownArrow = event.altKey && event.keyCode === DOWN_ARROW;\n\n if (this._picker && isAltDownArrow && !this._elementRef.nativeElement.readOnly) {\n this._picker.open();\n event.preventDefault();\n }\n }\n\n /** Handles blur events on the input. */\n _onBlur() {\n // Reformat the input only if we have a valid value.\n if (this.value) {\n this._formatValue(this.value);\n }\n\n this._onTouched();\n }\n\n /** Formats a value and sets it on the input element. */\n private _formatValue(value: Color | null) {\n this._elementRef.nativeElement.value = this._colorFormats && value\n ? this._adapter.format(value, this._colorFormats.display.colorInput)\n : '';\n }\n\n _onInput(event?: Event) {\n const lastValueWasValid = this._lastValueValid;\n const target = event?.target as HTMLInputElement;\n const nextValue = this._adapter.parse(target.value);\n\n if (!this._adapter.sameColor(nextValue!, this._value!)) {\n this._value = nextValue;\n this._cvaOnChange(nextValue);\n this._valueChange.emit(nextValue);\n this.colorInput.emit(new NgxMatColorPickerInputEvent(this, this._elementRef.nativeElement));\n } else if (lastValueWasValid !== this._lastValueValid) {\n this._validatorOnChange();\n }\n }\n}\n","import {\n AfterContentInit,\n ChangeDetectorRef,\n Component,\n Directive,\n EventEmitter,\n Input,\n OnDestroy,\n ViewEncapsulation,\n effect,\n inject,\n input,\n untracked,\n viewChild,\n} from '@angular/core';\nimport { MatButton, MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { Subscription, merge, of } from 'rxjs';\nimport { NgxMatColorPickerComponent } from '../color-picker/color-picker.component';\n\n@Directive({\n selector: '[ngxMatColorpickerToggleIcon]',\n})\nexport class NgxMatColorpickerToggleIcon {}\n\n@Component({\n selector: 'ngx-mat-color-toggle',\n templateUrl: './color-toggle.component.html',\n styleUrls: ['./color-toggle.component.scss'],\n host: {\n class: 'ngx-mat-color-toggle',\n // Always set the tabindex to -1 so that it doesn't overlap with any custom tabindex the\n // consumer may have provided, while still being able to receive focus.\n '[attr.tabindex]': '-1',\n '[class.ngx-mat-color-toggle-active]': 'picker()?.opened',\n '[class.mat-accent]': 'picker()?.color === \"accent\"',\n '[class.mat-warn]': 'picker()?.color === \"warn\"',\n '(focus)': '_button()?.focus()',\n },\n exportAs: 'ngxMatColorPickerToggle',\n encapsulation: ViewEncapsulation.None,\n imports: [MatButtonModule, MatIconModule],\n})\nexport class NgxMatColorToggleComponent implements AfterContentInit, OnDestroy {\n private _stateChanges = Subscription.EMPTY;\n\n picker = input<NgxMatColorPickerComponent>(undefined, { alias: 'for' });\n tabIndex = input<number>();\n\n @Input() get disabled(): boolean | undefined { \n if (this._disabled == null && this.picker()) {\n return this.picker()?.disabled;\n }\n return undefined;\n }\n set disabled(value: boolean) {\n this._disabled = value;\n }\n private _disabled = false;\n\n /** Whether ripples on the toggle should be disabled. */\n disableRipple = input<boolean>();\n\n _button = viewChild<MatButton>('button');\n\n private _cd = inject(ChangeDetectorRef);\n\n constructor() {\n effect(() => {\n this.picker();\n\n untracked(() => this._watchStateChanges());\n });\n }\n\n ngOnDestroy() {\n this._stateChanges.unsubscribe();\n }\n\n ngAfterContentInit() {\n this._watchStateChanges();\n }\n\n public open(event: Event): void {\n if (this.picker() && !this.disabled) {\n this.picker()?.open();\n event.stopPropagation();\n }\n }\n\n private _watchStateChanges() {\n const disabled$ = this.picker()?._disabledChange ?? new EventEmitter();\n const inputDisabled$ = this.picker()?._pickerInput?._disabledChange ?? new EventEmitter();\n\n const pickerToggled$ = this.picker()\n ? merge(this.picker()!.openedStream, this.picker()!.closedStream)\n : of();\n this._stateChanges.unsubscribe();\n\n this._stateChanges = merge(disabled$, inputDisabled$, pickerToggled$).subscribe(() =>\n this._cd.markForCheck(),\n );\n }\n}\n","<button\n #button\n mat-icon-button\n type=\"button\"\n [attr.aria-haspopup]=\"picker() ? 'dialog' : null\"\n [attr.tabindex]=\"disabled ? -1 : tabIndex()\"\n [disabled]=\"disabled\"\n (click)=\"open($event)\"\n [disableRipple]=\"disableRipple()\"\n>\n <ng-content select=\"[ngxMatColorpickerToggleIcon]\">\n <mat-icon [style.color]=\"picker()?._selected?.rgba\">palette</mat-icon>\n </ng-content>\n</button>\n","import { Directive, HostListener } from '@angular/core';\nimport { NUMERIC_REGEX } from '../helpers';\n\n@Directive({\n selector: '[ngxMatNumericColorInput]',\n})\nexport class NumericColorInputDirective {\n @HostListener('input', ['$event'])\n onInput($event: any) {\n this._formatInput($event.target);\n }\n\n /**\n * Format input\n * @param input\n */\n private _formatInput(input: any) {\n let val = Number(input.value.replace(NUMERIC_REGEX, ''));\n val = isNaN(val) ? 0 : val;\n input.value = val;\n }\n}\n","/*\n * Public API Surface of color-picker\n */\nexport * from './lib/components';\nexport * from './lib/directives';\nexport * from './lib/helpers';\nexport * from './lib/models';\nexport * from './lib/services';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,QAAQ,GAAG,MAAM;AACvB,MAAM,SAAS,GAAG,MAAM;AACxB,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK;AAErB,MAAM,aAAa,GAAG;AACtB,MAAM,OAAO,GAAG;AAChB,MAAM,OAAO,GAAG;AAEvB;AACO,MAAM,YAAY,GAAG;IAC1B,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;;AAGX;;;;;AAKG;SACa,kBAAkB,CAChC,GAA6B,EAC7B,CAAS,EACT,CAAS,EAAA;AAET,IAAA,MAAM,SAAS,GAAsB,GAAG,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI;IACtE,OAAO,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE;AAC9D;AAEA;AACA;AACA;AACA;AACM,SAAU,SAAS,CACvB,CAAS,EACT,CAAS,EACT,CAAS,EACT,CAAS,EACT,UAAoB,EAAA;AAEpB,IAAA,MAAM,GAAG,GAAG;QACV,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAC/B,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAC/B,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAC/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;sBAEE,YAAY;uBAAC,OAAO,EAAE,CAAC,QAAQ,CAAC;;;ACPnC;;AAEG;;ACFH;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { OnDestroy, AfterViewInit, NgZone, OnInit, OnChanges, SimpleChanges,
|
|
2
|
+
import { OnDestroy, AfterViewInit, NgZone, OnInit, OnChanges, SimpleChanges, Provider, EventEmitter, ElementRef, InjectionToken, AfterContentInit } from '@angular/core';
|
|
3
3
|
import { ThemePalette } from '@angular/material/core';
|
|
4
4
|
import { AbstractControl, FormGroup, ControlValueAccessor, Validator, ValidationErrors } from '@angular/forms';
|
|
5
5
|
import { Subject } from 'rxjs';
|
|
6
|
-
import { Directionality } from '@angular/cdk/bidi';
|
|
7
6
|
import { ScrollStrategy, Overlay, OverlayRef } from '@angular/cdk/overlay';
|
|
8
|
-
import { MatDialog } from '@angular/material/dialog';
|
|
9
|
-
import { MatFormField } from '@angular/material/form-field';
|
|
10
7
|
import { MatButton } from '@angular/material/button';
|
|
11
8
|
|
|
12
9
|
type ColorInputFormat = 'rgb' | 'hex' | 'hex6' | 'hex3' | 'hex4' | 'hex8';
|
|
@@ -39,7 +36,6 @@ declare class NgxMatColorPaletteComponent {
|
|
|
39
36
|
}
|
|
40
37
|
|
|
41
38
|
declare abstract class NgxMatBaseColorCanvas implements OnDestroy, AfterViewInit {
|
|
42
|
-
protected zone: NgZone;
|
|
43
39
|
readonly colorChanged: i0.OutputEmitterRef<Color>;
|
|
44
40
|
readonly theme: i0.InputSignal<ThemePalette>;
|
|
45
41
|
readonly color: i0.WritableSignal<Color | null | undefined>;
|
|
@@ -53,13 +49,14 @@ declare abstract class NgxMatBaseColorCanvas implements OnDestroy, AfterViewInit
|
|
|
53
49
|
y: number;
|
|
54
50
|
drag: boolean;
|
|
55
51
|
protected _destroyed: Subject<void>;
|
|
56
|
-
|
|
52
|
+
protected zone: NgZone | null;
|
|
53
|
+
constructor(elementId: string);
|
|
57
54
|
ngOnDestroy(): void;
|
|
58
55
|
ngAfterViewInit(): void;
|
|
59
56
|
protected draw(): void;
|
|
60
57
|
onMousedown(e: MouseEvent): void;
|
|
61
58
|
onMousemove(e: MouseEvent): void;
|
|
62
|
-
onMouseup(
|
|
59
|
+
onMouseup(_: MouseEvent): void;
|
|
63
60
|
emitChange(color: Color): void;
|
|
64
61
|
abstract changeColor(e: MouseEvent): void;
|
|
65
62
|
abstract fillGradient(): void;
|
|
@@ -69,7 +66,6 @@ declare abstract class NgxMatBaseColorCanvas implements OnDestroy, AfterViewInit
|
|
|
69
66
|
}
|
|
70
67
|
|
|
71
68
|
declare class NgxMatColorCanvasComponent extends NgxMatBaseColorCanvas implements OnInit, AfterViewInit, OnChanges, OnDestroy {
|
|
72
|
-
zone: NgZone;
|
|
73
69
|
private _baseColor;
|
|
74
70
|
get rCtrl(): AbstractControl | null;
|
|
75
71
|
get gCtrl(): AbstractControl | null;
|
|
@@ -79,7 +75,8 @@ declare class NgxMatColorCanvasComponent extends NgxMatBaseColorCanvas implement
|
|
|
79
75
|
_resetBaseColor: boolean;
|
|
80
76
|
formGroup: FormGroup;
|
|
81
77
|
rgba: string;
|
|
82
|
-
|
|
78
|
+
protected zone: NgZone;
|
|
79
|
+
constructor();
|
|
83
80
|
ngOnInit(): void;
|
|
84
81
|
ngOnChanges(changes: SimpleChanges): void;
|
|
85
82
|
private updateForm;
|
|
@@ -103,8 +100,8 @@ declare class NgxMatColorCollectionComponent {
|
|
|
103
100
|
}
|
|
104
101
|
|
|
105
102
|
declare class NgxMatColorSliderComponent extends NgxMatBaseColorCanvas {
|
|
106
|
-
zone: NgZone;
|
|
107
|
-
constructor(
|
|
103
|
+
protected zone: NgZone;
|
|
104
|
+
constructor();
|
|
108
105
|
ngAfterViewInit(): void;
|
|
109
106
|
fillGradient(): void;
|
|
110
107
|
redrawIndicator(x: number, y: number): void;
|
|
@@ -113,22 +110,6 @@ declare class NgxMatColorSliderComponent extends NgxMatBaseColorCanvas {
|
|
|
113
110
|
static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatColorSliderComponent, "ngx-mat-color-slider", never, {}, {}, never, never, true, never>;
|
|
114
111
|
}
|
|
115
112
|
|
|
116
|
-
declare class ColorAdapter {
|
|
117
|
-
sameColor(a: Color, b: Color): boolean;
|
|
118
|
-
format(c: Color, format: ColorInputFormat): string;
|
|
119
|
-
parse(value: string): Color | null;
|
|
120
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ColorAdapter, never>;
|
|
121
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<ColorAdapter>;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
type MatColorFormats = {
|
|
125
|
-
display: {
|
|
126
|
-
colorInput: ColorInputFormat;
|
|
127
|
-
};
|
|
128
|
-
};
|
|
129
|
-
declare const NGX_MAT_COLOR_FORMATS: MatColorFormats;
|
|
130
|
-
declare const MAT_COLOR_FORMATS: InjectionToken<MatColorFormats>;
|
|
131
|
-
|
|
132
113
|
declare class NgxMatColorPickerInputEvent {
|
|
133
114
|
/** Reference to the colorpicker input component that emitted the event. */
|
|
134
115
|
target: NgxMatColorPickerInput;
|
|
@@ -142,13 +123,9 @@ declare class NgxMatColorPickerInputEvent {
|
|
|
142
123
|
/** Reference to the native input element associated with the colorpicker input. */
|
|
143
124
|
targetElement: HTMLElement);
|
|
144
125
|
}
|
|
145
|
-
declare const MAT_COLORPICKER_VALUE_ACCESSOR:
|
|
146
|
-
declare const MAT_COLORPICKER_VALIDATORS:
|
|
147
|
-
declare class NgxMatColorPickerInput implements ControlValueAccessor,
|
|
148
|
-
private _elementRef;
|
|
149
|
-
private _formField;
|
|
150
|
-
private _colorFormats;
|
|
151
|
-
private _adapter;
|
|
126
|
+
declare const MAT_COLORPICKER_VALUE_ACCESSOR: Provider;
|
|
127
|
+
declare const MAT_COLORPICKER_VALIDATORS: Provider;
|
|
128
|
+
declare class NgxMatColorPickerInput implements ControlValueAccessor, OnDestroy, Validator {
|
|
152
129
|
set ngxMatColorPicker(value: NgxMatColorPickerComponent);
|
|
153
130
|
_picker: NgxMatColorPickerComponent | null;
|
|
154
131
|
/** Whether the colorpicker-input is disabled. */
|
|
@@ -175,7 +152,11 @@ declare class NgxMatColorPickerInput implements ControlValueAccessor, OnInit, On
|
|
|
175
152
|
private _validator;
|
|
176
153
|
/** Whether the last value set on the input was valid. */
|
|
177
154
|
private _lastValueValid;
|
|
178
|
-
|
|
155
|
+
private _elementRef;
|
|
156
|
+
private _formField;
|
|
157
|
+
private _colorFormats;
|
|
158
|
+
private _adapter;
|
|
159
|
+
constructor();
|
|
179
160
|
/** Returns the palette used by the input's form field, if any. */
|
|
180
161
|
getThemePalette(): ThemePalette;
|
|
181
162
|
registerOnValidatorChange(fn: () => void): void;
|
|
@@ -190,7 +171,6 @@ declare class NgxMatColorPickerInput implements ControlValueAccessor, OnInit, On
|
|
|
190
171
|
* @return The element to connect the popup to.
|
|
191
172
|
*/
|
|
192
173
|
getConnectedOverlayOrigin(): ElementRef;
|
|
193
|
-
ngOnInit(): void;
|
|
194
174
|
ngOnDestroy(): void;
|
|
195
175
|
writeValue(value: Color): void;
|
|
196
176
|
registerOnChange(fn: (value: any) => void): void;
|
|
@@ -203,7 +183,7 @@ declare class NgxMatColorPickerInput implements ControlValueAccessor, OnInit, On
|
|
|
203
183
|
/** Formats a value and sets it on the input element. */
|
|
204
184
|
private _formatValue;
|
|
205
185
|
_onInput(event?: Event): void;
|
|
206
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatColorPickerInput,
|
|
186
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatColorPickerInput, never>;
|
|
207
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>;
|
|
208
188
|
}
|
|
209
189
|
|
|
@@ -234,15 +214,7 @@ declare class NgxMatColorPickerContentComponent implements OnInit {
|
|
|
234
214
|
static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatColorPickerContentComponent, "ngx-mat-color-picker-content", ["ngxMatColorPickerContent"], { "color": { "alias": "color"; "required": false; }; }, { "_animationDone": "_animationDone"; }, never, never, true, never>;
|
|
235
215
|
}
|
|
236
216
|
declare class NgxMatColorPickerComponent implements OnDestroy {
|
|
237
|
-
private _dialog;
|
|
238
|
-
private _overlay;
|
|
239
|
-
private _zone;
|
|
240
|
-
private _adapter;
|
|
241
|
-
private _dir;
|
|
242
|
-
private _document;
|
|
243
|
-
private _viewContainerRef;
|
|
244
217
|
id: string;
|
|
245
|
-
private _scrollStrategy;
|
|
246
218
|
/** Emits when the datepicker has been opened. */
|
|
247
219
|
openedStream: EventEmitter<void>;
|
|
248
220
|
/** Emits when the datepicker has been closed. */
|
|
@@ -291,7 +263,14 @@ declare class NgxMatColorPickerComponent implements OnDestroy {
|
|
|
291
263
|
readonly _selectedChanged: Subject<Color>;
|
|
292
264
|
/** Whether an animation is currently in progress. */
|
|
293
265
|
private _isAnimating;
|
|
294
|
-
|
|
266
|
+
private _dialog;
|
|
267
|
+
private _overlay;
|
|
268
|
+
private _zone;
|
|
269
|
+
private _adapter;
|
|
270
|
+
private _dir;
|
|
271
|
+
private _scrollStrategy;
|
|
272
|
+
private _document;
|
|
273
|
+
private _viewContainerRef;
|
|
295
274
|
ngOnDestroy(): void;
|
|
296
275
|
/** Selects the given date */
|
|
297
276
|
select(nextVal: Color): void;
|
|
@@ -313,7 +292,7 @@ declare class NgxMatColorPickerComponent implements OnDestroy {
|
|
|
313
292
|
private _setColor;
|
|
314
293
|
/** Create the popup PositionStrategy. */
|
|
315
294
|
private _createPopupPositionStrategy;
|
|
316
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatColorPickerComponent,
|
|
295
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatColorPickerComponent, never>;
|
|
317
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>;
|
|
318
297
|
}
|
|
319
298
|
|
|
@@ -322,7 +301,6 @@ declare class NgxMatColorpickerToggleIcon {
|
|
|
322
301
|
static ɵdir: i0.ɵɵDirectiveDeclaration<NgxMatColorpickerToggleIcon, "[ngxMatColorpickerToggleIcon]", never, {}, {}, never, never, true, never>;
|
|
323
302
|
}
|
|
324
303
|
declare class NgxMatColorToggleComponent implements AfterContentInit, OnDestroy {
|
|
325
|
-
private _cd;
|
|
326
304
|
private _stateChanges;
|
|
327
305
|
picker: i0.InputSignal<NgxMatColorPickerComponent | undefined>;
|
|
328
306
|
tabIndex: i0.InputSignal<number | undefined>;
|
|
@@ -332,7 +310,8 @@ declare class NgxMatColorToggleComponent implements AfterContentInit, OnDestroy
|
|
|
332
310
|
/** Whether ripples on the toggle should be disabled. */
|
|
333
311
|
disableRipple: i0.InputSignal<boolean | undefined>;
|
|
334
312
|
_button: i0.Signal<MatButton | undefined>;
|
|
335
|
-
|
|
313
|
+
private _cd;
|
|
314
|
+
constructor();
|
|
336
315
|
ngOnDestroy(): void;
|
|
337
316
|
ngAfterContentInit(): void;
|
|
338
317
|
open(event: Event): void;
|
|
@@ -393,5 +372,21 @@ declare function stringInputToObject(color: string): {
|
|
|
393
372
|
} | null;
|
|
394
373
|
declare function createMissingDateImplError(provider: string): Error;
|
|
395
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<ColorAdapter>;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
interface MatColorFormats {
|
|
384
|
+
display: {
|
|
385
|
+
colorInput: ColorInputFormat;
|
|
386
|
+
};
|
|
387
|
+
}
|
|
388
|
+
declare const NGX_MAT_COLOR_FORMATS: MatColorFormats;
|
|
389
|
+
declare const MAT_COLOR_FORMATS: InjectionToken<MatColorFormats>;
|
|
390
|
+
|
|
396
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 };
|
|
397
392
|
export type { ColorInputFormat, MatColorFormats };
|