@progress/kendo-angular-inputs 8.0.0-dev.202112211528 → 8.0.0-dev.202201181548

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.
Files changed (61) hide show
  1. package/LICENSE.md +1 -1
  2. package/NOTICE.txt +119 -79
  3. package/README.md +1 -1
  4. package/dist/cdn/js/kendo-angular-inputs.js +1 -1
  5. package/dist/cdn/main.js +1 -1
  6. package/dist/es/colorpicker/color-gradient.component.js +3 -0
  7. package/dist/es/colorpicker/color-input.component.js +1 -1
  8. package/dist/es/colorpicker/color-palette.component.js +6 -3
  9. package/dist/es/colorpicker/colorpicker.component.js +206 -48
  10. package/dist/es/colorpicker/flatcolorpicker.component.js +7 -4
  11. package/dist/es/package-metadata.js +1 -1
  12. package/dist/es/radiobutton/radiobutton.directive.js +3 -0
  13. package/dist/es/rangeslider/rangeslider-model.js +4 -7
  14. package/dist/es/rangeslider/rangeslider.component.js +1 -1
  15. package/dist/es/slider/slider-model.js +3 -5
  16. package/dist/es/slider/slider.component.js +2 -2
  17. package/dist/es/sliders-common/slider-model.base.js +7 -10
  18. package/dist/es/sliders-common/slider-ticks.component.js +3 -10
  19. package/dist/es/sliders-common/sliders-util.js +2 -3
  20. package/dist/es/textbox/textbox.component.js +1 -1
  21. package/dist/es2015/colorpicker/color-gradient.component.js +3 -0
  22. package/dist/es2015/colorpicker/color-input.component.js +1 -1
  23. package/dist/es2015/colorpicker/color-palette.component.d.ts +1 -1
  24. package/dist/es2015/colorpicker/color-palette.component.js +6 -3
  25. package/dist/es2015/colorpicker/colorpicker.component.d.ts +22 -6
  26. package/dist/es2015/colorpicker/colorpicker.component.js +181 -69
  27. package/dist/es2015/colorpicker/flatcolorpicker.component.d.ts +2 -2
  28. package/dist/es2015/colorpicker/flatcolorpicker.component.js +7 -4
  29. package/dist/es2015/index.metadata.json +1 -1
  30. package/dist/es2015/package-metadata.js +1 -1
  31. package/dist/es2015/radiobutton/radiobutton.directive.js +3 -0
  32. package/dist/es2015/rangeslider/rangeslider-model.js +4 -7
  33. package/dist/es2015/rangeslider/rangeslider.component.js +55 -54
  34. package/dist/es2015/slider/slider-model.d.ts +1 -1
  35. package/dist/es2015/slider/slider-model.js +3 -5
  36. package/dist/es2015/slider/slider.component.js +56 -59
  37. package/dist/es2015/sliders-common/slider-model.base.js +7 -10
  38. package/dist/es2015/sliders-common/slider-ticks.component.d.ts +0 -2
  39. package/dist/es2015/sliders-common/slider-ticks.component.js +6 -10
  40. package/dist/es2015/sliders-common/sliders-util.d.ts +2 -2
  41. package/dist/es2015/sliders-common/sliders-util.js +2 -3
  42. package/dist/es2015/textbox/textbox.component.js +18 -19
  43. package/dist/fesm2015/index.js +368 -278
  44. package/dist/fesm5/index.js +268 -133
  45. package/dist/npm/colorpicker/color-gradient.component.js +3 -0
  46. package/dist/npm/colorpicker/color-input.component.js +1 -1
  47. package/dist/npm/colorpicker/color-palette.component.js +6 -3
  48. package/dist/npm/colorpicker/colorpicker.component.js +205 -47
  49. package/dist/npm/colorpicker/flatcolorpicker.component.js +7 -4
  50. package/dist/npm/package-metadata.js +1 -1
  51. package/dist/npm/radiobutton/radiobutton.directive.js +3 -0
  52. package/dist/npm/rangeslider/rangeslider-model.js +4 -7
  53. package/dist/npm/rangeslider/rangeslider.component.js +1 -1
  54. package/dist/npm/slider/slider-model.js +3 -5
  55. package/dist/npm/slider/slider.component.js +2 -2
  56. package/dist/npm/sliders-common/slider-model.base.js +6 -9
  57. package/dist/npm/sliders-common/slider-ticks.component.js +2 -9
  58. package/dist/npm/sliders-common/sliders-util.js +2 -3
  59. package/dist/npm/textbox/textbox.component.js +1 -1
  60. package/dist/systemjs/kendo-angular-inputs.js +1 -1
  61. package/package.json +5 -5
@@ -4,12 +4,14 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as tslib_1 from "tslib";
6
6
  var ColorPickerComponent_1;
7
+ import { take } from 'rxjs/operators';
7
8
  import { Component, HostBinding, Input, Output, EventEmitter, ViewChild, ElementRef, TemplateRef, ViewContainerRef, forwardRef, ChangeDetectorRef, NgZone, Renderer2 } from '@angular/core';
8
9
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
10
+ import { Subscription } from 'rxjs';
9
11
  import { FlatColorPickerComponent } from './flatcolorpicker.component';
10
12
  import { PopupService } from '@progress/kendo-angular-popup';
11
13
  import { validatePackage } from '@progress/kendo-licensing';
12
- import { Keys, KendoInput } from '@progress/kendo-angular-common';
14
+ import { Keys, KendoInput, isChanged, closest, guid } from '@progress/kendo-angular-common';
13
15
  import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
14
16
  import { packageMetadata } from '../package-metadata';
15
17
  import { PALETTEPRESETS } from './models';
@@ -18,7 +20,7 @@ import { parseColor } from './utils';
18
20
  import { getStylingClasses, isPresent } from '../common/utils';
19
21
  import { ColorPickerLocalizationService } from './localization/colorpicker-localization.service';
20
22
  import { DEFAULT_ACCESSIBLE_PRESET, DEFAULT_PRESET } from './constants';
21
- let serial = 0;
23
+ const DOM_FOCUS_EVENTS = ['focus', 'blur'];
22
24
  /**
23
25
  * Represents the [Kendo UI ColorPicker component for Angular]({% slug overview_colorpicker %}).
24
26
  *
@@ -34,10 +36,7 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
34
36
  this.ngZone = ngZone;
35
37
  this.renderer = renderer;
36
38
  this.hostClasses = true;
37
- /**
38
- * @hidden
39
- */
40
- this.focusableId = `k-colorpicker-${serial++}`;
39
+ this.role = 'listbox';
41
40
  /**
42
41
  * Specifies the views that will be rendered in the popup.
43
42
  * By default both the gradient and palette views will be rendered.
@@ -133,6 +132,10 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
133
132
  * Used to provide a two-way binding for the `activeView` property.
134
133
  */
135
134
  this.activeViewChange = new EventEmitter();
135
+ /**
136
+ * Indicates whether the ColorPicker wrapper is focused.
137
+ */
138
+ this.isFocused = false;
136
139
  this._tabindex = 0;
137
140
  this._popupSettings = { animate: true };
138
141
  this._paletteSettings = {};
@@ -140,13 +143,39 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
140
143
  this._size = 'medium';
141
144
  this._rounded = 'medium';
142
145
  this._fillMode = 'solid';
146
+ this.subscriptions = new Subscription();
143
147
  this.notifyNgTouched = () => { };
144
148
  this.notifyNgChanged = () => { };
149
+ this.domFocusListener = (event) => event.stopImmediatePropagation();
145
150
  validatePackage(packageMetadata);
146
151
  this.dynamicRTLSubscription = this.localizationService.changes.subscribe(({ rtl }) => {
147
152
  this.direction = rtl ? 'rtl' : 'ltr';
148
153
  });
149
154
  }
155
+ get focusedClass() {
156
+ return this.isFocused;
157
+ }
158
+ get disabledClass() {
159
+ return this.disabled;
160
+ }
161
+ get ariaReadonly() {
162
+ return this.readonly;
163
+ }
164
+ get ariaExpanded() {
165
+ return this.isOpen;
166
+ }
167
+ get hostTabindex() {
168
+ return this.tabindex;
169
+ }
170
+ /**
171
+ * @hidden
172
+ */
173
+ set view(view) {
174
+ this.views = [view];
175
+ }
176
+ get view() {
177
+ return (this.views && this.views.length > 0) ? this.views[0] : null;
178
+ }
150
179
  /**
151
180
  * Specifies the value of the initially selected color.
152
181
  */
@@ -282,6 +311,9 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
282
311
  stylingInputs.forEach(input => {
283
312
  this.handleClasses(this[input], input);
284
313
  });
314
+ this.setHostElementAriaLabel();
315
+ this.handleHostId();
316
+ this.initDomEvents();
285
317
  }
286
318
  ngOnChanges(changes) {
287
319
  if (changes.format && changes.format.currentValue === 'name') {
@@ -291,18 +323,17 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
291
323
  this.format = 'rgba';
292
324
  this.value = parseColor(this.value, this.format, this.gradientSettings.opacity);
293
325
  }
326
+ if (isChanged('value', changes)) {
327
+ this.setHostElementAriaLabel();
328
+ }
294
329
  }
295
330
  ngOnDestroy() {
296
331
  this.closePopup();
297
332
  if (this.dynamicRTLSubscription) {
298
333
  this.dynamicRTLSubscription.unsubscribe();
299
334
  }
300
- }
301
- /**
302
- * @hidden
303
- */
304
- get colorPickerAriaLabel() {
305
- return this.value ? this.value : this.localizationService.get('colorPickerNoColor');
335
+ this.subscriptions.unsubscribe();
336
+ this.handleDomEvents('remove', DOM_FOCUS_EVENTS);
306
337
  }
307
338
  /**
308
339
  * @hidden
@@ -314,28 +345,33 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
314
345
  * @hidden
315
346
  */
316
347
  togglePopup() {
317
- this.toggleWithEvents(!this.isOpen);
318
348
  this.focus();
349
+ this.toggleWithEvents(!this.isOpen);
319
350
  }
320
351
  /**
321
352
  * @hidden
322
353
  */
323
- handleActiveColorClick() {
354
+ handleWrapperClick(event) {
355
+ if (this.disabled) {
356
+ return;
357
+ }
324
358
  this.focus();
325
- const event = new ActiveColorClickEvent(this.value);
326
- this.activeColorClick.emit(event);
327
- if (!event.isOpenPrevented() || this.isOpen) {
328
- this.togglePopup();
359
+ if (closest(event.target, (element) => element === this.activeColor.nativeElement)) {
360
+ const event = new ActiveColorClickEvent(this.value);
361
+ this.activeColorClick.emit(event);
362
+ if (!event.isOpenPrevented() || this.isOpen) {
363
+ this.toggleWithEvents(!this.isOpen);
364
+ }
365
+ return;
329
366
  }
367
+ this.toggleWithEvents(!this.isOpen);
330
368
  }
331
369
  /**
332
370
  * Focuses the wrapper of the ColorPicker.
333
371
  */
334
372
  focus() {
335
- if (this.disabled) {
336
- return;
337
- }
338
- this.wrapper.nativeElement.focus();
373
+ this.isFocused = true;
374
+ this.host.nativeElement.focus();
339
375
  }
340
376
  /**
341
377
  * @hidden
@@ -344,14 +380,18 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
344
380
  if (this.isFocused) {
345
381
  return;
346
382
  }
347
- this.isFocused = true;
348
- this.onFocus.emit();
383
+ this.ngZone.run(() => {
384
+ this.focus();
385
+ this.onFocus.emit();
386
+ });
349
387
  }
350
388
  /**
351
389
  * Blurs the ColorPicker.
352
390
  */
353
391
  blur() {
354
- this.wrapper.nativeElement.blur();
392
+ this.isFocused = false;
393
+ this.host.nativeElement.blur();
394
+ this.notifyNgTouched();
355
395
  }
356
396
  /**
357
397
  * @hidden
@@ -360,9 +400,16 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
360
400
  if (this.isOpen) {
361
401
  return;
362
402
  }
363
- this.isFocused = false;
364
- this.onBlur.emit();
365
- this.notifyNgTouched();
403
+ this.ngZone.run(() => {
404
+ this.onBlur.emit();
405
+ this.isFocused = false;
406
+ });
407
+ }
408
+ /**
409
+ * @hidden
410
+ */
411
+ arrowButtonMouseDown(ev) {
412
+ ev.preventDefault();
366
413
  }
367
414
  /**
368
415
  * Clears the value of the ColorPicker.
@@ -372,6 +419,7 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
372
419
  return;
373
420
  }
374
421
  this._value = undefined;
422
+ this.setHostElementAriaLabel();
375
423
  this.notifyNgChanged(undefined);
376
424
  }
377
425
  /**
@@ -399,6 +447,7 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
399
447
  if (valueChange) {
400
448
  this.value = parsedColor;
401
449
  this.valueChange.emit(parsedColor);
450
+ this.setHostElementAriaLabel();
402
451
  this.notifyNgChanged(parsedColor);
403
452
  }
404
453
  }
@@ -445,7 +494,9 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
445
494
  handleWrapperKeyDown(event) {
446
495
  if (event.keyCode === Keys.ArrowDown || event.keyCode === Keys.Enter) {
447
496
  event.preventDefault();
448
- this.toggleWithEvents(true);
497
+ this.ngZone.run(() => {
498
+ this.toggleWithEvents(true);
499
+ });
449
500
  }
450
501
  }
451
502
  /**
@@ -454,14 +505,14 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
454
505
  handlePopupKeyDown(event) {
455
506
  if (event.keyCode === Keys.Escape) {
456
507
  this.toggleWithEvents(false);
457
- this.wrapper.nativeElement.focus();
508
+ this.host.nativeElement.focus();
458
509
  }
459
510
  if (event.keyCode === Keys.Tab) {
460
511
  const currentElement = event.shiftKey ? this.firstFocusableElement.nativeElement : this.lastFocusableElement.nativeElement;
461
512
  const nextElement = event.shiftKey ? this.lastFocusableElement.nativeElement : this.firstFocusableElement.nativeElement;
462
513
  if (event.target === currentElement) {
463
514
  event.preventDefault();
464
- nextElement.nativeElement.focus();
515
+ nextElement.focus();
465
516
  }
466
517
  }
467
518
  }
@@ -472,6 +523,10 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
472
523
  isEmpty() {
473
524
  return false;
474
525
  }
526
+ setHostElementAriaLabel() {
527
+ const ariaLabelValue = `${this.value ? this.value : this.localizationService.get('colorPickerNoColor')}`;
528
+ this.renderer.setAttribute(this.host.nativeElement, 'aria-label', ariaLabelValue);
529
+ }
475
530
  handleClasses(value, input) {
476
531
  const elem = this.host.nativeElement;
477
532
  const classes = getStylingClasses('picker', input, this[input], value);
@@ -483,9 +538,9 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
483
538
  }
484
539
  }
485
540
  popupBlurInvalid(ev) {
486
- const focusInPopupElement = this.popupRef.popupElement.contains(ev.relatedTarget);
487
- const wrapperClicked = ev.relatedTarget === this.wrapper.nativeElement;
488
- return !this.isFocused || wrapperClicked || focusInPopupElement;
541
+ const focusInFlatColorPickerElement = this.popupRef.popupElement.contains(ev.relatedTarget);
542
+ const hostClicked = closest(ev.relatedTarget, (element) => element === this.host.nativeElement);
543
+ return hostClicked || focusInFlatColorPickerElement;
489
544
  }
490
545
  toggleWithEvents(open) {
491
546
  const sameState = this.isOpen === open;
@@ -509,12 +564,12 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
509
564
  }
510
565
  }
511
566
  focusFirstElement() {
512
- this.ngZone.runOutsideAngular(() => {
513
- setTimeout(() => {
567
+ this.ngZone.onStable.pipe(take(1)).subscribe(() => {
568
+ if (this.flatColorPicker) {
514
569
  const elementToFocus = this.flatColorPicker.gradient ? this.flatColorPicker.gradient.gradientDragHandle :
515
570
  this.flatColorPicker.palette.host;
516
571
  elementToFocus.nativeElement.focus();
517
- });
572
+ }
518
573
  });
519
574
  }
520
575
  openPopup() {
@@ -522,7 +577,7 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
522
577
  const anchorPosition = { horizontal: horizontalAlign, vertical: "bottom" };
523
578
  const popupPosition = { horizontal: horizontalAlign, vertical: "top" };
524
579
  this.popupRef = this.popupService.open({
525
- anchor: this.wrapper,
580
+ anchor: this.activeColor,
526
581
  animate: this.popupSettings.animate,
527
582
  appendTo: this.popupSettings.appendTo,
528
583
  popupAlign: popupPosition,
@@ -534,7 +589,7 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
534
589
  this.popupRef.popupAnchorViewportLeave.subscribe(() => {
535
590
  this.toggleWithEvents(false);
536
591
  if (!this.isOpen) {
537
- this.wrapper.nativeElement.focus({
592
+ this.host.nativeElement.focus({
538
593
  preventScroll: true
539
594
  });
540
595
  }
@@ -562,6 +617,51 @@ let ColorPickerComponent = ColorPickerComponent_1 = class ColorPickerComponent {
562
617
  }
563
618
  return this.gradientSettings.opacity ? this.flatColorPicker.gradient.inputs.opacityInput.numericInput : this.flatColorPicker.gradient.inputs.blueInput;
564
619
  }
620
+ handleDomEvents(action, events) {
621
+ const hostElement = this.host.nativeElement;
622
+ events.forEach(ev => hostElement[`${action}EventListener`](ev, this.domFocusListener, true));
623
+ }
624
+ initDomEvents() {
625
+ if (!this.host) {
626
+ return;
627
+ }
628
+ let hostElement = this.host.nativeElement;
629
+ this.ngZone.runOutsideAngular(() => {
630
+ this.subscriptions.add(this.renderer.listen(hostElement, 'focusin', () => {
631
+ this.handleWrapperFocus();
632
+ }));
633
+ this.subscriptions.add(this.renderer.listen(hostElement, 'focusout', (event) => {
634
+ const closestPopup = this.popupRef ?
635
+ closest(event.relatedTarget, (element) => element === this.flatColorPicker.host.nativeElement) :
636
+ false;
637
+ const closestWrapper = closest(event.relatedTarget, (element) => element === this.host.nativeElement);
638
+ if (!closestPopup && !closestWrapper) {
639
+ this.handleWrapperBlur();
640
+ }
641
+ }));
642
+ this.handleDomEvents('add', DOM_FOCUS_EVENTS);
643
+ this.subscriptions.add(this.renderer.listen(hostElement, 'keydown', (event) => {
644
+ this.handleWrapperKeyDown(event);
645
+ }));
646
+ this.subscriptions.add(this.renderer.listen(hostElement, 'click', (event) => {
647
+ this.ngZone.run(() => {
648
+ this.handleWrapperClick(event);
649
+ });
650
+ }));
651
+ });
652
+ }
653
+ handleHostId() {
654
+ const hostElement = this.host.nativeElement;
655
+ const existingId = hostElement.getAttribute('id');
656
+ if (existingId) {
657
+ this.focusableId = existingId;
658
+ }
659
+ else {
660
+ const id = `k-${guid()}`;
661
+ hostElement.setAttribute('id', id);
662
+ this.focusableId = id;
663
+ }
664
+ }
565
665
  };
566
666
  tslib_1.__decorate([
567
667
  HostBinding('class.k-colorpicker'),
@@ -569,18 +669,49 @@ tslib_1.__decorate([
569
669
  HostBinding('class.k-picker'),
570
670
  tslib_1.__metadata("design:type", Boolean)
571
671
  ], ColorPickerComponent.prototype, "hostClasses", void 0);
672
+ tslib_1.__decorate([
673
+ HostBinding('class.k-focus'),
674
+ tslib_1.__metadata("design:type", Boolean),
675
+ tslib_1.__metadata("design:paramtypes", [])
676
+ ], ColorPickerComponent.prototype, "focusedClass", null);
677
+ tslib_1.__decorate([
678
+ HostBinding('attr.aria-disabled'),
679
+ HostBinding('class.k-disabled'),
680
+ tslib_1.__metadata("design:type", Boolean),
681
+ tslib_1.__metadata("design:paramtypes", [])
682
+ ], ColorPickerComponent.prototype, "disabledClass", null);
683
+ tslib_1.__decorate([
684
+ HostBinding('attr.aria-readonly'),
685
+ tslib_1.__metadata("design:type", Boolean),
686
+ tslib_1.__metadata("design:paramtypes", [])
687
+ ], ColorPickerComponent.prototype, "ariaReadonly", null);
688
+ tslib_1.__decorate([
689
+ HostBinding('attr.aria-expanded'),
690
+ tslib_1.__metadata("design:type", Boolean),
691
+ tslib_1.__metadata("design:paramtypes", [])
692
+ ], ColorPickerComponent.prototype, "ariaExpanded", null);
693
+ tslib_1.__decorate([
694
+ HostBinding('attr.tabindex'),
695
+ tslib_1.__metadata("design:type", Number),
696
+ tslib_1.__metadata("design:paramtypes", [])
697
+ ], ColorPickerComponent.prototype, "hostTabindex", null);
572
698
  tslib_1.__decorate([
573
699
  HostBinding('attr.dir'),
574
700
  tslib_1.__metadata("design:type", String)
575
701
  ], ColorPickerComponent.prototype, "direction", void 0);
576
702
  tslib_1.__decorate([
577
- Input(),
703
+ HostBinding('attr.role'),
578
704
  tslib_1.__metadata("design:type", String)
579
- ], ColorPickerComponent.prototype, "focusableId", void 0);
705
+ ], ColorPickerComponent.prototype, "role", void 0);
580
706
  tslib_1.__decorate([
581
707
  Input(),
582
708
  tslib_1.__metadata("design:type", Array)
583
709
  ], ColorPickerComponent.prototype, "views", void 0);
710
+ tslib_1.__decorate([
711
+ Input(),
712
+ tslib_1.__metadata("design:type", String),
713
+ tslib_1.__metadata("design:paramtypes", [String])
714
+ ], ColorPickerComponent.prototype, "view", null);
584
715
  tslib_1.__decorate([
585
716
  Input(),
586
717
  tslib_1.__metadata("design:type", String)
@@ -694,9 +825,9 @@ tslib_1.__decorate([
694
825
  tslib_1.__metadata("design:type", ViewContainerRef)
695
826
  ], ColorPickerComponent.prototype, "container", void 0);
696
827
  tslib_1.__decorate([
697
- ViewChild('wrapper', { static: true }),
828
+ ViewChild('activeColor', { static: true }),
698
829
  tslib_1.__metadata("design:type", ElementRef)
699
- ], ColorPickerComponent.prototype, "wrapper", void 0);
830
+ ], ColorPickerComponent.prototype, "activeColor", void 0);
700
831
  tslib_1.__decorate([
701
832
  ViewChild('popupTemplate', { static: true }),
702
833
  tslib_1.__metadata("design:type", TemplateRef)
@@ -762,38 +893,19 @@ ColorPickerComponent = ColorPickerComponent_1 = tslib_1.__decorate([
762
893
  i18n-cancelButton="kendo.colorpicker.cancelButton|The message for the Cancel action button."
763
894
  cancelButton="Cancel">
764
895
  </ng-container>
765
- <span
766
- #wrapper
767
- [ngClass]="{
768
- 'k-input-inner': true,
769
- 'k-disabled': this.disabled,
770
- 'k-focus': this.isFocused
771
- }"
772
- role="listbox"
773
- [attr.aria-expanded]="isOpen"
774
- [attr.aria-readonly]="readonly"
775
- [attr.aria-disabled]="disabled"
776
- [attr.aria-label]="colorPickerAriaLabel"
777
- [id]="focusableId"
778
- [attr.tabindex]="tabindex"
779
- (focus)="handleWrapperFocus()"
780
- (blur)="handleWrapperBlur()"
781
- (mousedown)="$event.preventDefault()"
782
- (keydown)="handleWrapperKeyDown($event)"
783
- >
896
+ <span #activeColor class="k-input-inner">
784
897
  <span
785
898
  class="k-value-icon k-color-preview"
786
- [ngClass]="{'k-icon-color-preview': iconStyles, 'k-no-color': !value}"
787
- (click)="handleActiveColorClick()">
899
+ [ngClass]="{'k-icon-color-preview': iconStyles, 'k-no-color': !value}">
788
900
  <span *ngIf="iconClass || icon" class="k-color-preview-icon k-icon" [ngClass]="iconStyles"></span>
789
901
  <span class="k-color-preview-mask" [style.background-color]="value"></span>
790
902
  </span>
791
903
  </span>
792
904
  <button
793
- type="button"
794
- class="k-input-button k-button k-button-md k-button-solid k-button-solid-base k-icon-button"
795
- [attr.aria-label]="colorPickerAriaLabel"
796
- (click)="togglePopup()">
905
+ #arrowButton
906
+ tabindex="-1"
907
+ role="button"
908
+ class="k-input-button k-button k-button-md k-button-solid k-button-solid-base k-icon-button">
797
909
  <span class="k-button-icon k-icon k-i-arrow-s"></span>
798
910
  </button>
799
911
  <ng-template #popupTemplate>
@@ -808,8 +920,8 @@ ColorPickerComponent = ColorPickerComponent_1 = tslib_1.__decorate([
808
920
  [gradientSettings]="gradientSettings"
809
921
  [paletteSettings]="paletteSettings"
810
922
  [clearButton]="clearButton"
811
- (focusout)="handlePopupBlur($event)"
812
923
  (cancel)="handleCancelEvent($event)"
924
+ (focusout)="handlePopupBlur($event)"
813
925
  (valueChange)="handleValueChange($event)"
814
926
  (keydown)="handlePopupKeyDown($event)"
815
927
  (activeViewChange)="activeViewChange.emit($event)"
@@ -19,8 +19,8 @@ import { FlatColorPickerActionButtonsComponent } from './flatcolorpicker-actions
19
19
  * through a gradient that renders an hsv canvas. It supports previewing the selected color, reverting it to its previous state or clearing it completely.
20
20
  */
21
21
  export declare class FlatColorPickerComponent implements OnInit, AfterViewInit, OnDestroy, ControlValueAccessor {
22
+ host: ElementRef;
22
23
  private service;
23
- private host;
24
24
  private localizationService;
25
25
  private cdr;
26
26
  private renderer;
@@ -140,7 +140,7 @@ export declare class FlatColorPickerComponent implements OnInit, AfterViewInit,
140
140
  private _paletteSettings;
141
141
  private dynamicRTLSubscription;
142
142
  private subscriptions;
143
- constructor(service: FlatColorPickerService, host: ElementRef, localizationService: LocalizationService, cdr: ChangeDetectorRef, renderer: Renderer2, ngZone: NgZone);
143
+ constructor(host: ElementRef, service: FlatColorPickerService, localizationService: LocalizationService, cdr: ChangeDetectorRef, renderer: Renderer2, ngZone: NgZone);
144
144
  ngOnInit(): void;
145
145
  ngAfterViewInit(): void;
146
146
  ngOnChanges(changes: SimpleChanges): void;
@@ -9,8 +9,10 @@ import { NG_VALUE_ACCESSOR } from '@angular/forms';
9
9
  import { Subscription } from 'rxjs';
10
10
  import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
11
11
  import { isChanged, KendoInput } from '@progress/kendo-angular-common';
12
+ import { validatePackage } from "@progress/kendo-licensing";
12
13
  import { FlatColorPickerLocalizationService } from './localization/flatcolorpicker-localization.service';
13
14
  import { FlatColorPickerService } from './services/flatcolorpicker.service';
15
+ import { packageMetadata } from "../package-metadata";
14
16
  import { ColorPickerCancelEvent } from './events';
15
17
  import { parseColor } from './utils';
16
18
  import { isPresent } from '../common/utils';
@@ -25,9 +27,9 @@ import { FlatColorPickerActionButtonsComponent } from './flatcolorpicker-actions
25
27
  * through a gradient that renders an hsv canvas. It supports previewing the selected color, reverting it to its previous state or clearing it completely.
26
28
  */
27
29
  let FlatColorPickerComponent = FlatColorPickerComponent_1 = class FlatColorPickerComponent {
28
- constructor(service, host, localizationService, cdr, renderer, ngZone) {
29
- this.service = service;
30
+ constructor(host, service, localizationService, cdr, renderer, ngZone) {
30
31
  this.host = host;
32
+ this.service = service;
31
33
  this.localizationService = localizationService;
32
34
  this.cdr = cdr;
33
35
  this.renderer = renderer;
@@ -110,6 +112,7 @@ let FlatColorPickerComponent = FlatColorPickerComponent_1 = class FlatColorPicke
110
112
  this.subscriptions = new Subscription();
111
113
  this.notifyNgChanged = () => { };
112
114
  this.notifyNgTouched = () => { };
115
+ validatePackage(packageMetadata);
113
116
  this.dynamicRTLSubscription = this.localizationService.changes.subscribe(({ rtl }) => {
114
117
  this.direction = rtl ? 'rtl' : 'ltr';
115
118
  });
@@ -583,8 +586,8 @@ FlatColorPickerComponent = FlatColorPickerComponent_1 = tslib_1.__decorate([
583
586
  </div>
584
587
  `
585
588
  }),
586
- tslib_1.__metadata("design:paramtypes", [FlatColorPickerService,
587
- ElementRef,
589
+ tslib_1.__metadata("design:paramtypes", [ElementRef,
590
+ FlatColorPickerService,
588
591
  LocalizationService,
589
592
  ChangeDetectorRef,
590
593
  Renderer2,