@visactor/vtable 1.22.6-alpha.3 → 1.22.7-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/cjs/PivotChart.js +2 -2
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +3 -3
- package/cjs/core/BaseTable.js +7 -7
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/dataset/dataset.js +2 -1
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/event/event.d.ts +9 -0
- package/cjs/event/event.js +158 -84
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/util.d.ts +1 -0
- package/cjs/event/util.js +13 -2
- package/cjs/event/util.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/layout/chart-helper/get-axis-config.js +7 -1
- package/cjs/layout/chart-helper/get-axis-config.js.map +1 -1
- package/cjs/layout/pivot-header-layout.js +5 -3
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/scenegraph/graphic/active-cell-chart-list.js +62 -44
- package/cjs/scenegraph/graphic/active-cell-chart-list.js.map +1 -1
- package/cjs/scenegraph/graphic/chart.js +14 -3
- package/cjs/scenegraph/graphic/chart.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render-helper.js +2 -1
- package/cjs/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render.js +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +3 -3
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +7 -2
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +456 -256
- package/dist/vtable.min.js +2 -2
- package/es/PivotChart.js +2 -2
- package/es/PivotChart.js.map +1 -1
- package/es/core/BaseTable.d.ts +3 -3
- package/es/core/BaseTable.js +7 -7
- package/es/core/BaseTable.js.map +1 -1
- package/es/dataset/dataset.js +1 -1
- package/es/dataset/dataset.js.map +1 -1
- package/es/event/event.d.ts +9 -0
- package/es/event/event.js +158 -84
- package/es/event/event.js.map +1 -1
- package/es/event/util.d.ts +1 -0
- package/es/event/util.js +11 -0
- 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/chart-helper/get-axis-config.js +7 -1
- package/es/layout/chart-helper/get-axis-config.js.map +1 -1
- package/es/layout/pivot-header-layout.js +5 -3
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/scenegraph/graphic/active-cell-chart-list.js +62 -44
- package/es/scenegraph/graphic/active-cell-chart-list.js.map +1 -1
- package/es/scenegraph/graphic/chart.js +14 -3
- package/es/scenegraph/graphic/chart.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render-helper.js +2 -1
- package/es/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render.js +1 -1
- package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/es/ts-types/base-table.d.ts +3 -3
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +7 -2
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +5 -5
package/es/core/BaseTable.d.ts
CHANGED
|
@@ -238,11 +238,11 @@ export declare abstract class BaseTable extends EventTarget implements BaseTable
|
|
|
238
238
|
rowEnd: number;
|
|
239
239
|
colEnd: number;
|
|
240
240
|
};
|
|
241
|
-
getBodyVisibleRowRange(
|
|
241
|
+
getBodyVisibleRowRange(start_deltaY?: number, end_deltaY?: number): {
|
|
242
242
|
rowStart: number;
|
|
243
243
|
rowEnd: number;
|
|
244
244
|
};
|
|
245
|
-
getBodyVisibleColRange(
|
|
245
|
+
getBodyVisibleColRange(start_deltaX?: number, end_deltaX?: number): {
|
|
246
246
|
colStart: number;
|
|
247
247
|
colEnd: number;
|
|
248
248
|
};
|
|
@@ -390,7 +390,7 @@ export declare abstract class BaseTable extends EventTarget implements BaseTable
|
|
|
390
390
|
getAllCells(colMaxCount?: number, rowMaxCount?: number): CellInfo[][];
|
|
391
391
|
getAllColumnHeaderCells(): CellInfo[][];
|
|
392
392
|
getAllRowHeaderCells(): CellInfo[][];
|
|
393
|
-
getCopyValue(): string | null;
|
|
393
|
+
getCopyValue(getCellValueFunction?: (col: number, row: number) => string | number): string | null;
|
|
394
394
|
getSelectedCellInfos(): CellInfo[][] | null;
|
|
395
395
|
getSelectedCellRanges(): CellRange[];
|
|
396
396
|
measureText(text: string, font: {
|
package/es/core/BaseTable.js
CHANGED
|
@@ -90,7 +90,7 @@ export class BaseTable extends EventTarget {
|
|
|
90
90
|
}
|
|
91
91
|
constructor(container, options = {}) {
|
|
92
92
|
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;
|
|
93
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.22.
|
|
93
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.22.7-alpha.0", this.id = `VTable${Date.now()}`,
|
|
94
94
|
this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200),
|
|
95
95
|
"node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container,
|
|
96
96
|
container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
|
|
@@ -910,15 +910,15 @@ export class BaseTable extends EventTarget {
|
|
|
910
910
|
colEnd: colEnd
|
|
911
911
|
};
|
|
912
912
|
}
|
|
913
|
-
getBodyVisibleRowRange(
|
|
914
|
-
const {scrollTop: scrollTop} = this, frozenRowsHeight = this.getFrozenRowsHeight(), bottomFrozenRowsHeight = this.getBottomFrozenRowsHeight(), {row: rowStart} = this.getRowAt(scrollTop + frozenRowsHeight + 1), rowEnd = this.getAllRowsHeight() > this.tableNoFrameHeight ? this.getRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight +
|
|
913
|
+
getBodyVisibleRowRange(start_deltaY = 0, end_deltaY = 0) {
|
|
914
|
+
const {scrollTop: scrollTop} = this, frozenRowsHeight = this.getFrozenRowsHeight(), bottomFrozenRowsHeight = this.getBottomFrozenRowsHeight(), {row: rowStart} = this.getRowAt(scrollTop + frozenRowsHeight + 1 + start_deltaY), rowEnd = this.getAllRowsHeight() > this.tableNoFrameHeight ? this.getRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight + end_deltaY).row : this.rowCount - 1;
|
|
915
915
|
return rowEnd < 0 ? null : {
|
|
916
916
|
rowStart: rowStart,
|
|
917
917
|
rowEnd: rowEnd
|
|
918
918
|
};
|
|
919
919
|
}
|
|
920
|
-
getBodyVisibleColRange(
|
|
921
|
-
const {scrollLeft: scrollLeft} = this, frozenColsWidth = this.getFrozenColsWidth(), rightFrozenColsWidth = this.getRightFrozenColsWidth(), {col: colStart} = this.getColAt(scrollLeft + frozenColsWidth + 1), colEnd = this.getAllColsWidth() > this.tableNoFrameWidth ? this.getColAt(scrollLeft + this.tableNoFrameWidth - 1 - rightFrozenColsWidth +
|
|
920
|
+
getBodyVisibleColRange(start_deltaX = 0, end_deltaX = 0) {
|
|
921
|
+
const {scrollLeft: scrollLeft} = this, frozenColsWidth = this.getFrozenColsWidth(), rightFrozenColsWidth = this.getRightFrozenColsWidth(), {col: colStart} = this.getColAt(scrollLeft + frozenColsWidth + 1 + start_deltaX), colEnd = this.getAllColsWidth() > this.tableNoFrameWidth ? this.getColAt(scrollLeft + this.tableNoFrameWidth - 1 - rightFrozenColsWidth + end_deltaX).col : this.colCount - 1;
|
|
922
922
|
return colEnd < 0 ? null : {
|
|
923
923
|
colStart: colStart,
|
|
924
924
|
colEnd: colEnd
|
|
@@ -1690,7 +1690,7 @@ export class BaseTable extends EventTarget {
|
|
|
1690
1690
|
const start_col = 0, start_row = this.columnHeaderLevelCount, end_col = this.rowHeaderLevelCount - 1, end_row = this.rowCount - 1;
|
|
1691
1691
|
return Array(end_row - start_row + 1).fill(0).map(((_, i) => Array(end_col - start_col + 1).fill(0).map(((_, j) => this.getCellInfo(j + start_col, i + start_row)))));
|
|
1692
1692
|
}
|
|
1693
|
-
getCopyValue() {
|
|
1693
|
+
getCopyValue(getCellValueFunction) {
|
|
1694
1694
|
var _a, _b, _c;
|
|
1695
1695
|
if ((null === (_b = null === (_a = this.stateManager.select) || void 0 === _a ? void 0 : _a.ranges) || void 0 === _b ? void 0 : _b.length) > 0) {
|
|
1696
1696
|
const ranges = this.stateManager.select.ranges;
|
|
@@ -1725,7 +1725,7 @@ export class BaseTable extends EventTarget {
|
|
|
1725
1725
|
copyStartCol = Math.max(rangeMinCol, cellRange.start.col), copyStartRow = Math.max(rangeMinRow, cellRange.start.row);
|
|
1726
1726
|
}
|
|
1727
1727
|
if (copyStartCol !== col || copyStartRow !== row) return "";
|
|
1728
|
-
return this.getCellValue(col, row);
|
|
1728
|
+
return getCellValueFunction ? getCellValueFunction(col, row) : this.getCellValue(col, row);
|
|
1729
1729
|
};
|
|
1730
1730
|
let copyValue = "";
|
|
1731
1731
|
for (let r = minRow; r <= maxRow; r++) {
|