12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- 'use strict';
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
- /**
- * Licensed Materials - Property of IBM
- * IBM Cognos Products: BI Cloud (C) Copyright IBM Corp. 2016, 2020
- * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- */
- define(['../../../util/EdgeIterator'], function (EdgeIterator) {
- 'use strict';
- return function (_EdgeIterator) {
- _inherits(CrosstabEdgeIterator, _EdgeIterator);
- function CrosstabEdgeIterator() {
- _classCallCheck(this, CrosstabEdgeIterator);
- var _this = _possibleConstructorReturn(this, _EdgeIterator.apply(this, arguments));
- _this.EdgeIterator = CrosstabEdgeIterator;
- return _this;
- }
- CrosstabEdgeIterator.prototype.createLeafNodeInfo = function createLeafNodeInfo(descendant_or_self, value, currentEdge, ancestors, maxLevel) {
- var nodeInfo = {
- descendant_or_self: descendant_or_self,
- descendant_or_self_without_measures: currentEdge.isMeasure ? [] : descendant_or_self,
- index: this.currentKeyIndex,
- value: value,
- type: currentEdge.type,
- isSummary: currentEdge.isSummary,
- isOverallSummary: currentEdge.isOverallSummary,
- isLeafNode: true,
- ancestor_or_self: !ancestors ? [value] : ancestors.concat(value),
- nestLevel: currentEdge.level,
- isMeasure: currentEdge.isMeasure,
- summaryOf: currentEdge.summaryOf,
- formatSpec: currentEdge.formatSpec
- };
- if (!currentEdge.isSummary) {
- nodeInfo.cellIdx = currentEdge.cellIdx;
- }
- this.rollupSummariesOfDescendents(nodeInfo, value, maxLevel);
- return nodeInfo;
- };
- CrosstabEdgeIterator.prototype.createNodeInfo = function createNodeInfo(descendant_or_self, value, currentEdge, childNode, maxLevel) {
- var nodeInfo = {
- descendant_or_self: descendant_or_self,
- descendant_or_self_without_measures: currentEdge.isMeasure ? childNode.descendant_or_self_without_measures : descendant_or_self.concat(childNode.descendant_or_self_without_measures),
- index: this.numberOfLeafNodes - 1,
- value: value,
- type: currentEdge.type,
- isSummary: currentEdge.isSummary || childNode.isSummary,
- isOverallSummary: currentEdge.isOverallSummary || childNode.isOverallSummary,
- hasMeasureChildren: currentEdge.hasMeasureChildren,
- noOfChildren: this.subIterator.keys.length,
- hasLeafNode: childNode.isLeafNode || childNode.hasLeafNode,
- ancestor_or_self: this.ancestor_or_self,
- nestLevel: currentEdge.level,
- isMeasure: currentEdge.isMeasure,
- summaryOf: currentEdge.summaryOf || childNode.summaryOf,
- subCategory: childNode,
- formatSpec: currentEdge.formatSpec
- };
- this.rollupSummariesOfDescendents(nodeInfo, value, maxLevel, childNode);
- nodeInfo.descendant_or_self = nodeInfo.descendant_or_self.concat(childNode.descendant_or_self);
- if (!currentEdge.isSummary) {
- nodeInfo.cellIdx = currentEdge.cellIdx;
- }
- return nodeInfo;
- };
- return CrosstabEdgeIterator;
- }(EdgeIterator);
- });
- //# sourceMappingURL=CrosstabEdgeIterator.js.map
|