survery-lib 0.1.19 → 0.1.21
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 +11 -0
- package/assets/style.css.map +1 -1
- package/esm2022/lib/components/question-dropdown-multi-template/question-dropdown-multi-template.component.mjs +3 -3
- package/esm2022/lib/components/question-dropdown-template/question-dropdown-template.component.mjs +3 -3
- package/esm2022/lib/services/survey-lib.service.mjs +9 -1
- package/esm2022/lib/survery-lib.component.mjs +44 -21
- package/esm2022/shared/dtos/survey-language.dto.mjs +3 -0
- package/esm2022/shared/enums/survey-section.enum.mjs +6 -0
- package/esm2022/shared/form-interfaces/survery-lib.form-interface.mjs +1 -1
- package/fesm2022/survery-lib.mjs +51 -18
- package/fesm2022/survery-lib.mjs.map +1 -1
- package/lib/services/survey-lib.service.d.ts +4 -0
- package/lib/survery-lib.component.d.ts +11 -4
- package/package.json +1 -1
- package/shared/dtos/survey-language.dto.d.ts +7 -0
- package/shared/enums/survey-section.enum.d.ts +4 -0
- package/shared/form-interfaces/survery-lib.form-interface.d.ts +1 -0
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { SurveyDto } from '../../shared/dtos/survey.dto';
|
|
2
2
|
import { surveyAnswersSubjectDto } from '../../shared/dtos/survey-answers-subject.dto';
|
|
3
|
+
import { SurveyLanguageDto } from '../../shared/dtos/survey-language.dto';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class SurveyLibService {
|
|
5
6
|
private surveyDataSubject;
|
|
6
7
|
private surveyAnswersSubject;
|
|
8
|
+
private surveyLanguagesSubject;
|
|
7
9
|
get surveyDataObsrv(): import("rxjs").Observable<SurveyDto>;
|
|
8
10
|
get surveyAnswersObsrv(): import("rxjs").Observable<surveyAnswersSubjectDto>;
|
|
11
|
+
get surveyLanguagesObsrv(): import("rxjs").Observable<SurveyLanguageDto[]>;
|
|
9
12
|
constructor();
|
|
10
13
|
setSurveyData(survey: SurveyDto): void;
|
|
11
14
|
setsurveyAnswers(model: surveyAnswersSubjectDto): void;
|
|
15
|
+
setSurveyLanguages(arr: SurveyLanguageDto[]): void;
|
|
12
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<SurveyLibService, never>;
|
|
13
17
|
static ɵprov: i0.ɵɵInjectableDeclaration<SurveyLibService>;
|
|
14
18
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventEmitter, OnInit } from '@angular/core';
|
|
1
|
+
import { AfterViewInit, EventEmitter, OnInit } from '@angular/core';
|
|
2
2
|
import { SurveyLibService } from './services/survey-lib.service';
|
|
3
3
|
import { SurveyDto } from '../shared/dtos/survey.dto';
|
|
4
4
|
import { FormBuilder, FormGroup } from '@ng-stack/forms';
|
|
@@ -8,8 +8,10 @@ import { QuestionAnswerModel } from '../shared/models/question-answer.model';
|
|
|
8
8
|
import { CheckRuleExpsUsecase } from './usecases/check-rule-exps.usecase';
|
|
9
9
|
import { SurveyQuestionResult } from '../shared/models/survery-question-result.model';
|
|
10
10
|
import { DefaultQuestionAnswerDto } from '../shared/dtos/default-question-answers.dto';
|
|
11
|
+
import { SurveyLanguageDto } from '../shared/dtos/survey-language.dto';
|
|
12
|
+
import { SurveySectionEnum } from '../shared/enums/survey-section.enum';
|
|
11
13
|
import * as i0 from "@angular/core";
|
|
12
|
-
export declare class SurveryLibComponent implements OnInit {
|
|
14
|
+
export declare class SurveryLibComponent implements OnInit, AfterViewInit {
|
|
13
15
|
private _surveyLibService;
|
|
14
16
|
private _formBuilder;
|
|
15
17
|
private _checkRuleExpsUsecase;
|
|
@@ -17,12 +19,16 @@ export declare class SurveryLibComponent implements OnInit {
|
|
|
17
19
|
surveyData: SurveyDto;
|
|
18
20
|
defaultAnswers: DefaultQuestionAnswerDto[];
|
|
19
21
|
rForm: FormGroup<SurveryLibFormInterface>;
|
|
22
|
+
surveyLangugeArr: SurveyLanguageDto[];
|
|
23
|
+
selectedSection: SurveySectionEnum;
|
|
20
24
|
get fCtrls(): {
|
|
21
25
|
currentPageIndex: import("@ng-stack/forms").FormControl<number, import("@ng-stack/forms").ValidatorsModel>;
|
|
26
|
+
selectedLanguageId: import("@ng-stack/forms").FormControl<number, import("@ng-stack/forms").ValidatorsModel>;
|
|
22
27
|
questionArray: import("@ng-stack/forms").FormArray<QuestionChildOfSurveryLibFormInterface, import("@ng-stack/forms").ValidatorsModel>;
|
|
23
28
|
ruleQuestionArray: import("@ng-stack/forms").FormArray<RuleQuestionChildOfSurveryLibFormInterface, import("@ng-stack/forms").ValidatorsModel>;
|
|
24
29
|
};
|
|
25
30
|
get questionTypeEnum(): typeof QuestionTypeEnum;
|
|
31
|
+
get surveySectionEnum(): typeof SurveySectionEnum;
|
|
26
32
|
get isFirstPage(): boolean;
|
|
27
33
|
get isLastPage(): boolean;
|
|
28
34
|
get showedSurveyPages(): number[];
|
|
@@ -32,10 +38,11 @@ export declare class SurveryLibComponent implements OnInit {
|
|
|
32
38
|
currentPageIndex: number;
|
|
33
39
|
};
|
|
34
40
|
surveyResultEmit: EventEmitter<SurveyQuestionResult[]>;
|
|
41
|
+
selectLanguageEmit: EventEmitter<string>;
|
|
35
42
|
constructor(_surveyLibService: SurveyLibService, _formBuilder: FormBuilder, _checkRuleExpsUsecase: CheckRuleExpsUsecase);
|
|
43
|
+
ngAfterViewInit(): void;
|
|
36
44
|
ngOnInit(): void;
|
|
37
45
|
onPaggingNext(): void;
|
|
38
|
-
onPaggingChange(index: any): void;
|
|
39
46
|
onPaggingBack(): void;
|
|
40
47
|
onUpdateAnswers(model: QuestionAnswerModel[]): void;
|
|
41
48
|
onUpdateAnswer(model: QuestionAnswerModel): void;
|
|
@@ -45,5 +52,5 @@ export declare class SurveryLibComponent implements OnInit {
|
|
|
45
52
|
private getNextShowedPage;
|
|
46
53
|
private getPrevShowedPage;
|
|
47
54
|
static ɵfac: i0.ɵɵFactoryDeclaration<SurveryLibComponent, never>;
|
|
48
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SurveryLibComponent, "lib-survery-lib", never, {}, { "surveyResultEmit": "surveyResultEmit"; }, never, never, false, never>;
|
|
55
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SurveryLibComponent, "lib-survery-lib", never, {}, { "surveyResultEmit": "surveyResultEmit"; "selectLanguageEmit": "selectLanguageEmit"; }, never, never, false, never>;
|
|
49
56
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { QuestionTypeEnum } from "../enums/question-type.enum";
|
|
2
2
|
export interface SurveryLibFormInterface {
|
|
3
3
|
currentPageIndex: number;
|
|
4
|
+
selectedLanguageId: number;
|
|
4
5
|
questionArray: QuestionChildOfSurveryLibFormInterface[];
|
|
5
6
|
ruleQuestionArray: RuleQuestionChildOfSurveryLibFormInterface[];
|
|
6
7
|
}
|