survery-lib 2.1.2 → 2.1.4

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 (29) hide show
  1. package/esm2022/lib/components/question-boolean-template/question-boolean-template.component.mjs +7 -1
  2. package/esm2022/lib/components/question-cascade-template/question-cascade-template.component.mjs +4 -5
  3. package/esm2022/lib/components/question-check-box-template/question-check-box-template.component.mjs +6 -1
  4. package/esm2022/lib/components/question-dropdown-multi-template/question-dropdown-multi-template.component.mjs +6 -1
  5. package/esm2022/lib/components/question-dropdown-template/question-dropdown-template.component.mjs +13 -3
  6. package/esm2022/lib/components/question-feedback-template/question-feedback-template.component.mjs +6 -1
  7. package/esm2022/lib/components/question-matrix-template/question-matrix-template.component.mjs +6 -1
  8. package/esm2022/lib/components/question-radio-button-template/question-radio-button-template.component.mjs +7 -1
  9. package/esm2022/lib/components/question-text-template/question-text-template.component.mjs +10 -4
  10. package/esm2022/lib/core/states/survey-store/survey.effect.mjs +121 -0
  11. package/esm2022/lib/directives/masked-for-max-length.directive.mjs +35 -0
  12. package/esm2022/lib/survery-lib.component.mjs +8 -5
  13. package/esm2022/lib/survery-lib.module.mjs +9 -5
  14. package/fesm2022/survery-lib.mjs +221 -19
  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/directives/masked-for-max-length.directive.d.ts +6 -0
  27. package/lib/survery-lib.component.d.ts +4 -2
  28. package/lib/survery-lib.module.d.ts +10 -9
  29. 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
+ }
@@ -0,0 +1,6 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class MaskedForMaxLengthDirective {
3
+ onKeyUp(event: KeyboardEvent): void;
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<MaskedForMaxLengthDirective, never>;
5
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MaskedForMaxLengthDirective, "[libMaskedForMaxLength]", never, {}, {}, never, never, false, never>;
6
+ }
@@ -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;
@@ -17,18 +17,19 @@ import * as i13 from "./components/question-cascade-template/question-cascade-te
17
17
  import * as i14 from "./directives/masked-for-min-max.directive";
18
18
  import * as i15 from "./pipes/find-question.pipe";
19
19
  import * as i16 from "./components/question-feedback-template/question-feedback-template.component";
20
- import * as i17 from "@angular/common";
21
- import * as i18 from "@angular/common/http";
22
- import * as i19 from "@angular/forms";
23
- import * as i20 from "@ng-select/ng-select";
24
- import * as i21 from "@ngrx/store";
25
- import * as i22 from "@ngrx/effects";
26
- import * as i23 from "ngx-bootstrap/rating";
27
- import * as i24 from "ngx-bootstrap/pagination";
20
+ import * as i17 from "./directives/masked-for-max-length.directive";
21
+ import * as i18 from "@angular/common";
22
+ import * as i19 from "@angular/common/http";
23
+ import * as i20 from "@angular/forms";
24
+ import * as i21 from "@ng-select/ng-select";
25
+ import * as i22 from "@ngrx/store";
26
+ import * as i23 from "@ngrx/effects";
27
+ import * as i24 from "ngx-bootstrap/rating";
28
+ import * as i25 from "ngx-bootstrap/pagination";
28
29
  export declare class SurveryLibModule {
29
30
  static forRoot(config: LibConfigModel): ModuleWithProviders<SurveryLibModule>;
30
31
  static forChild(): ModuleWithProviders<SurveryLibModule>;
31
32
  static ɵfac: i0.ɵɵFactoryDeclaration<SurveryLibModule, never>;
32
- static ɵmod: i0.ɵɵNgModuleDeclaration<SurveryLibModule, [typeof i1.SurveryLibComponent, typeof i2.QuestionTextTemplateComponent, typeof i3.QuestionRadioButtonTemplateComponent, typeof i4.QuestionCheckBoxTemplateComponent, typeof i5.QuestionDropdownTemplateComponent, typeof i6.QuestionMatrixTemplateComponent, typeof i7.QuestionBooleanTemplateComponent, typeof i8.QuestionDropdownMultiTemplateComponent, typeof i9.FilterQuestionPipe, typeof i10.DefaultQuestionAnswerPipe, typeof i11.DefaultQuestionAnswersPipe, typeof i12.TextBoxTypeAttrPipe, typeof i13.QuestionCascadeTemplateComponent, typeof i14.MaskedForMinMaxDirective, typeof i15.FindQuestionPipe, typeof i16.QuestionFeedbackTemplateComponent], [typeof i17.CommonModule, typeof i18.HttpClientModule, typeof i19.ReactiveFormsModule, typeof i19.FormsModule, typeof i20.NgSelectModule, typeof i21.StoreFeatureModule, typeof i22.EffectsFeatureModule, typeof i23.RatingModule, typeof i24.PaginationModule], [typeof i1.SurveryLibComponent, typeof i21.StoreModule]>;
33
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SurveryLibModule, [typeof i1.SurveryLibComponent, typeof i2.QuestionTextTemplateComponent, typeof i3.QuestionRadioButtonTemplateComponent, typeof i4.QuestionCheckBoxTemplateComponent, typeof i5.QuestionDropdownTemplateComponent, typeof i6.QuestionMatrixTemplateComponent, typeof i7.QuestionBooleanTemplateComponent, typeof i8.QuestionDropdownMultiTemplateComponent, typeof i9.FilterQuestionPipe, typeof i10.DefaultQuestionAnswerPipe, typeof i11.DefaultQuestionAnswersPipe, typeof i12.TextBoxTypeAttrPipe, typeof i13.QuestionCascadeTemplateComponent, typeof i14.MaskedForMinMaxDirective, typeof i15.FindQuestionPipe, typeof i16.QuestionFeedbackTemplateComponent, typeof i17.MaskedForMaxLengthDirective], [typeof i18.CommonModule, typeof i19.HttpClientModule, typeof i20.ReactiveFormsModule, typeof i20.FormsModule, typeof i21.NgSelectModule, typeof i22.StoreFeatureModule, typeof i23.EffectsFeatureModule, typeof i24.RatingModule, typeof i25.PaginationModule], [typeof i1.SurveryLibComponent, typeof i22.StoreModule]>;
33
34
  static ɵinj: i0.ɵɵInjectorDeclaration<SurveryLibModule>;
34
35
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "survery-lib",
3
- "version": "2.1.2",
3
+ "version": "2.1.4",
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",