SiActionDialogService documentation¶
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.
Attributes and Methods¶
| Name | Type | Description |
|---|---|---|
| showActionDialog() ¶ | <T extends ActionDialog>(dialog: T, diOptions?: ModalDependencyInjectionOptions) => Observable<ActionDialogReturnType<T>> | Shows an action dialog Returns: Observable for the result of the dialog. Need to Parameters
|
Types Documentation¶
All possible action dialogs.import type { ActionDialog } from '@siemens/element-ng/action-modal';
Returns the return value type for the given action dialog type ActionDialogReturnType
type ActionDialogReturnType<T extends ActionDialogBase<any>> = T extends AlertDialog ? AlertDialogResult : T extends ConfirmationDialog ? ConfirmationDialogResult : T extends EditDiscardDialog ? EditDiscardDialogResult : T extends DeleteConfirmationDialog ? DeleteConfirmationDialogResult : never ¶ import type { ActionDialogReturnType } from '@siemens/element-ng/action-modal';
Optional environment Injector. Optional element Injector. Additional providers for the modal. providers ? : import type { ModalDependencyInjectionOptions } from '@siemens/element-ng/modal';
StaticProvider[] ¶
Base type for all action dialogs Callback for delaying dismiss with a progress indicator until the returned Observable emits. delayDismiss ? : The heading. Icon displayed in the heading. The message. Parameters for the translate pipe. translationParams ? :
((result: TResult) => Observable<TResult>) ¶ Record<string, any> ¶
An action dialog showing an alert Label of the confirmation button. Callback for delaying dismiss with a progress indicator until the returned Observable emits. delayDismiss ? : The heading. heading ? : Icon displayed in the heading. icon ? : The message. message ? : Parameters for the translate pipe. translationParams ? : import type { AlertDialog } from '@siemens/element-ng/action-modal';
((result: "confirm") => Observable<"confirm">) Inherited from ActionDialogBase<"confirm"> ¶ TranslatableString Inherited from ActionDialogBase<"confirm"> ¶ string Inherited from ActionDialogBase<"confirm"> ¶ TranslatableString Inherited from ActionDialogBase<"confirm"> ¶ Record<string, any> Inherited from ActionDialogBase<"confirm"> ¶
import type { AlertDialogResult } from '@siemens/element-ng/action-modal';
An action dialog for a confirmation. Label of the confirmation button. Label of the decline button. Callback for delaying dismiss with a progress indicator until the returned Observable emits. delayDismiss ? : The heading. heading ? : Icon displayed in the heading. icon ? : The message. message ? : Parameters for the translate pipe. translationParams ? : import type { ConfirmationDialog } from '@siemens/element-ng/action-modal';
((result: ConfirmationDialogResult) => Observable<ConfirmationDialogResult>) Inherited from ActionDialogBase<ConfirmationDialogResult> ¶ TranslatableString Inherited from ActionDialogBase<ConfirmationDialogResult> ¶ string Inherited from ActionDialogBase<ConfirmationDialogResult> ¶ TranslatableString Inherited from ActionDialogBase<ConfirmationDialogResult> ¶ Record<string, any> Inherited from ActionDialogBase<ConfirmationDialogResult> ¶
import type { ConfirmationDialogResult } from '@siemens/element-ng/action-modal';
An action dialog for an edit/discard prompt. Label of the cancel button. Callback for delaying dismiss with a progress indicator until the returned Observable emits. delayDismiss ? : Whether to disable the save button. disableSave ? : Label of the discard button when disableSave is set. Message when disableSave is set. Label of the discard button. The heading. heading ? : Icon displayed in the heading. icon ? : The message. message ? : Label of the save button. Parameters for the translate pipe. translationParams ? : import type { EditDiscardDialog } from '@siemens/element-ng/action-modal';
((result: EditDiscardDialogResult) => Observable<EditDiscardDialogResult>) Inherited from ActionDialogBase<EditDiscardDialogResult> ¶ boolean ¶ TranslatableString Inherited from ActionDialogBase<EditDiscardDialogResult> ¶ string Inherited from ActionDialogBase<EditDiscardDialogResult> ¶ TranslatableString Inherited from ActionDialogBase<EditDiscardDialogResult> ¶ Record<string, any> Inherited from ActionDialogBase<EditDiscardDialogResult> ¶
import type { EditDiscardDialogResult } from '@siemens/element-ng/action-modal';
An action dialog for a delete confirmation. Label of the cancel button. Callback for delaying dismiss with a progress indicator until the returned Observable emits. delayDismiss ? : Label of the delete button. The heading. heading ? : Icon displayed in the heading. icon ? : The message. message ? : Parameters for the translate pipe. translationParams ? : import type { DeleteConfirmationDialog } from '@siemens/element-ng/action-modal';
((result: DeleteConfirmationDialogResult) => Observable<DeleteConfirmationDialogResult>) Inherited from ActionDialogBase<DeleteConfirmationDialogResult> ¶ TranslatableString Inherited from ActionDialogBase<DeleteConfirmationDialogResult> ¶ string Inherited from ActionDialogBase<DeleteConfirmationDialogResult> ¶ TranslatableString Inherited from ActionDialogBase<DeleteConfirmationDialogResult> ¶ Record<string, any> Inherited from ActionDialogBase<DeleteConfirmationDialogResult> ¶
import type { DeleteConfirmationDialogResult } from '@siemens/element-ng/action-modal';
Represents a translatable string. This can either be a translation key, e.g. import type { TranslatableString } from '@siemens/element-translate-ng/translate-types';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.
Except where otherwise noted, content on this site is licensed under MIT License.