@visactor/vtable-plugins 1.20.1-alpha.0 → 1.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/excel-edit-cell-keyboard.js +1 -1
- package/cjs/excel-edit-cell-keyboard.js.map +1 -1
- package/cjs/table-export/csv/index.js +1 -0
- package/cjs/table-export/excel/index.js +0 -1
- package/cjs/table-series-number.js +4 -3
- package/cjs/table-series-number.js.map +1 -1
- package/dist/vtable-plugins.js +9 -7
- package/dist/vtable-plugins.min.js +1 -1
- package/es/excel-edit-cell-keyboard.js +1 -1
- package/es/excel-edit-cell-keyboard.js.map +1 -1
- package/es/table-export/csv/index.js +2 -1
- package/es/table-export/excel/index.js +1 -2
- package/es/table-series-number.js +4 -3
- package/es/table-series-number.js.map +1 -1
- package/package.json +7 -7
|
@@ -55,7 +55,7 @@ class ExcelEditCellKeyboardPlugin {
|
|
|
55
55
|
} else {
|
|
56
56
|
const {col: col, row: row} = this.table.stateManager.select.cellPos;
|
|
57
57
|
if (!this.table.editorManager.editingEditor || "Enter" !== event.key && "Tab" !== event.key) {
|
|
58
|
-
if ("Delete" === event.key) {
|
|
58
|
+
if ("Delete" === event.key || "Backspace" === event.key) {
|
|
59
59
|
const selectCells = this.table.getSelectedCellInfos();
|
|
60
60
|
(null == selectCells ? void 0 : selectCells.length) > 0 && deleteSelectRange(selectCells, this.table),
|
|
61
61
|
event.stopPropagation(), event.preventDefault();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/excel-edit-cell-keyboard.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yDAA2C;AAU3C,MAAa,2BAA2B;IAMtC,YAAY,aAAmD;;QAL/D,OAAE,GAAG,0BAA0B,CAAC;QAChC,SAAI,GAAG,0BAA0B,CAAC;QAClC,YAAO,GAAG,CAAC,MAAM,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;QAI9C,IAAI,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I,CAAC,KAAK,CAAC,CAAC;qBAC5C;oBAED,KAAK,CAAC,eAAe,EAAE,CAAC;oBACxB,KAAK,CAAC,cAAc,EAAE,CAAC;iBACxB;aACF;SACF;IACH,CAAC;IAED,kBAAkB,CAAC,KAAoB;QACrC,OAAO,CACL,KAAK,CAAC,GAAG,KAAK,OAAO;YACrB,KAAK,CAAC,GAAG,KAAK,KAAK;YACnB,KAAK,CAAC,GAAG,KAAK,WAAW;YACzB,KAAK,CAAC,GAAG,KAAK,YAAY;YAC1B,KAAK,CAAC,GAAG,KAAK,WAAW;YACzB,KAAK,CAAC,GAAG,KAAK,SAAS,CACxB,CAAC;IACJ,CAAC;IACD,OAAO;QACL,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;IACpE,CAAC;CACF;AAvGD,kEAuGC;AAED,SAAS,iBAAiB,CAAC,WAAsC,EAAE,aAA+B;IAChG,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAC3C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC9C,aAAa,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;SACjF;KACF;AACH,CAAC","file":"excel-edit-cell-keyboard.js","sourcesContent":["import * as VTable from '@visactor/vtable';\nimport type { TableEvents } from '@visactor/vtable/src/core/TABLE_EVENT_TYPE';\nimport type { EventArg } from './types';\n//备用 插件配置项 目前感觉都走默认逻辑就行\nexport type IExcelEditCellKeyboardPluginOptions = {\n id?: string;\n // 是否响应删除\n // enableDeleteKey?: boolean;\n};\n\nexport class ExcelEditCellKeyboardPlugin implements VTable.plugins.IVTablePlugin {\n id = `excel-edit-cell-keyboard`;\n name = 'Excel Edit Cell Keyboard';\n runTime = [VTable.TABLE_EVENT_TYPE.INITIALIZED];\n table: VTable.ListTable;\n pluginOptions: IExcelEditCellKeyboardPluginOptions;\n constructor(pluginOptions?: IExcelEditCellKeyboardPluginOptions) {\n this.id = pluginOptions?.id ?? this.id;\n this.pluginOptions = pluginOptions;\n\n this.bindEvent();\n }\n run(...args: [EventArg, TableEvents[keyof TableEvents] | TableEvents[keyof TableEvents][], VTable.BaseTableAPI]) {\n const table: VTable.BaseTableAPI = args[2];\n this.table = table as VTable.ListTable;\n }\n\n bindEvent() {\n //监听document全局的keydown事件 捕获阶段监听 可以及时阻止事件传播和默认行为\n document.addEventListener('keydown', this.handleKeyDown.bind(this), true);\n // this.table.on('selected_cell', () => {\n // this.updateHighlight();\n // });\n\n // this.table.on('selected_clear', () => {\n // this.clearHighlight();\n // });\n\n // this.table.on('mousemove_table', () => {\n // if (this.table.stateManager.select.selecting) {\n // this.updateHighlight();\n // }\n // });\n }\n handleKeyDown(event: KeyboardEvent) {\n if (this.table.editorManager) {\n //判断是键盘触发编辑单元格的情况下,那么在编辑状态中切换方向需要选中下一个继续编辑\n if (this.table.editorManager.beginTriggerEditCellMode === 'keydown') {\n if (this.table.editorManager.editingEditor && this.isExcelShortcutKey(event)) {\n const { col, row } = this.table.editorManager.editCell;\n this.table.editorManager.completeEdit();\n this.table.getElement().focus();\n if (!event.shiftKey && !event.ctrlKey && !event.metaKey) {\n //有这些配合键,则不进行选中下一个单元格的行为 执行vtable内部逻辑\n if (event.key === 'Enter') {\n this.table.selectCell(col, row + 1);\n } else if (event.key === 'Tab') {\n this.table.selectCell(col + 1, row);\n } else if (event.key === 'ArrowLeft') {\n this.table.selectCell(col - 1, row);\n } else if (event.key === 'ArrowRight') {\n this.table.selectCell(col + 1, row);\n } else if (event.key === 'ArrowDown') {\n this.table.selectCell(col, row + 1);\n } else if (event.key === 'ArrowUp') {\n this.table.selectCell(col, row - 1);\n }\n // 阻止事件传播和默认行为\n event.stopPropagation();\n event.preventDefault();\n }\n }\n } else {\n const { col, row } = this.table.stateManager.select.cellPos;\n if (this.table.editorManager.editingEditor && (event.key === 'Enter' || event.key === 'Tab')) {\n this.table.editorManager.completeEdit();\n this.table.getElement().focus();\n if (event.key === 'Enter') {\n this.table.selectCell(col, row + 1);\n } else if (event.key === 'Tab') {\n this.table.selectCell(col + 1, row);\n }\n // 阻止事件传播和默认行为\n event.stopPropagation();\n event.preventDefault();\n } else if (event.key === 'Delete' || event.key === 'Backspace') {\n //响应删除键,删除\n const selectCells = this.table.getSelectedCellInfos();\n if (selectCells?.length > 0) {\n // 如果选中的是范围,则删除范围内的所有单元格\n deleteSelectRange(selectCells, this.table);\n }\n // 阻止事件传播和默认行为\n event.stopPropagation();\n event.preventDefault();\n }\n }\n }\n }\n // 判断event的keyCode是否是excel的快捷键\n isExcelShortcutKey(event: KeyboardEvent) {\n return (\n event.key === 'Enter' ||\n event.key === 'Tab' ||\n event.key === 'ArrowLeft' ||\n event.key === 'ArrowRight' ||\n event.key === 'ArrowDown' ||\n event.key === 'ArrowUp'\n );\n }\n release() {\n document.removeEventListener('keydown', this.handleKeyDown, true);\n }\n}\n//将选中单元格的值设置为空\nfunction deleteSelectRange(selectCells: VTable.TYPES.CellInfo[][], tableInstance: VTable.ListTable) {\n for (let i = 0; i < selectCells.length; i++) {\n for (let j = 0; j < selectCells[i].length; j++) {\n tableInstance.changeCellValue(selectCells[i][j].col, selectCells[i][j].row, '');\n }\n }\n}\n"]}
|
|
@@ -239,5 +239,4 @@ function needCellImageExport(cellType, isAxisCell, isCustomCell, isTextWithIcon,
|
|
|
239
239
|
return !(null == options ? void 0 : options.skipImageExportCellType) || ("image" === cellType || "video" === cellType || "progressbar" === cellType || "sparkline" === cellType || "chart" === cellType ? !options.skipImageExportCellType.includes(cellType) : isAxisCell ? !options.skipImageExportCellType.includes("chart") : isCustomCell ? !options.skipImageExportCellType.includes("custom") : !isTextWithIcon || !options.skipImageExportCellType.includes("textWithIcon"));
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
-
//# sourceMappingURL=index.js.map
|
|
243
242
|
exports.exportVTableToExcel = exportVTableToExcel;
|
|
@@ -97,15 +97,16 @@ class TableSeriesNumber {
|
|
|
97
97
|
}, this.handleSeriesNumberCellUnHover = e => {
|
|
98
98
|
this.table.scenegraph.renderSceneGraph();
|
|
99
99
|
}, this.handleSeriesNumberCellClick = e => {
|
|
100
|
-
|
|
100
|
+
var _a, _b, _c, _d;
|
|
101
|
+
const {seriesNumberCell: seriesNumberCell, event: event, isDragSelect: isDragSelect} = e.detail, ctrlMultiSelect = null === (_b = null === (_a = this.table.options.keyboardOptions) || void 0 === _a ? void 0 : _a.ctrlMultiSelect) || void 0 === _b || _b, shiftMultiSelect = null === (_d = null === (_c = this.table.options.keyboardOptions) || void 0 === _c ? void 0 : _c.shiftMultiSelect) || void 0 === _d || _d, enableCtrlSelectMode = (event.nativeEvent.ctrlKey || event.nativeEvent.metaKey) && ctrlMultiSelect, enableShiftSelectMode = event.nativeEvent.shiftKey && shiftMultiSelect, isRow = seriesNumberCell.name.includes("row"), isCol = seriesNumberCell.name.includes("col");
|
|
101
102
|
if (isRow) {
|
|
102
103
|
this.table.stateManager.setSelectInline("row");
|
|
103
104
|
const rowIndex = seriesNumberCell.id;
|
|
104
|
-
isDragSelect ? this.table.dragSelectRow(rowIndex,
|
|
105
|
+
isDragSelect ? this.table.dragSelectRow(rowIndex, enableCtrlSelectMode) : this.table.startDragSelectRow(rowIndex, enableCtrlSelectMode, enableShiftSelectMode);
|
|
105
106
|
} else if (isCol) {
|
|
106
107
|
this.table.stateManager.setSelectInline("col");
|
|
107
108
|
const colIndex = seriesNumberCell.id;
|
|
108
|
-
isDragSelect ? this.table.dragSelectCol(colIndex,
|
|
109
|
+
isDragSelect ? this.table.dragSelectCol(colIndex, enableCtrlSelectMode) : this.table.startDragSelectCol(colIndex, enableCtrlSelectMode, enableShiftSelectMode);
|
|
109
110
|
} else this.table.eventManager.deelTableSelectAll();
|
|
110
111
|
}, this.handleSeriesNumberCellClickUp = e => {
|
|
111
112
|
this.table.stateManager.setSelectInline(!1), this.table.endDragSelect();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/table-series-number.ts"],"names":[],"mappings":";;;AACA,6CAA2D;AAC3D,yDAA+G;AAoB/G,MAAa,iBAAiB;IAiB5B,YAAY,aAAuC;QAhBnD,OAAE,GAAG,qBAAqB,CAAC;QAC3B,SAAI,GAAG,qBAAqB,CAAC;QAC7B,YAAO,GAAG;YACR,yBAAgB,CAAC,WAAW;YAC5B,yBAAgB,CAAC,WAAW;YAC5B,yBAAgB,CAAC,oBAAoB;YACrC,yBAAgB,CAAC,OAAO;SACzB,CAAC;QAKF,mBAAc,GAAW,CAAC,CAAC;QAC3B,mBAAc,GAAW,CAAC,CAAC;QAC3B,kBAAa,GAAW,CAAC,CAAC;QA+KlB,iBAAY,GAAG,GAAG,EAAE;YAE1B,IAAI,IAAI,CAAC,WAAW,EAAE;gBACpB,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;gBAC/B,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;aACzB;YACD,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC,GAAG,EAAE;gBACjC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;gBACxB,IAAI,CAAC,qBAAqB,EAAE,CAAC;YAC/B,CAAC,EAAE,EAAE,CAAC,CAAC;QACT,CAAC,CAAC;QAEM,oBAAe,GAAG,GAAG,EAAE;YAC7B,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAC/B,CAAC,CAAC;QAEM,0BAAqB,GAAG,CAAC,CAAM,EAAE,EAAE;YACzC,IAAI,CAAC,qBAAqB,CAAC,uBAAuB,EAAE,CAAC;YACrD,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,MAA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C","file":"table-series-number.js","sourcesContent":["import type { BaseTableAPI, ListTable, ListTableConstructorOptions, plugins } from '@visactor/vtable';\nimport { TABLE_EVENT_TYPE, TYPES } from '@visactor/vtable';\nimport { TableSeriesNumber as VRenderTableSeriesNumber, SeriesNumberEvent } from '@visactor/vtable/es/vrender';\nimport type { ILayer, TableSeriesNumberAttributes } from '@visactor/vtable/es/vrender';\n\nexport type TableSeriesNumberOptions = {\n rowCount: number;\n colCount: number;\n // syncRowHeightFromTable?: boolean;\n // syncColWidthFromTable?: boolean;\n} & Partial<\n Pick<\n TableSeriesNumberAttributes,\n | 'rowSeriesNumberGenerate'\n | 'colSeriesNumberGenerate'\n | 'rowSeriesNumberCellStyle'\n | 'colSeriesNumberCellStyle'\n | 'cornerCellStyle'\n | 'colSeriesNumberHeight'\n | 'rowSeriesNumberWidth'\n >\n>;\nexport class TableSeriesNumber implements plugins.IVTablePlugin {\n id = `table-series-number`;\n name = 'Table Series Number';\n runTime = [\n TABLE_EVENT_TYPE.INITIALIZED,\n TABLE_EVENT_TYPE.BEFORE_INIT,\n TABLE_EVENT_TYPE.BEFORE_UPDATE_OPTION,\n TABLE_EVENT_TYPE.UPDATED\n ];\n pluginOptions: TableSeriesNumberOptions;\n table: ListTable;\n seriesNumberComponent: VRenderTableSeriesNumber;\n componentLayoutLayer: ILayer;\n lastCurrentRow: number = 0;\n lastCurrentCol: number = 0;\n startRowIndex: number = 0;\n scrollTimer: any;\n constructor(pluginOptions: TableSeriesNumberOptions) {\n this.pluginOptions = pluginOptions;\n this.seriesNumberComponent = new VRenderTableSeriesNumber({\n rowCount: pluginOptions.rowCount,\n colCount: pluginOptions.colCount,\n rowSeriesNumberWidth: pluginOptions.rowSeriesNumberWidth,\n colSeriesNumberHeight: pluginOptions.colSeriesNumberHeight,\n rowSeriesNumberGenerate: pluginOptions.rowSeriesNumberGenerate,\n colSeriesNumberGenerate: pluginOptions.colSeriesNumberGenerate,\n rowSeriesNumberCellStyle: Object.assign(\n {\n text: {\n fontSize: 14,\n fill: '#7A7A7A',\n pickable: false,\n textAlign: 'left',\n textBaseline: 'middle',\n padding: [2, 4, 2, 4]\n },\n borderLine: {\n stroke: '#D9D9D9',\n lineWidth: 1,\n pickable: false\n },\n bgColor: '#F9F9F9',\n states: {\n hover: {\n fill: '#c8daf6',\n opacity: 0.7\n },\n select: {\n fill: '#c8daf6',\n opacity: 1\n }\n }\n },\n pluginOptions.rowSeriesNumberCellStyle\n ),\n colSeriesNumberCellStyle: Object.assign(\n {\n text: {\n fontSize: 14,\n fill: '#7A7A7A',\n pickable: false,\n textAlign: 'left',\n textBaseline: 'middle',\n padding: [2, 4, 2, 4]\n },\n borderLine: {\n stroke: '#D9D9D9',\n lineWidth: 1,\n pickable: false\n },\n bgColor: '#F9F9F9',\n states: {\n hover: {\n fill: '#c8daf6',\n opacity: 0.7\n },\n select: {\n fill: '#c8daf6',\n opacity: 1\n }\n }\n },\n pluginOptions.colSeriesNumberCellStyle\n ),\n cornerCellStyle: Object.assign(\n {\n borderLine: {\n stroke: '#D9D9D9',\n lineWidth: 1,\n pickable: false\n },\n bgColor: '#F9F9F9',\n states: {\n hover: {\n fill: '#98C8A5',\n opacity: 0.7\n },\n select: {\n fill: '#98C8A5',\n opacity: 1\n }\n }\n },\n pluginOptions.cornerCellStyle\n )\n });\n this.listenComponentEvents();\n }\n\n run(...args: any[]) {\n // const eventArgs = args[0];\n const runTime = args[1];\n if (runTime === TABLE_EVENT_TYPE.BEFORE_INIT || runTime === TABLE_EVENT_TYPE.BEFORE_UPDATE_OPTION) {\n const eventArgs = args[0];\n const table: BaseTableAPI = args[2];\n this.table = table as ListTable;\n const options: ListTableConstructorOptions = eventArgs.options;\n const records = options.records ?? [];\n // //用空数据将records填充到pluginOptions.rowCount\n // for (let i = records.length; i < this.pluginOptions.rowCount; i++) {\n // records.push({});\n // }\n // 直接设置数组长度,不填充任何内容\n if (records.length < this.pluginOptions.rowCount) {\n records.length = this.pluginOptions.rowCount;\n }\n options.records = records;\n if (!options.columns) {\n options.columns = [];\n }\n for (let i = options.columns.length; i < this.pluginOptions.colCount; i++) {\n const columnFields = {\n field: i,\n title: ``\n };\n options.columns.push(columnFields);\n }\n const rowSeriesNumberColWidth = this.seriesNumberComponent.rowSeriesNumberWidth;\n const colSeriesNumberRowHeight = this.seriesNumberComponent.colSeriesNumberHeight;\n options.contentOffsetX = rowSeriesNumberColWidth;\n options.contentOffsetY = colSeriesNumberRowHeight;\n // if (options.columns.length < this.pluginOptions.colCount) {\n // options.columns.length = this.pluginOptions.colCount;\n // }\n } else if (runTime === TABLE_EVENT_TYPE.INITIALIZED || runTime === TABLE_EVENT_TYPE.UPDATED) {\n this.table = args[2];\n if (!this.table.options.customConfig) {\n this.table.options.customConfig = {};\n }\n this.table.options.customConfig.cancelSelectCellHook = (e: any) => {\n const target = e.target;\n if (target.isDescendantsOf(this.seriesNumberComponent)) {\n return false;\n }\n };\n\n // const rowSeriesNumberColWidth = this.seriesNumberComponent.rowSeriesNumberWidth;\n // const colSeriesNumberRowHeight = this.seriesNumberComponent.colSeriesNumberHeight;\n // // this.table.scenegraph.stage.defaultLayer.setAttributes({\n // // x: rowSeriesNumberColWidth,\n // // y: colSeriesNumberRowHeight,\n // // width: 1700,\n // // height: 500,\n // // clip: true\n // // });\n // this.table.setTranslate(colSeriesNumberRowHeight, rowSeriesNumberColWidth);\n this.seriesNumberComponent.setAttributes({\n rowCount: this.table.rowCount,\n colCount: this.table.colCount,\n frozenRowCount: this.table.frozenRowCount,\n frozenColCount: this.table.frozenColCount,\n rightFrozenColCount: this.table.rightFrozenColCount,\n bottomFrozenRowCount: this.table.bottomFrozenRowCount\n });\n // add到layer上时会触发组件的render方法\n const newLayer = this.table.scenegraph.stage.createLayer();\n newLayer.appendChild(this.seriesNumberComponent);\n newLayer.setAttributes({ pickable: false });\n this.componentLayoutLayer = newLayer;\n\n // if (this.pluginOptions.syncRowHeightFromTable) {\n this.syncRowHeightToComponent();\n // }\n // if (this.pluginOptions.syncColWidthFromTable) {\n this.syncColWidthToComponent();\n // }\n\n this.listenTableEvents();\n }\n }\n private handleScroll = () => {\n //节流处理,避免滚动时频繁触发\n if (this.scrollTimer) {\n clearTimeout(this.scrollTimer);\n this.scrollTimer = null;\n }\n this.scrollTimer = setTimeout(() => {\n this.scrollTimer = null;\n this.syncScrollToComponent();\n }, 10); // 优化: 由5ms改为10ms,减少频繁触发\n };\n\n private handleAfterSort = () => {\n this.syncScrollToComponent();\n };\n\n private handleSelectedChanged = (e: any) => {\n this.seriesNumberComponent.removeAllSelectedIndexs();\n const selectRange = this.table.stateManager.select.ranges;\n\n const rowSelectedIndexs = [];\n const colSelectedIndexs = [];\n for (const range of selectRange) {\n const { row: rowStart, col: colStart } = range.start;\n const { row: rowEnd, col: colEnd } = range.end;\n rowSelectedIndexs.push({ startIndex: Math.min(rowStart, rowEnd), endIndex: Math.max(rowStart, rowEnd) });\n colSelectedIndexs.push({ startIndex: Math.min(colStart, colEnd), endIndex: Math.max(colStart, colEnd) });\n }\n this.seriesNumberComponent.addRowSelectedRanges(rowSelectedIndexs);\n this.seriesNumberComponent.addColSelectedRanges(colSelectedIndexs);\n if (this.table.stateManager.select.isSelectAll) {\n this.seriesNumberComponent.addCornderSelected();\n }\n\n this.seriesNumberComponent.renderSelectedIndexsState();\n };\n\n private handleResizeColumnEnd = (e: any) => {\n this.seriesNumberComponent.setAttribute('hover', true);\n };\n\n private handleResizeRowEnd = (e: any) => {\n this.seriesNumberComponent.setAttribute('hover', true);\n };\n\n listenTableEvents() {\n this.table.on(TABLE_EVENT_TYPE.SCROLL, this.handleScroll);\n this.table.on(TABLE_EVENT_TYPE.AFTER_SORT, this.handleAfterSort);\n this.table.on(TABLE_EVENT_TYPE.SELECTED_CHANGED, this.handleSelectedChanged);\n this.table.on(TABLE_EVENT_TYPE.RESIZE_COLUMN_END, this.handleResizeColumnEnd);\n this.table.on(TABLE_EVENT_TYPE.RESIZE_ROW_END, this.handleResizeRowEnd);\n }\n\n private handleSeriesNumberCellRightClick = (e: any) => {\n const { seriesNumberCell, event, isDragSelect } = e.detail;\n const isRow = seriesNumberCell.name.includes('row');\n const isCol = seriesNumberCell.name.includes('col');\n if (isRow) {\n const rowIndex = seriesNumberCell.id;\n //判断rowIndex整行是否被选中\n const isRowSelected = this.table.stateManager.select.ranges.some(range => {\n return (\n range.start.row <= rowIndex &&\n rowIndex <= range.end.row &&\n range.start.col === 0 &&\n range.end.col === this.table.colCount - 1\n );\n });\n //当前右键的行号 没有整行被选中,则进行选中\n if (!isRowSelected) {\n this.table.selectCells([\n { start: { row: rowIndex, col: 0 }, end: { row: rowIndex, col: this.table.colCount - 1 } }\n ]);\n }\n this.table.fireListeners(TABLE_EVENT_TYPE.PLUGIN_EVENT, {\n plugin: this,\n event: event,\n pluginEventInfo: {\n eventType: 'rightclick',\n rowIndex: rowIndex\n }\n });\n } else if (isCol) {\n const colIndex = seriesNumberCell.id;\n //判断colIndex整列是否被选中\n const isColSelected = this.table.stateManager.select.ranges.some(range => {\n return (\n range.start.col <= colIndex &&\n colIndex <= range.end.col &&\n range.start.row === 0 &&\n range.end.row === this.table.rowCount - 1\n );\n });\n //当前右键的列号 没有整列被选中,则进行选中\n if (!isColSelected) {\n this.table.selectCells([\n { start: { row: 0, col: colIndex }, end: { row: this.table.rowCount - 1, col: colIndex } }\n ]);\n }\n this.table.fireListeners(TABLE_EVENT_TYPE.PLUGIN_EVENT, {\n plugin: this,\n event: event,\n pluginEventInfo: {\n eventType: 'rightclick',\n colIndex: colIndex\n }\n });\n } else {\n //直接全选\n this.table.selectCells([\n { start: { row: 0, col: 0 }, end: { row: this.table.rowCount - 1, col: this.table.colCount - 1 } }\n ]);\n this.table.fireListeners(TABLE_EVENT_TYPE.PLUGIN_EVENT, {\n plugin: this,\n event: event,\n pluginEventInfo: {\n eventType: 'rightclick',\n isCorner: true\n }\n });\n }\n };\n\n private handleSeriesNumberCellHover = (e: any) => {\n this.table.scenegraph.renderSceneGraph();\n };\n\n private handleSeriesNumberCellUnHover = (e: any) => {\n this.table.scenegraph.renderSceneGraph();\n };\n\n private handleSeriesNumberCellClick = (e: any) => {\n const { seriesNumberCell, event, isDragSelect } = e.detail;\n const isCtrl = event.nativeEvent.ctrlKey || event.nativeEvent.metaKey;\n const isShift = event.nativeEvent.shiftKey;\n const isRow = seriesNumberCell.name.includes('row');\n const isCol = seriesNumberCell.name.includes('col');\n if (isRow) {\n this.table.stateManager.setSelectInline('row');\n const rowIndex = seriesNumberCell.id;\n\n if (isDragSelect) {\n this.table.dragSelectRow(rowIndex, isCtrl);\n } else {\n this.table.startDragSelectRow(rowIndex, isCtrl, isShift);\n }\n } else if (isCol) {\n this.table.stateManager.setSelectInline('col');\n const colIndex = seriesNumberCell.id;\n if (isDragSelect) {\n this.table.dragSelectCol(colIndex, isCtrl);\n } else {\n this.table.startDragSelectCol(colIndex, isCtrl, isShift);\n }\n } else {\n this.table.eventManager.deelTableSelectAll();\n }\n };\n\n private handleSeriesNumberCellClickUp = (e: any) => {\n this.table.stateManager.setSelectInline(false);\n this.table.endDragSelect();\n };\n\n private handleRowSeriesNumberWidthChange = (e: any) => {\n const rowSeriesNumberColWidth = this.seriesNumberComponent.rowSeriesNumberWidth;\n const colSeriesNumberRowHeight = this.seriesNumberComponent.colSeriesNumberHeight;\n this.table.setContentInsetXY(rowSeriesNumberColWidth, colSeriesNumberRowHeight);\n };\n\n private handleResizeColWidthStart = (e: any) => {\n this.seriesNumberComponent.setAttribute('hover', false);\n const { colIndex, event } = e.detail;\n this.table.stateManager.updateInteractionState(TYPES.InteractionState.grabing);\n this.table.stateManager.startResizeCol(colIndex, event.viewport.x, event.viewport.y);\n };\n\n private handleResizeRowHeightStart = (e: any) => {\n this.seriesNumberComponent.setAttribute('hover', false);\n const { rowIndex, event } = e.detail;\n this.table.stateManager.updateInteractionState(TYPES.InteractionState.grabing);\n this.table.stateManager.startResizeRow(rowIndex, event.viewport.x, event.viewport.y);\n };\n\n listenComponentEvents() {\n this.seriesNumberComponent.on(SeriesNumberEvent.seriesNumberCellRightClick, this.handleSeriesNumberCellRightClick);\n this.seriesNumberComponent.on(SeriesNumberEvent.seriesNumberCellHover, this.handleSeriesNumberCellHover);\n this.seriesNumberComponent.on(SeriesNumberEvent.seriesNumberCellUnHover, this.handleSeriesNumberCellUnHover);\n this.seriesNumberComponent.on(SeriesNumberEvent.seriesNumberCellClick, this.handleSeriesNumberCellClick);\n this.seriesNumberComponent.on(SeriesNumberEvent.seriesNumberCellClickUp, this.handleSeriesNumberCellClickUp);\n this.seriesNumberComponent.on(SeriesNumberEvent.rowSeriesNumberWidthChange, this.handleRowSeriesNumberWidthChange);\n this.seriesNumberComponent.on(SeriesNumberEvent.resizeColWidthStart, this.handleResizeColWidthStart);\n this.seriesNumberComponent.on(SeriesNumberEvent.resizeRowHeightStart, this.handleResizeRowHeightStart);\n }\n release() {\n // 清除组件资源\n if (this.componentLayoutLayer) {\n this.table.scenegraph.stage.removeLayer(this.componentLayoutLayer._uid);\n this.componentLayoutLayer = null;\n }\n\n // 清除定时器\n if (this.scrollTimer) {\n clearTimeout(this.scrollTimer);\n this.scrollTimer = null;\n }\n\n // 移除表格事件监听器\n if (this.table) {\n this.table.off(TABLE_EVENT_TYPE.SCROLL, this.handleScroll);\n this.table.off(TABLE_EVENT_TYPE.AFTER_SORT, this.handleAfterSort);\n this.table.off(TABLE_EVENT_TYPE.SELECTED_CHANGED, this.handleSelectedChanged);\n this.table.off(TABLE_EVENT_TYPE.RESIZE_COLUMN_END, this.handleResizeColumnEnd);\n this.table.off(TABLE_EVENT_TYPE.RESIZE_ROW_END, this.handleResizeRowEnd);\n }\n // 移除组件事件监听器\n if (this.seriesNumberComponent) {\n this.seriesNumberComponent.off(\n SeriesNumberEvent.seriesNumberCellRightClick,\n this.handleSeriesNumberCellRightClick\n );\n this.seriesNumberComponent.off(SeriesNumberEvent.seriesNumberCellHover, this.handleSeriesNumberCellHover);\n this.seriesNumberComponent.off(SeriesNumberEvent.seriesNumberCellUnHover, this.handleSeriesNumberCellUnHover);\n this.seriesNumberComponent.off(SeriesNumberEvent.seriesNumberCellClick, this.handleSeriesNumberCellClick);\n this.seriesNumberComponent.off(SeriesNumberEvent.seriesNumberCellClickUp, this.handleSeriesNumberCellClickUp);\n this.seriesNumberComponent.off(\n SeriesNumberEvent.rowSeriesNumberWidthChange,\n this.handleRowSeriesNumberWidthChange\n );\n this.seriesNumberComponent.off(SeriesNumberEvent.resizeColWidthStart, this.handleResizeColWidthStart);\n this.seriesNumberComponent.off(SeriesNumberEvent.resizeRowHeightStart, this.handleResizeRowHeightStart);\n\n // 释放组件资源\n this.seriesNumberComponent.release?.();\n this.seriesNumberComponent = null;\n }\n }\n\n syncRowHeightToComponent() {\n // console.log('syncRowHeightToComponent adjust', adjustStartRowIndex, adjustEndRowIndex);\n const { rowStart, rowEnd } = this.table.getBodyVisibleRowRange();\n const adjustStartRowIndex = Math.max(rowStart - 2, this.table.frozenRowCount);\n const adjustEndRowIndex = Math.min(rowEnd + 2, this.table.rowCount - 1);\n //判断seriesNumberComponent的冻结行数是否变化\n if (this.table.frozenRowCount !== this.seriesNumberComponent.getAttributes().frozenRowCount) {\n this.seriesNumberComponent.setAttributes({ frozenRowCount: this.table.frozenRowCount });\n }\n // 调用行序号重建接口\n this.seriesNumberComponent.recreateCellsToRowSeriesNumberGroup(adjustStartRowIndex, adjustEndRowIndex);\n // 更新冻结行序号单元格的y和height\n for (let i = 0; i < this.table.frozenRowCount; i++) {\n const cellGroup = this.table.scenegraph.getCell(0, i);\n const cell_attrs = cellGroup.getAttributes();\n this.seriesNumberComponent.setRowSeriesNumberCellAttributes(i, { y: cell_attrs.y, height: cell_attrs.height });\n }\n\n // 更新行序号单元格的y和height\n for (let i = adjustStartRowIndex; i <= adjustEndRowIndex; i++) {\n const cellGroup = this.table.scenegraph.getCell(0, i);\n const cell_attrs = cellGroup.getAttributes();\n this.seriesNumberComponent.setRowSeriesNumberCellAttributes(i, { y: cell_attrs.y, height: cell_attrs.height });\n }\n }\n syncColWidthToComponent() {\n const { colStart, colEnd } = this.table.getBodyVisibleColRange();\n const adjustStartColIndex = colStart;\n const adjustEndColIndex = Math.min(colEnd, this.table.scenegraph.proxy.colEnd);\n // console.log('syncColWidthToComponent adjust', adjustStartColIndex, adjustEndColIndex);\n\n //判断seriesNumberComponent的冻结列数是否变化\n if (this.table.frozenColCount !== this.seriesNumberComponent.getAttributes().frozenColCount) {\n this.seriesNumberComponent.setAttributes({ frozenColCount: this.table.frozenColCount });\n }\n // 调用列序号重建接口\n this.seriesNumberComponent.recreateCellsToColSeriesNumberGroup(adjustStartColIndex, adjustEndColIndex);\n //更新冻结列序号单元格的x和width\n for (let i = 0; i < this.table.frozenColCount; i++) {\n const colGroup = this.table.scenegraph.getColGroup(i);\n const cell_attrs = colGroup.getAttributes();\n this.seriesNumberComponent.setColSeriesNumberCellAttributes(i, { x: cell_attrs.x, width: cell_attrs.width });\n }\n // 更新列序号单元格的x和width\n for (let i = adjustStartColIndex; i <= adjustEndColIndex; i++) {\n const colGroup = this.table.scenegraph.getColGroup(i);\n const col_attrs = colGroup.getAttributes();\n this.seriesNumberComponent.setColSeriesNumberCellAttributes(i, { x: col_attrs.x, width: col_attrs.width });\n }\n }\n\n syncScrollToComponent() {\n //TODO 根据滚动方向,同步对应的序号组件的滚动\n this.syncRowHeightToComponent();\n this.syncColWidthToComponent();\n const y = this.table.scenegraph.bodyGroup.getAttributes().y;\n const x = this.table.scenegraph.bodyGroup.getAttributes().x;\n this.seriesNumberComponent.setRowSeriesNumberGroupAttributes({\n y: y + this.seriesNumberComponent.colSeriesNumberHeight\n });\n this.seriesNumberComponent.setColSeriesNumberGroupAttributes({\n x: x + this.seriesNumberComponent.rowSeriesNumberWidth\n });\n }\n // syncFrozenToComponent() {\n // const frozenRowCount = this.table.frozenRowCount;\n // const frozenColCount = this.table.frozenColCount;\n // this.seriesNumberComponent.setFrozenTopRow(frozenRowCount);\n // this.seriesNumberComponent.setFrozenLeftCol(frozenColCount);\n // }\n}\n"]}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AE,CAAC,GAAG,IAAI,CAAC,qBAAqB,CAAC,oBAAoB;SACvD,CAAC,CAAC;IACL,CAAC;CAOF;AApfD,8CAofC","file":"table-series-number.js","sourcesContent":["import type { BaseTableAPI, ListTable, ListTableConstructorOptions, plugins } from '@visactor/vtable';\nimport { TABLE_EVENT_TYPE, TYPES } from '@visactor/vtable';\nimport { TableSeriesNumber as VRenderTableSeriesNumber, SeriesNumberEvent } from '@visactor/vtable/es/vrender';\nimport type { ILayer, TableSeriesNumberAttributes } from '@visactor/vtable/es/vrender';\n\nexport type TableSeriesNumberOptions = {\n rowCount: number;\n colCount: number;\n // syncRowHeightFromTable?: boolean;\n // syncColWidthFromTable?: boolean;\n} & Partial<\n Pick<\n TableSeriesNumberAttributes,\n | 'rowSeriesNumberGenerate'\n | 'colSeriesNumberGenerate'\n | 'rowSeriesNumberCellStyle'\n | 'colSeriesNumberCellStyle'\n | 'cornerCellStyle'\n | 'colSeriesNumberHeight'\n | 'rowSeriesNumberWidth'\n >\n>;\nexport class TableSeriesNumber implements plugins.IVTablePlugin {\n id = `table-series-number`;\n name = 'Table Series Number';\n runTime = [\n TABLE_EVENT_TYPE.INITIALIZED,\n TABLE_EVENT_TYPE.BEFORE_INIT,\n TABLE_EVENT_TYPE.BEFORE_UPDATE_OPTION,\n TABLE_EVENT_TYPE.UPDATED\n ];\n pluginOptions: TableSeriesNumberOptions;\n table: ListTable;\n seriesNumberComponent: VRenderTableSeriesNumber;\n componentLayoutLayer: ILayer;\n lastCurrentRow: number = 0;\n lastCurrentCol: number = 0;\n startRowIndex: number = 0;\n scrollTimer: any;\n constructor(pluginOptions: TableSeriesNumberOptions) {\n this.pluginOptions = pluginOptions;\n this.seriesNumberComponent = new VRenderTableSeriesNumber({\n rowCount: pluginOptions.rowCount,\n colCount: pluginOptions.colCount,\n rowSeriesNumberWidth: pluginOptions.rowSeriesNumberWidth,\n colSeriesNumberHeight: pluginOptions.colSeriesNumberHeight,\n rowSeriesNumberGenerate: pluginOptions.rowSeriesNumberGenerate,\n colSeriesNumberGenerate: pluginOptions.colSeriesNumberGenerate,\n rowSeriesNumberCellStyle: Object.assign(\n {\n text: {\n fontSize: 14,\n fill: '#7A7A7A',\n pickable: false,\n textAlign: 'left',\n textBaseline: 'middle',\n padding: [2, 4, 2, 4]\n },\n borderLine: {\n stroke: '#D9D9D9',\n lineWidth: 1,\n pickable: false\n },\n bgColor: '#F9F9F9',\n states: {\n hover: {\n fill: '#c8daf6',\n opacity: 0.7\n },\n select: {\n fill: '#c8daf6',\n opacity: 1\n }\n }\n },\n pluginOptions.rowSeriesNumberCellStyle\n ),\n colSeriesNumberCellStyle: Object.assign(\n {\n text: {\n fontSize: 14,\n fill: '#7A7A7A',\n pickable: false,\n textAlign: 'left',\n textBaseline: 'middle',\n padding: [2, 4, 2, 4]\n },\n borderLine: {\n stroke: '#D9D9D9',\n lineWidth: 1,\n pickable: false\n },\n bgColor: '#F9F9F9',\n states: {\n hover: {\n fill: '#c8daf6',\n opacity: 0.7\n },\n select: {\n fill: '#c8daf6',\n opacity: 1\n }\n }\n },\n pluginOptions.colSeriesNumberCellStyle\n ),\n cornerCellStyle: Object.assign(\n {\n borderLine: {\n stroke: '#D9D9D9',\n lineWidth: 1,\n pickable: false\n },\n bgColor: '#F9F9F9',\n states: {\n hover: {\n fill: '#98C8A5',\n opacity: 0.7\n },\n select: {\n fill: '#98C8A5',\n opacity: 1\n }\n }\n },\n pluginOptions.cornerCellStyle\n )\n });\n this.listenComponentEvents();\n }\n\n run(...args: any[]) {\n // const eventArgs = args[0];\n const runTime = args[1];\n if (runTime === TABLE_EVENT_TYPE.BEFORE_INIT || runTime === TABLE_EVENT_TYPE.BEFORE_UPDATE_OPTION) {\n const eventArgs = args[0];\n const table: BaseTableAPI = args[2];\n this.table = table as ListTable;\n const options: ListTableConstructorOptions = eventArgs.options;\n const records = options.records ?? [];\n // //用空数据将records填充到pluginOptions.rowCount\n // for (let i = records.length; i < this.pluginOptions.rowCount; i++) {\n // records.push({});\n // }\n // 直接设置数组长度,不填充任何内容\n if (records.length < this.pluginOptions.rowCount) {\n records.length = this.pluginOptions.rowCount;\n }\n options.records = records;\n if (!options.columns) {\n options.columns = [];\n }\n for (let i = options.columns.length; i < this.pluginOptions.colCount; i++) {\n const columnFields = {\n field: i,\n title: ``\n };\n options.columns.push(columnFields);\n }\n const rowSeriesNumberColWidth = this.seriesNumberComponent.rowSeriesNumberWidth;\n const colSeriesNumberRowHeight = this.seriesNumberComponent.colSeriesNumberHeight;\n options.contentOffsetX = rowSeriesNumberColWidth;\n options.contentOffsetY = colSeriesNumberRowHeight;\n // if (options.columns.length < this.pluginOptions.colCount) {\n // options.columns.length = this.pluginOptions.colCount;\n // }\n } else if (runTime === TABLE_EVENT_TYPE.INITIALIZED || runTime === TABLE_EVENT_TYPE.UPDATED) {\n this.table = args[2];\n if (!this.table.options.customConfig) {\n this.table.options.customConfig = {};\n }\n this.table.options.customConfig.cancelSelectCellHook = (e: any) => {\n const target = e.target;\n if (target.isDescendantsOf(this.seriesNumberComponent)) {\n return false;\n }\n };\n\n // const rowSeriesNumberColWidth = this.seriesNumberComponent.rowSeriesNumberWidth;\n // const colSeriesNumberRowHeight = this.seriesNumberComponent.colSeriesNumberHeight;\n // // this.table.scenegraph.stage.defaultLayer.setAttributes({\n // // x: rowSeriesNumberColWidth,\n // // y: colSeriesNumberRowHeight,\n // // width: 1700,\n // // height: 500,\n // // clip: true\n // // });\n // this.table.setTranslate(colSeriesNumberRowHeight, rowSeriesNumberColWidth);\n this.seriesNumberComponent.setAttributes({\n rowCount: this.table.rowCount,\n colCount: this.table.colCount,\n frozenRowCount: this.table.frozenRowCount,\n frozenColCount: this.table.frozenColCount,\n rightFrozenColCount: this.table.rightFrozenColCount,\n bottomFrozenRowCount: this.table.bottomFrozenRowCount\n });\n // add到layer上时会触发组件的render方法\n const newLayer = this.table.scenegraph.stage.createLayer();\n newLayer.appendChild(this.seriesNumberComponent);\n newLayer.setAttributes({ pickable: false });\n this.componentLayoutLayer = newLayer;\n\n // if (this.pluginOptions.syncRowHeightFromTable) {\n this.syncRowHeightToComponent();\n // }\n // if (this.pluginOptions.syncColWidthFromTable) {\n this.syncColWidthToComponent();\n // }\n\n this.listenTableEvents();\n }\n }\n private handleScroll = () => {\n //节流处理,避免滚动时频繁触发\n if (this.scrollTimer) {\n clearTimeout(this.scrollTimer);\n this.scrollTimer = null;\n }\n this.scrollTimer = setTimeout(() => {\n this.scrollTimer = null;\n this.syncScrollToComponent();\n }, 10); // 优化: 由5ms改为10ms,减少频繁触发\n };\n\n private handleAfterSort = () => {\n this.syncScrollToComponent();\n };\n\n private handleSelectedChanged = (e: any) => {\n this.seriesNumberComponent.removeAllSelectedIndexs();\n const selectRange = this.table.stateManager.select.ranges;\n\n const rowSelectedIndexs = [];\n const colSelectedIndexs = [];\n for (const range of selectRange) {\n const { row: rowStart, col: colStart } = range.start;\n const { row: rowEnd, col: colEnd } = range.end;\n rowSelectedIndexs.push({ startIndex: Math.min(rowStart, rowEnd), endIndex: Math.max(rowStart, rowEnd) });\n colSelectedIndexs.push({ startIndex: Math.min(colStart, colEnd), endIndex: Math.max(colStart, colEnd) });\n }\n this.seriesNumberComponent.addRowSelectedRanges(rowSelectedIndexs);\n this.seriesNumberComponent.addColSelectedRanges(colSelectedIndexs);\n if (this.table.stateManager.select.isSelectAll) {\n this.seriesNumberComponent.addCornderSelected();\n }\n\n this.seriesNumberComponent.renderSelectedIndexsState();\n };\n\n private handleResizeColumnEnd = (e: any) => {\n this.seriesNumberComponent.setAttribute('hover', true);\n };\n\n private handleResizeRowEnd = (e: any) => {\n this.seriesNumberComponent.setAttribute('hover', true);\n };\n\n listenTableEvents() {\n this.table.on(TABLE_EVENT_TYPE.SCROLL, this.handleScroll);\n this.table.on(TABLE_EVENT_TYPE.AFTER_SORT, this.handleAfterSort);\n this.table.on(TABLE_EVENT_TYPE.SELECTED_CHANGED, this.handleSelectedChanged);\n this.table.on(TABLE_EVENT_TYPE.RESIZE_COLUMN_END, this.handleResizeColumnEnd);\n this.table.on(TABLE_EVENT_TYPE.RESIZE_ROW_END, this.handleResizeRowEnd);\n }\n\n private handleSeriesNumberCellRightClick = (e: any) => {\n const { seriesNumberCell, event, isDragSelect } = e.detail;\n const isRow = seriesNumberCell.name.includes('row');\n const isCol = seriesNumberCell.name.includes('col');\n if (isRow) {\n const rowIndex = seriesNumberCell.id;\n //判断rowIndex整行是否被选中\n const isRowSelected = this.table.stateManager.select.ranges.some(range => {\n return (\n range.start.row <= rowIndex &&\n rowIndex <= range.end.row &&\n range.start.col === 0 &&\n range.end.col === this.table.colCount - 1\n );\n });\n //当前右键的行号 没有整行被选中,则进行选中\n if (!isRowSelected) {\n this.table.selectCells([\n { start: { row: rowIndex, col: 0 }, end: { row: rowIndex, col: this.table.colCount - 1 } }\n ]);\n }\n this.table.fireListeners(TABLE_EVENT_TYPE.PLUGIN_EVENT, {\n plugin: this,\n event: event,\n pluginEventInfo: {\n eventType: 'rightclick',\n rowIndex: rowIndex\n }\n });\n } else if (isCol) {\n const colIndex = seriesNumberCell.id;\n //判断colIndex整列是否被选中\n const isColSelected = this.table.stateManager.select.ranges.some(range => {\n return (\n range.start.col <= colIndex &&\n colIndex <= range.end.col &&\n range.start.row === 0 &&\n range.end.row === this.table.rowCount - 1\n );\n });\n //当前右键的列号 没有整列被选中,则进行选中\n if (!isColSelected) {\n this.table.selectCells([\n { start: { row: 0, col: colIndex }, end: { row: this.table.rowCount - 1, col: colIndex } }\n ]);\n }\n this.table.fireListeners(TABLE_EVENT_TYPE.PLUGIN_EVENT, {\n plugin: this,\n event: event,\n pluginEventInfo: {\n eventType: 'rightclick',\n colIndex: colIndex\n }\n });\n } else {\n //直接全选\n this.table.selectCells([\n { start: { row: 0, col: 0 }, end: { row: this.table.rowCount - 1, col: this.table.colCount - 1 } }\n ]);\n this.table.fireListeners(TABLE_EVENT_TYPE.PLUGIN_EVENT, {\n plugin: this,\n event: event,\n pluginEventInfo: {\n eventType: 'rightclick',\n isCorner: true\n }\n });\n }\n };\n\n private handleSeriesNumberCellHover = (e: any) => {\n this.table.scenegraph.renderSceneGraph();\n };\n\n private handleSeriesNumberCellUnHover = (e: any) => {\n this.table.scenegraph.renderSceneGraph();\n };\n\n private handleSeriesNumberCellClick = (e: any) => {\n const { seriesNumberCell, event, isDragSelect } = e.detail;\n const ctrlMultiSelect = this.table.options.keyboardOptions?.ctrlMultiSelect ?? true;\n const shiftMultiSelect = this.table.options.keyboardOptions?.shiftMultiSelect ?? true;\n const enableCtrlSelectMode = (event.nativeEvent.ctrlKey || event.nativeEvent.metaKey) && ctrlMultiSelect;\n const enableShiftSelectMode = event.nativeEvent.shiftKey && shiftMultiSelect;\n const isRow = seriesNumberCell.name.includes('row');\n const isCol = seriesNumberCell.name.includes('col');\n if (isRow) {\n this.table.stateManager.setSelectInline('row');\n const rowIndex = seriesNumberCell.id;\n\n if (isDragSelect) {\n this.table.dragSelectRow(rowIndex, enableCtrlSelectMode);\n } else {\n this.table.startDragSelectRow(rowIndex, enableCtrlSelectMode, enableShiftSelectMode);\n }\n } else if (isCol) {\n this.table.stateManager.setSelectInline('col');\n const colIndex = seriesNumberCell.id;\n if (isDragSelect) {\n this.table.dragSelectCol(colIndex, enableCtrlSelectMode);\n } else {\n this.table.startDragSelectCol(colIndex, enableCtrlSelectMode, enableShiftSelectMode);\n }\n } else {\n this.table.eventManager.deelTableSelectAll();\n }\n };\n\n private handleSeriesNumberCellClickUp = (e: any) => {\n this.table.stateManager.setSelectInline(false);\n this.table.endDragSelect();\n };\n\n private handleRowSeriesNumberWidthChange = (e: any) => {\n const rowSeriesNumberColWidth = this.seriesNumberComponent.rowSeriesNumberWidth;\n const colSeriesNumberRowHeight = this.seriesNumberComponent.colSeriesNumberHeight;\n this.table.setContentInsetXY(rowSeriesNumberColWidth, colSeriesNumberRowHeight);\n };\n\n private handleResizeColWidthStart = (e: any) => {\n this.seriesNumberComponent.setAttribute('hover', false);\n const { colIndex, event } = e.detail;\n this.table.stateManager.updateInteractionState(TYPES.InteractionState.grabing);\n this.table.stateManager.startResizeCol(colIndex, event.viewport.x, event.viewport.y);\n };\n\n private handleResizeRowHeightStart = (e: any) => {\n this.seriesNumberComponent.setAttribute('hover', false);\n const { rowIndex, event } = e.detail;\n this.table.stateManager.updateInteractionState(TYPES.InteractionState.grabing);\n this.table.stateManager.startResizeRow(rowIndex, event.viewport.x, event.viewport.y);\n };\n\n listenComponentEvents() {\n this.seriesNumberComponent.on(SeriesNumberEvent.seriesNumberCellRightClick, this.handleSeriesNumberCellRightClick);\n this.seriesNumberComponent.on(SeriesNumberEvent.seriesNumberCellHover, this.handleSeriesNumberCellHover);\n this.seriesNumberComponent.on(SeriesNumberEvent.seriesNumberCellUnHover, this.handleSeriesNumberCellUnHover);\n this.seriesNumberComponent.on(SeriesNumberEvent.seriesNumberCellClick, this.handleSeriesNumberCellClick);\n this.seriesNumberComponent.on(SeriesNumberEvent.seriesNumberCellClickUp, this.handleSeriesNumberCellClickUp);\n this.seriesNumberComponent.on(SeriesNumberEvent.rowSeriesNumberWidthChange, this.handleRowSeriesNumberWidthChange);\n this.seriesNumberComponent.on(SeriesNumberEvent.resizeColWidthStart, this.handleResizeColWidthStart);\n this.seriesNumberComponent.on(SeriesNumberEvent.resizeRowHeightStart, this.handleResizeRowHeightStart);\n }\n release() {\n // 清除组件资源\n if (this.componentLayoutLayer) {\n this.table.scenegraph.stage.removeLayer(this.componentLayoutLayer._uid);\n this.componentLayoutLayer = null;\n }\n\n // 清除定时器\n if (this.scrollTimer) {\n clearTimeout(this.scrollTimer);\n this.scrollTimer = null;\n }\n\n // 移除表格事件监听器\n if (this.table) {\n this.table.off(TABLE_EVENT_TYPE.SCROLL, this.handleScroll);\n this.table.off(TABLE_EVENT_TYPE.AFTER_SORT, this.handleAfterSort);\n this.table.off(TABLE_EVENT_TYPE.SELECTED_CHANGED, this.handleSelectedChanged);\n this.table.off(TABLE_EVENT_TYPE.RESIZE_COLUMN_END, this.handleResizeColumnEnd);\n this.table.off(TABLE_EVENT_TYPE.RESIZE_ROW_END, this.handleResizeRowEnd);\n }\n // 移除组件事件监听器\n if (this.seriesNumberComponent) {\n this.seriesNumberComponent.off(\n SeriesNumberEvent.seriesNumberCellRightClick,\n this.handleSeriesNumberCellRightClick\n );\n this.seriesNumberComponent.off(SeriesNumberEvent.seriesNumberCellHover, this.handleSeriesNumberCellHover);\n this.seriesNumberComponent.off(SeriesNumberEvent.seriesNumberCellUnHover, this.handleSeriesNumberCellUnHover);\n this.seriesNumberComponent.off(SeriesNumberEvent.seriesNumberCellClick, this.handleSeriesNumberCellClick);\n this.seriesNumberComponent.off(SeriesNumberEvent.seriesNumberCellClickUp, this.handleSeriesNumberCellClickUp);\n this.seriesNumberComponent.off(\n SeriesNumberEvent.rowSeriesNumberWidthChange,\n this.handleRowSeriesNumberWidthChange\n );\n this.seriesNumberComponent.off(SeriesNumberEvent.resizeColWidthStart, this.handleResizeColWidthStart);\n this.seriesNumberComponent.off(SeriesNumberEvent.resizeRowHeightStart, this.handleResizeRowHeightStart);\n\n // 释放组件资源\n this.seriesNumberComponent.release?.();\n this.seriesNumberComponent = null;\n }\n }\n\n syncRowHeightToComponent() {\n // console.log('syncRowHeightToComponent adjust', adjustStartRowIndex, adjustEndRowIndex);\n const { rowStart, rowEnd } = this.table.getBodyVisibleRowRange();\n const adjustStartRowIndex = Math.max(rowStart - 2, this.table.frozenRowCount);\n const adjustEndRowIndex = Math.min(rowEnd + 2, this.table.rowCount - 1);\n //判断seriesNumberComponent的冻结行数是否变化\n if (this.table.frozenRowCount !== this.seriesNumberComponent.getAttributes().frozenRowCount) {\n this.seriesNumberComponent.setAttributes({ frozenRowCount: this.table.frozenRowCount });\n }\n // 调用行序号重建接口\n this.seriesNumberComponent.recreateCellsToRowSeriesNumberGroup(adjustStartRowIndex, adjustEndRowIndex);\n // 更新冻结行序号单元格的y和height\n for (let i = 0; i < this.table.frozenRowCount; i++) {\n const cellGroup = this.table.scenegraph.getCell(0, i);\n const cell_attrs = cellGroup.getAttributes();\n this.seriesNumberComponent.setRowSeriesNumberCellAttributes(i, { y: cell_attrs.y, height: cell_attrs.height });\n }\n\n // 更新行序号单元格的y和height\n for (let i = adjustStartRowIndex; i <= adjustEndRowIndex; i++) {\n const cellGroup = this.table.scenegraph.getCell(0, i);\n const cell_attrs = cellGroup.getAttributes();\n this.seriesNumberComponent.setRowSeriesNumberCellAttributes(i, { y: cell_attrs.y, height: cell_attrs.height });\n }\n }\n syncColWidthToComponent() {\n const { colStart, colEnd } = this.table.getBodyVisibleColRange();\n const adjustStartColIndex = colStart;\n const adjustEndColIndex = Math.min(colEnd, this.table.scenegraph.proxy.colEnd);\n // console.log('syncColWidthToComponent adjust', adjustStartColIndex, adjustEndColIndex);\n\n //判断seriesNumberComponent的冻结列数是否变化\n if (this.table.frozenColCount !== this.seriesNumberComponent.getAttributes().frozenColCount) {\n this.seriesNumberComponent.setAttributes({ frozenColCount: this.table.frozenColCount });\n }\n // 调用列序号重建接口\n this.seriesNumberComponent.recreateCellsToColSeriesNumberGroup(adjustStartColIndex, adjustEndColIndex);\n //更新冻结列序号单元格的x和width\n for (let i = 0; i < this.table.frozenColCount; i++) {\n const colGroup = this.table.scenegraph.getColGroup(i);\n const cell_attrs = colGroup.getAttributes();\n this.seriesNumberComponent.setColSeriesNumberCellAttributes(i, { x: cell_attrs.x, width: cell_attrs.width });\n }\n // 更新列序号单元格的x和width\n for (let i = adjustStartColIndex; i <= adjustEndColIndex; i++) {\n const colGroup = this.table.scenegraph.getColGroup(i);\n const col_attrs = colGroup.getAttributes();\n this.seriesNumberComponent.setColSeriesNumberCellAttributes(i, { x: col_attrs.x, width: col_attrs.width });\n }\n }\n\n syncScrollToComponent() {\n //TODO 根据滚动方向,同步对应的序号组件的滚动\n this.syncRowHeightToComponent();\n this.syncColWidthToComponent();\n const y = this.table.scenegraph.bodyGroup.getAttributes().y;\n const x = this.table.scenegraph.bodyGroup.getAttributes().x;\n this.seriesNumberComponent.setRowSeriesNumberGroupAttributes({\n y: y + this.seriesNumberComponent.colSeriesNumberHeight\n });\n this.seriesNumberComponent.setColSeriesNumberGroupAttributes({\n x: x + this.seriesNumberComponent.rowSeriesNumberWidth\n });\n }\n // syncFrozenToComponent() {\n // const frozenRowCount = this.table.frozenRowCount;\n // const frozenColCount = this.table.frozenColCount;\n // this.seriesNumberComponent.setFrozenTopRow(frozenRowCount);\n // this.seriesNumberComponent.setFrozenLeftCol(frozenColCount);\n // }\n}\n"]}
|
package/dist/vtable-plugins.js
CHANGED
|
@@ -14475,7 +14475,7 @@
|
|
|
14475
14475
|
event.stopPropagation();
|
|
14476
14476
|
event.preventDefault();
|
|
14477
14477
|
}
|
|
14478
|
-
else if (event.key === 'Delete') {
|
|
14478
|
+
else if (event.key === 'Delete' || event.key === 'Backspace') {
|
|
14479
14479
|
const selectCells = this.table.getSelectedCellInfos();
|
|
14480
14480
|
if (selectCells?.length > 0) {
|
|
14481
14481
|
deleteSelectRange(selectCells, this.table);
|
|
@@ -95130,28 +95130,30 @@ ${recordsStr}
|
|
|
95130
95130
|
};
|
|
95131
95131
|
handleSeriesNumberCellClick = (e) => {
|
|
95132
95132
|
const { seriesNumberCell, event, isDragSelect } = e.detail;
|
|
95133
|
-
const
|
|
95134
|
-
const
|
|
95133
|
+
const ctrlMultiSelect = this.table.options.keyboardOptions?.ctrlMultiSelect ?? true;
|
|
95134
|
+
const shiftMultiSelect = this.table.options.keyboardOptions?.shiftMultiSelect ?? true;
|
|
95135
|
+
const enableCtrlSelectMode = (event.nativeEvent.ctrlKey || event.nativeEvent.metaKey) && ctrlMultiSelect;
|
|
95136
|
+
const enableShiftSelectMode = event.nativeEvent.shiftKey && shiftMultiSelect;
|
|
95135
95137
|
const isRow = seriesNumberCell.name.includes('row');
|
|
95136
95138
|
const isCol = seriesNumberCell.name.includes('col');
|
|
95137
95139
|
if (isRow) {
|
|
95138
95140
|
this.table.stateManager.setSelectInline('row');
|
|
95139
95141
|
const rowIndex = seriesNumberCell.id;
|
|
95140
95142
|
if (isDragSelect) {
|
|
95141
|
-
this.table.dragSelectRow(rowIndex,
|
|
95143
|
+
this.table.dragSelectRow(rowIndex, enableCtrlSelectMode);
|
|
95142
95144
|
}
|
|
95143
95145
|
else {
|
|
95144
|
-
this.table.startDragSelectRow(rowIndex,
|
|
95146
|
+
this.table.startDragSelectRow(rowIndex, enableCtrlSelectMode, enableShiftSelectMode);
|
|
95145
95147
|
}
|
|
95146
95148
|
}
|
|
95147
95149
|
else if (isCol) {
|
|
95148
95150
|
this.table.stateManager.setSelectInline('col');
|
|
95149
95151
|
const colIndex = seriesNumberCell.id;
|
|
95150
95152
|
if (isDragSelect) {
|
|
95151
|
-
this.table.dragSelectCol(colIndex,
|
|
95153
|
+
this.table.dragSelectCol(colIndex, enableCtrlSelectMode);
|
|
95152
95154
|
}
|
|
95153
95155
|
else {
|
|
95154
|
-
this.table.startDragSelectCol(colIndex,
|
|
95156
|
+
this.table.startDragSelectCol(colIndex, enableCtrlSelectMode, enableShiftSelectMode);
|
|
95155
95157
|
}
|
|
95156
95158
|
}
|
|
95157
95159
|
else {
|