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..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,8 +71,8 @@ - + @@ -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 - + {{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..ef6136738 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 @@ -72,38 +72,97 @@ [disabled]="viewOnly" [errorStateMatcher]="this" > - {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.TextArea)}} - {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.FreeText)}} + + TextArea icon + {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.TextArea)}} + + + FreeText icon + {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.FreeText)}} + - {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.BooleanDecision)}} - {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.RadioBox)}} - {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Select)}} - {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.CheckBox)}} + + Boolean icon + {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.BooleanDecision)}} + + + RadioBox icon + {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.RadioBox)}} + + + + Select icon + + {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.Select)}} + + + CheckBox icon + {{enumUtils.toDatasetProfileViewTypeString(viewTypeEnum.CheckBox)}} + - {{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)}} + @@ -140,7 +199,7 @@ + placeHolder="{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.FIELDS.DEFAULT-VALUE' | translate}}"> @@ -191,7 +250,8 @@ - + +
    {{'DATASET-PROFILE-EDITOR.ACTIONS.FIELD.PREVIEW' | translate}} @@ -202,6 +262,8 @@ No
    --> + +
    @@ -224,4 +286,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.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/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/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/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 @@ -
  • - + --> - - + - + diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.scss b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.scss index 64435dc46..d152f3adc 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.scss +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/dataset-profile-editor.component.scss @@ -175,12 +175,19 @@ $blue-color-light: #5cf7f2; .action-list-icon{ font-size: 1.2em; - padding-right: 1em; + // padding-right: 1em; + width: 14px; + margin-right: 0.5em; + margin-left: -.09em; height: auto; color: #129D99;; } + .input_icon{ + width: 14px; + margin-right: .5em; + } .action-list-text{ - font-size: 0.9em;; + font-size: 0.9em; } } .action-list-label{ 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..453593c21 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(); @@ -1544,7 +1547,15 @@ export class DatasetProfileEditorComponent extends BaseComponent implements OnIn return stepUnlocked; } - validateStep(step: CdkStep){ + validateStep(selectedIndex){ + + if(selectedIndex === 1){//form description + if(this.form.invalid){ + this.checkFormValidation(); + } + } + + // if(step.hasError){ // this.printMyErrors(this.form); // } @@ -1676,6 +1687,11 @@ export class DatasetProfileEditorComponent extends BaseComponent implements OnIn } } + /** + * Get all filedsets in a tocentry array; + * @param entries Tocentries to search in + * @returns The tocentries that are Fieldsets provided in the entries + */ private _getAllFieldSets(entries: ToCEntry[]):ToCEntry[]{ const fieldsets:ToCEntry[] = []; @@ -1839,6 +1855,48 @@ export class DatasetProfileEditorComponent extends BaseComponent implements OnIn } + + //Temporary patch + /** + * Append custom validators to fields. Some validators are applied on template. In case they are never rendereed, + * he form might be valid when it shouldnt. + * @param + */ + private _initializeFormValidity(tocentries: ToCEntry[]) { + const fieldsets = this._getAllFieldSets(tocentries); + + try{ + fieldsets.forEach(fs=>{ + fs.form.get('title').setValidators(Validators.required); + const fieldsF = fs.form.get('fields') as FormArray; + if(fieldsF){ + fieldsF.controls.forEach(field=>{ + const renderStyleValue = field.get('viewStyle').get('renderStyle').value; + + if(renderStyleValue === DatasetProfileFieldViewStyle.CheckBox){ + field.get('defaultValue').get('value').setValidators(Validators.required); + }else if(renderStyleValue === 'combobox'){ + + const comboType = field.get('data').get('type').value; + if(comboType === DatasetProfileComboBoxType.Autocomplete){//As 'Other' in UI + field.get('data').setValidators(EditorCustomValidators.atLeastOneElementListValidator('autoCompleteSingleDataList')); + }else if(comboType === DatasetProfileComboBoxType.WordList){ + field.get('data').setValidators(EditorCustomValidators.atLeastOneElementListValidator('options')); + } + + }else if(renderStyleValue === DatasetProfileFieldViewStyle.RadioBox){ + field.get('data').setValidators(EditorCustomValidators.atLeastOneElementListValidator('options')); + } + }); + } + }); + }catch(e){ + console.error('Error initializing validators.'); + console.error(e); + } + + } + } interface InvalidControl{ diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/listing/dataset-profile-listing.component.html b/dmp-frontend/src/app/ui/admin/dataset-profile/listing/dataset-profile-listing.component.html index 78e2dca1a..e367c6848 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/listing/dataset-profile-listing.component.html +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/listing/dataset-profile-listing.component.html @@ -67,6 +67,10 @@ library_books {{'DATASET-PROFILE-LISTING.ACTIONS.VIEW-VERSIONS' | translate}} + + + + + {{'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 b5d1b2cd4..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" }, @@ -463,7 +464,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":{ @@ -485,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" } @@ -819,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 16d94410b..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" @@ -463,7 +464,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":{ @@ -485,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" } @@ -819,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 98d1dba4d..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" @@ -463,7 +464,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":{ @@ -485,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" } @@ -819,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 69c63c81b..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": "Περιγραφή" @@ -463,7 +464,9 @@ "TARGET": "Ταυτοποίηση στοχοθετημένου πεδίου", "VALUE": "Απαιτούμενη τιμή", "RULE-IF": "Εάν η τιμή είναι", - "RULE-THEN": "τότε δείξε το Πεδίο με ταυτοποίηση" + "RULE-THEN": "τότε δείξε το Πεδίο με ταυτοποίηση", + "FIELDSETS": "Input sets", + "FIELDS":"Inputs" } }, "FORM-VALIDATION":{ @@ -485,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" } @@ -819,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 e591fdca6..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" @@ -463,7 +464,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":{ @@ -485,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" } @@ -819,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 8a21e0239..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" @@ -463,7 +464,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":{ @@ -485,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" } @@ -819,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 edd84b723..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" @@ -463,7 +464,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":{ @@ -485,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" } @@ -819,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 3d78ebd9e..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" @@ -463,7 +464,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":{ @@ -485,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" } @@ -819,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 @@ + + + + + + + +