1
1
import { AnyObject } from "@mat3ra/esse/dist/js/esse/types" ;
2
2
import { NameResultSchema , RuntimeItemSchema } from "@mat3ra/esse/dist/js/types" ;
3
+ import type { Constructor } from "src/js/utils/types" ;
3
4
import { InMemoryEntityConstructor } from "../in_memory" ;
4
- export declare enum ItemKey {
5
- results = "results" ,
6
- monitors = "monitors" ,
7
- preProcessors = "preProcessors" ,
8
- postProcessors = "postProcessors"
9
- }
10
- export declare function RuntimeItemsMixin < T extends InMemoryEntityConstructor > ( superclass : T ) : {
11
- new ( ...args : any [ ] ) : {
12
- readonly results : NameResultSchema [ ] ;
13
- readonly monitors : NameResultSchema [ ] ;
14
- readonly preProcessors : NameResultSchema [ ] ;
15
- readonly postProcessors : NameResultSchema [ ] ;
16
- readonly defaultResults : NameResultSchema [ ] ;
17
- readonly defaultMonitors : NameResultSchema [ ] ;
18
- readonly defaultPreProcessors : NameResultSchema [ ] ;
19
- readonly defaultPostProcessors : NameResultSchema [ ] ;
20
- readonly hashObjectFromRuntimeItems : {
21
- results : NameResultSchema [ ] ;
22
- preProcessors : NameResultSchema [ ] ;
23
- postProcessors : NameResultSchema [ ] ;
24
- } ;
25
- _json : AnyObject ;
26
- prop < T_1 = undefined > ( name : string , defaultValue : T_1 ) : T_1 ;
27
- prop < T_1 = undefined > ( name : string ) : T_1 | undefined ;
28
- setProp ( name : string , value : unknown ) : void ;
29
- unsetProp ( name : string ) : void ;
30
- setProps ( json ?: AnyObject ) : /*elided*/ any ;
31
- toJSON ( exclude ?: string [ ] ) : AnyObject ;
32
- toJSONSafe ( exclude ?: string [ ] ) : AnyObject ;
33
- toJSONQuick ( exclude ?: string [ ] ) : AnyObject ;
34
- clone ( extraContext ?: object ) : /*elided*/ any ;
35
- validate ( ) : void ;
36
- clean ( config : AnyObject ) : AnyObject ;
37
- isValid ( ) : boolean ;
38
- readonly cls : string ;
39
- getClsName ( ) : string ;
40
- getAsEntityReference ( byIdOnly : true ) : {
41
- _id : string ;
42
- } ;
43
- getAsEntityReference ( byIdOnly ?: false ) : Required < import ( "@mat3ra/esse/dist/js/types" ) . EntityReferenceSchema > ;
44
- getEntityByName ( entities : import ( "../in_memory" ) . InMemoryEntity [ ] , entity : string , name : string ) : import ( "../in_memory" ) . InMemoryEntity ;
45
- id : string ;
46
- _id : string ;
47
- schemaVersion : string ;
48
- systemName : string ;
49
- readonly slug : string ;
50
- readonly isSystemEntity : boolean ;
51
- } ;
52
- } & T ;
5
+ import RuntimeItemsMixin , { type BaseRuntimeItemsInMemoryEntity , ItemKey } from "./RuntimeItemsMixin" ;
6
+ export { RuntimeItemsMixin , ItemKey } ;
53
7
export interface RuntimeItemsUILogicJSON extends AnyObject {
54
8
results ?: NameResultSchema [ ] ;
55
9
monitors ?: NameResultSchema [ ] ;
56
10
preProcessors ?: NameResultSchema [ ] ;
57
11
postProcessors ?: NameResultSchema [ ] ;
58
12
}
59
- export declare function RuntimeItemsUILogicMixin < T extends InMemoryEntityConstructor > ( superclass : T ) : {
13
+ export declare function RuntimeItemsUILogicMixin < T extends Constructor < BaseRuntimeItemsInMemoryEntity > > ( superclass : T ) : {
60
14
new ( ...params : any ) : {
61
15
_json : RuntimeItemsUILogicJSON ;
62
- getDefaultsByKey ( key : ItemKey ) : NameResultSchema [ ] ;
16
+ getDefaultsByKey ( key : ItemKey ) : NameResultSchema [ ] | undefined ;
63
17
setRuntimeItemsToDefaultValues ( ) : void ;
64
18
/**
65
19
* @summary Must pass config for subclasses to override and use initialization logic
@@ -79,19 +33,6 @@ export declare function RuntimeItemsUILogicMixin<T extends InMemoryEntityConstru
79
33
readonly postProcessorNames : string [ ] ;
80
34
readonly preProcessorNames : string [ ] ;
81
35
getResultByName ( name : string ) : NameResultSchema | undefined ;
82
- readonly results : NameResultSchema [ ] ;
83
- readonly monitors : NameResultSchema [ ] ;
84
- readonly preProcessors : NameResultSchema [ ] ;
85
- readonly postProcessors : NameResultSchema [ ] ;
86
- readonly defaultResults : NameResultSchema [ ] ;
87
- readonly defaultMonitors : NameResultSchema [ ] ;
88
- readonly defaultPreProcessors : NameResultSchema [ ] ;
89
- readonly defaultPostProcessors : NameResultSchema [ ] ;
90
- readonly hashObjectFromRuntimeItems : {
91
- results : NameResultSchema [ ] ;
92
- preProcessors : NameResultSchema [ ] ;
93
- postProcessors : NameResultSchema [ ] ;
94
- } ;
95
36
prop < T_1 = undefined > ( name : string , defaultValue : T_1 ) : T_1 ;
96
37
prop < T_1 = undefined > ( name : string ) : T_1 | undefined ;
97
38
setProp ( name : string , value : unknown ) : void ;
@@ -117,6 +58,14 @@ export declare function RuntimeItemsUILogicMixin<T extends InMemoryEntityConstru
117
58
systemName : string ;
118
59
readonly slug : string ;
119
60
readonly isSystemEntity : boolean ;
61
+ defaultResults ?: NameResultSchema [ ] ;
62
+ defaultMonitors ?: NameResultSchema [ ] ;
63
+ defaultPreProcessors ?: NameResultSchema [ ] ;
64
+ defaultPostProcessors ?: NameResultSchema [ ] ;
65
+ results : NameResultSchema [ ] ;
66
+ monitors : NameResultSchema [ ] ;
67
+ preProcessors : NameResultSchema [ ] ;
68
+ postProcessors : NameResultSchema [ ] ;
120
69
} ;
121
70
} & T ;
122
71
export declare function RuntimeItemsUIAllowedMixin < T extends InMemoryEntityConstructor > ( superclass : T ) : {
0 commit comments