survery-lib 2.1.49 → 2.1.51

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.
@@ -2,14 +2,14 @@ import { ElementRef, 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';
5
- import { SurveyLibService } from '../../services/survey-lib.service';
6
5
  import { QuestionNgrxModel } from '../../core/states/entites/question.entity';
7
6
  import { Store } from '@ngrx/store';
8
7
  import { QuestionFileTemplateFormInterface } from '../../../shared/form-interfaces/question-file-template.form-interface';
8
+ import { ApiService } from '../../services/api.service';
9
9
  import * as i0 from "@angular/core";
10
10
  export declare class QuestionFileTemplateComponent implements OnInit {
11
11
  private _formBuilder;
12
- private _surveyLibService;
12
+ private _apiService;
13
13
  private _Store;
14
14
  readonly MAX_FILE_SIZE: number;
15
15
  surveyQuestion: SurveyQuestionDto;
@@ -20,13 +20,14 @@ export declare class QuestionFileTemplateComponent implements OnInit {
20
20
  isArabicLang: boolean;
21
21
  set setQuestion(value: QuestionNgrxModel);
22
22
  fileInputRef: ElementRef<HTMLInputElement>;
23
- constructor(_formBuilder: FormBuilder, _surveyLibService: SurveyLibService, _Store: Store);
23
+ constructor(_formBuilder: FormBuilder, _apiService: ApiService, _Store: Store);
24
24
  ngOnInit(): void;
25
25
  convertToFormControl(element: any): FormControl<any>;
26
26
  onFileSelect(event: Event): void;
27
27
  openFileInNewTab(item: {
28
- file: string;
28
+ fileBase64: string;
29
29
  name: string;
30
+ id: string;
30
31
  }): void;
31
32
  onDeleteFile(index: number): void;
32
33
  static ɵfac: i0.ɵɵFactoryDeclaration<QuestionFileTemplateComponent, never>;
@@ -17,8 +17,9 @@ export interface QuestionNgrxModel {
17
17
  answerIdArr: any;
18
18
  answerText: any;
19
19
  answerFile: {
20
- file: string;
20
+ byteArr: string;
21
21
  name: string;
22
+ id: string;
22
23
  }[];
23
24
  answerLevelId?: number;
24
25
  isRequired: boolean;
@@ -33,6 +33,7 @@ export declare const surveyActions: {
33
33
  fileArr: {
34
34
  byteArr: string;
35
35
  name: string;
36
+ id: string;
36
37
  }[];
37
38
  isValid: boolean;
38
39
  }) => {
@@ -40,6 +41,7 @@ export declare const surveyActions: {
40
41
  fileArr: {
41
42
  byteArr: string;
42
43
  name: string;
44
+ id: string;
43
45
  }[];
44
46
  isValid: boolean;
45
47
  } & import("@ngrx/store/src/models").TypedAction<"[Survey library] Update Question Answer">>;
@@ -52,6 +52,10 @@ export declare class ApiService {
52
52
  sectionGeneratedKey: string;
53
53
  requestTimestamp: string;
54
54
  }): Observable<ResultDto<InstitutionProgramDto>>;
55
+ downloadFile(params: {
56
+ fileId: string;
57
+ fileName: string;
58
+ }): Observable<import("@angular/common/http").HttpResponse<Blob>>;
55
59
  static ɵfac: i0.ɵɵFactoryDeclaration<ApiService, never>;
56
60
  static ɵprov: i0.ɵɵInjectableDeclaration<ApiService>;
57
61
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "survery-lib",
3
- "version": "2.1.49",
3
+ "version": "2.1.51",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^16.1.0",
6
6
  "@angular/core": "^16.1.0"
@@ -7,10 +7,10 @@ export interface QuestionFileTemplateFormInterface {
7
7
  title: FormControl<string>;
8
8
  description: FormControl<string>;
9
9
  fileArr: FormControl<{
10
- file: string;
10
+ fileBase64: string;
11
11
  name: string;
12
12
  byteArr: string;
13
- fileRaw?: File | null;
13
+ id: string;
14
14
  }[] | null>;
15
15
  surveyAnswerId: FormControl<number>;
16
16
  isShow: FormControl<boolean>;
@@ -8,8 +8,9 @@ export declare class SurveyQuestionResult {
8
8
  AnswerText: any;
9
9
  AnswerLevelId: any;
10
10
  AnswerFile: {
11
- file: string;
11
+ byteArr: string;
12
12
  name: string;
13
+ id: string;
13
14
  }[];
14
15
  PassedRuleQuestionId?: any;
15
16
  }