@progress/kendo-angular-inputs 11.2.0 → 11.3.0-develop.10
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/colorpicker/color-input.component.d.ts +1 -0
- package/colorpicker/color-palette.component.d.ts +1 -0
- package/colorpicker/flatcolorpicker.component.d.ts +8 -4
- package/esm2020/colorpicker/color-gradient.component.mjs +0 -1
- package/esm2020/colorpicker/color-input.component.mjs +11 -6
- package/esm2020/colorpicker/color-palette.component.mjs +14 -14
- package/esm2020/colorpicker/colorpicker.component.mjs +4 -5
- package/esm2020/colorpicker/flatcolorpicker-header.component.mjs +7 -3
- package/esm2020/colorpicker/flatcolorpicker.component.mjs +30 -15
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/shared/utils.mjs +0 -11
- package/esm2020/textbox/textbox.component.mjs +1 -2
- package/fesm2015/progress-kendo-angular-inputs.mjs +70 -57
- package/fesm2020/progress-kendo-angular-inputs.mjs +68 -57
- package/package.json +10 -10
- package/shared/utils.d.ts +0 -6
|
@@ -81,6 +81,7 @@ export declare class ColorInputComponent implements AfterViewInit, OnChanges {
|
|
|
81
81
|
ngOnChanges(changes: SimpleChanges): void;
|
|
82
82
|
get formatButtonTitle(): string;
|
|
83
83
|
handleRgbaValueChange(): void;
|
|
84
|
+
focusDragHandle(event: any): void;
|
|
84
85
|
handleHexValueChange(hex: string): void;
|
|
85
86
|
handleRgbaInputBlur(): void;
|
|
86
87
|
handleHexInputBlur(): void;
|
|
@@ -155,6 +155,7 @@ export declare class ColorPaletteComponent implements OnInit, AfterViewInit, OnD
|
|
|
155
155
|
private _columns;
|
|
156
156
|
private _palette;
|
|
157
157
|
private _tabindex;
|
|
158
|
+
private subs;
|
|
158
159
|
private dynamicRTLSubscription;
|
|
159
160
|
constructor(host: ElementRef, service: ColorPaletteService, cdr: ChangeDetectorRef, renderer: Renderer2, localizationService: LocalizationService, ngZone: NgZone);
|
|
160
161
|
ngOnInit(): void;
|
|
@@ -178,15 +178,19 @@ export declare class FlatColorPickerComponent implements OnInit, AfterViewInit,
|
|
|
178
178
|
* @hidden
|
|
179
179
|
*/
|
|
180
180
|
get firstFocusable(): any;
|
|
181
|
-
/**
|
|
182
|
-
* @hidden
|
|
183
|
-
*/
|
|
184
|
-
get lastFocusable(): any;
|
|
185
181
|
constructor(host: ElementRef, service: FlatColorPickerService, localizationService: LocalizationService, cdr: ChangeDetectorRef, renderer: Renderer2, ngZone: NgZone, injector: Injector);
|
|
186
182
|
ngOnInit(): void;
|
|
187
183
|
ngAfterViewInit(): void;
|
|
188
184
|
ngOnChanges(changes: SimpleChanges): void;
|
|
189
185
|
ngOnDestroy(): void;
|
|
186
|
+
/**
|
|
187
|
+
* @hidden
|
|
188
|
+
*/
|
|
189
|
+
focusFirstHeaderButton(): void;
|
|
190
|
+
/**
|
|
191
|
+
* @hidden
|
|
192
|
+
*/
|
|
193
|
+
lastFocusable(event: any): any;
|
|
190
194
|
/**
|
|
191
195
|
* @hidden
|
|
192
196
|
*/
|
|
@@ -108,6 +108,11 @@ export class ColorInputComponent {
|
|
|
108
108
|
this.hex = parseColor(color, 'hex', this.opacity);
|
|
109
109
|
this.valueChange.emit(color);
|
|
110
110
|
}
|
|
111
|
+
focusDragHandle(event) {
|
|
112
|
+
event.preventDefault();
|
|
113
|
+
event.stopImmediatePropagation();
|
|
114
|
+
this.tabOut.emit();
|
|
115
|
+
}
|
|
111
116
|
handleHexValueChange(hex) {
|
|
112
117
|
this.hex = hex;
|
|
113
118
|
const color = parseColor(hex, 'rgba', this.opacity);
|
|
@@ -148,7 +153,7 @@ export class ColorInputComponent {
|
|
|
148
153
|
}
|
|
149
154
|
}
|
|
150
155
|
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 });
|
|
151
|
-
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: ["
|
|
156
|
+
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: `
|
|
152
157
|
<div class="k-vstack">
|
|
153
158
|
<button
|
|
154
159
|
kendoButton
|
|
@@ -176,7 +181,7 @@ ColorInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
176
181
|
(blur)="handleHexInputBlur()"
|
|
177
182
|
(input)="handleHexValueChange(hexInput.value)"
|
|
178
183
|
[tabindex]="tabindex.toString()"
|
|
179
|
-
(keydown.tab)="$event
|
|
184
|
+
(keydown.tab)="focusDragHandle($event)"
|
|
180
185
|
/>
|
|
181
186
|
<label [for]="focusableId" class="k-colorgradient-input-label">HEX</label>
|
|
182
187
|
</div>
|
|
@@ -260,7 +265,7 @@ ColorInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
260
265
|
[decimals]="2"
|
|
261
266
|
(blur)="handleRgbaInputBlur()"
|
|
262
267
|
(valueChange)="handleRgbaValueChange()"
|
|
263
|
-
(keydown.tab)="$event
|
|
268
|
+
(keydown.tab)="focusDragHandle($event)">
|
|
264
269
|
</kendo-numerictextbox>
|
|
265
270
|
<label [for]="alpha.focusableId" class="k-colorgradient-input-label">A</label>
|
|
266
271
|
</div>
|
|
@@ -298,7 +303,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
298
303
|
(blur)="handleHexInputBlur()"
|
|
299
304
|
(input)="handleHexValueChange(hexInput.value)"
|
|
300
305
|
[tabindex]="tabindex.toString()"
|
|
301
|
-
(keydown.tab)="$event
|
|
306
|
+
(keydown.tab)="focusDragHandle($event)"
|
|
302
307
|
/>
|
|
303
308
|
<label [for]="focusableId" class="k-colorgradient-input-label">HEX</label>
|
|
304
309
|
</div>
|
|
@@ -382,7 +387,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
382
387
|
[decimals]="2"
|
|
383
388
|
(blur)="handleRgbaInputBlur()"
|
|
384
389
|
(valueChange)="handleRgbaValueChange()"
|
|
385
|
-
(keydown.tab)="$event
|
|
390
|
+
(keydown.tab)="focusDragHandle($event)">
|
|
386
391
|
</kendo-numerictextbox>
|
|
387
392
|
<label [for]="alpha.focusableId" class="k-colorgradient-input-label">A</label>
|
|
388
393
|
</div>
|
|
@@ -421,7 +426,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
421
426
|
args: ['hexInput']
|
|
422
427
|
}], blueInput: [{
|
|
423
428
|
type: ViewChild,
|
|
424
|
-
args: ['
|
|
429
|
+
args: ['blue']
|
|
425
430
|
}], toggleFormatButton: [{
|
|
426
431
|
type: ViewChild,
|
|
427
432
|
args: ['toggleFormatButton', { static: false, read: ElementRef }]
|
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
* Copyright © 2023 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
|
-
|
|
5
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
6
|
+
import { Component, Input, EventEmitter, Output, HostBinding, forwardRef, ChangeDetectorRef, Renderer2, ElementRef, NgZone } from '@angular/core';
|
|
6
7
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
7
8
|
import { Keys, KendoInput, guid } from '@progress/kendo-angular-common';
|
|
8
9
|
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
9
10
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
11
|
+
import { Subscription } from 'rxjs';
|
|
10
12
|
import { take } from 'rxjs/operators';
|
|
11
13
|
import { ColorPaletteLocalizationService } from './localization/colorpalette-localization.service';
|
|
12
14
|
import { packageMetadata } from '../package-metadata';
|
|
@@ -94,6 +96,7 @@ export class ColorPaletteComponent {
|
|
|
94
96
|
*/
|
|
95
97
|
this.uniqueId = guid();
|
|
96
98
|
this._tabindex = 0;
|
|
99
|
+
this.subs = new Subscription();
|
|
97
100
|
this.notifyNgTouched = () => { };
|
|
98
101
|
this.notifyNgChanged = () => { };
|
|
99
102
|
validatePackage(packageMetadata);
|
|
@@ -200,6 +203,10 @@ export class ColorPaletteComponent {
|
|
|
200
203
|
this.palette = this.palette || defaultPreset;
|
|
201
204
|
this.setRows();
|
|
202
205
|
}
|
|
206
|
+
const elem = this.host.nativeElement;
|
|
207
|
+
this.subs.add(this.renderer.listen(elem, 'keydown', event => this.handleKeydown(event)));
|
|
208
|
+
this.subs.add(this.renderer.listen(elem, 'focus', () => this.handleFocus()));
|
|
209
|
+
this.subs.add(this.renderer.listen(elem, 'blur', () => this.handleHostBlur()));
|
|
203
210
|
}
|
|
204
211
|
ngAfterViewInit() {
|
|
205
212
|
this.setHostElementAriaLabel();
|
|
@@ -210,6 +217,7 @@ export class ColorPaletteComponent {
|
|
|
210
217
|
}
|
|
211
218
|
}
|
|
212
219
|
ngOnDestroy() {
|
|
220
|
+
this.subs.unsubscribe();
|
|
213
221
|
if (this.dynamicRTLSubscription) {
|
|
214
222
|
this.dynamicRTLSubscription.unsubscribe();
|
|
215
223
|
}
|
|
@@ -353,7 +361,8 @@ export class ColorPaletteComponent {
|
|
|
353
361
|
this.focusedCell = this.selectedCell;
|
|
354
362
|
}
|
|
355
363
|
selectCell(value) {
|
|
356
|
-
|
|
364
|
+
const parsedColor = parseColor(value, 'hex');
|
|
365
|
+
this.selectedCell = this.service.getCellCoordsFor(parsedColor);
|
|
357
366
|
this.focusedCell = this.selectedCell;
|
|
358
367
|
}
|
|
359
368
|
setRows() {
|
|
@@ -383,7 +392,7 @@ export class ColorPaletteComponent {
|
|
|
383
392
|
}
|
|
384
393
|
}
|
|
385
394
|
ColorPaletteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ColorPaletteComponent, deps: [{ token: i0.ElementRef }, { token: i1.ColorPaletteService }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i2.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
386
|
-
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: {
|
|
395
|
+
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: [
|
|
387
396
|
{
|
|
388
397
|
multi: true,
|
|
389
398
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -415,7 +424,7 @@ ColorPaletteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
415
424
|
role="gridcell"
|
|
416
425
|
[class.k-selected]="selectedCell?.row === rowIndex && selectedCell?.col === colIndex"
|
|
417
426
|
[class.k-focus]="focusInComponent && focusedCell?.row === rowIndex && focusedCell?.col === colIndex"
|
|
418
|
-
[attr.aria-selected]="selectedCell?.row === rowIndex && selectedCell?.col === colIndex"
|
|
427
|
+
[attr.aria-selected]="selectedCell?.row === rowIndex && selectedCell?.col === colIndex ? 'true' : undefined"
|
|
419
428
|
[attr.aria-label]="color"
|
|
420
429
|
class="k-colorpalette-tile"
|
|
421
430
|
[id]="'k-' + rowIndex + '-' + colIndex + '-' + uniqueId"
|
|
@@ -471,7 +480,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
471
480
|
role="gridcell"
|
|
472
481
|
[class.k-selected]="selectedCell?.row === rowIndex && selectedCell?.col === colIndex"
|
|
473
482
|
[class.k-focus]="focusInComponent && focusedCell?.row === rowIndex && focusedCell?.col === colIndex"
|
|
474
|
-
[attr.aria-selected]="selectedCell?.row === rowIndex && selectedCell?.col === colIndex"
|
|
483
|
+
[attr.aria-selected]="selectedCell?.row === rowIndex && selectedCell?.col === colIndex ? 'true' : undefined"
|
|
475
484
|
[attr.aria-label]="color"
|
|
476
485
|
class="k-colorpalette-tile"
|
|
477
486
|
[id]="'k-' + rowIndex + '-' + colIndex + '-' + uniqueId"
|
|
@@ -541,13 +550,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
541
550
|
}], readonlyAttribute: [{
|
|
542
551
|
type: HostBinding,
|
|
543
552
|
args: ['attr.aria-readonly']
|
|
544
|
-
}], handleKeydown: [{
|
|
545
|
-
type: HostListener,
|
|
546
|
-
args: ['keydown', ['$event']]
|
|
547
|
-
}], handleFocus: [{
|
|
548
|
-
type: HostListener,
|
|
549
|
-
args: ['focus', ['$event']]
|
|
550
|
-
}], handleHostBlur: [{
|
|
551
|
-
type: HostListener,
|
|
552
|
-
args: ['blur']
|
|
553
553
|
}] } });
|
|
@@ -492,6 +492,7 @@ export class ColorPickerComponent {
|
|
|
492
492
|
open = isPresent(open) ? open : !this.isOpen;
|
|
493
493
|
if (open) {
|
|
494
494
|
this.openPopup();
|
|
495
|
+
this.focusFirstElement();
|
|
495
496
|
}
|
|
496
497
|
}
|
|
497
498
|
/**
|
|
@@ -622,9 +623,9 @@ export class ColorPickerComponent {
|
|
|
622
623
|
focusFirstElement() {
|
|
623
624
|
this.ngZone.onStable.pipe(take(1)).subscribe(() => {
|
|
624
625
|
if (this.flatColorPicker) {
|
|
625
|
-
const
|
|
626
|
-
const
|
|
627
|
-
|
|
626
|
+
const gradientDragHandle = this.flatColorPicker.gradient?.gradientDragHandle;
|
|
627
|
+
const palette = this.flatColorPicker.palette?.host;
|
|
628
|
+
const elementToFocus = gradientDragHandle ? gradientDragHandle : palette;
|
|
628
629
|
elementToFocus.nativeElement.focus();
|
|
629
630
|
}
|
|
630
631
|
});
|
|
@@ -818,7 +819,6 @@ ColorPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
|
|
|
818
819
|
kendoButton
|
|
819
820
|
tabindex="-1"
|
|
820
821
|
type="button"
|
|
821
|
-
role="none"
|
|
822
822
|
icon="caret-alt-down"
|
|
823
823
|
[svgIcon]="arrowDownIcon"
|
|
824
824
|
aria-hidden="true"
|
|
@@ -942,7 +942,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
942
942
|
kendoButton
|
|
943
943
|
tabindex="-1"
|
|
944
944
|
type="button"
|
|
945
|
-
role="none"
|
|
946
945
|
icon="caret-alt-down"
|
|
947
946
|
[svgIcon]="arrowDownIcon"
|
|
948
947
|
aria-hidden="true"
|
|
@@ -57,7 +57,7 @@ export class FlatColorPickerHeaderComponent {
|
|
|
57
57
|
onHeaderTabOut(ev, index) {
|
|
58
58
|
if (index === 0) {
|
|
59
59
|
ev.preventDefault();
|
|
60
|
-
this.tabOut.emit();
|
|
60
|
+
this.tabOut.emit(ev);
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
}
|
|
@@ -66,7 +66,9 @@ FlatColorPickerHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
66
66
|
<div class="k-coloreditor-header-actions k-hstack">
|
|
67
67
|
<div
|
|
68
68
|
*ngIf="viewButtons"
|
|
69
|
-
class="k-button-group k-button-group-flat"
|
|
69
|
+
class="k-button-group k-button-group-flat"
|
|
70
|
+
role="group"
|
|
71
|
+
>
|
|
70
72
|
<button
|
|
71
73
|
*ngFor="let view of views; let i = index;"
|
|
72
74
|
kendoButton
|
|
@@ -125,7 +127,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
125
127
|
<div class="k-coloreditor-header-actions k-hstack">
|
|
126
128
|
<div
|
|
127
129
|
*ngIf="viewButtons"
|
|
128
|
-
class="k-button-group k-button-group-flat"
|
|
130
|
+
class="k-button-group k-button-group-flat"
|
|
131
|
+
role="group"
|
|
132
|
+
>
|
|
129
133
|
<button
|
|
130
134
|
*ngFor="let view of views; let i = index;"
|
|
131
135
|
kendoButton
|
|
@@ -240,15 +240,6 @@ export class FlatColorPickerComponent {
|
|
|
240
240
|
}
|
|
241
241
|
return this.activeView === 'gradient' ? this.gradient : this.palette;
|
|
242
242
|
}
|
|
243
|
-
/**
|
|
244
|
-
* @hidden
|
|
245
|
-
*/
|
|
246
|
-
get lastFocusable() {
|
|
247
|
-
if (this.preview) {
|
|
248
|
-
return this.footer.lastButton.nativeElement;
|
|
249
|
-
}
|
|
250
|
-
return this.activeView === 'gradient' ? this.gradient : this.palette;
|
|
251
|
-
}
|
|
252
243
|
ngOnInit() {
|
|
253
244
|
this.selection = this.value;
|
|
254
245
|
this.control = this.injector.get(NgControl, null);
|
|
@@ -276,6 +267,30 @@ export class FlatColorPickerComponent {
|
|
|
276
267
|
}
|
|
277
268
|
this.subscriptions.unsubscribe();
|
|
278
269
|
}
|
|
270
|
+
/**
|
|
271
|
+
* @hidden
|
|
272
|
+
*/
|
|
273
|
+
focusFirstHeaderButton() {
|
|
274
|
+
if (this.gradientElement.nativeElement === document.activeElement) {
|
|
275
|
+
if (this.headerHasContent && !this.preview) {
|
|
276
|
+
const firstHeaderButton = this.headerElement.nativeElement.querySelector('.k-button');
|
|
277
|
+
firstHeaderButton.focus();
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* @hidden
|
|
283
|
+
*/
|
|
284
|
+
lastFocusable(event) {
|
|
285
|
+
if (this.preview) {
|
|
286
|
+
this.footer.lastButton.nativeElement.focus();
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
289
|
+
event.stopImmediatePropagation();
|
|
290
|
+
const gradient = this.gradientElement?.nativeElement;
|
|
291
|
+
const palette = this.palette?.host.nativeElement;
|
|
292
|
+
this.activeView === 'gradient' ? gradient.focus() : palette.focus();
|
|
293
|
+
}
|
|
279
294
|
/**
|
|
280
295
|
* @hidden
|
|
281
296
|
*/
|
|
@@ -358,8 +373,6 @@ export class FlatColorPickerComponent {
|
|
|
358
373
|
*/
|
|
359
374
|
onClearButtonClick() {
|
|
360
375
|
this.resetInnerComponentValue();
|
|
361
|
-
this.internalNavigation = false;
|
|
362
|
-
this.host.nativeElement.focus();
|
|
363
376
|
this.clearButtonClick.emit();
|
|
364
377
|
}
|
|
365
378
|
/**
|
|
@@ -549,7 +562,7 @@ FlatColorPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0
|
|
|
549
562
|
hexInputPlaceholder="HEX">
|
|
550
563
|
</ng-container>
|
|
551
564
|
<div kendoFlatColorPickerHeader
|
|
552
|
-
[innerTabIndex]="
|
|
565
|
+
[innerTabIndex]="innerTabIndex"
|
|
553
566
|
*ngIf="headerHasContent"
|
|
554
567
|
#header
|
|
555
568
|
[clearButton]="clearButton"
|
|
@@ -561,7 +574,7 @@ FlatColorPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0
|
|
|
561
574
|
(clearButtonClick)="onClearButtonClick()"
|
|
562
575
|
(viewChange)="onViewChange($event)"
|
|
563
576
|
(valuePaneClick)="resetSelection($event)"
|
|
564
|
-
(tabOut)="lastFocusable
|
|
577
|
+
(tabOut)="lastFocusable($event)"></div>
|
|
565
578
|
<div class="k-coloreditor-views k-vstack">
|
|
566
579
|
<kendo-colorgradient #gradient
|
|
567
580
|
[tabindex]="innerTabIndex"
|
|
@@ -574,6 +587,7 @@ FlatColorPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0
|
|
|
574
587
|
[gradientSliderSmallStep]="gradientSettings.gradientSliderSmallStep"
|
|
575
588
|
[gradientSliderStep]="gradientSettings.gradientSliderStep"
|
|
576
589
|
[readonly]="readonly"
|
|
590
|
+
(keydown.tab)="focusFirstHeaderButton()"
|
|
577
591
|
(valueChange)="handleValueChange($event)"
|
|
578
592
|
></kendo-colorgradient>
|
|
579
593
|
<kendo-colorpalette #palette
|
|
@@ -672,7 +686,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
672
686
|
hexInputPlaceholder="HEX">
|
|
673
687
|
</ng-container>
|
|
674
688
|
<div kendoFlatColorPickerHeader
|
|
675
|
-
[innerTabIndex]="
|
|
689
|
+
[innerTabIndex]="innerTabIndex"
|
|
676
690
|
*ngIf="headerHasContent"
|
|
677
691
|
#header
|
|
678
692
|
[clearButton]="clearButton"
|
|
@@ -684,7 +698,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
684
698
|
(clearButtonClick)="onClearButtonClick()"
|
|
685
699
|
(viewChange)="onViewChange($event)"
|
|
686
700
|
(valuePaneClick)="resetSelection($event)"
|
|
687
|
-
(tabOut)="lastFocusable
|
|
701
|
+
(tabOut)="lastFocusable($event)"></div>
|
|
688
702
|
<div class="k-coloreditor-views k-vstack">
|
|
689
703
|
<kendo-colorgradient #gradient
|
|
690
704
|
[tabindex]="innerTabIndex"
|
|
@@ -697,6 +711,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
697
711
|
[gradientSliderSmallStep]="gradientSettings.gradientSliderSmallStep"
|
|
698
712
|
[gradientSliderStep]="gradientSettings.gradientSliderStep"
|
|
699
713
|
[readonly]="readonly"
|
|
714
|
+
(keydown.tab)="focusFirstHeaderButton()"
|
|
700
715
|
(valueChange)="handleValueChange($event)"
|
|
701
716
|
></kendo-colorgradient>
|
|
702
717
|
<kendo-colorpalette #palette
|
|
@@ -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:
|
|
13
|
-
version: '11.
|
|
12
|
+
publishDate: 1677586072,
|
|
13
|
+
version: '11.3.0-develop.10',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
15
15
|
};
|
package/esm2020/shared/utils.mjs
CHANGED
|
@@ -2,17 +2,6 @@
|
|
|
2
2
|
* Copyright © 2023 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 { detectDesktopBrowser, detectMobileOS } from "@progress/kendo-common";
|
|
6
|
-
/**
|
|
7
|
-
* @hidden
|
|
8
|
-
*
|
|
9
|
-
* Returns true if the used browser is Safari.
|
|
10
|
-
*/
|
|
11
|
-
export const isSafari = (userAgent) => {
|
|
12
|
-
const desktopBrowser = detectDesktopBrowser(userAgent);
|
|
13
|
-
const mobileOS = detectMobileOS(userAgent);
|
|
14
|
-
return (desktopBrowser && desktopBrowser.safari) || (mobileOS && mobileOS.browser === 'mobilesafari');
|
|
15
|
-
};
|
|
16
5
|
/**
|
|
17
6
|
* @hidden
|
|
18
7
|
*
|
|
@@ -11,11 +11,10 @@ import { validatePackage } from '@progress/kendo-licensing';
|
|
|
11
11
|
import { packageMetadata } from '../package-metadata';
|
|
12
12
|
import { invokeElementMethod } from '../common/dom-utils';
|
|
13
13
|
import { areSame, requiresZoneOnBlur, getStylingClasses } from '../common/utils';
|
|
14
|
-
import { guid, hasObservers, KendoInput, Keys } from '@progress/kendo-angular-common';
|
|
14
|
+
import { guid, hasObservers, KendoInput, Keys, isSafari } from '@progress/kendo-angular-common';
|
|
15
15
|
import { TextBoxSuffixTemplateDirective } from './textbox-suffix.directive';
|
|
16
16
|
import { TextBoxPrefixTemplateDirective } from './textbox-prefix.directive';
|
|
17
17
|
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
18
|
-
import { isSafari } from '../shared/utils';
|
|
19
18
|
import { checkIcon, exclamationCircleIcon, xIcon } from '@progress/kendo-svg-icons';
|
|
20
19
|
import * as i0 from "@angular/core";
|
|
21
20
|
import * as i1 from "@progress/kendo-angular-l10n";
|
|
@@ -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
|
|
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:
|
|
543
|
-
version: '11.
|
|
542
|
+
publishDate: 1677586072,
|
|
543
|
+
version: '11.3.0-develop.10',
|
|
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: ["
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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: ['
|
|
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
|
-
|
|
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: {
|
|
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]="
|
|
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
|
|
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]="
|
|
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
|
|
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
|
|
12598
|
-
const
|
|
12599
|
-
|
|
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"
|
|
@@ -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, caretAltExpandIcon, xCircleIcon, dropletSlashIcon, dropletSliderIcon, paletteIcon, 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
|
|
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';
|
|
@@ -538,8 +538,8 @@ const packageMetadata = {
|
|
|
538
538
|
name: '@progress/kendo-angular-inputs',
|
|
539
539
|
productName: 'Kendo UI for Angular',
|
|
540
540
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
541
|
-
publishDate:
|
|
542
|
-
version: '11.
|
|
541
|
+
publishDate: 1677586072,
|
|
542
|
+
version: '11.3.0-develop.10',
|
|
543
543
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
544
544
|
};
|
|
545
545
|
|
|
@@ -6071,16 +6071,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
6071
6071
|
}]
|
|
6072
6072
|
}] });
|
|
6073
6073
|
|
|
6074
|
-
/**
|
|
6075
|
-
* @hidden
|
|
6076
|
-
*
|
|
6077
|
-
* Returns true if the used browser is Safari.
|
|
6078
|
-
*/
|
|
6079
|
-
const isSafari = (userAgent) => {
|
|
6080
|
-
const desktopBrowser = detectDesktopBrowser(userAgent);
|
|
6081
|
-
const mobileOS = detectMobileOS(userAgent);
|
|
6082
|
-
return (desktopBrowser && desktopBrowser.safari) || (mobileOS && mobileOS.browser === 'mobilesafari');
|
|
6083
|
-
};
|
|
6084
6074
|
/**
|
|
6085
6075
|
* @hidden
|
|
6086
6076
|
*
|
|
@@ -8642,6 +8632,11 @@ class ColorInputComponent {
|
|
|
8642
8632
|
this.hex = parseColor(color, 'hex', this.opacity);
|
|
8643
8633
|
this.valueChange.emit(color);
|
|
8644
8634
|
}
|
|
8635
|
+
focusDragHandle(event) {
|
|
8636
|
+
event.preventDefault();
|
|
8637
|
+
event.stopImmediatePropagation();
|
|
8638
|
+
this.tabOut.emit();
|
|
8639
|
+
}
|
|
8645
8640
|
handleHexValueChange(hex) {
|
|
8646
8641
|
this.hex = hex;
|
|
8647
8642
|
const color = parseColor(hex, 'rgba', this.opacity);
|
|
@@ -8682,7 +8677,7 @@ class ColorInputComponent {
|
|
|
8682
8677
|
}
|
|
8683
8678
|
}
|
|
8684
8679
|
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 });
|
|
8685
|
-
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: ["
|
|
8680
|
+
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: `
|
|
8686
8681
|
<div class="k-vstack">
|
|
8687
8682
|
<button
|
|
8688
8683
|
kendoButton
|
|
@@ -8710,7 +8705,7 @@ ColorInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
8710
8705
|
(blur)="handleHexInputBlur()"
|
|
8711
8706
|
(input)="handleHexValueChange(hexInput.value)"
|
|
8712
8707
|
[tabindex]="tabindex.toString()"
|
|
8713
|
-
(keydown.tab)="$event
|
|
8708
|
+
(keydown.tab)="focusDragHandle($event)"
|
|
8714
8709
|
/>
|
|
8715
8710
|
<label [for]="focusableId" class="k-colorgradient-input-label">HEX</label>
|
|
8716
8711
|
</div>
|
|
@@ -8794,7 +8789,7 @@ ColorInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
|
|
|
8794
8789
|
[decimals]="2"
|
|
8795
8790
|
(blur)="handleRgbaInputBlur()"
|
|
8796
8791
|
(valueChange)="handleRgbaValueChange()"
|
|
8797
|
-
(keydown.tab)="$event
|
|
8792
|
+
(keydown.tab)="focusDragHandle($event)">
|
|
8798
8793
|
</kendo-numerictextbox>
|
|
8799
8794
|
<label [for]="alpha.focusableId" class="k-colorgradient-input-label">A</label>
|
|
8800
8795
|
</div>
|
|
@@ -8832,7 +8827,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
8832
8827
|
(blur)="handleHexInputBlur()"
|
|
8833
8828
|
(input)="handleHexValueChange(hexInput.value)"
|
|
8834
8829
|
[tabindex]="tabindex.toString()"
|
|
8835
|
-
(keydown.tab)="$event
|
|
8830
|
+
(keydown.tab)="focusDragHandle($event)"
|
|
8836
8831
|
/>
|
|
8837
8832
|
<label [for]="focusableId" class="k-colorgradient-input-label">HEX</label>
|
|
8838
8833
|
</div>
|
|
@@ -8916,7 +8911,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
8916
8911
|
[decimals]="2"
|
|
8917
8912
|
(blur)="handleRgbaInputBlur()"
|
|
8918
8913
|
(valueChange)="handleRgbaValueChange()"
|
|
8919
|
-
(keydown.tab)="$event
|
|
8914
|
+
(keydown.tab)="focusDragHandle($event)">
|
|
8920
8915
|
</kendo-numerictextbox>
|
|
8921
8916
|
<label [for]="alpha.focusableId" class="k-colorgradient-input-label">A</label>
|
|
8922
8917
|
</div>
|
|
@@ -8955,7 +8950,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
8955
8950
|
args: ['hexInput']
|
|
8956
8951
|
}], blueInput: [{
|
|
8957
8952
|
type: ViewChild,
|
|
8958
|
-
args: ['
|
|
8953
|
+
args: ['blue']
|
|
8959
8954
|
}], toggleFormatButton: [{
|
|
8960
8955
|
type: ViewChild,
|
|
8961
8956
|
args: ['toggleFormatButton', { static: false, read: ElementRef }]
|
|
@@ -9565,7 +9560,6 @@ class ColorGradientComponent {
|
|
|
9565
9560
|
reset() {
|
|
9566
9561
|
this.handleValueChange(undefined);
|
|
9567
9562
|
this.updateUI();
|
|
9568
|
-
this.host.nativeElement.focus();
|
|
9569
9563
|
}
|
|
9570
9564
|
/**
|
|
9571
9565
|
* @hidden
|
|
@@ -10365,6 +10359,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
10365
10359
|
type: Injectable
|
|
10366
10360
|
}] });
|
|
10367
10361
|
|
|
10362
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
10368
10363
|
const DEFAULT_TILE_SIZE = 24;
|
|
10369
10364
|
const DEFAULT_COLUMNS_COUNT = 10;
|
|
10370
10365
|
const DEFAULT_PRESET = 'office';
|
|
@@ -10440,6 +10435,7 @@ class ColorPaletteComponent {
|
|
|
10440
10435
|
*/
|
|
10441
10436
|
this.uniqueId = guid();
|
|
10442
10437
|
this._tabindex = 0;
|
|
10438
|
+
this.subs = new Subscription();
|
|
10443
10439
|
this.notifyNgTouched = () => { };
|
|
10444
10440
|
this.notifyNgChanged = () => { };
|
|
10445
10441
|
validatePackage(packageMetadata);
|
|
@@ -10546,6 +10542,10 @@ class ColorPaletteComponent {
|
|
|
10546
10542
|
this.palette = this.palette || defaultPreset;
|
|
10547
10543
|
this.setRows();
|
|
10548
10544
|
}
|
|
10545
|
+
const elem = this.host.nativeElement;
|
|
10546
|
+
this.subs.add(this.renderer.listen(elem, 'keydown', event => this.handleKeydown(event)));
|
|
10547
|
+
this.subs.add(this.renderer.listen(elem, 'focus', () => this.handleFocus()));
|
|
10548
|
+
this.subs.add(this.renderer.listen(elem, 'blur', () => this.handleHostBlur()));
|
|
10549
10549
|
}
|
|
10550
10550
|
ngAfterViewInit() {
|
|
10551
10551
|
this.setHostElementAriaLabel();
|
|
@@ -10556,6 +10556,7 @@ class ColorPaletteComponent {
|
|
|
10556
10556
|
}
|
|
10557
10557
|
}
|
|
10558
10558
|
ngOnDestroy() {
|
|
10559
|
+
this.subs.unsubscribe();
|
|
10559
10560
|
if (this.dynamicRTLSubscription) {
|
|
10560
10561
|
this.dynamicRTLSubscription.unsubscribe();
|
|
10561
10562
|
}
|
|
@@ -10699,7 +10700,8 @@ class ColorPaletteComponent {
|
|
|
10699
10700
|
this.focusedCell = this.selectedCell;
|
|
10700
10701
|
}
|
|
10701
10702
|
selectCell(value) {
|
|
10702
|
-
|
|
10703
|
+
const parsedColor = parseColor(value, 'hex');
|
|
10704
|
+
this.selectedCell = this.service.getCellCoordsFor(parsedColor);
|
|
10703
10705
|
this.focusedCell = this.selectedCell;
|
|
10704
10706
|
}
|
|
10705
10707
|
setRows() {
|
|
@@ -10729,7 +10731,7 @@ class ColorPaletteComponent {
|
|
|
10729
10731
|
}
|
|
10730
10732
|
}
|
|
10731
10733
|
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 });
|
|
10732
|
-
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: {
|
|
10734
|
+
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: [
|
|
10733
10735
|
{
|
|
10734
10736
|
multi: true,
|
|
10735
10737
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -10761,7 +10763,7 @@ ColorPaletteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
10761
10763
|
role="gridcell"
|
|
10762
10764
|
[class.k-selected]="selectedCell?.row === rowIndex && selectedCell?.col === colIndex"
|
|
10763
10765
|
[class.k-focus]="focusInComponent && focusedCell?.row === rowIndex && focusedCell?.col === colIndex"
|
|
10764
|
-
[attr.aria-selected]="selectedCell?.row === rowIndex && selectedCell?.col === colIndex"
|
|
10766
|
+
[attr.aria-selected]="selectedCell?.row === rowIndex && selectedCell?.col === colIndex ? 'true' : undefined"
|
|
10765
10767
|
[attr.aria-label]="color"
|
|
10766
10768
|
class="k-colorpalette-tile"
|
|
10767
10769
|
[id]="'k-' + rowIndex + '-' + colIndex + '-' + uniqueId"
|
|
@@ -10817,7 +10819,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
10817
10819
|
role="gridcell"
|
|
10818
10820
|
[class.k-selected]="selectedCell?.row === rowIndex && selectedCell?.col === colIndex"
|
|
10819
10821
|
[class.k-focus]="focusInComponent && focusedCell?.row === rowIndex && focusedCell?.col === colIndex"
|
|
10820
|
-
[attr.aria-selected]="selectedCell?.row === rowIndex && selectedCell?.col === colIndex"
|
|
10822
|
+
[attr.aria-selected]="selectedCell?.row === rowIndex && selectedCell?.col === colIndex ? 'true' : undefined"
|
|
10821
10823
|
[attr.aria-label]="color"
|
|
10822
10824
|
class="k-colorpalette-tile"
|
|
10823
10825
|
[id]="'k-' + rowIndex + '-' + colIndex + '-' + uniqueId"
|
|
@@ -10887,15 +10889,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
10887
10889
|
}], readonlyAttribute: [{
|
|
10888
10890
|
type: HostBinding,
|
|
10889
10891
|
args: ['attr.aria-readonly']
|
|
10890
|
-
}], handleKeydown: [{
|
|
10891
|
-
type: HostListener,
|
|
10892
|
-
args: ['keydown', ['$event']]
|
|
10893
|
-
}], handleFocus: [{
|
|
10894
|
-
type: HostListener,
|
|
10895
|
-
args: ['focus', ['$event']]
|
|
10896
|
-
}], handleHostBlur: [{
|
|
10897
|
-
type: HostListener,
|
|
10898
|
-
args: ['blur']
|
|
10899
10892
|
}] } });
|
|
10900
10893
|
|
|
10901
10894
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
@@ -10946,7 +10939,7 @@ class FlatColorPickerHeaderComponent {
|
|
|
10946
10939
|
onHeaderTabOut(ev, index) {
|
|
10947
10940
|
if (index === 0) {
|
|
10948
10941
|
ev.preventDefault();
|
|
10949
|
-
this.tabOut.emit();
|
|
10942
|
+
this.tabOut.emit(ev);
|
|
10950
10943
|
}
|
|
10951
10944
|
}
|
|
10952
10945
|
}
|
|
@@ -10955,7 +10948,9 @@ FlatColorPickerHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
10955
10948
|
<div class="k-coloreditor-header-actions k-hstack">
|
|
10956
10949
|
<div
|
|
10957
10950
|
*ngIf="viewButtons"
|
|
10958
|
-
class="k-button-group k-button-group-flat"
|
|
10951
|
+
class="k-button-group k-button-group-flat"
|
|
10952
|
+
role="group"
|
|
10953
|
+
>
|
|
10959
10954
|
<button
|
|
10960
10955
|
*ngFor="let view of views; let i = index;"
|
|
10961
10956
|
kendoButton
|
|
@@ -11014,7 +11009,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
11014
11009
|
<div class="k-coloreditor-header-actions k-hstack">
|
|
11015
11010
|
<div
|
|
11016
11011
|
*ngIf="viewButtons"
|
|
11017
|
-
class="k-button-group k-button-group-flat"
|
|
11012
|
+
class="k-button-group k-button-group-flat"
|
|
11013
|
+
role="group"
|
|
11014
|
+
>
|
|
11018
11015
|
<button
|
|
11019
11016
|
*ngFor="let view of views; let i = index;"
|
|
11020
11017
|
kendoButton
|
|
@@ -11397,15 +11394,6 @@ class FlatColorPickerComponent {
|
|
|
11397
11394
|
}
|
|
11398
11395
|
return this.activeView === 'gradient' ? this.gradient : this.palette;
|
|
11399
11396
|
}
|
|
11400
|
-
/**
|
|
11401
|
-
* @hidden
|
|
11402
|
-
*/
|
|
11403
|
-
get lastFocusable() {
|
|
11404
|
-
if (this.preview) {
|
|
11405
|
-
return this.footer.lastButton.nativeElement;
|
|
11406
|
-
}
|
|
11407
|
-
return this.activeView === 'gradient' ? this.gradient : this.palette;
|
|
11408
|
-
}
|
|
11409
11397
|
ngOnInit() {
|
|
11410
11398
|
this.selection = this.value;
|
|
11411
11399
|
this.control = this.injector.get(NgControl, null);
|
|
@@ -11433,6 +11421,30 @@ class FlatColorPickerComponent {
|
|
|
11433
11421
|
}
|
|
11434
11422
|
this.subscriptions.unsubscribe();
|
|
11435
11423
|
}
|
|
11424
|
+
/**
|
|
11425
|
+
* @hidden
|
|
11426
|
+
*/
|
|
11427
|
+
focusFirstHeaderButton() {
|
|
11428
|
+
if (this.gradientElement.nativeElement === document.activeElement) {
|
|
11429
|
+
if (this.headerHasContent && !this.preview) {
|
|
11430
|
+
const firstHeaderButton = this.headerElement.nativeElement.querySelector('.k-button');
|
|
11431
|
+
firstHeaderButton.focus();
|
|
11432
|
+
}
|
|
11433
|
+
}
|
|
11434
|
+
}
|
|
11435
|
+
/**
|
|
11436
|
+
* @hidden
|
|
11437
|
+
*/
|
|
11438
|
+
lastFocusable(event) {
|
|
11439
|
+
if (this.preview) {
|
|
11440
|
+
this.footer.lastButton.nativeElement.focus();
|
|
11441
|
+
return;
|
|
11442
|
+
}
|
|
11443
|
+
event.stopImmediatePropagation();
|
|
11444
|
+
const gradient = this.gradientElement?.nativeElement;
|
|
11445
|
+
const palette = this.palette?.host.nativeElement;
|
|
11446
|
+
this.activeView === 'gradient' ? gradient.focus() : palette.focus();
|
|
11447
|
+
}
|
|
11436
11448
|
/**
|
|
11437
11449
|
* @hidden
|
|
11438
11450
|
*/
|
|
@@ -11515,8 +11527,6 @@ class FlatColorPickerComponent {
|
|
|
11515
11527
|
*/
|
|
11516
11528
|
onClearButtonClick() {
|
|
11517
11529
|
this.resetInnerComponentValue();
|
|
11518
|
-
this.internalNavigation = false;
|
|
11519
|
-
this.host.nativeElement.focus();
|
|
11520
11530
|
this.clearButtonClick.emit();
|
|
11521
11531
|
}
|
|
11522
11532
|
/**
|
|
@@ -11706,7 +11716,7 @@ FlatColorPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0
|
|
|
11706
11716
|
hexInputPlaceholder="HEX">
|
|
11707
11717
|
</ng-container>
|
|
11708
11718
|
<div kendoFlatColorPickerHeader
|
|
11709
|
-
[innerTabIndex]="
|
|
11719
|
+
[innerTabIndex]="innerTabIndex"
|
|
11710
11720
|
*ngIf="headerHasContent"
|
|
11711
11721
|
#header
|
|
11712
11722
|
[clearButton]="clearButton"
|
|
@@ -11718,7 +11728,7 @@ FlatColorPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0
|
|
|
11718
11728
|
(clearButtonClick)="onClearButtonClick()"
|
|
11719
11729
|
(viewChange)="onViewChange($event)"
|
|
11720
11730
|
(valuePaneClick)="resetSelection($event)"
|
|
11721
|
-
(tabOut)="lastFocusable
|
|
11731
|
+
(tabOut)="lastFocusable($event)"></div>
|
|
11722
11732
|
<div class="k-coloreditor-views k-vstack">
|
|
11723
11733
|
<kendo-colorgradient #gradient
|
|
11724
11734
|
[tabindex]="innerTabIndex"
|
|
@@ -11731,6 +11741,7 @@ FlatColorPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0
|
|
|
11731
11741
|
[gradientSliderSmallStep]="gradientSettings.gradientSliderSmallStep"
|
|
11732
11742
|
[gradientSliderStep]="gradientSettings.gradientSliderStep"
|
|
11733
11743
|
[readonly]="readonly"
|
|
11744
|
+
(keydown.tab)="focusFirstHeaderButton()"
|
|
11734
11745
|
(valueChange)="handleValueChange($event)"
|
|
11735
11746
|
></kendo-colorgradient>
|
|
11736
11747
|
<kendo-colorpalette #palette
|
|
@@ -11829,7 +11840,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
11829
11840
|
hexInputPlaceholder="HEX">
|
|
11830
11841
|
</ng-container>
|
|
11831
11842
|
<div kendoFlatColorPickerHeader
|
|
11832
|
-
[innerTabIndex]="
|
|
11843
|
+
[innerTabIndex]="innerTabIndex"
|
|
11833
11844
|
*ngIf="headerHasContent"
|
|
11834
11845
|
#header
|
|
11835
11846
|
[clearButton]="clearButton"
|
|
@@ -11841,7 +11852,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
11841
11852
|
(clearButtonClick)="onClearButtonClick()"
|
|
11842
11853
|
(viewChange)="onViewChange($event)"
|
|
11843
11854
|
(valuePaneClick)="resetSelection($event)"
|
|
11844
|
-
(tabOut)="lastFocusable
|
|
11855
|
+
(tabOut)="lastFocusable($event)"></div>
|
|
11845
11856
|
<div class="k-coloreditor-views k-vstack">
|
|
11846
11857
|
<kendo-colorgradient #gradient
|
|
11847
11858
|
[tabindex]="innerTabIndex"
|
|
@@ -11854,6 +11865,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
11854
11865
|
[gradientSliderSmallStep]="gradientSettings.gradientSliderSmallStep"
|
|
11855
11866
|
[gradientSliderStep]="gradientSettings.gradientSliderStep"
|
|
11856
11867
|
[readonly]="readonly"
|
|
11868
|
+
(keydown.tab)="focusFirstHeaderButton()"
|
|
11857
11869
|
(valueChange)="handleValueChange($event)"
|
|
11858
11870
|
></kendo-colorgradient>
|
|
11859
11871
|
<kendo-colorpalette #palette
|
|
@@ -12434,6 +12446,7 @@ class ColorPickerComponent {
|
|
|
12434
12446
|
open = isPresent(open) ? open : !this.isOpen;
|
|
12435
12447
|
if (open) {
|
|
12436
12448
|
this.openPopup();
|
|
12449
|
+
this.focusFirstElement();
|
|
12437
12450
|
}
|
|
12438
12451
|
}
|
|
12439
12452
|
/**
|
|
@@ -12564,9 +12577,9 @@ class ColorPickerComponent {
|
|
|
12564
12577
|
focusFirstElement() {
|
|
12565
12578
|
this.ngZone.onStable.pipe(take(1)).subscribe(() => {
|
|
12566
12579
|
if (this.flatColorPicker) {
|
|
12567
|
-
const
|
|
12568
|
-
const
|
|
12569
|
-
|
|
12580
|
+
const gradientDragHandle = this.flatColorPicker.gradient?.gradientDragHandle;
|
|
12581
|
+
const palette = this.flatColorPicker.palette?.host;
|
|
12582
|
+
const elementToFocus = gradientDragHandle ? gradientDragHandle : palette;
|
|
12570
12583
|
elementToFocus.nativeElement.focus();
|
|
12571
12584
|
}
|
|
12572
12585
|
});
|
|
@@ -12760,7 +12773,6 @@ ColorPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
|
|
|
12760
12773
|
kendoButton
|
|
12761
12774
|
tabindex="-1"
|
|
12762
12775
|
type="button"
|
|
12763
|
-
role="none"
|
|
12764
12776
|
icon="caret-alt-down"
|
|
12765
12777
|
[svgIcon]="arrowDownIcon"
|
|
12766
12778
|
aria-hidden="true"
|
|
@@ -12884,7 +12896,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
12884
12896
|
kendoButton
|
|
12885
12897
|
tabindex="-1"
|
|
12886
12898
|
type="button"
|
|
12887
|
-
role="none"
|
|
12888
12899
|
icon="caret-alt-down"
|
|
12889
12900
|
[svgIcon]="arrowDownIcon"
|
|
12890
12901
|
aria-hidden="true"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-inputs",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.3.0-develop.10",
|
|
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",
|
|
@@ -33,19 +33,19 @@
|
|
|
33
33
|
"@angular/platform-browser": "13 - 15",
|
|
34
34
|
"@progress/kendo-drawing": "^1.17.2",
|
|
35
35
|
"@progress/kendo-licensing": "^1.0.2",
|
|
36
|
-
"@progress/kendo-angular-buttons": "11.
|
|
37
|
-
"@progress/kendo-angular-common": "11.
|
|
38
|
-
"@progress/kendo-angular-dialog": "11.
|
|
39
|
-
"@progress/kendo-angular-intl": "11.
|
|
40
|
-
"@progress/kendo-angular-l10n": "11.
|
|
41
|
-
"@progress/kendo-angular-popup": "11.
|
|
42
|
-
"@progress/kendo-angular-icons": "11.
|
|
36
|
+
"@progress/kendo-angular-buttons": "11.3.0-develop.10",
|
|
37
|
+
"@progress/kendo-angular-common": "11.3.0-develop.10",
|
|
38
|
+
"@progress/kendo-angular-dialog": "11.3.0-develop.10",
|
|
39
|
+
"@progress/kendo-angular-intl": "11.3.0-develop.10",
|
|
40
|
+
"@progress/kendo-angular-l10n": "11.3.0-develop.10",
|
|
41
|
+
"@progress/kendo-angular-popup": "11.3.0-develop.10",
|
|
42
|
+
"@progress/kendo-angular-icons": "11.3.0-develop.10",
|
|
43
43
|
"rxjs": "^6.5.3 || ^7.0.0",
|
|
44
|
-
"@progress/kendo-angular-upload": "11.
|
|
44
|
+
"@progress/kendo-angular-upload": "11.3.0-develop.10"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"tslib": "^2.3.1",
|
|
48
|
-
"@progress/kendo-angular-schematics": "11.
|
|
48
|
+
"@progress/kendo-angular-schematics": "11.3.0-develop.10",
|
|
49
49
|
"@progress/kendo-common": "^0.2.2",
|
|
50
50
|
"@progress/kendo-draggable": "^3.0.0",
|
|
51
51
|
"@progress/kendo-inputs-common": "^3.1.0"
|
package/shared/utils.d.ts
CHANGED
|
@@ -2,12 +2,6 @@
|
|
|
2
2
|
* Copyright © 2023 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
|
-
/**
|
|
6
|
-
* @hidden
|
|
7
|
-
*
|
|
8
|
-
* Returns true if the used browser is Safari.
|
|
9
|
-
*/
|
|
10
|
-
export declare const isSafari: (userAgent: any) => boolean;
|
|
11
5
|
/**
|
|
12
6
|
* @hidden
|
|
13
7
|
*
|