@contrail/data-grouping 1.0.9 → 1.0.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  import { DataGroup, DataGroupStructure, DataGroupingProperty } from "../interfaces";
2
2
  export declare class DataGroupGenerator {
3
- static buildChildDataGroups(data: any, parentGroup: DataGroup, groupingProperties: any, leafNodeDataCount: any, currentDepth: any): void;
3
+ static buildChildDataGroups(data: any, parentGroup: DataGroup, groupingProperties: Array<DataGroupingProperty>, leafNodeDataCount: any, currentDepth: any): void;
4
4
  static buildDataGroupStructure(data: Array<any>, groupingProperties: Array<DataGroupingProperty>, leafNodeDataCount: number, currentDepth?: number): DataGroupStructure;
5
5
  static createPartitionedGroupsFromData(parentGroup: DataGroup, data: Array<any>, leafNodeDataCount: number): Array<DataGroup>;
6
6
  }
@@ -21,7 +21,7 @@ class DataGroupGenerator {
21
21
  name: ''
22
22
  };
23
23
  group.properties[groupingProperty.property.slug] = val;
24
- const label = new types_1.PropertyValueFormatter().formatValueForProperty(val, groupingProperty);
24
+ const label = new types_1.PropertyValueFormatter().formatValueForProperty(val, groupingProperty.property);
25
25
  group.name = label;
26
26
  if (currentDepth === groupingProperties.length - 1) {
27
27
  group.subGroups = this.createPartitionedGroupsFromData(group, groupData, leafNodeDataCount);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/data-grouping",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "Utilities and interfaces for grouping data into hierarchial data structures based on properties.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",