@visactor/vtable 1.22.11-alpha.9 → 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 (103) hide show
  1. package/cjs/ListTable.d.ts +7 -34
  2. package/cjs/ListTable.js +18 -138
  3. package/cjs/ListTable.js.map +1 -1
  4. package/cjs/PivotTable-all.js.map +1 -1
  5. package/cjs/components/index.js +1 -1
  6. package/cjs/core/BaseTable.d.ts +3 -0
  7. package/cjs/core/BaseTable.js +22 -6
  8. package/cjs/core/BaseTable.js.map +1 -1
  9. package/cjs/core/TABLE_EVENT_TYPE.d.ts +0 -1
  10. package/cjs/core/TABLE_EVENT_TYPE.js +0 -1
  11. package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
  12. package/cjs/core/record-helper.d.ts +2 -4
  13. package/cjs/core/record-helper.js +47 -120
  14. package/cjs/core/record-helper.js.map +1 -1
  15. package/cjs/data/DataSource.d.ts +4 -13
  16. package/cjs/data/DataSource.js +60 -174
  17. package/cjs/data/DataSource.js.map +1 -1
  18. package/cjs/dataset/dataset.js +92 -84
  19. package/cjs/dataset/dataset.js.map +1 -1
  20. package/cjs/edit/edit-manager.js +10 -9
  21. package/cjs/edit/edit-manager.js.map +1 -1
  22. package/cjs/event/event.d.ts +1 -2
  23. package/cjs/event/event.js +9 -20
  24. package/cjs/event/event.js.map +1 -1
  25. package/cjs/index.d.ts +1 -1
  26. package/cjs/index.js +1 -1
  27. package/cjs/index.js.map +1 -1
  28. package/cjs/layout/pivot-header-layout.js +1 -1
  29. package/cjs/layout/pivot-header-layout.js.map +1 -1
  30. package/cjs/plugins/custom-cell-style.d.ts +5 -5
  31. package/cjs/plugins/custom-cell-style.js +64 -25
  32. package/cjs/plugins/custom-cell-style.js.map +1 -1
  33. package/cjs/scenegraph/group-creater/cell-type/progress-bar-cell.js.map +1 -1
  34. package/cjs/scenegraph/layout/update-row.js +16 -1
  35. package/cjs/scenegraph/layout/update-row.js.map +1 -1
  36. package/cjs/scenegraph/select/update-select-border.js.map +1 -1
  37. package/cjs/state/select/update-position.js +3 -3
  38. package/cjs/state/select/update-position.js.map +1 -1
  39. package/cjs/ts-types/base-table.d.ts +5 -2
  40. package/cjs/ts-types/base-table.js.map +1 -1
  41. package/cjs/ts-types/events.d.ts +0 -15
  42. package/cjs/ts-types/events.js.map +1 -1
  43. package/cjs/ts-types/new-data-set.d.ts +1 -0
  44. package/cjs/ts-types/new-data-set.js.map +1 -1
  45. package/cjs/ts-types/table-engine.d.ts +6 -33
  46. package/cjs/ts-types/table-engine.js.map +1 -1
  47. package/cjs/vrender.js.map +1 -1
  48. package/dist/vtable.js +332 -735
  49. package/dist/vtable.min.js +2 -2
  50. package/es/ListTable.d.ts +7 -34
  51. package/es/ListTable.js +18 -134
  52. package/es/ListTable.js.map +1 -1
  53. package/es/PivotTable-all.js.map +1 -1
  54. package/es/components/index.js +1 -1
  55. package/es/core/BaseTable.d.ts +3 -0
  56. package/es/core/BaseTable.js +22 -6
  57. package/es/core/BaseTable.js.map +1 -1
  58. package/es/core/TABLE_EVENT_TYPE.d.ts +0 -1
  59. package/es/core/TABLE_EVENT_TYPE.js +0 -1
  60. package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
  61. package/es/core/record-helper.d.ts +2 -4
  62. package/es/core/record-helper.js +43 -114
  63. package/es/core/record-helper.js.map +1 -1
  64. package/es/data/DataSource.d.ts +4 -13
  65. package/es/data/DataSource.js +60 -174
  66. package/es/data/DataSource.js.map +1 -1
  67. package/es/dataset/dataset.js +92 -84
  68. package/es/dataset/dataset.js.map +1 -1
  69. package/es/edit/edit-manager.js +10 -9
  70. package/es/edit/edit-manager.js.map +1 -1
  71. package/es/event/event.d.ts +1 -2
  72. package/es/event/event.js +9 -20
  73. package/es/event/event.js.map +1 -1
  74. package/es/index.d.ts +1 -1
  75. package/es/index.js +1 -1
  76. package/es/index.js.map +1 -1
  77. package/es/layout/pivot-header-layout.js +1 -1
  78. package/es/layout/pivot-header-layout.js.map +1 -1
  79. package/es/plugins/custom-cell-style.d.ts +5 -5
  80. package/es/plugins/custom-cell-style.js +62 -25
  81. package/es/plugins/custom-cell-style.js.map +1 -1
  82. package/es/scenegraph/group-creater/cell-type/progress-bar-cell.js.map +1 -1
  83. package/es/scenegraph/layout/update-row.js +16 -1
  84. package/es/scenegraph/layout/update-row.js.map +1 -1
  85. package/es/scenegraph/select/update-select-border.js.map +1 -1
  86. package/es/state/select/update-position.js +4 -2
  87. package/es/state/select/update-position.js.map +1 -1
  88. package/es/ts-types/base-table.d.ts +5 -2
  89. package/es/ts-types/base-table.js.map +1 -1
  90. package/es/ts-types/events.d.ts +0 -15
  91. package/es/ts-types/events.js.map +1 -1
  92. package/es/ts-types/new-data-set.d.ts +1 -0
  93. package/es/ts-types/new-data-set.js.map +1 -1
  94. package/es/ts-types/table-engine.d.ts +6 -33
  95. package/es/ts-types/table-engine.js.map +1 -1
  96. package/es/vrender.js.map +1 -1
  97. package/package.json +3 -3
  98. package/cjs/core/index.d.ts +0 -1
  99. package/cjs/core/index.js +0 -30
  100. package/cjs/core/index.js.map +0 -1
  101. package/es/core/index.d.ts +0 -1
  102. package/es/core/index.js +0 -2
  103. package/es/core/index.js.map +0 -1
@@ -360,7 +360,7 @@ class Dataset {
360
360
  return null === (_a = this.aggregationRules) || void 0 === _a ? void 0 : _a.find(((value, index) => indicatorKey === value.indicatorKey));
361
361
  }
362
362
  getAggregator(rowKey = [], colKey = [], indicator, considerChangedValue = !0, indicatorPosition) {
363
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
363
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
364
364
  const indicatorIndex = this.indicatorKeys.indexOf(indicator);
365
365
  let rowDimensionKey, colDimensionKey, flatRowKey, flatColKey;
366
366
  if ("row" === (null == indicatorPosition ? void 0 : indicatorPosition.position)) rowDimensionKey = rowKey.length >= 2 ? this.rows[rowKey.length - 2] : void 0; else {
@@ -373,13 +373,13 @@ class Dataset {
373
373
  }
374
374
  "string" == typeof rowKey ? flatRowKey = rowKey : (indicatorPosition && "row" !== indicatorPosition.position || rowKey.map(((key, i) => {
375
375
  key !== indicator || (0, vutils_1.isValid)(null == indicatorPosition ? void 0 : indicatorPosition.index) && i !== indicatorPosition.index || rowKey.splice(i, 1);
376
- })), 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)),
376
+ })), 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)),
377
377
  flatRowKey = (0, join_1.join)(rowKey, this.stringJoinChar)), "string" == typeof colKey ? flatColKey = colKey : (indicatorPosition && "col" !== indicatorPosition.position || colKey.map(((key, i) => {
378
378
  key !== indicator || (0, vutils_1.isValid)(null == indicatorPosition ? void 0 : indicatorPosition.index) && i !== indicatorPosition.index || colKey.splice(i, 1);
379
- })), 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)),
379
+ })), 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)),
380
380
  flatColKey = (0, join_1.join)(colKey, this.stringJoinChar));
381
- const agg = null === (_m = null === (_l = this.tree[flatRowKey]) || void 0 === _l ? void 0 : _l[flatColKey]) || void 0 === _m ? void 0 : _m[indicatorIndex];
382
- if (considerChangedValue && (0, vutils_1.isValid)(null === (_p = null === (_o = this.changedTree[flatRowKey]) || void 0 === _o ? void 0 : _o[flatColKey]) || void 0 === _p ? void 0 : _p[indicatorIndex])) {
381
+ const agg = null === (_r = null === (_q = this.tree[flatRowKey]) || void 0 === _q ? void 0 : _q[flatColKey]) || void 0 === _r ? void 0 : _r[indicatorIndex];
382
+ if (considerChangedValue && (0, vutils_1.isValid)(null === (_t = null === (_s = this.changedTree[flatRowKey]) || void 0 === _s ? void 0 : _s[flatColKey]) || void 0 === _t ? void 0 : _t[indicatorIndex])) {
383
383
  const changeValue = this.changedTree[flatRowKey][flatColKey][indicatorIndex];
384
384
  return agg ? {
385
385
  value: () => changeValue,
@@ -470,140 +470,148 @@ class Dataset {
470
470
  } : sortRule.sortBy ? (0, aggregation_1.sortBy)(sortRule.sortBy) : sortRule.sortFunc ? sortRule.sortFunc : sortRule.sortType ? aggregation_1.typeSort : aggregation_1.naturalSort;
471
471
  }
472
472
  totalStatistics() {
473
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
473
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
474
474
  const that = this, colCompute = (flatRowKey, flatColKey) => {
475
- 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;
475
+ 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;
476
476
  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] = {}),
477
477
  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]);
478
478
  const colKey = flatColKey.split(this.stringJoinChar);
479
- 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++) {
480
- const dimension = that.totals.column.subTotalsDimensions[i], dimensionIndex = that.columns.indexOf(dimension);
481
- if (dimensionIndex >= 0) {
482
- const colTotalKey = colKey.slice(0, dimensionIndex + 1);
483
- colTotalKey.push(that.colSubTotalLabel);
484
- const flatColTotalKey = colTotalKey.join(this.stringJoinChar);
485
- 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]);
486
- this.tree[flatRowKey][flatColTotalKey] || (this.tree[flatRowKey][flatColTotalKey] = []);
487
- const toComputeIndicatorKeys = this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys;
488
- for (let i = 0; i < toComputeIndicatorKeys.length; i++) if (this.calculatedFiledKeys.indexOf(toComputeIndicatorKeys[i]) >= 0) {
489
- const calculatedFieldRule = null === (_s = this.calculatedFieldRules) || void 0 === _s ? void 0 : _s.find((rule => rule.key === toComputeIndicatorKeys[i]));
490
- (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 aggregation_1.registeredAggregators[ts_types_1.AggregationType.RECALCULATE]({
491
- key: toComputeIndicatorKeys[i],
492
- field: toComputeIndicatorKeys[i],
493
- isRecord: !0,
494
- 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,
495
- calculateFun: null == calculatedFieldRule ? void 0 : calculatedFieldRule.calculateFun,
496
- dependAggregators: this.tree[flatRowKey][flatColTotalKey],
497
- dependIndicatorKeys: null == calculatedFieldRule ? void 0 : calculatedFieldRule.dependIndicatorKeys
498
- })), 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]);
499
- } else {
500
- if (!this.tree[flatRowKey][flatColTotalKey][i]) {
501
- const aggRule = this.getAggregatorRule(toComputeIndicatorKeys[i]);
502
- this.tree[flatRowKey][flatColTotalKey][i] = new aggregation_1.registeredAggregators[null !== (_z = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _z ? _z : ts_types_1.AggregationType.SUM]({
479
+ 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) {
480
+ let colSubTotalDimensions = (null === (_s = null === (_r = that.totals) || void 0 === _r ? void 0 : _r.column) || void 0 === _s ? void 0 : _s.subTotalsDimensions) || [];
481
+ (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)));
482
+ for (let i = 0, len = colSubTotalDimensions.length; i < len; i++) {
483
+ const dimension = colSubTotalDimensions[i], dimensionIndex = that.columns.indexOf(dimension);
484
+ if (dimensionIndex >= 0) {
485
+ const colTotalKey = colKey.slice(0, dimensionIndex + 1);
486
+ colTotalKey.push(that.colSubTotalLabel);
487
+ const flatColTotalKey = colTotalKey.join(this.stringJoinChar);
488
+ 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]);
489
+ this.tree[flatRowKey][flatColTotalKey] || (this.tree[flatRowKey][flatColTotalKey] = []);
490
+ const toComputeIndicatorKeys = this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys;
491
+ for (let i = 0; i < toComputeIndicatorKeys.length; i++) if (this.calculatedFiledKeys.indexOf(toComputeIndicatorKeys[i]) >= 0) {
492
+ const calculatedFieldRule = null === (_z = this.calculatedFieldRules) || void 0 === _z ? void 0 : _z.find((rule => rule.key === toComputeIndicatorKeys[i]));
493
+ (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 aggregation_1.registeredAggregators[ts_types_1.AggregationType.RECALCULATE]({
503
494
  key: toComputeIndicatorKeys[i],
504
- field: null !== (_0 = null == aggRule ? void 0 : aggRule.field) && void 0 !== _0 ? _0 : toComputeIndicatorKeys[i],
505
- aggregationFun: null == aggRule ? void 0 : aggRule.aggregationFun,
506
- 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
507
- });
495
+ field: toComputeIndicatorKeys[i],
496
+ isRecord: !0,
497
+ 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,
498
+ calculateFun: null == calculatedFieldRule ? void 0 : calculatedFieldRule.calculateFun,
499
+ dependAggregators: this.tree[flatRowKey][flatColTotalKey],
500
+ dependIndicatorKeys: null == calculatedFieldRule ? void 0 : calculatedFieldRule.dependIndicatorKeys
501
+ })), 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]);
502
+ } else {
503
+ if (!this.tree[flatRowKey][flatColTotalKey][i]) {
504
+ const aggRule = this.getAggregatorRule(toComputeIndicatorKeys[i]);
505
+ this.tree[flatRowKey][flatColTotalKey][i] = new aggregation_1.registeredAggregators[null !== (_6 = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _6 ? _6 : ts_types_1.AggregationType.SUM]({
506
+ key: toComputeIndicatorKeys[i],
507
+ field: null !== (_7 = null == aggRule ? void 0 : aggRule.field) && void 0 !== _7 ? _7 : toComputeIndicatorKeys[i],
508
+ aggregationFun: null == aggRule ? void 0 : aggRule.aggregationFun,
509
+ 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
510
+ });
511
+ }
512
+ 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]);
508
513
  }
509
- 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]);
510
514
  }
511
515
  }
512
516
  }
513
- 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) {
517
+ 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) {
514
518
  const flatColTotalKey = that.colGrandTotalLabel;
515
- 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]);
519
+ 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]);
516
520
  this.tree[flatRowKey][flatColTotalKey] || (this.tree[flatRowKey][flatColTotalKey] = []);
517
521
  const toComputeIndicatorKeys = this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys;
518
522
  for (let i = 0; i < toComputeIndicatorKeys.length; i++) if (this.calculatedFiledKeys.indexOf(toComputeIndicatorKeys[i]) >= 0) {
519
- const calculatedFieldRule = null === (_12 = this.calculatedFieldRules) || void 0 === _12 ? void 0 : _12.find((rule => rule.key === toComputeIndicatorKeys[i]));
520
- (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 aggregation_1.registeredAggregators[ts_types_1.AggregationType.RECALCULATE]({
523
+ const calculatedFieldRule = null === (_19 = this.calculatedFieldRules) || void 0 === _19 ? void 0 : _19.find((rule => rule.key === toComputeIndicatorKeys[i]));
524
+ (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 aggregation_1.registeredAggregators[ts_types_1.AggregationType.RECALCULATE]({
521
525
  key: toComputeIndicatorKeys[i],
522
526
  field: toComputeIndicatorKeys[i],
523
527
  isRecord: !0,
524
- 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,
528
+ 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,
525
529
  calculateFun: null == calculatedFieldRule ? void 0 : calculatedFieldRule.calculateFun,
526
530
  dependAggregators: this.tree[flatRowKey][flatColTotalKey],
527
531
  dependIndicatorKeys: null == calculatedFieldRule ? void 0 : calculatedFieldRule.dependIndicatorKeys
528
- })), 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]);
532
+ })), 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]);
529
533
  } else {
530
534
  if (!this.tree[flatRowKey][flatColTotalKey][i]) {
531
535
  const aggRule = this.getAggregatorRule(toComputeIndicatorKeys[i]);
532
- this.tree[flatRowKey][flatColTotalKey][i] = new aggregation_1.registeredAggregators[null !== (_19 = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _19 ? _19 : ts_types_1.AggregationType.SUM]({
536
+ this.tree[flatRowKey][flatColTotalKey][i] = new aggregation_1.registeredAggregators[null !== (_26 = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _26 ? _26 : ts_types_1.AggregationType.SUM]({
533
537
  key: toComputeIndicatorKeys[i],
534
- field: null !== (_20 = null == aggRule ? void 0 : aggRule.field) && void 0 !== _20 ? _20 : toComputeIndicatorKeys[i],
535
- 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
538
+ field: null !== (_27 = null == aggRule ? void 0 : aggRule.field) && void 0 !== _27 ? _27 : toComputeIndicatorKeys[i],
539
+ 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
536
540
  });
537
541
  }
538
- 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]);
542
+ 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]);
539
543
  }
540
544
  }
541
545
  };
542
- 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)) {
546
+ 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)) {
543
547
  const rowTotalKeys = [];
544
548
  Object.keys(that.tree).forEach((flatRowKey => {
545
549
  const rowKey = flatRowKey.split(this.stringJoinChar);
546
550
  Object.keys(that.tree[flatRowKey]).forEach((flatColKey => {
547
- 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;
548
- 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++) {
549
- const dimension = that.totals.row.subTotalsDimensions[i], dimensionIndex = that.rows.indexOf(dimension);
550
- if (dimensionIndex >= 0 && dimensionIndex < that.rows.length - 1) {
551
- const rowTotalKey = rowKey.slice(0, dimensionIndex + 1);
552
- "tree" !== this.rowHierarchyType && rowTotalKey.push(that.rowSubTotalLabel);
553
- const flatRowTotalKey = rowTotalKey.join(this.stringJoinChar);
554
- this.tree[flatRowTotalKey] || (this.tree[flatRowTotalKey] = {}, rowTotalKeys.push(flatRowTotalKey)),
555
- this.tree[flatRowTotalKey][flatColKey] || (this.tree[flatRowTotalKey][flatColKey] = []);
556
- const toComputeIndicatorKeys = this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys;
557
- for (let i = 0; i < toComputeIndicatorKeys.length; i++) {
558
- if (!this.tree[flatRowTotalKey][flatColKey][i]) if (this.calculatedFiledKeys.indexOf(toComputeIndicatorKeys[i]) >= 0) {
559
- const calculatedFieldRule = null === (_j = this.calculatedFieldRules) || void 0 === _j ? void 0 : _j.find((rule => rule.key === toComputeIndicatorKeys[i]));
560
- this.tree[flatRowTotalKey][flatColKey][i] = new aggregation_1.registeredAggregators[ts_types_1.AggregationType.RECALCULATE]({
561
- key: toComputeIndicatorKeys[i],
562
- field: toComputeIndicatorKeys[i],
563
- isRecord: !0,
564
- 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,
565
- calculateFun: null == calculatedFieldRule ? void 0 : calculatedFieldRule.calculateFun,
566
- dependAggregators: this.tree[flatRowTotalKey][flatColKey],
567
- dependIndicatorKeys: null == calculatedFieldRule ? void 0 : calculatedFieldRule.dependIndicatorKeys
568
- });
569
- } else {
570
- const aggRule = this.getAggregatorRule(toComputeIndicatorKeys[i]);
571
- this.tree[flatRowTotalKey][flatColKey][i] = new aggregation_1.registeredAggregators[null !== (_m = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _m ? _m : ts_types_1.AggregationType.SUM]({
572
- key: toComputeIndicatorKeys[i],
573
- field: null !== (_o = null == aggRule ? void 0 : aggRule.field) && void 0 !== _o ? _o : toComputeIndicatorKeys[i],
574
- 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
575
- });
551
+ 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;
552
+ 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) {
553
+ let rowSubTotalDimensions = (null === (_o = null === (_m = that.totals) || void 0 === _m ? void 0 : _m.row) || void 0 === _o ? void 0 : _o.subTotalsDimensions) || [];
554
+ (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)));
555
+ for (let i = 0, len = rowSubTotalDimensions.length; i < len; i++) {
556
+ const dimension = rowSubTotalDimensions[i], dimensionIndex = that.rows.indexOf(dimension);
557
+ if (dimensionIndex >= 0 && dimensionIndex < that.rows.length - 1) {
558
+ const rowTotalKey = rowKey.slice(0, dimensionIndex + 1);
559
+ "tree" !== this.rowHierarchyType && rowTotalKey.push(that.rowSubTotalLabel);
560
+ const flatRowTotalKey = rowTotalKey.join(this.stringJoinChar);
561
+ this.tree[flatRowTotalKey] || (this.tree[flatRowTotalKey] = {}, rowTotalKeys.push(flatRowTotalKey)),
562
+ this.tree[flatRowTotalKey][flatColKey] || (this.tree[flatRowTotalKey][flatColKey] = []);
563
+ const toComputeIndicatorKeys = this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys;
564
+ for (let i = 0; i < toComputeIndicatorKeys.length; i++) {
565
+ if (!this.tree[flatRowTotalKey][flatColKey][i]) if (this.calculatedFiledKeys.indexOf(toComputeIndicatorKeys[i]) >= 0) {
566
+ const calculatedFieldRule = null === (_r = this.calculatedFieldRules) || void 0 === _r ? void 0 : _r.find((rule => rule.key === toComputeIndicatorKeys[i]));
567
+ this.tree[flatRowTotalKey][flatColKey][i] = new aggregation_1.registeredAggregators[ts_types_1.AggregationType.RECALCULATE]({
568
+ key: toComputeIndicatorKeys[i],
569
+ field: toComputeIndicatorKeys[i],
570
+ isRecord: !0,
571
+ 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,
572
+ calculateFun: null == calculatedFieldRule ? void 0 : calculatedFieldRule.calculateFun,
573
+ dependAggregators: this.tree[flatRowTotalKey][flatColKey],
574
+ dependIndicatorKeys: null == calculatedFieldRule ? void 0 : calculatedFieldRule.dependIndicatorKeys
575
+ });
576
+ } else {
577
+ const aggRule = this.getAggregatorRule(toComputeIndicatorKeys[i]);
578
+ this.tree[flatRowTotalKey][flatColKey][i] = new aggregation_1.registeredAggregators[null !== (_u = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _u ? _u : ts_types_1.AggregationType.SUM]({
579
+ key: toComputeIndicatorKeys[i],
580
+ field: null !== (_v = null == aggRule ? void 0 : aggRule.field) && void 0 !== _v ? _v : toComputeIndicatorKeys[i],
581
+ 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
582
+ });
583
+ }
584
+ 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]);
576
585
  }
577
- 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]);
578
586
  }
579
587
  }
580
588
  }
581
- 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) {
589
+ 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) {
582
590
  const flatRowTotalKey = that.rowGrandTotalLabel;
583
591
  this.tree[flatRowTotalKey] || (this.tree[flatRowTotalKey] = {}, rowTotalKeys.push(flatRowTotalKey)),
584
592
  this.tree[flatRowTotalKey][flatColKey] || (this.tree[flatRowTotalKey][flatColKey] = []);
585
593
  const toComputeIndicatorKeys = this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys;
586
594
  for (let i = 0; i < toComputeIndicatorKeys.length; i++) {
587
595
  if (!this.tree[flatRowTotalKey][flatColKey][i]) if (this.calculatedFiledKeys.indexOf(toComputeIndicatorKeys[i]) >= 0) {
588
- const calculatedFieldRule = null === (_w = this.calculatedFieldRules) || void 0 === _w ? void 0 : _w.find((rule => rule.key === toComputeIndicatorKeys[i]));
596
+ const calculatedFieldRule = null === (_3 = this.calculatedFieldRules) || void 0 === _3 ? void 0 : _3.find((rule => rule.key === toComputeIndicatorKeys[i]));
589
597
  this.tree[flatRowTotalKey][flatColKey][i] = new aggregation_1.registeredAggregators[ts_types_1.AggregationType.RECALCULATE]({
590
598
  key: toComputeIndicatorKeys[i],
591
599
  field: toComputeIndicatorKeys[i],
592
600
  isRecord: !0,
593
- 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,
601
+ 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,
594
602
  calculateFun: null == calculatedFieldRule ? void 0 : calculatedFieldRule.calculateFun,
595
603
  dependAggregators: this.tree[flatRowTotalKey][flatColKey],
596
604
  dependIndicatorKeys: null == calculatedFieldRule ? void 0 : calculatedFieldRule.dependIndicatorKeys
597
605
  });
598
606
  } else {
599
607
  const aggRule = this.getAggregatorRule(toComputeIndicatorKeys[i]);
600
- this.tree[flatRowTotalKey][flatColKey][i] = new aggregation_1.registeredAggregators[null !== (_z = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _z ? _z : ts_types_1.AggregationType.SUM]({
608
+ this.tree[flatRowTotalKey][flatColKey][i] = new aggregation_1.registeredAggregators[null !== (_6 = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _6 ? _6 : ts_types_1.AggregationType.SUM]({
601
609
  key: toComputeIndicatorKeys[i],
602
- field: null !== (_0 = null == aggRule ? void 0 : aggRule.field) && void 0 !== _0 ? _0 : toComputeIndicatorKeys[i],
603
- 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
610
+ field: null !== (_7 = null == aggRule ? void 0 : aggRule.field) && void 0 !== _7 ? _7 : toComputeIndicatorKeys[i],
611
+ 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
604
612
  });
605
613
  }
606
- 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]);
614
+ 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]);
607
615
  }
608
616
  }
609
617
  colCompute(flatRowKey, flatColKey);