Skip to content

SiChangePasswordComponent documentation

import { SiChangePasswordComponent } from '@siemens/element-ng/landing-page';

A component for changing user passwords with strength validation and policy enforcement.

This component provides a form for users to change their password, including password strength indicators, policy validation, and confirmation fields. It supports custom password policies and displays inline notifications for alerts.

Example:

<si-change-password
  [passwordStrength]="passwordPolicy"
  [passwordPolicyContent]="policyTemplate"
  [changePasswordAlert]="alertConfig"
  (changePasswordRequested)="handlePasswordChange($event)"
  (back)="handleBack()">
</si-change-password>

Input Properties

Name Type Default Description
backButtonLabel
TranslatableString $localize`:@@SI_CHANGE_PASSWORD.BACK:Back`

Description of back button.

changeButtonLabel
TranslatableString $localize`:@@SI_CHANGE_PASSWORD.CHANGE:Change`

Label for change password button.

changePasswordAlert
AlertConfig | undefined

Config to enable/disable password related error/alerts.

confirmPasswordLabel
TranslatableString $localize`:@@SI_CHANGE_PASSWORD.CONFIRM_PASSWORD:Confirm password`

Label for confirm password input field.

disableChange
boolean false

Disables the change password button.

heading
TranslatableString $localize`:@@SI_CHANGE_PASSWORD.CHANGE_PASSWORD:Change password`

Change password heading.

newPasswordLabel
TranslatableString $localize`:@@SI_CHANGE_PASSWORD.NEW_PASSWORD:New password`

Label for new password input field.

passwordPolicyContent required
string | TemplateRef<unknown>

Description of the password policy requirements.

passwordPolicyTitle
TranslatableString $localize`:@@SI_CHANGE_PASSWORD.PASSWORD_POLICY:Password policy`

Title of the password policy.

passwordStrength required
PasswordPolicy

Description of the password policy requirements.

subheading
TranslatableString $localize`:@@SI_CHANGE_PASSWORD.CHANGE_FACTORY_PASSWORD:Default password must be changed`

Short description of the action to perform.

Output Properties

Name Type Description
back
void

Emits on back click.

changePasswordRequested
ChangePassword

Emits password on change event.

passwordStrengthChanged
number | void

The number indicating the number of rules which still can be met. (-2 --> 2 rules are still unmet, 0 --> all met)

valueChanged
ChangePassword

Emits password on value change.

Types Documentation

import type { AlertConfig } from '@siemens/element-ng/landing-page';

import type { PasswordPolicy } from '@siemens/element-ng/password-strength';
Properties
  • Whether to allow whitespaces. By default whitespaces are not allowed.

    allowWhitespace ? : boolean

  • Define if digits are required in password.

    digits : boolean

  • Define if lowercase characters are required in password.

    lowercase : boolean

  • Define minimal number of characters.

    minLength : number

  • Minimum required policies for valid password. When set to a number greater than 0, defines the number of policies that must be met for the password to be valid. E.g. when set to 3 and the policies uppercase/lowercase/digits/special are all set and the password contains 3 out of these four, the password will be valid.

    minRequiredPolicies ? : number

  • Define if special characters are required in password.

    special : boolean

  • Define if uppercase characters are required in password.

    uppercase : boolean

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.

import type { ChangePassword } from '@siemens/element-ng/landing-page';

StatusType

'success' | 'info' | 'warning' | 'danger' | 'caution' | 'critical'
type alias
import type { StatusType } from '@siemens/element-ng/common';

import type { Link } from '@siemens/element-ng/link';


Except where otherwise noted, content on this site is licensed under MIT License.