@acorex/modules 20.7.13 → 20.7.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/application-management/index.d.ts +1 -1
- package/assessment-management/README.md +11 -0
- package/assessment-management/index.d.ts +122 -24
- package/auth/index.d.ts +1 -1
- package/common/index.d.ts +9 -3
- package/contact-core/index.d.ts +90 -0
- package/content-management/index.d.ts +2 -2
- package/data-management/index.d.ts +215 -19
- package/document-management/index.d.ts +167 -374
- package/fesm2022/acorex-modules-application-management.mjs +3 -3
- package/fesm2022/acorex-modules-application-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-assessment-management-acorex-modules-assessment-management-ClgGS32i.mjs → acorex-modules-assessment-management-acorex-modules-assessment-management-HgaOIA2U.mjs} +950 -468
- package/fesm2022/acorex-modules-assessment-management-acorex-modules-assessment-management-HgaOIA2U.mjs.map +1 -0
- package/fesm2022/{acorex-modules-assessment-management-answers-viewer-widget-column.component-UmXUT6Xn.mjs → acorex-modules-assessment-management-answers-viewer-widget-column.component-DyxE9Xec.mjs} +2 -2
- package/fesm2022/{acorex-modules-assessment-management-answers-viewer-widget-column.component-UmXUT6Xn.mjs.map → acorex-modules-assessment-management-answers-viewer-widget-column.component-DyxE9Xec.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-assessment-management-answers-viewer-widget-edit.component-vVfXtden.mjs → acorex-modules-assessment-management-answers-viewer-widget-edit.component-DC2Ep3r1.mjs} +2 -2
- package/fesm2022/{acorex-modules-assessment-management-answers-viewer-widget-edit.component-vVfXtden.mjs.map → acorex-modules-assessment-management-answers-viewer-widget-edit.component-DC2Ep3r1.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-assessment-management-answers-viewer-widget-view.component-C75zxKgV.mjs → acorex-modules-assessment-management-answers-viewer-widget-view.component-iKqac5PE.mjs} +2 -2
- package/fesm2022/{acorex-modules-assessment-management-answers-viewer-widget-view.component-C75zxKgV.mjs.map → acorex-modules-assessment-management-answers-viewer-widget-view.component-iKqac5PE.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-assessment-management-assessment-case.entity-CjhC5YAF.mjs → acorex-modules-assessment-management-assessment-case.entity-CsCMlcvF.mjs} +3 -3
- package/fesm2022/acorex-modules-assessment-management-assessment-case.entity-CsCMlcvF.mjs.map +1 -0
- package/fesm2022/{acorex-modules-assessment-management-assessment-session.entity-B_IDiEzp.mjs → acorex-modules-assessment-management-assessment-session.entity-BkNVe3FO.mjs} +2 -2
- package/fesm2022/{acorex-modules-assessment-management-assessment-session.entity-B_IDiEzp.mjs.map → acorex-modules-assessment-management-assessment-session.entity-BkNVe3FO.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-assessment-management-fill-assessment-session.command-zT5u3h_s.mjs → acorex-modules-assessment-management-fill-assessment-session.command-Dgeh3E5f.mjs} +32 -33
- package/fesm2022/acorex-modules-assessment-management-fill-assessment-session.command-Dgeh3E5f.mjs.map +1 -0
- package/fesm2022/{acorex-modules-assessment-management-preview-questionnaire.command-BIXy9eut.mjs → acorex-modules-assessment-management-preview-questionnaire.command-NcZlE6DU.mjs} +24 -8
- package/fesm2022/acorex-modules-assessment-management-preview-questionnaire.command-NcZlE6DU.mjs.map +1 -0
- package/fesm2022/{acorex-modules-assessment-management-question-bank-item.entity-BWYLXvCp.mjs → acorex-modules-assessment-management-question-bank-item.entity-vNxSmJuv.mjs} +2 -2
- package/fesm2022/{acorex-modules-assessment-management-question-bank-item.entity-BWYLXvCp.mjs.map → acorex-modules-assessment-management-question-bank-item.entity-vNxSmJuv.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-assessment-management-questionnaire-builder-edit.component-3wVcKQGE.mjs → acorex-modules-assessment-management-questionnaire-builder-edit.component-CbfHOFT1.mjs} +20 -4
- package/fesm2022/acorex-modules-assessment-management-questionnaire-builder-edit.component-CbfHOFT1.mjs.map +1 -0
- package/fesm2022/{acorex-modules-assessment-management-questionnaire-builder-view.component-meuUo7Vx.mjs → acorex-modules-assessment-management-questionnaire-builder-view.component-DDqDjzwH.mjs} +3 -3
- package/fesm2022/acorex-modules-assessment-management-questionnaire-builder-view.component-DDqDjzwH.mjs.map +1 -0
- package/fesm2022/{acorex-modules-assessment-management-questionnaire-builder.component-CGgUUkOY.mjs → acorex-modules-assessment-management-questionnaire-builder.component-BOnwdWj7.mjs} +11 -5
- package/fesm2022/acorex-modules-assessment-management-questionnaire-builder.component-BOnwdWj7.mjs.map +1 -0
- package/fesm2022/acorex-modules-assessment-management-questionnaire-viewer-popup.component-BX8Q2Kfn.mjs +392 -0
- package/fesm2022/acorex-modules-assessment-management-questionnaire-viewer-popup.component-BX8Q2Kfn.mjs.map +1 -0
- package/fesm2022/{acorex-modules-assessment-management-questionnaire-viewer.service-D3k3J93r.mjs → acorex-modules-assessment-management-questionnaire-viewer.service-CSdVNxV2.mjs} +21 -6
- package/fesm2022/acorex-modules-assessment-management-questionnaire-viewer.service-CSdVNxV2.mjs.map +1 -0
- package/fesm2022/{acorex-modules-assessment-management-questionnaire.entity-C8sX0d_p.mjs → acorex-modules-assessment-management-questionnaire.entity-DFQIvlza.mjs} +138 -23
- package/fesm2022/acorex-modules-assessment-management-questionnaire.entity-DFQIvlza.mjs.map +1 -0
- package/fesm2022/{acorex-modules-assessment-management-view-session-answers.command-Czq7cj9R.mjs → acorex-modules-assessment-management-view-session-answers.command-CMmE72Kt.mjs} +3 -3
- package/fesm2022/{acorex-modules-assessment-management-view-session-answers.command-Czq7cj9R.mjs.map → acorex-modules-assessment-management-view-session-answers.command-CMmE72Kt.mjs.map} +1 -1
- package/fesm2022/acorex-modules-assessment-management.mjs +1 -1
- package/fesm2022/{acorex-modules-auth-acorex-modules-auth-IIyirCLb.mjs → acorex-modules-auth-acorex-modules-auth-CZuDhBx5.mjs} +18 -18
- package/fesm2022/acorex-modules-auth-acorex-modules-auth-CZuDhBx5.mjs.map +1 -0
- package/fesm2022/{acorex-modules-auth-app-chooser.component-BGLW8Qtn.mjs → acorex-modules-auth-app-chooser.component-DJE47I8p.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-app-chooser.component-BGLW8Qtn.mjs.map → acorex-modules-auth-app-chooser.component-DJE47I8p.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-login.module-uUQkWCgY.mjs → acorex-modules-auth-login.module-CI_lkyb7.mjs} +4 -4
- package/fesm2022/{acorex-modules-auth-login.module-uUQkWCgY.mjs.map → acorex-modules-auth-login.module-CI_lkyb7.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-master.layout-XkwT3Slv.mjs → acorex-modules-auth-master.layout-CdY380qS.mjs} +5 -4
- package/fesm2022/acorex-modules-auth-master.layout-CdY380qS.mjs.map +1 -0
- package/fesm2022/{acorex-modules-auth-oauth-callback.component-C0p17V1b.mjs → acorex-modules-auth-oauth-callback.component-BvPk9b3e.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-oauth-callback.component-C0p17V1b.mjs.map → acorex-modules-auth-oauth-callback.component-BvPk9b3e.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-password.component-CaH-OaIv.mjs → acorex-modules-auth-password.component-CefISnvd.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-password.component-CaH-OaIv.mjs.map → acorex-modules-auth-password.component-CefISnvd.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-password.component-DDFOsrkt.mjs → acorex-modules-auth-password.component-Dw_v_EFQ.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-password.component-DDFOsrkt.mjs.map → acorex-modules-auth-password.component-Dw_v_EFQ.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-routes-Cik9Y3RJ.mjs → acorex-modules-auth-routes-CwcJHbAi.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-routes-Cik9Y3RJ.mjs.map → acorex-modules-auth-routes-CwcJHbAi.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-tenant-chooser.component-B9VJd12P.mjs → acorex-modules-auth-tenant-chooser.component-DFhTYEDt.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-tenant-chooser.component-B9VJd12P.mjs.map → acorex-modules-auth-tenant-chooser.component-DFhTYEDt.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-two-factor.module-D1TKyIXZ.mjs → acorex-modules-auth-two-factor.module-BOZB6sLo.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-two-factor.module-D1TKyIXZ.mjs.map → acorex-modules-auth-two-factor.module-BOZB6sLo.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-auth-user-sessions.component-MZJramlf.mjs → acorex-modules-auth-user-sessions.component-BnrnXg4G.mjs} +2 -2
- package/fesm2022/{acorex-modules-auth-user-sessions.component-MZJramlf.mjs.map → acorex-modules-auth-user-sessions.component-BnrnXg4G.mjs.map} +1 -1
- package/fesm2022/acorex-modules-auth.mjs +1 -1
- package/fesm2022/acorex-modules-calendar-management.mjs +4 -3
- package/fesm2022/acorex-modules-calendar-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-common.mjs +77 -36
- package/fesm2022/acorex-modules-common.mjs.map +1 -1
- package/fesm2022/acorex-modules-contact-core-emergency-service.entity-Cro3bM4G.mjs +318 -0
- package/fesm2022/acorex-modules-contact-core-emergency-service.entity-Cro3bM4G.mjs.map +1 -0
- package/fesm2022/acorex-modules-contact-core.mjs +247 -0
- package/fesm2022/acorex-modules-contact-core.mjs.map +1 -0
- package/fesm2022/acorex-modules-content-management.mjs +66 -19
- package/fesm2022/acorex-modules-content-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-data-management.mjs +1013 -505
- package/fesm2022/acorex-modules-data-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-document-management-drive-choose.component-ovwhHP2n.mjs → acorex-modules-document-management-drive-choose.component-BOeZ9mpL.mjs} +3 -7
- package/fesm2022/acorex-modules-document-management-drive-choose.component-BOeZ9mpL.mjs.map +1 -0
- package/fesm2022/acorex-modules-document-management.mjs +688 -2991
- package/fesm2022/acorex-modules-document-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-health-core-allergy-type.entity-BaZ4OhHW.mjs +65 -0
- package/fesm2022/acorex-modules-health-core-allergy-type.entity-BaZ4OhHW.mjs.map +1 -0
- package/fesm2022/acorex-modules-health-core-blood-type.entity-Cu-UIgw4.mjs +120 -0
- package/fesm2022/acorex-modules-health-core-blood-type.entity-Cu-UIgw4.mjs.map +1 -0
- package/fesm2022/acorex-modules-health-core-body-part.entity-Dc2SIiB3.mjs +65 -0
- package/fesm2022/acorex-modules-health-core-body-part.entity-Dc2SIiB3.mjs.map +1 -0
- package/fesm2022/acorex-modules-health-core-chronic-condition-type.entity-B-9j3pNB.mjs +65 -0
- package/fesm2022/acorex-modules-health-core-chronic-condition-type.entity-B-9j3pNB.mjs.map +1 -0
- package/fesm2022/acorex-modules-health-core-disability-status.entity-hs3vA3zZ.mjs +120 -0
- package/fesm2022/acorex-modules-health-core-disability-status.entity-hs3vA3zZ.mjs.map +1 -0
- package/fesm2022/acorex-modules-health-core-injury-type.entity-BUA1VsE_.mjs +65 -0
- package/fesm2022/acorex-modules-health-core-injury-type.entity-BUA1VsE_.mjs.map +1 -0
- package/fesm2022/acorex-modules-health-core-vaccination-type.entity-DBdFkwx6.mjs +65 -0
- package/fesm2022/acorex-modules-health-core-vaccination-type.entity-DBdFkwx6.mjs.map +1 -0
- package/fesm2022/acorex-modules-health-core.mjs +487 -0
- package/fesm2022/acorex-modules-health-core.mjs.map +1 -0
- package/fesm2022/{acorex-modules-help-desk-acorex-modules-help-desk-Clea9Hhv.mjs → acorex-modules-help-desk-acorex-modules-help-desk-MfqQx2iN.mjs} +4 -5
- package/fesm2022/{acorex-modules-help-desk-acorex-modules-help-desk-Clea9Hhv.mjs.map → acorex-modules-help-desk-acorex-modules-help-desk-MfqQx2iN.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-help-desk-capture-screen.component-CiQv__MW.mjs → acorex-modules-help-desk-capture-screen.component-CATwc3fe.mjs} +2 -2
- package/fesm2022/{acorex-modules-help-desk-capture-screen.component-CiQv__MW.mjs.map → acorex-modules-help-desk-capture-screen.component-CATwc3fe.mjs.map} +1 -1
- package/fesm2022/acorex-modules-help-desk.mjs +1 -1
- package/fesm2022/{acorex-modules-human-capital-management-leave-request.entity-BDSyXKSF.mjs → acorex-modules-human-capital-management-leave-request.entity-CviI9xJC.mjs} +2 -2
- package/fesm2022/acorex-modules-human-capital-management-leave-request.entity-CviI9xJC.mjs.map +1 -0
- package/fesm2022/{acorex-modules-human-capital-management-leave-type.entity-CY81Nohl.mjs → acorex-modules-human-capital-management-leave-type.entity-YitcNesR.mjs} +6 -2
- package/fesm2022/acorex-modules-human-capital-management-leave-type.entity-YitcNesR.mjs.map +1 -0
- package/fesm2022/acorex-modules-human-capital-management.mjs +351 -696
- package/fesm2022/acorex-modules-human-capital-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-locale-management.mjs +13 -6
- package/fesm2022/acorex-modules-locale-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-notification-management.mjs +4 -4
- package/fesm2022/acorex-modules-notification-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-person-core-education-level.entity-BiXdPA-Z.mjs +120 -0
- package/fesm2022/acorex-modules-person-core-education-level.entity-BiXdPA-Z.mjs.map +1 -0
- package/fesm2022/acorex-modules-person-core-marital-status.entity-j6sMTtTS.mjs +120 -0
- package/fesm2022/acorex-modules-person-core-marital-status.entity-j6sMTtTS.mjs.map +1 -0
- package/fesm2022/acorex-modules-person-core-person-identifier-type.entity-BIFiRZ2d.mjs +191 -0
- package/fesm2022/acorex-modules-person-core-person-identifier-type.entity-BIFiRZ2d.mjs.map +1 -0
- package/fesm2022/acorex-modules-person-core-person-relationship-type.entity-2qysKjU5.mjs +119 -0
- package/fesm2022/acorex-modules-person-core-person-relationship-type.entity-2qysKjU5.mjs.map +1 -0
- package/fesm2022/acorex-modules-person-core-religion.entity-Czb5aHb6.mjs +120 -0
- package/fesm2022/acorex-modules-person-core-religion.entity-Czb5aHb6.mjs.map +1 -0
- package/fesm2022/acorex-modules-person-core.mjs +466 -0
- package/fesm2022/acorex-modules-person-core.mjs.map +1 -0
- package/fesm2022/{acorex-modules-person-management-person-identifier.entity-CI8u0Ro6.mjs → acorex-modules-person-management-person-identifier.entity-HBmiUahC.mjs} +4 -3
- package/fesm2022/acorex-modules-person-management-person-identifier.entity-HBmiUahC.mjs.map +1 -0
- package/fesm2022/{acorex-modules-person-management-person-relationship.entity-DK3mYVFv.mjs → acorex-modules-person-management-person-relationship.entity-DbcXasEe.mjs} +4 -3
- package/fesm2022/acorex-modules-person-management-person-relationship.entity-DbcXasEe.mjs.map +1 -0
- package/fesm2022/acorex-modules-person-management.mjs +11 -259
- package/fesm2022/acorex-modules-person-management.mjs.map +1 -1
- package/fesm2022/{acorex-modules-settings-management-acorex-modules-settings-management-BRVfUYiM.mjs → acorex-modules-settings-management-acorex-modules-settings-management-Dpjfgmg9.mjs} +6 -6
- package/fesm2022/{acorex-modules-settings-management-acorex-modules-settings-management-BRVfUYiM.mjs.map → acorex-modules-settings-management-acorex-modules-settings-management-Dpjfgmg9.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-settings-management-permission-definition.provider-WSxrvAsV.mjs → acorex-modules-settings-management-permission-definition.provider-nYV8iDwJ.mjs} +2 -2
- package/fesm2022/{acorex-modules-settings-management-permission-definition.provider-WSxrvAsV.mjs.map → acorex-modules-settings-management-permission-definition.provider-nYV8iDwJ.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-settings-management-setting-page.component-MYnJYUxE.mjs → acorex-modules-settings-management-setting-page.component-B1lhCtl_.mjs} +2 -2
- package/fesm2022/{acorex-modules-settings-management-setting-page.component-MYnJYUxE.mjs.map → acorex-modules-settings-management-setting-page.component-B1lhCtl_.mjs.map} +1 -1
- package/fesm2022/{acorex-modules-settings-management-setting-view.component-Cq80snth.mjs → acorex-modules-settings-management-setting-view.component-CAX1kFy2.mjs} +2 -2
- package/fesm2022/{acorex-modules-settings-management-setting-view.component-Cq80snth.mjs.map → acorex-modules-settings-management-setting-view.component-CAX1kFy2.mjs.map} +1 -1
- package/fesm2022/acorex-modules-settings-management.mjs +1 -1
- package/fesm2022/acorex-modules-system-insight.mjs +4 -3
- package/fesm2022/acorex-modules-system-insight.mjs.map +1 -1
- package/fesm2022/{acorex-modules-task-management-task-board.page-Cgxdk78j.mjs → acorex-modules-task-management-task-board.page-BOOY3qla.mjs} +53 -60
- package/fesm2022/acorex-modules-task-management-task-board.page-BOOY3qla.mjs.map +1 -0
- package/fesm2022/acorex-modules-task-management.mjs +39 -11
- package/fesm2022/acorex-modules-task-management.mjs.map +1 -1
- package/fesm2022/acorex-modules-workflow-management-activity-definition.entity-BbBEPTBa.mjs +258 -0
- package/fesm2022/acorex-modules-workflow-management-activity-definition.entity-BbBEPTBa.mjs.map +1 -0
- package/fesm2022/acorex-modules-workflow-management-workflow-definition.entity-nJMBL0qt.mjs +371 -0
- package/fesm2022/acorex-modules-workflow-management-workflow-definition.entity-nJMBL0qt.mjs.map +1 -0
- package/fesm2022/acorex-modules-workflow-management-workflow-instance.entity-Pso0oRN5.mjs +313 -0
- package/fesm2022/acorex-modules-workflow-management-workflow-instance.entity-Pso0oRN5.mjs.map +1 -0
- package/fesm2022/acorex-modules-workflow-management-workflow-task-popover.component-BF9xYEkf.mjs +345 -0
- package/fesm2022/acorex-modules-workflow-management-workflow-task-popover.component-BF9xYEkf.mjs.map +1 -0
- package/fesm2022/acorex-modules-workflow-management.mjs +733 -2521
- package/fesm2022/acorex-modules-workflow-management.mjs.map +1 -1
- package/health-core/index.d.ts +156 -0
- package/help-desk/index.d.ts +1 -1
- package/human-capital-management/index.d.ts +19 -79
- package/locale-management/index.d.ts +1 -1
- package/notification-management/index.d.ts +1 -1
- package/package.json +18 -6
- package/person-core/index.d.ts +132 -0
- package/person-management/index.d.ts +1 -25
- package/task-management/index.d.ts +12 -1
- package/workflow-management/index.d.ts +239 -265
- package/fesm2022/acorex-modules-assessment-management-acorex-modules-assessment-management-ClgGS32i.mjs.map +0 -1
- package/fesm2022/acorex-modules-assessment-management-assessment-case.entity-CjhC5YAF.mjs.map +0 -1
- package/fesm2022/acorex-modules-assessment-management-fill-assessment-session.command-zT5u3h_s.mjs.map +0 -1
- package/fesm2022/acorex-modules-assessment-management-preview-questionnaire.command-BIXy9eut.mjs.map +0 -1
- package/fesm2022/acorex-modules-assessment-management-questionnaire-builder-edit.component-3wVcKQGE.mjs.map +0 -1
- package/fesm2022/acorex-modules-assessment-management-questionnaire-builder-view.component-meuUo7Vx.mjs.map +0 -1
- package/fesm2022/acorex-modules-assessment-management-questionnaire-builder.component-CGgUUkOY.mjs.map +0 -1
- package/fesm2022/acorex-modules-assessment-management-questionnaire-viewer-popup.component-kVnWtedV.mjs +0 -416
- package/fesm2022/acorex-modules-assessment-management-questionnaire-viewer-popup.component-kVnWtedV.mjs.map +0 -1
- package/fesm2022/acorex-modules-assessment-management-questionnaire-viewer.service-D3k3J93r.mjs.map +0 -1
- package/fesm2022/acorex-modules-assessment-management-questionnaire.entity-C8sX0d_p.mjs.map +0 -1
- package/fesm2022/acorex-modules-auth-acorex-modules-auth-IIyirCLb.mjs.map +0 -1
- package/fesm2022/acorex-modules-auth-master.layout-XkwT3Slv.mjs.map +0 -1
- package/fesm2022/acorex-modules-document-management-drive-choose.component-ovwhHP2n.mjs.map +0 -1
- package/fesm2022/acorex-modules-human-capital-management-leave-request-task-popover.component-yGvT9kSL.mjs +0 -381
- package/fesm2022/acorex-modules-human-capital-management-leave-request-task-popover.component-yGvT9kSL.mjs.map +0 -1
- package/fesm2022/acorex-modules-human-capital-management-leave-request.entity-BDSyXKSF.mjs.map +0 -1
- package/fesm2022/acorex-modules-human-capital-management-leave-type.entity-CY81Nohl.mjs.map +0 -1
- package/fesm2022/acorex-modules-person-management-person-identifier-type.entity-VchCczk-.mjs +0 -498
- package/fesm2022/acorex-modules-person-management-person-identifier-type.entity-VchCczk-.mjs.map +0 -1
- package/fesm2022/acorex-modules-person-management-person-identifier.entity-CI8u0Ro6.mjs.map +0 -1
- package/fesm2022/acorex-modules-person-management-person-relationship.entity-DK3mYVFv.mjs.map +0 -1
- package/fesm2022/acorex-modules-task-management-task-board.page-Cgxdk78j.mjs.map +0 -1
- package/fesm2022/acorex-modules-workflow-management-cartable-page.component-Bso0XRkJ.mjs +0 -296
- package/fesm2022/acorex-modules-workflow-management-cartable-page.component-Bso0XRkJ.mjs.map +0 -1
- package/fesm2022/acorex-modules-workflow-management-index-xB36g4F1.mjs +0 -469
- package/fesm2022/acorex-modules-workflow-management-index-xB36g4F1.mjs.map +0 -1
|
@@ -15,7 +15,7 @@ import * as i1$4 from '@acorex/components/form';
|
|
|
15
15
|
import { AXFormModule } from '@acorex/components/form';
|
|
16
16
|
import * as i4 from '@acorex/core/translation';
|
|
17
17
|
import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
|
|
18
|
-
import { AXPStateMessageComponent,
|
|
18
|
+
import { AXPStateMessageComponent, AXPThemeLayoutBlockComponent, AXPStopwatchComponent } from '@acorex/platform/layout/components';
|
|
19
19
|
import * as i2 from '@acorex/components/decorators';
|
|
20
20
|
import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
21
21
|
import { AXToastService } from '@acorex/components/toast';
|
|
@@ -33,6 +33,7 @@ import * as i1$3 from '@acorex/components/button';
|
|
|
33
33
|
import { AXButtonModule } from '@acorex/components/button';
|
|
34
34
|
import { provideCommandSetups } from '@acorex/platform/runtime';
|
|
35
35
|
import { AXPPageLayoutBaseComponent, AXPPageLayoutComponent, AXPPageLayoutBase } from '@acorex/platform/layout/views';
|
|
36
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
36
37
|
|
|
37
38
|
//#region ---- Root Configuration ----
|
|
38
39
|
const config = { i18n: 'assessment-management' };
|
|
@@ -85,13 +86,13 @@ class AXMAssessmentManagementEntityProvider {
|
|
|
85
86
|
if (moduleName === RootConfig.module.name) {
|
|
86
87
|
switch (entityName) {
|
|
87
88
|
case RootConfig.entities.questionBankItem.name:
|
|
88
|
-
return (await import('./acorex-modules-assessment-management-question-bank-item.entity-
|
|
89
|
+
return (await import('./acorex-modules-assessment-management-question-bank-item.entity-vNxSmJuv.mjs')).factory(this.injector);
|
|
89
90
|
case RootConfig.entities.questionnaire.name:
|
|
90
|
-
return (await import('./acorex-modules-assessment-management-questionnaire.entity-
|
|
91
|
+
return (await import('./acorex-modules-assessment-management-questionnaire.entity-DFQIvlza.mjs')).factory(this.injector);
|
|
91
92
|
case RootConfig.entities.assessmentCase.name:
|
|
92
|
-
return (await import('./acorex-modules-assessment-management-assessment-case.entity-
|
|
93
|
+
return (await import('./acorex-modules-assessment-management-assessment-case.entity-CsCMlcvF.mjs')).factory(this.injector);
|
|
93
94
|
case RootConfig.entities.assessmentSession.name:
|
|
94
|
-
return (await import('./acorex-modules-assessment-management-assessment-session.entity-
|
|
95
|
+
return (await import('./acorex-modules-assessment-management-assessment-session.entity-BkNVe3FO.mjs')).factory(this.injector);
|
|
95
96
|
}
|
|
96
97
|
}
|
|
97
98
|
return null;
|
|
@@ -526,13 +527,13 @@ const AXMQuestionnaireBuilderWidget = {
|
|
|
526
527
|
],
|
|
527
528
|
components: {
|
|
528
529
|
view: {
|
|
529
|
-
component: () => import('./acorex-modules-assessment-management-questionnaire-builder-view.component-
|
|
530
|
+
component: () => import('./acorex-modules-assessment-management-questionnaire-builder-view.component-DDqDjzwH.mjs').then((c) => c.AXMQuestionnaireBuilderWidgetViewComponent),
|
|
530
531
|
},
|
|
531
532
|
edit: {
|
|
532
|
-
component: () => import('./acorex-modules-assessment-management-questionnaire-builder-edit.component-
|
|
533
|
+
component: () => import('./acorex-modules-assessment-management-questionnaire-builder-edit.component-CbfHOFT1.mjs').then((c) => c.AXMQuestionnaireBuilderWidgetEditComponent),
|
|
533
534
|
},
|
|
534
535
|
print: {
|
|
535
|
-
component: () => import('./acorex-modules-assessment-management-questionnaire-builder-edit.component-
|
|
536
|
+
component: () => import('./acorex-modules-assessment-management-questionnaire-builder-edit.component-CbfHOFT1.mjs').then((c) => c.AXMQuestionnaireBuilderWidgetEditComponent),
|
|
536
537
|
},
|
|
537
538
|
},
|
|
538
539
|
};
|
|
@@ -679,16 +680,16 @@ const AXMAnswersViewerWidget = {
|
|
|
679
680
|
],
|
|
680
681
|
components: {
|
|
681
682
|
designer: {
|
|
682
|
-
component: () => import('./acorex-modules-assessment-management-answers-viewer-widget-edit.component-
|
|
683
|
+
component: () => import('./acorex-modules-assessment-management-answers-viewer-widget-edit.component-DC2Ep3r1.mjs').then((c) => c.AXMAnswersViewerWidgetEditComponent),
|
|
683
684
|
},
|
|
684
685
|
view: {
|
|
685
|
-
component: () => import('./acorex-modules-assessment-management-answers-viewer-widget-view.component-
|
|
686
|
+
component: () => import('./acorex-modules-assessment-management-answers-viewer-widget-view.component-iKqac5PE.mjs').then((c) => c.AXMAnswersViewerWidgetViewComponent),
|
|
686
687
|
},
|
|
687
688
|
edit: {
|
|
688
|
-
component: () => import('./acorex-modules-assessment-management-answers-viewer-widget-edit.component-
|
|
689
|
+
component: () => import('./acorex-modules-assessment-management-answers-viewer-widget-edit.component-DC2Ep3r1.mjs').then((c) => c.AXMAnswersViewerWidgetEditComponent),
|
|
689
690
|
},
|
|
690
691
|
column: {
|
|
691
|
-
component: () => import('./acorex-modules-assessment-management-answers-viewer-widget-column.component-
|
|
692
|
+
component: () => import('./acorex-modules-assessment-management-answers-viewer-widget-column.component-DyxE9Xec.mjs').then((c) => c.AXMAnswersViewerWidgetColumnComponent),
|
|
692
693
|
},
|
|
693
694
|
},
|
|
694
695
|
};
|
|
@@ -1879,6 +1880,7 @@ const AXMQuestionnaireViewerViewModel = signalStore(withState(() => ({
|
|
|
1879
1880
|
description: question.question.description,
|
|
1880
1881
|
answer: answer,
|
|
1881
1882
|
isRequired: question.isRequired,
|
|
1883
|
+
question,
|
|
1882
1884
|
});
|
|
1883
1885
|
}
|
|
1884
1886
|
}
|
|
@@ -1989,15 +1991,19 @@ const AXMQuestionnaireViewerViewModel = signalStore(withState(() => ({
|
|
|
1989
1991
|
class AXMQuestionnaireViewerQuestionComponent {
|
|
1990
1992
|
constructor() {
|
|
1991
1993
|
//#region ---- Services & Dependencies ----
|
|
1992
|
-
this.vm = inject(AXMQuestionnaireViewerViewModel);
|
|
1994
|
+
this.vm = inject(AXMQuestionnaireViewerViewModel, { optional: true });
|
|
1993
1995
|
//#endregion
|
|
1994
1996
|
//#region ---- Inputs ----
|
|
1995
1997
|
this.question = input.required(...(ngDevMode ? [{ debugName: "question" }] : []));
|
|
1998
|
+
/** Context data when used outside questionnaire viewer (e.g. review step). Used for isAnswered when vm is null. */
|
|
1999
|
+
this.contextData = input(undefined, ...(ngDevMode ? [{ debugName: "contextData" }] : []));
|
|
1996
2000
|
this.sectionOrder = input.required(...(ngDevMode ? [{ debugName: "sectionOrder" }] : []));
|
|
1997
2001
|
this.questionIndex = input.required(...(ngDevMode ? [{ debugName: "questionIndex" }] : []));
|
|
1998
2002
|
this.showQuestionNumbers = input(true, ...(ngDevMode ? [{ debugName: "showQuestionNumbers" }] : []));
|
|
1999
2003
|
this.showQuestionCounter = input(false, ...(ngDevMode ? [{ debugName: "showQuestionCounter" }] : []));
|
|
2000
2004
|
this.currentPosition = input(undefined, ...(ngDevMode ? [{ debugName: "currentPosition" }] : []));
|
|
2005
|
+
/** Widget render mode: 'edit' for answering, 'view' for read-only display (e.g. review step). */
|
|
2006
|
+
this.mode = input('edit', ...(ngDevMode ? [{ debugName: "mode" }] : []));
|
|
2001
2007
|
//#endregion
|
|
2002
2008
|
//#region ---- Computed Properties ----
|
|
2003
2009
|
/**
|
|
@@ -2005,21 +2011,19 @@ class AXMQuestionnaireViewerQuestionComponent {
|
|
|
2005
2011
|
*/
|
|
2006
2012
|
this.isAnswered = computed(() => {
|
|
2007
2013
|
const question = this.question();
|
|
2008
|
-
const
|
|
2009
|
-
|
|
2014
|
+
const contextDataInput = this.contextData();
|
|
2015
|
+
const container = this.vm?.widgetContainer();
|
|
2016
|
+
const data = contextDataInput ?? container?.contextService?.data() ?? {};
|
|
2017
|
+
if (!question || !question.question.interface?.path)
|
|
2010
2018
|
return false;
|
|
2011
2019
|
try {
|
|
2012
|
-
const
|
|
2013
|
-
const data = contextService.data() || {};
|
|
2014
|
-
const widgetPath = question.question.interface?.path;
|
|
2015
|
-
if (!widgetPath)
|
|
2016
|
-
return false;
|
|
2020
|
+
const widgetPath = question.question.interface.path;
|
|
2017
2021
|
const value = get(data, widgetPath);
|
|
2018
2022
|
const isEmpty = value === null ||
|
|
2019
2023
|
value === undefined ||
|
|
2020
2024
|
value === '' ||
|
|
2021
2025
|
(Array.isArray(value) && value.length === 0) ||
|
|
2022
|
-
(typeof value === 'object' && Object.keys(value).length === 0);
|
|
2026
|
+
(typeof value === 'object' && value !== null && Object.keys(value).length === 0);
|
|
2023
2027
|
return !isEmpty;
|
|
2024
2028
|
}
|
|
2025
2029
|
catch (error) {
|
|
@@ -2029,9 +2033,10 @@ class AXMQuestionnaireViewerQuestionComponent {
|
|
|
2029
2033
|
}, ...(ngDevMode ? [{ debugName: "isAnswered" }] : []));
|
|
2030
2034
|
}
|
|
2031
2035
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMQuestionnaireViewerQuestionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2032
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AXMQuestionnaireViewerQuestionComponent, isStandalone: true, selector: "axm-questionnaire-viewer-question", inputs: { question: { classPropertyName: "question", publicName: "question", isSignal: true, isRequired: true, transformFunction: null }, sectionOrder: { classPropertyName: "sectionOrder", publicName: "sectionOrder", isSignal: true, isRequired: true, transformFunction: null }, questionIndex: { classPropertyName: "questionIndex", publicName: "questionIndex", isSignal: true, isRequired: true, transformFunction: null }, showQuestionNumbers: { classPropertyName: "showQuestionNumbers", publicName: "showQuestionNumbers", isSignal: true, isRequired: false, transformFunction: null }, showQuestionCounter: { classPropertyName: "showQuestionCounter", publicName: "showQuestionCounter", isSignal: true, isRequired: false, transformFunction: null }, currentPosition: { classPropertyName: "currentPosition", publicName: "currentPosition", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
2036
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AXMQuestionnaireViewerQuestionComponent, isStandalone: true, selector: "axm-questionnaire-viewer-question", inputs: { question: { classPropertyName: "question", publicName: "question", isSignal: true, isRequired: true, transformFunction: null }, contextData: { classPropertyName: "contextData", publicName: "contextData", isSignal: true, isRequired: false, transformFunction: null }, sectionOrder: { classPropertyName: "sectionOrder", publicName: "sectionOrder", isSignal: true, isRequired: true, transformFunction: null }, questionIndex: { classPropertyName: "questionIndex", publicName: "questionIndex", isSignal: true, isRequired: true, transformFunction: null }, showQuestionNumbers: { classPropertyName: "showQuestionNumbers", publicName: "showQuestionNumbers", isSignal: true, isRequired: false, transformFunction: null }, showQuestionCounter: { classPropertyName: "showQuestionCounter", publicName: "showQuestionCounter", isSignal: true, isRequired: false, transformFunction: null }, currentPosition: { classPropertyName: "currentPosition", publicName: "currentPosition", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
2033
2037
|
<div class="__question-item" [class.__answered]="isAnswered()">
|
|
2034
2038
|
<div class="__question-header">
|
|
2039
|
+
@if (showQuestionNumbers() || (showQuestionCounter() && currentPosition())) {
|
|
2035
2040
|
<div class="__question-header-left">
|
|
2036
2041
|
@if (showQuestionNumbers()) {
|
|
2037
2042
|
<span class="__question-number">{{ sectionOrder() }}.{{ questionIndex() }}</span>
|
|
@@ -2042,6 +2047,7 @@ class AXMQuestionnaireViewerQuestionComponent {
|
|
|
2042
2047
|
</span>
|
|
2043
2048
|
}
|
|
2044
2049
|
</div>
|
|
2050
|
+
}
|
|
2045
2051
|
<div class="__question-header-right">
|
|
2046
2052
|
<h3 class="__question-title">{{ question().question.title }}</h3>
|
|
2047
2053
|
@if (isAnswered()) {
|
|
@@ -2058,19 +2064,20 @@ class AXMQuestionnaireViewerQuestionComponent {
|
|
|
2058
2064
|
<!-- Question Widget -->
|
|
2059
2065
|
<div class="__question-widget">
|
|
2060
2066
|
@if (question().question.interface) {
|
|
2061
|
-
<ng-container axp-widget-renderer [node]="question().question.interface" [mode]="
|
|
2067
|
+
<ng-container axp-widget-renderer [node]="question().question.interface" [mode]="mode()"></ng-container>
|
|
2062
2068
|
} @else {
|
|
2063
2069
|
<p class="__widget-placeholder">No widget interface configured</p>
|
|
2064
2070
|
}
|
|
2065
2071
|
</div>
|
|
2066
2072
|
</div>
|
|
2067
|
-
`, isInline: true, styles: [".__question-item{padding:1rem;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}.__question-item.__answered{--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-primary-300),var(--tw-border-opacity, 1));background-color:rgba(var(--ax-sys-color-primary-50),.3)}.__question-header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}.__question-header-left{display:flex;flex-shrink:0;align-items:center;gap:.75rem}.__question-number{font-size:.875rem;line-height:1.25rem;font-weight:600;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-primary-600),var(--tw-text-opacity, 1))}.__question-counter{font-size:.75rem;line-height:1rem;font-weight:500;--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity, 1))}.__question-header-right{display:flex;flex:1 1 0%;flex-wrap:wrap;align-items:flex-start;gap:.5rem}.__question-title{flex:1 1 0%;font-size:1rem;line-height:1.5rem;font-weight:500;--tw-text-opacity: 1;color:rgb(23 23 23 / var(--tw-text-opacity, 1))}.__answered-badge{border-radius:.25rem;padding:.25rem .5rem;font-size:.75rem;line-height:1rem;font-weight:500;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-success-100),var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-success-800),var(--tw-text-opacity, 1))}.__required-badge{border-radius:.25rem;padding:.25rem .5rem;font-size:.75rem;line-height:1rem;font-weight:500;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-warning-100),var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-warning-800),var(--tw-text-opacity, 1))}.__question-description{font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}.__question-widget{margin-top:.
|
|
2073
|
+
`, isInline: true, styles: [".__question-item{padding:1rem;text-align:left;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}.__question-item.__answered{--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-primary-300),var(--tw-border-opacity, 1));background-color:rgba(var(--ax-sys-color-primary-50),.3)}.__question-header{display:flex;width:100%;min-width:0px;align-items:flex-start;justify-content:space-between;gap:1rem}.__question-header-left{display:flex;flex-shrink:0;align-items:center;gap:.75rem}.__question-number{font-size:.875rem;line-height:1.25rem;font-weight:600;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-primary-600),var(--tw-text-opacity, 1))}.__question-counter{font-size:.75rem;line-height:1rem;font-weight:500;--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity, 1))}.__question-header-right{display:flex;min-width:0px;flex:1 1 0%;flex-wrap:wrap;align-items:flex-start;gap:.5rem}.__question-title{min-width:0px;flex:1 1 0%;text-align:left;font-size:1rem;line-height:1.5rem;font-weight:500;--tw-text-opacity: 1;color:rgb(23 23 23 / var(--tw-text-opacity, 1))}.__answered-badge{border-radius:.25rem;padding:.25rem .5rem;font-size:.75rem;line-height:1rem;font-weight:500;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-success-100),var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-success-800),var(--tw-text-opacity, 1))}.__required-badge{border-radius:.25rem;padding:.25rem .5rem;font-size:.75rem;line-height:1rem;font-weight:500;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-warning-100),var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-warning-800),var(--tw-text-opacity, 1))}.__question-description{margin-top:.25rem;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}.__question-widget{margin-top:.75rem;text-align:left}.__widget-placeholder{border-radius:.25rem;border-width:1px;border-style:dashed;padding:1rem;font-size:.875rem;line-height:1.25rem;font-style:italic;--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(250 250 250 / var(--tw-bg-opacity, 1))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "directive", type: i1.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged", "onLoad"], exportAs: ["widgetRenderer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2068
2074
|
}
|
|
2069
2075
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMQuestionnaireViewerQuestionComponent, decorators: [{
|
|
2070
2076
|
type: Component,
|
|
2071
2077
|
args: [{ selector: 'axm-questionnaire-viewer-question', template: `
|
|
2072
2078
|
<div class="__question-item" [class.__answered]="isAnswered()">
|
|
2073
2079
|
<div class="__question-header">
|
|
2080
|
+
@if (showQuestionNumbers() || (showQuestionCounter() && currentPosition())) {
|
|
2074
2081
|
<div class="__question-header-left">
|
|
2075
2082
|
@if (showQuestionNumbers()) {
|
|
2076
2083
|
<span class="__question-number">{{ sectionOrder() }}.{{ questionIndex() }}</span>
|
|
@@ -2081,6 +2088,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2081
2088
|
</span>
|
|
2082
2089
|
}
|
|
2083
2090
|
</div>
|
|
2091
|
+
}
|
|
2084
2092
|
<div class="__question-header-right">
|
|
2085
2093
|
<h3 class="__question-title">{{ question().question.title }}</h3>
|
|
2086
2094
|
@if (isAnswered()) {
|
|
@@ -2097,14 +2105,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2097
2105
|
<!-- Question Widget -->
|
|
2098
2106
|
<div class="__question-widget">
|
|
2099
2107
|
@if (question().question.interface) {
|
|
2100
|
-
<ng-container axp-widget-renderer [node]="question().question.interface" [mode]="
|
|
2108
|
+
<ng-container axp-widget-renderer [node]="question().question.interface" [mode]="mode()"></ng-container>
|
|
2101
2109
|
} @else {
|
|
2102
2110
|
<p class="__widget-placeholder">No widget interface configured</p>
|
|
2103
2111
|
}
|
|
2104
2112
|
</div>
|
|
2105
2113
|
</div>
|
|
2106
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, AXTranslationModule, AXPWidgetCoreModule], styles: [".__question-item{padding:1rem;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}.__question-item.__answered{--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-primary-300),var(--tw-border-opacity, 1));background-color:rgba(var(--ax-sys-color-primary-50),.3)}.__question-header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}.__question-header-left{display:flex;flex-shrink:0;align-items:center;gap:.75rem}.__question-number{font-size:.875rem;line-height:1.25rem;font-weight:600;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-primary-600),var(--tw-text-opacity, 1))}.__question-counter{font-size:.75rem;line-height:1rem;font-weight:500;--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity, 1))}.__question-header-right{display:flex;flex:1 1 0%;flex-wrap:wrap;align-items:flex-start;gap:.5rem}.__question-title{flex:1 1 0%;font-size:1rem;line-height:1.5rem;font-weight:500;--tw-text-opacity: 1;color:rgb(23 23 23 / var(--tw-text-opacity, 1))}.__answered-badge{border-radius:.25rem;padding:.25rem .5rem;font-size:.75rem;line-height:1rem;font-weight:500;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-success-100),var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-success-800),var(--tw-text-opacity, 1))}.__required-badge{border-radius:.25rem;padding:.25rem .5rem;font-size:.75rem;line-height:1rem;font-weight:500;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-warning-100),var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-warning-800),var(--tw-text-opacity, 1))}.__question-description{font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}.__question-widget{margin-top:.
|
|
2107
|
-
}], propDecorators: { question: [{ type: i0.Input, args: [{ isSignal: true, alias: "question", required: true }] }], sectionOrder: [{ type: i0.Input, args: [{ isSignal: true, alias: "sectionOrder", required: true }] }], questionIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "questionIndex", required: true }] }], showQuestionNumbers: [{ type: i0.Input, args: [{ isSignal: true, alias: "showQuestionNumbers", required: false }] }], showQuestionCounter: [{ type: i0.Input, args: [{ isSignal: true, alias: "showQuestionCounter", required: false }] }], currentPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentPosition", required: false }] }] } });
|
|
2114
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, AXTranslationModule, AXPWidgetCoreModule], styles: [".__question-item{padding:1rem;text-align:left;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}.__question-item.__answered{--tw-border-opacity: 1;border-color:rgba(var(--ax-sys-color-primary-300),var(--tw-border-opacity, 1));background-color:rgba(var(--ax-sys-color-primary-50),.3)}.__question-header{display:flex;width:100%;min-width:0px;align-items:flex-start;justify-content:space-between;gap:1rem}.__question-header-left{display:flex;flex-shrink:0;align-items:center;gap:.75rem}.__question-number{font-size:.875rem;line-height:1.25rem;font-weight:600;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-primary-600),var(--tw-text-opacity, 1))}.__question-counter{font-size:.75rem;line-height:1rem;font-weight:500;--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity, 1))}.__question-header-right{display:flex;min-width:0px;flex:1 1 0%;flex-wrap:wrap;align-items:flex-start;gap:.5rem}.__question-title{min-width:0px;flex:1 1 0%;text-align:left;font-size:1rem;line-height:1.5rem;font-weight:500;--tw-text-opacity: 1;color:rgb(23 23 23 / var(--tw-text-opacity, 1))}.__answered-badge{border-radius:.25rem;padding:.25rem .5rem;font-size:.75rem;line-height:1rem;font-weight:500;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-success-100),var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-success-800),var(--tw-text-opacity, 1))}.__required-badge{border-radius:.25rem;padding:.25rem .5rem;font-size:.75rem;line-height:1rem;font-weight:500;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-warning-100),var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-warning-800),var(--tw-text-opacity, 1))}.__question-description{margin-top:.25rem;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}.__question-widget{margin-top:.75rem;text-align:left}.__widget-placeholder{border-radius:.25rem;border-width:1px;border-style:dashed;padding:1rem;font-size:.875rem;line-height:1.25rem;font-style:italic;--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(250 250 250 / var(--tw-bg-opacity, 1))}\n"] }]
|
|
2115
|
+
}], propDecorators: { question: [{ type: i0.Input, args: [{ isSignal: true, alias: "question", required: true }] }], contextData: [{ type: i0.Input, args: [{ isSignal: true, alias: "contextData", required: false }] }], sectionOrder: [{ type: i0.Input, args: [{ isSignal: true, alias: "sectionOrder", required: true }] }], questionIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "questionIndex", required: true }] }], showQuestionNumbers: [{ type: i0.Input, args: [{ isSignal: true, alias: "showQuestionNumbers", required: false }] }], showQuestionCounter: [{ type: i0.Input, args: [{ isSignal: true, alias: "showQuestionCounter", required: false }] }], currentPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentPosition", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }] } });
|
|
2108
2116
|
|
|
2109
2117
|
//#region ---- Imports ----
|
|
2110
2118
|
//#endregion
|
|
@@ -2144,7 +2152,7 @@ class AXMQuestionnaireViewerSinglePageViewComponent {
|
|
|
2144
2152
|
</div>
|
|
2145
2153
|
</div>
|
|
2146
2154
|
}
|
|
2147
|
-
`, isInline: true, styles: ["axm-questionnaire-viewer-single-page-view{display:flex;height:100%;flex-direction:column;gap:1.5rem;overflow-y:auto;overflow-x:hidden;padding:1rem}axm-questionnaire-viewer-single-page-view .__single-page-section{display:flex}axm-questionnaire-viewer-single-page-view .__single-page-section{flex-direction:column}axm-questionnaire-viewer-single-page-view .__single-page-section{gap:1rem}axm-questionnaire-viewer-single-page-view .__single-page-section{flex-shrink:0}axm-questionnaire-viewer-single-page-view .__single-page-section{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}axm-questionnaire-viewer-single-page-view .__section-header{margin-bottom:.5rem}axm-questionnaire-viewer-single-page-view .__section-header{display:flex}axm-questionnaire-viewer-single-page-view .__section-header{flex-direction:column}axm-questionnaire-viewer-single-page-view .__section-header{gap:.125rem}axm-questionnaire-viewer-single-page-view .__section-title{font-size:1.25rem;line-height:1.75rem}axm-questionnaire-viewer-single-page-view .__section-title{font-weight:600}axm-questionnaire-viewer-single-page-view .__section-title{--tw-text-opacity: 1;color:rgb(23 23 23 / var(--tw-text-opacity, 1))}axm-questionnaire-viewer-single-page-view .__section-description{font-size:.875rem;line-height:1.25rem}axm-questionnaire-viewer-single-page-view .__section-description{--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}axm-questionnaire-viewer-single-page-view .__questions-list{display:flex}axm-questionnaire-viewer-single-page-view .__questions-list{flex-direction:column}axm-questionnaire-viewer-single-page-view .__questions-list{gap:1rem}axm-questionnaire-viewer-single-page-view .__questions-list .__question-item{display:flex}axm-questionnaire-viewer-single-page-view .__questions-list .__question-item{flex-direction:column}axm-questionnaire-viewer-single-page-view .__questions-list .__question-item{gap:.75rem}axm-questionnaire-viewer-single-page-view .__questions-list .__question-item{border-radius:.25rem}axm-questionnaire-viewer-single-page-view .__questions-list .__question-item{border-width:1px}axm-questionnaire-viewer-single-page-view .__questions-list .__question-item{--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity, 1))}axm-questionnaire-viewer-single-page-view .__questions-list .__question-item{padding:1rem}axm-questionnaire-viewer-single-page-view .__questions-list .__question-item{--tw-bg-opacity: 1;background-color:rgb(250 250 250 / var(--tw-bg-opacity, 1))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AXMQuestionnaireViewerQuestionComponent, selector: "axm-questionnaire-viewer-question", inputs: ["question", "sectionOrder", "questionIndex", "showQuestionNumbers", "showQuestionCounter", "currentPosition"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2155
|
+
`, isInline: true, styles: ["axm-questionnaire-viewer-single-page-view{display:flex;height:100%;flex-direction:column;gap:1.5rem;overflow-y:auto;overflow-x:hidden;padding:1rem}axm-questionnaire-viewer-single-page-view .__single-page-section{display:flex}axm-questionnaire-viewer-single-page-view .__single-page-section{flex-direction:column}axm-questionnaire-viewer-single-page-view .__single-page-section{gap:1rem}axm-questionnaire-viewer-single-page-view .__single-page-section{flex-shrink:0}axm-questionnaire-viewer-single-page-view .__single-page-section{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}axm-questionnaire-viewer-single-page-view .__section-header{margin-bottom:.5rem}axm-questionnaire-viewer-single-page-view .__section-header{display:flex}axm-questionnaire-viewer-single-page-view .__section-header{flex-direction:column}axm-questionnaire-viewer-single-page-view .__section-header{gap:.125rem}axm-questionnaire-viewer-single-page-view .__section-title{font-size:1.25rem;line-height:1.75rem}axm-questionnaire-viewer-single-page-view .__section-title{font-weight:600}axm-questionnaire-viewer-single-page-view .__section-title{--tw-text-opacity: 1;color:rgb(23 23 23 / var(--tw-text-opacity, 1))}axm-questionnaire-viewer-single-page-view .__section-description{font-size:.875rem;line-height:1.25rem}axm-questionnaire-viewer-single-page-view .__section-description{--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}axm-questionnaire-viewer-single-page-view .__questions-list{display:flex}axm-questionnaire-viewer-single-page-view .__questions-list{flex-direction:column}axm-questionnaire-viewer-single-page-view .__questions-list{gap:1rem}axm-questionnaire-viewer-single-page-view .__questions-list .__question-item{display:flex}axm-questionnaire-viewer-single-page-view .__questions-list .__question-item{flex-direction:column}axm-questionnaire-viewer-single-page-view .__questions-list .__question-item{gap:.75rem}axm-questionnaire-viewer-single-page-view .__questions-list .__question-item{border-radius:.25rem}axm-questionnaire-viewer-single-page-view .__questions-list .__question-item{border-width:1px}axm-questionnaire-viewer-single-page-view .__questions-list .__question-item{--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity, 1))}axm-questionnaire-viewer-single-page-view .__questions-list .__question-item{padding:1rem}axm-questionnaire-viewer-single-page-view .__questions-list .__question-item{--tw-bg-opacity: 1;background-color:rgb(250 250 250 / var(--tw-bg-opacity, 1))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AXMQuestionnaireViewerQuestionComponent, selector: "axm-questionnaire-viewer-question", inputs: ["question", "contextData", "sectionOrder", "questionIndex", "showQuestionNumbers", "showQuestionCounter", "currentPosition", "mode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2148
2156
|
}
|
|
2149
2157
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMQuestionnaireViewerSinglePageViewComponent, decorators: [{
|
|
2150
2158
|
type: Component,
|
|
@@ -2214,7 +2222,7 @@ class AXMQuestionnaireViewerPagePerGroupViewComponent {
|
|
|
2214
2222
|
</div>
|
|
2215
2223
|
</div>
|
|
2216
2224
|
}
|
|
2217
|
-
`, isInline: true, styles: ["axm-questionnaire-viewer-page-per-group-view{display:flex;flex-direction:column;gap:1rem;padding:1rem}axm-questionnaire-viewer-page-per-group-view .__page-section{display:flex}axm-questionnaire-viewer-page-per-group-view .__page-section{flex-direction:column}axm-questionnaire-viewer-page-per-group-view .__page-section{gap:1rem}axm-questionnaire-viewer-page-per-group-view .__page-section{flex-shrink:0}axm-questionnaire-viewer-page-per-group-view .__page-section{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}axm-questionnaire-viewer-page-per-group-view .__section-header{display:flex}axm-questionnaire-viewer-page-per-group-view .__section-header{flex-shrink:0}axm-questionnaire-viewer-page-per-group-view .__section-header{flex-direction:column}axm-questionnaire-viewer-page-per-group-view .__section-header{gap:.125rem}axm-questionnaire-viewer-page-per-group-view .__section-title{font-size:1.5rem;line-height:2rem}axm-questionnaire-viewer-page-per-group-view .__section-title{font-weight:600}axm-questionnaire-viewer-page-per-group-view .__section-title{--tw-text-opacity: 1;color:rgb(23 23 23 / var(--tw-text-opacity, 1))}axm-questionnaire-viewer-page-per-group-view .__section-description{font-size:.875rem;line-height:1.25rem}axm-questionnaire-viewer-page-per-group-view .__section-description{--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}axm-questionnaire-viewer-page-per-group-view .__questions-list{display:flex}axm-questionnaire-viewer-page-per-group-view .__questions-list{flex:1 1 0%}axm-questionnaire-viewer-page-per-group-view .__questions-list{flex-direction:column}axm-questionnaire-viewer-page-per-group-view .__questions-list{gap:1rem}axm-questionnaire-viewer-page-per-group-view .__questions-list .__question-item{display:flex}axm-questionnaire-viewer-page-per-group-view .__questions-list .__question-item{flex-direction:column}axm-questionnaire-viewer-page-per-group-view .__questions-list .__question-item{gap:.75rem}axm-questionnaire-viewer-page-per-group-view .__questions-list .__question-item{border-radius:.25rem}axm-questionnaire-viewer-page-per-group-view .__questions-list .__question-item{border-width:1px}axm-questionnaire-viewer-page-per-group-view .__questions-list .__question-item{--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity, 1))}axm-questionnaire-viewer-page-per-group-view .__questions-list .__question-item{padding:1rem}axm-questionnaire-viewer-page-per-group-view .__questions-list .__question-item{--tw-bg-opacity: 1;background-color:rgb(250 250 250 / var(--tw-bg-opacity, 1))}axm-questionnaire-viewer-page-per-group-view .__navigation{display:flex}axm-questionnaire-viewer-page-per-group-view .__navigation{align-items:center}axm-questionnaire-viewer-page-per-group-view .__navigation{justify-content:space-between}axm-questionnaire-viewer-page-per-group-view .__navigation{border-top-width:1px}axm-questionnaire-viewer-page-per-group-view .__navigation{--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity, 1))}axm-questionnaire-viewer-page-per-group-view .__navigation{padding:1rem}axm-questionnaire-viewer-page-per-group-view .__navigation{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AXMQuestionnaireViewerQuestionComponent, selector: "axm-questionnaire-viewer-question", inputs: ["question", "sectionOrder", "questionIndex", "showQuestionNumbers", "showQuestionCounter", "currentPosition"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2225
|
+
`, isInline: true, styles: ["axm-questionnaire-viewer-page-per-group-view{display:flex;flex-direction:column;gap:1rem;padding:1rem}axm-questionnaire-viewer-page-per-group-view .__page-section{display:flex}axm-questionnaire-viewer-page-per-group-view .__page-section{flex-direction:column}axm-questionnaire-viewer-page-per-group-view .__page-section{gap:1rem}axm-questionnaire-viewer-page-per-group-view .__page-section{flex-shrink:0}axm-questionnaire-viewer-page-per-group-view .__page-section{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}axm-questionnaire-viewer-page-per-group-view .__section-header{display:flex}axm-questionnaire-viewer-page-per-group-view .__section-header{flex-shrink:0}axm-questionnaire-viewer-page-per-group-view .__section-header{flex-direction:column}axm-questionnaire-viewer-page-per-group-view .__section-header{gap:.125rem}axm-questionnaire-viewer-page-per-group-view .__section-title{font-size:1.5rem;line-height:2rem}axm-questionnaire-viewer-page-per-group-view .__section-title{font-weight:600}axm-questionnaire-viewer-page-per-group-view .__section-title{--tw-text-opacity: 1;color:rgb(23 23 23 / var(--tw-text-opacity, 1))}axm-questionnaire-viewer-page-per-group-view .__section-description{font-size:.875rem;line-height:1.25rem}axm-questionnaire-viewer-page-per-group-view .__section-description{--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}axm-questionnaire-viewer-page-per-group-view .__questions-list{display:flex}axm-questionnaire-viewer-page-per-group-view .__questions-list{flex:1 1 0%}axm-questionnaire-viewer-page-per-group-view .__questions-list{flex-direction:column}axm-questionnaire-viewer-page-per-group-view .__questions-list{gap:1rem}axm-questionnaire-viewer-page-per-group-view .__questions-list .__question-item{display:flex}axm-questionnaire-viewer-page-per-group-view .__questions-list .__question-item{flex-direction:column}axm-questionnaire-viewer-page-per-group-view .__questions-list .__question-item{gap:.75rem}axm-questionnaire-viewer-page-per-group-view .__questions-list .__question-item{border-radius:.25rem}axm-questionnaire-viewer-page-per-group-view .__questions-list .__question-item{border-width:1px}axm-questionnaire-viewer-page-per-group-view .__questions-list .__question-item{--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity, 1))}axm-questionnaire-viewer-page-per-group-view .__questions-list .__question-item{padding:1rem}axm-questionnaire-viewer-page-per-group-view .__questions-list .__question-item{--tw-bg-opacity: 1;background-color:rgb(250 250 250 / var(--tw-bg-opacity, 1))}axm-questionnaire-viewer-page-per-group-view .__navigation{display:flex}axm-questionnaire-viewer-page-per-group-view .__navigation{align-items:center}axm-questionnaire-viewer-page-per-group-view .__navigation{justify-content:space-between}axm-questionnaire-viewer-page-per-group-view .__navigation{border-top-width:1px}axm-questionnaire-viewer-page-per-group-view .__navigation{--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity, 1))}axm-questionnaire-viewer-page-per-group-view .__navigation{padding:1rem}axm-questionnaire-viewer-page-per-group-view .__navigation{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AXMQuestionnaireViewerQuestionComponent, selector: "axm-questionnaire-viewer-question", inputs: ["question", "contextData", "sectionOrder", "questionIndex", "showQuestionNumbers", "showQuestionCounter", "currentPosition", "mode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2218
2226
|
}
|
|
2219
2227
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMQuestionnaireViewerPagePerGroupViewComponent, decorators: [{
|
|
2220
2228
|
type: Component,
|
|
@@ -2281,7 +2289,7 @@ class AXMQuestionnaireViewerPagePerQuestionViewComponent {
|
|
|
2281
2289
|
</axm-questionnaire-viewer-question>
|
|
2282
2290
|
</div>
|
|
2283
2291
|
}
|
|
2284
|
-
`, isInline: true, styles: ["axm-questionnaire-viewer-page-per-question-view{display:flex;flex-direction:column;gap:1rem;padding:1rem;flex-shrink:0;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}axm-questionnaire-viewer-page-per-question-view .__section-header{display:flex}axm-questionnaire-viewer-page-per-question-view .__section-header{flex-shrink:0}axm-questionnaire-viewer-page-per-question-view .__section-header{flex-direction:column}axm-questionnaire-viewer-page-per-question-view .__section-header{gap:.125rem}axm-questionnaire-viewer-page-per-question-view .__section-title{font-size:1.25rem;line-height:1.75rem}axm-questionnaire-viewer-page-per-question-view .__section-title{font-weight:600}axm-questionnaire-viewer-page-per-question-view .__section-title{--tw-text-opacity: 1;color:rgb(23 23 23 / var(--tw-text-opacity, 1))}axm-questionnaire-viewer-page-per-question-view .__section-description{font-size:.875rem;line-height:1.25rem}axm-questionnaire-viewer-page-per-question-view .__section-description{--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AXMQuestionnaireViewerQuestionComponent, selector: "axm-questionnaire-viewer-question", inputs: ["question", "sectionOrder", "questionIndex", "showQuestionNumbers", "showQuestionCounter", "currentPosition"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2292
|
+
`, isInline: true, styles: ["axm-questionnaire-viewer-page-per-question-view{display:flex;flex-direction:column;gap:1rem;padding:1rem;flex-shrink:0;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}axm-questionnaire-viewer-page-per-question-view .__section-header{display:flex}axm-questionnaire-viewer-page-per-question-view .__section-header{flex-shrink:0}axm-questionnaire-viewer-page-per-question-view .__section-header{flex-direction:column}axm-questionnaire-viewer-page-per-question-view .__section-header{gap:.125rem}axm-questionnaire-viewer-page-per-question-view .__section-title{font-size:1.25rem;line-height:1.75rem}axm-questionnaire-viewer-page-per-question-view .__section-title{font-weight:600}axm-questionnaire-viewer-page-per-question-view .__section-title{--tw-text-opacity: 1;color:rgb(23 23 23 / var(--tw-text-opacity, 1))}axm-questionnaire-viewer-page-per-question-view .__section-description{font-size:.875rem;line-height:1.25rem}axm-questionnaire-viewer-page-per-question-view .__section-description{--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AXMQuestionnaireViewerQuestionComponent, selector: "axm-questionnaire-viewer-question", inputs: ["question", "contextData", "sectionOrder", "questionIndex", "showQuestionNumbers", "showQuestionCounter", "currentPosition", "mode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2285
2293
|
}
|
|
2286
2294
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMQuestionnaireViewerPagePerQuestionViewComponent, decorators: [{
|
|
2287
2295
|
type: Component,
|
|
@@ -2511,7 +2519,7 @@ class AXMQuestionnaireViewerSideMenuViewComponent {
|
|
|
2511
2519
|
</div>
|
|
2512
2520
|
}
|
|
2513
2521
|
</div>
|
|
2514
|
-
`, isInline: true, styles: [".__side-menu-container,.__drawer-container{display:flex;height:100%;width:100%;overflow:hidden}.__sidebar-drawer{height:100%;border-inline-end-width:1px;--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.__sidebar-content{height:100%;overflow-y:auto}.__desktop-sidebar{display:flex;height:100%;min-height:0px;flex-shrink:0;flex-direction:column;overflow:hidden;border-inline-end-width:1px;--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.__sidebar-tabs{--ax-comp-tabs-default-border-radius: 0;height:100%;min-height:0px;flex:1 1 0%;overflow-y:auto}.__sidebar-tabs ax-tab-item{margin-top:0;margin-bottom:0}.__sidebar-tabs ax-tab-item{padding-top:.75rem;padding-bottom:.75rem}.__sidebar-tabs ax-tab-item{font-weight:600}.__main-content{display:flex;height:100%;flex:1 1 0%;flex-direction:column;overflow:hidden}.__mobile-menu-button{flex-shrink:0;border-bottom-width:1px;--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity, 1));padding:.5rem}.__questions-container{display:flex;min-height:0px;flex:1 1 0%;flex-direction:column;gap:1rem;overflow-y:auto;padding:1rem}.__section-header{margin-bottom:1rem;display:flex;flex-direction:column;gap:.125rem}.__section-title{font-size:1.5rem;line-height:2rem;font-weight:600;--tw-text-opacity: 1;color:rgb(23 23 23 / var(--tw-text-opacity, 1))}.__section-description{font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}.__questions-list{display:flex;flex:1 1 0%;flex-direction:column;gap:1rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AXMQuestionnaireViewerQuestionComponent, selector: "axm-questionnaire-viewer-question", inputs: ["question", "sectionOrder", "questionIndex", "showQuestionNumbers", "showQuestionCounter", "currentPosition"] }, { kind: "ngmodule", type: AXTabsModule }, { kind: "component", type: i1$1.AXTabsComponent, selector: "ax-tabs", inputs: ["look", "location", "fitParent", "minWidth", "content"], outputs: ["onActiveTabChanged"] }, { kind: "component", type: i1$1.AXTabItemComponent, selector: "ax-tab-item", inputs: ["disabled", "text", "key", "headerTemplate", "active"], outputs: ["disabledChange", "onClick", "onBlur", "onFocus", "activeChange"] }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i1$2.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "ngmodule", type: AXDrawerModule }, { kind: "component", type: i3.AXDrawerComponent, selector: "ax-drawer", inputs: ["location", "showBackdrop", "mode", "transition", "closeOnBackdropClick", "backdropClass", "collapsed", "singleOpenMode"], outputs: ["onBackdropClick", "collapsedStateChanged"] }, { kind: "component", type: i3.AXDrawerContainerComponent, selector: "ax-drawer-container" }, { kind: "ngmodule", type: AXDrawerDirectiveModule }, { kind: "directive", type: AXResizableDirective, selector: "[axResizable]", inputs: ["axResizable", "minWidth", "maxWidth", "dblClickAction", "width", "defaultWidth"], outputs: ["axResizableChange", "minWidthChange", "maxWidthChange", "dblClickActionChange", "widthChange", "defaultWidthChange", "onResizingStarted", "onResizingEnded", "onResizingDblClick"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1$3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2522
|
+
`, isInline: true, styles: [".__side-menu-container,.__drawer-container{display:flex;height:100%;width:100%;overflow:hidden}.__sidebar-drawer{height:100%;border-inline-end-width:1px;--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.__sidebar-content{height:100%;overflow-y:auto}.__desktop-sidebar{display:flex;height:100%;min-height:0px;flex-shrink:0;flex-direction:column;overflow:hidden;border-inline-end-width:1px;--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.__sidebar-tabs{--ax-comp-tabs-default-border-radius: 0;height:100%;min-height:0px;flex:1 1 0%;overflow-y:auto}.__sidebar-tabs ax-tab-item{margin-top:0;margin-bottom:0}.__sidebar-tabs ax-tab-item{padding-top:.75rem;padding-bottom:.75rem}.__sidebar-tabs ax-tab-item{font-weight:600}.__main-content{display:flex;height:100%;flex:1 1 0%;flex-direction:column;overflow:hidden}.__mobile-menu-button{flex-shrink:0;border-bottom-width:1px;--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity, 1));padding:.5rem}.__questions-container{display:flex;min-height:0px;flex:1 1 0%;flex-direction:column;gap:1rem;overflow-y:auto;padding:1rem}.__section-header{margin-bottom:1rem;display:flex;flex-direction:column;gap:.125rem}.__section-title{font-size:1.5rem;line-height:2rem;font-weight:600;--tw-text-opacity: 1;color:rgb(23 23 23 / var(--tw-text-opacity, 1))}.__section-description{font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}.__questions-list{display:flex;flex:1 1 0%;flex-direction:column;gap:1rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AXMQuestionnaireViewerQuestionComponent, selector: "axm-questionnaire-viewer-question", inputs: ["question", "contextData", "sectionOrder", "questionIndex", "showQuestionNumbers", "showQuestionCounter", "currentPosition", "mode"] }, { kind: "ngmodule", type: AXTabsModule }, { kind: "component", type: i1$1.AXTabsComponent, selector: "ax-tabs", inputs: ["look", "location", "fitParent", "minWidth", "content"], outputs: ["onActiveTabChanged"] }, { kind: "component", type: i1$1.AXTabItemComponent, selector: "ax-tab-item", inputs: ["disabled", "text", "key", "headerTemplate", "active"], outputs: ["disabledChange", "onClick", "onBlur", "onFocus", "activeChange"] }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i1$2.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "ngmodule", type: AXDrawerModule }, { kind: "component", type: i3.AXDrawerComponent, selector: "ax-drawer", inputs: ["location", "showBackdrop", "mode", "transition", "closeOnBackdropClick", "backdropClass", "collapsed", "singleOpenMode"], outputs: ["onBackdropClick", "collapsedStateChanged"] }, { kind: "component", type: i3.AXDrawerContainerComponent, selector: "ax-drawer-container" }, { kind: "ngmodule", type: AXDrawerDirectiveModule }, { kind: "directive", type: AXResizableDirective, selector: "[axResizable]", inputs: ["axResizable", "minWidth", "maxWidth", "dblClickAction", "width", "defaultWidth"], outputs: ["axResizableChange", "minWidthChange", "maxWidthChange", "dblClickActionChange", "widthChange", "defaultWidthChange", "onResizingStarted", "onResizingEnded", "onResizingDblClick"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1$3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2515
2523
|
}
|
|
2516
2524
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMQuestionnaireViewerSideMenuViewComponent, decorators: [{
|
|
2517
2525
|
type: Component,
|
|
@@ -2845,6 +2853,14 @@ class AXMQuestionnaireViewerComponent {
|
|
|
2845
2853
|
getQuestionsWithAnswers() {
|
|
2846
2854
|
return this.vm.getQuestionsWithAnswers();
|
|
2847
2855
|
}
|
|
2856
|
+
/**
|
|
2857
|
+
* Get context data for review step (answers at widget paths).
|
|
2858
|
+
* Must be called before transitioning to review while viewer is still rendered.
|
|
2859
|
+
*/
|
|
2860
|
+
getReviewContext() {
|
|
2861
|
+
const container = this.vm.widgetContainer();
|
|
2862
|
+
return container?.contextService?.data() ?? {};
|
|
2863
|
+
}
|
|
2848
2864
|
/**
|
|
2849
2865
|
* Submit questionnaire
|
|
2850
2866
|
* Validates all questions before submitting
|
|
@@ -3053,19 +3069,19 @@ class AXMQuestionnaireViewerFeatureModule {
|
|
|
3053
3069
|
provideCommandSetups([
|
|
3054
3070
|
{
|
|
3055
3071
|
key: `${RootConfig.module.name}.${RootConfig.entities.questionnaire.name}:Preview`,
|
|
3056
|
-
command: () => import('./acorex-modules-assessment-management-preview-questionnaire.command-
|
|
3072
|
+
command: () => import('./acorex-modules-assessment-management-preview-questionnaire.command-NcZlE6DU.mjs').then((c) => c.PreviewQuestionnaireCommand),
|
|
3057
3073
|
},
|
|
3058
3074
|
{
|
|
3059
3075
|
key: `${RootConfig.module.name}.${RootConfig.entities.assessmentSession.name}:ViewAnswers`,
|
|
3060
|
-
command: () => import('./acorex-modules-assessment-management-view-session-answers.command-
|
|
3076
|
+
command: () => import('./acorex-modules-assessment-management-view-session-answers.command-CMmE72Kt.mjs').then((c) => c.ViewSessionAnswersCommand),
|
|
3061
3077
|
},
|
|
3062
3078
|
{
|
|
3063
3079
|
key: `${RootConfig.module.name}.${RootConfig.entities.assessmentSession.name}:Fill`,
|
|
3064
|
-
command: () => import('./acorex-modules-assessment-management-fill-assessment-session.command-
|
|
3080
|
+
command: () => import('./acorex-modules-assessment-management-fill-assessment-session.command-Dgeh3E5f.mjs').then((c) => c.FillAssessmentSessionCommand),
|
|
3065
3081
|
},
|
|
3066
3082
|
{
|
|
3067
3083
|
key: `${RootConfig.module.name}.${RootConfig.entities.assessmentCase.name}:Fill`,
|
|
3068
|
-
command: () => import('./acorex-modules-assessment-management-fill-assessment-session.command-
|
|
3084
|
+
command: () => import('./acorex-modules-assessment-management-fill-assessment-session.command-Dgeh3E5f.mjs').then((c) => c.FillAssessmentSessionCommand),
|
|
3069
3085
|
},
|
|
3070
3086
|
]),
|
|
3071
3087
|
], imports: [AXPWidgetCoreModule.forChild({
|
|
@@ -3101,19 +3117,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
3101
3117
|
provideCommandSetups([
|
|
3102
3118
|
{
|
|
3103
3119
|
key: `${RootConfig.module.name}.${RootConfig.entities.questionnaire.name}:Preview`,
|
|
3104
|
-
command: () => import('./acorex-modules-assessment-management-preview-questionnaire.command-
|
|
3120
|
+
command: () => import('./acorex-modules-assessment-management-preview-questionnaire.command-NcZlE6DU.mjs').then((c) => c.PreviewQuestionnaireCommand),
|
|
3105
3121
|
},
|
|
3106
3122
|
{
|
|
3107
3123
|
key: `${RootConfig.module.name}.${RootConfig.entities.assessmentSession.name}:ViewAnswers`,
|
|
3108
|
-
command: () => import('./acorex-modules-assessment-management-view-session-answers.command-
|
|
3124
|
+
command: () => import('./acorex-modules-assessment-management-view-session-answers.command-CMmE72Kt.mjs').then((c) => c.ViewSessionAnswersCommand),
|
|
3109
3125
|
},
|
|
3110
3126
|
{
|
|
3111
3127
|
key: `${RootConfig.module.name}.${RootConfig.entities.assessmentSession.name}:Fill`,
|
|
3112
|
-
command: () => import('./acorex-modules-assessment-management-fill-assessment-session.command-
|
|
3128
|
+
command: () => import('./acorex-modules-assessment-management-fill-assessment-session.command-Dgeh3E5f.mjs').then((c) => c.FillAssessmentSessionCommand),
|
|
3113
3129
|
},
|
|
3114
3130
|
{
|
|
3115
3131
|
key: `${RootConfig.module.name}.${RootConfig.entities.assessmentCase.name}:Fill`,
|
|
3116
|
-
command: () => import('./acorex-modules-assessment-management-fill-assessment-session.command-
|
|
3132
|
+
command: () => import('./acorex-modules-assessment-management-fill-assessment-session.command-Dgeh3E5f.mjs').then((c) => c.FillAssessmentSessionCommand),
|
|
3117
3133
|
},
|
|
3118
3134
|
]),
|
|
3119
3135
|
],
|
|
@@ -3215,6 +3231,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
3215
3231
|
//#endregion
|
|
3216
3232
|
|
|
3217
3233
|
//#region ---- Imports ----
|
|
3234
|
+
/**
|
|
3235
|
+
* Extract PrePostConfig from questionnaire entity.
|
|
3236
|
+
*/
|
|
3237
|
+
function toPrePostConfig(q) {
|
|
3238
|
+
if (!q)
|
|
3239
|
+
return null;
|
|
3240
|
+
return {
|
|
3241
|
+
preEnabled: q.preEnabled,
|
|
3242
|
+
preContent: q.preContent,
|
|
3243
|
+
postReviewEnabled: q.postReviewEnabled,
|
|
3244
|
+
postSummaryEnabled: q.postSummaryEnabled,
|
|
3245
|
+
postSummaryContent: q.postSummaryContent,
|
|
3246
|
+
passingScore: q.passingScore,
|
|
3247
|
+
};
|
|
3248
|
+
}
|
|
3218
3249
|
//#endregion
|
|
3219
3250
|
|
|
3220
3251
|
//#region ---- Types ----
|
|
@@ -3223,31 +3254,253 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
3223
3254
|
//#region ---- Types ----
|
|
3224
3255
|
//#endregion
|
|
3225
3256
|
|
|
3257
|
+
//#region ---- Pre/Post Content Utilities ----
|
|
3258
|
+
/**
|
|
3259
|
+
* Resolve multi-language content to string for current locale.
|
|
3260
|
+
* When content is Record<locale, string>, returns value for locale or fallback.
|
|
3261
|
+
*/
|
|
3262
|
+
function resolveMultiLanguageContent(content, currentLocale) {
|
|
3263
|
+
if (content == null || content === '')
|
|
3264
|
+
return '';
|
|
3265
|
+
if (typeof content === 'string')
|
|
3266
|
+
return content;
|
|
3267
|
+
const record = content;
|
|
3268
|
+
return record[currentLocale] ?? record['en-US'] ?? Object.values(record)[0] ?? '';
|
|
3269
|
+
}
|
|
3270
|
+
/**
|
|
3271
|
+
* Resolve placeholders in summary content.
|
|
3272
|
+
* Supported: {{score}}, {{passFail}}, {{totalQuestions}}, {{answeredCount}}
|
|
3273
|
+
*/
|
|
3274
|
+
function resolveSummaryPlaceholders(content, values) {
|
|
3275
|
+
if (!content)
|
|
3276
|
+
return '';
|
|
3277
|
+
return content
|
|
3278
|
+
.replace(/\{\{score\}\}/g, String(values.score ?? ''))
|
|
3279
|
+
.replace(/\{\{passFail\}\}/g, values.passFail ?? '')
|
|
3280
|
+
.replace(/\{\{totalQuestions\}\}/g, String(values.totalQuestions ?? ''))
|
|
3281
|
+
.replace(/\{\{answeredCount\}\}/g, String(values.answeredCount ?? ''));
|
|
3282
|
+
}
|
|
3283
|
+
//#endregion
|
|
3284
|
+
|
|
3226
3285
|
//#region ---- Imports ----
|
|
3227
3286
|
//#endregion
|
|
3228
3287
|
//#region ---- Component ----
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3288
|
+
/**
|
|
3289
|
+
* Reusable pre-questionnaire (welcome) content component.
|
|
3290
|
+
* Renders rich text content only. Start button is provided by the host footer.
|
|
3291
|
+
* Use in page, popup, standalone, and preview views.
|
|
3292
|
+
*/
|
|
3293
|
+
class AXMPreQuestionnaireContentComponent {
|
|
3294
|
+
constructor() {
|
|
3295
|
+
//#region ---- Services & Dependencies ----
|
|
3296
|
+
this.sanitizer = inject(DomSanitizer);
|
|
3297
|
+
this.translationService = inject(AXTranslationService);
|
|
3298
|
+
//#endregion
|
|
3299
|
+
//#region ---- Inputs ----
|
|
3300
|
+
/** Rich text content. Supports multi-language: Record<locale, string>. */
|
|
3301
|
+
this.content = input(null, ...(ngDevMode ? [{ debugName: "content" }] : []));
|
|
3302
|
+
/** Locale for multi-language content. Defaults to active lang. */
|
|
3303
|
+
this.locale = input(undefined, ...(ngDevMode ? [{ debugName: "locale" }] : []));
|
|
3304
|
+
//#endregion
|
|
3305
|
+
//#region ---- Computed ----
|
|
3306
|
+
this.contentHtml = computed(() => {
|
|
3307
|
+
const contentVal = this.content();
|
|
3308
|
+
const localeVal = this.locale() ?? this.translationService.getActiveLang?.() ?? 'en-US';
|
|
3309
|
+
const resolved = resolveMultiLanguageContent(contentVal, localeVal);
|
|
3310
|
+
return resolved ? this.sanitizer.bypassSecurityTrustHtml(resolved) : '';
|
|
3311
|
+
}, ...(ngDevMode ? [{ debugName: "contentHtml" }] : []));
|
|
3234
3312
|
}
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3313
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMPreQuestionnaireContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3314
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.16", type: AXMPreQuestionnaireContentComponent, isStandalone: true, selector: "axm-pre-questionnaire-content", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "axm-pre-questionnaire-content" }, ngImport: i0, template: `
|
|
3315
|
+
<div class="axm-pre-questionnaire-content ax-flex ax-flex-col ax-items-center ax-justify-center ax-p-8 ax-min-h-[200px]">
|
|
3316
|
+
<div class="ax-max-w-2xl ax-w-full ax-prose" [innerHTML]="contentHtml()"></div>
|
|
3317
|
+
</div>
|
|
3318
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXTranslationModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
3319
|
+
}
|
|
3320
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMPreQuestionnaireContentComponent, decorators: [{
|
|
3321
|
+
type: Component,
|
|
3322
|
+
args: [{
|
|
3323
|
+
selector: 'axm-pre-questionnaire-content',
|
|
3324
|
+
template: `
|
|
3325
|
+
<div class="axm-pre-questionnaire-content ax-flex ax-flex-col ax-items-center ax-justify-center ax-p-8 ax-min-h-[200px]">
|
|
3326
|
+
<div class="ax-max-w-2xl ax-w-full ax-prose" [innerHTML]="contentHtml()"></div>
|
|
3327
|
+
</div>
|
|
3328
|
+
`,
|
|
3329
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3330
|
+
imports: [CommonModule, AXTranslationModule],
|
|
3331
|
+
encapsulation: ViewEncapsulation.None,
|
|
3332
|
+
host: { class: 'axm-pre-questionnaire-content' },
|
|
3333
|
+
}]
|
|
3334
|
+
}], propDecorators: { content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }] } });
|
|
3335
|
+
|
|
3336
|
+
//#region ---- Imports ----
|
|
3337
|
+
//#endregion
|
|
3338
|
+
//#region ---- Component ----
|
|
3339
|
+
/**
|
|
3340
|
+
* Reusable post-questionnaire component.
|
|
3341
|
+
* Renders either review (Q&A list with widget-renderer in view mode) or summary (content).
|
|
3342
|
+
* Edit, Submit, Done buttons are provided by the host footer.
|
|
3343
|
+
* Use in page, popup, standalone, and preview views.
|
|
3344
|
+
*/
|
|
3345
|
+
class AXMPostQuestionnaireContentComponent {
|
|
3346
|
+
constructor() {
|
|
3347
|
+
//#region ---- Services & Dependencies ----
|
|
3348
|
+
this.sanitizer = inject(DomSanitizer);
|
|
3349
|
+
this.translationService = inject(AXTranslationService);
|
|
3350
|
+
//#endregion
|
|
3351
|
+
//#region ---- Inputs ----
|
|
3352
|
+
/** Display mode: 'review' or 'summary'. */
|
|
3353
|
+
this.mode = input('review', ...(ngDevMode ? [{ debugName: "mode" }] : []));
|
|
3354
|
+
/** Questions with answers for review mode. */
|
|
3355
|
+
this.questionsWithAnswers = input([], ...(ngDevMode ? [{ debugName: "questionsWithAnswers" }] : []));
|
|
3356
|
+
/** Context data for widget rendering in view mode (answers at widget paths). Required for proper display. */
|
|
3357
|
+
this.reviewContext = input(null, ...(ngDevMode ? [{ debugName: "reviewContext" }] : []));
|
|
3358
|
+
/** Summary content (rich text). Supports multi-language and placeholders. */
|
|
3359
|
+
this.summaryContent = input(null, ...(ngDevMode ? [{ debugName: "summaryContent" }] : []));
|
|
3360
|
+
/** Placeholder values for summary: score, passFail, totalQuestions, answeredCount. */
|
|
3361
|
+
this.placeholderValues = input(null, ...(ngDevMode ? [{ debugName: "placeholderValues" }] : []));
|
|
3362
|
+
/** Locale for multi-language content. Defaults to active lang. */
|
|
3363
|
+
this.locale = input(undefined, ...(ngDevMode ? [{ debugName: "locale" }] : []));
|
|
3364
|
+
//#endregion
|
|
3365
|
+
//#region ---- Computed ----
|
|
3366
|
+
this.summaryContentHtml = computed(() => {
|
|
3367
|
+
const content = this.summaryContent();
|
|
3368
|
+
const values = this.placeholderValues();
|
|
3369
|
+
const localeVal = this.locale() ?? this.translationService.getActiveLang?.() ?? 'en-US';
|
|
3370
|
+
let resolved = resolveMultiLanguageContent(content, localeVal);
|
|
3371
|
+
if (resolved && values) {
|
|
3372
|
+
resolved = resolveSummaryPlaceholders(resolved, values);
|
|
3373
|
+
}
|
|
3374
|
+
if (!resolved && values) {
|
|
3375
|
+
resolved = `<p>Your score: <strong>${values.score ?? '—'}%</strong></p><p>You answered <strong>${values.answeredCount ?? 0}</strong> of <strong>${values.totalQuestions ?? 0}</strong> questions.</p>`;
|
|
3376
|
+
}
|
|
3377
|
+
return resolved ? this.sanitizer.bypassSecurityTrustHtml(resolved) : '';
|
|
3378
|
+
}, ...(ngDevMode ? [{ debugName: "summaryContentHtml" }] : []));
|
|
3243
3379
|
}
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3380
|
+
//#endregion
|
|
3381
|
+
//#region ---- Helpers ----
|
|
3382
|
+
formatAnswer(answer) {
|
|
3383
|
+
if (answer == null || answer === '')
|
|
3384
|
+
return '—';
|
|
3385
|
+
if (typeof answer === 'string')
|
|
3386
|
+
return answer;
|
|
3387
|
+
if (typeof answer === 'number' || typeof answer === 'boolean')
|
|
3388
|
+
return String(answer);
|
|
3389
|
+
if (Array.isArray(answer))
|
|
3390
|
+
return answer.map((a) => (typeof a === 'object' ? JSON.stringify(a) : String(a))).join(', ');
|
|
3391
|
+
if (typeof answer === 'object')
|
|
3392
|
+
return JSON.stringify(answer);
|
|
3393
|
+
return String(answer);
|
|
3247
3394
|
}
|
|
3248
|
-
|
|
3249
|
-
|
|
3395
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMPostQuestionnaireContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3396
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AXMPostQuestionnaireContentComponent, isStandalone: true, selector: "axm-post-questionnaire-content", inputs: { mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, questionsWithAnswers: { classPropertyName: "questionsWithAnswers", publicName: "questionsWithAnswers", isSignal: true, isRequired: false, transformFunction: null }, reviewContext: { classPropertyName: "reviewContext", publicName: "reviewContext", isSignal: true, isRequired: false, transformFunction: null }, summaryContent: { classPropertyName: "summaryContent", publicName: "summaryContent", isSignal: true, isRequired: false, transformFunction: null }, placeholderValues: { classPropertyName: "placeholderValues", publicName: "placeholderValues", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "axm-post-questionnaire-content" }, ngImport: i0, template: `
|
|
3397
|
+
@if (mode() === 'review') {
|
|
3398
|
+
<div class="axm-post-questionnaire-content __review ax-flex ax-flex-col ax-overflow-auto ax-min-h-full">
|
|
3399
|
+
<div class="ax-p-4 ax-border-b">
|
|
3400
|
+
<h2 class="ax-text-lg ax-font-semibold">{{ '@assessment-management:questionnaires.components.questionnaire-viewer.flow.review-title' | translate | async }}</h2>
|
|
3401
|
+
</div>
|
|
3402
|
+
<div class="ax-flex-1 ax-overflow-auto ax-p-4 ax-flex ax-flex-col ax-gap-4">
|
|
3403
|
+
@if (reviewContext(); as ctx) {
|
|
3404
|
+
<axp-widgets-container [context]="ctx" class="ax-flex ax-flex-col ax-gap-4">
|
|
3405
|
+
@for (item of questionsWithAnswers(); track item.questionId; let idx = $index) {
|
|
3406
|
+
@if (item.question?.question?.interface) {
|
|
3407
|
+
<div class="__review-question-card ax-bg-neutral-50 ax-rounded-lg ax-border ax-border-neutral-200 ax-overflow-hidden ax-shadow-sm">
|
|
3408
|
+
<axm-questionnaire-viewer-question
|
|
3409
|
+
[question]="item.question!"
|
|
3410
|
+
[sectionOrder]="1"
|
|
3411
|
+
[questionIndex]="idx + 1"
|
|
3412
|
+
[showQuestionNumbers]="false"
|
|
3413
|
+
[mode]="'view'"
|
|
3414
|
+
[contextData]="ctx"
|
|
3415
|
+
></axm-questionnaire-viewer-question>
|
|
3416
|
+
</div>
|
|
3417
|
+
} @else {
|
|
3418
|
+
<div class="__review-question-card ax-bg-neutral-50 ax-rounded-lg ax-border ax-border-neutral-200 ax-p-4 ax-shadow-sm">
|
|
3419
|
+
<div class="ax-font-medium ax-mb-2 ax-text-neutral-900">{{ item.title }}</div>
|
|
3420
|
+
<div class="ax-text-sm ax-text-neutral-600">{{ formatAnswer(item.answer) }}</div>
|
|
3421
|
+
</div>
|
|
3422
|
+
}
|
|
3423
|
+
}
|
|
3424
|
+
</axp-widgets-container>
|
|
3425
|
+
} @else {
|
|
3426
|
+
@for (item of questionsWithAnswers(); track item.questionId) {
|
|
3427
|
+
<div class="__review-question-card ax-bg-neutral-50 ax-rounded-lg ax-border ax-border-neutral-200 ax-p-4 ax-shadow-sm">
|
|
3428
|
+
<div class="ax-font-medium ax-mb-2 ax-text-neutral-900">{{ item.title }}</div>
|
|
3429
|
+
<div class="ax-text-sm ax-text-neutral-600">{{ formatAnswer(item.answer) }}</div>
|
|
3430
|
+
</div>
|
|
3431
|
+
}
|
|
3432
|
+
}
|
|
3433
|
+
</div>
|
|
3434
|
+
</div>
|
|
3435
|
+
} @else {
|
|
3436
|
+
<div class="axm-post-questionnaire-content __summary ax-flex ax-flex-col ax-items-center ax-justify-center ax-p-8 ax-min-h-[200px]">
|
|
3437
|
+
<h2 class="ax-text-xl ax-font-semibold ax-mb-4">{{ '@assessment-management:questionnaires.components.questionnaire-viewer.flow.summary-title' | translate | async }}</h2>
|
|
3438
|
+
<div class="ax-max-w-2xl ax-w-full ax-prose" [innerHTML]="summaryContentHtml()"></div>
|
|
3439
|
+
</div>
|
|
3440
|
+
}
|
|
3441
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: i1.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "component", type: AXMQuestionnaireViewerQuestionComponent, selector: "axm-questionnaire-viewer-question", inputs: ["question", "contextData", "sectionOrder", "questionIndex", "showQuestionNumbers", "showQuestionCounter", "currentPosition", "mode"] }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
3442
|
+
}
|
|
3443
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMPostQuestionnaireContentComponent, decorators: [{
|
|
3444
|
+
type: Component,
|
|
3445
|
+
args: [{
|
|
3446
|
+
selector: 'axm-post-questionnaire-content',
|
|
3447
|
+
template: `
|
|
3448
|
+
@if (mode() === 'review') {
|
|
3449
|
+
<div class="axm-post-questionnaire-content __review ax-flex ax-flex-col ax-overflow-auto ax-min-h-full">
|
|
3450
|
+
<div class="ax-p-4 ax-border-b">
|
|
3451
|
+
<h2 class="ax-text-lg ax-font-semibold">{{ '@assessment-management:questionnaires.components.questionnaire-viewer.flow.review-title' | translate | async }}</h2>
|
|
3452
|
+
</div>
|
|
3453
|
+
<div class="ax-flex-1 ax-overflow-auto ax-p-4 ax-flex ax-flex-col ax-gap-4">
|
|
3454
|
+
@if (reviewContext(); as ctx) {
|
|
3455
|
+
<axp-widgets-container [context]="ctx" class="ax-flex ax-flex-col ax-gap-4">
|
|
3456
|
+
@for (item of questionsWithAnswers(); track item.questionId; let idx = $index) {
|
|
3457
|
+
@if (item.question?.question?.interface) {
|
|
3458
|
+
<div class="__review-question-card ax-bg-neutral-50 ax-rounded-lg ax-border ax-border-neutral-200 ax-overflow-hidden ax-shadow-sm">
|
|
3459
|
+
<axm-questionnaire-viewer-question
|
|
3460
|
+
[question]="item.question!"
|
|
3461
|
+
[sectionOrder]="1"
|
|
3462
|
+
[questionIndex]="idx + 1"
|
|
3463
|
+
[showQuestionNumbers]="false"
|
|
3464
|
+
[mode]="'view'"
|
|
3465
|
+
[contextData]="ctx"
|
|
3466
|
+
></axm-questionnaire-viewer-question>
|
|
3467
|
+
</div>
|
|
3468
|
+
} @else {
|
|
3469
|
+
<div class="__review-question-card ax-bg-neutral-50 ax-rounded-lg ax-border ax-border-neutral-200 ax-p-4 ax-shadow-sm">
|
|
3470
|
+
<div class="ax-font-medium ax-mb-2 ax-text-neutral-900">{{ item.title }}</div>
|
|
3471
|
+
<div class="ax-text-sm ax-text-neutral-600">{{ formatAnswer(item.answer) }}</div>
|
|
3472
|
+
</div>
|
|
3473
|
+
}
|
|
3474
|
+
}
|
|
3475
|
+
</axp-widgets-container>
|
|
3476
|
+
} @else {
|
|
3477
|
+
@for (item of questionsWithAnswers(); track item.questionId) {
|
|
3478
|
+
<div class="__review-question-card ax-bg-neutral-50 ax-rounded-lg ax-border ax-border-neutral-200 ax-p-4 ax-shadow-sm">
|
|
3479
|
+
<div class="ax-font-medium ax-mb-2 ax-text-neutral-900">{{ item.title }}</div>
|
|
3480
|
+
<div class="ax-text-sm ax-text-neutral-600">{{ formatAnswer(item.answer) }}</div>
|
|
3481
|
+
</div>
|
|
3482
|
+
}
|
|
3483
|
+
}
|
|
3484
|
+
</div>
|
|
3485
|
+
</div>
|
|
3486
|
+
} @else {
|
|
3487
|
+
<div class="axm-post-questionnaire-content __summary ax-flex ax-flex-col ax-items-center ax-justify-center ax-p-8 ax-min-h-[200px]">
|
|
3488
|
+
<h2 class="ax-text-xl ax-font-semibold ax-mb-4">{{ '@assessment-management:questionnaires.components.questionnaire-viewer.flow.summary-title' | translate | async }}</h2>
|
|
3489
|
+
<div class="ax-max-w-2xl ax-w-full ax-prose" [innerHTML]="summaryContentHtml()"></div>
|
|
3490
|
+
</div>
|
|
3250
3491
|
}
|
|
3492
|
+
`,
|
|
3493
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
3494
|
+
imports: [CommonModule, AXTranslationModule, AXPWidgetCoreModule, AXMQuestionnaireViewerQuestionComponent],
|
|
3495
|
+
encapsulation: ViewEncapsulation.None,
|
|
3496
|
+
host: { class: 'axm-post-questionnaire-content' },
|
|
3497
|
+
}]
|
|
3498
|
+
}], propDecorators: { mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], questionsWithAnswers: [{ type: i0.Input, args: [{ isSignal: true, alias: "questionsWithAnswers", required: false }] }], reviewContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "reviewContext", required: false }] }], summaryContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "summaryContent", required: false }] }], placeholderValues: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholderValues", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }] } });
|
|
3499
|
+
|
|
3500
|
+
//#region ---- Imports ----
|
|
3501
|
+
//#endregion
|
|
3502
|
+
//#region ---- Component ----
|
|
3503
|
+
class AXMQuestionnaireViewerPageComponent extends AXPPageLayoutBaseComponent {
|
|
3251
3504
|
//#endregion
|
|
3252
3505
|
//#region ---- Lifecycle ----
|
|
3253
3506
|
constructor() {
|
|
@@ -3262,18 +3515,29 @@ class AXMQuestionnaireViewerPageComponent extends AXPPageLayoutBaseComponent {
|
|
|
3262
3515
|
//#endregion
|
|
3263
3516
|
//#region ---- State ----
|
|
3264
3517
|
this.structure = signal(null, ...(ngDevMode ? [{ debugName: "structure" }] : []));
|
|
3518
|
+
this.questionnaire = signal(null, ...(ngDevMode ? [{ debugName: "questionnaire" }] : []));
|
|
3265
3519
|
this.initialAnswers = signal({}, ...(ngDevMode ? [{ debugName: "initialAnswers" }] : []));
|
|
3266
3520
|
this.viewerConfig = signal({ readonly: false }, ...(ngDevMode ? [{ debugName: "viewerConfig" }] : []));
|
|
3521
|
+
this.prePostConfig = signal(null, ...(ngDevMode ? [{ debugName: "prePostConfig" }] : []));
|
|
3267
3522
|
this.isLoading = signal(true, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
|
|
3268
3523
|
this.loadError = signal(null, ...(ngDevMode ? [{ debugName: "loadError" }] : []));
|
|
3269
|
-
this.isSubmitting = signal(false, ...(ngDevMode ? [{ debugName: "isSubmitting" }] : []));
|
|
3270
3524
|
this.currentSessionId = signal(null, ...(ngDevMode ? [{ debugName: "currentSessionId" }] : []));
|
|
3525
|
+
this.flowStep = signal('questions', ...(ngDevMode ? [{ debugName: "flowStep" }] : []));
|
|
3526
|
+
this.reviewSnapshot = signal([], ...(ngDevMode ? [{ debugName: "reviewSnapshot" }] : []));
|
|
3527
|
+
this.reviewContext = signal(null, ...(ngDevMode ? [{ debugName: "reviewContext" }] : []));
|
|
3528
|
+
this.submitResult = signal(null, ...(ngDevMode ? [{ debugName: "submitResult" }] : []));
|
|
3529
|
+
this.isSubmitting = signal(false, ...(ngDevMode ? [{ debugName: "isSubmitting" }] : []));
|
|
3530
|
+
this.canNavigatePrevious = signal(false, ...(ngDevMode ? [{ debugName: "canNavigatePrevious" }] : []));
|
|
3531
|
+
this.canNavigateNext = signal(false, ...(ngDevMode ? [{ debugName: "canNavigateNext" }] : []));
|
|
3532
|
+
this.showNavigationButtons = signal(false, ...(ngDevMode ? [{ debugName: "showNavigationButtons" }] : []));
|
|
3533
|
+
this.isLastStep = signal(false, ...(ngDevMode ? [{ debugName: "isLastStep" }] : []));
|
|
3534
|
+
this.areAllRequiredQuestionsAnswered = signal(false, ...(ngDevMode ? [{ debugName: "areAllRequiredQuestionsAnswered" }] : []));
|
|
3271
3535
|
//#endregion
|
|
3272
3536
|
//#region ---- View References ----
|
|
3273
|
-
this.
|
|
3537
|
+
this.viewer = viewChild('viewer', ...(ngDevMode ? [{ debugName: "viewer" }] : []));
|
|
3274
3538
|
//#endregion
|
|
3275
3539
|
//#region ---- Computed ----
|
|
3276
|
-
this.viewerViewModel = computed(() => this.
|
|
3540
|
+
this.viewerViewModel = computed(() => this.viewer()?.viewmodel, ...(ngDevMode ? [{ debugName: "viewerViewModel" }] : []));
|
|
3277
3541
|
this.totalQuestionsCount = computed(() => this.viewerViewModel()?.totalQuestionsCount() ?? 0, ...(ngDevMode ? [{ debugName: "totalQuestionsCount" }] : []));
|
|
3278
3542
|
this.totalSectionsCount = computed(() => this.viewerViewModel()?.totalSectionsCount() ?? 0, ...(ngDevMode ? [{ debugName: "totalSectionsCount" }] : []));
|
|
3279
3543
|
this.showTimer = computed(() => this.viewerViewModel()?.showTimer() ?? false, ...(ngDevMode ? [{ debugName: "showTimer" }] : []));
|
|
@@ -3282,21 +3546,24 @@ class AXMQuestionnaireViewerPageComponent extends AXPPageLayoutBaseComponent {
|
|
|
3282
3546
|
this.showProgressBar = computed(() => this.viewerViewModel()?.showProgressBar() ?? false, ...(ngDevMode ? [{ debugName: "showProgressBar" }] : []));
|
|
3283
3547
|
this.answeredQuestionsCount = computed(() => this.viewerViewModel()?.answeredQuestionsCount() ?? 0, ...(ngDevMode ? [{ debugName: "answeredQuestionsCount" }] : []));
|
|
3284
3548
|
this.isReadonly = computed(() => this.viewerConfig()?.readonly ?? false, ...(ngDevMode ? [{ debugName: "isReadonly" }] : []));
|
|
3285
|
-
this.
|
|
3286
|
-
|
|
3287
|
-
this.
|
|
3288
|
-
|
|
3289
|
-
|
|
3549
|
+
this.showReviewButton = computed(() => this.isLastStep() && (this.prePostConfig()?.postReviewEnabled ?? false) && this.flowStep() === 'questions', ...(ngDevMode ? [{ debugName: "showReviewButton" }] : []));
|
|
3550
|
+
/** Use answers from review context when returning from review; otherwise use initial answers. */
|
|
3551
|
+
this.effectiveInitialAnswers = computed(() => {
|
|
3552
|
+
const ctx = this.reviewContext();
|
|
3553
|
+
if (!ctx)
|
|
3554
|
+
return this.initialAnswers();
|
|
3555
|
+
return ctx.answers ?? ctx;
|
|
3556
|
+
}, ...(ngDevMode ? [{ debugName: "effectiveInitialAnswers" }] : []));
|
|
3290
3557
|
effect(() => {
|
|
3291
|
-
const
|
|
3292
|
-
if (
|
|
3293
|
-
const vm =
|
|
3558
|
+
const v = this.viewer();
|
|
3559
|
+
if (v) {
|
|
3560
|
+
const vm = v.viewmodel;
|
|
3294
3561
|
this.canNavigatePrevious.set(vm.canNavigatePrevious());
|
|
3295
3562
|
this.canNavigateNext.set(vm.canNavigateNext());
|
|
3296
|
-
const viewMode =
|
|
3563
|
+
const viewMode = v.viewMode;
|
|
3297
3564
|
this.showNavigationButtons.set(viewMode === 'page-per-group' || viewMode === 'page-per-question' || viewMode === 'side-menu');
|
|
3298
|
-
this.isLastStep.set(
|
|
3299
|
-
this.areAllRequiredQuestionsAnswered.set(
|
|
3565
|
+
this.isLastStep.set(v.isLastStep);
|
|
3566
|
+
this.areAllRequiredQuestionsAnswered.set(v.areAllRequiredQuestionsAnswered);
|
|
3300
3567
|
}
|
|
3301
3568
|
});
|
|
3302
3569
|
}
|
|
@@ -3329,8 +3596,7 @@ class AXMQuestionnaireViewerPageComponent extends AXPPageLayoutBaseComponent {
|
|
|
3329
3596
|
return;
|
|
3330
3597
|
}
|
|
3331
3598
|
let answers = {};
|
|
3332
|
-
const existingSessionId = this.route.snapshot.queryParamMap.get('sessionId') ??
|
|
3333
|
-
this.route.parent?.snapshot.queryParamMap.get('sessionId');
|
|
3599
|
+
const existingSessionId = this.route.snapshot.queryParamMap.get('sessionId') ?? this.route.parent?.snapshot.queryParamMap.get('sessionId');
|
|
3334
3600
|
if (existingSessionId) {
|
|
3335
3601
|
const session = await this.assessmentSessionService.getOne(existingSessionId);
|
|
3336
3602
|
if (session?.answers) {
|
|
@@ -3338,8 +3604,12 @@ class AXMQuestionnaireViewerPageComponent extends AXPPageLayoutBaseComponent {
|
|
|
3338
3604
|
this.currentSessionId.set(existingSessionId);
|
|
3339
3605
|
}
|
|
3340
3606
|
}
|
|
3607
|
+
this.questionnaire.set(questionnaire);
|
|
3341
3608
|
this.structure.set(questionnaire.structure);
|
|
3342
3609
|
this.initialAnswers.set(answers);
|
|
3610
|
+
const cfg = toPrePostConfig(questionnaire);
|
|
3611
|
+
this.prePostConfig.set(cfg);
|
|
3612
|
+
this.flowStep.set(cfg?.preEnabled === true ? 'pre' : 'questions');
|
|
3343
3613
|
this.viewerConfig.set({ readonly: false });
|
|
3344
3614
|
}
|
|
3345
3615
|
catch (err) {
|
|
@@ -3350,6 +3620,80 @@ class AXMQuestionnaireViewerPageComponent extends AXPPageLayoutBaseComponent {
|
|
|
3350
3620
|
}
|
|
3351
3621
|
}
|
|
3352
3622
|
//#endregion
|
|
3623
|
+
//#region ---- Submit Handler ----
|
|
3624
|
+
async saveSessionAndGetSummary(answers) {
|
|
3625
|
+
const caseIdVal = this.route.snapshot.paramMap.get('caseId') ?? this.route.parent?.snapshot.paramMap.get('caseId');
|
|
3626
|
+
const structureVal = this.structure();
|
|
3627
|
+
const q = this.questionnaire();
|
|
3628
|
+
if (!caseIdVal || !structureVal || !q)
|
|
3629
|
+
return null;
|
|
3630
|
+
const { answeredQuestionsCount, progressPercentage } = this.calculateProgress(structureVal, answers);
|
|
3631
|
+
const responderId = this.authSession.user?.id;
|
|
3632
|
+
if (!responderId) {
|
|
3633
|
+
this.toastService.show({
|
|
3634
|
+
color: 'danger',
|
|
3635
|
+
title: await this.translateService.translateAsync('@general:messages.generic.error.title'),
|
|
3636
|
+
content: await this.translateService.translateAsync('@general:messages.generic.error.description'),
|
|
3637
|
+
});
|
|
3638
|
+
return null;
|
|
3639
|
+
}
|
|
3640
|
+
const now = new Date();
|
|
3641
|
+
const sessionIdVal = this.currentSessionId();
|
|
3642
|
+
const role = 'responder';
|
|
3643
|
+
const sessionData = {
|
|
3644
|
+
caseId: caseIdVal,
|
|
3645
|
+
responderId,
|
|
3646
|
+
role,
|
|
3647
|
+
answers,
|
|
3648
|
+
progressPercentage,
|
|
3649
|
+
answeredQuestionsCount,
|
|
3650
|
+
lastSavedAt: now,
|
|
3651
|
+
};
|
|
3652
|
+
if (sessionIdVal) {
|
|
3653
|
+
await this.assessmentSessionService.updateOne(sessionIdVal, sessionData);
|
|
3654
|
+
this.toastService.show({
|
|
3655
|
+
color: 'success',
|
|
3656
|
+
title: await this.translateService.translateAsync('@general:messages.form.saved.success.title'),
|
|
3657
|
+
content: await this.translateService.translateAsync('@general:messages.form.saved.success.description'),
|
|
3658
|
+
});
|
|
3659
|
+
}
|
|
3660
|
+
else {
|
|
3661
|
+
const newSessionData = { ...sessionData, startedAt: now };
|
|
3662
|
+
await this.assessmentSessionService.insertOne(newSessionData);
|
|
3663
|
+
this.toastService.show({
|
|
3664
|
+
color: 'success',
|
|
3665
|
+
title: await this.translateService.translateAsync('@assessment-management:sessions.states.submitted'),
|
|
3666
|
+
content: '',
|
|
3667
|
+
});
|
|
3668
|
+
}
|
|
3669
|
+
const passingScore = q.passingScore;
|
|
3670
|
+
const passFail = passingScore != null
|
|
3671
|
+
? progressPercentage >= passingScore
|
|
3672
|
+
? ((await this.translateService.translateAsync('@assessment-management:questionnaires.components.questionnaire-viewer.flow.pass')) ?? 'Pass')
|
|
3673
|
+
: ((await this.translateService.translateAsync('@assessment-management:questionnaires.components.questionnaire-viewer.flow.fail')) ?? 'Fail')
|
|
3674
|
+
: undefined;
|
|
3675
|
+
const totalQuestions = structureVal.sections?.reduce((s, sec) => s + (sec.items?.length ?? 0), 0) ?? 0;
|
|
3676
|
+
return { score: progressPercentage, passFail, totalQuestions, answeredCount: answeredQuestionsCount };
|
|
3677
|
+
}
|
|
3678
|
+
//#endregion
|
|
3679
|
+
//#region ---- Page Layout Overrides ----
|
|
3680
|
+
async getPageTitle() {
|
|
3681
|
+
return this.translateService.translateAsync('@assessment-management:cases.actions.fill-assessment.title');
|
|
3682
|
+
}
|
|
3683
|
+
getPageBreadcrumbs() {
|
|
3684
|
+
return [
|
|
3685
|
+
{ title: '@assessment-management:cases.entities.assessment-case.plural', command: { name: 'navigate', options: { path: this.getCasesListPath() } } },
|
|
3686
|
+
{ title: '@assessment-management:cases.actions.fill-assessment.title' },
|
|
3687
|
+
];
|
|
3688
|
+
}
|
|
3689
|
+
async getBackButton() {
|
|
3690
|
+
const title = await this.translateService.translateAsync('@assessment-management:cases.entities.assessment-case.plural');
|
|
3691
|
+
return { title };
|
|
3692
|
+
}
|
|
3693
|
+
onBackButtonClick() {
|
|
3694
|
+
this.router.navigateByUrl(this.getCasesListPath());
|
|
3695
|
+
}
|
|
3696
|
+
//#endregion
|
|
3353
3697
|
//#region ---- Helpers ----
|
|
3354
3698
|
getCasesListPath() {
|
|
3355
3699
|
const app = this.authSession.application?.name ?? 'demo';
|
|
@@ -3365,13 +3709,8 @@ class AXMQuestionnaireViewerPageComponent extends AXPPageLayoutBaseComponent {
|
|
|
3365
3709
|
continue;
|
|
3366
3710
|
for (const item of section.items) {
|
|
3367
3711
|
total++;
|
|
3368
|
-
const
|
|
3369
|
-
const
|
|
3370
|
-
const isEmpty = value === null ||
|
|
3371
|
-
value === undefined ||
|
|
3372
|
-
value === '' ||
|
|
3373
|
-
(Array.isArray(value) && value.length === 0) ||
|
|
3374
|
-
(typeof value === 'object' && value !== null && Object.keys(value).length === 0);
|
|
3712
|
+
const value = item.id ? (answers[item.id] ?? get(answers, `answers.${item.id}`)) : null;
|
|
3713
|
+
const isEmpty = value === null || value === undefined || value === '' || (Array.isArray(value) && value.length === 0) || (typeof value === 'object' && value !== null && Object.keys(value).length === 0);
|
|
3375
3714
|
if (!isEmpty)
|
|
3376
3715
|
answered++;
|
|
3377
3716
|
}
|
|
@@ -3382,79 +3721,69 @@ class AXMQuestionnaireViewerPageComponent extends AXPPageLayoutBaseComponent {
|
|
|
3382
3721
|
//#endregion
|
|
3383
3722
|
//#region ---- Event Handlers ----
|
|
3384
3723
|
handleAnswersChanged(_answers) { }
|
|
3724
|
+
handleReviewClick() {
|
|
3725
|
+
const viewer = this.viewer();
|
|
3726
|
+
const items = viewer?.getQuestionsWithAnswers() ?? [];
|
|
3727
|
+
const context = viewer?.getReviewContext() ?? null;
|
|
3728
|
+
this.reviewSnapshot.set(items.map((q) => ({ questionId: q.questionId, title: q.title, answer: q.answer, question: q.question })));
|
|
3729
|
+
this.reviewContext.set(context);
|
|
3730
|
+
this.flowStep.set('review');
|
|
3731
|
+
}
|
|
3732
|
+
async handleReviewSubmit() {
|
|
3733
|
+
const viewer = this.viewer();
|
|
3734
|
+
if (!viewer)
|
|
3735
|
+
return;
|
|
3736
|
+
this.isSubmitting.set(true);
|
|
3737
|
+
try {
|
|
3738
|
+
const result = await viewer.submit();
|
|
3739
|
+
if (result.success && result.answers) {
|
|
3740
|
+
const summary = await this.saveSessionAndGetSummary(result.answers);
|
|
3741
|
+
this.submitResult.set(summary ?? null);
|
|
3742
|
+
if ((this.prePostConfig()?.postSummaryEnabled ?? false) && summary) {
|
|
3743
|
+
this.flowStep.set('summary');
|
|
3744
|
+
}
|
|
3745
|
+
else {
|
|
3746
|
+
this.handleDone();
|
|
3747
|
+
}
|
|
3748
|
+
}
|
|
3749
|
+
}
|
|
3750
|
+
finally {
|
|
3751
|
+
this.isSubmitting.set(false);
|
|
3752
|
+
}
|
|
3753
|
+
}
|
|
3385
3754
|
async handlePreviousClick() {
|
|
3386
|
-
await this.
|
|
3755
|
+
await this.viewer()?.navigatePrevious();
|
|
3387
3756
|
}
|
|
3388
3757
|
async handleNextClick() {
|
|
3389
|
-
await this.
|
|
3758
|
+
await this.viewer()?.navigateNext();
|
|
3390
3759
|
}
|
|
3391
3760
|
async handleSubmitClick() {
|
|
3392
|
-
const viewer = this.
|
|
3761
|
+
const viewer = this.viewer();
|
|
3393
3762
|
if (!viewer)
|
|
3394
3763
|
return;
|
|
3395
3764
|
this.isSubmitting.set(true);
|
|
3396
3765
|
try {
|
|
3397
3766
|
const result = await viewer.submit();
|
|
3398
3767
|
if (result.success && result.answers) {
|
|
3399
|
-
const
|
|
3400
|
-
|
|
3401
|
-
if (
|
|
3402
|
-
|
|
3403
|
-
const { answeredQuestionsCount, progressPercentage } = this.calculateProgress(structureVal, result.answers);
|
|
3404
|
-
const responderId = this.authSession.user?.id;
|
|
3405
|
-
if (!responderId) {
|
|
3406
|
-
this.toastService.show({
|
|
3407
|
-
color: 'danger',
|
|
3408
|
-
title: await this.translateService.translateAsync('@general:messages.generic.error.title'),
|
|
3409
|
-
content: await this.translateService.translateAsync('@general:messages.generic.error.description'),
|
|
3410
|
-
});
|
|
3411
|
-
return;
|
|
3412
|
-
}
|
|
3413
|
-
const now = new Date();
|
|
3414
|
-
const sessionIdVal = this.currentSessionId();
|
|
3415
|
-
const role = 'responder';
|
|
3416
|
-
const sessionData = {
|
|
3417
|
-
caseId: caseIdVal,
|
|
3418
|
-
responderId,
|
|
3419
|
-
role,
|
|
3420
|
-
answers: result.answers,
|
|
3421
|
-
progressPercentage,
|
|
3422
|
-
answeredQuestionsCount,
|
|
3423
|
-
lastSavedAt: now,
|
|
3424
|
-
};
|
|
3425
|
-
if (sessionIdVal) {
|
|
3426
|
-
await this.assessmentSessionService.updateOne(sessionIdVal, sessionData);
|
|
3427
|
-
this.toastService.show({
|
|
3428
|
-
color: 'success',
|
|
3429
|
-
title: await this.translateService.translateAsync('@general:messages.form.saved.success.title'),
|
|
3430
|
-
content: await this.translateService.translateAsync('@general:messages.form.saved.success.description'),
|
|
3431
|
-
});
|
|
3768
|
+
const summary = await this.saveSessionAndGetSummary(result.answers);
|
|
3769
|
+
this.submitResult.set(summary ?? null);
|
|
3770
|
+
if (this.prePostConfig()?.postSummaryEnabled) {
|
|
3771
|
+
this.flowStep.set('summary');
|
|
3432
3772
|
}
|
|
3433
3773
|
else {
|
|
3434
|
-
|
|
3435
|
-
...sessionData,
|
|
3436
|
-
startedAt: now,
|
|
3437
|
-
};
|
|
3438
|
-
await this.assessmentSessionService.insertOne(newSessionData);
|
|
3439
|
-
this.toastService.show({
|
|
3440
|
-
color: 'success',
|
|
3441
|
-
title: await this.translateService.translateAsync('@assessment-management:sessions.states.submitted'),
|
|
3442
|
-
content: '',
|
|
3443
|
-
});
|
|
3774
|
+
this.handleDone();
|
|
3444
3775
|
}
|
|
3445
|
-
await this.router.navigateByUrl(this.getCasesListPath());
|
|
3446
3776
|
}
|
|
3447
3777
|
}
|
|
3448
3778
|
finally {
|
|
3449
3779
|
this.isSubmitting.set(false);
|
|
3450
3780
|
}
|
|
3451
3781
|
}
|
|
3782
|
+
handleDone() {
|
|
3783
|
+
this.router.navigateByUrl(this.getCasesListPath());
|
|
3784
|
+
}
|
|
3452
3785
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMQuestionnaireViewerPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3453
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AXMQuestionnaireViewerPageComponent, isStandalone: true, selector: "axm-questionnaire-viewer-page", host: { classAttribute: "axm-questionnaire-viewer-page" }, providers: [
|
|
3454
|
-
AXPWidgetCoreService,
|
|
3455
|
-
AXPWidgetCoreContextStore,
|
|
3456
|
-
{ provide: AXPPageLayoutBase, useExisting: AXMQuestionnaireViewerPageComponent },
|
|
3457
|
-
], viewQueries: [{ propertyName: "questionnaireViewer", first: true, predicate: ["viewer"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
3786
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AXMQuestionnaireViewerPageComponent, isStandalone: true, selector: "axm-questionnaire-viewer-page", host: { classAttribute: "axm-questionnaire-viewer-page" }, providers: [{ provide: AXPPageLayoutBase, useExisting: AXMQuestionnaireViewerPageComponent }], viewQueries: [{ propertyName: "viewer", first: true, predicate: ["viewer"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
3458
3787
|
<axp-page-layout>
|
|
3459
3788
|
<axp-page-content class="ax-overflow-auto">
|
|
3460
3789
|
@if (isLoading()) {
|
|
@@ -3466,25 +3795,43 @@ class AXMQuestionnaireViewerPageComponent extends AXPPageLayoutBaseComponent {
|
|
|
3466
3795
|
{{ loadError() }}
|
|
3467
3796
|
</div>
|
|
3468
3797
|
} @else if (structure()) {
|
|
3469
|
-
|
|
3470
|
-
<
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3798
|
+
@if (flowStep() === 'pre') {
|
|
3799
|
+
<axm-pre-questionnaire-content
|
|
3800
|
+
[content]="prePostConfig()?.preContent"
|
|
3801
|
+
></axm-pre-questionnaire-content>
|
|
3802
|
+
} @else if (flowStep() === 'summary') {
|
|
3803
|
+
<axm-post-questionnaire-content
|
|
3804
|
+
mode="summary"
|
|
3805
|
+
[summaryContent]="prePostConfig()?.postSummaryContent"
|
|
3806
|
+
[placeholderValues]="submitResult()"
|
|
3807
|
+
></axm-post-questionnaire-content>
|
|
3808
|
+
} @else {
|
|
3809
|
+
@if (flowStep() === 'review') {
|
|
3810
|
+
<axm-post-questionnaire-content
|
|
3811
|
+
mode="review"
|
|
3812
|
+
[questionsWithAnswers]="reviewSnapshot()"
|
|
3813
|
+
[reviewContext]="reviewContext()"
|
|
3814
|
+
></axm-post-questionnaire-content>
|
|
3815
|
+
}
|
|
3816
|
+
<div
|
|
3817
|
+
class="__questions ax-flex ax-flex-col ax-min-h-full"
|
|
3818
|
+
[class.ax-invisible]="flowStep() === 'review'"
|
|
3819
|
+
[style.position]="flowStep() === 'review' ? 'fixed' : null"
|
|
3820
|
+
[style.left]="flowStep() === 'review' ? '-9999px' : null"
|
|
3821
|
+
[class.ax-size-0]="flowStep() === 'review'"
|
|
3822
|
+
[class.ax-overflow-hidden]="flowStep() === 'review'"
|
|
3823
|
+
>
|
|
3824
|
+
<div class="__header ax-p-4 ax-border-b">
|
|
3825
|
+
<div class="ax-flex ax-justify-between ax-items-center ax-gap-4">
|
|
3826
|
+
<div class="ax-flex ax-items-center ax-gap-4 ax-text-sm ax-text-neutral-600">
|
|
3827
|
+
@if (totalQuestionsCount() > 0) {
|
|
3828
|
+
<span><i class="fa-light fa-list-check ax-text-primary-600"></i> {{ totalQuestionsCount() }} {{ totalQuestionsCount() === 1 ? 'Question' : 'Questions' }}</span>
|
|
3829
|
+
}
|
|
3830
|
+
@if (totalSectionsCount() > 0) {
|
|
3831
|
+
<span><i class="fa-light fa-folder ax-text-primary-600"></i> {{ totalSectionsCount() }} {{ totalSectionsCount() === 1 ? 'Section' : 'Sections' }}</span>
|
|
3832
|
+
}
|
|
3833
|
+
</div>
|
|
3834
|
+
@if (showTimer()) {
|
|
3488
3835
|
<axp-stopwatch
|
|
3489
3836
|
[mode]="'count-down'"
|
|
3490
3837
|
[timeLimit]="timerTimeLimit()"
|
|
@@ -3493,68 +3840,67 @@ class AXMQuestionnaireViewerPageComponent extends AXPPageLayoutBaseComponent {
|
|
|
3493
3840
|
[showControls]="false"
|
|
3494
3841
|
[value]="timerElapsed()"
|
|
3495
3842
|
(valueChange)="viewerViewModel()!.updateTimerElapsed($event)"
|
|
3496
|
-
>
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3843
|
+
></axp-stopwatch>
|
|
3844
|
+
}
|
|
3845
|
+
</div>
|
|
3846
|
+
</div>
|
|
3847
|
+
<div class="__content ax-flex-1 ax-min-h-0">
|
|
3848
|
+
<axm-questionnaire-viewer
|
|
3849
|
+
#viewer
|
|
3850
|
+
[structure]="structure()!"
|
|
3851
|
+
[config]="viewerConfig()"
|
|
3852
|
+
[initialAnswers]="effectiveInitialAnswers()"
|
|
3853
|
+
(answersChanged)="handleAnswersChanged($event)"
|
|
3854
|
+
></axm-questionnaire-viewer>
|
|
3500
3855
|
</div>
|
|
3501
3856
|
</div>
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
</axm-questionnaire-viewer>
|
|
3512
|
-
</div>
|
|
3513
|
-
|
|
3514
|
-
<div class="__footer ax-flex ax-items-center ax-justify-between ax-gap-4 ax-p-4 ax-border-t">
|
|
3515
|
-
<div class="ax-text-sm ax-font-mono ax-tabular-nums">
|
|
3516
|
-
@if (viewerViewModel() && showProgressBar()) {
|
|
3857
|
+
}
|
|
3858
|
+
}
|
|
3859
|
+
</axp-page-content>
|
|
3860
|
+
@if (structure() && !isLoading() && !loadError()) {
|
|
3861
|
+
<axp-page-footer class="--animated">
|
|
3862
|
+
<axp-layout-prefix>
|
|
3863
|
+
@if (flowStep() === 'questions') {
|
|
3864
|
+
<div class="ax-text-sm ax-font-mono ax-tabular-nums ax-text-neutral-600">
|
|
3865
|
+
@if (showProgressBar()) {
|
|
3517
3866
|
{{ answeredQuestionsCount() }} / {{ totalQuestionsCount() }}
|
|
3518
3867
|
}
|
|
3519
3868
|
</div>
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
look="solid"
|
|
3531
|
-
color="primary"
|
|
3532
|
-
[disabled]="!canNavigateNext()"
|
|
3533
|
-
[text]="'@general:actions.next.title' | translate | async"
|
|
3534
|
-
(onClick)="handleNextClick()"
|
|
3535
|
-
></ax-button>
|
|
3536
|
-
}
|
|
3537
|
-
}
|
|
3538
|
-
@if (isLastStep()) {
|
|
3539
|
-
<ax-button
|
|
3540
|
-
look="solid"
|
|
3541
|
-
color="primary"
|
|
3542
|
-
[text]="'@general:actions.submit.title' | translate | async"
|
|
3543
|
-
[disabled]="isReadonly() || isSubmitting() || !areAllRequiredQuestionsAnswered()"
|
|
3544
|
-
(onClick)="handleSubmitClick()"
|
|
3545
|
-
></ax-button>
|
|
3869
|
+
}
|
|
3870
|
+
</axp-layout-prefix>
|
|
3871
|
+
<axp-layout-suffix>
|
|
3872
|
+
@if (flowStep() === 'pre') {
|
|
3873
|
+
<ax-button look="solid" color="primary" [text]="'@assessment-management:questionnaires.components.questionnaire-viewer.flow.start' | translate | async" (onClick)="flowStep.set('questions')"></ax-button>
|
|
3874
|
+
} @else if (flowStep() === 'questions') {
|
|
3875
|
+
@if (showNavigationButtons()) {
|
|
3876
|
+
<ax-button look="solid" [disabled]="!canNavigatePrevious()" [text]="'@general:actions.previous.title' | translate | async" (onClick)="handlePreviousClick()"></ax-button>
|
|
3877
|
+
@if (!isLastStep()) {
|
|
3878
|
+
<ax-button look="solid" color="primary" [disabled]="!canNavigateNext()" [text]="'@general:actions.next.title' | translate | async" (onClick)="handleNextClick()"></ax-button>
|
|
3546
3879
|
}
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3880
|
+
}
|
|
3881
|
+
@if (isLastStep() && showReviewButton()) {
|
|
3882
|
+
<ax-button look="solid" color="primary" [text]="'@assessment-management:questionnaires.components.questionnaire-viewer.flow.review' | translate | async" [disabled]="!areAllRequiredQuestionsAnswered()" (onClick)="handleReviewClick()"></ax-button>
|
|
3883
|
+
}
|
|
3884
|
+
@if (isLastStep() && !showReviewButton()) {
|
|
3885
|
+
<ax-button look="solid" color="primary" [text]="'@general:actions.submit.title' | translate | async" [disabled]="isReadonly() || isSubmitting() || !areAllRequiredQuestionsAnswered()" (onClick)="handleSubmitClick()"></ax-button>
|
|
3886
|
+
}
|
|
3887
|
+
} @else if (flowStep() === 'review') {
|
|
3888
|
+
<ax-button look="outline" [text]="'@assessment-management:questionnaires.components.questionnaire-viewer.flow.edit' | translate | async" (onClick)="flowStep.set('questions')"></ax-button>
|
|
3889
|
+
<ax-button look="solid" color="primary" [text]="'@general:actions.submit.title' | translate | async" [disabled]="isSubmitting()" (onClick)="handleReviewSubmit()"></ax-button>
|
|
3890
|
+
} @else if (flowStep() === 'summary') {
|
|
3891
|
+
<ax-button look="solid" color="primary" [text]="'@assessment-management:questionnaires.components.questionnaire-viewer.flow.done' | translate | async" (onClick)="handleDone()"></ax-button>
|
|
3892
|
+
}
|
|
3893
|
+
</axp-layout-suffix>
|
|
3894
|
+
</axp-page-footer>
|
|
3895
|
+
}
|
|
3552
3896
|
</axp-page-layout>
|
|
3553
|
-
`, isInline: true,
|
|
3897
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1$3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: AXPPageLayoutComponent, selector: "axp-page-layout" }, { kind: "component", type: AXPThemeLayoutBlockComponent, selector: " axp-page-content, axp-page-footer-container, axp-page-footer, axp-page-header, axp-page-header-container, axp-page-toolbar, axp-layout-content, axp-layout-page-content, axp-layout-sections, axp-layout-body, axp-layout-page-body, axp-layout-prefix, axp-layout-suffix, axp-layout-title-bar, axp-layout-title, axp-layout-title-actions, axp-layout-nav-button, axp-layout-description, axp-layout-breadcrumbs, axp-layout-list-action, " }, { kind: "component", type: AXPStopwatchComponent, selector: "axp-stopwatch", inputs: ["mode", "timeLimit", "format", "autoStart", "showControls", "value"], outputs: ["valueChange", "timeUp"] }, { kind: "component", type: AXMQuestionnaireViewerComponent, selector: "axm-questionnaire-viewer", inputs: ["questionnaireId", "structure", "config", "initialAnswers"], outputs: ["answersChanged", "questionAnswered"] }, { kind: "component", type: AXMPreQuestionnaireContentComponent, selector: "axm-pre-questionnaire-content", inputs: ["content", "locale"] }, { kind: "component", type: AXMPostQuestionnaireContentComponent, selector: "axm-post-questionnaire-content", inputs: ["mode", "questionsWithAnswers", "reviewContext", "summaryContent", "placeholderValues", "locale"] }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
3554
3898
|
}
|
|
3555
3899
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMQuestionnaireViewerPageComponent, decorators: [{
|
|
3556
3900
|
type: Component,
|
|
3557
|
-
args: [{
|
|
3901
|
+
args: [{
|
|
3902
|
+
selector: 'axm-questionnaire-viewer-page',
|
|
3903
|
+
template: `
|
|
3558
3904
|
<axp-page-layout>
|
|
3559
3905
|
<axp-page-content class="ax-overflow-auto">
|
|
3560
3906
|
@if (isLoading()) {
|
|
@@ -3566,25 +3912,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
3566
3912
|
{{ loadError() }}
|
|
3567
3913
|
</div>
|
|
3568
3914
|
} @else if (structure()) {
|
|
3569
|
-
|
|
3570
|
-
<
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3915
|
+
@if (flowStep() === 'pre') {
|
|
3916
|
+
<axm-pre-questionnaire-content
|
|
3917
|
+
[content]="prePostConfig()?.preContent"
|
|
3918
|
+
></axm-pre-questionnaire-content>
|
|
3919
|
+
} @else if (flowStep() === 'summary') {
|
|
3920
|
+
<axm-post-questionnaire-content
|
|
3921
|
+
mode="summary"
|
|
3922
|
+
[summaryContent]="prePostConfig()?.postSummaryContent"
|
|
3923
|
+
[placeholderValues]="submitResult()"
|
|
3924
|
+
></axm-post-questionnaire-content>
|
|
3925
|
+
} @else {
|
|
3926
|
+
@if (flowStep() === 'review') {
|
|
3927
|
+
<axm-post-questionnaire-content
|
|
3928
|
+
mode="review"
|
|
3929
|
+
[questionsWithAnswers]="reviewSnapshot()"
|
|
3930
|
+
[reviewContext]="reviewContext()"
|
|
3931
|
+
></axm-post-questionnaire-content>
|
|
3932
|
+
}
|
|
3933
|
+
<div
|
|
3934
|
+
class="__questions ax-flex ax-flex-col ax-min-h-full"
|
|
3935
|
+
[class.ax-invisible]="flowStep() === 'review'"
|
|
3936
|
+
[style.position]="flowStep() === 'review' ? 'fixed' : null"
|
|
3937
|
+
[style.left]="flowStep() === 'review' ? '-9999px' : null"
|
|
3938
|
+
[class.ax-size-0]="flowStep() === 'review'"
|
|
3939
|
+
[class.ax-overflow-hidden]="flowStep() === 'review'"
|
|
3940
|
+
>
|
|
3941
|
+
<div class="__header ax-p-4 ax-border-b">
|
|
3942
|
+
<div class="ax-flex ax-justify-between ax-items-center ax-gap-4">
|
|
3943
|
+
<div class="ax-flex ax-items-center ax-gap-4 ax-text-sm ax-text-neutral-600">
|
|
3944
|
+
@if (totalQuestionsCount() > 0) {
|
|
3945
|
+
<span><i class="fa-light fa-list-check ax-text-primary-600"></i> {{ totalQuestionsCount() }} {{ totalQuestionsCount() === 1 ? 'Question' : 'Questions' }}</span>
|
|
3946
|
+
}
|
|
3947
|
+
@if (totalSectionsCount() > 0) {
|
|
3948
|
+
<span><i class="fa-light fa-folder ax-text-primary-600"></i> {{ totalSectionsCount() }} {{ totalSectionsCount() === 1 ? 'Section' : 'Sections' }}</span>
|
|
3949
|
+
}
|
|
3950
|
+
</div>
|
|
3951
|
+
@if (showTimer()) {
|
|
3588
3952
|
<axp-stopwatch
|
|
3589
3953
|
[mode]="'count-down'"
|
|
3590
3954
|
[timeLimit]="timerTimeLimit()"
|
|
@@ -3593,79 +3957,78 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
3593
3957
|
[showControls]="false"
|
|
3594
3958
|
[value]="timerElapsed()"
|
|
3595
3959
|
(valueChange)="viewerViewModel()!.updateTimerElapsed($event)"
|
|
3596
|
-
>
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3960
|
+
></axp-stopwatch>
|
|
3961
|
+
}
|
|
3962
|
+
</div>
|
|
3963
|
+
</div>
|
|
3964
|
+
<div class="__content ax-flex-1 ax-min-h-0">
|
|
3965
|
+
<axm-questionnaire-viewer
|
|
3966
|
+
#viewer
|
|
3967
|
+
[structure]="structure()!"
|
|
3968
|
+
[config]="viewerConfig()"
|
|
3969
|
+
[initialAnswers]="effectiveInitialAnswers()"
|
|
3970
|
+
(answersChanged)="handleAnswersChanged($event)"
|
|
3971
|
+
></axm-questionnaire-viewer>
|
|
3600
3972
|
</div>
|
|
3601
3973
|
</div>
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
</axm-questionnaire-viewer>
|
|
3612
|
-
</div>
|
|
3613
|
-
|
|
3614
|
-
<div class="__footer ax-flex ax-items-center ax-justify-between ax-gap-4 ax-p-4 ax-border-t">
|
|
3615
|
-
<div class="ax-text-sm ax-font-mono ax-tabular-nums">
|
|
3616
|
-
@if (viewerViewModel() && showProgressBar()) {
|
|
3974
|
+
}
|
|
3975
|
+
}
|
|
3976
|
+
</axp-page-content>
|
|
3977
|
+
@if (structure() && !isLoading() && !loadError()) {
|
|
3978
|
+
<axp-page-footer class="--animated">
|
|
3979
|
+
<axp-layout-prefix>
|
|
3980
|
+
@if (flowStep() === 'questions') {
|
|
3981
|
+
<div class="ax-text-sm ax-font-mono ax-tabular-nums ax-text-neutral-600">
|
|
3982
|
+
@if (showProgressBar()) {
|
|
3617
3983
|
{{ answeredQuestionsCount() }} / {{ totalQuestionsCount() }}
|
|
3618
3984
|
}
|
|
3619
3985
|
</div>
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
look="solid"
|
|
3631
|
-
color="primary"
|
|
3632
|
-
[disabled]="!canNavigateNext()"
|
|
3633
|
-
[text]="'@general:actions.next.title' | translate | async"
|
|
3634
|
-
(onClick)="handleNextClick()"
|
|
3635
|
-
></ax-button>
|
|
3636
|
-
}
|
|
3637
|
-
}
|
|
3638
|
-
@if (isLastStep()) {
|
|
3639
|
-
<ax-button
|
|
3640
|
-
look="solid"
|
|
3641
|
-
color="primary"
|
|
3642
|
-
[text]="'@general:actions.submit.title' | translate | async"
|
|
3643
|
-
[disabled]="isReadonly() || isSubmitting() || !areAllRequiredQuestionsAnswered()"
|
|
3644
|
-
(onClick)="handleSubmitClick()"
|
|
3645
|
-
></ax-button>
|
|
3986
|
+
}
|
|
3987
|
+
</axp-layout-prefix>
|
|
3988
|
+
<axp-layout-suffix>
|
|
3989
|
+
@if (flowStep() === 'pre') {
|
|
3990
|
+
<ax-button look="solid" color="primary" [text]="'@assessment-management:questionnaires.components.questionnaire-viewer.flow.start' | translate | async" (onClick)="flowStep.set('questions')"></ax-button>
|
|
3991
|
+
} @else if (flowStep() === 'questions') {
|
|
3992
|
+
@if (showNavigationButtons()) {
|
|
3993
|
+
<ax-button look="solid" [disabled]="!canNavigatePrevious()" [text]="'@general:actions.previous.title' | translate | async" (onClick)="handlePreviousClick()"></ax-button>
|
|
3994
|
+
@if (!isLastStep()) {
|
|
3995
|
+
<ax-button look="solid" color="primary" [disabled]="!canNavigateNext()" [text]="'@general:actions.next.title' | translate | async" (onClick)="handleNextClick()"></ax-button>
|
|
3646
3996
|
}
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3997
|
+
}
|
|
3998
|
+
@if (isLastStep() && showReviewButton()) {
|
|
3999
|
+
<ax-button look="solid" color="primary" [text]="'@assessment-management:questionnaires.components.questionnaire-viewer.flow.review' | translate | async" [disabled]="!areAllRequiredQuestionsAnswered()" (onClick)="handleReviewClick()"></ax-button>
|
|
4000
|
+
}
|
|
4001
|
+
@if (isLastStep() && !showReviewButton()) {
|
|
4002
|
+
<ax-button look="solid" color="primary" [text]="'@general:actions.submit.title' | translate | async" [disabled]="isReadonly() || isSubmitting() || !areAllRequiredQuestionsAnswered()" (onClick)="handleSubmitClick()"></ax-button>
|
|
4003
|
+
}
|
|
4004
|
+
} @else if (flowStep() === 'review') {
|
|
4005
|
+
<ax-button look="outline" [text]="'@assessment-management:questionnaires.components.questionnaire-viewer.flow.edit' | translate | async" (onClick)="flowStep.set('questions')"></ax-button>
|
|
4006
|
+
<ax-button look="solid" color="primary" [text]="'@general:actions.submit.title' | translate | async" [disabled]="isSubmitting()" (onClick)="handleReviewSubmit()"></ax-button>
|
|
4007
|
+
} @else if (flowStep() === 'summary') {
|
|
4008
|
+
<ax-button look="solid" color="primary" [text]="'@assessment-management:questionnaires.components.questionnaire-viewer.flow.done' | translate | async" (onClick)="handleDone()"></ax-button>
|
|
4009
|
+
}
|
|
4010
|
+
</axp-layout-suffix>
|
|
4011
|
+
</axp-page-footer>
|
|
4012
|
+
}
|
|
3652
4013
|
</axp-page-layout>
|
|
3653
|
-
`,
|
|
4014
|
+
`,
|
|
4015
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4016
|
+
imports: [
|
|
3654
4017
|
CommonModule,
|
|
3655
|
-
AXButtonModule,
|
|
3656
|
-
AXDecoratorModule,
|
|
3657
4018
|
AXTranslationModule,
|
|
3658
|
-
|
|
3659
|
-
AXMQuestionnaireViewerComponent,
|
|
3660
|
-
AXPStopwatchComponent,
|
|
4019
|
+
AXButtonModule,
|
|
3661
4020
|
AXPPageLayoutComponent,
|
|
3662
4021
|
AXPThemeLayoutBlockComponent,
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
],
|
|
3668
|
-
|
|
4022
|
+
AXPStopwatchComponent,
|
|
4023
|
+
AXMQuestionnaireViewerComponent,
|
|
4024
|
+
AXMPreQuestionnaireContentComponent,
|
|
4025
|
+
AXMPostQuestionnaireContentComponent,
|
|
4026
|
+
],
|
|
4027
|
+
providers: [{ provide: AXPPageLayoutBase, useExisting: AXMQuestionnaireViewerPageComponent }],
|
|
4028
|
+
encapsulation: ViewEncapsulation.None,
|
|
4029
|
+
host: { class: 'axm-questionnaire-viewer-page' },
|
|
4030
|
+
}]
|
|
4031
|
+
}], ctorParameters: () => [], propDecorators: { viewer: [{ type: i0.ViewChild, args: ['viewer', { isSignal: true }] }] } });
|
|
3669
4032
|
|
|
3670
4033
|
var questionnaireViewerPage_component = /*#__PURE__*/Object.freeze({
|
|
3671
4034
|
__proto__: null,
|
|
@@ -3675,10 +4038,6 @@ var questionnaireViewerPage_component = /*#__PURE__*/Object.freeze({
|
|
|
3675
4038
|
//#region ---- Imports ----
|
|
3676
4039
|
//#endregion
|
|
3677
4040
|
//#region ---- Component ----
|
|
3678
|
-
/**
|
|
3679
|
-
* Standalone questionnaire viewer page for external access (e.g. shareable links).
|
|
3680
|
-
* Renders full-screen without app shell (no sidebar, no main header).
|
|
3681
|
-
*/
|
|
3682
4041
|
class AXMQuestionnaireViewerStandalonePageComponent {
|
|
3683
4042
|
//#endregion
|
|
3684
4043
|
//#region ---- Lifecycle ----
|
|
@@ -3691,40 +4050,53 @@ class AXMQuestionnaireViewerStandalonePageComponent {
|
|
|
3691
4050
|
//#endregion
|
|
3692
4051
|
//#region ---- State ----
|
|
3693
4052
|
this.structure = signal(null, ...(ngDevMode ? [{ debugName: "structure" }] : []));
|
|
4053
|
+
this.questionnaire = signal(null, ...(ngDevMode ? [{ debugName: "questionnaire" }] : []));
|
|
3694
4054
|
this.initialAnswers = signal({}, ...(ngDevMode ? [{ debugName: "initialAnswers" }] : []));
|
|
4055
|
+
this.prePostConfig = signal(null, ...(ngDevMode ? [{ debugName: "prePostConfig" }] : []));
|
|
3695
4056
|
this.viewerConfig = signal({ readonly: false }, ...(ngDevMode ? [{ debugName: "viewerConfig" }] : []));
|
|
3696
4057
|
this.isLoading = signal(true, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
|
|
3697
4058
|
this.loadError = signal(null, ...(ngDevMode ? [{ debugName: "loadError" }] : []));
|
|
3698
4059
|
this.isSubmitting = signal(false, ...(ngDevMode ? [{ debugName: "isSubmitting" }] : []));
|
|
4060
|
+
this.flowStep = signal('questions', ...(ngDevMode ? [{ debugName: "flowStep" }] : []));
|
|
4061
|
+
this.reviewSnapshot = signal([], ...(ngDevMode ? [{ debugName: "reviewSnapshot" }] : []));
|
|
4062
|
+
this.reviewContext = signal(null, ...(ngDevMode ? [{ debugName: "reviewContext" }] : []));
|
|
4063
|
+
this.submitResult = signal(null, ...(ngDevMode ? [{ debugName: "submitResult" }] : []));
|
|
4064
|
+
this.canNavigatePrevious = signal(false, ...(ngDevMode ? [{ debugName: "canNavigatePrevious" }] : []));
|
|
4065
|
+
this.canNavigateNext = signal(false, ...(ngDevMode ? [{ debugName: "canNavigateNext" }] : []));
|
|
4066
|
+
this.showNavigationButtons = signal(false, ...(ngDevMode ? [{ debugName: "showNavigationButtons" }] : []));
|
|
4067
|
+
this.isLastStep = signal(false, ...(ngDevMode ? [{ debugName: "isLastStep" }] : []));
|
|
4068
|
+
this.areAllRequiredQuestionsAnswered = signal(false, ...(ngDevMode ? [{ debugName: "areAllRequiredQuestionsAnswered" }] : []));
|
|
3699
4069
|
//#endregion
|
|
3700
4070
|
//#region ---- View References ----
|
|
3701
|
-
this.
|
|
4071
|
+
this.viewer = viewChild('viewer', ...(ngDevMode ? [{ debugName: "viewer" }] : []));
|
|
3702
4072
|
//#endregion
|
|
3703
4073
|
//#region ---- Computed ----
|
|
3704
|
-
this.viewerViewModel = computed(() => this.
|
|
4074
|
+
this.viewerViewModel = computed(() => this.viewer()?.viewmodel, ...(ngDevMode ? [{ debugName: "viewerViewModel" }] : []));
|
|
3705
4075
|
this.totalQuestionsCount = computed(() => this.viewerViewModel()?.totalQuestionsCount() ?? 0, ...(ngDevMode ? [{ debugName: "totalQuestionsCount" }] : []));
|
|
3706
|
-
this.totalSectionsCount = computed(() => this.viewerViewModel()?.totalSectionsCount() ?? 0, ...(ngDevMode ? [{ debugName: "totalSectionsCount" }] : []));
|
|
3707
4076
|
this.showTimer = computed(() => this.viewerViewModel()?.showTimer() ?? false, ...(ngDevMode ? [{ debugName: "showTimer" }] : []));
|
|
3708
4077
|
this.timerTimeLimit = computed(() => this.viewerViewModel()?.timerTimeLimit(), ...(ngDevMode ? [{ debugName: "timerTimeLimit" }] : []));
|
|
3709
4078
|
this.timerElapsed = computed(() => this.viewerViewModel()?.timerElapsed() ?? 0, ...(ngDevMode ? [{ debugName: "timerElapsed" }] : []));
|
|
3710
4079
|
this.showProgressBar = computed(() => this.viewerViewModel()?.showProgressBar() ?? false, ...(ngDevMode ? [{ debugName: "showProgressBar" }] : []));
|
|
3711
4080
|
this.answeredQuestionsCount = computed(() => this.viewerViewModel()?.answeredQuestionsCount() ?? 0, ...(ngDevMode ? [{ debugName: "answeredQuestionsCount" }] : []));
|
|
3712
4081
|
this.isReadonly = computed(() => this.viewerConfig()?.readonly ?? false, ...(ngDevMode ? [{ debugName: "isReadonly" }] : []));
|
|
3713
|
-
this.
|
|
3714
|
-
|
|
3715
|
-
this.
|
|
3716
|
-
|
|
3717
|
-
|
|
4082
|
+
this.showReviewButton = computed(() => this.isLastStep() && (this.prePostConfig()?.postReviewEnabled ?? false) && this.flowStep() === 'questions', ...(ngDevMode ? [{ debugName: "showReviewButton" }] : []));
|
|
4083
|
+
/** Use answers from review context when returning from review; otherwise use initial answers. */
|
|
4084
|
+
this.effectiveInitialAnswers = computed(() => {
|
|
4085
|
+
const ctx = this.reviewContext();
|
|
4086
|
+
if (!ctx)
|
|
4087
|
+
return this.initialAnswers();
|
|
4088
|
+
return ctx.answers ?? ctx;
|
|
4089
|
+
}, ...(ngDevMode ? [{ debugName: "effectiveInitialAnswers" }] : []));
|
|
3718
4090
|
effect(() => {
|
|
3719
|
-
const
|
|
3720
|
-
if (
|
|
3721
|
-
const vm =
|
|
4091
|
+
const v = this.viewer();
|
|
4092
|
+
if (v) {
|
|
4093
|
+
const vm = v.viewmodel;
|
|
3722
4094
|
this.canNavigatePrevious.set(vm.canNavigatePrevious());
|
|
3723
4095
|
this.canNavigateNext.set(vm.canNavigateNext());
|
|
3724
|
-
const viewMode =
|
|
4096
|
+
const viewMode = v.viewMode;
|
|
3725
4097
|
this.showNavigationButtons.set(viewMode === 'page-per-group' || viewMode === 'page-per-question' || viewMode === 'side-menu');
|
|
3726
|
-
this.isLastStep.set(
|
|
3727
|
-
this.areAllRequiredQuestionsAnswered.set(
|
|
4098
|
+
this.isLastStep.set(v.isLastStep);
|
|
4099
|
+
this.areAllRequiredQuestionsAnswered.set(v.areAllRequiredQuestionsAnswered);
|
|
3728
4100
|
}
|
|
3729
4101
|
});
|
|
3730
4102
|
}
|
|
@@ -3763,8 +4135,12 @@ class AXMQuestionnaireViewerStandalonePageComponent {
|
|
|
3763
4135
|
return;
|
|
3764
4136
|
}
|
|
3765
4137
|
const answers = session.answers ?? {};
|
|
4138
|
+
const cfg = toPrePostConfig(questionnaire);
|
|
4139
|
+
this.questionnaire.set(questionnaire);
|
|
3766
4140
|
this.structure.set(questionnaire.structure);
|
|
3767
4141
|
this.initialAnswers.set(answers);
|
|
4142
|
+
this.prePostConfig.set(cfg);
|
|
4143
|
+
this.flowStep.set(cfg?.preEnabled === true ? 'pre' : 'questions');
|
|
3768
4144
|
this.viewerConfig.set({ readonly: false });
|
|
3769
4145
|
}
|
|
3770
4146
|
catch (err) {
|
|
@@ -3775,32 +4151,107 @@ class AXMQuestionnaireViewerStandalonePageComponent {
|
|
|
3775
4151
|
}
|
|
3776
4152
|
}
|
|
3777
4153
|
//#endregion
|
|
4154
|
+
//#region ---- Submit Handler ----
|
|
4155
|
+
async saveSessionAndGetSummary(answers) {
|
|
4156
|
+
const sessionId = this.route.snapshot.paramMap.get('sessionId') ?? this.route.parent?.snapshot.paramMap.get('sessionId');
|
|
4157
|
+
const structureVal = this.structure();
|
|
4158
|
+
const q = this.questionnaire();
|
|
4159
|
+
if (!sessionId || !structureVal || !q)
|
|
4160
|
+
return null;
|
|
4161
|
+
const { answeredQuestionsCount, progressPercentage } = this.calculateProgress(structureVal, answers);
|
|
4162
|
+
const session = await this.sessionService.getOne(sessionId);
|
|
4163
|
+
if (session) {
|
|
4164
|
+
await this.sessionService.updateOne(sessionId, {
|
|
4165
|
+
...session,
|
|
4166
|
+
answers,
|
|
4167
|
+
progressPercentage,
|
|
4168
|
+
answeredQuestionsCount,
|
|
4169
|
+
lastSavedAt: new Date(),
|
|
4170
|
+
});
|
|
4171
|
+
}
|
|
4172
|
+
const passingScore = q.passingScore;
|
|
4173
|
+
const passFail = passingScore != null ? (progressPercentage >= passingScore ? 'Pass' : 'Fail') : undefined;
|
|
4174
|
+
const totalQuestions = structureVal.sections?.reduce((s, sec) => s + (sec.items?.length ?? 0), 0) ?? 0;
|
|
4175
|
+
return { score: progressPercentage, passFail, totalQuestions, answeredCount: answeredQuestionsCount };
|
|
4176
|
+
}
|
|
4177
|
+
//#endregion
|
|
4178
|
+
//#region ---- Helpers ----
|
|
4179
|
+
calculateProgress(structure, answers) {
|
|
4180
|
+
if (!structure?.sections?.length)
|
|
4181
|
+
return { answeredQuestionsCount: 0, progressPercentage: 0 };
|
|
4182
|
+
let answered = 0;
|
|
4183
|
+
let total = 0;
|
|
4184
|
+
for (const section of structure.sections) {
|
|
4185
|
+
if (!section.items?.length)
|
|
4186
|
+
continue;
|
|
4187
|
+
for (const item of section.items) {
|
|
4188
|
+
total++;
|
|
4189
|
+
const value = item.id ? answers[item.id] : null;
|
|
4190
|
+
const isEmpty = value === null ||
|
|
4191
|
+
value === undefined ||
|
|
4192
|
+
value === '' ||
|
|
4193
|
+
(Array.isArray(value) && value.length === 0) ||
|
|
4194
|
+
(typeof value === 'object' && value !== null && Object.keys(value).length === 0);
|
|
4195
|
+
if (!isEmpty)
|
|
4196
|
+
answered++;
|
|
4197
|
+
}
|
|
4198
|
+
}
|
|
4199
|
+
const progressPercentage = total > 0 ? Math.round((answered / total) * 100) : 0;
|
|
4200
|
+
return { answeredQuestionsCount: answered, progressPercentage };
|
|
4201
|
+
}
|
|
4202
|
+
//#endregion
|
|
3778
4203
|
//#region ---- Event Handlers ----
|
|
3779
|
-
|
|
4204
|
+
handleReviewClick() {
|
|
4205
|
+
const viewer = this.viewer();
|
|
4206
|
+
const items = viewer?.getQuestionsWithAnswers() ?? [];
|
|
4207
|
+
const context = viewer?.getReviewContext() ?? null;
|
|
4208
|
+
this.reviewSnapshot.set(items.map((q) => ({ questionId: q.questionId, title: q.title, answer: q.answer, question: q.question })));
|
|
4209
|
+
this.reviewContext.set(context);
|
|
4210
|
+
this.flowStep.set('review');
|
|
4211
|
+
}
|
|
4212
|
+
async handleReviewSubmit() {
|
|
4213
|
+
const viewer = this.viewer();
|
|
4214
|
+
if (!viewer)
|
|
4215
|
+
return;
|
|
4216
|
+
this.isSubmitting.set(true);
|
|
4217
|
+
try {
|
|
4218
|
+
const result = await viewer.submit();
|
|
4219
|
+
if (result.success && result.answers) {
|
|
4220
|
+
const summary = await this.saveSessionAndGetSummary(result.answers);
|
|
4221
|
+
this.submitResult.set(summary ?? null);
|
|
4222
|
+
if ((this.prePostConfig()?.postSummaryEnabled ?? false) && summary) {
|
|
4223
|
+
this.flowStep.set('summary');
|
|
4224
|
+
}
|
|
4225
|
+
else {
|
|
4226
|
+
this.handleDone();
|
|
4227
|
+
}
|
|
4228
|
+
}
|
|
4229
|
+
}
|
|
4230
|
+
finally {
|
|
4231
|
+
this.isSubmitting.set(false);
|
|
4232
|
+
}
|
|
4233
|
+
}
|
|
3780
4234
|
async handlePreviousClick() {
|
|
3781
|
-
await this.
|
|
4235
|
+
await this.viewer()?.navigatePrevious();
|
|
3782
4236
|
}
|
|
3783
4237
|
async handleNextClick() {
|
|
3784
|
-
await this.
|
|
4238
|
+
await this.viewer()?.navigateNext();
|
|
3785
4239
|
}
|
|
3786
4240
|
async handleSubmitClick() {
|
|
3787
|
-
const viewer = this.
|
|
4241
|
+
const viewer = this.viewer();
|
|
3788
4242
|
if (!viewer)
|
|
3789
4243
|
return;
|
|
3790
4244
|
this.isSubmitting.set(true);
|
|
3791
4245
|
try {
|
|
3792
4246
|
const result = await viewer.submit();
|
|
3793
4247
|
if (result.success && result.answers) {
|
|
3794
|
-
const
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
lastSavedAt: new Date(),
|
|
3802
|
-
});
|
|
3803
|
-
}
|
|
4248
|
+
const summary = await this.saveSessionAndGetSummary(result.answers);
|
|
4249
|
+
this.submitResult.set(summary ?? null);
|
|
4250
|
+
if (this.prePostConfig()?.postSummaryEnabled && summary) {
|
|
4251
|
+
this.flowStep.set('summary');
|
|
4252
|
+
}
|
|
4253
|
+
else {
|
|
4254
|
+
this.handleDone();
|
|
3804
4255
|
}
|
|
3805
4256
|
}
|
|
3806
4257
|
}
|
|
@@ -3808,8 +4259,11 @@ class AXMQuestionnaireViewerStandalonePageComponent {
|
|
|
3808
4259
|
this.isSubmitting.set(false);
|
|
3809
4260
|
}
|
|
3810
4261
|
}
|
|
4262
|
+
handleDone() {
|
|
4263
|
+
// Standalone: could navigate away or show message
|
|
4264
|
+
}
|
|
3811
4265
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMQuestionnaireViewerStandalonePageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3812
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AXMQuestionnaireViewerStandalonePageComponent, isStandalone: true, selector: "axm-questionnaire-viewer-standalone-page", host: { classAttribute: "axm-questionnaire-viewer-standalone-page" }, providers: [AXPWidgetCoreService, AXPWidgetCoreContextStore], viewQueries: [{ propertyName: "
|
|
4266
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AXMQuestionnaireViewerStandalonePageComponent, isStandalone: true, selector: "axm-questionnaire-viewer-standalone-page", host: { classAttribute: "axm-questionnaire-viewer-standalone-page" }, providers: [AXPWidgetCoreService, AXPWidgetCoreContextStore], viewQueries: [{ propertyName: "viewer", first: true, predicate: ["viewer"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
3813
4267
|
<div class="__standalone ax-min-h-screen ax-flex ax-flex-col ax-bg-neutral-50">
|
|
3814
4268
|
@if (isLoading()) {
|
|
3815
4269
|
<div class="ax-flex ax-items-center ax-justify-center ax-flex-1 ax-min-h-[200px]">
|
|
@@ -3821,89 +4275,102 @@ class AXMQuestionnaireViewerStandalonePageComponent {
|
|
|
3821
4275
|
</div>
|
|
3822
4276
|
} @else if (structure()) {
|
|
3823
4277
|
<div class="__main-container ax-flex-1 ax-flex ax-flex-col ax-max-w-4xl ax-mx-auto ax-w-full ax-p-4">
|
|
3824
|
-
|
|
3825
|
-
<
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
(valueChange)="viewerViewModel()!.updateTimerElapsed($event)"
|
|
3850
|
-
>
|
|
3851
|
-
</axp-stopwatch>
|
|
3852
|
-
</div>
|
|
3853
|
-
}
|
|
3854
|
-
</div>
|
|
3855
|
-
</div>
|
|
3856
|
-
|
|
3857
|
-
<div class="__content-wrapper ax-flex-1 ax-min-h-0">
|
|
3858
|
-
<axm-questionnaire-viewer
|
|
3859
|
-
#viewer
|
|
3860
|
-
[structure]="structure()!"
|
|
3861
|
-
[config]="viewerConfig()"
|
|
3862
|
-
[initialAnswers]="initialAnswers()"
|
|
3863
|
-
(answersChanged)="handleAnswersChanged($event)"
|
|
4278
|
+
@if (flowStep() === 'pre') {
|
|
4279
|
+
<axm-pre-questionnaire-content
|
|
4280
|
+
[content]="prePostConfig()?.preContent"
|
|
4281
|
+
></axm-pre-questionnaire-content>
|
|
4282
|
+
} @else if (flowStep() === 'summary') {
|
|
4283
|
+
<axm-post-questionnaire-content
|
|
4284
|
+
mode="summary"
|
|
4285
|
+
[summaryContent]="prePostConfig()?.postSummaryContent"
|
|
4286
|
+
[placeholderValues]="submitResult()"
|
|
4287
|
+
></axm-post-questionnaire-content>
|
|
4288
|
+
} @else {
|
|
4289
|
+
@if (flowStep() === 'review') {
|
|
4290
|
+
<axm-post-questionnaire-content
|
|
4291
|
+
mode="review"
|
|
4292
|
+
[questionsWithAnswers]="reviewSnapshot()"
|
|
4293
|
+
[reviewContext]="reviewContext()"
|
|
4294
|
+
></axm-post-questionnaire-content>
|
|
4295
|
+
}
|
|
4296
|
+
<div
|
|
4297
|
+
class="__questions ax-flex ax-flex-col ax-min-h-full"
|
|
4298
|
+
[class.ax-invisible]="flowStep() === 'review'"
|
|
4299
|
+
[style.position]="flowStep() === 'review' ? 'fixed' : null"
|
|
4300
|
+
[style.left]="flowStep() === 'review' ? '-9999px' : null"
|
|
4301
|
+
[class.ax-size-0]="flowStep() === 'review'"
|
|
4302
|
+
[class.ax-overflow-hidden]="flowStep() === 'review'"
|
|
3864
4303
|
>
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
4304
|
+
<div class="__header ax-p-4 ax-border-b">
|
|
4305
|
+
<div class="ax-flex ax-justify-between ax-items-center">
|
|
4306
|
+
<div class="ax-flex ax-items-center ax-gap-4 ax-text-sm ax-text-neutral-600">
|
|
4307
|
+
@if (totalQuestionsCount() > 0) {
|
|
4308
|
+
<span><i class="fa-light fa-list-check ax-text-primary-600"></i> {{ totalQuestionsCount() }} {{ totalQuestionsCount() === 1 ? 'Question' : 'Questions' }}</span>
|
|
4309
|
+
}
|
|
4310
|
+
@if (showTimer()) {
|
|
4311
|
+
<axp-stopwatch
|
|
4312
|
+
[mode]="'count-down'"
|
|
4313
|
+
[timeLimit]="timerTimeLimit()"
|
|
4314
|
+
[format]="timerTimeLimit() && timerTimeLimit()! >= 3600 ? 'hh:mm:ss' : 'mm:ss'"
|
|
4315
|
+
[autoStart]="true"
|
|
4316
|
+
[showControls]="false"
|
|
4317
|
+
[value]="timerElapsed()"
|
|
4318
|
+
(valueChange)="viewerViewModel()!.updateTimerElapsed($event)"
|
|
4319
|
+
></axp-stopwatch>
|
|
4320
|
+
}
|
|
4321
|
+
</div>
|
|
4322
|
+
</div>
|
|
4323
|
+
</div>
|
|
4324
|
+
<div class="__content ax-flex-1 ax-min-h-0">
|
|
4325
|
+
<axm-questionnaire-viewer
|
|
4326
|
+
#viewer
|
|
4327
|
+
[structure]="structure()!"
|
|
4328
|
+
[config]="viewerConfig()"
|
|
4329
|
+
[initialAnswers]="effectiveInitialAnswers()"
|
|
4330
|
+
></axm-questionnaire-viewer>
|
|
4331
|
+
</div>
|
|
3873
4332
|
</div>
|
|
3874
|
-
|
|
4333
|
+
}
|
|
4334
|
+
</div>
|
|
4335
|
+
}
|
|
4336
|
+
@if (structure() && (flowStep() === 'pre' || flowStep() === 'questions' || flowStep() === 'review' || flowStep() === 'summary')) {
|
|
4337
|
+
<ax-footer class="ax-flex ax-items-center ax-justify-between ax-gap-4 ax-py-4 ax-mt-4 ax-px-4 ax-border-t ax-border-neutral-200">
|
|
4338
|
+
<ax-prefix>
|
|
4339
|
+
@if (flowStep() === 'questions') {
|
|
4340
|
+
<div class="ax-text-sm ax-font-mono ax-tabular-nums ax-text-neutral-600">
|
|
4341
|
+
@if (showProgressBar()) {
|
|
4342
|
+
{{ answeredQuestionsCount() }} / {{ totalQuestionsCount() }}
|
|
4343
|
+
}
|
|
4344
|
+
</div>
|
|
4345
|
+
}
|
|
4346
|
+
</ax-prefix>
|
|
4347
|
+
<ax-suffix>
|
|
4348
|
+
@if (flowStep() === 'pre') {
|
|
4349
|
+
<ax-button look="solid" color="primary" [text]="'@assessment-management:questionnaires.components.questionnaire-viewer.flow.start' | translate | async" (onClick)="flowStep.set('questions')"></ax-button>
|
|
4350
|
+
} @else if (flowStep() === 'questions') {
|
|
3875
4351
|
@if (showNavigationButtons()) {
|
|
3876
|
-
<ax-button
|
|
3877
|
-
look="solid"
|
|
3878
|
-
[disabled]="!canNavigatePrevious()"
|
|
3879
|
-
[text]="'@general:actions.previous.title' | translate | async"
|
|
3880
|
-
(onClick)="handlePreviousClick()"
|
|
3881
|
-
></ax-button>
|
|
4352
|
+
<ax-button look="solid" [disabled]="!canNavigatePrevious()" [text]="'@general:actions.previous.title' | translate | async" (onClick)="handlePreviousClick()"></ax-button>
|
|
3882
4353
|
@if (!isLastStep()) {
|
|
3883
|
-
<ax-button
|
|
3884
|
-
look="solid"
|
|
3885
|
-
color="primary"
|
|
3886
|
-
[disabled]="!canNavigateNext()"
|
|
3887
|
-
[text]="'@general:actions.next.title' | translate | async"
|
|
3888
|
-
(onClick)="handleNextClick()"
|
|
3889
|
-
></ax-button>
|
|
4354
|
+
<ax-button look="solid" color="primary" [disabled]="!canNavigateNext()" [text]="'@general:actions.next.title' | translate | async" (onClick)="handleNextClick()"></ax-button>
|
|
3890
4355
|
}
|
|
3891
4356
|
}
|
|
3892
|
-
@if (isLastStep()) {
|
|
3893
|
-
<ax-button
|
|
3894
|
-
look="solid"
|
|
3895
|
-
color="primary"
|
|
3896
|
-
[text]="'@general:actions.submit.title' | translate | async"
|
|
3897
|
-
[disabled]="isReadonly() || isSubmitting() || !areAllRequiredQuestionsAnswered()"
|
|
3898
|
-
(onClick)="handleSubmitClick()"
|
|
3899
|
-
></ax-button>
|
|
4357
|
+
@if (isLastStep() && showReviewButton()) {
|
|
4358
|
+
<ax-button look="solid" color="primary" [text]="'@assessment-management:questionnaires.components.questionnaire-viewer.flow.review' | translate | async" [disabled]="!areAllRequiredQuestionsAnswered()" (onClick)="handleReviewClick()"></ax-button>
|
|
3900
4359
|
}
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
4360
|
+
@if (isLastStep() && !showReviewButton()) {
|
|
4361
|
+
<ax-button look="solid" color="primary" [text]="'@general:actions.submit.title' | translate | async" [disabled]="isReadonly() || isSubmitting() || !areAllRequiredQuestionsAnswered()" (onClick)="handleSubmitClick()"></ax-button>
|
|
4362
|
+
}
|
|
4363
|
+
} @else if (flowStep() === 'review') {
|
|
4364
|
+
<ax-button look="outline" [text]="'@assessment-management:questionnaires.components.questionnaire-viewer.flow.edit' | translate | async" (onClick)="flowStep.set('questions')"></ax-button>
|
|
4365
|
+
<ax-button look="solid" color="primary" [text]="'@general:actions.submit.title' | translate | async" [disabled]="isSubmitting()" (onClick)="handleReviewSubmit()"></ax-button>
|
|
4366
|
+
} @else if (flowStep() === 'summary') {
|
|
4367
|
+
<ax-button look="solid" color="primary" [text]="'@assessment-management:questionnaires.components.questionnaire-viewer.flow.done' | translate | async" (onClick)="handleDone()"></ax-button>
|
|
4368
|
+
}
|
|
4369
|
+
</ax-suffix>
|
|
4370
|
+
</ax-footer>
|
|
3904
4371
|
}
|
|
3905
4372
|
</div>
|
|
3906
|
-
`, isInline: true, styles: ["axm-questionnaire-viewer-popup{display:flex;height:100%;flex-direction:column;overflow:hidden;max-height:80vh}axm-questionnaire-viewer-popup .__main-container{display:flex;min-height:0px;flex:1 1 0%;flex-direction:column;overflow:hidden}axm-questionnaire-viewer-popup .__header{display:flex;flex-shrink:0;flex-direction:column;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));border-bottom-width:1px;--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity, 1));background-color:#fff;backdrop-filter:blur(8px)}axm-questionnaire-viewer-popup .__header .__header-top{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.75rem 1rem}axm-questionnaire-viewer-popup .__header .__header-top .__header-meta{display:flex;align-items:center;gap:1rem;font-size:.75rem;line-height:1rem;--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}axm-questionnaire-viewer-popup .__header .__header-top .__header-meta .__meta-item{display:flex;align-items:center;gap:.375rem}axm-questionnaire-viewer-popup .__header .__header-top .__header-meta .__meta-item i{font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-primary-600),var(--tw-text-opacity, 1))}axm-questionnaire-viewer-popup .__header .__header-top .__header-meta .__meta-item span{font-weight:500}axm-questionnaire-viewer-popup .__header .__header-top .__header-timer{display:flex;flex-shrink:0;align-items:center}axm-questionnaire-viewer-popup .__content-wrapper{display:flex;min-height:0px;flex:1 1 0%;overflow:hidden}axm-questionnaire-viewer-popup axm-questionnaire-viewer{display:flex;height:100%;flex:1 1 0%;overflow:hidden}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1$3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: AXMQuestionnaireViewerComponent, selector: "axm-questionnaire-viewer", inputs: ["questionnaireId", "structure", "config", "initialAnswers"], outputs: ["answersChanged", "questionAnswered"] }, { kind: "component", type:
|
|
4373
|
+
`, isInline: true, styles: ["axm-questionnaire-viewer-popup{display:flex;height:100%;flex-direction:column;overflow:hidden;max-height:80vh}axm-questionnaire-viewer-popup .__main-container{display:flex;min-height:0px;flex:1 1 0%;flex-direction:column;overflow:hidden}axm-questionnaire-viewer-popup .__header{display:flex;flex-shrink:0;flex-direction:column;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));border-bottom-width:1px;--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity, 1));background-color:#fff;backdrop-filter:blur(8px)}axm-questionnaire-viewer-popup .__header .__header-top{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.75rem 1rem}axm-questionnaire-viewer-popup .__header .__header-top .__header-meta{display:flex;align-items:center;gap:1rem;font-size:.75rem;line-height:1rem;--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}axm-questionnaire-viewer-popup .__header .__header-top .__header-meta .__meta-item{display:flex;align-items:center;gap:.375rem}axm-questionnaire-viewer-popup .__header .__header-top .__header-meta .__meta-item i{font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-primary-600),var(--tw-text-opacity, 1))}axm-questionnaire-viewer-popup .__header .__header-top .__header-meta .__meta-item span{font-weight:500}axm-questionnaire-viewer-popup .__header .__header-top .__header-timer{display:flex;flex-shrink:0;align-items:center}axm-questionnaire-viewer-popup .__content-wrapper{display:flex;min-height:0px;flex:1 1 0%;overflow:hidden}axm-questionnaire-viewer-popup axm-questionnaire-viewer{display:flex;height:100%;flex:1 1 0%;overflow:hidden}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1$3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: AXPStopwatchComponent, selector: "axp-stopwatch", inputs: ["mode", "timeLimit", "format", "autoStart", "showControls", "value"], outputs: ["valueChange", "timeUp"] }, { kind: "component", type: AXMQuestionnaireViewerComponent, selector: "axm-questionnaire-viewer", inputs: ["questionnaireId", "structure", "config", "initialAnswers"], outputs: ["answersChanged", "questionAnswered"] }, { kind: "component", type: AXMPreQuestionnaireContentComponent, selector: "axm-pre-questionnaire-content", inputs: ["content", "locale"] }, { kind: "component", type: AXMPostQuestionnaireContentComponent, selector: "axm-post-questionnaire-content", inputs: ["mode", "questionsWithAnswers", "reviewContext", "summaryContent", "placeholderValues", "locale"] }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
3907
4374
|
}
|
|
3908
4375
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMQuestionnaireViewerStandalonePageComponent, decorators: [{
|
|
3909
4376
|
type: Component,
|
|
@@ -3919,86 +4386,99 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
3919
4386
|
</div>
|
|
3920
4387
|
} @else if (structure()) {
|
|
3921
4388
|
<div class="__main-container ax-flex-1 ax-flex ax-flex-col ax-max-w-4xl ax-mx-auto ax-w-full ax-p-4">
|
|
3922
|
-
|
|
3923
|
-
<
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
(valueChange)="viewerViewModel()!.updateTimerElapsed($event)"
|
|
3948
|
-
>
|
|
3949
|
-
</axp-stopwatch>
|
|
3950
|
-
</div>
|
|
3951
|
-
}
|
|
3952
|
-
</div>
|
|
3953
|
-
</div>
|
|
3954
|
-
|
|
3955
|
-
<div class="__content-wrapper ax-flex-1 ax-min-h-0">
|
|
3956
|
-
<axm-questionnaire-viewer
|
|
3957
|
-
#viewer
|
|
3958
|
-
[structure]="structure()!"
|
|
3959
|
-
[config]="viewerConfig()"
|
|
3960
|
-
[initialAnswers]="initialAnswers()"
|
|
3961
|
-
(answersChanged)="handleAnswersChanged($event)"
|
|
4389
|
+
@if (flowStep() === 'pre') {
|
|
4390
|
+
<axm-pre-questionnaire-content
|
|
4391
|
+
[content]="prePostConfig()?.preContent"
|
|
4392
|
+
></axm-pre-questionnaire-content>
|
|
4393
|
+
} @else if (flowStep() === 'summary') {
|
|
4394
|
+
<axm-post-questionnaire-content
|
|
4395
|
+
mode="summary"
|
|
4396
|
+
[summaryContent]="prePostConfig()?.postSummaryContent"
|
|
4397
|
+
[placeholderValues]="submitResult()"
|
|
4398
|
+
></axm-post-questionnaire-content>
|
|
4399
|
+
} @else {
|
|
4400
|
+
@if (flowStep() === 'review') {
|
|
4401
|
+
<axm-post-questionnaire-content
|
|
4402
|
+
mode="review"
|
|
4403
|
+
[questionsWithAnswers]="reviewSnapshot()"
|
|
4404
|
+
[reviewContext]="reviewContext()"
|
|
4405
|
+
></axm-post-questionnaire-content>
|
|
4406
|
+
}
|
|
4407
|
+
<div
|
|
4408
|
+
class="__questions ax-flex ax-flex-col ax-min-h-full"
|
|
4409
|
+
[class.ax-invisible]="flowStep() === 'review'"
|
|
4410
|
+
[style.position]="flowStep() === 'review' ? 'fixed' : null"
|
|
4411
|
+
[style.left]="flowStep() === 'review' ? '-9999px' : null"
|
|
4412
|
+
[class.ax-size-0]="flowStep() === 'review'"
|
|
4413
|
+
[class.ax-overflow-hidden]="flowStep() === 'review'"
|
|
3962
4414
|
>
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
4415
|
+
<div class="__header ax-p-4 ax-border-b">
|
|
4416
|
+
<div class="ax-flex ax-justify-between ax-items-center">
|
|
4417
|
+
<div class="ax-flex ax-items-center ax-gap-4 ax-text-sm ax-text-neutral-600">
|
|
4418
|
+
@if (totalQuestionsCount() > 0) {
|
|
4419
|
+
<span><i class="fa-light fa-list-check ax-text-primary-600"></i> {{ totalQuestionsCount() }} {{ totalQuestionsCount() === 1 ? 'Question' : 'Questions' }}</span>
|
|
4420
|
+
}
|
|
4421
|
+
@if (showTimer()) {
|
|
4422
|
+
<axp-stopwatch
|
|
4423
|
+
[mode]="'count-down'"
|
|
4424
|
+
[timeLimit]="timerTimeLimit()"
|
|
4425
|
+
[format]="timerTimeLimit() && timerTimeLimit()! >= 3600 ? 'hh:mm:ss' : 'mm:ss'"
|
|
4426
|
+
[autoStart]="true"
|
|
4427
|
+
[showControls]="false"
|
|
4428
|
+
[value]="timerElapsed()"
|
|
4429
|
+
(valueChange)="viewerViewModel()!.updateTimerElapsed($event)"
|
|
4430
|
+
></axp-stopwatch>
|
|
4431
|
+
}
|
|
4432
|
+
</div>
|
|
4433
|
+
</div>
|
|
4434
|
+
</div>
|
|
4435
|
+
<div class="__content ax-flex-1 ax-min-h-0">
|
|
4436
|
+
<axm-questionnaire-viewer
|
|
4437
|
+
#viewer
|
|
4438
|
+
[structure]="structure()!"
|
|
4439
|
+
[config]="viewerConfig()"
|
|
4440
|
+
[initialAnswers]="effectiveInitialAnswers()"
|
|
4441
|
+
></axm-questionnaire-viewer>
|
|
4442
|
+
</div>
|
|
3971
4443
|
</div>
|
|
3972
|
-
|
|
4444
|
+
}
|
|
4445
|
+
</div>
|
|
4446
|
+
}
|
|
4447
|
+
@if (structure() && (flowStep() === 'pre' || flowStep() === 'questions' || flowStep() === 'review' || flowStep() === 'summary')) {
|
|
4448
|
+
<ax-footer class="ax-flex ax-items-center ax-justify-between ax-gap-4 ax-py-4 ax-mt-4 ax-px-4 ax-border-t ax-border-neutral-200">
|
|
4449
|
+
<ax-prefix>
|
|
4450
|
+
@if (flowStep() === 'questions') {
|
|
4451
|
+
<div class="ax-text-sm ax-font-mono ax-tabular-nums ax-text-neutral-600">
|
|
4452
|
+
@if (showProgressBar()) {
|
|
4453
|
+
{{ answeredQuestionsCount() }} / {{ totalQuestionsCount() }}
|
|
4454
|
+
}
|
|
4455
|
+
</div>
|
|
4456
|
+
}
|
|
4457
|
+
</ax-prefix>
|
|
4458
|
+
<ax-suffix>
|
|
4459
|
+
@if (flowStep() === 'pre') {
|
|
4460
|
+
<ax-button look="solid" color="primary" [text]="'@assessment-management:questionnaires.components.questionnaire-viewer.flow.start' | translate | async" (onClick)="flowStep.set('questions')"></ax-button>
|
|
4461
|
+
} @else if (flowStep() === 'questions') {
|
|
3973
4462
|
@if (showNavigationButtons()) {
|
|
3974
|
-
<ax-button
|
|
3975
|
-
look="solid"
|
|
3976
|
-
[disabled]="!canNavigatePrevious()"
|
|
3977
|
-
[text]="'@general:actions.previous.title' | translate | async"
|
|
3978
|
-
(onClick)="handlePreviousClick()"
|
|
3979
|
-
></ax-button>
|
|
4463
|
+
<ax-button look="solid" [disabled]="!canNavigatePrevious()" [text]="'@general:actions.previous.title' | translate | async" (onClick)="handlePreviousClick()"></ax-button>
|
|
3980
4464
|
@if (!isLastStep()) {
|
|
3981
|
-
<ax-button
|
|
3982
|
-
look="solid"
|
|
3983
|
-
color="primary"
|
|
3984
|
-
[disabled]="!canNavigateNext()"
|
|
3985
|
-
[text]="'@general:actions.next.title' | translate | async"
|
|
3986
|
-
(onClick)="handleNextClick()"
|
|
3987
|
-
></ax-button>
|
|
4465
|
+
<ax-button look="solid" color="primary" [disabled]="!canNavigateNext()" [text]="'@general:actions.next.title' | translate | async" (onClick)="handleNextClick()"></ax-button>
|
|
3988
4466
|
}
|
|
3989
4467
|
}
|
|
3990
|
-
@if (isLastStep()) {
|
|
3991
|
-
<ax-button
|
|
3992
|
-
look="solid"
|
|
3993
|
-
color="primary"
|
|
3994
|
-
[text]="'@general:actions.submit.title' | translate | async"
|
|
3995
|
-
[disabled]="isReadonly() || isSubmitting() || !areAllRequiredQuestionsAnswered()"
|
|
3996
|
-
(onClick)="handleSubmitClick()"
|
|
3997
|
-
></ax-button>
|
|
4468
|
+
@if (isLastStep() && showReviewButton()) {
|
|
4469
|
+
<ax-button look="solid" color="primary" [text]="'@assessment-management:questionnaires.components.questionnaire-viewer.flow.review' | translate | async" [disabled]="!areAllRequiredQuestionsAnswered()" (onClick)="handleReviewClick()"></ax-button>
|
|
3998
4470
|
}
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4471
|
+
@if (isLastStep() && !showReviewButton()) {
|
|
4472
|
+
<ax-button look="solid" color="primary" [text]="'@general:actions.submit.title' | translate | async" [disabled]="isReadonly() || isSubmitting() || !areAllRequiredQuestionsAnswered()" (onClick)="handleSubmitClick()"></ax-button>
|
|
4473
|
+
}
|
|
4474
|
+
} @else if (flowStep() === 'review') {
|
|
4475
|
+
<ax-button look="outline" [text]="'@assessment-management:questionnaires.components.questionnaire-viewer.flow.edit' | translate | async" (onClick)="flowStep.set('questions')"></ax-button>
|
|
4476
|
+
<ax-button look="solid" color="primary" [text]="'@general:actions.submit.title' | translate | async" [disabled]="isSubmitting()" (onClick)="handleReviewSubmit()"></ax-button>
|
|
4477
|
+
} @else if (flowStep() === 'summary') {
|
|
4478
|
+
<ax-button look="solid" color="primary" [text]="'@assessment-management:questionnaires.components.questionnaire-viewer.flow.done' | translate | async" (onClick)="handleDone()"></ax-button>
|
|
4479
|
+
}
|
|
4480
|
+
</ax-suffix>
|
|
4481
|
+
</ax-footer>
|
|
4002
4482
|
}
|
|
4003
4483
|
</div>
|
|
4004
4484
|
`, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
@@ -4007,14 +4487,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
4007
4487
|
AXDecoratorModule,
|
|
4008
4488
|
AXTranslationModule,
|
|
4009
4489
|
AXPWidgetCoreModule,
|
|
4010
|
-
AXMQuestionnaireViewerComponent,
|
|
4011
4490
|
AXPStopwatchComponent,
|
|
4491
|
+
AXMQuestionnaireViewerComponent,
|
|
4492
|
+
AXMPreQuestionnaireContentComponent,
|
|
4493
|
+
AXMPostQuestionnaireContentComponent,
|
|
4012
4494
|
], providers: [AXPWidgetCoreService, AXPWidgetCoreContextStore], encapsulation: ViewEncapsulation.None, host: { class: 'axm-questionnaire-viewer-standalone-page' }, styles: ["axm-questionnaire-viewer-popup{display:flex;height:100%;flex-direction:column;overflow:hidden;max-height:80vh}axm-questionnaire-viewer-popup .__main-container{display:flex;min-height:0px;flex:1 1 0%;flex-direction:column;overflow:hidden}axm-questionnaire-viewer-popup .__header{display:flex;flex-shrink:0;flex-direction:column;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));border-bottom-width:1px;--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity, 1));background-color:#fff;backdrop-filter:blur(8px)}axm-questionnaire-viewer-popup .__header .__header-top{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.75rem 1rem}axm-questionnaire-viewer-popup .__header .__header-top .__header-meta{display:flex;align-items:center;gap:1rem;font-size:.75rem;line-height:1rem;--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity, 1))}axm-questionnaire-viewer-popup .__header .__header-top .__header-meta .__meta-item{display:flex;align-items:center;gap:.375rem}axm-questionnaire-viewer-popup .__header .__header-top .__header-meta .__meta-item i{font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-primary-600),var(--tw-text-opacity, 1))}axm-questionnaire-viewer-popup .__header .__header-top .__header-meta .__meta-item span{font-weight:500}axm-questionnaire-viewer-popup .__header .__header-top .__header-timer{display:flex;flex-shrink:0;align-items:center}axm-questionnaire-viewer-popup .__content-wrapper{display:flex;min-height:0px;flex:1 1 0%;overflow:hidden}axm-questionnaire-viewer-popup axm-questionnaire-viewer{display:flex;height:100%;flex:1 1 0%;overflow:hidden}\n"] }]
|
|
4013
|
-
}], ctorParameters: () => [], propDecorators: {
|
|
4495
|
+
}], ctorParameters: () => [], propDecorators: { viewer: [{ type: i0.ViewChild, args: ['viewer', { isSignal: true }] }] } });
|
|
4014
4496
|
|
|
4015
4497
|
/**
|
|
4016
4498
|
* Generated bundle index. Do not edit.
|
|
4017
4499
|
*/
|
|
4018
4500
|
|
|
4019
|
-
export { AXMQuestionnaireService as A, RootConfig as R, AXMAssessmentSessionService as a, AXMAssessmentCaseService as b, AXMQuestionBankItemService as c, AXMQuestionnaireViewerComponent as d,
|
|
4020
|
-
//# sourceMappingURL=acorex-modules-assessment-management-acorex-modules-assessment-management-
|
|
4501
|
+
export { AXMQuestionnaireService as A, RootConfig as R, AXMAssessmentSessionService as a, AXMAssessmentCaseService as b, AXMQuestionBankItemService as c, AXMQuestionnaireViewerComponent as d, AXMPreQuestionnaireContentComponent as e, AXMPostQuestionnaireContentComponent as f, AXMAssessmentManagementEntityProvider as g, AXMAssessmentManagementFeatureDefinitionProvider as h, AXMAssessmentManagementFeatureKeys as i, AXMAssessmentManagementMenuProvider as j, AXPAssessmentManagementMenuKeys as k, AXMAssessmentManagementPermissionDefinitionProvider as l, AXMAssessmentManagementPermissionKeys as m, AXMAssessmentManagementSearchCommandProvider as n, AXMAssessmentManagementModule as o, AXMQuestionBankItemServiceImpl as p, AXMQuestionnaireServiceImpl as q, AXMAssessmentCaseServiceImpl as r, AXMAssessmentSessionServiceImpl as s, toPrePostConfig as t, AXMQuestionnaireViewerPageComponent as u, AXMQuestionnaireViewerStandalonePageComponent as v };
|
|
4502
|
+
//# sourceMappingURL=acorex-modules-assessment-management-acorex-modules-assessment-management-HgaOIA2U.mjs.map
|