d2aura 23.0.38 → 23.0.40

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,3 +1,5 @@
1
+ type Customizer = (key: string, value: any, other: any) => boolean | undefined;
1
2
  export default class EntityComparisonUtils {
2
- static compare(a?: any, b?: any): string[];
3
+ static compare(obj1?: Record<string, any>, obj2?: Record<string, any>, customizer?: Customizer): string[];
3
4
  }
5
+ export {};
@@ -1,8 +1,13 @@
1
- import { isEqual, union } from "lodash";
1
+ import { union, isEqualWith } from "lodash";
2
2
  export default class EntityComparisonUtils {
3
- static compare(a, b) {
4
- const keys = union(Object.keys(a), Object.keys(b));
5
- return keys.filter(key => !isEqual(a[key], b[key]));
3
+ static compare(obj1, obj2, customizer) {
4
+ if (!obj1)
5
+ obj1 = {};
6
+ if (!obj2)
7
+ obj2 = {};
8
+ const keys = union(Object.keys(obj1), Object.keys(obj2));
9
+ return keys
10
+ .filter(key => !isEqualWith(obj1[key], obj2[key], (value, other) => customizer?.(key, value, other)));
6
11
  }
7
12
  }
8
13
  //# sourceMappingURL=entityComparisonUtils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"entityComparisonUtils.js","sourceRoot":"","sources":["../../../../api/comparison/entityComparisonUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,KAAK,EAAC,MAAM,QAAQ,CAAC;AAEtC,MAAM,CAAC,OAAO,OAAO,qBAAqB;IAEtC,MAAM,CAAC,OAAO,CAAC,CAAO,EAAE,CAAO;QAC3B,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QACnD,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACxD,CAAC;CAEJ","sourcesContent":["import {isEqual, union} from \"lodash\";\r\n\r\nexport default class EntityComparisonUtils {\r\n\r\n static compare(a?: any, b?: any): string[] {\r\n const keys = union(Object.keys(a), Object.keys(b));\r\n return keys.filter(key => !isEqual(a[key], b[key]));\r\n }\r\n\r\n}"]}
1
+ {"version":3,"file":"entityComparisonUtils.js","sourceRoot":"","sources":["../../../../api/comparison/entityComparisonUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAE,WAAW,EAAC,MAAM,QAAQ,CAAC;AAI1C,MAAM,CAAC,OAAO,OAAO,qBAAqB;IAEtC,MAAM,CAAC,OAAO,CAAC,IAA0B,EAAE,IAA0B,EAAE,UAAuB;QAC1F,IAAI,CAAC,IAAI;YAAE,IAAI,GAAG,EAAE,CAAC;QACrB,IAAI,CAAC,IAAI;YAAE,IAAI,GAAG,EAAE,CAAC;QAErB,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QACzD,OAAO,IAAI;aACN,MAAM,CAAC,GAAG,CAAC,EAAE,CACV,CAAC,WAAW,CACR,IAAI,CAAC,GAAG,CAAC,EACT,IAAI,CAAC,GAAG,CAAC,EACT,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,UAAU,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,CACpD,CACJ,CAAC;IACV,CAAC;CAEJ","sourcesContent":["import {union, isEqualWith} from \"lodash\";\r\n\r\ntype Customizer = (key: string, value: any, other: any) => boolean | undefined;\r\n\r\nexport default class EntityComparisonUtils {\r\n\r\n static compare(obj1?: Record<string, any>, obj2?: Record<string, any>, customizer?: Customizer): string[] {\r\n if (!obj1) obj1 = {};\r\n if (!obj2) obj2 = {};\r\n\r\n const keys = union(Object.keys(obj1), Object.keys(obj2));\r\n return keys\r\n .filter(key =>\r\n !isEqualWith(\r\n obj1[key],\r\n obj2[key],\r\n (value, other) => customizer?.(key, value, other)\r\n )\r\n );\r\n }\r\n\r\n}"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "d2aura",
3
- "version": "23.0.38",
3
+ "version": "23.0.40",
4
4
  "description": "D2 AURA - Advanced User Interface Resource Architecture",
5
5
  "author": "Ipesoft s.r.o.",
6
6
  "license": "MIT",