Dataset profile editor. Ignore invalid data(if any) in previews. Fix Fieldset card changes height after the updated preview component is rendered . Update error messages.Now they use chapter-section namespace.

This commit is contained in:
Kristian Ntavidi 2021-03-30 17:47:35 +03:00
parent 67223bc2f0
commit cc8c771ae5
13 changed files with 228 additions and 166 deletions

View File

@ -55,5 +55,10 @@ export const GENERAL_ANIMATIONS = [
}), }),
animate('800ms ease', style({transform:'scale(1)', opacity:1})) animate('800ms ease', style({transform:'scale(1)', opacity:1}))
]) ])
]),
trigger('fadeElement',[
state('updated',style({opacity:0})),
transition("*=>updated",
animate('2s 40ms ease-out'))
]) ])
] ]

View File

@ -184,14 +184,22 @@
<!-- PREVIEW --> <!-- PREVIEW -->
<div class="col-12" > <div class="col-12" >
<div class="mb-1" *ngIf="hasFocus"> <div class="mb-1" *ngIf="hasFocus" class="d-flex" style="justify-content: space-between;">
<span style="font-weight: bold;">{{'DATASET-PROFILE-EDITOR.ACTIONS.FIELD.PREVIEW' | translate}}</span> <span style="font-weight: bold;">{{'DATASET-PROFILE-EDITOR.ACTIONS.FIELD.PREVIEW' | translate}}</span>
<span [@fadeElement]="updatedClass" *ngIf="firstField?.get('viewStyle').get('renderStyle').value">
<ng-container *ngIf="!previewDirty">
Preview updated!
</ng-container>
<ng-container *ngIf="previewDirty">
... caculating preview
</ng-container>
</span>
</div> </div>
<div [id]="'preview_container'+ form.get('id').value" class="w-100" style="margin-right: -15px; margin-left: -15px;" >
<div style="margin-right: -15px; margin-left: -15px;" *ngIf="previewForm && firstField?.get('viewStyle').get('renderStyle').value"> <div *ngIf="previewForm && showPreview && firstField?.get('viewStyle').get('renderStyle').value">
<app-form-section-inner [form]="previewForm"> <app-form-section-inner [form]="previewForm">
</app-form-section-inner>
</app-form-section-inner> </div>
</div> </div>
<div class="w-100" *ngIf="!firstField?.get('viewStyle').get('renderStyle').value"> <div class="w-100" *ngIf="!firstField?.get('viewStyle').get('renderStyle').value">

View File

@ -42,11 +42,13 @@ import {Field as FieldDefinition} from '@app/core/model/dataset-profile-definiti
import { Subject } from 'rxjs'; import { Subject } from 'rxjs';
import { debounce, debounceTime } from 'rxjs/operators'; import { debounce, debounceTime } from 'rxjs/operators';
import { setUncaughtExceptionCaptureCallback } from 'process'; import { setUncaughtExceptionCaptureCallback } from 'process';
import { GENERAL_ANIMATIONS } from '../../animations/animations';
@Component({ @Component({
selector: 'app-dataset-profile-editor-composite-field-component', selector: 'app-dataset-profile-editor-composite-field-component',
templateUrl: './dataset-profile-editor-composite-field.component.html', templateUrl: './dataset-profile-editor-composite-field.component.html',
styleUrls: ['./dataset-profile-editor-composite-field.component.scss'] styleUrls: ['./dataset-profile-editor-composite-field.component.scss'],
animations:[GENERAL_ANIMATIONS]
}) })
export class DatasetProfileEditorCompositeFieldComponent implements OnInit, OnChanges { export class DatasetProfileEditorCompositeFieldComponent implements OnInit, OnChanges {
@ -57,6 +59,8 @@ export class DatasetProfileEditorCompositeFieldComponent implements OnInit, OnCh
@Input() numbering: string; @Input() numbering: string;
@Input() hasFocus: boolean = false; @Input() hasFocus: boolean = false;
showPreview: boolean = true;
previewDirty: boolean = false;
showDescription: boolean = true; showDescription: boolean = true;
@ -128,12 +132,14 @@ export class DatasetProfileEditorCompositeFieldComponent implements OnInit, OnCh
this.showAdditionalInfo = !!this.form.get('additionalInformation').value; this.showAdditionalInfo = !!this.form.get('additionalInformation').value;
this.form.valueChanges.subscribe(changes=>{ this.form.valueChanges.subscribe(changes=>{
this.previewForm = null; // this.previewForm = null;
this.previewDirty = true;
this.generatePreviewForm(); this.generatePreviewForm();
}); });
this.previewSubject$.pipe(debounceTime(600)).subscribe(model=>{ this.previewSubject$.pipe(debounceTime(600)).subscribe(model=>{
this.previewForm = model.buildForm(); const updatedForm = model.buildForm();
this.reloadPreview(updatedForm)
}) })
@ -141,6 +147,47 @@ export class DatasetProfileEditorCompositeFieldComponent implements OnInit, OnCh
} }
get updatedClass(){
if(this.previewDirty) return '';
else return 'updated';
}
private reloadPreview(updatedForm: FormGroup){
setTimeout(() => {
const previewContainer = document.getElementById('preview_container'+ this.form.get('id').value);
// let clientHeight = -1;
if(previewContainer){
// console.log(previewContainer);
const clientHeight = previewContainer.clientHeight;
// console.log(clientHeight);
if(clientHeight){
previewContainer.style.height = clientHeight.toString() + 'px';
// console.log('height:' ,previewContainer.style.height);
}
}
this.showPreview = false;
this.previewDirty = true;
this.previewForm = updatedForm;
setTimeout(() => {
this.showPreview = true;
this.previewDirty = false;
if(previewContainer){
setTimeout(() => {
if(previewContainer){
previewContainer.style.height = 'auto';
}
});
}
});
});
}
previewSubject$: Subject<DatasetDescriptionSectionEditorModel> = new Subject<DatasetDescriptionSectionEditorModel>(); previewSubject$: Subject<DatasetDescriptionSectionEditorModel> = new Subject<DatasetDescriptionSectionEditorModel>();
private generatePreviewForm(){ private generatePreviewForm(){
@ -187,7 +234,7 @@ export class DatasetProfileEditorCompositeFieldComponent implements OnInit, OnCh
multiplicityItems: null, multiplicityItems: null,
viewStyle: editorField.viewStyle, viewStyle: editorField.viewStyle,
defaultValue:editorField.defaultValue, defaultValue:editorField.defaultValue,
value: editorField.defaultValue.value, value: null,
validations: editorField.validations, validations: editorField.validations,
} as FieldDefinition; } as FieldDefinition;

View File

@ -125,20 +125,20 @@ export class FormFieldComponent extends BaseComponent implements OnInit {
this.singleAutoCompleteConfiguration = { this.singleAutoCompleteConfiguration = {
filterFn: this.searchFromAutocomplete.bind(this), filterFn: this.searchFromAutocomplete.bind(this),
initialItems: () => this.searchFromAutocomplete(''), initialItems: () => this.searchFromAutocomplete(''),
displayFn: (item) => (item != null && item.length > 1) ? JSON.parse(item).label : item['label'], displayFn: (item) => {try{return (item != null && item.length > 1) ? JSON.parse(item).label : item['label']}catch{return ''}},
titleFn: (item) => item['label'], titleFn: (item) => {try{return item['label'] }catch{return''}},
valueAssign: (item) => JSON.stringify(item), valueAssign: (item) => {try{return JSON.stringify(item)}catch{return''}},
subtitleFn: (item) => item['source'] ? this.language.instant('DATASET-WIZARD.EDITOR.FIELDS.EXTERNAL-AUTOCOMPLETE-SUBTITLE') + item['source'] : this.language.instant('DATASET-WIZARD.EDITOR.FIELDS.EXTERNAL-AUTOCOMPLETE-NO-SOURCE') subtitleFn: (item) => {try{return item['source'] ? this.language.instant('DATASET-WIZARD.EDITOR.FIELDS.EXTERNAL-AUTOCOMPLETE-SUBTITLE') + item['source'] : this.language.instant('DATASET-WIZARD.EDITOR.FIELDS.EXTERNAL-AUTOCOMPLETE-NO-SOURCE')}catch{return''}}
}; };
} }
else { else {
this.multipleAutoCompleteConfiguration = { this.multipleAutoCompleteConfiguration = {
filterFn: this.searchFromAutocomplete.bind(this), filterFn: this.searchFromAutocomplete.bind(this),
initialItems: () => this.searchFromAutocomplete(''), initialItems: () => this.searchFromAutocomplete(''),
displayFn: (item) => typeof (item) == 'string' ? JSON.parse(item)['label'] : item['label'], displayFn: (item) =>{try{return typeof (item) == 'string' ? JSON.parse(item)['label'] : item['label']}catch{return''}},
titleFn: (item) => typeof (item) == 'string' ? JSON.parse(item)['label'] : item['label'], titleFn: (item) =>{ try{return typeof (item) == 'string' ? JSON.parse(item)['label'] : item['label']}catch{return''}},
valueAssign: (item) => typeof (item) == 'string' ? item : JSON.stringify(item), valueAssign: (item) =>{ try{return typeof (item) == 'string' ? item : JSON.stringify(item)}catch{return''}},
subtitleFn: (item) => item['source'] ? this.language.instant('DATASET-WIZARD.EDITOR.FIELDS.EXTERNAL-AUTOCOMPLETE-SUBTITLE') + item['source'] : this.language.instant('DATASET-WIZARD.EDITOR.FIELDS.EXTERNAL-AUTOCOMPLETE-NO-SOURCE') subtitleFn: (item) => { try{return item['source'] ? this.language.instant('DATASET-WIZARD.EDITOR.FIELDS.EXTERNAL-AUTOCOMPLETE-SUBTITLE') + item['source'] : this.language.instant('DATASET-WIZARD.EDITOR.FIELDS.EXTERNAL-AUTOCOMPLETE-NO-SOURCE')}catch{return''}}
} }
} }
} }
@ -148,49 +148,49 @@ export class FormFieldComponent extends BaseComponent implements OnInit {
this.externalDatasetAutoCompleteConfiguration = { this.externalDatasetAutoCompleteConfiguration = {
filterFn: this.searchDatasetExternalDatasets.bind(this), filterFn: this.searchDatasetExternalDatasets.bind(this),
initialItems: () => this.searchDatasetExternalDatasets(''),//.filter(resultItem => (excludedItems || []).map(x => x.id).indexOf(resultItem.id) === -1), initialItems: () => this.searchDatasetExternalDatasets(''),//.filter(resultItem => (excludedItems || []).map(x => x.id).indexOf(resultItem.id) === -1),
displayFn: (item) => typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name, displayFn: (item) => { try{return typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name}catch{return''}},
titleFn: (item) => typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name, titleFn: (item) => { try{return typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name}catch{return''}},
subtitleFn: (item) => item.source ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item.source : item.tag ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item.tag : this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.NO-SOURCE'), subtitleFn: (item) => { try{return item.source ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item.source : item.tag ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item.tag : this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.NO-SOURCE')}catch{return''}},
valueAssign: (item) => typeof (item) == 'string' ? item : JSON.stringify(item) valueAssign: (item) => { try{return typeof (item) == 'string' ? item : JSON.stringify(item)}catch{return''}}
}; };
break; break;
case DatasetProfileFieldViewStyle.DataRepositories: case DatasetProfileFieldViewStyle.DataRepositories:
this.dataRepositoriesAutoCompleteConfiguration = { this.dataRepositoriesAutoCompleteConfiguration = {
filterFn: this.searchDatasetExternalDataRepositories.bind(this), filterFn: this.searchDatasetExternalDataRepositories.bind(this),
initialItems: () => this.searchDatasetExternalDataRepositories(''), initialItems: () => this.searchDatasetExternalDataRepositories(''),
displayFn: (item) => typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name, displayFn: (item) => { try{return typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name}catch{return''}},
titleFn: (item) => typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name, titleFn: (item) => { try{return typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name}catch{return''}},
subtitleFn: (item) => item.source ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item.source : item.tag ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item.tag : this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.NO-SOURCE'), subtitleFn: (item) => { try{return item.source ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item.source : item.tag ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item.tag : this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.NO-SOURCE')}catch{return''}},
valueAssign: (item) => typeof (item) == 'string' ? item : JSON.stringify(item) valueAssign: (item) => { try{return typeof (item) == 'string' ? item : JSON.stringify(item)}catch{return''}}
}; };
break; break;
case DatasetProfileFieldViewStyle.Registries: case DatasetProfileFieldViewStyle.Registries:
this.registriesAutoCompleteConfiguration = { this.registriesAutoCompleteConfiguration = {
filterFn: this.searchDatasetExternalRegistries.bind(this), filterFn: this.searchDatasetExternalRegistries.bind(this),
initialItems: () => this.searchDatasetExternalRegistries(''), initialItems: () => this.searchDatasetExternalRegistries(''),
displayFn: (item) => typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name, displayFn: (item) => { try{return typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name}catch{return''}},
titleFn: (item) => typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name, titleFn: (item) => { try{return typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name}catch{return''}},
subtitleFn: (item) => item.source ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item.source : this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.NO-SOURCE'), subtitleFn: (item) => { try{return item.source ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item.source : this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.NO-SOURCE')}catch{return''}},
valueAssign: (item) => typeof (item) == 'string' ? item : JSON.stringify(item) valueAssign: (item) => { try{return typeof (item) == 'string' ? item : JSON.stringify(item)}catch{return''}}
}; };
break; break;
case DatasetProfileFieldViewStyle.Services: case DatasetProfileFieldViewStyle.Services:
this.servicesAutoCompleteConfiguration = { this.servicesAutoCompleteConfiguration = {
filterFn: this.searchDatasetExternalServices.bind(this), filterFn: this.searchDatasetExternalServices.bind(this),
initialItems: () => this.searchDatasetExternalServices(''), initialItems: () => this.searchDatasetExternalServices(''),
displayFn: (item) => typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name, displayFn: (item) => { try{return typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name}catch{return ''}},
titleFn: (item) => typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name, titleFn: (item) => { try{return typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name}catch{return''}},
subtitleFn: (item) => item.source ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item.source : item.tag ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item.tag : this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.NO-SOURCE'), subtitleFn: (item) => { try{return item.source ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item.source : item.tag ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item.tag : this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.NO-SOURCE')}catch{return''}},
valueAssign: (item) => typeof (item) == 'string' ? item : JSON.stringify(item) valueAssign: (item) => { try{return typeof (item) == 'string' ? item : JSON.stringify(item)}catch{return''}}
}; };
break; break;
case DatasetProfileFieldViewStyle.Tags: case DatasetProfileFieldViewStyle.Tags:
this.tagsAutoCompleteConfiguration = { this.tagsAutoCompleteConfiguration = {
filterFn: this.filterTags.bind(this), filterFn: this.filterTags.bind(this),
initialItems: (excludedItems: any[]) => this.filterTags('').pipe(map(result => result.filter(resultItem => (excludedItems || []).map(x => x.id).indexOf(resultItem.id) === -1))), initialItems: (excludedItems: any[]) => this.filterTags('').pipe(map(result => result.filter(resultItem => (excludedItems || []).map(x => x.id).indexOf(resultItem.id) === -1))),
displayFn: (item) => this.showTag(item), displayFn: (item) => { try{return this.showTag(item)}catch{return''}},
titleFn: (item) => item['name'], titleFn: (item) => { try{return item['name']}catch{return''}},
valueAssign: (item) => this.addTag(item) valueAssign: (item) => { try{return this.addTag(item)}catch{return''}}
}; };
this.parseTags(); this.parseTags();
break; break;
@ -198,20 +198,20 @@ export class FormFieldComponent extends BaseComponent implements OnInit {
this.researchersAutoCompleteConfiguration = { this.researchersAutoCompleteConfiguration = {
filterFn: this.filterResearchers.bind(this), filterFn: this.filterResearchers.bind(this),
initialItems: (excludedItems: any[]) => this.filterResearchers('').pipe(map(result => result.filter(resultItem => (excludedItems || []).map(x => x.id).indexOf(resultItem.id) === -1))), initialItems: (excludedItems: any[]) => this.filterResearchers('').pipe(map(result => result.filter(resultItem => (excludedItems || []).map(x => x.id).indexOf(resultItem.id) === -1))),
displayFn: (item) => typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name, displayFn: (item) => { try{return typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name}catch{return''}},
titleFn: (item) => typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name, titleFn: (item) =>{ try{return typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name}catch{return''}},
subtitleFn: (item) => item['tag'] ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item['tag'] : (item['key'] ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item['key'] : this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.NO-SOURCE')), subtitleFn: (item) => { try{return item['tag'] ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item['tag'] : (item['key'] ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item['key'] : this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.NO-SOURCE'))}catch{return''}},
valueAssign: (item) => typeof (item) == 'string' ? item : JSON.stringify(item) valueAssign: (item) => { try{return typeof (item) == 'string' ? item : JSON.stringify(item)}catch{return''}}
}; };
break; break;
case DatasetProfileFieldViewStyle.Organizations: case DatasetProfileFieldViewStyle.Organizations:
this.organisationsAutoCompleteConfiguration = { this.organisationsAutoCompleteConfiguration = {
filterFn: this.filterOrganisations.bind(this), filterFn: this.filterOrganisations.bind(this),
initialItems: (excludedItems: any[]) => this.filterOrganisations('').pipe(map(result => result.filter(resultItem => (excludedItems || []).map(x => x.id).indexOf(resultItem.id) === -1))), initialItems: (excludedItems: any[]) => this.filterOrganisations('').pipe(map(result => result.filter(resultItem => (excludedItems || []).map(x => x.id).indexOf(resultItem.id) === -1))),
displayFn: (item) => typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name, displayFn:(item) => { try{return typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name}catch{return''}},
titleFn: (item) => typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name, titleFn: (item) =>{ try{return typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name}catch{return''}},
subtitleFn: (item) => item['tag'] ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item['tag'] : (item['key'] ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item['key'] : this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.NO-SOURCE')), subtitleFn: (item) =>{ try{return item['tag'] ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item['tag'] : (item['key'] ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item['key'] : this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.NO-SOURCE'))}catch{return''}},
valueAssign: (item) => typeof (item) == 'string' ? item : JSON.stringify(item) valueAssign: (item) =>{ try{return typeof (item) == 'string' ? item : JSON.stringify(item)}catch{return''}}
}; };
break; break;
case DatasetProfileFieldViewStyle.DatasetIdentifier: case DatasetProfileFieldViewStyle.DatasetIdentifier:
@ -224,9 +224,9 @@ export class FormFieldComponent extends BaseComponent implements OnInit {
this.currencyAutoCompleteConfiguration = { this.currencyAutoCompleteConfiguration = {
filterFn: this.searchCurrency.bind(this), filterFn: this.searchCurrency.bind(this),
initialItems: () => this.searchCurrency(''), initialItems: () => this.searchCurrency(''),
displayFn: (item) => typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name, displayFn: (item) => { try{return typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name}catch{return''}},
titleFn: (item) => typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name, titleFn: (item) => { try{return typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name}catch{return''}},
valueAssign: (item) => typeof (item) == 'string' ? item : JSON.stringify(item) valueAssign: (item) => { try{return typeof (item) == 'string' ? item : JSON.stringify(item)}catch{return''}}
}; };
break; break;
case DatasetProfileFieldViewStyle.Validation: case DatasetProfileFieldViewStyle.Validation:
@ -325,20 +325,20 @@ export class FormFieldComponent extends BaseComponent implements OnInit {
this.singleAutoCompleteConfiguration = { this.singleAutoCompleteConfiguration = {
filterFn: myfunc.bind(this), filterFn: myfunc.bind(this),
initialItems: (extraData) => myfunc(''), initialItems: (extraData) => myfunc(''),
displayFn: (item) => (item != null && item.length > 1) ? JSON.parse(item)[title] : item[title], displayFn: (item) => { try{return (item != null && item.length > 1) ? JSON.parse(item)[title] : item[title]}catch{return''}},
titleFn: (item) => item[title], titleFn: (item) => { try{return item[title]}catch{return''}},
valueAssign: (item) => JSON.stringify(item), valueAssign: (item) => JSON.stringify(item),
subtitleFn: (item) => item[subtitle] subtitleFn: (item) => { try{return item[subtitle]}catch{return''}}
}; };
} }
else { else {
this.multipleAutoCompleteConfiguration = { this.multipleAutoCompleteConfiguration = {
filterFn: myfunc.bind(this), filterFn: myfunc.bind(this),
initialItems: (extraData) => myfunc(''), initialItems: (extraData) => myfunc(''),
displayFn: (item) => typeof (item) == 'string' ? JSON.parse(item)['label'] : item['label'], displayFn: (item) => { try{return typeof (item) == 'string' ? JSON.parse(item)['label'] : item['label']}catch{return''}},
titleFn: (item) => typeof (item) == 'string' ? JSON.parse(item)['label'] : item['label'], titleFn: (item) => { try{return typeof (item) == 'string' ? JSON.parse(item)['label'] : item['label']}catch{return''}},
valueAssign: (item) => typeof (item) == 'string' ? item : JSON.stringify(item), valueAssign: (item) => { try{return typeof (item) == 'string' ? item : JSON.stringify(item)}catch{return''}},
subtitleFn: (item) => item[subtitle] subtitleFn: (item) => { try{return item[subtitle]}catch{return''}}
} }
} }
} }

View File

@ -1,37 +1,39 @@
<div *ngFor="let compositeFieldFormGroup of form.get('compositeFields')['controls']; let i = index;" class="col-12"> <ng-container *ngIf="form">
<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="row" *ngIf="this.visibilityRulesService.checkElementVisibility(compositeFieldFormGroup.get('id').value) && this.visibilityRulesService.scanIfChildsOfCompositeFieldHasVisibleItems(compositeFieldFormGroup)">
<div class="col-12"> <div class="col-12">
<div class="row"> <div class="row">
<app-form-composite-field class="align-self-center col" [form]="compositeFieldFormGroup" [datasetProfileId]="datasetProfileId" <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> [isChild]="false" [showDelete]="(compositeFieldFormGroup.get('multiplicityItems').length) > 0"></app-form-composite-field>
</div>
</div> </div>
</div>
<div *ngIf="compositeFieldFormGroup" class="col-12"> <div *ngIf="compositeFieldFormGroup" class="col-12">
<div class="row"> <div class="row">
<div class="col-12" *ngFor="let multipleCompositeFieldFormGroup of compositeFieldFormGroup.get('multiplicityItems')['controls']; let j = index"> <div class="col-12" *ngFor="let multipleCompositeFieldFormGroup of compositeFieldFormGroup.get('multiplicityItems')['controls']; let j = index">
<div class="row"> <div class="row">
<app-form-composite-field class=" align-self-center col" [form]="multipleCompositeFieldFormGroup" [datasetProfileId]="datasetProfileId" <app-form-composite-field class=" align-self-center col" [form]="multipleCompositeFieldFormGroup" [datasetProfileId]="datasetProfileId"
[isChild]="true" [showDelete]="true"></app-form-composite-field> [isChild]="true" [showDelete]="true"></app-form-composite-field>
</div>
</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 *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>
</div> </div>
</div> </ng-container>

View File

@ -466,25 +466,25 @@
"VALUE": "Required Value", "VALUE": "Required Value",
"RULE-IF": "If Value is", "RULE-IF": "If Value is",
"RULE-THEN": "then show Field With Id", "RULE-THEN": "then show Field With Id",
"FIELDSETS": "Input sets", "FIELDSETS": "Questions",
"FIELDS":"Inputs" "FIELDS":"Inputs"
} }
}, },
"FORM-VALIDATION":{ "FORM-VALIDATION":{
"ERROR-MESSAGES":{ "ERROR-MESSAGES":{
"PAGE-MUST-HAVE-SECTION": "Each section must have at least one subsection.", "PAGE-MUST-HAVE-SECTION": "Each chapter must have at least one section.",
"NEEDS-MORE-INFORMATION": " needs more information.", "NEEDS-MORE-INFORMATION": " needs more information.",
"MUST-HAVE-SECTION-OR-FIELDSET": " must have either subsection or input set.", "MUST-HAVE-SECTION-OR-FIELDSET": " must have either section or question.",
"MISSING":"Missing", "MISSING":"Missing",
"PROVIDE-PAGE-AND-SECTION":"Make sure you provide a section and a subsection" "PROVIDE-PAGE-AND-SECTION":"Make sure you provide a chapter and at least one section per chapter."
} }
}, },
"TABLE-OF-CONTENTS":{ "TABLE-OF-CONTENTS":{
"ERROR-MESSAGES":{ "ERROR-MESSAGES":{
"FIELDSET-MUST-HAVE-PARENT-SECTION":"Input set can only be child of subsection.", "FIELDSET-MUST-HAVE-PARENT-SECTION":"Question can only be child of section.",
"INPUT-SECTION-SAME-LEVEL": "Cannot have input set and section on the same level.", "INPUT-SECTION-SAME-LEVEL": "Cannot have question and section on the same level.",
"DRAG-NOT-SUPPORTED":"Drag n drop of subsection not supported to target container.", "DRAG-NOT-SUPPORTED":"Drag n drop of section not supported to target container.",
"PAGE-ELEMENT-ONLY-TOP-LEVEL": "Section elements can only be at top level" "PAGE-ELEMENT-ONLY-TOP-LEVEL": "Chapter elements can only be at top level"
} }
} }
}, },
@ -515,8 +515,8 @@
"FIELDSET": { "FIELDSET": {
"ADD-INPUT": "Add new input", "ADD-INPUT": "Add new input",
"COMMENT-FIELD": "Comment field", "COMMENT-FIELD": "Comment field",
"INCLUDE-COMMENT-FIELD": "Include comment field", "INCLUDE-COMMENT-FIELD": "A comment field input is appended to the givven question.",
"ENABLE-MULTIPLICITY": "Enable multiplicity", "ENABLE-MULTIPLICITY": "User may provide more than one answer to the givven question.",
"MULTIPLICITY": "Multiplicity", "MULTIPLICITY": "Multiplicity",
"MORE": "More.." "MORE": "More.."
} }

View File

@ -466,25 +466,25 @@
"VALUE": "Required Value", "VALUE": "Required Value",
"RULE-IF": "If Value is", "RULE-IF": "If Value is",
"RULE-THEN": "then show Field With Id", "RULE-THEN": "then show Field With Id",
"FIELDSETS": "Input sets", "FIELDSETS": "Questions",
"FIELDS":"Inputs" "FIELDS":"Inputs"
} }
}, },
"FORM-VALIDATION":{ "FORM-VALIDATION":{
"ERROR-MESSAGES":{ "ERROR-MESSAGES":{
"PAGE-MUST-HAVE-SECTION": "Each section must have at least one subsection.", "PAGE-MUST-HAVE-SECTION": "Each chapter must have at least one section.",
"NEEDS-MORE-INFORMATION": " needs more information.", "NEEDS-MORE-INFORMATION": " needs more information.",
"MUST-HAVE-SECTION-OR-FIELDSET": " must have either subsection or input set.", "MUST-HAVE-SECTION-OR-FIELDSET": " must have either section or question.",
"MISSING":"Missing", "MISSING":"Missing",
"PROVIDE-PAGE-AND-SECTION":"Make sure you provide a section and a subsection" "PROVIDE-PAGE-AND-SECTION":"Make sure you provide a chapter and at least one section per chapter."
} }
}, },
"TABLE-OF-CONTENTS":{ "TABLE-OF-CONTENTS":{
"ERROR-MESSAGES":{ "ERROR-MESSAGES":{
"FIELDSET-MUST-HAVE-PARENT-SECTION":"Input set can only be child of subsection.", "FIELDSET-MUST-HAVE-PARENT-SECTION":"Question can only be child of section.",
"INPUT-SECTION-SAME-LEVEL": "Cannot have input set and section on the same level.", "INPUT-SECTION-SAME-LEVEL": "Cannot have question and section on the same level.",
"DRAG-NOT-SUPPORTED":"Drag n drop of subsection not supported to target container.", "DRAG-NOT-SUPPORTED":"Drag n drop of section not supported to target container.",
"PAGE-ELEMENT-ONLY-TOP-LEVEL": "Section elements can only be at top level" "PAGE-ELEMENT-ONLY-TOP-LEVEL": "Chapter elements can only be at top level"
} }
} }
}, },
@ -515,8 +515,8 @@
"FIELDSET": { "FIELDSET": {
"ADD-INPUT": "Add new input", "ADD-INPUT": "Add new input",
"COMMENT-FIELD": "Comment field", "COMMENT-FIELD": "Comment field",
"INCLUDE-COMMENT-FIELD": "Include comment field", "INCLUDE-COMMENT-FIELD": "A comment field input is appended to the givven question.",
"ENABLE-MULTIPLICITY": "Enable multiplicity", "ENABLE-MULTIPLICITY": "User may provide more than one answer to the givven question.",
"MULTIPLICITY": "Multiplicity", "MULTIPLICITY": "Multiplicity",
"MORE": "More.." "MORE": "More.."
} }

View File

@ -466,25 +466,25 @@
"VALUE": "Valor requerido", "VALUE": "Valor requerido",
"RULE-IF": "Si el valor es", "RULE-IF": "Si el valor es",
"RULE-THEN": "entonces muestra el campo con identificación", "RULE-THEN": "entonces muestra el campo con identificación",
"FIELDSETS": "Input sets", "FIELDSETS": "Questions",
"FIELDS":"Inputs" "FIELDS":"Inputs"
} }
}, },
"FORM-VALIDATION":{ "FORM-VALIDATION":{
"ERROR-MESSAGES":{ "ERROR-MESSAGES":{
"PAGE-MUST-HAVE-SECTION": "Each section must have at least one subsection.", "PAGE-MUST-HAVE-SECTION": "Each chapter must have at least one section.",
"NEEDS-MORE-INFORMATION": " needs more information.", "NEEDS-MORE-INFORMATION": " needs more information.",
"MUST-HAVE-SECTION-OR-FIELDSET": " must have either subsection or input set.", "MUST-HAVE-SECTION-OR-FIELDSET": " must have either section or question.",
"MISSING":"Missing", "MISSING":"Missing",
"PROVIDE-PAGE-AND-SECTION":"Make sure you provide a section and a subsection" "PROVIDE-PAGE-AND-SECTION":"Make sure you provide a chapter and at least one section per chapter."
} }
}, },
"TABLE-OF-CONTENTS":{ "TABLE-OF-CONTENTS":{
"ERROR-MESSAGES":{ "ERROR-MESSAGES":{
"FIELDSET-MUST-HAVE-PARENT-SECTION":"Input set can only be child of subsection.", "FIELDSET-MUST-HAVE-PARENT-SECTION":"Question can only be child of section.",
"INPUT-SECTION-SAME-LEVEL": "Cannot have input set and section on the same level.", "INPUT-SECTION-SAME-LEVEL": "Cannot have question and section on the same level.",
"DRAG-NOT-SUPPORTED":"Drag n drop of subsection not supported to target container.", "DRAG-NOT-SUPPORTED":"Drag n drop of section not supported to target container.",
"PAGE-ELEMENT-ONLY-TOP-LEVEL": "Section elements can only be at top level" "PAGE-ELEMENT-ONLY-TOP-LEVEL": "Chapter elements can only be at top level"
} }
} }
}, },
@ -515,8 +515,8 @@
"FIELDSET": { "FIELDSET": {
"ADD-INPUT": "Add new input", "ADD-INPUT": "Add new input",
"COMMENT-FIELD": "Comment field", "COMMENT-FIELD": "Comment field",
"INCLUDE-COMMENT-FIELD": "Include comment field", "INCLUDE-COMMENT-FIELD": "A comment field input is appended to the givven question.",
"ENABLE-MULTIPLICITY": "Enable multiplicity", "ENABLE-MULTIPLICITY": "User may provide more than one answer to the givven question.",
"MULTIPLICITY": "Multiplicity", "MULTIPLICITY": "Multiplicity",
"MORE": "More.." "MORE": "More.."
} }

View File

@ -466,25 +466,25 @@
"VALUE": "Απαιτούμενη τιμή", "VALUE": "Απαιτούμενη τιμή",
"RULE-IF": "Εάν η τιμή είναι", "RULE-IF": "Εάν η τιμή είναι",
"RULE-THEN": "τότε δείξε το Πεδίο με ταυτοποίηση", "RULE-THEN": "τότε δείξε το Πεδίο με ταυτοποίηση",
"FIELDSETS": "Input sets", "FIELDSETS": "Questions",
"FIELDS":"Inputs" "FIELDS":"Inputs"
} }
}, },
"FORM-VALIDATION":{ "FORM-VALIDATION":{
"ERROR-MESSAGES":{ "ERROR-MESSAGES":{
"PAGE-MUST-HAVE-SECTION": "Each section must have at least one subsection.", "PAGE-MUST-HAVE-SECTION": "Each chapter must have at least one section.",
"NEEDS-MORE-INFORMATION": " needs more information.", "NEEDS-MORE-INFORMATION": " needs more information.",
"MUST-HAVE-SECTION-OR-FIELDSET": " must have either subsection or input set.", "MUST-HAVE-SECTION-OR-FIELDSET": " must have either section or question.",
"MISSING":"Missing", "MISSING":"Missing",
"PROVIDE-PAGE-AND-SECTION":"Make sure you provide a section and a subsection" "PROVIDE-PAGE-AND-SECTION":"Make sure you provide a chapter and at least one section per chapter."
} }
}, },
"TABLE-OF-CONTENTS":{ "TABLE-OF-CONTENTS":{
"ERROR-MESSAGES":{ "ERROR-MESSAGES":{
"FIELDSET-MUST-HAVE-PARENT-SECTION":"Input set can only be child of subsection.", "FIELDSET-MUST-HAVE-PARENT-SECTION":"Question can only be child of section.",
"INPUT-SECTION-SAME-LEVEL": "Cannot have input set and section on the same level.", "INPUT-SECTION-SAME-LEVEL": "Cannot have question and section on the same level.",
"DRAG-NOT-SUPPORTED":"Drag n drop of subsection not supported to target container.", "DRAG-NOT-SUPPORTED":"Drag n drop of section not supported to target container.",
"PAGE-ELEMENT-ONLY-TOP-LEVEL": "Section elements can only be at top level" "PAGE-ELEMENT-ONLY-TOP-LEVEL": "Chapter elements can only be at top level"
} }
} }
}, },
@ -515,8 +515,8 @@
"FIELDSET": { "FIELDSET": {
"ADD-INPUT": "Add new input", "ADD-INPUT": "Add new input",
"COMMENT-FIELD": "Comment field", "COMMENT-FIELD": "Comment field",
"INCLUDE-COMMENT-FIELD": "Include comment field", "INCLUDE-COMMENT-FIELD": "A comment field input is appended to the givven question.",
"ENABLE-MULTIPLICITY": "Enable multiplicity", "ENABLE-MULTIPLICITY": "User may provide more than one answer to the givven question.",
"MULTIPLICITY": "Multiplicity", "MULTIPLICITY": "Multiplicity",
"MORE": "More.." "MORE": "More.."
} }

View File

@ -466,25 +466,25 @@
"VALUE": "Valor Obrigatório", "VALUE": "Valor Obrigatório",
"RULE-IF": "Se Valor é", "RULE-IF": "Se Valor é",
"RULE-THEN": "então mostrar Campo com o Id", "RULE-THEN": "então mostrar Campo com o Id",
"FIELDSETS": "Input sets", "FIELDSETS": "Questions",
"FIELDS":"Inputs" "FIELDS":"Inputs"
} }
}, },
"FORM-VALIDATION":{ "FORM-VALIDATION":{
"ERROR-MESSAGES":{ "ERROR-MESSAGES":{
"PAGE-MUST-HAVE-SECTION": "Each section must have at least one subsection.", "PAGE-MUST-HAVE-SECTION": "Each chapter must have at least one section.",
"NEEDS-MORE-INFORMATION": " needs more information.", "NEEDS-MORE-INFORMATION": " needs more information.",
"MUST-HAVE-SECTION-OR-FIELDSET": " must have either subsection or input set.", "MUST-HAVE-SECTION-OR-FIELDSET": " must have either section or question.",
"MISSING":"Missing", "MISSING":"Missing",
"PROVIDE-PAGE-AND-SECTION":"Make sure you provide a section and a subsection" "PROVIDE-PAGE-AND-SECTION":"Make sure you provide a chapter and at least one section per chapter."
} }
}, },
"TABLE-OF-CONTENTS":{ "TABLE-OF-CONTENTS":{
"ERROR-MESSAGES":{ "ERROR-MESSAGES":{
"FIELDSET-MUST-HAVE-PARENT-SECTION":"Input set can only be child of subsection.", "FIELDSET-MUST-HAVE-PARENT-SECTION":"Question can only be child of section.",
"INPUT-SECTION-SAME-LEVEL": "Cannot have input set and section on the same level.", "INPUT-SECTION-SAME-LEVEL": "Cannot have question and section on the same level.",
"DRAG-NOT-SUPPORTED":"Drag n drop of subsection not supported to target container.", "DRAG-NOT-SUPPORTED":"Drag n drop of section not supported to target container.",
"PAGE-ELEMENT-ONLY-TOP-LEVEL": "Section elements can only be at top level" "PAGE-ELEMENT-ONLY-TOP-LEVEL": "Chapter elements can only be at top level"
} }
} }
}, },
@ -515,8 +515,8 @@
"FIELDSET": { "FIELDSET": {
"ADD-INPUT": "Add new input", "ADD-INPUT": "Add new input",
"COMMENT-FIELD": "Comment field", "COMMENT-FIELD": "Comment field",
"INCLUDE-COMMENT-FIELD": "Include comment field", "INCLUDE-COMMENT-FIELD": "A comment field input is appended to the givven question.",
"ENABLE-MULTIPLICITY": "Enable multiplicity", "ENABLE-MULTIPLICITY": "User may provide more than one answer to the givven question.",
"MULTIPLICITY": "Multiplicity", "MULTIPLICITY": "Multiplicity",
"MORE": "More.." "MORE": "More.."
} }

View File

@ -466,25 +466,25 @@
"VALUE": "Required Value", "VALUE": "Required Value",
"RULE-IF": "If Value is", "RULE-IF": "If Value is",
"RULE-THEN": "then show Field With Id", "RULE-THEN": "then show Field With Id",
"FIELDSETS": "Input sets", "FIELDSETS": "Questions",
"FIELDS":"Inputs" "FIELDS":"Inputs"
} }
}, },
"FORM-VALIDATION":{ "FORM-VALIDATION":{
"ERROR-MESSAGES":{ "ERROR-MESSAGES":{
"PAGE-MUST-HAVE-SECTION": "Each section must have at least one subsection.", "PAGE-MUST-HAVE-SECTION": "Each chapter must have at least one section.",
"NEEDS-MORE-INFORMATION": " needs more information.", "NEEDS-MORE-INFORMATION": " needs more information.",
"MUST-HAVE-SECTION-OR-FIELDSET": " must have either subsection or input set.", "MUST-HAVE-SECTION-OR-FIELDSET": " must have either section or question.",
"MISSING":"Missing", "MISSING":"Missing",
"PROVIDE-PAGE-AND-SECTION":"Make sure you provide a section and a subsection" "PROVIDE-PAGE-AND-SECTION":"Make sure you provide a chapter and at least one section per chapter."
} }
}, },
"TABLE-OF-CONTENTS":{ "TABLE-OF-CONTENTS":{
"ERROR-MESSAGES":{ "ERROR-MESSAGES":{
"FIELDSET-MUST-HAVE-PARENT-SECTION":"Input set can only be child of subsection.", "FIELDSET-MUST-HAVE-PARENT-SECTION":"Question can only be child of section.",
"INPUT-SECTION-SAME-LEVEL": "Cannot have input set and section on the same level.", "INPUT-SECTION-SAME-LEVEL": "Cannot have question and section on the same level.",
"DRAG-NOT-SUPPORTED":"Drag n drop of subsection not supported to target container.", "DRAG-NOT-SUPPORTED":"Drag n drop of section not supported to target container.",
"PAGE-ELEMENT-ONLY-TOP-LEVEL": "Section elements can only be at top level" "PAGE-ELEMENT-ONLY-TOP-LEVEL": "Chapter elements can only be at top level"
} }
} }
}, },
@ -515,8 +515,8 @@
"FIELDSET": { "FIELDSET": {
"ADD-INPUT": "Add new input", "ADD-INPUT": "Add new input",
"COMMENT-FIELD": "Comment field", "COMMENT-FIELD": "Comment field",
"INCLUDE-COMMENT-FIELD": "Include comment field", "INCLUDE-COMMENT-FIELD": "A comment field input is appended to the givven question.",
"ENABLE-MULTIPLICITY": "Enable multiplicity", "ENABLE-MULTIPLICITY": "User may provide more than one answer to the givven question.",
"MULTIPLICITY": "Multiplicity", "MULTIPLICITY": "Multiplicity",
"MORE": "More.." "MORE": "More.."
} }

View File

@ -466,25 +466,25 @@
"VALUE": "Obavezna vrednost", "VALUE": "Obavezna vrednost",
"RULE-IF": "Ako je vrednost", "RULE-IF": "Ako je vrednost",
"RULE-THEN": "tada prikazati polje sa Id", "RULE-THEN": "tada prikazati polje sa Id",
"FIELDSETS": "Input sets", "FIELDSETS": "Questions",
"FIELDS":"Inputs" "FIELDS":"Inputs"
} }
}, },
"FORM-VALIDATION":{ "FORM-VALIDATION":{
"ERROR-MESSAGES":{ "ERROR-MESSAGES":{
"PAGE-MUST-HAVE-SECTION": "Each section must have at least one subsection.", "PAGE-MUST-HAVE-SECTION": "Each chapter must have at least one section.",
"NEEDS-MORE-INFORMATION": " needs more information.", "NEEDS-MORE-INFORMATION": " needs more information.",
"MUST-HAVE-SECTION-OR-FIELDSET": " must have either subsection or input set.", "MUST-HAVE-SECTION-OR-FIELDSET": " must have either section or question.",
"MISSING":"Missing", "MISSING":"Missing",
"PROVIDE-PAGE-AND-SECTION":"Make sure you provide a section and a subsection" "PROVIDE-PAGE-AND-SECTION":"Make sure you provide a chapter and at least one section per chapter."
} }
}, },
"TABLE-OF-CONTENTS":{ "TABLE-OF-CONTENTS":{
"ERROR-MESSAGES":{ "ERROR-MESSAGES":{
"FIELDSET-MUST-HAVE-PARENT-SECTION":"Input set can only be child of subsection.", "FIELDSET-MUST-HAVE-PARENT-SECTION":"Question can only be child of section.",
"INPUT-SECTION-SAME-LEVEL": "Cannot have input set and section on the same level.", "INPUT-SECTION-SAME-LEVEL": "Cannot have question and section on the same level.",
"DRAG-NOT-SUPPORTED":"Drag n drop of subsection not supported to target container.", "DRAG-NOT-SUPPORTED":"Drag n drop of section not supported to target container.",
"PAGE-ELEMENT-ONLY-TOP-LEVEL": "Section elements can only be at top level" "PAGE-ELEMENT-ONLY-TOP-LEVEL": "Chapter elements can only be at top level"
} }
} }
}, },
@ -515,8 +515,8 @@
"FIELDSET": { "FIELDSET": {
"ADD-INPUT": "Add new input", "ADD-INPUT": "Add new input",
"COMMENT-FIELD": "Comment field", "COMMENT-FIELD": "Comment field",
"INCLUDE-COMMENT-FIELD": "Include comment field", "INCLUDE-COMMENT-FIELD": "A comment field input is appended to the givven question.",
"ENABLE-MULTIPLICITY": "Enable multiplicity", "ENABLE-MULTIPLICITY": "User may provide more than one answer to the givven question.",
"MULTIPLICITY": "Multiplicity", "MULTIPLICITY": "Multiplicity",
"MORE": "More.." "MORE": "More.."
} }

View File

@ -466,25 +466,25 @@
"VALUE": "Gerekli Değer", "VALUE": "Gerekli Değer",
"RULE-IF": "Eğer değer", "RULE-IF": "Eğer değer",
"RULE-THEN": "sonra alanı kimliği ile göster", "RULE-THEN": "sonra alanı kimliği ile göster",
"FIELDSETS": "Input sets", "FIELDSETS": "Questions",
"FIELDS":"Inputs" "FIELDS":"Inputs"
} }
}, },
"FORM-VALIDATION":{ "FORM-VALIDATION":{
"ERROR-MESSAGES":{ "ERROR-MESSAGES":{
"PAGE-MUST-HAVE-SECTION": "Each section must have at least one subsection.", "PAGE-MUST-HAVE-SECTION": "Each chapter must have at least one section.",
"NEEDS-MORE-INFORMATION": " needs more information.", "NEEDS-MORE-INFORMATION": " needs more information.",
"MUST-HAVE-SECTION-OR-FIELDSET": " must have either subsection or input set.", "MUST-HAVE-SECTION-OR-FIELDSET": " must have either section or question.",
"MISSING":"Missing", "MISSING":"Missing",
"PROVIDE-PAGE-AND-SECTION":"Make sure you provide a section and a subsection" "PROVIDE-PAGE-AND-SECTION":"Make sure you provide a chapter and at least one section per chapter."
} }
}, },
"TABLE-OF-CONTENTS":{ "TABLE-OF-CONTENTS":{
"ERROR-MESSAGES":{ "ERROR-MESSAGES":{
"FIELDSET-MUST-HAVE-PARENT-SECTION":"Input set can only be child of subsection.", "FIELDSET-MUST-HAVE-PARENT-SECTION":"Question can only be child of section.",
"INPUT-SECTION-SAME-LEVEL": "Cannot have input set and section on the same level.", "INPUT-SECTION-SAME-LEVEL": "Cannot have question and section on the same level.",
"DRAG-NOT-SUPPORTED":"Drag n drop of subsection not supported to target container.", "DRAG-NOT-SUPPORTED":"Drag n drop of section not supported to target container.",
"PAGE-ELEMENT-ONLY-TOP-LEVEL": "Section elements can only be at top level" "PAGE-ELEMENT-ONLY-TOP-LEVEL": "Chapter elements can only be at top level"
} }
} }
}, },
@ -515,8 +515,8 @@
"FIELDSET": { "FIELDSET": {
"ADD-INPUT": "Add new input", "ADD-INPUT": "Add new input",
"COMMENT-FIELD": "Comment field", "COMMENT-FIELD": "Comment field",
"INCLUDE-COMMENT-FIELD": "Include comment field", "INCLUDE-COMMENT-FIELD": "A comment field input is appended to the givven question.",
"ENABLE-MULTIPLICITY": "Enable multiplicity", "ENABLE-MULTIPLICITY": "User may provide more than one answer to the givven question.",
"MULTIPLICITY": "Multiplicity", "MULTIPLICITY": "Multiplicity",
"MORE": "More.." "MORE": "More.."
} }