@nokecy/qc-ui 0.1.8 → 0.1.9
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.
|
@@ -9,6 +9,12 @@ var _dayjs = _interopRequireDefault(require("dayjs"));
|
|
|
9
9
|
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
|
|
12
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
13
|
+
|
|
14
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
15
|
+
|
|
16
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
|
+
|
|
12
18
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
13
19
|
|
|
14
20
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -105,11 +111,9 @@ exports.dateTimeValueFormatter = dateTimeValueFormatter;
|
|
|
105
111
|
|
|
106
112
|
var flatten = function flatten(arr, parentref) {
|
|
107
113
|
return arr ? arr.reduce(function (result, item) {
|
|
108
|
-
return [].concat(_toConsumableArray(result), [{
|
|
109
|
-
name: item.name,
|
|
110
|
-
id: item.id,
|
|
114
|
+
return [].concat(_toConsumableArray(result), [_objectSpread(_objectSpread({}, item), {}, {
|
|
111
115
|
hierarchy: parentref ? [].concat(_toConsumableArray(parentref), [item.name]) : [item.name]
|
|
112
|
-
}], _toConsumableArray(flatten(item.children, parentref ? [].concat(_toConsumableArray(parentref), [item.name]) : [item.name])));
|
|
116
|
+
})], _toConsumableArray(flatten(item.children, parentref ? [].concat(_toConsumableArray(parentref), [item.name]) : [item.name])));
|
|
113
117
|
}, []) : [];
|
|
114
118
|
};
|
|
115
119
|
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2
|
+
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
|
|
5
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
|
|
1
7
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
8
|
|
|
3
9
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -88,11 +94,9 @@ var dateTimeValueFormatter = function dateTimeValueFormatter(params) {
|
|
|
88
94
|
|
|
89
95
|
var flatten = function flatten(arr, parentref) {
|
|
90
96
|
return arr ? arr.reduce(function (result, item) {
|
|
91
|
-
return [].concat(_toConsumableArray(result), [{
|
|
92
|
-
name: item.name,
|
|
93
|
-
id: item.id,
|
|
97
|
+
return [].concat(_toConsumableArray(result), [_objectSpread(_objectSpread({}, item), {}, {
|
|
94
98
|
hierarchy: parentref ? [].concat(_toConsumableArray(parentref), [item.name]) : [item.name]
|
|
95
|
-
}], _toConsumableArray(flatten(item.children, parentref ? [].concat(_toConsumableArray(parentref), [item.name]) : [item.name])));
|
|
99
|
+
})], _toConsumableArray(flatten(item.children, parentref ? [].concat(_toConsumableArray(parentref), [item.name]) : [item.name])));
|
|
96
100
|
}, []) : [];
|
|
97
101
|
};
|
|
98
102
|
|