fixed linting errors

This commit is contained in:
lotte
2019-12-23 09:27:57 +01:00
parent c002d8c640
commit 747606b40f
5 changed files with 58 additions and 69 deletions

View File

@@ -61,7 +61,6 @@ export class JsonPatchOperationsBuilder {
this.prepareValue(value, plain, false)));
}
move(path: JsonPatchOperationPathObject, prevPath: string) {
this.store.dispatch(
new NewPatchMoveOperationAction(

View File

@@ -267,8 +267,9 @@ describe('FormBuilderService test suite', () => {
new DynamicInputModel({ id: 'testFormRowArrayGroupInput' })
];
},
required: false
}
required: false,
metadataKey: 'dc.contributor.author'
},
),
];

View File

@@ -1,20 +1,16 @@
import { Inject, InjectionToken } from '@angular/core';
import { hasValue, isNotEmpty, isNotNull, isNotUndefined, isEmpty } from '../../../empty.util';
import { hasValue, isNotEmpty, isNotNull, isNotUndefined } from '../../../empty.util';
import { FormFieldModel } from '../models/form-field.model';
import { uniqueId } from 'lodash';
import { FormFieldMetadataValueObject } from '../models/form-field-metadata-value.model';
import {
DynamicRowArrayModel,
DynamicRowArrayModelConfig
} from '../ds-dynamic-form-ui/models/ds-dynamic-row-array-model';
import { DynamicRowArrayModel, DynamicRowArrayModelConfig } from '../ds-dynamic-form-ui/models/ds-dynamic-row-array-model';
import { DsDynamicInputModel, DsDynamicInputModelConfig } from '../ds-dynamic-form-ui/models/ds-dynamic-input.model';
import { DynamicFormControlLayout } from '@ng-dynamic-forms/core';
import { setLayout } from './parser.utils';
import { AuthorityOptions } from '../../../../core/integration/models/authority-options.model';
import { ParserOptions } from './parser-options';
import { RelationshipOptions } from '../models/relationship-options.model';
import { relationship } from '../../../../core/cache/builders/build-decorators';
export const SUBMISSION_ID: InjectionToken<string> = new InjectionToken<string>('submissionId');
export const CONFIG_DATA: InjectionToken<FormFieldModel> = new InjectionToken<FormFieldModel>('configData');
@@ -170,7 +166,7 @@ export abstract class FieldParser {
let fieldCount = 0;
const fieldIds: any = this.getAllFieldIds();
if (isNotEmpty(this.initFormValues) && isNotNull(fieldIds) && fieldIds.length === 1 && this.initFormValues.hasOwnProperty(fieldIds)) {
fieldCount = this.initFormValues[fieldIds].filter(value => hasValue(value) && hasValue(value.value)).length;
fieldCount = this.initFormValues[fieldIds].filter((value) => hasValue(value) && hasValue(value.value)).length;
} else if (isNotEmpty(this.initFormValues) && isNotNull(fieldIds) && fieldIds.length > 1) {
let counter = 0;
fieldIds.forEach((id) => {

View File

@@ -322,9 +322,4 @@ export class FormComponent implements OnDestroy, OnInit {
const control = group.controls[index] as FormControl;
return { $event, context, control, group, model, type };
}
print(data) {
console.log(data);
}
}

View File

@@ -151,8 +151,6 @@ function initForm(state: FormState, action: FormInitAction): FormState {
* the new state, with the data changed.
*/
function changeDataForm(state: FormState, action: FormChangeAction): FormState {
console.log("state changed", action);
if (hasValue(state[action.payload.formId])) {
const newState = Object.assign({}, state);
newState[action.payload.formId] = Object.assign({}, newState[action.payload.formId], {