@visactor/vtable 1.3.2-alpha.1 → 1.3.2
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/cjs/PivotChart.d.ts +0 -1
- package/cjs/PivotChart.js +0 -4
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/components/axis/axis.js +2 -3
- package/cjs/components/axis/axis.js.map +1 -1
- package/cjs/components/empty-tip/empty-tip.js +2 -2
- package/cjs/components/empty-tip/empty-tip.js.map +1 -1
- package/cjs/components/legend/discrete-legend/discrete-legend.js +1 -2
- package/cjs/components/legend/discrete-legend/discrete-legend.js.map +1 -1
- package/cjs/components/tooltip/TooltipHandler.js +1 -3
- package/cjs/components/tooltip/TooltipHandler.js.map +1 -1
- package/cjs/components/tooltip/logic/BubbleTooltipElement.js +7 -3
- package/cjs/components/tooltip/logic/BubbleTooltipElement.js.map +1 -1
- package/cjs/components/tooltip/logic/BubbleTooltipElementStyle.js +1 -1
- package/cjs/components/tooltip/logic/BubbleTooltipElementStyle.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +2 -4
- package/cjs/core/BaseTable.js +197 -62
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/FouseInput.d.ts +0 -1
- package/cjs/core/FouseInput.js +2 -5
- package/cjs/core/FouseInput.js.map +1 -1
- package/cjs/dataset/dataset.d.ts +2 -0
- package/cjs/dataset/dataset.js +8 -7
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/event/event.js +1 -2
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/container-dom.js +1 -1
- package/cjs/event/listener/container-dom.js.map +1 -1
- package/cjs/event/listener/table-group.js +5 -3
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/event/util.js +2 -2
- package/cjs/event/util.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +2 -2
- package/cjs/index.js.map +1 -1
- package/cjs/layout/layout-helper.js.map +1 -1
- package/cjs/layout/pivot-header-layout.js +57 -37
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/scenegraph/debug-tool/debug-tool.js +1 -4
- package/cjs/scenegraph/debug-tool/debug-tool.js.map +1 -1
- package/cjs/scenegraph/graphic/chart.d.ts +0 -1
- package/cjs/scenegraph/graphic/chart.js +20 -34
- package/cjs/scenegraph/graphic/chart.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render-helper.js +8 -20
- package/cjs/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render.d.ts +1 -2
- package/cjs/scenegraph/graphic/contributions/chart-render.js +24 -40
- package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +1 -2
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/cjs/scenegraph/layout/update-width.js +3 -0
- package/cjs/scenegraph/layout/update-width.js.map +1 -1
- package/cjs/scenegraph/refresh-node/update-chart.d.ts +0 -1
- package/cjs/scenegraph/refresh-node/update-chart.js +2 -9
- package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js +4 -10
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/state/state.js +1 -1
- package/cjs/themes/component.js +1 -1
- package/cjs/themes/theme.js +6 -0
- package/cjs/themes/theme.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +4 -15
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/icon.d.ts +2 -0
- package/cjs/ts-types/icon.js.map +1 -1
- package/cjs/ts-types/theme.d.ts +2 -0
- package/cjs/ts-types/theme.js.map +1 -1
- package/cjs/ts-types/tooltip.d.ts +2 -0
- package/cjs/ts-types/tooltip.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +545 -536
- package/dist/vtable.min.js +2 -2
- package/es/PivotChart.d.ts +0 -1
- package/es/PivotChart.js +2 -5
- package/es/PivotChart.js.map +1 -1
- package/es/components/axis/axis.js +1 -3
- package/es/components/axis/axis.js.map +1 -1
- package/es/components/empty-tip/empty-tip.js +2 -2
- package/es/components/empty-tip/empty-tip.js.map +1 -1
- package/es/components/legend/discrete-legend/discrete-legend.js +1 -2
- package/es/components/legend/discrete-legend/discrete-legend.js.map +1 -1
- package/es/components/tooltip/TooltipHandler.js +1 -3
- package/es/components/tooltip/TooltipHandler.js.map +1 -1
- package/es/components/tooltip/logic/BubbleTooltipElement.js +7 -3
- package/es/components/tooltip/logic/BubbleTooltipElement.js.map +1 -1
- package/es/components/tooltip/logic/BubbleTooltipElementStyle.js +1 -1
- package/es/components/tooltip/logic/BubbleTooltipElementStyle.js.map +1 -1
- package/es/core/BaseTable.d.ts +2 -4
- package/es/core/BaseTable.js +196 -63
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/FouseInput.d.ts +0 -1
- package/es/core/FouseInput.js +2 -5
- package/es/core/FouseInput.js.map +1 -1
- package/es/dataset/dataset.d.ts +2 -0
- package/es/dataset/dataset.js +8 -7
- package/es/dataset/dataset.js.map +1 -1
- package/es/event/event.js +1 -2
- package/es/event/event.js.map +1 -1
- package/es/event/listener/container-dom.js +1 -1
- package/es/event/listener/container-dom.js.map +1 -1
- package/es/event/listener/table-group.js +5 -3
- package/es/event/listener/table-group.js.map +1 -1
- package/es/event/util.js +2 -2
- package/es/event/util.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/layout/layout-helper.js.map +1 -1
- package/es/layout/pivot-header-layout.js +56 -36
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/scenegraph/debug-tool/debug-tool.js +1 -4
- package/es/scenegraph/debug-tool/debug-tool.js.map +1 -1
- package/es/scenegraph/graphic/chart.d.ts +0 -1
- package/es/scenegraph/graphic/chart.js +21 -33
- package/es/scenegraph/graphic/chart.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render-helper.js +8 -20
- package/es/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render.d.ts +1 -2
- package/es/scenegraph/graphic/contributions/chart-render.js +25 -41
- package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.js +1 -2
- package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/es/scenegraph/layout/update-width.js +3 -0
- package/es/scenegraph/layout/update-width.js.map +1 -1
- package/es/scenegraph/refresh-node/update-chart.d.ts +0 -1
- package/es/scenegraph/refresh-node/update-chart.js +0 -6
- package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/es/scenegraph/scenegraph.js +4 -10
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/state/state.js +1 -1
- package/es/themes/component.js +1 -1
- package/es/themes/theme.js +6 -0
- package/es/themes/theme.js.map +1 -1
- package/es/ts-types/base-table.d.ts +4 -15
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/icon.d.ts +2 -0
- package/es/ts-types/icon.js.map +1 -1
- package/es/ts-types/theme.d.ts +2 -0
- package/es/ts-types/theme.js.map +1 -1
- package/es/ts-types/tooltip.d.ts +2 -0
- package/es/ts-types/tooltip.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +5 -5
- package/cjs/core/utils/get-cell-position.d.ts +0 -42
- package/cjs/core/utils/get-cell-position.js +0 -204
- package/cjs/core/utils/get-cell-position.js.map +0 -1
- package/es/core/utils/get-cell-position.d.ts +0 -42
- package/es/core/utils/get-cell-position.js +0 -192
- package/es/core/utils/get-cell-position.js.map +0 -1
package/es/core/FouseInput.d.ts
CHANGED
package/es/core/FouseInput.js
CHANGED
|
@@ -8,7 +8,7 @@ export class FocusInput extends EventTarget {
|
|
|
8
8
|
div.classList.add("input-container");
|
|
9
9
|
const input = this._input = document.createElement("input");
|
|
10
10
|
div.appendChild(input), input.classList.add("table-focus-control"), input.dataset.vtable = "vtable",
|
|
11
|
-
input.readOnly = !0, parentElement.appendChild(div)
|
|
11
|
+
input.readOnly = !0, parentElement.appendChild(div);
|
|
12
12
|
}
|
|
13
13
|
focus() {
|
|
14
14
|
this._input.focus({
|
|
@@ -25,9 +25,6 @@ export class FocusInput extends EventTarget {
|
|
|
25
25
|
get input() {
|
|
26
26
|
return this._input;
|
|
27
27
|
}
|
|
28
|
-
release() {
|
|
29
|
-
var _a;
|
|
30
|
-
null === (_a = this._container.parentElement) || void 0 === _a || _a.removeChild(this._container);
|
|
31
|
-
}
|
|
28
|
+
release() {}
|
|
32
29
|
}
|
|
33
30
|
//# sourceMappingURL=FouseInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/core/FouseInput.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAEnC,MAAM,OAAO,UAAW,SAAQ,WAAW;
|
|
1
|
+
{"version":3,"sources":["../src/core/FouseInput.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AAEnC,MAAM,OAAO,UAAW,SAAQ,WAAW;IAGzC,YAAY,KAAgB,EAAE,aAA0B;QACtD,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,GAAG,CAAC,IAAI,KAAK,MAAM,EAAE;YACvB,OAAO;SACR;QACD,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAE1C,GAAG,CAAC,KAAK,CAAC,OAAO,GAAG,GAAG,CAAC;QACxB,GAAG,CAAC,OAAO,CAAC,MAAM,GAAG,QAAQ,CAAC;QAC9B,GAAG,CAAC,KAAK,CAAC,aAAa,GAAG,MAAM,CAAC;QACjC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;QACrC,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC;QAC9D,GAAG,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QACvB,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;QAC3C,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,QAAQ,CAAC;QAChC,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC;QACtB,aAAa,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACjC,CAAC;IAED,KAAK;QACH,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7C,CAAC;IACD,YAAY,CAAC,IAAU,EAAE,KAAa;QACpC,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;QAEpB,KAAK,CAAC,MAAM,EAAE,CAAC;QACf,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;QAC7C,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC;QAChD,KAAK,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC;QACvC,KAAK,CAAC,KAAK,CAAC,IAAI,GAAG,GAAG,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC;QACzC,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC;QAChD,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC;IACpD,CAAC;IACD,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IACD,OAAO;IAEP,CAAC;CACF","file":"FouseInput.js","sourcesContent":["import type { BaseTable } from '../core';\nimport type { Rect } from '../tools/Rect';\nimport { Env } from '../tools/env';\n\nexport class FocusInput extends EventTarget {\n private _table: BaseTable;\n private _input: HTMLInputElement;\n constructor(table: BaseTable, parentElement: HTMLElement) {\n super();\n this._table = table;\n if (Env.mode === 'node') {\n return;\n }\n const div = document.createElement('div'); //再加一层 C360插件逻辑中用的window.getSelection()来判断的滚动\n // div.style.position = 'fixed';//定位不能使用fixed 在父级transform非none的时候 都会有问题\n div.style.opacity = '0';\n div.dataset.vtable = 'vtable'; //这里不能变 C360取元素的依据\n div.style.pointerEvents = 'none';\n div.classList.add('input-container');\n const input = (this._input = document.createElement('input'));\n div.appendChild(input);\n input.classList.add('table-focus-control');\n input.dataset.vtable = 'vtable';\n input.readOnly = true;\n parentElement.appendChild(div);\n }\n\n focus(): void {\n this._input.focus({ preventScroll: true });\n }\n setFocusRect(rect: Rect, value: string): void {\n const input = this._input;\n input.value = value;\n // input.focus({ preventScroll: true });\n input.select();\n const top = rect.top - this._table.scrollTop;\n const left = rect.left - this._table.scrollLeft;\n input.style.top = `${top.toFixed()}px`;\n input.style.left = `${left.toFixed()}px`;\n input.style.width = `${rect.width.toFixed()}px`;\n input.style.height = `${rect.height.toFixed()}px`;\n }\n get input(): HTMLInputElement {\n return this._input;\n }\n release(): void {\n // document.removeChild(this._input);\n }\n}\n"]}
|
package/es/dataset/dataset.d.ts
CHANGED
|
@@ -41,7 +41,9 @@ export declare class Dataset {
|
|
|
41
41
|
collectedValues: Record<string, Record<string, CollectedValue>>;
|
|
42
42
|
cacheCollectedValues: Record<string, Record<string, CollectedValue>>;
|
|
43
43
|
rows: string[];
|
|
44
|
+
rowsHasValue: boolean[];
|
|
44
45
|
columns: string[];
|
|
46
|
+
columnsHasValue: boolean[];
|
|
45
47
|
indicatorKeys: string[];
|
|
46
48
|
customRowTree?: IHeaderTreeDefine[];
|
|
47
49
|
customColTree?: IHeaderTreeDefine[];
|
package/es/dataset/dataset.js
CHANGED
|
@@ -43,7 +43,8 @@ export class Dataset {
|
|
|
43
43
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
44
44
|
if (this.records = records, this.collectedValues = {}, this.cacheCollectedValues = {},
|
|
45
45
|
this.totalRecordsTree = {}, this.tree = {}, this.colFlatKeys = {}, this.rowFlatKeys = {},
|
|
46
|
-
this.colKeys = [], this.rowKeys = [],
|
|
46
|
+
this.colKeys = [], this.rowKeys = [], this.rowsHasValue = [], this.columnsHasValue = [],
|
|
47
|
+
records) {
|
|
47
48
|
this.records = records;
|
|
48
49
|
"undefined" != typeof window && window.performance.now();
|
|
49
50
|
this.processRecords(), this.processCollectedValuesWithSumBy(), this.generateCollectedValuesSortRule(),
|
|
@@ -53,8 +54,8 @@ export class Dataset {
|
|
|
53
54
|
"undefined" != typeof window && window.performance.now(), "undefined" != typeof window && window.performance.now();
|
|
54
55
|
this.sortKeys();
|
|
55
56
|
"undefined" != typeof window && window.performance.now(), "undefined" != typeof window && window.performance.now();
|
|
56
|
-
this.customRowTree ? this.rowHeaderTree = 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),
|
|
57
|
-
this.customColTree ? this.colHeaderTree = 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);
|
|
57
|
+
this.customRowTree ? this.rowHeaderTree = this.customRowTree : "tree" === this.rowHierarchyType ? this.rowHeaderTree = this.ArrToTree1(this.rowKeys, this.rows.filter(((key, index) => this.rowsHasValue[index])), 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.filter(((key, index) => this.rowsHasValue[index])), 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),
|
|
58
|
+
this.customColTree ? this.colHeaderTree = this.customColTree : this.colHeaderTree = this.ArrToTree(this.colKeys, this.columns.filter(((key, index) => this.columnsHasValue[index])), 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);
|
|
58
59
|
"undefined" != typeof window && window.performance.now();
|
|
59
60
|
(null === (_u = this.dataConfig) || void 0 === _u ? void 0 : _u.isPivotChart) && this.cacheDeminsionCollectedValues();
|
|
60
61
|
}
|
|
@@ -158,7 +159,7 @@ export class Dataset {
|
|
|
158
159
|
let isToTalRecord = !1;
|
|
159
160
|
for (let l = 0, len1 = this.rows.length; l < len1; l++) {
|
|
160
161
|
const rowAttr = this.rows[l];
|
|
161
|
-
if (rowAttr in record) rowKey.push(record[rowAttr]); else if (rowAttr !== IndicatorDimensionKeyPlaceholder) {
|
|
162
|
+
if (rowAttr in record) this.rowsHasValue[l] = !0, rowKey.push(record[rowAttr]); else if (rowAttr !== IndicatorDimensionKeyPlaceholder) {
|
|
162
163
|
if ((null === (_d = null === (_c = null === (_b = this.dataConfig) || void 0 === _b ? void 0 : _b.totals) || void 0 === _c ? void 0 : _c.row) || void 0 === _d ? void 0 : _d.showGrandTotals) && 0 === l && !this.rows.find((rk => rk in record))) {
|
|
163
164
|
rowKey.push(this.rowGrandTotalLabel), isToTalRecord = !0;
|
|
164
165
|
break;
|
|
@@ -171,7 +172,7 @@ export class Dataset {
|
|
|
171
172
|
}
|
|
172
173
|
for (let n = 0, len2 = this.columns.length; n < len2; n++) {
|
|
173
174
|
const colAttr = this.columns[n];
|
|
174
|
-
if (colAttr in record) colKey.push(record[colAttr]); else if (colAttr !== IndicatorDimensionKeyPlaceholder) {
|
|
175
|
+
if (colAttr in record) this.columnsHasValue[n] = !0, colKey.push(record[colAttr]); else if (colAttr !== IndicatorDimensionKeyPlaceholder) {
|
|
175
176
|
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))) {
|
|
176
177
|
colKey.push(this.colGrandTotalLabel), isToTalRecord = !0;
|
|
177
178
|
break;
|
|
@@ -221,8 +222,8 @@ export class Dataset {
|
|
|
221
222
|
}
|
|
222
223
|
updateSortRules(sortRules) {
|
|
223
224
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
224
|
-
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)),
|
|
225
|
-
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));
|
|
225
|
+
this.sorted = !1, this.sortRules = sortRules, this.sortKeys(), this.customRowTree || ("tree" === this.rowHierarchyType ? this.rowHeaderTree = this.ArrToTree1(this.rowKeys, this.rows.filter(((key, index) => this.rowsHasValue[index])), 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.filter(((key, index) => this.rowsHasValue[index])), 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)),
|
|
226
|
+
this.customColTree || (this.colHeaderTree = this.ArrToTree(this.colKeys, this.columns.filter(((key, index) => this.columnsHasValue[index])), 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));
|
|
226
227
|
}
|
|
227
228
|
updateFilterRules(filterRules, isResetTree = !1) {
|
|
228
229
|
var _a;
|