@ws-ui/shared 0.2.22 → 0.2.24
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/README.md +27 -27
- package/dist/declarations/datasources/cache.d.ts +26 -26
- package/dist/declarations/datasources/dataclass.d.ts +47 -47
- package/dist/declarations/datasources/datasource.d.ts +373 -373
- package/dist/declarations/datasources/datastore.d.ts +62 -62
- package/dist/declarations/datasources/entitysel.d.ts +68 -68
- package/dist/declarations/datasources/interfaces/catalog.d.ts +115 -115
- package/dist/declarations/datasources/interfaces/dataclass-attribute.d.ts +88 -88
- package/dist/declarations/datasources/methods.d.ts +88 -88
- package/dist/declarations/datasources/rest.d.ts +18 -18
- package/dist/declarations/http-methods.d.ts +70 -70
- package/dist/declarations/index.d.ts +9 -9
- package/dist/declarations/webform/webform.d.ts +259 -259
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +1 -1
- package/dist/index.es.js.map +1 -1
- package/dist/tailwind.preset.js +148 -148
- package/dist/types/webform-editor.d.ts +1 -0
- package/dist/utils/subjects.d.ts +31 -3
- package/package.json +73 -73
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
declare namespace datasources {
|
|
2
|
-
class ProgressIndicator {
|
|
3
|
-
refID: string;
|
|
4
|
-
started: Date;
|
|
5
|
-
lastChecked: number;
|
|
6
|
-
inited: boolean;
|
|
7
|
-
checkDeletedCount: number;
|
|
8
|
-
askedToStop: boolean;
|
|
9
|
-
graceFullStop: boolean;
|
|
10
|
-
|
|
11
|
-
getRefID(): string;
|
|
12
|
-
userAbort(): void;
|
|
13
|
-
stopGracefully(): void;
|
|
14
|
-
|
|
15
|
-
static InitManager(): void;
|
|
16
|
-
static register(progress: ProgressIndicator): void;
|
|
17
|
-
static unregister(progress: ProgressIndicator): void;
|
|
18
|
-
static getProgress(refID: string): ProgressIndicator;
|
|
19
|
-
static addListener(handler: Function): number;
|
|
20
|
-
static removeListener(id: string): void;
|
|
21
|
-
static tellListeners(command: string, progress: ProgressIndicator): void;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
interface IDataStorePrivate {
|
|
25
|
-
uniqID: string;
|
|
26
|
-
dataclasses: {
|
|
27
|
-
[dataclassName: string]: DataClass;
|
|
28
|
-
};
|
|
29
|
-
dataclassesByCollectionName: {
|
|
30
|
-
[collectionName: string]: DataClass;
|
|
31
|
-
};
|
|
32
|
-
cacheDelay: number;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
class DataStore {
|
|
36
|
-
_private: IDataClassPrivate;
|
|
37
|
-
constructor(ID: string);
|
|
38
|
-
fetch(): Promise<this>;
|
|
39
|
-
getUniqID(): string;
|
|
40
|
-
getBaseID(): string;
|
|
41
|
-
getDataClass(classname: string): DataClass;
|
|
42
|
-
getDataClassByCollectionName(collectionName: string): DataClass;
|
|
43
|
-
getCacheDelay(): number;
|
|
44
|
-
getDataClasses(): {
|
|
45
|
-
[dataclassName: string]: DataClass;
|
|
46
|
-
};
|
|
47
|
-
initProgressManager(): void;
|
|
48
|
-
newProgressIndicator(): ProgressIndicator;
|
|
49
|
-
addProgressListener(handler: Function): void;
|
|
50
|
-
removeProgressListener(id: string): void;
|
|
51
|
-
getProjectName(): string;
|
|
52
|
-
getMethods(): {
|
|
53
|
-
[key: string]: {
|
|
54
|
-
name: string;
|
|
55
|
-
exposed: boolean;
|
|
56
|
-
allowedOnHTTPGET: boolean;
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
HTMLEncode(source: string, display: boolean, tabs: number): string;
|
|
60
|
-
logout(): Promise;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
1
|
+
declare namespace datasources {
|
|
2
|
+
class ProgressIndicator {
|
|
3
|
+
refID: string;
|
|
4
|
+
started: Date;
|
|
5
|
+
lastChecked: number;
|
|
6
|
+
inited: boolean;
|
|
7
|
+
checkDeletedCount: number;
|
|
8
|
+
askedToStop: boolean;
|
|
9
|
+
graceFullStop: boolean;
|
|
10
|
+
|
|
11
|
+
getRefID(): string;
|
|
12
|
+
userAbort(): void;
|
|
13
|
+
stopGracefully(): void;
|
|
14
|
+
|
|
15
|
+
static InitManager(): void;
|
|
16
|
+
static register(progress: ProgressIndicator): void;
|
|
17
|
+
static unregister(progress: ProgressIndicator): void;
|
|
18
|
+
static getProgress(refID: string): ProgressIndicator;
|
|
19
|
+
static addListener(handler: Function): number;
|
|
20
|
+
static removeListener(id: string): void;
|
|
21
|
+
static tellListeners(command: string, progress: ProgressIndicator): void;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
interface IDataStorePrivate {
|
|
25
|
+
uniqID: string;
|
|
26
|
+
dataclasses: {
|
|
27
|
+
[dataclassName: string]: DataClass;
|
|
28
|
+
};
|
|
29
|
+
dataclassesByCollectionName: {
|
|
30
|
+
[collectionName: string]: DataClass;
|
|
31
|
+
};
|
|
32
|
+
cacheDelay: number;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
class DataStore {
|
|
36
|
+
_private: IDataClassPrivate;
|
|
37
|
+
constructor(ID: string);
|
|
38
|
+
fetch(): Promise<this>;
|
|
39
|
+
getUniqID(): string;
|
|
40
|
+
getBaseID(): string;
|
|
41
|
+
getDataClass(classname: string): DataClass;
|
|
42
|
+
getDataClassByCollectionName(collectionName: string): DataClass;
|
|
43
|
+
getCacheDelay(): number;
|
|
44
|
+
getDataClasses(): {
|
|
45
|
+
[dataclassName: string]: DataClass;
|
|
46
|
+
};
|
|
47
|
+
initProgressManager(): void;
|
|
48
|
+
newProgressIndicator(): ProgressIndicator;
|
|
49
|
+
addProgressListener(handler: Function): void;
|
|
50
|
+
removeProgressListener(id: string): void;
|
|
51
|
+
getProjectName(): string;
|
|
52
|
+
getMethods(): {
|
|
53
|
+
[key: string]: {
|
|
54
|
+
name: string;
|
|
55
|
+
exposed: boolean;
|
|
56
|
+
allowedOnHTTPGET: boolean;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
HTMLEncode(source: string, display: boolean, tabs: number): string;
|
|
60
|
+
logout(): Promise;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
declare namespace datasources {
|
|
2
|
-
interface ICurrentPage<T extends IEntity = IEntity> {
|
|
3
|
-
first: number;
|
|
4
|
-
size: number;
|
|
5
|
-
entitiesDef: T[];
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
type IEntitySelectionSettings = Partial<{
|
|
9
|
-
expand: string;
|
|
10
|
-
relatedSelURI: string;
|
|
11
|
-
queryStr: string;
|
|
12
|
-
queryParams: string;
|
|
13
|
-
first: number;
|
|
14
|
-
pageLength: number;
|
|
15
|
-
filterAttributes: string;
|
|
16
|
-
dataSetName: string;
|
|
17
|
-
}>;
|
|
18
|
-
|
|
19
|
-
interface IEntitySelectionPrivate<T extends IEntity = IEntity> {
|
|
20
|
-
curPage: ICurrentPage<T>;
|
|
21
|
-
selLength: number;
|
|
22
|
-
maxEntities: number;
|
|
23
|
-
initialFirst: number;
|
|
24
|
-
pageLength: number;
|
|
25
|
-
inited: boolean;
|
|
26
|
-
owner: DataClass<T>;
|
|
27
|
-
fetching: boolean;
|
|
28
|
-
settings: IEntitySelectionSettings;
|
|
29
|
-
isRelatedSel: boolean;
|
|
30
|
-
relatedSelURI: string;
|
|
31
|
-
dataSetName: string;
|
|
32
|
-
filterAttributes: string;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
interface IDescriptorAsParam {
|
|
36
|
-
__ENTITIES: boolean;
|
|
37
|
-
__DATACLASS: string;
|
|
38
|
-
__DATASET: string;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
class EntitySelection<T extends IEntity = IEntity> {
|
|
42
|
-
constructor(
|
|
43
|
-
owner: DataClass<T>,
|
|
44
|
-
settings: IEntitySelectionSettings,
|
|
45
|
-
rawDef: IDataClass,
|
|
46
|
-
);
|
|
47
|
-
|
|
48
|
-
readonly length: number;
|
|
49
|
-
initAsEmpty(): void;
|
|
50
|
-
getLength(settings?: IEntitySelectionSettings): Promise<number>;
|
|
51
|
-
getMaxEntities(): number;
|
|
52
|
-
getDataClass(): DataClass<T>;
|
|
53
|
-
getDescriptorAsParam(): IDescriptorAsParam;
|
|
54
|
-
getComputedURL(
|
|
55
|
-
settings?: IEntitySelectionSettings,
|
|
56
|
-
forFuncCall?: boolean,
|
|
57
|
-
): {
|
|
58
|
-
url: string;
|
|
59
|
-
added: string;
|
|
60
|
-
};
|
|
61
|
-
fetchPage(
|
|
62
|
-
first: number,
|
|
63
|
-
size: number,
|
|
64
|
-
settings?: IEntitySelectionSettings,
|
|
65
|
-
): Promise<ICollection<T>>;
|
|
66
|
-
managePage(rawDef: ICollection<T>, nochangeInCurpage?: boolean): T[];
|
|
67
|
-
}
|
|
68
|
-
}
|
|
1
|
+
declare namespace datasources {
|
|
2
|
+
interface ICurrentPage<T extends IEntity = IEntity> {
|
|
3
|
+
first: number;
|
|
4
|
+
size: number;
|
|
5
|
+
entitiesDef: T[];
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
type IEntitySelectionSettings = Partial<{
|
|
9
|
+
expand: string;
|
|
10
|
+
relatedSelURI: string;
|
|
11
|
+
queryStr: string;
|
|
12
|
+
queryParams: string;
|
|
13
|
+
first: number;
|
|
14
|
+
pageLength: number;
|
|
15
|
+
filterAttributes: string;
|
|
16
|
+
dataSetName: string;
|
|
17
|
+
}>;
|
|
18
|
+
|
|
19
|
+
interface IEntitySelectionPrivate<T extends IEntity = IEntity> {
|
|
20
|
+
curPage: ICurrentPage<T>;
|
|
21
|
+
selLength: number;
|
|
22
|
+
maxEntities: number;
|
|
23
|
+
initialFirst: number;
|
|
24
|
+
pageLength: number;
|
|
25
|
+
inited: boolean;
|
|
26
|
+
owner: DataClass<T>;
|
|
27
|
+
fetching: boolean;
|
|
28
|
+
settings: IEntitySelectionSettings;
|
|
29
|
+
isRelatedSel: boolean;
|
|
30
|
+
relatedSelURI: string;
|
|
31
|
+
dataSetName: string;
|
|
32
|
+
filterAttributes: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
interface IDescriptorAsParam {
|
|
36
|
+
__ENTITIES: boolean;
|
|
37
|
+
__DATACLASS: string;
|
|
38
|
+
__DATASET: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
class EntitySelection<T extends IEntity = IEntity> {
|
|
42
|
+
constructor(
|
|
43
|
+
owner: DataClass<T>,
|
|
44
|
+
settings: IEntitySelectionSettings,
|
|
45
|
+
rawDef: IDataClass,
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
readonly length: number;
|
|
49
|
+
initAsEmpty(): void;
|
|
50
|
+
getLength(settings?: IEntitySelectionSettings): Promise<number>;
|
|
51
|
+
getMaxEntities(): number;
|
|
52
|
+
getDataClass(): DataClass<T>;
|
|
53
|
+
getDescriptorAsParam(): IDescriptorAsParam;
|
|
54
|
+
getComputedURL(
|
|
55
|
+
settings?: IEntitySelectionSettings,
|
|
56
|
+
forFuncCall?: boolean,
|
|
57
|
+
): {
|
|
58
|
+
url: string;
|
|
59
|
+
added: string;
|
|
60
|
+
};
|
|
61
|
+
fetchPage(
|
|
62
|
+
first: number,
|
|
63
|
+
size: number,
|
|
64
|
+
settings?: IEntitySelectionSettings,
|
|
65
|
+
): Promise<ICollection<T>>;
|
|
66
|
+
managePage(rawDef: ICollection<T>, nochangeInCurpage?: boolean): T[];
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -1,115 +1,115 @@
|
|
|
1
|
-
declare namespace catalog {
|
|
2
|
-
enum EAttributeKind {
|
|
3
|
-
STORAGE = 'storage',
|
|
4
|
-
RELATEDENTITY = 'relatedEntity',
|
|
5
|
-
RELATEDENTITIES = 'relatedEntities',
|
|
6
|
-
CALCULATED = 'calculated',
|
|
7
|
-
COMPOSITION = 'composition',
|
|
8
|
-
ALIAS = 'alias',
|
|
9
|
-
}
|
|
10
|
-
type AttributeType =
|
|
11
|
-
| 'bool'
|
|
12
|
-
| 'word'
|
|
13
|
-
| 'blob'
|
|
14
|
-
| 'string'
|
|
15
|
-
| 'text'
|
|
16
|
-
| 'uuid'
|
|
17
|
-
| 'short'
|
|
18
|
-
| 'long'
|
|
19
|
-
| 'number'
|
|
20
|
-
| 'byte'
|
|
21
|
-
| 'long64'
|
|
22
|
-
| 'duration'
|
|
23
|
-
| 'object'
|
|
24
|
-
| 'date'
|
|
25
|
-
| 'image';
|
|
26
|
-
type Scope = 'public' | 'publicOnServer';
|
|
27
|
-
type ApplyTo = 'dataClass' | 'entity' | 'entityCollection' | 'dataStore';
|
|
28
|
-
type AttributeKind =
|
|
29
|
-
| 'storage'
|
|
30
|
-
| 'alias'
|
|
31
|
-
| 'calculated'
|
|
32
|
-
| 'relatedEntity'
|
|
33
|
-
| 'relatedEntities';
|
|
34
|
-
|
|
35
|
-
type IDataClassProperties = Partial<{
|
|
36
|
-
panelColor: string;
|
|
37
|
-
position: {
|
|
38
|
-
x: number;
|
|
39
|
-
y: number;
|
|
40
|
-
};
|
|
41
|
-
}>;
|
|
42
|
-
type IAttributeProperties = Partial<{}>;
|
|
43
|
-
interface IModelProperties
|
|
44
|
-
extends Partial<{
|
|
45
|
-
version: string;
|
|
46
|
-
backgroundColor: string;
|
|
47
|
-
backgroundImage: string;
|
|
48
|
-
backgroundVariant: 'dotted' | 'grid' | 'none';
|
|
49
|
-
zoom: number;
|
|
50
|
-
viewportPosition: [number, number];
|
|
51
|
-
}> {}
|
|
52
|
-
interface IMethod {
|
|
53
|
-
name: string;
|
|
54
|
-
applyTo: ApplyTo;
|
|
55
|
-
scope: Scope;
|
|
56
|
-
from: 'remoteServer';
|
|
57
|
-
allowedOnHTTPGET: boolean;
|
|
58
|
-
startingLine: number;
|
|
59
|
-
paramsText: string;
|
|
60
|
-
filePath: string;
|
|
61
|
-
userDefined: boolean;
|
|
62
|
-
endingLine: number;
|
|
63
|
-
exposed: boolean;
|
|
64
|
-
}
|
|
65
|
-
type IDataClass = {
|
|
66
|
-
name: string;
|
|
67
|
-
className: string;
|
|
68
|
-
collectionName: string;
|
|
69
|
-
scope: DataclassScope;
|
|
70
|
-
attributes: IAttribute[];
|
|
71
|
-
uuid?: string;
|
|
72
|
-
virtual?: boolean;
|
|
73
|
-
} & Partial<{
|
|
74
|
-
defaultTopSize: number;
|
|
75
|
-
leave_tag_on_delete: boolean;
|
|
76
|
-
prevent_journaling: boolean;
|
|
77
|
-
comment: string;
|
|
78
|
-
extraProperties: IDataClassProperties;
|
|
79
|
-
}>;
|
|
80
|
-
type IEvent = {
|
|
81
|
-
kind: string;
|
|
82
|
-
from: string;
|
|
83
|
-
userDefined: boolean;
|
|
84
|
-
};
|
|
85
|
-
export type AttributeIndexKind = 'btree' | 'cluster' | 'auto' | 'none';
|
|
86
|
-
type IAttribute = {
|
|
87
|
-
name: string;
|
|
88
|
-
type: string;
|
|
89
|
-
kind: AttributeKind;
|
|
90
|
-
scope: Scope;
|
|
91
|
-
uuid?: string;
|
|
92
|
-
} & Partial<{
|
|
93
|
-
indexKind?: AttributeIndexKind | null;
|
|
94
|
-
invalidAlias: boolean;
|
|
95
|
-
autogenerate: boolean;
|
|
96
|
-
unique: boolean;
|
|
97
|
-
primKey: boolean;
|
|
98
|
-
exposed: boolean;
|
|
99
|
-
behavior: string;
|
|
100
|
-
autosequence: boolean;
|
|
101
|
-
indexed: boolean;
|
|
102
|
-
reversePath: boolean;
|
|
103
|
-
keywordIndexed: boolean;
|
|
104
|
-
not_null: boolean; // TODO: to be renamed to mandatory
|
|
105
|
-
minValue: number;
|
|
106
|
-
maxValue: number;
|
|
107
|
-
simpleDate: boolean;
|
|
108
|
-
defaultValue: any;
|
|
109
|
-
events: any[];
|
|
110
|
-
path: string;
|
|
111
|
-
extraProperties: IAttributeProperties;
|
|
112
|
-
styled_text: boolean;
|
|
113
|
-
comment: string;
|
|
114
|
-
}>;
|
|
115
|
-
}
|
|
1
|
+
declare namespace catalog {
|
|
2
|
+
enum EAttributeKind {
|
|
3
|
+
STORAGE = 'storage',
|
|
4
|
+
RELATEDENTITY = 'relatedEntity',
|
|
5
|
+
RELATEDENTITIES = 'relatedEntities',
|
|
6
|
+
CALCULATED = 'calculated',
|
|
7
|
+
COMPOSITION = 'composition',
|
|
8
|
+
ALIAS = 'alias',
|
|
9
|
+
}
|
|
10
|
+
type AttributeType =
|
|
11
|
+
| 'bool'
|
|
12
|
+
| 'word'
|
|
13
|
+
| 'blob'
|
|
14
|
+
| 'string'
|
|
15
|
+
| 'text'
|
|
16
|
+
| 'uuid'
|
|
17
|
+
| 'short'
|
|
18
|
+
| 'long'
|
|
19
|
+
| 'number'
|
|
20
|
+
| 'byte'
|
|
21
|
+
| 'long64'
|
|
22
|
+
| 'duration'
|
|
23
|
+
| 'object'
|
|
24
|
+
| 'date'
|
|
25
|
+
| 'image';
|
|
26
|
+
type Scope = 'public' | 'publicOnServer';
|
|
27
|
+
type ApplyTo = 'dataClass' | 'entity' | 'entityCollection' | 'dataStore';
|
|
28
|
+
type AttributeKind =
|
|
29
|
+
| 'storage'
|
|
30
|
+
| 'alias'
|
|
31
|
+
| 'calculated'
|
|
32
|
+
| 'relatedEntity'
|
|
33
|
+
| 'relatedEntities';
|
|
34
|
+
|
|
35
|
+
type IDataClassProperties = Partial<{
|
|
36
|
+
panelColor: string;
|
|
37
|
+
position: {
|
|
38
|
+
x: number;
|
|
39
|
+
y: number;
|
|
40
|
+
};
|
|
41
|
+
}>;
|
|
42
|
+
type IAttributeProperties = Partial<{}>;
|
|
43
|
+
interface IModelProperties
|
|
44
|
+
extends Partial<{
|
|
45
|
+
version: string;
|
|
46
|
+
backgroundColor: string;
|
|
47
|
+
backgroundImage: string;
|
|
48
|
+
backgroundVariant: 'dotted' | 'grid' | 'none';
|
|
49
|
+
zoom: number;
|
|
50
|
+
viewportPosition: [number, number];
|
|
51
|
+
}> {}
|
|
52
|
+
interface IMethod {
|
|
53
|
+
name: string;
|
|
54
|
+
applyTo: ApplyTo;
|
|
55
|
+
scope: Scope;
|
|
56
|
+
from: 'remoteServer';
|
|
57
|
+
allowedOnHTTPGET: boolean;
|
|
58
|
+
startingLine: number;
|
|
59
|
+
paramsText: string;
|
|
60
|
+
filePath: string;
|
|
61
|
+
userDefined: boolean;
|
|
62
|
+
endingLine: number;
|
|
63
|
+
exposed: boolean;
|
|
64
|
+
}
|
|
65
|
+
type IDataClass = {
|
|
66
|
+
name: string;
|
|
67
|
+
className: string;
|
|
68
|
+
collectionName: string;
|
|
69
|
+
scope: DataclassScope;
|
|
70
|
+
attributes: IAttribute[];
|
|
71
|
+
uuid?: string;
|
|
72
|
+
virtual?: boolean;
|
|
73
|
+
} & Partial<{
|
|
74
|
+
defaultTopSize: number;
|
|
75
|
+
leave_tag_on_delete: boolean;
|
|
76
|
+
prevent_journaling: boolean;
|
|
77
|
+
comment: string;
|
|
78
|
+
extraProperties: IDataClassProperties;
|
|
79
|
+
}>;
|
|
80
|
+
type IEvent = {
|
|
81
|
+
kind: string;
|
|
82
|
+
from: string;
|
|
83
|
+
userDefined: boolean;
|
|
84
|
+
};
|
|
85
|
+
export type AttributeIndexKind = 'btree' | 'cluster' | 'auto' | 'none';
|
|
86
|
+
type IAttribute = {
|
|
87
|
+
name: string;
|
|
88
|
+
type: string;
|
|
89
|
+
kind: AttributeKind;
|
|
90
|
+
scope: Scope;
|
|
91
|
+
uuid?: string;
|
|
92
|
+
} & Partial<{
|
|
93
|
+
indexKind?: AttributeIndexKind | null;
|
|
94
|
+
invalidAlias: boolean;
|
|
95
|
+
autogenerate: boolean;
|
|
96
|
+
unique: boolean;
|
|
97
|
+
primKey: boolean;
|
|
98
|
+
exposed: boolean;
|
|
99
|
+
behavior: string;
|
|
100
|
+
autosequence: boolean;
|
|
101
|
+
indexed: boolean;
|
|
102
|
+
reversePath: boolean;
|
|
103
|
+
keywordIndexed: boolean;
|
|
104
|
+
not_null: boolean; // TODO: to be renamed to mandatory
|
|
105
|
+
minValue: number;
|
|
106
|
+
maxValue: number;
|
|
107
|
+
simpleDate: boolean;
|
|
108
|
+
defaultValue: any;
|
|
109
|
+
events: any[];
|
|
110
|
+
path: string;
|
|
111
|
+
extraProperties: IAttributeProperties;
|
|
112
|
+
styled_text: boolean;
|
|
113
|
+
comment: string;
|
|
114
|
+
}>;
|
|
115
|
+
}
|
|
@@ -1,88 +1,88 @@
|
|
|
1
|
-
declare namespace catalog {
|
|
2
|
-
interface AttributeProps {
|
|
3
|
-
indexKind: AttributeIndexKind;
|
|
4
|
-
autogenerate: boolean;
|
|
5
|
-
unique: boolean;
|
|
6
|
-
primKey: boolean;
|
|
7
|
-
exposed: boolean;
|
|
8
|
-
autosequence: boolean;
|
|
9
|
-
keywordIndexed: boolean;
|
|
10
|
-
not_null: boolean; // TODO: to be renamed to mandatory
|
|
11
|
-
minValue: number;
|
|
12
|
-
maxValue: number;
|
|
13
|
-
simpleDate: boolean;
|
|
14
|
-
defaultValue: any;
|
|
15
|
-
extraProperties: IAttributeProperties;
|
|
16
|
-
styled_text: boolean;
|
|
17
|
-
comment: string;
|
|
18
|
-
events: any[];
|
|
19
|
-
}
|
|
20
|
-
interface BaseAttribute extends Partial<AttributeProps> {
|
|
21
|
-
/**
|
|
22
|
-
* name of the attribute
|
|
23
|
-
*/
|
|
24
|
-
name: string;
|
|
25
|
-
/**
|
|
26
|
-
* represents the actual type of the attribute (storage, relatedentity, relatedEntities, alias, calculated);
|
|
27
|
-
*/
|
|
28
|
-
kind: AttributeKind;
|
|
29
|
-
/**
|
|
30
|
-
* Scope of the attribute (publicOnServer is equivalent to private)
|
|
31
|
-
*/
|
|
32
|
-
scope: Scope;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
interface StorageAttribute extends BaseAttribute {
|
|
36
|
-
kind: 'storage';
|
|
37
|
-
type: AttributeType;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
interface RelatedEntityAttribute extends BaseAttribute {
|
|
41
|
-
kind: 'relatedEntity';
|
|
42
|
-
/**
|
|
43
|
-
* the value for the type property is the name of originating dataclass.
|
|
44
|
-
*/
|
|
45
|
-
type: string;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
interface RelatedEntitiesAttribute extends BaseAttribute {
|
|
49
|
-
kind: 'relatedEntities';
|
|
50
|
-
/**
|
|
51
|
-
* the value for the type property is the `selection name` of originating dataclass.
|
|
52
|
-
*/
|
|
53
|
-
type: string;
|
|
54
|
-
/**
|
|
55
|
-
* the path to the related attribute in the originating dataclass.
|
|
56
|
-
*/
|
|
57
|
-
path: string;
|
|
58
|
-
reversePath?: boolean;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
interface AliasAttribute extends BaseAttribute {
|
|
62
|
-
kind: 'alias';
|
|
63
|
-
/**
|
|
64
|
-
* in the case of alias, the type can be:
|
|
65
|
-
* - storage type. (bool, number, string, ...etc)
|
|
66
|
-
* - the `name` of the dataclass in case `behavior` is set to `relatedEntity`
|
|
67
|
-
* - the `selection name` of the dataclass in case `behavior` is set to `relatedEntities`
|
|
68
|
-
*/
|
|
69
|
-
type: string;
|
|
70
|
-
path: string;
|
|
71
|
-
behavior?: 'relatedEntity' | 'relatedEntities';
|
|
72
|
-
reversePath?: string;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
interface CalculatedAttribute extends BaseAttribute {
|
|
76
|
-
kind: 'calculated';
|
|
77
|
-
type: string;
|
|
78
|
-
path?: string;
|
|
79
|
-
behavior?: 'relatedEntity' | 'relatedEntities';
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
type Attribute =
|
|
83
|
-
| StorageAttribute
|
|
84
|
-
| RelatedEntityAttribute
|
|
85
|
-
| RelatedEntitiesAttribute
|
|
86
|
-
| AliasAttribute
|
|
87
|
-
| CalculatedAttribute;
|
|
88
|
-
}
|
|
1
|
+
declare namespace catalog {
|
|
2
|
+
interface AttributeProps {
|
|
3
|
+
indexKind: AttributeIndexKind;
|
|
4
|
+
autogenerate: boolean;
|
|
5
|
+
unique: boolean;
|
|
6
|
+
primKey: boolean;
|
|
7
|
+
exposed: boolean;
|
|
8
|
+
autosequence: boolean;
|
|
9
|
+
keywordIndexed: boolean;
|
|
10
|
+
not_null: boolean; // TODO: to be renamed to mandatory
|
|
11
|
+
minValue: number;
|
|
12
|
+
maxValue: number;
|
|
13
|
+
simpleDate: boolean;
|
|
14
|
+
defaultValue: any;
|
|
15
|
+
extraProperties: IAttributeProperties;
|
|
16
|
+
styled_text: boolean;
|
|
17
|
+
comment: string;
|
|
18
|
+
events: any[];
|
|
19
|
+
}
|
|
20
|
+
interface BaseAttribute extends Partial<AttributeProps> {
|
|
21
|
+
/**
|
|
22
|
+
* name of the attribute
|
|
23
|
+
*/
|
|
24
|
+
name: string;
|
|
25
|
+
/**
|
|
26
|
+
* represents the actual type of the attribute (storage, relatedentity, relatedEntities, alias, calculated);
|
|
27
|
+
*/
|
|
28
|
+
kind: AttributeKind;
|
|
29
|
+
/**
|
|
30
|
+
* Scope of the attribute (publicOnServer is equivalent to private)
|
|
31
|
+
*/
|
|
32
|
+
scope: Scope;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
interface StorageAttribute extends BaseAttribute {
|
|
36
|
+
kind: 'storage';
|
|
37
|
+
type: AttributeType;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
interface RelatedEntityAttribute extends BaseAttribute {
|
|
41
|
+
kind: 'relatedEntity';
|
|
42
|
+
/**
|
|
43
|
+
* the value for the type property is the name of originating dataclass.
|
|
44
|
+
*/
|
|
45
|
+
type: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
interface RelatedEntitiesAttribute extends BaseAttribute {
|
|
49
|
+
kind: 'relatedEntities';
|
|
50
|
+
/**
|
|
51
|
+
* the value for the type property is the `selection name` of originating dataclass.
|
|
52
|
+
*/
|
|
53
|
+
type: string;
|
|
54
|
+
/**
|
|
55
|
+
* the path to the related attribute in the originating dataclass.
|
|
56
|
+
*/
|
|
57
|
+
path: string;
|
|
58
|
+
reversePath?: boolean;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
interface AliasAttribute extends BaseAttribute {
|
|
62
|
+
kind: 'alias';
|
|
63
|
+
/**
|
|
64
|
+
* in the case of alias, the type can be:
|
|
65
|
+
* - storage type. (bool, number, string, ...etc)
|
|
66
|
+
* - the `name` of the dataclass in case `behavior` is set to `relatedEntity`
|
|
67
|
+
* - the `selection name` of the dataclass in case `behavior` is set to `relatedEntities`
|
|
68
|
+
*/
|
|
69
|
+
type: string;
|
|
70
|
+
path: string;
|
|
71
|
+
behavior?: 'relatedEntity' | 'relatedEntities';
|
|
72
|
+
reversePath?: string;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
interface CalculatedAttribute extends BaseAttribute {
|
|
76
|
+
kind: 'calculated';
|
|
77
|
+
type: string;
|
|
78
|
+
path?: string;
|
|
79
|
+
behavior?: 'relatedEntity' | 'relatedEntities';
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
type Attribute =
|
|
83
|
+
| StorageAttribute
|
|
84
|
+
| RelatedEntityAttribute
|
|
85
|
+
| RelatedEntitiesAttribute
|
|
86
|
+
| AliasAttribute
|
|
87
|
+
| CalculatedAttribute;
|
|
88
|
+
}
|