@visactor/vtable 0.14.0 → 0.14.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.
Files changed (63) hide show
  1. package/cjs/core/BaseTable.js +1 -1
  2. package/cjs/core/BaseTable.js.map +1 -1
  3. package/cjs/event/listener/table-group.js +16 -8
  4. package/cjs/event/listener/table-group.js.map +1 -1
  5. package/cjs/index.d.ts +1 -1
  6. package/cjs/index.js +1 -1
  7. package/cjs/index.js.map +1 -1
  8. package/cjs/scenegraph/component/custom.d.ts +1 -0
  9. package/cjs/scenegraph/component/custom.js +3 -2
  10. package/cjs/scenegraph/component/custom.js.map +1 -1
  11. package/cjs/scenegraph/group-creater/column-helper.js +1 -1
  12. package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
  13. package/cjs/scenegraph/group-creater/progress/proxy.js +3 -1
  14. package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
  15. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +6 -2
  16. package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
  17. package/cjs/scenegraph/layout/compute-col-width.js +3 -2
  18. package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
  19. package/cjs/scenegraph/layout/compute-row-height.js +3 -2
  20. package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
  21. package/cjs/scenegraph/layout/update-row.js +31 -12
  22. package/cjs/scenegraph/layout/update-row.js.map +1 -1
  23. package/cjs/scenegraph/scenegraph.js +1 -1
  24. package/cjs/scenegraph/scenegraph.js.map +1 -1
  25. package/cjs/scenegraph/select/update-select-border.js +2 -2
  26. package/cjs/scenegraph/select/update-select-border.js.map +1 -1
  27. package/cjs/themes/DARK.js +2 -1
  28. package/cjs/themes/DEFAULT.js +1 -2
  29. package/cjs/ts-types/base-table.d.ts +2 -0
  30. package/cjs/ts-types/base-table.js.map +1 -1
  31. package/dist/vtable.js +92 -32
  32. package/dist/vtable.min.js +2 -2
  33. package/es/core/BaseTable.js +1 -1
  34. package/es/core/BaseTable.js.map +1 -1
  35. package/es/event/listener/table-group.js +16 -8
  36. package/es/event/listener/table-group.js.map +1 -1
  37. package/es/index.d.ts +1 -1
  38. package/es/index.js +1 -1
  39. package/es/index.js.map +1 -1
  40. package/es/scenegraph/component/custom.d.ts +1 -0
  41. package/es/scenegraph/component/custom.js +1 -1
  42. package/es/scenegraph/component/custom.js.map +1 -1
  43. package/es/scenegraph/group-creater/column-helper.js +1 -1
  44. package/es/scenegraph/group-creater/column-helper.js.map +1 -1
  45. package/es/scenegraph/group-creater/progress/proxy.js +3 -1
  46. package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
  47. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +6 -2
  48. package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
  49. package/es/scenegraph/layout/compute-col-width.js +4 -3
  50. package/es/scenegraph/layout/compute-col-width.js.map +1 -1
  51. package/es/scenegraph/layout/compute-row-height.js +4 -3
  52. package/es/scenegraph/layout/compute-row-height.js.map +1 -1
  53. package/es/scenegraph/layout/update-row.js +32 -11
  54. package/es/scenegraph/layout/update-row.js.map +1 -1
  55. package/es/scenegraph/scenegraph.js +1 -1
  56. package/es/scenegraph/scenegraph.js.map +1 -1
  57. package/es/scenegraph/select/update-select-border.js +2 -2
  58. package/es/scenegraph/select/update-select-border.js.map +1 -1
  59. package/es/themes/DARK.js +2 -1
  60. package/es/themes/DEFAULT.js +1 -2
  61. package/es/ts-types/base-table.d.ts +2 -0
  62. package/es/ts-types/base-table.js.map +1 -1
  63. package/package.json +8 -3
@@ -1 +1 @@
1
- {"version":3,"sources":["scenegraph/layout/compute-row-height.ts"],"names":[],"mappings":";;;AAAA,+CAA8D;AAE9D,2CAAiD;AAEjD,6CAA8C;AAG9C,0CAA2C;AAC3C,gDAA4C;AAC5C,8CAAgD;AAChD,gEAAiE;AACjE,+EAAsF;AACtF,2FAA2F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U,CAAC,MAAM,EAAE,CAAC;KAC9C;SAAM;QAEL,SAAS,GAAG,KAAK,CAAC,MAAM,GAAG,UAAU,CAAC;KACvC;IAED,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,UAAU,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC;AAC/E,CAAC;AAED,SAAS,WAAW,CAAC,GAAW,EAAE,GAAW,EAAE,KAAmB;IAChE,OAAO;QACL,IAAI,EAAE,CAAC;QACP,GAAG,EAAE,CAAC;QACN,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC;QAC7B,MAAM,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC;QAC/B,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC;QAC7B,MAAM,EAAE,CAAC;KACV,CAAC;AACJ,CAAC","file":"compute-row-height.js","sourcesContent":["import { RichText, Group as VGroup } from '@visactor/vrender';\nimport type { PivotHeaderLayoutMap } from '../../layout/pivot-header-layout';\nimport { validToString } from '../../tools/util';\nimport type { ColumnIconOption, ColumnTypeOption } from '../../ts-types';\nimport { IconPosition } from '../../ts-types';\nimport type { BaseTableAPI, HeaderData } from '../../ts-types/base-table';\nimport type { ColumnData, TextColumnDefine } from '../../ts-types/list-table/layout-map/api';\nimport { WrapText } from '../graphic/text';\nimport { getProp } from '../utils/get-prop';\nimport { getQuadProps } from '../utils/padding';\nimport { dealWithRichTextIcon } from '../utils/text-icon-layout';\nimport { getAxisConfigInPivotChart } from '../../layout/chart-helper/get-axis-config';\nimport { computeAxisComponentHeight } from '../../components/axis/get-axis-component-size';\nimport { isArray, isNumber, isObject } from '@visactor/vutils';\nimport { CheckBox } from '@visactor/vrender-components';\nimport { decodeReactDom } from '../component/custom';\n\nconst utilTextMark = new WrapText({\n ignoreBuf: true\n // autoWrapText: true\n});\nconst utilRichTextMark = new RichText({\n width: 0,\n height: 0,\n textConfig: []\n});\nconst utilCheckBoxMark = new CheckBox({});\n\nexport function computeRowsHeight(\n table: BaseTableAPI,\n rowStart?: number,\n rowEnd?: number,\n isClearRowRangeHeightsMap: boolean = true,\n update?: boolean\n): void {\n const time = typeof window !== 'undefined' ? window.performance.now() : 0;\n\n const oldRowHeights: number[] = [];\n const newHeights: number[] = [];\n if (update) {\n for (let row = 0; row < table.rowCount; row++) {\n // oldRowHeights.push(table.getRowHeight(row));\n oldRowHeights[row] = table.getRowHeight(row);\n }\n }\n\n table.defaultHeaderRowHeight;\n table.defaultHeaderColWidth;\n const isDefaultHeaderHasAuto =\n table.defaultHeaderRowHeight === 'auto' ||\n (isArray(table.defaultHeaderRowHeight) && table.defaultHeaderRowHeight.some(item => item === 'auto'));\n const isAllRowsAuto = table.heightMode === 'autoHeight' || table.heightMode === 'adaptive';\n\n if (isAllRowsAuto || isDefaultHeaderHasAuto) {\n rowStart = rowStart ?? 0;\n rowEnd = rowEnd ?? table.rowCount - 1;\n\n // clear rowRangeHeightsMap\n if ((rowStart === 0 && rowEnd === table.rowCount - 1) || isClearRowRangeHeightsMap) {\n table._clearRowRangeHeightsMap();\n }\n // else {\n // for (let row = rowStart; row <= rowEnd; row++) {\n // table._clearRowRangeHeightsMap(row);\n // }\n // }\n\n // compute header row in column header row\n for (let row = rowStart; row < table.columnHeaderLevelCount; row++) {\n if (isAllRowsAuto || table.getDefaultRowHeight(row) === 'auto') {\n const height = computeRowHeight(row, 0, table.colCount - 1, table);\n if (update) {\n newHeights[row] = height;\n } else {\n table.setRowHeight(row, height);\n }\n }\n }\n\n // compute bottom frozen row\n for (let row = table.rowCount - table.bottomFrozenRowCount; row <= rowEnd; row++) {\n if (isAllRowsAuto || table.getDefaultRowHeight(row) === 'auto') {\n const height = computeRowHeight(row, 0, table.colCount - 1, table);\n if (update) {\n newHeights[row] = height;\n } else {\n table.setRowHeight(row, height);\n }\n }\n }\n\n if (rowEnd < table.columnHeaderLevelCount || !isAllRowsAuto) {\n // do nothing\n } else {\n // compute body row\n if (\n // 以列展示 且符合只需要计算第一行其他行可复用行高的条条件\n !(\n table.internalProps.transpose ||\n (table.isPivotTable() && !(table.internalProps.layoutMap as PivotHeaderLayoutMap).indicatorsAsCol)\n ) &&\n checkFixedStyleAndNoWrap(table)\n ) {\n // check fixed style and no wrap situation, fill all row width single compute\n // traspose table and row indicator pivot table cannot use single row height\n const height = computeRowHeight(table.columnHeaderLevelCount, 0, table.colCount - 1, table);\n fillRowsHeight(\n height,\n table.columnHeaderLevelCount,\n table.rowCount - 1 - table.bottomFrozenRowCount,\n table,\n update ? newHeights : undefined\n );\n //底部冻结的行行高需要单独计算\n for (let row = table.rowCount - table.bottomFrozenRowCount; row <= rowEnd; row++) {\n const height = computeRowHeight(row, 0, table.colCount - 1, table);\n if (update) {\n newHeights[row] = height;\n } else {\n table.setRowHeight(row, height);\n }\n }\n } else if (\n // 以行展示\n table.internalProps.transpose ||\n (table.isPivotTable() && !(table.internalProps.layoutMap as PivotHeaderLayoutMap).indicatorsAsCol)\n ) {\n // check fixed style and no wrap situation, just compute 0-table.rowHeaderLevelCount column(the column after row header) in ervey row\n // in traspose table and row indicator pivot table\n for (let row = Math.max(rowStart, table.columnHeaderLevelCount); row <= rowEnd; row++) {\n // table._clearRowRangeHeightsMap(row);//注释掉 注意有无缓存问题\n let height;\n if (checkFixedStyleAndNoWrapForTranspose(table, row)) {\n // 以行展示 只计算到body第一列样式的情况即可\n height = computeRowHeight(row, 0, table.rowHeaderLevelCount, table);\n } else {\n height = computeRowHeight(row, 0, table.colCount - 1, table);\n }\n // table.setRowHeight(row, height);\n if (update) {\n newHeights[row] = height;\n } else {\n table.setRowHeight(row, height);\n }\n }\n } else {\n // 以列展示 需要逐行计算情况\n for (let row = Math.max(rowStart, table.columnHeaderLevelCount); row <= rowEnd; row++) {\n // table._clearRowRangeHeightsMap(row); //注释掉 注意有无缓存问题\n const height = computeRowHeight(row, 0, table.colCount - 1, table);\n // table.setRowHeight(row, height);\n if (update) {\n newHeights[row] = height;\n } else {\n table.setRowHeight(row, height);\n }\n }\n }\n }\n }\n\n if ((rowStart === 0 && rowEnd === table.rowCount - 1) || isClearRowRangeHeightsMap) {\n table._clearRowRangeHeightsMap();\n }\n\n // 处理adaptive高度\n if (table.heightMode === 'adaptive') {\n table._clearRowRangeHeightsMap();\n // const canvasWidth = table.internalProps.canvas.width;\n const columnHeaderHeight = table.getRowsHeight(0, table.columnHeaderLevelCount - 1);\n const bottomHeaderHeight = table.isPivotChart() ? table.getBottomFrozenRowsHeight() : 0;\n const totalDrawHeight = table.tableNoFrameHeight - columnHeaderHeight - bottomHeaderHeight;\n const startRow = table.columnHeaderLevelCount;\n const endRow = table.isPivotChart() ? table.rowCount - table.bottomFrozenRowCount : table.rowCount;\n let actualHeight = 0;\n for (let row = startRow; row < endRow; row++) {\n actualHeight += update ? newHeights[row] : table.getRowHeight(row);\n }\n const factor = totalDrawHeight / actualHeight;\n for (let row = startRow; row < endRow; row++) {\n let rowHeight;\n if (row === endRow - 1) {\n rowHeight =\n totalDrawHeight -\n (update\n ? newHeights.reduce((acr, cur, index) => {\n if (index >= startRow && index <= endRow - 2) {\n return acr + cur;\n }\n return acr;\n }, 0)\n : table.getRowsHeight(startRow, endRow - 2));\n } else {\n rowHeight = Math.round((update ? newHeights[row] : table.getRowHeight(row)) * factor);\n }\n if (update) {\n newHeights[row] = rowHeight;\n } else {\n table.setRowHeight(row, rowHeight, false);\n }\n }\n } else if (table.autoFillHeight) {\n table._clearRowRangeHeightsMap();\n const canvasHeight = table.tableNoFrameHeight;\n let actualHeight = 0;\n let actualHeaderHeight = 0;\n for (let row = 0; row < table.rowCount; row++) {\n const rowHeight = update ? newHeights[row] : table.getRowHeight(row);\n if (row < table.frozenRowCount || row >= table.rowCount - table.bottomFrozenRowCount) {\n actualHeaderHeight += rowHeight;\n }\n\n actualHeight += rowHeight;\n }\n\n // 如果内容高度小于canvas高度,执行adaptive放大\n if (actualHeight < canvasHeight && actualHeight - actualHeaderHeight > 0) {\n const factor = (canvasHeight - actualHeaderHeight) / (actualHeight - actualHeaderHeight);\n for (let row = table.frozenRowCount; row < table.rowCount - table.bottomFrozenRowCount; row++) {\n if (update) {\n newHeights[row] = newHeights[row] * factor;\n } else {\n table.setRowHeight(row, table.getRowHeight(row) * factor);\n }\n }\n }\n }\n\n if (update) {\n for (let row = 0; row < table.rowCount; row++) {\n const newRowHeight = newHeights[row] ?? table.getRowHeight(row);\n if (newRowHeight !== oldRowHeights[row]) {\n // update the row height in scenegraph\n table.scenegraph.updateRowHeight(row, newRowHeight - oldRowHeights[row]);\n }\n }\n }\n // console.log('computeRowsHeight time:', (typeof window !== 'undefined' ? window.performance.now() : 0) - time, rowStart, rowEnd);\n}\n\nexport function computeRowHeight(row: number, startCol: number, endCol: number, table: BaseTableAPI): number {\n let maxHeight = 0;\n // 如果是透视图\n if (\n table.isPivotChart() &&\n row >= table.columnHeaderLevelCount &&\n row < table.rowCount - table.bottomFrozenRowCount\n ) {\n if ((table.internalProps.layoutMap as PivotHeaderLayoutMap).indicatorsAsCol) {\n //并且指标是以列展示 计算行高需要根据y轴的值域范围\n const optimunHeight = (table.internalProps.layoutMap as PivotHeaderLayoutMap).getOptimunHeightForChart(row);\n if (optimunHeight > 0) {\n return optimunHeight;\n }\n } else {\n //直接拿默认行高\n const defaultHeight = table.getDefaultRowHeight(row);\n if (isNumber(defaultHeight)) {\n return defaultHeight;\n }\n }\n }\n for (let col = startCol; col <= endCol; col++) {\n // CustomRender height calculation\n const customHeight = computeCustomRenderHeight(col, row, table);\n if (typeof customHeight === 'number') {\n maxHeight = Math.max(customHeight, maxHeight);\n continue;\n }\n\n // Axis component height calculation\n if (table.isPivotChart()) {\n const layout = table.internalProps.layoutMap as PivotHeaderLayoutMap;\n const axisConfig = getAxisConfigInPivotChart(col, row, layout);\n if (axisConfig) {\n const axisWidth = computeAxisComponentHeight(axisConfig, table);\n if (typeof axisWidth === 'number') {\n maxHeight = Math.max(axisWidth, maxHeight);\n continue;\n }\n }\n }\n\n const cellType = table.isHeader(col, row)\n ? table._getHeaderLayoutMap(col, row)?.headerType\n : table.getBodyColumnType(col, row);\n if (cellType !== 'text' && cellType !== 'link' && cellType !== 'progressbar' && cellType !== 'checkbox') {\n // text&link&progressbar测量文字宽度\n // image&video&sparkline使用默认宽度\n const defaultHeight = table.getDefaultRowHeight(row);\n maxHeight = Math.max(maxHeight, isNumber(defaultHeight) ? defaultHeight : table.defaultRowHeight);\n continue;\n }\n\n // text height calculation\n const textHeight = computeTextHeight(col, row, cellType, table);\n maxHeight = Math.max(textHeight, maxHeight);\n }\n return maxHeight;\n}\n\nfunction checkFixedStyleAndNoWrap(table: BaseTableAPI): boolean {\n const { layoutMap } = table.internalProps;\n const row = table.columnHeaderLevelCount;\n //设置了全局自动换行的话 不能复用高度计算\n if (\n (table.internalProps.autoWrapText || table.isPivotChart()) &&\n (table.options.heightMode === 'autoHeight' || table.options.heightMode === 'adaptive')\n ) {\n return false;\n }\n for (let col = 0; col < table.colCount; col++) {\n const cellDefine = layoutMap.getBody(col, row);\n if (\n typeof cellDefine.style === 'function' ||\n typeof (cellDefine as ColumnData).icon === 'function' ||\n cellDefine.define?.customRender ||\n typeof cellDefine.define?.icon === 'function'\n ) {\n return false;\n }\n const cellStyle = table._getCellStyle(col, row); //获取的style是结合了theme配置的style\n if (\n typeof cellStyle.padding === 'function' ||\n typeof cellStyle.fontSize === 'function' ||\n typeof cellStyle.lineHeight === 'function' ||\n cellStyle.autoWrapText === true\n ) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction checkFixedStyleAndNoWrapForTranspose(table: BaseTableAPI, row: number): boolean {\n const { layoutMap } = table.internalProps;\n //设置了全局自动换行的话 不能复用高度计算\n if (\n table.internalProps.autoWrapText &&\n (table.options.heightMode === 'autoHeight' || table.options.heightMode === 'adaptive')\n ) {\n return false;\n }\n\n const cellDefine = layoutMap.getBody(table.rowHeaderLevelCount, row);\n if (\n typeof cellDefine.style === 'function' ||\n typeof (cellDefine as ColumnData).icon === 'function' ||\n cellDefine.define?.customRender ||\n typeof cellDefine.define?.icon === 'function'\n ) {\n return false;\n }\n const cellStyle = table._getCellStyle(table.rowHeaderLevelCount, row);\n if (\n typeof cellStyle.padding === 'function' ||\n typeof cellStyle.fontSize === 'function' ||\n typeof cellStyle.lineHeight === 'function' ||\n cellStyle.autoWrapText === true\n ) {\n return false;\n }\n\n return true;\n}\n\nfunction fillRowsHeight(\n height: number,\n startRow: number,\n endRow: number,\n table: BaseTableAPI,\n newHeights: number[] | undefined\n) {\n for (let row = startRow; row <= endRow; row++) {\n if (newHeights) {\n newHeights[row] = height;\n } else {\n table.setRowHeight(row, height);\n }\n }\n}\n\n/**\n * @description: compute customRender height\n * @param {number} col\n * @param {number} row\n * @param {BaseTableAPI} table\n * @return {*}\n */\nfunction computeCustomRenderHeight(col: number, row: number, table: BaseTableAPI): number | undefined {\n const customRender = table.getCustomRender(col, row);\n const customLayout = table.getCustomLayout(col, row);\n if (customRender || customLayout) {\n let spanRow = 1;\n let height = 0;\n if (table.isHeader(col, row) || (table.getBodyColumnDefine(col, row) as TextColumnDefine)?.mergeCell) {\n const cellRange = table.getCellRange(col, row);\n spanRow = cellRange.end.row - cellRange.start.row + 1;\n }\n const arg = {\n col,\n row,\n dataValue: table.getCellOriginValue(col, row),\n value: table.getCellValue(col, row) || '',\n rect: getCellRect(col, row, table),\n table\n };\n if (customLayout) {\n // 处理customLayout\n const customLayoutObj = customLayout(arg);\n if (customLayoutObj.rootContainer) {\n customLayoutObj.rootContainer = decodeReactDom(customLayoutObj.rootContainer);\n }\n if (customLayoutObj.rootContainer instanceof VGroup) {\n height = (customLayoutObj.rootContainer as VGroup).AABBBounds.height() ?? 0;\n // height = (customLayoutObj.rootContainer as VGroup).attribute.height ?? 0;\n // } else if (customLayoutObj.rootContainer) {\n // customLayoutObj.rootContainer.isRoot = true;\n // const size = customLayoutObj.rootContainer.getContentSize();\n // height = size.height ?? 0;\n } else {\n height = 0;\n }\n } else if (typeof customRender === 'function') {\n // 处理customRender\n const customRenderObj = customRender(arg);\n height = customRenderObj?.expectedHeight ?? 0;\n } else {\n height = customRender?.expectedHeight ?? 0;\n }\n return height / spanRow;\n }\n return undefined;\n}\n\n/**\n * @description: compute text height\n * @param {number} col\n * @param {number} row\n * @param {BaseTableAPI} table\n * @return {*}\n */\nfunction computeTextHeight(col: number, row: number, cellType: ColumnTypeOption, table: BaseTableAPI): number {\n let maxHeight = 0;\n const cellValue = table.getCellValue(col, row);\n // const dataValue = table.getCellOriginValue(col, row);\n const actStyle = table._getCellStyle(col, row);\n let iconHeight = 0;\n let iconWidth = 0;\n const iconInlineFront: ColumnIconOption[] = [];\n let iconInlineFrontHeight = 0;\n const iconInlineEnd: ColumnIconOption[] = [];\n let iconInlineEndHeight = 0;\n const define = table.getBodyColumnDefine(col, row);\n const mayHaveIcon = table.getCellLocation(col, row) !== 'body' ? true : !!define?.icon || !!define?.tree;\n if (mayHaveIcon) {\n const icons = table.getCellIcons(col, row);\n icons?.forEach(icon => {\n if (\n icon.positionType !== IconPosition.absoluteRight &&\n icon.positionType !== IconPosition.inlineFront &&\n icon.positionType !== IconPosition.inlineEnd\n ) {\n iconWidth += (icon.width ?? 0) + (icon.marginLeft ?? 0) + (icon.marginRight ?? 0);\n iconHeight = Math.max(iconHeight, icon.height ?? 0);\n } else if (icon.positionType === IconPosition.inlineFront) {\n iconInlineFront.push(icon);\n iconInlineFrontHeight = Math.max(\n iconInlineFrontHeight,\n (icon.height ?? 0) + (icon.marginLeft ?? 0) + (icon.marginRight ?? 0)\n );\n } else if (icon.positionType === IconPosition.inlineEnd) {\n iconInlineEnd.push(icon);\n iconInlineEndHeight = Math.max(\n iconInlineEndHeight,\n (icon.height ?? 0) + (icon.marginLeft ?? 0) + (icon.marginRight ?? 0)\n );\n }\n });\n }\n let spanRow = 1;\n let endCol = col;\n if (table.isHeader(col, row) || (table.getBodyColumnDefine(col, row) as TextColumnDefine)?.mergeCell) {\n const cellRange = table.getCellRange(col, row);\n spanRow = cellRange.end.row - cellRange.start.row + 1;\n col = cellRange.start.col;\n endCol = cellRange.end.col;\n }\n\n const padding = getQuadProps(getProp('padding', actStyle, col, row, table));\n const fontSize = getProp('fontSize', actStyle, col, row, table);\n const fontStyle = getProp('fontStyle', actStyle, col, row, table);\n const fontWeight = getProp('fontWeight', actStyle, col, row, table);\n const lineHeight = getProp('lineHeight', actStyle, col, row, table) ?? fontSize;\n const fontFamily = getProp('fontFamily', actStyle, col, row, table);\n const autoWrapText = getProp('autoWrapText', actStyle, col, row, table);\n let text;\n if (cellType === 'checkbox') {\n text = isObject(cellValue) ? (cellValue as any).text : cellValue;\n } else {\n text = cellValue;\n }\n const lines = validToString(text).split('\\n') || [];\n\n const cellWidth = table.getColsWidth(col, endCol);\n\n if (cellType === 'checkbox') {\n const size = getProp('size', actStyle, col, row, table);\n if (autoWrapText) {\n const spaceBetweenTextAndIcon = getProp('spaceBetweenTextAndIcon', actStyle, col, row, table);\n const maxLineWidth = cellWidth - (padding[1] + padding[3]) - iconWidth - size - spaceBetweenTextAndIcon;\n utilCheckBoxMark.setAttributes({\n text: {\n maxLineWidth,\n text: lines,\n fontSize,\n fontStyle,\n fontWeight,\n fontFamily,\n lineHeight,\n wordBreak: 'break-word'\n },\n icon: {\n width: Math.floor(size / 1.4), // icon : box => 10 : 14\n height: Math.floor(size / 1.4)\n },\n box: {\n width: size,\n height: size\n },\n spaceBetweenTextAndIcon\n });\n utilCheckBoxMark.render();\n maxHeight = utilTextMark.AABBBounds.height();\n } else {\n maxHeight = Math.max(size, lines.length * lineHeight);\n }\n } else if (iconInlineFront.length || iconInlineEnd.length) {\n // if (autoWrapText) {\n const textOption = Object.assign({\n text: cellValue?.toString(),\n fontFamily,\n fontSize,\n fontStyle,\n fontWeight,\n lineHeight\n });\n textOption.textBaseline = 'middle';\n const textConfig = [\n ...iconInlineFront.map(icon => dealWithRichTextIcon(icon)),\n textOption,\n ...iconInlineEnd.map(icon => dealWithRichTextIcon(icon))\n ];\n utilRichTextMark.setAttributes({\n width: cellWidth - (padding[1] + padding[3]) - iconWidth,\n height: 0,\n textConfig\n });\n maxHeight = utilRichTextMark.AABBBounds.height();\n // } else {\n // maxHeight = 0;\n // lines.forEach((line: string, index: number) => {\n // if (index === 0 && iconInlineFront.length) {\n // maxHeight += Math.max(lineHeight, iconInlineFrontHeight);\n // } else if (index === lines.length - 1 && iconInlineEnd.length) {\n // maxHeight += Math.max(lineHeight, iconInlineEndHeight);\n // } else {\n // maxHeight += lineHeight;\n // }\n // });\n // }\n } else if (autoWrapText) {\n const maxLineWidth = cellWidth - (padding[1] + padding[3]) - iconWidth;\n utilTextMark.setAttributes({\n maxLineWidth,\n text: lines,\n fontSize,\n fontStyle,\n fontWeight,\n fontFamily,\n lineHeight,\n wordBreak: 'break-word'\n });\n maxHeight = utilTextMark.AABBBounds.height();\n } else {\n // autoWrapText = false\n maxHeight = lines.length * lineHeight;\n }\n\n return (Math.max(maxHeight, iconHeight) + padding[0] + padding[2]) / spanRow;\n}\n\nfunction getCellRect(col: number, row: number, table: BaseTableAPI) {\n return {\n left: 0,\n top: 0,\n right: table.getColWidth(col),\n bottom: table.getRowHeight(row),\n width: table.getColWidth(col),\n height: 0\n };\n}\n"]}
1
+ {"version":3,"sources":["scenegraph/layout/compute-row-height.ts"],"names":[],"mappings":";;;AAAA,+CAA8D;AAE9D,2CAAiD;AAEjD,6CAA8C;AAG9C,0CAA2C;AAC3C,gDAA4C;AAC5C,8CAAgD;AAChD,gEAAiE;AACjE,+EAAsF;AACtF,2FAA2F;AAC3F,6CAA+D;AAC/D,qEAAwD;AACxD,gDAAsE;AAEtE,MAAM,YAAY,GAAG,IAAI,eAAQ,CAAC;IAChC,SAAS,EAAE,IAAI;CAEhB,CAAC,CAAC;AACH,MAAM,gBAAgB,GAAG,IAAI,kBAAQ,CAAC;IACpC,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,CAAC;IACT,UAAU,EAAE,EAAE;CACf,CAAC,CAA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OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,UAAU,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC;AAC/E,CAAC;AAED,SAAS,WAAW,CAAC,GAAW,EAAE,GAAW,EAAE,KAAmB;IAChE,OAAO;QACL,IAAI,EAAE,CAAC;QACP,GAAG,EAAE,CAAC;QACN,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC;QAC7B,MAAM,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC;QAC/B,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC;QAC7B,MAAM,EAAE,CAAC;KACV,CAAC;AACJ,CAAC","file":"compute-row-height.js","sourcesContent":["import { RichText, Group as VGroup } from '@visactor/vrender';\nimport type { PivotHeaderLayoutMap } from '../../layout/pivot-header-layout';\nimport { validToString } from '../../tools/util';\nimport type { ColumnIconOption, ColumnTypeOption } from '../../ts-types';\nimport { IconPosition } from '../../ts-types';\nimport type { BaseTableAPI, HeaderData } from '../../ts-types/base-table';\nimport type { ColumnData, TextColumnDefine } from '../../ts-types/list-table/layout-map/api';\nimport { WrapText } from '../graphic/text';\nimport { getProp } from '../utils/get-prop';\nimport { getQuadProps } from '../utils/padding';\nimport { dealWithRichTextIcon } from '../utils/text-icon-layout';\nimport { getAxisConfigInPivotChart } from '../../layout/chart-helper/get-axis-config';\nimport { computeAxisComponentHeight } from '../../components/axis/get-axis-component-size';\nimport { isArray, isNumber, isObject } from '@visactor/vutils';\nimport { CheckBox } from '@visactor/vrender-components';\nimport { decodeReactDom, dealPercentCalc } from '../component/custom';\n\nconst utilTextMark = new WrapText({\n ignoreBuf: true\n // autoWrapText: true\n});\nconst utilRichTextMark = new RichText({\n width: 0,\n height: 0,\n textConfig: []\n});\nconst utilCheckBoxMark = new CheckBox({});\n\nexport function computeRowsHeight(\n table: BaseTableAPI,\n rowStart?: number,\n rowEnd?: number,\n isClearRowRangeHeightsMap: boolean = true,\n update?: boolean\n): void {\n const time = typeof window !== 'undefined' ? window.performance.now() : 0;\n\n const oldRowHeights: number[] = [];\n const newHeights: number[] = [];\n if (update) {\n for (let row = 0; row < table.rowCount; row++) {\n // oldRowHeights.push(table.getRowHeight(row));\n oldRowHeights[row] = table.getRowHeight(row);\n }\n }\n\n table.defaultHeaderRowHeight;\n table.defaultHeaderColWidth;\n const isDefaultHeaderHasAuto =\n table.defaultHeaderRowHeight === 'auto' ||\n (isArray(table.defaultHeaderRowHeight) && table.defaultHeaderRowHeight.some(item => item === 'auto'));\n const isAllRowsAuto = table.heightMode === 'autoHeight' || table.heightMode === 'adaptive';\n\n if (isAllRowsAuto || isDefaultHeaderHasAuto) {\n rowStart = rowStart ?? 0;\n rowEnd = rowEnd ?? table.rowCount - 1;\n\n // clear rowRangeHeightsMap\n if ((rowStart === 0 && rowEnd === table.rowCount - 1) || isClearRowRangeHeightsMap) {\n table._clearRowRangeHeightsMap();\n }\n // else {\n // for (let row = rowStart; row <= rowEnd; row++) {\n // table._clearRowRangeHeightsMap(row);\n // }\n // }\n\n // compute header row in column header row\n for (let row = rowStart; row < table.columnHeaderLevelCount; row++) {\n if (isAllRowsAuto || table.getDefaultRowHeight(row) === 'auto') {\n const height = computeRowHeight(row, 0, table.colCount - 1, table);\n if (update) {\n newHeights[row] = height;\n } else {\n table.setRowHeight(row, height);\n }\n }\n }\n\n // compute bottom frozen row\n for (let row = table.rowCount - table.bottomFrozenRowCount; row <= rowEnd; row++) {\n if (isAllRowsAuto || table.getDefaultRowHeight(row) === 'auto') {\n const height = computeRowHeight(row, 0, table.colCount - 1, table);\n if (update) {\n newHeights[row] = height;\n } else {\n table.setRowHeight(row, height);\n }\n }\n }\n\n if (rowEnd < table.columnHeaderLevelCount || !isAllRowsAuto) {\n // do nothing\n } else {\n // compute body row\n if (\n // 以列展示 且符合只需要计算第一行其他行可复用行高的条条件\n !(\n table.internalProps.transpose ||\n (table.isPivotTable() && !(table.internalProps.layoutMap as PivotHeaderLayoutMap).indicatorsAsCol)\n ) &&\n checkFixedStyleAndNoWrap(table)\n ) {\n // check fixed style and no wrap situation, fill all row width single compute\n // traspose table and row indicator pivot table cannot use single row height\n const height = computeRowHeight(table.columnHeaderLevelCount, 0, table.colCount - 1, table);\n fillRowsHeight(\n height,\n table.columnHeaderLevelCount,\n table.rowCount - 1 - table.bottomFrozenRowCount,\n table,\n update ? newHeights : undefined\n );\n //底部冻结的行行高需要单独计算\n for (let row = table.rowCount - table.bottomFrozenRowCount; row <= rowEnd; row++) {\n const height = computeRowHeight(row, 0, table.colCount - 1, table);\n if (update) {\n newHeights[row] = height;\n } else {\n table.setRowHeight(row, height);\n }\n }\n } else if (\n // 以行展示\n table.internalProps.transpose ||\n (table.isPivotTable() && !(table.internalProps.layoutMap as PivotHeaderLayoutMap).indicatorsAsCol)\n ) {\n // check fixed style and no wrap situation, just compute 0-table.rowHeaderLevelCount column(the column after row header) in ervey row\n // in traspose table and row indicator pivot table\n for (let row = Math.max(rowStart, table.columnHeaderLevelCount); row <= rowEnd; row++) {\n // table._clearRowRangeHeightsMap(row);//注释掉 注意有无缓存问题\n let height;\n if (checkFixedStyleAndNoWrapForTranspose(table, row)) {\n // 以行展示 只计算到body第一列样式的情况即可\n height = computeRowHeight(row, 0, table.rowHeaderLevelCount, table);\n } else {\n height = computeRowHeight(row, 0, table.colCount - 1, table);\n }\n // table.setRowHeight(row, height);\n if (update) {\n newHeights[row] = height;\n } else {\n table.setRowHeight(row, height);\n }\n }\n } else {\n // 以列展示 需要逐行计算情况\n for (let row = Math.max(rowStart, table.columnHeaderLevelCount); row <= rowEnd; row++) {\n // table._clearRowRangeHeightsMap(row); //注释掉 注意有无缓存问题\n const height = computeRowHeight(row, 0, table.colCount - 1, table);\n // table.setRowHeight(row, height);\n if (update) {\n newHeights[row] = height;\n } else {\n table.setRowHeight(row, height);\n }\n }\n }\n }\n }\n\n if ((rowStart === 0 && rowEnd === table.rowCount - 1) || isClearRowRangeHeightsMap) {\n table._clearRowRangeHeightsMap();\n }\n\n // 处理adaptive高度\n if (table.heightMode === 'adaptive') {\n table._clearRowRangeHeightsMap();\n // const canvasWidth = table.internalProps.canvas.width;\n const columnHeaderHeight = table.getRowsHeight(0, table.columnHeaderLevelCount - 1);\n const bottomHeaderHeight = table.isPivotChart() ? table.getBottomFrozenRowsHeight() : 0;\n const totalDrawHeight = table.tableNoFrameHeight - columnHeaderHeight - bottomHeaderHeight;\n const startRow = table.columnHeaderLevelCount;\n const endRow = table.isPivotChart() ? table.rowCount - table.bottomFrozenRowCount : table.rowCount;\n let actualHeight = 0;\n for (let row = startRow; row < endRow; row++) {\n actualHeight += update ? newHeights[row] : table.getRowHeight(row);\n }\n const factor = totalDrawHeight / actualHeight;\n for (let row = startRow; row < endRow; row++) {\n let rowHeight;\n if (row === endRow - 1) {\n rowHeight =\n totalDrawHeight -\n (update\n ? newHeights.reduce((acr, cur, index) => {\n if (index >= startRow && index <= endRow - 2) {\n return acr + cur;\n }\n return acr;\n }, 0)\n : table.getRowsHeight(startRow, endRow - 2));\n } else {\n rowHeight = Math.round((update ? newHeights[row] : table.getRowHeight(row)) * factor);\n }\n if (update) {\n newHeights[row] = rowHeight;\n } else {\n table.setRowHeight(row, rowHeight, false);\n }\n }\n } else if (table.autoFillHeight) {\n table._clearRowRangeHeightsMap();\n const canvasHeight = table.tableNoFrameHeight;\n let actualHeight = 0;\n let actualHeaderHeight = 0;\n for (let row = 0; row < table.rowCount; row++) {\n const rowHeight = update ? newHeights[row] : table.getRowHeight(row);\n if (row < table.frozenRowCount || row >= table.rowCount - table.bottomFrozenRowCount) {\n actualHeaderHeight += rowHeight;\n }\n\n actualHeight += rowHeight;\n }\n\n // 如果内容高度小于canvas高度,执行adaptive放大\n if (actualHeight < canvasHeight && actualHeight - actualHeaderHeight > 0) {\n const factor = (canvasHeight - actualHeaderHeight) / (actualHeight - actualHeaderHeight);\n for (let row = table.frozenRowCount; row < table.rowCount - table.bottomFrozenRowCount; row++) {\n if (update) {\n newHeights[row] = newHeights[row] * factor;\n } else {\n table.setRowHeight(row, table.getRowHeight(row) * factor);\n }\n }\n }\n }\n\n if (update) {\n for (let row = 0; row < table.rowCount; row++) {\n const newRowHeight = newHeights[row] ?? table.getRowHeight(row);\n if (newRowHeight !== oldRowHeights[row]) {\n // update the row height in scenegraph\n table.scenegraph.updateRowHeight(row, newRowHeight - oldRowHeights[row]);\n }\n }\n }\n // console.log('computeRowsHeight time:', (typeof window !== 'undefined' ? window.performance.now() : 0) - time, rowStart, rowEnd);\n}\n\nexport function computeRowHeight(row: number, startCol: number, endCol: number, table: BaseTableAPI): number {\n let maxHeight = 0;\n // 如果是透视图\n if (\n table.isPivotChart() &&\n row >= table.columnHeaderLevelCount &&\n row < table.rowCount - table.bottomFrozenRowCount\n ) {\n if ((table.internalProps.layoutMap as PivotHeaderLayoutMap).indicatorsAsCol) {\n //并且指标是以列展示 计算行高需要根据y轴的值域范围\n const optimunHeight = (table.internalProps.layoutMap as PivotHeaderLayoutMap).getOptimunHeightForChart(row);\n if (optimunHeight > 0) {\n return optimunHeight;\n }\n } else {\n //直接拿默认行高\n const defaultHeight = table.getDefaultRowHeight(row);\n if (isNumber(defaultHeight)) {\n return defaultHeight;\n }\n }\n }\n for (let col = startCol; col <= endCol; col++) {\n // CustomRender height calculation\n const customHeight = computeCustomRenderHeight(col, row, table);\n if (typeof customHeight === 'number') {\n maxHeight = Math.max(customHeight, maxHeight);\n continue;\n }\n\n // Axis component height calculation\n if (table.isPivotChart()) {\n const layout = table.internalProps.layoutMap as PivotHeaderLayoutMap;\n const axisConfig = getAxisConfigInPivotChart(col, row, layout);\n if (axisConfig) {\n const axisWidth = computeAxisComponentHeight(axisConfig, table);\n if (typeof axisWidth === 'number') {\n maxHeight = Math.max(axisWidth, maxHeight);\n continue;\n }\n }\n }\n\n const cellType = table.isHeader(col, row)\n ? table._getHeaderLayoutMap(col, row)?.headerType\n : table.getBodyColumnType(col, row);\n if (cellType !== 'text' && cellType !== 'link' && cellType !== 'progressbar' && cellType !== 'checkbox') {\n // text&link&progressbar测量文字宽度\n // image&video&sparkline使用默认宽度\n const defaultHeight = table.getDefaultRowHeight(row);\n maxHeight = Math.max(maxHeight, isNumber(defaultHeight) ? defaultHeight : table.defaultRowHeight);\n continue;\n }\n\n // text height calculation\n const textHeight = computeTextHeight(col, row, cellType, table);\n maxHeight = Math.max(textHeight, maxHeight);\n }\n return maxHeight;\n}\n\nfunction checkFixedStyleAndNoWrap(table: BaseTableAPI): boolean {\n const { layoutMap } = table.internalProps;\n const row = table.columnHeaderLevelCount;\n //设置了全局自动换行的话 不能复用高度计算\n if (\n (table.internalProps.autoWrapText || table.isPivotChart()) &&\n (table.options.heightMode === 'autoHeight' || table.options.heightMode === 'adaptive')\n ) {\n return false;\n }\n for (let col = 0; col < table.colCount; col++) {\n const cellDefine = layoutMap.getBody(col, row);\n if (\n typeof cellDefine.style === 'function' ||\n typeof (cellDefine as ColumnData).icon === 'function' ||\n cellDefine.define?.customRender ||\n typeof cellDefine.define?.icon === 'function'\n ) {\n return false;\n }\n const cellStyle = table._getCellStyle(col, row); //获取的style是结合了theme配置的style\n if (\n typeof cellStyle.padding === 'function' ||\n typeof cellStyle.fontSize === 'function' ||\n typeof cellStyle.lineHeight === 'function' ||\n cellStyle.autoWrapText === true\n ) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction checkFixedStyleAndNoWrapForTranspose(table: BaseTableAPI, row: number): boolean {\n const { layoutMap } = table.internalProps;\n //设置了全局自动换行的话 不能复用高度计算\n if (\n table.internalProps.autoWrapText &&\n (table.options.heightMode === 'autoHeight' || table.options.heightMode === 'adaptive')\n ) {\n return false;\n }\n\n const cellDefine = layoutMap.getBody(table.rowHeaderLevelCount, row);\n if (\n typeof cellDefine.style === 'function' ||\n typeof (cellDefine as ColumnData).icon === 'function' ||\n cellDefine.define?.customRender ||\n typeof cellDefine.define?.icon === 'function'\n ) {\n return false;\n }\n const cellStyle = table._getCellStyle(table.rowHeaderLevelCount, row);\n if (\n typeof cellStyle.padding === 'function' ||\n typeof cellStyle.fontSize === 'function' ||\n typeof cellStyle.lineHeight === 'function' ||\n cellStyle.autoWrapText === true\n ) {\n return false;\n }\n\n return true;\n}\n\nfunction fillRowsHeight(\n height: number,\n startRow: number,\n endRow: number,\n table: BaseTableAPI,\n newHeights: number[] | undefined\n) {\n for (let row = startRow; row <= endRow; row++) {\n if (newHeights) {\n newHeights[row] = height;\n } else {\n table.setRowHeight(row, height);\n }\n }\n}\n\n/**\n * @description: compute customRender height\n * @param {number} col\n * @param {number} row\n * @param {BaseTableAPI} table\n * @return {*}\n */\nfunction computeCustomRenderHeight(col: number, row: number, table: BaseTableAPI): number | undefined {\n const customRender = table.getCustomRender(col, row);\n const customLayout = table.getCustomLayout(col, row);\n if (customRender || customLayout) {\n let spanRow = 1;\n let height = 0;\n if (table.isHeader(col, row) || (table.getBodyColumnDefine(col, row) as TextColumnDefine)?.mergeCell) {\n const cellRange = table.getCellRange(col, row);\n spanRow = cellRange.end.row - cellRange.start.row + 1;\n }\n const arg = {\n col,\n row,\n dataValue: table.getCellOriginValue(col, row),\n value: table.getCellValue(col, row) || '',\n rect: getCellRect(col, row, table),\n table\n };\n if (customLayout) {\n // 处理customLayout\n const customLayoutObj = customLayout(arg);\n if (customLayoutObj.rootContainer instanceof VGroup) {\n customLayoutObj.rootContainer = decodeReactDom(customLayoutObj.rootContainer);\n dealPercentCalc(customLayoutObj.rootContainer, table.getColWidth(col), 0);\n customLayoutObj.rootContainer.setStage(table.scenegraph.stage);\n // debugger\n height = (customLayoutObj.rootContainer as VGroup).AABBBounds.height() ?? 0;\n // height = (customLayoutObj.rootContainer as VGroup).attribute.height ?? 0;\n // } else if (customLayoutObj.rootContainer) {\n // customLayoutObj.rootContainer.isRoot = true;\n // const size = customLayoutObj.rootContainer.getContentSize();\n // height = size.height ?? 0;\n } else {\n height = 0;\n }\n } else if (typeof customRender === 'function') {\n // 处理customRender\n const customRenderObj = customRender(arg);\n height = customRenderObj?.expectedHeight ?? 0;\n } else {\n height = customRender?.expectedHeight ?? 0;\n }\n return height / spanRow;\n }\n return undefined;\n}\n\n/**\n * @description: compute text height\n * @param {number} col\n * @param {number} row\n * @param {BaseTableAPI} table\n * @return {*}\n */\nfunction computeTextHeight(col: number, row: number, cellType: ColumnTypeOption, table: BaseTableAPI): number {\n let maxHeight = 0;\n const cellValue = table.getCellValue(col, row);\n // const dataValue = table.getCellOriginValue(col, row);\n const actStyle = table._getCellStyle(col, row);\n let iconHeight = 0;\n let iconWidth = 0;\n const iconInlineFront: ColumnIconOption[] = [];\n let iconInlineFrontHeight = 0;\n const iconInlineEnd: ColumnIconOption[] = [];\n let iconInlineEndHeight = 0;\n const define = table.getBodyColumnDefine(col, row);\n const mayHaveIcon = table.getCellLocation(col, row) !== 'body' ? true : !!define?.icon || !!define?.tree;\n if (mayHaveIcon) {\n const icons = table.getCellIcons(col, row);\n icons?.forEach(icon => {\n if (\n icon.positionType !== IconPosition.absoluteRight &&\n icon.positionType !== IconPosition.inlineFront &&\n icon.positionType !== IconPosition.inlineEnd\n ) {\n iconWidth += (icon.width ?? 0) + (icon.marginLeft ?? 0) + (icon.marginRight ?? 0);\n iconHeight = Math.max(iconHeight, icon.height ?? 0);\n } else if (icon.positionType === IconPosition.inlineFront) {\n iconInlineFront.push(icon);\n iconInlineFrontHeight = Math.max(\n iconInlineFrontHeight,\n (icon.height ?? 0) + (icon.marginLeft ?? 0) + (icon.marginRight ?? 0)\n );\n } else if (icon.positionType === IconPosition.inlineEnd) {\n iconInlineEnd.push(icon);\n iconInlineEndHeight = Math.max(\n iconInlineEndHeight,\n (icon.height ?? 0) + (icon.marginLeft ?? 0) + (icon.marginRight ?? 0)\n );\n }\n });\n }\n let spanRow = 1;\n let endCol = col;\n if (table.isHeader(col, row) || (table.getBodyColumnDefine(col, row) as TextColumnDefine)?.mergeCell) {\n const cellRange = table.getCellRange(col, row);\n spanRow = cellRange.end.row - cellRange.start.row + 1;\n col = cellRange.start.col;\n endCol = cellRange.end.col;\n }\n\n const padding = getQuadProps(getProp('padding', actStyle, col, row, table));\n const fontSize = getProp('fontSize', actStyle, col, row, table);\n const fontStyle = getProp('fontStyle', actStyle, col, row, table);\n const fontWeight = getProp('fontWeight', actStyle, col, row, table);\n const lineHeight = getProp('lineHeight', actStyle, col, row, table) ?? fontSize;\n const fontFamily = getProp('fontFamily', actStyle, col, row, table);\n const autoWrapText = getProp('autoWrapText', actStyle, col, row, table);\n let text;\n if (cellType === 'checkbox') {\n text = isObject(cellValue) ? (cellValue as any).text : cellValue;\n } else {\n text = cellValue;\n }\n const lines = validToString(text).split('\\n') || [];\n\n const cellWidth = table.getColsWidth(col, endCol);\n\n if (cellType === 'checkbox') {\n const size = getProp('size', actStyle, col, row, table);\n if (autoWrapText) {\n const spaceBetweenTextAndIcon = getProp('spaceBetweenTextAndIcon', actStyle, col, row, table);\n const maxLineWidth = cellWidth - (padding[1] + padding[3]) - iconWidth - size - spaceBetweenTextAndIcon;\n utilCheckBoxMark.setAttributes({\n text: {\n maxLineWidth,\n text: lines,\n fontSize,\n fontStyle,\n fontWeight,\n fontFamily,\n lineHeight,\n wordBreak: 'break-word'\n },\n icon: {\n width: Math.floor(size / 1.4), // icon : box => 10 : 14\n height: Math.floor(size / 1.4)\n },\n box: {\n width: size,\n height: size\n },\n spaceBetweenTextAndIcon\n });\n utilCheckBoxMark.render();\n maxHeight = utilTextMark.AABBBounds.height();\n } else {\n maxHeight = Math.max(size, lines.length * lineHeight);\n }\n } else if (iconInlineFront.length || iconInlineEnd.length) {\n // if (autoWrapText) {\n const textOption = Object.assign({\n text: cellValue?.toString(),\n fontFamily,\n fontSize,\n fontStyle,\n fontWeight,\n lineHeight\n });\n textOption.textBaseline = 'middle';\n const textConfig = [\n ...iconInlineFront.map(icon => dealWithRichTextIcon(icon)),\n textOption,\n ...iconInlineEnd.map(icon => dealWithRichTextIcon(icon))\n ];\n utilRichTextMark.setAttributes({\n width: cellWidth - (padding[1] + padding[3]) - iconWidth,\n height: 0,\n textConfig\n });\n maxHeight = utilRichTextMark.AABBBounds.height();\n // } else {\n // maxHeight = 0;\n // lines.forEach((line: string, index: number) => {\n // if (index === 0 && iconInlineFront.length) {\n // maxHeight += Math.max(lineHeight, iconInlineFrontHeight);\n // } else if (index === lines.length - 1 && iconInlineEnd.length) {\n // maxHeight += Math.max(lineHeight, iconInlineEndHeight);\n // } else {\n // maxHeight += lineHeight;\n // }\n // });\n // }\n } else if (autoWrapText) {\n const maxLineWidth = cellWidth - (padding[1] + padding[3]) - iconWidth;\n utilTextMark.setAttributes({\n maxLineWidth,\n text: lines,\n fontSize,\n fontStyle,\n fontWeight,\n fontFamily,\n lineHeight,\n wordBreak: 'break-word'\n });\n maxHeight = utilTextMark.AABBBounds.height();\n } else {\n // autoWrapText = false\n maxHeight = lines.length * lineHeight;\n }\n\n return (Math.max(maxHeight, iconHeight) + padding[0] + padding[2]) / spanRow;\n}\n\nfunction getCellRect(col: number, row: number, table: BaseTableAPI) {\n return {\n left: 0,\n top: 0,\n right: table.getColWidth(col),\n bottom: table.getRowHeight(row),\n width: table.getColWidth(col),\n height: 0\n };\n}\n"]}
@@ -4,23 +4,31 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  }), exports.updateRow = void 0;
6
6
 
7
- const group_1 = require("../graphic/group"), cell_helper_1 = require("../group-creater/cell-helper"), get_cell_merge_1 = require("../utils/get-cell-merge");
7
+ const vutils_1 = require("@visactor/vutils"), group_1 = require("../graphic/group"), cell_helper_1 = require("../group-creater/cell-helper"), get_cell_merge_1 = require("../utils/get-cell-merge");
8
8
 
9
9
  function updateRow(removeCells, addCells, updateCells, table) {
10
- const scene = table.scenegraph, removeRows = deduplication(removeCells.map((cell => cell.row))).sort(((a, b) => a - b)), addRows = deduplication(addCells.map((cell => cell.row))).sort(((a, b) => a - b));
10
+ const scene = table.scenegraph, removeRows = deduplication(removeCells.map((cell => cell.row))).sort(((a, b) => b - a)), addRows = deduplication(addCells.map((cell => cell.row))).sort(((a, b) => a - b));
11
11
  removeRows.forEach((row => {
12
12
  removeRow(row, scene);
13
- })), removeRows.length && resetRowNumber(scene), addRows.forEach((row => {
14
- addRow(row, scene);
15
- })), updateCells.forEach((cell => {
13
+ })), removeRows.forEach((row => {
14
+ scene.table.rowHeightsMap.adjustOrder(row + 1, row, scene.table.rowHeightsMap.count() - row - 1),
15
+ scene.table.rowHeightsMap.del(scene.table.rowHeightsMap.count() - 1);
16
+ })), removeRows.length && resetRowNumber(scene), scene.table._clearRowRangeHeightsMap(),
17
+ addRows.forEach((row => {
18
+ addRow(row, scene), scene.table.rowHeightsMap.adjustOrder(row, row + 1, scene.table.rowHeightsMap.count() - row);
19
+ }));
20
+ const newTotalHeight = resetRowNumberAndY(scene);
21
+ if (updateCells.forEach((cell => {
16
22
  if (!cell) return;
17
23
  const mergeInfo = (0, get_cell_merge_1.getCellMergeInfo)(scene.table, cell.col, cell.row);
18
24
  if (mergeInfo) for (let col = mergeInfo.start.col; col <= mergeInfo.end.col; col++) for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) (0,
19
25
  cell_helper_1.updateCell)(col, row, scene.table, !1); else (0, cell_helper_1.updateCell)(cell.col, cell.row, scene.table, !1);
20
- }));
21
- const newTotalHeight = resetRowNumberAndY(scene);
22
- addRows.length && (scene.proxy.rowUpdatePos = scene.proxy.rowStart, scene.proxy.rowUpdateDirection = "up",
23
- scene.proxy.updateCellGroups(2 * scene.proxy.screenRowCount), scene.proxy.progress()),
26
+ })), addRows.length) {
27
+ const minRow = Math.min(...addRows);
28
+ scene.proxy.rowUpdatePos = minRow, scene.proxy.rowUpdateDirection = "up", scene.proxy.updateCellGroups(2 * scene.proxy.screenRowCount),
29
+ scene.proxy.progress();
30
+ } else removeRows.length && (scene.proxy.updateCellGroups(2 * scene.proxy.screenRowCount),
31
+ scene.proxy.progress());
24
32
  scene.updateContainerHeight(scene.table.frozenRowCount, newTotalHeight - scene.bodyGroup.attribute.height);
25
33
  }
26
34
 
@@ -30,9 +38,11 @@ function removeRow(row, scene) {
30
38
  if (!colGroup) continue;
31
39
  let cellGroup;
32
40
  colGroup.forEachChildren((cell => cell.row === row && (cellGroup = cell, !0))),
33
- cellGroup && colGroup.removeChild(cellGroup);
41
+ cellGroup && (colGroup.updateColumnHeight(-cellGroup.attribute.height), colGroup.removeChild(cellGroup));
34
42
  }
35
- scene.proxy.rowEnd--, scene.proxy.bodyBottomRow--, scene.proxy.currentRow--, scene.proxy.totalRow--;
43
+ row <= scene.proxy.rowEnd && (scene.proxy.rowEnd--, scene.proxy.currentRow--), scene.proxy.bodyBottomRow--;
44
+ const totalActualBodyRowCount = Math.min(scene.proxy.rowLimit, scene.proxy.bodyBottomRow - scene.proxy.bodyTopRow + 1);
45
+ scene.proxy.totalActualBodyRowCount = totalActualBodyRowCount, scene.proxy.totalRow = scene.proxy.bodyTopRow + totalActualBodyRowCount - 1;
36
46
  }
37
47
 
38
48
  function addRow(row, scene) {
@@ -53,7 +63,7 @@ function addRow(row, scene) {
53
63
  cellBefore !== colGroup.lastChild && colGroup.lastChild && (colGroup.lastChild.row = colGroup.lastChild.row + 1));
54
64
  }
55
65
  }
56
- scene.proxy.rowEnd++, scene.proxy.bodyBottomRow++, scene.proxy.currentRow++, scene.proxy.totalRow++;
66
+ scene.proxy.bodyBottomRow++, scene.proxy.totalRow++, scene.proxy.rowEnd++, scene.proxy.currentRow++;
57
67
  }
58
68
 
59
69
  function deduplication(array) {
@@ -69,9 +79,15 @@ function resetRowNumber(scene) {
69
79
  if (!headerColGroup || !colGroup) continue;
70
80
  let rowIndex = null === (_a = headerColGroup.firstChild) || void 0 === _a ? void 0 : _a.row;
71
81
  headerColGroup.forEachChildren((cellGroup => {
82
+ const oldRow = cellGroup.row;
83
+ (0, vutils_1.isNumber)(cellGroup.mergeStartRow) && (cellGroup.mergeStartRow = cellGroup.mergeStartRow - oldRow + rowIndex),
84
+ (0, vutils_1.isNumber)(cellGroup.mergeEndRow) && (cellGroup.mergeEndRow = cellGroup.mergeEndRow - oldRow + rowIndex),
72
85
  cellGroup.row = rowIndex, rowIndex++;
73
86
  })), rowIndex = null === (_b = colGroup.firstChild) || void 0 === _b ? void 0 : _b.row,
74
87
  colGroup.forEachChildren((cellGroup => {
88
+ const oldRow = cellGroup.row;
89
+ (0, vutils_1.isNumber)(cellGroup.mergeStartRow) && (cellGroup.mergeStartRow = cellGroup.mergeStartRow - oldRow + rowIndex),
90
+ (0, vutils_1.isNumber)(cellGroup.mergeEndRow) && (cellGroup.mergeEndRow = cellGroup.mergeEndRow - oldRow + rowIndex),
75
91
  cellGroup.row = rowIndex, rowIndex++;
76
92
  }));
77
93
  }
@@ -87,6 +103,9 @@ function resetRowNumberAndY(scene) {
87
103
  let rowIndex = null === (_a = headerColGroup.firstChild) || void 0 === _a ? void 0 : _a.row, y = 0;
88
104
  rowIndex = null === (_b = colGroup.firstChild) || void 0 === _b ? void 0 : _b.row;
89
105
  y = 0, colGroup.forEachChildren((cellGroup => {
106
+ const oldRow = cellGroup.row;
107
+ (0, vutils_1.isNumber)(cellGroup.mergeStartRow) && (cellGroup.mergeStartRow = cellGroup.mergeStartRow - oldRow + rowIndex),
108
+ (0, vutils_1.isNumber)(cellGroup.mergeEndRow) && (cellGroup.mergeEndRow = cellGroup.mergeEndRow - oldRow + rowIndex),
90
109
  cellGroup.row = rowIndex, rowIndex++, "cell" === cellGroup.role && (cellGroup.setAttribute("y", y),
91
110
  y += cellGroup.attribute.height);
92
111
  })), newTotalHeight = y;
@@ -1 +1 @@
1
- {"version":3,"sources":["scenegraph/layout/update-row.ts"],"names":[],"mappings":";;;AAGA,4CAAyC;AACzC,8DAA0D;AAE1D,4DAA2D;AAO3D,SAAgB,SAAS,CACvB,WAA0B,EAC1B,QAAuB,EACvB,WAA0B,EAC1B,KAAmB;IAEnB,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC;IAE/B,MAAM,UAAU,GAAG,aAAa,C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G,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC/C,IAAI,CAAC,cAAc,IAAI,CAAC,QAAQ,EAAE;YAChC,SAAS;SACV;QAED,IAAI,QAAQ,GAAG,MAAC,cAAc,CAAC,UAAoB,0CAAE,GAAG,CAAC;QACzD,IAAI,CAAC,GAAG,CAAC,CAAC;QAUV,QAAQ,GAAG,MAAC,QAAQ,CAAC,UAAoB,0CAAE,GAAG,CAAC;QAC/C,MAAM,QAAQ,GAAG,QAAQ,CAAC;QAC1B,CAAC,GAAG,CAAC,CAAC;QACN,QAAQ,CAAC,eAAe,CAAC,CAAC,SAAgB,EAAE,EAAE;YAC5C,SAAS,CAAC,GAAG,GAAG,QAAQ,CAAC;YACzB,QAAQ,EAAE,CAAC;YACX,IAAI,SAAS,CAAC,IAAI,KAAK,MAAM,EAAE;gBAC7B,OAAO;aACR;YACD,SAAS,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;YAC/B,CAAC,IAAI,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC;QAoBlC,CAAC,CAAC,CAAC;QACH,cAAc,GAAG,CAAC,CAAC;KAOpB;IACD,OAAO,cAAc,CAAC;AACxB,CAAC","file":"update-row.js","sourcesContent":["import type { IGraphic } from '@visactor/vrender';\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 { isMergeCellGroup } from '../utils/is-merge-cell-group';\nimport { resizeCellGroup } from '../group-creater/column-helper';\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) => a - b);\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 if (removeRows.length) {\n resetRowNumber(scene);\n }\n\n // add cells\n addRows.forEach(row => {\n addRow(row, scene);\n });\n\n // add cells\n updateCells.forEach(cell => {\n // updateRowAttr(row, scene);\n if (!cell) {\n return;\n }\n const mergeInfo = getCellMergeInfo(scene.table, cell.col, cell.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(cell.col, cell.row, scene.table, false);\n }\n });\n\n // reset attribute y and row number in CellGroup\n const newTotalHeight = resetRowNumberAndY(scene);\n\n if (addRows.length) {\n scene.proxy.rowUpdatePos = scene.proxy.rowStart;\n scene.proxy.rowUpdateDirection = 'up';\n scene.proxy.updateCellGroups(scene.proxy.screenRowCount * 2);\n scene.proxy.progress();\n }\n\n // update table size\n scene.updateContainerHeight(scene.table.frozenRowCount, newTotalHeight - scene.bodyGroup.attribute.height);\n}\n\nfunction removeRow(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.removeChild(cellGroup);\n }\n }\n // TODO 需要整体更新proxy的状态\n scene.proxy.rowEnd--;\n scene.proxy.bodyBottomRow--;\n scene.proxy.currentRow--;\n scene.proxy.totalRow--;\n}\n\nfunction addRow(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 } 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 (cellBefore !== colGroup.lastChild) {\n colGroup.lastChild && ((colGroup.lastChild as Group).row = (colGroup.lastChild as Group).row + 1);\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 // TODO 需要整体更新proxy的状态\n scene.proxy.rowEnd++;\n scene.proxy.bodyBottomRow++;\n scene.proxy.currentRow++;\n scene.proxy.totalRow++;\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 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 = (headerColGroup.firstChild as Group)?.row;\n headerColGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.row = rowIndex;\n rowIndex++;\n });\n rowIndex = (colGroup.firstChild as Group)?.row;\n colGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.row = rowIndex;\n rowIndex++;\n });\n }\n}\n\nfunction 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);\n if (!headerColGroup || !colGroup) {\n continue;\n }\n // reset row number\n let rowIndex = (headerColGroup.firstChild as Group)?.row;\n let y = 0;\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 rowIndex = (colGroup.firstChild as Group)?.row;\n const rowStart = rowIndex;\n y = 0;\n colGroup.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 // const { col, row } = cellGroup;\n // const mergeInfo = getCellMergeInfo(table, col, row);\n // if (mergeInfo) {\n // cellGroup.mergeStartCol = mergeInfo.start.col;\n // cellGroup.mergeStartRow = mergeInfo.start.row;\n // cellGroup.mergeEndCol = mergeInfo.end.col;\n // cellGroup.mergeEndRow = mergeInfo.end.row;\n\n // const rangeHeight = table.getRowHeight(row);\n // const rangeWidth = table.getColWidth(col);\n // cellGroup.forEachChildren((child: IGraphic) => {\n // child.setAttributes({\n // dx: 0,\n // dy: 0\n // });\n // });\n // resizeCellGroup(cellGroup, rangeWidth, rangeHeight, mergeInfo, table);\n // }\n });\n newTotalHeight = y;\n\n // const rowCount = rowIndex - rowStart;\n // if (col === 0 && scene.proxy.rowEnd - scene.proxy.rowStart + 1 !== rowCount) {\n // scene.proxy.rowEnd = scene.proxy.rowStart + rowCount - 1;\n // scene.proxy.referenceRow = scene.proxy.rowStart + Math.floor((scene.proxy.rowEnd - scene.proxy.rowStart) / 2);\n // }\n }\n return newTotalHeight;\n}\n"]}
1
+ {"version":3,"sources":["scenegraph/layout/update-row.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG5C,4CAAyC;AACzC,8DAA0D;AAE1D,4DAA2D;AAK3D,SAAgB,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,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;IAIpF,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;QACvB,SAAS,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACxB,CAAC,CAAC,CAAC;IAEH,UAAU,CAAC,O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,CAAC,CAAC,CAAC;QACH,cAAc,GAAG,CAAC,CAAC;KAOpB;IACD,OAAO,cAAc,CAAC;AACxB,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 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 addRows.forEach(row => {\n addRow(row, scene);\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\n // add cells\n updateCells.forEach(cell => {\n // updateRowAttr(row, scene);\n if (!cell) {\n return;\n }\n const mergeInfo = getCellMergeInfo(scene.table, cell.col, cell.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(cell.col, cell.row, scene.table, false);\n }\n });\n if (addRows.length) {\n const minRow = Math.min(...addRows);\n scene.proxy.rowUpdatePos = minRow;\n scene.proxy.rowUpdateDirection = 'up';\n scene.proxy.updateCellGroups(scene.proxy.screenRowCount * 2);\n scene.proxy.progress();\n } else if (removeRows.length) {\n scene.proxy.updateCellGroups(scene.proxy.screenRowCount * 2);\n scene.proxy.progress();\n }\n\n // update table size\n scene.updateContainerHeight(scene.table.frozenRowCount, newTotalHeight - scene.bodyGroup.attribute.height);\n}\n\nfunction removeRow(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 // TODO 需要整体更新proxy的状态\n if (row <= scene.proxy.rowEnd) {\n scene.proxy.rowEnd--;\n scene.proxy.currentRow--;\n }\n scene.proxy.bodyBottomRow--;\n // scene.proxy.totalRow--;\n const totalActualBodyRowCount = Math.min(\n scene.proxy.rowLimit,\n scene.proxy.bodyBottomRow - scene.proxy.bodyTopRow + 1\n ); // 渐进加载总row数量\n scene.proxy.totalActualBodyRowCount = totalActualBodyRowCount;\n scene.proxy.totalRow = scene.proxy.bodyTopRow + totalActualBodyRowCount - 1; // 目标渐进完成的row\n}\n\nfunction addRow(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 } 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 (cellBefore !== colGroup.lastChild) {\n colGroup.lastChild && ((colGroup.lastChild as Group).row = (colGroup.lastChild as Group).row + 1);\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 // 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\nfunction 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 = (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 rowIndex++;\n });\n rowIndex = (colGroup.firstChild as Group)?.row;\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 rowIndex++;\n });\n }\n}\n\nfunction 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);\n if (!headerColGroup || !colGroup) {\n continue;\n }\n // reset row number\n let rowIndex = (headerColGroup.firstChild as Group)?.row;\n let y = 0;\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 rowIndex = (colGroup.firstChild as Group)?.row;\n const rowStart = rowIndex;\n y = 0;\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 rowIndex++;\n if (cellGroup.role !== 'cell') {\n return;\n }\n cellGroup.setAttribute('y', y);\n y += cellGroup.attribute.height;\n\n // const { col, row } = cellGroup;\n // const mergeInfo = getCellMergeInfo(table, col, row);\n // if (mergeInfo) {\n // cellGroup.mergeStartCol = mergeInfo.start.col;\n // cellGroup.mergeStartRow = mergeInfo.start.row;\n // cellGroup.mergeEndCol = mergeInfo.end.col;\n // cellGroup.mergeEndRow = mergeInfo.end.row;\n\n // const rangeHeight = table.getRowHeight(row);\n // const rangeWidth = table.getColWidth(col);\n // cellGroup.forEachChildren((child: IGraphic) => {\n // child.setAttributes({\n // dx: 0,\n // dy: 0\n // });\n // });\n // resizeCellGroup(cellGroup, rangeWidth, rangeHeight, mergeInfo, table);\n // }\n });\n newTotalHeight = y;\n\n // const rowCount = rowIndex - rowStart;\n // if (col === 0 && scene.proxy.rowEnd - scene.proxy.rowStart + 1 !== rowCount) {\n // scene.proxy.rowEnd = scene.proxy.rowStart + rowCount - 1;\n // scene.proxy.referenceRow = scene.proxy.rowStart + Math.floor((scene.proxy.rowEnd - scene.proxy.rowStart) / 2);\n // }\n }\n return newTotalHeight;\n}\n"]}
@@ -640,7 +640,7 @@ class Scenegraph {
640
640
  updateRow(removeCells, addCells, updateCells = []) {
641
641
  (0, update_row_1.updateRow)(removeCells, addCells, updateCells, this.table), this.recalculateColWidths(),
642
642
  this.recalculateRowHeights(), this.table.stateManeger.checkFrozen(), this.isPivot || this.transpose || this.component.setFrozenColumnShadow(this.table.frozenColCount - 1),
643
- this.updateNextFrame();
643
+ this.component.updateScrollBar(), this.updateNextFrame();
644
644
  }
645
645
  getColumnGroupX(col) {
646
646
  return col < this.table.rowHeaderLevelCount ? this.table.getColsWidth(0, col - 1) : col < this.table.colCount - this.table.rightFrozenColCount ? this.table.getColsWidth(this.table.rowHeaderLevelCount, col - 1) : col < this.table.colCount ? this.table.getColsWidth(this.table.colCount - this.table.bottomFrozenRowCount, col - 1) : 0;