Merge branch 'AdminTemplateRedesign' into WizardDescriptionRefactor

This commit is contained in:
Kristian Ntavidi 2021-03-29 18:44:14 +03:00
commit 94ecf92a09
52 changed files with 1877 additions and 647 deletions

View File

@ -1,7 +1,7 @@
import { FieldDataEditorModel } from './field-data-editor-model'; import { FieldDataEditorModel } from './field-data-editor-model';
import { DatasetProfileComboBoxType } from '@app/core/common/enum/dataset-profile-combo-box-type'; import { DatasetProfileComboBoxType } from '@app/core/common/enum/dataset-profile-combo-box-type';
import { FieldDataOptionEditorModel } from './field-data-option-editor-model'; import { FieldDataOptionEditorModel } from './field-data-option-editor-model';
import { FormGroup } from '@angular/forms'; import { FormGroup, Validators } from '@angular/forms';
import { AutoCompleteFieldData, AutoCompleteSingleData } from '@app/core/model/dataset-profile-definition/field-data/field-data'; import { AutoCompleteFieldData, AutoCompleteSingleData } from '@app/core/model/dataset-profile-definition/field-data/field-data';
export class AutoCompleteSingleDataEditorModel extends FieldDataEditorModel<AutoCompleteSingleDataEditorModel> { export class AutoCompleteSingleDataEditorModel extends FieldDataEditorModel<AutoCompleteSingleDataEditorModel> {
@ -16,8 +16,8 @@ export class AutoCompleteSingleDataEditorModel extends FieldDataEditorModel<Auto
buildForm(disabled: boolean = false, skipDisable: Array<String> = []): FormGroup { buildForm(disabled: boolean = false, skipDisable: Array<String> = []): FormGroup {
const formGroup = this.formBuilder.group({ const formGroup = this.formBuilder.group({
label: [{ value: this.label, disabled: (disabled && !skipDisable.includes('AutoCompleteSingleDataEditorModel.label')) }], label: [{ value: this.label, disabled: (disabled && !skipDisable.includes('AutoCompleteSingleDataEditorModel.label')) }],
url: [{ value: this.url, disabled: (disabled && !skipDisable.includes('AutoCompleteSingleDataEditorModel.url')) }], url: [{ value: this.url, disabled: (disabled && !skipDisable.includes('AutoCompleteSingleDataEditorModel.url')) },[Validators.required]],
optionsRoot: [{ value: this.optionsRoot, disabled: (disabled && !skipDisable.includes('AutoCompleteSingleDataEditorModel.optionsRoot')) }], optionsRoot: [{ value: this.optionsRoot, disabled: (disabled && !skipDisable.includes('AutoCompleteSingleDataEditorModel.optionsRoot')) }, [Validators.required]],
autoCompleteType: [{ value: this.autoCompleteType, disabled: (disabled && !skipDisable.includes('AutoCompleteSingleDataEditorModel.autoCompleteType')) }] autoCompleteType: [{ value: this.autoCompleteType, disabled: (disabled && !skipDisable.includes('AutoCompleteSingleDataEditorModel.autoCompleteType')) }]
}); });
formGroup.addControl('autoCompleteOptions', this.autoCompleteOptions.buildForm(disabled, skipDisable)); formGroup.addControl('autoCompleteOptions', this.autoCompleteOptions.buildForm(disabled, skipDisable));

View File

@ -27,6 +27,9 @@ import { ResearchersDataEditorModel } from './field-data/researchers-data-editor
import { OrganizationsDataEditorModel } from './field-data/organizations-data-editor-models'; import { OrganizationsDataEditorModel } from './field-data/organizations-data-editor-models';
import { DatasetIdentifierDataEditorModel } from './field-data/dataset-identifier-data-editor-models'; import { DatasetIdentifierDataEditorModel } from './field-data/dataset-identifier-data-editor-models';
import { CurrencyDataEditorModel } from './field-data/currency-data-editor-models'; import { CurrencyDataEditorModel } from './field-data/currency-data-editor-models';
import { DatasetProfileComboBoxType } from '@app/core/common/enum/dataset-profile-combo-box-type';
import { EditorCustomValidators } from '../editor/custom-validators/editor-custom-validators';
import { ValidationDataEditorModel } from './field-data/validation-data-editor-models';
export class FieldEditorModel extends BaseFormModel { export class FieldEditorModel extends BaseFormModel {
@ -68,13 +71,14 @@ export class FieldEditorModel extends BaseFormModel {
if (this.viewStyle.renderStyle === 'datePicker') { this.data = new DatePickerDataEditorModel().fromModel(item.data); } if (this.viewStyle.renderStyle === 'datePicker') { this.data = new DatePickerDataEditorModel().fromModel(item.data); }
if (this.viewStyle.renderStyle === 'externalDatasets') { this.data = new ExternalDatasetsDataEditorModel().fromModel(item.data); } if (this.viewStyle.renderStyle === 'externalDatasets') { this.data = new ExternalDatasetsDataEditorModel().fromModel(item.data); }
if (this.viewStyle.renderStyle === 'dataRepositories') { this.data = new DataRepositoriesDataEditorModel().fromModel(item.data); } if (this.viewStyle.renderStyle === 'dataRepositories') { this.data = new DataRepositoriesDataEditorModel().fromModel(item.data); }
if (this.viewStyle.renderStyle === 'registeries') { this.data = new RegistriesDataEditorModel().fromModel(item.data); } if (this.viewStyle.renderStyle === 'registries') { this.data = new RegistriesDataEditorModel().fromModel(item.data); }
if (this.viewStyle.renderStyle === 'services') { this.data = new ServicesDataEditorModel().fromModel(item.data); } if (this.viewStyle.renderStyle === 'services') { this.data = new ServicesDataEditorModel().fromModel(item.data); }
if (this.viewStyle.renderStyle === 'tags') { this.data = new TagsDataEditorModel().fromModel(item.data); } if (this.viewStyle.renderStyle === 'tags') { this.data = new TagsDataEditorModel().fromModel(item.data); }
if (this.viewStyle.renderStyle === 'researchers') { this.data = new ResearchersDataEditorModel().fromModel(item.data); } if (this.viewStyle.renderStyle === 'researchers') { this.data = new ResearchersDataEditorModel().fromModel(item.data); }
if (this.viewStyle.renderStyle === 'organizations') { this.data = new OrganizationsDataEditorModel().fromModel(item.data); } if (this.viewStyle.renderStyle === 'organizations') { this.data = new OrganizationsDataEditorModel().fromModel(item.data); }
if (this.viewStyle.renderStyle === 'datasetIdentifier') { this.data = new DatasetIdentifierDataEditorModel().fromModel(item.data); } if (this.viewStyle.renderStyle === 'datasetIdentifier') { this.data = new DatasetIdentifierDataEditorModel().fromModel(item.data); }
if (this.viewStyle.renderStyle === 'currency') { this.data = new CurrencyDataEditorModel().fromModel(item.data); } if (this.viewStyle.renderStyle === 'currency') { this.data = new CurrencyDataEditorModel().fromModel(item.data); }
if (this.viewStyle.renderStyle === 'validation') { this.data = new ValidationDataEditorModel().fromModel(item.data); }
} }
} }
return this; return this;
@ -96,6 +100,57 @@ export class FieldEditorModel extends BaseFormModel {
if (this.data) { formGroup.addControl('data', this.data.buildForm(disabled, skipDisable)); } if (this.data) { formGroup.addControl('data', this.data.buildForm(disabled, skipDisable)); }
else { formGroup.addControl('data', new WordListFieldDataEditorModel().buildForm(disabled, skipDisable)); } else { formGroup.addControl('data', new WordListFieldDataEditorModel().buildForm(disabled, skipDisable)); }
// //append validators
this._appendCustomValidators(formGroup);
// //setting up listeners
// formGroup.get('viewStyle').valueChanges.subscribe(changes=>{
// // const viewStyleChanges:{cssClass:string, renderStyle: string} = changes;
// this._removeCustomValidators(formGroup);
// this._appendCustomValidators(formGroup);
// })
return formGroup; return formGroup;
} }
private _appendCustomValidators(formGroup: FormGroup){
const renderStyleValue = formGroup.get('viewStyle').get('renderStyle').value;
if(renderStyleValue === 'checkBox'){
formGroup.get('defaultValue').get('value').setValidators(Validators.required);
formGroup.get('defaultValue').get('value').updateValueAndValidity();
}else if(renderStyleValue === 'combobox'){
try{
const comboType = formGroup.get('data').get('type').value;
if(comboType === DatasetProfileComboBoxType.Autocomplete){//As 'Other' in UI
formGroup.get('data').setValidators(EditorCustomValidators.atLeastOneElementListValidator('autoCompleteSingleDataList'));
}else if(comboType === DatasetProfileComboBoxType.WordList){
formGroup.get('data').setValidators(EditorCustomValidators.atLeastOneElementListValidator('options'));
}
}catch(e){
console.error('Error setting validators.');
console.error(e);
}
}else if(renderStyleValue === 'radiobox'){
formGroup.get('data').setValidators(EditorCustomValidators.atLeastOneElementListValidator('options'));
}
formGroup.get('data').updateValueAndValidity();
}
// private _removeCustomValidators(formGroup:FormGroup){
// const renderStyleValue = formGroup.get('viewStyle').get('renderStyle').value;
// if(renderStyleValue != 'checkBox'){
// formGroup.get('defaultValue').get('value').clearValidators();
// }else if(renderStyleValue === 'combobox'){
// formGroup.get('data').clearValidators();
// }
// }
// private _buildData(formGroup: FormGroup){
// }
} }

View File

@ -35,7 +35,7 @@ export class FieldSetEditorModel extends BaseFormModel {
const formGroup = this.formBuilder.group({ const formGroup = this.formBuilder.group({
id: [{ value: this.id, disabled: (disabled && !skipDisable.includes('FieldSetEditorModel.id')) }, [Validators.required, Validators.pattern('^[^<_>]+$')]], id: [{ value: this.id, disabled: (disabled && !skipDisable.includes('FieldSetEditorModel.id')) }, [Validators.required, Validators.pattern('^[^<_>]+$')]],
ordinal: [{ value: this.ordinal, disabled: (disabled && !skipDisable.includes('FieldSetEditorModel.ordinal')) }], ordinal: [{ value: this.ordinal, disabled: (disabled && !skipDisable.includes('FieldSetEditorModel.ordinal')) }],
title: [{ value: this.title, disabled: (disabled && !skipDisable.includes('FieldSetEditorModel.title')) }], title: [{ value: this.title, disabled: (disabled && !skipDisable.includes('FieldSetEditorModel.title')) }, [Validators.required]],
description: [{ value: this.description, disabled: (disabled && !skipDisable.includes('FieldSetEditorModel.description')) }], description: [{ value: this.description, disabled: (disabled && !skipDisable.includes('FieldSetEditorModel.description')) }],
extendedDescription: [{ value: this.extendedDescription, disabled: (disabled && !skipDisable.includes('FieldSetEditorModel.extendedDescription')) }], extendedDescription: [{ value: this.extendedDescription, disabled: (disabled && !skipDisable.includes('FieldSetEditorModel.extendedDescription')) }],
additionalInformation: [{ value: this.additionalInformation, disabled: (disabled && !skipDisable.includes('FieldSetEditorModel.additionalInformation')) }], additionalInformation: [{ value: this.additionalInformation, disabled: (disabled && !skipDisable.includes('FieldSetEditorModel.additionalInformation')) }],

View File

@ -1,6 +1,7 @@
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
import { Section } from '../../../../core/model/admin/dataset-profile/dataset-profile'; import { Section } from '../../../../core/model/admin/dataset-profile/dataset-profile';
import { BaseFormModel } from '../../../../core/model/base-form-model'; import { BaseFormModel } from '../../../../core/model/base-form-model';
import { EditorCustomValidators } from '../editor/custom-validators/editor-custom-validators';
import { FieldSetEditorModel } from './field-set-editor-model'; import { FieldSetEditorModel } from './field-set-editor-model';
export class SectionEditorModel extends BaseFormModel { export class SectionEditorModel extends BaseFormModel {
@ -29,7 +30,7 @@ export class SectionEditorModel extends BaseFormModel {
const formGroup: FormGroup = new FormBuilder().group({ const formGroup: FormGroup = new FormBuilder().group({
id: [{ value: this.id, disabled: (disabled && !skipDisable.includes('SectionEditorModel.id')) }, [Validators.required, Validators.pattern('^[^<_>]+$')]], id: [{ value: this.id, disabled: (disabled && !skipDisable.includes('SectionEditorModel.id')) }, [Validators.required, Validators.pattern('^[^<_>]+$')]],
page: [{ value: this.page, disabled: (disabled && !skipDisable.includes('SectionEditorModel.page')) }, [Validators.required]], page: [{ value: this.page, disabled: (disabled && !skipDisable.includes('SectionEditorModel.page')) }, [Validators.required]],
title: [{ value: this.title, disabled: (disabled && !skipDisable.includes('SectionEditorModel.title')) }], title: [{ value: this.title, disabled: (disabled && !skipDisable.includes('SectionEditorModel.title')) } , [Validators.required]],
description: [{ value: this.description, disabled: (disabled && !skipDisable.includes('SectionEditorModel.description')) }], description: [{ value: this.description, disabled: (disabled && !skipDisable.includes('SectionEditorModel.description')) }],
ordinal: [{ value: this.ordinal, disabled: (disabled && !skipDisable.includes('SectionEditorModel.ordinal')) }, [Validators.required]], ordinal: [{ value: this.ordinal, disabled: (disabled && !skipDisable.includes('SectionEditorModel.ordinal')) }, [Validators.required]],
defaultVisibility: [{ value: this.defaultVisibility, disabled: (disabled && !skipDisable.includes('SectionEditorModel.defaultVisibility')) }] defaultVisibility: [{ value: this.defaultVisibility, disabled: (disabled && !skipDisable.includes('SectionEditorModel.defaultVisibility')) }]
@ -53,6 +54,8 @@ export class SectionEditorModel extends BaseFormModel {
if (!formGroup.controls['defaultVisibility'].value) { formGroup.controls['defaultVisibility'].setValue(true); } if (!formGroup.controls['defaultVisibility'].value) { formGroup.controls['defaultVisibility'].setValue(true); }
formGroup.setValidators(EditorCustomValidators.sectionHasAtLeastOneChildOf('fieldSets','sections'));
formGroup.updateValueAndValidity();
return formGroup; return formGroup;
} }
} }

View File

@ -71,8 +71,8 @@
</mat-form-field> </mat-form-field>
<!-- [appearance]="titleControl.focused? 'legacy':'none'" floatLabel="never" --> <!-- [appearance]="titleControl.focused? 'legacy':'none'" floatLabel="never" -->
<mat-form-field class="col field-title" [appearance]="'none'" floatLabel="never"> <mat-form-field class="col field-title" [appearance]="'none'" floatLabel="never">
<input matInput type="text" placeholder="Title" #titleControl="matInput" <input matInput type="text" [placeholder]="('DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.UNTITLED' |translate)+' '+('DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.QUESTION'| translate)" #titleControl="matInput"
[formControl]="this.form.get('title')" required> [formControl]="this.form.get('title')">
</mat-form-field> </mat-form-field>
</div> </div>
</div> </div>
@ -180,80 +180,20 @@
</div> </div>
</div> </div>
<!-- <div class="col-auto">
<div class="row" class="actions-list bg-white">
<mat-list role="list">
<ng-container *ngIf="!viewOnly">
<h3 matSubheader>Input tools</h3>
<mat-list-item>
<mat-icon matListIcon>folder</mat-icon>
<span matLine (click)="addNewField()" style="cursor: pointer;" >Add Input</span>
</mat-list-item>
<mat-list-item *ngIf="targetField">
<mat-icon matListIcon [ngClass]="{'text-muted':!targetField.get('viewStyle').get('renderStyle').value}"
>visibility_off</mat-icon>
<button matLine class="mat-button" (click)="addVisibilityRule(targetField)" [disabled]="!targetField.get('viewStyle').get('renderStyle').value">
<span>Add Visibility Rule</span>
</button>
</mat-list-item>
</ng-container>
<!-- PREVIEW -->
<mat-list-item>
<mat-checkbox matLine [(ngModel)]="showExtendedDescription">
Extended Description
</mat-checkbox>
</mat-list-item>
<mat-list-item>
<mat-checkbox matLine [(ngModel)]="showAdditionalInfo">
Additional Information
</mat-checkbox>
</mat-list-item>
<h3 matSubheader>Input settings</h3> <div class="col-12" >
<span style="font-weight: bold;">{{'DATASET-PROFILE-EDITOR.ACTIONS.FIELD.PREVIEW' | translate}}</span>
<div class="mt-3" style="margin-right: -15px; margin-left: -15px;" *ngIf="previewForm && form?.get('fields').controls[0].get('viewStyle')?.value.renderStyle">
<mat-list-item> <app-form-section-inner [form]="previewForm">
<mat-checkbox matLine [checked]="isMultiplicityEnabled" (change)="onIsMultiplicityEnabledChange($event)" [disabled]="viewOnly ||!targetField?.get('viewStyle').get('renderStyle').value">
{{'DATASET-PROFILE-EDITOR.STEPS.FORM.COMPOSITE-FIELD.FIELDS.MULTIPLICITY-CHECKBOX' | translate}}
</mat-checkbox>
</mat-list-item>
</app-form-section-inner>
<mat-list-item>
<mat-checkbox matLine [formControl]="this.form.get('hasCommentField')" [disabled]="viewOnly ||!targetField?.get('viewStyle').get('renderStyle').value">
{{'DATASET-PROFILE-EDITOR.STEPS.FORM.COMPOSITE-FIELD.FIELDS.COMMENT-CHECKBOX' | translate}}
</mat-checkbox>
</mat-list-item>
<mat-list-item *ngIf="targetField &&!( targetField?.get('viewStyle').get('renderStyle').value ==viewStyleEnum.CheckBox )">
<mat-checkbox matLine [checked]="targetField.get('validations').value?.includes(validationTypeEnum.Required)" (change)="toggleRequired(targetField, $event)">Make it required</mat-checkbox>
</mat-list-item>
<ng-container *ngIf="!viewOnly">
<h3 matSubheader>Other actions</h3>
<mat-list-item *ngIf="targetField && !viewOnly">
<mat-icon matListIcon>delete</mat-icon>
<span matLine (click)="deleteTargetField()" style="cursor: pointer;">Delete</span>
</mat-list-item>
</ng-container>
</mat-list>
</div> </div>
</div> -->
<hr *ngIf="hasFocus">
</div>
</div> </div>
@ -267,7 +207,7 @@
<li class="list-inline-item" *ngIf="!viewOnly"> <li class="list-inline-item" *ngIf="!viewOnly">
<mat-icon [matMenuTriggerFor]="inputmenu" [matTooltip]="'DATASET-PROFILE-EDITOR.ACTIONS.FIELDSET.ADD-INPUT' | translate">folder</mat-icon> <mat-icon [matMenuTriggerFor]="inputmenu" [matTooltip]="'DATASET-PROFILE-EDITOR.ACTIONS.FIELDSET.ADD-INPUT' | translate">folder</mat-icon>
<mat-menu #inputmenu="matMenu"> <mat-menu #inputmenu="matMenu" [class]="'add_input_menu'">
<!-- <button class="mat-menu-item" (click)="addNewInput(viewTypeEnum.TextArea)">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.TextArea)}}</button> <!-- <button class="mat-menu-item" (click)="addNewInput(viewTypeEnum.TextArea)">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.TextArea)}}</button>
<button class="mat-menu-item" (click)="addNewInput(viewTypeEnum.FreeText)">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.FreeText)}}</button> <button class="mat-menu-item" (click)="addNewInput(viewTypeEnum.FreeText)">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.FreeText)}}</button>
@ -304,39 +244,107 @@
<mat-action-list> <mat-action-list>
<button mat-list-item (click)="addNewInput(viewTypeEnum.TextArea)">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.TextArea)}}</button> <button mat-list-item (click)="addNewInput(viewTypeEnum.TextArea)">
<button mat-list-item (click)="addNewInput(viewTypeEnum.FreeText)">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.FreeText)}}</button>
<img src="/assets/images/editor/icons/text_area.svg" class="input_icon" alt="Text Area icon">
{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.TextArea)}}
</button>
<button mat-list-item (click)="addNewInput(viewTypeEnum.FreeText)">
<img src="/assets/images/editor/icons/free_text.svg" class="input_icon" alt="Free Text icon">
{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.FreeText)}}
</button>
<mat-divider></mat-divider> <mat-divider></mat-divider>
<button mat-list-item (click)="addNewInput(viewTypeEnum.BooleanDecision)">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.BooleanDecision)}}</button> <button mat-list-item (click)="addNewInput(viewTypeEnum.BooleanDecision)">
<button mat-list-item (click)="addNewInput(viewTypeEnum.RadioBox)">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.RadioBox)}}</button> <img src="/assets/images/editor/icons/boolean.svg" class="input_icon" alt="Boolean icon">
<button mat-list-item (click)="addNewInput(viewTypeEnum.Select)">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Select)}}</button> {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.BooleanDecision)}}
<button mat-list-item (click)="addNewInput(viewTypeEnum.CheckBox)">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.CheckBox)}}</button> </button>
<button mat-list-item (click)="addNewInput(viewTypeEnum.RadioBox)">
<img src="/assets/images/editor/icons/radio_box.svg" class="input_icon" alt="RadioBox icon">
{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.RadioBox)}}
</button>
<button mat-list-item (click)="addNewInput(viewTypeEnum.Select)">
<span class="input_icon">
<img src="/assets/images/editor/icons/select.svg" alt="Select icon">
</span>
{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Select)}}
</button>
<button mat-list-item (click)="addNewInput(viewTypeEnum.CheckBox)">
<img src="/assets/images/editor/icons/checkbox.svg" class="input_icon" alt="CheckBox Icon">
{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.CheckBox)}}
</button>
<mat-divider></mat-divider> <mat-divider></mat-divider>
<button mat-list-item (click)="addNewInput(viewTypeEnum.DatePicker)">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.DatePicker)}}</button> <button mat-list-item (click)="addNewInput(viewTypeEnum.DatePicker)">
<button mat-list-item (click)="addNewInput(viewTypeEnum.Currency)">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Currency)}}</button> <img src="/assets/images/editor/icons/date_picker.svg" class="input_icon" alt="DatePicker Icon">
{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.DatePicker)}}
</button>
<button mat-list-item (click)="addNewInput(viewTypeEnum.Currency)">
<img src="/assets/images/editor/icons/currency.svg" class="input_icon" alt="Currency Icon">
{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Currency)}}
</button>
<mat-divider></mat-divider> <mat-divider></mat-divider>
<button mat-list-item (click)="$event.stopPropagation();" style="font-style: italic;">APIs</button> <button mat-list-item (click)="$event.stopPropagation();" style="font-style: italic;">
<img src="/assets/images/editor/icons/api.svg" class="input_icon" alt="APIs icon">
APIs
</button>
<mat-action-list class="ml-4"> <mat-action-list class="ml-4">
<button mat-list-item (click)="addNewInput(viewTypeEnum.Registries)">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Registries)}}</button> <button mat-list-item (click)="addNewInput(viewTypeEnum.Registries)">
<button mat-list-item (click)="addNewInput(viewTypeEnum.Services)">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Services)}}</button> <img src="/assets/images/editor/icons/api_entity.svg" class="input_icon" alt="Registries icon">
<button mat-list-item (click)="addNewInput(viewTypeEnum.Researchers)">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Researchers)}}</button> {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Registries)}}
<button mat-list-item (click)="addNewInput(viewTypeEnum.Organizations)">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Organizations)}}</button> </button>
<button mat-list-item (click)="addNewInput(viewTypeEnum.ExternalDatasets)">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.ExternalDatasets)}}</button> <button mat-list-item (click)="addNewInput(viewTypeEnum.Services)">
<button mat-list-item (click)="addNewInput(viewTypeEnum.DataRepositories)">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.DataRepositories)}}</button> <img src="/assets/images/editor/icons/api_entity.svg" class="input_icon" alt="Services icon">
<button mat-list-item (click)="addNewInput(viewTypeEnum.Other)">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Other)}}</button> {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Services)}}
</button>
<button mat-list-item (click)="addNewInput(viewTypeEnum.Researchers)">
<img src="/assets/images/editor/icons/api_entity.svg" class="input_icon" alt="Researchers icon">
{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Researchers)}}
</button>
<button mat-list-item (click)="addNewInput(viewTypeEnum.Organizations)">
<img src="/assets/images/editor/icons/api_entity.svg" class="input_icon" alt="Organizations icon">
{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Organizations)}}
</button>
<button mat-list-item (click)="addNewInput(viewTypeEnum.ExternalDatasets)">
<img src="/assets/images/editor/icons/api_entity.svg" class="input_icon" alt="External Datasets icon">
{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.ExternalDatasets)}}
</button>
<button mat-list-item (click)="addNewInput(viewTypeEnum.DataRepositories)">
<img src="/assets/images/editor/icons/api_entity.svg" class="input_icon" alt="DataRepositories icon">
{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.DataRepositories)}}
</button>
<button mat-list-item (click)="addNewInput(viewTypeEnum.Other)">
<img src="/assets/images/editor/icons/api_entity.svg" class="input_icon" alt="Other icon">
{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Other)}}
</button>
</mat-action-list> </mat-action-list>
<mat-divider></mat-divider> <mat-divider></mat-divider>
<button mat-list-item (click)="$event.stopPropagation();" style="font-style: italic;">Argos Entities</button> <button mat-list-item (click)="$event.stopPropagation();" style="font-style: italic;">
<img src="/assets/images/editor/icons/argos_entities.svg" class="input_icon" alt="Argos Entities icon">
Argos Entities
</button>
<mat-action-list class="ml-4"> <mat-action-list class="ml-4">
<button mat-list-item (click)="addNewInput(viewTypeEnum.InternalDmpEntities)">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.InternalDmpEntities)}}</button> <button mat-list-item (click)="addNewInput(viewTypeEnum.InternalDmpEntities)">
<button mat-list-item (click)="addNewInput(viewTypeEnum.Tags)">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Tags)}}</button> <img src="/assets/images/editor/icons/api_entity.svg" class="input_icon" alt="Internal Dmp icon">
<button mat-list-item (click)="addNewInput(viewTypeEnum.DatasetIdentifier)">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.DatasetIdentifier)}}</button> {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.InternalDmpEntities)}}
<button mat-list-item (click)="addNewInput(viewTypeEnum.Validation)">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Validation)}}</button> </button>
<button mat-list-item (click)="addNewInput(viewTypeEnum.Tags)">
<img src="/assets/images/editor/icons/api_entity.svg" class="input_icon" alt="Tags icon">
{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Tags)}}
</button>
<button mat-list-item (click)="addNewInput(viewTypeEnum.DatasetIdentifier)">
<img src="/assets/images/editor/icons/api_entity.svg" class="input_icon" alt="Datset Identifier icon">
{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.DatasetIdentifier)}}
</button>
<button mat-list-item (click)="addNewInput(viewTypeEnum.Validation)">
<img src="/assets/images/editor/icons/api_entity.svg" class="input_icon" alt="Validation icon">
{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Validation)}}
</button>
</mat-action-list> </mat-action-list>

View File

@ -93,6 +93,19 @@ $blue-color-light: #5cf7f2;
} }
} }
.input_icon{
width: 14px;
margin-right: 0.5em;
// display: flex;
// align-items: center;
}
::ng-deep .mat-menu-panel{
max-height: 32em;
}
// ::ng-deep .underline-line-field .mat-form-field-appearance-legacy .mat-form-field-wapper{ // ::ng-deep .underline-line-field .mat-form-field-appearance-legacy .mat-form-field-wapper{
// padding-bottom: 1.25em !important; // padding-bottom: 1.25em !important;
// } // }

View File

@ -5,7 +5,7 @@ import { Guid } from '@common/types/guid';
import { RuleEditorModel } from '../../../admin/rule-editor-model'; import { RuleEditorModel } from '../../../admin/rule-editor-model';
import { ValidationType } from '@app/core/common/enum/validation-type'; import { ValidationType } from '@app/core/common/enum/validation-type';
import { MatCheckboxChange } from '@angular/material/checkbox'; import { MatCheckboxChange } from '@angular/material/checkbox';
import { DatasetDescriptionCompositeFieldEditorModel, DatasetDescriptionFieldEditorModel } from '@app/ui/misc/dataset-description-form/dataset-description-form.model'; import { DatasetDescriptionCompositeFieldEditorModel, DatasetDescriptionFieldEditorModel, DatasetDescriptionFormEditorModel, DatasetDescriptionSectionEditorModel } from '@app/ui/misc/dataset-description-form/dataset-description-form.model';
import { DatasetProfileFieldViewStyle } from '@app/core/common/enum/dataset-profile-field-view-style'; import { DatasetProfileFieldViewStyle } from '@app/core/common/enum/dataset-profile-field-view-style';
import { MatDialog } from '@angular/material'; import { MatDialog } from '@angular/material';
import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component'; import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
@ -33,6 +33,15 @@ import { ValidationDataEditorModel } from '../../../admin/field-data/validation-
import { DatasetProfileService } from '@app/core/services/dataset-profile/dataset-profile.service'; import { DatasetProfileService } from '@app/core/services/dataset-profile/dataset-profile.service';
import { OrganizationsDataEditorModel } from '../../../admin/field-data/organizations-data-editor-models'; import { OrganizationsDataEditorModel } from '../../../admin/field-data/organizations-data-editor-models';
import { EditorCustomValidators } from '../../custom-validators/editor-custom-validators'; import { EditorCustomValidators } from '../../custom-validators/editor-custom-validators';
import { Field, FieldSet } from '@app/core/model/admin/dataset-profile/dataset-profile';
import { DatasetProfileComboBoxType } from '@app/core/common/enum/dataset-profile-combo-box-type';
import { DatasetProfileInternalDmpEntitiesType } from '@app/core/common/enum/dataset-profile-internal-dmp-entities-type';
import { AutoCompleteFieldData, BooleanDecisionFieldData, CheckBoxFieldData, CurrencyFieldData, DataRepositoriesFieldData, DatasetIdentifierFieldData, DatePickerFieldData, DmpsAutoCompleteFieldData, ExternalDatasetsFieldData, FreeTextFieldData, OrganizationsFieldData, RadioBoxFieldData, RegistriesFieldData, ResearchersAutoCompleteFieldData, ServicesFieldData, TagsFieldData, TextAreaFieldData, ValidationFieldData, WordListFieldData } from '@app/core/model/dataset-profile-definition/field-data/field-data';
import { CompositeField } from '@app/core/model/dataset-profile-definition/composite-field';
import {Field as FieldDefinition} from '@app/core/model/dataset-profile-definition/field';
import { Subject } from 'rxjs';
import { debounce, debounceTime } from 'rxjs/operators';
import { setUncaughtExceptionCaptureCallback } from 'process';
@Component({ @Component({
selector: 'app-dataset-profile-editor-composite-field-component', selector: 'app-dataset-profile-editor-composite-field-component',
@ -54,7 +63,7 @@ export class DatasetProfileEditorCompositeFieldComponent implements OnInit, OnCh
showAdditionalInfo: boolean = false; showAdditionalInfo: boolean = false;
showExtendedDescription: boolean = false; showExtendedDescription: boolean = false;
previewForm: FormGroup; previewForm: FormGroup = null;
// isComposite = false; // isComposite = false;
// isMultiplicityEnabled = false; // isMultiplicityEnabled = false;
viewStyleEnum = DatasetProfileFieldViewStyle; viewStyleEnum = DatasetProfileFieldViewStyle;
@ -110,45 +119,114 @@ export class DatasetProfileEditorCompositeFieldComponent implements OnInit, OnCh
this.showExtendedDescription = !!this.form.get('extendedDescription').value; this.showExtendedDescription = !!this.form.get('extendedDescription').value;
this.showAdditionalInfo = !!this.form.get('additionalInformation').value; this.showAdditionalInfo = !!this.form.get('additionalInformation').value;
} this.form.valueChanges.subscribe(changes=>{
this.previewForm = null;
this.generatePreviewForm();
generatePreview(){
const editorModel = new DatasetDescriptionCompositeFieldEditorModel();
editorModel.title = this.form.get('title').value;
editorModel.description = this.form.get('description').value;
editorModel.extendedDescription = this.form.get('extendedDescription').value;
editorModel.additionalInformation = this.form.get('additionalInformation').value;
editorModel.hasCommentField = this.form.get('hasCommentField').value;
editorModel.fields = [];
(this.form.get('fields') as FormArray).controls.forEach(field=>{
const fieldEditorModel = new DatasetDescriptionFieldEditorModel();
fieldEditorModel.viewStyle= {
renderStyle: field.get('viewStyle').get('renderStyle').value,
cssClass: null
};
fieldEditorModel.defaultValue = field.get('defaultValue').value;
switch (field.get('viewStyle').get('renderStyle').value) {
case DatasetProfileFieldViewStyle.TextArea:
fieldEditorModel.data = {
label: field.get('data').get('label').value
};
break;
default:
break;
}
editorModel.fields.push(fieldEditorModel);
}); });
this.previewSubject$.pipe(debounceTime(600)).subscribe(model=>{
this.previewForm = model.buildForm();
})
this.previewForm = editorModel.buildForm(); this.generatePreviewForm();
} }
previewSubject$: Subject<DatasetDescriptionSectionEditorModel> = new Subject<DatasetDescriptionSectionEditorModel>();
private generatePreviewForm(){
const formValue:FieldSet = this.form.getRawValue();
const fields:FieldDefinition[] = formValue.fields.map(editorField=>this._fieldToFieldDefinition(editorField));
const compositeField: CompositeField = {
id: formValue.id,
additionalInformation: formValue.additionalInformation,
extendedDescription: formValue.extendedDescription,
numbering:'',
title: formValue.title,
ordinal: formValue.ordinal,
description: formValue.description,
hasCommentField: formValue.hasCommentField,
commentFieldValue: '',
multiplicity: {max:formValue.multiplicity.max, min : formValue.multiplicity.min},
multiplicityItems:null,
fields: fields.map(editorField=>{
return new DatasetDescriptionFieldEditorModel().fromModel(editorField);
})
}
const section = new DatasetDescriptionSectionEditorModel();
section.title = '';
section.numbering = '';
const compositeForm = new DatasetDescriptionCompositeFieldEditorModel().fromModel(compositeField)
section.compositeFields = [compositeForm];
this.previewSubject$.next(section);
}
private _fieldToFieldDefinition(editorField: Field): FieldDefinition{
const field = {
id: editorField.id,
title: '',
page: editorField.page,
numbering:'',
multiplicity:null,
multiplicityItems: null,
viewStyle: editorField.viewStyle,
defaultValue:editorField.defaultValue,
value: editorField.defaultValue.value,
validations: editorField.validations,
} as FieldDefinition;
field.data = editorField.data;
// return new DatasetDescriptionFieldEditorModel().fromModel(field);
return field;
}
// generatePreview(){
// const editorModel = new DatasetDescriptionCompositeFieldEditorModel();
// editorModel.title = this.form.get('title').value;
// editorModel.description = this.form.get('description').value;
// editorModel.extendedDescription = this.form.get('extendedDescription').value;
// editorModel.additionalInformation = this.form.get('additionalInformation').value;
// editorModel.hasCommentField = this.form.get('hasCommentField').value;
// editorModel.fields = [];
// (this.form.get('fields') as FormArray).controls.forEach(field=>{
// const fieldEditorModel = new DatasetDescriptionFieldEditorModel();
// fieldEditorModel.viewStyle= {
// renderStyle: field.get('viewStyle').get('renderStyle').value,
// cssClass: null
// };
// fieldEditorModel.defaultValue = field.get('defaultValue').value;
// switch (field.get('viewStyle').get('renderStyle').value) {
// case DatasetProfileFieldViewStyle.TextArea:
// fieldEditorModel.data = {
// label: field.get('data').get('label').value
// };
// break;
// default:
// break;
// }
// editorModel.fields.push(fieldEditorModel);
// });
// this.previewForm = editorModel.buildForm();
// }
onIsCompositeChange(isComposite: boolean) { onIsCompositeChange(isComposite: boolean) {
if (!isComposite && (<FormArray>this.form.get('fields')).length > 1) { if (!isComposite && (<FormArray>this.form.get('fields')).length > 1) {
for (let i = 0; i < (<FormArray>this.form.get('fields')).length - 1; i++) { for (let i = 0; i < (<FormArray>this.form.get('fields')).length - 1; i++) {
@ -330,119 +408,352 @@ export class DatasetProfileEditorCompositeFieldComponent implements OnInit, OnCh
addNewInput(type: ViewStyleType){ addNewInput(type: ViewStyleType){
const fieldsArray = this.form.get('fields') as FormArray;
let targetOrdinal = fieldsArray.length;
try{
targetOrdinal = fieldsArray.controls.map(control=> control.get('ordinal').value).reduce((a,b)=>Math.max(a,b)) +1;
}catch{
}
const field: FieldEditorModel = new FieldEditorModel();
field.id=Guid.create().toString();
field.ordinal = (this.form.get('fields') as FormArray).length; const field = {
id: Guid.create().toString(),
ordinal: targetOrdinal,
visible:{rules:[],style:null},
validations:[],
viewStyle:{}
const fieldForm = field.buildForm(); } as Field;
// const field: FieldEditorModel = new FieldEditorModel();
// field.id=Guid.create().toString();
// field.ordinal = (this.form.get('fields') as FormArray).length;
// const fieldForm = field.buildForm();
// fieldForm.setValidators(this.customFieldValidator()); // fieldForm.setValidators(this.customFieldValidator());
// fieldForm.get('viewStyle').get('renderStyle').setValidators(Validators.required); // fieldForm.get('viewStyle').get('renderStyle').setValidators(Validators.required);
if (fieldForm.get('data')) { // if (fieldForm.get('data')) {
fieldForm.removeControl('data'); // fieldForm.removeControl('data');
} // }
switch (type) { switch (type) {
case this.viewTypeEnum.BooleanDecision: case this.viewTypeEnum.BooleanDecision:{
fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.BooleanDecision) // fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.BooleanDecision)
fieldForm.addControl('data', new BooleanDecisionFieldDataEditorModel().buildForm()); // fieldForm.addControl('data', new BooleanDecisionFieldDataEditorModel().buildForm());
break;
case this.viewTypeEnum.CheckBox:
fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.CheckBox)
fieldForm.addControl('data', new CheckBoxFieldDataEditorModel().buildForm());
break;
case this.viewTypeEnum.Select:
fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.ComboBox)
fieldForm.addControl('data', new WordListFieldDataEditorModel().buildForm());
fieldForm.get('data').setValidators(this.myCustomValidators.atLeastOneElementListValidator('options')); const data: BooleanDecisionFieldData = {
fieldForm.get('data').updateValueAndValidity(); label:''
break; }
case this.viewTypeEnum.Other:
fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.ComboBox)
fieldForm.addControl('data', new AutoCompleteFieldDataEditorModel().buildForm()); //TODO SEE
fieldForm.get('data').setValidators(this.myCustomValidators.atLeastOneElementListValidator('autoCompleteSingleDataList')); field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.BooleanDecision;
fieldForm.get('data').updateValueAndValidity(); field.data = data;
break; break;
case this.viewTypeEnum.InternalDmpEntities: }
fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.InternalDmpEntities) case this.viewTypeEnum.CheckBox:{
fieldForm.addControl('data', new ResearchersAutoCompleteFieldDataEditorModel().buildForm());//TODO TO SEE
// fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.CheckBox)
// fieldForm.addControl('data', new CheckBoxFieldDataEditorModel().buildForm());
const data: CheckBoxFieldData = {
label:''
}
field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.CheckBox;
field.data = data;
break; break;
case this.viewTypeEnum.FreeText: }
fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.FreeText) case this.viewTypeEnum.Select:{
fieldForm.addControl('data', new FreeTextFieldDataEditorModel().buildForm());
break;
case this.viewTypeEnum.RadioBox: // fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.ComboBox)
fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.RadioBox) // fieldForm.addControl('data', new WordListFieldDataEditorModel().buildForm());
fieldForm.addControl('data', new RadioBoxFieldDataEditorModel().buildForm());
fieldForm.get('data').setValidators(this.myCustomValidators.atLeastOneElementListValidator('options')); // fieldForm.get('data').setValidators(EditorCustomValidators.atLeastOneElementListValidator('options'));
fieldForm.get('data').updateValueAndValidity(); // fieldForm.get('data').updateValueAndValidity();
const data:WordListFieldData = {
label:'',
multiList:false,
options:[],
type:DatasetProfileComboBoxType.WordList
}
field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.ComboBox;
field.data = data;
break; break;
case this.viewTypeEnum.TextArea: }
fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.TextArea) case this.viewTypeEnum.Other:{
fieldForm.addControl('data', new TextAreaFieldDataEditorModel().buildForm());
// fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.ComboBox)
// fieldForm.addControl('data', new AutoCompleteFieldDataEditorModel().buildForm()); //TODO SEE
// fieldForm.get('data').setValidators(EditorCustomValidators.atLeastOneElementListValidator('autoCompleteSingleDataList'));
// fieldForm.get('data').updateValueAndValidity();
const data: AutoCompleteFieldData = {
autoCompleteSingleDataList:[],
multiAutoComplete: false,
label:'',
type: DatasetProfileComboBoxType.Autocomplete
}
field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.ComboBox;
field.data = data;
break; break;
case this.viewTypeEnum.DatePicker: }case this.viewTypeEnum.InternalDmpEntities:{
fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.DatePicker)
fieldForm.addControl('data', new DatePickerDataEditorModel().buildForm());
// fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.InternalDmpEntities)
// fieldForm.addControl('data', new ResearchersAutoCompleteFieldDataEditorModel().buildForm());//TODO TO SEE
const data: DmpsAutoCompleteFieldData = {
label:'',
multiAutoComplete: false,
type: DatasetProfileInternalDmpEntitiesType.Dmps
}
field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.InternalDmpEntities;
field.data = data;
break; break;
case this.viewTypeEnum.ExternalDatasets: }
fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.ExternalDatasets) case this.viewTypeEnum.FreeText:{
fieldForm.addControl('data', new ExternalDatasetsDataEditorModel().buildForm());
// fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.FreeText)
// fieldForm.addControl('data', new FreeTextFieldDataEditorModel().buildForm());
const data: FreeTextFieldData = {
label:''
}
field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.FreeText;
field.data = data;
break; break;
case this.viewTypeEnum.DataRepositories: }
fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.DataRepositories) case this.viewTypeEnum.RadioBox:{
fieldForm.addControl('data', new DataRepositoriesDataEditorModel().buildForm());
// fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.RadioBox)
// fieldForm.addControl('data', new RadioBoxFieldDataEditorModel().buildForm());
// fieldForm.get('data').setValidators(EditorCustomValidators.atLeastOneElementListValidator('options'));
// fieldForm.get('data').updateValueAndValidity();
const data: RadioBoxFieldData= {
label:'',
options: []
}
field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.RadioBox;
field.data = data;
break; break;
case this.viewTypeEnum.Registries: }
fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Registries) case this.viewTypeEnum.TextArea:{
fieldForm.addControl('data', new RegistriesDataEditorModel().buildForm());
// fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.TextArea)
// fieldForm.addControl('data', new TextAreaFieldDataEditorModel().buildForm());
const data: TextAreaFieldData = {
label:''
}
field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.TextArea;
field.data = data;
break; break;
case this.viewTypeEnum.Services: }
fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Services) case this.viewTypeEnum.DatePicker:{
fieldForm.addControl('data', new ServicesDataEditorModel().buildForm());
// fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.DatePicker)
// fieldForm.addControl('data', new DatePickerDataEditorModel().buildForm());
const data: DatePickerFieldData = {
label:''
}
field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.DatePicker;
break; break;
case this.viewTypeEnum.Tags: }
fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Tags) case this.viewTypeEnum.ExternalDatasets:{
fieldForm.addControl('data', new TagsDataEditorModel().buildForm());
// fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.ExternalDatasets)
// fieldForm.addControl('data', new ExternalDatasetsDataEditorModel().buildForm());
const data: ExternalDatasetsFieldData = {
label:'',
multiAutoComplete: false
}
field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.ExternalDatasets;
field.data = data;
break; break;
case this.viewTypeEnum.Researchers: }
fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Researchers) case this.viewTypeEnum.DataRepositories:{
// fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.DataRepositories)
// fieldForm.addControl('data', new DataRepositoriesDataEditorModel().buildForm());
const data: DataRepositoriesFieldData = {
label: '',
multiAutoComplete: false
}
field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.DataRepositories;
field.data = data;
break;
}
case this.viewTypeEnum.Registries:{
// fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Registries)
// fieldForm.addControl('data', new RegistriesDataEditorModel().buildForm());
const data:RegistriesFieldData = {
label: '',
multiAutoComplete: false
}
field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.Registries;
field.data = data;
break;
}
case this.viewTypeEnum.Services:{
// fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Services)
// fieldForm.addControl('data', new ServicesDataEditorModel().buildForm());
const data:ServicesFieldData = {
label:'',
multiAutoComplete: false
}
field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.Services;
field.data = data;
break;
}
case this.viewTypeEnum.Tags:{
// fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Tags)
// fieldForm.addControl('data', new TagsDataEditorModel().buildForm());
const data: TagsFieldData = {
label:''
}
field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.Tags;
field.data = data;
break;
}
case this.viewTypeEnum.Researchers:{
// fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Researchers)
// this.form.addControl('data', new ResearchersDataEditorModel().buildForm()); //TODO TO ASK // this.form.addControl('data', new ResearchersDataEditorModel().buildForm()); //TODO TO ASK
fieldForm.addControl('data', new ResearchersAutoCompleteFieldDataEditorModel().buildForm()); // fieldForm.addControl('data', new ResearchersAutoCompleteFieldDataEditorModel().buildForm());
// field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.Researchers;
const data : ResearchersAutoCompleteFieldData = {
label:'',
multiAutoComplete: false,
type: DatasetProfileInternalDmpEntitiesType.Researchers
}
field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.InternalDmpEntities;
field.data = data;
break; break;
case this.viewTypeEnum.Organizations: }
fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Organizations) case this.viewTypeEnum.Organizations:{
fieldForm.addControl('data', new OrganizationsDataEditorModel().buildForm());
// fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Organizations)
// fieldForm.addControl('data', new OrganizationsDataEditorModel().buildForm());
// this.form.addControl('data', new OrganizationsDataEditorModel().buildForm()) // this.form.addControl('data', new OrganizationsDataEditorModel().buildForm())
// fieldForm.addControl('data', new DatasetsAutoCompleteFieldDataEditorModel().buildForm()); //TODO // fieldForm.addControl('data', new DatasetsAutoCompleteFieldDataEditorModel().buildForm()); //TODO
const data = {
autoCompleteSingleDataList:[],
label:'',
multiAutoComplete: false,
} as OrganizationsFieldData; //TODO
field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.Organizations;
field.data = data;
break; break;
case this.viewTypeEnum.DatasetIdentifier: }
fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.DatasetIdentifier) case this.viewTypeEnum.DatasetIdentifier:{
fieldForm.addControl('data', new DatasetIdentifierDataEditorModel().buildForm());
// fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.DatasetIdentifier)
// fieldForm.addControl('data', new DatasetIdentifierDataEditorModel().buildForm());
const data : DatasetIdentifierFieldData = {
label:''
}
field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.DatasetIdentifier;
field.data = data;
break; break;
case this.viewTypeEnum.Currency: }
fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Currency) case this.viewTypeEnum.Currency:{
fieldForm.addControl('data', new CurrencyDataEditorModel().buildForm());
// fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Currency)
// fieldForm.addControl('data', new CurrencyDataEditorModel().buildForm());
const data: CurrencyFieldData = {
label:''
}
field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.Currency;
field.data = data;
break; break;
case this.viewTypeEnum.Validation: }
fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Validation) case this.viewTypeEnum.Validation:{
fieldForm.addControl('data', new ValidationDataEditorModel().buildForm());
// fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Validation)
// fieldForm.addControl('data', new ValidationDataEditorModel().buildForm());
const data:ValidationFieldData = {
label:''
}
field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.Validation;
field.data = data;
break; break;
}
} }
(<FormArray>this.form.get('fields')).push(fieldForm); (<FormArray>this.form.get('fields')).push(new FieldEditorModel().fromModel(field).buildForm());
fieldForm.get('viewStyle').get('renderStyle').updateValueAndValidity(); // fieldForm.get('viewStyle').get('renderStyle').updateValueAndValidity();
fieldForm.get('data').updateValueAndValidity(); // fieldForm.get('data').updateValueAndValidity();
} }

View File

@ -2,7 +2,7 @@
<!-- BooleanDecision --> <!-- BooleanDecision -->
<mat-form-field class="col-md-12" *ngIf="viewStyle === viewStyleEnum.BooleanDecision"> <mat-form-field class="col-md-12" *ngIf="viewStyle === viewStyleEnum.BooleanDecision">
<mat-label>{{placeHolder}}</mat-label> <mat-label>{{placeHolder}}</mat-label>
<mat-select [formControl]="form" [placeholder]="placeHolder" [required]="required"> <mat-select [formControl]="form" [placeholder]="placeHolder">
<mat-option [value]="null">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.NONE' | <mat-option [value]="null">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.NONE' |
translate}}</mat-option> translate}}</mat-option>
<mat-option [value]="'true'">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.BOOLEAN-DECISION.YES' <mat-option [value]="'true'">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.BOOLEAN-DECISION.YES'
@ -18,7 +18,7 @@
<!-- CheckBox --> <!-- CheckBox -->
<mat-form-field class="col-md-12" *ngIf="viewStyle === viewStyleEnum.CheckBox"> <mat-form-field class="col-md-12" *ngIf="viewStyle === viewStyleEnum.CheckBox">
<mat-label>{{placeHolder}}</mat-label> <mat-label>{{placeHolder}}</mat-label>
<mat-select [formControl]="form" [placeholder]="placeHolder" [required]="required"> <mat-select [formControl]="form" [placeholder]="placeHolder" >
<mat-option [value]="'true'">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.CHECK-BOX.CHECKED' | translate}}</mat-option> <mat-option [value]="'true'">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.CHECK-BOX.CHECKED' | translate}}</mat-option>
<mat-option [value]="'false'">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.CHECK-BOX.UNCHECKED' | translate}}</mat-option> <mat-option [value]="'false'">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.CHECK-BOX.UNCHECKED' | translate}}</mat-option>
</mat-select> </mat-select>
@ -32,7 +32,7 @@
</mat-form-field> --> </mat-form-field> -->
<mat-form-field class="col-md-12" *ngIf="viewStyle === viewStyleEnum.ComboBox && comboBoxType === comboBoxTypeEnum.WordList"> <mat-form-field class="col-md-12" *ngIf="viewStyle === viewStyleEnum.ComboBox && comboBoxType === comboBoxTypeEnum.WordList">
<mat-label>{{placeHolder}}</mat-label> <mat-label>{{placeHolder}}</mat-label>
<mat-select [formControl]="form" [placeholder]="placeHolder" [required]="required"> <mat-select [formControl]="form" [placeholder]="placeHolder" >
<mat-option [value]="null">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.NONE' | translate }}</mat-option> <mat-option [value]="null">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.NONE' | translate }}</mat-option>
<mat-option *ngFor="let opt of formArrayOptions['controls']" [value]="opt.get('value').value">{{opt.get('label').value}}</mat-option> <mat-option *ngFor="let opt of formArrayOptions['controls']" [value]="opt.get('value').value">{{opt.get('label').value}}</mat-option>
</mat-select> </mat-select>
@ -56,14 +56,14 @@
<!-- FreeText --> <!-- FreeText -->
<mat-form-field class="col-md-12" *ngIf="viewStyle === viewStyleEnum.FreeText"> <mat-form-field class="col-md-12" *ngIf="viewStyle === viewStyleEnum.FreeText">
<mat-label>{{placeHolder}}</mat-label> <mat-label>{{placeHolder}}</mat-label>
<input matInput type="text" [placeholder]="placeHolder" [formControl]="form" [required]="required"> <input matInput type="text" [placeholder]="placeHolder" [formControl]="form" >
<mat-error *ngIf="form.hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error> <mat-error *ngIf="form.hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-form-field> </mat-form-field>
<!-- RadioBox --> <!-- RadioBox -->
<mat-form-field class="col-md-12" *ngIf="viewStyle === viewStyleEnum.RadioBox"> <mat-form-field class="col-md-12" *ngIf="viewStyle === viewStyleEnum.RadioBox">
<mat-label>{{placeHolder}}</mat-label> <mat-label>{{placeHolder}}</mat-label>
<mat-select [formControl]="form" [placeholder]="placeHolder" [required]="required"> <mat-select [formControl]="form" [placeholder]="placeHolder" >
<mat-option [value]="null">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.NONE' | translate}}</mat-option> <mat-option [value]="null">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.NONE' | translate}}</mat-option>
<mat-option *ngFor="let opt of formArrayOptions['controls']" [value]="opt.get('value').value">{{opt.get('label').value}}</mat-option> <mat-option *ngFor="let opt of formArrayOptions['controls']" [value]="opt.get('value').value">{{opt.get('label').value}}</mat-option>
</mat-select> </mat-select>
@ -73,7 +73,7 @@
<!-- TextArea --> <!-- TextArea -->
<mat-form-field class="col-md-12" *ngIf="viewStyle === viewStyleEnum.TextArea"> <mat-form-field class="col-md-12" *ngIf="viewStyle === viewStyleEnum.TextArea">
<mat-label>{{placeHolder}}</mat-label> <mat-label>{{placeHolder}}</mat-label>
<input matInput type="text" [placeholder]="placeHolder" [formControl]="form" [required]="required"> <input matInput type="text" [placeholder]="placeHolder" [formControl]="form">
<mat-error *ngIf="form.hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error> <mat-error *ngIf="form.hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-form-field> </mat-form-field>
@ -81,7 +81,7 @@
<mat-form-field class="col-12" *ngIf="viewStyle === viewStyleEnum.DatePicker"> <mat-form-field class="col-12" *ngIf="viewStyle === viewStyleEnum.DatePicker">
<!--(focus)="date.open()" (click)="date.open()"--> <!--(focus)="date.open()" (click)="date.open()"-->
<mat-label>{{placeHolder}}</mat-label> <mat-label>{{placeHolder}}</mat-label>
<input matInput [placeholder]="placeHolder" class="table-input" [matDatepicker]="date" [formControl]="form" [required]="required"> <input matInput [placeholder]="placeHolder" class="table-input" [matDatepicker]="date" [formControl]="form" >
<mat-datepicker-toggle matSuffix [for]="date"></mat-datepicker-toggle> <mat-datepicker-toggle matSuffix [for]="date"></mat-datepicker-toggle>
<mat-datepicker #date></mat-datepicker> <mat-datepicker #date></mat-datepicker>
<mat-error *ngIf="form.hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}} <mat-error *ngIf="form.hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}

View File

@ -17,7 +17,7 @@ export class DatasetProfileEditorDefaultValueComponent implements OnInit {
@Input() comboBoxType: DatasetProfileComboBoxType; @Input() comboBoxType: DatasetProfileComboBoxType;
@Input() internalDmpEntitiesType: DatasetProfileInternalDmpEntitiesType; @Input() internalDmpEntitiesType: DatasetProfileInternalDmpEntitiesType;
@Input() placeHolder: String; @Input() placeHolder: String;
@Input() required: Boolean; // @Input() required: Boolean;
comboBoxTypeEnum = DatasetProfileComboBoxType; comboBoxTypeEnum = DatasetProfileComboBoxType;
internalDmpEntitiesTypeEnum = DatasetProfileInternalDmpEntitiesType; internalDmpEntitiesTypeEnum = DatasetProfileInternalDmpEntitiesType;

View File

@ -47,24 +47,28 @@
<mat-form-field class="col-md-12"> <mat-form-field class="col-md-12">
<mat-label>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-URL' | translate}}</mat-label> <mat-label>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-URL' | translate}}</mat-label>
<input matInput [formControl]="this.singleForm.get('url')" required> <input matInput [formControl]="singleForm.get('url')">
<mat-error *ngIf="singleForm.get('url').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field class="col-md-3"> <mat-form-field class="col-md-3">
<mat-label>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-OPTIONS-ROOT' | translate}}</mat-label> <mat-label>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-OPTIONS-ROOT' | translate}}</mat-label>
<input matInput <input matInput
[formControl]="this.singleForm.get('optionsRoot')" required> [formControl]="singleForm.get('optionsRoot')">
<mat-error *ngIf="singleForm.get('optionsRoot').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field class="col-md-3"> <mat-form-field class="col-md-3">
<mat-label>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-LABEL' | translate}}</mat-label> <mat-label>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-LABEL' | translate}}</mat-label>
<input matInput [formControl]="this.singleForm.get('autoCompleteOptions').get('label')"> <input matInput [formControl]="singleForm.get('autoCompleteOptions').get('label')">
<mat-error *ngIf="singleForm.get('autoCompleteOptions').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field class="col-md-3"> <mat-form-field class="col-md-3">
<mat-label>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-VALUE' | translate}}</mat-label> <mat-label>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-VALUE' | translate}}</mat-label>
<input matInput [formControl]="this.singleForm.get('autoCompleteOptions').get('value')"> <input matInput [formControl]="singleForm.get('autoCompleteOptions').get('value')">
</mat-form-field> </mat-form-field>
<mat-form-field class="col-md-3"> <mat-form-field class="col-md-3">
<mat-label>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-SOURCE' | translate}}</mat-label> <mat-label>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-SOURCE' | translate}}</mat-label>
<input matInput [formControl]="this.singleForm.get('autoCompleteOptions').get('source')"> <input matInput [formControl]="singleForm.get('autoCompleteOptions').get('source')">
<mat-error *ngIf="singleForm.get('autoCompleteOptions').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-form-field> </mat-form-field>
<button mat-button type="button" (click)="removeSource(i)"><mat-icon>delete</mat-icon></button> <button mat-button type="button" (click)="removeSource(i)"><mat-icon>delete</mat-icon></button>
</div> </div>

View File

@ -72,38 +72,97 @@
[disabled]="viewOnly" [disabled]="viewOnly"
[errorStateMatcher]="this" [errorStateMatcher]="this"
> >
<mat-option [value]="viewTypeEnum.TextArea">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.TextArea)}}</mat-option> <mat-option [value]="viewTypeEnum.TextArea">
<mat-option [value]="viewTypeEnum.FreeText">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.FreeText)}}</mat-option> <img src="/assets/images/editor/icons/text_area.svg" class="input_icon" alt="TextArea icon">
{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.TextArea)}}
</mat-option>
<mat-option [value]="viewTypeEnum.FreeText">
<img src="/assets/images/editor/icons/free_text.svg" class="input_icon" alt="FreeText icon">
{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.FreeText)}}
</mat-option>
<mat-divider></mat-divider> <mat-divider></mat-divider>
<mat-option [value]="viewTypeEnum.BooleanDecision">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.BooleanDecision)}}</mat-option> <mat-option [value]="viewTypeEnum.BooleanDecision">
<mat-option [value]="viewTypeEnum.RadioBox">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.RadioBox)}}</mat-option> <img src="/assets/images/editor/icons/boolean.svg" class="input_icon" alt="Boolean icon">
<mat-option [value]="viewTypeEnum.Select">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Select)}}</mat-option> {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.BooleanDecision)}}
<mat-option [value]="viewTypeEnum.CheckBox">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.CheckBox)}}</mat-option> </mat-option>
<mat-option [value]="viewTypeEnum.RadioBox">
<img src="/assets/images/editor/icons/radio_box.svg" class="input_icon" alt="RadioBox icon">
{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.RadioBox)}}
</mat-option>
<mat-option [value]="viewTypeEnum.Select">
<span class="input_icon">
<img src="/assets/images/editor/icons/select.svg" style="padding-right: 7px;" alt="Select icon">
</span>
{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Select)}}
</mat-option>
<mat-option [value]="viewTypeEnum.CheckBox">
<img src="/assets/images/editor/icons/checkbox.svg" class="input_icon" alt="CheckBox icon">
{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.CheckBox)}}
</mat-option>
<!-- TODO --> <!-- TODO -->
<mat-divider></mat-divider> <mat-divider></mat-divider>
<mat-option [value]="viewTypeEnum.DatePicker">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.DatePicker)}}</mat-option> <mat-option [value]="viewTypeEnum.DatePicker">
<mat-option [value]="viewTypeEnum.Currency">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Currency)}}</mat-option> <img src="/assets/images/editor/icons/date_picker.svg" class="input_icon" alt="DatePicker icon">
{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.DatePicker)}}
</mat-option>
<mat-option [value]="viewTypeEnum.Currency">
<img src="/assets/images/editor/icons/currency.svg" class="input_icon" alt="Current icon">
{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Currency)}}
</mat-option>
<mat-divider></mat-divider> <mat-divider></mat-divider>
<!-- APIS --> <!-- APIS -->
<mat-optgroup label="APIs"> <mat-optgroup label="APIs">
<mat-option [value]="viewTypeEnum.Registries">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Registries)}}</mat-option> <mat-option [value]="viewTypeEnum.Registries">
<mat-option [value]="viewTypeEnum.Services">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Services)}}</mat-option> <img src="/assets/images/editor/icons/api_entity.svg" class="input_icon" alt="Registries icon">
<mat-option [value]="viewTypeEnum.Researchers">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Researchers)}}</mat-option> {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Registries)}}
<mat-option [value]="viewTypeEnum.Organizations">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Organizations)}}</mat-option> </mat-option>
<mat-option [value]="viewTypeEnum.ExternalDatasets">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.ExternalDatasets)}}</mat-option> <mat-option [value]="viewTypeEnum.Services">
<mat-option [value]="viewTypeEnum.DataRepositories">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.DataRepositories)}}</mat-option> <img src="/assets/images/editor/icons/api_entity.svg" class="input_icon" alt="Services icon">
<mat-option [value]="viewTypeEnum.Other">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Other)}}</mat-option> {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Services)}}
</mat-option>
<mat-option [value]="viewTypeEnum.Researchers">
<img src="/assets/images/editor/icons/api_entity.svg" class="input_icon" alt="Researchers icon">
{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Researchers)}}
</mat-option>
<mat-option [value]="viewTypeEnum.Organizations">
<img src="/assets/images/editor/icons/api_entity.svg" class="input_icon" alt="Organizations icon">
{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Organizations)}}
</mat-option>
<mat-option [value]="viewTypeEnum.ExternalDatasets">
<img src="/assets/images/editor/icons/api_entity.svg" class="input_icon" alt="ExternalDatasets icon">
{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.ExternalDatasets)}}
</mat-option>
<mat-option [value]="viewTypeEnum.DataRepositories">
<img src="/assets/images/editor/icons/api_entity.svg" class="input_icon" alt="DataRepositories icon">
{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.DataRepositories)}}
</mat-option>
<mat-option [value]="viewTypeEnum.Other">
<img src="/assets/images/editor/icons/api_entity.svg" class="input_icon" alt="Other icon">
{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Other)}}
</mat-option>
</mat-optgroup> </mat-optgroup>
<!-- TODO --> <!-- TODO -->
<mat-divider></mat-divider> <mat-divider></mat-divider>
<mat-optgroup label="Argos Entities"> <mat-optgroup label="Argos Entities">
<mat-option [value]="viewTypeEnum.InternalDmpEntities">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.InternalDmpEntities)}}</mat-option> <mat-option [value]="viewTypeEnum.InternalDmpEntities">
<mat-option [value]="viewTypeEnum.Tags">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Tags)}}</mat-option> <img src="/assets/images/editor/icons/api_entity.svg" class="input_icon" alt="InternalDmpEntities icon">
<mat-option [value]="viewTypeEnum.DatasetIdentifier">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.DatasetIdentifier)}}</mat-option> {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.InternalDmpEntities)}}
<mat-option [value]="viewTypeEnum.Validation">{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Validation)}}</mat-option> </mat-option>
<mat-option [value]="viewTypeEnum.Tags">
<img src="/assets/images/editor/icons/api_entity.svg" class="input_icon" alt="Tags icon">
{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Tags)}}
</mat-option>
<mat-option [value]="viewTypeEnum.DatasetIdentifier">
<img src="/assets/images/editor/icons/api_entity.svg" class="input_icon" alt="DatasetIdentifier icon">
{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.DatasetIdentifier)}}
</mat-option>
<mat-option [value]="viewTypeEnum.Validation">
<img src="/assets/images/editor/icons/api_entity.svg" class="input_icon" alt="Validation icon">
{{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Validation)}}
</mat-option>
</mat-optgroup> </mat-optgroup>
</mat-select> </mat-select>
@ -140,7 +199,7 @@
<app-component-profile-editor-default-value-component *ngIf="form.get('viewStyle').get('renderStyle').value" class="col-12" <app-component-profile-editor-default-value-component *ngIf="form.get('viewStyle').get('renderStyle').value" class="col-12"
[viewStyle]="form.get('viewStyle').get('renderStyle').value" [form]="this.form.get('defaultValue').get('value')" [formArrayOptions]="form.get('data')?.get('options')" [viewStyle]="form.get('viewStyle').get('renderStyle').value" [form]="this.form.get('defaultValue').get('value')" [formArrayOptions]="form.get('data')?.get('options')"
[comboBoxType]="this.form.get('data')?.get('type')?.value" [internalDmpEntitiesType]="this.form.get('data')?.get('type')?.value" [comboBoxType]="this.form.get('data')?.get('type')?.value" [internalDmpEntitiesType]="this.form.get('data')?.get('type')?.value"
placeHolder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.DEFAULT-VALUE' | translate}}" [required]="defaulValueRequired(form.get('viewStyle').get('renderStyle').value)"> placeHolder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.DEFAULT-VALUE' | translate}}">
</app-component-profile-editor-default-value-component> </app-component-profile-editor-default-value-component>
</div> </div>
@ -191,7 +250,8 @@
</ng-container> </ng-container>
<ng-container *ngIf="true"> <!-- PREVIEW -->
<ng-container *ngIf="false">
<div class="row"> <div class="row">
<div class="col-12" *ngIf="expandView && previewForm"> <div class="col-12" *ngIf="expandView && previewForm">
<span style="font-weight: bold">{{'DATASET-PROFILE-EDITOR.ACTIONS.FIELD.PREVIEW' | translate}}</span> <span style="font-weight: bold">{{'DATASET-PROFILE-EDITOR.ACTIONS.FIELD.PREVIEW' | translate}}</span>
@ -202,6 +262,8 @@
<mat-radio-button [value]="false">No</mat-radio-button> <mat-radio-button [value]="false">No</mat-radio-button>
</mat-radio-group> </mat-radio-group>
</div> --> </div> -->
<div class="col-12" *ngIf="showPreview"> <div class="col-12" *ngIf="showPreview">
<ng-container *ngIf="viewType === viewTypeEnum.Other else regularField"> <ng-container *ngIf="viewType === viewTypeEnum.Other else regularField">
<app-form-field [form]="previewForm" *ngIf="previewForm" [autocompleteOptions]="form.get('data').get('autoCompleteSingleDataList').getRawValue()"> <app-form-field [form]="previewForm" *ngIf="previewForm" [autocompleteOptions]="form.get('data').get('autoCompleteSingleDataList').getRawValue()">
@ -224,4 +286,4 @@
</ng-container> </ng-container>
<!-- {{form.touched|json}} --> <!-- {{form.touched|json}} -->
<!-- {{form.value |json}} --> <!-- {{form.value |json}} -->

View File

@ -30,4 +30,9 @@ li.list-inline-item{
background-color:#129D99 ; background-color:#129D99 ;
} }
} }
.input_icon{
width: 14px;
margin-right: 0.5em;
}

View File

@ -37,6 +37,10 @@ import { Guid } from '@common/types/guid';
import { ErrorStateMatcher, MatSlideToggleChange } from '@angular/material'; import { ErrorStateMatcher, MatSlideToggleChange } from '@angular/material';
import { DefaultValueEditorModel } from '../../../admin/default-value-editor-model'; import { DefaultValueEditorModel } from '../../../admin/default-value-editor-model';
import { EditorCustomValidators } from '../../custom-validators/editor-custom-validators'; import { EditorCustomValidators } from '../../custom-validators/editor-custom-validators';
import { Field } from '@app/core/model/admin/dataset-profile/dataset-profile';
import { DatasetProfileInternalDmpEntitiesType } from '@app/core/common/enum/dataset-profile-internal-dmp-entities-type';
import { FieldEditorModel } from '../../../admin/field-editor-model';
import { AutoCompleteFieldData, BooleanDecisionFieldData, CheckBoxFieldData, CurrencyFieldData, DataRepositoriesFieldData, DatasetIdentifierFieldData, DatePickerFieldData, DmpsAutoCompleteFieldData, ExternalDatasetsFieldData, FreeTextFieldData, OrganizationsFieldData, RadioBoxFieldData, RegistriesFieldData, ResearchersAutoCompleteFieldData, ServicesFieldData, TagsFieldData, TextAreaFieldData, ValidationFieldData, WordListFieldData } from '@app/core/model/dataset-profile-definition/field-data/field-data';
@Component({ @Component({
selector: 'app-dataset-profile-editor-field-component', selector: 'app-dataset-profile-editor-field-component',
@ -87,7 +91,7 @@ export class DatasetProfileEditorFieldComponent extends BaseComponent implements
this.showPreview = true;
// if (this.form.get('multiplicity')) { // if (this.form.get('multiplicity')) {
// if (this.form.get('multiplicity').value.min > 1 && this.form.get('multiplicity').value.max > 1) { // if (this.form.get('multiplicity').value.min > 1 && this.form.get('multiplicity').value.max > 1) {
// this.isFieldMultiplicityEnabled = true; // this.isFieldMultiplicityEnabled = true;
@ -146,7 +150,7 @@ export class DatasetProfileEditorFieldComponent extends BaseComponent implements
this.viewType = this.viewTypeEnum.Tags; this.viewType = this.viewTypeEnum.Tags;
break; break;
case DatasetProfileFieldViewStyle.Researchers: case DatasetProfileFieldViewStyle.Researchers:
this.viewType = this.viewTypeEnum.Researchers; this.viewType = this.viewTypeEnum.Researchers; //TODO RESEARCHERS
break; break;
case DatasetProfileFieldViewStyle.Organizations: case DatasetProfileFieldViewStyle.Organizations:
this.viewType = this.viewTypeEnum.Organizations; this.viewType = this.viewTypeEnum.Organizations;
@ -164,6 +168,8 @@ export class DatasetProfileEditorFieldComponent extends BaseComponent implements
} }
this.showPreview = true;
@ -246,32 +252,32 @@ export class DatasetProfileEditorFieldComponent extends BaseComponent implements
// }); // });
} }
defaulValueRequired(viewStile: DatasetProfileFieldViewStyle): boolean { // defaulValueRequired(viewStile: DatasetProfileFieldViewStyle): boolean {
switch (viewStile) { // switch (viewStile) {
case DatasetProfileFieldViewStyle.CheckBox: // case DatasetProfileFieldViewStyle.CheckBox:
return true; // return true;
case DatasetProfileFieldViewStyle.RadioBox: // case DatasetProfileFieldViewStyle.RadioBox:
case DatasetProfileFieldViewStyle.TextArea: // case DatasetProfileFieldViewStyle.TextArea:
case DatasetProfileFieldViewStyle.FreeText: // case DatasetProfileFieldViewStyle.FreeText:
case DatasetProfileFieldViewStyle.ComboBox: // case DatasetProfileFieldViewStyle.ComboBox:
case DatasetProfileFieldViewStyle.InternalDmpEntities: // case DatasetProfileFieldViewStyle.InternalDmpEntities:
case DatasetProfileFieldViewStyle.BooleanDecision: // case DatasetProfileFieldViewStyle.BooleanDecision:
case DatasetProfileFieldViewStyle.DatePicker: // case DatasetProfileFieldViewStyle.DatePicker:
case DatasetProfileFieldViewStyle.ExternalDatasets: // case DatasetProfileFieldViewStyle.ExternalDatasets:
case DatasetProfileFieldViewStyle.DataRepositories: // case DatasetProfileFieldViewStyle.DataRepositories:
case DatasetProfileFieldViewStyle.Registries: // case DatasetProfileFieldViewStyle.Registries:
case DatasetProfileFieldViewStyle.Services: // case DatasetProfileFieldViewStyle.Services:
case DatasetProfileFieldViewStyle.Tags: // case DatasetProfileFieldViewStyle.Tags:
case DatasetProfileFieldViewStyle.Registries: // case DatasetProfileFieldViewStyle.Registries:
case DatasetProfileFieldViewStyle.Organizations: // case DatasetProfileFieldViewStyle.Organizations:
case DatasetProfileFieldViewStyle.DatasetIdentifier: // case DatasetProfileFieldViewStyle.DatasetIdentifier:
case DatasetProfileFieldViewStyle.Currency: // case DatasetProfileFieldViewStyle.Currency:
case DatasetProfileFieldViewStyle.Validation: // case DatasetProfileFieldViewStyle.Validation:
return false; // return false;
default: // default:
return false; // return false;
} // }
} // }
@ -351,7 +357,11 @@ export class DatasetProfileEditorFieldComponent extends BaseComponent implements
// if(this.form.get('viewStyle').get('renderStyle').value == DatasetProfileFieldViewStyle.Researchers){ // if(this.form.get('viewStyle').get('renderStyle').value == DatasetProfileFieldViewStyle.Researchers){
// fieldEditorModel.data = new ResearchersAutoCompleteFieldDataEditorModel().buildForm().getRawValue(); // fieldEditorModel.data = new ResearchersAutoCompleteFieldDataEditorModel().buildForm().getRawValue();
// } // }
if(fieldEditorModel.viewStyle.renderStyle === DatasetProfileFieldViewStyle.Validation || (fieldEditorModel.viewStyle.renderStyle === DatasetProfileFieldViewStyle.DatasetIdentifier)
|| (fieldEditorModel.viewStyle.renderStyle === DatasetProfileFieldViewStyle.Tags)
){
fieldEditorModel.value = null;
}
// const myTicket = Guid.create().toString(); // const myTicket = Guid.create().toString();
// this.validTicket = myTicket; // this.validTicket = myTicket;
@ -403,111 +413,362 @@ export class DatasetProfileEditorFieldComponent extends BaseComponent implements
this.showPreview = false; this.showPreview = false;
if (this.form.get('data')) {
this.form.removeControl('data');
}
this.form.removeControl('defaultValue'); const field: Field = this.form.getRawValue();
const defaultValueModel = new DefaultValueEditorModel(); field.defaultValue = {type:null, value: null};
this.form.addControl('defaultValue',defaultValueModel.buildForm());
// if (this.form.get('data')) {
// this.form.removeControl('data');
// }
// this.form.removeControl('defaultValue');
// const defaultValueModel = new DefaultValueEditorModel();
// this.form.addControl('defaultValue',defaultValueModel.buildForm());
switch (x) { switch (x) {
case this.viewTypeEnum.BooleanDecision: case this.viewTypeEnum.BooleanDecision:{
this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.BooleanDecision)
this.form.addControl('data', new BooleanDecisionFieldDataEditorModel().buildForm());
break;
case this.viewTypeEnum.CheckBox:
this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.CheckBox)
this.form.addControl('data', new CheckBoxFieldDataEditorModel().buildForm());
break;
case this.viewTypeEnum.Select:
this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.ComboBox)
this.form.addControl('data', new WordListFieldDataEditorModel().buildForm());
this.form.get('data').setValidators(this.myCustomValidators.atLeastOneElementListValidator('options'));
this.form.get('data').updateValueAndValidity(); // this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.BooleanDecision)
// this.form.addControl('data', new BooleanDecisionFieldDataEditorModel().buildForm());
const data: BooleanDecisionFieldData = {
label:""
}
field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.BooleanDecision;
field.data = data;
break; break;
case this.viewTypeEnum.Other: }
this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.ComboBox) case this.viewTypeEnum.CheckBox:{
this.form.addControl('data', new AutoCompleteFieldDataEditorModel().buildForm()); //TODO SEE
this.form.get('data').setValidators(this.myCustomValidators.atLeastOneElementListValidator('autoCompleteSingleDataList'));
this.form.get('data').updateValueAndValidity(); // this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.CheckBox)
// this.form.addControl('data', new CheckBoxFieldDataEditorModel().buildForm());
const data: CheckBoxFieldData = {
label:''
}
field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.CheckBox;
field.data = data;
break;
}
case this.viewTypeEnum.Select:{
// this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.ComboBox)
// this.form.addControl('data', new WordListFieldDataEditorModel().buildForm());
// this.form.get('data').setValidators(EditorCustomValidators.atLeastOneElementListValidator('options'));
// this.form.get('data').updateValueAndValidity();
const data:WordListFieldData = {
label:'',
multiList:false,
options:[],
type:DatasetProfileComboBoxType.WordList
}
field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.ComboBox;
field.data = data;
break;
}
case this.viewTypeEnum.Other:{
// this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.ComboBox)
// this.form.addControl('data', new AutoCompleteFieldDataEditorModel().buildForm()); //TODO SEE
// this.form.get('data').setValidators(EditorCustomValidators.atLeastOneElementListValidator('autoCompleteSingleDataList'));
// this.form.get('data').updateValueAndValidity();
const data: AutoCompleteFieldData = {
autoCompleteSingleDataList:[],
multiAutoComplete: false,
label:'',
type: DatasetProfileComboBoxType.Autocomplete
}
field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.ComboBox;
field.data = data;
break;
}
case this.viewTypeEnum.InternalDmpEntities:{
// this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.InternalDmpEntities)
// this.form.addControl('data', new ResearchersAutoCompleteFieldDataEditorModel().buildForm());//TODO TO SEE
const data: DmpsAutoCompleteFieldData = {
label:'',
multiAutoComplete: false,
type: DatasetProfileInternalDmpEntitiesType.Dmps
}
field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.InternalDmpEntities;
field.data = data;
break;
}
case this.viewTypeEnum.FreeText:{
// this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.FreeText)
// this.form.addControl('data', new FreeTextFieldDataEditorModel().buildForm());
const data: FreeTextFieldData = {
label:''
}
field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.FreeText;
field.data = data;
break;
}
case this.viewTypeEnum.RadioBox:{
// this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.RadioBox)
// this.form.addControl('data', new RadioBoxFieldDataEditorModel().buildForm());
// this.form.get('data').setValidators(EditorCustomValidators.atLeastOneElementListValidator('options'));
// this.form.get('data').updateValueAndValidity();
const data: RadioBoxFieldData= {
label:'',
options: []
}
field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.RadioBox;
field.data = data;
break;
}
case this.viewTypeEnum.TextArea:{
// this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.TextArea)
// this.form.addControl('data', new TextAreaFieldDataEditorModel().buildForm());
const data: TextAreaFieldData = {
label:''
}
field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.TextArea;
field.data = data;
break;
}
case this.viewTypeEnum.DatePicker:{
// this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.DatePicker)
// this.form.addControl('data', new DatePickerDataEditorModel().buildForm());
const data: DatePickerFieldData = {
label:''
}
field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.DatePicker;
field.data = data;
break;
}
case this.viewTypeEnum.ExternalDatasets:{
// this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.ExternalDatasets)
// this.form.addControl('data', new ExternalDatasetsDataEditorModel().buildForm());
const data: ExternalDatasetsFieldData = {
label:'',
multiAutoComplete: false
}
field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.ExternalDatasets;
field.data = data;
break;
}
case this.viewTypeEnum.DataRepositories:{
// this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.DataRepositories)
// this.form.addControl('data', new DataRepositoriesDataEditorModel().buildForm());
const data: DataRepositoriesFieldData = {
label: '',
multiAutoComplete: false
}
field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.DataRepositories;
field.data = data;
break;
}
case this.viewTypeEnum.Registries:{
// this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Registries)
// this.form.addControl('data', new RegistriesDataEditorModel().buildForm());
const data:RegistriesFieldData = {
label: '',
multiAutoComplete: false
}
field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.Registries;
field.data = data;
break;
}
case this.viewTypeEnum.Services:{
// this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Services)
// this.form.addControl('data', new ServicesDataEditorModel().buildForm());
const data:ServicesFieldData = {
label:'',
multiAutoComplete: false
}
field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.Services;
field.data = data;
break;
}
case this.viewTypeEnum.Tags:{
// this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Tags)
// this.form.addControl('data', new TagsDataEditorModel().buildForm());
const data: TagsFieldData = {
label:''
}
field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.Tags;
field.data = data;
break;
}
case this.viewTypeEnum.Researchers:{
// this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Researchers)
// // this.form.addControl('data', new ResearchersDataEditorModel().buildForm()); //TODO TO ASK
// this.form.addControl('data', new ResearchersAutoCompleteFieldDataEditorModel().buildForm());
// field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.Researchers;
const data : ResearchersAutoCompleteFieldData = {
label:'',
multiAutoComplete: false,
type: DatasetProfileInternalDmpEntitiesType.Researchers
}
field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.InternalDmpEntities;
field.data = data;
break; break;
case this.viewTypeEnum.InternalDmpEntities: }
this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.InternalDmpEntities) case this.viewTypeEnum.Organizations:{
this.form.addControl('data', new ResearchersAutoCompleteFieldDataEditorModel().buildForm());//TODO TO SEE
break;
case this.viewTypeEnum.FreeText:
this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.FreeText)
this.form.addControl('data', new FreeTextFieldDataEditorModel().buildForm());
break;
case this.viewTypeEnum.RadioBox:
this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.RadioBox)
this.form.addControl('data', new RadioBoxFieldDataEditorModel().buildForm());
this.form.get('data').setValidators(this.myCustomValidators.atLeastOneElementListValidator('options'));
this.form.get('data').updateValueAndValidity(); // this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Organizations)
// this.form.addControl('data', new OrganizationsDataEditorModel().buildForm());
const data = {
autoCompleteSingleDataList:[],
label:'',
multiAutoComplete: false,
} as OrganizationsFieldData; //TODO
field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.Organizations;
field.data = data;
break; break;
case this.viewTypeEnum.TextArea: }
this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.TextArea) case this.viewTypeEnum.DatasetIdentifier:{
this.form.addControl('data', new TextAreaFieldDataEditorModel().buildForm());
// this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.DatasetIdentifier)
// this.form.addControl('data', new DatasetIdentifierDataEditorModel().buildForm());
const data : DatasetIdentifierFieldData = {
label:''
}
field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.DatasetIdentifier;
field.data = data;
break; break;
case this.viewTypeEnum.DatePicker: }
this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.DatePicker) case this.viewTypeEnum.Currency:{
this.form.addControl('data', new DatePickerDataEditorModel().buildForm());
// this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Currency)
// this.form.addControl('data', new CurrencyDataEditorModel().buildForm());
const data: CurrencyFieldData = {
label:''
}
field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.Currency;
field.data = data;
break; break;
case this.viewTypeEnum.ExternalDatasets: }
this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.ExternalDatasets) case this.viewTypeEnum.Validation:{
this.form.addControl('data', new ExternalDatasetsDataEditorModel().buildForm());
break;
case this.viewTypeEnum.DataRepositories: // this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Validation)
this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.DataRepositories) // this.form.addControl('data', new ValidationDataEditorModel().buildForm());
this.form.addControl('data', new DataRepositoriesDataEditorModel().buildForm());
break; const data:ValidationFieldData = {
case this.viewTypeEnum.Registries: label:''
this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Registries) }
this.form.addControl('data', new RegistriesDataEditorModel().buildForm());
break; field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.Validation;
case this.viewTypeEnum.Services: field.data = data;
this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Services)
this.form.addControl('data', new ServicesDataEditorModel().buildForm());
break;
case this.viewTypeEnum.Tags:
this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Tags)
this.form.addControl('data', new TagsDataEditorModel().buildForm());
break;
case this.viewTypeEnum.Researchers:
this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Researchers)
// this.form.addControl('data', new ResearchersDataEditorModel().buildForm()); //TODO TO ASK
this.form.addControl('data', new ResearchersAutoCompleteFieldDataEditorModel().buildForm());
break;
case this.viewTypeEnum.Organizations:
this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Organizations)
this.form.addControl('data', new OrganizationsDataEditorModel().buildForm());
break;
case this.viewTypeEnum.DatasetIdentifier:
this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.DatasetIdentifier)
this.form.addControl('data', new DatasetIdentifierDataEditorModel().buildForm());
break;
case this.viewTypeEnum.Currency:
this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Currency)
this.form.addControl('data', new CurrencyDataEditorModel().buildForm());
break;
case this.viewTypeEnum.Validation:
this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Validation)
this.form.addControl('data', new ValidationDataEditorModel().buildForm());
break; break;
}
}
// this.form.get('data').updateValueAndValidity();
// this.form.get('viewStyle').get('renderStyle').updateValueAndValidity();
// this.form.updateValueAndValidity();
const form = (new FieldEditorModel).fromModel(field).buildForm();
const fields = this.form.parent as FormArray;
let index = -1;
fields.controls.forEach((control,i)=>{
if(this.form.get('id').value === control.get('id').value){
index = i
}
});
if(index>=0){
fields.removeAt(index);
fields.insert(index, form);
this.form = form;
} }
this.form.get('data').updateValueAndValidity();
this.form.get('viewStyle').get('renderStyle').updateValueAndValidity();
this.form.updateValueAndValidity();
setTimeout(() => { //TODO setTimeout(() => { //TODO
this.showPreview = true; this.showPreview = true;
}); });
@ -549,17 +810,4 @@ export class DatasetProfileEditorFieldComponent extends BaseComponent implements
onDelete(){ onDelete(){
this.delete.emit(); this.delete.emit();
} }
// private _atLeastOneElementListValidator(arrayToCheck): ValidatorFn{
// return (control: AbstractControl): ValidationErrors | null=>{
// const fa = control.get(arrayToCheck) as FormArray;
// if(fa.length === 0){
// return {emptyArray: true};
// }
// return null;
// }
// }
} }

View File

@ -27,7 +27,7 @@
<mat-label>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.RULE.FIELDS.RULE-THEN'| translate}}</mat-label> <mat-label>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.RULE.FIELDS.RULE-THEN'| translate}}</mat-label>
<mat-select formControlName="target" required> <mat-select formControlName="target" required>
<!-- SHOW SECTIONS --> <!-- SHOW SECTIONS -->
<mat-optgroup label="Sections"> <!-- <mat-optgroup label="Sections" *ngIf="false">
<mat-option *ngFor="let option of sectionOptions" [value]="option.id" style="line-height: normal;" <mat-option *ngFor="let option of sectionOptions" [value]="option.id" style="line-height: normal;"
[disabled]="parentIds.includes(option.id)"> [disabled]="parentIds.includes(option.id)">
@ -39,9 +39,9 @@
</small> </small>
</mat-option> </mat-option>
</mat-optgroup> </mat-optgroup> -->
<!-- SHOW FIELDSETS --> <!-- SHOW FIELDSETS -->
<mat-optgroup label="Fieldsets"> <mat-optgroup [label]="'DATASET-PROFILE-EDITOR.STEPS.FORM.RULE.FIELDS.FIELDSETS' | translate">
<mat-option *ngFor="let option of fieldSetOptions" [value]="option.id" style="line-height: normal;" <mat-option *ngFor="let option of fieldSetOptions" [value]="option.id" style="line-height: normal;"
[disabled]="parentIds.includes(option.id)"> [disabled]="parentIds.includes(option.id)">
<span> <span>
@ -53,7 +53,7 @@
</mat-option> </mat-option>
</mat-optgroup> </mat-optgroup>
<!-- SHOW FIELDS --> <!-- SHOW FIELDS -->
<mat-optgroup label="Fields"> <mat-optgroup [label]="'DATASET-PROFILE-EDITOR.STEPS.FORM.RULE.FIELDS.FIELDS' | translate">
<mat-option *ngFor="let option of fieldOptions" [value]="option.id" style="line-height: normal;" <mat-option *ngFor="let option of fieldOptions" [value]="option.id" style="line-height: normal;"
[disabled]="parentIds.includes(option.id)"> [disabled]="parentIds.includes(option.id)">
<span> <span>

View File

@ -1,16 +1,39 @@
<div id="topofcontainer"></div> <div id="topofcontainer"></div>
<div class="row" [id]="idprefix+form.get('id').value"> <div class="row" [id]="idprefix+form.get('id').value">
<!-- SECTION INFO -->
<mat-card style="margin-bottom: 2em; padding: 2em;" class="col-12" > <div class="col-12" >
<mat-card-content> <div class="row">
<app-dataset-profile-editor-section-component <!-- SECTION INFO -->
[form]="form" <mat-card style="margin-bottom: 2em; padding: 2em;" class="col-9">
[viewOnly]="viewOnly" <mat-card-content>
> <app-dataset-profile-editor-section-component
</app-dataset-profile-editor-section-component> [form]="form"
</mat-card-content> [viewOnly]="viewOnly"
</mat-card> >
</app-dataset-profile-editor-section-component>
</mat-card-content>
</mat-card>
<div class="col-2 col-xl-auto ml-4" *ngIf="!selectedFieldSetId">
<div class="row bg-white actions-list">
<nav *ngIf="!viewOnly">
<label class="action-list-label">{{'DATASET-PROFILE-EDITOR.STEPS.TOOLKIT.GENERAL-TOOLS' | translate}}</label>
<ul class="list-unstyled">
<li class="mli">
<div class="action-list-item" (click)="onAddFieldSet()">
<!-- <mat-icon class="action-list-icon">folder</mat-icon> -->
<img src="/assets/images/editor/icons/add_input_set.svg" class="input_icon" alt="Add Question icon">
<span class="action-list-text" >{{'DATASET-PROFILE-EDITOR.STEPS.TOOLKIT.NEW-INPUT-SET' | translate}}</span>
</div>
</li>
</ul>
</nav>
</div>
</div>
</div>
</div>
<!-- FIELDSET INFO --> <!-- FIELDSET INFO -->
<div class="col-12 drop-list" dragula="FIELDSETS" [(dragulaModel)]="form.get('fieldSets').controls"> <div class="col-12 drop-list" dragula="FIELDSETS" [(dragulaModel)]="form.get('fieldSets').controls">
@ -30,7 +53,7 @@
<mat-icon>delete</mat-icon> <mat-icon>delete</mat-icon>
</button> --> </button> -->
<mat-card class="col-12" <mat-card class="col-9"
(click)="selectedFieldSetId = fieldset.get('id').value" (click)="selectedFieldSetId = fieldset.get('id').value"
[ngClass]="{'field-container-active': fieldset.get('id').value === selectedFieldSetId}"> [ngClass]="{'field-container-active': fieldset.get('id').value === selectedFieldSetId}">
<mat-card-content> <mat-card-content>
@ -46,6 +69,40 @@
</mat-card-content> </mat-card-content>
</mat-card> </mat-card>
<div class="col-2 col-xl-auto ml-4" *ngIf="selectedFieldSetId === fieldset.get('id').value">
<div class="row bg-white actions-list">
<nav *ngIf="!viewOnly">
<label class="action-list-label">{{'DATASET-PROFILE-EDITOR.STEPS.TOOLKIT.GENERAL-TOOLS' | translate}}</label>
<ul class="list-unstyled">
<li class="mli">
<div class="action-list-item" (click)="onAddFieldSet()">
<!-- <mat-icon class="action-list-icon">folder</mat-icon> -->
<img src="/assets/images/editor/icons/add_input_set.svg" class="input_icon" alt="Add Question icon">
<span class="action-list-text" >{{'DATASET-PROFILE-EDITOR.STEPS.TOOLKIT.NEW-INPUT-SET' | translate}}</span>
</div>
</li>
<li class="mli">
<div class="action-list-item" (click)="onCloneFieldSet(fieldset)">
<!-- <mat-icon class="action-list-icon">file_copy</mat-icon> -->
<img src="/assets/images/editor/icons/clone.svg" class="input_icon" alt="Clone icon">
<span class="action-list-text">{{'DATASET-PROFILE-EDITOR.STEPS.TOOLKIT.CLONE' | translate}}</span>
</div>
</li>
<li class="mli">
<div class="action-list-item" (click)="onRemoveFieldSet(selectedFieldSetId)">
<mat-icon class="action-list-icon">delete</mat-icon>
<span class="action-list-text">{{'DATASET-PROFILE-EDITOR.STEPS.TOOLKIT.DELETE' | translate}}</span>
</div>
</li>
</ul>
</nav>
</div>
</div>
<!-- </div> --> <!-- </div> -->
<!-- <div class="col-12"><button mat-button class="full-width" (click)="addField()" <!-- <div class="col-12"><button mat-button class="full-width" (click)="addField()"

View File

@ -36,3 +36,50 @@ $blue-color-light: #5cf7f2;
.drop-list.cdk-drop-list-dragging { .drop-list.cdk-drop-list-dragging {
transition: transform 250ms cubic-bezier(0, 0, 0.2, 1); transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
} }
.actions-list{
// border: 1px solid $blue-color;
// box-shadow: 0px 3px 12px #129D9999;
border-radius: 4px;
// padding-top: 1rem;
padding: 1em 0.9em;
padding-bottom: 3em;
min-width: 166px;
.mat-list-item-content{
padding: 0px;
}
.action-list-item{
display: flex;
align-items: center;
cursor: pointer;
.action-list-icon{
font-size: 1.2em;
// padding-right: 1em;
width: 14px;
margin-right: 0.5em;
margin-left: -.09em;
height: auto;
color: #129D99;;
}
.input_icon{
width: 14px;
margin-right: .5em;
}
.action-list-text{
font-size: 0.9em;
}
}
.action-list-label{
color: #212121;
font-size: small;
opacity: 0.6;
}
.list-unstyled{
margin-bottom: 0.2rem;
}
}

View File

@ -28,6 +28,9 @@ export class DatasetProfileEditorSectionFieldSetComponent implements OnInit, OnC
@Output() selectedEntryId = new EventEmitter<string>(); @Output() selectedEntryId = new EventEmitter<string>();
@Output() dataNeedsRefresh = new EventEmitter<void> (); @Output() dataNeedsRefresh = new EventEmitter<void> ();
@Output() removeFieldSet = new EventEmitter<string>();
@Output() addNewFieldSet = new EventEmitter<FormGroup>();
@Output() cloneFieldSet = new EventEmitter<FormGroup>();
// FIELDSET_PREFIX_ID="FIELDSET_PREFIX_ID"; // FIELDSET_PREFIX_ID="FIELDSET_PREFIX_ID";
@ -48,9 +51,9 @@ export class DatasetProfileEditorSectionFieldSetComponent implements OnInit, OnC
this.dragulaService.createGroup(this.FIELDSETS,{ this.dragulaService.createGroup(this.FIELDSETS,{
moves:(el, container, handle)=>{ moves:(el, container, handle)=>{
if(this.viewOnly) return false; // if(this.viewOnly) return false; //uncomment if want to unable drag n drop in viewonly mode
if(el.id != (this.idprefix+this.tocentry.id)) return false; if(el.id != (this.idprefix+this.tocentry.id)) return false;
if(handle.className.includes('handle')) return true; if(handle.className && handle.classList.contains('handle')) return true;
return false; return false;
} }
}); });
@ -216,6 +219,17 @@ export class DatasetProfileEditorSectionFieldSetComponent implements OnInit, OnC
} }
onRemoveFieldSet(fieldsetId: string){
this.removeFieldSet.emit(fieldsetId);
}
onCloneFieldSet(fieldset: FormGroup){
this.cloneFieldSet.emit(fieldset);
}
onAddFieldSet(){
this.addNewFieldSet.emit(this.form);
}
// addField() { // addField() {
// const fieldSet: FieldSetEditorModel = new FieldSetEditorModel(); // const fieldSet: FieldSetEditorModel = new FieldSetEditorModel();

View File

@ -12,8 +12,8 @@
<div class="heading col-12">{{'DATASET-PROFILE-EDITOR.STEPS.SECTION-INFO.SECTION-NAME' | translate}} *</div> <div class="heading col-12">{{'DATASET-PROFILE-EDITOR.STEPS.SECTION-INFO.SECTION-NAME' | translate}} *</div>
<div class="hint col-12">{{'DATASET-PROFILE-EDITOR.STEPS.SECTION-INFO.SECTION-NAME-HINT' | translate}}</div> <div class="hint col-12">{{'DATASET-PROFILE-EDITOR.STEPS.SECTION-INFO.SECTION-NAME-HINT' | translate}}</div>
<mat-form-field class="col-12"> <mat-form-field class="col-12">
<input matInput type="text" placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.SECTION.FIELDS.TITLE' | translate}}" <input matInput type="text" [placeholder]="('DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.UNTITLED' | translate)+ ' '+ ('DATASET-PROFILE-EDITOR.STEPS.SECTION-INFO.SECTION' | translate)"
formControlName="title" required> formControlName="title">
<mat-error >{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error> <mat-error >{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-form-field> </mat-form-field>
<!-- <mat-form-field class="col-md-3"> <!-- <mat-form-field class="col-md-3">

View File

@ -4,18 +4,18 @@ import { AbstractControl, FormArray, ValidationErrors, ValidatorFn } from "@angu
export class EditorCustomValidators{ export class EditorCustomValidators{
public atLeastOneElementListValidator(arrayToCheck): ValidatorFn{ static atLeastOneElementListValidator(arrayToCheck): ValidatorFn{
return (control: AbstractControl): ValidationErrors | null=>{ return (control: AbstractControl): ValidationErrors | null=>{
const fa = control.get(arrayToCheck) as FormArray; const fa = control.get(arrayToCheck) as FormArray;
if(fa.length === 0){ if(!fa || fa.length === 0){
return {[EditorCustomValidatorsEnum.emptyArray]: true}; return {[EditorCustomValidatorsEnum.emptyArray]: true};
} }
return null; return null;
} }
} }
public pagesHaveAtLeastOneSection(pagesArrayName:string,sectionsArrayName:string ): ValidatorFn{ static pagesHaveAtLeastOneSection(pagesArrayName:string,sectionsArrayName:string ): ValidatorFn{
return (control: AbstractControl): ValidationErrors | null=>{ return (control: AbstractControl): ValidationErrors | null=>{
@ -38,7 +38,7 @@ export class EditorCustomValidators{
} }
} }
public sectionHasAtLeastOneChildOf(fieldsetsArrayName, sectionsArrayName): ValidatorFn{ static sectionHasAtLeastOneChildOf(fieldsetsArrayName, sectionsArrayName): ValidatorFn{
return (control: AbstractControl): ValidationErrors | null=>{ return (control: AbstractControl): ValidationErrors | null=>{

View File

@ -3,6 +3,7 @@ import { DatasetProfile } from '../../../../core/model/admin/dataset-profile/dat
import { BaseFormModel } from '../../../../core/model/base-form-model'; import { BaseFormModel } from '../../../../core/model/base-form-model';
import { PageEditorModel } from '../admin/page-editor-model'; import { PageEditorModel } from '../admin/page-editor-model';
import { SectionEditorModel } from '../admin/section-editor-model'; import { SectionEditorModel } from '../admin/section-editor-model';
import { EditorCustomValidators } from './custom-validators/editor-custom-validators';
export class DatasetProfileEditorModel extends BaseFormModel { export class DatasetProfileEditorModel extends BaseFormModel {
@ -48,6 +49,10 @@ export class DatasetProfileEditorModel extends BaseFormModel {
pagesFormArray.push(form); pagesFormArray.push(form);
}); });
formGroup.addControl('pages', this.formBuilder.array(pagesFormArray)); formGroup.addControl('pages', this.formBuilder.array(pagesFormArray));
formGroup.setValidators([EditorCustomValidators.atLeastOneElementListValidator('pages'), EditorCustomValidators.pagesHaveAtLeastOneSection('pages','sections')]);
formGroup.updateValueAndValidity();
return formGroup; return formGroup;
} }
} }

View File

@ -58,7 +58,7 @@
</button> </button>
<button mat-button class="navigate-btn ml-3" <button mat-button class="navigate-btn ml-3"
[@next_btn] [@next_btn]
(click)="validateStep(stepper.selected);stepper.next();" (click)="validateStep(stepper.selectedIndex);stepper.next();"
*ngIf="stepper.selectedIndex != (steps.length-1)" *ngIf="stepper.selectedIndex != (steps.length-1)"
[ngClass]="{'navigate-btn-disabled': !isStepCompleted(stepper.selectedIndex)}"> [ngClass]="{'navigate-btn-disabled': !isStepCompleted(stepper.selectedIndex)}">
@ -128,7 +128,7 @@
<div class="hint">{{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-NAME-HINT'| translate}}</div> <div class="hint">{{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-NAME-HINT'| translate}}</div>
<mat-form-field class="full-width basic-info-input"> <mat-form-field class="full-width basic-info-input">
<input matInput [formControl]="form.get('label')" <input matInput [formControl]="form.get('label')"
placeholder="{{'DATASET-PROFILE-EDITOR.FIELDS.DATASET-TITLE' | translate}}" required> placeholder="{{'DATASET-PROFILE-EDITOR.FIELDS.DATASET-TITLE' | translate}}">
<mat-error *ngIf="form.get('label').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | <mat-error *ngIf="form.get('label').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' |
translate}} translate}}
</mat-error> </mat-error>
@ -140,7 +140,7 @@
<div class="hint">{{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-DESCRIPTION-HINT'| translate}}</div> <div class="hint">{{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-DESCRIPTION-HINT'| translate}}</div>
<mat-form-field class="full-width basic-info-input"> <mat-form-field class="full-width basic-info-input">
<textarea matInput [formControl]="form.get('description')" cdkTextareaAutosize cdkAutosizeMinRows="4" cdkAutosizeMaxRows="5" <textarea matInput [formControl]="form.get('description')" cdkTextareaAutosize cdkAutosizeMinRows="4" cdkAutosizeMaxRows="5"
placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER'| translate}}" required> placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER'| translate}}">
</textarea> </textarea>
<mat-error *ngIf="form.get('description').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' <mat-error *ngIf="form.get('description').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED'
| translate}} | translate}}
@ -202,58 +202,6 @@
[colorizeInvalid]="colorizeInvalid"> [colorizeInvalid]="colorizeInvalid">
</dataset-profile-table-of-contents> </dataset-profile-table-of-contents>
<div class="col-12 mt-4">
<div class="row justify-content-end">
<!-- SAVE BUTTON -->
<div class="col-6 d-flex justify-content-end">
<button mat-raised-button class="col-auto mr-2" color="primary" type="button col-auto"
(click)='checkFormValidation()'
[disabled]="form.valid">{{'DATASET-PROFILE-EDITOR.ACTIONS.VALIDATE' | translate}}</button>
</div>
<!-- <div class="col-6 d-flex justify-content-end" *ngIf="!viewOnly">
<ng-container *ngIf="true">
<button mat-raised-button class="col-auto mr-2" color="primary" type="button col-auto"
(click)='checkFormValidation()'
[disabled]="form.valid">{{'DATASET-PROFILE-EDITOR.ACTIONS.VALIDATE' | translate}}</button>
</ng-container>
-->
<!-- <button mat-raised-button class="col-auto mr-2" color="primary" type="button col-auto"
(click)='onSubmit()' [disabled]="!form.valid">{{'DATASET-PROFILE-EDITOR.ACTIONS.SAVE' |
translate}}</button>
<button mat-raised-button class="col-auto" color="primary" type="button col-auto"
(click)='finalize()' [disabled]="!form.valid">{{'DATASET-PROFILE-EDITOR.ACTIONS.FINALIZE' |
translate}}</button> -->
<!-- </div> -->
<!-- SAVE BUTTON WHEN FINALIZED-->
<!-- <div class="col-6 d-flex" *ngIf="showUpdateButton()">
<div class="row mt-4">
<button mat-raised-button class="col-auto mr-2" color="primary" type="button col-auto"
(click)='checkFormValidation()'
[disabled]="form.valid">{{'DATASET-PROFILE-EDITOR.ACTIONS.VALIDATE' | translate}}</button>
<button mat-raised-button class="col-auto mr-2" color="primary" type="button col-auto"
(click)='updateFinalized()' [disabled]="!form.valid">{{'DATASET-PROFILE-EDITOR.ACTIONS.UPDATE' |
translate}}</button>
</div>
</div> -->
<!-- DELETE BUTTON -->
<!-- <div class="col-12 d-flex justify-content-end" *ngIf="!isNew">
<div class="row mt-4">
<button mat-raised-button color="primary" (click)="delete()">
<mat-icon>delete</mat-icon>{{'DATASET-PROFILE-EDITOR.ACTIONS.DELETE' | translate}}
</button>
</div>
</div> -->
</div>
</div>
</div> </div>
</div> </div>
@ -275,7 +223,7 @@
<div class="heading">{{'DATASET-PROFILE-EDITOR.STEPS.PAGE-INFO.PAGE-NAME' | translate}} *</div> <div class="heading">{{'DATASET-PROFILE-EDITOR.STEPS.PAGE-INFO.PAGE-NAME' | translate}} *</div>
<div class="hint">{{'DATASET-PROFILE-EDITOR.STEPS.PAGE-INFO.PAGE-NAME-HINT' | translate}}</div> <div class="hint">{{'DATASET-PROFILE-EDITOR.STEPS.PAGE-INFO.PAGE-NAME-HINT' | translate}}</div>
<mat-form-field> <mat-form-field>
<input type="text" matInput formControlName="title"> <input type="text" matInput formControlName="title" [placeholder]="('DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.UNTITLED' | translate) +' '+ ('DATASET-PROFILE-EDITOR.STEPS.PAGE-INFO.PAGE' |translate)">
<mat-error >{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error> <mat-error >{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-form-field> </mat-form-field>
</div> </div>
@ -303,6 +251,9 @@
<app-dataset-profile-editor-section-fieldset-component <app-dataset-profile-editor-section-fieldset-component
[tocentry]="selectedTocEntry" [tocentry]="selectedTocEntry"
[viewOnly]="viewOnly" [viewOnly]="viewOnly"
(addNewFieldSet)="addNewEntry({childType: tocEntryEnumValues.FieldSet,parent: {form: $event}})"
(removeFieldSet)="onRemoveEntry(_findTocEntryById($event, toCEntries))"
(cloneFieldSet)="cloneFieldSet($event)"
(selectedEntryId)="displayItem(_findTocEntryById($event, getTocEntries()))" (selectedEntryId)="displayItem(_findTocEntryById($event, getTocEntries()))"
(dataNeedsRefresh)="onDataNeedsRefresh()" (dataNeedsRefresh)="onDataNeedsRefresh()"
> >
@ -337,7 +288,7 @@
<!-- TOOLBAR --> <!-- TOOLBAR -->
<div class="col-auto" <!-- <div class="col-auto"
*ngIf="((selectedTocEntry?.type == tocEntryEnumValues.Section)||(selectedTocEntry?.type == tocEntryEnumValues.FieldSet) )&&(selectedTocEntry?.subEntriesType != tocEntryEnumValues.Section) && !viewOnly"> *ngIf="((selectedTocEntry?.type == tocEntryEnumValues.Section)||(selectedTocEntry?.type == tocEntryEnumValues.FieldSet) )&&(selectedTocEntry?.subEntriesType != tocEntryEnumValues.Section) && !viewOnly">
<div class="row" class="actions-list bg-white sticky-top" style="top: 2em;"> <div class="row" class="actions-list bg-white sticky-top" style="top: 2em;">
<nav *ngIf="!viewOnly"> <nav *ngIf="!viewOnly">
@ -345,6 +296,7 @@
<ul class="list-unstyled"> <ul class="list-unstyled">
<li *ngIf="selectedTocEntry.type === tocEntryEnumValues.FieldSet" class="mli"> <li *ngIf="selectedTocEntry.type === tocEntryEnumValues.FieldSet" class="mli">
<div class="action-list-item" (click)="addNewEntry({childType: tocEntryEnumValues.FieldSet,parent: {form: selectedTocEntry.form.parent.parent}})"> <div class="action-list-item" (click)="addNewEntry({childType: tocEntryEnumValues.FieldSet,parent: {form: selectedTocEntry.form.parent.parent}})">
<img src="/assets/images/editor/icons/add_input_set.svg" class="input_icon" alt="Add Question icon">
<mat-icon class="action-list-icon">folder</mat-icon> <mat-icon class="action-list-icon">folder</mat-icon>
<span class="action-list-text" >{{'DATASET-PROFILE-EDITOR.STEPS.TOOLKIT.NEW-INPUT-SET' | translate}}</span> <span class="action-list-text" >{{'DATASET-PROFILE-EDITOR.STEPS.TOOLKIT.NEW-INPUT-SET' | translate}}</span>
</div> </div>
@ -352,6 +304,7 @@
<li *ngIf="selectedTocEntry.type === tocEntryEnumValues.Section" class="mli"> <li *ngIf="selectedTocEntry.type === tocEntryEnumValues.Section" class="mli">
<div class="action-list-item" (click)="addNewEntry({childType: tocEntryEnumValues.FieldSet,parent: selectedTocEntry})"> <div class="action-list-item" (click)="addNewEntry({childType: tocEntryEnumValues.FieldSet,parent: selectedTocEntry})">
<mat-icon class="action-list-icon">folder</mat-icon> <mat-icon class="action-list-icon">folder</mat-icon>
<img src="/assets/images/editor/icons/add_input_set.svg" class="input_icon" alt="Add Question icon">
<span class="action-list-text" >{{'DATASET-PROFILE-EDITOR.STEPS.TOOLKIT.NEW-INPUT-SET' | translate}}</span> <span class="action-list-text" >{{'DATASET-PROFILE-EDITOR.STEPS.TOOLKIT.NEW-INPUT-SET' | translate}}</span>
</div> </div>
</li> </li>
@ -360,6 +313,7 @@
<li *ngIf="selectedTocEntry.type === tocEntryEnumValues.FieldSet" class="mli"> <li *ngIf="selectedTocEntry.type === tocEntryEnumValues.FieldSet" class="mli">
<div class="action-list-item" (click)="cloneFieldSet(selectedTocEntry.form)"> <div class="action-list-item" (click)="cloneFieldSet(selectedTocEntry.form)">
<mat-icon class="action-list-icon">file_copy</mat-icon> <mat-icon class="action-list-icon">file_copy</mat-icon>
<img src="/assets/images/editor/icons/clone.svg" class="input_icon" alt="Clone icon">
<span class="action-list-text">{{'DATASET-PROFILE-EDITOR.STEPS.TOOLKIT.CLONE' | translate}}</span> <span class="action-list-text">{{'DATASET-PROFILE-EDITOR.STEPS.TOOLKIT.CLONE' | translate}}</span>
</div> </div>
</li> </li>
@ -371,7 +325,7 @@
</div> </div>
</li> </li>
</ul> </ul>
</nav> </nav> -->
<!-- <ng-container *ngIf="!viewOnly"> <!-- <ng-container *ngIf="!viewOnly">
<h3 matSubheader>{{'DATASET-PROFILE-EDITOR.STEPS.TOOLKIT.GENERAL-TOOLS' | translate}}</h3> <h3 matSubheader>{{'DATASET-PROFILE-EDITOR.STEPS.TOOLKIT.GENERAL-TOOLS' | translate}}</h3>
@ -404,8 +358,8 @@
</mat-list-item> </mat-list-item>
</ng-container> --> </ng-container> -->
</div> <!-- </div>
</div> </div> -->
</div> </div>
<!-- <!--
@ -501,11 +455,11 @@
console form console form
</button> </button>
</div> --> </div> -->
<!--
<div *ngIf="form">{{form.value | json}}</div>
<br> <!-- <div *ngIf="form">{{form.value | json}}</div>
<br>
<br> -->
<!-- <br>
<div class="row"> <div class="row">
{{form.controls?.sections.value |json}} {{form.controls?.sections.value |json}}
</div> --> </div> -->

View File

@ -175,12 +175,19 @@ $blue-color-light: #5cf7f2;
.action-list-icon{ .action-list-icon{
font-size: 1.2em; font-size: 1.2em;
padding-right: 1em; // padding-right: 1em;
width: 14px;
margin-right: 0.5em;
margin-left: -.09em;
height: auto; height: auto;
color: #129D99;; color: #129D99;;
} }
.input_icon{
width: 14px;
margin-right: .5em;
}
.action-list-text{ .action-list-text{
font-size: 0.9em;; font-size: 0.9em;
} }
} }
.action-list-label{ .action-list-label{

View File

@ -44,6 +44,7 @@ import { SideNavService } from '@app/core/services/sidenav/side-nav.sevice';
import { EditorCustomValidators, EditorCustomValidatorsEnum } from './custom-validators/editor-custom-validators'; import { EditorCustomValidators, EditorCustomValidatorsEnum } from './custom-validators/editor-custom-validators';
import { CustomErrorValidator } from '@common/forms/validation/custom-validator'; import { CustomErrorValidator } from '@common/forms/validation/custom-validator';
import { STEPPER_ANIMATIONS } from './animations/animations'; import { STEPPER_ANIMATIONS } from './animations/animations';
import { DatasetProfileComboBoxType } from '@app/core/common/enum/dataset-profile-combo-box-type';
const skipDisable: any[] = require('../../../../../assets/resources/skipDisable.json'); const skipDisable: any[] = require('../../../../../assets/resources/skipDisable.json');
@ -77,7 +78,7 @@ export class DatasetProfileEditorComponent extends BaseComponent implements OnIn
colorizeInvalid:boolean = false; colorizeInvalid:boolean = false;
customEditorValidators = new EditorCustomValidators(); // customEditorValidators = new EditorCustomValidators();
// sectionIdPreviewed:string = null; // sectionIdPreviewed:string = null;
// currentSubForm:FormGroup = null; // currentSubForm:FormGroup = null;
@ -191,7 +192,7 @@ export class DatasetProfileEditorComponent extends BaseComponent implements OnIn
} else { } else {
this.dataModel = new DatasetProfileEditorModel(); this.dataModel = new DatasetProfileEditorModel();
this.form = this.dataModel.buildForm(); this.form = this.dataModel.buildForm();
this.form.setValidators([this.customEditorValidators.atLeastOneElementListValidator('pages'), this.customEditorValidators.pagesHaveAtLeastOneSection('pages', 'sections')]); // this.form.setValidators([EditorCustomValidators.atLeastOneElementListValidator('pages'), EditorCustomValidators.pagesHaveAtLeastOneSection('pages', 'sections')]);
if (this.dataModel.status === DatasetProfileEnum.FINALIZED) { if (this.dataModel.status === DatasetProfileEnum.FINALIZED) {
this.form.disable(); this.form.disable();
@ -219,13 +220,16 @@ export class DatasetProfileEditorComponent extends BaseComponent implements OnIn
if(tocentries && tocentries.length){ if(tocentries && tocentries.length){
this.selectedTocEntry = tocentries[0]; this.selectedTocEntry = tocentries[0];
} }
// this._initializeFormValidity(tocentries);
} }
prepareForm() { prepareForm() {
this.visibilityRulesService.buildVisibilityRules([],this.form); this.visibilityRulesService.buildVisibilityRules([],this.form);
this.form.setValidators([this.customEditorValidators.atLeastOneElementListValidator('pages'),this.customEditorValidators.pagesHaveAtLeastOneSection('pages', 'sections')]); // this.form.setValidators([EditorCustomValidators.atLeastOneElementListValidator('pages'),EditorCustomValidators.pagesHaveAtLeastOneSection('pages', 'sections')]);
// this.form.updateValueAndValidity();
this.form.valueChanges this.form.valueChanges
.pipe(takeUntil(this._destroyed)) .pipe(takeUntil(this._destroyed))
.subscribe(change => { .subscribe(change => {
@ -239,7 +243,6 @@ export class DatasetProfileEditorComponent extends BaseComponent implements OnIn
// this.previewerFormGroup = <FormGroup>this.dataWizardModel.buildForm().get('datasetProfileDefinition'); // this.previewerFormGroup = <FormGroup>this.dataWizardModel.buildForm().get('datasetProfileDefinition');
// }); // });
}); });
this.form.updateValueAndValidity();
setTimeout(() => { setTimeout(() => {
this.steps = this.stepper.steps; this.steps = this.stepper.steps;
}); });
@ -812,8 +815,8 @@ export class DatasetProfileEditorComponent extends BaseComponent implements OnIn
const sectionAdded = sectionsArray.at(sectionsArray.length -1) as FormGroup; const sectionAdded = sectionsArray.at(sectionsArray.length -1) as FormGroup;
sectionAdded.setValidators(this.customEditorValidators.sectionHasAtLeastOneChildOf('fieldSets','sections')); // sectionAdded.setValidators(this.customEditorValidators.sectionHasAtLeastOneChildOf('fieldSets','sections'));
sectionAdded.updateValueAndValidity(); // sectionAdded.updateValueAndValidity();
this.refreshToCEntries(); this.refreshToCEntries();
@ -1544,7 +1547,15 @@ export class DatasetProfileEditorComponent extends BaseComponent implements OnIn
return stepUnlocked; return stepUnlocked;
} }
validateStep(step: CdkStep){ validateStep(selectedIndex){
if(selectedIndex === 1){//form description
if(this.form.invalid){
this.checkFormValidation();
}
}
// if(step.hasError){ // if(step.hasError){
// this.printMyErrors(this.form); // this.printMyErrors(this.form);
// } // }
@ -1676,6 +1687,11 @@ export class DatasetProfileEditorComponent extends BaseComponent implements OnIn
} }
} }
/**
* Get all filedsets in a tocentry array;
* @param entries Tocentries to search in
* @returns The tocentries that are Fieldsets provided in the entries
*/
private _getAllFieldSets(entries: ToCEntry[]):ToCEntry[]{ private _getAllFieldSets(entries: ToCEntry[]):ToCEntry[]{
const fieldsets:ToCEntry[] = []; const fieldsets:ToCEntry[] = [];
@ -1839,6 +1855,48 @@ export class DatasetProfileEditorComponent extends BaseComponent implements OnIn
} }
//Temporary patch
/**
* Append custom validators to fields. Some validators are applied on template. In case they are never rendereed,
* he form might be valid when it shouldnt.
* @param
*/
private _initializeFormValidity(tocentries: ToCEntry[]) {
const fieldsets = this._getAllFieldSets(tocentries);
try{
fieldsets.forEach(fs=>{
fs.form.get('title').setValidators(Validators.required);
const fieldsF = fs.form.get('fields') as FormArray;
if(fieldsF){
fieldsF.controls.forEach(field=>{
const renderStyleValue = field.get('viewStyle').get('renderStyle').value;
if(renderStyleValue === DatasetProfileFieldViewStyle.CheckBox){
field.get('defaultValue').get('value').setValidators(Validators.required);
}else if(renderStyleValue === 'combobox'){
const comboType = field.get('data').get('type').value;
if(comboType === DatasetProfileComboBoxType.Autocomplete){//As 'Other' in UI
field.get('data').setValidators(EditorCustomValidators.atLeastOneElementListValidator('autoCompleteSingleDataList'));
}else if(comboType === DatasetProfileComboBoxType.WordList){
field.get('data').setValidators(EditorCustomValidators.atLeastOneElementListValidator('options'));
}
}else if(renderStyleValue === DatasetProfileFieldViewStyle.RadioBox){
field.get('data').setValidators(EditorCustomValidators.atLeastOneElementListValidator('options'));
}
});
}
});
}catch(e){
console.error('Error initializing validators.');
console.error(e);
}
}
} }
interface InvalidControl{ interface InvalidControl{

View File

@ -67,6 +67,10 @@
<mat-icon>library_books</mat-icon> <mat-icon>library_books</mat-icon>
{{'DATASET-PROFILE-LISTING.ACTIONS.VIEW-VERSIONS' | translate}} {{'DATASET-PROFILE-LISTING.ACTIONS.VIEW-VERSIONS' | translate}}
</button> </button>
<button mat-menu-item (click)="deleteTemplate(row.id)">
<mat-icon>delete</mat-icon>
{{'DATASET-PROFILE-LISTING.ACTIONS.DELETE' | translate}}
</button>
<!--<button *ngIf="row.status==1" mat-menu-item (click)="makeItPublic(row.id)"><mat-icon>people_outline</mat-icon>{{'DATASET-LISTING.ACTIONS.MAKE-IT-PUBLIC' | translate}}</button> --> <!--<button *ngIf="row.status==1" mat-menu-item (click)="makeItPublic(row.id)"><mat-icon>people_outline</mat-icon>{{'DATASET-LISTING.ACTIONS.MAKE-IT-PUBLIC' | translate}}</button> -->
</mat-menu> </mat-menu>
<button mat-icon-button [matMenuTriggerFor]="actionsMenu"> <button mat-icon-button [matMenuTriggerFor]="actionsMenu">

View File

@ -1,5 +1,5 @@
import { DataSource } from '@angular/cdk/table'; import { DataSource } from '@angular/cdk/table';
import { HttpClient } from '@angular/common/http'; import { HttpClient, HttpErrorResponse } from '@angular/common/http';
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { MatDialog } from '@angular/material/dialog'; import { MatDialog } from '@angular/material/dialog';
import { MatPaginator, PageEvent } from '@angular/material/paginator'; import { MatPaginator, PageEvent } from '@angular/material/paginator';
@ -13,10 +13,11 @@ import { DatasetProfileCriteria } from '@app/core/query/dataset-profile/dataset-
import { DatasetProfileService } from '@app/core/services/dataset-profile/dataset-profile.service'; import { DatasetProfileService } from '@app/core/services/dataset-profile/dataset-profile.service';
import { DmpService } from '@app/core/services/dmp/dmp.service'; import { DmpService } from '@app/core/services/dmp/dmp.service';
import { MatomoService } from '@app/core/services/matomo/matomo-service'; import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { UiNotificationService } from '@app/core/services/notification/ui-notification-service'; import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
import { DatasetProfileCriteriaComponent } from '@app/ui/admin/dataset-profile/listing/criteria/dataset-profile.component'; import { DatasetProfileCriteriaComponent } from '@app/ui/admin/dataset-profile/listing/criteria/dataset-profile.component';
import { BreadcrumbItem } from '@app/ui/misc/breadcrumb/definition/breadcrumb-item'; import { BreadcrumbItem } from '@app/ui/misc/breadcrumb/definition/breadcrumb-item';
import { BaseComponent } from '@common/base/base.component'; import { BaseComponent } from '@common/base/base.component';
import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { merge as observableMerge, Observable, of as observableOf } from 'rxjs'; import { merge as observableMerge, Observable, of as observableOf } from 'rxjs';
import { map, startWith, switchMap, takeUntil } from 'rxjs/operators'; import { map, startWith, switchMap, takeUntil } from 'rxjs/operators';
@ -51,7 +52,8 @@ export class DatasetProfileListingComponent extends BaseComponent implements OnI
private uiNotificationService: UiNotificationService, private uiNotificationService: UiNotificationService,
private httpClient: HttpClient, private httpClient: HttpClient,
private matomoService: MatomoService, private matomoService: MatomoService,
private dialog: MatDialog private dialog: MatDialog,
private datasetProfileService: DatasetProfileService,
) { ) {
super(); super();
} }
@ -123,6 +125,47 @@ export class DatasetProfileListingComponent extends BaseComponent implements OnI
this.router.navigate(['/dataset-profiles/versions/' + rowId], { queryParams: { groupLabel: rowLabel } }); this.router.navigate(['/dataset-profiles/versions/' + rowId], { queryParams: { groupLabel: rowLabel } });
} }
deleteTemplate(id: string){
if(id){
const dialogRef = this.dialog.open(ConfirmationDialogComponent, {
restoreFocus: false,
data: {
message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.DELETE-ITEM'),
confirmButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CONFIRM'),
cancelButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CANCEL'),
isDeleteConfirmation: true
}
});
dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => {
if (result) {
//this.form.get('status').setValue(DatasetProfileEnum.DELETED);
this.datasetProfileService.delete(id, null)
.pipe(takeUntil(this._destroyed))
.subscribe(
complete => {
this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-DATASET-PROFILE-DELETE'), SnackBarNotificationLevel.Success);
this.refresh();
},
error => {
this.onCallbackError(error);
if (error.error.statusCode == 674) {
this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.SNACK-BAR.UNSUCCESSFUL-DATASET-PROFILE-DELETE'), SnackBarNotificationLevel.Error);
} else {
this.uiNotificationService.snackBarNotification(this.language.instant(error.message), SnackBarNotificationLevel.Error);
}
}
);
}
});
}
}
onCallbackError(errorResponse: HttpErrorResponse) {
this.uiNotificationService.snackBarNotification(errorResponse.message, SnackBarNotificationLevel.Warning);
}
// makeItPublic(id: String) { // makeItPublic(id: String) {
// debugger; // debugger;
// this.datasetService.makeDatasetPublic(id).pipe(takeUntil(this._destroyed)).subscribe(); // this.datasetService.makeDatasetPublic(id).pipe(takeUntil(this._destroyed)).subscribe();

View File

@ -22,12 +22,27 @@
[ngStyle]="{'font-size' : (parentLink.type == tocEntryType.FieldSet? '.9rem':'1rem')}" [ngStyle]="{'font-size' : (parentLink.type == tocEntryType.FieldSet? '.9rem':'1rem')}"
> --> > -->
<span class="table-label-element" [ngClass]="{'table-label-element-active': itemSelected?.id == parentLink?.id, 'text-danger': colorError()}" (click)="itemClicked(parentLink)" <span class="table-label-element"
[ngClass]="{'table-label-element-active': itemSelected?.id == parentLink?.id, 'text-danger': colorError() ||(!colorError() && !selectedItemInLinks && parentLink?.form.invalid && colorizeInvalid && (itemSelected?.id != parentLink?.id) && !_findTocEntryById(itemSelected?.id, parentLink?.subEntries))}"
(click)="itemClicked(parentLink)"
[ngStyle]="{'font-size' : (parentLink.type == tocEntryType.FieldSet? '.9rem':'1rem')}" [ngStyle]="{'font-size' : (parentLink.type == tocEntryType.FieldSet? '.9rem':'1rem')}"
[id]="'TABLE_ENTRY'+parentLink.id" [id]="'TABLE_ENTRY'+parentLink.id"
> >
<!-- {{parentLink?.numbering}} {{parentLink?.label? parentLink?.label : 'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.UNTITLED' | translate}} --> <!-- {{parentLink?.numbering}} {{parentLink?.label? parentLink?.label : 'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.UNTITLED' | translate}} -->
<!-- {{parentLink?.numbering}} {{parentLink?.form.get('title').value? parentLink?.form.get('title').value : ('DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.UNTITLED' | translate) + ' '+ ( (parentLink.type ===tocEntryType.Page? ('DATASET-PROFILE-EDITOR.STEPS.PAGE-INFO.PAGE' | translate) : (parentLink.type === tocEntryType.Section? ('DATASET-PROFILE-EDITOR.STEPS.SECTION-INFO.SECTION' | translate) : '') ) | lowercase )}} -->
{{parentLink?.numbering}} {{parentLink?.form.get('title').value? parentLink?.form.get('title').value : 'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.UNTITLED' | translate}} {{parentLink?.numbering}} {{parentLink?.form.get('title').value? parentLink?.form.get('title').value : 'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.UNTITLED' | translate}}
<ng-container *ngIf="!parentLink.form.get('title').value" [ngSwitch]="parentLink.type">
<ng-container *ngSwitchCase="tocEntryType.FieldSet">
{{'DATASET-PROFILE-EDITOR.STEPS.GENERAL-INFO.QUESTION' | translate |lowercase}}
</ng-container>
<ng-container *ngSwitchCase="tocEntryType.Section">
{{'DATASET-PROFILE-EDITOR.STEPS.SECTION-INFO.SECTION' | translate |lowercase}}
</ng-container>
<ng-container *ngSwitchCase="tocEntryType.Page">
{{'DATASET-PROFILE-EDITOR.STEPS.PAGE-INFO.PAGE' | translate | lowercase}}
</ng-container>
</ng-container>
<!-- {{parentLink?.numbering}} {{parentLink?.form.get('title').value? parentLink?.form.get('title').value : parentLink.id}} --> <!-- {{parentLink?.numbering}} {{parentLink?.form.get('title').value? parentLink?.form.get('title').value : parentLink.id}} -->
</span> </span>
@ -36,7 +51,7 @@
<div class="col-auto d-flex align-items-center" > <div class="col-auto d-flex align-items-center" >
<ng-container *ngIf="!(!((parentLink?.subEntriesType == tocEntryType.FieldSet) && !selectedItemInLinks) || itemSelected?.id == parentLink.id ||isDragging)"> <ng-container *ngIf="!(!((parentLink?.subEntriesType == tocEntryType.FieldSet) && !selectedItemInLinks) || itemSelected?.id == parentLink.id ||isDragging)">
<mat-icon class="text-danger" style="font-size: 1.4em;" *ngIf="!colorError() && parentLink?.form.invalid && colorizeInvalid && allFieldsAreTouched(parentLink?.form)">priority_high</mat-icon> <!-- <mat-icon class="text-danger" style="font-size: 1.4em;" *ngIf="!colorError() && parentLink?.form.invalid && colorizeInvalid && allFieldsAreTouched(parentLink?.form)">priority_high</mat-icon> -->
<span class="badge-ball" <span class="badge-ball"
> >
{{parentLink.subEntries?.length}} {{parentLink.subEntries?.length}}

View File

@ -0,0 +1,37 @@
<div *ngFor="let compositeFieldFormGroup of form.get('compositeFields')['controls']; let i = index;" class="col-12">
<div class="row" *ngIf="this.visibilityRulesService.checkElementVisibility(compositeFieldFormGroup.get('id').value) && this.visibilityRulesService.scanIfChildsOfCompositeFieldHasVisibleItems(compositeFieldFormGroup)">
<div class="col-12">
<div class="row">
<app-form-composite-field class="align-self-center col" [form]="compositeFieldFormGroup" [datasetProfileId]="datasetProfileId"
[isChild]="false" [showDelete]="(compositeFieldFormGroup.get('multiplicityItems').length) > 0"></app-form-composite-field>
</div>
</div>
<div *ngIf="compositeFieldFormGroup" class="col-12">
<div class="row">
<div class="col-12" *ngFor="let multipleCompositeFieldFormGroup of compositeFieldFormGroup.get('multiplicityItems')['controls']; let j = index">
<div class="row">
<app-form-composite-field class=" align-self-center col" [form]="multipleCompositeFieldFormGroup" [datasetProfileId]="datasetProfileId"
[isChild]="true" [showDelete]="true"></app-form-composite-field>
</div>
</div>
<div *ngIf="(compositeFieldFormGroup.get('multiplicity').value.max - 1) > (compositeFieldFormGroup.get('multiplicityItems').length)"
class="col-12 ml-0 mr-0 addOneFieldButton">
<button mat-icon-button color="primary" (click)="addMultipleField(i)" [disabled]="compositeFieldFormGroup.disabled" matTooltip="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.COMPOSITE-FIELD.FIELDS.MULTIPLICITY-ADD-ONE-FIELD' | translate}}">
<mat-icon>add_circle</mat-icon>
</button>
</div>
<mat-form-field *ngIf="compositeFieldFormGroup.get('hasCommentField').value" class="col-12 mb-2" [formGroup]="compositeFieldFormGroup">
<input matInput formControlName="commentFieldValue" placeholder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.COMPOSITE-FIELD.FIELDS.COMMENT-PLACEHOLDER' | translate}}">
<mat-hint>{{'DATASET-PROFILE-EDITOR.STEPS.FORM.COMPOSITE-FIELD.FIELDS.COMMENT-HINT' | translate}}</mat-hint>
</mat-form-field>
<!-- <div class="col"></div>
<button class="col-auto" mat-icon-button type="button" (click)="next(compositeField)">
<mat-icon>expand_more</mat-icon>
</button> -->
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,45 @@
.dynamic-form-section {
.expansion-panel {
// background-color: #eeeeee54;
background-color: white;
margin-top: 1em;
margin-bottom: 1em;
// margin-bottom: 1em;
}
.addOneFieldButton {
margin-top: -15px;
margin-left: -11px;
color: #129d99;
}
.panel-title,
.panel-desc {
text-align: left;
font-weight: 700;
font-size: 1rem;
letter-spacing: 0px;
color: #212121;
opacity: 0.81;
margin-top: 1.625rem;
margin-bottom: 0.625rem;
}
.panel-desc {
text-transform: capitalize;
font-weight: 400;
margin-top: .5rem;
}
}
.styleBorder {
border: 0.2em solid lightgray;
border-radius: 0.5em;
margin-bottom: 0.5em;
}
.mat-expansion-panel-header-description {
padding-bottom: 18px;
color: black;
}
::ng-deep .mat-expansion-panel-header {
height: auto !important;
min-height: 48px;
}

View File

@ -0,0 +1,85 @@
import { AfterViewInit, Component, Input, OnInit, OnChanges, SimpleChanges } from '@angular/core';
import { FormGroup, FormArray, AbstractControl } from '@angular/forms';
import { FormFocusService } from '../../../form-focus/form-focus.service';
import { VisibilityRulesService } from '../../../visibility-rules/visibility-rules.service';
import { DatasetDescriptionSectionEditorModel, DatasetDescriptionCompositeFieldEditorModel } from '../../../dataset-description-form.model';
import { FormCompositeFieldComponent } from '../../form-composite-field/form-composite-field.component';
import { LinkToScroll } from '../../../tableOfContentsMaterial/table-of-contents';
@Component({
selector: 'app-form-section-inner',
templateUrl: './form-section-inner.component.html',
styleUrls: ['./form-section-inner.component.scss']
})
export class FormSectionInnerComponent implements OnInit, OnChanges {
//@Input() section: DatasetDescriptionSectionEditorModel;
@Input() datasetProfileId: String;
// @Input() compositeFieldFormGroup: FormGroup;
@Input() form:FormGroup;
@Input() pathName: string;
@Input() path: string;
// @Input() i: number;
@Input() linkToScroll: LinkToScroll;
//trackByFn = (index, item) => item ? item['id'] : null;
panelExpanded = true;
// sub = true;
subsectionLinkToScroll: LinkToScroll;
constructor(
public visibilityRulesService: VisibilityRulesService,
private formFocusService: FormFocusService
) { }
ngOnInit() {
// if (this.section) {
// this.form = this.visibilityRulesService.getFormGroup(this.section.id);
// }
}
ngOnChanges(changes: SimpleChanges) {
// if (changes['linkToScroll']) {
// if (changes['linkToScroll'].currentValue && changes['linkToScroll'].currentValue.section) {
// if (this.pathName === changes['linkToScroll'].currentValue.section) {
// this.panelExpanded = true;
// } else if (changes['linkToScroll'].currentValue.section.includes(this.pathName)) {
// this.subsectionLinkToScroll = changes['linkToScroll'].currentValue;
// this.panelExpanded = true;
// }
// }
// }
}
// ngAfterViewInit() {
// this.visibilityRulesService.triggerVisibilityEvaluation();
// }
addMultipleField(fieldsetIndex: number) {
const compositeFieldToBeCloned = (this.form.get('compositeFields').get('' + fieldsetIndex) as FormGroup).getRawValue();
const compositeField: DatasetDescriptionCompositeFieldEditorModel = new DatasetDescriptionCompositeFieldEditorModel().cloneForMultiplicity(compositeFieldToBeCloned);
(<FormArray>(this.form.get('compositeFields').get('' + fieldsetIndex).get('multiplicityItems'))).push(compositeField.buildForm());
}
deleteCompositeFieldFormGroup(compositeFildIndex: number) {
const numberOfItems = this.form.get('compositeFields').get('' + compositeFildIndex).get('multiplicityItems').get('' + 0).get('fields').value.length;
for (let i = 0; i < numberOfItems; i++) {
const multiplicityItem = this.form.get('compositeFields').get('' + compositeFildIndex).get('multiplicityItems').get('' + 0).get('fields').get('' + i).value;
this.form.get('compositeFields').get('' + compositeFildIndex).get('fields').get('' + i).patchValue(multiplicityItem);
}
(<FormArray>(this.form.get('compositeFields').get('' + compositeFildIndex).get('multiplicityItems'))).removeAt(0);
}
deleteMultipeFieldFromCompositeFormGroup(compositeFildIndex: number, fildIndex: number) {
(<FormArray>(this.form.get('compositeFields').get('' + compositeFildIndex).get('multiplicityItems'))).removeAt(fildIndex);
}
// isElementVisible(fieldSet: CompositeField): boolean {
// return fieldSet && fieldSet.fields && fieldSet.fields.length > 0
// }
// next(compositeField: CompositeField) {
// this.formFocusService.focusNext(compositeField);
// }
}

View File

@ -13,6 +13,8 @@ import { FormCompositeTitleComponent } from './components/form-composite-title/f
import { ExternalSourcesModule } from '../external-sources/external-sources.module'; import { ExternalSourcesModule } from '../external-sources/external-sources.module';
import { DatasetDescriptionComponent } from './dataset-description.component'; import { DatasetDescriptionComponent } from './dataset-description.component';
import { FormProgressIndicationModule } from './components/form-progress-indication/form-progress-indication.module'; import { FormProgressIndicationModule } from './components/form-progress-indication/form-progress-indication.module';
import { FormSectionInnerComponent } from './components/form-section/form-section-inner/form-section-inner.component';
@NgModule({ @NgModule({
imports: [ imports: [
@ -26,6 +28,7 @@ import { FormProgressIndicationModule } from './components/form-progress-indicat
DatasetDescriptionFormComponent, DatasetDescriptionFormComponent,
DatasetDescriptionComponent, DatasetDescriptionComponent,
FormSectionComponent, FormSectionComponent,
FormSectionInnerComponent,
FormCompositeFieldComponent, FormCompositeFieldComponent,
FormFieldComponent, FormFieldComponent,
FormCompositeTitleComponent FormCompositeTitleComponent
@ -34,7 +37,8 @@ import { FormProgressIndicationModule } from './components/form-progress-indicat
DatasetDescriptionFormComponent, DatasetDescriptionFormComponent,
DatasetDescriptionComponent, DatasetDescriptionComponent,
FormCompositeFieldComponent, FormCompositeFieldComponent,
FormFieldComponent FormFieldComponent,
FormSectionInnerComponent
], ],
providers: [ providers: [
VisibilityRulesService, VisibilityRulesService,

View File

@ -290,36 +290,37 @@
"DATASET-TEMPLATE-LANGUAGE": "Dataset template language", "DATASET-TEMPLATE-LANGUAGE": "Dataset template language",
"DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language", "DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language",
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description", "DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
"UNTITLED": "Untitled" "UNTITLED": "Untitled",
"QUESTION": "Question"
}, },
"PAGE-INFO": { "PAGE-INFO": {
"PAGE-NAME": "Section Name", "PAGE-NAME": "Chapter Name",
"PAGE-NAME-HINT": "Set a name for the dataset section.", "PAGE-NAME-HINT": "Set a name for the dataset chapter.",
"PAGE-DESCRIPTION": "Description", "PAGE-DESCRIPTION": "Description",
"PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the section is about.", "PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the chapter is about.",
"ACTIONS": { "ACTIONS": {
"CREATE-FIRST-PAGE": "Create the first Section", "CREATE-FIRST-PAGE": "Create the first chapter",
"CREATE-NEW-SUBSECTION": "Create new subsection", "CREATE-NEW-SUBSECTION": "Section",
"CREATE-NEW-SECTION": "Create new section", "CREATE-NEW-SECTION": "Chapter",
"CREATE-FIRST-SECTION":"Create the first section", "CREATE-FIRST-SECTION":"Create the first chapter",
"NOTHING-HERE-HINT": "Nothing here yet.", "NOTHING-HERE-HINT": "Nothing here yet.",
"START-CREATING-PAGE-START": "Start by ", "START-CREATING-PAGE-START": "Start by ",
"START-CREATING-PAGE-END": "creating the first section." "START-CREATING-PAGE-END": "creating the first chapter."
}, },
"PAGE": "Section" "PAGE": "Chapter"
}, },
"SECTION-INFO": { "SECTION-INFO": {
"SECTION-NAME": "Subsection Name", "SECTION-NAME": "Section Name",
"SECTION-NAME-HINT": "Set a name for the subsection.", "SECTION-NAME-HINT": "Set a name for the section.",
"SECTION-DESCRIPTION": "Description", "SECTION-DESCRIPTION": "Description",
"SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the subsection is about.", "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the section is about.",
"SECTION": "Subsection" "SECTION": "Section"
}, },
"PAGES": { "PAGES": {
"TITLE": "Page Description", "TITLE": "Chapter Description",
"PAGE-PREFIX": "Page", "PAGE-PREFIX": "Chapter",
"PAGE-INPUT-TITLE": "Page Title", "PAGE-INPUT-TITLE": "Chapter Title",
"DATASET-DETAILS": "Dataset Description Details", "DATASET-DETAILS": "Dataset Details",
"EXTERNAL-REFERENCES": "External References", "EXTERNAL-REFERENCES": "External References",
"DESCRIPTION": "Description" "DESCRIPTION": "Description"
}, },
@ -463,7 +464,9 @@
"TARGET": "Target Field Id", "TARGET": "Target Field Id",
"VALUE": "Required Value", "VALUE": "Required Value",
"RULE-IF": "If Value is", "RULE-IF": "If Value is",
"RULE-THEN": "then show Field With Id" "RULE-THEN": "then show Field With Id",
"FIELDSETS": "Input sets",
"FIELDS":"Inputs"
} }
}, },
"FORM-VALIDATION":{ "FORM-VALIDATION":{
@ -485,8 +488,8 @@
} }
}, },
"TOOLKIT": { "TOOLKIT": {
"GENERAL-TOOLS": "General tools", "GENERAL-TOOLS": "Questions tools",
"NEW-INPUT-SET": "Add Input Set", "NEW-INPUT-SET": "Add Question",
"CLONE": "Clone", "CLONE": "Clone",
"DELETE": "Delete" "DELETE": "Delete"
} }
@ -819,7 +822,8 @@
"VIEW": "Ansehen", "VIEW": "Ansehen",
"CLONE": "Klon", "CLONE": "Klon",
"NEW-VERSION": "Neue Version", "NEW-VERSION": "Neue Version",
"VIEW-VERSIONS": "Alle Vorlagenversionen für Datensatzbeschreibungen" "VIEW-VERSIONS": "Alle Vorlagenversionen für Datensatzbeschreibungen",
"DELETE":"Delete"
} }
}, },
"DATASET-UPLOAD": { "DATASET-UPLOAD": {

View File

@ -290,35 +290,36 @@
"DATASET-TEMPLATE-LANGUAGE": "Dataset template language", "DATASET-TEMPLATE-LANGUAGE": "Dataset template language",
"DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language", "DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language",
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description", "DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
"UNTITLED": "Untitled" "UNTITLED": "Untitled",
"QUESTION": "Question"
}, },
"PAGE-INFO": { "PAGE-INFO": {
"PAGE-NAME": "Section Name", "PAGE-NAME": "Chapter Name",
"PAGE-NAME-HINT": "Set a name for the dataset section.", "PAGE-NAME-HINT": "Set a name for the dataset chapter.",
"PAGE-DESCRIPTION": "Description", "PAGE-DESCRIPTION": "Description",
"PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the section is about.", "PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the chapter is about.",
"ACTIONS": { "ACTIONS": {
"CREATE-FIRST-PAGE": "Create the first Section", "CREATE-FIRST-PAGE": "Create the first chapter",
"CREATE-NEW-SUBSECTION": "Create new subsection", "CREATE-NEW-SUBSECTION": "Section",
"CREATE-NEW-SECTION": "Create new section", "CREATE-NEW-SECTION": "Chapter",
"CREATE-FIRST-SECTION":"Create the first section", "CREATE-FIRST-SECTION":"Create the first chapter",
"NOTHING-HERE-HINT": "Nothing here yet.", "NOTHING-HERE-HINT": "Nothing here yet.",
"START-CREATING-PAGE-START": "Start by ", "START-CREATING-PAGE-START": "Start by ",
"START-CREATING-PAGE-END": "creating the first section." "START-CREATING-PAGE-END": "creating the first chapter."
}, },
"PAGE": "Section" "PAGE": "Chapter"
}, },
"SECTION-INFO": { "SECTION-INFO": {
"SECTION-NAME": "Subsection Name", "SECTION-NAME": "Section Name",
"SECTION-NAME-HINT": "Set a name for the subsection.", "SECTION-NAME-HINT": "Set a name for the section.",
"SECTION-DESCRIPTION": "Description", "SECTION-DESCRIPTION": "Description",
"SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the subsection is about.", "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the section is about.",
"SECTION": "Subsection" "SECTION": "Section"
}, },
"PAGES": { "PAGES": {
"TITLE": "Page Description", "TITLE": "Chapter Description",
"PAGE-PREFIX": "Page", "PAGE-PREFIX": "Chapter",
"PAGE-INPUT-TITLE": "Page Title", "PAGE-INPUT-TITLE": "Chapter Title",
"DATASET-DETAILS": "Dataset Details", "DATASET-DETAILS": "Dataset Details",
"EXTERNAL-REFERENCES": "External References", "EXTERNAL-REFERENCES": "External References",
"DESCRIPTION": "Description" "DESCRIPTION": "Description"
@ -463,7 +464,9 @@
"TARGET": "Target Field Id", "TARGET": "Target Field Id",
"VALUE": "Required Value", "VALUE": "Required Value",
"RULE-IF": "If Value is", "RULE-IF": "If Value is",
"RULE-THEN": "then show Field With Id" "RULE-THEN": "then show Field With Id",
"FIELDSETS": "Input sets",
"FIELDS":"Inputs"
} }
}, },
"FORM-VALIDATION":{ "FORM-VALIDATION":{
@ -485,8 +488,8 @@
} }
}, },
"TOOLKIT": { "TOOLKIT": {
"GENERAL-TOOLS": "General tools", "GENERAL-TOOLS": "Questions tools",
"NEW-INPUT-SET": "Add Input Set", "NEW-INPUT-SET": "Add Question",
"CLONE": "Clone", "CLONE": "Clone",
"DELETE": "Delete" "DELETE": "Delete"
} }
@ -819,7 +822,8 @@
"VIEW": "View", "VIEW": "View",
"CLONE": "Clone", "CLONE": "Clone",
"NEW-VERSION": "New Version", "NEW-VERSION": "New Version",
"VIEW-VERSIONS": "All Dataset Template Versions" "VIEW-VERSIONS": "All Dataset Template Versions",
"DELETE":"Delete"
} }
}, },
"DATASET-UPLOAD": { "DATASET-UPLOAD": {

View File

@ -290,35 +290,36 @@
"DATASET-TEMPLATE-LANGUAGE": "Dataset template language", "DATASET-TEMPLATE-LANGUAGE": "Dataset template language",
"DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language", "DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language",
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description", "DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
"UNTITLED": "Untitled" "UNTITLED": "Untitled",
"QUESTION": "Question"
}, },
"PAGE-INFO": { "PAGE-INFO": {
"PAGE-NAME": "Section Name", "PAGE-NAME": "Chapter Name",
"PAGE-NAME-HINT": "Set a name for the dataset section.", "PAGE-NAME-HINT": "Set a name for the dataset chapter.",
"PAGE-DESCRIPTION": "Description", "PAGE-DESCRIPTION": "Description",
"PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the section is about.", "PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the chapter is about.",
"ACTIONS": { "ACTIONS": {
"CREATE-FIRST-PAGE": "Create the first Section", "CREATE-FIRST-PAGE": "Create the first chapter",
"CREATE-NEW-SUBSECTION": "Create new subsection", "CREATE-NEW-SUBSECTION": "Section",
"CREATE-NEW-SECTION": "Create new section", "CREATE-NEW-SECTION": "Chapter",
"CREATE-FIRST-SECTION":"Create the first section", "CREATE-FIRST-SECTION":"Create the first chapter",
"NOTHING-HERE-HINT": "Nothing here yet.", "NOTHING-HERE-HINT": "Nothing here yet.",
"START-CREATING-PAGE-START": "Start by ", "START-CREATING-PAGE-START": "Start by ",
"START-CREATING-PAGE-END": "creating the first section." "START-CREATING-PAGE-END": "creating the first chapter."
}, },
"PAGE": "Section" "PAGE": "Chapter"
}, },
"SECTION-INFO": { "SECTION-INFO": {
"SECTION-NAME": "Subsection Name", "SECTION-NAME": "Section Name",
"SECTION-NAME-HINT": "Set a name for the subsection.", "SECTION-NAME-HINT": "Set a name for the section.",
"SECTION-DESCRIPTION": "Description", "SECTION-DESCRIPTION": "Description",
"SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the subsection is about.", "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the section is about.",
"SECTION": "Subsection" "SECTION": "Section"
}, },
"PAGES": { "PAGES": {
"TITLE": "Descripición de la página", "TITLE": "Chapter Description",
"PAGE-PREFIX": "Página", "PAGE-PREFIX": "Chapter",
"PAGE-INPUT-TITLE": "Título de la página", "PAGE-INPUT-TITLE": "Chapter Title",
"DATASET-DETAILS": "Detalles de la descripción del dataset", "DATASET-DETAILS": "Detalles de la descripción del dataset",
"EXTERNAL-REFERENCES": "Referencias externas", "EXTERNAL-REFERENCES": "Referencias externas",
"DESCRIPTION": "Descripción" "DESCRIPTION": "Descripción"
@ -463,7 +464,9 @@
"TARGET": "Target Field Id", "TARGET": "Target Field Id",
"VALUE": "Valor requerido", "VALUE": "Valor requerido",
"RULE-IF": "Si el valor es", "RULE-IF": "Si el valor es",
"RULE-THEN": "entonces muestra el campo con identificación" "RULE-THEN": "entonces muestra el campo con identificación",
"FIELDSETS": "Input sets",
"FIELDS":"Inputs"
} }
}, },
"FORM-VALIDATION":{ "FORM-VALIDATION":{
@ -485,8 +488,8 @@
} }
}, },
"TOOLKIT": { "TOOLKIT": {
"GENERAL-TOOLS": "General tools", "GENERAL-TOOLS": "Questions tools",
"NEW-INPUT-SET": "Add Input Set", "NEW-INPUT-SET": "Add Question",
"CLONE": "Clone", "CLONE": "Clone",
"DELETE": "Delete" "DELETE": "Delete"
} }
@ -819,7 +822,8 @@
"VIEW": "Vista", "VIEW": "Vista",
"CLONE": "Clonar", "CLONE": "Clonar",
"NEW-VERSION": "Nueva versión", "NEW-VERSION": "Nueva versión",
"VIEW-VERSIONS": "Todas las versiones de las plantillas de descripción del dataset" "VIEW-VERSIONS": "Todas las versiones de las plantillas de descripción del dataset",
"DELETE":"Delete"
} }
}, },
"DATASET-UPLOAD": { "DATASET-UPLOAD": {

View File

@ -290,35 +290,36 @@
"DATASET-TEMPLATE-LANGUAGE": "Dataset template language", "DATASET-TEMPLATE-LANGUAGE": "Dataset template language",
"DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language", "DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language",
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description", "DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
"UNTITLED": "Untitled" "UNTITLED": "Untitled",
"QUESTION": "Question"
}, },
"PAGE-INFO": { "PAGE-INFO": {
"PAGE-NAME": "Section Name", "PAGE-NAME": "Chapter Name",
"PAGE-NAME-HINT": "Set a name for the dataset section.", "PAGE-NAME-HINT": "Set a name for the dataset chapter.",
"PAGE-DESCRIPTION": "Description", "PAGE-DESCRIPTION": "Description",
"PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the section is about.", "PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the chapter is about.",
"ACTIONS": { "ACTIONS": {
"CREATE-FIRST-PAGE": "Create the first Section", "CREATE-FIRST-PAGE": "Create the first chapter",
"CREATE-NEW-SUBSECTION": "Create new subsection", "CREATE-NEW-SUBSECTION": "Section",
"CREATE-NEW-SECTION": "Create new section", "CREATE-NEW-SECTION": "Chapter",
"CREATE-FIRST-SECTION":"Create the first section", "CREATE-FIRST-SECTION":"Create the first chapter",
"NOTHING-HERE-HINT": "Nothing here yet.", "NOTHING-HERE-HINT": "Nothing here yet.",
"START-CREATING-PAGE-START": "Start by ", "START-CREATING-PAGE-START": "Start by ",
"START-CREATING-PAGE-END": "creating the first section." "START-CREATING-PAGE-END": "creating the first chapter."
}, },
"PAGE": "Section" "PAGE": "Chapter"
}, },
"SECTION-INFO": { "SECTION-INFO": {
"SECTION-NAME": "Subsection Name", "SECTION-NAME": "Section Name",
"SECTION-NAME-HINT": "Set a name for the subsection.", "SECTION-NAME-HINT": "Set a name for the section.",
"SECTION-DESCRIPTION": "Description", "SECTION-DESCRIPTION": "Description",
"SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the subsection is about.", "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the section is about.",
"SECTION": "Subsection" "SECTION": "Section"
}, },
"PAGES": { "PAGES": {
"TITLE": "Περιγραφή Σελίδας", "TITLE": "Chapter Description",
"PAGE-PREFIX": "Σελίδα", "PAGE-PREFIX": "Chapter",
"PAGE-INPUT-TITLE": "Τίτλος Σελίδας", "PAGE-INPUT-TITLE": "Chapter Title",
"DATASET-DETAILS": "Λεπτομέρειες Περιγραφής Συνόλου Δεδομένων", "DATASET-DETAILS": "Λεπτομέρειες Περιγραφής Συνόλου Δεδομένων",
"EXTERNAL-REFERENCES": "Εξωτερικές Πηγές", "EXTERNAL-REFERENCES": "Εξωτερικές Πηγές",
"DESCRIPTION": "Περιγραφή" "DESCRIPTION": "Περιγραφή"
@ -463,7 +464,9 @@
"TARGET": "Ταυτοποίηση στοχοθετημένου πεδίου", "TARGET": "Ταυτοποίηση στοχοθετημένου πεδίου",
"VALUE": "Απαιτούμενη τιμή", "VALUE": "Απαιτούμενη τιμή",
"RULE-IF": "Εάν η τιμή είναι", "RULE-IF": "Εάν η τιμή είναι",
"RULE-THEN": "τότε δείξε το Πεδίο με ταυτοποίηση" "RULE-THEN": "τότε δείξε το Πεδίο με ταυτοποίηση",
"FIELDSETS": "Input sets",
"FIELDS":"Inputs"
} }
}, },
"FORM-VALIDATION":{ "FORM-VALIDATION":{
@ -485,8 +488,8 @@
} }
}, },
"TOOLKIT": { "TOOLKIT": {
"GENERAL-TOOLS": "General tools", "GENERAL-TOOLS": "Questions tools",
"NEW-INPUT-SET": "Add Input Set", "NEW-INPUT-SET": "Add Question",
"CLONE": "Clone", "CLONE": "Clone",
"DELETE": "Delete" "DELETE": "Delete"
} }
@ -819,7 +822,8 @@
"VIEW": "Προβολή", "VIEW": "Προβολή",
"CLONE": "Κλώνος", "CLONE": "Κλώνος",
"NEW-VERSION": "Νέα Έκδοση", "NEW-VERSION": "Νέα Έκδοση",
"VIEW-VERSIONS": "Όλες οι εκδόσεις των Templates Περιγραφής Συνόλου Δεδομένων" "VIEW-VERSIONS": "Όλες οι εκδόσεις των Templates Περιγραφής Συνόλου Δεδομένων",
"DELETE":"Delete"
} }
}, },
"DATASET-UPLOAD": { "DATASET-UPLOAD": {

View File

@ -290,35 +290,36 @@
"DATASET-TEMPLATE-LANGUAGE": "Dataset template language", "DATASET-TEMPLATE-LANGUAGE": "Dataset template language",
"DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language", "DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language",
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description", "DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
"UNTITLED": "Untitled" "UNTITLED": "Untitled",
"QUESTION": "Question"
}, },
"PAGE-INFO": { "PAGE-INFO": {
"PAGE-NAME": "Section Name", "PAGE-NAME": "Chapter Name",
"PAGE-NAME-HINT": "Set a name for the dataset section.", "PAGE-NAME-HINT": "Set a name for the dataset chapter.",
"PAGE-DESCRIPTION": "Description", "PAGE-DESCRIPTION": "Description",
"PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the section is about.", "PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the chapter is about.",
"ACTIONS": { "ACTIONS": {
"CREATE-FIRST-PAGE": "Create the first Section", "CREATE-FIRST-PAGE": "Create the first chapter",
"CREATE-NEW-SUBSECTION": "Create new subsection", "CREATE-NEW-SUBSECTION": "Section",
"CREATE-NEW-SECTION": "Create new section", "CREATE-NEW-SECTION": "Chapter",
"CREATE-FIRST-SECTION":"Create the first section", "CREATE-FIRST-SECTION":"Create the first chapter",
"NOTHING-HERE-HINT": "Nothing here yet.", "NOTHING-HERE-HINT": "Nothing here yet.",
"START-CREATING-PAGE-START": "Start by ", "START-CREATING-PAGE-START": "Start by ",
"START-CREATING-PAGE-END": "creating the first section." "START-CREATING-PAGE-END": "creating the first chapter."
}, },
"PAGE": "Section" "PAGE": "Chapter"
}, },
"SECTION-INFO": { "SECTION-INFO": {
"SECTION-NAME": "Subsection Name", "SECTION-NAME": "Section Name",
"SECTION-NAME-HINT": "Set a name for the subsection.", "SECTION-NAME-HINT": "Set a name for the section.",
"SECTION-DESCRIPTION": "Description", "SECTION-DESCRIPTION": "Description",
"SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the subsection is about.", "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the section is about.",
"SECTION": "Subsection" "SECTION": "Section"
}, },
"PAGES": { "PAGES": {
"TITLE": "Descrição da Página", "TITLE": "Chapter Description",
"PAGE-PREFIX": "Página", "PAGE-PREFIX": "Chapter",
"PAGE-INPUT-TITLE": "Título da Página", "PAGE-INPUT-TITLE": "Chapter Title",
"DATASET-DETAILS": "Detalhes do Dataset", "DATASET-DETAILS": "Detalhes do Dataset",
"EXTERNAL-REFERENCES": "Referências Externas", "EXTERNAL-REFERENCES": "Referências Externas",
"DESCRIPTION": "Descrição" "DESCRIPTION": "Descrição"
@ -463,7 +464,9 @@
"TARGET": "Id do Campo de Destino", "TARGET": "Id do Campo de Destino",
"VALUE": "Valor Obrigatório", "VALUE": "Valor Obrigatório",
"RULE-IF": "Se Valor é", "RULE-IF": "Se Valor é",
"RULE-THEN": "então mostrar Campo com o Id" "RULE-THEN": "então mostrar Campo com o Id",
"FIELDSETS": "Input sets",
"FIELDS":"Inputs"
} }
}, },
"FORM-VALIDATION":{ "FORM-VALIDATION":{
@ -485,8 +488,8 @@
} }
}, },
"TOOLKIT": { "TOOLKIT": {
"GENERAL-TOOLS": "General tools", "GENERAL-TOOLS": "Questions tools",
"NEW-INPUT-SET": "Add Input Set", "NEW-INPUT-SET": "Add Question",
"CLONE": "Clone", "CLONE": "Clone",
"DELETE": "Delete" "DELETE": "Delete"
} }
@ -819,7 +822,8 @@
"VIEW": "Ver", "VIEW": "Ver",
"CLONE": "Duplicar", "CLONE": "Duplicar",
"NEW-VERSION": "Nova Versão", "NEW-VERSION": "Nova Versão",
"VIEW-VERSIONS": "Todas as Versões de Modelos dos Datasets" "VIEW-VERSIONS": "Todas as Versões de Modelos dos Datasets",
"DELETE":"Delete"
} }
}, },
"DATASET-UPLOAD": { "DATASET-UPLOAD": {

View File

@ -290,35 +290,36 @@
"DATASET-TEMPLATE-LANGUAGE": "Dataset template language", "DATASET-TEMPLATE-LANGUAGE": "Dataset template language",
"DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language", "DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language",
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description", "DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
"UNTITLED": "Untitled" "UNTITLED": "Untitled",
"QUESTION": "Question"
}, },
"PAGE-INFO": { "PAGE-INFO": {
"PAGE-NAME": "Section Name", "PAGE-NAME": "Chapter Name",
"PAGE-NAME-HINT": "Set a name for the dataset section.", "PAGE-NAME-HINT": "Set a name for the dataset chapter.",
"PAGE-DESCRIPTION": "Description", "PAGE-DESCRIPTION": "Description",
"PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the section is about.", "PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the chapter is about.",
"ACTIONS": { "ACTIONS": {
"CREATE-FIRST-PAGE": "Create the first Section", "CREATE-FIRST-PAGE": "Create the first chapter",
"CREATE-NEW-SUBSECTION": "Create new subsection", "CREATE-NEW-SUBSECTION": "Section",
"CREATE-NEW-SECTION": "Create new section", "CREATE-NEW-SECTION": "Chapter",
"CREATE-FIRST-SECTION":"Create the first section", "CREATE-FIRST-SECTION":"Create the first chapter",
"NOTHING-HERE-HINT": "Nothing here yet.", "NOTHING-HERE-HINT": "Nothing here yet.",
"START-CREATING-PAGE-START": "Start by ", "START-CREATING-PAGE-START": "Start by ",
"START-CREATING-PAGE-END": "creating the first section." "START-CREATING-PAGE-END": "creating the first chapter."
}, },
"PAGE": "Section" "PAGE": "Chapter"
}, },
"SECTION-INFO": { "SECTION-INFO": {
"SECTION-NAME": "Subsection Name", "SECTION-NAME": "Section Name",
"SECTION-NAME-HINT": "Set a name for the subsection.", "SECTION-NAME-HINT": "Set a name for the section.",
"SECTION-DESCRIPTION": "Description", "SECTION-DESCRIPTION": "Description",
"SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the subsection is about.", "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the section is about.",
"SECTION": "Subsection" "SECTION": "Section"
}, },
"PAGES": { "PAGES": {
"TITLE": "Opis stránky", "TITLE": "Chapter Description",
"PAGE-PREFIX": "Stránka", "PAGE-PREFIX": "Chapter",
"PAGE-INPUT-TITLE": "Názov stránky", "PAGE-INPUT-TITLE": "Chapter Title",
"DATASET-DETAILS": "Podrobné informácie o súbore dát", "DATASET-DETAILS": "Podrobné informácie o súbore dát",
"EXTERNAL-REFERENCES": "Externé odkazy", "EXTERNAL-REFERENCES": "Externé odkazy",
"DESCRIPTION": "Opis" "DESCRIPTION": "Opis"
@ -463,7 +464,9 @@
"TARGET": "Target Field Id", "TARGET": "Target Field Id",
"VALUE": "Required Value", "VALUE": "Required Value",
"RULE-IF": "If Value is", "RULE-IF": "If Value is",
"RULE-THEN": "then show Field With Id" "RULE-THEN": "then show Field With Id",
"FIELDSETS": "Input sets",
"FIELDS":"Inputs"
} }
}, },
"FORM-VALIDATION":{ "FORM-VALIDATION":{
@ -485,8 +488,8 @@
} }
}, },
"TOOLKIT": { "TOOLKIT": {
"GENERAL-TOOLS": "General tools", "GENERAL-TOOLS": "Questions tools",
"NEW-INPUT-SET": "Add Input Set", "NEW-INPUT-SET": "Add Question",
"CLONE": "Clone", "CLONE": "Clone",
"DELETE": "Delete" "DELETE": "Delete"
} }
@ -819,7 +822,8 @@
"VIEW": "Pozrieť", "VIEW": "Pozrieť",
"CLONE": "Klonovať", "CLONE": "Klonovať",
"NEW-VERSION": "Nová verzia", "NEW-VERSION": "Nová verzia",
"VIEW-VERSIONS": "Všetky verzie šablóny súboru dát" "VIEW-VERSIONS": "Všetky verzie šablóny súboru dát",
"DELETE":"Delete"
} }
}, },
"DATASET-UPLOAD": { "DATASET-UPLOAD": {

View File

@ -290,35 +290,36 @@
"DATASET-TEMPLATE-LANGUAGE": "Dataset template language", "DATASET-TEMPLATE-LANGUAGE": "Dataset template language",
"DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language", "DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language",
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description", "DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
"UNTITLED": "Untitled" "UNTITLED": "Untitled",
"QUESTION": "Question"
}, },
"PAGE-INFO": { "PAGE-INFO": {
"PAGE-NAME": "Section Name", "PAGE-NAME": "Chapter Name",
"PAGE-NAME-HINT": "Set a name for the dataset section.", "PAGE-NAME-HINT": "Set a name for the dataset chapter.",
"PAGE-DESCRIPTION": "Description", "PAGE-DESCRIPTION": "Description",
"PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the section is about.", "PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the chapter is about.",
"ACTIONS": { "ACTIONS": {
"CREATE-FIRST-PAGE": "Create the first Section", "CREATE-FIRST-PAGE": "Create the first chapter",
"CREATE-NEW-SUBSECTION": "Create new subsection", "CREATE-NEW-SUBSECTION": "Section",
"CREATE-NEW-SECTION": "Create new section", "CREATE-NEW-SECTION": "Chapter",
"CREATE-FIRST-SECTION":"Create the first section", "CREATE-FIRST-SECTION":"Create the first chapter",
"NOTHING-HERE-HINT": "Nothing here yet.", "NOTHING-HERE-HINT": "Nothing here yet.",
"START-CREATING-PAGE-START": "Start by ", "START-CREATING-PAGE-START": "Start by ",
"START-CREATING-PAGE-END": "creating the first section." "START-CREATING-PAGE-END": "creating the first chapter."
}, },
"PAGE": "Section" "PAGE": "Chapter"
}, },
"SECTION-INFO": { "SECTION-INFO": {
"SECTION-NAME": "Subsection Name", "SECTION-NAME": "Section Name",
"SECTION-NAME-HINT": "Set a name for the subsection.", "SECTION-NAME-HINT": "Set a name for the section.",
"SECTION-DESCRIPTION": "Description", "SECTION-DESCRIPTION": "Description",
"SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the subsection is about.", "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the section is about.",
"SECTION": "Subsection" "SECTION": "Section"
}, },
"PAGES": { "PAGES": {
"TITLE": "Opis stranice", "TITLE": "Chapter Description",
"PAGE-PREFIX": "Stranica", "PAGE-PREFIX": "Chapter",
"PAGE-INPUT-TITLE": "Naslov stranice", "PAGE-INPUT-TITLE": "Chapter Title",
"DATASET-DETAILS": "Detalji skupa podataka", "DATASET-DETAILS": "Detalji skupa podataka",
"EXTERNAL-REFERENCES": "Spoljne reference", "EXTERNAL-REFERENCES": "Spoljne reference",
"DESCRIPTION": "Opis" "DESCRIPTION": "Opis"
@ -463,7 +464,9 @@
"TARGET": "Id ciljnog polja", "TARGET": "Id ciljnog polja",
"VALUE": "Obavezna vrednost", "VALUE": "Obavezna vrednost",
"RULE-IF": "Ako je vrednost", "RULE-IF": "Ako je vrednost",
"RULE-THEN": "tada prikazati polje sa Id" "RULE-THEN": "tada prikazati polje sa Id",
"FIELDSETS": "Input sets",
"FIELDS":"Inputs"
} }
}, },
"FORM-VALIDATION":{ "FORM-VALIDATION":{
@ -485,8 +488,8 @@
} }
}, },
"TOOLKIT": { "TOOLKIT": {
"GENERAL-TOOLS": "General tools", "GENERAL-TOOLS": "Questions tools",
"NEW-INPUT-SET": "Add Input Set", "NEW-INPUT-SET": "Add Question",
"CLONE": "Clone", "CLONE": "Clone",
"DELETE": "Delete" "DELETE": "Delete"
} }
@ -819,7 +822,8 @@
"VIEW": "Pregled", "VIEW": "Pregled",
"CLONE": "Napravite kopiju", "CLONE": "Napravite kopiju",
"NEW-VERSION": "Nova verzija", "NEW-VERSION": "Nova verzija",
"VIEW-VERSIONS": "Sve verzije obrazaca za skupove podataka" "VIEW-VERSIONS": "Sve verzije obrazaca za skupove podataka",
"DELETE":"Delete"
} }
}, },
"DATASET-UPLOAD": { "DATASET-UPLOAD": {

View File

@ -290,35 +290,36 @@
"DATASET-TEMPLATE-LANGUAGE": "Dataset template language", "DATASET-TEMPLATE-LANGUAGE": "Dataset template language",
"DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language", "DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language",
"DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description", "DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description",
"UNTITLED": "Untitled" "UNTITLED": "Untitled",
"QUESTION": "Question"
}, },
"PAGE-INFO": { "PAGE-INFO": {
"PAGE-NAME": "Section Name", "PAGE-NAME": "Chapter Name",
"PAGE-NAME-HINT": "Set a name for the dataset section.", "PAGE-NAME-HINT": "Set a name for the dataset chapter.",
"PAGE-DESCRIPTION": "Description", "PAGE-DESCRIPTION": "Description",
"PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the section is about.", "PAGE-DESCRIPTION-HINT": "Write a brief desciption of what the chapter is about.",
"ACTIONS": { "ACTIONS": {
"CREATE-FIRST-PAGE": "Create the first Section", "CREATE-FIRST-PAGE": "Create the first chapter",
"CREATE-NEW-SUBSECTION": "Create new subsection", "CREATE-NEW-SUBSECTION": "Section",
"CREATE-NEW-SECTION": "Create new section", "CREATE-NEW-SECTION": "Chapter",
"CREATE-FIRST-SECTION":"Create the first section", "CREATE-FIRST-SECTION":"Create the first chapter",
"NOTHING-HERE-HINT": "Nothing here yet.", "NOTHING-HERE-HINT": "Nothing here yet.",
"START-CREATING-PAGE-START": "Start by ", "START-CREATING-PAGE-START": "Start by ",
"START-CREATING-PAGE-END": "creating the first section." "START-CREATING-PAGE-END": "creating the first chapter."
}, },
"PAGE": "Section" "PAGE": "Chapter"
}, },
"SECTION-INFO": { "SECTION-INFO": {
"SECTION-NAME": "Subsection Name", "SECTION-NAME": "Section Name",
"SECTION-NAME-HINT": "Set a name for the subsection.", "SECTION-NAME-HINT": "Set a name for the section.",
"SECTION-DESCRIPTION": "Description", "SECTION-DESCRIPTION": "Description",
"SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the subsection is about.", "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the section is about.",
"SECTION": "Subsection" "SECTION": "Section"
}, },
"PAGES": { "PAGES": {
"TITLE": "Sayfa Tanımı", "TITLE": "Chapter Description",
"PAGE-PREFIX": "Sayfa", "PAGE-PREFIX": "Chapter",
"PAGE-INPUT-TITLE": "Sayfa Başlığı", "PAGE-INPUT-TITLE": "Chapter Title",
"DATASET-DETAILS": "Veri Seti Tanım Ayrıntıları", "DATASET-DETAILS": "Veri Seti Tanım Ayrıntıları",
"EXTERNAL-REFERENCES": "Dış Bağlantılar", "EXTERNAL-REFERENCES": "Dış Bağlantılar",
"DESCRIPTION": "Tanım" "DESCRIPTION": "Tanım"
@ -463,7 +464,9 @@
"TARGET": "Hedef Alan Kimliği", "TARGET": "Hedef Alan Kimliği",
"VALUE": "Gerekli Değer", "VALUE": "Gerekli Değer",
"RULE-IF": "Eğer değer", "RULE-IF": "Eğer değer",
"RULE-THEN": "sonra alanı kimliği ile göster" "RULE-THEN": "sonra alanı kimliği ile göster",
"FIELDSETS": "Input sets",
"FIELDS":"Inputs"
} }
}, },
"FORM-VALIDATION":{ "FORM-VALIDATION":{
@ -485,8 +488,8 @@
} }
}, },
"TOOLKIT": { "TOOLKIT": {
"GENERAL-TOOLS": "General tools", "GENERAL-TOOLS": "Questions tools",
"NEW-INPUT-SET": "Add Input Set", "NEW-INPUT-SET": "Add Question",
"CLONE": "Clone", "CLONE": "Clone",
"DELETE": "Delete" "DELETE": "Delete"
} }
@ -819,7 +822,8 @@
"VIEW": "Göster", "VIEW": "Göster",
"CLONE": "Çoğalt", "CLONE": "Çoğalt",
"NEW-VERSION": "Yeni Sürüm", "NEW-VERSION": "Yeni Sürüm",
"VIEW-VERSIONS": "Tüm Veri seti Tanımı Şablon Sürümleri" "VIEW-VERSIONS": "Tüm Veri seti Tanımı Şablon Sürümleri",
"DELETE":"Delete"
} }
}, },
"DATASET-UPLOAD": { "DATASET-UPLOAD": {

View File

@ -0,0 +1,10 @@
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="17.143" viewBox="0 0 20 17.143">
<g id="Group_11949" data-name="Group 11949" transform="translate(-1147 -554)">
<g id="Rectangle_2722" data-name="Rectangle 2722" transform="translate(1147 554)" fill="none" stroke="#129d99" stroke-width="2">
<rect width="16.191" height="13.333" rx="1" stroke="none"/>
<rect x="1" y="1" width="14.191" height="11.333" fill="none"/>
</g>
<rect id="Rectangle_2763" data-name="Rectangle 2763" width="12.381" height="12.381" transform="translate(1154.619 558.762)" fill="#fff"/>
<path id="ic_add_24px" d="M16.324,12.6H12.6v3.724H10.724V12.6H7V10.724h3.724V7H12.6v3.724h3.724Z" transform="translate(1150.579 554.719)" fill="#129d99"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 765 B

View File

@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" width="13.631" height="9.294" viewBox="0 0 13.631 9.294">
<g id="Group_11772" data-name="Group 11772" transform="translate(-636 -1716)">
<path id="ic_visibility_24px" d="M7.815,4.5A7.328,7.328,0,0,0,1,9.147a7.321,7.321,0,0,0,13.631,0A7.328,7.328,0,0,0,7.815,4.5Zm0,7.745a3.1,3.1,0,1,1,3.1-3.1A3.1,3.1,0,0,1,7.815,12.245Zm0-4.957A1.859,1.859,0,1,0,9.674,9.147,1.856,1.856,0,0,0,7.815,7.288Z" transform="translate(635 1711.5)" fill="#129d99"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 502 B

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="13.998" viewBox="0 0 14 13.998">
<path id="Path_17266" data-name="Path 17266" d="M-66.97,241.6l-1.258-.577a.438.438,0,0,1-.266-.444,5.4,5.4,0,0,0-.044-.977.457.457,0,0,1,.237-.473l1.2-.681a.46.46,0,0,0,.192-.592l-.547-1.169a.452.452,0,0,0-.577-.237l-1.287.488a.46.46,0,0,1-.5-.118,5.162,5.162,0,0,0-.725-.666.451.451,0,0,1-.163-.488l.37-1.332a.474.474,0,0,0-.281-.562l-1.2-.444a.467.467,0,0,0-.577.237l-.577,1.258a.438.438,0,0,1-.444.266,5.4,5.4,0,0,0-.977.044.457.457,0,0,1-.473-.237l-.681-1.2a.46.46,0,0,0-.592-.192l-1.169.547a.452.452,0,0,0-.237.577l.488,1.287a.46.46,0,0,1-.118.5,5.161,5.161,0,0,0-.666.725.451.451,0,0,1-.488.163l-1.332-.37a.474.474,0,0,0-.562.281l-.444,1.2a.467.467,0,0,0,.237.577l1.258.577a.438.438,0,0,1,.266.444,5.4,5.4,0,0,0,.044.977.457.457,0,0,1-.237.473l-1.2.681a.46.46,0,0,0-.192.592l.547,1.169a.452.452,0,0,0,.577.237l1.287-.488a.46.46,0,0,1,.5.118,5.162,5.162,0,0,0,.725.666.451.451,0,0,1,.163.488l-.37,1.332a.474.474,0,0,0,.281.562l1.2.444A.467.467,0,0,0-75,247.03l.577-1.258a.438.438,0,0,1,.444-.266,5.4,5.4,0,0,0,.977-.044.457.457,0,0,1,.473.237l.681,1.2a.46.46,0,0,0,.592.192l1.169-.547a.452.452,0,0,0,.237-.577l-.488-1.287a.46.46,0,0,1,.118-.5,5.162,5.162,0,0,0,.666-.725.451.451,0,0,1,.488-.163l1.332.37a.474.474,0,0,0,.562-.281l.444-1.2A.442.442,0,0,0-66.97,241.6Zm-5.578,1.2a2.732,2.732,0,0,1-3.625-1.317,2.732,2.732,0,0,1,1.317-3.625,2.732,2.732,0,0,1,3.625,1.317A2.711,2.711,0,0,1-72.548,242.8Z" transform="translate(80.702 -233.298)" fill="#17bebb"/>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,12 @@
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14">
<g id="Group_11857" data-name="Group 11857" transform="translate(-636 -1714)">
<g id="Rectangle_2747" data-name="Rectangle 2747" transform="translate(636 1714)" fill="none" stroke="#129d99" stroke-width="1">
<rect width="14" height="14" stroke="none"/>
<rect x="0.5" y="0.5" width="13" height="13" fill="none"/>
</g>
<g id="Polygon_10" data-name="Polygon 10" transform="translate(645 1718) rotate(90)" fill="#129d99">
<path d="M 5 3.5 L 1 3.5 L 3 0.8333333134651184 L 5 3.5 Z" stroke="none"/>
<path d="M 3 1.666666746139526 L 2 3 L 4 3 L 3 1.666666746139526 M 3 0 L 6 4 L 0 4 L 3 0 Z" stroke="none" fill="#129d99"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 761 B

View File

@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="11.393" viewBox="0 0 14 11.393">
<g id="Layer_2" transform="translate(261.2 -232.555)">
<g id="Layer_1-2" transform="translate(-261.2 232.555)">
<path id="Path_17265" data-name="Path 17265" d="M-247.2,235.936a3.587,3.587,0,0,0-.637-1.83,3.636,3.636,0,0,0-2.975-1.546,3.586,3.586,0,0,0-2.054.649,3.6,3.6,0,0,0-1.287,1.617h0l-.035.071c-.012-.035-.024-.059-.035-.094a3.618,3.618,0,0,0-4.616-2.019,4.384,4.384,0,0,0-.626.307l-.012-.012a3.669,3.669,0,0,0-1.192,1.216h0a3.6,3.6,0,0,0-.5,1.393c0,.035-.012.083-.012.118a3.615,3.615,0,0,0,1.723,3.447,3.594,3.594,0,0,0,3.789-.035.089.089,0,0,1,.024.047h0a2.209,2.209,0,0,1-.838,2.963,2.206,2.206,0,0,1-3.01-.814,2.3,2.3,0,0,1-.283-.874.241.241,0,0,0-.236-.212h-.956a.237.237,0,0,0-.236.236v.012a3.628,3.628,0,0,0,3.86,3.364,3.628,3.628,0,0,0,3.364-3.86,3.666,3.666,0,0,0-.614-1.782c-.012-.024-.024-.035-.035-.059a4.139,4.139,0,0,0,.39-.708.575.575,0,0,0,.035-.083c.012.035.024.059.035.094h0a3.607,3.607,0,0,0,4.616,2.007,3.614,3.614,0,0,0,2.337-3.376,1.43,1.43,0,0,1,.012-.236Zm-1.558.992a2.193,2.193,0,0,1-2.054,1.428h0a2.211,2.211,0,0,1-2.054-1.417l-.012-.024c-.012-.059-.165-.118-.4-.153a4.727,4.727,0,0,0-.661-.059h-.519c-.59.024-1.039.106-1.062.212l-.012.024a2.193,2.193,0,0,1-2.821,1.287,2.193,2.193,0,0,1-1.287-2.821,2.2,2.2,0,0,1,2.833-1.287,2.2,2.2,0,0,1,1.287,1.287l.012.024c.012.059.165.118.4.153a4.722,4.722,0,0,0,.661.059h.519c.59-.024,1.039-.106,1.062-.212l.012-.024a2.193,2.193,0,0,1,2.821-1.287A2.17,2.17,0,0,1-248.758,236.928Z" transform="translate(261.2 -232.555)" fill="#17bebb"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14">
<g id="Group_11878" data-name="Group 11878" transform="translate(-584 -1289)">
<g id="Ellipse_406" data-name="Ellipse 406" transform="translate(584 1289)" fill="none" stroke="#129d99" stroke-width="0.5">
<circle cx="7" cy="7" r="7" stroke="none"/>
<circle cx="7" cy="7" r="6.75" fill="none"/>
</g>
<circle id="Ellipse_407" data-name="Ellipse 407" cx="4" cy="4" r="4" transform="translate(587 1292)" fill="#129d99"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 540 B

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14">
<path id="ic_check_box_24px" d="M15.444,3H4.556A1.555,1.555,0,0,0,3,4.556V15.444A1.555,1.555,0,0,0,4.556,17H15.444A1.555,1.555,0,0,0,17,15.444V4.556A1.555,1.555,0,0,0,15.444,3Zm-7,10.889L4.556,10l1.1-1.1,2.792,2.784,5.9-5.9,1.1,1.1Z" transform="translate(-3 -3)" fill="#129d99"/>
</svg>

After

Width:  |  Height:  |  Size: 373 B

View File

@ -0,0 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" width="17.5" height="20" viewBox="0 0 17.5 20">
<g id="Group_11920" data-name="Group 11920" transform="translate(-460.8 -867)">
<g id="Rectangle_2762" data-name="Rectangle 2762" transform="translate(464.724 867)" fill="none" stroke="#129d99" stroke-width="2">
<rect width="13.575" height="16.285" rx="1" stroke="none"/>
<rect x="1" y="1" width="11.575" height="14.285" fill="none"/>
</g>
<path id="Path_17263" data-name="Path 17263" d="M13.575,17.285H1.508A1.68,1.68,0,0,1,0,15.476V1" transform="translate(461.8 868.715)" fill="none" stroke="#129d99" stroke-linecap="round" stroke-width="2"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 673 B

View File

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="13.519" viewBox="0 0 14 13.519">
<path id="Path_17267" data-name="Path 17267" d="M93.248,244.258a4.814,4.814,0,0,1-1.953.4A4.706,4.706,0,0,1,89,244.088a4,4,0,0,1-1.585-1.557,4.109,4.109,0,0,1-.354-.863H92.6l.694-1.189h-6.4c0-.071-.028-.142-.028-.226,0-.226.028-.467.042-.679h5.676l.694-1.189H87.26a4.515,4.515,0,0,1,.863-1.232,4.262,4.262,0,0,1,3.1-1.26,5.32,5.32,0,0,1,3.949,1.84L96.9,236.1a7.326,7.326,0,0,0-2.548-1.911,7.073,7.073,0,0,0-3.086-.694,6.963,6.963,0,0,0-3.5.906,6.471,6.471,0,0,0-2.491,2.406,6.217,6.217,0,0,0-.637,1.557H83.594l-.694,1.189h1.543a5.343,5.343,0,0,0-.028.679v.226h-.821l-.694,1.189h1.628a6.112,6.112,0,0,0,1.8,3.454,6.746,6.746,0,0,0,4.926,1.911,7.347,7.347,0,0,0,2.888-.538,9.09,9.09,0,0,0,2.7-1.939l-1.685-1.727A6.319,6.319,0,0,1,93.248,244.258Z" transform="translate(-82.9 -233.5)" fill="#17bebb"/>
</svg>

After

Width:  |  Height:  |  Size: 899 B

View File

@ -0,0 +1,12 @@
<svg xmlns="http://www.w3.org/2000/svg" width="12.967" height="14" viewBox="0 0 12.967 14">
<g id="Group_11865" data-name="Group 11865" transform="translate(-583 -1493.884)">
<g id="Rectangle_2750" data-name="Rectangle 2750" transform="translate(583 1494.918)" fill="none" stroke="#129d99" stroke-width="1">
<rect width="12.967" height="12.967" rx="2" stroke="none"/>
<rect x="0.5" y="0.5" width="11.967" height="11.967" rx="1.5" fill="none"/>
</g>
<rect id="Rectangle_2751" data-name="Rectangle 2751" width="12.967" height="2.631" rx="1" transform="translate(583 1495.918)" fill="#129d99"/>
<rect id="Rectangle_2752" data-name="Rectangle 2752" width="2.852" height="2.852" transform="translate(590.336 1502.18)" fill="#129d99"/>
<line id="Line_418" data-name="Line 418" y2="2.423" transform="translate(586.242 1493.884)" fill="none" stroke="#129d99" stroke-width="1"/>
<line id="Line_419" data-name="Line 419" y2="2.423" transform="translate(592.725 1493.884)" fill="none" stroke="#129d99" stroke-width="1"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="3.597" viewBox="0 0 14 3.597">
<g id="Group_11873" data-name="Group 11873" transform="translate(-584.5 -1352)">
<line id="Line_420" data-name="Line 420" x2="14" transform="translate(584.5 1352.5)" fill="none" stroke="#129d99" stroke-width="1"/>
<line id="Line_421" data-name="Line 421" x2="6" transform="translate(584.5 1355.097)" fill="none" stroke="#129d99" stroke-width="1"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 462 B

View File

@ -0,0 +1,21 @@
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="12" viewBox="0 0 14 12">
<g id="Group_11867" data-name="Group 11867" transform="translate(-583 -1464)">
<g id="Rectangle_2753" data-name="Rectangle 2753" transform="translate(583 1464)" fill="none" stroke="#129d99" stroke-width="1">
<rect width="14" height="5" stroke="none"/>
<rect x="0.5" y="0.5" width="13" height="4" fill="none"/>
</g>
<g id="Ellipse_402" data-name="Ellipse 402" transform="translate(583 1472)" fill="none" stroke="#129d99" stroke-width="0.3">
<circle cx="2" cy="2" r="2" stroke="none"/>
<circle cx="2" cy="2" r="1.85" fill="none"/>
</g>
<g id="Ellipse_403" data-name="Ellipse 403" transform="translate(588 1472)" fill="none" stroke="#129d99" stroke-width="0.3">
<circle cx="2" cy="2" r="2" stroke="none"/>
<circle cx="2" cy="2" r="1.85" fill="none"/>
</g>
<g id="Ellipse_404" data-name="Ellipse 404" transform="translate(593 1472)" fill="none" stroke="#129d99" stroke-width="0.3">
<circle cx="2" cy="2" r="2" stroke="none"/>
<circle cx="2" cy="2" r="1.85" fill="none"/>
</g>
<circle id="Ellipse_405" data-name="Ellipse 405" cx="1" cy="1" r="1" transform="translate(584 1473)" fill="#129d99"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="6.125" height="14" viewBox="0 0 6.125 14">
<g id="Group_11871" data-name="Group 11871" transform="translate(-586 -1400)">
<path id="ic_check_box_24px" d="M8.444,3H3.681A.68.68,0,0,0,3,3.681V8.444a.68.68,0,0,0,.681.681H8.444a.68.68,0,0,0,.681-.681V3.681A.68.68,0,0,0,8.444,3ZM5.382,7.764l-1.7-1.7.48-.48L5.382,6.8,7.965,4.218l.48.483Z" transform="translate(583 1397)" fill="#129d99"/>
<path id="ic_check_box_24px-2" data-name="ic_check_box_24px" d="M8.444,3H3.681A.68.68,0,0,0,3,3.681V8.444a.68.68,0,0,0,.681.681H8.444a.68.68,0,0,0,.681-.681V3.681A.68.68,0,0,0,8.444,3ZM5.382,7.764l-1.7-1.7.48-.48L5.382,6.8,7.965,4.218l.48.483Z" transform="translate(583 1404.875)" fill="#129d99"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 753 B

View File

@ -0,0 +1,8 @@
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="8.791" viewBox="0 0 14 8.791">
<g id="Group_11875" data-name="Group 11875" transform="translate(-584.5 -1352)">
<line id="Line_422" data-name="Line 422" x2="14" transform="translate(584.5 1352.5)" fill="none" stroke="#129d99" stroke-width="1"/>
<line id="Line_423" data-name="Line 423" x2="14" transform="translate(584.5 1355.097)" fill="none" stroke="#129d99" stroke-width="1"/>
<line id="Line_424" data-name="Line 424" x2="14" transform="translate(584.5 1357.694)" fill="none" stroke="#129d99" stroke-width="1"/>
<line id="Line_425" data-name="Line 425" x2="6" transform="translate(584.5 1360.291)" fill="none" stroke="#129d99" stroke-width="1"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 740 B