All files / inline-notification si-inline-notification.component.ts

100% Statements 7/7
100% Branches 0/0
100% Functions 0/0
100% Lines 7/7

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56                                  1x       4x         4x         4x         4x                   4x             4x    
/**
 * Copyright (c) Siemens 2016 - 2025
 * SPDX-License-Identifier: MIT
 */
import { NgClass } from '@angular/common';
import { booleanAttribute, Component, input } from '@angular/core';
import { StatusType } from '@siemens/element-ng/common';
import { SiStatusIconComponent } from '@siemens/element-ng/icon';
import { Link, SiLinkDirective } from '@siemens/element-ng/link';
import { SiTranslatePipe, TranslatableString } from '@siemens/element-translate-ng/translate';
 
@Component({
  selector: 'si-inline-notification',
  imports: [NgClass, SiLinkDirective, SiTranslatePipe, SiStatusIconComponent],
  templateUrl: './si-inline-notification.component.html',
  styleUrl: './si-inline-notification.component.scss'
})
export class SiInlineNotificationComponent {
  /**
   * Status of inline notification.
   */
  readonly severity = input.required<StatusType>();
 
  /**
   * Heading of the message.
   */
  readonly heading = input<TranslatableString>();
 
  /**
   * Main message of this inline notification.
   */
  readonly message = input.required<TranslatableString>();
 
  /**
   * Optional link action for inline notification events.
   */
  readonly action = input<Link>();
 
  /**
   * Params passed to the translation pipe
   *
   * @defaultValue
   * ```
   * {}
   * ```
   */
  readonly translationParams = input<{ [key: string]: any } | undefined>({});
 
  /**
   * Displays in embedded style, w/o radius and indicator bar
   *
   * @defaultValue false
   */
  readonly embedded = input(false, { transform: booleanAttribute });
}