@progress/kendo-angular-progressbar 3.1.0-dev.202208010920 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/kendo-angular-progressbar.umd.js +1 -1
- package/circularprogressbar/circular-progressbar.component.d.ts +2 -3
- package/common/util.d.ts +4 -0
- package/esm2015/circularprogressbar/circular-progressbar.component.js +40 -23
- package/esm2015/common/util.js +6 -0
- package/esm2015/package-metadata.js +1 -1
- package/fesm2015/kendo-angular-progressbar.js +46 -23
- package/package.json +1 -1
|
@@ -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"),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,i,t,n,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(n),c=s(r),g=function(e,t){return(g=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 h(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}g(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}Object.create;Object.create;function m(e,t,r,s){var n,i,a,o,l=1===(n=e.toString().split(".")).length?""+n[0]:n[0]+"."+n[1].substr(0,C);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 d(e,t,r){return Math.max(Math.min(r,t),e)}function y(e,t,r){return Math.max((r-e)/(t-e),1e-4)}function f(e,t,r){return e[t]&&void 0!==e[t].currentValue?e[t].currentValue:r}function b(e,t){e.forEach(function(e){t[e.method](e.el,e.attr,""+e.attrValue)})}var v={name:"@progress/kendo-angular-progressbar",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1659345594,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"},C=3,k=(Object.defineProperty(S.prototype,"isHorizontal",{get:function(){return"horizontal"===this.orientation},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"isVertical",{get:function(){return"vertical"===this.orientation},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"disabledClass",{get:function(){return this.disabled},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"reverseClass",{get:function(){return this.reverse},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"indeterminateClass",{get:function(){return this.indeterminate},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"dirAttribute",{get:function(){return this.direction},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"ariaMinAttribute",{get:function(){return String(this.min)},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"ariaMaxAttribute",{get:function(){return String(this.max)},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"ariaValueAttribute",{get:function(){return this.indeterminate?void 0:String(this.displayValue)},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"isCompleted",{get:function(){return this.value===this.max},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"statusWidth",{get:function(){return"horizontal"===this.orientation?100*this._progressRatio:100},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"statusHeight",{get:function(){return"vertical"===this.orientation?100*this._progressRatio:100},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"statusWrapperWidth",{get:function(){return"horizontal"===this.orientation?100/this._progressRatio:100},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"statusWrapperHeight",{get:function(){return"vertical"===this.orientation?100/this._progressRatio:100},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"_progressRatio",{get:function(){return y(this.min,this.max,this.displayValue)},enumerable:!1,configurable:!0}),S.prototype.ngOnChanges=function(e){var t=f(e,"min",this.min),r=f(e,"max",this.max),s=f(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=d(this.min,this.max,s),this.previousValue=i),this.min=t,this.max=r,this.displayValue=d(this.min,this.max,s)}},S.prototype.ngOnDestroy=function(){this.localizationChangeSubscription&&this.localizationChangeSubscription.unsubscribe()},S);function S(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(v),this.localizationChangeSubscription=e.changes.subscribe(function(e){e=e.rtl;t.direction=e?"rtl":"ltr"})}k.ɵfac=l.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:k,deps:[{token:p.LocalizationService}],target:l.ɵɵFactoryTarget.Component}),k.ɵcmp=l.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:k,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-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:k,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-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}]}});h(I,P=k),Object.defineProperty(I.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(I.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(I.prototype,"isPositionStart",{get:function(){return"start"===this.labelPosition},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"isPositionCenter",{get:function(){return"center"===this.labelPosition},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"isPositionEnd",{get:function(){return"end"===this.labelPosition},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"formattedLabelValue",{get:function(){return m(this.displayValue,this.min,this.max,this.label)},enumerable:!1,configurable:!0}),I.prototype.ngOnChanges=function(e){var t,r,s,n;P.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)},I.prototype.ngOnDestroy=function(){this.animationFrame&&cancelAnimationFrame(this.animationFrame)},I.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(I.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}),I.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})},I.prototype.getAnimationOptions=function(e){var t="horizontal"===this.orientation,e=y(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)}},I.prototype.renderValueChange=function(e,t,r,s,n){this.renderer.setStyle(e,r,s+"%"),this.renderer.setStyle(t,r,n+"%")},I.prototype.resetProgress=function(e,t,r){var s=this,n=y(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 P,V=I;function I(e,t,r){var s=P.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}V.ɵfac=l.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:V,deps:[{token:p.LocalizationService},{token:l.NgZone},{token:l.Renderer2}],target:l.ɵɵFactoryTarget.Component}),V.ɵcmp=l.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:V,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-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:c.NgStyle,selector:"[ngStyle]",inputs:["ngStyle"]},{type:c.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{type:c.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}]}),l.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:V,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-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}]}]}});h(w,O=k),Object.defineProperty(w.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(w.prototype,"chunkSizePercentage",{get:function(){return 100/this.chunkCount},enumerable:!1,configurable:!0}),Object.defineProperty(w.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 O,k=w;function w(e){var t=O.call(this,e)||this;return t.localization=e,t.chunkCount=5,t._orientationStyles={width:t.chunkSizePercentage+"%"},t}k.ɵfac=l.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:k,deps:[{token:p.LocalizationService}],target:l.ɵɵFactoryTarget.Component}),k.ɵcmp=l.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:k,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-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:c.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{type:c.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{type:c.NgStyle,selector:"[ngStyle]",inputs:["ngStyle"]}]}),l.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:k,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-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 E=function(e){this.templateRef=e},x=(E.ɵfac=l.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:E,deps:[{token:l.TemplateRef}],target:l.ɵɵFactoryTarget.Directive}),E.ɵdir=l.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:E,selector:"[kendoCircularProgressbarCenterTemplate]",ngImport:l}),l.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:E,decorators:[{type:a.Directive,args:[{selector:"[kendoCircularProgressbarCenterTemplate]"}]}],ctorParameters:function(){return[{type:l.TemplateRef}]}}),Object.defineProperty(z.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(z.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(z.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(z.prototype,"indeterminate",{get:function(){return this._indeterminate},set:function(e){this._indeterminate=e},enumerable:!1,configurable:!0}),z.prototype.ngAfterViewInit=function(){this.initProgressArc()},z.prototype.ngOnChanges=function(e){var t;n.isChanged("value",e,!0)&&this.progress&&(this.animation?this.progressbarAnimation():(t=this.value-this.min,this.internalValue=e.value.currentValue,this.calculateProgress(t))),e.opacity&&this.progress&&b([{method:"setAttribute",el:this.progress.nativeElement,attr:"opacity",attrValue:this.opacity}],this.renderer),e.indeterminate&&!e.indeterminate.firstChange&&this.indeterminateState()},z.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},z.prototype.onResize=function(e){this.setStyles();var t=this.animation?this.internalValue:this.value;this.calculateProgress(t),this.updateCenterTemplate(t)},z.prototype.initProgressArc=function(){var e;this.setStyles(),this.indeterminate?this.indeterminateState():this.animation?this.progressbarAnimation():(e=this.value-this.min,this.calculateProgress(e))},z.prototype.calculateProgress=function(e){var t=this,r=(this.progressColor&&this.updateProgressColor(e),this.zone.onStable.pipe(o.take(1)).subscribe(function(){t.updateCenterTemplate(e+t.min)}),this.progress.nativeElement),s=this.progress.nativeElement.r.baseVal.value,s=Math.PI*(2*s),n=s-(this.rtl?-1*s:s)*(e/(this.max-this.min));b([{method:"setStyle",el:r,attr:"strokeDasharray",attrValue:s},{method:"setStyle",el:r,attr:"strokeDashoffset",attrValue:n}],this.renderer)},z.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,n.hasObservers(this.animationEnd)&&this.animationEnd.emit({from:e,to:this.internalValue}),t?this.internalValue+=1:--this.internalValue,requestAnimationFrame(this.progressbarAnimation.bind(this)))},z.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}];b(e,this.renderer)},z.prototype.indeterminateState=function(){var e,t,r,s=this.progress.nativeElement;this.indeterminate?(this.calculateProgress(this.value-this.min),e=this.rtl?{from:360,to:0}:{from:0,to:360},t=void 0,t=[{method:"setStyle",el:s,attr:"transform-origin",attrValue:"center"},{method:"setStyle",el:s,attr:"fill",attrValue:"none"},{method:"setStyle",el:s,attr:"stroke-linecap",attrValue:"round"},{method:"setStyle",el:s,attr:"stroke",attrValue:(t=this.progressColor?t:getComputedStyle(s).stroke)||this.currentColor}],b(t,this.renderer),this.renderer.removeClass(s,"k-circular-progressbar-arc"),s.innerHTML='<animateTransform attributeName="transform" type="rotate" from="'+e.from+' 0 0" to="'+e.to+' 0 0" dur="1s" repeatCount="indefinite" />'):(this.renderer.addClass(s,"k-circular-progressbar-arc"),r=this.renderer,[{method:"removeStyle",el:s,attr:"transform-origin"},{method:"removeStyle",el:s,attr:"fill"},{method:"removeStyle",el:s,attr:"stroke-linecap"}].forEach(function(e){r[e.method](e.el,e.attr)}),s.innerHTML="",this.animation&&this.progressbarAnimation())},z.prototype.updateCenterTemplate=function(e){this.centerTemplate&&(this.centerTemplateContext.value=e,this.centerTemplateContext.color=this.currentColor,this.cdr.detectChanges(),this.positionLabel())},z.prototype.positionLabel=function(){var e=this.labelElement.nativeElement,t=this.element.nativeElement.getBoundingClientRect(),r=t.width,t=t.height,r=r/2-e.offsetWidth/2,t=t/2-e.offsetHeight/2;b([{method:"setStyle",el:e,attr:"left",attrValue:r+"px"},{method:"setStyle",el:e,attr:"top",attrValue:t+"px"}],this.renderer)},Object.defineProperty(z.prototype,"currentColor",{get:function(){return this.progress.nativeElement.style.stroke},enumerable:!1,configurable:!0}),z.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)}},z.prototype.handleErrors=function(e){if(a.isDevMode())switch(e){case"value > max":throw new Error("The value of the CircularProgressbar cannot exceed the max value");case"value < min":throw new Error("The value of the CircularProgressbar cannot be lower than the min value");case"max < min":throw new Error("The min value cannot be higher than the max value")}},z.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")},z.prototype.rtlChange=function(){this.element&&this.rtl!==this.localizationService.rtl&&this.setDirection()},z);function z(e,t,r,s,n){this.renderer=e,this.cdr=t,this.localizationService=r,this.element=s,this.zone=n,this.hostClasses=!0,this.WrapperSize="200px",this.animation=!1,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,i.validatePackage(v),this.subscriptions.add(this.localizationService.changes.subscribe(this.rtlChange.bind(this)))}x.ɵfac=l.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:x,deps:[{token:l.Renderer2},{token:l.ChangeDetectorRef},{token:p.LocalizationService},{token:l.ElementRef},{token:l.NgZone}],target:l.ɵɵFactoryTarget.Component}),x.ɵcmp=l.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:x,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:E,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 <kendo-resize-sensor (resize)="onResize($event)"></kendo-resize-sensor>\n ',isInline:!0,components:[{type:u.ResizeSensorComponent,selector:"kendo-resize-sensor",inputs:["rateLimit"],outputs:["resize"]}],directives:[{type:c.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{type:c.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet"]}]}),l.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:x,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 <kendo-resize-sensor (resize)="onResize($event)"></kendo-resize-sensor>\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},{type:l.NgZone}]},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:[E]}]}});u=[V,k,x,E],c=[r.CommonModule,n.ResizeSensorModule],t=function(){};t.ɵfac=l.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:t,deps:[],target:l.ɵɵFactoryTarget.NgModule}),t.ɵmod=l.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:t,declarations:[V,k,x,E],imports:[r.CommonModule,n.ResizeSensorModule],exports:[V,k,x,E]}),t.ɵinj=l.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:t,imports:[c]}),l.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:t,decorators:[{type:a.NgModule,args:[{declarations:u,exports:u,imports:c}]}]}),e.ChunkProgressBarComponent=k,e.CircularProgressBarComponent=x,e.CircularProgressbarCenterTemplateDirective=E,e.ProgressBarComponent=V,e.ProgressBarModule=t,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"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("KendoAngularProgressbar",["exports","@angular/core","@progress/kendo-licensing","@progress/kendo-angular-l10n","@progress/kendo-angular-common","@angular/common","rxjs","rxjs/operators"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoAngularProgressbar={},e.ng.core,e.KendoLicensing,e.KendoAngularL10N,e.KendoAngularCommon,e.ng.common,e.rxjs,e.rxjs.operators)}(this,function(e,a,i,t,n,r,o,l){"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 p=s(a),u=s(t),c=s(n),h=s(r),g=function(e,t){return(g=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 m(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}g(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}Object.create;Object.create;function d(e,t,r,s){var n,i,a,o,l=1===(n=e.toString().split(".")).length?""+n[0]:n[0]+"."+n[1].substr(0,S);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 y(e,t,r){return Math.max(Math.min(r,t),e)}function f(e,t,r){return Math.max((r-e)/(t-e),1e-4)}function b(e,t,r){return e[t]&&void 0!==e[t].currentValue?e[t].currentValue:r}function v(e,t){e.forEach(function(e){t[e.method](e.el,e.attr,""+e.attrValue)})}function C(e){return e.style.width&&e.style.height}var k={name:"@progress/kendo-angular-progressbar",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1659454196,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"},S=3,P=(Object.defineProperty(V.prototype,"isHorizontal",{get:function(){return"horizontal"===this.orientation},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"isVertical",{get:function(){return"vertical"===this.orientation},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"disabledClass",{get:function(){return this.disabled},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"reverseClass",{get:function(){return this.reverse},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"indeterminateClass",{get:function(){return this.indeterminate},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"dirAttribute",{get:function(){return this.direction},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"ariaMinAttribute",{get:function(){return String(this.min)},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"ariaMaxAttribute",{get:function(){return String(this.max)},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"ariaValueAttribute",{get:function(){return this.indeterminate?void 0:String(this.displayValue)},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"isCompleted",{get:function(){return this.value===this.max},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"statusWidth",{get:function(){return"horizontal"===this.orientation?100*this._progressRatio:100},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"statusHeight",{get:function(){return"vertical"===this.orientation?100*this._progressRatio:100},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"statusWrapperWidth",{get:function(){return"horizontal"===this.orientation?100/this._progressRatio:100},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"statusWrapperHeight",{get:function(){return"vertical"===this.orientation?100/this._progressRatio:100},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"_progressRatio",{get:function(){return f(this.min,this.max,this.displayValue)},enumerable:!1,configurable:!0}),V.prototype.ngOnChanges=function(e){var t=b(e,"min",this.min),r=b(e,"max",this.max),s=b(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=y(this.min,this.max,s),this.previousValue=i),this.min=t,this.max=r,this.displayValue=y(this.min,this.max,s)}},V.prototype.ngOnDestroy=function(){this.localizationChangeSubscription&&this.localizationChangeSubscription.unsubscribe()},V);function V(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(k),this.localizationChangeSubscription=e.changes.subscribe(function(e){e=e.rtl;t.direction=e?"rtl":"ltr"})}P.ɵfac=p.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:P,deps:[{token:u.LocalizationService}],target:p.ɵɵFactoryTarget.Component}),P.ɵcmp=p.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:P,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-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:p,template:"",isInline:!0}),p.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:P,decorators:[{type:a.Component,args:[{template:""}]}],ctorParameters:function(){return[{type:u.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-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}]}});m(x,I=P),Object.defineProperty(x.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(x.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(x.prototype,"isPositionStart",{get:function(){return"start"===this.labelPosition},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"isPositionCenter",{get:function(){return"center"===this.labelPosition},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"isPositionEnd",{get:function(){return"end"===this.labelPosition},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"formattedLabelValue",{get:function(){return d(this.displayValue,this.min,this.max,this.label)},enumerable:!1,configurable:!0}),x.prototype.ngOnChanges=function(e){var t,r,s,n;I.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)},x.prototype.ngOnDestroy=function(){this.animationFrame&&cancelAnimationFrame(this.animationFrame)},x.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(x.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}),x.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})},x.prototype.getAnimationOptions=function(e){var t="horizontal"===this.orientation,e=f(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)}},x.prototype.renderValueChange=function(e,t,r,s,n){this.renderer.setStyle(e,r,s+"%"),this.renderer.setStyle(t,r,n+"%")},x.prototype.resetProgress=function(e,t,r){var s=this,n=f(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 I,O=x;function x(e,t,r){var s=I.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}O.ɵfac=p.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:O,deps:[{token:u.LocalizationService},{token:p.NgZone},{token:p.Renderer2}],target:p.ɵɵFactoryTarget.Component}),O.ɵcmp=p.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:O,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:p,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-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:h.NgStyle,selector:"[ngStyle]",inputs:["ngStyle"]},{type:h.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{type:h.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]}]}),p.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:O,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-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:u.LocalizationService},{type:p.NgZone},{type:p.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}]}]}});m(w,E=P),Object.defineProperty(w.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(w.prototype,"chunkSizePercentage",{get:function(){return 100/this.chunkCount},enumerable:!1,configurable:!0}),Object.defineProperty(w.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 E,P=w;function w(e){var t=E.call(this,e)||this;return t.localization=e,t.chunkCount=5,t._orientationStyles={width:t.chunkSizePercentage+"%"},t}P.ɵfac=p.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:P,deps:[{token:u.LocalizationService}],target:p.ɵɵFactoryTarget.Component}),P.ɵcmp=p.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:P,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:p,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-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:h.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{type:h.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{type:h.NgStyle,selector:"[ngStyle]",inputs:["ngStyle"]}]}),p.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:P,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-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:u.LocalizationService}]},propDecorators:{chunkCount:[{type:a.Input}],progressCssStyle:[{type:a.Input}],progressCssClass:[{type:a.Input}],emptyCssStyle:[{type:a.Input}],emptyCssClass:[{type:a.Input}]}});var A=function(e){this.templateRef=e},z=(A.ɵfac=p.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:A,deps:[{token:p.TemplateRef}],target:p.ɵɵFactoryTarget.Directive}),A.ɵdir=p.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:A,selector:"[kendoCircularProgressbarCenterTemplate]",ngImport:p}),p.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:A,decorators:[{type:a.Directive,args:[{selector:"[kendoCircularProgressbarCenterTemplate]"}]}],ctorParameters:function(){return[{type:p.TemplateRef}]}}),Object.defineProperty(T.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(T.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(T.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(T.prototype,"indeterminate",{get:function(){return this._indeterminate},set:function(e){this._indeterminate=e},enumerable:!1,configurable:!0}),T.prototype.ngAfterViewInit=function(){this.initProgressArc()},T.prototype.ngOnChanges=function(e){var t;n.isChanged("value",e,!0)&&this.progress&&(this.animation?this.progressbarAnimation():(t=this.value-this.min,this.internalValue=e.value.currentValue,this.calculateProgress(t))),e.opacity&&this.progress&&v([{method:"setAttribute",el:this.progress.nativeElement,attr:"opacity",attrValue:this.opacity}],this.renderer),e.indeterminate&&!e.indeterminate.firstChange&&this.indeterminateState()},T.prototype.ngOnDestroy=function(){this.subscriptions.unsubscribe()},T.prototype.onResize=function(e){this.setStyles();var t=this.animation?this.internalValue:this.value;this.calculateProgress(t),this.updateCenterTemplate(t)},T.prototype.initProgressArc=function(){var e;this.setStyles(),this.indeterminate?this.indeterminateState():this.animation?this.progressbarAnimation():(e=this.value-this.min,this.calculateProgress(e))},T.prototype.calculateProgress=function(e){var t=this,r=(this.progressColor&&this.updateProgressColor(e),this.zone.onStable.pipe(l.take(1)).subscribe(function(){t.updateCenterTemplate(e+t.min)}),this.progress.nativeElement),s=this.progress.nativeElement.r.baseVal.value,s=Math.PI*(2*s),n=s-(this.rtl?-1*s:s)*(e/(this.max-this.min));v([{method:"setStyle",el:r,attr:"strokeDasharray",attrValue:s},{method:"setStyle",el:r,attr:"strokeDashoffset",attrValue:n}],this.renderer)},T.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,n.hasObservers(this.animationEnd)&&this.animationEnd.emit({from:e,to:this.internalValue}),t?this.internalValue+=1:--this.internalValue,requestAnimationFrame(this.progressbarAnimation.bind(this)))},T.prototype.setStyles=function(){var e=this.progress.nativeElement,t=this.scale.nativeElement,r=this.surface.nativeElement,s=this.element.nativeElement,n=s.getBoundingClientRect().width,s=(C(s)||(n=200,v([{method:"setStyle",el:r,attr:"width",attrValue:"200px"},{method:"setStyle",el:r,attr:"height",attrValue:"200px"}],this.renderer)),[{method:"setAttribute",el:e,attr:"r",attrValue:n/2-10},{method:"setAttribute",el:e,attr:"cx",attrValue:n/2},{method:"setAttribute",el:e,attr:"cy",attrValue:n/2},{method:"setAttribute",el:e,attr:"opacity",attrValue:this.opacity},{method:"setAttribute",el:t,attr:"r",attrValue:n/2-10},{method:"setAttribute",el:t,attr:"cx",attrValue:n/2},{method:"setAttribute",el:t,attr:"cy",attrValue:n/2}]);v(s,this.renderer)},T.prototype.indeterminateState=function(){var e,t,r,s=this.progress.nativeElement;this.indeterminate?(this.calculateProgress(this.value-this.min),e=this.rtl?{from:360,to:0}:{from:0,to:360},t=void 0,t=[{method:"setStyle",el:s,attr:"transform-origin",attrValue:"center"},{method:"setStyle",el:s,attr:"fill",attrValue:"none"},{method:"setStyle",el:s,attr:"stroke-linecap",attrValue:"round"},{method:"setStyle",el:s,attr:"stroke",attrValue:(t=this.progressColor?t:getComputedStyle(s).stroke)||this.currentColor}],v(t,this.renderer),this.renderer.removeClass(s,"k-circular-progressbar-arc"),s.innerHTML='<animateTransform attributeName="transform" type="rotate" from="'+e.from+' 0 0" to="'+e.to+' 0 0" dur="1s" repeatCount="indefinite" />'):(this.renderer.addClass(s,"k-circular-progressbar-arc"),r=this.renderer,[{method:"removeStyle",el:s,attr:"transform-origin"},{method:"removeStyle",el:s,attr:"fill"},{method:"removeStyle",el:s,attr:"stroke-linecap"}].forEach(function(e){r[e.method](e.el,e.attr)}),s.innerHTML="",this.animation&&this.progressbarAnimation())},T.prototype.updateCenterTemplate=function(e){this.centerTemplate&&(this.centerTemplateContext.value=e,this.centerTemplateContext.color=this.currentColor,this.cdr.detectChanges(),this.positionLabel())},T.prototype.positionLabel=function(){var e=this.labelElement.nativeElement,t=this.element.nativeElement,r=this.surface.nativeElement,t=(r=C(t)?(s=(t=t.getBoundingClientRect()).width,t.height):(s=(t=r.getBoundingClientRect()).width,t.height),s/2-e.offsetWidth/2),s=r/2-e.offsetHeight/2;v([{method:"setStyle",el:e,attr:"left",attrValue:t+"px"},{method:"setStyle",el:e,attr:"top",attrValue:s+"px"}],this.renderer)},Object.defineProperty(T.prototype,"currentColor",{get:function(){return this.progress.nativeElement.style.stroke},enumerable:!1,configurable:!0}),T.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)}},T.prototype.handleErrors=function(e){if(a.isDevMode())switch(e){case"value > max":throw new Error("The value of the CircularProgressbar cannot exceed the max value");case"value < min":throw new Error("The value of the CircularProgressbar cannot be lower than the min value");case"max < min":throw new Error("The min value cannot be higher than the max value")}},T.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")},T.prototype.rtlChange=function(){this.element&&this.rtl!==this.localizationService.rtl&&this.setDirection()},T);function T(e,t,r,s,n){this.renderer=e,this.cdr=t,this.localizationService=r,this.element=s,this.zone=n,this.hostClasses=!0,this.animation=!1,this.opacity=1,this.animationEnd=new a.EventEmitter,this.centerTemplateContext={},this._indeterminate=!1,this._max=100,this._min=0,this._value=0,this.previousValue=0,this.internalValue=0,this.subscriptions=new o.Subscription,i.validatePackage(k),this.subscriptions.add(this.localizationService.changes.subscribe(this.rtlChange.bind(this)))}z.ɵfac=p.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:z,deps:[{token:p.Renderer2},{token:p.ChangeDetectorRef},{token:u.LocalizationService},{token:p.ElementRef},{token:p.NgZone}],target:p.ɵɵFactoryTarget.Component}),z.ɵcmp=p.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:z,selector:"kendo-circularprogressbar",inputs:{value:"value",max:"max",min:"min",animation:"animation",opacity:"opacity",indeterminate:"indeterminate",progressColor:"progressColor"},outputs:{animationEnd:"animationEnd"},host:{properties:{"class.k-circular-progressbar":"this.hostClasses"}},providers:[t.LocalizationService,{provide:t.L10N_PREFIX,useValue:"kendo.circularprogressbar"}],queries:[{propertyName:"centerTemplate",first:!0,predicate:A,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:"surface",first:!0,predicate:["surface"],descendants:!0}],exportAs:["kendoCircularProgressBar"],usesOnChanges:!0,ngImport:p,template:'\n <div #surface class="k-circular-progressbar-surface">\n <div>\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 <kendo-resize-sensor (resize)="onResize($event)"></kendo-resize-sensor>\n ',isInline:!0,components:[{type:c.ResizeSensorComponent,selector:"kendo-resize-sensor",inputs:["rateLimit"],outputs:["resize"]}],directives:[{type:h.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{type:h.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet"]}]}),p.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:z,decorators:[{type:a.Component,args:[{exportAs:"kendoCircularProgressBar",selector:"kendo-circularprogressbar",template:'\n <div #surface class="k-circular-progressbar-surface">\n <div>\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 <kendo-resize-sensor (resize)="onResize($event)"></kendo-resize-sensor>\n ',providers:[t.LocalizationService,{provide:t.L10N_PREFIX,useValue:"kendo.circularprogressbar"}]}]}],ctorParameters:function(){return[{type:p.Renderer2},{type:p.ChangeDetectorRef},{type:u.LocalizationService},{type:p.ElementRef},{type:p.NgZone}]},propDecorators:{hostClasses:[{type:a.HostBinding,args:["class.k-circular-progressbar"]}],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"]}],surface:[{type:a.ViewChild,args:["surface"]}],centerTemplate:[{type:a.ContentChild,args:[A]}]}});c=[O,P,z,A],h=[r.CommonModule,n.ResizeSensorModule],t=function(){};t.ɵfac=p.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:t,deps:[],target:p.ɵɵFactoryTarget.NgModule}),t.ɵmod=p.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:t,declarations:[O,P,z,A],imports:[r.CommonModule,n.ResizeSensorModule],exports:[O,P,z,A]}),t.ɵinj=p.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:t,imports:[h]}),p.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:p,type:t,decorators:[{type:a.NgModule,args:[{declarations:c,exports:c,imports:h}]}]}),e.ChunkProgressBarComponent=P,e.CircularProgressBarComponent=z,e.CircularProgressbarCenterTemplateDirective=A,e.ProgressBarComponent=O,e.ProgressBarModule=t,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
@@ -14,7 +14,7 @@ import * as i0 from "@angular/core";
|
|
|
14
14
|
*
|
|
15
15
|
* @example
|
|
16
16
|
* ```ts-preview
|
|
17
|
-
* _@Component({
|
|
17
|
+
* _@Component({
|
|
18
18
|
* selector: 'my-app',
|
|
19
19
|
* template: `
|
|
20
20
|
* <kendo-circularprogressbar [value]="value"></kendo-circularprogressbar>
|
|
@@ -32,7 +32,6 @@ export declare class CircularProgressBarComponent implements AfterViewInit, OnCh
|
|
|
32
32
|
private element;
|
|
33
33
|
private zone;
|
|
34
34
|
hostClasses: boolean;
|
|
35
|
-
WrapperSize: string;
|
|
36
35
|
/**
|
|
37
36
|
* Sets the default value of the Circular Progressbar between `min` and `max`.
|
|
38
37
|
*
|
|
@@ -82,7 +81,7 @@ export declare class CircularProgressBarComponent implements AfterViewInit, OnCh
|
|
|
82
81
|
progress: ElementRef;
|
|
83
82
|
scale: ElementRef;
|
|
84
83
|
labelElement: ElementRef;
|
|
85
|
-
|
|
84
|
+
surface: ElementRef;
|
|
86
85
|
centerTemplate: CircularProgressbarCenterTemplateDirective;
|
|
87
86
|
centerTemplateContext: CenterTemplateContext;
|
|
88
87
|
private _indeterminate;
|
package/common/util.d.ts
CHANGED
|
@@ -44,3 +44,7 @@ export declare const setProgressBarStyles: (props: any, renderer: Renderer2) =>
|
|
|
44
44
|
* @hidden
|
|
45
45
|
*/
|
|
46
46
|
export declare const removeProgressBarStyles: (props: any, renderer: Renderer2) => void;
|
|
47
|
+
/**
|
|
48
|
+
* @hidden
|
|
49
|
+
*/
|
|
50
|
+
export declare const hasElementSize: (element: any) => boolean;
|
|
@@ -6,20 +6,22 @@ import { Component, ContentChild, EventEmitter, HostBinding, Input, isDevMode, O
|
|
|
6
6
|
import { hasObservers, isChanged } from '@progress/kendo-angular-common';
|
|
7
7
|
import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
8
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
9
|
-
import { Subscription
|
|
10
|
-
import {
|
|
9
|
+
import { Subscription } from 'rxjs';
|
|
10
|
+
import { take } from 'rxjs/operators';
|
|
11
|
+
import { hasElementSize, removeProgressBarStyles, setProgressBarStyles } from '../common/util';
|
|
11
12
|
import { packageMetadata } from '../package-metadata';
|
|
12
13
|
import { CircularProgressbarCenterTemplateDirective } from './center-template.directive';
|
|
13
14
|
import * as i0 from "@angular/core";
|
|
14
15
|
import * as i1 from "@progress/kendo-angular-l10n";
|
|
15
16
|
import * as i2 from "@progress/kendo-angular-common";
|
|
16
17
|
import * as i3 from "@angular/common";
|
|
18
|
+
const DEFAULT_SURFACE_SIZE = 200;
|
|
17
19
|
/**
|
|
18
20
|
* Represents the [Kendo UI Circular ProgressBar component for Angular]({% slug circular_progressbar %}).
|
|
19
21
|
*
|
|
20
22
|
* @example
|
|
21
23
|
* ```ts-preview
|
|
22
|
-
* _@Component({
|
|
24
|
+
* _@Component({
|
|
23
25
|
* selector: 'my-app',
|
|
24
26
|
* template: `
|
|
25
27
|
* <kendo-circularprogressbar [value]="value"></kendo-circularprogressbar>
|
|
@@ -38,7 +40,6 @@ export class CircularProgressBarComponent {
|
|
|
38
40
|
this.element = element;
|
|
39
41
|
this.zone = zone;
|
|
40
42
|
this.hostClasses = true;
|
|
41
|
-
this.WrapperSize = '200px';
|
|
42
43
|
/**
|
|
43
44
|
* Indicates whether an animation will be played on value changes.
|
|
44
45
|
*
|
|
@@ -59,6 +60,7 @@ export class CircularProgressBarComponent {
|
|
|
59
60
|
this._max = 100;
|
|
60
61
|
this._min = 0;
|
|
61
62
|
this._value = 0;
|
|
63
|
+
this.previousValue = 0;
|
|
62
64
|
this.internalValue = 0;
|
|
63
65
|
this.subscriptions = new Subscription();
|
|
64
66
|
validatePackage(packageMetadata);
|
|
@@ -216,8 +218,18 @@ export class CircularProgressBarComponent {
|
|
|
216
218
|
setStyles() {
|
|
217
219
|
const progressArc = this.progress.nativeElement;
|
|
218
220
|
const scale = this.scale.nativeElement;
|
|
221
|
+
const surface = this.surface.nativeElement;
|
|
219
222
|
const element = this.element.nativeElement;
|
|
220
|
-
|
|
223
|
+
let elWidth = element.getBoundingClientRect().width;
|
|
224
|
+
;
|
|
225
|
+
if (!hasElementSize(element)) {
|
|
226
|
+
const surfaceSize = [
|
|
227
|
+
{ method: 'setStyle', el: surface, attr: 'width', attrValue: `${DEFAULT_SURFACE_SIZE}px` },
|
|
228
|
+
{ method: 'setStyle', el: surface, attr: 'height', attrValue: `${DEFAULT_SURFACE_SIZE}px` }
|
|
229
|
+
];
|
|
230
|
+
elWidth = DEFAULT_SURFACE_SIZE;
|
|
231
|
+
setProgressBarStyles(surfaceSize, this.renderer);
|
|
232
|
+
}
|
|
221
233
|
const attributesArray = [
|
|
222
234
|
{ method: 'setAttribute', el: progressArc, attr: 'r', attrValue: (elWidth / 2) - 10 },
|
|
223
235
|
{ method: 'setAttribute', el: progressArc, attr: 'cx', attrValue: (elWidth / 2) },
|
|
@@ -235,7 +247,7 @@ export class CircularProgressBarComponent {
|
|
|
235
247
|
// the indeterminate state wont work as the `k-circular-progressbar-arc` has a transform: rotate(-90deg) which is
|
|
236
248
|
// interfering with the svg animation as the animateTransform brings its own transform: rotate()
|
|
237
249
|
// This will be like this until the themes release a new version, bringing a new class `k-circular-progressbar-indeterminate-arc`
|
|
238
|
-
// containing only the necassery CSS styles and we will switch between them when the state of the progressbar is switched.
|
|
250
|
+
// containing only the necassery CSS styles and we will switch between them when the state of the progressbar is switched.
|
|
239
251
|
this.calculateProgress(this.value - this.min);
|
|
240
252
|
const rotate = this.rtl ? { from: 360, to: 0 } : { from: 0, to: 360 };
|
|
241
253
|
let color;
|
|
@@ -277,9 +289,20 @@ export class CircularProgressBarComponent {
|
|
|
277
289
|
}
|
|
278
290
|
positionLabel() {
|
|
279
291
|
const labelEl = this.labelElement.nativeElement;
|
|
280
|
-
const
|
|
281
|
-
const
|
|
282
|
-
|
|
292
|
+
const element = this.element.nativeElement;
|
|
293
|
+
const surface = this.surface.nativeElement;
|
|
294
|
+
let elWidth;
|
|
295
|
+
let elHeight;
|
|
296
|
+
if (!hasElementSize(element)) {
|
|
297
|
+
const surfaceSize = surface.getBoundingClientRect();
|
|
298
|
+
elWidth = surfaceSize.width;
|
|
299
|
+
elHeight = surfaceSize.height;
|
|
300
|
+
}
|
|
301
|
+
else {
|
|
302
|
+
const elementSize = element.getBoundingClientRect();
|
|
303
|
+
elWidth = elementSize.width;
|
|
304
|
+
elHeight = elementSize.height;
|
|
305
|
+
}
|
|
283
306
|
const left = (elWidth / 2) - (labelEl.offsetWidth / 2);
|
|
284
307
|
const top = (elHeight / 2) - (labelEl.offsetHeight / 2);
|
|
285
308
|
const labelCalculations = [
|
|
@@ -340,15 +363,15 @@ export class CircularProgressBarComponent {
|
|
|
340
363
|
}
|
|
341
364
|
}
|
|
342
365
|
CircularProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CircularProgressBarComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i1.LocalizationService }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
343
|
-
CircularProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CircularProgressBarComponent, selector: "kendo-circularprogressbar", inputs: { value: "value", max: "max", min: "min", animation: "animation", opacity: "opacity", indeterminate: "indeterminate", progressColor: "progressColor" }, outputs: { animationEnd: "animationEnd" }, host: { properties: { "class.k-circular-progressbar": "this.hostClasses"
|
|
366
|
+
CircularProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CircularProgressBarComponent, selector: "kendo-circularprogressbar", inputs: { value: "value", max: "max", min: "min", animation: "animation", opacity: "opacity", indeterminate: "indeterminate", progressColor: "progressColor" }, outputs: { animationEnd: "animationEnd" }, host: { properties: { "class.k-circular-progressbar": "this.hostClasses" } }, providers: [
|
|
344
367
|
LocalizationService,
|
|
345
368
|
{
|
|
346
369
|
provide: L10N_PREFIX,
|
|
347
370
|
useValue: 'kendo.circularprogressbar'
|
|
348
371
|
}
|
|
349
|
-
], queries: [{ propertyName: "centerTemplate", first: true, predicate: CircularProgressbarCenterTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "progress", first: true, predicate: ["progress"], descendants: true }, { propertyName: "scale", first: true, predicate: ["scale"], descendants: true }, { propertyName: "labelElement", first: true, predicate: ["label"], descendants: true }, { propertyName: "
|
|
350
|
-
<div class="k-circular-progressbar-surface">
|
|
351
|
-
<div
|
|
372
|
+
], queries: [{ propertyName: "centerTemplate", first: true, predicate: CircularProgressbarCenterTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "progress", first: true, predicate: ["progress"], descendants: true }, { propertyName: "scale", first: true, predicate: ["scale"], descendants: true }, { propertyName: "labelElement", first: true, predicate: ["label"], descendants: true }, { propertyName: "surface", first: true, predicate: ["surface"], descendants: true }], exportAs: ["kendoCircularProgressBar"], usesOnChanges: true, ngImport: i0, template: `
|
|
373
|
+
<div #surface class="k-circular-progressbar-surface">
|
|
374
|
+
<div>
|
|
352
375
|
<svg #svg>
|
|
353
376
|
<g>
|
|
354
377
|
<circle class="k-circular-progressbar-scale" #scale stroke-width="9.5"></circle>
|
|
@@ -368,8 +391,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
368
391
|
exportAs: 'kendoCircularProgressBar',
|
|
369
392
|
selector: 'kendo-circularprogressbar',
|
|
370
393
|
template: `
|
|
371
|
-
<div class="k-circular-progressbar-surface">
|
|
372
|
-
<div
|
|
394
|
+
<div #surface class="k-circular-progressbar-surface">
|
|
395
|
+
<div>
|
|
373
396
|
<svg #svg>
|
|
374
397
|
<g>
|
|
375
398
|
<circle class="k-circular-progressbar-scale" #scale stroke-width="9.5"></circle>
|
|
@@ -393,12 +416,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
393
416
|
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i1.LocalizationService }, { type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { hostClasses: [{
|
|
394
417
|
type: HostBinding,
|
|
395
418
|
args: ['class.k-circular-progressbar']
|
|
396
|
-
}], WrapperSize: [{
|
|
397
|
-
type: HostBinding,
|
|
398
|
-
args: ['style.width']
|
|
399
|
-
}, {
|
|
400
|
-
type: HostBinding,
|
|
401
|
-
args: ['style.height']
|
|
402
419
|
}], value: [{
|
|
403
420
|
type: Input
|
|
404
421
|
}], max: [{
|
|
@@ -424,9 +441,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
424
441
|
}], labelElement: [{
|
|
425
442
|
type: ViewChild,
|
|
426
443
|
args: ["label"]
|
|
427
|
-
}],
|
|
444
|
+
}], surface: [{
|
|
428
445
|
type: ViewChild,
|
|
429
|
-
args: ["
|
|
446
|
+
args: ["surface"]
|
|
430
447
|
}], centerTemplate: [{
|
|
431
448
|
type: ContentChild,
|
|
432
449
|
args: [CircularProgressbarCenterTemplateDirective]
|
package/esm2015/common/util.js
CHANGED
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-progressbar',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
12
|
+
publishDate: 1659454196,
|
|
13
13
|
version: '',
|
|
14
14
|
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'
|
|
15
15
|
};
|
|
@@ -11,7 +11,8 @@ import * as i2$1 from '@progress/kendo-angular-common';
|
|
|
11
11
|
import { hasObservers, isChanged, ResizeSensorModule } from '@progress/kendo-angular-common';
|
|
12
12
|
import * as i2 from '@angular/common';
|
|
13
13
|
import { CommonModule } from '@angular/common';
|
|
14
|
-
import { Subscription
|
|
14
|
+
import { Subscription } from 'rxjs';
|
|
15
|
+
import { take } from 'rxjs/operators';
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
18
|
* @hidden
|
|
@@ -20,7 +21,7 @@ const packageMetadata = {
|
|
|
20
21
|
name: '@progress/kendo-angular-progressbar',
|
|
21
22
|
productName: 'Kendo UI for Angular',
|
|
22
23
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
23
|
-
publishDate:
|
|
24
|
+
publishDate: 1659454196,
|
|
24
25
|
version: '',
|
|
25
26
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
26
27
|
};
|
|
@@ -129,6 +130,12 @@ const removeProgressBarStyles = (props, renderer) => {
|
|
|
129
130
|
renderer[prop.method](prop.el, prop.attr);
|
|
130
131
|
});
|
|
131
132
|
};
|
|
133
|
+
/**
|
|
134
|
+
* @hidden
|
|
135
|
+
*/
|
|
136
|
+
const hasElementSize = (element) => {
|
|
137
|
+
return element.style.width && element.style.height;
|
|
138
|
+
};
|
|
132
139
|
|
|
133
140
|
/**
|
|
134
141
|
* @hidden
|
|
@@ -795,12 +802,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
795
802
|
}]
|
|
796
803
|
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
|
|
797
804
|
|
|
805
|
+
const DEFAULT_SURFACE_SIZE = 200;
|
|
798
806
|
/**
|
|
799
807
|
* Represents the [Kendo UI Circular ProgressBar component for Angular]({% slug circular_progressbar %}).
|
|
800
808
|
*
|
|
801
809
|
* @example
|
|
802
810
|
* ```ts-preview
|
|
803
|
-
* _@Component({
|
|
811
|
+
* _@Component({
|
|
804
812
|
* selector: 'my-app',
|
|
805
813
|
* template: `
|
|
806
814
|
* <kendo-circularprogressbar [value]="value"></kendo-circularprogressbar>
|
|
@@ -819,7 +827,6 @@ class CircularProgressBarComponent {
|
|
|
819
827
|
this.element = element;
|
|
820
828
|
this.zone = zone;
|
|
821
829
|
this.hostClasses = true;
|
|
822
|
-
this.WrapperSize = '200px';
|
|
823
830
|
/**
|
|
824
831
|
* Indicates whether an animation will be played on value changes.
|
|
825
832
|
*
|
|
@@ -840,6 +847,7 @@ class CircularProgressBarComponent {
|
|
|
840
847
|
this._max = 100;
|
|
841
848
|
this._min = 0;
|
|
842
849
|
this._value = 0;
|
|
850
|
+
this.previousValue = 0;
|
|
843
851
|
this.internalValue = 0;
|
|
844
852
|
this.subscriptions = new Subscription();
|
|
845
853
|
validatePackage(packageMetadata);
|
|
@@ -997,8 +1005,18 @@ class CircularProgressBarComponent {
|
|
|
997
1005
|
setStyles() {
|
|
998
1006
|
const progressArc = this.progress.nativeElement;
|
|
999
1007
|
const scale = this.scale.nativeElement;
|
|
1008
|
+
const surface = this.surface.nativeElement;
|
|
1000
1009
|
const element = this.element.nativeElement;
|
|
1001
|
-
|
|
1010
|
+
let elWidth = element.getBoundingClientRect().width;
|
|
1011
|
+
;
|
|
1012
|
+
if (!hasElementSize(element)) {
|
|
1013
|
+
const surfaceSize = [
|
|
1014
|
+
{ method: 'setStyle', el: surface, attr: 'width', attrValue: `${DEFAULT_SURFACE_SIZE}px` },
|
|
1015
|
+
{ method: 'setStyle', el: surface, attr: 'height', attrValue: `${DEFAULT_SURFACE_SIZE}px` }
|
|
1016
|
+
];
|
|
1017
|
+
elWidth = DEFAULT_SURFACE_SIZE;
|
|
1018
|
+
setProgressBarStyles(surfaceSize, this.renderer);
|
|
1019
|
+
}
|
|
1002
1020
|
const attributesArray = [
|
|
1003
1021
|
{ method: 'setAttribute', el: progressArc, attr: 'r', attrValue: (elWidth / 2) - 10 },
|
|
1004
1022
|
{ method: 'setAttribute', el: progressArc, attr: 'cx', attrValue: (elWidth / 2) },
|
|
@@ -1016,7 +1034,7 @@ class CircularProgressBarComponent {
|
|
|
1016
1034
|
// the indeterminate state wont work as the `k-circular-progressbar-arc` has a transform: rotate(-90deg) which is
|
|
1017
1035
|
// interfering with the svg animation as the animateTransform brings its own transform: rotate()
|
|
1018
1036
|
// This will be like this until the themes release a new version, bringing a new class `k-circular-progressbar-indeterminate-arc`
|
|
1019
|
-
// containing only the necassery CSS styles and we will switch between them when the state of the progressbar is switched.
|
|
1037
|
+
// containing only the necassery CSS styles and we will switch between them when the state of the progressbar is switched.
|
|
1020
1038
|
this.calculateProgress(this.value - this.min);
|
|
1021
1039
|
const rotate = this.rtl ? { from: 360, to: 0 } : { from: 0, to: 360 };
|
|
1022
1040
|
let color;
|
|
@@ -1058,9 +1076,20 @@ class CircularProgressBarComponent {
|
|
|
1058
1076
|
}
|
|
1059
1077
|
positionLabel() {
|
|
1060
1078
|
const labelEl = this.labelElement.nativeElement;
|
|
1061
|
-
const
|
|
1062
|
-
const
|
|
1063
|
-
|
|
1079
|
+
const element = this.element.nativeElement;
|
|
1080
|
+
const surface = this.surface.nativeElement;
|
|
1081
|
+
let elWidth;
|
|
1082
|
+
let elHeight;
|
|
1083
|
+
if (!hasElementSize(element)) {
|
|
1084
|
+
const surfaceSize = surface.getBoundingClientRect();
|
|
1085
|
+
elWidth = surfaceSize.width;
|
|
1086
|
+
elHeight = surfaceSize.height;
|
|
1087
|
+
}
|
|
1088
|
+
else {
|
|
1089
|
+
const elementSize = element.getBoundingClientRect();
|
|
1090
|
+
elWidth = elementSize.width;
|
|
1091
|
+
elHeight = elementSize.height;
|
|
1092
|
+
}
|
|
1064
1093
|
const left = (elWidth / 2) - (labelEl.offsetWidth / 2);
|
|
1065
1094
|
const top = (elHeight / 2) - (labelEl.offsetHeight / 2);
|
|
1066
1095
|
const labelCalculations = [
|
|
@@ -1121,15 +1150,15 @@ class CircularProgressBarComponent {
|
|
|
1121
1150
|
}
|
|
1122
1151
|
}
|
|
1123
1152
|
CircularProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CircularProgressBarComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i1.LocalizationService }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
1124
|
-
CircularProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CircularProgressBarComponent, selector: "kendo-circularprogressbar", inputs: { value: "value", max: "max", min: "min", animation: "animation", opacity: "opacity", indeterminate: "indeterminate", progressColor: "progressColor" }, outputs: { animationEnd: "animationEnd" }, host: { properties: { "class.k-circular-progressbar": "this.hostClasses"
|
|
1153
|
+
CircularProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CircularProgressBarComponent, selector: "kendo-circularprogressbar", inputs: { value: "value", max: "max", min: "min", animation: "animation", opacity: "opacity", indeterminate: "indeterminate", progressColor: "progressColor" }, outputs: { animationEnd: "animationEnd" }, host: { properties: { "class.k-circular-progressbar": "this.hostClasses" } }, providers: [
|
|
1125
1154
|
LocalizationService,
|
|
1126
1155
|
{
|
|
1127
1156
|
provide: L10N_PREFIX,
|
|
1128
1157
|
useValue: 'kendo.circularprogressbar'
|
|
1129
1158
|
}
|
|
1130
|
-
], queries: [{ propertyName: "centerTemplate", first: true, predicate: CircularProgressbarCenterTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "progress", first: true, predicate: ["progress"], descendants: true }, { propertyName: "scale", first: true, predicate: ["scale"], descendants: true }, { propertyName: "labelElement", first: true, predicate: ["label"], descendants: true }, { propertyName: "
|
|
1131
|
-
<div class="k-circular-progressbar-surface">
|
|
1132
|
-
<div
|
|
1159
|
+
], queries: [{ propertyName: "centerTemplate", first: true, predicate: CircularProgressbarCenterTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "progress", first: true, predicate: ["progress"], descendants: true }, { propertyName: "scale", first: true, predicate: ["scale"], descendants: true }, { propertyName: "labelElement", first: true, predicate: ["label"], descendants: true }, { propertyName: "surface", first: true, predicate: ["surface"], descendants: true }], exportAs: ["kendoCircularProgressBar"], usesOnChanges: true, ngImport: i0, template: `
|
|
1160
|
+
<div #surface class="k-circular-progressbar-surface">
|
|
1161
|
+
<div>
|
|
1133
1162
|
<svg #svg>
|
|
1134
1163
|
<g>
|
|
1135
1164
|
<circle class="k-circular-progressbar-scale" #scale stroke-width="9.5"></circle>
|
|
@@ -1149,8 +1178,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1149
1178
|
exportAs: 'kendoCircularProgressBar',
|
|
1150
1179
|
selector: 'kendo-circularprogressbar',
|
|
1151
1180
|
template: `
|
|
1152
|
-
<div class="k-circular-progressbar-surface">
|
|
1153
|
-
<div
|
|
1181
|
+
<div #surface class="k-circular-progressbar-surface">
|
|
1182
|
+
<div>
|
|
1154
1183
|
<svg #svg>
|
|
1155
1184
|
<g>
|
|
1156
1185
|
<circle class="k-circular-progressbar-scale" #scale stroke-width="9.5"></circle>
|
|
@@ -1174,12 +1203,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1174
1203
|
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i1.LocalizationService }, { type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { hostClasses: [{
|
|
1175
1204
|
type: HostBinding,
|
|
1176
1205
|
args: ['class.k-circular-progressbar']
|
|
1177
|
-
}], WrapperSize: [{
|
|
1178
|
-
type: HostBinding,
|
|
1179
|
-
args: ['style.width']
|
|
1180
|
-
}, {
|
|
1181
|
-
type: HostBinding,
|
|
1182
|
-
args: ['style.height']
|
|
1183
1206
|
}], value: [{
|
|
1184
1207
|
type: Input
|
|
1185
1208
|
}], max: [{
|
|
@@ -1205,9 +1228,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1205
1228
|
}], labelElement: [{
|
|
1206
1229
|
type: ViewChild,
|
|
1207
1230
|
args: ["label"]
|
|
1208
|
-
}],
|
|
1231
|
+
}], surface: [{
|
|
1209
1232
|
type: ViewChild,
|
|
1210
|
-
args: ["
|
|
1233
|
+
args: ["surface"]
|
|
1211
1234
|
}], centerTemplate: [{
|
|
1212
1235
|
type: ContentChild,
|
|
1213
1236
|
args: [CircularProgressbarCenterTemplateDirective]
|
package/package.json
CHANGED