@acorex/modules 21.0.0-next.59 → 21.0.0-next.64

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.
Files changed (89) hide show
  1. package/assessment-management/README.md +4 -4
  2. package/fesm2022/{acorex-modules-assessment-management-acorex-modules-assessment-management-o8aFazwA.mjs → acorex-modules-assessment-management-acorex-modules-assessment-management-DqmJVJ0z.mjs} +3599 -373
  3. package/fesm2022/acorex-modules-assessment-management-acorex-modules-assessment-management-DqmJVJ0z.mjs.map +1 -0
  4. package/fesm2022/{acorex-modules-assessment-management-assessment-case.entity-yrc_Yybq.mjs → acorex-modules-assessment-management-assessment-case.entity-DhVwPz0T.mjs} +45 -29
  5. package/fesm2022/acorex-modules-assessment-management-assessment-case.entity-DhVwPz0T.mjs.map +1 -0
  6. package/fesm2022/{acorex-modules-assessment-management-assessment-session.entity-Cwf30iuu.mjs → acorex-modules-assessment-management-assessment-session.entity-BvV2Qgw1.mjs} +19 -3
  7. package/fesm2022/acorex-modules-assessment-management-assessment-session.entity-BvV2Qgw1.mjs.map +1 -0
  8. package/fesm2022/{acorex-modules-assessment-management-fill-assessment-session.command-CJieLR5g.mjs → acorex-modules-assessment-management-fill-assessment-session.command-4fkaeAG-.mjs} +2 -2
  9. package/fesm2022/acorex-modules-assessment-management-fill-assessment-session.command-4fkaeAG-.mjs.map +1 -0
  10. package/fesm2022/{acorex-modules-assessment-management-preview-question.command-D0-FB1HH.mjs → acorex-modules-assessment-management-preview-question.command-6IGOdVVZ.mjs} +2 -2
  11. package/fesm2022/acorex-modules-assessment-management-preview-question.command-6IGOdVVZ.mjs.map +1 -0
  12. package/fesm2022/{acorex-modules-assessment-management-preview-questionnaire.command-wqPNgv7q.mjs → acorex-modules-assessment-management-preview-questionnaire.command-CRDBe_BS.mjs} +2 -2
  13. package/fesm2022/{acorex-modules-assessment-management-preview-questionnaire.command-wqPNgv7q.mjs.map → acorex-modules-assessment-management-preview-questionnaire.command-CRDBe_BS.mjs.map} +1 -1
  14. package/fesm2022/{acorex-modules-assessment-management-question-bank-interface-editor-widget-edit.component-DYyUhSWd.mjs → acorex-modules-assessment-management-question-bank-interface-editor-widget-edit.component-B2ES-zcL.mjs} +2 -2
  15. package/fesm2022/acorex-modules-assessment-management-question-bank-interface-editor-widget-edit.component-B2ES-zcL.mjs.map +1 -0
  16. package/fesm2022/{acorex-modules-assessment-management-question-bank-item.entity-DUf2ceKY.mjs → acorex-modules-assessment-management-question-bank-item.entity-Cw2WCdYK.mjs} +2 -2
  17. package/fesm2022/{acorex-modules-assessment-management-question-bank-item.entity-DUf2ceKY.mjs.map → acorex-modules-assessment-management-question-bank-item.entity-Cw2WCdYK.mjs.map} +1 -1
  18. package/fesm2022/{acorex-modules-assessment-management-questionnaire-viewer-popup.component-Cy5ElBmU.mjs → acorex-modules-assessment-management-questionnaire-viewer-popup.component-D9I3S-ZT.mjs} +125 -124
  19. package/fesm2022/acorex-modules-assessment-management-questionnaire-viewer-popup.component-D9I3S-ZT.mjs.map +1 -0
  20. package/fesm2022/{acorex-modules-assessment-management-questionnaire.entity-RWSkzNbA.mjs → acorex-modules-assessment-management-questionnaire.entity-D9nHUmQB.mjs} +12 -36
  21. package/fesm2022/acorex-modules-assessment-management-questionnaire.entity-D9nHUmQB.mjs.map +1 -0
  22. package/fesm2022/acorex-modules-assessment-management-view-session-answers.command-BOeO3Dit.mjs +350 -0
  23. package/fesm2022/acorex-modules-assessment-management-view-session-answers.command-BOeO3Dit.mjs.map +1 -0
  24. package/fesm2022/acorex-modules-assessment-management.mjs +1 -1
  25. package/fesm2022/acorex-modules-common.mjs +1 -8
  26. package/fesm2022/acorex-modules-common.mjs.map +1 -1
  27. package/fesm2022/{acorex-modules-human-capital-management-acorex-modules-human-capital-management-BWezAea1.mjs → acorex-modules-human-capital-management-acorex-modules-human-capital-management-uRz1c5Km.mjs} +20 -20
  28. package/fesm2022/{acorex-modules-human-capital-management-acorex-modules-human-capital-management-BWezAea1.mjs.map → acorex-modules-human-capital-management-acorex-modules-human-capital-management-uRz1c5Km.mjs.map} +1 -1
  29. package/fesm2022/{acorex-modules-human-capital-management-approve-leave-request.command-Bh_Bbq5-.mjs → acorex-modules-human-capital-management-approve-leave-request.command-23klKnTy.mjs} +2 -2
  30. package/fesm2022/{acorex-modules-human-capital-management-approve-leave-request.command-Bh_Bbq5-.mjs.map → acorex-modules-human-capital-management-approve-leave-request.command-23klKnTy.mjs.map} +1 -1
  31. package/fesm2022/{acorex-modules-human-capital-management-assign-position-assignment.command-BpDdDG9i.mjs → acorex-modules-human-capital-management-assign-position-assignment.command-BJ8xUiR2.mjs} +2 -2
  32. package/fesm2022/{acorex-modules-human-capital-management-assign-position-assignment.command-BpDdDG9i.mjs.map → acorex-modules-human-capital-management-assign-position-assignment.command-BJ8xUiR2.mjs.map} +1 -1
  33. package/fesm2022/{acorex-modules-human-capital-management-cancel-leave-request.command-CjtKaKFw.mjs → acorex-modules-human-capital-management-cancel-leave-request.command-B3u1gXWI.mjs} +2 -2
  34. package/fesm2022/{acorex-modules-human-capital-management-cancel-leave-request.command-CjtKaKFw.mjs.map → acorex-modules-human-capital-management-cancel-leave-request.command-B3u1gXWI.mjs.map} +1 -1
  35. package/fesm2022/{acorex-modules-human-capital-management-employee.entity-Cx_oY2aK.mjs → acorex-modules-human-capital-management-employee.entity-uhwOOw_y.mjs} +11 -3
  36. package/fesm2022/acorex-modules-human-capital-management-employee.entity-uhwOOw_y.mjs.map +1 -0
  37. package/fesm2022/{acorex-modules-human-capital-management-employment-type.entity-B20Taa5x.mjs → acorex-modules-human-capital-management-employment-type.entity-BQe82rsr.mjs} +2 -2
  38. package/fesm2022/{acorex-modules-human-capital-management-employment-type.entity-B20Taa5x.mjs.map → acorex-modules-human-capital-management-employment-type.entity-BQe82rsr.mjs.map} +1 -1
  39. package/fesm2022/{acorex-modules-human-capital-management-leave-request.entity-BO8QXpZE.mjs → acorex-modules-human-capital-management-leave-request.entity-CE4hs4C8.mjs} +2 -2
  40. package/fesm2022/{acorex-modules-human-capital-management-leave-request.entity-BO8QXpZE.mjs.map → acorex-modules-human-capital-management-leave-request.entity-CE4hs4C8.mjs.map} +1 -1
  41. package/fesm2022/{acorex-modules-human-capital-management-leave-type.entity-CQwSWqSh.mjs → acorex-modules-human-capital-management-leave-type.entity-DJ4EEUKg.mjs} +2 -2
  42. package/fesm2022/{acorex-modules-human-capital-management-leave-type.entity-CQwSWqSh.mjs.map → acorex-modules-human-capital-management-leave-type.entity-DJ4EEUKg.mjs.map} +1 -1
  43. package/fesm2022/{acorex-modules-human-capital-management-lifecycle-event-type.entity-BPWJrvbN.mjs → acorex-modules-human-capital-management-lifecycle-event-type.entity-CB2hlyOP.mjs} +2 -2
  44. package/fesm2022/{acorex-modules-human-capital-management-lifecycle-event-type.entity-BPWJrvbN.mjs.map → acorex-modules-human-capital-management-lifecycle-event-type.entity-CB2hlyOP.mjs.map} +1 -1
  45. package/fesm2022/{acorex-modules-human-capital-management-lifecycle-event.entity-ZZuPu9KQ.mjs → acorex-modules-human-capital-management-lifecycle-event.entity-DWonFZpU.mjs} +2 -2
  46. package/fesm2022/{acorex-modules-human-capital-management-lifecycle-event.entity-ZZuPu9KQ.mjs.map → acorex-modules-human-capital-management-lifecycle-event.entity-DWonFZpU.mjs.map} +1 -1
  47. package/fesm2022/{acorex-modules-human-capital-management-position-assignment.entity-BN1y0qhi.mjs → acorex-modules-human-capital-management-position-assignment.entity-o8PjggiT.mjs} +2 -2
  48. package/fesm2022/{acorex-modules-human-capital-management-position-assignment.entity-BN1y0qhi.mjs.map → acorex-modules-human-capital-management-position-assignment.entity-o8PjggiT.mjs.map} +1 -1
  49. package/fesm2022/{acorex-modules-human-capital-management-reject-leave-request.command-LczqOHP-.mjs → acorex-modules-human-capital-management-reject-leave-request.command-B6sr7oey.mjs} +2 -2
  50. package/fesm2022/{acorex-modules-human-capital-management-reject-leave-request.command-LczqOHP-.mjs.map → acorex-modules-human-capital-management-reject-leave-request.command-B6sr7oey.mjs.map} +1 -1
  51. package/fesm2022/{acorex-modules-human-capital-management-revoke-position-assignment.command-Dm8YacDI.mjs → acorex-modules-human-capital-management-revoke-position-assignment.command-aH7qTRnr.mjs} +2 -2
  52. package/fesm2022/{acorex-modules-human-capital-management-revoke-position-assignment.command-Dm8YacDI.mjs.map → acorex-modules-human-capital-management-revoke-position-assignment.command-aH7qTRnr.mjs.map} +1 -1
  53. package/fesm2022/{acorex-modules-human-capital-management-start-lifecycle-event-flow.command-DPwuyFz2.mjs → acorex-modules-human-capital-management-start-lifecycle-event-flow.command-B-VsXS4c.mjs} +2 -2
  54. package/fesm2022/{acorex-modules-human-capital-management-start-lifecycle-event-flow.command-DPwuyFz2.mjs.map → acorex-modules-human-capital-management-start-lifecycle-event-flow.command-B-VsXS4c.mjs.map} +1 -1
  55. package/fesm2022/acorex-modules-human-capital-management.mjs +1 -1
  56. package/fesm2022/acorex-modules-report-management.mjs +1 -1
  57. package/fesm2022/acorex-modules-report-management.mjs.map +1 -1
  58. package/fesm2022/{acorex-modules-task-management-acorex-modules-task-management--mdNdYIs.mjs → acorex-modules-task-management-acorex-modules-task-management-DAh3IByo.mjs} +37 -19
  59. package/fesm2022/acorex-modules-task-management-acorex-modules-task-management-DAh3IByo.mjs.map +1 -0
  60. package/fesm2022/{acorex-modules-task-management-task-board.page-BIZ1qH7m.mjs → acorex-modules-task-management-task-board.page-C2hB9JPM.mjs} +21 -12
  61. package/fesm2022/acorex-modules-task-management-task-board.page-C2hB9JPM.mjs.map +1 -0
  62. package/fesm2022/acorex-modules-task-management.mjs +1 -1
  63. package/package.json +2 -2
  64. package/types/acorex-modules-assessment-management.d.ts +391 -271
  65. package/types/acorex-modules-common.d.ts +1 -0
  66. package/types/acorex-modules-task-management.d.ts +14 -1
  67. package/fesm2022/acorex-modules-assessment-management-acorex-modules-assessment-management-o8aFazwA.mjs.map +0 -1
  68. package/fesm2022/acorex-modules-assessment-management-assessment-case.entity-yrc_Yybq.mjs.map +0 -1
  69. package/fesm2022/acorex-modules-assessment-management-assessment-session-answers-view.util-BUQa_TSY.mjs +0 -47
  70. package/fesm2022/acorex-modules-assessment-management-assessment-session-answers-view.util-BUQa_TSY.mjs.map +0 -1
  71. package/fesm2022/acorex-modules-assessment-management-assessment-session.entity-Cwf30iuu.mjs.map +0 -1
  72. package/fesm2022/acorex-modules-assessment-management-fill-assessment-session.command-CJieLR5g.mjs.map +0 -1
  73. package/fesm2022/acorex-modules-assessment-management-index-D8KjfHAH.mjs +0 -1509
  74. package/fesm2022/acorex-modules-assessment-management-index-D8KjfHAH.mjs.map +0 -1
  75. package/fesm2022/acorex-modules-assessment-management-preview-question.command-D0-FB1HH.mjs.map +0 -1
  76. package/fesm2022/acorex-modules-assessment-management-question-bank-interface-editor-widget-edit.component-DYyUhSWd.mjs.map +0 -1
  77. package/fesm2022/acorex-modules-assessment-management-questionnaire-calculation.entity-CYF0k42_.mjs +0 -236
  78. package/fesm2022/acorex-modules-assessment-management-questionnaire-calculation.entity-CYF0k42_.mjs.map +0 -1
  79. package/fesm2022/acorex-modules-assessment-management-questionnaire-viewer-popup.component-Cy5ElBmU.mjs.map +0 -1
  80. package/fesm2022/acorex-modules-assessment-management-questionnaire.entity-RWSkzNbA.mjs.map +0 -1
  81. package/fesm2022/acorex-modules-assessment-management-save-questionnaire-questions.command-koGmUbNE.mjs +0 -61
  82. package/fesm2022/acorex-modules-assessment-management-save-questionnaire-questions.command-koGmUbNE.mjs.map +0 -1
  83. package/fesm2022/acorex-modules-assessment-management-view-case-last-session-answers.command-NTuDdoYk.mjs +0 -157
  84. package/fesm2022/acorex-modules-assessment-management-view-case-last-session-answers.command-NTuDdoYk.mjs.map +0 -1
  85. package/fesm2022/acorex-modules-assessment-management-view-session-answers.command-0btGV66_.mjs +0 -172
  86. package/fesm2022/acorex-modules-assessment-management-view-session-answers.command-0btGV66_.mjs.map +0 -1
  87. package/fesm2022/acorex-modules-human-capital-management-employee.entity-Cx_oY2aK.mjs.map +0 -1
  88. package/fesm2022/acorex-modules-task-management-acorex-modules-task-management--mdNdYIs.mjs.map +0 -1
  89. package/fesm2022/acorex-modules-task-management-task-board.page-BIZ1qH7m.mjs.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import { AXPEntity, AXPMenuProvider, AXPMenuProviderContext, AXPSearchCommandProvider, AXPSearchResult } from '@acorex/platform/common';
2
2
  import { AXPEntityDefinitionLoader, AXPEntityModel } from '@acorex/platform/layout/entity';
3
3
  import * as _acorex_platform_core from '@acorex/platform/core';
4
- import { AXPFeatureDefinitionProvider, AXPFeatureDefinitionProviderContext, AXPMultiLanguageString, AXPExpression, AXPEntityReference, AXPDeviceService } from '@acorex/platform/core';
4
+ import { AXPFeatureDefinitionProvider, AXPFeatureDefinitionProviderContext, AXPMultiLanguageString, AXPExpression, AXPDeviceService, AXPEntityReference } from '@acorex/platform/core';
5
5
  import { AXPPermissionDefinitionProvider, AXPPermissionDefinitionProviderContext } from '@acorex/platform/auth';
6
6
  import * as _angular_core from '@angular/core';
7
7
  import { OnInit } from '@angular/core';
@@ -51,12 +51,6 @@ declare const RootConfig: {
51
51
  titlePlural: string;
52
52
  icon: string;
53
53
  };
54
- questionnaireCalculation: {
55
- name: string;
56
- title: string;
57
- titlePlural: string;
58
- icon: string;
59
- };
60
54
  };
61
55
  };
62
56
 
@@ -113,9 +107,6 @@ declare const AXMAssessmentManagementPermissionKeys: {
113
107
  readonly Session: {
114
108
  readonly Management: "AssessmentManagement:Session:Management";
115
109
  };
116
- readonly QuestionnaireCalculation: {
117
- readonly Management: "AssessmentManagement:QuestionnaireCalculation:Management";
118
- };
119
110
  readonly Automation: {
120
111
  readonly Management: "AssessmentManagement:Automation:Management";
121
112
  };
@@ -304,6 +295,382 @@ interface QuestionnaireBuilderValue {
304
295
  displaySettings?: QuestionnaireDisplaySettings;
305
296
  }
306
297
 
298
+ /**
299
+ * Pre- / post-questionnaire rich text (welcome, summary, etc.).
300
+ * @alias AXPMultiLanguageString
301
+ */
302
+ type PrePostContentValue = AXPMultiLanguageString;
303
+ /**
304
+ * Pre-questionnaire configuration (shown before questions).
305
+ */
306
+ interface PreQuestionnaireConfig {
307
+ enabled: boolean;
308
+ /** Rich text content. Supports multi-language: Record<locale, string>. */
309
+ content?: PrePostContentValue;
310
+ }
311
+ /**
312
+ * Post-questionnaire configuration (review before submit, summary after submit).
313
+ * Summary content supports placeholders: {{totalQuestions}}, {{answeredCount}}, {{totalTime}}, {{elapsedSeconds}}, and {{outcomeName}} from configured outcomes.
314
+ */
315
+ interface PostQuestionnaireConfig {
316
+ /** Show review step before submit (all answers, edit/submit). */
317
+ reviewEnabled: boolean;
318
+ /** Show summary screen after submit. */
319
+ summaryEnabled: boolean;
320
+ /** When true, show a separate step with outcome results (name/value list). */
321
+ showOutcomeResults?: boolean;
322
+ /** Rich text content for summary. Supports multi-language and placeholders. */
323
+ summaryContent?: PrePostContentValue;
324
+ }
325
+ /**
326
+ * Entity-level display options (viewer / builder preview). Subset of {@link QuestionnaireDisplaySettings}.
327
+ */
328
+ type QuestionnaireCompletionMode = 'submit-only' | 'save-and-continue';
329
+ type QuestionnaireEntityDisplaySettings = Pick<QuestionnaireDisplaySettings, 'viewMode' | 'showProgressBar' | 'showTimer' | 'showQuestionNumbers' | 'validationStrategy' | 'completionMode'>;
330
+ declare const DEFAULT_PRE_QUESTIONNAIRE_CONFIG: PreQuestionnaireConfig;
331
+ declare const DEFAULT_POST_QUESTIONNAIRE_CONFIG: PostQuestionnaireConfig;
332
+ declare const DEFAULT_QUESTIONNAIRE_ENTITY_DISPLAY: QuestionnaireEntityDisplaySettings;
333
+ /**
334
+ * Pre/post configuration for viewer flow (from {@link toPrePostConfig}).
335
+ */
336
+ interface PrePostConfig {
337
+ pre: PreQuestionnaireConfig;
338
+ post: PostQuestionnaireConfig;
339
+ }
340
+ /** Primitive type of an evaluated outcome value (coercion after expression runs). */
341
+ type QuestionnaireOutcomeResultKind = 'number' | 'string' | 'boolean';
342
+ /** Text emphasis for outcome result display rules. */
343
+ type QuestionnaireOutcomeDisplayEmphasis = 'normal' | 'medium' | 'bold';
344
+ /** Comparison operator for display rule conditions against the evaluated outcome `value`. */
345
+ type QuestionnaireOutcomeDisplayOperator = 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte';
346
+ /**
347
+ * Theme color chooser value: `"foreground background border"` (hex or utility classes).
348
+ */
349
+ type QuestionnaireOutcomeDisplayColor = string;
350
+ /** Icon chooser value or resolved Font Awesome class string. */
351
+ type QuestionnaireOutcomeDisplayIcon = string | {
352
+ label?: string;
353
+ styleClass?: string;
354
+ iconClass?: string;
355
+ };
356
+ /**
357
+ * Conditional styling for an outcome value in the results step.
358
+ * Rules are evaluated in order; the first matching condition wins.
359
+ */
360
+ interface QuestionnaireOutcomeDisplayRule {
361
+ id: string;
362
+ order: number;
363
+ operator: QuestionnaireOutcomeDisplayOperator;
364
+ compareValue: number | string | boolean;
365
+ /** Theme color chooser value applied to the outcome value in results. */
366
+ color: QuestionnaireOutcomeDisplayColor;
367
+ emphasis?: QuestionnaireOutcomeDisplayEmphasis;
368
+ icon?: QuestionnaireOutcomeDisplayIcon;
369
+ }
370
+ /** Parses a theme color chooser value into foreground, background, and border parts. */
371
+ declare function parseQuestionnaireOutcomeDisplayColor(value: string | null | undefined): {
372
+ foreground: string;
373
+ background: string;
374
+ border: string;
375
+ } | null;
376
+ declare function isQuestionnaireOutcomeDisplayColorHex(value: string): boolean;
377
+ /**
378
+ * Returns true when the evaluated outcome value matches the display rule condition.
379
+ */
380
+ declare function matchesQuestionnaireOutcomeDisplayRule(value: unknown, rule: Pick<QuestionnaireOutcomeDisplayRule, 'operator' | 'compareValue'>): boolean;
381
+ declare function normalizeQuestionnaireOutcomeDisplayRules(rules: QuestionnaireOutcomeDisplayRule[] | null | undefined): QuestionnaireOutcomeDisplayRule[];
382
+ /**
383
+ * Named outcome rule embedded on a questionnaire.
384
+ * Referenced in expressions via outcome.eval('name') and in summary placeholders as {{name}}.
385
+ */
386
+ interface QuestionnaireOutcomeItem {
387
+ id: string;
388
+ /** Unique programmatic name within the questionnaire (variable-name style). */
389
+ name: string;
390
+ title?: AXPMultiLanguageString;
391
+ description?: AXPMultiLanguageString;
392
+ resultKind: QuestionnaireOutcomeResultKind;
393
+ /**
394
+ * Use `{{ ... }}` or plain expression body; scope includes `answer.eval`, `outcome.eval`, and `fn.*`.
395
+ */
396
+ expression: string;
397
+ /** Optional ordered display rules applied to the evaluated value in the results step. */
398
+ displayRules?: QuestionnaireOutcomeDisplayRule[];
399
+ }
400
+ /** Section grouping outcome rules (same builder pattern as questionnaire questions). */
401
+ interface QuestionnaireOutcomeSection {
402
+ /** Unique technical section name. */
403
+ name: string;
404
+ title?: AXPMultiLanguageString;
405
+ description?: AXPMultiLanguageString;
406
+ order: number;
407
+ items: QuestionnaireOutcomeItem[];
408
+ isNewlyAdded?: boolean;
409
+ }
410
+ /** Embedded outcome rules on questionnaire. */
411
+ interface QuestionnaireOutcomesValue {
412
+ sections: QuestionnaireOutcomeSection[];
413
+ }
414
+ declare const DEFAULT_QUESTIONNAIRE_OUTCOMES: QuestionnaireOutcomesValue;
415
+ declare function normalizeQuestionnaireOutcomesValue(value: QuestionnaireOutcomesValue | null | undefined): QuestionnaireOutcomesValue;
416
+ /** All outcome items across sections (evaluation, automations, duplicate checks). */
417
+ declare function flattenQuestionnaireOutcomeItems(value: QuestionnaireOutcomesValue | null | undefined): QuestionnaireOutcomeItem[];
418
+ declare function findDuplicateOutcomeNames(value: QuestionnaireOutcomesValue | null | undefined): string[];
419
+ interface AXMAssessmentManagementQuestionnaireEntityModel extends AXPEntityModel<string> {
420
+ title: AXPMultiLanguageString;
421
+ description?: AXPMultiLanguageString;
422
+ type: 'questionnaire' | 'survey' | 'checklist' | 'test' | 'evaluation';
423
+ questions?: QuestionnaireBuilderValue;
424
+ /** Named outcome rules evaluated from answers (outcome.eval / summary placeholders). */
425
+ outcomes?: QuestionnaireOutcomesValue;
426
+ /** Viewer / preview display. */
427
+ display?: QuestionnaireEntityDisplaySettings;
428
+ /** Welcome screen before questions. */
429
+ pre?: PreQuestionnaireConfig;
430
+ /** Review before submit, summary / results after submit. */
431
+ post?: PostQuestionnaireConfig;
432
+ categoryId?: string;
433
+ tags?: string[];
434
+ color?: string;
435
+ }
436
+ /**
437
+ * Maps entity pre/post to viewer config (defaults when omitted).
438
+ */
439
+ declare function toPrePostConfig(q: Partial<AXMAssessmentManagementQuestionnaireEntityModel> | null | undefined): PrePostConfig | null;
440
+ declare const VIEW_MODE_VALUES: readonly ["single-page", "page-per-group", "page-per-question", "side-menu"];
441
+ type ViewModeValue = (typeof VIEW_MODE_VALUES)[number];
442
+ declare const VALIDATION_STRATEGY_VALUES: readonly ["step", "end"];
443
+ type ValidationStrategyValue = (typeof VALIDATION_STRATEGY_VALUES)[number];
444
+ declare const COMPLETION_MODE_VALUES: readonly ["submit-only", "save-and-continue"];
445
+ type CompletionModeValue = (typeof COMPLETION_MODE_VALUES)[number];
446
+ /**
447
+ * Coerces stored view mode (string or SelectBox `{ id }`) to a known value.
448
+ */
449
+ declare function normalizeViewMode(value: unknown): ViewModeValue;
450
+ /**
451
+ * Coerces stored validation strategy (string or SelectBox `{ id }`) to a known value.
452
+ */
453
+ declare function normalizeValidationStrategy(value: unknown): ValidationStrategyValue;
454
+ /**
455
+ * Coerces stored completion mode (string or SelectBox `{ id }`) to a known value.
456
+ */
457
+ declare function normalizeCompletionMode(value: unknown): CompletionModeValue;
458
+ /**
459
+ * Maps entity `display` to {@link QuestionnaireDisplaySettings} (defaults when omitted).
460
+ */
461
+ declare function toDisplaySettings(q: Partial<AXMAssessmentManagementQuestionnaireEntityModel> | null | undefined): QuestionnaireDisplaySettings | null;
462
+
463
+ /**
464
+ * Resolved display styling for an outcome value row.
465
+ */
466
+ interface OutcomeResultDisplay {
467
+ color?: string;
468
+ emphasis: QuestionnaireOutcomeDisplayEmphasis;
469
+ iconClass?: string;
470
+ }
471
+ /**
472
+ * One evaluated outcome row for the post-submit results step.
473
+ */
474
+ interface OutcomeResultEntry {
475
+ key: string;
476
+ value: unknown;
477
+ label: string;
478
+ display?: OutcomeResultDisplay;
479
+ }
480
+ /**
481
+ * Outcome results grouped under a questionnaire outcomes section.
482
+ */
483
+ interface OutcomeResultSectionGroup {
484
+ trackKey: string;
485
+ sectionName: string;
486
+ sectionOrder: number;
487
+ sectionTitle: AXPMultiLanguageString;
488
+ sectionDescription?: AXPMultiLanguageString;
489
+ items: OutcomeResultEntry[];
490
+ }
491
+ /**
492
+ * Placeholder values for post-questionnaire summary content.
493
+ * Fixed keys plus any {{name}} from questionnaire outcomes.
494
+ */
495
+ interface SummaryPlaceholderValues {
496
+ totalQuestions?: number;
497
+ answeredCount?: number;
498
+ /** Elapsed questionnaire time in whole seconds (e.g. from the viewer timer). */
499
+ totalTimeSeconds?: number;
500
+ /** Pre-formatted duration for {{totalTime}}. */
501
+ totalTimeFormatted?: string;
502
+ /** Computed outcome values (name -> value) for placeholders like {{bmi}}. */
503
+ outcomes?: Record<string, unknown>;
504
+ /** Display label per outcome `name` (title); used in the outcomes list UI. */
505
+ outcomeTitles?: Record<string, string>;
506
+ /** Outcome rows grouped by configured outcomes section (when available). */
507
+ outcomeSections?: OutcomeResultSectionGroup[];
508
+ }
509
+
510
+ /** Named values produced by questionnaire outcome rules (outcome `name` → evaluated value). */
511
+ type QuestionnaireOutcomeValues = Record<string, unknown>;
512
+ interface AXMQuestionnaireViewerServiceConfig {
513
+ /**
514
+ * Dialog title
515
+ */
516
+ title: string;
517
+ /**
518
+ * Questionnaire structure data
519
+ */
520
+ structure: QuestionnaireBuilderValue;
521
+ /**
522
+ * Pre/post questionnaire config (welcome, review, summary)
523
+ */
524
+ prePostConfig?: PrePostConfig | null;
525
+ /**
526
+ * Optional viewer configuration
527
+ * If not provided, displaySettings from structure will be used
528
+ */
529
+ config?: QuestionnaireViewerConfig;
530
+ /**
531
+ * Initial answers to pre-fill the questionnaire
532
+ */
533
+ initialAnswers?: Record<string, any>;
534
+ /**
535
+ * Persisted questionnaire entity id — used to load embedded outcome rules when inline rules are not provided.
536
+ */
537
+ questionnaireId?: string;
538
+ /**
539
+ * Inline outcome rules (e.g. unsaved builder state). Takes precedence over loading from the questionnaire entity.
540
+ */
541
+ outcomeRules?: QuestionnaireOutcomeItem[];
542
+ /**
543
+ * When provided, called on submit. Should save and return result for summary.
544
+ */
545
+ submitHandler?: (answers: Record<string, any>) => Promise<SummaryPlaceholderValues | null | void>;
546
+ /**
547
+ * When provided, called on save-and-continue (draft). Should persist without final validation.
548
+ */
549
+ saveHandler?: (answers: Record<string, any>) => Promise<void>;
550
+ /**
551
+ * Assessment case/session ids for fill popup persistence (popup cannot receive function handlers).
552
+ */
553
+ assessmentFillContext?: QuestionnaireAssessmentFillContext;
554
+ /**
555
+ * Pre-built outcome results for readonly session review (e.g. stored session.outcomes snapshot).
556
+ */
557
+ storedOutcomeResults?: SummaryPlaceholderValues | null;
558
+ }
559
+ interface AXMQuestionnaireViewerServiceResult {
560
+ /**
561
+ * All answers from the questionnaire
562
+ */
563
+ answers: Record<string, any>;
564
+ /**
565
+ * Questions with their corresponding answers
566
+ */
567
+ questions: Array<{
568
+ name: string;
569
+ questionBankItemId: string;
570
+ sectionName: string;
571
+ title: string;
572
+ note?: string;
573
+ answer: any;
574
+ isRequired?: boolean | string;
575
+ }>;
576
+ /**
577
+ * Whether the dialog was submitted (true) or closed (false)
578
+ */
579
+ submitted: boolean;
580
+ /**
581
+ * Draft saved via save-and-continue without final submit.
582
+ */
583
+ saved?: boolean;
584
+ }
585
+ /**
586
+ * Opens the questionnaire viewer dialog and evaluates questionnaire outcomes when a questionnaire id is provided.
587
+ */
588
+ declare class AXMQuestionnaireViewerService {
589
+ private readonly popupService;
590
+ private readonly entityService;
591
+ private readonly expressionEvaluator;
592
+ protected readonly deviceService: AXPDeviceService;
593
+ /**
594
+ * Open questionnaire viewer in a dialog
595
+ */
596
+ open(config: AXMQuestionnaireViewerServiceConfig): Promise<AXMQuestionnaireViewerServiceResult | null>;
597
+ /**
598
+ * Evaluate all questionnaire outcomes for the given questionnaire and answers.
599
+ * Pass `structure` so expressions can use `answer.byId`, `answer.byTag`, and `answer.allByTag`.
600
+ */
601
+ /**
602
+ * Resolves `isVisible` for a section or question: `false` hides; `true`/undefined shows;
603
+ * non-empty string is evaluated with the same scope as questionnaire outcomes (`answer.*`, `fn.*`, etc.).
604
+ */
605
+ evaluateQuestionnaireVisibilityFlag(isVisible: boolean | string | undefined | null, answers: Record<string, unknown>, structure: QuestionnaireBuilderValue | null | undefined): Promise<boolean>;
606
+ /**
607
+ * Evaluates questionnaire outcome rules and returns values plus display titles.
608
+ */
609
+ evaluateOutcomes(answers: Record<string, unknown>, options?: {
610
+ questionnaireId?: string;
611
+ outcomeRules?: QuestionnaireOutcomeItem[];
612
+ structure?: QuestionnaireBuilderValue | null;
613
+ }): Promise<{
614
+ values: QuestionnaireOutcomeValues;
615
+ outcomeTitles: Record<string, string>;
616
+ }>;
617
+ /**
618
+ * Progress metrics and optional outcome results for summary / preview.
619
+ */
620
+ buildSummaryPlaceholderValues(structure: QuestionnaireBuilderValue, answers: Record<string, any>, options?: {
621
+ questionnaireId?: string;
622
+ outcomeRules?: QuestionnaireOutcomeItem[];
623
+ elapsedSeconds?: number;
624
+ }): Promise<SummaryPlaceholderValues>;
625
+ /**
626
+ * Builds outcome section rows from stored session values (no expression re-evaluation).
627
+ */
628
+ buildOutcomeResultsFromStoredValues(storedOutcomes: Record<string, unknown>, options: {
629
+ questionnaireId: string;
630
+ }): Promise<Pick<SummaryPlaceholderValues, 'outcomes' | 'outcomeTitles' | 'outcomeSections'>>;
631
+ /**
632
+ * Count answered questions using the same paths as the viewer session (item id or answers.itemId).
633
+ */
634
+ calculateProgressFromStructure(structure: QuestionnaireBuilderValue, answers: Record<string, any>): {
635
+ answeredQuestionsCount: number;
636
+ progressPercentage: number;
637
+ };
638
+ private resolveOutcomeRules;
639
+ private resolveOutcomeSections;
640
+ private loadQuestionnaire;
641
+ private buildOutcomeResultSections;
642
+ /**
643
+ * First matching display rule for an evaluated outcome value.
644
+ */
645
+ private resolveOutcomeDisplay;
646
+ /**
647
+ * Display label for an outcome rule: `title` when set, otherwise a humanized `name`.
648
+ */
649
+ private resolveOutcomeDisplayTitle;
650
+ private humanizeOutcomeKey;
651
+ private computeResult;
652
+ /** Non-empty trimmed `expression`, or empty string if missing. */
653
+ private outcomeExpressionText;
654
+ private inferResultKind;
655
+ private coerceOutcome;
656
+ private evaluateOutcomeExpression;
657
+ /**
658
+ * Resolves an answer the same way as the viewer session (`key` or `answers.key`).
659
+ */
660
+ private resolveStoredAnswer;
661
+ /** Sections and items ordered by `order` for deterministic `byTag` matching. */
662
+ private flattenQuestionnaireItems;
663
+ private normalizeQuestionnaireTag;
664
+ /**
665
+ * Scope: answer.eval (path), answer.byId / byTag / allByTag, formula.eval / outcome.eval, fn.* helpers.
666
+ */
667
+ private buildExpressionScope;
668
+ private expressionOutcomeRefs;
669
+ private topologicalSort;
670
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMQuestionnaireViewerService, never>;
671
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMQuestionnaireViewerService>;
672
+ }
673
+
307
674
  type AXMAssessmentSessionRole = 'responder' | 'supervisor' | 'reviewer';
308
675
  type AXMAssessmentSessionStatus = 'not-started' | 'in-progress' | 'submitted' | 'under-review' | 'approved' | 'rejected' | 'completed';
309
676
  interface AXMAssessmentManagementAssessmentSessionEntityModel extends AXPEntityModel<string> {
@@ -318,6 +685,10 @@ interface AXMAssessmentManagementAssessmentSessionEntityModel extends AXPEntityM
318
685
  progressPercentage: number;
319
686
  answeredQuestionsCount: number;
320
687
  answers: Record<string, unknown>;
688
+ /**
689
+ * Evaluated questionnaire outcome values (rule `name` → value), snapshot at submit.
690
+ */
691
+ outcomes?: Record<string, unknown>;
321
692
  previousId?: string;
322
693
  }
323
694
 
@@ -413,6 +784,10 @@ interface QuestionnaireViewerConfig {
413
784
  * submit-only: no draft save; save-and-continue: show Save and continue before submit.
414
785
  */
415
786
  completionMode?: QuestionnaireCompletionMode$1;
787
+ /**
788
+ * Readonly session review entry step (`questions` default, or `results` for outcome snapshot).
789
+ */
790
+ initialFlowStep?: 'questions' | 'results';
416
791
  }
417
792
  /**
418
793
  * Attachment item for display (from question bank item attachments).
@@ -879,7 +1254,7 @@ interface AXMAssessmentManagementQuestionBankItemEntityModel extends AXPEntityMo
879
1254
  * Not used as the respondent-facing question text; see `question`.
880
1255
  */
881
1256
  title: AXPMultiLanguageString;
882
- /** Unique variable name for questionnaire calculations (answer.eval('name')). */
1257
+ /** Unique variable name for questionnaire outcomes (answer.eval('name')). */
883
1258
  name?: string;
884
1259
  /** Respondent-facing question body (rich text). */
885
1260
  question?: AXPMultiLanguageString;
@@ -906,90 +1281,6 @@ declare function stripQuestionBankInterfaceMetadata(value: AXMQuestionBankItemIn
906
1281
  */
907
1282
  declare function resolveWidgetNodeFromMetaDataDefinitionInterface(raw: string | AXPWidgetNode | (() => Promise<AXPWidgetNode>) | null | undefined): Promise<AXPWidgetNode | null>;
908
1283
 
909
- /**
910
- * Pre- / post-questionnaire rich text (welcome, summary, etc.).
911
- * @alias AXPMultiLanguageString
912
- */
913
- type PrePostContentValue = AXPMultiLanguageString;
914
- /**
915
- * Pre-questionnaire configuration (shown before questions).
916
- */
917
- interface PreQuestionnaireConfig {
918
- enabled: boolean;
919
- /** Rich text content. Supports multi-language: Record<locale, string>. */
920
- content?: PrePostContentValue;
921
- }
922
- /**
923
- * Post-questionnaire configuration (review before submit, summary after submit).
924
- * Summary content supports placeholders: {{totalQuestions}}, {{answeredCount}}, {{totalTime}}, {{elapsedSeconds}}, and {{calculationName}} from configured calculations.
925
- */
926
- interface PostQuestionnaireConfig {
927
- /** Show review step before submit (all answers, edit/submit). */
928
- reviewEnabled: boolean;
929
- /** Show summary screen after submit. */
930
- summaryEnabled: boolean;
931
- /** When true, show a separate step after the summary with calculation results (name/value list). */
932
- showCalculationResults?: boolean;
933
- /** Rich text content for summary. Supports multi-language and placeholders. */
934
- summaryContent?: PrePostContentValue;
935
- }
936
- /**
937
- * Entity-level display options (viewer / builder preview). Subset of {@link QuestionnaireDisplaySettings}.
938
- */
939
- type QuestionnaireCompletionMode = 'submit-only' | 'save-and-continue';
940
- type QuestionnaireEntityDisplaySettings = Pick<QuestionnaireDisplaySettings, 'viewMode' | 'showProgressBar' | 'showTimer' | 'showQuestionNumbers' | 'validationStrategy' | 'completionMode'>;
941
- declare const DEFAULT_PRE_QUESTIONNAIRE_CONFIG: PreQuestionnaireConfig;
942
- declare const DEFAULT_POST_QUESTIONNAIRE_CONFIG: PostQuestionnaireConfig;
943
- declare const DEFAULT_QUESTIONNAIRE_ENTITY_DISPLAY: QuestionnaireEntityDisplaySettings;
944
- /**
945
- * Pre/post configuration for viewer flow (from {@link toPrePostConfig}).
946
- */
947
- interface PrePostConfig {
948
- pre: PreQuestionnaireConfig;
949
- post: PostQuestionnaireConfig;
950
- }
951
- interface AXMAssessmentManagementQuestionnaireEntityModel extends AXPEntityModel<string> {
952
- title: AXPMultiLanguageString;
953
- description?: AXPMultiLanguageString;
954
- type: 'questionnaire' | 'survey' | 'checklist' | 'test' | 'evaluation';
955
- questions?: QuestionnaireBuilderValue;
956
- /** Viewer / preview display. */
957
- display?: QuestionnaireEntityDisplaySettings;
958
- /** Welcome screen before questions. */
959
- pre?: PreQuestionnaireConfig;
960
- /** Review before submit, summary / results after submit. */
961
- post?: PostQuestionnaireConfig;
962
- categoryId?: string;
963
- tags?: string[];
964
- color?: string;
965
- }
966
- /**
967
- * Maps entity pre/post to viewer config (defaults when omitted).
968
- */
969
- declare function toPrePostConfig(q: Partial<AXMAssessmentManagementQuestionnaireEntityModel> | null | undefined): PrePostConfig | null;
970
- declare const VIEW_MODE_VALUES: readonly ["single-page", "page-per-group", "page-per-question", "side-menu"];
971
- type ViewModeValue = (typeof VIEW_MODE_VALUES)[number];
972
- declare const VALIDATION_STRATEGY_VALUES: readonly ["step", "end"];
973
- type ValidationStrategyValue = (typeof VALIDATION_STRATEGY_VALUES)[number];
974
- declare const COMPLETION_MODE_VALUES: readonly ["submit-only", "save-and-continue"];
975
- type CompletionModeValue = (typeof COMPLETION_MODE_VALUES)[number];
976
- /**
977
- * Coerces stored view mode (string or SelectBox `{ id }`) to a known value.
978
- */
979
- declare function normalizeViewMode(value: unknown): ViewModeValue;
980
- /**
981
- * Coerces stored validation strategy (string or SelectBox `{ id }`) to a known value.
982
- */
983
- declare function normalizeValidationStrategy(value: unknown): ValidationStrategyValue;
984
- /**
985
- * Coerces stored completion mode (string or SelectBox `{ id }`) to a known value.
986
- */
987
- declare function normalizeCompletionMode(value: unknown): CompletionModeValue;
988
- /**
989
- * Maps entity `display` to {@link QuestionnaireDisplaySettings} (defaults when omitted).
990
- */
991
- declare function toDisplaySettings(q: Partial<AXMAssessmentManagementQuestionnaireEntityModel> | null | undefined): QuestionnaireDisplaySettings | null;
992
-
993
1284
  type AXMAssessmentCaseStatus = 'draft' | 'active' | 'in-progress' | 'closed' | 'cancelled';
994
1285
  interface AXMAssessmentManagementAssessmentCaseEntityModel extends AXPEntityModel<string> {
995
1286
  /**
@@ -1008,180 +1299,6 @@ interface AXMAssessmentManagementAssessmentCaseEntityModel extends AXPEntityMode
1008
1299
  statusId?: AXMAssessmentCaseStatus;
1009
1300
  }
1010
1301
 
1011
- /** Primitive type of the evaluated value (coercion after expression runs). */
1012
- type QuestionnaireCalculationResultKind = 'number' | 'string' | 'boolean';
1013
- interface AXMAssessmentManagementQuestionnaireCalculationEntityModel extends AXPEntityModel<string> {
1014
- questionnaireId?: string;
1015
- questionnaire?: {
1016
- id?: string;
1017
- title?: AXPMultiLanguageString;
1018
- type?: string;
1019
- };
1020
- name?: string;
1021
- title?: AXPMultiLanguageString;
1022
- description?: AXPMultiLanguageString;
1023
- resultKind?: QuestionnaireCalculationResultKind;
1024
- /**
1025
- * Use `{{ ... }}` or plain expression body; scope includes `answer.eval`, `outcome.eval` / `formula.eval`, and `fn.SUM`, `fn.AVERAGE`, etc.
1026
- */
1027
- expression?: string;
1028
- }
1029
-
1030
- /**
1031
- * Placeholder values for post-questionnaire summary content.
1032
- * Fixed keys plus any {{name}} from questionnaire calculation outcomes.
1033
- */
1034
- interface SummaryPlaceholderValues {
1035
- totalQuestions?: number;
1036
- answeredCount?: number;
1037
- /** Elapsed questionnaire time in whole seconds (e.g. from the viewer timer). */
1038
- totalTimeSeconds?: number;
1039
- /** Pre-formatted duration for {{totalTime}}. */
1040
- totalTimeFormatted?: string;
1041
- /** Computed calculation values (name -> value) for placeholders like {{bmi}}. */
1042
- outcomes?: Record<string, unknown>;
1043
- /** Display label per calculation `name` (entity title); used in the outcomes list UI. */
1044
- outcomeTitles?: Record<string, string>;
1045
- }
1046
-
1047
- /** Named values produced by questionnaire calculations (calculation `name` → evaluated value). */
1048
- type QuestionnaireCalculationValues = Record<string, unknown>;
1049
- interface AXMQuestionnaireViewerServiceConfig {
1050
- /**
1051
- * Dialog title
1052
- */
1053
- title: string;
1054
- /**
1055
- * Questionnaire structure data
1056
- */
1057
- structure: QuestionnaireBuilderValue;
1058
- /**
1059
- * Pre/post questionnaire config (welcome, review, summary)
1060
- */
1061
- prePostConfig?: PrePostConfig | null;
1062
- /**
1063
- * Optional viewer configuration
1064
- * If not provided, displaySettings from structure will be used
1065
- */
1066
- config?: QuestionnaireViewerConfig;
1067
- /**
1068
- * Initial answers to pre-fill the questionnaire
1069
- */
1070
- initialAnswers?: Record<string, any>;
1071
- /**
1072
- * Persisted questionnaire entity id — used to load and evaluate questionnaire calculations on submit.
1073
- */
1074
- questionnaireId?: string;
1075
- /**
1076
- * When provided, called on submit. Should save and return result for summary.
1077
- */
1078
- submitHandler?: (answers: Record<string, any>) => Promise<SummaryPlaceholderValues | null | void>;
1079
- /**
1080
- * When provided, called on save-and-continue (draft). Should persist without final validation.
1081
- */
1082
- saveHandler?: (answers: Record<string, any>) => Promise<void>;
1083
- /**
1084
- * Assessment case/session ids for fill popup persistence (popup cannot receive function handlers).
1085
- */
1086
- assessmentFillContext?: QuestionnaireAssessmentFillContext;
1087
- }
1088
- interface AXMQuestionnaireViewerServiceResult {
1089
- /**
1090
- * All answers from the questionnaire
1091
- */
1092
- answers: Record<string, any>;
1093
- /**
1094
- * Questions with their corresponding answers
1095
- */
1096
- questions: Array<{
1097
- name: string;
1098
- questionBankItemId: string;
1099
- sectionName: string;
1100
- title: string;
1101
- note?: string;
1102
- answer: any;
1103
- isRequired?: boolean | string;
1104
- }>;
1105
- /**
1106
- * Whether the dialog was submitted (true) or closed (false)
1107
- */
1108
- submitted: boolean;
1109
- /**
1110
- * Draft saved via save-and-continue without final submit.
1111
- */
1112
- saved?: boolean;
1113
- }
1114
- /**
1115
- * Opens the questionnaire viewer dialog and evaluates questionnaire calculations when a questionnaire id is provided.
1116
- */
1117
- declare class AXMQuestionnaireViewerService {
1118
- private readonly popupService;
1119
- private readonly entityService;
1120
- private readonly expressionEvaluator;
1121
- protected readonly deviceService: AXPDeviceService;
1122
- /**
1123
- * Open questionnaire viewer in a dialog
1124
- */
1125
- open(config: AXMQuestionnaireViewerServiceConfig): Promise<AXMQuestionnaireViewerServiceResult | null>;
1126
- /**
1127
- * Evaluate all questionnaire calculations for the given questionnaire and answers.
1128
- * Pass `structure` so expressions can use `answer.byId`, `answer.byTag`, and `answer.allByTag`.
1129
- */
1130
- /**
1131
- * Resolves `isVisible` for a section or question: `false` hides; `true`/undefined shows;
1132
- * non-empty string is evaluated with the same scope as questionnaire calculations (`answer.*`, `fn.*`, etc.).
1133
- */
1134
- evaluateQuestionnaireVisibilityFlag(isVisible: boolean | string | undefined | null, answers: Record<string, unknown>, structure: QuestionnaireBuilderValue | null | undefined): Promise<boolean>;
1135
- /**
1136
- * Evaluates questionnaire calculations and returns values plus display titles from calculation entities.
1137
- */
1138
- evaluateOutcomes(questionnaireId: string, answers: Record<string, unknown>, structure?: QuestionnaireBuilderValue | null): Promise<{
1139
- values: QuestionnaireCalculationValues;
1140
- outcomeTitles: Record<string, string>;
1141
- }>;
1142
- /**
1143
- * Progress metrics and optional calculation results for summary / preview.
1144
- */
1145
- buildSummaryPlaceholderValues(structure: QuestionnaireBuilderValue, answers: Record<string, any>, options?: {
1146
- questionnaireId?: string;
1147
- elapsedSeconds?: number;
1148
- }): Promise<SummaryPlaceholderValues>;
1149
- /**
1150
- * Count answered questions using the same paths as the viewer session (item id or answers.itemId).
1151
- */
1152
- calculateProgressFromStructure(structure: QuestionnaireBuilderValue, answers: Record<string, any>): {
1153
- answeredQuestionsCount: number;
1154
- progressPercentage: number;
1155
- };
1156
- private loadCalculationsForQuestionnaire;
1157
- /**
1158
- * Display label for a calculation: entity `title` when set, otherwise a humanized `name`.
1159
- */
1160
- private resolveOutcomeDisplayTitle;
1161
- private humanizeCalculationKey;
1162
- private computeResult;
1163
- /** Non-empty trimmed `expression`, or empty string if missing. */
1164
- private calculationExpressionText;
1165
- private inferResultKind;
1166
- private coerceOutcome;
1167
- private evaluateOutcomeExpression;
1168
- /**
1169
- * Resolves an answer the same way as the viewer session (`key` or `answers.key`).
1170
- */
1171
- private resolveStoredAnswer;
1172
- /** Sections and items ordered by `order` for deterministic `byTag` matching. */
1173
- private flattenQuestionnaireItems;
1174
- private normalizeQuestionnaireTag;
1175
- /**
1176
- * Scope: answer.eval (path), answer.byId / byTag / allByTag, formula.eval / outcome.eval, fn.* helpers.
1177
- */
1178
- private buildExpressionScope;
1179
- private expressionOutcomeRefs;
1180
- private topologicalSort;
1181
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMQuestionnaireViewerService, never>;
1182
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXMQuestionnaireViewerService>;
1183
- }
1184
-
1185
1302
  interface QuestionWithAnswer {
1186
1303
  name: string;
1187
1304
  title: string;
@@ -1211,6 +1328,7 @@ declare class AXMQuestionnaireViewerPageComponent extends AXPPageLayoutBaseCompo
1211
1328
  protected readonly isLoading: _angular_core.WritableSignal<boolean>;
1212
1329
  protected readonly loadError: _angular_core.WritableSignal<string | null>;
1213
1330
  protected readonly currentSessionId: _angular_core.WritableSignal<string | null>;
1331
+ protected readonly existingSession: _angular_core.WritableSignal<AXMAssessmentManagementAssessmentSessionEntityModel | null>;
1214
1332
  protected readonly flowStep: _angular_core.WritableSignal<FlowStep$1>;
1215
1333
  protected readonly reviewSnapshot: _angular_core.WritableSignal<QuestionWithAnswer[]>;
1216
1334
  protected readonly reviewContext: _angular_core.WritableSignal<Record<string, any> | null>;
@@ -1375,6 +1493,8 @@ declare class AXMQuestionnaireViewerStandalonePageComponent implements OnInit {
1375
1493
  protected readonly isLoading: _angular_core.WritableSignal<boolean>;
1376
1494
  protected readonly loadError: _angular_core.WritableSignal<string | null>;
1377
1495
  protected readonly isSubmitting: _angular_core.WritableSignal<boolean>;
1496
+ protected readonly sessionId: _angular_core.WritableSignal<string | null>;
1497
+ protected readonly existingSession: _angular_core.WritableSignal<AXMAssessmentManagementAssessmentSessionEntityModel | null>;
1378
1498
  protected readonly flowStep: _angular_core.WritableSignal<FlowStep>;
1379
1499
  protected readonly reviewSnapshot: _angular_core.WritableSignal<QuestionWithAnswer[]>;
1380
1500
  protected readonly reviewContext: _angular_core.WritableSignal<Record<string, any> | null>;
@@ -1516,5 +1636,5 @@ declare class AXMQuestionnaireViewerStandalonePageComponent implements OnInit {
1516
1636
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXMQuestionnaireViewerStandalonePageComponent, "axm-questionnaire-viewer-standalone-page", never, {}, {}, never, never, true, never>;
1517
1637
  }
1518
1638
 
1519
- export { AXMAssessmentManagementEntityProvider, AXMAssessmentManagementFeatureDefinitionProvider, AXMAssessmentManagementFeatureKeys, AXMAssessmentManagementMenuProvider, AXMAssessmentManagementModule, AXMAssessmentManagementPermissionDefinitionProvider, AXMAssessmentManagementPermissionKeys, AXMAssessmentManagementSearchCommandProvider, AXMQuestionnaireViewerPageComponent, AXMQuestionnaireViewerService, AXMQuestionnaireViewerStandalonePageComponent, AXPAssessmentManagementMenuKeys, DEFAULT_POST_QUESTIONNAIRE_CONFIG, DEFAULT_PRE_QUESTIONNAIRE_CONFIG, DEFAULT_QUESTIONNAIRE_ENTITY_DISPLAY, DEFAULT_QUESTION_COMMENT_CONFIG, DEFAULT_QUESTION_HINT_CONFIG, RootConfig, diffQuestionCommentOverride, diffQuestionHintOverride, getQuestionAnswerCommentStoragePath, mergeQuestionCommentConfig, mergeQuestionHintForViewer, normalizeCompletionMode, normalizeQuestionCommentConfig, normalizeQuestionHintConfig, normalizeQuestionHintFromEntityRow, normalizeQuestionHintMode, normalizeValidationStrategy, normalizeViewMode, parseQuestionHintPartialFromRecord, readHintFieldsFromRecord, resolveWidgetNodeFromMetaDataDefinitionInterface, stripQuestionBankInterfaceMetadata, toDisplaySettings, toPrePostConfig };
1520
- export type { AXMAssessmentCaseStatus, AXMAssessmentManagementAssessmentCaseEntityModel, AXMAssessmentManagementAssessmentSessionEntityModel, AXMAssessmentManagementQuestionBankItemEntityModel, AXMAssessmentManagementQuestionnaireCalculationEntityModel, AXMAssessmentManagementQuestionnaireEntityModel, AXMAssessmentQuestionCommentConfig, AXMAssessmentQuestionHintConfig, AXMAssessmentQuestionHintConfigOff, AXMAssessmentQuestionHintConfigShown, AXMAssessmentQuestionHintMode, AXMAssessmentQuestionHintPartial, AXMAssessmentQuestionHintVisualMode, AXMAssessmentSessionRole, AXMAssessmentSessionStatus, AXMQuestionBankItemInterfaceMetadata, AXMQuestionBankItemInterfaceValue, AXMQuestionnaireViewerServiceConfig, AXMQuestionnaireViewerServiceResult, PostQuestionnaireConfig, PrePostConfig, PrePostContentValue, PreQuestionnaireConfig, QuestionnaireCalculationResultKind, QuestionnaireCalculationValues, QuestionnaireCompletionMode, QuestionnaireEntityDisplaySettings };
1639
+ export { AXMAssessmentManagementEntityProvider, AXMAssessmentManagementFeatureDefinitionProvider, AXMAssessmentManagementFeatureKeys, AXMAssessmentManagementMenuProvider, AXMAssessmentManagementModule, AXMAssessmentManagementPermissionDefinitionProvider, AXMAssessmentManagementPermissionKeys, AXMAssessmentManagementSearchCommandProvider, AXMQuestionnaireViewerPageComponent, AXMQuestionnaireViewerService, AXMQuestionnaireViewerStandalonePageComponent, AXPAssessmentManagementMenuKeys, DEFAULT_POST_QUESTIONNAIRE_CONFIG, DEFAULT_PRE_QUESTIONNAIRE_CONFIG, DEFAULT_QUESTIONNAIRE_ENTITY_DISPLAY, DEFAULT_QUESTIONNAIRE_OUTCOMES, DEFAULT_QUESTION_COMMENT_CONFIG, DEFAULT_QUESTION_HINT_CONFIG, RootConfig, diffQuestionCommentOverride, diffQuestionHintOverride, findDuplicateOutcomeNames, flattenQuestionnaireOutcomeItems, getQuestionAnswerCommentStoragePath, isQuestionnaireOutcomeDisplayColorHex, matchesQuestionnaireOutcomeDisplayRule, mergeQuestionCommentConfig, mergeQuestionHintForViewer, normalizeCompletionMode, normalizeQuestionCommentConfig, normalizeQuestionHintConfig, normalizeQuestionHintFromEntityRow, normalizeQuestionHintMode, normalizeQuestionnaireOutcomeDisplayRules, normalizeQuestionnaireOutcomesValue, normalizeValidationStrategy, normalizeViewMode, parseQuestionHintPartialFromRecord, parseQuestionnaireOutcomeDisplayColor, readHintFieldsFromRecord, resolveWidgetNodeFromMetaDataDefinitionInterface, stripQuestionBankInterfaceMetadata, toDisplaySettings, toPrePostConfig };
1640
+ export type { AXMAssessmentCaseStatus, AXMAssessmentManagementAssessmentCaseEntityModel, AXMAssessmentManagementAssessmentSessionEntityModel, AXMAssessmentManagementQuestionBankItemEntityModel, AXMAssessmentManagementQuestionnaireEntityModel, AXMAssessmentQuestionCommentConfig, AXMAssessmentQuestionHintConfig, AXMAssessmentQuestionHintConfigOff, AXMAssessmentQuestionHintConfigShown, AXMAssessmentQuestionHintMode, AXMAssessmentQuestionHintPartial, AXMAssessmentQuestionHintVisualMode, AXMAssessmentSessionRole, AXMAssessmentSessionStatus, AXMQuestionBankItemInterfaceMetadata, AXMQuestionBankItemInterfaceValue, AXMQuestionnaireViewerServiceConfig, AXMQuestionnaireViewerServiceResult, PostQuestionnaireConfig, PrePostConfig, PrePostContentValue, PreQuestionnaireConfig, QuestionnaireCompletionMode, QuestionnaireEntityDisplaySettings, QuestionnaireOutcomeDisplayColor, QuestionnaireOutcomeDisplayEmphasis, QuestionnaireOutcomeDisplayIcon, QuestionnaireOutcomeDisplayOperator, QuestionnaireOutcomeDisplayRule, QuestionnaireOutcomeItem, QuestionnaireOutcomeResultKind, QuestionnaireOutcomeSection, QuestionnaireOutcomeValues, QuestionnaireOutcomesValue };