@acorex-platform/module-assessment-management-client 2.0.0-next.13 → 2.0.0-next.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/{acorex-platform-module-assessment-management-client-acorex-platform-module-assessment-management-client-5wbq3eEn.mjs → acorex-platform-module-assessment-management-client-acorex-platform-module-assessment-management-client-B1yNgUHo.mjs} +69 -67
- package/fesm2022/acorex-platform-module-assessment-management-client-acorex-platform-module-assessment-management-client-B1yNgUHo.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-assessment-management-client-assessment-session-answers-view.util-D5gUv0HJ.mjs → acorex-platform-module-assessment-management-client-assessment-session-answers-view.util-42ZcOY2C.mjs} +4 -4
- package/fesm2022/acorex-platform-module-assessment-management-client-assessment-session-answers-view.util-42ZcOY2C.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-assessment-management-client-assessment-voice.commands-C05ceRIS.mjs → acorex-platform-module-assessment-management-client-assessment-voice.commands-BSQkFj76.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-assessment-management-client-assessment-voice.commands-C05ceRIS.mjs.map → acorex-platform-module-assessment-management-client-assessment-voice.commands-BSQkFj76.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entities-assessment-session.mjs +1 -1
- package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entities-assessment-session.mjs.map +1 -1
- package/fesm2022/{acorex-platform-module-assessment-management-client-contracts-entity-catalog-acorex-platform-module-assessment-management-client-contracts-entity-catalog-CgUoWW8B.mjs → acorex-platform-module-assessment-management-client-contracts-entity-catalog-acorex-platform-module-assessment-management-client-contracts-entity-catalog-Buqp2FnP.mjs} +6 -6
- package/fesm2022/{acorex-platform-module-assessment-management-client-contracts-entity-catalog-acorex-platform-module-assessment-management-client-contracts-entity-catalog-CgUoWW8B.mjs.map → acorex-platform-module-assessment-management-client-contracts-entity-catalog-acorex-platform-module-assessment-management-client-contracts-entity-catalog-Buqp2FnP.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-assessment-management-client-contracts-entity-catalog-assessment-case.entity-GDJX71dY.mjs → acorex-platform-module-assessment-management-client-contracts-entity-catalog-assessment-case.entity-IAO_eHLl.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-assessment-management-client-contracts-entity-catalog-assessment-case.entity-GDJX71dY.mjs.map → acorex-platform-module-assessment-management-client-contracts-entity-catalog-assessment-case.entity-IAO_eHLl.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-assessment-management-client-contracts-entity-catalog-assessment-session.entity-tP9SU7u8.mjs → acorex-platform-module-assessment-management-client-contracts-entity-catalog-assessment-session.entity-BVVzsiLh.mjs} +3 -3
- package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entity-catalog-assessment-session.entity-BVVzsiLh.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-assessment-management-client-contracts-entity-catalog-question-bank-item.entity-BSXs6_z8.mjs → acorex-platform-module-assessment-management-client-contracts-entity-catalog-question-bank-item.entity-WON7pvW1.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-assessment-management-client-contracts-entity-catalog-question-bank-item.entity-BSXs6_z8.mjs.map → acorex-platform-module-assessment-management-client-contracts-entity-catalog-question-bank-item.entity-WON7pvW1.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-assessment-management-client-contracts-entity-catalog-questionnaire.entity-a63MvFoX.mjs → acorex-platform-module-assessment-management-client-contracts-entity-catalog-questionnaire.entity-BZ5FdPuP.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-assessment-management-client-contracts-entity-catalog-questionnaire.entity-a63MvFoX.mjs.map → acorex-platform-module-assessment-management-client-contracts-entity-catalog-questionnaire.entity-BZ5FdPuP.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-assessment-management-client-contracts-entity-catalog-template.entity-DWRFJCah.mjs → acorex-platform-module-assessment-management-client-contracts-entity-catalog-template.entity-L_p7_kL1.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-assessment-management-client-contracts-entity-catalog-template.entity-DWRFJCah.mjs.map → acorex-platform-module-assessment-management-client-contracts-entity-catalog-template.entity-L_p7_kL1.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entity-catalog.mjs +1 -1
- package/fesm2022/acorex-platform-module-assessment-management-client-contracts.mjs +1 -205
- package/fesm2022/acorex-platform-module-assessment-management-client-contracts.mjs.map +1 -1
- package/fesm2022/{acorex-platform-module-assessment-management-client-fill-assessment-session.command-xJKBN_ld.mjs → acorex-platform-module-assessment-management-client-fill-assessment-session.command-CElnTi9H.mjs} +5 -5
- package/fesm2022/acorex-platform-module-assessment-management-client-fill-assessment-session.command-CElnTi9H.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-assessment-management-client-form-template-viewer-popup.component-BJR4IfPd.mjs → acorex-platform-module-assessment-management-client-form-template-viewer-popup.component-kpTxVOy6.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-assessment-management-client-form-template-viewer-popup.component-BJR4IfPd.mjs.map → acorex-platform-module-assessment-management-client-form-template-viewer-popup.component-kpTxVOy6.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-assessment-management-client-form-template-viewer.service-R-ggiWLO.mjs → acorex-platform-module-assessment-management-client-form-template-viewer.service-C3wctwpK.mjs} +3 -3
- package/fesm2022/{acorex-platform-module-assessment-management-client-form-template-viewer.service-R-ggiWLO.mjs.map → acorex-platform-module-assessment-management-client-form-template-viewer.service-C3wctwpK.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-assessment-management-client-index-BZtiVD2e.mjs → acorex-platform-module-assessment-management-client-index-CCA6Wa_b.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-assessment-management-client-index-BZtiVD2e.mjs.map → acorex-platform-module-assessment-management-client-index-CCA6Wa_b.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-assessment-management-client-open-form-template.command-C4081c1C.mjs → acorex-platform-module-assessment-management-client-open-form-template.command-BxT0-1T5.mjs} +3 -3
- package/fesm2022/{acorex-platform-module-assessment-management-client-open-form-template.command-C4081c1C.mjs.map → acorex-platform-module-assessment-management-client-open-form-template.command-BxT0-1T5.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-assessment-management-client-preview-form-template.command-CBmZ-Bmy.mjs → acorex-platform-module-assessment-management-client-preview-form-template.command-Co5Y4isL.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-assessment-management-client-preview-form-template.command-CBmZ-Bmy.mjs.map → acorex-platform-module-assessment-management-client-preview-form-template.command-Co5Y4isL.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-assessment-management-client-preview-question.command-DVnUPcnM.mjs → acorex-platform-module-assessment-management-client-preview-question.command-D_taUb7J.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-assessment-management-client-preview-question.command-DVnUPcnM.mjs.map → acorex-platform-module-assessment-management-client-preview-question.command-D_taUb7J.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-assessment-management-client-preview-questionnaire.command-ZDwi_ANo.mjs → acorex-platform-module-assessment-management-client-preview-questionnaire.command-DgGL1AS5.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-assessment-management-client-preview-questionnaire.command-ZDwi_ANo.mjs.map → acorex-platform-module-assessment-management-client-preview-questionnaire.command-DgGL1AS5.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-assessment-management-client-question-bank-interface-editor-widget-edit.component-xVopqBXb.mjs → acorex-platform-module-assessment-management-client-question-bank-interface-editor-widget-edit.component-BYMExvs2.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-assessment-management-client-question-bank-interface-editor-widget-edit.component-xVopqBXb.mjs.map → acorex-platform-module-assessment-management-client-question-bank-interface-editor-widget-edit.component-BYMExvs2.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-assessment-management-client-questionnaire-questions-editor-edit.component-CzBwueq5.mjs → acorex-platform-module-assessment-management-client-questionnaire-questions-editor-edit.component-pxzk1zlT.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-assessment-management-client-questionnaire-questions-editor-edit.component-CzBwueq5.mjs.map → acorex-platform-module-assessment-management-client-questionnaire-questions-editor-edit.component-pxzk1zlT.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-assessment-management-client-questionnaire-viewer-edit.component-dQVv8Byi.mjs → acorex-platform-module-assessment-management-client-questionnaire-viewer-edit.component-CFm6Qm1N.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-assessment-management-client-questionnaire-viewer-edit.component-dQVv8Byi.mjs.map → acorex-platform-module-assessment-management-client-questionnaire-viewer-edit.component-CFm6Qm1N.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-assessment-management-client-questionnaire-viewer-popup.component-C7NKQ3JK.mjs → acorex-platform-module-assessment-management-client-questionnaire-viewer-popup.component-Cm-HOUyp.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-assessment-management-client-questionnaire-viewer-popup.component-C7NKQ3JK.mjs.map → acorex-platform-module-assessment-management-client-questionnaire-viewer-popup.component-Cm-HOUyp.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-assessment-management-client-related-content-viewer-page-component.provider-C30AdJgp.mjs → acorex-platform-module-assessment-management-client-related-content-viewer-page-component.provider-6A3qpuk_.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-assessment-management-client-related-content-viewer-page-component.provider-C30AdJgp.mjs.map → acorex-platform-module-assessment-management-client-related-content-viewer-page-component.provider-6A3qpuk_.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-assessment-management-client-review-assessment-session.command-CUgxOyhV.mjs → acorex-platform-module-assessment-management-client-review-assessment-session.command-t6HEIXBh.mjs} +5 -5
- package/fesm2022/acorex-platform-module-assessment-management-client-review-assessment-session.command-t6HEIXBh.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-assessment-management-client-show-form-template-viewer-popup.command-D4XOgSLK.mjs → acorex-platform-module-assessment-management-client-show-form-template-viewer-popup.command-CCo55_Qy.mjs} +3 -3
- package/fesm2022/{acorex-platform-module-assessment-management-client-show-form-template-viewer-popup.command-D4XOgSLK.mjs.map → acorex-platform-module-assessment-management-client-show-form-template-viewer-popup.command-CCo55_Qy.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-assessment-management-client-show-questionnaire-questions-popup.command-HMUwV7JV.mjs → acorex-platform-module-assessment-management-client-show-questionnaire-questions-popup.command-D4lNjvkc.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-assessment-management-client-show-questionnaire-questions-popup.command-HMUwV7JV.mjs.map → acorex-platform-module-assessment-management-client-show-questionnaire-questions-popup.command-D4lNjvkc.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-assessment-management-client-show-questionnaire-viewer-popup.command-qxFtVjPL.mjs → acorex-platform-module-assessment-management-client-show-questionnaire-viewer-popup.command-Dmpq5r8w.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-assessment-management-client-show-questionnaire-viewer-popup.command-qxFtVjPL.mjs.map → acorex-platform-module-assessment-management-client-show-questionnaire-viewer-popup.command-Dmpq5r8w.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-assessment-management-client-template-widget-edit.component-ToNSOrm0.mjs → acorex-platform-module-assessment-management-client-template-widget-edit.component-DjRhnQ_2.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-assessment-management-client-template-widget-edit.component-ToNSOrm0.mjs.map → acorex-platform-module-assessment-management-client-template-widget-edit.component-DjRhnQ_2.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-assessment-management-client-test-sheet-cell-type-widget-edit.component-IrGyg6gp.mjs → acorex-platform-module-assessment-management-client-test-sheet-cell-type-widget-edit.component-bqMfQX5s.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-assessment-management-client-test-sheet-cell-type-widget-edit.component-IrGyg6gp.mjs.map → acorex-platform-module-assessment-management-client-test-sheet-cell-type-widget-edit.component-bqMfQX5s.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-assessment-management-client-test-sheet-grid.component-YuI3fd0M.mjs → acorex-platform-module-assessment-management-client-test-sheet-grid.component-DNvmkJMG.mjs} +3 -3
- package/fesm2022/{acorex-platform-module-assessment-management-client-test-sheet-grid.component-YuI3fd0M.mjs.map → acorex-platform-module-assessment-management-client-test-sheet-grid.component-DNvmkJMG.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-assessment-management-client-test-sheet-schema-widget-edit.component-Bj3yQcnK.mjs → acorex-platform-module-assessment-management-client-test-sheet-schema-widget-edit.component-DFZHs-Hw.mjs} +3 -3
- package/fesm2022/{acorex-platform-module-assessment-management-client-test-sheet-schema-widget-edit.component-Bj3yQcnK.mjs.map → acorex-platform-module-assessment-management-client-test-sheet-schema-widget-edit.component-DFZHs-Hw.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-assessment-management-client-test-sheet-widget-edit.component-jiWQ9kKS.mjs → acorex-platform-module-assessment-management-client-test-sheet-widget-edit.component-C2Z07VIS.mjs} +3 -3
- package/fesm2022/{acorex-platform-module-assessment-management-client-test-sheet-widget-edit.component-jiWQ9kKS.mjs.map → acorex-platform-module-assessment-management-client-test-sheet-widget-edit.component-C2Z07VIS.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-assessment-management-client-test-sheet-widget-view.component-DKTfJTSJ.mjs → acorex-platform-module-assessment-management-client-test-sheet-widget-view.component-BiwpePsD.mjs} +3 -3
- package/fesm2022/{acorex-platform-module-assessment-management-client-test-sheet-widget-view.component-DKTfJTSJ.mjs.map → acorex-platform-module-assessment-management-client-test-sheet-widget-view.component-BiwpePsD.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-assessment-management-client-test-sheet.util-Dtmdv9Za.mjs → acorex-platform-module-assessment-management-client-test-sheet.util-BJ6fQUri.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-assessment-management-client-test-sheet.util-Dtmdv9Za.mjs.map → acorex-platform-module-assessment-management-client-test-sheet.util-BJ6fQUri.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-assessment-management-client-view-session-answers.command-Dkv_lnpQ.mjs → acorex-platform-module-assessment-management-client-view-session-answers.command-C008SY9U.mjs} +6 -6
- package/fesm2022/acorex-platform-module-assessment-management-client-view-session-answers.command-C008SY9U.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-assessment-management-client.mjs +1 -1
- package/package.json +3 -3
- package/types/acorex-platform-module-assessment-management-client-contracts.d.ts +3 -36
- package/fesm2022/acorex-platform-module-assessment-management-client-acorex-platform-module-assessment-management-client-5wbq3eEn.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-assessment-management-client-assessment-session-answers-view.util-D5gUv0HJ.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entity-catalog-assessment-session.entity-tP9SU7u8.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-assessment-management-client-fill-assessment-session.command-xJKBN_ld.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-assessment-management-client-review-assessment-session.command-CUgxOyhV.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-assessment-management-client-view-session-answers.command-Dkv_lnpQ.mjs.map +0 -1
|
@@ -6,8 +6,8 @@ import { inject, Injectable } from '@angular/core';
|
|
|
6
6
|
import { get, first, defaultTo, isString } from 'lodash';
|
|
7
7
|
import { Router } from '@angular/router';
|
|
8
8
|
import { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';
|
|
9
|
-
import { h as AXMQuestionnaireViewerService } from './acorex-platform-module-assessment-management-client-acorex-platform-module-assessment-management-client-
|
|
10
|
-
import { RootConfig, toPrintSettings, toDisplaySettings, normalizeCompletionMode,
|
|
9
|
+
import { h as AXMQuestionnaireViewerService } from './acorex-platform-module-assessment-management-client-acorex-platform-module-assessment-management-client-B1yNgUHo.mjs';
|
|
10
|
+
import { RootConfig, toPrintSettings, toDisplaySettings, normalizeCompletionMode, toPrePostConfig } from '@acorex-platform/module-assessment-management-client/contracts';
|
|
11
11
|
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region ---- Fill Assessment Session Command ----
|
|
@@ -99,7 +99,7 @@ class FillAssessmentSessionCommand {
|
|
|
99
99
|
metadata: { outcome: 'Cancelled' },
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
|
-
initialAnswers =
|
|
102
|
+
initialAnswers = existingSession.answers || {};
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
const sessionSubmitted = existingSession?.statusId === 'submitted';
|
|
@@ -124,7 +124,7 @@ class FillAssessmentSessionCommand {
|
|
|
124
124
|
caseId: input.caseId,
|
|
125
125
|
responderId,
|
|
126
126
|
role,
|
|
127
|
-
answers:
|
|
127
|
+
answers: {},
|
|
128
128
|
progressPercentage: 0,
|
|
129
129
|
answeredQuestionsCount: 0,
|
|
130
130
|
lastSavedAt: now,
|
|
@@ -285,4 +285,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
285
285
|
}] });
|
|
286
286
|
|
|
287
287
|
export { FillAssessmentSessionCommand };
|
|
288
|
-
//# sourceMappingURL=acorex-platform-module-assessment-management-client-fill-assessment-session.command-
|
|
288
|
+
//# sourceMappingURL=acorex-platform-module-assessment-management-client-fill-assessment-session.command-CElnTi9H.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-assessment-management-client-fill-assessment-session.command-CElnTi9H.mjs","sources":["../../../../libs/modules/assessment-management/client/src/lib/features/questionnaire-viewer/commands/fill-assessment-session.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { AXPRuntimeCommandResult, type AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\n\nimport { AXTranslationService, resolveMultiLanguageString } from '@acorex/core/translation';\nimport { AXPSessionService } from '@acorex-platform/framework-client/auth';\nimport { AXPDebugService } from '@acorex-platform/framework-client/core';\nimport { Injectable, inject } from '@angular/core';\nimport { defaultTo, first, get, isString } from 'lodash';\nimport { Router } from '@angular/router';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXMQuestionnaireViewerService } from '../questionnaire-viewer.service';\nimport type { AXMAssessmentManagementAssessmentCaseEntityModel } from '@acorex-platform/module-assessment-management-client/contracts';\nimport type { AXMAssessmentManagementAssessmentSessionEntityModel } from '@acorex-platform/module-assessment-management-client/contracts';\nimport type { AXMAssessmentManagementQuestionnaireEntityModel } from '@acorex-platform/module-assessment-management-client/contracts';\nimport {\n normalizeCompletionMode,\n toDisplaySettings,\n toPrePostConfig,\n toPrintSettings,\n} from '@acorex-platform/module-assessment-management-client/contracts';\nimport {\n RootConfig,\n type QuestionnaireCompletionMode,\n type QuestionnaireBuilderValue,\n} from '@acorex-platform/module-assessment-management-client/contracts';\n\n//#endregion\n\n//#region ---- Command Input/Output Types ----\n\n/**\n * How to show the questionnaire viewer when filling an assessment session.\n */\nexport type FillAssessmentSessionShowAs = 'popup' | 'page' | 'standalone';\n\nexport type FillAssessmentSessionOutcome = 'Submitted' | 'Saved' | 'Cancelled';\n\n/**\n * Input for FillAssessmentSession command.\n */\nexport interface FillAssessmentSessionCommandInput {\n caseId: string;\n sessionId?: string;\n /** Popup viewer title; falls back to assessment case title when omitted. */\n title?: AXPMultiLanguageString;\n showAs?: FillAssessmentSessionShowAs;\n responderId?: string;\n role?: 'responder' | 'supervisor' | 'reviewer';\n /** Overrides questionnaire display.completionMode when set. */\n completionMode?: QuestionnaireCompletionMode;\n /** Question answer keys that must stay readonly (e.g. asset prefill on work-order checklists). */\n readonlyAnswerKeys?: string[];\n /**\n * When true, a submitted session stays editable and still saves to AssessmentSession.answers.\n * Default keeps submitted sessions read-only.\n */\n allowEditSubmitted?: boolean;\n /**\n * When true, the viewer is read-only and does not save, even when the session is still open.\n * Omitted keeps the submitted-session rule above.\n */\n readonly?: boolean;\n}\n\n//#endregion\n\n//#region ---- Fill Assessment Session Command ----\n\n/**\n * Opens questionnaire viewer for filling/editing assessment session with draft save and workflow outcomes.\n */\n@Injectable()\nexport class FillAssessmentSessionCommand implements AXPCommand<FillAssessmentSessionCommandInput, void> {\n //#region ---- Services & Dependencies ----\n\n private readonly sessionService = inject(AXPSessionService);\n private readonly router = inject(Router);\n private readonly entityService = inject(AXPEntityService);\n private readonly questionnaireViewerService = inject(AXMQuestionnaireViewerService);\n private readonly translationService = inject(AXTranslationService);\n private readonly debug = inject(AXPDebugService);\n\n //#endregion\n\n //#region ---- Command Implementation ----\n\n async execute(input: FillAssessmentSessionCommandInput): AXPCommandExecuteResultPromise<void> {\n try {\n const assessmentCase = await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.assessmentCase.name)\n .data<string, AXMAssessmentManagementAssessmentCaseEntityModel>()\n .byKey(input.caseId);\n if (!assessmentCase) {\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync(\n '@assessment-management:commands.fill-assessment-session.errors.case-not-found',\n { params: { caseId: input.caseId } },\n ),\n },\n metadata: { outcome: 'Cancelled' },\n };\n }\n\n const questionnaire = await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.questionnaire.name)\n .data<string, AXMAssessmentManagementQuestionnaireEntityModel>()\n .byKey(assessmentCase.questionnaireId);\n if (!questionnaire) {\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync(\n '@assessment-management:commands.fill-assessment-session.errors.questionnaire-not-found',\n { params: { questionnaireId: assessmentCase.questionnaireId } },\n ),\n },\n metadata: { outcome: 'Cancelled' },\n };\n }\n\n const questions = questionnaire.questions ?? { sections: [] };\n const structure: QuestionnaireBuilderValue = {\n ...questions,\n sections: questions.sections ?? [],\n displaySettings: toDisplaySettings(questionnaire) ?? undefined,\n printSettings: toPrintSettings(questionnaire) ?? undefined,\n };\n if (!structure.sections.length) {\n return {\n success: false,\n message: { text: '@assessment-management:commands.fill-assessment-session.errors.no-questions' },\n metadata: { outcome: 'Cancelled' },\n };\n }\n\n const currentUser = this.sessionService.user;\n const responderId = input.responderId || currentUser?.id;\n if (!responderId) {\n return {\n success: false,\n message: { text: '@assessment-management:commands.fill-assessment-session.errors.no-responder' },\n metadata: { outcome: 'Cancelled' },\n };\n }\n\n const role = input.role || 'responder';\n const displaySettings = toDisplaySettings(questionnaire);\n const completionMode: QuestionnaireCompletionMode =\n input.completionMode ?? normalizeCompletionMode(displaySettings?.completionMode);\n\n let existingSession: AXMAssessmentManagementAssessmentSessionEntityModel | null = null;\n let sessionId = input.sessionId ?? null;\n let initialAnswers: Record<string, unknown> = {};\n\n if (sessionId) {\n existingSession = await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.assessmentSession.name)\n .data<string, AXMAssessmentManagementAssessmentSessionEntityModel>()\n .byKey(sessionId);\n if (existingSession) {\n const sessionCaseId = this.resolveText(existingSession.caseId);\n if (!sessionCaseId || sessionCaseId !== input.caseId) {\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync(\n '@assessment-management:commands.fill-assessment-session.errors.session-case-mismatch',\n ),\n },\n metadata: { outcome: 'Cancelled' },\n };\n }\n initialAnswers = (existingSession.answers as Record<string, unknown>) || {};\n }\n }\n\n const sessionSubmitted = existingSession?.statusId === 'submitted';\n const readonly = input.readonly === true || (sessionSubmitted && input.allowEditSubmitted !== true);\n\n const showAs = input.showAs ?? 'popup';\n const appName = this.sessionService.application?.name ?? 'demo';\n const moduleRoute = (RootConfig.module as { route?: string }).route ?? 'assessment-management';\n\n if (showAs === 'page') {\n const path = `/${appName}/${moduleRoute}/questionnaire/fill/${input.caseId}`;\n const url = sessionId ? `${path}?sessionId=${encodeURIComponent(sessionId)}` : path;\n this.router.navigateByUrl(url);\n return { success: true, kind: 'object', data: undefined, metadata: { outcome: 'Cancelled' } };\n }\n\n if (showAs === 'standalone') {\n let sessionIdToOpen = sessionId;\n if (!sessionIdToOpen) {\n const now = new Date();\n sessionIdToOpen = await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.assessmentSession.name)\n .data<string, AXMAssessmentManagementAssessmentSessionEntityModel>()\n .create({\n caseId: input.caseId,\n responderId,\n role,\n answers: {},\n progressPercentage: 0,\n answeredQuestionsCount: 0,\n lastSavedAt: now,\n startedAt: now,\n statusId: 'not-started',\n } as Omit<AXMAssessmentManagementAssessmentSessionEntityModel, 'id'>);\n }\n if (sessionIdToOpen) {\n this.router.navigateByUrl(`/assessment/fill/${sessionIdToOpen}`);\n }\n return { success: true, kind: 'object', data: undefined, metadata: { outcome: 'Cancelled' } };\n }\n\n const viewerTitle = await this.resolveViewerTitle(input.title, assessmentCase.title);\n\n const viewerConfig = {\n readonly,\n completionMode,\n validationStrategy: displaySettings?.validationStrategy,\n viewMode: displaySettings?.viewMode,\n showProgressBar: displaySettings?.showProgressBar,\n timer: { showTimer: displaySettings?.showTimer ?? false },\n showQuestionNumbers: displaySettings?.showQuestionNumbers,\n readonlyAnswerKeys: input.readonlyAnswerKeys,\n };\n\n const result = await this.questionnaireViewerService.open({\n title: viewerTitle,\n structure,\n prePostConfig: toPrePostConfig(questionnaire),\n config: viewerConfig,\n initialAnswers,\n questionnaireId: questionnaire.id,\n assessmentFillContext: readonly\n ? undefined\n : {\n caseId: input.caseId,\n sessionId: sessionId ?? null,\n responderId,\n role,\n },\n });\n\n const outcome = await this.resolveFillOutcome(input.caseId, input.sessionId ?? sessionId, result);\n this.debug.trace(\n 'assessment-management',\n 'fill-assessment-session',\n 'Resolved fill workflow outcome',\n () => ({\n caseId: input.caseId,\n sessionId: input.sessionId ?? sessionId,\n popupResult: {\n saved: result?.saved === true,\n submitted: result?.submitted === true,\n hasPayload: result != null,\n },\n outcome,\n }),\n );\n return { success: true, kind: 'object', data: undefined, metadata: { outcome },\n };\n } catch (error: unknown) {\n const fallback = await this.translationService.translateAsync(\n '@general:messages.generic.error.description',\n );\n const message = error instanceof Error ? error.message : fallback;\n console.error('Error filling assessment session:', error);\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync(\n '@assessment-management:commands.fill-assessment-session.errors.failed',\n { params: { message } },\n ),\n },\n metadata: { outcome: 'Cancelled' },\n };\n }\n }\n\n //#endregion\n\n //#region ---- Helpers ----\n\n /**\n * Resolves popup title: explicit input, then case title, then translated default.\n */\n private async resolveViewerTitle(\n inputTitle: AXPMultiLanguageString | undefined,\n caseTitle: string | undefined,\n ): Promise<string> {\n const explicit = this.normalizeTitle(inputTitle);\n if (explicit) {\n return explicit;\n }\n\n const fromCase = this.normalizeTitle(caseTitle);\n if (fromCase) {\n return fromCase;\n }\n\n const fillTitleKey = '@assessment-management:cases.actions.fill-assessment.title';\n const fillTitleBase = await this.translationService.translateAsync(fillTitleKey);\n return fillTitleBase || 'Fill Assessment';\n }\n\n /** Resolves a multi-language or plain string title for the active locale. */\n private normalizeTitle(value: AXPMultiLanguageString | string | undefined | null | false): string {\n if (value == null || value === false) {\n return '';\n }\n if (typeof value === 'string') {\n return value.trim();\n }\n const locale = this.translationService.getActiveLang();\n return resolveMultiLanguageString(value, locale).trim();\n }\n\n /**\n * Resolves workflow outcome from popup result, falling back to persisted session status only\n * when the popup is dismissed without an explicit close payload.\n * After submit the viewer may show a summary step; closing via X without \"Done\" still leaves\n * the session submitted and must advance the workflow. Save-as-draft always sends an explicit\n * payload ({ saved: true }); inferring Submitted from the DB when a payload exists can wrongly\n * advance the workflow if flags are missing or a stale submitted session is resolved.\n */\n private async resolveFillOutcome(\n caseId: string,\n sessionId: string | null | undefined,\n result: { submitted?: boolean; saved?: boolean } | null | undefined,\n ): Promise<FillAssessmentSessionOutcome> {\n if (result?.saved) {\n return 'Saved';\n }\n if (result?.submitted) {\n return 'Submitted';\n }\n\n if (result != null) {\n return 'Cancelled';\n }\n\n const sessionSubmitted = await this.isAssessmentSessionSubmitted(caseId, sessionId);\n if (sessionSubmitted) {\n return 'Submitted';\n }\n\n return 'Cancelled';\n }\n\n private async isAssessmentSessionSubmitted(\n caseId: string,\n sessionId: string | null | undefined,\n ): Promise<boolean> {\n const resolvedSessionId = this.resolveText(sessionId) || (await this.findLatestSessionIdForCase(caseId));\n if (!resolvedSessionId) {\n return false;\n }\n\n const session = await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.assessmentSession.name)\n .data<string, AXMAssessmentManagementAssessmentSessionEntityModel>()\n .byKey(resolvedSessionId);\n\n return get(session, 'statusId') === 'submitted';\n }\n\n private async findLatestSessionIdForCase(caseId: string): Promise<string> {\n const page = await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.assessmentSession.name)\n .data<string, AXMAssessmentManagementAssessmentSessionEntityModel>()\n .query({\n skip: 0,\n take: 1,\n sort: [{ field: 'lastSavedAt', direction: 'desc' }],\n filter: {\n logic: 'and',\n filters: [{ field: 'caseId', operator: { type: 'equal' }, value: caseId }],\n },\n } as never);\n\n const session = first(defaultTo(get(page, 'items'), []));\n return this.resolveText(get(session, 'id'));\n }\n\n private resolveText(value: unknown): string {\n if (!isString(value)) {\n return '';\n }\n return value.trim();\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;;;;AAkEA;AAEA;AAEA;;AAEG;MAEU,4BAA4B,CAAA;AADzC,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC1C,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACvB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACxC,QAAA,IAAA,CAAA,0BAA0B,GAAG,MAAM,CAAC,6BAA6B,CAAC;AAClE,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACjD,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,eAAe,CAAC;AA6TjD,IAAA;;;IAvTC,MAAM,OAAO,CAAC,KAAwC,EAAA;AACpD,QAAA,IAAI;AACF,YAAA,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC;AAC/B,iBAAA,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,EAAE,U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/common';
|
|
16
16
|
import * as i0 from '@angular/core';
|
|
17
17
|
import { inject, viewChild, signal, computed, effect, Input, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
18
|
-
import { h as AXMQuestionnaireViewerService, B as resolveSummaryPlaceholders, o as AXMPreQuestionnaireContentComponent, q as AXMPostQuestionnaireContentComponent } from './acorex-platform-module-assessment-management-client-acorex-platform-module-assessment-management-client-
|
|
18
|
+
import { h as AXMQuestionnaireViewerService, B as resolveSummaryPlaceholders, o as AXMPreQuestionnaireContentComponent, q as AXMPostQuestionnaireContentComponent } from './acorex-platform-module-assessment-management-client-acorex-platform-module-assessment-management-client-B1yNgUHo.mjs';
|
|
19
19
|
|
|
20
20
|
//#region ----- Imports -----
|
|
21
21
|
const EMPTY_OUTCOME_STRUCTURE = { sections: [] };
|
|
@@ -235,4 +235,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
235
235
|
}] } });
|
|
236
236
|
|
|
237
237
|
export { AXMFormTemplateViewerPopupComponent };
|
|
238
|
-
//# sourceMappingURL=acorex-platform-module-assessment-management-client-form-template-viewer-popup.component-
|
|
238
|
+
//# sourceMappingURL=acorex-platform-module-assessment-management-client-form-template-viewer-popup.component-kpTxVOy6.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-assessment-management-client-form-template-viewer-popup.component-BJR4IfPd.mjs","sources":["../../../../libs/modules/assessment-management/client/src/lib/features/form-template/viewer/pages/form-template-viewer-popup/form-template-viewer-popup.component.ts","../../../../libs/modules/assessment-management/client/src/lib/features/form-template/viewer/pages/form-template-viewer-popup/form-template-viewer-popup.component.html"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXFormComponent, AXFormModule } from '@acorex/components/form';\nimport { AXBasePageComponent } from '@acorex/components/page';\nimport { AXTranslationModule, AXTranslationService, resolveMultiLanguageString } from '@acorex/core/translation';\nimport { DomSanitizer, type SafeHtml } from '@angular/platform-browser';\nimport {\n AXP_LOCAL_DATA_SOURCE_STORE,\n AXPWidgetCoreModule,\n createReadonlyLocalDataSourceStore,\n readLocalDataSourcesFromNode,\n} from '@acorex-platform/framework-client/layout/widget-core';\nimport { AXPContextChangeEvent, AXPWidgetsCatalog, type AXPWidgetNode } from '@acorex-platform/framework-shared/core';\nimport type {\n PrePostConfig,\n QuestionnaireBuilderValue,\n} from '@acorex-platform/module-assessment-management-client/contracts';\nimport { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n inject,\n Input,\n signal,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXMPreQuestionnaireContentComponent } from '../../../../questionnaire-viewer/components/pre-questionnaire-content';\nimport { AXMPostQuestionnaireContentComponent } from '../../../../questionnaire-viewer/components/post-questionnaire-content';\nimport { AXMQuestionnaireViewerService } from '../../../../questionnaire-viewer/questionnaire-viewer.service';\nimport {\n resolveSummaryPlaceholders,\n type SummaryPlaceholderValues,\n} from '../../../../questionnaire-viewer/utils/pre-post-content.utils';\nimport type { AXMFormTemplateViewerConfig, AXMFormTemplateViewerResult } from '../../form-template-viewer.types';\n\n//#endregion\n\n//#region ----- Types -----\n\ntype FormFlowStep = 'pre' | 'form' | 'review' | 'results' | 'summary';\n\nconst EMPTY_OUTCOME_STRUCTURE: QuestionnaireBuilderValue = { sections: [] };\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-form-template-viewer-popup',\n templateUrl: './form-template-viewer-popup.component.html',\n styleUrl: './form-template-viewer-popup.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [\n CommonModule,\n AXTranslationModule,\n AXButtonModule,\n AXDecoratorModule,\n AXFormModule,\n AXPWidgetCoreModule,\n AXMPreQuestionnaireContentComponent,\n AXMPostQuestionnaireContentComponent,\n ],\n providers: [\n {\n provide: AXP_LOCAL_DATA_SOURCE_STORE,\n useFactory: (host: AXMFormTemplateViewerPopupComponent) =>\n createReadonlyLocalDataSourceStore(() => host.sources()),\n deps: [AXMFormTemplateViewerPopupComponent],\n },\n ],\n})\nexport class AXMFormTemplateViewerPopupComponent extends AXBasePageComponent {\n //#region ----- Services & Dependencies -----\n\n private readonly questionnaireViewerService = inject(AXMQuestionnaireViewerService);\n private readonly translationService = inject(AXTranslationService);\n private readonly sanitizer = inject(DomSanitizer);\n private readonly formRef = viewChild<AXFormComponent>('form');\n\n //#endregion\n\n //#region ----- Inputs -----\n\n @Input() set config(value: AXMFormTemplateViewerConfig | undefined) {\n this._config.set(value);\n }\n\n //#endregion\n\n //#region ----- State Signals -----\n\n protected readonly _config = signal<AXMFormTemplateViewerConfig | undefined>(undefined);\n protected readonly flowStep = signal<FormFlowStep>('form');\n protected readonly submitResult = signal<SummaryPlaceholderValues | null>(null);\n protected readonly isSubmitting = signal(false);\n protected readonly document = signal({ type: AXPWidgetsCatalog.document } as AXPWidgetNode);\n protected readonly currentPageIndex = signal(0);\n private readonly initialFlowApplied = signal(false);\n private readonly templateLoaded = signal(false);\n\n protected context: Record<string, unknown> = {};\n\n readonly sources = computed(() => readLocalDataSourcesFromNode(this.document()));\n\n protected readonly currentPage = computed(\n () => this.document().children?.[this.currentPageIndex()] ?? ({ type: AXPWidgetsCatalog.pageLayout } as AXPWidgetNode),\n );\n\n protected readonly prePostConfig = computed((): PrePostConfig | null => this._config()?.prePostConfig ?? null);\n\n protected readonly widgetMode = computed(() =>\n this._config()?.readOnly || this.flowStep() === 'review' ? 'view' : 'edit',\n );\n\n protected readonly showReviewButton = computed(\n () => this.flowStep() === 'form' && !this._config()?.readOnly && this.prePostConfig()?.post?.reviewEnabled === true,\n );\n\n protected readonly showSubmitButton = computed(\n () => this.flowStep() === 'form' && !this._config()?.readOnly && !this.showReviewButton(),\n );\n\n protected readonly isPreviewMode = computed(() => this._config()?.previewMode === true);\n\n protected readonly submitActionLabel = computed(() =>\n this.isPreviewMode()\n ? '@form-template-management:templates.viewer.preview.finish.title'\n : '@general:actions.submit.title',\n );\n\n /** Summary rich text with outcome placeholders. Empty author content stays blank. */\n protected readonly summaryHtml = computed((): SafeHtml | '' => {\n const content = this.prePostConfig()?.post?.summaryContent;\n const locale = this.translationService.getActiveLang?.() ?? 'en-US';\n let resolved = resolveMultiLanguageString(content, locale);\n const values = this.submitResult();\n if (resolved && values) {\n resolved = resolveSummaryPlaceholders(resolved, values);\n }\n return resolved ? this.sanitizer.bypassSecurityTrustHtml(resolved) : '';\n });\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n constructor() {\n super();\n effect(() => {\n const cfg = this._config();\n if (!cfg) {\n return;\n }\n if (!this.templateLoaded()) {\n this.loadTemplate(cfg);\n this.templateLoaded.set(true);\n }\n if (!this.initialFlowApplied()) {\n this.flowStep.set(cfg.prePostConfig?.pre?.enabled === true ? 'pre' : 'form');\n this.initialFlowApplied.set(true);\n }\n });\n }\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n protected handleContextChanged(event: AXPContextChangeEvent): void {\n this.context = event.data ?? {};\n }\n\n protected handleCancel(): void {\n this.finish(true);\n }\n\n protected handleStart(): void {\n this.flowStep.set('form');\n }\n\n protected handleEdit(): void {\n this.flowStep.set('form');\n }\n\n protected async handleReviewClick(): Promise<void> {\n if (!(await this.validateForm())) {\n return;\n }\n this.flowStep.set('review');\n }\n\n protected async handleSubmitClick(): Promise<void> {\n if (this.flowStep() === 'form' && !(await this.validateForm())) {\n return;\n }\n await this.advanceAfterSubmit();\n }\n\n protected handleResultsNext(): void {\n if (this.prePostConfig()?.post?.summaryEnabled) {\n this.flowStep.set('summary');\n return;\n }\n this.finish(false);\n }\n\n protected handleDone(): void {\n this.finish(false);\n }\n\n //#endregion\n\n //#region ----- Template Loading -----\n\n private loadTemplate(config: AXMFormTemplateViewerConfig): void {\n let templateData: AXPWidgetNode;\n if (typeof config.template === 'string') {\n try {\n templateData = JSON.parse(config.template) as AXPWidgetNode;\n } catch (error) {\n console.error('Failed to parse form template JSON:', error);\n return;\n }\n } else {\n templateData = config.template;\n }\n this.document.set(templateData);\n if (config.context) {\n this.context = { ...config.context };\n }\n }\n\n //#endregion\n\n //#region ----- Submit Flow -----\n\n private async validateForm(): Promise<boolean> {\n const form = this.formRef();\n if (!form) {\n return false;\n }\n const formResult = await form.validate();\n return formResult.result === true;\n }\n\n private async advanceAfterSubmit(): Promise<void> {\n if (this.isSubmitting()) {\n return;\n }\n this.isSubmitting.set(true);\n try {\n const rules = this._config()?.outcomeRules ?? [];\n const post = this.prePostConfig()?.post;\n let placeholders: SummaryPlaceholderValues | null = null;\n if (rules.length > 0) {\n placeholders = await this.questionnaireViewerService.buildSummaryPlaceholderValues(\n EMPTY_OUTCOME_STRUCTURE,\n this.context,\n { outcomeRules: rules },\n );\n }\n this.submitResult.set(placeholders);\n if (post?.showOutcomeResults) {\n this.flowStep.set('results');\n return;\n }\n if (post?.summaryEnabled) {\n this.flowStep.set('summary');\n return;\n }\n this.finish(false);\n } finally {\n this.isSubmitting.set(false);\n }\n }\n\n private finish(cancelled: boolean): void {\n const result: AXMFormTemplateViewerResult = {\n context: this.context,\n cancelled,\n metadata: this._config()?.metadata,\n };\n this.close(result);\n }\n\n //#endregion\n}\n\n//#endregion\n","<div\n class=\"__content-area flex flex-1 min-h-0 flex-col\"\n [class.overflow-hidden]=\"flowStep() === 'form' || flowStep() === 'review'\"\n [class.overflow-y-auto]=\"flowStep() !== 'form' && flowStep() !== 'review'\"\n>\n <!-- ----- Welcome content before the form ----- -->\n @if (flowStep() === 'pre') {\n <axm-pre-questionnaire-content [content]=\"prePostConfig()?.pre?.content\"></axm-pre-questionnaire-content>\n }\n <!-- ----- Outcome results after submit ----- -->\n @else if (flowStep() === 'results') {\n <axm-post-questionnaire-content mode=\"results\" [placeholderValues]=\"submitResult()\"></axm-post-questionnaire-content>\n }\n <!-- ----- Summary content after submit ----- -->\n @else if (flowStep() === 'summary') {\n <div class=\"flex flex-col items-center justify-center p-8 min-h-[200px] text-on-surface\">\n <div class=\"max-w-2xl w-full prose text-on-surface\" [innerHTML]=\"summaryHtml()\"></div>\n </div>\n }\n <!-- ----- Form body, including readonly review ----- -->\n @else {\n <!-- ----- Review heading while the filled form is shown read-only ----- -->\n @if (flowStep() === 'review') {\n <div class=\"p-4 border-b border-surface\">\n <h2 class=\"text-lg font-semibold text-on-surface\">\n {{ '@form-template-management:templates.viewer.flow.review-title' | translate | async }}\n </h2>\n </div>\n }\n <div class=\"flex flex-1 min-h-0 flex-col overflow-y-auto overflow-x-hidden p-4\">\n <ax-form #form>\n <axp-widgets-container [context]=\"context\" (onContextChanged)=\"handleContextChanged($event)\">\n <ng-container axp-widget-renderer [node]=\"currentPage()\" [mode]=\"widgetMode()\"></ng-container>\n </axp-widgets-container>\n </ax-form>\n </div>\n }\n</div>\n\n<ax-footer class=\"__popup-footer flex-shrink-0 border-t px-4 py-3\">\n <ax-suffix>\n <!-- ----- Welcome step ----- -->\n @if (flowStep() === 'pre') {\n <ax-button\n [text]=\"'@general:actions.cancel.title' | translate | async\"\n (onClick)=\"handleCancel()\"\n ></ax-button>\n <ax-button\n look=\"solid\"\n color=\"primary\"\n [text]=\"'@form-template-management:templates.viewer.flow.start' | translate | async\"\n (onClick)=\"handleStart()\"\n ></ax-button>\n }\n <!-- ----- Fill step ----- -->\n @else if (flowStep() === 'form') {\n <ax-button\n [text]=\"'@general:actions.cancel.title' | translate | async\"\n (onClick)=\"handleCancel()\"\n ></ax-button>\n <!-- ----- Review before submit when post review is enabled ----- -->\n @if (showReviewButton()) {\n <ax-button\n look=\"solid\"\n color=\"primary\"\n [text]=\"'@form-template-management:templates.viewer.flow.review' | translate | async\"\n [disabled]=\"isSubmitting()\"\n (onClick)=\"handleReviewClick()\"\n ></ax-button>\n }\n <!-- ----- Submit when review is off ----- -->\n @else if (showSubmitButton()) {\n <ax-button\n look=\"solid\"\n color=\"primary\"\n [text]=\"submitActionLabel() | translate | async\"\n [disabled]=\"isSubmitting()\"\n (onClick)=\"handleSubmitClick()\"\n ></ax-button>\n }\n }\n <!-- ----- Review step ----- -->\n @else if (flowStep() === 'review') {\n <ax-button\n look=\"outline\"\n [text]=\"'@form-template-management:templates.viewer.flow.edit' | translate | async\"\n (onClick)=\"handleEdit()\"\n ></ax-button>\n <ax-button\n look=\"solid\"\n color=\"primary\"\n [text]=\"submitActionLabel() | translate | async\"\n [disabled]=\"isSubmitting()\"\n (onClick)=\"handleSubmitClick()\"\n ></ax-button>\n }\n <!-- ----- Outcome results step ----- -->\n @else if (flowStep() === 'results') {\n <!-- ----- Continue to the summary when it is enabled ----- -->\n @if (prePostConfig()?.post?.summaryEnabled) {\n <ax-button\n look=\"solid\"\n color=\"primary\"\n [text]=\"'@general:actions.next.title' | translate | async\"\n (onClick)=\"handleResultsNext()\"\n ></ax-button>\n }\n <!-- ----- Close when there is no summary step ----- -->\n @else {\n <ax-button\n look=\"solid\"\n color=\"primary\"\n [text]=\"'@form-template-management:templates.viewer.flow.done' | translate | async\"\n (onClick)=\"handleDone()\"\n ></ax-button>\n }\n }\n <!-- ----- Summary step ----- -->\n @else if (flowStep() === 'summary') {\n <ax-button\n look=\"solid\"\n color=\"primary\"\n [text]=\"'@form-template-management:templates.viewer.flow.done' | translate | async\"\n (onClick)=\"handleDone()\"\n ></ax-button>\n }\n </ax-suffix>\n</ax-footer>\n"],"names":["i3","i4","i5","i6"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AA8CA,MAAM,uBAAuB,GAA8B,EAAE,QAAQ,EAAE,EAAE,EAAE;AAE3E;AAEA;AA2BM,MAAO,mCAAoC,SAAQ,mBAAmB,CAAA;;;IAY1E,IAAa,MAAM,CAAC,KAA8C,EAAA;AAChE,QAAA,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC;IACzB;;;AA6DA,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;;AAzEQ,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EAAA,gCAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,sBAAA,EAAA,eAAA,EAAA,gBAAA,EAAA,mBAAA,EAAA,QAAA,EAAA,qBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAC,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAC,IAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAW3B,mCAAmC,EAAA,UAAA,EAAA,CAAA;kBAzB/C,SAAS;+BACE,gCAAgC,EAAA,eAAA,EAGzB,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,IAAI,EAAA,OAAA,EAC5B;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,cAAc;wBACd,iBAAiB;wBACjB,YAAY;wBACZ,mBAAmB;wBACnB,mCAAmC;wBACnC,oCAAoC;qBACrC,EAAA,SAAA,EACU;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,2BAA2B;AACpC,4BAAA,UAAU,EAAE,CAAC,IAAyC,KACpD,kCAAkC,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;AAC1D,4BAAA,IAAI,EAAE,CAAA,mCAAA,CAAqC;AAC5C,yBAAA;AACF,qBAAA,EAAA,QAAA,EAAA,21JAAA,EAAA,MAAA,EAAA,CAAA,yVAAA,CAAA,EAAA;+FAQqD,MAAM,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA;sBAM3D;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-assessment-management-client-form-template-viewer-popup.component-kpTxVOy6.mjs","sources":["../../../../libs/modules/assessment-management/client/src/lib/features/form-template/viewer/pages/form-template-viewer-popup/form-template-viewer-popup.component.ts","../../../../libs/modules/assessment-management/client/src/lib/features/form-template/viewer/pages/form-template-viewer-popup/form-template-viewer-popup.component.html"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXFormComponent, AXFormModule } from '@acorex/components/form';\nimport { AXBasePageComponent } from '@acorex/components/page';\nimport { AXTranslationModule, AXTranslationService, resolveMultiLanguageString } from '@acorex/core/translation';\nimport { DomSanitizer, type SafeHtml } from '@angular/platform-browser';\nimport {\n AXP_LOCAL_DATA_SOURCE_STORE,\n AXPWidgetCoreModule,\n createReadonlyLocalDataSourceStore,\n readLocalDataSourcesFromNode,\n} from '@acorex-platform/framework-client/layout/widget-core';\nimport { AXPContextChangeEvent, AXPWidgetsCatalog, type AXPWidgetNode } from '@acorex-platform/framework-shared/core';\nimport type {\n PrePostConfig,\n QuestionnaireBuilderValue,\n} from '@acorex-platform/module-assessment-management-client/contracts';\nimport { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n inject,\n Input,\n signal,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXMPreQuestionnaireContentComponent } from '../../../../questionnaire-viewer/components/pre-questionnaire-content';\nimport { AXMPostQuestionnaireContentComponent } from '../../../../questionnaire-viewer/components/post-questionnaire-content';\nimport { AXMQuestionnaireViewerService } from '../../../../questionnaire-viewer/questionnaire-viewer.service';\nimport {\n resolveSummaryPlaceholders,\n type SummaryPlaceholderValues,\n} from '../../../../questionnaire-viewer/utils/pre-post-content.utils';\nimport type { AXMFormTemplateViewerConfig, AXMFormTemplateViewerResult } from '../../form-template-viewer.types';\n\n//#endregion\n\n//#region ----- Types -----\n\ntype FormFlowStep = 'pre' | 'form' | 'review' | 'results' | 'summary';\n\nconst EMPTY_OUTCOME_STRUCTURE: QuestionnaireBuilderValue = { sections: [] };\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-form-template-viewer-popup',\n templateUrl: './form-template-viewer-popup.component.html',\n styleUrl: './form-template-viewer-popup.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [\n CommonModule,\n AXTranslationModule,\n AXButtonModule,\n AXDecoratorModule,\n AXFormModule,\n AXPWidgetCoreModule,\n AXMPreQuestionnaireContentComponent,\n AXMPostQuestionnaireContentComponent,\n ],\n providers: [\n {\n provide: AXP_LOCAL_DATA_SOURCE_STORE,\n useFactory: (host: AXMFormTemplateViewerPopupComponent) =>\n createReadonlyLocalDataSourceStore(() => host.sources()),\n deps: [AXMFormTemplateViewerPopupComponent],\n },\n ],\n})\nexport class AXMFormTemplateViewerPopupComponent extends AXBasePageComponent {\n //#region ----- Services & Dependencies -----\n\n private readonly questionnaireViewerService = inject(AXMQuestionnaireViewerService);\n private readonly translationService = inject(AXTranslationService);\n private readonly sanitizer = inject(DomSanitizer);\n private readonly formRef = viewChild<AXFormComponent>('form');\n\n //#endregion\n\n //#region ----- Inputs -----\n\n @Input() set config(value: AXMFormTemplateViewerConfig | undefined) {\n this._config.set(value);\n }\n\n //#endregion\n\n //#region ----- State Signals -----\n\n protected readonly _config = signal<AXMFormTemplateViewerConfig | undefined>(undefined);\n protected readonly flowStep = signal<FormFlowStep>('form');\n protected readonly submitResult = signal<SummaryPlaceholderValues | null>(null);\n protected readonly isSubmitting = signal(false);\n protected readonly document = signal({ type: AXPWidgetsCatalog.document } as AXPWidgetNode);\n protected readonly currentPageIndex = signal(0);\n private readonly initialFlowApplied = signal(false);\n private readonly templateLoaded = signal(false);\n\n protected context: Record<string, unknown> = {};\n\n readonly sources = computed(() => readLocalDataSourcesFromNode(this.document()));\n\n protected readonly currentPage = computed(\n () => this.document().children?.[this.currentPageIndex()] ?? ({ type: AXPWidgetsCatalog.pageLayout } as AXPWidgetNode),\n );\n\n protected readonly prePostConfig = computed((): PrePostConfig | null => this._config()?.prePostConfig ?? null);\n\n protected readonly widgetMode = computed(() =>\n this._config()?.readOnly || this.flowStep() === 'review' ? 'view' : 'edit',\n );\n\n protected readonly showReviewButton = computed(\n () => this.flowStep() === 'form' && !this._config()?.readOnly && this.prePostConfig()?.post?.reviewEnabled === true,\n );\n\n protected readonly showSubmitButton = computed(\n () => this.flowStep() === 'form' && !this._config()?.readOnly && !this.showReviewButton(),\n );\n\n protected readonly isPreviewMode = computed(() => this._config()?.previewMode === true);\n\n protected readonly submitActionLabel = computed(() =>\n this.isPreviewMode()\n ? '@form-template-management:templates.viewer.preview.finish.title'\n : '@general:actions.submit.title',\n );\n\n /** Summary rich text with outcome placeholders. Empty author content stays blank. */\n protected readonly summaryHtml = computed((): SafeHtml | '' => {\n const content = this.prePostConfig()?.post?.summaryContent;\n const locale = this.translationService.getActiveLang?.() ?? 'en-US';\n let resolved = resolveMultiLanguageString(content, locale);\n const values = this.submitResult();\n if (resolved && values) {\n resolved = resolveSummaryPlaceholders(resolved, values);\n }\n return resolved ? this.sanitizer.bypassSecurityTrustHtml(resolved) : '';\n });\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n constructor() {\n super();\n effect(() => {\n const cfg = this._config();\n if (!cfg) {\n return;\n }\n if (!this.templateLoaded()) {\n this.loadTemplate(cfg);\n this.templateLoaded.set(true);\n }\n if (!this.initialFlowApplied()) {\n this.flowStep.set(cfg.prePostConfig?.pre?.enabled === true ? 'pre' : 'form');\n this.initialFlowApplied.set(true);\n }\n });\n }\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n protected handleContextChanged(event: AXPContextChangeEvent): void {\n this.context = event.data ?? {};\n }\n\n protected handleCancel(): void {\n this.finish(true);\n }\n\n protected handleStart(): void {\n this.flowStep.set('form');\n }\n\n protected handleEdit(): void {\n this.flowStep.set('form');\n }\n\n protected async handleReviewClick(): Promise<void> {\n if (!(await this.validateForm())) {\n return;\n }\n this.flowStep.set('review');\n }\n\n protected async handleSubmitClick(): Promise<void> {\n if (this.flowStep() === 'form' && !(await this.validateForm())) {\n return;\n }\n await this.advanceAfterSubmit();\n }\n\n protected handleResultsNext(): void {\n if (this.prePostConfig()?.post?.summaryEnabled) {\n this.flowStep.set('summary');\n return;\n }\n this.finish(false);\n }\n\n protected handleDone(): void {\n this.finish(false);\n }\n\n //#endregion\n\n //#region ----- Template Loading -----\n\n private loadTemplate(config: AXMFormTemplateViewerConfig): void {\n let templateData: AXPWidgetNode;\n if (typeof config.template === 'string') {\n try {\n templateData = JSON.parse(config.template) as AXPWidgetNode;\n } catch (error) {\n console.error('Failed to parse form template JSON:', error);\n return;\n }\n } else {\n templateData = config.template;\n }\n this.document.set(templateData);\n if (config.context) {\n this.context = { ...config.context };\n }\n }\n\n //#endregion\n\n //#region ----- Submit Flow -----\n\n private async validateForm(): Promise<boolean> {\n const form = this.formRef();\n if (!form) {\n return false;\n }\n const formResult = await form.validate();\n return formResult.result === true;\n }\n\n private async advanceAfterSubmit(): Promise<void> {\n if (this.isSubmitting()) {\n return;\n }\n this.isSubmitting.set(true);\n try {\n const rules = this._config()?.outcomeRules ?? [];\n const post = this.prePostConfig()?.post;\n let placeholders: SummaryPlaceholderValues | null = null;\n if (rules.length > 0) {\n placeholders = await this.questionnaireViewerService.buildSummaryPlaceholderValues(\n EMPTY_OUTCOME_STRUCTURE,\n this.context,\n { outcomeRules: rules },\n );\n }\n this.submitResult.set(placeholders);\n if (post?.showOutcomeResults) {\n this.flowStep.set('results');\n return;\n }\n if (post?.summaryEnabled) {\n this.flowStep.set('summary');\n return;\n }\n this.finish(false);\n } finally {\n this.isSubmitting.set(false);\n }\n }\n\n private finish(cancelled: boolean): void {\n const result: AXMFormTemplateViewerResult = {\n context: this.context,\n cancelled,\n metadata: this._config()?.metadata,\n };\n this.close(result);\n }\n\n //#endregion\n}\n\n//#endregion\n","<div\n class=\"__content-area flex flex-1 min-h-0 flex-col\"\n [class.overflow-hidden]=\"flowStep() === 'form' || flowStep() === 'review'\"\n [class.overflow-y-auto]=\"flowStep() !== 'form' && flowStep() !== 'review'\"\n>\n <!-- ----- Welcome content before the form ----- -->\n @if (flowStep() === 'pre') {\n <axm-pre-questionnaire-content [content]=\"prePostConfig()?.pre?.content\"></axm-pre-questionnaire-content>\n }\n <!-- ----- Outcome results after submit ----- -->\n @else if (flowStep() === 'results') {\n <axm-post-questionnaire-content mode=\"results\" [placeholderValues]=\"submitResult()\"></axm-post-questionnaire-content>\n }\n <!-- ----- Summary content after submit ----- -->\n @else if (flowStep() === 'summary') {\n <div class=\"flex flex-col items-center justify-center p-8 min-h-[200px] text-on-surface\">\n <div class=\"max-w-2xl w-full prose text-on-surface\" [innerHTML]=\"summaryHtml()\"></div>\n </div>\n }\n <!-- ----- Form body, including readonly review ----- -->\n @else {\n <!-- ----- Review heading while the filled form is shown read-only ----- -->\n @if (flowStep() === 'review') {\n <div class=\"p-4 border-b border-surface\">\n <h2 class=\"text-lg font-semibold text-on-surface\">\n {{ '@form-template-management:templates.viewer.flow.review-title' | translate | async }}\n </h2>\n </div>\n }\n <div class=\"flex flex-1 min-h-0 flex-col overflow-y-auto overflow-x-hidden p-4\">\n <ax-form #form>\n <axp-widgets-container [context]=\"context\" (onContextChanged)=\"handleContextChanged($event)\">\n <ng-container axp-widget-renderer [node]=\"currentPage()\" [mode]=\"widgetMode()\"></ng-container>\n </axp-widgets-container>\n </ax-form>\n </div>\n }\n</div>\n\n<ax-footer class=\"__popup-footer flex-shrink-0 border-t px-4 py-3\">\n <ax-suffix>\n <!-- ----- Welcome step ----- -->\n @if (flowStep() === 'pre') {\n <ax-button\n [text]=\"'@general:actions.cancel.title' | translate | async\"\n (onClick)=\"handleCancel()\"\n ></ax-button>\n <ax-button\n look=\"solid\"\n color=\"primary\"\n [text]=\"'@form-template-management:templates.viewer.flow.start' | translate | async\"\n (onClick)=\"handleStart()\"\n ></ax-button>\n }\n <!-- ----- Fill step ----- -->\n @else if (flowStep() === 'form') {\n <ax-button\n [text]=\"'@general:actions.cancel.title' | translate | async\"\n (onClick)=\"handleCancel()\"\n ></ax-button>\n <!-- ----- Review before submit when post review is enabled ----- -->\n @if (showReviewButton()) {\n <ax-button\n look=\"solid\"\n color=\"primary\"\n [text]=\"'@form-template-management:templates.viewer.flow.review' | translate | async\"\n [disabled]=\"isSubmitting()\"\n (onClick)=\"handleReviewClick()\"\n ></ax-button>\n }\n <!-- ----- Submit when review is off ----- -->\n @else if (showSubmitButton()) {\n <ax-button\n look=\"solid\"\n color=\"primary\"\n [text]=\"submitActionLabel() | translate | async\"\n [disabled]=\"isSubmitting()\"\n (onClick)=\"handleSubmitClick()\"\n ></ax-button>\n }\n }\n <!-- ----- Review step ----- -->\n @else if (flowStep() === 'review') {\n <ax-button\n look=\"outline\"\n [text]=\"'@form-template-management:templates.viewer.flow.edit' | translate | async\"\n (onClick)=\"handleEdit()\"\n ></ax-button>\n <ax-button\n look=\"solid\"\n color=\"primary\"\n [text]=\"submitActionLabel() | translate | async\"\n [disabled]=\"isSubmitting()\"\n (onClick)=\"handleSubmitClick()\"\n ></ax-button>\n }\n <!-- ----- Outcome results step ----- -->\n @else if (flowStep() === 'results') {\n <!-- ----- Continue to the summary when it is enabled ----- -->\n @if (prePostConfig()?.post?.summaryEnabled) {\n <ax-button\n look=\"solid\"\n color=\"primary\"\n [text]=\"'@general:actions.next.title' | translate | async\"\n (onClick)=\"handleResultsNext()\"\n ></ax-button>\n }\n <!-- ----- Close when there is no summary step ----- -->\n @else {\n <ax-button\n look=\"solid\"\n color=\"primary\"\n [text]=\"'@form-template-management:templates.viewer.flow.done' | translate | async\"\n (onClick)=\"handleDone()\"\n ></ax-button>\n }\n }\n <!-- ----- Summary step ----- -->\n @else if (flowStep() === 'summary') {\n <ax-button\n look=\"solid\"\n color=\"primary\"\n [text]=\"'@form-template-management:templates.viewer.flow.done' | translate | async\"\n (onClick)=\"handleDone()\"\n ></ax-button>\n }\n </ax-suffix>\n</ax-footer>\n"],"names":["i3","i4","i5","i6"],"mappings":";;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mCAAA,CAAqC;AAC5C,yBAAA;AACF,qBAAA,EAAA,QAAA,EAAA,21JAAA,EAAA,MAAA,EAAA,CAAA,yVAAA,CAAA,EAAA;+FAQqD,MAAM,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA;sBAM3D;;;"}
|
|
@@ -6,7 +6,7 @@ import { AXPWidgetsCatalog } from '@acorex-platform/framework-shared/core';
|
|
|
6
6
|
import { RootConfig, toPrePostConfig, flattenQuestionnaireOutcomeItems } from '@acorex-platform/module-assessment-management-client/contracts';
|
|
7
7
|
import * as i0 from '@angular/core';
|
|
8
8
|
import { inject, Injectable } from '@angular/core';
|
|
9
|
-
import { g as formatQuestionnairePreviewDialogTitle } from './acorex-platform-module-assessment-management-client-acorex-platform-module-assessment-management-client-
|
|
9
|
+
import { g as formatQuestionnairePreviewDialogTitle } from './acorex-platform-module-assessment-management-client-acorex-platform-module-assessment-management-client-B1yNgUHo.mjs';
|
|
10
10
|
|
|
11
11
|
//#region ----- Imports -----
|
|
12
12
|
//#endregion
|
|
@@ -68,7 +68,7 @@ class AXMFormTemplateViewerService {
|
|
|
68
68
|
previewMode: input.previewMode === true,
|
|
69
69
|
};
|
|
70
70
|
const result = await this.dialogOpener.openPopup({
|
|
71
|
-
load: () => import('./acorex-platform-module-assessment-management-client-form-template-viewer-popup.component-
|
|
71
|
+
load: () => import('./acorex-platform-module-assessment-management-client-form-template-viewer-popup.component-kpTxVOy6.mjs').then((module) => module.AXMFormTemplateViewerPopupComponent),
|
|
72
72
|
data: { id: input.id ?? '', previewMode: input.previewMode === true, readOnly: input.readOnly === true },
|
|
73
73
|
show: (component) => this.popupService.open(component, {
|
|
74
74
|
title: popupTitle,
|
|
@@ -94,4 +94,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
94
94
|
}] });
|
|
95
95
|
|
|
96
96
|
export { AXMFormTemplateViewerService as A };
|
|
97
|
-
//# sourceMappingURL=acorex-platform-module-assessment-management-client-form-template-viewer.service-
|
|
97
|
+
//# sourceMappingURL=acorex-platform-module-assessment-management-client-form-template-viewer.service-C3wctwpK.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-assessment-management-client-form-template-viewer.service-
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-assessment-management-client-form-template-viewer.service-C3wctwpK.mjs","sources":["../../../../libs/modules/assessment-management/client/src/lib/features/form-template/viewer/form-template-viewer.service.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXPopupService } from '@acorex/components/popup';\nimport { AXPDialogOpener } from '@acorex-platform/framework-client/core';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPDeviceService } from '@acorex-platform/framework-client/core';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPWidgetsCatalog, type AXPMetaData } from '@acorex-platform/framework-shared/core';\nimport {\n flattenQuestionnaireOutcomeItems,\n RootConfig,\n toPrePostConfig,\n type AXMFormTemplateDetailDto,\n} from '@acorex-platform/module-assessment-management-client/contracts';\nimport { inject, Injectable } from '@angular/core';\nimport { formatQuestionnairePreviewDialogTitle } from '../../questionnaire-viewer/utils/questionnaire-preview-title.util';\nimport type {\n AXMFormTemplateViewerConfig,\n AXMFormTemplateViewerOpenStatus,\n AXMFormTemplateViewerResult,\n} from './form-template-viewer.types';\n\n//#endregion\n\n//#region ----- Service -----\n\n/**\n * Opens a form template in the same pre → form → review → results → summary flow as questionnaires.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMFormTemplateViewerService {\n //#region ----- Services & Dependencies -----\n\n private readonly popupService = inject(AXPopupService);\n private readonly dialogOpener = inject(AXPDialogOpener);\n private readonly entityService = inject(AXPEntityService);\n private readonly translationService = inject(AXTranslationService);\n private readonly deviceService = inject(AXPDeviceService);\n\n //#endregion\n\n //#region ----- Public Methods -----\n\n async open(input: {\n id?: string;\n template?: string;\n title?: string;\n metadata?: AXPMetaData;\n readOnly?: boolean;\n previewMode?: boolean;\n context?: Record<string, unknown>;\n }): Promise<AXMFormTemplateViewerResult | AXMFormTemplateViewerOpenStatus> {\n let templateData = input.template;\n let title: string | undefined;\n let prePostConfig = null as AXMFormTemplateViewerConfig['prePostConfig'];\n let outcomeRules: AXMFormTemplateViewerConfig['outcomeRules'] = [];\n\n if (input.id) {\n const item = await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.template.name)\n .data<string, AXMFormTemplateDetailDto>()\n .byKey(input.id);\n if (!item) {\n return 'not-found';\n }\n templateData = item.template ?? '';\n title = item.title?.trim() || undefined;\n prePostConfig = toPrePostConfig({ pre: item.pre, post: item.post });\n outcomeRules = flattenQuestionnaireOutcomeItems(item.outcomes);\n }\n\n if (!templateData) {\n if (!input.id) {\n return 'missing';\n }\n templateData = JSON.stringify({\n type: AXPWidgetsCatalog.document,\n children: [{ type: AXPWidgetsCatalog.pageLayout }],\n });\n }\n\n const fallbackTitle =\n (await this.translationService.translateAsync('@form-template-management:templates.viewer.title')) || 'Form';\n const displayTitle = input.title?.trim() || title;\n const popupTitle = input.previewMode\n ? formatQuestionnairePreviewDialogTitle(\n (await this.translationService.translateAsync(\n '@form-template-management:templates.entities.template.actions.preview.title',\n )) || 'Preview',\n displayTitle,\n )\n : displayTitle || fallbackTitle;\n\n const config: AXMFormTemplateViewerConfig = {\n template: templateData,\n title,\n prePostConfig,\n outcomeRules,\n context: input.context ?? {},\n metadata: input.metadata,\n readOnly: input.readOnly === true,\n previewMode: input.previewMode === true,\n };\n\n const result = await this.dialogOpener.openPopup({\n load: () =>\n import('./pages/form-template-viewer-popup/form-template-viewer-popup.component').then(\n (module) => module.AXMFormTemplateViewerPopupComponent,\n ),\n data: { id: input.id ?? '', previewMode: input.previewMode === true, readOnly: input.readOnly === true },\n show: (component) =>\n this.popupService.open(component, {\n title: popupTitle,\n size: this.deviceService.isSmall() ? 'full' : 'lg',\n closeButton: false,\n closeOnBackdropClick: false,\n draggable: false,\n data: { config },\n }),\n });\n\n return (\n (result?.data as AXMFormTemplateViewerResult | undefined) ?? {\n context: input.context ?? {},\n cancelled: true,\n metadata: input.metadata,\n }\n );\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;;;AAAA;AAsBA;AAEA;AAEA;;AAEG;MAEU,4BAA4B,CAAA;AADzC,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;AACrC,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,eAAe,CAAC;AACtC,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACxC,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACjD,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AA8F1D,IAAA;;;IAxFC,MAAM,IAAI,CAAC,KAQV,EAAA;AACC,QAAA,IAAI,YAAY,GAAG,KAAK,CAAC,QAAQ;AACjC,QAAA,IAAI,KAAyB;QAC7B,IAAI,aAAa,GAAG,IAAoD;QACxE,IAAI,YAAY,GAAgD,EAAE;AAElE,QAAA,IAAI,KAAK,CAAC,EAAE,EAAE;AACZ,YAAA,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC;AACrB,iBAAA,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI;AACpE,iBAAA,IAAI;AACJ,iBAAA,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;YAClB,IAAI,CAAC,IAAI,EAAE;AACT,gBAAA,OAAO,WAAW;YACpB;AACA,YAAA,YAAY,GAAG,IAAI,CAAC,QAAQ,IAAI,EAAE;YAClC,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,SAAS;AACvC,YAAA,aAAa,GAAG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2,7 @@ import { AXP_FORM_DESIGNER_SURFACE_PROFILE, AXPLayoutDesignerComponent } from '@
|
|
|
2
2
|
import { AXPPageLayoutBaseComponent, AXPPageLayoutBase } from '@acorex-platform/framework-client/layout/views';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { input, computed, ChangeDetectionStrategy, Component, Injectable } from '@angular/core';
|
|
5
|
-
import { r as resolvePersistedEntityId, F as FORM_TEMPLATE_PAGE_COMPONENT_KEY } from './acorex-platform-module-assessment-management-client-acorex-platform-module-assessment-management-client-
|
|
5
|
+
import { r as resolvePersistedEntityId, F as FORM_TEMPLATE_PAGE_COMPONENT_KEY } from './acorex-platform-module-assessment-management-client-acorex-platform-module-assessment-management-client-B1yNgUHo.mjs';
|
|
6
6
|
|
|
7
7
|
//#region ----- Component -----
|
|
8
8
|
/**
|
|
@@ -65,4 +65,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
65
65
|
}] });
|
|
66
66
|
|
|
67
67
|
export { AXMFormTemplatePageComponent, AXMFormTemplatePageComponentProvider };
|
|
68
|
-
//# sourceMappingURL=acorex-platform-module-assessment-management-client-index-
|
|
68
|
+
//# sourceMappingURL=acorex-platform-module-assessment-management-client-index-CCA6Wa_b.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-assessment-management-client-index-
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-assessment-management-client-index-CCA6Wa_b.mjs","sources":["../../../../libs/modules/assessment-management/client/src/lib/features/content-display/form-template/form-template-page/form-template-page.component.ts","../../../../libs/modules/assessment-management/client/src/lib/features/content-display/form-template/form-template-page/form-template-page.component.html","../../../../libs/modules/assessment-management/client/src/lib/features/content-display/form-template/form-template-page/form-template-page-component.provider.ts"],"sourcesContent":["import { AXP_FORM_DESIGNER_SURFACE_PROFILE, AXPLayoutDesignerComponent } from '@acorex-platform/framework-client/layout/designer';\nimport { AXPPageLayoutBase, AXPPageLayoutBaseComponent } from '@acorex-platform/framework-client/layout/views';\nimport { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { resolvePersistedEntityId } from '../../../questionnaire-builder/resolve-persisted-entity-id.util';\n\n//#region ----- Component -----\n\n/**\n * Side-menu page that hosts the form layout designer.\n * Used when the form-template plugin display includes `page`.\n */\n@Component({\n selector: 'axm-form-template-page',\n standalone: true,\n imports: [AXPLayoutDesignerComponent],\n templateUrl: './form-template-page.component.html',\n styleUrl: './form-template-page.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: AXPPageLayoutBase,\n useExisting: AXMFormTemplatePageComponent,\n },\n ],\n host: {\n '[class.axp-page-layout-base]': 'true',\n },\n})\nexport class AXMFormTemplatePageComponent extends AXPPageLayoutBaseComponent {\n //#region ----- Inputs -----\n\n rootContext = input<Record<string, unknown>>({});\n\n pageConfig = input<Record<string, unknown>>();\n\n //#endregion\n\n //#region ----- Computed Properties -----\n\n protected readonly formSurfaceProfile = AXP_FORM_DESIGNER_SURFACE_PROFILE;\n\n protected readonly templateId = computed(() => resolvePersistedEntityId(this.rootContext()) ?? null);\n\n //#endregion\n}\n\n//#endregion\n","@if (templateId(); as id) {\n <!-- ----- Layout designer for the saved form template ----- -->\n <axp-layout-designer [id]=\"id\" [profile]=\"formSurfaceProfile\"></axp-layout-designer>\n}\n","import {\n AXPPageComponentDefinition,\n AXPPageComponentProvider,\n} from '@acorex-platform/framework-client/layout/components';\nimport { Injectable } from '@angular/core';\nimport { FORM_TEMPLATE_PAGE_COMPONENT_KEY } from '../../content-display.constants';\n\n@Injectable()\nexport class AXMFormTemplatePageComponentProvider implements AXPPageComponentProvider {\n async components(): Promise<AXPPageComponentDefinition[]> {\n return [\n {\n key: FORM_TEMPLATE_PAGE_COMPONENT_KEY,\n loader: () => import('./form-template-page.component').then((module) => module.AXMFormTemplatePageComponent),\n },\n ];\n }\n}\n"],"names":[],"mappings":";;;;;;AAKA;AAEA;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A,ECvBH,kMAIA,0KDUY,0BAA0B,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,CAAA,IAAA,EAAA,UAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAczB,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBAjBxC,SAAS;+BACE,wBAAwB,EAAA,UAAA,EACtB,IAAI,EAAA,OAAA,EACP,CAAC,0BAA0B,CAAC,EAAA,eAAA,EAGpB,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAA,4BAA8B;AAC1C,yBAAA;qBACF,EAAA,IAAA,EACK;AACJ,wBAAA,8BAA8B,EAAE,MAAM;AACvC,qBAAA,EAAA,QAAA,EAAA,kMAAA,EAAA,MAAA,EAAA,CAAA,kHAAA,CAAA,EAAA;;;;;;;;MElBU,oCAAoC,CAAA;AAC/C,IAAA,MAAM,UAAU,GAAA;QACd,OAAO;AACL,YAAA;AACE,gBAAA,GAAG,EAAE,gCAAgC;AACrC,gBAAA,MAAM,EAAE,MAAM,0EAAwC,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,4BAA4B,CAAC;AAC7G,aAAA;SACF;IACH;8GARW,oCAAoC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAApC,oCAAoC,EAAA,CAAA,CAAA;;2FAApC,oCAAoC,EAAA,UAAA,EAAA,CAAA;kBADhD;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, Injectable } from '@angular/core';
|
|
3
|
-
import { A as AXMFormTemplateViewerService } from './acorex-platform-module-assessment-management-client-form-template-viewer.service-
|
|
4
|
-
import { A as AXPFormTemplateViewerConnector } from './acorex-platform-module-assessment-management-client-acorex-platform-module-assessment-management-client-
|
|
3
|
+
import { A as AXMFormTemplateViewerService } from './acorex-platform-module-assessment-management-client-form-template-viewer.service-C3wctwpK.mjs';
|
|
4
|
+
import { A as AXPFormTemplateViewerConnector } from './acorex-platform-module-assessment-management-client-acorex-platform-module-assessment-management-client-B1yNgUHo.mjs';
|
|
5
5
|
|
|
6
6
|
const MISSING_TEMPLATE_KEY = '@form-template-management:templates.viewer.messages.missing-template';
|
|
7
7
|
const NOT_FOUND_KEY = '@form-template-management:templates.viewer.messages.not-found';
|
|
@@ -52,4 +52,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
52
52
|
}] });
|
|
53
53
|
|
|
54
54
|
export { AXMOpenFormTemplateCommand };
|
|
55
|
-
//# sourceMappingURL=acorex-platform-module-assessment-management-client-open-form-template.command-
|
|
55
|
+
//# sourceMappingURL=acorex-platform-module-assessment-management-client-open-form-template.command-BxT0-1T5.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-assessment-management-client-open-form-template.command-
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-assessment-management-client-open-form-template.command-BxT0-1T5.mjs","sources":["../../../../libs/modules/assessment-management/client/src/lib/features/form-template/viewer/commands/open-form-template.command.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport type { AXPMetaData } from '@acorex-platform/framework-shared/core';\nimport { inject, Injectable } from '@angular/core';\n\nimport { AXMFormTemplateViewerService } from '../form-template-viewer.service';\nimport { AXPFormTemplateViewerConnector } from '../viewer-connector.service';\n\n//#endregion\n\n//#region ----- Types -----\n\nexport interface AXMOpenFormTemplateCommandInput {\n data?: {\n id?: string;\n template?: string;\n };\n metadata?: AXPMetaData;\n}\n\nconst MISSING_TEMPLATE_KEY = '@form-template-management:templates.viewer.messages.missing-template';\nconst NOT_FOUND_KEY = '@form-template-management:templates.viewer.messages.not-found';\nconst OPEN_FAILED_KEY = '@form-template-management:templates.viewer.messages.open-failed';\n\n//#endregion\n\n//#region ----- Open form template command -----\n\n@Injectable({ providedIn: 'root' })\nexport class AXMOpenFormTemplateCommand implements AXPCommand<AXMOpenFormTemplateCommandInput> {\n //#region ----- Services & Dependencies -----\n\n private readonly formViewer = inject(AXMFormTemplateViewerService);\n private readonly connector = inject(AXPFormTemplateViewerConnector);\n\n //#endregion\n\n //#region ----- Command Implementation -----\n\n async execute(input: AXMOpenFormTemplateCommandInput = {}): AXPCommandExecuteResultPromise {\n try {\n const data = input.data ?? {};\n const metadata = input.metadata;\n const { id, template } = data;\n\n if (!id && !template) {\n return { success: false, message: { text: MISSING_TEMPLATE_KEY } };\n }\n\n const result = await this.formViewer.open({ id, template, metadata });\n if (result === 'missing') {\n return { success: false, message: { text: MISSING_TEMPLATE_KEY } };\n }\n if (result === 'not-found') {\n return { success: false, message: { text: NOT_FOUND_KEY } };\n }\n if (result.cancelled) {\n return { success: false };\n }\n\n if (id) {\n await this.connector.submit(id, result.context, metadata);\n }\n\n return { success: true, kind: 'object', data: result.context };\n } catch {\n return { success: false, message: { text: OPEN_FAILED_KEY } };\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;AAqBA,MAAM,oBAAoB,GAAG,sEAAsE;AACnG,MAAM,aAAa,GAAG,+DAA+D;AACrF,MAAM,eAAe,GAAG,iEAAiE;AAEzF;AAEA;MAGa,0BAA0B,CAAA;AADvC,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,4BAA4B,CAAC;AACjD,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,8BAA8B,CAAC;AAsCpE,IAAA;;;AAhCC,IAAA,MAAM,OAAO,CAAC,KAAA,GAAyC,EAAE,EAAA;AACvD,QAAA,IAAI;AACF,YA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0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA1B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,0BAA0B,cADb,MAAM,EAAA,CAAA,CAAA;;2FACnB,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBADtC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, Injectable } from '@angular/core';
|
|
3
|
-
import { A as AXMFormTemplateViewerService } from './acorex-platform-module-assessment-management-client-form-template-viewer.service-
|
|
3
|
+
import { A as AXMFormTemplateViewerService } from './acorex-platform-module-assessment-management-client-form-template-viewer.service-C3wctwpK.mjs';
|
|
4
4
|
|
|
5
5
|
const MISSING_TEMPLATE_KEY = '@form-template-management:templates.viewer.messages.missing-template';
|
|
6
6
|
const NOT_FOUND_KEY = '@form-template-management:templates.viewer.messages.not-found';
|
|
@@ -87,4 +87,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
87
87
|
}] });
|
|
88
88
|
|
|
89
89
|
export { AXMPreviewFormTemplateCommand };
|
|
90
|
-
//# sourceMappingURL=acorex-platform-module-assessment-management-client-preview-form-template.command-
|
|
90
|
+
//# sourceMappingURL=acorex-platform-module-assessment-management-client-preview-form-template.command-Co5Y4isL.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-assessment-management-client-preview-form-template.command-
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-assessment-management-client-preview-form-template.command-Co5Y4isL.mjs","sources":["../../../../libs/modules/assessment-management/client/src/lib/features/form-template/viewer/commands/preview-form-template.command.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { inject, Injectable } from '@angular/core';\n\nimport { AXMFormTemplateViewerService } from '../form-template-viewer.service';\n\n//#endregion\n\n//#region ----- Types -----\n\nexport interface AXMPreviewFormTemplateCommandInput {\n templateId?: string;\n templateTitle?: string;\n}\n\ntype AXMPreviewFormTemplateCommandInvocation = AXMPreviewFormTemplateCommandInput & {\n data?: Record<string, unknown>;\n options?: Partial<AXMPreviewFormTemplateCommandInput> & Record<string, unknown>;\n};\n\nconst MISSING_TEMPLATE_KEY = '@form-template-management:templates.viewer.messages.missing-template';\nconst NOT_FOUND_KEY = '@form-template-management:templates.viewer.messages.not-found';\nconst OPEN_FAILED_KEY = '@form-template-management:templates.viewer.messages.open-failed';\n\n//#endregion\n\n//#region ----- Preview form template command -----\n\n/**\n * Opens a form template preview. Answers are not saved.\n */\n@Injectable()\nexport class AXMPreviewFormTemplateCommand implements AXPCommand<AXMPreviewFormTemplateCommandInput, void> {\n //#region ----- Services & Dependencies -----\n\n private readonly formViewer = inject(AXMFormTemplateViewerService);\n\n //#endregion\n\n //#region ----- Command Implementation -----\n\n private resolvePayload(\n input: AXMPreviewFormTemplateCommandInvocation,\n ): AXMPreviewFormTemplateCommandInput | null {\n const ctxOpts = input.options;\n const ctxData = input.data;\n\n const asNonEmptyString = (value: unknown): string | undefined =>\n typeof value === 'string' && value.length > 0 ? value : undefined;\n\n const asDisplayTitle = (value: unknown): string | undefined => {\n const text = asNonEmptyString(value);\n if (text) {\n return text;\n }\n if (value && typeof value === 'object') {\n const record = value as Record<string, unknown>;\n const fromTitle = record['title'];\n if (typeof fromTitle === 'string' && fromTitle.trim()) {\n return fromTitle.trim();\n }\n const fromName = record['name'];\n if (typeof fromName === 'string' && fromName.trim()) {\n return fromName.trim();\n }\n }\n return undefined;\n };\n\n const templateId =\n asNonEmptyString(input.templateId) ??\n asNonEmptyString(ctxOpts?.templateId) ??\n (ctxData?.['id'] != null ? String(ctxData['id']) : undefined);\n\n if (!templateId) {\n return null;\n }\n\n const templateTitle =\n asDisplayTitle(input.templateTitle) ??\n asDisplayTitle(ctxOpts?.templateTitle) ??\n asDisplayTitle(ctxData?.['title']) ??\n asDisplayTitle(ctxData?.['name']);\n\n return { templateId, templateTitle };\n }\n\n async execute(input: AXMPreviewFormTemplateCommandInvocation): AXPCommandExecuteResultPromise<void> {\n try {\n const resolved = this.resolvePayload(input);\n if (!resolved?.templateId) {\n return { success: false, message: { text: MISSING_TEMPLATE_KEY } };\n }\n\n const result = await this.formViewer.open({\n id: resolved.templateId,\n title: resolved.templateTitle,\n previewMode: true,\n });\n\n if (result === 'missing') {\n return { success: false, message: { text: MISSING_TEMPLATE_KEY } };\n }\n if (result === 'not-found') {\n return { success: false, message: { text: NOT_FOUND_KEY } };\n }\n\n return {\n success: true,\n kind: 'object',\n data: undefined,\n metadata: { outcome: result.cancelled ? 'Cancelled' : 'Previewed', refresh: false },\n };\n } catch {\n return { success: false, message: { text: OPEN_FAILED_KEY } };\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;AAqBA,MAAM,oBAAoB,GAAG,sEAAsE;AACnG,MAAM,aAAa,GAAG,+DAA+D;AACrF,MAAM,eAAe,GAAG,iEAAiE;AAEzF;AAEA;AAEA;;AAEG;MAEU,6BAA6B,CAAA;AAD1C,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,4BAA4B,CAAC;AAoFnE,IAAA;;;AA9ES,IAAA,cAAc,CACpB,KAA8C,EAAA;AAE9C,QAAA,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO;AAC7B,QAAA,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI;QAE1B,MAAM,gBAAgB,GAAG,CAAC,KAAc,KACtC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,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AAA,EAAA,CAAA,CAAA;kHAA7B,6BAA6B,EAAA,CAAA,CAAA;;2FAA7B,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBADzC;;;"}
|
|
@@ -3,7 +3,7 @@ import { AXPEntityService } from '@acorex-platform/framework-client/layout/entit
|
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { inject, Injectable } from '@angular/core';
|
|
5
5
|
import { RootConfig } from '@acorex-platform/module-assessment-management-client/contracts';
|
|
6
|
-
import { h as AXMQuestionnaireViewerService } from './acorex-platform-module-assessment-management-client-acorex-platform-module-assessment-management-client-
|
|
6
|
+
import { h as AXMQuestionnaireViewerService } from './acorex-platform-module-assessment-management-client-acorex-platform-module-assessment-management-client-B1yNgUHo.mjs';
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region ---- Preview Question Command ----
|
|
@@ -123,4 +123,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
123
123
|
}] });
|
|
124
124
|
|
|
125
125
|
export { PreviewQuestionCommand };
|
|
126
|
-
//# sourceMappingURL=acorex-platform-module-assessment-management-client-preview-question.command-
|
|
126
|
+
//# sourceMappingURL=acorex-platform-module-assessment-management-client-preview-question.command-D_taUb7J.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-assessment-management-client-preview-question.command-DVnUPcnM.mjs","sources":["../../../../libs/modules/assessment-management/client/src/lib/features/questionnaire-viewer/commands/preview-question.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { AXTranslationService, resolveMultiLanguageString } from '@acorex/core/translation';\nimport { AXPRuntimeCommandResult } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\n\nimport { Injectable, inject } from '@angular/core';\nimport { RootConfig } from '@acorex-platform/module-assessment-management-client/contracts';\nimport type { AXMAssessmentManagementQuestionBankItemEntityModel } from '@acorex-platform/module-assessment-management-client/contracts';\nimport { QuestionnaireBuilderValue } from '@acorex-platform/module-assessment-management-client/contracts';\nimport { AXMQuestionnaireViewerService } from '../questionnaire-viewer.service';\n\n//#endregion\n\n//#region ---- Command Input/Output Types ----\n\n/**\n * Input for PreviewQuestion command.\n * Pass id to load the question bank item (title and structure come from the item).\n * Or pass pre-built structure (e.g. from builder) with optional title.\n */\nexport interface PreviewQuestionCommandInput {\n /** Question bank item id. */\n id?: string;\n /** Pre-built structure; when set, id is not required. */\n structure?: QuestionnaireBuilderValue;\n /** Dialog title when using pre-built structure. */\n title?: string;\n data?: Record<string, unknown>;\n options?: Record<string, unknown>;\n}\n\n//#endregion\n\n//#region ---- Preview Question Command ----\n\n/**\n * Command that opens a preview of a single question in a dialog.\n * Used from the questionnaire builder per-question primary action.\n */\n@Injectable()\nexport class PreviewQuestionCommand implements AXPCommand<PreviewQuestionCommandInput, void> {\n //#region ---- Services & Dependencies ----\n\n private readonly questionnaireViewerService = inject(AXMQuestionnaireViewerService);\n private readonly entityService = inject(AXPEntityService);\n private readonly translationService = inject(AXTranslationService);\n\n //#endregion\n\n //#region ---- Command Implementation ----\n\n private resolveId(input: PreviewQuestionCommandInput): string | undefined {\n const record = input as Record<string, unknown>;\n const ctxData = input.data as Record<string, unknown> | undefined;\n const ctxOptions = input.options as Record<string, unknown> | undefined;\n const asString = (v: unknown): string | undefined => (typeof v === 'string' && v.length > 0 ? v : undefined);\n return (\n asString(input.id) ??\n asString(record['questionBankItemId']) ??\n asString(ctxOptions?.['questionBankItemId']) ??\n asString(ctxData?.['id']) ??\n asString(record['id'])\n );\n }\n\n async execute(input: PreviewQuestionCommandInput): AXPCommandExecuteResultPromise<void> {\n try {\n const id = this.resolveId(input);\n let structure: QuestionnaireBuilderValue | undefined = input.structure;\n let title = input.title;\n\n if (id) {\n const item = await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.questionBankItem.name)\n .data<string, AXMAssessmentManagementQuestionBankItemEntityModel>()\n .byKey(id);\n if (!item) {\n return {\n success: false,\n message: { text: '@assessment-management:commands.preview-question.errors.not-found' },\n };\n }\n const locale = this.translationService.getActiveLang?.() ?? 'en-US';\n const resolvedListTitle = resolveMultiLanguageString(item.title, locale);\n structure = {\n sections: [\n {\n name: `preview-section-${item.id}`,\n title: resolvedListTitle || 'Question',\n description: undefined,\n order: 0,\n items: [\n {\n name: String(item.id),\n questionBankItemId: item.id,\n order: 0,\n isRequired: false,\n interfaceOverride: item.interface,\n } as QuestionnaireBuilderValue['sections'][0]['items'][0],\n ],\n },\n ],\n displaySettings: {\n viewMode: 'single-page',\n showProgressBar: false,\n showQuestionNumbers: false,\n },\n };\n title = resolvedListTitle || undefined;\n }\n\n if (!structure?.sections?.length) {\n return {\n success: false,\n message: { text: '@assessment-management:commands.preview-question.errors.no-structure' },\n };\n }\n\n const totalQuestions =\n structure.sections?.reduce((s: number, sec: { items?: unknown[] }) => s + (sec.items?.length ?? 0), 0) ?? 0;\n if (totalQuestions === 0) {\n return {\n success: false,\n message: { text: '@assessment-management:commands.preview-question.errors.no-question' },\n };\n }\n\n const previewTitleKey = '@assessment-management:question-bank.entities.question-bank-item.actions.preview.title';\n const defaultTitle = (await this.translationService.translateAsync(previewTitleKey)) || 'Preview';\n const dialogTitle = title?.trim() || defaultTitle;\n\n await this.questionnaireViewerService.open({\n title: dialogTitle,\n structure,\n config: { previewMode: true },\n });\n\n return {\n success: true,\n kind: 'object',\n data: undefined,\n message: { text: '' },\n metadata: { refresh: false },\n };\n } catch (error: unknown) {\n const fallback = await this.translationService.translateAsync(\n '@general:messages.generic.error.description',\n );\n const message = error instanceof Error ? error.message : fallback;\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync(\n '@assessment-management:commands.preview-question.errors.failed',\n { params: { message } },\n ),\n },\n };\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;AAiCA;AAEA;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AO,EAAE;AACP,oBAAA,IAAI,EAAE,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAChD,gEAAgE,EAChE,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,EAAE,CACxB;AACF,iBAAA;aACF;QACH;IACF;8GAvHW,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAtB,sBAAsB,EAAA,CAAA,CAAA;;2FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBADlC;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-assessment-management-client-preview-question.command-D_taUb7J.mjs","sources":["../../../../libs/modules/assessment-management/client/src/lib/features/questionnaire-viewer/commands/preview-question.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { AXTranslationService, resolveMultiLanguageString } from '@acorex/core/translation';\nimport { AXPRuntimeCommandResult } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\n\nimport { Injectable, inject } from '@angular/core';\nimport { RootConfig } from '@acorex-platform/module-assessment-management-client/contracts';\nimport type { AXMAssessmentManagementQuestionBankItemEntityModel } from '@acorex-platform/module-assessment-management-client/contracts';\nimport { QuestionnaireBuilderValue } from '@acorex-platform/module-assessment-management-client/contracts';\nimport { AXMQuestionnaireViewerService } from '../questionnaire-viewer.service';\n\n//#endregion\n\n//#region ---- Command Input/Output Types ----\n\n/**\n * Input for PreviewQuestion command.\n * Pass id to load the question bank item (title and structure come from the item).\n * Or pass pre-built structure (e.g. from builder) with optional title.\n */\nexport interface PreviewQuestionCommandInput {\n /** Question bank item id. */\n id?: string;\n /** Pre-built structure; when set, id is not required. */\n structure?: QuestionnaireBuilderValue;\n /** Dialog title when using pre-built structure. */\n title?: string;\n data?: Record<string, unknown>;\n options?: Record<string, unknown>;\n}\n\n//#endregion\n\n//#region ---- Preview Question Command ----\n\n/**\n * Command that opens a preview of a single question in a dialog.\n * Used from the questionnaire builder per-question primary action.\n */\n@Injectable()\nexport class PreviewQuestionCommand implements AXPCommand<PreviewQuestionCommandInput, void> {\n //#region ---- Services & Dependencies ----\n\n private readonly questionnaireViewerService = inject(AXMQuestionnaireViewerService);\n private readonly entityService = inject(AXPEntityService);\n private readonly translationService = inject(AXTranslationService);\n\n //#endregion\n\n //#region ---- Command Implementation ----\n\n private resolveId(input: PreviewQuestionCommandInput): string | undefined {\n const record = input as Record<string, unknown>;\n const ctxData = input.data as Record<string, unknown> | undefined;\n const ctxOptions = input.options as Record<string, unknown> | undefined;\n const asString = (v: unknown): string | undefined => (typeof v === 'string' && v.length > 0 ? v : undefined);\n return (\n asString(input.id) ??\n asString(record['questionBankItemId']) ??\n asString(ctxOptions?.['questionBankItemId']) ??\n asString(ctxData?.['id']) ??\n asString(record['id'])\n );\n }\n\n async execute(input: PreviewQuestionCommandInput): AXPCommandExecuteResultPromise<void> {\n try {\n const id = this.resolveId(input);\n let structure: QuestionnaireBuilderValue | undefined = input.structure;\n let title = input.title;\n\n if (id) {\n const item = await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.questionBankItem.name)\n .data<string, AXMAssessmentManagementQuestionBankItemEntityModel>()\n .byKey(id);\n if (!item) {\n return {\n success: false,\n message: { text: '@assessment-management:commands.preview-question.errors.not-found' },\n };\n }\n const locale = this.translationService.getActiveLang?.() ?? 'en-US';\n const resolvedListTitle = resolveMultiLanguageString(item.title, locale);\n structure = {\n sections: [\n {\n name: `preview-section-${item.id}`,\n title: resolvedListTitle || 'Question',\n description: undefined,\n order: 0,\n items: [\n {\n name: String(item.id),\n questionBankItemId: item.id,\n order: 0,\n isRequired: false,\n interfaceOverride: item.interface,\n } as QuestionnaireBuilderValue['sections'][0]['items'][0],\n ],\n },\n ],\n displaySettings: {\n viewMode: 'single-page',\n showProgressBar: false,\n showQuestionNumbers: false,\n },\n };\n title = resolvedListTitle || undefined;\n }\n\n if (!structure?.sections?.length) {\n return {\n success: false,\n message: { text: '@assessment-management:commands.preview-question.errors.no-structure' },\n };\n }\n\n const totalQuestions =\n structure.sections?.reduce((s: number, sec: { items?: unknown[] }) => s + (sec.items?.length ?? 0), 0) ?? 0;\n if (totalQuestions === 0) {\n return {\n success: false,\n message: { text: '@assessment-management:commands.preview-question.errors.no-question' },\n };\n }\n\n const previewTitleKey = '@assessment-management:question-bank.entities.question-bank-item.actions.preview.title';\n const defaultTitle = (await this.translationService.translateAsync(previewTitleKey)) || 'Preview';\n const dialogTitle = title?.trim() || defaultTitle;\n\n await this.questionnaireViewerService.open({\n title: dialogTitle,\n structure,\n config: { previewMode: true },\n });\n\n return {\n success: true,\n kind: 'object',\n data: undefined,\n message: { text: '' },\n metadata: { refresh: false },\n };\n } catch (error: unknown) {\n const fallback = await this.translationService.translateAsync(\n '@general:messages.generic.error.description',\n );\n const message = error instanceof Error ? error.message : fallback;\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync(\n '@assessment-management:commands.preview-question.errors.failed',\n { params: { message } },\n ),\n },\n };\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;AAiCA;AAEA;AAEA;;;AAGG;MAEU,sBAAsB,CAAA;AADnC,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,0BAA0B,GAAG,MAAM,CAAC,6BAA6B,CAAC;AAClE,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACxC,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAqHnE,IAAA;;;AA/GS,IAAA,SAAS,CAAC,KAAkC,EAAA;QAClD,MAAM,MAAM,GAAG,KAAgC;AAC/C,QAAA,MAAM,OAAO,GAAG,KAAK,CAAC,IAA2C;AACjE,QAAA,MAAM,UAAU,GAAG,KAAK,CAAC,OAA8C;QACvE,MAAM,QAAQ,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';
|
|
3
3
|
import { inject, Injectable } from '@angular/core';
|
|
4
4
|
import { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';
|
|
5
|
-
import { h as AXMQuestionnaireViewerService, g as formatQuestionnairePreviewDialogTitle } from './acorex-platform-module-assessment-management-client-acorex-platform-module-assessment-management-client-
|
|
5
|
+
import { h as AXMQuestionnaireViewerService, g as formatQuestionnairePreviewDialogTitle } from './acorex-platform-module-assessment-management-client-acorex-platform-module-assessment-management-client-B1yNgUHo.mjs';
|
|
6
6
|
import { RootConfig, toPrePostConfig, toDisplaySettings, toPrintSettings } from '@acorex-platform/module-assessment-management-client/contracts';
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
@@ -161,4 +161,4 @@ function asEntityId(value) {
|
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
export { AXPPreviewQuestionnaireCommand };
|
|
164
|
-
//# sourceMappingURL=acorex-platform-module-assessment-management-client-preview-questionnaire.command-
|
|
164
|
+
//# sourceMappingURL=acorex-platform-module-assessment-management-client-preview-questionnaire.command-DgGL1AS5.mjs.map
|