2019-01-18 18:03:45 +01:00
|
|
|
<div class="row" *ngIf="form.get('data')">
|
|
|
|
|
2019-03-26 16:09:02 +01:00
|
|
|
<h5 style="font-weight: bold" class="col-auto">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-TITLE' | translate}}</h5>
|
|
|
|
<mat-checkbox class="col-auto" [formControl]="this.form.get('data').get('multiAutoComplete')">
|
2019-03-26 17:03:09 +01:00
|
|
|
{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-MULTIPLE-AUTOCOMPLETE' | translate}}
|
2019-03-26 16:09:02 +01:00
|
|
|
</mat-checkbox>
|
2019-01-18 18:03:45 +01:00
|
|
|
|
|
|
|
<mat-form-field class="col-12">
|
2021-02-17 17:39:07 +01:00
|
|
|
<mat-label>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-PLACEHOLDER' | translate}}</mat-label>
|
|
|
|
<input matInput type="string"
|
2019-03-26 16:09:02 +01:00
|
|
|
[formControl]="form.get('data').get('label')">
|
2019-01-18 18:03:45 +01:00
|
|
|
</mat-form-field>
|
2020-05-25 16:14:42 +02:00
|
|
|
|
2023-10-06 17:07:58 +02:00
|
|
|
|
2021-03-08 10:24:30 +01:00
|
|
|
<h6 class="col-12" style="font-weight: bold">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-SOURCE-TITLE' | translate}}</h6>
|
|
|
|
<div class="col-12 d-flex align-items-center" style="margin-bottom: 1em;">
|
2023-10-06 17:07:58 +02:00
|
|
|
<button mat-raised-button
|
|
|
|
type="button"
|
2021-03-04 13:38:46 +01:00
|
|
|
(click)="addSource()"
|
2021-03-08 10:24:30 +01:00
|
|
|
style="margin-right: 2em;"
|
2021-03-04 13:38:46 +01:00
|
|
|
>
|
2021-03-08 10:24:30 +01:00
|
|
|
<!-- [ngClass]="{'text-danger':form.get('data').errors?.emptyArray && form.touched}" -->
|
2021-03-04 13:38:46 +01:00
|
|
|
{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-ADD_SOURCE' | translate}}
|
2023-10-06 17:07:58 +02:00
|
|
|
|
2021-03-08 10:24:30 +01:00
|
|
|
</button>
|
2023-10-06 17:07:58 +02:00
|
|
|
|
2021-03-08 10:24:30 +01:00
|
|
|
<!-- *ngIf="form.get('data').errors?.emptyArray && form.get('data').touched" -->
|
|
|
|
<div class="d-flex" *ngIf="form.get('data').errors?.emptyArray && form.get('data').touched">
|
2023-10-06 17:07:58 +02:00
|
|
|
<mat-icon
|
2021-03-08 10:24:30 +01:00
|
|
|
class="text-danger"
|
2021-03-04 13:38:46 +01:00
|
|
|
matTooltip="At least one source must be provided."
|
|
|
|
>warning_amber</mat-icon>
|
2021-03-08 10:24:30 +01:00
|
|
|
<small class="text-danger">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.ERROR-MESSAGES.FIELD-OTHER-SOURCES-REQUIRED'| translate}}</small>
|
|
|
|
</div>
|
2023-10-06 17:07:58 +02:00
|
|
|
|
2021-03-08 10:24:30 +01:00
|
|
|
</div>
|
2021-03-04 13:38:46 +01:00
|
|
|
</div>
|
2023-10-06 17:07:58 +02:00
|
|
|
|
2020-05-25 16:14:42 +02:00
|
|
|
<div *ngFor="let singleForm of multiForm.controls; let i = index" class="row">
|
2023-10-06 17:07:58 +02:00
|
|
|
<!-- <mat-form-field class="col-12">
|
2020-05-25 16:14:42 +02:00
|
|
|
<mat-label>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-TYPE' | translate}}</mat-label>
|
|
|
|
<mat-select [formControl]="singleForm.get('autoCompleteType')">
|
|
|
|
<mat-option [value]="0">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-TYPE-UNCACHED' | translate}}</mat-option>
|
|
|
|
<mat-option [value]="1">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-TYPE-CACHED' | translate}}</mat-option>
|
|
|
|
</mat-select>
|
2023-10-06 17:07:58 +02:00
|
|
|
</mat-form-field> -->
|
|
|
|
<mat-form-field class="col-md-6">
|
|
|
|
<mat-label>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-AUTH-METHOD' | translate}}</mat-label>
|
|
|
|
<mat-select [formControl]="singleForm.get('method')">
|
|
|
|
<mat-option *ngFor="let method of htmlMethods | keyvalue" [value]="method.value">{{method.value}}</mat-option>
|
|
|
|
</mat-select>
|
2020-05-25 16:14:42 +02:00
|
|
|
</mat-form-field>
|
|
|
|
|
2023-10-06 17:07:58 +02:00
|
|
|
<mat-form-field class="col-md-6">
|
2021-02-17 17:39:07 +01:00
|
|
|
<mat-label>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-URL' | translate}}</mat-label>
|
2021-03-27 18:52:53 +01:00
|
|
|
<input matInput [formControl]="singleForm.get('url')">
|
|
|
|
<mat-error *ngIf="singleForm.get('url').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
2020-05-25 16:14:42 +02:00
|
|
|
</mat-form-field>
|
|
|
|
<mat-form-field class="col-md-3">
|
2021-02-17 17:39:07 +01:00
|
|
|
<mat-label>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-OPTIONS-ROOT' | translate}}</mat-label>
|
|
|
|
<input matInput
|
2021-03-27 18:52:53 +01:00
|
|
|
[formControl]="singleForm.get('optionsRoot')">
|
|
|
|
<mat-error *ngIf="singleForm.get('optionsRoot').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
2020-05-25 16:14:42 +02:00
|
|
|
</mat-form-field>
|
|
|
|
<mat-form-field class="col-md-3">
|
2021-02-17 17:39:07 +01:00
|
|
|
<mat-label>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-LABEL' | translate}}</mat-label>
|
2021-03-27 18:52:53 +01:00
|
|
|
<input matInput [formControl]="singleForm.get('autoCompleteOptions').get('label')">
|
|
|
|
<mat-error *ngIf="singleForm.get('autoCompleteOptions').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
2020-05-25 16:14:42 +02:00
|
|
|
</mat-form-field>
|
|
|
|
<mat-form-field class="col-md-3">
|
2021-02-17 17:39:07 +01:00
|
|
|
<mat-label>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-VALUE' | translate}}</mat-label>
|
2021-03-27 18:52:53 +01:00
|
|
|
<input matInput [formControl]="singleForm.get('autoCompleteOptions').get('value')">
|
2020-05-25 16:14:42 +02:00
|
|
|
</mat-form-field>
|
|
|
|
<mat-form-field class="col-md-3">
|
2021-02-17 17:39:07 +01:00
|
|
|
<mat-label>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-SOURCE' | translate}}</mat-label>
|
2021-03-27 18:52:53 +01:00
|
|
|
<input matInput [formControl]="singleForm.get('autoCompleteOptions').get('source')">
|
|
|
|
<mat-error *ngIf="singleForm.get('autoCompleteOptions').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
2020-05-25 16:14:42 +02:00
|
|
|
</mat-form-field>
|
2023-10-06 17:07:58 +02:00
|
|
|
<mat-checkbox class="col-12" [formControl]="singleForm.get('hasAuth')">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-HAS-AUTH' | translate}}</mat-checkbox>
|
2023-10-10 11:10:52 +02:00
|
|
|
<div *ngIf="singleForm.get('hasAuth').value === true" class="row">
|
2023-10-06 17:07:58 +02:00
|
|
|
<mat-form-field class="col-md-6">
|
|
|
|
<mat-label>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-AUTH-METHOD' | translate}}</mat-label>
|
|
|
|
<mat-select [formControl]="singleForm.get('auth').get('method')">
|
|
|
|
<mat-option *ngFor="let method of htmlMethods | keyvalue" [value]="method.value">{{method.value}}</mat-option>
|
|
|
|
</mat-select>
|
|
|
|
</mat-form-field>
|
|
|
|
<mat-form-field class="col-md-6">
|
|
|
|
<mat-label>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-URL' | translate}}</mat-label>
|
|
|
|
<input matInput [formControl]="singleForm.get('auth').get('url')">
|
|
|
|
<mat-error *ngIf="singleForm.get('auth').get('url').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
</mat-form-field>
|
|
|
|
<mat-form-field class="col-md-6">
|
|
|
|
<mat-label>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-AUTH-TYPE' | translate}}</mat-label>
|
|
|
|
<mat-select [formControl]="singleForm.get('auth').get('type')">
|
|
|
|
<mat-option *ngFor="let type of authTypes | keyvalue" [value]="type.value">{{type.value}}</mat-option>
|
|
|
|
</mat-select>
|
|
|
|
</mat-form-field>
|
|
|
|
<mat-form-field class="col-md-6">
|
|
|
|
<mat-label>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-OPTIONS-ROOT' | translate}}</mat-label>
|
|
|
|
<input matInput [formControl]="singleForm.get('auth').get('path')">
|
|
|
|
<mat-error *ngIf="singleForm.get('auth').get('path').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
</mat-form-field>
|
|
|
|
<mat-form-field class="col-md-12">
|
|
|
|
<mat-label>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-AUTH-BODY' | translate}}</mat-label>
|
|
|
|
<textarea matInput [formControl]="singleForm.get('auth').get('body')"></textarea>
|
|
|
|
<mat-error *ngIf="singleForm.get('auth').get('body').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
</mat-form-field>
|
|
|
|
</div>
|
|
|
|
|
2020-05-25 16:14:42 +02:00
|
|
|
<button mat-button type="button" (click)="removeSource(i)"><mat-icon>delete</mat-icon></button>
|
|
|
|
</div>
|
|
|
|
|