@dative-gpi/foundation-core-domain 1.0.184 → 1.0.185-remove-clean

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,57 +1,44 @@
1
1
  import type { WidgetTemplateType } from '@dative-gpi/foundation-shared-domain/enums/widgetTemplates';
2
2
  import _ from "lodash";
3
3
 
4
- const clean = <T>(meta: T): T => {
5
- const newMeta = _.cloneDeepWith(meta, (value) => {
6
- if (typeof value === "string") {
7
- try {
8
- return JSON.parse(value as string);
9
- } catch {
10
- return value
11
- }
12
- }
13
- });
14
- return newMeta;
15
- }
16
-
17
4
  export class WidgetInfos {
18
- id: string;
19
- hiddenCode: string;
20
- templateType: WidgetTemplateType;
21
- templateId: string;
22
- hideBorders: boolean;
23
- width: number;
24
- height: number;
25
- x: number;
26
- y: number;
27
- targetScreenSize: "s" | "m" | "l" | "xl";
28
- meta: { [key: string]: string };
5
+ id: string;
6
+ hiddenCode: string;
7
+ templateType: WidgetTemplateType;
8
+ templateId: string;
9
+ hideBorders: boolean;
10
+ width: number;
11
+ height: number;
12
+ x: number;
13
+ y: number;
14
+ targetScreenSize: "s" | "m" | "l" | "xl";
15
+ meta: { [key: string]: string };
29
16
 
30
- constructor(params: WidgetInfosDTO) {
31
- this.id = params.id;
32
- this.hiddenCode = params.hiddenCode;
33
- this.templateType = params.templateType;
34
- this.templateId = params.templateId;
35
- this.hideBorders = params.hideBorders;
36
- this.width = params.width;
37
- this.height = params.height;
38
- this.x = params.x;
39
- this.y = params.y;
40
- this.targetScreenSize = params.targetScreenSize;
41
- this.meta = clean(params.meta);
42
- }
17
+ constructor(params: WidgetInfosDTO) {
18
+ this.id = params.id;
19
+ this.hiddenCode = params.hiddenCode;
20
+ this.templateType = params.templateType;
21
+ this.templateId = params.templateId;
22
+ this.hideBorders = params.hideBorders;
23
+ this.width = params.width;
24
+ this.height = params.height;
25
+ this.x = params.x;
26
+ this.y = params.y;
27
+ this.targetScreenSize = params.targetScreenSize;
28
+ this.meta = _.cloneDeep(params.meta);
29
+ }
43
30
  }
44
-
31
+
45
32
  export interface WidgetInfosDTO {
46
- id: string;
47
- hiddenCode: string;
48
- templateType: WidgetTemplateType;
49
- templateId: string;
50
- hideBorders: boolean;
51
- width: number;
52
- height: number;
53
- x: number;
54
- y: number;
55
- targetScreenSize: "s" | "m" | "l" | "xl";
56
- meta: { [key: string]: string };
33
+ id: string;
34
+ hiddenCode: string;
35
+ templateType: WidgetTemplateType;
36
+ templateId: string;
37
+ hideBorders: boolean;
38
+ width: number;
39
+ height: number;
40
+ x: number;
41
+ y: number;
42
+ targetScreenSize: "s" | "m" | "l" | "xl";
43
+ meta: { [key: string]: string };
57
44
  }
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.184",
4
+ "version": "1.0.185-remove-clean",
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.184",
14
- "@dative-gpi/foundation-shared-services": "1.0.184"
13
+ "@dative-gpi/foundation-shared-domain": "1.0.185-remove-clean",
14
+ "@dative-gpi/foundation-shared-services": "1.0.185-remove-clean"
15
15
  },
16
- "gitHead": "e433eba0bd97d095ea708e634e8128606d8d02ef"
16
+ "gitHead": "c6c29c206638f309fb77a0cd5d54b77b22c82da4"
17
17
  }