|
|
|
@ -23,12 +23,12 @@ |
|
|
|
<fieldset *ngFor="let source of sources" [ngClass]="{'fields-group': settings.showGroupTitle}"> |
|
|
|
<legend class="group-title" *ngIf="settings.showGroupTitle">{{ getGroupTitle(source.datasource) }} |
|
|
|
</legend> |
|
|
|
<div fxLayout="row" class="layout-wrap" |
|
|
|
<div class="tb-multiple-input-layout layout-wrap" |
|
|
|
[ngClass]="{'vertical-alignment': isVerticalAlignment || changeAlignment}"> |
|
|
|
<div *ngFor="let key of visibleKeys(source)" |
|
|
|
[ngStyle]="{width: (isVerticalAlignment || changeAlignment) ? '100%' : inputWidthSettings}"> |
|
|
|
<div class="input-field" *ngIf="key.settings.dataKeyValueType === 'string'"> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-form-field class="mat-block" appearance="outline"> |
|
|
|
<mat-label>{{key.label}}</mat-label> |
|
|
|
<input matInput |
|
|
|
formControlName="{{key.formId}}" |
|
|
|
@ -50,7 +50,7 @@ |
|
|
|
</div> |
|
|
|
<div class="input-field" *ngIf="key.settings.dataKeyValueType === 'double' || |
|
|
|
key.settings.dataKeyValueType === 'integer'"> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-form-field class="mat-block" appearance="outline"> |
|
|
|
<mat-label>{{key.label}}</mat-label> |
|
|
|
<input matInput |
|
|
|
formControlName="{{key.formId}}" |
|
|
|
@ -86,7 +86,7 @@ |
|
|
|
</mat-checkbox> |
|
|
|
</div> |
|
|
|
<div class="input-field" *ngIf="key.settings.dataKeyValueType === 'JSON'"> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-form-field class="mat-block" appearance="outline"> |
|
|
|
<mat-label>{{key.label}}</mat-label> |
|
|
|
<input |
|
|
|
matInput |
|
|
|
@ -134,7 +134,7 @@ |
|
|
|
<div class="input-field mat-block date-time-input" *ngIf="(key.settings.dataKeyValueType === 'dateTime') || |
|
|
|
(key.settings.dataKeyValueType === 'date') || |
|
|
|
(key.settings.dataKeyValueType === 'time')" fxLayout="column"> |
|
|
|
<mat-form-field> |
|
|
|
<mat-form-field appearance="outline"> |
|
|
|
<mat-label>{{key.label}}</mat-label> |
|
|
|
<mat-datetimepicker-toggle [for]="datePicker" matPrefix></mat-datetimepicker-toggle> |
|
|
|
<mat-datetimepicker #datePicker type="{{datePickerType(key.settings.dataKeyValueType)}}" |
|
|
|
@ -155,7 +155,7 @@ |
|
|
|
</mat-form-field> |
|
|
|
</div> |
|
|
|
<div class="input-field" *ngIf="key.settings.dataKeyValueType === 'select'"> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-form-field class="mat-block" appearance="outline"> |
|
|
|
<mat-label>{{key.label}}</mat-label> |
|
|
|
<mat-select formControlName="{{key.formId}}" |
|
|
|
[required]="key.settings.required" |
|
|
|
@ -172,30 +172,46 @@ |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="tb-form-row space-between color-picker-input" *ngIf="key.settings.dataKeyValueType === 'color'"> |
|
|
|
<div class="label-container"> |
|
|
|
<ng-container *ngIf="key.settings.icon || key.settings.safeCustomIcon"> |
|
|
|
<mat-icon *ngIf="!key.settings.safeCustomIcon; else customToggleIcon">{{key.settings.icon}}</mat-icon> |
|
|
|
<ng-template #customToggleIcon> |
|
|
|
<img class="mat-icon" [src]="key.settings.safeCustomIcon" alt="icon"> |
|
|
|
</ng-template> |
|
|
|
</ng-container> |
|
|
|
{{key.label}} |
|
|
|
</div> |
|
|
|
<tb-color-input asBoxInput |
|
|
|
[required]="key.settings.required" |
|
|
|
[requiredText]="getErrorMessageText(key.settings, 'required')" |
|
|
|
openOnInput |
|
|
|
formControlName="{{key.formId}}"> |
|
|
|
</tb-color-input> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</fieldset> |
|
|
|
</div> |
|
|
|
<div class="mat-padding" fxLayout="row" fxLayoutAlign="end center" |
|
|
|
<div class="mat-padding tb-multiple-input--buttons-container" |
|
|
|
*ngIf="entityDetected && isAllParametersValid && settings.showActionButtons"> |
|
|
|
<button mat-button color="primary" type="button" |
|
|
|
(click)="discardAll()" style="max-height: 50px; margin-right:20px;" |
|
|
|
(click)="discardAll()" class="tb-multiple-input--buttons-container__button" |
|
|
|
[disabled]="!multipleInputFormGroup.dirty"> |
|
|
|
{{ resetButtonLabel }} |
|
|
|
</button> |
|
|
|
<button mat-button mat-raised-button color="primary" type="submit" |
|
|
|
style="max-height: 50px; margin-right:20px;" |
|
|
|
class="tb-multiple-input--buttons-container__button" |
|
|
|
[disabled]="!multipleInputFormGroup.dirty || multipleInputFormGroup.invalid"> |
|
|
|
{{ saveButtonLabel }} |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
<div class="tb-multiple-input__errors" fxLayout="column" fxLayoutAlign="center center" style="height: 100%;" |
|
|
|
*ngIf="(!entityDetected || !isAllParametersValid) && datasourceDetected"> |
|
|
|
<div style="text-align: center; font-size: 18px; color: #a0a0a0;" [fxHide]="entityDetected"> |
|
|
|
<div class="tb-multiple-input--errors-container" *ngIf="(!entityDetected || !isAllParametersValid) && datasourceDetected"> |
|
|
|
<div class="tb-multiple-input--errors-container__error" [fxHide]="entityDetected"> |
|
|
|
{{ 'widgets.input-widgets.no-entity-selected' | translate }} |
|
|
|
</div> |
|
|
|
<div style="text-align: center; font-size: 18px; color: #a0a0a0;" |
|
|
|
[fxShow]="entityDetected && !isAllParametersValid"> |
|
|
|
<div class="tb-multiple-input--errors-container__error" [fxShow]="entityDetected && !isAllParametersValid"> |
|
|
|
{{ 'widgets.input-widgets.not-allowed-entity' | translate }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|