@contrail/data-grouping 1.0.40 → 1.0.41

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.
@@ -81,18 +81,19 @@ class DataGroupGenerator {
81
81
  return distinctValues;
82
82
  }
83
83
  static buildChildDataGroups(data, parentGroup, groupingProperties, leafNodeDataCount, currentDepth, groupMultiSelectInSeparateFrame = false) {
84
- var _a, _b, _c, _d;
84
+ var _a, _b, _c, _d, _e;
85
85
  const groupingProperty = groupingProperties[currentDepth];
86
86
  const propertyTypeOptions = {
87
87
  isDate: ((_a = groupingProperty === null || groupingProperty === void 0 ? void 0 : groupingProperty.propertyDefinition) === null || _a === void 0 ? void 0 : _a.propertyType) === 'date',
88
- isNumber: !!((_b = groupingProperty === null || groupingProperty === void 0 ? void 0 : groupingProperty.propertyDefinition) === null || _b === void 0 ? void 0 : _b.numberFormat),
88
+ isNumber: !!((_b = groupingProperty === null || groupingProperty === void 0 ? void 0 : groupingProperty.propertyDefinition) === null || _b === void 0 ? void 0 : _b.numberFormat) ||
89
+ ((_c = groupingProperty === null || groupingProperty === void 0 ? void 0 : groupingProperty.propertyDefinition) === null || _c === void 0 ? void 0 : _c.propertyType) === 'sequence',
89
90
  };
90
91
  const rootIndex = groupingProperty.typeRootSlug;
91
92
  const slugIndex = groupingProperty.propertyDefinition.slug;
92
93
  const rootAltIndex = util_1.StringUtil.convertToCamelCase(groupingProperty.typeRootSlug);
93
94
  const slugAltIndex = groupingProperty.propertyDefinition.slug;
94
95
  const sort = groupingProperty.sort || types_1.TypePropertySortOrder.ASCENDING;
95
- const options = ((_d = (_c = groupingProperty.propertyDefinition) === null || _c === void 0 ? void 0 : _c.options) === null || _d === void 0 ? void 0 : _d.map((x) => x.value)) || null;
96
+ const options = ((_e = (_d = groupingProperty.propertyDefinition) === null || _d === void 0 ? void 0 : _d.options) === null || _e === void 0 ? void 0 : _e.map((x) => x.value)) || null;
96
97
  let distinctValues = this.getDistinctValues(data, rootIndex, slugIndex, rootAltIndex, slugAltIndex, groupMultiSelectInSeparateFrame, { sortOrder: sort, options }, propertyTypeOptions);
97
98
  for (let val of distinctValues) {
98
99
  const groupData = data.filter((obj) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/data-grouping",
3
- "version": "1.0.40",
3
+ "version": "1.0.41",
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",