@acorex-platform/module-rule-engine-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.
@@ -0,0 +1,109 @@
1
+ const AXPRuleEngineManagementMenuKeys = {
2
+ Root: 'rule-engine-management:menu',
3
+ RuleSets: 'rule-engine-management:rule-sets',
4
+ Rules: 'rule-engine-management:rules',
5
+ Tables: 'rule-engine-management:tables',
6
+ Versions: 'rule-engine-management:versions',
7
+ Runs: 'rule-engine-management:runs',
8
+ };
9
+
10
+ /**
11
+ * Administration capabilities used by this module.
12
+ * Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).
13
+ */
14
+ const AXPAdministrationPermissionKeys = {
15
+ Access: 'Administration:Permission:Access',
16
+ MaintainUsersAndRoles: 'Administration:Permission:MaintainUsersAndRoles',
17
+ ManageSessions: 'Administration:Permission:ManageSessions',
18
+ MaintainPolicies: 'Administration:Permission:MaintainPolicies',
19
+ ViewIntegrations: 'Administration:Permission:ViewIntegrations',
20
+ MaintainConnections: 'Administration:Permission:MaintainConnections',
21
+ MaintainWorkflows: 'Administration:Permission:MaintainWorkflows',
22
+ ManageWorkflowActions: 'Administration:Permission:ManageWorkflowActions',
23
+ ViewRules: 'Administration:Permission:ViewRules',
24
+ MaintainRules: 'Administration:Permission:MaintainRules',
25
+ ManageRuleActions: 'Administration:Permission:ManageRuleActions',
26
+ MaintainAi: 'Administration:Permission:MaintainAi',
27
+ UseAiAssist: 'Administration:Permission:UseAiAssist',
28
+ MaintainDashboards: 'Administration:Permission:MaintainDashboards',
29
+ ViewJobs: 'Administration:Permission:ViewJobs',
30
+ ManageJobActions: 'Administration:Permission:ManageJobActions',
31
+ ViewObservability: 'Administration:Permission:ViewObservability',
32
+ MaintainObservability: 'Administration:Permission:MaintainObservability',
33
+ };
34
+ /**
35
+ * @deprecated Prefer {@link AXPAdministrationPermissionKeys}.
36
+ * Legacy nested shape kept so existing imports compile during migration.
37
+ */
38
+ const AXMRuleEnginePermissionKeys = {
39
+ RuleSet: {
40
+ View: AXPAdministrationPermissionKeys.ViewRules,
41
+ Manage: AXPAdministrationPermissionKeys.MaintainRules,
42
+ Publish: AXPAdministrationPermissionKeys.ManageRuleActions,
43
+ },
44
+ Evaluate: {
45
+ Run: AXPAdministrationPermissionKeys.ManageRuleActions,
46
+ Simulate: AXPAdministrationPermissionKeys.ManageRuleActions,
47
+ },
48
+ };
49
+
50
+ const config = {
51
+ i18n: 'rule-engine-management',
52
+ module: 'RuleEngineManagement',
53
+ };
54
+ const RootConfig = {
55
+ config,
56
+ module: {
57
+ route: 'rule-engine-management',
58
+ name: config.module,
59
+ title: '@rule-engine-management:module.title',
60
+ icon: 'fa-light fa-scale-balanced',
61
+ },
62
+ entities: {
63
+ ruleSet: {
64
+ name: 'RuleSet',
65
+ fullName: `${config.module}.RuleSet`,
66
+ title: '@rule-engine-management:rule-sets.entities.rule-set.title',
67
+ titlePlural: '@rule-engine-management:rule-sets.entities.rule-set.plural',
68
+ icon: 'fa-light fa-layer-group',
69
+ },
70
+ ruleDefinition: {
71
+ name: 'RuleDefinition',
72
+ fullName: `${config.module}.RuleDefinition`,
73
+ title: '@rule-engine-management:rules.entities.rule-definition.title',
74
+ titlePlural: '@rule-engine-management:rules.entities.rule-definition.plural',
75
+ icon: 'fa-light fa-list-check',
76
+ },
77
+ decisionTable: {
78
+ name: 'DecisionTable',
79
+ fullName: `${config.module}.DecisionTable`,
80
+ title: '@rule-engine-management:tables.entities.decision-table.title',
81
+ titlePlural: '@rule-engine-management:tables.entities.decision-table.plural',
82
+ icon: 'fa-light fa-table',
83
+ },
84
+ ruleSetVersion: {
85
+ name: 'RuleSetVersion',
86
+ fullName: `${config.module}.RuleSetVersion`,
87
+ title: '@rule-engine-management:versions.entities.rule-set-version.title',
88
+ titlePlural: '@rule-engine-management:versions.entities.rule-set-version.plural',
89
+ icon: 'fa-light fa-code-branch',
90
+ },
91
+ ruleEvaluationRun: {
92
+ name: 'RuleEvaluationRun',
93
+ fullName: `${config.module}.RuleEvaluationRun`,
94
+ title: '@rule-engine-management:runs.entities.rule-evaluation-run.title',
95
+ titlePlural: '@rule-engine-management:runs.entities.rule-evaluation-run.plural',
96
+ icon: 'fa-light fa-play',
97
+ },
98
+ },
99
+ };
100
+
101
+ /** Registry key for RuleSet Simulate custom entity page (tab). */
102
+ const RULE_SET_SIMULATE_PAGE_COMPONENT_KEY = 'rule-set-simulate-page';
103
+
104
+ /**
105
+ * Generated bundle index. Do not edit.
106
+ */
107
+
108
+ export { AXMRuleEnginePermissionKeys, AXPAdministrationPermissionKeys, AXPRuleEngineManagementMenuKeys, RULE_SET_SIMULATE_PAGE_COMPONENT_KEY, RootConfig };
109
+ //# sourceMappingURL=acorex-platform-module-rule-engine-management-client-contracts.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-rule-engine-management-client-contracts.mjs","sources":["../../../../libs/modules/rule-engine-management/contracts/src/menu.keys.ts","../../../../libs/modules/rule-engine-management/contracts/src/permission.keys.ts","../../../../libs/modules/rule-engine-management/contracts/src/root-config.ts","../../../../libs/modules/rule-engine-management/contracts/src/rule-set-simulate-page.component-key.ts","../../../../libs/modules/rule-engine-management/contracts/src/acorex-platform-module-rule-engine-management-client-contracts.ts"],"sourcesContent":["export const AXPRuleEngineManagementMenuKeys = {\n Root: 'rule-engine-management:menu',\n RuleSets: 'rule-engine-management:rule-sets',\n Rules: 'rule-engine-management:rules',\n Tables: 'rule-engine-management:tables',\n Versions: 'rule-engine-management:versions',\n Runs: 'rule-engine-management:runs',\n} as const;\n","/**\n * Administration capabilities used by this module.\n * Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).\n */\nexport const AXPAdministrationPermissionKeys = {\n Access: 'Administration:Permission:Access',\n MaintainUsersAndRoles: 'Administration:Permission:MaintainUsersAndRoles',\n ManageSessions: 'Administration:Permission:ManageSessions',\n MaintainPolicies: 'Administration:Permission:MaintainPolicies',\n ViewIntegrations: 'Administration:Permission:ViewIntegrations',\n MaintainConnections: 'Administration:Permission:MaintainConnections',\n MaintainWorkflows: 'Administration:Permission:MaintainWorkflows',\n ManageWorkflowActions: 'Administration:Permission:ManageWorkflowActions',\n ViewRules: 'Administration:Permission:ViewRules',\n MaintainRules: 'Administration:Permission:MaintainRules',\n ManageRuleActions: 'Administration:Permission:ManageRuleActions',\n MaintainAi: 'Administration:Permission:MaintainAi',\n UseAiAssist: 'Administration:Permission:UseAiAssist',\n MaintainDashboards: 'Administration:Permission:MaintainDashboards',\n ViewJobs: 'Administration:Permission:ViewJobs',\n ManageJobActions: 'Administration:Permission:ManageJobActions',\n ViewObservability: 'Administration:Permission:ViewObservability',\n MaintainObservability: 'Administration:Permission:MaintainObservability',\n} as const;\n\n/**\n * @deprecated Prefer {@link AXPAdministrationPermissionKeys}.\n * Legacy nested shape kept so existing imports compile during migration.\n */\nexport const AXMRuleEnginePermissionKeys = {\n RuleSet: {\n View: AXPAdministrationPermissionKeys.ViewRules,\n Manage: AXPAdministrationPermissionKeys.MaintainRules,\n Publish: AXPAdministrationPermissionKeys.ManageRuleActions,\n },\n Evaluate: {\n Run: AXPAdministrationPermissionKeys.ManageRuleActions,\n Simulate: AXPAdministrationPermissionKeys.ManageRuleActions,\n },\n} as const;\n","const config = {\n i18n: 'rule-engine-management',\n module: 'RuleEngineManagement',\n};\n\nexport const RootConfig = {\n config,\n module: {\n route: 'rule-engine-management',\n name: config.module,\n title: '@rule-engine-management:module.title',\n icon: 'fa-light fa-scale-balanced',\n },\n entities: {\n ruleSet: {\n name: 'RuleSet',\n fullName: `${config.module}.RuleSet`,\n title: '@rule-engine-management:rule-sets.entities.rule-set.title',\n titlePlural: '@rule-engine-management:rule-sets.entities.rule-set.plural',\n icon: 'fa-light fa-layer-group',\n },\n ruleDefinition: {\n name: 'RuleDefinition',\n fullName: `${config.module}.RuleDefinition`,\n title: '@rule-engine-management:rules.entities.rule-definition.title',\n titlePlural: '@rule-engine-management:rules.entities.rule-definition.plural',\n icon: 'fa-light fa-list-check',\n },\n decisionTable: {\n name: 'DecisionTable',\n fullName: `${config.module}.DecisionTable`,\n title: '@rule-engine-management:tables.entities.decision-table.title',\n titlePlural: '@rule-engine-management:tables.entities.decision-table.plural',\n icon: 'fa-light fa-table',\n },\n ruleSetVersion: {\n name: 'RuleSetVersion',\n fullName: `${config.module}.RuleSetVersion`,\n title: '@rule-engine-management:versions.entities.rule-set-version.title',\n titlePlural: '@rule-engine-management:versions.entities.rule-set-version.plural',\n icon: 'fa-light fa-code-branch',\n },\n ruleEvaluationRun: {\n name: 'RuleEvaluationRun',\n fullName: `${config.module}.RuleEvaluationRun`,\n title: '@rule-engine-management:runs.entities.rule-evaluation-run.title',\n titlePlural: '@rule-engine-management:runs.entities.rule-evaluation-run.plural',\n icon: 'fa-light fa-play',\n },\n },\n} as const;\n","/** Registry key for RuleSet Simulate custom entity page (tab). */\nexport const RULE_SET_SIMULATE_PAGE_COMPONENT_KEY = 'rule-set-simulate-page';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAO,MAAM,+BAA+B,GAAG;AAC7C,IAAA,IAAI,EAAE,6BAA6B;AACnC,IAAA,QAAQ,EAAE,kCAAkC;AAC5C,IAAA,KAAK,EAAE,8BAA8B;AACrC,IAAA,MAAM,EAAE,+BAA+B;AACvC,IAAA,QAAQ,EAAE,iCAAiC;AAC3C,IAAA,IAAI,EAAE,6BAA6B;;;ACNrC;;;AAGG;AACI,MAAM,+BAA+B,GAAG;AAC7C,IAAA,MAAM,EAAE,kCAAkC;AAC1C,IAAA,qBAAqB,EAAE,iDAAiD;AACxE,IAAA,cAAc,EAAE,0CAA0C;AAC1D,IAAA,gBAAgB,EAAE,4CAA4C;AAC9D,IAAA,gBAAgB,EAAE,4CAA4C;AAC9D,IAAA,mBAAmB,EAAE,+CAA+C;AACpE,IAAA,iBAAiB,EAAE,6CAA6C;AAChE,IAAA,qBAAqB,EAAE,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,QAAA,cAAc,EAAE;AACd,YAAA,IAAI,EAAE,gBAAgB;AACtB,YAAA,QAAQ,EAAE,CAAA,EAAG,MAAM,CAAC,MAAM,CAAA,eAAA,CAAiB;AAC3C,YAAA,KAAK,EAAE,8DAA8D;AACrE,YAAA,WAAW,EAAE,+DAA+D;AAC5E,YAAA,IAAI,EAAE,wBAAwB;AAC/B,SAAA;AACD,QAAA,aAAa,EAAE;AACb,YAAA,IAAI,EAAE,eAAe;AACrB,YAAA,QAAQ,EAAE,CAAA,EAAG,MAAM,CAAC,MAAM,CAAA,cAAA,CAAgB;AAC1C,YAAA,KAAK,EAAE,8DAA8D;AACrE,YAAA,WAAW,EAAE,+DAA+D;AAC5E,YAAA,IAAI,EAAE,mBAAmB;AAC1B,SAAA;AACD,QAAA,cAAc,EAAE;AACd,YAAA,IAAI,EAAE,gBAAgB;AACtB,YAAA,QAAQ,EAAE,CAAA,EAAG,MAAM,CAAC,MAAM,CAAA,eAAA,CAAiB;AAC3C,YAAA,KAAK,EAAE,kEAAkE;AACzE,YAAA,WAAW,EAAE,mEAAmE;AAChF,YAAA,IAAI,EAAE,yBAAyB;AAChC,SAAA;AACD,QAAA,iBAAiB,EAAE;AACjB,YAAA,IAAI,EAAE,mBAAmB;AACzB,YAAA,QAAQ,EAAE,CAAA,EAAG,MAAM,CAAC,MAAM,CAAA,kBAAA,CAAoB;AAC9C,YAAA,KAAK,EAAE,iEAAiE;AACxE,YAAA,WAAW,EAAE,kEAAkE;AAC/E,YAAA,IAAI,EAAE,kBAAkB;AACzB,SAAA;AACF,KAAA;;;ACjDH;AACO,MAAM,oCAAoC,GAAG;;ACDpD;;AAEG;;;;"}
@@ -0,0 +1,328 @@
1
+ import { AXPSessionService, AXP_PERMISSION_DEFINITION_PROVIDER } from '@acorex-platform/framework-client/auth';
2
+ import { AXP_MENU_PROVIDER } from '@acorex-platform/framework-client/common';
3
+ import { AXP_MODULE_MANIFEST_PROVIDER, provideLazyProvider } from '@acorex-platform/framework-client/core';
4
+ import { AXP_PAGE_COMPONENT_PROVIDER } from '@acorex-platform/framework-client/layout/components';
5
+ import { AXCRuleEngineManagementApiModule, AXCRuleEngineManagementApiService } from '@acorex-platform/module-gateway/rule-engine-management';
6
+ import * as i0 from '@angular/core';
7
+ import { inject, Injectable, NgModule, input, signal, computed, effect, ChangeDetectionStrategy, Component } from '@angular/core';
8
+ import { RootConfig, AXPAdministrationPermissionKeys, AXPRuleEngineManagementMenuKeys, RULE_SET_SIMULATE_PAGE_COMPONENT_KEY } from '@acorex-platform/module-rule-engine-management-client/contracts';
9
+ import { AXPCommonMenuKeys, AXPCommonPermissionGroupKeys } from '@acorex-platform/module-common-client/contracts';
10
+ import { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';
11
+ import { firstValueFrom } from 'rxjs';
12
+ import { AXPPageLayoutBaseComponent, AXPPageLayoutBase } from '@acorex-platform/framework-client/layout/views';
13
+ import * as i2 from '@acorex/components/button';
14
+ import { AXButtonModule } from '@acorex/components/button';
15
+ import * as i3 from '@acorex/components/decorators';
16
+ import { AXDecoratorModule } from '@acorex/components/decorators';
17
+ import * as i4 from '@acorex/components/form';
18
+ import { AXFormModule } from '@acorex/components/form';
19
+ import * as i5 from '@acorex/components/label';
20
+ import { AXLabelModule } from '@acorex/components/label';
21
+ import * as i6 from '@acorex/components/text-area';
22
+ import { AXTextAreaModule } from '@acorex/components/text-area';
23
+ import * as i8 from '@acorex/core/translation';
24
+ import { AXTranslationModule } from '@acorex/core/translation';
25
+ import * as i7 from '@angular/common';
26
+ import { CommonModule, AsyncPipe } from '@angular/common';
27
+ import * as i1 from '@angular/forms';
28
+ import { FormsModule } from '@angular/forms';
29
+
30
+ const RuleEngineManagementManifest = {
31
+ name: RootConfig.module.name,
32
+ version: '1.0.0',
33
+ title: RootConfig.module.title,
34
+ icon: RootConfig.module.icon,
35
+ i18n: RootConfig.config.i18n,
36
+ type: 'platform',
37
+ domain: 'platform',
38
+ };
39
+
40
+ class AXMRuleEngineManagementMenuProvider {
41
+ constructor() {
42
+ this.entityService = inject(AXPEntityService);
43
+ this.sessionService = inject(AXPSessionService);
44
+ }
45
+ async provide(context) {
46
+ const isAuthorized = await firstValueFrom(this.sessionService.isAuthorized$);
47
+ if (!isAuthorized) {
48
+ return;
49
+ }
50
+ const module = RootConfig.module;
51
+ const viewRulesPolicy = {
52
+ features: [module.name],
53
+ permissions: [AXPAdministrationPermissionKeys.ViewRules],
54
+ };
55
+ context.find(AXPCommonMenuKeys.Administration).addItems([
56
+ {
57
+ name: AXPRuleEngineManagementMenuKeys.Root,
58
+ priority: 15,
59
+ text: '@rule-engine-management:module.menus.root.title',
60
+ icon: module.icon,
61
+ type: 'menu',
62
+ policy: viewRulesPolicy,
63
+ children: [],
64
+ },
65
+ ]);
66
+ context.find(AXPRuleEngineManagementMenuKeys.Root).addItems([
67
+ {
68
+ name: AXPRuleEngineManagementMenuKeys.RuleSets,
69
+ text: '@rule-engine-management:rule-sets.menus.rule-sets.title',
70
+ path: this.entityService.createPath(module.name, RootConfig.entities.ruleSet.name),
71
+ priority: 1,
72
+ icon: RootConfig.entities.ruleSet.icon,
73
+ policy: viewRulesPolicy,
74
+ },
75
+ {
76
+ name: AXPRuleEngineManagementMenuKeys.Rules,
77
+ text: '@rule-engine-management:rules.menus.rules.title',
78
+ path: this.entityService.createPath(module.name, RootConfig.entities.ruleDefinition.name),
79
+ priority: 2,
80
+ icon: RootConfig.entities.ruleDefinition.icon,
81
+ policy: viewRulesPolicy,
82
+ },
83
+ {
84
+ name: AXPRuleEngineManagementMenuKeys.Tables,
85
+ text: '@rule-engine-management:tables.menus.tables.title',
86
+ path: this.entityService.createPath(module.name, RootConfig.entities.decisionTable.name),
87
+ priority: 3,
88
+ icon: RootConfig.entities.decisionTable.icon,
89
+ policy: viewRulesPolicy,
90
+ },
91
+ {
92
+ name: AXPRuleEngineManagementMenuKeys.Versions,
93
+ text: '@rule-engine-management:versions.menus.versions.title',
94
+ path: this.entityService.createPath(module.name, RootConfig.entities.ruleSetVersion.name),
95
+ priority: 4,
96
+ icon: RootConfig.entities.ruleSetVersion.icon,
97
+ policy: viewRulesPolicy,
98
+ },
99
+ {
100
+ name: AXPRuleEngineManagementMenuKeys.Runs,
101
+ text: '@rule-engine-management:runs.menus.runs.title',
102
+ path: this.entityService.createPath(module.name, RootConfig.entities.ruleEvaluationRun.name),
103
+ priority: 5,
104
+ icon: RootConfig.entities.ruleEvaluationRun.icon,
105
+ policy: viewRulesPolicy,
106
+ },
107
+ ]);
108
+ }
109
+ }
110
+
111
+ //#endregion
112
+ //#region ---- Permission Definition Provider ----
113
+ /**
114
+ * Registers Rules section capabilities under Administration.
115
+ */
116
+ class AXMRuleEngineManagementPermissionProvider {
117
+ async define(context) {
118
+ const keys = AXPAdministrationPermissionKeys;
119
+ const groups = AXPCommonPermissionGroupKeys;
120
+ const P = '@common:administration.permissions';
121
+ const G = '@common:permission-groups';
122
+ context.addGroup(groups.Administration.Root, `${G}.administration.title`, `${G}.administration.description`, { order: 120 });
123
+ context
124
+ .addGroup(groups.Administration.Rules, `${G}.administration-rules.title`, `${G}.administration-rules.description`, { parent: groups.Administration.Root, order: 40 })
125
+ .addPermission(keys.ViewRules, `${P}.view-rules.title`, `${P}.view-rules.description`)
126
+ .endPermission()
127
+ .addPermission(keys.MaintainRules, `${P}.maintain-rules.title`, `${P}.maintain-rules.description`)
128
+ .endPermission()
129
+ .addPermission(keys.ManageRuleActions, `${P}.manage-rule-actions.title`, `${P}.manage-rule-actions.description`)
130
+ .endPermission()
131
+ .endGroup();
132
+ }
133
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMRuleEngineManagementPermissionProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
134
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMRuleEngineManagementPermissionProvider }); }
135
+ }
136
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMRuleEngineManagementPermissionProvider, decorators: [{
137
+ type: Injectable
138
+ }] });
139
+
140
+ class AXMRuleEngineManagementModule {
141
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMRuleEngineManagementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
142
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: AXMRuleEngineManagementModule, imports: [AXCRuleEngineManagementApiModule] }); }
143
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMRuleEngineManagementModule, providers: [
144
+ {
145
+ provide: AXP_MENU_PROVIDER,
146
+ useClass: AXMRuleEngineManagementMenuProvider,
147
+ multi: true,
148
+ },
149
+ {
150
+ provide: AXP_PERMISSION_DEFINITION_PROVIDER,
151
+ useClass: AXMRuleEngineManagementPermissionProvider,
152
+ multi: true,
153
+ },
154
+ {
155
+ provide: AXP_MODULE_MANIFEST_PROVIDER,
156
+ useValue: RuleEngineManagementManifest,
157
+ multi: true,
158
+ },
159
+ provideLazyProvider(AXP_PAGE_COMPONENT_PROVIDER, () => Promise.resolve().then(function () { return index; }).then((m) => m.AXMRuleSetSimulatePageComponentProvider)),
160
+ ], imports: [AXCRuleEngineManagementApiModule] }); }
161
+ }
162
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMRuleEngineManagementModule, decorators: [{
163
+ type: NgModule,
164
+ args: [{
165
+ imports: [AXCRuleEngineManagementApiModule],
166
+ providers: [
167
+ {
168
+ provide: AXP_MENU_PROVIDER,
169
+ useClass: AXMRuleEngineManagementMenuProvider,
170
+ multi: true,
171
+ },
172
+ {
173
+ provide: AXP_PERMISSION_DEFINITION_PROVIDER,
174
+ useClass: AXMRuleEngineManagementPermissionProvider,
175
+ multi: true,
176
+ },
177
+ {
178
+ provide: AXP_MODULE_MANIFEST_PROVIDER,
179
+ useValue: RuleEngineManagementManifest,
180
+ multi: true,
181
+ },
182
+ provideLazyProvider(AXP_PAGE_COMPONENT_PROVIDER, () => Promise.resolve().then(function () { return index; }).then((m) => m.AXMRuleSetSimulatePageComponentProvider)),
183
+ ],
184
+ }]
185
+ }] });
186
+
187
+ //#region ---- RuleSet Simulate page provider ----
188
+ class AXMRuleSetSimulatePageComponentProvider {
189
+ async components() {
190
+ return [
191
+ {
192
+ key: RULE_SET_SIMULATE_PAGE_COMPONENT_KEY,
193
+ loader: () => Promise.resolve().then(function () { return ruleSetSimulatePage_component; }).then((m) => m.AXMRuleSetSimulatePageComponent),
194
+ },
195
+ ];
196
+ }
197
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMRuleSetSimulatePageComponentProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
198
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMRuleSetSimulatePageComponentProvider }); }
199
+ }
200
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMRuleSetSimulatePageComponentProvider, decorators: [{
201
+ type: Injectable
202
+ }] });
203
+
204
+ //#region ---- RuleSet Simulate entity page (tab) ----
205
+ /**
206
+ * Custom RuleSet detail tab — same hosting pattern as workflow Activities.
207
+ * Shell/chrome comes from entity detail; content uses Acorex controls only.
208
+ */
209
+ class AXMRuleSetSimulatePageComponent extends AXPPageLayoutBaseComponent {
210
+ constructor() {
211
+ super(...arguments);
212
+ this.api = inject(AXCRuleEngineManagementApiService);
213
+ /** Entity record from detail host. */
214
+ this.rootContext = input(/* @ts-ignore */
215
+ ...(ngDevMode ? [undefined, { debugName: "rootContext" }] : /* istanbul ignore next */ []));
216
+ this.pageConfig = input(/* @ts-ignore */
217
+ ...(ngDevMode ? [undefined, { debugName: "pageConfig" }] : /* istanbul ignore next */ []));
218
+ this.factsJson = signal(JSON.stringify({ estimateHours: 10, spentHours: 13.1 }, null, 2), /* @ts-ignore */
219
+ ...(ngDevMode ? [{ debugName: "factsJson" }] : /* istanbul ignore next */ []));
220
+ this.resultJson = signal('', /* @ts-ignore */
221
+ ...(ngDevMode ? [{ debugName: "resultJson" }] : /* istanbul ignore next */ []));
222
+ this.busy = signal(false, /* @ts-ignore */
223
+ ...(ngDevMode ? [{ debugName: "busy" }] : /* istanbul ignore next */ []));
224
+ this.error = signal('', /* @ts-ignore */
225
+ ...(ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []));
226
+ this.ruleSetKey = computed(() => {
227
+ const ctx = this.rootContext() ?? {};
228
+ const name = typeof ctx['name'] === 'string' ? ctx['name'].trim() : '';
229
+ if (name) {
230
+ return name;
231
+ }
232
+ const id = typeof ctx['id'] === 'string' ? ctx['id'].trim() : '';
233
+ return id;
234
+ }, /* @ts-ignore */
235
+ ...(ngDevMode ? [{ debugName: "ruleSetKey" }] : /* istanbul ignore next */ []));
236
+ this.ruleSetMeta = computed(() => {
237
+ const ctx = this.rootContext() ?? {};
238
+ const version = typeof ctx['version'] === 'string' ? ctx['version'] : '';
239
+ const domain = typeof ctx['domain'] === 'string' ? ctx['domain'] : '';
240
+ return { version, domain };
241
+ }, /* @ts-ignore */
242
+ ...(ngDevMode ? [{ debugName: "ruleSetMeta" }] : /* istanbul ignore next */ []));
243
+ this.#lastSeededKey = null;
244
+ this.#seedFactsByDomain = effect(() => {
245
+ const key = this.ruleSetKey();
246
+ const domain = this.ruleSetMeta().domain;
247
+ if (!key || key === this.#lastSeededKey || domain !== 'code') {
248
+ return;
249
+ }
250
+ this.#lastSeededKey = key;
251
+ this.factsJson.set(JSON.stringify({
252
+ filePath: 'libs/modules/app/contracts/src/entities/sample/sample.entity.ts',
253
+ sourceText: 'export async function sampleEntityFactory() { return {}; }',
254
+ }, null, 2));
255
+ }, /* @ts-ignore */
256
+ ...(ngDevMode ? [{ debugName: "#seedFactsByDomain" }] : /* istanbul ignore next */ []));
257
+ }
258
+ #lastSeededKey;
259
+ #seedFactsByDomain;
260
+ onFactsChange(value) {
261
+ this.factsJson.set(value ?? '');
262
+ }
263
+ async runSimulate() {
264
+ const ruleSetId = this.ruleSetKey();
265
+ if (!ruleSetId) {
266
+ this.error.set('Rule set name is required');
267
+ return;
268
+ }
269
+ this.busy.set(true);
270
+ this.error.set('');
271
+ try {
272
+ const facts = JSON.parse(this.factsJson());
273
+ const result = await this.api.simulate(ruleSetId, facts);
274
+ this.resultJson.set(JSON.stringify(result, null, 2));
275
+ }
276
+ catch (e) {
277
+ this.error.set(e instanceof Error ? e.message : String(e));
278
+ this.resultJson.set('');
279
+ }
280
+ finally {
281
+ this.busy.set(false);
282
+ }
283
+ }
284
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMRuleSetSimulatePageComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
285
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXMRuleSetSimulatePageComponent, isStandalone: true, selector: "axm-rule-set-simulate-page", inputs: { rootContext: { classPropertyName: "rootContext", publicName: "rootContext", isSignal: true, isRequired: false, transformFunction: null }, pageConfig: { classPropertyName: "pageConfig", publicName: "pageConfig", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
286
+ {
287
+ provide: AXPPageLayoutBase,
288
+ useExisting: AXMRuleSetSimulatePageComponent,
289
+ },
290
+ ], usesInheritance: true, ngImport: i0, template: "<div class=\"axm-rule-set-simulate flex flex-col gap-4 p-4\">\n <div class=\"flex flex-col gap-1\">\n <ax-label>\n {{ '@rule-engine-management:simulate.fields.rule-set' | translate | async }}\n </ax-label>\n <div class=\"axm-rule-set-simulate__meta text-sm\">\n <span class=\"font-medium\">{{ ruleSetKey() || '\u2014' }}</span>\n @if (ruleSetMeta().version) {\n <span class=\"text-muted\">@{{ ruleSetMeta().version }}</span>\n }\n @if (ruleSetMeta().domain) {\n <span class=\"text-muted\">({{ ruleSetMeta().domain }})</span>\n }\n </div>\n </div>\n\n <ax-form-field>\n <ax-label>\n {{ '@rule-engine-management:simulate.fields.facts-json' | translate | async }}\n </ax-label>\n <ax-text-area\n class=\"axm-rule-set-simulate__facts\"\n [ngModel]=\"factsJson()\"\n (ngModelChange)=\"onFactsChange($event)\"\n [rows]=\"12\"\n [look]=\"'outline'\"\n ></ax-text-area>\n </ax-form-field>\n\n <div class=\"flex items-center gap-2\">\n <ax-button\n [color]=\"'primary'\"\n [disabled]=\"busy() || !ruleSetKey()\"\n [text]=\"('@rule-engine-management:simulate.actions.run' | translate | async) || 'Run Simulate'\"\n (onClick)=\"runSimulate()\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-play\"></ax-icon>\n </ax-prefix>\n </ax-button>\n </div>\n\n @if (error()) {\n <div class=\"axm-rule-set-simulate__error p-3 rounded\">\n <ax-label class=\"text-danger\">{{ error() }}</ax-label>\n </div>\n }\n\n @if (resultJson()) {\n <div class=\"flex flex-col gap-1\">\n <ax-label>\n {{ '@rule-engine-management:simulate.fields.result' | translate | async }}\n </ax-label>\n <pre class=\"axm-rule-set-simulate__result p-3 rounded\">{{ resultJson() }}</pre>\n </div>\n }\n</div>\n", styles: ["@reference \"@acorex/styles/themes/default.css\";.axm-rule-set-simulate{@apply max-w-4xl;}.axm-rule-set-simulate .axm-rule-set-simulate__meta{@apply flex flex-wrap items-baseline gap-2;}.axm-rule-set-simulate .axm-rule-set-simulate__facts{@apply w-full font-mono;}.axm-rule-set-simulate .axm-rule-set-simulate__result{@apply m-0 overflow-auto whitespace-pre-wrap font-mono text-sm;background:var(--ax-color-surface-2, rgba(0, 0, 0, .04))}.axm-rule-set-simulate .axm-rule-set-simulate__error{background:var(--ax-color-danger-lightest, rgba(176, 0, 32, .08))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXFormModule }, { kind: "component", type: i4.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i5.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXTextAreaModule }, { kind: "component", type: i6.AXTextAreaComponent, selector: "ax-text-area", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "placeholder", "maxLength", "look", "rows", "allowResize", "showCounter", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i7.AsyncPipe, name: "async" }, { kind: "pipe", type: i8.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
291
+ }
292
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMRuleSetSimulatePageComponent, decorators: [{
293
+ type: Component,
294
+ args: [{ selector: 'axm-rule-set-simulate-page', standalone: true, imports: [
295
+ CommonModule,
296
+ AsyncPipe,
297
+ FormsModule,
298
+ AXButtonModule,
299
+ AXDecoratorModule,
300
+ AXFormModule,
301
+ AXLabelModule,
302
+ AXTextAreaModule,
303
+ AXTranslationModule,
304
+ ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
305
+ {
306
+ provide: AXPPageLayoutBase,
307
+ useExisting: AXMRuleSetSimulatePageComponent,
308
+ },
309
+ ], template: "<div class=\"axm-rule-set-simulate flex flex-col gap-4 p-4\">\n <div class=\"flex flex-col gap-1\">\n <ax-label>\n {{ '@rule-engine-management:simulate.fields.rule-set' | translate | async }}\n </ax-label>\n <div class=\"axm-rule-set-simulate__meta text-sm\">\n <span class=\"font-medium\">{{ ruleSetKey() || '\u2014' }}</span>\n @if (ruleSetMeta().version) {\n <span class=\"text-muted\">@{{ ruleSetMeta().version }}</span>\n }\n @if (ruleSetMeta().domain) {\n <span class=\"text-muted\">({{ ruleSetMeta().domain }})</span>\n }\n </div>\n </div>\n\n <ax-form-field>\n <ax-label>\n {{ '@rule-engine-management:simulate.fields.facts-json' | translate | async }}\n </ax-label>\n <ax-text-area\n class=\"axm-rule-set-simulate__facts\"\n [ngModel]=\"factsJson()\"\n (ngModelChange)=\"onFactsChange($event)\"\n [rows]=\"12\"\n [look]=\"'outline'\"\n ></ax-text-area>\n </ax-form-field>\n\n <div class=\"flex items-center gap-2\">\n <ax-button\n [color]=\"'primary'\"\n [disabled]=\"busy() || !ruleSetKey()\"\n [text]=\"('@rule-engine-management:simulate.actions.run' | translate | async) || 'Run Simulate'\"\n (onClick)=\"runSimulate()\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-play\"></ax-icon>\n </ax-prefix>\n </ax-button>\n </div>\n\n @if (error()) {\n <div class=\"axm-rule-set-simulate__error p-3 rounded\">\n <ax-label class=\"text-danger\">{{ error() }}</ax-label>\n </div>\n }\n\n @if (resultJson()) {\n <div class=\"flex flex-col gap-1\">\n <ax-label>\n {{ '@rule-engine-management:simulate.fields.result' | translate | async }}\n </ax-label>\n <pre class=\"axm-rule-set-simulate__result p-3 rounded\">{{ resultJson() }}</pre>\n </div>\n }\n</div>\n", styles: ["@reference \"@acorex/styles/themes/default.css\";.axm-rule-set-simulate{@apply max-w-4xl;}.axm-rule-set-simulate .axm-rule-set-simulate__meta{@apply flex flex-wrap items-baseline gap-2;}.axm-rule-set-simulate .axm-rule-set-simulate__facts{@apply w-full font-mono;}.axm-rule-set-simulate .axm-rule-set-simulate__result{@apply m-0 overflow-auto whitespace-pre-wrap font-mono text-sm;background:var(--ax-color-surface-2, rgba(0, 0, 0, .04))}.axm-rule-set-simulate .axm-rule-set-simulate__error{background:var(--ax-color-danger-lightest, rgba(176, 0, 32, .08))}\n"] }]
310
+ }], propDecorators: { rootContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "rootContext", required: false }] }], pageConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageConfig", required: false }] }] } });
311
+
312
+ var ruleSetSimulatePage_component = /*#__PURE__*/Object.freeze({
313
+ __proto__: null,
314
+ AXMRuleSetSimulatePageComponent: AXMRuleSetSimulatePageComponent
315
+ });
316
+
317
+ var index = /*#__PURE__*/Object.freeze({
318
+ __proto__: null,
319
+ AXMRuleSetSimulatePageComponent: AXMRuleSetSimulatePageComponent,
320
+ AXMRuleSetSimulatePageComponentProvider: AXMRuleSetSimulatePageComponentProvider
321
+ });
322
+
323
+ /**
324
+ * Generated bundle index. Do not edit.
325
+ */
326
+
327
+ export { AXMRuleEngineManagementMenuProvider, AXMRuleEngineManagementModule, AXMRuleEngineManagementPermissionProvider, AXMRuleSetSimulatePageComponent, AXMRuleSetSimulatePageComponentProvider, RuleEngineManagementManifest };
328
+ //# sourceMappingURL=acorex-platform-module-rule-engine-management-client.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-rule-engine-management-client.mjs","sources":["../../../../libs/modules/rule-engine-management/client/src/lib/manifest.ts","../../../../libs/modules/rule-engine-management/client/src/lib/menu.provider.ts","../../../../libs/modules/rule-engine-management/client/src/lib/permission-definition.provider.ts","../../../../libs/modules/rule-engine-management/client/src/lib/rule-engine-management.module.ts","../../../../libs/modules/rule-engine-management/client/src/lib/features/simulate/rule-set-simulate-page-component.provider.ts","../../../../libs/modules/rule-engine-management/client/src/lib/features/simulate/rule-set-simulate-page.component.ts","../../../../libs/modules/rule-engine-management/client/src/lib/features/simulate/rule-set-simulate-page.component.html","../../../../libs/modules/rule-engine-management/client/src/acorex-platform-module-rule-engine-management-client.ts"],"sourcesContent":["import { AXPModuleManifest } from '@acorex-platform/framework-client/core';\nimport { RootConfig } from '@acorex-platform/module-rule-engine-management-client/contracts';\n\nexport const RuleEngineManagementManifest: AXPModuleManifest = {\n name: RootConfig.module.name,\n version: '1.0.0',\n title: RootConfig.module.title,\n icon: RootConfig.module.icon,\n i18n: RootConfig.config.i18n,\n type: 'platform',\n domain: 'platform',\n};\n","import { AXPCommonMenuKeys } from '@acorex-platform/module-common-client/contracts';\nimport { AXPSessionService } from '@acorex-platform/framework-client/auth';\nimport { AXPMenuProvider, AXPMenuProviderContext } from '@acorex-platform/framework-client/common';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { inject } from '@angular/core';\nimport { firstValueFrom } from 'rxjs';\nimport {\n AXPAdministrationPermissionKeys,\n AXPRuleEngineManagementMenuKeys,\n RootConfig,\n} from '@acorex-platform/module-rule-engine-management-client/contracts';\n\nexport class AXMRuleEngineManagementMenuProvider implements AXPMenuProvider {\n private entityService = inject(AXPEntityService);\n private sessionService = inject(AXPSessionService);\n\n async provide(context: AXPMenuProviderContext): Promise<void> {\n const isAuthorized = await firstValueFrom(this.sessionService.isAuthorized$);\n if (!isAuthorized) {\n return;\n }\n\n const module = RootConfig.module;\n const viewRulesPolicy = {\n features: [module.name],\n permissions: [AXPAdministrationPermissionKeys.ViewRules],\n };\n\n context.find(AXPCommonMenuKeys.Administration).addItems([\n {\n name: AXPRuleEngineManagementMenuKeys.Root,\n priority: 15,\n text: '@rule-engine-management:module.menus.root.title',\n icon: module.icon,\n type: 'menu',\n policy: viewRulesPolicy,\n children: [],\n },\n ]);\n\n context.find(AXPRuleEngineManagementMenuKeys.Root).addItems([\n {\n name: AXPRuleEngineManagementMenuKeys.RuleSets,\n text: '@rule-engine-management:rule-sets.menus.rule-sets.title',\n path: this.entityService.createPath(module.name, RootConfig.entities.ruleSet.name),\n priority: 1,\n icon: RootConfig.entities.ruleSet.icon,\n policy: viewRulesPolicy,\n },\n {\n name: AXPRuleEngineManagementMenuKeys.Rules,\n text: '@rule-engine-management:rules.menus.rules.title',\n path: this.entityService.createPath(module.name, RootConfig.entities.ruleDefinition.name),\n priority: 2,\n icon: RootConfig.entities.ruleDefinition.icon,\n policy: viewRulesPolicy,\n },\n {\n name: AXPRuleEngineManagementMenuKeys.Tables,\n text: '@rule-engine-management:tables.menus.tables.title',\n path: this.entityService.createPath(module.name, RootConfig.entities.decisionTable.name),\n priority: 3,\n icon: RootConfig.entities.decisionTable.icon,\n policy: viewRulesPolicy,\n },\n {\n name: AXPRuleEngineManagementMenuKeys.Versions,\n text: '@rule-engine-management:versions.menus.versions.title',\n path: this.entityService.createPath(module.name, RootConfig.entities.ruleSetVersion.name),\n priority: 4,\n icon: RootConfig.entities.ruleSetVersion.icon,\n policy: viewRulesPolicy,\n },\n {\n name: AXPRuleEngineManagementMenuKeys.Runs,\n text: '@rule-engine-management:runs.menus.runs.title',\n path: this.entityService.createPath(module.name, RootConfig.entities.ruleEvaluationRun.name),\n priority: 5,\n icon: RootConfig.entities.ruleEvaluationRun.icon,\n policy: viewRulesPolicy,\n },\n ]);\n }\n}\n","//#region ---- Imports ----\n\nimport {\n AXPPermissionDefinitionProvider,\n AXPPermissionDefinitionProviderContext,\n} from '@acorex-platform/framework-client/auth';\nimport { AXPCommonPermissionGroupKeys } from '@acorex-platform/module-common-client/contracts';\nimport { AXPAdministrationPermissionKeys } from '@acorex-platform/module-rule-engine-management-client/contracts';\nimport { Injectable } from '@angular/core';\n\n//#endregion\n\n//#region ---- Permission Definition Provider ----\n\n/**\n * Registers Rules section capabilities under Administration.\n */\n@Injectable()\nexport class AXMRuleEngineManagementPermissionProvider implements AXPPermissionDefinitionProvider {\n async define(context: AXPPermissionDefinitionProviderContext): Promise<void> {\n const keys = AXPAdministrationPermissionKeys;\n const groups = AXPCommonPermissionGroupKeys;\n const P = '@common:administration.permissions';\n const G = '@common:permission-groups';\n\n context.addGroup(groups.Administration.Root, `${G}.administration.title`, `${G}.administration.description`, { order: 120 });\n\n context\n .addGroup(\n groups.Administration.Rules,\n `${G}.administration-rules.title`,\n `${G}.administration-rules.description`,\n { parent: groups.Administration.Root, order: 40 },\n )\n .addPermission(keys.ViewRules, `${P}.view-rules.title`, `${P}.view-rules.description`)\n .endPermission()\n .addPermission(keys.MaintainRules, `${P}.maintain-rules.title`, `${P}.maintain-rules.description`)\n .endPermission()\n .addPermission(keys.ManageRuleActions, `${P}.manage-rule-actions.title`, `${P}.manage-rule-actions.description`)\n .endPermission()\n .endGroup();\n }\n}\n\n//#endregion\n","import { AXP_PERMISSION_DEFINITION_PROVIDER } from '@acorex-platform/framework-client/auth';\nimport { AXP_MENU_PROVIDER } from '@acorex-platform/framework-client/common';\nimport { AXP_MODULE_MANIFEST_PROVIDER, provideLazyProvider } from '@acorex-platform/framework-client/core';\nimport { AXP_PAGE_COMPONENT_PROVIDER } from '@acorex-platform/framework-client/layout/components';\nimport { AXCRuleEngineManagementApiModule } from '@acorex-platform/module-gateway/rule-engine-management';\nimport { NgModule } from '@angular/core';\n\nimport { RuleEngineManagementManifest } from './manifest';\nimport { AXMRuleEngineManagementMenuProvider } from './menu.provider';\nimport { AXMRuleEngineManagementPermissionProvider } from './permission-definition.provider';\n\n@NgModule({\n imports: [AXCRuleEngineManagementApiModule],\n providers: [\n \n {\n provide: AXP_MENU_PROVIDER,\n useClass: AXMRuleEngineManagementMenuProvider,\n multi: true,\n },\n {\n provide: AXP_PERMISSION_DEFINITION_PROVIDER,\n useClass: AXMRuleEngineManagementPermissionProvider,\n multi: true,\n },\n {\n provide: AXP_MODULE_MANIFEST_PROVIDER,\n useValue: RuleEngineManagementManifest,\n multi: true,\n },\n provideLazyProvider(AXP_PAGE_COMPONENT_PROVIDER, () =>\n import('./features/simulate').then((m) => m.AXMRuleSetSimulatePageComponentProvider),\n ),\n ],\n})\nexport class AXMRuleEngineManagementModule {}\n","import { AXPPageComponentDefinition, AXPPageComponentProvider } from '@acorex-platform/framework-client/layout/components';\nimport { RULE_SET_SIMULATE_PAGE_COMPONENT_KEY } from '@acorex-platform/module-rule-engine-management-client/contracts';\nimport { Injectable } from '@angular/core';\n\n//#region ---- RuleSet Simulate page provider ----\n\n@Injectable()\nexport class AXMRuleSetSimulatePageComponentProvider implements AXPPageComponentProvider {\n async components(): Promise<AXPPageComponentDefinition[]> {\n return [\n {\n key: RULE_SET_SIMULATE_PAGE_COMPONENT_KEY,\n loader: () =>\n import('./rule-set-simulate-page.component').then(\n (m) => m.AXMRuleSetSimulatePageComponent,\n ),\n },\n ];\n }\n}\n\n//#endregion\n","import { AXCRuleEngineManagementApiService } from '@acorex-platform/module-gateway/rule-engine-management';\nimport {\n AXPPageLayoutBase,\n AXPPageLayoutBaseComponent,\n} from '@acorex-platform/framework-client/layout/views';\nimport type { AXPRuleDecisionResult } from '@acorex-platform/framework-shared/rule-engine';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXFormModule } from '@acorex/components/form';\nimport { AXLabelModule } from '@acorex/components/label';\nimport { AXTextAreaModule } from '@acorex/components/text-area';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AsyncPipe, CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n inject,\n input,\n signal,\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\n\n//#region ---- RuleSet Simulate entity page (tab) ----\n\n/**\n * Custom RuleSet detail tab — same hosting pattern as workflow Activities.\n * Shell/chrome comes from entity detail; content uses Acorex controls only.\n */\n@Component({\n selector: 'axm-rule-set-simulate-page',\n standalone: true,\n imports: [\n CommonModule,\n AsyncPipe,\n FormsModule,\n AXButtonModule,\n AXDecoratorModule,\n AXFormModule,\n AXLabelModule,\n AXTextAreaModule,\n AXTranslationModule,\n ],\n templateUrl: './rule-set-simulate-page.component.html',\n styleUrl: './rule-set-simulate-page.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: AXPPageLayoutBase,\n useExisting: AXMRuleSetSimulatePageComponent,\n },\n ],\n})\nexport class AXMRuleSetSimulatePageComponent extends AXPPageLayoutBaseComponent {\n private readonly api = inject(AXCRuleEngineManagementApiService);\n\n /** Entity record from detail host. */\n rootContext = input<Record<string, unknown>>();\n pageConfig = input<Record<string, unknown>>();\n\n protected readonly factsJson = signal(\n JSON.stringify({ estimateHours: 10, spentHours: 13.1 }, null, 2),\n );\n protected readonly resultJson = signal('');\n protected readonly busy = signal(false);\n protected readonly error = signal('');\n\n protected readonly ruleSetKey = computed(() => {\n const ctx = this.rootContext() ?? {};\n const name = typeof ctx['name'] === 'string' ? ctx['name'].trim() : '';\n if (name) {\n return name;\n }\n const id = typeof ctx['id'] === 'string' ? ctx['id'].trim() : '';\n return id;\n });\n\n protected readonly ruleSetMeta = computed(() => {\n const ctx = this.rootContext() ?? {};\n const version = typeof ctx['version'] === 'string' ? ctx['version'] : '';\n const domain = typeof ctx['domain'] === 'string' ? ctx['domain'] : '';\n return { version, domain };\n });\n\n #lastSeededKey: string | null = null;\n #seedFactsByDomain = effect(() => {\n const key = this.ruleSetKey();\n const domain = this.ruleSetMeta().domain;\n if (!key || key === this.#lastSeededKey || domain !== 'code') {\n return;\n }\n this.#lastSeededKey = key;\n this.factsJson.set(\n JSON.stringify(\n {\n filePath: 'libs/modules/app/contracts/src/entities/sample/sample.entity.ts',\n sourceText: 'export async function sampleEntityFactory() { return {}; }',\n },\n null,\n 2,\n ),\n );\n });\n\n protected onFactsChange(value: string | null | undefined): void {\n this.factsJson.set(value ?? '');\n }\n\n protected async runSimulate(): Promise<void> {\n const ruleSetId = this.ruleSetKey();\n if (!ruleSetId) {\n this.error.set('Rule set name is required');\n return;\n }\n\n this.busy.set(true);\n this.error.set('');\n try {\n const facts = JSON.parse(this.factsJson()) as Record<string, unknown>;\n const result: AXPRuleDecisionResult = await this.api.simulate(ruleSetId, facts);\n this.resultJson.set(JSON.stringify(result, null, 2));\n } catch (e) {\n this.error.set(e instanceof Error ? e.message : String(e));\n this.resultJson.set('');\n } finally {\n this.busy.set(false);\n }\n }\n}\n\n//#endregion\n","<div class=\"axm-rule-set-simulate flex flex-col gap-4 p-4\">\n <div class=\"flex flex-col gap-1\">\n <ax-label>\n {{ '@rule-engine-management:simulate.fields.rule-set' | translate | async }}\n </ax-label>\n <div class=\"axm-rule-set-simulate__meta text-sm\">\n <span class=\"font-medium\">{{ ruleSetKey() || '—' }}</span>\n @if (ruleSetMeta().version) {\n <span class=\"text-muted\">@{{ ruleSetMeta().version }}</span>\n }\n @if (ruleSetMeta().domain) {\n <span class=\"text-muted\">({{ ruleSetMeta().domain }})</span>\n }\n </div>\n </div>\n\n <ax-form-field>\n <ax-label>\n {{ '@rule-engine-management:simulate.fields.facts-json' | translate | async }}\n </ax-label>\n <ax-text-area\n class=\"axm-rule-set-simulate__facts\"\n [ngModel]=\"factsJson()\"\n (ngModelChange)=\"onFactsChange($event)\"\n [rows]=\"12\"\n [look]=\"'outline'\"\n ></ax-text-area>\n </ax-form-field>\n\n <div class=\"flex items-center gap-2\">\n <ax-button\n [color]=\"'primary'\"\n [disabled]=\"busy() || !ruleSetKey()\"\n [text]=\"('@rule-engine-management:simulate.actions.run' | translate | async) || 'Run Simulate'\"\n (onClick)=\"runSimulate()\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-play\"></ax-icon>\n </ax-prefix>\n </ax-button>\n </div>\n\n @if (error()) {\n <div class=\"axm-rule-set-simulate__error p-3 rounded\">\n <ax-label class=\"text-danger\">{{ error() }}</ax-label>\n </div>\n }\n\n @if (resultJson()) {\n <div class=\"flex flex-col gap-1\">\n <ax-label>\n {{ '@rule-engine-management:simulate.fields.result' | translate | async }}\n </ax-label>\n <pre class=\"axm-rule-set-simulate__result p-3 rounded\">{{ resultJson() }}</pre>\n </div>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGO,MAAM,4BAA4B,GAAsB;AAC7D,IAAA,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAC5B,IAAA,OAAO,EAAE,OAAO;AAChB,IAAA,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,KAAK;AAC9B,IAAA,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAC5B,IAAA,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAC5B,IAAA,IAAI,EAAE,UAAU;AAChB,IAAA,MAAM,EAAE,UAAU;;;MCEP,mCAAmC,CAAA;AAAhD,IAAA,WAAA,GAAA;AACU,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACxC,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;IAqEpD;IAnEE,MAAM,OAAO,CAAC,OAA+B,EAAA;QAC3C,MAAM,YAAY,GAAG,MAAM,cAAc,CAAC,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC;QAC5E,IAAI,CAAC,YAAY,EAAE;YACjB;QACF;AAEA,QAAA,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM;AAChC,QAAA,MAAM,eAAe,GAAG;A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AA,gBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACb,gBAAgB,kaAChB,mBAAmB,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAYV,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAxB3C,SAAS;+BACE,4BAA4B,EAAA,UAAA,EAC1B,IAAI,EAAA,OAAA,EACP;wBACP,YAAY;wBACZ,SAAS;wBACT,WAAW;wBACX,cAAc;wBACd,iBAAiB;wBACjB,YAAY;wBACZ,aAAa;wBACb,gBAAgB;wBAChB,mBAAmB;qBACpB,EAAA,eAAA,EAGgB,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAA,+BAAiC;AAC7C,yBAAA;AACF,qBAAA,EAAA,QAAA,EAAA,i0DAAA,EAAA,MAAA,EAAA,CAAA,ijBAAA,CAAA,EAAA;;;;;;;;;;;;;;AEpDH;;AAEG;;;;"}
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "@acorex-platform/module-rule-engine-management-client",
3
+ "version": "0.0.21",
4
+ "sideEffects": false,
5
+ "peerDependencies": {
6
+ "@angular/common": "^21.0.0",
7
+ "@angular/core": "^21.0.0"
8
+ },
9
+ "dependencies": {
10
+ "tslib": "^2.3.0"
11
+ },
12
+ "module": "fesm2022/acorex-platform-module-rule-engine-management-client.mjs",
13
+ "typings": "types/acorex-platform-module-rule-engine-management-client.d.ts",
14
+ "exports": {
15
+ "./package.json": {
16
+ "default": "./package.json"
17
+ },
18
+ ".": {
19
+ "types": "./types/acorex-platform-module-rule-engine-management-client.d.ts",
20
+ "default": "./fesm2022/acorex-platform-module-rule-engine-management-client.mjs"
21
+ },
22
+ "./contracts": {
23
+ "types": "./types/acorex-platform-module-rule-engine-management-client-contracts.d.ts",
24
+ "default": "./fesm2022/acorex-platform-module-rule-engine-management-client-contracts.mjs"
25
+ }
26
+ },
27
+ "type": "module"
28
+ }
@@ -0,0 +1,103 @@
1
+ declare const AXPRuleEngineManagementMenuKeys: {
2
+ readonly Root: "rule-engine-management:menu";
3
+ readonly RuleSets: "rule-engine-management:rule-sets";
4
+ readonly Rules: "rule-engine-management:rules";
5
+ readonly Tables: "rule-engine-management:tables";
6
+ readonly Versions: "rule-engine-management:versions";
7
+ readonly Runs: "rule-engine-management:runs";
8
+ };
9
+
10
+ /**
11
+ * Administration capabilities used by this module.
12
+ * Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).
13
+ */
14
+ declare const AXPAdministrationPermissionKeys: {
15
+ readonly Access: "Administration:Permission:Access";
16
+ readonly MaintainUsersAndRoles: "Administration:Permission:MaintainUsersAndRoles";
17
+ readonly ManageSessions: "Administration:Permission:ManageSessions";
18
+ readonly MaintainPolicies: "Administration:Permission:MaintainPolicies";
19
+ readonly ViewIntegrations: "Administration:Permission:ViewIntegrations";
20
+ readonly MaintainConnections: "Administration:Permission:MaintainConnections";
21
+ readonly MaintainWorkflows: "Administration:Permission:MaintainWorkflows";
22
+ readonly ManageWorkflowActions: "Administration:Permission:ManageWorkflowActions";
23
+ readonly ViewRules: "Administration:Permission:ViewRules";
24
+ readonly MaintainRules: "Administration:Permission:MaintainRules";
25
+ readonly ManageRuleActions: "Administration:Permission:ManageRuleActions";
26
+ readonly MaintainAi: "Administration:Permission:MaintainAi";
27
+ readonly UseAiAssist: "Administration:Permission:UseAiAssist";
28
+ readonly MaintainDashboards: "Administration:Permission:MaintainDashboards";
29
+ readonly ViewJobs: "Administration:Permission:ViewJobs";
30
+ readonly ManageJobActions: "Administration:Permission:ManageJobActions";
31
+ readonly ViewObservability: "Administration:Permission:ViewObservability";
32
+ readonly MaintainObservability: "Administration:Permission:MaintainObservability";
33
+ };
34
+ /**
35
+ * @deprecated Prefer {@link AXPAdministrationPermissionKeys}.
36
+ * Legacy nested shape kept so existing imports compile during migration.
37
+ */
38
+ declare const AXMRuleEnginePermissionKeys: {
39
+ readonly RuleSet: {
40
+ readonly View: "Administration:Permission:ViewRules";
41
+ readonly Manage: "Administration:Permission:MaintainRules";
42
+ readonly Publish: "Administration:Permission:ManageRuleActions";
43
+ };
44
+ readonly Evaluate: {
45
+ readonly Run: "Administration:Permission:ManageRuleActions";
46
+ readonly Simulate: "Administration:Permission:ManageRuleActions";
47
+ };
48
+ };
49
+
50
+ declare const RootConfig: {
51
+ readonly config: {
52
+ i18n: string;
53
+ module: string;
54
+ };
55
+ readonly module: {
56
+ readonly route: "rule-engine-management";
57
+ readonly name: string;
58
+ readonly title: "@rule-engine-management:module.title";
59
+ readonly icon: "fa-light fa-scale-balanced";
60
+ };
61
+ readonly entities: {
62
+ readonly ruleSet: {
63
+ readonly name: "RuleSet";
64
+ readonly fullName: `${string}.RuleSet`;
65
+ readonly title: "@rule-engine-management:rule-sets.entities.rule-set.title";
66
+ readonly titlePlural: "@rule-engine-management:rule-sets.entities.rule-set.plural";
67
+ readonly icon: "fa-light fa-layer-group";
68
+ };
69
+ readonly ruleDefinition: {
70
+ readonly name: "RuleDefinition";
71
+ readonly fullName: `${string}.RuleDefinition`;
72
+ readonly title: "@rule-engine-management:rules.entities.rule-definition.title";
73
+ readonly titlePlural: "@rule-engine-management:rules.entities.rule-definition.plural";
74
+ readonly icon: "fa-light fa-list-check";
75
+ };
76
+ readonly decisionTable: {
77
+ readonly name: "DecisionTable";
78
+ readonly fullName: `${string}.DecisionTable`;
79
+ readonly title: "@rule-engine-management:tables.entities.decision-table.title";
80
+ readonly titlePlural: "@rule-engine-management:tables.entities.decision-table.plural";
81
+ readonly icon: "fa-light fa-table";
82
+ };
83
+ readonly ruleSetVersion: {
84
+ readonly name: "RuleSetVersion";
85
+ readonly fullName: `${string}.RuleSetVersion`;
86
+ readonly title: "@rule-engine-management:versions.entities.rule-set-version.title";
87
+ readonly titlePlural: "@rule-engine-management:versions.entities.rule-set-version.plural";
88
+ readonly icon: "fa-light fa-code-branch";
89
+ };
90
+ readonly ruleEvaluationRun: {
91
+ readonly name: "RuleEvaluationRun";
92
+ readonly fullName: `${string}.RuleEvaluationRun`;
93
+ readonly title: "@rule-engine-management:runs.entities.rule-evaluation-run.title";
94
+ readonly titlePlural: "@rule-engine-management:runs.entities.rule-evaluation-run.plural";
95
+ readonly icon: "fa-light fa-play";
96
+ };
97
+ };
98
+ };
99
+
100
+ /** Registry key for RuleSet Simulate custom entity page (tab). */
101
+ declare const RULE_SET_SIMULATE_PAGE_COMPONENT_KEY = "rule-set-simulate-page";
102
+
103
+ export { AXMRuleEnginePermissionKeys, AXPAdministrationPermissionKeys, AXPRuleEngineManagementMenuKeys, RULE_SET_SIMULATE_PAGE_COMPONENT_KEY, RootConfig };
@@ -0,0 +1,63 @@
1
+ import * as i0 from '@angular/core';
2
+ import * as i1 from '@acorex-platform/module-gateway/rule-engine-management';
3
+ import { AXPModuleManifest } from '@acorex-platform/framework-client/core';
4
+ import { AXPMenuProvider, AXPMenuProviderContext } from '@acorex-platform/framework-client/common';
5
+ import { AXPPermissionDefinitionProvider, AXPPermissionDefinitionProviderContext } from '@acorex-platform/framework-client/auth';
6
+ import { AXPPageComponentProvider, AXPPageComponentDefinition } from '@acorex-platform/framework-client/layout/components';
7
+ import { AXPPageLayoutBaseComponent } from '@acorex-platform/framework-client/layout/views';
8
+
9
+ declare class AXMRuleEngineManagementModule {
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXMRuleEngineManagementModule, never>;
11
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AXMRuleEngineManagementModule, never, [typeof i1.AXCRuleEngineManagementApiModule], never>;
12
+ static ɵinj: i0.ɵɵInjectorDeclaration<AXMRuleEngineManagementModule>;
13
+ }
14
+
15
+ declare const RuleEngineManagementManifest: AXPModuleManifest;
16
+
17
+ declare class AXMRuleEngineManagementMenuProvider implements AXPMenuProvider {
18
+ private entityService;
19
+ private sessionService;
20
+ provide(context: AXPMenuProviderContext): Promise<void>;
21
+ }
22
+
23
+ /**
24
+ * Registers Rules section capabilities under Administration.
25
+ */
26
+ declare class AXMRuleEngineManagementPermissionProvider implements AXPPermissionDefinitionProvider {
27
+ define(context: AXPPermissionDefinitionProviderContext): Promise<void>;
28
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXMRuleEngineManagementPermissionProvider, never>;
29
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXMRuleEngineManagementPermissionProvider>;
30
+ }
31
+
32
+ declare class AXMRuleSetSimulatePageComponentProvider implements AXPPageComponentProvider {
33
+ components(): Promise<AXPPageComponentDefinition[]>;
34
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXMRuleSetSimulatePageComponentProvider, never>;
35
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXMRuleSetSimulatePageComponentProvider>;
36
+ }
37
+
38
+ /**
39
+ * Custom RuleSet detail tab — same hosting pattern as workflow Activities.
40
+ * Shell/chrome comes from entity detail; content uses Acorex controls only.
41
+ */
42
+ declare class AXMRuleSetSimulatePageComponent extends AXPPageLayoutBaseComponent {
43
+ #private;
44
+ private readonly api;
45
+ /** Entity record from detail host. */
46
+ rootContext: i0.InputSignal<Record<string, unknown> | undefined>;
47
+ pageConfig: i0.InputSignal<Record<string, unknown> | undefined>;
48
+ protected readonly factsJson: i0.WritableSignal<string>;
49
+ protected readonly resultJson: i0.WritableSignal<string>;
50
+ protected readonly busy: i0.WritableSignal<boolean>;
51
+ protected readonly error: i0.WritableSignal<string>;
52
+ protected readonly ruleSetKey: i0.Signal<string>;
53
+ protected readonly ruleSetMeta: i0.Signal<{
54
+ version: string;
55
+ domain: string;
56
+ }>;
57
+ protected onFactsChange(value: string | null | undefined): void;
58
+ protected runSimulate(): Promise<void>;
59
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXMRuleSetSimulatePageComponent, never>;
60
+ static ɵcmp: i0.ɵɵComponentDeclaration<AXMRuleSetSimulatePageComponent, "axm-rule-set-simulate-page", never, { "rootContext": { "alias": "rootContext"; "required": false; "isSignal": true; }; "pageConfig": { "alias": "pageConfig"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
61
+ }
62
+
63
+ export { AXMRuleEngineManagementMenuProvider, AXMRuleEngineManagementModule, AXMRuleEngineManagementPermissionProvider, AXMRuleSetSimulatePageComponent, AXMRuleSetSimulatePageComponentProvider, RuleEngineManagementManifest };