@progress/kendo-angular-inputs 8.0.0-dev.202112161434 → 8.0.0-dev.202201121416
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/dist/cdn/js/kendo-angular-inputs.js +2 -2
- package/dist/cdn/main.js +1 -1
- package/dist/es/checkbox/checkbox.directive.js +79 -3
- package/dist/es/colorpicker/color-gradient.component.js +4 -1
- package/dist/es/colorpicker/color-input.component.js +1 -1
- package/dist/es/colorpicker/color-palette.component.js +6 -3
- package/dist/es/colorpicker/colorpicker.component.js +316 -53
- package/dist/es/colorpicker/flatcolorpicker-actions.component.js +1 -1
- package/dist/es/colorpicker/flatcolorpicker-header.component.js +1 -1
- package/dist/es/colorpicker/flatcolorpicker.component.js +7 -4
- package/dist/es/common/models/fillmode.js +4 -0
- package/dist/es/common/models/rounded.js +4 -0
- package/dist/es/common/models/size.js +4 -0
- package/dist/es/common/models/styling-classes.js +4 -0
- package/dist/es/common/models.js +4 -0
- package/dist/es/common/utils.js +37 -0
- package/dist/es/main.js +0 -1
- package/dist/es/maskedtextbox/maskedtextbox.component.js +101 -6
- package/dist/es/numerictextbox/numerictextbox.component.js +116 -20
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/radiobutton/radiobutton.directive.js +55 -3
- package/dist/es/shared/textarea.directive.js +3 -2
- package/dist/es/slider/slider.component.js +1 -1
- package/dist/es/switch/switch.component.js +167 -21
- package/dist/es/text-fields-common/text-fields-base.js +1 -1
- package/dist/es/textarea/textarea.component.js +101 -5
- package/dist/es/textbox/textbox.component.js +108 -11
- package/dist/es/textbox/textbox.directive.js +3 -2
- package/dist/es/textbox.module.js +0 -3
- package/dist/es2015/checkbox/checkbox.directive.d.ts +31 -0
- package/dist/es2015/checkbox/checkbox.directive.js +68 -10
- package/dist/es2015/colorpicker/color-gradient.component.js +4 -1
- package/dist/es2015/colorpicker/color-input.component.js +2 -2
- package/dist/es2015/colorpicker/color-palette.component.d.ts +1 -1
- package/dist/es2015/colorpicker/color-palette.component.js +6 -3
- package/dist/es2015/colorpicker/colorpicker.component.d.ts +67 -9
- package/dist/es2015/colorpicker/colorpicker.component.js +285 -76
- package/dist/es2015/colorpicker/flatcolorpicker-actions.component.js +2 -2
- package/dist/es2015/colorpicker/flatcolorpicker-header.component.js +2 -2
- package/dist/es2015/colorpicker/flatcolorpicker.component.d.ts +2 -2
- package/dist/es2015/colorpicker/flatcolorpicker.component.js +7 -4
- package/dist/es2015/common/models/fillmode.d.ts +13 -0
- package/dist/es2015/common/models/fillmode.js +4 -0
- package/dist/es2015/common/models/rounded.d.ts +23 -0
- package/dist/es2015/common/models/rounded.js +4 -0
- package/dist/es2015/common/models/size.d.ts +14 -0
- package/dist/es2015/common/models/size.js +4 -0
- package/dist/es2015/common/models/styling-classes.d.ts +11 -0
- package/dist/es2015/common/models/styling-classes.js +4 -0
- package/dist/es2015/common/models.d.ts +8 -0
- package/dist/es2015/common/models.js +4 -0
- package/dist/es2015/common/utils.d.ts +7 -0
- package/dist/es2015/common/utils.js +37 -0
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/main.d.ts +1 -1
- package/dist/es2015/main.js +0 -1
- package/dist/es2015/maskedtextbox/maskedtextbox.component.d.ts +39 -1
- package/dist/es2015/maskedtextbox/maskedtextbox.component.js +88 -6
- package/dist/es2015/numerictextbox/numerictextbox.component.d.ts +39 -2
- package/dist/es2015/numerictextbox/numerictextbox.component.js +124 -40
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/es2015/radiobutton/radiobutton.directive.d.ts +18 -0
- package/dist/es2015/radiobutton/radiobutton.directive.js +49 -11
- package/dist/es2015/shared/textarea.directive.d.ts +1 -1
- package/dist/es2015/shared/textarea.directive.js +3 -2
- package/dist/es2015/slider/slider.component.js +18 -23
- package/dist/es2015/switch/switch.component.d.ts +48 -5
- package/dist/es2015/switch/switch.component.js +166 -24
- package/dist/es2015/text-fields-common/text-fields-base.js +1 -1
- package/dist/es2015/textarea/textarea.component.d.ts +39 -1
- package/dist/es2015/textarea/textarea.component.js +89 -5
- package/dist/es2015/textbox/textbox.component.d.ts +40 -1
- package/dist/es2015/textbox/textbox.component.js +114 -30
- package/dist/es2015/textbox/textbox.directive.d.ts +1 -1
- package/dist/es2015/textbox/textbox.directive.js +3 -2
- package/dist/es2015/textbox.module.js +0 -3
- package/dist/fesm2015/index.js +1220 -654
- package/dist/fesm5/index.js +1276 -585
- package/dist/npm/checkbox/checkbox.directive.js +78 -2
- package/dist/npm/colorpicker/color-gradient.component.js +4 -1
- package/dist/npm/colorpicker/color-input.component.js +1 -1
- package/dist/npm/colorpicker/color-palette.component.js +6 -3
- package/dist/npm/colorpicker/colorpicker.component.js +313 -50
- package/dist/npm/colorpicker/flatcolorpicker-actions.component.js +1 -1
- package/dist/npm/colorpicker/flatcolorpicker-header.component.js +1 -1
- package/dist/npm/colorpicker/flatcolorpicker.component.js +7 -4
- package/dist/npm/common/models/fillmode.js +6 -0
- package/dist/npm/common/models/rounded.js +6 -0
- package/dist/npm/common/models/size.js +6 -0
- package/dist/npm/common/models/styling-classes.js +6 -0
- package/dist/npm/common/models.js +6 -0
- package/dist/npm/common/utils.js +37 -0
- package/dist/npm/main.js +0 -2
- package/dist/npm/maskedtextbox/maskedtextbox.component.js +100 -5
- package/dist/npm/numerictextbox/numerictextbox.component.js +115 -19
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/radiobutton/radiobutton.directive.js +54 -2
- package/dist/npm/shared/textarea.directive.js +3 -2
- package/dist/npm/slider/slider.component.js +1 -1
- package/dist/npm/switch/switch.component.js +166 -20
- package/dist/npm/text-fields-common/text-fields-base.js +1 -1
- package/dist/npm/textarea/textarea.component.js +100 -4
- package/dist/npm/textbox/textbox.component.js +107 -10
- package/dist/npm/textbox/textbox.directive.js +3 -2
- package/dist/npm/textbox.module.js +0 -3
- package/dist/systemjs/kendo-angular-inputs.js +1 -1
- package/package.json +12 -12
- package/dist/es/textbox/floating-label-input-adapter.js +0 -58
- package/dist/es/textbox/textbox-container.component.js +0 -224
- package/dist/es2015/textbox/floating-label-input-adapter.d.ts +0 -20
- package/dist/es2015/textbox/floating-label-input-adapter.js +0 -52
- package/dist/es2015/textbox/textbox-container.component.d.ts +0 -59
- package/dist/es2015/textbox/textbox-container.component.js +0 -209
- package/dist/npm/textbox/floating-label-input-adapter.js +0 -60
- package/dist/npm/textbox/textbox-container.component.js +0 -226
|
@@ -3,21 +3,23 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as tslib_1 from "tslib";
|
|
6
|
-
import {
|
|
6
|
+
import { take } from 'rxjs/operators';
|
|
7
|
+
import { Component, HostBinding, Input, Output, EventEmitter, ViewChild, ElementRef, TemplateRef, ViewContainerRef, forwardRef, ChangeDetectorRef, NgZone, Renderer2 } from '@angular/core';
|
|
7
8
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
9
|
+
import { Subscription } from 'rxjs';
|
|
8
10
|
import { FlatColorPickerComponent } from './flatcolorpicker.component';
|
|
9
11
|
import { PopupService } from '@progress/kendo-angular-popup';
|
|
10
12
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
11
|
-
import { Keys, KendoInput } from '@progress/kendo-angular-common';
|
|
13
|
+
import { Keys, KendoInput, isChanged, closest, guid } from '@progress/kendo-angular-common';
|
|
12
14
|
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
13
15
|
import { packageMetadata } from '../package-metadata';
|
|
14
16
|
import { PALETTEPRESETS } from './models';
|
|
15
17
|
import { ActiveColorClickEvent, ColorPickerCloseEvent, ColorPickerOpenEvent } from './events';
|
|
16
18
|
import { parseColor } from './utils';
|
|
17
|
-
import { isPresent } from '../common/utils';
|
|
19
|
+
import { getStylingClasses, isPresent } from '../common/utils';
|
|
18
20
|
import { ColorPickerLocalizationService } from './localization/colorpicker-localization.service';
|
|
19
21
|
import { DEFAULT_ACCESSIBLE_PRESET, DEFAULT_PRESET } from './constants';
|
|
20
|
-
var
|
|
22
|
+
var DOM_FOCUS_EVENTS = ['focus', 'blur'];
|
|
21
23
|
/**
|
|
22
24
|
* Represents the [Kendo UI ColorPicker component for Angular]({% slug overview_colorpicker %}).
|
|
23
25
|
*
|
|
@@ -25,17 +27,16 @@ var serial = 0;
|
|
|
25
27
|
* which are rendered in its popup. It supports previewing the selected color, reverting it to its previous state or clearing it completely.
|
|
26
28
|
*/
|
|
27
29
|
var ColorPickerComponent = /** @class */ (function () {
|
|
28
|
-
function ColorPickerComponent(popupService, cdr, localizationService, ngZone) {
|
|
30
|
+
function ColorPickerComponent(host, popupService, cdr, localizationService, ngZone, renderer) {
|
|
29
31
|
var _this = this;
|
|
32
|
+
this.host = host;
|
|
30
33
|
this.popupService = popupService;
|
|
31
34
|
this.cdr = cdr;
|
|
32
35
|
this.localizationService = localizationService;
|
|
33
36
|
this.ngZone = ngZone;
|
|
37
|
+
this.renderer = renderer;
|
|
34
38
|
this.hostClasses = true;
|
|
35
|
-
|
|
36
|
-
* @hidden
|
|
37
|
-
*/
|
|
38
|
-
this.focusableId = "k-colorpicker-" + serial++;
|
|
39
|
+
this.role = 'listbox';
|
|
39
40
|
/**
|
|
40
41
|
* Specifies the views that will be rendered in the popup.
|
|
41
42
|
* By default both the gradient and palette views will be rendered.
|
|
@@ -131,12 +132,21 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
131
132
|
* Used to provide a two-way binding for the `activeView` property.
|
|
132
133
|
*/
|
|
133
134
|
this.activeViewChange = new EventEmitter();
|
|
135
|
+
/**
|
|
136
|
+
* Indicates whether the ColorPicker wrapper is focused.
|
|
137
|
+
*/
|
|
138
|
+
this.isFocused = false;
|
|
134
139
|
this._tabindex = 0;
|
|
135
140
|
this._popupSettings = { animate: true };
|
|
136
141
|
this._paletteSettings = {};
|
|
137
142
|
this._gradientSettings = { opacity: true, delay: 0 };
|
|
143
|
+
this._size = 'medium';
|
|
144
|
+
this._rounded = 'medium';
|
|
145
|
+
this._fillMode = 'solid';
|
|
146
|
+
this.subscriptions = new Subscription();
|
|
138
147
|
this.notifyNgTouched = function () { };
|
|
139
148
|
this.notifyNgChanged = function () { };
|
|
149
|
+
this.domFocusListener = function (event) { return event.stopImmediatePropagation(); };
|
|
140
150
|
validatePackage(packageMetadata);
|
|
141
151
|
this.dynamicRTLSubscription = this.localizationService.changes.subscribe(function (_a) {
|
|
142
152
|
var rtl = _a.rtl;
|
|
@@ -144,6 +154,54 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
144
154
|
});
|
|
145
155
|
}
|
|
146
156
|
ColorPickerComponent_1 = ColorPickerComponent;
|
|
157
|
+
Object.defineProperty(ColorPickerComponent.prototype, "focusedClass", {
|
|
158
|
+
get: function () {
|
|
159
|
+
return this.isFocused;
|
|
160
|
+
},
|
|
161
|
+
enumerable: true,
|
|
162
|
+
configurable: true
|
|
163
|
+
});
|
|
164
|
+
Object.defineProperty(ColorPickerComponent.prototype, "disabledClass", {
|
|
165
|
+
get: function () {
|
|
166
|
+
return this.disabled;
|
|
167
|
+
},
|
|
168
|
+
enumerable: true,
|
|
169
|
+
configurable: true
|
|
170
|
+
});
|
|
171
|
+
Object.defineProperty(ColorPickerComponent.prototype, "ariaReadonly", {
|
|
172
|
+
get: function () {
|
|
173
|
+
return this.readonly;
|
|
174
|
+
},
|
|
175
|
+
enumerable: true,
|
|
176
|
+
configurable: true
|
|
177
|
+
});
|
|
178
|
+
Object.defineProperty(ColorPickerComponent.prototype, "ariaExpanded", {
|
|
179
|
+
get: function () {
|
|
180
|
+
return this.isOpen;
|
|
181
|
+
},
|
|
182
|
+
enumerable: true,
|
|
183
|
+
configurable: true
|
|
184
|
+
});
|
|
185
|
+
Object.defineProperty(ColorPickerComponent.prototype, "hostTabindex", {
|
|
186
|
+
get: function () {
|
|
187
|
+
return this.tabindex;
|
|
188
|
+
},
|
|
189
|
+
enumerable: true,
|
|
190
|
+
configurable: true
|
|
191
|
+
});
|
|
192
|
+
Object.defineProperty(ColorPickerComponent.prototype, "view", {
|
|
193
|
+
get: function () {
|
|
194
|
+
return (this.views && this.views.length > 0) ? this.views[0] : null;
|
|
195
|
+
},
|
|
196
|
+
/**
|
|
197
|
+
* @hidden
|
|
198
|
+
*/
|
|
199
|
+
set: function (view) {
|
|
200
|
+
this.views = [view];
|
|
201
|
+
},
|
|
202
|
+
enumerable: true,
|
|
203
|
+
configurable: true
|
|
204
|
+
});
|
|
147
205
|
Object.defineProperty(ColorPickerComponent.prototype, "value", {
|
|
148
206
|
get: function () {
|
|
149
207
|
return this._value;
|
|
@@ -213,6 +271,70 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
213
271
|
enumerable: true,
|
|
214
272
|
configurable: true
|
|
215
273
|
});
|
|
274
|
+
Object.defineProperty(ColorPickerComponent.prototype, "size", {
|
|
275
|
+
get: function () {
|
|
276
|
+
return this._size;
|
|
277
|
+
},
|
|
278
|
+
/**
|
|
279
|
+
* The size property specifies the font size and line height of the ColorPicker
|
|
280
|
+
* ([see example]({% slug appearance_colorpicker %}#toc-size)).
|
|
281
|
+
*
|
|
282
|
+
* The possible values are:
|
|
283
|
+
* * `'small'`
|
|
284
|
+
* * `'medium'` (default)
|
|
285
|
+
* * `'large'`
|
|
286
|
+
* * `null`
|
|
287
|
+
*/
|
|
288
|
+
set: function (size) {
|
|
289
|
+
this.handleClasses(size, 'size');
|
|
290
|
+
this._size = size;
|
|
291
|
+
},
|
|
292
|
+
enumerable: true,
|
|
293
|
+
configurable: true
|
|
294
|
+
});
|
|
295
|
+
Object.defineProperty(ColorPickerComponent.prototype, "rounded", {
|
|
296
|
+
get: function () {
|
|
297
|
+
return this._rounded;
|
|
298
|
+
},
|
|
299
|
+
/**
|
|
300
|
+
* The rounded property specifies the border radius of the ColorPicker
|
|
301
|
+
* ([see example]({% slug appearance_colorpicker %}#toc-rounded)).
|
|
302
|
+
*
|
|
303
|
+
* The possible values are:
|
|
304
|
+
* * `'small'`
|
|
305
|
+
* * `'medium'` (default)
|
|
306
|
+
* * `'large'`
|
|
307
|
+
* * `'full'`
|
|
308
|
+
* * `null`
|
|
309
|
+
*/
|
|
310
|
+
set: function (rounded) {
|
|
311
|
+
this.handleClasses(rounded, 'rounded');
|
|
312
|
+
this._rounded = rounded;
|
|
313
|
+
},
|
|
314
|
+
enumerable: true,
|
|
315
|
+
configurable: true
|
|
316
|
+
});
|
|
317
|
+
Object.defineProperty(ColorPickerComponent.prototype, "fillMode", {
|
|
318
|
+
get: function () {
|
|
319
|
+
return this._fillMode;
|
|
320
|
+
},
|
|
321
|
+
/**
|
|
322
|
+
* The fillMode property specifies the background and border styles of the ColorPicker
|
|
323
|
+
* ([see example]({% slug appearance_colorpicker %}#toc-fillMode)).
|
|
324
|
+
*
|
|
325
|
+
* The possible values are:
|
|
326
|
+
* * `'flat'`
|
|
327
|
+
* * `'solid'` (default)
|
|
328
|
+
* * `'outline'`
|
|
329
|
+
* * `null`
|
|
330
|
+
*/
|
|
331
|
+
set: function (fillMode) {
|
|
332
|
+
this.handleClasses(fillMode, 'fillMode');
|
|
333
|
+
this._fillMode = fillMode;
|
|
334
|
+
},
|
|
335
|
+
enumerable: true,
|
|
336
|
+
configurable: true
|
|
337
|
+
});
|
|
216
338
|
Object.defineProperty(ColorPickerComponent.prototype, "isOpen", {
|
|
217
339
|
/**
|
|
218
340
|
* Indicates whether the ColorPicker popup is open.
|
|
@@ -250,6 +372,16 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
250
372
|
columns: this._paletteSettings.columns || presetColumns || 10
|
|
251
373
|
};
|
|
252
374
|
};
|
|
375
|
+
ColorPickerComponent.prototype.ngAfterViewInit = function () {
|
|
376
|
+
var _this = this;
|
|
377
|
+
var stylingInputs = ['size', 'rounded', 'fillMode'];
|
|
378
|
+
stylingInputs.forEach(function (input) {
|
|
379
|
+
_this.handleClasses(_this[input], input);
|
|
380
|
+
});
|
|
381
|
+
this.setHostElementAriaLabel();
|
|
382
|
+
this.handleHostId();
|
|
383
|
+
this.initDomEvents();
|
|
384
|
+
};
|
|
253
385
|
ColorPickerComponent.prototype.ngOnChanges = function (changes) {
|
|
254
386
|
if (changes.format && changes.format.currentValue === 'name') {
|
|
255
387
|
this.activeView = 'palette';
|
|
@@ -258,23 +390,18 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
258
390
|
this.format = 'rgba';
|
|
259
391
|
this.value = parseColor(this.value, this.format, this.gradientSettings.opacity);
|
|
260
392
|
}
|
|
393
|
+
if (isChanged('value', changes)) {
|
|
394
|
+
this.setHostElementAriaLabel();
|
|
395
|
+
}
|
|
261
396
|
};
|
|
262
397
|
ColorPickerComponent.prototype.ngOnDestroy = function () {
|
|
263
398
|
this.closePopup();
|
|
264
399
|
if (this.dynamicRTLSubscription) {
|
|
265
400
|
this.dynamicRTLSubscription.unsubscribe();
|
|
266
401
|
}
|
|
402
|
+
this.subscriptions.unsubscribe();
|
|
403
|
+
this.handleDomEvents('remove', DOM_FOCUS_EVENTS);
|
|
267
404
|
};
|
|
268
|
-
Object.defineProperty(ColorPickerComponent.prototype, "colorPickerAriaLabel", {
|
|
269
|
-
/**
|
|
270
|
-
* @hidden
|
|
271
|
-
*/
|
|
272
|
-
get: function () {
|
|
273
|
-
return this.value ? this.value : this.localizationService.get('colorPickerNoColor');
|
|
274
|
-
},
|
|
275
|
-
enumerable: true,
|
|
276
|
-
configurable: true
|
|
277
|
-
});
|
|
278
405
|
/**
|
|
279
406
|
* @hidden
|
|
280
407
|
*/
|
|
@@ -285,55 +412,74 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
285
412
|
* @hidden
|
|
286
413
|
*/
|
|
287
414
|
ColorPickerComponent.prototype.togglePopup = function () {
|
|
288
|
-
this.toggleWithEvents(!this.isOpen);
|
|
289
415
|
this.focus();
|
|
416
|
+
this.toggleWithEvents(!this.isOpen);
|
|
290
417
|
};
|
|
291
418
|
/**
|
|
292
419
|
* @hidden
|
|
293
420
|
*/
|
|
294
|
-
ColorPickerComponent.prototype.
|
|
421
|
+
ColorPickerComponent.prototype.handleWrapperClick = function (event) {
|
|
422
|
+
var _this = this;
|
|
423
|
+
if (this.disabled) {
|
|
424
|
+
return;
|
|
425
|
+
}
|
|
295
426
|
this.focus();
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
427
|
+
if (closest(event.target, function (element) { return element === _this.activeColor.nativeElement; })) {
|
|
428
|
+
var event_1 = new ActiveColorClickEvent(this.value);
|
|
429
|
+
this.activeColorClick.emit(event_1);
|
|
430
|
+
if (!event_1.isOpenPrevented() || this.isOpen) {
|
|
431
|
+
this.toggleWithEvents(!this.isOpen);
|
|
432
|
+
}
|
|
433
|
+
return;
|
|
300
434
|
}
|
|
435
|
+
this.toggleWithEvents(!this.isOpen);
|
|
301
436
|
};
|
|
302
437
|
/**
|
|
303
438
|
* Focuses the wrapper of the ColorPicker.
|
|
304
439
|
*/
|
|
305
440
|
ColorPickerComponent.prototype.focus = function () {
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
}
|
|
309
|
-
this.wrapper.nativeElement.focus();
|
|
441
|
+
this.isFocused = true;
|
|
442
|
+
this.host.nativeElement.focus();
|
|
310
443
|
};
|
|
311
444
|
/**
|
|
312
445
|
* @hidden
|
|
313
446
|
*/
|
|
314
447
|
ColorPickerComponent.prototype.handleWrapperFocus = function () {
|
|
448
|
+
var _this = this;
|
|
315
449
|
if (this.isFocused) {
|
|
316
450
|
return;
|
|
317
451
|
}
|
|
318
|
-
this.
|
|
319
|
-
|
|
452
|
+
this.ngZone.run(function () {
|
|
453
|
+
_this.focus();
|
|
454
|
+
_this.onFocus.emit();
|
|
455
|
+
});
|
|
320
456
|
};
|
|
321
457
|
/**
|
|
322
458
|
* Blurs the ColorPicker.
|
|
323
459
|
*/
|
|
324
460
|
ColorPickerComponent.prototype.blur = function () {
|
|
325
|
-
this.
|
|
461
|
+
this.isFocused = false;
|
|
462
|
+
this.host.nativeElement.blur();
|
|
463
|
+
this.notifyNgTouched();
|
|
326
464
|
};
|
|
327
465
|
/**
|
|
328
466
|
* @hidden
|
|
329
467
|
*/
|
|
330
468
|
ColorPickerComponent.prototype.handleWrapperBlur = function () {
|
|
469
|
+
var _this = this;
|
|
331
470
|
if (this.isOpen) {
|
|
332
471
|
return;
|
|
333
472
|
}
|
|
334
|
-
this.
|
|
335
|
-
|
|
336
|
-
|
|
473
|
+
this.ngZone.run(function () {
|
|
474
|
+
_this.onBlur.emit();
|
|
475
|
+
_this.isFocused = false;
|
|
476
|
+
});
|
|
477
|
+
};
|
|
478
|
+
/**
|
|
479
|
+
* @hidden
|
|
480
|
+
*/
|
|
481
|
+
ColorPickerComponent.prototype.arrowButtonMouseDown = function (ev) {
|
|
482
|
+
ev.preventDefault();
|
|
337
483
|
};
|
|
338
484
|
/**
|
|
339
485
|
* Clears the value of the ColorPicker.
|
|
@@ -343,6 +489,7 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
343
489
|
return;
|
|
344
490
|
}
|
|
345
491
|
this._value = undefined;
|
|
492
|
+
this.setHostElementAriaLabel();
|
|
346
493
|
this.notifyNgChanged(undefined);
|
|
347
494
|
};
|
|
348
495
|
/**
|
|
@@ -370,6 +517,7 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
370
517
|
if (valueChange) {
|
|
371
518
|
this.value = parsedColor;
|
|
372
519
|
this.valueChange.emit(parsedColor);
|
|
520
|
+
this.setHostElementAriaLabel();
|
|
373
521
|
this.notifyNgChanged(parsedColor);
|
|
374
522
|
}
|
|
375
523
|
};
|
|
@@ -414,9 +562,12 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
414
562
|
* @hidden
|
|
415
563
|
*/
|
|
416
564
|
ColorPickerComponent.prototype.handleWrapperKeyDown = function (event) {
|
|
565
|
+
var _this = this;
|
|
417
566
|
if (event.keyCode === Keys.ArrowDown || event.keyCode === Keys.Enter) {
|
|
418
567
|
event.preventDefault();
|
|
419
|
-
this.
|
|
568
|
+
this.ngZone.run(function () {
|
|
569
|
+
_this.toggleWithEvents(true);
|
|
570
|
+
});
|
|
420
571
|
}
|
|
421
572
|
};
|
|
422
573
|
/**
|
|
@@ -425,14 +576,14 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
425
576
|
ColorPickerComponent.prototype.handlePopupKeyDown = function (event) {
|
|
426
577
|
if (event.keyCode === Keys.Escape) {
|
|
427
578
|
this.toggleWithEvents(false);
|
|
428
|
-
this.
|
|
579
|
+
this.host.nativeElement.focus();
|
|
429
580
|
}
|
|
430
581
|
if (event.keyCode === Keys.Tab) {
|
|
431
582
|
var currentElement = event.shiftKey ? this.firstFocusableElement.nativeElement : this.lastFocusableElement.nativeElement;
|
|
432
583
|
var nextElement = event.shiftKey ? this.lastFocusableElement.nativeElement : this.firstFocusableElement.nativeElement;
|
|
433
584
|
if (event.target === currentElement) {
|
|
434
585
|
event.preventDefault();
|
|
435
|
-
nextElement.
|
|
586
|
+
nextElement.focus();
|
|
436
587
|
}
|
|
437
588
|
}
|
|
438
589
|
};
|
|
@@ -443,10 +594,25 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
443
594
|
ColorPickerComponent.prototype.isEmpty = function () {
|
|
444
595
|
return false;
|
|
445
596
|
};
|
|
597
|
+
ColorPickerComponent.prototype.setHostElementAriaLabel = function () {
|
|
598
|
+
var ariaLabelValue = "" + (this.value ? this.value : this.localizationService.get('colorPickerNoColor'));
|
|
599
|
+
this.renderer.setAttribute(this.host.nativeElement, 'aria-label', ariaLabelValue);
|
|
600
|
+
};
|
|
601
|
+
ColorPickerComponent.prototype.handleClasses = function (value, input) {
|
|
602
|
+
var elem = this.host.nativeElement;
|
|
603
|
+
var classes = getStylingClasses('picker', input, this[input], value);
|
|
604
|
+
if (classes.toRemove) {
|
|
605
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
606
|
+
}
|
|
607
|
+
if (classes.toAdd) {
|
|
608
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
609
|
+
}
|
|
610
|
+
};
|
|
446
611
|
ColorPickerComponent.prototype.popupBlurInvalid = function (ev) {
|
|
447
|
-
var
|
|
448
|
-
var
|
|
449
|
-
|
|
612
|
+
var _this = this;
|
|
613
|
+
var focusInFlatColorPickerElement = this.popupRef.popupElement.contains(ev.relatedTarget);
|
|
614
|
+
var hostClicked = closest(ev.relatedTarget, function (element) { return element === _this.host.nativeElement; });
|
|
615
|
+
return hostClicked || focusInFlatColorPickerElement;
|
|
450
616
|
};
|
|
451
617
|
ColorPickerComponent.prototype.toggleWithEvents = function (open) {
|
|
452
618
|
var sameState = this.isOpen === open;
|
|
@@ -471,12 +637,12 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
471
637
|
};
|
|
472
638
|
ColorPickerComponent.prototype.focusFirstElement = function () {
|
|
473
639
|
var _this = this;
|
|
474
|
-
this.ngZone.
|
|
475
|
-
|
|
640
|
+
this.ngZone.onStable.pipe(take(1)).subscribe(function () {
|
|
641
|
+
if (_this.flatColorPicker) {
|
|
476
642
|
var elementToFocus = _this.flatColorPicker.gradient ? _this.flatColorPicker.gradient.gradientDragHandle :
|
|
477
643
|
_this.flatColorPicker.palette.host;
|
|
478
644
|
elementToFocus.nativeElement.focus();
|
|
479
|
-
}
|
|
645
|
+
}
|
|
480
646
|
});
|
|
481
647
|
};
|
|
482
648
|
ColorPickerComponent.prototype.openPopup = function () {
|
|
@@ -485,7 +651,7 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
485
651
|
var anchorPosition = { horizontal: horizontalAlign, vertical: "bottom" };
|
|
486
652
|
var popupPosition = { horizontal: horizontalAlign, vertical: "top" };
|
|
487
653
|
this.popupRef = this.popupService.open({
|
|
488
|
-
anchor: this.
|
|
654
|
+
anchor: this.activeColor,
|
|
489
655
|
animate: this.popupSettings.animate,
|
|
490
656
|
appendTo: this.popupSettings.appendTo,
|
|
491
657
|
popupAlign: popupPosition,
|
|
@@ -497,7 +663,7 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
497
663
|
this.popupRef.popupAnchorViewportLeave.subscribe(function () {
|
|
498
664
|
_this.toggleWithEvents(false);
|
|
499
665
|
if (!_this.isOpen) {
|
|
500
|
-
_this.
|
|
666
|
+
_this.host.nativeElement.focus({
|
|
501
667
|
preventScroll: true
|
|
502
668
|
});
|
|
503
669
|
}
|
|
@@ -533,23 +699,103 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
533
699
|
enumerable: true,
|
|
534
700
|
configurable: true
|
|
535
701
|
});
|
|
702
|
+
ColorPickerComponent.prototype.handleDomEvents = function (action, events) {
|
|
703
|
+
var _this = this;
|
|
704
|
+
var hostElement = this.host.nativeElement;
|
|
705
|
+
events.forEach(function (ev) { return hostElement[action + "EventListener"](ev, _this.domFocusListener, true); });
|
|
706
|
+
};
|
|
707
|
+
ColorPickerComponent.prototype.initDomEvents = function () {
|
|
708
|
+
var _this = this;
|
|
709
|
+
if (!this.host) {
|
|
710
|
+
return;
|
|
711
|
+
}
|
|
712
|
+
var hostElement = this.host.nativeElement;
|
|
713
|
+
this.ngZone.runOutsideAngular(function () {
|
|
714
|
+
_this.subscriptions.add(_this.renderer.listen(hostElement, 'focusin', function () {
|
|
715
|
+
_this.handleWrapperFocus();
|
|
716
|
+
}));
|
|
717
|
+
_this.subscriptions.add(_this.renderer.listen(hostElement, 'focusout', function (event) {
|
|
718
|
+
var closestPopup = _this.popupRef ?
|
|
719
|
+
closest(event.relatedTarget, function (element) { return element === _this.flatColorPicker.host.nativeElement; }) :
|
|
720
|
+
false;
|
|
721
|
+
var closestWrapper = closest(event.relatedTarget, function (element) { return element === _this.host.nativeElement; });
|
|
722
|
+
if (!closestPopup && !closestWrapper) {
|
|
723
|
+
_this.handleWrapperBlur();
|
|
724
|
+
}
|
|
725
|
+
}));
|
|
726
|
+
_this.handleDomEvents('add', DOM_FOCUS_EVENTS);
|
|
727
|
+
_this.subscriptions.add(_this.renderer.listen(hostElement, 'keydown', function (event) {
|
|
728
|
+
_this.handleWrapperKeyDown(event);
|
|
729
|
+
}));
|
|
730
|
+
_this.subscriptions.add(_this.renderer.listen(hostElement, 'click', function (event) {
|
|
731
|
+
_this.ngZone.run(function () {
|
|
732
|
+
_this.handleWrapperClick(event);
|
|
733
|
+
});
|
|
734
|
+
}));
|
|
735
|
+
});
|
|
736
|
+
};
|
|
737
|
+
ColorPickerComponent.prototype.handleHostId = function () {
|
|
738
|
+
var hostElement = this.host.nativeElement;
|
|
739
|
+
var existingId = hostElement.getAttribute('id');
|
|
740
|
+
if (existingId) {
|
|
741
|
+
this.focusableId = existingId;
|
|
742
|
+
}
|
|
743
|
+
else {
|
|
744
|
+
var id = "k-" + guid();
|
|
745
|
+
hostElement.setAttribute('id', id);
|
|
746
|
+
this.focusableId = id;
|
|
747
|
+
}
|
|
748
|
+
};
|
|
536
749
|
var ColorPickerComponent_1;
|
|
537
750
|
tslib_1.__decorate([
|
|
538
751
|
HostBinding('class.k-colorpicker'),
|
|
752
|
+
HostBinding('class.k-icon-picker'),
|
|
753
|
+
HostBinding('class.k-picker'),
|
|
539
754
|
tslib_1.__metadata("design:type", Boolean)
|
|
540
755
|
], ColorPickerComponent.prototype, "hostClasses", void 0);
|
|
756
|
+
tslib_1.__decorate([
|
|
757
|
+
HostBinding('class.k-focus'),
|
|
758
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
759
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
760
|
+
], ColorPickerComponent.prototype, "focusedClass", null);
|
|
761
|
+
tslib_1.__decorate([
|
|
762
|
+
HostBinding('attr.aria-disabled'),
|
|
763
|
+
HostBinding('class.k-disabled'),
|
|
764
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
765
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
766
|
+
], ColorPickerComponent.prototype, "disabledClass", null);
|
|
767
|
+
tslib_1.__decorate([
|
|
768
|
+
HostBinding('attr.aria-readonly'),
|
|
769
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
770
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
771
|
+
], ColorPickerComponent.prototype, "ariaReadonly", null);
|
|
772
|
+
tslib_1.__decorate([
|
|
773
|
+
HostBinding('attr.aria-expanded'),
|
|
774
|
+
tslib_1.__metadata("design:type", Boolean),
|
|
775
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
776
|
+
], ColorPickerComponent.prototype, "ariaExpanded", null);
|
|
777
|
+
tslib_1.__decorate([
|
|
778
|
+
HostBinding('attr.tabindex'),
|
|
779
|
+
tslib_1.__metadata("design:type", Number),
|
|
780
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
781
|
+
], ColorPickerComponent.prototype, "hostTabindex", null);
|
|
541
782
|
tslib_1.__decorate([
|
|
542
783
|
HostBinding('attr.dir'),
|
|
543
784
|
tslib_1.__metadata("design:type", String)
|
|
544
785
|
], ColorPickerComponent.prototype, "direction", void 0);
|
|
545
786
|
tslib_1.__decorate([
|
|
546
|
-
|
|
787
|
+
HostBinding('attr.role'),
|
|
547
788
|
tslib_1.__metadata("design:type", String)
|
|
548
|
-
], ColorPickerComponent.prototype, "
|
|
789
|
+
], ColorPickerComponent.prototype, "role", void 0);
|
|
549
790
|
tslib_1.__decorate([
|
|
550
791
|
Input(),
|
|
551
792
|
tslib_1.__metadata("design:type", Array)
|
|
552
793
|
], ColorPickerComponent.prototype, "views", void 0);
|
|
794
|
+
tslib_1.__decorate([
|
|
795
|
+
Input(),
|
|
796
|
+
tslib_1.__metadata("design:type", String),
|
|
797
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
798
|
+
], ColorPickerComponent.prototype, "view", null);
|
|
553
799
|
tslib_1.__decorate([
|
|
554
800
|
Input(),
|
|
555
801
|
tslib_1.__metadata("design:type", String)
|
|
@@ -611,6 +857,21 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
611
857
|
Input(),
|
|
612
858
|
tslib_1.__metadata("design:type", String)
|
|
613
859
|
], ColorPickerComponent.prototype, "actionsLayout", void 0);
|
|
860
|
+
tslib_1.__decorate([
|
|
861
|
+
Input(),
|
|
862
|
+
tslib_1.__metadata("design:type", String),
|
|
863
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
864
|
+
], ColorPickerComponent.prototype, "size", null);
|
|
865
|
+
tslib_1.__decorate([
|
|
866
|
+
Input(),
|
|
867
|
+
tslib_1.__metadata("design:type", String),
|
|
868
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
869
|
+
], ColorPickerComponent.prototype, "rounded", null);
|
|
870
|
+
tslib_1.__decorate([
|
|
871
|
+
Input(),
|
|
872
|
+
tslib_1.__metadata("design:type", String),
|
|
873
|
+
tslib_1.__metadata("design:paramtypes", [String])
|
|
874
|
+
], ColorPickerComponent.prototype, "fillMode", null);
|
|
614
875
|
tslib_1.__decorate([
|
|
615
876
|
Output(),
|
|
616
877
|
tslib_1.__metadata("design:type", EventEmitter)
|
|
@@ -648,9 +909,9 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
648
909
|
tslib_1.__metadata("design:type", ViewContainerRef)
|
|
649
910
|
], ColorPickerComponent.prototype, "container", void 0);
|
|
650
911
|
tslib_1.__decorate([
|
|
651
|
-
ViewChild('
|
|
912
|
+
ViewChild('activeColor', { static: true }),
|
|
652
913
|
tslib_1.__metadata("design:type", ElementRef)
|
|
653
|
-
], ColorPickerComponent.prototype, "
|
|
914
|
+
], ColorPickerComponent.prototype, "activeColor", void 0);
|
|
654
915
|
tslib_1.__decorate([
|
|
655
916
|
ViewChild('popupTemplate', { static: true }),
|
|
656
917
|
tslib_1.__metadata("design:type", TemplateRef)
|
|
@@ -681,12 +942,14 @@ var ColorPickerComponent = /** @class */ (function () {
|
|
|
681
942
|
useValue: 'kendo.colorpicker'
|
|
682
943
|
}
|
|
683
944
|
],
|
|
684
|
-
template: "\n <ng-container kendoColorPickerLocalizedMessages\n i18n-colorPickerNoColor=\"kendo.colorpicker.colorPickerNoColor|The aria-label applied to the ColorPicker component when the value is empty.\"\n colorPickerNoColor=\"Colorpicker no color chosen\"\n i18n-flatColorPickerNoColor=\"kendo.colorpicker.flatColorPickerNoColor|The aria-label applied to the FlatColorPicker component when the value is empty.\"\n flatColorPickerNoColor=\"Flatcolorpicker no color chosen\"\n i18n-colorGradientNoColor=\"kendo.colorpicker.colorGradientNoColor|The aria-label applied to the ColorGradient component when the value is empty.\"\n colorGradientNoColor=\"Colorgradient no color chosen\"\n i18n-colorPaletteNoColor=\"kendo.colorpicker.colorPaletteNoColor|The aria-label applied to the ColorPalette component when the value is empty.\"\n colorPaletteNoColor=\"Colorpalette no color chosen\"\n i18n-colorGradientHandle=\"kendo.colorpicker.colorGradientHandle|The title for the gradient color drag handle chooser.\"\n colorGradientHandle=\"Choose color\"\n i18n-clearButton=\"kendo.colorpicker.clearButton|The title for the clear button.\"\n clearButton=\"Clear value\"\n i18n-hueSliderHandle=\"kendo.colorpicker.hueSliderHandle|The title for the hue slider handle.\"\n hueSliderHandle=\"Set hue\"\n i18n-opacitySliderHandle=\"kendo.colorpicker.opacitySliderHandle|The title for the opacity slider handle.\"\n opacitySliderHandle=\"Set opacity\"\n i18n-contrastRatio=\"kendo.colorpicker.contrastRatio|The contrast ratio message for the contrast tool.\"\n contrastRatio=\"Contrast ratio\"\n i18n-previewColor=\"kendo.colorpicker.previewColor|The message for the color preview pane.\"\n previewColor=\"Color preview\"\n i18n-revertSelection=\"kendo.colorpicker.revertSelection|The message for the selected color pane.\"\n revertSelection=\"Revert selection\"\n i18n-gradientView=\"kendo.colorpicker.gradientView|The message for the gradient view button.\"\n gradientView=\"Gradient view\"\n i18n-paletteView=\"kendo.colorpicker.paletteView|The message for the palette view button.\"\n paletteView=\"Palette view\"\n i18n-formatButton=\"kendo.colorpicker.formatButton|The message for the input format toggle button.\"\n formatButton=\"Change color format\"\n i18n-applyButton=\"kendo.colorpicker.applyButton|The message for the Apply action button.\"\n applyButton=\"Apply\"\n i18n-cancelButton=\"kendo.colorpicker.cancelButton|The message for the Cancel action button.\"\n cancelButton=\"Cancel\">\n </ng-container>\n <span
|
|
945
|
+
template: "\n <ng-container kendoColorPickerLocalizedMessages\n i18n-colorPickerNoColor=\"kendo.colorpicker.colorPickerNoColor|The aria-label applied to the ColorPicker component when the value is empty.\"\n colorPickerNoColor=\"Colorpicker no color chosen\"\n i18n-flatColorPickerNoColor=\"kendo.colorpicker.flatColorPickerNoColor|The aria-label applied to the FlatColorPicker component when the value is empty.\"\n flatColorPickerNoColor=\"Flatcolorpicker no color chosen\"\n i18n-colorGradientNoColor=\"kendo.colorpicker.colorGradientNoColor|The aria-label applied to the ColorGradient component when the value is empty.\"\n colorGradientNoColor=\"Colorgradient no color chosen\"\n i18n-colorPaletteNoColor=\"kendo.colorpicker.colorPaletteNoColor|The aria-label applied to the ColorPalette component when the value is empty.\"\n colorPaletteNoColor=\"Colorpalette no color chosen\"\n i18n-colorGradientHandle=\"kendo.colorpicker.colorGradientHandle|The title for the gradient color drag handle chooser.\"\n colorGradientHandle=\"Choose color\"\n i18n-clearButton=\"kendo.colorpicker.clearButton|The title for the clear button.\"\n clearButton=\"Clear value\"\n i18n-hueSliderHandle=\"kendo.colorpicker.hueSliderHandle|The title for the hue slider handle.\"\n hueSliderHandle=\"Set hue\"\n i18n-opacitySliderHandle=\"kendo.colorpicker.opacitySliderHandle|The title for the opacity slider handle.\"\n opacitySliderHandle=\"Set opacity\"\n i18n-contrastRatio=\"kendo.colorpicker.contrastRatio|The contrast ratio message for the contrast tool.\"\n contrastRatio=\"Contrast ratio\"\n i18n-previewColor=\"kendo.colorpicker.previewColor|The message for the color preview pane.\"\n previewColor=\"Color preview\"\n i18n-revertSelection=\"kendo.colorpicker.revertSelection|The message for the selected color pane.\"\n revertSelection=\"Revert selection\"\n i18n-gradientView=\"kendo.colorpicker.gradientView|The message for the gradient view button.\"\n gradientView=\"Gradient view\"\n i18n-paletteView=\"kendo.colorpicker.paletteView|The message for the palette view button.\"\n paletteView=\"Palette view\"\n i18n-formatButton=\"kendo.colorpicker.formatButton|The message for the input format toggle button.\"\n formatButton=\"Change color format\"\n i18n-applyButton=\"kendo.colorpicker.applyButton|The message for the Apply action button.\"\n applyButton=\"Apply\"\n i18n-cancelButton=\"kendo.colorpicker.cancelButton|The message for the Cancel action button.\"\n cancelButton=\"Cancel\">\n </ng-container>\n <span #activeColor class=\"k-input-inner\">\n <span\n class=\"k-value-icon k-color-preview\"\n [ngClass]=\"{'k-icon-color-preview': iconStyles, 'k-no-color': !value}\">\n <span *ngIf=\"iconClass || icon\" class=\"k-color-preview-icon k-icon\" [ngClass]=\"iconStyles\"></span>\n <span class=\"k-color-preview-mask\" [style.background-color]=\"value\"></span>\n </span>\n </span>\n <button\n #arrowButton\n tabindex=\"-1\"\n role=\"button\"\n class=\"k-input-button k-button k-button-md k-button-solid k-button-solid-base k-icon-button\">\n <span class=\"k-button-icon k-icon k-i-arrow-s\"></span>\n </button>\n <ng-template #popupTemplate>\n <kendo-flatcolorpicker\n #flatColorPicker\n [value]=\"value\"\n [format]=\"format\"\n [views]=\"views\"\n [activeView]=\"activeView\"\n [actionsLayout]=\"actionsLayout\"\n [preview]=\"preview\"\n [gradientSettings]=\"gradientSettings\"\n [paletteSettings]=\"paletteSettings\"\n [clearButton]=\"clearButton\"\n (cancel)=\"handleCancelEvent($event)\"\n (focusout)=\"handlePopupBlur($event)\"\n (valueChange)=\"handleValueChange($event)\"\n (keydown)=\"handlePopupKeyDown($event)\"\n (activeViewChange)=\"activeViewChange.emit($event)\"\n (actionButtonClick)=\"togglePopup()\">\n </kendo-flatcolorpicker>\n </ng-template>\n <ng-container #container></ng-container>\n "
|
|
685
946
|
}),
|
|
686
|
-
tslib_1.__metadata("design:paramtypes", [
|
|
947
|
+
tslib_1.__metadata("design:paramtypes", [ElementRef,
|
|
948
|
+
PopupService,
|
|
687
949
|
ChangeDetectorRef,
|
|
688
950
|
LocalizationService,
|
|
689
|
-
NgZone
|
|
951
|
+
NgZone,
|
|
952
|
+
Renderer2])
|
|
690
953
|
], ColorPickerComponent);
|
|
691
954
|
return ColorPickerComponent;
|
|
692
955
|
}());
|
|
@@ -41,7 +41,7 @@ var FlatColorPickerActionButtonsComponent = /** @class */ (function () {
|
|
|
41
41
|
FlatColorPickerActionButtonsComponent = tslib_1.__decorate([
|
|
42
42
|
Component({
|
|
43
43
|
selector: '[kendoFlatColorPickerActionButtons]',
|
|
44
|
-
template: "\n <button\n class=\"k-coloreditor-cancel k-button\"\n [attr.title]=\"getText('cancelButton')\"\n (click)=\"onActionButtonClick('cancel', $event)\"\n >{{getText('cancelButton')}}</button>\n <button #last\n class=\"k-coloreditor-apply k-button k-primary\"\n [attr.title]=\"getText('applyButton')\"\n (click)=\"onActionButtonClick('apply', $event)\"\n >{{getText('applyButton')}}</button>\n "
|
|
44
|
+
template: "\n <button\n class=\"k-coloreditor-cancel k-button k-button-md k-button-solid k-button-solid-base\"\n [attr.title]=\"getText('cancelButton')\"\n (click)=\"onActionButtonClick('cancel', $event)\"\n >{{getText('cancelButton')}}</button>\n <button #last\n class=\"k-coloreditor-apply k-button k-button-md k-button-solid k-button-solid-primary\"\n [attr.title]=\"getText('applyButton')\"\n (click)=\"onActionButtonClick('apply', $event)\"\n >{{getText('applyButton')}}</button>\n "
|
|
45
45
|
}),
|
|
46
46
|
tslib_1.__metadata("design:paramtypes", [LocalizationService])
|
|
47
47
|
], FlatColorPickerActionButtonsComponent);
|
|
@@ -85,7 +85,7 @@ var FlatColorPickerHeaderComponent = /** @class */ (function () {
|
|
|
85
85
|
FlatColorPickerHeaderComponent = tslib_1.__decorate([
|
|
86
86
|
Component({
|
|
87
87
|
selector: '[kendoFlatColorPickerHeader]',
|
|
88
|
-
template: "\n <div class=\"k-coloreditor-header-actions k-hstack\">\n <div *ngIf=\"viewButtons\" class=\"k-button-group k-button-group-flat\">\n <button *ngFor=\"let view of views\"\n #viewButtons\n (click)=\"onViewButtonClick(view)\"\n class=\"k-button k-
|
|
88
|
+
template: "\n <div class=\"k-coloreditor-header-actions k-hstack\">\n <div *ngIf=\"viewButtons\" class=\"k-button-group k-button-group-flat\">\n <button *ngFor=\"let view of views\"\n #viewButtons\n (click)=\"onViewButtonClick(view)\"\n class=\"k-button k-button-md k-button-flat k-button-flat-base k-icon-button\"\n [attr.title]=\"getText(view === 'gradient' ? 'gradientView' : 'paletteView')\"\n [attr.aria-label]=\"getText(view === 'gradient' ? 'gradientView' : 'paletteView')\"\n [attr.aria-pressed]=\"activeView === view\"\n [ngClass]=\"activeView === view ? 'k-state-selected' : ''\"\n >\n <span\n class=\"k-button-icon k-icon\"\n [ngClass]=\"getViewButtonIcon(view)\">\n </span>\n </button>\n </div>\n </div>\n <div class=\"k-spacer\"></div>\n <div class=\"k-coloreditor-header-actions k-hstack\">\n <button *ngIf=\"clearButton\"\n #clearButton\n class=\"k-button k-button-md k-button-flat k-button-flat-base k-icon-button k-coloreditor-reset\"\n [attr.aria-label]=\"getText('clearButton')\"\n [attr.title]=\"getText('clearButton')\"\n (click)=\"clearButtonClick.emit()\">\n <span class=\"k-button-icon k-icon k-i-reset-color\"></span>\n </button>\n <div class=\"k-coloreditor-preview k-vstack\" *ngIf=\"preview\">\n <span\n class=\"k-coloreditor-preview-color k-color-preview\"\n [attr.title]=\"getText('previewColor')\"\n [style.background-color]=\"selection\">\n </span>\n <span class=\"k-coloreditor-current-color k-color-preview\"\n [style.background-color]=\"value\"\n [attr.title]=\"getText('revertSelection')\"\n (click)=\"valuePaneClick.emit($event)\">\n </span>\n </div>\n </div>\n "
|
|
89
89
|
}),
|
|
90
90
|
tslib_1.__metadata("design:paramtypes", [LocalizationService])
|
|
91
91
|
], FlatColorPickerHeaderComponent);
|