@dative-gpi/foundation-core-domain 1.1.10 → 1.1.12-dashboards-explorer-01

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.
@@ -0,0 +1,11 @@
1
+ import { DashboardExplorerElementInfos, type DashboardExplorerElementInfosDTO } from "./dashboardExplorerElementInfos";
2
+
3
+ export class DashboardExplorerElementDetails extends DashboardExplorerElementInfos {
4
+
5
+ constructor(params: DashboardExplorerElementDetailsDTO) {
6
+ super(params);
7
+ }
8
+ }
9
+
10
+ export interface DashboardExplorerElementDetailsDTO extends DashboardExplorerElementInfosDTO {
11
+ }
@@ -0,0 +1,114 @@
1
+ import type { ApplicationScope, DashboardExplorerElementType } from "@dative-gpi/foundation-shared-domain/enums";
2
+
3
+ import { PathCrumb, type PathCrumbDTO } from "../shared/pathCrumb";
4
+
5
+ export class DashboardExplorerElementInfos {
6
+ id: string;
7
+ imageId: string | null;
8
+ label: string;
9
+ code: string;
10
+ icon: string;
11
+ tags: string[];
12
+ colors: string[];
13
+ type: DashboardExplorerElementType;
14
+
15
+ // Folder
16
+ parentId: string | null;
17
+ parentLabel: string | null;
18
+ parentIcon: string | null;
19
+ recursiveFoldersIds: string[] | null;
20
+ recursiveDashboardOrganisationsIds: string[] | null;
21
+ recursiveDashboardShallowsIds: string[] | null;
22
+ path: PathCrumb[];
23
+
24
+ // DashboardOrganisation & DashboardShallow
25
+ folderId: string | null;
26
+ folderLabel: string | null;
27
+ folderIcon: string | null;
28
+
29
+ // DashboardShallow
30
+ dashboardOrganisationTypeId: string | null;
31
+ dashboardOrganisationTypeLabel: string | null;
32
+
33
+ // DashboardOrganisationType
34
+ organisationTypeId: string | null;
35
+ organisationTypeLabel: string | null;
36
+
37
+ // Dashboard
38
+ dashboardId: string | null;
39
+ scope: ApplicationScope | null;
40
+ locked: boolean | null;
41
+
42
+ constructor(params: DashboardExplorerElementInfosDTO) {
43
+ this.id = params.id;
44
+ this.imageId = params.imageId;
45
+ this.label = params.label;
46
+ this.code = params.code;
47
+ this.icon = params.icon;
48
+ this.tags = params.tags?.slice() ?? [];
49
+ this.colors = params.colors?.slice() ?? [];
50
+ this.type = params.type;
51
+
52
+ this.parentId = params.parentId ?? null;
53
+ this.parentLabel = params.parentLabel ?? null;
54
+ this.parentIcon = params.parentIcon ?? null;
55
+ this.recursiveFoldersIds = params.recursiveFoldersIds?.slice() ?? null;
56
+ this.recursiveDashboardOrganisationsIds = params.recursiveDashboardOrganisationsIds?.slice() ?? null;
57
+ this.recursiveDashboardShallowsIds = params.recursiveDashboardShallowsIds?.slice() ?? null;
58
+ this.path = params.path?.map(dto => new PathCrumb({ ...dto })).sort((a, b) => b.index - a.index) ?? [];
59
+
60
+ this.folderId = params.folderId ?? null;
61
+ this.folderLabel = params.folderLabel ?? null;
62
+ this.folderIcon = params.folderIcon ?? null;
63
+
64
+ this.dashboardOrganisationTypeId = params.dashboardOrganisationTypeId ?? null;
65
+ this.dashboardOrganisationTypeLabel = params.dashboardOrganisationTypeLabel ?? null;
66
+
67
+ this.organisationTypeId = params.organisationTypeId ?? null;
68
+ this.organisationTypeLabel = params.organisationTypeLabel ?? null;
69
+
70
+ this.dashboardId = params.dashboardId ?? null;
71
+ this.scope = params.scope ?? null;
72
+ this.locked = params.locked ?? null;
73
+ }
74
+ }
75
+
76
+ export interface DashboardExplorerElementInfosDTO {
77
+ id: string;
78
+ imageId: string | null;
79
+ label: string;
80
+ code: string;
81
+ icon: string;
82
+ tags: string[];
83
+ colors: string[];
84
+ type: DashboardExplorerElementType;
85
+
86
+ parentId?: string | null;
87
+ parentLabel?: string | null;
88
+ parentIcon?: string | null;
89
+ recursiveFoldersIds?: string[] | null;
90
+ recursiveDashboardOrganisationsIds?: string[] | null;
91
+ recursiveDashboardShallowsIds?: string[] | null;
92
+ path?: PathCrumbDTO[];
93
+
94
+ folderId?: string | null;
95
+ folderLabel?: string | null;
96
+ folderIcon?: string | null;
97
+
98
+ dashboardOrganisationTypeId?: string | null;
99
+ dashboardOrganisationTypeLabel?: string | null;
100
+
101
+ organisationTypeId?: string | null;
102
+ organisationTypeLabel?: string | null;
103
+
104
+ dashboardId?: string | null;
105
+ scope?: ApplicationScope | null;
106
+ locked?: boolean | null;
107
+ }
108
+
109
+ export interface DashboardExplorerElementFilters {
110
+ parentId?: string | null;
111
+ root?: boolean | null;
112
+ search?: string | null;
113
+ types?: DashboardExplorerElementType[] | null;
114
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./dashboardExplorerElementDetails";
2
+ export * from "./dashboardExplorerElementInfos";
@@ -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.widgetId === d.id);
54
+ const override = this.overrideWidgets.find(od => od.hiddenCode === d.hiddenCode);
55
55
  return override ? new WidgetInfos({ ...d, ...override }) : d;
56
56
  });
57
57
  }
package/models/index.ts CHANGED
@@ -13,6 +13,7 @@ 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";
16
17
  export * from "./dashboardOrganisations";
17
18
  export * from "./dashboardOrganisationTypes";
18
19
  export * from "./dashboards";
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.10",
7
+ "version": "1.1.12-dashboards-explorer-01",
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.10",
17
- "@dative-gpi/foundation-shared-services": "1.1.10"
16
+ "@dative-gpi/foundation-shared-domain": "1.1.12-dashboards-explorer-01",
17
+ "@dative-gpi/foundation-shared-services": "1.1.12-dashboards-explorer-01"
18
18
  },
19
- "gitHead": "9fab51b9fc34cd8a60f870ef40e5a437115f2f2b"
19
+ "gitHead": "fb53e71b5c00401b3238a32e8df80f1772a01e45"
20
20
  }