@visactor/vtable-gantt 1.19.7 → 1.19.8

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
@@ -6,5 +6,5 @@ import * as tools from './tools';
6
6
  import * as VRender from './vrender';
7
7
  import * as VTable from './vtable';
8
8
  import * as plugins from './plugins';
9
- export declare const version = "1.19.7";
9
+ export declare const version = "1.19.8";
10
10
  export { TYPES, GanttConstructorOptions, Gantt, ColumnsDefine, ColumnDefine, LinkColumnDefine, ChartColumnDefine, ImageColumnDefine, SparklineColumnDefine, ProgressbarColumnDefine, TextColumnDefine, GroupColumnDefine, TextAlignType, TextBaselineType, tools, VRender, VTable, plugins };
package/cjs/index.js CHANGED
@@ -56,5 +56,5 @@ exports.VTable = VTable;
56
56
 
57
57
  const plugins = __importStar(require("./plugins"));
58
58
 
59
- exports.plugins = plugins, exports.version = "1.19.7";
59
+ exports.plugins = plugins, exports.version = "1.19.8";
60
60
  //# sourceMappingURL=index.js.map
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAoC;AAwBlC,sBAAK;AAVP,mCAAgC;AAY9B,sFAZO,aAAK,OAYP;AAXP,+CAAiC;AAuB/B,sBAAK;AAtBP,mDAAqC;AAuBnC,0BAAO;AAtBT,iDAAmC;AAuBjC,wBAAM;AAtBR,mDAAqC;AAuBnC,0BAAO;AAtBI,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';\nimport * as plugins from './plugins';\nexport const version = \"1.19.7\";\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 plugins\n};\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAoC;AAwBlC,sBAAK;AAVP,mCAAgC;AAY9B,sFAZO,aAAK,OAYP;AAXP,+CAAiC;AAuB/B,sBAAK;AAtBP,mDAAqC;AAuBnC,0BAAO;AAtBT,iDAAmC;AAuBjC,wBAAM;AAtBR,mDAAqC;AAuBnC,0BAAO;AAtBI,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';\nimport * as plugins from './plugins';\nexport const version = \"1.19.8\";\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 plugins\n};\n"]}
@@ -46333,7 +46333,7 @@
46333
46333
  textAlign,
46334
46334
  textBaseline,
46335
46335
  y = 0;
46336
- columnGroup.lastChild && columnGroup.lastChild.row === rowStart - 1 ? y = columnGroup.lastChild.attribute.y + columnGroup.lastChild.attribute.height : columnGroup.colHeight && (y = columnGroup.colHeight);
46336
+ columnGroup.lastChild && columnGroup.lastChild.row === rowStart - 1 ? y = columnGroup.lastChild.attribute.y + columnGroup.lastChild.attribute.height : columnGroup.colHeight ? y = columnGroup.colHeight : rowStart >= table.columnHeaderLevelCount && rowStart < table.rowCount - table.bottomFrozenRowCount && (y = table.getRowsHeight(table.columnHeaderLevelCount, rowStart - 1));
46337
46337
  for (let j = rowStart; j <= rowEnd; j++) {
46338
46338
  const row = j;
46339
46339
  let range,
@@ -52471,25 +52471,40 @@
52471
52471
  col: col,
52472
52472
  row: row
52473
52473
  } = eventArgsSet.eventArgs;
52474
- if (table.hasListeners(TABLE_EVENT_TYPE.CONTEXTMENU_CELL)) {
52475
- const cellInfo = table.getCellInfo(col, row);
52476
- let icon, position;
52477
- if (null === (_a = eventArgsSet.eventArgs) || void 0 === _a ? void 0 : _a.target) {
52478
- const iconInfo = getIconAndPositionFromTarget(null === (_b = eventArgsSet.eventArgs) || void 0 === _b ? void 0 : _b.target);
52479
- iconInfo && (icon = iconInfo.icon, position = iconInfo.position);
52480
- }
52481
- const cellsEvent = Object.assign(Object.assign({}, cellInfo), {
52482
- event: e.nativeEvent,
52483
- cells: [],
52484
- targetIcon: icon ? {
52485
- name: icon.name,
52486
- position: position,
52487
- funcType: icon.attribute.funcType
52488
- } : void 0,
52489
- target: null === (_c = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _c ? void 0 : _c.target,
52490
- mergeCellInfo: null === (_d = eventArgsSet.eventArgs) || void 0 === _d ? void 0 : _d.mergeInfo
52491
- });
52492
- (null === (_f = null === (_e = table.options.eventOptions) || void 0 === _e ? void 0 : _e.contextmenuReturnAllSelectedCells) || void 0 === _f || _f) && (cellInRanges(table.stateManager.select.ranges, col, row) ? cellsEvent.cells = table.getSelectedCellInfos() : cellsEvent.cells = [[cellInfo]]), table.fireListeners(TABLE_EVENT_TYPE.CONTEXTMENU_CELL, cellsEvent);
52474
+ if (col >= 0 && row >= 0) {
52475
+ const ranges = table.getSelectedCellRanges();
52476
+ let cellInRange = !1;
52477
+ if (ranges.length > 0) for (let i = 0; i < ranges.length; i++) {
52478
+ const range = ranges[i],
52479
+ startCol = range.start.col,
52480
+ endCol = range.end.col,
52481
+ startRow = range.start.row,
52482
+ endRow = range.end.row;
52483
+ if (col >= startCol && col <= endCol && row >= startRow && row <= endRow || col >= endCol && col <= startCol && row >= endRow && row <= startRow || col >= startCol && col <= endCol && row >= endRow && row <= startRow || col >= endCol && col <= startCol && row >= startRow && row <= endRow) {
52484
+ cellInRange = !0;
52485
+ break;
52486
+ }
52487
+ }
52488
+ if (cellInRange || table.selectCell(col, row), table.hasListeners(TABLE_EVENT_TYPE.CONTEXTMENU_CELL)) {
52489
+ const cellInfo = table.getCellInfo(col, row);
52490
+ let icon, position;
52491
+ if (null === (_a = eventArgsSet.eventArgs) || void 0 === _a ? void 0 : _a.target) {
52492
+ const iconInfo = getIconAndPositionFromTarget(null === (_b = eventArgsSet.eventArgs) || void 0 === _b ? void 0 : _b.target);
52493
+ iconInfo && (icon = iconInfo.icon, position = iconInfo.position);
52494
+ }
52495
+ const cellsEvent = Object.assign(Object.assign({}, cellInfo), {
52496
+ event: e.nativeEvent,
52497
+ cells: [],
52498
+ targetIcon: icon ? {
52499
+ name: icon.name,
52500
+ position: position,
52501
+ funcType: icon.attribute.funcType
52502
+ } : void 0,
52503
+ target: null === (_c = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _c ? void 0 : _c.target,
52504
+ mergeCellInfo: null === (_d = eventArgsSet.eventArgs) || void 0 === _d ? void 0 : _d.mergeInfo
52505
+ });
52506
+ (null === (_f = null === (_e = table.options.eventOptions) || void 0 === _e ? void 0 : _e.contextmenuReturnAllSelectedCells) || void 0 === _f || _f) && (cellInRanges(table.stateManager.select.ranges, col, row) ? cellsEvent.cells = table.getSelectedCellInfos() : cellsEvent.cells = [[cellInfo]]), table.fireListeners(TABLE_EVENT_TYPE.CONTEXTMENU_CELL, cellsEvent);
52507
+ }
52493
52508
  }
52494
52509
  }
52495
52510
  }), table.scenegraph.tableGroup.addEventListener("pointertap", e => {
@@ -53563,29 +53578,6 @@
53563
53578
  });
53564
53579
  }
53565
53580
 
53566
- function rightButtonClickEvent(table) {
53567
- table.on(TABLE_EVENT_TYPE.CONTEXTMENU_CELL, e => {
53568
- const {
53569
- col: col,
53570
- row: row
53571
- } = e,
53572
- ranges = table.getSelectedCellRanges();
53573
- let cellInRange = !1;
53574
- if (ranges.length > 0) for (let i = 0; i < ranges.length; i++) {
53575
- const range = ranges[i],
53576
- startCol = range.start.col,
53577
- endCol = range.end.col,
53578
- startRow = range.start.row,
53579
- endRow = range.end.row;
53580
- if (col >= startCol && col <= endCol && row >= startRow && row <= endRow || col >= endCol && col <= startCol && row >= endRow && row <= startRow || col >= startCol && col <= endCol && row >= endRow && row <= startRow || col >= endCol && col <= startCol && row >= startRow && row <= endRow) {
53581
- cellInRange = !0;
53582
- break;
53583
- }
53584
- }
53585
- cellInRange || table.selectCell(col, row);
53586
- });
53587
- }
53588
-
53589
53581
  let EventManager$1 = class EventManager {
53590
53582
  constructor(table) {
53591
53583
  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(() => {
@@ -53610,7 +53602,7 @@
53610
53602
  }, 0);
53611
53603
  }
53612
53604
  bindSelfEvent() {
53613
- this.table.isReleased || (bindIconClickEvent(this.table), bindDropdownMenuEvent(this.table), this.updateEventBinder(), bindMediaClick(this.table), bindDBClickAutoColumnWidthEvent(this.table), this.table.isPivotTable() && checkHaveDrill(this.table) && bindDrillEvent(this.table), bindSparklineHoverEvent(this.table), bindAxisClickEvent(this.table), bindAxisHoverEvent(this.table), bindGroupTitleCheckboxChange(this.table), bindGroupCheckboxTreeChange(this.table), bindHeaderCheckboxChange(this.table), bindButtonClickEvent(this.table), rightButtonClickEvent(this.table));
53605
+ this.table.isReleased || (bindIconClickEvent(this.table), bindDropdownMenuEvent(this.table), this.updateEventBinder(), bindMediaClick(this.table), bindDBClickAutoColumnWidthEvent(this.table), this.table.isPivotTable() && checkHaveDrill(this.table) && bindDrillEvent(this.table), bindSparklineHoverEvent(this.table), bindAxisClickEvent(this.table), bindAxisHoverEvent(this.table), bindGroupTitleCheckboxChange(this.table), bindGroupCheckboxTreeChange(this.table), bindHeaderCheckboxChange(this.table), bindButtonClickEvent(this.table));
53614
53606
  }
53615
53607
  dealTableHover(eventArgsSet) {
53616
53608
  if (!eventArgsSet) return void this.table.stateManager.updateHoverPos(-1, -1);
@@ -56434,7 +56426,7 @@
56434
56426
  }
56435
56427
  constructor(container, options = {}) {
56436
56428
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
56437
- if (super(), this.showFrozenIcon = !0, this.version = "1.19.7", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
56429
+ if (super(), this.showFrozenIcon = !0, this.version = "1.19.8", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
56438
56430
  this.pluginManager = new PluginManager$1(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
56439
56431
  options: options,
56440
56432
  container: container
@@ -72949,7 +72941,7 @@
72949
72941
  PluginManager: PluginManager
72950
72942
  });
72951
72943
 
72952
- const version = "1.19.7";
72944
+ const version = "1.19.8";
72953
72945
 
72954
72946
  exports.Gantt = Gantt;
72955
72947
  exports.TYPES = index$4;