# Modals

Modals are flexible dialog prompts which offer minimal required functionality and smart defaults. They block the parent window and force users to interact with the modal itself before allowing to continue the workflow.

## Usage

![Modal](<../images/modal.png>)

### When to use

- Use modals for guided interactions or showing additional details.
- Use it to interrupt a flow and to catch the user’s full attention.
- Use it to prompt a user to enter information crucial to continuing a process.

### Best practices

- Use button texts which represent their intended action (e.g. use `Delete` instead of `Yes` on a delete confirmation dialog).
- Be mindful **when** to show the modal to avoid interrupting the user flow.
- Modals must always be used in combination with [backdrop](<https://element.siemens.io/patterns/backdrop/>) to provide visual focus on the active modal content.
- Don't use it for complex decision making that requires additional sources of information unavailable in the current context.
- Don't use it for nonessential information that is unrelated to the current user flow.

## Design

### Elements

![Modal elements](<../images/modal-elements.png>)

> 1. Title, 2. Content, 3. Secondary action (optional), 4. Primary action, 5. Cancel

### Common modal types

Modals serve various purposes depending on the scenario. Common examples include:

- **Transactional modals**  
  Used to collect or confirm user inputs, such as completing a form or setting preferences.
- **Confirmation modals**  
  Ensure users explicitly approve an action, like saving or submitting data.

![Confirmation modal](<../images/modal-confirmation.png>)

- **Deletion modals**  
  They are used when the action cannot be undone or the data is hard to recreate. For high-impact deletions (e.g., deleting a site with months of work), explicit confirmation is required, with safeguards like typing the object’s name or enforcing a 4-eyes principle. Low-impact deletions, where data is easy to recreate, don’t require a modal.

![Deletion modal](<../images/modal-deletion.png>)

## Code

Modals support various content structures, sizes, and behaviors to organize information effectively. Choose the appropriate pattern based on your workflow needs.

Below are examples of what’s supported. Consumers can display modals programmatically using the [SiModalService](<https://element.siemens.io/components/layout-navigation/modals/#generic-modals>) or use [predefined modal dialogs](<https://element.siemens.io/components/layout-navigation/modals/#predefined-modal-dialogs>).

### Generic modals

To display a modal dialog in any component, follow these steps:

- Import and inject the `SiModalService` in your component.
- Use the `show` method of `SiModalService` to display the modal. This method takes either a `TemplateRef` or a component you want to display in the modal.
- Pass configuration options like `class` to customize sizing, scrolling, or positioning.

```
import { Component, inject, TemplateRef, viewChild } from '@angular/core';
import { ModalRef, SiModalService } from '@siemens/element-ng/modal';

@Component({
  template: `
    <button type="button" class="btn btn-secondary" (click)="openModal()">Open modal</button>

    <ng-template #sampleModal let-modalRef="modalRef">
      <div class="modal-header">
        <h4 class="modal-title" id="sample-modal-title">Modal title</h4>
        <button
          type="button"
          class="btn btn-circle btn-tertiary-ghost element-cancel"
          aria-label="Close modal"
          (click)="modalRef.hide('cancel')"
        ></button>
      </div>
      <div class="modal-body">
        <p>This is the modal body.</p>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" (click)="modalRef.hide('close')">
          Close
        </button>
        <button type="button" class="btn btn-primary" (click)="modalRef.hide('save')">
          Save
        </button>
      </div>
    </ng-template>
  `
})
export class SampleComponent {
  private modalService = inject(SiModalService);
  private modal = viewChild.required<TemplateRef<unknown>>('sampleModal');
  private modalRef?: ModalRef<unknown>;

  openModal(): void {
    this.modalRef = this.modalService.show(this.modal(), {
      class: 'modal-dialog-centered',
      ariaLabelledBy: 'sample-modal-title'
    });
  }
}
```

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { Component, inject, Injector, OnDestroy, TemplateRef } from '@angular/core';
import { SiStatusIconComponent } from '@siemens/element-ng/icon';
import { ModalRef, SiModalService } from '@siemens/element-ng/modal';
import { SiToastNotificationService } from '@siemens/element-ng/toast-notification';
import { LOG_EVENT } from '@siemens/live-preview';

import { AppTableComponent } from './app-table.component';

@Component({
  selector: 'app-sample',
  imports: [SiStatusIconComponent],
  templateUrl: './si-modal-service.html',
  host: { class: 'p-5' }
})
export class SampleComponent implements OnDestroy {
  private ref?: ModalRef<unknown>;
  private parentRef?: ModalRef<unknown>;

  private logEvent = inject(LOG_EVENT);
  private modalService = inject(SiModalService);
  private toastNotificationService = inject(SiToastNotificationService);
  private injector = inject(Injector);

  ngOnDestroy(): void {
    this.ref?.detach();
    this.parentRef?.detach();
  }

  openModal(template: TemplateRef<any>, modalClass?: string): void {
    this.ref?.hide();
    this.ref = this.modalService.show(
      template,
      {
        ignoreBackdropClick: false,
        keyboard: true,
        animated: true,
        class: modalClass,
        ariaLabelledBy: 'sample-modal-title'
      },
      'cancel'
    );
    this.ref.hidden.subscribe(closeValue => this.logEvent('Modal closed with value', closeValue));
  }

  openParentModal(template: TemplateRef<any>, modalClass?: string): void {
    this.parentRef?.hide();
    this.parentRef = this.modalService.show(
      template,
      {
        inputValues: { someThing: 'some context' },
        ignoreBackdropClick: false,
        keyboard: true,
        animated: true,
        class: modalClass,
        ariaLabelledBy: 'sample-modal-title-parent'
      },
      'cancel'
    );
    this.parentRef.hidden.subscribe(closeValue =>
      this.logEvent('Parent modal closed with value', closeValue)
    );
  }

  openModalWithComponent(): void {
    this.ref?.hide();
    this.ref = this.modalService.show(AppTableComponent, {
      ignoreBackdropClick: false,
      keyboard: true,
      animated: true,
      ariaLabelledBy: 'sample-modal-title',
      injector: this.injector
    });
  }

  showManualCloseToast(): void {
    this.toastNotificationService.showToastNotification({
      state: 'info',
      title: 'Manual close toast',
      message: 'This notification remains visible until it is closed.',
      disableAutoClose: true
    });
  }
}
```

Template:

```html
<div class="d-flex flex-wrap gap-5">
  <button type="button" class="btn btn-secondary" (click)="openModal(template)"
    >Create template modal</button
  >
  <button type="button" class="btn btn-secondary" (click)="openModal(template, 'modal-lg')"
    >Create large modal</button
  >
  <button
    type="button"
    class="btn btn-secondary"
    (click)="openModal(template, 'modal-dialog-centered')"
    >Create centered modal</button
  >
  <button type="button" class="btn btn-secondary" (click)="openModal(iconTemplate)"
    >Create modal with icon</button
  >
  <button
    type="button"
    class="btn btn-secondary"
    (click)="openModal(fullscreenTemplate, 'modal-fullscreen')"
    >Create full-screen modal</button
  >
  <button
    type="button"
    class="btn btn-secondary"
    (click)="openParentModal(nestedTemplate, 'modal-dialog-centered')"
    >Create nested modal</button
  >
  <button type="button" class="btn btn-secondary" (click)="openModalWithComponent()"
    >Create modal with custom component</button
  >
</div>
<ng-template #template let-modalRef="modalRef">
  <div class="modal-header">
    <h4 class="modal-title" id="sample-modal-title">Modal</h4>
    <button
      type="button"
      class="btn btn-circle btn-tertiary-ghost element-cancel"
      aria-label="Close modal"
      (click)="modalRef.hide('cancel')"
    >
    </button>
  </div>
  <div class="modal-body">
    <span>This is the body.</span>
  </div>
  <div class="modal-footer">
    <span>This is the footer.</span>
    <button type="button" class="btn btn-secondary" (click)="modalRef.hide('close')">Close</button>
  </div>
</ng-template>

<ng-template #fullscreenTemplate let-modalRef="modalRef">
  <div class="modal-header">
    <h4 class="modal-title" id="sample-modal-title">Full-screen modal</h4>
    <button
      type="button"
      class="btn btn-circle btn-tertiary-ghost element-cancel"
      aria-label="Close modal"
      (click)="modalRef.hide('cancel')"
    >
    </button>
  </div>
  <div class="modal-body">
    <p>This full-screen modal can trigger a toast notification.</p>
    <button type="button" class="btn btn-secondary" (click)="showManualCloseToast()"
      >Show manual close toast</button
    >
  </div>
</ng-template>

<ng-template #nestedTemplate let-parentModalRef="modalRef" let-thing="someThing">
  <div class="modal-header">
    <h4 class="modal-title" id="sample-modal-title-parent">Modal</h4>
    <button
      type="button"
      class="btn btn-circle btn-tertiary-ghost element-cancel"
      aria-label="Close modal"
      (click)="parentModalRef.hide('cancel')"
    >
    </button>
  </div>
  <div class="modal-body">
    This is parent dialog.<br />
    <code>someThing</code> from the context: {{ thing }}
  </div>
  <div class="modal-footer">
    <button type="button" class="btn btn-secondary" (click)="openModal(template, 'modal-lg')"
      >Proceed</button
    >
    <button type="button" class="btn btn-secondary" (click)="parentModalRef.hide('close')"
      >Close</button
    >
  </div>
</ng-template>

<ng-template #iconTemplate let-iconModalRef="modalRef" let-thing="someThing">
  <div class="modal-header">
    <si-status-icon class="icon" status="info" />
    <h4 class="modal-title" id="sample-modal-title">Modal</h4>
    <button
      type="button"
      class="btn btn-circle btn-tertiary-ghost element-cancel"
      aria-label="Close modal"
      (click)="iconModalRef.hide('cancel')"
    >
    </button>
  </div>
  <div class="modal-body">
    <span>This is the body.</span>
  </div>
  <div class="modal-footer">
    <button type="button" class="btn btn-secondary" (click)="iconModalRef.hide('close')"
      >Close</button
    >
    <button type="button" class="btn btn-primary" (click)="iconModalRef.hide('ok')">Accept</button>
  </div>
</ng-template>
```

### Modal content

When displaying modals with `SiModalService`, the outer dialog container, backdrop, and surface are automatically managed by the service. Consumers only need to structure the template or component content placed inside the dialog:

- **Header (optional)**: Apply `.modal-header` for the title bar containing `.modal-title`, an optional status icon, and a dismiss button
- **Body (required)**: Apply `.modal-body` for the main content area with standardized padding and spacing
- **Footer (optional)**: Apply `.modal-footer` for action buttons, right-aligned with standardized spacing

```
<ng-template #sampleModal let-modalRef="modalRef">
  <div class="modal-header">
    <h4 class="modal-title" id="sample-modal-title">Modal title</h4>
    <button
      type="button"
      class="btn btn-circle btn-tertiary-ghost element-cancel"
      aria-label="Close modal"
      (click)="modalRef.hide('cancel')"
    ></button>
  </div>
  <div class="modal-body">
    <p>Modal body content goes here.</p>
  </div>
  <div class="modal-footer">
    <button type="button" class="btn btn-secondary" (click)="modalRef.hide('close')">
      Close
    </button>
    <button type="button" class="btn btn-primary" (click)="modalRef.hide('save')">
      Save changes
    </button>
  </div>
</ng-template>
```

**Available content classes:**

| Class | Element | Purpose | Usage |
| --- | --- | --- | --- |
| `.modal-header` | `<div>` | Header container | Top bar placing title, optional status icon, and dismiss button on opposite ends |
| `.modal-title` | `<h1>` - `<h6>`, `<span>` | Primary heading | Heading for the modal dialog with standardized typography and line height |
| `.modal-body` | `<div>` | Content area | Main container for dialog content, forms, and scrollable data |
| `.modal-footer` | `<div>` | Action bar | Container for action buttons with right alignment and standardized spacing |

**Best practices:**

- Always associate `.modal-title` with the dialog by setting `ariaLabelledBy` in modal options
- Include a dismiss button in `.modal-header` with an accessible `aria-label`
- If an icon is placed in `.modal-header`, add the `.icon` class to ensure standard sizing and margin before `.modal-title`
- Place primary actions on the right and cancel or dismiss actions to the left in `.modal-footer`

### Modal sizes

Modals support several width options to accommodate different content requirements. By default, a modal dialog has a maximum width of 500px on viewports above the small (`sm`) breakpoint.

To change the width, pass a size modifier class in the `class` property of `ModalOptions` when calling `SiModalService.show()`:

**Available size classes:**

| Class | Max width (`sm` and up) | Purpose | Usage |
| --- | --- | --- | --- |
| `.modal-sm` | 300px | Small dialogs | Simple alerts, short prompts, or compact confirmation dialogs |
| *(default)* | 500px | Standard dialogs | General transactional tasks, settings, and standard confirmations |
| `.modal-lg` | 800px | Large dialogs | Multi-step forms, complex inputs, or data tables with multiple cols |
| `.modal-xl` | 1140px | Extra large dialogs | Data-heavy views, wizards, or advanced configuration panels |
| `.modal-fullscreen` | 100vw / 100% | Fullscreen dialogs | Full-viewport coverage for immersive workflows or mobile layouts |

**Responsive full-screen variants:**

Responsive full-screen classes make the dialog full-screen only below a specific breakpoint, returning to standard dialog sizing on larger viewports:

| Class | Full-screen breakpoint |
| --- | --- |
| `.modal-fullscreen-sm-down` | Full-screen below 576px (`sm`) |
| `.modal-fullscreen-md-down` | Full-screen below 768px (`md`) |
| `.modal-fullscreen-lg-down` | Full-screen below 992px (`lg`) |
| `.modal-fullscreen-xl-down` | Full-screen below 1200px (`xl`) |
| `.modal-fullscreen-xxl-down` | Full-screen below 1400px (`xxl`) |

```
this.modalService.show(template, {
  class: 'modal-lg'
});
```

### Centered modals

By default, modals are aligned near the top of the viewport. Pass `.modal-dialog-centered` in the `class` property of `ModalOptions` to vertically center the modal in the viewport:

```
this.modalService.show(template, {
  class: 'modal-dialog-centered'
});
```

### Scrollable modals

When modal content exceeds the viewport height, the default behavior scrolls the entire modal container. To keep the header and footer fixed in place while making only the body content scrollable, pass `.modal-dialog-scrollable` in the `class` property of `ModalOptions`.

This sets `overflow-y: auto` on `.modal-body` and limits the dialog height to the viewport, ensuring that dialog titles and action buttons remain visible at all times:

```
this.modalService.show(template, {
  class: 'modal-dialog-scrollable'
});
```

### Combining modifier classes

Modifier classes can be combined as needed. For example, combine `.modal-lg`, `.modal-dialog-centered`, and `.modal-dialog-scrollable` for a large, vertically centered dialog with internal body scrolling:

```
this.modalService.show(template, {
  class: 'modal-lg modal-dialog-centered modal-dialog-scrollable'
});
```

### Predefined modal dialogs

This section describes the general usage of the element modals.

#### Example

Component:

```typescript
/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
import { Component, inject, OnDestroy, OnInit } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
import { ActionDialog, SiActionDialogService } from '@siemens/element-ng/action-modal';
import {
  ColumnSelectionDialogResult,
  SiColumnSelectionDialogService
} from '@siemens/element-ng/column-selection-dialog';
import { LOG_EVENT } from '@siemens/live-preview';
import { delay, Observable, of, Subscription } from 'rxjs';

import { cloneColumnData, headerData } from './column-dialog.data';

@Component({
  selector: 'app-sample',
  templateUrl: './si-modal-dialogs.html',
  host: { class: 'p-5' }
})
export class SampleComponent implements OnInit, OnDestroy {
  private subscription?: Subscription;
  private logEvent = inject(LOG_EVENT);
  private siModal = inject(SiActionDialogService);
  private siColumnModal = inject(SiColumnSelectionDialogService);
  private translate = inject(TranslateService);
  protected columns = cloneColumnData(headerData);

  ngOnInit(): void {
    // note: this is normally in translation file, this is for demo proposes only
    this.translate.set('DEMO.SAVE_CONFIRM_HEAD', 'Unsaved data');
    this.translate.set('DEMO.SAVE_CONFIRM_MSG', 'Save {{what}}?');
    this.translate.set('DEMO.DISCARD_CONFIRM_HEAD', 'Unsaved data');
    this.translate.set('DEMO.DISCARD_CONFIRM_MSG', 'Discard changes of {{what}}?');
    this.translate.set('DEMO.DELETE_CONFIRM_HEAD', 'Delete scheduler');
    this.translate.set(
      'DEMO.DELETE_CONFIRM_MSG',
      'Delete "{{what}}"?\n\nThis action cannot be undone'
    );
  }

  ngOnDestroy(): void {
    this.unsubscribe();
  }

  private unsubscribe(): void {
    this.subscription?.unsubscribe();
  }

  showColumnSelection(): void {
    this.showColumnSelectionDialog(true);
  }

  showColumnSelectionNoVisibilityDialog(): void {
    this.showColumnSelectionDialog(false);
  }

  showActionDialog(dialog: ActionDialog): void {
    this.unsubscribe();
    this.subscription = this.siModal
      .showActionDialog(dialog)
      .subscribe(result => this.logEvent('Result:', result));
  }

  fakeLoading = <T>(type: T): Observable<T> => {
    this.logEvent('delayed:', type);
    return of(type).pipe(delay(3000));
  };

  private showColumnSelectionDialog(columnVisibility: boolean): void {
    this.unsubscribe();
    this.subscription = this.siColumnModal
      .showColumnSelectionDialog({
        heading: 'Customize columns',
        bodyTitle: 'Customize view by selecting or ordering',
        columns: this.columns,
        restoreEnabled: true,
        columnVisibilityConfigurable: columnVisibility
      })
      .subscribe((result: ColumnSelectionDialogResult) => {
        switch (result.type) {
          case 'ok':
            this.logEvent('Column selection submitted');
            break;
          case 'cancel':
            this.logEvent('Column selection canceled!');
            break;
          case 'instant':
            this.logEvent('Instantaneous selection done!');
            break;
          case 'restoreDefault':
            {
              this.logEvent('Column selection restored to default!');
              const restoredColumns = cloneColumnData(headerData);
              // redo IDs to show they're independent of previous state
              restoredColumns.forEach((x, i) => (x.id = 'No' + (i + 3)));
              result.updateColumns?.(restoredColumns);
            }
            break;
        }
      });
  }
}
```

Template:

```html
<h2>Alert dialogs</h2>
<div class="d-flex flex-wrap gap-5">
  <button
    type="button"
    class="btn btn-secondary"
    (click)="
      showActionDialog({
        type: 'alert',
        icon: 'element-info',
        heading: 'Default alert',
        message: 'Modal dialog with an icon in heading'
      })
    "
  >
    Default alert
  </button>
  <button
    type="button"
    class="btn btn-secondary"
    (click)="
      showActionDialog({
        type: 'alert',
        heading: 'Custom alert',
        message: 'Modal dialogs are customizable',
        confirmBtnName: 'Acknowledge'
      })
    "
  >
    Custom alert
  </button>
  <button
    type="button"
    class="btn btn-secondary"
    (click)="
      showActionDialog({
        type: 'alert',
        icon: 'element-fire',
        heading: 'Alert with delay',
        message: 'Closing alert may take few seconds',
        delayDismiss: fakeLoading
      })
    "
  >
    Alert with delay
  </button>
</div>

<h2 class="mt-6">Confirmation dialogs</h2>
<div class="d-flex flex-wrap gap-5">
  <button
    type="button"
    class="btn btn-secondary"
    (click)="
      showActionDialog({
        type: 'confirmation',
        heading: 'Replace Yes/No with clear actions',
        message:
          'Avoid using \'Yes\' and \'No\' as buttons, instead use suitable verbs to make the action directly understandable'
      })
    "
  >
    Yes/No confirmation
  </button>
  <button
    type="button"
    class="btn btn-secondary"
    (click)="
      showActionDialog({
        type: 'confirmation',
        heading: 'Save site',
        message: 'Save Siemens HQ Munich?',
        confirmBtnName: 'Save',
        declineBtnName: 'Cancel'
      })
    "
  >
    Custom confirmation (save)
  </button>
  <button
    type="button"
    class="btn btn-secondary"
    (click)="
      showActionDialog({
        type: 'confirmation',
        heading: 'Save site',
        message: 'Save Siemens HQ Munich?\n\nSaving may take few seconds',
        confirmBtnName: 'Save',
        declineBtnName: 'Cancel',
        delayDismiss: fakeLoading
      })
    "
  >
    Custom confirmation with delay
  </button>
</div>

<h2 class="mt-6">Edit-Discard dialogs (unsaved data)</h2>
<div class="d-flex flex-wrap gap-5">
  <button
    type="button"
    class="btn btn-secondary"
    (click)="
      showActionDialog({
        type: 'edit-discard',
        heading: 'DEMO.SAVE_CONFIRM_HEAD',
        message: 'DEMO.SAVE_CONFIRM_MSG',
        translationParams: { what: 'Scheduler 42' }
      })
    "
  >
    Edit-Discard with save
  </button>
  <button
    type="button"
    class="btn btn-secondary"
    (click)="
      showActionDialog({
        type: 'edit-discard',
        disableSave: true,
        heading: 'DEMO.DISCARD_CONFIRM_HEAD',
        disableSaveMessage: 'DEMO.DISCARD_CONFIRM_MSG',
        translationParams: { what: 'Scheduler 42' }
      })
    "
  >
    Edit-Discard without save
  </button>
  <button
    type="button"
    class="btn btn-secondary"
    (click)="
      showActionDialog({
        type: 'edit-discard',
        heading: 'Unsaved data',
        message: 'Save changes?\n\nSaving may take few seconds',
        delayDismiss: fakeLoading
      })
    "
  >
    Edit-Discard with save and delay
  </button>
</div>

<h2 class="mt-6">Delete confirmation dialogs</h2>
<div class="d-flex flex-wrap gap-5">
  <button
    type="button"
    class="btn btn-secondary"
    (click)="
      showActionDialog({
        type: 'delete-confirm',
        heading: 'DEMO.DELETE_CONFIRM_HEAD',
        message: 'DEMO.DELETE_CONFIRM_MSG',
        translationParams: { what: 'Scheduler 42' }
      })
    "
  >
    Delete confirmation
  </button>
  <button
    type="button"
    class="btn btn-secondary"
    (click)="
      showActionDialog({
        type: 'delete-confirm',
        heading: 'Delete site',
        message: 'Delete Siemens HQ Munich?\n\nDeleting may take few seconds',
        delayDismiss: fakeLoading
      })
    "
  >
    Delete confirmation with delay
  </button>
</div>

<h2 class="mt-6">Column selection dialog</h2>
<button type="button" class="btn btn-secondary" (click)="showColumnSelection()">
  Many columns
</button>

<h2 class="mt-6">Column selection dialog without visibility toggle</h2>
<button type="button" class="btn btn-secondary" (click)="showColumnSelectionNoVisibilityDialog()">
  Many columns
</button>
```

#### Action dialog

Element provides the service `SiActionDialogService`. The service provides a method to display the modal dialogs for each dialog type. They offer mandatory and optional parameters to configure the dialogs and return an `Observable` with the user's result.

##### Alert dialog

Use the alert dialog to request the attention of the user to a certain event, which is so severe, that the normal use of the application is interrupted and the user needs to confirm to this alert. The result is just `confirm`, which indicates that the users took notice of the dialog.

##### Confirmation dialog

Use the confirmation dialog to request a yes-no or agree-disagree confirm-decline answer from the user. Default button labels are yes and no. Closing the dialog with the close button returns a decline.

##### Delete confirmation dialog

Use the delete confirmation dialog to request user confirmation before deleting any object.

##### Edit-discard dialog (unsaved data)

Use the edit-discard dialog when leaving or canceling a data form that was modified. User results are `Save`, `Discard`, or `Cancel`.

- `Save`: User still wants to save the changes. Save them and navigate away.
- `Discard`: Discard the changes and navigate away.
- `Cancel`: User is unsure and cancel leaving the form. Close the dialog and let the user further edit the form.

#### Column selection dialog

Use the `SiColumnSelectionDialogService` if you need a dialog to configure the column setup of a table.

### [SiModalService](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L82-L157>)

**Kind:** class

**Provided in:** `root`

```
import { SiModalService } from '@siemens/element-ng/modal';
```

```
undecorated_class SiModalService
```

#### Attributes and Methods

##### show

[Source for show](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L94-L109>)

Shows a modal with the given content and configuration.

Returns: A reference to the modal.

```
show<T, CT = any>(content: TemplateRef<any> | (new (...args: any[]) => T), config: ModalOptions<T>, closeValue?: CT): ModalRef<T, CT>
```

#### Parameters

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [content](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L95-L95>) | `TemplateRef<any> \| (new (...args: any[]) => T)` |  | • Content to be displayed in the modal can be a template reference or a component. |
| [config](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L96-L96>) | `ModalOptions<T>` |  | • Configuration for the modal. |
| [closeValue](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L97-L97>) (optional) | `CT` |  | • Default closing value which can be overridden by calling `modalRef.hide(value)`. |

**Returns:** [ModalRef](<index.html#t:ModalRef>)`<T, CT>`

### [SiActionDialogService](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.service.ts#L39-L82>)

**Kind:** class

**Provided in:** `root`

```
import { SiActionDialogService } from '@siemens/element-ng/action-modal';
```

The service provides convenient methods to show common modal dialogs. All return an observable, which emit the dialog results. After emitting, the observables complete. Therefore, clients do not need to unsubscribe.

```
undecorated_class SiActionDialogService
```

#### Attributes and Methods

##### showActionDialog

[Source for showActionDialog](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.service.ts#L48-L81>)

Shows an action dialog

Returns: Observable for the result of the dialog. Need to `subscribe()` to show the dialog

```
showActionDialog<T extends ActionDialog>(dialog: T, diOptions?: ModalDependencyInjectionOptions): Observable<ActionDialogReturnType<T>>
```

#### Parameters

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [dialog](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.service.ts#L49-L49>) | `T` |  | • The dialog configuration |
| [diOptions](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.service.ts#L50-L50>) (optional) | `ModalDependencyInjectionOptions` |  | • Optional DI configuration. |

**Returns:** [Observable](<https://rxjs.dev/api/index/class/Observable>)`<`[ActionDialogReturnType](<index.html#t:ActionDialogReturnType>)`<T>>`

### [SiColumnSelectionDialogService](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.service.ts#L21-L70>)

**Kind:** class

**Provided in:** `root`

```
import { SiColumnSelectionDialogService } from '@siemens/element-ng/column-selection-dialog';
```

```
undecorated_class SiColumnSelectionDialogService
```

#### Attributes and Methods

##### showColumnSelectionDialog

[Source for showColumnSelectionDialog](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.service.ts#L34-L69>)

Opens a column selection dialog.

Despite other dialogs, this dialog informs the consumer not ONLY with clicking `submit` or `cancel`, but also with changing the place or visibility of a dialog row thanks to the `instant` type of emitted event.

```
showColumnSelectionDialog(dialogConfig: SiColumnSelectionDialogConfig, diOptions?: ModalDependencyInjectionOptions): Observable<ColumnSelectionDialogResult>
```

#### Parameters

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [dialogConfig](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.service.ts#L35-L35>) | `SiColumnSelectionDialogConfig` |  |  |
| [diOptions](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.service.ts#L36-L36>) (optional) | `ModalDependencyInjectionOptions` |  |  |

**Returns:** [Observable](<https://rxjs.dev/api/index/class/Observable>)`<`[ColumnSelectionDialogResult](<index.html#t:ColumnSelectionDialogResult>)`>`

### Types Documentation

### [ActionDialog](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L78-L79>)

**Kind:** type alias

```
import type { ActionDialog } from '@siemens/element-ng/action-modal';
```

All possible action dialogs.

```
type ActionDialog = AlertDialog | ConfirmationDialog | EditDiscardDialog | DeleteConfirmationDialog | never
```

### [ActionDialogReturnType](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L82-L90>)

**Kind:** type alias

```
import type { ActionDialogReturnType } from '@siemens/element-ng/action-modal';
```

Returns the return value type for the given action dialog type

```
type ActionDialogReturnType<T extends ActionDialogBase<any>> = T extends AlertDialog
  ? AlertDialogResult
  : T extends ConfirmationDialog
    ? ConfirmationDialogResult
    : T extends EditDiscardDialog
      ? EditDiscardDialogResult
      : T extends DeleteConfirmationDialog
        ? DeleteConfirmationDialogResult
        : never
```

### [ColumnSelectionDialogResult](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L54-L59>)

**Kind:** interface

```
import type { ColumnSelectionDialogResult } from '@siemens/element-ng/column-selection-dialog';
```

```
interface ColumnSelectionDialogResult
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [columns](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L56-L56>) | `Column[]` |  |
| [type](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L55-L55>) | `ColumnSelectionDialogResultType` |  |
| [updateColumns](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L58-L58>) (optional) | `((columns: Column[]) => void)` | when `type === 'restoreDefault'`, this function is set and allows to provide the columns |

### [ModalDependencyInjectionOptions](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L25-L32>)

**Kind:** interface

```
import type { ModalDependencyInjectionOptions } from '@siemens/element-ng/modal';
```

```
interface ModalDependencyInjectionOptions
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [environmentInjector](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L31-L31>) (optional) | `EnvironmentInjector` | Optional environment Injector. |
| [injector](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L29-L29>) (optional) | `Injector` | Optional element Injector. |
| [providers](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L27-L27>) (optional) | `StaticProvider[]` | Additional providers for the modal. |

### [ModalOptions](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L34-L57>)

**Kind:** interface

```
import type { ModalOptions } from '@siemens/element-ng/modal';
```

```
interface ModalOptions<T = Record<string, any>> extends ModalDependencyInjectionOptions
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [animated](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L52-L52>) (optional) | `boolean` | Whether to enable animation. |
| [ariaLabelledBy](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L56-L56>) (optional) | `string` | aria-labelled-by value. |
| [bindings](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L39-L39>) (optional) | `Binding[]` | Angular bindings for component content, created with `inputBinding`, `outputBinding`, or `twoWayBinding`. Ignored for template content. |
| [class](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L54-L54>) (optional) | `string` | Additional CSS class. |
| [environmentInjector](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L31-L31>) (optional, inherited) | `EnvironmentInjector` | Optional environment Injector.<br><br>Inherited from [ModalDependencyInjectionOptions](<index.html#t:ModalDependencyInjectionOptions>) |
| [ignoreBackdropClick](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L46-L46>) (optional) | `boolean` | When set to true, clicking the backdrop has no effect. |
| [injector](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L29-L29>) (optional, inherited) | `Injector` | Optional element Injector.<br><br>Inherited from [ModalDependencyInjectionOptions](<index.html#t:ModalDependencyInjectionOptions>) |
| [inputValues](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L44-L44>) (optional) | `Record<string, unknown>` | Use this to assign values to either `@Input()` or `input()` fields of the provided component. If a template is used, the values are available in the template context. |
| [keyboard](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L50-L50>) (optional) | `boolean` | Handle Esc to close/message. |
| [messageInsteadOfAutoHide](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L48-L48>) (optional) | `boolean` | When set to true, backdrop click or Esc don't close the modal. Instead a message will be sent. |
| [providers](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/si-modal.service.ts#L27-L27>) (optional, inherited) | `StaticProvider[]` | Additional providers for the modal.<br><br>Inherited from [ModalDependencyInjectionOptions](<index.html#t:ModalDependencyInjectionOptions>) |

### [ModalRef](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/modalref.ts#L15-L78>)

**Kind:** class

```
import { ModalRef } from '@siemens/element-ng/modal';
```

Reference to a modal dialog

```
undecorated_class ModalRef<T = never, CT = any>
```

#### Constructor

##### constructor

[Source for constructor](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/modalref.ts#L15-L78>)

```
constructor(): ModalRef<T, CT>
```

**Returns:** [ModalRef](<index.html#t:ModalRef>)`<T, CT>`

#### Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [closeValue](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/modalref.ts#L44-L44>) (optional) | `CT` |  | The default close value of the modal. |
| [data](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/modalref.ts#L28-L28>) | `ModalOptions<Record<string, any>>` | `` `{}` `` | The modal options passed during creation.<br><br>See: [SiModalService](<index.html#SiModalService>) |
| [detach](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/modalref.ts#L60-L60>) | `() => void` | `` `() => {}` `` |  |
| [dialogClass](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/modalref.ts#L36-L36>) | `string` | `''` | Custom class for modal-dialog |
| [hidden](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/modalref.ts#L17-L17>) | `Subject<CT \| undefined>` | `new Subject<CT \| undefined>()` | Emits the close value when the modal is hidden. |
| [hide](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/modalref.ts#L66-L66>) | `(reason?: CT) => void` | `` `() => {}` `` | Close the modal with a custom close value. |
| [ignoreBackdropClick](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/modalref.ts#L30-L30>) | `boolean` | `true` |  |
| [isCurrent](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/modalref.ts#L56-L56>) | `() => boolean` | `` `() => false` `` |  |
| [layer](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/modalref.ts#L42-L42>) | `number` | `0` | The layer of the modal. The modal with the highest layer will be shown on top. |
| [message](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/modalref.ts#L19-L19>) | `Subject<CT \| undefined>` | `new Subject<CT \| undefined>()` | Allows messaging state to consumer w/o closing the dialog. |
| [shown](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/modalref.ts#L21-L21>) | `ReplaySubject<ElementRef<any>>` | `new ReplaySubject<ElementRef>(1)` | Emits the modal element reference when it is shown. |

#### Accessors

| Name | Type | Description |
| --- | --- | --- |
| [content](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/modalref.ts#L46-L48>) (readonly) | `T` |  |

#### Methods

##### messageOrHide

[Source for messageOrHide](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/modalref.ts#L71-L77>)

When `data.disableAutoHide` is set, messages the `reason`, otherwise calls [hide](<index.html#t:ModalRef.hide>).

```
messageOrHide(reason?: CT): void
```

#### Parameters

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [reason](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/modalref.ts#L71-L71>) (optional) | `CT` |  |  |

**Returns:** [void](<https://www.typescriptlang.org/docs/handbook/2/functions.html#void>)

##### setInput

[Source for setInput](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/modalref.ts#L51-L51>)

Set the input of a component shown in the modal.

```
setInput(input: string, value: unknown): void
```

#### Parameters

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [input](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/modalref.ts#L51-L51>) | `string` |  |  |
| [value](<https://github.com/siemens/element/blob/main/projects/element-ng/modal/modalref.ts#L51-L51>) | `unknown` |  |  |

**Returns:** [void](<https://www.typescriptlang.org/docs/handbook/2/functions.html#void>)

### [SiColumnSelectionDialogConfig](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L36-L52>)

**Kind:** interface

```
import type { SiColumnSelectionDialogConfig } from '@siemens/element-ng/column-selection-dialog';
```

```
interface SiColumnSelectionDialogConfig
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [a11yItemMovedMessage](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L50-L50>) (optional) | `TranslatableString` |  |
| [a11yItemNotMovedMessage](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L51-L51>) (optional) | `TranslatableString` |  |
| [bodyTitle](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L38-L38>) | `TranslatableString` |  |
| [cancelBtnName](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L40-L40>) (optional) | `TranslatableString` |  |
| [columns](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L46-L46>) | `Column[]` |  |
| [columnVisibilityConfigurable](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L44-L44>) (optional) | `boolean` |  |
| [heading](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L37-L37>) | `TranslatableString` |  |
| [hiddenText](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L42-L42>) (optional) | `TranslatableString` |  |
| [listAriaLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L48-L48>) (optional) | `TranslatableString` |  |
| [renameInputAriaLabel](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L49-L49>) (optional) | `TranslatableString` |  |
| [restoreEnabled](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L45-L45>) (optional) | `boolean` |  |
| [restoreToDefaultBtnName](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L41-L41>) (optional) | `TranslatableString` |  |
| [submitBtnName](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L39-L39>) (optional) | `TranslatableString` |  |
| [translationParams](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L47-L47>) (optional) | `{ [key: string]: any; }` |  |
| [visibleText](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L43-L43>) (optional) | `TranslatableString` |  |

### [ActionDialogBase](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L19-L33>)

**Kind:** interface

Base type for all action dialogs

```
interface ActionDialogBase<TResult>
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [delayDismiss](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L32-L32>) (optional) | `((result: TResult) => Observable<TResult>)` | Callback for delaying dismiss with a progress indicator until the returned [Observable](<https://rxjs.dev/api/index/class/Observable>) emits. |
| [heading](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L23-L23>) (optional) | `TranslatableString` | The heading. |
| [icon](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L25-L25>) (optional) | `string` | Icon displayed in the heading. |
| [message](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L21-L21>) (optional) | `TranslatableString` | The message. |
| [translationParams](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L27-L27>) (optional) | `Record<string, any>` | Parameters for the translate pipe. |

### [AlertDialog](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L36-L40>)

**Kind:** interface

```
import type { AlertDialog } from '@siemens/element-ng/action-modal';
```

An action dialog showing an alert

```
interface AlertDialog extends ActionDialogBase<AlertDialogResult>
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [confirmBtnName](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L39-L39>) (optional) | `TranslatableString` | Label of the confirmation button. |
| [delayDismiss](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L32-L32>) (optional, inherited) | `((result: "confirm") => Observable<"confirm">)` | Callback for delaying dismiss with a progress indicator until the returned [Observable](<https://rxjs.dev/api/index/class/Observable>) emits.<br><br>Inherited from [ActionDialogBase\<"confirm"\>](<index.html#t:ActionDialogBase>) |
| [heading](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L23-L23>) (optional, inherited) | `TranslatableString` | The heading.<br><br>Inherited from [ActionDialogBase\<"confirm"\>](<index.html#t:ActionDialogBase>) |
| [icon](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L25-L25>) (optional, inherited) | `string` | Icon displayed in the heading.<br><br>Inherited from [ActionDialogBase\<"confirm"\>](<index.html#t:ActionDialogBase>) |
| [message](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L21-L21>) (optional, inherited) | `TranslatableString` | The message.<br><br>Inherited from [ActionDialogBase\<"confirm"\>](<index.html#t:ActionDialogBase>) |
| [translationParams](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L27-L27>) (optional, inherited) | `Record<string, any>` | Parameters for the translate pipe.<br><br>Inherited from [ActionDialogBase\<"confirm"\>](<index.html#t:ActionDialogBase>) |
| [type](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L37-L37>) | `"alert"` |  |

### [AlertDialogResult](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L8-L8>)

**Kind:** type alias

```
import type { AlertDialogResult } from '@siemens/element-ng/action-modal';
```

```
type AlertDialogResult = 'confirm'
```

### [ConfirmationDialog](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L43-L49>)

**Kind:** interface

```
import type { ConfirmationDialog } from '@siemens/element-ng/action-modal';
```

An action dialog for a confirmation.

```
interface ConfirmationDialog extends ActionDialogBase<ConfirmationDialogResult>
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [confirmBtnName](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L46-L46>) (optional) | `TranslatableString` | Label of the confirmation button. |
| [declineBtnName](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L48-L48>) (optional) | `TranslatableString` | Label of the decline button. |
| [delayDismiss](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L32-L32>) (optional, inherited) | `((result: ConfirmationDialogResult) => Observable<ConfirmationDialogResult>)` | Callback for delaying dismiss with a progress indicator until the returned [Observable](<https://rxjs.dev/api/index/class/Observable>) emits.<br><br>Inherited from [ActionDialogBase\<ConfirmationDialogResult\>](<index.html#t:ActionDialogBase>) |
| [heading](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L23-L23>) (optional, inherited) | `TranslatableString` | The heading.<br><br>Inherited from [ActionDialogBase\<ConfirmationDialogResult\>](<index.html#t:ActionDialogBase>) |
| [icon](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L25-L25>) (optional, inherited) | `string` | Icon displayed in the heading.<br><br>Inherited from [ActionDialogBase\<ConfirmationDialogResult\>](<index.html#t:ActionDialogBase>) |
| [message](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L21-L21>) (optional, inherited) | `TranslatableString` | The message.<br><br>Inherited from [ActionDialogBase\<ConfirmationDialogResult\>](<index.html#t:ActionDialogBase>) |
| [translationParams](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L27-L27>) (optional, inherited) | `Record<string, any>` | Parameters for the translate pipe.<br><br>Inherited from [ActionDialogBase\<ConfirmationDialogResult\>](<index.html#t:ActionDialogBase>) |
| [type](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L44-L44>) | `"confirmation"` |  |

### [ConfirmationDialogResult](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L12-L12>)

**Kind:** type alias

```
import type { ConfirmationDialogResult } from '@siemens/element-ng/action-modal';
```

```
type ConfirmationDialogResult = 'confirm' | 'decline'
```

### [EditDiscardDialog](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L52-L66>)

**Kind:** interface

```
import type { EditDiscardDialog } from '@siemens/element-ng/action-modal';
```

An action dialog for an edit/discard prompt.

```
interface EditDiscardDialog extends ActionDialogBase<EditDiscardDialogResult>
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [cancelBtnName](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L61-L61>) (optional) | `TranslatableString` | Label of the cancel button. |
| [delayDismiss](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L32-L32>) (optional, inherited) | `((result: EditDiscardDialogResult) => Observable<EditDiscardDialogResult>)` | Callback for delaying dismiss with a progress indicator until the returned [Observable](<https://rxjs.dev/api/index/class/Observable>) emits.<br><br>Inherited from [ActionDialogBase\<EditDiscardDialogResult\>](<index.html#t:ActionDialogBase>) |
| [disableSave](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L55-L55>) (optional) | `boolean` | Whether to disable the save button. |
| [disableSaveDiscardBtnName](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L65-L65>) (optional) | `TranslatableString` | Label of the discard button when [disableSave](<index.html#t:EditDiscardDialog.disableSave>) is set. |
| [disableSaveMessage](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L63-L63>) (optional) | `TranslatableString` | Message when [disableSave](<index.html#t:EditDiscardDialog.disableSave>) is set. |
| [discardBtnName](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L59-L59>) (optional) | `TranslatableString` | Label of the discard button. |
| [heading](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L23-L23>) (optional, inherited) | `TranslatableString` | The heading.<br><br>Inherited from [ActionDialogBase\<EditDiscardDialogResult\>](<index.html#t:ActionDialogBase>) |
| [icon](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L25-L25>) (optional, inherited) | `string` | Icon displayed in the heading.<br><br>Inherited from [ActionDialogBase\<EditDiscardDialogResult\>](<index.html#t:ActionDialogBase>) |
| [message](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L21-L21>) (optional, inherited) | `TranslatableString` | The message.<br><br>Inherited from [ActionDialogBase\<EditDiscardDialogResult\>](<index.html#t:ActionDialogBase>) |
| [saveBtnName](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L57-L57>) (optional) | `TranslatableString` | Label of the save button. |
| [translationParams](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L27-L27>) (optional, inherited) | `Record<string, any>` | Parameters for the translate pipe.<br><br>Inherited from [ActionDialogBase\<EditDiscardDialogResult\>](<index.html#t:ActionDialogBase>) |
| [type](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L53-L53>) | `"edit-discard"` |  |

### [EditDiscardDialogResult](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L10-L10>)

**Kind:** type alias

```
import type { EditDiscardDialogResult } from '@siemens/element-ng/action-modal';
```

```
type EditDiscardDialogResult = 'save' | 'discard' | 'cancel'
```

### [DeleteConfirmationDialog](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L69-L75>)

**Kind:** interface

```
import type { DeleteConfirmationDialog } from '@siemens/element-ng/action-modal';
```

An action dialog for a delete confirmation.

```
interface DeleteConfirmationDialog extends ActionDialogBase<DeleteConfirmationDialogResult>
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [cancelBtnName](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L74-L74>) (optional) | `TranslatableString` | Label of the cancel button. |
| [delayDismiss](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L32-L32>) (optional, inherited) | `((result: DeleteConfirmationDialogResult) => Observable<DeleteConfirmationDialogResult>)` | Callback for delaying dismiss with a progress indicator until the returned [Observable](<https://rxjs.dev/api/index/class/Observable>) emits.<br><br>Inherited from [ActionDialogBase\<DeleteConfirmationDialogResult\>](<index.html#t:ActionDialogBase>) |
| [deleteBtnName](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L72-L72>) (optional) | `TranslatableString` | Label of the delete button. |
| [heading](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L23-L23>) (optional, inherited) | `TranslatableString` | The heading.<br><br>Inherited from [ActionDialogBase\<DeleteConfirmationDialogResult\>](<index.html#t:ActionDialogBase>) |
| [icon](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L25-L25>) (optional, inherited) | `string` | Icon displayed in the heading.<br><br>Inherited from [ActionDialogBase\<DeleteConfirmationDialogResult\>](<index.html#t:ActionDialogBase>) |
| [message](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L21-L21>) (optional, inherited) | `TranslatableString` | The message.<br><br>Inherited from [ActionDialogBase\<DeleteConfirmationDialogResult\>](<index.html#t:ActionDialogBase>) |
| [translationParams](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L27-L27>) (optional, inherited) | `Record<string, any>` | Parameters for the translate pipe.<br><br>Inherited from [ActionDialogBase\<DeleteConfirmationDialogResult\>](<index.html#t:ActionDialogBase>) |
| [type](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L70-L70>) | `"delete-confirm"` |  |

### [DeleteConfirmationDialogResult](<https://github.com/siemens/element/blob/main/projects/element-ng/action-modal/si-action-dialog.types.ts#L14-L14>)

**Kind:** type alias

```
import type { DeleteConfirmationDialogResult } from '@siemens/element-ng/action-modal';
```

```
type DeleteConfirmationDialogResult = 'delete' | 'cancel'
```

### [TranslatableString](<https://github.com/siemens/element/blob/main/projects/element-translate-ng/translate-types/global.types.ts#L18-L18>)

**Kind:** type alias

```
import type { TranslatableString } from '@siemens/element-translate-ng/translate-types';
```

Represents a translatable string. This can either be a translation key, e.g. `ACTIONS.EDIT` that will be automatically translated when displayed on the UI or a pre-translated string, e.g. `Edit`. Equivalent to a normal string in usage and functionality.

```
type TranslatableString = string & Translatable
```

### [ColumnSelectionDialogResultType](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L70-L70>)

**Kind:** type alias

```
import type { ColumnSelectionDialogResultType } from '@siemens/element-ng/column-selection-dialog';
```

Emit type of dialog actions.

`ok` : Emitted when user submits. `cancel` : Emitted when user clicks cancel. `instant` : Emitted when visibility or place of a row changes.

`instant` type is used to reflect the ui changes real time even before closing the dialog.

```
type ColumnSelectionDialogResultType = 'ok' | 'cancel' | 'instant' | 'restoreDefault'
```

### [Column](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L7-L34>)

**Kind:** interface

```
import type { Column } from '@siemens/element-ng/column-selection-dialog';
```

```
interface Column
```

#### Properties

| Name | Type | Description |
| --- | --- | --- |
| [disabled](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L29-L29>) | `boolean` | If true, the column is disabled and cannot be interacted with. This means, the user cannot change any of the column options like the visibility etc. |
| [draggable](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L23-L23>) | `boolean` | If true, the order of the column can be changed by dragging it to another position. |
| [editable](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L33-L33>) (optional) | `boolean` | If true, the [title](<index.html#t:Column.title>) can be renamed. |
| [id](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L11-L11>) | `string` | Unique id |
| [title](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L15-L15>) | `string` | Title of the column. |
| [visible](<https://github.com/siemens/element/blob/main/projects/element-ng/column-selection-dialog/si-column-selection-dialog.types.ts#L19-L19>) | `boolean` | Decides if the column is visible to the user. |
