@acorex/platform 21.0.0-next.72 → 21.0.0-next.74

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.
Files changed (39) hide show
  1. package/contracts/README.md +3 -0
  2. package/fesm2022/acorex-platform-auth.mjs +72 -58
  3. package/fesm2022/acorex-platform-auth.mjs.map +1 -1
  4. package/fesm2022/acorex-platform-common.mjs +414 -22
  5. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  6. package/fesm2022/acorex-platform-contracts.mjs +38 -0
  7. package/fesm2022/acorex-platform-contracts.mjs.map +1 -0
  8. package/fesm2022/acorex-platform-core.mjs +23 -14
  9. package/fesm2022/acorex-platform-core.mjs.map +1 -1
  10. package/fesm2022/acorex-platform-layout-builder.mjs +5 -4
  11. package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
  12. package/fesm2022/acorex-platform-layout-components.mjs +187 -9
  13. package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
  14. package/fesm2022/acorex-platform-layout-entity.mjs +81 -114
  15. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  16. package/fesm2022/acorex-platform-layout-views.mjs +2 -1
  17. package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
  18. package/fesm2022/acorex-platform-layout-widget-core.mjs +11 -1
  19. package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
  20. package/fesm2022/acorex-platform-layout-widgets.mjs +418 -239
  21. package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
  22. package/fesm2022/acorex-platform-themes-default.mjs +4 -4
  23. package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
  24. package/fesm2022/acorex-platform-themes-shared-settings.provider-BjuzSe0T.mjs.map +1 -1
  25. package/fesm2022/acorex-platform-themes-shared.mjs +3 -0
  26. package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
  27. package/fesm2022/acorex-platform-workflow.mjs +57 -68
  28. package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
  29. package/package.json +5 -1
  30. package/types/acorex-platform-auth.d.ts +29 -22
  31. package/types/acorex-platform-common.d.ts +89 -262
  32. package/types/acorex-platform-contracts.d.ts +940 -0
  33. package/types/acorex-platform-core.d.ts +8 -8
  34. package/types/acorex-platform-layout-builder.d.ts +2 -5
  35. package/types/acorex-platform-layout-components.d.ts +77 -7
  36. package/types/acorex-platform-layout-entity.d.ts +185 -175
  37. package/types/acorex-platform-layout-widget-core.d.ts +4 -26
  38. package/types/acorex-platform-layout-widgets.d.ts +55 -52
  39. package/types/acorex-platform-workflow.d.ts +3 -670
@@ -34,6 +34,63 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
34
34
  }]
35
35
  }] });
36
36
 
37
+ class AXPWorkflowContext {
38
+ constructor(initialData = {}) {
39
+ this.variables = {};
40
+ this.stepOutputs = new Map();
41
+ this.variables = cloneDeep(initialData);
42
+ }
43
+ setVariable(key, value) {
44
+ setSmart(this.variables, key, value);
45
+ }
46
+ setVariables(context = {}) {
47
+ this.variables = { ...this.variables, ...context };
48
+ }
49
+ getVariable(key) {
50
+ return !key ? this.variables : get(this.variables, key);
51
+ }
52
+ setOutput(key, output) {
53
+ this.stepOutputs.set(key, output);
54
+ }
55
+ setOutputs(values) {
56
+ this.stepOutputs = new Map([...this.stepOutputs, ...values]);
57
+ }
58
+ getOutput(key) {
59
+ return this.stepOutputs.get(key);
60
+ }
61
+ }
62
+ class AXPWorkflowAction {
63
+ constructor() {
64
+ this.eventService = inject(AXPWorkflowEventService);
65
+ }
66
+ dispatch(event) {
67
+ this.eventService.dispatch(event);
68
+ }
69
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowAction, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
70
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowAction }); }
71
+ }
72
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowAction, decorators: [{
73
+ type: Injectable
74
+ }] });
75
+ class AXPWorkflowFunction {
76
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowFunction, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
77
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowFunction }); }
78
+ }
79
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowFunction, decorators: [{
80
+ type: Injectable
81
+ }] });
82
+ function createWorkFlowEvent(type) {
83
+ const eventCreator = (payload) => ({ type, payload });
84
+ eventCreator.type = type;
85
+ return eventCreator;
86
+ }
87
+ function ofType(...allowedTypes) {
88
+ return filter((event) => allowedTypes.some((type) => event.type === type.type));
89
+ }
90
+
91
+ //#region ---- Contracts barrel ----
92
+ //#endregion
93
+
37
94
  class AXPWorkflowRegistryService {
38
95
  constructor() {
39
96
  this.functionsMap = new Map();
@@ -127,60 +184,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
127
184
  }]
128
185
  }] });
129
186
 
130
- class AXPWorkflowContext {
131
- constructor(initialData = {}) {
132
- this.variables = {};
133
- this.stepOutputs = new Map();
134
- this.variables = cloneDeep(initialData);
135
- }
136
- setVariable(key, value) {
137
- setSmart(this.variables, key, value);
138
- }
139
- setVariables(context = {}) {
140
- this.variables = { ...this.variables, ...context };
141
- }
142
- getVariable(key) {
143
- return !key ? this.variables : get(this.variables, key);
144
- }
145
- setOutput(key, output) {
146
- this.stepOutputs.set(key, output);
147
- }
148
- setOutputs(values) {
149
- this.stepOutputs = new Map([...this.stepOutputs, ...values]);
150
- }
151
- getOutput(key) {
152
- return this.stepOutputs.get(key);
153
- }
154
- }
155
- class AXPWorkflowAction {
156
- constructor() {
157
- this.eventService = inject(AXPWorkflowEventService);
158
- }
159
- dispatch(event) {
160
- this.eventService.dispatch(event);
161
- }
162
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowAction, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
163
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowAction }); }
164
- }
165
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowAction, decorators: [{
166
- type: Injectable
167
- }] });
168
- class AXPWorkflowFunction {
169
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowFunction, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
170
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowFunction }); }
171
- }
172
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPWorkflowFunction, decorators: [{
173
- type: Injectable
174
- }] });
175
- function createWorkFlowEvent(type) {
176
- const eventCreator = (payload) => ({ type, payload });
177
- eventCreator.type = type;
178
- return eventCreator;
179
- }
180
- function ofType(...allowedTypes) {
181
- return filter((event) => allowedTypes.some((type) => event.type === type.type));
182
- }
183
-
184
187
  class AXPWorkflowDecideAction extends AXPWorkflowAction {
185
188
  async execute(context) {
186
189
  // its a fake action
@@ -412,18 +415,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
412
415
  }]
413
416
  }] });
414
417
 
415
- // ============================================
416
- // WORKFLOW INSTANCE v3.0.0 TYPES
417
- // Based on Elsa Workflow Instance schema: https://elsaworkflows.io/schemas/workflow-instance/v3.0.0/schema.json
418
- // Compatible with Elsa backend while using ACoreX naming conventions
419
- // ============================================
420
-
421
- // Note:
422
- // Previous versions defined dedicated activity result/command types here
423
- // (AXPActivityResult / AXPActivity) that wrapped output and outcome.
424
- // Activities are now modeled directly as AXPCommand with outcome stored in
425
- // AXPExecuteCommandResult.metadata.outcome.
426
-
427
418
  const AXP_ACTIVITY_PROVIDER = new InjectionToken('AXP_ACTIVITY_PROVIDER', {
428
419
  factory: () => [],
429
420
  });
@@ -2699,8 +2690,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
2699
2690
  }]
2700
2691
  }] });
2701
2692
 
2702
- // Workflow Instance Types (Storage/Database)
2703
-
2704
2693
  class AXPWorkflowModule {
2705
2694
  static forRoot(config) {
2706
2695
  return {