Skip to content

Commit dbf2964

Browse files
committed
Fix linting issues
1 parent 5e44b7e commit dbf2964

20 files changed

Lines changed: 43 additions & 41 deletions

src/app/shared/form/builder/form-builder.service.spec.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,14 @@ import {
3131
DynamicTextAreaModel,
3232
DynamicTimePickerModel,
3333
} from '@ng-dynamic-forms/core';
34+
import { TranslateService } from '@ngx-translate/core';
3435

3536
import { FormRowModel } from '../../../core/config/models/config-submission-form.model';
3637
import { SubmissionFormsModel } from '../../../core/config/models/config-submission-forms.model';
3738
import { ConfigurationDataService } from '../../../core/data/configuration-data.service';
3839
import { ConfigurationProperty } from '../../../core/shared/configuration-property.model';
3940
import { VocabularyOptions } from '../../../core/submission/vocabularies/models/vocabulary-options.model';
41+
import { getMockTranslateService } from '../../mocks/translate.service.mock';
4042
import { createSuccessfulRemoteDataObject$ } from '../../remote-data.utils';
4143
import { DynamicDsDatePickerModel } from './ds-dynamic-form-ui/models/date-picker/date-picker.model';
4244
import { DynamicConcatModel } from './ds-dynamic-form-ui/models/ds-dynamic-concat.model';
@@ -55,15 +57,6 @@ import { DynamicTagModel } from './ds-dynamic-form-ui/models/tag/dynamic-tag.mod
5557
import { FormBuilderService } from './form-builder.service';
5658
import { FormFieldModel } from './models/form-field.model';
5759
import { FormFieldMetadataValueObject } from './models/form-field-metadata-value.model';
58-
import { DynamicConcatModel } from './ds-dynamic-form-ui/models/ds-dynamic-concat.model';
59-
import { DynamicLookupNameModel } from './ds-dynamic-form-ui/models/lookup/dynamic-lookup-name.model';
60-
import { DynamicRowArrayModel } from './ds-dynamic-form-ui/models/ds-dynamic-row-array-model';
61-
import { FormRowModel } from '../../../core/config/models/config-submission-form.model';
62-
import {ConfigurationDataService} from '../../../core/data/configuration-data.service';
63-
import {createSuccessfulRemoteDataObject$} from '../../remote-data.utils';
64-
import {ConfigurationProperty} from '../../../core/shared/configuration-property.model';
65-
import { getMockTranslateService } from '../../mocks/translate.service.mock';
66-
import { TranslateService } from '@ngx-translate/core';
6760

6861
describe('FormBuilderService test suite', () => {
6962

@@ -104,7 +97,7 @@ describe('FormBuilderService test suite', () => {
10497
{ provide: NG_ASYNC_VALIDATORS, useValue: testAsyncValidator, multi: true },
10598
{ provide: ConfigurationDataService, useValue: configSpy },
10699
{ provide: TranslateService, useValue: translateService },
107-
]
100+
],
108101
});
109102

110103
const vocabularyOptions: VocabularyOptions = {

src/app/shared/form/builder/parsers/concat-field-parser.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Inject } from '@angular/core';
2+
import { TranslateService } from '@ngx-translate/core';
23

34
import {
45
hasNoValue,
@@ -25,8 +26,6 @@ import {
2526
PARSER_OPTIONS,
2627
SUBMISSION_ID,
2728
} from './field-parser';
28-
import { DsDynamicInputModel, DsDynamicInputModelConfig } from '../ds-dynamic-form-ui/models/ds-dynamic-input.model';
29-
import { TranslateService } from '@ngx-translate/core';
3029
import { ParserOptions } from './parser-options';
3130

3231
export class ConcatFieldParser extends FieldParser {
@@ -36,7 +35,7 @@ export class ConcatFieldParser extends FieldParser {
3635
@Inject(CONFIG_DATA) configData: FormFieldModel,
3736
@Inject(INIT_FORM_VALUES) initFormValues,
3837
@Inject(PARSER_OPTIONS) parserOptions: ParserOptions,
39-
translate: TranslateService,
38+
translate: TranslateService,
4039
protected separator: string,
4140
protected firstPlaceholder: string = null,
4241
protected secondPlaceholder: string = null) {

src/app/shared/form/builder/parsers/date-field-parser.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
import { getMockTranslateService } from 'src/app/shared/mocks/translate.service.mock';
2+
13
import { DynamicDsDatePickerModel } from '../ds-dynamic-form-ui/models/date-picker/date-picker.model';
24
import { FormFieldModel } from '../models/form-field.model';
35
import { FormFieldMetadataValueObject } from '../models/form-field-metadata-value.model';
46
import { DateFieldParser } from './date-field-parser';
57
import { ParserOptions } from './parser-options';
6-
import { getMockTranslateService } from 'src/app/shared/mocks/translate.service.mock';
78

89

910

src/app/shared/form/builder/parsers/disabled-field-parser.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
import { getMockTranslateService } from 'src/app/shared/mocks/translate.service.mock';
2+
13
import { DynamicDisabledModel } from '../ds-dynamic-form-ui/models/disabled/dynamic-disabled.model';
24
import { FormFieldModel } from '../models/form-field.model';
35
import { DisabledFieldParser } from './disabled-field-parser';
4-
import { DynamicDisabledModel } from '../ds-dynamic-form-ui/models/disabled/dynamic-disabled.model';
5-
import { getMockTranslateService } from 'src/app/shared/mocks/translate.service.mock';
66
import { ParserOptions } from './parser-options';
77

88
describe('DisabledFieldParser test suite', () => {

src/app/shared/form/builder/parsers/dropdown-field-parser.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
import { getMockTranslateService } from 'src/app/shared/mocks/translate.service.mock';
2+
13
import { DynamicScrollableDropdownModel } from '../ds-dynamic-form-ui/models/scrollable-dropdown/dynamic-scrollable-dropdown.model';
24
import { FormFieldModel } from '../models/form-field.model';
35
import { DropdownFieldParser } from './dropdown-field-parser';
46
import { ParserOptions } from './parser-options';
5-
import { getMockTranslateService } from 'src/app/shared/mocks/translate.service.mock';
67

78
describe('DropdownFieldParser test suite', () => {
89
let field: FormFieldModel;

src/app/shared/form/builder/parsers/dropdown-field-parser.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Inject } from '@angular/core';
22
import { DynamicFormControlLayout } from '@ng-dynamic-forms/core';
3+
import { TranslateService } from '@ngx-translate/core';
34

45
import { isNotEmpty } from '../../../empty.util';
56
import {
@@ -16,7 +17,6 @@ import {
1617
SUBMISSION_ID,
1718
} from './field-parser';
1819
import { ParserOptions } from './parser-options';
19-
import { TranslateService } from '@ngx-translate/core';
2020

2121
export class DropdownFieldParser extends FieldParser {
2222

@@ -25,7 +25,7 @@ export class DropdownFieldParser extends FieldParser {
2525
@Inject(CONFIG_DATA) configData: FormFieldModel,
2626
@Inject(INIT_FORM_VALUES) initFormValues,
2727
@Inject(PARSER_OPTIONS) parserOptions: ParserOptions,
28-
translate: TranslateService
28+
translate: TranslateService,
2929
) {
3030
super(submissionId, configData, initFormValues, parserOptions, translate);
3131
}

src/app/shared/form/builder/parsers/field-parser.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
MATCH_VISIBLE,
99
OR_OPERATOR,
1010
} from '@ng-dynamic-forms/core';
11+
import { TranslateService } from '@ngx-translate/core';
1112
import uniqueId from 'lodash/uniqueId';
1213

1314
import { SubmissionScopeType } from '../../../../core/submission/submission-scope-type';
@@ -35,9 +36,6 @@ import { VisibilityType } from './../../../../submission/sections/visibility-typ
3536
import { setLayout } from './parser.utils';
3637
import { ParserOptions } from './parser-options';
3738
import { ParserType } from './parser-type';
38-
import { isNgbDateStruct } from '../../../date.util';
39-
import { SubmissionScopeType } from '../../../../core/submission/submission-scope-type';
40-
import { TranslateService } from '@ngx-translate/core';
4139

4240
export const SUBMISSION_ID: InjectionToken<string> = new InjectionToken<string>('submissionId');
4341
export const CONFIG_DATA: InjectionToken<FormFieldModel> = new InjectionToken<FormFieldModel>('configData');
@@ -64,7 +62,7 @@ export abstract class FieldParser {
6462
@Inject(CONFIG_DATA) protected configData: FormFieldModel,
6563
@Inject(INIT_FORM_VALUES) protected initFormValues: any,
6664
@Inject(PARSER_OPTIONS) protected parserOptions: ParserOptions,
67-
protected translate: TranslateService
65+
protected translate: TranslateService,
6866
) {
6967
}
7068

src/app/shared/form/builder/parsers/list-field-parser.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
import { getMockTranslateService } from 'src/app/shared/mocks/translate.service.mock';
2+
13
import { DynamicListCheckboxGroupModel } from '../ds-dynamic-form-ui/models/list/dynamic-list-checkbox-group.model';
24
import { DynamicListRadioGroupModel } from '../ds-dynamic-form-ui/models/list/dynamic-list-radio-group.model';
35
import { FormFieldModel } from '../models/form-field.model';
46
import { FormFieldMetadataValueObject } from '../models/form-field-metadata-value.model';
57
import { ListFieldParser } from './list-field-parser';
68
import { ParserOptions } from './parser-options';
7-
import { getMockTranslateService } from 'src/app/shared/mocks/translate.service.mock';
89

910
describe('ListFieldParser test suite', () => {
1011
let field: FormFieldModel;

src/app/shared/form/builder/parsers/lookup-field-parser.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
import { getMockTranslateService } from 'src/app/shared/mocks/translate.service.mock';
2+
13
import { DynamicLookupModel } from '../ds-dynamic-form-ui/models/lookup/dynamic-lookup.model';
24
import { FormFieldModel } from '../models/form-field.model';
35
import { FormFieldMetadataValueObject } from '../models/form-field-metadata-value.model';
46
import { LookupFieldParser } from './lookup-field-parser';
57
import { ParserOptions } from './parser-options';
6-
import { getMockTranslateService } from 'src/app/shared/mocks/translate.service.mock';
78

89
describe('LookupFieldParser test suite', () => {
910
let field: FormFieldModel;

src/app/shared/form/builder/parsers/lookup-name-field-parser.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
import { getMockTranslateService } from 'src/app/shared/mocks/translate.service.mock';
2+
13
import { DynamicLookupNameModel } from '../ds-dynamic-form-ui/models/lookup/dynamic-lookup-name.model';
24
import { FormFieldModel } from '../models/form-field.model';
35
import { FormFieldMetadataValueObject } from '../models/form-field-metadata-value.model';
46
import { LookupNameFieldParser } from './lookup-name-field-parser';
57
import { ParserOptions } from './parser-options';
6-
import { getMockTranslateService } from 'src/app/shared/mocks/translate.service.mock';
78

89
describe('LookupNameFieldParser test suite', () => {
910
let field: FormFieldModel;

0 commit comments

Comments
 (0)