@progress/kendo-angular-inputs 10.0.0 → 10.1.0-dev.202209211545
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/bundles/kendo-angular-inputs.umd.js +1 -1
- package/esm2015/colorpicker/colorpicker.component.js +1 -1
- package/esm2015/package-metadata.js +1 -1
- package/esm2015/signature/signature.component.js +31 -24
- package/fesm2015/kendo-angular-inputs.js +32 -25
- package/package.json +1 -1
- package/signature/signature.component.d.ts +10 -5
|
@@ -313,6 +313,7 @@ export class ColorPickerComponent {
|
|
|
313
313
|
tileSize: this._paletteSettings.tileSize || 24,
|
|
314
314
|
columns: this._paletteSettings.columns || presetColumns || 10
|
|
315
315
|
};
|
|
316
|
+
this.handleHostId();
|
|
316
317
|
}
|
|
317
318
|
ngAfterViewInit() {
|
|
318
319
|
const stylingInputs = ['size', 'rounded', 'fillMode'];
|
|
@@ -320,7 +321,6 @@ export class ColorPickerComponent {
|
|
|
320
321
|
this.handleClasses(this[input], input);
|
|
321
322
|
});
|
|
322
323
|
this.setHostElementAriaLabel();
|
|
323
|
-
this.handleHostId();
|
|
324
324
|
this.initDomEvents();
|
|
325
325
|
}
|
|
326
326
|
ngOnChanges(changes) {
|
|
@@ -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: 1663775032,
|
|
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
|
};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { __awaiter } from "tslib";
|
|
6
6
|
import { ChangeDetectionStrategy, Component, EventEmitter, forwardRef, HostBinding, Input, Output, ViewChild } from '@angular/core';
|
|
7
7
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
8
|
-
import { anyChanged, closest } from '@progress/kendo-angular-common';
|
|
8
|
+
import { anyChanged, closest, isDocumentAvailable, Keys } from '@progress/kendo-angular-common';
|
|
9
9
|
import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
|
|
10
10
|
import { SignaturePad } from '@progress/kendo-inputs-common';
|
|
11
11
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
@@ -25,6 +25,8 @@ const DEFAULT_ROUNDED = 'medium';
|
|
|
25
25
|
const DEFAULT_FILL_MODE = 'solid';
|
|
26
26
|
const DEFAULT_POPUP_SCALE = 3;
|
|
27
27
|
const DEFAULT_EXPORT_SCALE = 2;
|
|
28
|
+
const DEFAULT_COLOR = '#000000';
|
|
29
|
+
const DEFAULT_BACKGROUND_COLOR = '#ffffff';
|
|
28
30
|
/**
|
|
29
31
|
* Represents the [Kendo UI Signature component for Angular]({% slug overview_signature %}).
|
|
30
32
|
*
|
|
@@ -69,7 +71,7 @@ export class SignatureComponent {
|
|
|
69
71
|
* * `small`
|
|
70
72
|
* * `medium` (default)
|
|
71
73
|
* * `large`
|
|
72
|
-
* * `full`
|
|
74
|
+
* * `full` (not supported by the Signature)
|
|
73
75
|
* * `none`
|
|
74
76
|
*/
|
|
75
77
|
this.rounded = DEFAULT_ROUNDED;
|
|
@@ -84,22 +86,6 @@ export class SignatureComponent {
|
|
|
84
86
|
* * `none`
|
|
85
87
|
*/
|
|
86
88
|
this.fillMode = DEFAULT_FILL_MODE;
|
|
87
|
-
/**
|
|
88
|
-
* The stroke color of the signature.
|
|
89
|
-
*
|
|
90
|
-
* Accepts CSS color names and hex values.
|
|
91
|
-
*
|
|
92
|
-
* @default '#000000'
|
|
93
|
-
*/
|
|
94
|
-
this.color = '#000000';
|
|
95
|
-
/**
|
|
96
|
-
* The background color of the signature.
|
|
97
|
-
*
|
|
98
|
-
* Accepts CSS color names and hex values.
|
|
99
|
-
*
|
|
100
|
-
* @default '#ffffff'
|
|
101
|
-
*/
|
|
102
|
-
this.backgroundColor = '#ffffff';
|
|
103
89
|
/**
|
|
104
90
|
* The stroke width of the signature.
|
|
105
91
|
*
|
|
@@ -314,6 +300,7 @@ export class SignatureComponent {
|
|
|
314
300
|
}
|
|
315
301
|
ngAfterViewInit() {
|
|
316
302
|
this.applyHostClasses();
|
|
303
|
+
this.readThemeColors();
|
|
317
304
|
this.ngZone.runOutsideAngular(() => {
|
|
318
305
|
const element = this.canvas.nativeElement;
|
|
319
306
|
this.instance = new SignaturePad(element, Object.assign(Object.assign({}, this.options), { onChange: () => this.onValueChange(), onDraw: () => this.onDraw(), onDrawEnd: () => this.onDrawEnd() }));
|
|
@@ -384,6 +371,15 @@ export class SignatureComponent {
|
|
|
384
371
|
this.isOpen = false;
|
|
385
372
|
}
|
|
386
373
|
}
|
|
374
|
+
/**
|
|
375
|
+
* @hidden
|
|
376
|
+
*/
|
|
377
|
+
onDialogKeydown(e) {
|
|
378
|
+
if (e.keyCode === Keys.Escape) {
|
|
379
|
+
this.isOpen = false;
|
|
380
|
+
this.cd.detectChanges();
|
|
381
|
+
}
|
|
382
|
+
}
|
|
387
383
|
/**
|
|
388
384
|
* @hidden
|
|
389
385
|
*/
|
|
@@ -452,6 +448,17 @@ export class SignatureComponent {
|
|
|
452
448
|
];
|
|
453
449
|
this.hostClasses.forEach(([name, enabled]) => classList.toggle(name, enabled));
|
|
454
450
|
}
|
|
451
|
+
readThemeColors() {
|
|
452
|
+
let defaultColor = DEFAULT_COLOR;
|
|
453
|
+
let defaultBackgroundColor = DEFAULT_BACKGROUND_COLOR;
|
|
454
|
+
if (isDocumentAvailable()) {
|
|
455
|
+
const el = this.element.nativeElement;
|
|
456
|
+
defaultColor = getComputedStyle(el).color;
|
|
457
|
+
defaultBackgroundColor = getComputedStyle(el).backgroundColor;
|
|
458
|
+
}
|
|
459
|
+
this.color = this.color || defaultColor;
|
|
460
|
+
this.backgroundColor = this.backgroundColor || defaultBackgroundColor;
|
|
461
|
+
}
|
|
455
462
|
/**
|
|
456
463
|
* Focuses the wrapper of the Signature.
|
|
457
464
|
*/
|
|
@@ -584,8 +591,8 @@ SignatureComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
|
|
|
584
591
|
<button
|
|
585
592
|
*ngIf="showMinimize"
|
|
586
593
|
kendoButton
|
|
587
|
-
class="k-signature-action k-signature-minimize"
|
|
588
|
-
icon="
|
|
594
|
+
class="k-signature-action k-signature-minimize k-rotate-180"
|
|
595
|
+
icon="hyperlink-open"
|
|
589
596
|
fillMode="flat"
|
|
590
597
|
[size]="size"
|
|
591
598
|
(click)="onMinimize()"
|
|
@@ -617,7 +624,7 @@ SignatureComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
|
|
|
617
624
|
</button>
|
|
618
625
|
</div>
|
|
619
626
|
|
|
620
|
-
<kendo-dialog *ngIf="isOpen" (click)="onDialogClick($event)">
|
|
627
|
+
<kendo-dialog *ngIf="isOpen" (click)="onDialogClick($event)" (keydown)="onDialogKeydown($event)">
|
|
621
628
|
<kendo-signature
|
|
622
629
|
[readonly]="readonly"
|
|
623
630
|
[disabled]="disabled"
|
|
@@ -677,8 +684,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
677
684
|
<button
|
|
678
685
|
*ngIf="showMinimize"
|
|
679
686
|
kendoButton
|
|
680
|
-
class="k-signature-action k-signature-minimize"
|
|
681
|
-
icon="
|
|
687
|
+
class="k-signature-action k-signature-minimize k-rotate-180"
|
|
688
|
+
icon="hyperlink-open"
|
|
682
689
|
fillMode="flat"
|
|
683
690
|
[size]="size"
|
|
684
691
|
(click)="onMinimize()"
|
|
@@ -710,7 +717,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
710
717
|
</button>
|
|
711
718
|
</div>
|
|
712
719
|
|
|
713
|
-
<kendo-dialog *ngIf="isOpen" (click)="onDialogClick($event)">
|
|
720
|
+
<kendo-dialog *ngIf="isOpen" (click)="onDialogClick($event)" (keydown)="onDialogKeydown($event)">
|
|
714
721
|
<kendo-signature
|
|
715
722
|
[readonly]="readonly"
|
|
716
723
|
[disabled]="disabled"
|
|
@@ -535,7 +535,7 @@ const packageMetadata = {
|
|
|
535
535
|
name: '@progress/kendo-angular-inputs',
|
|
536
536
|
productName: 'Kendo UI for Angular',
|
|
537
537
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
538
|
-
publishDate:
|
|
538
|
+
publishDate: 1663775032,
|
|
539
539
|
version: '',
|
|
540
540
|
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'
|
|
541
541
|
};
|
|
@@ -11608,6 +11608,7 @@ class ColorPickerComponent {
|
|
|
11608
11608
|
tileSize: this._paletteSettings.tileSize || 24,
|
|
11609
11609
|
columns: this._paletteSettings.columns || presetColumns || 10
|
|
11610
11610
|
};
|
|
11611
|
+
this.handleHostId();
|
|
11611
11612
|
}
|
|
11612
11613
|
ngAfterViewInit() {
|
|
11613
11614
|
const stylingInputs = ['size', 'rounded', 'fillMode'];
|
|
@@ -11615,7 +11616,6 @@ class ColorPickerComponent {
|
|
|
11615
11616
|
this.handleClasses(this[input], input);
|
|
11616
11617
|
});
|
|
11617
11618
|
this.setHostElementAriaLabel();
|
|
11618
|
-
this.handleHostId();
|
|
11619
11619
|
this.initDomEvents();
|
|
11620
11620
|
}
|
|
11621
11621
|
ngOnChanges(changes) {
|
|
@@ -13140,6 +13140,8 @@ const DEFAULT_ROUNDED = 'medium';
|
|
|
13140
13140
|
const DEFAULT_FILL_MODE = 'solid';
|
|
13141
13141
|
const DEFAULT_POPUP_SCALE = 3;
|
|
13142
13142
|
const DEFAULT_EXPORT_SCALE = 2;
|
|
13143
|
+
const DEFAULT_COLOR = '#000000';
|
|
13144
|
+
const DEFAULT_BACKGROUND_COLOR = '#ffffff';
|
|
13143
13145
|
/**
|
|
13144
13146
|
* Represents the [Kendo UI Signature component for Angular]({% slug overview_signature %}).
|
|
13145
13147
|
*
|
|
@@ -13184,7 +13186,7 @@ class SignatureComponent {
|
|
|
13184
13186
|
* * `small`
|
|
13185
13187
|
* * `medium` (default)
|
|
13186
13188
|
* * `large`
|
|
13187
|
-
* * `full`
|
|
13189
|
+
* * `full` (not supported by the Signature)
|
|
13188
13190
|
* * `none`
|
|
13189
13191
|
*/
|
|
13190
13192
|
this.rounded = DEFAULT_ROUNDED;
|
|
@@ -13199,22 +13201,6 @@ class SignatureComponent {
|
|
|
13199
13201
|
* * `none`
|
|
13200
13202
|
*/
|
|
13201
13203
|
this.fillMode = DEFAULT_FILL_MODE;
|
|
13202
|
-
/**
|
|
13203
|
-
* The stroke color of the signature.
|
|
13204
|
-
*
|
|
13205
|
-
* Accepts CSS color names and hex values.
|
|
13206
|
-
*
|
|
13207
|
-
* @default '#000000'
|
|
13208
|
-
*/
|
|
13209
|
-
this.color = '#000000';
|
|
13210
|
-
/**
|
|
13211
|
-
* The background color of the signature.
|
|
13212
|
-
*
|
|
13213
|
-
* Accepts CSS color names and hex values.
|
|
13214
|
-
*
|
|
13215
|
-
* @default '#ffffff'
|
|
13216
|
-
*/
|
|
13217
|
-
this.backgroundColor = '#ffffff';
|
|
13218
13204
|
/**
|
|
13219
13205
|
* The stroke width of the signature.
|
|
13220
13206
|
*
|
|
@@ -13429,6 +13415,7 @@ class SignatureComponent {
|
|
|
13429
13415
|
}
|
|
13430
13416
|
ngAfterViewInit() {
|
|
13431
13417
|
this.applyHostClasses();
|
|
13418
|
+
this.readThemeColors();
|
|
13432
13419
|
this.ngZone.runOutsideAngular(() => {
|
|
13433
13420
|
const element = this.canvas.nativeElement;
|
|
13434
13421
|
this.instance = new SignaturePad(element, Object.assign(Object.assign({}, this.options), { onChange: () => this.onValueChange(), onDraw: () => this.onDraw(), onDrawEnd: () => this.onDrawEnd() }));
|
|
@@ -13499,6 +13486,15 @@ class SignatureComponent {
|
|
|
13499
13486
|
this.isOpen = false;
|
|
13500
13487
|
}
|
|
13501
13488
|
}
|
|
13489
|
+
/**
|
|
13490
|
+
* @hidden
|
|
13491
|
+
*/
|
|
13492
|
+
onDialogKeydown(e) {
|
|
13493
|
+
if (e.keyCode === Keys.Escape) {
|
|
13494
|
+
this.isOpen = false;
|
|
13495
|
+
this.cd.detectChanges();
|
|
13496
|
+
}
|
|
13497
|
+
}
|
|
13502
13498
|
/**
|
|
13503
13499
|
* @hidden
|
|
13504
13500
|
*/
|
|
@@ -13567,6 +13563,17 @@ class SignatureComponent {
|
|
|
13567
13563
|
];
|
|
13568
13564
|
this.hostClasses.forEach(([name, enabled]) => classList.toggle(name, enabled));
|
|
13569
13565
|
}
|
|
13566
|
+
readThemeColors() {
|
|
13567
|
+
let defaultColor = DEFAULT_COLOR;
|
|
13568
|
+
let defaultBackgroundColor = DEFAULT_BACKGROUND_COLOR;
|
|
13569
|
+
if (isDocumentAvailable()) {
|
|
13570
|
+
const el = this.element.nativeElement;
|
|
13571
|
+
defaultColor = getComputedStyle(el).color;
|
|
13572
|
+
defaultBackgroundColor = getComputedStyle(el).backgroundColor;
|
|
13573
|
+
}
|
|
13574
|
+
this.color = this.color || defaultColor;
|
|
13575
|
+
this.backgroundColor = this.backgroundColor || defaultBackgroundColor;
|
|
13576
|
+
}
|
|
13570
13577
|
/**
|
|
13571
13578
|
* Focuses the wrapper of the Signature.
|
|
13572
13579
|
*/
|
|
@@ -13699,8 +13706,8 @@ SignatureComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
|
|
|
13699
13706
|
<button
|
|
13700
13707
|
*ngIf="showMinimize"
|
|
13701
13708
|
kendoButton
|
|
13702
|
-
class="k-signature-action k-signature-minimize"
|
|
13703
|
-
icon="
|
|
13709
|
+
class="k-signature-action k-signature-minimize k-rotate-180"
|
|
13710
|
+
icon="hyperlink-open"
|
|
13704
13711
|
fillMode="flat"
|
|
13705
13712
|
[size]="size"
|
|
13706
13713
|
(click)="onMinimize()"
|
|
@@ -13732,7 +13739,7 @@ SignatureComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
|
|
|
13732
13739
|
</button>
|
|
13733
13740
|
</div>
|
|
13734
13741
|
|
|
13735
|
-
<kendo-dialog *ngIf="isOpen" (click)="onDialogClick($event)">
|
|
13742
|
+
<kendo-dialog *ngIf="isOpen" (click)="onDialogClick($event)" (keydown)="onDialogKeydown($event)">
|
|
13736
13743
|
<kendo-signature
|
|
13737
13744
|
[readonly]="readonly"
|
|
13738
13745
|
[disabled]="disabled"
|
|
@@ -13792,8 +13799,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
13792
13799
|
<button
|
|
13793
13800
|
*ngIf="showMinimize"
|
|
13794
13801
|
kendoButton
|
|
13795
|
-
class="k-signature-action k-signature-minimize"
|
|
13796
|
-
icon="
|
|
13802
|
+
class="k-signature-action k-signature-minimize k-rotate-180"
|
|
13803
|
+
icon="hyperlink-open"
|
|
13797
13804
|
fillMode="flat"
|
|
13798
13805
|
[size]="size"
|
|
13799
13806
|
(click)="onMinimize()"
|
|
@@ -13825,7 +13832,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
13825
13832
|
</button>
|
|
13826
13833
|
</div>
|
|
13827
13834
|
|
|
13828
|
-
<kendo-dialog *ngIf="isOpen" (click)="onDialogClick($event)">
|
|
13835
|
+
<kendo-dialog *ngIf="isOpen" (click)="onDialogClick($event)" (keydown)="onDialogKeydown($event)">
|
|
13829
13836
|
<kendo-signature
|
|
13830
13837
|
[readonly]="readonly"
|
|
13831
13838
|
[disabled]="disabled"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-inputs",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.1.0-dev.202209211545",
|
|
4
4
|
"description": "Kendo UI for Angular Inputs Package - Everything you need to build professional form functionality (Checkbox, ColorGradient, ColorPalette, ColorPicker, FlatColorPicker, FormField, MaskedTextBox, NumericTextBox, RadioButton, RangeSlider, Slider, Switch, TextArea, and TextBox Components)",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -78,7 +78,7 @@ export declare class SignatureComponent implements ControlValueAccessor {
|
|
|
78
78
|
* * `small`
|
|
79
79
|
* * `medium` (default)
|
|
80
80
|
* * `large`
|
|
81
|
-
* * `full`
|
|
81
|
+
* * `full` (not supported by the Signature)
|
|
82
82
|
* * `none`
|
|
83
83
|
*/
|
|
84
84
|
rounded: InputRounded;
|
|
@@ -98,17 +98,17 @@ export declare class SignatureComponent implements ControlValueAccessor {
|
|
|
98
98
|
*
|
|
99
99
|
* Accepts CSS color names and hex values.
|
|
100
100
|
*
|
|
101
|
-
*
|
|
101
|
+
* The default value is determined by the theme `$kendo-input-text` variable.
|
|
102
102
|
*/
|
|
103
|
-
color:
|
|
103
|
+
color: any;
|
|
104
104
|
/**
|
|
105
105
|
* The background color of the signature.
|
|
106
106
|
*
|
|
107
107
|
* Accepts CSS color names and hex values.
|
|
108
108
|
*
|
|
109
|
-
*
|
|
109
|
+
* The default value is determined by the theme `$kendo-input-bg` variable.
|
|
110
110
|
*/
|
|
111
|
-
backgroundColor:
|
|
111
|
+
backgroundColor: any;
|
|
112
112
|
/**
|
|
113
113
|
* The stroke width of the signature.
|
|
114
114
|
*
|
|
@@ -272,6 +272,10 @@ export declare class SignatureComponent implements ControlValueAccessor {
|
|
|
272
272
|
* @hidden
|
|
273
273
|
*/
|
|
274
274
|
onDialogClick(e: any): void;
|
|
275
|
+
/**
|
|
276
|
+
* @hidden
|
|
277
|
+
*/
|
|
278
|
+
onDialogKeydown(e: any): void;
|
|
275
279
|
/**
|
|
276
280
|
* @hidden
|
|
277
281
|
*/
|
|
@@ -296,6 +300,7 @@ export declare class SignatureComponent implements ControlValueAccessor {
|
|
|
296
300
|
*/
|
|
297
301
|
onMinimize(): void;
|
|
298
302
|
private applyHostClasses;
|
|
303
|
+
private readThemeColors;
|
|
299
304
|
/**
|
|
300
305
|
* Focuses the wrapper of the Signature.
|
|
301
306
|
*/
|