@acorex/platform 19.4.11 → 19.4.12
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 +209 -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 +84 -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,84 @@
|
|
|
1
|
+
import { AXPCategoryEntity, AXPEntityPropertyGroup, AXPEntityTableColumn, AXPRelatedEntity } from '@acorex/platform/common';
|
|
2
|
+
import { AXPEntityProperty } from '@acorex/platform/common';
|
|
3
|
+
import { AXPEntity } from '@acorex/platform/common';
|
|
4
|
+
export interface AXPEntityModifierContext {
|
|
5
|
+
readonly entity: AXPEntity;
|
|
6
|
+
title: {
|
|
7
|
+
get(): string;
|
|
8
|
+
set(newTitle: string): AXPEntityModifierContext;
|
|
9
|
+
};
|
|
10
|
+
module: {
|
|
11
|
+
get(): string;
|
|
12
|
+
set(newModule: string): AXPEntityModifierContext;
|
|
13
|
+
};
|
|
14
|
+
name: {
|
|
15
|
+
get(): string;
|
|
16
|
+
set(newName: string): AXPEntityModifierContext;
|
|
17
|
+
};
|
|
18
|
+
source: {
|
|
19
|
+
get(): string;
|
|
20
|
+
set(newSource: string): AXPEntityModifierContext;
|
|
21
|
+
};
|
|
22
|
+
parentKey: {
|
|
23
|
+
get(): string | undefined;
|
|
24
|
+
set(newKey: string | undefined): AXPEntityModifierContext;
|
|
25
|
+
};
|
|
26
|
+
category: {
|
|
27
|
+
get(): AXPCategoryEntity | undefined;
|
|
28
|
+
update(updater: (cat: AXPCategoryEntity | undefined) => AXPCategoryEntity): AXPEntityModifierContext;
|
|
29
|
+
};
|
|
30
|
+
properties: {
|
|
31
|
+
list(): AXPEntityProperty[];
|
|
32
|
+
add(...props: AXPEntityProperty[]): AXPEntityModifierContext;
|
|
33
|
+
remove(predicate: (p: AXPEntityProperty) => boolean): AXPEntityModifierContext;
|
|
34
|
+
find(name: string): {
|
|
35
|
+
get(): AXPEntityProperty | undefined;
|
|
36
|
+
update(updater: (p: AXPEntityProperty) => AXPEntityProperty): AXPEntityModifierContext;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
columns: {
|
|
40
|
+
list(): AXPEntityTableColumn[] | undefined;
|
|
41
|
+
add(...cols: AXPEntityTableColumn[]): AXPEntityModifierContext;
|
|
42
|
+
remove(predicate: (c: AXPEntityTableColumn) => boolean): AXPEntityModifierContext;
|
|
43
|
+
find(name: string): {
|
|
44
|
+
get(): AXPEntityTableColumn | undefined;
|
|
45
|
+
update(updater: (c: AXPEntityTableColumn) => AXPEntityTableColumn): AXPEntityModifierContext;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
formats: {
|
|
49
|
+
get(): AXPEntity['formats'];
|
|
50
|
+
update(updater: (formats: AXPEntity['formats']) => AXPEntity['formats']): AXPEntityModifierContext;
|
|
51
|
+
};
|
|
52
|
+
relatedEntities: {
|
|
53
|
+
list(): AXPRelatedEntity[] | undefined;
|
|
54
|
+
add(...related: AXPRelatedEntity[]): AXPEntityModifierContext;
|
|
55
|
+
remove(predicate: (r: AXPRelatedEntity) => boolean): AXPEntityModifierContext;
|
|
56
|
+
};
|
|
57
|
+
groups: {
|
|
58
|
+
list(): AXPEntityPropertyGroup[] | undefined;
|
|
59
|
+
add(...groups: AXPEntityPropertyGroup[]): AXPEntityModifierContext;
|
|
60
|
+
remove(predicate: (g: AXPEntityPropertyGroup) => boolean): AXPEntityModifierContext;
|
|
61
|
+
};
|
|
62
|
+
commands: {
|
|
63
|
+
get(): AXPEntity['commands'] | undefined;
|
|
64
|
+
update(updater: (c: AXPEntity['commands'] | undefined) => AXPEntity['commands']): AXPEntityModifierContext;
|
|
65
|
+
};
|
|
66
|
+
queries: {
|
|
67
|
+
get(): AXPEntity['queries'];
|
|
68
|
+
update(updater: (q: AXPEntity['queries']) => AXPEntity['queries']): AXPEntityModifierContext;
|
|
69
|
+
};
|
|
70
|
+
validations: {
|
|
71
|
+
get(): AXPEntity['validations'] | undefined;
|
|
72
|
+
update(updater: (v: AXPEntity['validations'] | undefined) => AXPEntity['validations']): AXPEntityModifierContext;
|
|
73
|
+
};
|
|
74
|
+
interfaces: {
|
|
75
|
+
get(): AXPEntity['interfaces'] | undefined;
|
|
76
|
+
update(updater: (i: AXPEntity['interfaces'] | undefined) => AXPEntity['interfaces']): AXPEntityModifierContext;
|
|
77
|
+
};
|
|
78
|
+
toEntity(): AXPEntity;
|
|
79
|
+
}
|
|
80
|
+
export type AXPEntityModifier = (context: AXPEntityModifierContext) => void;
|
|
81
|
+
export interface AXPEntityModifierProvider {
|
|
82
|
+
entityName: string;
|
|
83
|
+
modifier: AXPEntityModifier;
|
|
84
|
+
}
|
|
@@ -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
|
-
}
|