@acorex/platform 19.4.11 → 19.4.13
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/fesm2022/acorex-platform-layout-entity.mjs +261 -47
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/layout/entity/lib/entity-middleware/entity-middleware.d.ts +12 -0
- package/layout/entity/lib/entity-middleware/entity-modifier.context.d.ts +3 -0
- package/layout/entity/lib/entity-middleware/entity-modifier.types.d.ts +107 -0
- package/layout/entity/lib/entity-middleware/entity-provider.d.ts +3 -0
- package/layout/entity/lib/entity-middleware/index.d.ts +4 -0
- package/layout/entity/lib/entity.module.d.ts +1 -1
- package/layout/entity/lib/index.d.ts +1 -1
- package/package.json +1 -1
- package/layout/entity/lib/entity-middleware.d.ts +0 -10
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AXPEntity } from '@acorex/platform/common';
|
|
2
|
+
import { AXPEntityModifier } from './entity-modifier.types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class AXPEntityMiddleware {
|
|
5
|
+
private modifiers;
|
|
6
|
+
protected providedModifiers: import("./entity-modifier.types").AXPEntityModifierProvider[];
|
|
7
|
+
constructor();
|
|
8
|
+
register(entityName: string, modifier: AXPEntityModifier): void;
|
|
9
|
+
process(entity: AXPEntity): AXPEntity;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXPEntityMiddleware, never>;
|
|
11
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXPEntityMiddleware>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { AXPEntityDetailListView, AXPEntityMasterSingleLayoutView, AXPEntityMasterUpdateLayoutView } from '@acorex/platform/common';
|
|
2
|
+
import { AXPCategoryEntity, AXPEntity, AXPEntityMasterCreateLayoutView, AXPEntityProperty, AXPEntityPropertyGroup, AXPEntityTableColumn, AXPRelatedEntity } from '@acorex/platform/common';
|
|
3
|
+
export interface AXPEntityModifierContext {
|
|
4
|
+
readonly entity: AXPEntity;
|
|
5
|
+
title: {
|
|
6
|
+
get(): string;
|
|
7
|
+
set(newTitle: string): AXPEntityModifierContext;
|
|
8
|
+
};
|
|
9
|
+
module: {
|
|
10
|
+
get(): string;
|
|
11
|
+
set(newModule: string): AXPEntityModifierContext;
|
|
12
|
+
};
|
|
13
|
+
name: {
|
|
14
|
+
get(): string;
|
|
15
|
+
set(newName: string): AXPEntityModifierContext;
|
|
16
|
+
};
|
|
17
|
+
source: {
|
|
18
|
+
get(): string;
|
|
19
|
+
set(newSource: string): AXPEntityModifierContext;
|
|
20
|
+
};
|
|
21
|
+
parentKey: {
|
|
22
|
+
get(): string | undefined;
|
|
23
|
+
set(newKey: string | undefined): AXPEntityModifierContext;
|
|
24
|
+
};
|
|
25
|
+
category: {
|
|
26
|
+
get(): AXPCategoryEntity | undefined;
|
|
27
|
+
update(updater: (cat: AXPCategoryEntity | undefined) => AXPCategoryEntity): AXPEntityModifierContext;
|
|
28
|
+
};
|
|
29
|
+
properties: {
|
|
30
|
+
list(): AXPEntityProperty[];
|
|
31
|
+
add(...props: AXPEntityProperty[]): AXPEntityModifierContext;
|
|
32
|
+
remove(predicate: (p: AXPEntityProperty) => boolean): AXPEntityModifierContext;
|
|
33
|
+
find(name: string): {
|
|
34
|
+
get(): AXPEntityProperty | undefined;
|
|
35
|
+
update(updater: (p: AXPEntityProperty) => AXPEntityProperty): AXPEntityModifierContext;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
columns: {
|
|
39
|
+
list(): AXPEntityTableColumn[] | undefined;
|
|
40
|
+
add(...cols: AXPEntityTableColumn[]): AXPEntityModifierContext;
|
|
41
|
+
remove(predicate: (c: AXPEntityTableColumn) => boolean): AXPEntityModifierContext;
|
|
42
|
+
find(name: string): {
|
|
43
|
+
get(): AXPEntityTableColumn | undefined;
|
|
44
|
+
update(updater: (c: AXPEntityTableColumn) => AXPEntityTableColumn): AXPEntityModifierContext;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
formats: {
|
|
48
|
+
get(): AXPEntity['formats'];
|
|
49
|
+
update(updater: (formats: AXPEntity['formats']) => AXPEntity['formats']): AXPEntityModifierContext;
|
|
50
|
+
};
|
|
51
|
+
relatedEntities: {
|
|
52
|
+
list(): AXPRelatedEntity[] | undefined;
|
|
53
|
+
add(...related: AXPRelatedEntity[]): AXPEntityModifierContext;
|
|
54
|
+
remove(predicate: (r: AXPRelatedEntity) => boolean): AXPEntityModifierContext;
|
|
55
|
+
};
|
|
56
|
+
groups: {
|
|
57
|
+
list(): AXPEntityPropertyGroup[] | undefined;
|
|
58
|
+
add(...groups: AXPEntityPropertyGroup[]): AXPEntityModifierContext;
|
|
59
|
+
remove(predicate: (g: AXPEntityPropertyGroup) => boolean): AXPEntityModifierContext;
|
|
60
|
+
};
|
|
61
|
+
commands: {
|
|
62
|
+
get(): AXPEntity['commands'] | undefined;
|
|
63
|
+
update(updater: (c: AXPEntity['commands'] | undefined) => AXPEntity['commands']): AXPEntityModifierContext;
|
|
64
|
+
};
|
|
65
|
+
queries: {
|
|
66
|
+
get(): AXPEntity['queries'];
|
|
67
|
+
update(updater: (q: AXPEntity['queries']) => AXPEntity['queries']): AXPEntityModifierContext;
|
|
68
|
+
};
|
|
69
|
+
validations: {
|
|
70
|
+
get(): AXPEntity['validations'] | undefined;
|
|
71
|
+
update(updater: (v: AXPEntity['validations'] | undefined) => AXPEntity['validations']): AXPEntityModifierContext;
|
|
72
|
+
};
|
|
73
|
+
interfaces: {
|
|
74
|
+
get(): AXPEntity['interfaces'] | undefined;
|
|
75
|
+
update(updater: (i: AXPEntity['interfaces'] | undefined) => AXPEntity['interfaces']): AXPEntityModifierContext;
|
|
76
|
+
master: {
|
|
77
|
+
get(): NonNullable<AXPEntity['interfaces']>['master'] | undefined;
|
|
78
|
+
update(updater: (m: NonNullable<AXPEntity['interfaces']>['master'] | undefined) => NonNullable<AXPEntity['interfaces']>['master']): AXPEntityModifierContext;
|
|
79
|
+
create: {
|
|
80
|
+
get(): AXPEntityMasterCreateLayoutView | undefined;
|
|
81
|
+
update(updater: (c: AXPEntityMasterCreateLayoutView | undefined) => AXPEntityMasterCreateLayoutView): AXPEntityModifierContext;
|
|
82
|
+
};
|
|
83
|
+
modify: {
|
|
84
|
+
get(): AXPEntityMasterUpdateLayoutView | undefined;
|
|
85
|
+
update(updater: (c: AXPEntityMasterUpdateLayoutView | undefined) => AXPEntityMasterUpdateLayoutView): AXPEntityModifierContext;
|
|
86
|
+
};
|
|
87
|
+
single: {
|
|
88
|
+
get(): AXPEntityMasterSingleLayoutView | undefined;
|
|
89
|
+
update(updater: (c: AXPEntityMasterSingleLayoutView | undefined) => AXPEntityMasterSingleLayoutView): AXPEntityModifierContext;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
detail: {
|
|
93
|
+
get(): NonNullable<AXPEntity['interfaces']>['detail'] | undefined;
|
|
94
|
+
update(updater: (d: NonNullable<AXPEntity['interfaces']>['detail'] | undefined) => NonNullable<AXPEntity['interfaces']>['detail']): AXPEntityModifierContext;
|
|
95
|
+
list: {
|
|
96
|
+
get(): AXPEntityDetailListView | undefined;
|
|
97
|
+
update(updater: (l: AXPEntityDetailListView | undefined) => AXPEntityDetailListView): AXPEntityModifierContext;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
toEntity(): AXPEntity;
|
|
102
|
+
}
|
|
103
|
+
export type AXPEntityModifier = (context: AXPEntityModifierContext) => void;
|
|
104
|
+
export interface AXPEntityModifierProvider {
|
|
105
|
+
entityName: string;
|
|
106
|
+
modifier: AXPEntityModifier;
|
|
107
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Injector } from '@angular/core';
|
|
2
1
|
import { AXPAppStartUpService } from '@acorex/platform/core';
|
|
2
|
+
import { Injector } from '@angular/core';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
import * as i1 from "@angular/router";
|
|
5
5
|
import * as i2 from "@acorex/platform/workflow";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export * from './entity.types';
|
|
2
1
|
export * from './entity-data-seeder';
|
|
3
2
|
export * from './entity-detail-list.viewmodel';
|
|
4
3
|
export * from './entity-master-create.viewmodel';
|
|
@@ -11,5 +10,6 @@ export * from './entity-storage-service';
|
|
|
11
10
|
export * from './entity.config';
|
|
12
11
|
export * from './entity.module';
|
|
13
12
|
export * from './entity.service';
|
|
13
|
+
export * from './entity.types';
|
|
14
14
|
export * from './entity.viewmodel';
|
|
15
15
|
export * from './workflows';
|
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { AXPEntity } from '@acorex/platform/common';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare abstract class AXPEntityMiddleware {
|
|
4
|
-
abstract process(entity: AXPEntity): AXPEntity;
|
|
5
|
-
}
|
|
6
|
-
export declare class AXPEntityMiddlewareDefault extends AXPEntityMiddleware {
|
|
7
|
-
process(entity: AXPEntity): AXPEntity;
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AXPEntityMiddlewareDefault, never>;
|
|
9
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AXPEntityMiddlewareDefault>;
|
|
10
|
-
}
|