@acorex/platform 20.3.0-next.1 → 20.3.0-next.3
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 +120 -5
- package/core/index.d.ts +102 -61
- package/fesm2022/acorex-platform-auth.mjs +20 -20
- package/fesm2022/acorex-platform-auth.mjs.map +1 -1
- package/fesm2022/acorex-platform-common.mjs +136 -112
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +287 -198
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-domain.mjs +16 -16
- package/fesm2022/acorex-platform-domain.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +1226 -687
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs +1525 -129
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +159 -204
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +3674 -1154
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +387 -86
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-native.mjs +7 -7
- package/fesm2022/acorex-platform-native.mjs.map +1 -1
- package/fesm2022/acorex-platform-runtime.mjs +40 -40
- package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-hHXxHlFG.mjs → acorex-platform-themes-default-entity-master-create-view.component-BXbkGGei.mjs} +6 -6
- package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-hHXxHlFG.mjs.map → acorex-platform-themes-default-entity-master-create-view.component-BXbkGGei.mjs.map} +1 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-X0hLRZhX.mjs +708 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-X0hLRZhX.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-modify-view.component-DC3MrDtI.mjs → acorex-platform-themes-default-entity-master-modify-view.component-Bp1JLsj1.mjs} +6 -13
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Bp1JLsj1.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-BExtm1JE.mjs +244 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-BExtm1JE.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-error-401.component-D4glpFvU.mjs → acorex-platform-themes-default-error-401.component-DrO1PEOH.mjs} +4 -4
- package/fesm2022/{acorex-platform-themes-default-error-401.component-D4glpFvU.mjs.map → acorex-platform-themes-default-error-401.component-DrO1PEOH.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-themes-default-error-404.component-BvGeDMjo.mjs → acorex-platform-themes-default-error-404.component-DqVq0oHX.mjs} +4 -4
- package/fesm2022/{acorex-platform-themes-default-error-404.component-BvGeDMjo.mjs.map → acorex-platform-themes-default-error-404.component-DqVq0oHX.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-themes-default-error-offline.component-BINy-Zo3.mjs → acorex-platform-themes-default-error-offline.component-Bt2PTL7_.mjs} +4 -4
- package/fesm2022/{acorex-platform-themes-default-error-offline.component-BINy-Zo3.mjs.map → acorex-platform-themes-default-error-offline.component-Bt2PTL7_.mjs.map} +1 -1
- package/fesm2022/acorex-platform-themes-default.mjs +64 -509
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-shared-icon-chooser-view.component-C833prGO.mjs → acorex-platform-themes-shared-icon-chooser-view.component-KpZWpnOJ.mjs} +4 -4
- package/fesm2022/{acorex-platform-themes-shared-icon-chooser-view.component-C833prGO.mjs.map → acorex-platform-themes-shared-icon-chooser-view.component-KpZWpnOJ.mjs.map} +1 -1
- package/fesm2022/acorex-platform-themes-shared-settings.provider-CXiRmniv.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-shared-color-chooser-column.component-DjKLg513.mjs → acorex-platform-themes-shared-theme-color-chooser-column.component-BvOiVCgt.mjs} +4 -4
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-BvOiVCgt.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-color-chooser-view.component-DE0wO98F.mjs → acorex-platform-themes-shared-theme-color-chooser-view.component-BW0rfkjk.mjs} +4 -4
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-BW0rfkjk.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared.mjs +50 -52
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/{acorex-platform-widgets-button-widget-designer.component-lNF95FJv.mjs → acorex-platform-widgets-button-widget-designer.component-C2Qn1YAW.mjs} +6 -6
- package/fesm2022/acorex-platform-widgets-button-widget-designer.component-C2Qn1YAW.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-checkbox-widget-column.component-BNBOATPB.mjs → acorex-platform-widgets-checkbox-widget-column.component-CzEFmKWG.mjs} +4 -5
- package/fesm2022/acorex-platform-widgets-checkbox-widget-column.component-CzEFmKWG.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-checkbox-widget-designer.component-BI18uzNZ.mjs → acorex-platform-widgets-checkbox-widget-designer.component-JC_nYunG.mjs} +5 -5
- package/fesm2022/acorex-platform-widgets-checkbox-widget-designer.component-JC_nYunG.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-checkbox-widget-view.component-C6-QPsnb.mjs → acorex-platform-widgets-checkbox-widget-view.component-C-4bWr9G.mjs} +4 -4
- package/fesm2022/{acorex-platform-widgets-checkbox-widget-view.component-C6-QPsnb.mjs.map → acorex-platform-widgets-checkbox-widget-view.component-C-4bWr9G.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-widgets-color-box-widget-designer.component-pYOQv5g8.mjs → acorex-platform-widgets-color-box-widget-designer.component-CxgKO2VI.mjs} +5 -5
- package/fesm2022/acorex-platform-widgets-color-box-widget-designer.component-CxgKO2VI.mjs.map +1 -0
- package/fesm2022/acorex-platform-widgets-extra-properties-schema-widget-edit.component-D9mf08rU.mjs +50 -0
- package/fesm2022/acorex-platform-widgets-extra-properties-schema-widget-edit.component-D9mf08rU.mjs.map +1 -0
- package/fesm2022/acorex-platform-widgets-extra-properties-schema-widget-view.component-D6GQ-eyr.mjs +42 -0
- package/fesm2022/acorex-platform-widgets-extra-properties-schema-widget-view.component-D6GQ-eyr.mjs.map +1 -0
- package/fesm2022/acorex-platform-widgets-extra-properties-values-widget-edit.component-DVbIdVZ6.mjs +55 -0
- package/fesm2022/acorex-platform-widgets-extra-properties-values-widget-edit.component-DVbIdVZ6.mjs.map +1 -0
- package/fesm2022/acorex-platform-widgets-extra-properties-values-widget-view.component-D-aM64Hu.mjs +50 -0
- package/fesm2022/acorex-platform-widgets-extra-properties-values-widget-view.component-D-aM64Hu.mjs.map +1 -0
- package/fesm2022/acorex-platform-widgets-extra-properties-widget-edit.component-em2-aU8E.mjs +48 -0
- package/fesm2022/acorex-platform-widgets-extra-properties-widget-edit.component-em2-aU8E.mjs.map +1 -0
- package/fesm2022/acorex-platform-widgets-extra-properties-widget-view.component-BeuIofdr.mjs +42 -0
- package/fesm2022/acorex-platform-widgets-extra-properties-widget-view.component-BeuIofdr.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-file-list-popup.component-DFbPO0ud.mjs → acorex-platform-widgets-file-list-popup.component-rW2RD35f.mjs} +71 -6
- package/fesm2022/acorex-platform-widgets-file-list-popup.component-rW2RD35f.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-page-widget-designer.component-DRsLkulH.mjs → acorex-platform-widgets-page-widget-designer.component-DNvnQ4Mc.mjs} +77 -67
- package/fesm2022/acorex-platform-widgets-page-widget-designer.component-DNvnQ4Mc.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-rich-text-popup.component-CM_v-cL4.mjs → acorex-platform-widgets-rich-text-popup.component-Cydlpsat.mjs} +4 -4
- package/fesm2022/{acorex-platform-widgets-rich-text-popup.component-CM_v-cL4.mjs.map → acorex-platform-widgets-rich-text-popup.component-Cydlpsat.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-widgets-tabular-data-edit-popup.component-nLZYiPnF.mjs → acorex-platform-widgets-tabular-data-edit-popup.component-CPVRbE8B.mjs} +8 -8
- package/fesm2022/{acorex-platform-widgets-tabular-data-edit-popup.component-nLZYiPnF.mjs.map → acorex-platform-widgets-tabular-data-edit-popup.component-CPVRbE8B.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-widgets-tabular-data-view-popup.component-D6kiasYM.mjs → acorex-platform-widgets-tabular-data-view-popup.component-Dmg5DdX8.mjs} +6 -6
- package/fesm2022/{acorex-platform-widgets-tabular-data-view-popup.component-D6kiasYM.mjs.map → acorex-platform-widgets-tabular-data-view-popup.component-Dmg5DdX8.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-widgets-text-block-widget-designer.component-CCMQtH3e.mjs → acorex-platform-widgets-text-block-widget-designer.component-yADN3Xji.mjs} +10 -14
- package/fesm2022/acorex-platform-widgets-text-block-widget-designer.component-yADN3Xji.mjs.map +1 -0
- package/fesm2022/acorex-platform-widgets.mjs +3953 -2138
- package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +28 -25
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/layout/builder/index.d.ts +361 -181
- package/layout/components/index.d.ts +372 -25
- package/layout/designer/index.d.ts +16 -47
- package/layout/entity/index.d.ts +255 -336
- package/layout/views/index.d.ts +129 -22
- package/package.json +23 -37
- package/widgets/index.d.ts +372 -230
- package/workflow/index.d.ts +4 -1
- package/fesm2022/acorex-platform-themes-default-create-entity-view.component-SY0oMDoH.mjs +0 -22
- package/fesm2022/acorex-platform-themes-default-create-entity-view.component-SY0oMDoH.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-hf4QOz_4.mjs +0 -665
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-hf4QOz_4.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-DC3MrDtI.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-Bb90PeHq.mjs +0 -236
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-Bb90PeHq.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-color-chooser-column.component-DjKLg513.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-color-chooser-view.component-DE0wO98F.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-button-widget-designer.component-lNF95FJv.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-checkbox-widget-column.component-BNBOATPB.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-checkbox-widget-designer.component-BI18uzNZ.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-color-box-widget-designer.component-pYOQv5g8.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-file-list-popup.component-DFbPO0ud.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-file-rename-popup.component-DA_CgIvm.mjs +0 -211
- package/fesm2022/acorex-platform-widgets-file-rename-popup.component-DA_CgIvm.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-page-widget-designer.component-DRsLkulH.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-text-block-widget-designer.component-CCMQtH3e.mjs.map +0 -1
package/layout/entity/index.d.ts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { InjectionToken, Injector,
|
|
2
|
+
import { InjectionToken, Injector, Type } from '@angular/core';
|
|
3
3
|
import { AXStyleColorType, AXDataSource, AXDataSourceFilterOption } from '@acorex/cdk/common';
|
|
4
4
|
import * as _acorex_platform_common from '@acorex/platform/common';
|
|
5
|
-
import { AXPEntityCommandScope, AXPEntity, AXPEntityAction, AXPEntityProperty, AXPEntityTableColumn, AXPRelatedEntity, AXPEntitySectionView, AXPGridLayoutOptions, AXPEntityPropertyCreateView, AXPEntityPropertyLayoutConfig, AXPQueryView, AXPEntityPropertyView, AXPCategoryEntity, AXPEntityPropertyGroup, AXPEntityMasterCreateLayoutView, AXPEntityMasterUpdateLayoutView, AXPEntityMasterSingleLayoutView, AXPEntityDetailListView, AXPQueryFilter } from '@acorex/platform/common';
|
|
5
|
+
import { AXPEntityCommandScope, AXPEntity, AXPEntityAction, AXPEntityProperty, AXPEntityTableColumn, AXPRelatedEntity, AXPEntitySectionView, AXPGridLayoutOptions, AXPEntityPropertyCreateView, AXPEntityPropertyLayoutConfig, AXPQueryView, AXPEntityPropertyView, AXPCategoryEntity, AXPEntityPropertyGroup, AXPEntityMasterCreateLayoutView, AXPEntityMasterUpdateLayoutView, AXPEntityMasterSingleLayoutView, AXPEntityMasterListView, AXPEntityDetailListView, AXPQueryFilter } from '@acorex/platform/common';
|
|
6
6
|
import { AXPMetaData, AXPBreadcrumbItem, AXPFilterQuery, AXPFilterDefinition, AXPExecuteCommand, AXPQueryRequest, AXPPagedListResult, AXPAppStartUpService } from '@acorex/platform/core';
|
|
7
7
|
import * as i3 from '@acorex/platform/layout/builder';
|
|
8
8
|
import { AXPWidgetColumnNode, AXPWidgetNode, AXPLayoutBuilderService } from '@acorex/platform/layout/builder';
|
|
9
9
|
import * as i1 from '@angular/router';
|
|
10
10
|
import { ResolveFn } from '@angular/router';
|
|
11
|
+
import * as rxjs from 'rxjs';
|
|
11
12
|
import { Subject } from 'rxjs';
|
|
12
|
-
import * as _acorex_platform_layout_entity from '@acorex/platform/layout/entity';
|
|
13
13
|
import * as i2 from '@acorex/platform/workflow';
|
|
14
14
|
import { AXPWorkflowAction, AXPWorkflowContext, AXPWorkflow } from '@acorex/platform/workflow';
|
|
15
|
+
import { AXPCommand, AXPQuery } from '@acorex/platform/runtime';
|
|
15
16
|
|
|
16
17
|
interface AXPDataSeeder {
|
|
17
18
|
seed(): Promise<void>;
|
|
@@ -41,8 +42,8 @@ declare class AXPEntityCommandTriggerViewModel {
|
|
|
41
42
|
constructor(entity: AXPEntity, action: AXPEntityAction);
|
|
42
43
|
}
|
|
43
44
|
declare class AXPEntityListViewColumnViewModel {
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
readonly property: AXPEntityProperty;
|
|
46
|
+
readonly column: AXPEntityTableColumn;
|
|
46
47
|
constructor(property: AXPEntityProperty, column: AXPEntityTableColumn);
|
|
47
48
|
name: string;
|
|
48
49
|
title: string;
|
|
@@ -185,9 +186,12 @@ declare class AXPEntityMasterListViewModel {
|
|
|
185
186
|
private readonly settings;
|
|
186
187
|
private readonly widgetResolver;
|
|
187
188
|
private readonly expressionEvaluator;
|
|
189
|
+
private readonly commandService;
|
|
188
190
|
private readonly filterOperatorMiddleware;
|
|
189
191
|
private settingEntityKey;
|
|
190
192
|
private readonly destroyed;
|
|
193
|
+
private lastAppliedSortKey;
|
|
194
|
+
private lastAppliedFilterKey;
|
|
191
195
|
events$: Subject<{
|
|
192
196
|
action: string;
|
|
193
197
|
meta?: any;
|
|
@@ -198,7 +202,7 @@ declare class AXPEntityMasterListViewModel {
|
|
|
198
202
|
dataSource: AXDataSource<unknown>;
|
|
199
203
|
constructor(injector: Injector, config: AXPEntity);
|
|
200
204
|
applySettings(): Promise<void>;
|
|
201
|
-
saveSettings(changesType: 'columnSizes' | 'columnOrders' | 'view' | 'pageSize', data?: any): Promise<void>;
|
|
205
|
+
saveSettings(changesType: 'columnSizes' | 'columnOrders' | 'view' | 'pageSize' | 'filters' | 'sorts', data?: any): Promise<void>;
|
|
202
206
|
selectedItems: _angular_core.WritableSignal<any[]>;
|
|
203
207
|
parentKey: _angular_core.Signal<string | undefined>;
|
|
204
208
|
hasSelectedItems: _angular_core.Signal<boolean>;
|
|
@@ -260,7 +264,6 @@ declare class AXPEntityMasterSingleViewGroupViewModel {
|
|
|
260
264
|
group: _acorex_platform_common.AXPEntityPropertyGroup;
|
|
261
265
|
name: _angular_core.WritableSignal<string>;
|
|
262
266
|
isLoading: _angular_core.WritableSignal<boolean>;
|
|
263
|
-
type: _angular_core.WritableSignal<"wrapper" | "section">;
|
|
264
267
|
title: _angular_core.Signal<string>;
|
|
265
268
|
description: _angular_core.Signal<string | null | undefined>;
|
|
266
269
|
layout: _angular_core.Signal<AXPGridLayoutOptions>;
|
|
@@ -291,10 +294,14 @@ declare class AXPEntityMasterSingleViewModel {
|
|
|
291
294
|
private readonly session;
|
|
292
295
|
private readonly formatService;
|
|
293
296
|
private readonly workflow;
|
|
297
|
+
private readonly commandService;
|
|
294
298
|
private readonly destroyed;
|
|
295
299
|
private translateService;
|
|
296
300
|
private entityService;
|
|
297
301
|
private expressionEvaluator;
|
|
302
|
+
private entityDefinitionRegistryService;
|
|
303
|
+
private _updateTrigger;
|
|
304
|
+
readonly updateTrigger: _angular_core.Signal<number>;
|
|
298
305
|
constructor(injector: Injector, config: AXPEntity, entityData: any);
|
|
299
306
|
context: _angular_core.WritableSignal<any>;
|
|
300
307
|
private actions;
|
|
@@ -342,7 +349,6 @@ declare class AXPEntityMasterUpdateViewModel {
|
|
|
342
349
|
private props;
|
|
343
350
|
private entityDef;
|
|
344
351
|
private workflow;
|
|
345
|
-
private lockService;
|
|
346
352
|
private sessionService;
|
|
347
353
|
private get moduleName();
|
|
348
354
|
private get entityName();
|
|
@@ -354,7 +360,6 @@ declare class AXPEntityMasterUpdateViewModel {
|
|
|
354
360
|
elements: _angular_core.Signal<AXPEntityMasterUpdateElementViewModel[]>;
|
|
355
361
|
save(): Promise<any>;
|
|
356
362
|
reset(): void;
|
|
357
|
-
unlock(): Promise<void>;
|
|
358
363
|
}
|
|
359
364
|
declare class AXPEntityMasterUpdateViewModelFactory {
|
|
360
365
|
private entityService;
|
|
@@ -453,6 +458,10 @@ interface AXPEntityModifierContext {
|
|
|
453
458
|
get(): AXPEntityMasterSingleLayoutView | undefined;
|
|
454
459
|
update(updater: (c: AXPEntityMasterSingleLayoutView | undefined) => AXPEntityMasterSingleLayoutView): AXPEntityModifierContext;
|
|
455
460
|
};
|
|
461
|
+
list: {
|
|
462
|
+
get(): AXPEntityMasterListView | undefined;
|
|
463
|
+
update(updater: (c: AXPEntityMasterListView | undefined) => AXPEntityMasterListView): AXPEntityModifierContext;
|
|
464
|
+
};
|
|
456
465
|
};
|
|
457
466
|
detail: {
|
|
458
467
|
get(): NonNullable<AXPEntity['interfaces']>['detail'] | undefined;
|
|
@@ -467,16 +476,31 @@ interface AXPEntityModifierContext {
|
|
|
467
476
|
}
|
|
468
477
|
type AXPEntityModifier = (context: AXPEntityModifierContext) => void;
|
|
469
478
|
interface AXPEntityModifierProvider {
|
|
470
|
-
entityName: string;
|
|
479
|
+
entityName: string | RegExp;
|
|
471
480
|
modifier: AXPEntityModifier;
|
|
472
481
|
}
|
|
473
482
|
|
|
483
|
+
declare function ensureListActions(ctx: AXPEntityModifierContext): void;
|
|
484
|
+
declare function actionExists(actions: any[] | undefined, commandName: string, name?: string): boolean;
|
|
485
|
+
|
|
486
|
+
interface AXPEntityActionPlugin {
|
|
487
|
+
name: string;
|
|
488
|
+
order?: number;
|
|
489
|
+
apply: (ctx: AXPEntityModifierContext, options?: any) => Promise<void> | void;
|
|
490
|
+
}
|
|
491
|
+
declare const AXP_ENTITY_ACTION_PLUGIN: InjectionToken<AXPEntityActionPlugin[]>;
|
|
492
|
+
|
|
474
493
|
declare class AXPEntityMiddleware {
|
|
475
|
-
private
|
|
476
|
-
|
|
494
|
+
private exactModifiers;
|
|
495
|
+
private patternModifiers;
|
|
496
|
+
protected providedModifiers: AXPEntityModifierProvider[];
|
|
497
|
+
protected providedActionPlugins: AXPEntityActionPlugin[];
|
|
498
|
+
protected injector: Injector;
|
|
477
499
|
constructor();
|
|
478
|
-
register(entityName: string, modifier: AXPEntityModifier): void;
|
|
479
|
-
process(entity: AXPEntity): AXPEntity
|
|
500
|
+
register(entityName: string | RegExp, modifier: AXPEntityModifier): void;
|
|
501
|
+
process(entity: AXPEntity): Promise<AXPEntity>;
|
|
502
|
+
private wildcardToRegExp;
|
|
503
|
+
private normalizeRegExp;
|
|
480
504
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPEntityMiddleware, never>;
|
|
481
505
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXPEntityMiddleware>;
|
|
482
506
|
}
|
|
@@ -485,56 +509,6 @@ declare function createModifierContext(entity: AXPEntity): AXPEntityModifierCont
|
|
|
485
509
|
|
|
486
510
|
declare const AXP_ENTITY_MODIFIER: InjectionToken<AXPEntityModifierProvider[]>;
|
|
487
511
|
|
|
488
|
-
interface AXPEntityPreloadEntity {
|
|
489
|
-
module: string;
|
|
490
|
-
entity: string;
|
|
491
|
-
}
|
|
492
|
-
interface AXPEntityDefinitionPreloader {
|
|
493
|
-
preload(): AXPEntityPreloadEntity[];
|
|
494
|
-
}
|
|
495
|
-
declare class AXPEntityDefinitionRegistryService {
|
|
496
|
-
private providers;
|
|
497
|
-
private resolver;
|
|
498
|
-
private middleware;
|
|
499
|
-
preload(): Promise<void>;
|
|
500
|
-
private entities;
|
|
501
|
-
private entityResolver;
|
|
502
|
-
/**
|
|
503
|
-
* Registers a new entity configuration. Entities are identified uniquely by a combination
|
|
504
|
-
* of their module and name.
|
|
505
|
-
*
|
|
506
|
-
* @param config The configuration object of the entity to be registered.
|
|
507
|
-
*/
|
|
508
|
-
register(config: AXPEntity): void;
|
|
509
|
-
/**
|
|
510
|
-
* Returns an array of all registered entity configurations.
|
|
511
|
-
*
|
|
512
|
-
* @returns An array of AXPEntity objects.
|
|
513
|
-
*/
|
|
514
|
-
getAll(): AXPEntity[];
|
|
515
|
-
/**
|
|
516
|
-
* Resolves an entity configuration based on module and entity name. If the configuration
|
|
517
|
-
* is not already registered, attempts to load it dynamically. Throws an error if the
|
|
518
|
-
* entity cannot be found or loaded.
|
|
519
|
-
*
|
|
520
|
-
* @param moduleName The module name of the entity.
|
|
521
|
-
* @param entityName The name of the entity.
|
|
522
|
-
* @returns A promise resolving to the entity configuration.
|
|
523
|
-
* @throws Error if the entity configuration cannot be resolved.
|
|
524
|
-
*/
|
|
525
|
-
resolve(moduleName: string, entityName: string): Promise<AXPEntity>;
|
|
526
|
-
/**
|
|
527
|
-
* Creates a unique key for an entity based on its module and name.
|
|
528
|
-
*
|
|
529
|
-
* @param moduleName The module name of the entity.
|
|
530
|
-
* @param entityName The name of the entity.
|
|
531
|
-
* @returns The unique key for the entity.
|
|
532
|
-
*/
|
|
533
|
-
private createEntityKey;
|
|
534
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPEntityDefinitionRegistryService, never>;
|
|
535
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXPEntityDefinitionRegistryService>;
|
|
536
|
-
}
|
|
537
|
-
|
|
538
512
|
interface AXPAuditable {
|
|
539
513
|
createdAt?: Date;
|
|
540
514
|
updatedAt?: Date;
|
|
@@ -557,6 +531,31 @@ interface AXPEntityDetailDto<Id> extends AXPEntityOutputDto<Id> {
|
|
|
557
531
|
interface AXPEntityListItemDto<Id> extends AXPEntityOutputDto<Id> {
|
|
558
532
|
}
|
|
559
533
|
|
|
534
|
+
type AXPEntityOp = 'initial' | 'create' | 'update' | 'delete' | 'getOne' | 'getAll' | 'query';
|
|
535
|
+
interface AXPEntityStorageContext<TKey = any, TDetailDto extends AXPEntityDetailDto<TKey> = any, TListItemDto extends AXPEntityListItemDto<TKey> = any, TCreateDto extends AXPEntityCreateDto = any, TUpdateDto extends AXPEntityUpdateDto<TKey> = any> {
|
|
536
|
+
op: AXPEntityOp;
|
|
537
|
+
entityName: string;
|
|
538
|
+
id?: TKey;
|
|
539
|
+
data?: TCreateDto | Omit<Partial<TUpdateDto>, 'id'>;
|
|
540
|
+
request?: AXPQueryRequest;
|
|
541
|
+
previous?: TDetailDto;
|
|
542
|
+
result?: any;
|
|
543
|
+
locals: Map<string, unknown>;
|
|
544
|
+
backend: {
|
|
545
|
+
getOneRaw: (entityName: string, id: TKey) => Promise<TDetailDto>;
|
|
546
|
+
insertOneRaw: (entityName: string, entity: TCreateDto) => Promise<TKey>;
|
|
547
|
+
};
|
|
548
|
+
}
|
|
549
|
+
interface AXPEntityStorageMiddleware<TKey = any, TDetailDto extends AXPEntityDetailDto<TKey> = any, TListItemDto extends AXPEntityListItemDto<TKey> = any, TCreateDto extends AXPEntityCreateDto = any, TUpdateDto extends AXPEntityUpdateDto<TKey> = any> {
|
|
550
|
+
target?: {
|
|
551
|
+
ops?: AXPEntityOp[];
|
|
552
|
+
entity?: string | RegExp;
|
|
553
|
+
predicate?: (ctx: AXPEntityStorageContext<TKey, TDetailDto, TListItemDto, TCreateDto, TUpdateDto>) => boolean;
|
|
554
|
+
order?: number;
|
|
555
|
+
};
|
|
556
|
+
execute: (ctx: AXPEntityStorageContext<TKey, TDetailDto, TListItemDto, TCreateDto, TUpdateDto>, next: () => Promise<void>) => Promise<void>;
|
|
557
|
+
}
|
|
558
|
+
|
|
560
559
|
declare abstract class AXPEntityStorageService<TKey, TDetailDto extends AXPEntityDetailDto<TKey> = AXPEntityModel<TKey>, TListItemDto extends AXPEntityListItemDto<TKey> = TDetailDto, TCreateDto extends AXPEntityCreateDto = TDetailDto, TUpdateDto extends AXPEntityUpdateDto<TKey> = TDetailDto> {
|
|
561
560
|
abstract get dbName(): string;
|
|
562
561
|
abstract initial(entityName: string, collection: TCreateDto[], options?: {
|
|
@@ -623,295 +622,115 @@ declare class AXMEntityCrudServiceImpl<TKey, TDetailDto extends AXPEntityDetailD
|
|
|
623
622
|
get storageService(): AXPEntityStorageService<any, any, any, any, any>;
|
|
624
623
|
}
|
|
625
624
|
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
*/
|
|
629
|
-
interface AXPEntityStorageContext<TKey = any, TDetailDto extends AXPEntityDetailDto<TKey> = any, TListItemDto extends AXPEntityListItemDto<TKey> = any, TCreateDto extends AXPEntityCreateDto = any, TUpdateDto extends AXPEntityUpdateDto<TKey> = any> {
|
|
630
|
-
/** Operation type being performed */
|
|
631
|
-
operation: 'getOne' | 'getAll' | 'insertOne' | 'updateOne' | 'deleteOne' | 'query' | 'initial';
|
|
632
|
-
/** Entity name */
|
|
633
|
-
entityName: string;
|
|
634
|
-
/** Database name */
|
|
635
|
-
dbName: string;
|
|
636
|
-
/** Input parameters for the operation */
|
|
637
|
-
input: {
|
|
638
|
-
id?: TKey;
|
|
639
|
-
entity?: TCreateDto;
|
|
640
|
-
keyValues?: Omit<Partial<TUpdateDto>, 'id'>;
|
|
641
|
-
request?: AXPQueryRequest;
|
|
642
|
-
collection?: TCreateDto[];
|
|
643
|
-
options?: {
|
|
644
|
-
mergeType?: 'merge' | 'replace';
|
|
645
|
-
uniqueKeys?: string[];
|
|
646
|
-
};
|
|
647
|
-
};
|
|
648
|
-
/** Metadata for the operation */
|
|
649
|
-
metadata: {
|
|
650
|
-
startTime: number;
|
|
651
|
-
requestId: string;
|
|
652
|
-
user?: any;
|
|
653
|
-
[key: string]: any;
|
|
654
|
-
};
|
|
655
|
-
}
|
|
656
|
-
/**
|
|
657
|
-
* Entity Storage Middleware function type
|
|
658
|
-
*/
|
|
659
|
-
type AXPEntityStorageMiddleware<TKey = any, TDetailDto extends AXPEntityDetailDto<TKey> = any, TListItemDto extends AXPEntityListItemDto<TKey> = any, TCreateDto extends AXPEntityCreateDto = any, TUpdateDto extends AXPEntityUpdateDto<TKey> = any, TResult = any> = (context: AXPEntityStorageContext<TKey, TDetailDto, TListItemDto, TCreateDto, TUpdateDto>, next: (context: AXPEntityStorageContext<TKey, TDetailDto, TListItemDto, TCreateDto, TUpdateDto>) => Promise<TResult>) => Promise<TResult>;
|
|
660
|
-
/**
|
|
661
|
-
* Compose entity storage middlewares into a pipeline
|
|
662
|
-
*/
|
|
663
|
-
declare function composeEntityStorageMiddlewares<TKey = any, TDetailDto extends AXPEntityDetailDto<TKey> = any, TListItemDto extends AXPEntityListItemDto<TKey> = any, TCreateDto extends AXPEntityCreateDto = any, TUpdateDto extends AXPEntityUpdateDto<TKey> = any, TResult = any>(middlewares: AXPEntityStorageMiddleware<TKey, TDetailDto, TListItemDto, TCreateDto, TUpdateDto, TResult>[]): (handler: (context: AXPEntityStorageContext<TKey, TDetailDto, TListItemDto, TCreateDto, TUpdateDto>) => Promise<TResult>) => (context: AXPEntityStorageContext<TKey, TDetailDto, TListItemDto, TCreateDto, TUpdateDto>) => Promise<TResult>;
|
|
664
|
-
/**
|
|
665
|
-
* Helper function to generate unique request ID
|
|
666
|
-
*/
|
|
667
|
-
declare function generateRequestId(): string;
|
|
668
|
-
|
|
669
|
-
/**
|
|
670
|
-
* Registry for managing entity storage middlewares
|
|
671
|
-
*/
|
|
672
|
-
declare class AXPEntityStorageRegistry {
|
|
673
|
-
private globalMiddlewares;
|
|
674
|
-
private entitySpecificMiddlewares;
|
|
675
|
-
private operationSpecificMiddlewares;
|
|
676
|
-
/**
|
|
677
|
-
* Add a global middleware that applies to all operations
|
|
678
|
-
*/
|
|
679
|
-
useGlobal(middleware: AXPEntityStorageMiddleware): void;
|
|
680
|
-
/**
|
|
681
|
-
* Add middleware for specific entity
|
|
682
|
-
*/
|
|
683
|
-
useForEntity(entityName: string, middleware: AXPEntityStorageMiddleware): void;
|
|
684
|
-
/**
|
|
685
|
-
* Add middleware for specific operation (getOne, insertOne, etc.)
|
|
686
|
-
*/
|
|
687
|
-
useForOperation(operation: string, middleware: AXPEntityStorageMiddleware): void;
|
|
688
|
-
/**
|
|
689
|
-
* Get all applicable middlewares for a given context
|
|
690
|
-
*/
|
|
691
|
-
getMiddlewares(entityName: string, operation: string): AXPEntityStorageMiddleware[];
|
|
692
|
-
/**
|
|
693
|
-
* Get all global middlewares
|
|
694
|
-
*/
|
|
695
|
-
getGlobalMiddlewares(): readonly AXPEntityStorageMiddleware[];
|
|
696
|
-
/**
|
|
697
|
-
* Remove middleware from global middlewares
|
|
698
|
-
*/
|
|
699
|
-
removeGlobalMiddleware(middleware: AXPEntityStorageMiddleware): boolean;
|
|
700
|
-
/**
|
|
701
|
-
* Clear all middlewares
|
|
702
|
-
*/
|
|
703
|
-
clear(): void;
|
|
704
|
-
/**
|
|
705
|
-
* Get registered entity names that have specific middlewares
|
|
706
|
-
*/
|
|
707
|
-
getRegisteredEntityNames(): string[];
|
|
708
|
-
/**
|
|
709
|
-
* Get registered operation names that have specific middlewares
|
|
710
|
-
*/
|
|
711
|
-
getRegisteredOperations(): string[];
|
|
712
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPEntityStorageRegistry, never>;
|
|
713
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXPEntityStorageRegistry>;
|
|
714
|
-
}
|
|
625
|
+
declare const AXP_ENTITY_STORAGE_BACKEND: InjectionToken<AXPEntityStorageService<any, any, any, any, any>>;
|
|
626
|
+
declare const AXP_ENTITY_STORAGE_MIDDLEWARE: InjectionToken<AXPEntityStorageMiddleware<any, any, any, any, any>[]>;
|
|
715
627
|
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
declare class AXPEntityStorageExecutor<TKey = any, TDetailDto extends AXPEntityDetailDto<TKey> = any, TListItemDto extends AXPEntityListItemDto<TKey> = any, TCreateDto extends AXPEntityCreateDto = any, TUpdateDto extends AXPEntityUpdateDto<TKey> = any> {
|
|
720
|
-
private storageService;
|
|
628
|
+
declare class AXPMiddlewareEntityStorageService<TKey = any, TDetailDto extends AXPEntityDetailDto<TKey> = any, TListItemDto extends AXPEntityListItemDto<TKey> = any, TCreateDto extends AXPEntityCreateDto = any, TUpdateDto extends AXPEntityUpdateDto<TKey> = any> extends AXPEntityStorageService<TKey, TDetailDto, TListItemDto, TCreateDto, TUpdateDto> {
|
|
629
|
+
private readonly backend;
|
|
630
|
+
private readonly allMiddlewares;
|
|
721
631
|
private readonly injector;
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
632
|
+
get dbName(): string;
|
|
633
|
+
private filterMiddlewares;
|
|
634
|
+
private compose;
|
|
635
|
+
private run;
|
|
636
|
+
private createCtx;
|
|
637
|
+
initial(entityName: string, collection: TCreateDto[], options?: {
|
|
638
|
+
mergeType?: 'merge' | 'replace';
|
|
639
|
+
uniqueKeys?: string[];
|
|
640
|
+
}): Promise<TCreateDto[]>;
|
|
727
641
|
getOne(entityName: string, id: TKey): Promise<TDetailDto>;
|
|
728
|
-
/**
|
|
729
|
-
* Execute getAll operation with middleware pipeline
|
|
730
|
-
*/
|
|
731
|
-
getAll(entityName: string): Promise<TListItemDto[]>;
|
|
732
|
-
/**
|
|
733
|
-
* Execute insertOne operation with middleware pipeline
|
|
734
|
-
*/
|
|
735
|
-
insertOne(entityName: string, entity: TCreateDto): Promise<TKey>;
|
|
736
|
-
/**
|
|
737
|
-
* Execute updateOne operation with middleware pipeline
|
|
738
|
-
*/
|
|
739
642
|
updateOne(entityName: string, id: TKey, keyValues: Omit<Partial<TUpdateDto>, 'id'>): Promise<TDetailDto>;
|
|
740
|
-
/**
|
|
741
|
-
* Execute deleteOne operation with middleware pipeline
|
|
742
|
-
*/
|
|
743
643
|
deleteOne(entityName: string, id: TKey): Promise<void>;
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
*/
|
|
644
|
+
insertOne(entityName: string, entity: TCreateDto): Promise<TKey>;
|
|
645
|
+
getAll(entityName: string): Promise<TListItemDto[]>;
|
|
747
646
|
query(entityName: string, request: AXPQueryRequest): Promise<AXPPagedListResult<TListItemDto>>;
|
|
647
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPMiddlewareEntityStorageService<any, any, any, any, any>, never>;
|
|
648
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXPMiddlewareEntityStorageService<any, any, any, any, any>>;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
interface AXPEntityPreloadEntity {
|
|
652
|
+
module: string;
|
|
653
|
+
entity: string;
|
|
654
|
+
}
|
|
655
|
+
interface AXPEntityDefinitionPreloader {
|
|
656
|
+
preload(): AXPEntityPreloadEntity[];
|
|
657
|
+
}
|
|
658
|
+
declare class AXPEntityDefinitionRegistryService {
|
|
659
|
+
private providers;
|
|
660
|
+
private resolver;
|
|
661
|
+
private middleware;
|
|
662
|
+
private onChanged;
|
|
663
|
+
get onChanged$(): rxjs.Observable<{
|
|
664
|
+
name: string;
|
|
665
|
+
}>;
|
|
666
|
+
preload(): Promise<void>;
|
|
667
|
+
private entities;
|
|
668
|
+
private entityResolver;
|
|
748
669
|
/**
|
|
749
|
-
*
|
|
670
|
+
* Force re-load and re-process entity definitions, then re-register them.
|
|
671
|
+
* Overloads:
|
|
672
|
+
* - refresh(): refresh all registered entities
|
|
673
|
+
* - refresh(fullName: string): refresh by fully-qualified name `<module>.<entity>`
|
|
674
|
+
* - refresh(moduleName: string, entityName: string): refresh by parts
|
|
750
675
|
*/
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
676
|
+
refresh(): Promise<void>;
|
|
677
|
+
refresh(fullName: string): Promise<void>;
|
|
678
|
+
refresh(moduleName: string, entityName: string): Promise<void>;
|
|
679
|
+
/** Executes the actual refresh for a single entity */
|
|
680
|
+
private refreshOne;
|
|
755
681
|
/**
|
|
756
|
-
*
|
|
682
|
+
* Registers a new entity configuration. Entities are identified uniquely by a combination
|
|
683
|
+
* of their module and name.
|
|
684
|
+
*
|
|
685
|
+
* @param config The configuration object of the entity to be registered.
|
|
757
686
|
*/
|
|
758
|
-
|
|
759
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPEntityStorageExecutor<any, any, any, any, any>, never>;
|
|
760
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXPEntityStorageExecutor<any, any, any, any, any>>;
|
|
761
|
-
}
|
|
762
|
-
|
|
763
|
-
/**
|
|
764
|
-
* Entity Storage Service with middleware support
|
|
765
|
-
*
|
|
766
|
-
* This service wraps the original AXPEntityStorageService and adds middleware pipeline support.
|
|
767
|
-
* It delegates all operations to the middleware executor which applies the middleware chain.
|
|
768
|
-
*/
|
|
769
|
-
declare class AXPEntityStorageWithMiddlewareService<TKey = any, TDetailDto extends AXPEntityDetailDto<TKey> = any, TListItemDto extends AXPEntityListItemDto<TKey> = any, TCreateDto extends AXPEntityCreateDto = any, TUpdateDto extends AXPEntityUpdateDto<TKey> = any> extends AXPEntityStorageService<TKey, TDetailDto, TListItemDto, TCreateDto, TUpdateDto> {
|
|
770
|
-
private originalStorageService;
|
|
771
|
-
private registry;
|
|
772
|
-
private executor;
|
|
773
|
-
constructor(originalStorageService: AXPEntityStorageService<TKey, TDetailDto, TListItemDto, TCreateDto, TUpdateDto>, registry: AXPEntityStorageRegistry);
|
|
774
|
-
get dbName(): string;
|
|
687
|
+
register(config: AXPEntity): void;
|
|
775
688
|
/**
|
|
776
|
-
*
|
|
689
|
+
* Returns an array of all registered entity configurations.
|
|
690
|
+
*
|
|
691
|
+
* @returns An array of AXPEntity objects.
|
|
777
692
|
*/
|
|
778
|
-
|
|
693
|
+
getAll(): AXPEntity[];
|
|
779
694
|
/**
|
|
780
|
-
*
|
|
695
|
+
* Resolves an entity configuration based on module and entity name. If the configuration
|
|
696
|
+
* is not already registered, attempts to load it dynamically. Throws an error if the
|
|
697
|
+
* entity cannot be found or loaded.
|
|
698
|
+
*
|
|
699
|
+
* @param moduleName The module name of the entity.
|
|
700
|
+
* @param entityName The name of the entity.
|
|
701
|
+
* @returns A promise resolving to the entity configuration.
|
|
702
|
+
* @throws Error if the entity configuration cannot be resolved.
|
|
781
703
|
*/
|
|
782
|
-
|
|
704
|
+
resolve(moduleName: string, entityName: string): Promise<AXPEntity>;
|
|
783
705
|
/**
|
|
784
|
-
*
|
|
706
|
+
* Creates a unique key for an entity based on its module and name.
|
|
707
|
+
*
|
|
708
|
+
* @param moduleName The module name of the entity.
|
|
709
|
+
* @param entityName The name of the entity.
|
|
710
|
+
* @returns The unique key for the entity.
|
|
785
711
|
*/
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
uniqueKeys?: string[];
|
|
790
|
-
}): Promise<TCreateDto[]>;
|
|
791
|
-
getOne(entityName: string, id: TKey): Promise<TDetailDto>;
|
|
792
|
-
updateOne(entityName: string, id: TKey, keyValues: Omit<Partial<TUpdateDto>, 'id'>): Promise<TDetailDto>;
|
|
793
|
-
deleteOne(entityName: string, id: TKey): Promise<void>;
|
|
794
|
-
insertOne(entityName: string, entity: TCreateDto): Promise<TKey>;
|
|
795
|
-
getAll(entityName: string): Promise<TListItemDto[]>;
|
|
796
|
-
query(entityName: string, request: AXPQueryRequest): Promise<AXPPagedListResult<TListItemDto>>;
|
|
797
|
-
get originalService(): AXPEntityStorageService<TKey, TDetailDto, TListItemDto, TCreateDto, TUpdateDto>;
|
|
798
|
-
get middlewareRegistry(): AXPEntityStorageRegistry;
|
|
799
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPEntityStorageWithMiddlewareService<any, any, any, any, any>, never>;
|
|
800
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXPEntityStorageWithMiddlewareService<any, any, any, any, any>>;
|
|
712
|
+
private createEntityKey;
|
|
713
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPEntityDefinitionRegistryService, never>;
|
|
714
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXPEntityDefinitionRegistryService>;
|
|
801
715
|
}
|
|
802
716
|
|
|
803
717
|
/**
|
|
804
|
-
*
|
|
718
|
+
* Entity Event Dispatcher - A wrapper for entity-specific events
|
|
719
|
+
* Handles pattern-based dispatching for entity operations with wildcard support
|
|
805
720
|
*/
|
|
806
|
-
declare
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
/** Global middlewares that apply to all operations */
|
|
819
|
-
global?: AXPEntityStorageMiddleware[];
|
|
820
|
-
/** Entity-specific middlewares */
|
|
821
|
-
entities?: {
|
|
822
|
-
[entityName: string]: AXPEntityStorageMiddleware[];
|
|
823
|
-
};
|
|
824
|
-
/** Operation-specific middlewares */
|
|
825
|
-
operations?: {
|
|
826
|
-
[operation: string]: AXPEntityStorageMiddleware[];
|
|
827
|
-
};
|
|
828
|
-
/** Advanced middleware configurations with targets */
|
|
829
|
-
extensions?: {
|
|
830
|
-
target: string | RegExp;
|
|
831
|
-
middleware: AXPEntityStorageMiddleware;
|
|
832
|
-
}[];
|
|
721
|
+
declare class AXPEntityEventDispatcherService {
|
|
722
|
+
private readonly eventService;
|
|
723
|
+
dispatchEntityEvent(operation: 'inserted' | 'updated' | 'deleted', entityName: string, data: any): Promise<void>;
|
|
724
|
+
private getAllMatchingEventKeys;
|
|
725
|
+
private findMatchingWildcardKeys;
|
|
726
|
+
private matchesEntityPattern;
|
|
727
|
+
private generateEventKeys;
|
|
728
|
+
dispatchInserted(entityName: string, data: any): Promise<void>;
|
|
729
|
+
dispatchUpdated(entityName: string, data: any): Promise<void>;
|
|
730
|
+
dispatchDeleted(entityName: string, data: any): Promise<void>;
|
|
731
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPEntityEventDispatcherService, never>;
|
|
732
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXPEntityEventDispatcherService>;
|
|
833
733
|
}
|
|
834
|
-
/**
|
|
835
|
-
* Provide entity storage middleware configuration
|
|
836
|
-
*/
|
|
837
|
-
declare function provideEntityStorageMiddleware(config: AXPEntityStorageMiddlewareConfig): EnvironmentProviders;
|
|
838
|
-
/**
|
|
839
|
-
* Simplified provider for global middleware only
|
|
840
|
-
*/
|
|
841
|
-
declare function provideGlobalEntityStorageMiddleware(middlewares: AXPEntityStorageMiddleware[]): EnvironmentProviders;
|
|
842
|
-
/**
|
|
843
|
-
* Provider for entity-specific middlewares
|
|
844
|
-
*/
|
|
845
|
-
declare function provideEntitySpecificMiddleware(entityName: string, middlewares: AXPEntityStorageMiddleware[]): EnvironmentProviders;
|
|
846
|
-
/**
|
|
847
|
-
* Provider for operation-specific middlewares
|
|
848
|
-
*/
|
|
849
|
-
declare function provideOperationSpecificMiddleware(operation: string, middlewares: AXPEntityStorageMiddleware[]): EnvironmentProviders;
|
|
850
|
-
|
|
851
|
-
/**
|
|
852
|
-
* Logging middleware for entity storage operations
|
|
853
|
-
*/
|
|
854
|
-
declare const loggingMiddleware: AXPEntityStorageMiddleware;
|
|
855
|
-
/**
|
|
856
|
-
* Performance monitoring middleware
|
|
857
|
-
*/
|
|
858
|
-
declare const performanceMiddleware: AXPEntityStorageMiddleware;
|
|
859
|
-
/**
|
|
860
|
-
* Error handling middleware with retry logic
|
|
861
|
-
*/
|
|
862
|
-
declare const errorHandlingMiddleware: AXPEntityStorageMiddleware;
|
|
863
|
-
/**
|
|
864
|
-
* Validation middleware
|
|
865
|
-
*/
|
|
866
|
-
declare const validationMiddleware: AXPEntityStorageMiddleware;
|
|
867
|
-
/**
|
|
868
|
-
* Caching middleware (simple in-memory cache)
|
|
869
|
-
*/
|
|
870
|
-
declare const cachingMiddleware: AXPEntityStorageMiddleware;
|
|
871
|
-
|
|
872
|
-
/**
|
|
873
|
-
* Audit trail entry interface
|
|
874
|
-
*/
|
|
875
|
-
interface AXPAuditEntry {
|
|
876
|
-
id: string;
|
|
877
|
-
entityName: string;
|
|
878
|
-
operation: string;
|
|
879
|
-
entityId?: any;
|
|
880
|
-
changes?: any;
|
|
881
|
-
user?: string;
|
|
882
|
-
timestamp: Date;
|
|
883
|
-
requestId: string;
|
|
884
|
-
metadata?: any;
|
|
885
|
-
}
|
|
886
|
-
/**
|
|
887
|
-
* Audit trail storage interface
|
|
888
|
-
*/
|
|
889
|
-
interface AXPAuditStorage {
|
|
890
|
-
save(entry: AXPAuditEntry): Promise<void>;
|
|
891
|
-
}
|
|
892
|
-
/**
|
|
893
|
-
* Simple in-memory audit storage (for demo purposes)
|
|
894
|
-
*/
|
|
895
|
-
declare class InMemoryAuditStorage implements AXPAuditStorage {
|
|
896
|
-
private entries;
|
|
897
|
-
save(entry: AXPAuditEntry): Promise<void>;
|
|
898
|
-
getEntries(): AXPAuditEntry[];
|
|
899
|
-
getEntriesForEntity(entityName: string): AXPAuditEntry[];
|
|
900
|
-
clear(): void;
|
|
901
|
-
}
|
|
902
|
-
declare const auditStorage: InMemoryAuditStorage;
|
|
903
|
-
/**
|
|
904
|
-
* Audit middleware that tracks all entity operations
|
|
905
|
-
*/
|
|
906
|
-
declare const auditMiddleware: AXPEntityStorageMiddleware;
|
|
907
|
-
/**
|
|
908
|
-
* User context middleware - adds user information to context
|
|
909
|
-
*/
|
|
910
|
-
declare const userContextMiddleware: AXPEntityStorageMiddleware;
|
|
911
|
-
/**
|
|
912
|
-
* Data sanitization middleware - removes sensitive data from logs
|
|
913
|
-
*/
|
|
914
|
-
declare const dataSanitizationMiddleware: AXPEntityStorageMiddleware;
|
|
915
734
|
|
|
916
735
|
interface AXPEntityConfigs {
|
|
917
736
|
viewers: {
|
|
@@ -921,6 +740,7 @@ interface AXPEntityConfigs {
|
|
|
921
740
|
};
|
|
922
741
|
master: {
|
|
923
742
|
single: () => Type<any> | Promise<Type<any>>;
|
|
743
|
+
details: () => Type<any> | Promise<Type<any>>;
|
|
924
744
|
create: () => Type<any> | Promise<Type<any>>;
|
|
925
745
|
modify: () => Type<any> | Promise<Type<any>>;
|
|
926
746
|
list: () => Type<any> | Promise<Type<any>>;
|
|
@@ -1082,6 +902,64 @@ declare class AXPShowListViewAction extends AXPWorkflowAction {
|
|
|
1082
902
|
}
|
|
1083
903
|
declare const AXPShowListViewWorkflow: AXPWorkflow;
|
|
1084
904
|
|
|
905
|
+
interface AXPOpenEntityDetailsCommandInput {
|
|
906
|
+
entity: string;
|
|
907
|
+
data: {
|
|
908
|
+
id: string;
|
|
909
|
+
};
|
|
910
|
+
}
|
|
911
|
+
interface AXPOpenEntityDetailsCommandResult {
|
|
912
|
+
success: boolean;
|
|
913
|
+
}
|
|
914
|
+
/**
|
|
915
|
+
* Generic command to open entity details view
|
|
916
|
+
* Can be used by any entity to navigate to its detail page
|
|
917
|
+
*/
|
|
918
|
+
declare class AXPOpenEntityDetailsCommand implements AXPCommand<AXPOpenEntityDetailsCommandInput, AXPOpenEntityDetailsCommandResult> {
|
|
919
|
+
private readonly router;
|
|
920
|
+
private readonly sessionService;
|
|
921
|
+
/**
|
|
922
|
+
* Execute the command to navigate to entity details
|
|
923
|
+
* @param input - Command input containing entity and data information
|
|
924
|
+
*/
|
|
925
|
+
execute(input: AXPOpenEntityDetailsCommandInput): Promise<AXPOpenEntityDetailsCommandResult>;
|
|
926
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPOpenEntityDetailsCommand, never>;
|
|
927
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXPOpenEntityDetailsCommand>;
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
interface AXPGetEntityDetailsQueryInput {
|
|
931
|
+
entity: string;
|
|
932
|
+
id: string;
|
|
933
|
+
}
|
|
934
|
+
interface AXPGetEntityDetailsQueryResult {
|
|
935
|
+
success: boolean;
|
|
936
|
+
entityDefinition?: AXPEntity;
|
|
937
|
+
entityData?: any;
|
|
938
|
+
error?: string;
|
|
939
|
+
}
|
|
940
|
+
/**
|
|
941
|
+
* Generic query to get entity details including entity definition and entity data
|
|
942
|
+
* Can be used by any entity to retrieve its definition and data by ID
|
|
943
|
+
*/
|
|
944
|
+
declare class AXPGetEntityDetailsQuery implements AXPQuery<AXPGetEntityDetailsQueryInput, AXPGetEntityDetailsQueryResult> {
|
|
945
|
+
private readonly entityDefinitionRegistry;
|
|
946
|
+
private readonly injector;
|
|
947
|
+
/**
|
|
948
|
+
* Execute the query to fetch entity definition and data
|
|
949
|
+
* @param input - Query input containing entity and ID information
|
|
950
|
+
*/
|
|
951
|
+
fetch(input: AXPGetEntityDetailsQueryInput): Promise<AXPGetEntityDetailsQueryResult>;
|
|
952
|
+
/**
|
|
953
|
+
* Get entity data using the entity's CRUD service
|
|
954
|
+
* @param entity - Full entity path (ModuleName.EntityName)
|
|
955
|
+
* @param id - Entity ID
|
|
956
|
+
* @returns Promise resolving to entity data
|
|
957
|
+
*/
|
|
958
|
+
private getEntityData;
|
|
959
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPGetEntityDetailsQuery, never>;
|
|
960
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXPGetEntityDetailsQuery>;
|
|
961
|
+
}
|
|
962
|
+
|
|
1085
963
|
declare function entityMasterCreateAction(): AXPEntityAction;
|
|
1086
964
|
declare function entityMasterBulkDeleteAction(): AXPEntityAction;
|
|
1087
965
|
declare function entityMasterViewAction(): AXPEntityAction;
|
|
@@ -1090,11 +968,52 @@ declare function entityMasterCrudActions(): AXPEntityAction[];
|
|
|
1090
968
|
declare function entityMasterRecordActions(): AXPEntityAction[];
|
|
1091
969
|
declare function entityDetailsCreateActions(parentId: string): AXPEntityAction;
|
|
1092
970
|
declare function entityDetailsSimpleCondition(fk: string): AXPQueryFilter;
|
|
1093
|
-
declare function entityDetailsReferenceCondition(): AXPQueryFilter[];
|
|
971
|
+
declare function entityDetailsReferenceCondition(type: string): AXPQueryFilter[];
|
|
1094
972
|
declare function entityDetailsEditAction(): AXPEntityAction;
|
|
1095
973
|
declare function entityOverrideDetailsViewAction(): AXPEntityAction;
|
|
1096
974
|
declare function entityDetailsCrudActions(parentId: string): AXPEntityAction[];
|
|
1097
|
-
declare function entityDetailsReferenceCreateActions(): AXPEntityAction[];
|
|
975
|
+
declare function entityDetailsReferenceCreateActions(type: string): AXPEntityAction[];
|
|
976
|
+
type AXPEntityChangeSet = {
|
|
977
|
+
[key: string]: {
|
|
978
|
+
oldValue: any;
|
|
979
|
+
newValue: any;
|
|
980
|
+
added?: any[];
|
|
981
|
+
removed?: any[];
|
|
982
|
+
};
|
|
983
|
+
};
|
|
984
|
+
/**
|
|
985
|
+
* Computes a diff between two plain objects with array-aware semantics.
|
|
986
|
+
* - For arrays of objects with an id field, computes added/removed by id.
|
|
987
|
+
* - For arrays of primitives or objects without id, uses deep equality.
|
|
988
|
+
* - For scalars/objects, reports oldValue/newValue when changed.
|
|
989
|
+
*/
|
|
990
|
+
declare function detectEntityChanges(oldObj: any, newObj: any): AXPEntityChangeSet;
|
|
991
|
+
|
|
992
|
+
declare const eventDispatchMiddleware: AXPEntityStorageMiddleware;
|
|
993
|
+
|
|
994
|
+
/**
|
|
995
|
+
* Map of column name -> width value
|
|
996
|
+
* Example: { title: '300px', description: '300px' }
|
|
997
|
+
*/
|
|
998
|
+
type ColumnWidthConfig = Record<string, string | number>;
|
|
999
|
+
/**
|
|
1000
|
+
* Default widths for common text columns
|
|
1001
|
+
*/
|
|
1002
|
+
declare const DEFAULT_COLUMN_WIDTHS: ColumnWidthConfig;
|
|
1003
|
+
/**
|
|
1004
|
+
* Factory to create a column width middleware using provided config map.
|
|
1005
|
+
* Sets width for columns defined in the map if not already defined on the column.
|
|
1006
|
+
*/
|
|
1007
|
+
declare const columnWidthMiddlewareFactory: (widths: ColumnWidthConfig) => AXPEntityModifier;
|
|
1008
|
+
/**
|
|
1009
|
+
* Helper to create a provider for the column width middleware.
|
|
1010
|
+
* By default it applies to all entities using the '*' pattern.
|
|
1011
|
+
*/
|
|
1012
|
+
declare const createColumnWidthMiddlewareProvider: (widths: ColumnWidthConfig, entityName?: string | RegExp) => AXPEntityModifierProvider;
|
|
1013
|
+
/**
|
|
1014
|
+
* Default provider registered with the default map.
|
|
1015
|
+
*/
|
|
1016
|
+
declare const columnWidthMiddlewareProvider: AXPEntityModifierProvider;
|
|
1098
1017
|
|
|
1099
|
-
export { AXMEntityCrudService, AXMEntityCrudServiceImpl, AXPCreateEntityWorkflow, AXPDataSeederService, AXPDeleteEntityWorkflow, AXPEntityApplyUpdatesAction, AXPEntityCommandTriggerViewModel, AXPEntityCreateEvent, AXPEntityCreatePopupAction, AXPEntityCreateSubmittedAction, AXPEntityCreateViewElementViewModel, AXPEntityCreateViewModelFactory, AXPEntityCreateViewSectionViewModel, AXPEntityDataProvider, AXPEntityDataProviderImpl, AXPEntityDefinitionRegistryService, AXPEntityDeletedEvent, AXPEntityDetailListViewModel, AXPEntityDetailViewModelFactory, AXPEntityDetailViewModelResolver, AXPEntityListViewColumnViewModel, AXPEntityListViewModelFactory, AXPEntityListViewModelResolver, AXPEntityMasterCreateViewModel, AXPEntityMasterListViewModel, AXPEntityMasterListViewQueryViewModel, AXPEntityMasterSingleElementViewModel, AXPEntityMasterSingleViewGroupViewModel, AXPEntityMasterSingleViewModel, AXPEntityMasterUpdateElementViewModel, AXPEntityMasterUpdateViewModel, AXPEntityMasterUpdateViewModelFactory, AXPEntityMiddleware, AXPEntityModifyConfirmedAction, AXPEntityModifyEvent, AXPEntityModifySectionPopupAction, AXPEntityModule, AXPEntityPerformDeleteAction, AXPEntityResolver, AXPEntityService,
|
|
1100
|
-
export type {
|
|
1018
|
+
export { AXMEntityCrudService, AXMEntityCrudServiceImpl, AXPCreateEntityWorkflow, AXPDataSeederService, AXPDeleteEntityWorkflow, AXPEntityApplyUpdatesAction, AXPEntityCommandTriggerViewModel, AXPEntityCreateEvent, AXPEntityCreatePopupAction, AXPEntityCreateSubmittedAction, AXPEntityCreateViewElementViewModel, AXPEntityCreateViewModelFactory, AXPEntityCreateViewSectionViewModel, AXPEntityDataProvider, AXPEntityDataProviderImpl, AXPEntityDefinitionRegistryService, AXPEntityDeletedEvent, AXPEntityDetailListViewModel, AXPEntityDetailViewModelFactory, AXPEntityDetailViewModelResolver, AXPEntityEventDispatcherService, AXPEntityListViewColumnViewModel, AXPEntityListViewModelFactory, AXPEntityListViewModelResolver, AXPEntityMasterCreateViewModel, AXPEntityMasterListViewModel, AXPEntityMasterListViewQueryViewModel, AXPEntityMasterSingleElementViewModel, AXPEntityMasterSingleViewGroupViewModel, AXPEntityMasterSingleViewModel, AXPEntityMasterUpdateElementViewModel, AXPEntityMasterUpdateViewModel, AXPEntityMasterUpdateViewModelFactory, AXPEntityMiddleware, AXPEntityModifyConfirmedAction, AXPEntityModifyEvent, AXPEntityModifySectionPopupAction, AXPEntityModule, AXPEntityPerformDeleteAction, AXPEntityResolver, AXPEntityService, AXPEntityStorageService, AXPGetEntityDetailsQuery, AXPMiddlewareEntityStorageService, AXPModifyEntitySectionWorkflow, AXPOpenEntityDetailsCommand, AXPQuickEntityModifyPopupAction, AXPQuickModifyEntityWorkflow, AXPShowDetailViewAction, AXPShowDetailsViewWorkflow, AXPShowListViewAction, AXPShowListViewWorkflow, AXP_DATA_SEEDER_TOKEN, AXP_ENTITY_ACTION_PLUGIN, AXP_ENTITY_CONFIG_TOKEN, AXP_ENTITY_DEFINITION_LOADER, AXP_ENTITY_MODIFIER, AXP_ENTITY_STORAGE_BACKEND, AXP_ENTITY_STORAGE_MIDDLEWARE, DEFAULT_COLUMN_WIDTHS, actionExists, columnWidthMiddlewareFactory, columnWidthMiddlewareProvider, createColumnWidthMiddlewareProvider, createModifierContext, detectEntityChanges, ensureListActions, entityDetailsCreateActions, entityDetailsCrudActions, entityDetailsEditAction, entityDetailsReferenceCondition, entityDetailsReferenceCreateActions, entityDetailsSimpleCondition, entityMasterBulkDeleteAction, entityMasterCreateAction, entityMasterCrudActions, entityMasterDeleteAction, entityMasterRecordActions, entityMasterViewAction, entityOverrideDetailsViewAction, eventDispatchMiddleware };
|
|
1019
|
+
export type { AXPAuditable, AXPDataSeeder, AXPEntityActionPlugin, AXPEntityChangeSet, AXPEntityConfigs, AXPEntityCreateDto, AXPEntityDefinitionLoader, AXPEntityDefinitionPreloader, AXPEntityDeleteOptions, AXPEntityDetailDto, AXPEntityListItemDto, AXPEntityMasterListViewSortPropViewModel, AXPEntityModel, AXPEntityModifier, AXPEntityModifierContext, AXPEntityModifierProvider, AXPEntityOp, AXPEntityOutputDto, AXPEntityPreloadEntity, AXPEntityStorageContext, AXPEntityStorageMiddleware, AXPEntityUpdateDto, AXPGetEntityDetailsQueryInput, AXPGetEntityDetailsQueryResult, AXPOpenEntityDetailsCommandInput, AXPOpenEntityDetailsCommandResult, ColumnWidthConfig };
|