From fdf316a04053dc1648ca739f9eb9f00753c9e264 Mon Sep 17 00:00:00 2001 From: Kristan Ntavidi Date: Wed, 24 Mar 2021 16:05:21 +0200 Subject: [PATCH 1/3] Dataset Profile Editor. VIsibility rules. Hide Sections from options. Language update for visibility rules. --- .../rule/dataset-profile-editor-rule.component.html | 8 ++++---- dmp-frontend/src/assets/i18n/de.json | 4 +++- dmp-frontend/src/assets/i18n/en.json | 4 +++- dmp-frontend/src/assets/i18n/es.json | 4 +++- dmp-frontend/src/assets/i18n/gr.json | 4 +++- dmp-frontend/src/assets/i18n/pt.json | 4 +++- dmp-frontend/src/assets/i18n/sk.json | 4 +++- dmp-frontend/src/assets/i18n/sr.json | 4 +++- dmp-frontend/src/assets/i18n/tr.json | 4 +++- 9 files changed, 28 insertions(+), 12 deletions(-) diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/rule/dataset-profile-editor-rule.component.html b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/rule/dataset-profile-editor-rule.component.html index 81e12f774..7ce02a6bf 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/rule/dataset-profile-editor-rule.component.html +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/rule/dataset-profile-editor-rule.component.html @@ -27,7 +27,7 @@ {{'DATASET-PROFILE-EDITOR.STEPS.FORM.RULE.FIELDS.RULE-THEN'| translate}} - + - + @@ -53,7 +53,7 @@ - + diff --git a/dmp-frontend/src/assets/i18n/de.json b/dmp-frontend/src/assets/i18n/de.json index b5d1b2cd4..d9cbf4336 100644 --- a/dmp-frontend/src/assets/i18n/de.json +++ b/dmp-frontend/src/assets/i18n/de.json @@ -463,7 +463,9 @@ "TARGET": "Target Field Id", "VALUE": "Required Value", "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":{ diff --git a/dmp-frontend/src/assets/i18n/en.json b/dmp-frontend/src/assets/i18n/en.json index 16d94410b..8590e5874 100644 --- a/dmp-frontend/src/assets/i18n/en.json +++ b/dmp-frontend/src/assets/i18n/en.json @@ -463,7 +463,9 @@ "TARGET": "Target Field Id", "VALUE": "Required Value", "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":{ diff --git a/dmp-frontend/src/assets/i18n/es.json b/dmp-frontend/src/assets/i18n/es.json index 98d1dba4d..4ad6fd4a2 100644 --- a/dmp-frontend/src/assets/i18n/es.json +++ b/dmp-frontend/src/assets/i18n/es.json @@ -463,7 +463,9 @@ "TARGET": "Target Field Id", "VALUE": "Valor requerido", "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":{ diff --git a/dmp-frontend/src/assets/i18n/gr.json b/dmp-frontend/src/assets/i18n/gr.json index 69c63c81b..3e3642d99 100644 --- a/dmp-frontend/src/assets/i18n/gr.json +++ b/dmp-frontend/src/assets/i18n/gr.json @@ -463,7 +463,9 @@ "TARGET": "Ταυτοποίηση στοχοθετημένου πεδίου", "VALUE": "Απαιτούμενη τιμή", "RULE-IF": "Εάν η τιμή είναι", - "RULE-THEN": "τότε δείξε το Πεδίο με ταυτοποίηση" + "RULE-THEN": "τότε δείξε το Πεδίο με ταυτοποίηση", + "FIELDSETS": "Input sets", + "FIELDS":"Inputs" } }, "FORM-VALIDATION":{ diff --git a/dmp-frontend/src/assets/i18n/pt.json b/dmp-frontend/src/assets/i18n/pt.json index e591fdca6..b0e593d1f 100644 --- a/dmp-frontend/src/assets/i18n/pt.json +++ b/dmp-frontend/src/assets/i18n/pt.json @@ -463,7 +463,9 @@ "TARGET": "Id do Campo de Destino", "VALUE": "Valor Obrigatório", "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":{ diff --git a/dmp-frontend/src/assets/i18n/sk.json b/dmp-frontend/src/assets/i18n/sk.json index 8a21e0239..24b7a4e1e 100644 --- a/dmp-frontend/src/assets/i18n/sk.json +++ b/dmp-frontend/src/assets/i18n/sk.json @@ -463,7 +463,9 @@ "TARGET": "Target Field Id", "VALUE": "Required Value", "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":{ diff --git a/dmp-frontend/src/assets/i18n/sr.json b/dmp-frontend/src/assets/i18n/sr.json index edd84b723..b70c854fd 100644 --- a/dmp-frontend/src/assets/i18n/sr.json +++ b/dmp-frontend/src/assets/i18n/sr.json @@ -463,7 +463,9 @@ "TARGET": "Id ciljnog polja", "VALUE": "Obavezna 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":{ diff --git a/dmp-frontend/src/assets/i18n/tr.json b/dmp-frontend/src/assets/i18n/tr.json index 3d78ebd9e..8ca447670 100644 --- a/dmp-frontend/src/assets/i18n/tr.json +++ b/dmp-frontend/src/assets/i18n/tr.json @@ -463,7 +463,9 @@ "TARGET": "Hedef Alan Kimliği", "VALUE": "Gerekli 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":{ From 12f9e9ede927497209b66d1f0ea70c4948bf6863 Mon Sep 17 00:00:00 2001 From: Kristan Ntavidi Date: Sat, 27 Mar 2021 19:52:53 +0200 Subject: [PATCH 2/3] Dataset Profile Editor. Move validators from tempate to models. (Fixing issue of form classified as valid when not all formcontrols are rendered.) --- .../field-data/auto-complete-single-data.ts | 6 +- .../admin/field-editor-model.ts | 57 +- .../admin/field-set-editor-model.ts | 2 +- .../admin/section-editor-model.ts | 5 +- ...file-editor-composite-field.component.html | 2 +- ...rofile-editor-composite-field.component.ts | 391 +++++++++++--- ...rofile-editor-default-value.component.html | 14 +- ...-profile-editor-default-value.component.ts | 2 +- ...-editor-auto-complete-field.component.html | 14 +- ...ataset-profile-editor-field.component.html | 4 +- .../dataset-profile-editor-field.component.ts | 504 +++++++++++++----- ...ofile-editor-section-fieldset.component.ts | 4 +- ...aset-profile-editor-section.component.html | 2 +- .../editor-custom-validators.ts | 8 +- .../editor/dataset-profile-editor-model.ts | 5 + .../dataset-profile-editor.component.html | 12 +- .../dataset-profile-editor.component.ts | 62 ++- 17 files changed, 848 insertions(+), 246 deletions(-) diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/admin/field-data/auto-complete-single-data.ts b/dmp-frontend/src/app/ui/admin/dataset-profile/admin/field-data/auto-complete-single-data.ts index 929edc891..3bffd86d1 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/admin/field-data/auto-complete-single-data.ts +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/admin/field-data/auto-complete-single-data.ts @@ -1,7 +1,7 @@ import { FieldDataEditorModel } from './field-data-editor-model'; import { DatasetProfileComboBoxType } from '@app/core/common/enum/dataset-profile-combo-box-type'; 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'; export class AutoCompleteSingleDataEditorModel extends FieldDataEditorModel { @@ -16,8 +16,8 @@ export class AutoCompleteSingleDataEditorModel extends FieldDataEditorModel = []): FormGroup { const formGroup = this.formBuilder.group({ label: [{ value: this.label, disabled: (disabled && !skipDisable.includes('AutoCompleteSingleDataEditorModel.label')) }], - url: [{ value: this.url, disabled: (disabled && !skipDisable.includes('AutoCompleteSingleDataEditorModel.url')) }], - optionsRoot: [{ value: this.optionsRoot, disabled: (disabled && !skipDisable.includes('AutoCompleteSingleDataEditorModel.optionsRoot')) }], + url: [{ value: this.url, disabled: (disabled && !skipDisable.includes('AutoCompleteSingleDataEditorModel.url')) },[Validators.required]], + optionsRoot: [{ value: this.optionsRoot, disabled: (disabled && !skipDisable.includes('AutoCompleteSingleDataEditorModel.optionsRoot')) }, [Validators.required]], autoCompleteType: [{ value: this.autoCompleteType, disabled: (disabled && !skipDisable.includes('AutoCompleteSingleDataEditorModel.autoCompleteType')) }] }); formGroup.addControl('autoCompleteOptions', this.autoCompleteOptions.buildForm(disabled, skipDisable)); diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/admin/field-editor-model.ts b/dmp-frontend/src/app/ui/admin/dataset-profile/admin/field-editor-model.ts index fcaf00324..66dd8928d 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/admin/field-editor-model.ts +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/admin/field-editor-model.ts @@ -27,6 +27,9 @@ import { ResearchersDataEditorModel } from './field-data/researchers-data-editor import { OrganizationsDataEditorModel } from './field-data/organizations-data-editor-models'; import { DatasetIdentifierDataEditorModel } from './field-data/dataset-identifier-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 { @@ -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 === 'externalDatasets') { this.data = new ExternalDatasetsDataEditorModel().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 === 'tags') { this.data = new TagsDataEditorModel().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 === 'datasetIdentifier') { this.data = new DatasetIdentifierDataEditorModel().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; @@ -96,6 +100,57 @@ export class FieldEditorModel extends BaseFormModel { if (this.data) { formGroup.addControl('data', this.data.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; } + + + 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){ + + // } } diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/admin/field-set-editor-model.ts b/dmp-frontend/src/app/ui/admin/dataset-profile/admin/field-set-editor-model.ts index 37e9f1fe4..052bd353b 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/admin/field-set-editor-model.ts +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/admin/field-set-editor-model.ts @@ -35,7 +35,7 @@ export class FieldSetEditorModel extends BaseFormModel { const formGroup = this.formBuilder.group({ id: [{ value: this.id, disabled: (disabled && !skipDisable.includes('FieldSetEditorModel.id')) }, [Validators.required, Validators.pattern('^[^<_>]+$')]], 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')) }], extendedDescription: [{ value: this.extendedDescription, disabled: (disabled && !skipDisable.includes('FieldSetEditorModel.extendedDescription')) }], additionalInformation: [{ value: this.additionalInformation, disabled: (disabled && !skipDisable.includes('FieldSetEditorModel.additionalInformation')) }], diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/admin/section-editor-model.ts b/dmp-frontend/src/app/ui/admin/dataset-profile/admin/section-editor-model.ts index 8edc81899..9d7c7825b 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/admin/section-editor-model.ts +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/admin/section-editor-model.ts @@ -1,6 +1,7 @@ import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { Section } from '../../../../core/model/admin/dataset-profile/dataset-profile'; import { BaseFormModel } from '../../../../core/model/base-form-model'; +import { EditorCustomValidators } from '../editor/custom-validators/editor-custom-validators'; import { FieldSetEditorModel } from './field-set-editor-model'; export class SectionEditorModel extends BaseFormModel { @@ -29,7 +30,7 @@ export class SectionEditorModel extends BaseFormModel { const formGroup: FormGroup = new FormBuilder().group({ 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]], - 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')) }], ordinal: [{ value: this.ordinal, disabled: (disabled && !skipDisable.includes('SectionEditorModel.ordinal')) }, [Validators.required]], 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); } + formGroup.setValidators(EditorCustomValidators.sectionHasAtLeastOneChildOf('fieldSets','sections')); + formGroup.updateValueAndValidity(); return formGroup; } } diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-field/dataset-profile-editor-composite-field.component.html b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-field/dataset-profile-editor-composite-field.component.html index c0a869bb5..8728acf2b 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-field/dataset-profile-editor-composite-field.component.html +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-field/dataset-profile-editor-composite-field.component.html @@ -72,7 +72,7 @@ + [formControl]="this.form.get('title')"> diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-field/dataset-profile-editor-composite-field.component.ts b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-field/dataset-profile-editor-composite-field.component.ts index 69e75370c..f04ba1980 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-field/dataset-profile-editor-composite-field.component.ts +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-field/dataset-profile-editor-composite-field.component.ts @@ -33,6 +33,10 @@ import { ValidationDataEditorModel } from '../../../admin/field-data/validation- import { DatasetProfileService } from '@app/core/services/dataset-profile/dataset-profile.service'; import { OrganizationsDataEditorModel } from '../../../admin/field-data/organizations-data-editor-models'; import { EditorCustomValidators } from '../../custom-validators/editor-custom-validators'; +import { Field } 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'; @Component({ selector: 'app-dataset-profile-editor-composite-field-component', @@ -330,119 +334,352 @@ export class DatasetProfileEditorCompositeFieldComponent implements OnInit, OnCh 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)); + }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.get('viewStyle').get('renderStyle').setValidators(Validators.required); - if (fieldForm.get('data')) { - fieldForm.removeControl('data'); - } + // if (fieldForm.get('data')) { + // fieldForm.removeControl('data'); + // } switch (type) { - case this.viewTypeEnum.BooleanDecision: - fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.BooleanDecision) - 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()); + case this.viewTypeEnum.BooleanDecision:{ + // fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.BooleanDecision) + // fieldForm.addControl('data', new BooleanDecisionFieldDataEditorModel().buildForm()); - fieldForm.get('data').setValidators(this.myCustomValidators.atLeastOneElementListValidator('options')); - fieldForm.get('data').updateValueAndValidity(); - break; - case this.viewTypeEnum.Other: - fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.ComboBox) - fieldForm.addControl('data', new AutoCompleteFieldDataEditorModel().buildForm()); //TODO SEE + const data: BooleanDecisionFieldData = { + label:'' + } - fieldForm.get('data').setValidators(this.myCustomValidators.atLeastOneElementListValidator('autoCompleteSingleDataList')); - fieldForm.get('data').updateValueAndValidity(); + field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.BooleanDecision; + field.data = data; break; - case this.viewTypeEnum.InternalDmpEntities: - fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.InternalDmpEntities) - fieldForm.addControl('data', new ResearchersAutoCompleteFieldDataEditorModel().buildForm());//TODO TO SEE + } + case this.viewTypeEnum.CheckBox:{ + + + // 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; - case this.viewTypeEnum.FreeText: - fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.FreeText) - fieldForm.addControl('data', new FreeTextFieldDataEditorModel().buildForm()); - break; - case this.viewTypeEnum.RadioBox: - fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.RadioBox) - fieldForm.addControl('data', new RadioBoxFieldDataEditorModel().buildForm()); - fieldForm.get('data').setValidators(this.myCustomValidators.atLeastOneElementListValidator('options')); - fieldForm.get('data').updateValueAndValidity(); + } + case this.viewTypeEnum.Select:{ + + + // fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.ComboBox) + // fieldForm.addControl('data', new WordListFieldDataEditorModel().buildForm()); + + // fieldForm.get('data').setValidators(EditorCustomValidators.atLeastOneElementListValidator('options')); + // fieldForm.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.TextArea: - fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.TextArea) - fieldForm.addControl('data', new TextAreaFieldDataEditorModel().buildForm()); + } + case this.viewTypeEnum.Other:{ + + + // 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; - case this.viewTypeEnum.DatePicker: - fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.DatePicker) - fieldForm.addControl('data', new DatePickerDataEditorModel().buildForm()); + }case this.viewTypeEnum.InternalDmpEntities:{ + + + // 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; - case this.viewTypeEnum.ExternalDatasets: - fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.ExternalDatasets) - fieldForm.addControl('data', new ExternalDatasetsDataEditorModel().buildForm()); + } + case this.viewTypeEnum.FreeText:{ + + + // 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; - case this.viewTypeEnum.DataRepositories: - fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.DataRepositories) - fieldForm.addControl('data', new DataRepositoriesDataEditorModel().buildForm()); + } + case this.viewTypeEnum.RadioBox:{ + + + // 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; - case this.viewTypeEnum.Registries: - fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Registries) - fieldForm.addControl('data', new RegistriesDataEditorModel().buildForm()); + } + case this.viewTypeEnum.TextArea:{ + + + // 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; - case this.viewTypeEnum.Services: - fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Services) - fieldForm.addControl('data', new ServicesDataEditorModel().buildForm()); + } + case this.viewTypeEnum.DatePicker:{ + + + // fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.DatePicker) + // fieldForm.addControl('data', new DatePickerDataEditorModel().buildForm()); + const data: DatePickerFieldData = { + label:'' + } + + field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.DatePicker; + break; - case this.viewTypeEnum.Tags: - fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Tags) - fieldForm.addControl('data', new TagsDataEditorModel().buildForm()); + } + case this.viewTypeEnum.ExternalDatasets:{ + + + // 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; - 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 - 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; - case this.viewTypeEnum.Organizations: - fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Organizations) - fieldForm.addControl('data', new OrganizationsDataEditorModel().buildForm()); + } + case this.viewTypeEnum.Organizations:{ + + + // fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Organizations) + // fieldForm.addControl('data', new OrganizationsDataEditorModel().buildForm()); // this.form.addControl('data', new OrganizationsDataEditorModel().buildForm()) // 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; - case this.viewTypeEnum.DatasetIdentifier: - fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.DatasetIdentifier) - fieldForm.addControl('data', new DatasetIdentifierDataEditorModel().buildForm()); + } + case this.viewTypeEnum.DatasetIdentifier:{ + + + // 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; - case this.viewTypeEnum.Currency: - fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Currency) - fieldForm.addControl('data', new CurrencyDataEditorModel().buildForm()); + } + case this.viewTypeEnum.Currency:{ + + + // 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; - case this.viewTypeEnum.Validation: - fieldForm.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Validation) - fieldForm.addControl('data', new ValidationDataEditorModel().buildForm()); + } + case this.viewTypeEnum.Validation:{ + + + // 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; + } } - (this.form.get('fields')).push(fieldForm); + (this.form.get('fields')).push(new FieldEditorModel().fromModel(field).buildForm()); - fieldForm.get('viewStyle').get('renderStyle').updateValueAndValidity(); - fieldForm.get('data').updateValueAndValidity(); + // fieldForm.get('viewStyle').get('renderStyle').updateValueAndValidity(); + // fieldForm.get('data').updateValueAndValidity(); } diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-profile-editor-default-value/component-profile-editor-default-value.component.html b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-profile-editor-default-value/component-profile-editor-default-value.component.html index 49f8f0267..31648ff9a 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-profile-editor-default-value/component-profile-editor-default-value.component.html +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-profile-editor-default-value/component-profile-editor-default-value.component.html @@ -2,7 +2,7 @@ {{placeHolder}} - + {{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.NONE' | translate}} {{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.BOOLEAN-DECISION.YES' @@ -18,7 +18,7 @@ {{placeHolder}} - + {{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.CHECK-BOX.CHECKED' | translate}} {{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.CHECK-BOX.UNCHECKED' | translate}} @@ -32,7 +32,7 @@ --> {{placeHolder}} - + {{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.NONE' | translate }} {{opt.get('label').value}} @@ -56,14 +56,14 @@ {{placeHolder}} - + {{'GENERAL.VALIDATION.REQUIRED' | translate}} {{placeHolder}} - + {{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.NONE' | translate}} {{opt.get('label').value}} @@ -73,7 +73,7 @@ {{placeHolder}} - + {{'GENERAL.VALIDATION.REQUIRED' | translate}} @@ -81,7 +81,7 @@ {{placeHolder}} - + {{'GENERAL.VALIDATION.REQUIRED' | translate}} diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-profile-editor-default-value/component-profile-editor-default-value.component.ts b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-profile-editor-default-value/component-profile-editor-default-value.component.ts index aedb1fa72..a62bc0cb4 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-profile-editor-default-value/component-profile-editor-default-value.component.ts +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-profile-editor-default-value/component-profile-editor-default-value.component.ts @@ -17,7 +17,7 @@ export class DatasetProfileEditorDefaultValueComponent implements OnInit { @Input() comboBoxType: DatasetProfileComboBoxType; @Input() internalDmpEntitiesType: DatasetProfileInternalDmpEntitiesType; @Input() placeHolder: String; - @Input() required: Boolean; + // @Input() required: Boolean; comboBoxTypeEnum = DatasetProfileComboBoxType; internalDmpEntitiesTypeEnum = DatasetProfileInternalDmpEntitiesType; diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/field-type/auto-complete/dataset-profile-editor-auto-complete-field.component.html b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/field-type/auto-complete/dataset-profile-editor-auto-complete-field.component.html index 02bd5705b..6037dbc05 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/field-type/auto-complete/dataset-profile-editor-auto-complete-field.component.html +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/field-type/auto-complete/dataset-profile-editor-auto-complete-field.component.html @@ -47,24 +47,28 @@ {{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-URL' | translate}} - + + {{'GENERAL.VALIDATION.REQUIRED' | translate}} {{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-OPTIONS-ROOT' | translate}} + [formControl]="singleForm.get('optionsRoot')"> + {{'GENERAL.VALIDATION.REQUIRED' | translate}} {{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-LABEL' | translate}} - + + {{'GENERAL.VALIDATION.REQUIRED' | translate}} {{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-VALUE' | translate}} - + {{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-AUTOCOMPLETE-SOURCE' | translate}} - + + {{'GENERAL.VALIDATION.REQUIRED' | translate}} diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/field/dataset-profile-editor-field.component.html b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/field/dataset-profile-editor-field.component.html index 755b9a78e..617ac73fd 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/field/dataset-profile-editor-field.component.html +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/field/dataset-profile-editor-field.component.html @@ -140,7 +140,7 @@ + placeHolder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.DEFAULT-VALUE' | translate}}"> @@ -224,4 +224,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/field/dataset-profile-editor-field.component.ts b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/field/dataset-profile-editor-field.component.ts index 4cef20a53..4ca3a48ec 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/field/dataset-profile-editor-field.component.ts +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/field/dataset-profile-editor-field.component.ts @@ -37,6 +37,10 @@ import { Guid } from '@common/types/guid'; import { ErrorStateMatcher, MatSlideToggleChange } from '@angular/material'; import { DefaultValueEditorModel } from '../../../admin/default-value-editor-model'; 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({ 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').value.min > 1 && this.form.get('multiplicity').value.max > 1) { // this.isFieldMultiplicityEnabled = true; @@ -146,7 +150,7 @@ export class DatasetProfileEditorFieldComponent extends BaseComponent implements this.viewType = this.viewTypeEnum.Tags; break; case DatasetProfileFieldViewStyle.Researchers: - this.viewType = this.viewTypeEnum.Researchers; + this.viewType = this.viewTypeEnum.Researchers; //TODO RESEARCHERS break; case DatasetProfileFieldViewStyle.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 { - switch (viewStile) { - case DatasetProfileFieldViewStyle.CheckBox: - return true; - case DatasetProfileFieldViewStyle.RadioBox: - case DatasetProfileFieldViewStyle.TextArea: - case DatasetProfileFieldViewStyle.FreeText: - case DatasetProfileFieldViewStyle.ComboBox: - case DatasetProfileFieldViewStyle.InternalDmpEntities: - case DatasetProfileFieldViewStyle.BooleanDecision: - case DatasetProfileFieldViewStyle.DatePicker: - case DatasetProfileFieldViewStyle.ExternalDatasets: - case DatasetProfileFieldViewStyle.DataRepositories: - case DatasetProfileFieldViewStyle.Registries: - case DatasetProfileFieldViewStyle.Services: - case DatasetProfileFieldViewStyle.Tags: - case DatasetProfileFieldViewStyle.Registries: - case DatasetProfileFieldViewStyle.Organizations: - case DatasetProfileFieldViewStyle.DatasetIdentifier: - case DatasetProfileFieldViewStyle.Currency: - case DatasetProfileFieldViewStyle.Validation: - return false; - default: - return false; - } - } + // defaulValueRequired(viewStile: DatasetProfileFieldViewStyle): boolean { + // switch (viewStile) { + // case DatasetProfileFieldViewStyle.CheckBox: + // return true; + // case DatasetProfileFieldViewStyle.RadioBox: + // case DatasetProfileFieldViewStyle.TextArea: + // case DatasetProfileFieldViewStyle.FreeText: + // case DatasetProfileFieldViewStyle.ComboBox: + // case DatasetProfileFieldViewStyle.InternalDmpEntities: + // case DatasetProfileFieldViewStyle.BooleanDecision: + // case DatasetProfileFieldViewStyle.DatePicker: + // case DatasetProfileFieldViewStyle.ExternalDatasets: + // case DatasetProfileFieldViewStyle.DataRepositories: + // case DatasetProfileFieldViewStyle.Registries: + // case DatasetProfileFieldViewStyle.Services: + // case DatasetProfileFieldViewStyle.Tags: + // case DatasetProfileFieldViewStyle.Registries: + // case DatasetProfileFieldViewStyle.Organizations: + // case DatasetProfileFieldViewStyle.DatasetIdentifier: + // case DatasetProfileFieldViewStyle.Currency: + // case DatasetProfileFieldViewStyle.Validation: + // return false; + // default: + // return false; + // } + // } @@ -351,7 +357,11 @@ export class DatasetProfileEditorFieldComponent extends BaseComponent implements // if(this.form.get('viewStyle').get('renderStyle').value == DatasetProfileFieldViewStyle.Researchers){ // 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(); // this.validTicket = myTicket; @@ -403,111 +413,362 @@ export class DatasetProfileEditorFieldComponent extends BaseComponent implements this.showPreview = false; - if (this.form.get('data')) { - this.form.removeControl('data'); - } - this.form.removeControl('defaultValue'); - const defaultValueModel = new DefaultValueEditorModel(); - this.form.addControl('defaultValue',defaultValueModel.buildForm()); + const field: Field = this.form.getRawValue(); + field.defaultValue = {type:null, value: null}; + + + + // 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) { - 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()); + case this.viewTypeEnum.BooleanDecision:{ - 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; - case this.viewTypeEnum.Other: - this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.ComboBox) - this.form.addControl('data', new AutoCompleteFieldDataEditorModel().buildForm()); //TODO SEE + } + case this.viewTypeEnum.CheckBox:{ - 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; - case this.viewTypeEnum.InternalDmpEntities: - this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.InternalDmpEntities) - 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()); + } + case this.viewTypeEnum.Organizations:{ - 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; - case this.viewTypeEnum.TextArea: - this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.TextArea) - this.form.addControl('data', new TextAreaFieldDataEditorModel().buildForm()); + } + case this.viewTypeEnum.DatasetIdentifier:{ + + + // 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; - case this.viewTypeEnum.DatePicker: - this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.DatePicker) - this.form.addControl('data', new DatePickerDataEditorModel().buildForm()); + } + case this.viewTypeEnum.Currency:{ + + + // 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; - case this.viewTypeEnum.ExternalDatasets: - this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.ExternalDatasets) - this.form.addControl('data', new ExternalDatasetsDataEditorModel().buildForm()); - break; - case this.viewTypeEnum.DataRepositories: - this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.DataRepositories) - this.form.addControl('data', new DataRepositoriesDataEditorModel().buildForm()); - break; - case this.viewTypeEnum.Registries: - this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Registries) - this.form.addControl('data', new RegistriesDataEditorModel().buildForm()); - break; - case this.viewTypeEnum.Services: - 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()); + } + case this.viewTypeEnum.Validation:{ + + + // this.form.get('viewStyle').get('renderStyle').setValue(DatasetProfileFieldViewStyle.Validation) + // this.form.addControl('data', new ValidationDataEditorModel().buildForm()); + + const data:ValidationFieldData = { + label:'' + } + + field.viewStyle.renderStyle = DatasetProfileFieldViewStyle.Validation; + field.data = data; + 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 this.showPreview = true; }); @@ -549,17 +810,4 @@ export class DatasetProfileEditorFieldComponent extends BaseComponent implements onDelete(){ 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; - // } - // } } \ No newline at end of file diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/section-fieldset/dataset-profile-editor-section-fieldset.component.ts b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/section-fieldset/dataset-profile-editor-section-fieldset.component.ts index 10365e5b1..1f681384c 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/section-fieldset/dataset-profile-editor-section-fieldset.component.ts +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/section-fieldset/dataset-profile-editor-section-fieldset.component.ts @@ -48,9 +48,9 @@ export class DatasetProfileEditorSectionFieldSetComponent implements OnInit, OnC this.dragulaService.createGroup(this.FIELDSETS,{ 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(handle.className.includes('handle')) return true; + if(handle.className && handle.classList.contains('handle')) return true; return false; } }); diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/section/dataset-profile-editor-section.component.html b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/section/dataset-profile-editor-section.component.html index c45a936f0..d71a7fe3d 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/section/dataset-profile-editor-section.component.html +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/section/dataset-profile-editor-section.component.html @@ -13,7 +13,7 @@
{{'DATASET-PROFILE-EDITOR.STEPS.SECTION-INFO.SECTION-NAME-HINT' | translate}}
+ formControlName="title"> {{'GENERAL.VALIDATION.REQUIRED' | translate}} - + diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.ts b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.ts index c5f17a54f..42dcc0bd3 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.ts +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.ts @@ -44,6 +44,7 @@ import { SideNavService } from '@app/core/services/sidenav/side-nav.sevice'; import { EditorCustomValidators, EditorCustomValidatorsEnum } from './custom-validators/editor-custom-validators'; import { CustomErrorValidator } from '@common/forms/validation/custom-validator'; 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'); @@ -77,7 +78,7 @@ export class DatasetProfileEditorComponent extends BaseComponent implements OnIn colorizeInvalid:boolean = false; - customEditorValidators = new EditorCustomValidators(); + // customEditorValidators = new EditorCustomValidators(); // sectionIdPreviewed:string = null; // currentSubForm:FormGroup = null; @@ -191,7 +192,7 @@ export class DatasetProfileEditorComponent extends BaseComponent implements OnIn } else { this.dataModel = new DatasetProfileEditorModel(); 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) { this.form.disable(); @@ -219,13 +220,16 @@ export class DatasetProfileEditorComponent extends BaseComponent implements OnIn if(tocentries && tocentries.length){ this.selectedTocEntry = tocentries[0]; } + // this._initializeFormValidity(tocentries); } + prepareForm() { 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 .pipe(takeUntil(this._destroyed)) .subscribe(change => { @@ -239,7 +243,6 @@ export class DatasetProfileEditorComponent extends BaseComponent implements OnIn // this.previewerFormGroup = this.dataWizardModel.buildForm().get('datasetProfileDefinition'); // }); }); - this.form.updateValueAndValidity(); setTimeout(() => { 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; - sectionAdded.setValidators(this.customEditorValidators.sectionHasAtLeastOneChildOf('fieldSets','sections')); - sectionAdded.updateValueAndValidity(); + // sectionAdded.setValidators(this.customEditorValidators.sectionHasAtLeastOneChildOf('fieldSets','sections')); + // sectionAdded.updateValueAndValidity(); this.refreshToCEntries(); @@ -1676,6 +1679,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[]{ const fieldsets:ToCEntry[] = []; @@ -1839,6 +1847,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{ From 7dac466f71e90921709e672cd5c626fc1096cf1a Mon Sep 17 00:00:00 2001 From: Kristan Ntavidi Date: Mon, 29 Mar 2021 18:42:55 +0300 Subject: [PATCH 3/3] Dataset Profile Editor. Remove validate button. Toolbar next to fieldset.Update icons (most of them). Update texts(Quetions, sections and chapters). Add delete option on template listing. Preview Fieldset instead of each field(Enables multiplicity preview). --- ...file-editor-composite-field.component.html | 194 +++++++++--------- ...file-editor-composite-field.component.scss | 13 ++ ...rofile-editor-composite-field.component.ts | 148 +++++++++---- ...ataset-profile-editor-field.component.html | 102 +++++++-- ...ataset-profile-editor-field.component.scss | 7 +- ...ile-editor-section-fieldset.component.html | 79 ++++++- ...ile-editor-section-fieldset.component.scss | 47 +++++ ...ofile-editor-section-fieldset.component.ts | 14 ++ ...aset-profile-editor-section.component.html | 2 +- .../dataset-profile-editor.component.html | 70 ++----- .../dataset-profile-editor.component.scss | 11 +- .../dataset-profile-editor.component.ts | 10 +- .../dataset-profile-listing.component.html | 4 + .../dataset-profile-listing.component.ts | 49 ++++- .../table-of-contents-internal-section.html | 19 +- .../form-section-inner.component.html | 37 ++++ .../form-section-inner.component.scss | 45 ++++ .../form-section-inner.component.ts | 85 ++++++++ .../dataset-description-form.module.ts | 6 +- dmp-frontend/src/assets/i18n/de.json | 44 ++-- dmp-frontend/src/assets/i18n/en.json | 42 ++-- dmp-frontend/src/assets/i18n/es.json | 42 ++-- dmp-frontend/src/assets/i18n/gr.json | 42 ++-- dmp-frontend/src/assets/i18n/pt.json | 42 ++-- dmp-frontend/src/assets/i18n/sk.json | 42 ++-- dmp-frontend/src/assets/i18n/sr.json | 42 ++-- dmp-frontend/src/assets/i18n/tr.json | 42 ++-- .../images/editor/icons/add_input_set.svg | 10 + .../editor/icons/add_visibility_rule.svg | 5 + .../src/assets/images/editor/icons/api.svg | 3 + .../assets/images/editor/icons/api_entity.svg | 12 ++ .../images/editor/icons/argos_entities.svg | 7 + .../assets/images/editor/icons/boolean.svg | 9 + .../assets/images/editor/icons/checkbox.svg | 3 + .../src/assets/images/editor/icons/clone.svg | 9 + .../assets/images/editor/icons/currency.svg | 3 + .../images/editor/icons/date_picker.svg | 12 ++ .../assets/images/editor/icons/free_text.svg | 6 + .../assets/images/editor/icons/radio_box.svg | 21 ++ .../src/assets/images/editor/icons/select.svg | 6 + .../assets/images/editor/icons/text_area.svg | 8 + 41 files changed, 1003 insertions(+), 391 deletions(-) create mode 100644 dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-section/form-section-inner/form-section-inner.component.html create mode 100644 dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-section/form-section-inner/form-section-inner.component.scss create mode 100644 dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-section/form-section-inner/form-section-inner.component.ts create mode 100644 dmp-frontend/src/assets/images/editor/icons/add_input_set.svg create mode 100644 dmp-frontend/src/assets/images/editor/icons/add_visibility_rule.svg create mode 100644 dmp-frontend/src/assets/images/editor/icons/api.svg create mode 100644 dmp-frontend/src/assets/images/editor/icons/api_entity.svg create mode 100644 dmp-frontend/src/assets/images/editor/icons/argos_entities.svg create mode 100644 dmp-frontend/src/assets/images/editor/icons/boolean.svg create mode 100644 dmp-frontend/src/assets/images/editor/icons/checkbox.svg create mode 100644 dmp-frontend/src/assets/images/editor/icons/clone.svg create mode 100644 dmp-frontend/src/assets/images/editor/icons/currency.svg create mode 100644 dmp-frontend/src/assets/images/editor/icons/date_picker.svg create mode 100644 dmp-frontend/src/assets/images/editor/icons/free_text.svg create mode 100644 dmp-frontend/src/assets/images/editor/icons/radio_box.svg create mode 100644 dmp-frontend/src/assets/images/editor/icons/select.svg create mode 100644 dmp-frontend/src/assets/images/editor/icons/text_area.svg diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-field/dataset-profile-editor-composite-field.component.html b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-field/dataset-profile-editor-composite-field.component.html index 8728acf2b..890ad84fc 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-field/dataset-profile-editor-composite-field.component.html +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-field/dataset-profile-editor-composite-field.component.html @@ -71,7 +71,7 @@
- @@ -180,80 +180,20 @@ - - -

Input settings

+
+ {{'DATASET-PROFILE-EDITOR.ACTIONS.FIELD.PREVIEW' | translate}} - - - - - {{'DATASET-PROFILE-EDITOR.STEPS.FORM.COMPOSITE-FIELD.FIELDS.MULTIPLICITY-CHECKBOX' | translate}} - - +
+ - - - - {{'DATASET-PROFILE-EDITOR.STEPS.FORM.COMPOSITE-FIELD.FIELDS.COMMENT-CHECKBOX' | translate}} - - - - - - Make it required - - - - - - -

Other actions

- - - delete - Delete - -
- +
-
--> - + +
+ @@ -267,7 +207,7 @@
  • folder - + - {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.DatePicker)}} - {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Currency)}} + + DatePicker icon + {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.DatePicker)}} + + + Current icon + {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Currency)}} + - {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Registries)}} - {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Services)}} - {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Researchers)}} - {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Organizations)}} - {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.ExternalDatasets)}} - {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.DataRepositories)}} - {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Other)}} + + Registries icon + {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Registries)}} + + + Services icon + {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Services)}} + + + Researchers icon + {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Researchers)}} + + + Organizations icon + {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Organizations)}} + + + ExternalDatasets icon + {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.ExternalDatasets)}} + + + DataRepositories icon + {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.DataRepositories)}} + + + Other icon + {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Other)}} + - {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.InternalDmpEntities)}} - {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Tags)}} - {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.DatasetIdentifier)}} - {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Validation)}} + + InternalDmpEntities icon + {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.InternalDmpEntities)}} + + + Tags icon + {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Tags)}} + + + DatasetIdentifier icon + {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.DatasetIdentifier)}} + + + Validation icon + {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Validation)}} + @@ -191,7 +250,8 @@ - + +
    {{'DATASET-PROFILE-EDITOR.ACTIONS.FIELD.PREVIEW' | translate}} @@ -202,6 +262,8 @@ No
    --> + +
    diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/field/dataset-profile-editor-field.component.scss b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/field/dataset-profile-editor-field.component.scss index 38ce2f327..1c94581a8 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/field/dataset-profile-editor-field.component.scss +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/field/dataset-profile-editor-field.component.scss @@ -30,4 +30,9 @@ li.list-inline-item{ background-color:#129D99 ; } } - \ No newline at end of file + + +.input_icon{ + width: 14px; + margin-right: 0.5em; +} \ No newline at end of file diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/section-fieldset/dataset-profile-editor-section-fieldset.component.html b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/section-fieldset/dataset-profile-editor-section-fieldset.component.html index 6bfb1454d..18ac093a4 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/section-fieldset/dataset-profile-editor-section-fieldset.component.html +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/section-fieldset/dataset-profile-editor-section-fieldset.component.html @@ -1,16 +1,39 @@ 
    - - - - - - - + +
    +
    + + + + + + + +
    + +
    + +
    +
    +
    + +
    @@ -30,7 +53,7 @@ delete --> - @@ -46,6 +69,40 @@ +
    + +
    + +
    +
    + -
    - - -
    - - - - - - - - -
    -
    - - - -
    @@ -275,7 +223,7 @@
    {{'DATASET-PROFILE-EDITOR.STEPS.PAGE-INFO.PAGE-NAME' | translate}} *
    {{'DATASET-PROFILE-EDITOR.STEPS.PAGE-INFO.PAGE-NAME-HINT' | translate}}
    - + {{'GENERAL.VALIDATION.REQUIRED' | translate}} @@ -303,6 +251,9 @@ @@ -337,7 +288,7 @@ -
  • - + --> - - + + + + + {{'DATASET-PROFILE-EDITOR.STEPS.FORM.COMPOSITE-FIELD.FIELDS.COMMENT-HINT' | translate}} + + + + + + \ No newline at end of file diff --git a/dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-section/form-section-inner/form-section-inner.component.scss b/dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-section/form-section-inner/form-section-inner.component.scss new file mode 100644 index 000000000..e4523fbf3 --- /dev/null +++ b/dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-section/form-section-inner/form-section-inner.component.scss @@ -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; +} diff --git a/dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-section/form-section-inner/form-section-inner.component.ts b/dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-section/form-section-inner/form-section-inner.component.ts new file mode 100644 index 000000000..b6298840a --- /dev/null +++ b/dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-section/form-section-inner/form-section-inner.component.ts @@ -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); + ((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); + } + ((this.form.get('compositeFields').get('' + compositeFildIndex).get('multiplicityItems'))).removeAt(0); + } + + deleteMultipeFieldFromCompositeFormGroup(compositeFildIndex: number, fildIndex: number) { + ((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); + // } +} diff --git a/dmp-frontend/src/app/ui/misc/dataset-description-form/dataset-description-form.module.ts b/dmp-frontend/src/app/ui/misc/dataset-description-form/dataset-description-form.module.ts index 4280fda84..cfc3ef0db 100644 --- a/dmp-frontend/src/app/ui/misc/dataset-description-form/dataset-description-form.module.ts +++ b/dmp-frontend/src/app/ui/misc/dataset-description-form/dataset-description-form.module.ts @@ -13,6 +13,8 @@ import { FormCompositeTitleComponent } from './components/form-composite-title/f import { ExternalSourcesModule } from '../external-sources/external-sources.module'; import { DatasetDescriptionComponent } from './dataset-description.component'; 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({ imports: [ @@ -26,6 +28,7 @@ import { FormProgressIndicationModule } from './components/form-progress-indicat DatasetDescriptionFormComponent, DatasetDescriptionComponent, FormSectionComponent, + FormSectionInnerComponent, FormCompositeFieldComponent, FormFieldComponent, FormCompositeTitleComponent @@ -34,7 +37,8 @@ import { FormProgressIndicationModule } from './components/form-progress-indicat DatasetDescriptionFormComponent, DatasetDescriptionComponent, FormCompositeFieldComponent, - FormFieldComponent + FormFieldComponent, + FormSectionInnerComponent ], providers: [ VisibilityRulesService, diff --git a/dmp-frontend/src/assets/i18n/de.json b/dmp-frontend/src/assets/i18n/de.json index d9cbf4336..bef562b06 100644 --- a/dmp-frontend/src/assets/i18n/de.json +++ b/dmp-frontend/src/assets/i18n/de.json @@ -290,36 +290,37 @@ "DATASET-TEMPLATE-LANGUAGE": "Dataset template language", "DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language", "DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description", - "UNTITLED": "Untitled" + "UNTITLED": "Untitled", + "QUESTION": "Question" }, "PAGE-INFO": { - "PAGE-NAME": "Section Name", - "PAGE-NAME-HINT": "Set a name for the dataset section.", + "PAGE-NAME": "Chapter Name", + "PAGE-NAME-HINT": "Set a name for the dataset chapter.", "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": { - "CREATE-FIRST-PAGE": "Create the first Section", - "CREATE-NEW-SUBSECTION": "Create new subsection", - "CREATE-NEW-SECTION": "Create new section", - "CREATE-FIRST-SECTION":"Create the first section", + "CREATE-FIRST-PAGE": "Create the first chapter", + "CREATE-NEW-SUBSECTION": "Section", + "CREATE-NEW-SECTION": "Chapter", + "CREATE-FIRST-SECTION":"Create the first chapter", "NOTHING-HERE-HINT": "Nothing here yet.", "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-NAME": "Subsection Name", - "SECTION-NAME-HINT": "Set a name for the subsection.", + "SECTION-NAME": "Section Name", + "SECTION-NAME-HINT": "Set a name for the section.", "SECTION-DESCRIPTION": "Description", - "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the subsection is about.", - "SECTION": "Subsection" + "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the section is about.", + "SECTION": "Section" }, "PAGES": { - "TITLE": "Page Description", - "PAGE-PREFIX": "Page", - "PAGE-INPUT-TITLE": "Page Title", - "DATASET-DETAILS": "Dataset Description Details", + "TITLE": "Chapter Description", + "PAGE-PREFIX": "Chapter", + "PAGE-INPUT-TITLE": "Chapter Title", + "DATASET-DETAILS": "Dataset Details", "EXTERNAL-REFERENCES": "External References", "DESCRIPTION": "Description" }, @@ -487,8 +488,8 @@ } }, "TOOLKIT": { - "GENERAL-TOOLS": "General tools", - "NEW-INPUT-SET": "Add Input Set", + "GENERAL-TOOLS": "Questions tools", + "NEW-INPUT-SET": "Add Question", "CLONE": "Clone", "DELETE": "Delete" } @@ -821,7 +822,8 @@ "VIEW": "Ansehen", "CLONE": "Klon", "NEW-VERSION": "Neue Version", - "VIEW-VERSIONS": "Alle Vorlagenversionen für Datensatzbeschreibungen" + "VIEW-VERSIONS": "Alle Vorlagenversionen für Datensatzbeschreibungen", + "DELETE":"Delete" } }, "DATASET-UPLOAD": { diff --git a/dmp-frontend/src/assets/i18n/en.json b/dmp-frontend/src/assets/i18n/en.json index 8590e5874..2078c5685 100644 --- a/dmp-frontend/src/assets/i18n/en.json +++ b/dmp-frontend/src/assets/i18n/en.json @@ -290,35 +290,36 @@ "DATASET-TEMPLATE-LANGUAGE": "Dataset template language", "DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language", "DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description", - "UNTITLED": "Untitled" + "UNTITLED": "Untitled", + "QUESTION": "Question" }, "PAGE-INFO": { - "PAGE-NAME": "Section Name", - "PAGE-NAME-HINT": "Set a name for the dataset section.", + "PAGE-NAME": "Chapter Name", + "PAGE-NAME-HINT": "Set a name for the dataset chapter.", "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": { - "CREATE-FIRST-PAGE": "Create the first Section", - "CREATE-NEW-SUBSECTION": "Create new subsection", - "CREATE-NEW-SECTION": "Create new section", - "CREATE-FIRST-SECTION":"Create the first section", + "CREATE-FIRST-PAGE": "Create the first chapter", + "CREATE-NEW-SUBSECTION": "Section", + "CREATE-NEW-SECTION": "Chapter", + "CREATE-FIRST-SECTION":"Create the first chapter", "NOTHING-HERE-HINT": "Nothing here yet.", "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-NAME": "Subsection Name", - "SECTION-NAME-HINT": "Set a name for the subsection.", + "SECTION-NAME": "Section Name", + "SECTION-NAME-HINT": "Set a name for the section.", "SECTION-DESCRIPTION": "Description", - "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the subsection is about.", - "SECTION": "Subsection" + "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the section is about.", + "SECTION": "Section" }, "PAGES": { - "TITLE": "Page Description", - "PAGE-PREFIX": "Page", - "PAGE-INPUT-TITLE": "Page Title", + "TITLE": "Chapter Description", + "PAGE-PREFIX": "Chapter", + "PAGE-INPUT-TITLE": "Chapter Title", "DATASET-DETAILS": "Dataset Details", "EXTERNAL-REFERENCES": "External References", "DESCRIPTION": "Description" @@ -487,8 +488,8 @@ } }, "TOOLKIT": { - "GENERAL-TOOLS": "General tools", - "NEW-INPUT-SET": "Add Input Set", + "GENERAL-TOOLS": "Questions tools", + "NEW-INPUT-SET": "Add Question", "CLONE": "Clone", "DELETE": "Delete" } @@ -821,7 +822,8 @@ "VIEW": "View", "CLONE": "Clone", "NEW-VERSION": "New Version", - "VIEW-VERSIONS": "All Dataset Template Versions" + "VIEW-VERSIONS": "All Dataset Template Versions", + "DELETE":"Delete" } }, "DATASET-UPLOAD": { diff --git a/dmp-frontend/src/assets/i18n/es.json b/dmp-frontend/src/assets/i18n/es.json index 4ad6fd4a2..ddd3c6b3a 100644 --- a/dmp-frontend/src/assets/i18n/es.json +++ b/dmp-frontend/src/assets/i18n/es.json @@ -290,35 +290,36 @@ "DATASET-TEMPLATE-LANGUAGE": "Dataset template language", "DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language", "DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description", - "UNTITLED": "Untitled" + "UNTITLED": "Untitled", + "QUESTION": "Question" }, "PAGE-INFO": { - "PAGE-NAME": "Section Name", - "PAGE-NAME-HINT": "Set a name for the dataset section.", + "PAGE-NAME": "Chapter Name", + "PAGE-NAME-HINT": "Set a name for the dataset chapter.", "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": { - "CREATE-FIRST-PAGE": "Create the first Section", - "CREATE-NEW-SUBSECTION": "Create new subsection", - "CREATE-NEW-SECTION": "Create new section", - "CREATE-FIRST-SECTION":"Create the first section", + "CREATE-FIRST-PAGE": "Create the first chapter", + "CREATE-NEW-SUBSECTION": "Section", + "CREATE-NEW-SECTION": "Chapter", + "CREATE-FIRST-SECTION":"Create the first chapter", "NOTHING-HERE-HINT": "Nothing here yet.", "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-NAME": "Subsection Name", - "SECTION-NAME-HINT": "Set a name for the subsection.", + "SECTION-NAME": "Section Name", + "SECTION-NAME-HINT": "Set a name for the section.", "SECTION-DESCRIPTION": "Description", - "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the subsection is about.", - "SECTION": "Subsection" + "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the section is about.", + "SECTION": "Section" }, "PAGES": { - "TITLE": "Descripición de la página", - "PAGE-PREFIX": "Página", - "PAGE-INPUT-TITLE": "Título de la página", + "TITLE": "Chapter Description", + "PAGE-PREFIX": "Chapter", + "PAGE-INPUT-TITLE": "Chapter Title", "DATASET-DETAILS": "Detalles de la descripción del dataset", "EXTERNAL-REFERENCES": "Referencias externas", "DESCRIPTION": "Descripción" @@ -487,8 +488,8 @@ } }, "TOOLKIT": { - "GENERAL-TOOLS": "General tools", - "NEW-INPUT-SET": "Add Input Set", + "GENERAL-TOOLS": "Questions tools", + "NEW-INPUT-SET": "Add Question", "CLONE": "Clone", "DELETE": "Delete" } @@ -821,7 +822,8 @@ "VIEW": "Vista", "CLONE": "Clonar", "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": { diff --git a/dmp-frontend/src/assets/i18n/gr.json b/dmp-frontend/src/assets/i18n/gr.json index 3e3642d99..e41d595de 100644 --- a/dmp-frontend/src/assets/i18n/gr.json +++ b/dmp-frontend/src/assets/i18n/gr.json @@ -290,35 +290,36 @@ "DATASET-TEMPLATE-LANGUAGE": "Dataset template language", "DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language", "DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description", - "UNTITLED": "Untitled" + "UNTITLED": "Untitled", + "QUESTION": "Question" }, "PAGE-INFO": { - "PAGE-NAME": "Section Name", - "PAGE-NAME-HINT": "Set a name for the dataset section.", + "PAGE-NAME": "Chapter Name", + "PAGE-NAME-HINT": "Set a name for the dataset chapter.", "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": { - "CREATE-FIRST-PAGE": "Create the first Section", - "CREATE-NEW-SUBSECTION": "Create new subsection", - "CREATE-NEW-SECTION": "Create new section", - "CREATE-FIRST-SECTION":"Create the first section", + "CREATE-FIRST-PAGE": "Create the first chapter", + "CREATE-NEW-SUBSECTION": "Section", + "CREATE-NEW-SECTION": "Chapter", + "CREATE-FIRST-SECTION":"Create the first chapter", "NOTHING-HERE-HINT": "Nothing here yet.", "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-NAME": "Subsection Name", - "SECTION-NAME-HINT": "Set a name for the subsection.", + "SECTION-NAME": "Section Name", + "SECTION-NAME-HINT": "Set a name for the section.", "SECTION-DESCRIPTION": "Description", - "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the subsection is about.", - "SECTION": "Subsection" + "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the section is about.", + "SECTION": "Section" }, "PAGES": { - "TITLE": "Περιγραφή Σελίδας", - "PAGE-PREFIX": "Σελίδα", - "PAGE-INPUT-TITLE": "Τίτλος Σελίδας", + "TITLE": "Chapter Description", + "PAGE-PREFIX": "Chapter", + "PAGE-INPUT-TITLE": "Chapter Title", "DATASET-DETAILS": "Λεπτομέρειες Περιγραφής Συνόλου Δεδομένων", "EXTERNAL-REFERENCES": "Εξωτερικές Πηγές", "DESCRIPTION": "Περιγραφή" @@ -487,8 +488,8 @@ } }, "TOOLKIT": { - "GENERAL-TOOLS": "General tools", - "NEW-INPUT-SET": "Add Input Set", + "GENERAL-TOOLS": "Questions tools", + "NEW-INPUT-SET": "Add Question", "CLONE": "Clone", "DELETE": "Delete" } @@ -821,7 +822,8 @@ "VIEW": "Προβολή", "CLONE": "Κλώνος", "NEW-VERSION": "Νέα Έκδοση", - "VIEW-VERSIONS": "Όλες οι εκδόσεις των Templates Περιγραφής Συνόλου Δεδομένων" + "VIEW-VERSIONS": "Όλες οι εκδόσεις των Templates Περιγραφής Συνόλου Δεδομένων", + "DELETE":"Delete" } }, "DATASET-UPLOAD": { diff --git a/dmp-frontend/src/assets/i18n/pt.json b/dmp-frontend/src/assets/i18n/pt.json index b0e593d1f..35a732e8d 100644 --- a/dmp-frontend/src/assets/i18n/pt.json +++ b/dmp-frontend/src/assets/i18n/pt.json @@ -290,35 +290,36 @@ "DATASET-TEMPLATE-LANGUAGE": "Dataset template language", "DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language", "DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description", - "UNTITLED": "Untitled" + "UNTITLED": "Untitled", + "QUESTION": "Question" }, "PAGE-INFO": { - "PAGE-NAME": "Section Name", - "PAGE-NAME-HINT": "Set a name for the dataset section.", + "PAGE-NAME": "Chapter Name", + "PAGE-NAME-HINT": "Set a name for the dataset chapter.", "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": { - "CREATE-FIRST-PAGE": "Create the first Section", - "CREATE-NEW-SUBSECTION": "Create new subsection", - "CREATE-NEW-SECTION": "Create new section", - "CREATE-FIRST-SECTION":"Create the first section", + "CREATE-FIRST-PAGE": "Create the first chapter", + "CREATE-NEW-SUBSECTION": "Section", + "CREATE-NEW-SECTION": "Chapter", + "CREATE-FIRST-SECTION":"Create the first chapter", "NOTHING-HERE-HINT": "Nothing here yet.", "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-NAME": "Subsection Name", - "SECTION-NAME-HINT": "Set a name for the subsection.", + "SECTION-NAME": "Section Name", + "SECTION-NAME-HINT": "Set a name for the section.", "SECTION-DESCRIPTION": "Description", - "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the subsection is about.", - "SECTION": "Subsection" + "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the section is about.", + "SECTION": "Section" }, "PAGES": { - "TITLE": "Descrição da Página", - "PAGE-PREFIX": "Página", - "PAGE-INPUT-TITLE": "Título da Página", + "TITLE": "Chapter Description", + "PAGE-PREFIX": "Chapter", + "PAGE-INPUT-TITLE": "Chapter Title", "DATASET-DETAILS": "Detalhes do Dataset", "EXTERNAL-REFERENCES": "Referências Externas", "DESCRIPTION": "Descrição" @@ -487,8 +488,8 @@ } }, "TOOLKIT": { - "GENERAL-TOOLS": "General tools", - "NEW-INPUT-SET": "Add Input Set", + "GENERAL-TOOLS": "Questions tools", + "NEW-INPUT-SET": "Add Question", "CLONE": "Clone", "DELETE": "Delete" } @@ -821,7 +822,8 @@ "VIEW": "Ver", "CLONE": "Duplicar", "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": { diff --git a/dmp-frontend/src/assets/i18n/sk.json b/dmp-frontend/src/assets/i18n/sk.json index 24b7a4e1e..9c07718b8 100644 --- a/dmp-frontend/src/assets/i18n/sk.json +++ b/dmp-frontend/src/assets/i18n/sk.json @@ -290,35 +290,36 @@ "DATASET-TEMPLATE-LANGUAGE": "Dataset template language", "DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language", "DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description", - "UNTITLED": "Untitled" + "UNTITLED": "Untitled", + "QUESTION": "Question" }, "PAGE-INFO": { - "PAGE-NAME": "Section Name", - "PAGE-NAME-HINT": "Set a name for the dataset section.", + "PAGE-NAME": "Chapter Name", + "PAGE-NAME-HINT": "Set a name for the dataset chapter.", "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": { - "CREATE-FIRST-PAGE": "Create the first Section", - "CREATE-NEW-SUBSECTION": "Create new subsection", - "CREATE-NEW-SECTION": "Create new section", - "CREATE-FIRST-SECTION":"Create the first section", + "CREATE-FIRST-PAGE": "Create the first chapter", + "CREATE-NEW-SUBSECTION": "Section", + "CREATE-NEW-SECTION": "Chapter", + "CREATE-FIRST-SECTION":"Create the first chapter", "NOTHING-HERE-HINT": "Nothing here yet.", "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-NAME": "Subsection Name", - "SECTION-NAME-HINT": "Set a name for the subsection.", + "SECTION-NAME": "Section Name", + "SECTION-NAME-HINT": "Set a name for the section.", "SECTION-DESCRIPTION": "Description", - "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the subsection is about.", - "SECTION": "Subsection" + "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the section is about.", + "SECTION": "Section" }, "PAGES": { - "TITLE": "Opis stránky", - "PAGE-PREFIX": "Stránka", - "PAGE-INPUT-TITLE": "Názov stránky", + "TITLE": "Chapter Description", + "PAGE-PREFIX": "Chapter", + "PAGE-INPUT-TITLE": "Chapter Title", "DATASET-DETAILS": "Podrobné informácie o súbore dát", "EXTERNAL-REFERENCES": "Externé odkazy", "DESCRIPTION": "Opis" @@ -487,8 +488,8 @@ } }, "TOOLKIT": { - "GENERAL-TOOLS": "General tools", - "NEW-INPUT-SET": "Add Input Set", + "GENERAL-TOOLS": "Questions tools", + "NEW-INPUT-SET": "Add Question", "CLONE": "Clone", "DELETE": "Delete" } @@ -821,7 +822,8 @@ "VIEW": "Pozrieť", "CLONE": "Klonovať", "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": { diff --git a/dmp-frontend/src/assets/i18n/sr.json b/dmp-frontend/src/assets/i18n/sr.json index b70c854fd..ac1e38e84 100644 --- a/dmp-frontend/src/assets/i18n/sr.json +++ b/dmp-frontend/src/assets/i18n/sr.json @@ -290,35 +290,36 @@ "DATASET-TEMPLATE-LANGUAGE": "Dataset template language", "DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language", "DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description", - "UNTITLED": "Untitled" + "UNTITLED": "Untitled", + "QUESTION": "Question" }, "PAGE-INFO": { - "PAGE-NAME": "Section Name", - "PAGE-NAME-HINT": "Set a name for the dataset section.", + "PAGE-NAME": "Chapter Name", + "PAGE-NAME-HINT": "Set a name for the dataset chapter.", "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": { - "CREATE-FIRST-PAGE": "Create the first Section", - "CREATE-NEW-SUBSECTION": "Create new subsection", - "CREATE-NEW-SECTION": "Create new section", - "CREATE-FIRST-SECTION":"Create the first section", + "CREATE-FIRST-PAGE": "Create the first chapter", + "CREATE-NEW-SUBSECTION": "Section", + "CREATE-NEW-SECTION": "Chapter", + "CREATE-FIRST-SECTION":"Create the first chapter", "NOTHING-HERE-HINT": "Nothing here yet.", "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-NAME": "Subsection Name", - "SECTION-NAME-HINT": "Set a name for the subsection.", + "SECTION-NAME": "Section Name", + "SECTION-NAME-HINT": "Set a name for the section.", "SECTION-DESCRIPTION": "Description", - "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the subsection is about.", - "SECTION": "Subsection" + "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the section is about.", + "SECTION": "Section" }, "PAGES": { - "TITLE": "Opis stranice", - "PAGE-PREFIX": "Stranica", - "PAGE-INPUT-TITLE": "Naslov stranice", + "TITLE": "Chapter Description", + "PAGE-PREFIX": "Chapter", + "PAGE-INPUT-TITLE": "Chapter Title", "DATASET-DETAILS": "Detalji skupa podataka", "EXTERNAL-REFERENCES": "Spoljne reference", "DESCRIPTION": "Opis" @@ -487,8 +488,8 @@ } }, "TOOLKIT": { - "GENERAL-TOOLS": "General tools", - "NEW-INPUT-SET": "Add Input Set", + "GENERAL-TOOLS": "Questions tools", + "NEW-INPUT-SET": "Add Question", "CLONE": "Clone", "DELETE": "Delete" } @@ -821,7 +822,8 @@ "VIEW": "Pregled", "CLONE": "Napravite kopiju", "NEW-VERSION": "Nova verzija", - "VIEW-VERSIONS": "Sve verzije obrazaca za skupove podataka" + "VIEW-VERSIONS": "Sve verzije obrazaca za skupove podataka", + "DELETE":"Delete" } }, "DATASET-UPLOAD": { diff --git a/dmp-frontend/src/assets/i18n/tr.json b/dmp-frontend/src/assets/i18n/tr.json index 8ca447670..39886a703 100644 --- a/dmp-frontend/src/assets/i18n/tr.json +++ b/dmp-frontend/src/assets/i18n/tr.json @@ -290,35 +290,36 @@ "DATASET-TEMPLATE-LANGUAGE": "Dataset template language", "DATASET-TEMPLATE-SELECT-LANGUAGE": "Select a language", "DATASET-TEMPLATE-DESCRIPTION-PLACEHOLDER": "Dataset template description", - "UNTITLED": "Untitled" + "UNTITLED": "Untitled", + "QUESTION": "Question" }, "PAGE-INFO": { - "PAGE-NAME": "Section Name", - "PAGE-NAME-HINT": "Set a name for the dataset section.", + "PAGE-NAME": "Chapter Name", + "PAGE-NAME-HINT": "Set a name for the dataset chapter.", "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": { - "CREATE-FIRST-PAGE": "Create the first Section", - "CREATE-NEW-SUBSECTION": "Create new subsection", - "CREATE-NEW-SECTION": "Create new section", - "CREATE-FIRST-SECTION":"Create the first section", + "CREATE-FIRST-PAGE": "Create the first chapter", + "CREATE-NEW-SUBSECTION": "Section", + "CREATE-NEW-SECTION": "Chapter", + "CREATE-FIRST-SECTION":"Create the first chapter", "NOTHING-HERE-HINT": "Nothing here yet.", "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-NAME": "Subsection Name", - "SECTION-NAME-HINT": "Set a name for the subsection.", + "SECTION-NAME": "Section Name", + "SECTION-NAME-HINT": "Set a name for the section.", "SECTION-DESCRIPTION": "Description", - "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the subsection is about.", - "SECTION": "Subsection" + "SECTION-DESCRIPTION-HINT": "Write a brief desciption of what the section is about.", + "SECTION": "Section" }, "PAGES": { - "TITLE": "Sayfa Tanımı", - "PAGE-PREFIX": "Sayfa", - "PAGE-INPUT-TITLE": "Sayfa Başlığı", + "TITLE": "Chapter Description", + "PAGE-PREFIX": "Chapter", + "PAGE-INPUT-TITLE": "Chapter Title", "DATASET-DETAILS": "Veri Seti Tanım Ayrıntıları", "EXTERNAL-REFERENCES": "Dış Bağlantılar", "DESCRIPTION": "Tanım" @@ -487,8 +488,8 @@ } }, "TOOLKIT": { - "GENERAL-TOOLS": "General tools", - "NEW-INPUT-SET": "Add Input Set", + "GENERAL-TOOLS": "Questions tools", + "NEW-INPUT-SET": "Add Question", "CLONE": "Clone", "DELETE": "Delete" } @@ -821,7 +822,8 @@ "VIEW": "Göster", "CLONE": "Çoğalt", "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": { diff --git a/dmp-frontend/src/assets/images/editor/icons/add_input_set.svg b/dmp-frontend/src/assets/images/editor/icons/add_input_set.svg new file mode 100644 index 000000000..91d11ea8a --- /dev/null +++ b/dmp-frontend/src/assets/images/editor/icons/add_input_set.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/dmp-frontend/src/assets/images/editor/icons/add_visibility_rule.svg b/dmp-frontend/src/assets/images/editor/icons/add_visibility_rule.svg new file mode 100644 index 000000000..09cbae41b --- /dev/null +++ b/dmp-frontend/src/assets/images/editor/icons/add_visibility_rule.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/dmp-frontend/src/assets/images/editor/icons/api.svg b/dmp-frontend/src/assets/images/editor/icons/api.svg new file mode 100644 index 000000000..3bb818ce4 --- /dev/null +++ b/dmp-frontend/src/assets/images/editor/icons/api.svg @@ -0,0 +1,3 @@ + + + diff --git a/dmp-frontend/src/assets/images/editor/icons/api_entity.svg b/dmp-frontend/src/assets/images/editor/icons/api_entity.svg new file mode 100644 index 000000000..d7a782b99 --- /dev/null +++ b/dmp-frontend/src/assets/images/editor/icons/api_entity.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/dmp-frontend/src/assets/images/editor/icons/argos_entities.svg b/dmp-frontend/src/assets/images/editor/icons/argos_entities.svg new file mode 100644 index 000000000..12bb06eba --- /dev/null +++ b/dmp-frontend/src/assets/images/editor/icons/argos_entities.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/dmp-frontend/src/assets/images/editor/icons/boolean.svg b/dmp-frontend/src/assets/images/editor/icons/boolean.svg new file mode 100644 index 000000000..5895da1fe --- /dev/null +++ b/dmp-frontend/src/assets/images/editor/icons/boolean.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/dmp-frontend/src/assets/images/editor/icons/checkbox.svg b/dmp-frontend/src/assets/images/editor/icons/checkbox.svg new file mode 100644 index 000000000..7b93b3dc1 --- /dev/null +++ b/dmp-frontend/src/assets/images/editor/icons/checkbox.svg @@ -0,0 +1,3 @@ + + + diff --git a/dmp-frontend/src/assets/images/editor/icons/clone.svg b/dmp-frontend/src/assets/images/editor/icons/clone.svg new file mode 100644 index 000000000..430f9172d --- /dev/null +++ b/dmp-frontend/src/assets/images/editor/icons/clone.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/dmp-frontend/src/assets/images/editor/icons/currency.svg b/dmp-frontend/src/assets/images/editor/icons/currency.svg new file mode 100644 index 000000000..5372bdf49 --- /dev/null +++ b/dmp-frontend/src/assets/images/editor/icons/currency.svg @@ -0,0 +1,3 @@ + + + diff --git a/dmp-frontend/src/assets/images/editor/icons/date_picker.svg b/dmp-frontend/src/assets/images/editor/icons/date_picker.svg new file mode 100644 index 000000000..90bd2f0cb --- /dev/null +++ b/dmp-frontend/src/assets/images/editor/icons/date_picker.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/dmp-frontend/src/assets/images/editor/icons/free_text.svg b/dmp-frontend/src/assets/images/editor/icons/free_text.svg new file mode 100644 index 000000000..dfa46efd6 --- /dev/null +++ b/dmp-frontend/src/assets/images/editor/icons/free_text.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/dmp-frontend/src/assets/images/editor/icons/radio_box.svg b/dmp-frontend/src/assets/images/editor/icons/radio_box.svg new file mode 100644 index 000000000..bc52ef1b1 --- /dev/null +++ b/dmp-frontend/src/assets/images/editor/icons/radio_box.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/dmp-frontend/src/assets/images/editor/icons/select.svg b/dmp-frontend/src/assets/images/editor/icons/select.svg new file mode 100644 index 000000000..289b47d29 --- /dev/null +++ b/dmp-frontend/src/assets/images/editor/icons/select.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/dmp-frontend/src/assets/images/editor/icons/text_area.svg b/dmp-frontend/src/assets/images/editor/icons/text_area.svg new file mode 100644 index 000000000..11e0cdd17 --- /dev/null +++ b/dmp-frontend/src/assets/images/editor/icons/text_area.svg @@ -0,0 +1,8 @@ + + + + + + + +