@visactor/vtable-gantt 1.14.2 → 1.14.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/Gantt.d.ts +1 -0
- package/cjs/Gantt.js +28 -21
- package/cjs/Gantt.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js +1 -1
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/task-bar.js +3 -2
- package/cjs/scenegraph/task-bar.js.map +1 -1
- package/dist/vtable-gantt.js +150 -53
- package/dist/vtable-gantt.min.js +2 -2
- package/es/Gantt.d.ts +1 -0
- package/es/Gantt.js +27 -21
- package/es/Gantt.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/scenegraph/scenegraph.js +1 -1
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/task-bar.js +3 -2
- package/es/scenegraph/task-bar.js.map +1 -1
- package/package.json +5 -5
package/dist/vtable-gantt.js
CHANGED
|
@@ -29473,8 +29473,8 @@
|
|
|
29473
29473
|
0;
|
|
29474
29474
|
this.hoverBarGroup.setAttribute('cornerRadius', cornerRadius);
|
|
29475
29475
|
}
|
|
29476
|
-
this.hoverBarLeftIcon
|
|
29477
|
-
this.hoverBarRightIcon
|
|
29476
|
+
this.hoverBarLeftIcon?.setAttribute('visible', false);
|
|
29477
|
+
this.hoverBarRightIcon?.setAttribute('visible', false);
|
|
29478
29478
|
let leftResizable = true;
|
|
29479
29479
|
let rightResizable = true;
|
|
29480
29480
|
if (taskRecord.type === 'milestone') {
|
|
@@ -31184,7 +31184,6 @@
|
|
|
31184
31184
|
taskDays: linkedFromTaskTaskDays
|
|
31185
31185
|
} = gantt.getTaskInfoByTaskListIndex(linkedFromTaskShowIndex));
|
|
31186
31186
|
}
|
|
31187
|
-
const { linePoints, arrowPoints } = updateLinkLinePoints(type, linkedFromTaskStartDate, linkedFromTaskEndDate, linkedFromTaskShowIndex, linkedFromTaskTaskDays, linkedFromTaskRecord.record.type === 'milestone', target, diffY ?? 0, linkedToTaskStartDate, linkedToTaskEndDate, linkedToTaskShowIndex, linkedToTaskTaskDays, linkedToTaskRecord.record.type === 'milestone', null, 0, this._gantt);
|
|
31188
31187
|
if (!linkedFromTaskStartDate ||
|
|
31189
31188
|
!linkedFromTaskEndDate ||
|
|
31190
31189
|
!linkedToTaskStartDate ||
|
|
@@ -31193,6 +31192,7 @@
|
|
|
31193
31192
|
!lineArrowNode) {
|
|
31194
31193
|
return;
|
|
31195
31194
|
}
|
|
31195
|
+
const { linePoints, arrowPoints } = updateLinkLinePoints(type, linkedFromTaskStartDate, linkedFromTaskEndDate, linkedFromTaskShowIndex, linkedFromTaskTaskDays, linkedFromTaskRecord.record.type === 'milestone', target, diffY ?? 0, linkedToTaskStartDate, linkedToTaskEndDate, linkedToTaskShowIndex, linkedToTaskTaskDays, linkedToTaskRecord.record.type === 'milestone', null, 0, this._gantt);
|
|
31196
31196
|
linkLineNode.setAttribute('points', linePoints);
|
|
31197
31197
|
lineArrowNode.setAttribute('points', arrowPoints);
|
|
31198
31198
|
}
|
|
@@ -44687,13 +44687,13 @@
|
|
|
44687
44687
|
if (this.table.transpose) null === (_a = this.bodyGroup.children) || void 0 === _a || _a.forEach(columnGroup => {
|
|
44688
44688
|
var _a;
|
|
44689
44689
|
null === (_a = columnGroup.getChildAt(row)) || void 0 === _a || _a.getChildren().forEach(node => {
|
|
44690
|
-
"checkbox" === node.name && node.setAttribute("checked", checked);
|
|
44690
|
+
"checkbox" === node.name && ("indeterminate" === checked ? (node.setAttribute("indeterminate", !0), node.setAttribute("checked", void 0)) : (node.setAttribute("indeterminate", void 0), node.setAttribute("checked", checked)));
|
|
44691
44691
|
});
|
|
44692
44692
|
});else {
|
|
44693
44693
|
const columnGroup = this.getColGroup(col);
|
|
44694
44694
|
null === (_b = null == columnGroup ? void 0 : columnGroup.children) || void 0 === _b || _b.forEach(cellNode => {
|
|
44695
44695
|
cellNode.getChildren().find(node => {
|
|
44696
|
-
"checkbox" === node.name && node.setAttribute("checked", checked);
|
|
44696
|
+
"checkbox" === node.name && ("indeterminate" === checked ? (node.setAttribute("indeterminate", !0), node.setAttribute("checked", void 0)) : (node.setAttribute("indeterminate", void 0), node.setAttribute("checked", checked)));
|
|
44697
44697
|
});
|
|
44698
44698
|
});
|
|
44699
44699
|
}
|
|
@@ -46035,12 +46035,12 @@
|
|
|
46035
46035
|
allUnChecked = !0,
|
|
46036
46036
|
hasChecked = !1;
|
|
46037
46037
|
return state.checkedState.forEach((check_state, index) => {
|
|
46038
|
-
var _a;
|
|
46038
|
+
var _a, _b;
|
|
46039
46039
|
index = index.includes(",") ? index.split(",").map(item => Number(item)) : Number(index);
|
|
46040
46040
|
const tableIndex = state.table.getTableIndexByRecordIndex(index),
|
|
46041
46041
|
mergeCell = state.table.transpose ? state.table.getCustomMerge(tableIndex, row) : state.table.getCustomMerge(col, tableIndex),
|
|
46042
46042
|
data = null === (_a = state.table.dataSource) || void 0 === _a ? void 0 : _a.get(index);
|
|
46043
|
-
mergeCell || data.vtableMerge || (!0 !== (null == check_state ? void 0 : check_state[field]) ? allChecked = !1 : (allUnChecked = !1, hasChecked = !0));
|
|
46043
|
+
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));
|
|
46044
46044
|
}), allChecked ? (state.headerCheckedState[field] = !0, allChecked) : allUnChecked ? (state.headerCheckedState[field] = !1, !1) : !!hasChecked && (state.headerCheckedState[field] = "indeterminate", "indeterminate");
|
|
46045
46045
|
}
|
|
46046
46046
|
function initLeftRecordsCheckState(records, state) {
|
|
@@ -46079,6 +46079,11 @@
|
|
|
46079
46079
|
} = checkbox.attribute;
|
|
46080
46080
|
indeterminate ? (checked || checkbox._handlePointerUp(), checkbox._handlePointerUp()) : oldChecked ? checked || checkbox._handlePointerUp() : checked && checkbox._handlePointerUp();
|
|
46081
46081
|
}
|
|
46082
|
+
function setCellCheckboxStateByAttribute(col, row, checked, table) {
|
|
46083
|
+
const cellGroup = table.scenegraph.getCell(col, row),
|
|
46084
|
+
checkbox = null == cellGroup ? void 0 : cellGroup.getChildByName("checkbox");
|
|
46085
|
+
checkbox && ("indeterminate" === checked ? (checkbox.setAttribute("indeterminate", !0), checkbox.setAttribute("checked", void 0)) : (checkbox.setAttribute("indeterminate", void 0), checkbox.setAttribute("checked", checked)));
|
|
46086
|
+
}
|
|
46082
46087
|
function changeCheckboxOrder(sourceIndex, targetIndex, state) {
|
|
46083
46088
|
const {
|
|
46084
46089
|
checkedState: checkedState,
|
|
@@ -48176,6 +48181,69 @@
|
|
|
48176
48181
|
return "bottom";
|
|
48177
48182
|
}
|
|
48178
48183
|
|
|
48184
|
+
function bindGroupTitleCheckboxChange(table) {
|
|
48185
|
+
table.on("checkbox_state_change", args => {
|
|
48186
|
+
var _a;
|
|
48187
|
+
if (!0 !== (null === (_a = table.internalProps.rowSeriesNumber) || void 0 === _a ? void 0 : _a.enableTreeCheckbox)) return;
|
|
48188
|
+
const {
|
|
48189
|
+
col: col,
|
|
48190
|
+
row: row,
|
|
48191
|
+
checked: checked
|
|
48192
|
+
} = args,
|
|
48193
|
+
record = table.getCellOriginRecord(col, row),
|
|
48194
|
+
indexedData = table.dataSource.currentPagerIndexedData,
|
|
48195
|
+
titleShowIndex = table.getRecordShowIndexByCell(col, row);
|
|
48196
|
+
let titleIndex = indexedData[titleShowIndex];
|
|
48197
|
+
if (isNumber$2(titleIndex) && (titleIndex = [titleIndex]), record.vtableMerge) {
|
|
48198
|
+
if (checked) setAllChildrenCheckboxState(!0, titleShowIndex, titleIndex, indexedData, table), updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table);else {
|
|
48199
|
+
setAllChildrenCheckboxState(!1, titleShowIndex, titleIndex, indexedData, table), updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table);
|
|
48200
|
+
const oldHeaderCheckedState = table.stateManager.headerCheckedState._vtable_rowSeries_number,
|
|
48201
|
+
newHeaderCheckedState = table.stateManager.updateHeaderCheckedState("_vtable_rowSeries_number", col, row);
|
|
48202
|
+
oldHeaderCheckedState !== newHeaderCheckedState && table.scenegraph.updateHeaderCheckboxCellState(col, row, newHeaderCheckedState);
|
|
48203
|
+
}
|
|
48204
|
+
} else updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table);
|
|
48205
|
+
});
|
|
48206
|
+
}
|
|
48207
|
+
function setAllChildrenCheckboxState(state, titleShowIndex, titleIndex, indexedData, table) {
|
|
48208
|
+
var _a;
|
|
48209
|
+
let i = titleShowIndex + 1;
|
|
48210
|
+
for (; isArray$1(indexedData[i]) && (null === (_a = indexedData[i]) || void 0 === _a ? void 0 : _a.length) > titleIndex.length;) {
|
|
48211
|
+
const row = table.columnHeaderLevelCount + i;
|
|
48212
|
+
table.stateManager.setCheckedState(0, row, "_vtable_rowSeries_number", state), setCellCheckboxStateByAttribute(0, row, state, table), i++;
|
|
48213
|
+
}
|
|
48214
|
+
}
|
|
48215
|
+
function updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table) {
|
|
48216
|
+
var _a;
|
|
48217
|
+
let parentLength = titleIndex.length - 1;
|
|
48218
|
+
if (parentLength > 0) {
|
|
48219
|
+
let i = titleShowIndex - 1;
|
|
48220
|
+
for (; parentLength > 0 && i >= 0;) {
|
|
48221
|
+
if (isArray$1(indexedData[i]) && (null === (_a = indexedData[i]) || void 0 === _a ? void 0 : _a.length) === parentLength || 1 === parentLength && isNumber$2(indexedData[i])) {
|
|
48222
|
+
updateParentCheckboxState(0, table.columnHeaderLevelCount + i, indexedData[i], table), parentLength--;
|
|
48223
|
+
}
|
|
48224
|
+
i--;
|
|
48225
|
+
}
|
|
48226
|
+
}
|
|
48227
|
+
}
|
|
48228
|
+
function updateParentCheckboxState(col, row, currentIndex, table) {
|
|
48229
|
+
const {
|
|
48230
|
+
checkedState: checkedState
|
|
48231
|
+
} = table.stateManager,
|
|
48232
|
+
key = currentIndex.toString(),
|
|
48233
|
+
currentIndexLength = isArray$1(currentIndex) ? currentIndex.length : 1;
|
|
48234
|
+
let start = !1;
|
|
48235
|
+
const result = [];
|
|
48236
|
+
if (checkedState.forEach((value, index) => {
|
|
48237
|
+
if (start) {
|
|
48238
|
+
index.split(",").length === currentIndexLength ? start = !1 : result.push(value._vtable_rowSeries_number);
|
|
48239
|
+
}
|
|
48240
|
+
index === key && (start = !0);
|
|
48241
|
+
}), 0 === result.length) return;
|
|
48242
|
+
const allChecked = result.every(item => !!item),
|
|
48243
|
+
allUnChecked = result.every(item => !item);
|
|
48244
|
+
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));
|
|
48245
|
+
}
|
|
48246
|
+
|
|
48179
48247
|
let EventManager$1 = class EventManager {
|
|
48180
48248
|
constructor(table) {
|
|
48181
48249
|
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(() => {
|
|
@@ -48236,7 +48304,7 @@
|
|
|
48236
48304
|
});
|
|
48237
48305
|
}
|
|
48238
48306
|
}
|
|
48239
|
-
}), this.table.isPivotTable() && checkHaveDrill(this.table) && bindDrillEvent(this.table), bindSparklineHoverEvent(this.table), bindAxisClickEvent(this.table), bindAxisHoverEvent(this.table);
|
|
48307
|
+
}), this.table.isPivotTable() && checkHaveDrill(this.table) && bindDrillEvent(this.table), bindSparklineHoverEvent(this.table), bindAxisClickEvent(this.table), bindAxisHoverEvent(this.table), bindGroupTitleCheckboxChange(this.table);
|
|
48240
48308
|
}
|
|
48241
48309
|
dealTableHover(eventArgsSet) {
|
|
48242
48310
|
if (!eventArgsSet) return void this.table.stateManager.updateHoverPos(-1, -1);
|
|
@@ -49288,7 +49356,12 @@
|
|
|
49288
49356
|
showSort: showSort,
|
|
49289
49357
|
sort: sort
|
|
49290
49358
|
} = this._table.internalProps.layoutMap.getHeader(col, row);
|
|
49291
|
-
|
|
49359
|
+
let _showSort;
|
|
49360
|
+
if (_showSort = "function" == typeof showSort ? showSort({
|
|
49361
|
+
col: col,
|
|
49362
|
+
row: row,
|
|
49363
|
+
table: this._table
|
|
49364
|
+
}) : showSort, _showSort) {
|
|
49292
49365
|
let order = this._table.getPivotSortState(col, row);
|
|
49293
49366
|
order && (order = order.toUpperCase());
|
|
49294
49367
|
const sortIcon = "ASC" === order ? this.upIcon : "DESC" === order ? this.downIcon : this.normalIcon;
|
|
@@ -49367,11 +49440,21 @@
|
|
|
49367
49440
|
getSortIcon(order, _table, col, row) {
|
|
49368
49441
|
const icon = "asc" === order ? this.upIcon : "desc" === order ? this.downIcon : this.normalIcon,
|
|
49369
49442
|
headerC = _table.getHeaderDefine(col, row);
|
|
49370
|
-
|
|
49443
|
+
let _showSort;
|
|
49444
|
+
return headerC && (_showSort = "function" == typeof headerC.showSort ? headerC.showSort({
|
|
49445
|
+
col: col,
|
|
49446
|
+
row: row,
|
|
49447
|
+
table: this._table
|
|
49448
|
+
}) : headerC.showSort), !headerC || !1 === _showSort || !isValid$1(_showSort) && !headerC.sort || headerC.columns && headerC.columns.length > 0 ? null : icon;
|
|
49371
49449
|
}
|
|
49372
49450
|
getSortIconForPivotTable(order, _table, col, row) {
|
|
49373
49451
|
const headerC = _table.getHeaderDefine(col, row);
|
|
49374
|
-
|
|
49452
|
+
let _showSort;
|
|
49453
|
+
if (headerC && (_showSort = "function" == typeof headerC.showSort ? headerC.showSort({
|
|
49454
|
+
col: col,
|
|
49455
|
+
row: row,
|
|
49456
|
+
table: this._table
|
|
49457
|
+
}) : headerC.showSort), !headerC || !1 === _showSort || !isValid$1(_showSort) && !headerC.sort || headerC.columns && headerC.columns.length > 0) return null;
|
|
49375
49458
|
return "ASC" === (null == order ? void 0 : order.toUpperCase()) ? this.upIcon : "DESC" === (null == order ? void 0 : order.toUpperCase()) ? this.downIcon : this.normalIcon;
|
|
49376
49459
|
}
|
|
49377
49460
|
getDropDownStateIcons(_table, col, row) {
|
|
@@ -49706,7 +49789,7 @@
|
|
|
49706
49789
|
constructor(tree, sharedVar) {
|
|
49707
49790
|
let hierarchyType = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "grid";
|
|
49708
49791
|
let rowExpandLevel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : void 0;
|
|
49709
|
-
this.sizeIncludeParent = !1, this.tree = {
|
|
49792
|
+
this.hasHideNode = !1, this.sizeIncludeParent = !1, this.tree = {
|
|
49710
49793
|
id: 0,
|
|
49711
49794
|
dimensionKey: "",
|
|
49712
49795
|
value: "",
|
|
@@ -49720,11 +49803,11 @@
|
|
|
49720
49803
|
}, 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);
|
|
49721
49804
|
}
|
|
49722
49805
|
reset(tree) {
|
|
49723
|
-
this.cache.clear(), this.dimensionKeys = new NumberMap(), this.dimensionKeysIncludeVirtual = new NumberMap(), this.tree.children = tree, this.setTreeNode(this.tree, 0, this.tree);
|
|
49806
|
+
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);
|
|
49724
49807
|
}
|
|
49725
49808
|
setTreeNode(node, startIndex, parent) {
|
|
49726
49809
|
var _a, _b;
|
|
49727
|
-
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));
|
|
49810
|
+
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));
|
|
49728
49811
|
let size = node.dimensionKey && this.sizeIncludeParent ? 1 : 0;
|
|
49729
49812
|
const children = node.children || node.columns;
|
|
49730
49813
|
return "grid" === this.hierarchyType ? (null == children ? void 0 : children.length) >= 1 ? children.forEach(n => {
|
|
@@ -50915,7 +50998,7 @@
|
|
|
50915
50998
|
constructor(container) {
|
|
50916
50999
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
50917
51000
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
50918
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.14.
|
|
51001
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.14.3", 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");
|
|
50919
51002
|
const {
|
|
50920
51003
|
frozenColCount = 0,
|
|
50921
51004
|
frozenRowCount: frozenRowCount,
|
|
@@ -51712,11 +51795,13 @@
|
|
|
51712
51795
|
customRender: customRender,
|
|
51713
51796
|
renderChartAsync: renderChartAsync,
|
|
51714
51797
|
renderChartAsyncBatchCount: renderChartAsyncBatchCount,
|
|
51798
|
+
canvasWidth: canvasWidth,
|
|
51799
|
+
canvasHeight: canvasHeight,
|
|
51715
51800
|
overscrollBehavior: overscrollBehavior,
|
|
51716
51801
|
limitMinWidth: limitMinWidth,
|
|
51717
51802
|
limitMinHeight: limitMinHeight
|
|
51718
51803
|
} = options;
|
|
51719
|
-
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;
|
|
51804
|
+
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;
|
|
51720
51805
|
const internalProps = this.internalProps;
|
|
51721
51806
|
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 => {
|
|
51722
51807
|
null == legend || legend.release();
|
|
@@ -53362,9 +53447,10 @@
|
|
|
53362
53447
|
return layout._cellRangeMap.set(`$${col}$${row}`, cellRange), cellRange;
|
|
53363
53448
|
}
|
|
53364
53449
|
function getTreeTitleMerge(col, row, cellRange, layout) {
|
|
53450
|
+
var _a;
|
|
53365
53451
|
if ("tree" !== layout.rowHierarchyType) return;
|
|
53366
53452
|
const cellRecord = layout._table.getCellRawRecord(col, row);
|
|
53367
|
-
(null == cellRecord ? void 0 : cellRecord.vtableMerge) && (cellRange.start.col = layout.rowHeaderLevelCount, cellRange.end.col = layout.colCount - 1, cellRange.start.row = cellRange.end.row = row);
|
|
53453
|
+
(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);
|
|
53368
53454
|
}
|
|
53369
53455
|
function getCellRangeTranspose(col, row, layout) {
|
|
53370
53456
|
var _a, _b, _c, _d;
|
|
@@ -54756,12 +54842,13 @@
|
|
|
54756
54842
|
row: cellRow
|
|
54757
54843
|
}), rowEnd++);
|
|
54758
54844
|
}
|
|
54759
|
-
const newRowEnd = Math.min(rowStart + rowLimit, table.rowCount - 1 - table.bottomFrozenRowCount)
|
|
54845
|
+
const newRowEnd = Math.min(rowStart + rowLimit, table.rowCount - 1 - table.bottomFrozenRowCount),
|
|
54846
|
+
notFullRow = newRowEnd < rowStart + rowLimit;
|
|
54760
54847
|
for (let i = 0; i < removeCellPositions.length; i++) {
|
|
54761
54848
|
const {
|
|
54762
54849
|
row: cellRow
|
|
54763
54850
|
} = removeCellPositions[removeCellPositions.length - i - 1];
|
|
54764
|
-
cellRow < rowStart || cellRow > rowEnd || (cellRow > newRowEnd ? (removeCells.push({
|
|
54851
|
+
cellRow < rowStart || cellRow > rowEnd || (cellRow > newRowEnd || notFullRow ? (removeCells.push({
|
|
54765
54852
|
col: col,
|
|
54766
54853
|
row: cellRow
|
|
54767
54854
|
}), updateRow--) : updateRow = Math.min(updateRow, cellRow));
|
|
@@ -54857,16 +54944,17 @@
|
|
|
54857
54944
|
} = table.internalProps.layoutMap.getSeriesNumberHeader(col, row);
|
|
54858
54945
|
return title;
|
|
54859
54946
|
}
|
|
54947
|
+
let value;
|
|
54860
54948
|
if (this.options.groupBy) {
|
|
54861
54949
|
const record = table.getCellRawRecord(col, row);
|
|
54862
54950
|
if (null == record ? void 0 : record.vtableMerge) return "";
|
|
54863
54951
|
const indexs = this.dataSource.currentIndexedData[row - this.columnHeaderLevelCount];
|
|
54864
|
-
|
|
54865
|
-
}
|
|
54952
|
+
value = indexs[indexs.length - 1] + 1;
|
|
54953
|
+
} else value = row - this.columnHeaderLevelCount + 1;
|
|
54866
54954
|
const {
|
|
54867
54955
|
format: format
|
|
54868
54956
|
} = table.internalProps.layoutMap.getSeriesNumberBody(col, row);
|
|
54869
|
-
return "function" == typeof format ? format(col, row, this) :
|
|
54957
|
+
return "function" == typeof format ? format(col, row, this, value) : value;
|
|
54870
54958
|
}
|
|
54871
54959
|
if (table.internalProps.layoutMap.isHeader(col, row)) {
|
|
54872
54960
|
const {
|
|
@@ -61686,38 +61774,44 @@
|
|
|
61686
61774
|
this.tableNoFrameHeight = height - lineWidth * 2;
|
|
61687
61775
|
}
|
|
61688
61776
|
}
|
|
61689
|
-
|
|
61690
|
-
if (
|
|
61691
|
-
|
|
61692
|
-
|
|
61693
|
-
|
|
61694
|
-
|
|
61695
|
-
|
|
61696
|
-
|
|
61697
|
-
|
|
61698
|
-
}
|
|
61699
|
-
if (this.options?.taskListTable?.minTableWidth) {
|
|
61700
|
-
this.taskTableWidth = Math.max(this.options?.taskListTable?.minTableWidth, this.taskTableWidth);
|
|
61701
|
-
}
|
|
61702
|
-
this.element.style.left = this.taskTableWidth ? `${this.taskTableWidth}px` : '0px';
|
|
61703
|
-
this.taskListTableInstance.setCanvasSize(this.taskTableWidth, this.tableNoFrameHeight + this.parsedOptions.outerFrameStyle.borderLineWidth * 2);
|
|
61704
|
-
this._updateSize();
|
|
61777
|
+
_updateListTableSize(taskListTableInstance) {
|
|
61778
|
+
if (!taskListTableInstance) {
|
|
61779
|
+
return;
|
|
61780
|
+
}
|
|
61781
|
+
if (this.options?.taskListTable?.tableWidth === 'auto' || this.taskTableWidth === -1) {
|
|
61782
|
+
this.taskTableWidth =
|
|
61783
|
+
taskListTableInstance.getAllColsWidth() + this.parsedOptions.outerFrameStyle.borderLineWidth;
|
|
61784
|
+
if (this.options?.taskListTable?.maxTableWidth) {
|
|
61785
|
+
this.taskTableWidth = Math.min(this.options?.taskListTable?.maxTableWidth, this.taskTableWidth);
|
|
61705
61786
|
}
|
|
61706
|
-
if (this.
|
|
61707
|
-
|
|
61708
|
-
|
|
61709
|
-
|
|
61710
|
-
|
|
61787
|
+
if (this.options?.taskListTable?.minTableWidth) {
|
|
61788
|
+
this.taskTableWidth = Math.max(this.options?.taskListTable?.minTableWidth, this.taskTableWidth);
|
|
61789
|
+
}
|
|
61790
|
+
this.element.style.left = this.taskTableWidth ? `${this.taskTableWidth}px` : '0px';
|
|
61791
|
+
taskListTableInstance.setCanvasSize(this.taskTableWidth, this.tableNoFrameHeight + this.parsedOptions.outerFrameStyle.borderLineWidth * 2);
|
|
61792
|
+
this._updateSize();
|
|
61793
|
+
}
|
|
61794
|
+
if (taskListTableInstance.columnHeaderLevelCount > 1) {
|
|
61795
|
+
if (taskListTableInstance.columnHeaderLevelCount === this.parsedOptions.timeLineHeaderRowHeights.length) {
|
|
61796
|
+
for (let i = 0; i < taskListTableInstance.columnHeaderLevelCount; i++) {
|
|
61797
|
+
taskListTableInstance.setRowHeight(i, this.parsedOptions.timeLineHeaderRowHeights[i]);
|
|
61711
61798
|
}
|
|
61712
|
-
|
|
61713
|
-
|
|
61714
|
-
|
|
61715
|
-
|
|
61716
|
-
|
|
61799
|
+
}
|
|
61800
|
+
else {
|
|
61801
|
+
const newRowHeight = this.getAllHeaderRowsHeight() / taskListTableInstance.columnHeaderLevelCount;
|
|
61802
|
+
for (let i = 0; i < taskListTableInstance.columnHeaderLevelCount; i++) {
|
|
61803
|
+
taskListTableInstance.setRowHeight(i, newRowHeight);
|
|
61717
61804
|
}
|
|
61718
61805
|
}
|
|
61719
61806
|
}
|
|
61720
61807
|
}
|
|
61808
|
+
_generateListTable() {
|
|
61809
|
+
if (this.taskTableColumns.length >= 1 || this.options?.rowSeriesNumber) {
|
|
61810
|
+
const listTableOption = this._generateListTableOptions();
|
|
61811
|
+
this.taskListTableInstance = new ListTableAll(this.container, listTableOption);
|
|
61812
|
+
this._updateListTableSize(this.taskListTableInstance);
|
|
61813
|
+
}
|
|
61814
|
+
}
|
|
61721
61815
|
_generateListTableOptions() {
|
|
61722
61816
|
const listTable_options = {};
|
|
61723
61817
|
const needPutInListTableKeys = [
|
|
@@ -62153,7 +62247,6 @@
|
|
|
62153
62247
|
this.scenegraph = null;
|
|
62154
62248
|
}
|
|
62155
62249
|
updateOption(options) {
|
|
62156
|
-
this.taskListTableInstance?.release();
|
|
62157
62250
|
this.parsedOptions = {};
|
|
62158
62251
|
this.options = options;
|
|
62159
62252
|
this.taskTableWidth =
|
|
@@ -62162,14 +62255,18 @@
|
|
|
62162
62255
|
this.records = options?.records ?? [];
|
|
62163
62256
|
this._sortScales();
|
|
62164
62257
|
initOptions(this);
|
|
62165
|
-
this.scenegraph.updateStageBackground();
|
|
62166
62258
|
this.data.setRecords(this.records);
|
|
62167
62259
|
this._generateTimeLineDateMap();
|
|
62168
62260
|
this.timeLineHeaderLevel = this.parsedOptions.sortedTimelineScales.length;
|
|
62169
|
-
this.element.style.left = this.taskTableWidth ? `${this.taskTableWidth}px` : '0px';
|
|
62170
62261
|
this._updateSize();
|
|
62171
|
-
this.
|
|
62262
|
+
if (this.taskListTableInstance) {
|
|
62263
|
+
const listTableOption = this._generateListTableOptions();
|
|
62264
|
+
this.taskListTableInstance.updateOption(listTableOption);
|
|
62265
|
+
this._updateListTableSize(this.taskListTableInstance);
|
|
62266
|
+
}
|
|
62172
62267
|
this._syncPropsFromTable();
|
|
62268
|
+
this.scenegraph.updateStageBackground();
|
|
62269
|
+
this.element.style.left = this.taskTableWidth ? `${this.taskTableWidth}px` : '0px';
|
|
62173
62270
|
updateSplitLineAndResizeLine(this);
|
|
62174
62271
|
this.scenegraph.updateSceneGraph();
|
|
62175
62272
|
this.scenegraph.afterCreateSceneGraph();
|
|
@@ -62364,7 +62461,7 @@
|
|
|
62364
62461
|
themes: themes$1
|
|
62365
62462
|
});
|
|
62366
62463
|
|
|
62367
|
-
const version = "1.14.
|
|
62464
|
+
const version = "1.14.3";
|
|
62368
62465
|
|
|
62369
62466
|
exports.Gantt = Gantt;
|
|
62370
62467
|
exports.TYPES = index$3;
|