@touchpoll/tp-survey 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/component/answer/answer.ol/answer.ol.component.mjs +6 -5
- package/esm2022/lib/component/answer/container.answer/container.answer.component.mjs +4 -4
- package/esm2022/lib/component/answer/container.answer/container.answer.validator.mjs +8 -2
- package/esm2022/lib/pipe/multi.lang.object.to.html/multi.lang.object.to.html.pipe.mjs +8 -2
- package/fesm2022/touchpoll-tp-survey.mjs +22 -9
- package/fesm2022/touchpoll-tp-survey.mjs.map +1 -1
- package/lib/component/answer/container.answer/container.answer.validator.d.ts +1 -1
- package/package.json +1 -1
|
@@ -11,7 +11,7 @@ import { MatButton } from '@angular/material/button';
|
|
|
11
11
|
import { MatRadioGroup, MatRadioButton } from '@angular/material/radio';
|
|
12
12
|
import * as i1$2 from '@angular/forms';
|
|
13
13
|
import { FormControl, NG_VALUE_ACCESSOR, ReactiveFormsModule, FormGroup, FormArray, FormsModule } from '@angular/forms';
|
|
14
|
-
import { MatFormField } from '@angular/material/form-field';
|
|
14
|
+
import { MatFormField, MatPrefix } from '@angular/material/form-field';
|
|
15
15
|
import { MatInput } from '@angular/material/input';
|
|
16
16
|
import { MatCheckbox } from '@angular/material/checkbox';
|
|
17
17
|
import * as i1$1 from '@angular/cdk/layout';
|
|
@@ -170,12 +170,18 @@ const answerODValidator = (minValue, maxValue) => (control) => {
|
|
|
170
170
|
//ошибок нет, всё корректно
|
|
171
171
|
return null;
|
|
172
172
|
};
|
|
173
|
-
const answerOLValidator = () => (control) => {
|
|
173
|
+
const answerOLValidator = (isPhoneNumber) => (control) => {
|
|
174
174
|
const text = typeof control.value !== 'string' ? '' : control.value.trim();
|
|
175
175
|
//Нужно чтобы в поле ввели хоть что-то.
|
|
176
176
|
if (text.length === 0) {
|
|
177
177
|
return { answerOlAnswerError: true };
|
|
178
178
|
}
|
|
179
|
+
if (isPhoneNumber) {
|
|
180
|
+
const res = text.length === 9 && !isNaN(Number(text));
|
|
181
|
+
if (!res) {
|
|
182
|
+
return { answerOlTelephoneFormatError: true };
|
|
183
|
+
}
|
|
184
|
+
}
|
|
179
185
|
//ошибок нет, всё корректно
|
|
180
186
|
return null;
|
|
181
187
|
};
|
|
@@ -314,15 +320,21 @@ class MultiLangObjectToHtmlPipe {
|
|
|
314
320
|
this._logic = _logic;
|
|
315
321
|
}
|
|
316
322
|
transform(caption, language, logicCaptions) {
|
|
323
|
+
//сначала проверим есть ли текст у которого выполняется Expression.
|
|
317
324
|
if (Array.isArray(logicCaptions)) {
|
|
318
325
|
const correctLogicCaption = logicCaptions.find(logicCaption => this._logic.executeLogic(logicCaption.Expression));
|
|
319
326
|
const correctLogicCaptionLangObj = correctLogicCaption?.MultiLangCaptions.find(capt => capt.lang === language);
|
|
320
327
|
const text = correctLogicCaptionLangObj?._SYS_CaptionHTML ?? correctLogicCaptionLangObj?.CaptionHtml ?? '';
|
|
321
|
-
|
|
328
|
+
//если есть хоть какой-то текст - показываем его
|
|
329
|
+
if ((text ?? '').trim().length > 0) {
|
|
330
|
+
return this._sanitizer.bypassSecurityTrustHtml(text);
|
|
331
|
+
}
|
|
322
332
|
}
|
|
333
|
+
//если основой текст не указан, выходим
|
|
323
334
|
if (!Array.isArray(caption)) {
|
|
324
335
|
return '';
|
|
325
336
|
}
|
|
337
|
+
//ищем основной текс с нужным языком
|
|
326
338
|
const langObj = caption.find(capt => capt.lang === language);
|
|
327
339
|
const text = langObj?._SYS_CaptionHTML ?? langObj?.CaptionHtml ?? '';
|
|
328
340
|
return this._sanitizer.bypassSecurityTrustHtml(text);
|
|
@@ -887,7 +899,7 @@ class AnswerOLComponent extends AnswerMasterComponent {
|
|
|
887
899
|
useExisting: forwardRef(() => AnswerOLComponent),
|
|
888
900
|
multi: true
|
|
889
901
|
},
|
|
890
|
-
], usesInheritance: true, ngImport: i0, template: "<div class=\"container-main\">\r\n @if (telephoneInput()) {\r\n <mat-form-field appearance=\"outline\">\r\n <
|
|
902
|
+
], usesInheritance: true, ngImport: i0, template: "<div class=\"container-main\">\r\n @if (telephoneInput()) {\r\n <mat-form-field appearance=\"outline\">\r\n <input\r\n type=\"text\"\r\n inputmode=\"numeric\"\r\n matInput\r\n [formControl]=\"control\" tpSurveyFocusAndSelect>\r\n <span matTextPrefix>+380 </span>\r\n </mat-form-field>\r\n } @else {\r\n <mat-form-field appearance=\"outline\" class=\"input-text\">\r\n <textarea rows=\"10\" matInput [formControl]=\"control\" tpSurveyFocusAndSelect></textarea>\r\n </mat-form-field>\r\n\r\n<!-- <mat-form-field class=\"container-controls\" appearance=\"outline\">-->\r\n<!-- <textarea rows=\"10\" autofocus matInput [(ngModel)]=\"answer.AnswerValue\" (ngModelChange)=\"answerChange()\" appFocusAndSelect></textarea>-->\r\n<!-- </mat-form-field>-->\r\n }\r\n\r\n<!-- <mat-form-field appearance=\"outline\" class=\"input-od-number\">-->\r\n<!-- <input [formControl]=\"control\" tpSurveyFocusAndSelect matInput type=\"number\">-->\r\n<!-- </mat-form-field>-->\r\n</div>\r\n", styles: [":host{width:100%}.container-main{display:flex;width:100%;justify-content:center;align-items:center;flex-flow:column;gap:2em;padding:0 2em;box-sizing:border-box}.input-text{width:100%}\n"], dependencies: [{ kind: "directive", type: FocusAndSelectDirective, selector: "[tpSurveyFocusAndSelect]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }] }); }
|
|
891
903
|
}
|
|
892
904
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: AnswerOLComponent, decorators: [{
|
|
893
905
|
type: Component,
|
|
@@ -896,14 +908,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImpor
|
|
|
896
908
|
FormsModule,
|
|
897
909
|
MatFormField,
|
|
898
910
|
MatInput,
|
|
899
|
-
ReactiveFormsModule
|
|
911
|
+
ReactiveFormsModule,
|
|
912
|
+
MatPrefix
|
|
900
913
|
], providers: [
|
|
901
914
|
{
|
|
902
915
|
provide: NG_VALUE_ACCESSOR,
|
|
903
916
|
useExisting: forwardRef(() => AnswerOLComponent),
|
|
904
917
|
multi: true
|
|
905
918
|
},
|
|
906
|
-
], template: "<div class=\"container-main\">\r\n @if (telephoneInput()) {\r\n <mat-form-field appearance=\"outline\">\r\n <
|
|
919
|
+
], template: "<div class=\"container-main\">\r\n @if (telephoneInput()) {\r\n <mat-form-field appearance=\"outline\">\r\n <input\r\n type=\"text\"\r\n inputmode=\"numeric\"\r\n matInput\r\n [formControl]=\"control\" tpSurveyFocusAndSelect>\r\n <span matTextPrefix>+380 </span>\r\n </mat-form-field>\r\n } @else {\r\n <mat-form-field appearance=\"outline\" class=\"input-text\">\r\n <textarea rows=\"10\" matInput [formControl]=\"control\" tpSurveyFocusAndSelect></textarea>\r\n </mat-form-field>\r\n\r\n<!-- <mat-form-field class=\"container-controls\" appearance=\"outline\">-->\r\n<!-- <textarea rows=\"10\" autofocus matInput [(ngModel)]=\"answer.AnswerValue\" (ngModelChange)=\"answerChange()\" appFocusAndSelect></textarea>-->\r\n<!-- </mat-form-field>-->\r\n }\r\n\r\n<!-- <mat-form-field appearance=\"outline\" class=\"input-od-number\">-->\r\n<!-- <input [formControl]=\"control\" tpSurveyFocusAndSelect matInput type=\"number\">-->\r\n<!-- </mat-form-field>-->\r\n</div>\r\n", styles: [":host{width:100%}.container-main{display:flex;width:100%;justify-content:center;align-items:center;flex-flow:column;gap:2em;padding:0 2em;box-sizing:border-box}.input-text{width:100%}\n"] }]
|
|
907
920
|
}] });
|
|
908
921
|
|
|
909
922
|
class AsFormArrayPipe {
|
|
@@ -1223,7 +1236,7 @@ class ContainerAnswerComponent {
|
|
|
1223
1236
|
break;
|
|
1224
1237
|
}
|
|
1225
1238
|
case QuestionsType.eqOL: {
|
|
1226
|
-
this.answerForm.controls.answer.addValidators(answerOLValidator());
|
|
1239
|
+
this.answerForm.controls.answer.addValidators(answerOLValidator(question.OLTypeTel));
|
|
1227
1240
|
break;
|
|
1228
1241
|
}
|
|
1229
1242
|
case QuestionsType.eqSL: {
|
|
@@ -1405,7 +1418,7 @@ class ContainerAnswerComponent {
|
|
|
1405
1418
|
return resArray;
|
|
1406
1419
|
}
|
|
1407
1420
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: ContainerAnswerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1408
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.6", type: ContainerAnswerComponent, isStandalone: true, selector: "tp-survey-container-answer", inputs: { question: { classPropertyName: "question", publicName: "question", isSignal: true, isRequired: true, transformFunction: null }, language: { classPropertyName: "language", publicName: "language", isSignal: true, isRequired: true, transformFunction: null }, viewModel: { classPropertyName: "viewModel", publicName: "viewModel", isSignal: true, isRequired: true, transformFunction: null }, answers: { classPropertyName: "answers", publicName: "answers", isSignal: true, isRequired: false, transformFunction: null }, developerMode: { classPropertyName: "developerMode", publicName: "developerMode", isSignal: true, isRequired: false, transformFunction: null }, languageList: { classPropertyName: "languageList", publicName: "languageList", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { logicChanged: "logicChanged", answerChanged: "answerChanged", onLanguageChange: "onLanguageChange" }, ngImport: i0, template: "<div class=\"container-main\" [formGroup]=\"answerForm\">\r\n @switch (question().QuestionType) {\r\n
|
|
1421
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.6", type: ContainerAnswerComponent, isStandalone: true, selector: "tp-survey-container-answer", inputs: { question: { classPropertyName: "question", publicName: "question", isSignal: true, isRequired: true, transformFunction: null }, language: { classPropertyName: "language", publicName: "language", isSignal: true, isRequired: true, transformFunction: null }, viewModel: { classPropertyName: "viewModel", publicName: "viewModel", isSignal: true, isRequired: true, transformFunction: null }, answers: { classPropertyName: "answers", publicName: "answers", isSignal: true, isRequired: false, transformFunction: null }, developerMode: { classPropertyName: "developerMode", publicName: "developerMode", isSignal: true, isRequired: false, transformFunction: null }, languageList: { classPropertyName: "languageList", publicName: "languageList", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { logicChanged: "logicChanged", answerChanged: "answerChanged", onLanguageChange: "onLanguageChange" }, ngImport: i0, template: "<div class=\"container-main\" [formGroup]=\"answerForm\">\r\n @switch (question().QuestionType) {\r\n\r\n @case (questionsType.eqLANG) {\r\n <tp-survey-answer-lang\r\n [languageList]=\"languageList()\"\r\n [language]=\"2\"\r\n [viewModel]=\"viewModel()\"\r\n (onLanguageChange)=\"onLanguageChange.emit($event)\"/>\r\n }\r\n\r\n @case (questionsType.eqINFO) {\r\n <tp-survey-answer-info\r\n formControlName=\"answer\"\r\n [language]=\"language()\"\r\n [viewModel]=\"viewModel()\"/>\r\n }\r\n\r\n @case (questionsType.eqSS) {\r\n <tp-survey-answer-ss\r\n formControlName=\"answer\"\r\n [question]=\"question()\"\r\n [language]=\"language()\"\r\n [viewModel]=\"viewModel()\"\r\n [alternativeList]=\"visibleAlternativeList()\"\r\n (onAlternativeClick)=\"onAlternativeClick($event)\"\r\n />\r\n }\r\n\r\n @case (questionsType.eqMS) {\r\n <tp-survey-answer-ms\r\n formControlName=\"answer\"\r\n [question]=\"question()\"\r\n [language]=\"language()\"\r\n [viewModel]=\"viewModel()\"\r\n [alternativeMaxAnswersCount]=\"question().AlternativeMaxAnswersCount\"\r\n [alternativeList]=\"visibleAlternativeList()\"\r\n (onAlternativeClick)=\"onAlternativeClick($event)\"/>\r\n }\r\n\r\n @case (questionsType.eqOD) {\r\n <tp-survey-answer-od\r\n formControlName=\"answer\"\r\n [language]=\"language()\"\r\n [viewModel]=\"viewModel()\"\r\n [minValue]=\"question().ODMinValue\"\r\n [maxValue]=\"question().ODMaxValue\"\r\n />\r\n }\r\n\r\n @case (questionsType.eqOL) {\r\n <tp-survey-answer-ol\r\n formControlName=\"answer\"\r\n [language]=\"language()\"\r\n [viewModel]=\"viewModel()\"\r\n [telephoneInput]=\"question().OLTypeTel\"\r\n />\r\n }\r\n\r\n @case (questionsType.eqSL) {\r\n <tp-survey-answer-sl\r\n formControlName=\"answer\"\r\n [alternativeList]=\"visibleAlternativeList()\"\r\n [sectionList]=\"visibleSectionList()\"\r\n [multiSelect]=\"question().MultiSelect\"\r\n [language]=\"language()\"\r\n [viewModel]=\"viewModel()\"\r\n [maxCount]=\"this.question().SLSectionMaxAnswersCount\"\r\n />\r\n }\r\n\r\n @case (questionsType.eqEND) {\r\n <tp-survey-answer-end\r\n formControlName=\"answer\"\r\n [language]=\"language()\"\r\n [viewModel]=\"viewModel()\"\r\n />\r\n }\r\n }\r\n\r\n <div class=\"container-additional-answer\">\r\n @for (addAnswer of answerForm.controls.additionalAnswers.controls | keyValues; track addAnswer) {\r\n @if (addAnswer.name | getAdditionalValueByValue:visibleAdditionalAnswerList(); as additionalAnswerObject ) {\r\n <tp-survey-answer-additional\r\n [control]=\"addAnswer.control\"\r\n [class.full-width]=\"additionalAnswerObject.AnswerType===AdditionalAnswerType.aatText\"\r\n [answerType]=\"additionalAnswerObject.AnswerType\"\r\n [caption]=\"additionalAnswerObject.MultiLangCaptions | multiLangObjectToHtml:language()\"\r\n [numberMinValue]=\"additionalAnswerObject.NumberMinValue\"\r\n [numberMaxValue]=\"additionalAnswerObject.NumberMaxValue\"\r\n [textMultiline]=\"additionalAnswerObject.TextMultiline\"\r\n [captionPosition]=\"additionalAnswerObject.CaptionPosition\"/>\r\n }\r\n }\r\n </div>\r\n</div>\r\n\r\n", styles: [".container-main{display:flex;flex-flow:column;align-items:center}tp-survey-answer-sl{width:100%}.full-width{width:100%}:host-context(.tp-view-desktop) .container-main{max-width:896px;margin:0 auto;padding:0 1em}:host-context(.tp-view-desktop) .container-additional-answer{padding:1em;display:flex;flex-flow:column;align-items:baseline;gap:2em}:host-context(.tp-view-tablet) .container-main{width:100%;height:100%;overflow:hidden;display:block}:host-context(.tp-view-tablet) .container-additional-answer{position:absolute;width:80%;left:10%;bottom:0}@media (max-width: 480px){:host-context(.tp-view-desktop) .container-additional-answer{width:100%}}\n"], dependencies: [{ kind: "component", type: AnswerODComponent, selector: "tp-survey-answer-od", inputs: ["minValue", "maxValue"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: AnswerSSComponent, selector: "tp-survey-answer-ss", inputs: ["question", "alternativeList"], outputs: ["onAlternativeClick"] }, { kind: "component", type: AnswerInfoComponent, selector: "tp-survey-answer-info" }, { kind: "component", type: AnswerMSComponent, selector: "tp-survey-answer-ms", inputs: ["question", "alternativeList", "alternativeMaxAnswersCount"], outputs: ["onAlternativeClick"] }, { kind: "component", type: AnswerAdditionalComponent, selector: "tp-survey-answer-additional", inputs: ["control", "answerType", "caption", "numberMinValue", "numberMaxValue", "textMultiline", "captionPosition"] }, { kind: "pipe", type: MultiLangObjectToHtmlPipe, name: "multiLangObjectToHtml" }, { kind: "component", type: AnswerEndComponent, selector: "tp-survey-answer-end" }, { kind: "component", type: AnswerOLComponent, selector: "tp-survey-answer-ol", inputs: ["telephoneInput"] }, { kind: "component", type: AnswerSLComponent, selector: "tp-survey-answer-sl", inputs: ["alternativeList", "sectionList", "multiSelect", "maxCount"] }, { kind: "pipe", type: GetAdditionalValueByValuePipe, name: "getAdditionalValueByValue" }, { kind: "pipe", type: KeyValuesPipe, name: "keyValues" }, { kind: "component", type: AnswerLangComponent, selector: "tp-survey-answer-lang", inputs: ["languageList"], outputs: ["onLanguageChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1409
1422
|
}
|
|
1410
1423
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: ContainerAnswerComponent, decorators: [{
|
|
1411
1424
|
type: Component,
|
|
@@ -1424,7 +1437,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImpor
|
|
|
1424
1437
|
GetAdditionalValueByValuePipe,
|
|
1425
1438
|
KeyValuesPipe,
|
|
1426
1439
|
AnswerLangComponent
|
|
1427
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"container-main\" [formGroup]=\"answerForm\">\r\n @switch (question().QuestionType) {\r\n
|
|
1440
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"container-main\" [formGroup]=\"answerForm\">\r\n @switch (question().QuestionType) {\r\n\r\n @case (questionsType.eqLANG) {\r\n <tp-survey-answer-lang\r\n [languageList]=\"languageList()\"\r\n [language]=\"2\"\r\n [viewModel]=\"viewModel()\"\r\n (onLanguageChange)=\"onLanguageChange.emit($event)\"/>\r\n }\r\n\r\n @case (questionsType.eqINFO) {\r\n <tp-survey-answer-info\r\n formControlName=\"answer\"\r\n [language]=\"language()\"\r\n [viewModel]=\"viewModel()\"/>\r\n }\r\n\r\n @case (questionsType.eqSS) {\r\n <tp-survey-answer-ss\r\n formControlName=\"answer\"\r\n [question]=\"question()\"\r\n [language]=\"language()\"\r\n [viewModel]=\"viewModel()\"\r\n [alternativeList]=\"visibleAlternativeList()\"\r\n (onAlternativeClick)=\"onAlternativeClick($event)\"\r\n />\r\n }\r\n\r\n @case (questionsType.eqMS) {\r\n <tp-survey-answer-ms\r\n formControlName=\"answer\"\r\n [question]=\"question()\"\r\n [language]=\"language()\"\r\n [viewModel]=\"viewModel()\"\r\n [alternativeMaxAnswersCount]=\"question().AlternativeMaxAnswersCount\"\r\n [alternativeList]=\"visibleAlternativeList()\"\r\n (onAlternativeClick)=\"onAlternativeClick($event)\"/>\r\n }\r\n\r\n @case (questionsType.eqOD) {\r\n <tp-survey-answer-od\r\n formControlName=\"answer\"\r\n [language]=\"language()\"\r\n [viewModel]=\"viewModel()\"\r\n [minValue]=\"question().ODMinValue\"\r\n [maxValue]=\"question().ODMaxValue\"\r\n />\r\n }\r\n\r\n @case (questionsType.eqOL) {\r\n <tp-survey-answer-ol\r\n formControlName=\"answer\"\r\n [language]=\"language()\"\r\n [viewModel]=\"viewModel()\"\r\n [telephoneInput]=\"question().OLTypeTel\"\r\n />\r\n }\r\n\r\n @case (questionsType.eqSL) {\r\n <tp-survey-answer-sl\r\n formControlName=\"answer\"\r\n [alternativeList]=\"visibleAlternativeList()\"\r\n [sectionList]=\"visibleSectionList()\"\r\n [multiSelect]=\"question().MultiSelect\"\r\n [language]=\"language()\"\r\n [viewModel]=\"viewModel()\"\r\n [maxCount]=\"this.question().SLSectionMaxAnswersCount\"\r\n />\r\n }\r\n\r\n @case (questionsType.eqEND) {\r\n <tp-survey-answer-end\r\n formControlName=\"answer\"\r\n [language]=\"language()\"\r\n [viewModel]=\"viewModel()\"\r\n />\r\n }\r\n }\r\n\r\n <div class=\"container-additional-answer\">\r\n @for (addAnswer of answerForm.controls.additionalAnswers.controls | keyValues; track addAnswer) {\r\n @if (addAnswer.name | getAdditionalValueByValue:visibleAdditionalAnswerList(); as additionalAnswerObject ) {\r\n <tp-survey-answer-additional\r\n [control]=\"addAnswer.control\"\r\n [class.full-width]=\"additionalAnswerObject.AnswerType===AdditionalAnswerType.aatText\"\r\n [answerType]=\"additionalAnswerObject.AnswerType\"\r\n [caption]=\"additionalAnswerObject.MultiLangCaptions | multiLangObjectToHtml:language()\"\r\n [numberMinValue]=\"additionalAnswerObject.NumberMinValue\"\r\n [numberMaxValue]=\"additionalAnswerObject.NumberMaxValue\"\r\n [textMultiline]=\"additionalAnswerObject.TextMultiline\"\r\n [captionPosition]=\"additionalAnswerObject.CaptionPosition\"/>\r\n }\r\n }\r\n </div>\r\n</div>\r\n\r\n", styles: [".container-main{display:flex;flex-flow:column;align-items:center}tp-survey-answer-sl{width:100%}.full-width{width:100%}:host-context(.tp-view-desktop) .container-main{max-width:896px;margin:0 auto;padding:0 1em}:host-context(.tp-view-desktop) .container-additional-answer{padding:1em;display:flex;flex-flow:column;align-items:baseline;gap:2em}:host-context(.tp-view-tablet) .container-main{width:100%;height:100%;overflow:hidden;display:block}:host-context(.tp-view-tablet) .container-additional-answer{position:absolute;width:80%;left:10%;bottom:0}@media (max-width: 480px){:host-context(.tp-view-desktop) .container-additional-answer{width:100%}}\n"] }]
|
|
1428
1441
|
}], ctorParameters: () => [] });
|
|
1429
1442
|
|
|
1430
1443
|
class GetActiveLanguagePipe {
|