@progress/kendo-angular-progressbar 3.1.2-dev.202211170812 → 11.0.0-develop.79
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/NOTICE.txt +3 -3
- package/chunk/chunk-progressbar.component.d.ts +8 -4
- package/circularprogressbar/center-template.directive.d.ts +3 -3
- package/circularprogressbar/circular-progressbar.component.d.ts +2 -2
- package/circularprogressbar/models/center-template-context.interface.d.ts +1 -1
- package/circularprogressbar/models/circular-progressbar-progress-color-interface.d.ts +1 -1
- package/common/constants.d.ts +1 -1
- package/common/localization/custom-messages.component.d.ts +1 -1
- package/common/localization/localized-messages.directive.d.ts +1 -1
- package/common/localization/messages.d.ts +2 -2
- package/common/progressbar-base.d.ts +1 -1
- package/common/util.d.ts +16 -6
- package/{esm2015/chunk/chunk-progressbar.component.js → esm2020/chunk/chunk-progressbar.component.mjs} +18 -13
- package/{esm2015/circularprogressbar/center-template.directive.js → esm2020/circularprogressbar/center-template.directive.mjs} +5 -5
- package/{esm2015/circularprogressbar/circular-progressbar.component.js → esm2020/circularprogressbar/circular-progressbar.component.mjs} +29 -26
- package/{esm2015/circularprogressbar/models/center-template-context.interface.js → esm2020/circularprogressbar/models/center-template-context.interface.mjs} +1 -1
- package/{esm2015/circularprogressbar/models/circular-progressbar-progress-color-interface.js → esm2020/circularprogressbar/models/circular-progressbar-progress-color-interface.mjs} +1 -1
- package/{esm2015/common/constants.js → esm2020/common/constants.mjs} +1 -1
- package/{esm2015/common/localization/custom-messages.component.js → esm2020/common/localization/custom-messages.component.mjs} +5 -4
- package/{esm2015/common/localization/localized-messages.directive.js → esm2020/common/localization/localized-messages.directive.mjs} +5 -4
- package/{esm2015/common/localization/messages.js → esm2020/common/localization/messages.mjs} +5 -8
- package/{esm2015/common/progressbar-base.js → esm2020/common/progressbar-base.mjs} +9 -8
- package/{esm2015/common/util.js → esm2020/common/util.mjs} +5 -5
- package/{esm2015/main.js → esm2020/index.mjs} +1 -1
- package/{esm2015/package-metadata.js → esm2020/package-metadata.mjs} +3 -3
- package/{esm2015/kendo-angular-progressbar.js → esm2020/progress-kendo-angular-progressbar.mjs} +2 -2
- package/{esm2015/progressbar.component.js → esm2020/progressbar.component.mjs} +8 -8
- package/{esm2015/progressbar.module.js → esm2020/progressbar.module.mjs} +5 -5
- package/{esm2015/types/label-fn-type.js → esm2020/types/animation-end-event.mjs} +1 -1
- package/{esm2015/types/animation-end-event.js → esm2020/types/animation-options.interface.mjs} +1 -1
- package/{esm2015/types/animation-options.interface.js → esm2020/types/label-fn-type.mjs} +1 -1
- package/esm2020/types/label-position.mjs +5 -0
- package/esm2020/types/label-settings.interface.mjs +5 -0
- package/esm2020/types/label-type.mjs +5 -0
- package/esm2020/types/progressbar-animation.interface.mjs +5 -0
- package/esm2020/types/progressbar-orientation.mjs +5 -0
- package/fesm2015/{kendo-angular-progressbar.js → progress-kendo-angular-progressbar.mjs} +79 -74
- package/fesm2020/progress-kendo-angular-progressbar.mjs +1456 -0
- package/{main.d.ts → index.d.ts} +1 -1
- package/package-metadata.d.ts +1 -1
- package/package.json +28 -54
- package/{kendo-angular-progressbar.d.ts → progress-kendo-angular-progressbar.d.ts} +2 -2
- package/progressbar.component.d.ts +1 -1
- package/progressbar.module.d.ts +1 -1
- package/schematics/ngAdd/index.js +1 -5
- package/types/animation-end-event.d.ts +1 -1
- package/types/animation-options.interface.d.ts +1 -1
- package/types/label-fn-type.d.ts +1 -1
- package/types/label-position.d.ts +1 -1
- package/types/label-settings.interface.d.ts +1 -1
- package/types/label-type.d.ts +1 -1
- package/types/progressbar-animation.interface.d.ts +1 -1
- package/types/progressbar-orientation.d.ts +1 -1
- package/bundles/kendo-angular-progressbar.umd.js +0 -5
- package/esm2015/types/label-position.js +0 -5
- package/esm2015/types/label-settings.interface.js +0 -5
- package/esm2015/types/label-type.js +0 -5
- package/esm2015/types/progressbar-animation.interface.js +0 -5
- package/esm2015/types/progressbar-orientation.js +0 -5
- package/schematics/ngAdd/index.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2022 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
@@ -8,7 +8,7 @@ import { validatePackage } from '@progress/kendo-licensing';
|
|
|
8
8
|
import * as i1 from '@progress/kendo-angular-l10n';
|
|
9
9
|
import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
10
10
|
import * as i2 from '@progress/kendo-angular-common';
|
|
11
|
-
import { hasObservers, isChanged, ResizeSensorModule } from '@progress/kendo-angular-common';
|
|
11
|
+
import { hasObservers, isDocumentAvailable, isChanged, ResizeSensorModule } from '@progress/kendo-angular-common';
|
|
12
12
|
import * as i3 from '@angular/common';
|
|
13
13
|
import { CommonModule } from '@angular/common';
|
|
14
14
|
import { Subscription } from 'rxjs';
|
|
@@ -21,9 +21,9 @@ 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: 1672320708,
|
|
25
25
|
version: '',
|
|
26
|
-
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license
|
|
26
|
+
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
/**
|
|
@@ -105,13 +105,13 @@ const extractValueFromChanges = (changes, type, value) => changes[type] && chang
|
|
|
105
105
|
/**
|
|
106
106
|
* @hidden
|
|
107
107
|
*/
|
|
108
|
-
const runAnimation = (changes, animation, previousValue, displayValue) => animation && typeof requestAnimationFrame !== 'undefined' && changes
|
|
108
|
+
const runAnimation = (changes, animation, previousValue, displayValue) => animation && typeof requestAnimationFrame !== 'undefined' && changes['value'] && previousValue !== displayValue;
|
|
109
109
|
/**
|
|
110
110
|
* @hidden
|
|
111
111
|
*/
|
|
112
112
|
const stopCurrentAnimation = (changes) => {
|
|
113
|
-
const isAnimationChanged = Boolean(changes
|
|
114
|
-
const hasAnimation = isAnimationChanged && changes
|
|
113
|
+
const isAnimationChanged = Boolean(changes['animation']);
|
|
114
|
+
const hasAnimation = isAnimationChanged && changes['animation'].currentValue;
|
|
115
115
|
return isAnimationChanged && !hasAnimation;
|
|
116
116
|
};
|
|
117
117
|
/**
|
|
@@ -134,7 +134,7 @@ const removeProgressBarStyles = (props, renderer) => {
|
|
|
134
134
|
* @hidden
|
|
135
135
|
*/
|
|
136
136
|
const hasElementSize = (element) => {
|
|
137
|
-
return element.style.width && element.style.height;
|
|
137
|
+
return !!(element.style.width && element.style.height);
|
|
138
138
|
};
|
|
139
139
|
|
|
140
140
|
/**
|
|
@@ -271,11 +271,11 @@ class ProgressBarBase {
|
|
|
271
271
|
const min = extractValueFromChanges(changes, 'min', this.min);
|
|
272
272
|
const max = extractValueFromChanges(changes, 'max', this.max);
|
|
273
273
|
const value = extractValueFromChanges(changes, 'value', this.value);
|
|
274
|
-
if (changes
|
|
275
|
-
if (changes
|
|
274
|
+
if (changes['min'] || changes['max'] || changes['value']) {
|
|
275
|
+
if (changes['min'] || changes['max']) {
|
|
276
276
|
validateRange(min, max);
|
|
277
277
|
}
|
|
278
|
-
if (changes
|
|
278
|
+
if (changes['value']) {
|
|
279
279
|
if (value == null || Number.isNaN(value)) {
|
|
280
280
|
this.value = min;
|
|
281
281
|
}
|
|
@@ -294,9 +294,9 @@ class ProgressBarBase {
|
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
|
-
ProgressBarBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
298
|
-
ProgressBarBase.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
299
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
297
|
+
ProgressBarBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", 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: "13.3.11", 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 });
|
|
299
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ProgressBarBase, decorators: [{
|
|
300
300
|
type: Component,
|
|
301
301
|
args: [{
|
|
302
302
|
template: ''
|
|
@@ -355,14 +355,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
355
355
|
*/
|
|
356
356
|
class ProgressBarMessages extends ComponentMessages {
|
|
357
357
|
}
|
|
358
|
-
ProgressBarMessages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
359
|
-
ProgressBarMessages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
360
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
358
|
+
ProgressBarMessages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ProgressBarMessages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
359
|
+
ProgressBarMessages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: ProgressBarMessages, inputs: { progressBarLabel: "progressBarLabel" }, usesInheritance: true, ngImport: i0 });
|
|
360
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ProgressBarMessages, decorators: [{
|
|
361
361
|
type: Directive,
|
|
362
|
-
args: [{
|
|
363
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
364
|
-
selector: 'kendo-progressbar-messages-base'
|
|
365
|
-
}]
|
|
362
|
+
args: [{}]
|
|
366
363
|
}], propDecorators: { progressBarLabel: [{
|
|
367
364
|
type: Input
|
|
368
365
|
}] } });
|
|
@@ -376,14 +373,14 @@ class LocalizedProgressBarMessagesDirective extends ProgressBarMessages {
|
|
|
376
373
|
this.service = service;
|
|
377
374
|
}
|
|
378
375
|
}
|
|
379
|
-
LocalizedProgressBarMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
380
|
-
LocalizedProgressBarMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
376
|
+
LocalizedProgressBarMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LocalizedProgressBarMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
377
|
+
LocalizedProgressBarMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: LocalizedProgressBarMessagesDirective, selector: "[kendoProgressBarLocalizedMessages]", providers: [
|
|
381
378
|
{
|
|
382
379
|
provide: ProgressBarMessages,
|
|
383
380
|
useExisting: forwardRef(() => LocalizedProgressBarMessagesDirective)
|
|
384
381
|
}
|
|
385
382
|
], usesInheritance: true, ngImport: i0 });
|
|
386
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
383
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: LocalizedProgressBarMessagesDirective, decorators: [{
|
|
387
384
|
type: Directive,
|
|
388
385
|
args: [{
|
|
389
386
|
providers: [
|
|
@@ -499,7 +496,7 @@ class ProgressBarComponent extends ProgressBarBase {
|
|
|
499
496
|
if (this.isAnimationInProgress && stopCurrentAnimation(changes)) {
|
|
500
497
|
this.cancelCurrentAnimation = true;
|
|
501
498
|
}
|
|
502
|
-
if (runAnimation(changes, this.animation, this.previousValue, this.displayValue) && !changes
|
|
499
|
+
if (runAnimation(changes, this.animation, this.previousValue, this.displayValue) && !changes['value'].firstChange) {
|
|
503
500
|
this.startAnimation(this.previousValue);
|
|
504
501
|
}
|
|
505
502
|
}
|
|
@@ -603,8 +600,8 @@ class ProgressBarComponent extends ProgressBarBase {
|
|
|
603
600
|
});
|
|
604
601
|
}
|
|
605
602
|
}
|
|
606
|
-
ProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
607
|
-
ProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
603
|
+
ProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ProgressBarComponent, deps: [{ token: i1.LocalizationService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
604
|
+
ProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ProgressBarComponent, selector: "kendo-progressbar", inputs: { label: "label", progressCssStyle: "progressCssStyle", progressCssClass: "progressCssClass", emptyCssStyle: "emptyCssStyle", emptyCssClass: "emptyCssClass", animation: "animation" }, outputs: { animationEnd: "animationEnd" }, providers: [
|
|
608
605
|
LocalizationService,
|
|
609
606
|
{
|
|
610
607
|
provide: L10N_PREFIX,
|
|
@@ -626,7 +623,7 @@ ProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
|
|
|
626
623
|
</span>
|
|
627
624
|
<div
|
|
628
625
|
#progressStatus
|
|
629
|
-
class="k-selected"
|
|
626
|
+
class="k-selected k-progressbar-value"
|
|
630
627
|
[class.k-complete]="isCompleted"
|
|
631
628
|
[ngStyle]="progressCssStyle"
|
|
632
629
|
[ngClass]="progressCssClass"
|
|
@@ -646,7 +643,7 @@ ProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", v
|
|
|
646
643
|
</span>
|
|
647
644
|
</div>
|
|
648
645
|
`, 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"] }] });
|
|
649
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
646
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ProgressBarComponent, decorators: [{
|
|
650
647
|
type: Component,
|
|
651
648
|
args: [{
|
|
652
649
|
exportAs: 'kendoProgressBar',
|
|
@@ -667,7 +664,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
667
664
|
</span>
|
|
668
665
|
<div
|
|
669
666
|
#progressStatus
|
|
670
|
-
class="k-selected"
|
|
667
|
+
class="k-selected k-progressbar-value"
|
|
671
668
|
[class.k-complete]="isCompleted"
|
|
672
669
|
[ngStyle]="progressCssStyle"
|
|
673
670
|
[ngClass]="progressCssClass"
|
|
@@ -743,13 +740,15 @@ class ChunkProgressBarComponent extends ProgressBarBase {
|
|
|
743
740
|
this.localization = localization;
|
|
744
741
|
this.elem = elem;
|
|
745
742
|
this.renderer = renderer;
|
|
743
|
+
this.chunkClass = true;
|
|
746
744
|
/**
|
|
747
745
|
* Sets the number of chunks into which the ChunkProgressBar will be split.
|
|
748
746
|
* Defaults to `5`.
|
|
749
747
|
*/
|
|
750
748
|
this.chunkCount = 5;
|
|
751
749
|
this._orientationStyles = {
|
|
752
|
-
width: `${this.chunkSizePercentage}
|
|
750
|
+
width: `${this.chunkSizePercentage}%`,
|
|
751
|
+
height: null
|
|
753
752
|
};
|
|
754
753
|
}
|
|
755
754
|
/**
|
|
@@ -779,17 +778,17 @@ class ChunkProgressBarComponent extends ProgressBarBase {
|
|
|
779
778
|
get orientationStyles() {
|
|
780
779
|
if (this.orientation === 'horizontal') {
|
|
781
780
|
this._orientationStyles.width = `${this.chunkSizePercentage}%`;
|
|
782
|
-
this._orientationStyles.height =
|
|
781
|
+
this._orientationStyles.height = null;
|
|
783
782
|
}
|
|
784
783
|
else {
|
|
785
784
|
this._orientationStyles.height = `${this.chunkSizePercentage}%`;
|
|
786
|
-
this._orientationStyles.width =
|
|
785
|
+
this._orientationStyles.width = null;
|
|
787
786
|
}
|
|
788
787
|
return this._orientationStyles;
|
|
789
788
|
}
|
|
790
789
|
}
|
|
791
|
-
ChunkProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
792
|
-
ChunkProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
790
|
+
ChunkProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChunkProgressBarComponent, deps: [{ token: i1.LocalizationService }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
791
|
+
ChunkProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ChunkProgressBarComponent, selector: "kendo-chunkprogressbar", inputs: { chunkCount: "chunkCount", progressCssStyle: "progressCssStyle", progressCssClass: "progressCssClass", emptyCssStyle: "emptyCssStyle", emptyCssClass: "emptyCssClass" }, host: { properties: { "class.k-chunk-progressbar": "this.chunkClass" } }, providers: [
|
|
793
792
|
LocalizationService,
|
|
794
793
|
{
|
|
795
794
|
provide: L10N_PREFIX,
|
|
@@ -801,8 +800,8 @@ ChunkProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.
|
|
|
801
800
|
progressBarLabel="Chunk progressbar"
|
|
802
801
|
>
|
|
803
802
|
</ng-container>
|
|
804
|
-
<ul class="k-reset">
|
|
805
|
-
<li class="k-
|
|
803
|
+
<ul class="k-reset k-progressbar-chunks">
|
|
804
|
+
<li class="k-progressbar-chunk" *ngFor="let chunk of chunks; let i = index;"
|
|
806
805
|
[class.k-first]="i === 0"
|
|
807
806
|
[class.k-last]="i === chunkCount - 1"
|
|
808
807
|
[class.k-selected]="chunk"
|
|
@@ -814,7 +813,7 @@ ChunkProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.
|
|
|
814
813
|
</li>
|
|
815
814
|
</ul>
|
|
816
815
|
`, 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"] }] });
|
|
817
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
816
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ChunkProgressBarComponent, decorators: [{
|
|
818
817
|
type: Component,
|
|
819
818
|
args: [{
|
|
820
819
|
exportAs: 'kendoChunkProgressBar',
|
|
@@ -825,8 +824,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
825
824
|
progressBarLabel="Chunk progressbar"
|
|
826
825
|
>
|
|
827
826
|
</ng-container>
|
|
828
|
-
<ul class="k-reset">
|
|
829
|
-
<li class="k-
|
|
827
|
+
<ul class="k-reset k-progressbar-chunks">
|
|
828
|
+
<li class="k-progressbar-chunk" *ngFor="let chunk of chunks; let i = index;"
|
|
830
829
|
[class.k-first]="i === 0"
|
|
831
830
|
[class.k-last]="i === chunkCount - 1"
|
|
832
831
|
[class.k-selected]="chunk"
|
|
@@ -846,7 +845,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
846
845
|
}
|
|
847
846
|
]
|
|
848
847
|
}]
|
|
849
|
-
}], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: {
|
|
848
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { chunkClass: [{
|
|
849
|
+
type: HostBinding,
|
|
850
|
+
args: ['class.k-chunk-progressbar']
|
|
851
|
+
}], chunkCount: [{
|
|
850
852
|
type: Input
|
|
851
853
|
}], progressCssStyle: [{
|
|
852
854
|
type: Input
|
|
@@ -867,9 +869,9 @@ class CircularProgressbarCenterTemplateDirective {
|
|
|
867
869
|
this.templateRef = templateRef;
|
|
868
870
|
}
|
|
869
871
|
}
|
|
870
|
-
CircularProgressbarCenterTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
871
|
-
CircularProgressbarCenterTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "
|
|
872
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
872
|
+
CircularProgressbarCenterTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CircularProgressbarCenterTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
873
|
+
CircularProgressbarCenterTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: CircularProgressbarCenterTemplateDirective, selector: "[kendoCircularProgressbarCenterTemplate]", ngImport: i0 });
|
|
874
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CircularProgressbarCenterTemplateDirective, decorators: [{
|
|
873
875
|
type: Directive,
|
|
874
876
|
args: [{
|
|
875
877
|
selector: '[kendoCircularProgressbarCenterTemplate]'
|
|
@@ -994,6 +996,9 @@ class CircularProgressBarComponent {
|
|
|
994
996
|
return this._indeterminate;
|
|
995
997
|
}
|
|
996
998
|
ngAfterViewInit() {
|
|
999
|
+
if (!isDocumentAvailable()) {
|
|
1000
|
+
return;
|
|
1001
|
+
}
|
|
997
1002
|
const elem = this.element.nativeElement;
|
|
998
1003
|
const ariaLabel = this.localization.get('progressBarLabel');
|
|
999
1004
|
this.renderer.setAttribute(elem, 'aria-label', ariaLabel);
|
|
@@ -1007,14 +1012,14 @@ class CircularProgressBarComponent {
|
|
|
1007
1012
|
}
|
|
1008
1013
|
else {
|
|
1009
1014
|
const value = this.value - this.min;
|
|
1010
|
-
this.internalValue = changes
|
|
1015
|
+
this.internalValue = changes['value'].currentValue;
|
|
1011
1016
|
this.calculateProgress(value);
|
|
1012
1017
|
}
|
|
1013
1018
|
}
|
|
1014
|
-
if (changes
|
|
1015
|
-
setProgressBarStyles([{ method: 'setAttribute', el: this.progress.nativeElement, attr: 'opacity', attrValue: this.opacity }], this.renderer);
|
|
1019
|
+
if (changes['opacity'] && this.progress) {
|
|
1020
|
+
setProgressBarStyles([{ method: 'setAttribute', el: this.progress.nativeElement, attr: 'opacity', attrValue: this.opacity.toString() }], this.renderer);
|
|
1016
1021
|
}
|
|
1017
|
-
if (changes
|
|
1022
|
+
if (changes['indeterminate'] && !changes['indeterminate'].firstChange) {
|
|
1018
1023
|
this.indeterminateState();
|
|
1019
1024
|
}
|
|
1020
1025
|
}
|
|
@@ -1024,7 +1029,7 @@ class CircularProgressBarComponent {
|
|
|
1024
1029
|
/**
|
|
1025
1030
|
* @hidden
|
|
1026
1031
|
*/
|
|
1027
|
-
onResize(
|
|
1032
|
+
onResize() {
|
|
1028
1033
|
this.setStyles();
|
|
1029
1034
|
const value = this.animation ? this.internalValue : this.value;
|
|
1030
1035
|
this.calculateProgress(value);
|
|
@@ -1059,8 +1064,8 @@ class CircularProgressBarComponent {
|
|
|
1059
1064
|
const dir = this.rtl ? circumference * -1 : circumference;
|
|
1060
1065
|
const strokeDashOffest = circumference - dir * (value / (this.max - this.min));
|
|
1061
1066
|
const progressCalculations = [
|
|
1062
|
-
{ method: 'setStyle', el: progressArc, attr: 'strokeDasharray', attrValue: circumference },
|
|
1063
|
-
{ method: 'setStyle', el: progressArc, attr: 'strokeDashoffset', attrValue: strokeDashOffest }
|
|
1067
|
+
{ method: 'setStyle', el: progressArc, attr: 'strokeDasharray', attrValue: circumference.toString() },
|
|
1068
|
+
{ method: 'setStyle', el: progressArc, attr: 'strokeDashoffset', attrValue: strokeDashOffest.toString() }
|
|
1064
1069
|
];
|
|
1065
1070
|
setProgressBarStyles(progressCalculations, this.renderer);
|
|
1066
1071
|
}
|
|
@@ -1105,23 +1110,23 @@ class CircularProgressBarComponent {
|
|
|
1105
1110
|
setProgressBarStyles(surfaceSize, this.renderer);
|
|
1106
1111
|
}
|
|
1107
1112
|
const attributesArray = [
|
|
1108
|
-
{ method: 'setAttribute', el: progressArc, attr: 'r', attrValue: (elWidth / 2) - 10 },
|
|
1109
|
-
{ method: 'setAttribute', el: progressArc, attr: 'cx', attrValue: (elWidth / 2) },
|
|
1110
|
-
{ method: 'setAttribute', el: progressArc, attr: 'cy', attrValue: (elWidth / 2) },
|
|
1111
|
-
{ method: 'setAttribute', el: progressArc, attr: 'opacity', attrValue: this.opacity },
|
|
1112
|
-
{ method: 'setAttribute', el: scale, attr: 'r', attrValue: (elWidth / 2) - 10 },
|
|
1113
|
-
{ method: 'setAttribute', el: scale, attr: 'cx', attrValue: (elWidth / 2) },
|
|
1114
|
-
{ method: 'setAttribute', el: scale, attr: 'cy', attrValue: (elWidth / 2) }
|
|
1113
|
+
{ method: 'setAttribute', el: progressArc, attr: 'r', attrValue: String((elWidth / 2) - 10) },
|
|
1114
|
+
{ method: 'setAttribute', el: progressArc, attr: 'cx', attrValue: String((elWidth / 2)) },
|
|
1115
|
+
{ method: 'setAttribute', el: progressArc, attr: 'cy', attrValue: String((elWidth / 2)) },
|
|
1116
|
+
{ method: 'setAttribute', el: progressArc, attr: 'opacity', attrValue: String(this.opacity) },
|
|
1117
|
+
{ method: 'setAttribute', el: scale, attr: 'r', attrValue: String((elWidth / 2) - 10) },
|
|
1118
|
+
{ method: 'setAttribute', el: scale, attr: 'cx', attrValue: String(elWidth / 2) },
|
|
1119
|
+
{ method: 'setAttribute', el: scale, attr: 'cy', attrValue: String(elWidth / 2) }
|
|
1115
1120
|
];
|
|
1116
1121
|
setProgressBarStyles(attributesArray, this.renderer);
|
|
1117
1122
|
}
|
|
1118
1123
|
indeterminateState() {
|
|
1119
1124
|
const progressArc = this.progress.nativeElement;
|
|
1120
1125
|
if (this.indeterminate) {
|
|
1121
|
-
// the indeterminate state wont work as the `k-circular-progressbar-arc` has a transform: rotate(-90deg) which is
|
|
1126
|
+
// the indeterminate state wont work as the `k-circular-progressbar-arc` has a transform: rotate(-90deg) which is
|
|
1122
1127
|
// interfering with the svg animation as the animateTransform brings its own transform: rotate()
|
|
1123
1128
|
// This will be like this until the themes release a new version, bringing a new class `k-circular-progressbar-indeterminate-arc`
|
|
1124
|
-
// containing only the necassery CSS styles and we will switch between them when the state of the progressbar is switched.
|
|
1129
|
+
// containing only the necassery CSS styles and we will switch between them when the state of the progressbar is switched.
|
|
1125
1130
|
this.calculateProgress(this.value - this.min);
|
|
1126
1131
|
const rotate = this.rtl ? { from: 360, to: 0 } : { from: 0, to: 360 };
|
|
1127
1132
|
let color;
|
|
@@ -1196,8 +1201,8 @@ class CircularProgressBarComponent {
|
|
|
1196
1201
|
}
|
|
1197
1202
|
else {
|
|
1198
1203
|
for (let i = 0; i < this.progressColor.length; i++) {
|
|
1199
|
-
|
|
1200
|
-
|
|
1204
|
+
const from = this.progressColor[i].from;
|
|
1205
|
+
const to = this.progressColor[i].to;
|
|
1201
1206
|
if (value >= from && value <= to || (!from && value <= to)) {
|
|
1202
1207
|
this.renderer.setStyle(progressArc, 'stroke', this.progressColor[i].color);
|
|
1203
1208
|
break;
|
|
@@ -1236,8 +1241,8 @@ class CircularProgressBarComponent {
|
|
|
1236
1241
|
}
|
|
1237
1242
|
}
|
|
1238
1243
|
}
|
|
1239
|
-
CircularProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1240
|
-
CircularProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
1244
|
+
CircularProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CircularProgressBarComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i1.LocalizationService }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
1245
|
+
CircularProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", 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: [
|
|
1241
1246
|
LocalizationService,
|
|
1242
1247
|
{
|
|
1243
1248
|
provide: L10N_PREFIX,
|
|
@@ -1262,9 +1267,9 @@ CircularProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12
|
|
|
1262
1267
|
</div>
|
|
1263
1268
|
</div>
|
|
1264
1269
|
</div>
|
|
1265
|
-
<kendo-resize-sensor (resize)="onResize(
|
|
1270
|
+
<kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
|
|
1266
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"] }] });
|
|
1267
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1272
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CircularProgressBarComponent, decorators: [{
|
|
1268
1273
|
type: Component,
|
|
1269
1274
|
args: [{
|
|
1270
1275
|
exportAs: 'kendoCircularProgressBar',
|
|
@@ -1288,7 +1293,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1288
1293
|
</div>
|
|
1289
1294
|
</div>
|
|
1290
1295
|
</div>
|
|
1291
|
-
<kendo-resize-sensor (resize)="onResize(
|
|
1296
|
+
<kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
|
|
1292
1297
|
`, providers: [
|
|
1293
1298
|
LocalizationService,
|
|
1294
1299
|
{
|
|
@@ -1358,14 +1363,14 @@ class ProgressBarCustomMessagesComponent extends ProgressBarMessages {
|
|
|
1358
1363
|
return true;
|
|
1359
1364
|
}
|
|
1360
1365
|
}
|
|
1361
|
-
ProgressBarCustomMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1362
|
-
ProgressBarCustomMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "
|
|
1366
|
+
ProgressBarCustomMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ProgressBarCustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1367
|
+
ProgressBarCustomMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: ProgressBarCustomMessagesComponent, selector: "kendo-progressbar-messages", providers: [
|
|
1363
1368
|
{
|
|
1364
1369
|
provide: ProgressBarMessages,
|
|
1365
1370
|
useExisting: forwardRef(() => ProgressBarCustomMessagesComponent)
|
|
1366
1371
|
}
|
|
1367
1372
|
], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
|
|
1368
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1373
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ProgressBarCustomMessagesComponent, decorators: [{
|
|
1369
1374
|
type: Component,
|
|
1370
1375
|
args: [{
|
|
1371
1376
|
providers: [
|
|
@@ -1421,8 +1426,8 @@ const MODULES = [CommonModule, ResizeSensorModule];
|
|
|
1421
1426
|
*/
|
|
1422
1427
|
class ProgressBarModule {
|
|
1423
1428
|
}
|
|
1424
|
-
ProgressBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1425
|
-
ProgressBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
1429
|
+
ProgressBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ProgressBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1430
|
+
ProgressBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ProgressBarModule, declarations: [ProgressBarComponent,
|
|
1426
1431
|
ChunkProgressBarComponent,
|
|
1427
1432
|
CircularProgressBarComponent,
|
|
1428
1433
|
CircularProgressbarCenterTemplateDirective,
|
|
@@ -1433,8 +1438,8 @@ ProgressBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versi
|
|
|
1433
1438
|
CircularProgressbarCenterTemplateDirective,
|
|
1434
1439
|
LocalizedProgressBarMessagesDirective,
|
|
1435
1440
|
ProgressBarCustomMessagesComponent] });
|
|
1436
|
-
ProgressBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1437
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1441
|
+
ProgressBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ProgressBarModule, imports: [MODULES] });
|
|
1442
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: ProgressBarModule, decorators: [{
|
|
1438
1443
|
type: NgModule,
|
|
1439
1444
|
args: [{
|
|
1440
1445
|
declarations: COMPONENT_DIRECTIVES,
|