@visactor/vtable 1.11.3 → 1.11.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-all.js +6 -5
- package/cjs/ListTable-all.js.map +1 -1
- package/cjs/PivotTable.js +14 -3
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +2 -2
- package/cjs/core/BaseTable.js +13 -8
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/style-helper.js +6 -6
- package/cjs/core/style-helper.js.map +1 -1
- package/cjs/index.d.ts +1 -4
- package/cjs/index.js +2 -3
- package/cjs/index.js.map +1 -1
- package/cjs/plugins/custom-cell-style.d.ts +6 -2
- package/cjs/plugins/custom-cell-style.js +8 -2
- package/cjs/plugins/custom-cell-style.js.map +1 -1
- package/cjs/plugins/invert-highlight.d.ts +0 -18
- package/cjs/plugins/invert-highlight.js +3 -52
- package/cjs/plugins/invert-highlight.js.map +1 -1
- package/cjs/plugins/list-tree-stick-cell.d.ts +3 -1
- package/cjs/plugins/list-tree-stick-cell.js +1 -1
- package/cjs/plugins/list-tree-stick-cell.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +4 -4
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +188 -517
- package/dist/vtable.min.js +2 -2
- package/es/ListTable-all.js +5 -3
- package/es/ListTable-all.js.map +1 -1
- package/es/PivotTable.js +14 -3
- package/es/PivotTable.js.map +1 -1
- package/es/core/BaseTable.d.ts +2 -2
- package/es/core/BaseTable.js +12 -9
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/style-helper.js +7 -7
- package/es/core/style-helper.js.map +1 -1
- package/es/index.d.ts +1 -4
- package/es/index.js +1 -7
- package/es/index.js.map +1 -1
- package/es/plugins/custom-cell-style.d.ts +6 -2
- package/es/plugins/custom-cell-style.js +6 -0
- package/es/plugins/custom-cell-style.js.map +1 -1
- package/es/plugins/invert-highlight.d.ts +0 -18
- package/es/plugins/invert-highlight.js +0 -55
- package/es/plugins/invert-highlight.js.map +1 -1
- package/es/plugins/list-tree-stick-cell.d.ts +3 -1
- package/es/plugins/list-tree-stick-cell.js +4 -4
- package/es/plugins/list-tree-stick-cell.js.map +1 -1
- package/es/ts-types/base-table.d.ts +4 -4
- package/es/ts-types/base-table.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +3 -3
- package/cjs/plugins/carousel-animation.d.ts +0 -48
- package/cjs/plugins/carousel-animation.js +0 -71
- package/cjs/plugins/carousel-animation.js.map +0 -1
- package/cjs/plugins/header-highlight.d.ts +0 -21
- package/cjs/plugins/header-highlight.js +0 -108
- package/cjs/plugins/header-highlight.js.map +0 -1
- package/es/plugins/carousel-animation.d.ts +0 -48
- package/es/plugins/carousel-animation.js +0 -63
- package/es/plugins/carousel-animation.js.map +0 -1
- package/es/plugins/header-highlight.d.ts +0 -21
- package/es/plugins/header-highlight.js +0 -100
- package/es/plugins/header-highlight.js.map +0 -1
package/es/core/BaseTable.d.ts
CHANGED
|
@@ -16,13 +16,13 @@ import type { TooltipOptions } from '../ts-types/tooltip';
|
|
|
16
16
|
import type { BaseTableAPI, BaseTableConstructorOptions, IBaseTableProtected } from '../ts-types/base-table';
|
|
17
17
|
import type { DataSet } from '@visactor/vdataset';
|
|
18
18
|
import { NumberRangeMap } from '../layout/row-height-map';
|
|
19
|
-
import { CustomCellStylePlugin } from '../plugins/custom-cell-style';
|
|
20
19
|
import type { ITextGraphicAttribute } from './../vrender';
|
|
21
20
|
import { ReactCustomLayout } from '../components/react/react-custom-layout';
|
|
22
21
|
import type { ISortedMapItem } from '../data/DataSource';
|
|
23
22
|
import type { EditManeger } from '../edit/edit-manager';
|
|
24
23
|
import { TableAnimationManager } from './animation';
|
|
25
24
|
import type { ITableAnimationOption } from '../ts-types/animation/appear';
|
|
25
|
+
import type { CustomCellStylePlugin } from '../plugins/custom-cell-style';
|
|
26
26
|
export declare abstract class BaseTable extends EventTarget implements BaseTableAPI {
|
|
27
27
|
internalProps: IBaseTableProtected;
|
|
28
28
|
showFrozenIcon: boolean;
|
|
@@ -69,7 +69,7 @@ export declare abstract class BaseTable extends EventTarget implements BaseTable
|
|
|
69
69
|
query?: any;
|
|
70
70
|
callback: AnyFunction;
|
|
71
71
|
}[]>;
|
|
72
|
-
customCellStylePlugin
|
|
72
|
+
customCellStylePlugin?: CustomCellStylePlugin;
|
|
73
73
|
columnWidthComputeMode?: 'normal' | 'only-header' | 'only-body';
|
|
74
74
|
reactCustomLayout?: ReactCustomLayout;
|
|
75
75
|
_hasAutoImageColumn?: boolean;
|
package/es/core/BaseTable.js
CHANGED
|
@@ -54,8 +54,6 @@ import { NumberRangeMap } from "../layout/row-height-map";
|
|
|
54
54
|
|
|
55
55
|
import { RowSeriesNumberHelper } from "./row-series-number-helper";
|
|
56
56
|
|
|
57
|
-
import { CustomCellStylePlugin } from "../plugins/custom-cell-style";
|
|
58
|
-
|
|
59
57
|
import { hideCellSelectBorder, restoreCellSelectBorder } from "../scenegraph/select/update-select-border";
|
|
60
58
|
|
|
61
59
|
import { ReactCustomLayout } from "../components/react/react-custom-layout";
|
|
@@ -86,7 +84,7 @@ export class BaseTable extends EventTarget {
|
|
|
86
84
|
}
|
|
87
85
|
constructor(container, options = {}) {
|
|
88
86
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
89
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.11.
|
|
87
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.11.5", this.id = `VTable${Date.now()}`,
|
|
90
88
|
this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200),
|
|
91
89
|
!container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
|
|
92
90
|
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 = defaultPixelRatio, renderChartAsync: renderChartAsync, renderChartAsyncBatchCount: renderChartAsyncBatchCount, mode: mode, modeParams: modeParams, canvasWidth: canvasWidth, canvasHeight: canvasHeight, overscrollBehavior: overscrollBehavior, limitMinWidth: limitMinWidth, limitMinHeight: limitMinHeight, clearDOM: clearDOM = !0} = options;
|
|
@@ -178,7 +176,9 @@ export class BaseTable extends EventTarget {
|
|
|
178
176
|
this.headerStyleCache = new Map, this.bodyStyleCache = new Map, this.bodyMergeTitleCache = new Map,
|
|
179
177
|
this.bodyBottomStyleCache = new Map, internalProps.stick = {
|
|
180
178
|
changedCells: new Map
|
|
181
|
-
}, internalProps.customMergeCell = options.customMergeCell
|
|
179
|
+
}, internalProps.customMergeCell = options.customMergeCell;
|
|
180
|
+
const CustomCellStylePlugin = Factory.getComponent("customCellStylePlugin");
|
|
181
|
+
CustomCellStylePlugin && (this.customCellStylePlugin = new CustomCellStylePlugin(this, null !== (_j = options.customCellStyle) && void 0 !== _j ? _j : [], null !== (_k = options.customCellStyleArrangement) && void 0 !== _k ? _k : []));
|
|
182
182
|
}
|
|
183
183
|
getContainer() {
|
|
184
184
|
return this.container;
|
|
@@ -822,7 +822,7 @@ export class BaseTable extends EventTarget {
|
|
|
822
822
|
return super.fireListeners(type, event);
|
|
823
823
|
}
|
|
824
824
|
updateOption(options) {
|
|
825
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
825
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
826
826
|
this.options = options, this._hasAutoImageColumn = void 0;
|
|
827
827
|
const {frozenColCount: frozenColCount = 0, defaultRowHeight: defaultRowHeight = 40, defaultHeaderRowHeight: defaultHeaderRowHeight, defaultColWidth: defaultColWidth = 80, defaultHeaderColWidth: defaultHeaderColWidth = 80, 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, pixelRatio: pixelRatio, widthMode: widthMode, heightMode: heightMode, autoFillWidth: autoFillWidth, autoFillHeight: autoFillHeight, widthAdaptiveMode: widthAdaptiveMode, heightAdaptiveMode: heightAdaptiveMode, customRender: customRender, renderChartAsync: renderChartAsync, renderChartAsyncBatchCount: renderChartAsyncBatchCount, overscrollBehavior: overscrollBehavior, limitMinWidth: limitMinWidth, limitMinHeight: limitMinHeight} = options;
|
|
828
828
|
pixelRatio && pixelRatio !== this.internalProps.pixelRatio && (this.internalProps.pixelRatio = pixelRatio),
|
|
@@ -897,7 +897,7 @@ export class BaseTable extends EventTarget {
|
|
|
897
897
|
internalProps.menuHandler = new MenuHandler(this);
|
|
898
898
|
}
|
|
899
899
|
this.clearCellStyleCache(), this.clearColWidthCache(), this.clearRowHeightCache(),
|
|
900
|
-
internalProps.customMergeCell = options.customMergeCell, this.customCellStylePlugin.updateCustomCell(null !== (
|
|
900
|
+
internalProps.customMergeCell = options.customMergeCell, null === (_l = this.customCellStylePlugin) || void 0 === _l || _l.updateCustomCell(null !== (_m = options.customCellStyle) && void 0 !== _m ? _m : [], null !== (_o = options.customCellStyleArrangement) && void 0 !== _o ? _o : []);
|
|
901
901
|
}
|
|
902
902
|
renderWithRecreateCells() {
|
|
903
903
|
const oldHoverState = {
|
|
@@ -1689,13 +1689,16 @@ export class BaseTable extends EventTarget {
|
|
|
1689
1689
|
}
|
|
1690
1690
|
changeRecordOrder(source, target) {}
|
|
1691
1691
|
hasCustomCellStyle(customStyleId) {
|
|
1692
|
-
|
|
1692
|
+
var _a;
|
|
1693
|
+
return null === (_a = this.customCellStylePlugin) || void 0 === _a ? void 0 : _a.hasCustomCellStyle(customStyleId);
|
|
1693
1694
|
}
|
|
1694
1695
|
registerCustomCellStyle(customStyleId, customStyle) {
|
|
1695
|
-
|
|
1696
|
+
var _a;
|
|
1697
|
+
null === (_a = this.customCellStylePlugin) || void 0 === _a || _a.registerCustomCellStyle(customStyleId, customStyle);
|
|
1696
1698
|
}
|
|
1697
1699
|
arrangeCustomCellStyle(cellPos, customStyleId) {
|
|
1698
|
-
|
|
1700
|
+
var _a;
|
|
1701
|
+
null === (_a = this.customCellStylePlugin) || void 0 === _a || _a.arrangeCustomCellStyle(cellPos, customStyleId);
|
|
1699
1702
|
}
|
|
1700
1703
|
isSeriesNumber(col, row) {
|
|
1701
1704
|
return this.internalProps.layoutMap.isSeriesNumber(col, row);
|