@visactor/vtable 1.13.3-alpha.6 → 1.14.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/ListTable.js +1 -1
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotTable.js +1 -1
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +3 -3
- package/cjs/core/BaseTable.js +9 -10
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/record-helper.js +1 -1
- package/cjs/core/record-helper.js.map +1 -1
- package/cjs/edit/edit-manager.d.ts +2 -2
- package/cjs/edit/edit-manager.js +16 -7
- package/cjs/edit/edit-manager.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/chart-helper/get-axis-domain.js +4 -3
- package/cjs/layout/chart-helper/get-axis-domain.js.map +1 -1
- package/cjs/plugins/custom-cell-style.d.ts +1 -1
- package/cjs/plugins/custom-cell-style.js +1 -2
- package/cjs/plugins/custom-cell-style.js.map +1 -1
- package/cjs/state/checkbox/checkbox.js +9 -7
- package/cjs/state/checkbox/checkbox.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +2 -3
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +3 -3
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +74 -45
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.js +2 -2
- package/es/ListTable.js.map +1 -1
- package/es/PivotTable.js +2 -2
- package/es/PivotTable.js.map +1 -1
- package/es/core/BaseTable.d.ts +3 -3
- package/es/core/BaseTable.js +9 -10
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/record-helper.js +1 -1
- package/es/core/record-helper.js.map +1 -1
- package/es/edit/edit-manager.d.ts +2 -2
- package/es/edit/edit-manager.js +13 -4
- package/es/edit/edit-manager.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 +6 -1
- package/es/layout/chart-helper/get-axis-config.js.map +1 -1
- package/es/layout/chart-helper/get-axis-domain.js +3 -3
- package/es/layout/chart-helper/get-axis-domain.js.map +1 -1
- package/es/plugins/custom-cell-style.d.ts +1 -1
- package/es/plugins/custom-cell-style.js +1 -2
- package/es/plugins/custom-cell-style.js.map +1 -1
- package/es/state/checkbox/checkbox.js +8 -7
- package/es/state/checkbox/checkbox.js.map +1 -1
- package/es/ts-types/base-table.d.ts +2 -3
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +3 -3
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +6 -6
package/cjs/core/BaseTable.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ import { NumberRangeMap } from '../layout/row-height-map';
|
|
|
19
19
|
import type { ITextGraphicAttribute } from './../vrender';
|
|
20
20
|
import { ReactCustomLayout } from '../components/react/react-custom-layout';
|
|
21
21
|
import type { ISortedMapItem } from '../data/DataSource';
|
|
22
|
-
import type {
|
|
22
|
+
import type { EditManager } from '../edit/edit-manager';
|
|
23
23
|
import { TableAnimationManager } from './animation';
|
|
24
24
|
import type { ITableAnimationOption } from '../ts-types/animation/appear';
|
|
25
25
|
import type { CustomCellStylePlugin } from '../plugins/custom-cell-style';
|
|
@@ -50,7 +50,7 @@ export declare abstract class BaseTable extends EventTarget implements BaseTable
|
|
|
50
50
|
scenegraph: Scenegraph;
|
|
51
51
|
stateManager: StateManager;
|
|
52
52
|
eventManager: EventManager;
|
|
53
|
-
editorManager:
|
|
53
|
+
editorManager: EditManager;
|
|
54
54
|
animationManager: TableAnimationManager;
|
|
55
55
|
_pixelRatio: number;
|
|
56
56
|
canvasSizeSeted?: boolean;
|
|
@@ -398,7 +398,7 @@ export declare abstract class BaseTable extends EventTarget implements BaseTable
|
|
|
398
398
|
col?: number;
|
|
399
399
|
row?: number;
|
|
400
400
|
range?: CellRange;
|
|
401
|
-
}, customStyleId: string): void;
|
|
401
|
+
}, customStyleId: string, forceFastUpdate?: boolean): void;
|
|
402
402
|
isSeriesNumber(col: number, row: number): boolean;
|
|
403
403
|
isHasSeriesNumber(): boolean;
|
|
404
404
|
get leftRowSeriesNumberCount(): number;
|
package/cjs/core/BaseTable.js
CHANGED
|
@@ -43,7 +43,7 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
43
43
|
}
|
|
44
44
|
constructor(container, options = {}) {
|
|
45
45
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
46
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.
|
|
46
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.14.0", this.id = `VTable${Date.now()}`,
|
|
47
47
|
this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = (0, util_1.throttle2)(this.render.bind(this), 200),
|
|
48
48
|
!container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
|
|
49
49
|
const {frozenColCount: frozenColCount = 0, frozenRowCount: frozenRowCount, defaultRowHeight: defaultRowHeight = 40, defaultHeaderRowHeight: defaultHeaderRowHeight, defaultColWidth: defaultColWidth = 80, defaultHeaderColWidth: defaultHeaderColWidth, widthMode: widthMode = "standard", heightMode: heightMode = "standard", autoFillWidth: autoFillWidth = !1, autoFillHeight: autoFillHeight = !1, widthAdaptiveMode: widthAdaptiveMode = "only-body", heightAdaptiveMode: heightAdaptiveMode = "only-body", keyboardOptions: keyboardOptions, eventOptions: eventOptions, rowSeriesNumber: rowSeriesNumber, columnResizeMode: columnResizeMode, rowResizeMode: rowResizeMode = "none", dragHeaderMode: dragHeaderMode, showFrozenIcon: showFrozenIcon, allowFrozenColCount: allowFrozenColCount, padding: padding, hover: hover, menu: menu, select: click, customRender: customRender, pixelRatio: pixelRatio = pixel_ratio_1.defaultPixelRatio, renderChartAsync: renderChartAsync, renderChartAsyncBatchCount: renderChartAsyncBatchCount, mode: mode, modeParams: modeParams, canvasWidth: canvasWidth, canvasHeight: canvasHeight, overscrollBehavior: overscrollBehavior, limitMinWidth: limitMinWidth, limitMinHeight: limitMinHeight, clearDOM: clearDOM = !0} = options;
|
|
@@ -365,15 +365,14 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
365
365
|
if (this.canvasSizeSeted) widthWithoutPadding = this.canvasWidth, heightWithoutPadding = this.canvasHeight; else if (element.parentElement) {
|
|
366
366
|
const computedStyle = element.parentElement.style || window.getComputedStyle(element.parentElement);
|
|
367
367
|
widthWithoutPadding = element.parentElement.offsetWidth - parseInt(computedStyle.paddingLeft || "0px", 10) - parseInt(computedStyle.paddingRight || "0px", 10),
|
|
368
|
-
heightWithoutPadding = element.parentElement.offsetHeight - parseInt(computedStyle.paddingTop || "0px", 10) - parseInt(computedStyle.paddingBottom || "0px", 20)
|
|
369
|
-
widthWithoutPadding = (null != widthWithoutPadding ? widthWithoutPadding : 1) - (this.options.tableSizeAntiJitter ? 1 : 0),
|
|
370
|
-
heightWithoutPadding = (null != heightWithoutPadding ? heightWithoutPadding : 1) - (this.options.tableSizeAntiJitter ? 1 : 0);
|
|
368
|
+
heightWithoutPadding = element.parentElement.offsetHeight - parseInt(computedStyle.paddingTop || "0px", 10) - parseInt(computedStyle.paddingBottom || "0px", 20);
|
|
371
369
|
}
|
|
372
|
-
|
|
373
|
-
element.style.
|
|
370
|
+
const width1 = null != widthWithoutPadding ? widthWithoutPadding : 0, height1 = null != heightWithoutPadding ? heightWithoutPadding : 0;
|
|
371
|
+
element.style.width = width1 && width1 - padding.left - padding.right + "px" || "0px",
|
|
372
|
+
element.style.height = height1 && height1 - padding.top - padding.bottom + "px" || "0px";
|
|
374
373
|
const {canvas: canvas} = this.internalProps;
|
|
375
|
-
widthP =
|
|
376
|
-
heightP =
|
|
374
|
+
widthP = null !== (_c = null === (_b = canvas.parentElement) || void 0 === _b ? void 0 : _b.offsetWidth) && void 0 !== _c ? _c : 0,
|
|
375
|
+
heightP = null !== (_e = null === (_d = canvas.parentElement) || void 0 === _d ? void 0 : _d.offsetHeight) && void 0 !== _e ? _e : 0,
|
|
377
376
|
(null === (_f = null == this ? void 0 : this.scenegraph) || void 0 === _f ? void 0 : _f.stage) ? this.scenegraph.stage.resize(widthP, heightP) : (canvas.style.width = "",
|
|
378
377
|
canvas.style.height = "", canvas.width = widthP, canvas.height = heightP, canvas.style.width = `${widthP}px`,
|
|
379
378
|
canvas.style.height = `${heightP}px`);
|
|
@@ -1667,9 +1666,9 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
1667
1666
|
var _a;
|
|
1668
1667
|
null === (_a = this.customCellStylePlugin) || void 0 === _a || _a.registerCustomCellStyle(customStyleId, customStyle);
|
|
1669
1668
|
}
|
|
1670
|
-
arrangeCustomCellStyle(cellPos, customStyleId) {
|
|
1669
|
+
arrangeCustomCellStyle(cellPos, customStyleId, forceFastUpdate) {
|
|
1671
1670
|
var _a;
|
|
1672
|
-
null === (_a = this.customCellStylePlugin) || void 0 === _a || _a.arrangeCustomCellStyle(cellPos, customStyleId);
|
|
1671
|
+
null === (_a = this.customCellStylePlugin) || void 0 === _a || _a.arrangeCustomCellStyle(cellPos, customStyleId, forceFastUpdate);
|
|
1673
1672
|
}
|
|
1674
1673
|
isSeriesNumber(col, row) {
|
|
1675
1674
|
return this.internalProps.layoutMap.isSeriesNumber(col, row);
|