@visactor/vtable 0.19.0 → 0.19.1

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 (163) hide show
  1. package/cjs/ListTable.js +4 -4
  2. package/cjs/ListTable.js.map +1 -1
  3. package/cjs/PivotChart.d.ts +1 -1
  4. package/cjs/PivotChart.js +2 -1
  5. package/cjs/PivotChart.js.map +1 -1
  6. package/cjs/PivotTable.js +2 -2
  7. package/cjs/PivotTable.js.map +1 -1
  8. package/cjs/components/axis/axis.js +12 -7
  9. package/cjs/components/axis/axis.js.map +1 -1
  10. package/cjs/core/BaseTable.d.ts +0 -1
  11. package/cjs/core/BaseTable.js +12 -12
  12. package/cjs/core/BaseTable.js.map +1 -1
  13. package/cjs/dataset/dataset.js +43 -42
  14. package/cjs/dataset/dataset.js.map +1 -1
  15. package/cjs/edit/edit-manager.js +8 -8
  16. package/cjs/edit/edit-manager.js.map +1 -1
  17. package/cjs/event/listener/container-dom.js +2 -2
  18. package/cjs/event/listener/container-dom.js.map +1 -1
  19. package/cjs/header-helper/header-helper.js +2 -2
  20. package/cjs/header-helper/header-helper.js.map +1 -1
  21. package/cjs/index.d.ts +1 -1
  22. package/cjs/index.js +1 -1
  23. package/cjs/index.js.map +1 -1
  24. package/cjs/layout/chart-helper/get-axis-config.d.ts +1 -1
  25. package/cjs/layout/pivot-header-layout.d.ts +3 -1
  26. package/cjs/layout/pivot-header-layout.js +55 -38
  27. package/cjs/layout/pivot-header-layout.js.map +1 -1
  28. package/cjs/layout/row-height-map.d.ts +1 -0
  29. package/cjs/layout/row-height-map.js +3 -0
  30. package/cjs/layout/row-height-map.js.map +1 -1
  31. package/cjs/scenegraph/component/custom.js +7 -7
  32. package/cjs/scenegraph/component/custom.js.map +1 -1
  33. package/cjs/scenegraph/graphic/group.d.ts +1 -0
  34. package/cjs/scenegraph/graphic/group.js +10 -0
  35. package/cjs/scenegraph/graphic/group.js.map +1 -1
  36. package/cjs/scenegraph/group-creater/cell-helper.js +6 -1
  37. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  38. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +4 -3
  39. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  40. package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js +3 -2
  41. package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
  42. package/cjs/scenegraph/group-creater/cell-type/image-cell.js +3 -2
  43. package/cjs/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
  44. package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js +3 -2
  45. package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
  46. package/cjs/scenegraph/group-creater/cell-type/text-cell.js +6 -5
  47. package/cjs/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
  48. package/cjs/scenegraph/group-creater/cell-type/video-cell.js +3 -2
  49. package/cjs/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
  50. package/cjs/scenegraph/group-creater/progress/proxy.js +7 -3
  51. package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
  52. package/cjs/scenegraph/icon/icon-update.js +6 -2
  53. package/cjs/scenegraph/icon/icon-update.js.map +1 -1
  54. package/cjs/scenegraph/layout/compute-row-height.js +7 -9
  55. package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
  56. package/cjs/scenegraph/layout/update-height.js +4 -2
  57. package/cjs/scenegraph/layout/update-height.js.map +1 -1
  58. package/cjs/scenegraph/layout/update-width.js +4 -2
  59. package/cjs/scenegraph/layout/update-width.js.map +1 -1
  60. package/cjs/scenegraph/scenegraph.js +2 -1
  61. package/cjs/scenegraph/stick-text/index.js +13 -5
  62. package/cjs/scenegraph/stick-text/index.js.map +1 -1
  63. package/cjs/scenegraph/utils/text-icon-layout.js +3 -2
  64. package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
  65. package/cjs/state/hover/is-cell-hover.js +8 -4
  66. package/cjs/state/hover/is-cell-hover.js.map +1 -1
  67. package/cjs/state/hover/update-cell.js +8 -4
  68. package/cjs/state/hover/update-cell.js.map +1 -1
  69. package/cjs/state/state.js +1 -2
  70. package/cjs/themes/component.d.ts +5 -5
  71. package/cjs/tools/merge-range.d.ts +8 -0
  72. package/cjs/tools/merge-range.js +19 -0
  73. package/cjs/tools/merge-range.js.map +1 -0
  74. package/cjs/ts-types/component/axis.d.ts +2 -15
  75. package/cjs/ts-types/component/axis.js.map +1 -1
  76. package/cjs/ts-types/customElement.d.ts +1 -0
  77. package/cjs/ts-types/customElement.js.map +1 -1
  78. package/cjs/ts-types/new-data-set.js.map +1 -1
  79. package/cjs/ts-types/table-engine.js.map +1 -1
  80. package/cjs/vrender.js.map +1 -1
  81. package/dist/vtable.js +265 -138
  82. package/dist/vtable.min.js +2 -2
  83. package/es/ListTable.js +4 -4
  84. package/es/ListTable.js.map +1 -1
  85. package/es/PivotChart.d.ts +1 -1
  86. package/es/PivotChart.js +2 -1
  87. package/es/PivotChart.js.map +1 -1
  88. package/es/PivotTable.js +2 -2
  89. package/es/PivotTable.js.map +1 -1
  90. package/es/components/axis/axis.js +12 -7
  91. package/es/components/axis/axis.js.map +1 -1
  92. package/es/core/BaseTable.d.ts +0 -1
  93. package/es/core/BaseTable.js +12 -12
  94. package/es/core/BaseTable.js.map +1 -1
  95. package/es/dataset/dataset.js +43 -42
  96. package/es/dataset/dataset.js.map +1 -1
  97. package/es/edit/edit-manager.js +8 -8
  98. package/es/edit/edit-manager.js.map +1 -1
  99. package/es/event/listener/container-dom.js +2 -2
  100. package/es/event/listener/container-dom.js.map +1 -1
  101. package/es/header-helper/header-helper.js +3 -1
  102. package/es/header-helper/header-helper.js.map +1 -1
  103. package/es/index.d.ts +1 -1
  104. package/es/index.js +1 -1
  105. package/es/index.js.map +1 -1
  106. package/es/layout/chart-helper/get-axis-config.d.ts +1 -1
  107. package/es/layout/pivot-header-layout.d.ts +3 -1
  108. package/es/layout/pivot-header-layout.js +54 -38
  109. package/es/layout/pivot-header-layout.js.map +1 -1
  110. package/es/layout/row-height-map.d.ts +1 -0
  111. package/es/layout/row-height-map.js +3 -0
  112. package/es/layout/row-height-map.js.map +1 -1
  113. package/es/scenegraph/component/custom.js +7 -7
  114. package/es/scenegraph/component/custom.js.map +1 -1
  115. package/es/scenegraph/graphic/group.d.ts +1 -0
  116. package/es/scenegraph/graphic/group.js +10 -0
  117. package/es/scenegraph/graphic/group.js.map +1 -1
  118. package/es/scenegraph/group-creater/cell-helper.js +6 -1
  119. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  120. package/es/scenegraph/group-creater/cell-type/chart-cell.js +4 -3
  121. package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  122. package/es/scenegraph/group-creater/cell-type/checkbox-cell.js +3 -2
  123. package/es/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
  124. package/es/scenegraph/group-creater/cell-type/image-cell.js +3 -2
  125. package/es/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
  126. package/es/scenegraph/group-creater/cell-type/spark-line-cell.js +3 -2
  127. package/es/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
  128. package/es/scenegraph/group-creater/cell-type/text-cell.js +6 -5
  129. package/es/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
  130. package/es/scenegraph/group-creater/cell-type/video-cell.js +3 -2
  131. package/es/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
  132. package/es/scenegraph/group-creater/progress/proxy.js +7 -3
  133. package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
  134. package/es/scenegraph/icon/icon-update.js +6 -1
  135. package/es/scenegraph/icon/icon-update.js.map +1 -1
  136. package/es/scenegraph/layout/compute-row-height.js +7 -9
  137. package/es/scenegraph/layout/compute-row-height.js.map +1 -1
  138. package/es/scenegraph/layout/update-height.js +4 -1
  139. package/es/scenegraph/layout/update-height.js.map +1 -1
  140. package/es/scenegraph/layout/update-width.js +4 -1
  141. package/es/scenegraph/layout/update-width.js.map +1 -1
  142. package/es/scenegraph/scenegraph.js +2 -1
  143. package/es/scenegraph/stick-text/index.js +12 -4
  144. package/es/scenegraph/stick-text/index.js.map +1 -1
  145. package/es/scenegraph/utils/text-icon-layout.js +3 -2
  146. package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
  147. package/es/state/hover/is-cell-hover.js +8 -3
  148. package/es/state/hover/is-cell-hover.js.map +1 -1
  149. package/es/state/hover/update-cell.js +8 -3
  150. package/es/state/hover/update-cell.js.map +1 -1
  151. package/es/state/state.js +1 -2
  152. package/es/themes/component.d.ts +5 -5
  153. package/es/tools/merge-range.d.ts +8 -0
  154. package/es/tools/merge-range.js +13 -0
  155. package/es/tools/merge-range.js.map +1 -0
  156. package/es/ts-types/component/axis.d.ts +2 -15
  157. package/es/ts-types/component/axis.js.map +1 -1
  158. package/es/ts-types/customElement.d.ts +1 -0
  159. package/es/ts-types/customElement.js.map +1 -1
  160. package/es/ts-types/new-data-set.js.map +1 -1
  161. package/es/ts-types/table-engine.js.map +1 -1
  162. package/es/vrender.js.map +1 -1
  163. package/package.json +5 -5
@@ -8,7 +8,7 @@ const vutils_1 = require("@visactor/vutils"), ts_types_1 = require("../ts-types"
8
8
 
9
9
  class Dataset {
10
10
  constructor(dataConfig, rows, columns, indicatorKeys, indicators, indicatorsAsCol, records, rowHierarchyType, customColTree, customRowTree, needSplitPositiveAndNegative) {
11
- 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;
11
+ 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;
12
12
  if (this.tree = {}, this.changedTree = {}, this.colFlatKeys = {}, this.rowFlatKeys = {},
13
13
  this.colKeys = [], this.rowKeys = [], this.rowOrder = "key_a_to_z", this.colOrder = "key_a_to_z",
14
14
  this.sorted = !1, this.indicatorStatistics = [], this.aggregators = {}, this.stringJoinChar = String.fromCharCode(0),
@@ -29,11 +29,11 @@ class Dataset {
29
29
  this.needSplitPositiveAndNegative = null != needSplitPositiveAndNegative && needSplitPositiveAndNegative,
30
30
  this.rowsIsTotal = new Array(null !== (_v = null === (_u = this.rows) || void 0 === _u ? void 0 : _u.length) && void 0 !== _v ? _v : 0).fill(!1),
31
31
  this.colsIsTotal = new Array(null !== (_x = null === (_w = this.columns) || void 0 === _w ? void 0 : _w.length) && void 0 !== _x ? _x : 0).fill(!1),
32
- null === (_z = null === (_y = this.totals) || void 0 === _y ? void 0 : _y.row) || void 0 === _z ? void 0 : _z.showSubTotals) for (let i = 0, len = null === (_2 = null === (_1 = null === (_0 = this.totals) || void 0 === _0 ? void 0 : _0.row) || void 0 === _1 ? void 0 : _1.subTotalsDimensions) || void 0 === _2 ? void 0 : _2.length; i < len; i++) {
32
+ (null === (_y = this.totals) || void 0 === _y ? void 0 : _y.row) && !1 !== this.totals.row.showSubTotals) for (let i = 0, len = null === (_1 = null === (_0 = null === (_z = this.totals) || void 0 === _z ? void 0 : _z.row) || void 0 === _0 ? void 0 : _0.subTotalsDimensions) || void 0 === _1 ? void 0 : _1.length; i < len; i++) {
33
33
  const dimension = this.totals.row.subTotalsDimensions[i], dimensionIndex = this.rows.indexOf(dimension);
34
34
  this.rowsIsTotal[dimensionIndex] = !0;
35
35
  }
36
- if (null === (_4 = null === (_3 = this.totals) || void 0 === _3 ? void 0 : _3.column) || void 0 === _4 ? void 0 : _4.showSubTotals) for (let i = 0, len = null === (_7 = null === (_6 = null === (_5 = this.totals) || void 0 === _5 ? void 0 : _5.column) || void 0 === _6 ? void 0 : _6.subTotalsDimensions) || void 0 === _7 ? void 0 : _7.length; i < len; i++) {
36
+ if ((null === (_2 = this.totals) || void 0 === _2 ? void 0 : _2.column) && !1 !== this.totals.column.showSubTotals) for (let i = 0, len = null === (_5 = null === (_4 = null === (_3 = this.totals) || void 0 === _3 ? void 0 : _3.column) || void 0 === _4 ? void 0 : _4.subTotalsDimensions) || void 0 === _5 ? void 0 : _5.length; i < len; i++) {
37
37
  const dimension = this.totals.column.subTotalsDimensions[i], dimensionIndex = this.columns.indexOf(dimension);
38
38
  this.colsIsTotal[dimensionIndex] = !0;
39
39
  }
@@ -132,7 +132,7 @@ class Dataset {
132
132
  return isReserved;
133
133
  }
134
134
  processRecord(record, assignedIndicatorKey) {
135
- 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;
135
+ 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;
136
136
  null === (_a = this.derivedFieldRules) || void 0 === _a || _a.forEach(((derivedFieldRule, i) => {
137
137
  record[derivedFieldRule.fieldName] = derivedFieldRule.derivedFunc(record);
138
138
  }));
@@ -163,7 +163,7 @@ class Dataset {
163
163
  rowKey.push(this.rowGrandTotalLabel), isToTalRecord = !0;
164
164
  break;
165
165
  }
166
- if ((null === (_g = null === (_f = null === (_e = this.dataConfig) || void 0 === _e ? void 0 : _e.totals) || void 0 === _f ? void 0 : _f.row) || void 0 === _g ? void 0 : _g.showSubTotals) && (null === (_k = null === (_j = null === (_h = this.dataConfig) || void 0 === _h ? void 0 : _h.totals) || void 0 === _j ? void 0 : _j.row) || void 0 === _k ? void 0 : _k.subTotalsDimensions.indexOf(this.rows[l - 1])) >= 0) {
166
+ if ((null === (_g = null === (_f = null === (_e = this.dataConfig) || void 0 === _e ? void 0 : _e.totals) || void 0 === _f ? void 0 : _f.row) || void 0 === _g ? void 0 : _g.subTotalsDimensions.indexOf(this.rows[l - 1])) >= 0) {
167
167
  "grid" === this.rowHierarchyType && rowKey.push(this.rowSubTotalLabel), isToTalRecord = !0;
168
168
  break;
169
169
  }
@@ -172,11 +172,11 @@ class Dataset {
172
172
  for (let n = 0, len2 = this.columns.length; n < len2; n++) {
173
173
  const colAttr = this.columns[n];
174
174
  if (colAttr in record) colKey.push(record[colAttr]); else {
175
- if ((null === (_o = null === (_m = null === (_l = this.dataConfig) || void 0 === _l ? void 0 : _l.totals) || void 0 === _m ? void 0 : _m.column) || void 0 === _o ? void 0 : _o.showGrandTotals) && 0 === n && !this.columns.find((ck => ck in record))) {
175
+ if ((null === (_k = null === (_j = null === (_h = this.dataConfig) || void 0 === _h ? void 0 : _h.totals) || void 0 === _j ? void 0 : _j.column) || void 0 === _k ? void 0 : _k.showGrandTotals) && 0 === n && !this.columns.find((ck => ck in record))) {
176
176
  colKey.push(this.colGrandTotalLabel), isToTalRecord = !0;
177
177
  break;
178
178
  }
179
- if ((null === (_r = null === (_q = null === (_p = this.dataConfig) || void 0 === _p ? void 0 : _p.totals) || void 0 === _q ? void 0 : _q.column) || void 0 === _r ? void 0 : _r.showSubTotals) && (null === (_u = null === (_t = null === (_s = this.dataConfig) || void 0 === _s ? void 0 : _s.totals) || void 0 === _t ? void 0 : _t.column) || void 0 === _u ? void 0 : _u.subTotalsDimensions.indexOf(this.columns[n - 1])) >= 0) {
179
+ if ((null === (_o = null === (_m = null === (_l = this.dataConfig) || void 0 === _l ? void 0 : _l.totals) || void 0 === _m ? void 0 : _m.column) || void 0 === _o ? void 0 : _o.subTotalsDimensions.indexOf(this.columns[n - 1])) >= 0) {
180
180
  colKey.push(this.colSubTotalLabel), isToTalRecord = !0;
181
181
  break;
182
182
  }
@@ -187,20 +187,20 @@ class Dataset {
187
187
  this.totalRecordsTree[flatRowKey] || (this.totalRecordsTree[flatRowKey] = {}), this.totalRecordsTree[flatRowKey][flatColKey] || (this.totalRecordsTree[flatRowKey][flatColKey] = []);
188
188
  for (let i = 0; i < this.indicatorKeys.length; i++) {
189
189
  const aggRule = this.getAggregatorRule(this.indicatorKeys[i]);
190
- (null === (_w = null === (_v = this.totalRecordsTree[flatRowKey]) || void 0 === _v ? void 0 : _v[flatColKey]) || void 0 === _w ? void 0 : _w[i]) || (this.totalRecordsTree[flatRowKey][flatColKey][i] = new this.aggregators[null !== (_x = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _x ? _x : ts_types_1.AggregationType.SUM](null !== (_y = null == aggRule ? void 0 : aggRule.field) && void 0 !== _y ? _y : this.indicatorKeys[i], null !== (_z = null == aggRule ? void 0 : aggRule.formatFun) && void 0 !== _z ? _z : null === (_1 = null === (_0 = this.indicators) || void 0 === _0 ? void 0 : _0.find((indicator => "string" != typeof indicator && indicator.indicatorKey === this.indicatorKeys[i]))) || void 0 === _1 ? void 0 : _1.format)),
191
- this.indicatorKeys[i] in record && (null === (_3 = null === (_2 = this.totalRecordsTree[flatRowKey]) || void 0 === _2 ? void 0 : _2[flatColKey]) || void 0 === _3 || _3[i].push(record));
190
+ (null === (_q = null === (_p = this.totalRecordsTree[flatRowKey]) || void 0 === _p ? void 0 : _p[flatColKey]) || void 0 === _q ? void 0 : _q[i]) || (this.totalRecordsTree[flatRowKey][flatColKey][i] = new this.aggregators[null !== (_r = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _r ? _r : ts_types_1.AggregationType.SUM](null !== (_s = null == aggRule ? void 0 : aggRule.field) && void 0 !== _s ? _s : this.indicatorKeys[i], null !== (_t = null == aggRule ? void 0 : aggRule.formatFun) && void 0 !== _t ? _t : null === (_v = null === (_u = this.indicators) || void 0 === _u ? void 0 : _u.find((indicator => "string" != typeof indicator && indicator.indicatorKey === this.indicatorKeys[i]))) || void 0 === _v ? void 0 : _v.format)),
191
+ this.indicatorKeys[i] in record && (null === (_x = null === (_w = this.totalRecordsTree[flatRowKey]) || void 0 === _w ? void 0 : _w[flatColKey]) || void 0 === _x || _x[i].push(record));
192
192
  }
193
193
  } else {
194
194
  0 !== rowKey.length && (this.rowFlatKeys[flatRowKey] || (this.rowKeys.push(rowKey),
195
195
  this.rowFlatKeys[flatRowKey] = 1)), 0 !== colKey.length && (this.colFlatKeys[flatColKey] || (this.colKeys.push(colKey),
196
196
  this.colFlatKeys[flatColKey] = 1)), this.tree[flatRowKey] || (this.tree[flatRowKey] = {}),
197
- (null === (_4 = this.tree[flatRowKey]) || void 0 === _4 ? void 0 : _4[flatColKey]) || (this.tree[flatRowKey][flatColKey] = []);
197
+ (null === (_y = this.tree[flatRowKey]) || void 0 === _y ? void 0 : _y[flatColKey]) || (this.tree[flatRowKey][flatColKey] = []);
198
198
  for (let i = 0; i < this.indicatorKeys.length; i++) {
199
199
  const aggRule = this.getAggregatorRule(this.indicatorKeys[i]);
200
- if ((null === (_6 = null === (_5 = this.tree[flatRowKey]) || void 0 === _5 ? void 0 : _5[flatColKey]) || void 0 === _6 ? void 0 : _6[i]) || (this.tree[flatRowKey][flatColKey][i] = new this.aggregators[null !== (_7 = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _7 ? _7 : ts_types_1.AggregationType.SUM](null !== (_8 = null == aggRule ? void 0 : aggRule.field) && void 0 !== _8 ? _8 : this.indicatorKeys[i], null !== (_9 = null == aggRule ? void 0 : aggRule.formatFun) && void 0 !== _9 ? _9 : null === (_11 = null === (_10 = this.indicators) || void 0 === _10 ? void 0 : _10.find((indicator => "string" != typeof indicator && indicator.indicatorKey === this.indicatorKeys[i]))) || void 0 === _11 ? void 0 : _11.format)),
201
- assignedIndicatorKey) this.indicatorKeys[i] === assignedIndicatorKey && (null === (_13 = null === (_12 = this.tree[flatRowKey]) || void 0 === _12 ? void 0 : _12[flatColKey]) || void 0 === _13 || _13[i].push(record)); else if (null == aggRule ? void 0 : aggRule.field) if ("string" == typeof (null == aggRule ? void 0 : aggRule.field)) (null == aggRule ? void 0 : aggRule.field) in record && (null === (_15 = null === (_14 = this.tree[flatRowKey]) || void 0 === _14 ? void 0 : _14[flatColKey]) || void 0 === _15 || _15[i].push(record)); else {
202
- (null == aggRule ? void 0 : aggRule.field.find((field => field in record))) && (null === (_17 = null === (_16 = this.tree[flatRowKey]) || void 0 === _16 ? void 0 : _16[flatColKey]) || void 0 === _17 || _17[i].push(record));
203
- } else this.indicatorKeys[i] in record && (null === (_19 = null === (_18 = this.tree[flatRowKey]) || void 0 === _18 ? void 0 : _18[flatColKey]) || void 0 === _19 || _19[i].push(record));
200
+ if ((null === (_0 = null === (_z = this.tree[flatRowKey]) || void 0 === _z ? void 0 : _z[flatColKey]) || void 0 === _0 ? void 0 : _0[i]) || (this.tree[flatRowKey][flatColKey][i] = new this.aggregators[null !== (_1 = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _1 ? _1 : ts_types_1.AggregationType.SUM](null !== (_2 = null == aggRule ? void 0 : aggRule.field) && void 0 !== _2 ? _2 : this.indicatorKeys[i], null !== (_3 = null == aggRule ? void 0 : aggRule.formatFun) && void 0 !== _3 ? _3 : null === (_5 = null === (_4 = this.indicators) || void 0 === _4 ? void 0 : _4.find((indicator => "string" != typeof indicator && indicator.indicatorKey === this.indicatorKeys[i]))) || void 0 === _5 ? void 0 : _5.format)),
201
+ assignedIndicatorKey) this.indicatorKeys[i] === assignedIndicatorKey && (null === (_7 = null === (_6 = this.tree[flatRowKey]) || void 0 === _6 ? void 0 : _6[flatColKey]) || void 0 === _7 || _7[i].push(record)); else if (null == aggRule ? void 0 : aggRule.field) if ("string" == typeof (null == aggRule ? void 0 : aggRule.field)) (null == aggRule ? void 0 : aggRule.field) in record && (null === (_9 = null === (_8 = this.tree[flatRowKey]) || void 0 === _8 ? void 0 : _8[flatColKey]) || void 0 === _9 || _9[i].push(record)); else {
202
+ (null == aggRule ? void 0 : aggRule.field.find((field => field in record))) && (null === (_11 = null === (_10 = this.tree[flatRowKey]) || void 0 === _10 ? void 0 : _10[flatColKey]) || void 0 === _11 || _11[i].push(record));
203
+ } else this.indicatorKeys[i] in record && (null === (_13 = null === (_12 = this.tree[flatRowKey]) || void 0 === _12 ? void 0 : _12[flatColKey]) || void 0 === _13 || _13[i].push(record));
204
204
  }
205
205
  if (this.mappingRules) for (let i = 0; i < this.indicatorKeys.length; i++) {
206
206
  if (!this.indicatorStatistics[i]) {
@@ -208,17 +208,19 @@ class Dataset {
208
208
  this.indicatorStatistics[i] = {
209
209
  max: new this.aggregators[ts_types_1.AggregationType.MAX](this.indicatorKeys[i]),
210
210
  min: new this.aggregators[ts_types_1.AggregationType.MIN](this.indicatorKeys[i]),
211
- total: new this.aggregators[null !== (_20 = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _20 ? _20 : ts_types_1.AggregationType.SUM](null !== (_21 = null == aggRule ? void 0 : aggRule.field) && void 0 !== _21 ? _21 : this.indicatorKeys[i], null !== (_22 = null == aggRule ? void 0 : aggRule.formatFun) && void 0 !== _22 ? _22 : null === (_24 = null === (_23 = this.indicators) || void 0 === _23 ? void 0 : _23.find((indicator => "string" != typeof indicator && indicator.indicatorKey === this.indicatorKeys[i]))) || void 0 === _24 ? void 0 : _24.format)
211
+ total: new this.aggregators[null !== (_14 = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _14 ? _14 : ts_types_1.AggregationType.SUM](null !== (_15 = null == aggRule ? void 0 : aggRule.field) && void 0 !== _15 ? _15 : this.indicatorKeys[i], null !== (_16 = null == aggRule ? void 0 : aggRule.formatFun) && void 0 !== _16 ? _16 : null === (_18 = null === (_17 = this.indicators) || void 0 === _17 ? void 0 : _17.find((indicator => "string" != typeof indicator && indicator.indicatorKey === this.indicatorKeys[i]))) || void 0 === _18 ? void 0 : _18.format)
212
212
  };
213
213
  }
214
- this.indicatorStatistics[i].max.push(null === (_26 = null === (_25 = this.tree[flatRowKey]) || void 0 === _25 ? void 0 : _25[flatColKey]) || void 0 === _26 ? void 0 : _26[i].value()),
215
- this.indicatorStatistics[i].min.push(null === (_28 = null === (_27 = this.tree[flatRowKey]) || void 0 === _27 ? void 0 : _27[flatColKey]) || void 0 === _28 ? void 0 : _28[i].value()),
214
+ this.indicatorStatistics[i].max.push(null === (_20 = null === (_19 = this.tree[flatRowKey]) || void 0 === _19 ? void 0 : _19[flatColKey]) || void 0 === _20 ? void 0 : _20[i].value()),
215
+ this.indicatorStatistics[i].min.push(null === (_22 = null === (_21 = this.tree[flatRowKey]) || void 0 === _21 ? void 0 : _21[flatColKey]) || void 0 === _22 ? void 0 : _22[i].value()),
216
216
  this.indicatorStatistics[i].total.push(record);
217
217
  }
218
218
  }
219
219
  }
220
220
  updateSortRules(sortRules) {
221
- this.sorted = !1, this.sortRules = sortRules, this.sortKeys();
221
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
222
+ this.sorted = !1, this.sortRules = sortRules, this.sortKeys(), this.customRowTree || ("tree" === this.rowHierarchyType ? this.rowHeaderTree = this.ArrToTree1(this.rowKeys, this.rows, this.indicatorsAsCol ? void 0 : this.indicators, (null === (_b = null === (_a = this.totals) || void 0 === _a ? void 0 : _a.row) || void 0 === _b ? void 0 : _b.showGrandTotals) || !this.indicatorsAsCol && 0 === this.columns.length || this.indicatorsAsCol && 0 === this.rows.length, this.rowGrandTotalLabel) : this.rowHeaderTree = this.ArrToTree(this.rowKeys, this.rows, this.indicatorsAsCol ? void 0 : this.indicators, this.rowsIsTotal, (null === (_d = null === (_c = this.totals) || void 0 === _c ? void 0 : _c.row) || void 0 === _d ? void 0 : _d.showGrandTotals) || this.indicatorsAsCol && 0 === this.rows.length, this.rowGrandTotalLabel, this.rowSubTotalLabel, null !== (_g = null === (_f = null === (_e = this.totals) || void 0 === _e ? void 0 : _e.row) || void 0 === _f ? void 0 : _f.showGrandTotalsOnTop) && void 0 !== _g && _g, null !== (_k = null === (_j = null === (_h = this.totals) || void 0 === _h ? void 0 : _h.row) || void 0 === _j ? void 0 : _j.showSubTotalsOnTop) && void 0 !== _k && _k)),
223
+ this.customColTree || (this.colHeaderTree = this.ArrToTree(this.colKeys, this.columns, this.indicatorsAsCol ? this.indicators : void 0, this.colsIsTotal, (null === (_m = null === (_l = this.totals) || void 0 === _l ? void 0 : _l.column) || void 0 === _m ? void 0 : _m.showGrandTotals) || !this.indicatorsAsCol && 0 === this.columns.length, this.colGrandTotalLabel, this.colSubTotalLabel, null !== (_q = null === (_p = null === (_o = this.totals) || void 0 === _o ? void 0 : _o.column) || void 0 === _p ? void 0 : _p.showGrandTotalsOnLeft) && void 0 !== _q && _q, null !== (_t = null === (_s = null === (_r = this.totals) || void 0 === _r ? void 0 : _r.column) || void 0 === _s ? void 0 : _s.showSubTotalsOnLeft) && void 0 !== _t && _t));
222
224
  }
223
225
  updateFilterRules(filterRules, isResetTree = !1) {
224
226
  var _a;
@@ -326,17 +328,16 @@ class Dataset {
326
328
  return results;
327
329
  }.call(this);
328
330
  return function(a, b) {
329
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
331
+ var _a, _b, _c;
330
332
  let comparison, sorter;
331
333
  for (let i = 0; i < sortersArr.length; i++) {
332
334
  if (sorter = sortersArr[i], null === (_a = sorter.sortRule) || void 0 === _a ? void 0 : _a.sortByIndicator) {
333
335
  let aChanged = a, bChanged = b;
334
336
  sorter.fieldIndex < fieldArr.length - 1 && (aChanged = a.slice(0, sorter.fieldIndex + 1),
335
- aChanged.push(isRow ? null === (_c = null === (_b = that.totals) || void 0 === _b ? void 0 : _b.row) || void 0 === _c ? void 0 : _c.subTotalLabel : null === (_e = null === (_d = that.totals) || void 0 === _d ? void 0 : _d.column) || void 0 === _e ? void 0 : _e.subTotalLabel),
336
- bChanged = b.slice(0, sorter.fieldIndex + 1), bChanged.push(isRow ? null === (_g = null === (_f = that.totals) || void 0 === _f ? void 0 : _f.row) || void 0 === _g ? void 0 : _g.subTotalLabel : null === (_j = null === (_h = that.totals) || void 0 === _h ? void 0 : _h.column) || void 0 === _j ? void 0 : _j.subTotalLabel)),
337
- comparison = sorter.func(aChanged, bChanged);
338
- } else comparison = null === (_k = sorter.func) || void 0 === _k ? void 0 : _k.call(sorter, a[sorter.fieldIndex], b[sorter.fieldIndex]);
339
- if (0 !== comparison) return comparison * ((null === (_l = sorter.sortRule) || void 0 === _l ? void 0 : _l.sortType) === ts_types_1.SortType.DESC ? -1 : 1);
337
+ aChanged.push(isRow ? that.rowSubTotalLabel : that.colSubTotalLabel), bChanged = b.slice(0, sorter.fieldIndex + 1),
338
+ bChanged.push(isRow ? that.rowSubTotalLabel : that.colSubTotalLabel)), comparison = sorter.func(aChanged, bChanged);
339
+ } else comparison = null === (_b = sorter.func) || void 0 === _b ? void 0 : _b.call(sorter, a[sorter.fieldIndex], b[sorter.fieldIndex]);
340
+ if (0 !== comparison) return comparison * ((null === (_c = sorter.sortRule) || void 0 === _c ? void 0 : _c.sortType) === ts_types_1.SortType.DESC ? -1 : 1);
340
341
  }
341
342
  return 0;
342
343
  };
@@ -354,74 +355,74 @@ class Dataset {
354
355
  } : sortRule.sortBy ? (0, statistics_helper_1.sortBy)(sortRule.sortBy) : sortRule.sortType ? statistics_helper_1.typeSort : sortRule.sortFunc ? sortRule.sortFunc : statistics_helper_1.naturalSort;
355
356
  }
356
357
  totalStatistics() {
357
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
358
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
358
359
  const that = this;
359
- if ((null === (_b = null === (_a = null == that ? void 0 : that.totals) || void 0 === _a ? void 0 : _a.column) || void 0 === _b ? void 0 : _b.showSubTotals) && (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.showSubTotals) && (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)) {
360
+ if ((null === (_c = null === (_b = null === (_a = null == that ? void 0 : that.totals) || void 0 === _a ? void 0 : _a.column) || void 0 === _b ? void 0 : _b.subTotalsDimensions) || void 0 === _c ? void 0 : _c.length) >= 1 || (null === (_f = null === (_e = null === (_d = null == that ? void 0 : that.totals) || void 0 === _d ? void 0 : _d.row) || void 0 === _e ? void 0 : _e.subTotalsDimensions) || void 0 === _f ? void 0 : _f.length) >= 1 || (null === (_h = null === (_g = null == that ? void 0 : that.totals) || void 0 === _g ? void 0 : _g.column) || void 0 === _h ? void 0 : _h.showGrandTotals) || (null === (_k = null === (_j = null == that ? void 0 : that.totals) || void 0 === _j ? void 0 : _j.row) || void 0 === _k ? void 0 : _k.showGrandTotals)) {
360
361
  const rowTotalKeys = [], colCompute = (flatRowKey, flatColKey) => {
361
- 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;
362
+ 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;
362
363
  if (null === (_b = null === (_a = this.totalRecordsTree) || void 0 === _a ? void 0 : _a[flatRowKey]) || void 0 === _b ? void 0 : _b[flatColKey]) return 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]);
363
364
  const colKey = flatColKey.split(this.stringJoinChar);
364
365
  for (let i = 0, len = null === (_g = null === (_f = null === (_e = that.totals) || void 0 === _e ? void 0 : _e.column) || void 0 === _f ? void 0 : _f.subTotalsDimensions) || void 0 === _g ? void 0 : _g.length; i < len; i++) {
365
366
  const dimension = that.totals.column.subTotalsDimensions[i], dimensionIndex = that.columns.indexOf(dimension);
366
367
  if (dimensionIndex >= 0) {
367
368
  const colTotalKey = colKey.slice(0, dimensionIndex + 1);
368
- colTotalKey.push(null !== (_k = null === (_j = null === (_h = that.totals) || void 0 === _h ? void 0 : _h.column) || void 0 === _j ? void 0 : _j.subTotalLabel) && void 0 !== _k ? _k : "小计");
369
+ colTotalKey.push(that.colSubTotalLabel);
369
370
  const flatColTotalKey = colTotalKey.join(this.stringJoinChar);
370
- if (null === (_m = null === (_l = this.totalRecordsTree) || void 0 === _l ? void 0 : _l[flatRowKey]) || void 0 === _m ? void 0 : _m[flatColTotalKey]) return void (this.tree[flatRowKey][flatColTotalKey] = null === (_p = null === (_o = this.totalRecordsTree) || void 0 === _o ? void 0 : _o[flatRowKey]) || void 0 === _p ? void 0 : _p[flatColTotalKey]);
371
+ if (null === (_j = null === (_h = this.totalRecordsTree) || void 0 === _h ? void 0 : _h[flatRowKey]) || void 0 === _j ? void 0 : _j[flatColTotalKey]) return void (this.tree[flatRowKey][flatColTotalKey] = null === (_l = null === (_k = this.totalRecordsTree) || void 0 === _k ? void 0 : _k[flatRowKey]) || void 0 === _l ? void 0 : _l[flatColTotalKey]);
371
372
  this.tree[flatRowKey][flatColTotalKey] || (this.tree[flatRowKey][flatColTotalKey] = []);
372
373
  for (let i = 0; i < this.indicatorKeys.length; i++) {
373
374
  if (!this.tree[flatRowKey][flatColTotalKey][i]) {
374
375
  const aggRule = this.getAggregatorRule(this.indicatorKeys[i]);
375
- this.tree[flatRowKey][flatColTotalKey][i] = new this.aggregators[null !== (_q = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _q ? _q : ts_types_1.AggregationType.SUM](null !== (_r = null == aggRule ? void 0 : aggRule.field) && void 0 !== _r ? _r : this.indicatorKeys[i], null !== (_s = null == aggRule ? void 0 : aggRule.formatFun) && void 0 !== _s ? _s : null === (_u = null === (_t = this.indicators) || void 0 === _t ? void 0 : _t.find((indicator => "string" != typeof indicator && indicator.indicatorKey === this.indicatorKeys[i]))) || void 0 === _u ? void 0 : _u.format);
376
+ this.tree[flatRowKey][flatColTotalKey][i] = new this.aggregators[null !== (_m = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _m ? _m : ts_types_1.AggregationType.SUM](null !== (_o = null == aggRule ? void 0 : aggRule.field) && void 0 !== _o ? _o : this.indicatorKeys[i], 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 === this.indicatorKeys[i]))) || void 0 === _r ? void 0 : _r.format);
376
377
  }
377
- this.tree[flatRowKey][flatColTotalKey][i].push(null === (_w = null === (_v = that.tree[flatRowKey]) || void 0 === _v ? void 0 : _v[flatColKey]) || void 0 === _w ? void 0 : _w[i]);
378
+ this.tree[flatRowKey][flatColTotalKey][i].push(null === (_t = null === (_s = that.tree[flatRowKey]) || void 0 === _s ? void 0 : _s[flatColKey]) || void 0 === _t ? void 0 : _t[i]);
378
379
  }
379
380
  }
380
381
  }
381
- if ((null === (_y = null === (_x = that.totals) || void 0 === _x ? void 0 : _x.column) || void 0 === _y ? void 0 : _y.showGrandTotals) || 0 === this.rows.length) {
382
+ if ((null === (_v = null === (_u = that.totals) || void 0 === _u ? void 0 : _u.column) || void 0 === _v ? void 0 : _v.showGrandTotals) || 0 === this.rows.length) {
382
383
  const flatColTotalKey = that.colGrandTotalLabel;
383
- if (null === (_0 = null === (_z = this.totalRecordsTree) || void 0 === _z ? void 0 : _z[flatRowKey]) || void 0 === _0 ? void 0 : _0[flatColTotalKey]) return void (this.tree[flatRowKey][flatColTotalKey] = null === (_2 = null === (_1 = this.totalRecordsTree) || void 0 === _1 ? void 0 : _1[flatRowKey]) || void 0 === _2 ? void 0 : _2[flatColTotalKey]);
384
+ if (null === (_x = null === (_w = this.totalRecordsTree) || void 0 === _w ? void 0 : _w[flatRowKey]) || void 0 === _x ? void 0 : _x[flatColTotalKey]) return void (this.tree[flatRowKey][flatColTotalKey] = null === (_z = null === (_y = this.totalRecordsTree) || void 0 === _y ? void 0 : _y[flatRowKey]) || void 0 === _z ? void 0 : _z[flatColTotalKey]);
384
385
  this.tree[flatRowKey][flatColTotalKey] || (this.tree[flatRowKey][flatColTotalKey] = []);
385
386
  for (let i = 0; i < this.indicatorKeys.length; i++) {
386
387
  if (!this.tree[flatRowKey][flatColTotalKey][i]) {
387
388
  const aggRule = this.getAggregatorRule(this.indicatorKeys[i]);
388
- this.tree[flatRowKey][flatColTotalKey][i] = new this.aggregators[null !== (_3 = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _3 ? _3 : ts_types_1.AggregationType.SUM](null !== (_4 = null == aggRule ? void 0 : aggRule.field) && void 0 !== _4 ? _4 : this.indicatorKeys[i], null !== (_5 = null == aggRule ? void 0 : aggRule.formatFun) && void 0 !== _5 ? _5 : null === (_7 = null === (_6 = this.indicators) || void 0 === _6 ? void 0 : _6.find((indicator => "string" != typeof indicator && indicator.indicatorKey === this.indicatorKeys[i]))) || void 0 === _7 ? void 0 : _7.format);
389
+ this.tree[flatRowKey][flatColTotalKey][i] = new this.aggregators[null !== (_0 = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _0 ? _0 : ts_types_1.AggregationType.SUM](null !== (_1 = null == aggRule ? void 0 : aggRule.field) && void 0 !== _1 ? _1 : this.indicatorKeys[i], null !== (_2 = null == aggRule ? void 0 : aggRule.formatFun) && void 0 !== _2 ? _2 : null === (_4 = null === (_3 = this.indicators) || void 0 === _3 ? void 0 : _3.find((indicator => "string" != typeof indicator && indicator.indicatorKey === this.indicatorKeys[i]))) || void 0 === _4 ? void 0 : _4.format);
389
390
  }
390
- this.tree[flatRowKey][flatColTotalKey][i].push(null === (_9 = null === (_8 = that.tree[flatRowKey]) || void 0 === _8 ? void 0 : _8[flatColKey]) || void 0 === _9 ? void 0 : _9[i]);
391
+ this.tree[flatRowKey][flatColTotalKey][i].push(null === (_6 = null === (_5 = that.tree[flatRowKey]) || void 0 === _5 ? void 0 : _5[flatColKey]) || void 0 === _6 ? void 0 : _6[i]);
391
392
  }
392
393
  }
393
394
  };
394
395
  Object.keys(that.tree).forEach((flatRowKey => {
395
396
  const rowKey = flatRowKey.split(this.stringJoinChar);
396
397
  Object.keys(that.tree[flatRowKey]).forEach((flatColKey => {
397
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
398
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
398
399
  for (let i = 0, len = null === (_c = null === (_b = null === (_a = that.totals) || void 0 === _a ? void 0 : _a.row) || void 0 === _b ? void 0 : _b.subTotalsDimensions) || void 0 === _c ? void 0 : _c.length; i < len; i++) {
399
400
  const dimension = that.totals.row.subTotalsDimensions[i], dimensionIndex = that.rows.indexOf(dimension);
400
401
  if (dimensionIndex >= 0 && dimensionIndex < that.rows.length - 1) {
401
402
  const rowTotalKey = rowKey.slice(0, dimensionIndex + 1);
402
- "grid" === this.rowHierarchyType && rowTotalKey.push(null !== (_f = null === (_e = null === (_d = that.totals) || void 0 === _d ? void 0 : _d.row) || void 0 === _e ? void 0 : _e.subTotalLabel) && void 0 !== _f ? _f : "小计");
403
+ "grid" === this.rowHierarchyType && rowTotalKey.push(that.rowSubTotalLabel);
403
404
  const flatRowTotalKey = rowTotalKey.join(this.stringJoinChar);
404
405
  this.tree[flatRowTotalKey] || (this.tree[flatRowTotalKey] = {}, rowTotalKeys.push(flatRowTotalKey)),
405
406
  this.tree[flatRowTotalKey][flatColKey] || (this.tree[flatRowTotalKey][flatColKey] = []);
406
407
  for (let i = 0; i < this.indicatorKeys.length; i++) {
407
408
  if (!this.tree[flatRowTotalKey][flatColKey][i]) {
408
409
  const aggRule = this.getAggregatorRule(this.indicatorKeys[i]);
409
- this.tree[flatRowTotalKey][flatColKey][i] = new this.aggregators[null !== (_g = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _g ? _g : ts_types_1.AggregationType.SUM](null !== (_h = null == aggRule ? void 0 : aggRule.field) && void 0 !== _h ? _h : this.indicatorKeys[i], null !== (_j = null == aggRule ? void 0 : aggRule.formatFun) && void 0 !== _j ? _j : null === (_l = null === (_k = this.indicators) || void 0 === _k ? void 0 : _k.find((indicator => "string" != typeof indicator && indicator.indicatorKey === this.indicatorKeys[i]))) || void 0 === _l ? void 0 : _l.format);
410
+ this.tree[flatRowTotalKey][flatColKey][i] = new this.aggregators[null !== (_d = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _d ? _d : ts_types_1.AggregationType.SUM](null !== (_e = null == aggRule ? void 0 : aggRule.field) && void 0 !== _e ? _e : this.indicatorKeys[i], null !== (_f = null == aggRule ? void 0 : aggRule.formatFun) && void 0 !== _f ? _f : null === (_h = null === (_g = this.indicators) || void 0 === _g ? void 0 : _g.find((indicator => "string" != typeof indicator && indicator.indicatorKey === this.indicatorKeys[i]))) || void 0 === _h ? void 0 : _h.format);
410
411
  }
411
- this.tree[flatRowTotalKey][flatColKey][i].push(null === (_o = null === (_m = that.tree[flatRowKey]) || void 0 === _m ? void 0 : _m[flatColKey]) || void 0 === _o ? void 0 : _o[i]);
412
+ this.tree[flatRowTotalKey][flatColKey][i].push(null === (_k = null === (_j = that.tree[flatRowKey]) || void 0 === _j ? void 0 : _j[flatColKey]) || void 0 === _k ? void 0 : _k[i]);
412
413
  }
413
414
  }
414
415
  }
415
- if ((null === (_q = null === (_p = that.totals) || void 0 === _p ? void 0 : _p.row) || void 0 === _q ? void 0 : _q.showGrandTotals) || 0 === this.columns.length) {
416
+ if ((null === (_m = null === (_l = that.totals) || void 0 === _l ? void 0 : _l.row) || void 0 === _m ? void 0 : _m.showGrandTotals) || 0 === this.columns.length) {
416
417
  const flatRowTotalKey = that.rowGrandTotalLabel;
417
418
  this.tree[flatRowTotalKey] || (this.tree[flatRowTotalKey] = {}, rowTotalKeys.push(flatRowTotalKey)),
418
419
  this.tree[flatRowTotalKey][flatColKey] || (this.tree[flatRowTotalKey][flatColKey] = []);
419
420
  for (let i = 0; i < this.indicatorKeys.length; i++) {
420
421
  if (!this.tree[flatRowTotalKey][flatColKey][i]) {
421
422
  const aggRule = this.getAggregatorRule(this.indicatorKeys[i]);
422
- this.tree[flatRowTotalKey][flatColKey][i] = new this.aggregators[null !== (_r = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _r ? _r : ts_types_1.AggregationType.SUM](null !== (_s = null == aggRule ? void 0 : aggRule.field) && void 0 !== _s ? _s : this.indicatorKeys[i], null !== (_t = null == aggRule ? void 0 : aggRule.formatFun) && void 0 !== _t ? _t : null === (_v = null === (_u = this.indicators) || void 0 === _u ? void 0 : _u.find((indicator => "string" != typeof indicator && indicator.indicatorKey === this.indicatorKeys[i]))) || void 0 === _v ? void 0 : _v.format);
423
+ this.tree[flatRowTotalKey][flatColKey][i] = new this.aggregators[null !== (_o = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _o ? _o : ts_types_1.AggregationType.SUM](null !== (_p = null == aggRule ? void 0 : aggRule.field) && void 0 !== _p ? _p : this.indicatorKeys[i], null !== (_q = null == aggRule ? void 0 : aggRule.formatFun) && void 0 !== _q ? _q : null === (_s = null === (_r = this.indicators) || void 0 === _r ? void 0 : _r.find((indicator => "string" != typeof indicator && indicator.indicatorKey === this.indicatorKeys[i]))) || void 0 === _s ? void 0 : _s.format);
423
424
  }
424
- this.tree[flatRowTotalKey][flatColKey][i].push(null === (_x = null === (_w = that.tree[flatRowKey]) || void 0 === _w ? void 0 : _w[flatColKey]) || void 0 === _x ? void 0 : _x[i]);
425
+ this.tree[flatRowTotalKey][flatColKey][i].push(null === (_u = null === (_t = that.tree[flatRowKey]) || void 0 === _t ? void 0 : _t[flatColKey]) || void 0 === _u ? void 0 : _u[i]);
425
426
  }
426
427
  }
427
428
  colCompute(flatRowKey, flatColKey);