survery-lib 0.1.0 → 0.1.2

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 (25) hide show
  1. package/esm2022/lib/components/question-boolean-template/question-boolean-template.component.mjs +7 -16
  2. package/esm2022/lib/components/question-check-box-template/question-check-box-template.component.mjs +7 -17
  3. package/esm2022/lib/components/question-dropdown-template/question-dropdown-template.component.mjs +8 -17
  4. package/esm2022/lib/components/question-radio-button-template/question-radio-button-template.component.mjs +7 -16
  5. package/esm2022/lib/components/question-text-template/question-text-template.component.mjs +14 -18
  6. package/esm2022/lib/survery-lib.component.mjs +27 -11
  7. package/esm2022/public-api.mjs +2 -1
  8. package/esm2022/shared/form-interfaces/question-text-template.form-interface.mjs +1 -1
  9. package/esm2022/shared/models/question-answer.model.mjs +1 -1
  10. package/esm2022/shared/models/survery-question-result.model.mjs +3 -0
  11. package/fesm2022/survery-lib.mjs +65 -100
  12. package/fesm2022/survery-lib.mjs.map +1 -1
  13. package/lib/components/question-boolean-template/question-boolean-template.component.d.ts +1 -3
  14. package/lib/components/question-check-box-template/question-check-box-template.component.d.ts +1 -3
  15. package/lib/components/question-dropdown-template/question-dropdown-template.component.d.ts +1 -3
  16. package/lib/components/question-radio-button-template/question-radio-button-template.component.d.ts +1 -3
  17. package/lib/components/question-text-template/question-text-template.component.d.ts +2 -3
  18. package/lib/survery-lib.component.d.ts +4 -3
  19. package/package.json +1 -1
  20. package/public-api.d.ts +1 -0
  21. package/shared/form-interfaces/question-text-template.form-interface.d.ts +1 -0
  22. package/shared/models/question-answer.model.d.ts +1 -0
  23. package/shared/models/survery-question-result.model.d.ts +7 -0
  24. package/esm2022/lib/services/shared-data.service.mjs +0 -23
  25. package/lib/services/shared-data.service.d.ts +0 -9
@@ -5,8 +5,8 @@ import { FormBuilder, FormGroup } from '@ng-stack/forms';
5
5
  import { QuestionChildOfSurveryLibFormInterface, RuleQuestionChildOfSurveryLibFormInterface, SurveryLibFormInterface } from '../shared/form-interfaces/survery-lib.form-interface';
6
6
  import { QuestionTypeEnum } from '../shared/enums/question-type.enum';
7
7
  import { QuestionAnswerModel } from '../shared/models/question-answer.model';
8
- import { Observable } from 'rxjs';
9
8
  import { CheckRuleExpsUsecase } from './usecases/check-rule-exps.usecase';
9
+ import { SurveyQuestionResult } from '../shared/models/survery-question-result.model';
10
10
  import * as i0 from "@angular/core";
11
11
  export declare class SurveryLibComponent implements OnInit {
12
12
  private _surveyLibService;
@@ -21,10 +21,11 @@ export declare class SurveryLibComponent implements OnInit {
21
21
  };
22
22
  get questionTypeEnum(): typeof QuestionTypeEnum;
23
23
  get isLastPage(): boolean;
24
- surveyResultEmit: EventEmitter<QuestionChildOfSurveryLibFormInterface[]>;
24
+ surveyResultEmit: EventEmitter<SurveyQuestionResult[]>;
25
25
  constructor(_surveyLibService: SurveyLibService, _formBuilder: FormBuilder, _checkRuleExpsUsecase: CheckRuleExpsUsecase);
26
26
  ngOnInit(): void;
27
- onPaggingNext(): Observable<QuestionChildOfSurveryLibFormInterface[]>;
27
+ onPaggingNext(): void;
28
+ onPaggingChange(index: any): void;
28
29
  onPaggingBack(): void;
29
30
  onUpdateAnswers(model: QuestionAnswerModel[]): void;
30
31
  onUpdateAnswer(model: QuestionAnswerModel): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "survery-lib",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^16.1.0",
6
6
  "@angular/core": "^16.1.0"
package/public-api.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from './lib/survery-lib.component';
2
2
  export * from './lib/services/survey-lib.service';
3
3
  export * from './lib/survery-lib.module';
4
+ export * from './shared/models/survery-question-result.model';
@@ -6,4 +6,5 @@ export interface QuestionTextTemplateFormInterface {
6
6
  title: any;
7
7
  description: any;
8
8
  answer: any;
9
+ surveyAnswerId: any;
9
10
  }
@@ -2,4 +2,5 @@ export declare class QuestionAnswerModel {
2
2
  QuestionId: any;
3
3
  Answer: any;
4
4
  IsValid: any;
5
+ SurveyAnswerId?: any;
5
6
  }
@@ -0,0 +1,7 @@
1
+ export declare class SurveyQuestionResult {
2
+ SurveyPageIndex: number;
3
+ QuestionId: any;
4
+ AnswerId: any;
5
+ AnswerIdArr: any;
6
+ AnswerText: any;
7
+ }
@@ -1,23 +0,0 @@
1
- import { Injectable } from '@angular/core';
2
- import { BehaviorSubject } from 'rxjs';
3
- import * as i0 from "@angular/core";
4
- export class SharedDataService {
5
- get submitIdObsrv() {
6
- return this.submitIdSubject.asObservable();
7
- }
8
- constructor() {
9
- this.submitIdSubject = new BehaviorSubject(null);
10
- }
11
- setSubmitId(submitId) {
12
- this.submitIdSubject.next(submitId);
13
- }
14
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SharedDataService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
15
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SharedDataService, providedIn: 'root' }); }
16
- }
17
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SharedDataService, decorators: [{
18
- type: Injectable,
19
- args: [{
20
- providedIn: 'root'
21
- }]
22
- }], ctorParameters: function () { return []; } });
23
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2hhcmVkLWRhdGEuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3N1cnZlcnktbGliL3NyYy9saWIvc2VydmljZXMvc2hhcmVkLWRhdGEuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzNDLE9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dWJtaXRJZFN1YmplY3QubmV4dChzdWJtaXRJZCk7XG4gIH1cbn1cbiJdfQ==
@@ -1,9 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class SharedDataService {
3
- private submitIdSubject;
4
- get submitIdObsrv(): import("rxjs").Observable<string>;
5
- constructor();
6
- setSubmitId(submitId: string): void;
7
- static ɵfac: i0.ɵɵFactoryDeclaration<SharedDataService, never>;
8
- static ɵprov: i0.ɵɵInjectableDeclaration<SharedDataService>;
9
- }