@dative-gpi/foundation-core-domain 0.0.103 → 0.0.105
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/models/alerts/alertInfos.ts +9 -9
- package/models/articles/articleInfos.ts +1 -1
- package/models/authTokens/authTokenInfos.ts +1 -1
- package/models/chartOrganisationTypes/chartOrganisationTypeInfos.ts +2 -2
- package/models/chartOrganisations/chartOrganisationInfos.ts +2 -2
- package/models/comments/commentInfos.ts +1 -1
- package/models/connectivityAlerts/connectivityAlertInfos.ts +3 -3
- package/models/connectivityScenarios/connectivityScenarioInfos.ts +1 -1
- package/models/customProperties/customPropertyInfos.ts +3 -3
- package/models/dashboardOrganisationTypes/dashboardOrganisationTypeInfos.ts +12 -12
- package/models/dashboardOrganisations/dashboardOrganisationInfos.ts +3 -3
- package/models/dashboardShallows/dashboardShallowInfos.ts +47 -47
- package/models/dataCategories/dataCategoryInfos.ts +3 -3
- package/models/dataDefinitions/dataDefinitionInfos.ts +4 -4
- package/models/deviceOrganisations/deviceOrganisationInfos.ts +109 -109
- package/models/folders/folderInfos.ts +41 -41
- package/models/groups/groupInfos.ts +5 -5
- package/models/locations/locationInfos.ts +3 -3
- package/models/manufacturers/manufacturerInfos.ts +1 -1
- package/models/modelStatuses/modelStatusInfos.ts +2 -2
- package/models/models/modelInfos.ts +2 -2
- package/models/permissionCategories/permissionCategoryInfos.ts +1 -1
- package/models/roleOrganisationTypes/roleOrganisationTypeInfos.ts +2 -2
- package/models/roleOrganisations/roleOrganisationInfos.ts +2 -2
- package/models/scenarioDeviceOrganisations/scenarioDeviceOrganisationInfos.ts +2 -2
- package/models/scenarioOrganisationTypes/scenarioOrganisationTypeInfos.ts +1 -1
- package/models/scenarioOrganisations/scenarioOrganisationInfos.ts +1 -1
- package/models/serviceAccounts/serviceAccountInfos.ts +1 -1
- package/models/userOrganisations/userOrganisationInfos.ts +1 -1
- package/models/widgetTemplates/widgetTemplateInfos.ts +1 -1
- package/package.json +2 -2
- package/tools/customPropertiesTools.ts +49 -0
- package/tools/index.ts +1 -0
|
@@ -110,13 +110,13 @@ export interface AlertInfosDTO {
|
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
export interface AlertFilters {
|
|
113
|
-
scenarioId
|
|
114
|
-
deviceOrganisationId
|
|
115
|
-
statuses
|
|
116
|
-
acknowledged
|
|
117
|
-
startDate
|
|
118
|
-
endDate
|
|
119
|
-
selectedEntities
|
|
120
|
-
entitiesIds
|
|
121
|
-
dateVariables
|
|
113
|
+
scenarioId?: string | null;
|
|
114
|
+
deviceOrganisationId?: string | null;
|
|
115
|
+
statuses?: AlertStatus[] | null;
|
|
116
|
+
acknowledged?: boolean | null;
|
|
117
|
+
startDate?: string | null;
|
|
118
|
+
endDate?: string | null;
|
|
119
|
+
selectedEntities?: SelectedEntities | null;
|
|
120
|
+
entitiesIds?: string[] | null;
|
|
121
|
+
dateVariables?: DateVariable[] | null;
|
|
122
122
|
}
|
|
@@ -45,7 +45,7 @@ export interface ConnectivityAlertInfosDTO {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
export interface ConnectivityAlertFilters {
|
|
48
|
-
deviceOrganisationId
|
|
49
|
-
startDate
|
|
50
|
-
endDate
|
|
48
|
+
deviceOrganisationId?: string | null;
|
|
49
|
+
startDate?: string | null;
|
|
50
|
+
endDate?: string | null;
|
|
51
51
|
}
|
|
@@ -62,7 +62,7 @@ export class CustomPropertyInfos {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
export interface CustomPropertyFilters {
|
|
65
|
-
entities
|
|
66
|
-
editableCore
|
|
67
|
-
search
|
|
65
|
+
entities?: PropertyEntity[] | null;
|
|
66
|
+
editableCore?: boolean | null;
|
|
67
|
+
search?: string | null;
|
|
68
68
|
}
|
|
@@ -29,19 +29,19 @@ export class DashboardOrganisationTypeInfos {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
export interface DashboardOrganisationTypeInfosDTO {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
32
|
+
id: string;
|
|
33
|
+
dashboardId: string;
|
|
34
|
+
organisationTypeId: string | null;
|
|
35
|
+
organisationTypeLabel: string | null;
|
|
36
|
+
scope: ApplicationScope;
|
|
37
|
+
locked: boolean;
|
|
38
|
+
label: string;
|
|
39
|
+
code: string;
|
|
40
|
+
icon: string;
|
|
41
|
+
tags: string[];
|
|
42
|
+
colors: string[];
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
export interface DashboardOrganisationTypeFilters {
|
|
46
|
-
|
|
46
|
+
search?: string | null;
|
|
47
47
|
}
|
|
@@ -49,7 +49,7 @@ export interface DashboardOrganisationInfosDTO {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
export interface DashboardOrganisationFilters {
|
|
52
|
-
root
|
|
53
|
-
folderId
|
|
54
|
-
search
|
|
52
|
+
root?: boolean | null;
|
|
53
|
+
folderId?: string | null;
|
|
54
|
+
search?: string | null;
|
|
55
55
|
}
|
|
@@ -1,58 +1,58 @@
|
|
|
1
1
|
import { ApplicationScope } from "../enums/applicationEnums";
|
|
2
2
|
|
|
3
3
|
export class DashboardShallowInfos {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
4
|
+
id: string;
|
|
5
|
+
organisationId: string;
|
|
6
|
+
dashboardOrganisationTypeId: string;
|
|
7
|
+
dashboardOrganisationTypeLabel: string;
|
|
8
|
+
folderId: string | null;
|
|
9
|
+
folderLabel: string | null;
|
|
10
|
+
folderIcon: string | null;
|
|
11
|
+
label: string;
|
|
12
|
+
code: string;
|
|
13
|
+
icon: string;
|
|
14
|
+
tags: string[];
|
|
15
|
+
colors: string[];
|
|
16
|
+
dashboardId: string;
|
|
17
|
+
scope: ApplicationScope;
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
19
|
+
constructor(params: DashboardShallowInfosDTO) {
|
|
20
|
+
this.id = params.id;
|
|
21
|
+
this.organisationId = params.organisationId;
|
|
22
|
+
this.dashboardOrganisationTypeId = params.dashboardOrganisationTypeId;
|
|
23
|
+
this.dashboardOrganisationTypeLabel = params.dashboardOrganisationTypeLabel;
|
|
24
|
+
this.folderId = params.folderId;
|
|
25
|
+
this.folderLabel = params.folderLabel;
|
|
26
|
+
this.folderIcon = params.folderIcon;
|
|
27
|
+
this.label = params.label;
|
|
28
|
+
this.code = params.code;
|
|
29
|
+
this.icon = params.icon;
|
|
30
|
+
this.tags = params.tags.slice();
|
|
31
|
+
this.colors = params.colors.slice();
|
|
32
|
+
this.dashboardId = params.dashboardId;
|
|
33
|
+
this.scope = params.scope;
|
|
34
|
+
}
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
export interface DashboardShallowInfosDTO {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
38
|
+
id: string;
|
|
39
|
+
organisationId: string;
|
|
40
|
+
dashboardOrganisationTypeId: string;
|
|
41
|
+
dashboardOrganisationTypeLabel: string;
|
|
42
|
+
folderId: string | null;
|
|
43
|
+
folderLabel: string | null;
|
|
44
|
+
folderIcon: string | null;
|
|
45
|
+
label: string;
|
|
46
|
+
code: string;
|
|
47
|
+
icon: string;
|
|
48
|
+
tags: string[];
|
|
49
|
+
colors: string[];
|
|
50
|
+
dashboardId: string;
|
|
51
|
+
scope: ApplicationScope;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
export interface DashboardShallowFilters {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
root?: boolean | null;
|
|
56
|
+
folderId?: string | null;
|
|
57
|
+
search?: string | null;
|
|
58
58
|
}
|
|
@@ -23,7 +23,7 @@ export interface DataCategoryInfosDTO {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
export interface DataCategoryFilters {
|
|
26
|
-
modelId
|
|
27
|
-
correlated
|
|
28
|
-
search
|
|
26
|
+
modelId?: string | null;
|
|
27
|
+
correlated?: boolean | null;
|
|
28
|
+
search?: string | null;
|
|
29
29
|
}
|
|
@@ -50,8 +50,8 @@ export interface DataDefinitionInfosDTO {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
export interface DataDefinitionFilters {
|
|
53
|
-
modelsIds
|
|
54
|
-
dataCategoryId
|
|
55
|
-
dataTable
|
|
56
|
-
search
|
|
53
|
+
modelsIds?: string[] | null;
|
|
54
|
+
dataCategoryId?: string | null;
|
|
55
|
+
dataTable?: DataTable | null;
|
|
56
|
+
search?: string | null;
|
|
57
57
|
}
|
|
@@ -4,121 +4,121 @@ import { DeviceOrganisationAlert, DeviceOrganisationAlertDTO } from "./deviceOrg
|
|
|
4
4
|
import { ModelStatusInfos, ModelStatusInfosDTO } from "../modelStatuses/modelStatusInfos";
|
|
5
5
|
|
|
6
6
|
export class DeviceOrganisationInfos {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
7
|
+
id: string;
|
|
8
|
+
deviceId: string;
|
|
9
|
+
manufacturerId: string;
|
|
10
|
+
manufacturerLabel: string;
|
|
11
|
+
articleId: string;
|
|
12
|
+
articleLabel: string;
|
|
13
|
+
modelId: string;
|
|
14
|
+
modelLabel: string;
|
|
15
|
+
ownerId: string | null;
|
|
16
|
+
ownerLabel: string | null;
|
|
17
|
+
organisationId: string | null;
|
|
18
|
+
managerId: string | null;
|
|
19
|
+
managerName: string | null;
|
|
20
|
+
locationId: string | null;
|
|
21
|
+
locationLabel: string | null;
|
|
22
|
+
locationAddress: string | null;
|
|
23
|
+
groupId: string | null;
|
|
24
|
+
groupLabel: string | null;
|
|
25
|
+
groupIcon: string | null;
|
|
26
|
+
label: string;
|
|
27
|
+
code: string;
|
|
28
|
+
imageId: string | null;
|
|
29
|
+
tags: string[];
|
|
30
|
+
unrestricted: boolean;
|
|
31
|
+
online: number;
|
|
32
|
+
meta: { [key: string]: string };
|
|
33
|
+
modelStatuses: ModelStatusInfos[];
|
|
34
|
+
status: DeviceStatusDetails;
|
|
35
|
+
connectivity: DeviceConnectivityDetails;
|
|
36
|
+
alerts: DeviceOrganisationAlert[];
|
|
37
|
+
worstAlert: DeviceOrganisationAlert | null;
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
get connectable(): DeviceConnectivityDetails | undefined {
|
|
40
|
+
return this.connectivity;
|
|
41
|
+
}
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
43
|
+
constructor(params: DeviceOrganisationInfosDTO) {
|
|
44
|
+
this.id = params.id;
|
|
45
|
+
this.deviceId = params.deviceId;
|
|
46
|
+
this.manufacturerId = params.manufacturerId;
|
|
47
|
+
this.manufacturerLabel = params.manufacturerLabel;
|
|
48
|
+
this.articleId = params.articleId;
|
|
49
|
+
this.articleLabel = params.articleLabel;
|
|
50
|
+
this.modelId = params.modelId;
|
|
51
|
+
this.modelLabel = params.modelLabel;
|
|
52
|
+
this.ownerId = params.ownerId;
|
|
53
|
+
this.ownerLabel = params.ownerLabel;
|
|
54
|
+
this.organisationId = params.organisationId;
|
|
55
|
+
this.managerId = params.managerId;
|
|
56
|
+
this.managerName = params.managerName;
|
|
57
|
+
this.locationId = params.locationId;
|
|
58
|
+
this.locationLabel = params.locationLabel;
|
|
59
|
+
this.locationAddress = params.locationAddress;
|
|
60
|
+
this.groupId = params.groupId;
|
|
61
|
+
this.groupLabel = params.groupLabel;
|
|
62
|
+
this.groupIcon = params.groupIcon;
|
|
63
|
+
this.label = params.label;
|
|
64
|
+
this.code = params.code;
|
|
65
|
+
this.imageId = params.imageId;
|
|
66
|
+
this.tags = params.tags.slice();
|
|
67
|
+
this.unrestricted = params.unrestricted;
|
|
68
|
+
this.online = params.online;
|
|
69
|
+
this.meta = { ...params.meta };
|
|
70
|
+
this.modelStatuses = params.modelStatuses.map(dto => new ModelStatusInfos(dto));
|
|
71
|
+
this.status = new DeviceStatusDetails(params.status);
|
|
72
|
+
this.connectivity = new DeviceConnectivityDetails(params.connectivity);
|
|
73
|
+
this.alerts = params.alerts.map(dto => new DeviceOrganisationAlert(dto));
|
|
74
|
+
this.worstAlert = params.worstAlert != null ?
|
|
75
|
+
new DeviceOrganisationAlert(params.worstAlert) : null;
|
|
76
|
+
}
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
export interface DeviceOrganisationInfosDTO {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
80
|
+
id: string;
|
|
81
|
+
deviceId: string;
|
|
82
|
+
manufacturerId: string;
|
|
83
|
+
manufacturerLabel: string;
|
|
84
|
+
articleId: string;
|
|
85
|
+
articleLabel: string;
|
|
86
|
+
modelId: string;
|
|
87
|
+
modelLabel: string;
|
|
88
|
+
ownerId: string | null;
|
|
89
|
+
ownerLabel: string | null;
|
|
90
|
+
organisationId: string;
|
|
91
|
+
managerId: string | null;
|
|
92
|
+
managerName: string | null;
|
|
93
|
+
locationId: string | null;
|
|
94
|
+
locationLabel: string | null;
|
|
95
|
+
locationAddress: string | null;
|
|
96
|
+
groupId: string | null;
|
|
97
|
+
groupLabel: string | null;
|
|
98
|
+
groupIcon: string | null;
|
|
99
|
+
label: string;
|
|
100
|
+
code: string;
|
|
101
|
+
imageId: string | null;
|
|
102
|
+
tags: string[];
|
|
103
|
+
unrestricted: boolean;
|
|
104
|
+
online: number;
|
|
105
|
+
meta: { [key: string]: string };
|
|
106
|
+
modelStatuses: ModelStatusInfosDTO[];
|
|
107
|
+
status: DeviceStatusDetailsDTO;
|
|
108
|
+
connectivity: DeviceConnectivityDetailsDTO;
|
|
109
|
+
alerts: DeviceOrganisationAlertDTO[];
|
|
110
|
+
worstAlert: DeviceOrganisationAlertDTO | null;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
export interface DeviceOrganisationFilters {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
114
|
+
locationId?: string | null;
|
|
115
|
+
otherLocationId?: string | null;
|
|
116
|
+
groupId?: string | null;
|
|
117
|
+
otherGroupId?: string | null;
|
|
118
|
+
root?: boolean | null;
|
|
119
|
+
unrestricted?: boolean | null;
|
|
120
|
+
modelsIds?: string[] | null;
|
|
121
|
+
deviceOrganisationsIds?: string[] | null;
|
|
122
|
+
otherDeviceOrganisationsIds?: string[] | null;
|
|
123
|
+
search?: string | null;
|
|
124
124
|
}
|
|
@@ -1,52 +1,52 @@
|
|
|
1
1
|
import { PathCrumb, PathCrumbDTO } from "../shared/pathCrumb";
|
|
2
2
|
|
|
3
3
|
export class FolderInfos {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
4
|
+
id: string;
|
|
5
|
+
organisationId: string;
|
|
6
|
+
parentId: string | null;
|
|
7
|
+
parentLabel: string | null;
|
|
8
|
+
parentIcon: string | null;
|
|
9
|
+
label: string;
|
|
10
|
+
icon: string;
|
|
11
|
+
code: string;
|
|
12
|
+
tags: string[];
|
|
13
|
+
colors: string[];
|
|
14
|
+
imageId: string | null;
|
|
15
|
+
path: PathCrumb[];
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
17
|
+
constructor(params: FolderInfosDTO) {
|
|
18
|
+
this.id = params.id;
|
|
19
|
+
this.organisationId = params.organisationId;
|
|
20
|
+
this.parentId = params.parentId;
|
|
21
|
+
this.parentLabel = params.parentLabel;
|
|
22
|
+
this.parentIcon = params.parentIcon;
|
|
23
|
+
this.label = params.label;
|
|
24
|
+
this.icon = params.icon;
|
|
25
|
+
this.code = params.code;
|
|
26
|
+
this.tags = params.tags.slice();
|
|
27
|
+
this.colors = params.colors.slice();
|
|
28
|
+
this.imageId = params.imageId;
|
|
29
|
+
this.path = params.path.map(dto => new PathCrumb(dto)).sort((a, b) => b.index - a.index);
|
|
30
|
+
}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
export interface FolderInfosDTO {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
34
|
+
id: string;
|
|
35
|
+
organisationId: string;
|
|
36
|
+
parentId: string | null;
|
|
37
|
+
parentLabel: string | null;
|
|
38
|
+
parentIcon: string | null;
|
|
39
|
+
label: string;
|
|
40
|
+
icon: string;
|
|
41
|
+
code: string;
|
|
42
|
+
tags: string[];
|
|
43
|
+
colors: string[];
|
|
44
|
+
imageId: string | null;
|
|
45
|
+
path: PathCrumbDTO[];
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
export interface FolderFilters {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
parentId?: string | null;
|
|
50
|
+
root?: boolean | null;
|
|
51
|
+
search?: string | null;
|
|
52
52
|
}
|
|
@@ -55,9 +55,9 @@ export interface GroupInfosDTO {
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
export interface GroupFilters {
|
|
58
|
-
parentId
|
|
59
|
-
root
|
|
60
|
-
modelsIds
|
|
61
|
-
groupsIds
|
|
62
|
-
search
|
|
58
|
+
parentId?: string | null;
|
|
59
|
+
root?: boolean | null;
|
|
60
|
+
modelsIds?: string[] | null;
|
|
61
|
+
groupsIds?: string[] | null;
|
|
62
|
+
search?: string | null;
|
|
63
63
|
}
|
|
@@ -40,7 +40,7 @@ export interface LocationInfosDTO {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
export interface LocationFilters {
|
|
43
|
-
locationsIds
|
|
44
|
-
modelsIds
|
|
45
|
-
search
|
|
43
|
+
locationsIds?: string[] | null;
|
|
44
|
+
modelsIds?: string[] | null;
|
|
45
|
+
search?: string | null;
|
|
46
46
|
}
|
|
@@ -57,6 +57,6 @@ export interface ScenarioDeviceOrganisationInfosDTO {
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
export interface ScenarioDeviceOrganisationFilters {
|
|
60
|
-
scenarioId
|
|
61
|
-
deviceOrganisationId
|
|
60
|
+
scenarioId?: string | null;
|
|
61
|
+
deviceOrganisationId?: string | null;
|
|
62
62
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-core-domain",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.105",
|
|
5
5
|
"description": "",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
"main": "index.ts",
|
|
10
10
|
"author": "",
|
|
11
11
|
"license": "ISC",
|
|
12
|
-
"gitHead": "
|
|
12
|
+
"gitHead": "87c3913599bcfc96f33e3f2528e2be91a252726e"
|
|
13
13
|
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import _ from "lodash";
|
|
2
|
+
|
|
3
|
+
import { CustomPropertyInfos, PropertyDataType } from "@dative-gpi/foundation-core-domain/models";
|
|
4
|
+
import { FSGridItem } from "@dative-gpi/foundation-shared-components/models";
|
|
5
|
+
|
|
6
|
+
export const CustomPropertiesTools = {
|
|
7
|
+
showCategory: (properties: CustomPropertyInfos[], category: string): boolean => {
|
|
8
|
+
return properties.some(cp => cp.categoryLabel === category);
|
|
9
|
+
},
|
|
10
|
+
getExtraGridItems: (properties: CustomPropertyInfos[], category: string): FSGridItem[] => {
|
|
11
|
+
return properties.filter(cp => cp.categoryLabel === category).map(cp => ({
|
|
12
|
+
label: cp.label,
|
|
13
|
+
code: `meta.${cp.code}`,
|
|
14
|
+
value: "",
|
|
15
|
+
hideDefault: cp.dataType === PropertyDataType.Boolean || cp.dataType === PropertyDataType.Icon
|
|
16
|
+
}));
|
|
17
|
+
},
|
|
18
|
+
getExtraGrids: (properties: CustomPropertyInfos[], categories: string[]): { [key: string]: FSGridItem[] } => {
|
|
19
|
+
const extraGrids: { [key: string]: FSGridItem[] } = {};
|
|
20
|
+
const extraCategories = _.groupBy(properties.filter(cp => !categories.includes(cp.categoryLabel)), cp => cp.categoryLabel);
|
|
21
|
+
for (const category in extraCategories) {
|
|
22
|
+
extraGrids[category] = extraCategories[category].map(cp => ({
|
|
23
|
+
label: cp.label,
|
|
24
|
+
code: `meta.${cp.code}`,
|
|
25
|
+
value: "",
|
|
26
|
+
hideDefault: cp.dataType === PropertyDataType.Boolean || cp.dataType === PropertyDataType.Icon
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
29
|
+
return extraGrids;
|
|
30
|
+
},
|
|
31
|
+
getExtraFields: (properties: CustomPropertyInfos[], category: string): CustomPropertyInfos[] => {
|
|
32
|
+
return properties.filter(cp => cp.categoryLabel === category && !cp.readOnlyCore);
|
|
33
|
+
},
|
|
34
|
+
getExtraCategories: (properties: CustomPropertyInfos[], categories: string[], sortFirst: string[]): { [key: string]: CustomPropertyInfos[] } => {
|
|
35
|
+
const unordered = _.groupBy(properties.filter(cp => !categories.includes(cp.categoryLabel) && !cp.readOnlyCore), cp => cp.categoryLabel);
|
|
36
|
+
|
|
37
|
+
return Object.keys(unordered).sort((a: string, b: string) => {
|
|
38
|
+
const aIndex = sortFirst.indexOf(a);
|
|
39
|
+
const bIndex = sortFirst.indexOf(b);
|
|
40
|
+
if ((aIndex !== -1 && bIndex !== -1) || aIndex === bIndex) {
|
|
41
|
+
return 0;
|
|
42
|
+
}
|
|
43
|
+
return bIndex - aIndex;
|
|
44
|
+
}).reduce((obj: { [key: string]: any }, key: string) => {
|
|
45
|
+
obj[key] = unordered[key];
|
|
46
|
+
return obj
|
|
47
|
+
}, {});
|
|
48
|
+
}
|
|
49
|
+
}
|
package/tools/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./customPropertiesTools";
|