@visactor/vtable 0.17.0 → 0.17.2-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/ListTable.d.ts +1 -0
- package/cjs/ListTable.js +12 -1
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.d.ts +1 -0
- package/cjs/PivotChart.js +17 -0
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable.d.ts +1 -0
- package/cjs/PivotTable.js +17 -0
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +1 -0
- package/cjs/core/BaseTable.js +24 -30
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/tableHelper.d.ts +1 -1
- package/cjs/core/tableHelper.js +6 -5
- package/cjs/core/tableHelper.js.map +1 -1
- package/cjs/dataset/dataset.js +3 -8
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/edit/edit-manager.js +0 -3
- package/cjs/edit/edit-manager.js.map +1 -1
- package/cjs/event/EventHandler.d.ts +1 -0
- package/cjs/event/EventHandler.js +1 -1
- package/cjs/event/EventHandler.js.map +1 -1
- package/cjs/event/event.d.ts +10 -0
- package/cjs/event/event.js +2 -1
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/container-dom.js +30 -4
- package/cjs/event/listener/container-dom.js.map +1 -1
- package/cjs/event/listener/scroll-bar.js +19 -5
- package/cjs/event/listener/scroll-bar.js.map +1 -1
- package/cjs/event/listener/table-group.js +33 -28
- 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/layout/pivot-header-layout.js +10 -10
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/simple-header-layout.js +9 -9
- package/cjs/layout/simple-header-layout.js.map +1 -1
- package/cjs/scenegraph/component/cell-content.d.ts +2 -3
- package/cjs/scenegraph/component/cell-content.js +3 -3
- package/cjs/scenegraph/component/cell-content.js.map +1 -1
- package/cjs/scenegraph/component/custom.js +10 -10
- package/cjs/scenegraph/component/custom.js.map +1 -1
- package/cjs/scenegraph/component/table-component.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.d.ts +2 -2
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
- package/cjs/scenegraph/graphic/text.d.ts +1 -1
- package/cjs/scenegraph/graphic/text.js +1 -1
- package/cjs/scenegraph/graphic/text.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +2 -1
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js +3 -2
- package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/cjs/scenegraph/icon/icon-update.d.ts +2 -0
- package/cjs/scenegraph/icon/icon-update.js +16 -2
- package/cjs/scenegraph/icon/icon-update.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js +8 -3
- package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
- package/cjs/scenegraph/layout/update-col.js +6 -5
- package/cjs/scenegraph/layout/update-col.js.map +1 -1
- package/cjs/scenegraph/layout/update-row.js +6 -5
- package/cjs/scenegraph/layout/update-row.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +2 -0
- package/cjs/scenegraph/scenegraph.js +23 -37
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/stick-text/index.js.map +1 -1
- package/cjs/scenegraph/utils/text-icon-layout.js +13 -10
- package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/cjs/scenegraph/utils/text-pos.js.map +1 -1
- package/cjs/state/select/update-position.js +65 -65
- package/cjs/state/select/update-position.js.map +1 -1
- package/cjs/state/spark-line/index.js +9 -5
- package/cjs/state/spark-line/index.js.map +1 -1
- package/cjs/state/state.js +2 -4
- package/cjs/state/state.js.map +1 -1
- package/cjs/themes/DARK.js +1 -1
- package/cjs/themes/DARK.js.map +1 -1
- package/cjs/themes/component.d.ts +27 -0
- package/cjs/themes/component.js +29 -2
- package/cjs/themes/component.js.map +1 -1
- package/cjs/themes/theme.d.ts +2 -0
- package/cjs/themes/theme.js +9 -1
- package/cjs/themes/theme.js.map +1 -1
- package/cjs/tools/NumberMap.d.ts +4 -0
- package/cjs/tools/NumberMap.js +16 -0
- package/cjs/tools/NumberMap.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +2 -0
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/customElement.d.ts +1 -1
- package/cjs/ts-types/customElement.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +3 -0
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/ts-types/theme.d.ts +2 -0
- package/cjs/ts-types/theme.js.map +1 -1
- package/dist/vtable.js +10490 -12427
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.d.ts +1 -0
- package/es/ListTable.js +11 -1
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.d.ts +1 -0
- package/es/PivotChart.js +17 -0
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable.d.ts +1 -0
- package/es/PivotTable.js +17 -0
- package/es/PivotTable.js.map +1 -1
- package/es/core/BaseTable.d.ts +1 -0
- package/es/core/BaseTable.js +26 -33
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/tableHelper.d.ts +1 -1
- package/es/core/tableHelper.js +6 -5
- package/es/core/tableHelper.js.map +1 -1
- package/es/dataset/dataset.js +3 -8
- package/es/dataset/dataset.js.map +1 -1
- package/es/edit/edit-manager.js +0 -3
- package/es/edit/edit-manager.js.map +1 -1
- package/es/event/EventHandler.d.ts +1 -0
- package/es/event/EventHandler.js +1 -1
- package/es/event/EventHandler.js.map +1 -1
- package/es/event/event.d.ts +10 -0
- package/es/event/event.js +2 -1
- package/es/event/event.js.map +1 -1
- package/es/event/listener/container-dom.js +30 -4
- package/es/event/listener/container-dom.js.map +1 -1
- package/es/event/listener/scroll-bar.js +20 -4
- package/es/event/listener/scroll-bar.js.map +1 -1
- package/es/event/listener/table-group.js +33 -28
- 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/layout/pivot-header-layout.js +10 -10
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/simple-header-layout.js +9 -9
- package/es/layout/simple-header-layout.js.map +1 -1
- package/es/scenegraph/component/cell-content.d.ts +2 -3
- package/es/scenegraph/component/cell-content.js +3 -5
- package/es/scenegraph/component/cell-content.js.map +1 -1
- package/es/scenegraph/component/custom.js +10 -12
- package/es/scenegraph/component/custom.js.map +1 -1
- package/es/scenegraph/component/table-component.js.map +1 -1
- package/es/scenegraph/graphic/contributions/group-contribution-render.d.ts +2 -2
- package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/es/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
- package/es/scenegraph/graphic/text.d.ts +1 -1
- package/es/scenegraph/graphic/text.js +1 -1
- package/es/scenegraph/graphic/text.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +2 -1
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/checkbox-cell.js +3 -2
- package/es/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +2 -2
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/es/scenegraph/icon/icon-update.d.ts +2 -0
- package/es/scenegraph/icon/icon-update.js +13 -0
- package/es/scenegraph/icon/icon-update.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.js +9 -6
- package/es/scenegraph/layout/compute-row-height.js.map +1 -1
- package/es/scenegraph/layout/update-col.js +6 -5
- package/es/scenegraph/layout/update-col.js.map +1 -1
- package/es/scenegraph/layout/update-row.js +6 -5
- package/es/scenegraph/layout/update-row.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +2 -0
- package/es/scenegraph/scenegraph.js +24 -38
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/stick-text/index.js.map +1 -1
- package/es/scenegraph/utils/text-icon-layout.js +13 -12
- package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/es/scenegraph/utils/text-pos.js.map +1 -1
- package/es/state/select/update-position.js +65 -65
- package/es/state/select/update-position.js.map +1 -1
- package/es/state/spark-line/index.js +9 -5
- package/es/state/spark-line/index.js.map +1 -1
- package/es/state/state.js +2 -4
- package/es/state/state.js.map +1 -1
- package/es/themes/DARK.js +1 -1
- package/es/themes/DARK.js.map +1 -1
- package/es/themes/component.d.ts +27 -0
- package/es/themes/component.js +28 -0
- package/es/themes/component.js.map +1 -1
- package/es/themes/theme.d.ts +2 -0
- package/es/themes/theme.js +9 -2
- package/es/themes/theme.js.map +1 -1
- package/es/tools/NumberMap.d.ts +4 -0
- package/es/tools/NumberMap.js +16 -0
- package/es/tools/NumberMap.js.map +1 -1
- package/es/ts-types/base-table.d.ts +2 -0
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/customElement.d.ts +1 -1
- package/es/ts-types/customElement.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +3 -0
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/ts-types/theme.d.ts +2 -0
- package/es/ts-types/theme.js.map +1 -1
- package/package.json +9 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/scenegraph/layout/update-row.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAA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,QAAQ,CAAC,SAAS,IAAI,CAAE,QAAQ,CAAC,SAAmB,CAAC,GAAG,GAAI,QAAQ,CAAC,SAAmB,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;iBAQnG;aACF;SACF;KAQF;AACH,CAAC;AAED,SAAS,eAAe,CAAC,GAAW,EAAE,KAAiB;IACrD,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE;QAEnD,MAAM,QAAQ,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC/C,IAAI,CAAC,QAAQ,EAAE;YACb,SAAS;SACV;QAeD,IAAI,SAAS,CAAC;QACd,QAAQ,CAAC,eAAe,CAAC,CAAC,IAAW,EAAE,EAAE;YACvC,IAAI,IAAI,CAAC,GAAG,KAAK,GAAG,EAAE;gBACpB,SAAS,GAAG,IAAI,CAAC;gBACjB,OAAO,IAAI,CAAC;aACb;YACD,OAAO,KAAK,CAAC;QACf,CAAC,CAAC,CAAC;QACH,IAAI,SAAS,EAAE;YACb,QAAQ,CAAC,kBAAkB,CAAC,CAAE,SAAmB,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YACpE,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;SACjC;KACF;AACH,CAAC","file":"update-row.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 { IGraphic } from '@visactor/vrender';\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) {\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 // remove cells\n removeRows.forEach(row => {\n removeRow(row, scene);\n });\n\n removeRows.forEach(row => {\n scene.table.rowHeightsMap.adjustOrder(row + 1, row, scene.table.rowHeightsMap.count() - row - 1);\n scene.table.rowHeightsMap.del(scene.table.rowHeightsMap.count() - 1);\n });\n\n if (removeRows.length) {\n resetRowNumber(scene);\n }\n\n scene.table._clearRowRangeHeightsMap();\n\n // add cells\n let updateAfter: number;\n addRows.forEach(row => {\n const needUpdateAfter = addRow(row, scene);\n updateAfter = updateAfter ?? needUpdateAfter;\n scene.table.rowHeightsMap.adjustOrder(row, row + 1, scene.table.rowHeightsMap.count() - row);\n });\n\n // reset attribute y and row number in CellGroup\n // const newTotalHeight = resetRowNumberAndY(scene);\n resetRowNumberAndY(scene);\n\n for (let col = 0; col < table.colCount; col++) {\n // add cells\n updateRows.forEach(r => {\n // updateRowAttr(row, scene);\n const mergeInfo = getCellMergeInfo(scene.table, col, r);\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, r, scene.table, false);\n }\n });\n }\n if (isNumber(updateAfter)) {\n for (let col = 0; col < table.colCount; col++) {\n for (let row = updateAfter; row < table.rowCount; row++) {\n const cellGroup = scene.highPerformanceGetCell(col, row, true);\n cellGroup && (cellGroup.needUpdate = true);\n }\n }\n scene.proxy.rowUpdatePos = updateAfter;\n }\n\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 scene.proxy.rowUpdateDirection = 'up';\n scene.proxy.updateCellGroups(scene.proxy.screenRowCount * 2);\n updateBottomFrozeCellGroups();\n scene.proxy.progress();\n } else if (removeRows.length) {\n scene.proxy.updateCellGroups(scene.proxy.screenRowCount * 2);\n\n updateBottomFrozeCellGroups();\n scene.proxy.progress();\n }\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) {\n removeCellGroup(row, scene);\n const proxy = scene.proxy;\n\n // TODO 需要整体更新proxy的状态\n if (row >= proxy.rowStart && row <= proxy.rowEnd) {\n proxy.rowEnd--;\n proxy.currentRow--;\n }\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\nfunction addRow(row: number, scene: Scenegraph) {\n const proxy = scene.proxy;\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 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 // 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}\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\n// function resetRowNumber(scene: Scenegraph) {\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 (!headerColGroup && !colGroup) {\n// continue;\n// }\n// // reset row number\n// let rowIndex = 0; //(headerColGroup.firstChild as Group)?.row;\n// headerColGroup?.forEachChildren((cellGroup: Group) => {\n// // const oldRow = cellGroup.row;\n// // if (isNumber(cellGroup.mergeStartRow)) {\n// // cellGroup.mergeStartRow = cellGroup.mergeStartRow - oldRow + rowIndex;\n// // }\n// // if (isNumber(cellGroup.mergeEndRow)) {\n// // cellGroup.mergeEndRow = cellGroup.mergeEndRow - oldRow + rowIndex;\n// // }\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.mergeStartRow = merge.start.row;\n// cellGroup.mergeEndCol = merge.end.col;\n// cellGroup.mergeEndRow = merge.end.row;\n// }\n// rowIndex++;\n// });\n// // rowIndex = (colGroup.firstChild as Group)?.row;\n// // rowIndex = scene.table.columnHeaderLevelCount;\n// rowIndex = scene.bodyRowStart;\n// colGroup?.forEachChildren((cellGroup: Group) => {\n// // const oldRow = cellGroup.row;\n// // if (isNumber(cellGroup.mergeStartRow)) {\n// // cellGroup.mergeStartRow = cellGroup.mergeStartRow - oldRow + rowIndex;\n// // }\n// // if (isNumber(cellGroup.mergeEndRow)) {\n// // cellGroup.mergeEndRow = cellGroup.mergeEndRow - oldRow + rowIndex;\n// // }\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.mergeStartRow = merge.start.row;\n// cellGroup.mergeEndCol = merge.end.col;\n// cellGroup.mergeEndRow = merge.end.row;\n// }\n// rowIndex++;\n// });\n// }\n// }\n\n// function resetRowNumberAndY(scene: Scenegraph) {\n// const table = scene.table;\n// let newTotalHeight = 0;\n// for (let col = 0; col < scene.table.colCount; col++) {\n// const headerColGroup = scene.getColGroup(col, true);\n// const colGroup = scene.getColGroup(col, false); // body, row header, right frozen\n// const bottomGroup =\n// scene.getColGroupInBottom(col) ||\n// scene.getColGroupInLeftBottomCorner(col) ||\n// scene.getColGroupInRightTopCorner(col);\n// if (!headerColGroup && !colGroup && !bottomGroup) {\n// continue;\n// }\n// let y = 0;\n// // reset row number\n// // let rowIndex = (headerColGroup.firstChild as Group)?.row;\n// // headerColGroup.forEachChildren((cellGroup: Group) => {\n// // cellGroup.row = rowIndex;\n// // rowIndex++;\n// // if (cellGroup.role !== 'cell') {\n// // return;\n// // }\n// // cellGroup.setAttribute('y', y);\n// // y+= cellGroup.attribute.height;\n// // });\n// // let rowIndex = (colGroup.firstChild as Group)?.row;\n// let rowIndex = scene.bodyRowStart;\n// y = scene.getCellGroupY(rowIndex);\n// colGroup?.forEachChildren((cellGroup: Group) => {\n// // const oldRow = cellGroup.row;\n// // if (isNumber(cellGroup.mergeStartRow)) {\n// // cellGroup.mergeStartRow = cellGroup.mergeStartRow - oldRow + rowIndex;\n// // }\n// // if (isNumber(cellGroup.mergeEndRow)) {\n// // cellGroup.mergeEndRow = cellGroup.mergeEndRow - oldRow + rowIndex;\n// // }\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.mergeStartRow = merge.start.row;\n// cellGroup.mergeEndCol = merge.end.col;\n// cellGroup.mergeEndRow = merge.end.row;\n// }\n// rowIndex++;\n// if (cellGroup.role !== 'cell') {\n// return;\n// }\n// cellGroup.setAttribute('y', y);\n// y += cellGroup.attribute.height;\n// });\n// newTotalHeight = y;\n\n// rowIndex = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n// // update bottom frozen cell row index\n// bottomGroup?.forEachChildren((cellGroup: Group) => {\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.mergeStartRow = merge.start.row;\n// cellGroup.mergeEndCol = merge.end.col;\n// cellGroup.mergeEndRow = merge.end.row;\n// }\n// rowIndex++;\n// });\n// }\n// return newTotalHeight;\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.mergeStartCol = merge.start.col;\n cellGroup.mergeEndCol = merge.end.col;\n cellGroup.mergeEndCol = merge.end.col;\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.mergeStartCol = merge.start.col;\n cellGroup.mergeEndCol = merge.end.col;\n cellGroup.mergeEndCol = merge.end.col;\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 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 // // remove cellGroup in headerColGroup\n // let headerCellGroup;\n // headerColGroup.forEachChildren((cellGroup: Group) => {\n // if (cellGroup.row === row) {\n // headerCellGroup = cellGroup;\n // return true;\n // }\n // return false;\n // });\n // if (headerCellGroup) {\n // headerColGroup.removeChild(headerCellGroup);\n // }\n\n // remove cellGroup in colGroup\n let cellGroup;\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 }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/scenegraph/layout/update-row.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAK3D,MAAM,UAAU,SAAS,CACvB,WAA0B,EAC1B,QAAuB,EACvB,WAA0B,EAC1B,KAAmB;IAEnB,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,OAA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,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;SACjC;KACF;AACH,CAAC","file":"update-row.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';\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) {\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 // remove cells\n removeRows.forEach(row => {\n removeRow(row, scene);\n });\n\n const rowHeightsMap = table.rowHeightsMap;\n removeRows.forEach(row => {\n rowHeightsMap.delAndReorder(row);\n });\n\n if (removeRows.length) {\n resetRowNumber(scene);\n }\n\n scene.table._clearRowRangeHeightsMap();\n\n // add cells\n let updateAfter: number;\n addRows.forEach(row => {\n const needUpdateAfter = addRow(row, scene);\n updateAfter = updateAfter ?? needUpdateAfter;\n rowHeightsMap.addAndReorder(row);\n });\n\n // reset attribute y and row number in CellGroup\n // const newTotalHeight = resetRowNumberAndY(scene);\n resetRowNumberAndY(scene);\n\n for (let col = 0; col < table.colCount; col++) {\n // add cells\n updateRows.forEach(r => {\n // updateRowAttr(row, scene);\n const mergeInfo = getCellMergeInfo(scene.table, col, r);\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, r, scene.table, false);\n }\n });\n }\n if (isNumber(updateAfter)) {\n for (let col = 0; col < table.colCount; col++) {\n for (let row = updateAfter; row < table.rowCount; row++) {\n const cellGroup = scene.highPerformanceGetCell(col, row, true);\n cellGroup && (cellGroup.needUpdate = true);\n }\n }\n scene.proxy.rowUpdatePos = updateAfter;\n }\n\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 scene.proxy.rowUpdateDirection = 'up';\n scene.proxy.updateCellGroups(scene.proxy.screenRowCount * 2);\n updateBottomFrozeCellGroups();\n scene.proxy.progress();\n } else if (removeRows.length) {\n scene.proxy.updateCellGroups(scene.proxy.screenRowCount * 2);\n\n updateBottomFrozeCellGroups();\n scene.proxy.progress();\n }\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) {\n removeCellGroup(row, scene);\n const proxy = scene.proxy;\n\n // TODO 需要整体更新proxy的状态\n if (row >= proxy.rowStart && row <= proxy.rowEnd) {\n proxy.rowEnd--;\n proxy.currentRow--;\n }\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\nfunction addRow(row: number, scene: Scenegraph) {\n const proxy = scene.proxy;\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 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 // 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}\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\n// function resetRowNumber(scene: Scenegraph) {\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 (!headerColGroup && !colGroup) {\n// continue;\n// }\n// // reset row number\n// let rowIndex = 0; //(headerColGroup.firstChild as Group)?.row;\n// headerColGroup?.forEachChildren((cellGroup: Group) => {\n// // const oldRow = cellGroup.row;\n// // if (isNumber(cellGroup.mergeStartRow)) {\n// // cellGroup.mergeStartRow = cellGroup.mergeStartRow - oldRow + rowIndex;\n// // }\n// // if (isNumber(cellGroup.mergeEndRow)) {\n// // cellGroup.mergeEndRow = cellGroup.mergeEndRow - oldRow + rowIndex;\n// // }\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.mergeStartRow = merge.start.row;\n// cellGroup.mergeEndCol = merge.end.col;\n// cellGroup.mergeEndRow = merge.end.row;\n// }\n// rowIndex++;\n// });\n// // rowIndex = (colGroup.firstChild as Group)?.row;\n// // rowIndex = scene.table.columnHeaderLevelCount;\n// rowIndex = scene.bodyRowStart;\n// colGroup?.forEachChildren((cellGroup: Group) => {\n// // const oldRow = cellGroup.row;\n// // if (isNumber(cellGroup.mergeStartRow)) {\n// // cellGroup.mergeStartRow = cellGroup.mergeStartRow - oldRow + rowIndex;\n// // }\n// // if (isNumber(cellGroup.mergeEndRow)) {\n// // cellGroup.mergeEndRow = cellGroup.mergeEndRow - oldRow + rowIndex;\n// // }\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.mergeStartRow = merge.start.row;\n// cellGroup.mergeEndCol = merge.end.col;\n// cellGroup.mergeEndRow = merge.end.row;\n// }\n// rowIndex++;\n// });\n// }\n// }\n\n// function resetRowNumberAndY(scene: Scenegraph) {\n// const table = scene.table;\n// let newTotalHeight = 0;\n// for (let col = 0; col < scene.table.colCount; col++) {\n// const headerColGroup = scene.getColGroup(col, true);\n// const colGroup = scene.getColGroup(col, false); // body, row header, right frozen\n// const bottomGroup =\n// scene.getColGroupInBottom(col) ||\n// scene.getColGroupInLeftBottomCorner(col) ||\n// scene.getColGroupInRightTopCorner(col);\n// if (!headerColGroup && !colGroup && !bottomGroup) {\n// continue;\n// }\n// let y = 0;\n// // reset row number\n// // let rowIndex = (headerColGroup.firstChild as Group)?.row;\n// // headerColGroup.forEachChildren((cellGroup: Group) => {\n// // cellGroup.row = rowIndex;\n// // rowIndex++;\n// // if (cellGroup.role !== 'cell') {\n// // return;\n// // }\n// // cellGroup.setAttribute('y', y);\n// // y+= cellGroup.attribute.height;\n// // });\n// // let rowIndex = (colGroup.firstChild as Group)?.row;\n// let rowIndex = scene.bodyRowStart;\n// y = scene.getCellGroupY(rowIndex);\n// colGroup?.forEachChildren((cellGroup: Group) => {\n// // const oldRow = cellGroup.row;\n// // if (isNumber(cellGroup.mergeStartRow)) {\n// // cellGroup.mergeStartRow = cellGroup.mergeStartRow - oldRow + rowIndex;\n// // }\n// // if (isNumber(cellGroup.mergeEndRow)) {\n// // cellGroup.mergeEndRow = cellGroup.mergeEndRow - oldRow + rowIndex;\n// // }\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.mergeStartRow = merge.start.row;\n// cellGroup.mergeEndCol = merge.end.col;\n// cellGroup.mergeEndRow = merge.end.row;\n// }\n// rowIndex++;\n// if (cellGroup.role !== 'cell') {\n// return;\n// }\n// cellGroup.setAttribute('y', y);\n// y += cellGroup.attribute.height;\n// });\n// newTotalHeight = y;\n\n// rowIndex = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n// // update bottom frozen cell row index\n// bottomGroup?.forEachChildren((cellGroup: Group) => {\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.mergeStartRow = merge.start.row;\n// cellGroup.mergeEndCol = merge.end.col;\n// cellGroup.mergeEndRow = merge.end.row;\n// }\n// rowIndex++;\n// });\n// }\n// return newTotalHeight;\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.mergeStartCol = merge.start.col;\n cellGroup.mergeEndCol = merge.end.col;\n cellGroup.mergeEndCol = merge.end.col;\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.mergeStartCol = merge.start.col;\n cellGroup.mergeEndCol = merge.end.col;\n cellGroup.mergeEndCol = merge.end.col;\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 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 // // remove cellGroup in headerColGroup\n // let headerCellGroup;\n // headerColGroup.forEachChildren((cellGroup: Group) => {\n // if (cellGroup.row === row) {\n // headerCellGroup = cellGroup;\n // return true;\n // }\n // return false;\n // });\n // if (headerCellGroup) {\n // headerColGroup.removeChild(headerCellGroup);\n // }\n\n // remove cellGroup in colGroup\n let cellGroup;\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 }\n }\n}\n"]}
|
|
@@ -81,6 +81,8 @@ export declare class Scenegraph {
|
|
|
81
81
|
updateFrozenIcon(col: number, oldFrozenCol: number): void;
|
|
82
82
|
updateHierarchyIcon(col: number, row: number): void;
|
|
83
83
|
setIconNormalStyle(icon: Icon, col: number, row: number): void;
|
|
84
|
+
residentHoverIcon(col: number, row: number): void;
|
|
85
|
+
resetResidentHoverIcon(col: number, row: number): void;
|
|
84
86
|
deactivateChart(col: number, row: number): void;
|
|
85
87
|
activateChart(col: number, row: number): void;
|
|
86
88
|
removeInteractionBorder(col: number, row: number): void;
|
|
@@ -58,7 +58,7 @@ import { loadPoptip, setPoptipTheme } from "@visactor/vrender-components";
|
|
|
58
58
|
|
|
59
59
|
import textMeasureModule from "./utils/text-measure";
|
|
60
60
|
|
|
61
|
-
import { getIconByXY, hideClickIcon, hideHoverIcon, setIconHoverStyle, setIconNormalStyle, showClickIcon, showHoverIcon, updateFrozenIcon, updateHierarchyIcon, updateSortIcon } from "./icon/icon-update";
|
|
61
|
+
import { getIconByXY, hideClickIcon, hideHoverIcon, resetResidentHoverIcon, residentHoverIcon, setIconHoverStyle, setIconNormalStyle, showClickIcon, showHoverIcon, updateFrozenIcon, updateHierarchyIcon, updateSortIcon } from "./icon/icon-update";
|
|
62
62
|
|
|
63
63
|
import { Env } from "../tools/env";
|
|
64
64
|
|
|
@@ -68,39 +68,11 @@ import { updateCol } from "./layout/update-col";
|
|
|
68
68
|
|
|
69
69
|
loadPoptip(), container.load(splitModule), container.load(textMeasureModule);
|
|
70
70
|
|
|
71
|
-
const poptipStyle = {
|
|
72
|
-
visible: !0,
|
|
73
|
-
position: "auto",
|
|
74
|
-
padding: 8,
|
|
75
|
-
titleStyle: {
|
|
76
|
-
fontSize: 12,
|
|
77
|
-
fontWeight: "bold",
|
|
78
|
-
fill: "#4E5969"
|
|
79
|
-
},
|
|
80
|
-
contentStyle: {
|
|
81
|
-
fontSize: 12,
|
|
82
|
-
fill: "#4E5969"
|
|
83
|
-
},
|
|
84
|
-
panel: {
|
|
85
|
-
visible: !0,
|
|
86
|
-
fill: "#fff",
|
|
87
|
-
stroke: "#ffffff",
|
|
88
|
-
lineWidth: 0,
|
|
89
|
-
cornerRadius: 3,
|
|
90
|
-
shadowBlur: 12,
|
|
91
|
-
shadowOffsetX: 0,
|
|
92
|
-
shadowOffsetY: 4,
|
|
93
|
-
shadowColor: "rgba(0, 0, 0, 0.1)",
|
|
94
|
-
size: 0,
|
|
95
|
-
space: 12
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
|
|
99
71
|
export class Scenegraph {
|
|
100
72
|
constructor(table) {
|
|
101
73
|
let width, height;
|
|
102
74
|
this.table = table, this.hasFrozen = !1, this.clear = !0, this.mergeMap = new Map,
|
|
103
|
-
setPoptipTheme(
|
|
75
|
+
setPoptipTheme(this.table.theme.textPopTipStyle), "node" === Env.mode ? (vglobal.setEnv("node", table.options.modeParams),
|
|
104
76
|
width = table.canvasWidth, height = table.canvasHeight) : (vglobal.setEnv("browser"),
|
|
105
77
|
width = table.canvas.width, height = table.canvas.height), this.stage = createStage({
|
|
106
78
|
canvas: table.canvas,
|
|
@@ -110,7 +82,6 @@ export class Scenegraph {
|
|
|
110
82
|
background: table.theme.underlayBackgroundColor,
|
|
111
83
|
dpr: table.internalProps.pixelRatio,
|
|
112
84
|
enableLayout: !0,
|
|
113
|
-
pluginList: table.isPivotChart() ? [ "poptipForText" ] : void 0,
|
|
114
85
|
afterRender: () => {
|
|
115
86
|
this.table.fireListeners("after_render", null);
|
|
116
87
|
}
|
|
@@ -164,7 +135,9 @@ export class Scenegraph {
|
|
|
164
135
|
}
|
|
165
136
|
clearCells() {
|
|
166
137
|
var _a;
|
|
167
|
-
this.
|
|
138
|
+
(this.table.isPivotChart() || this.table.hasCustomRenderOrLayout()) && this.stage.pluginService.findPluginsByName("poptipForText").forEach((plugin => {
|
|
139
|
+
plugin.deactivate(this.stage.pluginService);
|
|
140
|
+
})), this.clear = !0, this.hasFrozen = !1, this.mergeMap.clear(), this.colHeaderGroup.clear(),
|
|
168
141
|
this.rowHeaderGroup.clear(), this.cornerHeaderGroup.clear(), this.bodyGroup.clear(),
|
|
169
142
|
this.bottomFrozenGroup.clear(), this.rightFrozenGroup.clear(), this.rightTopCornerGroup.clear(),
|
|
170
143
|
this.rightBottomCornerGroup.clear(), this.leftBottomCornerGroup.clear(), this.colHeaderGroup.setAttributes({
|
|
@@ -231,7 +204,9 @@ export class Scenegraph {
|
|
|
231
204
|
this.selectedRangeComponents = new Map, this.selectingRangeComponents = new Map;
|
|
232
205
|
}
|
|
233
206
|
createSceneGraph() {
|
|
234
|
-
this.
|
|
207
|
+
(this.table.isPivotChart() || this.table.hasCustomRenderOrLayout()) && this.stage.pluginService.autoEnablePlugins.getContributions().forEach((p => {
|
|
208
|
+
"poptipForText" === p.name && this.stage.pluginService.register(p);
|
|
209
|
+
})), this.clear = !1, this.frozenColCount = this.table.frozenColCount, this.frozenRowCount = this.table.columnHeaderLevelCount,
|
|
235
210
|
this.proxy = new SceneProxy(this.table), createFrameBorder(this.tableGroup, this.table.theme.frameStyle, this.tableGroup.role, void 0, !0),
|
|
236
211
|
this.table.isPivotChart() && (createCornerCell(this.rightTopCornerGroup, this.table.theme.cornerRightTopCellStyle || this.table.theme.cornerHeaderStyle || {}),
|
|
237
212
|
createCornerCell(this.leftBottomCornerGroup, this.table.theme.cornerLeftBottomCellStyle || this.table.theme.cornerHeaderStyle || {}),
|
|
@@ -257,7 +232,7 @@ export class Scenegraph {
|
|
|
257
232
|
}
|
|
258
233
|
getColGroup(col, isCornerOrColHeader = !1) {
|
|
259
234
|
let element;
|
|
260
|
-
return element = col < this.frozenColCount && isCornerOrColHeader ? this.cornerHeaderGroup.getColGroup(col) : col < this.frozenColCount ? this.rowHeaderGroup.getColGroup(col) : isCornerOrColHeader ? this.
|
|
235
|
+
return element = col < this.frozenColCount && isCornerOrColHeader ? this.cornerHeaderGroup.getColGroup(col) : col < this.frozenColCount ? this.rowHeaderGroup.getColGroup(col) : isCornerOrColHeader && this.table.rightFrozenColCount > 0 && col > this.table.colCount - 1 - this.table.rightFrozenColCount ? this.rightTopCornerGroup.getColGroup(col) : !isCornerOrColHeader && this.table.rightFrozenColCount > 0 && col > this.table.colCount - 1 - this.table.rightFrozenColCount ? this.rightFrozenGroup.getColGroup(col) : isCornerOrColHeader ? this.colHeaderGroup.getColGroup(col) : this.bodyGroup.getColGroup(col),
|
|
261
236
|
element || void 0;
|
|
262
237
|
}
|
|
263
238
|
getColGroupInBottom(col) {
|
|
@@ -318,6 +293,12 @@ export class Scenegraph {
|
|
|
318
293
|
setIconNormalStyle(icon, col, row) {
|
|
319
294
|
setIconNormalStyle(icon, col, row, this);
|
|
320
295
|
}
|
|
296
|
+
residentHoverIcon(col, row) {
|
|
297
|
+
residentHoverIcon(col, row, this);
|
|
298
|
+
}
|
|
299
|
+
resetResidentHoverIcon(col, row) {
|
|
300
|
+
resetResidentHoverIcon(col, row, this);
|
|
301
|
+
}
|
|
321
302
|
deactivateChart(col, row) {
|
|
322
303
|
var _a, _b;
|
|
323
304
|
if (-1 === col || -1 === row) return;
|
|
@@ -469,10 +450,10 @@ export class Scenegraph {
|
|
|
469
450
|
}
|
|
470
451
|
updateContainerHeight(row, detaY) {
|
|
471
452
|
row < this.table.frozenRowCount ? (this.colHeaderGroup.setDeltaHeight(detaY), this.cornerHeaderGroup.setDeltaHeight(detaY),
|
|
472
|
-
this.rowHeaderGroup.setDeltaY(detaY), this.bodyGroup.setDeltaY(detaY)) : row >= this.table.rowCount - this.table.bottomFrozenRowCount ? (this.leftBottomCornerGroup.setDeltaHeight(detaY),
|
|
453
|
+
this.rowHeaderGroup.setDeltaY(detaY), this.bodyGroup.setDeltaY(detaY), this.rightFrozenGroup.setDeltaY(detaY)) : row >= this.table.rowCount - this.table.bottomFrozenRowCount ? (this.leftBottomCornerGroup.setDeltaHeight(detaY),
|
|
473
454
|
this.bottomFrozenGroup.setDeltaHeight(detaY), this.rightBottomCornerGroup.setDeltaHeight(detaY)) : (this.rowHeaderGroup.setDeltaHeight(detaY),
|
|
474
|
-
this.bodyGroup.setDeltaHeight(detaY)
|
|
475
|
-
this.updateNextFrame();
|
|
455
|
+
this.bodyGroup.setDeltaHeight(detaY), this.rightFrozenGroup.setDeltaHeight(detaY)),
|
|
456
|
+
this.updateTableSize(), this.component.updateScrollBar(), this.updateNextFrame();
|
|
476
457
|
}
|
|
477
458
|
setColWidth(col, width) {
|
|
478
459
|
const oldWidth = this.table.getColWidth(col);
|
|
@@ -693,12 +674,17 @@ export class Scenegraph {
|
|
|
693
674
|
getCellOverflowText(col, row) {
|
|
694
675
|
var _a, _b;
|
|
695
676
|
const text = this.getCell(col, row).getChildByName("text", !0);
|
|
696
|
-
if (text) {
|
|
677
|
+
if (text && "text" === text.type) {
|
|
697
678
|
const textAttributeStr = isArray(text.attribute.text) ? text.attribute.text.join("") : text.attribute.text;
|
|
698
679
|
let cacheStr = "";
|
|
699
680
|
if (isString(text.cache.clipedText) ? cacheStr = text.cache.clipedText : null === (_b = null === (_a = text.cache.layoutData) || void 0 === _a ? void 0 : _a.lines) || void 0 === _b || _b.forEach((line => {
|
|
700
681
|
cacheStr += line.str;
|
|
701
682
|
})), cacheStr !== textAttributeStr) return textAttributeStr;
|
|
683
|
+
} else if (text && "richtext" === text.type) {
|
|
684
|
+
const richtext = text;
|
|
685
|
+
if (richtext.attribute.ellipsis && richtext._frameCache && richtext.attribute.height < richtext._frameCache.actualHeight) {
|
|
686
|
+
return richtext.attribute.textConfig.find((item => item.text)).text;
|
|
687
|
+
}
|
|
702
688
|
}
|
|
703
689
|
return null;
|
|
704
690
|
}
|