@progress/kendo-angular-inputs 10.0.1-dev.202209201334 → 10.1.0-dev.202209260825

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.
@@ -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: 1663680768,
12
+ publishDate: 1664180652,
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
  };
@@ -44,7 +44,6 @@ export class RangeSliderComponent extends SliderBase {
44
44
  * @hidden
45
45
  */
46
46
  this.focusableId = this.startHandleId;
47
- this.handleZIndex = 0;
48
47
  this.activeHandle = 'startHandle';
49
48
  this.focusChangedProgrammatically = false;
50
49
  /**
@@ -90,8 +89,10 @@ export class RangeSliderComponent extends SliderBase {
90
89
  if (this.isDisabled || !handler) {
91
90
  return;
92
91
  }
93
- this.renderer.setStyle(e.target, 'zIndex', ++this.handleZIndex);
94
92
  const startHandleIsActive = isStartHandle(e.target);
93
+ const nonDraggedHandle = startHandleIsActive ? this.draghandleEnd.nativeElement : this.draghandleStart.nativeElement;
94
+ this.renderer.removeStyle(nonDraggedHandle, 'zIndex');
95
+ this.renderer.setStyle(e.target, 'zIndex', 1);
95
96
  const value = handler(Object.assign(Object.assign({}, options), { value: startHandleIsActive ? this.value[0] : this.value[1] }));
96
97
  if (startHandleIsActive) {
97
98
  if (value > this.value[1]) {
@@ -210,7 +211,9 @@ export class RangeSliderComponent extends SliderBase {
210
211
  }
211
212
  const target = args.originalEvent.target;
212
213
  this.draggedHandle = target;
213
- this.renderer.setStyle(target, 'zIndex', ++this.handleZIndex);
214
+ const nonDraggedHandle = this.draghandleStart.nativeElement === this.draggedHandle ? this.draghandleEnd.nativeElement : this.draghandleStart.nativeElement;
215
+ this.renderer.removeStyle(nonDraggedHandle, 'zIndex');
216
+ this.renderer.setStyle(target, 'zIndex', 1);
214
217
  }
215
218
  /**
216
219
  * @hidden
@@ -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="window-minimize"
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="window-minimize"
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: 1663680768,
538
+ publishDate: 1664180652,
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
  };
@@ -1669,7 +1669,6 @@ class RangeSliderComponent extends SliderBase {
1669
1669
  * @hidden
1670
1670
  */
1671
1671
  this.focusableId = this.startHandleId;
1672
- this.handleZIndex = 0;
1673
1672
  this.activeHandle = 'startHandle';
1674
1673
  this.focusChangedProgrammatically = false;
1675
1674
  /**
@@ -1715,8 +1714,10 @@ class RangeSliderComponent extends SliderBase {
1715
1714
  if (this.isDisabled || !handler) {
1716
1715
  return;
1717
1716
  }
1718
- this.renderer.setStyle(e.target, 'zIndex', ++this.handleZIndex);
1719
1717
  const startHandleIsActive = isStartHandle(e.target);
1718
+ const nonDraggedHandle = startHandleIsActive ? this.draghandleEnd.nativeElement : this.draghandleStart.nativeElement;
1719
+ this.renderer.removeStyle(nonDraggedHandle, 'zIndex');
1720
+ this.renderer.setStyle(e.target, 'zIndex', 1);
1720
1721
  const value = handler(Object.assign(Object.assign({}, options), { value: startHandleIsActive ? this.value[0] : this.value[1] }));
1721
1722
  if (startHandleIsActive) {
1722
1723
  if (value > this.value[1]) {
@@ -1835,7 +1836,9 @@ class RangeSliderComponent extends SliderBase {
1835
1836
  }
1836
1837
  const target = args.originalEvent.target;
1837
1838
  this.draggedHandle = target;
1838
- this.renderer.setStyle(target, 'zIndex', ++this.handleZIndex);
1839
+ const nonDraggedHandle = this.draghandleStart.nativeElement === this.draggedHandle ? this.draghandleEnd.nativeElement : this.draghandleStart.nativeElement;
1840
+ this.renderer.removeStyle(nonDraggedHandle, 'zIndex');
1841
+ this.renderer.setStyle(target, 'zIndex', 1);
1839
1842
  }
1840
1843
  /**
1841
1844
  * @hidden
@@ -13140,6 +13143,8 @@ const DEFAULT_ROUNDED = 'medium';
13140
13143
  const DEFAULT_FILL_MODE = 'solid';
13141
13144
  const DEFAULT_POPUP_SCALE = 3;
13142
13145
  const DEFAULT_EXPORT_SCALE = 2;
13146
+ const DEFAULT_COLOR = '#000000';
13147
+ const DEFAULT_BACKGROUND_COLOR = '#ffffff';
13143
13148
  /**
13144
13149
  * Represents the [Kendo UI Signature component for Angular]({% slug overview_signature %}).
13145
13150
  *
@@ -13184,7 +13189,7 @@ class SignatureComponent {
13184
13189
  * * `small`
13185
13190
  * * `medium` (default)
13186
13191
  * * `large`
13187
- * * `full`
13192
+ * * `full` (not supported by the Signature)
13188
13193
  * * `none`
13189
13194
  */
13190
13195
  this.rounded = DEFAULT_ROUNDED;
@@ -13199,22 +13204,6 @@ class SignatureComponent {
13199
13204
  * * `none`
13200
13205
  */
13201
13206
  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
13207
  /**
13219
13208
  * The stroke width of the signature.
13220
13209
  *
@@ -13429,6 +13418,7 @@ class SignatureComponent {
13429
13418
  }
13430
13419
  ngAfterViewInit() {
13431
13420
  this.applyHostClasses();
13421
+ this.readThemeColors();
13432
13422
  this.ngZone.runOutsideAngular(() => {
13433
13423
  const element = this.canvas.nativeElement;
13434
13424
  this.instance = new SignaturePad(element, Object.assign(Object.assign({}, this.options), { onChange: () => this.onValueChange(), onDraw: () => this.onDraw(), onDrawEnd: () => this.onDrawEnd() }));
@@ -13499,6 +13489,15 @@ class SignatureComponent {
13499
13489
  this.isOpen = false;
13500
13490
  }
13501
13491
  }
13492
+ /**
13493
+ * @hidden
13494
+ */
13495
+ onDialogKeydown(e) {
13496
+ if (e.keyCode === Keys.Escape) {
13497
+ this.isOpen = false;
13498
+ this.cd.detectChanges();
13499
+ }
13500
+ }
13502
13501
  /**
13503
13502
  * @hidden
13504
13503
  */
@@ -13567,6 +13566,17 @@ class SignatureComponent {
13567
13566
  ];
13568
13567
  this.hostClasses.forEach(([name, enabled]) => classList.toggle(name, enabled));
13569
13568
  }
13569
+ readThemeColors() {
13570
+ let defaultColor = DEFAULT_COLOR;
13571
+ let defaultBackgroundColor = DEFAULT_BACKGROUND_COLOR;
13572
+ if (isDocumentAvailable()) {
13573
+ const el = this.element.nativeElement;
13574
+ defaultColor = getComputedStyle(el).color;
13575
+ defaultBackgroundColor = getComputedStyle(el).backgroundColor;
13576
+ }
13577
+ this.color = this.color || defaultColor;
13578
+ this.backgroundColor = this.backgroundColor || defaultBackgroundColor;
13579
+ }
13570
13580
  /**
13571
13581
  * Focuses the wrapper of the Signature.
13572
13582
  */
@@ -13699,8 +13709,8 @@ SignatureComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
13699
13709
  <button
13700
13710
  *ngIf="showMinimize"
13701
13711
  kendoButton
13702
- class="k-signature-action k-signature-minimize"
13703
- icon="window-minimize"
13712
+ class="k-signature-action k-signature-minimize k-rotate-180"
13713
+ icon="hyperlink-open"
13704
13714
  fillMode="flat"
13705
13715
  [size]="size"
13706
13716
  (click)="onMinimize()"
@@ -13732,7 +13742,7 @@ SignatureComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
13732
13742
  </button>
13733
13743
  </div>
13734
13744
 
13735
- <kendo-dialog *ngIf="isOpen" (click)="onDialogClick($event)">
13745
+ <kendo-dialog *ngIf="isOpen" (click)="onDialogClick($event)" (keydown)="onDialogKeydown($event)">
13736
13746
  <kendo-signature
13737
13747
  [readonly]="readonly"
13738
13748
  [disabled]="disabled"
@@ -13792,8 +13802,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
13792
13802
  <button
13793
13803
  *ngIf="showMinimize"
13794
13804
  kendoButton
13795
- class="k-signature-action k-signature-minimize"
13796
- icon="window-minimize"
13805
+ class="k-signature-action k-signature-minimize k-rotate-180"
13806
+ icon="hyperlink-open"
13797
13807
  fillMode="flat"
13798
13808
  [size]="size"
13799
13809
  (click)="onMinimize()"
@@ -13825,7 +13835,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
13825
13835
  </button>
13826
13836
  </div>
13827
13837
 
13828
- <kendo-dialog *ngIf="isOpen" (click)="onDialogClick($event)">
13838
+ <kendo-dialog *ngIf="isOpen" (click)="onDialogClick($event)" (keydown)="onDialogKeydown($event)">
13829
13839
  <kendo-signature
13830
13840
  [readonly]="readonly"
13831
13841
  [disabled]="disabled"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-inputs",
3
- "version": "10.0.1-dev.202209201334",
3
+ "version": "10.1.0-dev.202209260825",
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",
@@ -38,7 +38,6 @@ export declare class RangeSliderComponent extends SliderBase implements AfterVie
38
38
  */
39
39
  focusableId: string;
40
40
  private draggedHandle;
41
- private handleZIndex;
42
41
  private lastHandlePosition;
43
42
  private activeHandle;
44
43
  private focusChangedProgrammatically;
@@ -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
- * @default '#000000'
101
+ * The default value is determined by the theme `$kendo-input-text` variable.
102
102
  */
103
- color: string;
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
- * @default '#ffffff'
109
+ * The default value is determined by the theme `$kendo-input-bg` variable.
110
110
  */
111
- backgroundColor: string;
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
  */