@visactor/vtable 1.22.11-alpha.8 → 1.22.11

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.
Files changed (133) hide show
  1. package/cjs/PivotChart.d.ts +0 -3
  2. package/cjs/PivotChart.js +5 -12
  3. package/cjs/PivotChart.js.map +1 -1
  4. package/cjs/PivotTable-all.js.map +1 -1
  5. package/cjs/core/BaseTable.d.ts +3 -0
  6. package/cjs/core/BaseTable.js +22 -6
  7. package/cjs/core/BaseTable.js.map +1 -1
  8. package/cjs/dataset/dataset.js +92 -84
  9. package/cjs/dataset/dataset.js.map +1 -1
  10. package/cjs/edit/edit-manager.js +10 -9
  11. package/cjs/edit/edit-manager.js.map +1 -1
  12. package/cjs/event/listener/container-dom.js +1 -1
  13. package/cjs/event/listener/container-dom.js.map +1 -1
  14. package/cjs/event/listener/scroll-bar.js +2 -8
  15. package/cjs/event/listener/scroll-bar.js.map +1 -1
  16. package/cjs/event/listener/table-group.js +8 -14
  17. package/cjs/event/listener/table-group.js.map +1 -1
  18. package/cjs/event/media-click.js +1 -1
  19. package/cjs/event/scroll.js +1 -1
  20. package/cjs/event/sparkline-event.js +1 -1
  21. package/cjs/event/util.js +1 -1
  22. package/cjs/index.d.ts +1 -1
  23. package/cjs/index.js +1 -1
  24. package/cjs/index.js.map +1 -1
  25. package/cjs/layout/index.js +1 -2
  26. package/cjs/layout/pivot-header-layout.d.ts +0 -6
  27. package/cjs/layout/pivot-header-layout.js +21 -40
  28. package/cjs/layout/pivot-header-layout.js.map +1 -1
  29. package/cjs/plugins/custom-cell-style.d.ts +5 -0
  30. package/cjs/plugins/custom-cell-style.js +66 -18
  31. package/cjs/plugins/custom-cell-style.js.map +1 -1
  32. package/cjs/plugins/interface.js +1 -1
  33. package/cjs/plugins/invert-highlight.js +2 -1
  34. package/cjs/plugins/list-tree-stick-cell.js +1 -1
  35. package/cjs/plugins/plugin-manager.js +1 -1
  36. package/cjs/scenegraph/graphic/active-cell-chart-list.d.ts +2 -15
  37. package/cjs/scenegraph/graphic/active-cell-chart-list.js +75 -198
  38. package/cjs/scenegraph/graphic/active-cell-chart-list.js.map +1 -1
  39. package/cjs/scenegraph/graphic/chart.d.ts +1 -10
  40. package/cjs/scenegraph/graphic/chart.js +27 -61
  41. package/cjs/scenegraph/graphic/chart.js.map +1 -1
  42. package/cjs/scenegraph/graphic/contributions/chart-render.js +4 -3
  43. package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -1
  44. package/cjs/scenegraph/group-creater/cell-type/progress-bar-cell.js.map +1 -1
  45. package/cjs/scenegraph/layout/update-row.js +16 -1
  46. package/cjs/scenegraph/layout/update-row.js.map +1 -1
  47. package/cjs/scenegraph/refresh-node/update-chart.d.ts +1 -1
  48. package/cjs/scenegraph/refresh-node/update-chart.js +1 -2
  49. package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
  50. package/cjs/scenegraph/scenegraph.d.ts +2 -2
  51. package/cjs/scenegraph/scenegraph.js +11 -44
  52. package/cjs/scenegraph/scenegraph.js.map +1 -1
  53. package/cjs/scenegraph/select/update-select-border.js.map +1 -1
  54. package/cjs/state/select/update-position.js +3 -3
  55. package/cjs/state/select/update-position.js.map +1 -1
  56. package/cjs/tools/util.d.ts +0 -5
  57. package/cjs/tools/util.js +4 -22
  58. package/cjs/tools/util.js.map +1 -1
  59. package/cjs/ts-types/base-table.d.ts +3 -0
  60. package/cjs/ts-types/base-table.js.map +1 -1
  61. package/cjs/ts-types/new-data-set.d.ts +1 -0
  62. package/cjs/ts-types/new-data-set.js.map +1 -1
  63. package/cjs/ts-types/table-engine.d.ts +0 -7
  64. package/cjs/ts-types/table-engine.js.map +1 -1
  65. package/cjs/vrender.js.map +1 -1
  66. package/dist/vtable.js +380 -596
  67. package/dist/vtable.min.js +2 -2
  68. package/es/PivotChart.d.ts +0 -3
  69. package/es/PivotChart.js +4 -13
  70. package/es/PivotChart.js.map +1 -1
  71. package/es/PivotTable-all.js.map +1 -1
  72. package/es/core/BaseTable.d.ts +3 -0
  73. package/es/core/BaseTable.js +22 -6
  74. package/es/core/BaseTable.js.map +1 -1
  75. package/es/dataset/dataset.js +92 -84
  76. package/es/dataset/dataset.js.map +1 -1
  77. package/es/edit/edit-manager.js +10 -9
  78. package/es/edit/edit-manager.js.map +1 -1
  79. package/es/event/listener/container-dom.js +1 -1
  80. package/es/event/listener/container-dom.js.map +1 -1
  81. package/es/event/listener/scroll-bar.js +2 -8
  82. package/es/event/listener/scroll-bar.js.map +1 -1
  83. package/es/event/listener/table-group.js +8 -13
  84. package/es/event/listener/table-group.js.map +1 -1
  85. package/es/event/media-click.js +1 -1
  86. package/es/event/scroll.js +1 -1
  87. package/es/event/sparkline-event.js +1 -1
  88. package/es/event/util.js +1 -1
  89. package/es/index.d.ts +1 -1
  90. package/es/index.js +1 -1
  91. package/es/index.js.map +1 -1
  92. package/es/layout/index.js +1 -2
  93. package/es/layout/pivot-header-layout.d.ts +0 -6
  94. package/es/layout/pivot-header-layout.js +21 -40
  95. package/es/layout/pivot-header-layout.js.map +1 -1
  96. package/es/plugins/custom-cell-style.d.ts +5 -0
  97. package/es/plugins/custom-cell-style.js +64 -18
  98. package/es/plugins/custom-cell-style.js.map +1 -1
  99. package/es/plugins/interface.js +1 -1
  100. package/es/plugins/invert-highlight.js +2 -1
  101. package/es/plugins/list-tree-stick-cell.js +1 -1
  102. package/es/plugins/plugin-manager.js +1 -1
  103. package/es/scenegraph/graphic/active-cell-chart-list.d.ts +2 -15
  104. package/es/scenegraph/graphic/active-cell-chart-list.js +68 -186
  105. package/es/scenegraph/graphic/active-cell-chart-list.js.map +1 -1
  106. package/es/scenegraph/graphic/chart.d.ts +1 -10
  107. package/es/scenegraph/graphic/chart.js +25 -58
  108. package/es/scenegraph/graphic/chart.js.map +1 -1
  109. package/es/scenegraph/graphic/contributions/chart-render.js +4 -3
  110. package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -1
  111. package/es/scenegraph/group-creater/cell-type/progress-bar-cell.js.map +1 -1
  112. package/es/scenegraph/layout/update-row.js +16 -1
  113. package/es/scenegraph/layout/update-row.js.map +1 -1
  114. package/es/scenegraph/refresh-node/update-chart.d.ts +1 -1
  115. package/es/scenegraph/refresh-node/update-chart.js +1 -2
  116. package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
  117. package/es/scenegraph/scenegraph.d.ts +2 -2
  118. package/es/scenegraph/scenegraph.js +10 -43
  119. package/es/scenegraph/scenegraph.js.map +1 -1
  120. package/es/scenegraph/select/update-select-border.js.map +1 -1
  121. package/es/state/select/update-position.js +4 -2
  122. package/es/state/select/update-position.js.map +1 -1
  123. package/es/tools/util.d.ts +0 -5
  124. package/es/tools/util.js +0 -18
  125. package/es/tools/util.js.map +1 -1
  126. package/es/ts-types/base-table.d.ts +3 -0
  127. package/es/ts-types/base-table.js.map +1 -1
  128. package/es/ts-types/new-data-set.d.ts +1 -0
  129. package/es/ts-types/new-data-set.js.map +1 -1
  130. package/es/ts-types/table-engine.d.ts +0 -7
  131. package/es/ts-types/table-engine.js.map +1 -1
  132. package/es/vrender.js.map +1 -1
  133. package/package.json +5 -5
@@ -357,7 +357,7 @@ export class Dataset {
357
357
  return null === (_a = this.aggregationRules) || void 0 === _a ? void 0 : _a.find(((value, index) => indicatorKey === value.indicatorKey));
358
358
  }
359
359
  getAggregator(rowKey = [], colKey = [], indicator, considerChangedValue = !0, indicatorPosition) {
360
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
360
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
361
361
  const indicatorIndex = this.indicatorKeys.indexOf(indicator);
362
362
  let rowDimensionKey, colDimensionKey, flatRowKey, flatColKey;
363
363
  if ("row" === (null == indicatorPosition ? void 0 : indicatorPosition.position)) rowDimensionKey = rowKey.length >= 2 ? this.rows[rowKey.length - 2] : void 0; else {
@@ -370,13 +370,13 @@ export class Dataset {
370
370
  }
371
371
  "string" == typeof rowKey ? flatRowKey = rowKey : (indicatorPosition && "row" !== indicatorPosition.position || rowKey.map(((key, i) => {
372
372
  key !== indicator || isValid(null == indicatorPosition ? void 0 : indicatorPosition.index) && i !== indicatorPosition.index || rowKey.splice(i, 1);
373
- })), rowKey.length < this.rows.length && "grid-tree" === this.rowHierarchyType && (rowKey[0] === this.rowGrandTotalLabel || (null === (_b = null === (_a = this.totals) || void 0 === _a ? void 0 : _a.row) || void 0 === _b ? void 0 : _b.subTotalsDimensions) && (null === (_e = null === (_d = null === (_c = this.totals) || void 0 === _c ? void 0 : _c.row) || void 0 === _d ? void 0 : _d.subTotalsDimensions) || void 0 === _e ? void 0 : _e.length) >= 1 && rowKey[rowKey.length - 1] !== this.rowSubTotalLabel && this.totals.row.subTotalsDimensions.find((dimension => dimension === rowDimensionKey)) && rowKey.push(this.rowSubTotalLabel)),
373
+ })), rowKey.length < this.rows.length && "grid-tree" === this.rowHierarchyType && (rowKey[0] === this.rowGrandTotalLabel || ((null === (_b = null === (_a = this.totals) || void 0 === _a ? void 0 : _a.row) || void 0 === _b ? void 0 : _b.subTotalsDimensions) && (null === (_e = null === (_d = null === (_c = this.totals) || void 0 === _c ? void 0 : _c.row) || void 0 === _d ? void 0 : _d.subTotalsDimensions) || void 0 === _e ? void 0 : _e.length) >= 1 && this.totals.row.subTotalsDimensions.find((dimension => dimension === rowDimensionKey)) || (null === (_g = null === (_f = this.totals) || void 0 === _f ? void 0 : _f.row) || void 0 === _g ? void 0 : _g.showSubTotalsOnTreeNode)) && rowKey[rowKey.length - 1] !== this.rowSubTotalLabel && rowKey.push(this.rowSubTotalLabel)),
374
374
  flatRowKey = join(rowKey, this.stringJoinChar)), "string" == typeof colKey ? flatColKey = colKey : (indicatorPosition && "col" !== indicatorPosition.position || colKey.map(((key, i) => {
375
375
  key !== indicator || isValid(null == indicatorPosition ? void 0 : indicatorPosition.index) && i !== indicatorPosition.index || colKey.splice(i, 1);
376
- })), colKey.length < this.columns.length && "grid-tree" === this.columnHierarchyType && (colKey[0] === this.colGrandTotalLabel || (null === (_g = null === (_f = this.totals) || void 0 === _f ? void 0 : _f.column) || void 0 === _g ? void 0 : _g.subTotalsDimensions) && (null === (_k = null === (_j = null === (_h = this.totals) || void 0 === _h ? void 0 : _h.column) || void 0 === _j ? void 0 : _j.subTotalsDimensions) || void 0 === _k ? void 0 : _k.length) >= 1 && colKey[colKey.length - 1] !== this.colSubTotalLabel && this.totals.column.subTotalsDimensions.find((dimension => dimension === colDimensionKey)) && colKey.push(this.colSubTotalLabel)),
376
+ })), colKey.length < this.columns.length && "grid-tree" === this.columnHierarchyType && (colKey[0] === this.colGrandTotalLabel || ((null === (_j = null === (_h = this.totals) || void 0 === _h ? void 0 : _h.column) || void 0 === _j ? void 0 : _j.subTotalsDimensions) && (null === (_m = null === (_l = null === (_k = this.totals) || void 0 === _k ? void 0 : _k.column) || void 0 === _l ? void 0 : _l.subTotalsDimensions) || void 0 === _m ? void 0 : _m.length) >= 1 && this.totals.column.subTotalsDimensions.find((dimension => dimension === colDimensionKey)) || (null === (_p = null === (_o = this.totals) || void 0 === _o ? void 0 : _o.column) || void 0 === _p ? void 0 : _p.showSubTotalsOnTreeNode)) && colKey[colKey.length - 1] !== this.colSubTotalLabel && colKey.push(this.colSubTotalLabel)),
377
377
  flatColKey = join(colKey, this.stringJoinChar));
378
- const agg = null === (_m = null === (_l = this.tree[flatRowKey]) || void 0 === _l ? void 0 : _l[flatColKey]) || void 0 === _m ? void 0 : _m[indicatorIndex];
379
- if (considerChangedValue && isValid(null === (_p = null === (_o = this.changedTree[flatRowKey]) || void 0 === _o ? void 0 : _o[flatColKey]) || void 0 === _p ? void 0 : _p[indicatorIndex])) {
378
+ const agg = null === (_r = null === (_q = this.tree[flatRowKey]) || void 0 === _q ? void 0 : _q[flatColKey]) || void 0 === _r ? void 0 : _r[indicatorIndex];
379
+ if (considerChangedValue && isValid(null === (_t = null === (_s = this.changedTree[flatRowKey]) || void 0 === _s ? void 0 : _s[flatColKey]) || void 0 === _t ? void 0 : _t[indicatorIndex])) {
380
380
  const changeValue = this.changedTree[flatRowKey][flatColKey][indicatorIndex];
381
381
  return agg ? {
382
382
  value: () => changeValue,
@@ -465,140 +465,148 @@ export class Dataset {
465
465
  } : sortRule.sortBy ? sortBy(sortRule.sortBy) : sortRule.sortFunc ? sortRule.sortFunc : sortRule.sortType ? typeSort : naturalSort;
466
466
  }
467
467
  totalStatistics() {
468
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
468
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
469
469
  const that = this, colCompute = (flatRowKey, flatColKey) => {
470
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25;
470
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32;
471
471
  if (null === (_b = null === (_a = this.totalRecordsTree) || void 0 === _a ? void 0 : _a[flatRowKey]) || void 0 === _b ? void 0 : _b[flatColKey]) return this.tree[flatRowKey] || (this.tree[flatRowKey] = {}),
472
472
  void (this.tree[flatRowKey][flatColKey] = null === (_d = null === (_c = this.totalRecordsTree) || void 0 === _c ? void 0 : _c[flatRowKey]) || void 0 === _d ? void 0 : _d[flatColKey]);
473
473
  const colKey = flatColKey.split(this.stringJoinChar);
474
- if ((null === (_f = null === (_e = that.totals) || void 0 === _e ? void 0 : _e.column) || void 0 === _f ? void 0 : _f.subTotalsDimensions) && (null === (_j = null === (_h = null === (_g = that.totals) || void 0 === _g ? void 0 : _g.column) || void 0 === _h ? void 0 : _h.subTotalsDimensions) || void 0 === _j ? void 0 : _j.length) > 0 && !1 !== that.totals.column.showSubTotals) for (let i = 0, len = null === (_m = null === (_l = null === (_k = that.totals) || void 0 === _k ? void 0 : _k.column) || void 0 === _l ? void 0 : _l.subTotalsDimensions) || void 0 === _m ? void 0 : _m.length; i < len; i++) {
475
- const dimension = that.totals.column.subTotalsDimensions[i], dimensionIndex = that.columns.indexOf(dimension);
476
- if (dimensionIndex >= 0) {
477
- const colTotalKey = colKey.slice(0, dimensionIndex + 1);
478
- colTotalKey.push(that.colSubTotalLabel);
479
- const flatColTotalKey = colTotalKey.join(this.stringJoinChar);
480
- if (null === (_p = null === (_o = this.totalRecordsTree) || void 0 === _o ? void 0 : _o[flatRowKey]) || void 0 === _p ? void 0 : _p[flatColTotalKey]) return void (this.tree[flatRowKey][flatColTotalKey] = null === (_r = null === (_q = this.totalRecordsTree) || void 0 === _q ? void 0 : _q[flatRowKey]) || void 0 === _r ? void 0 : _r[flatColTotalKey]);
481
- this.tree[flatRowKey][flatColTotalKey] || (this.tree[flatRowKey][flatColTotalKey] = []);
482
- const toComputeIndicatorKeys = this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys;
483
- for (let i = 0; i < toComputeIndicatorKeys.length; i++) if (this.calculatedFiledKeys.indexOf(toComputeIndicatorKeys[i]) >= 0) {
484
- const calculatedFieldRule = null === (_s = this.calculatedFieldRules) || void 0 === _s ? void 0 : _s.find((rule => rule.key === toComputeIndicatorKeys[i]));
485
- (null === (_u = null === (_t = this.tree[flatRowKey]) || void 0 === _t ? void 0 : _t[flatColTotalKey]) || void 0 === _u ? void 0 : _u[i]) || (this.tree[flatRowKey][flatColTotalKey][i] = new registeredAggregators[AggregationType.RECALCULATE]({
486
- key: toComputeIndicatorKeys[i],
487
- field: toComputeIndicatorKeys[i],
488
- isRecord: !0,
489
- formatFun: null === (_w = null === (_v = this.indicators) || void 0 === _v ? void 0 : _v.find((indicator => "string" != typeof indicator && indicator.indicatorKey === toComputeIndicatorKeys[i]))) || void 0 === _w ? void 0 : _w.format,
490
- calculateFun: null == calculatedFieldRule ? void 0 : calculatedFieldRule.calculateFun,
491
- dependAggregators: this.tree[flatRowKey][flatColTotalKey],
492
- dependIndicatorKeys: null == calculatedFieldRule ? void 0 : calculatedFieldRule.dependIndicatorKeys
493
- })), flatColTotalKey !== flatColKey && this.tree[flatRowKey][flatColTotalKey][i].push(null === (_y = null === (_x = that.tree[flatRowKey]) || void 0 === _x ? void 0 : _x[flatColKey]) || void 0 === _y ? void 0 : _y[i]);
494
- } else {
495
- if (!this.tree[flatRowKey][flatColTotalKey][i]) {
496
- const aggRule = this.getAggregatorRule(toComputeIndicatorKeys[i]);
497
- this.tree[flatRowKey][flatColTotalKey][i] = new registeredAggregators[null !== (_z = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _z ? _z : AggregationType.SUM]({
474
+ if ((null === (_f = null === (_e = that.totals) || void 0 === _e ? void 0 : _e.column) || void 0 === _f ? void 0 : _f.subTotalsDimensions) && (null === (_j = null === (_h = null === (_g = that.totals) || void 0 === _g ? void 0 : _g.column) || void 0 === _h ? void 0 : _h.subTotalsDimensions) || void 0 === _j ? void 0 : _j.length) > 0 && (!1 !== (null === (_l = null === (_k = that.totals) || void 0 === _k ? void 0 : _k.column) || void 0 === _l ? void 0 : _l.showSubTotals) || (null === (_o = null === (_m = that.totals) || void 0 === _m ? void 0 : _m.column) || void 0 === _o ? void 0 : _o.showSubTotalsOnTreeNode)) || (null === (_q = null === (_p = that.totals) || void 0 === _p ? void 0 : _p.column) || void 0 === _q ? void 0 : _q.showSubTotalsOnTreeNode) && that.columns.length > 0) {
475
+ let colSubTotalDimensions = (null === (_s = null === (_r = that.totals) || void 0 === _r ? void 0 : _r.column) || void 0 === _s ? void 0 : _s.subTotalsDimensions) || [];
476
+ (null === (_u = null === (_t = that.totals) || void 0 === _t ? void 0 : _t.column) || void 0 === _u ? void 0 : _u.showSubTotalsOnTreeNode) && 0 === colSubTotalDimensions.length && (colSubTotalDimensions = that.columns.map((col => col)));
477
+ for (let i = 0, len = colSubTotalDimensions.length; i < len; i++) {
478
+ const dimension = colSubTotalDimensions[i], dimensionIndex = that.columns.indexOf(dimension);
479
+ if (dimensionIndex >= 0) {
480
+ const colTotalKey = colKey.slice(0, dimensionIndex + 1);
481
+ colTotalKey.push(that.colSubTotalLabel);
482
+ const flatColTotalKey = colTotalKey.join(this.stringJoinChar);
483
+ if (null === (_w = null === (_v = this.totalRecordsTree) || void 0 === _v ? void 0 : _v[flatRowKey]) || void 0 === _w ? void 0 : _w[flatColTotalKey]) return void (this.tree[flatRowKey][flatColTotalKey] = null === (_y = null === (_x = this.totalRecordsTree) || void 0 === _x ? void 0 : _x[flatRowKey]) || void 0 === _y ? void 0 : _y[flatColTotalKey]);
484
+ this.tree[flatRowKey][flatColTotalKey] || (this.tree[flatRowKey][flatColTotalKey] = []);
485
+ const toComputeIndicatorKeys = this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys;
486
+ for (let i = 0; i < toComputeIndicatorKeys.length; i++) if (this.calculatedFiledKeys.indexOf(toComputeIndicatorKeys[i]) >= 0) {
487
+ const calculatedFieldRule = null === (_z = this.calculatedFieldRules) || void 0 === _z ? void 0 : _z.find((rule => rule.key === toComputeIndicatorKeys[i]));
488
+ (null === (_1 = null === (_0 = this.tree[flatRowKey]) || void 0 === _0 ? void 0 : _0[flatColTotalKey]) || void 0 === _1 ? void 0 : _1[i]) || (this.tree[flatRowKey][flatColTotalKey][i] = new registeredAggregators[AggregationType.RECALCULATE]({
498
489
  key: toComputeIndicatorKeys[i],
499
- field: null !== (_0 = null == aggRule ? void 0 : aggRule.field) && void 0 !== _0 ? _0 : toComputeIndicatorKeys[i],
500
- aggregationFun: null == aggRule ? void 0 : aggRule.aggregationFun,
501
- formatFun: null !== (_1 = null == aggRule ? void 0 : aggRule.formatFun) && void 0 !== _1 ? _1 : null === (_3 = null === (_2 = this.indicators) || void 0 === _2 ? void 0 : _2.find((indicator => "string" != typeof indicator && indicator.indicatorKey === toComputeIndicatorKeys[i]))) || void 0 === _3 ? void 0 : _3.format
502
- });
490
+ field: toComputeIndicatorKeys[i],
491
+ isRecord: !0,
492
+ formatFun: null === (_3 = null === (_2 = this.indicators) || void 0 === _2 ? void 0 : _2.find((indicator => "string" != typeof indicator && indicator.indicatorKey === toComputeIndicatorKeys[i]))) || void 0 === _3 ? void 0 : _3.format,
493
+ calculateFun: null == calculatedFieldRule ? void 0 : calculatedFieldRule.calculateFun,
494
+ dependAggregators: this.tree[flatRowKey][flatColTotalKey],
495
+ dependIndicatorKeys: null == calculatedFieldRule ? void 0 : calculatedFieldRule.dependIndicatorKeys
496
+ })), flatColTotalKey !== flatColKey && this.tree[flatRowKey][flatColTotalKey][i].push(null === (_5 = null === (_4 = that.tree[flatRowKey]) || void 0 === _4 ? void 0 : _4[flatColKey]) || void 0 === _5 ? void 0 : _5[i]);
497
+ } else {
498
+ if (!this.tree[flatRowKey][flatColTotalKey][i]) {
499
+ const aggRule = this.getAggregatorRule(toComputeIndicatorKeys[i]);
500
+ this.tree[flatRowKey][flatColTotalKey][i] = new registeredAggregators[null !== (_6 = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _6 ? _6 : AggregationType.SUM]({
501
+ key: toComputeIndicatorKeys[i],
502
+ field: null !== (_7 = null == aggRule ? void 0 : aggRule.field) && void 0 !== _7 ? _7 : toComputeIndicatorKeys[i],
503
+ aggregationFun: null == aggRule ? void 0 : aggRule.aggregationFun,
504
+ formatFun: null !== (_8 = null == aggRule ? void 0 : aggRule.formatFun) && void 0 !== _8 ? _8 : null === (_10 = null === (_9 = this.indicators) || void 0 === _9 ? void 0 : _9.find((indicator => "string" != typeof indicator && indicator.indicatorKey === toComputeIndicatorKeys[i]))) || void 0 === _10 ? void 0 : _10.format
505
+ });
506
+ }
507
+ flatColTotalKey !== flatColKey && this.tree[flatRowKey][flatColTotalKey][i].push(null === (_12 = null === (_11 = that.tree[flatRowKey]) || void 0 === _11 ? void 0 : _11[flatColKey]) || void 0 === _12 ? void 0 : _12[i]);
503
508
  }
504
- flatColTotalKey !== flatColKey && this.tree[flatRowKey][flatColTotalKey][i].push(null === (_5 = null === (_4 = that.tree[flatRowKey]) || void 0 === _4 ? void 0 : _4[flatColKey]) || void 0 === _5 ? void 0 : _5[i]);
505
509
  }
506
510
  }
507
511
  }
508
- if ((null === (_7 = null === (_6 = that.totals) || void 0 === _6 ? void 0 : _6.column) || void 0 === _7 ? void 0 : _7.showGrandTotals) || 0 === this.rows.length) {
512
+ if ((null === (_14 = null === (_13 = that.totals) || void 0 === _13 ? void 0 : _13.column) || void 0 === _14 ? void 0 : _14.showGrandTotals) || 0 === this.rows.length) {
509
513
  const flatColTotalKey = that.colGrandTotalLabel;
510
- if (null === (_9 = null === (_8 = this.totalRecordsTree) || void 0 === _8 ? void 0 : _8[flatRowKey]) || void 0 === _9 ? void 0 : _9[flatColTotalKey]) return void (this.tree[flatRowKey][flatColTotalKey] = null === (_11 = null === (_10 = this.totalRecordsTree) || void 0 === _10 ? void 0 : _10[flatRowKey]) || void 0 === _11 ? void 0 : _11[flatColTotalKey]);
514
+ if (null === (_16 = null === (_15 = this.totalRecordsTree) || void 0 === _15 ? void 0 : _15[flatRowKey]) || void 0 === _16 ? void 0 : _16[flatColTotalKey]) return void (this.tree[flatRowKey][flatColTotalKey] = null === (_18 = null === (_17 = this.totalRecordsTree) || void 0 === _17 ? void 0 : _17[flatRowKey]) || void 0 === _18 ? void 0 : _18[flatColTotalKey]);
511
515
  this.tree[flatRowKey][flatColTotalKey] || (this.tree[flatRowKey][flatColTotalKey] = []);
512
516
  const toComputeIndicatorKeys = this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys;
513
517
  for (let i = 0; i < toComputeIndicatorKeys.length; i++) if (this.calculatedFiledKeys.indexOf(toComputeIndicatorKeys[i]) >= 0) {
514
- const calculatedFieldRule = null === (_12 = this.calculatedFieldRules) || void 0 === _12 ? void 0 : _12.find((rule => rule.key === toComputeIndicatorKeys[i]));
515
- (null === (_14 = null === (_13 = this.tree[flatRowKey]) || void 0 === _13 ? void 0 : _13[flatColTotalKey]) || void 0 === _14 ? void 0 : _14[i]) || (this.tree[flatRowKey][flatColTotalKey][i] = new registeredAggregators[AggregationType.RECALCULATE]({
518
+ const calculatedFieldRule = null === (_19 = this.calculatedFieldRules) || void 0 === _19 ? void 0 : _19.find((rule => rule.key === toComputeIndicatorKeys[i]));
519
+ (null === (_21 = null === (_20 = this.tree[flatRowKey]) || void 0 === _20 ? void 0 : _20[flatColTotalKey]) || void 0 === _21 ? void 0 : _21[i]) || (this.tree[flatRowKey][flatColTotalKey][i] = new registeredAggregators[AggregationType.RECALCULATE]({
516
520
  key: toComputeIndicatorKeys[i],
517
521
  field: toComputeIndicatorKeys[i],
518
522
  isRecord: !0,
519
- formatFun: null === (_16 = null === (_15 = this.indicators) || void 0 === _15 ? void 0 : _15.find((indicator => "string" != typeof indicator && indicator.indicatorKey === toComputeIndicatorKeys[i]))) || void 0 === _16 ? void 0 : _16.format,
523
+ formatFun: null === (_23 = null === (_22 = this.indicators) || void 0 === _22 ? void 0 : _22.find((indicator => "string" != typeof indicator && indicator.indicatorKey === toComputeIndicatorKeys[i]))) || void 0 === _23 ? void 0 : _23.format,
520
524
  calculateFun: null == calculatedFieldRule ? void 0 : calculatedFieldRule.calculateFun,
521
525
  dependAggregators: this.tree[flatRowKey][flatColTotalKey],
522
526
  dependIndicatorKeys: null == calculatedFieldRule ? void 0 : calculatedFieldRule.dependIndicatorKeys
523
- })), flatColTotalKey !== flatColKey && this.tree[flatRowKey][flatColTotalKey][i].push(null === (_18 = null === (_17 = that.tree[flatRowKey]) || void 0 === _17 ? void 0 : _17[flatColKey]) || void 0 === _18 ? void 0 : _18[i]);
527
+ })), flatColTotalKey !== flatColKey && this.tree[flatRowKey][flatColTotalKey][i].push(null === (_25 = null === (_24 = that.tree[flatRowKey]) || void 0 === _24 ? void 0 : _24[flatColKey]) || void 0 === _25 ? void 0 : _25[i]);
524
528
  } else {
525
529
  if (!this.tree[flatRowKey][flatColTotalKey][i]) {
526
530
  const aggRule = this.getAggregatorRule(toComputeIndicatorKeys[i]);
527
- this.tree[flatRowKey][flatColTotalKey][i] = new registeredAggregators[null !== (_19 = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _19 ? _19 : AggregationType.SUM]({
531
+ this.tree[flatRowKey][flatColTotalKey][i] = new registeredAggregators[null !== (_26 = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _26 ? _26 : AggregationType.SUM]({
528
532
  key: toComputeIndicatorKeys[i],
529
- field: null !== (_20 = null == aggRule ? void 0 : aggRule.field) && void 0 !== _20 ? _20 : toComputeIndicatorKeys[i],
530
- formatFun: null !== (_21 = null == aggRule ? void 0 : aggRule.formatFun) && void 0 !== _21 ? _21 : null === (_23 = null === (_22 = this.indicators) || void 0 === _22 ? void 0 : _22.find((indicator => "string" != typeof indicator && indicator.indicatorKey === toComputeIndicatorKeys[i]))) || void 0 === _23 ? void 0 : _23.format
533
+ field: null !== (_27 = null == aggRule ? void 0 : aggRule.field) && void 0 !== _27 ? _27 : toComputeIndicatorKeys[i],
534
+ formatFun: null !== (_28 = null == aggRule ? void 0 : aggRule.formatFun) && void 0 !== _28 ? _28 : null === (_30 = null === (_29 = this.indicators) || void 0 === _29 ? void 0 : _29.find((indicator => "string" != typeof indicator && indicator.indicatorKey === toComputeIndicatorKeys[i]))) || void 0 === _30 ? void 0 : _30.format
531
535
  });
532
536
  }
533
- flatColTotalKey !== flatColKey && this.tree[flatRowKey][flatColTotalKey][i].push(null === (_25 = null === (_24 = that.tree[flatRowKey]) || void 0 === _24 ? void 0 : _24[flatColKey]) || void 0 === _25 ? void 0 : _25[i]);
537
+ flatColTotalKey !== flatColKey && this.tree[flatRowKey][flatColTotalKey][i].push(null === (_32 = null === (_31 = that.tree[flatRowKey]) || void 0 === _31 ? void 0 : _31[flatColKey]) || void 0 === _32 ? void 0 : _32[i]);
534
538
  }
535
539
  }
536
540
  };
537
- if ((null === (_b = null === (_a = null == that ? void 0 : that.totals) || void 0 === _a ? void 0 : _a.column) || void 0 === _b ? void 0 : _b.subTotalsDimensions) && (null === (_e = null === (_d = null === (_c = null == that ? void 0 : that.totals) || void 0 === _c ? void 0 : _c.column) || void 0 === _d ? void 0 : _d.subTotalsDimensions) || void 0 === _e ? void 0 : _e.length) >= 1 || (null === (_g = null === (_f = null == that ? void 0 : that.totals) || void 0 === _f ? void 0 : _f.row) || void 0 === _g ? void 0 : _g.subTotalsDimensions) && (null === (_k = null === (_j = null === (_h = null == that ? void 0 : that.totals) || void 0 === _h ? void 0 : _h.row) || void 0 === _j ? void 0 : _j.subTotalsDimensions) || void 0 === _k ? void 0 : _k.length) >= 1 || (null === (_m = null === (_l = null == that ? void 0 : that.totals) || void 0 === _l ? void 0 : _l.column) || void 0 === _m ? void 0 : _m.showGrandTotals) || (null === (_p = null === (_o = null == that ? void 0 : that.totals) || void 0 === _o ? void 0 : _o.row) || void 0 === _p ? void 0 : _p.showGrandTotals)) {
541
+ if ((null === (_b = null === (_a = null == that ? void 0 : that.totals) || void 0 === _a ? void 0 : _a.column) || void 0 === _b ? void 0 : _b.subTotalsDimensions) && (null === (_e = null === (_d = null === (_c = null == that ? void 0 : that.totals) || void 0 === _c ? void 0 : _c.column) || void 0 === _d ? void 0 : _d.subTotalsDimensions) || void 0 === _e ? void 0 : _e.length) >= 1 || (null === (_g = null === (_f = null == that ? void 0 : that.totals) || void 0 === _f ? void 0 : _f.row) || void 0 === _g ? void 0 : _g.subTotalsDimensions) && (null === (_k = null === (_j = null === (_h = null == that ? void 0 : that.totals) || void 0 === _h ? void 0 : _h.row) || void 0 === _j ? void 0 : _j.subTotalsDimensions) || void 0 === _k ? void 0 : _k.length) >= 1 || (null === (_m = null === (_l = null == that ? void 0 : that.totals) || void 0 === _l ? void 0 : _l.column) || void 0 === _m ? void 0 : _m.showGrandTotals) || (null === (_p = null === (_o = null == that ? void 0 : that.totals) || void 0 === _o ? void 0 : _o.row) || void 0 === _p ? void 0 : _p.showGrandTotals) || (null === (_r = null === (_q = null == that ? void 0 : that.totals) || void 0 === _q ? void 0 : _q.row) || void 0 === _r ? void 0 : _r.showSubTotalsOnTreeNode) || (null === (_t = null === (_s = null == that ? void 0 : that.totals) || void 0 === _s ? void 0 : _s.column) || void 0 === _t ? void 0 : _t.showSubTotalsOnTreeNode)) {
538
542
  const rowTotalKeys = [];
539
543
  Object.keys(that.tree).forEach((flatRowKey => {
540
544
  const rowKey = flatRowKey.split(this.stringJoinChar);
541
545
  Object.keys(that.tree[flatRowKey]).forEach((flatColKey => {
542
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5;
543
- if ((null === (_b = null === (_a = that.totals) || void 0 === _a ? void 0 : _a.row) || void 0 === _b ? void 0 : _b.subTotalsDimensions) && (null === (_e = null === (_d = null === (_c = that.totals) || void 0 === _c ? void 0 : _c.row) || void 0 === _d ? void 0 : _d.subTotalsDimensions) || void 0 === _e ? void 0 : _e.length) > 0 && !1 !== that.totals.row.showSubTotals) for (let i = 0, len = null === (_h = null === (_g = null === (_f = that.totals) || void 0 === _f ? void 0 : _f.row) || void 0 === _g ? void 0 : _g.subTotalsDimensions) || void 0 === _h ? void 0 : _h.length; i < len; i++) {
544
- const dimension = that.totals.row.subTotalsDimensions[i], dimensionIndex = that.rows.indexOf(dimension);
545
- if (dimensionIndex >= 0 && dimensionIndex < that.rows.length - 1) {
546
- const rowTotalKey = rowKey.slice(0, dimensionIndex + 1);
547
- "tree" !== this.rowHierarchyType && rowTotalKey.push(that.rowSubTotalLabel);
548
- const flatRowTotalKey = rowTotalKey.join(this.stringJoinChar);
549
- this.tree[flatRowTotalKey] || (this.tree[flatRowTotalKey] = {}, rowTotalKeys.push(flatRowTotalKey)),
550
- this.tree[flatRowTotalKey][flatColKey] || (this.tree[flatRowTotalKey][flatColKey] = []);
551
- const toComputeIndicatorKeys = this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys;
552
- for (let i = 0; i < toComputeIndicatorKeys.length; i++) {
553
- if (!this.tree[flatRowTotalKey][flatColKey][i]) if (this.calculatedFiledKeys.indexOf(toComputeIndicatorKeys[i]) >= 0) {
554
- const calculatedFieldRule = null === (_j = this.calculatedFieldRules) || void 0 === _j ? void 0 : _j.find((rule => rule.key === toComputeIndicatorKeys[i]));
555
- this.tree[flatRowTotalKey][flatColKey][i] = new registeredAggregators[AggregationType.RECALCULATE]({
556
- key: toComputeIndicatorKeys[i],
557
- field: toComputeIndicatorKeys[i],
558
- isRecord: !0,
559
- formatFun: null === (_l = null === (_k = this.indicators) || void 0 === _k ? void 0 : _k.find((indicator => "string" != typeof indicator && indicator.indicatorKey === toComputeIndicatorKeys[i]))) || void 0 === _l ? void 0 : _l.format,
560
- calculateFun: null == calculatedFieldRule ? void 0 : calculatedFieldRule.calculateFun,
561
- dependAggregators: this.tree[flatRowTotalKey][flatColKey],
562
- dependIndicatorKeys: null == calculatedFieldRule ? void 0 : calculatedFieldRule.dependIndicatorKeys
563
- });
564
- } else {
565
- const aggRule = this.getAggregatorRule(toComputeIndicatorKeys[i]);
566
- this.tree[flatRowTotalKey][flatColKey][i] = new registeredAggregators[null !== (_m = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _m ? _m : AggregationType.SUM]({
567
- key: toComputeIndicatorKeys[i],
568
- field: null !== (_o = null == aggRule ? void 0 : aggRule.field) && void 0 !== _o ? _o : toComputeIndicatorKeys[i],
569
- formatFun: null !== (_p = null == aggRule ? void 0 : aggRule.formatFun) && void 0 !== _p ? _p : null === (_r = null === (_q = this.indicators) || void 0 === _q ? void 0 : _q.find((indicator => "string" != typeof indicator && indicator.indicatorKey === toComputeIndicatorKeys[i]))) || void 0 === _r ? void 0 : _r.format
570
- });
546
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12;
547
+ if ((null === (_b = null === (_a = that.totals) || void 0 === _a ? void 0 : _a.row) || void 0 === _b ? void 0 : _b.subTotalsDimensions) && (null === (_e = null === (_d = null === (_c = that.totals) || void 0 === _c ? void 0 : _c.row) || void 0 === _d ? void 0 : _d.subTotalsDimensions) || void 0 === _e ? void 0 : _e.length) > 0 && (!1 !== (null === (_g = null === (_f = that.totals) || void 0 === _f ? void 0 : _f.row) || void 0 === _g ? void 0 : _g.showSubTotals) || (null === (_j = null === (_h = that.totals) || void 0 === _h ? void 0 : _h.row) || void 0 === _j ? void 0 : _j.showSubTotalsOnTreeNode)) || (null === (_l = null === (_k = that.totals) || void 0 === _k ? void 0 : _k.row) || void 0 === _l ? void 0 : _l.showSubTotalsOnTreeNode) && that.rows.length > 0) {
548
+ let rowSubTotalDimensions = (null === (_o = null === (_m = that.totals) || void 0 === _m ? void 0 : _m.row) || void 0 === _o ? void 0 : _o.subTotalsDimensions) || [];
549
+ (null === (_q = null === (_p = that.totals) || void 0 === _p ? void 0 : _p.row) || void 0 === _q ? void 0 : _q.showSubTotalsOnTreeNode) && 0 === rowSubTotalDimensions.length && (rowSubTotalDimensions = that.rows.map((row => row)));
550
+ for (let i = 0, len = rowSubTotalDimensions.length; i < len; i++) {
551
+ const dimension = rowSubTotalDimensions[i], dimensionIndex = that.rows.indexOf(dimension);
552
+ if (dimensionIndex >= 0 && dimensionIndex < that.rows.length - 1) {
553
+ const rowTotalKey = rowKey.slice(0, dimensionIndex + 1);
554
+ "tree" !== this.rowHierarchyType && rowTotalKey.push(that.rowSubTotalLabel);
555
+ const flatRowTotalKey = rowTotalKey.join(this.stringJoinChar);
556
+ this.tree[flatRowTotalKey] || (this.tree[flatRowTotalKey] = {}, rowTotalKeys.push(flatRowTotalKey)),
557
+ this.tree[flatRowTotalKey][flatColKey] || (this.tree[flatRowTotalKey][flatColKey] = []);
558
+ const toComputeIndicatorKeys = this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys;
559
+ for (let i = 0; i < toComputeIndicatorKeys.length; i++) {
560
+ if (!this.tree[flatRowTotalKey][flatColKey][i]) if (this.calculatedFiledKeys.indexOf(toComputeIndicatorKeys[i]) >= 0) {
561
+ const calculatedFieldRule = null === (_r = this.calculatedFieldRules) || void 0 === _r ? void 0 : _r.find((rule => rule.key === toComputeIndicatorKeys[i]));
562
+ this.tree[flatRowTotalKey][flatColKey][i] = new registeredAggregators[AggregationType.RECALCULATE]({
563
+ key: toComputeIndicatorKeys[i],
564
+ field: toComputeIndicatorKeys[i],
565
+ isRecord: !0,
566
+ formatFun: null === (_t = null === (_s = this.indicators) || void 0 === _s ? void 0 : _s.find((indicator => "string" != typeof indicator && indicator.indicatorKey === toComputeIndicatorKeys[i]))) || void 0 === _t ? void 0 : _t.format,
567
+ calculateFun: null == calculatedFieldRule ? void 0 : calculatedFieldRule.calculateFun,
568
+ dependAggregators: this.tree[flatRowTotalKey][flatColKey],
569
+ dependIndicatorKeys: null == calculatedFieldRule ? void 0 : calculatedFieldRule.dependIndicatorKeys
570
+ });
571
+ } else {
572
+ const aggRule = this.getAggregatorRule(toComputeIndicatorKeys[i]);
573
+ this.tree[flatRowTotalKey][flatColKey][i] = new registeredAggregators[null !== (_u = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _u ? _u : AggregationType.SUM]({
574
+ key: toComputeIndicatorKeys[i],
575
+ field: null !== (_v = null == aggRule ? void 0 : aggRule.field) && void 0 !== _v ? _v : toComputeIndicatorKeys[i],
576
+ formatFun: null !== (_w = null == aggRule ? void 0 : aggRule.formatFun) && void 0 !== _w ? _w : null === (_y = null === (_x = this.indicators) || void 0 === _x ? void 0 : _x.find((indicator => "string" != typeof indicator && indicator.indicatorKey === toComputeIndicatorKeys[i]))) || void 0 === _y ? void 0 : _y.format
577
+ });
578
+ }
579
+ flatRowTotalKey !== flatRowKey && this.tree[flatRowTotalKey][flatColKey][i].push(null === (_0 = null === (_z = that.tree[flatRowKey]) || void 0 === _z ? void 0 : _z[flatColKey]) || void 0 === _0 ? void 0 : _0[i]);
571
580
  }
572
- flatRowTotalKey !== flatRowKey && this.tree[flatRowTotalKey][flatColKey][i].push(null === (_t = null === (_s = that.tree[flatRowKey]) || void 0 === _s ? void 0 : _s[flatColKey]) || void 0 === _t ? void 0 : _t[i]);
573
581
  }
574
582
  }
575
583
  }
576
- if ((null === (_v = null === (_u = that.totals) || void 0 === _u ? void 0 : _u.row) || void 0 === _v ? void 0 : _v.showGrandTotals) || 0 === this.columns.length) {
584
+ if ((null === (_2 = null === (_1 = that.totals) || void 0 === _1 ? void 0 : _1.row) || void 0 === _2 ? void 0 : _2.showGrandTotals) || 0 === this.columns.length) {
577
585
  const flatRowTotalKey = that.rowGrandTotalLabel;
578
586
  this.tree[flatRowTotalKey] || (this.tree[flatRowTotalKey] = {}, rowTotalKeys.push(flatRowTotalKey)),
579
587
  this.tree[flatRowTotalKey][flatColKey] || (this.tree[flatRowTotalKey][flatColKey] = []);
580
588
  const toComputeIndicatorKeys = this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys;
581
589
  for (let i = 0; i < toComputeIndicatorKeys.length; i++) {
582
590
  if (!this.tree[flatRowTotalKey][flatColKey][i]) if (this.calculatedFiledKeys.indexOf(toComputeIndicatorKeys[i]) >= 0) {
583
- const calculatedFieldRule = null === (_w = this.calculatedFieldRules) || void 0 === _w ? void 0 : _w.find((rule => rule.key === toComputeIndicatorKeys[i]));
591
+ const calculatedFieldRule = null === (_3 = this.calculatedFieldRules) || void 0 === _3 ? void 0 : _3.find((rule => rule.key === toComputeIndicatorKeys[i]));
584
592
  this.tree[flatRowTotalKey][flatColKey][i] = new registeredAggregators[AggregationType.RECALCULATE]({
585
593
  key: toComputeIndicatorKeys[i],
586
594
  field: toComputeIndicatorKeys[i],
587
595
  isRecord: !0,
588
- formatFun: null === (_y = null === (_x = this.indicators) || void 0 === _x ? void 0 : _x.find((indicator => "string" != typeof indicator && indicator.indicatorKey === toComputeIndicatorKeys[i]))) || void 0 === _y ? void 0 : _y.format,
596
+ formatFun: null === (_5 = null === (_4 = this.indicators) || void 0 === _4 ? void 0 : _4.find((indicator => "string" != typeof indicator && indicator.indicatorKey === toComputeIndicatorKeys[i]))) || void 0 === _5 ? void 0 : _5.format,
589
597
  calculateFun: null == calculatedFieldRule ? void 0 : calculatedFieldRule.calculateFun,
590
598
  dependAggregators: this.tree[flatRowTotalKey][flatColKey],
591
599
  dependIndicatorKeys: null == calculatedFieldRule ? void 0 : calculatedFieldRule.dependIndicatorKeys
592
600
  });
593
601
  } else {
594
602
  const aggRule = this.getAggregatorRule(toComputeIndicatorKeys[i]);
595
- this.tree[flatRowTotalKey][flatColKey][i] = new registeredAggregators[null !== (_z = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _z ? _z : AggregationType.SUM]({
603
+ this.tree[flatRowTotalKey][flatColKey][i] = new registeredAggregators[null !== (_6 = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _6 ? _6 : AggregationType.SUM]({
596
604
  key: toComputeIndicatorKeys[i],
597
- field: null !== (_0 = null == aggRule ? void 0 : aggRule.field) && void 0 !== _0 ? _0 : toComputeIndicatorKeys[i],
598
- formatFun: null !== (_1 = null == aggRule ? void 0 : aggRule.formatFun) && void 0 !== _1 ? _1 : null === (_3 = null === (_2 = this.indicators) || void 0 === _2 ? void 0 : _2.find((indicator => "string" != typeof indicator && indicator.indicatorKey === toComputeIndicatorKeys[i]))) || void 0 === _3 ? void 0 : _3.format
605
+ field: null !== (_7 = null == aggRule ? void 0 : aggRule.field) && void 0 !== _7 ? _7 : toComputeIndicatorKeys[i],
606
+ formatFun: null !== (_8 = null == aggRule ? void 0 : aggRule.formatFun) && void 0 !== _8 ? _8 : null === (_10 = null === (_9 = this.indicators) || void 0 === _9 ? void 0 : _9.find((indicator => "string" != typeof indicator && indicator.indicatorKey === toComputeIndicatorKeys[i]))) || void 0 === _10 ? void 0 : _10.format
599
607
  });
600
608
  }
601
- flatRowTotalKey !== flatRowKey && this.tree[flatRowTotalKey][flatColKey][i].push(null === (_5 = null === (_4 = that.tree[flatRowKey]) || void 0 === _4 ? void 0 : _4[flatColKey]) || void 0 === _5 ? void 0 : _5[i]);
609
+ flatRowTotalKey !== flatRowKey && this.tree[flatRowTotalKey][flatColKey][i].push(null === (_12 = null === (_11 = that.tree[flatRowKey]) || void 0 === _11 ? void 0 : _11[flatColKey]) || void 0 === _12 ? void 0 : _12[i]);
602
610
  }
603
611
  }
604
612
  colCompute(flatRowKey, flatColKey);