@progress/kendo-angular-progressbar 2.0.4-dev.202202251420 → 3.0.0-dev.202204191148

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/bundles/kendo-angular-progressbar.umd.js +5 -0
  2. package/{dist/es2015/chunk → chunk}/chunk-progressbar.component.d.ts +6 -3
  3. package/{dist/es2015/common → common}/constants.d.ts +0 -0
  4. package/{dist/es2015/common → common}/progressbar-base.d.ts +19 -16
  5. package/{dist/es2015/common → common}/util.d.ts +0 -0
  6. package/{dist/es2015 → esm2015}/chunk/chunk-progressbar.component.js +51 -39
  7. package/{dist/es2015 → esm2015}/common/constants.js +0 -0
  8. package/{dist/es2015 → esm2015}/common/progressbar-base.js +61 -84
  9. package/{dist/es2015 → esm2015}/common/util.js +0 -3
  10. package/{dist/es2015/index.d.ts → esm2015/kendo-angular-progressbar.js} +0 -1
  11. package/{dist/es → esm2015}/main.js +0 -0
  12. package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
  13. package/{dist/es2015 → esm2015}/progressbar.component.js +79 -58
  14. package/{dist/es2015 → esm2015}/progressbar.module.js +14 -11
  15. package/{dist/es2015 → esm2015}/types/animation-end-event.js +1 -0
  16. package/{dist/es2015 → esm2015}/types/animation-options.interface.js +1 -0
  17. package/{dist/es2015 → esm2015}/types/label-fn-type.js +1 -0
  18. package/{dist/es → esm2015}/types/label-position.js +1 -0
  19. package/{dist/es → esm2015}/types/label-settings.interface.js +1 -0
  20. package/{dist/es → esm2015}/types/label-type.js +1 -0
  21. package/{dist/es → esm2015}/types/progressbar-animation.interface.js +1 -0
  22. package/{dist/es → esm2015}/types/progressbar-orientation.js +1 -0
  23. package/{dist/fesm2015/index.js → fesm2015/kendo-angular-progressbar.js} +201 -187
  24. package/{dist/es/index.js → kendo-angular-progressbar.d.ts} +1 -1
  25. package/{dist/es2015/main.d.ts → main.d.ts} +0 -0
  26. package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
  27. package/package.json +30 -102
  28. package/{dist/es2015/progressbar.component.d.ts → progressbar.component.d.ts} +10 -7
  29. package/{dist/es2015/progressbar.module.d.ts → progressbar.module.d.ts} +7 -0
  30. package/schematics/ngAdd/index.js +5 -2
  31. package/schematics/ngAdd/index.js.map +1 -1
  32. package/{dist/es2015/types → types}/animation-end-event.d.ts +0 -0
  33. package/{dist/es2015/types → types}/animation-options.interface.d.ts +0 -0
  34. package/{dist/es2015/types → types}/label-fn-type.d.ts +0 -0
  35. package/{dist/es2015/types → types}/label-position.d.ts +0 -0
  36. package/{dist/es2015/types → types}/label-settings.interface.d.ts +0 -0
  37. package/{dist/es2015/types → types}/label-type.d.ts +0 -0
  38. package/{dist/es2015/types → types}/progressbar-animation.interface.d.ts +0 -0
  39. package/{dist/es2015/types → types}/progressbar-orientation.d.ts +0 -0
  40. package/dist/cdn/js/kendo-angular-progressbar.js +0 -20
  41. package/dist/cdn/main.js +0 -5
  42. package/dist/es/chunk/chunk-progressbar.component.js +0 -129
  43. package/dist/es/common/constants.js +0 -16
  44. package/dist/es/common/progressbar-base.js +0 -305
  45. package/dist/es/common/util.js +0 -86
  46. package/dist/es/package-metadata.js +0 -15
  47. package/dist/es/progressbar.component.js +0 -304
  48. package/dist/es/progressbar.module.js +0 -55
  49. package/dist/es/types/animation-end-event.js +0 -4
  50. package/dist/es/types/animation-options.interface.js +0 -4
  51. package/dist/es/types/label-fn-type.js +0 -4
  52. package/dist/es2015/index.js +0 -9
  53. package/dist/es2015/index.metadata.json +0 -1
  54. package/dist/es2015/main.js +0 -7
  55. package/dist/es2015/types/label-position.js +0 -4
  56. package/dist/es2015/types/label-settings.interface.js +0 -4
  57. package/dist/es2015/types/label-type.js +0 -4
  58. package/dist/es2015/types/progressbar-animation.interface.js +0 -4
  59. package/dist/es2015/types/progressbar-orientation.js +0 -4
  60. package/dist/fesm5/index.js +0 -875
  61. package/dist/npm/chunk/chunk-progressbar.component.js +0 -131
  62. package/dist/npm/common/constants.js +0 -18
  63. package/dist/npm/common/progressbar-base.js +0 -307
  64. package/dist/npm/common/util.js +0 -89
  65. package/dist/npm/index.js +0 -13
  66. package/dist/npm/main.js +0 -12
  67. package/dist/npm/package-metadata.js +0 -17
  68. package/dist/npm/progressbar.component.js +0 -306
  69. package/dist/npm/progressbar.module.js +0 -57
  70. package/dist/npm/types/animation-end-event.js +0 -6
  71. package/dist/npm/types/animation-options.interface.js +0 -6
  72. package/dist/npm/types/label-fn-type.js +0 -6
  73. package/dist/npm/types/label-position.js +0 -6
  74. package/dist/npm/types/label-settings.interface.js +0 -6
  75. package/dist/npm/types/label-type.js +0 -6
  76. package/dist/npm/types/progressbar-animation.interface.js +0 -6
  77. package/dist/npm/types/progressbar-orientation.js +0 -6
  78. package/dist/systemjs/kendo-angular-progressbar.js +0 -5
@@ -1,306 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- var tslib_1 = require("tslib");
8
- var progressbar_base_1 = require("./common/progressbar-base");
9
- var core_1 = require("@angular/core");
10
- var util_1 = require("./common/util");
11
- var kendo_angular_l10n_1 = require("@progress/kendo-angular-l10n");
12
- var kendo_angular_common_1 = require("@progress/kendo-angular-common");
13
- /**
14
- * Represents the [Kendo UI ProgressBar component for Angular]({% slug overview_progressbar %}).
15
- *
16
- * @example
17
- * ```ts-preview
18
- * _@Component({
19
- * selector: 'my-app',
20
- * template: `
21
- * <kendo-progressbar [value]="value">
22
- * </kendo-progressbar>
23
- * `
24
- * })
25
- * class AppComponent {
26
- * public value = 50;
27
- * }
28
- * ```
29
- */
30
- var ProgressBarComponent = /** @class */ (function (_super) {
31
- tslib_1.__extends(ProgressBarComponent, _super);
32
- /**
33
- * @hidden
34
- */
35
- function ProgressBarComponent(localization, zone, renderer) {
36
- var _this = _super.call(this, localization) || this;
37
- _this.localization = localization;
38
- _this.zone = zone;
39
- _this.renderer = renderer;
40
- /**
41
- * Determines whether the status label will be visible.
42
- * Defaults to `true`&mdash;the label will be visible and displayed with the default
43
- * `LabelSettings` having its position set to `end` and its format set to `value`.
44
- */
45
- _this.label = true;
46
- /**
47
- * The animation configuration of the ProgressBar.
48
- * Defaults to `false`.
49
- */
50
- _this.animation = false;
51
- /**
52
- * Fires when the animation which indicates the latest value change is completed.
53
- */
54
- _this.animationEnd = new core_1.EventEmitter();
55
- return _this;
56
- }
57
- Object.defineProperty(ProgressBarComponent.prototype, "showLabel", {
58
- /**
59
- * @hidden
60
- */
61
- get: function () {
62
- if (typeof this.label === 'boolean') {
63
- return this.label;
64
- }
65
- else {
66
- if (this.label && !this.label.hasOwnProperty('visible')) {
67
- this.label.visible = true;
68
- }
69
- return this.label.visible;
70
- }
71
- },
72
- enumerable: true,
73
- configurable: true
74
- });
75
- Object.defineProperty(ProgressBarComponent.prototype, "labelPosition", {
76
- /**
77
- * @hidden
78
- */
79
- get: function () {
80
- if (typeof this.label === 'boolean') {
81
- return 'end';
82
- }
83
- else {
84
- if (this.label && !this.label.hasOwnProperty('position')) {
85
- this.label.position = 'end';
86
- }
87
- return this.label.position;
88
- }
89
- },
90
- enumerable: true,
91
- configurable: true
92
- });
93
- Object.defineProperty(ProgressBarComponent.prototype, "isPositionStart", {
94
- /**
95
- * @hidden
96
- */
97
- get: function () {
98
- return this.labelPosition === 'start';
99
- },
100
- enumerable: true,
101
- configurable: true
102
- });
103
- Object.defineProperty(ProgressBarComponent.prototype, "isPositionCenter", {
104
- /**
105
- * @hidden
106
- */
107
- get: function () {
108
- return this.labelPosition === 'center';
109
- },
110
- enumerable: true,
111
- configurable: true
112
- });
113
- Object.defineProperty(ProgressBarComponent.prototype, "isPositionEnd", {
114
- /**
115
- * @hidden
116
- */
117
- get: function () {
118
- return this.labelPosition === 'end';
119
- },
120
- enumerable: true,
121
- configurable: true
122
- });
123
- Object.defineProperty(ProgressBarComponent.prototype, "formattedLabelValue", {
124
- /**
125
- * @hidden
126
- */
127
- get: function () {
128
- return util_1.formatValue(this.displayValue, this.min, this.max, this.label);
129
- },
130
- enumerable: true,
131
- configurable: true
132
- });
133
- /**
134
- * @hidden
135
- */
136
- ProgressBarComponent.prototype.ngOnChanges = function (changes) {
137
- _super.prototype.ngOnChanges.call(this, changes);
138
- if (this.isAnimationInProgress && util_1.stopCurrentAnimation(changes)) {
139
- this.cancelCurrentAnimation = true;
140
- }
141
- if (util_1.runAnimation(changes, this.animation, this.previousValue, this.displayValue) && !changes.value.firstChange) {
142
- this.startAnimation(this.previousValue);
143
- }
144
- };
145
- /**
146
- * @hidden
147
- */
148
- ProgressBarComponent.prototype.ngOnDestroy = function () {
149
- if (this.animationFrame) {
150
- cancelAnimationFrame(this.animationFrame);
151
- }
152
- };
153
- /**
154
- * @hidden
155
- */
156
- ProgressBarComponent.prototype.startAnimation = function (previousValue) {
157
- var _this = this;
158
- this.isAnimationInProgress = true;
159
- var element = this.progressStatusElement.nativeElement;
160
- var wrapperElement = this.progressStatusWrapperElement.nativeElement;
161
- var animationOptions = this.getAnimationOptions(previousValue);
162
- this.zone.runOutsideAngular(function () {
163
- if (_this.animationFrame) {
164
- cancelAnimationFrame(_this.animationFrame);
165
- }
166
- var animate = function () {
167
- var elapsed = new Date().getTime() - animationOptions.startTime;
168
- var position = Math.min(elapsed / animationOptions.duration, 1);
169
- var size = animationOptions.startSize + animationOptions.deltaSize * position;
170
- var wrapperSize = (100 / size) * 100;
171
- _this.renderValueChange(element, wrapperElement, animationOptions.property, size, wrapperSize);
172
- if (position < 1) {
173
- if (_this.cancelCurrentAnimation) {
174
- _this.resetProgress(element, wrapperElement, animationOptions.property);
175
- return;
176
- }
177
- _this.animationFrame = requestAnimationFrame(animate);
178
- }
179
- else {
180
- _this.stopAnimation(previousValue);
181
- }
182
- };
183
- animate();
184
- });
185
- };
186
- Object.defineProperty(ProgressBarComponent.prototype, "animationDuration", {
187
- /**
188
- * @hidden
189
- */
190
- get: function () {
191
- if (typeof this.animation === 'boolean') {
192
- return 400;
193
- }
194
- else {
195
- if (this.animation && !this.animation.hasOwnProperty('duration')) {
196
- this.animation.duration = 400;
197
- }
198
- return this.animation.duration;
199
- }
200
- },
201
- enumerable: true,
202
- configurable: true
203
- });
204
- ProgressBarComponent.prototype.stopAnimation = function (value) {
205
- var _this = this;
206
- if (kendo_angular_common_1.hasObservers(this.animationEnd)) {
207
- this.zone.run(function () {
208
- _this.animationEnd.emit({
209
- from: value,
210
- to: _this.displayValue
211
- });
212
- });
213
- }
214
- this.zone.run(function () {
215
- _this.isAnimationInProgress = false;
216
- });
217
- };
218
- ProgressBarComponent.prototype.getAnimationOptions = function (value) {
219
- var isHorizontal = this.orientation === 'horizontal';
220
- var previousRatio = util_1.calculateRatio(this.min, this.max, value);
221
- var previousStatusWidth = isHorizontal ? previousRatio * 100 : 100;
222
- var previousStatusHeight = !isHorizontal ? previousRatio * 100 : 100;
223
- var property = isHorizontal ? 'width' : 'height';
224
- var startTime = new Date().getTime();
225
- var startSize = isHorizontal ? previousStatusWidth : previousStatusHeight;
226
- var deltaSize = isHorizontal ? this.statusWidth - previousStatusWidth : this.statusHeight - previousStatusHeight;
227
- var duration = this.animationDuration * Math.abs((deltaSize / 100));
228
- return {
229
- property: property,
230
- startTime: startTime,
231
- startSize: startSize,
232
- deltaSize: deltaSize,
233
- duration: duration
234
- };
235
- };
236
- ProgressBarComponent.prototype.renderValueChange = function (element, wrapperElement, property, size, wrapperSize) {
237
- this.renderer.setStyle(element, property, size + '%');
238
- this.renderer.setStyle(wrapperElement, property, wrapperSize + '%');
239
- };
240
- ProgressBarComponent.prototype.resetProgress = function (element, wrapperElement, property) {
241
- var _this = this;
242
- var size = util_1.calculateRatio(this.min, this.max, this.value);
243
- var newSize = size * 100;
244
- var newWrapperSize = 100 / size;
245
- this.renderValueChange(element, wrapperElement, property, newSize, newWrapperSize);
246
- this.zone.run(function () {
247
- _this.cancelCurrentAnimation = false;
248
- _this.isAnimationInProgress = false;
249
- });
250
- };
251
- tslib_1.__decorate([
252
- core_1.Input(),
253
- tslib_1.__metadata("design:type", Object)
254
- ], ProgressBarComponent.prototype, "label", void 0);
255
- tslib_1.__decorate([
256
- core_1.Input(),
257
- tslib_1.__metadata("design:type", Object)
258
- ], ProgressBarComponent.prototype, "progressCssStyle", void 0);
259
- tslib_1.__decorate([
260
- core_1.Input(),
261
- tslib_1.__metadata("design:type", Object)
262
- ], ProgressBarComponent.prototype, "progressCssClass", void 0);
263
- tslib_1.__decorate([
264
- core_1.Input(),
265
- tslib_1.__metadata("design:type", Object)
266
- ], ProgressBarComponent.prototype, "emptyCssStyle", void 0);
267
- tslib_1.__decorate([
268
- core_1.Input(),
269
- tslib_1.__metadata("design:type", Object)
270
- ], ProgressBarComponent.prototype, "emptyCssClass", void 0);
271
- tslib_1.__decorate([
272
- core_1.Input(),
273
- tslib_1.__metadata("design:type", Object)
274
- ], ProgressBarComponent.prototype, "animation", void 0);
275
- tslib_1.__decorate([
276
- core_1.Output(),
277
- tslib_1.__metadata("design:type", core_1.EventEmitter)
278
- ], ProgressBarComponent.prototype, "animationEnd", void 0);
279
- tslib_1.__decorate([
280
- core_1.ViewChild('progressStatus', { static: false }),
281
- tslib_1.__metadata("design:type", core_1.ElementRef)
282
- ], ProgressBarComponent.prototype, "progressStatusElement", void 0);
283
- tslib_1.__decorate([
284
- core_1.ViewChild('progressStatusWrap', { static: false }),
285
- tslib_1.__metadata("design:type", core_1.ElementRef)
286
- ], ProgressBarComponent.prototype, "progressStatusWrapperElement", void 0);
287
- ProgressBarComponent = tslib_1.__decorate([
288
- core_1.Component({
289
- exportAs: 'kendoProgressBar',
290
- selector: 'kendo-progressbar',
291
- template: "\n <span class=\"k-progress-status-wrap\"\n [class.k-progress-start]=\"isPositionStart\"\n [class.k-progress-center]=\"isPositionCenter\"\n [class.k-progress-end]=\"isPositionEnd\"\n [ngStyle]=\"emptyCssStyle\"\n [ngClass]=\"emptyCssClass\">\n <span *ngIf=\"showLabel\" class=\"k-progress-status\">{{formattedLabelValue}}</span>\n </span>\n <div\n #progressStatus\n class=\"k-state-selected\"\n [class.k-complete]=\"isCompleted\"\n [ngStyle]=\"progressCssStyle\"\n [ngClass]=\"progressCssClass\"\n [style.width.%]=\"statusWidth\"\n [style.height.%]=\"statusHeight\"\n >\n <span\n #progressStatusWrap\n class=\"k-progress-status-wrap\"\n [style.width.%]=\"statusWrapperWidth\"\n [style.height.%]=\"statusWrapperHeight\"\n [class.k-progress-start]=\"isPositionStart\"\n [class.k-progress-center]=\"isPositionCenter\"\n [class.k-progress-end]=\"isPositionEnd\"\n >\n <span *ngIf=\"showLabel\" class=\"k-progress-status\">{{formattedLabelValue}}</span>\n </span>\n </div>\n ",
292
- providers: [
293
- kendo_angular_l10n_1.LocalizationService,
294
- {
295
- provide: kendo_angular_l10n_1.L10N_PREFIX,
296
- useValue: 'kendo.progressbar'
297
- }
298
- ]
299
- }),
300
- tslib_1.__metadata("design:paramtypes", [kendo_angular_l10n_1.LocalizationService,
301
- core_1.NgZone,
302
- core_1.Renderer2])
303
- ], ProgressBarComponent);
304
- return ProgressBarComponent;
305
- }(progressbar_base_1.ProgressBarBase));
306
- exports.ProgressBarComponent = ProgressBarComponent;
@@ -1,57 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- var tslib_1 = require("tslib");
8
- var chunk_progressbar_component_1 = require("./chunk/chunk-progressbar.component");
9
- var core_1 = require("@angular/core");
10
- var common_1 = require("@angular/common");
11
- var progressbar_component_1 = require("./progressbar.component");
12
- var COMPONENT_DIRECTIVES = [progressbar_component_1.ProgressBarComponent, chunk_progressbar_component_1.ChunkProgressBarComponent];
13
- var MODULES = [common_1.CommonModule];
14
- /**
15
- * Represents the [NgModule]({{ site.data.urls.angular['ngmodules'] }})
16
- * definition for the ProgressBar components.
17
- *
18
- * @example
19
- *
20
- * ```ts-no-run
21
- * // Import the ProgressBar module
22
- * import { ProgressBarModule } from '@progress/kendo-angular-progressbar';
23
- *
24
- * // The browser platform with a compiler
25
- * import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
26
- *
27
- * import { NgModule } from '@angular/core';
28
- *
29
- * // Import the app component
30
- * import { AppComponent } from './app.component';
31
- *
32
- * // Define the app module
33
- * _@NgModule({
34
- * declarations: [AppComponent], // declare app component
35
- * imports: [BrowserModule, ProgressBarModule], // import ProgressBar module
36
- * bootstrap: [AppComponent]
37
- * })
38
- * export class AppModule {}
39
- *
40
- * // Compile and launch the module
41
- * platformBrowserDynamic().bootstrapModule(AppModule);
42
- *
43
- * ```
44
- */
45
- var ProgressBarModule = /** @class */ (function () {
46
- function ProgressBarModule() {
47
- }
48
- ProgressBarModule = tslib_1.__decorate([
49
- core_1.NgModule({
50
- declarations: COMPONENT_DIRECTIVES,
51
- exports: COMPONENT_DIRECTIVES,
52
- imports: MODULES
53
- })
54
- ], ProgressBarModule);
55
- return ProgressBarModule;
56
- }());
57
- exports.ProgressBarModule = ProgressBarModule;
@@ -1,6 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- System.register("@progress/kendo-angular-progressbar",["@angular/core","@progress/kendo-angular-common","tslib","@progress/kendo-angular-l10n","@angular/common","@progress/kendo-licensing"],function(o){var i,s,u,l,p,d;function t(e){return e.__useDefault?e.default:e}return{setters:[function(e){i=t(e)},function(e){s=t(e)},function(e){u=t(e)},function(e){l=t(e)},function(e){p=t(e)},function(e){d=t(e)}],execute:function(){function r(e){if(a[e])return a[e].exports;var t=a[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}var n,a;n=[function(e,t){e.exports=i},function(e,t){e.exports=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(10),a=n(0),i=(t.reverseChunks=function(e,t){return"vertical"===e&&!t||"horizontal"===e&&t},t.formatValue=function(e,t,n,r){var a=o(e);if("boolean"!=typeof r){if("string"!=typeof r.format)return"function"==typeof r.format?r.format(e):a;switch(r.format){case"value":return a;case"percent":return Math.floor(i(e,t,n))+"%";default:return a}}return a},t.validateRange=function(e,t){if(a.isDevMode&&t<e)throw new Error(r.MIN_MAX_ERROR_MESSAGE)},t.adjustValueToRange=function(e,t,n){return Math.max(Math.min(n,t),e)},function(e,t,n){n=Math.abs((n-t)/100);return Math.abs((e-t)/n)}),o=function(e){e=e.toString().split(".");return 1===e.length?""+e[0]:e[0]+"."+e[1].substr(0,r.LABEL_DECIMALS)};t.calculateRatio=function(e,t,n){return Math.max((n-e)/(t-e),r.MIN_RATIO)},t.extractValueFromChanges=function(e,t,n){return e[t]&&void 0!==e[t].currentValue?e[t].currentValue:n},t.runAnimation=function(e,t,n,r){return t&&"undefined"!=typeof requestAnimationFrame&&e.value&&n!==r},t.stopCurrentAnimation=function(e){var t=Boolean(e.animation),e=t&&e.animation.currentValue;return t&&!e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,a=n(1),i=n(5),o=n(0),s=n(2),n=n(4),i=(r=i.ProgressBarBase,a.__extends(u,r),Object.defineProperty(u.prototype,"chunks",{get:function(){for(var e=this.chunkCount,t=Array(e).fill(!1),n=Math.floor(this._progressRatio*e),r=0;r<n;r++)t[r]=!0;return s.reverseChunks(this.orientation,this.reverse)&&t.reverse(),t},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"chunkSizePercentage",{get:function(){return 100/this.chunkCount},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"orientationStyles",{get:function(){return"horizontal"===this.orientation?(this._orientationStyles.width=this.chunkSizePercentage+"%",this._orientationStyles.height=void 0):(this._orientationStyles.height=this.chunkSizePercentage+"%",this._orientationStyles.width=void 0),this._orientationStyles},enumerable:!0,configurable:!0}),a.__decorate([o.Input(),a.__metadata("design:type",Number)],u.prototype,"chunkCount",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Object)],u.prototype,"progressCssStyle",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Object)],u.prototype,"progressCssClass",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Object)],u.prototype,"emptyCssStyle",void 0),a.__decorate([o.Input(),a.__metadata("design:type",Object)],u.prototype,"emptyCssClass",void 0),a.__decorate([o.Component({exportAs:"kendoChunkProgressBar",selector:"kendo-chunkprogressbar",template:'\n <ul class="k-reset">\n <li class="k-item" *ngFor="let chunk of chunks; let i = index;"\n [class.k-first]="i === 0"\n [class.k-last]="i === chunkCount - 1"\n [class.k-state-selected]="chunk"\n [ngClass]="chunk ? progressCssClass : emptyCssClass"\n [ngStyle]="chunk ? progressCssStyle : emptyCssStyle"\n [style.width]="orientationStyles.width"\n [style.height]="orientationStyles.height"\n >\n </li>\n </ul>\n ',providers:[n.LocalizationService,{provide:n.L10N_PREFIX,useValue:"kendo.chunkprogressbar"}]}),a.__metadata("design:paramtypes",[n.LocalizationService])],u));function u(e){var t=r.call(this,e)||this;return t.localization=e,t.chunkCount=5,t._orientationStyles={width:t.chunkSizePercentage+"%"},t}t.ChunkProgressBarComponent=i},function(e,t){e.exports=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),a=n(0),i=n(12),o=n(11),s=n(2);function u(e){var t=this;this.localization=e,this.widgetClasses=!0,this.roleAttribute="progressbar",this.max=100,this.min=0,this.value=0,this.orientation="horizontal",this.disabled=!1,this.reverse=!1,this.indeterminate=!1,this.displayValue=0,this.previousValue=0,i.validatePackage(o.packageMetadata),this.localizationChangeSubscription=e.changes.subscribe(function(e){e=e.rtl;t.direction=e?"rtl":"ltr"})}Object.defineProperty(u.prototype,"isHorizontal",{get:function(){return"horizontal"===this.orientation},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"isVertical",{get:function(){return"vertical"===this.orientation},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"disabledClass",{get:function(){return this.disabled},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"reverseClass",{get:function(){return this.reverse},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"indeterminateClass",{get:function(){return this.indeterminate},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"dirAttribute",{get:function(){return this.direction},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"ariaMinAttribute",{get:function(){return String(this.min)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"ariaMaxAttribute",{get:function(){return String(this.max)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"ariaValueAttribute",{get:function(){return this.indeterminate?void 0:String(this.displayValue)},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"isCompleted",{get:function(){return this.value===this.max},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"statusWidth",{get:function(){return"horizontal"===this.orientation?100*this._progressRatio:100},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"statusHeight",{get:function(){return"vertical"===this.orientation?100*this._progressRatio:100},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"statusWrapperWidth",{get:function(){return"horizontal"===this.orientation?100/this._progressRatio:100},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"statusWrapperHeight",{get:function(){return"vertical"===this.orientation?100/this._progressRatio:100},enumerable:!0,configurable:!0}),Object.defineProperty(u.prototype,"_progressRatio",{get:function(){return s.calculateRatio(this.min,this.max,this.displayValue)},enumerable:!0,configurable:!0}),u.prototype.ngOnChanges=function(e){var t=s.extractValueFromChanges(e,"min",this.min),n=s.extractValueFromChanges(e,"max",this.max),r=s.extractValueFromChanges(e,"value",this.value);(e.min||e.max||e.value)&&((e.min||e.max)&&s.validateRange(t,n),e.value&&(null!=r&&!Number.isNaN(r)||(this.value=t),e=this.displayValue,this.displayValue=s.adjustValueToRange(this.min,this.max,r),this.previousValue=e),this.min=t,this.max=n,this.displayValue=s.adjustValueToRange(this.min,this.max,r))},u.prototype.ngOnDestroy=function(){this.localizationChangeSubscription&&this.localizationChangeSubscription.unsubscribe()},r.__decorate([a.HostBinding("class.k-widget"),a.HostBinding("class.k-progressbar"),r.__metadata("design:type",Boolean)],u.prototype,"widgetClasses",void 0),r.__decorate([a.HostBinding("class.k-progressbar-horizontal"),r.__metadata("design:type",Boolean),r.__metadata("design:paramtypes",[])],u.prototype,"isHorizontal",null),r.__decorate([a.HostBinding("class.k-progressbar-vertical"),r.__metadata("design:type",Boolean),r.__metadata("design:paramtypes",[])],u.prototype,"isVertical",null),r.__decorate([a.HostBinding("class.k-state-disabled"),r.__metadata("design:type",Boolean),r.__metadata("design:paramtypes",[])],u.prototype,"disabledClass",null),r.__decorate([a.HostBinding("class.k-progressbar-reverse"),r.__metadata("design:type",Boolean),r.__metadata("design:paramtypes",[])],u.prototype,"reverseClass",null),r.__decorate([a.HostBinding("class.k-progressbar-indeterminate"),r.__metadata("design:type",Boolean),r.__metadata("design:paramtypes",[])],u.prototype,"indeterminateClass",null),r.__decorate([a.HostBinding("attr.dir"),r.__metadata("design:type",String),r.__metadata("design:paramtypes",[])],u.prototype,"dirAttribute",null),r.__decorate([a.HostBinding("attr.role"),r.__metadata("design:type",String)],u.prototype,"roleAttribute",void 0),r.__decorate([a.HostBinding("attr.aria-valuemin"),r.__metadata("design:type",String),r.__metadata("design:paramtypes",[])],u.prototype,"ariaMinAttribute",null),r.__decorate([a.HostBinding("attr.aria-valuemax"),r.__metadata("design:type",String),r.__metadata("design:paramtypes",[])],u.prototype,"ariaMaxAttribute",null),r.__decorate([a.HostBinding("attr.aria-valuenow"),r.__metadata("design:type",String),r.__metadata("design:paramtypes",[])],u.prototype,"ariaValueAttribute",null),r.__decorate([a.Input(),r.__metadata("design:type",Number)],u.prototype,"max",void 0),r.__decorate([a.Input(),r.__metadata("design:type",Number)],u.prototype,"min",void 0),r.__decorate([a.Input(),r.__metadata("design:type",Number)],u.prototype,"value",void 0),r.__decorate([a.Input(),r.__metadata("design:type",String)],u.prototype,"orientation",void 0),r.__decorate([a.Input(),r.__metadata("design:type",Boolean)],u.prototype,"disabled",void 0),r.__decorate([a.Input(),r.__metadata("design:type",Boolean)],u.prototype,"reverse",void 0),r.__decorate([a.Input(),r.__metadata("design:type",Boolean)],u.prototype,"indeterminate",void 0),t.ProgressBarBase=u},function(p,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a,n=t(1),r=t(5),i=t(0),o=t(2),s=t(4),u=t(9),t=(a=r.ProgressBarBase,n.__extends(l,a),Object.defineProperty(l.prototype,"showLabel",{get:function(){return"boolean"==typeof this.label?this.label:(this.label&&!this.label.hasOwnProperty("visible")&&(this.label.visible=!0),this.label.visible)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"labelPosition",{get:function(){return"boolean"==typeof this.label?"end":(this.label&&!this.label.hasOwnProperty("position")&&(this.label.position="end"),this.label.position)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"isPositionStart",{get:function(){return"start"===this.labelPosition},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"isPositionCenter",{get:function(){return"center"===this.labelPosition},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"isPositionEnd",{get:function(){return"end"===this.labelPosition},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"formattedLabelValue",{get:function(){return o.formatValue(this.displayValue,this.min,this.max,this.label)},enumerable:!0,configurable:!0}),l.prototype.ngOnChanges=function(e){a.prototype.ngOnChanges.call(this,e),this.isAnimationInProgress&&o.stopCurrentAnimation(e)&&(this.cancelCurrentAnimation=!0),o.runAnimation(e,this.animation,this.previousValue,this.displayValue)&&!e.value.firstChange&&this.startAnimation(this.previousValue)},l.prototype.ngOnDestroy=function(){this.animationFrame&&cancelAnimationFrame(this.animationFrame)},l.prototype.startAnimation=function(r){var a=this,i=(this.isAnimationInProgress=!0,this.progressStatusElement.nativeElement),o=this.progressStatusWrapperElement.nativeElement,s=this.getAnimationOptions(r);this.zone.runOutsideAngular(function(){a.animationFrame&&cancelAnimationFrame(a.animationFrame);function n(){var e=(new Date).getTime()-s.startTime,e=Math.min(e/s.duration,1),t=s.startSize+s.deltaSize*e;a.renderValueChange(i,o,s.property,t,100/t*100),e<1?a.cancelCurrentAnimation?a.resetProgress(i,o,s.property):a.animationFrame=requestAnimationFrame(n):a.stopAnimation(r)}n()})},Object.defineProperty(l.prototype,"animationDuration",{get:function(){return"boolean"==typeof this.animation?400:(this.animation&&!this.animation.hasOwnProperty("duration")&&(this.animation.duration=400),this.animation.duration)},enumerable:!0,configurable:!0}),l.prototype.stopAnimation=function(e){var t=this;u.hasObservers(this.animationEnd)&&this.zone.run(function(){t.animationEnd.emit({from:e,to:t.displayValue})}),this.zone.run(function(){t.isAnimationInProgress=!1})},l.prototype.getAnimationOptions=function(e){var t="horizontal"===this.orientation,e=o.calculateRatio(this.min,this.max,e),n=t?100*e:100,e=t?100:100*e,r=t?"width":"height",a=(new Date).getTime(),i=t?this.statusWidth-n:this.statusHeight-e;return{property:r,startTime:a,startSize:t?n:e,deltaSize:i,duration:this.animationDuration*Math.abs(i/100)}},l.prototype.renderValueChange=function(e,t,n,r,a){this.renderer.setStyle(e,n,r+"%"),this.renderer.setStyle(t,n,a+"%")},l.prototype.resetProgress=function(e,t,n){var r=this,a=o.calculateRatio(this.min,this.max,this.value);this.renderValueChange(e,t,n,100*a,100/a),this.zone.run(function(){r.cancelCurrentAnimation=!1,r.isAnimationInProgress=!1})},n.__decorate([i.Input(),n.__metadata("design:type",Object)],l.prototype,"label",void 0),n.__decorate([i.Input(),n.__metadata("design:type",Object)],l.prototype,"progressCssStyle",void 0),n.__decorate([i.Input(),n.__metadata("design:type",Object)],l.prototype,"progressCssClass",void 0),n.__decorate([i.Input(),n.__metadata("design:type",Object)],l.prototype,"emptyCssStyle",void 0),n.__decorate([i.Input(),n.__metadata("design:type",Object)],l.prototype,"emptyCssClass",void 0),n.__decorate([i.Input(),n.__metadata("design:type",Object)],l.prototype,"animation",void 0),n.__decorate([i.Output(),n.__metadata("design:type",i.EventEmitter)],l.prototype,"animationEnd",void 0),n.__decorate([i.ViewChild("progressStatus",{static:!1}),n.__metadata("design:type",i.ElementRef)],l.prototype,"progressStatusElement",void 0),n.__decorate([i.ViewChild("progressStatusWrap",{static:!1}),n.__metadata("design:type",i.ElementRef)],l.prototype,"progressStatusWrapperElement",void 0),n.__decorate([i.Component({exportAs:"kendoProgressBar",selector:"kendo-progressbar",template:'\n <span class="k-progress-status-wrap"\n [class.k-progress-start]="isPositionStart"\n [class.k-progress-center]="isPositionCenter"\n [class.k-progress-end]="isPositionEnd"\n [ngStyle]="emptyCssStyle"\n [ngClass]="emptyCssClass">\n <span *ngIf="showLabel" class="k-progress-status">{{formattedLabelValue}}</span>\n </span>\n <div\n #progressStatus\n class="k-state-selected"\n [class.k-complete]="isCompleted"\n [ngStyle]="progressCssStyle"\n [ngClass]="progressCssClass"\n [style.width.%]="statusWidth"\n [style.height.%]="statusHeight"\n >\n <span\n #progressStatusWrap\n class="k-progress-status-wrap"\n [style.width.%]="statusWrapperWidth"\n [style.height.%]="statusWrapperHeight"\n [class.k-progress-start]="isPositionStart"\n [class.k-progress-center]="isPositionCenter"\n [class.k-progress-end]="isPositionEnd"\n >\n <span *ngIf="showLabel" class="k-progress-status">{{formattedLabelValue}}</span>\n </span>\n </div>\n ',providers:[s.LocalizationService,{provide:s.L10N_PREFIX,useValue:"kendo.progressbar"}]}),n.__metadata("design:paramtypes",[s.LocalizationService,i.NgZone,i.Renderer2])],l));function l(e,t,n){var r=a.call(this,e)||this;return r.localization=e,r.zone=t,r.renderer=n,r.label=!0,r.animation=!1,r.animationEnd=new i.EventEmitter,r}e.ProgressBarComponent=t},function(e,t){e.exports=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),a=n(3),i=n(0),o=n(7),n=[n(6).ProgressBarComponent,a.ChunkProgressBarComponent],a=[o.CommonModule],o=r.__decorate([i.NgModule({declarations:n,exports:n,imports:a})],s);function s(){}t.ProgressBarModule=o},function(e,t){e.exports=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MIN_MAX_ERROR_MESSAGE="The max value should be greater than the min.",t.LABEL_DECIMALS=3,t.MIN_RATIO=1e-4},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata={name:"@progress/kendo-angular-progressbar",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1645798788,version:"",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"}},function(e,t){e.exports=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,a=n(6),a=(t.ProgressBarComponent=a.ProgressBarComponent,n(3)),a=(t.ChunkProgressBarComponent=a.ChunkProgressBarComponent,n(8)),i=(t.ProgressBarModule=a.ProgressBarModule,t);for(r in i)o(r,i[r])}],a={},r.m=n,r.c=a,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=13)}}});