@progress/kendo-angular-progressbar 3.1.2-dev.202210121050 → 3.1.2-dev.202211071017

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.
@@ -3,13 +3,13 @@
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import * as i0 from '@angular/core';
6
- import { isDevMode, Component, HostBinding, Input, EventEmitter, Output, ViewChild, Directive, ContentChild, NgModule } from '@angular/core';
6
+ import { isDevMode, Component, HostBinding, Input, Directive, forwardRef, EventEmitter, Output, ViewChild, ContentChild, NgModule } from '@angular/core';
7
7
  import { validatePackage } from '@progress/kendo-licensing';
8
8
  import * as i1 from '@progress/kendo-angular-l10n';
9
- import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
10
- import * as i2$1 from '@progress/kendo-angular-common';
9
+ import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
10
+ import * as i2 from '@progress/kendo-angular-common';
11
11
  import { hasObservers, isChanged, ResizeSensorModule } from '@progress/kendo-angular-common';
12
- import * as i2 from '@angular/common';
12
+ import * as i3 from '@angular/common';
13
13
  import { CommonModule } from '@angular/common';
14
14
  import { Subscription } from 'rxjs';
15
15
  import { take } from 'rxjs/operators';
@@ -21,7 +21,7 @@ const packageMetadata = {
21
21
  name: '@progress/kendo-angular-progressbar',
22
22
  productName: 'Kendo UI for Angular',
23
23
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
24
- publishDate: 1665571783,
24
+ publishDate: 1667816241,
25
25
  version: '',
26
26
  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'
27
27
  };
@@ -144,9 +144,11 @@ class ProgressBarBase {
144
144
  /**
145
145
  * @hidden
146
146
  */
147
- constructor(localization) {
147
+ constructor(elem, renderer, localization) {
148
+ this.elem = elem;
149
+ this.renderer = renderer;
148
150
  this.localization = localization;
149
- this.widgetClasses = true;
151
+ this.hostClasses = true;
150
152
  this.roleAttribute = 'progressbar';
151
153
  /**
152
154
  * The maximum value of the ProgressBar.
@@ -260,6 +262,12 @@ class ProgressBarBase {
260
262
  get _progressRatio() {
261
263
  return calculateRatio(this.min, this.max, this.displayValue);
262
264
  }
265
+ ngAfterViewInit() {
266
+ const elem = this.elem.nativeElement;
267
+ const label = this.localization.get('progressBarLabel');
268
+ this.renderer.setAttribute(elem, 'title', label);
269
+ this.renderer.setAttribute(elem, 'aria-label', label);
270
+ }
263
271
  ngOnChanges(changes) {
264
272
  const min = extractValueFromChanges(changes, 'min', this.min);
265
273
  const max = extractValueFromChanges(changes, 'max', this.max);
@@ -287,17 +295,14 @@ class ProgressBarBase {
287
295
  }
288
296
  }
289
297
  }
290
- ProgressBarBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProgressBarBase, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
291
- ProgressBarBase.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ProgressBarBase, selector: "ng-component", inputs: { max: "max", min: "min", value: "value", orientation: "orientation", disabled: "disabled", reverse: "reverse", indeterminate: "indeterminate" }, host: { properties: { "class.k-widget": "this.widgetClasses", "class.k-progressbar": "this.widgetClasses", "class.k-progressbar-horizontal": "this.isHorizontal", "class.k-progressbar-vertical": "this.isVertical", "class.k-disabled": "this.disabledClass", "class.k-progressbar-reverse": "this.reverseClass", "class.k-progressbar-indeterminate": "this.indeterminateClass", "attr.dir": "this.dirAttribute", "attr.role": "this.roleAttribute", "attr.aria-valuemin": "this.ariaMinAttribute", "attr.aria-valuemax": "this.ariaMaxAttribute", "attr.aria-valuenow": "this.ariaValueAttribute" } }, usesOnChanges: true, ngImport: i0, template: '', isInline: true });
298
+ ProgressBarBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProgressBarBase, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
299
+ ProgressBarBase.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ProgressBarBase, selector: "ng-component", inputs: { max: "max", min: "min", value: "value", orientation: "orientation", disabled: "disabled", reverse: "reverse", indeterminate: "indeterminate" }, host: { properties: { "class.k-progressbar": "this.hostClasses", "class.k-progressbar-horizontal": "this.isHorizontal", "class.k-progressbar-vertical": "this.isVertical", "class.k-disabled": "this.disabledClass", "class.k-progressbar-reverse": "this.reverseClass", "class.k-progressbar-indeterminate": "this.indeterminateClass", "attr.dir": "this.dirAttribute", "attr.role": "this.roleAttribute", "attr.aria-valuemin": "this.ariaMinAttribute", "attr.aria-valuemax": "this.ariaMaxAttribute", "attr.aria-valuenow": "this.ariaValueAttribute" } }, usesOnChanges: true, ngImport: i0, template: '', isInline: true });
292
300
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProgressBarBase, decorators: [{
293
301
  type: Component,
294
302
  args: [{
295
303
  template: ''
296
304
  }]
297
- }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { widgetClasses: [{
298
- type: HostBinding,
299
- args: ['class.k-widget']
300
- }, {
305
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1.LocalizationService }]; }, propDecorators: { hostClasses: [{
301
306
  type: HostBinding,
302
307
  args: ['class.k-progressbar']
303
308
  }], isHorizontal: [{
@@ -346,6 +351,52 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
346
351
  type: Input
347
352
  }] } });
348
353
 
354
+ /**
355
+ * @hidden
356
+ */
357
+ class ProgressBarMessages extends ComponentMessages {
358
+ }
359
+ ProgressBarMessages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProgressBarMessages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
360
+ ProgressBarMessages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: ProgressBarMessages, selector: "kendo-progressbar-messages-base", inputs: { progressBarLabel: "progressBarLabel" }, usesInheritance: true, ngImport: i0 });
361
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProgressBarMessages, decorators: [{
362
+ type: Directive,
363
+ args: [{
364
+ // eslint-disable-next-line @angular-eslint/directive-selector
365
+ selector: 'kendo-progressbar-messages-base'
366
+ }]
367
+ }], propDecorators: { progressBarLabel: [{
368
+ type: Input
369
+ }] } });
370
+
371
+ /**
372
+ * @hidden
373
+ */
374
+ class LocalizedProgressBarMessagesDirective extends ProgressBarMessages {
375
+ constructor(service) {
376
+ super();
377
+ this.service = service;
378
+ }
379
+ }
380
+ LocalizedProgressBarMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LocalizedProgressBarMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
381
+ LocalizedProgressBarMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: LocalizedProgressBarMessagesDirective, selector: "[kendoProgressBarLocalizedMessages]", providers: [
382
+ {
383
+ provide: ProgressBarMessages,
384
+ useExisting: forwardRef(() => LocalizedProgressBarMessagesDirective)
385
+ }
386
+ ], usesInheritance: true, ngImport: i0 });
387
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LocalizedProgressBarMessagesDirective, decorators: [{
388
+ type: Directive,
389
+ args: [{
390
+ providers: [
391
+ {
392
+ provide: ProgressBarMessages,
393
+ useExisting: forwardRef(() => LocalizedProgressBarMessagesDirective)
394
+ }
395
+ ],
396
+ selector: `[kendoProgressBarLocalizedMessages]`
397
+ }]
398
+ }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
399
+
349
400
  /**
350
401
  * Represents the [Kendo UI ProgressBar component for Angular]({% slug overview_progressbar %}).
351
402
  *
@@ -367,11 +418,12 @@ class ProgressBarComponent extends ProgressBarBase {
367
418
  /**
368
419
  * @hidden
369
420
  */
370
- constructor(localization, zone, renderer) {
371
- super(localization);
421
+ constructor(localization, elem, renderer, zone) {
422
+ super(elem, renderer, localization);
372
423
  this.localization = localization;
373
- this.zone = zone;
424
+ this.elem = elem;
374
425
  this.renderer = renderer;
426
+ this.zone = zone;
375
427
  /**
376
428
  * Determines whether the status label will be visible.
377
429
  * Defaults to `true`—the label will be visible and displayed with the default
@@ -552,7 +604,7 @@ class ProgressBarComponent extends ProgressBarBase {
552
604
  });
553
605
  }
554
606
  }
555
- ProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProgressBarComponent, deps: [{ token: i1.LocalizationService }, { token: i0.NgZone }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
607
+ ProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProgressBarComponent, deps: [{ token: i1.LocalizationService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
556
608
  ProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ProgressBarComponent, selector: "kendo-progressbar", inputs: { label: "label", progressCssStyle: "progressCssStyle", progressCssClass: "progressCssClass", emptyCssStyle: "emptyCssStyle", emptyCssClass: "emptyCssClass", animation: "animation" }, outputs: { animationEnd: "animationEnd" }, providers: [
557
609
  LocalizationService,
558
610
  {
@@ -560,6 +612,11 @@ ProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
560
612
  useValue: 'kendo.progressbar'
561
613
  }
562
614
  ], viewQueries: [{ propertyName: "progressStatusElement", first: true, predicate: ["progressStatus"], descendants: true }, { propertyName: "progressStatusWrapperElement", first: true, predicate: ["progressStatusWrap"], descendants: true }], exportAs: ["kendoProgressBar"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `
615
+ <ng-container kendoProgressBarLocalizedMessages
616
+ i18n-progressBarLabel="kendo.progressbar.progressBarLabel|The title for the ProgressBar component."
617
+ progressBarLabel="Progressbar"
618
+ >
619
+ </ng-container>
563
620
  <span class="k-progress-status-wrap"
564
621
  [class.k-progress-start]="isPositionStart"
565
622
  [class.k-progress-center]="isPositionCenter"
@@ -589,13 +646,18 @@ ProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
589
646
  <span *ngIf="showLabel" class="k-progress-status">{{formattedLabelValue}}</span>
590
647
  </span>
591
648
  </div>
592
- `, isInline: true, directives: [{ type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
649
+ `, isInline: true, directives: [{ type: LocalizedProgressBarMessagesDirective, selector: "[kendoProgressBarLocalizedMessages]" }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
593
650
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProgressBarComponent, decorators: [{
594
651
  type: Component,
595
652
  args: [{
596
653
  exportAs: 'kendoProgressBar',
597
654
  selector: 'kendo-progressbar',
598
655
  template: `
656
+ <ng-container kendoProgressBarLocalizedMessages
657
+ i18n-progressBarLabel="kendo.progressbar.progressBarLabel|The title for the ProgressBar component."
658
+ progressBarLabel="Progressbar"
659
+ >
660
+ </ng-container>
599
661
  <span class="k-progress-status-wrap"
600
662
  [class.k-progress-start]="isPositionStart"
601
663
  [class.k-progress-center]="isPositionCenter"
@@ -634,7 +696,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
634
696
  }
635
697
  ]
636
698
  }]
637
- }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i0.NgZone }, { type: i0.Renderer2 }]; }, propDecorators: { label: [{
699
+ }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }]; }, propDecorators: { label: [{
638
700
  type: Input
639
701
  }], progressCssStyle: [{
640
702
  type: Input
@@ -677,9 +739,11 @@ class ChunkProgressBarComponent extends ProgressBarBase {
677
739
  /**
678
740
  * @hidden
679
741
  */
680
- constructor(localization) {
681
- super(localization);
742
+ constructor(localization, elem, renderer) {
743
+ super(elem, renderer, localization);
682
744
  this.localization = localization;
745
+ this.elem = elem;
746
+ this.renderer = renderer;
683
747
  /**
684
748
  * Sets the number of chunks into which the ChunkProgressBar will be split.
685
749
  * Defaults to `5`.
@@ -725,7 +789,7 @@ class ChunkProgressBarComponent extends ProgressBarBase {
725
789
  return this._orientationStyles;
726
790
  }
727
791
  }
728
- ChunkProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChunkProgressBarComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
792
+ ChunkProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChunkProgressBarComponent, deps: [{ token: i1.LocalizationService }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
729
793
  ChunkProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ChunkProgressBarComponent, selector: "kendo-chunkprogressbar", inputs: { chunkCount: "chunkCount", progressCssStyle: "progressCssStyle", progressCssClass: "progressCssClass", emptyCssStyle: "emptyCssStyle", emptyCssClass: "emptyCssClass" }, providers: [
730
794
  LocalizationService,
731
795
  {
@@ -733,6 +797,11 @@ ChunkProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.
733
797
  useValue: 'kendo.chunkprogressbar'
734
798
  }
735
799
  ], exportAs: ["kendoChunkProgressBar"], usesInheritance: true, ngImport: i0, template: `
800
+ <ng-container kendoProgressBarLocalizedMessages
801
+ i18n-progressBarLabel="kendo.chunkprogressbar.progressBarLabel|The title for the ChunkProgressBar component."
802
+ progressBarLabel="Chunk progressbar"
803
+ >
804
+ </ng-container>
736
805
  <ul class="k-reset">
737
806
  <li class="k-item" *ngFor="let chunk of chunks; let i = index;"
738
807
  [class.k-first]="i === 0"
@@ -745,13 +814,18 @@ ChunkProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.
745
814
  >
746
815
  </li>
747
816
  </ul>
748
- `, isInline: true, directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
817
+ `, isInline: true, directives: [{ type: LocalizedProgressBarMessagesDirective, selector: "[kendoProgressBarLocalizedMessages]" }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
749
818
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChunkProgressBarComponent, decorators: [{
750
819
  type: Component,
751
820
  args: [{
752
821
  exportAs: 'kendoChunkProgressBar',
753
822
  selector: 'kendo-chunkprogressbar',
754
823
  template: `
824
+ <ng-container kendoProgressBarLocalizedMessages
825
+ i18n-progressBarLabel="kendo.chunkprogressbar.progressBarLabel|The title for the ChunkProgressBar component."
826
+ progressBarLabel="Chunk progressbar"
827
+ >
828
+ </ng-container>
755
829
  <ul class="k-reset">
756
830
  <li class="k-item" *ngFor="let chunk of chunks; let i = index;"
757
831
  [class.k-first]="i === 0"
@@ -773,7 +847,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
773
847
  }
774
848
  ]
775
849
  }]
776
- }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { chunkCount: [{
850
+ }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { chunkCount: [{
777
851
  type: Input
778
852
  }], progressCssStyle: [{
779
853
  type: Input
@@ -821,13 +895,14 @@ const DEFAULT_SURFACE_SIZE = 200;
821
895
  * ```
822
896
  */
823
897
  class CircularProgressBarComponent {
824
- constructor(renderer, cdr, localizationService, element, zone) {
898
+ constructor(renderer, cdr, localization, element, zone) {
825
899
  this.renderer = renderer;
826
900
  this.cdr = cdr;
827
- this.localizationService = localizationService;
901
+ this.localization = localization;
828
902
  this.element = element;
829
903
  this.zone = zone;
830
904
  this.hostClasses = true;
905
+ this.roleAttribute = 'progressbar';
831
906
  /**
832
907
  * Indicates whether an animation will be played on value changes.
833
908
  *
@@ -852,7 +927,16 @@ class CircularProgressBarComponent {
852
927
  this.internalValue = 0;
853
928
  this.subscriptions = new Subscription();
854
929
  validatePackage(packageMetadata);
855
- this.subscriptions.add(this.localizationService.changes.subscribe(this.rtlChange.bind(this)));
930
+ this.subscriptions.add(this.localization.changes.subscribe(this.rtlChange.bind(this)));
931
+ }
932
+ get ariaMinAttribute() {
933
+ return String(this.min);
934
+ }
935
+ get ariaMaxAttribute() {
936
+ return String(this.max);
937
+ }
938
+ get ariaValueAttribute() {
939
+ return this.indeterminate ? undefined : String(this.value);
856
940
  }
857
941
  /**
858
942
  * Sets the default value of the Circular Progressbar between `min` and `max`.
@@ -911,6 +995,13 @@ class CircularProgressBarComponent {
911
995
  return this._indeterminate;
912
996
  }
913
997
  ngAfterViewInit() {
998
+ const elem = this.element.nativeElement;
999
+ const label = this.localization.get('progressBarLabel');
1000
+ const progressCalculations = [
1001
+ { method: 'setAttribute', el: elem, attr: 'aria-label', attrValue: label },
1002
+ { method: 'setAttribute', el: elem, attr: 'title', attrValue: label }
1003
+ ];
1004
+ setProgressBarStyles(progressCalculations, this.renderer);
914
1005
  this.initProgressArc();
915
1006
  }
916
1007
  ngOnChanges(changes) {
@@ -1136,7 +1227,7 @@ class CircularProgressBarComponent {
1136
1227
  }
1137
1228
  }
1138
1229
  setDirection() {
1139
- this.rtl = this.localizationService.rtl;
1230
+ this.rtl = this.localization.rtl;
1140
1231
  if (this.element) {
1141
1232
  this.renderer.setAttribute(this.element.nativeElement, 'dir', this.rtl ? 'rtl' : 'ltr');
1142
1233
  }
@@ -1145,19 +1236,24 @@ class CircularProgressBarComponent {
1145
1236
  }
1146
1237
  }
1147
1238
  rtlChange() {
1148
- if (this.element && this.rtl !== this.localizationService.rtl) {
1239
+ if (this.element && this.rtl !== this.localization.rtl) {
1149
1240
  this.setDirection();
1150
1241
  }
1151
1242
  }
1152
1243
  }
1153
1244
  CircularProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CircularProgressBarComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i1.LocalizationService }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
1154
- CircularProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CircularProgressBarComponent, selector: "kendo-circularprogressbar", inputs: { value: "value", max: "max", min: "min", animation: "animation", opacity: "opacity", indeterminate: "indeterminate", progressColor: "progressColor" }, outputs: { animationEnd: "animationEnd" }, host: { properties: { "class.k-circular-progressbar": "this.hostClasses" } }, providers: [
1245
+ CircularProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CircularProgressBarComponent, selector: "kendo-circularprogressbar", inputs: { value: "value", max: "max", min: "min", animation: "animation", opacity: "opacity", indeterminate: "indeterminate", progressColor: "progressColor" }, outputs: { animationEnd: "animationEnd" }, host: { properties: { "class.k-circular-progressbar": "this.hostClasses", "attr.aria-valuemin": "this.ariaMinAttribute", "attr.aria-valuemax": "this.ariaMaxAttribute", "attr.aria-valuenow": "this.ariaValueAttribute", "attr.role": "this.roleAttribute" } }, providers: [
1155
1246
  LocalizationService,
1156
1247
  {
1157
1248
  provide: L10N_PREFIX,
1158
1249
  useValue: 'kendo.circularprogressbar'
1159
1250
  }
1160
1251
  ], queries: [{ propertyName: "centerTemplate", first: true, predicate: CircularProgressbarCenterTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "progress", first: true, predicate: ["progress"], descendants: true }, { propertyName: "scale", first: true, predicate: ["scale"], descendants: true }, { propertyName: "labelElement", first: true, predicate: ["label"], descendants: true }, { propertyName: "surface", first: true, predicate: ["surface"], descendants: true }], exportAs: ["kendoCircularProgressBar"], usesOnChanges: true, ngImport: i0, template: `
1252
+ <ng-container kendoProgressBarLocalizedMessages
1253
+ i18n-progressBarLabel="kendo.circularprogressbar.progressBarLabel|The title for the Circular ProgressBar component."
1254
+ progressBarLabel="Circular progressbar"
1255
+ >
1256
+ </ng-container>
1161
1257
  <div #surface class="k-circular-progressbar-surface">
1162
1258
  <div>
1163
1259
  <svg #svg>
@@ -1172,13 +1268,18 @@ CircularProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12
1172
1268
  </div>
1173
1269
  </div>
1174
1270
  <kendo-resize-sensor (resize)="onResize($event)"></kendo-resize-sensor>
1175
- `, isInline: true, components: [{ type: i2$1.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
1271
+ `, isInline: true, components: [{ type: i2.ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }], directives: [{ type: LocalizedProgressBarMessagesDirective, selector: "[kendoProgressBarLocalizedMessages]" }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
1176
1272
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CircularProgressBarComponent, decorators: [{
1177
1273
  type: Component,
1178
1274
  args: [{
1179
1275
  exportAs: 'kendoCircularProgressBar',
1180
1276
  selector: 'kendo-circularprogressbar',
1181
1277
  template: `
1278
+ <ng-container kendoProgressBarLocalizedMessages
1279
+ i18n-progressBarLabel="kendo.circularprogressbar.progressBarLabel|The title for the Circular ProgressBar component."
1280
+ progressBarLabel="Circular progressbar"
1281
+ >
1282
+ </ng-container>
1182
1283
  <div #surface class="k-circular-progressbar-surface">
1183
1284
  <div>
1184
1285
  <svg #svg>
@@ -1204,6 +1305,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1204
1305
  }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i1.LocalizationService }, { type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { hostClasses: [{
1205
1306
  type: HostBinding,
1206
1307
  args: ['class.k-circular-progressbar']
1308
+ }], ariaMinAttribute: [{
1309
+ type: HostBinding,
1310
+ args: ['attr.aria-valuemin']
1311
+ }], ariaMaxAttribute: [{
1312
+ type: HostBinding,
1313
+ args: ['attr.aria-valuemax']
1314
+ }], ariaValueAttribute: [{
1315
+ type: HostBinding,
1316
+ args: ['attr.aria-valuenow']
1317
+ }], roleAttribute: [{
1318
+ type: HostBinding,
1319
+ args: ['attr.role']
1207
1320
  }], value: [{
1208
1321
  type: Input
1209
1322
  }], max: [{
@@ -1237,10 +1350,51 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1237
1350
  args: [CircularProgressbarCenterTemplateDirective]
1238
1351
  }] } });
1239
1352
 
1240
- const COMPONENT_DIRECTIVES = [ProgressBarComponent, ChunkProgressBarComponent, CircularProgressBarComponent, CircularProgressbarCenterTemplateDirective];
1353
+ /**
1354
+ * Custom component messages override default component messages
1355
+ * ([see example]({% slug rtl_layout %})).
1356
+ */
1357
+ class ProgressBarCustomMessagesComponent extends ProgressBarMessages {
1358
+ constructor(service) {
1359
+ super();
1360
+ this.service = service;
1361
+ }
1362
+ get override() {
1363
+ return true;
1364
+ }
1365
+ }
1366
+ ProgressBarCustomMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProgressBarCustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
1367
+ ProgressBarCustomMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ProgressBarCustomMessagesComponent, selector: "kendo-progressbar-messages", providers: [
1368
+ {
1369
+ provide: ProgressBarMessages,
1370
+ useExisting: forwardRef(() => ProgressBarCustomMessagesComponent)
1371
+ }
1372
+ ], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
1373
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProgressBarCustomMessagesComponent, decorators: [{
1374
+ type: Component,
1375
+ args: [{
1376
+ providers: [
1377
+ {
1378
+ provide: ProgressBarMessages,
1379
+ useExisting: forwardRef(() => ProgressBarCustomMessagesComponent)
1380
+ }
1381
+ ],
1382
+ selector: 'kendo-progressbar-messages',
1383
+ template: ``
1384
+ }]
1385
+ }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
1386
+
1387
+ const COMPONENT_DIRECTIVES = [
1388
+ ProgressBarComponent,
1389
+ ChunkProgressBarComponent,
1390
+ CircularProgressBarComponent,
1391
+ CircularProgressbarCenterTemplateDirective,
1392
+ LocalizedProgressBarMessagesDirective,
1393
+ ProgressBarCustomMessagesComponent
1394
+ ];
1241
1395
  const MODULES = [CommonModule, ResizeSensorModule];
1242
1396
  /**
1243
- * Represents the [NgModule]({{ site.data.urls.angular['ngmodules'] }})
1397
+ * Represents the [NgModule](link:site.data.urls.angular['ngmodules'])
1244
1398
  * definition for the ProgressBar components.
1245
1399
  *
1246
1400
  * @example
@@ -1273,7 +1427,17 @@ const MODULES = [CommonModule, ResizeSensorModule];
1273
1427
  class ProgressBarModule {
1274
1428
  }
1275
1429
  ProgressBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProgressBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1276
- ProgressBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProgressBarModule, declarations: [ProgressBarComponent, ChunkProgressBarComponent, CircularProgressBarComponent, CircularProgressbarCenterTemplateDirective], imports: [CommonModule, ResizeSensorModule], exports: [ProgressBarComponent, ChunkProgressBarComponent, CircularProgressBarComponent, CircularProgressbarCenterTemplateDirective] });
1430
+ ProgressBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProgressBarModule, declarations: [ProgressBarComponent,
1431
+ ChunkProgressBarComponent,
1432
+ CircularProgressBarComponent,
1433
+ CircularProgressbarCenterTemplateDirective,
1434
+ LocalizedProgressBarMessagesDirective,
1435
+ ProgressBarCustomMessagesComponent], imports: [CommonModule, ResizeSensorModule], exports: [ProgressBarComponent,
1436
+ ChunkProgressBarComponent,
1437
+ CircularProgressBarComponent,
1438
+ CircularProgressbarCenterTemplateDirective,
1439
+ LocalizedProgressBarMessagesDirective,
1440
+ ProgressBarCustomMessagesComponent] });
1277
1441
  ProgressBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProgressBarModule, imports: [MODULES] });
1278
1442
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProgressBarModule, decorators: [{
1279
1443
  type: NgModule,
@@ -1288,5 +1452,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1288
1452
  * Generated bundle index. Do not edit.
1289
1453
  */
1290
1454
 
1291
- export { ChunkProgressBarComponent, CircularProgressBarComponent, CircularProgressbarCenterTemplateDirective, ProgressBarComponent, ProgressBarModule };
1455
+ export { ChunkProgressBarComponent, CircularProgressBarComponent, CircularProgressbarCenterTemplateDirective, LocalizedProgressBarMessagesDirective, ProgressBarComponent, ProgressBarCustomMessagesComponent, ProgressBarModule };
1292
1456
 
package/main.d.ts CHANGED
@@ -14,3 +14,5 @@ export { ProgressBarAnimation } from './types/progressbar-animation.interface';
14
14
  export { ProgressBarModule } from './progressbar.module';
15
15
  export { CircularProgressbarCenterTemplateDirective } from './circularprogressbar/center-template.directive';
16
16
  export { ProgressColor } from './circularprogressbar/models/circular-progressbar-progress-color-interface';
17
+ export { LocalizedProgressBarMessagesDirective } from './common/localization/localized-messages.directive';
18
+ export { ProgressBarCustomMessagesComponent } from './common/localization/custom-messages.component';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-progressbar",
3
- "version": "3.1.2-dev.202210121050",
3
+ "version": "3.1.2-dev.202211071017",
4
4
  "description": "Kendo UI Angular component starter template",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -4,7 +4,7 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { AnimationEndEvent } from './types/animation-end-event';
6
6
  import { ProgressBarBase } from './common/progressbar-base';
7
- import { NgZone, Renderer2, EventEmitter, SimpleChanges } from '@angular/core';
7
+ import { NgZone, Renderer2, ElementRef, EventEmitter, SimpleChanges } from '@angular/core';
8
8
  import { LabelSettings } from './types/label-settings.interface';
9
9
  import { LocalizationService } from '@progress/kendo-angular-l10n';
10
10
  import { ProgressBarAnimation } from './types/progressbar-animation.interface';
@@ -28,8 +28,9 @@ import * as i0 from "@angular/core";
28
28
  */
29
29
  export declare class ProgressBarComponent extends ProgressBarBase {
30
30
  localization: LocalizationService;
31
+ elem: ElementRef;
32
+ renderer: Renderer2;
31
33
  private zone;
32
- private renderer;
33
34
  /**
34
35
  * Determines whether the status label will be visible.
35
36
  * Defaults to `true`&mdash;the label will be visible and displayed with the default
@@ -39,7 +40,7 @@ export declare class ProgressBarComponent extends ProgressBarBase {
39
40
  /**
40
41
  * The CSS styles that will be rendered on the inner element which represents the full portion of the progress bar
41
42
  * ([see example]({% slug progressbar_appearance %})).
42
- * Supports the type of values that are supported by [`ngStyle`]({{ site.data.urls.angular['ngstyleapi'] }}).
43
+ * Supports the type of values that are supported by [`ngStyle`](link:site.data.urls.angular['ngstyleapi']).
43
44
  */
44
45
  progressCssStyle: {
45
46
  [key: string]: string;
@@ -47,7 +48,7 @@ export declare class ProgressBarComponent extends ProgressBarBase {
47
48
  /**
48
49
  * The CSS classes that will be rendered on the inner element which represents the full portion of the progress bar
49
50
  * ([see example]({% slug progressbar_appearance %})).
50
- * Supports the type of values that are supported by [`ngClass`]({{ site.data.urls.angular['ngclassapi'] }}).
51
+ * Supports the type of values that are supported by [`ngClass`](link:site.data.urls.angular['ngclassapi']).
51
52
  */
52
53
  progressCssClass: string | string[] | Set<string> | {
53
54
  [key: string]: any;
@@ -55,7 +56,7 @@ export declare class ProgressBarComponent extends ProgressBarBase {
55
56
  /**
56
57
  * The CSS styles that will be rendered on the inner element which represents the empty portion of the progress bar
57
58
  * ([see example]({% slug progressbar_appearance %})).
58
- * Supports the type of values that are supported by [`ngStyle`]({{ site.data.urls.angular['ngstyleapi'] }}).
59
+ * Supports the type of values that are supported by [`ngStyle`](link:site.data.urls.angular['ngstyleapi']).
59
60
  */
60
61
  emptyCssStyle: {
61
62
  [key: string]: string;
@@ -63,7 +64,7 @@ export declare class ProgressBarComponent extends ProgressBarBase {
63
64
  /**
64
65
  * The CSS classes that will be rendered on the inner element which represents the empty portion of the progress bar
65
66
  * ([see example]({% slug progressbar_appearance %})).
66
- * Supports the type of values that are supported by [`ngClass`]({{ site.data.urls.angular['ngclassapi'] }}).
67
+ * Supports the type of values that are supported by [`ngClass`](link:site.data.urls.angular['ngclassapi']).
67
68
  */
68
69
  emptyCssClass: string | string[] | Set<string> | {
69
70
  [key: string]: any;
@@ -109,7 +110,7 @@ export declare class ProgressBarComponent extends ProgressBarBase {
109
110
  /**
110
111
  * @hidden
111
112
  */
112
- constructor(localization: LocalizationService, zone: NgZone, renderer: Renderer2);
113
+ constructor(localization: LocalizationService, elem: ElementRef, renderer: Renderer2, zone: NgZone);
113
114
  /**
114
115
  * @hidden
115
116
  */
@@ -7,10 +7,12 @@ import * as i1 from "./progressbar.component";
7
7
  import * as i2 from "./chunk/chunk-progressbar.component";
8
8
  import * as i3 from "./circularprogressbar/circular-progressbar.component";
9
9
  import * as i4 from "./circularprogressbar/center-template.directive";
10
- import * as i5 from "@angular/common";
11
- import * as i6 from "@progress/kendo-angular-common";
10
+ import * as i5 from "./common/localization/localized-messages.directive";
11
+ import * as i6 from "./common/localization/custom-messages.component";
12
+ import * as i7 from "@angular/common";
13
+ import * as i8 from "@progress/kendo-angular-common";
12
14
  /**
13
- * Represents the [NgModule]({{ site.data.urls.angular['ngmodules'] }})
15
+ * Represents the [NgModule](link:site.data.urls.angular['ngmodules'])
14
16
  * definition for the ProgressBar components.
15
17
  *
16
18
  * @example
@@ -42,6 +44,6 @@ import * as i6 from "@progress/kendo-angular-common";
42
44
  */
43
45
  export declare class ProgressBarModule {
44
46
  static ɵfac: i0.ɵɵFactoryDeclaration<ProgressBarModule, never>;
45
- static ɵmod: i0.ɵɵNgModuleDeclaration<ProgressBarModule, [typeof i1.ProgressBarComponent, typeof i2.ChunkProgressBarComponent, typeof i3.CircularProgressBarComponent, typeof i4.CircularProgressbarCenterTemplateDirective], [typeof i5.CommonModule, typeof i6.ResizeSensorModule], [typeof i1.ProgressBarComponent, typeof i2.ChunkProgressBarComponent, typeof i3.CircularProgressBarComponent, typeof i4.CircularProgressbarCenterTemplateDirective]>;
47
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ProgressBarModule, [typeof i1.ProgressBarComponent, typeof i2.ChunkProgressBarComponent, typeof i3.CircularProgressBarComponent, typeof i4.CircularProgressbarCenterTemplateDirective, typeof i5.LocalizedProgressBarMessagesDirective, typeof i6.ProgressBarCustomMessagesComponent], [typeof i7.CommonModule, typeof i8.ResizeSensorModule], [typeof i1.ProgressBarComponent, typeof i2.ChunkProgressBarComponent, typeof i3.CircularProgressBarComponent, typeof i4.CircularProgressbarCenterTemplateDirective, typeof i5.LocalizedProgressBarMessagesDirective, typeof i6.ProgressBarCustomMessagesComponent]>;
46
48
  static ɵinj: i0.ɵɵInjectorDeclaration<ProgressBarModule>;
47
49
  }