@visactor/vtable-calendar 1.14.2 → 1.14.4-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/dist/vtable-calendar.js +123 -33
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +5 -5
package/dist/vtable-calendar.js
CHANGED
|
@@ -36015,7 +36015,7 @@
|
|
|
36015
36015
|
return isHandlingChartQueue;
|
|
36016
36016
|
}
|
|
36017
36017
|
function renderChart(chart) {
|
|
36018
|
-
var _a, _b, _c, _d, _e, _f;
|
|
36018
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
36019
36019
|
const {
|
|
36020
36020
|
axes: axes,
|
|
36021
36021
|
dataId: dataId,
|
|
@@ -36062,10 +36062,10 @@
|
|
|
36062
36062
|
} = chart.getRootNode();
|
|
36063
36063
|
let updateSpec = !1;
|
|
36064
36064
|
if (table.options.specFormat) {
|
|
36065
|
-
const formatResult = table.options.specFormat(chart.attribute.spec);
|
|
36065
|
+
const formatResult = table.options.specFormat(chart.attribute.spec, chartInstance, chart);
|
|
36066
36066
|
if (formatResult.needFormatSpec && formatResult.spec) {
|
|
36067
36067
|
const spec = formatResult.spec;
|
|
36068
|
-
chartInstance.updateSpecSync(spec), updateSpec =
|
|
36068
|
+
chartInstance.updateSpecSync(spec), updateSpec = null === (_a = formatResult.updateSpec) || void 0 === _a || _a;
|
|
36069
36069
|
}
|
|
36070
36070
|
}
|
|
36071
36071
|
if (!updateSpec) if (null == axes || axes.forEach((axis, index) => {
|
|
@@ -36085,7 +36085,7 @@
|
|
|
36085
36085
|
tickMode: null === (_e = axis.tick) || void 0 === _e ? void 0 : _e.tickMode
|
|
36086
36086
|
}
|
|
36087
36087
|
}, !0);
|
|
36088
|
-
}), null === (
|
|
36088
|
+
}), null === (_c = null === (_b = table.internalProps.layoutMap) || void 0 === _b ? void 0 : _b.updateDataStateToActiveChartInstance) || void 0 === _c || _c.call(_b, chartInstance), "string" == typeof dataId) chartInstance.updateDataSync(dataId, null != data ? data : []);else {
|
|
36089
36089
|
const dataBatch = [];
|
|
36090
36090
|
for (const dataIdStr in dataId) {
|
|
36091
36091
|
const dataIdAndField = dataId[dataIdStr],
|
|
@@ -36095,11 +36095,11 @@
|
|
|
36095
36095
|
});
|
|
36096
36096
|
dataBatch.push({
|
|
36097
36097
|
id: dataIdStr,
|
|
36098
|
-
values: dataIdAndField ? null !== (
|
|
36099
|
-
fields: null === (
|
|
36100
|
-
}), chartInstance.updateFullDataSync || chartInstance.updateDataSync(dataIdStr, dataIdAndField ? null !== (
|
|
36098
|
+
values: dataIdAndField ? null !== (_d = null == data ? void 0 : data.filter(item => item.hasOwnProperty(dataIdAndField))) && void 0 !== _d ? _d : [] : null != data ? data : [],
|
|
36099
|
+
fields: null === (_e = null == series ? void 0 : series.data) || void 0 === _e ? void 0 : _e.fields
|
|
36100
|
+
}), chartInstance.updateFullDataSync || chartInstance.updateDataSync(dataIdStr, dataIdAndField ? null !== (_f = null == data ? void 0 : data.filter(item => item.hasOwnProperty(dataIdAndField))) && void 0 !== _f ? _f : [] : null != data ? data : []);
|
|
36101
36101
|
}
|
|
36102
|
-
null === (
|
|
36102
|
+
null === (_g = chartInstance.updateFullDataSync) || void 0 === _g || _g.call(chartInstance, dataBatch);
|
|
36103
36103
|
}
|
|
36104
36104
|
cacheStageCanvas(chartInstance.getStage(), chart);
|
|
36105
36105
|
}
|
|
@@ -36221,10 +36221,10 @@
|
|
|
36221
36221
|
context.drawImage(canvas, x, y, width, height);
|
|
36222
36222
|
}) : context.drawImage(cacheCanvas, x, y, width, height);else if (activeChartInstance) {
|
|
36223
36223
|
if (table.options.specFormat) {
|
|
36224
|
-
const formatResult = table.options.specFormat(chart.attribute.spec);
|
|
36224
|
+
const formatResult = table.options.specFormat(chart.attribute.spec, activeChartInstance, chart);
|
|
36225
36225
|
if (formatResult.needFormatSpec && formatResult.spec) {
|
|
36226
36226
|
const spec = formatResult.spec;
|
|
36227
|
-
|
|
36227
|
+
activeChartInstance.updateSpecSync(spec);
|
|
36228
36228
|
}
|
|
36229
36229
|
}
|
|
36230
36230
|
const viewBox = chart.getViewBox();
|
|
@@ -40326,13 +40326,13 @@
|
|
|
40326
40326
|
if (this.table.transpose) null === (_a = this.bodyGroup.children) || void 0 === _a || _a.forEach(columnGroup => {
|
|
40327
40327
|
var _a;
|
|
40328
40328
|
null === (_a = columnGroup.getChildAt(row)) || void 0 === _a || _a.getChildren().forEach(node => {
|
|
40329
|
-
"checkbox" === node.name && node.setAttribute("checked", checked);
|
|
40329
|
+
"checkbox" === node.name && ("indeterminate" === checked ? (node.setAttribute("indeterminate", !0), node.setAttribute("checked", void 0)) : (node.setAttribute("indeterminate", void 0), node.setAttribute("checked", checked)));
|
|
40330
40330
|
});
|
|
40331
40331
|
});else {
|
|
40332
40332
|
const columnGroup = this.getColGroup(col);
|
|
40333
40333
|
null === (_b = null == columnGroup ? void 0 : columnGroup.children) || void 0 === _b || _b.forEach(cellNode => {
|
|
40334
40334
|
cellNode.getChildren().find(node => {
|
|
40335
|
-
"checkbox" === node.name && node.setAttribute("checked", checked);
|
|
40335
|
+
"checkbox" === node.name && ("indeterminate" === checked ? (node.setAttribute("indeterminate", !0), node.setAttribute("checked", void 0)) : (node.setAttribute("indeterminate", void 0), node.setAttribute("checked", checked)));
|
|
40336
40336
|
});
|
|
40337
40337
|
});
|
|
40338
40338
|
}
|
|
@@ -41674,12 +41674,12 @@
|
|
|
41674
41674
|
allUnChecked = !0,
|
|
41675
41675
|
hasChecked = !1;
|
|
41676
41676
|
return state.checkedState.forEach((check_state, index) => {
|
|
41677
|
-
var _a;
|
|
41677
|
+
var _a, _b;
|
|
41678
41678
|
index = index.includes(",") ? index.split(",").map(item => Number(item)) : Number(index);
|
|
41679
41679
|
const tableIndex = state.table.getTableIndexByRecordIndex(index),
|
|
41680
41680
|
mergeCell = state.table.transpose ? state.table.getCustomMerge(tableIndex, row) : state.table.getCustomMerge(col, tableIndex),
|
|
41681
41681
|
data = null === (_a = state.table.dataSource) || void 0 === _a ? void 0 : _a.get(index);
|
|
41682
|
-
mergeCell || data.vtableMerge || (!0 !== (null == check_state ? void 0 : check_state[field]) ? allChecked = !1 : (allUnChecked = !1, hasChecked = !0));
|
|
41682
|
+
mergeCell || !(null === (_b = state.table.internalProps.rowSeriesNumber) || void 0 === _b ? void 0 : _b.enableTreeCheckbox) && data.vtableMerge || (!0 !== (null == check_state ? void 0 : check_state[field]) ? allChecked = !1 : (allUnChecked = !1, hasChecked = !0));
|
|
41683
41683
|
}), allChecked ? (state.headerCheckedState[field] = !0, allChecked) : allUnChecked ? (state.headerCheckedState[field] = !1, !1) : !!hasChecked && (state.headerCheckedState[field] = "indeterminate", "indeterminate");
|
|
41684
41684
|
}
|
|
41685
41685
|
function initLeftRecordsCheckState(records, state) {
|
|
@@ -41718,6 +41718,11 @@
|
|
|
41718
41718
|
} = checkbox.attribute;
|
|
41719
41719
|
indeterminate ? (checked || checkbox._handlePointerUp(), checkbox._handlePointerUp()) : oldChecked ? checked || checkbox._handlePointerUp() : checked && checkbox._handlePointerUp();
|
|
41720
41720
|
}
|
|
41721
|
+
function setCellCheckboxStateByAttribute(col, row, checked, table) {
|
|
41722
|
+
const cellGroup = table.scenegraph.getCell(col, row),
|
|
41723
|
+
checkbox = null == cellGroup ? void 0 : cellGroup.getChildByName("checkbox");
|
|
41724
|
+
checkbox && ("indeterminate" === checked ? (checkbox.setAttribute("indeterminate", !0), checkbox.setAttribute("checked", void 0)) : (checkbox.setAttribute("indeterminate", void 0), checkbox.setAttribute("checked", checked)));
|
|
41725
|
+
}
|
|
41721
41726
|
function changeCheckboxOrder(sourceIndex, targetIndex, state) {
|
|
41722
41727
|
const {
|
|
41723
41728
|
checkedState: checkedState,
|
|
@@ -43815,6 +43820,69 @@
|
|
|
43815
43820
|
return "bottom";
|
|
43816
43821
|
}
|
|
43817
43822
|
|
|
43823
|
+
function bindGroupTitleCheckboxChange(table) {
|
|
43824
|
+
table.on("checkbox_state_change", args => {
|
|
43825
|
+
var _a;
|
|
43826
|
+
if (!0 !== (null === (_a = table.internalProps.rowSeriesNumber) || void 0 === _a ? void 0 : _a.enableTreeCheckbox)) return;
|
|
43827
|
+
const {
|
|
43828
|
+
col: col,
|
|
43829
|
+
row: row,
|
|
43830
|
+
checked: checked
|
|
43831
|
+
} = args,
|
|
43832
|
+
record = table.getCellOriginRecord(col, row),
|
|
43833
|
+
indexedData = table.dataSource.currentPagerIndexedData,
|
|
43834
|
+
titleShowIndex = table.getRecordShowIndexByCell(col, row);
|
|
43835
|
+
let titleIndex = indexedData[titleShowIndex];
|
|
43836
|
+
if (isNumber$2(titleIndex) && (titleIndex = [titleIndex]), record.vtableMerge) {
|
|
43837
|
+
if (checked) setAllChildrenCheckboxState(!0, titleShowIndex, titleIndex, indexedData, table), updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table);else {
|
|
43838
|
+
setAllChildrenCheckboxState(!1, titleShowIndex, titleIndex, indexedData, table), updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table);
|
|
43839
|
+
const oldHeaderCheckedState = table.stateManager.headerCheckedState._vtable_rowSeries_number,
|
|
43840
|
+
newHeaderCheckedState = table.stateManager.updateHeaderCheckedState("_vtable_rowSeries_number", col, row);
|
|
43841
|
+
oldHeaderCheckedState !== newHeaderCheckedState && table.scenegraph.updateHeaderCheckboxCellState(col, row, newHeaderCheckedState);
|
|
43842
|
+
}
|
|
43843
|
+
} else updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table);
|
|
43844
|
+
});
|
|
43845
|
+
}
|
|
43846
|
+
function setAllChildrenCheckboxState(state, titleShowIndex, titleIndex, indexedData, table) {
|
|
43847
|
+
var _a;
|
|
43848
|
+
let i = titleShowIndex + 1;
|
|
43849
|
+
for (; isArray$1(indexedData[i]) && (null === (_a = indexedData[i]) || void 0 === _a ? void 0 : _a.length) > titleIndex.length;) {
|
|
43850
|
+
const row = table.columnHeaderLevelCount + i;
|
|
43851
|
+
table.stateManager.setCheckedState(0, row, "_vtable_rowSeries_number", state), setCellCheckboxStateByAttribute(0, row, state, table), i++;
|
|
43852
|
+
}
|
|
43853
|
+
}
|
|
43854
|
+
function updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table) {
|
|
43855
|
+
var _a;
|
|
43856
|
+
let parentLength = titleIndex.length - 1;
|
|
43857
|
+
if (parentLength > 0) {
|
|
43858
|
+
let i = titleShowIndex - 1;
|
|
43859
|
+
for (; parentLength > 0 && i >= 0;) {
|
|
43860
|
+
if (isArray$1(indexedData[i]) && (null === (_a = indexedData[i]) || void 0 === _a ? void 0 : _a.length) === parentLength || 1 === parentLength && isNumber$2(indexedData[i])) {
|
|
43861
|
+
updateParentCheckboxState(0, table.columnHeaderLevelCount + i, indexedData[i], table), parentLength--;
|
|
43862
|
+
}
|
|
43863
|
+
i--;
|
|
43864
|
+
}
|
|
43865
|
+
}
|
|
43866
|
+
}
|
|
43867
|
+
function updateParentCheckboxState(col, row, currentIndex, table) {
|
|
43868
|
+
const {
|
|
43869
|
+
checkedState: checkedState
|
|
43870
|
+
} = table.stateManager,
|
|
43871
|
+
key = currentIndex.toString(),
|
|
43872
|
+
currentIndexLength = isArray$1(currentIndex) ? currentIndex.length : 1;
|
|
43873
|
+
let start = !1;
|
|
43874
|
+
const result = [];
|
|
43875
|
+
if (checkedState.forEach((value, index) => {
|
|
43876
|
+
if (start) {
|
|
43877
|
+
index.split(",").length === currentIndexLength ? start = !1 : result.push(value._vtable_rowSeries_number);
|
|
43878
|
+
}
|
|
43879
|
+
index === key && (start = !0);
|
|
43880
|
+
}), 0 === result.length) return;
|
|
43881
|
+
const allChecked = result.every(item => !!item),
|
|
43882
|
+
allUnChecked = result.every(item => !item);
|
|
43883
|
+
allChecked ? (table.stateManager.setCheckedState(col, row, "_vtable_rowSeries_number", !0), setCellCheckboxStateByAttribute(col, row, !0, table)) : allUnChecked ? (table.stateManager.setCheckedState(col, row, "_vtable_rowSeries_number", !1), setCellCheckboxStateByAttribute(col, row, !1, table)) : (table.stateManager.setCheckedState(col, row, "_vtable_rowSeries_number", "indeterminate"), setCellCheckboxStateByAttribute(col, row, "indeterminate", table));
|
|
43884
|
+
}
|
|
43885
|
+
|
|
43818
43886
|
class EventManager {
|
|
43819
43887
|
constructor(table) {
|
|
43820
43888
|
this.isDown = !1, this.isDraging = !1, this.globalEventListeners = [], this._enableTableScroll = !0, this.table = table, this.handleTextStickBindId = [], this.inertiaScroll = new InertiaScroll(table.stateManager), "node" === Env.mode || table.options.disableInteraction || (this.bindOuterEvent(), setTimeout(() => {
|
|
@@ -43875,7 +43943,7 @@
|
|
|
43875
43943
|
});
|
|
43876
43944
|
}
|
|
43877
43945
|
}
|
|
43878
|
-
}), this.table.isPivotTable() && checkHaveDrill(this.table) && bindDrillEvent(this.table), bindSparklineHoverEvent(this.table), bindAxisClickEvent(this.table), bindAxisHoverEvent(this.table);
|
|
43946
|
+
}), this.table.isPivotTable() && checkHaveDrill(this.table) && bindDrillEvent(this.table), bindSparklineHoverEvent(this.table), bindAxisClickEvent(this.table), bindAxisHoverEvent(this.table), bindGroupTitleCheckboxChange(this.table);
|
|
43879
43947
|
}
|
|
43880
43948
|
dealTableHover(eventArgsSet) {
|
|
43881
43949
|
if (!eventArgsSet) return void this.table.stateManager.updateHoverPos(-1, -1);
|
|
@@ -44927,7 +44995,12 @@
|
|
|
44927
44995
|
showSort: showSort,
|
|
44928
44996
|
sort: sort
|
|
44929
44997
|
} = this._table.internalProps.layoutMap.getHeader(col, row);
|
|
44930
|
-
|
|
44998
|
+
let _showSort;
|
|
44999
|
+
if (_showSort = "function" == typeof showSort ? showSort({
|
|
45000
|
+
col: col,
|
|
45001
|
+
row: row,
|
|
45002
|
+
table: this._table
|
|
45003
|
+
}) : showSort, _showSort) {
|
|
44931
45004
|
let order = this._table.getPivotSortState(col, row);
|
|
44932
45005
|
order && (order = order.toUpperCase());
|
|
44933
45006
|
const sortIcon = "ASC" === order ? this.upIcon : "DESC" === order ? this.downIcon : this.normalIcon;
|
|
@@ -45006,11 +45079,21 @@
|
|
|
45006
45079
|
getSortIcon(order, _table, col, row) {
|
|
45007
45080
|
const icon = "asc" === order ? this.upIcon : "desc" === order ? this.downIcon : this.normalIcon,
|
|
45008
45081
|
headerC = _table.getHeaderDefine(col, row);
|
|
45009
|
-
|
|
45082
|
+
let _showSort;
|
|
45083
|
+
return headerC && (_showSort = "function" == typeof headerC.showSort ? headerC.showSort({
|
|
45084
|
+
col: col,
|
|
45085
|
+
row: row,
|
|
45086
|
+
table: this._table
|
|
45087
|
+
}) : headerC.showSort), !headerC || !1 === _showSort || !isValid$1(_showSort) && !headerC.sort || headerC.columns && headerC.columns.length > 0 ? null : icon;
|
|
45010
45088
|
}
|
|
45011
45089
|
getSortIconForPivotTable(order, _table, col, row) {
|
|
45012
45090
|
const headerC = _table.getHeaderDefine(col, row);
|
|
45013
|
-
|
|
45091
|
+
let _showSort;
|
|
45092
|
+
if (headerC && (_showSort = "function" == typeof headerC.showSort ? headerC.showSort({
|
|
45093
|
+
col: col,
|
|
45094
|
+
row: row,
|
|
45095
|
+
table: this._table
|
|
45096
|
+
}) : headerC.showSort), !headerC || !1 === _showSort || !isValid$1(_showSort) && !headerC.sort || headerC.columns && headerC.columns.length > 0) return null;
|
|
45014
45097
|
return "ASC" === (null == order ? void 0 : order.toUpperCase()) ? this.upIcon : "DESC" === (null == order ? void 0 : order.toUpperCase()) ? this.downIcon : this.normalIcon;
|
|
45015
45098
|
}
|
|
45016
45099
|
getDropDownStateIcons(_table, col, row) {
|
|
@@ -45345,7 +45428,7 @@
|
|
|
45345
45428
|
constructor(tree, sharedVar) {
|
|
45346
45429
|
let hierarchyType = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "grid";
|
|
45347
45430
|
let rowExpandLevel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : void 0;
|
|
45348
|
-
this.sizeIncludeParent = !1, this.tree = {
|
|
45431
|
+
this.hasHideNode = !1, this.sizeIncludeParent = !1, this.tree = {
|
|
45349
45432
|
id: 0,
|
|
45350
45433
|
dimensionKey: "",
|
|
45351
45434
|
value: "",
|
|
@@ -45359,11 +45442,11 @@
|
|
|
45359
45442
|
}, this.totalLevel = 0, this.dimensionKeys = new NumberMap(), this.dimensionKeysIncludeVirtual = new NumberMap(), this.cache = new Map(), this.sizeIncludeParent = null != rowExpandLevel, this.rowExpandLevel = rowExpandLevel, this.hierarchyType = hierarchyType, this.sharedVar = sharedVar, this.reset(tree);
|
|
45360
45443
|
}
|
|
45361
45444
|
reset(tree) {
|
|
45362
|
-
this.cache.clear(), this.dimensionKeys = new NumberMap(), this.dimensionKeysIncludeVirtual = new NumberMap(), this.tree.children = tree, this.setTreeNode(this.tree, 0, this.tree);
|
|
45445
|
+
this.hasHideNode = !1, this.cache.clear(), this.dimensionKeys = new NumberMap(), this.dimensionKeysIncludeVirtual = new NumberMap(), this.tree.children = tree, this.setTreeNode(this.tree, 0, this.tree);
|
|
45363
45446
|
}
|
|
45364
45447
|
setTreeNode(node, startIndex, parent) {
|
|
45365
45448
|
var _a, _b;
|
|
45366
|
-
node.startIndex = startIndex, node.startInTotal = (null !== (_a = parent.startInTotal) && void 0 !== _a ? _a : 0) + node.startIndex, (null !== (_b = node.dimensionKey) && void 0 !== _b ? _b : node.indicatorKey) && (node.virtual || this.dimensionKeys.contain(node.indicatorKey ? IndicatorDimensionKeyPlaceholder : node.dimensionKey) || this.dimensionKeys.put(node.level, node.indicatorKey ? IndicatorDimensionKeyPlaceholder : node.dimensionKey), this.dimensionKeysIncludeVirtual.contain(node.indicatorKey ? IndicatorDimensionKeyPlaceholder : node.dimensionKey) || this.dimensionKeysIncludeVirtual.put(node.level, node.indicatorKey ? IndicatorDimensionKeyPlaceholder : node.dimensionKey), node.id || (node.id = ++this.sharedVar.seqId));
|
|
45449
|
+
node.startIndex = startIndex, node.startInTotal = (null !== (_a = parent.startInTotal) && void 0 !== _a ? _a : 0) + node.startIndex, node.hide && (this.hasHideNode = !0), (null !== (_b = node.dimensionKey) && void 0 !== _b ? _b : node.indicatorKey) && (node.virtual || this.dimensionKeys.contain(node.indicatorKey ? IndicatorDimensionKeyPlaceholder : node.dimensionKey) || this.dimensionKeys.put(node.level, node.indicatorKey ? IndicatorDimensionKeyPlaceholder : node.dimensionKey), this.dimensionKeysIncludeVirtual.contain(node.indicatorKey ? IndicatorDimensionKeyPlaceholder : node.dimensionKey) || this.dimensionKeysIncludeVirtual.put(node.level, node.indicatorKey ? IndicatorDimensionKeyPlaceholder : node.dimensionKey), node.id || (node.id = ++this.sharedVar.seqId));
|
|
45367
45450
|
let size = node.dimensionKey && this.sizeIncludeParent ? 1 : 0;
|
|
45368
45451
|
const children = node.children || node.columns;
|
|
45369
45452
|
return "grid" === this.hierarchyType ? (null == children ? void 0 : children.length) >= 1 ? children.forEach(n => {
|
|
@@ -46554,7 +46637,7 @@
|
|
|
46554
46637
|
constructor(container) {
|
|
46555
46638
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
46556
46639
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
46557
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.14.
|
|
46640
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.14.4-alpha.0", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
|
|
46558
46641
|
const {
|
|
46559
46642
|
frozenColCount = 0,
|
|
46560
46643
|
frozenRowCount: frozenRowCount,
|
|
@@ -47351,11 +47434,13 @@
|
|
|
47351
47434
|
customRender: customRender,
|
|
47352
47435
|
renderChartAsync: renderChartAsync,
|
|
47353
47436
|
renderChartAsyncBatchCount: renderChartAsyncBatchCount,
|
|
47437
|
+
canvasWidth: canvasWidth,
|
|
47438
|
+
canvasHeight: canvasHeight,
|
|
47354
47439
|
overscrollBehavior: overscrollBehavior,
|
|
47355
47440
|
limitMinWidth: limitMinWidth,
|
|
47356
47441
|
limitMinHeight: limitMinHeight
|
|
47357
47442
|
} = options;
|
|
47358
|
-
pixelRatio && pixelRatio !== this.internalProps.pixelRatio && (this.internalProps.pixelRatio = pixelRatio), padding && ("number" == typeof padding ? (this.padding.top = padding, this.padding.left = padding, this.padding.bottom = padding, this.padding.right = padding) : (padding.top && (this.padding.top = padding.top), padding.bottom && (this.padding.bottom = padding.bottom), padding.left && (this.padding.left = padding.left), padding.right && (this.padding.right = padding.right))), this.showFrozenIcon = "boolean" != typeof showFrozenIcon || showFrozenIcon, "number" == typeof allowFrozenColCount && allowFrozenColCount <= 0 && (this.showFrozenIcon = !1), this.widthMode = null != widthMode ? widthMode : "standard", this.heightMode = null != heightMode ? heightMode : "standard", this._widthAdaptiveMode = null != widthAdaptiveMode ? widthAdaptiveMode : "only-body", this._heightAdaptiveMode = null != heightAdaptiveMode ? heightAdaptiveMode : "only-body", this.autoFillWidth = null != autoFillWidth && autoFillWidth, this.autoFillHeight = null != autoFillHeight && autoFillHeight, this.customRender = customRender;
|
|
47443
|
+
pixelRatio && pixelRatio !== this.internalProps.pixelRatio && (this.internalProps.pixelRatio = pixelRatio), padding && ("number" == typeof padding ? (this.padding.top = padding, this.padding.left = padding, this.padding.bottom = padding, this.padding.right = padding) : (padding.top && (this.padding.top = padding.top), padding.bottom && (this.padding.bottom = padding.bottom), padding.left && (this.padding.left = padding.left), padding.right && (this.padding.right = padding.right))), this.showFrozenIcon = "boolean" != typeof showFrozenIcon || showFrozenIcon, "number" == typeof allowFrozenColCount && allowFrozenColCount <= 0 && (this.showFrozenIcon = !1), this.widthMode = null != widthMode ? widthMode : "standard", this.heightMode = null != heightMode ? heightMode : "standard", this._widthAdaptiveMode = null != widthAdaptiveMode ? widthAdaptiveMode : "only-body", this._heightAdaptiveMode = null != heightAdaptiveMode ? heightAdaptiveMode : "only-body", this.autoFillWidth = null != autoFillWidth && autoFillWidth, this.autoFillHeight = null != autoFillHeight && autoFillHeight, this.customRender = customRender, this.canvasWidth = canvasWidth, this.canvasHeight = canvasHeight;
|
|
47359
47444
|
const internalProps = this.internalProps;
|
|
47360
47445
|
if ("node" === Env.mode || options.canvas || updateRootElementPadding(internalProps.element, this.padding), this.columnWidthComputeMode = null !== (_a = options.columnWidthComputeMode) && void 0 !== _a ? _a : "normal", internalProps.frozenColCount = frozenColCount, internalProps.defaultRowHeight = defaultRowHeight, internalProps.defaultHeaderRowHeight = null != defaultHeaderRowHeight ? defaultHeaderRowHeight : defaultRowHeight, internalProps.defaultColWidth = defaultColWidth, internalProps.defaultHeaderColWidth = null != defaultHeaderColWidth ? defaultHeaderColWidth : defaultColWidth, internalProps.keyboardOptions = keyboardOptions, internalProps.eventOptions = eventOptions, internalProps.rowSeriesNumber = rowSeriesNumber, internalProps.columnResizeMode = columnResizeMode, internalProps.rowResizeMode = rowResizeMode, internalProps.dragHeaderMode = null != dragHeaderMode ? dragHeaderMode : "none", internalProps.renderChartAsync = renderChartAsync, setBatchRenderChartCount(renderChartAsyncBatchCount), internalProps.overscrollBehavior = null != overscrollBehavior ? overscrollBehavior : "auto", internalProps.cellTextOverflows = {}, internalProps._rowHeightsMap = new NumberRangeMap(this), internalProps._rowRangeHeightsMap = new Map(), internalProps._colRangeWidthsMap = new Map(), internalProps._widthResizedColMap = new Set(), internalProps._heightResizedRowMap = new Set(), this.colWidthsMap = new NumberMap(), this.colContentWidthsMap = new NumberMap(), this.colWidthsLimit = {}, internalProps.stick.changedCells.clear(), internalProps.theme = themes.of(null !== (_b = options.theme) && void 0 !== _b ? _b : themes.DEFAULT), internalProps.theme.isPivot = this.isPivotTable(), setIconColor(internalProps.theme.functionalIconsStyle), this.scenegraph.updateStageBackground(), internalProps.autoWrapText = options.autoWrapText, internalProps.enableLineBreak = options.enableLineBreak, internalProps.allowFrozenColCount = null !== (_c = options.allowFrozenColCount) && void 0 !== _c ? _c : 0, internalProps.limitMaxAutoWidth = null !== (_d = options.limitMaxAutoWidth) && void 0 !== _d ? _d : 450, internalProps.limitMinWidth = null != limitMinWidth ? "number" == typeof limitMinWidth ? limitMinWidth : limitMinWidth ? 10 : 0 : 10, internalProps.limitMinHeight = null != limitMinHeight ? "number" == typeof limitMinHeight ? limitMinHeight : limitMinHeight ? 10 : 0 : 10, null === (_e = internalProps.legends) || void 0 === _e || _e.forEach(legend => {
|
|
47361
47446
|
null == legend || legend.release();
|
|
@@ -48969,9 +49054,10 @@
|
|
|
48969
49054
|
return layout._cellRangeMap.set(`$${col}$${row}`, cellRange), cellRange;
|
|
48970
49055
|
}
|
|
48971
49056
|
function getTreeTitleMerge(col, row, cellRange, layout) {
|
|
49057
|
+
var _a;
|
|
48972
49058
|
if ("tree" !== layout.rowHierarchyType) return;
|
|
48973
49059
|
const cellRecord = layout._table.getCellRawRecord(col, row);
|
|
48974
|
-
(null == cellRecord ? void 0 : cellRecord.vtableMerge) && (cellRange.start.col = layout.rowHeaderLevelCount, cellRange.end.col = layout.colCount - 1, cellRange.start.row = cellRange.end.row = row);
|
|
49060
|
+
(null === (_a = layout._table.internalProps.rowSeriesNumber) || void 0 === _a ? void 0 : _a.enableTreeCheckbox) ? (null == cellRecord ? void 0 : cellRecord.vtableMerge) && col >= layout.leftRowSeriesNumberColumnCount && (cellRange.start.col = layout.rowHeaderLevelCount + layout.leftRowSeriesNumberColumnCount, cellRange.end.col = layout.colCount - 1, cellRange.start.row = cellRange.end.row = row) : (null == cellRecord ? void 0 : cellRecord.vtableMerge) && (cellRange.start.col = layout.rowHeaderLevelCount, cellRange.end.col = layout.colCount - 1, cellRange.start.row = cellRange.end.row = row);
|
|
48975
49061
|
}
|
|
48976
49062
|
function getCellRangeTranspose(col, row, layout) {
|
|
48977
49063
|
var _a, _b, _c, _d;
|
|
@@ -49652,7 +49738,7 @@
|
|
|
49652
49738
|
sourceIds.unshift(targetIndex - this.leftRowSeriesNumberColumnCount, 0), Array.prototype.splice.apply(this._headerCellIds[row], sourceIds);
|
|
49653
49739
|
}
|
|
49654
49740
|
const sourceColumns = this._columns.splice(sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, sourceSize);
|
|
49655
|
-
return sourceColumns.unshift(targetIndex - this.leftRowSeriesNumberColumnCount, 0), Array.prototype.splice.apply(this._columns, sourceColumns), this.columnTree.movePosition(sourceCellRange.start.row, sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, targetIndex - this.leftRowSeriesNumberColumnCount), this.columnTree.reset(this.columnTree.tree.children
|
|
49741
|
+
return sourceColumns.unshift(targetIndex - this.leftRowSeriesNumberColumnCount, 0), Array.prototype.splice.apply(this._columns, sourceColumns), this.columnTree.movePosition(sourceCellRange.start.row, sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, targetIndex - this.leftRowSeriesNumberColumnCount), this.columnTree.reset(this.columnTree.tree.children), this._cellRangeMap = new Map(), {
|
|
49656
49742
|
sourceIndex: sourceCellRange.start.col,
|
|
49657
49743
|
targetIndex: targetIndex,
|
|
49658
49744
|
sourceSize: sourceSize,
|
|
@@ -49671,7 +49757,7 @@
|
|
|
49671
49757
|
sourceIds.unshift(targetIndex, 0), Array.prototype.splice.apply(this._headerCellIds[row], sourceIds);
|
|
49672
49758
|
}
|
|
49673
49759
|
const sourceColumns = this._columns.splice(sourceCellRange.start.row, sourceSize);
|
|
49674
|
-
return sourceColumns.unshift(targetIndex, 0), Array.prototype.splice.apply(this._columns, sourceColumns), this.columnTree.movePosition(sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, sourceCellRange.start.row, targetIndex + (target.row > source.row ? sourceCellRange.end.row - sourceCellRange.start.row : 0)), this.columnTree.reset(this.columnTree.tree.children
|
|
49760
|
+
return sourceColumns.unshift(targetIndex, 0), Array.prototype.splice.apply(this._columns, sourceColumns), this.columnTree.movePosition(sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, sourceCellRange.start.row, targetIndex + (target.row > source.row ? sourceCellRange.end.row - sourceCellRange.start.row : 0)), this.columnTree.reset(this.columnTree.tree.children), this._cellRangeMap = new Map(), {
|
|
49675
49761
|
sourceIndex: sourceCellRange.start.row,
|
|
49676
49762
|
targetIndex: targetIndex,
|
|
49677
49763
|
sourceSize: sourceSize,
|
|
@@ -50363,12 +50449,13 @@
|
|
|
50363
50449
|
row: cellRow
|
|
50364
50450
|
}), rowEnd++);
|
|
50365
50451
|
}
|
|
50366
|
-
const newRowEnd = Math.min(rowStart + rowLimit, table.rowCount - 1 - table.bottomFrozenRowCount)
|
|
50452
|
+
const newRowEnd = Math.min(rowStart + rowLimit, table.rowCount - 1 - table.bottomFrozenRowCount),
|
|
50453
|
+
notFullRow = newRowEnd < rowStart + rowLimit;
|
|
50367
50454
|
for (let i = 0; i < removeCellPositions.length; i++) {
|
|
50368
50455
|
const {
|
|
50369
50456
|
row: cellRow
|
|
50370
50457
|
} = removeCellPositions[removeCellPositions.length - i - 1];
|
|
50371
|
-
cellRow < rowStart || cellRow > rowEnd || (cellRow > newRowEnd ? (removeCells.push({
|
|
50458
|
+
cellRow < rowStart || cellRow > rowEnd || (cellRow > newRowEnd || notFullRow ? (removeCells.push({
|
|
50372
50459
|
col: col,
|
|
50373
50460
|
row: cellRow
|
|
50374
50461
|
}), updateRow--) : updateRow = Math.min(updateRow, cellRow));
|
|
@@ -50464,16 +50551,17 @@
|
|
|
50464
50551
|
} = table.internalProps.layoutMap.getSeriesNumberHeader(col, row);
|
|
50465
50552
|
return title;
|
|
50466
50553
|
}
|
|
50554
|
+
let value;
|
|
50467
50555
|
if (this.options.groupBy) {
|
|
50468
50556
|
const record = table.getCellRawRecord(col, row);
|
|
50469
50557
|
if (null == record ? void 0 : record.vtableMerge) return "";
|
|
50470
50558
|
const indexs = this.dataSource.currentIndexedData[row - this.columnHeaderLevelCount];
|
|
50471
|
-
|
|
50472
|
-
}
|
|
50559
|
+
value = indexs[indexs.length - 1] + 1;
|
|
50560
|
+
} else value = row - this.columnHeaderLevelCount + 1;
|
|
50473
50561
|
const {
|
|
50474
50562
|
format: format
|
|
50475
50563
|
} = table.internalProps.layoutMap.getSeriesNumberBody(col, row);
|
|
50476
|
-
return "function" == typeof format ? format(col, row, this) :
|
|
50564
|
+
return "function" == typeof format ? format(col, row, this, value) : value;
|
|
50477
50565
|
}
|
|
50478
50566
|
if (table.internalProps.layoutMap.isHeader(col, row)) {
|
|
50479
50567
|
const {
|
|
@@ -54025,7 +54113,7 @@
|
|
|
54025
54113
|
canvas: null !== (_0 = table.canvas) && void 0 !== _0 ? _0 : table.scenegraph.stage.window.getContext().canvas,
|
|
54026
54114
|
mode: table.options.mode,
|
|
54027
54115
|
modeParams: table.options.modeParams,
|
|
54028
|
-
spec: chartSpec,
|
|
54116
|
+
spec: table.options.specTransformInCell ? table.options.specTransformInCell(chartSpec, col, row) : chartSpec,
|
|
54029
54117
|
ClassType: ClassType,
|
|
54030
54118
|
width: width - padding[3] - padding[1],
|
|
54031
54119
|
height: height - padding[2] - padding[0],
|
|
@@ -54035,7 +54123,9 @@
|
|
|
54035
54123
|
cellPadding: padding,
|
|
54036
54124
|
dpr: table.internalProps.pixelRatio,
|
|
54037
54125
|
axes: table.isPivotChart() ? table.internalProps.layoutMap.getChartAxes(col, row) : [],
|
|
54038
|
-
tableChartOption: table.options.chartOption
|
|
54126
|
+
tableChartOption: table.options.chartOption,
|
|
54127
|
+
col: col,
|
|
54128
|
+
row: row
|
|
54039
54129
|
});
|
|
54040
54130
|
cellGroup.appendChild(chartGroup), table.internalProps.layoutMap.setChartInstance(col, row, chartGroup.chartInstance);
|
|
54041
54131
|
}
|