@visactor/vtable-gantt 1.19.6 → 1.19.7

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/README.md CHANGED
@@ -53,11 +53,12 @@ This repository includes the following packages:
53
53
  1. packages/vtable: The core code repository of VTable
54
54
  2. packages/vtable-gantt: Gantt chart component code
55
55
  3. packages/vtable-editors: Table editor component code
56
- 4. packages/vtable-export: Table export tool code
57
- 5. packages/vtable-search: Table search tool code
58
- 6. packages/react-vtable: React version of the table component
59
- 7. packages/vue-vtable: Vue version of the table component
60
- 8. docs: Include VTable site tutorials, demos,apis and options, and also contains all Chinese and English documents.
56
+ 4. packages/vtable-plugins: Table plugin code
57
+ 5. packages/vtable-export: Table export tool code
58
+ 6. packages/vtable-search: Table search tool code
59
+ 7. packages/react-vtable: React version of the table component
60
+ 8. packages/vue-vtable: Vue version of the table component
61
+ 9. docs: Include VTable site tutorials, demos,apis and options, and also contains all Chinese and English documents.
61
62
 
62
63
  # Usage
63
64
 
package/README.zh-CN.md CHANGED
@@ -53,11 +53,12 @@ VTable-Gantt 是 VisActor 可视化体系中的甘特图组件库,基于表格
53
53
  1. packages/vtable:表格组件代码
54
54
  2. packages/vtable-gantt: 甘特图组件代码
55
55
  3. packages/vtable-editors: 表格编辑器组件代码
56
- 4. packages/vtable-export: 表格导出工具代码
57
- 5. packages/vtable-search: 表格搜索工具代码
58
- 6. packages/react-vtable: React 版本的表格组件
59
- 7. packages/vue-vtable: Vue 版本的表格组件
60
- 8. docs: 教程文档
56
+ 4. packages/vtable-plugins: 表格插件代码
57
+ 5. packages/vtable-export: 表格导出工具代码
58
+ 6. packages/vtable-search: 表格搜索工具代码
59
+ 7. packages/react-vtable: React 版本的表格组件
60
+ 8. packages/vue-vtable: Vue 版本的表格组件
61
+ 9. docs: 教程文档
61
62
 
62
63
  # 用法
63
64
 
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.6";
9
+ export declare const version = "1.19.7";
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.6";
59
+ exports.plugins = plugins, exports.version = "1.19.7";
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.6\";\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.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"]}
@@ -27,6 +27,13 @@ class MarkLine {
27
27
  }), this.group.appendChild(this.markLIneContainer), this.initMarkLines();
28
28
  }
29
29
  initMarkLines() {
30
+ const height = Math.min(this._scene._gantt.tableNoFrameHeight, this._scene._gantt.drawHeight) - this._scene._gantt.getAllHeaderRowsHeight();
31
+ this.group.setAttributes({
32
+ y: this._scene._gantt.getAllHeaderRowsHeight(),
33
+ width: this._scene._gantt.tableNoFrameWidth,
34
+ height: height
35
+ }), this.markLIneContainer.setAttribute("width", this._scene._gantt.getAllDateColsWidth()),
36
+ this.markLIneContainer.setAttribute("height", height);
30
37
  const markLine = this._scene._gantt.parsedOptions.markLine, minDate = this._scene._gantt.parsedOptions.minDate;
31
38
  minDate && markLine.forEach((line => {
32
39
  const style = line.style, contentStyle = line.contentStyle || {}, date = this._scene._gantt.parsedOptions.timeScaleIncludeHour ? (0,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/scenegraph/mark-line.ts"],"names":[],"mappings":";;;AAAA,wCAA8E;AAI9E,yDAAsE;AAEtE,MAAa,QAAQ;IAMnB,YAAY,KAAiB;QAF7B,2BAAsB,GAAW,EAAE,CAAC;QAGlC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,MAAM;YACT,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,kBAAkB,EAAE,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,sBAAsB,EAAE,CAAC;QAC7G,IAAI,CAAC,KAAK,GAAG,IAAI,eAAK,CAAC;YACrB,CAAC,EAAE,CAAC;YACJ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,sBAAsB,EAAE;YACxC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,iBAAiB;YACrC,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,QAAQ,EAAE,KAAK;YACf,IAAI,EAAE,IAAI;SACX,CAAC,CAAC;QACH,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,qBAAqB,CAAC;QACxC,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAEtC,IAAI,CAAC,iBAAiB,GAAG,IAAI,eAAK,CAAC;YACjC,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SAAS;wBAC3C,QAAQ,EAAE,YAAY,CAAC,QAAQ,IAAI,EAAE;wBACrC,MAAM,EAAE;4BACN,QAAQ,EAAE,KAAK;4BACf,EAAE,EAAE,gBAAgB,GAAG,CAAC;4BACxB,EAAE,EAAE,CAAC,mBAAmB,GAAG,CAAC;yBAC7B;qBACF,CAAC,CAAC;oBACH,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;iBAC7B;YACH,CAAC,CAAC,CAAC;IACP,CAAC;IAGD,OAAO;QACL,IAAI,CAAC,MAAM;YACT,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,kBAAkB,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC;gBAC9E,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,sBAAsB,EAAE,CAAC;QAC9C,IAAI,CAAC,iBAAiB,CAAC,cAAc,EAAE,CAAC;QACxC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAC/C,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAC3D,IAAI,CAAC,aAAa,EAAE,CAAC;IACvB,CAAC;IACD,IAAI,CAAC,CAAS;QACZ,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IAC9C,CAAC;CACF;AA/HD,4BA+HC","file":"mark-line.js","sourcesContent":["import { computeCountToTimeScale, createDateAtMidnight } from '../tools/util';\nimport { DayTimes } from '../gantt-helper';\n//import type { IMarkLine } from '../ts-types';\nimport type { Scenegraph } from './scenegraph';\nimport { Group, createLine, Text } from '@visactor/vtable/es/vrender';\n\nexport class MarkLine {\n _scene: Scenegraph;\n group: Group;\n markLIneContainer: Group;\n markLineContainerWidth: number = 20;\n height: number;\n constructor(scene: Scenegraph) {\n this._scene = scene;\n this.height =\n Math.min(scene._gantt.tableNoFrameHeight, scene._gantt.drawHeight) - scene._gantt.getAllHeaderRowsHeight();\n this.group = new Group({\n x: 0,\n y: scene._gantt.getAllHeaderRowsHeight(),\n width: scene._gantt.tableNoFrameWidth,\n height: this.height,\n pickable: false,\n clip: true\n });\n this.group.name = 'mark-line-container';\n scene.ganttGroup.addChild(this.group);\n\n this.markLIneContainer = new Group({\n x: 0,\n y: 0,\n width: this._scene._gantt.getAllDateColsWidth(),\n height: this.height,\n pickable: false,\n clip: true\n });\n this.group.appendChild(this.markLIneContainer);\n this.initMarkLines();\n }\n initMarkLines() {\n const markLine = this._scene._gantt.parsedOptions.markLine;\n const minDate = this._scene._gantt.parsedOptions.minDate;\n minDate &&\n markLine.forEach(line => {\n const style = line.style;\n const contentStyle = line.contentStyle || {};\n const date = this._scene._gantt.parsedOptions.timeScaleIncludeHour\n ? createDateAtMidnight(line.date)\n : createDateAtMidnight(line.date, true);\n const { unit, step } = this._scene._gantt.parsedOptions.reverseSortedTimelineScales[0];\n const unitCount = computeCountToTimeScale(date, minDate, unit, step);\n let positionOffset = 0;\n if (line.position === 'right') {\n positionOffset = 1;\n } else if (line.position === 'middle') {\n positionOffset = 0.5;\n } else if (line.position === 'date') {\n const date = createDateAtMidnight(line.date);\n const unitCount = computeCountToTimeScale(date, minDate, unit, step);\n const cellIndex = Math.floor(unitCount);\n positionOffset = unitCount - cellIndex;\n }\n const dateX = this._scene._gantt.parsedOptions.timelineColWidth * (Math.floor(unitCount) + positionOffset);\n const markLineGroup = new Group({\n pickable: false,\n x: dateX - this.markLineContainerWidth / 2,\n y: 0,\n width: this.markLineContainerWidth,\n height: this.height\n });\n markLineGroup.name = 'mark-line';\n this.markLIneContainer.appendChild(markLineGroup);\n // 创建整个任务条rect\n const lineObj = createLine({\n pickable: false,\n stroke: style.lineColor,\n lineWidth: style.lineWidth,\n lineDash: style.lineDash,\n points: [\n { x: this.markLineContainerWidth / 2, y: 0 },\n { x: this.markLineContainerWidth / 2, y: this.height }\n ]\n });\n markLineGroup.appendChild(lineObj);\n if (line.content) {\n const textMaxLineWidth = this._scene._gantt.parsedOptions.timelineColWidth;\n const textContainerHeight = contentStyle.lineHeight || 18;\n // 创建内容区\n const textGroup = new Group({\n x: this.markLineContainerWidth / 2,\n y: 0,\n cursor: 'pointer',\n height: textContainerHeight,\n clip: false,\n fill: contentStyle.backgroundColor || style.lineColor,\n display: 'flex',\n cornerRadius: contentStyle.cornerRadius || [0, 2, 2, 0]\n });\n textGroup.name = 'mark-line-content';\n textGroup.data = line;\n markLineGroup.appendChild(textGroup);\n // 创建内容\n const text = new Text({\n maxLineWidth: textMaxLineWidth,\n text: line.content,\n cursor: 'pointer',\n lineHeight: textContainerHeight,\n fontWeight: contentStyle.fontWeight || 'normal',\n fill: contentStyle.color || style.lineColor,\n fontSize: contentStyle.fontSize || 12,\n poptip: {\n position: 'top',\n dx: textMaxLineWidth / 4,\n dy: -textContainerHeight / 4\n }\n });\n textGroup.appendChild(text);\n }\n });\n }\n\n /** 重新场景场景树节点 */\n refresh() {\n this.height =\n Math.min(this._scene._gantt.tableNoFrameHeight, this._scene._gantt.drawHeight) -\n this._scene._gantt.getAllHeaderRowsHeight();\n this.markLIneContainer.removeAllChild();\n this.group.setAttribute('height', this.height);\n this.markLIneContainer.setAttribute('height', this.height);\n this.initMarkLines();\n }\n setX(x: number) {\n this.markLIneContainer.setAttribute('x', x);\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/scenegraph/mark-line.ts"],"names":[],"mappings":";;;AAAA,wCAA8E;AAI9E,yDAAsE;AAEtE,MAAa,QAAQ;IAMnB,YAAY,KAAiB;QAF7B,2BAAsB,GAAW,EAAE,CAAC;QAGlC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,MAAM;YACT,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,kBAAkB,EAAE,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,KAAK,C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4BACf,EAAE,EAAE,gBAAgB,GAAG,CAAC;4BACxB,EAAE,EAAE,CAAC,mBAAmB,GAAG,CAAC;yBAC7B;qBACF,CAAC,CAAC;oBACH,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;iBAC7B;YACH,CAAC,CAAC,CAAC;IACP,CAAC;IAGD,OAAO;QACL,IAAI,CAAC,MAAM;YACT,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,kBAAkB,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC;gBAC9E,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,sBAAsB,EAAE,CAAC;QAC9C,IAAI,CAAC,iBAAiB,CAAC,cAAc,EAAE,CAAC;QACxC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAC/C,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAC3D,IAAI,CAAC,aAAa,EAAE,CAAC;IACvB,CAAC;IACD,IAAI,CAAC,CAAS;QACZ,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IAC9C,CAAC;CACF;AA3ID,4BA2IC","file":"mark-line.js","sourcesContent":["import { computeCountToTimeScale, createDateAtMidnight } from '../tools/util';\nimport { DayTimes } from '../gantt-helper';\n//import type { IMarkLine } from '../ts-types';\nimport type { Scenegraph } from './scenegraph';\nimport { Group, createLine, Text } from '@visactor/vtable/es/vrender';\n\nexport class MarkLine {\n _scene: Scenegraph;\n group: Group;\n markLIneContainer: Group;\n markLineContainerWidth: number = 20;\n height: number;\n constructor(scene: Scenegraph) {\n this._scene = scene;\n this.height =\n Math.min(scene._gantt.tableNoFrameHeight, scene._gantt.drawHeight) - scene._gantt.getAllHeaderRowsHeight();\n this.group = new Group({\n x: 0,\n y: scene._gantt.getAllHeaderRowsHeight(),\n width: scene._gantt.tableNoFrameWidth,\n height: this.height,\n pickable: false,\n clip: true\n });\n this.group.name = 'mark-line-container';\n scene.ganttGroup.addChild(this.group);\n\n this.markLIneContainer = new Group({\n x: 0,\n y: 0,\n width: this._scene._gantt.getAllDateColsWidth(),\n height: this.height,\n pickable: false,\n clip: true\n });\n this.group.appendChild(this.markLIneContainer);\n this.initMarkLines();\n }\n initMarkLines() {\n //#region 重置markLine容器大小\n const height =\n Math.min(this._scene._gantt.tableNoFrameHeight, this._scene._gantt.drawHeight) -\n this._scene._gantt.getAllHeaderRowsHeight();\n this.group.setAttributes({\n y: this._scene._gantt.getAllHeaderRowsHeight(),\n width: this._scene._gantt.tableNoFrameWidth,\n height: height\n });\n this.markLIneContainer.setAttribute('width', this._scene._gantt.getAllDateColsWidth());\n this.markLIneContainer.setAttribute('height', height);\n //#endregion\n const markLine = this._scene._gantt.parsedOptions.markLine;\n const minDate = this._scene._gantt.parsedOptions.minDate;\n minDate &&\n markLine.forEach(line => {\n const style = line.style;\n const contentStyle = line.contentStyle || {};\n const date = this._scene._gantt.parsedOptions.timeScaleIncludeHour\n ? createDateAtMidnight(line.date)\n : createDateAtMidnight(line.date, true);\n const { unit, step } = this._scene._gantt.parsedOptions.reverseSortedTimelineScales[0];\n const unitCount = computeCountToTimeScale(date, minDate, unit, step);\n let positionOffset = 0;\n if (line.position === 'right') {\n positionOffset = 1;\n } else if (line.position === 'middle') {\n positionOffset = 0.5;\n } else if (line.position === 'date') {\n const date = createDateAtMidnight(line.date);\n const unitCount = computeCountToTimeScale(date, minDate, unit, step);\n const cellIndex = Math.floor(unitCount);\n positionOffset = unitCount - cellIndex;\n }\n const dateX = this._scene._gantt.parsedOptions.timelineColWidth * (Math.floor(unitCount) + positionOffset);\n const markLineGroup = new Group({\n pickable: false,\n x: dateX - this.markLineContainerWidth / 2,\n y: 0,\n width: this.markLineContainerWidth,\n height: this.height\n });\n markLineGroup.name = 'mark-line';\n this.markLIneContainer.appendChild(markLineGroup);\n // 创建整个任务条rect\n const lineObj = createLine({\n pickable: false,\n stroke: style.lineColor,\n lineWidth: style.lineWidth,\n lineDash: style.lineDash,\n points: [\n { x: this.markLineContainerWidth / 2, y: 0 },\n { x: this.markLineContainerWidth / 2, y: this.height }\n ]\n });\n markLineGroup.appendChild(lineObj);\n if (line.content) {\n const textMaxLineWidth = this._scene._gantt.parsedOptions.timelineColWidth;\n const textContainerHeight = contentStyle.lineHeight || 18;\n // 创建内容区\n const textGroup = new Group({\n x: this.markLineContainerWidth / 2,\n y: 0,\n cursor: 'pointer',\n height: textContainerHeight,\n clip: false,\n fill: contentStyle.backgroundColor || style.lineColor,\n display: 'flex',\n cornerRadius: contentStyle.cornerRadius || [0, 2, 2, 0]\n });\n textGroup.name = 'mark-line-content';\n textGroup.data = line;\n markLineGroup.appendChild(textGroup);\n // 创建内容\n const text = new Text({\n maxLineWidth: textMaxLineWidth,\n text: line.content,\n cursor: 'pointer',\n lineHeight: textContainerHeight,\n fontWeight: contentStyle.fontWeight || 'normal',\n fill: contentStyle.color || style.lineColor,\n fontSize: contentStyle.fontSize || 12,\n poptip: {\n position: 'top',\n dx: textMaxLineWidth / 4,\n dy: -textContainerHeight / 4\n }\n });\n textGroup.appendChild(text);\n }\n });\n }\n\n /** 重新场景场景树节点 */\n refresh() {\n this.height =\n Math.min(this._scene._gantt.tableNoFrameHeight, this._scene._gantt.drawHeight) -\n this._scene._gantt.getAllHeaderRowsHeight();\n this.markLIneContainer.removeAllChild();\n this.group.setAttribute('height', this.height);\n this.markLIneContainer.setAttribute('height', this.height);\n this.initMarkLines();\n }\n setX(x: number) {\n this.markLIneContainer.setAttribute('x', x);\n }\n}\n"]}
@@ -185,4 +185,5 @@ class TimelineHeader {
185
185
  }
186
186
  }
187
187
 
188
- exports.TimelineHeader = TimelineHeader;
188
+ exports.TimelineHeader = TimelineHeader;
189
+ //# sourceMappingURL=timeline-header.js.map
@@ -89,7 +89,6 @@ function _syncTableSize(gantt) {
89
89
  gantt._updateSize(), (0, gantt_helper_1.updateSplitLineAndResizeLine)(gantt));
90
90
  }
91
91
 
92
- //# sourceMappingURL=gantt-table-sync.js.map
93
92
  exports.syncScrollStateToTable = syncScrollStateToTable, exports.syncScrollStateFromTable = syncScrollStateFromTable,
94
93
  exports.syncEditCellFromTable = syncEditCellFromTable, exports.syncTreeChangeFromTable = syncTreeChangeFromTable,
95
94
  exports.syncSortFromTable = syncSortFromTable, exports.syncDragOrderFromTable = syncDragOrderFromTable,
package/cjs/vtable.d.ts CHANGED
@@ -1 +1 @@
1
- export { register, themes, CustomLayout, TYPES } from '@visactor/vtable';
1
+ export { register, themes, CustomLayout, TYPES, TABLE_EVENT_TYPE } from '@visactor/vtable';
package/cjs/vtable.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
- }), exports.TYPES = exports.CustomLayout = exports.themes = exports.register = void 0;
5
+ }), exports.TABLE_EVENT_TYPE = exports.TYPES = exports.CustomLayout = exports.themes = exports.register = void 0;
6
6
 
7
7
  var vtable_1 = require("@visactor/vtable");
8
8
 
@@ -26,5 +26,10 @@ Object.defineProperty(exports, "register", {
26
26
  get: function() {
27
27
  return vtable_1.TYPES;
28
28
  }
29
+ }), Object.defineProperty(exports, "TABLE_EVENT_TYPE", {
30
+ enumerable: !0,
31
+ get: function() {
32
+ return vtable_1.TABLE_EVENT_TYPE;
33
+ }
29
34
  });
30
35
  //# sourceMappingURL=vtable.js.map
package/cjs/vtable.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/vtable.ts"],"names":[],"mappings":";;;AAAA,2CAAyE;AAAhE,kGAAA,QAAQ,OAAA;AAAE,gGAAA,MAAM,OAAA;AAAE,sGAAA,YAAY,OAAA;AAAE,+FAAA,KAAK,OAAA","file":"vtable.js","sourcesContent":["export { register, themes, CustomLayout, TYPES } from '@visactor/vtable';\n"]}
1
+ {"version":3,"sources":["../src/vtable.ts"],"names":[],"mappings":";;;AAAA,2CAA2F;AAAlF,kGAAA,QAAQ,OAAA;AAAE,gGAAA,MAAM,OAAA;AAAE,sGAAA,YAAY,OAAA;AAAE,+FAAA,KAAK,OAAA;AAAE,0GAAA,gBAAgB,OAAA","file":"vtable.js","sourcesContent":["export { register, themes, CustomLayout, TYPES, TABLE_EVENT_TYPE } from '@visactor/vtable';\n"]}
@@ -36010,6 +36010,7 @@
36010
36010
  MOUSEENTER_CELL: "mouseenter_cell",
36011
36011
  MOUSELEAVE_CELL: "mouseleave_cell",
36012
36012
  CONTEXTMENU_CELL: "contextmenu_cell",
36013
+ CONTEXTMENU_CANVAS: "contextmenu_canvas",
36013
36014
  RESIZE_COLUMN: "resize_column",
36014
36015
  RESIZE_COLUMN_END: "resize_column_end",
36015
36016
  RESIZE_ROW: "resize_row",
@@ -37322,6 +37323,10 @@
37322
37323
  get verticalPadding() {
37323
37324
  var _a;
37324
37325
  return null !== (_a = scroll.verticalPadding) && void 0 !== _a ? _a : 0;
37326
+ },
37327
+ get ignoreFrozenCols() {
37328
+ var _a;
37329
+ return null !== (_a = scroll.ignoreFrozenCols) && void 0 !== _a && _a;
37325
37330
  }
37326
37331
  };
37327
37332
  }
@@ -40028,7 +40033,7 @@
40028
40033
  for (let i = 0; i < oldSource.length; i++) {
40029
40034
  const oldRecord = oldSource[i],
40030
40035
  newRecord = newSource[newGroupMap.get(oldRecord.vtableMergeName)];
40031
- isValid$3(newRecord) && (newRecord.hierarchyState = oldSource[i].hierarchyState), isArray$7(oldRecord.children) && isArray$7(newRecord.children) && 0 !== oldRecord.map.size && 0 !== newRecord.map.size && syncGroupCollapseState(oldRecord.children, newRecord.children, oldRecord.map, newRecord.map);
40036
+ isValid$3(newRecord) && (newRecord.hierarchyState = oldSource[i].hierarchyState), isArray$7(null == oldRecord ? void 0 : oldRecord.children) && isArray$7(null == newRecord ? void 0 : newRecord.children) && 0 !== oldRecord.map.size && 0 !== newRecord.map.size && syncGroupCollapseState(oldRecord.children, newRecord.children, oldRecord.map, newRecord.map);
40032
40037
  }
40033
40038
  }
40034
40039
 
@@ -44284,7 +44289,7 @@
44284
44289
  }), this.vScrollBar.render(), this.vScrollBar.hideAll();
44285
44290
  }
44286
44291
  updateScrollBar() {
44287
- var _a, _b, _c, _d, _e, _f, _g;
44292
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
44288
44293
  const oldHorizontalBarPos = this.table.stateManager.scroll.horizontalBarPos,
44289
44294
  oldVerticalBarPos = this.table.stateManager.scroll.verticalBarPos,
44290
44295
  theme = this.table.theme,
@@ -44292,24 +44297,27 @@
44292
44297
  visible1 = null === (_b = theme.scrollStyle) || void 0 === _b ? void 0 : _b.visible,
44293
44298
  horizontalVisible = null !== (_d = null === (_c = theme.scrollStyle) || void 0 === _c ? void 0 : _c.horizontalVisible) && void 0 !== _d ? _d : visible1,
44294
44299
  verticalVisible = null !== (_f = null === (_e = theme.scrollStyle) || void 0 === _e ? void 0 : _e.verticalVisible) && void 0 !== _f ? _f : visible1,
44295
- tableWidth = Math.ceil(this.table.scenegraph.tableGroup.attribute.width),
44296
- tableHeight = Math.ceil(this.table.scenegraph.tableGroup.attribute.height),
44300
+ tableWidth = Math.ceil(this.table.tableNoFrameWidth),
44301
+ tableHeight = Math.ceil(this.table.tableNoFrameHeight),
44297
44302
  totalHeight = this.table.getAllRowsHeight(),
44298
44303
  totalWidth = this.table.getAllColsWidth(),
44299
44304
  frozenRowsHeight = this.table.getFrozenRowsHeight(),
44300
44305
  frozenColsWidth = this.table.getFrozenColsWidth(),
44301
44306
  bottomFrozenRowsHeight = this.table.getBottomFrozenRowsHeight(),
44302
44307
  rightFrozenColsWidth = this.table.getRightFrozenColsWidth(),
44308
+ hoverOn = this.table.theme.scrollStyle.hoverOn,
44303
44309
  sizeTolerance = (null === (_g = this.table.options.customConfig) || void 0 === _g ? void 0 : _g._disableColumnAndRowSizeRound) ? 1 : 0;
44304
44310
  if (totalWidth > tableWidth + sizeTolerance) {
44305
44311
  const y = Math.min(tableHeight, totalHeight),
44306
- rangeEnd = Math.max(.05, (tableWidth - frozenColsWidth) / (totalWidth - frozenColsWidth)),
44307
- hoverOn = this.table.theme.scrollStyle.hoverOn;
44312
+ rangeEnd = Math.max(.05, (tableWidth - frozenColsWidth) / (totalWidth - frozenColsWidth));
44308
44313
  let attrY = 0;
44309
- attrY = this.table.theme.scrollStyle.barToSide ? this.table.tableNoFrameHeight - (hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.y) + this.table.tableY : y - (hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.y), this.hScrollBar.setAttributes({
44310
- x: frozenColsWidth + (hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x),
44314
+ attrY = this.table.theme.scrollStyle.barToSide ? this.table.tableNoFrameHeight - (hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.y) + this.table.tableY : y - (hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.y);
44315
+ let hScrollBarx = frozenColsWidth + (hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x),
44316
+ hScrollBarWidth = tableWidth - frozenColsWidth - rightFrozenColsWidth;
44317
+ null !== (_j = null === (_h = this.table.theme.scrollStyle) || void 0 === _h ? void 0 : _h.ignoreFrozenCols) && void 0 !== _j && _j ? (hScrollBarx = hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x, hScrollBarWidth = tableWidth) : (hScrollBarx = frozenColsWidth + (hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x), hScrollBarWidth = tableWidth - frozenColsWidth - rightFrozenColsWidth), this.hScrollBar.setAttributes({
44318
+ x: hScrollBarx,
44311
44319
  y: attrY,
44312
- width: tableWidth - frozenColsWidth - rightFrozenColsWidth,
44320
+ width: hScrollBarWidth,
44313
44321
  range: [0, rangeEnd],
44314
44322
  visible: "always" === horizontalVisible
44315
44323
  });
@@ -44328,7 +44336,6 @@
44328
44336
  const x = Math.min(tableWidth, totalWidth),
44329
44337
  rangeEnd = Math.max(.05, (tableHeight - frozenRowsHeight) / (totalHeight - frozenRowsHeight));
44330
44338
  let attrX = 0;
44331
- const hoverOn = this.table.theme.scrollStyle.hoverOn;
44332
44339
  attrX = this.table.theme.scrollStyle.barToSide ? this.table.tableNoFrameWidth - (hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.x) + this.table.tableX : x - (hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.x), this.vScrollBar.setAttributes({
44333
44340
  x: attrX,
44334
44341
  y: frozenRowsHeight + (hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.y),
@@ -49235,6 +49242,19 @@
49235
49242
  initSceneGraph() {
49236
49243
  this.isPivot = this.table.isPivotTable(), initSceneGraph(this);
49237
49244
  }
49245
+ canvasShowMenu() {
49246
+ this.stage.addEventListener("rightdown", e => {
49247
+ const eventArgsSet = getCellEventArgsSet(e);
49248
+ eventArgsSet.eventArgs || (this.table.stateManager.triggerContextMenu(-1, -1, eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y), this.table.fireListeners(TABLE_EVENT_TYPE.CONTEXTMENU_CANVAS, {
49249
+ event: e,
49250
+ x: eventArgsSet.abstractPos.x,
49251
+ y: eventArgsSet.abstractPos.y,
49252
+ col: -1,
49253
+ row: -1,
49254
+ target: void 0
49255
+ }));
49256
+ });
49257
+ }
49238
49258
  clearCells() {
49239
49259
  var _a, _b;
49240
49260
  this.table.animationManager.clear(), (this.table.isPivotChart() || this.table._hasCustomRenderOrLayout()) && this.stage.pluginService.findPluginsByName("poptipForText").forEach(plugin => {
@@ -49628,7 +49648,8 @@
49628
49648
  0 === x && firstBodyCol && firstBodyCol.col === this.table.frozenColCount && firstBodyCol.attribute.x + x < 0 ? x = -firstBodyCol.attribute.x : lastBodyCol && this.table.tableNoFrameWidth < this.table.getAllColsWidth() && lastBodyCol.col === this.table.colCount - this.table.rightFrozenColCount - 1 && lastBodyCol.attribute.x + lastBodyCol.attribute.width + x < this.table.tableNoFrameWidth - this.table.getFrozenColsWidth() - this.table.getRightFrozenColsWidth() && (x = this.table.tableNoFrameWidth - this.table.getFrozenColsWidth() - this.table.getRightFrozenColsWidth() - lastBodyCol.attribute.x - lastBodyCol.attribute.width), this.table.getFrozenColsWidth() + x !== this.bodyGroup.attribute.x && (this.bodyGroup.setAttribute("x", this.table.getFrozenColsWidth() + x), this.colHeaderGroup.setAttribute("x", this.table.getFrozenColsWidth() + x), this.table.bottomFrozenRowCount > 0 && this.bottomFrozenGroup.setAttribute("x", this.table.getFrozenColsWidth() + x), this.updateNextFrame());
49629
49649
  }
49630
49650
  afterScenegraphCreated() {
49631
- this.isPivot || this.table.transpose ? this.table.options.frozenColCount ? this.component.setFrozenColumnShadow(this.table.frozenColCount - 1) : this.table.options.rightFrozenColCount ? this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount) : this.component.setFrozenColumnShadow(-1) : (this.component.setFrozenColumnShadow(this.table.frozenColCount - 1), this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount)), this.table.stateManager.checkFrozen(), this.updateContainer(), this.createFrameBorder(), this.updateBorderSizeAndPosition(), this.component.updateScrollBar(), handleTextStick(this.table), this.table.options.animationAppear && dealWithAnimationAppear(this.table), this.updateNextFrame();
49651
+ var _a;
49652
+ this.isPivot || this.table.transpose ? this.table.options.frozenColCount ? this.component.setFrozenColumnShadow(this.table.frozenColCount - 1) : this.table.options.rightFrozenColCount ? this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount) : this.component.setFrozenColumnShadow(-1) : (this.component.setFrozenColumnShadow(this.table.frozenColCount - 1), this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount)), this.table.stateManager.checkFrozen(), this.updateContainer(), this.createFrameBorder(), this.updateBorderSizeAndPosition(), this.component.updateScrollBar(), handleTextStick(this.table), this.table.options.animationAppear && dealWithAnimationAppear(this.table), !1 === (null === (_a = this.table.options.menu) || void 0 === _a ? void 0 : _a.contextMenuWorkOnlyCell) && this.canvasShowMenu(), this.updateNextFrame();
49632
49653
  }
49633
49654
  dealWidthMode() {
49634
49655
  const table = this.table;
@@ -50766,7 +50787,7 @@
50766
50787
  }
50767
50788
  rightColWidth - detaX < state.table.internalProps.limitMinWidth && (detaX = rightColWidth - state.table.internalProps.limitMinWidth);
50768
50789
  }
50769
- detaX = Math.ceil(detaX), state.columnResize.col < state.table.rowHeaderLevelCount || state.columnResize.col >= state.table.colCount - state.table.rightFrozenColCount ? updateResizeColForColumn(detaX, state) : "indicator" === state.table.internalProps.columnResizeType ? updateResizeColForIndicator$1(detaX, state) : "indicatorGroup" === state.table.internalProps.columnResizeType ? updateResizeColForIndicatorGroup$1(detaX, state) : "all" === state.table.internalProps.columnResizeType ? updateResizeColForAll$1(detaX, state) : updateResizeColForColumn(detaX, state), state.columnResize.x = xInTable, state.table.scenegraph.component.updateResizeCol(state.columnResize.col, yInTable, state.columnResize.isRightFrozen), state.columnResize.col < state.table.frozenColCount && !state.table.isPivotTable() && !state.table.transpose ? state.table.scenegraph.component.setFrozenColumnShadow(state.table.frozenColCount - 1, state.columnResize.isRightFrozen) : state.table.options.frozenColCount && state.table.scenegraph.component.setFrozenColumnShadow(state.table.frozenColCount - 1), (state.columnResize.col >= state.table.colCount - state.table.rightFrozenColCount && !state.table.isPivotTable() && !state.table.transpose || state.table.options.rightFrozenColCount) && state.table.scenegraph.component.setRightFrozenColumnShadow(state.table.colCount - state.table.rightFrozenColCount), state.table.scenegraph.updateNextFrame();
50790
+ detaX = Math.ceil(detaX), state.columnResize.col < state.table.rowHeaderLevelCount || state.columnResize.col >= state.table.colCount - state.table.rightFrozenColCount ? updateResizeColForColumn(detaX, state) : "indicator" === state.table.internalProps.columnResizeType ? updateResizeColForIndicator$1(detaX, state) : "indicatorGroup" === state.table.internalProps.columnResizeType ? updateResizeColForIndicatorGroup$1(detaX, state) : "all" === state.table.internalProps.columnResizeType ? updateResizeColForAll$1(detaX, state) : updateResizeColForColumn(detaX, state), state.columnResize.x = xInTable, state.table.scenegraph.component.updateResizeCol(state.columnResize.col, yInTable, state.columnResize.isRightFrozen), state.table._updateSize(), state.columnResize.col < state.table.frozenColCount && !state.table.isPivotTable() && !state.table.transpose ? state.table.scenegraph.component.setFrozenColumnShadow(state.table.frozenColCount - 1, state.columnResize.isRightFrozen) : state.table.options.frozenColCount && state.table.scenegraph.component.setFrozenColumnShadow(state.table.frozenColCount - 1), (state.columnResize.col >= state.table.colCount - state.table.rightFrozenColCount && !state.table.isPivotTable() && !state.table.transpose || state.table.options.rightFrozenColCount) && state.table.scenegraph.component.setRightFrozenColumnShadow(state.table.colCount - state.table.rightFrozenColCount), state.table.scenegraph.updateNextFrame();
50770
50791
  }
50771
50792
  function updateResizeColForColumn(detaX, state) {
50772
50793
  "adaptive" === state.table.widthMode && state.columnResize.col < state.table.colCount - 1 ? (state.table.scenegraph.updateColWidth(state.columnResize.col, detaX), state.table.scenegraph.updateColWidth(state.columnResize.col + 1, -detaX), state.table.internalProps._widthResizedColMap.add(state.columnResize.col), state.table.internalProps._widthResizedColMap.add(state.columnResize.col + 1)) : (state.table.scenegraph.updateColWidth(state.columnResize.col, detaX), state.table.internalProps._widthResizedColMap.add(state.columnResize.col));
@@ -51089,7 +51110,7 @@
51089
51110
  let bottomRowHeight = state.table.getRowHeight(state.rowResize.row + 1);
51090
51111
  bottomRowHeight -= detaY, bottomRowHeight - detaY < state.table.internalProps.limitMinHeight && (detaY = bottomRowHeight - state.table.internalProps.limitMinHeight);
51091
51112
  }
51092
- detaY = Math.ceil(detaY), state.rowResize.row < state.table.columnHeaderLevelCount || state.rowResize.row >= state.table.rowCount - state.table.bottomFrozenRowCount ? updateResizeColForRow(detaY, state) : "indicator" === state.table.internalProps.rowResizeType ? updateResizeColForIndicator(detaY, state) : "indicatorGroup" === state.table.internalProps.rowResizeType ? updateResizeColForIndicatorGroup(detaY, state) : "all" === state.table.internalProps.rowResizeType ? updateResizeColForAll(detaY, state) : updateResizeColForRow(detaY, state), state.rowResize.y = yInTable, state.table.scenegraph.component.updateResizeRow(state.rowResize.row, xInTable, state.rowResize.isBottomFrozen), state.table.scenegraph.updateNextFrame();
51113
+ detaY = Math.ceil(detaY), state.rowResize.row < state.table.columnHeaderLevelCount || state.rowResize.row >= state.table.rowCount - state.table.bottomFrozenRowCount ? updateResizeColForRow(detaY, state) : "indicator" === state.table.internalProps.rowResizeType ? updateResizeColForIndicator(detaY, state) : "indicatorGroup" === state.table.internalProps.rowResizeType ? updateResizeColForIndicatorGroup(detaY, state) : "all" === state.table.internalProps.rowResizeType ? updateResizeColForAll(detaY, state) : updateResizeColForRow(detaY, state), state.rowResize.y = yInTable, state.table.scenegraph.component.updateResizeRow(state.rowResize.row, xInTable, state.rowResize.isBottomFrozen), state.table._updateSize(), state.table.scenegraph.updateNextFrame();
51093
51114
  }
51094
51115
  function updateResizeColForRow(detaY, state) {
51095
51116
  "adaptive" === state.table.heightMode && state.rowResize.row < state.table.rowCount - 1 ? (state.table.scenegraph.updateRowHeight(state.rowResize.row, detaY), state.table.scenegraph.updateRowHeight(state.rowResize.row + 1, -detaY), state.table.internalProps._heightResizedRowMap.add(state.rowResize.row), state.table.internalProps._heightResizedRowMap.add(state.rowResize.row + 1)) : (state.table.scenegraph.updateRowHeight(state.rowResize.row, detaY), state.table.internalProps._heightResizedRowMap.add(state.rowResize.row));
@@ -54217,6 +54238,7 @@
54217
54238
  left: left,
54218
54239
  right: right
54219
54240
  } = rect;
54241
+ if (-1 === col && -1 === row) return !0;
54220
54242
  if (table.isFrozenCell(col, row)) return !0;
54221
54243
  if (bottom < table.getFrozenRowsHeight() || right < table.getFrozenColsWidth() || left > table.tableNoFrameWidth - table.getRightFrozenColsWidth() || top > table.tableNoFrameHeight - table.getBottomFrozenRowsHeight()) return !1;
54222
54244
  const {
@@ -56412,7 +56434,7 @@
56412
56434
  }
56413
56435
  constructor(container, options = {}) {
56414
56436
  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;
56415
- if (super(), this.showFrozenIcon = !0, this.version = "1.19.6", 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");
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");
56416
56438
  this.pluginManager = new PluginManager$1(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
56417
56439
  options: options,
56418
56440
  container: container
@@ -56815,15 +56837,51 @@
56815
56837
  } = this.internalProps;
56816
56838
  widthP = (null !== (_c = null === (_b = canvas.parentElement) || void 0 === _b ? void 0 : _b.offsetWidth) && void 0 !== _c ? _c : 1) - (this.options.tableSizeAntiJitter ? 1 : 0), heightP = (null !== (_e = null === (_d = canvas.parentElement) || void 0 === _d ? void 0 : _d.offsetHeight) && void 0 !== _e ? _e : 1) - (this.options.tableSizeAntiJitter ? 1 : 0), (null === (_f = null == this ? void 0 : this.scenegraph) || void 0 === _f ? void 0 : _f.stage) ? (null === (_g = this.options) || void 0 === _g ? void 0 : _g.viewBox) && !(null === (_h = this.options) || void 0 === _h ? void 0 : _h.canvas) && this.scenegraph.stage.resize(widthP, heightP) : (canvas.style.width = "", canvas.style.height = "", canvas.width = widthP, canvas.height = heightP, canvas.style.width = `${widthP}px`, canvas.style.height = `${heightP}px`), (null === (_j = this.options) || void 0 === _j ? void 0 : _j.viewBox) && (widthP = this.options.viewBox.x2 - this.options.viewBox.x1, heightP = this.options.viewBox.y2 - this.options.viewBox.y1), (null === (_k = null == this ? void 0 : this.scenegraph) || void 0 === _k ? void 0 : _k.stage) && (this.options.viewBox ? this.scenegraph.stage.setViewBox(this.options.viewBox, !1) : this.scenegraph.stage.resize(widthP, heightP));
56817
56839
  } else "node" === Env.mode && (widthP = this.canvasWidth - 1, heightP = this.canvasHeight - 1);
56818
- const width = Math.floor(widthP - getVerticalScrollBarSize(this.getTheme().scrollStyle)),
56819
- height = Math.floor(heightP - getHorizontalScrollBarSize(this.getTheme().scrollStyle));
56840
+ const scrollStyle = this.getTheme().scrollStyle;
56841
+ let vScrollBarWidth = 0,
56842
+ hScrollBarWidth = 0;
56843
+ vScrollBarWidth = this.shouldVScrollBarWidthShow(widthP, heightP, scrollStyle) ? getVerticalScrollBarSize(scrollStyle) : 0, hScrollBarWidth = this.shouldHScrollBarWidthShow(widthP, heightP, scrollStyle) ? getHorizontalScrollBarSize(scrollStyle) : 0;
56844
+ const width = Math.floor(widthP - vScrollBarWidth),
56845
+ height = Math.floor(heightP - hScrollBarWidth);
56820
56846
  if (null === (_l = this.internalProps.theme) || void 0 === _l ? void 0 : _l.frameStyle) {
56821
56847
  const lineWidths = toBoxArray(null !== (_o = null === (_m = this.internalProps.theme.frameStyle) || void 0 === _m ? void 0 : _m.borderLineWidth) && void 0 !== _o ? _o : [null]),
56822
56848
  shadowWidths = toBoxArray(null !== (_q = null === (_p = this.internalProps.theme.frameStyle) || void 0 === _p ? void 0 : _p.shadowBlur) && void 0 !== _q ? _q : [0]);
56823
- (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)));
56849
+ if (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);else {
56850
+ 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);
56851
+ const rightBorder = (null !== (_y = lineWidths[1]) && void 0 !== _y ? _y : 0) + (null !== (_z = shadowWidths[1]) && void 0 !== _z ? _z : 0);
56852
+ this.tableNoFrameWidth = width - (rightBorder > vScrollBarWidth ? rightBorder - vScrollBarWidth : 0) - ((null !== (_0 = lineWidths[3]) && void 0 !== _0 ? _0 : 0) + (null !== (_1 = shadowWidths[3]) && void 0 !== _1 ? _1 : 0));
56853
+ const bottomBorder = (null !== (_2 = lineWidths[2]) && void 0 !== _2 ? _2 : 0) + (null !== (_3 = shadowWidths[2]) && void 0 !== _3 ? _3 : 0);
56854
+ this.tableNoFrameHeight = height - (bottomBorder > hScrollBarWidth ? bottomBorder - hScrollBarWidth : 0) - ((null !== (_4 = lineWidths[0]) && void 0 !== _4 ? _4 : 0) + (null !== (_5 = shadowWidths[0]) && void 0 !== _5 ? _5 : 0));
56855
+ }
56824
56856
  }
56825
56857
  this._clearColRangeWidthsMap(), this._clearRowRangeHeightsMap();
56826
56858
  }
56859
+ shouldVScrollBarWidthShow(tableWidth, tableHeight, scrollStyle) {
56860
+ if (scrollStyle.hoverOn || "none" === scrollStyle.visible) return !1;
56861
+ const totalHeight = this.getAllRowsHeight(),
56862
+ sizeTolerance = scrollStyle.visible ? getHorizontalScrollBarSize(scrollStyle) : 0;
56863
+ if (totalHeight > tableHeight - sizeTolerance && totalHeight <= tableHeight) {
56864
+ const totalWidth = this.getAllColsWidth(),
56865
+ sizeTolerance = scrollStyle.visible ? getVerticalScrollBarSize(scrollStyle) : 0;
56866
+ if (totalWidth > tableWidth - sizeTolerance && totalWidth <= tableWidth) return !1;
56867
+ if (totalWidth > tableWidth) return !0;
56868
+ if (totalWidth <= tableWidth - sizeTolerance) return !1;
56869
+ }
56870
+ return !(totalHeight <= tableHeight - sizeTolerance);
56871
+ }
56872
+ shouldHScrollBarWidthShow(tableWidth, tableHeight, scrollStyle) {
56873
+ if (scrollStyle.hoverOn || "none" === scrollStyle.visible) return !1;
56874
+ const totalWidth = this.getAllColsWidth(),
56875
+ sizeTolerance = scrollStyle.visible ? getVerticalScrollBarSize(scrollStyle) : 0;
56876
+ if (totalWidth > tableWidth - sizeTolerance && totalWidth <= tableWidth) {
56877
+ const totalHeight = this.getAllRowsHeight(),
56878
+ sizeTolerance = scrollStyle.visible ? getHorizontalScrollBarSize(scrollStyle) : 0;
56879
+ if (totalHeight > tableHeight - sizeTolerance && totalHeight <= tableHeight) return !1;
56880
+ if (totalHeight > tableHeight) return !0;
56881
+ if (totalHeight <= tableHeight - sizeTolerance) return !1;
56882
+ }
56883
+ return !(totalWidth <= tableWidth - sizeTolerance);
56884
+ }
56827
56885
  updateViewBox(newViewBox) {
56828
56886
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
56829
56887
  const oldWidth = (null !== (_c = null === (_b = null === (_a = this.options) || void 0 === _a ? void 0 : _a.viewBox) || void 0 === _b ? void 0 : _b.x2) && void 0 !== _c ? _c : 0) - (null !== (_f = null === (_e = null === (_d = this.options) || void 0 === _d ? void 0 : _d.viewBox) || void 0 === _e ? void 0 : _e.x1) && void 0 !== _f ? _f : 0),
@@ -60373,7 +60431,7 @@
60373
60431
  hideColumnsSubHeader ? this._headerCellIds[row - 1] && void 0 !== this._headerCellIds[row - 1][col] && (rowCells[col] = this._headerCellIds[row - 1][col]) : rowCells[col] = id;
60374
60432
  const expand = !hd.hierarchyState || hd.hierarchyState === HierarchyState.expand;
60375
60433
  if (hd.columns && expand) {
60376
- !hd.columns.every(c => c.hide) && this._addHeaders(maxRow + 1, hd.columns, [...roots, id], hd.hideColumnsSubHeader || hideColumnsSubHeader, hd.levelSpan).forEach(c => results.push(c));
60434
+ !(hd.columns.every(c => c.hide) || hd.hide) && this._addHeaders(maxRow + 1, hd.columns, [...roots, id], hd.hideColumnsSubHeader || hideColumnsSubHeader, hd.levelSpan).forEach(c => results.push(c));
60377
60435
  } else {
60378
60436
  const colDef = {
60379
60437
  id: this.seqId++,
@@ -61403,7 +61461,7 @@
61403
61461
  sortState: internalProps.sortState
61404
61462
  }) : this.setRecords([]), options.title) {
61405
61463
  const Title = Factory.getComponent("title");
61406
- internalProps.title = new Title(options.title, this), this.scenegraph.resize();
61464
+ internalProps.title = new Title(options.title, this);
61407
61465
  }
61408
61466
  if (this.options.emptyTip) if (this.internalProps.emptyTip) null === (_g = this.internalProps.emptyTip) || void 0 === _g || _g.resetVisible();else {
61409
61467
  const EmptyTip = Factory.getComponent("emptyTip");
@@ -61414,7 +61472,7 @@
61414
61472
  this.listTreeStickCellPlugin = new ListTreeStickCellPlugin(this);
61415
61473
  }
61416
61474
  setTimeout(() => {
61417
- this.fireListeners(TABLE_EVENT_TYPE.INITIALIZED, null);
61475
+ this.resize(), this.fireListeners(TABLE_EVENT_TYPE.INITIALIZED, null);
61418
61476
  }, 0);
61419
61477
  }
61420
61478
  isListTable() {
@@ -61452,7 +61510,7 @@
61452
61510
  col: this.stateManager.hover.cellPos.col,
61453
61511
  row: this.stateManager.hover.cellPos.row
61454
61512
  };
61455
- this._hasAutoImageColumn = void 0, this.refreshHeader(), this.records && checkHasAggregationOnColumnDefine(this.internalProps.columns) && this.dataSource.processRecords(null !== (_b = null === (_a = this.dataSource.dataSourceObj) || void 0 === _a ? void 0 : _a.records) && void 0 !== _b ? _b : this.dataSource.dataSourceObj), this.internalProps.useOneRowHeightFillAll = !1, this.headerStyleCache = new Map(), this.bodyStyleCache = new Map(), this.bodyBottomStyleCache = new Map(), this.scenegraph.createSceneGraph(), this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row), this.renderAsync(), this.eventManager.updateEventBinder();
61513
+ this._hasAutoImageColumn = void 0, this.refreshHeader(), this.records && checkHasAggregationOnColumnDefine(this.internalProps.columns) && this.dataSource.processRecords(null !== (_b = null === (_a = this.dataSource.dataSourceObj) || void 0 === _a ? void 0 : _a.records) && void 0 !== _b ? _b : this.dataSource.dataSourceObj), this.internalProps.useOneRowHeightFillAll = !1, this.headerStyleCache = new Map(), this.bodyStyleCache = new Map(), this.bodyBottomStyleCache = new Map(), this._updateSize(), this.scenegraph.createSceneGraph(), this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row), this.renderAsync(), this.eventManager.updateEventBinder();
61456
61514
  }
61457
61515
  addColumn(column) {
61458
61516
  const columns = this.options.columns;
@@ -61666,7 +61724,7 @@
61666
61724
  } = table.internalProps;
61667
61725
  if (!layoutMap) return;
61668
61726
  const dataCount = null !== (_b = null === (_a = table.internalProps.dataSource) || void 0 === _a ? void 0 : _a.length) && void 0 !== _b ? _b : 0;
61669
- layoutMap.recordsCount = dataCount + (dataCount > 0 || this.options.showAggregationWhenEmpty ? layoutMap.hasAggregationOnTopCount + layoutMap.hasAggregationOnBottomCount : 0), table.transpose ? (table.rowCount = null !== (_c = layoutMap.rowCount) && void 0 !== _c ? _c : 0, table.colCount = null !== (_d = layoutMap.colCount) && void 0 !== _d ? _d : 0, this.internalProps.frozenColCount = Math.max((null !== (_e = layoutMap.headerLevelCount) && void 0 !== _e ? _e : 0) + layoutMap.leftRowSeriesNumberColumnCount, null !== (_f = this.options.frozenColCount) && void 0 !== _f ? _f : 0), this.internalProps.frozenRowCount = null !== (_g = this.options.frozenRowCount) && void 0 !== _g ? _g : 0, table.bottomFrozenRowCount !== (null !== (_h = this.options.bottomFrozenRowCount) && void 0 !== _h ? _h : 0) && (table.bottomFrozenRowCount = null !== (_j = this.options.bottomFrozenRowCount) && void 0 !== _j ? _j : 0), table.rightFrozenColCount !== (null !== (_k = this.options.rightFrozenColCount) && void 0 !== _k ? _k : 0) && (table.rightFrozenColCount = null !== (_l = this.options.rightFrozenColCount) && void 0 !== _l ? _l : 0)) : (table.colCount = null !== (_m = layoutMap.colCount) && void 0 !== _m ? _m : 0, table.rowCount = layoutMap.recordsCount * layoutMap.bodyRowSpanCount + layoutMap.headerLevelCount, this.internalProps.frozenColCount = null !== (_o = this.options.frozenColCount) && void 0 !== _o ? _o : 0, table.frozenRowCount = Math.max(layoutMap.headerLevelCount, null !== (_p = this.options.frozenRowCount) && void 0 !== _p ? _p : 0), table.bottomFrozenRowCount !== (null !== (_q = this.options.bottomFrozenRowCount) && void 0 !== _q ? _q : 0) && (table.bottomFrozenRowCount = null !== (_r = this.options.bottomFrozenRowCount) && void 0 !== _r ? _r : 0), table.rightFrozenColCount !== (null !== (_s = this.options.rightFrozenColCount) && void 0 !== _s ? _s : 0) && (table.rightFrozenColCount = null !== (_t = this.options.rightFrozenColCount) && void 0 !== _t ? _t : 0)), this.stateManager.setFrozenCol(this.internalProps.frozenColCount);
61727
+ layoutMap.recordsCount = dataCount + (dataCount > 0 || this.options.showAggregationWhenEmpty ? layoutMap.hasAggregationOnTopCount + layoutMap.hasAggregationOnBottomCount : 0), table.transpose ? (table.rowCount = null !== (_c = layoutMap.rowCount) && void 0 !== _c ? _c : 0, table.colCount = null !== (_d = layoutMap.colCount) && void 0 !== _d ? _d : 0, this.internalProps.frozenColCount = Math.max((null !== (_e = layoutMap.headerLevelCount) && void 0 !== _e ? _e : 0) + layoutMap.leftRowSeriesNumberColumnCount, null !== (_f = this.options.frozenColCount) && void 0 !== _f ? _f : 0), this.internalProps.frozenRowCount = null !== (_g = this.options.frozenRowCount) && void 0 !== _g ? _g : 0, table.bottomFrozenRowCount !== (null !== (_h = this.options.bottomFrozenRowCount) && void 0 !== _h ? _h : 0) && (table.bottomFrozenRowCount = null !== (_j = this.options.bottomFrozenRowCount) && void 0 !== _j ? _j : 0), table.rightFrozenColCount !== (null !== (_k = this.options.rightFrozenColCount) && void 0 !== _k ? _k : 0) && (table.rightFrozenColCount = null !== (_l = this.options.rightFrozenColCount) && void 0 !== _l ? _l : 0)) : (table.colCount = null !== (_m = layoutMap.colCount) && void 0 !== _m ? _m : 0, table.rowCount = layoutMap.recordsCount * layoutMap.bodyRowSpanCount + layoutMap.headerLevelCount, this.internalProps.frozenColCount = null !== (_o = this.options.frozenColCount) && void 0 !== _o ? _o : 0, this.options.frozenColCount >= this.colCount && (this.internalProps.frozenColCount = 0), table.frozenRowCount = Math.max(layoutMap.headerLevelCount, null !== (_p = this.options.frozenRowCount) && void 0 !== _p ? _p : 0), table.bottomFrozenRowCount !== (null !== (_q = this.options.bottomFrozenRowCount) && void 0 !== _q ? _q : 0) && (table.bottomFrozenRowCount = null !== (_r = this.options.bottomFrozenRowCount) && void 0 !== _r ? _r : 0), table.rightFrozenColCount !== (null !== (_s = this.options.rightFrozenColCount) && void 0 !== _s ? _s : 0) && (table.rightFrozenColCount = null !== (_t = this.options.rightFrozenColCount) && void 0 !== _t ? _t : 0)), this.stateManager.setFrozenCol(this.internalProps.frozenColCount);
61670
61728
  }
61671
61729
  getFieldData(field, col, row) {
61672
61730
  if (null === field) return null;
@@ -61849,7 +61907,7 @@
61849
61907
  })), this.internalProps.layoutMap.clearCellRangeMap(), this.internalProps.useOneRowHeightFillAll = !1, this.scenegraph.sortCell()), sortState.length && this.stateManager.updateSortState(sortState);
61850
61908
  }
61851
61909
  updateFilterRules(filterRules) {
61852
- this.scenegraph.clearCells(), this.sortState ? (this.dataSource.updateFilterRulesForSorted(filterRules), sortRecords(this)) : this.dataSource.updateFilterRules(filterRules), this.refreshRowColCount(), this.stateManager.initCheckedState(this.records), this.scenegraph.createSceneGraph();
61910
+ this.scenegraph.clearCells(), this.sortState ? (this.dataSource.updateFilterRulesForSorted(filterRules), sortRecords(this)) : this.dataSource.updateFilterRules(filterRules), this.refreshRowColCount(), this.stateManager.initCheckedState(this.records), this.scenegraph.createSceneGraph(), this.resize();
61853
61911
  }
61854
61912
  getCheckboxState(field) {
61855
61913
  if (this.stateManager.checkedState.size < this.rowCount - this.columnHeaderLevelCount && this.stateManager.initLeftRecordsCheckState(this.records), isValid$3(field)) {
@@ -61924,7 +61982,7 @@
61924
61982
  }
61925
61983
  this.refreshRowColCount();
61926
61984
  } else _setRecords(this, records);
61927
- if (this.stateManager.initCheckedState(records), this.clearCellStyleCache(), this.scenegraph.createSceneGraph(), this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row), this.internalProps.title && !this.internalProps.title.isReleased && (this._updateSize(), this.internalProps.title.resize(), this.scenegraph.resize()), this.options.emptyTip) if (this.internalProps.emptyTip) null === (_c = this.internalProps.emptyTip) || void 0 === _c || _c.resetVisible();else {
61985
+ if (this.stateManager.initCheckedState(records), this.clearCellStyleCache(), this.scenegraph.createSceneGraph(), this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row), this._updateSize(), this.internalProps.title && !this.internalProps.title.isReleased && this.internalProps.title.resize(), this.scenegraph.resize(), this.options.emptyTip) if (this.internalProps.emptyTip) null === (_c = this.internalProps.emptyTip) || void 0 === _c || _c.resetVisible();else {
61928
61986
  const EmptyTip = Factory.getComponent("emptyTip");
61929
61987
  this.internalProps.emptyTip = new EmptyTip(this.options.emptyTip, this), null === (_d = this.internalProps.emptyTip) || void 0 === _d || _d.resetVisible();
61930
61988
  }
@@ -63805,10 +63863,12 @@
63805
63863
  }), legend.hideAll()), this.table.scenegraph.stage.defaultLayer.appendChild(legend), this.adjustTableSize(attrs);
63806
63864
  }
63807
63865
  resize() {
63808
- this.legendComponent && !1 !== this.visible && (this.legendComponent.setAttributes({
63809
- maxWidth: this.table.tableNoFrameWidth,
63810
- maxHeight: this.table.tableNoFrameHeight
63811
- }), this.adjustTableSize(this.legendComponent.attribute));
63866
+ if (!this.legendComponent || !1 === this.visible) return;
63867
+ const attrs = this.getLegendAttributes({
63868
+ width: this.table.tableNoFrameWidth,
63869
+ height: this.table.tableNoFrameHeight
63870
+ });
63871
+ this.legendComponent.setAttributes(attrs), this.adjustTableSize(this.legendComponent.attribute);
63812
63872
  }
63813
63873
  adjustTableSize(attrs) {
63814
63874
  var _a, _b;
@@ -64287,7 +64347,22 @@
64287
64347
  container: table => new Container$1(table)
64288
64348
  };
64289
64349
  function getMenuInstanceInfo(table, col, row, type, dropDownMenuOptions) {
64290
- var _a, _b;
64350
+ var _a, _b, _c;
64351
+ if (-1 === col && -1 === row && "context-menu" === type) return (null == dropDownMenuOptions ? void 0 : dropDownMenuOptions.content) ? {
64352
+ type: type,
64353
+ position: dropDownMenuOptions.position,
64354
+ referencePosition: null !== (_a = dropDownMenuOptions.referencePosition) && void 0 !== _a ? _a : {
64355
+ rect: {
64356
+ left: 0,
64357
+ right: 0,
64358
+ top: 0,
64359
+ bottom: 0,
64360
+ width: 0,
64361
+ height: 0
64362
+ }
64363
+ },
64364
+ content: dropDownMenuOptions.content
64365
+ } : null;
64291
64366
  const {
64292
64367
  lineHeight: lineHeight,
64293
64368
  textBaseline: textBaseline,
@@ -64316,7 +64391,7 @@
64316
64391
  } = table.internalProps.headerHelper.getDropDownIconRect(rect, lineHeight, textBaseline || "middle")), null == dropDownMenuOptions ? void 0 : dropDownMenuOptions.content) return {
64317
64392
  type: type,
64318
64393
  position: dropDownMenuOptions.position,
64319
- referencePosition: null !== (_a = dropDownMenuOptions.referencePosition) && void 0 !== _a ? _a : {
64394
+ referencePosition: null !== (_b = dropDownMenuOptions.referencePosition) && void 0 !== _b ? _b : {
64320
64395
  rect: {
64321
64396
  left: left,
64322
64397
  right: right,
@@ -64331,7 +64406,7 @@
64331
64406
  if ("dropdown-menu" === type) {
64332
64407
  let dropDownMenu = table.globalDropDownMenu;
64333
64408
  const headerData = table._getHeaderLayoutMap(col, row);
64334
- dropDownMenu = null !== (_b = headerData.dropDownMenu) && void 0 !== _b ? _b : dropDownMenu;
64409
+ dropDownMenu = null !== (_c = headerData.dropDownMenu) && void 0 !== _c ? _c : dropDownMenu;
64335
64410
  const pivotInfo = headerData.pivotInfo;
64336
64411
  return "function" == typeof dropDownMenu && (dropDownMenu = dropDownMenu({
64337
64412
  row: row,
@@ -64374,7 +64449,16 @@
64374
64449
  info: menuInstanceInfo
64375
64450
  } = instanceInfo;
64376
64451
  if (instance && instance.bindMenuElement(col, row, menuInstanceInfo)) {
64377
- const range = this._table.getCellRange(col, row);
64452
+ const range = -1 === col && -1 === row ? {
64453
+ start: {
64454
+ col: -1,
64455
+ row: -1
64456
+ },
64457
+ end: {
64458
+ col: -1,
64459
+ row: -1
64460
+ }
64461
+ } : this._table.getCellRange(col, row);
64378
64462
  this._attachInfo = {
64379
64463
  range: range,
64380
64464
  instance: instance
@@ -64419,6 +64503,19 @@
64419
64503
  }
64420
64504
  });
64421
64505
  }
64506
+ }), table.on(TABLE_EVENT_TYPE.CONTEXTMENU_CANVAS, e => {
64507
+ var _a, _b, _c, _d;
64508
+ if ("html" === (null === (_a = table.internalProps.menu) || void 0 === _a ? void 0 : _a.renderMode)) {
64509
+ const abstractPos = table._getMouseAbstractPoint(e.event);
64510
+ let menu = null;
64511
+ abstractPos.inTable && "function" == typeof (null === (_b = table.internalProps.menu) || void 0 === _b ? void 0 : _b.contextMenuItems) ? menu = table.internalProps.menu.contextMenuItems(table.getHeaderField(e.col, e.row), e.row, e.col, table) : abstractPos.inTable && Array.isArray(null === (_c = table.internalProps.menu) || void 0 === _c ? void 0 : _c.contextMenuItems) && (menu = null === (_d = table.internalProps.menu) || void 0 === _d ? void 0 : _d.contextMenuItems), this._bindToCell(-1, -1, "context-menu", {
64512
+ content: menu,
64513
+ position: {
64514
+ x: abstractPos.x,
64515
+ y: abstractPos.y
64516
+ }
64517
+ });
64518
+ }
64422
64519
  });
64423
64520
  }
64424
64521
  _getMenuInstanceInfo(col, row, type, dropDownMenuOptions) {
@@ -67665,6 +67762,15 @@
67665
67762
  this.initMarkLines();
67666
67763
  }
67667
67764
  initMarkLines() {
67765
+ const height = Math.min(this._scene._gantt.tableNoFrameHeight, this._scene._gantt.drawHeight) -
67766
+ this._scene._gantt.getAllHeaderRowsHeight();
67767
+ this.group.setAttributes({
67768
+ y: this._scene._gantt.getAllHeaderRowsHeight(),
67769
+ width: this._scene._gantt.tableNoFrameWidth,
67770
+ height: height
67771
+ });
67772
+ this.markLIneContainer.setAttribute('width', this._scene._gantt.getAllDateColsWidth());
67773
+ this.markLIneContainer.setAttribute('height', height);
67668
67774
  const markLine = this._scene._gantt.parsedOptions.markLine;
67669
67775
  const minDate = this._scene._gantt.parsedOptions.minDate;
67670
67776
  minDate &&
@@ -72832,6 +72938,7 @@
72832
72938
  var vtable = /*#__PURE__*/Object.freeze({
72833
72939
  __proto__: null,
72834
72940
  CustomLayout: index$2,
72941
+ TABLE_EVENT_TYPE: TABLE_EVENT_TYPE,
72835
72942
  TYPES: index$3,
72836
72943
  register: register$1,
72837
72944
  themes: themes$1
@@ -72842,7 +72949,7 @@
72842
72949
  PluginManager: PluginManager
72843
72950
  });
72844
72951
 
72845
- const version = "1.19.6";
72952
+ const version = "1.19.7";
72846
72953
 
72847
72954
  exports.Gantt = Gantt;
72848
72955
  exports.TYPES = index$4;