@touchpoll/tp-survey 0.0.13 → 0.0.14

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.
@@ -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
  }
@@ -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: string): boolean;
9
- executePostScript(expression: string): void;
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>): SafeHtml;
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;
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@touchpoll/tp-survey",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=17.0.0",
6
6
  "@angular/core": ">=17.0.0"