survery-lib 2.1.3 → 2.1.5

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.
Files changed (27) hide show
  1. package/assets/style.css +398 -398
  2. package/esm2022/lib/components/question-boolean-template/question-boolean-template.component.mjs +11 -1
  3. package/esm2022/lib/components/question-cascade-template/question-cascade-template.component.mjs +5 -5
  4. package/esm2022/lib/components/question-check-box-template/question-check-box-template.component.mjs +10 -1
  5. package/esm2022/lib/components/question-dropdown-multi-template/question-dropdown-multi-template.component.mjs +10 -1
  6. package/esm2022/lib/components/question-dropdown-template/question-dropdown-template.component.mjs +13 -3
  7. package/esm2022/lib/components/question-feedback-template/question-feedback-template.component.mjs +10 -1
  8. package/esm2022/lib/components/question-matrix-template/question-matrix-template.component.mjs +13 -1
  9. package/esm2022/lib/components/question-radio-button-template/question-radio-button-template.component.mjs +12 -3
  10. package/esm2022/lib/components/question-text-template/question-text-template.component.mjs +10 -1
  11. package/esm2022/lib/core/states/survey-store/survey.effect.mjs +121 -0
  12. package/esm2022/lib/survery-lib.component.mjs +8 -5
  13. package/esm2022/lib/survery-lib.module.mjs +4 -3
  14. package/fesm2022/survery-lib.mjs +215 -17
  15. package/fesm2022/survery-lib.mjs.map +1 -1
  16. package/lib/components/question-boolean-template/question-boolean-template.component.d.ts +1 -0
  17. package/lib/components/question-cascade-template/question-cascade-template.component.d.ts +1 -1
  18. package/lib/components/question-check-box-template/question-check-box-template.component.d.ts +1 -0
  19. package/lib/components/question-dropdown-multi-template/question-dropdown-multi-template.component.d.ts +1 -0
  20. package/lib/components/question-dropdown-template/question-dropdown-template.component.d.ts +6 -2
  21. package/lib/components/question-feedback-template/question-feedback-template.component.d.ts +1 -0
  22. package/lib/components/question-matrix-template/question-matrix-template.component.d.ts +1 -0
  23. package/lib/components/question-radio-button-template/question-radio-button-template.component.d.ts +1 -0
  24. package/lib/components/question-text-template/question-text-template.component.d.ts +1 -0
  25. package/lib/core/states/survey-store/survey.effect.d.ts +13 -0
  26. package/lib/survery-lib.component.d.ts +4 -2
  27. package/package.json +3 -2
@@ -14,6 +14,7 @@ export declare class QuestionBooleanTemplateComponent implements OnInit {
14
14
  elemId: string;
15
15
  surveyQuestion: SurveyQuestionDto;
16
16
  rForm: FormGroup<QuestionBooleanTemplateFormInterface>;
17
+ questionArr: import("@angular/core").Signal<QuestionNgrxModel[]>;
17
18
  get fCtrls(): QuestionBooleanTemplateFormInterface;
18
19
  get questionTypeEnum(): typeof QuestionTypeEnum;
19
20
  set setQuestion(value: QuestionNgrxModel);
@@ -15,7 +15,7 @@ export declare class QuestionCascadeTemplateComponent {
15
15
  private _Store;
16
16
  surveyQuestionArr: SurveyQuestionDto[];
17
17
  rForm: FormGroup<QuestionCascadeTemplateFormInterface>;
18
- pageQuestions$: import("rxjs").Observable<QuestionNgrxModel[]>;
18
+ pageQuestions$: import("@angular/core").Signal<QuestionNgrxModel[]>;
19
19
  get fCtrls(): QuestionCascadeTemplateFormInterface;
20
20
  get questionTypeEnum(): typeof QuestionTypeEnum;
21
21
  get questionFormArray(): import("@angular/forms").FormArray<FormGroup<QuestionGroupChildOfQuestionCascadeTemplateFormInterface>>;
@@ -15,6 +15,7 @@ export declare class QuestionCheckBoxTemplateComponent implements OnInit {
15
15
  elemId: string;
16
16
  surveyQuestion: SurveyQuestionDto;
17
17
  rForm: FormGroup<QuestionCheckBoxTemplateFormInterface>;
18
+ questionArr: import("@angular/core").Signal<QuestionNgrxModel[]>;
18
19
  get fCtrls(): QuestionCheckBoxTemplateFormInterface;
19
20
  get questionTypeEnum(): typeof QuestionTypeEnum;
20
21
  set setQuestion(value: QuestionNgrxModel);
@@ -13,6 +13,7 @@ export declare class QuestionDropdownMultiTemplateComponent {
13
13
  elemId: string;
14
14
  surveyQuestion: SurveyQuestionDto;
15
15
  rForm: FormGroup<QuestionDropDownMultiTemplateFormInterface>;
16
+ questionArr: import("@angular/core").Signal<QuestionNgrxModel[]>;
16
17
  get fCtrls(): QuestionDropDownMultiTemplateFormInterface;
17
18
  get questionTypeEnum(): typeof QuestionTypeEnum;
18
19
  set setQuestion(value: QuestionNgrxModel);
@@ -1,4 +1,4 @@
1
- import { EventEmitter, OnInit } from '@angular/core';
1
+ import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
2
  import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
3
3
  import { SurveyQuestionDto } from '../../../shared/dtos/survey-question.dto';
4
4
  import { QuestionTypeEnum } from '../../../shared/enums/question-type.enum';
@@ -7,18 +7,22 @@ import { QuestionAnswerModel } from '../../../shared/models/question-answer.mode
7
7
  import { SurveyLibService } from '../../services/survey-lib.service';
8
8
  import { QuestionNgrxModel } from '../../core/states/entites/question.entity';
9
9
  import { Store } from '@ngrx/store';
10
+ import { SubSink } from 'subsink';
10
11
  import * as i0 from "@angular/core";
11
- export declare class QuestionDropdownTemplateComponent implements OnInit {
12
+ export declare class QuestionDropdownTemplateComponent implements OnInit, OnDestroy {
12
13
  private _formBuilder;
13
14
  private _surveyLibService;
14
15
  private _Store;
15
16
  surveyQuestion: SurveyQuestionDto;
16
17
  rForm: FormGroup<QuestionDropdownTemplateFormInterface>;
18
+ subs: SubSink;
19
+ questionArr: import("@angular/core").Signal<QuestionNgrxModel[]>;
17
20
  get fCtrls(): QuestionDropdownTemplateFormInterface;
18
21
  get questionTypeEnum(): typeof QuestionTypeEnum;
19
22
  emitter: EventEmitter<QuestionAnswerModel>;
20
23
  set setQuestion(value: QuestionNgrxModel);
21
24
  constructor(_formBuilder: FormBuilder, _surveyLibService: SurveyLibService, _Store: Store);
25
+ ngOnDestroy(): void;
22
26
  ngOnInit(): void;
23
27
  convertToFormControl(element: any): FormControl<any>;
24
28
  static ɵfac: i0.ɵɵFactoryDeclaration<QuestionDropdownTemplateComponent, never>;
@@ -13,6 +13,7 @@ export declare class QuestionFeedbackTemplateComponent {
13
13
  private _Store;
14
14
  surveyQuestion: SurveyQuestionDto;
15
15
  rForm: FormGroup<QuestionFeedbackTemplateFormInterface>;
16
+ questionArr: import("@angular/core").Signal<QuestionNgrxModel[]>;
16
17
  get fCtrls(): QuestionFeedbackTemplateFormInterface;
17
18
  get questionTypeEnum(): typeof QuestionTypeEnum;
18
19
  get inputTypeEnum(): typeof InputTypeEnum;
@@ -15,6 +15,7 @@ export declare class QuestionMatrixTemplateComponent implements OnInit {
15
15
  elemId: string;
16
16
  surveyQuestion: SurveyQuestionDto;
17
17
  rForm: FormGroup<QuestionMatrixTemplateFormInterface>;
18
+ questionArr: import("@angular/core").Signal<QuestionNgrxModel[]>;
18
19
  get fCtrls(): QuestionMatrixTemplateFormInterface;
19
20
  get questionTypeEnum(): typeof QuestionTypeEnum;
20
21
  set setQuestion(value: QuestionNgrxModel);
@@ -14,6 +14,7 @@ export declare class QuestionRadioButtonTemplateComponent implements OnInit {
14
14
  elemId: string;
15
15
  surveyQuestion: SurveyQuestionDto;
16
16
  rForm: FormGroup<QuestionRadioButtonTemplateFormInterface>;
17
+ questionArr: import("@angular/core").Signal<QuestionNgrxModel[]>;
17
18
  get fCtrls(): QuestionRadioButtonTemplateFormInterface;
18
19
  get questionTypeEnum(): typeof QuestionTypeEnum;
19
20
  set setQuestion(value: QuestionNgrxModel);
@@ -16,6 +16,7 @@ export declare class QuestionTextTemplateComponent implements OnInit {
16
16
  rForm: FormGroup<QuestionTextTemplateFormInterface>;
17
17
  customPatterns: null;
18
18
  isTextArea: boolean;
19
+ questionArr: import("@angular/core").Signal<QuestionNgrxModel[]>;
19
20
  get fCtrls(): QuestionTextTemplateFormInterface;
20
21
  get questionTypeEnum(): typeof QuestionTypeEnum;
21
22
  get inputTypeEnum(): typeof InputTypeEnum;
@@ -0,0 +1,13 @@
1
+ import { Actions } from "@ngrx/effects";
2
+ import { Store } from "@ngrx/store";
3
+ import { CheckRuleExpsUsecase } from "../../../usecases/check-rule-exps.usecase";
4
+ import * as i0 from "@angular/core";
5
+ export declare class SurveyEffects {
6
+ private _actions;
7
+ private _store;
8
+ private _checkRuleExpsUsecase;
9
+ constructor(_actions: Actions, _store: Store, _checkRuleExpsUsecase: CheckRuleExpsUsecase);
10
+ updateQuestionAnswer$: import("rxjs").Observable<any[]> & import("@ngrx/effects").CreateEffectMetadata;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<SurveyEffects, never>;
12
+ static ɵprov: i0.ɵɵInjectableDeclaration<SurveyEffects>;
13
+ }
@@ -8,6 +8,7 @@ import { SurveyQuestionResult } from '../shared/models/survery-question-result.m
8
8
  import { FormBuilder, FormGroup } from '@angular/forms';
9
9
  import { Store } from '@ngrx/store';
10
10
  import { QuestionNgrxModel } from './core/states/entites/question.entity';
11
+ import { QuestionGroupNgrxModel } from './core/states/entites/question-group.entity';
11
12
  import * as i0 from "@angular/core";
12
13
  export declare class SurveryLibComponent implements OnInit, AfterViewInit {
13
14
  private _surveyLibService;
@@ -18,8 +19,8 @@ export declare class SurveryLibComponent implements OnInit, AfterViewInit {
18
19
  reloadDefaultAnswerId: string;
19
20
  rForm: FormGroup<SurveryLibFormInterface>;
20
21
  questionAnswerArr: SurveyQuestionResult[];
21
- pageQuestionGroups$: Observable<import("./core/states/entites/question-group.entity").QuestionGroupNgrxModel[]>;
22
- pageQuestions$: Observable<QuestionNgrxModel[]>;
22
+ pageQuestionGroups$: import("@angular/core").Signal<QuestionGroupNgrxModel[]>;
23
+ pageQuestions$: import("@angular/core").Signal<QuestionNgrxModel[]>;
23
24
  isFirstPage$: Observable<boolean>;
24
25
  isLastPage$: Observable<boolean>;
25
26
  curruntShowedSurveyPages$: Observable<number>;
@@ -39,6 +40,7 @@ export declare class SurveryLibComponent implements OnInit, AfterViewInit {
39
40
  constructor(_surveyLibService: SurveyLibService, _Store: Store, _formBuilder: FormBuilder, _checkRuleExpsUsecase: CheckRuleExpsUsecase);
40
41
  ngAfterViewInit(): void;
41
42
  questionIdentify(index: any, item: QuestionNgrxModel): any;
43
+ questionGroupIdentify(index: any, item: QuestionGroupNgrxModel): number;
42
44
  ngOnInit(): void;
43
45
  onPaggingNext(): void;
44
46
  onPaggingBack(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "survery-lib",
3
- "version": "2.1.3",
3
+ "version": "2.1.5",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^16.1.0",
6
6
  "@angular/core": "^16.1.0"
@@ -9,7 +9,8 @@
9
9
  "tslib": "^2.3.0",
10
10
  "ngx-bootstrap": "^11.0.2",
11
11
  "uuid": "^8.3.2",
12
- "@ng-select/ng-select": "^11.2.0"
12
+ "@ng-select/ng-select": "^11.2.0",
13
+ "subsink": "^1.0.2"
13
14
  },
14
15
  "sideEffects": false,
15
16
  "module": "fesm2022/survery-lib.mjs",