@visactor/vtable 0.18.4 → 0.18.5-alpha.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/core/BaseTable.js +4 -4
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/icons.js +10 -0
- package/cjs/icons.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/scenegraph/graphic/contributions/draw-interceptor.d.ts +13 -0
- package/cjs/scenegraph/graphic/contributions/draw-interceptor.js +90 -0
- package/cjs/scenegraph/graphic/contributions/draw-interceptor.js.map +1 -0
- package/cjs/scenegraph/graphic/contributions/index.js +4 -2
- package/cjs/scenegraph/graphic/contributions/index.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js +38 -18
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +2 -2
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.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/stick-text/index.js +5 -5
- package/cjs/scenegraph/stick-text/index.js.map +1 -1
- package/cjs/scenegraph/utils/keep-aspect-ratio.js +5 -4
- package/cjs/scenegraph/utils/keep-aspect-ratio.js.map +1 -1
- package/cjs/state/select/update-position.js +10 -1
- package/cjs/state/select/update-position.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +1 -1
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +526 -305
- package/dist/vtable.min.js +2 -2
- package/es/core/BaseTable.js +5 -4
- package/es/core/BaseTable.js.map +1 -1
- package/es/icons.js +10 -0
- package/es/icons.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/scenegraph/graphic/contributions/draw-interceptor.d.ts +13 -0
- package/es/scenegraph/graphic/contributions/draw-interceptor.js +64 -0
- package/es/scenegraph/graphic/contributions/draw-interceptor.js.map +1 -0
- package/es/scenegraph/graphic/contributions/index.js +5 -2
- package/es/scenegraph/graphic/contributions/index.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/image-cell.js +35 -17
- package/es/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +2 -2
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.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/stick-text/index.js +5 -5
- package/es/scenegraph/stick-text/index.js.map +1 -1
- package/es/scenegraph/utils/keep-aspect-ratio.js +5 -4
- package/es/scenegraph/utils/keep-aspect-ratio.js.map +1 -1
- package/es/state/select/update-position.js +10 -1
- package/es/state/select/update-position.js.map +1 -1
- package/es/ts-types/base-table.d.ts +1 -1
- package/es/ts-types/base-table.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +6 -6
package/cjs/core/BaseTable.js
CHANGED
|
@@ -45,7 +45,7 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
45
45
|
}
|
|
46
46
|
constructor(container, options = {}) {
|
|
47
47
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
48
|
-
if (super(), this.showFrozenIcon = !0, this.showSort = !0, this.version = "0.18.
|
|
48
|
+
if (super(), this.showFrozenIcon = !0, this.showSort = !0, this.version = "0.18.5-alpha.0",
|
|
49
49
|
this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {},
|
|
50
50
|
this.throttleInvalidate = (0, util_1.throttle2)(this.render.bind(this), 200), !container && "node" !== options.mode) throw new Error("vtable's container is undefined");
|
|
51
51
|
const {frozenColCount: frozenColCount = 0, defaultRowHeight: defaultRowHeight = 40, defaultHeaderRowHeight: defaultHeaderRowHeight, defaultColWidth: defaultColWidth = 80, defaultHeaderColWidth: defaultHeaderColWidth, widthMode: widthMode = "standard", heightMode: heightMode = "standard", autoFillWidth: autoFillWidth = !1, autoFillHeight: autoFillHeight = !1, keyboardOptions: keyboardOptions, eventOptions: eventOptions, columnResizeMode: columnResizeMode, 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} = options;
|
|
@@ -109,7 +109,7 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
109
109
|
"html" === internalProps.menu.renderMode && (internalProps.menuHandler = new MenuHandler_1.MenuHandler(this)),
|
|
110
110
|
this.headerStyleCache = new Map, this.bodyStyleCache = new Map, this.bodyBottomStyleCache = new Map,
|
|
111
111
|
internalProps.stick = {
|
|
112
|
-
changedCells:
|
|
112
|
+
changedCells: new Map
|
|
113
113
|
}, internalProps.customMergeCell = options.customMergeCell;
|
|
114
114
|
}
|
|
115
115
|
getContainer() {
|
|
@@ -338,7 +338,7 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
338
338
|
Math.round(w);
|
|
339
339
|
}
|
|
340
340
|
getRowHeight(row) {
|
|
341
|
-
if (this.rowHeightsMap.get(row)) return this.rowHeightsMap.get(row);
|
|
341
|
+
if ((0, vutils_1.isValid)(this.rowHeightsMap.get(row))) return this.rowHeightsMap.get(row);
|
|
342
342
|
const defaultHeight = this.getDefaultRowHeight(row);
|
|
343
343
|
return (0, vutils_1.isNumber)(defaultHeight) ? defaultHeight : this.defaultRowHeight;
|
|
344
344
|
}
|
|
@@ -735,7 +735,7 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
735
735
|
internalProps._rowRangeHeightsMap = new Map, internalProps._colRangeWidthsMap = new Map,
|
|
736
736
|
internalProps._widthResizedColMap = new Set, this.colWidthsMap = new NumberMap_1.NumberMap,
|
|
737
737
|
this.colContentWidthsMap = new NumberMap_1.NumberMap, this.colWidthsLimit = {},
|
|
738
|
-
internalProps.theme = themes_1.default.of(null !== (_a = options.theme) && void 0 !== _a ? _a : themes_1.default.DEFAULT),
|
|
738
|
+
internalProps.stick.changedCells.clear(), internalProps.theme = themes_1.default.of(null !== (_a = options.theme) && void 0 !== _a ? _a : themes_1.default.DEFAULT),
|
|
739
739
|
this.scenegraph.updateStageBackground(), internalProps.autoWrapText = options.autoWrapText,
|
|
740
740
|
internalProps.allowFrozenColCount = null !== (_b = options.allowFrozenColCount) && void 0 !== _b ? _b : 0,
|
|
741
741
|
internalProps.limitMaxAutoWidth = null !== (_c = options.limitMaxAutoWidth) && void 0 !== _c ? _c : 450,
|