@progress/kendo-angular-progressbar 21.4.1 → 22.0.0-develop.1

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 (29) hide show
  1. package/common/localization/messages.d.ts +1 -1
  2. package/common/progressbar-base.d.ts +1 -1
  3. package/fesm2022/progress-kendo-angular-progressbar.mjs +31 -31
  4. package/package.json +9 -17
  5. package/esm2022/chunk/chunk-progressbar.component.mjs +0 -192
  6. package/esm2022/circularprogressbar/center-template.directive.mjs +0 -34
  7. package/esm2022/circularprogressbar/circular-progressbar.component.mjs +0 -523
  8. package/esm2022/circularprogressbar/models/center-template-context.interface.mjs +0 -5
  9. package/esm2022/circularprogressbar/models/circular-progressbar-progress-color-interface.mjs +0 -8
  10. package/esm2022/common/constants.mjs +0 -16
  11. package/esm2022/common/localization/custom-messages.component.mjs +0 -68
  12. package/esm2022/common/localization/localized-messages.directive.mjs +0 -39
  13. package/esm2022/common/localization/messages.mjs +0 -24
  14. package/esm2022/common/progressbar-base.mjs +0 -228
  15. package/esm2022/common/util.mjs +0 -99
  16. package/esm2022/directives.mjs +0 -85
  17. package/esm2022/index.mjs +0 -12
  18. package/esm2022/package-metadata.mjs +0 -16
  19. package/esm2022/progress-kendo-angular-progressbar.mjs +0 -8
  20. package/esm2022/progressbar.component.mjs +0 -380
  21. package/esm2022/progressbar.module.mjs +0 -45
  22. package/esm2022/types/animation-end-event.mjs +0 -5
  23. package/esm2022/types/animation-options.interface.mjs +0 -5
  24. package/esm2022/types/label-fn-type.mjs +0 -5
  25. package/esm2022/types/label-position.mjs +0 -5
  26. package/esm2022/types/label-settings.interface.mjs +0 -5
  27. package/esm2022/types/label-type.mjs +0 -5
  28. package/esm2022/types/progressbar-animation.interface.mjs +0 -5
  29. package/esm2022/types/progressbar-orientation.mjs +0 -5
@@ -1,380 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { ProgressBarBase } from './common/progressbar-base';
6
- import { Component, Input, NgZone, Renderer2, ViewChild, ElementRef, Output, EventEmitter } from '@angular/core';
7
- import { formatValue, calculateRatio, runAnimation, stopCurrentAnimation } from './common/util';
8
- import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
9
- import { hasObservers } from '@progress/kendo-angular-common';
10
- import { NgStyle, NgClass } from '@angular/common';
11
- import { LocalizedProgressBarMessagesDirective } from './common/localization/localized-messages.directive';
12
- import * as i0 from "@angular/core";
13
- import * as i1 from "@progress/kendo-angular-l10n";
14
- /**
15
- * Represents the [Kendo UI ProgressBar component for Angular]({% slug overview_progressbar %}).
16
- *
17
- * @example
18
- * ```typescript
19
- * @Component({
20
- * selector: 'my-app',
21
- * template: `
22
- * <kendo-progressbar [value]="value">
23
- * </kendo-progressbar>
24
- * `
25
- * })
26
- * class AppComponent {
27
- * public value = 50;
28
- * }
29
- * ```
30
- *
31
- * @remarks
32
- * Supported children components are: {@link ProgressBarCustomMessagesComponent}
33
- */
34
- export class ProgressBarComponent extends ProgressBarBase {
35
- localization;
36
- elem;
37
- renderer;
38
- zone;
39
- /**
40
- * Determines whether the status label displays.
41
- * @default true
42
- */
43
- label = true;
44
- /**
45
- * Sets the CSS styles that will be rendered on the inner element, which represents the full portion of the progress bar
46
- * ([see example]({% slug progressbar_appearance %})).
47
- * Supports the type of values that [`ngStyle`](link:site.data.urls.angular['ngstyleapi']) supports.
48
- */
49
- progressCssStyle;
50
- /**
51
- * The CSS classes that render on the inner element which represents the full portion of the progress bar
52
- * ([see example]({% slug progressbar_appearance %})).
53
- * Supports the type of values that [`ngClass`](link:site.data.urls.angular['ngclassapi']) supports.
54
- */
55
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
56
- progressCssClass;
57
- /**
58
- * The CSS styles that render on the inner element which represents the empty portion of the progress bar
59
- * ([see example]({% slug progressbar_appearance %})).
60
- * Supports the type of values that [`ngStyle`](link:site.data.urls.angular['ngstyleapi']) supports.
61
- */
62
- emptyCssStyle;
63
- /**
64
- * The CSS classes that render on the inner element which represents the empty portion of the progress bar
65
- * ([see example]({% slug progressbar_appearance %})).
66
- * Supports the type of values that [`ngClass`](link:site.data.urls.angular['ngclassapi']) supports.
67
- */
68
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
69
- emptyCssClass;
70
- /**
71
- * The animation configuration of the ProgressBar.
72
- * @default false
73
- */
74
- animation = false;
75
- /**
76
- * Fires when the animation which indicates the latest value change completes.
77
- */
78
- animationEnd = new EventEmitter();
79
- /**
80
- * @hidden
81
- */
82
- get showLabel() {
83
- if (typeof this.label === 'boolean') {
84
- return this.label;
85
- }
86
- else {
87
- if (this.label && !this.label.hasOwnProperty('visible')) {
88
- this.label.visible = true;
89
- }
90
- return this.label.visible;
91
- }
92
- }
93
- /**
94
- * @hidden
95
- */
96
- get labelPosition() {
97
- if (typeof this.label === 'boolean') {
98
- return 'end';
99
- }
100
- else {
101
- if (this.label && !this.label.hasOwnProperty('position')) {
102
- this.label.position = 'end';
103
- }
104
- return this.label.position;
105
- }
106
- }
107
- /**
108
- * @hidden
109
- */
110
- get isPositionStart() {
111
- return this.labelPosition === 'start';
112
- }
113
- /**
114
- * @hidden
115
- */
116
- get isPositionCenter() {
117
- return this.labelPosition === 'center';
118
- }
119
- /**
120
- * @hidden
121
- */
122
- get isPositionEnd() {
123
- return this.labelPosition === 'end';
124
- }
125
- /**
126
- * @hidden
127
- */
128
- get formattedLabelValue() {
129
- return formatValue(this.displayValue, this.min, this.max, this.label);
130
- }
131
- progressStatusElement;
132
- progressStatusWrapperElement;
133
- animationFrame;
134
- cancelCurrentAnimation;
135
- isAnimationInProgress;
136
- /**
137
- * @hidden
138
- */
139
- constructor(localization, elem, renderer, zone) {
140
- super(elem, renderer, localization);
141
- this.localization = localization;
142
- this.elem = elem;
143
- this.renderer = renderer;
144
- this.zone = zone;
145
- }
146
- /**
147
- * @hidden
148
- */
149
- ngOnChanges(changes) {
150
- super.ngOnChanges(changes);
151
- if (this.isAnimationInProgress && stopCurrentAnimation(changes)) {
152
- this.cancelCurrentAnimation = true;
153
- }
154
- if (runAnimation(changes, this.animation, this.previousValue, this.displayValue) && !changes['value'].firstChange) {
155
- this.startAnimation(this.previousValue);
156
- }
157
- }
158
- /**
159
- * @hidden
160
- */
161
- ngOnDestroy() {
162
- if (this.animationFrame) {
163
- cancelAnimationFrame(this.animationFrame);
164
- }
165
- }
166
- /**
167
- * @hidden
168
- */
169
- startAnimation(previousValue) {
170
- this.isAnimationInProgress = true;
171
- const element = this.progressStatusElement.nativeElement;
172
- const wrapperElement = this.progressStatusWrapperElement.nativeElement;
173
- const animationOptions = this.getAnimationOptions(previousValue);
174
- this.zone.runOutsideAngular(() => {
175
- if (this.animationFrame) {
176
- cancelAnimationFrame(this.animationFrame);
177
- }
178
- const animate = () => {
179
- const elapsed = new Date().getTime() - animationOptions.startTime;
180
- const position = Math.min(elapsed / animationOptions.duration, 1);
181
- const size = animationOptions.startSize + animationOptions.deltaSize * position;
182
- const wrapperSize = (100 / size) * 100;
183
- this.renderValueChange(element, wrapperElement, animationOptions.property, size, wrapperSize);
184
- if (position < 1) {
185
- if (this.cancelCurrentAnimation) {
186
- this.resetProgress(element, wrapperElement, animationOptions.property);
187
- return;
188
- }
189
- this.animationFrame = requestAnimationFrame(animate);
190
- }
191
- else {
192
- this.stopAnimation(previousValue);
193
- }
194
- };
195
- animate();
196
- });
197
- }
198
- /**
199
- * @hidden
200
- */
201
- get animationDuration() {
202
- if (typeof this.animation === 'boolean') {
203
- return 400;
204
- }
205
- else {
206
- if (this.animation && !this.animation.hasOwnProperty('duration')) {
207
- this.animation.duration = 400;
208
- }
209
- return this.animation.duration;
210
- }
211
- }
212
- stopAnimation(value) {
213
- if (hasObservers(this.animationEnd)) {
214
- this.zone.run(() => {
215
- this.animationEnd.emit({
216
- from: value,
217
- to: this.displayValue
218
- });
219
- });
220
- }
221
- this.zone.run(() => {
222
- this.isAnimationInProgress = false;
223
- });
224
- }
225
- getAnimationOptions(value) {
226
- const isHorizontal = this.orientation === 'horizontal';
227
- const previousRatio = calculateRatio(this.min, this.max, value);
228
- const previousStatusWidth = isHorizontal ? previousRatio * 100 : 100;
229
- const previousStatusHeight = !isHorizontal ? previousRatio * 100 : 100;
230
- const property = isHorizontal ? 'width' : 'height';
231
- const startTime = new Date().getTime();
232
- const startSize = isHorizontal ? previousStatusWidth : previousStatusHeight;
233
- const deltaSize = isHorizontal ? this.statusWidth - previousStatusWidth : this.statusHeight - previousStatusHeight;
234
- const duration = this.animationDuration * Math.abs((deltaSize / 100));
235
- return {
236
- property,
237
- startTime,
238
- startSize,
239
- deltaSize,
240
- duration
241
- };
242
- }
243
- renderValueChange(element, wrapperElement, property, size, wrapperSize) {
244
- this.renderer.setStyle(element, property, size + '%');
245
- this.renderer.setStyle(wrapperElement, property, wrapperSize + '%');
246
- }
247
- resetProgress(element, wrapperElement, property) {
248
- const size = calculateRatio(this.min, this.max, this.value);
249
- const newSize = size * 100;
250
- const newWrapperSize = 100 / size;
251
- this.renderValueChange(element, wrapperElement, property, newSize, newWrapperSize);
252
- this.zone.run(() => {
253
- this.cancelCurrentAnimation = false;
254
- this.isAnimationInProgress = false;
255
- });
256
- }
257
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProgressBarComponent, deps: [{ token: i1.LocalizationService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
258
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ProgressBarComponent, isStandalone: true, selector: "kendo-progressbar", inputs: { label: "label", progressCssStyle: "progressCssStyle", progressCssClass: "progressCssClass", emptyCssStyle: "emptyCssStyle", emptyCssClass: "emptyCssClass", animation: "animation" }, outputs: { animationEnd: "animationEnd" }, providers: [
259
- LocalizationService,
260
- {
261
- provide: L10N_PREFIX,
262
- useValue: 'kendo.progressbar'
263
- }
264
- ], 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: `
265
- <ng-container kendoProgressBarLocalizedMessages
266
- i18n-progressBarLabel="kendo.progressbar.progressBarLabel|The aria-label attribute for the ProgressBar component."
267
- progressBarLabel="Progressbar"
268
- >
269
- </ng-container>
270
- <span class="k-progress-status-wrap"
271
- [class.k-progress-start]="isPositionStart"
272
- [class.k-progress-center]="isPositionCenter"
273
- [class.k-progress-end]="isPositionEnd"
274
- [ngStyle]="emptyCssStyle"
275
- [ngClass]="emptyCssClass">
276
- @if (showLabel) {
277
- <span class="k-progress-status">{{formattedLabelValue}}</span>
278
- }
279
- </span>
280
- <div
281
- #progressStatus
282
- class="k-selected k-progressbar-value"
283
- [class.k-complete]="isCompleted"
284
- [ngStyle]="progressCssStyle"
285
- [ngClass]="progressCssClass"
286
- [style.width.%]="statusWidth"
287
- [style.height.%]="statusHeight"
288
- >
289
- <span
290
- #progressStatusWrap
291
- class="k-progress-status-wrap"
292
- [style.width.%]="statusWrapperWidth"
293
- [style.height.%]="statusWrapperHeight"
294
- [class.k-progress-start]="isPositionStart"
295
- [class.k-progress-center]="isPositionCenter"
296
- [class.k-progress-end]="isPositionEnd"
297
- >
298
- @if (showLabel) {
299
- <span class="k-progress-status">{{formattedLabelValue}}</span>
300
- }
301
- </span>
302
- </div>
303
- `, isInline: true, dependencies: [{ kind: "directive", type: LocalizedProgressBarMessagesDirective, selector: "[kendoProgressBarLocalizedMessages]" }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
304
- }
305
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProgressBarComponent, decorators: [{
306
- type: Component,
307
- args: [{
308
- exportAs: 'kendoProgressBar',
309
- selector: 'kendo-progressbar',
310
- template: `
311
- <ng-container kendoProgressBarLocalizedMessages
312
- i18n-progressBarLabel="kendo.progressbar.progressBarLabel|The aria-label attribute for the ProgressBar component."
313
- progressBarLabel="Progressbar"
314
- >
315
- </ng-container>
316
- <span class="k-progress-status-wrap"
317
- [class.k-progress-start]="isPositionStart"
318
- [class.k-progress-center]="isPositionCenter"
319
- [class.k-progress-end]="isPositionEnd"
320
- [ngStyle]="emptyCssStyle"
321
- [ngClass]="emptyCssClass">
322
- @if (showLabel) {
323
- <span class="k-progress-status">{{formattedLabelValue}}</span>
324
- }
325
- </span>
326
- <div
327
- #progressStatus
328
- class="k-selected k-progressbar-value"
329
- [class.k-complete]="isCompleted"
330
- [ngStyle]="progressCssStyle"
331
- [ngClass]="progressCssClass"
332
- [style.width.%]="statusWidth"
333
- [style.height.%]="statusHeight"
334
- >
335
- <span
336
- #progressStatusWrap
337
- class="k-progress-status-wrap"
338
- [style.width.%]="statusWrapperWidth"
339
- [style.height.%]="statusWrapperHeight"
340
- [class.k-progress-start]="isPositionStart"
341
- [class.k-progress-center]="isPositionCenter"
342
- [class.k-progress-end]="isPositionEnd"
343
- >
344
- @if (showLabel) {
345
- <span class="k-progress-status">{{formattedLabelValue}}</span>
346
- }
347
- </span>
348
- </div>
349
- `,
350
- providers: [
351
- LocalizationService,
352
- {
353
- provide: L10N_PREFIX,
354
- useValue: 'kendo.progressbar'
355
- }
356
- ],
357
- standalone: true,
358
- imports: [LocalizedProgressBarMessagesDirective, NgStyle, NgClass]
359
- }]
360
- }], ctorParameters: () => [{ type: i1.LocalizationService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }], propDecorators: { label: [{
361
- type: Input
362
- }], progressCssStyle: [{
363
- type: Input
364
- }], progressCssClass: [{
365
- type: Input
366
- }], emptyCssStyle: [{
367
- type: Input
368
- }], emptyCssClass: [{
369
- type: Input
370
- }], animation: [{
371
- type: Input
372
- }], animationEnd: [{
373
- type: Output
374
- }], progressStatusElement: [{
375
- type: ViewChild,
376
- args: ['progressStatus', { static: false }]
377
- }], progressStatusWrapperElement: [{
378
- type: ViewChild,
379
- args: ['progressStatusWrap', { static: false }]
380
- }] } });
@@ -1,45 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { NgModule } from '@angular/core';
6
- import { KENDO_PROGRESSBARS } from './directives';
7
- import { ResizeBatchService } from '@progress/kendo-angular-common';
8
- import * as i0 from "@angular/core";
9
- import * as i1 from "./chunk/chunk-progressbar.component";
10
- import * as i2 from "./common/localization/custom-messages.component";
11
- import * as i3 from "./circularprogressbar/center-template.directive";
12
- import * as i4 from "./circularprogressbar/circular-progressbar.component";
13
- import * as i5 from "./progressbar.component";
14
- // IMPORTANT: NgModule export kept for backwards compatibility
15
- /**
16
- * Represents the [NgModule](link:site.data.urls.angular['ngmodules'])
17
- * definition for the ProgressBar components.
18
- *
19
- * @example
20
- * ```typescript
21
- * import { NgModule } from '@angular/core';
22
- * import { BrowserModule } from '@angular/platform-browser';
23
- * import { ProgressBarModule } from '@progress/kendo-angular-progressbar';
24
- *
25
- * @NgModule({
26
- * imports: [BrowserModule, ProgressBarModule],
27
- * declarations: [AppComponent],
28
- * bootstrap: [AppComponent]
29
- * })
30
- * export class AppModule { }
31
- * ```
32
- */
33
- export class ProgressBarModule {
34
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProgressBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
35
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: ProgressBarModule, imports: [i1.ChunkProgressBarComponent, i2.ProgressBarCustomMessagesComponent, i3.CircularProgressbarCenterTemplateDirective, i4.CircularProgressBarComponent, i2.ProgressBarCustomMessagesComponent, i5.ProgressBarComponent, i2.ProgressBarCustomMessagesComponent], exports: [i1.ChunkProgressBarComponent, i2.ProgressBarCustomMessagesComponent, i3.CircularProgressbarCenterTemplateDirective, i4.CircularProgressBarComponent, i2.ProgressBarCustomMessagesComponent, i5.ProgressBarComponent, i2.ProgressBarCustomMessagesComponent] });
36
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProgressBarModule, providers: [ResizeBatchService], imports: [i4.CircularProgressBarComponent] });
37
- }
38
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ProgressBarModule, decorators: [{
39
- type: NgModule,
40
- args: [{
41
- exports: [...KENDO_PROGRESSBARS],
42
- imports: [...KENDO_PROGRESSBARS],
43
- providers: [ResizeBatchService]
44
- }]
45
- }] });
@@ -1,5 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- export {};
@@ -1,5 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- export {};
@@ -1,5 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- export {};
@@ -1,5 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- export {};
@@ -1,5 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- export {};
@@ -1,5 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- export {};
@@ -1,5 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- export {};
@@ -1,5 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- export {};