@lxlib/chart
Version:
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.1.1.
16 lines (14 loc) • 4.17 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@lxlib/theme"),require("@lxlib/util"),require("@angular/common"),require("ng-zorro-antd/tooltip")):"function"==typeof define&&define.amd?define("@lxlib/chart/mini-progress",["exports","@angular/core","@lxlib/theme","@lxlib/util","@angular/common","ng-zorro-antd/tooltip"],t):t(((e=e||self).lxlib=e.lxlib||{},e.lxlib.chart=e.lxlib.chart||{},e.lxlib.chart["mini-progress"]={}),e.ng.core,e.lxlib.theme,e.lxlib.util,e.ng.common,e["ng-zorro-antd/tooltip"])}(this,(function(e,t,r,o,n,i){"use strict";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */function l(e,t,r,o){var n,i=arguments.length,l=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,r,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(l=(i<3?n(l):i>3?n(t,r,l):n(t,r))||l);return i>3&&l&&Object.defineProperty(t,r,l),l}function a(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function c(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var o,n,i=r.call(e),l=[];try{for(;(void 0===t||t-- >0)&&!(o=i.next()).done;)l.push(o.value)}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return l}function s(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(c(arguments[t]));return e}var p=function(){function e(e,t){this.i18n=e,this.cdr=t,this.color="#1890FF"}return e.prototype.fixNum=function(e){return Math.min(Math.max(o.toNumber(e),0),100)},e.prototype.ngOnChanges=function(){this.target=this.fixNum(this.target),this.percent=this.fixNum(this.percent),this.cdr.detectChanges()},e.decorators=[{type:t.Component,args:[{selector:"g2-mini-progress",exportAs:"g2MiniProgress",template:'<div nz-tooltip [nzTooltipTitle]="i18n.getData(\'miniProgress\').target + target + \'%\'" class="g2-mini-progress__target" [ngStyle]="{\'left.%\': target}">\n <span class="g2-mini-progress__target-item" [ngStyle]="{\'background-color\': color}"></span>\n <span class="g2-mini-progress__target-item" [ngStyle]="{\'background-color\': color}"></span>\n</div>\n<div class="g2-mini-progress__wrap">\n <div class="g2-mini-progress__value" [ngStyle]="{\'background-color\': color, \'width.%\': percent, \'height.px\':strokeWidth}"></div>\n</div>\n',host:{"[class.g2-mini-progress]":"true"},preserveWhitespaces:!1,changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None}]}],e.ctorParameters=function(){return[{type:r.LxlibLocaleService},{type:t.ChangeDetectorRef}]},e.propDecorators={color:[{type:t.Input}],target:[{type:t.Input}],percent:[{type:t.Input}],strokeWidth:[{type:t.Input}]},l([o.InputNumber(),a("design:type",Number)],e.prototype,"target",void 0),l([o.InputNumber(),a("design:type",Number)],e.prototype,"percent",void 0),l([o.InputNumber(),a("design:type",Number)],e.prototype,"strokeWidth",void 0),e}();var u=[p],g=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,o.LxlibUtilModule,r.LxlibLocaleModule,i.NzToolTipModule],declarations:s(u),exports:s(u)}]}],e}();e.G2MiniProgressComponent=p,e.G2MiniProgressModule=g,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=mini-progress.umd.min.js.map