@progress/kendo-angular-inputs 11.3.0-develop.1 → 11.3.0-develop.11

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.
@@ -10,14 +10,14 @@ import { take, filter, concatMap, startWith, takeUntil, skip, debounceTime, thro
10
10
  import * as i1 from '@progress/kendo-angular-l10n';
11
11
  import { ComponentMessages, LocalizationService, L10N_PREFIX, RTL } from '@progress/kendo-angular-l10n';
12
12
  import * as i3 from '@progress/kendo-angular-common';
13
- import { Keys, guid, hasObservers, anyChanged, isDocumentAvailable, KendoInput, isChanged, DraggableModule, EventsModule, ResizeSensorModule, PreventableEvent, findFocusableChild, parseCSSClassNames, closest as closest$1 } from '@progress/kendo-angular-common';
13
+ import { Keys, guid, hasObservers, anyChanged, isDocumentAvailable, KendoInput, isChanged, DraggableModule, EventsModule, ResizeSensorModule, isSafari, PreventableEvent, findFocusableChild, parseCSSClassNames, closest as closest$1 } from '@progress/kendo-angular-common';
14
14
  import { validatePackage } from '@progress/kendo-licensing';
15
15
  import { caretAltUpIcon, caretAltDownIcon, caretAltLeftIcon, caretAltRightIcon, checkIcon, exclamationCircleIcon, xIcon, dropletSliderIcon, paletteIcon, dropletSlashIcon, caretAltExpandIcon, xCircleIcon, hyperlinkOpenIcon } from '@progress/kendo-svg-icons';
16
16
  import * as i2 from '@progress/kendo-angular-buttons';
17
17
  import { ButtonModule } from '@progress/kendo-angular-buttons';
18
18
  import * as i1$1 from '@angular/common';
19
19
  import { CommonModule } from '@angular/common';
20
- import { browser, mobileOS, detectDesktopBrowser, detectMobileOS } from '@progress/kendo-common';
20
+ import { browser, mobileOS } from '@progress/kendo-common';
21
21
  import * as i1$2 from '@progress/kendo-angular-intl';
22
22
  import * as i2$1 from '@progress/kendo-angular-icons';
23
23
  import { IconsModule } from '@progress/kendo-angular-icons';
@@ -539,8 +539,8 @@ const packageMetadata = {
539
539
  name: '@progress/kendo-angular-inputs',
540
540
  productName: 'Kendo UI for Angular',
541
541
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
542
- publishDate: 1676463662,
543
- version: '11.3.0-develop.1',
542
+ publishDate: 1677599249,
543
+ version: '11.3.0-develop.11',
544
544
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
545
545
  };
546
546
 
@@ -6080,16 +6080,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
6080
6080
  }]
6081
6081
  }] });
6082
6082
 
6083
- /**
6084
- * @hidden
6085
- *
6086
- * Returns true if the used browser is Safari.
6087
- */
6088
- const isSafari = (userAgent) => {
6089
- const desktopBrowser = detectDesktopBrowser(userAgent);
6090
- const mobileOS = detectMobileOS(userAgent);
6091
- return (desktopBrowser && desktopBrowser.safari) || (mobileOS && mobileOS.browser === 'mobilesafari');
6092
- };
6093
6083
  /**
6094
6084
  * @hidden
6095
6085
  *
@@ -8556,7 +8546,7 @@ class FlatColorPickerHeaderComponent {
8556
8546
  onHeaderTabOut(ev, index) {
8557
8547
  if (index === 0) {
8558
8548
  ev.preventDefault();
8559
- this.tabOut.emit();
8549
+ this.tabOut.emit(ev);
8560
8550
  }
8561
8551
  }
8562
8552
  }
@@ -8565,7 +8555,9 @@ FlatColorPickerHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
8565
8555
  <div class="k-coloreditor-header-actions k-hstack">
8566
8556
  <div
8567
8557
  *ngIf="viewButtons"
8568
- class="k-button-group k-button-group-flat">
8558
+ class="k-button-group k-button-group-flat"
8559
+ role="group"
8560
+ >
8569
8561
  <button
8570
8562
  *ngFor="let view of views; let i = index;"
8571
8563
  kendoButton
@@ -8624,7 +8616,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
8624
8616
  <div class="k-coloreditor-header-actions k-hstack">
8625
8617
  <div
8626
8618
  *ngIf="viewButtons"
8627
- class="k-button-group k-button-group-flat">
8619
+ class="k-button-group k-button-group-flat"
8620
+ role="group"
8621
+ >
8628
8622
  <button
8629
8623
  *ngFor="let view of views; let i = index;"
8630
8624
  kendoButton
@@ -8950,6 +8944,11 @@ class ColorInputComponent {
8950
8944
  this.hex = parseColor(color, 'hex', this.opacity);
8951
8945
  this.valueChange.emit(color);
8952
8946
  }
8947
+ focusDragHandle(event) {
8948
+ event.preventDefault();
8949
+ event.stopImmediatePropagation();
8950
+ this.tabOut.emit();
8951
+ }
8953
8952
  handleHexValueChange(hex) {
8954
8953
  this.hex = hex;
8955
8954
  const color = parseColor(hex, 'rgba', this.opacity);
@@ -8991,7 +8990,7 @@ class ColorInputComponent {
8991
8990
  }
8992
8991
  }
8993
8992
  ColorInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ColorInputComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
8994
- ColorInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: ColorInputComponent, selector: "kendo-colorinput", inputs: { focusableId: "focusableId", formatView: "formatView", tabindex: "tabindex", value: "value", opacity: "opacity", disabled: "disabled", readonly: "readonly" }, outputs: { valueChange: "valueChange", tabOut: "tabOut" }, host: { properties: { "class.k-colorgradient-inputs": "this.colorInputClass", "class.k-hstack": "this.colorInputClass" } }, viewQueries: [{ propertyName: "opacityInput", first: true, predicate: ["opacityInput"], descendants: true }, { propertyName: "hexInput", first: true, predicate: ["hexInput"], descendants: true }, { propertyName: "blueInput", first: true, predicate: ["blueInput"], descendants: true }, { propertyName: "toggleFormatButton", first: true, predicate: ["toggleFormatButton"], descendants: true, read: ElementRef }], usesOnChanges: true, ngImport: i0, template: `
8993
+ ColorInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: ColorInputComponent, selector: "kendo-colorinput", inputs: { focusableId: "focusableId", formatView: "formatView", tabindex: "tabindex", value: "value", opacity: "opacity", disabled: "disabled", readonly: "readonly" }, outputs: { valueChange: "valueChange", tabOut: "tabOut" }, host: { properties: { "class.k-colorgradient-inputs": "this.colorInputClass", "class.k-hstack": "this.colorInputClass" } }, viewQueries: [{ propertyName: "opacityInput", first: true, predicate: ["opacityInput"], descendants: true }, { propertyName: "hexInput", first: true, predicate: ["hexInput"], descendants: true }, { propertyName: "blueInput", first: true, predicate: ["blue"], descendants: true }, { propertyName: "toggleFormatButton", first: true, predicate: ["toggleFormatButton"], descendants: true, read: ElementRef }], usesOnChanges: true, ngImport: i0, template: `
8995
8994
  <div class="k-vstack">
8996
8995
  <button
8997
8996
  kendoButton
@@ -9019,7 +9018,7 @@ ColorInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
9019
9018
  (blur)="handleHexInputBlur()"
9020
9019
  (input)="handleHexValueChange(hexInput.value)"
9021
9020
  [tabindex]="tabindex.toString()"
9022
- (keydown.tab)="$event.preventDefault(); tabOut.emit();"
9021
+ (keydown.tab)="focusDragHandle($event)"
9023
9022
  />
9024
9023
  <label [for]="focusableId" class="k-colorgradient-input-label">HEX</label>
9025
9024
  </div>
@@ -9103,7 +9102,7 @@ ColorInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
9103
9102
  [decimals]="2"
9104
9103
  (blur)="handleRgbaInputBlur()"
9105
9104
  (valueChange)="handleRgbaValueChange()"
9106
- (keydown.tab)="$event.preventDefault(); tabOut.emit();">
9105
+ (keydown.tab)="focusDragHandle($event)">
9107
9106
  </kendo-numerictextbox>
9108
9107
  <label [for]="alpha.focusableId" class="k-colorgradient-input-label">A</label>
9109
9108
  </div>
@@ -9141,7 +9140,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
9141
9140
  (blur)="handleHexInputBlur()"
9142
9141
  (input)="handleHexValueChange(hexInput.value)"
9143
9142
  [tabindex]="tabindex.toString()"
9144
- (keydown.tab)="$event.preventDefault(); tabOut.emit();"
9143
+ (keydown.tab)="focusDragHandle($event)"
9145
9144
  />
9146
9145
  <label [for]="focusableId" class="k-colorgradient-input-label">HEX</label>
9147
9146
  </div>
@@ -9225,7 +9224,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
9225
9224
  [decimals]="2"
9226
9225
  (blur)="handleRgbaInputBlur()"
9227
9226
  (valueChange)="handleRgbaValueChange()"
9228
- (keydown.tab)="$event.preventDefault(); tabOut.emit();">
9227
+ (keydown.tab)="focusDragHandle($event)">
9229
9228
  </kendo-numerictextbox>
9230
9229
  <label [for]="alpha.focusableId" class="k-colorgradient-input-label">A</label>
9231
9230
  </div>
@@ -9264,7 +9263,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
9264
9263
  args: ['hexInput']
9265
9264
  }], blueInput: [{
9266
9265
  type: ViewChild,
9267
- args: ['blueInput']
9266
+ args: ['blue']
9268
9267
  }], toggleFormatButton: [{
9269
9268
  type: ViewChild,
9270
9269
  args: ['toggleFormatButton', { static: false, read: ElementRef }]
@@ -9791,7 +9790,6 @@ class ColorGradientComponent {
9791
9790
  reset() {
9792
9791
  this.handleValueChange(undefined);
9793
9792
  this.updateUI();
9794
- this.host.nativeElement.focus();
9795
9793
  }
9796
9794
  /**
9797
9795
  * @hidden
@@ -10593,6 +10591,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
10593
10591
  type: Injectable
10594
10592
  }] });
10595
10593
 
10594
+ /* eslint-disable @typescript-eslint/no-explicit-any */
10596
10595
  const DEFAULT_TILE_SIZE = 24;
10597
10596
  const DEFAULT_COLUMNS_COUNT = 10;
10598
10597
  const DEFAULT_PRESET = 'office';
@@ -10668,6 +10667,7 @@ class ColorPaletteComponent {
10668
10667
  */
10669
10668
  this.uniqueId = guid();
10670
10669
  this._tabindex = 0;
10670
+ this.subs = new Subscription();
10671
10671
  this.notifyNgTouched = () => { };
10672
10672
  this.notifyNgChanged = () => { };
10673
10673
  validatePackage(packageMetadata);
@@ -10774,6 +10774,10 @@ class ColorPaletteComponent {
10774
10774
  this.palette = this.palette || defaultPreset;
10775
10775
  this.setRows();
10776
10776
  }
10777
+ const elem = this.host.nativeElement;
10778
+ this.subs.add(this.renderer.listen(elem, 'keydown', event => this.handleKeydown(event)));
10779
+ this.subs.add(this.renderer.listen(elem, 'focus', () => this.handleFocus()));
10780
+ this.subs.add(this.renderer.listen(elem, 'blur', () => this.handleHostBlur()));
10777
10781
  }
10778
10782
  ngAfterViewInit() {
10779
10783
  this.setHostElementAriaLabel();
@@ -10784,6 +10788,7 @@ class ColorPaletteComponent {
10784
10788
  }
10785
10789
  }
10786
10790
  ngOnDestroy() {
10791
+ this.subs.unsubscribe();
10787
10792
  if (this.dynamicRTLSubscription) {
10788
10793
  this.dynamicRTLSubscription.unsubscribe();
10789
10794
  }
@@ -10927,7 +10932,8 @@ class ColorPaletteComponent {
10927
10932
  this.focusedCell = this.selectedCell;
10928
10933
  }
10929
10934
  selectCell(value) {
10930
- this.selectedCell = this.service.getCellCoordsFor(value);
10935
+ const parsedColor = parseColor(value, 'hex');
10936
+ this.selectedCell = this.service.getCellCoordsFor(parsedColor);
10931
10937
  this.focusedCell = this.selectedCell;
10932
10938
  }
10933
10939
  setRows() {
@@ -10957,7 +10963,7 @@ class ColorPaletteComponent {
10957
10963
  }
10958
10964
  }
10959
10965
  ColorPaletteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ColorPaletteComponent, deps: [{ token: i0.ElementRef }, { token: ColorPaletteService }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i1.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
10960
- ColorPaletteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: ColorPaletteComponent, selector: "kendo-colorpalette", inputs: { id: "id", format: "format", value: "value", columns: "columns", palette: "palette", tabindex: "tabindex", disabled: "disabled", readonly: "readonly", tileSize: "tileSize" }, outputs: { selectionChange: "selectionChange", valueChange: "valueChange", cellSelection: "cellSelection" }, host: { listeners: { "keydown": "handleKeydown($event)", "focus": "handleFocus($event)", "blur": "handleHostBlur()" }, properties: { "attr.dir": "this.direction", "attr.role": "this.role", "attr.aria-activedescendant": "this.activeDescendant", "attr.id": "this.paletteId", "attr.tabindex": "this.hostTabindex", "class.k-colorpalette": "this.hostClasses", "attr.aria-disabled": "this.disabledClass", "class.k-disabled": "this.disabledClass", "attr.aria-readonly": "this.readonlyAttribute" } }, providers: [
10966
+ ColorPaletteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: ColorPaletteComponent, selector: "kendo-colorpalette", inputs: { id: "id", format: "format", value: "value", columns: "columns", palette: "palette", tabindex: "tabindex", disabled: "disabled", readonly: "readonly", tileSize: "tileSize" }, outputs: { selectionChange: "selectionChange", valueChange: "valueChange", cellSelection: "cellSelection" }, host: { properties: { "attr.dir": "this.direction", "attr.role": "this.role", "attr.aria-activedescendant": "this.activeDescendant", "attr.id": "this.paletteId", "attr.tabindex": "this.hostTabindex", "class.k-colorpalette": "this.hostClasses", "attr.aria-disabled": "this.disabledClass", "class.k-disabled": "this.disabledClass", "attr.aria-readonly": "this.readonlyAttribute" } }, providers: [
10961
10967
  {
10962
10968
  multi: true,
10963
10969
  provide: NG_VALUE_ACCESSOR,
@@ -10989,7 +10995,7 @@ ColorPaletteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
10989
10995
  role="gridcell"
10990
10996
  [class.k-selected]="selectedCell?.row === rowIndex && selectedCell?.col === colIndex"
10991
10997
  [class.k-focus]="focusInComponent && focusedCell?.row === rowIndex && focusedCell?.col === colIndex"
10992
- [attr.aria-selected]="selectedCell?.row === rowIndex && selectedCell?.col === colIndex"
10998
+ [attr.aria-selected]="selectedCell?.row === rowIndex && selectedCell?.col === colIndex ? 'true' : undefined"
10993
10999
  [attr.aria-label]="color"
10994
11000
  class="k-colorpalette-tile"
10995
11001
  [id]="'k-' + rowIndex + '-' + colIndex + '-' + uniqueId"
@@ -11045,7 +11051,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
11045
11051
  role="gridcell"
11046
11052
  [class.k-selected]="selectedCell?.row === rowIndex && selectedCell?.col === colIndex"
11047
11053
  [class.k-focus]="focusInComponent && focusedCell?.row === rowIndex && focusedCell?.col === colIndex"
11048
- [attr.aria-selected]="selectedCell?.row === rowIndex && selectedCell?.col === colIndex"
11054
+ [attr.aria-selected]="selectedCell?.row === rowIndex && selectedCell?.col === colIndex ? 'true' : undefined"
11049
11055
  [attr.aria-label]="color"
11050
11056
  class="k-colorpalette-tile"
11051
11057
  [id]="'k-' + rowIndex + '-' + colIndex + '-' + uniqueId"
@@ -11115,15 +11121,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
11115
11121
  }], readonlyAttribute: [{
11116
11122
  type: HostBinding,
11117
11123
  args: ['attr.aria-readonly']
11118
- }], handleKeydown: [{
11119
- type: HostListener,
11120
- args: ['keydown', ['$event']]
11121
- }], handleFocus: [{
11122
- type: HostListener,
11123
- args: ['focus', ['$event']]
11124
- }], handleHostBlur: [{
11125
- type: HostListener,
11126
- args: ['blur']
11127
11124
  }] } });
11128
11125
 
11129
11126
  /**
@@ -11425,15 +11422,6 @@ class FlatColorPickerComponent {
11425
11422
  }
11426
11423
  return this.activeView === 'gradient' ? this.gradient : this.palette;
11427
11424
  }
11428
- /**
11429
- * @hidden
11430
- */
11431
- get lastFocusable() {
11432
- if (this.preview) {
11433
- return this.footer.lastButton.nativeElement;
11434
- }
11435
- return this.activeView === 'gradient' ? this.gradient : this.palette;
11436
- }
11437
11425
  ngOnInit() {
11438
11426
  this.selection = this.value;
11439
11427
  this.control = this.injector.get(NgControl, null);
@@ -11461,6 +11449,31 @@ class FlatColorPickerComponent {
11461
11449
  }
11462
11450
  this.subscriptions.unsubscribe();
11463
11451
  }
11452
+ /**
11453
+ * @hidden
11454
+ */
11455
+ focusFirstHeaderButton() {
11456
+ if (this.gradientElement.nativeElement === document.activeElement) {
11457
+ if (this.headerHasContent && !this.preview) {
11458
+ const firstHeaderButton = this.headerElement.nativeElement.querySelector('.k-button');
11459
+ firstHeaderButton.focus();
11460
+ }
11461
+ }
11462
+ }
11463
+ /**
11464
+ * @hidden
11465
+ */
11466
+ lastFocusable(event) {
11467
+ var _a, _b;
11468
+ if (this.preview) {
11469
+ this.footer.lastButton.nativeElement.focus();
11470
+ return;
11471
+ }
11472
+ event.stopImmediatePropagation();
11473
+ const gradient = (_a = this.gradientElement) === null || _a === void 0 ? void 0 : _a.nativeElement;
11474
+ const palette = (_b = this.palette) === null || _b === void 0 ? void 0 : _b.host.nativeElement;
11475
+ this.activeView === 'gradient' ? gradient.focus() : palette.focus();
11476
+ }
11464
11477
  /**
11465
11478
  * @hidden
11466
11479
  */
@@ -11544,8 +11557,6 @@ class FlatColorPickerComponent {
11544
11557
  */
11545
11558
  onClearButtonClick() {
11546
11559
  this.resetInnerComponentValue();
11547
- this.internalNavigation = false;
11548
- this.host.nativeElement.focus();
11549
11560
  this.clearButtonClick.emit();
11550
11561
  }
11551
11562
  /**
@@ -11735,7 +11746,7 @@ FlatColorPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0
11735
11746
  hexInputPlaceholder="HEX">
11736
11747
  </ng-container>
11737
11748
  <div kendoFlatColorPickerHeader
11738
- [innerTabIndex]="this.innerTabIndex"
11749
+ [innerTabIndex]="innerTabIndex"
11739
11750
  *ngIf="headerHasContent"
11740
11751
  #header
11741
11752
  [clearButton]="clearButton"
@@ -11747,7 +11758,7 @@ FlatColorPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0
11747
11758
  (clearButtonClick)="onClearButtonClick()"
11748
11759
  (viewChange)="onViewChange($event)"
11749
11760
  (valuePaneClick)="resetSelection($event)"
11750
- (tabOut)="lastFocusable.focus()"></div>
11761
+ (tabOut)="lastFocusable($event)"></div>
11751
11762
  <div class="k-coloreditor-views k-vstack">
11752
11763
  <kendo-colorgradient #gradient
11753
11764
  [tabindex]="innerTabIndex"
@@ -11760,6 +11771,7 @@ FlatColorPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0
11760
11771
  [gradientSliderSmallStep]="gradientSettings.gradientSliderSmallStep"
11761
11772
  [gradientSliderStep]="gradientSettings.gradientSliderStep"
11762
11773
  [readonly]="readonly"
11774
+ (keydown.tab)="focusFirstHeaderButton()"
11763
11775
  (valueChange)="handleValueChange($event)"
11764
11776
  ></kendo-colorgradient>
11765
11777
  <kendo-colorpalette #palette
@@ -11858,7 +11870,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
11858
11870
  hexInputPlaceholder="HEX">
11859
11871
  </ng-container>
11860
11872
  <div kendoFlatColorPickerHeader
11861
- [innerTabIndex]="this.innerTabIndex"
11873
+ [innerTabIndex]="innerTabIndex"
11862
11874
  *ngIf="headerHasContent"
11863
11875
  #header
11864
11876
  [clearButton]="clearButton"
@@ -11870,7 +11882,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
11870
11882
  (clearButtonClick)="onClearButtonClick()"
11871
11883
  (viewChange)="onViewChange($event)"
11872
11884
  (valuePaneClick)="resetSelection($event)"
11873
- (tabOut)="lastFocusable.focus()"></div>
11885
+ (tabOut)="lastFocusable($event)"></div>
11874
11886
  <div class="k-coloreditor-views k-vstack">
11875
11887
  <kendo-colorgradient #gradient
11876
11888
  [tabindex]="innerTabIndex"
@@ -11883,6 +11895,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
11883
11895
  [gradientSliderSmallStep]="gradientSettings.gradientSliderSmallStep"
11884
11896
  [gradientSliderStep]="gradientSettings.gradientSliderStep"
11885
11897
  [readonly]="readonly"
11898
+ (keydown.tab)="focusFirstHeaderButton()"
11886
11899
  (valueChange)="handleValueChange($event)"
11887
11900
  ></kendo-colorgradient>
11888
11901
  <kendo-colorpalette #palette
@@ -12464,6 +12477,7 @@ class ColorPickerComponent {
12464
12477
  open = isPresent(open) ? open : !this.isOpen;
12465
12478
  if (open) {
12466
12479
  this.openPopup();
12480
+ this.focusFirstElement();
12467
12481
  }
12468
12482
  }
12469
12483
  /**
@@ -12593,10 +12607,11 @@ class ColorPickerComponent {
12593
12607
  }
12594
12608
  focusFirstElement() {
12595
12609
  this.ngZone.onStable.pipe(take(1)).subscribe(() => {
12610
+ var _a, _b;
12596
12611
  if (this.flatColorPicker) {
12597
- const gradient = this.flatColorPicker.gradient;
12598
- const elementToFocus = gradient ? gradient.gradientDragHandle :
12599
- this.flatColorPicker.palette.host;
12612
+ const gradientDragHandle = (_a = this.flatColorPicker.gradient) === null || _a === void 0 ? void 0 : _a.gradientDragHandle;
12613
+ const palette = (_b = this.flatColorPicker.palette) === null || _b === void 0 ? void 0 : _b.host;
12614
+ const elementToFocus = gradientDragHandle ? gradientDragHandle : palette;
12600
12615
  elementToFocus.nativeElement.focus();
12601
12616
  }
12602
12617
  });
@@ -12790,7 +12805,6 @@ ColorPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
12790
12805
  kendoButton
12791
12806
  tabindex="-1"
12792
12807
  type="button"
12793
- role="none"
12794
12808
  icon="caret-alt-down"
12795
12809
  [svgIcon]="arrowDownIcon"
12796
12810
  aria-hidden="true"
@@ -12914,7 +12928,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
12914
12928
  kendoButton
12915
12929
  tabindex="-1"
12916
12930
  type="button"
12917
- role="none"
12918
12931
  icon="caret-alt-down"
12919
12932
  [svgIcon]="arrowDownIcon"
12920
12933
  aria-hidden="true"
@@ -13972,6 +13985,8 @@ class SignatureOpenEvent extends PreventableEvent {
13972
13985
  }
13973
13986
 
13974
13987
  const noop = () => { };
13988
+ let _id = 0;
13989
+ const nextId = () => 'k-signature-focusable-' + _id++;
13975
13990
  const FOCUSED_CLASS = 'k-focus';
13976
13991
  const DEFAULT_SIZE = 'medium';
13977
13992
  const DEFAULT_ROUNDED = 'medium';
@@ -13994,6 +14009,10 @@ class SignatureComponent {
13994
14009
  this.cd = cd;
13995
14010
  this.localization = localization;
13996
14011
  this.staticHostClasses = true;
14012
+ /**
14013
+ * @hidden
14014
+ */
14015
+ this.focusableId = nextId();
13997
14016
  /**
13998
14017
  * Sets the read-only state of the Signature.
13999
14018
  *
@@ -14272,13 +14291,22 @@ class SignatureComponent {
14272
14291
  return;
14273
14292
  }
14274
14293
  this.applyHostClasses();
14275
- this.readThemeColors();
14294
+ this.ngZone.onStable.pipe(take(1)).subscribe(() => {
14295
+ this.readThemeColors();
14296
+ this.instance.setOptions(this.options);
14297
+ });
14276
14298
  this.ngZone.runOutsideAngular(() => {
14277
14299
  const element = this.canvas.nativeElement;
14278
14300
  this.instance = new SignaturePad(element, Object.assign(Object.assign({}, this.options), { onChange: () => this.onValueChange(), onDraw: () => this.onDraw(), onDrawEnd: () => this.onDrawEnd() }));
14279
14301
  if (this.value) {
14280
14302
  this.instance.loadImage(this.value);
14281
14303
  }
14304
+ if (this.maximized) {
14305
+ this.ngZone.onStable.pipe(take(1)).subscribe(() => {
14306
+ var _a;
14307
+ (_a = this.minimizeButton) === null || _a === void 0 ? void 0 : _a.nativeElement.focus();
14308
+ });
14309
+ }
14282
14310
  this.addEventListeners();
14283
14311
  });
14284
14312
  }
@@ -14360,12 +14388,14 @@ class SignatureComponent {
14360
14388
  * @hidden
14361
14389
  */
14362
14390
  onDialogClose() {
14363
- var _a;
14364
14391
  const args = new SignatureCloseEvent();
14365
14392
  this.close.next(args);
14366
14393
  if (!args.isDefaultPrevented()) {
14367
14394
  this.isOpen = false;
14368
- (_a = this.maximizeButton) === null || _a === void 0 ? void 0 : _a.nativeElement.focus();
14395
+ this.ngZone.onStable.pipe(take(1)).subscribe(() => {
14396
+ var _a, _b;
14397
+ (_b = (_a = (this.maximizeButton || this.element)) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.focus();
14398
+ });
14369
14399
  }
14370
14400
  }
14371
14401
  /**
@@ -14540,11 +14570,11 @@ class SignatureComponent {
14540
14570
  }
14541
14571
  }
14542
14572
  SignatureComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SignatureComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
14543
- SignatureComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SignatureComponent, selector: "kendo-signature", inputs: { readonly: "readonly", disabled: "disabled", width: "width", height: "height", value: "value", tabindex: "tabindex", size: "size", rounded: "rounded", fillMode: "fillMode", color: "color", backgroundColor: "backgroundColor", strokeWidth: "strokeWidth", smooth: "smooth", maximizable: "maximizable", maximized: "maximized", popupScale: "popupScale", exportScale: "exportScale", parentLocalization: "parentLocalization", hideLine: "hideLine" }, outputs: { valueChange: "valueChange", open: "open", close: "close", onFocus: "focus", onBlur: "blur", minimize: "minimize" }, host: { properties: { "class.k-signature": "this.staticHostClasses", "class.k-input": "this.staticHostClasses", "attr.dir": "this.direction", "class.k-readonly": "this.readonly", "class.k-disabled": "this.disabled", "style.width.px": "this.width", "style.height.px": "this.height" } }, providers: [
14573
+ SignatureComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: SignatureComponent, selector: "kendo-signature", inputs: { focusableId: "focusableId", readonly: "readonly", disabled: "disabled", width: "width", height: "height", value: "value", tabindex: "tabindex", size: "size", rounded: "rounded", fillMode: "fillMode", color: "color", backgroundColor: "backgroundColor", strokeWidth: "strokeWidth", smooth: "smooth", maximizable: "maximizable", maximized: "maximized", popupScale: "popupScale", exportScale: "exportScale", parentLocalization: "parentLocalization", hideLine: "hideLine" }, outputs: { valueChange: "valueChange", open: "open", close: "close", onFocus: "focus", onBlur: "blur", minimize: "minimize" }, host: { properties: { "class.k-signature": "this.staticHostClasses", "class.k-input": "this.staticHostClasses", "attr.dir": "this.direction", "class.k-readonly": "this.readonly", "class.k-disabled": "this.disabled", "style.width.px": "this.width", "style.height.px": "this.height" } }, providers: [
14544
14574
  LocalizationService,
14545
14575
  { provide: L10N_PREFIX, useValue: 'kendo.signature' },
14546
14576
  { multi: true, provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SignatureComponent) }
14547
- ], viewQueries: [{ propertyName: "maximizeButton", first: true, predicate: ["maximizeButton"], descendants: true, read: ElementRef }, { propertyName: "canvas", first: true, predicate: ["canvas"], descendants: true }], exportAs: ["kendoSignature"], usesOnChanges: true, ngImport: i0, template: `
14577
+ ], viewQueries: [{ propertyName: "canvas", first: true, predicate: ["canvas"], descendants: true }, { propertyName: "minimizeButton", first: true, predicate: ["minimize"], descendants: true, read: ElementRef }, { propertyName: "maximizeButton", first: true, predicate: ["maximize"], descendants: true, read: ElementRef }], exportAs: ["kendoSignature"], usesOnChanges: true, ngImport: i0, template: `
14548
14578
  <ng-container kendoSignatureLocalizedMessages
14549
14579
  i18n-clear="kendo.signature.clear|The message for the Clear button."
14550
14580
  clear="Clear"
@@ -14556,10 +14586,19 @@ SignatureComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
14556
14586
  canvasLabel="Signature canvas">
14557
14587
  </ng-container>
14558
14588
 
14589
+ <div
14590
+ #canvas
14591
+ class="k-signature-canvas"
14592
+ [attr.tabindex]="tabindex"
14593
+ [id]="focusableId"
14594
+ role="img"
14595
+ [attr.aria-label]="canvasLabel"
14596
+ ></div>
14597
+
14559
14598
  <div class="k-signature-actions k-signature-actions-top">
14560
14599
  <button
14600
+ #maximize
14561
14601
  *ngIf="showMaximize"
14562
- #maximizeButton
14563
14602
  kendoButton
14564
14603
  class="k-signature-action k-signature-maximize"
14565
14604
  icon="hyperlink-open"
@@ -14571,6 +14610,7 @@ SignatureComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
14571
14610
  [title]="maximizeTitle">
14572
14611
  </button>
14573
14612
  <button
14613
+ #minimize
14574
14614
  *ngIf="showMinimize"
14575
14615
  kendoButton
14576
14616
  class="k-signature-action k-signature-minimize k-rotate-180"
@@ -14583,13 +14623,6 @@ SignatureComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
14583
14623
  [title]="minimizeTitle">
14584
14624
  </button>
14585
14625
  </div>
14586
- <div
14587
- #canvas
14588
- class="k-signature-canvas"
14589
- [attr.tabindex]="tabindex"
14590
- role="img"
14591
- [attr.aria-label]="canvasLabel"
14592
- ></div>
14593
14626
  <div
14594
14627
  *ngIf="!hideLine"
14595
14628
  class="k-signature-line"
@@ -14633,10 +14666,11 @@ SignatureComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
14633
14666
  [width]="popupWidth"
14634
14667
  [height]="popupHeight"
14635
14668
  [popupScale]="popupScale"
14669
+ [exportScale]="(1 / popupScale) * exportScale"
14636
14670
  [parentLocalization]="localization">
14637
14671
  </kendo-signature>
14638
14672
  </kendo-dialog>
14639
- `, isInline: true, components: [{ type: i2.Button, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: i3$1.DialogComponent, selector: "kendo-dialog", inputs: ["actions", "actionsLayout", "autoFocusedElement", "title", "width", "minWidth", "maxWidth", "height", "minHeight", "maxHeight", "animation", "themeColor"], outputs: ["action", "close"], exportAs: ["kendoDialog"] }, { type: SignatureComponent, selector: "kendo-signature", inputs: ["readonly", "disabled", "width", "height", "value", "tabindex", "size", "rounded", "fillMode", "color", "backgroundColor", "strokeWidth", "smooth", "maximizable", "maximized", "popupScale", "exportScale", "parentLocalization", "hideLine"], outputs: ["valueChange", "open", "close", "focus", "blur", "minimize"], exportAs: ["kendoSignature"] }], directives: [{ type: LocalizedSignatureMessagesDirective, selector: "[kendoSignatureLocalizedMessages]" }, { type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
14673
+ `, isInline: true, components: [{ type: i2.Button, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { type: i3$1.DialogComponent, selector: "kendo-dialog", inputs: ["actions", "actionsLayout", "autoFocusedElement", "title", "width", "minWidth", "maxWidth", "height", "minHeight", "maxHeight", "animation", "themeColor"], outputs: ["action", "close"], exportAs: ["kendoDialog"] }, { type: SignatureComponent, selector: "kendo-signature", inputs: ["focusableId", "readonly", "disabled", "width", "height", "value", "tabindex", "size", "rounded", "fillMode", "color", "backgroundColor", "strokeWidth", "smooth", "maximizable", "maximized", "popupScale", "exportScale", "parentLocalization", "hideLine"], outputs: ["valueChange", "open", "close", "focus", "blur", "minimize"], exportAs: ["kendoSignature"] }], directives: [{ type: LocalizedSignatureMessagesDirective, selector: "[kendoSignatureLocalizedMessages]" }, { type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
14640
14674
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SignatureComponent, decorators: [{
14641
14675
  type: Component,
14642
14676
  args: [{
@@ -14660,10 +14694,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
14660
14694
  canvasLabel="Signature canvas">
14661
14695
  </ng-container>
14662
14696
 
14697
+ <div
14698
+ #canvas
14699
+ class="k-signature-canvas"
14700
+ [attr.tabindex]="tabindex"
14701
+ [id]="focusableId"
14702
+ role="img"
14703
+ [attr.aria-label]="canvasLabel"
14704
+ ></div>
14705
+
14663
14706
  <div class="k-signature-actions k-signature-actions-top">
14664
14707
  <button
14708
+ #maximize
14665
14709
  *ngIf="showMaximize"
14666
- #maximizeButton
14667
14710
  kendoButton
14668
14711
  class="k-signature-action k-signature-maximize"
14669
14712
  icon="hyperlink-open"
@@ -14675,6 +14718,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
14675
14718
  [title]="maximizeTitle">
14676
14719
  </button>
14677
14720
  <button
14721
+ #minimize
14678
14722
  *ngIf="showMinimize"
14679
14723
  kendoButton
14680
14724
  class="k-signature-action k-signature-minimize k-rotate-180"
@@ -14687,13 +14731,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
14687
14731
  [title]="minimizeTitle">
14688
14732
  </button>
14689
14733
  </div>
14690
- <div
14691
- #canvas
14692
- class="k-signature-canvas"
14693
- [attr.tabindex]="tabindex"
14694
- role="img"
14695
- [attr.aria-label]="canvasLabel"
14696
- ></div>
14697
14734
  <div
14698
14735
  *ngIf="!hideLine"
14699
14736
  class="k-signature-line"
@@ -14737,6 +14774,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
14737
14774
  [width]="popupWidth"
14738
14775
  [height]="popupHeight"
14739
14776
  [popupScale]="popupScale"
14777
+ [exportScale]="(1 / popupScale) * exportScale"
14740
14778
  [parentLocalization]="localization">
14741
14779
  </kendo-signature>
14742
14780
  </kendo-dialog>
@@ -14748,12 +14786,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
14748
14786
  }, {
14749
14787
  type: HostBinding,
14750
14788
  args: ['class.k-input']
14789
+ }], focusableId: [{
14790
+ type: Input
14751
14791
  }], direction: [{
14752
14792
  type: HostBinding,
14753
14793
  args: ['attr.dir']
14754
- }], maximizeButton: [{
14755
- type: ViewChild,
14756
- args: ['maximizeButton', { read: ElementRef }]
14757
14794
  }], readonly: [{
14758
14795
  type: HostBinding,
14759
14796
  args: ['class.k-readonly']
@@ -14821,6 +14858,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
14821
14858
  }], canvas: [{
14822
14859
  type: ViewChild,
14823
14860
  args: ['canvas']
14861
+ }], minimizeButton: [{
14862
+ type: ViewChild,
14863
+ args: ['minimize', { read: ElementRef }]
14864
+ }], maximizeButton: [{
14865
+ type: ViewChild,
14866
+ args: ['maximize', { read: ElementRef }]
14824
14867
  }] } });
14825
14868
 
14826
14869
  /**