Revision 60274
Added by Konstantinos Triantafyllou over 3 years ago
input.component.ts | ||
---|---|---|
17 | 17 |
template: ` |
18 | 18 |
<div *ngIf="label && type != 'checkbox'" class="uk-text-bold uk-form-label uk-margin-small-bottom">{{label + (required ? ' *' : '')}}</div> |
19 | 19 |
<div *ngIf="hint" class="uk-margin-bottom uk-text-small uk-form-hint">{{hint}}</div> |
20 |
<div class="uk-grid uk-flex uk-flex-middle" uk-grid> |
|
20 |
<div class="uk-grid uk-flex uk-flex-middle" [class.uk-grid-small]="gridSmall" uk-grid>
|
|
21 | 21 |
<ng-content></ng-content> |
22 |
<div [class.uk-hidden]="hideControl" class="uk-width-expand@m uk-position-relative" [class.uk-flex-first]="!extraLeft">
|
|
22 |
<div [class.uk-hidden]="hideControl" class="uk-width-expand uk-position-relative" [class.uk-flex-first]="!extraLeft"> |
|
23 | 23 |
<ng-template [ngIf]="icon && formControl.enabled"> |
24 | 24 |
<span class="uk-text-muted" [ngClass]="iconLeft?('left'):'right'"> |
25 | 25 |
<icon [name]="icon"></icon> |
... | ... | |
52 | 52 |
</mat-form-field> |
53 | 53 |
</div> |
54 | 54 |
</ng-template> |
55 |
<span *ngIf="formControl.invalid && formControl.errors.error" class="uk-text-small uk-text-danger">{{formControl.errors.error}}</span> |
|
56 |
<span *ngIf="warning" class="uk-text-small uk-text-warning">{{warning}}</span> |
|
55 |
<span *ngIf="formControl.invalid && formControl.errors.error" class="uk-text-danger input-message">{{formControl.errors.error}}</span> |
|
56 |
<span *ngIf="warning" class="uk-text-warning input-message">{{warning}}</span> |
|
57 |
<span *ngIf="note" class="input-message">{{note}}</span> |
|
57 | 58 |
</div> |
58 | 59 |
</div> |
59 | 60 |
<mat-checkbox *ngIf="type === 'checkbox'" [formControl]="formControl">{{label}}</mat-checkbox> |
... | ... | |
70 | 71 |
@Input('placeholder') placeholder = ''; |
71 | 72 |
@ViewChild('select') select: MatSelect; |
72 | 73 |
@Input() extraLeft: boolean = true; |
74 |
@Input() gridSmall: boolean = false; |
|
73 | 75 |
@Input() hideControl: boolean = false; |
74 | 76 |
@Input() icon: string = null; |
75 | 77 |
@Input() iconLeft: boolean = false; |
76 | 78 |
@Input() warning: string = null; |
79 |
@Input() note: string = null; |
|
77 | 80 |
public required: boolean = false; |
78 | 81 |
private initValue: any; |
79 | 82 |
private subscriptions: any[] = []; |
Also available in: Unified diff
[Library | Trunk]: Create subscriber invite and subscribers components.