@progress/kendo-angular-inputs 10.1.1-dev.202210121020 → 10.1.1-dev.202210241319
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/kendo-angular-inputs.umd.js +1 -1
- package/colorpicker/color-gradient-numeric-label.directive.d.ts +20 -0
- package/colorpicker/color-gradient.component.d.ts +48 -5
- package/colorpicker/color-input.component.d.ts +14 -3
- package/colorpicker/color-palette.component.d.ts +16 -0
- package/colorpicker/colorpicker.component.d.ts +8 -2
- package/colorpicker/constants.d.ts +4 -0
- package/colorpicker/flatcolorpicker-actions.component.d.ts +4 -1
- package/colorpicker/flatcolorpicker-header.component.d.ts +4 -1
- package/colorpicker/flatcolorpicker.component.d.ts +40 -3
- package/colorpicker/localization/messages.d.ts +17 -1
- package/colorpicker/models/gradient-settings.d.ts +12 -0
- package/colorpicker.module.d.ts +14 -13
- package/esm2015/colorpicker/color-gradient-numeric-label.directive.js +29 -0
- package/esm2015/colorpicker/color-gradient.component.js +181 -34
- package/esm2015/colorpicker/color-input.component.js +71 -10
- package/esm2015/colorpicker/color-palette.component.js +49 -11
- package/esm2015/colorpicker/colorpicker.component.js +69 -11
- package/esm2015/colorpicker/constants.js +4 -0
- package/esm2015/colorpicker/flatcolorpicker-actions.component.js +20 -5
- package/esm2015/colorpicker/flatcolorpicker-header.component.js +36 -14
- package/esm2015/colorpicker/flatcolorpicker.component.js +206 -49
- package/esm2015/colorpicker/localization/messages.js +9 -1
- package/esm2015/colorpicker.module.js +4 -1
- package/esm2015/main.js +1 -0
- package/esm2015/package-metadata.js +1 -1
- package/esm2015/signature/localization/messages.js +3 -1
- package/esm2015/signature/signature.component.js +39 -6
- package/fesm2015/kendo-angular-inputs.js +727 -159
- package/main.d.ts +1 -0
- package/package.json +1 -1
- package/signature/localization/messages.d.ts +5 -1
- package/signature/signature.component.d.ts +5 -0
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
|
|
6
|
-
import {
|
|
5
|
+
/* eslint-disable no-unused-expressions */
|
|
6
|
+
import { Component, ElementRef, EventEmitter, forwardRef, HostBinding, Input, isDevMode, Output, ViewChild, HostListener } from "@angular/core";
|
|
7
|
+
import { NgControl, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
7
8
|
import { Subscription } from 'rxjs';
|
|
8
9
|
import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
|
|
9
|
-
import { isChanged, KendoInput } from '@progress/kendo-angular-common';
|
|
10
|
+
import { findFocusableChild, isChanged, KendoInput } from '@progress/kendo-angular-common';
|
|
10
11
|
import { validatePackage } from "@progress/kendo-licensing";
|
|
11
12
|
import { FlatColorPickerLocalizationService } from './localization/flatcolorpicker-localization.service';
|
|
12
13
|
import { FlatColorPickerService } from './services/flatcolorpicker.service';
|
|
@@ -14,6 +15,8 @@ import { packageMetadata } from "../package-metadata";
|
|
|
14
15
|
import { ColorPickerCancelEvent } from './events';
|
|
15
16
|
import { parseColor } from './utils';
|
|
16
17
|
import { isPresent } from '../common/utils';
|
|
18
|
+
import { DRAGHANDLE_MOVE_SPEED, DRAGHANDLE_MOVE_SPEED_SMALL_STEP } from "./constants";
|
|
19
|
+
import { take } from "rxjs/operators";
|
|
17
20
|
import * as i0 from "@angular/core";
|
|
18
21
|
import * as i1 from "./services/flatcolorpicker.service";
|
|
19
22
|
import * as i2 from "@progress/kendo-angular-l10n";
|
|
@@ -23,7 +26,6 @@ import * as i5 from "./color-palette.component";
|
|
|
23
26
|
import * as i6 from "./flatcolorpicker-actions.component";
|
|
24
27
|
import * as i7 from "./localization/localized-colorpicker-messages.directive";
|
|
25
28
|
import * as i8 from "@angular/common";
|
|
26
|
-
import * as i9 from "./focus-on-dom-ready.directive";
|
|
27
29
|
/**
|
|
28
30
|
* Represents the [Kendo UI FlatColorPicker component for Angular]({% slug overview_flatcolorpicker %}).
|
|
29
31
|
*
|
|
@@ -31,14 +33,16 @@ import * as i9 from "./focus-on-dom-ready.directive";
|
|
|
31
33
|
* through a gradient that renders an hsv canvas. It supports previewing the selected color, reverting it to its previous state or clearing it completely.
|
|
32
34
|
*/
|
|
33
35
|
export class FlatColorPickerComponent {
|
|
34
|
-
constructor(host, service, localizationService, cdr, renderer, ngZone) {
|
|
36
|
+
constructor(host, service, localizationService, cdr, renderer, ngZone, injector) {
|
|
35
37
|
this.host = host;
|
|
36
38
|
this.service = service;
|
|
37
39
|
this.localizationService = localizationService;
|
|
38
40
|
this.cdr = cdr;
|
|
39
41
|
this.renderer = renderer;
|
|
40
42
|
this.ngZone = ngZone;
|
|
43
|
+
this.injector = injector;
|
|
41
44
|
this.hostClasses = true;
|
|
45
|
+
this.ariaRole = 'textbox';
|
|
42
46
|
/**
|
|
43
47
|
* Sets the read-only state of the FlatColorPicker.
|
|
44
48
|
*
|
|
@@ -111,9 +115,15 @@ export class FlatColorPickerComponent {
|
|
|
111
115
|
*/
|
|
112
116
|
this.actionButtonClick = new EventEmitter();
|
|
113
117
|
this._tabindex = 0;
|
|
114
|
-
this._gradientSettings = {
|
|
118
|
+
this._gradientSettings = {
|
|
119
|
+
opacity: true,
|
|
120
|
+
delay: 0,
|
|
121
|
+
gradientSliderStep: DRAGHANDLE_MOVE_SPEED,
|
|
122
|
+
gradientSliderSmallStep: DRAGHANDLE_MOVE_SPEED_SMALL_STEP
|
|
123
|
+
};
|
|
115
124
|
this._paletteSettings = {};
|
|
116
125
|
this.subscriptions = new Subscription();
|
|
126
|
+
this.internalNavigation = false;
|
|
117
127
|
this.notifyNgChanged = () => { };
|
|
118
128
|
this.notifyNgTouched = () => { };
|
|
119
129
|
validatePackage(packageMetadata);
|
|
@@ -128,7 +138,40 @@ export class FlatColorPickerComponent {
|
|
|
128
138
|
return this.readonly;
|
|
129
139
|
}
|
|
130
140
|
get hostTabindex() {
|
|
131
|
-
|
|
141
|
+
var _a;
|
|
142
|
+
return ((_a = this.tabindex) === null || _a === void 0 ? void 0 : _a.toString()) || '0';
|
|
143
|
+
}
|
|
144
|
+
get isControlInvalid() {
|
|
145
|
+
var _a, _b;
|
|
146
|
+
return (_b = ((_a = this.control) === null || _a === void 0 ? void 0 : _a.invalid)) === null || _b === void 0 ? void 0 : _b.toString();
|
|
147
|
+
}
|
|
148
|
+
get isDisabled() {
|
|
149
|
+
var _a;
|
|
150
|
+
return ((_a = this.disabled) === null || _a === void 0 ? void 0 : _a.toString()) || undefined;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* @hidden
|
|
154
|
+
*/
|
|
155
|
+
enterHandler(event) {
|
|
156
|
+
if (event.target !== this.host.nativeElement) {
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
event.preventDefault();
|
|
160
|
+
this.internalNavigation = true;
|
|
161
|
+
this.ngZone.onStable.pipe(take(1)).subscribe(() => { var _a; return (_a = this.firstFocusable) === null || _a === void 0 ? void 0 : _a.focus(); });
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* @hidden
|
|
165
|
+
*/
|
|
166
|
+
escapeHandler() {
|
|
167
|
+
this.internalNavigation = false;
|
|
168
|
+
this.host.nativeElement.focus();
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* @hidden
|
|
172
|
+
*/
|
|
173
|
+
focusHandler(ev) {
|
|
174
|
+
this.internalNavigation = ev.target !== this.host.nativeElement;
|
|
132
175
|
}
|
|
133
176
|
/**
|
|
134
177
|
* Specifies the initially selected color.
|
|
@@ -145,9 +188,14 @@ export class FlatColorPickerComponent {
|
|
|
145
188
|
* @default 0
|
|
146
189
|
*/
|
|
147
190
|
set tabindex(value) {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
191
|
+
if (isPresent(value)) {
|
|
192
|
+
const tabindex = Number(value);
|
|
193
|
+
this._tabindex = !isNaN(tabindex) ? tabindex : 0;
|
|
194
|
+
}
|
|
195
|
+
else {
|
|
196
|
+
// Allows removal of the tabindex attribute
|
|
197
|
+
this._tabindex = value;
|
|
198
|
+
}
|
|
151
199
|
}
|
|
152
200
|
get tabindex() {
|
|
153
201
|
return !this.disabled ? this._tabindex : undefined;
|
|
@@ -170,8 +218,33 @@ export class FlatColorPickerComponent {
|
|
|
170
218
|
get paletteSettings() {
|
|
171
219
|
return this._paletteSettings;
|
|
172
220
|
}
|
|
221
|
+
/**
|
|
222
|
+
* @hidden
|
|
223
|
+
*/
|
|
224
|
+
get innerTabIndex() {
|
|
225
|
+
return this.internalNavigation ? 0 : -1;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* @hidden
|
|
229
|
+
*/
|
|
230
|
+
get firstFocusable() {
|
|
231
|
+
if (this.headerHasContent) {
|
|
232
|
+
return this.headerElement.nativeElement.querySelector('.k-button');
|
|
233
|
+
}
|
|
234
|
+
return this.activeView === 'gradient' ? this.gradient : this.palette;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* @hidden
|
|
238
|
+
*/
|
|
239
|
+
get lastFocusable() {
|
|
240
|
+
if (this.preview) {
|
|
241
|
+
return this.footer.lastButton.nativeElement;
|
|
242
|
+
}
|
|
243
|
+
return this.activeView === 'gradient' ? this.gradient : this.palette;
|
|
244
|
+
}
|
|
173
245
|
ngOnInit() {
|
|
174
246
|
this.selection = this.value;
|
|
247
|
+
this.control = this.injector.get(NgControl, null);
|
|
175
248
|
this._paletteSettings = this.service.getPaletteSettings(this._paletteSettings, this.format);
|
|
176
249
|
this.setActiveView();
|
|
177
250
|
}
|
|
@@ -179,6 +252,7 @@ export class FlatColorPickerComponent {
|
|
|
179
252
|
this.setHostElementAriaLabel();
|
|
180
253
|
this.initDomEvents();
|
|
181
254
|
this.setSizingVariables();
|
|
255
|
+
this.removeGradientAttributes();
|
|
182
256
|
}
|
|
183
257
|
ngOnChanges(changes) {
|
|
184
258
|
if (isChanged('value', changes)) {
|
|
@@ -195,6 +269,20 @@ export class FlatColorPickerComponent {
|
|
|
195
269
|
}
|
|
196
270
|
this.subscriptions.unsubscribe();
|
|
197
271
|
}
|
|
272
|
+
/**
|
|
273
|
+
* @hidden
|
|
274
|
+
*/
|
|
275
|
+
onTab(ev) {
|
|
276
|
+
const { shiftKey } = ev;
|
|
277
|
+
const nextTabStop = this.preview ? this.footer.firstButton.nativeElement : this.headerHasContent ? findFocusableChild(this.headerElement.nativeElement) : null;
|
|
278
|
+
const previousTabStop = this.headerHasContent ? findFocusableChild(this.headerElement.nativeElement) : this.preview ? this.footer.lastButton.nativeElement : null;
|
|
279
|
+
if (!nextTabStop && !previousTabStop) {
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
ev.preventDefault();
|
|
283
|
+
// eslint-disable-next-line no-unused-expressions
|
|
284
|
+
shiftKey ? previousTabStop === null || previousTabStop === void 0 ? void 0 : previousTabStop.focus() : nextTabStop === null || nextTabStop === void 0 ? void 0 : nextTabStop.focus();
|
|
285
|
+
}
|
|
198
286
|
/**
|
|
199
287
|
* @hidden
|
|
200
288
|
*/
|
|
@@ -212,7 +300,7 @@ export class FlatColorPickerComponent {
|
|
|
212
300
|
* Focuses the wrapper of the FlatColorPicker.
|
|
213
301
|
*/
|
|
214
302
|
focus() {
|
|
215
|
-
if (this.disabled
|
|
303
|
+
if (this.disabled || this.focused) {
|
|
216
304
|
return;
|
|
217
305
|
}
|
|
218
306
|
this.host.nativeElement.focus();
|
|
@@ -249,12 +337,14 @@ export class FlatColorPickerComponent {
|
|
|
249
337
|
}
|
|
250
338
|
this.activeView = view;
|
|
251
339
|
this.activeViewChange.emit(view);
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
});
|
|
340
|
+
this.ngZone.runOutsideAngular(() => {
|
|
341
|
+
setTimeout(() => {
|
|
342
|
+
var _a;
|
|
343
|
+
(_a = this[this.activeView]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
257
344
|
});
|
|
345
|
+
});
|
|
346
|
+
if (this.activeView === 'gradient') {
|
|
347
|
+
this.removeGradientAttributes();
|
|
258
348
|
}
|
|
259
349
|
}
|
|
260
350
|
/**
|
|
@@ -262,6 +352,7 @@ export class FlatColorPickerComponent {
|
|
|
262
352
|
*/
|
|
263
353
|
onClearButtonClick() {
|
|
264
354
|
this.resetInnerComponentValue();
|
|
355
|
+
this.internalNavigation = false;
|
|
265
356
|
this.host.nativeElement.focus();
|
|
266
357
|
}
|
|
267
358
|
/**
|
|
@@ -372,9 +463,13 @@ export class FlatColorPickerComponent {
|
|
|
372
463
|
}));
|
|
373
464
|
});
|
|
374
465
|
}
|
|
466
|
+
removeGradientAttributes() {
|
|
467
|
+
this.gradientElement && this.renderer.removeAttribute(this.gradientElement.nativeElement, 'role');
|
|
468
|
+
this.gradientElement && this.renderer.removeAttribute(this.gradientElement.nativeElement, 'aria-label');
|
|
469
|
+
}
|
|
375
470
|
}
|
|
376
|
-
FlatColorPickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FlatColorPickerComponent, deps: [{ token: i0.ElementRef }, { token: i1.FlatColorPickerService }, { token: i2.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
377
|
-
FlatColorPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FlatColorPickerComponent, selector: "kendo-flatcolorpicker", inputs: { readonly: "readonly", disabled: "disabled", format: "format", value: "value", tabindex: "tabindex", clearButton: "clearButton", preview: "preview", actionsLayout: "actionsLayout", activeView: "activeView", views: "views", gradientSettings: "gradientSettings", paletteSettings: "paletteSettings" }, outputs: { valueChange: "valueChange", cancel: "cancel", activeViewChange: "activeViewChange", actionButtonClick: "actionButtonClick" }, host: { properties: { "class.k-flatcolorpicker": "this.hostClasses", "class.k-coloreditor": "this.hostClasses", "class.k-disabled": "this.disabledClass", "attr.aria-disabled": "this.
|
|
471
|
+
FlatColorPickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FlatColorPickerComponent, deps: [{ token: i0.ElementRef }, { token: i1.FlatColorPickerService }, { token: i2.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
472
|
+
FlatColorPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FlatColorPickerComponent, selector: "kendo-flatcolorpicker", inputs: { readonly: "readonly", disabled: "disabled", format: "format", value: "value", tabindex: "tabindex", clearButton: "clearButton", preview: "preview", actionsLayout: "actionsLayout", activeView: "activeView", views: "views", gradientSettings: "gradientSettings", paletteSettings: "paletteSettings" }, outputs: { valueChange: "valueChange", cancel: "cancel", activeViewChange: "activeViewChange", actionButtonClick: "actionButtonClick" }, host: { listeners: { "keydown.enter": "enterHandler($event)", "keydown.escape": "escapeHandler()", "focusin": "focusHandler($event)" }, properties: { "class.k-flatcolorpicker": "this.hostClasses", "class.k-coloreditor": "this.hostClasses", "class.k-disabled": "this.disabledClass", "attr.aria-disabled": "this.isDisabled", "attr.aria-readonly": "this.ariaReadonly", "attr.dir": "this.direction", "attr.tabindex": "this.hostTabindex", "attr.role": "this.ariaRole", "attr.aria-invalid": "this.isControlInvalid" } }, providers: [
|
|
378
473
|
{
|
|
379
474
|
multi: true,
|
|
380
475
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -394,7 +489,7 @@ FlatColorPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0
|
|
|
394
489
|
provide: L10N_PREFIX,
|
|
395
490
|
useValue: 'kendo.flatcolorpicker'
|
|
396
491
|
}
|
|
397
|
-
], viewQueries: [{ propertyName: "header", first: true, predicate: ["header"], descendants: true }, { propertyName: "gradient", first: true, predicate: ["gradient"], descendants: true }, { propertyName: "palette", first: true, predicate: ["palette"], descendants: true }, { propertyName: "footer", first: true, predicate: ["footer"], descendants: true }], exportAs: ["kendoFlatColorPicker"], usesOnChanges: true, ngImport: i0, template: `
|
|
492
|
+
], viewQueries: [{ propertyName: "header", first: true, predicate: ["header"], descendants: true }, { propertyName: "headerElement", first: true, predicate: ["header"], descendants: true, read: ElementRef }, { propertyName: "gradient", first: true, predicate: ["gradient"], descendants: true }, { propertyName: "gradientElement", first: true, predicate: ["gradient"], descendants: true, read: ElementRef }, { propertyName: "palette", first: true, predicate: ["palette"], descendants: true }, { propertyName: "footer", first: true, predicate: ["footer"], descendants: true }], exportAs: ["kendoFlatColorPicker"], usesOnChanges: true, ngImport: i0, template: `
|
|
398
493
|
<ng-container kendoFlatColorPickerLocalizedMessages
|
|
399
494
|
i18n-flatColorPickerNoColor="kendo.flatcolorpicker.flatColorPickerNoColor|The aria-label applied to the FlatColorPicker component when the value is empty."
|
|
400
495
|
flatColorPickerNoColor="Flatcolorpicker no color chosen"
|
|
@@ -425,9 +520,26 @@ FlatColorPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0
|
|
|
425
520
|
i18n-applyButton="kendo.flatcolorpicker.applyButton|The message for the Apply action button."
|
|
426
521
|
applyButton="Apply"
|
|
427
522
|
i18n-cancelButton="kendo.flatcolorpicker.cancelButton|The message for the Cancel action button."
|
|
428
|
-
cancelButton="Cancel"
|
|
523
|
+
cancelButton="Cancel"
|
|
524
|
+
i18n-redChannelLabel="kendo.flatcolorpicker.redChannelLabel|The label of the NumericTextBox representing the red color channel."
|
|
525
|
+
redChannelLabel="Red channel"
|
|
526
|
+
i18n-greenChannelLabel="kendo.flatcolorpicker.greenChannelLabel|The label of the NumericTextBox representing the green color channel."
|
|
527
|
+
greenChannelLabel="Green channel"
|
|
528
|
+
i18n-blueChannelLabel="kendo.flatcolorpicker.blueChannelLabel|The label of the NumericTextBox representing the blue color channel."
|
|
529
|
+
blueChannelLabel="Blue channel"
|
|
530
|
+
i18n-alphaChannelLabel="kendo.flatcolorpicker.alphaChannelLabel|The label of the NumericTextBox representing the alpha color channel."
|
|
531
|
+
alphaChannelLabel="Alpha channel"
|
|
532
|
+
i18n-redInputPlaceholder="kendo.flatcolorpicker.redInputPlaceholder|The placeholder for the red color input."
|
|
533
|
+
redChannelLabel="R"
|
|
534
|
+
i18n-greenInputPlaceholder="kendo.flatcolorpicker.greenInputPlaceholder|The placeholder for the green color input."
|
|
535
|
+
greenInputPlaceholder="G"
|
|
536
|
+
i18n-blueInputPlaceholder="kendo.flatcolorpicker.blueInputPlaceholder|The placeholder for the blue color input."
|
|
537
|
+
blueInputPlaceholder="B"
|
|
538
|
+
i18n-hexInputPlaceholder="kendo.flatcolorpicker.hexInputPlaceholder|The placeholder for the HEX color input."
|
|
539
|
+
hexInputPlaceholder="HEX">
|
|
429
540
|
</ng-container>
|
|
430
541
|
<div kendoFlatColorPickerHeader
|
|
542
|
+
[innerTabIndex]="this.innerTabIndex"
|
|
431
543
|
*ngIf="headerHasContent"
|
|
432
544
|
#header
|
|
433
545
|
[clearButton]="clearButton"
|
|
@@ -438,24 +550,25 @@ FlatColorPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0
|
|
|
438
550
|
[preview]="preview"
|
|
439
551
|
(clearButtonClick)="onClearButtonClick()"
|
|
440
552
|
(viewChange)="onViewChange($event)"
|
|
441
|
-
(valuePaneClick)="resetSelection($event)"
|
|
442
|
-
|
|
553
|
+
(valuePaneClick)="resetSelection($event)"
|
|
554
|
+
(tabOut)="lastFocusable.focus()"></div>
|
|
443
555
|
<div class="k-coloreditor-views k-vstack">
|
|
444
556
|
<kendo-colorgradient #gradient
|
|
557
|
+
[tabindex]="innerTabIndex"
|
|
445
558
|
*ngIf="activeView === 'gradient'"
|
|
446
|
-
[tabindex]="null"
|
|
447
559
|
[value]="selection"
|
|
448
560
|
[format]="format"
|
|
449
561
|
[opacity]="gradientSettings.opacity"
|
|
450
562
|
[delay]="gradientSettings.delay"
|
|
451
563
|
[contrastTool]="gradientSettings.contrastTool"
|
|
564
|
+
[gradientSliderSmallStep]="gradientSettings.gradientSliderSmallStep"
|
|
565
|
+
[gradientSliderStep]="gradientSettings.gradientSliderStep"
|
|
452
566
|
[readonly]="readonly"
|
|
453
567
|
(valueChange)="handleValueChange($event)"
|
|
454
|
-
>
|
|
455
|
-
</kendo-colorgradient>
|
|
568
|
+
></kendo-colorgradient>
|
|
456
569
|
<kendo-colorpalette #palette
|
|
570
|
+
[tabindex]="innerTabIndex"
|
|
457
571
|
*ngIf="activeView === 'palette'"
|
|
458
|
-
kendoFocusOnDomReady
|
|
459
572
|
[palette]="paletteSettings.palette"
|
|
460
573
|
[columns]="paletteSettings.columns"
|
|
461
574
|
[tileSize]="paletteSettings.tileSize"
|
|
@@ -463,15 +576,16 @@ FlatColorPickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0
|
|
|
463
576
|
[value]="selection"
|
|
464
577
|
[readonly]="readonly"
|
|
465
578
|
(valueChange)="handleValueChange($event)"
|
|
466
|
-
>
|
|
467
|
-
</kendo-colorpalette>
|
|
579
|
+
></kendo-colorpalette>
|
|
468
580
|
</div>
|
|
469
|
-
<div kendoFlatColorPickerActionButtons
|
|
581
|
+
<div kendoFlatColorPickerActionButtons
|
|
582
|
+
[innerTabIndex]="innerTabIndex"
|
|
583
|
+
*ngIf="preview"
|
|
470
584
|
#footer
|
|
471
585
|
[ngClass]="'k-justify-content-' + actionsLayout"
|
|
472
|
-
(actionButtonClick)="onAction($event)"
|
|
473
|
-
|
|
474
|
-
`, isInline: true, components: [{ type: i3.FlatColorPickerHeaderComponent, selector: "[kendoFlatColorPickerHeader]", inputs: ["clearButton", "activeView", "views", "preview", "value", "selection"], outputs: ["viewChange", "valuePaneClick", "clearButtonClick"] }, { type: i4.ColorGradientComponent, selector: "kendo-colorgradient", inputs: ["id", "opacity", "disabled", "readonly", "clearButton", "delay", "value", "contrastTool", "tabindex", "format"], outputs: ["valueChange"], exportAs: ["kendoColorGradient"] }, { type: i5.ColorPaletteComponent, selector: "kendo-colorpalette", inputs: ["id", "format", "value", "columns", "palette", "tabindex", "disabled", "readonly", "tileSize"], outputs: ["selectionChange", "valueChange", "cellSelection"], exportAs: ["kendoColorPalette"] }, { type: i6.FlatColorPickerActionButtonsComponent, selector: "[kendoFlatColorPickerActionButtons]", outputs: ["actionButtonClick"] }], directives: [{ type: i7.LocalizedColorPickerMessagesDirective, selector: "[kendoColorPickerLocalizedMessages], [kendoFlatColorPickerLocalizedMessages], [kendoColorGradientLocalizedMessages], [kendoColorPaletteLocalizedMessages]" }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type:
|
|
586
|
+
(actionButtonClick)="onAction($event)"
|
|
587
|
+
(tabOut)="firstFocusable.focus()"></div>
|
|
588
|
+
`, isInline: true, components: [{ type: i3.FlatColorPickerHeaderComponent, selector: "[kendoFlatColorPickerHeader]", inputs: ["clearButton", "activeView", "views", "preview", "innerTabIndex", "value", "selection"], outputs: ["viewChange", "valuePaneClick", "clearButtonClick", "tabOut"] }, { type: i4.ColorGradientComponent, selector: "kendo-colorgradient", inputs: ["id", "opacity", "disabled", "readonly", "clearButton", "delay", "value", "contrastTool", "tabindex", "format", "gradientSliderStep", "gradientSliderSmallStep"], outputs: ["valueChange"], exportAs: ["kendoColorGradient"] }, { type: i5.ColorPaletteComponent, selector: "kendo-colorpalette", inputs: ["id", "format", "value", "columns", "palette", "tabindex", "disabled", "readonly", "tileSize"], outputs: ["selectionChange", "valueChange", "cellSelection"], exportAs: ["kendoColorPalette"] }, { type: i6.FlatColorPickerActionButtonsComponent, selector: "[kendoFlatColorPickerActionButtons]", inputs: ["innerTabIndex"], outputs: ["actionButtonClick", "tabOut"] }], directives: [{ type: i7.LocalizedColorPickerMessagesDirective, selector: "[kendoColorPickerLocalizedMessages], [kendoFlatColorPickerLocalizedMessages], [kendoColorGradientLocalizedMessages], [kendoColorPaletteLocalizedMessages]" }, { type: i8.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
475
589
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FlatColorPickerComponent, decorators: [{
|
|
476
590
|
type: Component,
|
|
477
591
|
args: [{
|
|
@@ -529,9 +643,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
529
643
|
i18n-applyButton="kendo.flatcolorpicker.applyButton|The message for the Apply action button."
|
|
530
644
|
applyButton="Apply"
|
|
531
645
|
i18n-cancelButton="kendo.flatcolorpicker.cancelButton|The message for the Cancel action button."
|
|
532
|
-
cancelButton="Cancel"
|
|
646
|
+
cancelButton="Cancel"
|
|
647
|
+
i18n-redChannelLabel="kendo.flatcolorpicker.redChannelLabel|The label of the NumericTextBox representing the red color channel."
|
|
648
|
+
redChannelLabel="Red channel"
|
|
649
|
+
i18n-greenChannelLabel="kendo.flatcolorpicker.greenChannelLabel|The label of the NumericTextBox representing the green color channel."
|
|
650
|
+
greenChannelLabel="Green channel"
|
|
651
|
+
i18n-blueChannelLabel="kendo.flatcolorpicker.blueChannelLabel|The label of the NumericTextBox representing the blue color channel."
|
|
652
|
+
blueChannelLabel="Blue channel"
|
|
653
|
+
i18n-alphaChannelLabel="kendo.flatcolorpicker.alphaChannelLabel|The label of the NumericTextBox representing the alpha color channel."
|
|
654
|
+
alphaChannelLabel="Alpha channel"
|
|
655
|
+
i18n-redInputPlaceholder="kendo.flatcolorpicker.redInputPlaceholder|The placeholder for the red color input."
|
|
656
|
+
redChannelLabel="R"
|
|
657
|
+
i18n-greenInputPlaceholder="kendo.flatcolorpicker.greenInputPlaceholder|The placeholder for the green color input."
|
|
658
|
+
greenInputPlaceholder="G"
|
|
659
|
+
i18n-blueInputPlaceholder="kendo.flatcolorpicker.blueInputPlaceholder|The placeholder for the blue color input."
|
|
660
|
+
blueInputPlaceholder="B"
|
|
661
|
+
i18n-hexInputPlaceholder="kendo.flatcolorpicker.hexInputPlaceholder|The placeholder for the HEX color input."
|
|
662
|
+
hexInputPlaceholder="HEX">
|
|
533
663
|
</ng-container>
|
|
534
664
|
<div kendoFlatColorPickerHeader
|
|
665
|
+
[innerTabIndex]="this.innerTabIndex"
|
|
535
666
|
*ngIf="headerHasContent"
|
|
536
667
|
#header
|
|
537
668
|
[clearButton]="clearButton"
|
|
@@ -542,24 +673,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
542
673
|
[preview]="preview"
|
|
543
674
|
(clearButtonClick)="onClearButtonClick()"
|
|
544
675
|
(viewChange)="onViewChange($event)"
|
|
545
|
-
(valuePaneClick)="resetSelection($event)"
|
|
546
|
-
|
|
676
|
+
(valuePaneClick)="resetSelection($event)"
|
|
677
|
+
(tabOut)="lastFocusable.focus()"></div>
|
|
547
678
|
<div class="k-coloreditor-views k-vstack">
|
|
548
679
|
<kendo-colorgradient #gradient
|
|
680
|
+
[tabindex]="innerTabIndex"
|
|
549
681
|
*ngIf="activeView === 'gradient'"
|
|
550
|
-
[tabindex]="null"
|
|
551
682
|
[value]="selection"
|
|
552
683
|
[format]="format"
|
|
553
684
|
[opacity]="gradientSettings.opacity"
|
|
554
685
|
[delay]="gradientSettings.delay"
|
|
555
686
|
[contrastTool]="gradientSettings.contrastTool"
|
|
687
|
+
[gradientSliderSmallStep]="gradientSettings.gradientSliderSmallStep"
|
|
688
|
+
[gradientSliderStep]="gradientSettings.gradientSliderStep"
|
|
556
689
|
[readonly]="readonly"
|
|
557
690
|
(valueChange)="handleValueChange($event)"
|
|
558
|
-
>
|
|
559
|
-
</kendo-colorgradient>
|
|
691
|
+
></kendo-colorgradient>
|
|
560
692
|
<kendo-colorpalette #palette
|
|
693
|
+
[tabindex]="innerTabIndex"
|
|
561
694
|
*ngIf="activeView === 'palette'"
|
|
562
|
-
kendoFocusOnDomReady
|
|
563
695
|
[palette]="paletteSettings.palette"
|
|
564
696
|
[columns]="paletteSettings.columns"
|
|
565
697
|
[tileSize]="paletteSettings.tileSize"
|
|
@@ -567,17 +699,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
567
699
|
[value]="selection"
|
|
568
700
|
[readonly]="readonly"
|
|
569
701
|
(valueChange)="handleValueChange($event)"
|
|
570
|
-
>
|
|
571
|
-
</kendo-colorpalette>
|
|
702
|
+
></kendo-colorpalette>
|
|
572
703
|
</div>
|
|
573
|
-
<div kendoFlatColorPickerActionButtons
|
|
704
|
+
<div kendoFlatColorPickerActionButtons
|
|
705
|
+
[innerTabIndex]="innerTabIndex"
|
|
706
|
+
*ngIf="preview"
|
|
574
707
|
#footer
|
|
575
708
|
[ngClass]="'k-justify-content-' + actionsLayout"
|
|
576
|
-
(actionButtonClick)="onAction($event)"
|
|
577
|
-
|
|
709
|
+
(actionButtonClick)="onAction($event)"
|
|
710
|
+
(tabOut)="firstFocusable.focus()"></div>
|
|
578
711
|
`
|
|
579
712
|
}]
|
|
580
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.FlatColorPickerService }, { type: i2.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i0.NgZone }]; }, propDecorators: { hostClasses: [{
|
|
713
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.FlatColorPickerService }, { type: i2.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i0.Injector }]; }, propDecorators: { hostClasses: [{
|
|
581
714
|
type: HostBinding,
|
|
582
715
|
args: ['class.k-flatcolorpicker']
|
|
583
716
|
}, {
|
|
@@ -598,6 +731,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
598
731
|
}], hostTabindex: [{
|
|
599
732
|
type: HostBinding,
|
|
600
733
|
args: ['attr.tabindex']
|
|
734
|
+
}], ariaRole: [{
|
|
735
|
+
type: HostBinding,
|
|
736
|
+
args: ['attr.role']
|
|
737
|
+
}], isControlInvalid: [{
|
|
738
|
+
type: HostBinding,
|
|
739
|
+
args: ['attr.aria-invalid']
|
|
740
|
+
}], isDisabled: [{
|
|
741
|
+
type: HostBinding,
|
|
742
|
+
args: ['attr.aria-disabled']
|
|
743
|
+
}], enterHandler: [{
|
|
744
|
+
type: HostListener,
|
|
745
|
+
args: ['keydown.enter', ['$event']]
|
|
746
|
+
}], escapeHandler: [{
|
|
747
|
+
type: HostListener,
|
|
748
|
+
args: ['keydown.escape']
|
|
749
|
+
}], focusHandler: [{
|
|
750
|
+
type: HostListener,
|
|
751
|
+
args: ['focusin', ['$event']]
|
|
601
752
|
}], readonly: [{
|
|
602
753
|
type: Input
|
|
603
754
|
}], disabled: [{
|
|
@@ -632,14 +783,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
632
783
|
type: Output
|
|
633
784
|
}], header: [{
|
|
634
785
|
type: ViewChild,
|
|
635
|
-
args: ['header'
|
|
786
|
+
args: ['header']
|
|
787
|
+
}], headerElement: [{
|
|
788
|
+
type: ViewChild,
|
|
789
|
+
args: ['header', { read: ElementRef }]
|
|
636
790
|
}], gradient: [{
|
|
637
791
|
type: ViewChild,
|
|
638
|
-
args: ['gradient'
|
|
792
|
+
args: ['gradient']
|
|
793
|
+
}], gradientElement: [{
|
|
794
|
+
type: ViewChild,
|
|
795
|
+
args: ['gradient', { read: ElementRef }]
|
|
639
796
|
}], palette: [{
|
|
640
797
|
type: ViewChild,
|
|
641
|
-
args: ['palette'
|
|
798
|
+
args: ['palette']
|
|
642
799
|
}], footer: [{
|
|
643
800
|
type: ViewChild,
|
|
644
|
-
args: ['footer'
|
|
801
|
+
args: ['footer']
|
|
645
802
|
}] } });
|
|
@@ -11,7 +11,7 @@ import * as i0 from "@angular/core";
|
|
|
11
11
|
export class ColorPickerMessages extends ComponentMessages {
|
|
12
12
|
}
|
|
13
13
|
ColorPickerMessages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ColorPickerMessages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
14
|
-
ColorPickerMessages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: ColorPickerMessages, selector: "kendo-colorpicker-messages-base", inputs: { colorPaletteNoColor: "colorPaletteNoColor", colorGradientNoColor: "colorGradientNoColor", flatColorPickerNoColor: "flatColorPickerNoColor", colorPickerNoColor: "colorPickerNoColor", colorGradientHandle: "colorGradientHandle", clearButton: "clearButton", hueSliderHandle: "hueSliderHandle", opacitySliderHandle: "opacitySliderHandle", hexInputPlaceholder: "hexInputPlaceholder", redInputPlaceholder: "redInputPlaceholder", greenInputPlaceholder: "greenInputPlaceholder", blueInputPlaceholder: "blueInputPlaceholder", alphaInputPlaceholder: "alphaInputPlaceholder", passContrast: "passContrast", failContrast: "failContrast", contrastRatio: "contrastRatio", previewColor: "previewColor", revertSelection: "revertSelection", gradientView: "gradientView", paletteView: "paletteView", formatButton: "formatButton", applyButton: "applyButton", cancelButton: "cancelButton" }, usesInheritance: true, ngImport: i0 });
|
|
14
|
+
ColorPickerMessages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: ColorPickerMessages, selector: "kendo-colorpicker-messages-base", inputs: { colorPaletteNoColor: "colorPaletteNoColor", colorGradientNoColor: "colorGradientNoColor", flatColorPickerNoColor: "flatColorPickerNoColor", colorPickerNoColor: "colorPickerNoColor", colorGradientHandle: "colorGradientHandle", clearButton: "clearButton", hueSliderHandle: "hueSliderHandle", opacitySliderHandle: "opacitySliderHandle", hexInputPlaceholder: "hexInputPlaceholder", redInputPlaceholder: "redInputPlaceholder", greenInputPlaceholder: "greenInputPlaceholder", blueInputPlaceholder: "blueInputPlaceholder", alphaInputPlaceholder: "alphaInputPlaceholder", redChannelLabel: "redChannelLabel", greenChannelLabel: "greenChannelLabel", blueChannelLabel: "blueChannelLabel", alphaChannelLabel: "alphaChannelLabel", passContrast: "passContrast", failContrast: "failContrast", contrastRatio: "contrastRatio", previewColor: "previewColor", revertSelection: "revertSelection", gradientView: "gradientView", paletteView: "paletteView", formatButton: "formatButton", applyButton: "applyButton", cancelButton: "cancelButton" }, usesInheritance: true, ngImport: i0 });
|
|
15
15
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ColorPickerMessages, decorators: [{
|
|
16
16
|
type: Directive,
|
|
17
17
|
args: [{
|
|
@@ -44,6 +44,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
44
44
|
type: Input
|
|
45
45
|
}], alphaInputPlaceholder: [{
|
|
46
46
|
type: Input
|
|
47
|
+
}], redChannelLabel: [{
|
|
48
|
+
type: Input
|
|
49
|
+
}], greenChannelLabel: [{
|
|
50
|
+
type: Input
|
|
51
|
+
}], blueChannelLabel: [{
|
|
52
|
+
type: Input
|
|
53
|
+
}], alphaChannelLabel: [{
|
|
54
|
+
type: Input
|
|
47
55
|
}], passContrast: [{
|
|
48
56
|
type: Input
|
|
49
57
|
}], failContrast: [{
|
|
@@ -21,6 +21,7 @@ import { FocusOnDomReadyDirective } from './colorpicker/focus-on-dom-ready.direc
|
|
|
21
21
|
import { ContrastValidationComponent } from './colorpicker/contrast-validation.component';
|
|
22
22
|
import { ContrastComponent } from './colorpicker/contrast.component';
|
|
23
23
|
import { ColorContrastSvgComponent } from './colorpicker/color-contrast-svg.component';
|
|
24
|
+
import { NumericLabelDirective } from './colorpicker/color-gradient-numeric-label.directive';
|
|
24
25
|
import * as i0 from "@angular/core";
|
|
25
26
|
const PUBLIC_DIRECTIVES = [
|
|
26
27
|
ColorPickerComponent,
|
|
@@ -31,6 +32,7 @@ const PUBLIC_DIRECTIVES = [
|
|
|
31
32
|
ColorPickerCustomMessagesComponent
|
|
32
33
|
];
|
|
33
34
|
const INTERNAL_DIRECTIVES = [
|
|
35
|
+
NumericLabelDirective,
|
|
34
36
|
ColorInputComponent,
|
|
35
37
|
FocusOnDomReadyDirective,
|
|
36
38
|
ContrastComponent,
|
|
@@ -51,7 +53,8 @@ ColorPickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versi
|
|
|
51
53
|
ColorGradientComponent,
|
|
52
54
|
FlatColorPickerComponent,
|
|
53
55
|
LocalizedColorPickerMessagesDirective,
|
|
54
|
-
ColorPickerCustomMessagesComponent,
|
|
56
|
+
ColorPickerCustomMessagesComponent, NumericLabelDirective,
|
|
57
|
+
ColorInputComponent,
|
|
55
58
|
FocusOnDomReadyDirective,
|
|
56
59
|
ContrastComponent,
|
|
57
60
|
ContrastValidationComponent,
|
package/esm2015/main.js
CHANGED
|
@@ -57,6 +57,7 @@ export { RangeSliderCustomMessagesComponent } from './rangeslider/localization/c
|
|
|
57
57
|
export { SwitchCustomMessagesComponent } from './switch/localization/custom-messages.component';
|
|
58
58
|
export { TextBoxCustomMessagesComponent } from './textbox/localization/custom-messages.component';
|
|
59
59
|
export { ColorPickerCustomMessagesComponent } from './colorpicker/localization/custom-messages.component';
|
|
60
|
+
export { NumericLabelDirective } from './colorpicker/color-gradient-numeric-label.directive';
|
|
60
61
|
export { SignatureComponent } from './signature/signature.component';
|
|
61
62
|
export { SignatureModule } from './signature.module';
|
|
62
63
|
export { SignatureOpenEvent, SignatureCloseEvent } from './signature/events';
|
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-inputs',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
12
|
+
publishDate: 1666617508,
|
|
13
13
|
version: '',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
15
15
|
};
|
|
@@ -11,7 +11,7 @@ import * as i0 from "@angular/core";
|
|
|
11
11
|
export class SignatureMessages extends ComponentMessages {
|
|
12
12
|
}
|
|
13
13
|
SignatureMessages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SignatureMessages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
14
|
-
SignatureMessages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: SignatureMessages, selector: "kendo-signature-messages-base", inputs: { clear: "clear", minimize: "minimize", maximize: "maximize" }, usesInheritance: true, ngImport: i0 });
|
|
14
|
+
SignatureMessages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: SignatureMessages, selector: "kendo-signature-messages-base", inputs: { clear: "clear", minimize: "minimize", maximize: "maximize", canvasLabel: "canvasLabel" }, usesInheritance: true, ngImport: i0 });
|
|
15
15
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SignatureMessages, decorators: [{
|
|
16
16
|
type: Directive,
|
|
17
17
|
args: [{
|
|
@@ -24,4 +24,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
24
24
|
type: Input
|
|
25
25
|
}], maximize: [{
|
|
26
26
|
type: Input
|
|
27
|
+
}], canvasLabel: [{
|
|
28
|
+
type: Input
|
|
27
29
|
}] } });
|