@visactor/vtable-gantt 1.19.6 → 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/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.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.6";
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.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.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"]}
@@ -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"]}