@visactor/vtable-gantt 1.17.4 → 1.17.5-alpha.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.
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.17.4";
8
+ export declare const version = "1.17.5-alpha.1";
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.17.4";
55
+ exports.VTable = VTable, exports.version = "1.17.5-alpha.1";
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.17.4\";\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.17.5-alpha.1\";\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"]}
@@ -33941,6 +33941,10 @@
33941
33941
  get selectionFillMode() {
33942
33942
  var _a;
33943
33943
  return null !== (_a = null == selectionStyle ? void 0 : selectionStyle.selectionFillMode) && void 0 !== _a ? _a : "overlay";
33944
+ },
33945
+ get dynamicUpdateSelectionSize() {
33946
+ var _a;
33947
+ return null !== (_a = null == selectionStyle ? void 0 : selectionStyle.dynamicUpdateSelectionSize) && void 0 !== _a && _a;
33944
33948
  }
33945
33949
  };
33946
33950
  }
@@ -36960,16 +36964,15 @@
36960
36964
  }
36961
36965
  function getCellCornerRadius(col, row, table) {
36962
36966
  const tableCornerRadius = table.theme.frameStyle.cornerRadius;
36963
- if (table.theme.cellInnerBorder) if (Array.isArray(tableCornerRadius)) {
36964
- if (0 === col && 0 === row) return [tableCornerRadius[0], 0, 0, 0];
36965
- if (col === table.colCount - 1 && 0 === row) return [0, tableCornerRadius[1], 0, 0];
36966
- if (0 === col && row === table.rowCount - 1) return [0, 0, 0, tableCornerRadius[3]];
36967
- if (col === table.colCount - 1 && row === table.rowCount - 1) return [0, 0, tableCornerRadius[2], 0];
36968
- } else if (tableCornerRadius) {
36969
- if (0 === col && 0 === row) return [tableCornerRadius, 0, 0, 0];
36970
- if (col === table.colCount - 1 && 0 === row) return [0, tableCornerRadius, 0, 0];
36971
- if (0 === col && row === table.rowCount - 1) return [0, 0, 0, tableCornerRadius];
36972
- if (col === table.colCount - 1 && row === table.rowCount - 1) return [0, 0, tableCornerRadius, 0];
36967
+ if (table.theme.cellInnerBorder) {
36968
+ if (Array.isArray(tableCornerRadius)) {
36969
+ const radius = [0, 0, 0, 0];
36970
+ return 0 === col && 0 === row && (radius[0] = tableCornerRadius[0]), col === table.colCount - 1 && 0 === row && (radius[1] = tableCornerRadius[1]), 0 === col && row === table.rowCount - 1 && (radius[3] = tableCornerRadius[3]), col === table.colCount - 1 && row === table.rowCount - 1 && (radius[2] = tableCornerRadius[2]), radius;
36971
+ }
36972
+ if (tableCornerRadius) {
36973
+ const radius = [0, 0, 0, 0];
36974
+ return 0 === col && 0 === row && (radius[0] = tableCornerRadius), col === table.colCount - 1 && 0 === row && (radius[1] = tableCornerRadius), 0 === col && row === table.rowCount - 1 && (radius[3] = tableCornerRadius), col === table.colCount - 1 && row === table.rowCount - 1 && (radius[2] = tableCornerRadius), radius;
36975
+ }
36973
36976
  }
36974
36977
  return 0;
36975
36978
  }
@@ -43943,7 +43946,10 @@
43943
43946
  if (!isNearBottomColHeader && table.bottomFrozenRowCount && endRow < table.rowCount - table.bottomFrozenRowCount) {
43944
43947
  table.getRowsHeight(0, endRow) - table.scrollTop > table.tableNoFrameHeight - table.getBottomFrozenRowsHeight() && (isNearBottomColHeader = !0);
43945
43948
  }
43946
- if (isNearRowHeader && selectComp.rect.attribute.stroke[3] || isNearRightRowHeader && selectComp.rect.attribute.stroke[1] || isNearColHeader && selectComp.rect.attribute.stroke[0] || isNearBottomColHeader && selectComp.rect.attribute.stroke[2]) {
43949
+ const {
43950
+ dynamicUpdateSelectionSize: dynamicUpdateSelectionSize
43951
+ } = table.theme.selectionStyle;
43952
+ if (isNearRowHeader && (selectComp.rect.attribute.stroke[3] || dynamicUpdateSelectionSize) || isNearRightRowHeader && (selectComp.rect.attribute.stroke[1] || dynamicUpdateSelectionSize) || isNearColHeader && (selectComp.rect.attribute.stroke[0] || dynamicUpdateSelectionSize) || isNearBottomColHeader && (selectComp.rect.attribute.stroke[2] || dynamicUpdateSelectionSize)) {
43947
43953
  if (isNearRowHeader && selectComp.rect.attribute.stroke[3] && scene.tableGroup.insertAfter(selectComp.rect, "columnHeader" === selectComp.role ? scene.cornerHeaderGroup : "bottomFrozen" === selectComp.role ? scene.leftBottomCornerGroup : scene.rowHeaderGroup), isNearBottomColHeader && selectComp.rect.attribute.stroke[2] && scene.tableGroup.insertAfter(selectComp.rect, "rowHeader" === selectComp.role ? scene.leftBottomCornerGroup : "rightFrozen" === selectComp.role ? scene.rightBottomCornerGroup : scene.bottomFrozenGroup), isNearColHeader && selectComp.rect.attribute.stroke[0] && scene.tableGroup.insertAfter(selectComp.rect, "rowHeader" === selectComp.role ? scene.cornerHeaderGroup : "rightFrozen" === selectComp.role ? scene.rightTopCornerGroup : scene.colHeaderGroup), isNearRightRowHeader && selectComp.rect.attribute.stroke[1] && scene.tableGroup.insertAfter(selectComp.rect, "columnHeader" === selectComp.role ? scene.rightTopCornerGroup : "bottomFrozen" === selectComp.role ? scene.rightBottomCornerGroup : scene.rightFrozenGroup), selectComp.rect.attribute.x < table.getFrozenColsWidth() && table.scrollLeft > 0 && ("body" === selectComp.role || "columnHeader" === selectComp.role || "bottomFrozen" === selectComp.role)) {
43948
43954
  const width = selectComp.rect.attribute.width - (table.getFrozenColsWidth() - selectComp.rect.attribute.x);
43949
43955
  selectComp.rect.setAttributes({
@@ -45877,9 +45883,9 @@
45877
45883
  this.table.scenegraph.proxy.setY(-y, isEnd);
45878
45884
  }
45879
45885
  setBodyAndRowHeaderY(y) {
45880
- var _a, _b;
45881
- const firstBodyCell = null === (_a = this.bodyGroup.firstChild) || void 0 === _a ? void 0 : _a.firstChild,
45882
- lastBodyCell = null === (_b = this.bodyGroup.firstChild) || void 0 === _b ? void 0 : _b.lastChild;
45886
+ var _a, _b, _c, _d, _e, _f;
45887
+ const firstBodyCell = null !== (_b = null === (_a = this.bodyGroup.firstChild) || void 0 === _a ? void 0 : _a.firstChild) && void 0 !== _b ? _b : null === (_c = this.rowHeaderGroup.firstChild) || void 0 === _c ? void 0 : _c.firstChild,
45888
+ lastBodyCell = null !== (_e = null === (_d = this.bodyGroup.firstChild) || void 0 === _d ? void 0 : _d.lastChild) && void 0 !== _e ? _e : null === (_f = this.rowHeaderGroup.firstChild) || void 0 === _f ? void 0 : _f.lastChild;
45883
45889
  0 === y && firstBodyCell && firstBodyCell.row === this.table.frozenRowCount && firstBodyCell.attribute.y + y < 0 ? y = -firstBodyCell.attribute.y : lastBodyCell && this.table.tableNoFrameHeight < this.table.getAllRowsHeight() && lastBodyCell.row === this.table.rowCount - this.table.bottomFrozenRowCount - 1 && lastBodyCell.attribute.y + lastBodyCell.attribute.height + y < this.table.tableNoFrameHeight - this.table.getFrozenRowsHeight() - this.table.getBottomFrozenRowsHeight() && (y = this.table.tableNoFrameHeight - this.table.getFrozenRowsHeight() - this.table.getBottomFrozenRowsHeight() - lastBodyCell.attribute.y - lastBodyCell.attribute.height), this.colHeaderGroup.attribute.height + y !== this.bodyGroup.attribute.y && (this.bodyGroup.setAttribute("y", this.colHeaderGroup.attribute.height + y), this.rowHeaderGroup.setAttribute("y", this.cornerHeaderGroup.attribute.height + y), this.table.rightFrozenColCount > 0 && this.rightFrozenGroup.setAttribute("y", this.rightTopCornerGroup.attribute.height + y), this.updateNextFrame());
45884
45890
  }
45885
45891
  setBodyAndColHeaderX(x) {
@@ -51193,7 +51199,7 @@
51193
51199
  return "grid" === this.hierarchyType || null === this.hierarchyType ? (null == children ? void 0 : children.length) >= 1 ? children.forEach(n => {
51194
51200
  var _a, _b, _c;
51195
51201
  n.level = (null !== (_a = node.level) && void 0 !== _a ? _a : 0) + 1, "grid" === this.hierarchyType && (n.afterSpanLevel = (null !== (_b = node.afterSpanLevel) && void 0 !== _b ? _b : 0) + (null !== (_c = node.levelSpan) && void 0 !== _c ? _c : 1)), this.totalLevel = Math.max(this.totalLevel, n.level + 1), size += this.setTreeNode(n, size, node);
51196
- }) : size = 1 : node.hierarchyState === HierarchyState.expand && (null == children ? void 0 : children.length) >= 1 ? children.forEach(n => {
51202
+ }) : size = -1 === node.level ? 0 : 1 : node.hierarchyState === HierarchyState.expand && (null == children ? void 0 : children.length) >= 1 ? children.forEach(n => {
51197
51203
  var _a;
51198
51204
  n.level = (null !== (_a = node.level) && void 0 !== _a ? _a : 0) + 1, this.totalLevel = Math.max(this.totalLevel, n.level + 1), this.expandedMaxLevel = Math.max(this.expandedMaxLevel, n.level + 1), size += this.setTreeNode(n, size, node);
51199
51205
  }) : node.hierarchyState === HierarchyState.collapse && (null == children ? void 0 : children.length) >= 1 ? children.forEach(n => {
@@ -51205,7 +51211,7 @@
51205
51211
  })) : (null == children ? void 0 : children.length) >= 1 || !0 === children ? ((null === (_d = children[0]) || void 0 === _d ? void 0 : _d.indicatorKey) && "grid-tree" === this.hierarchyType || (node.hierarchyState = HierarchyState.collapse), (null == children ? void 0 : children.length) >= 1 && children.forEach(n => {
51206
51212
  var _a;
51207
51213
  n.level = (null !== (_a = node.level) && void 0 !== _a ? _a : 0) + 1, this.totalLevel = Math.max(this.totalLevel, n.level + 1), this.setTreeNode(n, size, node);
51208
- })) : (node.hierarchyState = HierarchyState.none, size = 1), node.size = size, size;
51214
+ })) : (node.hierarchyState = HierarchyState.none, size = -1 === node.level ? 0 : 1), node.size = size, size;
51209
51215
  }
51210
51216
  getTreePath(index) {
51211
51217
  let maxDeep = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 30;
@@ -52397,7 +52403,7 @@
52397
52403
  constructor(container) {
52398
52404
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
52399
52405
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
52400
- if (super(), this.showFrozenIcon = !0, this.version = "1.17.4", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
52406
+ if (super(), this.showFrozenIcon = !0, this.version = "1.17.5-alpha.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");
52401
52407
  !1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vglobal.isImageAnonymous = !1);
52402
52408
  const {
52403
52409
  frozenColCount = 0,
@@ -52782,6 +52788,7 @@
52782
52788
  shadowWidths = toBoxArray(null !== (_q = null === (_p = this.internalProps.theme.frameStyle) || void 0 === _p ? void 0 : _p.shadowBlur) && void 0 !== _q ? _q : [0]);
52783
52789
  (null === (_r = this.theme.frameStyle) || void 0 === _r ? void 0 : _r.innerBorder) ? (this.tableX = 0, this.tableY = 0, this.tableNoFrameWidth = width - (null !== (_s = shadowWidths[1]) && void 0 !== _s ? _s : 0), this.tableNoFrameHeight = height - (null !== (_t = shadowWidths[2]) && void 0 !== _t ? _t : 0)) : (this.tableX = (null !== (_u = lineWidths[3]) && void 0 !== _u ? _u : 0) + (null !== (_v = shadowWidths[3]) && void 0 !== _v ? _v : 0), this.tableY = (null !== (_w = lineWidths[0]) && void 0 !== _w ? _w : 0) + (null !== (_x = shadowWidths[0]) && void 0 !== _x ? _x : 0), this.tableNoFrameWidth = width - ((null !== (_y = lineWidths[1]) && void 0 !== _y ? _y : 0) + (null !== (_z = shadowWidths[1]) && void 0 !== _z ? _z : 0)) - ((null !== (_0 = lineWidths[3]) && void 0 !== _0 ? _0 : 0) + (null !== (_1 = shadowWidths[3]) && void 0 !== _1 ? _1 : 0)), this.tableNoFrameHeight = height - ((null !== (_2 = lineWidths[0]) && void 0 !== _2 ? _2 : 0) + (null !== (_3 = shadowWidths[0]) && void 0 !== _3 ? _3 : 0)) - ((null !== (_4 = lineWidths[2]) && void 0 !== _4 ? _4 : 0) + (null !== (_5 = shadowWidths[2]) && void 0 !== _5 ? _5 : 0)));
52784
52790
  }
52791
+ this._clearColRangeWidthsMap(), this._clearRowRangeHeightsMap();
52785
52792
  }
52786
52793
  updateViewBox(newViewBox) {
52787
52794
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
@@ -65456,7 +65463,7 @@
65456
65463
  themes: themes$1
65457
65464
  });
65458
65465
 
65459
- const version = "1.17.4";
65466
+ const version = "1.17.5-alpha.1";
65460
65467
 
65461
65468
  exports.Gantt = Gantt;
65462
65469
  exports.TYPES = index$3;