@progress/kendo-angular-inputs 8.0.5 → 8.0.6-dev.202202221323

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.
@@ -94,6 +94,8 @@ var ColorGradientComponent = /** @class */ (function () {
94
94
  this.hsva = new BehaviorSubject({});
95
95
  this._tabindex = 0;
96
96
  this.listeners = [];
97
+ this.hueSliderTouched = false;
98
+ this.alphaSliderTouched = false;
97
99
  this.updateValues = new Subject();
98
100
  this.notifyNgChanged = function () { };
99
101
  this.notifyNgTouched = function () { };
@@ -353,7 +355,9 @@ var ColorGradientComponent = /** @class */ (function () {
353
355
  this.hsva.next(hsva);
354
356
  this.handleValueChange(getColorFromHSV(this.hsva.value, this.format, this.opacity));
355
357
  this.backgroundColor = getColorFromHue(hue);
358
+ this.setBackgroundColor(this.backgroundColor);
356
359
  this.setAlphaSliderBackground(this.backgroundColor);
360
+ this.hueSliderTouched = true;
357
361
  };
358
362
  /**
359
363
  * @hidden
@@ -363,6 +367,7 @@ var ColorGradientComponent = /** @class */ (function () {
363
367
  hsva.a = alpha / 100;
364
368
  this.hsva.next(hsva);
365
369
  this.handleValueChange(getColorFromHSV(this.hsva.value, this.format, this.opacity));
370
+ this.alphaSliderTouched = true;
366
371
  };
367
372
  /**
368
373
  * @hidden
@@ -474,19 +479,6 @@ var ColorGradientComponent = /** @class */ (function () {
474
479
  this.updateValues.next(getColorFromHSV(this.hsva.value, this.format, this.opacity));
475
480
  this.setAlphaSliderBackground(getColorFromHSV(tslib_1.__assign({}, this.hsva.value, { a: 1 }), this.format, this.opacity));
476
481
  };
477
- ColorGradientComponent.prototype.updateUI = function () {
478
- if (!isDocumentAvailable()) {
479
- return;
480
- }
481
- this.hsva.next(this.value ? getHSV(this.value) : { h: 0, s: 0, v: 1, a: 1 });
482
- var gradientRect = this.gradientRect;
483
- var top = (1 - this.hsva.value.v) * gradientRect.height;
484
- var left = this.hsva.value.s * gradientRect.width;
485
- this.setDragHandleElementPosition(top, left);
486
- this.backgroundColor = getColorFromHue(this.hsva.value.h);
487
- this.setAlphaSliderBackground(this.backgroundColor);
488
- this.setHostElementAriaLabel();
489
- };
490
482
  ColorGradientComponent.prototype.handleValueChange = function (color) {
491
483
  if (this.value === color) {
492
484
  return;
@@ -512,6 +504,28 @@ var ColorGradientComponent = /** @class */ (function () {
512
504
  var parsed = parseColor(this.value, this.format, this.opacity);
513
505
  this.renderer.setAttribute(this.host.nativeElement, 'aria-label', "" + (this.value ? parsed : this.localizationService.get('colorGradientNoColor')));
514
506
  };
507
+ ColorGradientComponent.prototype.setBackgroundColor = function (color) {
508
+ this.renderer.setStyle(this.hsvRectangle.nativeElement, 'background', color);
509
+ };
510
+ ColorGradientComponent.prototype.updateUI = function () {
511
+ if (!isDocumentAvailable()) {
512
+ return;
513
+ }
514
+ if (this.hueSliderTouched || this.alphaSliderTouched) {
515
+ this.hueSliderTouched = false;
516
+ this.alphaSliderTouched = false;
517
+ return;
518
+ }
519
+ this.hsva.next(this.value ? getHSV(this.value) : { h: 0, s: 0, v: 1, a: 1 });
520
+ var gradientRect = this.gradientRect;
521
+ var top = (1 - this.hsva.value.v) * gradientRect.height;
522
+ var left = this.hsva.value.s * gradientRect.width;
523
+ this.setDragHandleElementPosition(top, left);
524
+ this.backgroundColor = getColorFromHue(this.hsva.value.h);
525
+ this.setBackgroundColor(this.backgroundColor);
526
+ this.setAlphaSliderBackground(this.backgroundColor);
527
+ this.setHostElementAriaLabel();
528
+ };
515
529
  ColorGradientComponent.prototype.addEventListeners = function () {
516
530
  var _this = this;
517
531
  this.ngZone.runOutsideAngular(function () {
@@ -641,6 +655,10 @@ var ColorGradientComponent = /** @class */ (function () {
641
655
  ViewChild('gradientWrapper', { static: false }),
642
656
  tslib_1.__metadata("design:type", ElementRef)
643
657
  ], ColorGradientComponent.prototype, "gradientWrapper", void 0);
658
+ tslib_1.__decorate([
659
+ ViewChild('hsvRectangle', { static: false }),
660
+ tslib_1.__metadata("design:type", ElementRef)
661
+ ], ColorGradientComponent.prototype, "hsvRectangle", void 0);
644
662
  ColorGradientComponent = ColorGradientComponent_1 = tslib_1.__decorate([
645
663
  Component({
646
664
  exportAs: 'kendoColorGradient',
@@ -665,7 +683,7 @@ var ColorGradientComponent = /** @class */ (function () {
665
683
  useValue: 'kendo.colorgradient'
666
684
  }
667
685
  ],
668
- template: "\n <ng-container kendoColorGradientLocalizedMessages\n i18n-colorGradientNoColor=\"kendo.colorgradient.colorGradientNoColor|The aria-label applied to the ColorGradient component when the value is empty.\"\n colorGradientNoColor=\"Colorgradient no color chosen\"\n i18n-colorGradientHandle=\"kendo.colorgradient.colorGradientHandle|The title for the gradient color drag handle chooser.\"\n colorGradientHandle=\"Choose color\"\n i18n-clearButton=\"kendo.colorgradient.clearButton|The title for the clear button.\"\n clearButton=\"Clear value\"\n i18n-hueSliderHandle=\"kendo.colorgradient.hueSliderHandle|The title for the hue slider handle.\"\n hueSliderHandle=\"Set hue\"\n i18n-opacitySliderHandle=\"kendo.colorgradient.opacitySliderHandle|The title for the opacity slider handle.\"\n opacitySliderHandle=\"Set opacity\"\n i18n-passContrast=\"kendo.colorgradient.passContrast|The pass message for the contrast tool.\"\n passContrast=\"Pass\"\n i18n-failContrast=\"kendo.colorgradient.failContrast|The fail message for the contrast tool.\"\n failContrast=\"Fail\"\n i18n-contrastRatio=\"kendo.colorgradient.contrastRatio|The contrast ratio message for the contrast tool.\"\n contrastRatio=\"Contrast ratio\"\n i18n-formatButton=\"kendo.colorgradient.formatButton|The message for the input format toggle button.\"\n formatButton=\"Change color format\">\n </ng-container>\n <div class=\"k-colorgradient-canvas k-hstack\">\n <div class=\"k-hsv-rectangle\" [style.background]=\"backgroundColor\">\n <div\n #gradientWrapper\n kendoDraggable\n class=\"k-hsv-gradient\"\n (click)=\"changePosition($event)\"\n (kendoPress)=\"handleDragPress($event)\"\n (kendoDrag)=\"onHandleDrag($event)\"\n (kendoRelease)=\"onHandleRelease()\">\n <div\n #gradientDragHandle\n class=\"k-hsv-draghandle k-draghandle\"\n tabindex=\"0\"\n [attr.title]=\"colorGradientHandleTitle\"\n [attr.aria-label]=\"colorGradientHandleAriaLabel\"\n >\n </div>\n </div>\n <svg kendoColorContrastSvg\n *ngIf=\"contrastToolVisible && gradientWrapper\"\n class=\"k-color-contrast-svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n [wrapper]=\"gradientWrapper ? gradientWrapper : undefined\"\n [hsva]=\"hsva\"\n [backgroundColor]=\"contrastTool\">\n </svg>\n </div>\n <div class=\"k-hsv-controls k-hstack {{ clearButton ? 'k-sliders-wrap-clearable' : '' }}\">\n <span class=\"k-clear-color k-button k-button-md k-button-flat k-button-flat-base k-button-icon\"\n *ngIf=\"clearButton\"\n (click)=\"reset()\"\n (keydown.enter)=\"reset()\"\n (keydown.space)=\"reset()\"\n [attr.aria-label]=\"clearButtonTitle\"\n [attr.title]=\"clearButtonTitle\"\n tabindex=\"0\">\n <span class=\"k-icon k-i-reset-color\"></span>\n </span>\n <kendo-slider\n [ngClass]=\"{'k-align-self-end': clearButton}\"\n class=\"k-hue-slider k-colorgradient-slider\"\n [dragHandleTitle]=\"hueSliderTitle\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [showButtons]=\"false\"\n [tickPlacement]=\"'none'\"\n [vertical]=\"true\"\n [min]=\"0\"\n [max]=\"360\"\n [smallStep]=\"5\"\n [largeStep]=\"10\"\n [value]=\"hsva.value.h\"\n (valueChange)=\"handleHueSliderChange($event)\"\n >\n </kendo-slider>\n <kendo-slider\n *ngIf=\"opacity\"\n #alphaSlider\n [ngClass]=\"{'k-align-self-end': clearButton}\"\n class=\"k-alpha-slider k-colorgradient-slider\"\n [dragHandleTitle]=\"opacitySliderTitle\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [showButtons]=\"false\"\n [tickPlacement]=\"'none'\"\n [vertical]=\"true\"\n [min]=\"0\"\n [max]=\"100\"\n [smallStep]=\"1\"\n [largeStep]=\"10\"\n [value]=\"alphaSliderValue\"\n (valueChange)=\"handleAlphaSliderChange($event)\"\n >\n </kendo-slider>\n </div>\n </div>\n <kendo-colorinput #inputs\n [opacity]=\"opacity\"\n [formatView]=\"format\"\n [value]=\"value\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n (valueChange)=\"handleInputsValueChange($event)\"\n >\n </kendo-colorinput>\n <div class=\"k-colorgradient-color-contrast k-vbox\" *ngIf=\"contrastToolVisible\"\n kendoContrastTool\n [value]=\"value\"\n [ratio]=\"contrastTool\">\n </div>\n ",
686
+ template: "\n <ng-container kendoColorGradientLocalizedMessages\n i18n-colorGradientNoColor=\"kendo.colorgradient.colorGradientNoColor|The aria-label applied to the ColorGradient component when the value is empty.\"\n colorGradientNoColor=\"Colorgradient no color chosen\"\n i18n-colorGradientHandle=\"kendo.colorgradient.colorGradientHandle|The title for the gradient color drag handle chooser.\"\n colorGradientHandle=\"Choose color\"\n i18n-clearButton=\"kendo.colorgradient.clearButton|The title for the clear button.\"\n clearButton=\"Clear value\"\n i18n-hueSliderHandle=\"kendo.colorgradient.hueSliderHandle|The title for the hue slider handle.\"\n hueSliderHandle=\"Set hue\"\n i18n-opacitySliderHandle=\"kendo.colorgradient.opacitySliderHandle|The title for the opacity slider handle.\"\n opacitySliderHandle=\"Set opacity\"\n i18n-passContrast=\"kendo.colorgradient.passContrast|The pass message for the contrast tool.\"\n passContrast=\"Pass\"\n i18n-failContrast=\"kendo.colorgradient.failContrast|The fail message for the contrast tool.\"\n failContrast=\"Fail\"\n i18n-contrastRatio=\"kendo.colorgradient.contrastRatio|The contrast ratio message for the contrast tool.\"\n contrastRatio=\"Contrast ratio\"\n i18n-formatButton=\"kendo.colorgradient.formatButton|The message for the input format toggle button.\"\n formatButton=\"Change color format\">\n </ng-container>\n <div class=\"k-colorgradient-canvas k-hstack\">\n <div class=\"k-hsv-rectangle\" #hsvRectangle>\n <div\n #gradientWrapper\n kendoDraggable\n class=\"k-hsv-gradient\"\n (click)=\"changePosition($event)\"\n (kendoPress)=\"handleDragPress($event)\"\n (kendoDrag)=\"onHandleDrag($event)\"\n (kendoRelease)=\"onHandleRelease()\">\n <div\n #gradientDragHandle\n class=\"k-hsv-draghandle k-draghandle\"\n tabindex=\"0\"\n [attr.title]=\"colorGradientHandleTitle\"\n [attr.aria-label]=\"colorGradientHandleAriaLabel\"\n >\n </div>\n </div>\n <svg kendoColorContrastSvg\n *ngIf=\"contrastToolVisible && gradientWrapper\"\n class=\"k-color-contrast-svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n [wrapper]=\"gradientWrapper ? gradientWrapper : undefined\"\n [hsva]=\"hsva\"\n [backgroundColor]=\"contrastTool\">\n </svg>\n </div>\n <div class=\"k-hsv-controls k-hstack {{ clearButton ? 'k-sliders-wrap-clearable' : '' }}\">\n <span class=\"k-clear-color k-button k-button-md k-button-flat k-button-flat-base k-button-icon\"\n *ngIf=\"clearButton\"\n (click)=\"reset()\"\n (keydown.enter)=\"reset()\"\n (keydown.space)=\"reset()\"\n [attr.aria-label]=\"clearButtonTitle\"\n [attr.title]=\"clearButtonTitle\"\n tabindex=\"0\">\n <span class=\"k-icon k-i-reset-color\"></span>\n </span>\n <kendo-slider\n [ngClass]=\"{'k-align-self-end': clearButton}\"\n class=\"k-hue-slider k-colorgradient-slider\"\n [dragHandleTitle]=\"hueSliderTitle\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [showButtons]=\"false\"\n [tickPlacement]=\"'none'\"\n [vertical]=\"true\"\n [min]=\"0\"\n [max]=\"360\"\n [value]=\"hsva.value.h\"\n [smallStep]=\"5\"\n [largeStep]=\"10\"\n (valueChange)=\"handleHueSliderChange($event)\"\n >\n </kendo-slider>\n <kendo-slider\n *ngIf=\"opacity\"\n #alphaSlider\n [ngClass]=\"{'k-align-self-end': clearButton}\"\n class=\"k-alpha-slider k-colorgradient-slider\"\n [dragHandleTitle]=\"opacitySliderTitle\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [showButtons]=\"false\"\n [tickPlacement]=\"'none'\"\n [vertical]=\"true\"\n [min]=\"0\"\n [max]=\"100\"\n [smallStep]=\"1\"\n [largeStep]=\"10\"\n [value]=\"alphaSliderValue\"\n (valueChange)=\"handleAlphaSliderChange($event)\"\n >\n </kendo-slider>\n </div>\n </div>\n <kendo-colorinput #inputs\n [opacity]=\"opacity\"\n [formatView]=\"format\"\n [value]=\"value\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n (valueChange)=\"handleInputsValueChange($event)\"\n >\n </kendo-colorinput>\n <div class=\"k-colorgradient-color-contrast k-vbox\"\n *ngIf=\"contrastToolVisible\"\n kendoContrastTool\n [value]=\"value\"\n [ratio]=\"contrastTool\">\n </div>\n ",
669
687
  styles: ["\n .k-clear-color {\n position: absolute;\n top: 0;\n left: 50%;\n transform: translateX(-50%);\n }\n .k-colorgradient-slider.k-align-self-end {\n height: 140px;\n }\n\n .k-color-contrast-svg {\n position: absolute;\n overflow: visible;\n pointer-events: none;\n left: 0px;\n top: 0px;\n }\n "]
670
688
  }),
671
689
  tslib_1.__metadata("design:paramtypes", [ElementRef,
@@ -208,6 +208,7 @@ var FlatColorPickerComponent = /** @class */ (function () {
208
208
  };
209
209
  FlatColorPickerComponent.prototype.ngOnChanges = function (changes) {
210
210
  if (isChanged('value', changes)) {
211
+ this.selection = this.value;
211
212
  this.setHostElementAriaLabel();
212
213
  }
213
214
  if (isChanged('paletteSettings', changes)) {
@@ -298,15 +299,7 @@ var FlatColorPickerComponent = /** @class */ (function () {
298
299
  * @hidden
299
300
  */
300
301
  FlatColorPickerComponent.prototype.handleValueChange = function (color) {
301
- if (this.value === color) {
302
- return;
303
- }
304
- if (this.preview) {
305
- this.changeCurrentValue(color);
306
- }
307
- else {
308
- this.setFlatColorPickerValue(color);
309
- }
302
+ this.preview ? this.changeCurrentValue(color) : this.setFlatColorPickerValue(color);
310
303
  };
311
304
  /**
312
305
  * @hidden
@@ -9,7 +9,7 @@ export var packageMetadata = {
9
9
  name: '@progress/kendo-angular-inputs',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1645175564,
12
+ publishDate: 1645536043,
13
13
  version: '',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
15
15
  };
@@ -112,10 +112,13 @@ export declare class ColorGradientComponent implements OnChanges, OnDestroy, Con
112
112
  inputs: ColorInputComponent;
113
113
  private alphaSlider;
114
114
  private gradientWrapper;
115
+ private hsvRectangle;
115
116
  private _value;
116
117
  private _tabindex;
117
118
  private _contrastTool;
118
119
  private listeners;
120
+ private hueSliderTouched;
121
+ private alphaSliderTouched;
119
122
  private updateValues;
120
123
  private changeRequestsSubscription;
121
124
  private dynamicRTLSubscription;
@@ -212,11 +215,12 @@ export declare class ColorGradientComponent implements OnChanges, OnDestroy, Con
212
215
  private notifyNgChanged;
213
216
  private notifyNgTouched;
214
217
  private moveDragHandle;
215
- private updateUI;
216
218
  private handleValueChange;
217
219
  private setDragHandleElementPosition;
218
220
  private setAlphaSliderBackground;
219
221
  private setHostElementAriaLabel;
222
+ private setBackgroundColor;
223
+ private updateUI;
220
224
  private addEventListeners;
221
225
  private subscribeChanges;
222
226
  private unsubscribeChanges;
@@ -94,6 +94,8 @@ let ColorGradientComponent = ColorGradientComponent_1 = class ColorGradientCompo
94
94
  this.hsva = new BehaviorSubject({});
95
95
  this._tabindex = 0;
96
96
  this.listeners = [];
97
+ this.hueSliderTouched = false;
98
+ this.alphaSliderTouched = false;
97
99
  this.updateValues = new Subject();
98
100
  this.notifyNgChanged = () => { };
99
101
  this.notifyNgTouched = () => { };
@@ -305,7 +307,9 @@ let ColorGradientComponent = ColorGradientComponent_1 = class ColorGradientCompo
305
307
  this.hsva.next(hsva);
306
308
  this.handleValueChange(getColorFromHSV(this.hsva.value, this.format, this.opacity));
307
309
  this.backgroundColor = getColorFromHue(hue);
310
+ this.setBackgroundColor(this.backgroundColor);
308
311
  this.setAlphaSliderBackground(this.backgroundColor);
312
+ this.hueSliderTouched = true;
309
313
  }
310
314
  /**
311
315
  * @hidden
@@ -315,6 +319,7 @@ let ColorGradientComponent = ColorGradientComponent_1 = class ColorGradientCompo
315
319
  hsva.a = alpha / 100;
316
320
  this.hsva.next(hsva);
317
321
  this.handleValueChange(getColorFromHSV(this.hsva.value, this.format, this.opacity));
322
+ this.alphaSliderTouched = true;
318
323
  }
319
324
  /**
320
325
  * @hidden
@@ -406,19 +411,6 @@ let ColorGradientComponent = ColorGradientComponent_1 = class ColorGradientCompo
406
411
  this.updateValues.next(getColorFromHSV(this.hsva.value, this.format, this.opacity));
407
412
  this.setAlphaSliderBackground(getColorFromHSV(Object.assign({}, this.hsva.value, { a: 1 }), this.format, this.opacity));
408
413
  }
409
- updateUI() {
410
- if (!isDocumentAvailable()) {
411
- return;
412
- }
413
- this.hsva.next(this.value ? getHSV(this.value) : { h: 0, s: 0, v: 1, a: 1 });
414
- const gradientRect = this.gradientRect;
415
- const top = (1 - this.hsva.value.v) * gradientRect.height;
416
- const left = this.hsva.value.s * gradientRect.width;
417
- this.setDragHandleElementPosition(top, left);
418
- this.backgroundColor = getColorFromHue(this.hsva.value.h);
419
- this.setAlphaSliderBackground(this.backgroundColor);
420
- this.setHostElementAriaLabel();
421
- }
422
414
  handleValueChange(color) {
423
415
  if (this.value === color) {
424
416
  return;
@@ -444,6 +436,28 @@ let ColorGradientComponent = ColorGradientComponent_1 = class ColorGradientCompo
444
436
  const parsed = parseColor(this.value, this.format, this.opacity);
445
437
  this.renderer.setAttribute(this.host.nativeElement, 'aria-label', `${this.value ? parsed : this.localizationService.get('colorGradientNoColor')}`);
446
438
  }
439
+ setBackgroundColor(color) {
440
+ this.renderer.setStyle(this.hsvRectangle.nativeElement, 'background', color);
441
+ }
442
+ updateUI() {
443
+ if (!isDocumentAvailable()) {
444
+ return;
445
+ }
446
+ if (this.hueSliderTouched || this.alphaSliderTouched) {
447
+ this.hueSliderTouched = false;
448
+ this.alphaSliderTouched = false;
449
+ return;
450
+ }
451
+ this.hsva.next(this.value ? getHSV(this.value) : { h: 0, s: 0, v: 1, a: 1 });
452
+ const gradientRect = this.gradientRect;
453
+ const top = (1 - this.hsva.value.v) * gradientRect.height;
454
+ const left = this.hsva.value.s * gradientRect.width;
455
+ this.setDragHandleElementPosition(top, left);
456
+ this.backgroundColor = getColorFromHue(this.hsva.value.h);
457
+ this.setBackgroundColor(this.backgroundColor);
458
+ this.setAlphaSliderBackground(this.backgroundColor);
459
+ this.setHostElementAriaLabel();
460
+ }
447
461
  addEventListeners() {
448
462
  this.ngZone.runOutsideAngular(() => {
449
463
  const focusOutListener = this.renderer.listen(this.host.nativeElement, 'focusout', (event) => {
@@ -571,6 +585,10 @@ tslib_1.__decorate([
571
585
  ViewChild('gradientWrapper', { static: false }),
572
586
  tslib_1.__metadata("design:type", ElementRef)
573
587
  ], ColorGradientComponent.prototype, "gradientWrapper", void 0);
588
+ tslib_1.__decorate([
589
+ ViewChild('hsvRectangle', { static: false }),
590
+ tslib_1.__metadata("design:type", ElementRef)
591
+ ], ColorGradientComponent.prototype, "hsvRectangle", void 0);
574
592
  ColorGradientComponent = ColorGradientComponent_1 = tslib_1.__decorate([
575
593
  Component({
576
594
  exportAs: 'kendoColorGradient',
@@ -617,7 +635,7 @@ ColorGradientComponent = ColorGradientComponent_1 = tslib_1.__decorate([
617
635
  formatButton="Change color format">
618
636
  </ng-container>
619
637
  <div class="k-colorgradient-canvas k-hstack">
620
- <div class="k-hsv-rectangle" [style.background]="backgroundColor">
638
+ <div class="k-hsv-rectangle" #hsvRectangle>
621
639
  <div
622
640
  #gradientWrapper
623
641
  kendoDraggable
@@ -666,9 +684,9 @@ ColorGradientComponent = ColorGradientComponent_1 = tslib_1.__decorate([
666
684
  [vertical]="true"
667
685
  [min]="0"
668
686
  [max]="360"
687
+ [value]="hsva.value.h"
669
688
  [smallStep]="5"
670
689
  [largeStep]="10"
671
- [value]="hsva.value.h"
672
690
  (valueChange)="handleHueSliderChange($event)"
673
691
  >
674
692
  </kendo-slider>
@@ -702,7 +720,8 @@ ColorGradientComponent = ColorGradientComponent_1 = tslib_1.__decorate([
702
720
  (valueChange)="handleInputsValueChange($event)"
703
721
  >
704
722
  </kendo-colorinput>
705
- <div class="k-colorgradient-color-contrast k-vbox" *ngIf="contrastToolVisible"
723
+ <div class="k-colorgradient-color-contrast k-vbox"
724
+ *ngIf="contrastToolVisible"
706
725
  kendoContrastTool
707
726
  [value]="value"
708
727
  [ratio]="contrastTool">
@@ -178,6 +178,7 @@ let FlatColorPickerComponent = FlatColorPickerComponent_1 = class FlatColorPicke
178
178
  }
179
179
  ngOnChanges(changes) {
180
180
  if (isChanged('value', changes)) {
181
+ this.selection = this.value;
181
182
  this.setHostElementAriaLabel();
182
183
  }
183
184
  if (isChanged('paletteSettings', changes)) {
@@ -263,15 +264,7 @@ let FlatColorPickerComponent = FlatColorPickerComponent_1 = class FlatColorPicke
263
264
  * @hidden
264
265
  */
265
266
  handleValueChange(color) {
266
- if (this.value === color) {
267
- return;
268
- }
269
- if (this.preview) {
270
- this.changeCurrentValue(color);
271
- }
272
- else {
273
- this.setFlatColorPickerValue(color);
274
- }
267
+ this.preview ? this.changeCurrentValue(color) : this.setFlatColorPickerValue(color);
275
268
  }
276
269
  /**
277
270
  * @hidden