@visactor/vtable 0.25.4-alpha.2 → 0.25.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/core/BaseTable.js +8 -24
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/event/listener/table-group.js +10 -3
- 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 +0 -1
- package/cjs/layout/pivot-header-layout.js +3 -19
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/scenegraph/graphic/group.d.ts +1 -1
- package/cjs/scenegraph/graphic/group.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js +1 -1
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/column-helper.js +1 -1
- package/cjs/scenegraph/group-creater/column-helper.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 +22 -72
- package/dist/vtable.min.js +2 -2
- package/es/core/BaseTable.js +8 -24
- package/es/core/BaseTable.js.map +1 -1
- package/es/event/listener/table-group.js +11 -2
- 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 +0 -1
- package/es/layout/pivot-header-layout.js +3 -19
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/scenegraph/graphic/group.d.ts +1 -1
- package/es/scenegraph/graphic/group.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/text-cell.js +1 -1
- package/es/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/es/scenegraph/group-creater/column-helper.js +1 -1
- package/es/scenegraph/group-creater/column-helper.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 +5 -5
package/dist/vtable.js
CHANGED
|
@@ -38697,7 +38697,7 @@
|
|
|
38697
38697
|
}
|
|
38698
38698
|
icons = table.getCellIcons(iconCol, iconRow);
|
|
38699
38699
|
}
|
|
38700
|
-
createCellContent(cellGroup, icons, textStr, padding, autoColWidth, autoRowHeight, autoWrapText, typeof lineClamp === 'number' ? lineClamp : undefined,
|
|
38700
|
+
createCellContent(cellGroup, icons, textStr, padding, autoColWidth, autoRowHeight, autoWrapText, typeof lineClamp === 'number' ? lineClamp : undefined, cellWidth, cellHeight, textAlign, textBaseline, table, cellTheme, range);
|
|
38701
38701
|
if (cellTheme?._vtable?.marked) {
|
|
38702
38702
|
const mark = createArc({
|
|
38703
38703
|
x: cellGroup.attribute.width,
|
|
@@ -45214,8 +45214,8 @@
|
|
|
45214
45214
|
y += rangeHeight;
|
|
45215
45215
|
}
|
|
45216
45216
|
else {
|
|
45217
|
-
columnGroup.updateColumnHeight(
|
|
45218
|
-
y +=
|
|
45217
|
+
columnGroup.updateColumnHeight(cellGroup.attribute.height);
|
|
45218
|
+
y += cellGroup.attribute.height;
|
|
45219
45219
|
}
|
|
45220
45220
|
}
|
|
45221
45221
|
if (rowLimit && row > rowLimit) {
|
|
@@ -53395,6 +53395,17 @@
|
|
|
53395
53395
|
if (!eventManager.checkCellFillhandle(eventArgsSet) && eventManager.checkColumnResize(eventArgsSet, true)) {
|
|
53396
53396
|
table.scenegraph.updateChartState(null);
|
|
53397
53397
|
stateManager.updateInteractionState(InteractionState.grabing);
|
|
53398
|
+
const { eventArgs } = eventArgsSet;
|
|
53399
|
+
if (!eventArgs?.targetCell) {
|
|
53400
|
+
const cell = table.getCellAt(eventArgsSet.abstractPos.x - ResizeColumnHotSpotSize / 2, eventArgsSet.abstractPos.y);
|
|
53401
|
+
if (cell) {
|
|
53402
|
+
if (table.hasListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE)) {
|
|
53403
|
+
table.fireListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE, {
|
|
53404
|
+
event: e.nativeEvent
|
|
53405
|
+
});
|
|
53406
|
+
}
|
|
53407
|
+
}
|
|
53408
|
+
}
|
|
53398
53409
|
return;
|
|
53399
53410
|
}
|
|
53400
53411
|
});
|
|
@@ -58244,7 +58255,7 @@
|
|
|
58244
58255
|
return TABLE_EVENT_TYPE;
|
|
58245
58256
|
}
|
|
58246
58257
|
options;
|
|
58247
|
-
version = "0.25.
|
|
58258
|
+
version = "0.25.5";
|
|
58248
58259
|
pagination;
|
|
58249
58260
|
id = `VTable${Date.now()}`;
|
|
58250
58261
|
headerStyleCache;
|
|
@@ -58260,7 +58271,7 @@
|
|
|
58260
58271
|
if (!container && options.mode !== 'node') {
|
|
58261
58272
|
throw new Error("vtable's container is undefined");
|
|
58262
58273
|
}
|
|
58263
|
-
const { frozenColCount = 0, defaultRowHeight = 40, defaultHeaderRowHeight, defaultColWidth = 80, defaultHeaderColWidth, widthMode = 'standard', heightMode = 'standard', autoFillWidth = false, autoFillHeight = false, widthAdaptiveMode = 'only-body', heightAdaptiveMode = 'only-body', keyboardOptions, eventOptions, rowSeriesNumber, columnResizeMode, rowResizeMode = 'none', dragHeaderMode, showFrozenIcon, allowFrozenColCount, padding, hover, menu, select: click, customRender, pixelRatio = defaultPixelRatio, renderChartAsync, renderChartAsyncBatchCount, mode, modeParams, canvasWidth, canvasHeight, overscrollBehavior, limitMinWidth, limitMinHeight } = options;
|
|
58274
|
+
const { frozenColCount = 0, defaultRowHeight = 40, defaultHeaderRowHeight, defaultColWidth = 80, defaultHeaderColWidth, widthMode = 'standard', heightMode = 'standard', autoFillWidth = false, autoFillHeight = false, widthAdaptiveMode = 'only-body', heightAdaptiveMode = 'only-body', keyboardOptions, eventOptions, rowSeriesNumber, columnResizeMode, rowResizeMode = 'none', dragHeaderMode, showFrozenIcon, allowFrozenColCount, padding, hover, menu, select: click, customRender, pixelRatio = defaultPixelRatio, renderChartAsync, renderChartAsyncBatchCount, mode, modeParams, canvasWidth, canvasHeight, overscrollBehavior, limitMinWidth, limitMinHeight, clearDOM = true } = options;
|
|
58264
58275
|
this.container = container;
|
|
58265
58276
|
this.options = options;
|
|
58266
58277
|
this._widthMode = widthMode;
|
|
@@ -58343,6 +58354,9 @@
|
|
|
58343
58354
|
internalProps.theme = themes.of(options.theme ?? themes.DEFAULT);
|
|
58344
58355
|
internalProps.theme.isPivot = this.isPivotTable();
|
|
58345
58356
|
if (container) {
|
|
58357
|
+
if (clearDOM) {
|
|
58358
|
+
container.innerHTML = '';
|
|
58359
|
+
}
|
|
58346
58360
|
container.appendChild(internalProps.element);
|
|
58347
58361
|
this._updateSize();
|
|
58348
58362
|
}
|
|
@@ -58741,24 +58755,6 @@
|
|
|
58741
58755
|
}
|
|
58742
58756
|
getRowHeight(row) {
|
|
58743
58757
|
if (isValid$3(this.rowHeightsMap.get(row))) {
|
|
58744
|
-
if (this.options._disableColumnAndRowSizeRound) {
|
|
58745
|
-
const height = this.rowHeightsMap.get(row);
|
|
58746
|
-
let heightRange;
|
|
58747
|
-
if (row < this.frozenRowCount) {
|
|
58748
|
-
heightRange = this.rowHeightsMap.getSumInRange(0, row);
|
|
58749
|
-
}
|
|
58750
|
-
else if (row >= this.rowCount - this.bottomFrozenRowCount) {
|
|
58751
|
-
heightRange = this.rowHeightsMap.getSumInRange(row, this.rowCount - 1);
|
|
58752
|
-
}
|
|
58753
|
-
else {
|
|
58754
|
-
heightRange = this.rowHeightsMap.getSumInRange(this.frozenRowCount, row);
|
|
58755
|
-
}
|
|
58756
|
-
heightRange = Number(heightRange.toFixed(2));
|
|
58757
|
-
if (Number.isInteger(heightRange)) {
|
|
58758
|
-
return Math.ceil(height);
|
|
58759
|
-
}
|
|
58760
|
-
return Math.floor(height);
|
|
58761
|
-
}
|
|
58762
58758
|
return this.rowHeightsMap.get(row);
|
|
58763
58759
|
}
|
|
58764
58760
|
const defaultHeight = this.getDefaultRowHeight(row);
|
|
@@ -58797,7 +58793,7 @@
|
|
|
58797
58793
|
return this.internalProps.defaultRowHeight;
|
|
58798
58794
|
}
|
|
58799
58795
|
_setRowHeight(row, height, clearCache) {
|
|
58800
|
-
this.rowHeightsMap.put(row,
|
|
58796
|
+
this.rowHeightsMap.put(row, Math.round(height));
|
|
58801
58797
|
if (clearCache) {
|
|
58802
58798
|
this._clearRowRangeHeightsMap(row);
|
|
58803
58799
|
}
|
|
@@ -58829,24 +58825,6 @@
|
|
|
58829
58825
|
}
|
|
58830
58826
|
}
|
|
58831
58827
|
else {
|
|
58832
|
-
if (this.options._disableColumnAndRowSizeRound) {
|
|
58833
|
-
const tempH = this.rowHeightsMap.getSumInRange(startRow, endRow);
|
|
58834
|
-
let heightRange;
|
|
58835
|
-
if (endRow < this.frozenRowCount) {
|
|
58836
|
-
heightRange = this.rowHeightsMap.getSumInRange(0, endRow);
|
|
58837
|
-
}
|
|
58838
|
-
else if (endRow >= this.rowCount - this.bottomFrozenRowCount) {
|
|
58839
|
-
heightRange = this.rowHeightsMap.getSumInRange(endRow, this.rowCount - 1);
|
|
58840
|
-
}
|
|
58841
|
-
else {
|
|
58842
|
-
heightRange = this.rowHeightsMap.getSumInRange(this.frozenRowCount, endRow);
|
|
58843
|
-
}
|
|
58844
|
-
heightRange = Number(heightRange.toFixed(2));
|
|
58845
|
-
if (Number.isInteger(heightRange)) {
|
|
58846
|
-
return Math.ceil(tempH);
|
|
58847
|
-
}
|
|
58848
|
-
return Math.floor(tempH);
|
|
58849
|
-
}
|
|
58850
58828
|
h = this.rowHeightsMap.getSumInRange(startRow, endRow);
|
|
58851
58829
|
}
|
|
58852
58830
|
return Math.round(h);
|
|
@@ -65007,7 +64985,6 @@
|
|
|
65007
64985
|
}
|
|
65008
64986
|
this.handleRowSeriesNumber(table.internalProps.rowSeriesNumber);
|
|
65009
64987
|
this.setColumnWidths();
|
|
65010
|
-
this.clearCellIds();
|
|
65011
64988
|
}
|
|
65012
64989
|
handleRowSeriesNumber(rowSeriesNumber) {
|
|
65013
64990
|
if (rowSeriesNumber) {
|
|
@@ -65614,7 +65591,7 @@
|
|
|
65614
65591
|
this.columnHeaderLevelCount = count;
|
|
65615
65592
|
return;
|
|
65616
65593
|
}
|
|
65617
|
-
this.columnHeaderLevelCount =
|
|
65594
|
+
this.columnHeaderLevelCount = 0;
|
|
65618
65595
|
return;
|
|
65619
65596
|
}
|
|
65620
65597
|
resetRowHeaderLevelCount() {
|
|
@@ -67075,7 +67052,6 @@
|
|
|
67075
67052
|
return o;
|
|
67076
67053
|
}, {});
|
|
67077
67054
|
this.setPagination(this.pagination);
|
|
67078
|
-
this.clearCellIds();
|
|
67079
67055
|
}
|
|
67080
67056
|
isSeriesNumberInHeader(col, row) {
|
|
67081
67057
|
if (this.leftRowSeriesNumberColumnCount > 0 && col >= 0 && row >= 0 && col < this.leftRowSeriesNumberColumnCount) {
|
|
@@ -67159,32 +67135,6 @@
|
|
|
67159
67135
|
const id = this.getCellId(col, row);
|
|
67160
67136
|
this._headerObjectMap[id].title = value;
|
|
67161
67137
|
}
|
|
67162
|
-
clearCellIds() {
|
|
67163
|
-
if (!this.showColumnHeader) {
|
|
67164
|
-
if (this.indicatorsAsCol && !this.hideIndicatorName) {
|
|
67165
|
-
const indicatorIndex = this.colDimensionKeys.indexOf(IndicatorDimensionKeyPlaceholder);
|
|
67166
|
-
this._columnHeaderCellIds = this._columnHeaderCellIds.splice(indicatorIndex, 1);
|
|
67167
|
-
}
|
|
67168
|
-
else {
|
|
67169
|
-
this._columnHeaderCellIds.splice(0, this._columnHeaderCellIds.length);
|
|
67170
|
-
}
|
|
67171
|
-
}
|
|
67172
|
-
if (!this.showRowHeader) {
|
|
67173
|
-
if (!this.indicatorsAsCol && !this.hideIndicatorName) {
|
|
67174
|
-
const indicatorIndex = this.rowDimensionKeys.indexOf(IndicatorDimensionKeyPlaceholder);
|
|
67175
|
-
this._rowHeaderCellIds_FULL.forEach((cellIds) => {
|
|
67176
|
-
const indicator = cellIds.splice(indicatorIndex, 1);
|
|
67177
|
-
cellIds.splice(0, cellIds.length);
|
|
67178
|
-
cellIds.push(indicator[0]);
|
|
67179
|
-
});
|
|
67180
|
-
}
|
|
67181
|
-
else {
|
|
67182
|
-
this._rowHeaderCellIds_FULL.forEach((cellIds) => {
|
|
67183
|
-
cellIds.splice(0, cellIds.length);
|
|
67184
|
-
});
|
|
67185
|
-
}
|
|
67186
|
-
}
|
|
67187
|
-
}
|
|
67188
67138
|
}
|
|
67189
67139
|
function scaleWholeRangeSize(count, bandwidth, paddingInner, paddingOuter) {
|
|
67190
67140
|
if (paddingInner === 1) {
|
|
@@ -70971,7 +70921,7 @@
|
|
|
70971
70921
|
}
|
|
70972
70922
|
|
|
70973
70923
|
registerForVrender();
|
|
70974
|
-
const version = "0.25.
|
|
70924
|
+
const version = "0.25.5";
|
|
70975
70925
|
function getIcons() {
|
|
70976
70926
|
return get$2();
|
|
70977
70927
|
}
|