@progress/kendo-angular-inputs 8.0.5 → 8.0.7-dev.202202251414
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.
- package/dist/cdn/js/kendo-angular-inputs.js +2 -2
- package/dist/cdn/main.js +1 -1
- package/dist/es/colorpicker/color-gradient.component.js +32 -14
- package/dist/es/colorpicker/flatcolorpicker.component.js +2 -9
- package/dist/es/package-metadata.js +1 -1
- package/dist/es2015/colorpicker/color-gradient.component.d.ts +5 -1
- package/dist/es2015/colorpicker/color-gradient.component.js +35 -16
- package/dist/es2015/colorpicker/flatcolorpicker.component.js +2 -9
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/fesm2015/index.js +38 -26
- package/dist/fesm5/index.js +35 -24
- package/dist/npm/colorpicker/color-gradient.component.js +32 -14
- package/dist/npm/colorpicker/flatcolorpicker.component.js +2 -9
- package/dist/npm/package-metadata.js +1 -1
- package/dist/systemjs/kendo-angular-inputs.js +1 -1
- package/package.json +2 -2
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-inputs',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
12
|
+
publishDate: 1645798303,
|
|
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
|
};
|
package/dist/fesm2015/index.js
CHANGED
|
@@ -481,7 +481,7 @@ const packageMetadata = {
|
|
|
481
481
|
name: '@progress/kendo-angular-inputs',
|
|
482
482
|
productName: 'Kendo UI for Angular',
|
|
483
483
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
484
|
-
publishDate:
|
|
484
|
+
publishDate: 1645798303,
|
|
485
485
|
version: '',
|
|
486
486
|
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'
|
|
487
487
|
};
|
|
@@ -8287,6 +8287,8 @@ let ColorGradientComponent = ColorGradientComponent_1 = class ColorGradientCompo
|
|
|
8287
8287
|
this.hsva = new BehaviorSubject({});
|
|
8288
8288
|
this._tabindex = 0;
|
|
8289
8289
|
this.listeners = [];
|
|
8290
|
+
this.hueSliderTouched = false;
|
|
8291
|
+
this.alphaSliderTouched = false;
|
|
8290
8292
|
this.updateValues = new Subject();
|
|
8291
8293
|
this.notifyNgChanged = () => { };
|
|
8292
8294
|
this.notifyNgTouched = () => { };
|
|
@@ -8498,7 +8500,9 @@ let ColorGradientComponent = ColorGradientComponent_1 = class ColorGradientCompo
|
|
|
8498
8500
|
this.hsva.next(hsva);
|
|
8499
8501
|
this.handleValueChange(getColorFromHSV(this.hsva.value, this.format, this.opacity));
|
|
8500
8502
|
this.backgroundColor = getColorFromHue(hue);
|
|
8503
|
+
this.setBackgroundColor(this.backgroundColor);
|
|
8501
8504
|
this.setAlphaSliderBackground(this.backgroundColor);
|
|
8505
|
+
this.hueSliderTouched = true;
|
|
8502
8506
|
}
|
|
8503
8507
|
/**
|
|
8504
8508
|
* @hidden
|
|
@@ -8508,6 +8512,7 @@ let ColorGradientComponent = ColorGradientComponent_1 = class ColorGradientCompo
|
|
|
8508
8512
|
hsva.a = alpha / 100;
|
|
8509
8513
|
this.hsva.next(hsva);
|
|
8510
8514
|
this.handleValueChange(getColorFromHSV(this.hsva.value, this.format, this.opacity));
|
|
8515
|
+
this.alphaSliderTouched = true;
|
|
8511
8516
|
}
|
|
8512
8517
|
/**
|
|
8513
8518
|
* @hidden
|
|
@@ -8599,19 +8604,6 @@ let ColorGradientComponent = ColorGradientComponent_1 = class ColorGradientCompo
|
|
|
8599
8604
|
this.updateValues.next(getColorFromHSV(this.hsva.value, this.format, this.opacity));
|
|
8600
8605
|
this.setAlphaSliderBackground(getColorFromHSV(Object.assign({}, this.hsva.value, { a: 1 }), this.format, this.opacity));
|
|
8601
8606
|
}
|
|
8602
|
-
updateUI() {
|
|
8603
|
-
if (!isDocumentAvailable()) {
|
|
8604
|
-
return;
|
|
8605
|
-
}
|
|
8606
|
-
this.hsva.next(this.value ? getHSV(this.value) : { h: 0, s: 0, v: 1, a: 1 });
|
|
8607
|
-
const gradientRect = this.gradientRect;
|
|
8608
|
-
const top = (1 - this.hsva.value.v) * gradientRect.height;
|
|
8609
|
-
const left = this.hsva.value.s * gradientRect.width;
|
|
8610
|
-
this.setDragHandleElementPosition(top, left);
|
|
8611
|
-
this.backgroundColor = getColorFromHue(this.hsva.value.h);
|
|
8612
|
-
this.setAlphaSliderBackground(this.backgroundColor);
|
|
8613
|
-
this.setHostElementAriaLabel();
|
|
8614
|
-
}
|
|
8615
8607
|
handleValueChange(color) {
|
|
8616
8608
|
if (this.value === color) {
|
|
8617
8609
|
return;
|
|
@@ -8637,6 +8629,28 @@ let ColorGradientComponent = ColorGradientComponent_1 = class ColorGradientCompo
|
|
|
8637
8629
|
const parsed = parseColor$1(this.value, this.format, this.opacity);
|
|
8638
8630
|
this.renderer.setAttribute(this.host.nativeElement, 'aria-label', `${this.value ? parsed : this.localizationService.get('colorGradientNoColor')}`);
|
|
8639
8631
|
}
|
|
8632
|
+
setBackgroundColor(color) {
|
|
8633
|
+
this.renderer.setStyle(this.hsvRectangle.nativeElement, 'background', color);
|
|
8634
|
+
}
|
|
8635
|
+
updateUI() {
|
|
8636
|
+
if (!isDocumentAvailable()) {
|
|
8637
|
+
return;
|
|
8638
|
+
}
|
|
8639
|
+
if (this.hueSliderTouched || this.alphaSliderTouched) {
|
|
8640
|
+
this.hueSliderTouched = false;
|
|
8641
|
+
this.alphaSliderTouched = false;
|
|
8642
|
+
return;
|
|
8643
|
+
}
|
|
8644
|
+
this.hsva.next(this.value ? getHSV(this.value) : { h: 0, s: 0, v: 1, a: 1 });
|
|
8645
|
+
const gradientRect = this.gradientRect;
|
|
8646
|
+
const top = (1 - this.hsva.value.v) * gradientRect.height;
|
|
8647
|
+
const left = this.hsva.value.s * gradientRect.width;
|
|
8648
|
+
this.setDragHandleElementPosition(top, left);
|
|
8649
|
+
this.backgroundColor = getColorFromHue(this.hsva.value.h);
|
|
8650
|
+
this.setBackgroundColor(this.backgroundColor);
|
|
8651
|
+
this.setAlphaSliderBackground(this.backgroundColor);
|
|
8652
|
+
this.setHostElementAriaLabel();
|
|
8653
|
+
}
|
|
8640
8654
|
addEventListeners() {
|
|
8641
8655
|
this.ngZone.runOutsideAngular(() => {
|
|
8642
8656
|
const focusOutListener = this.renderer.listen(this.host.nativeElement, 'focusout', (event) => {
|
|
@@ -8764,6 +8778,10 @@ __decorate([
|
|
|
8764
8778
|
ViewChild('gradientWrapper', { static: false }),
|
|
8765
8779
|
__metadata("design:type", ElementRef)
|
|
8766
8780
|
], ColorGradientComponent.prototype, "gradientWrapper", void 0);
|
|
8781
|
+
__decorate([
|
|
8782
|
+
ViewChild('hsvRectangle', { static: false }),
|
|
8783
|
+
__metadata("design:type", ElementRef)
|
|
8784
|
+
], ColorGradientComponent.prototype, "hsvRectangle", void 0);
|
|
8767
8785
|
ColorGradientComponent = ColorGradientComponent_1 = __decorate([
|
|
8768
8786
|
Component({
|
|
8769
8787
|
exportAs: 'kendoColorGradient',
|
|
@@ -8810,7 +8828,7 @@ ColorGradientComponent = ColorGradientComponent_1 = __decorate([
|
|
|
8810
8828
|
formatButton="Change color format">
|
|
8811
8829
|
</ng-container>
|
|
8812
8830
|
<div class="k-colorgradient-canvas k-hstack">
|
|
8813
|
-
<div class="k-hsv-rectangle"
|
|
8831
|
+
<div class="k-hsv-rectangle" #hsvRectangle>
|
|
8814
8832
|
<div
|
|
8815
8833
|
#gradientWrapper
|
|
8816
8834
|
kendoDraggable
|
|
@@ -8859,9 +8877,9 @@ ColorGradientComponent = ColorGradientComponent_1 = __decorate([
|
|
|
8859
8877
|
[vertical]="true"
|
|
8860
8878
|
[min]="0"
|
|
8861
8879
|
[max]="360"
|
|
8880
|
+
[value]="hsva.value.h"
|
|
8862
8881
|
[smallStep]="5"
|
|
8863
8882
|
[largeStep]="10"
|
|
8864
|
-
[value]="hsva.value.h"
|
|
8865
8883
|
(valueChange)="handleHueSliderChange($event)"
|
|
8866
8884
|
>
|
|
8867
8885
|
</kendo-slider>
|
|
@@ -8895,7 +8913,8 @@ ColorGradientComponent = ColorGradientComponent_1 = __decorate([
|
|
|
8895
8913
|
(valueChange)="handleInputsValueChange($event)"
|
|
8896
8914
|
>
|
|
8897
8915
|
</kendo-colorinput>
|
|
8898
|
-
<div class="k-colorgradient-color-contrast k-vbox"
|
|
8916
|
+
<div class="k-colorgradient-color-contrast k-vbox"
|
|
8917
|
+
*ngIf="contrastToolVisible"
|
|
8899
8918
|
kendoContrastTool
|
|
8900
8919
|
[value]="value"
|
|
8901
8920
|
[ratio]="contrastTool">
|
|
@@ -9844,6 +9863,7 @@ let FlatColorPickerComponent = FlatColorPickerComponent_1 = class FlatColorPicke
|
|
|
9844
9863
|
}
|
|
9845
9864
|
ngOnChanges(changes) {
|
|
9846
9865
|
if (isChanged('value', changes)) {
|
|
9866
|
+
this.selection = this.value;
|
|
9847
9867
|
this.setHostElementAriaLabel();
|
|
9848
9868
|
}
|
|
9849
9869
|
if (isChanged('paletteSettings', changes)) {
|
|
@@ -9929,15 +9949,7 @@ let FlatColorPickerComponent = FlatColorPickerComponent_1 = class FlatColorPicke
|
|
|
9929
9949
|
* @hidden
|
|
9930
9950
|
*/
|
|
9931
9951
|
handleValueChange(color) {
|
|
9932
|
-
|
|
9933
|
-
return;
|
|
9934
|
-
}
|
|
9935
|
-
if (this.preview) {
|
|
9936
|
-
this.changeCurrentValue(color);
|
|
9937
|
-
}
|
|
9938
|
-
else {
|
|
9939
|
-
this.setFlatColorPickerValue(color);
|
|
9940
|
-
}
|
|
9952
|
+
this.preview ? this.changeCurrentValue(color) : this.setFlatColorPickerValue(color);
|
|
9941
9953
|
}
|
|
9942
9954
|
/**
|
|
9943
9955
|
* @hidden
|
package/dist/fesm5/index.js
CHANGED
|
@@ -514,7 +514,7 @@ var packageMetadata = {
|
|
|
514
514
|
name: '@progress/kendo-angular-inputs',
|
|
515
515
|
productName: 'Kendo UI for Angular',
|
|
516
516
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
517
|
-
publishDate:
|
|
517
|
+
publishDate: 1645798303,
|
|
518
518
|
version: '',
|
|
519
519
|
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'
|
|
520
520
|
};
|
|
@@ -8429,6 +8429,8 @@ var ColorGradientComponent = /** @class */ (function () {
|
|
|
8429
8429
|
this.hsva = new BehaviorSubject({});
|
|
8430
8430
|
this._tabindex = 0;
|
|
8431
8431
|
this.listeners = [];
|
|
8432
|
+
this.hueSliderTouched = false;
|
|
8433
|
+
this.alphaSliderTouched = false;
|
|
8432
8434
|
this.updateValues = new Subject();
|
|
8433
8435
|
this.notifyNgChanged = function () { };
|
|
8434
8436
|
this.notifyNgTouched = function () { };
|
|
@@ -8688,7 +8690,9 @@ var ColorGradientComponent = /** @class */ (function () {
|
|
|
8688
8690
|
this.hsva.next(hsva);
|
|
8689
8691
|
this.handleValueChange(getColorFromHSV(this.hsva.value, this.format, this.opacity));
|
|
8690
8692
|
this.backgroundColor = getColorFromHue(hue);
|
|
8693
|
+
this.setBackgroundColor(this.backgroundColor);
|
|
8691
8694
|
this.setAlphaSliderBackground(this.backgroundColor);
|
|
8695
|
+
this.hueSliderTouched = true;
|
|
8692
8696
|
};
|
|
8693
8697
|
/**
|
|
8694
8698
|
* @hidden
|
|
@@ -8698,6 +8702,7 @@ var ColorGradientComponent = /** @class */ (function () {
|
|
|
8698
8702
|
hsva.a = alpha / 100;
|
|
8699
8703
|
this.hsva.next(hsva);
|
|
8700
8704
|
this.handleValueChange(getColorFromHSV(this.hsva.value, this.format, this.opacity));
|
|
8705
|
+
this.alphaSliderTouched = true;
|
|
8701
8706
|
};
|
|
8702
8707
|
/**
|
|
8703
8708
|
* @hidden
|
|
@@ -8809,19 +8814,6 @@ var ColorGradientComponent = /** @class */ (function () {
|
|
|
8809
8814
|
this.updateValues.next(getColorFromHSV(this.hsva.value, this.format, this.opacity));
|
|
8810
8815
|
this.setAlphaSliderBackground(getColorFromHSV(__assign({}, this.hsva.value, { a: 1 }), this.format, this.opacity));
|
|
8811
8816
|
};
|
|
8812
|
-
ColorGradientComponent.prototype.updateUI = function () {
|
|
8813
|
-
if (!isDocumentAvailable()) {
|
|
8814
|
-
return;
|
|
8815
|
-
}
|
|
8816
|
-
this.hsva.next(this.value ? getHSV(this.value) : { h: 0, s: 0, v: 1, a: 1 });
|
|
8817
|
-
var gradientRect = this.gradientRect;
|
|
8818
|
-
var top = (1 - this.hsva.value.v) * gradientRect.height;
|
|
8819
|
-
var left = this.hsva.value.s * gradientRect.width;
|
|
8820
|
-
this.setDragHandleElementPosition(top, left);
|
|
8821
|
-
this.backgroundColor = getColorFromHue(this.hsva.value.h);
|
|
8822
|
-
this.setAlphaSliderBackground(this.backgroundColor);
|
|
8823
|
-
this.setHostElementAriaLabel();
|
|
8824
|
-
};
|
|
8825
8817
|
ColorGradientComponent.prototype.handleValueChange = function (color) {
|
|
8826
8818
|
if (this.value === color) {
|
|
8827
8819
|
return;
|
|
@@ -8847,6 +8839,28 @@ var ColorGradientComponent = /** @class */ (function () {
|
|
|
8847
8839
|
var parsed = parseColor$1(this.value, this.format, this.opacity);
|
|
8848
8840
|
this.renderer.setAttribute(this.host.nativeElement, 'aria-label', "" + (this.value ? parsed : this.localizationService.get('colorGradientNoColor')));
|
|
8849
8841
|
};
|
|
8842
|
+
ColorGradientComponent.prototype.setBackgroundColor = function (color) {
|
|
8843
|
+
this.renderer.setStyle(this.hsvRectangle.nativeElement, 'background', color);
|
|
8844
|
+
};
|
|
8845
|
+
ColorGradientComponent.prototype.updateUI = function () {
|
|
8846
|
+
if (!isDocumentAvailable()) {
|
|
8847
|
+
return;
|
|
8848
|
+
}
|
|
8849
|
+
if (this.hueSliderTouched || this.alphaSliderTouched) {
|
|
8850
|
+
this.hueSliderTouched = false;
|
|
8851
|
+
this.alphaSliderTouched = false;
|
|
8852
|
+
return;
|
|
8853
|
+
}
|
|
8854
|
+
this.hsva.next(this.value ? getHSV(this.value) : { h: 0, s: 0, v: 1, a: 1 });
|
|
8855
|
+
var gradientRect = this.gradientRect;
|
|
8856
|
+
var top = (1 - this.hsva.value.v) * gradientRect.height;
|
|
8857
|
+
var left = this.hsva.value.s * gradientRect.width;
|
|
8858
|
+
this.setDragHandleElementPosition(top, left);
|
|
8859
|
+
this.backgroundColor = getColorFromHue(this.hsva.value.h);
|
|
8860
|
+
this.setBackgroundColor(this.backgroundColor);
|
|
8861
|
+
this.setAlphaSliderBackground(this.backgroundColor);
|
|
8862
|
+
this.setHostElementAriaLabel();
|
|
8863
|
+
};
|
|
8850
8864
|
ColorGradientComponent.prototype.addEventListeners = function () {
|
|
8851
8865
|
var _this = this;
|
|
8852
8866
|
this.ngZone.runOutsideAngular(function () {
|
|
@@ -8976,6 +8990,10 @@ var ColorGradientComponent = /** @class */ (function () {
|
|
|
8976
8990
|
ViewChild('gradientWrapper', { static: false }),
|
|
8977
8991
|
__metadata("design:type", ElementRef)
|
|
8978
8992
|
], ColorGradientComponent.prototype, "gradientWrapper", void 0);
|
|
8993
|
+
__decorate([
|
|
8994
|
+
ViewChild('hsvRectangle', { static: false }),
|
|
8995
|
+
__metadata("design:type", ElementRef)
|
|
8996
|
+
], ColorGradientComponent.prototype, "hsvRectangle", void 0);
|
|
8979
8997
|
ColorGradientComponent = ColorGradientComponent_1 = __decorate([
|
|
8980
8998
|
Component({
|
|
8981
8999
|
exportAs: 'kendoColorGradient',
|
|
@@ -9000,7 +9018,7 @@ var ColorGradientComponent = /** @class */ (function () {
|
|
|
9000
9018
|
useValue: 'kendo.colorgradient'
|
|
9001
9019
|
}
|
|
9002
9020
|
],
|
|
9003
|
-
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\"
|
|
9021
|
+
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 ",
|
|
9004
9022
|
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 "]
|
|
9005
9023
|
}),
|
|
9006
9024
|
__metadata("design:paramtypes", [ElementRef,
|
|
@@ -9923,6 +9941,7 @@ var FlatColorPickerComponent = /** @class */ (function () {
|
|
|
9923
9941
|
};
|
|
9924
9942
|
FlatColorPickerComponent.prototype.ngOnChanges = function (changes) {
|
|
9925
9943
|
if (isChanged('value', changes)) {
|
|
9944
|
+
this.selection = this.value;
|
|
9926
9945
|
this.setHostElementAriaLabel();
|
|
9927
9946
|
}
|
|
9928
9947
|
if (isChanged('paletteSettings', changes)) {
|
|
@@ -10013,15 +10032,7 @@ var FlatColorPickerComponent = /** @class */ (function () {
|
|
|
10013
10032
|
* @hidden
|
|
10014
10033
|
*/
|
|
10015
10034
|
FlatColorPickerComponent.prototype.handleValueChange = function (color) {
|
|
10016
|
-
|
|
10017
|
-
return;
|
|
10018
|
-
}
|
|
10019
|
-
if (this.preview) {
|
|
10020
|
-
this.changeCurrentValue(color);
|
|
10021
|
-
}
|
|
10022
|
-
else {
|
|
10023
|
-
this.setFlatColorPickerValue(color);
|
|
10024
|
-
}
|
|
10035
|
+
this.preview ? this.changeCurrentValue(color) : this.setFlatColorPickerValue(color);
|
|
10025
10036
|
};
|
|
10026
10037
|
/**
|
|
10027
10038
|
* @hidden
|
|
@@ -96,6 +96,8 @@ var ColorGradientComponent = /** @class */ (function () {
|
|
|
96
96
|
this.hsva = new rxjs_1.BehaviorSubject({});
|
|
97
97
|
this._tabindex = 0;
|
|
98
98
|
this.listeners = [];
|
|
99
|
+
this.hueSliderTouched = false;
|
|
100
|
+
this.alphaSliderTouched = false;
|
|
99
101
|
this.updateValues = new rxjs_1.Subject();
|
|
100
102
|
this.notifyNgChanged = function () { };
|
|
101
103
|
this.notifyNgTouched = function () { };
|
|
@@ -355,7 +357,9 @@ var ColorGradientComponent = /** @class */ (function () {
|
|
|
355
357
|
this.hsva.next(hsva);
|
|
356
358
|
this.handleValueChange(utils_1.getColorFromHSV(this.hsva.value, this.format, this.opacity));
|
|
357
359
|
this.backgroundColor = utils_1.getColorFromHue(hue);
|
|
360
|
+
this.setBackgroundColor(this.backgroundColor);
|
|
358
361
|
this.setAlphaSliderBackground(this.backgroundColor);
|
|
362
|
+
this.hueSliderTouched = true;
|
|
359
363
|
};
|
|
360
364
|
/**
|
|
361
365
|
* @hidden
|
|
@@ -365,6 +369,7 @@ var ColorGradientComponent = /** @class */ (function () {
|
|
|
365
369
|
hsva.a = alpha / 100;
|
|
366
370
|
this.hsva.next(hsva);
|
|
367
371
|
this.handleValueChange(utils_1.getColorFromHSV(this.hsva.value, this.format, this.opacity));
|
|
372
|
+
this.alphaSliderTouched = true;
|
|
368
373
|
};
|
|
369
374
|
/**
|
|
370
375
|
* @hidden
|
|
@@ -476,19 +481,6 @@ var ColorGradientComponent = /** @class */ (function () {
|
|
|
476
481
|
this.updateValues.next(utils_1.getColorFromHSV(this.hsva.value, this.format, this.opacity));
|
|
477
482
|
this.setAlphaSliderBackground(utils_1.getColorFromHSV(tslib_1.__assign({}, this.hsva.value, { a: 1 }), this.format, this.opacity));
|
|
478
483
|
};
|
|
479
|
-
ColorGradientComponent.prototype.updateUI = function () {
|
|
480
|
-
if (!kendo_angular_common_1.isDocumentAvailable()) {
|
|
481
|
-
return;
|
|
482
|
-
}
|
|
483
|
-
this.hsva.next(this.value ? utils_1.getHSV(this.value) : { h: 0, s: 0, v: 1, a: 1 });
|
|
484
|
-
var gradientRect = this.gradientRect;
|
|
485
|
-
var top = (1 - this.hsva.value.v) * gradientRect.height;
|
|
486
|
-
var left = this.hsva.value.s * gradientRect.width;
|
|
487
|
-
this.setDragHandleElementPosition(top, left);
|
|
488
|
-
this.backgroundColor = utils_1.getColorFromHue(this.hsva.value.h);
|
|
489
|
-
this.setAlphaSliderBackground(this.backgroundColor);
|
|
490
|
-
this.setHostElementAriaLabel();
|
|
491
|
-
};
|
|
492
484
|
ColorGradientComponent.prototype.handleValueChange = function (color) {
|
|
493
485
|
if (this.value === color) {
|
|
494
486
|
return;
|
|
@@ -514,6 +506,28 @@ var ColorGradientComponent = /** @class */ (function () {
|
|
|
514
506
|
var parsed = utils_1.parseColor(this.value, this.format, this.opacity);
|
|
515
507
|
this.renderer.setAttribute(this.host.nativeElement, 'aria-label', "" + (this.value ? parsed : this.localizationService.get('colorGradientNoColor')));
|
|
516
508
|
};
|
|
509
|
+
ColorGradientComponent.prototype.setBackgroundColor = function (color) {
|
|
510
|
+
this.renderer.setStyle(this.hsvRectangle.nativeElement, 'background', color);
|
|
511
|
+
};
|
|
512
|
+
ColorGradientComponent.prototype.updateUI = function () {
|
|
513
|
+
if (!kendo_angular_common_1.isDocumentAvailable()) {
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
516
|
+
if (this.hueSliderTouched || this.alphaSliderTouched) {
|
|
517
|
+
this.hueSliderTouched = false;
|
|
518
|
+
this.alphaSliderTouched = false;
|
|
519
|
+
return;
|
|
520
|
+
}
|
|
521
|
+
this.hsva.next(this.value ? utils_1.getHSV(this.value) : { h: 0, s: 0, v: 1, a: 1 });
|
|
522
|
+
var gradientRect = this.gradientRect;
|
|
523
|
+
var top = (1 - this.hsva.value.v) * gradientRect.height;
|
|
524
|
+
var left = this.hsva.value.s * gradientRect.width;
|
|
525
|
+
this.setDragHandleElementPosition(top, left);
|
|
526
|
+
this.backgroundColor = utils_1.getColorFromHue(this.hsva.value.h);
|
|
527
|
+
this.setBackgroundColor(this.backgroundColor);
|
|
528
|
+
this.setAlphaSliderBackground(this.backgroundColor);
|
|
529
|
+
this.setHostElementAriaLabel();
|
|
530
|
+
};
|
|
517
531
|
ColorGradientComponent.prototype.addEventListeners = function () {
|
|
518
532
|
var _this = this;
|
|
519
533
|
this.ngZone.runOutsideAngular(function () {
|
|
@@ -643,6 +657,10 @@ var ColorGradientComponent = /** @class */ (function () {
|
|
|
643
657
|
core_1.ViewChild('gradientWrapper', { static: false }),
|
|
644
658
|
tslib_1.__metadata("design:type", core_1.ElementRef)
|
|
645
659
|
], ColorGradientComponent.prototype, "gradientWrapper", void 0);
|
|
660
|
+
tslib_1.__decorate([
|
|
661
|
+
core_1.ViewChild('hsvRectangle', { static: false }),
|
|
662
|
+
tslib_1.__metadata("design:type", core_1.ElementRef)
|
|
663
|
+
], ColorGradientComponent.prototype, "hsvRectangle", void 0);
|
|
646
664
|
ColorGradientComponent = ColorGradientComponent_1 = tslib_1.__decorate([
|
|
647
665
|
core_1.Component({
|
|
648
666
|
exportAs: 'kendoColorGradient',
|
|
@@ -667,7 +685,7 @@ var ColorGradientComponent = /** @class */ (function () {
|
|
|
667
685
|
useValue: 'kendo.colorgradient'
|
|
668
686
|
}
|
|
669
687
|
],
|
|
670
|
-
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\"
|
|
688
|
+
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 ",
|
|
671
689
|
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 "]
|
|
672
690
|
}),
|
|
673
691
|
tslib_1.__metadata("design:paramtypes", [core_1.ElementRef,
|
|
@@ -210,6 +210,7 @@ var FlatColorPickerComponent = /** @class */ (function () {
|
|
|
210
210
|
};
|
|
211
211
|
FlatColorPickerComponent.prototype.ngOnChanges = function (changes) {
|
|
212
212
|
if (kendo_angular_common_1.isChanged('value', changes)) {
|
|
213
|
+
this.selection = this.value;
|
|
213
214
|
this.setHostElementAriaLabel();
|
|
214
215
|
}
|
|
215
216
|
if (kendo_angular_common_1.isChanged('paletteSettings', changes)) {
|
|
@@ -300,15 +301,7 @@ var FlatColorPickerComponent = /** @class */ (function () {
|
|
|
300
301
|
* @hidden
|
|
301
302
|
*/
|
|
302
303
|
FlatColorPickerComponent.prototype.handleValueChange = function (color) {
|
|
303
|
-
|
|
304
|
-
return;
|
|
305
|
-
}
|
|
306
|
-
if (this.preview) {
|
|
307
|
-
this.changeCurrentValue(color);
|
|
308
|
-
}
|
|
309
|
-
else {
|
|
310
|
-
this.setFlatColorPickerValue(color);
|
|
311
|
-
}
|
|
304
|
+
this.preview ? this.changeCurrentValue(color) : this.setFlatColorPickerValue(color);
|
|
312
305
|
};
|
|
313
306
|
/**
|
|
314
307
|
* @hidden
|
|
@@ -11,7 +11,7 @@ exports.packageMetadata = {
|
|
|
11
11
|
name: '@progress/kendo-angular-inputs',
|
|
12
12
|
productName: 'Kendo UI for Angular',
|
|
13
13
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
14
|
-
publishDate:
|
|
14
|
+
publishDate: 1645798303,
|
|
15
15
|
version: '',
|
|
16
16
|
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'
|
|
17
17
|
};
|