@visactor/vtable-gantt 1.16.0 → 1.16.1

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.
@@ -27001,6 +27001,18 @@
27001
27001
  }
27002
27002
  }
27003
27003
 
27004
+ const defaultTaskBarStyle = {
27005
+ barColor: 'blue',
27006
+ completedBarColor: 'gray',
27007
+ width: 30,
27008
+ cornerRadius: 3,
27009
+ borderWidth: 0,
27010
+ fontFamily: 'Arial',
27011
+ fontSize: 14
27012
+ };
27013
+ function setWidthToDefaultTaskBarStyle(width) {
27014
+ defaultTaskBarStyle.width = width;
27015
+ }
27004
27016
  const isNode$1 = typeof window === 'undefined' || typeof window.window === 'undefined';
27005
27017
  const DayTimes = 1000 * 60 * 60 * 24;
27006
27018
  function getDateIndexByX(x, gantt) {
@@ -27116,36 +27128,41 @@
27116
27128
  gantt.parsedOptions.timeLineHeaderRowHeights.push(gantt.parsedOptions.sortedTimelineScales[i].rowHeight ?? options?.headerRowHeight ?? 40);
27117
27129
  }
27118
27130
  gantt.parsedOptions.grid = Object.assign({}, options?.grid);
27119
- gantt.parsedOptions.taskBarStyle = Object.assign({}, {
27120
- barColor: 'blue',
27121
- completedBarColor: 'gray',
27122
- width: (gantt.parsedOptions.rowHeight * 3) / 4,
27123
- cornerRadius: 3,
27124
- borderWidth: 0,
27125
- fontFamily: 'Arial',
27126
- fontSize: 14
27127
- }, options?.taskBar?.barStyle);
27128
- gantt.parsedOptions.taskBarMilestoneStyle = Object.assign({
27129
- width: gantt.parsedOptions.taskBarStyle.width,
27130
- borderColor: gantt.parsedOptions.taskBarStyle.borderColor,
27131
- borderLineWidth: gantt.parsedOptions.taskBarStyle.borderLineWidth ?? 1,
27132
- fillColor: gantt.parsedOptions.taskBarStyle.barColor,
27133
- cornerRadius: 0
27134
- }, options?.taskBar?.milestoneStyle);
27131
+ setWidthToDefaultTaskBarStyle((gantt.parsedOptions.rowHeight * 3) / 4);
27132
+ gantt.parsedOptions.taskBarStyle =
27133
+ options?.taskBar?.barStyle && typeof options?.taskBar?.barStyle === 'function'
27134
+ ? options.taskBar.barStyle
27135
+ : Object.assign({}, defaultTaskBarStyle, options?.taskBar?.barStyle);
27136
+ gantt.parsedOptions.taskBarMilestoneStyle = Object.assign(typeof gantt.parsedOptions.taskBarStyle === 'function'
27137
+ ? {}
27138
+ : {
27139
+ width: gantt.parsedOptions.taskBarStyle.width,
27140
+ borderColor: gantt.parsedOptions.taskBarStyle.borderColor,
27141
+ borderLineWidth: gantt.parsedOptions.taskBarStyle.borderLineWidth ?? 1,
27142
+ fillColor: gantt.parsedOptions.taskBarStyle.barColor,
27143
+ cornerRadius: 0
27144
+ }, options?.taskBar?.milestoneStyle);
27135
27145
  gantt.parsedOptions.taskBarMilestoneHypotenuse = gantt.parsedOptions.taskBarMilestoneStyle.width * Math.sqrt(2);
27136
27146
  gantt.parsedOptions.dateFormat = options?.dateFormat;
27137
27147
  gantt.parsedOptions.taskBarHoverStyle = Object.assign({
27138
27148
  barOverlayColor: 'rgba(99, 144, 0, 0.4)'
27139
27149
  }, options?.taskBar?.hoverBarStyle);
27140
27150
  gantt.parsedOptions.taskBarSelectable = options?.taskBar?.selectable ?? true;
27141
- gantt.parsedOptions.taskBarSelectedStyle = Object.assign({
27142
- shadowBlur: 6,
27143
- shadowOffsetX: 0,
27144
- shadowOffsetY: 0,
27145
- shadowColor: gantt.parsedOptions.taskBarStyle.barColor,
27146
- borderColor: gantt.parsedOptions.taskBarStyle.barColor,
27147
- borderLineWidth: 1
27148
- }, options?.taskBar?.selectedBarStyle);
27151
+ gantt.parsedOptions.taskBarSelectedStyle = Object.assign(typeof gantt.parsedOptions.taskBarStyle === 'function'
27152
+ ? {
27153
+ shadowBlur: 6,
27154
+ shadowOffsetX: 0,
27155
+ shadowOffsetY: 0,
27156
+ borderLineWidth: 1
27157
+ }
27158
+ : {
27159
+ shadowBlur: 6,
27160
+ shadowOffsetX: 0,
27161
+ shadowOffsetY: 0,
27162
+ shadowColor: gantt.parsedOptions.taskBarStyle.barColor,
27163
+ borderColor: gantt.parsedOptions.taskBarStyle.barColor,
27164
+ borderLineWidth: 1
27165
+ }, options?.taskBar?.selectedBarStyle);
27149
27166
  gantt.parsedOptions.taskBarLabelText = options?.taskBar?.labelText ?? '';
27150
27167
  gantt.parsedOptions.taskBarMoveable = options?.taskBar?.moveable ?? true;
27151
27168
  gantt.parsedOptions.moveTaskBarToExtendDateRange = options?.taskBar?.moveToExtendDateRange ?? true;
@@ -27472,9 +27489,6 @@
27472
27489
  progress = progress.replace('%', '');
27473
27490
  progress = parseFloat(progress);
27474
27491
  }
27475
- if (progress <= 1) {
27476
- progress = progress * 100;
27477
- }
27478
27492
  return Math.round(progress);
27479
27493
  }
27480
27494
  function createSplitLineAndResizeLine(gantt) {
@@ -28667,7 +28681,8 @@
28667
28681
  }
28668
28682
  const { unit, step } = this._scene._gantt.parsedOptions.reverseSortedTimelineScales[0];
28669
28683
  const taskBarSize = computeCountToTimeScale(endDate, startDate, unit, step, 1) * this._scene._gantt.parsedOptions.timelineColWidth;
28670
- const taskbarHeight = this._scene._gantt.parsedOptions.taskBarStyle.width;
28684
+ const taskBarStyle = this._scene._gantt.getTaskBarStyle(index, childIndex);
28685
+ const taskbarHeight = taskBarStyle.width;
28671
28686
  createDateAtMidnight(this._scene._gantt.parsedOptions.minDate);
28672
28687
  this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Separate
28673
28688
  ? childrenLength || 1
@@ -28696,14 +28711,13 @@
28696
28711
  height: isMilestone ? milestoneTaskBarHeight : taskbarHeight,
28697
28712
  cornerRadius: isMilestone
28698
28713
  ? this._scene._gantt.parsedOptions.taskBarMilestoneStyle.cornerRadius
28699
- : this._scene._gantt.parsedOptions.taskBarStyle.cornerRadius,
28714
+ : taskBarStyle.cornerRadius,
28700
28715
  lineWidth: isMilestone
28701
28716
  ? this._scene._gantt.parsedOptions.taskBarMilestoneStyle.borderLineWidth * 2
28702
- : (this._scene._gantt.parsedOptions.taskBarStyle.borderLineWidth ??
28703
- this._scene._gantt.parsedOptions.taskBarStyle.borderWidth) * 2,
28717
+ : (taskBarStyle.borderLineWidth ?? taskBarStyle.borderWidth) * 2,
28704
28718
  stroke: isMilestone
28705
28719
  ? this._scene._gantt.parsedOptions.taskBarMilestoneStyle.borderColor
28706
- : this._scene._gantt.parsedOptions.taskBarStyle.borderColor,
28720
+ : taskBarStyle.borderColor,
28707
28721
  angle: isMilestone ? (45 / 180) * Math.PI : 0,
28708
28722
  anchor: isMilestone ? [x + milestoneTaskBarHeight / 2, y + milestoneTaskBarHeight / 2] : undefined
28709
28723
  });
@@ -28718,7 +28732,7 @@
28718
28732
  height: barGroupBox.attribute.height,
28719
28733
  cornerRadius: isMilestone
28720
28734
  ? this._scene._gantt.parsedOptions.taskBarMilestoneStyle.cornerRadius
28721
- : this._scene._gantt.parsedOptions.taskBarStyle.cornerRadius,
28735
+ : taskBarStyle.cornerRadius,
28722
28736
  clip: true
28723
28737
  });
28724
28738
  barGroup.name = 'task-bar-group';
@@ -28759,9 +28773,7 @@
28759
28773
  y: 0,
28760
28774
  width: barGroupBox.attribute.width,
28761
28775
  height: barGroupBox.attribute.height,
28762
- fill: isMilestone
28763
- ? this._scene._gantt.parsedOptions.taskBarMilestoneStyle.fillColor
28764
- : this._scene._gantt.parsedOptions.taskBarStyle.barColor,
28776
+ fill: isMilestone ? this._scene._gantt.parsedOptions.taskBarMilestoneStyle.fillColor : taskBarStyle.barColor,
28765
28777
  pickable: false
28766
28778
  });
28767
28779
  rect.name = 'task-bar-rect';
@@ -28773,7 +28785,7 @@
28773
28785
  y: 0,
28774
28786
  width: (taskBarSize * progress) / 100,
28775
28787
  height: taskbarHeight,
28776
- fill: this._scene._gantt.parsedOptions.taskBarStyle.completedBarColor,
28788
+ fill: taskBarStyle.completedBarColor,
28777
28789
  pickable: false
28778
28790
  });
28779
28791
  progress_rect.name = 'task-bar-progress-rect';
@@ -28830,9 +28842,7 @@
28830
28842
  height: 100,
28831
28843
  clip: true,
28832
28844
  pickable: false,
28833
- cornerRadius: this._scene._gantt.parsedOptions.taskBarHoverStyle.cornerRadius ??
28834
- this._scene._gantt.parsedOptions.taskBarStyle.cornerRadius ??
28835
- 0,
28845
+ cornerRadius: this._scene._gantt.parsedOptions.taskBarHoverStyle.cornerRadius ?? defaultTaskBarStyle.cornerRadius ?? 0,
28836
28846
  fill: this._scene._gantt.parsedOptions.taskBarHoverStyle.barOverlayColor,
28837
28847
  visibleAll: false
28838
28848
  });
@@ -28903,13 +28913,12 @@
28903
28913
  this.hoverBarGroup.setAttribute('width', width);
28904
28914
  this.hoverBarGroup.setAttribute('height', height);
28905
28915
  this.hoverBarGroup.setAttribute('visibleAll', true);
28916
+ const taskBarStyle = this._scene._gantt.getTaskBarStyle(target.task_index, target.sub_task_index);
28906
28917
  if (taskRecord.type === 'milestone') {
28907
28918
  this.hoverBarGroup.setAttribute('cornerRadius', target.attribute.cornerRadius);
28908
28919
  }
28909
28920
  else {
28910
- const cornerRadius = this._scene._gantt.parsedOptions.taskBarHoverStyle.cornerRadius ??
28911
- this._scene._gantt.parsedOptions.taskBarStyle.cornerRadius ??
28912
- 0;
28921
+ const cornerRadius = this._scene._gantt.parsedOptions.taskBarHoverStyle.cornerRadius ?? taskBarStyle.cornerRadius ?? 0;
28913
28922
  this.hoverBarGroup.setAttribute('cornerRadius', cornerRadius);
28914
28923
  }
28915
28924
  this.hoverBarLeftIcon?.setAttribute('visible', false);
@@ -30461,6 +30470,7 @@
30461
30470
  let linkedToTaskShowIndex;
30462
30471
  let linkedFromTaskShowIndex;
30463
30472
  let diffY;
30473
+ const taskBarStyle = this._gantt.getTaskBarStyle(taskIndex, sub_task_index);
30464
30474
  if (gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Inline) {
30465
30475
  const new_indexs = getTaskIndexsByTaskY(target.attribute.y + dy, gantt);
30466
30476
  linkedFromTaskShowIndex = linkedFromTaskRecord.index[0];
@@ -30476,7 +30486,7 @@
30476
30486
  endDate: linkedFromTaskEndDate,
30477
30487
  taskDays: linkedFromTaskTaskDays
30478
30488
  } = gantt.getTaskInfoByTaskListIndex(linkedFromTaskRecord.index[0], linkedFromTaskRecord.index[1]));
30479
- const taskbarHeight = gantt.parsedOptions.taskBarStyle.width;
30489
+ const taskbarHeight = taskBarStyle.width;
30480
30490
  diffY = target.attribute.y + taskbarHeight / 2 - (linkedToTaskShowIndex + 0.5) * gantt.parsedOptions.rowHeight;
30481
30491
  }
30482
30492
  else if (gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Separate ||
@@ -30507,7 +30517,7 @@
30507
30517
  endDate: linkedFromTaskEndDate,
30508
30518
  taskDays: linkedFromTaskTaskDays
30509
30519
  } = gantt.getTaskInfoByTaskListIndex(linkedFromTaskRecord.index[0], linkedFromTaskRecord.index[1]));
30510
- const taskbarHeight = gantt.parsedOptions.taskBarStyle.width;
30520
+ const taskbarHeight = taskBarStyle.width;
30511
30521
  diffY = target.attribute.y + taskbarHeight / 2 - (linkedToTaskShowIndex + 0.5) * gantt.parsedOptions.rowHeight;
30512
30522
  }
30513
30523
  else {
@@ -30556,6 +30566,7 @@
30556
30566
  let linkedToTaskShowIndex;
30557
30567
  let linkedFromTaskShowIndex;
30558
30568
  let diffY;
30569
+ const taskBarStyle = this._gantt.getTaskBarStyle(taskIndex, sub_task_index);
30559
30570
  if (gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Inline) {
30560
30571
  const new_indexs = getTaskIndexsByTaskY(target.attribute.y + dy, gantt);
30561
30572
  const beforeRowCountLinkedFrom = gantt.getRowsHeightByIndex(0, new_indexs.task_index - 1) / gantt.parsedOptions.rowHeight;
@@ -30571,7 +30582,7 @@
30571
30582
  endDate: linkedFromTaskEndDate,
30572
30583
  taskDays: linkedFromTaskTaskDays
30573
30584
  } = gantt.getTaskInfoByTaskListIndex(linkedFromTaskRecord.index[0], linkedFromTaskRecord.index[1]));
30574
- const taskbarHeight = gantt.parsedOptions.taskBarStyle.width;
30585
+ const taskbarHeight = taskBarStyle.width;
30575
30586
  diffY =
30576
30587
  target.attribute.y + taskbarHeight / 2 - (linkedFromTaskShowIndex + 0.5) * gantt.parsedOptions.rowHeight;
30577
30588
  }
@@ -30603,7 +30614,7 @@
30603
30614
  endDate: linkedFromTaskEndDate,
30604
30615
  taskDays: linkedFromTaskTaskDays
30605
30616
  } = gantt.getTaskInfoByTaskListIndex(linkedFromTaskRecord.index[0], linkedFromTaskRecord.index[1]));
30606
- const taskbarHeight = gantt.parsedOptions.taskBarStyle.width;
30617
+ const taskbarHeight = taskBarStyle.width;
30607
30618
  diffY =
30608
30619
  target.attribute.y + taskbarHeight / 2 - (linkedFromTaskShowIndex + 0.5) * gantt.parsedOptions.rowHeight;
30609
30620
  }
@@ -30759,7 +30770,9 @@
30759
30770
  reset() {
30760
30771
  this.records = [], this.fieldValue = void 0;
30761
30772
  }
30762
- recalculate() {}
30773
+ recalculate() {
30774
+ this.fieldValue = void 0, this._formatedValue = void 0;
30775
+ }
30763
30776
  }
30764
30777
  class RecalculateAggregator extends Aggregator {
30765
30778
  constructor(config) {
@@ -33303,6 +33316,10 @@
33303
33316
  get labelVisible() {
33304
33317
  var _a;
33305
33318
  return null === (_a = columnResize.labelVisible) || void 0 === _a || _a;
33319
+ },
33320
+ get visibleOnHover() {
33321
+ var _a;
33322
+ return null !== (_a = columnResize.visibleOnHover) && void 0 !== _a && _a;
33306
33323
  }
33307
33324
  };
33308
33325
  }
@@ -38183,15 +38200,10 @@
38183
38200
  }
38184
38201
  });
38185
38202
  }
38186
- let customElementsGroup,
38187
- renderDefault = !0;
38188
- if (customResult) customElementsGroup = customResult.elementsGroup, renderDefault = customResult.renderDefault;else {
38189
- let customRender, customLayout;
38190
- 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) {
38191
- const customResult = dealWithCustom(customLayout, customRender, col, row, cellWidth, cellHeight, !1, table.isAutoRowHeight(row), padding, range, table);
38192
- customElementsGroup = customResult.elementsGroup, renderDefault = customResult.renderDefault;
38193
- }
38194
- }
38203
+ const {
38204
+ customElementsGroup: customElementsGroup,
38205
+ renderDefault: renderDefault
38206
+ } = _generateCustomElementsGroup(table, define, col, row, cellWidth, cellHeight, padding, range, customResult);
38195
38207
  cellGroup = Factory.getFunction("createTextCellGroup")(table, value, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, customElementsGroup, renderDefault, cellTheme, range, isAsync);
38196
38208
  const axisConfig = table.internalProps.layoutMap.getAxisConfigInPivotChart(col, row);
38197
38209
  if (axisConfig) {
@@ -38209,9 +38221,13 @@
38209
38221
  const chartInstance = table.internalProps.layoutMap.getChartInstance(col, row);
38210
38222
  cellGroup = Factory.getFunction("createChartCellGroup")(null, columnGroup, 0, y, col, row, cellWidth, cellHeight, padding, value, define.chartModule, table.internalProps.layoutMap.getChartSpec(col, row), chartInstance, null !== (_b = table.internalProps.layoutMap.getChartDataId(col, row)) && void 0 !== _b ? _b : "data", table, cellTheme, table.internalProps.layoutMap.isShareChartSpec(col, row), isAsync, table.internalProps.layoutMap.isNoChartDataRenderNothing(col, row));
38211
38223
  } else if ("progressbar" === type) {
38212
- const style = table._getCellStyle(col, row),
38224
+ const {
38225
+ customElementsGroup: customElementsGroup,
38226
+ renderDefault: renderDefault
38227
+ } = _generateCustomElementsGroup(table, define, col, row, cellWidth, cellHeight, padding, range, customResult),
38228
+ style = table._getCellStyle(col, row),
38213
38229
  dataValue = table.getCellOriginValue(col, row);
38214
- cellGroup = Factory.getFunction("createTextCellGroup")(table, value, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, !1, null, !0, cellTheme, range, isAsync);
38230
+ cellGroup = Factory.getFunction("createTextCellGroup")(table, value, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, !1, customElementsGroup, renderDefault, cellTheme, range, isAsync);
38215
38231
  const progressBarGroup = Factory.getFunction("createProgressBarCell")(define, style, colWidth, value, dataValue, col, row, padding, table, range);
38216
38232
  cellGroup.firstChild ? cellGroup.insertBefore(progressBarGroup, cellGroup.firstChild) : cellGroup.appendChild(progressBarGroup);
38217
38233
  } else if ("sparkline" === type) {
@@ -38223,6 +38239,21 @@
38223
38239
  }
38224
38240
  return cellGroup.onBeforeAttributeUpdate = onBeforeAttributeUpdateForInvertHighlight, cellGroup;
38225
38241
  }
38242
+ function _generateCustomElementsGroup(table, define, col, row, cellWidth, cellHeight, padding, range, customResult) {
38243
+ let customElementsGroup,
38244
+ renderDefault = !0;
38245
+ if (customResult) customElementsGroup = customResult.elementsGroup, renderDefault = customResult.renderDefault;else {
38246
+ let customRender, customLayout;
38247
+ 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) {
38248
+ const customResult = dealWithCustom(customLayout, customRender, col, row, cellWidth, cellHeight, !1, table.isAutoRowHeight(row), padding, range, table);
38249
+ customElementsGroup = customResult.elementsGroup, renderDefault = customResult.renderDefault;
38250
+ }
38251
+ }
38252
+ return {
38253
+ customElementsGroup: customElementsGroup,
38254
+ renderDefault: renderDefault
38255
+ };
38256
+ }
38226
38257
  function updateCell$1(col, row, table, addNew, isShadow, forceFastUpdate) {
38227
38258
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
38228
38259
  const oldCellGroup = table.scenegraph.highPerformanceGetCell(col, row, !0),
@@ -40543,6 +40574,10 @@
40543
40574
  borderBottom = group.border.attribute.strokeArrayWidth ? group.border.attribute.strokeArrayWidth[2] : null !== (_c = group.border.attribute.lineWidth) && void 0 !== _c ? _c : 0,
40544
40575
  borderLeft = group.border.attribute.strokeArrayWidth ? group.border.attribute.strokeArrayWidth[3] : null !== (_d = group.border.attribute.lineWidth) && void 0 !== _d ? _d : 0;
40545
40576
  group.border.setAttributes({
40577
+ borderLeft: borderLeft,
40578
+ borderTop: borderTop,
40579
+ borderRight: borderRight,
40580
+ borderBottom: borderBottom,
40546
40581
  width: group.attribute.width - borderLeft / 2 - borderRight / 2,
40547
40582
  height: group.attribute.height - borderTop / 2 - borderBottom / 2
40548
40583
  }), "group" === group.border.type && group.border.firstChild.setAttributes({
@@ -42381,9 +42416,12 @@
42381
42416
  });
42382
42417
  }
42383
42418
  function updateColumnContainerWidth(containerGroup) {
42384
- var _a;
42419
+ var _a, _b;
42385
42420
  const lastColGroup = getLastChild(containerGroup);
42386
- lastColGroup && (containerGroup.setAttribute("width", lastColGroup.attribute.x + lastColGroup.attribute.width), null === (_a = containerGroup.border) || void 0 === _a || _a.setAttribute("width", lastColGroup.attribute.x + lastColGroup.attribute.width));
42421
+ if (lastColGroup && (containerGroup.setAttribute("width", lastColGroup.attribute.x + lastColGroup.attribute.width), containerGroup.border)) {
42422
+ const border = containerGroup.border;
42423
+ border.setAttribute("width", lastColGroup.attribute.x + lastColGroup.attribute.width - (null !== (_a = border.attribute.borderLeft) && void 0 !== _a ? _a : 0) / 2 - (null !== (_b = border.attribute.borderRight) && void 0 !== _b ? _b : 0) / 2);
42424
+ }
42387
42425
  }
42388
42426
 
42389
42427
  function updateAutoRow(colStart, colEnd, rowStart, rowEnd, table) {
@@ -42556,7 +42594,17 @@
42556
42594
  const cellGroup = proxy.highPerformanceGetCell(col, row);
42557
42595
  proxy.updateCellGroupContent(cellGroup);
42558
42596
  }
42559
- return proxy.table.scenegraph.updateNextFrame(), sync;
42597
+ return updateColumnContainerHeight(proxy.table.scenegraph.rowHeaderGroup), updateColumnContainerHeight(proxy.table.scenegraph.rightFrozenGroup), updateColumnContainerHeight(proxy.table.scenegraph.bodyGroup), proxy.table.scenegraph.updateNextFrame(), sync;
42598
+ }
42599
+ function updateColumnContainerHeight(containerGroup) {
42600
+ var _a, _b;
42601
+ const lastColGroup = getLastChild(containerGroup);
42602
+ if (!lastColGroup) return;
42603
+ const lastCellGroup = getLastChild(lastColGroup);
42604
+ if (lastCellGroup && (containerGroup.setAttribute("height", lastCellGroup.attribute.y + lastCellGroup.attribute.height), containerGroup.border)) {
42605
+ const border = containerGroup.border;
42606
+ border.setAttribute("height", lastCellGroup.attribute.y + lastCellGroup.attribute.height - (null !== (_a = border.attribute.borderTop) && void 0 !== _a ? _a : 0) / 2 - (null !== (_b = border.attribute.borderBottom) && void 0 !== _b ? _b : 0) / 2);
42607
+ }
42560
42608
  }
42561
42609
 
42562
42610
  var __awaiter$3 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
@@ -45387,9 +45435,10 @@
45387
45435
  "image" !== type && "video" !== type || updateImageCellContentWhileResize(cellGroup, col, row, 0, 0, this.table);
45388
45436
  }
45389
45437
  createFrameBorder() {
45438
+ var _a, _b, _c, _d, _e;
45390
45439
  this.updateTableSize();
45391
45440
  const isListTableWithFrozen = !this.isPivot && !this.table.internalProps.transpose;
45392
- createFrameBorder(this.bodyGroup, this.table.theme.bodyStyle.frameStyle, this.bodyGroup.role, isListTableWithFrozen ? [!0, !0, !0, !1] : void 0), createFrameBorder(this.rowHeaderGroup, this.isPivot || this.table.internalProps.transpose ? this.table.theme.rowHeaderStyle.frameStyle : this.table.theme.bodyStyle.frameStyle, this.rowHeaderGroup.role, isListTableWithFrozen ? [!0, !1, !0, !0] : void 0), createFrameBorder(this.colHeaderGroup, this.table.theme.headerStyle.frameStyle, this.colHeaderGroup.role, isListTableWithFrozen ? [!0, !0, !0, !1] : void 0), createFrameBorder(this.cornerHeaderGroup, this.isPivot ? this.table.theme.cornerHeaderStyle.frameStyle : this.table.theme.headerStyle.frameStyle, this.cornerHeaderGroup.role, isListTableWithFrozen ? [!0, !1, !0, !0] : void 0), createFrameBorder(this.tableGroup, this.table.theme.frameStyle, this.tableGroup.role, void 0);
45441
+ createFrameBorder(this.bodyGroup, this.table.theme.bodyStyle.frameStyle, this.bodyGroup.role, isListTableWithFrozen ? [!0, !0, !0, !1] : void 0), createFrameBorder(this.rowHeaderGroup, this.isPivot || this.table.internalProps.transpose ? this.table.theme.rowHeaderStyle.frameStyle : this.table.theme.bodyStyle.frameStyle, this.rowHeaderGroup.role, isListTableWithFrozen ? [!0, !1, !0, !0] : void 0), createFrameBorder(this.colHeaderGroup, this.table.theme.headerStyle.frameStyle, this.colHeaderGroup.role, isListTableWithFrozen ? [!0, !0, !0, !1] : void 0), createFrameBorder(this.cornerHeaderGroup, this.isPivot ? this.table.theme.cornerHeaderStyle.frameStyle : this.table.theme.headerStyle.frameStyle, this.cornerHeaderGroup.role, isListTableWithFrozen ? [!0, !1, !0, !0] : void 0), (null === (_a = this.table.theme.cornerLeftBottomCellStyle) || void 0 === _a ? void 0 : _a.frameStyle) && createFrameBorder(this.leftBottomCornerGroup, this.table.theme.cornerLeftBottomCellStyle.frameStyle, this.leftBottomCornerGroup.role, isListTableWithFrozen ? [!0, !1, !0, !0] : void 0), (null === (_b = this.table.theme.bottomFrozenStyle) || void 0 === _b ? void 0 : _b.frameStyle) && createFrameBorder(this.bottomFrozenGroup, this.table.theme.bottomFrozenStyle.frameStyle, this.bottomFrozenGroup.role, isListTableWithFrozen ? [!0, !0, !0, !1] : void 0), (null === (_c = this.table.theme.rightFrozenStyle) || void 0 === _c ? void 0 : _c.frameStyle) && createFrameBorder(this.rightFrozenGroup, this.table.theme.rightFrozenStyle.frameStyle, this.rightFrozenGroup.role, void 0), (null === (_d = this.table.theme.cornerRightTopCellStyle) || void 0 === _d ? void 0 : _d.frameStyle) && createFrameBorder(this.rightTopCornerGroup, this.table.theme.cornerRightTopCellStyle.frameStyle, this.rightTopCornerGroup.role, void 0), (null === (_e = this.table.theme.cornerRightBottomCellStyle) || void 0 === _e ? void 0 : _e.frameStyle) && createFrameBorder(this.rightBottomCornerGroup, this.table.theme.cornerRightBottomCellStyle.frameStyle, this.rightBottomCornerGroup.role, void 0), createFrameBorder(this.tableGroup, this.table.theme.frameStyle, this.tableGroup.role, void 0);
45393
45442
  }
45394
45443
  getResizeColAt(abstractX, abstractY, cellGroup) {
45395
45444
  const offset = this.table.theme.columnResize.resizeHotSpotSize / 2;
@@ -45449,7 +45498,7 @@
45449
45498
  this.clear ? this.table.internalProps.bottomFrozenRowCount = bottomFrozenRowCount : dealBottomFrozen(bottomFrozenRowCount, this);
45450
45499
  }
45451
45500
  updateBorderSizeAndPosition() {
45452
- this.bodyGroup.border && (this.bodyGroup.appendChild(this.bodyGroup.border), updateFrameBorderSize(this.bodyGroup), this.rowHeaderGroup.attribute.width, updateFrameBorder(this.bodyGroup, this.table.theme.bodyStyle.frameStyle)), this.colHeaderGroup.border && (this.colHeaderGroup.appendChild(this.colHeaderGroup.border), updateFrameBorderSize(this.colHeaderGroup), this.cornerHeaderGroup.attribute.width, updateFrameBorder(this.colHeaderGroup, this.table.theme.headerStyle.frameStyle)), this.rowHeaderGroup.border && (this.rowHeaderGroup.appendChild(this.rowHeaderGroup.border), updateFrameBorderSize(this.rowHeaderGroup)), this.cornerHeaderGroup.border && (this.cornerHeaderGroup.appendChild(this.cornerHeaderGroup.border), updateFrameBorderSize(this.cornerHeaderGroup)), updateCornerRadius(this.table);
45501
+ this.bodyGroup.border && (this.bodyGroup.appendChild(this.bodyGroup.border), updateFrameBorderSize(this.bodyGroup), this.rowHeaderGroup.attribute.width, updateFrameBorder(this.bodyGroup, this.table.theme.bodyStyle.frameStyle)), this.colHeaderGroup.border && (this.colHeaderGroup.appendChild(this.colHeaderGroup.border), updateFrameBorderSize(this.colHeaderGroup), this.cornerHeaderGroup.attribute.width, updateFrameBorder(this.colHeaderGroup, this.table.theme.headerStyle.frameStyle)), this.rowHeaderGroup.border && (this.rowHeaderGroup.appendChild(this.rowHeaderGroup.border), updateFrameBorderSize(this.rowHeaderGroup)), this.cornerHeaderGroup.border && (this.cornerHeaderGroup.appendChild(this.cornerHeaderGroup.border), updateFrameBorderSize(this.cornerHeaderGroup)), this.leftBottomCornerGroup.border && (this.leftBottomCornerGroup.appendChild(this.leftBottomCornerGroup.border), updateFrameBorderSize(this.leftBottomCornerGroup)), this.bottomFrozenGroup.border && (this.bottomFrozenGroup.appendChild(this.bottomFrozenGroup.border), updateFrameBorderSize(this.bottomFrozenGroup)), this.rightFrozenGroup.border && (this.rightFrozenGroup.appendChild(this.rightFrozenGroup.border), updateFrameBorderSize(this.rightFrozenGroup)), this.rightTopCornerGroup.border && (this.rightTopCornerGroup.appendChild(this.rightTopCornerGroup.border), updateFrameBorderSize(this.rightTopCornerGroup)), this.rightBottomCornerGroup.border && (this.rightBottomCornerGroup.appendChild(this.rightBottomCornerGroup.border), updateFrameBorderSize(this.rightBottomCornerGroup)), updateCornerRadius(this.table);
45453
45502
  }
45454
45503
  sortCell() {
45455
45504
  this.isPivot || (this.table.transpose ? this.proxy.sortCellHorizontal() : this.proxy.sortCellVertical());
@@ -47168,13 +47217,13 @@
47168
47217
  hideMenu() {
47169
47218
  this.menu.isShow && (this.table.fireListeners(TABLE_EVENT_TYPE.DROPDOWN_MENU_CLEAR, null), this.table.fireListeners(TABLE_EVENT_TYPE.HIDE_MENU, null), this.menu.isShow = !1, this.table.scenegraph.component.menu.detach(), this.residentHoverIcon && (this.table.scenegraph.setIconNormalStyle(this.residentHoverIcon.icon, this.residentHoverIcon.col, this.residentHoverIcon.row), this.table.scenegraph.resetResidentHoverIcon(this.residentHoverIcon.col, this.residentHoverIcon.row), this.residentHoverIcon = null));
47170
47219
  }
47171
- setDropDownMenuHighlight(cells) {
47172
- this.menu.dropDownMenuHighlight = cells;
47173
- for (let i = 0; i < cells.length; i++) {
47220
+ setDropDownMenuHighlight(dropDownMenuInfo) {
47221
+ this.menu.dropDownMenuHighlight = dropDownMenuInfo;
47222
+ for (let i = 0; i < dropDownMenuInfo.length; i++) {
47174
47223
  const {
47175
47224
  col: col,
47176
47225
  row: row
47177
- } = cells[i],
47226
+ } = dropDownMenuInfo[i],
47178
47227
  range = this.table.getCellRange(col, row);
47179
47228
  if (range) for (let col = range.start.col; col <= range.end.col; col++) for (let row = range.start.row; row <= range.end.row; row++) this.table.scenegraph.updateCellContent(col, row);
47180
47229
  }
@@ -47627,7 +47676,7 @@
47627
47676
  event: e.nativeEvent,
47628
47677
  target: null === (_p = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _p ? void 0 : _p.target,
47629
47678
  mergeCellInfo: null === (_q = eventArgsSet.eventArgs) || void 0 === _q ? void 0 : _q.mergeInfo
47630
- })), eventManager.dealIconHover(eventArgsSet), eventManager.dealTableHover(eventArgsSet), eventArgsSet.eventArgs && table.hasListeners(TABLE_EVENT_TYPE.MOUSEMOVE_CELL)) {
47679
+ })), eventManager.dealIconHover(eventArgsSet), eventManager.dealTableHover(eventArgsSet), table.theme.columnResize.visibleOnHover && eventManager.checkColumnResize(eventArgsSet, !0), eventArgsSet.eventArgs && table.hasListeners(TABLE_EVENT_TYPE.MOUSEMOVE_CELL)) {
47631
47680
  let icon, position;
47632
47681
  if (null === (_r = eventArgsSet.eventArgs) || void 0 === _r ? void 0 : _r.target) {
47633
47682
  const iconInfo = getIconAndPositionFromTarget(null === (_s = eventArgsSet.eventArgs) || void 0 === _s ? void 0 : _s.target);
@@ -48742,7 +48791,7 @@
48742
48791
  if (e.federatedEvent) {
48743
48792
  const eventArgsSet = getCellEventArgsSet(e.federatedEvent),
48744
48793
  resizeCol = this.table.scenegraph.getResizeColAt(eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y, null === (_a = eventArgsSet.eventArgs) || void 0 === _a ? void 0 : _a.targetCell);
48745
- if (this.table.eventManager.checkCellFillhandle(eventArgsSet)) this.table.fireListeners(TABLE_EVENT_TYPE.DBLCLICK_FILL_HANDLE, {});else if (this.table._canResizeColumn(resizeCol.col, resizeCol.row) && resizeCol.col >= 0) {
48794
+ if (this.table.eventManager.checkCellFillhandle(eventArgsSet)) this.table.fireListeners(TABLE_EVENT_TYPE.DBLCLICK_FILL_HANDLE, {});else if (this.table._canResizeColumn(resizeCol.col, resizeCol.row) && resizeCol.col >= 0 && !this.table.options.disableDblclickAutoResizeColWidth) {
48746
48795
  this.table.scenegraph.updateAutoColWidth(resizeCol.col), this.table.internalProps._widthResizedColMap.add(resizeCol.col), this.table.scenegraph.updateChartSizeForResizeColWidth(resizeCol.col);
48747
48796
  const state = this.table.stateManager;
48748
48797
  state.columnResize.col < state.table.frozenColCount && !state.table.isPivotTable() && !state.table.transpose && state.table.scenegraph.component.setFrozenColumnShadow(state.table.frozenColCount - 1, state.columnResize.isRightFrozen);
@@ -48819,7 +48868,7 @@
48819
48868
  } = eventArgsSet;
48820
48869
  if (this.table.options.enableTreeStickCell && !eventArgs) return !1;
48821
48870
  const resizeCol = this.table.scenegraph.getResizeColAt(eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y, null == eventArgs ? void 0 : eventArgs.targetCell);
48822
- return !!(this.table._canResizeColumn(resizeCol.col, resizeCol.row) && resizeCol.col >= 0) && (update && this.table.stateManager.startResizeCol(resizeCol.col, eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y, resizeCol.rightFrozen), !0);
48871
+ return this.table._canResizeColumn(resizeCol.col, resizeCol.row) && resizeCol.col >= 0 ? (update && this.table.stateManager.startResizeCol(resizeCol.col, eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y, resizeCol.rightFrozen), !0) : (this.table.stateManager.isResizeCol() && this.table.stateManager.endResizeCol(), !1);
48823
48872
  }
48824
48873
  checkRowResize(eventArgsSet, update) {
48825
48874
  const {
@@ -51439,7 +51488,7 @@
51439
51488
  constructor(container) {
51440
51489
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
51441
51490
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
51442
- if (super(), this.showFrozenIcon = !0, this.version = "1.16.0", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
51491
+ if (super(), this.showFrozenIcon = !0, this.version = "1.16.1", 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");
51443
51492
  !1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vglobal.isImageAnonymous = !1);
51444
51493
  const {
51445
51494
  frozenColCount = 0,
@@ -56463,7 +56512,7 @@
56463
56512
  return null;
56464
56513
  }
56465
56514
  getHierarchyState(col, row) {
56466
- if (!this.options.groupBy) {
56515
+ if (!this.options.groupBy || isArray$7(this.options.groupBy) && 0 === this.options.groupBy.length) {
56467
56516
  if (!this.getBodyColumnDefine(col, row).tree) return HierarchyState.none;
56468
56517
  }
56469
56518
  const index = this.getRecordShowIndexByCell(col, row);
@@ -56554,7 +56603,7 @@
56554
56603
  }
56555
56604
  getCheckboxState(field) {
56556
56605
  if (this.stateManager.checkedState.size < this.rowCount - this.columnHeaderLevelCount && this.stateManager.initLeftRecordsCheckState(this.records), isValid$3(field)) {
56557
- let stateArr = this.stateManager.checkedState.values();
56606
+ let stateArr = Array.from(this.stateManager.checkedState.keys()).sort().map(key => this.stateManager.checkedState.get(key));
56558
56607
  return this.options.groupBy && (stateArr = getGroupCheckboxState(this)), Array.from(stateArr, state => state[field]);
56559
56608
  }
56560
56609
  return new Array(...this.stateManager.checkedState.values());
@@ -63928,6 +63977,20 @@
63928
63977
  parseTimeFormat(date) {
63929
63978
  return parseDateFormat(date);
63930
63979
  }
63980
+ getTaskBarStyle(task_index, sub_task_index) {
63981
+ if (typeof this.parsedOptions.taskBarStyle === 'function') {
63982
+ const { startDate, endDate, taskRecord } = this.getTaskInfoByTaskListIndex(task_index, sub_task_index);
63983
+ const args = {
63984
+ index: task_index,
63985
+ startDate,
63986
+ endDate,
63987
+ taskRecord,
63988
+ ganttInstance: this
63989
+ };
63990
+ return this.parsedOptions.taskBarStyle(args);
63991
+ }
63992
+ return this.parsedOptions.taskBarStyle;
63993
+ }
63931
63994
  }
63932
63995
 
63933
63996
  var index = /*#__PURE__*/Object.freeze({
@@ -63960,7 +64023,7 @@
63960
64023
  themes: themes$1
63961
64024
  });
63962
64025
 
63963
- const version = "1.16.0";
64026
+ const version = "1.16.1";
63964
64027
 
63965
64028
  exports.Gantt = Gantt;
63966
64029
  exports.TYPES = index$3;