@acorex/platform 20.8.13 → 20.8.14
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/{types/acorex-platform-auth.d.ts → auth/index.d.ts} +2 -14
- package/{types/acorex-platform-common.d.ts → common/index.d.ts} +30 -302
- package/{types/acorex-platform-core.d.ts → core/index.d.ts} +44 -188
- package/{types/acorex-platform-domain.d.ts → domain/index.d.ts} +412 -744
- package/fesm2022/acorex-platform-auth.mjs +27 -125
- package/fesm2022/acorex-platform-auth.mjs.map +1 -1
- package/fesm2022/{acorex-platform-common-common-settings.provider-Bi1RYif5.mjs → acorex-platform-common-common-settings.provider-DVvuLUfF.mjs} +32 -30
- package/fesm2022/acorex-platform-common-common-settings.provider-DVvuLUfF.mjs.map +1 -0
- package/fesm2022/acorex-platform-common.mjs +205 -711
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +127 -420
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-domain.mjs +830 -561
- package/fesm2022/acorex-platform-domain.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +114 -634
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-components-binding-expression-editor-popup.component-CXEdvDTf.mjs → acorex-platform-layout-components-binding-expression-editor-popup.component-CSxCnzwU.mjs} +9 -9
- package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CSxCnzwU.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-components.mjs +877 -3362
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +204 -456
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +10062 -14672
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +171 -413
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +441 -507
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-button-widget-designer.component-Dy7jF-oD.mjs → acorex-platform-layout-widgets-button-widget-designer.component-CPBzE96V.mjs} +10 -10
- package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-CPBzE96V.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-file-list-popup.component-CDYAGBku.mjs → acorex-platform-layout-widgets-file-list-popup.component-Dtv6U3df.mjs} +76 -21
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-Dtv6U3df.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-image-preview.popup-C_EPAvCU.mjs → acorex-platform-layout-widgets-image-preview.popup-QxJfswhK.mjs} +7 -6
- package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-QxJfswhK.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-page-widget-designer.component-D10yO28c.mjs → acorex-platform-layout-widgets-page-widget-designer.component-CVdssZBD.mjs} +12 -12
- package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-CVdssZBD.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BCxE0RTB.mjs +111 -0
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BCxE0RTB.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-DmzNTYiS.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-DVaZN9QN.mjs} +5 -5
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-DVaZN9QN.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-view-popup.component-BNG_588B.mjs → acorex-platform-layout-widgets-tabular-data-view-popup.component-DPGHgXa6.mjs} +4 -4
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-DPGHgXa6.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-text-block-widget-designer.component-Vo4fWHtX.mjs → acorex-platform-layout-widgets-text-block-widget-designer.component-CdiNW691.mjs} +6 -6
- package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-CdiNW691.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets.mjs +3408 -5611
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-native.mjs +7 -8
- package/fesm2022/acorex-platform-native.mjs.map +1 -1
- package/fesm2022/acorex-platform-runtime.mjs +166 -391
- package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-D4hU2SCE.mjs +160 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-D4hU2SCE.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-D2CtNrSn.mjs +1716 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-D2CtNrSn.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-BVTklnzs.mjs +120 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-BVTklnzs.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-BfCeUU5F.mjs → acorex-platform-themes-default-entity-master-single-view.component-rGsMVAZj.mjs} +23 -16
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-rGsMVAZj.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-error-401.component-C7EYJzSr.mjs → acorex-platform-themes-default-error-401.component-53VB-PS_.mjs} +4 -4
- package/fesm2022/acorex-platform-themes-default-error-401.component-53VB-PS_.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-error-404.component-7MVLMwIa.mjs → acorex-platform-themes-default-error-404.component-DVF9soT5.mjs} +4 -4
- package/fesm2022/acorex-platform-themes-default-error-404.component-DVF9soT5.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-error-offline.component-CwNNHzZn.mjs +19 -0
- package/fesm2022/acorex-platform-themes-default-error-offline.component-CwNNHzZn.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +61 -1784
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-shared-icon-chooser-column.component-CqkWJYdv.mjs → acorex-platform-themes-shared-icon-chooser-column.component-TJ9PWHMY.mjs} +6 -6
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-TJ9PWHMY.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-icon-chooser-view.component-BOTuLdWN.mjs → acorex-platform-themes-shared-icon-chooser-view.component-BHcKkIx0.mjs} +6 -6
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-BHcKkIx0.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-settings.provider-DK6R87Lf.mjs → acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs} +25 -24
- package/fesm2022/acorex-platform-themes-shared-settings.provider-DSs1o1M6.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-BUPs84MI.mjs +65 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-BUPs84MI.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-BotknoHn.mjs +64 -0
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-BotknoHn.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared.mjs +305 -408
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +100 -359
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/fesm2022/acorex-platform.mjs.map +1 -1
- package/{types/acorex-platform-layout-builder.d.ts → layout/builder/index.d.ts} +38 -160
- package/{types/acorex-platform-layout-components.d.ts → layout/components/index.d.ts} +125 -854
- package/{types/acorex-platform-layout-designer.d.ts → layout/designer/index.d.ts} +18 -96
- package/{types/acorex-platform-layout-entity.d.ts → layout/entity/index.d.ts} +65 -848
- package/{types/acorex-platform-layout-views.d.ts → layout/views/index.d.ts} +47 -80
- package/{types/acorex-platform-layout-widget-core.d.ts → layout/widget-core/index.d.ts} +197 -274
- package/{types/acorex-platform-layout-widgets.d.ts → layout/widgets/index.d.ts} +124 -608
- package/{types/acorex-platform-native.d.ts → native/index.d.ts} +7 -0
- package/package.json +31 -31
- package/runtime/index.d.ts +307 -0
- package/{types/acorex-platform-themes-default.d.ts → themes/default/index.d.ts} +4 -113
- package/{types/acorex-platform-themes-shared.d.ts → themes/shared/index.d.ts} +4 -5
- package/{types/acorex-platform-workflow.d.ts → workflow/index.d.ts} +81 -162
- package/fesm2022/acorex-platform-common-common-settings.provider-Bi1RYif5.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CXEdvDTf.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-button-widget-designer.component-Dy7jF-oD.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-CDYAGBku.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-C_EPAvCU.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-page-widget-designer.component-D10yO28c.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BGO75IMz.mjs +0 -116
- package/fesm2022/acorex-platform-layout-widgets-repeater-widget-column.component-BGO75IMz.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-DmzNTYiS.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-BNG_588B.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-text-block-widget-designer.component-Vo4fWHtX.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Cx1lLUaR.mjs +0 -160
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Cx1lLUaR.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-AOrcgjDF.mjs +0 -120
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-AOrcgjDF.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-BfCeUU5F.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-401.component-C7EYJzSr.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-404.component-7MVLMwIa.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-error-offline.component-DR6G8gPC.mjs +0 -19
- package/fesm2022/acorex-platform-themes-default-error-offline.component-DR6G8gPC.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-CqkWJYdv.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-view.component-BOTuLdWN.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-settings.provider-DK6R87Lf.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-D566Kdvy.mjs +0 -94
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-D566Kdvy.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-D7-rCGl7.mjs +0 -86
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-D7-rCGl7.mjs.map +0 -1
- package/types/acorex-platform-runtime.d.ts +0 -571
- /package/{types/acorex-platform.d.ts → index.d.ts} +0 -0
|
@@ -1,220 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Injectable, InjectionToken, inject, EnvironmentInjector, runInInjectionContext, makeEnvironmentProviders, input, ElementRef, effect, Directive, isDevMode, NgModule } from '@angular/core';
|
|
3
3
|
import { AXPBroadcastEventService, AXPDistributedEventListenerService } from '@acorex/platform/core';
|
|
4
4
|
import { castArray } from 'lodash-es';
|
|
5
5
|
|
|
6
|
-
//#region ---- defineCommand ----
|
|
7
|
-
/**
|
|
8
|
-
* Typed identity helper for command metadata sidecars.
|
|
9
|
-
*/
|
|
10
|
-
function defineCommand(definition) {
|
|
11
|
-
return definition;
|
|
12
|
-
}
|
|
13
|
-
//#endregion
|
|
14
|
-
|
|
15
|
-
//#region ---- Shared catalog categories (queries & commands) ----
|
|
16
|
-
const AXP_CATALOG_DEFINITION_CATEGORY_PLATFORM = {
|
|
17
|
-
name: 'platform',
|
|
18
|
-
order: 1,
|
|
19
|
-
title: 'Platform',
|
|
20
|
-
};
|
|
21
|
-
const AXP_CATALOG_DEFINITION_CATEGORY_ENTITY = {
|
|
22
|
-
name: 'entity',
|
|
23
|
-
order: 2,
|
|
24
|
-
title: 'Entity',
|
|
25
|
-
};
|
|
26
|
-
const AXP_CATALOG_DEFINITION_CATEGORY_STORAGE = {
|
|
27
|
-
name: 'storage',
|
|
28
|
-
order: 3,
|
|
29
|
-
title: 'Storage',
|
|
30
|
-
};
|
|
31
|
-
const AXP_CATALOG_DEFINITION_CATEGORY_WIDGETS = {
|
|
32
|
-
name: 'widgets',
|
|
33
|
-
order: 4,
|
|
34
|
-
title: 'Widgets',
|
|
35
|
-
};
|
|
36
|
-
const AXP_CATALOG_DEFINITION_CATEGORY_WORKFLOW = {
|
|
37
|
-
name: 'workflow',
|
|
38
|
-
order: 5,
|
|
39
|
-
title: 'Workflow',
|
|
40
|
-
};
|
|
41
|
-
const AXP_CATALOG_DEFINITION_CATEGORY_UTILITY = {
|
|
42
|
-
name: 'utility',
|
|
43
|
-
order: 6,
|
|
44
|
-
title: 'Utility',
|
|
45
|
-
};
|
|
46
|
-
const AXP_CATALOG_DEFINITION_CATEGORY_SETTINGS = {
|
|
47
|
-
name: 'settings',
|
|
48
|
-
order: 7,
|
|
49
|
-
title: 'Settings',
|
|
50
|
-
};
|
|
51
|
-
const AXP_CATALOG_DEFINITION_CATEGORY_AI_TOOLS = {
|
|
52
|
-
name: 'ai-tools',
|
|
53
|
-
order: 8,
|
|
54
|
-
title: 'AI tools',
|
|
55
|
-
};
|
|
56
|
-
const AXP_CATALOG_DEFINITION_CATEGORY_SECURITY = {
|
|
57
|
-
name: 'security',
|
|
58
|
-
order: 9,
|
|
59
|
-
title: 'Security',
|
|
60
|
-
};
|
|
61
|
-
const AXP_CATALOG_DEFINITION_CATEGORY_DATA_MANAGEMENT = {
|
|
62
|
-
name: 'data-management',
|
|
63
|
-
order: 10,
|
|
64
|
-
title: 'Data management',
|
|
65
|
-
};
|
|
66
|
-
const AXP_CATALOG_DEFINITION_CATEGORY_ASSESSMENT = {
|
|
67
|
-
name: 'assessment',
|
|
68
|
-
order: 11,
|
|
69
|
-
title: 'Assessment',
|
|
70
|
-
};
|
|
71
|
-
const AXP_CATALOG_DEFINITION_CATEGORY_REPORT = {
|
|
72
|
-
name: 'report',
|
|
73
|
-
order: 12,
|
|
74
|
-
title: 'Report',
|
|
75
|
-
};
|
|
76
|
-
const AXP_CATALOG_DEFINITION_CATEGORY_ORGANIZATION = {
|
|
77
|
-
name: 'organization',
|
|
78
|
-
order: 13,
|
|
79
|
-
title: 'Organization',
|
|
80
|
-
};
|
|
81
|
-
const AXP_CATALOG_DEFINITION_CATEGORY_TENANT = {
|
|
82
|
-
name: 'tenant',
|
|
83
|
-
order: 14,
|
|
84
|
-
title: 'Tenant',
|
|
85
|
-
};
|
|
86
|
-
const AXP_CATALOG_DEFINITION_CATEGORY_HUMAN_CAPITAL = {
|
|
87
|
-
name: 'human-capital',
|
|
88
|
-
order: 15,
|
|
89
|
-
title: 'Human capital',
|
|
90
|
-
};
|
|
91
|
-
const AXP_CATALOG_DEFINITION_CATEGORY_PRODUCT = {
|
|
92
|
-
name: 'product',
|
|
93
|
-
order: 16,
|
|
94
|
-
title: 'Product',
|
|
95
|
-
};
|
|
96
|
-
const AXP_CATALOG_DEFINITION_CATEGORY_FILE_WIDGET = {
|
|
97
|
-
name: 'file-widget',
|
|
98
|
-
order: 17,
|
|
99
|
-
title: 'File widget',
|
|
100
|
-
};
|
|
101
|
-
//#endregion
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Shared build-time catalog metadata for command, query, and widget definition sidecars
|
|
105
|
-
* (`defineCommand`, `defineQuery`, `defineWidget`).
|
|
106
|
-
* Lives under `shared/` so consumers import one module without a "command" prefix on generic shapes.
|
|
107
|
-
*/
|
|
108
|
-
//#endregion
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Build-time command metadata for AXPCommand implementations.
|
|
112
|
-
* `inputs` / `outputs` are schema rows (same family as entity optionDefinitions).
|
|
113
|
-
* Validation entries: only `rule` name and optional `options` (no title/message on rules).
|
|
114
|
-
* Do not import from Angular templates; sidecars may import `defineCommand` from `@acorex/platform/runtime`.
|
|
115
|
-
*
|
|
116
|
-
* Query metadata (fetch-only, no outcomes) is defined in `../queries/query-definition.types.ts` with `defineQuery`.
|
|
117
|
-
* Widget metadata sidecars use `../widgets/widget-definition.types.ts` with `defineWidget`.
|
|
118
|
-
*/
|
|
119
|
-
//#endregion
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Build-time command metadata only. Safe under Node (e.g. generate-runtime-catalog) without loading the command executor stack.
|
|
123
|
-
* Sidecars should import `defineCommand` from `@acorex/platform/runtime` (or this module for deep imports).
|
|
124
|
-
*/
|
|
125
|
-
|
|
126
|
-
//#region ---- Imports ----
|
|
127
|
-
//#endregion
|
|
128
|
-
const COMMAND_EXECUTION_EVENT_KEY = '@commands:execution';
|
|
129
|
-
class AXPCommandEventsService {
|
|
130
|
-
constructor() {
|
|
131
|
-
//#region ---- Services & Dependencies ----
|
|
132
|
-
this.broadcast = inject(AXPBroadcastEventService);
|
|
133
|
-
this.distributedEvents = inject(AXPDistributedEventListenerService, { optional: true });
|
|
134
|
-
}
|
|
135
|
-
//#endregion
|
|
136
|
-
//#region ---- Public API ----
|
|
137
|
-
listen(handler) {
|
|
138
|
-
const subscription = this.broadcast
|
|
139
|
-
.listen(COMMAND_EXECUTION_EVENT_KEY)
|
|
140
|
-
.subscribe(({ data }) => handler(data));
|
|
141
|
-
return () => subscription.unsubscribe();
|
|
142
|
-
}
|
|
143
|
-
async emit(event) {
|
|
144
|
-
const safePayload = this.serializeForBroadcast(event);
|
|
145
|
-
this.broadcast.publish(COMMAND_EXECUTION_EVENT_KEY, safePayload);
|
|
146
|
-
await this.distributedEvents?.dispatch(COMMAND_EXECUTION_EVENT_KEY, safePayload);
|
|
147
|
-
}
|
|
148
|
-
//#endregion
|
|
149
|
-
//#region ---- Broadcast payload (structured-clone safe) ----
|
|
150
|
-
/**
|
|
151
|
-
* Removes functions, symbols, and cycles so {@link AXPBroadcastEventService.publish}
|
|
152
|
-
* can use `BroadcastChannel.postMessage` without DataCloneError (e.g. command input with `dialogRef`).
|
|
153
|
-
*/
|
|
154
|
-
serializeForBroadcast(event) {
|
|
155
|
-
return {
|
|
156
|
-
stage: event.stage,
|
|
157
|
-
key: event.key,
|
|
158
|
-
success: event.success,
|
|
159
|
-
input: this.stripNonSerializable(event.input),
|
|
160
|
-
result: event.result === undefined || event.result === null
|
|
161
|
-
? event.result
|
|
162
|
-
: this.stripNonSerializable(event.result),
|
|
163
|
-
error: event.error instanceof Error
|
|
164
|
-
? { name: event.error.name, message: event.error.message }
|
|
165
|
-
: this.stripNonSerializable(event.error),
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
stripNonSerializable(value) {
|
|
169
|
-
const seen = new WeakSet();
|
|
170
|
-
const walk = (v) => {
|
|
171
|
-
if (v === null || v === undefined) {
|
|
172
|
-
return v;
|
|
173
|
-
}
|
|
174
|
-
const t = typeof v;
|
|
175
|
-
if (t === 'function' || t === 'symbol') {
|
|
176
|
-
return undefined;
|
|
177
|
-
}
|
|
178
|
-
if (t === 'bigint') {
|
|
179
|
-
return v.toString();
|
|
180
|
-
}
|
|
181
|
-
if (t !== 'object') {
|
|
182
|
-
return v;
|
|
183
|
-
}
|
|
184
|
-
if (v instanceof Date) {
|
|
185
|
-
return v.toISOString();
|
|
186
|
-
}
|
|
187
|
-
if (Array.isArray(v)) {
|
|
188
|
-
if (seen.has(v)) {
|
|
189
|
-
return '[Circular]';
|
|
190
|
-
}
|
|
191
|
-
seen.add(v);
|
|
192
|
-
return v.map((item) => walk(item)).filter((item) => item !== undefined);
|
|
193
|
-
}
|
|
194
|
-
if (seen.has(v)) {
|
|
195
|
-
return '[Circular]';
|
|
196
|
-
}
|
|
197
|
-
seen.add(v);
|
|
198
|
-
const obj = v;
|
|
199
|
-
const out = {};
|
|
200
|
-
for (const key of Object.keys(obj)) {
|
|
201
|
-
const child = walk(obj[key]);
|
|
202
|
-
if (child !== undefined) {
|
|
203
|
-
out[key] = child;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
return out;
|
|
207
|
-
};
|
|
208
|
-
return walk(value);
|
|
209
|
-
}
|
|
210
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPCommandEventsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
211
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPCommandEventsService, providedIn: 'root' }); }
|
|
212
|
-
}
|
|
213
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPCommandEventsService, decorators: [{
|
|
214
|
-
type: Injectable,
|
|
215
|
-
args: [{ providedIn: 'root' }]
|
|
216
|
-
}] });
|
|
217
|
-
|
|
218
6
|
//#endregion
|
|
219
7
|
//#region ---- Middleware Composition ----
|
|
220
8
|
/**
|
|
@@ -263,10 +51,10 @@ class AXPCommandRegistry {
|
|
|
263
51
|
this.registry.clear();
|
|
264
52
|
this.middlewares.length = 0;
|
|
265
53
|
}
|
|
266
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
267
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
54
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPCommandRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
55
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPCommandRegistry, providedIn: 'root' }); }
|
|
268
56
|
}
|
|
269
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
57
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPCommandRegistry, decorators: [{
|
|
270
58
|
type: Injectable,
|
|
271
59
|
args: [{ providedIn: 'root' }]
|
|
272
60
|
}] });
|
|
@@ -274,6 +62,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
274
62
|
// plugins/command.extension.token.ts
|
|
275
63
|
const AXP_COMMAND_EXTENSION = new InjectionToken('AXP_COMMAND_EXTENSION');
|
|
276
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.19", ngImport: i0, type: AXPCommandEventsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
87
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPCommandEventsService, providedIn: 'root' }); }
|
|
88
|
+
}
|
|
89
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPCommandEventsService, decorators: [{
|
|
90
|
+
type: Injectable,
|
|
91
|
+
args: [{ providedIn: 'root' }]
|
|
92
|
+
}] });
|
|
93
|
+
|
|
277
94
|
class AXPCommandExecutor {
|
|
278
95
|
constructor() {
|
|
279
96
|
this.injector = inject(EnvironmentInjector);
|
|
@@ -332,10 +149,10 @@ class AXPCommandExecutor {
|
|
|
332
149
|
?.filter(ext => ext.target instanceof RegExp ? ext.target.test(key) : ext.target === key)
|
|
333
150
|
.map(ext => ext.middleware) ?? [];
|
|
334
151
|
}
|
|
335
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
336
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
152
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPCommandExecutor, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
153
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPCommandExecutor, providedIn: 'root' }); }
|
|
337
154
|
}
|
|
338
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
155
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPCommandExecutor, decorators: [{
|
|
339
156
|
type: Injectable,
|
|
340
157
|
args: [{ providedIn: 'root' }]
|
|
341
158
|
}] });
|
|
@@ -368,47 +185,14 @@ class AXPCommandService {
|
|
|
368
185
|
async execute(key, input) {
|
|
369
186
|
return this.executor.execute(key, input);
|
|
370
187
|
}
|
|
371
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
372
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
188
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPCommandService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
189
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPCommandService, providedIn: 'root' }); }
|
|
373
190
|
}
|
|
374
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
191
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPCommandService, decorators: [{
|
|
375
192
|
type: Injectable,
|
|
376
193
|
args: [{ providedIn: 'root' }]
|
|
377
194
|
}] });
|
|
378
195
|
|
|
379
|
-
const AXP_COMMAND_MIDDLEWARE_SETUP = new InjectionToken('AXP_COMMAND_MIDDLEWARE_SETUP');
|
|
380
|
-
function provideCommandMiddleware(entries) {
|
|
381
|
-
const global = [];
|
|
382
|
-
const extensions = [];
|
|
383
|
-
for (const entry of entries) {
|
|
384
|
-
if (typeof entry === 'function') {
|
|
385
|
-
global.push(entry);
|
|
386
|
-
}
|
|
387
|
-
else {
|
|
388
|
-
extensions.push(entry);
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
return makeEnvironmentProviders([
|
|
392
|
-
// Plugin middleware entries
|
|
393
|
-
...extensions.map(ext => ({
|
|
394
|
-
provide: AXP_COMMAND_EXTENSION,
|
|
395
|
-
useValue: ext,
|
|
396
|
-
multi: true
|
|
397
|
-
})),
|
|
398
|
-
// Global middleware setup (triggered via this token)
|
|
399
|
-
{
|
|
400
|
-
provide: AXP_COMMAND_MIDDLEWARE_SETUP,
|
|
401
|
-
useFactory: () => {
|
|
402
|
-
const registry = inject(AXPCommandRegistry);
|
|
403
|
-
for (const mw of global) {
|
|
404
|
-
registry.use(mw);
|
|
405
|
-
}
|
|
406
|
-
return true;
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
]);
|
|
410
|
-
}
|
|
411
|
-
|
|
412
196
|
const AXP_COMMAND_SETUP = new InjectionToken('AXP_COMMAND_SETUP');
|
|
413
197
|
function provideCommandSetups(entries) {
|
|
414
198
|
return makeEnvironmentProviders([
|
|
@@ -445,19 +229,50 @@ function provideCommand(key, loader) {
|
|
|
445
229
|
]);
|
|
446
230
|
}
|
|
447
231
|
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
232
|
+
const AXP_COMMAND_MIDDLEWARE_SETUP = new InjectionToken('AXP_COMMAND_MIDDLEWARE_SETUP');
|
|
233
|
+
function provideCommandMiddleware(entries) {
|
|
234
|
+
const global = [];
|
|
235
|
+
const extensions = [];
|
|
236
|
+
for (const entry of entries) {
|
|
237
|
+
if (typeof entry === 'function') {
|
|
238
|
+
global.push(entry);
|
|
239
|
+
}
|
|
240
|
+
else {
|
|
241
|
+
extensions.push(entry);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
return makeEnvironmentProviders([
|
|
245
|
+
// Plugin middleware entries
|
|
246
|
+
...extensions.map(ext => ({
|
|
247
|
+
provide: AXP_COMMAND_EXTENSION,
|
|
248
|
+
useValue: ext,
|
|
249
|
+
multi: true
|
|
250
|
+
})),
|
|
251
|
+
// Global middleware setup (triggered via this token)
|
|
252
|
+
{
|
|
253
|
+
provide: AXP_COMMAND_MIDDLEWARE_SETUP,
|
|
254
|
+
useFactory: () => {
|
|
255
|
+
const registry = inject(AXPCommandRegistry);
|
|
256
|
+
for (const mw of global) {
|
|
257
|
+
registry.use(mw);
|
|
258
|
+
}
|
|
259
|
+
return true;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
]);
|
|
454
263
|
}
|
|
455
|
-
//#endregion
|
|
456
264
|
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
265
|
+
function composeQueryMiddlewares(middlewares) {
|
|
266
|
+
return (handler) => {
|
|
267
|
+
let composed = handler;
|
|
268
|
+
for (let i = middlewares.length - 1; i >= 0; i--) {
|
|
269
|
+
const mw = middlewares[i];
|
|
270
|
+
const next = composed;
|
|
271
|
+
composed = (input) => mw(input, next);
|
|
272
|
+
}
|
|
273
|
+
return composed;
|
|
274
|
+
};
|
|
275
|
+
}
|
|
461
276
|
|
|
462
277
|
// queries/query.registry.ts
|
|
463
278
|
class AXPQueryRegistry {
|
|
@@ -490,10 +305,10 @@ class AXPQueryRegistry {
|
|
|
490
305
|
this.registry.clear();
|
|
491
306
|
this.middlewares.length = 0;
|
|
492
307
|
}
|
|
493
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
494
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
308
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPQueryRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
309
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPQueryRegistry, providedIn: 'root' }); }
|
|
495
310
|
}
|
|
496
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
311
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPQueryRegistry, decorators: [{
|
|
497
312
|
type: Injectable,
|
|
498
313
|
args: [{ providedIn: 'root' }]
|
|
499
314
|
}] });
|
|
@@ -501,79 +316,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
501
316
|
// plugins/query.extension.token.ts
|
|
502
317
|
const AXP_QUERY_EXTENSION = new InjectionToken('AXP_QUERY_EXTENSION');
|
|
503
318
|
|
|
504
|
-
const AXP_QUERY_MIDDLEWARE_SETUP = new InjectionToken('AXP_QUERY_MIDDLEWARE_SETUP');
|
|
505
|
-
function provideQueryMiddleware(entries) {
|
|
506
|
-
const global = [];
|
|
507
|
-
const extensions = [];
|
|
508
|
-
for (const entry of entries) {
|
|
509
|
-
if (typeof entry === 'function') {
|
|
510
|
-
global.push(entry);
|
|
511
|
-
}
|
|
512
|
-
else {
|
|
513
|
-
extensions.push(entry);
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
return makeEnvironmentProviders([
|
|
517
|
-
// Plugin middleware entries
|
|
518
|
-
...extensions.map(ext => ({
|
|
519
|
-
provide: AXP_QUERY_EXTENSION,
|
|
520
|
-
useValue: ext,
|
|
521
|
-
multi: true
|
|
522
|
-
})),
|
|
523
|
-
// Global middleware setup (triggered via this token)
|
|
524
|
-
{
|
|
525
|
-
provide: AXP_QUERY_MIDDLEWARE_SETUP,
|
|
526
|
-
useFactory: () => {
|
|
527
|
-
const registry = inject(AXPQueryRegistry);
|
|
528
|
-
for (const mw of global) {
|
|
529
|
-
registry.use(mw);
|
|
530
|
-
}
|
|
531
|
-
return true;
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
]);
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
const AXP_QUERY_SETUP = new InjectionToken('AXP_QUERY_SETUP');
|
|
538
|
-
function provideQuerySetups(entries) {
|
|
539
|
-
return makeEnvironmentProviders([
|
|
540
|
-
{
|
|
541
|
-
provide: AXP_QUERY_SETUP,
|
|
542
|
-
useFactory: () => {
|
|
543
|
-
const registry = inject(AXPQueryRegistry);
|
|
544
|
-
const injector = inject(EnvironmentInjector);
|
|
545
|
-
for (const entry of entries) {
|
|
546
|
-
registry.register(entry.key, async () => {
|
|
547
|
-
const CommandType = await entry.loader();
|
|
548
|
-
return injector.get(CommandType);
|
|
549
|
-
});
|
|
550
|
-
}
|
|
551
|
-
return true;
|
|
552
|
-
},
|
|
553
|
-
multi: true
|
|
554
|
-
}
|
|
555
|
-
]);
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
/**
|
|
559
|
-
* Build-time query metadata for AXPQuery implementations.
|
|
560
|
-
* Mirrors command metadata shape except there are no `outcomes` (queries only `fetch`).
|
|
561
|
-
* Shares {@link AXPCatalogMetadataDefinitionBase} with commands and widgets; `inputs` / `outputs` live on the base.
|
|
562
|
-
*/
|
|
563
|
-
//#endregion
|
|
564
|
-
|
|
565
|
-
function composeQueryMiddlewares(middlewares) {
|
|
566
|
-
return (handler) => {
|
|
567
|
-
let composed = handler;
|
|
568
|
-
for (let i = middlewares.length - 1; i >= 0; i--) {
|
|
569
|
-
const mw = middlewares[i];
|
|
570
|
-
const next = composed;
|
|
571
|
-
composed = (input) => mw(input, next);
|
|
572
|
-
}
|
|
573
|
-
return composed;
|
|
574
|
-
};
|
|
575
|
-
}
|
|
576
|
-
|
|
577
319
|
class AXPQueryExecutor {
|
|
578
320
|
constructor() {
|
|
579
321
|
this.injector = inject(EnvironmentInjector);
|
|
@@ -600,10 +342,10 @@ class AXPQueryExecutor {
|
|
|
600
342
|
?.filter(ext => ext.target instanceof RegExp ? ext.target.test(key) : ext.target === key)
|
|
601
343
|
.map(ext => ext.middleware) ?? [];
|
|
602
344
|
}
|
|
603
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
604
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
345
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPQueryExecutor, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
346
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPQueryExecutor, providedIn: 'root' }); }
|
|
605
347
|
}
|
|
606
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
348
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPQueryExecutor, decorators: [{
|
|
607
349
|
type: Injectable,
|
|
608
350
|
args: [{ providedIn: 'root' }]
|
|
609
351
|
}] });
|
|
@@ -636,34 +378,67 @@ class AXPQueryService {
|
|
|
636
378
|
async fetch(key, input) {
|
|
637
379
|
return this.executor.fetch(key, input);
|
|
638
380
|
}
|
|
639
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
640
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
381
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPQueryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
382
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPQueryService, providedIn: 'root' }); }
|
|
641
383
|
}
|
|
642
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
384
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPQueryService, decorators: [{
|
|
643
385
|
type: Injectable,
|
|
644
386
|
args: [{ providedIn: 'root' }]
|
|
645
387
|
}] });
|
|
646
388
|
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
389
|
+
const AXP_QUERY_SETUP = new InjectionToken('AXP_QUERY_SETUP');
|
|
390
|
+
function provideQuerySetups(entries) {
|
|
391
|
+
return makeEnvironmentProviders([
|
|
392
|
+
{
|
|
393
|
+
provide: AXP_QUERY_SETUP,
|
|
394
|
+
useFactory: () => {
|
|
395
|
+
const registry = inject(AXPQueryRegistry);
|
|
396
|
+
const injector = inject(EnvironmentInjector);
|
|
397
|
+
for (const entry of entries) {
|
|
398
|
+
registry.register(entry.key, async () => {
|
|
399
|
+
const CommandType = await entry.loader();
|
|
400
|
+
return injector.get(CommandType);
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
return true;
|
|
404
|
+
},
|
|
405
|
+
multi: true
|
|
406
|
+
}
|
|
407
|
+
]);
|
|
653
408
|
}
|
|
654
|
-
//#endregion
|
|
655
|
-
|
|
656
|
-
/**
|
|
657
|
-
* Build-time widget metadata only. Safe for tooling without loading layout widget components.
|
|
658
|
-
* Sidecars should import `defineWidget` from `@acorex/platform/runtime` (or this module for deep imports).
|
|
659
|
-
*/
|
|
660
409
|
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
410
|
+
const AXP_QUERY_MIDDLEWARE_SETUP = new InjectionToken('AXP_QUERY_MIDDLEWARE_SETUP');
|
|
411
|
+
function provideQueryMiddleware(entries) {
|
|
412
|
+
const global = [];
|
|
413
|
+
const extensions = [];
|
|
414
|
+
for (const entry of entries) {
|
|
415
|
+
if (typeof entry === 'function') {
|
|
416
|
+
global.push(entry);
|
|
417
|
+
}
|
|
418
|
+
else {
|
|
419
|
+
extensions.push(entry);
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
return makeEnvironmentProviders([
|
|
423
|
+
// Plugin middleware entries
|
|
424
|
+
...extensions.map(ext => ({
|
|
425
|
+
provide: AXP_QUERY_EXTENSION,
|
|
426
|
+
useValue: ext,
|
|
427
|
+
multi: true
|
|
428
|
+
})),
|
|
429
|
+
// Global middleware setup (triggered via this token)
|
|
430
|
+
{
|
|
431
|
+
provide: AXP_QUERY_MIDDLEWARE_SETUP,
|
|
432
|
+
useFactory: () => {
|
|
433
|
+
const registry = inject(AXPQueryRegistry);
|
|
434
|
+
for (const mw of global) {
|
|
435
|
+
registry.use(mw);
|
|
436
|
+
}
|
|
437
|
+
return true;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
]);
|
|
441
|
+
}
|
|
667
442
|
|
|
668
443
|
function composeViewMiddlewares(middlewares) {
|
|
669
444
|
return (handler) => {
|
|
@@ -707,10 +482,10 @@ class AXPViewRegistry {
|
|
|
707
482
|
this.registry.clear();
|
|
708
483
|
this.middlewares.length = 0;
|
|
709
484
|
}
|
|
710
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
711
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
485
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPViewRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
486
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPViewRegistry, providedIn: 'root' }); }
|
|
712
487
|
}
|
|
713
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
488
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPViewRegistry, decorators: [{
|
|
714
489
|
type: Injectable,
|
|
715
490
|
args: [{ providedIn: 'root' }]
|
|
716
491
|
}] });
|
|
@@ -743,10 +518,10 @@ class AXPViewExecutor {
|
|
|
743
518
|
?.filter(ext => ext.target instanceof RegExp ? ext.target.test(key) : ext.target === key)
|
|
744
519
|
.map(ext => ext.middleware) ?? [];
|
|
745
520
|
}
|
|
746
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
747
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
521
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPViewExecutor, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
522
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPViewExecutor, providedIn: 'root' }); }
|
|
748
523
|
}
|
|
749
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
524
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPViewExecutor, decorators: [{
|
|
750
525
|
type: Injectable,
|
|
751
526
|
args: [{ providedIn: 'root' }]
|
|
752
527
|
}] });
|
|
@@ -780,10 +555,10 @@ class AXPViewService {
|
|
|
780
555
|
async provide(key, input) {
|
|
781
556
|
return this.executor.provide(key, input);
|
|
782
557
|
}
|
|
783
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
784
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
558
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPViewService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
559
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPViewService, providedIn: 'root' }); }
|
|
785
560
|
}
|
|
786
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
561
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPViewService, decorators: [{
|
|
787
562
|
type: Injectable,
|
|
788
563
|
args: [{ providedIn: 'root' }]
|
|
789
564
|
}] });
|
|
@@ -899,10 +674,10 @@ class AXPPolicyEngineRegistry {
|
|
|
899
674
|
await composed(context);
|
|
900
675
|
return context;
|
|
901
676
|
}
|
|
902
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
903
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
677
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPPolicyEngineRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
678
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPPolicyEngineRegistry, providedIn: 'root' }); }
|
|
904
679
|
}
|
|
905
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
680
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPPolicyEngineRegistry, decorators: [{
|
|
906
681
|
type: Injectable,
|
|
907
682
|
args: [{ providedIn: 'root' }]
|
|
908
683
|
}] });
|
|
@@ -951,10 +726,10 @@ class AXPPolicyEngineService {
|
|
|
951
726
|
// }
|
|
952
727
|
// }
|
|
953
728
|
}
|
|
954
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
955
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
729
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPPolicyEngineService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
730
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPPolicyEngineService, providedIn: 'root' }); }
|
|
956
731
|
}
|
|
957
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
732
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPPolicyEngineService, decorators: [{
|
|
958
733
|
type: Injectable,
|
|
959
734
|
args: [{
|
|
960
735
|
providedIn: 'root'
|
|
@@ -963,7 +738,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
963
738
|
|
|
964
739
|
class AXPPolicyEngineDirective {
|
|
965
740
|
constructor() {
|
|
966
|
-
this.policy = input.required(
|
|
741
|
+
this.policy = input.required(...(ngDevMode ? [{ debugName: "policy", alias: 'axp-apply-policy' }] : [{ alias: 'axp-apply-policy' }]));
|
|
967
742
|
this.service = inject(AXPPolicyEngineService);
|
|
968
743
|
this.elementRef = inject((ElementRef));
|
|
969
744
|
this.#eff = effect(async () => {
|
|
@@ -976,13 +751,13 @@ class AXPPolicyEngineDirective {
|
|
|
976
751
|
policies: castArray(policy),
|
|
977
752
|
sender: this.elementRef.nativeElement
|
|
978
753
|
});
|
|
979
|
-
}, ...(ngDevMode ? [{ debugName: "#eff" }] :
|
|
754
|
+
}, ...(ngDevMode ? [{ debugName: "#eff" }] : []));
|
|
980
755
|
}
|
|
981
756
|
#eff;
|
|
982
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
983
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
757
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPPolicyEngineDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
758
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.19", type: AXPPolicyEngineDirective, isStandalone: true, selector: "[axp-apply-policy]", inputs: { policy: { classPropertyName: "policy", publicName: "axp-apply-policy", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 }); }
|
|
984
759
|
}
|
|
985
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
760
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPPolicyEngineDirective, decorators: [{
|
|
986
761
|
type: Directive,
|
|
987
762
|
args: [{
|
|
988
763
|
selector: '[axp-apply-policy]',
|
|
@@ -1055,11 +830,11 @@ class AXPRuntimeModule {
|
|
|
1055
830
|
console.log('[AXPRuntimeModule] Policy Engine Setup:', this._policyEngineSetup);
|
|
1056
831
|
}
|
|
1057
832
|
}
|
|
1058
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1059
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1060
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
833
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPRuntimeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
834
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.19", ngImport: i0, type: AXPRuntimeModule }); }
|
|
835
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPRuntimeModule }); }
|
|
1061
836
|
}
|
|
1062
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
837
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AXPRuntimeModule, decorators: [{
|
|
1063
838
|
type: NgModule
|
|
1064
839
|
}], ctorParameters: () => [] });
|
|
1065
840
|
|
|
@@ -1069,5 +844,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
1069
844
|
* Generated bundle index. Do not edit.
|
|
1070
845
|
*/
|
|
1071
846
|
|
|
1072
|
-
export { AXPCommandEventsService, AXPCommandExecutor, AXPCommandRegistry, AXPCommandService, AXPPolicyEngineContext, AXPPolicyEngineDirective, AXPPolicyEngineRegistry, AXPPolicyEngineService, AXPQueryExecutor, AXPQueryRegistry, AXPQueryService, AXPRuntimeModule, AXPViewExecutor, AXPViewRegistry, AXPViewService,
|
|
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 };
|
|
1073
848
|
//# sourceMappingURL=acorex-platform-runtime.mjs.map
|