Merge branch 'Development' of https://gitlab.eudat.eu/dmp/OpenAIRE-EUDAT-DMP-service-pilot into Development
# Conflicts: # dmp-frontend/src/app/ui/user-guide/user-guide-content/user-guide-content.component.tsAdminTemplateRedesign
commit
f94d4bad2b
@ -0,0 +1,39 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { MatomoInjector, MatomoTracker } from 'ngx-matomo';
|
||||
import { AuthService } from '../auth/auth.service';
|
||||
import { ConfigurationService } from '../configuration/configuration.service';
|
||||
|
||||
@Injectable()
|
||||
export class MatomoService {
|
||||
|
||||
constructor(
|
||||
private configurationService: ConfigurationService,
|
||||
private matomoInjector: MatomoInjector,
|
||||
private matomoTracker: MatomoTracker,
|
||||
private authService: AuthService
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
init() {
|
||||
if (this.configurationService.matomoEnabled) {
|
||||
this.matomoInjector.init(this.configurationService.matomoSiteUrl, this.configurationService.matomoSiteId);
|
||||
}
|
||||
}
|
||||
|
||||
trackPageView(customTitle?: string): void {
|
||||
if (this.configurationService.matomoEnabled) {
|
||||
var principal = this.authService.current();
|
||||
this.matomoTracker.setUserId(principal ? principal.id : null);
|
||||
this.matomoTracker.trackPageView(customTitle);
|
||||
}
|
||||
}
|
||||
|
||||
trackSiteSearch(keyword: string, category?: string, resultsCount?: number): void {
|
||||
if (this.configurationService.matomoEnabled) {
|
||||
var principal = this.authService.current();
|
||||
this.matomoTracker.setUserId(principal ? principal.id : null);
|
||||
this.matomoTracker.trackSiteSearch(keyword, category, resultsCount);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,19 +1,22 @@
|
||||
import { FormGroup } from '@angular/forms';
|
||||
import { FieldDataEditorModel } from './field-data-editor-model';
|
||||
import { DatePickerFieldData, ExternalDatasetsFieldData, DataRepositoriesFieldData } from '../../../../../core/model/dataset-profile-definition/field-data/field-data';
|
||||
import { DataRepositoriesFieldData } from '../../../../../core/model/dataset-profile-definition/field-data/field-data';
|
||||
|
||||
export class DataRepositoriesDataEditorModel extends FieldDataEditorModel<DataRepositoriesDataEditorModel> {
|
||||
public label: string;
|
||||
public multiAutoComplete: boolean;
|
||||
|
||||
buildForm(disabled: boolean = false, skipDisable: Array<String> = []): FormGroup {
|
||||
const formGroup = this.formBuilder.group({
|
||||
label: [{ value: this.label, disabled: (disabled && !skipDisable.includes('DataRepositoriesDataEditorModel.label')) }]
|
||||
label: [{ value: this.label, disabled: (disabled && !skipDisable.includes('ServicesDataEditorModel.label')) }],
|
||||
multiAutoComplete: [{ value: this.multiAutoComplete, disabled: (disabled && !skipDisable.includes('ServicesDataEditorModel.multiAutoComplete')) }]
|
||||
});
|
||||
return formGroup;
|
||||
}
|
||||
|
||||
fromModel(item: DataRepositoriesFieldData): DataRepositoriesDataEditorModel {
|
||||
this.label = item.label;
|
||||
this.multiAutoComplete = item.multiAutoComplete;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
@ -1,19 +1,22 @@
|
||||
import { FormGroup } from '@angular/forms';
|
||||
import { FieldDataEditorModel } from './field-data-editor-model';
|
||||
import { DatePickerFieldData, ExternalDatasetsFieldData } from '../../../../../core/model/dataset-profile-definition/field-data/field-data';
|
||||
import { ExternalDatasetsFieldData } from '../../../../../core/model/dataset-profile-definition/field-data/field-data';
|
||||
|
||||
export class ExternalDatasetsDataEditorModel extends FieldDataEditorModel<ExternalDatasetsDataEditorModel> {
|
||||
public label: string;
|
||||
public multiAutoComplete: boolean;
|
||||
|
||||
buildForm(disabled: boolean = false, skipDisable: Array<String> = []): FormGroup {
|
||||
const formGroup = this.formBuilder.group({
|
||||
label: [{ value: this.label, disabled: (disabled && !skipDisable.includes('ExternalDatasetsDataEditorModel.label')) }]
|
||||
label: [{ value: this.label, disabled: (disabled && !skipDisable.includes('ServicesDataEditorModel.label')) }],
|
||||
multiAutoComplete: [{ value: this.multiAutoComplete, disabled: (disabled && !skipDisable.includes('ServicesDataEditorModel.multiAutoComplete')) }]
|
||||
});
|
||||
return formGroup;
|
||||
}
|
||||
|
||||
fromModel(item: ExternalDatasetsFieldData): ExternalDatasetsDataEditorModel {
|
||||
this.label = item.label;
|
||||
this.multiAutoComplete = item.multiAutoComplete;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
@ -1,19 +1,22 @@
|
||||
import { FormGroup } from '@angular/forms';
|
||||
import { FieldDataEditorModel } from './field-data-editor-model';
|
||||
import { DatePickerFieldData, ExternalDatasetsFieldData, DataRepositoriesFieldData, RegistriesFieldData } from '../../../../../core/model/dataset-profile-definition/field-data/field-data';
|
||||
import { RegistriesFieldData } from '../../../../../core/model/dataset-profile-definition/field-data/field-data';
|
||||
|
||||
export class RegistriesDataEditorModel extends FieldDataEditorModel<RegistriesDataEditorModel> {
|
||||
public label: string;
|
||||
public multiAutoComplete: boolean;
|
||||
|
||||
buildForm(disabled: boolean = false, skipDisable: Array<String> = []): FormGroup {
|
||||
const formGroup = this.formBuilder.group({
|
||||
label: [{ value: this.label, disabled: (disabled && !skipDisable.includes('RegistriesDataEditorModel.label')) }]
|
||||
label: [{ value: this.label, disabled: (disabled && !skipDisable.includes('ServicesDataEditorModel.label')) }],
|
||||
multiAutoComplete: [{ value: this.multiAutoComplete, disabled: (disabled && !skipDisable.includes('ServicesDataEditorModel.multiAutoComplete')) }]
|
||||
});
|
||||
return formGroup;
|
||||
}
|
||||
|
||||
fromModel(item: RegistriesFieldData): RegistriesDataEditorModel {
|
||||
this.label = item.label;
|
||||
this.multiAutoComplete = item.multiAutoComplete;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
@ -1,19 +1,22 @@
|
||||
import { FormGroup } from '@angular/forms';
|
||||
import { FieldDataEditorModel } from './field-data-editor-model';
|
||||
import { DatePickerFieldData, ExternalDatasetsFieldData, DataRepositoriesFieldData, RegistriesFieldData, ServicesFieldData } from '../../../../../core/model/dataset-profile-definition/field-data/field-data';
|
||||
import { ServicesFieldData } from '../../../../../core/model/dataset-profile-definition/field-data/field-data';
|
||||
|
||||
export class ServicesDataEditorModel extends FieldDataEditorModel<ServicesDataEditorModel> {
|
||||
public label: string;
|
||||
public multiAutoComplete: boolean;
|
||||
|
||||
buildForm(disabled: boolean = false, skipDisable: Array<String> = []): FormGroup {
|
||||
const formGroup = this.formBuilder.group({
|
||||
label: [{ value: this.label, disabled: (disabled && !skipDisable.includes('ServicesDataEditorModel.label')) }]
|
||||
label: [{ value: this.label, disabled: (disabled && !skipDisable.includes('ServicesDataEditorModel.label')) }],
|
||||
multiAutoComplete: [{ value: this.multiAutoComplete, disabled: (disabled && !skipDisable.includes('ServicesDataEditorModel.multiAutoComplete')) }]
|
||||
});
|
||||
return formGroup;
|
||||
}
|
||||
|
||||
fromModel(item: ServicesFieldData): ServicesDataEditorModel {
|
||||
this.label = item.label;
|
||||
this.multiAutoComplete = item.multiAutoComplete;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,12 @@
|
||||
<div class="row" *ngIf="form.get('data')">
|
||||
<h5 style="font-weight: bold" class="col-12">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-DATE-PICKER-TITLE'
|
||||
| translate}}</h5>
|
||||
<mat-checkbox class="col-auto" [formControl]="this.form.get('data').get('multiAutoComplete')">
|
||||
{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-MULTIPLE-AUTOCOMPLETE' | translate}}
|
||||
</mat-checkbox>
|
||||
<mat-form-field class="col-12">
|
||||
<input matInput type="string"
|
||||
placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-CHECKBOX-PLACEHOLDER' | translate}}"
|
||||
[formControl]="form.get('data').get('label')">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,9 +1,13 @@
|
||||
<div class="row" *ngIf="form.get('data')">
|
||||
<h5 style="font-weight: bold" class="col-12">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-DATE-PICKER-TITLE'
|
||||
| translate}}</h5>
|
||||
<mat-checkbox class="col-auto" [formControl]="this.form.get('data').get('multiAutoComplete')">
|
||||
{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-MULTIPLE-AUTOCOMPLETE' | translate}}
|
||||
</mat-checkbox>
|
||||
|
||||
<mat-form-field class="col-12">
|
||||
<input matInput type="string"
|
||||
placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-CHECKBOX-PLACEHOLDER' | translate}}"
|
||||
[formControl]="form.get('data').get('label')">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,9 +1,13 @@
|
||||
<div class="row" *ngIf="form.get('data')">
|
||||
<h5 style="font-weight: bold" class="col-12">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-DATE-PICKER-TITLE'
|
||||
| translate}}</h5>
|
||||
<mat-checkbox class="col-auto" [formControl]="this.form.get('data').get('multiAutoComplete')">
|
||||
{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-MULTIPLE-AUTOCOMPLETE' | translate}}
|
||||
</mat-checkbox>
|
||||
|
||||
<mat-form-field class="col-12">
|
||||
<input matInput type="string"
|
||||
placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-CHECKBOX-PLACEHOLDER' | translate}}"
|
||||
[formControl]="form.get('data').get('label')">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,9 +1,12 @@
|
||||
<div class="row" *ngIf="form.get('data')">
|
||||
<h5 style="font-weight: bold" class="col-12">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-DATE-PICKER-TITLE'
|
||||
| translate}}</h5>
|
||||
<mat-checkbox class="col-auto" [formControl]="this.form.get('data').get('multiAutoComplete')">
|
||||
{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-MULTIPLE-AUTOCOMPLETE' | translate}}
|
||||
</mat-checkbox>
|
||||
<mat-form-field class="col-12">
|
||||
<input matInput type="string"
|
||||
placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-CHECKBOX-PLACEHOLDER' | translate}}"
|
||||
[formControl]="form.get('data').get('label')">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,9 +1,12 @@
|
||||
<div class="row" *ngIf="form.get('data')">
|
||||
<h5 style="font-weight: bold" class="col-12">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-DATE-PICKER-TITLE'
|
||||
| translate}}</h5>
|
||||
<mat-checkbox class="col-auto" [formControl]="this.form.get('data').get('multiAutoComplete')">
|
||||
{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-MULTIPLE-AUTOCOMPLETE' | translate}}
|
||||
</mat-checkbox>
|
||||
<mat-form-field class="col-12">
|
||||
<input matInput type="string"
|
||||
placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-CHECKBOX-PLACEHOLDER' | translate}}"
|
||||
[formControl]="form.get('data').get('label')">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,9 +1,12 @@
|
||||
<div class="row" *ngIf="form.get('data')">
|
||||
<h5 style="font-weight: bold" class="col-12">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-DATE-PICKER-TITLE'
|
||||
| translate}}</h5>
|
||||
<mat-checkbox class="col-auto" [formControl]="this.form.get('data').get('multiAutoComplete')">
|
||||
{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-MULTIPLE-AUTOCOMPLETE' | translate}}
|
||||
</mat-checkbox>
|
||||
<mat-form-field class="col-12">
|
||||
<input matInput type="string"
|
||||
placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-CHECKBOX-PLACEHOLDER' | translate}}"
|
||||
[formControl]="form.get('data').get('label')">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue