UNPKG

@c8y/ngx-components

Version:

Angular modules for Cumulocity IoT applications

34 lines 1.35 kB
import { PipeTransform } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; import { SeverityType } from '@c8y/client'; import * as i0 from "@angular/core"; /** * Pipe for transforming an array of alarm severity types into a comma-separated string. * * @example * Usage in a template: {{ ['WARNING', 'CRITICAL'] | AlarmSeveritiesToTitle }} * Result: 'Warning, Critical' */ export declare class AlarmSeveritiesToTitlePipe implements PipeTransform { private translateService; private readonly severityOptionsCount; constructor(translateService: TranslateService); /** * Transforms an array of alarm severity types into a comma-separated string. * * @param severities - Array of severity types. * @returns - Transformed human-readable title string. */ transform(severities: SeverityType[]): string; /** * Translates and converts a severity type to title case. * * @private * @param chip - Severity type. * @returns - Translated and title-cased severity type. */ private translateSeverityLabel; static ɵfac: i0.ɵɵFactoryDeclaration<AlarmSeveritiesToTitlePipe, never>; static ɵpipe: i0.ɵɵPipeDeclaration<AlarmSeveritiesToTitlePipe, "AlarmSeveritiesToTitle", true>; } //# sourceMappingURL=alarm-severities-to-title.pipe.d.ts.map