@visactor/vtable-calendar 1.17.4-alpha.4 → 1.17.4-alpha.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/dist/vtable-calendar.js +156 -56
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +2 -2
package/dist/vtable-calendar.js
CHANGED
|
@@ -29234,6 +29234,10 @@
|
|
|
29234
29234
|
get selectionFillMode() {
|
|
29235
29235
|
var _a;
|
|
29236
29236
|
return null !== (_a = null == selectionStyle ? void 0 : selectionStyle.selectionFillMode) && void 0 !== _a ? _a : "overlay";
|
|
29237
|
+
},
|
|
29238
|
+
get dynamicUpdateSelectionSize() {
|
|
29239
|
+
var _a;
|
|
29240
|
+
return null !== (_a = null == selectionStyle ? void 0 : selectionStyle.dynamicUpdateSelectionSize) && void 0 !== _a && _a;
|
|
29237
29241
|
}
|
|
29238
29242
|
};
|
|
29239
29243
|
}
|
|
@@ -32239,16 +32243,15 @@
|
|
|
32239
32243
|
}
|
|
32240
32244
|
function getCellCornerRadius(col, row, table) {
|
|
32241
32245
|
const tableCornerRadius = table.theme.frameStyle.cornerRadius;
|
|
32242
|
-
if (table.theme.cellInnerBorder)
|
|
32243
|
-
if (
|
|
32244
|
-
|
|
32245
|
-
|
|
32246
|
-
|
|
32247
|
-
|
|
32248
|
-
|
|
32249
|
-
|
|
32250
|
-
|
|
32251
|
-
if (col === table.colCount - 1 && row === table.rowCount - 1) return [0, 0, tableCornerRadius, 0];
|
|
32246
|
+
if (table.theme.cellInnerBorder) {
|
|
32247
|
+
if (Array.isArray(tableCornerRadius)) {
|
|
32248
|
+
const radius = [0, 0, 0, 0];
|
|
32249
|
+
return 0 === col && 0 === row && (radius[0] = tableCornerRadius[0]), col === table.colCount - 1 && 0 === row && (radius[1] = tableCornerRadius[1]), 0 === col && row === table.rowCount - 1 && (radius[3] = tableCornerRadius[3]), col === table.colCount - 1 && row === table.rowCount - 1 && (radius[2] = tableCornerRadius[2]), radius;
|
|
32250
|
+
}
|
|
32251
|
+
if (tableCornerRadius) {
|
|
32252
|
+
const radius = [0, 0, 0, 0];
|
|
32253
|
+
return 0 === col && 0 === row && (radius[0] = tableCornerRadius), col === table.colCount - 1 && 0 === row && (radius[1] = tableCornerRadius), 0 === col && row === table.rowCount - 1 && (radius[3] = tableCornerRadius), col === table.colCount - 1 && row === table.rowCount - 1 && (radius[2] = tableCornerRadius), radius;
|
|
32254
|
+
}
|
|
32252
32255
|
}
|
|
32253
32256
|
return 0;
|
|
32254
32257
|
}
|
|
@@ -34049,7 +34052,7 @@
|
|
|
34049
34052
|
function _generateCustomElementsGroup(table, define, col, row, cellWidth, cellHeight, padding, range, customResult) {
|
|
34050
34053
|
let customElementsGroup,
|
|
34051
34054
|
renderDefault = !0;
|
|
34052
|
-
if (customResult) customElementsGroup = customResult.elementsGroup, renderDefault = customResult.renderDefault;else {
|
|
34055
|
+
if (customResult) customElementsGroup = customResult.elementsGroup, renderDefault = customResult.renderDefault;else if (null == range ? void 0 : range.isCustom) ;else {
|
|
34053
34056
|
let customRender, customLayout;
|
|
34054
34057
|
if ("body" !== table.getCellLocation(col, row) ? (customRender = null == define ? void 0 : define.headerCustomRender, customLayout = null == define ? void 0 : define.headerCustomLayout) : (customRender = (null == define ? void 0 : define.customRender) || table.customRender, customLayout = null == define ? void 0 : define.customLayout), customLayout || customRender) {
|
|
34055
34058
|
const customResult = dealWithCustom(customLayout, customRender, col, row, cellWidth, cellHeight, !1, table.isAutoRowHeight(row), padding, range, table);
|
|
@@ -36576,17 +36579,13 @@
|
|
|
36576
36579
|
}
|
|
36577
36580
|
Chart.temp = 1;
|
|
36578
36581
|
|
|
36579
|
-
|
|
36580
|
-
|
|
36581
|
-
let
|
|
36582
|
-
batchRenderChartCount = 5,
|
|
36582
|
+
const chartRenderKeys = [];
|
|
36583
|
+
const chartRenderQueueList = [];
|
|
36584
|
+
let batchRenderChartCount = 5,
|
|
36583
36585
|
isHandlingChartQueue = !1;
|
|
36584
36586
|
function setBatchRenderChartCount(count) {
|
|
36585
36587
|
isValid$3(count) && (batchRenderChartCount = count);
|
|
36586
36588
|
}
|
|
36587
|
-
function clearChartRenderQueue() {
|
|
36588
|
-
chartRenderKeys = [], chartRenderQueueList = [], isHandlingChartQueue = !1, cancelAnimationFrame(requestAnimationFrameId);
|
|
36589
|
-
}
|
|
36590
36589
|
function IsHandlingChartQueue() {
|
|
36591
36590
|
return isHandlingChartQueue;
|
|
36592
36591
|
}
|
|
@@ -36680,7 +36679,7 @@
|
|
|
36680
36679
|
cacheStageCanvas(chartInstance.getStage(), chart);
|
|
36681
36680
|
}
|
|
36682
36681
|
function startRenderChartQueue(table) {
|
|
36683
|
-
isHandlingChartQueue = !0, chartRenderQueueList.length > 0 ?
|
|
36682
|
+
isHandlingChartQueue = !0, chartRenderQueueList.length > 0 ? requestAnimationFrame(() => {
|
|
36684
36683
|
const chartsToRender = chartRenderQueueList.splice(0, batchRenderChartCount);
|
|
36685
36684
|
chartRenderKeys.splice(0, batchRenderChartCount), chartsToRender.forEach(chart => {
|
|
36686
36685
|
renderChart(chart), chart.addUpdateBoundTag();
|
|
@@ -39226,7 +39225,10 @@
|
|
|
39226
39225
|
if (!isNearBottomColHeader && table.bottomFrozenRowCount && endRow < table.rowCount - table.bottomFrozenRowCount) {
|
|
39227
39226
|
table.getRowsHeight(0, endRow) - table.scrollTop > table.tableNoFrameHeight - table.getBottomFrozenRowsHeight() && (isNearBottomColHeader = !0);
|
|
39228
39227
|
}
|
|
39229
|
-
|
|
39228
|
+
const {
|
|
39229
|
+
dynamicUpdateSelectionSize: dynamicUpdateSelectionSize
|
|
39230
|
+
} = table.theme.selectionStyle;
|
|
39231
|
+
if (isNearRowHeader && (selectComp.rect.attribute.stroke[3] || dynamicUpdateSelectionSize) || isNearRightRowHeader && (selectComp.rect.attribute.stroke[1] || dynamicUpdateSelectionSize) || isNearColHeader && (selectComp.rect.attribute.stroke[0] || dynamicUpdateSelectionSize) || isNearBottomColHeader && (selectComp.rect.attribute.stroke[2] || dynamicUpdateSelectionSize)) {
|
|
39230
39232
|
if (isNearRowHeader && selectComp.rect.attribute.stroke[3] && scene.tableGroup.insertAfter(selectComp.rect, "columnHeader" === selectComp.role ? scene.cornerHeaderGroup : "bottomFrozen" === selectComp.role ? scene.leftBottomCornerGroup : scene.rowHeaderGroup), isNearBottomColHeader && selectComp.rect.attribute.stroke[2] && scene.tableGroup.insertAfter(selectComp.rect, "rowHeader" === selectComp.role ? scene.leftBottomCornerGroup : "rightFrozen" === selectComp.role ? scene.rightBottomCornerGroup : scene.bottomFrozenGroup), isNearColHeader && selectComp.rect.attribute.stroke[0] && scene.tableGroup.insertAfter(selectComp.rect, "rowHeader" === selectComp.role ? scene.cornerHeaderGroup : "rightFrozen" === selectComp.role ? scene.rightTopCornerGroup : scene.colHeaderGroup), isNearRightRowHeader && selectComp.rect.attribute.stroke[1] && scene.tableGroup.insertAfter(selectComp.rect, "columnHeader" === selectComp.role ? scene.rightTopCornerGroup : "bottomFrozen" === selectComp.role ? scene.rightBottomCornerGroup : scene.rightFrozenGroup), selectComp.rect.attribute.x < table.getFrozenColsWidth() && table.scrollLeft > 0 && ("body" === selectComp.role || "columnHeader" === selectComp.role || "bottomFrozen" === selectComp.role)) {
|
|
39231
39233
|
const width = selectComp.rect.attribute.width - (table.getFrozenColsWidth() - selectComp.rect.attribute.x);
|
|
39232
39234
|
selectComp.rect.setAttributes({
|
|
@@ -42352,7 +42354,14 @@
|
|
|
42352
42354
|
if (recordIndex >= 0) {
|
|
42353
42355
|
const dataIndex = state.table.dataSource.getIndexKey(recordIndex).toString();
|
|
42354
42356
|
if (isValid$3(null === (_b = state.checkedState.get(dataIndex)) || void 0 === _b ? void 0 : _b[field])) return state.checkedState.get(dataIndex)[field];
|
|
42355
|
-
state.checkedState.has(dataIndex)
|
|
42357
|
+
if (state.checkedState.has(dataIndex)) state.checkedState.get(dataIndex)[field] = checked;else if (dataIndex.includes(",")) {
|
|
42358
|
+
const parentDataIndex = dataIndex.split(",").slice(0, -1).join(",");
|
|
42359
|
+
state.checkedState.has(parentDataIndex) && !0 === state.checkedState.get(parentDataIndex)[field] ? state.checkedState.set(dataIndex, {
|
|
42360
|
+
[field]: !0
|
|
42361
|
+
}) : state.checkedState.set(dataIndex, {
|
|
42362
|
+
[field]: checked
|
|
42363
|
+
});
|
|
42364
|
+
} else state.checkedState.set(dataIndex, {
|
|
42356
42365
|
[field]: checked
|
|
42357
42366
|
});
|
|
42358
42367
|
}
|
|
@@ -42433,7 +42442,7 @@
|
|
|
42433
42442
|
} = state;
|
|
42434
42443
|
let source, target;
|
|
42435
42444
|
if (table.internalProps.transpose ? (sourceIndex = table.getRecordShowIndexByCell(sourceIndex, 0), targetIndex = table.getRecordShowIndexByCell(targetIndex, 0)) : (source = table.isPivotTable() ? void 0 : table.getRecordIndexByCell(0, sourceIndex), target = table.isPivotTable() ? void 0 : table.getRecordIndexByCell(0, targetIndex)), isNumber$4(source) && isNumber$4(target)) {
|
|
42436
|
-
if (sourceIndex > targetIndex) {
|
|
42445
|
+
if ((sourceIndex = source) > (targetIndex = target)) {
|
|
42437
42446
|
const sourceRecord = checkedState.get(sourceIndex.toString());
|
|
42438
42447
|
for (let i = sourceIndex; i > targetIndex; i--) checkedState.set(i.toString(), checkedState.get((i - 1).toString()));
|
|
42439
42448
|
checkedState.set(targetIndex.toString(), sourceRecord);
|
|
@@ -44676,20 +44685,22 @@
|
|
|
44676
44685
|
|
|
44677
44686
|
function bindGroupTitleCheckboxChange(table) {
|
|
44678
44687
|
table.on("checkbox_state_change", args => {
|
|
44679
|
-
var _a;
|
|
44680
|
-
if (!0 !== (null === (_a = table.internalProps.rowSeriesNumber) || void 0 === _a ? void 0 : _a.enableTreeCheckbox)) return;
|
|
44688
|
+
var _a, _b;
|
|
44681
44689
|
const {
|
|
44682
|
-
|
|
44683
|
-
|
|
44684
|
-
|
|
44685
|
-
|
|
44686
|
-
|
|
44690
|
+
col: col,
|
|
44691
|
+
row: row,
|
|
44692
|
+
checked: checked,
|
|
44693
|
+
field: field
|
|
44694
|
+
} = args;
|
|
44695
|
+
if ("_vtable_rowSeries_number" !== field || !0 !== (null === (_a = table.internalProps.rowSeriesNumber) || void 0 === _a ? void 0 : _a.enableTreeCheckbox)) return;
|
|
44696
|
+
if (table.isHeader(col, row)) return;
|
|
44697
|
+
const record = table.getCellOriginRecord(col, row),
|
|
44687
44698
|
indexedData = table.dataSource.currentPagerIndexedData,
|
|
44688
44699
|
titleShowIndex = table.getRecordShowIndexByCell(col, row);
|
|
44689
44700
|
let titleIndex = indexedData[titleShowIndex];
|
|
44690
|
-
if (isNumber$4(titleIndex) && (titleIndex = [titleIndex]), record.vtableMerge) {
|
|
44691
|
-
if (checked)
|
|
44692
|
-
|
|
44701
|
+
if (isNumber$4(titleIndex) && (titleIndex = [titleIndex]), record.vtableMerge || (null === (_b = record.children) || void 0 === _b ? void 0 : _b.length)) {
|
|
44702
|
+
if (checked) getHierarchyState(table, col, row) === HierarchyState.collapse ? updateChildrenCheckboxState(!0, titleIndex, table) : setAllChildrenCheckboxState(!0, titleShowIndex, titleIndex, indexedData, table), updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table);else {
|
|
44703
|
+
getHierarchyState(table, col, row) === HierarchyState.collapse ? updateChildrenCheckboxState(!1, titleIndex, table) : setAllChildrenCheckboxState(!1, titleShowIndex, titleIndex, indexedData, table), updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table);
|
|
44693
44704
|
const oldHeaderCheckedState = table.stateManager.headerCheckedState._vtable_rowSeries_number,
|
|
44694
44705
|
newHeaderCheckedState = table.stateManager.updateHeaderCheckedState("_vtable_rowSeries_number", col, row);
|
|
44695
44706
|
oldHeaderCheckedState !== newHeaderCheckedState && table.scenegraph.updateHeaderCheckboxCellState(col, row, newHeaderCheckedState);
|
|
@@ -44725,8 +44736,23 @@
|
|
|
44725
44736
|
key = currentIndex.toString(),
|
|
44726
44737
|
currentIndexLength = isArray$7(currentIndex) ? currentIndex.length : 1;
|
|
44727
44738
|
let start = !1;
|
|
44728
|
-
const result = []
|
|
44729
|
-
|
|
44739
|
+
const result = [],
|
|
44740
|
+
keys = Array.from(checkedState.keys()).sort((a, b) => {
|
|
44741
|
+
var _a, _b;
|
|
44742
|
+
const aArr = a.split(","),
|
|
44743
|
+
bArr = b.split(","),
|
|
44744
|
+
maxLength = Math.max(aArr.length, bArr.length);
|
|
44745
|
+
for (let i = 0; i < maxLength; i++) {
|
|
44746
|
+
const a = null !== (_a = Number(aArr[i])) && void 0 !== _a ? _a : 0,
|
|
44747
|
+
b = null !== (_b = Number(bArr[i])) && void 0 !== _b ? _b : 0;
|
|
44748
|
+
if (a !== b) return a - b;
|
|
44749
|
+
}
|
|
44750
|
+
return 0;
|
|
44751
|
+
}),
|
|
44752
|
+
stateArr = keys.map(key => checkedState.get(key));
|
|
44753
|
+
if (stateArr.forEach((state, i) => {
|
|
44754
|
+
const index = keys[i],
|
|
44755
|
+
value = state;
|
|
44730
44756
|
if (start) {
|
|
44731
44757
|
index.split(",").length === currentIndexLength ? start = !1 : result.push(value._vtable_rowSeries_number);
|
|
44732
44758
|
}
|
|
@@ -44736,20 +44762,60 @@
|
|
|
44736
44762
|
allUnChecked = result.every(item => !item);
|
|
44737
44763
|
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));
|
|
44738
44764
|
}
|
|
44739
|
-
function updateChildrenCheckboxState(
|
|
44765
|
+
function updateChildrenCheckboxState(parentState, currentIndex, table) {
|
|
44740
44766
|
const {
|
|
44741
44767
|
checkedState: checkedState
|
|
44742
44768
|
} = table.stateManager,
|
|
44743
44769
|
key = currentIndex.toString(),
|
|
44744
44770
|
currentIndexLength = isArray$7(currentIndex) ? currentIndex.length : 1;
|
|
44745
44771
|
let start = !1;
|
|
44746
|
-
checkedState.
|
|
44772
|
+
const keys = Array.from(checkedState.keys()).sort((a, b) => {
|
|
44773
|
+
var _a, _b;
|
|
44774
|
+
const aArr = a.split(","),
|
|
44775
|
+
bArr = b.split(","),
|
|
44776
|
+
maxLength = Math.max(aArr.length, bArr.length);
|
|
44777
|
+
for (let i = 0; i < maxLength; i++) {
|
|
44778
|
+
const a = null !== (_a = Number(aArr[i])) && void 0 !== _a ? _a : 0,
|
|
44779
|
+
b = null !== (_b = Number(bArr[i])) && void 0 !== _b ? _b : 0;
|
|
44780
|
+
if (a !== b) return a - b;
|
|
44781
|
+
}
|
|
44782
|
+
return 0;
|
|
44783
|
+
}),
|
|
44784
|
+
stateArr = keys.map(key => checkedState.get(key));
|
|
44785
|
+
stateArr.forEach((state, i) => {
|
|
44786
|
+
const index = keys[i],
|
|
44787
|
+
value = state;
|
|
44747
44788
|
if (start) {
|
|
44748
|
-
index.split(",").length === currentIndexLength ? start = !1 : value._vtable_rowSeries_number =
|
|
44789
|
+
index.split(",").length === currentIndexLength ? start = !1 : value._vtable_rowSeries_number = parentState;
|
|
44749
44790
|
}
|
|
44750
44791
|
index === key && (start = !0);
|
|
44751
44792
|
});
|
|
44752
44793
|
}
|
|
44794
|
+
function bindHeaderCheckboxChange(table) {
|
|
44795
|
+
table.on("checkbox_state_change", args => {
|
|
44796
|
+
const {
|
|
44797
|
+
col: col,
|
|
44798
|
+
row: row,
|
|
44799
|
+
checked: checked,
|
|
44800
|
+
field: field
|
|
44801
|
+
} = args;
|
|
44802
|
+
if (table.isHeader(col, row)) {
|
|
44803
|
+
table.stateManager.setHeaderCheckedState(field, checked);
|
|
44804
|
+
"checkbox" === table.getCellType(col, row) && table.scenegraph.updateCheckboxCellState(col, row, checked);
|
|
44805
|
+
} else {
|
|
44806
|
+
table.stateManager.setCheckedState(col, row, field, checked);
|
|
44807
|
+
if ("checkbox" === table.getCellType(col, row)) {
|
|
44808
|
+
const oldHeaderCheckedState = table.stateManager.headerCheckedState[field],
|
|
44809
|
+
newHeaderCheckedState = table.stateManager.updateHeaderCheckedState(field, col, row);
|
|
44810
|
+
oldHeaderCheckedState !== newHeaderCheckedState && table.scenegraph.updateHeaderCheckboxCellState(col, row, newHeaderCheckedState);
|
|
44811
|
+
}
|
|
44812
|
+
}
|
|
44813
|
+
});
|
|
44814
|
+
}
|
|
44815
|
+
function getHierarchyState(table, col, row) {
|
|
44816
|
+
const index = table.getRecordShowIndexByCell(col, row);
|
|
44817
|
+
return table.dataSource.getHierarchyState(index);
|
|
44818
|
+
}
|
|
44753
44819
|
|
|
44754
44820
|
function bindButtonClickEvent(table) {
|
|
44755
44821
|
table.on(TABLE_EVENT_TYPE.CLICK_CELL, e => {
|
|
@@ -44859,7 +44925,7 @@
|
|
|
44859
44925
|
}, 0);
|
|
44860
44926
|
}
|
|
44861
44927
|
bindSelfEvent() {
|
|
44862
|
-
this.table.isReleased || (bindIconClickEvent(this.table), bindDropdownMenuClickEvent(this.table), this.updateEventBinder(), bindMediaClick(this.table), bindDBClickAutoColumnWidthEvent(this.table), this.table.isPivotTable() && checkHaveDrill(this.table) && bindDrillEvent(this.table), bindSparklineHoverEvent(this.table), bindAxisClickEvent(this.table), bindAxisHoverEvent(this.table), bindGroupTitleCheckboxChange(this.table), bindButtonClickEvent(this.table), rightButtonClickEvent(this.table));
|
|
44928
|
+
this.table.isReleased || (bindIconClickEvent(this.table), bindDropdownMenuClickEvent(this.table), this.updateEventBinder(), bindMediaClick(this.table), bindDBClickAutoColumnWidthEvent(this.table), this.table.isPivotTable() && checkHaveDrill(this.table) && bindDrillEvent(this.table), bindSparklineHoverEvent(this.table), bindAxisClickEvent(this.table), bindAxisHoverEvent(this.table), bindGroupTitleCheckboxChange(this.table), bindHeaderCheckboxChange(this.table), bindButtonClickEvent(this.table), rightButtonClickEvent(this.table));
|
|
44863
44929
|
}
|
|
44864
44930
|
dealTableHover(eventArgsSet) {
|
|
44865
44931
|
if (!eventArgsSet) return void this.table.stateManager.updateHoverPos(-1, -1);
|
|
@@ -45053,8 +45119,8 @@
|
|
|
45053
45119
|
constructor() {
|
|
45054
45120
|
let style = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
45055
45121
|
let bodyStyle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
45056
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
45057
|
-
super(style, bodyStyle), this._showBar = null === (_a = style.showBar) || void 0 === _a || _a, this._barColor = null !== (_b = style.barColor) && void 0 !== _b ? _b : DEFAULT_BAR_COLOR, this._barPositiveColor = null !== (_c = style.barPositiveColor) && void 0 !== _c ? _c : "#4dbd74", this._barNegativeColor = null !== (_d = style.barNegativeColor) && void 0 !== _d ? _d : "#f86c6b", this._barAxisColor = null !== (_e = style.barAxisColor) && void 0 !== _e ? _e : "black", this._barBgColor = style.barBgColor, this._barHeight = null !== (_f = style.barHeight) && void 0 !== _f ? _f : 3, this._barHeight = null !== (_g = style.barHeight) && void 0 !== _g ? _g : 3, this._barBottom = null !== (_h = style.barBottom) && void 0 !== _h ? _h : 0, this._barPadding = null !== (_j = style.barPadding) && void 0 !== _j ? _j : [0, 0, 0, 0], this._showBarMark = null !== (_k = style.showBarMark) && void 0 !== _k && _k, this._barMarkPositiveColor = null !== (_l = style.barMarkPositiveColor) && void 0 !== _l ? _l : "#4dbd74", this._barMarkNegativeColor = null !== (_m = style.barMarkNegativeColor) && void 0 !== _m ? _m : "#f86c6b", this._barMarkWidth = null !== (_o = style.barMarkWidth) && void 0 !== _o ? _o : 2, this._barMarkPosition = null !== (_p = style.barMarkPosition) && void 0 !== _p ? _p : "right", this._barRightToLeft = null !== (_q = style.barRightToLeft) && void 0 !== _q && _q;
|
|
45122
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
45123
|
+
super(style, bodyStyle), this._showBar = null === (_a = style.showBar) || void 0 === _a || _a, this._barColor = null !== (_b = style.barColor) && void 0 !== _b ? _b : DEFAULT_BAR_COLOR, this._barPositiveColor = null !== (_c = style.barPositiveColor) && void 0 !== _c ? _c : "#4dbd74", this._barNegativeColor = null !== (_d = style.barNegativeColor) && void 0 !== _d ? _d : "#f86c6b", this._barAxisColor = null !== (_e = style.barAxisColor) && void 0 !== _e ? _e : "black", this._barBgColor = style.barBgColor, this._barHeight = null !== (_f = style.barHeight) && void 0 !== _f ? _f : 3, this._barHeight = null !== (_g = style.barHeight) && void 0 !== _g ? _g : 3, this._barBottom = null !== (_h = style.barBottom) && void 0 !== _h ? _h : 0, this._barPadding = null !== (_j = style.barPadding) && void 0 !== _j ? _j : [0, 0, 0, 0], this._showBarMark = null !== (_k = style.showBarMark) && void 0 !== _k && _k, this._barMarkPositiveColor = null !== (_l = style.barMarkPositiveColor) && void 0 !== _l ? _l : "#4dbd74", this._barMarkNegativeColor = null !== (_m = style.barMarkNegativeColor) && void 0 !== _m ? _m : "#f86c6b", this._barMarkWidth = null !== (_o = style.barMarkWidth) && void 0 !== _o ? _o : 2, this._barMarkPosition = null !== (_p = style.barMarkPosition) && void 0 !== _p ? _p : "right", this._barRightToLeft = null !== (_q = style.barRightToLeft) && void 0 !== _q && _q, this._barMarkInBar = null === (_r = style.barMarkInBar) || void 0 === _r || _r;
|
|
45058
45124
|
}
|
|
45059
45125
|
get showBar() {
|
|
45060
45126
|
return this._showBar;
|
|
@@ -45146,6 +45212,12 @@
|
|
|
45146
45212
|
set barRightToLeft(value) {
|
|
45147
45213
|
this._barRightToLeft = value;
|
|
45148
45214
|
}
|
|
45215
|
+
get barMarkInBar() {
|
|
45216
|
+
return this._barMarkInBar;
|
|
45217
|
+
}
|
|
45218
|
+
set barMarkInBar(value) {
|
|
45219
|
+
this._barMarkInBar = value;
|
|
45220
|
+
}
|
|
45149
45221
|
clone() {
|
|
45150
45222
|
return new ProgressBarStyle(this, null);
|
|
45151
45223
|
}
|
|
@@ -47610,7 +47682,7 @@
|
|
|
47610
47682
|
constructor(container) {
|
|
47611
47683
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
47612
47684
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
47613
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.17.4-alpha.
|
|
47685
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.17.4-alpha.5", 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");
|
|
47614
47686
|
!1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vglobal.isImageAnonymous = !1);
|
|
47615
47687
|
const {
|
|
47616
47688
|
frozenColCount = 0,
|
|
@@ -47995,6 +48067,7 @@
|
|
|
47995
48067
|
shadowWidths = toBoxArray(null !== (_q = null === (_p = this.internalProps.theme.frameStyle) || void 0 === _p ? void 0 : _p.shadowBlur) && void 0 !== _q ? _q : [0]);
|
|
47996
48068
|
(null === (_r = this.theme.frameStyle) || void 0 === _r ? void 0 : _r.innerBorder) ? (this.tableX = 0, this.tableY = 0, this.tableNoFrameWidth = width - (null !== (_s = shadowWidths[1]) && void 0 !== _s ? _s : 0), this.tableNoFrameHeight = height - (null !== (_t = shadowWidths[2]) && void 0 !== _t ? _t : 0)) : (this.tableX = (null !== (_u = lineWidths[3]) && void 0 !== _u ? _u : 0) + (null !== (_v = shadowWidths[3]) && void 0 !== _v ? _v : 0), this.tableY = (null !== (_w = lineWidths[0]) && void 0 !== _w ? _w : 0) + (null !== (_x = shadowWidths[0]) && void 0 !== _x ? _x : 0), this.tableNoFrameWidth = width - ((null !== (_y = lineWidths[1]) && void 0 !== _y ? _y : 0) + (null !== (_z = shadowWidths[1]) && void 0 !== _z ? _z : 0)) - ((null !== (_0 = lineWidths[3]) && void 0 !== _0 ? _0 : 0) + (null !== (_1 = shadowWidths[3]) && void 0 !== _1 ? _1 : 0)), this.tableNoFrameHeight = height - ((null !== (_2 = lineWidths[0]) && void 0 !== _2 ? _2 : 0) + (null !== (_3 = shadowWidths[0]) && void 0 !== _3 ? _3 : 0)) - ((null !== (_4 = lineWidths[2]) && void 0 !== _4 ? _4 : 0) + (null !== (_5 = shadowWidths[2]) && void 0 !== _5 ? _5 : 0)));
|
|
47997
48069
|
}
|
|
48070
|
+
this._clearColRangeWidthsMap(), this._clearRowRangeHeightsMap();
|
|
47998
48071
|
}
|
|
47999
48072
|
updateViewBox(newViewBox) {
|
|
48000
48073
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
@@ -48436,7 +48509,7 @@
|
|
|
48436
48509
|
const {
|
|
48437
48510
|
parentElement: parentElement
|
|
48438
48511
|
} = internalProps.element;
|
|
48439
|
-
parentElement && !this.options.canvas && parentElement.removeChild(internalProps.element), null === (_q = null === (_p = null === (_o = this.editorManager) || void 0 === _o ? void 0 : _o.editingEditor) || void 0 === _p ? void 0 : _p.onEnd) || void 0 === _q || _q.call(_p), this.isReleased = !0, this.scenegraph = null, this.internalProps = null, null === (_r = this.reactCustomLayout) || void 0 === _r || _r.clearCache()
|
|
48512
|
+
parentElement && !this.options.canvas && parentElement.removeChild(internalProps.element), null === (_q = null === (_p = null === (_o = this.editorManager) || void 0 === _o ? void 0 : _o.editingEditor) || void 0 === _p ? void 0 : _p.onEnd) || void 0 === _q || _q.call(_p), this.isReleased = !0, this.scenegraph = null, this.internalProps = null, null === (_r = this.reactCustomLayout) || void 0 === _r || _r.clearCache();
|
|
48440
48513
|
}
|
|
48441
48514
|
fireListeners(type, event) {
|
|
48442
48515
|
return super.fireListeners(type, event);
|
|
@@ -48485,7 +48558,7 @@
|
|
|
48485
48558
|
const internalProps = this.internalProps;
|
|
48486
48559
|
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.unfreezeAllOnExceedsMaxWidth = null == unfreezeAllOnExceedsMaxWidth || unfreezeAllOnExceedsMaxWidth, 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 = null !== (_b = null == resize ? void 0 : resize.columnResizeMode) && void 0 !== _b ? _b : columnResizeMode, internalProps.rowResizeMode = null !== (_c = null == resize ? void 0 : resize.rowResizeMode) && void 0 !== _c ? _c : rowResizeMode, internalProps.dragHeaderMode = null !== (_e = null !== (_d = null == dragOrder ? void 0 : dragOrder.dragHeaderMode) && void 0 !== _d ? _d : dragHeaderMode) && void 0 !== _e ? _e : "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 !== (_f = options.theme) && void 0 !== _f ? _f : 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 !== (_g = options.allowFrozenColCount) && void 0 !== _g ? _g : 0, internalProps.limitMaxAutoWidth = null !== (_h = options.limitMaxAutoWidth) && void 0 !== _h ? _h : 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 === (_j = internalProps.legends) || void 0 === _j || _j.forEach(legend => {
|
|
48487
48560
|
null == legend || legend.release();
|
|
48488
|
-
}), null === (_k = internalProps.title) || void 0 === _k || _k.release(), internalProps.title = null, null === (_l = internalProps.emptyTip) || void 0 === _l || _l.release(), internalProps.emptyTip = null, internalProps.layoutMap.release(),
|
|
48561
|
+
}), null === (_k = internalProps.title) || void 0 === _k || _k.release(), internalProps.title = null, null === (_l = internalProps.emptyTip) || void 0 === _l || _l.release(), internalProps.emptyTip = null, internalProps.layoutMap.release(), this.scenegraph.clearCells(), this.scenegraph.updateComponent(), this.stateManager.updateOptionSetState(), this._updateSize(), this.eventManager.updateEventBinder(), options.legends) {
|
|
48489
48562
|
internalProps.legends = [];
|
|
48490
48563
|
const createLegend = Factory.getFunction("createLegend");
|
|
48491
48564
|
if (Array.isArray(options.legends)) {
|
|
@@ -48748,7 +48821,8 @@
|
|
|
48748
48821
|
end: {
|
|
48749
48822
|
col: Math.min(customMerge.range.end.col, this.colCount - 1),
|
|
48750
48823
|
row: Math.min(customMerge.range.end.row, this.rowCount - 1)
|
|
48751
|
-
}
|
|
48824
|
+
},
|
|
48825
|
+
isCustom: !0
|
|
48752
48826
|
};
|
|
48753
48827
|
}
|
|
48754
48828
|
}
|
|
@@ -48774,7 +48848,17 @@
|
|
|
48774
48848
|
}, styleClass, this.options.autoWrapText, this.theme);
|
|
48775
48849
|
customMerge.style = fullStyle;
|
|
48776
48850
|
}
|
|
48777
|
-
return customMerge
|
|
48851
|
+
return customMerge.range = {
|
|
48852
|
+
start: {
|
|
48853
|
+
col: Math.max(customMerge.range.start.col, 0),
|
|
48854
|
+
row: Math.max(customMerge.range.start.row, 0)
|
|
48855
|
+
},
|
|
48856
|
+
end: {
|
|
48857
|
+
col: Math.min(customMerge.range.end.col, this.colCount - 1),
|
|
48858
|
+
row: Math.min(customMerge.range.end.row, this.rowCount - 1)
|
|
48859
|
+
},
|
|
48860
|
+
isCustom: !0
|
|
48861
|
+
}, customMerge;
|
|
48778
48862
|
}
|
|
48779
48863
|
}
|
|
48780
48864
|
}
|
|
@@ -51723,6 +51807,8 @@
|
|
|
51723
51807
|
const editor = this.table.getEditor(col, row);
|
|
51724
51808
|
if (editor) {
|
|
51725
51809
|
if (null === (_b = null === (_a = this.table.internalProps.layoutMap) || void 0 === _a ? void 0 : _a.isAggregation) || void 0 === _b ? void 0 : _b.call(_a, col, row)) return;
|
|
51810
|
+
const record = this.table.getCellRawRecord(col, row);
|
|
51811
|
+
if (null == record ? void 0 : record.vtableMerge) return;
|
|
51726
51812
|
this.editingEditor || (this.editCell = {
|
|
51727
51813
|
col: col,
|
|
51728
51814
|
row: row
|
|
@@ -52720,8 +52806,19 @@
|
|
|
52720
52806
|
}
|
|
52721
52807
|
getCheckboxState(field) {
|
|
52722
52808
|
if (this.stateManager.checkedState.size < this.rowCount - this.columnHeaderLevelCount && this.stateManager.initLeftRecordsCheckState(this.records), isValid$3(field)) {
|
|
52723
|
-
let stateArr = Array.from(this.stateManager.checkedState.keys()).sort((a, b) =>
|
|
52724
|
-
|
|
52809
|
+
let stateArr = Array.from(this.stateManager.checkedState.keys()).sort((a, b) => {
|
|
52810
|
+
var _a, _b;
|
|
52811
|
+
const aArr = a.split(","),
|
|
52812
|
+
bArr = b.split(","),
|
|
52813
|
+
maxLength = Math.max(aArr.length, bArr.length);
|
|
52814
|
+
for (let i = 0; i < maxLength; i++) {
|
|
52815
|
+
const a = null !== (_a = Number(aArr[i])) && void 0 !== _a ? _a : 0,
|
|
52816
|
+
b = null !== (_b = Number(bArr[i])) && void 0 !== _b ? _b : 0;
|
|
52817
|
+
if (a !== b) return a - b;
|
|
52818
|
+
}
|
|
52819
|
+
return 0;
|
|
52820
|
+
}).map(key => this.stateManager.checkedState.get(key));
|
|
52821
|
+
return this.options.groupBy && (stateArr = getGroupCheckboxState(this)), Array.from(stateArr, state => state && state[field]);
|
|
52725
52822
|
}
|
|
52726
52823
|
return new Array(...this.stateManager.checkedState.values());
|
|
52727
52824
|
}
|
|
@@ -52759,7 +52856,7 @@
|
|
|
52759
52856
|
setRecords(records, option) {
|
|
52760
52857
|
var _a, _b, _c, _d;
|
|
52761
52858
|
let sort;
|
|
52762
|
-
|
|
52859
|
+
null === (_a = this.internalProps.dataSource) || void 0 === _a || _a.release(), this.internalProps.releaseList = null === (_b = this.internalProps.releaseList) || void 0 === _b ? void 0 : _b.filter(item => !item.dataSourceObj), this.internalProps.dataSource = null, Array.isArray(option) || (null == option ? void 0 : option.order) ? sort = option : option ? sort = option.sortState : null === option && (sort = null);
|
|
52763
52860
|
"undefined" != typeof window && window.performance.now();
|
|
52764
52861
|
const oldHoverState = {
|
|
52765
52862
|
col: this.stateManager.hover.cellPos.col,
|
|
@@ -56919,7 +57016,8 @@
|
|
|
56919
57016
|
barMarkPositiveColor: barMarkPositiveColor,
|
|
56920
57017
|
barMarkNegativeColor: barMarkNegativeColor,
|
|
56921
57018
|
barMarkWidth: barMarkWidth,
|
|
56922
|
-
barMarkPosition: barMarkPosition
|
|
57019
|
+
barMarkPosition: barMarkPosition,
|
|
57020
|
+
barMarkInBar: barMarkInBar
|
|
56923
57021
|
} = style;
|
|
56924
57022
|
let {
|
|
56925
57023
|
barHeight: barHeight,
|
|
@@ -56934,11 +57032,11 @@
|
|
|
56934
57032
|
return Number(v);
|
|
56935
57033
|
});
|
|
56936
57034
|
const borderWidth = getQuadProps(getProp("borderLineWidth", style, col, row, table)),
|
|
56937
|
-
barPaddingTop = Math.max(barPadding[0], Math.ceil(borderWidth[0] / 2))
|
|
56938
|
-
|
|
56939
|
-
|
|
56940
|
-
|
|
56941
|
-
contentWidth -= barPaddingRight + barPaddingLeft, contentHeight -= barPaddingBottom + barPaddingTop, row === table.rowCount - 1 && [0, "0"].includes(barBottom) && (contentHeight -= 1);
|
|
57035
|
+
barPaddingTop = Math.max(barPadding[0], Math.ceil(borderWidth[0] / 2));
|
|
57036
|
+
let barPaddingRight = Math.max(barPadding[1], Math.floor(borderWidth[1] / 2));
|
|
57037
|
+
const barPaddingBottom = Math.max(barPadding[2], Math.floor(borderWidth[2] / 2));
|
|
57038
|
+
let barPaddingLeft = Math.max(barPadding[3], Math.ceil(borderWidth[3] / 2));
|
|
57039
|
+
showBarMark && barMarkWidth > 0 && "right" === barMarkPosition && !1 === barMarkInBar && (barPaddingRight += barMarkWidth, barPaddingLeft += barMarkWidth), contentWidth -= barPaddingRight + barPaddingLeft, contentHeight -= barPaddingBottom + barPaddingTop, row === table.rowCount - 1 && [0, "0"].includes(barBottom) && (contentHeight -= 1);
|
|
56942
57040
|
const top = barPaddingTop,
|
|
56943
57041
|
left = barPaddingLeft,
|
|
56944
57042
|
right = contentWidth;
|
|
@@ -57125,7 +57223,7 @@
|
|
|
57125
57223
|
dataValue: dataValue,
|
|
57126
57224
|
percentile: positiveRate
|
|
57127
57225
|
}) || "#20a8d8", "right" === barMarkPosition) {
|
|
57128
|
-
const markLeft = barRightToLeft ? barRectPosi.left + barMarkWidth / 2 : barRectPosi.left + barRectPosi.width - barMarkWidth / 2;
|
|
57226
|
+
const markLeft = barRightToLeft ? barRectPosi.left + barMarkWidth / 2 : barRectPosi.left + barRectPosi.width + (barMarkInBar ? -barMarkWidth / 2 : barMarkWidth / 2);
|
|
57129
57227
|
points.push({
|
|
57130
57228
|
x: markLeft,
|
|
57131
57229
|
y: barRectPosi.top
|
|
@@ -57446,7 +57544,9 @@
|
|
|
57446
57544
|
cornerRadius: buttonBorderRadius
|
|
57447
57545
|
},
|
|
57448
57546
|
state: {
|
|
57449
|
-
text: {
|
|
57547
|
+
text: {
|
|
57548
|
+
hover: {}
|
|
57549
|
+
},
|
|
57450
57550
|
panel: {
|
|
57451
57551
|
hover: {
|
|
57452
57552
|
fill: buttonHoverColor,
|