@dative-gpi/foundation-core-domain 1.1.23 → 1.1.24-unit-formatter

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.
@@ -1,5 +1,5 @@
1
- import type { ModelInfosDTO } from "../models/modelInfos";
2
- import { ModelInfos } from "../models/modelInfos";
1
+ import type { ChartModelLabelDTO } from "../charts/chartModelLabel";
2
+ import { ChartModelLabel } from "../charts/chartModelLabel";
3
3
  import type { ApplicationScope } from "@dative-gpi/foundation-shared-domain/enums";
4
4
  import type { ChartType, PlotPer } from "@dative-gpi/foundation-shared-domain/enums";
5
5
 
@@ -21,7 +21,7 @@ export class ChartOrganisationTypeInfos {
21
21
  tags: string[];
22
22
  multiple: boolean;
23
23
  chartType: ChartType;
24
- models: ModelInfos[];
24
+ modelsLabels: ChartModelLabel[];
25
25
 
26
26
  constructor(params: ChartOrganisationTypeInfosDTO) {
27
27
  this.id = params.id;
@@ -41,7 +41,7 @@ export class ChartOrganisationTypeInfos {
41
41
  this.tags = params.tags.slice();
42
42
  this.multiple = params.multiple;
43
43
  this.chartType = params.chartType;
44
- this.models = params.models?.map((m) => new ModelInfos(m)) ?? [];
44
+ this.modelsLabels = params.modelsLabels.map((modelLabel) => new ChartModelLabel(modelLabel));
45
45
  }
46
46
  }
47
47
 
@@ -63,7 +63,7 @@ export interface ChartOrganisationTypeInfosDTO {
63
63
  tags: string[];
64
64
  multiple: boolean;
65
65
  chartType: ChartType;
66
- models?: ModelInfosDTO[];
66
+ modelsLabels: ChartModelLabelDTO[];
67
67
  }
68
68
 
69
69
  export interface ChartOrganisationTypeFilters {
@@ -1,5 +1,5 @@
1
- import type { ModelInfosDTO } from "../models/modelInfos";
2
- import { ModelInfos } from "../models/modelInfos";
1
+ import type { ChartModelLabelDTO } from "../charts/chartModelLabel";
2
+ import { ChartModelLabel } from "../charts/chartModelLabel";
3
3
  import type { ApplicationScope } from "@dative-gpi/foundation-shared-domain/enums";
4
4
  import type { ChartType, PlotPer } from "@dative-gpi/foundation-shared-domain/enums";
5
5
 
@@ -20,7 +20,7 @@ export class ChartOrganisationInfos {
20
20
  tags: string[];
21
21
  multiple: boolean;
22
22
  chartType: ChartType;
23
- models: ModelInfos[];
23
+ modelsLabels: ChartModelLabel[];
24
24
 
25
25
  constructor(params: ChartOrganisationInfosDTO) {
26
26
  this.id = params.id;
@@ -39,7 +39,7 @@ export class ChartOrganisationInfos {
39
39
  this.tags = params.tags.slice();
40
40
  this.multiple = params.multiple;
41
41
  this.chartType = params.chartType;
42
- this.models = params.models?.map((m) => new ModelInfos(m)) ?? [];
42
+ this.modelsLabels = params.modelsLabels.map((modelLabel) => new ChartModelLabel(modelLabel));
43
43
  }
44
44
  }
45
45
 
@@ -60,7 +60,7 @@ export interface ChartOrganisationInfosDTO {
60
60
  tags: string[];
61
61
  multiple: boolean;
62
62
  chartType: ChartType;
63
- models?: ModelInfosDTO[];
63
+ modelsLabels: ChartModelLabelDTO[];
64
64
  }
65
65
 
66
66
  export interface ChartOrganisationFilters {
@@ -1,3 +1,5 @@
1
+ import type { ChartModelLabelDTO } from "./chartModelLabel";
2
+ import { ChartModelLabel } from "./chartModelLabel";
1
3
  import type { ApplicationScope } from "@dative-gpi/foundation-shared-domain/enums";
2
4
  import type { ChartType } from "@dative-gpi/foundation-shared-domain/enums";
3
5
 
@@ -16,6 +18,7 @@ export class ChartInfos {
16
18
  tags: string[];
17
19
  multiple: boolean;
18
20
  chartType: ChartType;
21
+ modelsLabels: ChartModelLabel[];
19
22
 
20
23
  constructor(params: ChartInfosDTO) {
21
24
  this.id = params.id;
@@ -32,6 +35,7 @@ export class ChartInfos {
32
35
  this.tags = params.tags.slice();
33
36
  this.multiple = params.multiple;
34
37
  this.chartType = params.chartType;
38
+ this.modelsLabels = params.modelsLabels.map((modelLabel) => new ChartModelLabel(modelLabel));
35
39
  }
36
40
  }
37
41
 
@@ -50,4 +54,5 @@ export interface ChartInfosDTO {
50
54
  tags: string[];
51
55
  multiple: boolean;
52
56
  chartType: ChartType;
57
+ modelsLabels: ChartModelLabelDTO[];
53
58
  }
@@ -0,0 +1,14 @@
1
+ export class ChartModelLabel {
2
+ id: string;
3
+ label: string;
4
+
5
+ constructor(params: ChartModelLabelDTO) {
6
+ this.id = params.id;
7
+ this.label = params.label;
8
+ }
9
+ }
10
+
11
+ export interface ChartModelLabelDTO {
12
+ id: string;
13
+ label: string;
14
+ }
@@ -7,6 +7,8 @@ export class ChartOperand {
7
7
  chartSerieHiddenCode: string;
8
8
  name: string;
9
9
  aggregation?: AggregationType;
10
+ modelId: string;
11
+ modelLabel: string;
10
12
  dataCategoryId: string;
11
13
  dataDefinitionId?: string;
12
14
  xAxisModifierHiddenCode?: string;
@@ -20,8 +22,10 @@ export class ChartOperand {
20
22
  this.chartId = params.chartId;
21
23
  this.hiddenCode = params.hiddenCode;
22
24
  this.chartSerieHiddenCode = params.chartSerieHiddenCode;
23
- this.name = params.name;
25
+ this.name = params.name
24
26
  this.aggregation = (params.aggregation as AggregationType) ?? undefined;
27
+ this.modelId = params.modelId;
28
+ this.modelLabel = params.modelLabel;
25
29
  this.dataCategoryId = params.dataCategoryId;
26
30
  this.dataDefinitionId = params.dataDefinitionId;
27
31
  this.xAxisModifierHiddenCode = params.xAxisModifierHiddenCode;
@@ -39,6 +43,8 @@ export interface ChartOperandDTO {
39
43
  chartSerieHiddenCode: string;
40
44
  name: string;
41
45
  aggregation?: number;
46
+ modelId: string;
47
+ modelLabel: string;
42
48
  dataCategoryId: string;
43
49
  dataDefinitionId?: string;
44
50
  xAxisModifierHiddenCode?: string;
@@ -53,6 +59,7 @@ export interface CreateChartOperandDTO {
53
59
  chartSerieHiddenCode: string;
54
60
  name: string;
55
61
  aggregation?: number;
62
+ modelId: string;
56
63
  dataCategoryId: string;
57
64
  dataDefinitionId?: string;
58
65
  xAxisModifierHiddenCode?: string;
@@ -6,6 +6,7 @@ export * from "./chartFilter";
6
6
  export * from "./chartFilterTranslation";
7
7
  export * from "./chartFilterValue";
8
8
  export * from "./chartInfos";
9
+ export * from "./chartModelLabel";
9
10
  export * from "./chartModifier";
10
11
  export * from "./chartOperand";
11
12
  export * from "./chartPlot";
@@ -51,7 +51,7 @@ export class DashboardShallowDetails extends DashboardShallowInfos {
51
51
 
52
52
  get widgets() {
53
53
  return this.defaultWidgets.map(d => {
54
- const override = this.overrideWidgets.find(od => od.hiddenCode === d.hiddenCode);
54
+ const override = this.overrideWidgets.find(od => od.widgetId === d.id);
55
55
  return override ? new WidgetInfos({ ...d, ...override }) : d;
56
56
  });
57
57
  }
@@ -1,32 +1,29 @@
1
- import type { ModelInfosDTO } from "../models/modelInfos";
2
- import { ModelInfos } from "../models/modelInfos";
3
-
4
1
  export class DataCategoryInfos {
5
2
  id: string;
3
+ modelId: string;
6
4
  code: string;
7
5
  label: string;
8
6
  correlated: boolean;
9
- models: ModelInfos[];
10
7
 
11
8
  constructor(params: DataCategoryInfosDTO) {
12
9
  this.id = params.id;
10
+ this.modelId = params.modelId;
13
11
  this.code = params.code;
14
12
  this.label = params.label;
15
13
  this.correlated = params.correlated;
16
- this.models = params.models?.map((m) => new ModelInfos(m)) ?? [];
17
14
  }
18
15
  }
19
16
 
20
17
  export interface DataCategoryInfosDTO {
21
18
  id: string;
19
+ modelId: string;
22
20
  code: string;
23
21
  label: string;
24
22
  correlated: boolean;
25
- models?: ModelInfosDTO[];
26
23
  }
27
24
 
28
25
  export interface DataCategoryFilters {
29
- modelsIds?: string[] | null;
26
+ modelId?: string | null;
30
27
  correlated?: boolean | null;
31
28
  search?: string | null;
32
29
  }
@@ -4,6 +4,7 @@ import type { DataTable } from "@dative-gpi/foundation-shared-domain/enums";
4
4
 
5
5
  export class DataDefinitionInfos {
6
6
  id: string;
7
+ modelId: string;
7
8
  dataCategoryId: string;
8
9
  dataCategoryCode: string;
9
10
  dataCategoryLabel: string;
@@ -18,6 +19,7 @@ export class DataDefinitionInfos {
18
19
 
19
20
  constructor(params: DataDefinitionInfosDTO) {
20
21
  this.id = params.id;
22
+ this.modelId = params.modelId;
21
23
  this.dataCategoryId = params.dataCategoryId;
22
24
  this.dataCategoryCode = params.dataCategoryCode;
23
25
  this.dataCategoryLabel = params.dataCategoryLabel;
@@ -34,6 +36,7 @@ export class DataDefinitionInfos {
34
36
 
35
37
  export interface DataDefinitionInfosDTO {
36
38
  id: string;
39
+ modelId: string;
37
40
  dataCategoryId: string;
38
41
  dataCategoryCode: string;
39
42
  dataCategoryLabel: string;
@@ -75,20 +75,36 @@ export class DeviceExplorerElementInfos {
75
75
  this.worstAlert = params.worstAlert ? new DeviceOrganisationAlert(params.worstAlert) : null;
76
76
  }
77
77
 
78
- static fromDeviceOrganisation = (deviceOrganisation: DeviceOrganisationInfos): DeviceExplorerElementInfos => new DeviceExplorerElementInfos({
78
+ static fromDeviceOrganisation = (deviceOrganisation: DeviceOrganisationInfos): DeviceExplorerElementInfos => ({
79
79
  ...deviceOrganisation,
80
80
  type: DeviceExplorerElementType.DeviceOrganisation,
81
81
  parentId: deviceOrganisation.groupId,
82
+ icon: null,
83
+ groupsIds: null,
84
+ deviceOrganisationsIds: null,
85
+ modelsIds: null,
86
+ recursiveGroupsIds: null,
87
+ recursiveDeviceOrganisationsIds: null,
88
+ recursiveModelsIds: null
89
+ });
90
+
91
+ static fromGroup = (group: GroupInfos): DeviceExplorerElementInfos => ({
92
+ ...group,
93
+ type: DeviceExplorerElementType.Group,
94
+ manufacturerLabel: null,
95
+ articleLabel: null,
96
+ modelLabel: null,
97
+ ownerLabel: null,
98
+ managerName: null,
99
+ unrestricted: null,
100
+ online: null,
101
+ meta: null,
102
+ modelStatuses: null,
82
103
  status: null,
83
104
  connectivity: null,
84
105
  alerts: null,
85
106
  worstAlert: null
86
107
  });
87
-
88
- static fromGroup = (group: GroupInfos): DeviceExplorerElementInfos => new DeviceExplorerElementInfos({
89
- ...group,
90
- type: DeviceExplorerElementType.Group
91
- });
92
108
  }
93
109
 
94
110
  export interface DeviceExplorerElementInfosDTO {
@@ -5,7 +5,6 @@ import { ModelStatusInfos, type ModelStatusInfosDTO } from "../modelStatuses/mod
5
5
  import { type EntityType } from '@dative-gpi/foundation-shared-domain/enums';
6
6
  import { PathCrumb, type PathCrumbDTO } from "../shared/pathCrumb";
7
7
  import { Address, type AddressDTO } from '@dative-gpi/foundation-shared-domain';
8
- import { SubgroupingInfos } from "../subgroupings";
9
8
 
10
9
  export class DeviceOrganisationInfos {
11
10
  id: string;
@@ -47,7 +46,6 @@ export class DeviceOrganisationInfos {
47
46
  connectivity: DeviceConnectivityDetails;
48
47
  alerts: DeviceOrganisationAlert[];
49
48
  worstAlert: DeviceOrganisationAlert | null;
50
- subgroupings: SubgroupingInfos[];
51
49
 
52
50
  constructor(params: DeviceOrganisationInfosDTO) {
53
51
  this.id = params.id;
@@ -90,7 +88,6 @@ export class DeviceOrganisationInfos {
90
88
  this.alerts = params.alerts.map(dto => new DeviceOrganisationAlert(dto));
91
89
  this.worstAlert = params.worstAlert != null ?
92
90
  new DeviceOrganisationAlert(params.worstAlert) : null;
93
- this.subgroupings = params.subgroupings.map(dto => new SubgroupingInfos(dto));
94
91
  }
95
92
  }
96
93
 
@@ -134,7 +131,6 @@ export interface DeviceOrganisationInfosDTO {
134
131
  connectivity: DeviceConnectivityDetailsDTO;
135
132
  alerts: DeviceOrganisationAlertDTO[];
136
133
  worstAlert: DeviceOrganisationAlertDTO | null;
137
- subgroupings: SubgroupingInfos[];
138
134
  }
139
135
 
140
136
  export interface DeviceOrganisationFilters {
@@ -29,6 +29,5 @@ export interface GroupingInfosDTO {
29
29
  }
30
30
 
31
31
  export interface GroupingFilters {
32
- groupingsIds?: string[] | null;
33
32
  search?: string | null;
34
33
  }
package/models/index.ts CHANGED
@@ -13,7 +13,6 @@ export * from "./customProperties";
13
13
  export * from "./customPropertyValues";
14
14
  export * from "./dashboardDatePresets"; // No service
15
15
  export * from "./dashboardEntityPresets"; // No service
16
- export * from "./dashboardExplorerElements";
17
16
  export * from "./dashboardOrganisations";
18
17
  export * from "./dashboardOrganisationTypes";
19
18
  export * from "./dashboards";
@@ -1,5 +1,7 @@
1
1
  export class ModelInfos {
2
2
  id: string;
3
+ manufacturerId: string;
4
+ manufacturerLabel: string;
3
5
  imageId: string | null;
4
6
  code: string;
5
7
  label: string;
@@ -7,7 +9,9 @@ export class ModelInfos {
7
9
 
8
10
  constructor(params: ModelInfosDTO) {
9
11
  this.id = params.id;
10
- this.imageId = params.imageId ?? null;
12
+ this.manufacturerId = params.manufacturerId;
13
+ this.manufacturerLabel = params.manufacturerLabel;
14
+ this.imageId = params.imageId;
11
15
  this.code = params.code;
12
16
  this.label = params.label;
13
17
  this.connectable = params.connectable;
@@ -16,7 +20,9 @@ export class ModelInfos {
16
20
 
17
21
  export interface ModelInfosDTO {
18
22
  id: string;
19
- imageId?: string | null;
23
+ manufacturerId: string;
24
+ manufacturerLabel: string;
25
+ imageId: string | null;
20
26
  code: string;
21
27
  label: string;
22
28
  connectable: boolean;
@@ -24,6 +30,5 @@ export interface ModelInfosDTO {
24
30
 
25
31
  export interface ModelFilters {
26
32
  modelsIds?: string[] | null;
27
- codes?: string[] | null;
28
33
  search?: string | null;
29
34
  }
@@ -19,7 +19,7 @@ export interface SubgroupingDeviceOrganisationInfosDTO {
19
19
  }
20
20
 
21
21
  export interface SubgroupingDeviceOrganisationFilters {
22
- groupingsIds?: string[] | null;
23
- subgroupingsIds?: string[] | null;
22
+ groupingIds?: string[] | null;
23
+ subgroupingIds?: string[] | null;
24
24
  search?: string | null;
25
25
  }
@@ -1,41 +1,28 @@
1
1
  export class SubgroupingInfos {
2
2
  id: string;
3
3
  groupingId: string;
4
- groupingLabel: string;
5
- groupingColor: string;
6
- groupingIcon: string;
7
4
  label: string;
8
5
  code: string;
9
6
  icon: string;
10
- deviceOrganisationsCount: number;
11
7
 
12
8
  constructor(params: SubgroupingInfosDTO) {
13
9
  this.id = params.id;
14
10
  this.groupingId = params.groupingId;
15
- this.groupingLabel = params.groupingLabel;
16
- this.groupingColor = params.groupingColor;
17
- this.groupingIcon = params.groupingIcon;
18
11
  this.label = params.label;
19
12
  this.code = params.code;
20
13
  this.icon = params.icon;
21
- this.deviceOrganisationsCount = params.deviceOrganisationsCount;
22
14
  }
23
15
  }
24
16
 
25
17
  export interface SubgroupingInfosDTO {
26
18
  id: string;
27
19
  groupingId: string;
28
- groupingLabel: string;
29
- groupingColor: string;
30
- groupingIcon: string;
31
20
  label: string;
32
21
  code: string;
33
22
  icon: string;
34
- deviceOrganisationsCount: number;
35
23
  }
36
24
 
37
25
  export interface SubgroupingFilters {
38
- subgroupingsIds?: string[] | null;
39
- groupingsIds?: string[] | null;
26
+ groupingIds?: string[] | null;
40
27
  search?: string | null;
41
28
  }
@@ -1,4 +1,3 @@
1
- import { isoToEpoch } from "@dative-gpi/foundation-shared-domain/tools";
2
1
  import type { UserType, UserValidityState } from "@dative-gpi/foundation-shared-domain/enums";
3
2
  import type { RoleType } from "@dative-gpi/foundation-shared-domain/enums";
4
3
 
@@ -24,7 +23,6 @@ export class UserOrganisationInfos {
24
23
  name: string;
25
24
  startOnKioskMode: boolean;
26
25
  tags: string[];
27
- lastActivity: number | null;
28
26
 
29
27
  constructor(params: UserOrganisationInfosDTO) {
30
28
  this.id = params.id;
@@ -48,7 +46,6 @@ export class UserOrganisationInfos {
48
46
  this.name = params.name;
49
47
  this.startOnKioskMode = params.startOnKioskMode;
50
48
  this.tags = params.tags && params.tags.slice() || [];
51
- this.lastActivity = params.lastActivity ? isoToEpoch(params.lastActivity) : null;
52
49
  }
53
50
  }
54
51
 
@@ -74,7 +71,6 @@ export interface UserOrganisationInfosDTO {
74
71
  name: string;
75
72
  startOnKioskMode: boolean;
76
73
  tags: string[] | null;
77
- lastActivity: string | null;
78
74
  }
79
75
 
80
76
  export interface UserOrganisationFilters {
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "url": "https://github.com/Dative-GPI/foundation-shared-ui.git"
5
5
  },
6
6
  "sideEffects": false,
7
- "version": "1.1.23",
7
+ "version": "1.1.24-unit-formatter",
8
8
  "description": "",
9
9
  "publishConfig": {
10
10
  "access": "public"
@@ -13,8 +13,8 @@
13
13
  "author": "",
14
14
  "license": "ISC",
15
15
  "dependencies": {
16
- "@dative-gpi/foundation-shared-domain": "1.1.23",
17
- "@dative-gpi/foundation-shared-services": "1.1.23"
16
+ "@dative-gpi/foundation-shared-domain": "1.1.24-unit-formatter",
17
+ "@dative-gpi/foundation-shared-services": "1.1.24-unit-formatter"
18
18
  },
19
- "gitHead": "b89c8c5be537d450306310fa9dbec12a4477eed6"
19
+ "gitHead": "ac04fd5da2ebd73bfb31ff6ffc4f5ff54a872e9e"
20
20
  }
@@ -1,50 +0,0 @@
1
- import { DashboardExplorerElementInfos, type DashboardExplorerElementInfosDTO } from "./dashboardExplorerElementInfos";
2
-
3
- export class DashboardExplorerElementDetails extends DashboardExplorerElementInfos {
4
- // DashboardOrganisation & DashboardShallow
5
- folderId: string | null;
6
- folderLabel: string | null;
7
- folderIcon: string | null;
8
-
9
- // DashboardShallow
10
- dashboardOrganisationTypeId: string | null;
11
- dashboardOrganisationTypeLabel: string | null;
12
-
13
- // DashboardOrganisationType
14
- organisationTypeId: string | null;
15
- organisationTypeLabel: string | null;
16
-
17
- // Dashboard
18
- dashboardId: string | null;
19
-
20
-
21
- constructor(params: DashboardExplorerElementDetailsDTO) {
22
- super(params);
23
- this.folderId = params.folderId ?? null;
24
- this.folderLabel = params.folderLabel ?? null;
25
- this.folderIcon = params.folderIcon ?? null;
26
- this.dashboardOrganisationTypeId = params.dashboardOrganisationTypeId ?? null;
27
- this.dashboardOrganisationTypeLabel = params.dashboardOrganisationTypeLabel ?? null;
28
- this.organisationTypeId = params.organisationTypeId ?? null;
29
- this.organisationTypeLabel = params.organisationTypeLabel ?? null;
30
- this.dashboardId = params.dashboardId ?? null;
31
- }
32
- }
33
-
34
- export interface DashboardExplorerElementDetailsDTO extends DashboardExplorerElementInfosDTO {
35
- // DashboardOrganisation & DashboardShallow
36
- folderId?: string;
37
- folderLabel?: string | null;
38
- folderIcon?: string | null;
39
-
40
- // DashboardShallow
41
- dashboardOrganisationTypeId?: string | null;
42
- dashboardOrganisationTypeLabel?: string | null;
43
-
44
- // DashboardOrganisationType
45
- organisationTypeId?: string | null;
46
- organisationTypeLabel?: string | null;
47
-
48
- // Dashboard
49
- dashboardId?: string | null;
50
- }
@@ -1,110 +0,0 @@
1
- import type { ApplicationScope, DashboardExplorerElementType } from "@dative-gpi/foundation-shared-domain/enums";
2
- import { DashboardExplorerElementType as DashboardExplorerElementTypeEnum } from "@dative-gpi/foundation-shared-domain/enums";
3
-
4
- import { PathCrumb, type PathCrumbDTO } from "../shared/pathCrumb";
5
- import type { DashboardOrganisationInfos } from "../dashboardOrganisations/dashboardOrganisationInfos";
6
- import type { DashboardShallowInfos } from "../dashboardShallows/dashboardShallowInfos";
7
- import type { DashboardOrganisationTypeInfos } from "../dashboardOrganisationTypes/dashboardOrganisationTypeInfos";
8
- import type { FolderInfos } from "../folders/folderInfos";
9
-
10
- export class DashboardExplorerElementInfos {
11
- id: string;
12
- imageId: string | null;
13
- label: string;
14
- code: string;
15
- icon: string;
16
- tags: string[];
17
- colors: string[];
18
- type: DashboardExplorerElementType;
19
-
20
- // Folder
21
- parentId: string | null;
22
- parentLabel: string | null;
23
- parentIcon: string | null;
24
- recursiveFoldersIds: string[] | null;
25
- recursiveDashboardOrganisationsIds: string[] | null;
26
- recursiveDashboardShallowsIds: string[] | null;
27
- path: PathCrumb[];
28
- // Dashboard
29
- scope: ApplicationScope | null;
30
- locked: boolean | null;
31
-
32
- constructor(params: DashboardExplorerElementInfosDTO) {
33
- this.id = params.id;
34
- this.imageId = params.imageId;
35
- this.label = params.label;
36
- this.code = params.code;
37
- this.icon = params.icon;
38
- this.tags = params.tags?.slice() ?? [];
39
- this.colors = params.colors?.slice() ?? [];
40
- this.type = params.type;
41
-
42
- this.parentId = params.parentId ?? null;
43
- this.parentLabel = params.parentLabel ?? null;
44
- this.parentIcon = params.parentIcon ?? null;
45
- this.recursiveFoldersIds = params.recursiveFoldersIds?.slice() ?? null;
46
- this.recursiveDashboardOrganisationsIds = params.recursiveDashboardOrganisationsIds?.slice() ?? null;
47
- this.recursiveDashboardShallowsIds = params.recursiveDashboardShallowsIds?.slice() ?? null;
48
- this.path = params.path?.map(dto => new PathCrumb({ ...dto })).sort((a, b) => b.index - a.index) ?? [];
49
-
50
- this.scope = params.scope ?? null;
51
- this.locked = params.locked ?? null;
52
- }
53
-
54
- static fromDashboardOrganisation = (d: DashboardOrganisationInfos): DashboardExplorerElementInfos => new DashboardExplorerElementInfos({
55
- ...d,
56
- type: DashboardExplorerElementTypeEnum.DashboardOrganisation,
57
- parentId: d.folderId,
58
- parentLabel: d.folderLabel,
59
- parentIcon: d.folderIcon
60
- });
61
-
62
- static fromDashboardShallow = (d: DashboardShallowInfos): DashboardExplorerElementInfos => new DashboardExplorerElementInfos({
63
- ...d,
64
- type: DashboardExplorerElementTypeEnum.DashboardShallow,
65
- parentId: d.folderId,
66
- parentLabel: d.folderLabel,
67
- parentIcon: d.folderIcon
68
- });
69
-
70
- static fromDashboardOrganisationType = (d: DashboardOrganisationTypeInfos): DashboardExplorerElementInfos => new DashboardExplorerElementInfos({
71
- ...d,
72
- type: DashboardExplorerElementTypeEnum.DashboardOrganisationType
73
- });
74
-
75
- static fromFolder = (f: FolderInfos): DashboardExplorerElementInfos => new DashboardExplorerElementInfos({
76
- ...f,
77
- type: DashboardExplorerElementTypeEnum.Folder
78
- });
79
- }
80
-
81
- export interface DashboardExplorerElementInfosDTO {
82
- id: string;
83
- imageId: string | null;
84
- label: string;
85
- code: string;
86
- icon: string;
87
- tags: string[];
88
- colors: string[];
89
- type: DashboardExplorerElementType;
90
-
91
- parentId?: string | null;
92
- parentLabel?: string | null;
93
- parentIcon?: string | null;
94
- recursiveFoldersIds?: string[] | null;
95
- recursiveDashboardOrganisationsIds?: string[] | null;
96
- recursiveDashboardShallowsIds?: string[] | null;
97
- path?: PathCrumbDTO[];
98
-
99
- scope?: ApplicationScope | null;
100
- locked?: boolean | null;
101
- }
102
-
103
- export interface DashboardExplorerElementFilters {
104
- dashboardExplorerElementsIds?: string[] | null;
105
- ancestorId?: string | null;
106
- parentId?: string | null;
107
- root?: boolean | null;
108
- search?: string | null;
109
- types?: DashboardExplorerElementType[] | null;
110
- }
@@ -1,2 +0,0 @@
1
- export * from "./dashboardExplorerElementDetails";
2
- export * from "./dashboardExplorerElementInfos";