@acorex/platform 20.2.3 → 20.2.4-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 +91 -3
- package/core/index.d.ts +65 -58
- package/fesm2022/acorex-platform-common.mjs +16 -8
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +110 -158
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +109 -55
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs +1086 -35
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +15 -122
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +2518 -1006
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +243 -65
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-hHXxHlFG.mjs → acorex-platform-themes-default-entity-master-create-view.component-I7Eq8Nti.mjs} +3 -3
- package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-hHXxHlFG.mjs.map → acorex-platform-themes-default-entity-master-create-view.component-I7Eq8Nti.mjs.map} +1 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DXGLsVis.mjs +706 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DXGLsVis.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-modify-view.component-DC3MrDtI.mjs → acorex-platform-themes-default-entity-master-modify-view.component-16sdMBvH.mjs} +3 -10
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-16sdMBvH.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-Bb90PeHq.mjs → acorex-platform-themes-default-entity-master-single-view.component-CVaJzWb2.mjs} +25 -17
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-CVaJzWb2.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +65 -495
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-shared-color-chooser-column.component-DjKLg513.mjs → acorex-platform-themes-shared-theme-color-chooser-column.component-DjKLg513.mjs} +1 -1
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-column.component-DjKLg513.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-color-chooser-view.component-DE0wO98F.mjs → acorex-platform-themes-shared-theme-color-chooser-view.component-DE0wO98F.mjs} +1 -1
- package/fesm2022/acorex-platform-themes-shared-theme-color-chooser-view.component-DE0wO98F.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared.mjs +10 -12
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/{acorex-platform-widgets-checkbox-widget-designer.component-BI18uzNZ.mjs → acorex-platform-widgets-checkbox-widget-designer.component-Cv7dEMCm.mjs} +2 -2
- package/fesm2022/acorex-platform-widgets-checkbox-widget-designer.component-Cv7dEMCm.mjs.map +1 -0
- package/fesm2022/acorex-platform-widgets-extra-properties-schema-widget-edit.component-B3SJUnGQ.mjs +50 -0
- package/fesm2022/acorex-platform-widgets-extra-properties-schema-widget-edit.component-B3SJUnGQ.mjs.map +1 -0
- package/fesm2022/acorex-platform-widgets-extra-properties-schema-widget-view.component-BLR0JkRt.mjs +42 -0
- package/fesm2022/acorex-platform-widgets-extra-properties-schema-widget-view.component-BLR0JkRt.mjs.map +1 -0
- package/fesm2022/acorex-platform-widgets-extra-properties-values-widget-edit.component-hzR2FgOm.mjs +55 -0
- package/fesm2022/acorex-platform-widgets-extra-properties-values-widget-edit.component-hzR2FgOm.mjs.map +1 -0
- package/fesm2022/acorex-platform-widgets-extra-properties-values-widget-view.component-IDm6Clua.mjs +50 -0
- package/fesm2022/acorex-platform-widgets-extra-properties-values-widget-view.component-IDm6Clua.mjs.map +1 -0
- package/fesm2022/acorex-platform-widgets-extra-properties-widget-edit.component-BRO9tYDa.mjs +48 -0
- package/fesm2022/acorex-platform-widgets-extra-properties-widget-edit.component-BRO9tYDa.mjs.map +1 -0
- package/fesm2022/acorex-platform-widgets-extra-properties-widget-view.component-CkpLimyW.mjs +42 -0
- package/fesm2022/acorex-platform-widgets-extra-properties-widget-view.component-CkpLimyW.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-file-list-popup.component-DFbPO0ud.mjs → acorex-platform-widgets-file-list-popup.component-B601gPsW.mjs} +66 -3
- package/fesm2022/acorex-platform-widgets-file-list-popup.component-B601gPsW.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-tabular-data-edit-popup.component-nLZYiPnF.mjs → acorex-platform-widgets-tabular-data-edit-popup.component-BDQIfr0g.mjs} +5 -5
- package/fesm2022/{acorex-platform-widgets-tabular-data-edit-popup.component-nLZYiPnF.mjs.map → acorex-platform-widgets-tabular-data-edit-popup.component-BDQIfr0g.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-widgets-tabular-data-view-popup.component-D6kiasYM.mjs → acorex-platform-widgets-tabular-data-view-popup.component-CmPqtt0G.mjs} +3 -3
- package/fesm2022/{acorex-platform-widgets-tabular-data-view-popup.component-D6kiasYM.mjs.map → acorex-platform-widgets-tabular-data-view-popup.component-CmPqtt0G.mjs.map} +1 -1
- package/fesm2022/acorex-platform-widgets.mjs +1352 -218
- package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +3 -0
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/layout/builder/index.d.ts +19 -5
- package/layout/components/index.d.ts +214 -9
- package/layout/designer/index.d.ts +3 -46
- package/layout/entity/index.d.ts +203 -332
- package/layout/views/index.d.ts +83 -21
- package/package.json +5 -5
- package/themes/default/index.d.ts +5 -2
- package/widgets/index.d.ts +107 -11
- package/workflow/index.d.ts +3 -1
- package/fesm2022/acorex-platform-themes-default-create-entity-view.component-SY0oMDoH.mjs +0 -22
- package/fesm2022/acorex-platform-themes-default-create-entity-view.component-SY0oMDoH.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-hf4QOz_4.mjs +0 -665
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-hf4QOz_4.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-DC3MrDtI.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-Bb90PeHq.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-color-chooser-column.component-DjKLg513.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-color-chooser-view.component-DE0wO98F.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-checkbox-widget-designer.component-BI18uzNZ.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-file-list-popup.component-DFbPO0ud.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,
|
|
2
|
+
import { InjectionToken, Injector, Type } from '@angular/core';
|
|
3
3
|
import { AXStyleColorType, AXDataSource, AXDataSourceFilterOption } from '@acorex/cdk/common';
|
|
4
4
|
import * as _acorex_platform_common from '@acorex/platform/common';
|
|
5
|
-
import { AXPEntityCommandScope, AXPEntity, AXPEntityAction, AXPEntityProperty, AXPEntityTableColumn, AXPRelatedEntity, AXPEntitySectionView, AXPGridLayoutOptions, AXPEntityPropertyCreateView, AXPEntityPropertyLayoutConfig, AXPQueryView, AXPEntityPropertyView, AXPCategoryEntity, AXPEntityPropertyGroup, AXPEntityMasterCreateLayoutView, AXPEntityMasterUpdateLayoutView, AXPEntityMasterSingleLayoutView, AXPEntityDetailListView, AXPQueryFilter } from '@acorex/platform/common';
|
|
5
|
+
import { AXPEntityCommandScope, AXPEntity, AXPEntityAction, AXPEntityProperty, AXPEntityTableColumn, AXPRelatedEntity, AXPEntitySectionView, AXPGridLayoutOptions, AXPEntityPropertyCreateView, AXPEntityPropertyLayoutConfig, AXPQueryView, AXPEntityPropertyView, AXPCategoryEntity, AXPEntityPropertyGroup, AXPEntityMasterCreateLayoutView, AXPEntityMasterUpdateLayoutView, AXPEntityMasterSingleLayoutView, AXPEntityMasterListView, AXPEntityDetailListView, AXPQueryFilter } from '@acorex/platform/common';
|
|
6
6
|
import { AXPMetaData, AXPBreadcrumbItem, AXPFilterQuery, AXPFilterDefinition, AXPExecuteCommand, AXPQueryRequest, AXPPagedListResult, AXPAppStartUpService } from '@acorex/platform/core';
|
|
7
7
|
import * as i3 from '@acorex/platform/layout/builder';
|
|
8
8
|
import { AXPWidgetColumnNode, AXPWidgetNode, AXPLayoutBuilderService } from '@acorex/platform/layout/builder';
|
|
9
9
|
import * as i1 from '@angular/router';
|
|
10
10
|
import { ResolveFn } from '@angular/router';
|
|
11
|
+
import * as rxjs from 'rxjs';
|
|
11
12
|
import { Subject } from 'rxjs';
|
|
12
|
-
import * as _acorex_platform_layout_entity from '@acorex/platform/layout/entity';
|
|
13
13
|
import * as i2 from '@acorex/platform/workflow';
|
|
14
14
|
import { AXPWorkflowAction, AXPWorkflowContext, AXPWorkflow } from '@acorex/platform/workflow';
|
|
15
15
|
|
|
@@ -87,7 +87,17 @@ declare class AXPEntityDetailListViewModel {
|
|
|
87
87
|
applyFilterAndSort(): Promise<void>;
|
|
88
88
|
columns: _angular_core.Signal<AXPEntityListViewColumnViewModel[]>;
|
|
89
89
|
executeCommand(commandName: string, data?: any): Promise<void>;
|
|
90
|
-
|
|
90
|
+
evaluateExpressions: (actionData: {
|
|
91
|
+
[key: string]: string;
|
|
92
|
+
} | string) => Promise<any>;
|
|
93
|
+
/**
|
|
94
|
+
* Evaluate hidden/disabled expressions for primary actions and return the visible list.
|
|
95
|
+
*/
|
|
96
|
+
getPrimaryActions(): Promise<AXPEntityCommandTriggerViewModel[]>;
|
|
97
|
+
/**
|
|
98
|
+
* Evaluate hidden/disabled expressions for secondary actions and return the visible list.
|
|
99
|
+
*/
|
|
100
|
+
getSecondaryActions(): Promise<AXPEntityCommandTriggerViewModel[]>;
|
|
91
101
|
}
|
|
92
102
|
|
|
93
103
|
declare class AXPEntityCreateViewSectionViewModel {
|
|
@@ -175,9 +185,12 @@ declare class AXPEntityMasterListViewModel {
|
|
|
175
185
|
private readonly settings;
|
|
176
186
|
private readonly widgetResolver;
|
|
177
187
|
private readonly expressionEvaluator;
|
|
188
|
+
private readonly commandService;
|
|
178
189
|
private readonly filterOperatorMiddleware;
|
|
179
190
|
private settingEntityKey;
|
|
180
191
|
private readonly destroyed;
|
|
192
|
+
private lastAppliedSortKey;
|
|
193
|
+
private lastAppliedFilterKey;
|
|
181
194
|
events$: Subject<{
|
|
182
195
|
action: string;
|
|
183
196
|
meta?: any;
|
|
@@ -188,7 +201,7 @@ declare class AXPEntityMasterListViewModel {
|
|
|
188
201
|
dataSource: AXDataSource<unknown>;
|
|
189
202
|
constructor(injector: Injector, config: AXPEntity);
|
|
190
203
|
applySettings(): Promise<void>;
|
|
191
|
-
saveSettings(changesType: 'columnSizes' | 'columnOrders' | 'view' | 'pageSize', data?: any): Promise<void>;
|
|
204
|
+
saveSettings(changesType: 'columnSizes' | 'columnOrders' | 'view' | 'pageSize' | 'filters' | 'sorts', data?: any): Promise<void>;
|
|
192
205
|
selectedItems: _angular_core.WritableSignal<any[]>;
|
|
193
206
|
parentKey: _angular_core.Signal<string | undefined>;
|
|
194
207
|
hasSelectedItems: _angular_core.Signal<boolean>;
|
|
@@ -281,10 +294,14 @@ declare class AXPEntityMasterSingleViewModel {
|
|
|
281
294
|
private readonly session;
|
|
282
295
|
private readonly formatService;
|
|
283
296
|
private readonly workflow;
|
|
297
|
+
private readonly commandService;
|
|
284
298
|
private readonly destroyed;
|
|
285
299
|
private translateService;
|
|
286
300
|
private entityService;
|
|
287
301
|
private expressionEvaluator;
|
|
302
|
+
private entityDefinitionRegistryService;
|
|
303
|
+
private _updateTrigger;
|
|
304
|
+
readonly updateTrigger: _angular_core.Signal<number>;
|
|
288
305
|
constructor(injector: Injector, config: AXPEntity, entityData: any);
|
|
289
306
|
context: _angular_core.WritableSignal<any>;
|
|
290
307
|
private actions;
|
|
@@ -332,7 +349,6 @@ declare class AXPEntityMasterUpdateViewModel {
|
|
|
332
349
|
private props;
|
|
333
350
|
private entityDef;
|
|
334
351
|
private workflow;
|
|
335
|
-
private lockService;
|
|
336
352
|
private sessionService;
|
|
337
353
|
private get moduleName();
|
|
338
354
|
private get entityName();
|
|
@@ -344,7 +360,6 @@ declare class AXPEntityMasterUpdateViewModel {
|
|
|
344
360
|
elements: _angular_core.Signal<AXPEntityMasterUpdateElementViewModel[]>;
|
|
345
361
|
save(): Promise<any>;
|
|
346
362
|
reset(): void;
|
|
347
|
-
unlock(): Promise<void>;
|
|
348
363
|
}
|
|
349
364
|
declare class AXPEntityMasterUpdateViewModelFactory {
|
|
350
365
|
private entityService;
|
|
@@ -443,6 +458,10 @@ interface AXPEntityModifierContext {
|
|
|
443
458
|
get(): AXPEntityMasterSingleLayoutView | undefined;
|
|
444
459
|
update(updater: (c: AXPEntityMasterSingleLayoutView | undefined) => AXPEntityMasterSingleLayoutView): AXPEntityModifierContext;
|
|
445
460
|
};
|
|
461
|
+
list: {
|
|
462
|
+
get(): AXPEntityMasterListView | undefined;
|
|
463
|
+
update(updater: (c: AXPEntityMasterListView | undefined) => AXPEntityMasterListView): AXPEntityModifierContext;
|
|
464
|
+
};
|
|
446
465
|
};
|
|
447
466
|
detail: {
|
|
448
467
|
get(): NonNullable<AXPEntity['interfaces']>['detail'] | undefined;
|
|
@@ -457,16 +476,31 @@ interface AXPEntityModifierContext {
|
|
|
457
476
|
}
|
|
458
477
|
type AXPEntityModifier = (context: AXPEntityModifierContext) => void;
|
|
459
478
|
interface AXPEntityModifierProvider {
|
|
460
|
-
entityName: string;
|
|
479
|
+
entityName: string | RegExp;
|
|
461
480
|
modifier: AXPEntityModifier;
|
|
462
481
|
}
|
|
463
482
|
|
|
483
|
+
declare function ensureListActions(ctx: AXPEntityModifierContext): void;
|
|
484
|
+
declare function actionExists(actions: any[] | undefined, commandName: string, name?: string): boolean;
|
|
485
|
+
|
|
486
|
+
interface AXPEntityActionPlugin {
|
|
487
|
+
name: string;
|
|
488
|
+
order?: number;
|
|
489
|
+
apply: (ctx: AXPEntityModifierContext, options?: any) => Promise<void> | void;
|
|
490
|
+
}
|
|
491
|
+
declare const AXP_ENTITY_ACTION_PLUGIN: InjectionToken<AXPEntityActionPlugin[]>;
|
|
492
|
+
|
|
464
493
|
declare class AXPEntityMiddleware {
|
|
465
|
-
private
|
|
466
|
-
|
|
494
|
+
private exactModifiers;
|
|
495
|
+
private patternModifiers;
|
|
496
|
+
protected providedModifiers: AXPEntityModifierProvider[];
|
|
497
|
+
protected providedActionPlugins: AXPEntityActionPlugin[];
|
|
498
|
+
protected injector: Injector;
|
|
467
499
|
constructor();
|
|
468
|
-
register(entityName: string, modifier: AXPEntityModifier): void;
|
|
469
|
-
process(entity: AXPEntity): AXPEntity
|
|
500
|
+
register(entityName: string | RegExp, modifier: AXPEntityModifier): void;
|
|
501
|
+
process(entity: AXPEntity): Promise<AXPEntity>;
|
|
502
|
+
private wildcardToRegExp;
|
|
503
|
+
private normalizeRegExp;
|
|
470
504
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPEntityMiddleware, never>;
|
|
471
505
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXPEntityMiddleware>;
|
|
472
506
|
}
|
|
@@ -475,56 +509,6 @@ declare function createModifierContext(entity: AXPEntity): AXPEntityModifierCont
|
|
|
475
509
|
|
|
476
510
|
declare const AXP_ENTITY_MODIFIER: InjectionToken<AXPEntityModifierProvider[]>;
|
|
477
511
|
|
|
478
|
-
interface AXPEntityPreloadEntity {
|
|
479
|
-
module: string;
|
|
480
|
-
entity: string;
|
|
481
|
-
}
|
|
482
|
-
interface AXPEntityDefinitionPreloader {
|
|
483
|
-
preload(): AXPEntityPreloadEntity[];
|
|
484
|
-
}
|
|
485
|
-
declare class AXPEntityDefinitionRegistryService {
|
|
486
|
-
private providers;
|
|
487
|
-
private resolver;
|
|
488
|
-
private middleware;
|
|
489
|
-
preload(): Promise<void>;
|
|
490
|
-
private entities;
|
|
491
|
-
private entityResolver;
|
|
492
|
-
/**
|
|
493
|
-
* Registers a new entity configuration. Entities are identified uniquely by a combination
|
|
494
|
-
* of their module and name.
|
|
495
|
-
*
|
|
496
|
-
* @param config The configuration object of the entity to be registered.
|
|
497
|
-
*/
|
|
498
|
-
register(config: AXPEntity): void;
|
|
499
|
-
/**
|
|
500
|
-
* Returns an array of all registered entity configurations.
|
|
501
|
-
*
|
|
502
|
-
* @returns An array of AXPEntity objects.
|
|
503
|
-
*/
|
|
504
|
-
getAll(): AXPEntity[];
|
|
505
|
-
/**
|
|
506
|
-
* Resolves an entity configuration based on module and entity name. If the configuration
|
|
507
|
-
* is not already registered, attempts to load it dynamically. Throws an error if the
|
|
508
|
-
* entity cannot be found or loaded.
|
|
509
|
-
*
|
|
510
|
-
* @param moduleName The module name of the entity.
|
|
511
|
-
* @param entityName The name of the entity.
|
|
512
|
-
* @returns A promise resolving to the entity configuration.
|
|
513
|
-
* @throws Error if the entity configuration cannot be resolved.
|
|
514
|
-
*/
|
|
515
|
-
resolve(moduleName: string, entityName: string): Promise<AXPEntity>;
|
|
516
|
-
/**
|
|
517
|
-
* Creates a unique key for an entity based on its module and name.
|
|
518
|
-
*
|
|
519
|
-
* @param moduleName The module name of the entity.
|
|
520
|
-
* @param entityName The name of the entity.
|
|
521
|
-
* @returns The unique key for the entity.
|
|
522
|
-
*/
|
|
523
|
-
private createEntityKey;
|
|
524
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPEntityDefinitionRegistryService, never>;
|
|
525
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXPEntityDefinitionRegistryService>;
|
|
526
|
-
}
|
|
527
|
-
|
|
528
512
|
interface AXPAuditable {
|
|
529
513
|
createdAt?: Date;
|
|
530
514
|
updatedAt?: Date;
|
|
@@ -547,6 +531,31 @@ interface AXPEntityDetailDto<Id> extends AXPEntityOutputDto<Id> {
|
|
|
547
531
|
interface AXPEntityListItemDto<Id> extends AXPEntityOutputDto<Id> {
|
|
548
532
|
}
|
|
549
533
|
|
|
534
|
+
type AXPEntityOp = 'initial' | 'create' | 'update' | 'delete' | 'getOne' | 'getAll' | 'query';
|
|
535
|
+
interface AXPEntityStorageContext<TKey = any, TDetailDto extends AXPEntityDetailDto<TKey> = any, TListItemDto extends AXPEntityListItemDto<TKey> = any, TCreateDto extends AXPEntityCreateDto = any, TUpdateDto extends AXPEntityUpdateDto<TKey> = any> {
|
|
536
|
+
op: AXPEntityOp;
|
|
537
|
+
entityName: string;
|
|
538
|
+
id?: TKey;
|
|
539
|
+
data?: TCreateDto | Omit<Partial<TUpdateDto>, 'id'>;
|
|
540
|
+
request?: AXPQueryRequest;
|
|
541
|
+
previous?: TDetailDto;
|
|
542
|
+
result?: any;
|
|
543
|
+
locals: Map<string, unknown>;
|
|
544
|
+
backend: {
|
|
545
|
+
getOneRaw: (entityName: string, id: TKey) => Promise<TDetailDto>;
|
|
546
|
+
insertOneRaw: (entityName: string, entity: TCreateDto) => Promise<TKey>;
|
|
547
|
+
};
|
|
548
|
+
}
|
|
549
|
+
interface AXPEntityStorageMiddleware<TKey = any, TDetailDto extends AXPEntityDetailDto<TKey> = any, TListItemDto extends AXPEntityListItemDto<TKey> = any, TCreateDto extends AXPEntityCreateDto = any, TUpdateDto extends AXPEntityUpdateDto<TKey> = any> {
|
|
550
|
+
target?: {
|
|
551
|
+
ops?: AXPEntityOp[];
|
|
552
|
+
entity?: string | RegExp;
|
|
553
|
+
predicate?: (ctx: AXPEntityStorageContext<TKey, TDetailDto, TListItemDto, TCreateDto, TUpdateDto>) => boolean;
|
|
554
|
+
order?: number;
|
|
555
|
+
};
|
|
556
|
+
execute: (ctx: AXPEntityStorageContext<TKey, TDetailDto, TListItemDto, TCreateDto, TUpdateDto>, next: () => Promise<void>) => Promise<void>;
|
|
557
|
+
}
|
|
558
|
+
|
|
550
559
|
declare abstract class AXPEntityStorageService<TKey, TDetailDto extends AXPEntityDetailDto<TKey> = AXPEntityModel<TKey>, TListItemDto extends AXPEntityListItemDto<TKey> = TDetailDto, TCreateDto extends AXPEntityCreateDto = TDetailDto, TUpdateDto extends AXPEntityUpdateDto<TKey> = TDetailDto> {
|
|
551
560
|
abstract get dbName(): string;
|
|
552
561
|
abstract initial(entityName: string, collection: TCreateDto[], options?: {
|
|
@@ -613,167 +622,18 @@ declare class AXMEntityCrudServiceImpl<TKey, TDetailDto extends AXPEntityDetailD
|
|
|
613
622
|
get storageService(): AXPEntityStorageService<any, any, any, any, any>;
|
|
614
623
|
}
|
|
615
624
|
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
*/
|
|
619
|
-
interface AXPEntityStorageContext<TKey = any, TDetailDto extends AXPEntityDetailDto<TKey> = any, TListItemDto extends AXPEntityListItemDto<TKey> = any, TCreateDto extends AXPEntityCreateDto = any, TUpdateDto extends AXPEntityUpdateDto<TKey> = any> {
|
|
620
|
-
/** Operation type being performed */
|
|
621
|
-
operation: 'getOne' | 'getAll' | 'insertOne' | 'updateOne' | 'deleteOne' | 'query' | 'initial';
|
|
622
|
-
/** Entity name */
|
|
623
|
-
entityName: string;
|
|
624
|
-
/** Database name */
|
|
625
|
-
dbName: string;
|
|
626
|
-
/** Input parameters for the operation */
|
|
627
|
-
input: {
|
|
628
|
-
id?: TKey;
|
|
629
|
-
entity?: TCreateDto;
|
|
630
|
-
keyValues?: Omit<Partial<TUpdateDto>, 'id'>;
|
|
631
|
-
request?: AXPQueryRequest;
|
|
632
|
-
collection?: TCreateDto[];
|
|
633
|
-
options?: {
|
|
634
|
-
mergeType?: 'merge' | 'replace';
|
|
635
|
-
uniqueKeys?: string[];
|
|
636
|
-
};
|
|
637
|
-
};
|
|
638
|
-
/** Metadata for the operation */
|
|
639
|
-
metadata: {
|
|
640
|
-
startTime: number;
|
|
641
|
-
requestId: string;
|
|
642
|
-
user?: any;
|
|
643
|
-
[key: string]: any;
|
|
644
|
-
};
|
|
645
|
-
}
|
|
646
|
-
/**
|
|
647
|
-
* Entity Storage Middleware function type
|
|
648
|
-
*/
|
|
649
|
-
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>;
|
|
650
|
-
/**
|
|
651
|
-
* Compose entity storage middlewares into a pipeline
|
|
652
|
-
*/
|
|
653
|
-
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>;
|
|
654
|
-
/**
|
|
655
|
-
* Helper function to generate unique request ID
|
|
656
|
-
*/
|
|
657
|
-
declare function generateRequestId(): string;
|
|
625
|
+
declare const AXP_ENTITY_STORAGE_BACKEND: InjectionToken<AXPEntityStorageService<any, any, any, any, any>>;
|
|
626
|
+
declare const AXP_ENTITY_STORAGE_MIDDLEWARE: InjectionToken<AXPEntityStorageMiddleware<any, any, any, any, any>[]>;
|
|
658
627
|
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
declare class AXPEntityStorageRegistry {
|
|
663
|
-
private globalMiddlewares;
|
|
664
|
-
private entitySpecificMiddlewares;
|
|
665
|
-
private operationSpecificMiddlewares;
|
|
666
|
-
/**
|
|
667
|
-
* Add a global middleware that applies to all operations
|
|
668
|
-
*/
|
|
669
|
-
useGlobal(middleware: AXPEntityStorageMiddleware): void;
|
|
670
|
-
/**
|
|
671
|
-
* Add middleware for specific entity
|
|
672
|
-
*/
|
|
673
|
-
useForEntity(entityName: string, middleware: AXPEntityStorageMiddleware): void;
|
|
674
|
-
/**
|
|
675
|
-
* Add middleware for specific operation (getOne, insertOne, etc.)
|
|
676
|
-
*/
|
|
677
|
-
useForOperation(operation: string, middleware: AXPEntityStorageMiddleware): void;
|
|
678
|
-
/**
|
|
679
|
-
* Get all applicable middlewares for a given context
|
|
680
|
-
*/
|
|
681
|
-
getMiddlewares(entityName: string, operation: string): AXPEntityStorageMiddleware[];
|
|
682
|
-
/**
|
|
683
|
-
* Get all global middlewares
|
|
684
|
-
*/
|
|
685
|
-
getGlobalMiddlewares(): readonly AXPEntityStorageMiddleware[];
|
|
686
|
-
/**
|
|
687
|
-
* Remove middleware from global middlewares
|
|
688
|
-
*/
|
|
689
|
-
removeGlobalMiddleware(middleware: AXPEntityStorageMiddleware): boolean;
|
|
690
|
-
/**
|
|
691
|
-
* Clear all middlewares
|
|
692
|
-
*/
|
|
693
|
-
clear(): void;
|
|
694
|
-
/**
|
|
695
|
-
* Get registered entity names that have specific middlewares
|
|
696
|
-
*/
|
|
697
|
-
getRegisteredEntityNames(): string[];
|
|
698
|
-
/**
|
|
699
|
-
* Get registered operation names that have specific middlewares
|
|
700
|
-
*/
|
|
701
|
-
getRegisteredOperations(): string[];
|
|
702
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPEntityStorageRegistry, never>;
|
|
703
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXPEntityStorageRegistry>;
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
/**
|
|
707
|
-
* Executor that wraps entity storage operations with middleware pipeline
|
|
708
|
-
*/
|
|
709
|
-
declare class AXPEntityStorageExecutor<TKey = any, TDetailDto extends AXPEntityDetailDto<TKey> = any, TListItemDto extends AXPEntityListItemDto<TKey> = any, TCreateDto extends AXPEntityCreateDto = any, TUpdateDto extends AXPEntityUpdateDto<TKey> = any> {
|
|
710
|
-
private storageService;
|
|
628
|
+
declare class AXPMiddlewareEntityStorageService<TKey = any, TDetailDto extends AXPEntityDetailDto<TKey> = any, TListItemDto extends AXPEntityListItemDto<TKey> = any, TCreateDto extends AXPEntityCreateDto = any, TUpdateDto extends AXPEntityUpdateDto<TKey> = any> extends AXPEntityStorageService<TKey, TDetailDto, TListItemDto, TCreateDto, TUpdateDto> {
|
|
629
|
+
private readonly backend;
|
|
630
|
+
private readonly allMiddlewares;
|
|
711
631
|
private readonly injector;
|
|
712
|
-
private readonly registry;
|
|
713
|
-
constructor(storageService: AXPEntityStorageService<TKey, TDetailDto, TListItemDto, TCreateDto, TUpdateDto>);
|
|
714
|
-
/**
|
|
715
|
-
* Execute getOne operation with middleware pipeline
|
|
716
|
-
*/
|
|
717
|
-
getOne(entityName: string, id: TKey): Promise<TDetailDto>;
|
|
718
|
-
/**
|
|
719
|
-
* Execute getAll operation with middleware pipeline
|
|
720
|
-
*/
|
|
721
|
-
getAll(entityName: string): Promise<TListItemDto[]>;
|
|
722
|
-
/**
|
|
723
|
-
* Execute insertOne operation with middleware pipeline
|
|
724
|
-
*/
|
|
725
|
-
insertOne(entityName: string, entity: TCreateDto): Promise<TKey>;
|
|
726
|
-
/**
|
|
727
|
-
* Execute updateOne operation with middleware pipeline
|
|
728
|
-
*/
|
|
729
|
-
updateOne(entityName: string, id: TKey, keyValues: Omit<Partial<TUpdateDto>, 'id'>): Promise<TDetailDto>;
|
|
730
|
-
/**
|
|
731
|
-
* Execute deleteOne operation with middleware pipeline
|
|
732
|
-
*/
|
|
733
|
-
deleteOne(entityName: string, id: TKey): Promise<void>;
|
|
734
|
-
/**
|
|
735
|
-
* Execute query operation with middleware pipeline
|
|
736
|
-
*/
|
|
737
|
-
query(entityName: string, request: AXPQueryRequest): Promise<AXPPagedListResult<TListItemDto>>;
|
|
738
|
-
/**
|
|
739
|
-
* Execute initial operation with middleware pipeline
|
|
740
|
-
*/
|
|
741
|
-
initial(entityName: string, collection: TCreateDto[], options?: {
|
|
742
|
-
mergeType?: 'merge' | 'replace';
|
|
743
|
-
uniqueKeys?: string[];
|
|
744
|
-
}): Promise<TCreateDto[]>;
|
|
745
|
-
/**
|
|
746
|
-
* Execute operation with middleware pipeline
|
|
747
|
-
*/
|
|
748
|
-
private executeWithMiddleware;
|
|
749
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPEntityStorageExecutor<any, any, any, any, any>, never>;
|
|
750
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXPEntityStorageExecutor<any, any, any, any, any>>;
|
|
751
|
-
}
|
|
752
|
-
|
|
753
|
-
/**
|
|
754
|
-
* Entity Storage Service with middleware support
|
|
755
|
-
*
|
|
756
|
-
* This service wraps the original AXPEntityStorageService and adds middleware pipeline support.
|
|
757
|
-
* It delegates all operations to the middleware executor which applies the middleware chain.
|
|
758
|
-
*/
|
|
759
|
-
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> {
|
|
760
|
-
private originalStorageService;
|
|
761
|
-
private registry;
|
|
762
|
-
private executor;
|
|
763
|
-
constructor(originalStorageService: AXPEntityStorageService<TKey, TDetailDto, TListItemDto, TCreateDto, TUpdateDto>, registry: AXPEntityStorageRegistry);
|
|
764
632
|
get dbName(): string;
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
/**
|
|
770
|
-
* Add middleware for specific entity
|
|
771
|
-
*/
|
|
772
|
-
useForEntity(entityName: string, middleware: AXPEntityStorageMiddleware): void;
|
|
773
|
-
/**
|
|
774
|
-
* Add middleware for specific operation
|
|
775
|
-
*/
|
|
776
|
-
useForOperation(operation: string, middleware: AXPEntityStorageMiddleware): void;
|
|
633
|
+
private filterMiddlewares;
|
|
634
|
+
private compose;
|
|
635
|
+
private run;
|
|
636
|
+
private createCtx;
|
|
777
637
|
initial(entityName: string, collection: TCreateDto[], options?: {
|
|
778
638
|
mergeType?: 'merge' | 'replace';
|
|
779
639
|
uniqueKeys?: string[];
|
|
@@ -784,124 +644,93 @@ declare class AXPEntityStorageWithMiddlewareService<TKey = any, TDetailDto exten
|
|
|
784
644
|
insertOne(entityName: string, entity: TCreateDto): Promise<TKey>;
|
|
785
645
|
getAll(entityName: string): Promise<TListItemDto[]>;
|
|
786
646
|
query(entityName: string, request: AXPQueryRequest): Promise<AXPPagedListResult<TListItemDto>>;
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPEntityStorageWithMiddlewareService<any, any, any, any, any>, never>;
|
|
790
|
-
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXPEntityStorageWithMiddlewareService<any, any, any, any, any>>;
|
|
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>>;
|
|
791
649
|
}
|
|
792
650
|
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
declare const AXP_ENTITY_STORAGE_MIDDLEWARE_SETUP: InjectionToken<void>;
|
|
797
|
-
/**
|
|
798
|
-
* Injection token for entity storage middleware extensions
|
|
799
|
-
*/
|
|
800
|
-
declare const AXP_ENTITY_STORAGE_EXTENSION: InjectionToken<{
|
|
801
|
-
target: string | RegExp;
|
|
802
|
-
middleware: AXPEntityStorageMiddleware;
|
|
803
|
-
}>;
|
|
804
|
-
/**
|
|
805
|
-
* Configuration for entity-specific middleware
|
|
806
|
-
*/
|
|
807
|
-
interface AXPEntityStorageMiddlewareConfig {
|
|
808
|
-
/** Global middlewares that apply to all operations */
|
|
809
|
-
global?: AXPEntityStorageMiddleware[];
|
|
810
|
-
/** Entity-specific middlewares */
|
|
811
|
-
entities?: {
|
|
812
|
-
[entityName: string]: AXPEntityStorageMiddleware[];
|
|
813
|
-
};
|
|
814
|
-
/** Operation-specific middlewares */
|
|
815
|
-
operations?: {
|
|
816
|
-
[operation: string]: AXPEntityStorageMiddleware[];
|
|
817
|
-
};
|
|
818
|
-
/** Advanced middleware configurations with targets */
|
|
819
|
-
extensions?: {
|
|
820
|
-
target: string | RegExp;
|
|
821
|
-
middleware: AXPEntityStorageMiddleware;
|
|
822
|
-
}[];
|
|
651
|
+
interface AXPEntityPreloadEntity {
|
|
652
|
+
module: string;
|
|
653
|
+
entity: string;
|
|
823
654
|
}
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
*/
|
|
827
|
-
declare function provideEntityStorageMiddleware(config: AXPEntityStorageMiddlewareConfig): EnvironmentProviders;
|
|
828
|
-
/**
|
|
829
|
-
* Simplified provider for global middleware only
|
|
830
|
-
*/
|
|
831
|
-
declare function provideGlobalEntityStorageMiddleware(middlewares: AXPEntityStorageMiddleware[]): EnvironmentProviders;
|
|
832
|
-
/**
|
|
833
|
-
* Provider for entity-specific middlewares
|
|
834
|
-
*/
|
|
835
|
-
declare function provideEntitySpecificMiddleware(entityName: string, middlewares: AXPEntityStorageMiddleware[]): EnvironmentProviders;
|
|
836
|
-
/**
|
|
837
|
-
* Provider for operation-specific middlewares
|
|
838
|
-
*/
|
|
839
|
-
declare function provideOperationSpecificMiddleware(operation: string, middlewares: AXPEntityStorageMiddleware[]): EnvironmentProviders;
|
|
840
|
-
|
|
841
|
-
/**
|
|
842
|
-
* Logging middleware for entity storage operations
|
|
843
|
-
*/
|
|
844
|
-
declare const loggingMiddleware: AXPEntityStorageMiddleware;
|
|
845
|
-
/**
|
|
846
|
-
* Performance monitoring middleware
|
|
847
|
-
*/
|
|
848
|
-
declare const performanceMiddleware: AXPEntityStorageMiddleware;
|
|
849
|
-
/**
|
|
850
|
-
* Error handling middleware with retry logic
|
|
851
|
-
*/
|
|
852
|
-
declare const errorHandlingMiddleware: AXPEntityStorageMiddleware;
|
|
853
|
-
/**
|
|
854
|
-
* Validation middleware
|
|
855
|
-
*/
|
|
856
|
-
declare const validationMiddleware: AXPEntityStorageMiddleware;
|
|
857
|
-
/**
|
|
858
|
-
* Caching middleware (simple in-memory cache)
|
|
859
|
-
*/
|
|
860
|
-
declare const cachingMiddleware: AXPEntityStorageMiddleware;
|
|
861
|
-
|
|
862
|
-
/**
|
|
863
|
-
* Audit trail entry interface
|
|
864
|
-
*/
|
|
865
|
-
interface AXPAuditEntry {
|
|
866
|
-
id: string;
|
|
867
|
-
entityName: string;
|
|
868
|
-
operation: string;
|
|
869
|
-
entityId?: any;
|
|
870
|
-
changes?: any;
|
|
871
|
-
user?: string;
|
|
872
|
-
timestamp: Date;
|
|
873
|
-
requestId: string;
|
|
874
|
-
metadata?: any;
|
|
655
|
+
interface AXPEntityDefinitionPreloader {
|
|
656
|
+
preload(): AXPEntityPreloadEntity[];
|
|
875
657
|
}
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
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
|
+
/**
|
|
670
|
+
* Force re-load and re-process entity definitions, then re-register them.
|
|
671
|
+
* Overloads:
|
|
672
|
+
* - refresh(): refresh all registered entities
|
|
673
|
+
* - refresh(fullName: string): refresh by fully-qualified name `<module>.<entity>`
|
|
674
|
+
* - refresh(moduleName: string, entityName: string): refresh by parts
|
|
675
|
+
*/
|
|
676
|
+
refresh(): Promise<void>;
|
|
677
|
+
refresh(fullName: string): Promise<void>;
|
|
678
|
+
refresh(moduleName: string, entityName: string): Promise<void>;
|
|
679
|
+
/** Executes the actual refresh for a single entity */
|
|
680
|
+
private refreshOne;
|
|
681
|
+
/**
|
|
682
|
+
* Registers a new entity configuration. Entities are identified uniquely by a combination
|
|
683
|
+
* of their module and name.
|
|
684
|
+
*
|
|
685
|
+
* @param config The configuration object of the entity to be registered.
|
|
686
|
+
*/
|
|
687
|
+
register(config: AXPEntity): void;
|
|
688
|
+
/**
|
|
689
|
+
* Returns an array of all registered entity configurations.
|
|
690
|
+
*
|
|
691
|
+
* @returns An array of AXPEntity objects.
|
|
692
|
+
*/
|
|
693
|
+
getAll(): AXPEntity[];
|
|
694
|
+
/**
|
|
695
|
+
* Resolves an entity configuration based on module and entity name. If the configuration
|
|
696
|
+
* is not already registered, attempts to load it dynamically. Throws an error if the
|
|
697
|
+
* entity cannot be found or loaded.
|
|
698
|
+
*
|
|
699
|
+
* @param moduleName The module name of the entity.
|
|
700
|
+
* @param entityName The name of the entity.
|
|
701
|
+
* @returns A promise resolving to the entity configuration.
|
|
702
|
+
* @throws Error if the entity configuration cannot be resolved.
|
|
703
|
+
*/
|
|
704
|
+
resolve(moduleName: string, entityName: string): Promise<AXPEntity>;
|
|
705
|
+
/**
|
|
706
|
+
* Creates a unique key for an entity based on its module and name.
|
|
707
|
+
*
|
|
708
|
+
* @param moduleName The module name of the entity.
|
|
709
|
+
* @param entityName The name of the entity.
|
|
710
|
+
* @returns The unique key for the entity.
|
|
711
|
+
*/
|
|
712
|
+
private createEntityKey;
|
|
713
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPEntityDefinitionRegistryService, never>;
|
|
714
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXPEntityDefinitionRegistryService>;
|
|
881
715
|
}
|
|
716
|
+
|
|
882
717
|
/**
|
|
883
|
-
*
|
|
718
|
+
* Entity Event Dispatcher - A wrapper for entity-specific events
|
|
719
|
+
* Handles pattern-based dispatching for entity operations with wildcard support
|
|
884
720
|
*/
|
|
885
|
-
declare class
|
|
886
|
-
private
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
721
|
+
declare class AXPEntityEventDispatcherService {
|
|
722
|
+
private readonly eventService;
|
|
723
|
+
dispatchEntityEvent(operation: 'inserted' | 'updated' | 'deleted', entityName: string, data: any): Promise<void>;
|
|
724
|
+
private getAllMatchingEventKeys;
|
|
725
|
+
private findMatchingWildcardKeys;
|
|
726
|
+
private matchesEntityPattern;
|
|
727
|
+
private generateEventKeys;
|
|
728
|
+
dispatchInserted(entityName: string, data: any): Promise<void>;
|
|
729
|
+
dispatchUpdated(entityName: string, data: any): Promise<void>;
|
|
730
|
+
dispatchDeleted(entityName: string, data: any): Promise<void>;
|
|
731
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPEntityEventDispatcherService, never>;
|
|
732
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXPEntityEventDispatcherService>;
|
|
891
733
|
}
|
|
892
|
-
declare const auditStorage: InMemoryAuditStorage;
|
|
893
|
-
/**
|
|
894
|
-
* Audit middleware that tracks all entity operations
|
|
895
|
-
*/
|
|
896
|
-
declare const auditMiddleware: AXPEntityStorageMiddleware;
|
|
897
|
-
/**
|
|
898
|
-
* User context middleware - adds user information to context
|
|
899
|
-
*/
|
|
900
|
-
declare const userContextMiddleware: AXPEntityStorageMiddleware;
|
|
901
|
-
/**
|
|
902
|
-
* Data sanitization middleware - removes sensitive data from logs
|
|
903
|
-
*/
|
|
904
|
-
declare const dataSanitizationMiddleware: AXPEntityStorageMiddleware;
|
|
905
734
|
|
|
906
735
|
interface AXPEntityConfigs {
|
|
907
736
|
viewers: {
|
|
@@ -911,6 +740,7 @@ interface AXPEntityConfigs {
|
|
|
911
740
|
};
|
|
912
741
|
master: {
|
|
913
742
|
single: () => Type<any> | Promise<Type<any>>;
|
|
743
|
+
details: () => Type<any> | Promise<Type<any>>;
|
|
914
744
|
create: () => Type<any> | Promise<Type<any>>;
|
|
915
745
|
modify: () => Type<any> | Promise<Type<any>>;
|
|
916
746
|
list: () => Type<any> | Promise<Type<any>>;
|
|
@@ -1085,6 +915,47 @@ declare function entityDetailsEditAction(): AXPEntityAction;
|
|
|
1085
915
|
declare function entityOverrideDetailsViewAction(): AXPEntityAction;
|
|
1086
916
|
declare function entityDetailsCrudActions(parentId: string): AXPEntityAction[];
|
|
1087
917
|
declare function entityDetailsReferenceCreateActions(): AXPEntityAction[];
|
|
918
|
+
type AXPEntityChangeSet = {
|
|
919
|
+
[key: string]: {
|
|
920
|
+
oldValue: any;
|
|
921
|
+
newValue: any;
|
|
922
|
+
added?: any[];
|
|
923
|
+
removed?: any[];
|
|
924
|
+
};
|
|
925
|
+
};
|
|
926
|
+
/**
|
|
927
|
+
* Computes a diff between two plain objects with array-aware semantics.
|
|
928
|
+
* - For arrays of objects with an id field, computes added/removed by id.
|
|
929
|
+
* - For arrays of primitives or objects without id, uses deep equality.
|
|
930
|
+
* - For scalars/objects, reports oldValue/newValue when changed.
|
|
931
|
+
*/
|
|
932
|
+
declare function detectEntityChanges(oldObj: any, newObj: any): AXPEntityChangeSet;
|
|
933
|
+
|
|
934
|
+
declare const eventDispatchMiddleware: AXPEntityStorageMiddleware;
|
|
935
|
+
|
|
936
|
+
/**
|
|
937
|
+
* Map of column name -> width value
|
|
938
|
+
* Example: { title: '300px', description: '300px' }
|
|
939
|
+
*/
|
|
940
|
+
type ColumnWidthConfig = Record<string, string | number>;
|
|
941
|
+
/**
|
|
942
|
+
* Default widths for common text columns
|
|
943
|
+
*/
|
|
944
|
+
declare const DEFAULT_COLUMN_WIDTHS: ColumnWidthConfig;
|
|
945
|
+
/**
|
|
946
|
+
* Factory to create a column width middleware using provided config map.
|
|
947
|
+
* Sets width for columns defined in the map if not already defined on the column.
|
|
948
|
+
*/
|
|
949
|
+
declare const columnWidthMiddlewareFactory: (widths: ColumnWidthConfig) => AXPEntityModifier;
|
|
950
|
+
/**
|
|
951
|
+
* Helper to create a provider for the column width middleware.
|
|
952
|
+
* By default it applies to all entities using the '*' pattern.
|
|
953
|
+
*/
|
|
954
|
+
declare const createColumnWidthMiddlewareProvider: (widths: ColumnWidthConfig, entityName?: string | RegExp) => AXPEntityModifierProvider;
|
|
955
|
+
/**
|
|
956
|
+
* Default provider registered with the default map.
|
|
957
|
+
*/
|
|
958
|
+
declare const columnWidthMiddlewareProvider: AXPEntityModifierProvider;
|
|
1088
959
|
|
|
1089
|
-
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,
|
|
1090
|
-
export type {
|
|
960
|
+
export { AXMEntityCrudService, AXMEntityCrudServiceImpl, AXPCreateEntityWorkflow, AXPDataSeederService, AXPDeleteEntityWorkflow, AXPEntityApplyUpdatesAction, AXPEntityCommandTriggerViewModel, AXPEntityCreateEvent, AXPEntityCreatePopupAction, AXPEntityCreateSubmittedAction, AXPEntityCreateViewElementViewModel, AXPEntityCreateViewModelFactory, AXPEntityCreateViewSectionViewModel, AXPEntityDataProvider, AXPEntityDataProviderImpl, AXPEntityDefinitionRegistryService, AXPEntityDeletedEvent, AXPEntityDetailListViewModel, AXPEntityDetailViewModelFactory, AXPEntityDetailViewModelResolver, AXPEntityEventDispatcherService, AXPEntityListViewColumnViewModel, AXPEntityListViewModelFactory, AXPEntityListViewModelResolver, AXPEntityMasterCreateViewModel, AXPEntityMasterListViewModel, AXPEntityMasterListViewQueryViewModel, AXPEntityMasterSingleElementViewModel, AXPEntityMasterSingleViewGroupViewModel, AXPEntityMasterSingleViewModel, AXPEntityMasterUpdateElementViewModel, AXPEntityMasterUpdateViewModel, AXPEntityMasterUpdateViewModelFactory, AXPEntityMiddleware, AXPEntityModifyConfirmedAction, AXPEntityModifyEvent, AXPEntityModifySectionPopupAction, AXPEntityModule, AXPEntityPerformDeleteAction, AXPEntityResolver, AXPEntityService, AXPEntityStorageService, AXPMiddlewareEntityStorageService, AXPModifyEntitySectionWorkflow, AXPQuickEntityModifyPopupAction, AXPQuickModifyEntityWorkflow, AXPShowDetailViewAction, AXPShowDetailsViewWorkflow, AXPShowListViewAction, AXPShowListViewWorkflow, AXP_DATA_SEEDER_TOKEN, AXP_ENTITY_ACTION_PLUGIN, AXP_ENTITY_CONFIG_TOKEN, AXP_ENTITY_DEFINITION_LOADER, AXP_ENTITY_MODIFIER, AXP_ENTITY_STORAGE_BACKEND, AXP_ENTITY_STORAGE_MIDDLEWARE, DEFAULT_COLUMN_WIDTHS, actionExists, columnWidthMiddlewareFactory, columnWidthMiddlewareProvider, createColumnWidthMiddlewareProvider, createModifierContext, detectEntityChanges, ensureListActions, entityDetailsCreateActions, entityDetailsCrudActions, entityDetailsEditAction, entityDetailsReferenceCondition, entityDetailsReferenceCreateActions, entityDetailsSimpleCondition, entityMasterBulkDeleteAction, entityMasterCreateAction, entityMasterCrudActions, entityMasterDeleteAction, entityMasterRecordActions, entityMasterViewAction, entityOverrideDetailsViewAction, eventDispatchMiddleware };
|
|
961
|
+
export type { AXPAuditable, AXPDataSeeder, AXPEntityActionPlugin, AXPEntityChangeSet, AXPEntityConfigs, AXPEntityCreateDto, AXPEntityDefinitionLoader, AXPEntityDefinitionPreloader, AXPEntityDeleteOptions, AXPEntityDetailDto, AXPEntityListItemDto, AXPEntityMasterListViewSortPropViewModel, AXPEntityModel, AXPEntityModifier, AXPEntityModifierContext, AXPEntityModifierProvider, AXPEntityOp, AXPEntityOutputDto, AXPEntityPreloadEntity, AXPEntityStorageContext, AXPEntityStorageMiddleware, AXPEntityUpdateDto, ColumnWidthConfig };
|