@visactor/vtable-gantt 1.13.3-alpha.1 → 1.13.3-alpha.10

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.13.3-alpha.1";
8
+ export declare const version = "1.13.3-alpha.10";
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.13.3-alpha.1";
55
+ exports.VTable = VTable, exports.version = "1.13.3-alpha.10";
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,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.13.3-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"]}
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,iBAAiB,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.13.3-alpha.10\";\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"]}
@@ -36585,24 +36585,6 @@
36585
36585
  cursor: "pointer"
36586
36586
  };
36587
36587
  },
36588
- get loading() {
36589
- return {
36590
- type: "image",
36591
- src: "https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/media/loading-circle.gif",
36592
- width: collapse_size,
36593
- height: collapse_size,
36594
- name: "loading",
36595
- positionType: IconPosition.contentLeft,
36596
- marginLeft: 0,
36597
- marginRight: 4,
36598
- hover: {
36599
- width: collapse_size_2,
36600
- height: collapse_size_2,
36601
- bgColor: "rgba(101, 117, 168, 0.1)"
36602
- },
36603
- isGif: !0
36604
- };
36605
- },
36606
36588
  get drillDown() {
36607
36589
  return {
36608
36590
  name: "drillDown",
@@ -38170,16 +38152,12 @@
38170
38152
  }
38171
38153
  function computeRowHeight(row, startCol, endCol, table) {
38172
38154
  var _a;
38173
- if (!("autoHeight" === table.heightMode || table.options.customComputeRowHeight || "adaptive" === table.heightMode && !1 !== table.options.autoHeightInAdaptiveMode) && "auto" !== table.getDefaultRowHeight(row)) return table.getDefaultRowHeight(row);
38155
+ if (!("autoHeight" === table.heightMode || "adaptive" === table.heightMode && !1 !== table.options.autoHeightInAdaptiveMode) && "auto" !== table.getDefaultRowHeight(row)) return table.getDefaultRowHeight(row);
38174
38156
  let maxHeight;
38175
- if (table.options.customComputeRowHeight) {
38176
- const customRowHeight = table.options.customComputeRowHeight({
38177
- row: row,
38178
- table: table
38179
- });
38180
- if ("number" == typeof customRowHeight) return customRowHeight;
38181
- if ("auto" !== customRowHeight) return table.getDefaultRowHeight(row);
38182
- }
38157
+ if (table.options.customComputeRowHeight) return table.options.customComputeRowHeight({
38158
+ row: row,
38159
+ table: table
38160
+ });
38183
38161
  if (table.isPivotChart() && row >= table.columnHeaderLevelCount && row < table.rowCount - table.bottomFrozenRowCount) if (table.internalProps.layoutMap.indicatorsAsCol) {
38184
38162
  const optimunHeight = table.internalProps.layoutMap.getOptimunHeightForChart(row);
38185
38163
  if (optimunHeight > 0) return optimunHeight;
@@ -42390,12 +42368,12 @@
42390
42368
  }
42391
42369
  updateCellGroups(count) {
42392
42370
  const distRow = Math.min(this.bodyBottomRow, this.rowUpdatePos + count);
42393
- ("autoHeight" === this.table.heightMode || this.table.options.customComputeRowHeight) && computeRowsHeight(this.table, this.rowUpdatePos, distRow, !1), updateRowContent(this.rowUpdatePos, distRow, this), "autoHeight" === this.table.heightMode && (updateAutoRow(this.bodyLeftCol, this.bodyRightCol, this.rowUpdatePos, distRow, this.table, this.rowUpdateDirection, !0), updateAutoRow(0, this.table.frozenColCount - 1, this.rowUpdatePos, distRow, this.table, this.rowUpdateDirection, !0), updateAutoRow(this.table.colCount - this.table.rightFrozenColCount, this.table.colCount - 1, this.rowUpdatePos, distRow, this.table, this.rowUpdateDirection, !0)), this.rowUpdatePos = distRow + 1;
42371
+ "autoHeight" === this.table.heightMode && computeRowsHeight(this.table, this.rowUpdatePos, distRow, !1), updateRowContent(this.rowUpdatePos, distRow, this), "autoHeight" === this.table.heightMode && (updateAutoRow(this.bodyLeftCol, this.bodyRightCol, this.rowUpdatePos, distRow, this.table, this.rowUpdateDirection, !0), updateAutoRow(0, this.table.frozenColCount - 1, this.rowUpdatePos, distRow, this.table, this.rowUpdateDirection, !0), updateAutoRow(this.table.colCount - this.table.rightFrozenColCount, this.table.colCount - 1, this.rowUpdatePos, distRow, this.table, this.rowUpdateDirection, !0)), this.rowUpdatePos = distRow + 1;
42394
42372
  }
42395
42373
  updateBottomFrozenCellGroups() {
42396
42374
  const startRow = this.table.rowCount - this.table.bottomFrozenRowCount,
42397
42375
  endRow = this.table.rowCount - 1;
42398
- ("autoHeight" === this.table.heightMode || this.table.options.customComputeRowHeight) && computeRowsHeight(this.table, startRow, endRow, !1), updateRowContent(startRow, endRow, this), "autoHeight" === this.table.heightMode && (updateAutoRow(this.bodyLeftCol, this.bodyRightCol, startRow, endRow, this.table, this.rowUpdateDirection), updateAutoRow(0, this.table.frozenColCount - 1, startRow, endRow, this.table, this.rowUpdateDirection), updateAutoRow(this.table.colCount - this.table.rightFrozenColCount, this.table.colCount - 1, startRow, endRow, this.table, this.rowUpdateDirection));
42376
+ "autoHeight" === this.table.heightMode && computeRowsHeight(this.table, startRow, endRow, !1), updateRowContent(startRow, endRow, this), "autoHeight" === this.table.heightMode && (updateAutoRow(this.bodyLeftCol, this.bodyRightCol, startRow, endRow, this.table, this.rowUpdateDirection), updateAutoRow(0, this.table.frozenColCount - 1, startRow, endRow, this.table, this.rowUpdateDirection), updateAutoRow(this.table.colCount - this.table.rightFrozenColCount, this.table.colCount - 1, startRow, endRow, this.table, this.rowUpdateDirection));
42399
42377
  }
42400
42378
  updateRightFrozenCellGroups() {
42401
42379
  const startCol = this.table.colCount - this.table.rightFrozenColCount,
@@ -49584,13 +49562,15 @@
49584
49562
  })(candCol, right);
49585
49563
  }
49586
49564
  function getTargetRowAt(absoluteY, _this) {
49565
+ var _a;
49587
49566
  if (0 === absoluteY) return {
49588
49567
  top: 0,
49589
49568
  row: 0,
49590
49569
  bottom: 0,
49591
49570
  height: 0
49592
49571
  };
49593
- const candRow = computeTargetRowByY(absoluteY, _this),
49572
+ const floorOrRound = !0 === (null === (_a = _this.options.customConfig) || void 0 === _a ? void 0 : _a._disableColumnAndRowSizeRound) ? Math.floor : Math.round,
49573
+ candRow = computeTargetRowByY(absoluteY, _this),
49594
49574
  bottom = _this.getRowsHeight(0, candRow);
49595
49575
  return absoluteY >= bottom ? ((startRow, startBottom) => {
49596
49576
  let top = startBottom - _this.getRowHeight(startRow);
@@ -49600,7 +49580,7 @@
49600
49580
  for (let row = startRow; row < rowCount; row++) {
49601
49581
  const height = _this.getRowHeight(row),
49602
49582
  bottom = top + height;
49603
- if (Math.round(top) <= Math.round(absoluteY) && Math.round(absoluteY) < Math.round(bottom)) return {
49583
+ if (floorOrRound(top) <= floorOrRound(absoluteY) && floorOrRound(absoluteY) < floorOrRound(bottom)) return {
49604
49584
  top: top,
49605
49585
  row: row,
49606
49586
  bottom: bottom,
@@ -49614,7 +49594,7 @@
49614
49594
  for (let row = startRow; row >= 0; row--) {
49615
49595
  const height = _this.getRowHeight(row),
49616
49596
  top = bottom - height;
49617
- if (Math.round(top) <= Math.round(absoluteY) && Math.round(absoluteY) < Math.round(bottom)) return {
49597
+ if (floorOrRound(top) <= floorOrRound(absoluteY) && floorOrRound(absoluteY) < floorOrRound(bottom)) return {
49618
49598
  top: top,
49619
49599
  row: row,
49620
49600
  bottom: bottom,
@@ -50458,7 +50438,7 @@
50458
50438
  constructor(container) {
50459
50439
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
50460
50440
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
50461
- if (super(), this.showFrozenIcon = !0, this.version = "1.13.3-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");
50441
+ if (super(), this.showFrozenIcon = !0, this.version = "1.13.3-alpha.10", 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");
50462
50442
  const {
50463
50443
  frozenColCount = 0,
50464
50444
  frozenRowCount: frozenRowCount,
@@ -61795,7 +61775,7 @@
61795
61775
  themes: themes$1
61796
61776
  });
61797
61777
 
61798
- const version = "1.13.3-alpha.1";
61778
+ const version = "1.13.3-alpha.10";
61799
61779
 
61800
61780
  exports.Gantt = Gantt;
61801
61781
  exports.TYPES = index$3;