@reltio/components 1.4.1404 → 1.4.1405
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.
- package/cjs/components/BasicTableView/BasicTable/helpers/nestedHelpers.d.ts +1 -0
- package/cjs/components/BasicTableView/BasicTable/helpers/nestedHelpers.js +3 -2
- package/esm/components/BasicTableView/BasicTable/helpers/nestedHelpers.d.ts +1 -0
- package/esm/components/BasicTableView/BasicTable/helpers/nestedHelpers.js +3 -3
- package/package.json +3 -3
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export const calcRowSpansForNestedKeys: any;
|
|
2
|
+
export function validateRowSpanData(rowSpanData: any): any;
|
|
2
3
|
export const TOTAL_ROW_SPAN_KEY: "total";
|
|
3
4
|
export function flattenNestedColumnValues(values: any, indexPath?: any[]): any;
|
|
4
5
|
export const getSiblingSubRowsKeyBySubRowKey: any;
|
|
@@ -20,7 +20,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
20
20
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
exports.getNestedKeyForNestedColumnCell = exports.getParentRowKeyBySiblingsSubRowsKey = exports.getSiblingSubRowsKeyBySubRowKey = exports.flattenNestedColumnValues = exports.TOTAL_ROW_SPAN_KEY = exports.calcRowSpansForNestedKeys = void 0;
|
|
23
|
+
exports.getNestedKeyForNestedColumnCell = exports.getParentRowKeyBySiblingsSubRowsKey = exports.getSiblingSubRowsKeyBySubRowKey = exports.flattenNestedColumnValues = exports.TOTAL_ROW_SPAN_KEY = exports.validateRowSpanData = exports.calcRowSpansForNestedKeys = void 0;
|
|
24
24
|
var ramda_1 = require("ramda");
|
|
25
25
|
var TOTAL_ROW_SPAN_KEY = 'total';
|
|
26
26
|
exports.TOTAL_ROW_SPAN_KEY = TOTAL_ROW_SPAN_KEY;
|
|
@@ -65,8 +65,9 @@ var validateParentRowSpan = function (rowSpanData, _a) {
|
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
var validateRowSpanData = function (rowSpanData) {
|
|
68
|
-
return (0, ramda_1.pipe)((0, ramda_1.omit)([TOTAL_ROW_SPAN_KEY]), ramda_1.keys, (0, ramda_1.groupBy)(getSiblingSubRowsKeyBySubRowKey), ramda_1.toPairs, (0, ramda_1.reduce)(validateParentRowSpan, rowSpanData))(rowSpanData);
|
|
68
|
+
return (0, ramda_1.pipe)((0, ramda_1.omit)([TOTAL_ROW_SPAN_KEY]), ramda_1.keys, (0, ramda_1.sortBy)(ramda_1.identity), (0, ramda_1.groupBy)(getSiblingSubRowsKeyBySubRowKey), ramda_1.toPairs, (0, ramda_1.reduce)(validateParentRowSpan, rowSpanData))(rowSpanData);
|
|
69
69
|
};
|
|
70
|
+
exports.validateRowSpanData = validateRowSpanData;
|
|
70
71
|
var calcRowSpansForNestedKeys = (0, ramda_1.pipe)((0, ramda_1.reduce)(addNestedKey, {}), validateRowSpanData);
|
|
71
72
|
exports.calcRowSpansForNestedKeys = calcRowSpansForNestedKeys;
|
|
72
73
|
var chainWithIndex = (0, ramda_1.addIndex)(ramda_1.chain);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export const calcRowSpansForNestedKeys: any;
|
|
2
|
+
export function validateRowSpanData(rowSpanData: any): any;
|
|
2
3
|
export const TOTAL_ROW_SPAN_KEY: "total";
|
|
3
4
|
export function flattenNestedColumnValues(values: any, indexPath?: any[]): any;
|
|
4
5
|
export const getSiblingSubRowsKeyBySubRowKey: any;
|
|
@@ -18,7 +18,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
18
18
|
}
|
|
19
19
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
20
20
|
};
|
|
21
|
-
import { __, addIndex, always, assoc, chain, curry, dropLast, groupBy, join, keys, length, omit, pickBy, pipe, propOr, reduce, split, sum, toPairs, unless, unnest, values, zip } from 'ramda';
|
|
21
|
+
import { __, addIndex, always, assoc, chain, curry, dropLast, groupBy, join, keys, length, omit, pickBy, pipe, propOr, reduce, split, sortBy, identity, sum, toPairs, unless, unnest, values, zip } from 'ramda';
|
|
22
22
|
var TOTAL_ROW_SPAN_KEY = 'total';
|
|
23
23
|
var NESTED_KEY_DELIMITER = '.';
|
|
24
24
|
var getSiblingSubRowsKeyBySubRowKey = pipe(split(NESTED_KEY_DELIMITER), dropLast(1), join(NESTED_KEY_DELIMITER));
|
|
@@ -59,7 +59,7 @@ var validateParentRowSpan = function (rowSpanData, _a) {
|
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
61
|
var validateRowSpanData = function (rowSpanData) {
|
|
62
|
-
return pipe(omit([TOTAL_ROW_SPAN_KEY]), keys, groupBy(getSiblingSubRowsKeyBySubRowKey), toPairs, reduce(validateParentRowSpan, rowSpanData))(rowSpanData);
|
|
62
|
+
return pipe(omit([TOTAL_ROW_SPAN_KEY]), keys, sortBy(identity), groupBy(getSiblingSubRowsKeyBySubRowKey), toPairs, reduce(validateParentRowSpan, rowSpanData))(rowSpanData);
|
|
63
63
|
};
|
|
64
64
|
var calcRowSpansForNestedKeys = pipe(reduce(addNestedKey, {}), validateRowSpanData);
|
|
65
65
|
var chainWithIndex = addIndex(chain);
|
|
@@ -73,4 +73,4 @@ var flattenNestedColumnValues = function (values, indexPath) {
|
|
|
73
73
|
var getNestedKeyForNestedColumnCell = curry(function (columnNestedPath, cell) {
|
|
74
74
|
return pipe(zip(__, cell.indexPath), unnest, join(NESTED_KEY_DELIMITER))(columnNestedPath);
|
|
75
75
|
});
|
|
76
|
-
export { calcRowSpansForNestedKeys, TOTAL_ROW_SPAN_KEY, flattenNestedColumnValues, getSiblingSubRowsKeyBySubRowKey, getParentRowKeyBySiblingsSubRowsKey, getNestedKeyForNestedColumnCell };
|
|
76
|
+
export { calcRowSpansForNestedKeys, validateRowSpanData, TOTAL_ROW_SPAN_KEY, flattenNestedColumnValues, getSiblingSubRowsKeyBySubRowKey, getParentRowKeyBySiblingsSubRowsKey, getNestedKeyForNestedColumnCell };
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reltio/components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1405",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE FILE",
|
|
5
5
|
"main": "./cjs/index.js",
|
|
6
6
|
"module": "./esm/index.js",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@date-io/moment": "^1.3.5",
|
|
9
9
|
"@react-google-maps/api": "2.7.0",
|
|
10
|
-
"@reltio/mdm-module": "^1.4.
|
|
11
|
-
"@reltio/mdm-sdk": "^1.4.
|
|
10
|
+
"@reltio/mdm-module": "^1.4.1405",
|
|
11
|
+
"@reltio/mdm-sdk": "^1.4.1405",
|
|
12
12
|
"classnames": "^2.2.5",
|
|
13
13
|
"d3-cloud": "^1.2.5",
|
|
14
14
|
"d3-geo": "^2.0.1",
|