1 line
7.1 KiB
Plaintext
1 line
7.1 KiB
Plaintext
{"version":3,"file":"primeng-progressbar.mjs","sources":["../../src/app/components/progressbar/progressbar.ts","../../src/app/components/progressbar/primeng-progressbar.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, TemplateRef, ContentChildren, Input, NgModule, ViewEncapsulation, booleanAttribute, numberAttribute } from '@angular/core';\nimport { PrimeTemplate } from 'primeng/api';\nimport { QueryList } from '@angular/core';\n/**\n * ProgressBar is a process status indicator.\n * @group Components\n */\n@Component({\n selector: 'p-progressBar',\n template: `\n <div\n role=\"progressbar\"\n [class]=\"styleClass\"\n [ngStyle]=\"style\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuenow]=\"value\"\n [attr.aria-valuemax]=\"100\"\n [attr.data-pc-name]=\"'progressbar'\"\n [attr.data-pc-section]=\"'root'\"\n [ngClass]=\"{ 'p-progressbar p-component': true, 'p-progressbar-determinate': mode === 'determinate', 'p-progressbar-indeterminate': mode === 'indeterminate' }\"\n >\n <div *ngIf=\"mode === 'determinate'\" class=\"p-progressbar-value p-progressbar-value-animate\" [style.width]=\"value + '%'\" style=\"display:flex\" [style.background]=\"color\" [attr.data-pc-section]=\"'value'\">\n <div class=\"p-progressbar-label\">\n <div *ngIf=\"showValue && !contentTemplate\" [style.display]=\"value != null && value !== 0 ? 'flex' : 'none'\" [attr.data-pc-section]=\"'label'\">{{ value }}{{ unit }}</div>\n <ng-container *ngTemplateOutlet=\"contentTemplate; context: { $implicit: value }\"></ng-container>\n </div>\n </div>\n <div *ngIf=\"mode === 'indeterminate'\" class=\"p-progressbar-indeterminate-container\" [attr.data-pc-section]=\"'container'\">\n <div class=\"p-progressbar-value p-progressbar-value-animate\" [style.background]=\"color\" [attr.data-pc-section]=\"'value'\"></div>\n </div>\n </div>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./progressbar.css'],\n host: {\n class: 'p-element'\n }\n})\nexport class ProgressBar {\n /**\n * Current value of the progress.\n * @group Props\n */\n @Input({ transform: numberAttribute }) value: number | undefined;\n /**\n * Whether to display the progress bar value.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) showValue: boolean = true;\n /**\n * Class of the element.\n * @group Props\n */\n @Input() styleClass: string | undefined;\n /**\n * Inline style of the element.\n * @group Props\n */\n @Input() style: { [klass: string]: any } | null | undefined;\n /**\n * Unit sign appended to the value.\n * @group Props\n */\n @Input() unit: string = '%';\n /**\n * Defines the mode of the progress\n * @group Props\n */\n @Input() mode: string = 'determinate';\n /**\n * Color for the background of the progress.\n * @group Props\n */\n @Input() color: string | undefined;\n\n @ContentChildren(PrimeTemplate) templates: QueryList<PrimeTemplate> | undefined;\n\n contentTemplate: TemplateRef<any> | undefined;\n\n ngAfterContentInit() {\n this.templates?.forEach((item) => {\n switch (item.getType()) {\n case 'content':\n this.contentTemplate = item.template;\n break;\n default:\n this.contentTemplate = item.template;\n }\n });\n }\n}\n\n@NgModule({\n imports: [CommonModule],\n exports: [ProgressBar],\n declarations: [ProgressBar]\n})\nexport class ProgressBarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAIA;;;AAGG;MAiCU,WAAW,CAAA;AACpB;;;AAGG;AACoC,IAAA,KAAK,CAAqB;AACjE;;;AAGG;IACqC,SAAS,GAAY,IAAI,CAAC;AAClE;;;AAGG;AACM,IAAA,UAAU,CAAqB;AACxC;;;AAGG;AACM,IAAA,KAAK,CAA8C;AAC5D;;;AAGG;IACM,IAAI,GAAW,GAAG,CAAC;AAC5B;;;AAGG;IACM,IAAI,GAAW,aAAa,CAAC;AACtC;;;AAGG;AACM,IAAA,KAAK,CAAqB;AAEH,IAAA,SAAS,CAAuC;AAEhF,IAAA,eAAe,CAA+B;IAE9C,kBAAkB,GAAA;QACd,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,IAAI,KAAI;AAC7B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