@visactor/vtable 1.3.1 → 1.3.2-alpha.0

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.
package/es/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC5D,kBAAkB,EAAE,CAAC;AAErB,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,cAAc,MAAM,0BAA0B,CAAC;AAsB3D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,KAAK,YAAY,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,wDAAwD,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAK/F,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,cAAc,cAAc,CAAC;AAE7B,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC;AAI/B,OAAO,EAKL,KAAK,EACL,IAAI,EACJ,SAAS,EAET,UAAU,EAGV,UAAU,EAiBV,MAAM,EACN,IAAI,EAEJ,QAAQ,EACR,WAAW,EAEX,QAAQ,EAIR,cAAc,EACd,YAAY,EACZ,UAAU,EACV,WAAW,EACX,WAAW,EACX,wBAAwB,EACxB,kBAAkB,EACnB,CAAC;AAGF,SAAS,QAAQ;IAGf,OAAO,KAAK,CAAC,GAAG,EAAE,CAAC;AACrB,CAAC;AAED,SAAS,WAAW;IAClB,QAAQ,CAAC,QAAQ,EAAE,CAAC;AAGtB,CAAC;AACD,KAAK,CAAC,eAAe,CAAC","file":"index.js","sourcesContent":["/* eslint-disable sort-imports */\nimport { graphicUtil, registerForVrender } from './vrender';\nregisterForVrender();\n\nimport * as TYPES from './ts-types';\nimport * as core from './core';\nimport * as data from './data';\nimport * as icons from './icons';\nimport * as register from './register';\nimport * as themes from './themes';\nimport * as DataStatistics from './dataset/DataStatistics';\nimport type {\n ColumnDefine,\n ColumnsDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n ListTableConstructorOptions,\n PivotTableConstructorOptions,\n PivotChartConstructorOptions,\n IHeaderTreeDefine,\n IDimension,\n IIndicator,\n ITitleDefine,\n ICornerDefine,\n TextAlignType,\n TextBaselineType\n} from './ts-types';\nimport { ListTable } from './ListTable';\nimport { PivotTable } from './PivotTable';\nimport { PivotChart } from './PivotChart';\nimport type { MousePointerCellEvent } from './ts-types/events';\nimport * as CustomLayout from './render/layout';\n\nimport { updateCell } from './scenegraph/group-creater/cell-helper';\nimport { renderChart } from './scenegraph/graphic/contributions/chart-render-helper';\nimport { restoreMeasureText, setCustomAlphabetCharSet } from './scenegraph/utils/text-measure';\n\n// import { container, loadCanvasPicker } from '@src/vrender';\n// loadCanvasPicker(container);\n\nexport { getDataCellPath } from './tools/get-data-path';\nexport * from './render/jsx';\n\nexport const version = \"1.3.1\";\n/**\n * @namespace VTable\n */\nexport {\n /**\n * Types\n * @namespace VTable.TYPES\n */\n TYPES,\n core,\n ListTable,\n ListTableConstructorOptions,\n PivotTable,\n PivotTableConstructorOptions,\n PivotChartConstructorOptions,\n PivotChart,\n IHeaderTreeDefine,\n IDimension,\n IIndicator,\n ITitleDefine,\n ICornerDefine,\n ColumnsDefine,\n ColumnDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType,\n themes,\n data,\n MousePointerCellEvent,\n getIcons,\n clearGlobal,\n //plugin registers\n register,\n /**\n * 暂不推荐使用\n */\n DataStatistics,\n CustomLayout,\n updateCell,\n renderChart,\n graphicUtil,\n setCustomAlphabetCharSet,\n restoreMeasureText\n};\n\n/** @private */\nfunction getIcons(): {\n [key: string]: TYPES.ColumnIconOption;\n} {\n return icons.get();\n}\n/** 清理内部的全局变量 如注册的icon theme等 以及共享的header column类实例 */\nfunction clearGlobal() {\n register.clearAll();\n // headers.type.clearGlobal();\n // columns.type.clearGlobal();\n}\nTYPES.AggregationType;\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC5D,kBAAkB,EAAE,CAAC;AAErB,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,cAAc,MAAM,0BAA0B,CAAC;AAsB3D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,KAAK,YAAY,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,wDAAwD,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAK/F,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,cAAc,cAAc,CAAC;AAE7B,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC;AAIvC,OAAO,EAKL,KAAK,EACL,IAAI,EACJ,SAAS,EAET,UAAU,EAGV,UAAU,EAiBV,MAAM,EACN,IAAI,EAEJ,QAAQ,EACR,WAAW,EAEX,QAAQ,EAIR,cAAc,EACd,YAAY,EACZ,UAAU,EACV,WAAW,EACX,WAAW,EACX,wBAAwB,EACxB,kBAAkB,EACnB,CAAC;AAGF,SAAS,QAAQ;IAGf,OAAO,KAAK,CAAC,GAAG,EAAE,CAAC;AACrB,CAAC;AAED,SAAS,WAAW;IAClB,QAAQ,CAAC,QAAQ,EAAE,CAAC;AAGtB,CAAC;AACD,KAAK,CAAC,eAAe,CAAC","file":"index.js","sourcesContent":["/* eslint-disable sort-imports */\nimport { graphicUtil, registerForVrender } from './vrender';\nregisterForVrender();\n\nimport * as TYPES from './ts-types';\nimport * as core from './core';\nimport * as data from './data';\nimport * as icons from './icons';\nimport * as register from './register';\nimport * as themes from './themes';\nimport * as DataStatistics from './dataset/DataStatistics';\nimport type {\n ColumnDefine,\n ColumnsDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n ListTableConstructorOptions,\n PivotTableConstructorOptions,\n PivotChartConstructorOptions,\n IHeaderTreeDefine,\n IDimension,\n IIndicator,\n ITitleDefine,\n ICornerDefine,\n TextAlignType,\n TextBaselineType\n} from './ts-types';\nimport { ListTable } from './ListTable';\nimport { PivotTable } from './PivotTable';\nimport { PivotChart } from './PivotChart';\nimport type { MousePointerCellEvent } from './ts-types/events';\nimport * as CustomLayout from './render/layout';\n\nimport { updateCell } from './scenegraph/group-creater/cell-helper';\nimport { renderChart } from './scenegraph/graphic/contributions/chart-render-helper';\nimport { restoreMeasureText, setCustomAlphabetCharSet } from './scenegraph/utils/text-measure';\n\n// import { container, loadCanvasPicker } from '@src/vrender';\n// loadCanvasPicker(container);\n\nexport { getDataCellPath } from './tools/get-data-path';\nexport * from './render/jsx';\n\nexport const version = \"1.3.2-alpha.0\";\n/**\n * @namespace VTable\n */\nexport {\n /**\n * Types\n * @namespace VTable.TYPES\n */\n TYPES,\n core,\n ListTable,\n ListTableConstructorOptions,\n PivotTable,\n PivotTableConstructorOptions,\n PivotChartConstructorOptions,\n PivotChart,\n IHeaderTreeDefine,\n IDimension,\n IIndicator,\n ITitleDefine,\n ICornerDefine,\n ColumnsDefine,\n ColumnDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType,\n themes,\n data,\n MousePointerCellEvent,\n getIcons,\n clearGlobal,\n //plugin registers\n register,\n /**\n * 暂不推荐使用\n */\n DataStatistics,\n CustomLayout,\n updateCell,\n renderChart,\n graphicUtil,\n setCustomAlphabetCharSet,\n restoreMeasureText\n};\n\n/** @private */\nfunction getIcons(): {\n [key: string]: TYPES.ColumnIconOption;\n} {\n return icons.get();\n}\n/** 清理内部的全局变量 如注册的icon theme等 以及共享的header column类实例 */\nfunction clearGlobal() {\n register.clearAll();\n // headers.type.clearGlobal();\n // columns.type.clearGlobal();\n}\nTYPES.AggregationType;\n"]}
@@ -23,7 +23,7 @@ const defaultDimension = {
23
23
 
24
24
  export class PivotHeaderLayoutMap {
25
25
  constructor(table, dataset, columnDimensionTree, rowDimensionTree) {
26
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
26
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
27
27
  if (this.colIndex = 0, this._showHeader = !0, this.columnHeaderObjs = [], this.rowHeaderObjs = [],
28
28
  this._cornerHeaderCellFullPathIds = [], this._columnHeaderCellFullPathIds = [],
29
29
  this._rowHeaderCellFullPathIds = [], this._rowHeaderCellFullPathIds_FULL = [], this._cornerHeaderCellIds = [],
@@ -58,15 +58,15 @@ export class PivotHeaderLayoutMap {
58
58
  })), this.columnDimensionTree = columnDimensionTree, this.rowDimensionTree = rowDimensionTree,
59
59
  this.colDimensionKeys = this.columnDimensionTree.dimensionKeys.valueArr(), this.rowDimensionKeys = this.rowDimensionTree.dimensionKeys.valueArr(),
60
60
  this.fullRowDimensionKeys = this.fullRowDimensionKeys.concat(this.rowDimensionKeys),
61
- this.resetRowHeaderLevelCount(), this._generateColHeaderIds(), this.colIndex = 0,
62
- this._generateRowHeaderIds(), this._table.isPivotChart() && (this.hasTwoIndicatorAxes = this._indicators.some((indicatorObject => {
61
+ this.resetRowHeaderLevelCount(), this._table.isPivotChart() && (this.hasTwoIndicatorAxes = this.indicatorsDefine.some((indicatorObject => {
63
62
  var _a, _b;
64
63
  if (indicatorObject.chartSpec && indicatorObject.chartSpec.series && indicatorObject.chartSpec.series.length > 1) {
65
64
  const axes = null !== (_b = null !== (_a = indicatorObject.chartSpec.axes) && void 0 !== _a ? _a : this._table.pivotChartAxes) && void 0 !== _b ? _b : [];
66
65
  if (!axes.length || axes.every((axis => axis.orient !== (this.indicatorsAsCol ? "top" : "right") || !1 !== axis.visible))) return !0;
67
66
  }
68
67
  return !1;
69
- }))), this.resetColumnHeaderLevelCount(), this._rowHeaderCellFullPathIds_FULL = transpose(this._rowHeaderCellFullPathIds_FULL),
68
+ }))), this.resetColumnHeaderLevelCount(), this._generateColHeaderIds(), this.colIndex = 0,
69
+ this._generateRowHeaderIds(), this._rowHeaderCellFullPathIds_FULL = transpose(this._rowHeaderCellFullPathIds_FULL),
70
70
  "tree" === table.options.rowHierarchyType && (null === (_o = this.extensionRows) || void 0 === _o ? void 0 : _o.length) >= 1 && (this.generateExtensionRowTree(),
71
71
  this.extensionRows.forEach((extensionRow => {
72
72
  const rowKeys = [];
@@ -75,9 +75,10 @@ export class PivotHeaderLayoutMap {
75
75
  })), this._extensionRowDimensionKeys.push(rowKeys), this.fullRowDimensionKeys = this.fullRowDimensionKeys.concat(rowKeys);
76
76
  }))), this.sharedVar.seqId = Math.max(this.sharedVar.seqId, this._headerObjects.length),
77
77
  "column" === this.cornerSetting.titleOnDimension) {
78
- const colDimensionKeys = this.columnDimensionTree.dimensionKeysIncludeVirtual.valueArr();
79
- this.cornerHeaderObjs = this._addCornerHeaders(this.columnHeaderTitle ? [ "" ].concat(colDimensionKeys) : colDimensionKeys, this.columnsDefine);
80
- } else if ("row" === this.cornerSetting.titleOnDimension) if ("tree" === this.rowHierarchyType && (null === (_p = this.extensionRows) || void 0 === _p ? void 0 : _p.length) >= 1) {
78
+ let colDimensionKeys = this.columnDimensionTree.dimensionKeysIncludeVirtual.valueArr();
79
+ !this.dataset || 0 !== (null !== (_q = null === (_p = this.dataset.records) || void 0 === _p ? void 0 : _p.length) && void 0 !== _q ? _q : 0) || this.dataset.customColTree || this.dataset.customRowTree || (colDimensionKeys = this.columnsDefine.map((define => "string" == typeof define ? define : define.dimensionKey)),
80
+ this.indicatorsAsCol && colDimensionKeys.push(this.indicatorDimensionKey)), this.cornerHeaderObjs = this._addCornerHeaders(this.columnHeaderTitle ? [ "" ].concat(colDimensionKeys) : colDimensionKeys, this.columnsDefine);
81
+ } else if ("row" === this.cornerSetting.titleOnDimension) if ("tree" === this.rowHierarchyType && (null === (_r = this.extensionRows) || void 0 === _r ? void 0 : _r.length) >= 1) {
81
82
  const rowTreeFirstKey = [];
82
83
  rowTreeFirstKey.push(this.rowDimensionKeys[0]), this._extensionRowDimensionKeys.forEach((extensionRowKeys => {
83
84
  rowTreeFirstKey.push(extensionRowKeys[0]);
@@ -85,8 +86,9 @@ export class PivotHeaderLayoutMap {
85
86
  const extensionRowDimensions = this.extensionRows.reduce(((dimensions, cur) => dimensions.concat(cur.rows)), []);
86
87
  this.cornerHeaderObjs = this._addCornerHeaders(this.rowHeaderTitle ? [ "" ].concat(rowTreeFirstKey) : rowTreeFirstKey, this.rowsDefine.concat(extensionRowDimensions));
87
88
  } else {
88
- const rowDimensionKeys = this.rowDimensionTree.dimensionKeysIncludeVirtual.valueArr();
89
- this.cornerHeaderObjs = this._addCornerHeaders(this.rowHeaderTitle ? [ "" ].concat(rowDimensionKeys) : rowDimensionKeys, this.rowsDefine);
89
+ let rowDimensionKeys = this.rowDimensionTree.dimensionKeysIncludeVirtual.valueArr();
90
+ !this.dataset || 0 !== (null !== (_t = null === (_s = this.dataset.records) || void 0 === _s ? void 0 : _s.length) && void 0 !== _t ? _t : 0) || this.dataset.customColTree || this.dataset.customRowTree || (rowDimensionKeys = this.rowsDefine.map((define => "string" == typeof define ? define : define.dimensionKey)),
91
+ this.indicatorsAsCol || rowDimensionKeys.push(this.indicatorDimensionKey)), this.cornerHeaderObjs = this._addCornerHeaders(this.rowHeaderTitle ? [ "" ].concat(rowDimensionKeys) : rowDimensionKeys, this.rowsDefine);
90
92
  } else this.cornerHeaderObjs = this._addCornerHeaders(null, void 0);
91
93
  this.colIndex = 0, this._headerObjectMap = this._headerObjects.reduce(((o, e) => (o[e.id] = e,
92
94
  o)), {}), this.indicatorsAsCol && !this.hideIndicatorName ? this._indicatorShowType = "column" : this.indicatorsAsCol || this.hideIndicatorName ? this._indicatorShowType = "none" : this._indicatorShowType = "row",
@@ -135,44 +137,58 @@ export class PivotHeaderLayoutMap {
135
137
  this.leftRowSeriesNumberColumnCount = this.leftRowSeriesNumberColumn.length, this.rightRowSeriesNumberColumnCount = this.rightRowSeriesNumberColumn.length);
136
138
  }
137
139
  _generateColHeaderIds() {
138
- var _a, _b, _c, _d, _e, _f;
139
- if ((null === (_a = this.columnDimensionTree.tree.children) || void 0 === _a ? void 0 : _a.length) >= 1 && this._addHeaders(this._columnHeaderCellFullPathIds, 0, this.columnDimensionTree.tree.children, [], this.columnHeaderObjs),
140
- this.columnHeaderTitle) {
140
+ var _a, _b, _c, _d, _e, _f, _g, _h;
141
+ if ((null === (_a = this.columnDimensionTree.tree.children) || void 0 === _a ? void 0 : _a.length) >= 1) {
142
+ let startRow = 0;
143
+ if (this.dataset && 0 === (null !== (_c = null === (_b = this.dataset.records) || void 0 === _b ? void 0 : _b.length) && void 0 !== _c ? _c : 0) && !this.dataset.customColTree && !this.dataset.customRowTree && this.indicatorsAsCol && this.columnDimensionTree.totalLevel < this.columnHeaderLevelCount) {
144
+ startRow = this.columnHeaderLevelCount - this.columnDimensionTree.totalLevel;
145
+ for (let i = 0; i < startRow; i++) this._columnHeaderCellFullPathIds.unshift([]);
146
+ }
147
+ this._addHeaders(this._columnHeaderCellFullPathIds, startRow, this.columnDimensionTree.tree.children, [], this.columnHeaderObjs);
148
+ }
149
+ if (this.columnHeaderTitle) {
141
150
  this.sharedVar.seqId = Math.max(this.sharedVar.seqId, this._headerObjects.length);
142
- const id = ++this.sharedVar.seqId, firstRowIds = Array(this.colCount - this.rowHeaderLevelCount).fill(id);
151
+ const id = ++this.sharedVar.seqId, firstRowIds = Array(this.colCount - this.rowHeaderLevelCount - this.rightFrozenColCount).fill(id);
143
152
  this._columnHeaderCellFullPathIds.unshift(firstRowIds);
144
153
  const cell = {
145
154
  id: id,
146
155
  title: "string" == typeof this.columnHeaderTitle.title ? this.columnHeaderTitle.title : this.columnsDefine.reduce(((title, value) => "string" == typeof value ? title : title + (title ? `/${value.title}` : `${value.title}`)), ""),
147
156
  field: void 0,
148
- headerType: null !== (_c = null === (_b = this.columnHeaderTitle) || void 0 === _b ? void 0 : _b.headerType) && void 0 !== _c ? _c : "text",
149
- style: null === (_d = this.columnHeaderTitle) || void 0 === _d ? void 0 : _d.headerStyle,
157
+ headerType: null !== (_e = null === (_d = this.columnHeaderTitle) || void 0 === _d ? void 0 : _d.headerType) && void 0 !== _e ? _e : "text",
158
+ style: null === (_f = this.columnHeaderTitle) || void 0 === _f ? void 0 : _f.headerStyle,
150
159
  define: {
151
160
  id: id,
152
- disableHeaderHover: !!(null === (_e = this.columnHeaderTitle) || void 0 === _e ? void 0 : _e.disableHeaderHover),
153
- disableHeaderSelect: !!(null === (_f = this.columnHeaderTitle) || void 0 === _f ? void 0 : _f.disableHeaderSelect)
161
+ disableHeaderHover: !!(null === (_g = this.columnHeaderTitle) || void 0 === _g ? void 0 : _g.disableHeaderHover),
162
+ disableHeaderSelect: !!(null === (_h = this.columnHeaderTitle) || void 0 === _h ? void 0 : _h.disableHeaderSelect)
154
163
  }
155
164
  };
156
165
  this.columnHeaderObjs.push(cell), this._headerObjects[id] = cell;
157
166
  }
158
167
  }
159
168
  _generateRowHeaderIds() {
160
- var _a, _b, _c, _d, _e, _f, _g, _h;
161
- if ((null === (_a = this.rowDimensionTree.tree.children) || void 0 === _a ? void 0 : _a.length) >= 1 && ("tree" === this.rowHierarchyType ? this._addHeadersForTreeMode(this._rowHeaderCellFullPathIds_FULL, 0, this.rowDimensionTree.tree.children, [], this.rowDimensionTree.totalLevel, !0, this.rowsDefine, this.rowHeaderObjs) : this._addHeaders(this._rowHeaderCellFullPathIds_FULL, 0, this.rowDimensionTree.tree.children, [], this.rowHeaderObjs)),
162
- this.rowHeaderTitle) {
169
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
170
+ if ((null === (_a = this.rowDimensionTree.tree.children) || void 0 === _a ? void 0 : _a.length) >= 1) if ("tree" === this.rowHierarchyType) this._addHeadersForTreeMode(this._rowHeaderCellFullPathIds_FULL, 0, this.rowDimensionTree.tree.children, [], this.rowDimensionTree.totalLevel, !0, this.rowsDefine, this.rowHeaderObjs); else {
171
+ let startRow = 0;
172
+ if (this.dataset && 0 === (null !== (_c = null === (_b = this.dataset.records) || void 0 === _b ? void 0 : _b.length) && void 0 !== _c ? _c : 0) && !this.dataset.customColTree && !this.dataset.customRowTree && !this.indicatorsAsCol && this.rowDimensionTree.totalLevel < this.rowHeaderLevelCount) {
173
+ startRow = this.rowHeaderLevelCount - this.rowDimensionTree.totalLevel;
174
+ for (let i = 0; i < startRow; i++) this._rowHeaderCellFullPathIds_FULL.unshift([]);
175
+ }
176
+ this._addHeaders(this._rowHeaderCellFullPathIds_FULL, startRow, this.rowDimensionTree.tree.children, [], this.rowHeaderObjs);
177
+ }
178
+ if (this.rowHeaderTitle) {
163
179
  this.sharedVar.seqId = Math.max(this.sharedVar.seqId, this._headerObjects.length);
164
- const id = ++this.sharedVar.seqId, firstColIds = Array(null !== (_c = null === (_b = this._rowHeaderCellFullPathIds_FULL[0]) || void 0 === _b ? void 0 : _b.length) && void 0 !== _c ? _c : this.rowDimensionTree.tree.size).fill(id);
180
+ const id = ++this.sharedVar.seqId, firstColIds = Array(null !== (_e = null === (_d = this._rowHeaderCellFullPathIds_FULL[0]) || void 0 === _d ? void 0 : _d.length) && void 0 !== _e ? _e : this.rowDimensionTree.tree.size).fill(id);
165
181
  this._rowHeaderCellFullPathIds_FULL.unshift(firstColIds);
166
182
  const cell = {
167
183
  id: id,
168
184
  title: "string" == typeof this.rowHeaderTitle.title ? this.rowHeaderTitle.title : this.rowsDefine.reduce(((title, value) => "string" == typeof value ? title : title + (title ? `/${value.title}` : `${value.title}`)), ""),
169
185
  field: void 0,
170
- headerType: null !== (_e = null === (_d = this.rowHeaderTitle) || void 0 === _d ? void 0 : _d.headerType) && void 0 !== _e ? _e : "text",
171
- style: null === (_f = this.rowHeaderTitle) || void 0 === _f ? void 0 : _f.headerStyle,
186
+ headerType: null !== (_g = null === (_f = this.rowHeaderTitle) || void 0 === _f ? void 0 : _f.headerType) && void 0 !== _g ? _g : "text",
187
+ style: null === (_h = this.rowHeaderTitle) || void 0 === _h ? void 0 : _h.headerStyle,
172
188
  define: {
173
189
  id: id,
174
- disableHeaderHover: !!(null === (_g = this.rowHeaderTitle) || void 0 === _g ? void 0 : _g.disableHeaderHover),
175
- disableHeaderSelect: !!(null === (_h = this.rowHeaderTitle) || void 0 === _h ? void 0 : _h.disableHeaderSelect)
190
+ disableHeaderHover: !!(null === (_j = this.rowHeaderTitle) || void 0 === _j ? void 0 : _j.disableHeaderHover),
191
+ disableHeaderSelect: !!(null === (_k = this.rowHeaderTitle) || void 0 === _k ? void 0 : _k.disableHeaderSelect)
176
192
  }
177
193
  };
178
194
  this.rowHeaderObjs.push(cell), this._headerObjects[id] = cell;
@@ -487,17 +503,19 @@ export class PivotHeaderLayoutMap {
487
503
  return this.columnHeaderLevelCount;
488
504
  }
489
505
  resetColumnHeaderLevelCount() {
490
- var _a, _b, _c, _d;
506
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
491
507
  if (this.showHeader && this.showColumnHeader) {
492
508
  if (this._table.isPivotChart() && this.indicatorsAsCol && !(null === (_b = null === (_a = this.dataset) || void 0 === _a ? void 0 : _a.colKeys) || void 0 === _b ? void 0 : _b.length) && 0 === (null === (_d = null === (_c = this.columnDimensionTree) || void 0 === _c ? void 0 : _c.tree) || void 0 === _d ? void 0 : _d.level) && !this.hasTwoIndicatorAxes) return void (this.columnHeaderLevelCount = 0);
493
509
  let count = this.indicatorsAsCol && this.hideIndicatorName && this.colDimensionKeys[this.colDimensionKeys.length - 1] === this.indicatorDimensionKey ? this.columnDimensionTree.totalLevel - 1 : this.columnDimensionTree.totalLevel;
494
510
  return this.columnHeaderTitle && (count += 1), this._table.isPivotChart() && this.indicatorsAsCol && !this.hasTwoIndicatorAxes && checkHasCartesianChart(this.indicatorsDefine) && (count -= 1),
511
+ 0 !== count || !this.dataset || this.dataset.customColTree || this.dataset.customRowTree ? !this.dataset || 0 !== (null !== (_j = null === (_h = this.dataset.records) || void 0 === _h ? void 0 : _h.length) && void 0 !== _j ? _j : 0) || this.dataset.customColTree || this.dataset.customRowTree || "column" === this.cornerSetting.titleOnDimension && (count = null !== (_k = this.columnsDefine.length) && void 0 !== _k ? _k : 0,
512
+ !this.hideIndicatorName && this.indicatorsAsCol && count++) : "row" === this.cornerSetting.titleOnDimension ? count = 1 : 0 === (null !== (_f = null === (_e = this.dataset.records) || void 0 === _e ? void 0 : _e.length) && void 0 !== _f ? _f : 0) && "column" === this.cornerSetting.titleOnDimension && (count = null !== (_g = this.columnsDefine.length) && void 0 !== _g ? _g : 0),
495
513
  void (this.columnHeaderLevelCount = count);
496
514
  }
497
515
  this.columnHeaderLevelCount = this.indicatorsAsCol ? this.hideIndicatorName ? 0 : 1 : 0;
498
516
  }
499
517
  resetRowHeaderLevelCount() {
500
- var _a, _b;
518
+ var _a, _b, _c, _d, _e, _f, _g;
501
519
  if (this.showHeader && this.showRowHeader) {
502
520
  if ("tree" === this.rowHierarchyType) {
503
521
  const extensionRowCount = null !== (_b = null === (_a = this.extensionRows) || void 0 === _a ? void 0 : _a.length) && void 0 !== _b ? _b : 0;
@@ -506,7 +524,9 @@ export class PivotHeaderLayoutMap {
506
524
  const rowLevelCount = this.rowDimensionTree.totalLevel;
507
525
  let count = rowLevelCount;
508
526
  return this.indicatorsAsCol || this.hideIndicatorName && this.rowDimensionKeys[this.rowDimensionKeys.length - 1] === this.indicatorDimensionKey && (count = rowLevelCount - 1),
509
- this.rowHeaderTitle && (count += 1), void (this.rowHeaderLevelCount = count);
527
+ this.rowHeaderTitle && (count += 1), 0 !== count || !this.dataset || this.dataset.customColTree || this.dataset.customRowTree ? !this.dataset || 0 !== (null !== (_g = null === (_f = this.dataset.records) || void 0 === _f ? void 0 : _f.length) && void 0 !== _g ? _g : 0) || this.dataset.customColTree || this.dataset.customRowTree || "row" === this.cornerSetting.titleOnDimension && (count = this.rowsDefine.length,
528
+ this.hideIndicatorName || this.indicatorsAsCol || count++) : "column" === this.cornerSetting.titleOnDimension ? count = 1 : 0 === (null !== (_d = null === (_c = this.dataset.records) || void 0 === _c ? void 0 : _c.length) && void 0 !== _d ? _d : 0) && "row" === this.cornerSetting.titleOnDimension && (count = null !== (_e = this.rowsDefine.length) && void 0 !== _e ? _e : 0),
529
+ void (this.rowHeaderLevelCount = count);
510
530
  }
511
531
  this.rowHeaderLevelCount = this.indicatorsAsCol || this.hideIndicatorName ? 0 : 1;
512
532
  }
@@ -560,14 +580,14 @@ export class PivotHeaderLayoutMap {
560
580
  return this._indicators;
561
581
  }
562
582
  getCellId(col, row) {
563
- var _a, _b;
583
+ var _a, _b, _c, _d, _e;
564
584
  if (row >= 0 && col >= 0) {
565
585
  if (this.isSeriesNumber(col, row)) return "";
566
- if (this.isCornerHeader(col, row)) return this._cornerHeaderCellIds[row][col - this.leftRowSeriesNumberColumnCount];
567
- if (this.isColumnHeader(col, row)) return this._columnHeaderCellIds[row][col - this.rowHeaderLevelCount - this.leftRowSeriesNumberColumnCount];
568
- if (this.isRowHeader(col, row)) return null === (_a = this._rowHeaderCellIds[row - this.columnHeaderLevelCount]) || void 0 === _a ? void 0 : _a[col - this.leftRowSeriesNumberColumnCount];
569
- if (this.isRightFrozenColumn(col, row)) return this._rowHeaderCellIds[row - this.columnHeaderLevelCount][this.rowHeaderLevelCount - 1];
570
- if (this.isBottomFrozenRow(col, row)) return null === (_b = this._columnHeaderCellIds[this.columnHeaderLevelCount - 1]) || void 0 === _b ? void 0 : _b[col - this.rowHeaderLevelCount - this.leftRowSeriesNumberColumnCount];
586
+ if (this.isCornerHeader(col, row)) return null === (_a = this._cornerHeaderCellIds[row]) || void 0 === _a ? void 0 : _a[col - this.leftRowSeriesNumberColumnCount];
587
+ if (this.isColumnHeader(col, row)) return null === (_b = this._columnHeaderCellIds[row]) || void 0 === _b ? void 0 : _b[col - this.rowHeaderLevelCount - this.leftRowSeriesNumberColumnCount];
588
+ if (this.isRowHeader(col, row)) return null === (_c = this._rowHeaderCellIds[row - this.columnHeaderLevelCount]) || void 0 === _c ? void 0 : _c[col - this.leftRowSeriesNumberColumnCount];
589
+ if (this.isRightFrozenColumn(col, row)) return null === (_d = this._rowHeaderCellIds[row - this.columnHeaderLevelCount]) || void 0 === _d ? void 0 : _d[this.rowHeaderLevelCount - 1];
590
+ if (this.isBottomFrozenRow(col, row)) return null === (_e = this._columnHeaderCellIds[this.columnHeaderLevelCount - 1]) || void 0 === _e ? void 0 : _e[col - this.rowHeaderLevelCount - this.leftRowSeriesNumberColumnCount];
571
591
  }
572
592
  }
573
593
  getHeader(col, row) {
@@ -1393,8 +1413,8 @@ export class PivotHeaderLayoutMap {
1393
1413
  const dataset = this.dataset;
1394
1414
  this.rowTree = dataset.rowHeaderTree, this.columnTree = dataset.colHeaderTree, this.columnDimensionTree = new DimensionTree(null !== (_a = this.columnTree) && void 0 !== _a ? _a : [], this.sharedVar),
1395
1415
  this.rowDimensionTree = new DimensionTree(null !== (_b = this.rowTree) && void 0 !== _b ? _b : [], this.sharedVar, this.rowHierarchyType, "tree" === this.rowHierarchyType ? this.rowExpandLevel : void 0),
1396
- this._generateColHeaderIds(), this.colIndex = 0, this._generateRowHeaderIds(), this.resetColumnHeaderLevelCount(),
1397
- this._rowHeaderCellFullPathIds_FULL = transpose(this._rowHeaderCellFullPathIds_FULL),
1416
+ this.resetColumnHeaderLevelCount(), this._generateColHeaderIds(), this.colIndex = 0,
1417
+ this._generateRowHeaderIds(), this._rowHeaderCellFullPathIds_FULL = transpose(this._rowHeaderCellFullPathIds_FULL),
1398
1418
  this._headerObjectMap = this._headerObjects.reduce(((o, e) => (o[e.id] = e, o)), {}),
1399
1419
  this._CellHeaderPathMap = new Map, this._largeCellRangeCache.length = 0, this.generateCellIdsConsiderHideHeader(),
1400
1420
  this.setPagination(this.pagination);