@acorex/platform 21.0.0-next.34 → 21.0.0-next.39
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-common.mjs +19 -1
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +11 -172
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +7 -8
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs +39 -29
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +8 -9
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +468 -255
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +171 -86
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +36 -13
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-file-list-popup.component-9uCkMxcc.mjs → acorex-platform-layout-widgets-file-list-popup.component-CDYAGBku.mjs} +5 -60
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-CDYAGBku.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets.mjs +101 -128
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-default.mjs +16 -4
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +25 -5
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/package.json +1 -1
- package/types/acorex-platform-common.d.ts +11 -6
- package/types/acorex-platform-core.d.ts +56 -101
- package/types/acorex-platform-layout-builder.d.ts +0 -1
- package/types/acorex-platform-layout-components.d.ts +4 -3
- package/types/acorex-platform-layout-designer.d.ts +1 -1
- package/types/acorex-platform-layout-entity.d.ts +36 -30
- package/types/acorex-platform-layout-views.d.ts +31 -29
- package/types/acorex-platform-layout-widget-core.d.ts +30 -14
- package/types/acorex-platform-layout-widgets.d.ts +17 -11
- package/types/acorex-platform-themes-default.d.ts +1 -0
- package/types/acorex-platform-workflow.d.ts +28 -51
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-9uCkMxcc.mjs.map +0 -1
|
@@ -3,6 +3,7 @@ import { Injectable, inject, InjectionToken, Optional, Inject, NgModule } from '
|
|
|
3
3
|
import { Subject, filter } from 'rxjs';
|
|
4
4
|
import { cloneDeep, get, set } from 'lodash-es';
|
|
5
5
|
import { setSmart, AXPExpressionEvaluatorService, AXPDataGenerator } from '@acorex/platform/core';
|
|
6
|
+
import { AXTranslationService } from '@acorex/core/translation';
|
|
6
7
|
import { AXPCommandService } from '@acorex/platform/runtime';
|
|
7
8
|
|
|
8
9
|
class AXPWorkflowError extends Error {
|
|
@@ -628,7 +629,7 @@ class AXPActivityDefinitionService {
|
|
|
628
629
|
if (definition && definition.category) {
|
|
629
630
|
// Try to find category by name/id
|
|
630
631
|
const categories = await this.getCategories();
|
|
631
|
-
const found = categories.find(cat => cat.id === definition.category
|
|
632
|
+
const found = categories.find((cat) => cat.id === definition.category);
|
|
632
633
|
if (found) {
|
|
633
634
|
return found.id;
|
|
634
635
|
}
|
|
@@ -1114,6 +1115,7 @@ class ActivityExecutor {
|
|
|
1114
1115
|
this.commandService = inject(AXPCommandService);
|
|
1115
1116
|
this.expressionEvaluator = inject(AXPExpressionEvaluatorService);
|
|
1116
1117
|
this.expressionScopeService = inject(WorkflowExpressionScopeService);
|
|
1118
|
+
this.translateService = inject(AXTranslationService);
|
|
1117
1119
|
}
|
|
1118
1120
|
//#endregion
|
|
1119
1121
|
//#region ---- Public Methods ----
|
|
@@ -1173,7 +1175,7 @@ class ActivityExecutor {
|
|
|
1173
1175
|
if (!result.success) {
|
|
1174
1176
|
return {
|
|
1175
1177
|
output: {
|
|
1176
|
-
error: result.message?.text,
|
|
1178
|
+
error: await this.resolveCommandMessageTextForError(result.message?.text),
|
|
1177
1179
|
},
|
|
1178
1180
|
outcome: 'Failed',
|
|
1179
1181
|
};
|
|
@@ -1211,6 +1213,18 @@ class ActivityExecutor {
|
|
|
1211
1213
|
};
|
|
1212
1214
|
}
|
|
1213
1215
|
}
|
|
1216
|
+
/**
|
|
1217
|
+
* Resolves command failure message text for workflow output: `@` keys via translate, MLS maps via resolve.
|
|
1218
|
+
*/
|
|
1219
|
+
async resolveCommandMessageTextForError(value) {
|
|
1220
|
+
if (value == null) {
|
|
1221
|
+
return '';
|
|
1222
|
+
}
|
|
1223
|
+
if (typeof value === 'string') {
|
|
1224
|
+
return value.startsWith('@') ? await this.translateService.translateAsync(value) : value;
|
|
1225
|
+
}
|
|
1226
|
+
return this.translateService.resolve(value);
|
|
1227
|
+
}
|
|
1214
1228
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ActivityExecutor, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1215
1229
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: ActivityExecutor, providedIn: 'root' }); }
|
|
1216
1230
|
}
|
|
@@ -1573,6 +1587,7 @@ class AXPWorkflowLocalEngine {
|
|
|
1573
1587
|
//#region ---- Services & Dependencies ----
|
|
1574
1588
|
this.activityDefinitionService = inject(AXPActivityDefinitionService);
|
|
1575
1589
|
this.workflowProviders = inject(AXP_WORKFLOW_PROVIDER, { optional: true }) || [];
|
|
1590
|
+
this.multiLanguageResolver = inject(AXTranslationService);
|
|
1576
1591
|
//#endregion
|
|
1577
1592
|
//#region ---- Instance Storage ----
|
|
1578
1593
|
/**
|
|
@@ -1693,6 +1708,11 @@ class AXPWorkflowLocalEngine {
|
|
|
1693
1708
|
...(request.userInput || {}),
|
|
1694
1709
|
};
|
|
1695
1710
|
}
|
|
1711
|
+
localState.state.variables = {
|
|
1712
|
+
...localState.state.variables,
|
|
1713
|
+
[`${request.stepId}_outcome`]: outcome,
|
|
1714
|
+
[`${request.stepId}_activityOutput`]: request.userInput || {},
|
|
1715
|
+
};
|
|
1696
1716
|
// Mark activity as completed and continue progression
|
|
1697
1717
|
// Continue progressing workflow steps (skipping backend activities)
|
|
1698
1718
|
const nextTask = await this.executeWorkflowSteps(localState);
|
|
@@ -1766,13 +1786,13 @@ class AXPWorkflowLocalEngine {
|
|
|
1766
1786
|
const connections = graph.connections || [];
|
|
1767
1787
|
// Build activity map
|
|
1768
1788
|
const activityMap = new Map();
|
|
1769
|
-
activities.forEach(activity => {
|
|
1789
|
+
activities.forEach((activity) => {
|
|
1770
1790
|
activityMap.set(activity.id, activity);
|
|
1771
1791
|
});
|
|
1772
1792
|
// Build connection graph
|
|
1773
1793
|
const outgoingConnections = new Map();
|
|
1774
1794
|
const incomingConnections = new Map();
|
|
1775
|
-
connections.forEach(conn => {
|
|
1795
|
+
connections.forEach((conn) => {
|
|
1776
1796
|
const sourceId = conn.source.activtyName;
|
|
1777
1797
|
const targetId = conn.target.activtyName;
|
|
1778
1798
|
if (!outgoingConnections.has(sourceId)) {
|
|
@@ -1829,7 +1849,7 @@ class AXPWorkflowLocalEngine {
|
|
|
1829
1849
|
found: !!activityDefinition,
|
|
1830
1850
|
});
|
|
1831
1851
|
const executionMode = activityDefinition?.executionMode || 'frontend';
|
|
1832
|
-
const activityTitle = activityDefinition?.title;
|
|
1852
|
+
const activityTitle = this.multiLanguageResolver.resolve(activityDefinition?.title) || activityDefinition?.name;
|
|
1833
1853
|
// Handle backend activities: skip
|
|
1834
1854
|
if (executionMode === 'backend') {
|
|
1835
1855
|
console.log(`[WorkflowLocalEngine] ⏭️ Skipping backend activity: ${activity.name} (${activity.id})`);
|