survery-lib 0.1.11 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/style.css.map +1 -1
- package/esm2022/lib/components/question-boolean-template/question-boolean-template.component.mjs +99 -0
- package/esm2022/lib/components/question-check-box-template/question-check-box-template.component.mjs +110 -0
- package/esm2022/lib/components/question-dropdown-multi-template/question-dropdown-multi-template.component.mjs +95 -0
- package/esm2022/lib/components/question-dropdown-template/question-dropdown-template.component.mjs +83 -0
- package/esm2022/lib/components/question-matrix-template/question-matrix-template.component.mjs +101 -0
- package/esm2022/lib/components/question-radio-button-template/question-radio-button-template.component.mjs +99 -0
- package/esm2022/lib/components/question-text-template/question-text-template.component.mjs +99 -0
- package/esm2022/lib/pipes/default-question-answer.pipe.mjs +19 -0
- package/esm2022/lib/pipes/default-question-answers.pipe.mjs +19 -0
- package/esm2022/lib/pipes/filter-question.pipe.mjs +16 -0
- package/esm2022/lib/services/survey-lib.service.mjs +30 -0
- package/esm2022/lib/survery-lib.component.mjs +302 -0
- package/esm2022/lib/survery-lib.module.mjs +63 -0
- package/esm2022/lib/usecases/base/use-case.mjs +2 -0
- package/esm2022/lib/usecases/check-rule-exps.usecase.mjs +154 -0
- package/esm2022/public-api.mjs +8 -0
- package/esm2022/shared/dtos/default-question-answers.dto.mjs +3 -0
- package/esm2022/shared/dtos/rule-exp-answer.dto.mjs +2 -0
- package/esm2022/shared/dtos/rule-exp.dto.mjs +2 -0
- package/esm2022/shared/dtos/rule-result-question.dto.mjs +2 -0
- package/esm2022/shared/dtos/survey-answer.dto.mjs +2 -0
- package/esm2022/shared/dtos/survey-answers-subject.dto.mjs +3 -0
- package/esm2022/shared/dtos/survey-page.dto.mjs +2 -0
- package/esm2022/shared/dtos/survey-question-group.dto.mjs +2 -0
- package/esm2022/shared/dtos/survey-question.dto.mjs +2 -0
- package/esm2022/shared/dtos/survey-rule.dto.mjs +2 -0
- package/esm2022/shared/dtos/survey-sub-question.dto.mjs +2 -0
- package/esm2022/shared/dtos/survey.dto.mjs +2 -0
- package/esm2022/shared/enums/Logic-Property.enum.mjs +14 -0
- package/esm2022/shared/enums/logic-action.enum.mjs +9 -0
- package/esm2022/shared/enums/operator.enum.mjs +6 -0
- package/esm2022/shared/enums/question-type.enum.mjs +11 -0
- package/esm2022/shared/form-interfaces/question-boolean-template.form-interface.mjs +2 -0
- package/esm2022/shared/form-interfaces/question-check-box-template.form-interface.mjs +3 -0
- package/esm2022/shared/form-interfaces/question-dropdown-multi-template.form-interface.mjs +3 -0
- package/esm2022/shared/form-interfaces/question-dropdown-template.form-interface.mjs +3 -0
- package/esm2022/shared/form-interfaces/question-matrix-template.form-interface.mjs +2 -0
- package/esm2022/shared/form-interfaces/question-radio-button-template.form-interface.mjs +3 -0
- package/esm2022/shared/form-interfaces/question-text-template.form-interface.mjs +2 -0
- package/esm2022/shared/form-interfaces/survery-lib.form-interface.mjs +2 -0
- package/esm2022/shared/models/question-answer.model.mjs +3 -0
- package/esm2022/shared/models/survery-question-result.model.mjs +3 -0
- package/esm2022/survery-lib.mjs +5 -0
- package/fesm2022/survery-lib.mjs +1240 -0
- package/fesm2022/survery-lib.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/question-boolean-template/question-boolean-template.component.d.ts +36 -0
- package/lib/components/question-check-box-template/question-check-box-template.component.d.ts +37 -0
- package/lib/components/question-dropdown-multi-template/question-dropdown-multi-template.component.d.ts +35 -0
- package/lib/components/question-dropdown-template/question-dropdown-template.component.d.ts +33 -0
- package/lib/components/question-matrix-template/question-matrix-template.component.d.ts +33 -0
- package/lib/components/question-radio-button-template/question-radio-button-template.component.d.ts +36 -0
- package/lib/components/question-text-template/question-text-template.component.d.ts +35 -0
- package/lib/pipes/default-question-answer.pipe.d.ts +8 -0
- package/lib/pipes/default-question-answers.pipe.d.ts +8 -0
- package/lib/pipes/filter-question.pipe.d.ts +9 -0
- package/lib/services/survey-lib.service.d.ts +14 -0
- package/lib/survery-lib.component.d.ts +49 -0
- package/lib/survery-lib.module.d.ts +24 -0
- package/{src/lib/usecases/base/use-case.ts → lib/usecases/base/use-case.d.ts} +7 -9
- package/lib/usecases/check-rule-exps.usecase.d.ts +21 -0
- package/package.json +28 -15
- package/{src/public-api.ts → public-api.d.ts} +1 -5
- package/shared/dtos/default-question-answers.dto.d.ts +9 -0
- package/{src/shared/dtos/rule-exp-answer.dto.ts → shared/dtos/rule-exp-answer.dto.d.ts} +5 -5
- package/{src/shared/dtos/rule-exp.dto.ts → shared/dtos/rule-exp.dto.d.ts} +13 -14
- package/{src/shared/dtos/rule-result-question.dto.ts → shared/dtos/rule-result-question.dto.d.ts} +4 -5
- package/{src/shared/dtos/survey-answer.dto.ts → shared/dtos/survey-answer.dto.d.ts} +16 -16
- package/{src/shared/dtos/survey-answers-subject.dto.ts → shared/dtos/survey-answers-subject.dto.d.ts} +5 -6
- package/{src/shared/dtos/survey-page.dto.ts → shared/dtos/survey-page.dto.d.ts} +9 -10
- package/{src/shared/dtos/survey-question-group.dto.ts → shared/dtos/survey-question-group.dto.d.ts} +8 -9
- package/{src/shared/dtos/survey-question.dto.ts → shared/dtos/survey-question.dto.d.ts} +18 -19
- package/{src/shared/dtos/survey-rule.dto.ts → shared/dtos/survey-rule.dto.d.ts} +10 -11
- package/{src/shared/dtos/survey-sub-question.dto.ts → shared/dtos/survey-sub-question.dto.d.ts} +9 -9
- package/{src/shared/dtos/survey.dto.ts → shared/dtos/survey.dto.d.ts} +16 -17
- package/shared/enums/Logic-Property.enum.d.ts +12 -0
- package/{src/shared/enums/logic-action.enum.ts → shared/enums/logic-action.enum.d.ts} +7 -7
- package/shared/enums/operator.enum.d.ts +4 -0
- package/{src/shared/enums/question-type.enum.ts → shared/enums/question-type.enum.d.ts} +9 -9
- package/shared/form-interfaces/question-boolean-template.form-interface.d.ts +15 -0
- package/shared/form-interfaces/question-check-box-template.form-interface.d.ts +15 -0
- package/shared/form-interfaces/question-dropdown-multi-template.form-interface.d.ts +15 -0
- package/shared/form-interfaces/question-dropdown-template.form-interface.d.ts +9 -0
- package/{src/shared/form-interfaces/question-matrix-template.form-interface.ts → shared/form-interfaces/question-matrix-template.form-interface.d.ts} +11 -13
- package/shared/form-interfaces/question-radio-button-template.form-interface.d.ts +15 -0
- package/shared/form-interfaces/question-text-template.form-interface.d.ts +10 -0
- package/shared/form-interfaces/survery-lib.form-interface.d.ts +24 -0
- package/shared/models/question-answer.model.d.ts +6 -0
- package/shared/models/survery-question-result.model.d.ts +8 -0
- package/ng-package.json +0 -11
- package/scss/style.scss +0 -88
- package/src/lib/components/question-boolean-template/question-boolean-template.component.html +0 -13
- package/src/lib/components/question-boolean-template/question-boolean-template.component.scss +0 -0
- package/src/lib/components/question-boolean-template/question-boolean-template.component.spec.ts +0 -21
- package/src/lib/components/question-boolean-template/question-boolean-template.component.ts +0 -109
- package/src/lib/components/question-check-box-template/question-check-box-template.component.html +0 -13
- package/src/lib/components/question-check-box-template/question-check-box-template.component.scss +0 -0
- package/src/lib/components/question-check-box-template/question-check-box-template.component.spec.ts +0 -21
- package/src/lib/components/question-check-box-template/question-check-box-template.component.ts +0 -124
- package/src/lib/components/question-dropdown-multi-template/question-dropdown-multi-template.component.html +0 -10
- package/src/lib/components/question-dropdown-multi-template/question-dropdown-multi-template.component.scss +0 -3
- package/src/lib/components/question-dropdown-multi-template/question-dropdown-multi-template.component.spec.ts +0 -21
- package/src/lib/components/question-dropdown-multi-template/question-dropdown-multi-template.component.ts +0 -100
- package/src/lib/components/question-dropdown-template/question-dropdown-template.component.html +0 -10
- package/src/lib/components/question-dropdown-template/question-dropdown-template.component.scss +0 -0
- package/src/lib/components/question-dropdown-template/question-dropdown-template.component.spec.ts +0 -21
- package/src/lib/components/question-dropdown-template/question-dropdown-template.component.ts +0 -87
- package/src/lib/components/question-matrix-template/question-matrix-template.component.html +0 -36
- package/src/lib/components/question-matrix-template/question-matrix-template.component.scss +0 -0
- package/src/lib/components/question-matrix-template/question-matrix-template.component.spec.ts +0 -21
- package/src/lib/components/question-matrix-template/question-matrix-template.component.ts +0 -110
- package/src/lib/components/question-radio-button-template/question-radio-button-template.component.html +0 -13
- package/src/lib/components/question-radio-button-template/question-radio-button-template.component.scss +0 -0
- package/src/lib/components/question-radio-button-template/question-radio-button-template.component.spec.ts +0 -21
- package/src/lib/components/question-radio-button-template/question-radio-button-template.component.ts +0 -111
- package/src/lib/components/question-text-template/question-text-template.component.html +0 -13
- package/src/lib/components/question-text-template/question-text-template.component.scss +0 -0
- package/src/lib/components/question-text-template/question-text-template.component.spec.ts +0 -21
- package/src/lib/components/question-text-template/question-text-template.component.ts +0 -105
- package/src/lib/pipes/default-question-answer.pipe.spec.ts +0 -8
- package/src/lib/pipes/default-question-answer.pipe.ts +0 -18
- package/src/lib/pipes/default-question-answers.pipe.spec.ts +0 -8
- package/src/lib/pipes/default-question-answers.pipe.ts +0 -17
- package/src/lib/pipes/filter-question.pipe.spec.ts +0 -8
- package/src/lib/pipes/filter-question.pipe.ts +0 -14
- package/src/lib/services/survey-lib.service.spec.ts +0 -16
- package/src/lib/services/survey-lib.service.ts +0 -31
- package/src/lib/survery-lib.component.spec.ts +0 -21
- package/src/lib/survery-lib.component.ts +0 -308
- package/src/lib/survery-lib.module.ts +0 -47
- package/src/lib/survey-lib.component.html +0 -67
- package/src/lib/survey-lib.component.scss +0 -4
- package/src/lib/usecases/check-rule-exps.usecase.ts +0 -188
- package/src/shared/dtos/default-question-answers.dto.ts +0 -10
- package/src/shared/enums/logic-property.enum.ts +0 -12
- package/src/shared/enums/operator.enum.ts +0 -4
- package/src/shared/form-interfaces/question-boolean-template.form-interface.ts +0 -17
- package/src/shared/form-interfaces/question-check-box-template.form-interface.ts +0 -18
- package/src/shared/form-interfaces/question-dropdown-multi-template.form-interface.ts +0 -17
- package/src/shared/form-interfaces/question-dropdown-template.form-interface.ts +0 -10
- package/src/shared/form-interfaces/question-radio-button-template.form-interface.ts +0 -17
- package/src/shared/form-interfaces/question-text-template.form-interface.ts +0 -11
- package/src/shared/form-interfaces/survery-lib.form-interface.ts +0 -27
- package/src/shared/models/question-answer.model.ts +0 -6
- package/src/shared/models/survery-question-result.model.ts +0 -8
- package/tsconfig.lib.json +0 -14
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -14
package/src/lib/components/question-dropdown-template/question-dropdown-template.component.ts
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
|
2
|
-
import { FormControl, Validators } from '@angular/forms';
|
|
3
|
-
import { FormBuilder, FormGroup } from '@ng-stack/forms';
|
|
4
|
-
import { SurveyQuestionDto } from '../../../shared/dtos/survey-question.dto';
|
|
5
|
-
import { QuestionTypeEnum } from '../../../shared/enums/question-type.enum';
|
|
6
|
-
import { QuestionDropdownTemplateFormInterface } from '../../../shared/form-interfaces/question-dropdown-template.form-interface';
|
|
7
|
-
import { QuestionRadioButtonTemplateFormInterface } from '../../../shared/form-interfaces/question-radio-button-template.form-interface';
|
|
8
|
-
import { debounceTime, distinctUntilChanged, filter, map } from 'rxjs';
|
|
9
|
-
import { QuestionAnswerModel } from '../../../shared/models/question-answer.model';
|
|
10
|
-
import { DefaultQuestionAnswerDto } from '../../../shared/dtos/default-question-answers.dto';
|
|
11
|
-
import { SurveyLibService } from '../../services/survey-lib.service';
|
|
12
|
-
|
|
13
|
-
@Component({
|
|
14
|
-
selector: 'lib-question-dropdown-template',
|
|
15
|
-
templateUrl: './question-dropdown-template.component.html',
|
|
16
|
-
styleUrls: ['./question-dropdown-template.component.scss']
|
|
17
|
-
})
|
|
18
|
-
export class QuestionDropdownTemplateComponent implements OnInit {
|
|
19
|
-
surveyQuestion: SurveyQuestionDto;
|
|
20
|
-
rForm: FormGroup<QuestionDropdownTemplateFormInterface>;
|
|
21
|
-
|
|
22
|
-
get fCtrls() {
|
|
23
|
-
return this.rForm.controls;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
get questionTypeEnum() {
|
|
27
|
-
return QuestionTypeEnum;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
@Output() emitter = new EventEmitter<QuestionAnswerModel>();
|
|
31
|
-
|
|
32
|
-
@Input() isShow: boolean = true;
|
|
33
|
-
@Input() isDisabled: boolean = false;
|
|
34
|
-
@Input() set setQuestion(value: SurveyQuestionDto) {
|
|
35
|
-
this.surveyQuestion = value;
|
|
36
|
-
this.rForm.patchValue({
|
|
37
|
-
id: value.questionId,
|
|
38
|
-
name: value.questionName,
|
|
39
|
-
title: value.questionTitle,
|
|
40
|
-
typeId: value.questionTypeId,
|
|
41
|
-
description: value.questionDescription
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
if (value.isRequired == true) {
|
|
45
|
-
this.fCtrls.answer.addValidators([Validators.required]);
|
|
46
|
-
this.fCtrls.answer.updateValueAndValidity();
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
this.isShow = value.isVisable;
|
|
50
|
-
this.isDisabled = value.isReadOnly;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
constructor(private _formBuilder: FormBuilder ,private _surveyLibService :SurveyLibService) {
|
|
54
|
-
this.rForm = this._formBuilder.group<QuestionDropdownTemplateFormInterface>({
|
|
55
|
-
id: [null],
|
|
56
|
-
name: [null],
|
|
57
|
-
title: [null],
|
|
58
|
-
typeId: [null],
|
|
59
|
-
description: [null],
|
|
60
|
-
answer: [null]
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
ngOnInit(): void {
|
|
65
|
-
this.fCtrls.answer.valueChanges.pipe().pipe(debounceTime(200)).subscribe(value => {
|
|
66
|
-
const formValue = this.rForm.value;
|
|
67
|
-
this.emitter.emit({
|
|
68
|
-
QuestionId: formValue.id,
|
|
69
|
-
IsValid: this.fCtrls.answer.valid,
|
|
70
|
-
Answer: value
|
|
71
|
-
})
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
this.fCtrls.answer.setValue(null);
|
|
75
|
-
|
|
76
|
-
this._surveyLibService.surveyAnswersObsrv
|
|
77
|
-
.pipe(map(x=> x.defaultAnswers.filter(x=>x.QuestionId == this.fCtrls.id.value)))
|
|
78
|
-
.pipe(filter(x=>x.length > 0)).pipe(map(x=> x.at(0)))
|
|
79
|
-
.subscribe(answer=>{
|
|
80
|
-
this.fCtrls.answer.setValue(answer.AnswerId);
|
|
81
|
-
})
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
convertToFormControl(element: any) {
|
|
85
|
-
return element as FormControl;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
<div class="quastion" [attr.id]="'question_'+fCtrls.id.value" style=" border-collapse: collapse;"
|
|
2
|
-
[ngClass]="{'d-none':isShow != true}">
|
|
3
|
-
<h3 class="quastion-title ">
|
|
4
|
-
{{surveyQuestion?.questionTitle}}
|
|
5
|
-
</h3>
|
|
6
|
-
<div class="matrix-question" [formGroup]="rForm">
|
|
7
|
-
<div class="matrix-table" formArrayName="subQuestionArray">
|
|
8
|
-
<div class="matrix-head-row">
|
|
9
|
-
<div class="matrix-col">
|
|
10
|
-
</div>
|
|
11
|
-
<div class="matrix-col" *ngFor="let answers of surveyQuestion?.surveyAnswers">
|
|
12
|
-
{{answers.answerTitle}}
|
|
13
|
-
</div>
|
|
14
|
-
</div>
|
|
15
|
-
|
|
16
|
-
<div class="matrix-row"
|
|
17
|
-
*ngFor="let questionGroup of fCtrls.subQuestionArray.controls ;let subQuestionIndex = index"
|
|
18
|
-
[ngClass]="{'invalid-question': questionGroup.controls.answer.invalid}">
|
|
19
|
-
<div class="matrix-col matrix-sub-quastion">
|
|
20
|
-
{{questionGroup.value.questionTitle}}
|
|
21
|
-
</div>
|
|
22
|
-
<div class="matrix-col" *ngFor="let answer of surveyQuestion?.surveyAnswers;let answerIndex = index">
|
|
23
|
-
<div class="form-check form-check-radio form-check-inline">
|
|
24
|
-
<input class="form-check-input" type="radio" name="{{elemId}}__radio-btn-option_{{subQuestionIndex}}"
|
|
25
|
-
id="{{elemId}}__radio-btn_{{subQuestionIndex}}_{{answerIndex}}" (change)="onChangeAnswer(questionGroup.value ,answer)"
|
|
26
|
-
value="{{answer.answerId}}" [checked]="answer.answerId == questionGroup.value.answer">
|
|
27
|
-
<label class="form-check-label d-md-inline d-lg-none"
|
|
28
|
-
for="{{elemId}}__radio-btn_{{subQuestionIndex}}_{{answerIndex}}"> {{answer.answerTitle}}</label>
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
|
|
33
|
-
</div>
|
|
34
|
-
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
File without changes
|
package/src/lib/components/question-matrix-template/question-matrix-template.component.spec.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { QuestionMatrixTemplateComponent } from './question-matrix-template.component';
|
|
4
|
-
|
|
5
|
-
describe('QuestionMatrixTemplateComponent', () => {
|
|
6
|
-
let component: QuestionMatrixTemplateComponent;
|
|
7
|
-
let fixture: ComponentFixture<QuestionMatrixTemplateComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(() => {
|
|
10
|
-
TestBed.configureTestingModule({
|
|
11
|
-
declarations: [QuestionMatrixTemplateComponent]
|
|
12
|
-
});
|
|
13
|
-
fixture = TestBed.createComponent(QuestionMatrixTemplateComponent);
|
|
14
|
-
component = fixture.componentInstance;
|
|
15
|
-
fixture.detectChanges();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('should create', () => {
|
|
19
|
-
expect(component).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
});
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
|
2
|
-
import { FormControl, Validators } from '@angular/forms';
|
|
3
|
-
import { FormBuilder, FormGroup } from '@ng-stack/forms';
|
|
4
|
-
import { SurveyAnswerDto } from '../../../shared/dtos/survey-answer.dto';
|
|
5
|
-
import { SurveyQuestionGroupDto } from '../../../shared/dtos/survey-question-group.dto';
|
|
6
|
-
import { SurveyQuestionDto } from '../../../shared/dtos/survey-question.dto';
|
|
7
|
-
import { SurveySubQuestionDto } from '../../../shared/dtos/survey-sub-question.dto';
|
|
8
|
-
import { QuestionTypeEnum } from '../../../shared/enums/question-type.enum';
|
|
9
|
-
import { QuestionMatrixTemplateFormInterface, SubQuestionChildOfQuestionMatrixTemplateFormInterface } from '../../../shared/form-interfaces/question-matrix-template.form-interface';
|
|
10
|
-
import { QuestionAnswerModel } from '../../../shared/models/question-answer.model';
|
|
11
|
-
import { v4 as guidGenerator } from 'uuid';
|
|
12
|
-
import { DefaultQuestionAnswerDto } from '../../../shared/dtos/default-question-answers.dto';
|
|
13
|
-
import { debounceTime, distinctUntilChanged, filter, map } from 'rxjs';
|
|
14
|
-
import { SurveyLibService } from '../../services/survey-lib.service';
|
|
15
|
-
|
|
16
|
-
@Component({
|
|
17
|
-
selector: 'lib-question-matrix-template',
|
|
18
|
-
templateUrl: './question-matrix-template.component.html',
|
|
19
|
-
styleUrls: ['./question-matrix-template.component.scss']
|
|
20
|
-
})
|
|
21
|
-
export class QuestionMatrixTemplateComponent implements OnInit {
|
|
22
|
-
elemId = guidGenerator() as string;
|
|
23
|
-
surveyQuestion: SurveyQuestionDto;
|
|
24
|
-
rForm: FormGroup<QuestionMatrixTemplateFormInterface>;
|
|
25
|
-
|
|
26
|
-
get fCtrls() {
|
|
27
|
-
return this.rForm.controls;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
get questionTypeEnum() {
|
|
31
|
-
return QuestionTypeEnum;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
@Output() emitter = new EventEmitter<QuestionAnswerModel>();
|
|
35
|
-
|
|
36
|
-
@Input() isShow: boolean = true;
|
|
37
|
-
@Input() isDisabled: boolean = false;
|
|
38
|
-
@Input() set setQuestion(value: SurveyQuestionDto) {
|
|
39
|
-
this.surveyQuestion = value;
|
|
40
|
-
this.rForm.patchValue({
|
|
41
|
-
id: value.questionId,
|
|
42
|
-
typeId: value.questionTypeId
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
value.surveySubQuestions.forEach(x => {
|
|
46
|
-
var group = this._formBuilder.group<SubQuestionChildOfQuestionMatrixTemplateFormInterface>({
|
|
47
|
-
subQuestionId: [x.questionId],
|
|
48
|
-
questionTitle: [x.questionTitle],
|
|
49
|
-
answer: [null],
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
if (value.isRequired == true) {
|
|
53
|
-
group.controls.answer.addValidators([Validators.required]);
|
|
54
|
-
group.controls.answer.updateValueAndValidity();
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
group.controls.answer.valueChanges.pipe().pipe(debounceTime(200)).subscribe(value => {
|
|
58
|
-
const formValue = this.rForm.value;
|
|
59
|
-
this.emitter.emit({
|
|
60
|
-
QuestionId: group.value.subQuestionId,
|
|
61
|
-
Answer: group.value.answer,
|
|
62
|
-
IsValid: group.controls.answer.valid
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
this.fCtrls.subQuestionArray.push(group);
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
this.isShow = value.isVisable;
|
|
70
|
-
this.isDisabled = value.isReadOnly;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
constructor(private _formBuilder: FormBuilder , private _surveyLibService:SurveyLibService) {
|
|
74
|
-
this.rForm = this._formBuilder.group<QuestionMatrixTemplateFormInterface>({
|
|
75
|
-
id: [null],
|
|
76
|
-
typeId: [null],
|
|
77
|
-
subQuestionArray: this._formBuilder.array<SubQuestionChildOfQuestionMatrixTemplateFormInterface>([])
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
ngOnInit(): void {
|
|
81
|
-
this._surveyLibService.surveyAnswersObsrv
|
|
82
|
-
.pipe(map(x=> x.defaultAnswers.filter(x=>x.ParentQuestionId == this.fCtrls.id.value)))
|
|
83
|
-
.pipe(filter(x=>x.length > 0))
|
|
84
|
-
.subscribe(answers=>{
|
|
85
|
-
this.fCtrls.subQuestionArray.controls.forEach(group => {
|
|
86
|
-
var answer = answers.find(x => x.QuestionId == group.value.subQuestionId);
|
|
87
|
-
if (answer != null) {
|
|
88
|
-
group.controls.answer.setValue(answer.AnswerId);
|
|
89
|
-
}
|
|
90
|
-
})
|
|
91
|
-
})
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
onChangeAnswer(question: SubQuestionChildOfQuestionMatrixTemplateFormInterface, answer: SurveyAnswerDto) {
|
|
95
|
-
const index = this.fCtrls.subQuestionArray.value.findIndex(x => x.subQuestionId == question.subQuestionId);
|
|
96
|
-
var subQuestionGroup = this.fCtrls.subQuestionArray.controls[index];
|
|
97
|
-
|
|
98
|
-
subQuestionGroup.controls.answer.setValue(answer.answerId);
|
|
99
|
-
|
|
100
|
-
this.emitter.emit({
|
|
101
|
-
QuestionId: subQuestionGroup.value.subQuestionId,
|
|
102
|
-
Answer: subQuestionGroup.value.answer,
|
|
103
|
-
IsValid: subQuestionGroup.controls.answer.valid
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
convertToFormControl(element: any) {
|
|
108
|
-
return element as FormControl;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<div class="quastion" [attr.id]="'question_'+fCtrls.id.value" [ngClass]="{'invalid-question': fCtrls.answer.invalid , 'd-none':isShow != true}">
|
|
2
|
-
<h3 class="quastion-title ">
|
|
3
|
-
{{fCtrls.title.value}}
|
|
4
|
-
</h3>
|
|
5
|
-
<div class="radio-button-quastion">
|
|
6
|
-
<div class="form-check form-check-radio form-check-inline"
|
|
7
|
-
*ngFor="let item of fCtrls.answerArray.controls;let i = index">
|
|
8
|
-
<input class="form-check-input" type="radio" (change)="onChangeAnswer(item.value)" [disabled]="isDisabled"
|
|
9
|
-
name="{{elemId}}__radio-btn-option" id="{{elemId}}__radio-btn_{{i}}" [checked]="item.value.isSelected == true? true : null">
|
|
10
|
-
<label class="form-check-label" for="{{elemId}}__radio-btn_{{i}}">{{item.value.title}}</label>
|
|
11
|
-
</div>
|
|
12
|
-
</div>
|
|
13
|
-
</div>
|
|
File without changes
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { QuestionRadioButtonTemplateComponent } from './question-radio-button-template.component';
|
|
4
|
-
|
|
5
|
-
describe('QuestionRadioButtonTemplateComponent', () => {
|
|
6
|
-
let component: QuestionRadioButtonTemplateComponent;
|
|
7
|
-
let fixture: ComponentFixture<QuestionRadioButtonTemplateComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(() => {
|
|
10
|
-
TestBed.configureTestingModule({
|
|
11
|
-
declarations: [QuestionRadioButtonTemplateComponent]
|
|
12
|
-
});
|
|
13
|
-
fixture = TestBed.createComponent(QuestionRadioButtonTemplateComponent);
|
|
14
|
-
component = fixture.componentInstance;
|
|
15
|
-
fixture.detectChanges();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('should create', () => {
|
|
19
|
-
expect(component).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
});
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
|
2
|
-
import { FormControl, Validators } from '@angular/forms';
|
|
3
|
-
import { FormBuilder, FormGroup } from '@ng-stack/forms';
|
|
4
|
-
import { SurveyAnswerDto } from '../../../shared/dtos/survey-answer.dto';
|
|
5
|
-
import { SurveyQuestionDto } from '../../../shared/dtos/survey-question.dto';
|
|
6
|
-
import { QuestionTypeEnum } from '../../../shared/enums/question-type.enum';
|
|
7
|
-
import {
|
|
8
|
-
AnswerChildOfQuestionRadioButtonTemplateFormInterface,
|
|
9
|
-
QuestionRadioButtonTemplateFormInterface
|
|
10
|
-
} from '../../../shared/form-interfaces/question-radio-button-template.form-interface';
|
|
11
|
-
import { QuestionTextTemplateFormInterface } from '../../../shared/form-interfaces/question-text-template.form-interface';
|
|
12
|
-
import { debounceTime, distinctUntilChanged, filter, map } from 'rxjs';
|
|
13
|
-
import { v4 as guidGenerator } from 'uuid';
|
|
14
|
-
import { QuestionAnswerModel } from '../../../shared/models/question-answer.model';
|
|
15
|
-
import { DefaultQuestionAnswerDto } from '../../../shared/dtos/default-question-answers.dto';
|
|
16
|
-
import { SurveyLibService } from '../../services/survey-lib.service';
|
|
17
|
-
|
|
18
|
-
@Component({
|
|
19
|
-
selector: 'lib-question-radio-button-template',
|
|
20
|
-
templateUrl: './question-radio-button-template.component.html',
|
|
21
|
-
styleUrls: ['./question-radio-button-template.component.scss']
|
|
22
|
-
})
|
|
23
|
-
export class QuestionRadioButtonTemplateComponent implements OnInit {
|
|
24
|
-
elemId = guidGenerator() as string;
|
|
25
|
-
surveyQuestion: SurveyQuestionDto;
|
|
26
|
-
rForm: FormGroup<QuestionRadioButtonTemplateFormInterface>;
|
|
27
|
-
|
|
28
|
-
get fCtrls() {
|
|
29
|
-
return this.rForm.controls;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
get questionTypeEnum() {
|
|
33
|
-
return QuestionTypeEnum;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
@Output() emitter = new EventEmitter<QuestionAnswerModel>();
|
|
37
|
-
|
|
38
|
-
@Input() isShow: boolean = true;
|
|
39
|
-
@Input() isDisabled: boolean = false;
|
|
40
|
-
@Input() set setQuestion(value: SurveyQuestionDto) {
|
|
41
|
-
this.surveyQuestion = value;
|
|
42
|
-
this.rForm.patchValue({
|
|
43
|
-
id: value.questionId,
|
|
44
|
-
name: value.questionName,
|
|
45
|
-
title: value.questionTitle,
|
|
46
|
-
typeId: value.questionTypeId,
|
|
47
|
-
description: value.questionDescription
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
value.surveyAnswers.forEach(surveryAnswer => {
|
|
51
|
-
this.fCtrls.answerArray.push(this._formBuilder.group<AnswerChildOfQuestionRadioButtonTemplateFormInterface>({
|
|
52
|
-
id: [surveryAnswer.answerId],
|
|
53
|
-
title: [surveryAnswer.answerTitle],
|
|
54
|
-
isSelected: [false]
|
|
55
|
-
}))
|
|
56
|
-
})
|
|
57
|
-
|
|
58
|
-
if (value.isRequired == true) {
|
|
59
|
-
this.fCtrls.answer.addValidators([Validators.required]);
|
|
60
|
-
this.fCtrls.answer.updateValueAndValidity();
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
this.isShow = value.isVisable;
|
|
64
|
-
this.isDisabled = value.isReadOnly;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
constructor(private _formBuilder: FormBuilder, private _surveyLibService: SurveyLibService) {
|
|
68
|
-
this.rForm = this._formBuilder.group<QuestionRadioButtonTemplateFormInterface>({
|
|
69
|
-
id: [null],
|
|
70
|
-
name: [null],
|
|
71
|
-
title: [null],
|
|
72
|
-
typeId: [null],
|
|
73
|
-
description: [null],
|
|
74
|
-
answer: [null],
|
|
75
|
-
answerArray: this._formBuilder.array<AnswerChildOfQuestionRadioButtonTemplateFormInterface>([])
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
ngOnInit(): void {
|
|
80
|
-
this.fCtrls.answer.valueChanges.pipe().pipe(debounceTime(200)).subscribe(value => {
|
|
81
|
-
console.log(value);
|
|
82
|
-
const formValue = this.rForm.value;
|
|
83
|
-
this.emitter.emit({
|
|
84
|
-
QuestionId: formValue.id,
|
|
85
|
-
IsValid: this.fCtrls.answer.valid,
|
|
86
|
-
Answer: value
|
|
87
|
-
})
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
this.fCtrls.answer.setValue(null);
|
|
91
|
-
|
|
92
|
-
this._surveyLibService.surveyAnswersObsrv.pipe(map(x => x.defaultAnswers.filter(x => x.QuestionId == this.fCtrls.id.value)))
|
|
93
|
-
.pipe(filter(x => x.length > 0)).pipe(map(x => x.at(0)))
|
|
94
|
-
.subscribe(answer => {
|
|
95
|
-
this.fCtrls.answer.setValue(answer.AnswerId);
|
|
96
|
-
|
|
97
|
-
const groupIndex = this.fCtrls.answerArray.value.findIndex(x => x.id == answer.AnswerId);
|
|
98
|
-
if (groupIndex > -1) {
|
|
99
|
-
this.fCtrls.answerArray.at(groupIndex).controls.isSelected.setValue(true);
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
onChangeAnswer(item: AnswerChildOfQuestionRadioButtonTemplateFormInterface) {
|
|
105
|
-
this.fCtrls.answer.setValue(item.id);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
convertToFormControl(element: any) {
|
|
109
|
-
return element as FormControl;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<div class="quastion" [formGroup]="rForm" [attr.id]="'question_'+fCtrls.id.value"
|
|
2
|
-
[ngClass]="{'invalid-question': fCtrls.answer.invalid , 'd-none':isShow != true}">
|
|
3
|
-
<h3 class="quastion-title ">
|
|
4
|
-
{{fCtrls.title.value}}
|
|
5
|
-
</h3>
|
|
6
|
-
<div class="text-quastion">
|
|
7
|
-
<input class="form-control" type="text" [formControl]="convertToFormControl(fCtrls.answer)"
|
|
8
|
-
[disabled]="isDisabled" *ngIf="isTextArea == false else textAreaTemplate">
|
|
9
|
-
<ng-template #textAreaTemplate>
|
|
10
|
-
<textarea class="form-control" rows="5" [formControl]="convertToFormControl(fCtrls.answer)"
|
|
11
|
-
[disabled]="isDisabled" ></textarea>
|
|
12
|
-
</ng-template>
|
|
13
|
-
</div>
|
|
File without changes
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { QuestionTextTemplateComponent } from './question-text-template.component';
|
|
4
|
-
|
|
5
|
-
describe('QuestionTextTemplateComponent', () => {
|
|
6
|
-
let component: QuestionTextTemplateComponent;
|
|
7
|
-
let fixture: ComponentFixture<QuestionTextTemplateComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(() => {
|
|
10
|
-
TestBed.configureTestingModule({
|
|
11
|
-
declarations: [QuestionTextTemplateComponent]
|
|
12
|
-
});
|
|
13
|
-
fixture = TestBed.createComponent(QuestionTextTemplateComponent);
|
|
14
|
-
component = fixture.componentInstance;
|
|
15
|
-
fixture.detectChanges();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('should create', () => {
|
|
19
|
-
expect(component).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
});
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
|
2
|
-
import { FormControl, Validators } from '@angular/forms';
|
|
3
|
-
import { FormBuilder, FormGroup, FormControl as FormControlStack, ValidatorsModel } from '@ng-stack/forms';
|
|
4
|
-
import { SurveyQuestionDto } from '../../../shared/dtos/survey-question.dto';
|
|
5
|
-
import { QuestionTypeEnum } from '../../../shared/enums/question-type.enum';
|
|
6
|
-
import { QuestionTextTemplateFormInterface } from '../../../shared/form-interfaces/question-text-template.form-interface';
|
|
7
|
-
import { debounceTime, distinctUntilChanged, filter, map } from 'rxjs';
|
|
8
|
-
import { QuestionAnswerModel } from '../../../shared/models/question-answer.model';
|
|
9
|
-
import { DefaultQuestionAnswerDto } from '../../../shared/dtos/default-question-answers.dto';
|
|
10
|
-
import { SurveyLibService } from '../../services/survey-lib.service';
|
|
11
|
-
|
|
12
|
-
@Component({
|
|
13
|
-
selector: 'lib-question-text-template',
|
|
14
|
-
templateUrl: './question-text-template.component.html',
|
|
15
|
-
styleUrls: ['./question-text-template.component.scss']
|
|
16
|
-
})
|
|
17
|
-
export class QuestionTextTemplateComponent implements OnInit {
|
|
18
|
-
|
|
19
|
-
rForm: FormGroup<QuestionTextTemplateFormInterface>;
|
|
20
|
-
|
|
21
|
-
get fCtrls() {
|
|
22
|
-
return this.rForm.controls;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
get questionTypeEnum() {
|
|
26
|
-
return QuestionTypeEnum;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
@Output() emitter = new EventEmitter<QuestionAnswerModel>();
|
|
30
|
-
|
|
31
|
-
@Input() isShow: boolean = true;
|
|
32
|
-
@Input() isTextArea: boolean;
|
|
33
|
-
@Input() set setQuestion(value: SurveyQuestionDto) {
|
|
34
|
-
this.rForm.patchValue({
|
|
35
|
-
id: value.questionId,
|
|
36
|
-
name: value.questionName,
|
|
37
|
-
title: value.questionTitle,
|
|
38
|
-
typeId: value.questionTypeId,
|
|
39
|
-
description: value.questionDescription
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
if (value.surveyAnswers[0]?.answerId != null && value.surveyAnswers[0]?.answerId != undefined) {
|
|
43
|
-
this.fCtrls.surveyAnswerId.setValue(value.surveyAnswers[0].answerId);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
if (value.isRequired == true) {
|
|
47
|
-
this.fCtrls.answer.addValidators([Validators.required]);
|
|
48
|
-
this.fCtrls.answer.updateValueAndValidity();
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
this.isShow = value.isVisable;
|
|
52
|
-
this.toggleEnableAnswer(value.isReadOnly);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
@Input() set isDisabled(value: boolean) {
|
|
56
|
-
this.toggleEnableAnswer(value);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
constructor(private _formBuilder: FormBuilder , private _surveyLibService:SurveyLibService) {
|
|
61
|
-
this.rForm = this._formBuilder.group<QuestionTextTemplateFormInterface>({
|
|
62
|
-
id: [null],
|
|
63
|
-
name: [null],
|
|
64
|
-
title: [null],
|
|
65
|
-
typeId: [null],
|
|
66
|
-
description: [null],
|
|
67
|
-
surveyAnswerId: [null],
|
|
68
|
-
answer: [null]
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
ngOnInit(): void {
|
|
73
|
-
this.fCtrls.answer.valueChanges.pipe().pipe(debounceTime(200)).subscribe(value => {
|
|
74
|
-
const formValue = this.rForm.value;
|
|
75
|
-
this.emitter.emit({
|
|
76
|
-
QuestionId: formValue.id,
|
|
77
|
-
IsValid: this.fCtrls.answer.valid,
|
|
78
|
-
Answer: value,
|
|
79
|
-
SurveyAnswerId: formValue.surveyAnswerId
|
|
80
|
-
})
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
this.fCtrls.answer.setValue(null);
|
|
84
|
-
|
|
85
|
-
this._surveyLibService.surveyAnswersObsrv.pipe(map(x=> x.defaultAnswers.filter(x=>x.QuestionId == this.fCtrls.id.value)))
|
|
86
|
-
.pipe(filter(x=>x.length > 0)).pipe(map(x=> x.at(0)))
|
|
87
|
-
.subscribe(answer=>{
|
|
88
|
-
this.fCtrls.answer.setValue(answer.AnswerText);
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
convertToFormControl(element: any) {
|
|
93
|
-
return element as FormControl;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
private toggleEnableAnswer(isReadOnly: boolean) {
|
|
97
|
-
if (isReadOnly == true) {
|
|
98
|
-
this.fCtrls.answer.disable()
|
|
99
|
-
} else {
|
|
100
|
-
this.fCtrls.answer.enable()
|
|
101
|
-
}
|
|
102
|
-
this.fCtrls.answer.updateValueAndValidity();
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Pipe, PipeTransform } from '@angular/core';
|
|
2
|
-
import { DefaultQuestionAnswerDto } from '../../shared/dtos/default-question-answers.dto';
|
|
3
|
-
import { QuestionTypeEnum } from '../../shared/enums/question-type.enum';
|
|
4
|
-
|
|
5
|
-
@Pipe({
|
|
6
|
-
name: 'defaultQuestionAnswer'
|
|
7
|
-
})
|
|
8
|
-
export class DefaultQuestionAnswerPipe implements PipeTransform {
|
|
9
|
-
|
|
10
|
-
transform(value: DefaultQuestionAnswerDto[], questionId: number , reloadId): DefaultQuestionAnswerDto {
|
|
11
|
-
if (value != null) {
|
|
12
|
-
return value.find(x => x.QuestionId == questionId);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
return null;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Pipe, PipeTransform } from '@angular/core';
|
|
2
|
-
import { DefaultQuestionAnswerDto } from '../../shared/dtos/default-question-answers.dto';
|
|
3
|
-
|
|
4
|
-
@Pipe({
|
|
5
|
-
name: 'defaultQuestionAnswers'
|
|
6
|
-
})
|
|
7
|
-
export class DefaultQuestionAnswersPipe implements PipeTransform {
|
|
8
|
-
|
|
9
|
-
transform(value: DefaultQuestionAnswerDto[], questionId: any , reloadId): DefaultQuestionAnswerDto[] {
|
|
10
|
-
if (value != null) {
|
|
11
|
-
return value.filter(x => x.ParentQuestionId == questionId);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
return [];
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Pipe, PipeTransform } from '@angular/core';
|
|
2
|
-
import { SurveyQuestionDto } from '../../shared/dtos/survey-question.dto';
|
|
3
|
-
import { QuestionChildOfSurveryLibFormInterface } from '../../shared/form-interfaces/survery-lib.form-interface';
|
|
4
|
-
|
|
5
|
-
@Pipe({
|
|
6
|
-
name: 'filterQuestion'
|
|
7
|
-
})
|
|
8
|
-
export class FilterQuestionPipe implements PipeTransform {
|
|
9
|
-
|
|
10
|
-
transform(value: SurveyQuestionDto, questionArr: QuestionChildOfSurveryLibFormInterface[]): QuestionChildOfSurveryLibFormInterface {
|
|
11
|
-
return questionArr.find(x=>x.questionId == value.questionId);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { SurveyLibService } from './survey-lib.service';
|
|
4
|
-
|
|
5
|
-
describe('SurveyLibService', () => {
|
|
6
|
-
let service: SurveyLibService;
|
|
7
|
-
|
|
8
|
-
beforeEach(() => {
|
|
9
|
-
TestBed.configureTestingModule({});
|
|
10
|
-
service = TestBed.inject(SurveyLibService);
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
it('should be created', () => {
|
|
14
|
-
expect(service).toBeTruthy();
|
|
15
|
-
});
|
|
16
|
-
});
|