@progress/kendo-angular-inputs 8.0.3 → 8.0.5
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 +1 -1
- package/dist/cdn/main.js +1 -1
- package/dist/es/colorpicker/color-palette.component.js +18 -6
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/shared/textarea.directive.js +3 -0
- package/dist/es/textbox/textbox.directive.js +3 -0
- package/dist/es2015/colorpicker/color-palette.component.d.ts +4 -2
- package/dist/es2015/colorpicker/color-palette.component.js +17 -6
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/es2015/shared/textarea.directive.js +3 -0
- package/dist/es2015/textbox/textbox.directive.js +3 -0
- package/dist/fesm2015/index.js +22 -6
- package/dist/fesm5/index.js +23 -6
- package/dist/npm/colorpicker/color-palette.component.js +17 -5
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/shared/textarea.directive.js +3 -0
- package/dist/npm/textbox/textbox.directive.js +3 -0
- package/dist/systemjs/kendo-angular-inputs.js +1 -1
- package/package.json +1 -1
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as tslib_1 from "tslib";
|
|
6
|
-
import { Component, Input, EventEmitter, Output, HostBinding, HostListener, forwardRef, ChangeDetectorRef, Renderer2, ElementRef } from '@angular/core';
|
|
6
|
+
import { Component, Input, EventEmitter, Output, HostBinding, HostListener, forwardRef, ChangeDetectorRef, Renderer2, ElementRef, NgZone } from '@angular/core';
|
|
7
7
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
8
8
|
import { Keys, KendoInput, guid } from '@progress/kendo-angular-common';
|
|
9
9
|
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
10
10
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
11
|
+
import { take } from 'rxjs/operators';
|
|
11
12
|
import { ColorPaletteLocalizationService } from './localization/colorpalette-localization.service';
|
|
12
13
|
import { packageMetadata } from '../package-metadata';
|
|
13
14
|
import { PALETTEPRESETS } from './models';
|
|
@@ -24,13 +25,14 @@ var serial = 0;
|
|
|
24
25
|
* The ColorPalette is independently used by `kendo-colorpicker` and can be directly added to the page.
|
|
25
26
|
*/
|
|
26
27
|
var ColorPaletteComponent = /** @class */ (function () {
|
|
27
|
-
function ColorPaletteComponent(host, service, cdr, renderer, localizationService) {
|
|
28
|
+
function ColorPaletteComponent(host, service, cdr, renderer, localizationService, ngZone) {
|
|
28
29
|
var _this = this;
|
|
29
30
|
this.host = host;
|
|
30
31
|
this.service = service;
|
|
31
32
|
this.cdr = cdr;
|
|
32
33
|
this.renderer = renderer;
|
|
33
34
|
this.localizationService = localizationService;
|
|
35
|
+
this.ngZone = ngZone;
|
|
34
36
|
/**
|
|
35
37
|
* @hidden
|
|
36
38
|
*/
|
|
@@ -226,11 +228,16 @@ var ColorPaletteComponent = /** @class */ (function () {
|
|
|
226
228
|
var defaultPreset = (this.format !== 'name') ? DEFAULT_PRESET : DEFAULT_ACCESSIBLE_PRESET;
|
|
227
229
|
this.palette = this.palette || defaultPreset;
|
|
228
230
|
this.setRows();
|
|
229
|
-
this.focusedCell = this.service.getCellCoordsFor(this.value);
|
|
230
231
|
}
|
|
231
232
|
};
|
|
232
233
|
ColorPaletteComponent.prototype.ngAfterViewInit = function () {
|
|
234
|
+
var _this = this;
|
|
233
235
|
this.setHostElementAriaLabel();
|
|
236
|
+
if (this.value) {
|
|
237
|
+
this.ngZone.onStable.pipe(take(1)).subscribe(function () {
|
|
238
|
+
_this.selectCell(_this.value);
|
|
239
|
+
});
|
|
240
|
+
}
|
|
234
241
|
};
|
|
235
242
|
ColorPaletteComponent.prototype.ngOnDestroy = function () {
|
|
236
243
|
if (this.dynamicRTLSubscription) {
|
|
@@ -242,7 +249,7 @@ var ColorPaletteComponent = /** @class */ (function () {
|
|
|
242
249
|
this.setRows();
|
|
243
250
|
}
|
|
244
251
|
if (changes.palette || changes.value || changes.columns) {
|
|
245
|
-
this.
|
|
252
|
+
this.selectCell(this.value);
|
|
246
253
|
this.setHostElementAriaLabel();
|
|
247
254
|
}
|
|
248
255
|
};
|
|
@@ -304,7 +311,7 @@ var ColorPaletteComponent = /** @class */ (function () {
|
|
|
304
311
|
*/
|
|
305
312
|
ColorPaletteComponent.prototype.writeValue = function (value) {
|
|
306
313
|
this.value = value;
|
|
307
|
-
this.
|
|
314
|
+
this.selectCell(value);
|
|
308
315
|
};
|
|
309
316
|
/**
|
|
310
317
|
* @hidden
|
|
@@ -355,6 +362,10 @@ var ColorPaletteComponent = /** @class */ (function () {
|
|
|
355
362
|
this.focusInComponent = false;
|
|
356
363
|
this.focusedCell = this.selectedCell;
|
|
357
364
|
};
|
|
365
|
+
ColorPaletteComponent.prototype.selectCell = function (value) {
|
|
366
|
+
this.selectedCell = this.service.getCellCoordsFor(value);
|
|
367
|
+
this.focusedCell = this.selectedCell;
|
|
368
|
+
};
|
|
358
369
|
ColorPaletteComponent.prototype.setRows = function () {
|
|
359
370
|
if (!isPresent(this.palette)) {
|
|
360
371
|
return;
|
|
@@ -504,7 +515,8 @@ var ColorPaletteComponent = /** @class */ (function () {
|
|
|
504
515
|
ColorPaletteService,
|
|
505
516
|
ChangeDetectorRef,
|
|
506
517
|
Renderer2,
|
|
507
|
-
LocalizationService
|
|
518
|
+
LocalizationService,
|
|
519
|
+
NgZone])
|
|
508
520
|
], ColorPaletteComponent);
|
|
509
521
|
return ColorPaletteComponent;
|
|
510
522
|
}());
|
|
@@ -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:
|
|
12
|
+
publishDate: 1645175564,
|
|
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
|
};
|
|
@@ -220,6 +220,9 @@ var TextAreaDirective = /** @class */ (function () {
|
|
|
220
220
|
tslib_1.__decorate([
|
|
221
221
|
HostBinding('class.k-textarea'),
|
|
222
222
|
HostBinding('class.k-input'),
|
|
223
|
+
HostBinding('class.k-input-md'),
|
|
224
|
+
HostBinding('class.k-rounded-md'),
|
|
225
|
+
HostBinding('class.k-input-solid'),
|
|
223
226
|
tslib_1.__metadata("design:type", Boolean)
|
|
224
227
|
], TextAreaDirective.prototype, "elementClasses", void 0);
|
|
225
228
|
tslib_1.__decorate([
|
|
@@ -100,6 +100,9 @@ var TextBoxDirective = /** @class */ (function () {
|
|
|
100
100
|
tslib_1.__decorate([
|
|
101
101
|
HostBinding('class.k-textbox'),
|
|
102
102
|
HostBinding('class.k-input'),
|
|
103
|
+
HostBinding('class.k-input-md'),
|
|
104
|
+
HostBinding('class.k-rounded-md'),
|
|
105
|
+
HostBinding('class.k-input-solid'),
|
|
103
106
|
tslib_1.__metadata("design:type", Boolean)
|
|
104
107
|
], TextBoxDirective.prototype, "hostClasses", void 0);
|
|
105
108
|
tslib_1.__decorate([
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { OnInit, EventEmitter, SimpleChanges, OnChanges, OnDestroy, ChangeDetectorRef, Renderer2, ElementRef, AfterViewInit } from '@angular/core';
|
|
5
|
+
import { OnInit, EventEmitter, SimpleChanges, OnChanges, OnDestroy, ChangeDetectorRef, Renderer2, ElementRef, AfterViewInit, NgZone } from '@angular/core';
|
|
6
6
|
import { ControlValueAccessor } from '@angular/forms';
|
|
7
7
|
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
8
|
import { TileSize, OutputFormat, TableCell } from './models';
|
|
@@ -17,6 +17,7 @@ export declare class ColorPaletteComponent implements OnInit, AfterViewInit, OnD
|
|
|
17
17
|
private cdr;
|
|
18
18
|
private renderer;
|
|
19
19
|
private localizationService;
|
|
20
|
+
private ngZone;
|
|
20
21
|
/**
|
|
21
22
|
* @hidden
|
|
22
23
|
*/
|
|
@@ -142,7 +143,7 @@ export declare class ColorPaletteComponent implements OnInit, AfterViewInit, OnD
|
|
|
142
143
|
private _palette;
|
|
143
144
|
private _tabindex;
|
|
144
145
|
private dynamicRTLSubscription;
|
|
145
|
-
constructor(host: ElementRef, service: ColorPaletteService, cdr: ChangeDetectorRef, renderer: Renderer2, localizationService: LocalizationService);
|
|
146
|
+
constructor(host: ElementRef, service: ColorPaletteService, cdr: ChangeDetectorRef, renderer: Renderer2, localizationService: LocalizationService, ngZone: NgZone);
|
|
146
147
|
ngOnInit(): void;
|
|
147
148
|
ngAfterViewInit(): void;
|
|
148
149
|
ngOnDestroy(): void;
|
|
@@ -186,6 +187,7 @@ export declare class ColorPaletteComponent implements OnInit, AfterViewInit, OnD
|
|
|
186
187
|
reset(): void;
|
|
187
188
|
private handleValueChange;
|
|
188
189
|
private handleCellFocusOnBlur;
|
|
190
|
+
private selectCell;
|
|
189
191
|
private setRows;
|
|
190
192
|
private handleCellNavigation;
|
|
191
193
|
private setHostElementAriaLabel;
|
|
@@ -4,11 +4,12 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as tslib_1 from "tslib";
|
|
6
6
|
var ColorPaletteComponent_1;
|
|
7
|
-
import { Component, Input, EventEmitter, Output, HostBinding, HostListener, forwardRef, ChangeDetectorRef, Renderer2, ElementRef } from '@angular/core';
|
|
7
|
+
import { Component, Input, EventEmitter, Output, HostBinding, HostListener, forwardRef, ChangeDetectorRef, Renderer2, ElementRef, NgZone } from '@angular/core';
|
|
8
8
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
9
9
|
import { Keys, KendoInput, guid } from '@progress/kendo-angular-common';
|
|
10
10
|
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
11
11
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
12
|
+
import { take } from 'rxjs/operators';
|
|
12
13
|
import { ColorPaletteLocalizationService } from './localization/colorpalette-localization.service';
|
|
13
14
|
import { packageMetadata } from '../package-metadata';
|
|
14
15
|
import { PALETTEPRESETS } from './models';
|
|
@@ -25,12 +26,13 @@ let serial = 0;
|
|
|
25
26
|
* The ColorPalette is independently used by `kendo-colorpicker` and can be directly added to the page.
|
|
26
27
|
*/
|
|
27
28
|
let ColorPaletteComponent = ColorPaletteComponent_1 = class ColorPaletteComponent {
|
|
28
|
-
constructor(host, service, cdr, renderer, localizationService) {
|
|
29
|
+
constructor(host, service, cdr, renderer, localizationService, ngZone) {
|
|
29
30
|
this.host = host;
|
|
30
31
|
this.service = service;
|
|
31
32
|
this.cdr = cdr;
|
|
32
33
|
this.renderer = renderer;
|
|
33
34
|
this.localizationService = localizationService;
|
|
35
|
+
this.ngZone = ngZone;
|
|
34
36
|
/**
|
|
35
37
|
* @hidden
|
|
36
38
|
*/
|
|
@@ -183,11 +185,15 @@ let ColorPaletteComponent = ColorPaletteComponent_1 = class ColorPaletteComponen
|
|
|
183
185
|
const defaultPreset = (this.format !== 'name') ? DEFAULT_PRESET : DEFAULT_ACCESSIBLE_PRESET;
|
|
184
186
|
this.palette = this.palette || defaultPreset;
|
|
185
187
|
this.setRows();
|
|
186
|
-
this.focusedCell = this.service.getCellCoordsFor(this.value);
|
|
187
188
|
}
|
|
188
189
|
}
|
|
189
190
|
ngAfterViewInit() {
|
|
190
191
|
this.setHostElementAriaLabel();
|
|
192
|
+
if (this.value) {
|
|
193
|
+
this.ngZone.onStable.pipe(take(1)).subscribe(() => {
|
|
194
|
+
this.selectCell(this.value);
|
|
195
|
+
});
|
|
196
|
+
}
|
|
191
197
|
}
|
|
192
198
|
ngOnDestroy() {
|
|
193
199
|
if (this.dynamicRTLSubscription) {
|
|
@@ -199,7 +205,7 @@ let ColorPaletteComponent = ColorPaletteComponent_1 = class ColorPaletteComponen
|
|
|
199
205
|
this.setRows();
|
|
200
206
|
}
|
|
201
207
|
if (changes.palette || changes.value || changes.columns) {
|
|
202
|
-
this.
|
|
208
|
+
this.selectCell(this.value);
|
|
203
209
|
this.setHostElementAriaLabel();
|
|
204
210
|
}
|
|
205
211
|
}
|
|
@@ -261,7 +267,7 @@ let ColorPaletteComponent = ColorPaletteComponent_1 = class ColorPaletteComponen
|
|
|
261
267
|
*/
|
|
262
268
|
writeValue(value) {
|
|
263
269
|
this.value = value;
|
|
264
|
-
this.
|
|
270
|
+
this.selectCell(value);
|
|
265
271
|
}
|
|
266
272
|
/**
|
|
267
273
|
* @hidden
|
|
@@ -312,6 +318,10 @@ let ColorPaletteComponent = ColorPaletteComponent_1 = class ColorPaletteComponen
|
|
|
312
318
|
this.focusInComponent = false;
|
|
313
319
|
this.focusedCell = this.selectedCell;
|
|
314
320
|
}
|
|
321
|
+
selectCell(value) {
|
|
322
|
+
this.selectedCell = this.service.getCellCoordsFor(value);
|
|
323
|
+
this.focusedCell = this.selectedCell;
|
|
324
|
+
}
|
|
315
325
|
setRows() {
|
|
316
326
|
if (!isPresent(this.palette)) {
|
|
317
327
|
return;
|
|
@@ -492,6 +502,7 @@ ColorPaletteComponent = ColorPaletteComponent_1 = tslib_1.__decorate([
|
|
|
492
502
|
ColorPaletteService,
|
|
493
503
|
ChangeDetectorRef,
|
|
494
504
|
Renderer2,
|
|
495
|
-
LocalizationService
|
|
505
|
+
LocalizationService,
|
|
506
|
+
NgZone])
|
|
496
507
|
], ColorPaletteComponent);
|
|
497
508
|
export { ColorPaletteComponent };
|