survery-lib 0.2.1 → 2.1.0

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 (55) hide show
  1. package/esm2022/lib/components/question-boolean-template/question-boolean-template.component.mjs +17 -17
  2. package/esm2022/lib/components/question-cascade-template/question-cascade-template.component.mjs +9 -9
  3. package/esm2022/lib/components/question-check-box-template/question-check-box-template.component.mjs +18 -18
  4. package/esm2022/lib/components/question-dropdown-multi-template/question-dropdown-multi-template.component.mjs +16 -17
  5. package/esm2022/lib/components/question-dropdown-template/question-dropdown-template.component.mjs +13 -14
  6. package/esm2022/lib/components/question-feedback-template/question-feedback-template.component.mjs +129 -0
  7. package/esm2022/lib/components/question-matrix-template/question-matrix-template.component.mjs +13 -14
  8. package/esm2022/lib/components/question-radio-button-template/question-radio-button-template.component.mjs +17 -17
  9. package/esm2022/lib/components/question-text-template/question-text-template.component.mjs +18 -19
  10. package/esm2022/lib/pipes/find-question.pipe.mjs +1 -1
  11. package/esm2022/lib/services/survey-lib.service.mjs +68 -46
  12. package/esm2022/lib/survery-lib.component.mjs +10 -5
  13. package/esm2022/lib/survery-lib.module.mjs +12 -8
  14. package/esm2022/lib/usecases/check-rule-exps.usecase.mjs +3 -3
  15. package/esm2022/shared/dtos/survey-answer.dto.mjs +1 -1
  16. package/esm2022/shared/enums/evaluation-type.enum.mjs +6 -0
  17. package/esm2022/shared/enums/input-type.enum.mjs +3 -1
  18. package/esm2022/shared/enums/question-type.enum.mjs +2 -1
  19. package/esm2022/shared/form-interfaces/question-boolean-template.form-interface.mjs +1 -1
  20. package/esm2022/shared/form-interfaces/question-cascade.form-interface.mjs +1 -1
  21. package/esm2022/shared/form-interfaces/question-check-box-template.form-interface.mjs +1 -1
  22. package/esm2022/shared/form-interfaces/question-dropdown-multi-template.form-interface.mjs +1 -1
  23. package/esm2022/shared/form-interfaces/question-dropdown-template.form-interface.mjs +1 -1
  24. package/esm2022/shared/form-interfaces/question-feedback-template.form-interface.mjs +2 -0
  25. package/esm2022/shared/form-interfaces/question-matrix-template.form-interface.mjs +1 -1
  26. package/esm2022/shared/form-interfaces/question-radio-button-template.form-interface.mjs +1 -1
  27. package/esm2022/shared/form-interfaces/question-text-template.form-interface.mjs +1 -1
  28. package/fesm2022/survery-lib.mjs +306 -157
  29. package/fesm2022/survery-lib.mjs.map +1 -1
  30. package/lib/components/question-boolean-template/question-boolean-template.component.d.ts +3 -14
  31. package/lib/components/question-cascade-template/question-cascade-template.component.d.ts +4 -6
  32. package/lib/components/question-check-box-template/question-check-box-template.component.d.ts +4 -15
  33. package/lib/components/question-dropdown-multi-template/question-dropdown-multi-template.component.d.ts +3 -14
  34. package/lib/components/question-dropdown-template/question-dropdown-template.component.d.ts +2 -12
  35. package/lib/components/question-feedback-template/question-feedback-template.component.d.ts +27 -0
  36. package/lib/components/question-matrix-template/question-matrix-template.component.d.ts +3 -10
  37. package/lib/components/question-radio-button-template/question-radio-button-template.component.d.ts +3 -14
  38. package/lib/components/question-text-template/question-text-template.component.d.ts +2 -17
  39. package/lib/services/survey-lib.service.d.ts +4 -1
  40. package/lib/survery-lib.component.d.ts +1 -0
  41. package/lib/survery-lib.module.d.ts +7 -5
  42. package/package.json +2 -2
  43. package/shared/dtos/survey-answer.dto.d.ts +3 -0
  44. package/shared/enums/evaluation-type.enum.d.ts +4 -0
  45. package/shared/enums/input-type.enum.d.ts +3 -1
  46. package/shared/enums/question-type.enum.d.ts +2 -1
  47. package/shared/form-interfaces/question-boolean-template.form-interface.d.ts +13 -12
  48. package/shared/form-interfaces/question-cascade.form-interface.d.ts +5 -4
  49. package/shared/form-interfaces/question-check-box-template.form-interface.d.ts +13 -12
  50. package/shared/form-interfaces/question-dropdown-multi-template.form-interface.d.ts +13 -12
  51. package/shared/form-interfaces/question-dropdown-template.form-interface.d.ts +9 -8
  52. package/shared/form-interfaces/question-feedback-template.form-interface.d.ts +15 -0
  53. package/shared/form-interfaces/question-matrix-template.form-interface.d.ts +9 -8
  54. package/shared/form-interfaces/question-radio-button-template.form-interface.d.ts +13 -12
  55. package/shared/form-interfaces/question-text-template.form-interface.d.ts +13 -12
@@ -1,20 +1,22 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Injectable, Directive, HostListener, Pipe, Component, Input, EventEmitter, Output, InjectionToken, Inject, NgModule } from '@angular/core';
3
3
  import { v4 } from 'uuid';
4
- import { of, debounceTime, distinctUntilChanged, map, filter, pairwise, take } from 'rxjs';
5
- import * as i5 from '@angular/forms';
4
+ import { Subject, of, debounceTime, distinctUntilChanged, map, filter, pairwise, take } from 'rxjs';
5
+ import * as i1 from '@angular/forms';
6
6
  import { Validators, FormControl, ReactiveFormsModule, FormsModule } from '@angular/forms';
7
7
  import * as i3 from '@ngrx/store';
8
8
  import { createFeatureSelector, createSelector, createAction, props, createReducer, on, StoreModule } from '@ngrx/store';
9
9
  import { createEntityAdapter } from '@ngrx/entity';
10
10
  import * as i4 from '@angular/common';
11
11
  import { CommonModule } from '@angular/common';
12
- import * as i1 from '@ng-stack/forms';
13
- import { Validators as Validators$1, NgsFormsModule } from '@ng-stack/forms';
14
- import * as i6 from '@ng-select/ng-select';
12
+ import * as i5 from '@ng-select/ng-select';
15
13
  import { NgSelectModule } from '@ng-select/ng-select';
16
14
  import * as i1$1 from '@angular/common/http';
17
15
  import { HttpHeaders, HttpClientModule } from '@angular/common/http';
16
+ import * as i5$1 from 'ngx-bootstrap/rating';
17
+ import { RatingModule } from 'ngx-bootstrap/rating';
18
+ import * as i6 from 'ngx-bootstrap/pagination';
19
+ import { PaginationModule } from 'ngx-bootstrap/pagination';
18
20
  import * as i2 from '@ngrx/effects';
19
21
  import { EffectsModule } from '@ngrx/effects';
20
22
 
@@ -28,6 +30,7 @@ var QuestionTypeEnum;
28
30
  QuestionTypeEnum[QuestionTypeEnum["Matrix"] = 6] = "Matrix";
29
31
  QuestionTypeEnum[QuestionTypeEnum["DropDownMulti"] = 7] = "DropDownMulti";
30
32
  QuestionTypeEnum[QuestionTypeEnum["Cascade"] = 8] = "Cascade";
33
+ QuestionTypeEnum[QuestionTypeEnum["FeedBack"] = 9] = "FeedBack";
31
34
  })(QuestionTypeEnum || (QuestionTypeEnum = {}));
32
35
 
33
36
  var InputTypeEnum;
@@ -40,6 +43,8 @@ var InputTypeEnum;
40
43
  InputTypeEnum[InputTypeEnum["Password"] = 6] = "Password";
41
44
  InputTypeEnum[InputTypeEnum["Text"] = 7] = "Text";
42
45
  InputTypeEnum[InputTypeEnum["Phone"] = 8] = "Phone";
46
+ InputTypeEnum[InputTypeEnum["Stars"] = 20] = "Stars";
47
+ InputTypeEnum[InputTypeEnum["Pagination"] = 21] = "Pagination";
43
48
  })(InputTypeEnum || (InputTypeEnum = {}));
44
49
 
45
50
  function selectQuestionId(a) {
@@ -137,9 +142,19 @@ const surveyActions = {
137
142
  updatePageId,
138
143
  };
139
144
 
145
+ var EvaluationTypeEnum;
146
+ (function (EvaluationTypeEnum) {
147
+ EvaluationTypeEnum[EvaluationTypeEnum["Stars"] = 1] = "Stars";
148
+ EvaluationTypeEnum[EvaluationTypeEnum["Pagination"] = 2] = "Pagination";
149
+ })(EvaluationTypeEnum || (EvaluationTypeEnum = {}));
150
+
140
151
  class SurveyLibService {
152
+ get reloadSurveyObsrv() {
153
+ return this.reloadSurveySubject.asObservable();
154
+ }
141
155
  constructor(_Store) {
142
156
  this._Store = _Store;
157
+ this.reloadSurveySubject = new Subject();
143
158
  }
144
159
  setSurveyData(survey) {
145
160
  var questionArr = [];
@@ -166,26 +181,66 @@ class SurveyLibService {
166
181
  selectedPageId: Math.min(...pageIdArr)
167
182
  }));
168
183
  }
184
+ setsurveyAnswers(model) {
185
+ model.defaultAnswers.forEach(answer => {
186
+ if (answer.QuestionType == QuestionTypeEnum.TextInput ||
187
+ answer.QuestionType == QuestionTypeEnum.FeedBack) {
188
+ this._Store.dispatch(surveyActions.updateQuestionAnswer({
189
+ questionId: answer.QuestionId,
190
+ answer: answer.AnswerText,
191
+ isValid: true
192
+ }));
193
+ }
194
+ else if (answer.QuestionType == QuestionTypeEnum.CheckBox
195
+ || answer.QuestionType == QuestionTypeEnum.DropDownMulti) {
196
+ this._Store.dispatch(surveyActions.updateQuestionAnswer({
197
+ questionId: answer.QuestionId,
198
+ answer: answer.AnswerIdArr,
199
+ isValid: true
200
+ }));
201
+ }
202
+ else {
203
+ this._Store.dispatch(surveyActions.updateQuestionAnswer({
204
+ questionId: answer.QuestionId,
205
+ answer: answer.AnswerId,
206
+ isValid: true
207
+ }));
208
+ }
209
+ });
210
+ }
211
+ setReloadSurvey() {
212
+ this.reloadSurveySubject.next(v4());
213
+ }
169
214
  addQuestion(question, pageIndex, questionGroupId) {
170
- var questionArr = [{
171
- surveyPageId: pageIndex,
172
- questionId: question.questionId,
173
- questionType: question.questionTypeId,
174
- inputTypeId: question.surveyAnswers[0].inputTypeId,
175
- isMatrixGroup: question.questionTypeId == QuestionTypeEnum.Matrix,
176
- answerId: null,
177
- answerIdArr: null,
178
- answerText: null,
179
- isRequired: question.isRequired,
180
- isValid: null,
181
- isDisabled: question.isReadOnly,
182
- isShow: question.isVisable,
183
- isDisabled_default: question.isReadOnly,
184
- isShow_default: question.isVisable,
185
- questionGroupId: questionGroupId,
186
- parentQuestionId: null,
187
- questionAllInfo: question
188
- }];
215
+ var questionArr = [];
216
+ var questionNgrxModel = {
217
+ surveyPageId: pageIndex,
218
+ questionId: question.questionId,
219
+ questionType: question.questionTypeId,
220
+ inputTypeId: question.surveyAnswers[0].inputTypeId,
221
+ isMatrixGroup: question.questionTypeId == QuestionTypeEnum.Matrix,
222
+ answerId: null,
223
+ answerIdArr: null,
224
+ answerText: null,
225
+ isRequired: question.isRequired,
226
+ isValid: null,
227
+ isDisabled: question.isReadOnly,
228
+ isShow: question.isVisable,
229
+ isDisabled_default: question.isReadOnly,
230
+ isShow_default: question.isVisable,
231
+ questionGroupId: questionGroupId,
232
+ parentQuestionId: null,
233
+ questionAllInfo: question
234
+ };
235
+ if (question.questionTypeId == QuestionTypeEnum.FeedBack) {
236
+ if (question.surveyAnswers[0].evaluationTypeId == EvaluationTypeEnum.Stars) {
237
+ questionNgrxModel.inputTypeId = InputTypeEnum.Stars;
238
+ }
239
+ else if (question.surveyAnswers[0].evaluationTypeId == EvaluationTypeEnum.Pagination) {
240
+ questionNgrxModel.inputTypeId = InputTypeEnum.Pagination;
241
+ }
242
+ }
243
+ questionArr.push(questionNgrxModel);
189
244
  if (question.questionTypeId == QuestionTypeEnum.Matrix) {
190
245
  question.surveySubQuestions.forEach(subQuestion => {
191
246
  questionArr.push({
@@ -211,32 +266,6 @@ class SurveyLibService {
211
266
  }
212
267
  return questionArr;
213
268
  }
214
- setsurveyAnswers(model) {
215
- model.defaultAnswers.forEach(answer => {
216
- if (answer.QuestionType == QuestionTypeEnum.TextInput) {
217
- this._Store.dispatch(surveyActions.updateQuestionAnswer({
218
- questionId: answer.QuestionId,
219
- answer: answer.AnswerText,
220
- isValid: true
221
- }));
222
- }
223
- else if (answer.QuestionType == QuestionTypeEnum.CheckBox
224
- || answer.QuestionType == QuestionTypeEnum.DropDownMulti) {
225
- this._Store.dispatch(surveyActions.updateQuestionAnswer({
226
- questionId: answer.QuestionId,
227
- answer: answer.AnswerIdArr,
228
- isValid: true
229
- }));
230
- }
231
- else {
232
- this._Store.dispatch(surveyActions.updateQuestionAnswer({
233
- questionId: answer.QuestionId,
234
- answer: answer.AnswerId,
235
- isValid: true
236
- }));
237
- }
238
- });
239
- }
240
269
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SurveyLibService, deps: [{ token: i3.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
241
270
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SurveyLibService, providedIn: 'root' }); }
242
271
  }
@@ -278,7 +307,7 @@ class CheckRuleExpsUsecase {
278
307
  const index = params.questions.findIndex(x => x.questionId == ruleExp.questionId);
279
308
  var questionGroupValue = params.questions.at(index);
280
309
  var result;
281
- if (questionGroupValue.questionType == QuestionTypeEnum.TextInput) {
310
+ if (questionGroupValue.questionType == QuestionTypeEnum.TextInput || questionGroupValue.questionType == QuestionTypeEnum.FeedBack) {
282
311
  result = this.checkRuleExpForAnswerText(ruleExp, questionGroupValue.answerText);
283
312
  }
284
313
  else if (questionGroupValue.questionType == QuestionTypeEnum.CheckBox || questionGroupValue.questionType == QuestionTypeEnum.DropDownMulti) {
@@ -289,7 +318,7 @@ class CheckRuleExpsUsecase {
289
318
  }
290
319
  useCaseResult.exprestionResultArr.push(result);
291
320
  });
292
- console.log(`Questions not passed ${useCaseResult.exprestionResultArr.filter(x => x == false).length}`);
321
+ // console.log(`Questions not passed ${useCaseResult.exprestionResultArr.filter(x => x == false).length}`);
293
322
  return of(useCaseResult);
294
323
  }
295
324
  checkRuleExpForAnswerId(ruleExp, answerId) {
@@ -595,18 +624,18 @@ class QuestionTextTemplateComponent {
595
624
  this._Store = _Store;
596
625
  this.isArabicLang = false;
597
626
  this.rForm = this._formBuilder.group({
598
- id: [null],
599
- name: [null],
600
- title: [null],
601
- typeId: [null],
602
- description: [null],
603
- surveyAnswerId: [null],
604
- answer: [null],
605
- isDisabled: [false],
606
- isShow: [true],
607
- inputTypeId: [null],
608
- inputMin: [null],
609
- inputMax: [null]
627
+ id: new FormControl(null),
628
+ name: new FormControl(null),
629
+ title: new FormControl(null),
630
+ typeId: new FormControl(null),
631
+ description: new FormControl(null),
632
+ surveyAnswerId: new FormControl(null),
633
+ answer: new FormControl(null),
634
+ isDisabled: new FormControl(false),
635
+ isShow: new FormControl(true),
636
+ inputTypeId: new FormControl(null),
637
+ inputMin: new FormControl(null),
638
+ inputMax: new FormControl(null),
610
639
  });
611
640
  }
612
641
  ngOnInit() {
@@ -667,7 +696,7 @@ class QuestionTextTemplateComponent {
667
696
  this.fCtrls.answer.updateValueAndValidity();
668
697
  }
669
698
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: QuestionTextTemplateComponent, deps: [{ token: i1.FormBuilder }, { token: SurveyLibService }, { token: i3.Store }], target: i0.ɵɵFactoryTarget.Component }); }
670
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: QuestionTextTemplateComponent, selector: "lib-question-text-template", inputs: { isArabicLang: "isArabicLang", setQuestion: "setQuestion", isDisabled: "isDisabled" }, ngImport: i0, template: "<div class=\"quastion\" [formGroup]=\"rForm\" [attr.id]=\"'question_'+fCtrls.id.value\"\r\n [ngClass]=\"{'invalid-question': fCtrls.answer.invalid , 'd-none':fCtrls.isShow.value != true}\">\r\n <h3 class=\"quastion-title \">\r\n <span [innerHTML]=\"surveyQuestion?.questionTitle\"></span>\r\n <span style=\"color: red;\" *ngIf=\"surveyQuestion.isRequired\">*</span>\r\n <p *ngIf=\"questionMinMaxIndicator\" class=\"text-danger\">\r\n <small >{{questionMinMaxIndicator}}</small>\r\n </p> \r\n </h3>\r\n <div class=\"text-quastion\">\r\n <ng-container *ngIf=\"isTextArea == false else textAreaTemplate\">\r\n <input class=\"form-control\" libMaskedForMinMax [attr.min]=\"fCtrls.inputMin.value\"\r\n [attr.max]=\"fCtrls.inputMax.value\" [formControl]=\"convertToFormControl(fCtrls.answer)\"\r\n [disabled]=\"isDisabled\" [attr.type]=\"fCtrls.inputTypeId.value | textBoxTypeAttr\">\r\n </ng-container>\r\n <ng-template #textAreaTemplate>\r\n <textarea class=\"form-control\" rows=\"2\" [formControl]=\"convertToFormControl(fCtrls.answer)\"\r\n [disabled]=\"isDisabled\"></textarea>\r\n </ng-template>\r\n </div>", styles: [""], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: MaskedForMinMaxDirective, selector: "[libMaskedForMinMax]" }, { kind: "pipe", type: TextBoxTypeAttrPipe, name: "textBoxTypeAttr" }] }); }
699
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: QuestionTextTemplateComponent, selector: "lib-question-text-template", inputs: { isArabicLang: "isArabicLang", setQuestion: "setQuestion", isDisabled: "isDisabled" }, ngImport: i0, template: "<div class=\"quastion\" [formGroup]=\"rForm\" [attr.id]=\"'question_'+fCtrls.id.value\"\r\n [ngClass]=\"{'invalid-question': fCtrls.answer.invalid , 'd-none':fCtrls.isShow.value != true}\">\r\n <h3 class=\"quastion-title \">\r\n <span [innerHTML]=\"surveyQuestion?.questionTitle\"></span>\r\n <span style=\"color: red;\" *ngIf=\"surveyQuestion.isRequired\">*</span>\r\n <p *ngIf=\"questionMinMaxIndicator\" class=\"text-danger\">\r\n <small >{{questionMinMaxIndicator}}</small>\r\n </p> \r\n </h3>\r\n <div class=\"text-quastion\">\r\n <ng-container *ngIf=\"isTextArea == false else textAreaTemplate\">\r\n <input class=\"form-control\" libMaskedForMinMax [attr.min]=\"fCtrls.inputMin.value\"\r\n [attr.max]=\"fCtrls.inputMax.value\" [formControl]=\"convertToFormControl(fCtrls.answer)\"\r\n [disabled]=\"isDisabled\" [attr.type]=\"fCtrls.inputTypeId.value | textBoxTypeAttr\">\r\n </ng-container>\r\n <ng-template #textAreaTemplate>\r\n <textarea class=\"form-control\" rows=\"2\" [formControl]=\"convertToFormControl(fCtrls.answer)\"\r\n [disabled]=\"isDisabled\"></textarea>\r\n </ng-template>\r\n </div>", styles: [""], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: MaskedForMinMaxDirective, selector: "[libMaskedForMinMax]" }, { kind: "pipe", type: TextBoxTypeAttrPipe, name: "textBoxTypeAttr" }] }); }
671
700
  }
672
701
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: QuestionTextTemplateComponent, decorators: [{
673
702
  type: Component,
@@ -701,9 +730,9 @@ class QuestionRadioButtonTemplateComponent {
701
730
  });
702
731
  value.questionAllInfo.surveyAnswers.forEach(surveryAnswer => {
703
732
  this.fCtrls.answerArray.push(this._formBuilder.group({
704
- id: [surveryAnswer.answerId],
705
- title: [surveryAnswer.answerTitle],
706
- isSelected: [false]
733
+ id: new FormControl(surveryAnswer.answerId),
734
+ title: new FormControl(surveryAnswer.answerTitle),
735
+ isSelected: new FormControl(false)
707
736
  }));
708
737
  });
709
738
  if (value.isRequired == true) {
@@ -718,14 +747,14 @@ class QuestionRadioButtonTemplateComponent {
718
747
  this._Store = _Store;
719
748
  this.elemId = v4();
720
749
  this.rForm = this._formBuilder.group({
721
- id: [null],
722
- name: [null],
723
- title: [null],
724
- typeId: [null],
725
- description: [null],
726
- answer: [null],
727
- isDisabled: [false],
728
- isShow: [true],
750
+ id: new FormControl(null),
751
+ name: new FormControl(null),
752
+ title: new FormControl(null),
753
+ typeId: new FormControl(null),
754
+ description: new FormControl(null),
755
+ answer: new FormControl(null),
756
+ isDisabled: new FormControl(false),
757
+ isShow: new FormControl(true),
729
758
  answerArray: this._formBuilder.array([])
730
759
  });
731
760
  }
@@ -764,17 +793,17 @@ class QuestionRadioButtonTemplateComponent {
764
793
  });
765
794
  }
766
795
  onChangeAnswer(item) {
767
- this.fCtrls.answer.setValue(item.id);
796
+ this.fCtrls.answer.setValue(item.value.id);
768
797
  }
769
798
  convertToFormControl(element) {
770
799
  return element;
771
800
  }
772
801
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: QuestionRadioButtonTemplateComponent, deps: [{ token: i1.FormBuilder }, { token: SurveyLibService }, { token: i3.Store }], target: i0.ɵɵFactoryTarget.Component }); }
773
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: QuestionRadioButtonTemplateComponent, selector: "lib-question-radio-button-template", inputs: { setQuestion: "setQuestion" }, ngImport: i0, template: "<div class=\"quastion\" [attr.id]=\"'question_'+fCtrls.id.value\" [ngClass]=\"{'invalid-question': fCtrls.answer.invalid , 'd-none':fCtrls.isShow.value != true}\">\r\n <h3 class=\"quastion-title \">\r\n <span [innerHTML]=\"surveyQuestion?.questionTitle\"></span>\r\n <span style=\"color: red;\" *ngIf=\"surveyQuestion.isRequired\">*</span>\r\n </h3>\r\n <div class=\"radio-button-quastion\">\r\n <div class=\"form-check form-check-radio form-check-inline\" \r\n *ngFor=\"let item of fCtrls.answerArray.controls;let i = index\">\r\n <input class=\"form-check-input\" type=\"radio\" (change)=\"onChangeAnswer(item.value)\" [disabled]=\"fCtrls.isDisabled.value\"\r\n name=\"{{elemId}}__radio-btn-option\" id=\"{{elemId}}__radio-btn_{{i}}\" [checked]=\"item.value.isSelected == true? true : null\">\r\n <label class=\"form-check-label\" for=\"{{elemId}}__radio-btn_{{i}}\" [innerHTML]=\"item.value.title\"></label>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
802
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: QuestionRadioButtonTemplateComponent, selector: "lib-question-radio-button-template", inputs: { setQuestion: "setQuestion" }, ngImport: i0, template: "<div class=\"quastion\" [attr.id]=\"'question_'+fCtrls.id.value\" [ngClass]=\"{'invalid-question': fCtrls.answer.invalid , 'd-none':fCtrls.isShow.value != true}\">\r\n <h3 class=\"quastion-title \">\r\n <span [innerHTML]=\"surveyQuestion?.questionTitle\"></span>\r\n <span style=\"color: red;\" *ngIf=\"surveyQuestion.isRequired\">*</span>\r\n </h3>\r\n <div class=\"radio-button-quastion\">\r\n <div class=\"form-check form-check-radio form-check-inline\" \r\n *ngFor=\"let item of fCtrls.answerArray.controls;let i = index\">\r\n <input class=\"form-check-input\" type=\"radio\" (change)=\"onChangeAnswer(item)\" [disabled]=\"fCtrls.isDisabled.value\"\r\n name=\"{{elemId}}__radio-btn-option\" id=\"{{elemId}}__radio-btn_{{i}}\" [checked]=\"item.value.isSelected == true? true : null\">\r\n <label class=\"form-check-label\" for=\"{{elemId}}__radio-btn_{{i}}\" [innerHTML]=\"item.value.title\"></label>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
774
803
  }
775
804
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: QuestionRadioButtonTemplateComponent, decorators: [{
776
805
  type: Component,
777
- args: [{ selector: 'lib-question-radio-button-template', template: "<div class=\"quastion\" [attr.id]=\"'question_'+fCtrls.id.value\" [ngClass]=\"{'invalid-question': fCtrls.answer.invalid , 'd-none':fCtrls.isShow.value != true}\">\r\n <h3 class=\"quastion-title \">\r\n <span [innerHTML]=\"surveyQuestion?.questionTitle\"></span>\r\n <span style=\"color: red;\" *ngIf=\"surveyQuestion.isRequired\">*</span>\r\n </h3>\r\n <div class=\"radio-button-quastion\">\r\n <div class=\"form-check form-check-radio form-check-inline\" \r\n *ngFor=\"let item of fCtrls.answerArray.controls;let i = index\">\r\n <input class=\"form-check-input\" type=\"radio\" (change)=\"onChangeAnswer(item.value)\" [disabled]=\"fCtrls.isDisabled.value\"\r\n name=\"{{elemId}}__radio-btn-option\" id=\"{{elemId}}__radio-btn_{{i}}\" [checked]=\"item.value.isSelected == true? true : null\">\r\n <label class=\"form-check-label\" for=\"{{elemId}}__radio-btn_{{i}}\" [innerHTML]=\"item.value.title\"></label>\r\n </div>\r\n </div>\r\n</div>\r\n" }]
806
+ args: [{ selector: 'lib-question-radio-button-template', template: "<div class=\"quastion\" [attr.id]=\"'question_'+fCtrls.id.value\" [ngClass]=\"{'invalid-question': fCtrls.answer.invalid , 'd-none':fCtrls.isShow.value != true}\">\r\n <h3 class=\"quastion-title \">\r\n <span [innerHTML]=\"surveyQuestion?.questionTitle\"></span>\r\n <span style=\"color: red;\" *ngIf=\"surveyQuestion.isRequired\">*</span>\r\n </h3>\r\n <div class=\"radio-button-quastion\">\r\n <div class=\"form-check form-check-radio form-check-inline\" \r\n *ngFor=\"let item of fCtrls.answerArray.controls;let i = index\">\r\n <input class=\"form-check-input\" type=\"radio\" (change)=\"onChangeAnswer(item)\" [disabled]=\"fCtrls.isDisabled.value\"\r\n name=\"{{elemId}}__radio-btn-option\" id=\"{{elemId}}__radio-btn_{{i}}\" [checked]=\"item.value.isSelected == true? true : null\">\r\n <label class=\"form-check-label\" for=\"{{elemId}}__radio-btn_{{i}}\" [innerHTML]=\"item.value.title\"></label>\r\n </div>\r\n </div>\r\n</div>\r\n" }]
778
807
  }], ctorParameters: function () { return [{ type: i1.FormBuilder }, { type: SurveyLibService }, { type: i3.Store }]; }, propDecorators: { setQuestion: [{
779
808
  type: Input
780
809
  }] } });
@@ -800,9 +829,9 @@ class QuestionCheckBoxTemplateComponent {
800
829
  });
801
830
  value.questionAllInfo.surveyAnswers.forEach(surveryAnswer => {
802
831
  this.fCtrls.answerArray.push(this._formBuilder.group({
803
- id: [surveryAnswer.answerId],
804
- title: [surveryAnswer.answerTitle],
805
- isSelected: [false]
832
+ id: new FormControl(surveryAnswer.answerId),
833
+ title: new FormControl(surveryAnswer.answerTitle),
834
+ isSelected: new FormControl(false)
806
835
  }));
807
836
  });
808
837
  if (value.isRequired == true) {
@@ -817,14 +846,14 @@ class QuestionCheckBoxTemplateComponent {
817
846
  this._Store = _Store;
818
847
  this.elemId = v4();
819
848
  this.rForm = this._formBuilder.group({
820
- id: [null],
821
- name: [null],
822
- title: [null],
823
- typeId: [null],
824
- description: [null],
825
- answer: [null],
826
- isDisabled: [false],
827
- isShow: [true],
849
+ id: new FormControl(null),
850
+ name: new FormControl(null),
851
+ title: new FormControl(null),
852
+ typeId: new FormControl(null),
853
+ description: new FormControl(null),
854
+ answer: new FormControl(null),
855
+ isDisabled: new FormControl(false),
856
+ isShow: new FormControl(true),
828
857
  answerArray: this._formBuilder.array([])
829
858
  });
830
859
  }
@@ -868,10 +897,10 @@ class QuestionCheckBoxTemplateComponent {
868
897
  onChangeAnswer(item, event) {
869
898
  var answerArr = this.fCtrls.answer.value || [];
870
899
  if (event.target.checked == true) {
871
- answerArr.push(item.id);
900
+ answerArr.push(item.value.id);
872
901
  }
873
902
  else {
874
- answerArr = answerArr.filter(x => x != item.id);
903
+ answerArr = answerArr.filter(x => x != item.value.id);
875
904
  }
876
905
  answerArr = answerArr.length == 0 ? [] : answerArr;
877
906
  this.fCtrls.answer.setValue(answerArr);
@@ -880,11 +909,11 @@ class QuestionCheckBoxTemplateComponent {
880
909
  return element;
881
910
  }
882
911
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: QuestionCheckBoxTemplateComponent, deps: [{ token: i1.FormBuilder }, { token: SurveyLibService }, { token: i3.Store }], target: i0.ɵɵFactoryTarget.Component }); }
883
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: QuestionCheckBoxTemplateComponent, selector: "lib-question-check-box-template", inputs: { setQuestion: "setQuestion" }, ngImport: i0, template: "<div class=\"quastion\" [attr.id]=\"'question_'+fCtrls.id.value\" [ngClass]=\"{'invalid-question': fCtrls.answer.invalid , 'd-none':fCtrls.isShow.value != true}\">\r\n <h3 class=\"quastion-title \">\r\n <span [innerHTML]=\"fCtrls.title.value\"></span>\r\n <span style=\"color: red;\" *ngIf=\"surveyQuestion.isRequired\">*</span>\r\n </h3>\r\n\r\n <div class=\"checkbox-button-quastion\">\r\n <div class=\"form-check check-box-form-check\" *ngFor=\"let item of fCtrls.answerArray.controls ;let i = index\">\r\n <input type=\"checkbox\" class=\"form-check-input\" id=\"{{elemId}}__checkbox_{{i}}\" [disabled]=\"fCtrls.isDisabled.value\"\r\n (change)=\"onChangeAnswer(item.value ,$event)\" [checked]=\"item.value.isSelected == true? true : null\">\r\n <label class=\"form-check-label \" for=\"{{elemId}}__checkbox_{{i}}\" [innerHTML]=\"item.value.title\"></label>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
912
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: QuestionCheckBoxTemplateComponent, selector: "lib-question-check-box-template", inputs: { setQuestion: "setQuestion" }, ngImport: i0, template: "<div class=\"quastion\" [attr.id]=\"'question_'+fCtrls.id.value\" [ngClass]=\"{'invalid-question': fCtrls.answer.invalid , 'd-none':fCtrls.isShow.value != true}\">\r\n <h3 class=\"quastion-title \">\r\n <span [innerHTML]=\"fCtrls.title.value\"></span>\r\n <span style=\"color: red;\" *ngIf=\"surveyQuestion.isRequired\">*</span>\r\n </h3>\r\n\r\n <div class=\"checkbox-button-quastion\">\r\n <div class=\"form-check check-box-form-check\" *ngFor=\"let item of fCtrls.answerArray.controls ;let i = index\">\r\n <input type=\"checkbox\" class=\"form-check-input\" id=\"{{elemId}}__checkbox_{{i}}\" [disabled]=\"fCtrls.isDisabled.value\"\r\n (change)=\"onChangeAnswer(item ,$event)\" [checked]=\"item.value.isSelected == true? true : null\">\r\n <label class=\"form-check-label \" for=\"{{elemId}}__checkbox_{{i}}\" [innerHTML]=\"item.value.title\"></label>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
884
913
  }
885
914
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: QuestionCheckBoxTemplateComponent, decorators: [{
886
915
  type: Component,
887
- args: [{ selector: 'lib-question-check-box-template', template: "<div class=\"quastion\" [attr.id]=\"'question_'+fCtrls.id.value\" [ngClass]=\"{'invalid-question': fCtrls.answer.invalid , 'd-none':fCtrls.isShow.value != true}\">\r\n <h3 class=\"quastion-title \">\r\n <span [innerHTML]=\"fCtrls.title.value\"></span>\r\n <span style=\"color: red;\" *ngIf=\"surveyQuestion.isRequired\">*</span>\r\n </h3>\r\n\r\n <div class=\"checkbox-button-quastion\">\r\n <div class=\"form-check check-box-form-check\" *ngFor=\"let item of fCtrls.answerArray.controls ;let i = index\">\r\n <input type=\"checkbox\" class=\"form-check-input\" id=\"{{elemId}}__checkbox_{{i}}\" [disabled]=\"fCtrls.isDisabled.value\"\r\n (change)=\"onChangeAnswer(item.value ,$event)\" [checked]=\"item.value.isSelected == true? true : null\">\r\n <label class=\"form-check-label \" for=\"{{elemId}}__checkbox_{{i}}\" [innerHTML]=\"item.value.title\"></label>\r\n </div>\r\n </div>\r\n</div>\r\n" }]
916
+ args: [{ selector: 'lib-question-check-box-template', template: "<div class=\"quastion\" [attr.id]=\"'question_'+fCtrls.id.value\" [ngClass]=\"{'invalid-question': fCtrls.answer.invalid , 'd-none':fCtrls.isShow.value != true}\">\r\n <h3 class=\"quastion-title \">\r\n <span [innerHTML]=\"fCtrls.title.value\"></span>\r\n <span style=\"color: red;\" *ngIf=\"surveyQuestion.isRequired\">*</span>\r\n </h3>\r\n\r\n <div class=\"checkbox-button-quastion\">\r\n <div class=\"form-check check-box-form-check\" *ngFor=\"let item of fCtrls.answerArray.controls ;let i = index\">\r\n <input type=\"checkbox\" class=\"form-check-input\" id=\"{{elemId}}__checkbox_{{i}}\" [disabled]=\"fCtrls.isDisabled.value\"\r\n (change)=\"onChangeAnswer(item ,$event)\" [checked]=\"item.value.isSelected == true? true : null\">\r\n <label class=\"form-check-label \" for=\"{{elemId}}__checkbox_{{i}}\" [innerHTML]=\"item.value.title\"></label>\r\n </div>\r\n </div>\r\n</div>\r\n" }]
888
917
  }], ctorParameters: function () { return [{ type: i1.FormBuilder }, { type: SurveyLibService }, { type: i3.Store }]; }, propDecorators: { setQuestion: [{
889
918
  type: Input
890
919
  }] } });
@@ -920,14 +949,14 @@ class QuestionDropdownTemplateComponent {
920
949
  this._Store = _Store;
921
950
  this.emitter = new EventEmitter();
922
951
  this.rForm = this._formBuilder.group({
923
- id: [null],
924
- name: [null],
925
- title: [null],
926
- typeId: [null],
927
- description: [null],
928
- answer: [null],
929
- isDisabled: [false],
930
- isShow: [true]
952
+ id: new FormControl(null),
953
+ name: new FormControl(null),
954
+ title: new FormControl(null),
955
+ typeId: new FormControl(null),
956
+ description: new FormControl(null),
957
+ answer: new FormControl(null),
958
+ isDisabled: new FormControl(false),
959
+ isShow: new FormControl(true),
931
960
  });
932
961
  }
933
962
  ngOnInit() {
@@ -969,7 +998,7 @@ class QuestionDropdownTemplateComponent {
969
998
  return element;
970
999
  }
971
1000
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: QuestionDropdownTemplateComponent, deps: [{ token: i1.FormBuilder }, { token: SurveyLibService }, { token: i3.Store }], target: i0.ɵɵFactoryTarget.Component }); }
972
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: QuestionDropdownTemplateComponent, selector: "lib-question-dropdown-template", inputs: { setQuestion: "setQuestion" }, outputs: { emitter: "emitter" }, ngImport: i0, template: "<div class=\"quastion\" [attr.id]=\"'question_'+fCtrls.id.value\" [ngClass]=\"{'invalid-question': fCtrls.answer.invalid , 'd-none':fCtrls.isShow.value != true}\">\r\n <h3 class=\"quastion-title \">\r\n <span [innerHTML]=\"fCtrls.title.value\"></span>\r\n <span style=\"color: red;\" *ngIf=\"surveyQuestion?.isRequired\">*</span>\r\n </h3>\r\n <div class=\"text-quastion text-quastion__dropdown\">\r\n <ng-select [items]=\"surveyQuestion?.surveyAnswers\" bindValue=\"answerId\" bindLabel=\"answerTitle\" class=\"form-control\"\r\n [formControl]=\"convertToFormControl(fCtrls.answer)\" [disabled]=\"fCtrls.isDisabled.value\" [multiple]=\"false\">\r\n </ng-select>\r\n </div>\r\n</div>\r\n", styles: [".text-quastion .form-control{padding:10px}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i6.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "deselectOnClick"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }] }); }
1001
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: QuestionDropdownTemplateComponent, selector: "lib-question-dropdown-template", inputs: { setQuestion: "setQuestion" }, outputs: { emitter: "emitter" }, ngImport: i0, template: "<div class=\"quastion\" [attr.id]=\"'question_'+fCtrls.id.value\" [ngClass]=\"{'invalid-question': fCtrls.answer.invalid , 'd-none':fCtrls.isShow.value != true}\">\r\n <h3 class=\"quastion-title \">\r\n <span [innerHTML]=\"fCtrls.title.value\"></span>\r\n <span style=\"color: red;\" *ngIf=\"surveyQuestion?.isRequired\">*</span>\r\n </h3>\r\n <div class=\"text-quastion text-quastion__dropdown\">\r\n <ng-select [items]=\"surveyQuestion?.surveyAnswers\" bindValue=\"answerId\" bindLabel=\"answerTitle\" class=\"form-control\"\r\n [formControl]=\"convertToFormControl(fCtrls.answer)\" [disabled]=\"fCtrls.isDisabled.value\" [multiple]=\"false\">\r\n </ng-select>\r\n </div>\r\n</div>\r\n", styles: [".text-quastion .form-control{padding:10px}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i5.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "deselectOnClick"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }] }); }
973
1002
  }
974
1003
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: QuestionDropdownTemplateComponent, decorators: [{
975
1004
  type: Component,
@@ -998,9 +1027,9 @@ class QuestionMatrixTemplateComponent {
998
1027
  });
999
1028
  value.questionAllInfo.surveySubQuestions.forEach(x => {
1000
1029
  var group = this._formBuilder.group({
1001
- subQuestionId: [x.questionId],
1002
- questionTitle: [x.questionTitle],
1003
- answer: [null],
1030
+ subQuestionId: new FormControl(x.questionId),
1031
+ questionTitle: new FormControl(x.questionTitle),
1032
+ answer: new FormControl(null),
1004
1033
  });
1005
1034
  if (value.isRequired == true) {
1006
1035
  group.controls.answer.addValidators([Validators.required]);
@@ -1024,10 +1053,10 @@ class QuestionMatrixTemplateComponent {
1024
1053
  this._Store = _Store;
1025
1054
  this.elemId = v4();
1026
1055
  this.rForm = this._formBuilder.group({
1027
- id: [null],
1028
- typeId: [null],
1029
- isDisabled: [false],
1030
- isShow: [true],
1056
+ id: new FormControl(null),
1057
+ typeId: new FormControl(null),
1058
+ isDisabled: new FormControl(false),
1059
+ isShow: new FormControl(true),
1031
1060
  subQuestionArray: this._formBuilder.array([])
1032
1061
  });
1033
1062
  }
@@ -1060,7 +1089,7 @@ class QuestionMatrixTemplateComponent {
1060
1089
  });
1061
1090
  }
1062
1091
  onChangeAnswer(question, answer) {
1063
- const index = this.fCtrls.subQuestionArray.value.findIndex(x => x.subQuestionId == question.subQuestionId);
1092
+ const index = this.fCtrls.subQuestionArray.value.findIndex(x => x.subQuestionId == question.value.subQuestionId);
1064
1093
  var subQuestionGroup = this.fCtrls.subQuestionArray.controls[index];
1065
1094
  subQuestionGroup.controls.answer.setValue(answer.answerId);
1066
1095
  // this.emitter.emit({
@@ -1073,11 +1102,11 @@ class QuestionMatrixTemplateComponent {
1073
1102
  return element;
1074
1103
  }
1075
1104
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: QuestionMatrixTemplateComponent, deps: [{ token: i1.FormBuilder }, { token: SurveyLibService }, { token: i3.Store }], target: i0.ɵɵFactoryTarget.Component }); }
1076
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: QuestionMatrixTemplateComponent, selector: "lib-question-matrix-template", inputs: { setQuestion: "setQuestion" }, ngImport: i0, template: "<div class=\"quastion\" [attr.id]=\"'question_'+fCtrls.id.value\" style=\" border-collapse: collapse;\"\r\n[ngClass]=\"{'d-none':fCtrls.isShow.value != true}\">\r\n <h3 class=\"quastion-title \">\r\n <span [innerHTML]=\"surveyQuestion?.questionTitle\"></span>\r\n <span style=\"color: red;\" *ngIf=\"surveyQuestion.isRequired\">*</span>\r\n </h3>\r\n <div class=\"matrix-question\" [formGroup]=\"rForm\">\r\n <div class=\"matrix-table\" formArrayName=\"subQuestionArray\">\r\n <div class=\"matrix-head-row\">\r\n <div class=\"matrix-col\">\r\n </div>\r\n <div class=\"matrix-col\" *ngFor=\"let answers of surveyQuestion?.surveyAnswers\" >\r\n <span [innerHTML]=\"answers.answerTitle\"></span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"matrix-row\" [attr.id]=\"'question_'+questionGroup.value.subQuestionId\"\r\n *ngFor=\"let questionGroup of fCtrls.subQuestionArray.controls ;let subQuestionIndex = index\"\r\n [ngClass]=\"{'invalid-question': questionGroup.controls.answer.invalid}\">\r\n <div class=\"matrix-col matrix-sub-quastion\" [innerHTML]=\"questionGroup.value.questionTitle\">\r\n </div>\r\n <div class=\"matrix-col answer__container\" *ngFor=\"let answer of surveyQuestion?.surveyAnswers;let answerIndex = index\">\r\n <div class=\"form-check form-check-radio form-check-inline\">\r\n <input class=\"form-check-input\" type=\"radio\" name=\"{{elemId}}__radio-btn-option_{{subQuestionIndex}}\"\r\n id=\"{{elemId}}__radio-btn_{{subQuestionIndex}}_{{answerIndex}}\" (change)=\"onChangeAnswer(questionGroup.value ,answer)\"\r\n value=\"{{answer.answerId}}\" [checked]=\"answer.answerId == questionGroup.value.answer\">\r\n <label class=\"form-check-label d-inline d-lg-none\" [innerHTML]=\"answer.answerTitle\"\r\n for=\"{{elemId}}__radio-btn_{{subQuestionIndex}}_{{answerIndex}}\"> </label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n</div>", styles: ["@media (max-width: 767px){.quastion .quastion-title{position:sticky;top:150px;z-index:1000;padding:10px 20px;background-color:#4c3d8f;color:#fff;font-size:16px;box-shadow:4px 5px 5px #0000004d;border-radius:10px;-webkit-border-radius:10px;-moz-border-radius:10px;-ms-border-radius:10px;-o-border-radius:10px}.quastion .quastion-title:last-of-type(){position:static;z-index:initial}.quastion .matrix-question .matrix-table .matrix-row .matrix-col{width:100%!important}.matrix-table .matrix-row .matrix-col .form-check{flex-direction:row}.matrix-head-row{display:none!important}.answer__container.matrix-col{padding:5px 15px!important}.answer__container.matrix-col .form-check-radio .form-check-label{padding-right:15px!important}}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }] }); }
1105
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: QuestionMatrixTemplateComponent, selector: "lib-question-matrix-template", inputs: { setQuestion: "setQuestion" }, ngImport: i0, template: "<div class=\"quastion\" [attr.id]=\"'question_'+fCtrls.id.value\" style=\" border-collapse: collapse;\"\r\n[ngClass]=\"{'d-none':fCtrls.isShow.value != true}\">\r\n <h3 class=\"quastion-title \">\r\n <span [innerHTML]=\"surveyQuestion?.questionTitle\"></span>\r\n <span style=\"color: red;\" *ngIf=\"surveyQuestion.isRequired\">*</span>\r\n </h3>\r\n <div class=\"matrix-question\" [formGroup]=\"rForm\">\r\n <div class=\"matrix-table\" formArrayName=\"subQuestionArray\">\r\n <div class=\"matrix-head-row\">\r\n <div class=\"matrix-col\">\r\n </div>\r\n <div class=\"matrix-col\" *ngFor=\"let answers of surveyQuestion?.surveyAnswers\" >\r\n <span [innerHTML]=\"answers.answerTitle\"></span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"matrix-row\" [attr.id]=\"'question_'+questionGroup.value.subQuestionId\"\r\n *ngFor=\"let questionGroup of fCtrls.subQuestionArray.controls ;let subQuestionIndex = index\"\r\n [ngClass]=\"{'invalid-question': questionGroup.controls.answer.invalid}\">\r\n <div class=\"matrix-col matrix-sub-quastion\" [innerHTML]=\"questionGroup.value.questionTitle\">\r\n </div>\r\n <div class=\"matrix-col answer__container\" *ngFor=\"let answer of surveyQuestion?.surveyAnswers;let answerIndex = index\">\r\n <div class=\"form-check form-check-radio form-check-inline\">\r\n <input class=\"form-check-input\" type=\"radio\" name=\"{{elemId}}__radio-btn-option_{{subQuestionIndex}}\"\r\n id=\"{{elemId}}__radio-btn_{{subQuestionIndex}}_{{answerIndex}}\" (change)=\"onChangeAnswer(questionGroup ,answer)\"\r\n value=\"{{answer.answerId}}\" [checked]=\"answer.answerId == questionGroup.value.answer\">\r\n <label class=\"form-check-label d-inline d-lg-none\" [innerHTML]=\"answer.answerTitle\"\r\n for=\"{{elemId}}__radio-btn_{{subQuestionIndex}}_{{answerIndex}}\"> </label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n</div>", styles: ["@media (max-width: 767px){.quastion .quastion-title{position:sticky;top:150px;z-index:1000;padding:10px 20px;background-color:#4c3d8f;color:#fff;font-size:16px;box-shadow:4px 5px 5px #0000004d;border-radius:10px;-webkit-border-radius:10px;-moz-border-radius:10px;-ms-border-radius:10px;-o-border-radius:10px}.quastion .quastion-title:last-of-type(){position:static;z-index:initial}.quastion .matrix-question .matrix-table .matrix-row .matrix-col{width:100%!important}.matrix-table .matrix-row .matrix-col .form-check{flex-direction:row}.matrix-head-row{display:none!important}.answer__container.matrix-col{padding:5px 15px!important}.answer__container.matrix-col .form-check-radio .form-check-label{padding-right:15px!important}}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }] }); }
1077
1106
  }
1078
1107
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: QuestionMatrixTemplateComponent, decorators: [{
1079
1108
  type: Component,
1080
- args: [{ selector: 'lib-question-matrix-template', template: "<div class=\"quastion\" [attr.id]=\"'question_'+fCtrls.id.value\" style=\" border-collapse: collapse;\"\r\n[ngClass]=\"{'d-none':fCtrls.isShow.value != true}\">\r\n <h3 class=\"quastion-title \">\r\n <span [innerHTML]=\"surveyQuestion?.questionTitle\"></span>\r\n <span style=\"color: red;\" *ngIf=\"surveyQuestion.isRequired\">*</span>\r\n </h3>\r\n <div class=\"matrix-question\" [formGroup]=\"rForm\">\r\n <div class=\"matrix-table\" formArrayName=\"subQuestionArray\">\r\n <div class=\"matrix-head-row\">\r\n <div class=\"matrix-col\">\r\n </div>\r\n <div class=\"matrix-col\" *ngFor=\"let answers of surveyQuestion?.surveyAnswers\" >\r\n <span [innerHTML]=\"answers.answerTitle\"></span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"matrix-row\" [attr.id]=\"'question_'+questionGroup.value.subQuestionId\"\r\n *ngFor=\"let questionGroup of fCtrls.subQuestionArray.controls ;let subQuestionIndex = index\"\r\n [ngClass]=\"{'invalid-question': questionGroup.controls.answer.invalid}\">\r\n <div class=\"matrix-col matrix-sub-quastion\" [innerHTML]=\"questionGroup.value.questionTitle\">\r\n </div>\r\n <div class=\"matrix-col answer__container\" *ngFor=\"let answer of surveyQuestion?.surveyAnswers;let answerIndex = index\">\r\n <div class=\"form-check form-check-radio form-check-inline\">\r\n <input class=\"form-check-input\" type=\"radio\" name=\"{{elemId}}__radio-btn-option_{{subQuestionIndex}}\"\r\n id=\"{{elemId}}__radio-btn_{{subQuestionIndex}}_{{answerIndex}}\" (change)=\"onChangeAnswer(questionGroup.value ,answer)\"\r\n value=\"{{answer.answerId}}\" [checked]=\"answer.answerId == questionGroup.value.answer\">\r\n <label class=\"form-check-label d-inline d-lg-none\" [innerHTML]=\"answer.answerTitle\"\r\n for=\"{{elemId}}__radio-btn_{{subQuestionIndex}}_{{answerIndex}}\"> </label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n</div>", styles: ["@media (max-width: 767px){.quastion .quastion-title{position:sticky;top:150px;z-index:1000;padding:10px 20px;background-color:#4c3d8f;color:#fff;font-size:16px;box-shadow:4px 5px 5px #0000004d;border-radius:10px;-webkit-border-radius:10px;-moz-border-radius:10px;-ms-border-radius:10px;-o-border-radius:10px}.quastion .quastion-title:last-of-type(){position:static;z-index:initial}.quastion .matrix-question .matrix-table .matrix-row .matrix-col{width:100%!important}.matrix-table .matrix-row .matrix-col .form-check{flex-direction:row}.matrix-head-row{display:none!important}.answer__container.matrix-col{padding:5px 15px!important}.answer__container.matrix-col .form-check-radio .form-check-label{padding-right:15px!important}}\n"] }]
1109
+ args: [{ selector: 'lib-question-matrix-template', template: "<div class=\"quastion\" [attr.id]=\"'question_'+fCtrls.id.value\" style=\" border-collapse: collapse;\"\r\n[ngClass]=\"{'d-none':fCtrls.isShow.value != true}\">\r\n <h3 class=\"quastion-title \">\r\n <span [innerHTML]=\"surveyQuestion?.questionTitle\"></span>\r\n <span style=\"color: red;\" *ngIf=\"surveyQuestion.isRequired\">*</span>\r\n </h3>\r\n <div class=\"matrix-question\" [formGroup]=\"rForm\">\r\n <div class=\"matrix-table\" formArrayName=\"subQuestionArray\">\r\n <div class=\"matrix-head-row\">\r\n <div class=\"matrix-col\">\r\n </div>\r\n <div class=\"matrix-col\" *ngFor=\"let answers of surveyQuestion?.surveyAnswers\" >\r\n <span [innerHTML]=\"answers.answerTitle\"></span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"matrix-row\" [attr.id]=\"'question_'+questionGroup.value.subQuestionId\"\r\n *ngFor=\"let questionGroup of fCtrls.subQuestionArray.controls ;let subQuestionIndex = index\"\r\n [ngClass]=\"{'invalid-question': questionGroup.controls.answer.invalid}\">\r\n <div class=\"matrix-col matrix-sub-quastion\" [innerHTML]=\"questionGroup.value.questionTitle\">\r\n </div>\r\n <div class=\"matrix-col answer__container\" *ngFor=\"let answer of surveyQuestion?.surveyAnswers;let answerIndex = index\">\r\n <div class=\"form-check form-check-radio form-check-inline\">\r\n <input class=\"form-check-input\" type=\"radio\" name=\"{{elemId}}__radio-btn-option_{{subQuestionIndex}}\"\r\n id=\"{{elemId}}__radio-btn_{{subQuestionIndex}}_{{answerIndex}}\" (change)=\"onChangeAnswer(questionGroup ,answer)\"\r\n value=\"{{answer.answerId}}\" [checked]=\"answer.answerId == questionGroup.value.answer\">\r\n <label class=\"form-check-label d-inline d-lg-none\" [innerHTML]=\"answer.answerTitle\"\r\n for=\"{{elemId}}__radio-btn_{{subQuestionIndex}}_{{answerIndex}}\"> </label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n </div>\r\n</div>", styles: ["@media (max-width: 767px){.quastion .quastion-title{position:sticky;top:150px;z-index:1000;padding:10px 20px;background-color:#4c3d8f;color:#fff;font-size:16px;box-shadow:4px 5px 5px #0000004d;border-radius:10px;-webkit-border-radius:10px;-moz-border-radius:10px;-ms-border-radius:10px;-o-border-radius:10px}.quastion .quastion-title:last-of-type(){position:static;z-index:initial}.quastion .matrix-question .matrix-table .matrix-row .matrix-col{width:100%!important}.matrix-table .matrix-row .matrix-col .form-check{flex-direction:row}.matrix-head-row{display:none!important}.answer__container.matrix-col{padding:5px 15px!important}.answer__container.matrix-col .form-check-radio .form-check-label{padding-right:15px!important}}\n"] }]
1081
1110
  }], ctorParameters: function () { return [{ type: i1.FormBuilder }, { type: SurveyLibService }, { type: i3.Store }]; }, propDecorators: { setQuestion: [{
1082
1111
  type: Input
1083
1112
  }] } });
@@ -1103,9 +1132,9 @@ class QuestionBooleanTemplateComponent {
1103
1132
  });
1104
1133
  value.questionAllInfo.surveyAnswers.forEach(surveryAnswer => {
1105
1134
  this.fCtrls.answerArray.push(this._formBuilder.group({
1106
- id: [surveryAnswer.answerId],
1107
- title: [surveryAnswer.answerTitle],
1108
- isSelected: [false]
1135
+ id: new FormControl(surveryAnswer.answerId),
1136
+ title: new FormControl(surveryAnswer.answerTitle),
1137
+ isSelected: new FormControl(false)
1109
1138
  }));
1110
1139
  });
1111
1140
  if (value.isRequired == true) {
@@ -1120,15 +1149,15 @@ class QuestionBooleanTemplateComponent {
1120
1149
  this._Store = _Store;
1121
1150
  this.elemId = v4();
1122
1151
  this.rForm = this._formBuilder.group({
1123
- id: [null],
1124
- name: [null],
1125
- title: [null],
1126
- typeId: [null],
1127
- description: [null],
1128
- answer: [null],
1152
+ id: new FormControl(null),
1153
+ name: new FormControl(null),
1154
+ title: new FormControl(null),
1155
+ typeId: new FormControl(null),
1156
+ description: new FormControl(null),
1157
+ answer: new FormControl(null),
1158
+ isDisabled: new FormControl(false),
1159
+ isShow: new FormControl(true),
1129
1160
  answerArray: this._formBuilder.array([]),
1130
- isDisabled: [false],
1131
- isShow: [true]
1132
1161
  });
1133
1162
  }
1134
1163
  ngOnInit() {
@@ -1162,17 +1191,17 @@ class QuestionBooleanTemplateComponent {
1162
1191
  });
1163
1192
  }
1164
1193
  onChangeAnswer(item) {
1165
- this.fCtrls.answer.setValue(item.id);
1194
+ this.fCtrls.answer.setValue(item.value.id);
1166
1195
  }
1167
1196
  convertToFormControl(element) {
1168
1197
  return element;
1169
1198
  }
1170
1199
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: QuestionBooleanTemplateComponent, deps: [{ token: i1.FormBuilder }, { token: SurveyLibService }, { token: i3.Store }], target: i0.ɵɵFactoryTarget.Component }); }
1171
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: QuestionBooleanTemplateComponent, selector: "lib-question-boolean-template", inputs: { setQuestion: "setQuestion" }, ngImport: i0, template: "<div class=\"quastion\" [attr.id]=\"'question_'+fCtrls.id.value\"\r\n [ngClass]=\"{'invalid-question': fCtrls.answer.invalid , 'd-none':fCtrls.isShow.value != true}\">\r\n <h3 class=\"quastion-title \">\r\n <span [innerHTML]=\"fCtrls.title.value\"></span>\r\n <span style=\"color: red;\" *ngIf=\"surveyQuestion.isRequired\">*</span>\r\n </h3>\r\n <div class=\"radio-button-quastion\">\r\n <div class=\"form-check form-check-radio form-check-inline\"\r\n *ngFor=\"let item of fCtrls.answerArray.controls ;let i = index\">\r\n <input class=\"form-check-input\" type=\"radio\" (change)=\"onChangeAnswer(item.value)\"\r\n [disabled]=\"fCtrls.isDisabled.value\" name=\"{{elemId}}__radio-btn-option\"\r\n id=\"{{elemId}}__radio-btn_{{i}}\" [checked]=\"item.value.isSelected == true? true : null\">\r\n <label class=\"form-check-label\" for=\"{{elemId}}__radio-btn_{{i}}\">{{item.value.title}}</label>\r\n </div>\r\n </div>\r\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
1200
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: QuestionBooleanTemplateComponent, selector: "lib-question-boolean-template", inputs: { setQuestion: "setQuestion" }, ngImport: i0, template: "<div class=\"quastion\" [attr.id]=\"'question_'+fCtrls.id.value\"\r\n [ngClass]=\"{'invalid-question': fCtrls.answer.invalid , 'd-none':fCtrls.isShow.value != true}\">\r\n <h3 class=\"quastion-title \">\r\n <span [innerHTML]=\"fCtrls.title.value\"></span>\r\n <span style=\"color: red;\" *ngIf=\"surveyQuestion.isRequired\">*</span>\r\n </h3>\r\n <div class=\"radio-button-quastion\">\r\n <div class=\"form-check form-check-radio form-check-inline\"\r\n *ngFor=\"let item of fCtrls.answerArray.controls ;let i = index\">\r\n <input class=\"form-check-input\" type=\"radio\" (change)=\"onChangeAnswer(item)\"\r\n [disabled]=\"fCtrls.isDisabled.value\" name=\"{{elemId}}__radio-btn-option\"\r\n id=\"{{elemId}}__radio-btn_{{i}}\" [checked]=\"item.value.isSelected == true? true : null\">\r\n <label class=\"form-check-label\" for=\"{{elemId}}__radio-btn_{{i}}\">{{item.value.title}}</label>\r\n </div>\r\n </div>\r\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
1172
1201
  }
1173
1202
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: QuestionBooleanTemplateComponent, decorators: [{
1174
1203
  type: Component,
1175
- args: [{ selector: 'lib-question-boolean-template', template: "<div class=\"quastion\" [attr.id]=\"'question_'+fCtrls.id.value\"\r\n [ngClass]=\"{'invalid-question': fCtrls.answer.invalid , 'd-none':fCtrls.isShow.value != true}\">\r\n <h3 class=\"quastion-title \">\r\n <span [innerHTML]=\"fCtrls.title.value\"></span>\r\n <span style=\"color: red;\" *ngIf=\"surveyQuestion.isRequired\">*</span>\r\n </h3>\r\n <div class=\"radio-button-quastion\">\r\n <div class=\"form-check form-check-radio form-check-inline\"\r\n *ngFor=\"let item of fCtrls.answerArray.controls ;let i = index\">\r\n <input class=\"form-check-input\" type=\"radio\" (change)=\"onChangeAnswer(item.value)\"\r\n [disabled]=\"fCtrls.isDisabled.value\" name=\"{{elemId}}__radio-btn-option\"\r\n id=\"{{elemId}}__radio-btn_{{i}}\" [checked]=\"item.value.isSelected == true? true : null\">\r\n <label class=\"form-check-label\" for=\"{{elemId}}__radio-btn_{{i}}\">{{item.value.title}}</label>\r\n </div>\r\n </div>\r\n</div>" }]
1204
+ args: [{ selector: 'lib-question-boolean-template', template: "<div class=\"quastion\" [attr.id]=\"'question_'+fCtrls.id.value\"\r\n [ngClass]=\"{'invalid-question': fCtrls.answer.invalid , 'd-none':fCtrls.isShow.value != true}\">\r\n <h3 class=\"quastion-title \">\r\n <span [innerHTML]=\"fCtrls.title.value\"></span>\r\n <span style=\"color: red;\" *ngIf=\"surveyQuestion.isRequired\">*</span>\r\n </h3>\r\n <div class=\"radio-button-quastion\">\r\n <div class=\"form-check form-check-radio form-check-inline\"\r\n *ngFor=\"let item of fCtrls.answerArray.controls ;let i = index\">\r\n <input class=\"form-check-input\" type=\"radio\" (change)=\"onChangeAnswer(item)\"\r\n [disabled]=\"fCtrls.isDisabled.value\" name=\"{{elemId}}__radio-btn-option\"\r\n id=\"{{elemId}}__radio-btn_{{i}}\" [checked]=\"item.value.isSelected == true? true : null\">\r\n <label class=\"form-check-label\" for=\"{{elemId}}__radio-btn_{{i}}\">{{item.value.title}}</label>\r\n </div>\r\n </div>\r\n</div>" }]
1176
1205
  }], ctorParameters: function () { return [{ type: i1.FormBuilder }, { type: SurveyLibService }, { type: i3.Store }]; }, propDecorators: { setQuestion: [{
1177
1206
  type: Input
1178
1207
  }] } });
@@ -1198,13 +1227,13 @@ class QuestionDropdownMultiTemplateComponent {
1198
1227
  });
1199
1228
  value.questionAllInfo.surveyAnswers.forEach(surveryAnswer => {
1200
1229
  this.fCtrls.answerArray.push(this._formBuilder.group({
1201
- id: [surveryAnswer.answerId],
1202
- title: [surveryAnswer.answerTitle],
1203
- isSelected: [false]
1230
+ id: new FormControl(surveryAnswer.answerId),
1231
+ title: new FormControl(surveryAnswer.answerTitle),
1232
+ isSelected: new FormControl(false)
1204
1233
  }));
1205
1234
  });
1206
1235
  if (value.isRequired == true) {
1207
- this.fCtrls.answer.addValidators([Validators$1.required]);
1236
+ this.fCtrls.answer.addValidators([Validators.required]);
1208
1237
  this.fCtrls.answer.updateValueAndValidity();
1209
1238
  }
1210
1239
  }
@@ -1215,14 +1244,14 @@ class QuestionDropdownMultiTemplateComponent {
1215
1244
  this._Store = _Store;
1216
1245
  this.elemId = v4();
1217
1246
  this.rForm = this._formBuilder.group({
1218
- id: [null],
1219
- name: [null],
1220
- title: [null],
1221
- typeId: [null],
1222
- description: [null],
1223
- answer: [null],
1224
- isDisabled: [false],
1225
- isShow: [true],
1247
+ id: new FormControl(null),
1248
+ name: new FormControl(null),
1249
+ title: new FormControl(null),
1250
+ typeId: new FormControl(null),
1251
+ description: new FormControl(null),
1252
+ answer: new FormControl(null),
1253
+ isDisabled: new FormControl(false),
1254
+ isShow: new FormControl(true),
1226
1255
  answerArray: this._formBuilder.array([])
1227
1256
  });
1228
1257
  }
@@ -1261,7 +1290,7 @@ class QuestionDropdownMultiTemplateComponent {
1261
1290
  return element;
1262
1291
  }
1263
1292
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: QuestionDropdownMultiTemplateComponent, deps: [{ token: i1.FormBuilder }, { token: SurveyLibService }, { token: i3.Store }], target: i0.ɵɵFactoryTarget.Component }); }
1264
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: QuestionDropdownMultiTemplateComponent, selector: "lib-question-dropdown-multi-template", inputs: { setQuestion: "setQuestion" }, ngImport: i0, template: "<div class=\"quastion\" [attr.id]=\"'question_'+fCtrls.id.value\" [ngClass]=\"{'invalid-question': fCtrls.answer.invalid , 'd-none':fCtrls.isShow.value != true}\">\r\n <h3 class=\"quastion-title \">\r\n <span [innerHTML]=\"fCtrls.title.value\"></span>\r\n <span style=\"color: red;\" *ngIf=\"surveyQuestion.isRequired\">*</span>\r\n </h3>\r\n <div class=\"text-quastion text-quastion__dropdown\">\r\n <ng-select [items]=\"this.fCtrls.answerArray.value\" bindValue=\"id\" bindLabel=\"title\" class=\"form-control\"\r\n [formControl]=\"convertToFormControl(fCtrls.answer)\" [disabled]=\"fCtrls.isDisabled.value\" [multiple]=\"true\">\r\n </ng-select>\r\n </div>\r\n</div>\r\n", styles: [".text-quastion .form-control{padding:10px}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i6.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "deselectOnClick"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }] }); }
1293
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: QuestionDropdownMultiTemplateComponent, selector: "lib-question-dropdown-multi-template", inputs: { setQuestion: "setQuestion" }, ngImport: i0, template: "<div class=\"quastion\" [attr.id]=\"'question_'+fCtrls.id.value\" [ngClass]=\"{'invalid-question': fCtrls.answer.invalid , 'd-none':fCtrls.isShow.value != true}\">\r\n <h3 class=\"quastion-title \">\r\n <span [innerHTML]=\"fCtrls.title.value\"></span>\r\n <span style=\"color: red;\" *ngIf=\"surveyQuestion.isRequired\">*</span>\r\n </h3>\r\n <div class=\"text-quastion text-quastion__dropdown\">\r\n <ng-select [items]=\"this.fCtrls.answerArray.value\" bindValue=\"id\" bindLabel=\"title\" class=\"form-control\"\r\n [formControl]=\"convertToFormControl(fCtrls.answer)\" [disabled]=\"fCtrls.isDisabled.value\" [multiple]=\"true\">\r\n </ng-select>\r\n </div>\r\n</div>\r\n", styles: [".text-quastion .form-control{padding:10px}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i5.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "deselectOnClick"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }] }); }
1265
1294
  }
1266
1295
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: QuestionDropdownMultiTemplateComponent, decorators: [{
1267
1296
  type: Component,
@@ -1397,14 +1426,14 @@ class QuestionCascadeTemplateComponent {
1397
1426
  }
1398
1427
  }
1399
1428
  identify(index, item) {
1400
- return item.id;
1429
+ return item.value.id;
1401
1430
  }
1402
1431
  setQuestions(value) {
1403
1432
  this.surveyQuestionArr.push(value);
1404
1433
  var group = this._formBuilder.group({
1405
- id: [value.questionId],
1406
- typeId: [value.questionTypeId],
1407
- answer: null
1434
+ id: new FormControl(value.questionId),
1435
+ typeId: new FormControl(value.questionTypeId),
1436
+ answer: new FormControl(null)
1408
1437
  });
1409
1438
  if (value.isRequired == true) {
1410
1439
  group.controls.answer.addValidators([Validators.required]);
@@ -1414,11 +1443,11 @@ class QuestionCascadeTemplateComponent {
1414
1443
  console.log(this.fCtrls.questionArr.value);
1415
1444
  }
1416
1445
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: QuestionCascadeTemplateComponent, deps: [{ token: i1.FormBuilder }, { token: SurveyLibService }, { token: ApiService }, { token: i3.Store }], target: i0.ɵɵFactoryTarget.Component }); }
1417
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: QuestionCascadeTemplateComponent, selector: "lib-question-cascade-template", inputs: { pageId: "pageId", questionGroupId: "questionGroupId", isPre: "isPre", surveyLanguageId: "surveyLanguageId", applicantKey: "applicantKey", setQuestion: "setQuestion" }, ngImport: i0, template: "<ng-container *ngFor=\"let item of questionFormArray.value ; trackBy:identify ; let i = index\">\r\n <lib-question-dropdown-template #questionDropdownTemplate [setQuestion]=\"(pageQuestions$ |async) |findQuestion :item.id \"\r\n (emitter)=\"onUpdateAnswer($event)\" >\r\n </lib-question-dropdown-template> \r\n</ng-container>", styles: [""], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: QuestionDropdownTemplateComponent, selector: "lib-question-dropdown-template", inputs: ["setQuestion"], outputs: ["emitter"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: FindQuestionPipe, name: "findQuestion" }] }); }
1446
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: QuestionCascadeTemplateComponent, selector: "lib-question-cascade-template", inputs: { pageId: "pageId", questionGroupId: "questionGroupId", isPre: "isPre", surveyLanguageId: "surveyLanguageId", applicantKey: "applicantKey", setQuestion: "setQuestion" }, ngImport: i0, template: "<ng-container *ngFor=\"let item of questionFormArray.controls; trackBy:identify ; let i = index\">\r\n <lib-question-dropdown-template #questionDropdownTemplate [setQuestion]=\"(pageQuestions$ |async) |findQuestion :item.value.id \"\r\n (emitter)=\"onUpdateAnswer($event)\" >\r\n </lib-question-dropdown-template> \r\n</ng-container>", styles: [""], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: QuestionDropdownTemplateComponent, selector: "lib-question-dropdown-template", inputs: ["setQuestion"], outputs: ["emitter"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: FindQuestionPipe, name: "findQuestion" }] }); }
1418
1447
  }
1419
1448
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: QuestionCascadeTemplateComponent, decorators: [{
1420
1449
  type: Component,
1421
- args: [{ selector: 'lib-question-cascade-template', template: "<ng-container *ngFor=\"let item of questionFormArray.value ; trackBy:identify ; let i = index\">\r\n <lib-question-dropdown-template #questionDropdownTemplate [setQuestion]=\"(pageQuestions$ |async) |findQuestion :item.id \"\r\n (emitter)=\"onUpdateAnswer($event)\" >\r\n </lib-question-dropdown-template> \r\n</ng-container>" }]
1450
+ args: [{ selector: 'lib-question-cascade-template', template: "<ng-container *ngFor=\"let item of questionFormArray.controls; trackBy:identify ; let i = index\">\r\n <lib-question-dropdown-template #questionDropdownTemplate [setQuestion]=\"(pageQuestions$ |async) |findQuestion :item.value.id \"\r\n (emitter)=\"onUpdateAnswer($event)\" >\r\n </lib-question-dropdown-template> \r\n</ng-container>" }]
1422
1451
  }], ctorParameters: function () { return [{ type: i1.FormBuilder }, { type: SurveyLibService }, { type: ApiService }, { type: i3.Store }]; }, propDecorators: { pageId: [{
1423
1452
  type: Input
1424
1453
  }], questionGroupId: [{
@@ -1433,6 +1462,120 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImpor
1433
1462
  type: Input
1434
1463
  }] } });
1435
1464
 
1465
+ class QuestionFeedbackTemplateComponent {
1466
+ get fCtrls() {
1467
+ return this.rForm.controls;
1468
+ }
1469
+ get questionTypeEnum() {
1470
+ return QuestionTypeEnum;
1471
+ }
1472
+ get inputTypeEnum() {
1473
+ return InputTypeEnum;
1474
+ }
1475
+ set setQuestion(value) {
1476
+ if (!this.surveyQuestion) {
1477
+ this.surveyQuestion = value.questionAllInfo;
1478
+ this.rForm.patchValue({
1479
+ id: value.questionId,
1480
+ name: value.questionAllInfo.questionName,
1481
+ title: value.questionAllInfo.questionTitle,
1482
+ typeId: value.questionAllInfo.questionTypeId,
1483
+ description: value.questionAllInfo.questionDescription,
1484
+ isDisabled: value.questionAllInfo.isReadOnly,
1485
+ isShow: value.questionAllInfo.isVisable
1486
+ });
1487
+ if (value.questionAllInfo.surveyAnswers[0]?.answerId != null && value.questionAllInfo.surveyAnswers[0]?.answerId != undefined) {
1488
+ this.fCtrls.surveyAnswerId.setValue(value.questionAllInfo.surveyAnswers[0].answerId);
1489
+ if (value.questionAllInfo.surveyAnswers[0].evaluationTypeId == EvaluationTypeEnum.Stars) {
1490
+ this.fCtrls.inputTypeId.setValue(InputTypeEnum.Stars);
1491
+ }
1492
+ else if (value.questionAllInfo.surveyAnswers[0].evaluationTypeId == EvaluationTypeEnum.Pagination) {
1493
+ this.fCtrls.inputTypeId.setValue(InputTypeEnum.Pagination);
1494
+ }
1495
+ }
1496
+ if (value.isRequired == true) {
1497
+ this.fCtrls.answer.addValidators([Validators.required]);
1498
+ this.fCtrls.answer.updateValueAndValidity();
1499
+ }
1500
+ this.toggleEnableAnswer(value.questionAllInfo.isReadOnly);
1501
+ }
1502
+ }
1503
+ set isDisabled(value) {
1504
+ this.toggleEnableAnswer(value);
1505
+ }
1506
+ constructor(_formBuilder, _surveyLibService, _Store) {
1507
+ this._formBuilder = _formBuilder;
1508
+ this._surveyLibService = _surveyLibService;
1509
+ this._Store = _Store;
1510
+ this.isArabicLang = false;
1511
+ this.rForm = this._formBuilder.group({
1512
+ id: new FormControl(null),
1513
+ name: new FormControl(null),
1514
+ title: new FormControl(null),
1515
+ typeId: new FormControl(null),
1516
+ description: new FormControl(null),
1517
+ surveyAnswerId: new FormControl(null),
1518
+ answer: new FormControl(null),
1519
+ isDisabled: new FormControl(false),
1520
+ isShow: new FormControl(true),
1521
+ inputTypeId: new FormControl(null),
1522
+ });
1523
+ }
1524
+ ngOnInit() {
1525
+ this.fCtrls.answer.valueChanges.pipe().pipe(debounceTime(200), distinctUntilChanged()).subscribe(value => {
1526
+ setTimeout(() => {
1527
+ const formValue = this.rForm.value;
1528
+ this._Store.dispatch(surveyActions.updateQuestionAnswer({
1529
+ questionId: formValue.id,
1530
+ answer: value,
1531
+ isValid: this.fCtrls.answer.valid
1532
+ }));
1533
+ }, 100);
1534
+ });
1535
+ this._Store.select(questionSelectors.pageQuestions).pipe(map(arr => arr.find(x => x.questionId == this.fCtrls.id.value)))
1536
+ .pipe(filter(x => x != null), pairwise()).subscribe(value => {
1537
+ const oldValue = value[0];
1538
+ const newValue = value[1];
1539
+ //updated answer
1540
+ if (oldValue?.answerText != newValue?.answerText) {
1541
+ this.fCtrls.answer.setValue(newValue?.answerText, { emitEvent: false });
1542
+ }
1543
+ //updated isDisabled
1544
+ if (oldValue?.isDisabled != newValue?.isDisabled) {
1545
+ this.fCtrls.isDisabled.setValue(newValue?.isDisabled);
1546
+ }
1547
+ //updated isShow
1548
+ if (oldValue?.isShow != newValue?.isShow) {
1549
+ this.fCtrls.isShow.setValue(newValue?.isShow);
1550
+ if (newValue?.isShow == false) {
1551
+ this.fCtrls.answer.setValue(null);
1552
+ }
1553
+ }
1554
+ });
1555
+ }
1556
+ toggleEnableAnswer(isReadOnly) {
1557
+ if (isReadOnly == true) {
1558
+ this.fCtrls.answer.disable();
1559
+ }
1560
+ else {
1561
+ this.fCtrls.answer.enable();
1562
+ }
1563
+ this.fCtrls.answer.updateValueAndValidity();
1564
+ }
1565
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: QuestionFeedbackTemplateComponent, deps: [{ token: i1.FormBuilder }, { token: SurveyLibService }, { token: i3.Store }], target: i0.ɵɵFactoryTarget.Component }); }
1566
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: QuestionFeedbackTemplateComponent, selector: "lib-question-feedback-template", inputs: { isArabicLang: "isArabicLang", setQuestion: "setQuestion", isDisabled: "isDisabled" }, ngImport: i0, template: "<div class=\"quastion\" [formGroup]=\"rForm\" [attr.id]=\"'question_'+fCtrls.id.value\"\n [ngClass]=\"{'invalid-question': fCtrls.answer.invalid , 'd-none':fCtrls.isShow.value != true}\">\n <h3 class=\"quastion-title \">\n <span [innerHTML]=\"surveyQuestion?.questionTitle\"></span>\n <span style=\"color: red;\" *ngIf=\"surveyQuestion.isRequired\">*</span>\n </h3>\n <div class=\"text-quastion \" >\n <ng-container *ngIf=\"fCtrls.inputTypeId.value == inputTypeEnum.Stars else paginationTemplate\">\n <rating [formControl]=\"fCtrls.answer\" [max]=\"surveyQuestion?.surveyAnswers[0].maxValue\"></rating>\n </ng-container>\n <ng-template #paginationTemplate>\n <div style=\"margin-top: 20px;\">\n <pagination nextText=\">\" previousText=\"<\" [formControl]=\"fCtrls.answer\"\n [itemsPerPage]=\"1\" [totalItems]=\"surveyQuestion?.surveyAnswers[0].maxValue\" [maxSize]=\"10\"></pagination>\n </div>\n </ng-template>\n </div>", styles: [":host ::ng-deep rating .bs-rating-star{font-size:45px;color:#ffc107}:host ::ng-deep rating .bs-rating-star.active{color:#ffc107}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i5$1.RatingComponent, selector: "rating", inputs: ["max", "readonly", "titles", "customTemplate"], outputs: ["onHover", "onLeave"] }, { kind: "component", type: i6.PaginationComponent, selector: "pagination", inputs: ["align", "maxSize", "boundaryLinks", "directionLinks", "firstText", "previousText", "nextText", "lastText", "rotate", "pageBtnClass", "disabled", "customPageTemplate", "customNextTemplate", "customPreviousTemplate", "customFirstTemplate", "customLastTemplate", "itemsPerPage", "totalItems"], outputs: ["numPages", "pageChanged"] }] }); }
1567
+ }
1568
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: QuestionFeedbackTemplateComponent, decorators: [{
1569
+ type: Component,
1570
+ args: [{ selector: 'lib-question-feedback-template', template: "<div class=\"quastion\" [formGroup]=\"rForm\" [attr.id]=\"'question_'+fCtrls.id.value\"\n [ngClass]=\"{'invalid-question': fCtrls.answer.invalid , 'd-none':fCtrls.isShow.value != true}\">\n <h3 class=\"quastion-title \">\n <span [innerHTML]=\"surveyQuestion?.questionTitle\"></span>\n <span style=\"color: red;\" *ngIf=\"surveyQuestion.isRequired\">*</span>\n </h3>\n <div class=\"text-quastion \" >\n <ng-container *ngIf=\"fCtrls.inputTypeId.value == inputTypeEnum.Stars else paginationTemplate\">\n <rating [formControl]=\"fCtrls.answer\" [max]=\"surveyQuestion?.surveyAnswers[0].maxValue\"></rating>\n </ng-container>\n <ng-template #paginationTemplate>\n <div style=\"margin-top: 20px;\">\n <pagination nextText=\">\" previousText=\"<\" [formControl]=\"fCtrls.answer\"\n [itemsPerPage]=\"1\" [totalItems]=\"surveyQuestion?.surveyAnswers[0].maxValue\" [maxSize]=\"10\"></pagination>\n </div>\n </ng-template>\n </div>", styles: [":host ::ng-deep rating .bs-rating-star{font-size:45px;color:#ffc107}:host ::ng-deep rating .bs-rating-star.active{color:#ffc107}\n"] }]
1571
+ }], ctorParameters: function () { return [{ type: i1.FormBuilder }, { type: SurveyLibService }, { type: i3.Store }]; }, propDecorators: { isArabicLang: [{
1572
+ type: Input
1573
+ }], setQuestion: [{
1574
+ type: Input
1575
+ }], isDisabled: [{
1576
+ type: Input
1577
+ }] } });
1578
+
1436
1579
  class FilterQuestionPipe {
1437
1580
  transform(arr, questionGroupId) {
1438
1581
  return arr.filter(x => x.questionGroupId == questionGroupId && x.parentQuestionId == null);
@@ -1451,6 +1594,10 @@ class SurveryLibComponent {
1451
1594
  get fCtrls() {
1452
1595
  return this.rForm.controls;
1453
1596
  }
1597
+ get isFirstPage() {
1598
+ const formValue = this.rForm.value;
1599
+ return formValue.showedSurveyPages.findIndex(x => x == formValue.currentPageId) == 0;
1600
+ }
1454
1601
  get questionTypeEnum() {
1455
1602
  return QuestionTypeEnum;
1456
1603
  }
@@ -1480,7 +1627,7 @@ class SurveryLibComponent {
1480
1627
  this.surveyResultEmit = new EventEmitter();
1481
1628
  this.selectLanguageEmit = new EventEmitter();
1482
1629
  this.rForm = this._formBuilder.group({
1483
- currentPageId: new FormControl(0),
1630
+ currentPageId: new FormControl(null),
1484
1631
  showedSurveyPages: new FormControl([])
1485
1632
  });
1486
1633
  this._Store.select(questionSelectors.questionAnswers).subscribe(arr => {
@@ -1571,13 +1718,13 @@ class SurveryLibComponent {
1571
1718
  }
1572
1719
  return null;
1573
1720
  }
1574
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SurveryLibComponent, deps: [{ token: SurveyLibService }, { token: i3.Store }, { token: i5.FormBuilder }, { token: CheckRuleExpsUsecase }], target: i0.ɵɵFactoryTarget.Component }); }
1575
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SurveryLibComponent, selector: "lib-survery-lib", inputs: { isPre: "isPre", surveyLanguageId: "surveyLanguageId", applicantKey: "applicantKey", isArabicLang: "isArabicLang" }, outputs: { surveyResultEmit: "surveyResultEmit", selectLanguageEmit: "selectLanguageEmit" }, ngImport: i0, template: "<div id=\"survery-card-{{surveryLibraryDivId}}\" class=\"survay-card\">\r\n <div [attr.id]=\"'survey-page_'+fCtrls.currentPageId.value\">\r\n <ng-container *ngFor=\"let item of (pageQuestionGroups$ | async)\">\r\n <div class=\"survay-card\">\r\n <div class=\"survay-card-body\">\r\n <div class=\"survay-group\">\r\n <div class=\"title\">\r\n <h2 class=\"group-title\" [innerHTML]=\"item.questionGroupName\">\r\n </h2>\r\n <span class=\"group-sub-title \" [innerHTML]=\"item.questionGroupDescription\">\r\n </span>\r\n </div>\r\n <ng-container\r\n *ngFor=\"let question of ((pageQuestions$|async) |filterQuestion : item.questionGroupId); trackBy:questionIdentify\">\r\n <lib-question-boolean-template #questionBooleanTemplate [setQuestion]=\"question\"\r\n *ngIf=\"question.questionType == questionTypeEnum.Boolean\">\r\n </lib-question-boolean-template>\r\n\r\n <lib-question-text-template #questionTextTemplate [setQuestion]=\"question\"\r\n *ngIf=\"question.questionType == questionTypeEnum.TextInput\"\r\n [isArabicLang]=\"isArabicLang\"></lib-question-text-template>\r\n\r\n <lib-question-radio-button-template #questionRadioButtonTemplate [setQuestion]=\"question\"\r\n *ngIf=\"question.questionType == questionTypeEnum.RadioButton\">\r\n </lib-question-radio-button-template>\r\n\r\n <lib-question-dropdown-template #questionDropdownTemplate [setQuestion]=\"question\"\r\n *ngIf=\"question.questionType == questionTypeEnum.DropDown\"></lib-question-dropdown-template>\r\n\r\n <lib-question-dropdown-multi-template [setQuestion]=\"question\"\r\n *ngIf=\"question.questionType == questionTypeEnum.DropDownMulti\">\r\n </lib-question-dropdown-multi-template>\r\n\r\n <lib-question-check-box-template #questionCheckBoxTemplate [setQuestion]=\"question\"\r\n *ngIf=\"question.questionType == questionTypeEnum.CheckBox\">\r\n </lib-question-check-box-template>\r\n\r\n <lib-question-matrix-template #questionMatrixTemplate [setQuestion]=\"question\"\r\n *ngIf=\"question.questionType == questionTypeEnum.Matrix\">\r\n </lib-question-matrix-template>\r\n\r\n <lib-question-cascade-template #questionCascadeTemplate [setQuestion]=\"question\"\r\n *ngIf=\"question.questionType == questionTypeEnum.Cascade\"\r\n [applicantKey]=\"applicantKey\" [isPre]=\"isPre\" [surveyLanguageId]=\"surveyLanguageId\"\r\n [pageId]=\"question.surveyPageId\" [questionGroupId]=\"question.questionGroupId\"></lib-question-cascade-template>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n <div class=\"survay-card-footr\" *ngIf=\"fCtrls.showedSurveyPages.value.length > 0\">\r\n <div class=\"container\" style=\" justify-content: start;\">\r\n <div class=\"survay-pagination fw-bold\">\r\n <span>{{ curruntShowedSurveyPages$ | async}}</span>\r\n <span class=\"ms-2 me-2\">{{isArabicLang ? '\u0645\u0646' : 'of'}} </span>\r\n <span>{{fCtrls.showedSurveyPages.value.length}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [".disable__btn{background-color:gray!important;cursor:not-allowed}.quastion{padding:10px}.quastion .quastion-title{color:var(--dark-100, #363636);text-align:right;font-family:Almarai;font-size:18px;font-style:normal;font-weight:700;line-height:20.6px}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: QuestionTextTemplateComponent, selector: "lib-question-text-template", inputs: ["isArabicLang", "setQuestion", "isDisabled"] }, { kind: "component", type: QuestionRadioButtonTemplateComponent, selector: "lib-question-radio-button-template", inputs: ["setQuestion"] }, { kind: "component", type: QuestionCheckBoxTemplateComponent, selector: "lib-question-check-box-template", inputs: ["setQuestion"] }, { kind: "component", type: QuestionDropdownTemplateComponent, selector: "lib-question-dropdown-template", inputs: ["setQuestion"], outputs: ["emitter"] }, { kind: "component", type: QuestionMatrixTemplateComponent, selector: "lib-question-matrix-template", inputs: ["setQuestion"] }, { kind: "component", type: QuestionBooleanTemplateComponent, selector: "lib-question-boolean-template", inputs: ["setQuestion"] }, { kind: "component", type: QuestionDropdownMultiTemplateComponent, selector: "lib-question-dropdown-multi-template", inputs: ["setQuestion"] }, { kind: "component", type: QuestionCascadeTemplateComponent, selector: "lib-question-cascade-template", inputs: ["pageId", "questionGroupId", "isPre", "surveyLanguageId", "applicantKey", "setQuestion"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: FilterQuestionPipe, name: "filterQuestion" }] }); }
1721
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SurveryLibComponent, deps: [{ token: SurveyLibService }, { token: i3.Store }, { token: i1.FormBuilder }, { token: CheckRuleExpsUsecase }], target: i0.ɵɵFactoryTarget.Component }); }
1722
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.7", type: SurveryLibComponent, selector: "lib-survery-lib", inputs: { isPre: "isPre", surveyLanguageId: "surveyLanguageId", applicantKey: "applicantKey", isArabicLang: "isArabicLang" }, outputs: { surveyResultEmit: "surveyResultEmit", selectLanguageEmit: "selectLanguageEmit" }, ngImport: i0, template: "<div id=\"survery-card-{{surveryLibraryDivId}}\" class=\"survay-card\">\r\n <div [attr.id]=\"'survey-page_'+fCtrls.currentPageId.value\">\r\n <ng-container *ngFor=\"let item of (pageQuestionGroups$ | async)\">\r\n <div class=\"survay-card\">\r\n <div class=\"survay-card-body\">\r\n <div class=\"survay-group\">\r\n <div class=\"title\">\r\n <h2 class=\"group-title\" [innerHTML]=\"item.questionGroupName\">\r\n </h2>\r\n <span class=\"group-sub-title \" [innerHTML]=\"item.questionGroupDescription\">\r\n </span>\r\n </div>\r\n <ng-container\r\n *ngFor=\"let question of ((pageQuestions$|async) |filterQuestion : item.questionGroupId); trackBy:questionIdentify\">\r\n <lib-question-boolean-template #questionBooleanTemplate [setQuestion]=\"question\"\r\n *ngIf=\"question.questionType == questionTypeEnum.Boolean\">\r\n </lib-question-boolean-template>\r\n\r\n <lib-question-text-template #questionTextTemplate [setQuestion]=\"question\"\r\n *ngIf=\"question.questionType == questionTypeEnum.TextInput\"\r\n [isArabicLang]=\"isArabicLang\"></lib-question-text-template>\r\n\r\n <lib-question-feedback-template #questionFeedTemplate [setQuestion]=\"question\"\r\n *ngIf=\"question.questionType == questionTypeEnum.FeedBack\"\r\n [isArabicLang]=\"isArabicLang\"></lib-question-feedback-template>\r\n\r\n <lib-question-radio-button-template #questionRadioButtonTemplate [setQuestion]=\"question\"\r\n *ngIf=\"question.questionType == questionTypeEnum.RadioButton\">\r\n </lib-question-radio-button-template>\r\n\r\n <lib-question-dropdown-template #questionDropdownTemplate [setQuestion]=\"question\"\r\n *ngIf=\"question.questionType == questionTypeEnum.DropDown\"></lib-question-dropdown-template>\r\n\r\n <lib-question-dropdown-multi-template [setQuestion]=\"question\"\r\n *ngIf=\"question.questionType == questionTypeEnum.DropDownMulti\">\r\n </lib-question-dropdown-multi-template>\r\n\r\n <lib-question-check-box-template #questionCheckBoxTemplate [setQuestion]=\"question\"\r\n *ngIf=\"question.questionType == questionTypeEnum.CheckBox\">\r\n </lib-question-check-box-template>\r\n\r\n <lib-question-matrix-template #questionMatrixTemplate [setQuestion]=\"question\"\r\n *ngIf=\"question.questionType == questionTypeEnum.Matrix\">\r\n </lib-question-matrix-template>\r\n\r\n <lib-question-cascade-template #questionCascadeTemplate [setQuestion]=\"question\"\r\n *ngIf=\"question.questionType == questionTypeEnum.Cascade\"\r\n [applicantKey]=\"applicantKey\" [isPre]=\"isPre\" [surveyLanguageId]=\"surveyLanguageId\"\r\n [pageId]=\"question.surveyPageId\" [questionGroupId]=\"question.questionGroupId\"></lib-question-cascade-template>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n <div class=\"survay-card-footr\" *ngIf=\"fCtrls.showedSurveyPages.value.length > 0\">\r\n <div class=\"container\" style=\" justify-content: start;\">\r\n <div class=\"survay-pagination fw-bold\">\r\n <span>{{ curruntShowedSurveyPages$ | async}}</span>\r\n <span class=\"ms-2 me-2\">{{isArabicLang ? '\u0645\u0646' : 'of'}} </span>\r\n <span>{{fCtrls.showedSurveyPages.value.length}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [".disable__btn{background-color:gray!important;cursor:not-allowed}.quastion{padding:10px}.quastion .quastion-title{color:var(--dark-100, #363636);text-align:right;font-family:Almarai;font-size:18px;font-style:normal;font-weight:700;line-height:20.6px}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: QuestionTextTemplateComponent, selector: "lib-question-text-template", inputs: ["isArabicLang", "setQuestion", "isDisabled"] }, { kind: "component", type: QuestionRadioButtonTemplateComponent, selector: "lib-question-radio-button-template", inputs: ["setQuestion"] }, { kind: "component", type: QuestionCheckBoxTemplateComponent, selector: "lib-question-check-box-template", inputs: ["setQuestion"] }, { kind: "component", type: QuestionDropdownTemplateComponent, selector: "lib-question-dropdown-template", inputs: ["setQuestion"], outputs: ["emitter"] }, { kind: "component", type: QuestionMatrixTemplateComponent, selector: "lib-question-matrix-template", inputs: ["setQuestion"] }, { kind: "component", type: QuestionBooleanTemplateComponent, selector: "lib-question-boolean-template", inputs: ["setQuestion"] }, { kind: "component", type: QuestionDropdownMultiTemplateComponent, selector: "lib-question-dropdown-multi-template", inputs: ["setQuestion"] }, { kind: "component", type: QuestionCascadeTemplateComponent, selector: "lib-question-cascade-template", inputs: ["pageId", "questionGroupId", "isPre", "surveyLanguageId", "applicantKey", "setQuestion"] }, { kind: "component", type: QuestionFeedbackTemplateComponent, selector: "lib-question-feedback-template", inputs: ["isArabicLang", "setQuestion", "isDisabled"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: FilterQuestionPipe, name: "filterQuestion" }] }); }
1576
1723
  }
1577
1724
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SurveryLibComponent, decorators: [{
1578
1725
  type: Component,
1579
- args: [{ selector: 'lib-survery-lib', template: "<div id=\"survery-card-{{surveryLibraryDivId}}\" class=\"survay-card\">\r\n <div [attr.id]=\"'survey-page_'+fCtrls.currentPageId.value\">\r\n <ng-container *ngFor=\"let item of (pageQuestionGroups$ | async)\">\r\n <div class=\"survay-card\">\r\n <div class=\"survay-card-body\">\r\n <div class=\"survay-group\">\r\n <div class=\"title\">\r\n <h2 class=\"group-title\" [innerHTML]=\"item.questionGroupName\">\r\n </h2>\r\n <span class=\"group-sub-title \" [innerHTML]=\"item.questionGroupDescription\">\r\n </span>\r\n </div>\r\n <ng-container\r\n *ngFor=\"let question of ((pageQuestions$|async) |filterQuestion : item.questionGroupId); trackBy:questionIdentify\">\r\n <lib-question-boolean-template #questionBooleanTemplate [setQuestion]=\"question\"\r\n *ngIf=\"question.questionType == questionTypeEnum.Boolean\">\r\n </lib-question-boolean-template>\r\n\r\n <lib-question-text-template #questionTextTemplate [setQuestion]=\"question\"\r\n *ngIf=\"question.questionType == questionTypeEnum.TextInput\"\r\n [isArabicLang]=\"isArabicLang\"></lib-question-text-template>\r\n\r\n <lib-question-radio-button-template #questionRadioButtonTemplate [setQuestion]=\"question\"\r\n *ngIf=\"question.questionType == questionTypeEnum.RadioButton\">\r\n </lib-question-radio-button-template>\r\n\r\n <lib-question-dropdown-template #questionDropdownTemplate [setQuestion]=\"question\"\r\n *ngIf=\"question.questionType == questionTypeEnum.DropDown\"></lib-question-dropdown-template>\r\n\r\n <lib-question-dropdown-multi-template [setQuestion]=\"question\"\r\n *ngIf=\"question.questionType == questionTypeEnum.DropDownMulti\">\r\n </lib-question-dropdown-multi-template>\r\n\r\n <lib-question-check-box-template #questionCheckBoxTemplate [setQuestion]=\"question\"\r\n *ngIf=\"question.questionType == questionTypeEnum.CheckBox\">\r\n </lib-question-check-box-template>\r\n\r\n <lib-question-matrix-template #questionMatrixTemplate [setQuestion]=\"question\"\r\n *ngIf=\"question.questionType == questionTypeEnum.Matrix\">\r\n </lib-question-matrix-template>\r\n\r\n <lib-question-cascade-template #questionCascadeTemplate [setQuestion]=\"question\"\r\n *ngIf=\"question.questionType == questionTypeEnum.Cascade\"\r\n [applicantKey]=\"applicantKey\" [isPre]=\"isPre\" [surveyLanguageId]=\"surveyLanguageId\"\r\n [pageId]=\"question.surveyPageId\" [questionGroupId]=\"question.questionGroupId\"></lib-question-cascade-template>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n <div class=\"survay-card-footr\" *ngIf=\"fCtrls.showedSurveyPages.value.length > 0\">\r\n <div class=\"container\" style=\" justify-content: start;\">\r\n <div class=\"survay-pagination fw-bold\">\r\n <span>{{ curruntShowedSurveyPages$ | async}}</span>\r\n <span class=\"ms-2 me-2\">{{isArabicLang ? '\u0645\u0646' : 'of'}} </span>\r\n <span>{{fCtrls.showedSurveyPages.value.length}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [".disable__btn{background-color:gray!important;cursor:not-allowed}.quastion{padding:10px}.quastion .quastion-title{color:var(--dark-100, #363636);text-align:right;font-family:Almarai;font-size:18px;font-style:normal;font-weight:700;line-height:20.6px}\n"] }]
1580
- }], ctorParameters: function () { return [{ type: SurveyLibService }, { type: i3.Store }, { type: i5.FormBuilder }, { type: CheckRuleExpsUsecase }]; }, propDecorators: { isPre: [{
1726
+ args: [{ selector: 'lib-survery-lib', template: "<div id=\"survery-card-{{surveryLibraryDivId}}\" class=\"survay-card\">\r\n <div [attr.id]=\"'survey-page_'+fCtrls.currentPageId.value\">\r\n <ng-container *ngFor=\"let item of (pageQuestionGroups$ | async)\">\r\n <div class=\"survay-card\">\r\n <div class=\"survay-card-body\">\r\n <div class=\"survay-group\">\r\n <div class=\"title\">\r\n <h2 class=\"group-title\" [innerHTML]=\"item.questionGroupName\">\r\n </h2>\r\n <span class=\"group-sub-title \" [innerHTML]=\"item.questionGroupDescription\">\r\n </span>\r\n </div>\r\n <ng-container\r\n *ngFor=\"let question of ((pageQuestions$|async) |filterQuestion : item.questionGroupId); trackBy:questionIdentify\">\r\n <lib-question-boolean-template #questionBooleanTemplate [setQuestion]=\"question\"\r\n *ngIf=\"question.questionType == questionTypeEnum.Boolean\">\r\n </lib-question-boolean-template>\r\n\r\n <lib-question-text-template #questionTextTemplate [setQuestion]=\"question\"\r\n *ngIf=\"question.questionType == questionTypeEnum.TextInput\"\r\n [isArabicLang]=\"isArabicLang\"></lib-question-text-template>\r\n\r\n <lib-question-feedback-template #questionFeedTemplate [setQuestion]=\"question\"\r\n *ngIf=\"question.questionType == questionTypeEnum.FeedBack\"\r\n [isArabicLang]=\"isArabicLang\"></lib-question-feedback-template>\r\n\r\n <lib-question-radio-button-template #questionRadioButtonTemplate [setQuestion]=\"question\"\r\n *ngIf=\"question.questionType == questionTypeEnum.RadioButton\">\r\n </lib-question-radio-button-template>\r\n\r\n <lib-question-dropdown-template #questionDropdownTemplate [setQuestion]=\"question\"\r\n *ngIf=\"question.questionType == questionTypeEnum.DropDown\"></lib-question-dropdown-template>\r\n\r\n <lib-question-dropdown-multi-template [setQuestion]=\"question\"\r\n *ngIf=\"question.questionType == questionTypeEnum.DropDownMulti\">\r\n </lib-question-dropdown-multi-template>\r\n\r\n <lib-question-check-box-template #questionCheckBoxTemplate [setQuestion]=\"question\"\r\n *ngIf=\"question.questionType == questionTypeEnum.CheckBox\">\r\n </lib-question-check-box-template>\r\n\r\n <lib-question-matrix-template #questionMatrixTemplate [setQuestion]=\"question\"\r\n *ngIf=\"question.questionType == questionTypeEnum.Matrix\">\r\n </lib-question-matrix-template>\r\n\r\n <lib-question-cascade-template #questionCascadeTemplate [setQuestion]=\"question\"\r\n *ngIf=\"question.questionType == questionTypeEnum.Cascade\"\r\n [applicantKey]=\"applicantKey\" [isPre]=\"isPre\" [surveyLanguageId]=\"surveyLanguageId\"\r\n [pageId]=\"question.surveyPageId\" [questionGroupId]=\"question.questionGroupId\"></lib-question-cascade-template>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n <div class=\"survay-card-footr\" *ngIf=\"fCtrls.showedSurveyPages.value.length > 0\">\r\n <div class=\"container\" style=\" justify-content: start;\">\r\n <div class=\"survay-pagination fw-bold\">\r\n <span>{{ curruntShowedSurveyPages$ | async}}</span>\r\n <span class=\"ms-2 me-2\">{{isArabicLang ? '\u0645\u0646' : 'of'}} </span>\r\n <span>{{fCtrls.showedSurveyPages.value.length}}</span>\r\n </div>\r\n </div>\r\n </div>\r\n</div>", styles: [".disable__btn{background-color:gray!important;cursor:not-allowed}.quastion{padding:10px}.quastion .quastion-title{color:var(--dark-100, #363636);text-align:right;font-family:Almarai;font-size:18px;font-style:normal;font-weight:700;line-height:20.6px}\n"] }]
1727
+ }], ctorParameters: function () { return [{ type: SurveyLibService }, { type: i3.Store }, { type: i1.FormBuilder }, { type: CheckRuleExpsUsecase }]; }, propDecorators: { isPre: [{
1581
1728
  type: Input
1582
1729
  }], surveyLanguageId: [{
1583
1730
  type: Input
@@ -1750,11 +1897,12 @@ class SurveryLibModule {
1750
1897
  TextBoxTypeAttrPipe,
1751
1898
  QuestionCascadeTemplateComponent,
1752
1899
  MaskedForMinMaxDirective,
1753
- FindQuestionPipe], imports: [CommonModule, HttpClientModule, ReactiveFormsModule, FormsModule, NgsFormsModule, NgSelectModule, i3.StoreFeatureModule, i2.EffectsFeatureModule], exports: [SurveryLibComponent,
1900
+ FindQuestionPipe,
1901
+ QuestionFeedbackTemplateComponent], imports: [CommonModule, HttpClientModule, ReactiveFormsModule, FormsModule, NgSelectModule, i3.StoreFeatureModule, i2.EffectsFeatureModule, RatingModule, PaginationModule], exports: [SurveryLibComponent,
1754
1902
  StoreModule] }); }
1755
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SurveryLibModule, imports: [CommonModule, HttpClientModule, ReactiveFormsModule, FormsModule, NgsFormsModule, NgSelectModule,
1903
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SurveryLibModule, imports: [CommonModule, HttpClientModule, ReactiveFormsModule, FormsModule, NgSelectModule,
1756
1904
  StoreModule.forFeature('survey-lib', surveyReducer),
1757
- EffectsModule.forFeature([]), StoreModule] }); }
1905
+ EffectsModule.forFeature([]), RatingModule, PaginationModule, StoreModule] }); }
1758
1906
  }
1759
1907
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImport: i0, type: SurveryLibModule, decorators: [{
1760
1908
  type: NgModule,
@@ -1774,12 +1922,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.7", ngImpor
1774
1922
  TextBoxTypeAttrPipe,
1775
1923
  QuestionCascadeTemplateComponent,
1776
1924
  MaskedForMinMaxDirective,
1777
- FindQuestionPipe
1925
+ FindQuestionPipe,
1926
+ QuestionFeedbackTemplateComponent
1778
1927
  ],
1779
1928
  imports: [
1780
- CommonModule, HttpClientModule, ReactiveFormsModule, FormsModule, NgsFormsModule, NgSelectModule,
1929
+ CommonModule, HttpClientModule, ReactiveFormsModule, FormsModule, NgSelectModule,
1781
1930
  StoreModule.forFeature('survey-lib', surveyReducer),
1782
- EffectsModule.forFeature([])
1931
+ EffectsModule.forFeature([]), RatingModule, PaginationModule
1783
1932
  ],
1784
1933
  exports: [
1785
1934
  SurveryLibComponent,