Merge branch 'AdminTemplateRedesign' into WizardDescriptionRefactor

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

View File

@ -1,7 +1,7 @@
import { FieldDataEditorModel } from './field-data-editor-model';
import { 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<AutoCompleteSingleDataEditorModel> {
@ -16,8 +16,8 @@ export class AutoCompleteSingleDataEditorModel extends FieldDataEditorModel<Auto
buildForm(disabled: boolean = false, skipDisable: Array<String> = []): 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));

View File

@ -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){
// }
}

View File

@ -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')) }],

View File

@ -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;
}
}

View File

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

View File

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

View File

@ -5,7 +5,7 @@ import { Guid } from '@common/types/guid';
import { RuleEditorModel } from '../../../admin/rule-editor-model';
import { ValidationType } from '@app/core/common/enum/validation-type';
import { MatCheckboxChange } from '@angular/material/checkbox';
import { DatasetDescriptionCompositeFieldEditorModel, DatasetDescriptionFieldEditorModel } from '@app/ui/misc/dataset-description-form/dataset-description-form.model';
import { DatasetDescriptionCompositeFieldEditorModel, DatasetDescriptionFieldEditorModel, DatasetDescriptionFormEditorModel, DatasetDescriptionSectionEditorModel } from '@app/ui/misc/dataset-description-form/dataset-description-form.model';
import { DatasetProfileFieldViewStyle } from '@app/core/common/enum/dataset-profile-field-view-style';
import { MatDialog } from '@angular/material';
import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog/confirmation-dialog.component';
@ -33,6 +33,15 @@ import { ValidationDataEditorModel } from '../../../admin/field-data/validation-
import { DatasetProfileService } from '@app/core/services/dataset-profile/dataset-profile.service';
import { OrganizationsDataEditorModel } from '../../../admin/field-data/organizations-data-editor-models';
import { EditorCustomValidators } from '../../custom-validators/editor-custom-validators';
import { Field, FieldSet } from '@app/core/model/admin/dataset-profile/dataset-profile';
import { DatasetProfileComboBoxType } from '@app/core/common/enum/dataset-profile-combo-box-type';
import { DatasetProfileInternalDmpEntitiesType } from '@app/core/common/enum/dataset-profile-internal-dmp-entities-type';
import { AutoCompleteFieldData, BooleanDecisionFieldData, CheckBoxFieldData, CurrencyFieldData, DataRepositoriesFieldData, DatasetIdentifierFieldData, DatePickerFieldData, DmpsAutoCompleteFieldData, ExternalDatasetsFieldData, FreeTextFieldData, OrganizationsFieldData, RadioBoxFieldData, RegistriesFieldData, ResearchersAutoCompleteFieldData, ServicesFieldData, TagsFieldData, TextAreaFieldData, ValidationFieldData, WordListFieldData } from '@app/core/model/dataset-profile-definition/field-data/field-data';
import { CompositeField } from '@app/core/model/dataset-profile-definition/composite-field';
import {Field as FieldDefinition} from '@app/core/model/dataset-profile-definition/field';
import { Subject } from 'rxjs';
import { debounce, debounceTime } from 'rxjs/operators';
import { setUncaughtExceptionCaptureCallback } from 'process';
@Component({
selector: 'app-dataset-profile-editor-composite-field-component',
@ -54,7 +63,7 @@ export class DatasetProfileEditorCompositeFieldComponent implements OnInit, OnCh
showAdditionalInfo: boolean = false;
showExtendedDescription: boolean = false;
previewForm: FormGroup;
previewForm: FormGroup = null;
// isComposite = false;
// isMultiplicityEnabled = false;
viewStyleEnum = DatasetProfileFieldViewStyle;
@ -110,45 +119,114 @@ export class DatasetProfileEditorCompositeFieldComponent implements OnInit, OnCh
this.showExtendedDescription = !!this.form.get('extendedDescription').value;
this.showAdditionalInfo = !!this.form.get('additionalInformation').value;
}
generatePreview(){
const editorModel = new DatasetDescriptionCompositeFieldEditorModel();
editorModel.title = this.form.get('title').value;
editorModel.description = this.form.get('description').value;
editorModel.extendedDescription = this.form.get('extendedDescription').value;
editorModel.additionalInformation = this.form.get('additionalInformation').value;
editorModel.hasCommentField = this.form.get('hasCommentField').value;
editorModel.fields = [];
(this.form.get('fields') as FormArray).controls.forEach(field=>{
const fieldEditorModel = new DatasetDescriptionFieldEditorModel();
this.form.valueChanges.subscribe(changes=>{
this.previewForm = null;
this.generatePreviewForm();
fieldEditorModel.viewStyle= {
renderStyle: field.get('viewStyle').get('renderStyle').value,
cssClass: null
};
fieldEditorModel.defaultValue = field.get('defaultValue').value;
switch (field.get('viewStyle').get('renderStyle').value) {
case DatasetProfileFieldViewStyle.TextArea:
fieldEditorModel.data = {
label: field.get('data').get('label').value
};
break;
default:
break;
}
editorModel.fields.push(fieldEditorModel);
});
this.previewSubject$.pipe(debounceTime(600)).subscribe(model=>{
this.previewForm = model.buildForm();
})
this.previewForm = editorModel.buildForm();
this.generatePreviewForm();
}
previewSubject$: Subject<DatasetDescriptionSectionEditorModel> = new Subject<DatasetDescriptionSectionEditorModel>();
private generatePreviewForm(){
const formValue:FieldSet = this.form.getRawValue();
const fields:FieldDefinition[] = formValue.fields.map(editorField=>this._fieldToFieldDefinition(editorField));
const compositeField: CompositeField = {
id: formValue.id,
additionalInformation: formValue.additionalInformation,
extendedDescription: formValue.extendedDescription,
numbering:'',
title: formValue.title,
ordinal: formValue.ordinal,
description: formValue.description,
hasCommentField: formValue.hasCommentField,
commentFieldValue: '',
multiplicity: {max:formValue.multiplicity.max, min : formValue.multiplicity.min},
multiplicityItems:null,
fields: fields.map(editorField=>{
return new DatasetDescriptionFieldEditorModel().fromModel(editorField);
})
}
const section = new DatasetDescriptionSectionEditorModel();
section.title = '';
section.numbering = '';
const compositeForm = new DatasetDescriptionCompositeFieldEditorModel().fromModel(compositeField)
section.compositeFields = [compositeForm];
this.previewSubject$.next(section);
}
private _fieldToFieldDefinition(editorField: Field): FieldDefinition{
const field = {
id: editorField.id,
title: '',
page: editorField.page,
numbering:'',
multiplicity:null,
multiplicityItems: null,
viewStyle: editorField.viewStyle,
defaultValue:editorField.defaultValue,
value: editorField.defaultValue.value,
validations: editorField.validations,
} as FieldDefinition;
field.data = editorField.data;
// return new DatasetDescriptionFieldEditorModel().fromModel(field);
return field;
}
// generatePreview(){
// const editorModel = new DatasetDescriptionCompositeFieldEditorModel();
// editorModel.title = this.form.get('title').value;
// editorModel.description = this.form.get('description').value;
// editorModel.extendedDescription = this.form.get('extendedDescription').value;
// editorModel.additionalInformation = this.form.get('additionalInformation').value;
// editorModel.hasCommentField = this.form.get('hasCommentField').value;
// editorModel.fields = [];
// (this.form.get('fields') as FormArray).controls.forEach(field=>{
// const fieldEditorModel = new DatasetDescriptionFieldEditorModel();
// fieldEditorModel.viewStyle= {
// renderStyle: field.get('viewStyle').get('renderStyle').value,
// cssClass: null
// };
// fieldEditorModel.defaultValue = field.get('defaultValue').value;
// switch (field.get('viewStyle').get('renderStyle').value) {
// case DatasetProfileFieldViewStyle.TextArea:
// fieldEditorModel.data = {
// label: field.get('data').get('label').value
// };
// break;
// default:
// break;
// }
// editorModel.fields.push(fieldEditorModel);
// });
// this.previewForm = editorModel.buildForm();
// }
onIsCompositeChange(isComposite: boolean) {
if (!isComposite && (<FormArray>this.form.get('fields')).length > 1) {
for (let i = 0; i < (<FormArray>this.form.get('fields')).length - 1; i++) {
@ -330,119 +408,352 @@ export class DatasetProfileEditorCompositeFieldComponent implements OnInit, OnCh
addNewInput(type: ViewStyleType){
const fieldsArray = this.form.get('fields') as FormArray;
let targetOrdinal = fieldsArray.length;
try{
targetOrdinal = fieldsArray.controls.map(control=> control.get('ordinal').value).reduce((a,b)=>Math.max(a,b)) +1;
}catch{
}
const field: FieldEditorModel = new FieldEditorModel();
field.id=Guid.create().toString();
field.ordinal = (this.form.get('fields') as FormArray).length;
const field = {
id: Guid.create().toString(),
ordinal: targetOrdinal,
visible:{rules:[],style:null},
validations:[],
viewStyle:{}
const fieldForm = field.buildForm();
} as Field;
// const field: FieldEditorModel = new FieldEditorModel();
// field.id=Guid.create().toString();
// field.ordinal = (this.form.get('fields') as FormArray).length;
// const fieldForm = field.buildForm();
// fieldForm.setValidators(this.customFieldValidator());
// fieldForm.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;
}
}
(<FormArray>this.form.get('fields')).push(fieldForm);
(<FormArray>this.form.get('fields')).push(new FieldEditorModel().fromModel(field).buildForm());
fieldForm.get('viewStyle').get('renderStyle').updateValueAndValidity();
fieldForm.get('data').updateValueAndValidity();
// fieldForm.get('viewStyle').get('renderStyle').updateValueAndValidity();
// fieldForm.get('data').updateValueAndValidity();
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -37,6 +37,10 @@ import { Guid } from '@common/types/guid';
import { ErrorStateMatcher, MatSlideToggleChange } from '@angular/material';
import { 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;
// }
// }
}

View File

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

View File

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

View File

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

View File

@ -28,6 +28,9 @@ export class DatasetProfileEditorSectionFieldSetComponent implements OnInit, OnC
@Output() selectedEntryId = new EventEmitter<string>();
@Output() dataNeedsRefresh = new EventEmitter<void> ();
@Output() removeFieldSet = new EventEmitter<string>();
@Output() addNewFieldSet = new EventEmitter<FormGroup>();
@Output() cloneFieldSet = new EventEmitter<FormGroup>();
// FIELDSET_PREFIX_ID="FIELDSET_PREFIX_ID";
@ -48,9 +51,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;
}
});
@ -216,6 +219,17 @@ export class DatasetProfileEditorSectionFieldSetComponent implements OnInit, OnC
}
onRemoveFieldSet(fieldsetId: string){
this.removeFieldSet.emit(fieldsetId);
}
onCloneFieldSet(fieldset: FormGroup){
this.cloneFieldSet.emit(fieldset);
}
onAddFieldSet(){
this.addNewFieldSet.emit(this.form);
}
// addField() {
// const fieldSet: FieldSetEditorModel = new FieldSetEditorModel();

View File

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

View File

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

View File

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

View File

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

View File

@ -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{

View File

@ -44,6 +44,7 @@ import { SideNavService } from '@app/core/services/sidenav/side-nav.sevice';
import { EditorCustomValidators, EditorCustomValidatorsEnum } from './custom-validators/editor-custom-validators';
import { 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 = <FormGroup>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{

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -13,6 +13,8 @@ import { FormCompositeTitleComponent } from './components/form-composite-title/f
import { ExternalSourcesModule } from '../external-sources/external-sources.module';
import { 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,

View File

@ -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": {

View File

@ -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": {

View File

@ -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": {

View File

@ -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": {

View File

@ -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": {

View File

@ -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": {

View File

@ -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": {

View File

@ -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": {

View File

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

After

Width:  |  Height:  |  Size: 765 B

View File

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

After

Width:  |  Height:  |  Size: 502 B

View File

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

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

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

After

Width:  |  Height:  |  Size: 761 B

View File

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

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

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

After

Width:  |  Height:  |  Size: 540 B

View File

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

After

Width:  |  Height:  |  Size: 373 B

View File

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

After

Width:  |  Height:  |  Size: 673 B

View File

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

After

Width:  |  Height:  |  Size: 899 B

View File

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

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

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

After

Width:  |  Height:  |  Size: 462 B

View File

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

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

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

After

Width:  |  Height:  |  Size: 753 B

View File

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

After

Width:  |  Height:  |  Size: 740 B