@acorex/platform 20.6.0-next.9 → 20.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common/index.d.ts +9 -2
- package/core/index.d.ts +209 -55
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +225 -24
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-domain.mjs +49 -4
- package/fesm2022/acorex-platform-domain.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +39 -118
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs +1011 -257
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +2 -2
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +9318 -4439
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +30 -24
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +4 -8
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-V31OpYah.mjs +30 -0
- package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-V31OpYah.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-C1l2KSDa.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-m8rHZP8L.mjs} +2 -2
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-m8rHZP8L.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-view-popup.component-D-31ej0C.mjs → acorex-platform-layout-widgets-tabular-data-view-popup.component-y8vjUiVs.mjs} +2 -2
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-y8vjUiVs.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets.mjs +2081 -1238
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-runtime.mjs +79 -3
- package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-mARj77Mr.mjs +136 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-mARj77Mr.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-Cym8pq0v.mjs +1543 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-Cym8pq0v.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +124 -21
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-C0EpfU2k.mjs +55 -0
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-C0EpfU2k.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared.mjs +15 -110
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +658 -45
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/layout/builder/index.d.ts +6 -33
- package/layout/components/index.d.ts +301 -60
- package/layout/designer/index.d.ts +1 -1
- package/layout/entity/index.d.ts +650 -86
- package/layout/views/index.d.ts +5 -58
- package/layout/widget-core/index.d.ts +24 -26
- package/layout/widgets/README.md +0 -1
- package/layout/widgets/index.d.ts +134 -84
- package/package.json +9 -9
- package/runtime/index.d.ts +36 -8
- package/themes/default/index.d.ts +29 -73
- package/themes/shared/index.d.ts +1 -39
- package/workflow/index.d.ts +401 -90
- package/fesm2022/acorex-platform-layout-entity-create-entity.command-DGeylNSY.mjs +0 -52
- package/fesm2022/acorex-platform-layout-entity-create-entity.command-DGeylNSY.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-C1l2KSDa.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-D-31ej0C.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-WbPPqDON.mjs +0 -115
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-WbPPqDON.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-CD7rJIMh.mjs +0 -803
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-CD7rJIMh.mjs.map +0 -1
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, InjectionToken, inject, EnvironmentInjector, runInInjectionContext, makeEnvironmentProviders, input, ElementRef, effect, Directive, isDevMode, NgModule } from '@angular/core';
|
|
3
|
+
import { AXPBroadcastEventService, AXPDistributedEventListenerService } from '@acorex/platform/core';
|
|
3
4
|
import { castArray } from 'lodash-es';
|
|
4
5
|
|
|
6
|
+
//#endregion
|
|
7
|
+
//#region ---- Middleware Composition ----
|
|
8
|
+
/**
|
|
9
|
+
* Creates a composed handler by chaining the provided command middlewares.
|
|
10
|
+
*/
|
|
5
11
|
function composeCommandMiddlewares(middlewares) {
|
|
6
12
|
return (handler) => {
|
|
7
13
|
let composed = handler;
|
|
@@ -13,6 +19,7 @@ function composeCommandMiddlewares(middlewares) {
|
|
|
13
19
|
return composed;
|
|
14
20
|
};
|
|
15
21
|
}
|
|
22
|
+
//#endregion
|
|
16
23
|
|
|
17
24
|
class AXPCommandRegistry {
|
|
18
25
|
constructor() {
|
|
@@ -55,11 +62,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
55
62
|
// plugins/command.extension.token.ts
|
|
56
63
|
const AXP_COMMAND_EXTENSION = new InjectionToken('AXP_COMMAND_EXTENSION');
|
|
57
64
|
|
|
65
|
+
//#region ---- Imports ----
|
|
66
|
+
//#endregion
|
|
67
|
+
const COMMAND_EXECUTION_EVENT_KEY = '@commands:execution';
|
|
68
|
+
class AXPCommandEventsService {
|
|
69
|
+
constructor() {
|
|
70
|
+
//#region ---- Services & Dependencies ----
|
|
71
|
+
this.broadcast = inject(AXPBroadcastEventService);
|
|
72
|
+
this.distributedEvents = inject(AXPDistributedEventListenerService, { optional: true });
|
|
73
|
+
}
|
|
74
|
+
//#endregion
|
|
75
|
+
//#region ---- Public API ----
|
|
76
|
+
listen(handler) {
|
|
77
|
+
const subscription = this.broadcast
|
|
78
|
+
.listen(COMMAND_EXECUTION_EVENT_KEY)
|
|
79
|
+
.subscribe(({ data }) => handler(data));
|
|
80
|
+
return () => subscription.unsubscribe();
|
|
81
|
+
}
|
|
82
|
+
async emit(event) {
|
|
83
|
+
this.broadcast.publish(COMMAND_EXECUTION_EVENT_KEY, event);
|
|
84
|
+
await this.distributedEvents?.dispatch(COMMAND_EXECUTION_EVENT_KEY, event);
|
|
85
|
+
}
|
|
86
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPCommandEventsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
87
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPCommandEventsService, providedIn: 'root' }); }
|
|
88
|
+
}
|
|
89
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPCommandEventsService, decorators: [{
|
|
90
|
+
type: Injectable,
|
|
91
|
+
args: [{ providedIn: 'root' }]
|
|
92
|
+
}] });
|
|
93
|
+
|
|
58
94
|
class AXPCommandExecutor {
|
|
59
95
|
constructor() {
|
|
60
96
|
this.injector = inject(EnvironmentInjector);
|
|
61
97
|
this.registry = inject(AXPCommandRegistry);
|
|
62
98
|
this.extensions = inject(AXP_COMMAND_EXTENSION, { optional: true });
|
|
99
|
+
this.commandEvents = inject(AXPCommandEventsService);
|
|
63
100
|
}
|
|
64
101
|
async execute(key, input) {
|
|
65
102
|
const loader = this.registry.getLoader(key);
|
|
@@ -70,11 +107,42 @@ class AXPCommandExecutor {
|
|
|
70
107
|
const handler = (i) => command.execute(i);
|
|
71
108
|
const pluginMiddlewares = this.getPluginMiddlewares(key);
|
|
72
109
|
const globalMiddlewares = this.registry.getMiddlewares();
|
|
73
|
-
const wrappedMiddlewares = [
|
|
110
|
+
const wrappedMiddlewares = [
|
|
111
|
+
...globalMiddlewares,
|
|
112
|
+
...pluginMiddlewares,
|
|
113
|
+
].map(middleware => {
|
|
74
114
|
return (input, next) => runInInjectionContext(this.injector, () => middleware(input, next));
|
|
75
115
|
});
|
|
76
116
|
const composed = composeCommandMiddlewares(wrappedMiddlewares)(handler);
|
|
77
|
-
|
|
117
|
+
const beforeEvent = {
|
|
118
|
+
stage: 'before',
|
|
119
|
+
key,
|
|
120
|
+
input,
|
|
121
|
+
};
|
|
122
|
+
await this.commandEvents.emit(beforeEvent);
|
|
123
|
+
try {
|
|
124
|
+
const result = await composed(input);
|
|
125
|
+
const afterEvent = {
|
|
126
|
+
stage: 'after',
|
|
127
|
+
key,
|
|
128
|
+
input,
|
|
129
|
+
success: true,
|
|
130
|
+
result,
|
|
131
|
+
};
|
|
132
|
+
await this.commandEvents.emit(afterEvent);
|
|
133
|
+
return result;
|
|
134
|
+
}
|
|
135
|
+
catch (error) {
|
|
136
|
+
const afterEvent = {
|
|
137
|
+
stage: 'after',
|
|
138
|
+
key,
|
|
139
|
+
input,
|
|
140
|
+
success: false,
|
|
141
|
+
error,
|
|
142
|
+
};
|
|
143
|
+
await this.commandEvents.emit(afterEvent);
|
|
144
|
+
throw error;
|
|
145
|
+
}
|
|
78
146
|
}
|
|
79
147
|
getPluginMiddlewares(key) {
|
|
80
148
|
return this.extensions
|
|
@@ -152,6 +220,14 @@ function provideCommandSetups(entries) {
|
|
|
152
220
|
}
|
|
153
221
|
]);
|
|
154
222
|
}
|
|
223
|
+
function provideCommand(key, loader) {
|
|
224
|
+
return provideCommandSetups([
|
|
225
|
+
{
|
|
226
|
+
key,
|
|
227
|
+
command: loader
|
|
228
|
+
}
|
|
229
|
+
]);
|
|
230
|
+
}
|
|
155
231
|
|
|
156
232
|
const AXP_COMMAND_MIDDLEWARE_SETUP = new InjectionToken('AXP_COMMAND_MIDDLEWARE_SETUP');
|
|
157
233
|
function provideCommandMiddleware(entries) {
|
|
@@ -768,5 +844,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
768
844
|
* Generated bundle index. Do not edit.
|
|
769
845
|
*/
|
|
770
846
|
|
|
771
|
-
export { AXPCommandExecutor, AXPCommandRegistry, AXPCommandService, AXPPolicyEngineContext, AXPPolicyEngineDirective, AXPPolicyEngineRegistry, AXPPolicyEngineService, AXPQueryExecutor, AXPQueryRegistry, AXPQueryService, AXPRuntimeModule, AXPViewExecutor, AXPViewRegistry, AXPViewService, AXP_COMMAND_EXTENSION, AXP_COMMAND_MIDDLEWARE_SETUP, AXP_COMMAND_SETUP, AXP_POLICY_ENGINE_MIDDLEWARE_SETUP, AXP_POLICY_EXTENSION, AXP_QUERY_EXTENSION, AXP_QUERY_MIDDLEWARE_SETUP, AXP_QUERY_SETUP, AXP_VIEW_EXTENSION, AXP_VIEW_SETUP, composeCommandMiddlewares, composePolicyEngineMiddlewares, composeQueryMiddlewares, composeViewMiddlewares, provideCommandMiddleware, provideCommandSetups, providePolicySetups, provideQueryMiddleware, provideQuerySetups, provideViewSetup, provideViewSetups };
|
|
847
|
+
export { AXPCommandEventsService, AXPCommandExecutor, AXPCommandRegistry, AXPCommandService, AXPPolicyEngineContext, AXPPolicyEngineDirective, AXPPolicyEngineRegistry, AXPPolicyEngineService, AXPQueryExecutor, AXPQueryRegistry, AXPQueryService, AXPRuntimeModule, AXPViewExecutor, AXPViewRegistry, AXPViewService, AXP_COMMAND_EXTENSION, AXP_COMMAND_MIDDLEWARE_SETUP, AXP_COMMAND_SETUP, AXP_POLICY_ENGINE_MIDDLEWARE_SETUP, AXP_POLICY_EXTENSION, AXP_QUERY_EXTENSION, AXP_QUERY_MIDDLEWARE_SETUP, AXP_QUERY_SETUP, AXP_VIEW_EXTENSION, AXP_VIEW_SETUP, composeCommandMiddlewares, composePolicyEngineMiddlewares, composeQueryMiddlewares, composeViewMiddlewares, provideCommand, provideCommandMiddleware, provideCommandSetups, providePolicySetups, provideQueryMiddleware, provideQuerySetups, provideViewSetup, provideViewSetups };
|
|
772
848
|
//# sourceMappingURL=acorex-platform-runtime.mjs.map
|