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/cjs/core/BaseTable.js
CHANGED
|
@@ -45,7 +45,7 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
45
45
|
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;
|
|
46
46
|
if (super(), this.showFrozenIcon = !0, this._scrollToRowCorrectTimer = null, this._tableBorderWidth_left = 0,
|
|
47
47
|
this._tableBorderWidth_right = 0, this._tableBorderWidth_top = 0, this._tableBorderWidth_bottom = 0,
|
|
48
|
-
this.version = "1.0.
|
|
48
|
+
this.version = "1.0.37", this.id = `VTable${Date.now()}`, this.isReleased = !1,
|
|
49
49
|
this._chartEventMap = {}, this.throttleInvalidate = (0, util_1.throttle2)(this.render.bind(this), 200),
|
|
50
50
|
"undefined" != typeof window) {
|
|
51
51
|
const g = window;
|
|
@@ -903,7 +903,8 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
903
903
|
return count;
|
|
904
904
|
}
|
|
905
905
|
getBodyVisibleCellRange() {
|
|
906
|
-
|
|
906
|
+
var _a, _b, _c, _d;
|
|
907
|
+
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;
|
|
907
908
|
return colEnd < 0 || rowEnd < 0 ? null : {
|
|
908
909
|
rowStart: rowStart,
|
|
909
910
|
colStart: colStart,
|
|
@@ -912,7 +913,8 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
912
913
|
};
|
|
913
914
|
}
|
|
914
915
|
getBodyVisibleRowRange(start_deltaY = 0, end_deltaY = 0) {
|
|
915
|
-
|
|
916
|
+
var _a, _b, _c, _d;
|
|
917
|
+
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;
|
|
916
918
|
return rowEnd < 0 ? null : {
|
|
917
919
|
rowStart: rowStart,
|
|
918
920
|
rowEnd: rowEnd
|
|
@@ -2192,16 +2194,16 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
2192
2194
|
}
|
|
2193
2195
|
scrollToRow(row, animationOption) {
|
|
2194
2196
|
var _a;
|
|
2195
|
-
const targetRow = Math.min(Math.max(
|
|
2197
|
+
const targetRow = Math.min(Math.max(row, 0), this.rowCount - 1), targetRowInt = Math.floor(targetRow);
|
|
2196
2198
|
if (this.clearCorrectTimer(), !animationOption) return this.scrollToCell({
|
|
2197
|
-
row:
|
|
2198
|
-
}), void this._scheduleScrollToRowCorrect(
|
|
2199
|
+
row: targetRowInt
|
|
2200
|
+
}), void this._scheduleScrollToRowCorrect(targetRowInt);
|
|
2199
2201
|
const duration = (0, vutils_1.isBoolean)(animationOption) ? 3e3 : null !== (_a = null == animationOption ? void 0 : animationOption.duration) && void 0 !== _a ? _a : 3e3;
|
|
2200
2202
|
this.animationManager.scrollTo({
|
|
2201
2203
|
row: targetRow
|
|
2202
|
-
}, animationOption), this._scrollToRowCorrectTimer = setTimeout((() => {
|
|
2203
|
-
this.scrollToRow(
|
|
2204
|
-
}), duration);
|
|
2204
|
+
}, animationOption), targetRowInt === targetRow && (this._scrollToRowCorrectTimer = setTimeout((() => {
|
|
2205
|
+
this.scrollToRow(targetRowInt, !1);
|
|
2206
|
+
}), duration));
|
|
2205
2207
|
}
|
|
2206
2208
|
scrollToCol(col, animationOption) {
|
|
2207
2209
|
animationOption ? this.animationManager.scrollTo({
|