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 | 1x | /**
* Copyright (c) Siemens 2016 - 2025
* SPDX-License-Identifier: MIT
*/
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { FieldType, FieldTypeConfig, FormlyModule } from '@ngx-formly/core';
import {
SiPasswordStrengthComponent,
SiPasswordStrengthDirective
} from '@siemens/element-ng/password-strength';
import { SiValidationErrorIdPipe } from '../../utils';
@Component({
selector: 'si-formly-password',
imports: [
FormsModule,
ReactiveFormsModule,
FormlyModule,
SiPasswordStrengthComponent,
SiPasswordStrengthDirective,
SiValidationErrorIdPipe
],
templateUrl: './si-formly-password.component.html',
changeDetection: ChangeDetectionStrategy.OnPush
})
export class SiFormlyPasswordComponent extends FieldType<FieldTypeConfig> {
/*
Sample config:
"password.field": {
"type": "string",
"title": "Password",
"widget": {
"formlyConfig": {
"type": "password",
"props": {
"minLength": 5,
"upperCase": true,
"loweCase": true,
"digits": true,
"special": true
}
}
}
}
*/
}
|