@progress/kendo-angular-progressbar 3.1.2-dev.202210121050 → 3.1.2-dev.202211080935
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/kendo-angular-progressbar.umd.js +1 -1
- package/chunk/chunk-progressbar.component.d.ts +8 -5
- package/circularprogressbar/circular-progressbar.component.d.ts +6 -2
- package/common/localization/custom-messages.component.d.ts +18 -0
- package/common/localization/localized-messages.directive.d.ts +16 -0
- package/common/localization/messages.d.ts +17 -0
- package/common/progressbar-base.d.ts +6 -3
- package/esm2015/chunk/chunk-progressbar.component.js +19 -6
- package/esm2015/circularprogressbar/circular-progressbar.component.js +44 -8
- package/esm2015/common/localization/custom-messages.component.js +41 -0
- package/esm2015/common/localization/localized-messages.directive.js +36 -0
- package/esm2015/common/localization/messages.js +23 -0
- package/esm2015/common/progressbar-base.js +12 -8
- package/esm2015/main.js +2 -0
- package/esm2015/package-metadata.js +1 -1
- package/esm2015/progressbar.component.js +19 -7
- package/esm2015/progressbar.module.js +22 -3
- package/fesm2015/kendo-angular-progressbar.js +194 -35
- package/main.d.ts +2 -0
- package/package.json +1 -1
- package/progressbar.component.d.ts +8 -7
- package/progressbar.module.d.ts +6 -4
|
@@ -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,
|
|
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
|
|
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
|
|
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:
|
|
24
|
+
publishDate: 1667900115,
|
|
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.
|
|
151
|
+
this.hostClasses = true;
|
|
150
152
|
this.roleAttribute = 'progressbar';
|
|
151
153
|
/**
|
|
152
154
|
* The maximum value of the ProgressBar.
|
|
@@ -260,6 +262,11 @@ 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, 'aria-label', label);
|
|
269
|
+
}
|
|
263
270
|
ngOnChanges(changes) {
|
|
264
271
|
const min = extractValueFromChanges(changes, 'min', this.min);
|
|
265
272
|
const max = extractValueFromChanges(changes, 'max', this.max);
|
|
@@ -287,17 +294,14 @@ class ProgressBarBase {
|
|
|
287
294
|
}
|
|
288
295
|
}
|
|
289
296
|
}
|
|
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-
|
|
297
|
+
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 });
|
|
298
|
+
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
299
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProgressBarBase, decorators: [{
|
|
293
300
|
type: Component,
|
|
294
301
|
args: [{
|
|
295
302
|
template: ''
|
|
296
303
|
}]
|
|
297
|
-
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: {
|
|
298
|
-
type: HostBinding,
|
|
299
|
-
args: ['class.k-widget']
|
|
300
|
-
}, {
|
|
304
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1.LocalizationService }]; }, propDecorators: { hostClasses: [{
|
|
301
305
|
type: HostBinding,
|
|
302
306
|
args: ['class.k-progressbar']
|
|
303
307
|
}], isHorizontal: [{
|
|
@@ -346,6 +350,52 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
346
350
|
type: Input
|
|
347
351
|
}] } });
|
|
348
352
|
|
|
353
|
+
/**
|
|
354
|
+
* @hidden
|
|
355
|
+
*/
|
|
356
|
+
class ProgressBarMessages extends ComponentMessages {
|
|
357
|
+
}
|
|
358
|
+
ProgressBarMessages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProgressBarMessages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
359
|
+
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 });
|
|
360
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProgressBarMessages, decorators: [{
|
|
361
|
+
type: Directive,
|
|
362
|
+
args: [{
|
|
363
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
364
|
+
selector: 'kendo-progressbar-messages-base'
|
|
365
|
+
}]
|
|
366
|
+
}], propDecorators: { progressBarLabel: [{
|
|
367
|
+
type: Input
|
|
368
|
+
}] } });
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* @hidden
|
|
372
|
+
*/
|
|
373
|
+
class LocalizedProgressBarMessagesDirective extends ProgressBarMessages {
|
|
374
|
+
constructor(service) {
|
|
375
|
+
super();
|
|
376
|
+
this.service = service;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
LocalizedProgressBarMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LocalizedProgressBarMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
380
|
+
LocalizedProgressBarMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: LocalizedProgressBarMessagesDirective, selector: "[kendoProgressBarLocalizedMessages]", providers: [
|
|
381
|
+
{
|
|
382
|
+
provide: ProgressBarMessages,
|
|
383
|
+
useExisting: forwardRef(() => LocalizedProgressBarMessagesDirective)
|
|
384
|
+
}
|
|
385
|
+
], usesInheritance: true, ngImport: i0 });
|
|
386
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LocalizedProgressBarMessagesDirective, decorators: [{
|
|
387
|
+
type: Directive,
|
|
388
|
+
args: [{
|
|
389
|
+
providers: [
|
|
390
|
+
{
|
|
391
|
+
provide: ProgressBarMessages,
|
|
392
|
+
useExisting: forwardRef(() => LocalizedProgressBarMessagesDirective)
|
|
393
|
+
}
|
|
394
|
+
],
|
|
395
|
+
selector: `[kendoProgressBarLocalizedMessages]`
|
|
396
|
+
}]
|
|
397
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
|
|
398
|
+
|
|
349
399
|
/**
|
|
350
400
|
* Represents the [Kendo UI ProgressBar component for Angular]({% slug overview_progressbar %}).
|
|
351
401
|
*
|
|
@@ -367,11 +417,12 @@ class ProgressBarComponent extends ProgressBarBase {
|
|
|
367
417
|
/**
|
|
368
418
|
* @hidden
|
|
369
419
|
*/
|
|
370
|
-
constructor(localization,
|
|
371
|
-
super(localization);
|
|
420
|
+
constructor(localization, elem, renderer, zone) {
|
|
421
|
+
super(elem, renderer, localization);
|
|
372
422
|
this.localization = localization;
|
|
373
|
-
this.
|
|
423
|
+
this.elem = elem;
|
|
374
424
|
this.renderer = renderer;
|
|
425
|
+
this.zone = zone;
|
|
375
426
|
/**
|
|
376
427
|
* Determines whether the status label will be visible.
|
|
377
428
|
* Defaults to `true`—the label will be visible and displayed with the default
|
|
@@ -552,7 +603,7 @@ class ProgressBarComponent extends ProgressBarBase {
|
|
|
552
603
|
});
|
|
553
604
|
}
|
|
554
605
|
}
|
|
555
|
-
ProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProgressBarComponent, deps: [{ token: i1.LocalizationService }, { token: i0.
|
|
606
|
+
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
607
|
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
608
|
LocalizationService,
|
|
558
609
|
{
|
|
@@ -560,6 +611,11 @@ ProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
|
|
|
560
611
|
useValue: 'kendo.progressbar'
|
|
561
612
|
}
|
|
562
613
|
], 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: `
|
|
614
|
+
<ng-container kendoProgressBarLocalizedMessages
|
|
615
|
+
i18n-progressBarLabel="kendo.progressbar.progressBarLabel|The aria-label attribute for the ProgressBar component."
|
|
616
|
+
progressBarLabel="Progressbar"
|
|
617
|
+
>
|
|
618
|
+
</ng-container>
|
|
563
619
|
<span class="k-progress-status-wrap"
|
|
564
620
|
[class.k-progress-start]="isPositionStart"
|
|
565
621
|
[class.k-progress-center]="isPositionCenter"
|
|
@@ -589,13 +645,18 @@ ProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
|
|
|
589
645
|
<span *ngIf="showLabel" class="k-progress-status">{{formattedLabelValue}}</span>
|
|
590
646
|
</span>
|
|
591
647
|
</div>
|
|
592
|
-
`, isInline: true, directives: [{ type:
|
|
648
|
+
`, 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
649
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProgressBarComponent, decorators: [{
|
|
594
650
|
type: Component,
|
|
595
651
|
args: [{
|
|
596
652
|
exportAs: 'kendoProgressBar',
|
|
597
653
|
selector: 'kendo-progressbar',
|
|
598
654
|
template: `
|
|
655
|
+
<ng-container kendoProgressBarLocalizedMessages
|
|
656
|
+
i18n-progressBarLabel="kendo.progressbar.progressBarLabel|The aria-label attribute for the ProgressBar component."
|
|
657
|
+
progressBarLabel="Progressbar"
|
|
658
|
+
>
|
|
659
|
+
</ng-container>
|
|
599
660
|
<span class="k-progress-status-wrap"
|
|
600
661
|
[class.k-progress-start]="isPositionStart"
|
|
601
662
|
[class.k-progress-center]="isPositionCenter"
|
|
@@ -634,7 +695,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
634
695
|
}
|
|
635
696
|
]
|
|
636
697
|
}]
|
|
637
|
-
}], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i0.
|
|
698
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }]; }, propDecorators: { label: [{
|
|
638
699
|
type: Input
|
|
639
700
|
}], progressCssStyle: [{
|
|
640
701
|
type: Input
|
|
@@ -677,9 +738,11 @@ class ChunkProgressBarComponent extends ProgressBarBase {
|
|
|
677
738
|
/**
|
|
678
739
|
* @hidden
|
|
679
740
|
*/
|
|
680
|
-
constructor(localization) {
|
|
681
|
-
super(localization);
|
|
741
|
+
constructor(localization, elem, renderer) {
|
|
742
|
+
super(elem, renderer, localization);
|
|
682
743
|
this.localization = localization;
|
|
744
|
+
this.elem = elem;
|
|
745
|
+
this.renderer = renderer;
|
|
683
746
|
/**
|
|
684
747
|
* Sets the number of chunks into which the ChunkProgressBar will be split.
|
|
685
748
|
* Defaults to `5`.
|
|
@@ -725,7 +788,7 @@ class ChunkProgressBarComponent extends ProgressBarBase {
|
|
|
725
788
|
return this._orientationStyles;
|
|
726
789
|
}
|
|
727
790
|
}
|
|
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 });
|
|
791
|
+
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
792
|
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
793
|
LocalizationService,
|
|
731
794
|
{
|
|
@@ -733,6 +796,11 @@ ChunkProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.
|
|
|
733
796
|
useValue: 'kendo.chunkprogressbar'
|
|
734
797
|
}
|
|
735
798
|
], exportAs: ["kendoChunkProgressBar"], usesInheritance: true, ngImport: i0, template: `
|
|
799
|
+
<ng-container kendoProgressBarLocalizedMessages
|
|
800
|
+
i18n-progressBarLabel="kendo.chunkprogressbar.progressBarLabel|The aria-label attribute for the ChunkProgressBar component."
|
|
801
|
+
progressBarLabel="Chunk progressbar"
|
|
802
|
+
>
|
|
803
|
+
</ng-container>
|
|
736
804
|
<ul class="k-reset">
|
|
737
805
|
<li class="k-item" *ngFor="let chunk of chunks; let i = index;"
|
|
738
806
|
[class.k-first]="i === 0"
|
|
@@ -745,13 +813,18 @@ ChunkProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.
|
|
|
745
813
|
>
|
|
746
814
|
</li>
|
|
747
815
|
</ul>
|
|
748
|
-
`, isInline: true, directives: [{ type:
|
|
816
|
+
`, 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
817
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChunkProgressBarComponent, decorators: [{
|
|
750
818
|
type: Component,
|
|
751
819
|
args: [{
|
|
752
820
|
exportAs: 'kendoChunkProgressBar',
|
|
753
821
|
selector: 'kendo-chunkprogressbar',
|
|
754
822
|
template: `
|
|
823
|
+
<ng-container kendoProgressBarLocalizedMessages
|
|
824
|
+
i18n-progressBarLabel="kendo.chunkprogressbar.progressBarLabel|The aria-label attribute for the ChunkProgressBar component."
|
|
825
|
+
progressBarLabel="Chunk progressbar"
|
|
826
|
+
>
|
|
827
|
+
</ng-container>
|
|
755
828
|
<ul class="k-reset">
|
|
756
829
|
<li class="k-item" *ngFor="let chunk of chunks; let i = index;"
|
|
757
830
|
[class.k-first]="i === 0"
|
|
@@ -773,7 +846,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
773
846
|
}
|
|
774
847
|
]
|
|
775
848
|
}]
|
|
776
|
-
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { chunkCount: [{
|
|
849
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { chunkCount: [{
|
|
777
850
|
type: Input
|
|
778
851
|
}], progressCssStyle: [{
|
|
779
852
|
type: Input
|
|
@@ -821,13 +894,14 @@ const DEFAULT_SURFACE_SIZE = 200;
|
|
|
821
894
|
* ```
|
|
822
895
|
*/
|
|
823
896
|
class CircularProgressBarComponent {
|
|
824
|
-
constructor(renderer, cdr,
|
|
897
|
+
constructor(renderer, cdr, localization, element, zone) {
|
|
825
898
|
this.renderer = renderer;
|
|
826
899
|
this.cdr = cdr;
|
|
827
|
-
this.
|
|
900
|
+
this.localization = localization;
|
|
828
901
|
this.element = element;
|
|
829
902
|
this.zone = zone;
|
|
830
903
|
this.hostClasses = true;
|
|
904
|
+
this.roleAttribute = 'progressbar';
|
|
831
905
|
/**
|
|
832
906
|
* Indicates whether an animation will be played on value changes.
|
|
833
907
|
*
|
|
@@ -852,7 +926,16 @@ class CircularProgressBarComponent {
|
|
|
852
926
|
this.internalValue = 0;
|
|
853
927
|
this.subscriptions = new Subscription();
|
|
854
928
|
validatePackage(packageMetadata);
|
|
855
|
-
this.subscriptions.add(this.
|
|
929
|
+
this.subscriptions.add(this.localization.changes.subscribe(this.rtlChange.bind(this)));
|
|
930
|
+
}
|
|
931
|
+
get ariaMinAttribute() {
|
|
932
|
+
return String(this.min);
|
|
933
|
+
}
|
|
934
|
+
get ariaMaxAttribute() {
|
|
935
|
+
return String(this.max);
|
|
936
|
+
}
|
|
937
|
+
get ariaValueAttribute() {
|
|
938
|
+
return this.indeterminate ? undefined : String(this.value);
|
|
856
939
|
}
|
|
857
940
|
/**
|
|
858
941
|
* Sets the default value of the Circular Progressbar between `min` and `max`.
|
|
@@ -911,6 +994,9 @@ class CircularProgressBarComponent {
|
|
|
911
994
|
return this._indeterminate;
|
|
912
995
|
}
|
|
913
996
|
ngAfterViewInit() {
|
|
997
|
+
const elem = this.element.nativeElement;
|
|
998
|
+
const ariaLabel = this.localization.get('progressBarLabel');
|
|
999
|
+
this.renderer.setAttribute(elem, 'aria-label', ariaLabel);
|
|
914
1000
|
this.initProgressArc();
|
|
915
1001
|
}
|
|
916
1002
|
ngOnChanges(changes) {
|
|
@@ -1136,7 +1222,7 @@ class CircularProgressBarComponent {
|
|
|
1136
1222
|
}
|
|
1137
1223
|
}
|
|
1138
1224
|
setDirection() {
|
|
1139
|
-
this.rtl = this.
|
|
1225
|
+
this.rtl = this.localization.rtl;
|
|
1140
1226
|
if (this.element) {
|
|
1141
1227
|
this.renderer.setAttribute(this.element.nativeElement, 'dir', this.rtl ? 'rtl' : 'ltr');
|
|
1142
1228
|
}
|
|
@@ -1145,19 +1231,24 @@ class CircularProgressBarComponent {
|
|
|
1145
1231
|
}
|
|
1146
1232
|
}
|
|
1147
1233
|
rtlChange() {
|
|
1148
|
-
if (this.element && this.rtl !== this.
|
|
1234
|
+
if (this.element && this.rtl !== this.localization.rtl) {
|
|
1149
1235
|
this.setDirection();
|
|
1150
1236
|
}
|
|
1151
1237
|
}
|
|
1152
1238
|
}
|
|
1153
1239
|
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: [
|
|
1240
|
+
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
1241
|
LocalizationService,
|
|
1156
1242
|
{
|
|
1157
1243
|
provide: L10N_PREFIX,
|
|
1158
1244
|
useValue: 'kendo.circularprogressbar'
|
|
1159
1245
|
}
|
|
1160
1246
|
], 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: `
|
|
1247
|
+
<ng-container kendoProgressBarLocalizedMessages
|
|
1248
|
+
i18n-progressBarLabel="kendo.circularprogressbar.progressBarLabel|The aria-label attribute for the Circular ProgressBar component."
|
|
1249
|
+
progressBarLabel="Circular progressbar"
|
|
1250
|
+
>
|
|
1251
|
+
</ng-container>
|
|
1161
1252
|
<div #surface class="k-circular-progressbar-surface">
|
|
1162
1253
|
<div>
|
|
1163
1254
|
<svg #svg>
|
|
@@ -1172,13 +1263,18 @@ CircularProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12
|
|
|
1172
1263
|
</div>
|
|
1173
1264
|
</div>
|
|
1174
1265
|
<kendo-resize-sensor (resize)="onResize($event)"></kendo-resize-sensor>
|
|
1175
|
-
`, isInline: true, components: [{ type: i2
|
|
1266
|
+
`, 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
1267
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CircularProgressBarComponent, decorators: [{
|
|
1177
1268
|
type: Component,
|
|
1178
1269
|
args: [{
|
|
1179
1270
|
exportAs: 'kendoCircularProgressBar',
|
|
1180
1271
|
selector: 'kendo-circularprogressbar',
|
|
1181
1272
|
template: `
|
|
1273
|
+
<ng-container kendoProgressBarLocalizedMessages
|
|
1274
|
+
i18n-progressBarLabel="kendo.circularprogressbar.progressBarLabel|The aria-label attribute for the Circular ProgressBar component."
|
|
1275
|
+
progressBarLabel="Circular progressbar"
|
|
1276
|
+
>
|
|
1277
|
+
</ng-container>
|
|
1182
1278
|
<div #surface class="k-circular-progressbar-surface">
|
|
1183
1279
|
<div>
|
|
1184
1280
|
<svg #svg>
|
|
@@ -1204,6 +1300,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1204
1300
|
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i1.LocalizationService }, { type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { hostClasses: [{
|
|
1205
1301
|
type: HostBinding,
|
|
1206
1302
|
args: ['class.k-circular-progressbar']
|
|
1303
|
+
}], ariaMinAttribute: [{
|
|
1304
|
+
type: HostBinding,
|
|
1305
|
+
args: ['attr.aria-valuemin']
|
|
1306
|
+
}], ariaMaxAttribute: [{
|
|
1307
|
+
type: HostBinding,
|
|
1308
|
+
args: ['attr.aria-valuemax']
|
|
1309
|
+
}], ariaValueAttribute: [{
|
|
1310
|
+
type: HostBinding,
|
|
1311
|
+
args: ['attr.aria-valuenow']
|
|
1312
|
+
}], roleAttribute: [{
|
|
1313
|
+
type: HostBinding,
|
|
1314
|
+
args: ['attr.role']
|
|
1207
1315
|
}], value: [{
|
|
1208
1316
|
type: Input
|
|
1209
1317
|
}], max: [{
|
|
@@ -1237,10 +1345,51 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1237
1345
|
args: [CircularProgressbarCenterTemplateDirective]
|
|
1238
1346
|
}] } });
|
|
1239
1347
|
|
|
1240
|
-
|
|
1348
|
+
/**
|
|
1349
|
+
* Custom component messages override default component messages
|
|
1350
|
+
* ([see example]({% slug rtl_layout %})).
|
|
1351
|
+
*/
|
|
1352
|
+
class ProgressBarCustomMessagesComponent extends ProgressBarMessages {
|
|
1353
|
+
constructor(service) {
|
|
1354
|
+
super();
|
|
1355
|
+
this.service = service;
|
|
1356
|
+
}
|
|
1357
|
+
get override() {
|
|
1358
|
+
return true;
|
|
1359
|
+
}
|
|
1360
|
+
}
|
|
1361
|
+
ProgressBarCustomMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProgressBarCustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1362
|
+
ProgressBarCustomMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ProgressBarCustomMessagesComponent, selector: "kendo-progressbar-messages", providers: [
|
|
1363
|
+
{
|
|
1364
|
+
provide: ProgressBarMessages,
|
|
1365
|
+
useExisting: forwardRef(() => ProgressBarCustomMessagesComponent)
|
|
1366
|
+
}
|
|
1367
|
+
], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
|
|
1368
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProgressBarCustomMessagesComponent, decorators: [{
|
|
1369
|
+
type: Component,
|
|
1370
|
+
args: [{
|
|
1371
|
+
providers: [
|
|
1372
|
+
{
|
|
1373
|
+
provide: ProgressBarMessages,
|
|
1374
|
+
useExisting: forwardRef(() => ProgressBarCustomMessagesComponent)
|
|
1375
|
+
}
|
|
1376
|
+
],
|
|
1377
|
+
selector: 'kendo-progressbar-messages',
|
|
1378
|
+
template: ``
|
|
1379
|
+
}]
|
|
1380
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
|
|
1381
|
+
|
|
1382
|
+
const COMPONENT_DIRECTIVES = [
|
|
1383
|
+
ProgressBarComponent,
|
|
1384
|
+
ChunkProgressBarComponent,
|
|
1385
|
+
CircularProgressBarComponent,
|
|
1386
|
+
CircularProgressbarCenterTemplateDirective,
|
|
1387
|
+
LocalizedProgressBarMessagesDirective,
|
|
1388
|
+
ProgressBarCustomMessagesComponent
|
|
1389
|
+
];
|
|
1241
1390
|
const MODULES = [CommonModule, ResizeSensorModule];
|
|
1242
1391
|
/**
|
|
1243
|
-
* Represents the [NgModule](
|
|
1392
|
+
* Represents the [NgModule](link:site.data.urls.angular['ngmodules'])
|
|
1244
1393
|
* definition for the ProgressBar components.
|
|
1245
1394
|
*
|
|
1246
1395
|
* @example
|
|
@@ -1273,7 +1422,17 @@ const MODULES = [CommonModule, ResizeSensorModule];
|
|
|
1273
1422
|
class ProgressBarModule {
|
|
1274
1423
|
}
|
|
1275
1424
|
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,
|
|
1425
|
+
ProgressBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProgressBarModule, declarations: [ProgressBarComponent,
|
|
1426
|
+
ChunkProgressBarComponent,
|
|
1427
|
+
CircularProgressBarComponent,
|
|
1428
|
+
CircularProgressbarCenterTemplateDirective,
|
|
1429
|
+
LocalizedProgressBarMessagesDirective,
|
|
1430
|
+
ProgressBarCustomMessagesComponent], imports: [CommonModule, ResizeSensorModule], exports: [ProgressBarComponent,
|
|
1431
|
+
ChunkProgressBarComponent,
|
|
1432
|
+
CircularProgressBarComponent,
|
|
1433
|
+
CircularProgressbarCenterTemplateDirective,
|
|
1434
|
+
LocalizedProgressBarMessagesDirective,
|
|
1435
|
+
ProgressBarCustomMessagesComponent] });
|
|
1277
1436
|
ProgressBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProgressBarModule, imports: [MODULES] });
|
|
1278
1437
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProgressBarModule, decorators: [{
|
|
1279
1438
|
type: NgModule,
|
|
@@ -1288,5 +1447,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1288
1447
|
* Generated bundle index. Do not edit.
|
|
1289
1448
|
*/
|
|
1290
1449
|
|
|
1291
|
-
export { ChunkProgressBarComponent, CircularProgressBarComponent, CircularProgressbarCenterTemplateDirective, ProgressBarComponent, ProgressBarModule };
|
|
1450
|
+
export { ChunkProgressBarComponent, CircularProgressBarComponent, CircularProgressbarCenterTemplateDirective, LocalizedProgressBarMessagesDirective, ProgressBarComponent, ProgressBarCustomMessagesComponent, ProgressBarModule };
|
|
1292
1451
|
|
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
|
@@ -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`—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`](
|
|
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`](
|
|
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`](
|
|
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`](
|
|
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,
|
|
113
|
+
constructor(localization: LocalizationService, elem: ElementRef, renderer: Renderer2, zone: NgZone);
|
|
113
114
|
/**
|
|
114
115
|
* @hidden
|
|
115
116
|
*/
|
package/progressbar.module.d.ts
CHANGED
|
@@ -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 "
|
|
11
|
-
import * as i6 from "
|
|
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](
|
|
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
|
|
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
|
}
|