@touchpoll/tp-survey 0.0.27 → 0.0.29
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.
|
@@ -603,7 +603,7 @@ class GetQuestionImageBackgroundCssSizePipe {
|
|
|
603
603
|
}
|
|
604
604
|
else {
|
|
605
605
|
value = value.toLowerCase().trim();
|
|
606
|
-
if (value.endsWith('%') || value.endsWith('px')) {
|
|
606
|
+
if (value.endsWith('%') || value.endsWith('px') || value.endsWith('vh') || value.endsWith('vw')) {
|
|
607
607
|
return value;
|
|
608
608
|
}
|
|
609
609
|
else {
|
|
@@ -636,7 +636,7 @@ class AnswerSSComponent extends AnswerMasterComponent {
|
|
|
636
636
|
useExisting: forwardRef(() => AnswerSSComponent),
|
|
637
637
|
multi: true
|
|
638
638
|
},
|
|
639
|
-
], usesInheritance: true, ngImport: i0, template: "<mat-radio-group\r\n class=\"container-ms-ss-alternatives\"\r\n [tpSurveyAlternativesContainer] = \"question()\"\r\n [containerViewModel]=\"viewModel()\"\r\n [formControl]=\"control\">\r\n @for (alt of alternativeList(); track alt.Value; let index = $index) {\r\n <mat-radio-button\r\n #tablet_alt\r\n class=\"alternative-ss-ms tp-survey-radio-button\"\r\n [style.font-size.%]=\"viewModel() === viewModelE.vmTablet ? question().AlternativeTabletFontSize : undefined\"\r\n [value]=\"alt.Value\"\r\n (change)=\"onAlternativeClick.emit($event.value)\">\r\n @if (alt.IsMute) {\r\n <mat-icon class=\"icon-is-mute\" svgIcon=\"iconIsMute\"></mat-icon>\r\n }\r\n <div class=\"container-caption\" [class.container-image]=\"!!alt.BackGround.Image\">\r\n @if (alt.BackGround.Image) {\r\n @let imageSize = question() | getQuestionImageBackgroundCssSize;\r\n <img alt=\"answer logo\" [style.height]=\"imageSize.height\" [style.width]=\"imageSize.width\" [src]=\"repositoryPath()+'/' + alt.BackGround.Image\" importance=\"low\" loading=\"lazy\">\r\n }\r\n <span class=\"alternative-ss-ms-caption survey-object-caption\" [innerHTML]= \"alt.MultiLangCaptions | multiLangObjectToHtml:language()\"></span>\r\n </div>\r\n </mat-radio-button>\r\n }\r\n</mat-radio-group>\r\n\r\n", styles: [".container-controls{display:grid;justify-content:center;gap:1em}.container-controls>mat-radio-group{display:grid;grid-column-gap:2em;grid-gap:.5em;min-width:200px}.container-image{display:flex;flex-flow:column}@media (max-width: 480px){.container-controls{padding:1em}}\n"], dependencies: [{ kind: "directive", type: MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "pipe", type: MultiLangObjectToHtmlPipe, name: "multiLangObjectToHtml" }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: AlternativesContainerDirective, selector: "[tpSurveyAlternativesContainer]", inputs: ["tpSurveyAlternativesContainer", "containerViewModel"] }, { kind: "pipe", type: GetQuestionImageBackgroundCssSizePipe, name: "getQuestionImageBackgroundCssSize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
639
|
+
], usesInheritance: true, ngImport: i0, template: "<mat-radio-group\r\n class=\"container-ms-ss-alternatives\"\r\n [tpSurveyAlternativesContainer] = \"question()\"\r\n [containerViewModel]=\"viewModel()\"\r\n [formControl]=\"control\">\r\n @for (alt of alternativeList(); track alt.Value; let index = $index) {\r\n <mat-radio-button\r\n #tablet_alt\r\n class=\"alternative-ss-ms tp-survey-radio-button\"\r\n [style.font-size.%]=\"viewModel() === viewModelE.vmTablet ? question().AlternativeTabletFontSize : undefined\"\r\n [value]=\"alt.Value\"\r\n (change)=\"onAlternativeClick.emit($event.value)\">\r\n @if (alt.IsMute) {\r\n <mat-icon class=\"icon-is-mute\" svgIcon=\"iconIsMute\"></mat-icon>\r\n }\r\n <div class=\"container-caption\" [class.container-image]=\"!!alt.BackGround.Image\">\r\n @if (alt.BackGround.Image) {\r\n @let imageSize = question() | getQuestionImageBackgroundCssSize;\r\n <img alt=\"answer logo\" [style.height]=\"imageSize.height\" [style.width]=\"imageSize.width\" [src]=\"repositoryPath()+'/' + alt.BackGround.Image\" importance=\"low\" loading=\"lazy\" class=\"answer-image\">\r\n }\r\n <span class=\"alternative-ss-ms-caption survey-object-caption\" [innerHTML]= \"alt.MultiLangCaptions | multiLangObjectToHtml:language()\"></span>\r\n </div>\r\n </mat-radio-button>\r\n }\r\n</mat-radio-group>\r\n\r\n", styles: [".container-controls{display:grid;justify-content:center;gap:1em}.container-controls>mat-radio-group{display:grid;grid-column-gap:2em;grid-gap:.5em;min-width:200px}.container-image{display:flex;flex-flow:column}.answer-image{object-fit:cover}@media (max-width: 480px){.container-controls{padding:1em}}\n"], dependencies: [{ kind: "directive", type: MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "pipe", type: MultiLangObjectToHtmlPipe, name: "multiLangObjectToHtml" }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: AlternativesContainerDirective, selector: "[tpSurveyAlternativesContainer]", inputs: ["tpSurveyAlternativesContainer", "containerViewModel"] }, { kind: "pipe", type: GetQuestionImageBackgroundCssSizePipe, name: "getQuestionImageBackgroundCssSize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
640
640
|
}
|
|
641
641
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: AnswerSSComponent, decorators: [{
|
|
642
642
|
type: Component,
|
|
@@ -654,7 +654,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
|
654
654
|
useExisting: forwardRef(() => AnswerSSComponent),
|
|
655
655
|
multi: true
|
|
656
656
|
},
|
|
657
|
-
], template: "<mat-radio-group\r\n class=\"container-ms-ss-alternatives\"\r\n [tpSurveyAlternativesContainer] = \"question()\"\r\n [containerViewModel]=\"viewModel()\"\r\n [formControl]=\"control\">\r\n @for (alt of alternativeList(); track alt.Value; let index = $index) {\r\n <mat-radio-button\r\n #tablet_alt\r\n class=\"alternative-ss-ms tp-survey-radio-button\"\r\n [style.font-size.%]=\"viewModel() === viewModelE.vmTablet ? question().AlternativeTabletFontSize : undefined\"\r\n [value]=\"alt.Value\"\r\n (change)=\"onAlternativeClick.emit($event.value)\">\r\n @if (alt.IsMute) {\r\n <mat-icon class=\"icon-is-mute\" svgIcon=\"iconIsMute\"></mat-icon>\r\n }\r\n <div class=\"container-caption\" [class.container-image]=\"!!alt.BackGround.Image\">\r\n @if (alt.BackGround.Image) {\r\n @let imageSize = question() | getQuestionImageBackgroundCssSize;\r\n <img alt=\"answer logo\" [style.height]=\"imageSize.height\" [style.width]=\"imageSize.width\" [src]=\"repositoryPath()+'/' + alt.BackGround.Image\" importance=\"low\" loading=\"lazy\">\r\n }\r\n <span class=\"alternative-ss-ms-caption survey-object-caption\" [innerHTML]= \"alt.MultiLangCaptions | multiLangObjectToHtml:language()\"></span>\r\n </div>\r\n </mat-radio-button>\r\n }\r\n</mat-radio-group>\r\n\r\n", styles: [".container-controls{display:grid;justify-content:center;gap:1em}.container-controls>mat-radio-group{display:grid;grid-column-gap:2em;grid-gap:.5em;min-width:200px}.container-image{display:flex;flex-flow:column}@media (max-width: 480px){.container-controls{padding:1em}}\n"] }]
|
|
657
|
+
], template: "<mat-radio-group\r\n class=\"container-ms-ss-alternatives\"\r\n [tpSurveyAlternativesContainer] = \"question()\"\r\n [containerViewModel]=\"viewModel()\"\r\n [formControl]=\"control\">\r\n @for (alt of alternativeList(); track alt.Value; let index = $index) {\r\n <mat-radio-button\r\n #tablet_alt\r\n class=\"alternative-ss-ms tp-survey-radio-button\"\r\n [style.font-size.%]=\"viewModel() === viewModelE.vmTablet ? question().AlternativeTabletFontSize : undefined\"\r\n [value]=\"alt.Value\"\r\n (change)=\"onAlternativeClick.emit($event.value)\">\r\n @if (alt.IsMute) {\r\n <mat-icon class=\"icon-is-mute\" svgIcon=\"iconIsMute\"></mat-icon>\r\n }\r\n <div class=\"container-caption\" [class.container-image]=\"!!alt.BackGround.Image\">\r\n @if (alt.BackGround.Image) {\r\n @let imageSize = question() | getQuestionImageBackgroundCssSize;\r\n <img alt=\"answer logo\" [style.height]=\"imageSize.height\" [style.width]=\"imageSize.width\" [src]=\"repositoryPath()+'/' + alt.BackGround.Image\" importance=\"low\" loading=\"lazy\" class=\"answer-image\">\r\n }\r\n <span class=\"alternative-ss-ms-caption survey-object-caption\" [innerHTML]= \"alt.MultiLangCaptions | multiLangObjectToHtml:language()\"></span>\r\n </div>\r\n </mat-radio-button>\r\n }\r\n</mat-radio-group>\r\n\r\n", styles: [".container-controls{display:grid;justify-content:center;gap:1em}.container-controls>mat-radio-group{display:grid;grid-column-gap:2em;grid-gap:.5em;min-width:200px}.container-image{display:flex;flex-flow:column}.answer-image{object-fit:cover}@media (max-width: 480px){.container-controls{padding:1em}}\n"] }]
|
|
658
658
|
}] });
|
|
659
659
|
|
|
660
660
|
class AnswerInfoComponent extends AnswerMasterComponent {
|
|
@@ -759,7 +759,7 @@ class AnswerMSComponent extends AnswerMasterComponent {
|
|
|
759
759
|
useExisting: forwardRef(() => AnswerMSComponent),
|
|
760
760
|
multi: true
|
|
761
761
|
},
|
|
762
|
-
], usesInheritance: true, ngImport: i0, template: "<ng-container [formGroup]=\"answerMSForm\">\r\n\r\n <div\r\n class=\"container-ms-ss-alternatives\"\r\n [tpSurveyAlternativesContainer] = \"question()\"\r\n [containerViewModel]=\"viewModel()\"\r\n formArrayName=\"alternativeList\">\r\n @for (alt of answerMSForm.controls.alternativeList.controls; track alt; let indx = $index) {\r\n <mat-checkbox\r\n #tablet_alt\r\n [formControl]=\"alt\"\r\n [style.font-size.%]=\"viewModel() === viewModelE.vmTablet ? question().AlternativeTabletFontSize : undefined\"\r\n (change)=\"onAlternativeClick.emit(alternativeList()[indx].Value)\"\r\n class=\"alternative-ss-ms tp-survey-checkbox\">\r\n @if (alternativeList()[indx].IsMute) {\r\n <mat-icon class=\"icon-is-mute\" svgIcon=\"iconIsMute\"></mat-icon>\r\n }\r\n <div class=\"container-caption\" [class.container-image]=\"!!alternativeList()[indx].BackGround.Image\">\r\n @if (alternativeList()[indx].BackGround.Image) {\r\n @let imageSize = question() | getQuestionImageBackgroundCssSize;\r\n <img alt=\"answer logo\" [style.height]=\"imageSize.height\" [style.width]=\"imageSize.width\" [src]=\"repositoryPath()+'/' + alternativeList()[indx].BackGround.Image\" importance=\"low\" loading=\"lazy\">\r\n }\r\n <span class=\"alternative-ss-ms-caption survey-object-caption\" [innerHTML]= \"alternativeList()[indx].MultiLangCaptions | multiLangObjectToHtml:language()\"></span>\r\n </div>\r\n </mat-checkbox>\r\n }\r\n </div>\r\n</ng-container>\r\n", styles: [".container-main-tablet{position:absolute;width:100%;height:100%;top:0;box-sizing:border-box;overflow:hidden}.radio-button{margin:4px}.container-image{display:flex;flex-flow:column}@media (max-width: 480px){.container-controls{padding:1em}}\n"], dependencies: [{ 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.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "component", type: MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "pipe", type: MultiLangObjectToHtmlPipe, name: "multiLangObjectToHtml" }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: AlternativesContainerDirective, selector: "[tpSurveyAlternativesContainer]", inputs: ["tpSurveyAlternativesContainer", "containerViewModel"] }, { kind: "pipe", type: GetQuestionImageBackgroundCssSizePipe, name: "getQuestionImageBackgroundCssSize" }] }); }
|
|
762
|
+
], usesInheritance: true, ngImport: i0, template: "<ng-container [formGroup]=\"answerMSForm\">\r\n\r\n <div\r\n class=\"container-ms-ss-alternatives\"\r\n [tpSurveyAlternativesContainer] = \"question()\"\r\n [containerViewModel]=\"viewModel()\"\r\n formArrayName=\"alternativeList\">\r\n @for (alt of answerMSForm.controls.alternativeList.controls; track alt; let indx = $index) {\r\n <mat-checkbox\r\n #tablet_alt\r\n [formControl]=\"alt\"\r\n [style.font-size.%]=\"viewModel() === viewModelE.vmTablet ? question().AlternativeTabletFontSize : undefined\"\r\n (change)=\"onAlternativeClick.emit(alternativeList()[indx].Value)\"\r\n class=\"alternative-ss-ms tp-survey-checkbox\">\r\n @if (alternativeList()[indx].IsMute) {\r\n <mat-icon class=\"icon-is-mute\" svgIcon=\"iconIsMute\"></mat-icon>\r\n }\r\n <div class=\"container-caption\" [class.container-image]=\"!!alternativeList()[indx].BackGround.Image\">\r\n @if (alternativeList()[indx].BackGround.Image) {\r\n @let imageSize = question() | getQuestionImageBackgroundCssSize;\r\n <img alt=\"answer logo\" [style.height]=\"imageSize.height\" [style.width]=\"imageSize.width\" [src]=\"repositoryPath()+'/' + alternativeList()[indx].BackGround.Image\" importance=\"low\" loading=\"lazy\" class=\"answer-image\">\r\n }\r\n <span class=\"alternative-ss-ms-caption survey-object-caption\" [innerHTML]= \"alternativeList()[indx].MultiLangCaptions | multiLangObjectToHtml:language()\"></span>\r\n </div>\r\n </mat-checkbox>\r\n }\r\n </div>\r\n</ng-container>\r\n", styles: [".container-main-tablet{position:absolute;width:100%;height:100%;top:0;box-sizing:border-box;overflow:hidden}.radio-button{margin:4px}.container-image{display:flex;flex-flow:column}.answer-image{object-fit:cover}@media (max-width: 480px){.container-controls{padding:1em}}\n"], dependencies: [{ 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.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "component", type: MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "pipe", type: MultiLangObjectToHtmlPipe, name: "multiLangObjectToHtml" }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: AlternativesContainerDirective, selector: "[tpSurveyAlternativesContainer]", inputs: ["tpSurveyAlternativesContainer", "containerViewModel"] }, { kind: "pipe", type: GetQuestionImageBackgroundCssSizePipe, name: "getQuestionImageBackgroundCssSize" }] }); }
|
|
763
763
|
}
|
|
764
764
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: AnswerMSComponent, decorators: [{
|
|
765
765
|
type: Component,
|
|
@@ -776,7 +776,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
|
776
776
|
useExisting: forwardRef(() => AnswerMSComponent),
|
|
777
777
|
multi: true
|
|
778
778
|
},
|
|
779
|
-
], template: "<ng-container [formGroup]=\"answerMSForm\">\r\n\r\n <div\r\n class=\"container-ms-ss-alternatives\"\r\n [tpSurveyAlternativesContainer] = \"question()\"\r\n [containerViewModel]=\"viewModel()\"\r\n formArrayName=\"alternativeList\">\r\n @for (alt of answerMSForm.controls.alternativeList.controls; track alt; let indx = $index) {\r\n <mat-checkbox\r\n #tablet_alt\r\n [formControl]=\"alt\"\r\n [style.font-size.%]=\"viewModel() === viewModelE.vmTablet ? question().AlternativeTabletFontSize : undefined\"\r\n (change)=\"onAlternativeClick.emit(alternativeList()[indx].Value)\"\r\n class=\"alternative-ss-ms tp-survey-checkbox\">\r\n @if (alternativeList()[indx].IsMute) {\r\n <mat-icon class=\"icon-is-mute\" svgIcon=\"iconIsMute\"></mat-icon>\r\n }\r\n <div class=\"container-caption\" [class.container-image]=\"!!alternativeList()[indx].BackGround.Image\">\r\n @if (alternativeList()[indx].BackGround.Image) {\r\n @let imageSize = question() | getQuestionImageBackgroundCssSize;\r\n <img alt=\"answer logo\" [style.height]=\"imageSize.height\" [style.width]=\"imageSize.width\" [src]=\"repositoryPath()+'/' + alternativeList()[indx].BackGround.Image\" importance=\"low\" loading=\"lazy\">\r\n }\r\n <span class=\"alternative-ss-ms-caption survey-object-caption\" [innerHTML]= \"alternativeList()[indx].MultiLangCaptions | multiLangObjectToHtml:language()\"></span>\r\n </div>\r\n </mat-checkbox>\r\n }\r\n </div>\r\n</ng-container>\r\n", styles: [".container-main-tablet{position:absolute;width:100%;height:100%;top:0;box-sizing:border-box;overflow:hidden}.radio-button{margin:4px}.container-image{display:flex;flex-flow:column}@media (max-width: 480px){.container-controls{padding:1em}}\n"] }]
|
|
779
|
+
], template: "<ng-container [formGroup]=\"answerMSForm\">\r\n\r\n <div\r\n class=\"container-ms-ss-alternatives\"\r\n [tpSurveyAlternativesContainer] = \"question()\"\r\n [containerViewModel]=\"viewModel()\"\r\n formArrayName=\"alternativeList\">\r\n @for (alt of answerMSForm.controls.alternativeList.controls; track alt; let indx = $index) {\r\n <mat-checkbox\r\n #tablet_alt\r\n [formControl]=\"alt\"\r\n [style.font-size.%]=\"viewModel() === viewModelE.vmTablet ? question().AlternativeTabletFontSize : undefined\"\r\n (change)=\"onAlternativeClick.emit(alternativeList()[indx].Value)\"\r\n class=\"alternative-ss-ms tp-survey-checkbox\">\r\n @if (alternativeList()[indx].IsMute) {\r\n <mat-icon class=\"icon-is-mute\" svgIcon=\"iconIsMute\"></mat-icon>\r\n }\r\n <div class=\"container-caption\" [class.container-image]=\"!!alternativeList()[indx].BackGround.Image\">\r\n @if (alternativeList()[indx].BackGround.Image) {\r\n @let imageSize = question() | getQuestionImageBackgroundCssSize;\r\n <img alt=\"answer logo\" [style.height]=\"imageSize.height\" [style.width]=\"imageSize.width\" [src]=\"repositoryPath()+'/' + alternativeList()[indx].BackGround.Image\" importance=\"low\" loading=\"lazy\" class=\"answer-image\">\r\n }\r\n <span class=\"alternative-ss-ms-caption survey-object-caption\" [innerHTML]= \"alternativeList()[indx].MultiLangCaptions | multiLangObjectToHtml:language()\"></span>\r\n </div>\r\n </mat-checkbox>\r\n }\r\n </div>\r\n</ng-container>\r\n", styles: [".container-main-tablet{position:absolute;width:100%;height:100%;top:0;box-sizing:border-box;overflow:hidden}.radio-button{margin:4px}.container-image{display:flex;flex-flow:column}.answer-image{object-fit:cover}@media (max-width: 480px){.container-controls{padding:1em}}\n"] }]
|
|
780
780
|
}], ctorParameters: () => [] });
|
|
781
781
|
|
|
782
782
|
class AdditionalAnswerCaptionPositionDirective {
|
|
@@ -1231,7 +1231,7 @@ class ContainerAnswerComponent {
|
|
|
1231
1231
|
this.#updateAlternativesAndSections();
|
|
1232
1232
|
this.#updateAdditionalAnswers(true);
|
|
1233
1233
|
this.#addValidator();
|
|
1234
|
-
this.answerForm.valueChanges.pipe(debounceTime(250), tap(() => this
|
|
1234
|
+
this.answerForm.valueChanges.pipe(debounceTime(250), tap(() => this.#emitLogicChanged()), //шлём новые логические переменные(может обновиться список additionalAnswers)
|
|
1235
1235
|
tap(() => this.#updateAdditionalAnswers(false)), //перестраиваем additionalAnswers
|
|
1236
1236
|
map(values => {
|
|
1237
1237
|
const formGroup = this.answerForm.controls.additionalAnswers;
|
|
@@ -1264,6 +1264,14 @@ class ContainerAnswerComponent {
|
|
|
1264
1264
|
});
|
|
1265
1265
|
});
|
|
1266
1266
|
this.#setDefaultAnswers();
|
|
1267
|
+
/*Update 19.03.2005
|
|
1268
|
+
Когда нажимают кнопку back, ответы остаются, но логические переменные удаляются, см. TpSurveyCoreService.clearAnswerForCurrentQuestion
|
|
1269
|
+
Но если респондент ничего в ответе не меняет и нажимает кнопку далее, то логические переменные не обновляются.
|
|
1270
|
+
Поэтому если ответ на вопрос не равен MISSING_VALUE(-97), то нужно обновить логические переменные
|
|
1271
|
+
*/
|
|
1272
|
+
if (answerValue !== MISSING_VALUE) {
|
|
1273
|
+
this.#emitLogicChanged();
|
|
1274
|
+
}
|
|
1267
1275
|
}
|
|
1268
1276
|
#addValidator() {
|
|
1269
1277
|
const question = this.question();
|
|
@@ -1463,6 +1471,9 @@ class ContainerAnswerComponent {
|
|
|
1463
1471
|
});
|
|
1464
1472
|
return resArray;
|
|
1465
1473
|
}
|
|
1474
|
+
#emitLogicChanged() {
|
|
1475
|
+
this.logicChanged.emit(this.#getLogicVars());
|
|
1476
|
+
}
|
|
1466
1477
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ContainerAnswerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1467
1478
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.7", type: ContainerAnswerComponent, isStandalone: true, selector: "tp-survey-container-answer", inputs: { findVariable: { classPropertyName: "findVariable", publicName: "findVariable", isSignal: true, isRequired: true, transformFunction: null }, 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 }, repositoryPath: { classPropertyName: "repositoryPath", publicName: "repositoryPath", isSignal: true, isRequired: false, 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 [findVariable]=\"findVariable()\"\r\n [repositoryPath]=\"repositoryPath()\"\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 [repositoryPath]=\"repositoryPath()\"\r\n [findVariable]=\"findVariable()\"\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 [findVariable]=\"findVariable()\"\r\n [repositoryPath]=\"repositoryPath()\"\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 [findVariable]=\"findVariable()\"\r\n [repositoryPath]=\"repositoryPath()\"\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 [findVariable]=\"findVariable()\"\r\n [repositoryPath]=\"repositoryPath()\"\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 [repositoryPath]=\"repositoryPath()\"\r\n [findVariable]=\"findVariable()\"\r\n [telephoneInput]=\"question().OLTypeTel\"\r\n [canSkip]=\"question().CanSkip\"/>\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 [repositoryPath]=\"repositoryPath()\"\r\n [findVariable]=\"findVariable()\"\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 [findVariable]=\"findVariable()\"\r\n [repositoryPath]=\"repositoryPath()\"\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{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:auto}:host-context(.tp-view-tablet) .container-additional-answer{padding:1em;display:flex;flex-flow:column;align-items:baseline;gap:2em}@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", "canSkip"] }, { 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 }); }
|
|
1468
1479
|
}
|