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;AAC
|