Icard/angular-clarity-master(work.../node_modules/primeng/fesm2022/primeng-metergroup.mjs.map

1 line
16 KiB
Plaintext
Raw Normal View History

2024-07-16 15:23:22 +00:00
{"version":3,"file":"primeng-metergroup.mjs","sources":["../../src/app/components/metergroup/metergroup.ts","../../src/app/components/metergroup/primeng-metergroup.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { AfterContentInit, ChangeDetectionStrategy, Component, ContentChildren, ElementRef, Input, NgModule, QueryList, TemplateRef, ViewEncapsulation, effect, forwardRef, inject, ViewChild } from '@angular/core';\nimport { PrimeTemplate, SharedModule } from 'primeng/api';\nimport { DomHandler } from 'primeng/dom';\nimport { MeterItem } from './metergroup.interface';\n\n@Component({\n selector: 'p-meterGroupLabel',\n template: `\n <ol [ngClass]=\"labelClass\">\n <li *ngFor=\"let labelItem of value; let index = index; trackBy: parentInstance.trackByFn\" class=\"p-metergroup-label\">\n <ng-container *ngIf=\"!iconTemplate\">\n <i *ngIf=\"labelItem.icon\" [class]=\"labelItem.icon\" [ngClass]=\"{ 'p-metergroup-label-icon': true }\" [ngStyle]=\"{ color: labelItem.color }\"></i>\n <span *ngIf=\"!labelItem.icon\" class=\"p-metergroup-label-marker\" [ngStyle]=\"{ backgroundColor: labelItem.color }\"></span>\n </ng-container>\n <ng-container *ngTemplateOutlet=\"iconTemplate; context: { $implicit: labelItem, icon: labelItem.icon }\"></ng-container>\n <span class=\"p-metergroup-label-text\">{{ labelItem.label }} ({{ parentInstance?.percentValue(labelItem.value) }})</span>\n </li>\n </ol>\n `\n})\nexport class MeterGroupLabel {\n @Input() value: any[] = null;\n\n @Input() labelPosition: 'start' | 'end' = 'end';\n\n @Input() labelOrientation: 'horizontal' | 'vertical' = 'horizontal';\n\n @Input() min: number;\n\n @Input() max: number;\n\n @Input() iconTemplate: TemplateRef<any> | undefined;\n\n @ContentChildren(PrimeTemplate) templates: QueryList<PrimeTemplate> | undefined;\n\n get labelClass(): { [key: string]: boolean } {\n return {\n 'p-metergroup-labels p-component': true,\n 'p-metergroup-labels-vertical': this.labelOrientation === 'vertical',\n 'p-metergroup-labels-horizontal': this.labelOrientation === 'horizontal'\n };\n }\n\n parentInstance: MeterGroup = inject(forwardRef(() => MeterGroup));\n}\n/**\n * MeterGroup displays scalar measurements within a known range.\n * @group Components\n */\n@Component({\n selector: 'p-meterGroup',\n template: `\n <div #container [ngClass]=\"containerClass\" role=\"meter\" [attr.aria-valuemin]=\"min\" [attr.aria-valuemax]=\"max\" [attr.aria-valuenow]=\"totalPercent()\" [ngStyle]=\"style\" [class]=\"styleClass\">\n @if(labelPosition ==='start') {\n <p-meterGroupLabel *ngIf=\"!labelTemplate\" [value]=\"value\" [labelPosition]=\"labelPosition\" [labelOrientation]=\"labelOrientation\" [min]=\"min\" [max]=\"max\" [iconTemplate]=\"iconTemplate\" />\n <ng-container *ngTemplateOutlet=\"labelTemplate; context: { $implicit: value, totalPercent: totalPercent(), percentages: percentages() }\"></ng-container>\n }\n <ng-container *ngTemplateOutlet=\"startTemplate; context: { $implicit: value, totalPercent: totalPercent(), percentages: percentages() }\"></ng-container>\n <div class=\"p-metergroup-meters\">\n <ng-container *ngFor=\"let meterItem of value; let index = index; trackBy: trackByFn\">\n <ng-container *ngTemplateOutlet=\"meterTemplate; context: { $implicit: meterItem, index: index, orientation: this.orientation, class: 'p-metergroup-meter', size: percentValue(meterItem.value), totalPercent: totalPercent() }\">\n </ng-container>\n <ng-container *ngIf=\"!meterTemplate\">\n <span class=\"p-metergroup-meter\" [ngStyle]=\"meterStyle(meterItem)\"></span>\n </ng-container>\n </ng-container>\n </div>\n <ng-container *ngTemplateOutle