@touchpoll/tp-survey 0.0.13 → 0.0.15
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.master/answer.master.component.mjs +4 -2
- package/esm2022/lib/component/answer/answer.ss/answer.ss.component.mjs +3 -3
- package/esm2022/lib/component/answer/container.answer/container.answer.component.mjs +5 -3
- package/esm2022/lib/component/survey.play/survey.play.component.mjs +20 -3
- package/esm2022/lib/component/survey.question.preview/survey.question.preview.component.mjs +20 -4
- package/esm2022/lib/core/tp.survey.core/tp.survey.core.service.mjs +19 -1
- package/esm2022/lib/core/tp.survey.logic/tp.survey.logic.service.mjs +5 -6
- package/esm2022/lib/pipe/multi.lang.object.to.html/multi.lang.object.to.html.pipe.mjs +12 -4
- package/esm2022/lib/tp.survey.interface.mjs +1 -1
- package/esm2022/lib/tp.survey.type.mjs +1 -1
- package/fesm2022/touchpoll-tp-survey.mjs +80 -18
- package/fesm2022/touchpoll-tp-survey.mjs.map +1 -1
- package/lib/component/answer/answer.master/answer.master.component.d.ts +4 -2
- package/lib/component/answer/container.answer/container.answer.component.d.ts +4 -2
- package/lib/component/survey.play/survey.play.component.d.ts +1 -0
- package/lib/component/survey.question.preview/survey.question.preview.component.d.ts +3 -1
- package/lib/core/tp.survey.core/tp.survey.core.service.d.ts +1 -0
- package/lib/core/tp.survey.logic/tp.survey.logic.service.d.ts +2 -2
- package/lib/pipe/multi.lang.object.to.html/multi.lang.object.to.html.pipe.d.ts +2 -1
- package/lib/tp.survey.interface.d.ts +2 -0
- package/lib/tp.survey.type.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { DestroyRef } from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor, FormControl } from '@angular/forms';
|
|
3
|
-
import { AnswerT } from '../../../tp.survey.type';
|
|
3
|
+
import { AnswerT, TFindVariableVoid } from '../../../tp.survey.type';
|
|
4
4
|
import { ViewModel } from '../../../tp.survey.enum';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare abstract class AnswerMasterComponent<T extends AnswerT> implements ControlValueAccessor {
|
|
7
7
|
language: import("@angular/core").InputSignal<number>;
|
|
8
8
|
viewModel: import("@angular/core").InputSignal<ViewModel>;
|
|
9
|
+
findVariable: import("@angular/core").InputSignal<TFindVariableVoid>;
|
|
10
|
+
repositoryPath: import("@angular/core").InputSignal<string>;
|
|
9
11
|
viewModelE: typeof ViewModel;
|
|
10
12
|
control: FormControl<T | null>;
|
|
11
13
|
protected onModelChange: (data: T) => void;
|
|
@@ -17,5 +19,5 @@ export declare abstract class AnswerMasterComponent<T extends AnswerT> implement
|
|
|
17
19
|
setDisabledState(isDisabled: boolean): void;
|
|
18
20
|
writeValue(value: T): void;
|
|
19
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<AnswerMasterComponent<any>, never>;
|
|
20
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AnswerMasterComponent<any>, "app-answer-master", never, { "language": { "alias": "language"; "required": true; "isSignal": true; }; "viewModel": { "alias": "viewModel"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AnswerMasterComponent<any>, "app-answer-master", never, { "language": { "alias": "language"; "required": true; "isSignal": true; }; "viewModel": { "alias": "viewModel"; "required": true; "isSignal": true; }; "findVariable": { "alias": "findVariable"; "required": true; "isSignal": true; }; "repositoryPath": { "alias": "repositoryPath"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
21
23
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { FormControl, FormGroup } from '@angular/forms';
|
|
3
|
-
import { AdditionalAnswer, AnswerT } from '../../../tp.survey.type';
|
|
3
|
+
import { AdditionalAnswer, AnswerT, TFindVariableVoid } from '../../../tp.survey.type';
|
|
4
4
|
import { AnswerChange, ICurrentQuestionAnswer, IdbAdditionalAnswer, IdbAlternative, IdbBaseParamsLanguage, IdbQuestion, IdbSection } from '../../../tp.survey.interface';
|
|
5
5
|
import { AdditionalAnswerType, QuestionsType, ViewModel } from '../../../tp.survey.enum';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
@@ -12,12 +12,14 @@ interface IAnswerForm {
|
|
|
12
12
|
}
|
|
13
13
|
export declare class ContainerAnswerComponent implements OnInit {
|
|
14
14
|
#private;
|
|
15
|
+
findVariable: import("@angular/core").InputSignal<TFindVariableVoid>;
|
|
15
16
|
question: import("@angular/core").InputSignal<IdbQuestion>;
|
|
16
17
|
language: import("@angular/core").InputSignal<number>;
|
|
17
18
|
viewModel: import("@angular/core").InputSignal<ViewModel>;
|
|
18
19
|
answers: import("@angular/core").InputSignal<ICurrentQuestionAnswer | undefined>;
|
|
19
20
|
developerMode: import("@angular/core").InputSignal<boolean>;
|
|
20
21
|
languageList: import("@angular/core").InputSignal<IdbBaseParamsLanguage[]>;
|
|
22
|
+
repositoryPath: import("@angular/core").InputSignal<string>;
|
|
21
23
|
visibleAlternativeList: import("@angular/core").WritableSignal<IdbAlternative[]>;
|
|
22
24
|
visibleSectionList: import("@angular/core").WritableSignal<IdbSection[]>;
|
|
23
25
|
visibleAdditionalAnswerList: import("@angular/core").WritableSignal<IdbAdditionalAnswer[]>;
|
|
@@ -31,6 +33,6 @@ export declare class ContainerAnswerComponent implements OnInit {
|
|
|
31
33
|
ngOnInit(): void;
|
|
32
34
|
onAlternativeClick(value: number): void;
|
|
33
35
|
static ɵfac: i0.ɵɵFactoryDeclaration<ContainerAnswerComponent, never>;
|
|
34
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ContainerAnswerComponent, "tp-survey-container-answer", never, { "question": { "alias": "question"; "required": true; "isSignal": true; }; "language": { "alias": "language"; "required": true; "isSignal": true; }; "viewModel": { "alias": "viewModel"; "required": true; "isSignal": true; }; "answers": { "alias": "answers"; "required": false; "isSignal": true; }; "developerMode": { "alias": "developerMode"; "required": false; "isSignal": true; }; "languageList": { "alias": "languageList"; "required": true; "isSignal": true; }; }, { "logicChanged": "logicChanged"; "answerChanged": "answerChanged"; "onLanguageChange": "onLanguageChange"; }, never, never, true, never>;
|
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ContainerAnswerComponent, "tp-survey-container-answer", never, { "findVariable": { "alias": "findVariable"; "required": true; "isSignal": true; }; "question": { "alias": "question"; "required": true; "isSignal": true; }; "language": { "alias": "language"; "required": true; "isSignal": true; }; "viewModel": { "alias": "viewModel"; "required": true; "isSignal": true; }; "answers": { "alias": "answers"; "required": false; "isSignal": true; }; "developerMode": { "alias": "developerMode"; "required": false; "isSignal": true; }; "languageList": { "alias": "languageList"; "required": true; "isSignal": true; }; "repositoryPath": { "alias": "repositoryPath"; "required": false; "isSignal": true; }; }, { "logicChanged": "logicChanged"; "answerChanged": "answerChanged"; "onLanguageChange": "onLanguageChange"; }, never, never, true, never>;
|
|
35
37
|
}
|
|
36
38
|
export {};
|
|
@@ -30,6 +30,7 @@ export declare class SurveyPlayComponent implements OnInit {
|
|
|
30
30
|
onAnswerChanged(eventData: AnswerChange): void;
|
|
31
31
|
onLogicChanged(logicVars: Record<string, any>): void;
|
|
32
32
|
onLanguageChange(language: number): void;
|
|
33
|
+
findVariable(sysName: string): string;
|
|
33
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<SurveyPlayComponent, never>;
|
|
34
35
|
static ɵcmp: i0.ɵɵComponentDeclaration<SurveyPlayComponent, "tp-survey-play", never, { "questionary": { "alias": "questionary"; "required": true; "isSignal": true; }; "viewModel": { "alias": "viewModel"; "required": true; "isSignal": true; }; "interviewAutoSaveData": { "alias": "interviewAutoSaveData"; "required": false; "isSignal": true; }; "theme": { "alias": "theme"; "required": false; "isSignal": true; }; "language": { "alias": "language"; "required": false; "isSignal": true; }; "templateNavigationRef": { "alias": "templateNavigationRef"; "required": false; "isSignal": true; }; }, { "interviewStarted": "interviewStarted"; "interviewFinished": "interviewFinished"; "interviewProgress": "interviewProgress"; }, never, never, true, never>;
|
|
35
36
|
}
|
|
@@ -9,8 +9,10 @@ export declare class SurveyQuestionPreviewComponent {
|
|
|
9
9
|
viewModel: import("@angular/core").InputSignal<ViewModel>;
|
|
10
10
|
languageList: import("@angular/core").InputSignal<IdbBaseParamsLanguage[]>;
|
|
11
11
|
theme: import("@angular/core").InputSignal<TpSurveyTheme>;
|
|
12
|
+
repositoryPath: import("@angular/core").InputSignal<string>;
|
|
12
13
|
templateNavigationRef: import("@angular/core").InputSignal<TemplateRef<any> | null | undefined>;
|
|
13
14
|
ViewModel: typeof ViewModel;
|
|
15
|
+
findVariable(sysName: string): string;
|
|
14
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<SurveyQuestionPreviewComponent, never>;
|
|
15
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SurveyQuestionPreviewComponent, "tp-survey-question-preview", never, { "question": { "alias": "question"; "required": true; "isSignal": true; }; "language": { "alias": "language"; "required": true; "isSignal": true; }; "viewModel": { "alias": "viewModel"; "required": true; "isSignal": true; }; "languageList": { "alias": "languageList"; "required": true; "isSignal": true; }; "theme": { "alias": "theme"; "required": false; "isSignal": true; }; "templateNavigationRef": { "alias": "templateNavigationRef"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SurveyQuestionPreviewComponent, "tp-survey-question-preview", never, { "question": { "alias": "question"; "required": true; "isSignal": true; }; "language": { "alias": "language"; "required": true; "isSignal": true; }; "viewModel": { "alias": "viewModel"; "required": true; "isSignal": true; }; "languageList": { "alias": "languageList"; "required": true; "isSignal": true; }; "theme": { "alias": "theme"; "required": false; "isSignal": true; }; "repositoryPath": { "alias": "repositoryPath"; "required": false; "isSignal": true; }; "templateNavigationRef": { "alias": "templateNavigationRef"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
16
18
|
}
|
|
@@ -16,6 +16,7 @@ export declare class TpSurveyCoreService {
|
|
|
16
16
|
goToNextQuestion(): void;
|
|
17
17
|
goToBackQuestion(): void;
|
|
18
18
|
questionIsComplete(guid: number): boolean;
|
|
19
|
+
guidToTextAnswer(guid: number, languageId: number): string;
|
|
19
20
|
currentQuestion$(): Observable<IdbQuestion | null>;
|
|
20
21
|
findAnswerByGuid(guid: number): Answer | undefined;
|
|
21
22
|
setLogicValue(varName: string, value: any): void;
|
|
@@ -5,8 +5,8 @@ export declare class TpSurveyLogicService {
|
|
|
5
5
|
get vars(): object;
|
|
6
6
|
setLogicValue(varName: string, value: any): void;
|
|
7
7
|
getLogicVars(): LogicObject;
|
|
8
|
-
executeLogic(expression
|
|
9
|
-
executePostScript(expression
|
|
8
|
+
executeLogic(expression?: string): boolean;
|
|
9
|
+
executePostScript(expression?: string): void;
|
|
10
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<TpSurveyLogicService, never>;
|
|
11
11
|
static ɵprov: i0.ɵɵInjectableDeclaration<TpSurveyLogicService>;
|
|
12
12
|
}
|
|
@@ -2,12 +2,13 @@ import { PipeTransform } from '@angular/core';
|
|
|
2
2
|
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
|
3
3
|
import { IdbLogicCaptionObject, IdbMultilangObject } from '../../tp.survey.interface';
|
|
4
4
|
import { TpSurveyLogicService } from '../../core/tp.survey.logic/tp.survey.logic.service';
|
|
5
|
+
import { TFindVariableVoid } from '../../tp.survey.type';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
export declare class MultiLangObjectToHtmlPipe implements PipeTransform {
|
|
7
8
|
private readonly _sanitizer;
|
|
8
9
|
private readonly _logic;
|
|
9
10
|
constructor(_sanitizer: DomSanitizer, _logic: TpSurveyLogicService);
|
|
10
|
-
transform(caption: Array<IdbMultilangObject>, language: number, logicCaptions?: Array<IdbLogicCaptionObject
|
|
11
|
+
transform(caption: Array<IdbMultilangObject>, language: number, logicCaptions?: Array<IdbLogicCaptionObject>, findVariable?: TFindVariableVoid): SafeHtml;
|
|
11
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<MultiLangObjectToHtmlPipe, never>;
|
|
12
13
|
static ɵpipe: i0.ɵɵPipeDeclaration<MultiLangObjectToHtmlPipe, "multiLangObjectToHtml", true>;
|
|
13
14
|
}
|
|
@@ -81,6 +81,7 @@ export interface IdbTpBackGround {
|
|
|
81
81
|
PosV: string;
|
|
82
82
|
Scale: string;
|
|
83
83
|
PercentSize: number;
|
|
84
|
+
ImageHeight: number;
|
|
84
85
|
}
|
|
85
86
|
export interface IdbAlternative {
|
|
86
87
|
EnableExpression: string;
|
|
@@ -210,6 +211,7 @@ export interface IdbQuestion {
|
|
|
210
211
|
AlternativeMarginLeft: number;
|
|
211
212
|
AlternativeHeight: number;
|
|
212
213
|
AlternativeWidth: number;
|
|
214
|
+
AlternativeBackgroundImageHeight: number;
|
|
213
215
|
AlternativeTabletFontSize: number;
|
|
214
216
|
TabletViewAlternativeColumnCount: number;
|
|
215
217
|
MobileViewAlternativeColumnCount: number;
|
package/lib/tp.survey.type.d.ts
CHANGED
|
@@ -12,3 +12,4 @@ export type SurveyType = 'CATI' | 'ONLINE';
|
|
|
12
12
|
export type TpSurveyTheme = 'cyan-orange-light' | 'cyan-orange-dark' | 'rose-red-light' | 'rose-red-dark' | 'azure-blue-light' | 'azure-blue-dark';
|
|
13
13
|
export type LogicObject = Record<string, unknown>;
|
|
14
14
|
export type TTabletKeyboardVisibleStatus = 'show' | 'hide';
|
|
15
|
+
export type TFindVariableVoid = (sysName: string) => string;
|