UNPKG

@pega/dx-component-builder-sdk

Version:

Utility for building custom UI components

28 lines (27 loc) 1.09 kB
<div *ngIf="displayMode$; else noDisplayMode"> <component-mapper *ngIf="bVisible$ !== false" name="FieldValueList" [props]="{ label$, value$, displayMode$ }"></component-mapper> </div> <ng-template #noDisplayMode> <div *ngIf="!bReadonly$ && bHasForm$; else noEdit"> <div [formGroup]="formGroup$" *ngIf="bVisible$"> <mat-form-field class="psdk-full-width" subscriptSizing="dynamic" [hintLabel]="helperText"> <mat-label>{{ label$ }}</mat-label> <input matInput [placeholder]="placeholder" type="email" [value]="value$" [required]="bRequired$" [formControl]="fieldControl" [attr.data-test-id]="testId" (change)="fieldOnChange($event)" (blur)="fieldOnBlur($event)" /> <mat-error *ngIf="fieldControl.invalid">{{ getErrorMessage() }}</mat-error> </mat-form-field> </div> </div> </ng-template> <ng-template #noEdit> <component-mapper *ngIf="bVisible$ !== false" name="Text" [props]="{ pConn$, formatAs$: 'text' }"></component-mapper> </ng-template>