@visactor/vtable-calendar 1.17.4-alpha.4 → 1.17.4
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 +138 -45
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +5 -5
package/dist/vtable-calendar.js
CHANGED
|
@@ -34049,7 +34049,7 @@
|
|
|
34049
34049
|
function _generateCustomElementsGroup(table, define, col, row, cellWidth, cellHeight, padding, range, customResult) {
|
|
34050
34050
|
let customElementsGroup,
|
|
34051
34051
|
renderDefault = !0;
|
|
34052
|
-
if (customResult) customElementsGroup = customResult.elementsGroup, renderDefault = customResult.renderDefault;else {
|
|
34052
|
+
if (customResult) customElementsGroup = customResult.elementsGroup, renderDefault = customResult.renderDefault;else if (null == range ? void 0 : range.isCustom) ;else {
|
|
34053
34053
|
let customRender, customLayout;
|
|
34054
34054
|
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
34055
|
const customResult = dealWithCustom(customLayout, customRender, col, row, cellWidth, cellHeight, !1, table.isAutoRowHeight(row), padding, range, table);
|
|
@@ -36576,17 +36576,13 @@
|
|
|
36576
36576
|
}
|
|
36577
36577
|
Chart.temp = 1;
|
|
36578
36578
|
|
|
36579
|
-
|
|
36580
|
-
|
|
36581
|
-
let
|
|
36582
|
-
batchRenderChartCount = 5,
|
|
36579
|
+
const chartRenderKeys = [];
|
|
36580
|
+
const chartRenderQueueList = [];
|
|
36581
|
+
let batchRenderChartCount = 5,
|
|
36583
36582
|
isHandlingChartQueue = !1;
|
|
36584
36583
|
function setBatchRenderChartCount(count) {
|
|
36585
36584
|
isValid$3(count) && (batchRenderChartCount = count);
|
|
36586
36585
|
}
|
|
36587
|
-
function clearChartRenderQueue() {
|
|
36588
|
-
chartRenderKeys = [], chartRenderQueueList = [], isHandlingChartQueue = !1, cancelAnimationFrame(requestAnimationFrameId);
|
|
36589
|
-
}
|
|
36590
36586
|
function IsHandlingChartQueue() {
|
|
36591
36587
|
return isHandlingChartQueue;
|
|
36592
36588
|
}
|
|
@@ -36680,7 +36676,7 @@
|
|
|
36680
36676
|
cacheStageCanvas(chartInstance.getStage(), chart);
|
|
36681
36677
|
}
|
|
36682
36678
|
function startRenderChartQueue(table) {
|
|
36683
|
-
isHandlingChartQueue = !0, chartRenderQueueList.length > 0 ?
|
|
36679
|
+
isHandlingChartQueue = !0, chartRenderQueueList.length > 0 ? requestAnimationFrame(() => {
|
|
36684
36680
|
const chartsToRender = chartRenderQueueList.splice(0, batchRenderChartCount);
|
|
36685
36681
|
chartRenderKeys.splice(0, batchRenderChartCount), chartsToRender.forEach(chart => {
|
|
36686
36682
|
renderChart(chart), chart.addUpdateBoundTag();
|
|
@@ -42352,7 +42348,14 @@
|
|
|
42352
42348
|
if (recordIndex >= 0) {
|
|
42353
42349
|
const dataIndex = state.table.dataSource.getIndexKey(recordIndex).toString();
|
|
42354
42350
|
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)
|
|
42351
|
+
if (state.checkedState.has(dataIndex)) state.checkedState.get(dataIndex)[field] = checked;else if (dataIndex.includes(",")) {
|
|
42352
|
+
const parentDataIndex = dataIndex.split(",").slice(0, -1).join(",");
|
|
42353
|
+
state.checkedState.has(parentDataIndex) && !0 === state.checkedState.get(parentDataIndex)[field] ? state.checkedState.set(dataIndex, {
|
|
42354
|
+
[field]: !0
|
|
42355
|
+
}) : state.checkedState.set(dataIndex, {
|
|
42356
|
+
[field]: checked
|
|
42357
|
+
});
|
|
42358
|
+
} else state.checkedState.set(dataIndex, {
|
|
42356
42359
|
[field]: checked
|
|
42357
42360
|
});
|
|
42358
42361
|
}
|
|
@@ -42433,7 +42436,7 @@
|
|
|
42433
42436
|
} = state;
|
|
42434
42437
|
let source, target;
|
|
42435
42438
|
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) {
|
|
42439
|
+
if ((sourceIndex = source) > (targetIndex = target)) {
|
|
42437
42440
|
const sourceRecord = checkedState.get(sourceIndex.toString());
|
|
42438
42441
|
for (let i = sourceIndex; i > targetIndex; i--) checkedState.set(i.toString(), checkedState.get((i - 1).toString()));
|
|
42439
42442
|
checkedState.set(targetIndex.toString(), sourceRecord);
|
|
@@ -44676,20 +44679,22 @@
|
|
|
44676
44679
|
|
|
44677
44680
|
function bindGroupTitleCheckboxChange(table) {
|
|
44678
44681
|
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;
|
|
44682
|
+
var _a, _b;
|
|
44681
44683
|
const {
|
|
44682
|
-
|
|
44683
|
-
|
|
44684
|
-
|
|
44685
|
-
|
|
44686
|
-
|
|
44684
|
+
col: col,
|
|
44685
|
+
row: row,
|
|
44686
|
+
checked: checked,
|
|
44687
|
+
field: field
|
|
44688
|
+
} = args;
|
|
44689
|
+
if ("_vtable_rowSeries_number" !== field || !0 !== (null === (_a = table.internalProps.rowSeriesNumber) || void 0 === _a ? void 0 : _a.enableTreeCheckbox)) return;
|
|
44690
|
+
if (table.isHeader(col, row)) return;
|
|
44691
|
+
const record = table.getCellOriginRecord(col, row),
|
|
44687
44692
|
indexedData = table.dataSource.currentPagerIndexedData,
|
|
44688
44693
|
titleShowIndex = table.getRecordShowIndexByCell(col, row);
|
|
44689
44694
|
let titleIndex = indexedData[titleShowIndex];
|
|
44690
|
-
if (isNumber$4(titleIndex) && (titleIndex = [titleIndex]), record.vtableMerge) {
|
|
44691
|
-
if (checked)
|
|
44692
|
-
|
|
44695
|
+
if (isNumber$4(titleIndex) && (titleIndex = [titleIndex]), record.vtableMerge || (null === (_b = record.children) || void 0 === _b ? void 0 : _b.length)) {
|
|
44696
|
+
if (checked) getHierarchyState(table, col, row) === HierarchyState.collapse ? updateChildrenCheckboxState(!0, titleIndex, table) : setAllChildrenCheckboxState(!0, titleShowIndex, titleIndex, indexedData, table), updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table);else {
|
|
44697
|
+
getHierarchyState(table, col, row) === HierarchyState.collapse ? updateChildrenCheckboxState(!1, titleIndex, table) : setAllChildrenCheckboxState(!1, titleShowIndex, titleIndex, indexedData, table), updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table);
|
|
44693
44698
|
const oldHeaderCheckedState = table.stateManager.headerCheckedState._vtable_rowSeries_number,
|
|
44694
44699
|
newHeaderCheckedState = table.stateManager.updateHeaderCheckedState("_vtable_rowSeries_number", col, row);
|
|
44695
44700
|
oldHeaderCheckedState !== newHeaderCheckedState && table.scenegraph.updateHeaderCheckboxCellState(col, row, newHeaderCheckedState);
|
|
@@ -44725,8 +44730,23 @@
|
|
|
44725
44730
|
key = currentIndex.toString(),
|
|
44726
44731
|
currentIndexLength = isArray$7(currentIndex) ? currentIndex.length : 1;
|
|
44727
44732
|
let start = !1;
|
|
44728
|
-
const result = []
|
|
44729
|
-
|
|
44733
|
+
const result = [],
|
|
44734
|
+
keys = Array.from(checkedState.keys()).sort((a, b) => {
|
|
44735
|
+
var _a, _b;
|
|
44736
|
+
const aArr = a.split(","),
|
|
44737
|
+
bArr = b.split(","),
|
|
44738
|
+
maxLength = Math.max(aArr.length, bArr.length);
|
|
44739
|
+
for (let i = 0; i < maxLength; i++) {
|
|
44740
|
+
const a = null !== (_a = Number(aArr[i])) && void 0 !== _a ? _a : 0,
|
|
44741
|
+
b = null !== (_b = Number(bArr[i])) && void 0 !== _b ? _b : 0;
|
|
44742
|
+
if (a !== b) return a - b;
|
|
44743
|
+
}
|
|
44744
|
+
return 0;
|
|
44745
|
+
}),
|
|
44746
|
+
stateArr = keys.map(key => checkedState.get(key));
|
|
44747
|
+
if (stateArr.forEach((state, i) => {
|
|
44748
|
+
const index = keys[i],
|
|
44749
|
+
value = state;
|
|
44730
44750
|
if (start) {
|
|
44731
44751
|
index.split(",").length === currentIndexLength ? start = !1 : result.push(value._vtable_rowSeries_number);
|
|
44732
44752
|
}
|
|
@@ -44736,20 +44756,60 @@
|
|
|
44736
44756
|
allUnChecked = result.every(item => !item);
|
|
44737
44757
|
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
44758
|
}
|
|
44739
|
-
function updateChildrenCheckboxState(
|
|
44759
|
+
function updateChildrenCheckboxState(parentState, currentIndex, table) {
|
|
44740
44760
|
const {
|
|
44741
44761
|
checkedState: checkedState
|
|
44742
44762
|
} = table.stateManager,
|
|
44743
44763
|
key = currentIndex.toString(),
|
|
44744
44764
|
currentIndexLength = isArray$7(currentIndex) ? currentIndex.length : 1;
|
|
44745
44765
|
let start = !1;
|
|
44746
|
-
checkedState.
|
|
44766
|
+
const keys = Array.from(checkedState.keys()).sort((a, b) => {
|
|
44767
|
+
var _a, _b;
|
|
44768
|
+
const aArr = a.split(","),
|
|
44769
|
+
bArr = b.split(","),
|
|
44770
|
+
maxLength = Math.max(aArr.length, bArr.length);
|
|
44771
|
+
for (let i = 0; i < maxLength; i++) {
|
|
44772
|
+
const a = null !== (_a = Number(aArr[i])) && void 0 !== _a ? _a : 0,
|
|
44773
|
+
b = null !== (_b = Number(bArr[i])) && void 0 !== _b ? _b : 0;
|
|
44774
|
+
if (a !== b) return a - b;
|
|
44775
|
+
}
|
|
44776
|
+
return 0;
|
|
44777
|
+
}),
|
|
44778
|
+
stateArr = keys.map(key => checkedState.get(key));
|
|
44779
|
+
stateArr.forEach((state, i) => {
|
|
44780
|
+
const index = keys[i],
|
|
44781
|
+
value = state;
|
|
44747
44782
|
if (start) {
|
|
44748
|
-
index.split(",").length === currentIndexLength ? start = !1 : value._vtable_rowSeries_number =
|
|
44783
|
+
index.split(",").length === currentIndexLength ? start = !1 : value._vtable_rowSeries_number = parentState;
|
|
44749
44784
|
}
|
|
44750
44785
|
index === key && (start = !0);
|
|
44751
44786
|
});
|
|
44752
44787
|
}
|
|
44788
|
+
function bindHeaderCheckboxChange(table) {
|
|
44789
|
+
table.on("checkbox_state_change", args => {
|
|
44790
|
+
const {
|
|
44791
|
+
col: col,
|
|
44792
|
+
row: row,
|
|
44793
|
+
checked: checked,
|
|
44794
|
+
field: field
|
|
44795
|
+
} = args;
|
|
44796
|
+
if (table.isHeader(col, row)) {
|
|
44797
|
+
table.stateManager.setHeaderCheckedState(field, checked);
|
|
44798
|
+
"checkbox" === table.getCellType(col, row) && table.scenegraph.updateCheckboxCellState(col, row, checked);
|
|
44799
|
+
} else {
|
|
44800
|
+
table.stateManager.setCheckedState(col, row, field, checked);
|
|
44801
|
+
if ("checkbox" === table.getCellType(col, row)) {
|
|
44802
|
+
const oldHeaderCheckedState = table.stateManager.headerCheckedState[field],
|
|
44803
|
+
newHeaderCheckedState = table.stateManager.updateHeaderCheckedState(field, col, row);
|
|
44804
|
+
oldHeaderCheckedState !== newHeaderCheckedState && table.scenegraph.updateHeaderCheckboxCellState(col, row, newHeaderCheckedState);
|
|
44805
|
+
}
|
|
44806
|
+
}
|
|
44807
|
+
});
|
|
44808
|
+
}
|
|
44809
|
+
function getHierarchyState(table, col, row) {
|
|
44810
|
+
const index = table.getRecordShowIndexByCell(col, row);
|
|
44811
|
+
return table.dataSource.getHierarchyState(index);
|
|
44812
|
+
}
|
|
44753
44813
|
|
|
44754
44814
|
function bindButtonClickEvent(table) {
|
|
44755
44815
|
table.on(TABLE_EVENT_TYPE.CLICK_CELL, e => {
|
|
@@ -44859,7 +44919,7 @@
|
|
|
44859
44919
|
}, 0);
|
|
44860
44920
|
}
|
|
44861
44921
|
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));
|
|
44922
|
+
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
44923
|
}
|
|
44864
44924
|
dealTableHover(eventArgsSet) {
|
|
44865
44925
|
if (!eventArgsSet) return void this.table.stateManager.updateHoverPos(-1, -1);
|
|
@@ -45053,8 +45113,8 @@
|
|
|
45053
45113
|
constructor() {
|
|
45054
45114
|
let style = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
45055
45115
|
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;
|
|
45116
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
45117
|
+
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
45118
|
}
|
|
45059
45119
|
get showBar() {
|
|
45060
45120
|
return this._showBar;
|
|
@@ -45146,6 +45206,12 @@
|
|
|
45146
45206
|
set barRightToLeft(value) {
|
|
45147
45207
|
this._barRightToLeft = value;
|
|
45148
45208
|
}
|
|
45209
|
+
get barMarkInBar() {
|
|
45210
|
+
return this._barMarkInBar;
|
|
45211
|
+
}
|
|
45212
|
+
set barMarkInBar(value) {
|
|
45213
|
+
this._barMarkInBar = value;
|
|
45214
|
+
}
|
|
45149
45215
|
clone() {
|
|
45150
45216
|
return new ProgressBarStyle(this, null);
|
|
45151
45217
|
}
|
|
@@ -47610,7 +47676,7 @@
|
|
|
47610
47676
|
constructor(container) {
|
|
47611
47677
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
47612
47678
|
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
|
|
47679
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.17.4", 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
47680
|
!1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vglobal.isImageAnonymous = !1);
|
|
47615
47681
|
const {
|
|
47616
47682
|
frozenColCount = 0,
|
|
@@ -48436,7 +48502,7 @@
|
|
|
48436
48502
|
const {
|
|
48437
48503
|
parentElement: parentElement
|
|
48438
48504
|
} = 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()
|
|
48505
|
+
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
48506
|
}
|
|
48441
48507
|
fireListeners(type, event) {
|
|
48442
48508
|
return super.fireListeners(type, event);
|
|
@@ -48485,7 +48551,7 @@
|
|
|
48485
48551
|
const internalProps = this.internalProps;
|
|
48486
48552
|
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
48553
|
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(),
|
|
48554
|
+
}), 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
48555
|
internalProps.legends = [];
|
|
48490
48556
|
const createLegend = Factory.getFunction("createLegend");
|
|
48491
48557
|
if (Array.isArray(options.legends)) {
|
|
@@ -48748,7 +48814,8 @@
|
|
|
48748
48814
|
end: {
|
|
48749
48815
|
col: Math.min(customMerge.range.end.col, this.colCount - 1),
|
|
48750
48816
|
row: Math.min(customMerge.range.end.row, this.rowCount - 1)
|
|
48751
|
-
}
|
|
48817
|
+
},
|
|
48818
|
+
isCustom: !0
|
|
48752
48819
|
};
|
|
48753
48820
|
}
|
|
48754
48821
|
}
|
|
@@ -48774,7 +48841,17 @@
|
|
|
48774
48841
|
}, styleClass, this.options.autoWrapText, this.theme);
|
|
48775
48842
|
customMerge.style = fullStyle;
|
|
48776
48843
|
}
|
|
48777
|
-
return customMerge
|
|
48844
|
+
return customMerge.range = {
|
|
48845
|
+
start: {
|
|
48846
|
+
col: Math.max(customMerge.range.start.col, 0),
|
|
48847
|
+
row: Math.max(customMerge.range.start.row, 0)
|
|
48848
|
+
},
|
|
48849
|
+
end: {
|
|
48850
|
+
col: Math.min(customMerge.range.end.col, this.colCount - 1),
|
|
48851
|
+
row: Math.min(customMerge.range.end.row, this.rowCount - 1)
|
|
48852
|
+
},
|
|
48853
|
+
isCustom: !0
|
|
48854
|
+
}, customMerge;
|
|
48778
48855
|
}
|
|
48779
48856
|
}
|
|
48780
48857
|
}
|
|
@@ -51723,6 +51800,8 @@
|
|
|
51723
51800
|
const editor = this.table.getEditor(col, row);
|
|
51724
51801
|
if (editor) {
|
|
51725
51802
|
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;
|
|
51803
|
+
const record = this.table.getCellRawRecord(col, row);
|
|
51804
|
+
if (null == record ? void 0 : record.vtableMerge) return;
|
|
51726
51805
|
this.editingEditor || (this.editCell = {
|
|
51727
51806
|
col: col,
|
|
51728
51807
|
row: row
|
|
@@ -52720,8 +52799,19 @@
|
|
|
52720
52799
|
}
|
|
52721
52800
|
getCheckboxState(field) {
|
|
52722
52801
|
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
|
-
|
|
52802
|
+
let stateArr = Array.from(this.stateManager.checkedState.keys()).sort((a, b) => {
|
|
52803
|
+
var _a, _b;
|
|
52804
|
+
const aArr = a.split(","),
|
|
52805
|
+
bArr = b.split(","),
|
|
52806
|
+
maxLength = Math.max(aArr.length, bArr.length);
|
|
52807
|
+
for (let i = 0; i < maxLength; i++) {
|
|
52808
|
+
const a = null !== (_a = Number(aArr[i])) && void 0 !== _a ? _a : 0,
|
|
52809
|
+
b = null !== (_b = Number(bArr[i])) && void 0 !== _b ? _b : 0;
|
|
52810
|
+
if (a !== b) return a - b;
|
|
52811
|
+
}
|
|
52812
|
+
return 0;
|
|
52813
|
+
}).map(key => this.stateManager.checkedState.get(key));
|
|
52814
|
+
return this.options.groupBy && (stateArr = getGroupCheckboxState(this)), Array.from(stateArr, state => state && state[field]);
|
|
52725
52815
|
}
|
|
52726
52816
|
return new Array(...this.stateManager.checkedState.values());
|
|
52727
52817
|
}
|
|
@@ -52759,7 +52849,7 @@
|
|
|
52759
52849
|
setRecords(records, option) {
|
|
52760
52850
|
var _a, _b, _c, _d;
|
|
52761
52851
|
let sort;
|
|
52762
|
-
|
|
52852
|
+
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
52853
|
"undefined" != typeof window && window.performance.now();
|
|
52764
52854
|
const oldHoverState = {
|
|
52765
52855
|
col: this.stateManager.hover.cellPos.col,
|
|
@@ -56919,7 +57009,8 @@
|
|
|
56919
57009
|
barMarkPositiveColor: barMarkPositiveColor,
|
|
56920
57010
|
barMarkNegativeColor: barMarkNegativeColor,
|
|
56921
57011
|
barMarkWidth: barMarkWidth,
|
|
56922
|
-
barMarkPosition: barMarkPosition
|
|
57012
|
+
barMarkPosition: barMarkPosition,
|
|
57013
|
+
barMarkInBar: barMarkInBar
|
|
56923
57014
|
} = style;
|
|
56924
57015
|
let {
|
|
56925
57016
|
barHeight: barHeight,
|
|
@@ -56934,11 +57025,11 @@
|
|
|
56934
57025
|
return Number(v);
|
|
56935
57026
|
});
|
|
56936
57027
|
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);
|
|
57028
|
+
barPaddingTop = Math.max(barPadding[0], Math.ceil(borderWidth[0] / 2));
|
|
57029
|
+
let barPaddingRight = Math.max(barPadding[1], Math.floor(borderWidth[1] / 2));
|
|
57030
|
+
const barPaddingBottom = Math.max(barPadding[2], Math.floor(borderWidth[2] / 2));
|
|
57031
|
+
let barPaddingLeft = Math.max(barPadding[3], Math.ceil(borderWidth[3] / 2));
|
|
57032
|
+
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
57033
|
const top = barPaddingTop,
|
|
56943
57034
|
left = barPaddingLeft,
|
|
56944
57035
|
right = contentWidth;
|
|
@@ -57125,7 +57216,7 @@
|
|
|
57125
57216
|
dataValue: dataValue,
|
|
57126
57217
|
percentile: positiveRate
|
|
57127
57218
|
}) || "#20a8d8", "right" === barMarkPosition) {
|
|
57128
|
-
const markLeft = barRightToLeft ? barRectPosi.left + barMarkWidth / 2 : barRectPosi.left + barRectPosi.width - barMarkWidth / 2;
|
|
57219
|
+
const markLeft = barRightToLeft ? barRectPosi.left + barMarkWidth / 2 : barRectPosi.left + barRectPosi.width + (barMarkInBar ? -barMarkWidth / 2 : barMarkWidth / 2);
|
|
57129
57220
|
points.push({
|
|
57130
57221
|
x: markLeft,
|
|
57131
57222
|
y: barRectPosi.top
|
|
@@ -57446,7 +57537,9 @@
|
|
|
57446
57537
|
cornerRadius: buttonBorderRadius
|
|
57447
57538
|
},
|
|
57448
57539
|
state: {
|
|
57449
|
-
text: {
|
|
57540
|
+
text: {
|
|
57541
|
+
hover: {}
|
|
57542
|
+
},
|
|
57450
57543
|
panel: {
|
|
57451
57544
|
hover: {
|
|
57452
57545
|
fill: buttonHoverColor,
|