@acorex-platform/module-software-management-client 1.0.1 → 2.0.0-beta.0
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-software-management-client-accept-software-suggestion.command-DVcM5TTv.mjs → acorex-platform-module-software-management-client-accept-software-suggestion.command-BzPDjIw0.mjs} +7 -6
- package/fesm2022/acorex-platform-module-software-management-client-accept-software-suggestion.command-BzPDjIw0.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-behavior-specification.commands-4rkD2uP9.mjs +212 -0
- package/fesm2022/acorex-platform-module-software-management-client-behavior-specification.commands-4rkD2uP9.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-behavior-task.activities-WmCC3-3L.mjs +79 -0
- package/fesm2022/acorex-platform-module-software-management-client-behavior-task.activities-WmCC3-3L.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-complete-software-phase.activity-C61GUc78.mjs +512 -0
- package/fesm2022/acorex-platform-module-software-management-client-complete-software-phase.activity-C61GUc78.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-acceptance-criterion.entity-CHEusZ4z.mjs +62 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-acceptance-criterion.entity-CHEusZ4z.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-business-rule.entity-Cew1yY4A.mjs +76 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-business-rule.entity-Cew1yY4A.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-design-decision.entity-BDRnAUj9.mjs +94 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-design-decision.entity-BDRnAUj9.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-discovery-item.entity-Ah5hlc5n.mjs +71 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-discovery-item.entity-Ah5hlc5n.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-feature.entity-D9es0yAv.mjs +49 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-feature.entity-D9es0yAv.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-module.entity-E9XKlo1v.mjs +26 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-module.entity-E9XKlo1v.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-requirement.entity-DKr-En_J.mjs +86 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-requirement.entity-DKr-En_J.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-scope-item.entity-D25tkUvi.mjs +73 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-scope-item.entity-D25tkUvi.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-software-entity.util-sRHl21Jh.mjs +281 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-software-entity.util-sRHl21Jh.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-software.entity-DfeM7KfF.mjs +751 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-software.entity-DfeM7KfF.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-use-case.entity-dPBFz-xN.mjs +92 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts-use-case.entity-dPBFz-xN.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-contracts.mjs +2709 -156
- package/fesm2022/acorex-platform-module-software-management-client-contracts.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-software-management-client-delivery-plan.commands-ccrjppbE.mjs +212 -0
- package/fesm2022/acorex-platform-module-software-management-client-delivery-plan.commands-ccrjppbE.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-delivery-task.activities-L955X3RX.mjs +216 -0
- package/fesm2022/acorex-platform-module-software-management-client-delivery-task.activities-L955X3RX.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-design-document.commands-BDE3x0KG.mjs +212 -0
- package/fesm2022/acorex-platform-module-software-management-client-design-document.commands-BDE3x0KG.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-design-task.activities-Cra2LNal.mjs +79 -0
- package/fesm2022/acorex-platform-module-software-management-client-design-task.activities-Cra2LNal.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-software-management-client-discovery-kickoff.commands-gB0_htfF.mjs → acorex-platform-module-software-management-client-discovery-kickoff.commands-BZxzDJs9.mjs} +4 -2
- package/fesm2022/{acorex-platform-module-software-management-client-discovery-kickoff.commands-gB0_htfF.mjs.map → acorex-platform-module-software-management-client-discovery-kickoff.commands-BZxzDJs9.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-software-management-client-discovery-report.commands-D2ricLpq.mjs → acorex-platform-module-software-management-client-discovery-report.commands-C9GKrnHs.mjs} +3 -2
- package/fesm2022/acorex-platform-module-software-management-client-discovery-report.commands-C9GKrnHs.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-discovery-task.activities-PIJEUza7.mjs +228 -0
- package/fesm2022/acorex-platform-module-software-management-client-discovery-task.activities-PIJEUza7.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-software-management-client-introduction-exit-message.util-DShFM8MY.mjs → acorex-platform-module-software-management-client-introduction-exit-message.util-cYtN92HY.mjs} +1 -1
- package/fesm2022/{acorex-platform-module-software-management-client-introduction-exit-message.util-DShFM8MY.mjs.map → acorex-platform-module-software-management-client-introduction-exit-message.util-cYtN92HY.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-software-management-client-introduction-task.activities-BOsJbeJe.mjs → acorex-platform-module-software-management-client-introduction-task.activities-DQPpsJaH.mjs} +78 -3
- package/fesm2022/acorex-platform-module-software-management-client-introduction-task.activities-DQPpsJaH.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-scope-document.commands-oLGsbLoA.mjs +212 -0
- package/fesm2022/acorex-platform-module-software-management-client-scope-document.commands-oLGsbLoA.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-software-management-client-scope-task.activities-BCSPq0eO.mjs +79 -0
- package/fesm2022/acorex-platform-module-software-management-client-scope-task.activities-BCSPq0eO.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-software-management-client-software-command.util-BsoKQCX5.mjs → acorex-platform-module-software-management-client-software-command.util-CvlYk7tC.mjs} +1 -1
- package/fesm2022/{acorex-platform-module-software-management-client-software-command.util-BsoKQCX5.mjs.map → acorex-platform-module-software-management-client-software-command.util-CvlYk7tC.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-software-management-client-start-software-definition-flow.command-B0YCgv2V.mjs → acorex-platform-module-software-management-client-start-software-definition-flow.command-BfxtMIGb.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-software-management-client-start-software-definition-flow.command-B0YCgv2V.mjs.map → acorex-platform-module-software-management-client-start-software-definition-flow.command-BfxtMIGb.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-software-management-client.mjs +400 -32
- package/fesm2022/acorex-platform-module-software-management-client.mjs.map +1 -1
- package/i18n/en-AU/software-management.json +473 -24
- package/i18n/en-US/software-management.json +473 -24
- package/i18n/fa-IR/software-management.json +474 -25
- package/package.json +1 -1
- package/types/acorex-platform-module-software-management-client-contracts.d.ts +640 -11
- package/fesm2022/acorex-platform-module-software-management-client-accept-software-suggestion.command-DVcM5TTv.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-software-management-client-complete-software-phase.activity-C56HhK20.mjs +0 -182
- package/fesm2022/acorex-platform-module-software-management-client-complete-software-phase.activity-C56HhK20.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-software-management-client-discovery-report.commands-D2ricLpq.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-software-management-client-introduction-task.activities-BOsJbeJe.mjs.map +0 -1
|
@@ -2,10 +2,10 @@ import { AXToastService } from '@acorex/components/toast';
|
|
|
2
2
|
import { AXTranslationService } from '@acorex/core/translation';
|
|
3
3
|
import { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';
|
|
4
4
|
import { resolveEntityActionRef } from '@acorex-platform/framework-shared/runtime';
|
|
5
|
-
import { RootConfig } from '@acorex-platform/module-software-management-client/contracts';
|
|
5
|
+
import { RootConfig, isSoftwareDiscoveryKind, DISCOVERY_KIND_INVALID_REASON } from '@acorex-platform/module-software-management-client/contracts';
|
|
6
6
|
import * as i0 from '@angular/core';
|
|
7
7
|
import { inject, Injectable } from '@angular/core';
|
|
8
|
-
import { r as resolveSoftwareText } from './acorex-platform-module-software-management-client-software-command.util-
|
|
8
|
+
import { r as resolveSoftwareText } from './acorex-platform-module-software-management-client-software-command.util-CvlYk7tC.mjs';
|
|
9
9
|
|
|
10
10
|
//#region ---- Imports ----
|
|
11
11
|
//#endregion
|
|
@@ -56,11 +56,12 @@ class AcceptSoftwareSuggestionCommand {
|
|
|
56
56
|
});
|
|
57
57
|
return { success: false };
|
|
58
58
|
}
|
|
59
|
+
const kindIsAllowed = isSoftwareDiscoveryKind(record.kind);
|
|
59
60
|
await this.entityService.withEntity(moduleName, entityName).data().update(refId, {
|
|
60
|
-
origin: '
|
|
61
|
+
origin: 'original',
|
|
61
62
|
acceptedAt: new Date().toISOString(),
|
|
62
|
-
needsReview: false,
|
|
63
|
-
reviewReason: '',
|
|
63
|
+
needsReview: kindIsAllowed ? false : true,
|
|
64
|
+
reviewReason: kindIsAllowed ? '' : record.reviewReason || DISCOVERY_KIND_INVALID_REASON,
|
|
64
65
|
});
|
|
65
66
|
this.toastService.show({
|
|
66
67
|
color: 'success',
|
|
@@ -80,4 +81,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
80
81
|
}] });
|
|
81
82
|
|
|
82
83
|
export { AcceptSoftwareSuggestionCommand };
|
|
83
|
-
//# sourceMappingURL=acorex-platform-module-software-management-client-accept-software-suggestion.command-
|
|
84
|
+
//# sourceMappingURL=acorex-platform-module-software-management-client-accept-software-suggestion.command-BzPDjIw0.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-software-management-client-accept-software-suggestion.command-BzPDjIw0.mjs","sources":["../../../../libs/modules/software-management/client/src/lib/commands/accept-software-suggestion.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPCommand, resolveEntityActionRef, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport {\n DISCOVERY_KIND_INVALID_REASON,\n isSoftwareDiscoveryKind,\n RootConfig,\n} from '@acorex-platform/module-software-management-client/contracts';\nimport { inject, Injectable } from '@angular/core';\n\nimport { resolveSoftwareText } from './software-command.util';\n\n//#endregion\n\n@Injectable({ providedIn: 'root' })\nexport class AcceptSoftwareSuggestionCommand implements AXPCommand<unknown, void> {\n //#region ---- Services & Dependencies ----\n\n private readonly entityService = inject(AXPEntityService);\n private readonly toastService = inject(AXToastService);\n private readonly translationService = inject(AXTranslationService);\n\n //#endregion\n\n //#region ---- Command Implementation ----\n\n async execute(input: unknown): AXPCommandExecuteResultPromise<void> {\n const resolved = resolveEntityActionRef(input);\n const refType = resolveSoftwareText(resolved?.refType);\n const refId = resolveSoftwareText(resolved?.refId);\n if (!refType || !refId) {\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync(\n '@software-management:messages.accept-suggestion.ref-required',\n ),\n },\n };\n }\n\n const [moduleName, entityName] = refType.split('.');\n if (moduleName !== RootConfig.module.name || !entityName) {\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync(\n '@software-management:messages.accept-suggestion.unsupported',\n ),\n },\n };\n }\n\n const record = (await this.entityService\n .withEntity(moduleName, entityName)\n .data()\n .byKey(refId)) as { origin?: string; kind?: string; needsReview?: boolean; reviewReason?: string } | null;\n\n if (!record) {\n return { success: false, message: { text: 'Record not found' } };\n }\n\n if (record.origin !== 'suggestion') {\n this.toastService.show({\n color: 'warning',\n title: await this.translationService.translateAsync('@general:messages.generic.warning.title'),\n content: await this.translationService.translateAsync(\n '@software-management:messages.accept-suggestion.not-suggestion',\n ),\n closeButton: true,\n timeOut: 5000,\n });\n return { success: false };\n }\n\n const kindIsAllowed = isSoftwareDiscoveryKind(record.kind);\n await this.entityService.withEntity(moduleName, entityName).data().update(refId, {\n origin: 'original',\n acceptedAt: new Date().toISOString(),\n needsReview: kindIsAllowed ? false : true,\n reviewReason: kindIsAllowed ? '' : record.reviewReason || DISCOVERY_KIND_INVALID_REASON,\n } as never);\n\n this.toastService.show({\n color: 'success',\n title: await this.translationService.translateAsync('@general:messages.generic.success.title'),\n content: await this.translationService.translateAsync(\n '@software-management:messages.accept-suggestion.accepted',\n ),\n closeButton: true,\n timeOut: 4000,\n });\n\n return { success: true, kind: 'object', data: undefined };\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;;AAAA;AAeA;MAGa,+BAA+B,CAAA;AAD5C,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACxC,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;AACrC,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AA6EnE,IAAA;;;IAvEC,MAAM,OAAO,CAAC,KAAc,EAAA;AAC1B,QAAA,MAAM,QAAQ,GAAG,sBAAsB,CAAC,KAAK,CAAC;QAC9C,MAAM,OAAO,GAAG,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC;QACtD,MAAM,KAAK,GAAG,mBAAmB,CAAC,QAAQ,EAAE,KAAK,CAAC;AAClD,QAAA,IAAI,CAAC,OAAO,IAAI,CAAC,KAAK,EAAE;YACtB,OAAO;AACL,gBAAA,OAAO,EAAE,KAAK;AACd,gBAA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/toast';
|
|
2
|
+
import { AXTranslationService } from '@acorex/core/translation';
|
|
3
|
+
import { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';
|
|
4
|
+
import { AXPLayoutBuilderService } from '@acorex-platform/framework-client/layout/builder';
|
|
5
|
+
import { AXPCommandExecutor } from '@acorex-platform/framework-client/runtime';
|
|
6
|
+
import { resolveMultiLanguageString, runtimeCommandPayloadData } from '@acorex-platform/framework-shared/core';
|
|
7
|
+
import { resolveEntityActionRef } from '@acorex-platform/framework-shared/runtime';
|
|
8
|
+
import { AXPSoftwareManagementCommandKeys, kickoffText, RootConfig, kickoffPlainTextFromVersion } from '@acorex-platform/module-software-management-client/contracts';
|
|
9
|
+
import * as i0 from '@angular/core';
|
|
10
|
+
import { inject, Injectable } from '@angular/core';
|
|
11
|
+
import { r as resolveSoftwareText } from './acorex-platform-module-software-management-client-software-command.util-CvlYk7tC.mjs';
|
|
12
|
+
|
|
13
|
+
//#region ----- Imports -----
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region ----- Helpers -----
|
|
16
|
+
function resolveSoftwareId(input) {
|
|
17
|
+
const resolved = resolveEntityActionRef(input);
|
|
18
|
+
const fromRef = resolveSoftwareText(resolved?.refId);
|
|
19
|
+
if (fromRef) {
|
|
20
|
+
return fromRef;
|
|
21
|
+
}
|
|
22
|
+
if (!input || typeof input !== 'object') {
|
|
23
|
+
return '';
|
|
24
|
+
}
|
|
25
|
+
const row = input;
|
|
26
|
+
return resolveSoftwareText(row['softwareId']) || resolveSoftwareText(row['id']);
|
|
27
|
+
}
|
|
28
|
+
function messageText(result) {
|
|
29
|
+
return resolveMultiLanguageString(result?.message?.text, 'en-US').trim();
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region ----- Remote behavior commands -----
|
|
33
|
+
class BehaviorDocumentRemoteCommand {
|
|
34
|
+
constructor() {
|
|
35
|
+
this.executor = inject(AXPCommandExecutor);
|
|
36
|
+
this.toast = inject(AXToastService);
|
|
37
|
+
this.i18n = inject(AXTranslationService);
|
|
38
|
+
}
|
|
39
|
+
async execute(input) {
|
|
40
|
+
const softwareId = resolveSoftwareId(input);
|
|
41
|
+
if (!softwareId) {
|
|
42
|
+
const text = await this.i18n.translateAsync('@software-management:messages.kickoff.id-required');
|
|
43
|
+
this.toast.show({ color: 'warning', title: text, content: text, closeButton: true, timeOut: 5000 });
|
|
44
|
+
return { success: false, message: { text } };
|
|
45
|
+
}
|
|
46
|
+
const result = await this.executor.executeRemote(this.commandKey, {
|
|
47
|
+
softwareId,
|
|
48
|
+
locale: this.i18n.getActiveLang?.() ?? 'en-US',
|
|
49
|
+
});
|
|
50
|
+
const text = await this.translateMessage(messageText(result));
|
|
51
|
+
if (!result?.success) {
|
|
52
|
+
this.toast.show({ color: 'warning', title: text, content: text, closeButton: true, timeOut: 6000 });
|
|
53
|
+
return { success: false, message: { text } };
|
|
54
|
+
}
|
|
55
|
+
await this.afterSuccess(runtimeCommandPayloadData(result) ?? undefined);
|
|
56
|
+
this.toast.show({ color: 'success', title: text, content: text, closeButton: true, timeOut: 6000 });
|
|
57
|
+
return result;
|
|
58
|
+
}
|
|
59
|
+
async afterSuccess(data) {
|
|
60
|
+
void data;
|
|
61
|
+
}
|
|
62
|
+
async translateMessage(text) {
|
|
63
|
+
if (!text) {
|
|
64
|
+
return this.i18n.translateAsync('@software-management:messages.behavior.failed');
|
|
65
|
+
}
|
|
66
|
+
if (text.startsWith('@')) {
|
|
67
|
+
return this.i18n.translateAsync(text);
|
|
68
|
+
}
|
|
69
|
+
return text;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
class GenerateBehaviorDocumentCommand extends BehaviorDocumentRemoteCommand {
|
|
73
|
+
constructor() {
|
|
74
|
+
super(...arguments);
|
|
75
|
+
this.commandKey = AXPSoftwareManagementCommandKeys.Software.GenerateBehaviorDocument;
|
|
76
|
+
}
|
|
77
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: GenerateBehaviorDocumentCommand, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
78
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: GenerateBehaviorDocumentCommand, providedIn: 'root' }); }
|
|
79
|
+
}
|
|
80
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: GenerateBehaviorDocumentCommand, decorators: [{
|
|
81
|
+
type: Injectable,
|
|
82
|
+
args: [{ providedIn: 'root' }]
|
|
83
|
+
}] });
|
|
84
|
+
class SubmitBehaviorDocumentCommand extends BehaviorDocumentRemoteCommand {
|
|
85
|
+
constructor() {
|
|
86
|
+
super(...arguments);
|
|
87
|
+
this.commandKey = AXPSoftwareManagementCommandKeys.Software.SubmitBehaviorDocument;
|
|
88
|
+
}
|
|
89
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SubmitBehaviorDocumentCommand, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
90
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SubmitBehaviorDocumentCommand, providedIn: 'root' }); }
|
|
91
|
+
}
|
|
92
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SubmitBehaviorDocumentCommand, decorators: [{
|
|
93
|
+
type: Injectable,
|
|
94
|
+
args: [{ providedIn: 'root' }]
|
|
95
|
+
}] });
|
|
96
|
+
class ExportBehaviorPdfCommand extends BehaviorDocumentRemoteCommand {
|
|
97
|
+
constructor() {
|
|
98
|
+
super(...arguments);
|
|
99
|
+
this.commandKey = AXPSoftwareManagementCommandKeys.Software.ExportBehaviorPdf;
|
|
100
|
+
}
|
|
101
|
+
async afterSuccess(data) {
|
|
102
|
+
const base64 = kickoffText(data?.['base64']);
|
|
103
|
+
if (!base64 || typeof document === 'undefined') {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
const binary = atob(base64);
|
|
107
|
+
const bytes = new Uint8Array(binary.length);
|
|
108
|
+
for (let index = 0; index < binary.length; index += 1) {
|
|
109
|
+
bytes[index] = binary.charCodeAt(index);
|
|
110
|
+
}
|
|
111
|
+
const blob = new Blob([bytes], { type: 'application/pdf' });
|
|
112
|
+
const url = URL.createObjectURL(blob);
|
|
113
|
+
const anchor = document.createElement('a');
|
|
114
|
+
anchor.href = url;
|
|
115
|
+
anchor.download = kickoffText(data?.['filename']) || 'behavior-specification.pdf';
|
|
116
|
+
anchor.click();
|
|
117
|
+
URL.revokeObjectURL(url);
|
|
118
|
+
}
|
|
119
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ExportBehaviorPdfCommand, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
120
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ExportBehaviorPdfCommand, providedIn: 'root' }); }
|
|
121
|
+
}
|
|
122
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ExportBehaviorPdfCommand, decorators: [{
|
|
123
|
+
type: Injectable,
|
|
124
|
+
args: [{ providedIn: 'root' }]
|
|
125
|
+
}] });
|
|
126
|
+
//#endregion
|
|
127
|
+
//#region ----- Read the pinned scope and open the behavior document -----
|
|
128
|
+
class ViewPinnedScopeCommand {
|
|
129
|
+
constructor() {
|
|
130
|
+
this.entityService = inject(AXPEntityService);
|
|
131
|
+
this.layoutBuilder = inject(AXPLayoutBuilderService);
|
|
132
|
+
this.toast = inject(AXToastService);
|
|
133
|
+
this.i18n = inject(AXTranslationService);
|
|
134
|
+
}
|
|
135
|
+
async execute(input) {
|
|
136
|
+
const softwareId = resolveSoftwareId(input);
|
|
137
|
+
const software = softwareId
|
|
138
|
+
? (await this.entityService
|
|
139
|
+
.withEntity(RootConfig.module.name, RootConfig.entities.software.name)
|
|
140
|
+
.data()
|
|
141
|
+
.byKey(softwareId))
|
|
142
|
+
: null;
|
|
143
|
+
const versionId = kickoffText(software?.scopeApprovedVersionId);
|
|
144
|
+
if (!versionId) {
|
|
145
|
+
const text = await this.i18n.translateAsync('@software-management:messages.behavior.pinned-scope-missing');
|
|
146
|
+
this.toast.show({ color: 'warning', title: text, content: text, closeButton: true, timeOut: 5000 });
|
|
147
|
+
return { success: false, message: { text } };
|
|
148
|
+
}
|
|
149
|
+
const version = (await this.entityService
|
|
150
|
+
.withEntity('DocumentManagement', 'DocumentVersion')
|
|
151
|
+
.data()
|
|
152
|
+
.byKey(versionId));
|
|
153
|
+
const text = kickoffPlainTextFromVersion(version);
|
|
154
|
+
await this.layoutBuilder
|
|
155
|
+
.create()
|
|
156
|
+
.dialog((dialog) => {
|
|
157
|
+
dialog
|
|
158
|
+
.setTitle('@software-management:actions.view-pinned-scope.title')
|
|
159
|
+
.setSize('lg')
|
|
160
|
+
.setCloseButton(true)
|
|
161
|
+
.setContext({ text })
|
|
162
|
+
.content((flex) => {
|
|
163
|
+
flex.customWidget('text-block-layout', { content: text || versionId });
|
|
164
|
+
})
|
|
165
|
+
.setActions((actions) => {
|
|
166
|
+
actions.cancel('@general:actions.cancel.title');
|
|
167
|
+
});
|
|
168
|
+
})
|
|
169
|
+
.show();
|
|
170
|
+
return { success: true, kind: 'object', data: { versionId } };
|
|
171
|
+
}
|
|
172
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ViewPinnedScopeCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
173
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ViewPinnedScopeCommand, providedIn: 'root' }); }
|
|
174
|
+
}
|
|
175
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ViewPinnedScopeCommand, decorators: [{
|
|
176
|
+
type: Injectable,
|
|
177
|
+
args: [{ providedIn: 'root' }]
|
|
178
|
+
}] });
|
|
179
|
+
class OpenBehaviorDocumentCommand {
|
|
180
|
+
constructor() {
|
|
181
|
+
this.entityService = inject(AXPEntityService);
|
|
182
|
+
this.executor = inject(AXPCommandExecutor);
|
|
183
|
+
this.toast = inject(AXToastService);
|
|
184
|
+
this.i18n = inject(AXTranslationService);
|
|
185
|
+
}
|
|
186
|
+
async execute(input) {
|
|
187
|
+
const softwareId = resolveSoftwareId(input);
|
|
188
|
+
const software = softwareId
|
|
189
|
+
? (await this.entityService
|
|
190
|
+
.withEntity(RootConfig.module.name, RootConfig.entities.software.name)
|
|
191
|
+
.data()
|
|
192
|
+
.byKey(softwareId))
|
|
193
|
+
: null;
|
|
194
|
+
const documentId = kickoffText(software?.behaviorDocumentId);
|
|
195
|
+
if (!documentId) {
|
|
196
|
+
const text = await this.i18n.translateAsync('@software-management:messages.behavior.missing-document');
|
|
197
|
+
this.toast.show({ color: 'warning', title: text, content: text, closeButton: true, timeOut: 5000 });
|
|
198
|
+
return { success: false, message: { text } };
|
|
199
|
+
}
|
|
200
|
+
await this.executor.execute('DocumentManagement.Document:Open', { documentId });
|
|
201
|
+
return { success: true, kind: 'object', data: { documentId } };
|
|
202
|
+
}
|
|
203
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: OpenBehaviorDocumentCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
204
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: OpenBehaviorDocumentCommand, providedIn: 'root' }); }
|
|
205
|
+
}
|
|
206
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: OpenBehaviorDocumentCommand, decorators: [{
|
|
207
|
+
type: Injectable,
|
|
208
|
+
args: [{ providedIn: 'root' }]
|
|
209
|
+
}] });
|
|
210
|
+
|
|
211
|
+
export { ExportBehaviorPdfCommand, GenerateBehaviorDocumentCommand, OpenBehaviorDocumentCommand, SubmitBehaviorDocumentCommand, ViewPinnedScopeCommand };
|
|
212
|
+
//# sourceMappingURL=acorex-platform-module-software-management-client-behavior-specification.commands-4rkD2uP9.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-software-management-client-behavior-specification.commands-4rkD2uP9.mjs","sources":["../../../../libs/modules/software-management/client/src/lib/commands/behavior-specification.commands.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPLayoutBuilderService } from '@acorex-platform/framework-client/layout/builder';\nimport { AXPCommandExecutor } from '@acorex-platform/framework-client/runtime';\nimport { resolveMultiLanguageString, runtimeCommandPayloadData } from '@acorex-platform/framework-shared/core';\nimport {\n AXPCommand,\n resolveEntityActionRef,\n type AXPCommandExecuteResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n AXPSoftwareManagementCommandKeys,\n kickoffPlainTextFromVersion,\n kickoffText,\n RootConfig,\n type AXMSoftwareManagementSoftwareEntityModel,\n} from '@acorex-platform/module-software-management-client/contracts';\nimport { inject, Injectable } from '@angular/core';\n\nimport { resolveSoftwareText } from './software-command.util';\n\n//#endregion\n\n//#region ----- Helpers -----\n\nfunction resolveSoftwareId(input: unknown): string {\n const resolved = resolveEntityActionRef(input);\n const fromRef = resolveSoftwareText(resolved?.refId);\n if (fromRef) {\n return fromRef;\n }\n if (!input || typeof input !== 'object') {\n return '';\n }\n const row = input as Record<string, unknown>;\n return resolveSoftwareText(row['softwareId']) || resolveSoftwareText(row['id']);\n}\n\nfunction messageText(result: { message?: { text?: unknown } } | null | undefined): string {\n return resolveMultiLanguageString(result?.message?.text, 'en-US').trim();\n}\n\n//#endregion\n\n//#region ----- Remote behavior commands -----\n\nabstract class BehaviorDocumentRemoteCommand implements AXPCommand<unknown, unknown> {\n protected readonly executor = inject(AXPCommandExecutor);\n protected readonly toast = inject(AXToastService);\n protected readonly i18n = inject(AXTranslationService);\n\n protected abstract readonly commandKey: string;\n\n async execute(input: unknown): AXPCommandExecuteResultPromise<unknown> {\n const softwareId = resolveSoftwareId(input);\n if (!softwareId) {\n const text = await this.i18n.translateAsync('@software-management:messages.kickoff.id-required');\n this.toast.show({ color: 'warning', title: text, content: text, closeButton: true, timeOut: 5000 });\n return { success: false, message: { text } };\n }\n\n const result = await this.executor.executeRemote<unknown, Record<string, unknown>>(this.commandKey, {\n softwareId,\n locale: this.i18n.getActiveLang?.() ?? 'en-US',\n });\n const text = await this.translateMessage(messageText(result));\n if (!result?.success) {\n this.toast.show({ color: 'warning', title: text, content: text, closeButton: true, timeOut: 6000 });\n return { success: false, message: { text } };\n }\n await this.afterSuccess(runtimeCommandPayloadData(result) ?? undefined);\n this.toast.show({ color: 'success', title: text, content: text, closeButton: true, timeOut: 6000 });\n return result;\n }\n\n protected async afterSuccess(data?: Record<string, unknown>): Promise<void> {\n void data;\n }\n\n private async translateMessage(text: string): Promise<string> {\n if (!text) {\n return this.i18n.translateAsync('@software-management:messages.behavior.failed');\n }\n if (text.startsWith('@')) {\n return this.i18n.translateAsync(text);\n }\n return text;\n }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class GenerateBehaviorDocumentCommand extends BehaviorDocumentRemoteCommand {\n protected readonly commandKey = AXPSoftwareManagementCommandKeys.Software.GenerateBehaviorDocument;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class SubmitBehaviorDocumentCommand extends BehaviorDocumentRemoteCommand {\n protected readonly commandKey = AXPSoftwareManagementCommandKeys.Software.SubmitBehaviorDocument;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ExportBehaviorPdfCommand extends BehaviorDocumentRemoteCommand {\n protected readonly commandKey = AXPSoftwareManagementCommandKeys.Software.ExportBehaviorPdf;\n\n protected override async afterSuccess(data: Record<string, unknown> | undefined): Promise<void> {\n const base64 = kickoffText(data?.['base64']);\n if (!base64 || typeof document === 'undefined') {\n return;\n }\n const binary = atob(base64);\n const bytes = new Uint8Array(binary.length);\n for (let index = 0; index < binary.length; index += 1) {\n bytes[index] = binary.charCodeAt(index);\n }\n const blob = new Blob([bytes], { type: 'application/pdf' });\n const url = URL.createObjectURL(blob);\n const anchor = document.createElement('a');\n anchor.href = url;\n anchor.download = kickoffText(data?.['filename']) || 'behavior-specification.pdf';\n anchor.click();\n URL.revokeObjectURL(url);\n }\n}\n\n//#endregion\n\n//#region ----- Read the pinned scope and open the behavior document -----\n\n@Injectable({ providedIn: 'root' })\nexport class ViewPinnedScopeCommand implements AXPCommand<unknown, { versionId: string }> {\n private readonly entityService = inject(AXPEntityService);\n private readonly layoutBuilder = inject(AXPLayoutBuilderService);\n private readonly toast = inject(AXToastService);\n private readonly i18n = inject(AXTranslationService);\n\n async execute(input: unknown): AXPCommandExecuteResultPromise<{ versionId: string }> {\n const softwareId = resolveSoftwareId(input);\n const software = softwareId\n ? ((await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.software.name)\n .data()\n .byKey(softwareId)) as AXMSoftwareManagementSoftwareEntityModel | null)\n : null;\n const versionId = kickoffText(software?.scopeApprovedVersionId);\n if (!versionId) {\n const text = await this.i18n.translateAsync('@software-management:messages.behavior.pinned-scope-missing');\n this.toast.show({ color: 'warning', title: text, content: text, closeButton: true, timeOut: 5000 });\n return { success: false, message: { text } };\n }\n const version = (await this.entityService\n .withEntity('DocumentManagement', 'DocumentVersion')\n .data()\n .byKey(versionId)) as { metaDataForm?: unknown } | null;\n const text = kickoffPlainTextFromVersion(version);\n await this.layoutBuilder\n .create()\n .dialog((dialog) => {\n dialog\n .setTitle('@software-management:actions.view-pinned-scope.title')\n .setSize('lg')\n .setCloseButton(true)\n .setContext({ text })\n .content((flex) => {\n flex.customWidget('text-block-layout', { content: text || versionId });\n })\n .setActions((actions) => {\n actions.cancel('@general:actions.cancel.title');\n });\n })\n .show();\n return { success: true, kind: 'object', data: { versionId } };\n }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class OpenBehaviorDocumentCommand implements AXPCommand<unknown, { documentId: string }> {\n private readonly entityService = inject(AXPEntityService);\n private readonly executor = inject(AXPCommandExecutor);\n private readonly toast = inject(AXToastService);\n private readonly i18n = inject(AXTranslationService);\n\n async execute(input: unknown): AXPCommandExecuteResultPromise<{ documentId: string }> {\n const softwareId = resolveSoftwareId(input);\n const software = softwareId\n ? ((await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.software.name)\n .data()\n .byKey(softwareId)) as AXMSoftwareManagementSoftwareEntityModel | null)\n : null;\n const documentId = kickoffText(software?.behaviorDocumentId);\n if (!documentId) {\n const text = await this.i18n.translateAsync('@software-management:messages.behavior.missing-document');\n this.toast.show({ color: 'warning', title: text, content: text, closeButton: true, timeOut: 5000 });\n return { success: false, message: { text } };\n }\n await this.executor.execute('DocumentManagement.Document:Open', { documentId });\n return { success: true, kind: 'object', data: { documentId } };\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;AAwBA;AAEA;AAEA,SAAS,iBAAiB,CAAC,KAAc,EAAA;AACvC,IAAA,MAAM,QAAQ,GAAG,sBAAsB,CAAC,KAAK,CAAC;IAC9C,MAAM,OAAO,GAAG,mBAAmB,CAAC,QAAQ,EAAE,KAAK,CAAC;IACpD,IAAI,OAAO,EAAE;AACX,QAAA,OAAO,OAAO;IAChB;IACA,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AACvC,QAAA,OAAO,EAAE;IACX;IACA,MAAM,GAAG,GAAG,KAAgC;AAC5C,IAAA,OAAO,mBAAmB,CAAC,GAAG,CAAC,YAAY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EAAA,IAAA,EAAA,2BAA2B,cADd,MAAM,EAAA,CAAA,CAAA;;2FACnB,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBADvC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { runtimeCommandSuccessObject } from '@acorex-platform/framework-shared/core';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { inject, Injectable } from '@angular/core';
|
|
4
|
+
import { GenerateBehaviorDocumentCommand, SubmitBehaviorDocumentCommand, ViewPinnedScopeCommand, OpenBehaviorDocumentCommand } from './acorex-platform-module-software-management-client-behavior-specification.commands-4rkD2uP9.mjs';
|
|
5
|
+
|
|
6
|
+
//#endregion
|
|
7
|
+
//#region ----- Report from Behavior task -----
|
|
8
|
+
class GenerateSoftwareBehaviorDocumentActivity {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.generate = inject(GenerateBehaviorDocumentCommand);
|
|
11
|
+
}
|
|
12
|
+
async execute(input) {
|
|
13
|
+
return workflowOutcome(await this.generate.execute(input));
|
|
14
|
+
}
|
|
15
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: GenerateSoftwareBehaviorDocumentActivity, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
16
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: GenerateSoftwareBehaviorDocumentActivity, providedIn: 'root' }); }
|
|
17
|
+
}
|
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: GenerateSoftwareBehaviorDocumentActivity, decorators: [{
|
|
19
|
+
type: Injectable,
|
|
20
|
+
args: [{ providedIn: 'root' }]
|
|
21
|
+
}] });
|
|
22
|
+
class SubmitSoftwareBehaviorDocumentActivity {
|
|
23
|
+
constructor() {
|
|
24
|
+
this.submit = inject(SubmitBehaviorDocumentCommand);
|
|
25
|
+
}
|
|
26
|
+
async execute(input) {
|
|
27
|
+
return workflowOutcome(await this.submit.execute(input));
|
|
28
|
+
}
|
|
29
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SubmitSoftwareBehaviorDocumentActivity, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
30
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SubmitSoftwareBehaviorDocumentActivity, providedIn: 'root' }); }
|
|
31
|
+
}
|
|
32
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SubmitSoftwareBehaviorDocumentActivity, decorators: [{
|
|
33
|
+
type: Injectable,
|
|
34
|
+
args: [{ providedIn: 'root' }]
|
|
35
|
+
}] });
|
|
36
|
+
class ViewSoftwarePinnedScopeActivity {
|
|
37
|
+
constructor() {
|
|
38
|
+
this.view = inject(ViewPinnedScopeCommand);
|
|
39
|
+
}
|
|
40
|
+
async execute(input) {
|
|
41
|
+
return workflowOutcome(await this.view.execute(input));
|
|
42
|
+
}
|
|
43
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ViewSoftwarePinnedScopeActivity, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
44
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ViewSoftwarePinnedScopeActivity, providedIn: 'root' }); }
|
|
45
|
+
}
|
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ViewSoftwarePinnedScopeActivity, decorators: [{
|
|
47
|
+
type: Injectable,
|
|
48
|
+
args: [{ providedIn: 'root' }]
|
|
49
|
+
}] });
|
|
50
|
+
class OpenSoftwareBehaviorDocumentActivity {
|
|
51
|
+
constructor() {
|
|
52
|
+
this.open = inject(OpenBehaviorDocumentCommand);
|
|
53
|
+
}
|
|
54
|
+
async execute(input) {
|
|
55
|
+
return workflowOutcome(await this.open.execute(input));
|
|
56
|
+
}
|
|
57
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: OpenSoftwareBehaviorDocumentActivity, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
58
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: OpenSoftwareBehaviorDocumentActivity, providedIn: 'root' }); }
|
|
59
|
+
}
|
|
60
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: OpenSoftwareBehaviorDocumentActivity, decorators: [{
|
|
61
|
+
type: Injectable,
|
|
62
|
+
args: [{ providedIn: 'root' }]
|
|
63
|
+
}] });
|
|
64
|
+
//#endregion
|
|
65
|
+
//#region ----- Helpers -----
|
|
66
|
+
function workflowOutcome(result) {
|
|
67
|
+
if (!result.success) {
|
|
68
|
+
return Promise.resolve({
|
|
69
|
+
success: false,
|
|
70
|
+
metadata: { outcome: 'Failed' },
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
return Promise.resolve(runtimeCommandSuccessObject(result.data, {
|
|
74
|
+
metadata: { outcome: 'Done' },
|
|
75
|
+
}));
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export { GenerateSoftwareBehaviorDocumentActivity, OpenSoftwareBehaviorDocumentActivity, SubmitSoftwareBehaviorDocumentActivity, ViewSoftwarePinnedScopeActivity };
|
|
79
|
+
//# sourceMappingURL=acorex-platform-module-software-management-client-behavior-task.activities-WmCC3-3L.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-software-management-client-behavior-task.activities-WmCC3-3L.mjs","sources":["../../../../libs/modules/software-management/client/src/lib/workflows/activities/behavior-task.activities.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { runtimeCommandSuccessObject } from '@acorex-platform/framework-shared/core';\nimport { inject, Injectable } from '@angular/core';\n\nimport {\n GenerateBehaviorDocumentCommand,\n OpenBehaviorDocumentCommand,\n SubmitBehaviorDocumentCommand,\n ViewPinnedScopeCommand,\n} from '../../commands/behavior-specification.commands';\n\n//#endregion\n\n//#region ----- Report from Behavior task -----\n\n@Injectable({ providedIn: 'root' })\nexport class GenerateSoftwareBehaviorDocumentActivity implements AXPCommand<unknown, unknown> {\n private readonly generate = inject(GenerateBehaviorDocumentCommand);\n\n async execute(input: unknown): AXPCommandExecuteResultPromise<unknown> {\n return workflowOutcome(await this.generate.execute(input));\n }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class SubmitSoftwareBehaviorDocumentActivity implements AXPCommand<unknown, unknown> {\n private readonly submit = inject(SubmitBehaviorDocumentCommand);\n\n async execute(input: unknown): AXPCommandExecuteResultPromise<unknown> {\n return workflowOutcome(await this.submit.execute(input));\n }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ViewSoftwarePinnedScopeActivity implements AXPCommand<unknown, unknown> {\n private readonly view = inject(ViewPinnedScopeCommand);\n\n async execute(input: unknown): AXPCommandExecuteResultPromise<unknown> {\n return workflowOutcome(await this.view.execute(input));\n }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class OpenSoftwareBehaviorDocumentActivity implements AXPCommand<unknown, unknown> {\n private readonly open = inject(OpenBehaviorDocumentCommand);\n\n async execute(input: unknown): AXPCommandExecuteResultPromise<unknown> {\n return workflowOutcome(await this.open.execute(input));\n }\n}\n\n//#endregion\n\n//#region ----- Helpers -----\n\nfunction workflowOutcome(result: { success?: boolean; data?: unknown }): AXPCommandExecuteResultPromise<unknown> {\n if (!result.success) {\n return Promise.resolve({\n success: false,\n metadata: { outcome: 'Failed' },\n });\n }\n return Promise.resolve(\n runtimeCommandSuccessObject(result.data, {\n metadata: { outcome: 'Done' },\n }),\n );\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;AAaA;AAEA;MAGa,wCAAwC,CAAA;AADrD,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,+BAA+B,CAAC;AAKpE,IAAA;IAHC,MAAM,OAAO,CAAC,KAAc,EAAA;AAC1B,QAAA,OAAO,eAAe,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC5D;8GALW,wCAAwC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAxC,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,wCAAwC,cAD3B,MAAM,EAAA,CAAA,CAAA;;2FACnB,wCAAwC,EAAA,UAAA,EAAA,CAAA;kBADpD,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;MAUrB,sCAAsC,CAAA;AADnD,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,6BAA6B,CAAC;AAKhE,IAAA;IAHC,MAAM,OAAO,CAAC,KAAc,EAAA;AAC1B,QAAA,OAAO,eAAe,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC1D;8GALW,sCAAsC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAtC,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CA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