@visactor/vtable 1.19.3-alpha.0 → 1.19.4-alpha.0
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/core/BaseTable.js +1 -1
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/event/listener/table-group.js +29 -26
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/scenegraph/layout/update-col.js +9 -4
- package/cjs/scenegraph/layout/update-col.js.map +1 -1
- package/cjs/scenegraph/layout/update-row.js +11 -4
- package/cjs/scenegraph/layout/update-row.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +54 -37
- package/dist/vtable.min.js +1 -1
- package/es/core/BaseTable.js +1 -1
- package/es/core/BaseTable.js.map +1 -1
- package/es/event/listener/table-group.js +29 -26
- package/es/event/listener/table-group.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/scenegraph/layout/update-col.js +8 -3
- package/es/scenegraph/layout/update-col.js.map +1 -1
- package/es/scenegraph/layout/update-row.js +9 -2
- package/es/scenegraph/layout/update-row.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/scenegraph/layout/update-col.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG5C,4CAAyC;AACzC,8DAA0D;AAE1D,4DAA2D;AAE3D,8CAAmE;AAKnE,SAAgB,SAAS,CACvB,WAA0B,EAC1B,QAAuB,EACvB,WAA0B,EAC1B,KAAmB;;IAEnB,IAAI,IAAA,+BAAkB,EAAC,KAAK,CAAC,EAAE;QAC7B,IAAA,2BAAc,EAAC,KAAK,CAAC,CAAC;KACvB;IAED,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC;IAE/B,MAAM,UAAU,G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G,GAAG,GAAG,CAAC;YACpB,SAAS,CAAC,GAAG,GAAG,GAAG,CAAC;YACpB,SAAS,CAAC,UAAU,GAAG,IAAI,CAAC;YAC5B,KAAK,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;SAC9B;IACH,CAAC;AACH,CAAC","file":"update-col.js","sourcesContent":["import { isNumber } from '@visactor/vutils';\nimport type { CellAddress } from '../../ts-types';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport { Group } from '../graphic/group';\nimport { updateCell } from '../group-creater/cell-helper';\nimport type { Scenegraph } from '../scenegraph';\nimport { getCellMergeInfo } from '../utils/get-cell-merge';\nimport type { IGroup } from './../../vrender';\nimport { checkHaveTextStick, resetTextStick } from '../stick-text';\n\n/**\n * add and remove rows in scenegraph\n */\nexport function updateCol(\n removeCells: CellAddress[],\n addCells: CellAddress[],\n updateCells: CellAddress[],\n table: BaseTableAPI\n) {\n if (checkHaveTextStick(table)) {\n resetTextStick(table); // reset text stick\n }\n\n const scene = table.scenegraph;\n // deduplication\n const removeCols = deduplication(removeCells.map(cell => cell.col)).sort((a, b) => b - a);\n const addCols = deduplication(addCells.map(cell => cell.col)).sort((a, b) => a - b);\n const updateCols = deduplication(updateCells.map(cell => cell.col)).sort((a, b) => a - b);\n\n // remove cells\n removeCols.forEach(col => {\n removeCol(col, scene);\n });\n\n const colWidthsMap = table.colWidthsMap;\n removeCols.forEach(col => {\n colWidthsMap.delAndReorder(col);\n });\n\n if (removeCols.length) {\n resetColNumber(scene);\n }\n\n scene.table._clearColRangeWidthsMap();\n\n // add cells\n let updateAfter: number;\n addCols.forEach(col => {\n const needUpdateAfter = addCol(col, scene);\n resetColNumber(scene);\n updateAfter = updateAfter ?? needUpdateAfter;\n colWidthsMap.addAndReorder(col);\n });\n\n // reset attribute y and col number in CellGroup\n // const newTotalHeight = resetColNumberAndY(scene);\n resetColNumberAndX(scene);\n // add cells\n updateCols.forEach(col => {\n for (let row = 0; row < table.rowCount; row++) {\n // updateColAttr(col, scene);\n const mergeInfo = getCellMergeInfo(scene.table, col, row);\n if (mergeInfo) {\n for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) {\n for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) {\n updateCell(col, row, scene.table, false);\n }\n }\n } else {\n updateCell(col, row, scene.table, false);\n }\n }\n });\n\n if (isNumber(updateAfter)) {\n for (\n let col = updateAfter;\n col < Math.max(table.colCount, table.internalProps._oldColCount ?? table.colCount);\n col++\n ) {\n for (let row = 0; row < Math.max(table.rowCount, table.internalProps._oldRowCount ?? table.rowCount); row++) {\n const cellGroup = scene.highPerformanceGetCell(col, row, true);\n cellGroup && (cellGroup.needUpdate = true);\n }\n }\n scene.proxy.colUpdatePos = updateAfter;\n }\n if (addCols.length) {\n if (!isNumber(updateAfter)) {\n const minCol = Math.min(...addCols);\n scene.proxy.colUpdatePos = minCol;\n }\n scene.proxy.colUpdateDirection = 'left';\n scene.proxy.updateColGroups(scene.proxy.screenColCount * 2);\n updateRightFrozeCellGroups();\n scene.proxy.progress();\n } else if (removeCols.length) {\n scene.proxy.updateColGroups(scene.proxy.screenColCount * 2);\n updateRightFrozeCellGroups();\n scene.proxy.progress();\n }\n\n // update table size\n const newTotalWidth = table.getColsWidth(table.frozenColCount, table.colCount - 1);\n scene.updateContainerWidth(scene.table.frozenColCount, newTotalWidth - scene.bodyGroup.attribute.width);\n\n function updateRightFrozeCellGroups() {\n if (\n addCols?.[addCols?.length - 1] >= table.colCount - table.rightFrozenColCount ||\n updateCols?.[updateCols?.length - 1] >= table.colCount - table.rightFrozenColCount ||\n removeCols?.[0] >= table.colCount - table.rightFrozenColCount\n ) {\n for (let col = table.colCount - table.rightFrozenColCount; col < table.colCount; col++) {\n for (let row = 0; row < table.rowCount; row++) {\n const cellGroup = scene.highPerformanceGetCell(col, row, true);\n cellGroup && (cellGroup.needUpdate = true);\n }\n }\n scene.proxy.updateRightFrozenCellGroups();\n }\n }\n}\n\nfunction removeCol(col: number, scene: Scenegraph) {\n const proxy = scene.proxy;\n // removeCellGroup(col, scene);\n //先考虑非表头部分删除情况\n if (col >= scene.table.rowHeaderLevelCount) {\n if (col >= scene.table.colCount - scene.table.rightFrozenColCount) {\n // 如果是删除的右侧固定列 这里不做真正的删除,只需要后面将相应列做更新\n // scene.bodyGroup.removeChild(scene.bodyGroup.lastChild as any);\n // scene.bottomFrozenGroup.removeChild(scene.bottomFrozenGroup.lastChild as any);\n } else {\n const colGroup = scene.getColGroup(col, false);\n if (colGroup && colGroup.parent === scene.bodyGroup) {\n scene.bodyGroup.removeChild(colGroup);\n }\n const bottomColGroup = scene.getColGroupInBottom(col);\n if (bottomColGroup && bottomColGroup.parent === scene.bottomFrozenGroup) {\n scene.bottomFrozenGroup.removeChild(bottomColGroup);\n }\n const headerColGroup = scene.getColGroup(col, true);\n if (headerColGroup && headerColGroup.parent === scene.colHeaderGroup) {\n scene.colHeaderGroup.removeChild(headerColGroup);\n }\n }\n }\n\n // TODO 需要整体更新proxy的状态\n if (col >= proxy.colStart && col <= proxy.colEnd) {\n proxy.colEnd--;\n proxy.currentCol--;\n }\n proxy.bodyRightCol--;\n // proxy.totalCol--;\n const totalActualBodyColCount = Math.min(proxy.colLimit, proxy.bodyRightCol - proxy.bodyLeftCol + 1); // 渐进加载总col数量\n proxy.totalActualBodyColCount = totalActualBodyColCount;\n proxy.totalCol = proxy.colStart + totalActualBodyColCount - 1; // 目标渐进完成的col\n}\n\nfunction addCol(col: number, scene: Scenegraph) {\n const proxy = scene.proxy;\n proxy.bodyRightCol++;\n // proxy.totalCol++;\n const totalActualBodyColCount = Math.min(proxy.colLimit, proxy.bodyRightCol - proxy.bodyLeftCol + 1); // 渐进加载总col数量\n proxy.totalActualBodyColCount = totalActualBodyColCount;\n proxy.totalCol = proxy.colStart + totalActualBodyColCount - 1; // 目标渐进完成的col\n\n if (col < proxy.colStart) {\n return undefined;\n } else if (col > proxy.colEnd) {\n if (proxy.colEnd - proxy.colStart + 1 < proxy.colLimit) {\n // can add col\n proxy.colEnd++;\n proxy.currentCol++;\n\n addColGroup(col, scene);\n return col;\n }\n return undefined;\n }\n if (proxy.colEnd - proxy.colStart + 1 < proxy.colLimit) {\n // can add col\n proxy.colEnd++;\n proxy.currentCol++;\n\n addColGroup(col, scene);\n return col;\n }\n return col;\n}\n\n// array deduplication\nfunction deduplication(array: number[]) {\n const result = [];\n for (let i = 0; i < array.length; i++) {\n if (result.indexOf(array[i]) === -1) {\n result.push(array[i]);\n }\n }\n return result;\n}\n\nfunction resetColNumber(scene: Scenegraph) {\n let colIndex = scene.bodyColStart;\n scene.bodyGroup.forEachChildren((colGroup: Group) => {\n colGroup.col = colIndex;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup);\n });\n colIndex++;\n });\n\n colIndex = scene.bodyColStart;\n scene.colHeaderGroup.forEachChildren((colGroup: Group) => {\n colGroup.col = colIndex;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup);\n });\n colIndex++;\n });\n\n colIndex = scene.bodyColStart;\n scene.bottomFrozenGroup.forEachChildren((colGroup: Group) => {\n colGroup.col = colIndex;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup);\n });\n colIndex++;\n });\n function processCell(cellGroup: Group) {\n cellGroup.col = colIndex;\n const merge = getCellMergeInfo(scene.table, cellGroup.col, cellGroup.row);\n if (merge) {\n cellGroup.mergeStartCol = merge.start.col;\n cellGroup.mergeStartCol = merge.start.col;\n cellGroup.mergeEndCol = merge.end.col;\n cellGroup.mergeEndCol = merge.end.col;\n }\n\n if (cellGroup.role !== 'cell') {\n return;\n }\n }\n}\n\nfunction resetColNumberAndX(scene: Scenegraph) {\n let colIndex = scene.bodyColStart;\n let x = scene.getCellGroupX(colIndex);\n scene.bodyGroup.forEachChildren((colGroup: Group) => {\n colGroup.col = colIndex;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup);\n });\n colGroup.setAttribute('x', x);\n x += colGroup.attribute.width;\n colIndex++;\n });\n\n colIndex = scene.bodyColStart;\n x = scene.getCellGroupX(colIndex);\n scene.colHeaderGroup.forEachChildren((colGroup: Group) => {\n colGroup.col = colIndex;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup);\n });\n colGroup.setAttribute('x', x);\n x += colGroup.attribute.width;\n colIndex++;\n });\n\n colIndex = scene.bodyColStart;\n x = scene.getCellGroupX(colIndex);\n scene.bottomFrozenGroup.forEachChildren((colGroup: Group) => {\n colGroup.col = colIndex;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup);\n });\n colGroup.setAttribute('x', x);\n x += colGroup.attribute.width;\n colIndex++;\n });\n colIndex = scene.table.colCount - scene.table.rightFrozenColCount;\n x = 0;\n scene.rightFrozenGroup.forEachChildren((colGroup: Group) => {\n colGroup.col = colIndex;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup);\n });\n colGroup.setAttribute('x', x);\n x += colGroup.attribute.width;\n colIndex++;\n });\n\n colIndex = scene.table.colCount - scene.table.rightFrozenColCount;\n x = 0;\n scene.rightTopCornerGroup.forEachChildren((colGroup: Group) => {\n colGroup.col = colIndex;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup);\n });\n colGroup.setAttribute('x', x);\n x += colGroup.attribute.width;\n colIndex++;\n });\n\n colIndex = scene.table.colCount - scene.table.rightFrozenColCount;\n x = 0;\n scene.rightBottomCornerGroup.forEachChildren((colGroup: Group) => {\n colGroup.col = colIndex;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup);\n });\n colGroup.setAttribute('x', x);\n x += colGroup.attribute.width;\n colIndex++;\n });\n function processCell(cellGroup: Group) {\n cellGroup.col = colIndex;\n const merge = getCellMergeInfo(scene.table, cellGroup.col, cellGroup.row);\n if (merge) {\n cellGroup.mergeStartCol = merge.start.col;\n cellGroup.mergeStartCol = merge.start.col;\n cellGroup.mergeEndCol = merge.end.col;\n cellGroup.mergeEndCol = merge.end.col;\n }\n\n if (cellGroup.role !== 'cell') {\n return;\n }\n }\n}\n\nfunction addColGroup(col: number, scene: Scenegraph) {\n if (scene.colHeaderGroup && scene.table.columnHeaderLevelCount > 0) {\n const columnGroup = new Group({\n x: 0,\n y: 0,\n width: scene.table.getColWidth(col),\n height: 0,\n clip: false,\n pickable: false\n });\n columnGroup.role = 'column';\n columnGroup.col = col;\n\n const colAfter = scene.getColGroup(col, true);\n if (colAfter) {\n scene.colHeaderGroup.insertBefore(columnGroup, colAfter);\n } else {\n scene.colHeaderGroup.appendChild(columnGroup);\n }\n generateCellGroup(columnGroup, col, 0, scene.table.columnHeaderLevelCount - 1);\n }\n\n if (scene.bodyGroup) {\n const columnGroup = new Group({\n x: 0,\n y: 0,\n width: scene.table.getColWidth(col),\n height: 0,\n clip: false,\n pickable: false\n });\n columnGroup.role = 'column';\n columnGroup.col = col;\n\n const colAfter = scene.getColGroup(col, false);\n if (colAfter) {\n scene.bodyGroup.insertBefore(columnGroup, colAfter);\n } else {\n scene.bodyGroup.appendChild(columnGroup);\n }\n generateCellGroup(columnGroup, col, scene.bodyRowStart, scene.bodyRowEnd);\n }\n if (scene.bottomFrozenGroup && scene.table.bottomFrozenRowCount > 0) {\n const columnGroup = new Group({\n x: 0,\n y: 0,\n width: scene.table.getColWidth(col),\n height: 0,\n clip: false,\n pickable: false\n });\n columnGroup.role = 'column';\n columnGroup.col = col;\n\n const colAfter = scene.getColGroupInBottom(col);\n if (colAfter) {\n scene.bottomFrozenGroup.insertBefore(columnGroup, colAfter);\n } else {\n scene.bottomFrozenGroup.appendChild(columnGroup);\n }\n\n generateCellGroup(\n columnGroup,\n col,\n scene.table.rowCount - scene.table.bottomFrozenRowCount,\n scene.table.rowCount - 1\n );\n }\n\n function generateCellGroup(group: IGroup, col: number, rowStart: number, rowEnd: number) {\n for (let row = rowStart; row <= rowEnd; row++) {\n // create cellGroup\n // const cellGroup = updateCell(col, row, scene.table, true);\n const cellGroup = new Group({\n x: 0,\n y: 0,\n width: scene.table.getColWidth(col),\n height: scene.table.getRowHeight(row)\n });\n cellGroup.role = 'cell';\n cellGroup.col = col;\n cellGroup.row = row;\n cellGroup.needUpdate = true;\n group.appendChild(cellGroup);\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/scenegraph/layout/update-col.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG5C,4CAAyC;AACzC,8DAA0D;AAE1D,4DAA2D;AAE3D,8CAAmE;AAKnE,SAAgB,SAAS,CACvB,WAA0B,EAC1B,QAAuB,EACvB,WAA0B,EAC1B,KAAmB;;IAEnB,IAAI,IAAA,+BAAkB,EAAC,KAAK,CAAC,EAAE;QAC7B,IAAA,2BAAc,EAAC,KAAK,CAAC,CAAC;KACvB;IAED,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC;IAE/B,MAAM,UAAU,GAAG,aAAa,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1F,MAAM,OAAO,GAAG,aAAa,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACpF,MAAM,UAAU,GAAG,aAAa,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAG1F,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;QACvB,SAAS,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACxB,CA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AAC,WAAW,EAAE,QAAQ,CAAC,CAAC;SAC7D;aAAM;YACL,KAAK,CAAC,iBAAiB,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;SAClD;QAED,iBAAiB,CACf,WAAW,EACX,GAAG,EACH,KAAK,CAAC,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,oBAAoB,EACvD,KAAK,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,CACzB,CAAC;KACH;IAED,SAAS,iBAAiB,CAAC,KAAa,EAAE,GAAW,EAAE,QAAgB,EAAE,MAAc;QACrF,KAAK,IAAI,GAAG,GAAG,QAAQ,EAAE,GAAG,IAAI,MAAM,EAAE,GAAG,EAAE,EAAE;YAG7C,MAAM,SAAS,GAAG,IAAI,aAAK,CAAC;gBAC1B,CAAC,EAAE,CAAC;gBACJ,CAAC,EAAE,CAAC;gBACJ,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC;gBACnC,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC;aACtC,CAAC,CAAC;YACH,SAAS,CAAC,IAAI,GAAG,MAAM,CAAC;YACxB,SAAS,CAAC,GAAG,GAAG,GAAG,CAAC;YACpB,SAAS,CAAC,GAAG,GAAG,GAAG,CAAC;YACpB,SAAS,CAAC,UAAU,GAAG,IAAI,CAAC;YAC5B,KAAK,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;SAC9B;IACH,CAAC;AACH,CAAC","file":"update-col.js","sourcesContent":["import { isNumber } from '@visactor/vutils';\nimport type { CellAddress } from '../../ts-types';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport { Group } from '../graphic/group';\nimport { updateCell } from '../group-creater/cell-helper';\nimport type { Scenegraph } from '../scenegraph';\nimport { getCellMergeInfo } from '../utils/get-cell-merge';\nimport type { IGroup } from './../../vrender';\nimport { checkHaveTextStick, resetTextStick } from '../stick-text';\n\n/**\n * add and remove rows in scenegraph\n */\nexport function updateCol(\n removeCells: CellAddress[],\n addCells: CellAddress[],\n updateCells: CellAddress[],\n table: BaseTableAPI\n) {\n if (checkHaveTextStick(table)) {\n resetTextStick(table); // reset text stick\n }\n\n const scene = table.scenegraph;\n // deduplication\n const removeCols = deduplication(removeCells.map(cell => cell.col)).sort((a, b) => b - a);\n const addCols = deduplication(addCells.map(cell => cell.col)).sort((a, b) => a - b);\n const updateCols = deduplication(updateCells.map(cell => cell.col)).sort((a, b) => a - b);\n\n // remove cells\n removeCols.forEach(col => {\n removeCol(col, scene);\n });\n\n const colWidthsMap = table.colWidthsMap;\n removeCols.forEach(col => {\n colWidthsMap.delAndReorder(col);\n });\n\n if (removeCols.length) {\n resetColNumber(scene);\n }\n\n scene.table._clearColRangeWidthsMap();\n\n // add cells\n let updateAfter: number;\n addCols.forEach(col => {\n const needUpdateAfter = addCol(col, scene);\n resetColNumber(scene);\n updateAfter = updateAfter ?? needUpdateAfter;\n colWidthsMap.addAndReorder(col);\n });\n\n // reset attribute y and col number in CellGroup\n // const newTotalHeight = resetColNumberAndY(scene);\n resetColNumberAndX(scene);\n //下面合并单元格情况有重复调用updateCell问题,需要优化。用这个变量记录已经处理过的合并单元格位置,避免重复处理。\n const batchMergePos = new Set<string>();\n // add cells\n updateCols.forEach(col => {\n for (let row = 0; row < table.rowCount; row++) {\n // updateColAttr(col, scene);\n const mergeInfo = getCellMergeInfo(scene.table, col, row);\n if (mergeInfo) {\n for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) {\n for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) {\n const key = `${col}-${row}`;\n if (!batchMergePos.has(key)) {\n updateCell(col, row, scene.table, false);\n batchMergePos.add(key);\n }\n }\n }\n } else {\n updateCell(col, row, scene.table, false);\n }\n }\n });\n\n if (isNumber(updateAfter)) {\n for (\n let col = updateAfter;\n col < Math.max(table.colCount, table.internalProps._oldColCount ?? table.colCount);\n col++\n ) {\n for (let row = 0; row < Math.max(table.rowCount, table.internalProps._oldRowCount ?? table.rowCount); row++) {\n const cellGroup = scene.highPerformanceGetCell(col, row, true);\n cellGroup && (cellGroup.needUpdate = true);\n }\n }\n scene.proxy.colUpdatePos = updateAfter;\n }\n if (addCols.length) {\n if (!isNumber(updateAfter)) {\n const minCol = Math.min(...addCols);\n scene.proxy.colUpdatePos = minCol;\n }\n scene.proxy.colUpdateDirection = 'left';\n scene.proxy.updateColGroups(scene.proxy.screenColCount * 2);\n updateRightFrozeCellGroups();\n scene.proxy.progress();\n } else if (removeCols.length) {\n scene.proxy.updateColGroups(scene.proxy.screenColCount * 2);\n updateRightFrozeCellGroups();\n scene.proxy.progress();\n }\n\n // update table size\n const newTotalWidth = table.getColsWidth(table.frozenColCount, table.colCount - 1);\n scene.updateContainerWidth(scene.table.frozenColCount, newTotalWidth - scene.bodyGroup.attribute.width);\n\n function updateRightFrozeCellGroups() {\n if (\n addCols?.[addCols?.length - 1] >= table.colCount - table.rightFrozenColCount ||\n updateCols?.[updateCols?.length - 1] >= table.colCount - table.rightFrozenColCount ||\n removeCols?.[0] >= table.colCount - table.rightFrozenColCount\n ) {\n for (let col = table.colCount - table.rightFrozenColCount; col < table.colCount; col++) {\n for (let row = 0; row < table.rowCount; row++) {\n const cellGroup = scene.highPerformanceGetCell(col, row, true);\n cellGroup && (cellGroup.needUpdate = true);\n }\n }\n scene.proxy.updateRightFrozenCellGroups();\n }\n }\n}\n\nfunction removeCol(col: number, scene: Scenegraph) {\n const proxy = scene.proxy;\n // removeCellGroup(col, scene);\n //先考虑非表头部分删除情况\n if (col >= scene.table.rowHeaderLevelCount) {\n if (col >= scene.table.colCount - scene.table.rightFrozenColCount) {\n // 如果是删除的右侧固定列 这里不做真正的删除,只需要后面将相应列做更新\n // scene.bodyGroup.removeChild(scene.bodyGroup.lastChild as any);\n // scene.bottomFrozenGroup.removeChild(scene.bottomFrozenGroup.lastChild as any);\n } else {\n const colGroup = scene.getColGroup(col, false);\n if (colGroup && colGroup.parent === scene.bodyGroup) {\n scene.bodyGroup.removeChild(colGroup);\n }\n const bottomColGroup = scene.getColGroupInBottom(col);\n if (bottomColGroup && bottomColGroup.parent === scene.bottomFrozenGroup) {\n scene.bottomFrozenGroup.removeChild(bottomColGroup);\n }\n const headerColGroup = scene.getColGroup(col, true);\n if (headerColGroup && headerColGroup.parent === scene.colHeaderGroup) {\n scene.colHeaderGroup.removeChild(headerColGroup);\n }\n }\n }\n\n // TODO 需要整体更新proxy的状态\n if (col >= proxy.colStart && col <= proxy.colEnd) {\n proxy.colEnd--;\n proxy.currentCol--;\n }\n proxy.bodyRightCol--;\n // proxy.totalCol--;\n const totalActualBodyColCount = Math.min(proxy.colLimit, proxy.bodyRightCol - proxy.bodyLeftCol + 1); // 渐进加载总col数量\n proxy.totalActualBodyColCount = totalActualBodyColCount;\n proxy.totalCol = proxy.colStart + totalActualBodyColCount - 1; // 目标渐进完成的col\n}\n\nfunction addCol(col: number, scene: Scenegraph) {\n const proxy = scene.proxy;\n proxy.bodyRightCol++;\n // proxy.totalCol++;\n const totalActualBodyColCount = Math.min(proxy.colLimit, proxy.bodyRightCol - proxy.bodyLeftCol + 1); // 渐进加载总col数量\n proxy.totalActualBodyColCount = totalActualBodyColCount;\n proxy.totalCol = proxy.colStart + totalActualBodyColCount - 1; // 目标渐进完成的col\n\n if (col < proxy.colStart) {\n return undefined;\n } else if (col > proxy.colEnd) {\n if (proxy.colEnd - proxy.colStart + 1 < proxy.colLimit) {\n // can add col\n proxy.colEnd++;\n proxy.currentCol++;\n\n addColGroup(col, scene);\n return col;\n }\n return undefined;\n }\n if (proxy.colEnd - proxy.colStart + 1 < proxy.colLimit) {\n // can add col\n proxy.colEnd++;\n proxy.currentCol++;\n\n addColGroup(col, scene);\n return col;\n }\n return col;\n}\n\n// array deduplication\nfunction deduplication(array: number[]) {\n const result = [];\n for (let i = 0; i < array.length; i++) {\n if (result.indexOf(array[i]) === -1) {\n result.push(array[i]);\n }\n }\n return result;\n}\n\nfunction resetColNumber(scene: Scenegraph) {\n let colIndex = scene.bodyColStart;\n scene.bodyGroup.forEachChildren((colGroup: Group) => {\n colGroup.col = colIndex;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup);\n });\n colIndex++;\n });\n\n colIndex = scene.bodyColStart;\n scene.colHeaderGroup.forEachChildren((colGroup: Group) => {\n colGroup.col = colIndex;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup);\n });\n colIndex++;\n });\n\n colIndex = scene.bodyColStart;\n scene.bottomFrozenGroup.forEachChildren((colGroup: Group) => {\n colGroup.col = colIndex;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup);\n });\n colIndex++;\n });\n function processCell(cellGroup: Group) {\n cellGroup.col = colIndex;\n const merge = getCellMergeInfo(scene.table, cellGroup.col, cellGroup.row);\n if (merge) {\n cellGroup.mergeStartCol = merge.start.col;\n cellGroup.mergeStartCol = merge.start.col;\n cellGroup.mergeEndCol = merge.end.col;\n cellGroup.mergeEndCol = merge.end.col;\n }\n\n if (cellGroup.role !== 'cell') {\n return;\n }\n }\n}\n\nfunction resetColNumberAndX(scene: Scenegraph) {\n let colIndex = scene.bodyColStart;\n let x = scene.getCellGroupX(colIndex);\n scene.bodyGroup.forEachChildren((colGroup: Group) => {\n colGroup.col = colIndex;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup);\n });\n colGroup.setAttribute('x', x);\n x += colGroup.attribute.width;\n colIndex++;\n });\n\n colIndex = scene.bodyColStart;\n x = scene.getCellGroupX(colIndex);\n scene.colHeaderGroup.forEachChildren((colGroup: Group) => {\n colGroup.col = colIndex;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup);\n });\n colGroup.setAttribute('x', x);\n x += colGroup.attribute.width;\n colIndex++;\n });\n\n colIndex = scene.bodyColStart;\n x = scene.getCellGroupX(colIndex);\n scene.bottomFrozenGroup.forEachChildren((colGroup: Group) => {\n colGroup.col = colIndex;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup);\n });\n colGroup.setAttribute('x', x);\n x += colGroup.attribute.width;\n colIndex++;\n });\n colIndex = scene.table.colCount - scene.table.rightFrozenColCount;\n x = 0;\n scene.rightFrozenGroup.forEachChildren((colGroup: Group) => {\n colGroup.col = colIndex;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup);\n });\n colGroup.setAttribute('x', x);\n x += colGroup.attribute.width;\n colIndex++;\n });\n\n colIndex = scene.table.colCount - scene.table.rightFrozenColCount;\n x = 0;\n scene.rightTopCornerGroup.forEachChildren((colGroup: Group) => {\n colGroup.col = colIndex;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup);\n });\n colGroup.setAttribute('x', x);\n x += colGroup.attribute.width;\n colIndex++;\n });\n\n colIndex = scene.table.colCount - scene.table.rightFrozenColCount;\n x = 0;\n scene.rightBottomCornerGroup.forEachChildren((colGroup: Group) => {\n colGroup.col = colIndex;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup);\n });\n colGroup.setAttribute('x', x);\n x += colGroup.attribute.width;\n colIndex++;\n });\n function processCell(cellGroup: Group) {\n cellGroup.col = colIndex;\n const merge = getCellMergeInfo(scene.table, cellGroup.col, cellGroup.row);\n if (merge) {\n cellGroup.mergeStartCol = merge.start.col;\n cellGroup.mergeStartCol = merge.start.col;\n cellGroup.mergeEndCol = merge.end.col;\n cellGroup.mergeEndCol = merge.end.col;\n }\n\n if (cellGroup.role !== 'cell') {\n return;\n }\n }\n}\n\nfunction addColGroup(col: number, scene: Scenegraph) {\n if (scene.colHeaderGroup && scene.table.columnHeaderLevelCount > 0) {\n const columnGroup = new Group({\n x: 0,\n y: 0,\n width: scene.table.getColWidth(col),\n height: 0,\n clip: false,\n pickable: false\n });\n columnGroup.role = 'column';\n columnGroup.col = col;\n\n const colAfter = scene.getColGroup(col, true);\n if (colAfter) {\n scene.colHeaderGroup.insertBefore(columnGroup, colAfter);\n } else {\n scene.colHeaderGroup.appendChild(columnGroup);\n }\n generateCellGroup(columnGroup, col, 0, scene.table.columnHeaderLevelCount - 1);\n }\n\n if (scene.bodyGroup) {\n const columnGroup = new Group({\n x: 0,\n y: 0,\n width: scene.table.getColWidth(col),\n height: 0,\n clip: false,\n pickable: false\n });\n columnGroup.role = 'column';\n columnGroup.col = col;\n\n const colAfter = scene.getColGroup(col, false);\n if (colAfter) {\n scene.bodyGroup.insertBefore(columnGroup, colAfter);\n } else {\n scene.bodyGroup.appendChild(columnGroup);\n }\n generateCellGroup(columnGroup, col, scene.bodyRowStart, scene.bodyRowEnd);\n }\n if (scene.bottomFrozenGroup && scene.table.bottomFrozenRowCount > 0) {\n const columnGroup = new Group({\n x: 0,\n y: 0,\n width: scene.table.getColWidth(col),\n height: 0,\n clip: false,\n pickable: false\n });\n columnGroup.role = 'column';\n columnGroup.col = col;\n\n const colAfter = scene.getColGroupInBottom(col);\n if (colAfter) {\n scene.bottomFrozenGroup.insertBefore(columnGroup, colAfter);\n } else {\n scene.bottomFrozenGroup.appendChild(columnGroup);\n }\n\n generateCellGroup(\n columnGroup,\n col,\n scene.table.rowCount - scene.table.bottomFrozenRowCount,\n scene.table.rowCount - 1\n );\n }\n\n function generateCellGroup(group: IGroup, col: number, rowStart: number, rowEnd: number) {\n for (let row = rowStart; row <= rowEnd; row++) {\n // create cellGroup\n // const cellGroup = updateCell(col, row, scene.table, true);\n const cellGroup = new Group({\n x: 0,\n y: 0,\n width: scene.table.getColWidth(col),\n height: scene.table.getRowHeight(row)\n });\n cellGroup.role = 'cell';\n cellGroup.col = col;\n cellGroup.row = row;\n cellGroup.needUpdate = true;\n group.appendChild(cellGroup);\n }\n }\n}\n"]}
|
|
@@ -43,15 +43,22 @@ function updateRow(removeCells, addCells, updateCells, table, skipUpdateProxy) {
|
|
|
43
43
|
const pos = _getUpdateRowIndex(addRows[0] - 1, addRows[addRows.length - 1] + 1, scene);
|
|
44
44
|
rowUpdatePos = (0, vutils_1.isValid)(rowUpdatePos) ? (0, vutils_1.isValid)(pos) ? Math.min(rowUpdatePos, pos) : rowUpdatePos : pos;
|
|
45
45
|
}
|
|
46
|
+
const batchMergePos = new Set;
|
|
46
47
|
for (let col = 0; col < table.colCount; col++) updateRows.forEach((row => {
|
|
47
48
|
if (row < table.frozenRowCount) {
|
|
48
49
|
const mergeInfo = (0, get_cell_merge_1.getCellMergeInfo)(scene.table, col, row);
|
|
49
|
-
if (mergeInfo) for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++)
|
|
50
|
-
|
|
50
|
+
if (mergeInfo) for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {
|
|
51
|
+
const key = `${col}-${row}`;
|
|
52
|
+
batchMergePos.has(key) || ((0, cell_helper_1.updateCell)(col, row, scene.table, !1),
|
|
53
|
+
batchMergePos.add(key));
|
|
54
|
+
} else (0, cell_helper_1.updateCell)(col, row, scene.table, !1);
|
|
51
55
|
} else if (row > table.rowCount - 1 || row < scene.table.rowCount - scene.table.bottomFrozenRowCount && (row < scene.proxy.rowStart || row > scene.proxy.rowEnd)) removeCellGroup(row, scene); else {
|
|
52
56
|
const mergeInfo = (0, get_cell_merge_1.getCellMergeInfo)(scene.table, col, row);
|
|
53
|
-
if (mergeInfo) for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++)
|
|
54
|
-
|
|
57
|
+
if (mergeInfo) for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {
|
|
58
|
+
const key = `${col}-${row}`;
|
|
59
|
+
batchMergePos.has(key) || ((0, cell_helper_1.updateCell)(col, row, scene.table, !1),
|
|
60
|
+
batchMergePos.add(key));
|
|
61
|
+
} else (0, cell_helper_1.updateCell)(col, row, scene.table, !1);
|
|
55
62
|
}
|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AG,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QAC/C,KAAK,IAAI,GAAG,GAAG,KAAK,CAAC,GAAG,EAAE,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;YAC/C,MAAM,SAAS,GAAG,KAAK,CAAC,sBAAsB,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;YAC/D,IAAI,CAAC,SAAS,EAAE;gBACd,SAAS;aACV;YACD,SAAS,CAAC,UAAU,GAAG,IAAI,CAAC;SAC7B;KACF;AACH,CAAC;AAED,SAAS,gCAAgC,CAAC,cAAsB,EAAE,KAAiB;IACjF,IAAI,KAAK,CAAC,KAAK,CAAC,iBAAiB,EAAE,EAAE;QACnC,KAAK,IAAI,GAAG,GAAG,cAAc,EAAE,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,EAAE,GAAG,EAAE,EAAE;YACrE,IAAA,wBAAU,EAAC,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;SACxC;KACF;AACH,CAAC","file":"update-row.js","sourcesContent":["import { isNumber, isValid } from '@visactor/vutils';\nimport type { CellAddress, CellRange } from '../../ts-types';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport { Group } from '../graphic/group';\nimport { updateCell } from '../group-creater/cell-helper';\nimport type { Scenegraph } from '../scenegraph';\nimport { getCellMergeInfo } from '../utils/get-cell-merge';\nimport { deduplication } from '../../tools/util';\nimport { checkHaveTextStick, resetTextStick } from '../stick-text';\n\n/**\n * add and remove rows in scenegraph\n */\nexport function updateRow(\n removeCells: CellAddress[],\n addCells: CellAddress[],\n updateCells: CellAddress[],\n table: BaseTableAPI,\n skipUpdateProxy?: boolean\n) {\n if (checkHaveTextStick(table)) {\n resetTextStick(table); // reset text stick\n }\n\n const scene = table.scenegraph;\n // deduplication\n const removeRows = deduplication(removeCells.map(cell => cell.row)).sort((a, b) => b - a);\n const addRows = deduplication(addCells.map(cell => cell.row)).sort((a, b) => a - b);\n const updateRows = deduplication(updateCells.map(cell => cell.row)).sort((a, b) => a - b);\n\n let rowUpdatePos;\n if (updateRows.length) {\n const beforeRow = updateRows[0] - 1;\n const afterRow = updateRows[updateRows.length - 1] + 1;\n rowUpdatePos = _getUpdateRowIndexUseCellNode(beforeRow, afterRow, scene);\n }\n if (addRows.length) {\n const beforeRow = addRows[0] - 1;\n const afterRow = addRows[addRows.length - 1] + 1;\n const pos = _getUpdateRowIndexUseCellNode(beforeRow, afterRow, scene);\n rowUpdatePos = isValid(rowUpdatePos) ? (isValid(pos) ? Math.min(rowUpdatePos, pos) : rowUpdatePos) : pos;\n }\n if (removeRows.length) {\n const beforeRow = removeRows[0] - 1;\n const afterRow = removeRows[removeRows.length - 1] + 1;\n const pos = _getUpdateRowIndexUseCellNode(beforeRow, afterRow, scene);\n rowUpdatePos = isValid(rowUpdatePos) ? (isValid(pos) ? Math.min(rowUpdatePos, pos) : rowUpdatePos) : pos;\n }\n\n // remove cells\n removeRows.forEach(row => {\n removeRow(row, scene, skipUpdateProxy);\n });\n\n const rowHeightsMap = table.rowHeightsMap;\n removeRows.forEach(row => {\n rowHeightsMap.delete(row);\n });\n\n if (removeRows.length) {\n resetRowNumber(scene);\n const beforeRow = removeRows[removeRows.length - 1] - 1;\n const afterRow = removeRows[0] - removeRows.length + 1;\n const pos = _getUpdateRowIndex(beforeRow, afterRow, scene);\n // isNumber(rowUpdatePos) && (scene.proxy.rowUpdatePos = Math.min(scene.proxy.rowUpdatePos, rowUpdatePos));\n rowUpdatePos = isValid(rowUpdatePos) ? (isValid(pos) ? Math.min(rowUpdatePos, pos) : rowUpdatePos) : pos;\n }\n\n scene.table._clearRowRangeHeightsMap();\n\n // add cells\n let updateAfter: number;\n addRows.forEach(row => {\n const needUpdateAfter = addRow(row, scene, skipUpdateProxy);\n updateAfter = updateAfter ?? needUpdateAfter;\n rowHeightsMap.insert(row);\n });\n\n // reset attribute y and row number in CellGroup\n // const newTotalHeight = resetRowNumberAndY(scene);\n resetRowNumberAndY(scene);\n\n if (addRows.length) {\n const beforeRow = addRows[0] - 1;\n const afterRow = addRows[addRows.length - 1] + 1;\n const pos = _getUpdateRowIndex(beforeRow, afterRow, scene);\n rowUpdatePos = isValid(rowUpdatePos) ? (isValid(pos) ? Math.min(rowUpdatePos, pos) : rowUpdatePos) : pos;\n }\n\n for (let col = 0; col < table.colCount; col++) {\n // add cells\n updateRows.forEach(row => {\n if (row < table.frozenRowCount) {\n // top frozen\n const mergeInfo = getCellMergeInfo(scene.table, col, row);\n if (mergeInfo) {\n for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) {\n for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {\n updateCell(col, row, scene.table, false);\n }\n }\n } else {\n updateCell(col, row, scene.table, false);\n }\n } else if (\n // row < table.frozenRowCount || // not top frozen\n row > table.rowCount - 1 || // greater than rowCount - 1\n (row < scene.table.rowCount - scene.table.bottomFrozenRowCount && // not bottom frozen\n (row < scene.proxy.rowStart || row > scene.proxy.rowEnd)) // not in row range\n ) {\n removeCellGroup(row, scene);\n } else {\n // updateRowAttr(row, scene);\n const mergeInfo = getCellMergeInfo(scene.table, col, row);\n if (mergeInfo) {\n for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) {\n for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {\n updateCell(col, row, scene.table, false);\n }\n }\n } else {\n updateCell(col, row, scene.table, false);\n }\n }\n });\n }\n\n if (updateRows.length) {\n const beforeRow = updateRows[0] - 1;\n const afterRow = updateRows[updateRows.length - 1] + 1;\n const pos = _getUpdateRowIndex(beforeRow, afterRow, scene);\n rowUpdatePos = isValid(rowUpdatePos) ? (isValid(pos) ? Math.min(rowUpdatePos, pos) : rowUpdatePos) : pos;\n }\n\n if (isNumber(updateAfter)) {\n for (let col = 0; col < Math.max(table.colCount, table.internalProps._oldColCount ?? table.colCount); col++) {\n for (\n let row = updateAfter;\n row < Math.max(table.rowCount, table.internalProps._oldRowCount ?? table.rowCount);\n row++\n ) {\n const cellGroup = scene.highPerformanceGetCell(col, row, true);\n cellGroup && (cellGroup.needUpdate = true);\n }\n }\n rowUpdatePos = isValid(rowUpdatePos)\n ? isValid(updateAfter)\n ? Math.min(rowUpdatePos, updateAfter)\n : rowUpdatePos\n : updateAfter;\n // scene.proxy.rowUpdatePos = Math.min(scene.proxy.rowUpdatePos, updateAfter);\n }\n isNumber(rowUpdatePos) && (scene.proxy.rowUpdatePos = Math.min(scene.proxy.rowUpdatePos, rowUpdatePos));\n if (addRows.length) {\n if (!isNumber(updateAfter)) {\n const minRow = Math.min(...addRows);\n scene.proxy.rowUpdatePos = Math.min(minRow, scene.proxy.rowUpdatePos);\n }\n // 对于列表,折叠展开时最上行(按钮行行)位置不变,为基准向下更新,所以这里配置方向为up(从上向下更新)\n // 对于透视表,最上行以上以下都也可能会变,目前采区重新建立场景树方案\n scene.proxy.rowUpdateDirection = 'up';\n scene.proxy.updateCellGroups(scene.proxy.screenRowCount * 2);\n updateBottomFrozeCellGroups();\n // scene.proxy.progress();\n } else if (removeRows.length) {\n setRowSeriesNumberCellNeedUpdate(removeRows[removeRows.length - 1], scene);\n scene.proxy.updateCellGroups(scene.proxy.screenRowCount * 2);\n\n updateBottomFrozeCellGroups();\n // scene.proxy.progress();\n }\n scene.proxy.progress();\n\n // update table size\n const newTotalHeight = table.getRowsHeight(table.frozenRowCount, table.rowCount - 1 - table.bottomFrozenRowCount);\n scene.updateContainerHeight(scene.table.frozenRowCount, newTotalHeight - scene.bodyGroup.attribute.height);\n\n function updateBottomFrozeCellGroups() {\n if (\n addRows?.[addRows?.length - 1] >= table.rowCount - table.bottomFrozenRowCount ||\n updateRows?.[updateRows?.length - 1] >= table.rowCount - table.bottomFrozenRowCount ||\n removeRows?.[0] >= table.rowCount - table.bottomFrozenRowCount\n ) {\n for (let col = 0; col < table.colCount; col++) {\n for (let row = table.rowCount - table.bottomFrozenRowCount; row < table.rowCount; row++) {\n const cellGroup = scene.highPerformanceGetCell(col, row, true);\n cellGroup && (cellGroup.needUpdate = true);\n }\n }\n scene.proxy.updateBottomFrozenCellGroups();\n }\n }\n}\nfunction removeRow(row: number, scene: Scenegraph, skipUpdateProxy?: boolean) {\n // const infectCellRange = removeCellGroup(row, scene);\n // for (let i = 0; i < infectCellRange.length; i++) {\n // const { mergeStartCol, mergeEndCol, mergeStartRow, mergeEndRow } = infectCellRange[i];\n // for (let col = mergeStartCol; col <= mergeEndCol; col++) {\n // for (let row = mergeStartRow; row <= mergeEndRow; row++) {\n // const cellGroup = scene.getCell(col, row, true);\n // if (cellGroup) {\n // cellGroup.needUpdate = true;\n // }\n // }\n // }\n // }\n\n const proxy = scene.proxy;\n\n // TODO 需要整体更新proxy的状态\n if (row >= proxy.rowStart && row <= proxy.rowEnd) {\n removeCellGroup(row, scene);\n proxy.rowEnd--;\n proxy.currentRow--;\n }\n if (!skipUpdateProxy) {\n proxy.bodyBottomRow--;\n // proxy.totalRow--;\n const totalActualBodyRowCount = Math.min(proxy.rowLimit, proxy.bodyBottomRow - proxy.bodyTopRow + 1); // 渐进加载总row数量\n proxy.totalActualBodyRowCount = totalActualBodyRowCount;\n proxy.totalRow = Math.min(proxy.table.rowCount - 1, proxy.rowStart + totalActualBodyRowCount - 1); // 目标渐进完成的row\n }\n}\n\nfunction addRow(row: number, scene: Scenegraph, skipUpdateProxy?: boolean) {\n const proxy = scene.proxy;\n if (!skipUpdateProxy) {\n proxy.bodyBottomRow++;\n // proxy.totalRow++;\n const totalActualBodyRowCount = Math.min(proxy.rowLimit, proxy.bodyBottomRow - proxy.bodyTopRow + 1); // 渐进加载总row数量\n proxy.totalActualBodyRowCount = totalActualBodyRowCount;\n proxy.totalRow = proxy.rowStart + totalActualBodyRowCount - 1; // 目标渐进完成的row\n }\n\n if (row < proxy.rowStart) {\n return undefined;\n } else if (row > proxy.rowEnd) {\n if (proxy.rowEnd - proxy.rowStart + 1 < proxy.rowLimit) {\n // can add row\n proxy.rowEnd++;\n proxy.currentRow++;\n\n addRowCellGroup(row, scene);\n return row;\n }\n return undefined;\n }\n if (proxy.rowEnd - proxy.rowStart + 1 < proxy.rowLimit) {\n // can add row\n proxy.rowEnd++;\n proxy.currentRow++;\n\n addRowCellGroup(row, scene);\n return row;\n }\n\n // update rows after\n return row;\n\n // return undefined;\n\n // // TODO 需要整体更新proxy的状态\n // scene.proxy.bodyBottomRow++;\n // scene.proxy.totalRow++;\n // scene.proxy.rowEnd++;\n // scene.proxy.currentRow++;\n}\nfunction resetRowNumber(scene: Scenegraph) {\n scene.bodyGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.bodyRowStart;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex);\n rowIndex++;\n });\n });\n\n scene.rowHeaderGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.bodyRowStart;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex);\n rowIndex++;\n });\n });\n\n scene.rightFrozenGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.bodyRowStart;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex);\n rowIndex++;\n });\n });\n scene.bottomFrozenGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex);\n rowIndex++;\n });\n });\n scene.leftBottomCornerGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex);\n rowIndex++;\n });\n });\n scene.rightBottomCornerGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex);\n rowIndex++;\n });\n });\n function processCell(cellGroup: Group, rowIndex: number) {\n cellGroup.row = rowIndex;\n const merge = getCellMergeInfo(scene.table, cellGroup.col, cellGroup.row);\n if (merge) {\n cellGroup.mergeStartCol = merge.start.col;\n cellGroup.mergeEndCol = merge.end.col;\n cellGroup.mergeStartRow = merge.start.row;\n cellGroup.mergeEndRow = merge.end.row;\n } else {\n cellGroup.mergeStartCol = undefined;\n cellGroup.mergeEndCol = undefined;\n cellGroup.mergeStartRow = undefined;\n cellGroup.mergeEndRow = undefined;\n }\n }\n}\n\nfunction resetRowNumberAndY(scene: Scenegraph) {\n scene.bodyGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.bodyRowStart;\n // let y = (colGroup.firstChild as IGraphic).attribute.y;\n let y = scene.getCellGroupY(rowIndex);\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex, y);\n rowIndex++;\n y += cellGroup.attribute.height;\n });\n });\n\n scene.rowHeaderGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.bodyRowStart;\n // let y = (colGroup.firstChild as IGraphic).attribute.y;\n let y = scene.getCellGroupY(rowIndex);\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex, y);\n rowIndex++;\n y += cellGroup.attribute.height;\n });\n });\n\n scene.rightFrozenGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.bodyRowStart;\n // let y = (colGroup.firstChild as IGraphic).attribute.y;\n let y = scene.getCellGroupY(rowIndex);\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex, y);\n rowIndex++;\n y += cellGroup.attribute.height;\n });\n });\n scene.bottomFrozenGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n let y = 0;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex, y);\n rowIndex++;\n y += cellGroup.attribute.height;\n });\n });\n scene.leftBottomCornerGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n let y = 0;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex, y);\n rowIndex++;\n y += cellGroup.attribute.height;\n });\n });\n scene.rightBottomCornerGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n let y = 0;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex, y);\n rowIndex++;\n y += cellGroup.attribute.height;\n });\n });\n function processCell(cellGroup: Group, rowIndex: number, y: number) {\n cellGroup.row = rowIndex;\n cellGroup.setAttribute('y', y);\n const merge = getCellMergeInfo(scene.table, cellGroup.col, cellGroup.row);\n if (merge) {\n cellGroup.mergeStartCol = merge.start.col;\n cellGroup.mergeEndCol = merge.end.col;\n cellGroup.mergeStartRow = merge.start.row;\n cellGroup.mergeEndRow = merge.end.row;\n } else {\n cellGroup.mergeStartCol = undefined;\n cellGroup.mergeEndCol = undefined;\n cellGroup.mergeStartRow = undefined;\n cellGroup.mergeEndRow = undefined;\n }\n }\n}\nfunction addRowCellGroup(row: number, scene: Scenegraph) {\n for (let col = 0; col < scene.table.colCount; col++) {\n // create cellGroup\n // const cellGroup = updateCell(col, row, scene.table, true);\n const cellGroup = new Group({\n x: 0,\n y: 0,\n width: scene.table.getColWidth(col),\n height: scene.table.getRowHeight(row)\n });\n cellGroup.role = 'cell';\n cellGroup.col = col;\n cellGroup.row = row;\n cellGroup.needUpdate = true;\n\n if (!cellGroup) {\n // TODO: deal with data promise situation\n continue;\n }\n\n // insert cellGroup in colGroup\n const colGroup = scene.getColGroup(col);\n if (!colGroup) {\n continue;\n }\n\n if (colGroup.firstChild && row < (colGroup.firstChild as Group).row) {\n colGroup.insertBefore(cellGroup, colGroup.firstChild);\n (colGroup.firstChild as Group).row = (colGroup.firstChild as Group).row + 1;\n // if (\n // isNumber((colGroup.firstChild as Group).mergeStartRow) &&\n // isNumber((colGroup.firstChild as Group).mergeEndRow)\n // ) {\n // (colGroup.firstChild as Group).mergeStartRow = (colGroup.firstChild as Group).mergeStartRow + 1;\n // (colGroup.firstChild as Group).mergeEndRow = (colGroup.firstChild as Group).mergeEndRow + 1;\n // }\n } else if (colGroup.lastChild && row > (colGroup.lastChild as Group).row) {\n colGroup.appendChild(cellGroup);\n } else {\n // let cellBefore: Group;\n // colGroup.forEachChildren((cellGroup: Group) => {\n // if (cellGroup.row === row) {\n // cellBefore = cellGroup;\n // return true;\n // }\n // return false;\n // });\n\n const cellBefore = scene.highPerformanceGetCell(col, row, true);\n if (cellBefore !== cellGroup) {\n colGroup.insertBefore(cellGroup, cellBefore);\n cellBefore && (cellBefore.row = cellBefore.row + 1);\n // if (isNumber(cellBefore.mergeStartRow) && isNumber(cellBefore.mergeEndRow)) {\n // cellBefore.mergeStartRow = cellBefore.mergeStartRow + 1;\n // cellBefore.mergeEndRow = cellBefore.mergeEndRow + 1;\n // }\n if (cellBefore !== colGroup.lastChild) {\n colGroup.lastChild && ((colGroup.lastChild as Group).row = (colGroup.lastChild as Group).row + 1);\n // if (\n // isNumber((colGroup.lastChild as Group).mergeStartRow) &&\n // isNumber((colGroup.lastChild as Group).mergeEndRow)\n // ) {\n // (colGroup.lastChild as Group).mergeStartRow = (colGroup.lastChild as Group).mergeStartRow + 1;\n // (colGroup.lastChild as Group).mergeEndRow = (colGroup.lastChild as Group).mergeEndRow + 1;\n // }\n }\n }\n }\n\n // // reset row number\n // let rowIndex = (colGroup.firstChild as Group)?.row;\n // colGroup.forEachChildren((cellGroup: Group) => {\n // cellGroup.row = rowIndex;\n // rowIndex++;\n // });\n }\n}\n\nfunction removeCellGroup(row: number, scene: Scenegraph) {\n // const infectCellRange = [];\n for (let col = 0; col < scene.table.colCount; col++) {\n // const headerColGroup = scene.getColGroup(col, true);\n const colGroup = scene.getColGroup(col, false);\n if (!colGroup) {\n continue;\n }\n\n // remove cellGroup in colGroup\n let cellGroup: Group;\n colGroup.forEachChildren((cell: Group) => {\n if (cell.row === row) {\n cellGroup = cell;\n return true;\n }\n return false;\n });\n if (cellGroup) {\n colGroup.updateColumnHeight(-(cellGroup as Group).attribute.height);\n colGroup.removeChild(cellGroup);\n // if (\n // isValid(cellGroup.mergeStartCol) &&\n // isValid(cellGroup.mergeEndCol) &&\n // isValid(cellGroup.mergeStartRow) &&\n // isValid(cellGroup.mergeEndRow)\n // ) {\n // infectCellRange.push({\n // col: cellGroup.col,\n // row: cellGroup.row,\n // mergeStartCol: cellGroup.mergeStartCol,\n // mergeEndCol: cellGroup.mergeEndCol,\n // mergeStartRow: cellGroup.mergeStartRow,\n // mergeEndRow: cellGroup.mergeEndRow\n // });\n // }\n }\n }\n // return infectCellRange;\n}\n\nfunction _getUpdateRowIndex(beforeRow: number, afterRow: number, scene: Scenegraph) {\n let updateRow;\n for (let col = 0; col < scene.table.colCount; col++) {\n const rangeBefore = scene.table.getCellRange(col, beforeRow);\n let row;\n if (rangeBefore.start.row <= beforeRow + 1 && rangeBefore.end.row >= beforeRow + 1) {\n addNeedUpdateTag(rangeBefore, scene);\n row = rangeBefore.start.row;\n }\n\n const rangeAfter = scene.table.getCellRange(col, afterRow);\n if (rangeAfter.start.row <= afterRow + 1 && rangeAfter.end.row >= afterRow + 1) {\n addNeedUpdateTag(rangeAfter, scene);\n row = rangeAfter.start.row;\n }\n if (isValid(row)) {\n updateRow = isValid(updateRow) ? Math.min(updateRow, row) : row;\n }\n }\n return updateRow;\n}\nfunction _getUpdateRowIndexUseCellNode(beforeRow: number, afterRow: number, scene: Scenegraph) {\n let updateRow;\n for (let col = 0; col < scene.table.colCount; col++) {\n let row;\n const beforeCell = scene.highPerformanceGetCell(col, beforeRow);\n if (beforeCell.mergeStartRow && beforeCell.mergeEndRow && beforeCell.mergeEndRow > beforeRow) {\n addNeedUpdateTag(\n {\n start: {\n row: beforeCell.mergeStartRow,\n col: scene.table.isAutoRowHeight(afterRow) ? 0 : beforeCell.mergeStartCol\n },\n end: {\n row: beforeCell.mergeEndRow,\n col: scene.table.isAutoRowHeight(afterRow) ? scene.table.colCount - 1 : beforeCell.mergeEndCol\n }\n },\n scene\n );\n row = beforeCell.mergeStartRow;\n }\n\n const afterCell = scene.highPerformanceGetCell(col, afterRow);\n if (afterCell.mergeStartRow && afterCell.mergeEndRow && afterCell.mergeStartRow < afterRow) {\n addNeedUpdateTag(\n {\n start: {\n row: afterCell.mergeStartRow,\n col: scene.table.isAutoRowHeight(afterRow) ? 0 : afterCell.mergeStartCol\n },\n end: {\n row: afterCell.mergeEndRow,\n col: scene.table.isAutoRowHeight(afterRow) ? scene.table.colCount - 1 : afterCell.mergeEndCol\n }\n },\n scene\n );\n row = afterCell.mergeStartRow;\n }\n if (isValid(row)) {\n updateRow = isValid(updateRow) ? Math.min(updateRow, row) : row;\n }\n }\n return updateRow;\n}\n\nfunction addNeedUpdateTag(range: CellRange, scene: Scenegraph) {\n const { start, end } = range;\n for (let col = start.col; col <= end.col; col++) {\n for (let row = start.row; row <= end.row; row++) {\n const cellGroup = scene.highPerformanceGetCell(col, row, true);\n if (!cellGroup) {\n continue;\n }\n cellGroup.needUpdate = true;\n }\n }\n}\n\nfunction setRowSeriesNumberCellNeedUpdate(startUpdateRow: number, scene: Scenegraph) {\n if (scene.table.isHasSeriesNumber()) {\n for (let row = startUpdateRow; row <= scene.table.rowCount - 1; row++) {\n updateCell(0, row, scene.table, false);\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/scenegraph/layout/update-row.ts"],"names":[],"mappings":";;;AAAA,6CAAqD;AAGrD,4CAAyC;AACzC,8DAA0D;AAE1D,4DAA2D;AAC3D,2CAAiD;AACjD,8CAAmE;AAKnE,SAAgB,SAAS,CACvB,WAA0B,EAC1B,QAAuB,EACvB,WAA0B,EAC1B,KAAmB,EACnB,eAAyB;;IAEzB,IAAI,IAAA,+BAAkB,EAAC,KAAK,CAAC,EAAE;QAC7B,IAAA,2BAAc,EAAC,KAAK,CAAC,CAAC;KACvB;I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CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QAC/C,KAAK,IAAI,GAAG,GAAG,KAAK,CAAC,GAAG,EAAE,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;YAC/C,MAAM,SAAS,GAAG,KAAK,CAAC,sBAAsB,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;YAC/D,IAAI,CAAC,SAAS,EAAE;gBACd,SAAS;aACV;YACD,SAAS,CAAC,UAAU,GAAG,IAAI,CAAC;SAC7B;KACF;AACH,CAAC;AAED,SAAS,gCAAgC,CAAC,cAAsB,EAAE,KAAiB;IACjF,IAAI,KAAK,CAAC,KAAK,CAAC,iBAAiB,EAAE,EAAE;QACnC,KAAK,IAAI,GAAG,GAAG,cAAc,EAAE,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,EAAE,GAAG,EAAE,EAAE;YACrE,IAAA,wBAAU,EAAC,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;SACxC;KACF;AACH,CAAC","file":"update-row.js","sourcesContent":["import { isNumber, isValid } from '@visactor/vutils';\nimport type { CellAddress, CellRange } from '../../ts-types';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport { Group } from '../graphic/group';\nimport { updateCell } from '../group-creater/cell-helper';\nimport type { Scenegraph } from '../scenegraph';\nimport { getCellMergeInfo } from '../utils/get-cell-merge';\nimport { deduplication } from '../../tools/util';\nimport { checkHaveTextStick, resetTextStick } from '../stick-text';\n\n/**\n * add and remove rows in scenegraph\n */\nexport function updateRow(\n removeCells: CellAddress[],\n addCells: CellAddress[],\n updateCells: CellAddress[],\n table: BaseTableAPI,\n skipUpdateProxy?: boolean\n) {\n if (checkHaveTextStick(table)) {\n resetTextStick(table); // reset text stick\n }\n\n const scene = table.scenegraph;\n // deduplication\n const removeRows = deduplication(removeCells.map(cell => cell.row)).sort((a, b) => b - a);\n const addRows = deduplication(addCells.map(cell => cell.row)).sort((a, b) => a - b);\n const updateRows = deduplication(updateCells.map(cell => cell.row)).sort((a, b) => a - b);\n\n let rowUpdatePos;\n if (updateRows.length) {\n const beforeRow = updateRows[0] - 1;\n const afterRow = updateRows[updateRows.length - 1] + 1;\n rowUpdatePos = _getUpdateRowIndexUseCellNode(beforeRow, afterRow, scene);\n }\n if (addRows.length) {\n const beforeRow = addRows[0] - 1;\n const afterRow = addRows[addRows.length - 1] + 1;\n const pos = _getUpdateRowIndexUseCellNode(beforeRow, afterRow, scene);\n rowUpdatePos = isValid(rowUpdatePos) ? (isValid(pos) ? Math.min(rowUpdatePos, pos) : rowUpdatePos) : pos;\n }\n if (removeRows.length) {\n const beforeRow = removeRows[0] - 1;\n const afterRow = removeRows[removeRows.length - 1] + 1;\n const pos = _getUpdateRowIndexUseCellNode(beforeRow, afterRow, scene);\n rowUpdatePos = isValid(rowUpdatePos) ? (isValid(pos) ? Math.min(rowUpdatePos, pos) : rowUpdatePos) : pos;\n }\n\n // remove cells\n removeRows.forEach(row => {\n removeRow(row, scene, skipUpdateProxy);\n });\n\n const rowHeightsMap = table.rowHeightsMap;\n removeRows.forEach(row => {\n rowHeightsMap.delete(row);\n });\n\n if (removeRows.length) {\n resetRowNumber(scene);\n const beforeRow = removeRows[removeRows.length - 1] - 1;\n const afterRow = removeRows[0] - removeRows.length + 1;\n const pos = _getUpdateRowIndex(beforeRow, afterRow, scene);\n // isNumber(rowUpdatePos) && (scene.proxy.rowUpdatePos = Math.min(scene.proxy.rowUpdatePos, rowUpdatePos));\n rowUpdatePos = isValid(rowUpdatePos) ? (isValid(pos) ? Math.min(rowUpdatePos, pos) : rowUpdatePos) : pos;\n }\n\n scene.table._clearRowRangeHeightsMap();\n\n // add cells\n let updateAfter: number;\n addRows.forEach(row => {\n const needUpdateAfter = addRow(row, scene, skipUpdateProxy);\n updateAfter = updateAfter ?? needUpdateAfter;\n rowHeightsMap.insert(row);\n });\n\n // reset attribute y and row number in CellGroup\n // const newTotalHeight = resetRowNumberAndY(scene);\n resetRowNumberAndY(scene);\n\n if (addRows.length) {\n const beforeRow = addRows[0] - 1;\n const afterRow = addRows[addRows.length - 1] + 1;\n const pos = _getUpdateRowIndex(beforeRow, afterRow, scene);\n rowUpdatePos = isValid(rowUpdatePos) ? (isValid(pos) ? Math.min(rowUpdatePos, pos) : rowUpdatePos) : pos;\n }\n //下面合并单元格情况有重复调用updateCell问题,需要优化。用这个变量记录已经处理过的合并单元格位置,避免重复处理。\n const batchMergePos = new Set<string>();\n for (let col = 0; col < table.colCount; col++) {\n // add cells\n updateRows.forEach(row => {\n if (row < table.frozenRowCount) {\n // top frozen\n const mergeInfo = getCellMergeInfo(scene.table, col, row);\n if (mergeInfo) {\n for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) {\n for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {\n const key = `${col}-${row}`;\n if (!batchMergePos.has(key)) {\n updateCell(col, row, scene.table, false);\n batchMergePos.add(key);\n }\n }\n }\n } else {\n updateCell(col, row, scene.table, false);\n }\n } else if (\n // row < table.frozenRowCount || // not top frozen\n row > table.rowCount - 1 || // greater than rowCount - 1\n (row < scene.table.rowCount - scene.table.bottomFrozenRowCount && // not bottom frozen\n (row < scene.proxy.rowStart || row > scene.proxy.rowEnd)) // not in row range\n ) {\n removeCellGroup(row, scene);\n } else {\n // updateRowAttr(row, scene);\n const mergeInfo = getCellMergeInfo(scene.table, col, row);\n if (mergeInfo) {\n for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) {\n for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {\n const key = `${col}-${row}`;\n if (!batchMergePos.has(key)) {\n updateCell(col, row, scene.table, false);\n batchMergePos.add(key);\n }\n }\n }\n } else {\n updateCell(col, row, scene.table, false);\n }\n }\n });\n }\n\n if (updateRows.length) {\n const beforeRow = updateRows[0] - 1;\n const afterRow = updateRows[updateRows.length - 1] + 1;\n const pos = _getUpdateRowIndex(beforeRow, afterRow, scene);\n rowUpdatePos = isValid(rowUpdatePos) ? (isValid(pos) ? Math.min(rowUpdatePos, pos) : rowUpdatePos) : pos;\n }\n\n if (isNumber(updateAfter)) {\n for (let col = 0; col < Math.max(table.colCount, table.internalProps._oldColCount ?? table.colCount); col++) {\n for (\n let row = updateAfter;\n row < Math.max(table.rowCount, table.internalProps._oldRowCount ?? table.rowCount);\n row++\n ) {\n const cellGroup = scene.highPerformanceGetCell(col, row, true);\n cellGroup && (cellGroup.needUpdate = true);\n }\n }\n rowUpdatePos = isValid(rowUpdatePos)\n ? isValid(updateAfter)\n ? Math.min(rowUpdatePos, updateAfter)\n : rowUpdatePos\n : updateAfter;\n // scene.proxy.rowUpdatePos = Math.min(scene.proxy.rowUpdatePos, updateAfter);\n }\n isNumber(rowUpdatePos) && (scene.proxy.rowUpdatePos = Math.min(scene.proxy.rowUpdatePos, rowUpdatePos));\n if (addRows.length) {\n if (!isNumber(updateAfter)) {\n const minRow = Math.min(...addRows);\n scene.proxy.rowUpdatePos = Math.min(minRow, scene.proxy.rowUpdatePos);\n }\n // 对于列表,折叠展开时最上行(按钮行行)位置不变,为基准向下更新,所以这里配置方向为up(从上向下更新)\n // 对于透视表,最上行以上以下都也可能会变,目前采区重新建立场景树方案\n scene.proxy.rowUpdateDirection = 'up';\n scene.proxy.updateCellGroups(scene.proxy.screenRowCount * 2);\n updateBottomFrozeCellGroups();\n // scene.proxy.progress();\n } else if (removeRows.length) {\n setRowSeriesNumberCellNeedUpdate(removeRows[removeRows.length - 1], scene);\n scene.proxy.updateCellGroups(scene.proxy.screenRowCount * 2);\n\n updateBottomFrozeCellGroups();\n // scene.proxy.progress();\n }\n scene.proxy.progress();\n\n // update table size\n const newTotalHeight = table.getRowsHeight(table.frozenRowCount, table.rowCount - 1 - table.bottomFrozenRowCount);\n scene.updateContainerHeight(scene.table.frozenRowCount, newTotalHeight - scene.bodyGroup.attribute.height);\n\n function updateBottomFrozeCellGroups() {\n if (\n addRows?.[addRows?.length - 1] >= table.rowCount - table.bottomFrozenRowCount ||\n updateRows?.[updateRows?.length - 1] >= table.rowCount - table.bottomFrozenRowCount ||\n removeRows?.[0] >= table.rowCount - table.bottomFrozenRowCount\n ) {\n for (let col = 0; col < table.colCount; col++) {\n for (let row = table.rowCount - table.bottomFrozenRowCount; row < table.rowCount; row++) {\n const cellGroup = scene.highPerformanceGetCell(col, row, true);\n cellGroup && (cellGroup.needUpdate = true);\n }\n }\n scene.proxy.updateBottomFrozenCellGroups();\n }\n }\n}\nfunction removeRow(row: number, scene: Scenegraph, skipUpdateProxy?: boolean) {\n // const infectCellRange = removeCellGroup(row, scene);\n // for (let i = 0; i < infectCellRange.length; i++) {\n // const { mergeStartCol, mergeEndCol, mergeStartRow, mergeEndRow } = infectCellRange[i];\n // for (let col = mergeStartCol; col <= mergeEndCol; col++) {\n // for (let row = mergeStartRow; row <= mergeEndRow; row++) {\n // const cellGroup = scene.getCell(col, row, true);\n // if (cellGroup) {\n // cellGroup.needUpdate = true;\n // }\n // }\n // }\n // }\n\n const proxy = scene.proxy;\n\n // TODO 需要整体更新proxy的状态\n if (row >= proxy.rowStart && row <= proxy.rowEnd) {\n removeCellGroup(row, scene);\n proxy.rowEnd--;\n proxy.currentRow--;\n }\n if (!skipUpdateProxy) {\n proxy.bodyBottomRow--;\n // proxy.totalRow--;\n const totalActualBodyRowCount = Math.min(proxy.rowLimit, proxy.bodyBottomRow - proxy.bodyTopRow + 1); // 渐进加载总row数量\n proxy.totalActualBodyRowCount = totalActualBodyRowCount;\n proxy.totalRow = Math.min(proxy.table.rowCount - 1, proxy.rowStart + totalActualBodyRowCount - 1); // 目标渐进完成的row\n }\n}\n\nfunction addRow(row: number, scene: Scenegraph, skipUpdateProxy?: boolean) {\n const proxy = scene.proxy;\n if (!skipUpdateProxy) {\n proxy.bodyBottomRow++;\n // proxy.totalRow++;\n const totalActualBodyRowCount = Math.min(proxy.rowLimit, proxy.bodyBottomRow - proxy.bodyTopRow + 1); // 渐进加载总row数量\n proxy.totalActualBodyRowCount = totalActualBodyRowCount;\n proxy.totalRow = proxy.rowStart + totalActualBodyRowCount - 1; // 目标渐进完成的row\n }\n\n if (row < proxy.rowStart) {\n return undefined;\n } else if (row > proxy.rowEnd) {\n if (proxy.rowEnd - proxy.rowStart + 1 < proxy.rowLimit) {\n // can add row\n proxy.rowEnd++;\n proxy.currentRow++;\n\n addRowCellGroup(row, scene);\n return row;\n }\n return undefined;\n }\n if (proxy.rowEnd - proxy.rowStart + 1 < proxy.rowLimit) {\n // can add row\n proxy.rowEnd++;\n proxy.currentRow++;\n\n addRowCellGroup(row, scene);\n return row;\n }\n\n // update rows after\n return row;\n\n // return undefined;\n\n // // TODO 需要整体更新proxy的状态\n // scene.proxy.bodyBottomRow++;\n // scene.proxy.totalRow++;\n // scene.proxy.rowEnd++;\n // scene.proxy.currentRow++;\n}\nfunction resetRowNumber(scene: Scenegraph) {\n scene.bodyGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.bodyRowStart;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex);\n rowIndex++;\n });\n });\n\n scene.rowHeaderGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.bodyRowStart;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex);\n rowIndex++;\n });\n });\n\n scene.rightFrozenGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.bodyRowStart;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex);\n rowIndex++;\n });\n });\n scene.bottomFrozenGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex);\n rowIndex++;\n });\n });\n scene.leftBottomCornerGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex);\n rowIndex++;\n });\n });\n scene.rightBottomCornerGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex);\n rowIndex++;\n });\n });\n function processCell(cellGroup: Group, rowIndex: number) {\n cellGroup.row = rowIndex;\n const merge = getCellMergeInfo(scene.table, cellGroup.col, cellGroup.row);\n if (merge) {\n cellGroup.mergeStartCol = merge.start.col;\n cellGroup.mergeEndCol = merge.end.col;\n cellGroup.mergeStartRow = merge.start.row;\n cellGroup.mergeEndRow = merge.end.row;\n } else {\n cellGroup.mergeStartCol = undefined;\n cellGroup.mergeEndCol = undefined;\n cellGroup.mergeStartRow = undefined;\n cellGroup.mergeEndRow = undefined;\n }\n }\n}\n\nfunction resetRowNumberAndY(scene: Scenegraph) {\n scene.bodyGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.bodyRowStart;\n // let y = (colGroup.firstChild as IGraphic).attribute.y;\n let y = scene.getCellGroupY(rowIndex);\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex, y);\n rowIndex++;\n y += cellGroup.attribute.height;\n });\n });\n\n scene.rowHeaderGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.bodyRowStart;\n // let y = (colGroup.firstChild as IGraphic).attribute.y;\n let y = scene.getCellGroupY(rowIndex);\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex, y);\n rowIndex++;\n y += cellGroup.attribute.height;\n });\n });\n\n scene.rightFrozenGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.bodyRowStart;\n // let y = (colGroup.firstChild as IGraphic).attribute.y;\n let y = scene.getCellGroupY(rowIndex);\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex, y);\n rowIndex++;\n y += cellGroup.attribute.height;\n });\n });\n scene.bottomFrozenGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n let y = 0;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex, y);\n rowIndex++;\n y += cellGroup.attribute.height;\n });\n });\n scene.leftBottomCornerGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n let y = 0;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex, y);\n rowIndex++;\n y += cellGroup.attribute.height;\n });\n });\n scene.rightBottomCornerGroup.forEachChildren((colGroup: Group) => {\n let rowIndex = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n let y = 0;\n colGroup?.forEachChildren((cellGroup: Group) => {\n processCell(cellGroup, rowIndex, y);\n rowIndex++;\n y += cellGroup.attribute.height;\n });\n });\n function processCell(cellGroup: Group, rowIndex: number, y: number) {\n cellGroup.row = rowIndex;\n cellGroup.setAttribute('y', y);\n const merge = getCellMergeInfo(scene.table, cellGroup.col, cellGroup.row);\n if (merge) {\n cellGroup.mergeStartCol = merge.start.col;\n cellGroup.mergeEndCol = merge.end.col;\n cellGroup.mergeStartRow = merge.start.row;\n cellGroup.mergeEndRow = merge.end.row;\n } else {\n cellGroup.mergeStartCol = undefined;\n cellGroup.mergeEndCol = undefined;\n cellGroup.mergeStartRow = undefined;\n cellGroup.mergeEndRow = undefined;\n }\n }\n}\nfunction addRowCellGroup(row: number, scene: Scenegraph) {\n for (let col = 0; col < scene.table.colCount; col++) {\n // create cellGroup\n // const cellGroup = updateCell(col, row, scene.table, true);\n const cellGroup = new Group({\n x: 0,\n y: 0,\n width: scene.table.getColWidth(col),\n height: scene.table.getRowHeight(row)\n });\n cellGroup.role = 'cell';\n cellGroup.col = col;\n cellGroup.row = row;\n cellGroup.needUpdate = true;\n\n if (!cellGroup) {\n // TODO: deal with data promise situation\n continue;\n }\n\n // insert cellGroup in colGroup\n const colGroup = scene.getColGroup(col);\n if (!colGroup) {\n continue;\n }\n\n if (colGroup.firstChild && row < (colGroup.firstChild as Group).row) {\n colGroup.insertBefore(cellGroup, colGroup.firstChild);\n (colGroup.firstChild as Group).row = (colGroup.firstChild as Group).row + 1;\n // if (\n // isNumber((colGroup.firstChild as Group).mergeStartRow) &&\n // isNumber((colGroup.firstChild as Group).mergeEndRow)\n // ) {\n // (colGroup.firstChild as Group).mergeStartRow = (colGroup.firstChild as Group).mergeStartRow + 1;\n // (colGroup.firstChild as Group).mergeEndRow = (colGroup.firstChild as Group).mergeEndRow + 1;\n // }\n } else if (colGroup.lastChild && row > (colGroup.lastChild as Group).row) {\n colGroup.appendChild(cellGroup);\n } else {\n // let cellBefore: Group;\n // colGroup.forEachChildren((cellGroup: Group) => {\n // if (cellGroup.row === row) {\n // cellBefore = cellGroup;\n // return true;\n // }\n // return false;\n // });\n\n const cellBefore = scene.highPerformanceGetCell(col, row, true);\n if (cellBefore !== cellGroup) {\n colGroup.insertBefore(cellGroup, cellBefore);\n cellBefore && (cellBefore.row = cellBefore.row + 1);\n // if (isNumber(cellBefore.mergeStartRow) && isNumber(cellBefore.mergeEndRow)) {\n // cellBefore.mergeStartRow = cellBefore.mergeStartRow + 1;\n // cellBefore.mergeEndRow = cellBefore.mergeEndRow + 1;\n // }\n if (cellBefore !== colGroup.lastChild) {\n colGroup.lastChild && ((colGroup.lastChild as Group).row = (colGroup.lastChild as Group).row + 1);\n // if (\n // isNumber((colGroup.lastChild as Group).mergeStartRow) &&\n // isNumber((colGroup.lastChild as Group).mergeEndRow)\n // ) {\n // (colGroup.lastChild as Group).mergeStartRow = (colGroup.lastChild as Group).mergeStartRow + 1;\n // (colGroup.lastChild as Group).mergeEndRow = (colGroup.lastChild as Group).mergeEndRow + 1;\n // }\n }\n }\n }\n\n // // reset row number\n // let rowIndex = (colGroup.firstChild as Group)?.row;\n // colGroup.forEachChildren((cellGroup: Group) => {\n // cellGroup.row = rowIndex;\n // rowIndex++;\n // });\n }\n}\n\nfunction removeCellGroup(row: number, scene: Scenegraph) {\n // const infectCellRange = [];\n for (let col = 0; col < scene.table.colCount; col++) {\n // const headerColGroup = scene.getColGroup(col, true);\n const colGroup = scene.getColGroup(col, false);\n if (!colGroup) {\n continue;\n }\n\n // remove cellGroup in colGroup\n let cellGroup: Group;\n colGroup.forEachChildren((cell: Group) => {\n if (cell.row === row) {\n cellGroup = cell;\n return true;\n }\n return false;\n });\n if (cellGroup) {\n colGroup.updateColumnHeight(-(cellGroup as Group).attribute.height);\n colGroup.removeChild(cellGroup);\n // if (\n // isValid(cellGroup.mergeStartCol) &&\n // isValid(cellGroup.mergeEndCol) &&\n // isValid(cellGroup.mergeStartRow) &&\n // isValid(cellGroup.mergeEndRow)\n // ) {\n // infectCellRange.push({\n // col: cellGroup.col,\n // row: cellGroup.row,\n // mergeStartCol: cellGroup.mergeStartCol,\n // mergeEndCol: cellGroup.mergeEndCol,\n // mergeStartRow: cellGroup.mergeStartRow,\n // mergeEndRow: cellGroup.mergeEndRow\n // });\n // }\n }\n }\n // return infectCellRange;\n}\n\nfunction _getUpdateRowIndex(beforeRow: number, afterRow: number, scene: Scenegraph) {\n let updateRow;\n for (let col = 0; col < scene.table.colCount; col++) {\n const rangeBefore = scene.table.getCellRange(col, beforeRow);\n let row;\n if (rangeBefore.start.row <= beforeRow + 1 && rangeBefore.end.row >= beforeRow + 1) {\n addNeedUpdateTag(rangeBefore, scene);\n row = rangeBefore.start.row;\n }\n\n const rangeAfter = scene.table.getCellRange(col, afterRow);\n if (rangeAfter.start.row <= afterRow + 1 && rangeAfter.end.row >= afterRow + 1) {\n addNeedUpdateTag(rangeAfter, scene);\n row = rangeAfter.start.row;\n }\n if (isValid(row)) {\n updateRow = isValid(updateRow) ? Math.min(updateRow, row) : row;\n }\n }\n return updateRow;\n}\nfunction _getUpdateRowIndexUseCellNode(beforeRow: number, afterRow: number, scene: Scenegraph) {\n let updateRow;\n for (let col = 0; col < scene.table.colCount; col++) {\n let row;\n const beforeCell = scene.highPerformanceGetCell(col, beforeRow);\n if (beforeCell.mergeStartRow && beforeCell.mergeEndRow && beforeCell.mergeEndRow > beforeRow) {\n addNeedUpdateTag(\n {\n start: {\n row: beforeCell.mergeStartRow,\n col: scene.table.isAutoRowHeight(afterRow) ? 0 : beforeCell.mergeStartCol\n },\n end: {\n row: beforeCell.mergeEndRow,\n col: scene.table.isAutoRowHeight(afterRow) ? scene.table.colCount - 1 : beforeCell.mergeEndCol\n }\n },\n scene\n );\n row = beforeCell.mergeStartRow;\n }\n\n const afterCell = scene.highPerformanceGetCell(col, afterRow);\n if (afterCell.mergeStartRow && afterCell.mergeEndRow && afterCell.mergeStartRow < afterRow) {\n addNeedUpdateTag(\n {\n start: {\n row: afterCell.mergeStartRow,\n col: scene.table.isAutoRowHeight(afterRow) ? 0 : afterCell.mergeStartCol\n },\n end: {\n row: afterCell.mergeEndRow,\n col: scene.table.isAutoRowHeight(afterRow) ? scene.table.colCount - 1 : afterCell.mergeEndCol\n }\n },\n scene\n );\n row = afterCell.mergeStartRow;\n }\n if (isValid(row)) {\n updateRow = isValid(updateRow) ? Math.min(updateRow, row) : row;\n }\n }\n return updateRow;\n}\n\nfunction addNeedUpdateTag(range: CellRange, scene: Scenegraph) {\n const { start, end } = range;\n for (let col = start.col; col <= end.col; col++) {\n for (let row = start.row; row <= end.row; row++) {\n const cellGroup = scene.highPerformanceGetCell(col, row, true);\n if (!cellGroup) {\n continue;\n }\n cellGroup.needUpdate = true;\n }\n }\n}\n\nfunction setRowSeriesNumberCellNeedUpdate(startUpdateRow: number, scene: Scenegraph) {\n if (scene.table.isHasSeriesNumber()) {\n for (let row = startUpdateRow; row <= scene.table.rowCount - 1; row++) {\n updateCell(0, row, scene.table, false);\n }\n }\n}\n"]}
|
package/cjs/vrender.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/vrender.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qEAA0D;AAC1D,kCAAgC;AAChC,yDAAwH;AACxH,yDAqBgC;AAIhC,IAAI,QAAQ,GAAG,KAAK,CAAC;AACrB,SAAgB,kBAAkB;IAChC,IAAI,QAAQ,EAAE;QACZ,OAAO;KACR;IACD,QAAQ,GAAG,IAAI,CAAC;IAEhB,IAAA,+BAAgB,GAAE,CAAC;IAEnB,IAAI,IAAA,2BAAY,GAAE,EAAE;QAClB,IAAA,6BAAc,EAAC,wBAAS,CAAC,CAAC;KAC3B;SAAM,IAAI,IAAA,wBAAS,GAAE,EAAE;QACtB,IAAA,0BAAW,EAAC,wBAAS,CAAC,CAAC;KACxB;IACD,IAAA,0BAAW,GAAE,CAAC;IAGd,IAAA,6BAAc,GAAE,CAAC;IAEjB,IAAA,4BAAa,GAAE,CAAC;IAChB,IAAA,4BAAa,GAAE,CAAC;IAChB,IAAA,2BAAY,GAAE,CAAC;IAIf,IAAA,2BAAY,GAAE,CAAC;IAEf,IAAA,+BAAgB,GAAE,CAAC;IACnB,IAAA,iCAAkB,GAAE,CAAC;IACrB,IAAA,6BAAc,GAAE,CAAC;IACjB,IAAA,2BAAY,GAAE,CAAC;IACf,IAAA,uCAAwB,GAAE,CAAC;IAE3B,IAAA,+BAAU,GAAE,CAAC;IAEb,IAAA,uCAAwB,GAAE,CAAC;AAC7B,CAAC;AAnCD,gDAmCC;AAOD,yDAAuC;AACvC,yDAAuC;AACvC,+DAA6C;AAC7C,4DAA0C","file":"vrender.js","sourcesContent":["import { loadPoptip } from '@visactor/vrender-components';\nimport '@visactor/vrender-core';\nimport { container, isBrowserEnv, isNodeEnv, preLoadAllModule, registerFlexLayoutPlugin } from '@visactor/vrender-core';\nimport {\n loadBrowserEnv,\n loadNodeEnv,\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\n// 导出版本号\n// export const version = \"1.19.
|
|
1
|
+
{"version":3,"sources":["../src/vrender.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qEAA0D;AAC1D,kCAAgC;AAChC,yDAAwH;AACxH,yDAqBgC;AAIhC,IAAI,QAAQ,GAAG,KAAK,CAAC;AACrB,SAAgB,kBAAkB;IAChC,IAAI,QAAQ,EAAE;QACZ,OAAO;KACR;IACD,QAAQ,GAAG,IAAI,CAAC;IAEhB,IAAA,+BAAgB,GAAE,CAAC;IAEnB,IAAI,IAAA,2BAAY,GAAE,EAAE;QAClB,IAAA,6BAAc,EAAC,wBAAS,CAAC,CAAC;KAC3B;SAAM,IAAI,IAAA,wBAAS,GAAE,EAAE;QACtB,IAAA,0BAAW,EAAC,wBAAS,CAAC,CAAC;KACxB;IACD,IAAA,0BAAW,GAAE,CAAC;IAGd,IAAA,6BAAc,GAAE,CAAC;IAEjB,IAAA,4BAAa,GAAE,CAAC;IAChB,IAAA,4BAAa,GAAE,CAAC;IAChB,IAAA,2BAAY,GAAE,CAAC;IAIf,IAAA,2BAAY,GAAE,CAAC;IAEf,IAAA,+BAAgB,GAAE,CAAC;IACnB,IAAA,iCAAkB,GAAE,CAAC;IACrB,IAAA,6BAAc,GAAE,CAAC;IACjB,IAAA,2BAAY,GAAE,CAAC;IACf,IAAA,uCAAwB,GAAE,CAAC;IAE3B,IAAA,+BAAU,GAAE,CAAC;IAEb,IAAA,uCAAwB,GAAE,CAAC;AAC7B,CAAC;AAnCD,gDAmCC;AAOD,yDAAuC;AACvC,yDAAuC;AACvC,+DAA6C;AAC7C,4DAA0C","file":"vrender.js","sourcesContent":["import { loadPoptip } from '@visactor/vrender-components';\nimport '@visactor/vrender-core';\nimport { container, isBrowserEnv, isNodeEnv, preLoadAllModule, registerFlexLayoutPlugin } from '@visactor/vrender-core';\nimport {\n loadBrowserEnv,\n loadNodeEnv,\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\n// 导出版本号\n// export const version = \"1.19.4-alpha.0\";\n\nlet registed = false;\nexport function registerForVrender() {\n if (registed) {\n return;\n }\n registed = true;\n // 注册内置组件\n preLoadAllModule();\n\n if (isBrowserEnv()) {\n loadBrowserEnv(container);\n } else if (isNodeEnv()) {\n loadNodeEnv(container);\n }\n registerArc();\n // registerArc3d();\n // registerArea();\n registerCircle();\n // registerGlyph();\n registerGroup();\n registerImage();\n registerLine();\n // registerPath();\n // registerPolygon();\n // registerPyramid3d();\n registerRect();\n // registerRect3d();\n registerRichtext();\n registerShadowRoot();\n registerSymbol();\n registerText();\n registerFlexLayoutPlugin();\n // registerWrapText();\n loadPoptip();\n\n registerFlexLayoutPlugin();\n}\n\nexport type { Direction } from '@visactor/vrender-core';\nexport type { State } from '@visactor/vrender-components';\n// export { GroupFadeIn } from '@visactor/vrender-core';\n// export { GroupFadeOut } from '@visactor/vrender-core';\n\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\nexport * from '@visactor/vrender-components';\nexport * from '@visactor/vrender-animate';\n"]}
|
package/dist/vtable.js
CHANGED
|
@@ -52395,6 +52395,7 @@
|
|
|
52395
52395
|
const pos = _getUpdateRowIndex(beforeRow, afterRow, scene);
|
|
52396
52396
|
rowUpdatePos = isValid$3(rowUpdatePos) ? (isValid$3(pos) ? Math.min(rowUpdatePos, pos) : rowUpdatePos) : pos;
|
|
52397
52397
|
}
|
|
52398
|
+
const batchMergePos = new Set();
|
|
52398
52399
|
for (let col = 0; col < table.colCount; col++) {
|
|
52399
52400
|
updateRows.forEach(row => {
|
|
52400
52401
|
if (row < table.frozenRowCount) {
|
|
@@ -52402,7 +52403,11 @@
|
|
|
52402
52403
|
if (mergeInfo) {
|
|
52403
52404
|
for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) {
|
|
52404
52405
|
for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {
|
|
52405
|
-
|
|
52406
|
+
const key = `${col}-${row}`;
|
|
52407
|
+
if (!batchMergePos.has(key)) {
|
|
52408
|
+
updateCell$1(col, row, scene.table, false);
|
|
52409
|
+
batchMergePos.add(key);
|
|
52410
|
+
}
|
|
52406
52411
|
}
|
|
52407
52412
|
}
|
|
52408
52413
|
}
|
|
@@ -52420,7 +52425,11 @@
|
|
|
52420
52425
|
if (mergeInfo) {
|
|
52421
52426
|
for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) {
|
|
52422
52427
|
for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {
|
|
52423
|
-
|
|
52428
|
+
const key = `${col}-${row}`;
|
|
52429
|
+
if (!batchMergePos.has(key)) {
|
|
52430
|
+
updateCell$1(col, row, scene.table, false);
|
|
52431
|
+
batchMergePos.add(key);
|
|
52432
|
+
}
|
|
52424
52433
|
}
|
|
52425
52434
|
}
|
|
52426
52435
|
}
|
|
@@ -54161,13 +54170,18 @@
|
|
|
54161
54170
|
colWidthsMap.addAndReorder(col);
|
|
54162
54171
|
});
|
|
54163
54172
|
resetColNumberAndX(scene);
|
|
54173
|
+
const batchMergePos = new Set();
|
|
54164
54174
|
updateCols.forEach(col => {
|
|
54165
54175
|
for (let row = 0; row < table.rowCount; row++) {
|
|
54166
54176
|
const mergeInfo = getCellMergeInfo(scene.table, col, row);
|
|
54167
54177
|
if (mergeInfo) {
|
|
54168
54178
|
for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) {
|
|
54169
54179
|
for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) {
|
|
54170
|
-
|
|
54180
|
+
const key = `${col}-${row}`;
|
|
54181
|
+
if (!batchMergePos.has(key)) {
|
|
54182
|
+
updateCell$1(col, row, scene.table, false);
|
|
54183
|
+
batchMergePos.add(key);
|
|
54184
|
+
}
|
|
54171
54185
|
}
|
|
54172
54186
|
}
|
|
54173
54187
|
}
|
|
@@ -60059,6 +60073,41 @@
|
|
|
60059
60073
|
else if (stateManager.interactionState === InteractionState.scrolling) {
|
|
60060
60074
|
stateManager.updateInteractionState(InteractionState.default);
|
|
60061
60075
|
}
|
|
60076
|
+
if (!table.eventManager.isDraging) {
|
|
60077
|
+
const eventArgsSet = getCellEventArgsSet(e);
|
|
60078
|
+
if (!eventManager.isTouchMove &&
|
|
60079
|
+
e.button === 0 &&
|
|
60080
|
+
eventArgsSet.eventArgs &&
|
|
60081
|
+
table.hasListeners(TABLE_EVENT_TYPE.CLICK_CELL)) {
|
|
60082
|
+
const { col, row } = eventArgsSet.eventArgs;
|
|
60083
|
+
const cellInfo = table.getCellInfo(col, row);
|
|
60084
|
+
let icon;
|
|
60085
|
+
let position;
|
|
60086
|
+
if (eventArgsSet.eventArgs?.target) {
|
|
60087
|
+
const iconInfo = getIconAndPositionFromTarget(eventArgsSet.eventArgs?.target);
|
|
60088
|
+
if (iconInfo) {
|
|
60089
|
+
icon = iconInfo.icon;
|
|
60090
|
+
position = iconInfo.position;
|
|
60091
|
+
}
|
|
60092
|
+
}
|
|
60093
|
+
const cellsEvent = {
|
|
60094
|
+
...cellInfo,
|
|
60095
|
+
event: e.nativeEvent,
|
|
60096
|
+
federatedEvent: e,
|
|
60097
|
+
cells: [],
|
|
60098
|
+
targetIcon: icon
|
|
60099
|
+
? {
|
|
60100
|
+
name: icon.name,
|
|
60101
|
+
position: position,
|
|
60102
|
+
funcType: icon.attribute.funcType
|
|
60103
|
+
}
|
|
60104
|
+
: undefined,
|
|
60105
|
+
target: eventArgsSet?.eventArgs?.target,
|
|
60106
|
+
mergeCellInfo: eventArgsSet.eventArgs?.mergeInfo
|
|
60107
|
+
};
|
|
60108
|
+
table.fireListeners(TABLE_EVENT_TYPE.CLICK_CELL, cellsEvent);
|
|
60109
|
+
}
|
|
60110
|
+
}
|
|
60062
60111
|
if (table.hasListeners(TABLE_EVENT_TYPE.MOUSEUP_CELL)) {
|
|
60063
60112
|
const eventArgsSet = getCellEventArgsSet(e);
|
|
60064
60113
|
if (eventArgsSet.eventArgs) {
|
|
@@ -60126,38 +60175,6 @@
|
|
|
60126
60175
|
return;
|
|
60127
60176
|
}
|
|
60128
60177
|
const eventArgsSet = getCellEventArgsSet(e);
|
|
60129
|
-
if (!eventManager.isTouchMove &&
|
|
60130
|
-
e.button === 0 &&
|
|
60131
|
-
eventArgsSet.eventArgs &&
|
|
60132
|
-
table.hasListeners(TABLE_EVENT_TYPE.CLICK_CELL)) {
|
|
60133
|
-
const { col, row } = eventArgsSet.eventArgs;
|
|
60134
|
-
const cellInfo = table.getCellInfo(col, row);
|
|
60135
|
-
let icon;
|
|
60136
|
-
let position;
|
|
60137
|
-
if (eventArgsSet.eventArgs?.target) {
|
|
60138
|
-
const iconInfo = getIconAndPositionFromTarget(eventArgsSet.eventArgs?.target);
|
|
60139
|
-
if (iconInfo) {
|
|
60140
|
-
icon = iconInfo.icon;
|
|
60141
|
-
position = iconInfo.position;
|
|
60142
|
-
}
|
|
60143
|
-
}
|
|
60144
|
-
const cellsEvent = {
|
|
60145
|
-
...cellInfo,
|
|
60146
|
-
event: e.nativeEvent,
|
|
60147
|
-
federatedEvent: e,
|
|
60148
|
-
cells: [],
|
|
60149
|
-
targetIcon: icon
|
|
60150
|
-
? {
|
|
60151
|
-
name: icon.name,
|
|
60152
|
-
position: position,
|
|
60153
|
-
funcType: icon.attribute.funcType
|
|
60154
|
-
}
|
|
60155
|
-
: undefined,
|
|
60156
|
-
target: eventArgsSet?.eventArgs?.target,
|
|
60157
|
-
mergeCellInfo: eventArgsSet.eventArgs?.mergeInfo
|
|
60158
|
-
};
|
|
60159
|
-
table.fireListeners(TABLE_EVENT_TYPE.CLICK_CELL, cellsEvent);
|
|
60160
|
-
}
|
|
60161
60178
|
if (table.stateManager.columnResize.resizing || table.stateManager.columnMove.moving) {
|
|
60162
60179
|
return;
|
|
60163
60180
|
}
|
|
@@ -67035,7 +67052,7 @@
|
|
|
67035
67052
|
return TABLE_EVENT_TYPE;
|
|
67036
67053
|
}
|
|
67037
67054
|
options;
|
|
67038
|
-
version = "1.19.
|
|
67055
|
+
version = "1.19.4-alpha.0";
|
|
67039
67056
|
pagination;
|
|
67040
67057
|
id = `VTable${Date.now()}`;
|
|
67041
67058
|
headerStyleCache;
|
|
@@ -90708,7 +90725,7 @@
|
|
|
90708
90725
|
}
|
|
90709
90726
|
|
|
90710
90727
|
registerForVrender();
|
|
90711
|
-
const version = "1.19.
|
|
90728
|
+
const version = "1.19.4-alpha.0";
|
|
90712
90729
|
function getIcons() {
|
|
90713
90730
|
return get$2();
|
|
90714
90731
|
}
|