@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
@@ -6,7 +6,7 @@ import { AvgAggregator, CountAggregator, MaxAggregator, MinAggregator, NoneAggre
6
6
 
7
7
  export class Dataset {
8
8
  constructor(dataConfig, rows, columns, indicatorKeys, indicators, indicatorsAsCol, records, rowHierarchyType, customColTree, customRowTree, needSplitPositiveAndNegative) {
9
- 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;
9
+ 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;
10
10
  if (this.tree = {}, this.changedTree = {}, this.colFlatKeys = {}, this.rowFlatKeys = {},
11
11
  this.colKeys = [], this.rowKeys = [], this.rowOrder = "key_a_to_z", this.colOrder = "key_a_to_z",
12
12
  this.sorted = !1, this.indicatorStatistics = [], this.aggregators = {}, this.stringJoinChar = String.fromCharCode(0),
@@ -27,11 +27,11 @@ export class Dataset {
27
27
  this.needSplitPositiveAndNegative = null != needSplitPositiveAndNegative && needSplitPositiveAndNegative,
28
28
  this.rowsIsTotal = new Array(null !== (_v = null === (_u = this.rows) || void 0 === _u ? void 0 : _u.length) && void 0 !== _v ? _v : 0).fill(!1),
29
29
  this.colsIsTotal = new Array(null !== (_x = null === (_w = this.columns) || void 0 === _w ? void 0 : _w.length) && void 0 !== _x ? _x : 0).fill(!1),
30
- 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++) {
30
+ (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++) {
31
31
  const dimension = this.totals.row.subTotalsDimensions[i], dimensionIndex = this.rows.indexOf(dimension);
32
32
  this.rowsIsTotal[dimensionIndex] = !0;
33
33
  }
34
- 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++) {
34
+ 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++) {
35
35
  const dimension = this.totals.column.subTotalsDimensions[i], dimensionIndex = this.columns.indexOf(dimension);
36
36
  this.colsIsTotal[dimensionIndex] = !0;
37
37
  }
@@ -127,7 +127,7 @@ export class Dataset {
127
127
  return isReserved;
128
128
  }
129
129
  processRecord(record, assignedIndicatorKey) {
130
- 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;
130
+ 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;
131
131
  null === (_a = this.derivedFieldRules) || void 0 === _a || _a.forEach(((derivedFieldRule, i) => {
132
132
  record[derivedFieldRule.fieldName] = derivedFieldRule.derivedFunc(record);
133
133
  }));
@@ -158,7 +158,7 @@ export class Dataset {
158
158
  rowKey.push(this.rowGrandTotalLabel), isToTalRecord = !0;
159
159
  break;
160
160
  }
161
- 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) {
161
+ 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) {
162
162
  "grid" === this.rowHierarchyType && rowKey.push(this.rowSubTotalLabel), isToTalRecord = !0;
163
163
  break;
164
164
  }
@@ -167,11 +167,11 @@ export class Dataset {
167
167
  for (let n = 0, len2 = this.columns.length; n < len2; n++) {
168
168
  const colAttr = this.columns[n];
169
169
  if (colAttr in record) colKey.push(record[colAttr]); else {
170
- 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))) {
170
+ 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))) {
171
171
  colKey.push(this.colGrandTotalLabel), isToTalRecord = !0;
172
172
  break;
173
173
  }
174
- 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) {
174
+ 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) {
175
175
  colKey.push(this.colSubTotalLabel), isToTalRecord = !0;
176
176
  break;
177
177
  }
@@ -182,20 +182,20 @@ export class Dataset {
182
182
  this.totalRecordsTree[flatRowKey] || (this.totalRecordsTree[flatRowKey] = {}), this.totalRecordsTree[flatRowKey][flatColKey] || (this.totalRecordsTree[flatRowKey][flatColKey] = []);
183
183
  for (let i = 0; i < this.indicatorKeys.length; i++) {
184
184
  const aggRule = this.getAggregatorRule(this.indicatorKeys[i]);
185
- (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 : 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)),
186
- 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));
185
+ (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 : 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)),
186
+ 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));
187
187
  }
188
188
  } else {
189
189
  0 !== rowKey.length && (this.rowFlatKeys[flatRowKey] || (this.rowKeys.push(rowKey),
190
190
  this.rowFlatKeys[flatRowKey] = 1)), 0 !== colKey.length && (this.colFlatKeys[flatColKey] || (this.colKeys.push(colKey),
191
191
  this.colFlatKeys[flatColKey] = 1)), this.tree[flatRowKey] || (this.tree[flatRowKey] = {}),
192
- (null === (_4 = this.tree[flatRowKey]) || void 0 === _4 ? void 0 : _4[flatColKey]) || (this.tree[flatRowKey][flatColKey] = []);
192
+ (null === (_y = this.tree[flatRowKey]) || void 0 === _y ? void 0 : _y[flatColKey]) || (this.tree[flatRowKey][flatColKey] = []);
193
193
  for (let i = 0; i < this.indicatorKeys.length; i++) {
194
194
  const aggRule = this.getAggregatorRule(this.indicatorKeys[i]);
195
- 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 : 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)),
196
- 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 {
197
- (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));
198
- } 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));
195
+ 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 : 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)),
196
+ 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 {
197
+ (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));
198
+ } 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));
199
199
  }
200
200
  if (this.mappingRules) for (let i = 0; i < this.indicatorKeys.length; i++) {
201
201
  if (!this.indicatorStatistics[i]) {
@@ -203,17 +203,19 @@ export class Dataset {
203
203
  this.indicatorStatistics[i] = {
204
204
  max: new this.aggregators[AggregationType.MAX](this.indicatorKeys[i]),
205
205
  min: new this.aggregators[AggregationType.MIN](this.indicatorKeys[i]),
206
- total: new this.aggregators[null !== (_20 = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _20 ? _20 : 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)
206
+ total: new this.aggregators[null !== (_14 = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _14 ? _14 : 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)
207
207
  };
208
208
  }
209
- 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()),
210
- 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()),
209
+ 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()),
210
+ 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()),
211
211
  this.indicatorStatistics[i].total.push(record);
212
212
  }
213
213
  }
214
214
  }
215
215
  updateSortRules(sortRules) {
216
- this.sorted = !1, this.sortRules = sortRules, this.sortKeys();
216
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
217
+ 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)),
218
+ 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));
217
219
  }
218
220
  updateFilterRules(filterRules, isResetTree = !1) {
219
221
  var _a;
@@ -321,17 +323,16 @@ export class Dataset {
321
323
  return results;
322
324
  }.call(this);
323
325
  return function(a, b) {
324
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
326
+ var _a, _b, _c;
325
327
  let comparison, sorter;
326
328
  for (let i = 0; i < sortersArr.length; i++) {
327
329
  if (sorter = sortersArr[i], null === (_a = sorter.sortRule) || void 0 === _a ? void 0 : _a.sortByIndicator) {
328
330
  let aChanged = a, bChanged = b;
329
331
  sorter.fieldIndex < fieldArr.length - 1 && (aChanged = a.slice(0, sorter.fieldIndex + 1),
330
- 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),
331
- 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)),
332
- comparison = sorter.func(aChanged, bChanged);
333
- } else comparison = null === (_k = sorter.func) || void 0 === _k ? void 0 : _k.call(sorter, a[sorter.fieldIndex], b[sorter.fieldIndex]);
334
- if (0 !== comparison) return comparison * ((null === (_l = sorter.sortRule) || void 0 === _l ? void 0 : _l.sortType) === SortType.DESC ? -1 : 1);
332
+ aChanged.push(isRow ? that.rowSubTotalLabel : that.colSubTotalLabel), bChanged = b.slice(0, sorter.fieldIndex + 1),
333
+ bChanged.push(isRow ? that.rowSubTotalLabel : that.colSubTotalLabel)), comparison = sorter.func(aChanged, bChanged);
334
+ } else comparison = null === (_b = sorter.func) || void 0 === _b ? void 0 : _b.call(sorter, a[sorter.fieldIndex], b[sorter.fieldIndex]);
335
+ if (0 !== comparison) return comparison * ((null === (_c = sorter.sortRule) || void 0 === _c ? void 0 : _c.sortType) === SortType.DESC ? -1 : 1);
335
336
  }
336
337
  return 0;
337
338
  };
@@ -348,74 +349,74 @@ export class Dataset {
348
349
  } : sortRule.sortBy ? sortBy(sortRule.sortBy) : sortRule.sortType ? typeSort : sortRule.sortFunc ? sortRule.sortFunc : naturalSort;
349
350
  }
350
351
  totalStatistics() {
351
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
352
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
352
353
  const that = this;
353
- 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)) {
354
+ 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)) {
354
355
  const rowTotalKeys = [], colCompute = (flatRowKey, flatColKey) => {
355
- 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;
356
+ 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;
356
357
  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]);
357
358
  const colKey = flatColKey.split(this.stringJoinChar);
358
359
  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++) {
359
360
  const dimension = that.totals.column.subTotalsDimensions[i], dimensionIndex = that.columns.indexOf(dimension);
360
361
  if (dimensionIndex >= 0) {
361
362
  const colTotalKey = colKey.slice(0, dimensionIndex + 1);
362
- 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 : "小计");
363
+ colTotalKey.push(that.colSubTotalLabel);
363
364
  const flatColTotalKey = colTotalKey.join(this.stringJoinChar);
364
- 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]);
365
+ 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]);
365
366
  this.tree[flatRowKey][flatColTotalKey] || (this.tree[flatRowKey][flatColTotalKey] = []);
366
367
  for (let i = 0; i < this.indicatorKeys.length; i++) {
367
368
  if (!this.tree[flatRowKey][flatColTotalKey][i]) {
368
369
  const aggRule = this.getAggregatorRule(this.indicatorKeys[i]);
369
- this.tree[flatRowKey][flatColTotalKey][i] = new this.aggregators[null !== (_q = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _q ? _q : 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);
370
+ this.tree[flatRowKey][flatColTotalKey][i] = new this.aggregators[null !== (_m = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _m ? _m : 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);
370
371
  }
371
- 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]);
372
+ 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]);
372
373
  }
373
374
  }
374
375
  }
375
- 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) {
376
+ 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) {
376
377
  const flatColTotalKey = that.colGrandTotalLabel;
377
- 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]);
378
+ 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]);
378
379
  this.tree[flatRowKey][flatColTotalKey] || (this.tree[flatRowKey][flatColTotalKey] = []);
379
380
  for (let i = 0; i < this.indicatorKeys.length; i++) {
380
381
  if (!this.tree[flatRowKey][flatColTotalKey][i]) {
381
382
  const aggRule = this.getAggregatorRule(this.indicatorKeys[i]);
382
- this.tree[flatRowKey][flatColTotalKey][i] = new this.aggregators[null !== (_3 = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _3 ? _3 : 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);
383
+ this.tree[flatRowKey][flatColTotalKey][i] = new this.aggregators[null !== (_0 = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _0 ? _0 : 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);
383
384
  }
384
- 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]);
385
+ 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]);
385
386
  }
386
387
  }
387
388
  };
388
389
  Object.keys(that.tree).forEach((flatRowKey => {
389
390
  const rowKey = flatRowKey.split(this.stringJoinChar);
390
391
  Object.keys(that.tree[flatRowKey]).forEach((flatColKey => {
391
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
392
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
392
393
  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++) {
393
394
  const dimension = that.totals.row.subTotalsDimensions[i], dimensionIndex = that.rows.indexOf(dimension);
394
395
  if (dimensionIndex >= 0 && dimensionIndex < that.rows.length - 1) {
395
396
  const rowTotalKey = rowKey.slice(0, dimensionIndex + 1);
396
- "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 : "小计");
397
+ "grid" === this.rowHierarchyType && rowTotalKey.push(that.rowSubTotalLabel);
397
398
  const flatRowTotalKey = rowTotalKey.join(this.stringJoinChar);
398
399
  this.tree[flatRowTotalKey] || (this.tree[flatRowTotalKey] = {}, rowTotalKeys.push(flatRowTotalKey)),
399
400
  this.tree[flatRowTotalKey][flatColKey] || (this.tree[flatRowTotalKey][flatColKey] = []);
400
401
  for (let i = 0; i < this.indicatorKeys.length; i++) {
401
402
  if (!this.tree[flatRowTotalKey][flatColKey][i]) {
402
403
  const aggRule = this.getAggregatorRule(this.indicatorKeys[i]);
403
- this.tree[flatRowTotalKey][flatColKey][i] = new this.aggregators[null !== (_g = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _g ? _g : 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);
404
+ this.tree[flatRowTotalKey][flatColKey][i] = new this.aggregators[null !== (_d = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _d ? _d : 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);
404
405
  }
405
- 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]);
406
+ 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]);
406
407
  }
407
408
  }
408
409
  }
409
- 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) {
410
+ 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) {
410
411
  const flatRowTotalKey = that.rowGrandTotalLabel;
411
412
  this.tree[flatRowTotalKey] || (this.tree[flatRowTotalKey] = {}, rowTotalKeys.push(flatRowTotalKey)),
412
413
  this.tree[flatRowTotalKey][flatColKey] || (this.tree[flatRowTotalKey][flatColKey] = []);
413
414
  for (let i = 0; i < this.indicatorKeys.length; i++) {
414
415
  if (!this.tree[flatRowTotalKey][flatColKey][i]) {
415
416
  const aggRule = this.getAggregatorRule(this.indicatorKeys[i]);
416
- this.tree[flatRowTotalKey][flatColKey][i] = new this.aggregators[null !== (_r = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _r ? _r : 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);
417
+ this.tree[flatRowTotalKey][flatColKey][i] = new this.aggregators[null !== (_o = null == aggRule ? void 0 : aggRule.aggregationType) && void 0 !== _o ? _o : 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);
417
418
  }
418
- 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]);
419
+ 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]);
419
420
  }
420
421
  }
421
422
  colCompute(flatRowKey, flatColKey);