@nokecy/qc-ui 0.3.15 → 0.3.16
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.
|
@@ -125,8 +125,9 @@ exports.dateTimeValueFormatter = dateTimeValueFormatter;
|
|
|
125
125
|
var flatten = function flatten(arr, parentPropName, parentref) {
|
|
126
126
|
var data = arr ? arr.reduce(function (result, item) {
|
|
127
127
|
return [].concat(_toConsumableArray(result), [_objectSpread(_objectSpread({}, item), {}, {
|
|
128
|
-
|
|
129
|
-
|
|
128
|
+
children: undefined,
|
|
129
|
+
hierarchy: parentref ? [].concat(_toConsumableArray(parentref), [item[parentPropName]]) : []
|
|
130
|
+
})], _toConsumableArray(flatten(item.children, parentPropName, parentref ? [].concat(_toConsumableArray(parentref), [item[parentPropName]]) : [])));
|
|
130
131
|
}, []) : [];
|
|
131
132
|
return data;
|
|
132
133
|
};
|
|
@@ -108,8 +108,9 @@ var dateTimeValueFormatter = function dateTimeValueFormatter(params) {
|
|
|
108
108
|
var flatten = function flatten(arr, parentPropName, parentref) {
|
|
109
109
|
var data = arr ? arr.reduce(function (result, item) {
|
|
110
110
|
return [].concat(_toConsumableArray(result), [_objectSpread(_objectSpread({}, item), {}, {
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
children: undefined,
|
|
112
|
+
hierarchy: parentref ? [].concat(_toConsumableArray(parentref), [item[parentPropName]]) : []
|
|
113
|
+
})], _toConsumableArray(flatten(item.children, parentPropName, parentref ? [].concat(_toConsumableArray(parentref), [item[parentPropName]]) : [])));
|
|
113
114
|
}, []) : [];
|
|
114
115
|
return data;
|
|
115
116
|
};
|