@acorex-platform/module-assessment-management-client 0.0.57 → 0.0.58

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 (95) hide show
  1. package/fesm2022/{acorex-platform-module-assessment-management-client-acorex-platform-module-assessment-management-client-juxXq2pM.mjs → acorex-platform-module-assessment-management-client-acorex-platform-module-assessment-management-client-DxRFMK3k.mjs} +1472 -160
  2. package/fesm2022/acorex-platform-module-assessment-management-client-acorex-platform-module-assessment-management-client-DxRFMK3k.mjs.map +1 -0
  3. package/fesm2022/{acorex-platform-module-assessment-management-client-assessment-voice.commands-CaElbuNh.mjs → acorex-platform-module-assessment-management-client-assessment-voice.commands-DGYCwZ7v.mjs} +2 -2
  4. package/fesm2022/{acorex-platform-module-assessment-management-client-assessment-voice.commands-CaElbuNh.mjs.map → acorex-platform-module-assessment-management-client-assessment-voice.commands-DGYCwZ7v.mjs.map} +1 -1
  5. package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entities-questionnaire.mjs +1 -11
  6. package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entities-questionnaire.mjs.map +1 -1
  7. package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entities-template.mjs +1 -78
  8. package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entities-template.mjs.map +1 -1
  9. package/fesm2022/{acorex-platform-module-assessment-management-client-contracts-entity-catalog-acorex-platform-module-assessment-management-client-contracts-entity-catalog-DYpWu3Vx.mjs → acorex-platform-module-assessment-management-client-contracts-entity-catalog-acorex-platform-module-assessment-management-client-contracts-entity-catalog-DDCy1T4t.mjs} +6 -6
  10. package/fesm2022/{acorex-platform-module-assessment-management-client-contracts-entity-catalog-acorex-platform-module-assessment-management-client-contracts-entity-catalog-DYpWu3Vx.mjs.map → acorex-platform-module-assessment-management-client-contracts-entity-catalog-acorex-platform-module-assessment-management-client-contracts-entity-catalog-DDCy1T4t.mjs.map} +1 -1
  11. package/fesm2022/{acorex-platform-module-assessment-management-client-contracts-entity-catalog-assessment-case.entity-CUctZ-0K.mjs → acorex-platform-module-assessment-management-client-contracts-entity-catalog-assessment-case.entity-DXJp2k3o.mjs} +2 -2
  12. package/fesm2022/{acorex-platform-module-assessment-management-client-contracts-entity-catalog-assessment-case.entity-CUctZ-0K.mjs.map → acorex-platform-module-assessment-management-client-contracts-entity-catalog-assessment-case.entity-DXJp2k3o.mjs.map} +1 -1
  13. package/fesm2022/{acorex-platform-module-assessment-management-client-contracts-entity-catalog-assessment-session.entity-C2JJw_JJ.mjs → acorex-platform-module-assessment-management-client-contracts-entity-catalog-assessment-session.entity-Q7-5toSQ.mjs} +2 -2
  14. package/fesm2022/{acorex-platform-module-assessment-management-client-contracts-entity-catalog-assessment-session.entity-C2JJw_JJ.mjs.map → acorex-platform-module-assessment-management-client-contracts-entity-catalog-assessment-session.entity-Q7-5toSQ.mjs.map} +1 -1
  15. package/fesm2022/{acorex-platform-module-assessment-management-client-contracts-entity-catalog-question-bank-item.entity-D3y_rWUI.mjs → acorex-platform-module-assessment-management-client-contracts-entity-catalog-question-bank-item.entity-CPEpSSlP.mjs} +2 -2
  16. package/fesm2022/{acorex-platform-module-assessment-management-client-contracts-entity-catalog-question-bank-item.entity-D3y_rWUI.mjs.map → acorex-platform-module-assessment-management-client-contracts-entity-catalog-question-bank-item.entity-CPEpSSlP.mjs.map} +1 -1
  17. package/fesm2022/{acorex-platform-module-assessment-management-client-contracts-entity-catalog-questionnaire.entity-CVz5W0fF.mjs → acorex-platform-module-assessment-management-client-contracts-entity-catalog-questionnaire.entity-DOG7yHv-.mjs} +3 -13
  18. package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entity-catalog-questionnaire.entity-DOG7yHv-.mjs.map +1 -0
  19. package/fesm2022/{acorex-platform-module-assessment-management-client-contracts-entity-catalog-template.entity-C01AW5NW.mjs → acorex-platform-module-assessment-management-client-contracts-entity-catalog-template.entity-BeYGYRb7.mjs} +3 -80
  20. package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entity-catalog-template.entity-BeYGYRb7.mjs.map +1 -0
  21. package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entity-catalog.mjs +1 -1
  22. package/fesm2022/acorex-platform-module-assessment-management-client-contracts.mjs +33 -1
  23. package/fesm2022/acorex-platform-module-assessment-management-client-contracts.mjs.map +1 -1
  24. package/fesm2022/{acorex-platform-module-assessment-management-client-fill-assessment-session.command-CMIq-DDl.mjs → acorex-platform-module-assessment-management-client-fill-assessment-session.command-DY_9qPYh.mjs} +2 -2
  25. package/fesm2022/{acorex-platform-module-assessment-management-client-fill-assessment-session.command-CMIq-DDl.mjs.map → acorex-platform-module-assessment-management-client-fill-assessment-session.command-DY_9qPYh.mjs.map} +1 -1
  26. package/fesm2022/acorex-platform-module-assessment-management-client-form-template-viewer-edit.component-BlGBTznW.mjs +112 -0
  27. package/fesm2022/acorex-platform-module-assessment-management-client-form-template-viewer-edit.component-BlGBTznW.mjs.map +1 -0
  28. package/fesm2022/{acorex-platform-module-assessment-management-client-form-template-viewer-popup.component-COZcUPEj.mjs → acorex-platform-module-assessment-management-client-form-template-viewer-popup.component-CeLpGSGc.mjs} +4 -4
  29. package/fesm2022/{acorex-platform-module-assessment-management-client-form-template-viewer-popup.component-COZcUPEj.mjs.map → acorex-platform-module-assessment-management-client-form-template-viewer-popup.component-CeLpGSGc.mjs.map} +1 -1
  30. package/fesm2022/{acorex-platform-module-assessment-management-client-form-template-viewer.service-CvSRpoos.mjs → acorex-platform-module-assessment-management-client-form-template-viewer.service-DoO7ZQmw.mjs} +15 -11
  31. package/fesm2022/acorex-platform-module-assessment-management-client-form-template-viewer.service-DoO7ZQmw.mjs.map +1 -0
  32. package/fesm2022/acorex-platform-module-assessment-management-client-index-er5gI6QK.mjs +68 -0
  33. package/fesm2022/acorex-platform-module-assessment-management-client-index-er5gI6QK.mjs.map +1 -0
  34. package/fesm2022/{acorex-platform-module-assessment-management-client-open-form-template.command-CmR-xFHE.mjs → acorex-platform-module-assessment-management-client-open-form-template.command-Cz23Vkyv.mjs} +3 -3
  35. package/fesm2022/{acorex-platform-module-assessment-management-client-open-form-template.command-CmR-xFHE.mjs.map → acorex-platform-module-assessment-management-client-open-form-template.command-Cz23Vkyv.mjs.map} +1 -1
  36. package/fesm2022/{acorex-platform-module-assessment-management-client-preview-form-template.command-BEzE0620.mjs → acorex-platform-module-assessment-management-client-preview-form-template.command-DDQOvVpt.mjs} +2 -2
  37. package/fesm2022/{acorex-platform-module-assessment-management-client-preview-form-template.command-BEzE0620.mjs.map → acorex-platform-module-assessment-management-client-preview-form-template.command-DDQOvVpt.mjs.map} +1 -1
  38. package/fesm2022/{acorex-platform-module-assessment-management-client-preview-question.command-BGT8qB1_.mjs → acorex-platform-module-assessment-management-client-preview-question.command-D4YlqMUf.mjs} +2 -2
  39. package/fesm2022/{acorex-platform-module-assessment-management-client-preview-question.command-BGT8qB1_.mjs.map → acorex-platform-module-assessment-management-client-preview-question.command-D4YlqMUf.mjs.map} +1 -1
  40. package/fesm2022/{acorex-platform-module-assessment-management-client-preview-questionnaire.command-duK7Tjjp.mjs → acorex-platform-module-assessment-management-client-preview-questionnaire.command-BYh-3EP9.mjs} +2 -2
  41. package/fesm2022/{acorex-platform-module-assessment-management-client-preview-questionnaire.command-duK7Tjjp.mjs.map → acorex-platform-module-assessment-management-client-preview-questionnaire.command-BYh-3EP9.mjs.map} +1 -1
  42. package/fesm2022/{acorex-platform-module-assessment-management-client-question-bank-interface-editor-widget-edit.component-B7_G_C5B.mjs → acorex-platform-module-assessment-management-client-question-bank-interface-editor-widget-edit.component-DARYq7ZJ.mjs} +4 -4
  43. package/fesm2022/{acorex-platform-module-assessment-management-client-question-bank-interface-editor-widget-edit.component-B7_G_C5B.mjs.map → acorex-platform-module-assessment-management-client-question-bank-interface-editor-widget-edit.component-DARYq7ZJ.mjs.map} +1 -1
  44. package/fesm2022/acorex-platform-module-assessment-management-client-questionnaire-questions-editor-edit.component-DIktPLmP.mjs +69 -0
  45. package/fesm2022/acorex-platform-module-assessment-management-client-questionnaire-questions-editor-edit.component-DIktPLmP.mjs.map +1 -0
  46. package/fesm2022/acorex-platform-module-assessment-management-client-questionnaire-viewer-edit.component-BAoqjZ7K.mjs +78 -0
  47. package/fesm2022/acorex-platform-module-assessment-management-client-questionnaire-viewer-edit.component-BAoqjZ7K.mjs.map +1 -0
  48. package/fesm2022/{acorex-platform-module-assessment-management-client-questionnaire-viewer-popup.component-daQL4OD_.mjs → acorex-platform-module-assessment-management-client-questionnaire-viewer-popup.component-O-d2f3fv.mjs} +4 -4
  49. package/fesm2022/{acorex-platform-module-assessment-management-client-questionnaire-viewer-popup.component-daQL4OD_.mjs.map → acorex-platform-module-assessment-management-client-questionnaire-viewer-popup.component-O-d2f3fv.mjs.map} +1 -1
  50. package/fesm2022/acorex-platform-module-assessment-management-client-related-content-viewer-page-component.provider-D0Rkeywu.mjs +26 -0
  51. package/fesm2022/acorex-platform-module-assessment-management-client-related-content-viewer-page-component.provider-D0Rkeywu.mjs.map +1 -0
  52. package/fesm2022/acorex-platform-module-assessment-management-client-related-content-viewer-page.component-CI9AlM58.mjs +315 -0
  53. package/fesm2022/acorex-platform-module-assessment-management-client-related-content-viewer-page.component-CI9AlM58.mjs.map +1 -0
  54. package/fesm2022/{acorex-platform-module-assessment-management-client-review-assessment-session.command-CPeFh1m7.mjs → acorex-platform-module-assessment-management-client-review-assessment-session.command-CHeyD-AC.mjs} +2 -2
  55. package/fesm2022/{acorex-platform-module-assessment-management-client-review-assessment-session.command-CPeFh1m7.mjs.map → acorex-platform-module-assessment-management-client-review-assessment-session.command-CHeyD-AC.mjs.map} +1 -1
  56. package/fesm2022/acorex-platform-module-assessment-management-client-show-form-template-viewer-popup.command-DlpkbJCZ.mjs +117 -0
  57. package/fesm2022/acorex-platform-module-assessment-management-client-show-form-template-viewer-popup.command-DlpkbJCZ.mjs.map +1 -0
  58. package/fesm2022/acorex-platform-module-assessment-management-client-show-questionnaire-questions-popup.command-t67ngnrD.mjs +129 -0
  59. package/fesm2022/acorex-platform-module-assessment-management-client-show-questionnaire-questions-popup.command-t67ngnrD.mjs.map +1 -0
  60. package/fesm2022/acorex-platform-module-assessment-management-client-show-questionnaire-viewer-popup.command-DHgNcZ60.mjs +120 -0
  61. package/fesm2022/acorex-platform-module-assessment-management-client-show-questionnaire-viewer-popup.command-DHgNcZ60.mjs.map +1 -0
  62. package/fesm2022/{acorex-platform-module-assessment-management-client-template-picker.component-D_UCdFOH.mjs → acorex-platform-module-assessment-management-client-template-picker.component-DzboI7GV.mjs} +3 -3
  63. package/fesm2022/{acorex-platform-module-assessment-management-client-template-picker.component-D_UCdFOH.mjs.map → acorex-platform-module-assessment-management-client-template-picker.component-DzboI7GV.mjs.map} +1 -1
  64. package/fesm2022/{acorex-platform-module-assessment-management-client-template-widget-edit.component-DERabYdH.mjs → acorex-platform-module-assessment-management-client-template-widget-edit.component-3DZovs7s.mjs} +2 -2
  65. package/fesm2022/{acorex-platform-module-assessment-management-client-template-widget-edit.component-DERabYdH.mjs.map → acorex-platform-module-assessment-management-client-template-widget-edit.component-3DZovs7s.mjs.map} +1 -1
  66. package/fesm2022/acorex-platform-module-assessment-management-client-test-sheet-cell-type-widget-edit.component-DRFfLOCE.mjs +90 -0
  67. package/fesm2022/acorex-platform-module-assessment-management-client-test-sheet-cell-type-widget-edit.component-DRFfLOCE.mjs.map +1 -0
  68. package/fesm2022/acorex-platform-module-assessment-management-client-test-sheet-grid.component-DENxbikr.mjs +77 -0
  69. package/fesm2022/acorex-platform-module-assessment-management-client-test-sheet-grid.component-DENxbikr.mjs.map +1 -0
  70. package/fesm2022/acorex-platform-module-assessment-management-client-test-sheet-schema-widget-edit.component-Bcvp2Dx5.mjs +236 -0
  71. package/fesm2022/acorex-platform-module-assessment-management-client-test-sheet-schema-widget-edit.component-Bcvp2Dx5.mjs.map +1 -0
  72. package/fesm2022/acorex-platform-module-assessment-management-client-test-sheet-widget-column.component-B3Lx7yuD.mjs +50 -0
  73. package/fesm2022/acorex-platform-module-assessment-management-client-test-sheet-widget-column.component-B3Lx7yuD.mjs.map +1 -0
  74. package/fesm2022/acorex-platform-module-assessment-management-client-test-sheet-widget-edit.component-CrvzEcSh.mjs +81 -0
  75. package/fesm2022/acorex-platform-module-assessment-management-client-test-sheet-widget-edit.component-CrvzEcSh.mjs.map +1 -0
  76. package/fesm2022/acorex-platform-module-assessment-management-client-test-sheet-widget-view.component-sSky9nAq.mjs +30 -0
  77. package/fesm2022/acorex-platform-module-assessment-management-client-test-sheet-widget-view.component-sSky9nAq.mjs.map +1 -0
  78. package/fesm2022/acorex-platform-module-assessment-management-client-test-sheet.util-T-kPrzoj.mjs +423 -0
  79. package/fesm2022/acorex-platform-module-assessment-management-client-test-sheet.util-T-kPrzoj.mjs.map +1 -0
  80. package/fesm2022/{acorex-platform-module-assessment-management-client-view-session-answers.command-DjJajIkL.mjs → acorex-platform-module-assessment-management-client-view-session-answers.command-CxZirYRJ.mjs} +2 -2
  81. package/fesm2022/{acorex-platform-module-assessment-management-client-view-session-answers.command-DjJajIkL.mjs.map → acorex-platform-module-assessment-management-client-view-session-answers.command-CxZirYRJ.mjs.map} +1 -1
  82. package/fesm2022/acorex-platform-module-assessment-management-client.mjs +1 -1
  83. package/i18n/en-AU/assessment-management.json +69 -0
  84. package/i18n/en-AU/form-template-management.json +8 -0
  85. package/i18n/en-US/assessment-management.json +69 -0
  86. package/i18n/en-US/form-template-management.json +8 -0
  87. package/i18n/fa-IR/assessment-management.json +69 -0
  88. package/i18n/fa-IR/form-template-management.json +8 -0
  89. package/package.json +3 -3
  90. package/types/acorex-platform-module-assessment-management-client-contracts.d.ts +23 -3
  91. package/types/acorex-platform-module-assessment-management-client.d.ts +10 -1
  92. package/fesm2022/acorex-platform-module-assessment-management-client-acorex-platform-module-assessment-management-client-juxXq2pM.mjs.map +0 -1
  93. package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entity-catalog-questionnaire.entity-CVz5W0fF.mjs.map +0 -1
  94. package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entity-catalog-template.entity-C01AW5NW.mjs.map +0 -1
  95. package/fesm2022/acorex-platform-module-assessment-management-client-form-template-viewer.service-CvSRpoos.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-assessment-management-client-contracts.mjs","sources":["../../../../libs/modules/assessment-management/contracts/src/features.keys.ts","../../../../libs/modules/assessment-management/contracts/src/menu.keys.ts","../../../../libs/modules/assessment-management/contracts/src/form-template-menu.keys.ts","../../../../libs/modules/assessment-management/contracts/src/permission.keys.ts","../../../../libs/modules/assessment-management/contracts/src/form-template-permission.keys.ts","../../../../libs/modules/assessment-management/contracts/src/form-template-settings.keys.ts","../../../../libs/modules/assessment-management/contracts/src/QUESTIONNAIRE_OUTCOMES_PAGE_COMPONENT_KEY.ts","../../../../libs/modules/assessment-management/contracts/src/QUESTIONNAIRE_QUESTIONS_PAGE_COMPONENT_KEY.ts","../../../../libs/modules/assessment-management/contracts/src/question-bank-item.contracts.ts","../../../../libs/modules/assessment-management/contracts/src/questionnaire-builder.types.ts","../../../../libs/modules/assessment-management/contracts/src/questionnaire-print.types.ts","../../../../libs/modules/assessment-management/contracts/src/root-config.ts","../../../../libs/modules/assessment-management/contracts/src/manifest.ts","../../../../libs/modules/assessment-management/contracts/src/commands/assessment-session-preview-pdf.types.ts","../../../../libs/modules/assessment-management/contracts/src/print/assessment-print-merge.constants.ts","../../../../libs/modules/assessment-management/contracts/src/print/print-html.util.ts","../../../../libs/modules/assessment-management/contracts/src/entities/assessment-case/assessment-case.types.ts","../../../../libs/modules/assessment-management/contracts/src/entities/assessment-session/assessment-session.types.ts","../../../../libs/modules/assessment-management/contracts/src/entities/question-bank-item/question-bank-item.types.ts","../../../../libs/modules/assessment-management/contracts/src/entities/question-bank-item/question-comment.types.ts","../../../../libs/modules/assessment-management/contracts/src/entities/question-bank-item/question-hint.types.ts","../../../../libs/modules/assessment-management/contracts/src/assessment-outcome.types.ts","../../../../libs/modules/assessment-management/contracts/src/entities/questionnaire/questionnaire.types.ts","../../../../libs/modules/assessment-management/contracts/src/entities/template/template.types.ts","../../../../libs/modules/assessment-management/contracts/src/index.ts","../../../../libs/modules/assessment-management/contracts/src/acorex-platform-module-assessment-management-client-contracts.ts"],"sourcesContent":["export const AXMAssessmentManagementFeatureKeys = {\n QuestionnaireManagement: 'AssessmentManagement:Feature:Questionnaire.Management',\n FormTemplates: 'AssessmentManagement:Feature:FormTemplates',\n} as const;\n\n","export const AXPAssessmentManagementMenuKeys = {\n Questionnaires: 'AssessmentManagement:Menu:Questionnaires',\n Cases: 'AssessmentManagement:Menu:Cases',\n QuestionBankItems: 'AssessmentManagement:Menu:QuestionBankItems',\n} as const;\n\n","export const AXPFormTemplateManagementMenuKeys = {\n Root: 'FormTemplateManagement:Menu',\n Templates: 'FormTemplateManagement:Menu:Templates',\n} as const;\n\n","/**\n * Safety & Risk capabilities used by this module.\n * Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).\n */\nexport const AXPSafetyRiskPermissionKeys = {\n Access: 'SafetyRisk:Permission:Access',\n MaintainSafety: 'SafetyRisk:Permission:MaintainSafety',\n MaintainRisk: 'SafetyRisk:Permission:MaintainRisk',\n MaintainHealth: 'SafetyRisk:Permission:MaintainHealth',\n MaintainAssessments: 'SafetyRisk:Permission:MaintainAssessments',\n Setup: 'SafetyRisk:Permission:Setup',\n} as const;\n\n/**\n * @deprecated Prefer {@link AXPSafetyRiskPermissionKeys}.\n * Legacy nested shape kept so existing imports compile during migration.\n */\nexport const AXMAssessmentManagementPermissionKeys = {\n AssessmentManagement: {\n QuestionBank: AXPSafetyRiskPermissionKeys.MaintainAssessments,\n Questionnaire: {\n Management: AXPSafetyRiskPermissionKeys.MaintainAssessments,\n Create: AXPSafetyRiskPermissionKeys.MaintainAssessments,\n Edit: AXPSafetyRiskPermissionKeys.MaintainAssessments,\n Delete: AXPSafetyRiskPermissionKeys.MaintainAssessments,\n },\n Case: {\n Management: AXPSafetyRiskPermissionKeys.MaintainAssessments,\n },\n Session: {\n Management: AXPSafetyRiskPermissionKeys.MaintainAssessments,\n },\n Automation: {\n Management: AXPSafetyRiskPermissionKeys.MaintainAssessments,\n },\n },\n} as const;\n","/**\n * Content & Documents capabilities used by this module.\n * Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).\n */\nexport const AXPContentDocumentsPermissionKeys = {\n Access: 'ContentDocuments:Permission:Access',\n MaintainDocuments: 'ContentDocuments:Permission:MaintainDocuments',\n MaintainContent: 'ContentDocuments:Permission:MaintainContent',\n MaintainFormTemplates: 'ContentDocuments:Permission:MaintainFormTemplates',\n Setup: 'ContentDocuments:Permission:Setup',\n} as const;\n\n/**\n * @deprecated Prefer {@link AXPContentDocumentsPermissionKeys}.\n * Legacy nested shape kept so existing imports compile during migration.\n */\nexport const AXPFormTemplateManagementPermissionKeys = {\n FormTemplate: {\n Templates: {\n Management: AXPContentDocumentsPermissionKeys.MaintainFormTemplates,\n View: AXPContentDocumentsPermissionKeys.MaintainFormTemplates,\n Edit: AXPContentDocumentsPermissionKeys.MaintainFormTemplates,\n Delete: AXPContentDocumentsPermissionKeys.MaintainFormTemplates,\n Create: AXPContentDocumentsPermissionKeys.MaintainFormTemplates,\n },\n },\n} as const;\n","export enum AXPFormTemplateSettings {\n HistoryPanel = 'FormTemplateManagement:Setting:Designer.HistoryPanel',\n AutoSave = 'FormTemplateManagement:Setting:Designer.AutoSave',\n AutoSaveInterval = 'FormTemplateManagement:Setting:Designer.AutoSaveInterval',\n AutoSaveTimeout = 'FormTemplateManagement:Setting:Designer.AutoSaveTimeout',\n}\n\n","/** Component key for the questionnaire Outcomes page tab. Register via AXP_PAGE_COMPONENT_PROVIDER. */\nexport const QUESTIONNAIRE_OUTCOMES_PAGE_COMPONENT_KEY = 'questionnaire-outcomes-page';\n","/** Component key for the questionnaire Questions page tab. Register via AXP_PAGE_COMPONENT_PROVIDER. */\nexport const QUESTIONNAIRE_QUESTIONS_PAGE_COMPONENT_KEY = 'questionnaire-questions-page';\n","import type { AXPExpression, AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\n\n//#region ---- Question comment ----\n\n/**\n * Respondent free-text comment configuration (per question bank item; overridable per questionnaire item).\n *\n * `enabled` follows the same boolean | expression pattern as question `isVisible` / `isRequired`\n * (property-viewer toggle binding). Optional `isVisible` remains as a legacy/additional gate.\n */\nexport interface AXMAssessmentQuestionCommentConfig {\n /** `true` / `false`, or a visibility expression string (shown in Allow Comments). */\n enabled: boolean | AXPExpression;\n required: boolean;\n /**\n * Optional extra visibility gate (legacy). Prefer putting conditions on {@link enabled}.\n * Omitted / `true` = no extra gate; `false` hides; string = expression.\n */\n isVisible?: boolean | AXPExpression;\n}\n\n//#endregion\n\n//#region ---- Question hint ----\n\n/**\n * Visual style when a hint is shown (maps to ax-alert color).\n */\nexport type AXMAssessmentQuestionHintVisualMode = 'info' | 'warning' | 'danger' | 'success' | 'neutral';\n\n/**\n * `off` = no hint (same intent as \"hidden\" / \"none\"); visual modes require {@link AXMAssessmentQuestionHintConfigShown.content}.\n */\nexport type AXMAssessmentQuestionHintMode = 'off' | AXMAssessmentQuestionHintVisualMode;\n\nexport type AXMAssessmentQuestionHintConfigOff = { mode: 'off' };\n\nexport type AXMAssessmentQuestionHintConfigShown = {\n mode: AXMAssessmentQuestionHintVisualMode;\n content: AXPMultiLanguageString;\n};\n\n/**\n * Question hint configuration (question bank default; overridable per questionnaire item).\n */\nexport type AXMAssessmentQuestionHintConfig = AXMAssessmentQuestionHintConfigOff | AXMAssessmentQuestionHintConfigShown;\n\n/**\n * Partial override on a questionnaire item (`undefined` / omitted fields inherit from the bank).\n */\nexport type AXMAssessmentQuestionHintPartial = {\n mode?: AXMAssessmentQuestionHintMode;\n content?: AXPMultiLanguageString;\n};\n\n//#endregion\n","//#region ---- Imports ----\n\nimport type { AXPExpression, AXPMultiLanguageString, AXPWidgetNode } from '@acorex-platform/framework-shared/core';\n\nimport type {\n AXMAssessmentQuestionCommentConfig,\n AXMAssessmentQuestionHintPartial,\n} from './question-bank-item.contracts';\nimport type { QuestionnairePrintSettings } from './questionnaire-print.types';\n\n//#endregion\n\n//#region ---- Questionnaire Builder Persistence Types ----\n\n/**\n * Display settings for questionnaire viewer\n */\n/** Whether the respondent can save a draft before final submit. */\nexport type QuestionnaireCompletionMode = 'submit-only' | 'save-and-continue';\n\nexport interface QuestionnaireDisplaySettings {\n /**\n * View mode: single-page, page-per-group, page-per-question, side-menu\n */\n viewMode?: 'single-page' | 'page-per-group' | 'page-per-question' | 'side-menu';\n\n /**\n * submit-only: final submit only; save-and-continue: draft save + submit.\n */\n completionMode?: QuestionnaireCompletionMode;\n\n /**\n * Show progress bar\n */\n showProgressBar?: boolean;\n\n /**\n * Progress calculation mode: answered or navigation\n */\n progressMode?: 'answered' | 'navigation';\n\n /**\n * Show timer\n */\n showTimer?: boolean;\n\n /**\n * Show question numbers\n */\n showQuestionNumbers?: boolean;\n\n /**\n * Auto-save answers as user types\n */\n autoSave?: boolean;\n\n /**\n * Show validation errors inline\n */\n showValidationErrors?: boolean;\n\n /**\n * Allow skipping questions (if not required)\n */\n allowSkipping?: boolean;\n\n /**\n * Show question counter (e.g., \"Question 3 of 10\")\n */\n showQuestionCounter?: boolean;\n\n /**\n * Validation timing strategy:\n * - step: validate on each step/section navigation\n * - end: validate only at final submit\n * Default: step\n */\n validationStrategy?: 'step' | 'end';\n}\n\n/**\n * Value structure stored in entity (simplified for persistence)\n */\nexport interface QuestionnaireBuilderValue {\n sections: Array<{\n name: string;\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString;\n order: number;\n tags?: string[];\n isVisible?: boolean | AXPExpression;\n items: Array<{\n name: string;\n questionBankItemId: string;\n order: number;\n isRequired?: boolean | AXPExpression;\n isVisible?: boolean | AXPExpression;\n interfaceOverride?: AXPWidgetNode;\n hint?: AXMAssessmentQuestionHintPartial;\n comment?: Partial<AXMAssessmentQuestionCommentConfig>;\n tags?: string[];\n }>;\n }>;\n /**\n * Display settings for questionnaire viewer\n */\n displaySettings?: QuestionnaireDisplaySettings;\n /**\n * Print document defaults (overridable per print call).\n */\n printSettings?: QuestionnairePrintSettings;\n}\n\n//#endregion\n","//#region ---- Questionnaire print settings ----\n\n/** Paper size for the generated PDF. */\nexport type QuestionnairePrintPaperSize = 'A4' | 'Letter' | 'Legal';\n\n/** Page orientation for the generated PDF. */\nexport type QuestionnairePrintOrientation = 'portrait' | 'landscape';\n\n/** Resolved print page breaks (no sidebar). Follows Display view mode. */\nexport type QuestionnairePrintPaging = 'single-page' | 'page-per-group' | 'page-per-question';\n\n/**\n * Print document options stored on the questionnaire (defaults) and accepted as overrides\n * by the print host / snapshot service.\n */\nexport interface QuestionnairePrintSettings {\n paperSize?: QuestionnairePrintPaperSize;\n orientation?: QuestionnairePrintOrientation;\n /** Optional diagonal text on every page. Empty means no watermark. */\n watermark?: string;\n showQuestionNumbers?: boolean;\n showWelcomeScreen?: boolean;\n showSummaryAfterSubmit?: boolean;\n showOutcomeResults?: boolean;\n showUnansweredQuestions?: boolean;\n showComments?: boolean;\n showAttachments?: boolean;\n showHints?: boolean;\n showNotes?: boolean;\n}\n\nexport const DEFAULT_QUESTIONNAIRE_PRINT_SETTINGS: Required<QuestionnairePrintSettings> = {\n paperSize: 'A4',\n orientation: 'portrait',\n watermark: '',\n showQuestionNumbers: true,\n showWelcomeScreen: false,\n showSummaryAfterSubmit: false,\n showOutcomeResults: false,\n showUnansweredQuestions: true,\n showComments: true,\n showAttachments: true,\n showHints: true,\n showNotes: true,\n};\n\nconst PRINT_PAPER_SIZE_VALUES: readonly QuestionnairePrintPaperSize[] = ['A4', 'Letter', 'Legal'];\nconst PRINT_ORIENTATION_VALUES: readonly QuestionnairePrintOrientation[] = ['portrait', 'landscape'];\n\nconst PRINT_PAGE_SIZE_MM: Record<QuestionnairePrintPaperSize, { width: number; height: number }> = {\n A4: { width: 210, height: 297 },\n Letter: { width: 215.9, height: 279.4 },\n Legal: { width: 215.9, height: 355.6 },\n};\n\n/** Side margin used by the print document and Chromium PDF engine. */\nexport const PRINT_PAGE_SIDE_MARGIN_MM = 14;\n/**\n * Playwright paints repeating letterhead in the top/bottom margin box.\n * These must stay large enough for the company header/footer; measuring\n * chrome height under-reported and overlapped the questionnaire title.\n */\nexport const PRINT_PAGE_LETTERHEAD_TOP_MARGIN_MM = 36;\nexport const PRINT_PAGE_LETTERHEAD_BOTTOM_MARGIN_MM = 28;\n\nexport function resolvePrintLetterheadPdfMargin(): {\n top: string;\n right: string;\n bottom: string;\n left: string;\n} {\n return {\n top: `${PRINT_PAGE_LETTERHEAD_TOP_MARGIN_MM}mm`,\n right: `${PRINT_PAGE_SIDE_MARGIN_MM}mm`,\n bottom: `${PRINT_PAGE_LETTERHEAD_BOTTOM_MARGIN_MM}mm`,\n left: `${PRINT_PAGE_SIDE_MARGIN_MM}mm`,\n };\n}\n\nfunction definedPartial<T extends object>(value: T | null | undefined): Partial<T> {\n if (!value) {\n return {};\n }\n return Object.fromEntries(Object.entries(value).filter(([, item]) => item !== undefined)) as Partial<T>;\n}\n\nfunction coerceSelectId(value: unknown): unknown {\n if (value != null && typeof value === 'object' && 'id' in value) {\n return (value as { id: unknown }).id;\n }\n return value;\n}\n\nexport function normalizePrintPaperSize(value: unknown): QuestionnairePrintPaperSize {\n const raw = coerceSelectId(value);\n if (typeof raw === 'string' && PRINT_PAPER_SIZE_VALUES.includes(raw as QuestionnairePrintPaperSize)) {\n return raw as QuestionnairePrintPaperSize;\n }\n return DEFAULT_QUESTIONNAIRE_PRINT_SETTINGS.paperSize;\n}\n\nexport function normalizePrintOrientation(value: unknown): QuestionnairePrintOrientation {\n const raw = coerceSelectId(value);\n if (typeof raw === 'string' && PRINT_ORIENTATION_VALUES.includes(raw as QuestionnairePrintOrientation)) {\n return raw as QuestionnairePrintOrientation;\n }\n return DEFAULT_QUESTIONNAIRE_PRINT_SETTINGS.orientation;\n}\n\nexport function normalizePrintWatermark(value: unknown): string {\n return typeof value === 'string' ? value.trim() : '';\n}\n\n/**\n * Merges questionnaire defaults with an optional per-call override.\n * Undefined override fields keep the stored / built-in default.\n */\nexport function resolvePrintSettings(\n stored?: Partial<QuestionnairePrintSettings> | null,\n override?: Partial<QuestionnairePrintSettings> | null,\n): Required<QuestionnairePrintSettings> {\n const merged = {\n ...DEFAULT_QUESTIONNAIRE_PRINT_SETTINGS,\n ...definedPartial(stored),\n ...definedPartial(override),\n };\n return {\n ...merged,\n paperSize: normalizePrintPaperSize(merged.paperSize),\n orientation: normalizePrintOrientation(merged.orientation),\n watermark: normalizePrintWatermark(merged.watermark),\n };\n}\n\n/**\n * Resolves print page breaks from the Display view mode.\n * `side-menu` prints as page-per-group (no sidebar).\n */\nexport function resolvePrintPaging(displayViewMode?: string | null): QuestionnairePrintPaging {\n if (displayViewMode === 'page-per-question') {\n return 'page-per-question';\n }\n if (displayViewMode === 'page-per-group' || displayViewMode === 'side-menu') {\n return 'page-per-group';\n }\n return 'single-page';\n}\n\n/** Content width after side margins, for the off-screen print host and wrapped HTML. */\nexport function resolvePrintContentWidthMm(\n print: Pick<QuestionnairePrintSettings, 'paperSize' | 'orientation'>,\n): number {\n const size = PRINT_PAGE_SIZE_MM[normalizePrintPaperSize(print.paperSize)];\n const pageWidth = normalizePrintOrientation(print.orientation) === 'landscape' ? size.height : size.width;\n return Math.round((pageWidth - PRINT_PAGE_SIDE_MARGIN_MM * 2) * 10) / 10;\n}\n\nexport function resolvePrintPdfPageOptions(print: Pick<QuestionnairePrintSettings, 'paperSize' | 'orientation'>): {\n format: QuestionnairePrintPaperSize;\n landscape: boolean;\n} {\n return {\n format: normalizePrintPaperSize(print.paperSize),\n landscape: normalizePrintOrientation(print.orientation) === 'landscape',\n };\n}\n\n//#endregion\n","//#region ---- Root Configuration ----\n\nconst config = { i18n: 'assessment-management', module: 'AssessmentManagement' } as const;\n\nexport const RootConfig = {\n config,\n module: {\n module: 'assessment-management',\n route: 'assessment-management',\n name: 'AssessmentManagement',\n title: '@assessment-management:module.title',\n icon: 'fa-light fa-clipboard-list-check',\n },\n entities: {\n questionBankItem: {\n name: 'QuestionBankItem',\n title: '@assessment-management:question-bank.entities.question-bank-item.title',\n titlePlural: '@assessment-management:question-bank.entities.question-bank-item.plural',\n icon: 'fa-light fa-question-circle',\n },\n questionnaire: {\n name: 'Questionnaire',\n title: '@assessment-management:questionnaires.entities.questionnaire.title',\n titlePlural: '@assessment-management:questionnaires.entities.questionnaire.plural',\n icon: 'fa-light fa-clipboard-list',\n },\n assessmentCase: {\n name: 'AssessmentCase',\n title: '@assessment-management:cases.entities.assessment-case.title',\n titlePlural: '@assessment-management:cases.entities.assessment-case.plural',\n icon: 'fa-light fa-briefcase',\n },\n assessmentSession: {\n name: 'AssessmentSession',\n title: '@assessment-management:sessions.entities.assessment-session.title',\n titlePlural: '@assessment-management:sessions.entities.assessment-session.plural',\n icon: 'fa-light fa-clipboard-check',\n },\n template: {\n name: 'Template',\n title: '@form-template-management:templates.entities.template.title',\n source: `${config.module}.Template`,\n icon: 'fa-light fa-file-code',\n },\n },\n queries: {\n dashboard: {\n overdueAssessmentsKpi: `${config.module}:Dashboard:OverdueAssessmentsKpi`,\n pendingAssessmentsKpi: `${config.module}:Dashboard:PendingAssessmentsKpi`,\n myAssessmentsKpi: `${config.module}:Dashboard:MyAssessmentsKpi`,\n assessmentsWeekLine: `${config.module}:Dashboard:AssessmentsWeekLine`,\n },\n },\n} as const;\n\n//#endregion\n\n","//#region ---- Imports ----\n\nimport { AXPModuleManifest } from '@acorex-platform/framework-shared/core';\nimport { RootConfig } from './root-config';\n\n//#endregion\n\n//#region ---- Manifest Definition ----\n\n/**\n * Assessment Management Module Manifest.\n * Defines module metadata, features, and provider references.\n */\nexport const AssessmentManagementManifest: AXPModuleManifest = {\n name: RootConfig.module.name,\n version: '1.0.0',\n title: RootConfig.module.title,\n icon: RootConfig.module.icon,\n i18n: RootConfig.config.i18n,\n type: 'domain',\n domain: 'assessment-learning',\n required: false,\n\n // Module dependencies (optional)\n};\n\n//#endregion\n\n","//#region ---- Assessment session PDF preview contracts ----\n\n/** Server command that renders a filled assessment session to PDF. */\nexport const AXM_ASSESSMENT_SESSION_PREVIEW_PDF_COMMAND_KEY =\n 'AssessmentManagement:AssessmentSession:PreviewPdf' as const;\n\n/** Client / entity-menu command that opens the PDF preview dialog. */\nexport const AXM_ASSESSMENT_SESSION_PREVIEW_PDF_CLIENT_COMMAND_KEY =\n 'AssessmentManagement.AssessmentSession:PreviewPdf' as const;\n\nexport interface AXMAssessmentSessionPreviewPdfRequest {\n /** Specific session. Required when `caseId` and `printHtmlGzip` are omitted. */\n sessionId?: string;\n /** When `sessionId` is omitted, the latest session for this case is used. */\n caseId?: string;\n /**\n * Questionnaire ID. Used when there is no session (builder Preview) so the\n * selected print text template and tenant can still be loaded.\n */\n questionnaireId?: string;\n /** Locale for MLS titles and answer formatting. Defaults to `en-US`. */\n locale?: string;\n /**\n * Gzipped live questionnaire HTML. When set, the PDF is rendered from this\n * snapshot and session lookup is skipped.\n */\n printHtmlGzip?: string;\n /** File / header title when rendering a live snapshot. */\n title?: string;\n /** Overrides questionnaire `printTemplateId` for this render. */\n printTemplateId?: string;\n /** Overrides questionnaire paper size for this render. */\n paperSize?: 'A4' | 'Letter' | 'Legal';\n /** Overrides questionnaire orientation for this render. */\n orientation?: 'portrait' | 'landscape';\n /** Overrides questionnaire watermark for this render. */\n watermark?: string;\n}\n\nexport interface AXMAssessmentSessionPreviewPdfResult {\n filename: string;\n contentType: 'application/pdf';\n base64: string;\n}\n\n//#endregion\n","//#region ---- Assessment print merge keys ----\n\n/**\n * Event merge keys passed to `ContentManagement:TextTemplate:Render` (`channel: print`).\n * Names must match `PlatformManagement.Tokens` Event rows.\n */\nexport const AXM_ASSESSMENT_PRINT_MERGE_KEYS = {\n questionnaireTitle: 'questionnaireTitle',\n caseTitle: 'caseTitle',\n sessionDate: 'sessionDate',\n generatedAt: 'generatedAt',\n status: 'status',\n statusLabel: 'statusLabel',\n sessionBody: 'sessionBody',\n} as const;\n\nexport type AXMAssessmentPrintMergeKey =\n (typeof AXM_ASSESSMENT_PRINT_MERGE_KEYS)[keyof typeof AXM_ASSESSMENT_PRINT_MERGE_KEYS];\n\n//#endregion\n","//#region ---- Print HTML snapshot helpers ----\n\nimport {\n DEFAULT_QUESTIONNAIRE_PRINT_SETTINGS,\n resolvePrintContentWidthMm,\n resolvePrintSettings,\n type QuestionnairePrintSettings,\n} from '../questionnaire-print.types';\n\nexport const ASSESSMENT_PRINT_PAGE_FORMAT = DEFAULT_QUESTIONNAIRE_PRINT_SETTINGS.paperSize;\n/** A4 portrait content width after 14mm side margins (210 - 14 - 14). */\nexport const ASSESSMENT_PRINT_CONTENT_WIDTH_MM = resolvePrintContentWidthMm(DEFAULT_QUESTIONNAIRE_PRINT_SETTINGS);\nexport const ASSESSMENT_PRINT_HTML_GZIP_ENCODING = 'gzip-base64' as const;\n\nfunction resolveWatermarkFontMm(watermark: string, contentWidthMm: number): number {\n const chars = Math.max(watermark.trim().length, 1);\n const fitted = (contentWidthMm * 0.78) / (chars * 0.62);\n return Math.round(Math.max(5, Math.min(14, fitted)) * 10) / 10;\n}\n\nfunction buildPrintDocumentCss(print: Required<QuestionnairePrintSettings>): string {\n const width = resolvePrintContentWidthMm(print);\n const watermark = print.watermark\n ? `.__print-watermark{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%) rotate(-32deg);transform-origin:center center;pointer-events:none;z-index:0;color:rgba(15,23,42,.12);font-size:${resolveWatermarkFontMm(print.watermark, width)}mm;font-weight:700;letter-spacing:.04em;text-transform:uppercase;white-space:nowrap;line-height:1;}`\n : '';\n return `\n@page { size: ${print.paperSize} ${print.orientation}; }\nhtml, body { width: ${width}mm; max-width: ${width}mm; margin: 0; }\nbody { background: #fff; color: #0f172a; font-family: Arial, Helvetica, sans-serif; -webkit-print-color-adjust: exact; print-color-adjust: exact; }\n${watermark}\n.__print-letterhead { width: 100%; border-collapse: collapse; table-layout: fixed; border: 1.25pt solid #1e3a5f; }\n.__print-letterhead__accent { height: 5px; background: #1e3a5f; font-size: 0; line-height: 0; }\n.__print-letterhead__header { padding: 7mm 8mm 5mm; }\n.__print-letterhead__brand { width: 100%; border-collapse: collapse; }\n.__print-letterhead__logo { width: 42px; vertical-align: middle; }\n.__print-letterhead__logo img, .__print-letterhead__logo svg { display: block; max-width: 36px; max-height: 36px; }\n.__print-letterhead__name { font-size: 13.5pt; line-height: 1.2; font-weight: 700; color: #0f172a; letter-spacing: 0.01em; }\n.__print-letterhead__email { font-size: 8.5pt; line-height: 1.4; color: #64748b; margin-top: 2px; }\n.__print-letterhead__contact { text-align: right; vertical-align: middle; font-size: 8pt; line-height: 1.45; color: #64748b; }\n.__print-letterhead__body { padding: 2mm 8mm 8mm; vertical-align: top; min-height: 165mm; }\n.__print-letterhead__footer { padding: 4.5mm 8mm; background: #f1f5f9; border-top: 1px solid #cbd5e1; font-size: 8pt; line-height: 1.45; color: #475569; }\n.__print-letterhead__footer-table { width: 100%; border-collapse: collapse; }\n.__print-letterhead__copy { text-align: right; color: #64748b; }\n.__print-doc-head { margin: 0 0 12px; padding: 0 0 10px; border-bottom: 1px solid #e2e8f0; }\n.__print-doc-title { margin: 0 0 6px; font-size: 15pt; line-height: 1.25; font-weight: 700; color: #0f172a; }\n.__print-doc-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 8.5pt; line-height: 1.4; color: #64748b; }\n.__print-doc-meta > span:empty { display: none; }\n.__print-doc-meta > span:not(:empty) { padding: 2px 8px; background: #f1f5f9; border-radius: 999px; color: #334155; }\n.__print-document {\n display: block !important; width: 100%; position: relative; z-index: 1;\n break-inside: auto !important; page-break-inside: auto !important;\n}\naxm-questionnaire-print-host,\n.axm-questionnaire-print-surface,\naxm-questionnaire-viewer,\naxm-questionnaire-viewer-print-view,\naxp-widgets-container,\nax-form,\n.__questionnaire-container {\n display: block !important; break-inside: auto !important; page-break-inside: auto !important;\n}\n.__print-section {\n display: block !important; break-inside: auto !important; page-break-inside: auto !important;\n margin: 0 0 10px !important; padding: 0 !important; border: 1px solid #d0d9e6 !important; border-radius: 4px !important;\n background: #fff !important; overflow: visible;\n}\n.__print-section:last-child { margin-bottom: 0 !important; }\naxm-questionnaire-viewer-section-header {\n display: block !important; width: 100% !important; margin: 0 !important; padding: 0 !important;\n background: #eef3f8 !important; border-bottom: 1px solid #d0d9e6 !important;\n}\naxm-questionnaire-viewer-section-header .__mb-sm,\naxm-questionnaire-viewer-section-header .__mb-md { margin-bottom: 0 !important; }\n.__print-questions { display: block !important; padding: 2px 12px 8px !important; }\n.__section-header { margin: 0 !important; padding: 8px 12px 7px !important; background: #eef3f8 !important; }\n.__section-title-md, .__section-title-lg, .__print-section h2, .__print-section .__section-title-md, .__print-section .__section-title-lg {\n margin: 0 !important; padding: 0 !important; padding-inline-start: 0 !important; border-inline-start: none !important;\n font-size: 11pt !important; line-height: 1.25 !important; font-weight: 700 !important; color: #0f172a !important;\n}\n.__section-description, .__section-description--rich {\n margin: 2px 0 0 !important; padding-inline-start: 0 !important; font-size: 8.5pt !important; line-height: 1.35 !important; color: #64748b !important;\n}\n.__question-item { break-inside: avoid; page-break-inside: avoid; }\n.__question-item.__print-plain {\n background: transparent !important; box-shadow: none !important; border: none !important; border-bottom: 1px solid #e8eef3 !important;\n border-radius: 0 !important; padding: 8px 0 !important; margin: 0 !important;\n}\n.__print-questions .__question-item.__print-plain:last-child { border-bottom: none !important; }\n.__question-header { display: flex !important; align-items: flex-start !important; gap: 8px !important; width: 100% !important; }\n.__question-number {\n display: inline-block !important; min-width: 0 !important; padding: 0 !important; border-radius: 0 !important;\n background: transparent !important; color: #0f172a !important; font-size: 10pt !important; font-weight: 700 !important; text-align: start !important;\n}\n.__question-title, h3.__question-title, .__question-title--rich {\n margin: 0 !important; font-size: 10pt !important; line-height: 1.4 !important; font-weight: 600 !important; color: #0f172a !important;\n}\n.__question-widget { margin-top: 4px !important; }\n.__question-comment, .__question-comment--readonly {\n margin-top: 4px !important; padding-inline-start: 2px !important;\n}\n.__question-comment-text {\n margin: 0 !important; font-size: 9pt !important; line-height: 1.4 !important; font-weight: 400 !important;\n font-style: italic !important; color: #64748b !important;\n}\n.axp-widget-print-field {\n display: inline-block !important; width: auto !important; min-width: 22mm !important; max-width: 100% !important;\n min-height: 0 !important; margin: 0 !important; padding: 3px 10px !important; border: none !important; border-bottom: none !important;\n border-radius: 4px !important; background: #f1f5f9 !important; color: #0f172a !important; font-size: 11pt !important;\n font-weight: 600 !important; line-height: 1.4 !important; word-break: break-word;\n}\n.axp-widget-print-field--empty {\n background: transparent !important; color: #94a3b8 !important; font-weight: 400 !important; border: 1px dashed #cbd5e1 !important;\n}\n.axp-widget-print-field--multiline, .axp-widget-print-field--rich {\n display: block !important; width: 100% !important; font-weight: 400 !important; background: #f8fafc !important;\n border: 1px solid #e2e8f0 !important; min-height: 3.2em;\n}\n.axp-widget-print-choice { display: inline-flex; align-items: center; gap: 8px; font-size: 10.5pt; color: #0f172a; }\n.axp-widget-print-mark { font-size: 13pt; line-height: 1; }\n.__print-document[data-print-paging=\"page-per-group\"] .__print-section + .__print-section,\n.__print-document[data-print-paging=\"side-menu\"] .__print-section + .__print-section { break-before: page; page-break-before: always; }\n.__print-document[data-print-paging=\"page-per-question\"] axm-questionnaire-viewer-question + axm-questionnaire-viewer-question { break-before: page; page-break-before: always; }\n.__print-extra,\n.__print-outcomes,\n.__print-summary {\n display: block !important;\n break-inside: auto !important;\n page-break-inside: auto !important;\n}\n.__print-outcomes,\n.__print-summary {\n break-before: page !important;\n page-break-before: always !important;\n}\n.__print-outcomes .axp-outcome-results-viewer,\n.__print-outcomes .__root,\n.__print-summary .axm-post-questionnaire-content,\n.__print-summary .__summary {\n display: block !important;\n min-height: 0 !important;\n}\n`;\n}\nexport function minifyPrintHtml(html: string): string {\n return html\n .replace(/<!--[\\s\\S]*?-->/g, '')\n .replace(/<script\\b[^<]*(?:(?!<\\/script>)<[^<]*)*<\\/script>/gi, '')\n .replace(/\\sng-reflect-[a-z0-9-]+=\"[^\"]*\"/gi, '')\n .replace(/\\s_ngcontent-[a-z0-9-]+=\"[^\"]*\"/gi, '')\n .replace(/\\s_nghost-[a-z0-9-]+=\"[^\"]*\"/gi, '')\n .replace(/\\sdata-testid=\"[^\"]*\"/gi, '')\n .replace(/\\sclass=\"\"/g, '')\n .replace(/\\s{2,}/g, ' ')\n .replace(/>\\s+</g, '><')\n .trim();\n}\n\nexport function resolvePrintPlainText(value: unknown): string {\n if (typeof value === 'string') {\n return value.trim();\n }\n if (!value || typeof value !== 'object') {\n return '';\n }\n const record = value as Record<string, unknown>;\n for (const key of ['en-US', 'en', ...Object.keys(record)]) {\n const text = record[key];\n if (typeof text === 'string' && text.trim()) {\n return text.trim();\n }\n }\n return '';\n}\n\nexport function formatPrintAnswerText(value: unknown): string {\n if (value == null || value === '') {\n return '—';\n }\n if (typeof value === 'string') {\n const trimmed = value.replace(/<[^>]*>/g, ' ').replace(/\\s+/g, ' ').trim();\n return trimmed || '—';\n }\n if (typeof value === 'number' || typeof value === 'boolean') {\n return String(value);\n }\n if (value instanceof Date) {\n return value.toISOString();\n }\n if (Array.isArray(value)) {\n const parts = value.map((item) => formatPrintAnswerText(item)).filter((item) => item !== '—');\n return parts.length ? parts.join(', ') : '—';\n }\n if (typeof value === 'object') {\n const record = value as Record<string, unknown>;\n const labeled = record['title'] ?? record['text'] ?? record['label'] ?? record['name'] ?? record['displayName'];\n const resolved = resolvePrintPlainText(labeled);\n if (resolved) {\n return resolved.replace(/<[^>]*>/g, ' ').replace(/\\s+/g, ' ').trim();\n }\n if (record['value'] != null) {\n return formatPrintAnswerText(record['value']);\n }\n try {\n return JSON.stringify(value);\n } catch {\n return '—';\n }\n }\n return String(value);\n}\n\nexport interface QuestionnairePrintQuestionHtml {\n titleHtml: string;\n answerHtml: string;\n number?: string;\n answered?: boolean;\n /** Full cloned `.__question-item` card; used as-is when present. */\n cardHtml?: string;\n}\n\nexport interface QuestionnairePrintBodySection {\n title: string;\n questions: QuestionnairePrintQuestionHtml[];\n}\n\nexport function buildQuestionnaireQuestionCardHtml(input: QuestionnairePrintQuestionHtml): string {\n if (input.cardHtml?.trim()) {\n return input.cardHtml.trim();\n }\n const titleHtml = input.titleHtml.includes('__question-title')\n ? input.titleHtml\n : `<h3 class=\"__question-title\">${input.titleHtml}</h3>`;\n const number = input.number\n ? `<div class=\"__question-header-left\"><span class=\"__question-number\">${escapePrintDocumentText(input.number)}</span></div>`\n : '';\n const itemClass = '__question-item __print-plain';\n return (\n `<div class=\"${itemClass}\">` +\n `<div class=\"__question-header\">${number}` +\n `<div class=\"__question-header-right\"><div class=\"__question-title-block\">${titleHtml}</div></div>` +\n `</div>` +\n `<div class=\"__question-widget\">${input.answerHtml}</div>` +\n `</div>`\n );\n}\n\nexport function buildQuestionnairePrintBodyHtml(input: {\n title: string;\n caseTitle?: string;\n status?: string;\n sections: QuestionnairePrintBodySection[];\n}): string {\n const title = escapePrintDocumentText(input.title || 'Questionnaire');\n const meta = [\n input.caseTitle ? `<div><span>Case</span>${escapePrintDocumentText(input.caseTitle)}</div>` : '',\n input.status ? `<div><span>Status</span>${escapePrintDocumentText(input.status)}</div>` : '',\n ]\n .filter(Boolean)\n .join('');\n const sections = input.sections\n .map((section) => {\n const questions = section.questions.map((question) => buildQuestionnaireQuestionCardHtml(question)).join('');\n return `<section class=\"section\"><h2>${escapePrintDocumentText(section.title)}</h2>${questions}</section>`;\n })\n .join('');\n return `<h1>${title}</h1>${meta ? `<div class=\"meta\">${meta}</div>` : ''}${sections}`;\n}\n\n/** Q&A sections only — title/date live in the questionnaire print child template. */\nexport function buildQuestionnaireSessionBodyHtml(input: {\n sections: QuestionnairePrintBodySection[];\n}): string {\n return input.sections\n .map((section) => {\n const questions = section.questions.map((question) => buildQuestionnaireQuestionCardHtml(question)).join('');\n return `<section class=\"section\"><h2>${escapePrintDocumentText(section.title)}</h2>${questions}</section>`;\n })\n .join('');\n}\n\nexport interface QuestionnairePrintHeaderInput {\n title: string;\n caseTitle?: string;\n sessionDate?: string;\n statusLabel?: string;\n}\n\n/** Compact repeating questionnaire band: title left, date/status right. */\nexport function buildQuestionnairePrintHeaderRegion(input: QuestionnairePrintHeaderInput): string {\n const title = escapePrintDocumentText(input.title.trim() || 'Questionnaire');\n const caseTitle = escapePrintDocumentText((input.caseTitle ?? '').trim());\n const sessionDate = escapePrintDocumentText((input.sessionDate ?? '').trim());\n const statusLabel = escapePrintDocumentText((input.statusLabel ?? '').trim());\n const sub = caseTitle\n ? `<div style=\"font-size:7.5pt;line-height:1.25;color:#64748b;margin-top:1px;\">${caseTitle}</div>`\n : '';\n const right = [sessionDate, statusLabel].filter(Boolean).join(' · ');\n const rightCell = right\n ? `<td style=\"vertical-align:middle;text-align:right;padding:1px 0 2px;white-space:nowrap;font-size:8pt;line-height:1.25;color:#64748b;width:36%;\">${right}</td>`\n : '';\n return (\n `<header data-print-region=\"header\" class=\"__print-page-header\">` +\n `<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" ` +\n `style=\"width:100%;border-collapse:collapse;margin-top:2px;\">` +\n `<tr><td style=\"vertical-align:middle;padding:1px 0 2px;\">` +\n `<div style=\"font-size:10pt;line-height:1.2;font-weight:700;color:#0f172a;\">${title}</div>${sub}` +\n `</td>${rightCell}</tr></table>` +\n `<div style=\"border-bottom:1px solid #cbd5e1;font-size:0;line-height:0;\">&nbsp;</div>` +\n `</header>`\n );\n}\n\n/**\n * Ensures the compact questionnaire header is the last `data-print-region=\"header\"`\n * (under the company letterhead) and removes the old first-page-only title block.\n */\nexport function applyQuestionnairePrintHeader(html: string, input: QuestionnairePrintHeaderInput): string {\n const region = buildQuestionnairePrintHeaderRegion(input);\n let next = html.replace(\n /<div class=\"__print-doc-head\">\\s*<h1\\b[^>]*>[\\s\\S]*?<\\/h1>\\s*<div class=\"__print-doc-meta\">[\\s\\S]*?<\\/div>\\s*<\\/div>/i,\n '',\n );\n const headerRe = /<header\\b[^>]*data-print-region=[\"']header[\"'][^>]*>[\\s\\S]*?<\\/header>/gi;\n const headers = next.match(headerRe) ?? [];\n if (headers.length >= 2) {\n let index = 0;\n return next.replace(headerRe, (block) => {\n index += 1;\n return index === headers.length ? region : block;\n });\n }\n if (headers.length === 1) {\n return next.replace(headerRe, (block) => `${block}${region}`);\n }\n return `${region}${next}`;\n}\n\n/** Inner body of a wrapped print document, without watermark. */\nexport function extractPrintDocumentBodyHtml(html: string): string {\n const trimmed = html.trim();\n const bodyMatch = trimmed.match(/<body[^>]*>([\\s\\S]*)<\\/body>/i);\n const inner = (bodyMatch?.[1] ?? trimmed).trim();\n return inner.replace(/<div class=\"__print-watermark\"[^>]*>[\\s\\S]*?<\\/div>/gi, '').trim();\n}\n\nexport function wrapPrintDocument(input: {\n title: string;\n bodyHtml: string;\n headerHtml?: string;\n footerHtml?: string;\n print?: Partial<QuestionnairePrintSettings> | null;\n}): { html: string; headerHtml: string; footerHtml: string } {\n const title = escapePrintDocumentText(input.title || 'Questionnaire');\n const print = resolvePrintSettings(input.print);\n const watermark = print.watermark\n ? `<div class=\"__print-watermark\" aria-hidden=\"true\">${escapePrintDocumentText(print.watermark)}</div>`\n : '';\n const html =\n `<!doctype html><html><head><meta charset=\"utf-8\"/>` +\n `<title>${title}</title>` +\n `<style>${buildPrintDocumentCss(print)}</style></head><body>` +\n `${watermark}${input.bodyHtml}` +\n `</body></html>`;\n return {\n html,\n headerHtml:\n input.headerHtml !== undefined\n ? input.headerHtml\n : `<span style=\"font-weight:700;\">${title}</span>`,\n footerHtml:\n input.footerHtml !== undefined\n ? input.footerHtml\n : '<span style=\"font-size:8pt;color:#94a3b8;font-family:Arial,Helvetica,sans-serif;\"><span class=\"pageNumber\"></span> / <span class=\"totalPages\"></span></span>',\n };\n}\n\nexport function escapePrintDocumentText(value: string): string {\n return value\n .replace(/&/g, '&amp;')\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;')\n .replace(/\"/g, '&quot;')\n .replace(/'/g, '&#39;');\n}\n\n//#endregion\n","import { AXPEntityReference } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n//#region ---- Types ----\nexport type AXMAssessmentCaseStatus =\n | 'draft'\n | 'active'\n | 'in-progress'\n | 'closed'\n | 'cancelled';\n\nexport interface AXMAssessmentManagementAssessmentCaseEntityModel extends AXPEntityModel<string> {\n\n /**\n * Single questionnaire assigned to this case.\n */\n questionnaireId: string;\n\n /**\n * Optional friendly title for lists/search.\n */\n title: string;\n\n /**\n * Target entity (e.g. AssetManagement.Asset, HumanCapital.Employee).\n */\n subjectRef: AXPEntityReference;\n\n /** Status plugin field (`assessment-management.status.case`). */\n statusId?: AXMAssessmentCaseStatus;\n}\n\n//#endregion\n\n","import { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n//#region ---- Types ----\nexport type AXMAssessmentSessionRole = 'responder' | 'supervisor' | 'reviewer';\n\nexport type AXMAssessmentSessionStatus = 'not-started' | 'in-progress' | 'submitted' | 'under-review' | 'approved' | 'rejected' | 'completed';\n\nexport interface AXMAssessmentManagementAssessmentSessionEntityModel extends AXPEntityModel<string> {\n caseId: string;\n\n // Responder\n responderId: string;\n role: AXMAssessmentSessionRole;\n\n /** Status plugin field (`assessment-management.status.session`). */\n statusId?: AXMAssessmentSessionStatus;\n\n // Time tracking\n startedAt?: Date;\n lastSavedAt?: Date;\n timeSpent?: number; // Total seconds\n\n // Progress\n progressPercentage: number;\n answeredQuestionsCount: number;\n\n // Answers\n answers: Record<string, unknown>;\n\n /**\n * Evaluated questionnaire outcome values (rule `name` → value), snapshot at submit.\n */\n outcomes?: Record<string, unknown>;\n\n /**\n * Gzip+base64 print HTML captured on the client after submit.\n * Server gunzips this and sends it to the HTML-to-PDF engine.\n */\n printHtmlGzip?: string;\n\n // Override chain\n previousId?: string;\n}\n\n//#endregion\n\n","import { AXPMultiLanguageString, AXPWidgetNode } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\nimport type {\n AXMAssessmentQuestionCommentConfig,\n AXMAssessmentQuestionHintConfig,\n} from '../../question-bank-item.contracts';\n//#region ---- QuestionBankItem Model ----\n\n/** Provenance when `interface` was loaded from a meta-data definition (frozen clone). */\nexport interface AXMQuestionBankItemInterfaceMetadata {\n id: string;\n name: string;\n title: AXPMultiLanguageString | string;\n /**\n * TODO: Set from definition versioning when the versioning system is implemented (placeholder until then).\n */\n version: number;\n}\n\nexport type AXMQuestionBankItemInterfaceValue = AXPWidgetNode & {\n metadata?: AXMQuestionBankItemInterfaceMetadata;\n};\n\nexport interface AXMAssessmentManagementQuestionBankItemEntityModel extends AXPEntityModel<string> {\n /**\n * Short label for the question bank list (administrators).\n * Not used as the respondent-facing question text; see `question`.\n */\n title: AXPMultiLanguageString;\n /** Unique variable name for questionnaire outcomes (answer.eval('name')). */\n name?: string;\n /** Respondent-facing question body (rich text). */\n question?: AXPMultiLanguageString;\n /** Optional note (rich text); formerly description. */\n note?: AXPMultiLanguageString;\n categoryId?: string;\n /** Registered catalog scope keys (see platform catalog scope providers). */\n catalogScopeKeys?: string[];\n\n /** Resolved scope labels for list display (enriched by catalog-scope resolver middleware). */\n catalogScopes?: Array<{ name: string; title: string; cssClass?: string }>;\n tags?: string[];\n\n // Question Properties\n difficulty?: 'easy' | 'medium' | 'hard';\n estimatedTime?: number; // seconds\n\n /** Default hint (rich text + style, or off). Overridable per questionnaire item. */\n hint?: AXMAssessmentQuestionHintConfig;\n\n /** Default respondent comment box policy (overridable per questionnaire item). */\n comment?: AXMAssessmentQuestionCommentConfig;\n\n // User Interface — widget node plus optional provenance when cloned from a meta-data definition (frozen snapshot).\n interface?: AXMQuestionBankItemInterfaceValue;\n}\n\n//#endregion\n\n","\n//#region ---- Question comment value object ----\n\nimport type { AXPExpression } from '@acorex-platform/framework-shared/core';\nimport type { AXMAssessmentQuestionCommentConfig } from '../../question-bank-item.contracts';\n\n/**\n * Default when no configuration is stored.\n */\nexport const DEFAULT_QUESTION_COMMENT_CONFIG: AXMAssessmentQuestionCommentConfig = {\n enabled: false,\n required: false,\n};\n\n/**\n * Normalizes `enabled` / `isVisible`-style flags: booleans, legacy string booleans, or expression strings.\n */\nfunction normalizeCommentFlag(\n value: boolean | AXPExpression | null | undefined,\n emptyAs: false | undefined,\n): boolean | AXPExpression | undefined {\n if (value === undefined || value === null) {\n return emptyAs;\n }\n if (value === true || value === false) {\n return value;\n }\n if (typeof value === 'string') {\n const trimmed = value.trim();\n if (!trimmed) {\n return emptyAs;\n }\n const lower = trimmed.toLowerCase();\n if (lower === 'true' || lower === '1') {\n return true;\n }\n if (lower === 'false' || lower === '0') {\n return false;\n }\n return trimmed;\n }\n return value;\n}\n\n/**\n * Normalizes API / partial values to a complete config.\n * Preserves expression strings on `enabled` (Allow Comments toggle binding).\n */\nexport function normalizeQuestionCommentConfig(\n value: Partial<AXMAssessmentQuestionCommentConfig> | null | undefined,\n): AXMAssessmentQuestionCommentConfig {\n const enabled = normalizeCommentFlag(value?.enabled, false);\n const isVisible = normalizeCommentFlag(value?.isVisible, undefined);\n return {\n enabled: enabled === undefined ? false : enabled,\n required: value?.required === true,\n ...(isVisible !== undefined ? { isVisible } : {}),\n };\n}\n\n/**\n * Merges question bank defaults with optional questionnaire item overrides.\n */\nexport function mergeQuestionCommentConfig(\n bank: Partial<AXMAssessmentQuestionCommentConfig> | null | undefined,\n override: Partial<AXMAssessmentQuestionCommentConfig> | null | undefined,\n): AXMAssessmentQuestionCommentConfig {\n const b = normalizeQuestionCommentConfig(bank);\n if (!override) {\n return b;\n }\n const overrideEnabled =\n override.enabled !== undefined ? normalizeCommentFlag(override.enabled, false) : undefined;\n const overrideVis = normalizeCommentFlag(override.isVisible, undefined);\n return {\n enabled: overrideEnabled !== undefined ? overrideEnabled : b.enabled,\n required: override.required !== undefined ? override.required === true : b.required,\n ...(overrideVis !== undefined\n ? { isVisible: overrideVis }\n : b.isVisible !== undefined\n ? { isVisible: b.isVisible }\n : {}),\n };\n}\n\n/**\n * Returns only fields that differ from the bank default (for persisting questionnaire item overrides).\n */\nexport function diffQuestionCommentOverride(\n bank: AXMAssessmentQuestionCommentConfig,\n edited: AXMAssessmentQuestionCommentConfig,\n): Partial<AXMAssessmentQuestionCommentConfig> | undefined {\n const diff: Partial<AXMAssessmentQuestionCommentConfig> = {};\n if (edited.enabled !== bank.enabled) {\n diff.enabled = edited.enabled;\n }\n if (edited.required !== bank.required) {\n diff.required = edited.required;\n }\n if (edited.isVisible !== bank.isVisible) {\n diff.isVisible = edited.isVisible;\n }\n return Object.keys(diff).length > 0 ? diff : undefined;\n}\n\n/**\n * Form context for the question edit dialog: surface legacy `isVisible` expressions on `enabled`\n * (Allow Comments) so they display and save like question `isVisible`.\n */\nexport function commentConfigForEditForm(\n merged: AXMAssessmentQuestionCommentConfig,\n): Pick<AXMAssessmentQuestionCommentConfig, 'enabled' | 'required'> {\n const legacyVis = merged.isVisible;\n if (merged.enabled === true && typeof legacyVis === 'string' && legacyVis.trim()) {\n return {\n enabled: legacyVis.trim(),\n required: merged.required,\n };\n }\n return {\n enabled: merged.enabled,\n required: merged.required,\n };\n}\n\n/**\n * Effective visibility flag for the comment box (for async evaluation).\n * Prefers expression/`false` on `enabled`; falls back to legacy `isVisible` when `enabled === true`.\n */\nexport function getQuestionCommentVisibilityFlag(\n comment: AXMAssessmentQuestionCommentConfig | null | undefined,\n): boolean | AXPExpression | undefined {\n if (!comment) {\n return false;\n }\n const { enabled, isVisible } = comment;\n if (enabled === false) {\n return false;\n }\n if (typeof enabled === 'string') {\n return enabled;\n }\n // enabled === true — optional legacy gate\n return isVisible;\n}\n\n/**\n * Context path for the respondent comment text for a questionnaire item (`answers.comments.<itemName>`).\n */\nexport function getQuestionAnswerCommentStoragePath(questionItemName: string): string {\n return `answers.comments.${questionItemName}`;\n}\n\n//#endregion\n","import type { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\n\nimport type {\n AXMAssessmentQuestionHintConfig,\n AXMAssessmentQuestionHintConfigOff,\n AXMAssessmentQuestionHintConfigShown,\n AXMAssessmentQuestionHintMode,\n AXMAssessmentQuestionHintPartial,\n AXMAssessmentQuestionHintVisualMode,\n} from '../../question-bank-item.contracts';\n\n//#region ---- Question hint value object ----\n\nexport const DEFAULT_QUESTION_HINT_CONFIG: AXMAssessmentQuestionHintConfig = { mode: 'off' };\n\nconst VISUAL_MODES: readonly AXMAssessmentQuestionHintVisualMode[] = [\n 'info',\n 'warning',\n 'danger',\n 'success',\n 'neutral',\n];\n\nfunction isEmptyHintContent(c: AXPMultiLanguageString | undefined): boolean {\n if (c == null) {\n return true;\n }\n if (typeof c === 'string') {\n return c.trim().length === 0;\n }\n if (typeof c === 'object') {\n return Object.values(c as Record<string, unknown>).every(\n (v) => typeof v !== 'string' || v.trim().length === 0,\n );\n }\n return true;\n}\n\n/** Normalizes select / API values to a hint mode (exported for questionnaire builder forms). */\nexport function normalizeQuestionHintMode(raw: unknown): AXMAssessmentQuestionHintMode | undefined {\n if (raw == null) {\n return undefined;\n }\n if (typeof raw === 'string') {\n if (raw === 'off') {\n return 'off';\n }\n if (VISUAL_MODES.includes(raw as AXMAssessmentQuestionHintVisualMode)) {\n return raw as AXMAssessmentQuestionHintVisualMode;\n }\n return undefined;\n }\n if (typeof raw === 'object' && raw !== null && 'id' in raw) {\n const id = (raw as { id: unknown }).id;\n return normalizeQuestionHintMode(id);\n }\n return undefined;\n}\n\n/**\n * Reads optional `hint` or legacy flat `hintContent` / `hintMode` from a record (API / persisted rows).\n */\nexport function readHintFieldsFromRecord(rec: Record<string, unknown> | null | undefined): {\n hint?: unknown;\n legacyContent?: unknown;\n legacyMode?: unknown;\n} {\n if (!rec) {\n return {};\n }\n const hint = rec['hint'] ?? rec['Hint'];\n const legacyContent = rec['hintContent'] ?? rec['hint_content'];\n const legacyMode = rec['hintMode'] ?? rec['hint_mode'];\n return { hint, legacyContent, legacyMode };\n}\n\n/**\n * Normalizes API / partial values to a complete config. Coerces legacy flat fields when `hint` is absent.\n */\nexport function normalizeQuestionHintConfig(\n value: AXMAssessmentQuestionHintConfig | AXMAssessmentQuestionHintPartial | null | undefined,\n legacy?: { hintContent?: AXPMultiLanguageString; hintMode?: unknown },\n): AXMAssessmentQuestionHintConfig {\n let mode = normalizeQuestionHintMode(\n value && typeof value === 'object' && 'mode' in value ? (value as { mode?: unknown }).mode : undefined,\n );\n let content =\n value && typeof value === 'object' && 'content' in value\n ? ((value as { content?: AXPMultiLanguageString }).content as AXPMultiLanguageString | undefined)\n : undefined;\n\n const hintObj = value && typeof value === 'object' && ('mode' in value || 'content' in value) ? value : null;\n const noStructuredHint = !hintObj || (mode === undefined && content === undefined);\n\n if (noStructuredHint && legacy) {\n const lm = normalizeQuestionHintMode(legacy.hintMode);\n const lc = legacy.hintContent;\n if (lm !== undefined) {\n mode = lm;\n }\n if (lc !== undefined) {\n content = lc;\n }\n }\n\n if (mode === 'off' || mode === undefined) {\n if (mode === undefined && content != null && !isEmptyHintContent(content)) {\n const fallbackMode: AXMAssessmentQuestionHintVisualMode = 'info';\n return { mode: fallbackMode, content: content as AXPMultiLanguageString };\n }\n return { mode: 'off' };\n }\n\n if (isEmptyHintContent(content)) {\n return { mode: 'off' };\n }\n\n return { mode, content: content as AXPMultiLanguageString };\n}\n\n/**\n * Merges question bank defaults with optional questionnaire item overrides (per-field, like former hintContent/hintMode).\n */\nexport function mergeQuestionHintForViewer(\n bank: AXMAssessmentQuestionHintConfig | null | undefined,\n item: AXMAssessmentQuestionHintPartial | null | undefined,\n): AXMAssessmentQuestionHintConfig {\n const b = normalizeQuestionHintConfig(bank);\n if (!item || (item.mode === undefined && item.content === undefined)) {\n return b;\n }\n\n if (item.mode !== undefined) {\n const mode = normalizeQuestionHintMode(item.mode) ?? 'off';\n if (mode === 'off') {\n return { mode: 'off' };\n }\n const content =\n item.content !== undefined\n ? item.content\n : b.mode !== 'off'\n ? b.content\n : undefined;\n return normalizeQuestionHintConfig({ mode, content });\n }\n\n const mode: AXMAssessmentQuestionHintMode = b.mode !== 'off' ? b.mode : 'info';\n return normalizeQuestionHintConfig({ mode, content: item.content });\n}\n\n/**\n * Returns only fields that differ from the bank default (for persisting questionnaire item overrides).\n */\nexport function diffQuestionHintOverride(\n bank: AXMAssessmentQuestionHintConfig,\n edited: AXMAssessmentQuestionHintConfig,\n): AXMAssessmentQuestionHintPartial | undefined {\n if (edited.mode === 'off' && bank.mode === 'off') {\n return undefined;\n }\n if (edited.mode === 'off' && bank.mode !== 'off') {\n return { mode: 'off' };\n }\n if (bank.mode === 'off' && edited.mode !== 'off') {\n return { mode: edited.mode, content: edited.content };\n }\n const diff: AXMAssessmentQuestionHintPartial = {};\n if (edited.mode !== bank.mode) {\n diff.mode = edited.mode;\n }\n if (edited.mode !== 'off') {\n const bc = bank.mode !== 'off' ? bank.content : undefined;\n const ec = edited.content;\n if (JSON.stringify(ec ?? null) !== JSON.stringify(bc ?? null)) {\n diff.content = ec;\n }\n }\n return Object.keys(diff).length > 0 ? diff : undefined;\n}\n\n/**\n * Normalizes a question bank row (or similar) to a full hint config, including legacy flat fields.\n */\nexport function normalizeQuestionHintFromEntityRow(row: unknown): AXMAssessmentQuestionHintConfig {\n const fr = readHintFieldsFromRecord(row as Record<string, unknown> | null | undefined);\n return normalizeQuestionHintConfig(\n fr.hint as AXMAssessmentQuestionHintConfig | AXMAssessmentQuestionHintPartial | null | undefined,\n {\n hintContent: fr.legacyContent as AXPMultiLanguageString | undefined,\n hintMode: fr.legacyMode,\n },\n );\n}\n\n/**\n * Reads optional questionnaire item hint override from a persisted item record (including legacy keys).\n */\nexport function parseQuestionHintPartialFromRecord(\n row: Record<string, unknown> | null | undefined,\n): AXMAssessmentQuestionHintPartial | undefined {\n if (!row) {\n return undefined;\n }\n const fr = readHintFieldsFromRecord(row);\n if (fr.hint != null && typeof fr.hint === 'object' && !Array.isArray(fr.hint)) {\n const h = fr.hint as AXMAssessmentQuestionHintPartial;\n if (h.mode !== undefined || h.content !== undefined) {\n const out: AXMAssessmentQuestionHintPartial = {};\n if (h.mode !== undefined) {\n const m = normalizeQuestionHintMode(h.mode);\n if (m !== undefined) {\n out.mode = m;\n }\n }\n if (h.content !== undefined) {\n out.content = h.content;\n }\n return Object.keys(out).length > 0 ? out : undefined;\n }\n }\n if (fr.legacyContent == null && fr.legacyMode == null) {\n return undefined;\n }\n const out: AXMAssessmentQuestionHintPartial = {};\n if (fr.legacyMode !== undefined) {\n const m = normalizeQuestionHintMode(fr.legacyMode);\n if (m !== undefined) {\n out.mode = m;\n }\n }\n if (fr.legacyContent !== undefined) {\n out.content = fr.legacyContent as AXPMultiLanguageString;\n }\n return Object.keys(out).length > 0 ? out : undefined;\n}\n\n//#endregion\n","import { resolveToSurfaceClass, type AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\n\n/**\n * Shared pre/post content and outcome rules for questionnaires and form templates.\n */\n\n/**\n * Pre- / post-questionnaire rich text (welcome, summary, etc.).\n * @alias AXPMultiLanguageString\n */\nexport type PrePostContentValue = AXPMultiLanguageString;\n\n/**\n * Pre-questionnaire configuration (shown before questions).\n */\nexport interface PreQuestionnaireConfig {\n enabled: boolean;\n /** Rich text content. Supports multi-language: Record<locale, string>. */\n content?: PrePostContentValue;\n}\n\n/**\n * Post-questionnaire configuration (review before submit, summary after submit).\n * Summary content supports placeholders: {{totalQuestions}}, {{answeredCount}}, {{totalTime}}, {{elapsedSeconds}}, and {{outcomeName}} from configured outcomes.\n */\nexport interface PostQuestionnaireConfig {\n /** Show review step before submit (all answers, edit/submit). */\n reviewEnabled: boolean;\n /** Show summary screen after submit. */\n summaryEnabled: boolean;\n /** When true, show a separate step with outcome results (name/value list). */\n showOutcomeResults?: boolean;\n /** Rich text content for summary. Supports multi-language and placeholders. */\n summaryContent?: PrePostContentValue;\n}\n\nexport const DEFAULT_PRE_QUESTIONNAIRE_CONFIG: PreQuestionnaireConfig = { enabled: false };\n\nexport const DEFAULT_POST_QUESTIONNAIRE_CONFIG: PostQuestionnaireConfig = {\n reviewEnabled: false,\n summaryEnabled: false,\n showOutcomeResults: false,\n};\n\n/**\n * Pre/post configuration for viewer flow (from {@link toPrePostConfig}).\n */\nexport interface PrePostConfig {\n pre: PreQuestionnaireConfig;\n post: PostQuestionnaireConfig;\n}\n\n/** Primitive type of an evaluated outcome value (coercion after expression runs). */\nexport type QuestionnaireOutcomeResultKind = 'number' | 'string' | 'boolean';\n\n/** Text emphasis for outcome result display rules. */\nexport type QuestionnaireOutcomeDisplayEmphasis = 'normal' | 'medium' | 'bold';\n\n/** Comparison operator for display rule conditions against the evaluated outcome `value`. */\nexport type QuestionnaireOutcomeDisplayOperator = 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte';\n\n/**\n * Theme color chooser value: a surface class such as `warning-lightest-surface`,\n * or three hex tokens `\"#foreground #background #border\"`.\n */\nexport type QuestionnaireOutcomeDisplayColor = string;\n\n/** Icon chooser value or resolved Font Awesome class string. */\nexport type QuestionnaireOutcomeDisplayIcon =\n | string\n | {\n label?: string;\n styleClass?: string;\n iconClass?: string;\n };\n\n/**\n * Conditional styling for an outcome value in the results step.\n * Rules are evaluated in order; the first matching condition wins.\n */\nexport interface QuestionnaireOutcomeDisplayRule {\n id: string;\n order: number;\n operator: QuestionnaireOutcomeDisplayOperator;\n compareValue: number | string | boolean;\n /** Theme color chooser value applied to the outcome value in results. */\n color: QuestionnaireOutcomeDisplayColor;\n emphasis?: QuestionnaireOutcomeDisplayEmphasis;\n icon?: QuestionnaireOutcomeDisplayIcon;\n}\n\nconst OUTCOME_DISPLAY_OPERATORS: QuestionnaireOutcomeDisplayOperator[] = [\n 'eq',\n 'neq',\n 'gt',\n 'gte',\n 'lt',\n 'lte',\n];\n\nconst OUTCOME_DISPLAY_EMPHASIS: QuestionnaireOutcomeDisplayEmphasis[] = ['normal', 'medium', 'bold'];\n\nfunction normalizeOutcomeDisplayColor(value: unknown): string | undefined {\n if (typeof value !== 'string') {\n return undefined;\n }\n const trimmed = value.trim();\n if (!trimmed) {\n return undefined;\n }\n const surfaceClass = resolveToSurfaceClass(trimmed);\n if (surfaceClass) {\n return surfaceClass;\n }\n const parts = trimmed.split(/\\s+/);\n if (parts.length === 3 && parts.every((part) => part.startsWith('#'))) {\n return parts.join(' ');\n }\n return undefined;\n}\n\nfunction normalizeOutcomeDisplayOperator(value: unknown): QuestionnaireOutcomeDisplayOperator | undefined {\n const raw =\n typeof value === 'string'\n ? value\n : typeof value === 'object' && value !== null && 'id' in value\n ? String((value as { id?: unknown }).id ?? '')\n : '';\n const normalized = raw.trim().toLowerCase();\n return OUTCOME_DISPLAY_OPERATORS.includes(normalized as QuestionnaireOutcomeDisplayOperator)\n ? (normalized as QuestionnaireOutcomeDisplayOperator)\n : undefined;\n}\n\nfunction normalizeOutcomeDisplayCompareValue(value: unknown): number | string | boolean | undefined {\n if (typeof value === 'number' && Number.isFinite(value)) {\n return value;\n }\n if (typeof value === 'boolean') {\n return value;\n }\n if (typeof value === 'string') {\n const trimmed = value.trim();\n if (!trimmed) {\n return undefined;\n }\n if (trimmed === 'true') return true;\n if (trimmed === 'false') return false;\n const asNumber = Number(trimmed);\n if (Number.isFinite(asNumber)) {\n return asNumber;\n }\n return trimmed;\n }\n return undefined;\n}\n\nfunction normalizeOutcomeDisplayEmphasis(value: unknown): QuestionnaireOutcomeDisplayEmphasis {\n const raw =\n typeof value === 'string'\n ? value\n : typeof value === 'object' && value !== null && 'id' in value\n ? String((value as { id?: unknown }).id ?? '')\n : '';\n const normalized = raw.trim().toLowerCase();\n return OUTCOME_DISPLAY_EMPHASIS.includes(normalized as QuestionnaireOutcomeDisplayEmphasis)\n ? (normalized as QuestionnaireOutcomeDisplayEmphasis)\n : 'normal';\n}\n\nfunction normalizeOutcomeDisplayIcon(\n icon: QuestionnaireOutcomeDisplayIcon | null | undefined,\n): string | undefined {\n if (icon == null || icon === '') {\n return undefined;\n }\n if (typeof icon === 'string') {\n const trimmed = icon.trim();\n return trimmed.length > 0 ? trimmed : undefined;\n }\n const styleClass = String(icon.styleClass ?? '').trim();\n const iconClass = String(icon.iconClass ?? '').trim();\n const combined = [styleClass, iconClass].filter(Boolean).join(' ');\n return combined.length > 0 ? combined : undefined;\n}\n\n/** Parses a theme color chooser value into foreground, background, and border parts. */\nexport function parseQuestionnaireOutcomeDisplayColor(\n value: string | null | undefined,\n): { foreground: string; background: string; border: string } | null {\n if (!value?.trim()) {\n return null;\n }\n const parts = value.trim().split(/\\s+/);\n if (parts.length !== 3) {\n return null;\n }\n return {\n foreground: parts[0],\n background: parts[1],\n border: parts[2],\n };\n}\n\nexport function isQuestionnaireOutcomeDisplayColorHex(value: string): boolean {\n return value.trim().startsWith('#');\n}\n\n/**\n * Returns true when the evaluated outcome value matches the display rule condition.\n */\nexport function matchesQuestionnaireOutcomeDisplayRule(\n value: unknown,\n rule: Pick<QuestionnaireOutcomeDisplayRule, 'operator' | 'compareValue'>,\n): boolean {\n const right = rule.compareValue;\n switch (rule.operator) {\n case 'eq':\n return value == right;\n case 'neq':\n return value != right;\n case 'gt':\n return Number(value) > Number(right);\n case 'gte':\n return Number(value) >= Number(right);\n case 'lt':\n return Number(value) < Number(right);\n case 'lte':\n return Number(value) <= Number(right);\n default:\n return false;\n }\n}\n\nexport function normalizeQuestionnaireOutcomeDisplayRules(\n rules: QuestionnaireOutcomeDisplayRule[] | null | undefined,\n): QuestionnaireOutcomeDisplayRule[] {\n if (!Array.isArray(rules)) {\n return [];\n }\n const normalized: QuestionnaireOutcomeDisplayRule[] = [];\n for (const [index, rule] of rules.entries()) {\n const operator = normalizeOutcomeDisplayOperator(rule?.operator);\n const compareValue = normalizeOutcomeDisplayCompareValue(rule?.compareValue);\n const color = normalizeOutcomeDisplayColor(rule?.color);\n if (!operator || compareValue === undefined || !color) {\n continue;\n }\n normalized.push({\n id: String(rule?.id ?? '').trim() || `rule-${index + 1}`,\n order: rule?.order ?? index,\n operator,\n compareValue,\n color,\n emphasis: normalizeOutcomeDisplayEmphasis(rule?.emphasis),\n icon: normalizeOutcomeDisplayIcon(rule?.icon),\n });\n }\n return normalized.sort((a, b) => a.order - b.order);\n}\n\n/**\n * Named outcome rule embedded on a questionnaire.\n * Referenced in expressions via outcome.eval('name') and in summary placeholders as {{name}}.\n */\nexport interface QuestionnaireOutcomeItem {\n id: string;\n /** Unique programmatic name within the questionnaire (variable-name style). */\n name: string;\n title?: AXPMultiLanguageString;\n description?: AXPMultiLanguageString;\n resultKind: QuestionnaireOutcomeResultKind;\n /**\n * Use `{{ ... }}` or plain expression body; scope includes `answer.eval`, `outcome.eval`, and `fn.*`.\n */\n expression: string;\n /** Optional ordered display rules applied to the evaluated value in the results step. */\n displayRules?: QuestionnaireOutcomeDisplayRule[];\n}\n\n/** Section grouping outcome rules (same builder pattern as questionnaire questions). */\nexport interface QuestionnaireOutcomeSection {\n /** Unique technical section name. */\n name: string;\n title?: AXPMultiLanguageString;\n description?: AXPMultiLanguageString;\n order: number;\n items: QuestionnaireOutcomeItem[];\n isNewlyAdded?: boolean;\n}\n\n/** Embedded outcome rules on questionnaire. */\nexport interface QuestionnaireOutcomesValue {\n sections: QuestionnaireOutcomeSection[];\n}\n\nexport const DEFAULT_QUESTIONNAIRE_OUTCOMES: QuestionnaireOutcomesValue = { sections: [] };\n\nexport function normalizeQuestionnaireOutcomesValue(\n value: QuestionnaireOutcomesValue | null | undefined,\n): QuestionnaireOutcomesValue {\n const sections = value?.sections;\n if (!Array.isArray(sections)) {\n return { sections: [] };\n }\n return {\n sections: sections.map((section, index) => ({\n ...section,\n name: (section.name ?? '').trim() || `section-${index + 1}`,\n order: section.order ?? index,\n items: Array.isArray(section.items)\n ? section.items.map((item) => ({\n ...item,\n displayRules: normalizeQuestionnaireOutcomeDisplayRules(item.displayRules),\n }))\n : [],\n })),\n };\n}\n\n/** All outcome items across sections (evaluation, automations, duplicate checks). */\nexport function flattenQuestionnaireOutcomeItems(\n value: QuestionnaireOutcomesValue | null | undefined,\n): QuestionnaireOutcomeItem[] {\n return normalizeQuestionnaireOutcomesValue(value).sections.flatMap((section) => section.items);\n}\n\nexport function findDuplicateOutcomeNames(\n value: QuestionnaireOutcomesValue | null | undefined,\n): string[] {\n const seen = new Map<string, number>();\n for (const item of flattenQuestionnaireOutcomeItems(value)) {\n const key = (item.name ?? '').trim();\n if (!key) continue;\n seen.set(key, (seen.get(key) ?? 0) + 1);\n }\n return Array.from(seen.entries())\n .filter(([, count]) => count > 1)\n .map(([name]) => name);\n}\n\n/** Neutral aliases — questionnaires and form templates store the same outcome document. */\nexport type AssessmentOutcomeResultKind = QuestionnaireOutcomeResultKind;\nexport type AssessmentOutcomeDisplayEmphasis = QuestionnaireOutcomeDisplayEmphasis;\nexport type AssessmentOutcomeDisplayOperator = QuestionnaireOutcomeDisplayOperator;\nexport type AssessmentOutcomeDisplayColor = QuestionnaireOutcomeDisplayColor;\nexport type AssessmentOutcomeDisplayIcon = QuestionnaireOutcomeDisplayIcon;\nexport type AssessmentOutcomeDisplayRule = QuestionnaireOutcomeDisplayRule;\nexport type AssessmentOutcomeItem = QuestionnaireOutcomeItem;\nexport type AssessmentOutcomeSection = QuestionnaireOutcomeSection;\nexport type AssessmentOutcomesValue = QuestionnaireOutcomesValue;\nexport type AssessmentPreContent = PreQuestionnaireConfig;\nexport type AssessmentPostContent = PostQuestionnaireConfig;\n","import { AXPFileListItem, AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n//#region ---- Imports ----\nimport type {\n QuestionnaireBuilderValue,\n QuestionnaireDisplaySettings,\n} from '../../questionnaire-builder.types';\nimport {\n DEFAULT_QUESTIONNAIRE_PRINT_SETTINGS,\n resolvePrintSettings,\n type QuestionnairePrintSettings,\n} from '../../questionnaire-print.types';\n//#endregion\n\n//#region ---- Questionnaire Model ----\n\nimport {\n DEFAULT_POST_QUESTIONNAIRE_CONFIG,\n DEFAULT_PRE_QUESTIONNAIRE_CONFIG,\n DEFAULT_QUESTIONNAIRE_OUTCOMES,\n findDuplicateOutcomeNames,\n flattenQuestionnaireOutcomeItems,\n isQuestionnaireOutcomeDisplayColorHex,\n matchesQuestionnaireOutcomeDisplayRule,\n normalizeQuestionnaireOutcomeDisplayRules,\n normalizeQuestionnaireOutcomesValue,\n parseQuestionnaireOutcomeDisplayColor,\n type AssessmentOutcomeItem,\n type AssessmentOutcomesValue,\n type AssessmentPostContent,\n type AssessmentPreContent,\n type PostQuestionnaireConfig,\n type PrePostConfig,\n type PrePostContentValue,\n type PreQuestionnaireConfig,\n type QuestionnaireOutcomeDisplayColor,\n type QuestionnaireOutcomeDisplayEmphasis,\n type QuestionnaireOutcomeDisplayIcon,\n type QuestionnaireOutcomeDisplayOperator,\n type QuestionnaireOutcomeDisplayRule,\n type QuestionnaireOutcomeItem,\n type QuestionnaireOutcomeResultKind,\n type QuestionnaireOutcomeSection,\n type QuestionnaireOutcomesValue,\n} from '../../assessment-outcome.types';\n\nexport {\n DEFAULT_POST_QUESTIONNAIRE_CONFIG,\n DEFAULT_PRE_QUESTIONNAIRE_CONFIG,\n DEFAULT_QUESTIONNAIRE_OUTCOMES,\n findDuplicateOutcomeNames,\n flattenQuestionnaireOutcomeItems,\n isQuestionnaireOutcomeDisplayColorHex,\n matchesQuestionnaireOutcomeDisplayRule,\n normalizeQuestionnaireOutcomeDisplayRules,\n normalizeQuestionnaireOutcomesValue,\n parseQuestionnaireOutcomeDisplayColor,\n};\nexport type {\n AssessmentOutcomeItem,\n AssessmentOutcomesValue,\n AssessmentPostContent,\n AssessmentPreContent,\n PostQuestionnaireConfig,\n PrePostConfig,\n PrePostContentValue,\n PreQuestionnaireConfig,\n QuestionnaireOutcomeDisplayColor,\n QuestionnaireOutcomeDisplayEmphasis,\n QuestionnaireOutcomeDisplayIcon,\n QuestionnaireOutcomeDisplayOperator,\n QuestionnaireOutcomeDisplayRule,\n QuestionnaireOutcomeItem,\n QuestionnaireOutcomeResultKind,\n QuestionnaireOutcomeSection,\n QuestionnaireOutcomesValue,\n};\n\n/**\n * Entity-level display options (viewer / builder preview). Subset of {@link QuestionnaireDisplaySettings}.\n */\nexport type QuestionnaireEntityDisplaySettings = Pick<\n QuestionnaireDisplaySettings,\n 'viewMode' | 'showProgressBar' | 'showTimer' | 'showQuestionNumbers' | 'validationStrategy' | 'completionMode'\n>;\n\nexport const DEFAULT_QUESTIONNAIRE_ENTITY_DISPLAY: QuestionnaireEntityDisplaySettings = {\n viewMode: 'single-page',\n showProgressBar: true,\n showTimer: false,\n showQuestionNumbers: true,\n validationStrategy: 'step',\n completionMode: 'submit-only',\n};\n\n/** Entity-level print document defaults. */\nexport type QuestionnaireEntityPrintSettings = QuestionnairePrintSettings;\n\nexport const DEFAULT_QUESTIONNAIRE_ENTITY_PRINT: Required<QuestionnaireEntityPrintSettings> =\n DEFAULT_QUESTIONNAIRE_PRINT_SETTINGS;\n\nexport interface AXMAssessmentManagementQuestionnaireEntityModel extends AXPEntityModel<string> {\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString;\n type: 'questionnaire' | 'survey' | 'checklist' | 'test' | 'evaluation';\n\n questions?: QuestionnaireBuilderValue;\n\n /** Named outcome rules evaluated from answers (outcome.eval / summary placeholders). */\n outcomes?: QuestionnaireOutcomesValue;\n\n /** Viewer / preview display. */\n display?: QuestionnaireEntityDisplaySettings;\n\n /** Print document defaults (overridable per print call). */\n print?: QuestionnaireEntityPrintSettings;\n\n /**\n * Content text template used for PDF chrome (child of the tenant print master).\n * Empty uses the seeded Questionnaire Print template.\n */\n printTemplateId?: string | null;\n\n /** Welcome screen before questions. */\n pre?: PreQuestionnaireConfig;\n\n /** Review before submit, summary / results after submit. */\n post?: PostQuestionnaireConfig;\n\n categoryId?: string;\n /** Registered catalog scope keys (see {@link AXP_CATALOG_SCOPE_DEFINITION_PROVIDER}). */\n catalogScopeKeys?: string[];\n\n /** Resolved scope labels for list display (enriched by catalog-scope resolver middleware). */\n catalogScopes?: Array<{ name: string; title: AXPMultiLanguageString | string; cssClass?: string }>;\n tags?: string[];\n color?: string;\n\n /** Reference documents for respondents (attachments plugin). */\n attachments?: AXPFileListItem[] | string[];\n}\n\n/**\n * Maps entity pre/post to viewer config (defaults when omitted).\n */\nexport function toPrePostConfig(q: Partial<AXMAssessmentManagementQuestionnaireEntityModel> | null | undefined): PrePostConfig | null {\n if (!q) {\n return null;\n }\n const pre: PreQuestionnaireConfig = {\n ...DEFAULT_PRE_QUESTIONNAIRE_CONFIG,\n ...q.pre,\n enabled: q.pre?.enabled === true,\n };\n const post: PostQuestionnaireConfig = {\n ...DEFAULT_POST_QUESTIONNAIRE_CONFIG,\n ...q.post,\n reviewEnabled: q.post?.reviewEnabled === true,\n summaryEnabled: q.post?.summaryEnabled === true,\n showOutcomeResults: q.post?.showOutcomeResults === true,\n };\n return { pre, post };\n}\n\nconst VIEW_MODE_VALUES = ['single-page', 'page-per-group', 'page-per-question', 'side-menu'] as const;\ntype ViewModeValue = (typeof VIEW_MODE_VALUES)[number];\nconst VALIDATION_STRATEGY_VALUES = ['step', 'end'] as const;\ntype ValidationStrategyValue = (typeof VALIDATION_STRATEGY_VALUES)[number];\nconst COMPLETION_MODE_VALUES = ['submit-only', 'save-and-continue'] as const;\ntype CompletionModeValue = (typeof COMPLETION_MODE_VALUES)[number];\n\n/**\n * Coerces stored view mode (string or SelectBox `{ id }`) to a known value.\n */\nexport function normalizeViewMode(value: unknown): ViewModeValue {\n if (typeof value === 'string' && VIEW_MODE_VALUES.includes(value as ViewModeValue)) {\n return value as ViewModeValue;\n }\n if (value != null && typeof value === 'object' && 'id' in value && typeof (value as { id: string }).id === 'string') {\n return normalizeViewMode((value as { id: string }).id);\n }\n return 'single-page';\n}\n\n/**\n * Coerces stored validation strategy (string or SelectBox `{ id }`) to a known value.\n */\nexport function normalizeValidationStrategy(value: unknown): ValidationStrategyValue {\n if (typeof value === 'string' && VALIDATION_STRATEGY_VALUES.includes(value as ValidationStrategyValue)) {\n return value as ValidationStrategyValue;\n }\n if (value != null && typeof value === 'object' && 'id' in value && typeof (value as { id: string }).id === 'string') {\n return normalizeValidationStrategy((value as { id: string }).id);\n }\n return 'step';\n}\n\n/**\n * Coerces stored completion mode (string or SelectBox `{ id }`) to a known value.\n */\nexport function normalizeCompletionMode(value: unknown): CompletionModeValue {\n if (typeof value === 'string' && COMPLETION_MODE_VALUES.includes(value as CompletionModeValue)) {\n return value as CompletionModeValue;\n }\n if (value != null && typeof value === 'object' && 'id' in value && typeof (value as { id: string }).id === 'string') {\n return normalizeCompletionMode((value as { id: string }).id);\n }\n return 'submit-only';\n}\n\n/**\n * Maps entity `display` to {@link QuestionnaireDisplaySettings} (defaults when omitted).\n */\nexport function toDisplaySettings(q: Partial<AXMAssessmentManagementQuestionnaireEntityModel> | null | undefined): QuestionnaireDisplaySettings | null {\n if (!q) {\n return null;\n }\n const d = { ...DEFAULT_QUESTIONNAIRE_ENTITY_DISPLAY, ...q.display };\n return {\n viewMode: normalizeViewMode(d.viewMode),\n showProgressBar: d.showProgressBar ?? true,\n showTimer: d.showTimer ?? false,\n showQuestionNumbers: d.showQuestionNumbers ?? true,\n validationStrategy: normalizeValidationStrategy(d.validationStrategy),\n completionMode: normalizeCompletionMode(d.completionMode),\n };\n}\n\n/**\n * Maps entity `print` to {@link QuestionnairePrintSettings} (defaults when omitted).\n */\nexport function toPrintSettings(\n q: Partial<AXMAssessmentManagementQuestionnaireEntityModel> | null | undefined,\n): QuestionnairePrintSettings | null {\n if (!q) {\n return null;\n }\n return resolvePrintSettings(q.print);\n}\n\n//#endregion\n","import { AXPEntityCreateDto, AXPEntityDetailDto, AXPEntityListItemDto, AXPEntityUpdateDto } from '@acorex-platform/framework-shared/entity';\nimport type { AssessmentOutcomesValue, AssessmentPostContent, AssessmentPreContent } from '../../assessment-outcome.types';\n\nexport interface AXMFormTemplateTypeOption {\n id: number;\n title: string;\n}\n\nexport const AXMFormTemplateTypes = {\n Form: {\n id: 10,\n title: '@form-template-management:templates.entities.template.fields.type.options.form',\n } satisfies AXMFormTemplateTypeOption,\n Widget: {\n id: 20,\n title: '@form-template-management:templates.entities.template.fields.type.options.widget',\n } satisfies AXMFormTemplateTypeOption,\n Report: {\n id: 30,\n title: '@form-template-management:templates.entities.template.fields.type.options.report',\n } satisfies AXMFormTemplateTypeOption,\n};\n\nexport type AXMFormTemplateType = (typeof AXMFormTemplateTypes)[keyof typeof AXMFormTemplateTypes];\n\nexport interface AXMCreateFormTemplateDto extends AXPEntityCreateDto {\n code: string;\n title: string;\n description?: string;\n template?: string | null;\n type: AXMFormTemplateTypeOption;\n categoryIds: string[];\n pre?: AssessmentPreContent;\n post?: AssessmentPostContent;\n outcomes?: AssessmentOutcomesValue;\n}\n\nexport interface AXMUpdateFormTemplateDto extends AXPEntityUpdateDto<string> {\n title: string;\n description?: string;\n type: AXMFormTemplateTypeOption;\n template?: string;\n categoryIds: string[];\n pre?: AssessmentPreContent;\n post?: AssessmentPostContent;\n outcomes?: AssessmentOutcomesValue;\n}\n\nexport interface AXMFormTemplateDetailDto extends AXPEntityDetailDto<string> {\n title: string;\n description?: string;\n type: AXMFormTemplateTypeOption;\n template: string | null;\n categoryIds: string[];\n categories: { id: string, title: string }[];\n pre?: AssessmentPreContent;\n post?: AssessmentPostContent;\n outcomes?: AssessmentOutcomesValue;\n}\n\nexport interface AXMFormTemplateListItemDto extends AXPEntityListItemDto<string> {\n title: string;\n description?: string;\n type: AXMFormTemplateTypeOption;\n categoryIds: string[];\n categories: { id: string, title: string }[];\n}\n","//#region ---- Contracts barrel ----\n\nexport * from './features.keys';\nexport * from './menu.keys';\nexport * from './form-template-menu.keys';\nexport * from './permission.keys';\nexport * from './form-template-permission.keys';\nexport * from './form-template-settings.keys';\n\nexport * from './QUESTIONNAIRE_OUTCOMES_PAGE_COMPONENT_KEY';\nexport * from './QUESTIONNAIRE_QUESTIONS_PAGE_COMPONENT_KEY';\n\nexport * from './question-bank-item.contracts';\nexport * from './questionnaire-builder.types';\nexport * from './questionnaire-print.types';\n\nexport * from './root-config';\nexport * from './manifest';\n\nexport * from './commands/assessment-session-preview-pdf.types';\nexport * from './print/assessment-print-merge.constants';\nexport * from './print/print-html.util';\n\n//#endregion\n\nexport * from './entities';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAO,MAAM,kCAAkC,GAAG;AAChD,IAAA,uBAAuB,EAAE,uDAAuD;AAChF,IAAA,aAAa,EAAE,4CAA4C;;;ACFtD,MAAM,+BAA+B,GAAG;AAC3C,IAAA,cAAc,EAAE,0CAA0C;AAC1D,IAAA,KAAK,EAAE,iCAAiC;AACxC,IAAA,iBAAiB,EAAE,6CAA6C;;;ACH7D,MAAM,iCAAiC,GAAG;AAC7C,IAAA,IAAI,EAAE,6BAA6B;AACnC,IAAA,SAAS,EAAE,uCAAuC;;;ACFtD;;;AAGG;AACI,MAAM,2BAA2B,GAAG;AACzC,IAAA,MAAM,EAAE,8BAA8B;AACtC,IAAA,cAAc,EAAE,sCAAsC;AACtD,IAAA,YAAY,EAAE,oCAAoC;AAClD,IAAA,cAAc,EAAE,sCAAsC;AACtD,IAAA,mBAAmB,EAAE,2CAA2C;AAChE,IAAA,KAAK,EAAE,6BAA6B;;AAGtC;;;AAGG;AACI,MAAM,qCAAqC,GAAG;AACnD,IAAA,oBAAoB,EAAE;QACpB,YAAY,EAAE,2BAA2B,CAAC,mBAAmB;AAC7D,QAAA,aAAa,EAAE;YACb,UAAU,EAAE,2BAA2B,CAAC,mBAAmB;YAC3D,MAAM,EAAE,2BAA2B,CAAC,mBAAmB;YACvD,IAAI,EAAE,2BAA2B,CAAC,mBAAmB;YACrD,MAAM,EAAE,2BAA2B,CAAC,mBAAmB;AACxD,SAAA;AACD,QAAA,IAAI,EAAE;YACJ,UAAU,EAAE,2BAA2B,CAAC,mBAAmB;AAC5D,SAAA;AACD,QAAA,OAAO,EAAE;YACP,UAAU,EAAE,2BAA2B,CAAC,mBAAmB;AAC5D,SAAA;AACD,QAAA,UAAU,EAAE;YACV,UAAU,EAAE,2BAA2B,CAAC,mBAAmB;AAC5D,SAAA;AACF,KAAA;;;ACnCH;;;AAGG;AACI,MAAM,iCAAiC,GAAG;A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AAC;IAChE;AACA,IAAA,OAAO,aAAa;AACxB;AAEA;;AAEG;AACG,SAAU,iBAAiB,CAAC,CAA8E,EAAA;IAC5G,IAAI,CAAC,CAAC,EAAE;AACJ,QAAA,OAAO,IAAI;IACf;IACA,MAAM,CAAC,GAAG,EAAE,GAAG,oCAAoC,EAAE,GAAG,CAAC,CAAC,OAAO,EAAE;IACnE,OAAO;AACH,QAAA,QAAQ,EAAE,iBAAiB,CAAC,CAAC,CAAC,QAAQ,CAAC;AACvC,QAAA,eAAe,EAAE,CAAC,CAAC,eAAe,IAAI,IAAI;AAC1C,QAAA,SAAS,EAAE,CAAC,CAAC,SAAS,IAAI,KAAK;AAC/B,QAAA,mBAAmB,EAAE,CAAC,CAAC,mBAAmB,IAAI,IAAI;AAClD,QAAA,kBAAkB,EAAE,2BAA2B,CAAC,CAAC,CAAC,kBAAkB,CAAC;AACrE,QAAA,cAAc,EAAE,uBAAuB,CAAC,CAAC,CAAC,cAAc,CAAC;KAC5D;AACL;AAEA;;AAEG;AACG,SAAU,eAAe,CAC3B,CAA8E,EAAA;IAE9E,IAAI,CAAC,CAAC,EAAE;AACJ,QAAA,OAAO,IAAI;IACf;AACA,IAAA,OAAO,oBAAoB,CAAC,CAAC,CAAC,KAAK,CAAC;AACxC;AAEA;;ACxOO,MAAM,oBAAoB,GAAG;AAClC,IAAA,IAAI,EAAE;AACJ,QAAA,EAAE,EAAE,EAAE;AACN,QAAA,KAAK,EAAE,gFAAgF;AACpD,KAAA;AACrC,IAAA,MAAM,EAAE;AACN,QAAA,EAAE,EAAE,EAAE;AACN,QAAA,KAAK,EAAE,kFAAkF;AACtD,KAAA;AACrC,IAAA,MAAM,EAAE;AACN,QAAA,EAAE,EAAE,EAAE;AACN,QAAA,KAAK,EAAE,kFAAkF;AACtD,KAAA;;;ACpBvC;;ACAA;;AAEG;;"}
1
+ {"version":3,"file":"acorex-platform-module-assessment-management-client-contracts.mjs","sources":["../../../../libs/modules/assessment-management/contracts/src/features.keys.ts","../../../../libs/modules/assessment-management/contracts/src/menu.keys.ts","../../../../libs/modules/assessment-management/contracts/src/form-template-menu.keys.ts","../../../../libs/modules/assessment-management/contracts/src/permission.keys.ts","../../../../libs/modules/assessment-management/contracts/src/form-template-permission.keys.ts","../../../../libs/modules/assessment-management/contracts/src/form-template-settings.keys.ts","../../../../libs/modules/assessment-management/contracts/src/QUESTIONNAIRE_OUTCOMES_PAGE_COMPONENT_KEY.ts","../../../../libs/modules/assessment-management/contracts/src/QUESTIONNAIRE_QUESTIONS_PAGE_COMPONENT_KEY.ts","../../../../libs/modules/assessment-management/contracts/src/question-bank-item.contracts.ts","../../../../libs/modules/assessment-management/contracts/src/questionnaire-builder.types.ts","../../../../libs/modules/assessment-management/contracts/src/questionnaire-item-layout.util.ts","../../../../libs/modules/assessment-management/contracts/src/questionnaire-print.types.ts","../../../../libs/modules/assessment-management/contracts/src/root-config.ts","../../../../libs/modules/assessment-management/contracts/src/manifest.ts","../../../../libs/modules/assessment-management/contracts/src/commands/assessment-session-preview-pdf.types.ts","../../../../libs/modules/assessment-management/contracts/src/print/assessment-print-merge.constants.ts","../../../../libs/modules/assessment-management/contracts/src/print/print-html.util.ts","../../../../libs/modules/assessment-management/contracts/src/entities/assessment-case/assessment-case.types.ts","../../../../libs/modules/assessment-management/contracts/src/entities/assessment-session/assessment-session.types.ts","../../../../libs/modules/assessment-management/contracts/src/entities/question-bank-item/question-bank-item.types.ts","../../../../libs/modules/assessment-management/contracts/src/entities/question-bank-item/question-comment.types.ts","../../../../libs/modules/assessment-management/contracts/src/entities/question-bank-item/question-hint.types.ts","../../../../libs/modules/assessment-management/contracts/src/assessment-outcome.types.ts","../../../../libs/modules/assessment-management/contracts/src/entities/questionnaire/questionnaire.types.ts","../../../../libs/modules/assessment-management/contracts/src/entities/template/template.types.ts","../../../../libs/modules/assessment-management/contracts/src/index.ts","../../../../libs/modules/assessment-management/contracts/src/acorex-platform-module-assessment-management-client-contracts.ts"],"sourcesContent":["export const AXMAssessmentManagementFeatureKeys = {\n QuestionnaireManagement: 'AssessmentManagement:Feature:Questionnaire.Management',\n FormTemplates: 'AssessmentManagement:Feature:FormTemplates',\n} as const;\n\n","export const AXPAssessmentManagementMenuKeys = {\n Questionnaires: 'AssessmentManagement:Menu:Questionnaires',\n Cases: 'AssessmentManagement:Menu:Cases',\n QuestionBankItems: 'AssessmentManagement:Menu:QuestionBankItems',\n} as const;\n\n","export const AXPFormTemplateManagementMenuKeys = {\n Root: 'FormTemplateManagement:Menu',\n Templates: 'FormTemplateManagement:Menu:Templates',\n} as const;\n\n","/**\n * Safety & Risk capabilities used by this module.\n * Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).\n */\nexport const AXPSafetyRiskPermissionKeys = {\n Access: 'SafetyRisk:Permission:Access',\n MaintainSafety: 'SafetyRisk:Permission:MaintainSafety',\n MaintainRisk: 'SafetyRisk:Permission:MaintainRisk',\n MaintainHealth: 'SafetyRisk:Permission:MaintainHealth',\n MaintainAssessments: 'SafetyRisk:Permission:MaintainAssessments',\n Setup: 'SafetyRisk:Permission:Setup',\n} as const;\n\n/**\n * @deprecated Prefer {@link AXPSafetyRiskPermissionKeys}.\n * Legacy nested shape kept so existing imports compile during migration.\n */\nexport const AXMAssessmentManagementPermissionKeys = {\n AssessmentManagement: {\n QuestionBank: AXPSafetyRiskPermissionKeys.MaintainAssessments,\n Questionnaire: {\n Management: AXPSafetyRiskPermissionKeys.MaintainAssessments,\n Create: AXPSafetyRiskPermissionKeys.MaintainAssessments,\n Edit: AXPSafetyRiskPermissionKeys.MaintainAssessments,\n Delete: AXPSafetyRiskPermissionKeys.MaintainAssessments,\n },\n Case: {\n Management: AXPSafetyRiskPermissionKeys.MaintainAssessments,\n },\n Session: {\n Management: AXPSafetyRiskPermissionKeys.MaintainAssessments,\n },\n Automation: {\n Management: AXPSafetyRiskPermissionKeys.MaintainAssessments,\n },\n },\n} as const;\n","/**\n * Content & Documents capabilities used by this module.\n * Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).\n */\nexport const AXPContentDocumentsPermissionKeys = {\n Access: 'ContentDocuments:Permission:Access',\n MaintainDocuments: 'ContentDocuments:Permission:MaintainDocuments',\n MaintainContent: 'ContentDocuments:Permission:MaintainContent',\n MaintainFormTemplates: 'ContentDocuments:Permission:MaintainFormTemplates',\n Setup: 'ContentDocuments:Permission:Setup',\n} as const;\n\n/**\n * @deprecated Prefer {@link AXPContentDocumentsPermissionKeys}.\n * Legacy nested shape kept so existing imports compile during migration.\n */\nexport const AXPFormTemplateManagementPermissionKeys = {\n FormTemplate: {\n Templates: {\n Management: AXPContentDocumentsPermissionKeys.MaintainFormTemplates,\n View: AXPContentDocumentsPermissionKeys.MaintainFormTemplates,\n Edit: AXPContentDocumentsPermissionKeys.MaintainFormTemplates,\n Delete: AXPContentDocumentsPermissionKeys.MaintainFormTemplates,\n Create: AXPContentDocumentsPermissionKeys.MaintainFormTemplates,\n },\n },\n} as const;\n","export enum AXPFormTemplateSettings {\n HistoryPanel = 'FormTemplateManagement:Setting:Designer.HistoryPanel',\n AutoSave = 'FormTemplateManagement:Setting:Designer.AutoSave',\n AutoSaveInterval = 'FormTemplateManagement:Setting:Designer.AutoSaveInterval',\n AutoSaveTimeout = 'FormTemplateManagement:Setting:Designer.AutoSaveTimeout',\n}\n\n","/** Component key for the questionnaire Outcomes page tab. Register via AXP_PAGE_COMPONENT_PROVIDER. */\nexport const QUESTIONNAIRE_OUTCOMES_PAGE_COMPONENT_KEY = 'questionnaire-outcomes-page';\n","/** Component key for the questionnaire Questions page tab. Register via AXP_PAGE_COMPONENT_PROVIDER. */\nexport const QUESTIONNAIRE_QUESTIONS_PAGE_COMPONENT_KEY = 'questionnaire-questions-page';\n","import type { AXPExpression, AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\n\n//#region ---- Question comment ----\n\n/**\n * Respondent free-text comment configuration (per question bank item; overridable per questionnaire item).\n *\n * `enabled` follows the same boolean | expression pattern as question `isVisible` / `isRequired`\n * (property-viewer toggle binding). Optional `isVisible` remains as a legacy/additional gate.\n */\nexport interface AXMAssessmentQuestionCommentConfig {\n /** `true` / `false`, or a visibility expression string (shown in Allow Comments). */\n enabled: boolean | AXPExpression;\n required: boolean;\n /**\n * Optional extra visibility gate (legacy). Prefer putting conditions on {@link enabled}.\n * Omitted / `true` = no extra gate; `false` hides; string = expression.\n */\n isVisible?: boolean | AXPExpression;\n}\n\n//#endregion\n\n//#region ---- Question hint ----\n\n/**\n * Visual style when a hint is shown (maps to ax-alert color).\n */\nexport type AXMAssessmentQuestionHintVisualMode = 'info' | 'warning' | 'danger' | 'success' | 'neutral';\n\n/**\n * `off` = no hint (same intent as \"hidden\" / \"none\"); visual modes require {@link AXMAssessmentQuestionHintConfigShown.content}.\n */\nexport type AXMAssessmentQuestionHintMode = 'off' | AXMAssessmentQuestionHintVisualMode;\n\nexport type AXMAssessmentQuestionHintConfigOff = { mode: 'off' };\n\nexport type AXMAssessmentQuestionHintConfigShown = {\n mode: AXMAssessmentQuestionHintVisualMode;\n content: AXPMultiLanguageString;\n};\n\n/**\n * Question hint configuration (question bank default; overridable per questionnaire item).\n */\nexport type AXMAssessmentQuestionHintConfig = AXMAssessmentQuestionHintConfigOff | AXMAssessmentQuestionHintConfigShown;\n\n/**\n * Partial override on a questionnaire item (`undefined` / omitted fields inherit from the bank).\n */\nexport type AXMAssessmentQuestionHintPartial = {\n mode?: AXMAssessmentQuestionHintMode;\n content?: AXPMultiLanguageString;\n};\n\n//#endregion\n","//#region ---- Imports ----\n\nimport type {\n AXPExpression,\n AXPGridLayoutOptions,\n AXPMultiLanguageString,\n AXPWidgetNode,\n} from '@acorex-platform/framework-shared/core';\n\nimport type {\n AXMAssessmentQuestionCommentConfig,\n AXMAssessmentQuestionHintPartial,\n} from './question-bank-item.contracts';\nimport type { QuestionnairePrintSettings } from './questionnaire-print.types';\n\n//#endregion\n\n//#region ---- Questionnaire Builder Persistence Types ----\n\n/**\n * Display settings for questionnaire viewer\n */\n/** Whether the respondent can save a draft before final submit. */\nexport type QuestionnaireCompletionMode = 'submit-only' | 'save-and-continue';\n\nexport interface QuestionnaireDisplaySettings {\n /**\n * View mode: single-page, page-per-group, page-per-question, side-menu\n */\n viewMode?: 'single-page' | 'page-per-group' | 'page-per-question' | 'side-menu';\n\n /**\n * submit-only: final submit only; save-and-continue: draft save + submit.\n */\n completionMode?: QuestionnaireCompletionMode;\n\n /**\n * Show progress bar\n */\n showProgressBar?: boolean;\n\n /**\n * Progress calculation mode: answered or navigation\n */\n progressMode?: 'answered' | 'navigation';\n\n /**\n * Show timer\n */\n showTimer?: boolean;\n\n /**\n * Show question numbers\n */\n showQuestionNumbers?: boolean;\n\n /**\n * Auto-save answers as user types\n */\n autoSave?: boolean;\n\n /**\n * Show validation errors inline\n */\n showValidationErrors?: boolean;\n\n /**\n * Allow skipping questions (if not required)\n */\n allowSkipping?: boolean;\n\n /**\n * Show question counter (e.g., \"Question 3 of 10\")\n */\n showQuestionCounter?: boolean;\n\n /**\n * Validation timing strategy:\n * - step: validate on each step/section navigation\n * - end: validate only at final submit\n * Default: step\n */\n validationStrategy?: 'step' | 'end';\n}\n\n/**\n * Value structure stored in entity (simplified for persistence)\n */\nexport interface QuestionnaireBuilderValue {\n sections: Array<{\n name: string;\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString;\n order: number;\n tags?: string[];\n isVisible?: boolean | AXPExpression;\n items: Array<{\n name: string;\n questionBankItemId: string;\n order: number;\n isRequired?: boolean | AXPExpression;\n isVisible?: boolean | AXPExpression;\n interfaceOverride?: AXPWidgetNode;\n /**\n * Column width for this question inside this questionnaire.\n * Omitted means full width. Not stored on the question bank item.\n */\n layout?: AXPGridLayoutOptions;\n hint?: AXMAssessmentQuestionHintPartial;\n comment?: Partial<AXMAssessmentQuestionCommentConfig>;\n tags?: string[];\n }>;\n }>;\n /**\n * Display settings for questionnaire viewer\n */\n displaySettings?: QuestionnaireDisplaySettings;\n /**\n * Print document defaults (overridable per print call).\n */\n printSettings?: QuestionnairePrintSettings;\n}\n\n//#endregion\n","import type { AXPGridLayoutOptions } from '@acorex-platform/framework-shared/core';\n\n/** Width choices for a question placed in a questionnaire. Values are columns in the 12-column row. */\nexport const QUESTIONNAIRE_ITEM_COL_SPANS = [12, 6, 4, 3, 2] as const;\n\nexport type QuestionnaireItemColSpan = (typeof QUESTIONNAIRE_ITEM_COL_SPANS)[number];\n\nconst QUESTIONNAIRE_ITEM_COL_SPAN_SET = new Set<number>(QUESTIONNAIRE_ITEM_COL_SPANS);\n\n/**\n * Column width stored on the questionnaire item. Omitted means full width.\n * This is not a question-bank field.\n */\nexport function readQuestionnaireItemColSpan(\n item: { layout?: AXPGridLayoutOptions } | null | undefined,\n): QuestionnaireItemColSpan {\n return coerceQuestionnaireItemColSpan(item?.layout?.positions?.lg?.colSpan) ?? 12;\n}\n\n/** Persist only a narrower width. Full width stays omitted so existing questionnaires are unchanged. */\nexport function questionnaireItemLayoutOverride(value: unknown): AXPGridLayoutOptions | undefined {\n const colSpan = coerceQuestionnaireItemColSpan(value);\n if (colSpan == null || colSpan === 12) {\n return undefined;\n }\n return { positions: { lg: { colSpan } } };\n}\n\n/** Accepts a number, numeric string, or select row `{ id }`. */\nexport function coerceQuestionnaireItemColSpan(value: unknown): QuestionnaireItemColSpan | undefined {\n if (typeof value === 'number' && QUESTIONNAIRE_ITEM_COL_SPAN_SET.has(value)) {\n return value as QuestionnaireItemColSpan;\n }\n if (typeof value === 'string' && /^\\d+$/.test(value)) {\n return coerceQuestionnaireItemColSpan(Number(value));\n }\n if (value && typeof value === 'object' && 'id' in value) {\n return coerceQuestionnaireItemColSpan((value as { id: unknown }).id);\n }\n return undefined;\n}\n","//#region ---- Questionnaire print settings ----\n\n/** Paper size for the generated PDF. */\nexport type QuestionnairePrintPaperSize = 'A4' | 'Letter' | 'Legal';\n\n/** Page orientation for the generated PDF. */\nexport type QuestionnairePrintOrientation = 'portrait' | 'landscape';\n\n/** Resolved print page breaks (no sidebar). Follows Display view mode. */\nexport type QuestionnairePrintPaging = 'single-page' | 'page-per-group' | 'page-per-question';\n\n/**\n * Print document options stored on the questionnaire (defaults) and accepted as overrides\n * by the print host / snapshot service.\n */\nexport interface QuestionnairePrintSettings {\n paperSize?: QuestionnairePrintPaperSize;\n orientation?: QuestionnairePrintOrientation;\n /** Optional diagonal text on every page. Empty means no watermark. */\n watermark?: string;\n showQuestionNumbers?: boolean;\n showWelcomeScreen?: boolean;\n showSummaryAfterSubmit?: boolean;\n showOutcomeResults?: boolean;\n showUnansweredQuestions?: boolean;\n showComments?: boolean;\n showAttachments?: boolean;\n showHints?: boolean;\n showNotes?: boolean;\n}\n\nexport const DEFAULT_QUESTIONNAIRE_PRINT_SETTINGS: Required<QuestionnairePrintSettings> = {\n paperSize: 'A4',\n orientation: 'portrait',\n watermark: '',\n showQuestionNumbers: true,\n showWelcomeScreen: false,\n showSummaryAfterSubmit: false,\n showOutcomeResults: false,\n showUnansweredQuestions: true,\n showComments: true,\n showAttachments: true,\n showHints: true,\n showNotes: true,\n};\n\nconst PRINT_PAPER_SIZE_VALUES: readonly QuestionnairePrintPaperSize[] = ['A4', 'Letter', 'Legal'];\nconst PRINT_ORIENTATION_VALUES: readonly QuestionnairePrintOrientation[] = ['portrait', 'landscape'];\n\nconst PRINT_PAGE_SIZE_MM: Record<QuestionnairePrintPaperSize, { width: number; height: number }> = {\n A4: { width: 210, height: 297 },\n Letter: { width: 215.9, height: 279.4 },\n Legal: { width: 215.9, height: 355.6 },\n};\n\n/** Side margin used by the print document and Chromium PDF engine. */\nexport const PRINT_PAGE_SIDE_MARGIN_MM = 14;\n/**\n * Playwright paints repeating letterhead in the top/bottom margin box.\n * These must stay large enough for the company header/footer; measuring\n * chrome height under-reported and overlapped the questionnaire title.\n */\nexport const PRINT_PAGE_LETTERHEAD_TOP_MARGIN_MM = 36;\nexport const PRINT_PAGE_LETTERHEAD_BOTTOM_MARGIN_MM = 28;\n\nexport function resolvePrintLetterheadPdfMargin(): {\n top: string;\n right: string;\n bottom: string;\n left: string;\n} {\n return {\n top: `${PRINT_PAGE_LETTERHEAD_TOP_MARGIN_MM}mm`,\n right: `${PRINT_PAGE_SIDE_MARGIN_MM}mm`,\n bottom: `${PRINT_PAGE_LETTERHEAD_BOTTOM_MARGIN_MM}mm`,\n left: `${PRINT_PAGE_SIDE_MARGIN_MM}mm`,\n };\n}\n\nfunction definedPartial<T extends object>(value: T | null | undefined): Partial<T> {\n if (!value) {\n return {};\n }\n return Object.fromEntries(Object.entries(value).filter(([, item]) => item !== undefined)) as Partial<T>;\n}\n\nfunction coerceSelectId(value: unknown): unknown {\n if (value != null && typeof value === 'object' && 'id' in value) {\n return (value as { id: unknown }).id;\n }\n return value;\n}\n\nexport function normalizePrintPaperSize(value: unknown): QuestionnairePrintPaperSize {\n const raw = coerceSelectId(value);\n if (typeof raw === 'string' && PRINT_PAPER_SIZE_VALUES.includes(raw as QuestionnairePrintPaperSize)) {\n return raw as QuestionnairePrintPaperSize;\n }\n return DEFAULT_QUESTIONNAIRE_PRINT_SETTINGS.paperSize;\n}\n\nexport function normalizePrintOrientation(value: unknown): QuestionnairePrintOrientation {\n const raw = coerceSelectId(value);\n if (typeof raw === 'string' && PRINT_ORIENTATION_VALUES.includes(raw as QuestionnairePrintOrientation)) {\n return raw as QuestionnairePrintOrientation;\n }\n return DEFAULT_QUESTIONNAIRE_PRINT_SETTINGS.orientation;\n}\n\nexport function normalizePrintWatermark(value: unknown): string {\n return typeof value === 'string' ? value.trim() : '';\n}\n\n/**\n * Merges questionnaire defaults with an optional per-call override.\n * Undefined override fields keep the stored / built-in default.\n */\nexport function resolvePrintSettings(\n stored?: Partial<QuestionnairePrintSettings> | null,\n override?: Partial<QuestionnairePrintSettings> | null,\n): Required<QuestionnairePrintSettings> {\n const merged = {\n ...DEFAULT_QUESTIONNAIRE_PRINT_SETTINGS,\n ...definedPartial(stored),\n ...definedPartial(override),\n };\n return {\n ...merged,\n paperSize: normalizePrintPaperSize(merged.paperSize),\n orientation: normalizePrintOrientation(merged.orientation),\n watermark: normalizePrintWatermark(merged.watermark),\n };\n}\n\n/**\n * Resolves print page breaks from the Display view mode.\n * `side-menu` prints as page-per-group (no sidebar).\n */\nexport function resolvePrintPaging(displayViewMode?: string | null): QuestionnairePrintPaging {\n if (displayViewMode === 'page-per-question') {\n return 'page-per-question';\n }\n if (displayViewMode === 'page-per-group' || displayViewMode === 'side-menu') {\n return 'page-per-group';\n }\n return 'single-page';\n}\n\n/** Content width after side margins, for the off-screen print host and wrapped HTML. */\nexport function resolvePrintContentWidthMm(\n print: Pick<QuestionnairePrintSettings, 'paperSize' | 'orientation'>,\n): number {\n const size = PRINT_PAGE_SIZE_MM[normalizePrintPaperSize(print.paperSize)];\n const pageWidth = normalizePrintOrientation(print.orientation) === 'landscape' ? size.height : size.width;\n return Math.round((pageWidth - PRINT_PAGE_SIDE_MARGIN_MM * 2) * 10) / 10;\n}\n\nexport function resolvePrintPdfPageOptions(print: Pick<QuestionnairePrintSettings, 'paperSize' | 'orientation'>): {\n format: QuestionnairePrintPaperSize;\n landscape: boolean;\n} {\n return {\n format: normalizePrintPaperSize(print.paperSize),\n landscape: normalizePrintOrientation(print.orientation) === 'landscape',\n };\n}\n\n//#endregion\n","//#region ---- Root Configuration ----\n\nconst config = { i18n: 'assessment-management', module: 'AssessmentManagement' } as const;\n\nexport const RootConfig = {\n config,\n module: {\n module: 'assessment-management',\n route: 'assessment-management',\n name: 'AssessmentManagement',\n title: '@assessment-management:module.title',\n icon: 'fa-light fa-clipboard-list-check',\n },\n entities: {\n questionBankItem: {\n name: 'QuestionBankItem',\n title: '@assessment-management:question-bank.entities.question-bank-item.title',\n titlePlural: '@assessment-management:question-bank.entities.question-bank-item.plural',\n icon: 'fa-light fa-question-circle',\n },\n questionnaire: {\n name: 'Questionnaire',\n title: '@assessment-management:questionnaires.entities.questionnaire.title',\n titlePlural: '@assessment-management:questionnaires.entities.questionnaire.plural',\n icon: 'fa-light fa-clipboard-list',\n },\n assessmentCase: {\n name: 'AssessmentCase',\n title: '@assessment-management:cases.entities.assessment-case.title',\n titlePlural: '@assessment-management:cases.entities.assessment-case.plural',\n icon: 'fa-light fa-briefcase',\n },\n assessmentSession: {\n name: 'AssessmentSession',\n title: '@assessment-management:sessions.entities.assessment-session.title',\n titlePlural: '@assessment-management:sessions.entities.assessment-session.plural',\n icon: 'fa-light fa-clipboard-check',\n },\n template: {\n name: 'Template',\n title: '@form-template-management:templates.entities.template.title',\n source: `${config.module}.Template`,\n icon: 'fa-light fa-file-code',\n },\n },\n queries: {\n dashboard: {\n overdueAssessmentsKpi: `${config.module}:Dashboard:OverdueAssessmentsKpi`,\n pendingAssessmentsKpi: `${config.module}:Dashboard:PendingAssessmentsKpi`,\n myAssessmentsKpi: `${config.module}:Dashboard:MyAssessmentsKpi`,\n assessmentsWeekLine: `${config.module}:Dashboard:AssessmentsWeekLine`,\n },\n },\n} as const;\n\n//#endregion\n\n","//#region ---- Imports ----\n\nimport { AXPModuleManifest } from '@acorex-platform/framework-shared/core';\nimport { RootConfig } from './root-config';\n\n//#endregion\n\n//#region ---- Manifest Definition ----\n\n/**\n * Assessment Management Module Manifest.\n * Defines module metadata, features, and provider references.\n */\nexport const AssessmentManagementManifest: AXPModuleManifest = {\n name: RootConfig.module.name,\n version: '1.0.0',\n title: RootConfig.module.title,\n icon: RootConfig.module.icon,\n i18n: RootConfig.config.i18n,\n type: 'domain',\n domain: 'assessment-learning',\n required: false,\n\n // Module dependencies (optional)\n};\n\n//#endregion\n\n","//#region ---- Assessment session PDF preview contracts ----\n\n/** Server command that renders a filled assessment session to PDF. */\nexport const AXM_ASSESSMENT_SESSION_PREVIEW_PDF_COMMAND_KEY =\n 'AssessmentManagement:AssessmentSession:PreviewPdf' as const;\n\n/** Client / entity-menu command that opens the PDF preview dialog. */\nexport const AXM_ASSESSMENT_SESSION_PREVIEW_PDF_CLIENT_COMMAND_KEY =\n 'AssessmentManagement.AssessmentSession:PreviewPdf' as const;\n\nexport interface AXMAssessmentSessionPreviewPdfRequest {\n /** Specific session. Required when `caseId` and `printHtmlGzip` are omitted. */\n sessionId?: string;\n /** When `sessionId` is omitted, the latest session for this case is used. */\n caseId?: string;\n /**\n * Questionnaire ID. Used when there is no session (builder Preview) so the\n * selected print text template and tenant can still be loaded.\n */\n questionnaireId?: string;\n /** Locale for MLS titles and answer formatting. Defaults to `en-US`. */\n locale?: string;\n /**\n * Gzipped live questionnaire HTML. When set, the PDF is rendered from this\n * snapshot and session lookup is skipped.\n */\n printHtmlGzip?: string;\n /** File / header title when rendering a live snapshot. */\n title?: string;\n /** Overrides questionnaire `printTemplateId` for this render. */\n printTemplateId?: string;\n /** Overrides questionnaire paper size for this render. */\n paperSize?: 'A4' | 'Letter' | 'Legal';\n /** Overrides questionnaire orientation for this render. */\n orientation?: 'portrait' | 'landscape';\n /** Overrides questionnaire watermark for this render. */\n watermark?: string;\n}\n\nexport interface AXMAssessmentSessionPreviewPdfResult {\n filename: string;\n contentType: 'application/pdf';\n base64: string;\n}\n\n//#endregion\n","//#region ---- Assessment print merge keys ----\n\n/**\n * Event merge keys passed to `ContentManagement:TextTemplate:Render` (`channel: print`).\n * Names must match `PlatformManagement.Tokens` Event rows.\n */\nexport const AXM_ASSESSMENT_PRINT_MERGE_KEYS = {\n questionnaireTitle: 'questionnaireTitle',\n caseTitle: 'caseTitle',\n sessionDate: 'sessionDate',\n generatedAt: 'generatedAt',\n status: 'status',\n statusLabel: 'statusLabel',\n sessionBody: 'sessionBody',\n} as const;\n\nexport type AXMAssessmentPrintMergeKey =\n (typeof AXM_ASSESSMENT_PRINT_MERGE_KEYS)[keyof typeof AXM_ASSESSMENT_PRINT_MERGE_KEYS];\n\n//#endregion\n","//#region ---- Print HTML snapshot helpers ----\n\nimport {\n DEFAULT_QUESTIONNAIRE_PRINT_SETTINGS,\n resolvePrintContentWidthMm,\n resolvePrintSettings,\n type QuestionnairePrintSettings,\n} from '../questionnaire-print.types';\n\nexport const ASSESSMENT_PRINT_PAGE_FORMAT = DEFAULT_QUESTIONNAIRE_PRINT_SETTINGS.paperSize;\n/** A4 portrait content width after 14mm side margins (210 - 14 - 14). */\nexport const ASSESSMENT_PRINT_CONTENT_WIDTH_MM = resolvePrintContentWidthMm(DEFAULT_QUESTIONNAIRE_PRINT_SETTINGS);\nexport const ASSESSMENT_PRINT_HTML_GZIP_ENCODING = 'gzip-base64' as const;\n\nfunction resolveWatermarkFontMm(watermark: string, contentWidthMm: number): number {\n const chars = Math.max(watermark.trim().length, 1);\n const fitted = (contentWidthMm * 0.78) / (chars * 0.62);\n return Math.round(Math.max(5, Math.min(14, fitted)) * 10) / 10;\n}\n\nfunction buildPrintDocumentCss(print: Required<QuestionnairePrintSettings>): string {\n const width = resolvePrintContentWidthMm(print);\n const watermark = print.watermark\n ? `.__print-watermark{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%) rotate(-32deg);transform-origin:center center;pointer-events:none;z-index:0;color:rgba(15,23,42,.12);font-size:${resolveWatermarkFontMm(print.watermark, width)}mm;font-weight:700;letter-spacing:.04em;text-transform:uppercase;white-space:nowrap;line-height:1;}`\n : '';\n return `\n@page { size: ${print.paperSize} ${print.orientation}; }\nhtml, body { width: ${width}mm; max-width: ${width}mm; margin: 0; }\nbody { background: #fff; color: #0f172a; font-family: Arial, Helvetica, sans-serif; -webkit-print-color-adjust: exact; print-color-adjust: exact; }\n${watermark}\n.__print-letterhead { width: 100%; border-collapse: collapse; table-layout: fixed; border: 1.25pt solid #1e3a5f; }\n.__print-letterhead__accent { height: 5px; background: #1e3a5f; font-size: 0; line-height: 0; }\n.__print-letterhead__header { padding: 7mm 8mm 5mm; }\n.__print-letterhead__brand { width: 100%; border-collapse: collapse; }\n.__print-letterhead__logo { width: 42px; vertical-align: middle; }\n.__print-letterhead__logo img, .__print-letterhead__logo svg { display: block; max-width: 36px; max-height: 36px; }\n.__print-letterhead__name { font-size: 13.5pt; line-height: 1.2; font-weight: 700; color: #0f172a; letter-spacing: 0.01em; }\n.__print-letterhead__email { font-size: 8.5pt; line-height: 1.4; color: #64748b; margin-top: 2px; }\n.__print-letterhead__contact { text-align: right; vertical-align: middle; font-size: 8pt; line-height: 1.45; color: #64748b; }\n.__print-letterhead__body { padding: 2mm 8mm 8mm; vertical-align: top; min-height: 165mm; }\n.__print-letterhead__footer { padding: 4.5mm 8mm; background: #f1f5f9; border-top: 1px solid #cbd5e1; font-size: 8pt; line-height: 1.45; color: #475569; }\n.__print-letterhead__footer-table { width: 100%; border-collapse: collapse; }\n.__print-letterhead__copy { text-align: right; color: #64748b; }\n.__print-doc-head { margin: 0 0 12px; padding: 0 0 10px; border-bottom: 1px solid #e2e8f0; }\n.__print-doc-title { margin: 0 0 6px; font-size: 15pt; line-height: 1.25; font-weight: 700; color: #0f172a; }\n.__print-doc-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 8.5pt; line-height: 1.4; color: #64748b; }\n.__print-doc-meta > span:empty { display: none; }\n.__print-doc-meta > span:not(:empty) { padding: 2px 8px; background: #f1f5f9; border-radius: 999px; color: #334155; }\n.__print-document {\n display: block !important; width: 100%; position: relative; z-index: 1;\n break-inside: auto !important; page-break-inside: auto !important;\n}\naxm-questionnaire-print-host,\n.axm-questionnaire-print-surface,\naxm-questionnaire-viewer,\naxm-questionnaire-viewer-print-view,\naxp-widgets-container,\nax-form,\n.__questionnaire-container {\n display: block !important; break-inside: auto !important; page-break-inside: auto !important;\n}\n.__print-section {\n display: block !important; break-inside: auto !important; page-break-inside: auto !important;\n margin: 0 0 10px !important; padding: 0 !important; border: 1px solid #d0d9e6 !important; border-radius: 4px !important;\n background: #fff !important; overflow: visible;\n}\n.__print-section:last-child { margin-bottom: 0 !important; }\naxm-questionnaire-viewer-section-header {\n display: block !important; width: 100% !important; margin: 0 !important; padding: 0 !important;\n background: #eef3f8 !important; border-bottom: 1px solid #d0d9e6 !important;\n}\naxm-questionnaire-viewer-section-header .__mb-sm,\naxm-questionnaire-viewer-section-header .__mb-md { margin-bottom: 0 !important; }\n.__print-questions { display: block !important; padding: 2px 12px 8px !important; }\n.__section-header { margin: 0 !important; padding: 8px 12px 7px !important; background: #eef3f8 !important; }\n.__section-title-md, .__section-title-lg, .__print-section h2, .__print-section .__section-title-md, .__print-section .__section-title-lg {\n margin: 0 !important; padding: 0 !important; padding-inline-start: 0 !important; border-inline-start: none !important;\n font-size: 11pt !important; line-height: 1.25 !important; font-weight: 700 !important; color: #0f172a !important;\n}\n.__section-description, .__section-description--rich {\n margin: 2px 0 0 !important; padding-inline-start: 0 !important; font-size: 8.5pt !important; line-height: 1.35 !important; color: #64748b !important;\n}\n.__question-item { break-inside: avoid; page-break-inside: avoid; }\n.__question-item.__print-plain {\n background: transparent !important; box-shadow: none !important; border: none !important; border-bottom: 1px solid #e8eef3 !important;\n border-radius: 0 !important; padding: 8px 0 !important; margin: 0 !important;\n}\n.__print-questions .__question-item.__print-plain:last-child { border-bottom: none !important; }\n.__question-header { display: flex !important; align-items: flex-start !important; gap: 8px !important; width: 100% !important; }\n.__question-number {\n display: inline-block !important; min-width: 0 !important; padding: 0 !important; border-radius: 0 !important;\n background: transparent !important; color: #0f172a !important; font-size: 10pt !important; font-weight: 700 !important; text-align: start !important;\n}\n.__question-title, h3.__question-title, .__question-title--rich {\n margin: 0 !important; font-size: 10pt !important; line-height: 1.4 !important; font-weight: 600 !important; color: #0f172a !important;\n}\n.__question-widget { margin-top: 4px !important; }\n.__question-comment, .__question-comment--readonly {\n margin-top: 4px !important; padding-inline-start: 2px !important;\n}\n.__question-comment-text {\n margin: 0 !important; font-size: 9pt !important; line-height: 1.4 !important; font-weight: 400 !important;\n font-style: italic !important; color: #64748b !important;\n}\n.axp-widget-print-field {\n display: inline-block !important; width: auto !important; min-width: 22mm !important; max-width: 100% !important;\n min-height: 0 !important; margin: 0 !important; padding: 3px 10px !important; border: none !important; border-bottom: none !important;\n border-radius: 4px !important; background: #f1f5f9 !important; color: #0f172a !important; font-size: 11pt !important;\n font-weight: 600 !important; line-height: 1.4 !important; word-break: break-word;\n}\n.axp-widget-print-field--empty {\n background: transparent !important; color: #94a3b8 !important; font-weight: 400 !important; border: 1px dashed #cbd5e1 !important;\n}\n.axp-widget-print-field--multiline, .axp-widget-print-field--rich {\n display: block !important; width: 100% !important; font-weight: 400 !important; background: #f8fafc !important;\n border: 1px solid #e2e8f0 !important; min-height: 3.2em;\n}\n.axp-widget-print-choice { display: inline-flex; align-items: center; gap: 8px; font-size: 10.5pt; color: #0f172a; }\n.axp-widget-print-mark { font-size: 13pt; line-height: 1; }\n.__print-document[data-print-paging=\"page-per-group\"] .__print-section + .__print-section,\n.__print-document[data-print-paging=\"side-menu\"] .__print-section + .__print-section { break-before: page; page-break-before: always; }\n.__print-document[data-print-paging=\"page-per-question\"] axm-questionnaire-viewer-question + axm-questionnaire-viewer-question { break-before: page; page-break-before: always; }\n.__print-extra,\n.__print-outcomes,\n.__print-summary {\n display: block !important;\n break-inside: auto !important;\n page-break-inside: auto !important;\n}\n.__print-outcomes,\n.__print-summary {\n break-before: page !important;\n page-break-before: always !important;\n}\n.__print-outcomes .axp-outcome-results-viewer,\n.__print-outcomes .__root,\n.__print-summary .axm-post-questionnaire-content,\n.__print-summary .__summary {\n display: block !important;\n min-height: 0 !important;\n}\n`;\n}\nexport function minifyPrintHtml(html: string): string {\n return html\n .replace(/<!--[\\s\\S]*?-->/g, '')\n .replace(/<script\\b[^<]*(?:(?!<\\/script>)<[^<]*)*<\\/script>/gi, '')\n .replace(/\\sng-reflect-[a-z0-9-]+=\"[^\"]*\"/gi, '')\n .replace(/\\s_ngcontent-[a-z0-9-]+=\"[^\"]*\"/gi, '')\n .replace(/\\s_nghost-[a-z0-9-]+=\"[^\"]*\"/gi, '')\n .replace(/\\sdata-testid=\"[^\"]*\"/gi, '')\n .replace(/\\sclass=\"\"/g, '')\n .replace(/\\s{2,}/g, ' ')\n .replace(/>\\s+</g, '><')\n .trim();\n}\n\nexport function resolvePrintPlainText(value: unknown): string {\n if (typeof value === 'string') {\n return value.trim();\n }\n if (!value || typeof value !== 'object') {\n return '';\n }\n const record = value as Record<string, unknown>;\n for (const key of ['en-US', 'en', ...Object.keys(record)]) {\n const text = record[key];\n if (typeof text === 'string' && text.trim()) {\n return text.trim();\n }\n }\n return '';\n}\n\nexport function formatPrintAnswerText(value: unknown): string {\n if (value == null || value === '') {\n return '—';\n }\n if (typeof value === 'string') {\n const trimmed = value.replace(/<[^>]*>/g, ' ').replace(/\\s+/g, ' ').trim();\n return trimmed || '—';\n }\n if (typeof value === 'number' || typeof value === 'boolean') {\n return String(value);\n }\n if (value instanceof Date) {\n return value.toISOString();\n }\n if (Array.isArray(value)) {\n const parts = value.map((item) => formatPrintAnswerText(item)).filter((item) => item !== '—');\n return parts.length ? parts.join(', ') : '—';\n }\n if (typeof value === 'object') {\n const record = value as Record<string, unknown>;\n const labeled = record['title'] ?? record['text'] ?? record['label'] ?? record['name'] ?? record['displayName'];\n const resolved = resolvePrintPlainText(labeled);\n if (resolved) {\n return resolved.replace(/<[^>]*>/g, ' ').replace(/\\s+/g, ' ').trim();\n }\n if (record['value'] != null) {\n return formatPrintAnswerText(record['value']);\n }\n try {\n return JSON.stringify(value);\n } catch {\n return '—';\n }\n }\n return String(value);\n}\n\nexport interface QuestionnairePrintQuestionHtml {\n titleHtml: string;\n answerHtml: string;\n number?: string;\n answered?: boolean;\n /** Full cloned `.__question-item` card; used as-is when present. */\n cardHtml?: string;\n}\n\nexport interface QuestionnairePrintBodySection {\n title: string;\n questions: QuestionnairePrintQuestionHtml[];\n}\n\nexport function buildQuestionnaireQuestionCardHtml(input: QuestionnairePrintQuestionHtml): string {\n if (input.cardHtml?.trim()) {\n return input.cardHtml.trim();\n }\n const titleHtml = input.titleHtml.includes('__question-title')\n ? input.titleHtml\n : `<h3 class=\"__question-title\">${input.titleHtml}</h3>`;\n const number = input.number\n ? `<div class=\"__question-header-left\"><span class=\"__question-number\">${escapePrintDocumentText(input.number)}</span></div>`\n : '';\n const itemClass = '__question-item __print-plain';\n return (\n `<div class=\"${itemClass}\">` +\n `<div class=\"__question-header\">${number}` +\n `<div class=\"__question-header-right\"><div class=\"__question-title-block\">${titleHtml}</div></div>` +\n `</div>` +\n `<div class=\"__question-widget\">${input.answerHtml}</div>` +\n `</div>`\n );\n}\n\nexport function buildQuestionnairePrintBodyHtml(input: {\n title: string;\n caseTitle?: string;\n status?: string;\n sections: QuestionnairePrintBodySection[];\n}): string {\n const title = escapePrintDocumentText(input.title || 'Questionnaire');\n const meta = [\n input.caseTitle ? `<div><span>Case</span>${escapePrintDocumentText(input.caseTitle)}</div>` : '',\n input.status ? `<div><span>Status</span>${escapePrintDocumentText(input.status)}</div>` : '',\n ]\n .filter(Boolean)\n .join('');\n const sections = input.sections\n .map((section) => {\n const questions = section.questions.map((question) => buildQuestionnaireQuestionCardHtml(question)).join('');\n return `<section class=\"section\"><h2>${escapePrintDocumentText(section.title)}</h2>${questions}</section>`;\n })\n .join('');\n return `<h1>${title}</h1>${meta ? `<div class=\"meta\">${meta}</div>` : ''}${sections}`;\n}\n\n/** Q&A sections only — title/date live in the questionnaire print child template. */\nexport function buildQuestionnaireSessionBodyHtml(input: {\n sections: QuestionnairePrintBodySection[];\n}): string {\n return input.sections\n .map((section) => {\n const questions = section.questions.map((question) => buildQuestionnaireQuestionCardHtml(question)).join('');\n return `<section class=\"section\"><h2>${escapePrintDocumentText(section.title)}</h2>${questions}</section>`;\n })\n .join('');\n}\n\nexport interface QuestionnairePrintHeaderInput {\n title: string;\n caseTitle?: string;\n sessionDate?: string;\n statusLabel?: string;\n}\n\n/** Compact repeating questionnaire band: title left, date/status right. */\nexport function buildQuestionnairePrintHeaderRegion(input: QuestionnairePrintHeaderInput): string {\n const title = escapePrintDocumentText(input.title.trim() || 'Questionnaire');\n const caseTitle = escapePrintDocumentText((input.caseTitle ?? '').trim());\n const sessionDate = escapePrintDocumentText((input.sessionDate ?? '').trim());\n const statusLabel = escapePrintDocumentText((input.statusLabel ?? '').trim());\n const sub = caseTitle\n ? `<div style=\"font-size:7.5pt;line-height:1.25;color:#64748b;margin-top:1px;\">${caseTitle}</div>`\n : '';\n const right = [sessionDate, statusLabel].filter(Boolean).join(' · ');\n const rightCell = right\n ? `<td style=\"vertical-align:middle;text-align:right;padding:1px 0 2px;white-space:nowrap;font-size:8pt;line-height:1.25;color:#64748b;width:36%;\">${right}</td>`\n : '';\n return (\n `<header data-print-region=\"header\" class=\"__print-page-header\">` +\n `<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" ` +\n `style=\"width:100%;border-collapse:collapse;margin-top:2px;\">` +\n `<tr><td style=\"vertical-align:middle;padding:1px 0 2px;\">` +\n `<div style=\"font-size:10pt;line-height:1.2;font-weight:700;color:#0f172a;\">${title}</div>${sub}` +\n `</td>${rightCell}</tr></table>` +\n `<div style=\"border-bottom:1px solid #cbd5e1;font-size:0;line-height:0;\">&nbsp;</div>` +\n `</header>`\n );\n}\n\n/**\n * Ensures the compact questionnaire header is the last `data-print-region=\"header\"`\n * (under the company letterhead) and removes the old first-page-only title block.\n */\nexport function applyQuestionnairePrintHeader(html: string, input: QuestionnairePrintHeaderInput): string {\n const region = buildQuestionnairePrintHeaderRegion(input);\n let next = html.replace(\n /<div class=\"__print-doc-head\">\\s*<h1\\b[^>]*>[\\s\\S]*?<\\/h1>\\s*<div class=\"__print-doc-meta\">[\\s\\S]*?<\\/div>\\s*<\\/div>/i,\n '',\n );\n const headerRe = /<header\\b[^>]*data-print-region=[\"']header[\"'][^>]*>[\\s\\S]*?<\\/header>/gi;\n const headers = next.match(headerRe) ?? [];\n if (headers.length >= 2) {\n let index = 0;\n return next.replace(headerRe, (block) => {\n index += 1;\n return index === headers.length ? region : block;\n });\n }\n if (headers.length === 1) {\n return next.replace(headerRe, (block) => `${block}${region}`);\n }\n return `${region}${next}`;\n}\n\n/** Inner body of a wrapped print document, without watermark. */\nexport function extractPrintDocumentBodyHtml(html: string): string {\n const trimmed = html.trim();\n const bodyMatch = trimmed.match(/<body[^>]*>([\\s\\S]*)<\\/body>/i);\n const inner = (bodyMatch?.[1] ?? trimmed).trim();\n return inner.replace(/<div class=\"__print-watermark\"[^>]*>[\\s\\S]*?<\\/div>/gi, '').trim();\n}\n\nexport function wrapPrintDocument(input: {\n title: string;\n bodyHtml: string;\n headerHtml?: string;\n footerHtml?: string;\n print?: Partial<QuestionnairePrintSettings> | null;\n}): { html: string; headerHtml: string; footerHtml: string } {\n const title = escapePrintDocumentText(input.title || 'Questionnaire');\n const print = resolvePrintSettings(input.print);\n const watermark = print.watermark\n ? `<div class=\"__print-watermark\" aria-hidden=\"true\">${escapePrintDocumentText(print.watermark)}</div>`\n : '';\n const html =\n `<!doctype html><html><head><meta charset=\"utf-8\"/>` +\n `<title>${title}</title>` +\n `<style>${buildPrintDocumentCss(print)}</style></head><body>` +\n `${watermark}${input.bodyHtml}` +\n `</body></html>`;\n return {\n html,\n headerHtml:\n input.headerHtml !== undefined\n ? input.headerHtml\n : `<span style=\"font-weight:700;\">${title}</span>`,\n footerHtml:\n input.footerHtml !== undefined\n ? input.footerHtml\n : '<span style=\"font-size:8pt;color:#94a3b8;font-family:Arial,Helvetica,sans-serif;\"><span class=\"pageNumber\"></span> / <span class=\"totalPages\"></span></span>',\n };\n}\n\nexport function escapePrintDocumentText(value: string): string {\n return value\n .replace(/&/g, '&amp;')\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;')\n .replace(/\"/g, '&quot;')\n .replace(/'/g, '&#39;');\n}\n\n//#endregion\n","import { AXPEntityReference } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n//#region ---- Types ----\nexport type AXMAssessmentCaseStatus =\n | 'draft'\n | 'active'\n | 'in-progress'\n | 'closed'\n | 'cancelled';\n\nexport interface AXMAssessmentManagementAssessmentCaseEntityModel extends AXPEntityModel<string> {\n\n /**\n * Single questionnaire assigned to this case.\n */\n questionnaireId: string;\n\n /**\n * Optional friendly title for lists/search.\n */\n title: string;\n\n /**\n * Target entity (e.g. AssetManagement.Asset, HumanCapital.Employee).\n */\n subjectRef: AXPEntityReference;\n\n /** Status plugin field (`assessment-management.status.case`). */\n statusId?: AXMAssessmentCaseStatus;\n}\n\n//#endregion\n\n","import { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n//#region ---- Types ----\nexport type AXMAssessmentSessionRole = 'responder' | 'supervisor' | 'reviewer';\n\nexport type AXMAssessmentSessionStatus = 'not-started' | 'in-progress' | 'submitted' | 'under-review' | 'approved' | 'rejected' | 'completed';\n\nexport interface AXMAssessmentManagementAssessmentSessionEntityModel extends AXPEntityModel<string> {\n caseId: string;\n\n // Responder\n responderId: string;\n role: AXMAssessmentSessionRole;\n\n /** Status plugin field (`assessment-management.status.session`). */\n statusId?: AXMAssessmentSessionStatus;\n\n // Time tracking\n startedAt?: Date;\n lastSavedAt?: Date;\n timeSpent?: number; // Total seconds\n\n // Progress\n progressPercentage: number;\n answeredQuestionsCount: number;\n\n // Answers\n answers: Record<string, unknown>;\n\n /**\n * Evaluated questionnaire outcome values (rule `name` → value), snapshot at submit.\n */\n outcomes?: Record<string, unknown>;\n\n /**\n * Gzip+base64 print HTML captured on the client after submit.\n * Server gunzips this and sends it to the HTML-to-PDF engine.\n */\n printHtmlGzip?: string;\n\n // Override chain\n previousId?: string;\n}\n\n//#endregion\n\n","import { AXPMultiLanguageString, AXPWidgetNode } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\nimport type {\n AXMAssessmentQuestionCommentConfig,\n AXMAssessmentQuestionHintConfig,\n} from '../../question-bank-item.contracts';\n//#region ---- QuestionBankItem Model ----\n\n/** Provenance when `interface` was loaded from a meta-data definition (frozen clone). */\nexport interface AXMQuestionBankItemInterfaceMetadata {\n id: string;\n name: string;\n title: AXPMultiLanguageString | string;\n /**\n * TODO: Set from definition versioning when the versioning system is implemented (placeholder until then).\n */\n version: number;\n}\n\nexport type AXMQuestionBankItemInterfaceValue = AXPWidgetNode & {\n metadata?: AXMQuestionBankItemInterfaceMetadata;\n};\n\nexport interface AXMAssessmentManagementQuestionBankItemEntityModel extends AXPEntityModel<string> {\n /**\n * Short label for the question bank list (administrators).\n * Not used as the respondent-facing question text; see `question`.\n */\n title: AXPMultiLanguageString;\n /** Unique variable name for questionnaire outcomes (answer.eval('name')). */\n name?: string;\n /** Respondent-facing question body (rich text). */\n question?: AXPMultiLanguageString;\n /** Optional note (rich text); formerly description. */\n note?: AXPMultiLanguageString;\n categoryId?: string;\n /** Registered catalog scope keys (see platform catalog scope providers). */\n catalogScopeKeys?: string[];\n\n /** Resolved scope labels for list display (enriched by catalog-scope resolver middleware). */\n catalogScopes?: Array<{ name: string; title: string; cssClass?: string }>;\n tags?: string[];\n\n // Question Properties\n difficulty?: 'easy' | 'medium' | 'hard';\n estimatedTime?: number; // seconds\n\n /** Default hint (rich text + style, or off). Overridable per questionnaire item. */\n hint?: AXMAssessmentQuestionHintConfig;\n\n /** Default respondent comment box policy (overridable per questionnaire item). */\n comment?: AXMAssessmentQuestionCommentConfig;\n\n // User Interface — widget node plus optional provenance when cloned from a meta-data definition (frozen snapshot).\n interface?: AXMQuestionBankItemInterfaceValue;\n}\n\n//#endregion\n\n","\n//#region ---- Question comment value object ----\n\nimport type { AXPExpression } from '@acorex-platform/framework-shared/core';\nimport type { AXMAssessmentQuestionCommentConfig } from '../../question-bank-item.contracts';\n\n/**\n * Default when no configuration is stored.\n */\nexport const DEFAULT_QUESTION_COMMENT_CONFIG: AXMAssessmentQuestionCommentConfig = {\n enabled: false,\n required: false,\n};\n\n/**\n * Normalizes `enabled` / `isVisible`-style flags: booleans, legacy string booleans, or expression strings.\n */\nfunction normalizeCommentFlag(\n value: boolean | AXPExpression | null | undefined,\n emptyAs: false | undefined,\n): boolean | AXPExpression | undefined {\n if (value === undefined || value === null) {\n return emptyAs;\n }\n if (value === true || value === false) {\n return value;\n }\n if (typeof value === 'string') {\n const trimmed = value.trim();\n if (!trimmed) {\n return emptyAs;\n }\n const lower = trimmed.toLowerCase();\n if (lower === 'true' || lower === '1') {\n return true;\n }\n if (lower === 'false' || lower === '0') {\n return false;\n }\n return trimmed;\n }\n return value;\n}\n\n/**\n * Normalizes API / partial values to a complete config.\n * Preserves expression strings on `enabled` (Allow Comments toggle binding).\n */\nexport function normalizeQuestionCommentConfig(\n value: Partial<AXMAssessmentQuestionCommentConfig> | null | undefined,\n): AXMAssessmentQuestionCommentConfig {\n const enabled = normalizeCommentFlag(value?.enabled, false);\n const isVisible = normalizeCommentFlag(value?.isVisible, undefined);\n return {\n enabled: enabled === undefined ? false : enabled,\n required: value?.required === true,\n ...(isVisible !== undefined ? { isVisible } : {}),\n };\n}\n\n/**\n * Merges question bank defaults with optional questionnaire item overrides.\n */\nexport function mergeQuestionCommentConfig(\n bank: Partial<AXMAssessmentQuestionCommentConfig> | null | undefined,\n override: Partial<AXMAssessmentQuestionCommentConfig> | null | undefined,\n): AXMAssessmentQuestionCommentConfig {\n const b = normalizeQuestionCommentConfig(bank);\n if (!override) {\n return b;\n }\n const overrideEnabled =\n override.enabled !== undefined ? normalizeCommentFlag(override.enabled, false) : undefined;\n const overrideVis = normalizeCommentFlag(override.isVisible, undefined);\n return {\n enabled: overrideEnabled !== undefined ? overrideEnabled : b.enabled,\n required: override.required !== undefined ? override.required === true : b.required,\n ...(overrideVis !== undefined\n ? { isVisible: overrideVis }\n : b.isVisible !== undefined\n ? { isVisible: b.isVisible }\n : {}),\n };\n}\n\n/**\n * Returns only fields that differ from the bank default (for persisting questionnaire item overrides).\n */\nexport function diffQuestionCommentOverride(\n bank: AXMAssessmentQuestionCommentConfig,\n edited: AXMAssessmentQuestionCommentConfig,\n): Partial<AXMAssessmentQuestionCommentConfig> | undefined {\n const diff: Partial<AXMAssessmentQuestionCommentConfig> = {};\n if (edited.enabled !== bank.enabled) {\n diff.enabled = edited.enabled;\n }\n if (edited.required !== bank.required) {\n diff.required = edited.required;\n }\n if (edited.isVisible !== bank.isVisible) {\n diff.isVisible = edited.isVisible;\n }\n return Object.keys(diff).length > 0 ? diff : undefined;\n}\n\n/**\n * Form context for the question edit dialog: surface legacy `isVisible` expressions on `enabled`\n * (Allow Comments) so they display and save like question `isVisible`.\n */\nexport function commentConfigForEditForm(\n merged: AXMAssessmentQuestionCommentConfig,\n): Pick<AXMAssessmentQuestionCommentConfig, 'enabled' | 'required'> {\n const legacyVis = merged.isVisible;\n if (merged.enabled === true && typeof legacyVis === 'string' && legacyVis.trim()) {\n return {\n enabled: legacyVis.trim(),\n required: merged.required,\n };\n }\n return {\n enabled: merged.enabled,\n required: merged.required,\n };\n}\n\n/**\n * Effective visibility flag for the comment box (for async evaluation).\n * Prefers expression/`false` on `enabled`; falls back to legacy `isVisible` when `enabled === true`.\n */\nexport function getQuestionCommentVisibilityFlag(\n comment: AXMAssessmentQuestionCommentConfig | null | undefined,\n): boolean | AXPExpression | undefined {\n if (!comment) {\n return false;\n }\n const { enabled, isVisible } = comment;\n if (enabled === false) {\n return false;\n }\n if (typeof enabled === 'string') {\n return enabled;\n }\n // enabled === true — optional legacy gate\n return isVisible;\n}\n\n/**\n * Context path for the respondent comment text for a questionnaire item (`answers.comments.<itemName>`).\n */\nexport function getQuestionAnswerCommentStoragePath(questionItemName: string): string {\n return `answers.comments.${questionItemName}`;\n}\n\n//#endregion\n","import type { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\n\nimport type {\n AXMAssessmentQuestionHintConfig,\n AXMAssessmentQuestionHintConfigOff,\n AXMAssessmentQuestionHintConfigShown,\n AXMAssessmentQuestionHintMode,\n AXMAssessmentQuestionHintPartial,\n AXMAssessmentQuestionHintVisualMode,\n} from '../../question-bank-item.contracts';\n\n//#region ---- Question hint value object ----\n\nexport const DEFAULT_QUESTION_HINT_CONFIG: AXMAssessmentQuestionHintConfig = { mode: 'off' };\n\nconst VISUAL_MODES: readonly AXMAssessmentQuestionHintVisualMode[] = [\n 'info',\n 'warning',\n 'danger',\n 'success',\n 'neutral',\n];\n\nfunction isEmptyHintContent(c: AXPMultiLanguageString | undefined): boolean {\n if (c == null) {\n return true;\n }\n if (typeof c === 'string') {\n return c.trim().length === 0;\n }\n if (typeof c === 'object') {\n return Object.values(c as Record<string, unknown>).every(\n (v) => typeof v !== 'string' || v.trim().length === 0,\n );\n }\n return true;\n}\n\n/** Normalizes select / API values to a hint mode (exported for questionnaire builder forms). */\nexport function normalizeQuestionHintMode(raw: unknown): AXMAssessmentQuestionHintMode | undefined {\n if (raw == null) {\n return undefined;\n }\n if (typeof raw === 'string') {\n if (raw === 'off') {\n return 'off';\n }\n if (VISUAL_MODES.includes(raw as AXMAssessmentQuestionHintVisualMode)) {\n return raw as AXMAssessmentQuestionHintVisualMode;\n }\n return undefined;\n }\n if (typeof raw === 'object' && raw !== null && 'id' in raw) {\n const id = (raw as { id: unknown }).id;\n return normalizeQuestionHintMode(id);\n }\n return undefined;\n}\n\n/**\n * Reads optional `hint` or legacy flat `hintContent` / `hintMode` from a record (API / persisted rows).\n */\nexport function readHintFieldsFromRecord(rec: Record<string, unknown> | null | undefined): {\n hint?: unknown;\n legacyContent?: unknown;\n legacyMode?: unknown;\n} {\n if (!rec) {\n return {};\n }\n const hint = rec['hint'] ?? rec['Hint'];\n const legacyContent = rec['hintContent'] ?? rec['hint_content'];\n const legacyMode = rec['hintMode'] ?? rec['hint_mode'];\n return { hint, legacyContent, legacyMode };\n}\n\n/**\n * Normalizes API / partial values to a complete config. Coerces legacy flat fields when `hint` is absent.\n */\nexport function normalizeQuestionHintConfig(\n value: AXMAssessmentQuestionHintConfig | AXMAssessmentQuestionHintPartial | null | undefined,\n legacy?: { hintContent?: AXPMultiLanguageString; hintMode?: unknown },\n): AXMAssessmentQuestionHintConfig {\n let mode = normalizeQuestionHintMode(\n value && typeof value === 'object' && 'mode' in value ? (value as { mode?: unknown }).mode : undefined,\n );\n let content =\n value && typeof value === 'object' && 'content' in value\n ? ((value as { content?: AXPMultiLanguageString }).content as AXPMultiLanguageString | undefined)\n : undefined;\n\n const hintObj = value && typeof value === 'object' && ('mode' in value || 'content' in value) ? value : null;\n const noStructuredHint = !hintObj || (mode === undefined && content === undefined);\n\n if (noStructuredHint && legacy) {\n const lm = normalizeQuestionHintMode(legacy.hintMode);\n const lc = legacy.hintContent;\n if (lm !== undefined) {\n mode = lm;\n }\n if (lc !== undefined) {\n content = lc;\n }\n }\n\n if (mode === 'off' || mode === undefined) {\n if (mode === undefined && content != null && !isEmptyHintContent(content)) {\n const fallbackMode: AXMAssessmentQuestionHintVisualMode = 'info';\n return { mode: fallbackMode, content: content as AXPMultiLanguageString };\n }\n return { mode: 'off' };\n }\n\n if (isEmptyHintContent(content)) {\n return { mode: 'off' };\n }\n\n return { mode, content: content as AXPMultiLanguageString };\n}\n\n/**\n * Merges question bank defaults with optional questionnaire item overrides (per-field, like former hintContent/hintMode).\n */\nexport function mergeQuestionHintForViewer(\n bank: AXMAssessmentQuestionHintConfig | null | undefined,\n item: AXMAssessmentQuestionHintPartial | null | undefined,\n): AXMAssessmentQuestionHintConfig {\n const b = normalizeQuestionHintConfig(bank);\n if (!item || (item.mode === undefined && item.content === undefined)) {\n return b;\n }\n\n if (item.mode !== undefined) {\n const mode = normalizeQuestionHintMode(item.mode) ?? 'off';\n if (mode === 'off') {\n return { mode: 'off' };\n }\n const content =\n item.content !== undefined\n ? item.content\n : b.mode !== 'off'\n ? b.content\n : undefined;\n return normalizeQuestionHintConfig({ mode, content });\n }\n\n const mode: AXMAssessmentQuestionHintMode = b.mode !== 'off' ? b.mode : 'info';\n return normalizeQuestionHintConfig({ mode, content: item.content });\n}\n\n/**\n * Returns only fields that differ from the bank default (for persisting questionnaire item overrides).\n */\nexport function diffQuestionHintOverride(\n bank: AXMAssessmentQuestionHintConfig,\n edited: AXMAssessmentQuestionHintConfig,\n): AXMAssessmentQuestionHintPartial | undefined {\n if (edited.mode === 'off' && bank.mode === 'off') {\n return undefined;\n }\n if (edited.mode === 'off' && bank.mode !== 'off') {\n return { mode: 'off' };\n }\n if (bank.mode === 'off' && edited.mode !== 'off') {\n return { mode: edited.mode, content: edited.content };\n }\n const diff: AXMAssessmentQuestionHintPartial = {};\n if (edited.mode !== bank.mode) {\n diff.mode = edited.mode;\n }\n if (edited.mode !== 'off') {\n const bc = bank.mode !== 'off' ? bank.content : undefined;\n const ec = edited.content;\n if (JSON.stringify(ec ?? null) !== JSON.stringify(bc ?? null)) {\n diff.content = ec;\n }\n }\n return Object.keys(diff).length > 0 ? diff : undefined;\n}\n\n/**\n * Normalizes a question bank row (or similar) to a full hint config, including legacy flat fields.\n */\nexport function normalizeQuestionHintFromEntityRow(row: unknown): AXMAssessmentQuestionHintConfig {\n const fr = readHintFieldsFromRecord(row as Record<string, unknown> | null | undefined);\n return normalizeQuestionHintConfig(\n fr.hint as AXMAssessmentQuestionHintConfig | AXMAssessmentQuestionHintPartial | null | undefined,\n {\n hintContent: fr.legacyContent as AXPMultiLanguageString | undefined,\n hintMode: fr.legacyMode,\n },\n );\n}\n\n/**\n * Reads optional questionnaire item hint override from a persisted item record (including legacy keys).\n */\nexport function parseQuestionHintPartialFromRecord(\n row: Record<string, unknown> | null | undefined,\n): AXMAssessmentQuestionHintPartial | undefined {\n if (!row) {\n return undefined;\n }\n const fr = readHintFieldsFromRecord(row);\n if (fr.hint != null && typeof fr.hint === 'object' && !Array.isArray(fr.hint)) {\n const h = fr.hint as AXMAssessmentQuestionHintPartial;\n if (h.mode !== undefined || h.content !== undefined) {\n const out: AXMAssessmentQuestionHintPartial = {};\n if (h.mode !== undefined) {\n const m = normalizeQuestionHintMode(h.mode);\n if (m !== undefined) {\n out.mode = m;\n }\n }\n if (h.content !== undefined) {\n out.content = h.content;\n }\n return Object.keys(out).length > 0 ? out : undefined;\n }\n }\n if (fr.legacyContent == null && fr.legacyMode == null) {\n return undefined;\n }\n const out: AXMAssessmentQuestionHintPartial = {};\n if (fr.legacyMode !== undefined) {\n const m = normalizeQuestionHintMode(fr.legacyMode);\n if (m !== undefined) {\n out.mode = m;\n }\n }\n if (fr.legacyContent !== undefined) {\n out.content = fr.legacyContent as AXPMultiLanguageString;\n }\n return Object.keys(out).length > 0 ? out : undefined;\n}\n\n//#endregion\n","import { resolveToSurfaceClass, type AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\n\n/**\n * Shared pre/post content and outcome rules for questionnaires and form templates.\n */\n\n/**\n * Pre- / post-questionnaire rich text (welcome, summary, etc.).\n * @alias AXPMultiLanguageString\n */\nexport type PrePostContentValue = AXPMultiLanguageString;\n\n/**\n * Pre-questionnaire configuration (shown before questions).\n */\nexport interface PreQuestionnaireConfig {\n enabled: boolean;\n /** Rich text content. Supports multi-language: Record<locale, string>. */\n content?: PrePostContentValue;\n}\n\n/**\n * Post-questionnaire configuration (review before submit, summary after submit).\n * Summary content supports placeholders: {{totalQuestions}}, {{answeredCount}}, {{totalTime}}, {{elapsedSeconds}}, and {{outcomeName}} from configured outcomes.\n */\nexport interface PostQuestionnaireConfig {\n /** Show review step before submit (all answers, edit/submit). */\n reviewEnabled: boolean;\n /** Show summary screen after submit. */\n summaryEnabled: boolean;\n /** When true, show a separate step with outcome results (name/value list). */\n showOutcomeResults?: boolean;\n /** Rich text content for summary. Supports multi-language and placeholders. */\n summaryContent?: PrePostContentValue;\n}\n\nexport const DEFAULT_PRE_QUESTIONNAIRE_CONFIG: PreQuestionnaireConfig = { enabled: false };\n\nexport const DEFAULT_POST_QUESTIONNAIRE_CONFIG: PostQuestionnaireConfig = {\n reviewEnabled: false,\n summaryEnabled: false,\n showOutcomeResults: false,\n};\n\n/**\n * Pre/post configuration for viewer flow (from {@link toPrePostConfig}).\n */\nexport interface PrePostConfig {\n pre: PreQuestionnaireConfig;\n post: PostQuestionnaireConfig;\n}\n\n/** Primitive type of an evaluated outcome value (coercion after expression runs). */\nexport type QuestionnaireOutcomeResultKind = 'number' | 'string' | 'boolean';\n\n/** Text emphasis for outcome result display rules. */\nexport type QuestionnaireOutcomeDisplayEmphasis = 'normal' | 'medium' | 'bold';\n\n/** Comparison operator for display rule conditions against the evaluated outcome `value`. */\nexport type QuestionnaireOutcomeDisplayOperator = 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte';\n\n/**\n * Theme color chooser value: a surface class such as `warning-lightest-surface`,\n * or three hex tokens `\"#foreground #background #border\"`.\n */\nexport type QuestionnaireOutcomeDisplayColor = string;\n\n/** Icon chooser value or resolved Font Awesome class string. */\nexport type QuestionnaireOutcomeDisplayIcon =\n | string\n | {\n label?: string;\n styleClass?: string;\n iconClass?: string;\n };\n\n/**\n * Conditional styling for an outcome value in the results step.\n * Rules are evaluated in order; the first matching condition wins.\n */\nexport interface QuestionnaireOutcomeDisplayRule {\n id: string;\n order: number;\n operator: QuestionnaireOutcomeDisplayOperator;\n compareValue: number | string | boolean;\n /** Theme color chooser value applied to the outcome value in results. */\n color: QuestionnaireOutcomeDisplayColor;\n emphasis?: QuestionnaireOutcomeDisplayEmphasis;\n icon?: QuestionnaireOutcomeDisplayIcon;\n}\n\nconst OUTCOME_DISPLAY_OPERATORS: QuestionnaireOutcomeDisplayOperator[] = [\n 'eq',\n 'neq',\n 'gt',\n 'gte',\n 'lt',\n 'lte',\n];\n\nconst OUTCOME_DISPLAY_EMPHASIS: QuestionnaireOutcomeDisplayEmphasis[] = ['normal', 'medium', 'bold'];\n\nfunction normalizeOutcomeDisplayColor(value: unknown): string | undefined {\n if (typeof value !== 'string') {\n return undefined;\n }\n const trimmed = value.trim();\n if (!trimmed) {\n return undefined;\n }\n const surfaceClass = resolveToSurfaceClass(trimmed);\n if (surfaceClass) {\n return surfaceClass;\n }\n const parts = trimmed.split(/\\s+/);\n if (parts.length === 3 && parts.every((part) => part.startsWith('#'))) {\n return parts.join(' ');\n }\n return undefined;\n}\n\nfunction normalizeOutcomeDisplayOperator(value: unknown): QuestionnaireOutcomeDisplayOperator | undefined {\n const raw =\n typeof value === 'string'\n ? value\n : typeof value === 'object' && value !== null && 'id' in value\n ? String((value as { id?: unknown }).id ?? '')\n : '';\n const normalized = raw.trim().toLowerCase();\n return OUTCOME_DISPLAY_OPERATORS.includes(normalized as QuestionnaireOutcomeDisplayOperator)\n ? (normalized as QuestionnaireOutcomeDisplayOperator)\n : undefined;\n}\n\nfunction normalizeOutcomeDisplayCompareValue(value: unknown): number | string | boolean | undefined {\n if (typeof value === 'number' && Number.isFinite(value)) {\n return value;\n }\n if (typeof value === 'boolean') {\n return value;\n }\n if (typeof value === 'string') {\n const trimmed = value.trim();\n if (!trimmed) {\n return undefined;\n }\n if (trimmed === 'true') return true;\n if (trimmed === 'false') return false;\n const asNumber = Number(trimmed);\n if (Number.isFinite(asNumber)) {\n return asNumber;\n }\n return trimmed;\n }\n return undefined;\n}\n\nfunction normalizeOutcomeDisplayEmphasis(value: unknown): QuestionnaireOutcomeDisplayEmphasis {\n const raw =\n typeof value === 'string'\n ? value\n : typeof value === 'object' && value !== null && 'id' in value\n ? String((value as { id?: unknown }).id ?? '')\n : '';\n const normalized = raw.trim().toLowerCase();\n return OUTCOME_DISPLAY_EMPHASIS.includes(normalized as QuestionnaireOutcomeDisplayEmphasis)\n ? (normalized as QuestionnaireOutcomeDisplayEmphasis)\n : 'normal';\n}\n\nfunction normalizeOutcomeDisplayIcon(\n icon: QuestionnaireOutcomeDisplayIcon | null | undefined,\n): string | undefined {\n if (icon == null || icon === '') {\n return undefined;\n }\n if (typeof icon === 'string') {\n const trimmed = icon.trim();\n return trimmed.length > 0 ? trimmed : undefined;\n }\n const styleClass = String(icon.styleClass ?? '').trim();\n const iconClass = String(icon.iconClass ?? '').trim();\n const combined = [styleClass, iconClass].filter(Boolean).join(' ');\n return combined.length > 0 ? combined : undefined;\n}\n\n/** Parses a theme color chooser value into foreground, background, and border parts. */\nexport function parseQuestionnaireOutcomeDisplayColor(\n value: string | null | undefined,\n): { foreground: string; background: string; border: string } | null {\n if (!value?.trim()) {\n return null;\n }\n const parts = value.trim().split(/\\s+/);\n if (parts.length !== 3) {\n return null;\n }\n return {\n foreground: parts[0],\n background: parts[1],\n border: parts[2],\n };\n}\n\nexport function isQuestionnaireOutcomeDisplayColorHex(value: string): boolean {\n return value.trim().startsWith('#');\n}\n\n/**\n * Returns true when the evaluated outcome value matches the display rule condition.\n */\nexport function matchesQuestionnaireOutcomeDisplayRule(\n value: unknown,\n rule: Pick<QuestionnaireOutcomeDisplayRule, 'operator' | 'compareValue'>,\n): boolean {\n const right = rule.compareValue;\n switch (rule.operator) {\n case 'eq':\n return value == right;\n case 'neq':\n return value != right;\n case 'gt':\n return Number(value) > Number(right);\n case 'gte':\n return Number(value) >= Number(right);\n case 'lt':\n return Number(value) < Number(right);\n case 'lte':\n return Number(value) <= Number(right);\n default:\n return false;\n }\n}\n\nexport function normalizeQuestionnaireOutcomeDisplayRules(\n rules: QuestionnaireOutcomeDisplayRule[] | null | undefined,\n): QuestionnaireOutcomeDisplayRule[] {\n if (!Array.isArray(rules)) {\n return [];\n }\n const normalized: QuestionnaireOutcomeDisplayRule[] = [];\n for (const [index, rule] of rules.entries()) {\n const operator = normalizeOutcomeDisplayOperator(rule?.operator);\n const compareValue = normalizeOutcomeDisplayCompareValue(rule?.compareValue);\n const color = normalizeOutcomeDisplayColor(rule?.color);\n if (!operator || compareValue === undefined || !color) {\n continue;\n }\n normalized.push({\n id: String(rule?.id ?? '').trim() || `rule-${index + 1}`,\n order: rule?.order ?? index,\n operator,\n compareValue,\n color,\n emphasis: normalizeOutcomeDisplayEmphasis(rule?.emphasis),\n icon: normalizeOutcomeDisplayIcon(rule?.icon),\n });\n }\n return normalized.sort((a, b) => a.order - b.order);\n}\n\n/**\n * Named outcome rule embedded on a questionnaire.\n * Referenced in expressions via outcome.eval('name') and in summary placeholders as {{name}}.\n */\nexport interface QuestionnaireOutcomeItem {\n id: string;\n /** Unique programmatic name within the questionnaire (variable-name style). */\n name: string;\n title?: AXPMultiLanguageString;\n description?: AXPMultiLanguageString;\n resultKind: QuestionnaireOutcomeResultKind;\n /**\n * Use `{{ ... }}` or plain expression body; scope includes `answer.eval`, `outcome.eval`, and `fn.*`.\n */\n expression: string;\n /** Optional ordered display rules applied to the evaluated value in the results step. */\n displayRules?: QuestionnaireOutcomeDisplayRule[];\n}\n\n/** Section grouping outcome rules (same builder pattern as questionnaire questions). */\nexport interface QuestionnaireOutcomeSection {\n /** Unique technical section name. */\n name: string;\n title?: AXPMultiLanguageString;\n description?: AXPMultiLanguageString;\n order: number;\n items: QuestionnaireOutcomeItem[];\n isNewlyAdded?: boolean;\n}\n\n/** Embedded outcome rules on questionnaire. */\nexport interface QuestionnaireOutcomesValue {\n sections: QuestionnaireOutcomeSection[];\n}\n\nexport const DEFAULT_QUESTIONNAIRE_OUTCOMES: QuestionnaireOutcomesValue = { sections: [] };\n\nexport function normalizeQuestionnaireOutcomesValue(\n value: QuestionnaireOutcomesValue | null | undefined,\n): QuestionnaireOutcomesValue {\n const sections = value?.sections;\n if (!Array.isArray(sections)) {\n return { sections: [] };\n }\n return {\n sections: sections.map((section, index) => ({\n ...section,\n name: (section.name ?? '').trim() || `section-${index + 1}`,\n order: section.order ?? index,\n items: Array.isArray(section.items)\n ? section.items.map((item) => ({\n ...item,\n displayRules: normalizeQuestionnaireOutcomeDisplayRules(item.displayRules),\n }))\n : [],\n })),\n };\n}\n\n/** All outcome items across sections (evaluation, automations, duplicate checks). */\nexport function flattenQuestionnaireOutcomeItems(\n value: QuestionnaireOutcomesValue | null | undefined,\n): QuestionnaireOutcomeItem[] {\n return normalizeQuestionnaireOutcomesValue(value).sections.flatMap((section) => section.items);\n}\n\nexport function findDuplicateOutcomeNames(\n value: QuestionnaireOutcomesValue | null | undefined,\n): string[] {\n const seen = new Map<string, number>();\n for (const item of flattenQuestionnaireOutcomeItems(value)) {\n const key = (item.name ?? '').trim();\n if (!key) continue;\n seen.set(key, (seen.get(key) ?? 0) + 1);\n }\n return Array.from(seen.entries())\n .filter(([, count]) => count > 1)\n .map(([name]) => name);\n}\n\n/** Neutral aliases — questionnaires and form templates store the same outcome document. */\nexport type AssessmentOutcomeResultKind = QuestionnaireOutcomeResultKind;\nexport type AssessmentOutcomeDisplayEmphasis = QuestionnaireOutcomeDisplayEmphasis;\nexport type AssessmentOutcomeDisplayOperator = QuestionnaireOutcomeDisplayOperator;\nexport type AssessmentOutcomeDisplayColor = QuestionnaireOutcomeDisplayColor;\nexport type AssessmentOutcomeDisplayIcon = QuestionnaireOutcomeDisplayIcon;\nexport type AssessmentOutcomeDisplayRule = QuestionnaireOutcomeDisplayRule;\nexport type AssessmentOutcomeItem = QuestionnaireOutcomeItem;\nexport type AssessmentOutcomeSection = QuestionnaireOutcomeSection;\nexport type AssessmentOutcomesValue = QuestionnaireOutcomesValue;\nexport type AssessmentPreContent = PreQuestionnaireConfig;\nexport type AssessmentPostContent = PostQuestionnaireConfig;\n","import { AXPFileListItem, AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n//#region ---- Imports ----\nimport type {\n QuestionnaireBuilderValue,\n QuestionnaireDisplaySettings,\n} from '../../questionnaire-builder.types';\nimport {\n DEFAULT_QUESTIONNAIRE_PRINT_SETTINGS,\n resolvePrintSettings,\n type QuestionnairePrintSettings,\n} from '../../questionnaire-print.types';\n//#endregion\n\n//#region ---- Questionnaire Model ----\n\nimport {\n DEFAULT_POST_QUESTIONNAIRE_CONFIG,\n DEFAULT_PRE_QUESTIONNAIRE_CONFIG,\n DEFAULT_QUESTIONNAIRE_OUTCOMES,\n findDuplicateOutcomeNames,\n flattenQuestionnaireOutcomeItems,\n isQuestionnaireOutcomeDisplayColorHex,\n matchesQuestionnaireOutcomeDisplayRule,\n normalizeQuestionnaireOutcomeDisplayRules,\n normalizeQuestionnaireOutcomesValue,\n parseQuestionnaireOutcomeDisplayColor,\n type AssessmentOutcomeItem,\n type AssessmentOutcomesValue,\n type AssessmentPostContent,\n type AssessmentPreContent,\n type PostQuestionnaireConfig,\n type PrePostConfig,\n type PrePostContentValue,\n type PreQuestionnaireConfig,\n type QuestionnaireOutcomeDisplayColor,\n type QuestionnaireOutcomeDisplayEmphasis,\n type QuestionnaireOutcomeDisplayIcon,\n type QuestionnaireOutcomeDisplayOperator,\n type QuestionnaireOutcomeDisplayRule,\n type QuestionnaireOutcomeItem,\n type QuestionnaireOutcomeResultKind,\n type QuestionnaireOutcomeSection,\n type QuestionnaireOutcomesValue,\n} from '../../assessment-outcome.types';\n\nexport {\n DEFAULT_POST_QUESTIONNAIRE_CONFIG,\n DEFAULT_PRE_QUESTIONNAIRE_CONFIG,\n DEFAULT_QUESTIONNAIRE_OUTCOMES,\n findDuplicateOutcomeNames,\n flattenQuestionnaireOutcomeItems,\n isQuestionnaireOutcomeDisplayColorHex,\n matchesQuestionnaireOutcomeDisplayRule,\n normalizeQuestionnaireOutcomeDisplayRules,\n normalizeQuestionnaireOutcomesValue,\n parseQuestionnaireOutcomeDisplayColor,\n};\nexport type {\n AssessmentOutcomeItem,\n AssessmentOutcomesValue,\n AssessmentPostContent,\n AssessmentPreContent,\n PostQuestionnaireConfig,\n PrePostConfig,\n PrePostContentValue,\n PreQuestionnaireConfig,\n QuestionnaireOutcomeDisplayColor,\n QuestionnaireOutcomeDisplayEmphasis,\n QuestionnaireOutcomeDisplayIcon,\n QuestionnaireOutcomeDisplayOperator,\n QuestionnaireOutcomeDisplayRule,\n QuestionnaireOutcomeItem,\n QuestionnaireOutcomeResultKind,\n QuestionnaireOutcomeSection,\n QuestionnaireOutcomesValue,\n};\n\n/**\n * Entity-level display options (viewer / builder preview). Subset of {@link QuestionnaireDisplaySettings}.\n */\nexport type QuestionnaireEntityDisplaySettings = Pick<\n QuestionnaireDisplaySettings,\n 'viewMode' | 'showProgressBar' | 'showTimer' | 'showQuestionNumbers' | 'validationStrategy' | 'completionMode'\n>;\n\nexport const DEFAULT_QUESTIONNAIRE_ENTITY_DISPLAY: QuestionnaireEntityDisplaySettings = {\n viewMode: 'single-page',\n showProgressBar: true,\n showTimer: false,\n showQuestionNumbers: true,\n validationStrategy: 'step',\n completionMode: 'submit-only',\n};\n\n/** Entity-level print document defaults. */\nexport type QuestionnaireEntityPrintSettings = QuestionnairePrintSettings;\n\nexport const DEFAULT_QUESTIONNAIRE_ENTITY_PRINT: Required<QuestionnaireEntityPrintSettings> =\n DEFAULT_QUESTIONNAIRE_PRINT_SETTINGS;\n\nexport interface AXMAssessmentManagementQuestionnaireEntityModel extends AXPEntityModel<string> {\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString;\n type: 'questionnaire' | 'survey' | 'checklist' | 'test' | 'evaluation';\n\n questions?: QuestionnaireBuilderValue;\n\n /** Named outcome rules evaluated from answers (outcome.eval / summary placeholders). */\n outcomes?: QuestionnaireOutcomesValue;\n\n /** Viewer / preview display. */\n display?: QuestionnaireEntityDisplaySettings;\n\n /** Print document defaults (overridable per print call). */\n print?: QuestionnaireEntityPrintSettings;\n\n /**\n * Content text template used for PDF chrome (child of the tenant print master).\n * Empty uses the seeded Questionnaire Print template.\n */\n printTemplateId?: string | null;\n\n /** Welcome screen before questions. */\n pre?: PreQuestionnaireConfig;\n\n /** Review before submit, summary / results after submit. */\n post?: PostQuestionnaireConfig;\n\n categoryId?: string;\n /** Registered catalog scope keys (see {@link AXP_CATALOG_SCOPE_DEFINITION_PROVIDER}). */\n catalogScopeKeys?: string[];\n\n /** Resolved scope labels for list display (enriched by catalog-scope resolver middleware). */\n catalogScopes?: Array<{ name: string; title: AXPMultiLanguageString | string; cssClass?: string }>;\n tags?: string[];\n color?: string;\n\n /** Reference documents for respondents (attachments plugin). */\n attachments?: AXPFileListItem[] | string[];\n}\n\n/**\n * Maps entity pre/post to viewer config (defaults when omitted).\n */\nexport function toPrePostConfig(q: Partial<AXMAssessmentManagementQuestionnaireEntityModel> | null | undefined): PrePostConfig | null {\n if (!q) {\n return null;\n }\n const pre: PreQuestionnaireConfig = {\n ...DEFAULT_PRE_QUESTIONNAIRE_CONFIG,\n ...q.pre,\n enabled: q.pre?.enabled === true,\n };\n const post: PostQuestionnaireConfig = {\n ...DEFAULT_POST_QUESTIONNAIRE_CONFIG,\n ...q.post,\n reviewEnabled: q.post?.reviewEnabled === true,\n summaryEnabled: q.post?.summaryEnabled === true,\n showOutcomeResults: q.post?.showOutcomeResults === true,\n };\n return { pre, post };\n}\n\nconst VIEW_MODE_VALUES = ['single-page', 'page-per-group', 'page-per-question', 'side-menu'] as const;\ntype ViewModeValue = (typeof VIEW_MODE_VALUES)[number];\nconst VALIDATION_STRATEGY_VALUES = ['step', 'end'] as const;\ntype ValidationStrategyValue = (typeof VALIDATION_STRATEGY_VALUES)[number];\nconst COMPLETION_MODE_VALUES = ['submit-only', 'save-and-continue'] as const;\ntype CompletionModeValue = (typeof COMPLETION_MODE_VALUES)[number];\n\n/**\n * Coerces stored view mode (string or SelectBox `{ id }`) to a known value.\n */\nexport function normalizeViewMode(value: unknown): ViewModeValue {\n if (typeof value === 'string' && VIEW_MODE_VALUES.includes(value as ViewModeValue)) {\n return value as ViewModeValue;\n }\n if (value != null && typeof value === 'object' && 'id' in value && typeof (value as { id: string }).id === 'string') {\n return normalizeViewMode((value as { id: string }).id);\n }\n return 'single-page';\n}\n\n/**\n * Coerces stored validation strategy (string or SelectBox `{ id }`) to a known value.\n */\nexport function normalizeValidationStrategy(value: unknown): ValidationStrategyValue {\n if (typeof value === 'string' && VALIDATION_STRATEGY_VALUES.includes(value as ValidationStrategyValue)) {\n return value as ValidationStrategyValue;\n }\n if (value != null && typeof value === 'object' && 'id' in value && typeof (value as { id: string }).id === 'string') {\n return normalizeValidationStrategy((value as { id: string }).id);\n }\n return 'step';\n}\n\n/**\n * Coerces stored completion mode (string or SelectBox `{ id }`) to a known value.\n */\nexport function normalizeCompletionMode(value: unknown): CompletionModeValue {\n if (typeof value === 'string' && COMPLETION_MODE_VALUES.includes(value as CompletionModeValue)) {\n return value as CompletionModeValue;\n }\n if (value != null && typeof value === 'object' && 'id' in value && typeof (value as { id: string }).id === 'string') {\n return normalizeCompletionMode((value as { id: string }).id);\n }\n return 'submit-only';\n}\n\n/**\n * Maps entity `display` to {@link QuestionnaireDisplaySettings} (defaults when omitted).\n */\nexport function toDisplaySettings(q: Partial<AXMAssessmentManagementQuestionnaireEntityModel> | null | undefined): QuestionnaireDisplaySettings | null {\n if (!q) {\n return null;\n }\n const d = { ...DEFAULT_QUESTIONNAIRE_ENTITY_DISPLAY, ...q.display };\n return {\n viewMode: normalizeViewMode(d.viewMode),\n showProgressBar: d.showProgressBar ?? true,\n showTimer: d.showTimer ?? false,\n showQuestionNumbers: d.showQuestionNumbers ?? true,\n validationStrategy: normalizeValidationStrategy(d.validationStrategy),\n completionMode: normalizeCompletionMode(d.completionMode),\n };\n}\n\n/**\n * Maps entity `print` to {@link QuestionnairePrintSettings} (defaults when omitted).\n */\nexport function toPrintSettings(\n q: Partial<AXMAssessmentManagementQuestionnaireEntityModel> | null | undefined,\n): QuestionnairePrintSettings | null {\n if (!q) {\n return null;\n }\n return resolvePrintSettings(q.print);\n}\n\n//#endregion\n","import { AXPEntityCreateDto, AXPEntityDetailDto, AXPEntityListItemDto, AXPEntityUpdateDto } from '@acorex-platform/framework-shared/entity';\nimport type { AssessmentOutcomesValue, AssessmentPostContent, AssessmentPreContent } from '../../assessment-outcome.types';\n\nexport interface AXMFormTemplateTypeOption {\n id: number;\n title: string;\n}\n\nexport const AXMFormTemplateTypes = {\n Form: {\n id: 10,\n title: '@form-template-management:templates.entities.template.fields.type.options.form',\n } satisfies AXMFormTemplateTypeOption,\n Widget: {\n id: 20,\n title: '@form-template-management:templates.entities.template.fields.type.options.widget',\n } satisfies AXMFormTemplateTypeOption,\n Report: {\n id: 30,\n title: '@form-template-management:templates.entities.template.fields.type.options.report',\n } satisfies AXMFormTemplateTypeOption,\n};\n\nexport type AXMFormTemplateType = (typeof AXMFormTemplateTypes)[keyof typeof AXMFormTemplateTypes];\n\nexport interface AXMCreateFormTemplateDto extends AXPEntityCreateDto {\n code: string;\n title: string;\n description?: string;\n template?: string | null;\n type: AXMFormTemplateTypeOption;\n categoryIds: string[];\n pre?: AssessmentPreContent;\n post?: AssessmentPostContent;\n outcomes?: AssessmentOutcomesValue;\n}\n\nexport interface AXMUpdateFormTemplateDto extends AXPEntityUpdateDto<string> {\n title: string;\n description?: string;\n type: AXMFormTemplateTypeOption;\n template?: string;\n categoryIds: string[];\n pre?: AssessmentPreContent;\n post?: AssessmentPostContent;\n outcomes?: AssessmentOutcomesValue;\n}\n\nexport interface AXMFormTemplateDetailDto extends AXPEntityDetailDto<string> {\n title: string;\n description?: string;\n type: AXMFormTemplateTypeOption;\n template: string | null;\n categoryIds: string[];\n categories: { id: string, title: string }[];\n pre?: AssessmentPreContent;\n post?: AssessmentPostContent;\n outcomes?: AssessmentOutcomesValue;\n}\n\nexport interface AXMFormTemplateListItemDto extends AXPEntityListItemDto<string> {\n title: string;\n description?: string;\n type: AXMFormTemplateTypeOption;\n categoryIds: string[];\n categories: { id: string, title: string }[];\n}\n","//#region ---- Contracts barrel ----\n\nexport * from './features.keys';\nexport * from './menu.keys';\nexport * from './form-template-menu.keys';\nexport * from './permission.keys';\nexport * from './form-template-permission.keys';\nexport * from './form-template-settings.keys';\n\nexport * from './QUESTIONNAIRE_OUTCOMES_PAGE_COMPONENT_KEY';\nexport * from './QUESTIONNAIRE_QUESTIONS_PAGE_COMPONENT_KEY';\n\nexport * from './question-bank-item.contracts';\nexport * from './questionnaire-builder.types';\nexport * from './questionnaire-item-layout.util';\nexport * from './questionnaire-print.types';\n\nexport * from './root-config';\nexport * from './manifest';\n\nexport * from './commands/assessment-session-preview-pdf.types';\nexport * from './print/assessment-print-merge.constants';\nexport * from './print/print-html.util';\n\n//#endregion\n\nexport * from './entities';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAO,MAAM,kCAAkC,GAAG;AAChD,IAAA,uBAAuB,EAAE,uDAAuD;AAChF,IAAA,aAAa,EAAE,4CAA4C;;;ACFtD,MAAM,+BAA+B,GAAG;AAC3C,IAAA,cAAc,EAAE,0CAA0C;AAC1D,IAAA,KAAK,EAAE,iCAAiC;AACxC,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