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

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-sm_OxV_k.mjs} +1472 -160
  2. package/fesm2022/acorex-platform-module-assessment-management-client-acorex-platform-module-assessment-management-client-sm_OxV_k.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-6Hw6NQgS.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-6Hw6NQgS.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-BOzXBvS2.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-BOzXBvS2.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-BU6YLe8q.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-BU6YLe8q.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-CZre8wPB.mjs} +15 -11
  31. package/fesm2022/acorex-platform-module-assessment-management-client-form-template-viewer.service-CZre8wPB.mjs.map +1 -0
  32. package/fesm2022/acorex-platform-module-assessment-management-client-index-BmODQqQ4.mjs +68 -0
  33. package/fesm2022/acorex-platform-module-assessment-management-client-index-BmODQqQ4.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-C9BMiyDb.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-C9BMiyDb.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-L5NxVqdE.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-L5NxVqdE.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-7GuqlVX4.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-7GuqlVX4.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-ChtB6q9D.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-ChtB6q9D.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-Iwdbc86Q.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-Iwdbc86Q.mjs.map} +1 -1
  44. package/fesm2022/acorex-platform-module-assessment-management-client-questionnaire-questions-editor-edit.component-Q6Wu81xW.mjs +69 -0
  45. package/fesm2022/acorex-platform-module-assessment-management-client-questionnaire-questions-editor-edit.component-Q6Wu81xW.mjs.map +1 -0
  46. package/fesm2022/acorex-platform-module-assessment-management-client-questionnaire-viewer-edit.component-CaKML07K.mjs +78 -0
  47. package/fesm2022/acorex-platform-module-assessment-management-client-questionnaire-viewer-edit.component-CaKML07K.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-xDX86cTn.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-xDX86cTn.mjs.map} +1 -1
  50. package/fesm2022/acorex-platform-module-assessment-management-client-related-content-viewer-page-component.provider-CiMERtrE.mjs +26 -0
  51. package/fesm2022/acorex-platform-module-assessment-management-client-related-content-viewer-page-component.provider-CiMERtrE.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-CfqUtmMt.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-CfqUtmMt.mjs.map} +1 -1
  56. package/fesm2022/acorex-platform-module-assessment-management-client-show-form-template-viewer-popup.command-BZxwRr8J.mjs +117 -0
  57. package/fesm2022/acorex-platform-module-assessment-management-client-show-form-template-viewer-popup.command-BZxwRr8J.mjs.map +1 -0
  58. package/fesm2022/acorex-platform-module-assessment-management-client-show-questionnaire-questions-popup.command-hrtJQmvG.mjs +129 -0
  59. package/fesm2022/acorex-platform-module-assessment-management-client-show-questionnaire-questions-popup.command-hrtJQmvG.mjs.map +1 -0
  60. package/fesm2022/acorex-platform-module-assessment-management-client-show-questionnaire-viewer-popup.command-CMUmrNac.mjs +120 -0
  61. package/fesm2022/acorex-platform-module-assessment-management-client-show-questionnaire-viewer-popup.command-CMUmrNac.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-BhW_Wn7N.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-BhW_Wn7N.mjs.map} +1 -1
  66. package/fesm2022/acorex-platform-module-assessment-management-client-test-sheet-cell-type-widget-edit.component-Dkaw3T8R.mjs +90 -0
  67. package/fesm2022/acorex-platform-module-assessment-management-client-test-sheet-cell-type-widget-edit.component-Dkaw3T8R.mjs.map +1 -0
  68. package/fesm2022/acorex-platform-module-assessment-management-client-test-sheet-grid.component-BCRIENMA.mjs +77 -0
  69. package/fesm2022/acorex-platform-module-assessment-management-client-test-sheet-grid.component-BCRIENMA.mjs.map +1 -0
  70. package/fesm2022/acorex-platform-module-assessment-management-client-test-sheet-schema-widget-edit.component-CFu_CQ91.mjs +236 -0
  71. package/fesm2022/acorex-platform-module-assessment-management-client-test-sheet-schema-widget-edit.component-CFu_CQ91.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-DdC83GV8.mjs +81 -0
  75. package/fesm2022/acorex-platform-module-assessment-management-client-test-sheet-widget-edit.component-DdC83GV8.mjs.map +1 -0
  76. package/fesm2022/acorex-platform-module-assessment-management-client-test-sheet-widget-view.component-OQZIzcjG.mjs +30 -0
  77. package/fesm2022/acorex-platform-module-assessment-management-client-test-sheet-widget-view.component-OQZIzcjG.mjs.map +1 -0
  78. package/fesm2022/acorex-platform-module-assessment-management-client-test-sheet.util-CPbgWk5E.mjs +423 -0
  79. package/fesm2022/acorex-platform-module-assessment-management-client-test-sheet.util-CPbgWk5E.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-YoUUyJ4j.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-YoUUyJ4j.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-view-session-answers.command-DjJajIkL.mjs","sources":["../../../../libs/modules/assessment-management/client/src/lib/features/questionnaire-viewer/commands/view-session-answers.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { AXPRuntimeCommandResult } from '@acorex-platform/framework-shared/core';\n\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { Injectable, inject } from '@angular/core';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { defaultTo, first, get, isEmpty, isString, toString } from 'lodash';\nimport { AXMQuestionnaireViewerService } from '../questionnaire-viewer.service';\nimport type { AXMAssessmentManagementAssessmentCaseEntityModel } from '@acorex-platform/module-assessment-management-client/contracts';\nimport type { AXMAssessmentManagementAssessmentSessionEntityModel } from '@acorex-platform/module-assessment-management-client/contracts';\nimport { RootConfig } from '@acorex-platform/module-assessment-management-client/contracts';\nimport { openAssessmentSessionAnswersView, type OpenAssessmentSessionAnswersInitialStep } from '../utils/assessment-session-answers-view.util';\n\n//#endregion\n\n//#region ---- Command Input/Output Types ----\n\n/**\n * Input for ViewSessionAnswers command.\n */\nexport interface ViewSessionAnswersCommandInput {\n /**\n * Assessment Case ID. Required when `sessionId` is omitted; used to resolve the latest session.\n */\n caseId?: string;\n\n /**\n * Assessment Session ID to view answers for. When omitted, the latest session for `caseId` is used.\n */\n sessionId?: string;\n\n /**\n * When `results`, opens the readonly viewer on the outcome results step (requires stored session outcomes).\n */\n initialStep?: OpenAssessmentSessionAnswersInitialStep;\n}\n\n/** Entity list passes evaluated action options on `options` / row `data`. */\ntype ViewSessionAnswersCommandInvocation = ViewSessionAnswersCommandInput & {\n data?: Record<string, unknown>;\n options?: Partial<ViewSessionAnswersCommandInput>;\n};\n\n//#endregion\n\n//#region ---- View Session Answers Command ----\n\n/**\n * Command that opens a readonly view of assessment session answers in a dialog.\n */\n@Injectable()\nexport class ViewSessionAnswersCommand implements AXPCommand<ViewSessionAnswersCommandInput, void> {\n //#region ---- Services & Dependencies ----\n\n private readonly entityService = inject(AXPEntityService);\n private readonly questionnaireViewerService = inject(AXMQuestionnaireViewerService);\n private readonly translationService = inject(AXTranslationService);\n\n //#endregion\n\n //#region ---- Command Implementation ----\n\n /**\n * Returns a non-empty string or undefined.\n */\n private asNonEmptyString(value: unknown): string | undefined {\n if (isString(value) && !isEmpty(value)) {\n return value;\n }\n if (value != null && !isString(value)) {\n const normalized = toString(value).trim();\n return isEmpty(normalized) ? undefined : normalized;\n }\n return undefined;\n }\n\n /**\n * Resolves session id from root input, action options, or related-list row data.\n */\n private resolveSessionId(input: ViewSessionAnswersCommandInvocation): string | null {\n const candidates = [\n get(input, 'sessionId'),\n get(input, 'options.sessionId'),\n get(input, 'options.sessionId'),\n ];\n\n for (const candidate of candidates) {\n const resolved = this.asNonEmptyString(candidate);\n if (resolved) {\n return resolved;\n }\n }\n\n const row = get(input, 'data') as Record<string, unknown> | undefined;\n if (row && this.asNonEmptyString(get(row, 'caseId'))) {\n return this.asNonEmptyString(get(row, 'id')) ?? null;\n }\n\n return null;\n }\n\n /**\n * Resolves case id from root input, action options, or list row data.\n */\n private resolveCaseId(input: ViewSessionAnswersCommandInvocation): string | null {\n const candidates = [\n get(input, 'caseId'),\n get(input, 'options.caseId'),\n get(input, 'options.caseId'),\n ];\n\n for (const candidate of candidates) {\n const resolved = this.asNonEmptyString(candidate);\n if (resolved) {\n return resolved;\n }\n }\n\n const row = get(input, 'data') as Record<string, unknown> | undefined;\n if (row && !this.asNonEmptyString(get(row, 'caseId'))) {\n return this.asNonEmptyString(get(row, 'id')) ?? null;\n }\n\n return null;\n }\n\n /**\n * Resolves initial viewer step from root input or action options.\n */\n private resolveInitialStep(input: ViewSessionAnswersCommandInvocation): OpenAssessmentSessionAnswersInitialStep {\n const candidates = [\n get(input, 'initialStep'),\n get(input, 'options.initialStep'),\n get(input, 'options.initialStep'),\n ];\n\n for (const candidate of candidates) {\n const normalized = this.asNonEmptyString(candidate);\n if (normalized === 'results') {\n return 'results';\n }\n }\n\n return 'answers';\n }\n\n /**\n * Loads session from related-list row data, list query, or byKey (in that order).\n */\n private async loadSession(\n sessionId: string,\n input: ViewSessionAnswersCommandInvocation,\n ): Promise<AXMAssessmentManagementAssessmentSessionEntityModel | null> {\n const row = get(input, 'data') as Record<string, unknown> | undefined;\n const rowCaseId = this.asNonEmptyString(get(row, 'caseId'));\n\n if (row && rowCaseId) {\n return {\n ...(row as unknown as AXMAssessmentManagementAssessmentSessionEntityModel),\n id: sessionId,\n answers: defaultTo(get(row, 'answers') as Record<string, unknown> | undefined, {}),\n };\n }\n\n const sessionAccessor = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.assessmentSession.name)\n .data<string, AXMAssessmentManagementAssessmentSessionEntityModel>();\n\n const listMatch = await sessionAccessor.query({\n skip: 0,\n take: 1,\n filter: {\n field: 'id',\n operator: { type: 'equal' },\n value: sessionId,\n },\n });\n\n const fromQuery = first(listMatch.items);\n if (fromQuery) {\n return fromQuery;\n }\n\n return defaultTo(await sessionAccessor.byKey(sessionId), null);\n }\n\n /**\n * Loads case by id using query first, then byKey.\n */\n private async loadCase(caseId: string): Promise<AXMAssessmentManagementAssessmentCaseEntityModel | null> {\n const caseAccessor = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.assessmentCase.name)\n .data<string, AXMAssessmentManagementAssessmentCaseEntityModel>();\n\n const listMatch = await caseAccessor.query({\n skip: 0,\n take: 1,\n filter: {\n field: 'id',\n operator: { type: 'equal' },\n value: caseId,\n },\n });\n\n const fromQuery = first(listMatch.items);\n if (fromQuery) {\n return fromQuery;\n }\n\n return defaultTo(await caseAccessor.byKey(caseId), null);\n }\n\n /**\n * Finds the latest session record for a case (by lastSavedAt, then createdAt).\n */\n private async findLatestSession(\n caseId: string,\n ): Promise<AXMAssessmentManagementAssessmentSessionEntityModel | null> {\n const sessionAccessor = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.assessmentSession.name)\n .data<string, AXMAssessmentManagementAssessmentSessionEntityModel>();\n\n const listMatch = await sessionAccessor.query({\n skip: 0,\n take: 1,\n sort: [\n { field: 'lastSavedAt', dir: 'desc' },\n { field: 'createdAt', dir: 'desc' },\n ],\n filter: {\n field: 'caseId',\n operator: { type: 'equal' },\n value: caseId,\n },\n });\n\n return first(listMatch.items) ?? null;\n }\n\n async execute(input: ViewSessionAnswersCommandInvocation): AXPCommandExecuteResultPromise<void> {\n try {\n const sessionId = this.resolveSessionId(input);\n const caseId = this.resolveCaseId(input);\n\n if (!sessionId && !caseId) {\n return {\n success: false,\n message: {\n text: 'Assessment case ID or session ID is required',\n },\n };\n }\n\n let session: AXMAssessmentManagementAssessmentSessionEntityModel | null = null;\n let assessmentCase: AXMAssessmentManagementAssessmentCaseEntityModel | null = null;\n\n if (sessionId) {\n session = await this.loadSession(sessionId, input);\n if (!session) {\n return {\n success: false,\n message: {\n text: `Assessment session with ID ${sessionId} not found`,\n },\n };\n }\n\n const resolvedCaseId = this.asNonEmptyString(get(session, 'caseId')) ?? caseId;\n if (!resolvedCaseId) {\n return {\n success: false,\n message: {\n text: 'Assessment session is missing caseId',\n },\n };\n }\n\n assessmentCase = await this.loadCase(resolvedCaseId);\n if (!assessmentCase) {\n return {\n success: false,\n message: {\n text: `Assessment case with ID ${resolvedCaseId} not found`,\n },\n };\n }\n } else if (caseId) {\n assessmentCase = await this.loadCase(caseId);\n if (!assessmentCase) {\n return {\n success: false,\n message: {\n text: `Assessment case with ID ${caseId} not found`,\n },\n };\n }\n\n session = await this.findLatestSession(caseId);\n if (!session) {\n const messageKey = '@assessment-management:cases.actions.view-last-session-answers.no-session';\n const messageText =\n (await this.translationService.translateAsync(messageKey)) ||\n 'No assessment session found for this case';\n return {\n success: false,\n message: {\n text: messageText,\n },\n };\n }\n }\n\n if (!session || !assessmentCase) {\n return {\n success: false,\n message: {\n text: 'Unable to resolve assessment session answers',\n },\n };\n }\n\n const initialStep = this.resolveInitialStep(input);\n if (initialStep === 'results' && isEmpty(get(session, 'outcomes'))) {\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync(\n '@assessment-management:sessions.actions.view-outcomes.empty',\n ),\n },\n };\n }\n\n await openAssessmentSessionAnswersView(\n {\n entityService: this.entityService,\n questionnaireViewerService: this.questionnaireViewerService,\n translationService: this.translationService,\n },\n session,\n assessmentCase,\n { initialStep },\n );\n\n return { success: true, kind: 'object', data: undefined,\n };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Unknown error';\n return {\n success: false,\n message: {\n text: `Error viewing session answers: ${message}`,\n },\n };\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;;AA6CA;AAEA;AAEA;;AAEG;MAEU,yBAAyB,CAAA;AADtC,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACxC,QAAA,IAAA,CAAA,0BAA0B,GAAG,MAAM,CAAC,6BAA6B,CAAC;AAClE,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AA8SnE,IAAA;;;AAxSC;;AAEG;AACK,IAAA,gBAAgB,CAAC,KAAc,EAAA;QACrC,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AACtC,YAAA,OAAO,KAAK;QACd;QACA,IAAI,KAAK,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;YACrC,MAAM,UAAU,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE;AACzC,YAAA,OAAO,OAAO,CAAC,UAAU,CAAC,GAAG,SAAS,GAAG,UAAU;QAC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IAAI,EAAE,CAAA,+BAAA,EAAkC,OAAO,CAAA,CAAE;AAClD,iBAAA;aACF;QACH;IACF;8GAhTW,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAzB,yBAAyB,EAAA,CAAA,CAAA;;2FAAzB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBADrC;;;"}
1
+ {"version":3,"file":"acorex-platform-module-assessment-management-client-view-session-answers.command-YoUUyJ4j.mjs","sources":["../../../../libs/modules/assessment-management/client/src/lib/features/questionnaire-viewer/commands/view-session-answers.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { AXPRuntimeCommandResult } from '@acorex-platform/framework-shared/core';\n\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { Injectable, inject } from '@angular/core';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { defaultTo, first, get, isEmpty, isString, toString } from 'lodash';\nimport { AXMQuestionnaireViewerService } from '../questionnaire-viewer.service';\nimport type { AXMAssessmentManagementAssessmentCaseEntityModel } from '@acorex-platform/module-assessment-management-client/contracts';\nimport type { AXMAssessmentManagementAssessmentSessionEntityModel } from '@acorex-platform/module-assessment-management-client/contracts';\nimport { RootConfig } from '@acorex-platform/module-assessment-management-client/contracts';\nimport { openAssessmentSessionAnswersView, type OpenAssessmentSessionAnswersInitialStep } from '../utils/assessment-session-answers-view.util';\n\n//#endregion\n\n//#region ---- Command Input/Output Types ----\n\n/**\n * Input for ViewSessionAnswers command.\n */\nexport interface ViewSessionAnswersCommandInput {\n /**\n * Assessment Case ID. Required when `sessionId` is omitted; used to resolve the latest session.\n */\n caseId?: string;\n\n /**\n * Assessment Session ID to view answers for. When omitted, the latest session for `caseId` is used.\n */\n sessionId?: string;\n\n /**\n * When `results`, opens the readonly viewer on the outcome results step (requires stored session outcomes).\n */\n initialStep?: OpenAssessmentSessionAnswersInitialStep;\n}\n\n/** Entity list passes evaluated action options on `options` / row `data`. */\ntype ViewSessionAnswersCommandInvocation = ViewSessionAnswersCommandInput & {\n data?: Record<string, unknown>;\n options?: Partial<ViewSessionAnswersCommandInput>;\n};\n\n//#endregion\n\n//#region ---- View Session Answers Command ----\n\n/**\n * Command that opens a readonly view of assessment session answers in a dialog.\n */\n@Injectable()\nexport class ViewSessionAnswersCommand implements AXPCommand<ViewSessionAnswersCommandInput, void> {\n //#region ---- Services & Dependencies ----\n\n private readonly entityService = inject(AXPEntityService);\n private readonly questionnaireViewerService = inject(AXMQuestionnaireViewerService);\n private readonly translationService = inject(AXTranslationService);\n\n //#endregion\n\n //#region ---- Command Implementation ----\n\n /**\n * Returns a non-empty string or undefined.\n */\n private asNonEmptyString(value: unknown): string | undefined {\n if (isString(value) && !isEmpty(value)) {\n return value;\n }\n if (value != null && !isString(value)) {\n const normalized = toString(value).trim();\n return isEmpty(normalized) ? undefined : normalized;\n }\n return undefined;\n }\n\n /**\n * Resolves session id from root input, action options, or related-list row data.\n */\n private resolveSessionId(input: ViewSessionAnswersCommandInvocation): string | null {\n const candidates = [\n get(input, 'sessionId'),\n get(input, 'options.sessionId'),\n get(input, 'options.sessionId'),\n ];\n\n for (const candidate of candidates) {\n const resolved = this.asNonEmptyString(candidate);\n if (resolved) {\n return resolved;\n }\n }\n\n const row = get(input, 'data') as Record<string, unknown> | undefined;\n if (row && this.asNonEmptyString(get(row, 'caseId'))) {\n return this.asNonEmptyString(get(row, 'id')) ?? null;\n }\n\n return null;\n }\n\n /**\n * Resolves case id from root input, action options, or list row data.\n */\n private resolveCaseId(input: ViewSessionAnswersCommandInvocation): string | null {\n const candidates = [\n get(input, 'caseId'),\n get(input, 'options.caseId'),\n get(input, 'options.caseId'),\n ];\n\n for (const candidate of candidates) {\n const resolved = this.asNonEmptyString(candidate);\n if (resolved) {\n return resolved;\n }\n }\n\n const row = get(input, 'data') as Record<string, unknown> | undefined;\n if (row && !this.asNonEmptyString(get(row, 'caseId'))) {\n return this.asNonEmptyString(get(row, 'id')) ?? null;\n }\n\n return null;\n }\n\n /**\n * Resolves initial viewer step from root input or action options.\n */\n private resolveInitialStep(input: ViewSessionAnswersCommandInvocation): OpenAssessmentSessionAnswersInitialStep {\n const candidates = [\n get(input, 'initialStep'),\n get(input, 'options.initialStep'),\n get(input, 'options.initialStep'),\n ];\n\n for (const candidate of candidates) {\n const normalized = this.asNonEmptyString(candidate);\n if (normalized === 'results') {\n return 'results';\n }\n }\n\n return 'answers';\n }\n\n /**\n * Loads session from related-list row data, list query, or byKey (in that order).\n */\n private async loadSession(\n sessionId: string,\n input: ViewSessionAnswersCommandInvocation,\n ): Promise<AXMAssessmentManagementAssessmentSessionEntityModel | null> {\n const row = get(input, 'data') as Record<string, unknown> | undefined;\n const rowCaseId = this.asNonEmptyString(get(row, 'caseId'));\n\n if (row && rowCaseId) {\n return {\n ...(row as unknown as AXMAssessmentManagementAssessmentSessionEntityModel),\n id: sessionId,\n answers: defaultTo(get(row, 'answers') as Record<string, unknown> | undefined, {}),\n };\n }\n\n const sessionAccessor = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.assessmentSession.name)\n .data<string, AXMAssessmentManagementAssessmentSessionEntityModel>();\n\n const listMatch = await sessionAccessor.query({\n skip: 0,\n take: 1,\n filter: {\n field: 'id',\n operator: { type: 'equal' },\n value: sessionId,\n },\n });\n\n const fromQuery = first(listMatch.items);\n if (fromQuery) {\n return fromQuery;\n }\n\n return defaultTo(await sessionAccessor.byKey(sessionId), null);\n }\n\n /**\n * Loads case by id using query first, then byKey.\n */\n private async loadCase(caseId: string): Promise<AXMAssessmentManagementAssessmentCaseEntityModel | null> {\n const caseAccessor = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.assessmentCase.name)\n .data<string, AXMAssessmentManagementAssessmentCaseEntityModel>();\n\n const listMatch = await caseAccessor.query({\n skip: 0,\n take: 1,\n filter: {\n field: 'id',\n operator: { type: 'equal' },\n value: caseId,\n },\n });\n\n const fromQuery = first(listMatch.items);\n if (fromQuery) {\n return fromQuery;\n }\n\n return defaultTo(await caseAccessor.byKey(caseId), null);\n }\n\n /**\n * Finds the latest session record for a case (by lastSavedAt, then createdAt).\n */\n private async findLatestSession(\n caseId: string,\n ): Promise<AXMAssessmentManagementAssessmentSessionEntityModel | null> {\n const sessionAccessor = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.assessmentSession.name)\n .data<string, AXMAssessmentManagementAssessmentSessionEntityModel>();\n\n const listMatch = await sessionAccessor.query({\n skip: 0,\n take: 1,\n sort: [\n { field: 'lastSavedAt', dir: 'desc' },\n { field: 'createdAt', dir: 'desc' },\n ],\n filter: {\n field: 'caseId',\n operator: { type: 'equal' },\n value: caseId,\n },\n });\n\n return first(listMatch.items) ?? null;\n }\n\n async execute(input: ViewSessionAnswersCommandInvocation): AXPCommandExecuteResultPromise<void> {\n try {\n const sessionId = this.resolveSessionId(input);\n const caseId = this.resolveCaseId(input);\n\n if (!sessionId && !caseId) {\n return {\n success: false,\n message: {\n text: 'Assessment case ID or session ID is required',\n },\n };\n }\n\n let session: AXMAssessmentManagementAssessmentSessionEntityModel | null = null;\n let assessmentCase: AXMAssessmentManagementAssessmentCaseEntityModel | null = null;\n\n if (sessionId) {\n session = await this.loadSession(sessionId, input);\n if (!session) {\n return {\n success: false,\n message: {\n text: `Assessment session with ID ${sessionId} not found`,\n },\n };\n }\n\n const resolvedCaseId = this.asNonEmptyString(get(session, 'caseId')) ?? caseId;\n if (!resolvedCaseId) {\n return {\n success: false,\n message: {\n text: 'Assessment session is missing caseId',\n },\n };\n }\n\n assessmentCase = await this.loadCase(resolvedCaseId);\n if (!assessmentCase) {\n return {\n success: false,\n message: {\n text: `Assessment case with ID ${resolvedCaseId} not found`,\n },\n };\n }\n } else if (caseId) {\n assessmentCase = await this.loadCase(caseId);\n if (!assessmentCase) {\n return {\n success: false,\n message: {\n text: `Assessment case with ID ${caseId} not found`,\n },\n };\n }\n\n session = await this.findLatestSession(caseId);\n if (!session) {\n const messageKey = '@assessment-management:cases.actions.view-last-session-answers.no-session';\n const messageText =\n (await this.translationService.translateAsync(messageKey)) ||\n 'No assessment session found for this case';\n return {\n success: false,\n message: {\n text: messageText,\n },\n };\n }\n }\n\n if (!session || !assessmentCase) {\n return {\n success: false,\n message: {\n text: 'Unable to resolve assessment session answers',\n },\n };\n }\n\n const initialStep = this.resolveInitialStep(input);\n if (initialStep === 'results' && isEmpty(get(session, 'outcomes'))) {\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync(\n '@assessment-management:sessions.actions.view-outcomes.empty',\n ),\n },\n };\n }\n\n await openAssessmentSessionAnswersView(\n {\n entityService: this.entityService,\n questionnaireViewerService: this.questionnaireViewerService,\n translationService: this.translationService,\n },\n session,\n assessmentCase,\n { initialStep },\n );\n\n return { success: true, kind: 'object', data: undefined,\n };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Unknown error';\n return {\n success: false,\n message: {\n text: `Error viewing session answers: ${message}`,\n },\n };\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;;AA6CA;AAEA;AAEA;;AAEG;MAEU,yBAAyB,CAAA;AADtC,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACxC,QAAA,IAAA,CAAA,0BAA0B,GAAG,MAAM,CAAC,6BAA6B,CAAC;AAClE,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AA8SnE,IAAA;;;AAxSC;;AAEG;AACK,IAAA,gBAAgB,CAAC,KAAc,EAAA;QACrC,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AACtC,YAAA,OAAO,KAAK;QACd;QACA,IAAI,KAAK,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK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AAA,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,eAAe;YACxE,OAAO;AACL,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,OAAO,EAAE;oBACP,IAAI,EAAE,CAAA,+BAAA,EAAkC,OAAO,CAAA,CAAE;AAClD,iBAAA;aACF;QACH;IACF;8GAhTW,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAzB,yBAAyB,EAAA,CAAA,CAAA;;2FAAzB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBADrC;;;"}
@@ -1,2 +1,2 @@
1
- export { l as AXMAssessmentManagementFeatureDefinitionProvider, m as AXMAssessmentManagementMenuProvider, n as AXMAssessmentManagementModule, o as AXMAssessmentManagementPermissionDefinitionProvider, q as AXMAssessmentManagementSearchCommandProvider, t as AXMQuestionnaireViewerPageComponent, a as AXMQuestionnaireViewerService, u as AXMQuestionnaireViewerStandalonePageComponent, r as resolveWidgetNodeFromMetaDataDefinitionInterface, s as stripQuestionBankInterfaceMetadata } from './acorex-platform-module-assessment-management-client-acorex-platform-module-assessment-management-client-juxXq2pM.mjs';
1
+ export { C as AXMAssessmentManagementFeatureDefinitionProvider, D as AXMAssessmentManagementMenuProvider, E as AXMAssessmentManagementModule, G as AXMAssessmentManagementPermissionDefinitionProvider, H as AXMAssessmentManagementSearchCommandProvider, I as AXMQuestionnaireViewerPageComponent, h as AXMQuestionnaireViewerService, J as AXMQuestionnaireViewerStandalonePageComponent, w as resolveWidgetNodeFromMetaDataDefinitionInterface, v as stripQuestionBankInterfaceMetadata } from './acorex-platform-module-assessment-management-client-acorex-platform-module-assessment-management-client-sm_OxV_k.mjs';
2
2
  //# sourceMappingURL=acorex-platform-module-assessment-management-client.mjs.map
@@ -147,6 +147,10 @@
147
147
  "description": "Questionnaire description",
148
148
  "placeholder": "Enter description"
149
149
  },
150
+ "selector": {
151
+ "title": "Questionnaire",
152
+ "description": "Questionnaire filled for records of this type."
153
+ },
150
154
  "print-template-id": {
151
155
  "title": "Print Template",
152
156
  "description": "Content template that wraps the filled questionnaire. Uses the company print master for letterhead and border."
@@ -321,6 +325,17 @@
321
325
  "description": "Labels for outcomes (answer.byTag / answer.allByTag)",
322
326
  "placeholder": "Add tags"
323
327
  },
328
+ "width": {
329
+ "title": "Width",
330
+ "description": "Column width for this question in this questionnaire. Full width when not overridden.",
331
+ "options": {
332
+ "full": "Full",
333
+ "half": "Half",
334
+ "third": "One Third",
335
+ "quarter": "One Quarter",
336
+ "sixth": "One Sixth"
337
+ }
338
+ },
324
339
  "is-required": {
325
340
  "title": "Required",
326
341
  "description": "Whether this question is required, or use binding to drive required state with an expression."
@@ -514,7 +529,12 @@
514
529
  },
515
530
  "questionnaire-viewer": {
516
531
  "title": "Questionnaire Viewer",
532
+ "section-title": "Questionnaire",
517
533
  "description": "View and interact with questionnaires",
534
+ "empty": {
535
+ "title": "No Questionnaire",
536
+ "description": "No questionnaire is assigned for the selected type."
537
+ },
518
538
  "flow": {
519
539
  "start": "Start",
520
540
  "review": "Review",
@@ -1079,5 +1099,54 @@
1079
1099
  "save-questionnaire-draft": { "title": "Save Questionnaire Draft" },
1080
1100
  "submit-questionnaire": { "title": "Submit Questionnaire" },
1081
1101
  "cancel-questionnaire": { "title": "Cancel Questionnaire" }
1102
+ },
1103
+ "widgets": {
1104
+ "test-sheet": {
1105
+ "title": "Test Sheet",
1106
+ "description": "A grid question with static and input columns, fixed or repeated rows, and merged group titles.",
1107
+ "sheet": {
1108
+ "title": "Sheet"
1109
+ },
1110
+ "row-mode": {
1111
+ "title": "Row Mode",
1112
+ "fixed": "Fixed Rows",
1113
+ "repeated": "Repeated Rows"
1114
+ },
1115
+ "columns": {
1116
+ "title": "Columns",
1117
+ "add": "Add Column",
1118
+ "remove": "Remove Column",
1119
+ "name": "Title",
1120
+ "group-title": "Column Group",
1121
+ "role": "Kind",
1122
+ "static": "Static",
1123
+ "input": "Input",
1124
+ "widget": "Cell Type",
1125
+ "options": "Choices",
1126
+ "options-placeholder": "One choice per line",
1127
+ "default-value": "Default Value",
1128
+ "required": "Required"
1129
+ },
1130
+ "rows": {
1131
+ "title": "Rows",
1132
+ "add": "Add Row",
1133
+ "remove": "Remove Row",
1134
+ "group-title": "Row Group"
1135
+ },
1136
+ "cell-types": {
1137
+ "text": "Text",
1138
+ "number": "Number",
1139
+ "date": "Date",
1140
+ "checkbox": "Checkbox",
1141
+ "toggle": "Yes / No",
1142
+ "choice": "Choice"
1143
+ },
1144
+ "group-header": "Group",
1145
+ "move-earlier": "Move Earlier",
1146
+ "move-later": "Move Later",
1147
+ "empty-columns": "Add at least one column.",
1148
+ "empty-sheet": "This test sheet has no columns yet.",
1149
+ "answer-summary": "{{count}} rows"
1150
+ }
1082
1151
  }
1083
1152
  }
@@ -61,6 +61,10 @@
61
61
  "template": {
62
62
  "title": "Edit Template",
63
63
  "description": "Design and edit template content"
64
+ },
65
+ "selector": {
66
+ "title": "Form",
67
+ "description": "Form template filled for records of this type."
64
68
  }
65
69
  },
66
70
  "groups": {
@@ -76,6 +80,10 @@
76
80
  },
77
81
  "viewer": {
78
82
  "title": "Form",
83
+ "empty": {
84
+ "title": "No Form",
85
+ "description": "The related record does not have a form template yet."
86
+ },
79
87
  "messages": {
80
88
  "missing-template": "A form template id or template content is required.",
81
89
  "not-found": "Form template was not found.",
@@ -147,6 +147,10 @@
147
147
  "description": "Questionnaire description",
148
148
  "placeholder": "Enter description"
149
149
  },
150
+ "selector": {
151
+ "title": "Questionnaire",
152
+ "description": "Questionnaire filled for records of this type."
153
+ },
150
154
  "print-template-id": {
151
155
  "title": "Print Template",
152
156
  "description": "Content template that wraps the filled questionnaire. Uses the company print master for letterhead and border."
@@ -321,6 +325,17 @@
321
325
  "description": "Labels for outcomes (answer.byTag / answer.allByTag)",
322
326
  "placeholder": "Add tags"
323
327
  },
328
+ "width": {
329
+ "title": "Width",
330
+ "description": "Column width for this question in this questionnaire. Full width when not overridden.",
331
+ "options": {
332
+ "full": "Full",
333
+ "half": "Half",
334
+ "third": "One Third",
335
+ "quarter": "One Quarter",
336
+ "sixth": "One Sixth"
337
+ }
338
+ },
324
339
  "is-required": {
325
340
  "title": "Required",
326
341
  "description": "Whether this question is required, or use binding to drive required state with an expression."
@@ -514,7 +529,12 @@
514
529
  },
515
530
  "questionnaire-viewer": {
516
531
  "title": "Questionnaire Viewer",
532
+ "section-title": "Questionnaire",
517
533
  "description": "View and interact with questionnaires",
534
+ "empty": {
535
+ "title": "No Questionnaire",
536
+ "description": "No questionnaire is assigned for the selected type."
537
+ },
518
538
  "flow": {
519
539
  "start": "Start",
520
540
  "review": "Review",
@@ -1079,5 +1099,54 @@
1079
1099
  "save-questionnaire-draft": { "title": "Save Questionnaire Draft" },
1080
1100
  "submit-questionnaire": { "title": "Submit Questionnaire" },
1081
1101
  "cancel-questionnaire": { "title": "Cancel Questionnaire" }
1102
+ },
1103
+ "widgets": {
1104
+ "test-sheet": {
1105
+ "title": "Test Sheet",
1106
+ "description": "A grid question with static and input columns, fixed or repeated rows, and merged group titles.",
1107
+ "sheet": {
1108
+ "title": "Sheet"
1109
+ },
1110
+ "row-mode": {
1111
+ "title": "Row Mode",
1112
+ "fixed": "Fixed Rows",
1113
+ "repeated": "Repeated Rows"
1114
+ },
1115
+ "columns": {
1116
+ "title": "Columns",
1117
+ "add": "Add Column",
1118
+ "remove": "Remove Column",
1119
+ "name": "Title",
1120
+ "group-title": "Column Group",
1121
+ "role": "Kind",
1122
+ "static": "Static",
1123
+ "input": "Input",
1124
+ "widget": "Cell Type",
1125
+ "options": "Choices",
1126
+ "options-placeholder": "One choice per line",
1127
+ "default-value": "Default Value",
1128
+ "required": "Required"
1129
+ },
1130
+ "rows": {
1131
+ "title": "Rows",
1132
+ "add": "Add Row",
1133
+ "remove": "Remove Row",
1134
+ "group-title": "Row Group"
1135
+ },
1136
+ "cell-types": {
1137
+ "text": "Text",
1138
+ "number": "Number",
1139
+ "date": "Date",
1140
+ "checkbox": "Checkbox",
1141
+ "toggle": "Yes / No",
1142
+ "choice": "Choice"
1143
+ },
1144
+ "group-header": "Group",
1145
+ "move-earlier": "Move Earlier",
1146
+ "move-later": "Move Later",
1147
+ "empty-columns": "Add at least one column.",
1148
+ "empty-sheet": "This test sheet has no columns yet.",
1149
+ "answer-summary": "{{count}} rows"
1150
+ }
1082
1151
  }
1083
1152
  }
@@ -61,6 +61,10 @@
61
61
  "template": {
62
62
  "title": "Edit Template",
63
63
  "description": "Design and edit template content"
64
+ },
65
+ "selector": {
66
+ "title": "Form",
67
+ "description": "Form template filled for records of this type."
64
68
  }
65
69
  },
66
70
  "groups": {
@@ -76,6 +80,10 @@
76
80
  },
77
81
  "viewer": {
78
82
  "title": "Form",
83
+ "empty": {
84
+ "title": "No Form",
85
+ "description": "The related record does not have a form template yet."
86
+ },
79
87
  "messages": {
80
88
  "missing-template": "A form template id or template content is required.",
81
89
  "not-found": "Form template was not found.",
@@ -182,6 +182,10 @@
182
182
  "description": "توضیحات پرسشنامه",
183
183
  "placeholder": "توضیحات را وارد کنید"
184
184
  },
185
+ "selector": {
186
+ "title": "پرسشنامه",
187
+ "description": "پرسشنامه‌ای که برای رکوردهای این نوع پر می‌شود."
188
+ },
185
189
  "print-template-id": {
186
190
  "title": "قالب چاپ",
187
191
  "description": "قالب محتوایی که پرسشنامه پرشده را می‌پوشاند. سربرگ و حاشیه از قالب اصلی چاپ شرکت می‌آید."
@@ -377,6 +381,17 @@
377
381
  "description": "برچسب برای نتایج (answer.byTag / answer.allByTag)",
378
382
  "placeholder": "افزودن برچسب"
379
383
  },
384
+ "width": {
385
+ "title": "عرض",
386
+ "description": "عرض این سوال فقط در همین پرسشنامه. اگر تنظیم نشود، تمام‌عرض است.",
387
+ "options": {
388
+ "full": "کامل",
389
+ "half": "نصف",
390
+ "third": "یک‌سوم",
391
+ "quarter": "یک‌چهارم",
392
+ "sixth": "یک‌ششم"
393
+ }
394
+ },
380
395
  "is-required": {
381
396
  "title": "اجباری",
382
397
  "description": "آیا این سوال اجباری است؛ با binding می‌توان وضعیت اجباری را با عبارت تعیین کرد."
@@ -570,7 +585,12 @@
570
585
  },
571
586
  "questionnaire-viewer": {
572
587
  "title": "نمایشگر پرسشنامه",
588
+ "section-title": "پرسشنامه",
573
589
  "description": "مشاهده و تعامل با پرسشنامه‌ها",
590
+ "empty": {
591
+ "title": "بدون پرسشنامه",
592
+ "description": "برای نوع انتخاب‌شده پرسشنامه‌ای تعریف نشده است."
593
+ },
574
594
  "flow": {
575
595
  "start": "شروع",
576
596
  "review": "بررسی",
@@ -1114,5 +1134,54 @@
1114
1134
  "save-questionnaire-draft": { "title": "ذخیره پیش‌نویس پرسشنامه" },
1115
1135
  "submit-questionnaire": { "title": "ارسال پرسشنامه" },
1116
1136
  "cancel-questionnaire": { "title": "لغو پرسشنامه" }
1137
+ },
1138
+ "widgets": {
1139
+ "test-sheet": {
1140
+ "title": "برگه آزمون",
1141
+ "description": "سؤال جدولی با ستون‌های ثابت و ورودی، ردیف‌های ثابت یا تکرارشونده، و عنوان‌های گروه‌بندی‌شده.",
1142
+ "sheet": {
1143
+ "title": "برگه"
1144
+ },
1145
+ "row-mode": {
1146
+ "title": "حالت ردیف",
1147
+ "fixed": "ردیف‌های ثابت",
1148
+ "repeated": "ردیف‌های تکرارشونده"
1149
+ },
1150
+ "columns": {
1151
+ "title": "ستون‌ها",
1152
+ "add": "افزودن ستون",
1153
+ "remove": "حذف ستون",
1154
+ "name": "عنوان",
1155
+ "group-title": "گروه ستون",
1156
+ "role": "نوع",
1157
+ "static": "ثابت",
1158
+ "input": "ورودی",
1159
+ "widget": "نوع سلول",
1160
+ "options": "گزینه‌ها",
1161
+ "options-placeholder": "هر گزینه در یک خط",
1162
+ "default-value": "مقدار پیش‌فرض",
1163
+ "required": "الزامی"
1164
+ },
1165
+ "rows": {
1166
+ "title": "ردیف‌ها",
1167
+ "add": "افزودن ردیف",
1168
+ "remove": "حذف ردیف",
1169
+ "group-title": "گروه ردیف"
1170
+ },
1171
+ "cell-types": {
1172
+ "text": "متن",
1173
+ "number": "عدد",
1174
+ "date": "تاریخ",
1175
+ "checkbox": "چک‌باکس",
1176
+ "toggle": "بله / خیر",
1177
+ "choice": "انتخابی"
1178
+ },
1179
+ "group-header": "گروه",
1180
+ "move-earlier": "جابه‌جایی به قبل",
1181
+ "move-later": "جابه‌جایی به بعد",
1182
+ "empty-columns": "حداقل یک ستون اضافه کنید.",
1183
+ "empty-sheet": "این برگه آزمون هنوز ستونی ندارد.",
1184
+ "answer-summary": "{{count}} ردیف"
1185
+ }
1117
1186
  }
1118
1187
  }
@@ -61,6 +61,10 @@
61
61
  "template": {
62
62
  "title": "ویرایش قالب",
63
63
  "description": "طراحی و ویرایش محتوای قالب"
64
+ },
65
+ "selector": {
66
+ "title": "فرم",
67
+ "description": "قالب فرمی که برای رکوردهای این نوع پر می‌شود."
64
68
  }
65
69
  },
66
70
  "groups": {
@@ -76,6 +80,10 @@
76
80
  },
77
81
  "viewer": {
78
82
  "title": "فرم",
83
+ "empty": {
84
+ "title": "بدون فرم",
85
+ "description": "رکورد مرتبط هنوز قالب فرم ندارد."
86
+ },
79
87
  "messages": {
80
88
  "missing-template": "شناسه قالب یا محتوای قالب لازم است.",
81
89
  "not-found": "قالب فرم پیدا نشد.",
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@acorex-platform/module-assessment-management-client",
3
- "version": "0.0.57",
3
+ "version": "0.0.59",
4
4
  "sideEffects": false,
5
5
  "peerDependencies": {
6
- "@acorex-platform/extension-ai-voice-shell-client": "0.0.57",
7
- "@acorex-platform/module-content-management-client": "0.0.57",
6
+ "@acorex-platform/extension-ai-voice-shell-client": "0.0.59",
7
+ "@acorex-platform/module-content-management-client": "0.0.59",
8
8
  "@angular/common": "^21.0.0 || ^22.0.0",
9
9
  "@angular/core": "^21.0.0 || ^22.0.0"
10
10
  },
@@ -1,4 +1,4 @@
1
- import { AXPMultiLanguageString, AXPExpression, AXPWidgetNode, AXPModuleManifest, AXPEntityReference, AXPFileListItem } from '@acorex-platform/framework-shared/core';
1
+ import { AXPMultiLanguageString, AXPExpression, AXPWidgetNode, AXPGridLayoutOptions, AXPModuleManifest, AXPEntityReference, AXPFileListItem } from '@acorex-platform/framework-shared/core';
2
2
  import * as _acorex_platform_module_assessment_management_client_contracts from '@acorex-platform/module-assessment-management-client/contracts';
3
3
  import { AXPEntityModel, AXPEntityCreateDto, AXPEntityDetailDto, AXPEntityListItemDto, AXPEntityUpdateDto } from '@acorex-platform/framework-shared/entity';
4
4
 
@@ -271,6 +271,11 @@ interface QuestionnaireBuilderValue {
271
271
  isRequired?: boolean | AXPExpression;
272
272
  isVisible?: boolean | AXPExpression;
273
273
  interfaceOverride?: AXPWidgetNode;
274
+ /**
275
+ * Column width for this question inside this questionnaire.
276
+ * Omitted means full width. Not stored on the question bank item.
277
+ */
278
+ layout?: AXPGridLayoutOptions;
274
279
  hint?: AXMAssessmentQuestionHintPartial;
275
280
  comment?: Partial<AXMAssessmentQuestionCommentConfig>;
276
281
  tags?: string[];
@@ -286,6 +291,21 @@ interface QuestionnaireBuilderValue {
286
291
  printSettings?: QuestionnairePrintSettings;
287
292
  }
288
293
 
294
+ /** Width choices for a question placed in a questionnaire. Values are columns in the 12-column row. */
295
+ declare const QUESTIONNAIRE_ITEM_COL_SPANS: readonly [12, 6, 4, 3, 2];
296
+ type QuestionnaireItemColSpan = (typeof QUESTIONNAIRE_ITEM_COL_SPANS)[number];
297
+ /**
298
+ * Column width stored on the questionnaire item. Omitted means full width.
299
+ * This is not a question-bank field.
300
+ */
301
+ declare function readQuestionnaireItemColSpan(item: {
302
+ layout?: AXPGridLayoutOptions;
303
+ } | null | undefined): QuestionnaireItemColSpan;
304
+ /** Persist only a narrower width. Full width stays omitted so existing questionnaires are unchanged. */
305
+ declare function questionnaireItemLayoutOverride(value: unknown): AXPGridLayoutOptions | undefined;
306
+ /** Accepts a number, numeric string, or select row `{ id }`. */
307
+ declare function coerceQuestionnaireItemColSpan(value: unknown): QuestionnaireItemColSpan | undefined;
308
+
289
309
  declare const RootConfig: {
290
310
  readonly config: {
291
311
  readonly i18n: "assessment-management";
@@ -874,5 +894,5 @@ interface AXMFormTemplateListItemDto extends AXPEntityListItemDto<string> {
874
894
  }[];
875
895
  }
876
896
 
877
- export { ASSESSMENT_PRINT_CONTENT_WIDTH_MM, ASSESSMENT_PRINT_HTML_GZIP_ENCODING, ASSESSMENT_PRINT_PAGE_FORMAT, AXMAssessmentManagementFeatureKeys, AXMAssessmentManagementPermissionKeys, AXMFormTemplateTypes, AXM_ASSESSMENT_PRINT_MERGE_KEYS, AXM_ASSESSMENT_SESSION_PREVIEW_PDF_CLIENT_COMMAND_KEY, AXM_ASSESSMENT_SESSION_PREVIEW_PDF_COMMAND_KEY, AXPAssessmentManagementMenuKeys, AXPContentDocumentsPermissionKeys, AXPFormTemplateManagementMenuKeys, AXPFormTemplateManagementPermissionKeys, AXPFormTemplateSettings, AXPSafetyRiskPermissionKeys, AssessmentManagementManifest, DEFAULT_POST_QUESTIONNAIRE_CONFIG, DEFAULT_PRE_QUESTIONNAIRE_CONFIG, DEFAULT_QUESTIONNAIRE_ENTITY_DISPLAY, DEFAULT_QUESTIONNAIRE_ENTITY_PRINT, DEFAULT_QUESTIONNAIRE_OUTCOMES, DEFAULT_QUESTIONNAIRE_PRINT_SETTINGS, DEFAULT_QUESTION_COMMENT_CONFIG, DEFAULT_QUESTION_HINT_CONFIG, PRINT_PAGE_LETTERHEAD_BOTTOM_MARGIN_MM, PRINT_PAGE_LETTERHEAD_TOP_MARGIN_MM, PRINT_PAGE_SIDE_MARGIN_MM, QUESTIONNAIRE_OUTCOMES_PAGE_COMPONENT_KEY, QUESTIONNAIRE_QUESTIONS_PAGE_COMPONENT_KEY, RootConfig, applyQuestionnairePrintHeader, buildQuestionnairePrintBodyHtml, buildQuestionnairePrintHeaderRegion, buildQuestionnaireQuestionCardHtml, buildQuestionnaireSessionBodyHtml, commentConfigForEditForm, diffQuestionCommentOverride, diffQuestionHintOverride, escapePrintDocumentText, extractPrintDocumentBodyHtml, findDuplicateOutcomeNames, flattenQuestionnaireOutcomeItems, formatPrintAnswerText, getQuestionAnswerCommentStoragePath, getQuestionCommentVisibilityFlag, isQuestionnaireOutcomeDisplayColorHex, matchesQuestionnaireOutcomeDisplayRule, mergeQuestionCommentConfig, mergeQuestionHintForViewer, minifyPrintHtml, normalizeCompletionMode, normalizePrintOrientation, normalizePrintPaperSize, normalizePrintWatermark, normalizeQuestionCommentConfig, normalizeQuestionHintConfig, normalizeQuestionHintFromEntityRow, normalizeQuestionHintMode, normalizeQuestionnaireOutcomeDisplayRules, normalizeQuestionnaireOutcomesValue, normalizeValidationStrategy, normalizeViewMode, parseQuestionHintPartialFromRecord, parseQuestionnaireOutcomeDisplayColor, readHintFieldsFromRecord, resolvePrintContentWidthMm, resolvePrintLetterheadPdfMargin, resolvePrintPaging, resolvePrintPdfPageOptions, resolvePrintPlainText, resolvePrintSettings, toDisplaySettings, toPrePostConfig, toPrintSettings, wrapPrintDocument };
878
- export type { AXMAssessmentCaseStatus, AXMAssessmentManagementAssessmentCaseEntityModel, AXMAssessmentManagementAssessmentSessionEntityModel, AXMAssessmentManagementQuestionBankItemEntityModel, AXMAssessmentManagementQuestionnaireEntityModel, AXMAssessmentPrintMergeKey, AXMAssessmentQuestionCommentConfig, AXMAssessmentQuestionHintConfig, AXMAssessmentQuestionHintConfigOff, AXMAssessmentQuestionHintConfigShown, AXMAssessmentQuestionHintMode, AXMAssessmentQuestionHintPartial, AXMAssessmentQuestionHintVisualMode, AXMAssessmentSessionPreviewPdfRequest, AXMAssessmentSessionPreviewPdfResult, AXMAssessmentSessionRole, AXMAssessmentSessionStatus, AXMCreateFormTemplateDto, AXMFormTemplateDetailDto, AXMFormTemplateListItemDto, AXMFormTemplateType, AXMFormTemplateTypeOption, AXMQuestionBankItemInterfaceMetadata, AXMQuestionBankItemInterfaceValue, AXMUpdateFormTemplateDto, AssessmentOutcomeItem, AssessmentOutcomesValue, AssessmentPostContent, AssessmentPreContent, PostQuestionnaireConfig, PrePostConfig, PrePostContentValue, PreQuestionnaireConfig, QuestionnaireBuilderValue, QuestionnaireCompletionMode, QuestionnaireDisplaySettings, QuestionnaireEntityDisplaySettings, QuestionnaireEntityPrintSettings, QuestionnaireOutcomeDisplayColor, QuestionnaireOutcomeDisplayEmphasis, QuestionnaireOutcomeDisplayIcon, QuestionnaireOutcomeDisplayOperator, QuestionnaireOutcomeDisplayRule, QuestionnaireOutcomeItem, QuestionnaireOutcomeResultKind, QuestionnaireOutcomeSection, QuestionnaireOutcomesValue, QuestionnairePrintBodySection, QuestionnairePrintHeaderInput, QuestionnairePrintOrientation, QuestionnairePrintPaging, QuestionnairePrintPaperSize, QuestionnairePrintQuestionHtml, QuestionnairePrintSettings };
897
+ export { ASSESSMENT_PRINT_CONTENT_WIDTH_MM, ASSESSMENT_PRINT_HTML_GZIP_ENCODING, ASSESSMENT_PRINT_PAGE_FORMAT, AXMAssessmentManagementFeatureKeys, AXMAssessmentManagementPermissionKeys, AXMFormTemplateTypes, AXM_ASSESSMENT_PRINT_MERGE_KEYS, AXM_ASSESSMENT_SESSION_PREVIEW_PDF_CLIENT_COMMAND_KEY, AXM_ASSESSMENT_SESSION_PREVIEW_PDF_COMMAND_KEY, AXPAssessmentManagementMenuKeys, AXPContentDocumentsPermissionKeys, AXPFormTemplateManagementMenuKeys, AXPFormTemplateManagementPermissionKeys, AXPFormTemplateSettings, AXPSafetyRiskPermissionKeys, AssessmentManagementManifest, DEFAULT_POST_QUESTIONNAIRE_CONFIG, DEFAULT_PRE_QUESTIONNAIRE_CONFIG, DEFAULT_QUESTIONNAIRE_ENTITY_DISPLAY, DEFAULT_QUESTIONNAIRE_ENTITY_PRINT, DEFAULT_QUESTIONNAIRE_OUTCOMES, DEFAULT_QUESTIONNAIRE_PRINT_SETTINGS, DEFAULT_QUESTION_COMMENT_CONFIG, DEFAULT_QUESTION_HINT_CONFIG, PRINT_PAGE_LETTERHEAD_BOTTOM_MARGIN_MM, PRINT_PAGE_LETTERHEAD_TOP_MARGIN_MM, PRINT_PAGE_SIDE_MARGIN_MM, QUESTIONNAIRE_ITEM_COL_SPANS, QUESTIONNAIRE_OUTCOMES_PAGE_COMPONENT_KEY, QUESTIONNAIRE_QUESTIONS_PAGE_COMPONENT_KEY, RootConfig, applyQuestionnairePrintHeader, buildQuestionnairePrintBodyHtml, buildQuestionnairePrintHeaderRegion, buildQuestionnaireQuestionCardHtml, buildQuestionnaireSessionBodyHtml, coerceQuestionnaireItemColSpan, commentConfigForEditForm, diffQuestionCommentOverride, diffQuestionHintOverride, escapePrintDocumentText, extractPrintDocumentBodyHtml, findDuplicateOutcomeNames, flattenQuestionnaireOutcomeItems, formatPrintAnswerText, getQuestionAnswerCommentStoragePath, getQuestionCommentVisibilityFlag, isQuestionnaireOutcomeDisplayColorHex, matchesQuestionnaireOutcomeDisplayRule, mergeQuestionCommentConfig, mergeQuestionHintForViewer, minifyPrintHtml, normalizeCompletionMode, normalizePrintOrientation, normalizePrintPaperSize, normalizePrintWatermark, normalizeQuestionCommentConfig, normalizeQuestionHintConfig, normalizeQuestionHintFromEntityRow, normalizeQuestionHintMode, normalizeQuestionnaireOutcomeDisplayRules, normalizeQuestionnaireOutcomesValue, normalizeValidationStrategy, normalizeViewMode, parseQuestionHintPartialFromRecord, parseQuestionnaireOutcomeDisplayColor, questionnaireItemLayoutOverride, readHintFieldsFromRecord, readQuestionnaireItemColSpan, resolvePrintContentWidthMm, resolvePrintLetterheadPdfMargin, resolvePrintPaging, resolvePrintPdfPageOptions, resolvePrintPlainText, resolvePrintSettings, toDisplaySettings, toPrePostConfig, toPrintSettings, wrapPrintDocument };
898
+ export type { AXMAssessmentCaseStatus, AXMAssessmentManagementAssessmentCaseEntityModel, AXMAssessmentManagementAssessmentSessionEntityModel, AXMAssessmentManagementQuestionBankItemEntityModel, AXMAssessmentManagementQuestionnaireEntityModel, AXMAssessmentPrintMergeKey, AXMAssessmentQuestionCommentConfig, AXMAssessmentQuestionHintConfig, AXMAssessmentQuestionHintConfigOff, AXMAssessmentQuestionHintConfigShown, AXMAssessmentQuestionHintMode, AXMAssessmentQuestionHintPartial, AXMAssessmentQuestionHintVisualMode, AXMAssessmentSessionPreviewPdfRequest, AXMAssessmentSessionPreviewPdfResult, AXMAssessmentSessionRole, AXMAssessmentSessionStatus, AXMCreateFormTemplateDto, AXMFormTemplateDetailDto, AXMFormTemplateListItemDto, AXMFormTemplateType, AXMFormTemplateTypeOption, AXMQuestionBankItemInterfaceMetadata, AXMQuestionBankItemInterfaceValue, AXMUpdateFormTemplateDto, AssessmentOutcomeItem, AssessmentOutcomesValue, AssessmentPostContent, AssessmentPreContent, PostQuestionnaireConfig, PrePostConfig, PrePostContentValue, PreQuestionnaireConfig, QuestionnaireBuilderValue, QuestionnaireCompletionMode, QuestionnaireDisplaySettings, QuestionnaireEntityDisplaySettings, QuestionnaireEntityPrintSettings, QuestionnaireItemColSpan, QuestionnaireOutcomeDisplayColor, QuestionnaireOutcomeDisplayEmphasis, QuestionnaireOutcomeDisplayIcon, QuestionnaireOutcomeDisplayOperator, QuestionnaireOutcomeDisplayRule, QuestionnaireOutcomeItem, QuestionnaireOutcomeResultKind, QuestionnaireOutcomeSection, QuestionnaireOutcomesValue, QuestionnairePrintBodySection, QuestionnairePrintHeaderInput, QuestionnairePrintOrientation, QuestionnairePrintPaging, QuestionnairePrintPaperSize, QuestionnairePrintQuestionHtml, QuestionnairePrintSettings };
@@ -200,6 +200,8 @@ interface QuestionnaireViewerQuestion {
200
200
  /** Parent section technical name. */
201
201
  sectionName: string;
202
202
  order: number;
203
+ /** Columns in the 12-column section grid. 12 when the questionnaire item has no width override. */
204
+ colSpan: number;
203
205
  isRequired?: boolean | AXPExpression;
204
206
  isVisible?: boolean | AXPExpression;
205
207
  /** Resolved hint (question bank default + questionnaire item overrides). */
@@ -645,9 +647,15 @@ declare class AXMQuestionnaireViewerFeatureModule {
645
647
  static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXMQuestionnaireViewerFeatureModule>;
646
648
  }
647
649
 
650
+ declare class AXMContentDisplayPluginsModule {
651
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMContentDisplayPluginsModule, never>;
652
+ static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXMContentDisplayPluginsModule, never, never, never>;
653
+ static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXMContentDisplayPluginsModule>;
654
+ }
655
+
648
656
  declare class AXMAssessmentManagementModule {
649
657
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXMAssessmentManagementModule, never>;
650
- static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXMAssessmentManagementModule, never, [typeof i1$1.AXPWidgetsModule, typeof _acorex_platform_framework_client_layout_widget_core.AXPWidgetCoreModule, typeof AXMAssessmentManagementFileTypeModule, typeof AXMQuestionnaireBuilderFeatureModule, typeof AXMQuestionnaireViewerFeatureModule], never>;
658
+ static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXMAssessmentManagementModule, never, [typeof i1$1.AXPWidgetsModule, typeof _acorex_platform_framework_client_layout_widget_core.AXPWidgetCoreModule, typeof AXMAssessmentManagementFileTypeModule, typeof AXMQuestionnaireBuilderFeatureModule, typeof AXMQuestionnaireViewerFeatureModule, typeof AXMContentDisplayPluginsModule], never>;
651
659
  static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXMAssessmentManagementModule>;
652
660
  }
653
661
 
@@ -796,6 +804,7 @@ interface AXMQuestionnaireViewerServiceResult {
796
804
  */
797
805
  declare class AXMQuestionnaireViewerService {
798
806
  private readonly popupService;
807
+ private readonly dialogOpener;
799
808
  private readonly entityService;
800
809
  private readonly expressionEvaluator;
801
810
  protected readonly deviceService: AXPDeviceService;