@visactor/vtable-gantt 1.10.3 → 1.10.4-alpha.2

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/index.d.ts CHANGED
@@ -5,5 +5,5 @@ import { Gantt } from './Gantt';
5
5
  import * as tools from './tools';
6
6
  import * as VRender from './vrender';
7
7
  import * as VTable from './vtable';
8
- export declare const version = "1.10.3";
8
+ export declare const version = "1.10.4-alpha.2";
9
9
  export { TYPES, GanttConstructorOptions, Gantt, ColumnsDefine, ColumnDefine, LinkColumnDefine, ChartColumnDefine, ImageColumnDefine, SparklineColumnDefine, ProgressbarColumnDefine, TextColumnDefine, GroupColumnDefine, TextAlignType, TextBaselineType, tools, VRender, VTable };
package/cjs/index.js CHANGED
@@ -52,5 +52,5 @@ exports.VRender = VRender;
52
52
 
53
53
  const VTable = __importStar(require("./vtable"));
54
54
 
55
- exports.VTable = VTable, exports.version = "1.10.3";
55
+ exports.VTable = VTable, exports.version = "1.10.4-alpha.2";
56
56
  //# sourceMappingURL=index.js.map
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAoC;AAuBlC,sBAAK;AATP,mCAAgC;AAW9B,sFAXO,aAAK,OAWP;AAVP,+CAAiC;AAsB/B,sBAAK;AArBP,mDAAqC;AAsBnC,0BAAO;AArBT,iDAAmC;AAsBjC,wBAAM;AArBK,QAAA,OAAO,GAAG,QAAQ,CAAC","file":"index.js","sourcesContent":["import type { GanttConstructorOptions } from './ts-types';\nimport * as TYPES from './ts-types';\nimport type {\n ColumnDefine,\n ColumnsDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType\n} from '@visactor/vtable';\nimport { Gantt } from './Gantt';\nimport * as tools from './tools';\nimport * as VRender from './vrender';\nimport * as VTable from './vtable';\nexport const version = \"1.10.3\";\n/**\n * @namespace VTable\n */\nexport {\n TYPES,\n GanttConstructorOptions,\n Gantt,\n ColumnsDefine,\n ColumnDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType,\n tools,\n VRender,\n VTable\n};\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAoC;AAuBlC,sBAAK;AATP,mCAAgC;AAW9B,sFAXO,aAAK,OAWP;AAVP,+CAAiC;AAsB/B,sBAAK;AArBP,mDAAqC;AAsBnC,0BAAO;AArBT,iDAAmC;AAsBjC,wBAAM;AArBK,QAAA,OAAO,GAAG,gBAAgB,CAAC","file":"index.js","sourcesContent":["import type { GanttConstructorOptions } from './ts-types';\nimport * as TYPES from './ts-types';\nimport type {\n ColumnDefine,\n ColumnsDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType\n} from '@visactor/vtable';\nimport { Gantt } from './Gantt';\nimport * as tools from './tools';\nimport * as VRender from './vrender';\nimport * as VTable from './vtable';\nexport const version = \"1.10.4-alpha.2\";\n/**\n * @namespace VTable\n */\nexport {\n TYPES,\n GanttConstructorOptions,\n Gantt,\n ColumnsDefine,\n ColumnDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType,\n tools,\n VRender,\n VTable\n};\n"]}
@@ -33943,7 +33943,7 @@
33943
33943
  width: width,
33944
33944
  height: height
33945
33945
  } = attribute;
33946
- return this._AABBBounds.setValue(x, y, x + width, y + height), this.parent && this.parent.addChildUpdateBoundTag(), this.clearUpdateBoundTag(), this._AABBBounds;
33946
+ return this._AABBBounds.setValue(x, y, x + width, y + height), this.parent && this.parent.addChildUpdateBoundTag(), this.clearUpdateBoundTag(), this.shadowRoot && this.shadowRoot.tryUpdateAABBBounds(), this._AABBBounds;
33947
33947
  }
33948
33948
  return "body" === this.role || "row-header" === this.role || "col-header" === this.role || "right-frozen" === this.role || "bottom-frozen" === this.role || "corner-header" === this.role || "corner-right-top-header" === this.role || "corner-right-bottom-header" === this.role || "corner-left-bottom-header" === this.role ? (this._AABBBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0), this.parent && this.parent.addChildUpdateBoundTag(), this.clearUpdateBoundTag(), this.shadowRoot && this.shadowRoot.tryUpdateAABBBounds(), this._AABBBounds) : super.doUpdateAABBBounds();
33949
33949
  }
@@ -34135,7 +34135,7 @@
34135
34135
  }
34136
34136
 
34137
34137
  function createCellContent(cellGroup, icons, textStr, padding, autoColWidth, autoRowHeight, autoWrapText, lineClamp, cellWidth, cellHeight, textAlign, textBaseline, table, cellTheme, range) {
34138
- var _a, _b, _c, _d, _e;
34138
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
34139
34139
  let contentWidth,
34140
34140
  leftIconWidth = 0,
34141
34141
  rightIconWidth = 0,
@@ -34164,12 +34164,12 @@
34164
34164
  moreThanMaxCharacters: moreThanMaxCharacters,
34165
34165
  maxLineWidth: autoColWidth ? 1 / 0 : cellWidth - (padding[1] + padding[3]) - leftIconWidth - rightIconWidth - hierarchyOffset,
34166
34166
  textBaseline: "top",
34167
- heightLimit: autoRowHeight && !(null === (_b = table.options.customConfig) || void 0 === _b ? void 0 : _b.multilinesForXTable) ? -1 : cellHeight - Math.floor(padding[0] + padding[2]),
34167
+ heightLimit: !1 === (null === (_d = table.options.customConfig) || void 0 === _d ? void 0 : _d.limitContentHeight) || autoRowHeight && !(null === (_e = table.options.customConfig) || void 0 === _e ? void 0 : _e.multilinesForXTable) ? -1 : cellHeight - Math.floor(padding[0] + padding[2]),
34168
34168
  pickable: !1,
34169
34169
  autoWrapText: autoWrapText,
34170
34170
  lineClamp: lineClamp,
34171
34171
  wordBreak: "break-word",
34172
- whiteSpace: 1 !== text.length || autoWrapText ? "normal" : "no-wrap",
34172
+ whiteSpace: !1 === (null === (_f = table.options.customConfig) || void 0 === _f ? void 0 : _f.limitContentHeight) || 1 !== text.length || autoWrapText ? "normal" : "no-wrap",
34173
34173
  dx: ("left" === textAlign ? contentLeftIcons.length ? 0 : hierarchyOffset : 0) + _contentOffset
34174
34174
  },
34175
34175
  wrapText = new Text$1(cellTheme.text ? Object.assign({}, cellTheme.text, attribute) : attribute);
@@ -34177,7 +34177,7 @@
34177
34177
  } else {
34178
34178
  const textOption = Object.assign({
34179
34179
  text: null == textStr ? void 0 : textStr.toString()
34180
- }, (null === (_e = null === (_d = null === (_c = cellGroup.parent) || void 0 === _c ? void 0 : _c.theme) || void 0 === _d ? void 0 : _d.userTheme) || void 0 === _e ? void 0 : _e.text) || {});
34180
+ }, (null === (_j = null === (_h = null === (_g = cellGroup.parent) || void 0 === _g ? void 0 : _g.theme) || void 0 === _h ? void 0 : _h.userTheme) || void 0 === _j ? void 0 : _j.text) || {});
34181
34181
  cellTheme.text && Object.assign(textOption, cellTheme.text), textOption.textBaseline = "middle";
34182
34182
  const textConfig = [...inlineFrontIcons.map(icon => dealWithRichTextIcon(icon)), textOption, ...inlineEndIcons.map(icon => dealWithRichTextIcon(icon))];
34183
34183
  textConfig[0].textAlign = textAlign;
@@ -34233,10 +34233,10 @@
34233
34233
  autoWrapText: autoWrapText,
34234
34234
  lineClamp: lineClamp,
34235
34235
  wordBreak: "break-word",
34236
- heightLimit: autoRowHeight && !(null === (_a = table.options.customConfig) || void 0 === _a ? void 0 : _a.multilinesForXTable) ? -1 : cellHeight - Math.floor(padding[0] + padding[2]),
34236
+ heightLimit: !1 === (null === (_a = table.options.customConfig) || void 0 === _a ? void 0 : _a.limitContentHeight) || autoRowHeight && !(null === (_b = table.options.customConfig) || void 0 === _b ? void 0 : _b.multilinesForXTable) ? -1 : cellHeight - Math.floor(padding[0] + padding[2]),
34237
34237
  pickable: !1,
34238
34238
  dx: ("left" === textAlign ? hierarchyOffset : 0) + _contentOffset,
34239
- whiteSpace: 1 !== text.length || autoWrapText ? "normal" : "no-wrap"
34239
+ whiteSpace: !1 === (null === (_c = table.options.customConfig) || void 0 === _c ? void 0 : _c.limitContentHeight) || 1 !== text.length || autoWrapText ? "normal" : "no-wrap"
34240
34240
  },
34241
34241
  wrapText = new Text$1(cellTheme.text ? Object.assign({}, cellTheme.text, attribute) : attribute);
34242
34242
  wrapText.name = "text", wrapText.textBaseline = textBaseline, cellGroup.appendChild(wrapText), contentWidth = wrapText.AABBBounds.width(), wrapText.AABBBounds.height();
@@ -34300,11 +34300,12 @@
34300
34300
  });
34301
34301
  return !1;
34302
34302
  }
34303
- function updateCellContentHeight(cellGroup, distHeight, detaY, autoRowHeight, padding, textAlign, textBaseline) {
34303
+ function updateCellContentHeight(cellGroup, distHeight, detaY, autoRowHeight, padding, textAlign, textBaseline, table) {
34304
+ var _a;
34304
34305
  const newHeight = distHeight - Math.floor(padding[0] + padding[2]),
34305
34306
  textMark = cellGroup.getChildByName("text");
34306
34307
  if (textMark instanceof Text$1 && !autoRowHeight) textMark.setAttributes({
34307
- heightLimit: newHeight
34308
+ heightLimit: !1 === (null === (_a = table.options.customConfig) || void 0 === _a ? void 0 : _a.limitContentHeight) ? -1 : newHeight
34308
34309
  });else if (textMark instanceof RichText && !autoRowHeight) textMark.setAttributes({
34309
34310
  height: newHeight
34310
34311
  });else if (cellGroup.getChildByName("content")) {
@@ -34666,6 +34667,18 @@
34666
34667
  }).catch(err => {});
34667
34668
  }
34668
34669
 
34670
+ function onBeforeAttributeUpdateForInvertHighlight(val, attribute) {
34671
+ var _a, _b;
34672
+ const graphic = this;
34673
+ if (graphic.shadowRoot && graphic.shadowRoot.childrenCount && (isValid$1(val.width) || isValid$1(val.height))) {
34674
+ const shadowRect = graphic.shadowRoot.findChildrenByName("shadow-rect")[0];
34675
+ shadowRect && shadowRect.setAttributes({
34676
+ width: null !== (_a = val.width) && void 0 !== _a ? _a : shadowRect.attribute.width,
34677
+ height: null !== (_b = val.height) && void 0 !== _b ? _b : shadowRect.attribute.height
34678
+ });
34679
+ }
34680
+ }
34681
+
34669
34682
  function createCell(type, value, define, table, col, row, colWidth, cellWidth, cellHeight, columnGroup, y, padding, textAlign, textBaseline, mayHaveIcon, cellTheme, range, customResult) {
34670
34683
  var _a, _b;
34671
34684
  let cellGroup,
@@ -34725,7 +34738,7 @@
34725
34738
  } else if ("radio" === type) {
34726
34739
  cellGroup = Factory.getFunction("createRadioCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, table, cellTheme, define);
34727
34740
  }
34728
- return cellGroup;
34741
+ return cellGroup.onBeforeAttributeUpdate = onBeforeAttributeUpdateForInvertHighlight, cellGroup;
34729
34742
  }
34730
34743
  function updateCell$1(col, row, table, addNew, isShadow) {
34731
34744
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
@@ -34911,7 +34924,7 @@
34911
34924
  for (let col = range.start.col; col <= range.end.col; col++) for (let row = range.start.row; row <= range.end.row; row++) {
34912
34925
  const cellGroup = table.scenegraph.highPerformanceGetCell(col, row, !0);
34913
34926
  if ("cell" !== cellGroup.role) continue;
34914
- range.start.row !== range.end.row && cellGroup.contentHeight !== cellHeight && updateCellContentHeight(cellGroup, cellHeight, cellHeight, table.isAutoRowHeight(row), padding, textAlign, textBaseline), range.start.col !== range.end.col && cellGroup.contentWidth !== cellWidth && updateCellContentWidth(cellGroup, cellWidth, cellHeight, 0, table.isAutoRowHeight(row), padding, textAlign, textBaseline, table.scenegraph), cellGroup.contentWidth = cellWidth, cellGroup.contentHeight = cellHeight;
34927
+ range.start.row !== range.end.row && cellGroup.contentHeight !== cellHeight && updateCellContentHeight(cellGroup, cellHeight, cellHeight, table.isAutoRowHeight(row), padding, textAlign, textBaseline, table), range.start.col !== range.end.col && cellGroup.contentWidth !== cellWidth && updateCellContentWidth(cellGroup, cellWidth, cellHeight, 0, table.isAutoRowHeight(row), padding, textAlign, textBaseline, table.scenegraph), cellGroup.contentWidth = cellWidth, cellGroup.contentHeight = cellHeight;
34915
34928
  const rangeHeight = table.getRowHeight(row);
34916
34929
  resizeCellGroup(cellGroup, table.getColWidth(col), rangeHeight, range, table);
34917
34930
  }
@@ -34921,7 +34934,7 @@
34921
34934
  col: col,
34922
34935
  row: row
34923
34936
  } = cellGroup;
34924
- range.start.row !== range.end.row && cellGroup.contentHeight !== cellHeight && updateCellContentHeight(cellGroup, cellHeight, cellHeight, table.isAutoRowHeight(row), padding, textAlign, textBaseline), range.start.col !== range.end.col && cellGroup.contentWidth !== cellWidth && updateCellContentWidth(cellGroup, cellWidth, cellHeight, 0, table.isAutoRowHeight(row), padding, textAlign, textBaseline, table.scenegraph), cellGroup.contentWidth = cellWidth, cellGroup.contentHeight = cellHeight;
34937
+ range.start.row !== range.end.row && cellGroup.contentHeight !== cellHeight && updateCellContentHeight(cellGroup, cellHeight, cellHeight, table.isAutoRowHeight(row), padding, textAlign, textBaseline, table), range.start.col !== range.end.col && cellGroup.contentWidth !== cellWidth && updateCellContentWidth(cellGroup, cellWidth, cellHeight, 0, table.isAutoRowHeight(row), padding, textAlign, textBaseline, table.scenegraph), cellGroup.contentWidth = cellWidth, cellGroup.contentHeight = cellHeight;
34925
34938
  const rangeHeight = table.getRowHeight(row);
34926
34939
  resizeCellGroup(cellGroup, table.getColWidth(col), rangeHeight, range, table);
34927
34940
  }
@@ -35231,7 +35244,7 @@
35231
35244
  function computeRowsHeight(table, rowStart, rowEnd) {
35232
35245
  let isClearRowRangeHeightsMap = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !0;
35233
35246
  let update = arguments.length > 4 ? arguments[4] : undefined;
35234
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
35247
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
35235
35248
  "undefined" != typeof window && window.performance.now();
35236
35249
  const oldRowHeights = [],
35237
35250
  newHeights = [];
@@ -35239,7 +35252,7 @@
35239
35252
  const layoutMap = table.internalProps.layoutMap;
35240
35253
  table.isPivotTable() && (layoutMap.enableUseGetBodyCache(), layoutMap.enableUseHeaderPathCache()), table.defaultHeaderRowHeight, table.defaultHeaderColWidth;
35241
35254
  const isDefaultHeaderHasAuto = "auto" === table.defaultHeaderRowHeight || isArray$1(table.defaultHeaderRowHeight) && table.defaultHeaderRowHeight.some(item => "auto" === item),
35242
- isAllRowsAuto = "autoHeight" === table.heightMode || "adaptive" === table.heightMode;
35255
+ isAllRowsAuto = "autoHeight" === table.heightMode || "adaptive" === table.heightMode && !1 !== table.options.autoHeightInAdaptiveMode;
35243
35256
  if (isAllRowsAuto || isDefaultHeaderHasAuto) {
35244
35257
  rowStart = null != rowStart ? rowStart : 0, rowEnd = null != rowEnd ? rowEnd : table.rowCount - 1, (0 === rowStart && rowEnd === table.rowCount - 1 || isClearRowRangeHeightsMap) && table._clearRowRangeHeightsMap();
35245
35258
  for (let row = rowStart; row < table.columnHeaderLevelCount; row++) {
@@ -35247,7 +35260,7 @@
35247
35260
  endCol = table.colCount - 1;
35248
35261
  if ((table.isPivotTable() && !table.isPivotChart() || table.isPivotChart() && !table.internalProps.layoutMap.indicatorsAsCol) && checkPivotFixedStyleAndNoWrap(table, row) && !getCellMergeInfo(table, table.rowHeaderLevelCount, row) && (startCol = 0, endCol = table.rowHeaderLevelCount), isAllRowsAuto || "auto" === table.getDefaultRowHeight(row)) {
35249
35262
  const height = computeRowHeight(row, startCol, endCol, table);
35250
- newHeights[row] = Math.round(height), table._setRowHeight(row, height);
35263
+ newHeights[row] = Math.round(height), "only-body" !== table.heightAdaptiveMode && update || table._setRowHeight(row, height);
35251
35264
  }
35252
35265
  }
35253
35266
  for (let row = table.rowCount - table.bottomFrozenRowCount; row <= rowEnd; row++) if (isAllRowsAuto || "auto" === table.getDefaultRowHeight(row)) {
@@ -35309,21 +35322,21 @@
35309
35322
  if (update) {
35310
35323
  for (let row = rowStart; row <= rowEnd; row++) {
35311
35324
  const newRowHeight = null !== (_e = newHeights[row]) && void 0 !== _e ? _e : table.getRowHeight(row);
35312
- newRowHeight !== (null !== (_f = oldRowHeights[row]) && void 0 !== _f ? _f : table.getRowHeight(row)) && table._setRowHeight(row, newRowHeight);
35325
+ isValid$1(newRowHeight) && table._setRowHeight(row, newRowHeight);
35313
35326
  }
35314
35327
  if ("adaptive" === table.heightMode || table.autoFillHeight && table.getAllRowsHeight() <= table.tableNoFrameHeight) {
35315
35328
  for (let row = 0; row <= table.columnHeaderLevelCount - 1; row++) {
35316
35329
  const newRowHeight = table.getRowHeight(row);
35317
- newRowHeight !== (null !== (_g = oldRowHeights[row]) && void 0 !== _g ? _g : table.getRowHeight(row)) && table.scenegraph.updateRowHeight(row, newRowHeight - (null !== (_h = oldRowHeights[row]) && void 0 !== _h ? _h : table.getRowHeight(row)), !0);
35330
+ newRowHeight !== (null !== (_f = oldRowHeights[row]) && void 0 !== _f ? _f : table.getRowHeight(row)) && table.scenegraph.updateRowHeight(row, newRowHeight - (null !== (_g = oldRowHeights[row]) && void 0 !== _g ? _g : table.getRowHeight(row)), !0);
35318
35331
  }
35319
35332
  for (let row = table.rowCount - table.bottomFrozenRowCount; row <= table.rowCount - 1; row++) {
35320
35333
  const newRowHeight = table.getRowHeight(row);
35321
- newRowHeight !== (null !== (_j = oldRowHeights[row]) && void 0 !== _j ? _j : table.getRowHeight(row)) && table.scenegraph.updateRowHeight(row, newRowHeight - (null !== (_k = oldRowHeights[row]) && void 0 !== _k ? _k : table.getRowHeight(row)), !0);
35334
+ newRowHeight !== (null !== (_h = oldRowHeights[row]) && void 0 !== _h ? _h : table.getRowHeight(row)) && table.scenegraph.updateRowHeight(row, newRowHeight - (null !== (_j = oldRowHeights[row]) && void 0 !== _j ? _j : table.getRowHeight(row)), !0);
35322
35335
  }
35323
35336
  }
35324
35337
  for (let row = table.scenegraph.proxy.rowStart; row <= table.scenegraph.proxy.rowEnd; row++) {
35325
35338
  const newRowHeight = table.getRowHeight(row);
35326
- newRowHeight !== (null !== (_l = oldRowHeights[row]) && void 0 !== _l ? _l : table.getRowHeight(row)) && table.scenegraph.updateRowHeight(row, newRowHeight - (null !== (_m = oldRowHeights[row]) && void 0 !== _m ? _m : table.getRowHeight(row)), !0);
35339
+ newRowHeight !== (null !== (_k = oldRowHeights[row]) && void 0 !== _k ? _k : table.getRowHeight(row)) && table.scenegraph.updateRowHeight(row, newRowHeight - (null !== (_l = oldRowHeights[row]) && void 0 !== _l ? _l : table.getRowHeight(row)), !0);
35327
35340
  }
35328
35341
  }
35329
35342
  table.isPivotTable() && (layoutMap.disableUseGetBodyCache(), layoutMap.disableUseHeaderPathCache());
@@ -35685,7 +35698,7 @@
35685
35698
  });
35686
35699
  }), renderDefault) {
35687
35700
  const style = table._getCellStyle(colStart, rowStart);
35688
- updateCellContentHeight(singleCellGroup, distHeight, detaY, autoRowHeight, getQuadProps(style.padding), style.textAlign, style.textBaseline);
35701
+ updateCellContentHeight(singleCellGroup, distHeight, detaY, autoRowHeight, getQuadProps(style.padding), style.textAlign, style.textBaseline, table);
35689
35702
  }
35690
35703
  const rangeHeight = table.getRowHeight(row),
35691
35704
  rangeWidth = table.getColWidth(col);
@@ -35706,7 +35719,7 @@
35706
35719
  }
35707
35720
  } else {
35708
35721
  const style = table._getCellStyle(cellGroup.col, cellGroup.row);
35709
- updateCellContentHeight(cellGroup, distHeight, detaY, autoRowHeight, getQuadProps(style.padding), style.textAlign, style.textBaseline);
35722
+ updateCellContentHeight(cellGroup, distHeight, detaY, autoRowHeight, getQuadProps(style.padding), style.textAlign, style.textBaseline, table);
35710
35723
  }
35711
35724
  }
35712
35725
 
@@ -44757,7 +44770,7 @@
44757
44770
  }
44758
44771
  dealMenuHover(eventArgsSet) {}
44759
44772
  dealTableSelect(eventArgsSet, isSelectMoving) {
44760
- var _a, _b, _c;
44773
+ var _a, _b, _c, _d;
44761
44774
  if (!eventArgsSet) return this.table.stateManager.updateSelectPos(-1, -1), !1;
44762
44775
  const {
44763
44776
  eventArgs: eventArgs
@@ -44765,7 +44778,15 @@
44765
44778
  if (eventArgs) {
44766
44779
  if ("checkbox" === eventArgs.target.name || "radio" === eventArgs.target.name) return !1;
44767
44780
  const define = this.table.getBodyColumnDefine(eventArgs.col, eventArgs.row);
44768
- return this.table.isHeader(eventArgs.col, eventArgs.row) && ((null == define ? void 0 : define.disableHeaderSelect) || (null === (_a = this.table.stateManager.select) || void 0 === _a ? void 0 : _a.disableHeader)) || !this.table.isHeader(eventArgs.col, eventArgs.row) && (null == define ? void 0 : define.disableSelect) ? (isSelectMoving || this.table.stateManager.updateSelectPos(-1, -1), !1) : !this.table.isPivotChart() || "axis-label" !== (null === (_b = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _b ? void 0 : _b.target.name) && "chart" !== (null === (_c = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _c ? void 0 : _c.target.type) ? (this.table.stateManager.updateSelectPos(eventArgs.col, eventArgs.row, eventArgs.event.shiftKey, eventArgs.event.ctrlKey || eventArgs.event.metaKey, !1, isSelectMoving), !0) : (this.table.stateManager.updateSelectPos(-1, -1), !1);
44781
+ if (this.table.isHeader(eventArgs.col, eventArgs.row) && ((null == define ? void 0 : define.disableHeaderSelect) || (null === (_a = this.table.stateManager.select) || void 0 === _a ? void 0 : _a.disableHeader))) return isSelectMoving || this.table.stateManager.updateSelectPos(-1, -1), !1;
44782
+ if (!this.table.isHeader(eventArgs.col, eventArgs.row) && (null == define ? void 0 : define.disableSelect)) {
44783
+ if (!isSelectMoving) {
44784
+ const isHasSelected = !!(null === (_b = this.table.stateManager.select.ranges) || void 0 === _b ? void 0 : _b.length);
44785
+ this.table.stateManager.updateSelectPos(-1, -1), isHasSelected && this.table.stateManager.endSelectCells(!0, isHasSelected);
44786
+ }
44787
+ return !1;
44788
+ }
44789
+ return !this.table.isPivotChart() || "axis-label" !== (null === (_c = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _c ? void 0 : _c.target.name) && "chart" !== (null === (_d = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _d ? void 0 : _d.target.type) ? (this.table.stateManager.updateSelectPos(eventArgs.col, eventArgs.row, eventArgs.event.shiftKey, eventArgs.event.ctrlKey || eventArgs.event.metaKey, !1, isSelectMoving), !0) : (this.table.stateManager.updateSelectPos(-1, -1), !1);
44769
44790
  }
44770
44791
  return !1;
44771
44792
  }
@@ -46190,9 +46211,11 @@
46190
46211
  }
46191
46212
  getCustomCellStyleId(col, row) {
46192
46213
  let customStyleId;
46193
- return this.customCellStyleArrangement.forEach(style => {
46194
- style.cellPosition.range ? style.cellPosition.range.start.col <= col && style.cellPosition.range.end.col >= col && style.cellPosition.range.start.row <= row && style.cellPosition.range.end.row >= row && (customStyleId = style.customStyleId) : style.cellPosition.col === col && style.cellPosition.row === row && (customStyleId = style.customStyleId);
46195
- }), customStyleId;
46214
+ const range = this.table.getCellRange(col, row);
46215
+ for (let c = range.start.col; c <= range.end.col; c++) for (let r = range.start.row; r <= range.end.row; r++) this.customCellStyleArrangement.forEach(style => {
46216
+ style.cellPosition.range ? style.cellPosition.range.start.col <= c && style.cellPosition.range.end.col >= c && style.cellPosition.range.start.row <= r && style.cellPosition.range.end.row >= r && (customStyleId = style.customStyleId) : style.cellPosition.col === c && style.cellPosition.row === r && (customStyleId = style.customStyleId);
46217
+ });
46218
+ return customStyleId;
46196
46219
  }
46197
46220
  getCustomCellStyleOption(customStyleId) {
46198
46221
  return this.customCellStyle.find(style => style.id === customStyleId);
@@ -46212,19 +46235,24 @@
46212
46235
  }
46213
46236
  arrangeCustomCellStyle(cellPos, customStyleId) {
46214
46237
  const index = this.customCellStyleArrangement.findIndex(style => style.cellPosition.range && cellPos.range ? style.cellPosition.range.start.col === cellPos.range.start.col && style.cellPosition.range.start.row === cellPos.range.start.row && style.cellPosition.range.end.col === cellPos.range.end.col && style.cellPosition.range.end.row === cellPos.range.end.row : style.cellPosition.col === cellPos.col && style.cellPosition.row === cellPos.row);
46215
- if (-1 === index) this.customCellStyleArrangement.push({
46216
- cellPosition: {
46217
- col: cellPos.col,
46218
- row: cellPos.row,
46219
- range: cellPos.range
46220
- },
46221
- customStyleId: customStyleId
46222
- });else {
46223
- if (this.customCellStyleArrangement[index].customStyleId === customStyleId) return;
46224
- this.customCellStyleArrangement[index].customStyleId = customStyleId;
46238
+ if (-1 !== index || customStyleId) {
46239
+ if (-1 === index && customStyleId) this.customCellStyleArrangement.push({
46240
+ cellPosition: {
46241
+ col: cellPos.col,
46242
+ row: cellPos.row,
46243
+ range: cellPos.range
46244
+ },
46245
+ customStyleId: customStyleId
46246
+ });else {
46247
+ if (this.customCellStyleArrangement[index].customStyleId === customStyleId) return;
46248
+ customStyleId ? this.customCellStyleArrangement[index].customStyleId = customStyleId : this.customCellStyleArrangement.splice(index, 1);
46249
+ }
46250
+ if (cellPos.range) for (let col = cellPos.range.start.col; col <= cellPos.range.end.col; col++) for (let row = cellPos.range.start.row; row <= cellPos.range.end.row; row++) {
46251
+ const range = this.table.getCellRange(col, row);
46252
+ for (let c = range.start.col; c <= range.end.col; c++) for (let r = range.start.row; r <= range.end.row; r++) this.table.scenegraph.updateCellContent(c, r);
46253
+ } else this.table.scenegraph.updateCellContent(cellPos.col, cellPos.row);
46254
+ this.table.scenegraph.updateNextFrame();
46225
46255
  }
46226
- if (cellPos.range) for (let col = cellPos.range.start.col; col <= cellPos.range.end.col; col++) for (let row = cellPos.range.start.row; row <= cellPos.range.end.row; row++) this.table.scenegraph.updateCellContent(col, row);else this.table.scenegraph.updateCellContent(cellPos.col, cellPos.row);
46227
- this.table.scenegraph.updateNextFrame();
46228
46256
  }
46229
46257
  updateCustomCell(customCellStyle, customCellStyleArrangement) {
46230
46258
  this.customCellStyle.length = 0, this.customCellStyleArrangement.length = 0, customCellStyle.forEach(cellStyle => {
@@ -47302,7 +47330,7 @@
47302
47330
  constructor(container) {
47303
47331
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
47304
47332
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
47305
- if (super(), this.showFrozenIcon = !0, this.version = "1.10.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");
47333
+ if (super(), this.showFrozenIcon = !0, this.version = "1.10.4-alpha.2", 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");
47306
47334
  const {
47307
47335
  frozenColCount = 0,
47308
47336
  frozenRowCount: frozenRowCount,
@@ -57144,7 +57172,7 @@
57144
57172
  themes: themes$1
57145
57173
  });
57146
57174
 
57147
- const version = "1.10.3";
57175
+ const version = "1.10.4-alpha.2";
57148
57176
 
57149
57177
  exports.Gantt = Gantt;
57150
57178
  exports.TYPES = index$2;