k-vtable 1.0.36 → 1.0.37
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/ListTable.d.ts +1 -0
- package/cjs/ListTable.js +11 -1
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotTable.js +12 -6
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/core/BaseTable.js +11 -9
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/event/event.js +3 -1
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/table-group.js +52 -52
- package/cjs/event/listener/table-group.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/pivot-header-layout.d.ts +2 -2
- package/cjs/layout/simple-header-layout.js +7 -7
- package/cjs/layout/simple-header-layout.js.map +1 -1
- package/cjs/plugins/list-tree-stick-cell.js +29 -3
- package/cjs/plugins/list-tree-stick-cell.js.map +1 -1
- package/cjs/scenegraph/component/custom.js +2 -2
- package/cjs/scenegraph/component/custom.js.map +1 -1
- package/cjs/scenegraph/component/table-component.js +41 -50
- package/cjs/scenegraph/component/table-component.js.map +1 -1
- package/cjs/scenegraph/component/util.d.ts +1 -0
- package/cjs/scenegraph/component/util.js +9 -3
- package/cjs/scenegraph/component/util.js.map +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
- package/cjs/scenegraph/layout/frozen.js +7 -3
- package/cjs/scenegraph/layout/frozen.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js +5 -3
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/utils/padding.d.ts +5 -2
- package/cjs/scenegraph/utils/padding.js +16 -13
- package/cjs/scenegraph/utils/padding.js.map +1 -1
- package/cjs/state/state.js +15 -15
- package/cjs/state/state.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +256 -125
- package/dist/vtable.min.js +1 -1
- package/es/ListTable.d.ts +1 -0
- package/es/ListTable.js +11 -1
- package/es/ListTable.js.map +1 -1
- package/es/PivotTable.js +12 -6
- package/es/PivotTable.js.map +1 -1
- package/es/core/BaseTable.js +11 -9
- package/es/core/BaseTable.js.map +1 -1
- package/es/event/event.js +3 -1
- package/es/event/event.js.map +1 -1
- package/es/event/listener/table-group.js +52 -52
- package/es/event/listener/table-group.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/pivot-header-layout.d.ts +2 -2
- package/es/layout/simple-header-layout.js +7 -7
- package/es/layout/simple-header-layout.js.map +1 -1
- package/es/plugins/list-tree-stick-cell.js +32 -2
- package/es/plugins/list-tree-stick-cell.js.map +1 -1
- package/es/scenegraph/component/custom.js +2 -2
- package/es/scenegraph/component/custom.js.map +1 -1
- package/es/scenegraph/component/table-component.js +41 -51
- package/es/scenegraph/component/table-component.js.map +1 -1
- package/es/scenegraph/component/util.d.ts +1 -0
- package/es/scenegraph/component/util.js +6 -0
- package/es/scenegraph/component/util.js.map +1 -1
- package/es/scenegraph/layout/compute-col-width.js +1 -1
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.js +1 -1
- package/es/scenegraph/layout/compute-row-height.js.map +1 -1
- package/es/scenegraph/layout/frozen.js +7 -3
- package/es/scenegraph/layout/frozen.js.map +1 -1
- package/es/scenegraph/scenegraph.js +5 -3
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/utils/padding.d.ts +5 -2
- package/es/scenegraph/utils/padding.js +13 -9
- package/es/scenegraph/utils/padding.js.map +1 -1
- package/es/state/state.js +15 -13
- package/es/state/state.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +2 -2
package/es/core/BaseTable.js
CHANGED
|
@@ -92,7 +92,7 @@ export class BaseTable extends EventTarget {
|
|
|
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
93
|
if (super(), this.showFrozenIcon = !0, this._scrollToRowCorrectTimer = null, this._tableBorderWidth_left = 0,
|
|
94
94
|
this._tableBorderWidth_right = 0, this._tableBorderWidth_top = 0, this._tableBorderWidth_bottom = 0,
|
|
95
|
-
this.version = "1.0.
|
|
95
|
+
this.version = "1.0.37", this.id = `VTable${Date.now()}`, this.isReleased = !1,
|
|
96
96
|
this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200),
|
|
97
97
|
"undefined" != typeof window) {
|
|
98
98
|
const g = window;
|
|
@@ -945,7 +945,8 @@ export class BaseTable extends EventTarget {
|
|
|
945
945
|
return count;
|
|
946
946
|
}
|
|
947
947
|
getBodyVisibleCellRange() {
|
|
948
|
-
|
|
948
|
+
var _a, _b, _c, _d;
|
|
949
|
+
const {scrollTop: scrollTop, scrollLeft: scrollLeft} = this, frozenColsContentWidth = this.getFrozenColsContentWidth(), frozenColsOffset = this.getFrozenColsOffset(), bottomFrozenRowsHeight = this.getBottomFrozenRowsHeight(), rightFrozenColsWidth = this.getRightFrozenColsWidth(), rowStart = Math.max(null !== (_b = null === (_a = this.getTargetRowAt(scrollTop + 1)) || void 0 === _a ? void 0 : _a.row) && void 0 !== _b ? _b : -1, this.frozenRowCount), {col: colStart} = this.getColAt(scrollLeft + frozenColsContentWidth + 1), rowEnd = this.getAllRowsHeight() > this.tableNoFrameHeight ? Math.max(null !== (_d = null === (_c = this.getTargetRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight)) || void 0 === _c ? void 0 : _c.row) && void 0 !== _d ? _d : -1, rowStart) : this.rowCount - 1, colEnd = this.getAllColsWidth() > this.tableNoFrameWidth ? this.getColAt(scrollLeft + frozenColsOffset + this.tableNoFrameWidth - 1 - rightFrozenColsWidth).col : this.colCount - 1;
|
|
949
950
|
return colEnd < 0 || rowEnd < 0 ? null : {
|
|
950
951
|
rowStart: rowStart,
|
|
951
952
|
colStart: colStart,
|
|
@@ -954,7 +955,8 @@ export class BaseTable extends EventTarget {
|
|
|
954
955
|
};
|
|
955
956
|
}
|
|
956
957
|
getBodyVisibleRowRange(start_deltaY = 0, end_deltaY = 0) {
|
|
957
|
-
|
|
958
|
+
var _a, _b, _c, _d;
|
|
959
|
+
const {scrollTop: scrollTop} = this, bottomFrozenRowsHeight = this.getBottomFrozenRowsHeight(), rowStart = Math.max(null !== (_b = null === (_a = this.getTargetRowAt(scrollTop + 1 + start_deltaY)) || void 0 === _a ? void 0 : _a.row) && void 0 !== _b ? _b : -1, this.frozenRowCount), rowEnd = this.getAllRowsHeight() > this.tableNoFrameHeight ? Math.max(null !== (_d = null === (_c = this.getTargetRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight + end_deltaY)) || void 0 === _c ? void 0 : _c.row) && void 0 !== _d ? _d : -1, rowStart) : this.rowCount - 1;
|
|
958
960
|
return rowEnd < 0 ? null : {
|
|
959
961
|
rowStart: rowStart,
|
|
960
962
|
rowEnd: rowEnd
|
|
@@ -2227,16 +2229,16 @@ export class BaseTable extends EventTarget {
|
|
|
2227
2229
|
}
|
|
2228
2230
|
scrollToRow(row, animationOption) {
|
|
2229
2231
|
var _a;
|
|
2230
|
-
const targetRow = Math.min(Math.max(
|
|
2232
|
+
const targetRow = Math.min(Math.max(row, 0), this.rowCount - 1), targetRowInt = Math.floor(targetRow);
|
|
2231
2233
|
if (this.clearCorrectTimer(), !animationOption) return this.scrollToCell({
|
|
2232
|
-
row:
|
|
2233
|
-
}), void this._scheduleScrollToRowCorrect(
|
|
2234
|
+
row: targetRowInt
|
|
2235
|
+
}), void this._scheduleScrollToRowCorrect(targetRowInt);
|
|
2234
2236
|
const duration = isBoolean(animationOption) ? 3e3 : null !== (_a = null == animationOption ? void 0 : animationOption.duration) && void 0 !== _a ? _a : 3e3;
|
|
2235
2237
|
this.animationManager.scrollTo({
|
|
2236
2238
|
row: targetRow
|
|
2237
|
-
}, animationOption), this._scrollToRowCorrectTimer = setTimeout((() => {
|
|
2238
|
-
this.scrollToRow(
|
|
2239
|
-
}), duration);
|
|
2239
|
+
}, animationOption), targetRowInt === targetRow && (this._scrollToRowCorrectTimer = setTimeout((() => {
|
|
2240
|
+
this.scrollToRow(targetRowInt, !1);
|
|
2241
|
+
}), duration));
|
|
2240
2242
|
}
|
|
2241
2243
|
scrollToCol(col, animationOption) {
|
|
2242
2244
|
animationOption ? this.animationManager.scrollTo({
|