12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- '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(GridEdgeIterator, _EdgeIterator);
- function GridEdgeIterator() {
- _classCallCheck(this, GridEdgeIterator);
- var _this = _possibleConstructorReturn(this, _EdgeIterator.apply(this, arguments));
- _this.EdgeIterator = GridEdgeIterator;
- return _this;
- }
- GridEdgeIterator.prototype.createLeafNodeInfo = function createLeafNodeInfo(descendant_or_self, value, edge, maxLevel) {
- var nodeInfo = {
- descendant_or_self: descendant_or_self,
- index: this.currentKeyIndex,
- value: value,
- type: edge.type,
- isSummary: edge.isSummary,
- isOverallSummary: edge.isOverallSummary,
- isLeafNode: true,
- isMeasure: edge.isMeasure,
- summaryOf: edge.summaryOf,
- formatSpec: edge.formatSpec
- };
- if (!edge.isSummary) {
- nodeInfo.cellIdx = edge.cellIdx;
- }
- this.rollupSummariesOfDescendents(nodeInfo, value, maxLevel);
- return nodeInfo;
- };
- GridEdgeIterator.prototype.createNodeInfo = function createNodeInfo(descendant_or_self, value, edge, childNode, maxLevel) {
- var nodeInfo = {
- descendant_or_self: descendant_or_self,
- index: this.numberOfLeafNodes - 1,
- value: value,
- type: edge.type,
- isSummary: edge.isSummary || childNode.isSummary,
- isOverallSummary: edge.isOverallSummary || childNode.isOverallSummary,
- noOfChildren: this.subIterator.keys.length,
- hasLeafNode: childNode.isLeafNode || childNode.hasLeafNode,
- ancestor_or_self: this.ancestor_or_self,
- isMeasure: edge.isMeasure,
- summaryOf: edge.summaryOf || childNode.summaryOf,
- subCategory: childNode,
- formatSpec: edge.formatSpec
- };
- this.rollupSummariesOfDescendents(nodeInfo, value, maxLevel, childNode);
- nodeInfo.descendant_or_self = nodeInfo.descendant_or_self.concat(childNode.descendant_or_self);
- if (!edge.isSummary) {
- nodeInfo.cellIdx = edge.cellIdx;
- }
- return nodeInfo;
- };
- return GridEdgeIterator;
- }(EdgeIterator);
- });
- //# sourceMappingURL=GridEdgeIterator.js.map
|