@acorex-platform/module-assessment-management-client 0.0.20
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/fesm2022/acorex-platform-module-assessment-management-client-acorex-platform-module-assessment-management-client-jljmsqNu.mjs +10593 -0
- package/fesm2022/acorex-platform-module-assessment-management-client-acorex-platform-module-assessment-management-client-jljmsqNu.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-assessment-management-client-assessment-case-status.provider-i48XDX-I.mjs +83 -0
- package/fesm2022/acorex-platform-module-assessment-management-client-assessment-case-status.provider-i48XDX-I.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-assessment-management-client-assessment-session-answers-view.util-42ZcOY2C.mjs +124 -0
- package/fesm2022/acorex-platform-module-assessment-management-client-assessment-session-answers-view.util-42ZcOY2C.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-assessment-management-client-assessment-session-status.provider-Bk9hHj5V.mjs +97 -0
- package/fesm2022/acorex-platform-module-assessment-management-client-assessment-session-status.provider-Bk9hHj5V.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-assessment-management-client-assessment-voice.commands-CduVfWQ-.mjs +134 -0
- package/fesm2022/acorex-platform-module-assessment-management-client-assessment-voice.commands-CduVfWQ-.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-assessment-management-client-contracts.mjs +1171 -0
- package/fesm2022/acorex-platform-module-assessment-management-client-contracts.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-assessment-management-client-fill-assessment-session.command-VF80DWQf.mjs +270 -0
- package/fesm2022/acorex-platform-module-assessment-management-client-fill-assessment-session.command-VF80DWQf.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-assessment-management-client-list-question-difficulty-options.query-h3xT-MNd.mjs +59 -0
- package/fesm2022/acorex-platform-module-assessment-management-client-list-question-difficulty-options.query-h3xT-MNd.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-assessment-management-client-preview-question.command-C1ODQxDn.mjs +123 -0
- package/fesm2022/acorex-platform-module-assessment-management-client-preview-question.command-C1ODQxDn.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-assessment-management-client-preview-questionnaire.command-DBm7ve4w.mjs +165 -0
- package/fesm2022/acorex-platform-module-assessment-management-client-preview-questionnaire.command-DBm7ve4w.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-assessment-management-client-preview-session-pdf.command-BsiJU6ep.mjs +178 -0
- package/fesm2022/acorex-platform-module-assessment-management-client-preview-session-pdf.command-BsiJU6ep.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-assessment-management-client-question-bank-interface-editor-widget-edit.component-Bbl-efrl.mjs +489 -0
- package/fesm2022/acorex-platform-module-assessment-management-client-question-bank-interface-editor-widget-edit.component-Bbl-efrl.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-assessment-management-client-questionnaire-viewer-popup.component-Djcfg0dv.mjs +609 -0
- package/fesm2022/acorex-platform-module-assessment-management-client-questionnaire-viewer-popup.component-Djcfg0dv.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-assessment-management-client-review-assessment-session.command-CZ96KQ-l.mjs +228 -0
- package/fesm2022/acorex-platform-module-assessment-management-client-review-assessment-session.command-CZ96KQ-l.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-assessment-management-client-view-session-answers.command-CCzJoJ4p.mjs +280 -0
- package/fesm2022/acorex-platform-module-assessment-management-client-view-session-answers.command-CCzJoJ4p.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-assessment-management-client.mjs +2 -0
- package/fesm2022/acorex-platform-module-assessment-management-client.mjs.map +1 -0
- package/package.json +28 -0
- package/types/acorex-platform-module-assessment-management-client-contracts.d.ts +752 -0
- package/types/acorex-platform-module-assessment-management-client.d.ts +1279 -0
|
@@ -0,0 +1,1279 @@
|
|
|
1
|
+
import { AXPFeatureDefinitionProvider, AXPFeatureDefinitionProviderContext, AXPDeviceService } from '@acorex-platform/framework-client/core';
|
|
2
|
+
import { AXPMenuProvider, AXPMenuProviderContext, AXPSearchCommandProvider, AXPSearchResult } from '@acorex-platform/framework-client/common';
|
|
3
|
+
import { AXPPermissionDefinitionProvider, AXPPermissionDefinitionProviderContext } from '@acorex-platform/framework-client/auth';
|
|
4
|
+
import * as _angular_core from '@angular/core';
|
|
5
|
+
import { OnInit } from '@angular/core';
|
|
6
|
+
import * as i1 from '@acorex/core/file';
|
|
7
|
+
import * as _acorex_platform_framework_client_layout_widget_core from '@acorex-platform/framework-client/layout/widget-core';
|
|
8
|
+
import { AXPWidgetContainerComponent } from '@acorex-platform/framework-client/layout/widget-core';
|
|
9
|
+
import * as _ngrx_signals from '@ngrx/signals';
|
|
10
|
+
import * as _acorex_platform_framework_shared_core from '@acorex-platform/framework-shared/core';
|
|
11
|
+
import { AXPMultiLanguageString, AXPExpression, AXPWidgetNode } from '@acorex-platform/framework-shared/core';
|
|
12
|
+
import * as _acorex_platform_module_assessment_management_client_contracts from '@acorex-platform/module-assessment-management-client/contracts';
|
|
13
|
+
import { AXMAssessmentQuestionHintConfig, AXMAssessmentQuestionCommentConfig, QuestionnairePrintSettings, QuestionnaireCompletionMode, AXMAssessmentSessionRole, QuestionnaireBuilderValue, AXMQuestionBankItemInterfaceValue, QuestionnaireOutcomeDisplayEmphasis, PrePostConfig, QuestionnaireOutcomeItem, AXMAssessmentManagementQuestionnaireEntityModel, AXMAssessmentManagementAssessmentSessionEntityModel } from '@acorex-platform/module-assessment-management-client/contracts';
|
|
14
|
+
import { AXFormComponent } from '@acorex/components/form';
|
|
15
|
+
import * as dist_libs_framework_client_types_acorex_platform_framework_client_layout_widget_core from 'dist/libs/framework/client/types/acorex-platform-framework-client-layout-widget-core';
|
|
16
|
+
import { AXPPageLayoutBaseComponent } from '@acorex-platform/framework-client/layout/views';
|
|
17
|
+
import { ActivatedRoute } from '@angular/router';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Assessment Management Feature Definition Provider.
|
|
21
|
+
* Provides feature definitions for the Assessment Management module.
|
|
22
|
+
*/
|
|
23
|
+
declare class AXMAssessmentManagementFeatureDefinitionProvider implements AXPFeatureDefinitionProvider {
|
|
24
|
+
provide(context: AXPFeatureDefinitionProviderContext): Promise<void>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
declare class AXMAssessmentManagementMenuProvider implements AXPMenuProvider {
|
|
28
|
+
private entityService;
|
|
29
|
+
provide(context: AXPMenuProviderContext): Promise<void>;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Registers assessment capabilities into the shared Safety & Risk group.
|
|
34
|
+
*/
|
|
35
|
+
declare class AXMAssessmentManagementPermissionDefinitionProvider implements AXPPermissionDefinitionProvider {
|
|
36
|
+
define(context: AXPPermissionDefinitionProviderContext): Promise<void>;
|
|
37
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMAssessmentManagementPermissionDefinitionProvider, never>;
|
|
38
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMAssessmentManagementPermissionDefinitionProvider>;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
declare class AXMAssessmentManagementSearchCommandProvider extends AXPSearchCommandProvider {
|
|
42
|
+
commands: AXPSearchResult[];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Registers assessment-management file types on core and platform file-type providers.
|
|
47
|
+
* Does not call {@link AXFileModule.forRoot()} — document management owns that bootstrap.
|
|
48
|
+
*/
|
|
49
|
+
declare class AXMAssessmentManagementFileTypeModule {
|
|
50
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMAssessmentManagementFileTypeModule, never>;
|
|
51
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXMAssessmentManagementFileTypeModule, never, [typeof i1.AXFileModule], never>;
|
|
52
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXMAssessmentManagementFileTypeModule>;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
declare class AXMQuestionnaireBuilderFeatureModule {
|
|
56
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMQuestionnaireBuilderFeatureModule, never>;
|
|
57
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXMQuestionnaireBuilderFeatureModule, never, [typeof _acorex_platform_framework_client_layout_widget_core.AXPWidgetCoreModule], never>;
|
|
58
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXMQuestionnaireBuilderFeatureModule>;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Serializable context for assessment fill in popup (functions cannot cross popup data).
|
|
63
|
+
*/
|
|
64
|
+
interface QuestionnaireAssessmentFillContext {
|
|
65
|
+
caseId: string;
|
|
66
|
+
sessionId?: string | null;
|
|
67
|
+
responderId: string;
|
|
68
|
+
role: AXMAssessmentSessionRole;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* View mode for displaying questionnaire
|
|
72
|
+
* - single-page: All groups in a single page
|
|
73
|
+
* - page-per-group: One section (group) per page
|
|
74
|
+
* - page-per-question: One question per page
|
|
75
|
+
* - side-menu: Sections in left sidebar, questions on right
|
|
76
|
+
*/
|
|
77
|
+
type QuestionnaireViewMode = 'single-page' | 'page-per-group' | 'page-per-question' | 'side-menu';
|
|
78
|
+
/**
|
|
79
|
+
* Timer display configuration
|
|
80
|
+
*/
|
|
81
|
+
interface QuestionnaireTimerConfig {
|
|
82
|
+
showTimer: boolean;
|
|
83
|
+
mode?: 'countdown' | 'elapsed' | 'scheduled';
|
|
84
|
+
timeLimit?: number;
|
|
85
|
+
startTime?: Date;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Progress calculation mode
|
|
89
|
+
* - answered: Progress based on number of answered questions
|
|
90
|
+
* - navigation: Progress based on current navigation position
|
|
91
|
+
*/
|
|
92
|
+
type QuestionnaireProgressMode = 'answered' | 'navigation';
|
|
93
|
+
type QuestionnaireValidationStrategy = 'step' | 'end';
|
|
94
|
+
/**
|
|
95
|
+
* Questionnaire Viewer Configuration
|
|
96
|
+
*/
|
|
97
|
+
interface QuestionnaireViewerConfig {
|
|
98
|
+
/**
|
|
99
|
+
* View mode: single-page, page-per-group, page-per-question, side-menu
|
|
100
|
+
*/
|
|
101
|
+
viewMode?: QuestionnaireViewMode;
|
|
102
|
+
/**
|
|
103
|
+
* Render the dedicated print view (all questions, print CSS, widget mode `print`).
|
|
104
|
+
* Interactive view modes stay unchanged; this is only for PDF capture.
|
|
105
|
+
*/
|
|
106
|
+
printLayout?: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* How the print view paginates. Defaults to resolved print settings.
|
|
109
|
+
* `side-menu` prints as page-per-group (no sidebar).
|
|
110
|
+
*/
|
|
111
|
+
printPaging?: QuestionnaireViewMode;
|
|
112
|
+
/**
|
|
113
|
+
* Per-call print option overrides. Stored questionnaire Printing Options are the defaults.
|
|
114
|
+
*/
|
|
115
|
+
printSettings?: Partial<QuestionnairePrintSettings>;
|
|
116
|
+
/**
|
|
117
|
+
* Timer configuration
|
|
118
|
+
*/
|
|
119
|
+
timer?: QuestionnaireTimerConfig;
|
|
120
|
+
/**
|
|
121
|
+
* Show progress bar
|
|
122
|
+
*/
|
|
123
|
+
showProgressBar?: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Progress calculation mode: answered or navigation
|
|
126
|
+
*/
|
|
127
|
+
progressMode?: QuestionnaireProgressMode;
|
|
128
|
+
/**
|
|
129
|
+
* Allow navigation between questions
|
|
130
|
+
*/
|
|
131
|
+
allowNavigation?: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Show question numbers
|
|
134
|
+
*/
|
|
135
|
+
showQuestionNumbers?: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* Readonly mode (no answers can be submitted)
|
|
138
|
+
*/
|
|
139
|
+
readonly?: boolean;
|
|
140
|
+
/**
|
|
141
|
+
* Auto-save answers as user types
|
|
142
|
+
*/
|
|
143
|
+
autoSave?: boolean;
|
|
144
|
+
/**
|
|
145
|
+
* Show validation errors inline
|
|
146
|
+
*/
|
|
147
|
+
showValidationErrors?: boolean;
|
|
148
|
+
/**
|
|
149
|
+
* Allow skipping questions (if not required)
|
|
150
|
+
*/
|
|
151
|
+
allowSkipping?: boolean;
|
|
152
|
+
/**
|
|
153
|
+
* Show question counter (e.g., "Question 3 of 10")
|
|
154
|
+
*/
|
|
155
|
+
showQuestionCounter?: boolean;
|
|
156
|
+
/**
|
|
157
|
+
* Validation timing strategy:
|
|
158
|
+
* - step: validate on each step/section navigation
|
|
159
|
+
* - end: validate only at final submit
|
|
160
|
+
* Default: step
|
|
161
|
+
*/
|
|
162
|
+
validationStrategy?: QuestionnaireValidationStrategy;
|
|
163
|
+
/**
|
|
164
|
+
* submit-only: no draft save; save-and-continue: show Save and continue before submit.
|
|
165
|
+
*/
|
|
166
|
+
completionMode?: QuestionnaireCompletionMode;
|
|
167
|
+
/**
|
|
168
|
+
* Readonly session review entry step (`questions` default, or `results` for outcome snapshot).
|
|
169
|
+
*/
|
|
170
|
+
initialFlowStep?: 'questions' | 'results';
|
|
171
|
+
/**
|
|
172
|
+
* Readonly manager review: show Sign off / Reject instead of Done; closes with `decision` on the popup result.
|
|
173
|
+
*/
|
|
174
|
+
reviewDecisionMode?: boolean;
|
|
175
|
+
/**
|
|
176
|
+
* Author preview: interactive answers allowed, but nothing is persisted; submit actions use preview copy.
|
|
177
|
+
*/
|
|
178
|
+
previewMode?: boolean;
|
|
179
|
+
/**
|
|
180
|
+
* Answer keys (question item names) that stay readonly while the rest of the form is editable.
|
|
181
|
+
* Used e.g. for work-order checklist asset prefill fields.
|
|
182
|
+
*/
|
|
183
|
+
readonlyAnswerKeys?: string[];
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Attachment item for display (question bank or questionnaire entity attachments).
|
|
187
|
+
*/
|
|
188
|
+
interface QuestionnaireViewerAttachment {
|
|
189
|
+
id: string;
|
|
190
|
+
name?: string;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Question data with full details
|
|
194
|
+
*/
|
|
195
|
+
interface QuestionnaireViewerQuestion {
|
|
196
|
+
/** Technical name of this questionnaire item (answer paths, visibility). */
|
|
197
|
+
name: string;
|
|
198
|
+
questionBankItemId: string;
|
|
199
|
+
/** Parent section technical name. */
|
|
200
|
+
sectionName: string;
|
|
201
|
+
order: number;
|
|
202
|
+
isRequired?: boolean | AXPExpression;
|
|
203
|
+
isVisible?: boolean | AXPExpression;
|
|
204
|
+
/** Resolved hint (question bank default + questionnaire item overrides). */
|
|
205
|
+
hint: AXMAssessmentQuestionHintConfig;
|
|
206
|
+
/** Resolved respondent comment policy (question bank default + questionnaire overrides). */
|
|
207
|
+
comment: AXMAssessmentQuestionCommentConfig;
|
|
208
|
+
/** Attachments from question bank item (access links shown under question). */
|
|
209
|
+
attachments?: QuestionnaireViewerAttachment[];
|
|
210
|
+
question: {
|
|
211
|
+
id: string;
|
|
212
|
+
/** Short list label (question bank administrators). */
|
|
213
|
+
title: AXPMultiLanguageString;
|
|
214
|
+
/** Respondent-facing question body (rich text). */
|
|
215
|
+
question?: AXPMultiLanguageString;
|
|
216
|
+
/** Optional note (rich text). */
|
|
217
|
+
note?: AXPMultiLanguageString;
|
|
218
|
+
difficulty?: string;
|
|
219
|
+
interface?: any;
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Section data with questions
|
|
224
|
+
*/
|
|
225
|
+
interface QuestionnaireViewerSection {
|
|
226
|
+
/** Technical section name. */
|
|
227
|
+
name: string;
|
|
228
|
+
title: AXPMultiLanguageString;
|
|
229
|
+
description?: AXPMultiLanguageString;
|
|
230
|
+
order: number;
|
|
231
|
+
isVisible?: boolean | AXPExpression;
|
|
232
|
+
questions: QuestionnaireViewerQuestion[];
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Questionnaire data for viewer
|
|
236
|
+
*/
|
|
237
|
+
interface QuestionnaireViewerData {
|
|
238
|
+
id: string;
|
|
239
|
+
title: AXPMultiLanguageString;
|
|
240
|
+
description?: AXPMultiLanguageString;
|
|
241
|
+
type: 'questionnaire' | 'survey' | 'checklist' | 'test' | 'evaluation';
|
|
242
|
+
/** Questionnaire-level reference documents (shown once during fill). */
|
|
243
|
+
attachments?: QuestionnaireViewerAttachment[];
|
|
244
|
+
sections: QuestionnaireViewerSection[];
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
interface QuestionnaireValidationError {
|
|
248
|
+
name: string;
|
|
249
|
+
questionTitle: string;
|
|
250
|
+
sectionName?: string;
|
|
251
|
+
sectionTitle?: string;
|
|
252
|
+
error: string;
|
|
253
|
+
}
|
|
254
|
+
interface QuestionnaireValidationResult {
|
|
255
|
+
isValid: boolean;
|
|
256
|
+
errors: QuestionnaireValidationError[];
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Questionnaire Viewer Component
|
|
261
|
+
* Renders a questionnaire for viewing/answering with configurable display modes
|
|
262
|
+
*/
|
|
263
|
+
declare class AXMQuestionnaireViewerComponent {
|
|
264
|
+
protected readonly vm: {
|
|
265
|
+
questionnaireData: _angular_core.Signal<QuestionnaireViewerData | null>;
|
|
266
|
+
structure: _angular_core.Signal<QuestionnaireBuilderValue | null>;
|
|
267
|
+
config: _angular_core.Signal<QuestionnaireViewerConfig | null>;
|
|
268
|
+
isLoading: _angular_core.Signal<boolean>;
|
|
269
|
+
error: _angular_core.Signal<string | null>;
|
|
270
|
+
currentSectionIndex: _angular_core.Signal<number>;
|
|
271
|
+
currentQuestionIndex: _angular_core.Signal<number>;
|
|
272
|
+
timerElapsed: _angular_core.Signal<number>;
|
|
273
|
+
timerInterval: _angular_core.Signal<any>;
|
|
274
|
+
form: _angular_core.Signal<any>;
|
|
275
|
+
widgetContainer: _angular_core.Signal<AXPWidgetContainerComponent | null>;
|
|
276
|
+
validationErrors: _angular_core.Signal<QuestionnaireValidationError[]>;
|
|
277
|
+
sectionVisibilityById: _angular_core.Signal<Record<string, boolean>>;
|
|
278
|
+
questionVisibilityById: _angular_core.Signal<Record<string, boolean>>;
|
|
279
|
+
commentVisibilityById: _angular_core.Signal<Record<string, boolean>>;
|
|
280
|
+
viewMode: _angular_core.Signal<QuestionnaireViewMode>;
|
|
281
|
+
isReadonly: _angular_core.Signal<boolean>;
|
|
282
|
+
printLayout: _angular_core.Signal<boolean>;
|
|
283
|
+
printSettings: _angular_core.Signal<Required<_acorex_platform_module_assessment_management_client_contracts.QuestionnairePrintSettings>>;
|
|
284
|
+
printPaging: _angular_core.Signal<QuestionnaireViewMode>;
|
|
285
|
+
sections: _angular_core.Signal<QuestionnaireViewerSection[]>;
|
|
286
|
+
questionnaireAttachments: _angular_core.Signal<QuestionnaireViewerAttachment[]>;
|
|
287
|
+
sectionIndicesWithVisibleContent: _angular_core.Signal<number[]>;
|
|
288
|
+
currentSection: _angular_core.Signal<QuestionnaireViewerSection | null>;
|
|
289
|
+
currentQuestion: _angular_core.Signal<QuestionnaireViewerQuestion | null>;
|
|
290
|
+
totalQuestionsCount: _angular_core.Signal<number>;
|
|
291
|
+
totalSectionsCount: _angular_core.Signal<number>;
|
|
292
|
+
progressMode: _angular_core.Signal<QuestionnaireProgressMode>;
|
|
293
|
+
answeredQuestionsCount: _angular_core.Signal<number>;
|
|
294
|
+
progressPercentage: _angular_core.Signal<number>;
|
|
295
|
+
showProgressBar: _angular_core.Signal<boolean>;
|
|
296
|
+
showTimer: _angular_core.Signal<boolean>;
|
|
297
|
+
timerTimeLimit: _angular_core.Signal<number | undefined>;
|
|
298
|
+
showQuestionNumbers: _angular_core.Signal<boolean>;
|
|
299
|
+
showQuestionCounter: _angular_core.Signal<boolean>;
|
|
300
|
+
currentQuestionPosition: _angular_core.Signal<{
|
|
301
|
+
current: number;
|
|
302
|
+
total: number;
|
|
303
|
+
}>;
|
|
304
|
+
timerText: _angular_core.Signal<string>;
|
|
305
|
+
timerWidget: _angular_core.Signal<_acorex_platform_framework_shared_core.AXPWidgetNode | null>;
|
|
306
|
+
validationStrategy: _angular_core.Signal<QuestionnaireValidationStrategy>;
|
|
307
|
+
canNavigateNext: _angular_core.Signal<boolean>;
|
|
308
|
+
canNavigatePrevious: _angular_core.Signal<boolean>;
|
|
309
|
+
isLastStep: _angular_core.Signal<boolean>;
|
|
310
|
+
areAllRequiredQuestionsAnswered: _angular_core.Signal<boolean>;
|
|
311
|
+
registerForm: (form: any) => void;
|
|
312
|
+
registerWidgetContainer: (container: AXPWidgetContainerComponent) => void;
|
|
313
|
+
loadQuestionnaire: (id: string, initialAnswers?: Record<string, any>, config?: QuestionnaireViewerConfig, structureDisplaySettings?: _acorex_platform_module_assessment_management_client_contracts.QuestionnaireDisplaySettings, structurePrintSettings?: _acorex_platform_module_assessment_management_client_contracts.QuestionnairePrintSettings) => Promise<void>;
|
|
314
|
+
loadStructure: (structure: QuestionnaireBuilderValue, config?: QuestionnaireViewerConfig, initialAnswers?: Record<string, any>) => Promise<void>;
|
|
315
|
+
refreshVisibility: () => Promise<void>;
|
|
316
|
+
isSectionVisible: (section: QuestionnaireViewerSection) => boolean;
|
|
317
|
+
getVisibleQuestionsInSection: (section: QuestionnaireViewerSection) => QuestionnaireViewerQuestion[];
|
|
318
|
+
isQuestionAnswered: (question: QuestionnaireViewerQuestion) => boolean;
|
|
319
|
+
getPrintQuestionsInSection: (section: QuestionnaireViewerSection) => QuestionnaireViewerQuestion[];
|
|
320
|
+
isPrintSectionVisible: (section: QuestionnaireViewerSection) => boolean;
|
|
321
|
+
isQuestionVisible: (question: QuestionnaireViewerQuestion) => boolean;
|
|
322
|
+
isCommentVisible: (question: QuestionnaireViewerQuestion) => boolean;
|
|
323
|
+
getVisibleQuestions: () => QuestionnaireViewerQuestion[];
|
|
324
|
+
validateQuestion: (question: QuestionnaireViewerQuestion) => Promise<string | null>;
|
|
325
|
+
validateCurrentPage: () => Promise<QuestionnaireValidationResult>;
|
|
326
|
+
validateAllQuestions: () => Promise<QuestionnaireValidationResult>;
|
|
327
|
+
navigateNext: () => Promise<boolean>;
|
|
328
|
+
navigatePrevious: () => Promise<boolean>;
|
|
329
|
+
isCurrentSectionValid: () => Promise<boolean>;
|
|
330
|
+
isSectionNavigable: (sectionIndex: number) => Promise<boolean>;
|
|
331
|
+
navigateToSection: (index: number) => Promise<boolean>;
|
|
332
|
+
navigateToQuestion: (sectionIndex: number, questionIndex: number) => Promise<boolean>;
|
|
333
|
+
getAllAnswers: () => Record<string, any>;
|
|
334
|
+
getQuestionsWithAnswers: () => Array<{
|
|
335
|
+
name: string;
|
|
336
|
+
questionBankItemId: string;
|
|
337
|
+
sectionName: string;
|
|
338
|
+
sectionOrder: number;
|
|
339
|
+
sectionTitle: _acorex_platform_framework_shared_core.AXPMultiLanguageString;
|
|
340
|
+
sectionDescription?: _acorex_platform_framework_shared_core.AXPMultiLanguageString;
|
|
341
|
+
title: string;
|
|
342
|
+
note?: string;
|
|
343
|
+
answer: any;
|
|
344
|
+
isRequired?: boolean | string;
|
|
345
|
+
question: QuestionnaireViewerQuestion;
|
|
346
|
+
}>;
|
|
347
|
+
getSectionUnansweredRequiredCount: (sectionName: string) => number;
|
|
348
|
+
saveDraft: () => {
|
|
349
|
+
success: boolean;
|
|
350
|
+
answers: Record<string, any>;
|
|
351
|
+
};
|
|
352
|
+
submit: () => Promise<{
|
|
353
|
+
success: boolean;
|
|
354
|
+
answers: Record<string, any>;
|
|
355
|
+
errors?: QuestionnaireValidationError[];
|
|
356
|
+
}>;
|
|
357
|
+
startTimer: () => void;
|
|
358
|
+
stopTimer: () => void;
|
|
359
|
+
updateTimerElapsed: (value: number) => void;
|
|
360
|
+
} & _ngrx_signals.StateSource<{
|
|
361
|
+
questionnaireData: QuestionnaireViewerData | null;
|
|
362
|
+
structure: QuestionnaireBuilderValue | null;
|
|
363
|
+
config: QuestionnaireViewerConfig | null;
|
|
364
|
+
isLoading: boolean;
|
|
365
|
+
error: string | null;
|
|
366
|
+
currentSectionIndex: number;
|
|
367
|
+
currentQuestionIndex: number;
|
|
368
|
+
timerElapsed: number;
|
|
369
|
+
timerInterval: any;
|
|
370
|
+
form: any;
|
|
371
|
+
widgetContainer: AXPWidgetContainerComponent | null;
|
|
372
|
+
validationErrors: QuestionnaireValidationError[];
|
|
373
|
+
sectionVisibilityById: Record<string, boolean>;
|
|
374
|
+
questionVisibilityById: Record<string, boolean>;
|
|
375
|
+
commentVisibilityById: Record<string, boolean>;
|
|
376
|
+
}>;
|
|
377
|
+
private readonly translationService;
|
|
378
|
+
/**
|
|
379
|
+
* Layout direction from the active UI language so question layout and widgets mirror correctly in RTL.
|
|
380
|
+
*/
|
|
381
|
+
protected readonly layoutDirection: _angular_core.Signal<"ltr" | "rtl">;
|
|
382
|
+
/**
|
|
383
|
+
* Questionnaire ID to load and display (required if structure is not provided)
|
|
384
|
+
*/
|
|
385
|
+
questionnaireId: _angular_core.InputSignal<string | undefined>;
|
|
386
|
+
/**
|
|
387
|
+
* Structure data for preview mode (used when questionnaireId is not provided)
|
|
388
|
+
*/
|
|
389
|
+
structure: _angular_core.InputSignal<QuestionnaireBuilderValue | undefined>;
|
|
390
|
+
/**
|
|
391
|
+
* Viewer configuration
|
|
392
|
+
* Note: If properties are undefined, displaySettings from structure will be used
|
|
393
|
+
*/
|
|
394
|
+
config: _angular_core.InputSignal<QuestionnaireViewerConfig | undefined>;
|
|
395
|
+
/**
|
|
396
|
+
* Initial answers to pre-fill the questionnaire
|
|
397
|
+
*/
|
|
398
|
+
initialAnswers: _angular_core.InputSignal<Record<string, any>>;
|
|
399
|
+
/**
|
|
400
|
+
* Emitted when answers change
|
|
401
|
+
*/
|
|
402
|
+
answersChanged: _angular_core.OutputEmitterRef<Record<string, any>>;
|
|
403
|
+
/**
|
|
404
|
+
* Emitted when a question is answered
|
|
405
|
+
*/
|
|
406
|
+
questionAnswered: _angular_core.OutputEmitterRef<{
|
|
407
|
+
name: string;
|
|
408
|
+
value: any;
|
|
409
|
+
}>;
|
|
410
|
+
/**
|
|
411
|
+
* Form reference for validation
|
|
412
|
+
*/
|
|
413
|
+
protected form: _angular_core.Signal<AXFormComponent | undefined>;
|
|
414
|
+
/**
|
|
415
|
+
* Widget container reference for context access
|
|
416
|
+
*/
|
|
417
|
+
protected widgetContainer: _angular_core.Signal<AXPWidgetContainerComponent | undefined>;
|
|
418
|
+
constructor();
|
|
419
|
+
/**
|
|
420
|
+
* Get viewmodel instance (for accessing computed properties)
|
|
421
|
+
*/
|
|
422
|
+
get viewmodel(): {
|
|
423
|
+
questionnaireData: _angular_core.Signal<QuestionnaireViewerData | null>;
|
|
424
|
+
structure: _angular_core.Signal<QuestionnaireBuilderValue | null>;
|
|
425
|
+
config: _angular_core.Signal<QuestionnaireViewerConfig | null>;
|
|
426
|
+
isLoading: _angular_core.Signal<boolean>;
|
|
427
|
+
error: _angular_core.Signal<string | null>;
|
|
428
|
+
currentSectionIndex: _angular_core.Signal<number>;
|
|
429
|
+
currentQuestionIndex: _angular_core.Signal<number>;
|
|
430
|
+
timerElapsed: _angular_core.Signal<number>;
|
|
431
|
+
timerInterval: _angular_core.Signal<any>;
|
|
432
|
+
form: _angular_core.Signal<any>;
|
|
433
|
+
widgetContainer: _angular_core.Signal<AXPWidgetContainerComponent | null>;
|
|
434
|
+
validationErrors: _angular_core.Signal<QuestionnaireValidationError[]>;
|
|
435
|
+
sectionVisibilityById: _angular_core.Signal<Record<string, boolean>>;
|
|
436
|
+
questionVisibilityById: _angular_core.Signal<Record<string, boolean>>;
|
|
437
|
+
commentVisibilityById: _angular_core.Signal<Record<string, boolean>>;
|
|
438
|
+
viewMode: _angular_core.Signal<QuestionnaireViewMode>;
|
|
439
|
+
isReadonly: _angular_core.Signal<boolean>;
|
|
440
|
+
printLayout: _angular_core.Signal<boolean>;
|
|
441
|
+
printSettings: _angular_core.Signal<Required<_acorex_platform_module_assessment_management_client_contracts.QuestionnairePrintSettings>>;
|
|
442
|
+
printPaging: _angular_core.Signal<QuestionnaireViewMode>;
|
|
443
|
+
sections: _angular_core.Signal<QuestionnaireViewerSection[]>;
|
|
444
|
+
questionnaireAttachments: _angular_core.Signal<QuestionnaireViewerAttachment[]>;
|
|
445
|
+
sectionIndicesWithVisibleContent: _angular_core.Signal<number[]>;
|
|
446
|
+
currentSection: _angular_core.Signal<QuestionnaireViewerSection | null>;
|
|
447
|
+
currentQuestion: _angular_core.Signal<QuestionnaireViewerQuestion | null>;
|
|
448
|
+
totalQuestionsCount: _angular_core.Signal<number>;
|
|
449
|
+
totalSectionsCount: _angular_core.Signal<number>;
|
|
450
|
+
progressMode: _angular_core.Signal<QuestionnaireProgressMode>;
|
|
451
|
+
answeredQuestionsCount: _angular_core.Signal<number>;
|
|
452
|
+
progressPercentage: _angular_core.Signal<number>;
|
|
453
|
+
showProgressBar: _angular_core.Signal<boolean>;
|
|
454
|
+
showTimer: _angular_core.Signal<boolean>;
|
|
455
|
+
timerTimeLimit: _angular_core.Signal<number | undefined>;
|
|
456
|
+
showQuestionNumbers: _angular_core.Signal<boolean>;
|
|
457
|
+
showQuestionCounter: _angular_core.Signal<boolean>;
|
|
458
|
+
currentQuestionPosition: _angular_core.Signal<{
|
|
459
|
+
current: number;
|
|
460
|
+
total: number;
|
|
461
|
+
}>;
|
|
462
|
+
timerText: _angular_core.Signal<string>;
|
|
463
|
+
timerWidget: _angular_core.Signal<_acorex_platform_framework_shared_core.AXPWidgetNode | null>;
|
|
464
|
+
validationStrategy: _angular_core.Signal<QuestionnaireValidationStrategy>;
|
|
465
|
+
canNavigateNext: _angular_core.Signal<boolean>;
|
|
466
|
+
canNavigatePrevious: _angular_core.Signal<boolean>;
|
|
467
|
+
isLastStep: _angular_core.Signal<boolean>;
|
|
468
|
+
areAllRequiredQuestionsAnswered: _angular_core.Signal<boolean>;
|
|
469
|
+
registerForm: (form: any) => void;
|
|
470
|
+
registerWidgetContainer: (container: AXPWidgetContainerComponent) => void;
|
|
471
|
+
loadQuestionnaire: (id: string, initialAnswers?: Record<string, any>, config?: QuestionnaireViewerConfig, structureDisplaySettings?: _acorex_platform_module_assessment_management_client_contracts.QuestionnaireDisplaySettings, structurePrintSettings?: _acorex_platform_module_assessment_management_client_contracts.QuestionnairePrintSettings) => Promise<void>;
|
|
472
|
+
loadStructure: (structure: QuestionnaireBuilderValue, config?: QuestionnaireViewerConfig, initialAnswers?: Record<string, any>) => Promise<void>;
|
|
473
|
+
refreshVisibility: () => Promise<void>;
|
|
474
|
+
isSectionVisible: (section: QuestionnaireViewerSection) => boolean;
|
|
475
|
+
getVisibleQuestionsInSection: (section: QuestionnaireViewerSection) => QuestionnaireViewerQuestion[];
|
|
476
|
+
isQuestionAnswered: (question: QuestionnaireViewerQuestion) => boolean;
|
|
477
|
+
getPrintQuestionsInSection: (section: QuestionnaireViewerSection) => QuestionnaireViewerQuestion[];
|
|
478
|
+
isPrintSectionVisible: (section: QuestionnaireViewerSection) => boolean;
|
|
479
|
+
isQuestionVisible: (question: QuestionnaireViewerQuestion) => boolean;
|
|
480
|
+
isCommentVisible: (question: QuestionnaireViewerQuestion) => boolean;
|
|
481
|
+
getVisibleQuestions: () => QuestionnaireViewerQuestion[];
|
|
482
|
+
validateQuestion: (question: QuestionnaireViewerQuestion) => Promise<string | null>;
|
|
483
|
+
validateCurrentPage: () => Promise<QuestionnaireValidationResult>;
|
|
484
|
+
validateAllQuestions: () => Promise<QuestionnaireValidationResult>;
|
|
485
|
+
navigateNext: () => Promise<boolean>;
|
|
486
|
+
navigatePrevious: () => Promise<boolean>;
|
|
487
|
+
isCurrentSectionValid: () => Promise<boolean>;
|
|
488
|
+
isSectionNavigable: (sectionIndex: number) => Promise<boolean>;
|
|
489
|
+
navigateToSection: (index: number) => Promise<boolean>;
|
|
490
|
+
navigateToQuestion: (sectionIndex: number, questionIndex: number) => Promise<boolean>;
|
|
491
|
+
getAllAnswers: () => Record<string, any>;
|
|
492
|
+
getQuestionsWithAnswers: () => Array<{
|
|
493
|
+
name: string;
|
|
494
|
+
questionBankItemId: string;
|
|
495
|
+
sectionName: string;
|
|
496
|
+
sectionOrder: number;
|
|
497
|
+
sectionTitle: _acorex_platform_framework_shared_core.AXPMultiLanguageString;
|
|
498
|
+
sectionDescription?: _acorex_platform_framework_shared_core.AXPMultiLanguageString;
|
|
499
|
+
title: string;
|
|
500
|
+
note?: string;
|
|
501
|
+
answer: any;
|
|
502
|
+
isRequired?: boolean | string;
|
|
503
|
+
question: QuestionnaireViewerQuestion;
|
|
504
|
+
}>;
|
|
505
|
+
getSectionUnansweredRequiredCount: (sectionName: string) => number;
|
|
506
|
+
saveDraft: () => {
|
|
507
|
+
success: boolean;
|
|
508
|
+
answers: Record<string, any>;
|
|
509
|
+
};
|
|
510
|
+
submit: () => Promise<{
|
|
511
|
+
success: boolean;
|
|
512
|
+
answers: Record<string, any>;
|
|
513
|
+
errors?: QuestionnaireValidationError[];
|
|
514
|
+
}>;
|
|
515
|
+
startTimer: () => void;
|
|
516
|
+
stopTimer: () => void;
|
|
517
|
+
updateTimerElapsed: (value: number) => void;
|
|
518
|
+
} & _ngrx_signals.StateSource<{
|
|
519
|
+
questionnaireData: QuestionnaireViewerData | null;
|
|
520
|
+
structure: QuestionnaireBuilderValue | null;
|
|
521
|
+
config: QuestionnaireViewerConfig | null;
|
|
522
|
+
isLoading: boolean;
|
|
523
|
+
error: string | null;
|
|
524
|
+
currentSectionIndex: number;
|
|
525
|
+
currentQuestionIndex: number;
|
|
526
|
+
timerElapsed: number;
|
|
527
|
+
timerInterval: any;
|
|
528
|
+
form: any;
|
|
529
|
+
widgetContainer: AXPWidgetContainerComponent | null;
|
|
530
|
+
validationErrors: QuestionnaireValidationError[];
|
|
531
|
+
sectionVisibilityById: Record<string, boolean>;
|
|
532
|
+
questionVisibilityById: Record<string, boolean>;
|
|
533
|
+
commentVisibilityById: Record<string, boolean>;
|
|
534
|
+
}>;
|
|
535
|
+
/**
|
|
536
|
+
* Check if can navigate previous
|
|
537
|
+
*/
|
|
538
|
+
get canNavigatePrevious(): boolean;
|
|
539
|
+
/**
|
|
540
|
+
* Check if can navigate next
|
|
541
|
+
*/
|
|
542
|
+
get canNavigateNext(): boolean;
|
|
543
|
+
/**
|
|
544
|
+
* Get current view mode
|
|
545
|
+
*/
|
|
546
|
+
get viewMode(): 'single-page' | 'page-per-group' | 'page-per-question' | 'side-menu';
|
|
547
|
+
/**
|
|
548
|
+
* Check if we're on the last step
|
|
549
|
+
*/
|
|
550
|
+
get isLastStep(): boolean;
|
|
551
|
+
/**
|
|
552
|
+
* Check if all required questions are answered
|
|
553
|
+
*/
|
|
554
|
+
get areAllRequiredQuestionsAnswered(): boolean;
|
|
555
|
+
/**
|
|
556
|
+
* Navigate to next question/section
|
|
557
|
+
* Validates current page before navigating
|
|
558
|
+
* @returns true if navigation succeeded, false if validation failed
|
|
559
|
+
*/
|
|
560
|
+
navigateNext(): Promise<boolean>;
|
|
561
|
+
/**
|
|
562
|
+
* Navigate to previous question/section
|
|
563
|
+
* @returns true if navigation succeeded
|
|
564
|
+
*/
|
|
565
|
+
navigatePrevious(): Promise<boolean>;
|
|
566
|
+
/**
|
|
567
|
+
* Navigate to specific section
|
|
568
|
+
* Validates current page before navigating
|
|
569
|
+
* @param index Section index (0-based)
|
|
570
|
+
* @returns true if navigation succeeded, false if validation failed
|
|
571
|
+
*/
|
|
572
|
+
navigateToSection(index: number): Promise<boolean>;
|
|
573
|
+
/**
|
|
574
|
+
* Navigate to specific question
|
|
575
|
+
* Validates current page before navigating
|
|
576
|
+
* @param sectionIndex Section index (0-based)
|
|
577
|
+
* @param questionIndex Question index (0-based)
|
|
578
|
+
* @returns true if navigation succeeded, false if validation failed
|
|
579
|
+
*/
|
|
580
|
+
navigateToQuestion(sectionIndex: number, questionIndex: number): Promise<boolean>;
|
|
581
|
+
/**
|
|
582
|
+
* Validate all visible questions on current page
|
|
583
|
+
* @returns Validation result with errors
|
|
584
|
+
*/
|
|
585
|
+
validateCurrentPage(): Promise<QuestionnaireValidationResult>;
|
|
586
|
+
/**
|
|
587
|
+
* Validate all questions in entire questionnaire
|
|
588
|
+
* @returns Validation result with errors
|
|
589
|
+
*/
|
|
590
|
+
validateAllQuestions(): Promise<QuestionnaireValidationResult>;
|
|
591
|
+
/**
|
|
592
|
+
* Get all answers from context
|
|
593
|
+
*/
|
|
594
|
+
getAllAnswers(): Record<string, any>;
|
|
595
|
+
/**
|
|
596
|
+
* Get questions with their corresponding answers
|
|
597
|
+
*/
|
|
598
|
+
getQuestionsWithAnswers(): {
|
|
599
|
+
name: string;
|
|
600
|
+
questionBankItemId: string;
|
|
601
|
+
sectionName: string;
|
|
602
|
+
sectionOrder: number;
|
|
603
|
+
sectionTitle: _acorex_platform_framework_shared_core.AXPMultiLanguageString;
|
|
604
|
+
sectionDescription?: _acorex_platform_framework_shared_core.AXPMultiLanguageString;
|
|
605
|
+
title: string;
|
|
606
|
+
note?: string;
|
|
607
|
+
answer: any;
|
|
608
|
+
isRequired?: boolean | string;
|
|
609
|
+
question: QuestionnaireViewerQuestion;
|
|
610
|
+
}[];
|
|
611
|
+
/**
|
|
612
|
+
* Get context data for review step (answers at widget paths).
|
|
613
|
+
* Must be called before transitioning to review while viewer is still rendered.
|
|
614
|
+
*/
|
|
615
|
+
getReviewContext(): Record<string, any>;
|
|
616
|
+
/**
|
|
617
|
+
* Collect answers for draft save (no required-field validation).
|
|
618
|
+
*/
|
|
619
|
+
saveDraft(): {
|
|
620
|
+
success: boolean;
|
|
621
|
+
answers: Record<string, any>;
|
|
622
|
+
};
|
|
623
|
+
/**
|
|
624
|
+
* Submit questionnaire
|
|
625
|
+
* Validates all questions before submitting
|
|
626
|
+
* @returns Submit result with success status, answers, and errors if any
|
|
627
|
+
*/
|
|
628
|
+
submit(): Promise<{
|
|
629
|
+
success: boolean;
|
|
630
|
+
answers: Record<string, any>;
|
|
631
|
+
errors?: QuestionnaireValidationError[];
|
|
632
|
+
}>;
|
|
633
|
+
/**
|
|
634
|
+
* Handle context changes for auto-save
|
|
635
|
+
*/
|
|
636
|
+
protected handleContextChanged(): void;
|
|
637
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMQuestionnaireViewerComponent, never>;
|
|
638
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXMQuestionnaireViewerComponent, "axm-questionnaire-viewer", never, { "questionnaireId": { "alias": "questionnaireId"; "required": false; "isSignal": true; }; "structure": { "alias": "structure"; "required": false; "isSignal": true; }; "config": { "alias": "config"; "required": false; "isSignal": true; }; "initialAnswers": { "alias": "initialAnswers"; "required": false; "isSignal": true; }; }, { "answersChanged": "answersChanged"; "questionAnswered": "questionAnswered"; }, never, never, true, never>;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
declare class AXMQuestionnaireViewerFeatureModule {
|
|
642
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMQuestionnaireViewerFeatureModule, never>;
|
|
643
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXMQuestionnaireViewerFeatureModule, never, [typeof _acorex_platform_framework_client_layout_widget_core.AXPWidgetCoreModule, typeof AXMQuestionnaireViewerComponent], never>;
|
|
644
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXMQuestionnaireViewerFeatureModule>;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
declare class AXMAssessmentManagementModule {
|
|
648
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMAssessmentManagementModule, never>;
|
|
649
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXMAssessmentManagementModule, never, [typeof AXMAssessmentManagementFileTypeModule, typeof AXMQuestionnaireBuilderFeatureModule, typeof AXMQuestionnaireViewerFeatureModule], never>;
|
|
650
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXMAssessmentManagementModule>;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
/**
|
|
654
|
+
* Returns a plain {@link AXPWidgetNode} for rendering / validation, removing optional
|
|
655
|
+
* `metadata` provenance stored alongside the widget configuration on question bank items.
|
|
656
|
+
*/
|
|
657
|
+
declare function stripQuestionBankInterfaceMetadata(value: AXMQuestionBankItemInterfaceValue | AXPWidgetNode | undefined | null): AXPWidgetNode | undefined;
|
|
658
|
+
/**
|
|
659
|
+
* Normalizes the `interface` field of a meta-data definition entity row to a widget node.
|
|
660
|
+
*/
|
|
661
|
+
declare function resolveWidgetNodeFromMetaDataDefinitionInterface(raw: string | AXPWidgetNode | (() => Promise<AXPWidgetNode>) | null | undefined): Promise<AXPWidgetNode | null>;
|
|
662
|
+
|
|
663
|
+
/**
|
|
664
|
+
* Resolved display styling for an outcome value row.
|
|
665
|
+
*/
|
|
666
|
+
interface OutcomeResultDisplay {
|
|
667
|
+
color?: string;
|
|
668
|
+
emphasis: QuestionnaireOutcomeDisplayEmphasis;
|
|
669
|
+
iconClass?: string;
|
|
670
|
+
}
|
|
671
|
+
/**
|
|
672
|
+
* One evaluated outcome row for the post-submit results step.
|
|
673
|
+
*/
|
|
674
|
+
interface OutcomeResultEntry {
|
|
675
|
+
key: string;
|
|
676
|
+
value: unknown;
|
|
677
|
+
label: string;
|
|
678
|
+
display?: OutcomeResultDisplay;
|
|
679
|
+
}
|
|
680
|
+
/**
|
|
681
|
+
* Outcome results grouped under a questionnaire outcomes section.
|
|
682
|
+
*/
|
|
683
|
+
interface OutcomeResultSectionGroup {
|
|
684
|
+
trackKey: string;
|
|
685
|
+
sectionName: string;
|
|
686
|
+
sectionOrder: number;
|
|
687
|
+
sectionTitle: AXPMultiLanguageString;
|
|
688
|
+
sectionDescription?: AXPMultiLanguageString;
|
|
689
|
+
items: OutcomeResultEntry[];
|
|
690
|
+
}
|
|
691
|
+
/**
|
|
692
|
+
* Placeholder values for post-questionnaire summary content.
|
|
693
|
+
* Fixed keys plus any {{name}} from questionnaire outcomes.
|
|
694
|
+
*/
|
|
695
|
+
interface SummaryPlaceholderValues {
|
|
696
|
+
totalQuestions?: number;
|
|
697
|
+
answeredCount?: number;
|
|
698
|
+
/** Elapsed questionnaire time in whole seconds (e.g. from the viewer timer). */
|
|
699
|
+
totalTimeSeconds?: number;
|
|
700
|
+
/** Pre-formatted duration for {{totalTime}}. */
|
|
701
|
+
totalTimeFormatted?: string;
|
|
702
|
+
/** Computed outcome values (name -> value) for placeholders like {{bmi}}. */
|
|
703
|
+
outcomes?: Record<string, unknown>;
|
|
704
|
+
/** Display label per outcome `name` (title); used in the outcomes list UI. */
|
|
705
|
+
outcomeTitles?: Record<string, string>;
|
|
706
|
+
/** Outcome rows grouped by configured outcomes section (when available). */
|
|
707
|
+
outcomeSections?: OutcomeResultSectionGroup[];
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
/** Named values produced by questionnaire outcome rules (outcome `name` → evaluated value). */
|
|
711
|
+
type QuestionnaireOutcomeValues = Record<string, unknown>;
|
|
712
|
+
interface AXMQuestionnaireViewerServiceConfig {
|
|
713
|
+
/**
|
|
714
|
+
* Dialog title
|
|
715
|
+
*/
|
|
716
|
+
title: string;
|
|
717
|
+
/**
|
|
718
|
+
* Questionnaire structure data
|
|
719
|
+
*/
|
|
720
|
+
structure: QuestionnaireBuilderValue;
|
|
721
|
+
/**
|
|
722
|
+
* Pre/post questionnaire config (welcome, review, summary)
|
|
723
|
+
*/
|
|
724
|
+
prePostConfig?: PrePostConfig | null;
|
|
725
|
+
/**
|
|
726
|
+
* Optional viewer configuration
|
|
727
|
+
* If not provided, displaySettings from structure will be used
|
|
728
|
+
*/
|
|
729
|
+
config?: QuestionnaireViewerConfig;
|
|
730
|
+
/**
|
|
731
|
+
* Initial answers to pre-fill the questionnaire
|
|
732
|
+
*/
|
|
733
|
+
initialAnswers?: Record<string, any>;
|
|
734
|
+
/**
|
|
735
|
+
* Persisted questionnaire entity id — used to load embedded outcome rules when inline rules are not provided.
|
|
736
|
+
*/
|
|
737
|
+
questionnaireId?: string;
|
|
738
|
+
/**
|
|
739
|
+
* Selected ContentManagement.TextTemplate id for PDF preview (builder Preview has no session).
|
|
740
|
+
*/
|
|
741
|
+
printTemplateId?: string;
|
|
742
|
+
/**
|
|
743
|
+
* Inline outcome rules (e.g. unsaved builder state). Takes precedence over loading from the questionnaire entity.
|
|
744
|
+
*/
|
|
745
|
+
outcomeRules?: QuestionnaireOutcomeItem[];
|
|
746
|
+
/**
|
|
747
|
+
* When provided, called on submit. Should save and return result for summary.
|
|
748
|
+
*/
|
|
749
|
+
submitHandler?: (answers: Record<string, any>) => Promise<SummaryPlaceholderValues | null | void>;
|
|
750
|
+
/**
|
|
751
|
+
* When provided, called on save-and-continue (draft). Should persist without final validation.
|
|
752
|
+
*/
|
|
753
|
+
saveHandler?: (answers: Record<string, any>) => Promise<void>;
|
|
754
|
+
/**
|
|
755
|
+
* Assessment case/session ids for fill popup persistence (popup cannot receive function handlers).
|
|
756
|
+
*/
|
|
757
|
+
assessmentFillContext?: QuestionnaireAssessmentFillContext;
|
|
758
|
+
/**
|
|
759
|
+
* Pre-built outcome results for readonly session review (e.g. stored session.outcomes snapshot).
|
|
760
|
+
*/
|
|
761
|
+
storedOutcomeResults?: SummaryPlaceholderValues | null;
|
|
762
|
+
}
|
|
763
|
+
interface AXMQuestionnaireViewerServiceResult {
|
|
764
|
+
/**
|
|
765
|
+
* All answers from the questionnaire
|
|
766
|
+
*/
|
|
767
|
+
answers: Record<string, any>;
|
|
768
|
+
/**
|
|
769
|
+
* Questions with their corresponding answers
|
|
770
|
+
*/
|
|
771
|
+
questions: Array<{
|
|
772
|
+
name: string;
|
|
773
|
+
questionBankItemId: string;
|
|
774
|
+
sectionName: string;
|
|
775
|
+
title: string;
|
|
776
|
+
note?: string;
|
|
777
|
+
answer: any;
|
|
778
|
+
isRequired?: boolean | string;
|
|
779
|
+
}>;
|
|
780
|
+
/**
|
|
781
|
+
* Whether the dialog was submitted (true) or closed (false)
|
|
782
|
+
*/
|
|
783
|
+
submitted: boolean;
|
|
784
|
+
/**
|
|
785
|
+
* Draft saved via save-and-continue without final submit.
|
|
786
|
+
*/
|
|
787
|
+
saved?: boolean;
|
|
788
|
+
/**
|
|
789
|
+
* Manager review decision when `config.reviewDecisionMode` is enabled.
|
|
790
|
+
*/
|
|
791
|
+
decision?: 'signed-off' | 'rejected';
|
|
792
|
+
}
|
|
793
|
+
/**
|
|
794
|
+
* Opens the questionnaire viewer dialog and evaluates questionnaire outcomes when a questionnaire id is provided.
|
|
795
|
+
*/
|
|
796
|
+
declare class AXMQuestionnaireViewerService {
|
|
797
|
+
private readonly popupService;
|
|
798
|
+
private readonly entityService;
|
|
799
|
+
private readonly expressionEvaluator;
|
|
800
|
+
protected readonly deviceService: AXPDeviceService;
|
|
801
|
+
/**
|
|
802
|
+
* Open questionnaire viewer in a dialog
|
|
803
|
+
*/
|
|
804
|
+
open(config: AXMQuestionnaireViewerServiceConfig): Promise<AXMQuestionnaireViewerServiceResult | null>;
|
|
805
|
+
/**
|
|
806
|
+
* Evaluate all questionnaire outcomes for the given questionnaire and answers.
|
|
807
|
+
* Pass `structure` so expressions can use `answer.byId`, `answer.byTag`, and `answer.allByTag`.
|
|
808
|
+
*/
|
|
809
|
+
/**
|
|
810
|
+
* Resolves `isVisible` for a section or question: `false` hides; `true`/undefined shows;
|
|
811
|
+
* non-empty string is evaluated with the same scope as questionnaire outcomes (`answer.*`, `fn.*`, etc.).
|
|
812
|
+
*/
|
|
813
|
+
evaluateQuestionnaireVisibilityFlag(isVisible: boolean | string | undefined | null, answers: Record<string, unknown>, structure: QuestionnaireBuilderValue | null | undefined): Promise<boolean>;
|
|
814
|
+
/**
|
|
815
|
+
* Evaluates questionnaire outcome rules and returns values plus display titles.
|
|
816
|
+
*/
|
|
817
|
+
evaluateOutcomes(answers: Record<string, unknown>, options?: {
|
|
818
|
+
questionnaireId?: string;
|
|
819
|
+
outcomeRules?: QuestionnaireOutcomeItem[];
|
|
820
|
+
structure?: QuestionnaireBuilderValue | null;
|
|
821
|
+
}): Promise<{
|
|
822
|
+
values: QuestionnaireOutcomeValues;
|
|
823
|
+
outcomeTitles: Record<string, string>;
|
|
824
|
+
}>;
|
|
825
|
+
/**
|
|
826
|
+
* Progress metrics and optional outcome results for summary / preview.
|
|
827
|
+
*/
|
|
828
|
+
buildSummaryPlaceholderValues(structure: QuestionnaireBuilderValue, answers: Record<string, any>, options?: {
|
|
829
|
+
questionnaireId?: string;
|
|
830
|
+
outcomeRules?: QuestionnaireOutcomeItem[];
|
|
831
|
+
elapsedSeconds?: number;
|
|
832
|
+
}): Promise<SummaryPlaceholderValues>;
|
|
833
|
+
/**
|
|
834
|
+
* Builds outcome section rows from stored session values (no expression re-evaluation).
|
|
835
|
+
*/
|
|
836
|
+
buildOutcomeResultsFromStoredValues(storedOutcomes: Record<string, unknown>, options: {
|
|
837
|
+
questionnaireId: string;
|
|
838
|
+
}): Promise<Pick<SummaryPlaceholderValues, 'outcomes' | 'outcomeTitles' | 'outcomeSections'>>;
|
|
839
|
+
/**
|
|
840
|
+
* Count answered questions using the same paths as the viewer session (item id or answers.itemId).
|
|
841
|
+
*/
|
|
842
|
+
calculateProgressFromStructure(structure: QuestionnaireBuilderValue, answers: Record<string, any>): {
|
|
843
|
+
answeredQuestionsCount: number;
|
|
844
|
+
progressPercentage: number;
|
|
845
|
+
};
|
|
846
|
+
private resolveOutcomeRules;
|
|
847
|
+
private resolveOutcomeSections;
|
|
848
|
+
private loadQuestionnaire;
|
|
849
|
+
private buildOutcomeResultSections;
|
|
850
|
+
/**
|
|
851
|
+
* First matching display rule for an evaluated outcome value.
|
|
852
|
+
*/
|
|
853
|
+
private resolveOutcomeDisplay;
|
|
854
|
+
/**
|
|
855
|
+
* Display label for an outcome rule: `title` when set, otherwise a humanized `name`.
|
|
856
|
+
*/
|
|
857
|
+
private resolveOutcomeDisplayTitle;
|
|
858
|
+
private humanizeOutcomeKey;
|
|
859
|
+
private computeResult;
|
|
860
|
+
/** Non-empty trimmed `expression`, or empty string if missing. */
|
|
861
|
+
private outcomeExpressionText;
|
|
862
|
+
private inferResultKind;
|
|
863
|
+
private coerceOutcome;
|
|
864
|
+
private evaluateOutcomeExpression;
|
|
865
|
+
/**
|
|
866
|
+
* Resolves an answer the same way as the viewer session (`key` or `answers.key`).
|
|
867
|
+
*/
|
|
868
|
+
private resolveStoredAnswer;
|
|
869
|
+
/** Sections and items ordered by `order` for deterministic `byTag` matching. */
|
|
870
|
+
private flattenQuestionnaireItems;
|
|
871
|
+
private normalizeQuestionnaireTag;
|
|
872
|
+
/**
|
|
873
|
+
* Scope: answer.eval (path), answer.byId / byTag / allByTag, formula.eval / outcome.eval, fn.* helpers.
|
|
874
|
+
*/
|
|
875
|
+
private buildExpressionScope;
|
|
876
|
+
private expressionOutcomeRefs;
|
|
877
|
+
private topologicalSort;
|
|
878
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMQuestionnaireViewerService, never>;
|
|
879
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMQuestionnaireViewerService>;
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
declare class AXMQuestionnairePrintHostComponent {
|
|
883
|
+
private readonly cdr;
|
|
884
|
+
private readonly elementRef;
|
|
885
|
+
private readonly questionnaireViewerService;
|
|
886
|
+
structure: _angular_core.InputSignal<QuestionnaireBuilderValue | undefined>;
|
|
887
|
+
questionnaireId: _angular_core.InputSignal<string | undefined>;
|
|
888
|
+
answers: _angular_core.InputSignal<Record<string, unknown>>;
|
|
889
|
+
prePostConfig: _angular_core.InputSignal<PrePostConfig | null | undefined>;
|
|
890
|
+
placeholderValues: _angular_core.InputSignal<SummaryPlaceholderValues | null | undefined>;
|
|
891
|
+
/** Per-call overrides of questionnaire Printing Options. */
|
|
892
|
+
options: _angular_core.InputSignal<Partial<QuestionnairePrintSettings> | undefined>;
|
|
893
|
+
protected readonly active: _angular_core.WritableSignal<boolean>;
|
|
894
|
+
private readonly captureAnswers;
|
|
895
|
+
private readonly captureOptions;
|
|
896
|
+
private readonly capturePlaceholders;
|
|
897
|
+
protected readonly printAnswers: _angular_core.Signal<Record<string, unknown>>;
|
|
898
|
+
protected readonly resolvedPrintSettings: _angular_core.Signal<Required<QuestionnairePrintSettings>>;
|
|
899
|
+
protected readonly resolvedPlaceholders: _angular_core.Signal<SummaryPlaceholderValues | null>;
|
|
900
|
+
protected readonly showWelcomeScreen: _angular_core.Signal<boolean>;
|
|
901
|
+
protected readonly showSummaryAfterSubmit: _angular_core.Signal<boolean>;
|
|
902
|
+
protected readonly showOutcomeResults: _angular_core.Signal<boolean>;
|
|
903
|
+
protected readonly welcomeContent: _angular_core.Signal<_acorex_platform_framework_shared_core.AXPMultiLanguageString | undefined>;
|
|
904
|
+
protected readonly summaryContent: _angular_core.Signal<_acorex_platform_framework_shared_core.AXPMultiLanguageString | undefined>;
|
|
905
|
+
protected readonly contentWidthCss: _angular_core.Signal<string>;
|
|
906
|
+
protected readonly printConfig: _angular_core.Signal<QuestionnaireViewerConfig>;
|
|
907
|
+
captureBodyHtml(answers?: Record<string, unknown>, options?: Partial<QuestionnairePrintSettings>): Promise<string>;
|
|
908
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMQuestionnairePrintHostComponent, never>;
|
|
909
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXMQuestionnairePrintHostComponent, "axm-questionnaire-print-host", never, { "structure": { "alias": "structure"; "required": false; "isSignal": true; }; "questionnaireId": { "alias": "questionnaireId"; "required": false; "isSignal": true; }; "answers": { "alias": "answers"; "required": false; "isSignal": true; }; "prePostConfig": { "alias": "prePostConfig"; "required": false; "isSignal": true; }; "placeholderValues": { "alias": "placeholderValues"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
interface QuestionWithAnswer {
|
|
913
|
+
name: string;
|
|
914
|
+
title: string;
|
|
915
|
+
answer: unknown;
|
|
916
|
+
/** Full question with interface for widget rendering in view mode. */
|
|
917
|
+
question?: QuestionnaireViewerQuestion;
|
|
918
|
+
/** Section technical name (for grouping in review). */
|
|
919
|
+
sectionName?: string;
|
|
920
|
+
/** Section order from questionnaire (matches `section.order` in viewer). */
|
|
921
|
+
sectionOrder?: number;
|
|
922
|
+
sectionTitle?: AXPMultiLanguageString;
|
|
923
|
+
sectionDescription?: AXPMultiLanguageString;
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
type FlowStep$1 = 'pre' | 'questions' | 'review' | 'summary' | 'results';
|
|
927
|
+
declare class AXMQuestionnaireViewerPageComponent extends AXPPageLayoutBaseComponent {
|
|
928
|
+
protected readonly route: ActivatedRoute;
|
|
929
|
+
private readonly entityService;
|
|
930
|
+
private readonly authSession;
|
|
931
|
+
private readonly questionnaireViewerService;
|
|
932
|
+
private readonly printSnapshot;
|
|
933
|
+
protected readonly structure: _angular_core.WritableSignal<QuestionnaireBuilderValue | null>;
|
|
934
|
+
protected readonly questionnaire: _angular_core.WritableSignal<AXMAssessmentManagementQuestionnaireEntityModel | null>;
|
|
935
|
+
protected readonly initialAnswers: _angular_core.WritableSignal<Record<string, any>>;
|
|
936
|
+
protected readonly viewerConfig: _angular_core.WritableSignal<QuestionnaireViewerConfig | undefined>;
|
|
937
|
+
protected readonly prePostConfig: _angular_core.WritableSignal<_acorex_platform_module_assessment_management_client_contracts.PrePostConfig | null>;
|
|
938
|
+
protected readonly isLoading: _angular_core.WritableSignal<boolean>;
|
|
939
|
+
protected readonly loadError: _angular_core.WritableSignal<string | null>;
|
|
940
|
+
protected readonly currentSessionId: _angular_core.WritableSignal<string | null>;
|
|
941
|
+
protected readonly existingSession: _angular_core.WritableSignal<AXMAssessmentManagementAssessmentSessionEntityModel | null>;
|
|
942
|
+
protected readonly flowStep: _angular_core.WritableSignal<FlowStep$1>;
|
|
943
|
+
protected readonly reviewSnapshot: _angular_core.WritableSignal<QuestionWithAnswer[]>;
|
|
944
|
+
protected readonly reviewContext: _angular_core.WritableSignal<Record<string, any> | null>;
|
|
945
|
+
protected readonly submitResult: _angular_core.WritableSignal<SummaryPlaceholderValues | null>;
|
|
946
|
+
protected readonly isSubmitting: _angular_core.WritableSignal<boolean>;
|
|
947
|
+
protected readonly canNavigatePrevious: _angular_core.WritableSignal<boolean>;
|
|
948
|
+
protected readonly canNavigateNext: _angular_core.WritableSignal<boolean>;
|
|
949
|
+
protected readonly showNavigationButtons: _angular_core.WritableSignal<boolean>;
|
|
950
|
+
protected readonly isLastStep: _angular_core.WritableSignal<boolean>;
|
|
951
|
+
protected readonly areAllRequiredQuestionsAnswered: _angular_core.WritableSignal<boolean>;
|
|
952
|
+
protected readonly viewer: _angular_core.Signal<AXMQuestionnaireViewerComponent | undefined>;
|
|
953
|
+
protected readonly printHost: _angular_core.Signal<AXMQuestionnairePrintHostComponent | undefined>;
|
|
954
|
+
protected readonly printAnswers: _angular_core.WritableSignal<Record<string, unknown>>;
|
|
955
|
+
protected readonly viewerViewModel: _angular_core.Signal<({
|
|
956
|
+
questionnaireData: _angular_core.Signal<QuestionnaireViewerData | null>;
|
|
957
|
+
structure: _angular_core.Signal<QuestionnaireBuilderValue | null>;
|
|
958
|
+
config: _angular_core.Signal<QuestionnaireViewerConfig | null>;
|
|
959
|
+
isLoading: _angular_core.Signal<boolean>;
|
|
960
|
+
error: _angular_core.Signal<string | null>;
|
|
961
|
+
currentSectionIndex: _angular_core.Signal<number>;
|
|
962
|
+
currentQuestionIndex: _angular_core.Signal<number>;
|
|
963
|
+
timerElapsed: _angular_core.Signal<number>;
|
|
964
|
+
timerInterval: _angular_core.Signal<any>;
|
|
965
|
+
form: _angular_core.Signal<any>;
|
|
966
|
+
widgetContainer: _angular_core.Signal<dist_libs_framework_client_types_acorex_platform_framework_client_layout_widget_core.AXPWidgetContainerComponent | null>;
|
|
967
|
+
validationErrors: _angular_core.Signal<QuestionnaireValidationError[]>;
|
|
968
|
+
sectionVisibilityById: _angular_core.Signal<Record<string, boolean>>;
|
|
969
|
+
questionVisibilityById: _angular_core.Signal<Record<string, boolean>>;
|
|
970
|
+
commentVisibilityById: _angular_core.Signal<Record<string, boolean>>;
|
|
971
|
+
viewMode: _angular_core.Signal<QuestionnaireViewMode>;
|
|
972
|
+
isReadonly: _angular_core.Signal<boolean>;
|
|
973
|
+
printLayout: _angular_core.Signal<boolean>;
|
|
974
|
+
printSettings: _angular_core.Signal<Required<_acorex_platform_module_assessment_management_client_contracts.QuestionnairePrintSettings>>;
|
|
975
|
+
printPaging: _angular_core.Signal<QuestionnaireViewMode>;
|
|
976
|
+
sections: _angular_core.Signal<QuestionnaireViewerSection[]>;
|
|
977
|
+
questionnaireAttachments: _angular_core.Signal<QuestionnaireViewerAttachment[]>;
|
|
978
|
+
sectionIndicesWithVisibleContent: _angular_core.Signal<number[]>;
|
|
979
|
+
currentSection: _angular_core.Signal<QuestionnaireViewerSection | null>;
|
|
980
|
+
currentQuestion: _angular_core.Signal<QuestionnaireViewerQuestion | null>;
|
|
981
|
+
totalQuestionsCount: _angular_core.Signal<number>;
|
|
982
|
+
totalSectionsCount: _angular_core.Signal<number>;
|
|
983
|
+
progressMode: _angular_core.Signal<QuestionnaireProgressMode>;
|
|
984
|
+
answeredQuestionsCount: _angular_core.Signal<number>;
|
|
985
|
+
progressPercentage: _angular_core.Signal<number>;
|
|
986
|
+
showProgressBar: _angular_core.Signal<boolean>;
|
|
987
|
+
showTimer: _angular_core.Signal<boolean>;
|
|
988
|
+
timerTimeLimit: _angular_core.Signal<number | undefined>;
|
|
989
|
+
showQuestionNumbers: _angular_core.Signal<boolean>;
|
|
990
|
+
showQuestionCounter: _angular_core.Signal<boolean>;
|
|
991
|
+
currentQuestionPosition: _angular_core.Signal<{
|
|
992
|
+
current: number;
|
|
993
|
+
total: number;
|
|
994
|
+
}>;
|
|
995
|
+
timerText: _angular_core.Signal<string>;
|
|
996
|
+
timerWidget: _angular_core.Signal<_acorex_platform_framework_shared_core.AXPWidgetNode | null>;
|
|
997
|
+
validationStrategy: _angular_core.Signal<QuestionnaireValidationStrategy>;
|
|
998
|
+
canNavigateNext: _angular_core.Signal<boolean>;
|
|
999
|
+
canNavigatePrevious: _angular_core.Signal<boolean>;
|
|
1000
|
+
isLastStep: _angular_core.Signal<boolean>;
|
|
1001
|
+
areAllRequiredQuestionsAnswered: _angular_core.Signal<boolean>;
|
|
1002
|
+
registerForm: (form: any) => void;
|
|
1003
|
+
registerWidgetContainer: (container: dist_libs_framework_client_types_acorex_platform_framework_client_layout_widget_core.AXPWidgetContainerComponent) => void;
|
|
1004
|
+
loadQuestionnaire: (id: string, initialAnswers?: Record<string, any>, config?: QuestionnaireViewerConfig, structureDisplaySettings?: _acorex_platform_module_assessment_management_client_contracts.QuestionnaireDisplaySettings, structurePrintSettings?: _acorex_platform_module_assessment_management_client_contracts.QuestionnairePrintSettings) => Promise<void>;
|
|
1005
|
+
loadStructure: (structure: QuestionnaireBuilderValue, config?: QuestionnaireViewerConfig, initialAnswers?: Record<string, any>) => Promise<void>;
|
|
1006
|
+
refreshVisibility: () => Promise<void>;
|
|
1007
|
+
isSectionVisible: (section: QuestionnaireViewerSection) => boolean;
|
|
1008
|
+
getVisibleQuestionsInSection: (section: QuestionnaireViewerSection) => QuestionnaireViewerQuestion[];
|
|
1009
|
+
isQuestionAnswered: (question: QuestionnaireViewerQuestion) => boolean;
|
|
1010
|
+
getPrintQuestionsInSection: (section: QuestionnaireViewerSection) => QuestionnaireViewerQuestion[];
|
|
1011
|
+
isPrintSectionVisible: (section: QuestionnaireViewerSection) => boolean;
|
|
1012
|
+
isQuestionVisible: (question: QuestionnaireViewerQuestion) => boolean;
|
|
1013
|
+
isCommentVisible: (question: QuestionnaireViewerQuestion) => boolean;
|
|
1014
|
+
getVisibleQuestions: () => QuestionnaireViewerQuestion[];
|
|
1015
|
+
validateQuestion: (question: QuestionnaireViewerQuestion) => Promise<string | null>;
|
|
1016
|
+
validateCurrentPage: () => Promise<QuestionnaireValidationResult>;
|
|
1017
|
+
validateAllQuestions: () => Promise<QuestionnaireValidationResult>;
|
|
1018
|
+
navigateNext: () => Promise<boolean>;
|
|
1019
|
+
navigatePrevious: () => Promise<boolean>;
|
|
1020
|
+
isCurrentSectionValid: () => Promise<boolean>;
|
|
1021
|
+
isSectionNavigable: (sectionIndex: number) => Promise<boolean>;
|
|
1022
|
+
navigateToSection: (index: number) => Promise<boolean>;
|
|
1023
|
+
navigateToQuestion: (sectionIndex: number, questionIndex: number) => Promise<boolean>;
|
|
1024
|
+
getAllAnswers: () => Record<string, any>;
|
|
1025
|
+
getQuestionsWithAnswers: () => Array<{
|
|
1026
|
+
name: string;
|
|
1027
|
+
questionBankItemId: string;
|
|
1028
|
+
sectionName: string;
|
|
1029
|
+
sectionOrder: number;
|
|
1030
|
+
sectionTitle: _acorex_platform_framework_shared_core.AXPMultiLanguageString;
|
|
1031
|
+
sectionDescription?: _acorex_platform_framework_shared_core.AXPMultiLanguageString;
|
|
1032
|
+
title: string;
|
|
1033
|
+
note?: string;
|
|
1034
|
+
answer: any;
|
|
1035
|
+
isRequired?: boolean | string;
|
|
1036
|
+
question: QuestionnaireViewerQuestion;
|
|
1037
|
+
}>;
|
|
1038
|
+
getSectionUnansweredRequiredCount: (sectionName: string) => number;
|
|
1039
|
+
saveDraft: () => {
|
|
1040
|
+
success: boolean;
|
|
1041
|
+
answers: Record<string, any>;
|
|
1042
|
+
};
|
|
1043
|
+
submit: () => Promise<{
|
|
1044
|
+
success: boolean;
|
|
1045
|
+
answers: Record<string, any>;
|
|
1046
|
+
errors?: QuestionnaireValidationError[];
|
|
1047
|
+
}>;
|
|
1048
|
+
startTimer: () => void;
|
|
1049
|
+
stopTimer: () => void;
|
|
1050
|
+
updateTimerElapsed: (value: number) => void;
|
|
1051
|
+
} & _ngrx_signals.StateSource<{
|
|
1052
|
+
questionnaireData: QuestionnaireViewerData | null;
|
|
1053
|
+
structure: QuestionnaireBuilderValue | null;
|
|
1054
|
+
config: QuestionnaireViewerConfig | null;
|
|
1055
|
+
isLoading: boolean;
|
|
1056
|
+
error: string | null;
|
|
1057
|
+
currentSectionIndex: number;
|
|
1058
|
+
currentQuestionIndex: number;
|
|
1059
|
+
timerElapsed: number;
|
|
1060
|
+
timerInterval: any;
|
|
1061
|
+
form: any;
|
|
1062
|
+
widgetContainer: dist_libs_framework_client_types_acorex_platform_framework_client_layout_widget_core.AXPWidgetContainerComponent | null;
|
|
1063
|
+
validationErrors: QuestionnaireValidationError[];
|
|
1064
|
+
sectionVisibilityById: Record<string, boolean>;
|
|
1065
|
+
questionVisibilityById: Record<string, boolean>;
|
|
1066
|
+
commentVisibilityById: Record<string, boolean>;
|
|
1067
|
+
}>) | undefined>;
|
|
1068
|
+
protected readonly totalQuestionsCount: _angular_core.Signal<number>;
|
|
1069
|
+
protected readonly totalSectionsCount: _angular_core.Signal<number>;
|
|
1070
|
+
protected readonly showTimer: _angular_core.Signal<boolean>;
|
|
1071
|
+
protected readonly timerTimeLimit: _angular_core.Signal<number | undefined>;
|
|
1072
|
+
protected readonly timerElapsed: _angular_core.Signal<number>;
|
|
1073
|
+
protected readonly showProgressBar: _angular_core.Signal<boolean>;
|
|
1074
|
+
protected readonly answeredQuestionsCount: _angular_core.Signal<number>;
|
|
1075
|
+
protected readonly questionnaireAttachments: _angular_core.Signal<QuestionnaireViewerAttachment[]>;
|
|
1076
|
+
protected readonly isReadonly: _angular_core.Signal<boolean>;
|
|
1077
|
+
protected readonly showReviewButton: _angular_core.Signal<boolean>;
|
|
1078
|
+
/** Use answers from review context when returning from review; otherwise use initial answers. */
|
|
1079
|
+
protected readonly effectiveInitialAnswers: _angular_core.Signal<Record<string, any>>;
|
|
1080
|
+
constructor();
|
|
1081
|
+
ngOnInit(): Promise<void>;
|
|
1082
|
+
private loadData;
|
|
1083
|
+
/**
|
|
1084
|
+
* After successful submit: outcomes first (if enabled), then summary last (if enabled), else close.
|
|
1085
|
+
*/
|
|
1086
|
+
private applyPostSubmitFlow;
|
|
1087
|
+
private saveSessionAndGetSummary;
|
|
1088
|
+
private schedulePrintSnapshot;
|
|
1089
|
+
getPageTitle(): Promise<string>;
|
|
1090
|
+
getPageBreadcrumbs(): ReturnType<AXPPageLayoutBaseComponent['getPageBreadcrumbs']>;
|
|
1091
|
+
getBackButton(): Promise<{
|
|
1092
|
+
title: string;
|
|
1093
|
+
} | null>;
|
|
1094
|
+
onBackButtonClick(): void;
|
|
1095
|
+
private getCasesListPath;
|
|
1096
|
+
protected handleAnswersChanged(_answers: Record<string, any>): void;
|
|
1097
|
+
protected handleReviewClick(): void;
|
|
1098
|
+
protected handleReviewSubmit(): Promise<void>;
|
|
1099
|
+
protected handlePreviousClick(): Promise<void>;
|
|
1100
|
+
protected handleNextClick(): Promise<void>;
|
|
1101
|
+
protected handleSubmitClick(): Promise<void>;
|
|
1102
|
+
protected handleDone(): void;
|
|
1103
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMQuestionnaireViewerPageComponent, never>;
|
|
1104
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXMQuestionnaireViewerPageComponent, "axm-questionnaire-viewer-page", never, {}, {}, never, never, true, never>;
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
type FlowStep = 'pre' | 'questions' | 'review' | 'summary' | 'results';
|
|
1108
|
+
declare class AXMQuestionnaireViewerStandalonePageComponent implements OnInit {
|
|
1109
|
+
private readonly route;
|
|
1110
|
+
private readonly entityService;
|
|
1111
|
+
private readonly questionnaireViewerService;
|
|
1112
|
+
private readonly printSnapshot;
|
|
1113
|
+
protected readonly structure: _angular_core.WritableSignal<QuestionnaireBuilderValue | null>;
|
|
1114
|
+
protected readonly questionnaire: _angular_core.WritableSignal<AXMAssessmentManagementQuestionnaireEntityModel | null>;
|
|
1115
|
+
protected readonly initialAnswers: _angular_core.WritableSignal<Record<string, any>>;
|
|
1116
|
+
protected readonly prePostConfig: _angular_core.WritableSignal<_acorex_platform_module_assessment_management_client_contracts.PrePostConfig | null>;
|
|
1117
|
+
protected readonly viewerConfig: _angular_core.WritableSignal<QuestionnaireViewerConfig | undefined>;
|
|
1118
|
+
protected readonly isLoading: _angular_core.WritableSignal<boolean>;
|
|
1119
|
+
protected readonly loadError: _angular_core.WritableSignal<string | null>;
|
|
1120
|
+
protected readonly isSubmitting: _angular_core.WritableSignal<boolean>;
|
|
1121
|
+
protected readonly sessionId: _angular_core.WritableSignal<string | null>;
|
|
1122
|
+
protected readonly existingSession: _angular_core.WritableSignal<AXMAssessmentManagementAssessmentSessionEntityModel | null>;
|
|
1123
|
+
protected readonly flowStep: _angular_core.WritableSignal<FlowStep>;
|
|
1124
|
+
protected readonly reviewSnapshot: _angular_core.WritableSignal<QuestionWithAnswer[]>;
|
|
1125
|
+
protected readonly reviewContext: _angular_core.WritableSignal<Record<string, any> | null>;
|
|
1126
|
+
protected readonly submitResult: _angular_core.WritableSignal<SummaryPlaceholderValues | null>;
|
|
1127
|
+
protected readonly canNavigatePrevious: _angular_core.WritableSignal<boolean>;
|
|
1128
|
+
protected readonly canNavigateNext: _angular_core.WritableSignal<boolean>;
|
|
1129
|
+
protected readonly showNavigationButtons: _angular_core.WritableSignal<boolean>;
|
|
1130
|
+
protected readonly isLastStep: _angular_core.WritableSignal<boolean>;
|
|
1131
|
+
protected readonly areAllRequiredQuestionsAnswered: _angular_core.WritableSignal<boolean>;
|
|
1132
|
+
protected readonly viewer: _angular_core.Signal<AXMQuestionnaireViewerComponent | undefined>;
|
|
1133
|
+
protected readonly printHost: _angular_core.Signal<AXMQuestionnairePrintHostComponent | undefined>;
|
|
1134
|
+
protected readonly printAnswers: _angular_core.WritableSignal<Record<string, unknown>>;
|
|
1135
|
+
protected readonly viewerViewModel: _angular_core.Signal<({
|
|
1136
|
+
questionnaireData: _angular_core.Signal<QuestionnaireViewerData | null>;
|
|
1137
|
+
structure: _angular_core.Signal<QuestionnaireBuilderValue | null>;
|
|
1138
|
+
config: _angular_core.Signal<QuestionnaireViewerConfig | null>;
|
|
1139
|
+
isLoading: _angular_core.Signal<boolean>;
|
|
1140
|
+
error: _angular_core.Signal<string | null>;
|
|
1141
|
+
currentSectionIndex: _angular_core.Signal<number>;
|
|
1142
|
+
currentQuestionIndex: _angular_core.Signal<number>;
|
|
1143
|
+
timerElapsed: _angular_core.Signal<number>;
|
|
1144
|
+
timerInterval: _angular_core.Signal<any>;
|
|
1145
|
+
form: _angular_core.Signal<any>;
|
|
1146
|
+
widgetContainer: _angular_core.Signal<_acorex_platform_framework_client_layout_widget_core.AXPWidgetContainerComponent | null>;
|
|
1147
|
+
validationErrors: _angular_core.Signal<QuestionnaireValidationError[]>;
|
|
1148
|
+
sectionVisibilityById: _angular_core.Signal<Record<string, boolean>>;
|
|
1149
|
+
questionVisibilityById: _angular_core.Signal<Record<string, boolean>>;
|
|
1150
|
+
commentVisibilityById: _angular_core.Signal<Record<string, boolean>>;
|
|
1151
|
+
viewMode: _angular_core.Signal<QuestionnaireViewMode>;
|
|
1152
|
+
isReadonly: _angular_core.Signal<boolean>;
|
|
1153
|
+
printLayout: _angular_core.Signal<boolean>;
|
|
1154
|
+
printSettings: _angular_core.Signal<Required<_acorex_platform_module_assessment_management_client_contracts.QuestionnairePrintSettings>>;
|
|
1155
|
+
printPaging: _angular_core.Signal<QuestionnaireViewMode>;
|
|
1156
|
+
sections: _angular_core.Signal<QuestionnaireViewerSection[]>;
|
|
1157
|
+
questionnaireAttachments: _angular_core.Signal<QuestionnaireViewerAttachment[]>;
|
|
1158
|
+
sectionIndicesWithVisibleContent: _angular_core.Signal<number[]>;
|
|
1159
|
+
currentSection: _angular_core.Signal<QuestionnaireViewerSection | null>;
|
|
1160
|
+
currentQuestion: _angular_core.Signal<QuestionnaireViewerQuestion | null>;
|
|
1161
|
+
totalQuestionsCount: _angular_core.Signal<number>;
|
|
1162
|
+
totalSectionsCount: _angular_core.Signal<number>;
|
|
1163
|
+
progressMode: _angular_core.Signal<QuestionnaireProgressMode>;
|
|
1164
|
+
answeredQuestionsCount: _angular_core.Signal<number>;
|
|
1165
|
+
progressPercentage: _angular_core.Signal<number>;
|
|
1166
|
+
showProgressBar: _angular_core.Signal<boolean>;
|
|
1167
|
+
showTimer: _angular_core.Signal<boolean>;
|
|
1168
|
+
timerTimeLimit: _angular_core.Signal<number | undefined>;
|
|
1169
|
+
showQuestionNumbers: _angular_core.Signal<boolean>;
|
|
1170
|
+
showQuestionCounter: _angular_core.Signal<boolean>;
|
|
1171
|
+
currentQuestionPosition: _angular_core.Signal<{
|
|
1172
|
+
current: number;
|
|
1173
|
+
total: number;
|
|
1174
|
+
}>;
|
|
1175
|
+
timerText: _angular_core.Signal<string>;
|
|
1176
|
+
timerWidget: _angular_core.Signal<_acorex_platform_framework_shared_core.AXPWidgetNode | null>;
|
|
1177
|
+
validationStrategy: _angular_core.Signal<QuestionnaireValidationStrategy>;
|
|
1178
|
+
canNavigateNext: _angular_core.Signal<boolean>;
|
|
1179
|
+
canNavigatePrevious: _angular_core.Signal<boolean>;
|
|
1180
|
+
isLastStep: _angular_core.Signal<boolean>;
|
|
1181
|
+
areAllRequiredQuestionsAnswered: _angular_core.Signal<boolean>;
|
|
1182
|
+
registerForm: (form: any) => void;
|
|
1183
|
+
registerWidgetContainer: (container: _acorex_platform_framework_client_layout_widget_core.AXPWidgetContainerComponent) => void;
|
|
1184
|
+
loadQuestionnaire: (id: string, initialAnswers?: Record<string, any>, config?: QuestionnaireViewerConfig, structureDisplaySettings?: _acorex_platform_module_assessment_management_client_contracts.QuestionnaireDisplaySettings, structurePrintSettings?: _acorex_platform_module_assessment_management_client_contracts.QuestionnairePrintSettings) => Promise<void>;
|
|
1185
|
+
loadStructure: (structure: QuestionnaireBuilderValue, config?: QuestionnaireViewerConfig, initialAnswers?: Record<string, any>) => Promise<void>;
|
|
1186
|
+
refreshVisibility: () => Promise<void>;
|
|
1187
|
+
isSectionVisible: (section: QuestionnaireViewerSection) => boolean;
|
|
1188
|
+
getVisibleQuestionsInSection: (section: QuestionnaireViewerSection) => QuestionnaireViewerQuestion[];
|
|
1189
|
+
isQuestionAnswered: (question: QuestionnaireViewerQuestion) => boolean;
|
|
1190
|
+
getPrintQuestionsInSection: (section: QuestionnaireViewerSection) => QuestionnaireViewerQuestion[];
|
|
1191
|
+
isPrintSectionVisible: (section: QuestionnaireViewerSection) => boolean;
|
|
1192
|
+
isQuestionVisible: (question: QuestionnaireViewerQuestion) => boolean;
|
|
1193
|
+
isCommentVisible: (question: QuestionnaireViewerQuestion) => boolean;
|
|
1194
|
+
getVisibleQuestions: () => QuestionnaireViewerQuestion[];
|
|
1195
|
+
validateQuestion: (question: QuestionnaireViewerQuestion) => Promise<string | null>;
|
|
1196
|
+
validateCurrentPage: () => Promise<QuestionnaireValidationResult>;
|
|
1197
|
+
validateAllQuestions: () => Promise<QuestionnaireValidationResult>;
|
|
1198
|
+
navigateNext: () => Promise<boolean>;
|
|
1199
|
+
navigatePrevious: () => Promise<boolean>;
|
|
1200
|
+
isCurrentSectionValid: () => Promise<boolean>;
|
|
1201
|
+
isSectionNavigable: (sectionIndex: number) => Promise<boolean>;
|
|
1202
|
+
navigateToSection: (index: number) => Promise<boolean>;
|
|
1203
|
+
navigateToQuestion: (sectionIndex: number, questionIndex: number) => Promise<boolean>;
|
|
1204
|
+
getAllAnswers: () => Record<string, any>;
|
|
1205
|
+
getQuestionsWithAnswers: () => Array<{
|
|
1206
|
+
name: string;
|
|
1207
|
+
questionBankItemId: string;
|
|
1208
|
+
sectionName: string;
|
|
1209
|
+
sectionOrder: number;
|
|
1210
|
+
sectionTitle: _acorex_platform_framework_shared_core.AXPMultiLanguageString;
|
|
1211
|
+
sectionDescription?: _acorex_platform_framework_shared_core.AXPMultiLanguageString;
|
|
1212
|
+
title: string;
|
|
1213
|
+
note?: string;
|
|
1214
|
+
answer: any;
|
|
1215
|
+
isRequired?: boolean | string;
|
|
1216
|
+
question: QuestionnaireViewerQuestion;
|
|
1217
|
+
}>;
|
|
1218
|
+
getSectionUnansweredRequiredCount: (sectionName: string) => number;
|
|
1219
|
+
saveDraft: () => {
|
|
1220
|
+
success: boolean;
|
|
1221
|
+
answers: Record<string, any>;
|
|
1222
|
+
};
|
|
1223
|
+
submit: () => Promise<{
|
|
1224
|
+
success: boolean;
|
|
1225
|
+
answers: Record<string, any>;
|
|
1226
|
+
errors?: QuestionnaireValidationError[];
|
|
1227
|
+
}>;
|
|
1228
|
+
startTimer: () => void;
|
|
1229
|
+
stopTimer: () => void;
|
|
1230
|
+
updateTimerElapsed: (value: number) => void;
|
|
1231
|
+
} & _ngrx_signals.StateSource<{
|
|
1232
|
+
questionnaireData: QuestionnaireViewerData | null;
|
|
1233
|
+
structure: QuestionnaireBuilderValue | null;
|
|
1234
|
+
config: QuestionnaireViewerConfig | null;
|
|
1235
|
+
isLoading: boolean;
|
|
1236
|
+
error: string | null;
|
|
1237
|
+
currentSectionIndex: number;
|
|
1238
|
+
currentQuestionIndex: number;
|
|
1239
|
+
timerElapsed: number;
|
|
1240
|
+
timerInterval: any;
|
|
1241
|
+
form: any;
|
|
1242
|
+
widgetContainer: _acorex_platform_framework_client_layout_widget_core.AXPWidgetContainerComponent | null;
|
|
1243
|
+
validationErrors: QuestionnaireValidationError[];
|
|
1244
|
+
sectionVisibilityById: Record<string, boolean>;
|
|
1245
|
+
questionVisibilityById: Record<string, boolean>;
|
|
1246
|
+
commentVisibilityById: Record<string, boolean>;
|
|
1247
|
+
}>) | undefined>;
|
|
1248
|
+
protected readonly totalQuestionsCount: _angular_core.Signal<number>;
|
|
1249
|
+
protected readonly showTimer: _angular_core.Signal<boolean>;
|
|
1250
|
+
protected readonly timerTimeLimit: _angular_core.Signal<number | undefined>;
|
|
1251
|
+
protected readonly timerElapsed: _angular_core.Signal<number>;
|
|
1252
|
+
protected readonly showProgressBar: _angular_core.Signal<boolean>;
|
|
1253
|
+
protected readonly answeredQuestionsCount: _angular_core.Signal<number>;
|
|
1254
|
+
protected readonly questionnaireAttachments: _angular_core.Signal<QuestionnaireViewerAttachment[]>;
|
|
1255
|
+
protected readonly isReadonly: _angular_core.Signal<boolean>;
|
|
1256
|
+
protected readonly showReviewButton: _angular_core.Signal<boolean>;
|
|
1257
|
+
/** Use answers from review context when returning from review; otherwise use initial answers. */
|
|
1258
|
+
protected readonly effectiveInitialAnswers: _angular_core.Signal<Record<string, any>>;
|
|
1259
|
+
constructor();
|
|
1260
|
+
ngOnInit(): void;
|
|
1261
|
+
private loadData;
|
|
1262
|
+
private saveSessionAndGetSummary;
|
|
1263
|
+
private schedulePrintSnapshot;
|
|
1264
|
+
/**
|
|
1265
|
+
* After successful submit: outcomes first (if enabled), then summary last (if enabled), else close.
|
|
1266
|
+
*/
|
|
1267
|
+
private applyPostSubmitFlow;
|
|
1268
|
+
protected handleReviewClick(): void;
|
|
1269
|
+
protected handleReviewSubmit(): Promise<void>;
|
|
1270
|
+
protected handlePreviousClick(): Promise<void>;
|
|
1271
|
+
protected handleNextClick(): Promise<void>;
|
|
1272
|
+
protected handleSubmitClick(): Promise<void>;
|
|
1273
|
+
protected handleDone(): void;
|
|
1274
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMQuestionnaireViewerStandalonePageComponent, never>;
|
|
1275
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXMQuestionnaireViewerStandalonePageComponent, "axm-questionnaire-viewer-standalone-page", never, {}, {}, never, never, true, never>;
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
export { AXMAssessmentManagementFeatureDefinitionProvider, AXMAssessmentManagementMenuProvider, AXMAssessmentManagementModule, AXMAssessmentManagementPermissionDefinitionProvider, AXMAssessmentManagementSearchCommandProvider, AXMQuestionnaireViewerPageComponent, AXMQuestionnaireViewerService, AXMQuestionnaireViewerStandalonePageComponent, resolveWidgetNodeFromMetaDataDefinitionInterface, stripQuestionBankInterfaceMetadata };
|
|
1279
|
+
export type { AXMQuestionnaireViewerServiceConfig, AXMQuestionnaireViewerServiceResult, QuestionnaireOutcomeValues };
|