@acorex/platform 20.2.4-next.9 → 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 -71
- package/fesm2022/acorex-platform-common.mjs +9 -19
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +158 -113
- 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 +46 -1087
- 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 +1064 -3100
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +72 -332
- 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 +1442 -2641
- 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 +20 -217
- package/layout/designer/index.d.ts +47 -16
- package/layout/entity/index.d.ts +336 -196
- package/layout/views/index.d.ts +21 -118
- package/package.json +37 -23
- package/widgets/index.d.ts +224 -275
- package/workflow/index.d.ts +1 -3
- 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,15 +1,15 @@
|
|
|
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
15
|
|
|
@@ -41,8 +41,8 @@ declare class AXPEntityCommandTriggerViewModel {
|
|
|
41
41
|
constructor(entity: AXPEntity, action: AXPEntityAction);
|
|
42
42
|
}
|
|
43
43
|
declare class AXPEntityListViewColumnViewModel {
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
private property;
|
|
45
|
+
private column;
|
|
46
46
|
constructor(property: AXPEntityProperty, column: AXPEntityTableColumn);
|
|
47
47
|
name: string;
|
|
48
48
|
title: string;
|
|
@@ -185,12 +185,9 @@ declare class AXPEntityMasterListViewModel {
|
|
|
185
185
|
private readonly settings;
|
|
186
186
|
private readonly widgetResolver;
|
|
187
187
|
private readonly expressionEvaluator;
|
|
188
|
-
private readonly commandService;
|
|
189
188
|
private readonly filterOperatorMiddleware;
|
|
190
189
|
private settingEntityKey;
|
|
191
190
|
private readonly destroyed;
|
|
192
|
-
private lastAppliedSortKey;
|
|
193
|
-
private lastAppliedFilterKey;
|
|
194
191
|
events$: Subject<{
|
|
195
192
|
action: string;
|
|
196
193
|
meta?: any;
|
|
@@ -201,7 +198,7 @@ declare class AXPEntityMasterListViewModel {
|
|
|
201
198
|
dataSource: AXDataSource<unknown>;
|
|
202
199
|
constructor(injector: Injector, config: AXPEntity);
|
|
203
200
|
applySettings(): Promise<void>;
|
|
204
|
-
saveSettings(changesType: 'columnSizes' | 'columnOrders' | 'view' | 'pageSize'
|
|
201
|
+
saveSettings(changesType: 'columnSizes' | 'columnOrders' | 'view' | 'pageSize', data?: any): Promise<void>;
|
|
205
202
|
selectedItems: _angular_core.WritableSignal<any[]>;
|
|
206
203
|
parentKey: _angular_core.Signal<string | undefined>;
|
|
207
204
|
hasSelectedItems: _angular_core.Signal<boolean>;
|
|
@@ -263,6 +260,7 @@ declare class AXPEntityMasterSingleViewGroupViewModel {
|
|
|
263
260
|
group: _acorex_platform_common.AXPEntityPropertyGroup;
|
|
264
261
|
name: _angular_core.WritableSignal<string>;
|
|
265
262
|
isLoading: _angular_core.WritableSignal<boolean>;
|
|
263
|
+
type: _angular_core.WritableSignal<"wrapper" | "section">;
|
|
266
264
|
title: _angular_core.Signal<string>;
|
|
267
265
|
description: _angular_core.Signal<string | null | undefined>;
|
|
268
266
|
layout: _angular_core.Signal<AXPGridLayoutOptions>;
|
|
@@ -293,14 +291,10 @@ declare class AXPEntityMasterSingleViewModel {
|
|
|
293
291
|
private readonly session;
|
|
294
292
|
private readonly formatService;
|
|
295
293
|
private readonly workflow;
|
|
296
|
-
private readonly commandService;
|
|
297
294
|
private readonly destroyed;
|
|
298
295
|
private translateService;
|
|
299
296
|
private entityService;
|
|
300
297
|
private expressionEvaluator;
|
|
301
|
-
private entityDefinitionRegistryService;
|
|
302
|
-
private _updateTrigger;
|
|
303
|
-
readonly updateTrigger: _angular_core.Signal<number>;
|
|
304
298
|
constructor(injector: Injector, config: AXPEntity, entityData: any);
|
|
305
299
|
context: _angular_core.WritableSignal<any>;
|
|
306
300
|
private actions;
|
|
@@ -348,6 +342,7 @@ declare class AXPEntityMasterUpdateViewModel {
|
|
|
348
342
|
private props;
|
|
349
343
|
private entityDef;
|
|
350
344
|
private workflow;
|
|
345
|
+
private lockService;
|
|
351
346
|
private sessionService;
|
|
352
347
|
private get moduleName();
|
|
353
348
|
private get entityName();
|
|
@@ -359,6 +354,7 @@ declare class AXPEntityMasterUpdateViewModel {
|
|
|
359
354
|
elements: _angular_core.Signal<AXPEntityMasterUpdateElementViewModel[]>;
|
|
360
355
|
save(): Promise<any>;
|
|
361
356
|
reset(): void;
|
|
357
|
+
unlock(): Promise<void>;
|
|
362
358
|
}
|
|
363
359
|
declare class AXPEntityMasterUpdateViewModelFactory {
|
|
364
360
|
private entityService;
|
|
@@ -457,10 +453,6 @@ interface AXPEntityModifierContext {
|
|
|
457
453
|
get(): AXPEntityMasterSingleLayoutView | undefined;
|
|
458
454
|
update(updater: (c: AXPEntityMasterSingleLayoutView | undefined) => AXPEntityMasterSingleLayoutView): AXPEntityModifierContext;
|
|
459
455
|
};
|
|
460
|
-
list: {
|
|
461
|
-
get(): AXPEntityMasterListView | undefined;
|
|
462
|
-
update(updater: (c: AXPEntityMasterListView | undefined) => AXPEntityMasterListView): AXPEntityModifierContext;
|
|
463
|
-
};
|
|
464
456
|
};
|
|
465
457
|
detail: {
|
|
466
458
|
get(): NonNullable<AXPEntity['interfaces']>['detail'] | undefined;
|
|
@@ -475,31 +467,16 @@ interface AXPEntityModifierContext {
|
|
|
475
467
|
}
|
|
476
468
|
type AXPEntityModifier = (context: AXPEntityModifierContext) => void;
|
|
477
469
|
interface AXPEntityModifierProvider {
|
|
478
|
-
entityName: string
|
|
470
|
+
entityName: string;
|
|
479
471
|
modifier: AXPEntityModifier;
|
|
480
472
|
}
|
|
481
473
|
|
|
482
|
-
declare function ensureListActions(ctx: AXPEntityModifierContext): void;
|
|
483
|
-
declare function actionExists(actions: any[] | undefined, commandName: string, name?: string): boolean;
|
|
484
|
-
|
|
485
|
-
interface AXPEntityActionPlugin {
|
|
486
|
-
name: string;
|
|
487
|
-
order?: number;
|
|
488
|
-
apply: (ctx: AXPEntityModifierContext, options?: any) => Promise<void> | void;
|
|
489
|
-
}
|
|
490
|
-
declare const AXP_ENTITY_ACTION_PLUGIN: InjectionToken<AXPEntityActionPlugin[]>;
|
|
491
|
-
|
|
492
474
|
declare class AXPEntityMiddleware {
|
|
493
|
-
private
|
|
494
|
-
|
|
495
|
-
protected providedModifiers: AXPEntityModifierProvider[];
|
|
496
|
-
protected providedActionPlugins: AXPEntityActionPlugin[];
|
|
497
|
-
protected injector: Injector;
|
|
475
|
+
private modifiers;
|
|
476
|
+
protected providedModifiers: _acorex_platform_layout_entity.AXPEntityModifierProvider[];
|
|
498
477
|
constructor();
|
|
499
|
-
register(entityName: string
|
|
500
|
-
process(entity: AXPEntity):
|
|
501
|
-
private wildcardToRegExp;
|
|
502
|
-
private normalizeRegExp;
|
|
478
|
+
register(entityName: string, modifier: AXPEntityModifier): void;
|
|
479
|
+
process(entity: AXPEntity): AXPEntity;
|
|
503
480
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPEntityMiddleware, never>;
|
|
504
481
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXPEntityMiddleware>;
|
|
505
482
|
}
|
|
@@ -508,6 +485,56 @@ declare function createModifierContext(entity: AXPEntity): AXPEntityModifierCont
|
|
|
508
485
|
|
|
509
486
|
declare const AXP_ENTITY_MODIFIER: InjectionToken<AXPEntityModifierProvider[]>;
|
|
510
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
|
+
|
|
511
538
|
interface AXPAuditable {
|
|
512
539
|
createdAt?: Date;
|
|
513
540
|
updatedAt?: Date;
|
|
@@ -530,31 +557,6 @@ interface AXPEntityDetailDto<Id> extends AXPEntityOutputDto<Id> {
|
|
|
530
557
|
interface AXPEntityListItemDto<Id> extends AXPEntityOutputDto<Id> {
|
|
531
558
|
}
|
|
532
559
|
|
|
533
|
-
type AXPEntityOp = 'initial' | 'create' | 'update' | 'delete' | 'getOne' | 'getAll' | 'query';
|
|
534
|
-
interface AXPEntityStorageContext<TKey = any, TDetailDto extends AXPEntityDetailDto<TKey> = any, TListItemDto extends AXPEntityListItemDto<TKey> = any, TCreateDto extends AXPEntityCreateDto = any, TUpdateDto extends AXPEntityUpdateDto<TKey> = any> {
|
|
535
|
-
op: AXPEntityOp;
|
|
536
|
-
entityName: string;
|
|
537
|
-
id?: TKey;
|
|
538
|
-
data?: TCreateDto | Omit<Partial<TUpdateDto>, 'id'>;
|
|
539
|
-
request?: AXPQueryRequest;
|
|
540
|
-
previous?: TDetailDto;
|
|
541
|
-
result?: any;
|
|
542
|
-
locals: Map<string, unknown>;
|
|
543
|
-
backend: {
|
|
544
|
-
getOneRaw: (entityName: string, id: TKey) => Promise<TDetailDto>;
|
|
545
|
-
insertOneRaw: (entityName: string, entity: TCreateDto) => Promise<TKey>;
|
|
546
|
-
};
|
|
547
|
-
}
|
|
548
|
-
interface AXPEntityStorageMiddleware<TKey = any, TDetailDto extends AXPEntityDetailDto<TKey> = any, TListItemDto extends AXPEntityListItemDto<TKey> = any, TCreateDto extends AXPEntityCreateDto = any, TUpdateDto extends AXPEntityUpdateDto<TKey> = any> {
|
|
549
|
-
target?: {
|
|
550
|
-
ops?: AXPEntityOp[];
|
|
551
|
-
entity?: string | RegExp;
|
|
552
|
-
predicate?: (ctx: AXPEntityStorageContext<TKey, TDetailDto, TListItemDto, TCreateDto, TUpdateDto>) => boolean;
|
|
553
|
-
order?: number;
|
|
554
|
-
};
|
|
555
|
-
execute: (ctx: AXPEntityStorageContext<TKey, TDetailDto, TListItemDto, TCreateDto, TUpdateDto>, next: () => Promise<void>) => Promise<void>;
|
|
556
|
-
}
|
|
557
|
-
|
|
558
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> {
|
|
559
561
|
abstract get dbName(): string;
|
|
560
562
|
abstract initial(entityName: string, collection: TCreateDto[], options?: {
|
|
@@ -621,115 +623,295 @@ declare class AXMEntityCrudServiceImpl<TKey, TDetailDto extends AXPEntityDetailD
|
|
|
621
623
|
get storageService(): AXPEntityStorageService<any, any, any, any, any>;
|
|
622
624
|
}
|
|
623
625
|
|
|
624
|
-
|
|
625
|
-
|
|
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
|
+
}
|
|
626
715
|
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
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;
|
|
630
721
|
private readonly injector;
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
initial(entityName: string, collection: TCreateDto[], options?: {
|
|
637
|
-
mergeType?: 'merge' | 'replace';
|
|
638
|
-
uniqueKeys?: string[];
|
|
639
|
-
}): Promise<TCreateDto[]>;
|
|
722
|
+
private readonly registry;
|
|
723
|
+
constructor(storageService: AXPEntityStorageService<TKey, TDetailDto, TListItemDto, TCreateDto, TUpdateDto>);
|
|
724
|
+
/**
|
|
725
|
+
* Execute getOne operation with middleware pipeline
|
|
726
|
+
*/
|
|
640
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
|
+
*/
|
|
641
739
|
updateOne(entityName: string, id: TKey, keyValues: Omit<Partial<TUpdateDto>, 'id'>): Promise<TDetailDto>;
|
|
740
|
+
/**
|
|
741
|
+
* Execute deleteOne operation with middleware pipeline
|
|
742
|
+
*/
|
|
642
743
|
deleteOne(entityName: string, id: TKey): Promise<void>;
|
|
643
|
-
|
|
644
|
-
|
|
744
|
+
/**
|
|
745
|
+
* Execute query operation with middleware pipeline
|
|
746
|
+
*/
|
|
645
747
|
query(entityName: string, request: AXPQueryRequest): Promise<AXPPagedListResult<TListItemDto>>;
|
|
646
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPMiddlewareEntityStorageService<any, any, any, any, any>, never>;
|
|
647
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXPMiddlewareEntityStorageService<any, any, any, any, any>>;
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
interface AXPEntityPreloadEntity {
|
|
651
|
-
module: string;
|
|
652
|
-
entity: string;
|
|
653
|
-
}
|
|
654
|
-
interface AXPEntityDefinitionPreloader {
|
|
655
|
-
preload(): AXPEntityPreloadEntity[];
|
|
656
|
-
}
|
|
657
|
-
declare class AXPEntityDefinitionRegistryService {
|
|
658
|
-
private providers;
|
|
659
|
-
private resolver;
|
|
660
|
-
private middleware;
|
|
661
|
-
private onChanged;
|
|
662
|
-
get onChanged$(): rxjs.Observable<{
|
|
663
|
-
name: string;
|
|
664
|
-
}>;
|
|
665
|
-
preload(): Promise<void>;
|
|
666
|
-
private entities;
|
|
667
|
-
private entityResolver;
|
|
668
748
|
/**
|
|
669
|
-
*
|
|
670
|
-
* Overloads:
|
|
671
|
-
* - refresh(): refresh all registered entities
|
|
672
|
-
* - refresh(fullName: string): refresh by fully-qualified name `<module>.<entity>`
|
|
673
|
-
* - refresh(moduleName: string, entityName: string): refresh by parts
|
|
749
|
+
* Execute initial operation with middleware pipeline
|
|
674
750
|
*/
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
private refreshOne;
|
|
751
|
+
initial(entityName: string, collection: TCreateDto[], options?: {
|
|
752
|
+
mergeType?: 'merge' | 'replace';
|
|
753
|
+
uniqueKeys?: string[];
|
|
754
|
+
}): Promise<TCreateDto[]>;
|
|
680
755
|
/**
|
|
681
|
-
*
|
|
682
|
-
* of their module and name.
|
|
683
|
-
*
|
|
684
|
-
* @param config The configuration object of the entity to be registered.
|
|
756
|
+
* Execute operation with middleware pipeline
|
|
685
757
|
*/
|
|
686
|
-
|
|
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;
|
|
687
775
|
/**
|
|
688
|
-
*
|
|
689
|
-
*
|
|
690
|
-
* @returns An array of AXPEntity objects.
|
|
776
|
+
* Add a global middleware that applies to all operations
|
|
691
777
|
*/
|
|
692
|
-
|
|
778
|
+
useGlobal(middleware: AXPEntityStorageMiddleware): void;
|
|
693
779
|
/**
|
|
694
|
-
*
|
|
695
|
-
* is not already registered, attempts to load it dynamically. Throws an error if the
|
|
696
|
-
* entity cannot be found or loaded.
|
|
697
|
-
*
|
|
698
|
-
* @param moduleName The module name of the entity.
|
|
699
|
-
* @param entityName The name of the entity.
|
|
700
|
-
* @returns A promise resolving to the entity configuration.
|
|
701
|
-
* @throws Error if the entity configuration cannot be resolved.
|
|
780
|
+
* Add middleware for specific entity
|
|
702
781
|
*/
|
|
703
|
-
|
|
782
|
+
useForEntity(entityName: string, middleware: AXPEntityStorageMiddleware): void;
|
|
704
783
|
/**
|
|
705
|
-
*
|
|
706
|
-
*
|
|
707
|
-
* @param moduleName The module name of the entity.
|
|
708
|
-
* @param entityName The name of the entity.
|
|
709
|
-
* @returns The unique key for the entity.
|
|
784
|
+
* Add middleware for specific operation
|
|
710
785
|
*/
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
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>>;
|
|
714
801
|
}
|
|
715
802
|
|
|
716
803
|
/**
|
|
717
|
-
*
|
|
718
|
-
|
|
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
|
|
719
809
|
*/
|
|
720
|
-
declare
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
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
|
+
}[];
|
|
732
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;
|
|
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;
|
|
733
915
|
|
|
734
916
|
interface AXPEntityConfigs {
|
|
735
917
|
viewers: {
|
|
@@ -739,7 +921,6 @@ interface AXPEntityConfigs {
|
|
|
739
921
|
};
|
|
740
922
|
master: {
|
|
741
923
|
single: () => Type<any> | Promise<Type<any>>;
|
|
742
|
-
details: () => Type<any> | Promise<Type<any>>;
|
|
743
924
|
create: () => Type<any> | Promise<Type<any>>;
|
|
744
925
|
modify: () => Type<any> | Promise<Type<any>>;
|
|
745
926
|
list: () => Type<any> | Promise<Type<any>>;
|
|
@@ -909,52 +1090,11 @@ declare function entityMasterCrudActions(): AXPEntityAction[];
|
|
|
909
1090
|
declare function entityMasterRecordActions(): AXPEntityAction[];
|
|
910
1091
|
declare function entityDetailsCreateActions(parentId: string): AXPEntityAction;
|
|
911
1092
|
declare function entityDetailsSimpleCondition(fk: string): AXPQueryFilter;
|
|
912
|
-
declare function entityDetailsReferenceCondition(
|
|
1093
|
+
declare function entityDetailsReferenceCondition(): AXPQueryFilter[];
|
|
913
1094
|
declare function entityDetailsEditAction(): AXPEntityAction;
|
|
914
1095
|
declare function entityOverrideDetailsViewAction(): AXPEntityAction;
|
|
915
1096
|
declare function entityDetailsCrudActions(parentId: string): AXPEntityAction[];
|
|
916
|
-
declare function entityDetailsReferenceCreateActions(
|
|
917
|
-
type AXPEntityChangeSet = {
|
|
918
|
-
[key: string]: {
|
|
919
|
-
oldValue: any;
|
|
920
|
-
newValue: any;
|
|
921
|
-
added?: any[];
|
|
922
|
-
removed?: any[];
|
|
923
|
-
};
|
|
924
|
-
};
|
|
925
|
-
/**
|
|
926
|
-
* Computes a diff between two plain objects with array-aware semantics.
|
|
927
|
-
* - For arrays of objects with an id field, computes added/removed by id.
|
|
928
|
-
* - For arrays of primitives or objects without id, uses deep equality.
|
|
929
|
-
* - For scalars/objects, reports oldValue/newValue when changed.
|
|
930
|
-
*/
|
|
931
|
-
declare function detectEntityChanges(oldObj: any, newObj: any): AXPEntityChangeSet;
|
|
932
|
-
|
|
933
|
-
declare const eventDispatchMiddleware: AXPEntityStorageMiddleware;
|
|
934
|
-
|
|
935
|
-
/**
|
|
936
|
-
* Map of column name -> width value
|
|
937
|
-
* Example: { title: '300px', description: '300px' }
|
|
938
|
-
*/
|
|
939
|
-
type ColumnWidthConfig = Record<string, string | number>;
|
|
940
|
-
/**
|
|
941
|
-
* Default widths for common text columns
|
|
942
|
-
*/
|
|
943
|
-
declare const DEFAULT_COLUMN_WIDTHS: ColumnWidthConfig;
|
|
944
|
-
/**
|
|
945
|
-
* Factory to create a column width middleware using provided config map.
|
|
946
|
-
* Sets width for columns defined in the map if not already defined on the column.
|
|
947
|
-
*/
|
|
948
|
-
declare const columnWidthMiddlewareFactory: (widths: ColumnWidthConfig) => AXPEntityModifier;
|
|
949
|
-
/**
|
|
950
|
-
* Helper to create a provider for the column width middleware.
|
|
951
|
-
* By default it applies to all entities using the '*' pattern.
|
|
952
|
-
*/
|
|
953
|
-
declare const createColumnWidthMiddlewareProvider: (widths: ColumnWidthConfig, entityName?: string | RegExp) => AXPEntityModifierProvider;
|
|
954
|
-
/**
|
|
955
|
-
* Default provider registered with the default map.
|
|
956
|
-
*/
|
|
957
|
-
declare const columnWidthMiddlewareProvider: AXPEntityModifierProvider;
|
|
1097
|
+
declare function entityDetailsReferenceCreateActions(): AXPEntityAction[];
|
|
958
1098
|
|
|
959
|
-
export { AXMEntityCrudService, AXMEntityCrudServiceImpl, AXPCreateEntityWorkflow, AXPDataSeederService, AXPDeleteEntityWorkflow, AXPEntityApplyUpdatesAction, AXPEntityCommandTriggerViewModel, AXPEntityCreateEvent, AXPEntityCreatePopupAction, AXPEntityCreateSubmittedAction, AXPEntityCreateViewElementViewModel, AXPEntityCreateViewModelFactory, AXPEntityCreateViewSectionViewModel, AXPEntityDataProvider, AXPEntityDataProviderImpl, AXPEntityDefinitionRegistryService, AXPEntityDeletedEvent, AXPEntityDetailListViewModel, AXPEntityDetailViewModelFactory, AXPEntityDetailViewModelResolver,
|
|
960
|
-
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 };
|