|
|
|
@ -70,7 +70,7 @@ |
|
|
|
multiple="multiple" |
|
|
|
class="form-select form-control" |
|
|
|
> |
|
|
|
@for (options of options$ | asnyc; track option.value) { |
|
|
|
@for (option of options$ | async; track option.value) { |
|
|
|
<option [ngValue]="option.value"> |
|
|
|
{{ option.key }} |
|
|
|
</option> |
|
|
|
@ -165,173 +165,6 @@ |
|
|
|
</div> |
|
|
|
</ng-container> |
|
|
|
|
|
|
|
<!-- <ng-container |
|
|
|
[ngSwitch]="getComponent(prop)" |
|
|
|
*abpPermission="prop.permission; runChangeDetection: false" |
|
|
|
> |
|
|
|
<ng-template ngSwitchCase="template"> |
|
|
|
<ng-container *ngComponentOutlet="prop.template; injector: injectorForCustomComponent"> |
|
|
|
</ng-container> |
|
|
|
</ng-template> |
|
|
|
|
|
|
|
<div [ngClass]="containerClassName" class="mb-2"> |
|
|
|
<ng-template ngSwitchCase="input"> |
|
|
|
<ng-template [ngTemplateOutlet]="label"></ng-template> |
|
|
|
<input |
|
|
|
#field |
|
|
|
[id]="prop.id" |
|
|
|
[formControlName]="prop.name" |
|
|
|
[autocomplete]="prop.autocomplete" |
|
|
|
[type]="getType(prop)" |
|
|
|
[abpDisabled]="disabled" |
|
|
|
[readonly]="readonly" |
|
|
|
class="form-control" |
|
|
|
/> |
|
|
|
</ng-template> |
|
|
|
|
|
|
|
<ng-template ngSwitchCase="hidden"> |
|
|
|
<input [formControlName]="prop.name" type="hidden" /> |
|
|
|
</ng-template> |
|
|
|
|
|
|
|
<ng-template ngSwitchCase="checkbox"> |
|
|
|
<div class="form-check" validationTarget> |
|
|
|
<input |
|
|
|
#field |
|
|
|
[id]="prop.id" |
|
|
|
[formControlName]="prop.name" |
|
|
|
[abpDisabled]="disabled" |
|
|
|
type="checkbox" |
|
|
|
class="form-check-input" |
|
|
|
/> |
|
|
|
<ng-template |
|
|
|
[ngTemplateOutlet]="label" |
|
|
|
[ngTemplateOutletContext]="{ $implicit: 'form-check-label' }" |
|
|
|
></ng-template> |
|
|
|
</div> |
|
|
|
</ng-template> |
|
|
|
|
|
|
|
<ng-template ngSwitchCase="select"> |
|
|
|
<ng-template [ngTemplateOutlet]="label"></ng-template> |
|
|
|
<select |
|
|
|
#field |
|
|
|
[id]="prop.id" |
|
|
|
[formControlName]="prop.name" |
|
|
|
[abpDisabled]="disabled" |
|
|
|
class="form-select form-control" |
|
|
|
> |
|
|
|
@for (option of options$ | async; track option.value) { |
|
|
|
<option [ngValue]="option.value"> |
|
|
|
{{ option.key }} |
|
|
|
</option> |
|
|
|
} |
|
|
|
</select> |
|
|
|
</ng-template> |
|
|
|
|
|
|
|
<ng-template ngSwitchCase="multiselect"> |
|
|
|
<ng-template [ngTemplateOutlet]="label"></ng-template> |
|
|
|
<select |
|
|
|
#field |
|
|
|
[id]="prop.id" |
|
|
|
[formControlName]="prop.name" |
|
|
|
[abpDisabled]="disabled" |
|
|
|
multiple="multiple" |
|
|
|
class="form-select form-control" |
|
|
|
> |
|
|
|
@for (options of options$ | asnyc; track option.value) { |
|
|
|
<option [ngValue]="option.value"> |
|
|
|
{{ option.key }} |
|
|
|
</option> |
|
|
|
} |
|
|
|
</select> |
|
|
|
</ng-template> |
|
|
|
|
|
|
|
<ng-template ngSwitchCase="typeahead"> |
|
|
|
<ng-template [ngTemplateOutlet]="label"></ng-template> |
|
|
|
<div #typeahead class="position-relative" validationStyle validationTarget> |
|
|
|
<input |
|
|
|
#field |
|
|
|
[id]="prop.id" |
|
|
|
[autocomplete]="prop.autocomplete" |
|
|
|
[abpDisabled]="disabled" |
|
|
|
[ngbTypeahead]="search" |
|
|
|
[editable]="false" |
|
|
|
[inputFormatter]="typeaheadFormatter" |
|
|
|
[resultFormatter]="typeaheadFormatter" |
|
|
|
[ngModelOptions]="{ standalone: true }" |
|
|
|
[(ngModel)]="typeaheadModel" |
|
|
|
(selectItem)="setTypeaheadValue($event.item)" |
|
|
|
(blur)="setTypeaheadValue(typeaheadModel)" |
|
|
|
[class.is-invalid]="typeahead.classList.contains('is-invalid')" |
|
|
|
class="form-control" |
|
|
|
/> |
|
|
|
<input [formControlName]="prop.name" type="hidden" /> |
|
|
|
</div> |
|
|
|
</ng-template> |
|
|
|
|
|
|
|
<ng-template ngSwitchCase="date"> |
|
|
|
<ng-template [ngTemplateOutlet]="label"></ng-template> |
|
|
|
<input |
|
|
|
[id]="prop.id" |
|
|
|
[formControlName]="prop.name" |
|
|
|
(click)="datepicker.open()" |
|
|
|
(keyup.space)="datepicker.open()" |
|
|
|
ngbDatepicker |
|
|
|
#datepicker="ngbDatepicker" |
|
|
|
type="text" |
|
|
|
class="form-control" |
|
|
|
/> |
|
|
|
</ng-template> |
|
|
|
|
|
|
|
<ng-template ngSwitchCase="time"> |
|
|
|
<ng-template [ngTemplateOutlet]="label"></ng-template> |
|
|
|
<ngb-timepicker [formControlName]="prop.name"></ngb-timepicker> |
|
|
|
</ng-template> |
|
|
|
|
|
|
|
<ng-template ngSwitchCase="dateTime"> |
|
|
|
<ng-template [ngTemplateOutlet]="label"></ng-template> |
|
|
|
<abp-extensible-date-time-picker [prop]="prop" [meridian]="meridian$ | async" /> |
|
|
|
</ng-template> |
|
|
|
|
|
|
|
<ng-template ngSwitchCase="textarea"> |
|
|
|
<ng-template [ngTemplateOutlet]="label"></ng-template> |
|
|
|
<textarea |
|
|
|
#field |
|
|
|
[id]="prop.id" |
|
|
|
[formControlName]="prop.name" |
|
|
|
[abpDisabled]="disabled" |
|
|
|
[readonly]="readonly" |
|
|
|
class="form-control" |
|
|
|
></textarea> |
|
|
|
</ng-template> |
|
|
|
|
|
|
|
<ng-template ngSwitchCase="passwordinputgroup"> |
|
|
|
<ng-template [ngTemplateOutlet]="label"></ng-template> |
|
|
|
<div class="input-group form-group" validationTarget> |
|
|
|
<input |
|
|
|
class="form-control" |
|
|
|
[id]="prop.id" |
|
|
|
[formControlName]="prop.name" |
|
|
|
[abpShowPassword]="showPassword" |
|
|
|
/> |
|
|
|
<button class="btn btn-secondary" type="button" (click)="showPassword = !showPassword"> |
|
|
|
<i |
|
|
|
class="fa" |
|
|
|
aria-hidden="true" |
|
|
|
[ngClass]="{ |
|
|
|
'fa-eye-slash': !showPassword, |
|
|
|
'fa-eye': showPassword |
|
|
|
}" |
|
|
|
></i> |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
</ng-template> |
|
|
|
|
|
|
|
@if (prop.formText) { |
|
|
|
<small class="text-muted d-block">{{ prop.formText | abpLocalization }}</small> |
|
|
|
} |
|
|
|
</div> |
|
|
|
</ng-container> --> |
|
|
|
|
|
|
|
<ng-template #label let-classes> |
|
|
|
<label [htmlFor]="prop.id" [ngClass]="classes || 'form-label'"> |
|
|
|
@if (prop.displayTextResolver) { |
|
|
|
|