@acorex-platform/module-workflow-management-client 0.0.21
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-workflow-management-client-acorex-platform-module-workflow-management-client-B_Sl7G2v.mjs +4990 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-acorex-platform-module-workflow-management-client-B_Sl7G2v.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-activity-command-configurator-widget-column.component-BPa0Sh6Z.mjs +57 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-activity-command-configurator-widget-column.component-BPa0Sh6Z.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-activity-command-configurator-widget-edit.component-DuYGXzAL.mjs +482 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-activity-command-configurator-widget-edit.component-DuYGXzAL.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-contracts.mjs +163 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-contracts.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-execute-workflow-with-input.command-BFdyJ4rC.mjs +127 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-execute-workflow-with-input.command-BFdyJ4rC.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-execute-workflow.command-Cfdm1QAy.mjs +142 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-execute-workflow.command-Cfdm1QAy.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-index-C8nsbDAw.mjs +142 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-index-C8nsbDAw.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-index-CttfExOC.mjs +417 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-index-CttfExOC.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-index-DKZTLui4.mjs +1329 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-index-DKZTLui4.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-save-workflow-definition-activities.command-spFF77AO.mjs +60 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-save-workflow-definition-activities.command-spFF77AO.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-activity-instance-rows.utils-CMVZYS4y.mjs +172 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-activity-instance-rows.utils-CMVZYS4y.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-configurator-widget-column.component-D0E2zjIA.mjs +81 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-configurator-widget-column.component-D0E2zjIA.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-configurator-widget-edit.component-CVTeOv-q.mjs +538 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-configurator-widget-edit.component-CVTeOv-q.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-live-dashboard.queries--9NtYkau.mjs +218 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-live-dashboard.queries--9NtYkau.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-run-history-popup.component-BWOyivC5.mjs +588 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-run-history-popup.component-BWOyivC5.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-run-history-timeline-tab.component-AnJ-Pywf.mjs +33 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-run-history-timeline-tab.component-AnJ-Pywf.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-run-history-visual-tab.component-Bw68Jwcb.mjs +227 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-run-history-visual-tab.component-Bw68Jwcb.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-task-popover.component-Cg4gODGo.mjs +300 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-task-popover.component-Cg4gODGo.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client.mjs +2 -0
- package/fesm2022/acorex-platform-module-workflow-management-client.mjs.map +1 -0
- package/package.json +28 -0
- package/types/acorex-platform-module-workflow-management-client-contracts.d.ts +341 -0
- package/types/acorex-platform-module-workflow-management-client.d.ts +1026 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { AXTranslationService } from '@acorex/core/translation';
|
|
2
|
+
import { resolveMultiLanguageString } from '@acorex-platform/framework-shared/core';
|
|
3
|
+
import { AXPColumnWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';
|
|
4
|
+
import * as i0 from '@angular/core';
|
|
5
|
+
import { inject, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
6
|
+
|
|
7
|
+
//#region ---- Imports ----
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region ---- Component ----
|
|
10
|
+
class AXMActivityCommandConfiguratorWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.translation = inject(AXTranslationService);
|
|
14
|
+
this.displayTitle = computed(() => {
|
|
15
|
+
const value = this.rawValue;
|
|
16
|
+
const locale = this.translation.getActiveLang();
|
|
17
|
+
const resolvedTitle = resolveMultiLanguageString(value?.title, locale).trim();
|
|
18
|
+
if (resolvedTitle) {
|
|
19
|
+
// Catalog keys (`@scope:...`) still go through translation.resolve.
|
|
20
|
+
return this.translation.resolve(resolvedTitle) || resolvedTitle;
|
|
21
|
+
}
|
|
22
|
+
return value?.key?.trim() ?? '';
|
|
23
|
+
}, /* @ts-ignore */
|
|
24
|
+
...(ngDevMode ? [{ debugName: "displayTitle" }] : /* istanbul ignore next */ []));
|
|
25
|
+
}
|
|
26
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMActivityCommandConfiguratorWidgetColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
27
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXMActivityCommandConfiguratorWidgetColumnComponent, isStandalone: true, selector: "axm-activity-command-configurator-widget-column", inputs: { rawValue: "rawValue", rowData: "rowData" }, usesInheritance: true, ngImport: i0, template: `
|
|
28
|
+
@if (displayTitle()) {
|
|
29
|
+
<span [title]="displayTitle()" class="text-xs font-medium">{{
|
|
30
|
+
displayTitle()
|
|
31
|
+
}}</span>
|
|
32
|
+
} @else {
|
|
33
|
+
<span class="text-muted">---</span>
|
|
34
|
+
}
|
|
35
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
36
|
+
}
|
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMActivityCommandConfiguratorWidgetColumnComponent, decorators: [{
|
|
38
|
+
type: Component,
|
|
39
|
+
args: [{
|
|
40
|
+
selector: 'axm-activity-command-configurator-widget-column',
|
|
41
|
+
template: `
|
|
42
|
+
@if (displayTitle()) {
|
|
43
|
+
<span [title]="displayTitle()" class="text-xs font-medium">{{
|
|
44
|
+
displayTitle()
|
|
45
|
+
}}</span>
|
|
46
|
+
} @else {
|
|
47
|
+
<span class="text-muted">---</span>
|
|
48
|
+
}
|
|
49
|
+
`,
|
|
50
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
51
|
+
imports: [],
|
|
52
|
+
inputs: ['rawValue', 'rowData'],
|
|
53
|
+
}]
|
|
54
|
+
}] });
|
|
55
|
+
|
|
56
|
+
export { AXMActivityCommandConfiguratorWidgetColumnComponent };
|
|
57
|
+
//# sourceMappingURL=acorex-platform-module-workflow-management-client-activity-command-configurator-widget-column.component-BPa0Sh6Z.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-workflow-management-client-activity-command-configurator-widget-column.component-BPa0Sh6Z.mjs","sources":["../../../../libs/modules/workflow-management/client/src/lib/features/activity-command-configurator/activity-command-configurator-widget-column.component.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { resolveMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPColumnWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n} from '@angular/core';\nimport type { ActivityCommandValue } from './activity-command-configurator.types';\n\n//#endregion\n\n//#region ---- Component ----\n\n@Component({\n selector: 'axm-activity-command-configurator-widget-column',\n template: `\n @if (displayTitle()) {\n <span [title]=\"displayTitle()\" class=\"text-xs font-medium\">{{\n displayTitle()\n }}</span>\n } @else {\n <span class=\"text-muted\">---</span>\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [],\n inputs: ['rawValue', 'rowData'],\n})\nexport class AXMActivityCommandConfiguratorWidgetColumnComponent extends AXPColumnWidgetComponent<ActivityCommandValue> {\n private readonly translation = inject(AXTranslationService);\n\n protected displayTitle = computed(() => {\n const value = this.rawValue as ActivityCommandValue | undefined;\n const locale = this.translation.getActiveLang();\n const resolvedTitle = resolveMultiLanguageString(value?.title, locale).trim();\n if (resolvedTitle) {\n // Catalog keys (`@scope:...`) still go through translation.resolve.\n return this.translation.resolve(resolvedTitle) || resolvedTitle;\n }\n return value?.key?.trim() ?? '';\n });\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AAAA;AAaA;AAEA;AAiBM,MAAO,mDAAoD,SAAQ,wBAA8C,CAAA;AAfvH,IAAA,WAAA,GAAA;;AAgBmB,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAEjD,QAAA,IAAA,CAAA,YAAY,GAAG,QAAQ,CAAC,MAAK;AACrC,YAAA,MAAM,KAAK,GAAG,IAAI,CAAC,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;;;;"}
|
|
@@ -0,0 +1,482 @@
|
|
|
1
|
+
import { mapAXPPropertyToWidgetProperty, AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { model, input, inject, signal, computed, effect, untracked, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
|
+
import { isEqual } from 'lodash';
|
|
5
|
+
import { AXTranslationService } from '@acorex/core/translation';
|
|
6
|
+
import { AXPItemConfiguratorComponent } from '@acorex-platform/framework-client/layout/components';
|
|
7
|
+
import { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';
|
|
8
|
+
import { AXPActivityDefinitionService } from '@acorex-platform/framework-client/workflow';
|
|
9
|
+
|
|
10
|
+
//#region ---- Imports ----
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region ---- Query filters ----
|
|
13
|
+
function buildCommandDefinitionListQueryFilter(executionMode) {
|
|
14
|
+
if (!executionMode) {
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
return {
|
|
18
|
+
logic: 'or',
|
|
19
|
+
filters: [
|
|
20
|
+
{ field: 'executionMode', operator: { type: 'equal' }, value: executionMode },
|
|
21
|
+
{ field: 'executionMode', operator: { type: 'equal' }, value: 'both' },
|
|
22
|
+
],
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function buildActivityDefinitionListQueryFilter(executionMode) {
|
|
26
|
+
return buildCommandDefinitionListQueryFilter(executionMode);
|
|
27
|
+
}
|
|
28
|
+
function matchesCommandConfiguratorCapabilitiesFilter(row, filter) {
|
|
29
|
+
const anyOf = filter?.anyOf?.filter(Boolean) ?? [];
|
|
30
|
+
if (anyOf.length === 0) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
const caps = row.capabilities ?? [];
|
|
34
|
+
return anyOf.some((cap) => caps.includes(cap));
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region ---- Row mapping ----
|
|
38
|
+
function mapPropertyDefinitionsToInputs(inputs) {
|
|
39
|
+
if (!inputs?.length) {
|
|
40
|
+
return [];
|
|
41
|
+
}
|
|
42
|
+
return inputs.map((input) => ({
|
|
43
|
+
name: input.name,
|
|
44
|
+
title: input.title,
|
|
45
|
+
description: input.description,
|
|
46
|
+
dataType: input.dataType ?? 'string',
|
|
47
|
+
validations: input.validations,
|
|
48
|
+
interface: {
|
|
49
|
+
type: input.interface.name,
|
|
50
|
+
options: input.interface.options ?? {},
|
|
51
|
+
},
|
|
52
|
+
}));
|
|
53
|
+
}
|
|
54
|
+
function mapCommandDefinitionEntityRow(row) {
|
|
55
|
+
return {
|
|
56
|
+
id: String(row['id'] ?? row['name'] ?? ''),
|
|
57
|
+
name: String(row['name'] ?? ''),
|
|
58
|
+
title: typeof row['catalogTitle'] === 'string' ? row['catalogTitle'] : undefined,
|
|
59
|
+
description: typeof row['description'] === 'string' ? row['description'] : undefined,
|
|
60
|
+
icon: 'fa-light fa-server',
|
|
61
|
+
inputs: mapPropertyDefinitionsToInputs(Array.isArray(row['inputOptionDefinitions'])
|
|
62
|
+
? row['inputOptionDefinitions']
|
|
63
|
+
: undefined),
|
|
64
|
+
capabilities: Array.isArray(row['capabilities'])
|
|
65
|
+
? row['capabilities']
|
|
66
|
+
: undefined,
|
|
67
|
+
active: row['active'] !== false,
|
|
68
|
+
executionMode: row['executionMode'] === 'frontend' ||
|
|
69
|
+
row['executionMode'] === 'backend' ||
|
|
70
|
+
row['executionMode'] === 'both'
|
|
71
|
+
? row['executionMode']
|
|
72
|
+
: undefined,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
function mapActivityDefinitionEntityRow(row) {
|
|
76
|
+
const inputs = Array.isArray(row['inputs']) ? row['inputs'] : undefined;
|
|
77
|
+
return {
|
|
78
|
+
id: String(row['id'] ?? row['name'] ?? ''),
|
|
79
|
+
name: String(row['name'] ?? ''),
|
|
80
|
+
title: typeof row['title'] === 'string' ? row['title'] : undefined,
|
|
81
|
+
description: typeof row['description'] === 'string' ? row['description'] : undefined,
|
|
82
|
+
icon: typeof row['icon'] === 'string' ? row['icon'] : 'fa-light fa-bolt',
|
|
83
|
+
inputs,
|
|
84
|
+
active: true,
|
|
85
|
+
executionMode: row['executionMode'] === 'frontend' ||
|
|
86
|
+
row['executionMode'] === 'backend' ||
|
|
87
|
+
row['executionMode'] === 'both'
|
|
88
|
+
? row['executionMode']
|
|
89
|
+
: undefined,
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
function mapCommandInputsToWidgetProperties(inputs, translation) {
|
|
93
|
+
const list = inputs ?? [];
|
|
94
|
+
const group = {
|
|
95
|
+
name: 'command-inputs',
|
|
96
|
+
title: '@workflow-management:automations.entities.automation.fields.command.title',
|
|
97
|
+
order: 0,
|
|
98
|
+
};
|
|
99
|
+
return list.map((property, index) => mapAXPPropertyToWidgetProperty(property, {
|
|
100
|
+
group,
|
|
101
|
+
order: index,
|
|
102
|
+
valuePathPrefix: 'options',
|
|
103
|
+
resolveTitle: (prop) => typeof prop.title === 'string' ? prop.title : (translation.resolve(prop.title) ?? prop.name),
|
|
104
|
+
resolveDescription: (prop) => prop.description === undefined
|
|
105
|
+
? undefined
|
|
106
|
+
: typeof prop.description === 'string'
|
|
107
|
+
? prop.description
|
|
108
|
+
: translation.resolve(prop.description),
|
|
109
|
+
}));
|
|
110
|
+
}
|
|
111
|
+
//#endregion
|
|
112
|
+
|
|
113
|
+
//#region ---- Imports ----
|
|
114
|
+
//#endregion
|
|
115
|
+
//#region ---- Component ----
|
|
116
|
+
/**
|
|
117
|
+
* Select a command/activity and configure its inputs via {@link AXPItemConfiguratorComponent}.
|
|
118
|
+
* Entity-backed modes use the same reactive loading pattern as {@link AXMWorkflowConfiguratorComponent}.
|
|
119
|
+
*/
|
|
120
|
+
class AXMActivityCommandConfiguratorComponent {
|
|
121
|
+
static { this.COMMAND_DEFINITION_MODULE = 'PlatformManagement'; }
|
|
122
|
+
static { this.COMMAND_DEFINITION_ENTITY = 'CommandDefinition'; }
|
|
123
|
+
//#endregion
|
|
124
|
+
//#region ---- Lifecycle ----
|
|
125
|
+
constructor() {
|
|
126
|
+
//#region ---- Inputs ----
|
|
127
|
+
this.value = model({ key: '', payload: {} }, /* @ts-ignore */
|
|
128
|
+
...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
129
|
+
this.label = input('@workflow-management:automations.entities.automation.fields.command.title', /* @ts-ignore */
|
|
130
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
131
|
+
this.readonly = input(false, /* @ts-ignore */
|
|
132
|
+
...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
133
|
+
this.executionModeFilter = input(undefined, /* @ts-ignore */
|
|
134
|
+
...(ngDevMode ? [{ debugName: "executionModeFilter" }] : /* istanbul ignore next */ []));
|
|
135
|
+
/**
|
|
136
|
+
* - `default`: workflow toolbox activities (in-memory categories).
|
|
137
|
+
* - `flat-query`: query `WorkflowManagement.ActivityDefinition` entity storage.
|
|
138
|
+
* - `command-registry`: query persisted command catalog entity (default `PlatformManagement.CommandDefinition`).
|
|
139
|
+
*/
|
|
140
|
+
this.loadStrategy = input('default', /* @ts-ignore */
|
|
141
|
+
...(ngDevMode ? [{ debugName: "loadStrategy" }] : /* istanbul ignore next */ []));
|
|
142
|
+
this.capabilitiesFilter = input(undefined, /* @ts-ignore */
|
|
143
|
+
...(ngDevMode ? [{ debugName: "capabilitiesFilter" }] : /* istanbul ignore next */ []));
|
|
144
|
+
//#endregion
|
|
145
|
+
//#region ---- Services ----
|
|
146
|
+
this.activityService = inject(AXPActivityDefinitionService);
|
|
147
|
+
this.entityService = inject(AXPEntityService);
|
|
148
|
+
this.translation = inject(AXTranslationService);
|
|
149
|
+
//#endregion
|
|
150
|
+
//#region ---- State ----
|
|
151
|
+
this.selectedCommandKeyModel = model('', /* @ts-ignore */
|
|
152
|
+
...(ngDevMode ? [{ debugName: "selectedCommandKeyModel" }] : /* istanbul ignore next */ []));
|
|
153
|
+
this.payloadModel = model({}, /* @ts-ignore */
|
|
154
|
+
...(ngDevMode ? [{ debugName: "payloadModel" }] : /* istanbul ignore next */ []));
|
|
155
|
+
this.catalogRows = signal([], /* @ts-ignore */
|
|
156
|
+
...(ngDevMode ? [{ debugName: "catalogRows" }] : /* istanbul ignore next */ []));
|
|
157
|
+
this.configuratorItems = computed(() => this.catalogRows().map((row) => ({
|
|
158
|
+
id: row.name,
|
|
159
|
+
title: (row.title ?? row.name),
|
|
160
|
+
icon: row.icon ?? 'fa-light fa-server',
|
|
161
|
+
description: row.description,
|
|
162
|
+
propertyDefinitions: mapCommandInputsToWidgetProperties(row.inputs, this.translation),
|
|
163
|
+
})), /* @ts-ignore */
|
|
164
|
+
...(ngDevMode ? [{ debugName: "configuratorItems" }] : /* istanbul ignore next */ []));
|
|
165
|
+
effect(() => {
|
|
166
|
+
this.loadStrategy();
|
|
167
|
+
this.executionModeFilter();
|
|
168
|
+
this.capabilitiesFilter();
|
|
169
|
+
untracked(() => {
|
|
170
|
+
void this.loadCatalogRows();
|
|
171
|
+
});
|
|
172
|
+
});
|
|
173
|
+
effect(() => {
|
|
174
|
+
const v = this.value();
|
|
175
|
+
const key = v.key?.trim() ?? '';
|
|
176
|
+
const payload = v.payload ?? {};
|
|
177
|
+
untracked(() => {
|
|
178
|
+
if (this.selectedCommandKeyModel() !== key) {
|
|
179
|
+
this.selectedCommandKeyModel.set(key);
|
|
180
|
+
}
|
|
181
|
+
if (!isEqual(this.payloadModel(), payload)) {
|
|
182
|
+
this.payloadModel.set({ ...payload });
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
});
|
|
186
|
+
effect(() => {
|
|
187
|
+
const key = this.selectedCommandKeyModel();
|
|
188
|
+
const payload = this.payloadModel();
|
|
189
|
+
const current = untracked(() => this.value());
|
|
190
|
+
const row = untracked(() => this.catalogRows().find((item) => item.name === key));
|
|
191
|
+
const next = {
|
|
192
|
+
key,
|
|
193
|
+
title: row?.title ?? row?.name ?? current.title,
|
|
194
|
+
payload: { ...payload },
|
|
195
|
+
};
|
|
196
|
+
const normalizedCurrent = {
|
|
197
|
+
key: current.key?.trim() ?? '',
|
|
198
|
+
title: current.title,
|
|
199
|
+
payload: current.payload ?? {},
|
|
200
|
+
};
|
|
201
|
+
if (!isEqual(next, normalizedCurrent)) {
|
|
202
|
+
untracked(() => this.value.set(next));
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
//#endregion
|
|
207
|
+
//#region ---- Data loading ----
|
|
208
|
+
async loadCatalogRows() {
|
|
209
|
+
try {
|
|
210
|
+
const strategy = this.loadStrategy();
|
|
211
|
+
const modeFilter = this.executionModeFilter();
|
|
212
|
+
const caps = this.capabilitiesFilter();
|
|
213
|
+
const capabilityFilter = caps && caps.length > 0 ? { anyOf: caps } : undefined;
|
|
214
|
+
const pinnedKey = this.value().key?.trim() ?? '';
|
|
215
|
+
let rows = [];
|
|
216
|
+
switch (strategy) {
|
|
217
|
+
case 'command-registry':
|
|
218
|
+
rows = await this.queryCommandDefinitionRows(modeFilter, capabilityFilter);
|
|
219
|
+
break;
|
|
220
|
+
case 'flat-query':
|
|
221
|
+
rows = await this.queryActivityDefinitionRows(modeFilter);
|
|
222
|
+
break;
|
|
223
|
+
default:
|
|
224
|
+
rows = await this.queryToolboxActivities(modeFilter);
|
|
225
|
+
break;
|
|
226
|
+
}
|
|
227
|
+
rows = rows
|
|
228
|
+
.filter((r) => !!r.name?.trim() && r.active !== false)
|
|
229
|
+
.sort((a, b) => {
|
|
230
|
+
const ta = (a.title ?? a.name).trim();
|
|
231
|
+
const tb = (b.title ?? b.name).trim();
|
|
232
|
+
return ta.localeCompare(tb, this.translation.getActiveLang(), {
|
|
233
|
+
sensitivity: 'base',
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
const hydrated = await Promise.all(rows.map((row) => this.hydrateCatalogRow(row, strategy)));
|
|
237
|
+
if (pinnedKey && !hydrated.some((r) => r.name === pinnedKey)) {
|
|
238
|
+
const pinned = await this.loadPinnedRow(pinnedKey, strategy);
|
|
239
|
+
if (pinned) {
|
|
240
|
+
hydrated.unshift(pinned);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
this.catalogRows.set(hydrated);
|
|
244
|
+
}
|
|
245
|
+
catch {
|
|
246
|
+
this.catalogRows.set([]);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
async queryCommandDefinitionRows(executionMode, capabilityFilter) {
|
|
250
|
+
const page = await this.entityService
|
|
251
|
+
.withEntity(AXMActivityCommandConfiguratorComponent.COMMAND_DEFINITION_MODULE, AXMActivityCommandConfiguratorComponent.COMMAND_DEFINITION_ENTITY)
|
|
252
|
+
.data()
|
|
253
|
+
.query({
|
|
254
|
+
skip: 0,
|
|
255
|
+
take: 5000,
|
|
256
|
+
filter: buildCommandDefinitionListQueryFilter(executionMode),
|
|
257
|
+
});
|
|
258
|
+
return (page.items ?? [])
|
|
259
|
+
.map((row) => mapCommandDefinitionEntityRow(row))
|
|
260
|
+
.filter((row) => matchesCommandConfiguratorCapabilitiesFilter(row, capabilityFilter));
|
|
261
|
+
}
|
|
262
|
+
async queryActivityDefinitionRows(executionMode) {
|
|
263
|
+
const page = await this.entityService
|
|
264
|
+
.withEntity('WorkflowManagement', 'ActivityDefinition')
|
|
265
|
+
.data()
|
|
266
|
+
.query({
|
|
267
|
+
skip: 0,
|
|
268
|
+
take: 2000,
|
|
269
|
+
filter: buildActivityDefinitionListQueryFilter(executionMode),
|
|
270
|
+
});
|
|
271
|
+
return (page.items ?? []).map((row) => mapActivityDefinitionEntityRow(row));
|
|
272
|
+
}
|
|
273
|
+
async queryToolboxActivities(executionMode) {
|
|
274
|
+
let activities = await this.activityService.getAllActivities();
|
|
275
|
+
if (executionMode) {
|
|
276
|
+
activities = activities.filter((item) => item.executionMode === executionMode || item.executionMode === 'both');
|
|
277
|
+
}
|
|
278
|
+
return activities.map((activity) => this.mapToolboxActivityRow(activity));
|
|
279
|
+
}
|
|
280
|
+
mapToolboxActivityRow(activity) {
|
|
281
|
+
return {
|
|
282
|
+
id: activity.name,
|
|
283
|
+
name: activity.name,
|
|
284
|
+
title: typeof activity.title === 'string' ? activity.title : activity.name,
|
|
285
|
+
description: typeof activity.description === 'string'
|
|
286
|
+
? activity.description
|
|
287
|
+
: undefined,
|
|
288
|
+
icon: activity.icon ?? 'fa-light fa-bolt',
|
|
289
|
+
inputs: activity.inputs,
|
|
290
|
+
active: true,
|
|
291
|
+
executionMode: activity.executionMode,
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
async hydrateCatalogRow(row, strategy) {
|
|
295
|
+
if ((row.inputs?.length ?? 0) > 0 || strategy === 'default') {
|
|
296
|
+
return row;
|
|
297
|
+
}
|
|
298
|
+
const id = row.id?.trim();
|
|
299
|
+
if (!id) {
|
|
300
|
+
return row;
|
|
301
|
+
}
|
|
302
|
+
try {
|
|
303
|
+
const module = strategy === 'command-registry'
|
|
304
|
+
? AXMActivityCommandConfiguratorComponent.COMMAND_DEFINITION_MODULE
|
|
305
|
+
: 'WorkflowManagement';
|
|
306
|
+
const entity = strategy === 'command-registry'
|
|
307
|
+
? AXMActivityCommandConfiguratorComponent.COMMAND_DEFINITION_ENTITY
|
|
308
|
+
: 'ActivityDefinition';
|
|
309
|
+
const full = (await this.entityService
|
|
310
|
+
.withEntity(module, entity)
|
|
311
|
+
.data()
|
|
312
|
+
.byKey(id));
|
|
313
|
+
if (!full) {
|
|
314
|
+
return row;
|
|
315
|
+
}
|
|
316
|
+
const mapped = strategy === 'command-registry'
|
|
317
|
+
? mapCommandDefinitionEntityRow(full)
|
|
318
|
+
: mapActivityDefinitionEntityRow(full);
|
|
319
|
+
return { ...row, ...mapped, inputs: mapped.inputs ?? row.inputs };
|
|
320
|
+
}
|
|
321
|
+
catch {
|
|
322
|
+
return row;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
async loadPinnedRow(commandKey, strategy) {
|
|
326
|
+
if (strategy === 'default') {
|
|
327
|
+
const activity = await this.activityService.getActivityByName(commandKey);
|
|
328
|
+
return activity ? this.mapToolboxActivityRow(activity) : null;
|
|
329
|
+
}
|
|
330
|
+
try {
|
|
331
|
+
const module = strategy === 'command-registry'
|
|
332
|
+
? AXMActivityCommandConfiguratorComponent.COMMAND_DEFINITION_MODULE
|
|
333
|
+
: 'WorkflowManagement';
|
|
334
|
+
const entity = strategy === 'command-registry'
|
|
335
|
+
? AXMActivityCommandConfiguratorComponent.COMMAND_DEFINITION_ENTITY
|
|
336
|
+
: 'ActivityDefinition';
|
|
337
|
+
const page = await this.entityService
|
|
338
|
+
.withEntity(module, entity)
|
|
339
|
+
.data()
|
|
340
|
+
.query({
|
|
341
|
+
skip: 0,
|
|
342
|
+
take: 1,
|
|
343
|
+
filter: {
|
|
344
|
+
field: 'name',
|
|
345
|
+
operator: { type: 'equal' },
|
|
346
|
+
value: commandKey,
|
|
347
|
+
},
|
|
348
|
+
});
|
|
349
|
+
const row = page.items?.[0];
|
|
350
|
+
if (!row) {
|
|
351
|
+
return null;
|
|
352
|
+
}
|
|
353
|
+
return strategy === 'command-registry'
|
|
354
|
+
? mapCommandDefinitionEntityRow(row)
|
|
355
|
+
: mapActivityDefinitionEntityRow(row);
|
|
356
|
+
}
|
|
357
|
+
catch {
|
|
358
|
+
return null;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMActivityCommandConfiguratorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
362
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: AXMActivityCommandConfiguratorComponent, isStandalone: true, selector: "axm-activity-command-configurator", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, executionModeFilter: { classPropertyName: "executionModeFilter", publicName: "executionModeFilter", isSignal: true, isRequired: false, transformFunction: null }, loadStrategy: { classPropertyName: "loadStrategy", publicName: "loadStrategy", isSignal: true, isRequired: false, transformFunction: null }, capabilitiesFilter: { classPropertyName: "capabilitiesFilter", publicName: "capabilitiesFilter", isSignal: true, isRequired: false, transformFunction: null }, selectedCommandKeyModel: { classPropertyName: "selectedCommandKeyModel", publicName: "selectedCommandKeyModel", isSignal: true, isRequired: false, transformFunction: null }, payloadModel: { classPropertyName: "payloadModel", publicName: "payloadModel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", selectedCommandKeyModel: "selectedCommandKeyModelChange", payloadModel: "payloadModelChange" }, host: { properties: { "attr.readonly": "readonly() ? \"\" : null" }, classAttribute: "flex flex-col" }, ngImport: i0, template: `
|
|
363
|
+
<axp-item-configurator
|
|
364
|
+
[(selectedItemId)]="selectedCommandKeyModel"
|
|
365
|
+
[(values)]="payloadModel"
|
|
366
|
+
[label]="label()"
|
|
367
|
+
[readonly]="readonly()"
|
|
368
|
+
[items]="configuratorItems()"
|
|
369
|
+
/>
|
|
370
|
+
`, isInline: true, styles: [":host([readonly]){pointer-events:none;opacity:.7}\n"], dependencies: [{ kind: "component", type: AXPItemConfiguratorComponent, selector: "axp-item-configurator", inputs: ["selectedItemId", "values", "label", "readonly", "items", "headerActions"], outputs: ["selectedItemIdChange", "valuesChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
371
|
+
}
|
|
372
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMActivityCommandConfiguratorComponent, decorators: [{
|
|
373
|
+
type: Component,
|
|
374
|
+
args: [{ selector: 'axm-activity-command-configurator', template: `
|
|
375
|
+
<axp-item-configurator
|
|
376
|
+
[(selectedItemId)]="selectedCommandKeyModel"
|
|
377
|
+
[(values)]="payloadModel"
|
|
378
|
+
[label]="label()"
|
|
379
|
+
[readonly]="readonly()"
|
|
380
|
+
[items]="configuratorItems()"
|
|
381
|
+
/>
|
|
382
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
383
|
+
class: 'flex flex-col',
|
|
384
|
+
'[attr.readonly]': 'readonly() ? "" : null',
|
|
385
|
+
}, imports: [AXPItemConfiguratorComponent], styles: [":host([readonly]){pointer-events:none;opacity:.7}\n"] }]
|
|
386
|
+
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], executionModeFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "executionModeFilter", required: false }] }], loadStrategy: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadStrategy", required: false }] }], capabilitiesFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "capabilitiesFilter", required: false }] }], selectedCommandKeyModel: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedCommandKeyModel", required: false }] }, { type: i0.Output, args: ["selectedCommandKeyModelChange"] }], payloadModel: [{ type: i0.Input, args: [{ isSignal: true, alias: "payloadModel", required: false }] }, { type: i0.Output, args: ["payloadModelChange"] }] } });
|
|
387
|
+
|
|
388
|
+
//#region ---- Imports ----
|
|
389
|
+
//#endregion
|
|
390
|
+
//#region ---- Component ----
|
|
391
|
+
class AXMActivityCommandConfiguratorWidgetEditComponent extends AXPValueWidgetComponent {
|
|
392
|
+
constructor() {
|
|
393
|
+
super(...arguments);
|
|
394
|
+
this.readonly = computed(() => this.options()['readonly'] ?? false, /* @ts-ignore */
|
|
395
|
+
...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
|
|
396
|
+
this.label = computed(() => this.options()['label'] || 'Activity', /* @ts-ignore */
|
|
397
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
398
|
+
this.loadStrategy = computed(() => {
|
|
399
|
+
const value = this.options()['loadStrategy'];
|
|
400
|
+
return value === 'flat-query' || value === 'command-registry' ? value : 'default';
|
|
401
|
+
}, /* @ts-ignore */
|
|
402
|
+
...(ngDevMode ? [{ debugName: "loadStrategy" }] : /* istanbul ignore next */ []));
|
|
403
|
+
this.executionModeFilter = computed(() => {
|
|
404
|
+
const value = this.options()['executionModeFilter'];
|
|
405
|
+
return value === 'frontend' || value === 'backend' || value === 'both' ? value : undefined;
|
|
406
|
+
}, /* @ts-ignore */
|
|
407
|
+
...(ngDevMode ? [{ debugName: "executionModeFilter" }] : /* istanbul ignore next */ []));
|
|
408
|
+
this.capabilitiesFilter = computed(() => this.options()['capabilitiesFilter'], /* @ts-ignore */
|
|
409
|
+
...(ngDevMode ? [{ debugName: "capabilitiesFilter" }] : /* istanbul ignore next */ []));
|
|
410
|
+
this.isInitialized = signal(false, /* @ts-ignore */
|
|
411
|
+
...(ngDevMode ? [{ debugName: "isInitialized" }] : /* istanbul ignore next */ []));
|
|
412
|
+
this.valueModel = model({ key: '', payload: {} }, /* @ts-ignore */
|
|
413
|
+
...(ngDevMode ? [{ debugName: "valueModel" }] : /* istanbul ignore next */ []));
|
|
414
|
+
this.syncValueToConfigurator = effect(() => {
|
|
415
|
+
const value = this.getValue() ?? { key: '', payload: {} };
|
|
416
|
+
const currentModel = untracked(() => this.valueModel());
|
|
417
|
+
if (!isEqual(value, currentModel)) {
|
|
418
|
+
untracked(() => {
|
|
419
|
+
this.valueModel.set({
|
|
420
|
+
key: value.key ?? '',
|
|
421
|
+
title: value.title,
|
|
422
|
+
payload: value.payload ?? {},
|
|
423
|
+
});
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
untracked(() => {
|
|
427
|
+
if (!this.isInitialized()) {
|
|
428
|
+
this.isInitialized.set(true);
|
|
429
|
+
}
|
|
430
|
+
});
|
|
431
|
+
}, /* @ts-ignore */
|
|
432
|
+
...(ngDevMode ? [{ debugName: "syncValueToConfigurator" }] : /* istanbul ignore next */ []));
|
|
433
|
+
this.syncConfiguratorToValue = effect(() => {
|
|
434
|
+
const modelValue = this.valueModel();
|
|
435
|
+
if (!untracked(() => this.isInitialized()))
|
|
436
|
+
return;
|
|
437
|
+
const currentValue = untracked(() => this.getValue() ?? { key: '', payload: {} });
|
|
438
|
+
if (!isEqual(modelValue, currentValue)) {
|
|
439
|
+
untracked(() => {
|
|
440
|
+
this.setValue(modelValue ?? { key: '', payload: {} });
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
}, /* @ts-ignore */
|
|
444
|
+
...(ngDevMode ? [{ debugName: "syncConfiguratorToValue" }] : /* istanbul ignore next */ []));
|
|
445
|
+
}
|
|
446
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMActivityCommandConfiguratorWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
447
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXMActivityCommandConfiguratorWidgetEditComponent, isStandalone: true, selector: "axm-activity-command-configurator-widget-edit", inputs: { valueModel: { classPropertyName: "valueModel", publicName: "valueModel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueModel: "valueModelChange" }, usesInheritance: true, ngImport: i0, template: `
|
|
448
|
+
@if (isInitialized()) {
|
|
449
|
+
<axm-activity-command-configurator
|
|
450
|
+
[(value)]="valueModel"
|
|
451
|
+
[label]="label()"
|
|
452
|
+
[readonly]="readonly()"
|
|
453
|
+
[loadStrategy]="loadStrategy()"
|
|
454
|
+
[executionModeFilter]="executionModeFilter()"
|
|
455
|
+
[capabilitiesFilter]="capabilitiesFilter()"
|
|
456
|
+
></axm-activity-command-configurator>
|
|
457
|
+
}
|
|
458
|
+
`, isInline: true, dependencies: [{ kind: "component", type: AXMActivityCommandConfiguratorComponent, selector: "axm-activity-command-configurator", inputs: ["value", "label", "readonly", "executionModeFilter", "loadStrategy", "capabilitiesFilter", "selectedCommandKeyModel", "payloadModel"], outputs: ["valueChange", "selectedCommandKeyModelChange", "payloadModelChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
459
|
+
}
|
|
460
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMActivityCommandConfiguratorWidgetEditComponent, decorators: [{
|
|
461
|
+
type: Component,
|
|
462
|
+
args: [{
|
|
463
|
+
selector: 'axm-activity-command-configurator-widget-edit',
|
|
464
|
+
template: `
|
|
465
|
+
@if (isInitialized()) {
|
|
466
|
+
<axm-activity-command-configurator
|
|
467
|
+
[(value)]="valueModel"
|
|
468
|
+
[label]="label()"
|
|
469
|
+
[readonly]="readonly()"
|
|
470
|
+
[loadStrategy]="loadStrategy()"
|
|
471
|
+
[executionModeFilter]="executionModeFilter()"
|
|
472
|
+
[capabilitiesFilter]="capabilitiesFilter()"
|
|
473
|
+
></axm-activity-command-configurator>
|
|
474
|
+
}
|
|
475
|
+
`,
|
|
476
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
477
|
+
imports: [AXMActivityCommandConfiguratorComponent],
|
|
478
|
+
}]
|
|
479
|
+
}], propDecorators: { valueModel: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueModel", required: false }] }, { type: i0.Output, args: ["valueModelChange"] }] } });
|
|
480
|
+
|
|
481
|
+
export { AXMActivityCommandConfiguratorWidgetEditComponent };
|
|
482
|
+
//# sourceMappingURL=acorex-platform-module-workflow-management-client-activity-command-configurator-widget-edit.component-DuYGXzAL.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-workflow-management-client-activity-command-configurator-widget-edit.component-DuYGXzAL.mjs","sources":["../../../../libs/modules/workflow-management/client/src/lib/features/activity-command-configurator/activity-command-configurator.utils.ts","../../../../libs/modules/workflow-management/client/src/lib/features/activity-command-configurator/activity-command-configurator.component.ts","../../../../libs/modules/workflow-management/client/src/lib/features/activity-command-configurator/activity-command-configurator-widget-edit.component.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport type { AXPProperty } from '@acorex-platform/framework-shared/core';\nimport type { AXPPropertyDefinition } from '@acorex-platform/framework-shared/domain';\nimport type { AXPWidgetProperty, AXPWidgetPropertyGroup } from '@acorex-platform/framework-shared/widget-core';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXDataSourceFilterOption } from '@acorex/cdk/common';\nimport { mapAXPPropertyToWidgetProperty } from '@acorex-platform/framework-client/layout/widget-core';\n\nimport type {\n CommandConfiguratorCapabilitiesFilter,\n CommandConfiguratorListRow,\n} from './activity-command-configurator.types';\n\n//#endregion\n\n//#region ---- Query filters ----\n\nexport function buildCommandDefinitionListQueryFilter(\n executionMode?: 'frontend' | 'backend' | 'both',\n): AXDataSourceFilterOption | undefined {\n if (!executionMode) {\n return undefined;\n }\n\n return {\n logic: 'or',\n filters: [\n { field: 'executionMode', operator: { type: 'equal' }, value: executionMode },\n { field: 'executionMode', operator: { type: 'equal' }, value: 'both' },\n ],\n };\n}\n\nexport function buildActivityDefinitionListQueryFilter(\n executionMode?: 'frontend' | 'backend' | 'both',\n): AXDataSourceFilterOption | undefined {\n return buildCommandDefinitionListQueryFilter(executionMode);\n}\n\nexport function matchesCommandConfiguratorCapabilitiesFilter(\n row: Pick<CommandConfiguratorListRow, 'capabilities'>,\n filter: CommandConfiguratorCapabilitiesFilter | undefined,\n): boolean {\n const anyOf = filter?.anyOf?.filter(Boolean) ?? [];\n if (anyOf.length === 0) {\n return true;\n }\n\n const caps = row.capabilities ?? [];\n return anyOf.some((cap) => caps.includes(cap));\n}\n\n//#endregion\n\n//#region ---- Row mapping ----\n\nexport function mapPropertyDefinitionsToInputs(\n inputs: AXPPropertyDefinition[] | undefined,\n): AXPProperty[] {\n if (!inputs?.length) {\n return [];\n }\n\n return inputs.map((input) => ({\n name: input.name,\n title: input.title,\n description: input.description,\n dataType: input.dataType ?? 'string',\n validations: input.validations,\n interface: {\n type: input.interface.name,\n options: input.interface.options ?? {},\n },\n }));\n}\n\nexport function mapCommandDefinitionEntityRow(row: Record<string, unknown>): CommandConfiguratorListRow {\n return {\n id: String(row['id'] ?? row['name'] ?? ''),\n name: String(row['name'] ?? ''),\n title: typeof row['catalogTitle'] === 'string' ? row['catalogTitle'] : undefined,\n description: typeof row['description'] === 'string' ? row['description'] : undefined,\n icon: 'fa-light fa-server',\n inputs: mapPropertyDefinitionsToInputs(\n Array.isArray(row['inputOptionDefinitions'])\n ? (row['inputOptionDefinitions'] as AXPPropertyDefinition[])\n : undefined,\n ),\n capabilities: Array.isArray(row['capabilities'])\n ? (row['capabilities'] as CommandConfiguratorListRow['capabilities'])\n : undefined,\n active: row['active'] !== false,\n executionMode:\n row['executionMode'] === 'frontend' ||\n row['executionMode'] === 'backend' ||\n row['executionMode'] === 'both'\n ? row['executionMode']\n : undefined,\n };\n}\n\nexport function mapActivityDefinitionEntityRow(row: Record<string, unknown>): CommandConfiguratorListRow {\n const inputs = Array.isArray(row['inputs']) ? (row['inputs'] as AXPProperty[]) : undefined;\n\n return {\n id: String(row['id'] ?? row['name'] ?? ''),\n name: String(row['name'] ?? ''),\n title: typeof row['title'] === 'string' ? row['title'] : undefined,\n description: typeof row['description'] === 'string' ? row['description'] : undefined,\n icon: typeof row['icon'] === 'string' ? row['icon'] : 'fa-light fa-bolt',\n inputs,\n active: true,\n executionMode:\n row['executionMode'] === 'frontend' ||\n row['executionMode'] === 'backend' ||\n row['executionMode'] === 'both'\n ? row['executionMode']\n : undefined,\n };\n}\n\nexport function mapCommandInputsToWidgetProperties(\n inputs: AXPProperty[] | undefined,\n translation: AXTranslationService,\n): AXPWidgetProperty[] {\n const list = inputs ?? [];\n const group: AXPWidgetPropertyGroup = {\n name: 'command-inputs',\n title: '@workflow-management:automations.entities.automation.fields.command.title',\n order: 0,\n };\n\n return list.map((property, index) =>\n mapAXPPropertyToWidgetProperty(property, {\n group,\n order: index,\n valuePathPrefix: 'options',\n resolveTitle: (prop) =>\n typeof prop.title === 'string' ? prop.title : (translation.resolve(prop.title) ?? prop.name),\n resolveDescription: (prop) =>\n prop.description === undefined\n ? undefined\n : typeof prop.description === 'string'\n ? prop.description\n : translation.resolve(prop.description),\n }),\n );\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport { AXTranslationService } from '@acorex/core/translation';\nimport {\n AXPItemConfiguratorComponent,\n ItemConfiguratorListItem,\n} from '@acorex-platform/framework-client/layout/components';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport type { AXPActivityDefinition } from '@acorex-platform/framework-shared/core';\nimport { AXPActivityDefinitionService } from '@acorex-platform/framework-client/workflow';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n inject,\n input,\n model,\n signal,\n untracked,\n} from '@angular/core';\nimport { isEqual } from 'lodash';\nimport type {\n ActivityCommandValue,\n CommandConfiguratorListRow,\n} from './activity-command-configurator.types';\nimport {\n buildActivityDefinitionListQueryFilter,\n buildCommandDefinitionListQueryFilter,\n mapActivityDefinitionEntityRow,\n mapCommandDefinitionEntityRow,\n mapCommandInputsToWidgetProperties,\n matchesCommandConfiguratorCapabilitiesFilter,\n} from './activity-command-configurator.utils';\n\n//#endregion\n\n//#region ---- Component ----\n\n/**\n * Select a command/activity and configure its inputs via {@link AXPItemConfiguratorComponent}.\n * Entity-backed modes use the same reactive loading pattern as {@link AXMWorkflowConfiguratorComponent}.\n */\n@Component({\n selector: 'axm-activity-command-configurator',\n template: `\n <axp-item-configurator\n [(selectedItemId)]=\"selectedCommandKeyModel\"\n [(values)]=\"payloadModel\"\n [label]=\"label()\"\n [readonly]=\"readonly()\"\n [items]=\"configuratorItems()\"\n />\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'flex flex-col',\n '[attr.readonly]': 'readonly() ? \"\" : null',\n },\n styles: [\n `\n :host([readonly]) {\n pointer-events: none;\n opacity: 0.7;\n }\n `,\n ],\n imports: [AXPItemConfiguratorComponent],\n})\nexport class AXMActivityCommandConfiguratorComponent {\n //#region ---- Inputs ----\n\n value = model<ActivityCommandValue>({ key: '', payload: {} });\n\n label = input<string>(\n '@workflow-management:automations.entities.automation.fields.command.title',\n );\n\n readonly = input<boolean>(false);\n\n executionModeFilter = input<'frontend' | 'backend' | 'both' | undefined>(\n undefined,\n );\n\n /**\n * - `default`: workflow toolbox activities (in-memory categories).\n * - `flat-query`: query `WorkflowManagement.ActivityDefinition` entity storage.\n * - `command-registry`: query persisted command catalog entity (default `PlatformManagement.CommandDefinition`).\n */\n loadStrategy = input<'default' | 'flat-query' | 'command-registry'>(\n 'default',\n );\n\n capabilitiesFilter = input<\n Array<'ai' | 'workflow' | 'background-job'> | undefined\n >(undefined);\n\n private static readonly COMMAND_DEFINITION_MODULE = 'PlatformManagement';\n private static readonly COMMAND_DEFINITION_ENTITY = 'CommandDefinition';\n\n //#endregion\n\n //#region ---- Services ----\n\n private readonly activityService = inject(AXPActivityDefinitionService);\n private readonly entityService = inject(AXPEntityService);\n private readonly translation = inject(AXTranslationService);\n\n //#endregion\n\n //#region ---- State ----\n\n protected selectedCommandKeyModel = model<string>('');\n\n protected payloadModel = model<Record<string, unknown>>({});\n\n protected catalogRows = signal<CommandConfiguratorListRow[]>([]);\n\n protected configuratorItems = computed<ItemConfiguratorListItem[]>(() =>\n this.catalogRows().map((row) => ({\n id: row.name,\n title: (row.title ?? row.name) as ItemConfiguratorListItem['title'],\n icon: row.icon ?? 'fa-light fa-server',\n description: row.description as ItemConfiguratorListItem['description'],\n propertyDefinitions: mapCommandInputsToWidgetProperties(\n row.inputs,\n this.translation,\n ),\n })),\n );\n\n //#endregion\n\n //#region ---- Lifecycle ----\n\n constructor() {\n effect(() => {\n this.loadStrategy();\n this.executionModeFilter();\n this.capabilitiesFilter();\n untracked(() => {\n void this.loadCatalogRows();\n });\n });\n\n effect(() => {\n const v = this.value();\n const key = v.key?.trim() ?? '';\n const payload = v.payload ?? {};\n\n untracked(() => {\n if (this.selectedCommandKeyModel() !== key) {\n this.selectedCommandKeyModel.set(key);\n }\n if (!isEqual(this.payloadModel(), payload)) {\n this.payloadModel.set({ ...payload });\n }\n });\n });\n\n effect(() => {\n const key = this.selectedCommandKeyModel();\n const payload = this.payloadModel();\n const current = untracked(() => this.value());\n const row = untracked(() =>\n this.catalogRows().find((item) => item.name === key),\n );\n\n const next: ActivityCommandValue = {\n key,\n title: row?.title ?? row?.name ?? current.title,\n payload: { ...payload },\n };\n\n const normalizedCurrent: ActivityCommandValue = {\n key: current.key?.trim() ?? '',\n title: current.title,\n payload: current.payload ?? {},\n };\n\n if (!isEqual(next, normalizedCurrent)) {\n untracked(() => this.value.set(next));\n }\n });\n }\n\n //#endregion\n\n //#region ---- Data loading ----\n\n private async loadCatalogRows(): Promise<void> {\n try {\n const strategy = this.loadStrategy();\n const modeFilter = this.executionModeFilter();\n const caps = this.capabilitiesFilter();\n const capabilityFilter =\n caps && caps.length > 0 ? { anyOf: caps } : undefined;\n const pinnedKey = this.value().key?.trim() ?? '';\n\n let rows: CommandConfiguratorListRow[] = [];\n\n switch (strategy) {\n case 'command-registry':\n rows = await this.queryCommandDefinitionRows(\n modeFilter,\n capabilityFilter,\n );\n break;\n case 'flat-query':\n rows = await this.queryActivityDefinitionRows(modeFilter);\n break;\n default:\n rows = await this.queryToolboxActivities(modeFilter);\n break;\n }\n\n rows = rows\n .filter((r) => !!r.name?.trim() && r.active !== false)\n .sort((a, b) => {\n const ta = (a.title ?? a.name).trim();\n const tb = (b.title ?? b.name).trim();\n return ta.localeCompare(tb, this.translation.getActiveLang(), {\n sensitivity: 'base',\n });\n });\n\n const hydrated = await Promise.all(\n rows.map((row) => this.hydrateCatalogRow(row, strategy)),\n );\n\n if (pinnedKey && !hydrated.some((r) => r.name === pinnedKey)) {\n const pinned = await this.loadPinnedRow(pinnedKey, strategy);\n if (pinned) {\n hydrated.unshift(pinned);\n }\n }\n\n this.catalogRows.set(hydrated);\n } catch {\n this.catalogRows.set([]);\n }\n }\n\n private async queryCommandDefinitionRows(\n executionMode?: 'frontend' | 'backend' | 'both',\n capabilityFilter?: { anyOf: Array<'ai' | 'workflow' | 'background-job'> },\n ): Promise<CommandConfiguratorListRow[]> {\n const page = await this.entityService\n .withEntity(\n AXMActivityCommandConfiguratorComponent.COMMAND_DEFINITION_MODULE,\n AXMActivityCommandConfiguratorComponent.COMMAND_DEFINITION_ENTITY,\n )\n .data()\n .query({\n skip: 0,\n take: 5000,\n filter: buildCommandDefinitionListQueryFilter(executionMode),\n });\n\n return (page.items ?? [])\n .map((row) =>\n mapCommandDefinitionEntityRow(\n row as unknown as Record<string, unknown>,\n ),\n )\n .filter((row) =>\n matchesCommandConfiguratorCapabilitiesFilter(row, capabilityFilter),\n );\n }\n\n private async queryActivityDefinitionRows(\n executionMode?: 'frontend' | 'backend' | 'both',\n ): Promise<CommandConfiguratorListRow[]> {\n const page = await this.entityService\n .withEntity('WorkflowManagement', 'ActivityDefinition')\n .data()\n .query({\n skip: 0,\n take: 2000,\n filter: buildActivityDefinitionListQueryFilter(executionMode),\n });\n\n return (page.items ?? []).map((row) =>\n mapActivityDefinitionEntityRow(row as unknown as Record<string, unknown>),\n );\n }\n\n private async queryToolboxActivities(\n executionMode?: 'frontend' | 'backend' | 'both',\n ): Promise<CommandConfiguratorListRow[]> {\n let activities = await this.activityService.getAllActivities();\n if (executionMode) {\n activities = activities.filter(\n (item) =>\n item.executionMode === executionMode || item.executionMode === 'both',\n );\n }\n\n return activities.map((activity) => this.mapToolboxActivityRow(activity));\n }\n\n private mapToolboxActivityRow(\n activity: AXPActivityDefinition,\n ): CommandConfiguratorListRow {\n return {\n id: activity.name,\n name: activity.name,\n title:\n typeof activity.title === 'string' ? activity.title : activity.name,\n description:\n typeof activity.description === 'string'\n ? activity.description\n : undefined,\n icon: activity.icon ?? 'fa-light fa-bolt',\n inputs: activity.inputs,\n active: true,\n executionMode: activity.executionMode,\n };\n }\n\n private async hydrateCatalogRow(\n row: CommandConfiguratorListRow,\n strategy: 'default' | 'flat-query' | 'command-registry',\n ): Promise<CommandConfiguratorListRow> {\n if ((row.inputs?.length ?? 0) > 0 || strategy === 'default') {\n return row;\n }\n\n const id = row.id?.trim();\n if (!id) {\n return row;\n }\n\n try {\n const module =\n strategy === 'command-registry'\n ? AXMActivityCommandConfiguratorComponent.COMMAND_DEFINITION_MODULE\n : 'WorkflowManagement';\n const entity =\n strategy === 'command-registry'\n ? AXMActivityCommandConfiguratorComponent.COMMAND_DEFINITION_ENTITY\n : 'ActivityDefinition';\n\n const full = (await this.entityService\n .withEntity(module, entity)\n .data()\n .byKey(id)) as Record<string, unknown> | null;\n\n if (!full) {\n return row;\n }\n\n const mapped =\n strategy === 'command-registry'\n ? mapCommandDefinitionEntityRow(full)\n : mapActivityDefinitionEntityRow(full);\n\n return { ...row, ...mapped, inputs: mapped.inputs ?? row.inputs };\n } catch {\n return row;\n }\n }\n\n private async loadPinnedRow(\n commandKey: string,\n strategy: 'default' | 'flat-query' | 'command-registry',\n ): Promise<CommandConfiguratorListRow | null> {\n if (strategy === 'default') {\n const activity = await this.activityService.getActivityByName(commandKey);\n return activity ? this.mapToolboxActivityRow(activity) : null;\n }\n\n try {\n const module =\n strategy === 'command-registry'\n ? AXMActivityCommandConfiguratorComponent.COMMAND_DEFINITION_MODULE\n : 'WorkflowManagement';\n const entity =\n strategy === 'command-registry'\n ? AXMActivityCommandConfiguratorComponent.COMMAND_DEFINITION_ENTITY\n : 'ActivityDefinition';\n\n const page = await this.entityService\n .withEntity(module, entity)\n .data()\n .query({\n skip: 0,\n take: 1,\n filter: {\n field: 'name',\n operator: { type: 'equal' },\n value: commandKey,\n },\n });\n\n const row = page.items?.[0];\n if (!row) {\n return null;\n }\n\n return strategy === 'command-registry'\n ? mapCommandDefinitionEntityRow(\n row as unknown as Record<string, unknown>,\n )\n : mapActivityDefinitionEntityRow(\n row as unknown as Record<string, unknown>,\n );\n } catch {\n return null;\n }\n }\n\n //#endregion\n}\n\nexport type { ActivityCommandValue } from './activity-command-configurator.types';\n\n//#endregion\n","//#region ---- Imports ----\r\r\n\r\r\nimport { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\r\r\nimport { ChangeDetectionStrategy, Component, computed, effect, model, signal, untracked } from '@angular/core';\r\r\nimport { isEqual } from 'lodash';\r\r\nimport {\r\r\n AXMActivityCommandConfiguratorComponent,\r\r\n} from './activity-command-configurator.component';\r\r\nimport type { ActivityCommandValue } from './activity-command-configurator.types';\r\r\n\r\r\n//#endregion\r\r\n\r\r\n//#region ---- Component ----\r\r\n\r\r\n@Component({\r\r\n selector: 'axm-activity-command-configurator-widget-edit',\r\r\n template: `\r\r\n @if (isInitialized()) {\r\r\n <axm-activity-command-configurator\r\r\n [(value)]=\"valueModel\"\r\r\n [label]=\"label()\"\r\r\n [readonly]=\"readonly()\"\r\r\n [loadStrategy]=\"loadStrategy()\"\r\r\n [executionModeFilter]=\"executionModeFilter()\"\r\r\n [capabilitiesFilter]=\"capabilitiesFilter()\"\r\r\n ></axm-activity-command-configurator>\r\r\n }\r\r\n `,\r\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\r\n imports: [AXMActivityCommandConfiguratorComponent],\r\r\n})\r\r\nexport class AXMActivityCommandConfiguratorWidgetEditComponent extends AXPValueWidgetComponent<ActivityCommandValue> {\r\r\n protected readonly readonly = computed<boolean>(() => (this.options()['readonly'] as boolean) ?? false);\r\r\n protected label = computed<string>(() => (this.options()['label'] as string) || 'Activity');\r\r\n protected loadStrategy = computed<'default' | 'flat-query' | 'command-registry'>(() => {\r\r\n const value = this.options()['loadStrategy'];\r\r\n return value === 'flat-query' || value === 'command-registry' ? value : 'default';\r\r\n });\r\r\n protected executionModeFilter = computed<'frontend' | 'backend' | 'both' | undefined>(() => {\r\r\n const value = this.options()['executionModeFilter'];\r\r\n return value === 'frontend' || value === 'backend' || value === 'both' ? value : undefined;\r\r\n });\r\r\n protected capabilitiesFilter = computed<Array<'ai' | 'workflow' | 'background-job'> | undefined>(\r\r\n () => this.options()['capabilitiesFilter'] as Array<'ai' | 'workflow' | 'background-job'> | undefined,\r\r\n );\r\r\n\r\r\n protected isInitialized = signal(false);\r\r\n protected valueModel = model<ActivityCommandValue>({ key: '', payload: {} });\r\r\n\r\r\n private syncValueToConfigurator = effect(() => {\r\r\n const value = this.getValue() ?? { key: '', payload: {} };\r\r\n const currentModel = untracked(() => this.valueModel());\r\r\n\r\r\n if (!isEqual(value, currentModel)) {\r\r\n untracked(() => {\r\r\n this.valueModel.set({\r\r\n key: value.key ?? '',\r\r\n title: value.title,\r\r\n payload: value.payload ?? {},\r\r\n });\r\r\n });\r\r\n }\r\r\n\r\r\n untracked(() => {\r\r\n if (!this.isInitialized()) {\r\r\n this.isInitialized.set(true);\r\r\n }\r\r\n });\r\r\n });\r\r\n\r\r\n private syncConfiguratorToValue = effect(() => {\r\r\n const modelValue = this.valueModel();\r\r\n\r\r\n if (!untracked(() => this.isInitialized())) return;\r\r\n\r\r\n const currentValue = untracked(() => this.getValue() ?? { key: '', payload: {} });\r\r\n\r\r\n if (!isEqual(modelValue, currentValue)) {\r\r\n untracked(() => {\r\r\n this.setValue(modelValue ?? { key: '', payload: {} });\r\r\n });\r\r\n }\r\r\n });\r\r\n}\r\r\n\r\r\n//#endregion\r\r\n"],"names":[],"mappings":";;;;;;;;;AAAA;AAcA;AAEA;AAEM,SAAU,qCAAqC,CACnD,aAA+C,EAAA;IAE/C,IAAI,CAAC,aAAa,EAAE;AAClB,QAAA,OAAO,SAAS;IAClB;IAEA,OAAO;AACL,QAAA,KAAK,EAAE,IAAI;AACX,QAAA,OAAO,EAAE;AACP,YAAA,EAAE,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,aA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