@dative-gpi/foundation-core-domain 1.0.185-remove-clean → 1.0.185-remove-clean2
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,29 +1,15 @@
|
|
|
1
1
|
import _ from "lodash";
|
|
2
2
|
|
|
3
|
-
const clean = <T>(meta: T): T => {
|
|
4
|
-
const newMeta = _.cloneDeepWith(meta, (value) => {
|
|
5
|
-
if (typeof value === "string") {
|
|
6
|
-
try {
|
|
7
|
-
return JSON.parse(value as string);
|
|
8
|
-
}
|
|
9
|
-
catch {
|
|
10
|
-
return value
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
return newMeta;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
3
|
export class DashboardShallowWidgetInfos {
|
|
18
4
|
hiddenCode: string;
|
|
19
5
|
meta: { [key: string]: string };
|
|
20
6
|
|
|
21
7
|
constructor(params: DashboardShallowWidgetInfosDTO) {
|
|
22
8
|
this.hiddenCode = params.hiddenCode;
|
|
23
|
-
this.meta =
|
|
9
|
+
this.meta = _.cloneDeep(params.meta);
|
|
24
10
|
}
|
|
25
11
|
}
|
|
26
|
-
|
|
12
|
+
|
|
27
13
|
export interface DashboardShallowWidgetInfosDTO {
|
|
28
14
|
hiddenCode: string;
|
|
29
15
|
meta: { [key: string]: string };
|
|
@@ -2,64 +2,51 @@ import _ from "lodash";
|
|
|
2
2
|
import type { WidgetCategory } from "@dative-gpi/foundation-shared-domain/enums";
|
|
3
3
|
import type { WidgetTemplateType } from '@dative-gpi/foundation-shared-domain/enums/widgetTemplates';
|
|
4
4
|
|
|
5
|
-
const clean = <T>(meta: T): T => {
|
|
6
|
-
const newMeta = _.cloneDeepWith(meta, (value) => {
|
|
7
|
-
if (typeof value === "string") {
|
|
8
|
-
try {
|
|
9
|
-
return JSON.parse(value as string);
|
|
10
|
-
} catch {
|
|
11
|
-
return value
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
return newMeta;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
5
|
export class WidgetTemplateInfos {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
6
|
+
id: string;
|
|
7
|
+
type: WidgetTemplateType;
|
|
8
|
+
extensionId: string | null;
|
|
9
|
+
extensionHost: string | null;
|
|
10
|
+
label: string;
|
|
11
|
+
code: string;
|
|
12
|
+
icon: string;
|
|
13
|
+
description: string;
|
|
14
|
+
category: WidgetCategory;
|
|
15
|
+
defaultWidth: number;
|
|
16
|
+
defaultHeight: number;
|
|
17
|
+
defaultMeta: { [key: string]: string }
|
|
18
|
+
|
|
19
|
+
constructor(params: WidgetTemplateInfosDTO) {
|
|
20
|
+
this.id = params.id;
|
|
21
|
+
this.type = params.type;
|
|
22
|
+
this.extensionId = params.extensionId ?? null;
|
|
23
|
+
this.extensionHost = params.extensionHost ?? null;
|
|
24
|
+
this.label = params.label;
|
|
25
|
+
this.code = params.code;
|
|
26
|
+
this.icon = params.icon;
|
|
27
|
+
this.description = params.description;
|
|
28
|
+
this.category = params.category;
|
|
29
|
+
this.defaultWidth = params.defaultWidth;
|
|
30
|
+
this.defaultHeight = params.defaultHeight;
|
|
31
|
+
this.defaultMeta = _.cloneDeep(params.defaultMeta);
|
|
32
|
+
}
|
|
46
33
|
}
|
|
47
|
-
|
|
34
|
+
|
|
48
35
|
export interface WidgetTemplateInfosDTO {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
36
|
+
id: string;
|
|
37
|
+
type: WidgetTemplateType;
|
|
38
|
+
extensionId?: string;
|
|
39
|
+
extensionHost?: string;
|
|
40
|
+
label: string;
|
|
41
|
+
code: string;
|
|
42
|
+
icon: string;
|
|
43
|
+
description: string;
|
|
44
|
+
category: WidgetCategory;
|
|
45
|
+
defaultWidth: number;
|
|
46
|
+
defaultHeight: number;
|
|
47
|
+
defaultMeta: { [key: string]: string }
|
|
61
48
|
}
|
|
62
|
-
|
|
49
|
+
|
|
63
50
|
export interface WidgetTemplateFilters {
|
|
64
|
-
|
|
51
|
+
search?: string | null;
|
|
65
52
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-core-domain",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "1.0.185-remove-
|
|
4
|
+
"version": "1.0.185-remove-clean2",
|
|
5
5
|
"description": "",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"author": "",
|
|
11
11
|
"license": "ISC",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@dative-gpi/foundation-shared-domain": "1.0.185-remove-
|
|
14
|
-
"@dative-gpi/foundation-shared-services": "1.0.185-remove-
|
|
13
|
+
"@dative-gpi/foundation-shared-domain": "1.0.185-remove-clean2",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "1.0.185-remove-clean2"
|
|
15
15
|
},
|
|
16
|
-
"gitHead": "
|
|
16
|
+
"gitHead": "b99a652360a93cf2461ccc812030063e158bbb6f"
|
|
17
17
|
}
|