UNPKG

2.96 kBSource Map (JSON)View Raw
1{"version":3,"file":"progress.directive.js","sourceRoot":"","sources":["../../src/progressbar/progress.directive.ts"],"names":[],"mappings":"OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,eAAe;AAI7D,qDAAqD;AACrD,iDAAiD;AAEjD;IAAA;QAkBU,aAAQ,GAAW,IAAI,CAAC;QAEzB,SAAI,GAAS,EAAE,CAAC;QAEb,SAAI,GAAU,GAAG,CAAC;IAuB9B,CAAC;IAtCC,sBAAW,kCAAG;QAHd,8CAA8C;aAG9C;YACE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;QACnB,CAAC;aAED,UAAe,CAAQ;YACrB,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;YACd,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,UAAC,GAAgB;gBACjC,GAAG,CAAC,qBAAqB,EAAE,CAAC;YAC9B,CAAC,CAAC,CAAC;QACL,CAAC;;;OAPA;IAeM,kCAAM,GAAb,UAAc,GAAgB;QAC5B,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;YAClB,GAAG,CAAC,UAAU,GAAG,MAAM,CAAC;QAC1B,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACtB,CAAC;IAEM,qCAAS,GAAhB,UAAiB,GAAgB;QAC/B,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;IAC9C,CAAC;IACI,4BAAU,GAA0B;QAC3C,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAC,QAAQ,EAAE,yBAAyB,EAAC,EAAG,EAAE;KACnE,CAAC;IACF,kBAAkB;IACX,gCAAc,GAAmE,cAAM,OAAA,EAC7F,EAD6F,CAC7F,CAAC;IACK,gCAAc,GAA2C;QAChE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QAC7B,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,UAAU,EAAG,EAAE,EAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;QACrE,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,gBAAgB,EAAG,EAAE,EAAE;KAC/D,CAAC;IACF,wBAAC;AAAD,CAAC,AA7CD,IA6CC","sourcesContent":["import { Directive, HostBinding, Input } from '@angular/core';\n\nimport { BarComponent } from './bar.component';\n\n// todo: progress element conflict with bootstrap.css\n// todo: need hack: replace host element with div\n\nexport class ProgressDirective {\n /** if `true` changing value of progress bar will be animated (note: not supported by Bootstrap 4) */\n public animate:boolean;\n\n /** maximum total value of progress element */\n \n \n public get max():number {\n return this._max;\n }\n\n public set max(v:number) {\n this._max = v;\n this.bars.forEach((bar:BarComponent) => {\n bar.recalculatePercentage();\n });\n }\n\n public addClass:boolean = true;\n\n public bars:any[] = [];\n\n protected _max:number = 100;\n\n public addBar(bar:BarComponent):void {\n if (!this.animate) {\n bar.transition = 'none';\n }\n this.bars.push(bar);\n }\n\n public removeBar(bar:BarComponent):void {\n this.bars.splice(this.bars.indexOf(bar), 1);\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{selector: 'bs-progress, [progress]'}, ] },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\nstatic propDecorators: {[key: string]: DecoratorInvocation[]} = {\n'animate': [{ type: Input },],\n'max': [{ type: HostBinding, args: ['attr.max', ] },{ type: Input },],\n'addClass': [{ type: HostBinding, args: ['class.progress', ] },],\n};\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
\No newline at end of file