@visactor/vtable 1.22.7-alpha.3 → 1.22.7-alpha.5
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.js +2 -3
- package/cjs/ListTable.js.map +1 -1
- package/cjs/body-helper/body-helper.js +1 -2
- package/cjs/body-helper/style.js +2 -1
- package/cjs/core/BaseTable.d.ts +2 -2
- package/cjs/core/BaseTable.js +7 -9
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/TABLE_EVENT_TYPE.d.ts +0 -2
- package/cjs/core/TABLE_EVENT_TYPE.js +1 -3
- package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/cjs/dataset/dataset-pivot-table.js +2 -1
- package/cjs/dataset/flatDataToObject.js +1 -2
- package/cjs/header-helper/header-helper.js +1 -1
- package/cjs/header-helper/style.js +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/index.js +2 -1
- package/cjs/layout/simple-header-layout.js +1 -1
- package/cjs/layout/tree-helper.js +1 -1
- package/cjs/plugins/interface.js +1 -2
- package/cjs/plugins/invert-highlight.js +1 -1
- package/cjs/plugins/list-tree-stick-cell.js +1 -1
- package/cjs/plugins/plugin-manager.d.ts +0 -2
- package/cjs/plugins/plugin-manager.js +7 -14
- package/cjs/plugins/plugin-manager.js.map +1 -1
- package/cjs/scenegraph/graphic/active-cell-chart-list.js +63 -45
- package/cjs/scenegraph/graphic/active-cell-chart-list.js.map +1 -1
- package/cjs/scenegraph/graphic/chart.js +10 -3
- package/cjs/scenegraph/graphic/chart.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +2 -2
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/events.d.ts +0 -8
- package/cjs/ts-types/events.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +2 -2
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +153 -117
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.js +2 -3
- package/es/ListTable.js.map +1 -1
- package/es/body-helper/body-helper.js +1 -2
- package/es/body-helper/style.js +2 -1
- package/es/core/BaseTable.d.ts +2 -2
- package/es/core/BaseTable.js +7 -9
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/TABLE_EVENT_TYPE.d.ts +0 -2
- package/es/core/TABLE_EVENT_TYPE.js +1 -3
- package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/es/dataset/dataset-pivot-table.js +2 -1
- package/es/dataset/flatDataToObject.js +1 -2
- package/es/header-helper/header-helper.js +1 -1
- package/es/header-helper/style.js +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/index.js +2 -1
- package/es/layout/simple-header-layout.js +1 -1
- package/es/layout/tree-helper.js +1 -1
- package/es/plugins/interface.js +1 -2
- package/es/plugins/invert-highlight.js +1 -1
- package/es/plugins/list-tree-stick-cell.js +1 -1
- package/es/plugins/plugin-manager.d.ts +0 -2
- package/es/plugins/plugin-manager.js +7 -14
- package/es/plugins/plugin-manager.js.map +1 -1
- package/es/scenegraph/graphic/active-cell-chart-list.js +63 -45
- package/es/scenegraph/graphic/active-cell-chart-list.js.map +1 -1
- package/es/scenegraph/graphic/chart.js +10 -3
- package/es/scenegraph/graphic/chart.js.map +1 -1
- package/es/ts-types/base-table.d.ts +2 -2
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/events.d.ts +0 -8
- package/es/ts-types/events.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +2 -2
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +9 -9
|
@@ -108,5 +108,4 @@ export class BodyHelper {
|
|
|
108
108
|
var _a, _b;
|
|
109
109
|
return this.expandIcon.width + (null !== (_a = this.expandIcon.marginLeft) && void 0 !== _a ? _a : 0) + (null !== (_b = this.expandIcon.marginRight) && void 0 !== _b ? _b : 0);
|
|
110
110
|
}
|
|
111
|
-
}
|
|
112
|
-
//# sourceMappingURL=body-helper.js.map
|
|
111
|
+
}
|
package/es/body-helper/style.js
CHANGED
|
@@ -25,4 +25,5 @@ export function of(columnStyle, bodyStyle, styleArg, StyleClassDef = Style, glob
|
|
|
25
25
|
return columnStyle || bodyStyle ? columnStyle instanceof Style ? columnStyle : "function" == typeof columnStyle ? of(columnStyle(styleArg), bodyStyle, styleArg, StyleClassDef, globalAutoWrapText, theme) : (columnStyle || (columnStyle = {}),
|
|
26
26
|
globalAutoWrapText && !isValid(columnStyle.autoWrapText) && (columnStyle.autoWrapText = !0),
|
|
27
27
|
StyleClassDef === CheckboxStyle ? new CheckboxStyle(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {}, null !== (_a = theme.checkboxStyle) && void 0 !== _a ? _a : {}) : StyleClassDef === RadioStyle ? new RadioStyle(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {}, null !== (_b = theme.radioStyle) && void 0 !== _b ? _b : {}) : StyleClassDef === SwitchStyle ? new SwitchStyle(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {}, null !== (_c = theme.switchStyle) && void 0 !== _c ? _c : {}) : StyleClassDef === ButtonStyle ? new ButtonStyle(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {}, null !== (_d = theme.buttonStyle) && void 0 !== _d ? _d : {}) : new StyleClassDef(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {})) : StyleClassDef.DEFAULT;
|
|
28
|
-
}
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=style.js.map
|
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
|
};
|
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.7-alpha.
|
|
93
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.22.7-alpha.5", 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");
|
|
@@ -719,13 +719,11 @@ export class BaseTable extends EventTarget {
|
|
|
719
719
|
this.colContentWidthsMap.put(col, width);
|
|
720
720
|
}
|
|
721
721
|
getAllRowsHeight() {
|
|
722
|
-
|
|
723
|
-
if (!(null === (_a = this.internalProps) || void 0 === _a ? void 0 : _a.rowCount) || this.internalProps.rowCount <= 0) return 0;
|
|
722
|
+
if (this.internalProps.rowCount <= 0) return 0;
|
|
724
723
|
return this.getRowsHeight(0, this.internalProps.rowCount - 1);
|
|
725
724
|
}
|
|
726
725
|
getAllColsWidth() {
|
|
727
|
-
|
|
728
|
-
if (!(null === (_a = this.internalProps) || void 0 === _a ? void 0 : _a.colCount) || this.internalProps.colCount <= 0) return 0;
|
|
726
|
+
if (this.internalProps.colCount <= 0) return 0;
|
|
729
727
|
return this.getColsWidth(0, this.internalProps.colCount - 1);
|
|
730
728
|
}
|
|
731
729
|
getColsWidths() {
|
|
@@ -912,15 +910,15 @@ export class BaseTable extends EventTarget {
|
|
|
912
910
|
colEnd: colEnd
|
|
913
911
|
};
|
|
914
912
|
}
|
|
915
|
-
getBodyVisibleRowRange(
|
|
916
|
-
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;
|
|
917
915
|
return rowEnd < 0 ? null : {
|
|
918
916
|
rowStart: rowStart,
|
|
919
917
|
rowEnd: rowEnd
|
|
920
918
|
};
|
|
921
919
|
}
|
|
922
|
-
getBodyVisibleColRange(
|
|
923
|
-
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;
|
|
924
922
|
return colEnd < 0 ? null : {
|
|
925
923
|
colStart: colStart,
|
|
926
924
|
colEnd: colEnd
|