@acorex/platform 20.3.0-next.0 → 20.3.0-next.1
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 +5 -119
- package/core/index.d.ts +67 -72
- package/fesm2022/acorex-platform-auth.mjs +1 -1
- package/fesm2022/acorex-platform-auth.mjs.map +1 -1
- package/fesm2022/acorex-platform-common.mjs +11 -35
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +164 -142
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +638 -1168
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs +51 -1439
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +137 -92
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +1059 -3204
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +72 -373
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-default-create-entity-view.component-SY0oMDoH.mjs +22 -0
- package/fesm2022/acorex-platform-themes-default-create-entity-view.component-SY0oMDoH.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-I7Eq8Nti.mjs → acorex-platform-themes-default-entity-master-create-view.component-hHXxHlFG.mjs} +3 -3
- package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-I7Eq8Nti.mjs.map → acorex-platform-themes-default-entity-master-create-view.component-hHXxHlFG.mjs.map} +1 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-hf4QOz_4.mjs +665 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-hf4QOz_4.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-modify-view.component-16sdMBvH.mjs → acorex-platform-themes-default-entity-master-modify-view.component-DC3MrDtI.mjs} +10 -3
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-DC3MrDtI.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-Bb90PeHq.mjs +236 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-Bb90PeHq.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +484 -39
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-shared-theme-color-chooser-column.component-DjKLg513.mjs → acorex-platform-themes-shared-color-chooser-column.component-DjKLg513.mjs} +1 -1
- package/fesm2022/acorex-platform-themes-shared-color-chooser-column.component-DjKLg513.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-theme-color-chooser-view.component-DE0wO98F.mjs → acorex-platform-themes-shared-color-chooser-view.component-DE0wO98F.mjs} +1 -1
- package/fesm2022/acorex-platform-themes-shared-color-chooser-view.component-DE0wO98F.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared.mjs +13 -11
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/{acorex-platform-widgets-button-widget-designer.component-BJtkWusr.mjs → acorex-platform-widgets-button-widget-designer.component-lNF95FJv.mjs} +3 -3
- package/fesm2022/acorex-platform-widgets-button-widget-designer.component-lNF95FJv.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-checkbox-widget-column.component-DeKpl0uK.mjs → acorex-platform-widgets-checkbox-widget-column.component-BNBOATPB.mjs} +2 -1
- package/fesm2022/acorex-platform-widgets-checkbox-widget-column.component-BNBOATPB.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-checkbox-widget-designer.component-Cv7dEMCm.mjs → acorex-platform-widgets-checkbox-widget-designer.component-BI18uzNZ.mjs} +2 -2
- package/fesm2022/acorex-platform-widgets-checkbox-widget-designer.component-BI18uzNZ.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-color-box-widget-designer.component-CohkI1w1.mjs → acorex-platform-widgets-color-box-widget-designer.component-pYOQv5g8.mjs} +2 -2
- package/fesm2022/acorex-platform-widgets-color-box-widget-designer.component-pYOQv5g8.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-file-list-popup.component-BafU5Lfl.mjs → acorex-platform-widgets-file-list-popup.component-DFbPO0ud.mjs} +4 -69
- package/fesm2022/acorex-platform-widgets-file-list-popup.component-DFbPO0ud.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-page-widget-designer.component-Cw9WcZze.mjs → acorex-platform-widgets-page-widget-designer.component-DRsLkulH.mjs} +64 -74
- package/fesm2022/acorex-platform-widgets-page-widget-designer.component-DRsLkulH.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-tabular-data-edit-popup.component-BDQIfr0g.mjs → acorex-platform-widgets-tabular-data-edit-popup.component-nLZYiPnF.mjs} +5 -5
- package/fesm2022/{acorex-platform-widgets-tabular-data-edit-popup.component-BDQIfr0g.mjs.map → acorex-platform-widgets-tabular-data-edit-popup.component-nLZYiPnF.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-widgets-tabular-data-view-popup.component-CmPqtt0G.mjs → acorex-platform-widgets-tabular-data-view-popup.component-D6kiasYM.mjs} +3 -3
- package/fesm2022/{acorex-platform-widgets-tabular-data-view-popup.component-CmPqtt0G.mjs.map → acorex-platform-widgets-tabular-data-view-popup.component-D6kiasYM.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-widgets-text-block-widget-designer.component-DaR4Nkv4.mjs → acorex-platform-widgets-text-block-widget-designer.component-CCMQtH3e.mjs} +12 -8
- package/fesm2022/acorex-platform-widgets-text-block-widget-designer.component-CCMQtH3e.mjs.map +1 -0
- package/fesm2022/acorex-platform-widgets.mjs +1498 -2707
- package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +0 -3
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/layout/builder/index.d.ts +181 -367
- package/layout/components/index.d.ts +25 -372
- package/layout/designer/index.d.ts +47 -16
- package/layout/entity/index.d.ts +336 -222
- package/layout/views/index.d.ts +22 -129
- package/package.json +36 -22
- package/widgets/index.d.ts +224 -275
- package/workflow/index.d.ts +1 -4
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-D3VUh8K8.mjs +0 -707
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-D3VUh8K8.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-16sdMBvH.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-BMkhNfF4.mjs +0 -244
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-BMkhNfF4.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-DjKLg513.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-DE0wO98F.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-button-widget-designer.component-BJtkWusr.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-checkbox-widget-column.component-DeKpl0uK.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-checkbox-widget-designer.component-Cv7dEMCm.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-color-box-widget-designer.component-CohkI1w1.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-extra-properties-schema-widget-edit.component-B3SJUnGQ.mjs +0 -50
- package/fesm2022/acorex-platform-widgets-extra-properties-schema-widget-edit.component-B3SJUnGQ.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-extra-properties-schema-widget-view.component-BLR0JkRt.mjs +0 -42
- package/fesm2022/acorex-platform-widgets-extra-properties-schema-widget-view.component-BLR0JkRt.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-extra-properties-values-widget-edit.component-hzR2FgOm.mjs +0 -55
- package/fesm2022/acorex-platform-widgets-extra-properties-values-widget-edit.component-hzR2FgOm.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-extra-properties-values-widget-view.component-IDm6Clua.mjs +0 -50
- package/fesm2022/acorex-platform-widgets-extra-properties-values-widget-view.component-IDm6Clua.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-extra-properties-widget-edit.component-BRO9tYDa.mjs +0 -48
- package/fesm2022/acorex-platform-widgets-extra-properties-widget-edit.component-BRO9tYDa.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-extra-properties-widget-view.component-CkpLimyW.mjs +0 -42
- package/fesm2022/acorex-platform-widgets-extra-properties-widget-view.component-CkpLimyW.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-file-list-popup.component-BafU5Lfl.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-page-widget-designer.component-Cw9WcZze.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-text-block-widget-designer.component-DaR4Nkv4.mjs.map +0 -1
package/layout/entity/index.d.ts
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { InjectionToken, Injector, Type } from '@angular/core';
|
|
2
|
+
import { InjectionToken, Injector, EnvironmentProviders, 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,
|
|
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';
|
|
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';
|
|
12
11
|
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 } from '@acorex/platform/runtime';
|
|
16
15
|
|
|
17
16
|
interface AXPDataSeeder {
|
|
18
17
|
seed(): Promise<void>;
|
|
@@ -42,8 +41,8 @@ declare class AXPEntityCommandTriggerViewModel {
|
|
|
42
41
|
constructor(entity: AXPEntity, action: AXPEntityAction);
|
|
43
42
|
}
|
|
44
43
|
declare class AXPEntityListViewColumnViewModel {
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
private property;
|
|
45
|
+
private column;
|
|
47
46
|
constructor(property: AXPEntityProperty, column: AXPEntityTableColumn);
|
|
48
47
|
name: string;
|
|
49
48
|
title: string;
|
|
@@ -186,12 +185,9 @@ declare class AXPEntityMasterListViewModel {
|
|
|
186
185
|
private readonly settings;
|
|
187
186
|
private readonly widgetResolver;
|
|
188
187
|
private readonly expressionEvaluator;
|
|
189
|
-
private readonly commandService;
|
|
190
188
|
private readonly filterOperatorMiddleware;
|
|
191
189
|
private settingEntityKey;
|
|
192
190
|
private readonly destroyed;
|
|
193
|
-
private lastAppliedSortKey;
|
|
194
|
-
private lastAppliedFilterKey;
|
|
195
191
|
events$: Subject<{
|
|
196
192
|
action: string;
|
|
197
193
|
meta?: any;
|
|
@@ -202,7 +198,7 @@ declare class AXPEntityMasterListViewModel {
|
|
|
202
198
|
dataSource: AXDataSource<unknown>;
|
|
203
199
|
constructor(injector: Injector, config: AXPEntity);
|
|
204
200
|
applySettings(): Promise<void>;
|
|
205
|
-
saveSettings(changesType: 'columnSizes' | 'columnOrders' | 'view' | 'pageSize'
|
|
201
|
+
saveSettings(changesType: 'columnSizes' | 'columnOrders' | 'view' | 'pageSize', data?: any): Promise<void>;
|
|
206
202
|
selectedItems: _angular_core.WritableSignal<any[]>;
|
|
207
203
|
parentKey: _angular_core.Signal<string | undefined>;
|
|
208
204
|
hasSelectedItems: _angular_core.Signal<boolean>;
|
|
@@ -264,6 +260,7 @@ declare class AXPEntityMasterSingleViewGroupViewModel {
|
|
|
264
260
|
group: _acorex_platform_common.AXPEntityPropertyGroup;
|
|
265
261
|
name: _angular_core.WritableSignal<string>;
|
|
266
262
|
isLoading: _angular_core.WritableSignal<boolean>;
|
|
263
|
+
type: _angular_core.WritableSignal<"wrapper" | "section">;
|
|
267
264
|
title: _angular_core.Signal<string>;
|
|
268
265
|
description: _angular_core.Signal<string | null | undefined>;
|
|
269
266
|
layout: _angular_core.Signal<AXPGridLayoutOptions>;
|
|
@@ -294,14 +291,10 @@ declare class AXPEntityMasterSingleViewModel {
|
|
|
294
291
|
private readonly session;
|
|
295
292
|
private readonly formatService;
|
|
296
293
|
private readonly workflow;
|
|
297
|
-
private readonly commandService;
|
|
298
294
|
private readonly destroyed;
|
|
299
295
|
private translateService;
|
|
300
296
|
private entityService;
|
|
301
297
|
private expressionEvaluator;
|
|
302
|
-
private entityDefinitionRegistryService;
|
|
303
|
-
private _updateTrigger;
|
|
304
|
-
readonly updateTrigger: _angular_core.Signal<number>;
|
|
305
298
|
constructor(injector: Injector, config: AXPEntity, entityData: any);
|
|
306
299
|
context: _angular_core.WritableSignal<any>;
|
|
307
300
|
private actions;
|
|
@@ -349,6 +342,7 @@ declare class AXPEntityMasterUpdateViewModel {
|
|
|
349
342
|
private props;
|
|
350
343
|
private entityDef;
|
|
351
344
|
private workflow;
|
|
345
|
+
private lockService;
|
|
352
346
|
private sessionService;
|
|
353
347
|
private get moduleName();
|
|
354
348
|
private get entityName();
|
|
@@ -360,6 +354,7 @@ declare class AXPEntityMasterUpdateViewModel {
|
|
|
360
354
|
elements: _angular_core.Signal<AXPEntityMasterUpdateElementViewModel[]>;
|
|
361
355
|
save(): Promise<any>;
|
|
362
356
|
reset(): void;
|
|
357
|
+
unlock(): Promise<void>;
|
|
363
358
|
}
|
|
364
359
|
declare class AXPEntityMasterUpdateViewModelFactory {
|
|
365
360
|
private entityService;
|
|
@@ -458,10 +453,6 @@ interface AXPEntityModifierContext {
|
|
|
458
453
|
get(): AXPEntityMasterSingleLayoutView | undefined;
|
|
459
454
|
update(updater: (c: AXPEntityMasterSingleLayoutView | undefined) => AXPEntityMasterSingleLayoutView): AXPEntityModifierContext;
|
|
460
455
|
};
|
|
461
|
-
list: {
|
|
462
|
-
get(): AXPEntityMasterListView | undefined;
|
|
463
|
-
update(updater: (c: AXPEntityMasterListView | undefined) => AXPEntityMasterListView): AXPEntityModifierContext;
|
|
464
|
-
};
|
|
465
456
|
};
|
|
466
457
|
detail: {
|
|
467
458
|
get(): NonNullable<AXPEntity['interfaces']>['detail'] | undefined;
|
|
@@ -476,31 +467,16 @@ interface AXPEntityModifierContext {
|
|
|
476
467
|
}
|
|
477
468
|
type AXPEntityModifier = (context: AXPEntityModifierContext) => void;
|
|
478
469
|
interface AXPEntityModifierProvider {
|
|
479
|
-
entityName: string
|
|
470
|
+
entityName: string;
|
|
480
471
|
modifier: AXPEntityModifier;
|
|
481
472
|
}
|
|
482
473
|
|
|
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
|
-
|
|
493
474
|
declare class AXPEntityMiddleware {
|
|
494
|
-
private
|
|
495
|
-
|
|
496
|
-
protected providedModifiers: AXPEntityModifierProvider[];
|
|
497
|
-
protected providedActionPlugins: AXPEntityActionPlugin[];
|
|
498
|
-
protected injector: Injector;
|
|
475
|
+
private modifiers;
|
|
476
|
+
protected providedModifiers: _acorex_platform_layout_entity.AXPEntityModifierProvider[];
|
|
499
477
|
constructor();
|
|
500
|
-
register(entityName: string
|
|
501
|
-
process(entity: AXPEntity):
|
|
502
|
-
private wildcardToRegExp;
|
|
503
|
-
private normalizeRegExp;
|
|
478
|
+
register(entityName: string, modifier: AXPEntityModifier): void;
|
|
479
|
+
process(entity: AXPEntity): AXPEntity;
|
|
504
480
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPEntityMiddleware, never>;
|
|
505
481
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXPEntityMiddleware>;
|
|
506
482
|
}
|
|
@@ -509,6 +485,56 @@ declare function createModifierContext(entity: AXPEntity): AXPEntityModifierCont
|
|
|
509
485
|
|
|
510
486
|
declare const AXP_ENTITY_MODIFIER: InjectionToken<AXPEntityModifierProvider[]>;
|
|
511
487
|
|
|
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
|
+
|
|
512
538
|
interface AXPAuditable {
|
|
513
539
|
createdAt?: Date;
|
|
514
540
|
updatedAt?: Date;
|
|
@@ -531,31 +557,6 @@ interface AXPEntityDetailDto<Id> extends AXPEntityOutputDto<Id> {
|
|
|
531
557
|
interface AXPEntityListItemDto<Id> extends AXPEntityOutputDto<Id> {
|
|
532
558
|
}
|
|
533
559
|
|
|
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
|
-
|
|
559
560
|
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> {
|
|
560
561
|
abstract get dbName(): string;
|
|
561
562
|
abstract initial(entityName: string, collection: TCreateDto[], options?: {
|
|
@@ -622,115 +623,295 @@ declare class AXMEntityCrudServiceImpl<TKey, TDetailDto extends AXPEntityDetailD
|
|
|
622
623
|
get storageService(): AXPEntityStorageService<any, any, any, any, any>;
|
|
623
624
|
}
|
|
624
625
|
|
|
625
|
-
|
|
626
|
-
|
|
626
|
+
/**
|
|
627
|
+
* Context object for entity storage operations
|
|
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
|
+
}
|
|
627
715
|
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
716
|
+
/**
|
|
717
|
+
* Executor that wraps entity storage operations with middleware pipeline
|
|
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;
|
|
631
721
|
private readonly injector;
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
initial(entityName: string, collection: TCreateDto[], options?: {
|
|
638
|
-
mergeType?: 'merge' | 'replace';
|
|
639
|
-
uniqueKeys?: string[];
|
|
640
|
-
}): Promise<TCreateDto[]>;
|
|
722
|
+
private readonly registry;
|
|
723
|
+
constructor(storageService: AXPEntityStorageService<TKey, TDetailDto, TListItemDto, TCreateDto, TUpdateDto>);
|
|
724
|
+
/**
|
|
725
|
+
* Execute getOne operation with middleware pipeline
|
|
726
|
+
*/
|
|
641
727
|
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
|
+
*/
|
|
642
739
|
updateOne(entityName: string, id: TKey, keyValues: Omit<Partial<TUpdateDto>, 'id'>): Promise<TDetailDto>;
|
|
740
|
+
/**
|
|
741
|
+
* Execute deleteOne operation with middleware pipeline
|
|
742
|
+
*/
|
|
643
743
|
deleteOne(entityName: string, id: TKey): Promise<void>;
|
|
644
|
-
|
|
645
|
-
|
|
744
|
+
/**
|
|
745
|
+
* Execute query operation with middleware pipeline
|
|
746
|
+
*/
|
|
646
747
|
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;
|
|
669
748
|
/**
|
|
670
|
-
*
|
|
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
|
|
749
|
+
* Execute initial operation with middleware pipeline
|
|
675
750
|
*/
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
private refreshOne;
|
|
751
|
+
initial(entityName: string, collection: TCreateDto[], options?: {
|
|
752
|
+
mergeType?: 'merge' | 'replace';
|
|
753
|
+
uniqueKeys?: string[];
|
|
754
|
+
}): Promise<TCreateDto[]>;
|
|
681
755
|
/**
|
|
682
|
-
*
|
|
683
|
-
* of their module and name.
|
|
684
|
-
*
|
|
685
|
-
* @param config The configuration object of the entity to be registered.
|
|
756
|
+
* Execute operation with middleware pipeline
|
|
686
757
|
*/
|
|
687
|
-
|
|
758
|
+
private executeWithMiddleware;
|
|
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;
|
|
688
775
|
/**
|
|
689
|
-
*
|
|
690
|
-
*
|
|
691
|
-
* @returns An array of AXPEntity objects.
|
|
776
|
+
* Add a global middleware that applies to all operations
|
|
692
777
|
*/
|
|
693
|
-
|
|
778
|
+
useGlobal(middleware: AXPEntityStorageMiddleware): void;
|
|
694
779
|
/**
|
|
695
|
-
*
|
|
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.
|
|
780
|
+
* Add middleware for specific entity
|
|
703
781
|
*/
|
|
704
|
-
|
|
782
|
+
useForEntity(entityName: string, middleware: AXPEntityStorageMiddleware): void;
|
|
705
783
|
/**
|
|
706
|
-
*
|
|
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.
|
|
784
|
+
* Add middleware for specific operation
|
|
711
785
|
*/
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
786
|
+
useForOperation(operation: string, middleware: AXPEntityStorageMiddleware): void;
|
|
787
|
+
initial(entityName: string, collection: TCreateDto[], options?: {
|
|
788
|
+
mergeType?: 'merge' | 'replace';
|
|
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>>;
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
/**
|
|
804
|
+
* Injection token for entity storage middleware setup
|
|
805
|
+
*/
|
|
806
|
+
declare const AXP_ENTITY_STORAGE_MIDDLEWARE_SETUP: InjectionToken<void>;
|
|
807
|
+
/**
|
|
808
|
+
* Injection token for entity storage middleware extensions
|
|
809
|
+
*/
|
|
810
|
+
declare const AXP_ENTITY_STORAGE_EXTENSION: InjectionToken<{
|
|
811
|
+
target: string | RegExp;
|
|
812
|
+
middleware: AXPEntityStorageMiddleware;
|
|
813
|
+
}>;
|
|
814
|
+
/**
|
|
815
|
+
* Configuration for entity-specific middleware
|
|
816
|
+
*/
|
|
817
|
+
interface AXPEntityStorageMiddlewareConfig {
|
|
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
|
+
}[];
|
|
715
833
|
}
|
|
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;
|
|
716
871
|
|
|
717
872
|
/**
|
|
718
|
-
*
|
|
719
|
-
|
|
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)
|
|
720
894
|
*/
|
|
721
|
-
declare class
|
|
722
|
-
private
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
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>;
|
|
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;
|
|
733
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;
|
|
734
915
|
|
|
735
916
|
interface AXPEntityConfigs {
|
|
736
917
|
viewers: {
|
|
@@ -740,7 +921,6 @@ interface AXPEntityConfigs {
|
|
|
740
921
|
};
|
|
741
922
|
master: {
|
|
742
923
|
single: () => Type<any> | Promise<Type<any>>;
|
|
743
|
-
details: () => Type<any> | Promise<Type<any>>;
|
|
744
924
|
create: () => Type<any> | Promise<Type<any>>;
|
|
745
925
|
modify: () => Type<any> | Promise<Type<any>>;
|
|
746
926
|
list: () => Type<any> | Promise<Type<any>>;
|
|
@@ -902,31 +1082,6 @@ declare class AXPShowListViewAction extends AXPWorkflowAction {
|
|
|
902
1082
|
}
|
|
903
1083
|
declare const AXPShowListViewWorkflow: AXPWorkflow;
|
|
904
1084
|
|
|
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 navigation;
|
|
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
1085
|
declare function entityMasterCreateAction(): AXPEntityAction;
|
|
931
1086
|
declare function entityMasterBulkDeleteAction(): AXPEntityAction;
|
|
932
1087
|
declare function entityMasterViewAction(): AXPEntityAction;
|
|
@@ -935,52 +1090,11 @@ declare function entityMasterCrudActions(): AXPEntityAction[];
|
|
|
935
1090
|
declare function entityMasterRecordActions(): AXPEntityAction[];
|
|
936
1091
|
declare function entityDetailsCreateActions(parentId: string): AXPEntityAction;
|
|
937
1092
|
declare function entityDetailsSimpleCondition(fk: string): AXPQueryFilter;
|
|
938
|
-
declare function entityDetailsReferenceCondition(
|
|
1093
|
+
declare function entityDetailsReferenceCondition(): AXPQueryFilter[];
|
|
939
1094
|
declare function entityDetailsEditAction(): AXPEntityAction;
|
|
940
1095
|
declare function entityOverrideDetailsViewAction(): AXPEntityAction;
|
|
941
1096
|
declare function entityDetailsCrudActions(parentId: string): AXPEntityAction[];
|
|
942
|
-
declare function entityDetailsReferenceCreateActions(
|
|
943
|
-
type AXPEntityChangeSet = {
|
|
944
|
-
[key: string]: {
|
|
945
|
-
oldValue: any;
|
|
946
|
-
newValue: any;
|
|
947
|
-
added?: any[];
|
|
948
|
-
removed?: any[];
|
|
949
|
-
};
|
|
950
|
-
};
|
|
951
|
-
/**
|
|
952
|
-
* Computes a diff between two plain objects with array-aware semantics.
|
|
953
|
-
* - For arrays of objects with an id field, computes added/removed by id.
|
|
954
|
-
* - For arrays of primitives or objects without id, uses deep equality.
|
|
955
|
-
* - For scalars/objects, reports oldValue/newValue when changed.
|
|
956
|
-
*/
|
|
957
|
-
declare function detectEntityChanges(oldObj: any, newObj: any): AXPEntityChangeSet;
|
|
958
|
-
|
|
959
|
-
declare const eventDispatchMiddleware: AXPEntityStorageMiddleware;
|
|
960
|
-
|
|
961
|
-
/**
|
|
962
|
-
* Map of column name -> width value
|
|
963
|
-
* Example: { title: '300px', description: '300px' }
|
|
964
|
-
*/
|
|
965
|
-
type ColumnWidthConfig = Record<string, string | number>;
|
|
966
|
-
/**
|
|
967
|
-
* Default widths for common text columns
|
|
968
|
-
*/
|
|
969
|
-
declare const DEFAULT_COLUMN_WIDTHS: ColumnWidthConfig;
|
|
970
|
-
/**
|
|
971
|
-
* Factory to create a column width middleware using provided config map.
|
|
972
|
-
* Sets width for columns defined in the map if not already defined on the column.
|
|
973
|
-
*/
|
|
974
|
-
declare const columnWidthMiddlewareFactory: (widths: ColumnWidthConfig) => AXPEntityModifier;
|
|
975
|
-
/**
|
|
976
|
-
* Helper to create a provider for the column width middleware.
|
|
977
|
-
* By default it applies to all entities using the '*' pattern.
|
|
978
|
-
*/
|
|
979
|
-
declare const createColumnWidthMiddlewareProvider: (widths: ColumnWidthConfig, entityName?: string | RegExp) => AXPEntityModifierProvider;
|
|
980
|
-
/**
|
|
981
|
-
* Default provider registered with the default map.
|
|
982
|
-
*/
|
|
983
|
-
declare const columnWidthMiddlewareProvider: AXPEntityModifierProvider;
|
|
1097
|
+
declare function entityDetailsReferenceCreateActions(): AXPEntityAction[];
|
|
984
1098
|
|
|
985
|
-
export { AXMEntityCrudService, AXMEntityCrudServiceImpl, AXPCreateEntityWorkflow, AXPDataSeederService, AXPDeleteEntityWorkflow, AXPEntityApplyUpdatesAction, AXPEntityCommandTriggerViewModel, AXPEntityCreateEvent, AXPEntityCreatePopupAction, AXPEntityCreateSubmittedAction, AXPEntityCreateViewElementViewModel, AXPEntityCreateViewModelFactory, AXPEntityCreateViewSectionViewModel, AXPEntityDataProvider, AXPEntityDataProviderImpl, AXPEntityDefinitionRegistryService, AXPEntityDeletedEvent, AXPEntityDetailListViewModel, AXPEntityDetailViewModelFactory, AXPEntityDetailViewModelResolver,
|
|
986
|
-
export type {
|
|
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, AXPEntityStorageExecutor, AXPEntityStorageRegistry, AXPEntityStorageService, AXPEntityStorageWithMiddlewareService, AXPModifyEntitySectionWorkflow, AXPQuickEntityModifyPopupAction, AXPQuickModifyEntityWorkflow, AXPShowDetailViewAction, AXPShowDetailsViewWorkflow, AXPShowListViewAction, AXPShowListViewWorkflow, AXP_DATA_SEEDER_TOKEN, AXP_ENTITY_CONFIG_TOKEN, AXP_ENTITY_DEFINITION_LOADER, AXP_ENTITY_MODIFIER, AXP_ENTITY_STORAGE_EXTENSION, AXP_ENTITY_STORAGE_MIDDLEWARE_SETUP, auditMiddleware, auditStorage, cachingMiddleware, composeEntityStorageMiddlewares, createModifierContext, dataSanitizationMiddleware, entityDetailsCreateActions, entityDetailsCrudActions, entityDetailsEditAction, entityDetailsReferenceCondition, entityDetailsReferenceCreateActions, entityDetailsSimpleCondition, entityMasterBulkDeleteAction, entityMasterCreateAction, entityMasterCrudActions, entityMasterDeleteAction, entityMasterRecordActions, entityMasterViewAction, entityOverrideDetailsViewAction, errorHandlingMiddleware, generateRequestId, loggingMiddleware, performanceMiddleware, provideEntitySpecificMiddleware, provideEntityStorageMiddleware, provideGlobalEntityStorageMiddleware, provideOperationSpecificMiddleware, userContextMiddleware, validationMiddleware };
|
|
1100
|
+
export type { AXPAuditEntry, AXPAuditStorage, AXPAuditable, AXPDataSeeder, AXPEntityConfigs, AXPEntityCreateDto, AXPEntityDefinitionLoader, AXPEntityDefinitionPreloader, AXPEntityDeleteOptions, AXPEntityDetailDto, AXPEntityListItemDto, AXPEntityMasterListViewSortPropViewModel, AXPEntityModel, AXPEntityModifier, AXPEntityModifierContext, AXPEntityModifierProvider, AXPEntityOutputDto, AXPEntityPreloadEntity, AXPEntityStorageContext, AXPEntityStorageMiddleware, AXPEntityStorageMiddlewareConfig, AXPEntityUpdateDto };
|