@progress/kendo-angular-progressbar 3.0.0-next.202204060718 → 3.1.0-dev.202207261042

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.
@@ -2,4 +2,4 @@
2
2
  * Copyright © 2021 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
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@progress/kendo-licensing"),require("@progress/kendo-angular-l10n"),require("@progress/kendo-angular-common"),require("@angular/common")):"function"==typeof define&&define.amd?define("KendoAngularProgressbar",["exports","@angular/core","@progress/kendo-licensing","@progress/kendo-angular-l10n","@progress/kendo-angular-common","@angular/common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoAngularProgressbar={},e.ng.core,e.KendoLicensing,e.KendoAngularL10N,e.KendoAngularCommon,e.ng.common)}(this,function(e,a,s,t,n,r){"use strict";function i(s){if(s&&s.__esModule)return s;var n=Object.create(null);return s&&Object.keys(s).forEach(function(e){var t;"default"!==e&&(t=Object.getOwnPropertyDescriptor(s,e),Object.defineProperty(n,e,t.get?t:{enumerable:!0,get:function(){return s[e]}}))}),n.default=s,Object.freeze(n)}var o=i(a),l=i(t),p=i(r),u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])})(e,t)};function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function s(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)}Object.create;Object.create;function g(e,t,s,n){var r,i,a,o,l=1===(r=e.toString().split(".")).length?""+r[0]:r[0]+"."+r[1].substr(0,b);if("boolean"!=typeof n){if("string"!=typeof n.format)return"function"==typeof n.format?n.format(e):l;switch(n.format){case"value":return l;case"percent":return Math.floor((i=e,a=t,o=Math.abs((s-a)/100),Math.abs((i-a)/o)))+"%";default:return l}}return l}function h(e,t,s){return Math.max(Math.min(s,t),e)}function m(e,t,s){return Math.max((s-e)/(t-e),1e-4)}function d(e,t,s){return e[t]&&void 0!==e[t].currentValue?e[t].currentValue:s}var y={name:"@progress/kendo-angular-progressbar",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1649229467,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"},b=3,f=(Object.defineProperty(C.prototype,"isHorizontal",{get:function(){return"horizontal"===this.orientation},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"isVertical",{get:function(){return"vertical"===this.orientation},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"disabledClass",{get:function(){return this.disabled},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"reverseClass",{get:function(){return this.reverse},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"indeterminateClass",{get:function(){return this.indeterminate},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"dirAttribute",{get:function(){return this.direction},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"ariaMinAttribute",{get:function(){return String(this.min)},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"ariaMaxAttribute",{get:function(){return String(this.max)},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"ariaValueAttribute",{get:function(){return this.indeterminate?void 0:String(this.displayValue)},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"isCompleted",{get:function(){return this.value===this.max},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"statusWidth",{get:function(){return"horizontal"===this.orientation?100*this._progressRatio:100},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"statusHeight",{get:function(){return"vertical"===this.orientation?100*this._progressRatio:100},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"statusWrapperWidth",{get:function(){return"horizontal"===this.orientation?100/this._progressRatio:100},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"statusWrapperHeight",{get:function(){return"vertical"===this.orientation?100/this._progressRatio:100},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"_progressRatio",{get:function(){return m(this.min,this.max,this.displayValue)},enumerable:!1,configurable:!0}),C.prototype.ngOnChanges=function(e){var t=d(e,"min",this.min),s=d(e,"max",this.max),n=d(e,"value",this.value);if(e.min||e.max||e.value){if(e.min||e.max){var r=t,i=s;if(a.isDevMode&&i<r)throw new Error("The max value should be greater than the min.")}e.value&&(null!=n&&!Number.isNaN(n)||(this.value=t),i=this.displayValue,this.displayValue=h(this.min,this.max,n),this.previousValue=i),this.min=t,this.max=s,this.displayValue=h(this.min,this.max,n)}},C.prototype.ngOnDestroy=function(){this.localizationChangeSubscription&&this.localizationChangeSubscription.unsubscribe()},C);function C(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,s.validatePackage(y),this.localizationChangeSubscription=e.changes.subscribe(function(e){e=e.rtl;t.direction=e?"rtl":"ltr"})}f.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:f,deps:[{token:l.LocalizationService}],target:o.ɵɵFactoryTarget.Component}),f.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:f,selector:"ng-component",inputs:{max:"max",min:"min",value:"value",orientation:"orientation",disabled:"disabled",reverse:"reverse",indeterminate:"indeterminate"},host:{properties:{"class.k-widget":"this.widgetClasses","class.k-progressbar":"this.widgetClasses","class.k-progressbar-horizontal":"this.isHorizontal","class.k-progressbar-vertical":"this.isVertical","class.k-state-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:!0,ngImport:o,template:"",isInline:!0}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:f,decorators:[{type:a.Component,args:[{template:""}]}],ctorParameters:function(){return[{type:l.LocalizationService}]},propDecorators:{widgetClasses:[{type:a.HostBinding,args:["class.k-widget"]},{type:a.HostBinding,args:["class.k-progressbar"]}],isHorizontal:[{type:a.HostBinding,args:["class.k-progressbar-horizontal"]}],isVertical:[{type:a.HostBinding,args:["class.k-progressbar-vertical"]}],disabledClass:[{type:a.HostBinding,args:["class.k-state-disabled"]}],reverseClass:[{type:a.HostBinding,args:["class.k-progressbar-reverse"]}],indeterminateClass:[{type:a.HostBinding,args:["class.k-progressbar-indeterminate"]}],dirAttribute:[{type:a.HostBinding,args:["attr.dir"]}],roleAttribute:[{type:a.HostBinding,args:["attr.role"]}],ariaMinAttribute:[{type:a.HostBinding,args:["attr.aria-valuemin"]}],ariaMaxAttribute:[{type:a.HostBinding,args:["attr.aria-valuemax"]}],ariaValueAttribute:[{type:a.HostBinding,args:["attr.aria-valuenow"]}],max:[{type:a.Input}],min:[{type:a.Input}],value:[{type:a.Input}],orientation:[{type:a.Input}],disabled:[{type:a.Input}],reverse:[{type:a.Input}],indeterminate:[{type:a.Input}]}});c(S,v=f),Object.defineProperty(S.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:!1,configurable:!0}),Object.defineProperty(S.prototype,"labelPosition",{get:function(){return"boolean"==typeof this.label?"end":(this.label&&!this.label.hasOwnProperty("position")&&(this.label.position="end"),this.label.position)},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"isPositionStart",{get:function(){return"start"===this.labelPosition},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"isPositionCenter",{get:function(){return"center"===this.labelPosition},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"isPositionEnd",{get:function(){return"end"===this.labelPosition},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"formattedLabelValue",{get:function(){return g(this.displayValue,this.min,this.max,this.label)},enumerable:!1,configurable:!0}),S.prototype.ngOnChanges=function(e){var t,s,n,r;v.prototype.ngOnChanges.call(this,e),this.isAnimationInProgress&&(s=e,t=Boolean(s.animation),s=t&&s.animation.currentValue,t&&!s)&&(this.cancelCurrentAnimation=!0),t=e,s=this.animation,n=this.previousValue,r=this.displayValue,s&&"undefined"!=typeof requestAnimationFrame&&t.value&&n!==r&&!e.value.firstChange&&this.startAnimation(this.previousValue)},S.prototype.ngOnDestroy=function(){this.animationFrame&&cancelAnimationFrame(this.animationFrame)},S.prototype.startAnimation=function(n){var r=this,i=(this.isAnimationInProgress=!0,this.progressStatusElement.nativeElement),a=this.progressStatusWrapperElement.nativeElement,o=this.getAnimationOptions(n);this.zone.runOutsideAngular(function(){r.animationFrame&&cancelAnimationFrame(r.animationFrame);function s(){var e=(new Date).getTime()-o.startTime,e=Math.min(e/o.duration,1),t=o.startSize+o.deltaSize*e;r.renderValueChange(i,a,o.property,t,100/t*100),e<1?r.cancelCurrentAnimation?r.resetProgress(i,a,o.property):r.animationFrame=requestAnimationFrame(s):r.stopAnimation(n)}s()})},Object.defineProperty(S.prototype,"animationDuration",{get:function(){return"boolean"==typeof this.animation?400:(this.animation&&!this.animation.hasOwnProperty("duration")&&(this.animation.duration=400),this.animation.duration)},enumerable:!1,configurable:!0}),S.prototype.stopAnimation=function(e){var t=this;n.hasObservers(this.animationEnd)&&this.zone.run(function(){t.animationEnd.emit({from:e,to:t.displayValue})}),this.zone.run(function(){t.isAnimationInProgress=!1})},S.prototype.getAnimationOptions=function(e){var t="horizontal"===this.orientation,e=m(this.min,this.max,e),s=t?100*e:100,e=t?100:100*e,n=t?"width":"height",r=(new Date).getTime(),i=t?this.statusWidth-s:this.statusHeight-e;return{property:n,startTime:r,startSize:t?s:e,deltaSize:i,duration:this.animationDuration*Math.abs(i/100)}},S.prototype.renderValueChange=function(e,t,s,n,r){this.renderer.setStyle(e,s,n+"%"),this.renderer.setStyle(t,s,r+"%")},S.prototype.resetProgress=function(e,t,s){var n=this,r=m(this.min,this.max,this.value);this.renderValueChange(e,t,s,100*r,100/r),this.zone.run(function(){n.cancelCurrentAnimation=!1,n.isAnimationInProgress=!1})};var v,k=S;function S(e,t,s){var n=v.call(this,e)||this;return n.localization=e,n.zone=t,n.renderer=s,n.label=!0,n.animation=!1,n.animationEnd=new a.EventEmitter,n}k.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:k,deps:[{token:l.LocalizationService},{token:o.NgZone},{token:o.Renderer2}],target:o.ɵɵFactoryTarget.Component}),k.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:k,selector:"kendo-progressbar",inputs:{label:"label",progressCssStyle:"progressCssStyle",progressCssClass:"progressCssClass",emptyCssStyle:"emptyCssStyle",emptyCssClass:"emptyCssClass",animation:"animation"},outputs:{animationEnd:"animationEnd"},providers:[t.LocalizationService,{provide:t.L10N_PREFIX,useValue:"kendo.progressbar"}],viewQueries:[{propertyName:"progressStatusElement",first:!0,predicate:["progressStatus"],descendants:!0},{propertyName:"progressStatusWrapperElement",first:!0,predicate:["progressStatusWrap"],descendants:!0}],exportAs:["kendoProgressBar"],usesInheritance:!0,usesOnChanges:!0,ngImport:o,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 ',isInline:!0,directives:[{type:p.NgStyle,selector:"[ngStyle]",inputs:["ngStyle"]},{type:p.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{type:p.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:k,decorators:[{type:a.Component,args:[{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:[t.LocalizationService,{provide:t.L10N_PREFIX,useValue:"kendo.progressbar"}]}]}],ctorParameters:function(){return[{type:l.LocalizationService},{type:o.NgZone},{type:o.Renderer2}]},propDecorators:{label:[{type:a.Input}],progressCssStyle:[{type:a.Input}],progressCssClass:[{type:a.Input}],emptyCssStyle:[{type:a.Input}],emptyCssClass:[{type:a.Input}],animation:[{type:a.Input}],animationEnd:[{type:a.Output}],progressStatusElement:[{type:a.ViewChild,args:["progressStatus",{static:!1}]}],progressStatusWrapperElement:[{type:a.ViewChild,args:["progressStatusWrap",{static:!1}]}]}});c(O,P=f),Object.defineProperty(O.prototype,"chunks",{get:function(){for(var e,t=this.chunkCount,s=Array(t).fill(!1),n=Math.floor(this._progressRatio*t),r=0;r<n;r++)s[r]=!0;return t=this.orientation,e=this.reverse,("vertical"===t&&!e||"horizontal"===t&&e)&&s.reverse(),s},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"chunkSizePercentage",{get:function(){return 100/this.chunkCount},enumerable:!1,configurable:!0}),Object.defineProperty(O.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:!1,configurable:!0});var P,f=O;function O(e){var t=P.call(this,e)||this;return t.localization=e,t.chunkCount=5,t._orientationStyles={width:t.chunkSizePercentage+"%"},t}f.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:f,deps:[{token:l.LocalizationService}],target:o.ɵɵFactoryTarget.Component}),f.ɵcmp=o.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:f,selector:"kendo-chunkprogressbar",inputs:{chunkCount:"chunkCount",progressCssStyle:"progressCssStyle",progressCssClass:"progressCssClass",emptyCssStyle:"emptyCssStyle",emptyCssClass:"emptyCssClass"},providers:[t.LocalizationService,{provide:t.L10N_PREFIX,useValue:"kendo.chunkprogressbar"}],exportAs:["kendoChunkProgressBar"],usesInheritance:!0,ngImport:o,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 ',isInline:!0,directives:[{type:p.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{type:p.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{type:p.NgStyle,selector:"[ngStyle]",inputs:["ngStyle"]}]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:f,decorators:[{type:a.Component,args:[{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:[t.LocalizationService,{provide:t.L10N_PREFIX,useValue:"kendo.chunkprogressbar"}]}]}],ctorParameters:function(){return[{type:l.LocalizationService}]},propDecorators:{chunkCount:[{type:a.Input}],progressCssStyle:[{type:a.Input}],progressCssClass:[{type:a.Input}],emptyCssStyle:[{type:a.Input}],emptyCssClass:[{type:a.Input}]}});var p=[k,f],t=[r.CommonModule],I=function(){};I.ɵfac=o.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:I,deps:[],target:o.ɵɵFactoryTarget.NgModule}),I.ɵmod=o.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:I,declarations:[k,f],imports:[r.CommonModule],exports:[k,f]}),I.ɵinj=o.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:I,imports:[t]}),o.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:o,type:I,decorators:[{type:a.NgModule,args:[{declarations:p,exports:p,imports:t}]}]}),e.ChunkProgressBarComponent=f,e.ProgressBarComponent=k,e.ProgressBarModule=I,Object.defineProperty(e,"__esModule",{value:!0})});
5
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@progress/kendo-licensing"),require("@progress/kendo-angular-l10n"),require("@progress/kendo-angular-common"),require("@angular/common"),require("rxjs")):"function"==typeof define&&define.amd?define("KendoAngularProgressbar",["exports","@angular/core","@progress/kendo-licensing","@progress/kendo-angular-l10n","@progress/kendo-angular-common","@angular/common","rxjs"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoAngularProgressbar={},e.ng.core,e.KendoLicensing,e.KendoAngularL10N,e.KendoAngularCommon,e.ng.common,e.rxjs)}(this,function(e,a,n,t,i,r,o){"use strict";function s(r){if(r&&r.__esModule)return r;var s=Object.create(null);return r&&Object.keys(r).forEach(function(e){var t;"default"!==e&&(t=Object.getOwnPropertyDescriptor(r,e),Object.defineProperty(s,e,t.get?t:{enumerable:!0,get:function(){return r[e]}}))}),s.default=r,Object.freeze(s)}var l=s(a),p=s(t),u=s(r),c=function(e,t){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function g(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}c(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}Object.create;Object.create;function h(e,t,r,s){var n,i,a,o,l=1===(n=e.toString().split(".")).length?""+n[0]:n[0]+"."+n[1].substr(0,v);if("boolean"!=typeof s){if("string"!=typeof s.format)return"function"==typeof s.format?s.format(e):l;switch(s.format){case"value":return l;case"percent":return Math.floor((i=e,a=t,o=Math.abs((r-a)/100),Math.abs((i-a)/o)))+"%";default:return l}}return l}function m(e,t,r){return Math.max(Math.min(r,t),e)}function d(e,t,r){return Math.max((r-e)/(t-e),1e-4)}function y(e,t,r){return e[t]&&void 0!==e[t].currentValue?e[t].currentValue:r}function f(e,t){e.forEach(function(e){t[e.method](e.el,e.attr,""+e.attrValue)})}var b={name:"@progress/kendo-angular-progressbar",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1658832123,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"},v=3,C=(Object.defineProperty(k.prototype,"isHorizontal",{get:function(){return"horizontal"===this.orientation},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"isVertical",{get:function(){return"vertical"===this.orientation},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"disabledClass",{get:function(){return this.disabled},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"reverseClass",{get:function(){return this.reverse},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"indeterminateClass",{get:function(){return this.indeterminate},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"dirAttribute",{get:function(){return this.direction},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"ariaMinAttribute",{get:function(){return String(this.min)},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"ariaMaxAttribute",{get:function(){return String(this.max)},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"ariaValueAttribute",{get:function(){return this.indeterminate?void 0:String(this.displayValue)},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"isCompleted",{get:function(){return this.value===this.max},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"statusWidth",{get:function(){return"horizontal"===this.orientation?100*this._progressRatio:100},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"statusHeight",{get:function(){return"vertical"===this.orientation?100*this._progressRatio:100},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"statusWrapperWidth",{get:function(){return"horizontal"===this.orientation?100/this._progressRatio:100},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"statusWrapperHeight",{get:function(){return"vertical"===this.orientation?100/this._progressRatio:100},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"_progressRatio",{get:function(){return d(this.min,this.max,this.displayValue)},enumerable:!1,configurable:!0}),k.prototype.ngOnChanges=function(e){var t=y(e,"min",this.min),r=y(e,"max",this.max),s=y(e,"value",this.value);if(e.min||e.max||e.value){if(e.min||e.max){var n=t,i=r;if(a.isDevMode&&i<n)throw new Error("The max value should be greater than the min.")}e.value&&(null!=s&&!Number.isNaN(s)||(this.value=t),i=this.displayValue,this.displayValue=m(this.min,this.max,s),this.previousValue=i),this.min=t,this.max=r,this.displayValue=m(this.min,this.max,s)}},k.prototype.ngOnDestroy=function(){this.localizationChangeSubscription&&this.localizationChangeSubscription.unsubscribe()},k);function k(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,n.validatePackage(b),this.localizationChangeSubscription=e.changes.subscribe(function(e){e=e.rtl;t.direction=e?"rtl":"ltr"})}C.ɵfac=l.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:C,deps:[{token:p.LocalizationService}],target:l.ɵɵFactoryTarget.Component}),C.ɵcmp=l.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:C,selector:"ng-component",inputs:{max:"max",min:"min",value:"value",orientation:"orientation",disabled:"disabled",reverse:"reverse",indeterminate:"indeterminate"},host:{properties:{"class.k-widget":"this.widgetClasses","class.k-progressbar":"this.widgetClasses","class.k-progressbar-horizontal":"this.isHorizontal","class.k-progressbar-vertical":"this.isVertical","class.k-state-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:!0,ngImport:l,template:"",isInline:!0}),l.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:C,decorators:[{type:a.Component,args:[{template:""}]}],ctorParameters:function(){return[{type:p.LocalizationService}]},propDecorators:{widgetClasses:[{type:a.HostBinding,args:["class.k-widget"]},{type:a.HostBinding,args:["class.k-progressbar"]}],isHorizontal:[{type:a.HostBinding,args:["class.k-progressbar-horizontal"]}],isVertical:[{type:a.HostBinding,args:["class.k-progressbar-vertical"]}],disabledClass:[{type:a.HostBinding,args:["class.k-state-disabled"]}],reverseClass:[{type:a.HostBinding,args:["class.k-progressbar-reverse"]}],indeterminateClass:[{type:a.HostBinding,args:["class.k-progressbar-indeterminate"]}],dirAttribute:[{type:a.HostBinding,args:["attr.dir"]}],roleAttribute:[{type:a.HostBinding,args:["attr.role"]}],ariaMinAttribute:[{type:a.HostBinding,args:["attr.aria-valuemin"]}],ariaMaxAttribute:[{type:a.HostBinding,args:["attr.aria-valuemax"]}],ariaValueAttribute:[{type:a.HostBinding,args:["attr.aria-valuenow"]}],max:[{type:a.Input}],min:[{type:a.Input}],value:[{type:a.Input}],orientation:[{type:a.Input}],disabled:[{type:a.Input}],reverse:[{type:a.Input}],indeterminate:[{type:a.Input}]}});g(V,S=C),Object.defineProperty(V.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:!1,configurable:!0}),Object.defineProperty(V.prototype,"labelPosition",{get:function(){return"boolean"==typeof this.label?"end":(this.label&&!this.label.hasOwnProperty("position")&&(this.label.position="end"),this.label.position)},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"isPositionStart",{get:function(){return"start"===this.labelPosition},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"isPositionCenter",{get:function(){return"center"===this.labelPosition},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"isPositionEnd",{get:function(){return"end"===this.labelPosition},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"formattedLabelValue",{get:function(){return h(this.displayValue,this.min,this.max,this.label)},enumerable:!1,configurable:!0}),V.prototype.ngOnChanges=function(e){var t,r,s,n;S.prototype.ngOnChanges.call(this,e),this.isAnimationInProgress&&(r=e,t=Boolean(r.animation),r=t&&r.animation.currentValue,t&&!r)&&(this.cancelCurrentAnimation=!0),t=e,r=this.animation,s=this.previousValue,n=this.displayValue,r&&"undefined"!=typeof requestAnimationFrame&&t.value&&s!==n&&!e.value.firstChange&&this.startAnimation(this.previousValue)},V.prototype.ngOnDestroy=function(){this.animationFrame&&cancelAnimationFrame(this.animationFrame)},V.prototype.startAnimation=function(s){var n=this,i=(this.isAnimationInProgress=!0,this.progressStatusElement.nativeElement),a=this.progressStatusWrapperElement.nativeElement,o=this.getAnimationOptions(s);this.zone.runOutsideAngular(function(){n.animationFrame&&cancelAnimationFrame(n.animationFrame);function r(){var e=(new Date).getTime()-o.startTime,e=Math.min(e/o.duration,1),t=o.startSize+o.deltaSize*e;n.renderValueChange(i,a,o.property,t,100/t*100),e<1?n.cancelCurrentAnimation?n.resetProgress(i,a,o.property):n.animationFrame=requestAnimationFrame(r):n.stopAnimation(s)}r()})},Object.defineProperty(V.prototype,"animationDuration",{get:function(){return"boolean"==typeof this.animation?400:(this.animation&&!this.animation.hasOwnProperty("duration")&&(this.animation.duration=400),this.animation.duration)},enumerable:!1,configurable:!0}),V.prototype.stopAnimation=function(e){var t=this;i.hasObservers(this.animationEnd)&&this.zone.run(function(){t.animationEnd.emit({from:e,to:t.displayValue})}),this.zone.run(function(){t.isAnimationInProgress=!1})},V.prototype.getAnimationOptions=function(e){var t="horizontal"===this.orientation,e=d(this.min,this.max,e),r=t?100*e:100,e=t?100:100*e,s=t?"width":"height",n=(new Date).getTime(),i=t?this.statusWidth-r:this.statusHeight-e;return{property:s,startTime:n,startSize:t?r:e,deltaSize:i,duration:this.animationDuration*Math.abs(i/100)}},V.prototype.renderValueChange=function(e,t,r,s,n){this.renderer.setStyle(e,r,s+"%"),this.renderer.setStyle(t,r,n+"%")},V.prototype.resetProgress=function(e,t,r){var s=this,n=d(this.min,this.max,this.value);this.renderValueChange(e,t,r,100*n,100/n),this.zone.run(function(){s.cancelCurrentAnimation=!1,s.isAnimationInProgress=!1})};var S,P=V;function V(e,t,r){var s=S.call(this,e)||this;return s.localization=e,s.zone=t,s.renderer=r,s.label=!0,s.animation=!1,s.animationEnd=new a.EventEmitter,s}P.ɵfac=l.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:P,deps:[{token:p.LocalizationService},{token:l.NgZone},{token:l.Renderer2}],target:l.ɵɵFactoryTarget.Component}),P.ɵcmp=l.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:P,selector:"kendo-progressbar",inputs:{label:"label",progressCssStyle:"progressCssStyle",progressCssClass:"progressCssClass",emptyCssStyle:"emptyCssStyle",emptyCssClass:"emptyCssClass",animation:"animation"},outputs:{animationEnd:"animationEnd"},providers:[t.LocalizationService,{provide:t.L10N_PREFIX,useValue:"kendo.progressbar"}],viewQueries:[{propertyName:"progressStatusElement",first:!0,predicate:["progressStatus"],descendants:!0},{propertyName:"progressStatusWrapperElement",first:!0,predicate:["progressStatusWrap"],descendants:!0}],exportAs:["kendoProgressBar"],usesInheritance:!0,usesOnChanges:!0,ngImport:l,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 ',isInline:!0,directives:[{type:u.NgStyle,selector:"[ngStyle]",inputs:["ngStyle"]},{type:u.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{type:u.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}]}),l.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:P,decorators:[{type:a.Component,args:[{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:[t.LocalizationService,{provide:t.L10N_PREFIX,useValue:"kendo.progressbar"}]}]}],ctorParameters:function(){return[{type:p.LocalizationService},{type:l.NgZone},{type:l.Renderer2}]},propDecorators:{label:[{type:a.Input}],progressCssStyle:[{type:a.Input}],progressCssClass:[{type:a.Input}],emptyCssStyle:[{type:a.Input}],emptyCssClass:[{type:a.Input}],animation:[{type:a.Input}],animationEnd:[{type:a.Output}],progressStatusElement:[{type:a.ViewChild,args:["progressStatus",{static:!1}]}],progressStatusWrapperElement:[{type:a.ViewChild,args:["progressStatusWrap",{static:!1}]}]}});g(O,I=C),Object.defineProperty(O.prototype,"chunks",{get:function(){for(var e,t=this.chunkCount,r=Array(t).fill(!1),s=Math.floor(this._progressRatio*t),n=0;n<s;n++)r[n]=!0;return t=this.orientation,e=this.reverse,("vertical"===t&&!e||"horizontal"===t&&e)&&r.reverse(),r},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"chunkSizePercentage",{get:function(){return 100/this.chunkCount},enumerable:!1,configurable:!0}),Object.defineProperty(O.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:!1,configurable:!0});var I,C=O;function O(e){var t=I.call(this,e)||this;return t.localization=e,t.chunkCount=5,t._orientationStyles={width:t.chunkSizePercentage+"%"},t}C.ɵfac=l.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:C,deps:[{token:p.LocalizationService}],target:l.ɵɵFactoryTarget.Component}),C.ɵcmp=l.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:C,selector:"kendo-chunkprogressbar",inputs:{chunkCount:"chunkCount",progressCssStyle:"progressCssStyle",progressCssClass:"progressCssClass",emptyCssStyle:"emptyCssStyle",emptyCssClass:"emptyCssClass"},providers:[t.LocalizationService,{provide:t.L10N_PREFIX,useValue:"kendo.chunkprogressbar"}],exportAs:["kendoChunkProgressBar"],usesInheritance:!0,ngImport:l,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 ',isInline:!0,directives:[{type:u.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{type:u.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{type:u.NgStyle,selector:"[ngStyle]",inputs:["ngStyle"]}]}),l.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:C,decorators:[{type:a.Component,args:[{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:[t.LocalizationService,{provide:t.L10N_PREFIX,useValue:"kendo.chunkprogressbar"}]}]}],ctorParameters:function(){return[{type:p.LocalizationService}]},propDecorators:{chunkCount:[{type:a.Input}],progressCssStyle:[{type:a.Input}],progressCssClass:[{type:a.Input}],emptyCssStyle:[{type:a.Input}],emptyCssClass:[{type:a.Input}]}});var w=function(e){this.templateRef=e},E=(w.ɵfac=l.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:w,deps:[{token:l.TemplateRef}],target:l.ɵɵFactoryTarget.Directive}),w.ɵdir=l.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:w,selector:"[kendoCircularProgressbarCenterTemplate]",ngImport:l}),l.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:w,decorators:[{type:a.Directive,args:[{selector:"[kendoCircularProgressbarCenterTemplate]"}]}],ctorParameters:function(){return[{type:l.TemplateRef}]}}),Object.defineProperty(x.prototype,"value",{get:function(){return this._value},set:function(e){e>this.max&&this.handleErrors("value > max"),e<this.min&&this.handleErrors("value < min"),this.previousValue=this.value,this._value=e},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"max",{get:function(){return this._max},set:function(e){e<this.min&&this.handleErrors("max < min"),this._max=e},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"min",{get:function(){return this._min},set:function(e){e>this.max&&this.handleErrors("max < min"),this._min=e},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"indeterminate",{get:function(){return this._indeterminate},set:function(e){this._indeterminate=e},enumerable:!1,configurable:!0}),x.prototype.ngAfterViewInit=function(){this.initProgressArc()},x.prototype.ngOnChanges=function(e){var t=e.value,r=this.progress,s=!e.value.firstChange;t&&r&&s&&(this.animation?this.progressbarAnimation():(t=this.value-this.min,this.internalValue=e.value.currentValue,this.calculateProgress(t))),e.opacity&&this.progress&&f([{method:"setAttribute",el:this.progress.nativeElement,attr:"opacity",attrValue:this.opacity}],this.renderer),e.indeterminate&&!e.indeterminate.firstChange&&this.indeterminateState()},x.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},x.prototype.initProgressArc=function(){var e;this.setStyles(),this.indeterminate?this.indeterminateState():this.animation?this.progressbarAnimation():(e=this.value-this.min,this.calculateProgress(e))},x.prototype.calculateProgress=function(e){this.progressColor&&this.updateProgressColor(e),this.updateCenterTemplate(e+this.min);var t=this.progress.nativeElement,r=this.progress.nativeElement.r.baseVal.value,r=Math.PI*(2*r),e=r-(this.rtl?-1*r:r)*(e/(this.max-this.min));f([{method:"setStyle",el:t,attr:"strokeDasharray",attrValue:r},{method:"setStyle",el:t,attr:"strokeDashoffset",attrValue:e}],this.renderer)},x.prototype.progressbarAnimation=function(){var e=this.internalValue>this.value-this.min,t=this.value>this.previousValue,r=this.internalValue<this.value-this.min,s=this.value<this.previousValue;e&&t||r&&s||(this.calculateProgress(this.internalValue),e=this.internalValue,i.hasObservers(this.animationEnd)&&this.animationEnd.emit({from:e,to:this.internalValue}),t?this.internalValue+=1:--this.internalValue,requestAnimationFrame(this.progressbarAnimation.bind(this)))},x.prototype.setStyles=function(){var e=this.progress.nativeElement,t=this.scale.nativeElement,r=this.element.nativeElement.getBoundingClientRect().width,e=[{method:"setAttribute",el:e,attr:"r",attrValue:r/2-10},{method:"setAttribute",el:e,attr:"cx",attrValue:r/2},{method:"setAttribute",el:e,attr:"cy",attrValue:r/2},{method:"setAttribute",el:e,attr:"opacity",attrValue:this.opacity},{method:"setAttribute",el:t,attr:"r",attrValue:r/2-10},{method:"setAttribute",el:t,attr:"cx",attrValue:r/2},{method:"setAttribute",el:t,attr:"cy",attrValue:r/2}];f(e,this.renderer)},x.prototype.indeterminateState=function(){var e,t,r=this.progress.nativeElement;this.indeterminate?(this.calculateProgress(this.value-this.min),e=this.rtl?{from:360,to:0}:{from:0,to:360},this.renderer.removeClass(r,"k-circular-progressbar-arc"),f([{method:"setStyle",el:r,attr:"transform-origin",attrValue:"center"},{method:"setStyle",el:r,attr:"fill",attrValue:"none"},{method:"setStyle",el:r,attr:"stroke-linecap",attrValue:"round"}],this.renderer),r.innerHTML='<animateTransform attributeName="transform" type="rotate" from="'+e.from+' 0 0" to="'+e.to+' 0 0" dur="1s" repeatCount="indefinite" />'):(this.renderer.addClass(r,"k-circular-progressbar-arc"),t=this.renderer,[{method:"removeStyle",el:r,attr:"transform-origin"},{method:"removeStyle",el:r,attr:"fill"},{method:"removeStyle",el:r,attr:"stroke-linecap"}].forEach(function(e){t[e.method](e.el,e.attr)}),r.innerHTML="",this.animation&&this.progressbarAnimation())},x.prototype.updateCenterTemplate=function(e){this.centerTemplate&&(this.centerTemplateContext.value=e,this.centerTemplateContext.color=this.currentColor,this.cdr.detectChanges(),this.positionLabel())},x.prototype.positionLabel=function(){var e=this.labelElement.nativeElement,t=this.svgWrapper.nativeElement.getBoundingClientRect(),r=t.width,t=t.height,r=r/2-e.offsetWidth/2,t=t/2-e.offsetHeight/2;f([{method:"setStyle",el:e,attr:"left",attrValue:r+"px"},{method:"setStyle",el:e,attr:"top",attrValue:t+"px"}],this.renderer)},Object.defineProperty(x.prototype,"currentColor",{get:function(){return this.progress.nativeElement.style.stroke},enumerable:!1,configurable:!0}),x.prototype.updateProgressColor=function(e){var t=this.progress.nativeElement;if("string"==typeof this.progressColor)this.renderer.setStyle(t,"stroke",this.progressColor);else for(var r=0;r<this.progressColor.length;r++){var s=this.progressColor[r].from,n=this.progressColor[r].to;if(s<=e&&e<n||!s&&e<n){this.renderer.setStyle(t,"stroke",this.progressColor[r].color);break}!n&&s<=e&&this.renderer.setStyle(t,"stroke",this.progressColor[r].color)}},x.prototype.handleErrors=function(e){if(a.isDevMode())switch(e){case"value > max":throw new Error("The value of the Circular Progressbar cannot exceed the max value");case"value < min":throw new Error("The value of the Circular Progressbar cannot be lower than the min value");case"max < min":throw new Error("The min value cannot be higher than the max value")}},x.prototype.setDirection=function(){this.rtl=this.localizationService.rtl,this.element&&this.renderer.setAttribute(this.element.nativeElement,"dir",this.rtl?"rtl":"ltr"),this.labelElement&&this.renderer.setAttribute(this.labelElement.nativeElement,"dir",this.rtl?"rtl":"ltr")},x.prototype.rtlChange=function(){this.element&&this.rtl!==this.localizationService.rtl&&this.setDirection()},x);function x(e,t,r,s){this.renderer=e,this.cdr=t,this.localizationService=r,this.element=s,this.hostClasses=!0,this.WrapperSize="200px",this.animation=!0,this.opacity=1,this.animationEnd=new a.EventEmitter,this.centerTemplateContext={},this._indeterminate=!1,this._max=100,this._min=0,this._value=0,this.internalValue=0,this.subscriptions=new o.Subscription,n.validatePackage(b),this.subscriptions.add(this.localizationService.changes.subscribe(this.rtlChange.bind(this)))}E.ɵfac=l.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:E,deps:[{token:l.Renderer2},{token:l.ChangeDetectorRef},{token:p.LocalizationService},{token:l.ElementRef}],target:l.ɵɵFactoryTarget.Component}),E.ɵcmp=l.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:E,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","style.width":"this.WrapperSize","style.height":"this.WrapperSize"}},providers:[t.LocalizationService,{provide:t.L10N_PREFIX,useValue:"kendo.circularprogressbar"}],queries:[{propertyName:"centerTemplate",first:!0,predicate:w,descendants:!0}],viewQueries:[{propertyName:"progress",first:!0,predicate:["progress"],descendants:!0},{propertyName:"scale",first:!0,predicate:["scale"],descendants:!0},{propertyName:"labelElement",first:!0,predicate:["label"],descendants:!0},{propertyName:"svgWrapper",first:!0,predicate:["svgWrapper"],descendants:!0}],exportAs:["kendoCircularProgressBar"],usesOnChanges:!0,ngImport:l,template:'\n <div class="k-circular-progressbar-surface">\n <div #svgWrapper>\n <svg #svg>\n <g>\n <circle class="k-circular-progressbar-scale" #scale stroke-width="9.5"></circle>\n <circle class="k-circular-progressbar-arc" #progress stroke-width="9.5"></circle>\n </g>\n </svg>\n <div class="k-circular-progressbar-label" *ngIf="centerTemplate" #label>\n <ng-template [ngTemplateOutlet]="centerTemplate.templateRef" [ngTemplateOutletContext]="centerTemplateContext"></ng-template>\n </div>\n </div>\n </div>\n ',isInline:!0,directives:[{type:u.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{type:u.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet"]}]}),l.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:E,decorators:[{type:a.Component,args:[{exportAs:"kendoCircularProgressBar",selector:"kendo-circularprogressbar",template:'\n <div class="k-circular-progressbar-surface">\n <div #svgWrapper>\n <svg #svg>\n <g>\n <circle class="k-circular-progressbar-scale" #scale stroke-width="9.5"></circle>\n <circle class="k-circular-progressbar-arc" #progress stroke-width="9.5"></circle>\n </g>\n </svg>\n <div class="k-circular-progressbar-label" *ngIf="centerTemplate" #label>\n <ng-template [ngTemplateOutlet]="centerTemplate.templateRef" [ngTemplateOutletContext]="centerTemplateContext"></ng-template>\n </div>\n </div>\n </div>\n ',providers:[t.LocalizationService,{provide:t.L10N_PREFIX,useValue:"kendo.circularprogressbar"}]}]}],ctorParameters:function(){return[{type:l.Renderer2},{type:l.ChangeDetectorRef},{type:p.LocalizationService},{type:l.ElementRef}]},propDecorators:{hostClasses:[{type:a.HostBinding,args:["class.k-circular-progressbar"]}],WrapperSize:[{type:a.HostBinding,args:["style.width"]},{type:a.HostBinding,args:["style.height"]}],value:[{type:a.Input}],max:[{type:a.Input}],min:[{type:a.Input}],animation:[{type:a.Input}],opacity:[{type:a.Input}],indeterminate:[{type:a.Input}],progressColor:[{type:a.Input}],animationEnd:[{type:a.Output}],progress:[{type:a.ViewChild,args:["progress"]}],scale:[{type:a.ViewChild,args:["scale"]}],labelElement:[{type:a.ViewChild,args:["label"]}],svgWrapper:[{type:a.ViewChild,args:["svgWrapper"]}],centerTemplate:[{type:a.ContentChild,args:[w]}]}});var u=[P,C,E,w],t=[r.CommonModule,i.ResizeSensorModule],A=function(){};A.ɵfac=l.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:A,deps:[],target:l.ɵɵFactoryTarget.NgModule}),A.ɵmod=l.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:A,declarations:[P,C,E,w],imports:[r.CommonModule,i.ResizeSensorModule],exports:[P,C,E,w]}),A.ɵinj=l.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:A,imports:[t]}),l.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:A,decorators:[{type:a.NgModule,args:[{declarations:u,exports:u,imports:t}]}]}),e.ChunkProgressBarComponent=C,e.CircularProgressBar=E,e.CircularProgressbarCenterTemplateDirective=w,e.ProgressBarComponent=P,e.ProgressBarModule=A,Object.defineProperty(e,"__esModule",{value:!0})});
@@ -0,0 +1,15 @@
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
+ import { TemplateRef } from '@angular/core';
6
+ import * as i0 from "@angular/core";
7
+ /**
8
+ * A directive that selects a template within the <kendo-circularprogessbar> component which will be used for the center template. ([see example]({% slug %})).
9
+ */
10
+ export declare class CircularProgressbarCenterTemplateDirective {
11
+ templateRef: TemplateRef<any>;
12
+ constructor(templateRef: TemplateRef<any>);
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<CircularProgressbarCenterTemplateDirective, never>;
14
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CircularProgressbarCenterTemplateDirective, "[kendoCircularProgressbarCenterTemplate]", never, {}, {}, never>;
15
+ }
@@ -0,0 +1,113 @@
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
+ import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, OnDestroy, Renderer2, SimpleChanges } from '@angular/core';
6
+ import { LocalizationService } from '@progress/kendo-angular-l10n';
7
+ import { AnimationEndEvent } from '../types/animation-end-event';
8
+ import { CircularProgressbarCenterTemplateDirective } from './center-template.directive';
9
+ import { CenterTemplateContext } from './models/center-template-context.interface';
10
+ import { ProgressColor } from './models/circular-progressbar-progress-color-interface';
11
+ import * as i0 from "@angular/core";
12
+ /**
13
+ * Represents the [Kendo UI Circular ProgressBar component for Angular]({% slug circular_progressbar %}).
14
+ *
15
+ * @example
16
+ * ```ts-preview
17
+ * _@Component({don’t
18
+ * selector: 'my-app',
19
+ * template: `
20
+ * <kendo-circularprogressbar [value]="value"></kendo-circularprogressbar>
21
+ * `
22
+ * })
23
+ * class AppComponent {
24
+ * public value: number = 50;
25
+ * }
26
+ * ```
27
+ */
28
+ export declare class CircularProgressBar implements AfterViewInit, OnChanges, OnDestroy {
29
+ private renderer;
30
+ private cdr;
31
+ private localizationService;
32
+ private element;
33
+ hostClasses: boolean;
34
+ WrapperSize: string;
35
+ /**
36
+ * Sets the default value of the Circular Progressbar between `min` and `max`.
37
+ *
38
+ * @default 0
39
+ */
40
+ set value(value: number);
41
+ get value(): number;
42
+ /**
43
+ * The maximum value which the Circular Progressbar can accept.
44
+ *
45
+ * @default 100
46
+ */
47
+ set max(max: number);
48
+ get max(): number;
49
+ /**
50
+ * The minimum value which the Circular Progressbar can accept.
51
+ *
52
+ * @default 0
53
+ */
54
+ set min(min: number);
55
+ get min(): number;
56
+ /**
57
+ * Indicates whether an animation will be played on value changes.
58
+ *
59
+ * @default true
60
+ */
61
+ animation: boolean;
62
+ /**
63
+ * The opacity of the value arc.
64
+ * @default 1
65
+ */
66
+ opacity: number;
67
+ /**
68
+ * Puts the Circular ProgressBar in indeterminate state.
69
+ * @default false
70
+ */
71
+ set indeterminate(indeterminate: boolean);
72
+ get indeterminate(): boolean;
73
+ /**
74
+ * Configures the pointer color. Could be set to a single color string or customized per progress stages.
75
+ */
76
+ progressColor: string | ProgressColor[];
77
+ /**
78
+ * Fires when the animation which indicates the latest value change is completed.
79
+ */
80
+ animationEnd: EventEmitter<AnimationEndEvent>;
81
+ progress: ElementRef;
82
+ scale: ElementRef;
83
+ labelElement: ElementRef;
84
+ svgWrapper: ElementRef;
85
+ centerTemplate: CircularProgressbarCenterTemplateDirective;
86
+ centerTemplateContext: CenterTemplateContext;
87
+ private _indeterminate;
88
+ private _max;
89
+ private _min;
90
+ private _value;
91
+ private previousValue;
92
+ private internalValue;
93
+ private rtl;
94
+ private subscriptions;
95
+ constructor(renderer: Renderer2, cdr: ChangeDetectorRef, localizationService: LocalizationService, element: ElementRef);
96
+ ngAfterViewInit(): void;
97
+ ngOnChanges(changes: SimpleChanges): void;
98
+ ngOnDestroy(): void;
99
+ private initProgressArc;
100
+ private calculateProgress;
101
+ private progressbarAnimation;
102
+ private setStyles;
103
+ private indeterminateState;
104
+ private updateCenterTemplate;
105
+ private positionLabel;
106
+ private get currentColor();
107
+ private updateProgressColor;
108
+ private handleErrors;
109
+ private setDirection;
110
+ private rtlChange;
111
+ static ɵfac: i0.ɵɵFactoryDeclaration<CircularProgressBar, never>;
112
+ static ɵcmp: i0.ɵɵComponentDeclaration<CircularProgressBar, "kendo-circularprogressbar", ["kendoCircularProgressBar"], { "value": "value"; "max": "max"; "min": "min"; "animation": "animation"; "opacity": "opacity"; "indeterminate": "indeterminate"; "progressColor": "progressColor"; }, { "animationEnd": "animationEnd"; }, ["centerTemplate"], never>;
113
+ }
@@ -0,0 +1,17 @@
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
+ /**
6
+ * @hidden
7
+ */
8
+ export interface CenterTemplateContext {
9
+ /**
10
+ * The current value of the Circular Progressbar.
11
+ */
12
+ value?: number;
13
+ /**
14
+ * The current color of the progress arc.
15
+ */
16
+ color?: string;
17
+ }
@@ -0,0 +1,21 @@
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
+ /**
6
+ * The color range configuration of the pointer.
7
+ */
8
+ export interface ProgressColor {
9
+ /**
10
+ * The color of the range. Accepts valid CSS color strings, including hex and rgb.
11
+ */
12
+ color?: string;
13
+ /**
14
+ * The range start value.
15
+ */
16
+ from?: number;
17
+ /**
18
+ * The range end value.
19
+ */
20
+ to?: number;
21
+ }
package/common/util.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2021 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
- import { SimpleChanges } from '@angular/core';
5
+ import { Renderer2, SimpleChanges } from '@angular/core';
6
6
  import { ProgressBarAnimation } from '../main';
7
7
  /**
8
8
  * @hidden
@@ -36,3 +36,11 @@ export declare const runAnimation: (changes: SimpleChanges, animation: boolean |
36
36
  * @hidden
37
37
  */
38
38
  export declare const stopCurrentAnimation: (changes: SimpleChanges) => boolean;
39
+ /**
40
+ * @hidden
41
+ */
42
+ export declare const setProgressBarStyles: (props: any, renderer: Renderer2) => void;
43
+ /**
44
+ * @hidden
45
+ */
46
+ export declare const removeProgressBarStyles: (props: any, renderer: Renderer2) => void;
@@ -0,0 +1,22 @@
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
+ import { Directive } from '@angular/core';
6
+ import * as i0 from "@angular/core";
7
+ /**
8
+ * A directive that selects a template within the <kendo-circularprogessbar> component which will be used for the center template. ([see example]({% slug %})).
9
+ */
10
+ export class CircularProgressbarCenterTemplateDirective {
11
+ constructor(templateRef) {
12
+ this.templateRef = templateRef;
13
+ }
14
+ }
15
+ CircularProgressbarCenterTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CircularProgressbarCenterTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
16
+ CircularProgressbarCenterTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: CircularProgressbarCenterTemplateDirective, selector: "[kendoCircularProgressbarCenterTemplate]", ngImport: i0 });
17
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CircularProgressbarCenterTemplateDirective, decorators: [{
18
+ type: Directive,
19
+ args: [{
20
+ selector: '[kendoCircularProgressbarCenterTemplate]'
21
+ }]
22
+ }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });