@acorex/platform 20.2.3 → 20.2.4-next.0
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 +9 -2
- package/core/index.d.ts +42 -57
- package/fesm2022/acorex-platform-common.mjs +17 -9
- 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 +62 -50
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs +170 -23
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +1774 -988
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +186 -51
- 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-hf4QOz_4.mjs → acorex-platform-themes-default-entity-master-list-view.component-ezrf2oBR.mjs} +93 -176
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-ezrf2oBR.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-D8r3S2lI.mjs} +12 -7
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-D8r3S2lI.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +49 -491
- package/fesm2022/acorex-platform-themes-default.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-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 +584 -102
- package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
- package/layout/builder/index.d.ts +7 -3
- package/layout/components/index.d.ts +45 -6
- package/layout/entity/index.d.ts +136 -328
- package/layout/views/index.d.ts +64 -20
- package/package.json +5 -5
- package/themes/default/index.d.ts +1 -1
- package/widgets/index.d.ts +91 -4
- 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.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-widgets-checkbox-widget-designer.component-BI18uzNZ.mjs.map +0 -1
package/layout/entity/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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
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';
|
|
@@ -9,7 +9,6 @@ import { AXPWidgetColumnNode, AXPWidgetNode, AXPLayoutBuilderService } from '@ac
|
|
|
9
9
|
import * as i1 from '@angular/router';
|
|
10
10
|
import { ResolveFn } from '@angular/router';
|
|
11
11
|
import { Subject } from 'rxjs';
|
|
12
|
-
import * as _acorex_platform_layout_entity from '@acorex/platform/layout/entity';
|
|
13
12
|
import * as i2 from '@acorex/platform/workflow';
|
|
14
13
|
import { AXPWorkflowAction, AXPWorkflowContext, AXPWorkflow } from '@acorex/platform/workflow';
|
|
15
14
|
|
|
@@ -332,7 +331,6 @@ declare class AXPEntityMasterUpdateViewModel {
|
|
|
332
331
|
private props;
|
|
333
332
|
private entityDef;
|
|
334
333
|
private workflow;
|
|
335
|
-
private lockService;
|
|
336
334
|
private sessionService;
|
|
337
335
|
private get moduleName();
|
|
338
336
|
private get entityName();
|
|
@@ -344,7 +342,6 @@ declare class AXPEntityMasterUpdateViewModel {
|
|
|
344
342
|
elements: _angular_core.Signal<AXPEntityMasterUpdateElementViewModel[]>;
|
|
345
343
|
save(): Promise<any>;
|
|
346
344
|
reset(): void;
|
|
347
|
-
unlock(): Promise<void>;
|
|
348
345
|
}
|
|
349
346
|
declare class AXPEntityMasterUpdateViewModelFactory {
|
|
350
347
|
private entityService;
|
|
@@ -457,16 +454,30 @@ interface AXPEntityModifierContext {
|
|
|
457
454
|
}
|
|
458
455
|
type AXPEntityModifier = (context: AXPEntityModifierContext) => void;
|
|
459
456
|
interface AXPEntityModifierProvider {
|
|
460
|
-
entityName: string;
|
|
457
|
+
entityName: string | RegExp;
|
|
461
458
|
modifier: AXPEntityModifier;
|
|
462
459
|
}
|
|
463
460
|
|
|
461
|
+
declare function ensureListActions(ctx: AXPEntityModifierContext): void;
|
|
462
|
+
declare function actionExists(actions: any[] | undefined, commandName: string, name?: string): boolean;
|
|
463
|
+
|
|
464
|
+
interface AXPEntityActionPlugin {
|
|
465
|
+
name: string;
|
|
466
|
+
order?: number;
|
|
467
|
+
apply: (ctx: AXPEntityModifierContext, options?: any) => void;
|
|
468
|
+
}
|
|
469
|
+
declare const AXP_ENTITY_ACTION_PLUGIN: InjectionToken<AXPEntityActionPlugin[]>;
|
|
470
|
+
|
|
464
471
|
declare class AXPEntityMiddleware {
|
|
465
|
-
private
|
|
466
|
-
|
|
472
|
+
private exactModifiers;
|
|
473
|
+
private patternModifiers;
|
|
474
|
+
protected providedModifiers: AXPEntityModifierProvider[];
|
|
475
|
+
protected providedActionPlugins: AXPEntityActionPlugin[];
|
|
467
476
|
constructor();
|
|
468
|
-
register(entityName: string, modifier: AXPEntityModifier): void;
|
|
477
|
+
register(entityName: string | RegExp, modifier: AXPEntityModifier): void;
|
|
469
478
|
process(entity: AXPEntity): AXPEntity;
|
|
479
|
+
private wildcardToRegExp;
|
|
480
|
+
private normalizeRegExp;
|
|
470
481
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPEntityMiddleware, never>;
|
|
471
482
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXPEntityMiddleware>;
|
|
472
483
|
}
|
|
@@ -475,56 +486,6 @@ declare function createModifierContext(entity: AXPEntity): AXPEntityModifierCont
|
|
|
475
486
|
|
|
476
487
|
declare const AXP_ENTITY_MODIFIER: InjectionToken<AXPEntityModifierProvider[]>;
|
|
477
488
|
|
|
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
489
|
interface AXPAuditable {
|
|
529
490
|
createdAt?: Date;
|
|
530
491
|
updatedAt?: Date;
|
|
@@ -547,6 +508,31 @@ interface AXPEntityDetailDto<Id> extends AXPEntityOutputDto<Id> {
|
|
|
547
508
|
interface AXPEntityListItemDto<Id> extends AXPEntityOutputDto<Id> {
|
|
548
509
|
}
|
|
549
510
|
|
|
511
|
+
type AXPEntityOp = 'initial' | 'create' | 'update' | 'delete' | 'getOne' | 'getAll' | 'query';
|
|
512
|
+
interface AXPEntityStorageContext<TKey = any, TDetailDto extends AXPEntityDetailDto<TKey> = any, TListItemDto extends AXPEntityListItemDto<TKey> = any, TCreateDto extends AXPEntityCreateDto = any, TUpdateDto extends AXPEntityUpdateDto<TKey> = any> {
|
|
513
|
+
op: AXPEntityOp;
|
|
514
|
+
entityName: string;
|
|
515
|
+
id?: TKey;
|
|
516
|
+
data?: TCreateDto | Omit<Partial<TUpdateDto>, 'id'>;
|
|
517
|
+
request?: AXPQueryRequest;
|
|
518
|
+
previous?: TDetailDto;
|
|
519
|
+
result?: any;
|
|
520
|
+
locals: Map<string, unknown>;
|
|
521
|
+
backend: {
|
|
522
|
+
getOneRaw: (entityName: string, id: TKey) => Promise<TDetailDto>;
|
|
523
|
+
insertOneRaw: (entityName: string, entity: TCreateDto) => Promise<TKey>;
|
|
524
|
+
};
|
|
525
|
+
}
|
|
526
|
+
interface AXPEntityStorageMiddleware<TKey = any, TDetailDto extends AXPEntityDetailDto<TKey> = any, TListItemDto extends AXPEntityListItemDto<TKey> = any, TCreateDto extends AXPEntityCreateDto = any, TUpdateDto extends AXPEntityUpdateDto<TKey> = any> {
|
|
527
|
+
target?: {
|
|
528
|
+
ops?: AXPEntityOp[];
|
|
529
|
+
entity?: string | RegExp;
|
|
530
|
+
predicate?: (ctx: AXPEntityStorageContext<TKey, TDetailDto, TListItemDto, TCreateDto, TUpdateDto>) => boolean;
|
|
531
|
+
order?: number;
|
|
532
|
+
};
|
|
533
|
+
execute: (ctx: AXPEntityStorageContext<TKey, TDetailDto, TListItemDto, TCreateDto, TUpdateDto>, next: () => Promise<void>) => Promise<void>;
|
|
534
|
+
}
|
|
535
|
+
|
|
550
536
|
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
537
|
abstract get dbName(): string;
|
|
552
538
|
abstract initial(entityName: string, collection: TCreateDto[], options?: {
|
|
@@ -613,167 +599,18 @@ declare class AXMEntityCrudServiceImpl<TKey, TDetailDto extends AXPEntityDetailD
|
|
|
613
599
|
get storageService(): AXPEntityStorageService<any, any, any, any, any>;
|
|
614
600
|
}
|
|
615
601
|
|
|
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;
|
|
602
|
+
declare const AXP_ENTITY_STORAGE_BACKEND: InjectionToken<AXPEntityStorageService<any, any, any, any, any>>;
|
|
603
|
+
declare const AXP_ENTITY_STORAGE_MIDDLEWARE: InjectionToken<AXPEntityStorageMiddleware<any, any, any, any, any>[]>;
|
|
658
604
|
|
|
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;
|
|
605
|
+
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> {
|
|
606
|
+
private readonly backend;
|
|
607
|
+
private readonly allMiddlewares;
|
|
711
608
|
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
609
|
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;
|
|
610
|
+
private filterMiddlewares;
|
|
611
|
+
private compose;
|
|
612
|
+
private run;
|
|
613
|
+
private createCtx;
|
|
777
614
|
initial(entityName: string, collection: TCreateDto[], options?: {
|
|
778
615
|
mergeType?: 'merge' | 'replace';
|
|
779
616
|
uniqueKeys?: string[];
|
|
@@ -784,124 +621,77 @@ declare class AXPEntityStorageWithMiddlewareService<TKey = any, TDetailDto exten
|
|
|
784
621
|
insertOne(entityName: string, entity: TCreateDto): Promise<TKey>;
|
|
785
622
|
getAll(entityName: string): Promise<TListItemDto[]>;
|
|
786
623
|
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>>;
|
|
624
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPMiddlewareEntityStorageService<any, any, any, any, any>, never>;
|
|
625
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXPMiddlewareEntityStorageService<any, any, any, any, any>>;
|
|
791
626
|
}
|
|
792
627
|
|
|
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
|
-
}[];
|
|
628
|
+
interface AXPEntityPreloadEntity {
|
|
629
|
+
module: string;
|
|
630
|
+
entity: string;
|
|
823
631
|
}
|
|
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;
|
|
632
|
+
interface AXPEntityDefinitionPreloader {
|
|
633
|
+
preload(): AXPEntityPreloadEntity[];
|
|
875
634
|
}
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
635
|
+
declare class AXPEntityDefinitionRegistryService {
|
|
636
|
+
private providers;
|
|
637
|
+
private resolver;
|
|
638
|
+
private middleware;
|
|
639
|
+
preload(): Promise<void>;
|
|
640
|
+
private entities;
|
|
641
|
+
private entityResolver;
|
|
642
|
+
/**
|
|
643
|
+
* Registers a new entity configuration. Entities are identified uniquely by a combination
|
|
644
|
+
* of their module and name.
|
|
645
|
+
*
|
|
646
|
+
* @param config The configuration object of the entity to be registered.
|
|
647
|
+
*/
|
|
648
|
+
register(config: AXPEntity): void;
|
|
649
|
+
/**
|
|
650
|
+
* Returns an array of all registered entity configurations.
|
|
651
|
+
*
|
|
652
|
+
* @returns An array of AXPEntity objects.
|
|
653
|
+
*/
|
|
654
|
+
getAll(): AXPEntity[];
|
|
655
|
+
/**
|
|
656
|
+
* Resolves an entity configuration based on module and entity name. If the configuration
|
|
657
|
+
* is not already registered, attempts to load it dynamically. Throws an error if the
|
|
658
|
+
* entity cannot be found or loaded.
|
|
659
|
+
*
|
|
660
|
+
* @param moduleName The module name of the entity.
|
|
661
|
+
* @param entityName The name of the entity.
|
|
662
|
+
* @returns A promise resolving to the entity configuration.
|
|
663
|
+
* @throws Error if the entity configuration cannot be resolved.
|
|
664
|
+
*/
|
|
665
|
+
resolve(moduleName: string, entityName: string): Promise<AXPEntity>;
|
|
666
|
+
/**
|
|
667
|
+
* Creates a unique key for an entity based on its module and name.
|
|
668
|
+
*
|
|
669
|
+
* @param moduleName The module name of the entity.
|
|
670
|
+
* @param entityName The name of the entity.
|
|
671
|
+
* @returns The unique key for the entity.
|
|
672
|
+
*/
|
|
673
|
+
private createEntityKey;
|
|
674
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPEntityDefinitionRegistryService, never>;
|
|
675
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXPEntityDefinitionRegistryService>;
|
|
881
676
|
}
|
|
677
|
+
|
|
882
678
|
/**
|
|
883
|
-
*
|
|
679
|
+
* Entity Event Dispatcher - A wrapper for entity-specific events
|
|
680
|
+
* Handles pattern-based dispatching for entity operations with wildcard support
|
|
884
681
|
*/
|
|
885
|
-
declare class
|
|
886
|
-
private
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
682
|
+
declare class AXPEntityEventDispatcherService {
|
|
683
|
+
private readonly eventService;
|
|
684
|
+
dispatchEntityEvent(operation: 'inserted' | 'updated' | 'deleted', entityName: string, data: any): Promise<void>;
|
|
685
|
+
private getAllMatchingEventKeys;
|
|
686
|
+
private findMatchingWildcardKeys;
|
|
687
|
+
private matchesEntityPattern;
|
|
688
|
+
private generateEventKeys;
|
|
689
|
+
dispatchInserted(entityName: string, data: any): Promise<void>;
|
|
690
|
+
dispatchUpdated(entityName: string, data: any): Promise<void>;
|
|
691
|
+
dispatchDeleted(entityName: string, data: any): Promise<void>;
|
|
692
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPEntityEventDispatcherService, never>;
|
|
693
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AXPEntityEventDispatcherService>;
|
|
891
694
|
}
|
|
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
695
|
|
|
906
696
|
interface AXPEntityConfigs {
|
|
907
697
|
viewers: {
|
|
@@ -911,6 +701,7 @@ interface AXPEntityConfigs {
|
|
|
911
701
|
};
|
|
912
702
|
master: {
|
|
913
703
|
single: () => Type<any> | Promise<Type<any>>;
|
|
704
|
+
details: () => Type<any> | Promise<Type<any>>;
|
|
914
705
|
create: () => Type<any> | Promise<Type<any>>;
|
|
915
706
|
modify: () => Type<any> | Promise<Type<any>>;
|
|
916
707
|
list: () => Type<any> | Promise<Type<any>>;
|
|
@@ -1085,6 +876,23 @@ declare function entityDetailsEditAction(): AXPEntityAction;
|
|
|
1085
876
|
declare function entityOverrideDetailsViewAction(): AXPEntityAction;
|
|
1086
877
|
declare function entityDetailsCrudActions(parentId: string): AXPEntityAction[];
|
|
1087
878
|
declare function entityDetailsReferenceCreateActions(): AXPEntityAction[];
|
|
879
|
+
type AXPEntityChangeSet = {
|
|
880
|
+
[key: string]: {
|
|
881
|
+
oldValue: any;
|
|
882
|
+
newValue: any;
|
|
883
|
+
added?: any[];
|
|
884
|
+
removed?: any[];
|
|
885
|
+
};
|
|
886
|
+
};
|
|
887
|
+
/**
|
|
888
|
+
* Computes a diff between two plain objects with array-aware semantics.
|
|
889
|
+
* - For arrays of objects with an id field, computes added/removed by id.
|
|
890
|
+
* - For arrays of primitives or objects without id, uses deep equality.
|
|
891
|
+
* - For scalars/objects, reports oldValue/newValue when changed.
|
|
892
|
+
*/
|
|
893
|
+
declare function detectEntityChanges(oldObj: any, newObj: any): AXPEntityChangeSet;
|
|
894
|
+
|
|
895
|
+
declare const eventDispatchMiddleware: AXPEntityStorageMiddleware;
|
|
1088
896
|
|
|
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 {
|
|
897
|
+
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, actionExists, createModifierContext, detectEntityChanges, ensureListActions, entityDetailsCreateActions, entityDetailsCrudActions, entityDetailsEditAction, entityDetailsReferenceCondition, entityDetailsReferenceCreateActions, entityDetailsSimpleCondition, entityMasterBulkDeleteAction, entityMasterCreateAction, entityMasterCrudActions, entityMasterDeleteAction, entityMasterRecordActions, entityMasterViewAction, entityOverrideDetailsViewAction, eventDispatchMiddleware };
|
|
898
|
+
export type { AXPAuditable, AXPDataSeeder, AXPEntityActionPlugin, AXPEntityChangeSet, AXPEntityConfigs, AXPEntityCreateDto, AXPEntityDefinitionLoader, AXPEntityDefinitionPreloader, AXPEntityDeleteOptions, AXPEntityDetailDto, AXPEntityListItemDto, AXPEntityMasterListViewSortPropViewModel, AXPEntityModel, AXPEntityModifier, AXPEntityModifierContext, AXPEntityModifierProvider, AXPEntityOp, AXPEntityOutputDto, AXPEntityPreloadEntity, AXPEntityStorageContext, AXPEntityStorageMiddleware, AXPEntityUpdateDto };
|