@contrail/data-grouping 1.0.18 → 1.0.19
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.
@@ -29,7 +29,7 @@ class DataGroupGenerator {
|
|
29
29
|
}
|
30
30
|
static buildChildDataGroups(data, parentGroup, groupingProperties, leafNodeDataCount, currentDepth) {
|
31
31
|
const groupingProperty = groupingProperties[currentDepth];
|
32
|
-
const index = groupingProperty.
|
32
|
+
const index = groupingProperty.typeRootSlug + "." + groupingProperty.propertyDefinition.slug;
|
33
33
|
const distinctValues = this.getDistinctValues(data, index);
|
34
34
|
for (let val of distinctValues) {
|
35
35
|
const groupData = data.filter(obj => util_1.ObjectUtil.getByPath(obj, index) === val);
|
@@ -43,8 +43,8 @@ class DataGroupGenerator {
|
|
43
43
|
const details = groupData[0];
|
44
44
|
group.propertyValues = Object.assign({}, details);
|
45
45
|
}
|
46
|
-
group.propertyValues[groupingProperty.
|
47
|
-
const label = new types_1.PropertyValueFormatter().formatValueForProperty(val, groupingProperty.
|
46
|
+
group.propertyValues[groupingProperty.propertyDefinition.slug] = val;
|
47
|
+
const label = new types_1.PropertyValueFormatter().formatValueForProperty(val, groupingProperty.propertyDefinition);
|
48
48
|
group.name = label;
|
49
49
|
if (currentDepth === groupingProperties.length - 1) {
|
50
50
|
group.subGroups = this.createPartitionedGroupsFromData(group, groupData, leafNodeDataCount);
|
package/lib/interfaces.d.ts
CHANGED
package/package.json
CHANGED