@visactor/vtable 1.26.3-alpha.0 → 1.26.4-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/cjs/ListTable.d.ts +1 -0
  2. package/cjs/ListTable.js +25 -4
  3. package/cjs/ListTable.js.map +1 -1
  4. package/cjs/PivotTable.js +7 -6
  5. package/cjs/PivotTable.js.map +1 -1
  6. package/cjs/body-helper/style.js +2 -1
  7. package/cjs/core/BaseTable.js +9 -8
  8. package/cjs/core/BaseTable.js.map +1 -1
  9. package/cjs/core/FouseInput.js +1 -2
  10. package/cjs/core/tableHelper.d.ts +2 -0
  11. package/cjs/core/tableHelper.js +13 -8
  12. package/cjs/core/tableHelper.js.map +1 -1
  13. package/cjs/data/CachedDataSource.d.ts +1 -0
  14. package/cjs/data/CachedDataSource.js +22 -0
  15. package/cjs/data/CachedDataSource.js.map +1 -1
  16. package/cjs/dataset/DataStatistics.js +2 -1
  17. package/cjs/dataset/flatDataToObject.js +1 -2
  18. package/cjs/event/EventHandler.js +1 -1
  19. package/cjs/event/EventTarget.js +1 -1
  20. package/cjs/event/drill.js +1 -1
  21. package/cjs/event/event.js +1 -1
  22. package/cjs/layout/pivot-header-layout.d.ts +2 -2
  23. package/cjs/layout/pivot-header-layout.js +1 -0
  24. package/cjs/plugins/interface.js +1 -2
  25. package/cjs/scenegraph/group-creater/cell-helper.d.ts +1 -1
  26. package/cjs/scenegraph/group-creater/cell-helper.js +5 -5
  27. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  28. package/cjs/scenegraph/group-creater/cell-type/text-cell.d.ts +1 -1
  29. package/cjs/scenegraph/group-creater/cell-type/text-cell.js +3 -2
  30. package/cjs/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
  31. package/cjs/scenegraph/group-creater/column-helper.js +9 -6
  32. package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
  33. package/cjs/scenegraph/layout/frozen.js +7 -3
  34. package/cjs/scenegraph/layout/frozen.js.map +1 -1
  35. package/cjs/scenegraph/scenegraph.js +23 -14
  36. package/cjs/scenegraph/scenegraph.js.map +1 -1
  37. package/cjs/scenegraph/utils/padding.d.ts +5 -2
  38. package/cjs/scenegraph/utils/padding.js +16 -13
  39. package/cjs/scenegraph/utils/padding.js.map +1 -1
  40. package/cjs/scenegraph/utils/text-icon-layout.js +4 -4
  41. package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
  42. package/cjs/state/state.js +1 -1
  43. package/cjs/themes/ARCO.js +1 -1
  44. package/cjs/themes/BRIGHT.js +1 -1
  45. package/dist/vtable.js +239 -89
  46. package/dist/vtable.min.js +1 -1
  47. package/es/ListTable.d.ts +1 -0
  48. package/es/ListTable.js +26 -6
  49. package/es/ListTable.js.map +1 -1
  50. package/es/PivotTable.js +7 -6
  51. package/es/PivotTable.js.map +1 -1
  52. package/es/body-helper/style.js +2 -1
  53. package/es/core/BaseTable.js +7 -7
  54. package/es/core/BaseTable.js.map +1 -1
  55. package/es/core/FouseInput.js +1 -2
  56. package/es/core/tableHelper.d.ts +2 -0
  57. package/es/core/tableHelper.js +11 -7
  58. package/es/core/tableHelper.js.map +1 -1
  59. package/es/data/CachedDataSource.d.ts +1 -0
  60. package/es/data/CachedDataSource.js +22 -0
  61. package/es/data/CachedDataSource.js.map +1 -1
  62. package/es/dataset/DataStatistics.js +2 -1
  63. package/es/dataset/flatDataToObject.js +1 -2
  64. package/es/event/EventHandler.js +1 -1
  65. package/es/event/EventTarget.js +1 -1
  66. package/es/event/drill.js +1 -1
  67. package/es/event/event.js +1 -1
  68. package/es/layout/pivot-header-layout.d.ts +2 -2
  69. package/es/layout/pivot-header-layout.js +2 -1
  70. package/es/plugins/interface.js +1 -2
  71. package/es/scenegraph/group-creater/cell-helper.d.ts +1 -1
  72. package/es/scenegraph/group-creater/cell-helper.js +5 -5
  73. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  74. package/es/scenegraph/group-creater/cell-type/text-cell.d.ts +1 -1
  75. package/es/scenegraph/group-creater/cell-type/text-cell.js +3 -2
  76. package/es/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
  77. package/es/scenegraph/group-creater/column-helper.js +9 -6
  78. package/es/scenegraph/group-creater/column-helper.js.map +1 -1
  79. package/es/scenegraph/layout/frozen.js +7 -3
  80. package/es/scenegraph/layout/frozen.js.map +1 -1
  81. package/es/scenegraph/scenegraph.js +23 -11
  82. package/es/scenegraph/scenegraph.js.map +1 -1
  83. package/es/scenegraph/utils/padding.d.ts +5 -2
  84. package/es/scenegraph/utils/padding.js +13 -9
  85. package/es/scenegraph/utils/padding.js.map +1 -1
  86. package/es/scenegraph/utils/text-icon-layout.js +4 -4
  87. package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
  88. package/es/state/state.js +1 -1
  89. package/es/themes/ARCO.js +1 -1
  90. package/es/themes/BRIGHT.js +1 -1
  91. package/package.json +4 -4
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/scenegraph/group-creater/column-helper.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAmB,MAAM,eAAe,CAAC;AAEnF,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAiBrD,MAAM,UAAU,mBAAmB,CACjC,WAAkB,EAClB,GAAW,EACX,QAAgB,EAChB,QAAgB,EAChB,MAAc,EACd,QAAkB,EAClB,gBAAmC,EACnC,KAAmB,EAEnB,QAAiB;IAEjB,IAAI,OAAO,CAAC;IAC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AAI,KAAK,CAAC,KAAK,CAAC,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE;YACtF,SAAS;YACT,UAAU;SACX,CAAC,CAAC;KACJ;SAAM;QACL,SAAS,GAAG,WAAW,CAAC,SAAS,CAAC;QAClC,UAAU,GAAG,WAAW,CAAC,UAAU,CAAC;KACrC;IACD,OAAO;QACL,SAAS;QACT,UAAU;KACX,CAAC;AACJ,CAAC;AAED,SAAS,oBAAoB,CAC3B,GAAW,EACX,GAAW,EACX,CAAS,EACT,CAAS,EACT,KAAa,EACb,MAAc,EACd,WAAkB;IAElB,MAAM,SAAS,GAAG,IAAI,KAAK,CAAC;QAC1B,CAAC;QACD,CAAC;QACD,KAAK;QACL,MAAM;KACP,CAAC,CAAC;IACH,SAAS,CAAC,IAAI,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,GAAG,GAAG,GAAG,CAAC;IACpB,SAAS,CAAC,GAAG,GAAG,GAAG,CAAC;IACpB,WAAW,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC","file":"column-helper.js","sourcesContent":["/* eslint-disable no-undef */\nimport type { IThemeSpec } from './../../vrender';\nimport type {\n CellLocation,\n CellRange,\n ColumnDefine,\n IRowSeriesNumber,\n ListTableConstructorOptions,\n TextColumnDefine\n} from '../../ts-types';\nimport { Group } from '../graphic/group';\nimport { getProp, getRawProp } from '../utils/get-prop';\nimport type { MergeMap } from '../scenegraph';\nimport { createCell, dealWithMergeCellSize, resizeCellGroup } from './cell-helper';\nimport type { BaseTableAPI, HeaderData, ListTableProtected } from '../../ts-types/base-table';\nimport { getCellCornerRadius, getStyleTheme } from '../../core/tableHelper';\nimport { isPromise } from '../../tools/helper';\nimport { dealPromiseData } from '../utils/deal-promise-data';\nimport { dealWithCustom } from '../component/custom';\n/**\n * 创建复合列 同一列支持创建不同类型单元格\n * @param columnGroup 列Group\n * @param col\n * @param colWidth 配置列宽\n * @param rowStart\n * @param rowEnd\n * @param mergeMap merge单元格信息\n * @param defaultRowHeight\n * @param table\n * @param cellLocation\n * @param rowLimit\n * @param customRender\n * @param customLayout\n * @returns\n */\nexport function createComplexColumn(\n columnGroup: Group,\n col: number,\n colWidth: number,\n rowStart: number,\n rowEnd: number,\n mergeMap: MergeMap,\n defaultRowHeight: number | number[],\n table: BaseTableAPI,\n // cellLocation: CellLocation,\n rowLimit?: number\n) {\n let padding;\n let textAlign;\n let textBaseline;\n /** useColumnTheme 判断是否可以使用columnTheme */\n // insert cell into column group top\n let y = 0;\n // if (columnGroup.colHeight) {\n // // insert cell into column group bottom\n // y = columnGroup.colHeight;\n // }\n if (columnGroup.lastChild && (columnGroup.lastChild as Group).row === rowStart - 1) {\n y = (columnGroup.lastChild as Group).attribute.y + (columnGroup.lastChild as Group).attribute.height;\n } else if (columnGroup.colHeight) {\n y = columnGroup.colHeight;\n } else if (rowStart >= table.columnHeaderLevelCount && rowStart < table.rowCount - table.bottomFrozenRowCount) {\n // 这个if判断为了解决#4357 当传入的rowStart例如50但是columnGroup中并没有其他cell的情况下,上面逻辑有问题y赋值的0 导致新建单元格错位\n y = table.getRowsHeight(table.columnHeaderLevelCount, rowStart - 1);\n }\n\n for (let j = rowStart; j <= rowEnd; j++) {\n const row = j;\n let cellLocation = table.getCellLocation(col, row);\n let value = table.getCellValue(col, row);\n\n // 处理单元格合并\n let cellWidth = colWidth;\n // let cellHeight = table.internalProps.autoRowHeight ? 0 : table.getRowHeight(row);\n let cellHeight = table.getRowHeight(row);\n let range;\n let isMerge;\n let customStyle;\n let customResult;\n let isCustomMerge = false;\n if (table.internalProps.customMergeCell) {\n const customMerge = table.getCustomMerge(col, row);\n if (customMerge) {\n const {\n range: customMergeRange,\n text: customMergeText,\n style: customMergeStyle,\n customLayout,\n customRender\n } = customMerge;\n range = customMergeRange;\n isMerge = range.start.col !== range.end.col || range.start.row !== range.end.row;\n if (isMerge) {\n const needUpdateRange = rowStart > range.start.row;\n const mergeSize = dealMerge(range, mergeMap, table, needUpdateRange);\n cellWidth = mergeSize.cellWidth;\n cellHeight = mergeSize.cellHeight;\n }\n value = customMergeText;\n customStyle = customMergeStyle;\n\n if (customLayout || customRender) {\n customResult = dealWithCustom(\n customLayout,\n customRender,\n customMergeRange.start.col,\n customMergeRange.start.row,\n table.getColsWidth(customMergeRange.start.col, customMergeRange.end.col),\n table.getRowsHeight(customMergeRange.start.row, customMergeRange.end.row),\n false,\n table.isAutoRowHeight(row),\n [0, 0, 0, 0],\n range,\n table\n );\n }\n\n isCustomMerge = true;\n }\n }\n\n let colForDefine = col;\n let rowForDefine = row;\n if (range) {\n colForDefine = range.start.col;\n rowForDefine = range.start.row;\n }\n\n // adjust cellLocation for top frozen row\n if (\n !table.isPivotTable() &&\n (cellLocation === 'columnHeader' || cellLocation === 'cornerHeader') &&\n row >= table.columnHeaderLevelCount\n ) {\n cellLocation = 'body';\n }\n let define;\n if (!table.isPivotTable() && table.isSeriesNumberInBody(col, row)) {\n // 序号列 传入的cellLocation是'rowHeader'(不清楚为什么)。这里处理下获取到的define值\n define = table.getBodyColumnDefine(colForDefine, rowForDefine);\n } else {\n define =\n cellLocation !== 'body'\n ? table.getHeaderDefine(colForDefine, rowForDefine)\n : table.getBodyColumnDefine(colForDefine, rowForDefine);\n }\n const isAggregation =\n 'isAggregation' in table.internalProps.layoutMap && table.internalProps.layoutMap.isAggregation(col, row);\n const isSeriesNumber = table.internalProps.layoutMap.isSeriesNumber(col, row);\n\n let mayHaveIcon =\n cellLocation !== 'body'\n ? true\n : ((define as IRowSeriesNumber)?.dragOrder || !!define?.icon || !!(define as ColumnDefine)?.tree) &&\n !(isAggregation && isSeriesNumber);\n if (\n !range &&\n (table.internalProps.enableTreeNodeMerge || cellLocation !== 'body' || (define as TextColumnDefine)?.mergeCell)\n ) {\n // 只有表头或者column配置合并单元格后再进行信息获取\n range = table.getCellRange(col, row);\n isMerge = range.start.col !== range.end.col || range.start.row !== range.end.row;\n // 所有Merge单元格,只保留左上角一个真实的单元格,其他使用空Group占位\n if (isMerge) {\n const needUpdateRange = rowStart > range.start.row;\n const mergeSize = dealMerge(range, mergeMap, table, needUpdateRange);\n cellWidth = mergeSize.cellWidth;\n cellHeight = mergeSize.cellHeight;\n }\n }\n let isVtableMerge = false;\n if (table.internalProps.enableTreeNodeMerge && isMerge) {\n const rawRecord = table.getCellRawRecord(range.start.col, range.start.row);\n const { vtableMergeName, vtableMerge } = rawRecord ?? {};\n\n isVtableMerge = vtableMerge;\n if (vtableMerge) {\n mayHaveIcon = true;\n if ((table.internalProps as ListTableProtected).groupTitleCustomLayout) {\n customResult = dealWithCustom(\n (table.internalProps as ListTableProtected).groupTitleCustomLayout,\n undefined,\n range.start.col,\n range.start.row,\n table.getColsWidth(range.start.col, range.end.col),\n table.getRowsHeight(range.start.row, range.end.row),\n false,\n table.isAutoRowHeight(row),\n [0, 0, 0, 0],\n range,\n table\n );\n }\n if ((table.internalProps as ListTableProtected).groupTitleFieldFormat) {\n value = (table.internalProps as ListTableProtected).groupTitleFieldFormat(rawRecord, col, row, table);\n } else if (vtableMergeName !== undefined) {\n value = vtableMergeName;\n }\n }\n }\n\n const type = isVtableMerge || isCustomMerge ? 'text' : table.getCellType(col, row);\n // deal with promise data\n if (isPromise(value)) {\n createEmptyCellGroup(col, row, 0, y, cellWidth, cellHeight, columnGroup);\n dealPromiseData(\n value,\n table,\n callCreateCellForPromiseValue.bind(null, {\n type,\n value,\n define,\n table,\n col,\n row,\n colWidth,\n cellWidth,\n cellHeight,\n columnGroup,\n y,\n customStyle,\n mayHaveIcon,\n cellLocation,\n range,\n customResult,\n defaultRowHeight\n })\n );\n columnGroup.updateColumnRowNumber(row);\n const height = table.getRowHeight(row);\n columnGroup.updateColumnHeight(height);\n y += height;\n } else {\n const cellStyle =\n customStyle || table._getCellStyle(range ? range.start.col : col, range ? range.start.row : row);\n const cellTheme = getStyleTheme(\n cellStyle,\n table,\n range ? range.start.col : col,\n range ? range.start.row : row,\n getProp\n ).theme;\n cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table);\n cellTheme.group.width = colWidth;\n cellTheme.group.height = Array.isArray(defaultRowHeight) ? defaultRowHeight[row] : defaultRowHeight;\n if (cellTheme._vtable.padding) {\n padding = cellTheme._vtable.padding;\n }\n if (cellTheme.text.textAlign) {\n textAlign = cellTheme.text.textAlign;\n }\n if (cellTheme.text.textBaseline) {\n textBaseline = cellTheme.text.textBaseline;\n }\n\n // enable clip body\n if (cellLocation !== 'body' && !cellTheme.group.fill) {\n cellTheme.group.fill = '#fff';\n }\n const cellGroup = createCell(\n type,\n value,\n define as ColumnDefine,\n table,\n col,\n row,\n colWidth,\n cellWidth,\n cellHeight,\n columnGroup,\n y,\n padding,\n textAlign,\n textBaseline,\n mayHaveIcon,\n cellTheme,\n range,\n customResult\n );\n columnGroup.updateColumnRowNumber(row);\n if (isMerge) {\n const rangeHeight = table.getRowHeight(row);\n const rangeWidth = table.getColWidth(col);\n\n const { width: contentWidth } = cellGroup.attribute;\n const { height: contentHeight } = cellGroup.attribute;\n cellGroup.contentWidth = contentWidth;\n cellGroup.contentHeight = contentHeight;\n\n // resizeCellGroup(cellGroup, rangeWidth, rangeHeight, range, table);\n dealWithMergeCellSize(range, contentWidth, contentHeight, padding, textAlign, textBaseline, table);\n columnGroup.updateColumnHeight(rangeHeight);\n y += rangeHeight;\n } else {\n // columnGroup.updateColumnHeight(cellGroup.attribute.height);\n // y += cellGroup.attribute.height;\n columnGroup.updateColumnHeight(cellHeight);\n y += cellHeight;\n }\n }\n if (rowLimit && row > rowLimit) {\n break;\n }\n }\n\n columnGroup.setAttribute('width', colWidth);\n return {\n width: colWidth,\n height: y\n };\n}\n\n/**\n * 获取列分组主题\n * @param col 列索引\n * @param colWidth 列宽\n * @param table 表格实例\n * @returns 列分组主题\n */\nexport function getColumnGroupTheme(\n col: number,\n colWidth: number,\n table: BaseTableAPI\n): { theme: IThemeSpec & { _vtable: any }; hasFunctionPros: boolean } {\n const style = table._getCellStyle(col, table.columnHeaderLevelCount); // to be fixed\n const { theme: columnTheme, hasFunctionPros } = getStyleTheme(\n style,\n table,\n col,\n table.columnHeaderLevelCount,\n getRawProp\n );\n\n // get column header style\n columnTheme.group.width = colWidth;\n columnTheme.group.height = 0;\n return { theme: columnTheme, hasFunctionPros };\n}\nfunction callCreateCellForPromiseValue(createCellArgs: any) {\n let padding;\n let textAlign;\n let textBaseline;\n const {\n type,\n value,\n define,\n table,\n col,\n row,\n colWidth,\n cellWidth,\n cellHeight,\n columnGroup,\n y,\n cellLocation,\n mayHaveIcon,\n customStyle,\n range,\n customResult,\n defaultRowHeight\n } = createCellArgs;\n const cellStyle = customStyle || table._getCellStyle(range ? range.start.col : col, range ? range.start.row : row);\n const cellTheme = getStyleTheme(\n cellStyle,\n table,\n range ? range.start.col : col,\n range ? range.start.row : row,\n getProp\n ).theme;\n cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table);\n cellTheme.group.width = colWidth;\n cellTheme.group.height = Array.isArray(defaultRowHeight) ? defaultRowHeight[row] : defaultRowHeight;\n if (cellTheme._vtable.padding) {\n padding = cellTheme._vtable.padding;\n }\n if (cellTheme.text.textAlign) {\n textAlign = cellTheme.text.textAlign;\n }\n if (cellTheme.text.textBaseline) {\n textBaseline = cellTheme.text.textBaseline;\n }\n\n // enable clip body\n if (cellLocation !== 'body' && !cellTheme.group.fill) {\n cellTheme.group.fill = '#fff';\n }\n createCell(\n type,\n value,\n define,\n table,\n col,\n row,\n colWidth,\n cellWidth,\n cellHeight,\n columnGroup,\n y,\n padding,\n textAlign,\n textBaseline,\n mayHaveIcon,\n cellTheme,\n range,\n customResult\n );\n}\nfunction dealMerge(range: CellRange, mergeMap: MergeMap, table: BaseTableAPI, forceUpdate: boolean) {\n let cellWidth = 0;\n let cellHeight = 0;\n const mergeResult = mergeMap.get(`${range.start.col},${range.start.row};${range.end.col},${range.end.row}`);\n if (!mergeResult || forceUpdate) {\n for (let col = range.start.col; col <= range.end.col; col++) {\n cellWidth += table.getColWidth(col);\n }\n\n // let cellHeight = 0;\n for (let i = range.start.row; i <= range.end.row; i++) {\n cellHeight += table.getRowHeight(i);\n }\n\n mergeMap.set(`${range.start.col},${range.start.row};${range.end.col},${range.end.row}`, {\n cellWidth,\n cellHeight\n });\n } else {\n cellWidth = mergeResult.cellWidth;\n cellHeight = mergeResult.cellHeight;\n }\n return {\n cellWidth,\n cellHeight\n };\n}\n\nfunction createEmptyCellGroup(\n col: number,\n row: number,\n x: number,\n y: number,\n width: number,\n height: number,\n columnGroup: Group\n) {\n const cellGroup = new Group({\n x,\n y,\n width,\n height\n });\n cellGroup.role = 'cell';\n cellGroup.col = col;\n cellGroup.row = row;\n columnGroup.addChild(cellGroup);\n}\n"]}
1
+ {"version":3,"sources":["../src/scenegraph/group-creater/column-helper.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAmB,MAAM,eAAe,CAAC;AAEnF,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAiBrD,MAAM,UAAU,mBAAmB,CACjC,WAAkB,EAClB,GAAW,EACX,QAAgB,EAChB,QAAgB,EAChB,MAAc,EACd,QAAkB,EAClB,gBAAmC,EACnC,KAAmB,EAEnB,QAAiB;IAEjB,IAAI,OAAO,CAAC;IACZ,IAAI,SAAS,CAAC;IACd,IAAI,YAAY,CAAC;IAGjB,IAAI,CAAC,GAAG,CAAC,CAAC;IAKV,IAAI,WAAW,CAAC,SAAS,IAAK,WAAW,CAAC,SAAmB,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import type { IThemeSpec } from './../../vrender';\nimport type {\n CellLocation,\n CellRange,\n ColumnDefine,\n IRowSeriesNumber,\n ListTableConstructorOptions,\n TextColumnDefine\n} from '../../ts-types';\nimport { Group } from '../graphic/group';\nimport { getProp, getRawProp } from '../utils/get-prop';\nimport type { MergeMap } from '../scenegraph';\nimport { createCell, dealWithMergeCellSize, resizeCellGroup } from './cell-helper';\nimport type { BaseTableAPI, HeaderData, ListTableProtected } from '../../ts-types/base-table';\nimport { getCellCornerRadius, getStyleTheme } from '../../core/tableHelper';\nimport { isPromise } from '../../tools/helper';\nimport { dealPromiseData } from '../utils/deal-promise-data';\nimport { dealWithCustom } from '../component/custom';\n/**\n * 创建复合列 同一列支持创建不同类型单元格\n * @param columnGroup 列Group\n * @param col\n * @param colWidth 配置列宽\n * @param rowStart\n * @param rowEnd\n * @param mergeMap merge单元格信息\n * @param defaultRowHeight\n * @param table\n * @param cellLocation\n * @param rowLimit\n * @param customRender\n * @param customLayout\n * @returns\n */\nexport function createComplexColumn(\n columnGroup: Group,\n col: number,\n colWidth: number,\n rowStart: number,\n rowEnd: number,\n mergeMap: MergeMap,\n defaultRowHeight: number | number[],\n table: BaseTableAPI,\n // cellLocation: CellLocation,\n rowLimit?: number\n) {\n let padding;\n let textAlign;\n let textBaseline;\n /** useColumnTheme 判断是否可以使用columnTheme */\n // insert cell into column group top\n let y = 0;\n // if (columnGroup.colHeight) {\n // // insert cell into column group bottom\n // y = columnGroup.colHeight;\n // }\n if (columnGroup.lastChild && (columnGroup.lastChild as Group).row === rowStart - 1) {\n y = (columnGroup.lastChild as Group).attribute.y + (columnGroup.lastChild as Group).attribute.height;\n } else if (columnGroup.colHeight) {\n y = columnGroup.colHeight;\n } else if (rowStart >= table.columnHeaderLevelCount && rowStart < table.rowCount - table.bottomFrozenRowCount) {\n // 这个if判断为了解决#4357 当传入的rowStart例如50但是columnGroup中并没有其他cell的情况下,上面逻辑有问题y赋值的0 导致新建单元格错位\n y = table.getRowsHeight(table.columnHeaderLevelCount, rowStart - 1);\n }\n\n for (let j = rowStart; j <= rowEnd; j++) {\n const row = j;\n let cellLocation = table.getCellLocation(col, row);\n let value = table.getCellValue(col, row);\n\n // 处理单元格合并\n let cellWidth = colWidth;\n // let cellHeight = table.internalProps.autoRowHeight ? 0 : table.getRowHeight(row);\n let cellHeight = table.getRowHeight(row);\n let range;\n let isMerge;\n let customStyle;\n let customResult;\n let isCustomMerge = false;\n let rawRecord;\n if (table.internalProps.customMergeCell) {\n const customMerge = table.getCustomMerge(col, row);\n if (customMerge) {\n const {\n range: customMergeRange,\n text: customMergeText,\n style: customMergeStyle,\n customLayout,\n customRender\n } = customMerge;\n range = customMergeRange;\n isMerge = range.start.col !== range.end.col || range.start.row !== range.end.row;\n if (isMerge) {\n const needUpdateRange = rowStart > range.start.row;\n const mergeSize = dealMerge(range, mergeMap, table, needUpdateRange);\n cellWidth = mergeSize.cellWidth;\n cellHeight = mergeSize.cellHeight;\n }\n value = customMergeText;\n customStyle = customMergeStyle;\n\n if (customLayout || customRender) {\n customResult = dealWithCustom(\n customLayout,\n customRender,\n customMergeRange.start.col,\n customMergeRange.start.row,\n table.getColsWidth(customMergeRange.start.col, customMergeRange.end.col),\n table.getRowsHeight(customMergeRange.start.row, customMergeRange.end.row),\n false,\n table.isAutoRowHeight(row),\n [0, 0, 0, 0],\n range,\n table\n );\n }\n\n isCustomMerge = true;\n }\n }\n\n let colForDefine = col;\n let rowForDefine = row;\n if (range) {\n colForDefine = range.start.col;\n rowForDefine = range.start.row;\n }\n\n // adjust cellLocation for top frozen row\n if (\n !table.isPivotTable() &&\n (cellLocation === 'columnHeader' || cellLocation === 'cornerHeader') &&\n row >= table.columnHeaderLevelCount\n ) {\n cellLocation = 'body';\n }\n let define;\n if (!table.isPivotTable() && table.isSeriesNumberInBody(col, row)) {\n // 序号列 传入的cellLocation是'rowHeader'(不清楚为什么)。这里处理下获取到的define值\n define = table.getBodyColumnDefine(colForDefine, rowForDefine);\n } else {\n define =\n cellLocation !== 'body'\n ? table.getHeaderDefine(colForDefine, rowForDefine)\n : table.getBodyColumnDefine(colForDefine, rowForDefine);\n }\n const isAggregation =\n 'isAggregation' in table.internalProps.layoutMap && table.internalProps.layoutMap.isAggregation(col, row);\n const isSeriesNumber = table.internalProps.layoutMap.isSeriesNumber(col, row);\n\n let mayHaveIcon =\n cellLocation !== 'body'\n ? true\n : ((define as IRowSeriesNumber)?.dragOrder || !!define?.icon || !!(define as ColumnDefine)?.tree) &&\n !(isAggregation && isSeriesNumber);\n if (\n !range &&\n (table.internalProps.enableTreeNodeMerge || cellLocation !== 'body' || (define as TextColumnDefine)?.mergeCell)\n ) {\n // grouped/tree merge 仅发生在带 vtableMerge 标记的数据行上,普通 body cell 不必全量探测 range\n if (\n table.internalProps.enableTreeNodeMerge &&\n cellLocation === 'body' &&\n !(define as TextColumnDefine)?.mergeCell\n ) {\n rawRecord = table.getCellRawRecord(col, row);\n if (rawRecord?.vtableMerge) {\n range = table.getCellRange(col, row);\n isMerge = range.start.col !== range.end.col || range.start.row !== range.end.row;\n }\n } else {\n // 只有表头或者column配置合并单元格后再进行信息获取\n range = table.getCellRange(col, row);\n isMerge = range.start.col !== range.end.col || range.start.row !== range.end.row;\n }\n // 所有Merge单元格,只保留左上角一个真实的单元格,其他使用空Group占位\n if (isMerge) {\n const needUpdateRange = rowStart > range.start.row;\n const mergeSize = dealMerge(range, mergeMap, table, needUpdateRange);\n cellWidth = mergeSize.cellWidth;\n cellHeight = mergeSize.cellHeight;\n }\n }\n let isVtableMerge = false;\n if (table.internalProps.enableTreeNodeMerge && isMerge) {\n rawRecord = rawRecord ?? table.getCellRawRecord(range.start.col, range.start.row);\n const { vtableMergeName, vtableMerge } = rawRecord ?? {};\n\n isVtableMerge = vtableMerge;\n if (vtableMerge) {\n mayHaveIcon = true;\n if ((table.internalProps as ListTableProtected).groupTitleCustomLayout) {\n customResult = dealWithCustom(\n (table.internalProps as ListTableProtected).groupTitleCustomLayout,\n undefined,\n range.start.col,\n range.start.row,\n table.getColsWidth(range.start.col, range.end.col),\n table.getRowsHeight(range.start.row, range.end.row),\n false,\n table.isAutoRowHeight(row),\n [0, 0, 0, 0],\n range,\n table\n );\n }\n if ((table.internalProps as ListTableProtected).groupTitleFieldFormat) {\n value = (table.internalProps as ListTableProtected).groupTitleFieldFormat(rawRecord, col, row, table);\n } else if (vtableMergeName !== undefined) {\n value = vtableMergeName;\n }\n }\n }\n\n const type = isVtableMerge || isCustomMerge ? 'text' : table.getCellType(col, row);\n // deal with promise data\n if (isPromise(value)) {\n createEmptyCellGroup(col, row, 0, y, cellWidth, cellHeight, columnGroup);\n dealPromiseData(\n value,\n table,\n callCreateCellForPromiseValue.bind(null, {\n type,\n value,\n define,\n table,\n col,\n row,\n colWidth,\n cellWidth,\n cellHeight,\n columnGroup,\n y,\n customStyle,\n mayHaveIcon,\n cellLocation,\n range,\n customResult,\n defaultRowHeight\n })\n );\n columnGroup.updateColumnRowNumber(row);\n const height = table.getRowHeight(row);\n columnGroup.updateColumnHeight(height);\n y += height;\n } else {\n const cellStyle =\n customStyle || table._getCellStyle(range ? range.start.col : col, range ? range.start.row : row);\n const cellTheme = getStyleTheme(\n cellStyle,\n table,\n range ? range.start.col : col,\n range ? range.start.row : row,\n getProp\n ).theme;\n cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table);\n cellTheme.group.width = colWidth;\n cellTheme.group.height = Array.isArray(defaultRowHeight) ? defaultRowHeight[row] : defaultRowHeight;\n if (cellTheme._vtable.padding) {\n padding = cellTheme._vtable.padding;\n }\n if (cellTheme.text.textAlign) {\n textAlign = cellTheme.text.textAlign;\n }\n if (cellTheme.text.textBaseline) {\n textBaseline = cellTheme.text.textBaseline;\n }\n\n // enable clip body\n if (cellLocation !== 'body' && !cellTheme.group.fill) {\n cellTheme.group.fill = '#fff';\n }\n const cellGroup = createCell(\n type,\n value,\n define as ColumnDefine,\n table,\n col,\n row,\n colWidth,\n cellWidth,\n cellHeight,\n columnGroup,\n y,\n padding,\n textAlign,\n textBaseline,\n mayHaveIcon,\n cellTheme,\n range,\n customResult,\n cellStyle\n );\n columnGroup.updateColumnRowNumber(row);\n if (isMerge) {\n const rangeHeight = table.getRowHeight(row);\n const rangeWidth = table.getColWidth(col);\n\n const { width: contentWidth } = cellGroup.attribute;\n const { height: contentHeight } = cellGroup.attribute;\n cellGroup.contentWidth = contentWidth;\n cellGroup.contentHeight = contentHeight;\n\n // resizeCellGroup(cellGroup, rangeWidth, rangeHeight, range, table);\n dealWithMergeCellSize(range, contentWidth, contentHeight, padding, textAlign, textBaseline, table);\n columnGroup.updateColumnHeight(rangeHeight);\n y += rangeHeight;\n } else {\n // columnGroup.updateColumnHeight(cellGroup.attribute.height);\n // y += cellGroup.attribute.height;\n columnGroup.updateColumnHeight(cellHeight);\n y += cellHeight;\n }\n }\n if (rowLimit && row > rowLimit) {\n break;\n }\n }\n\n columnGroup.setAttribute('width', colWidth);\n return {\n width: colWidth,\n height: y\n };\n}\n\n/**\n * 获取列分组主题\n * @param col 列索引\n * @param colWidth 列宽\n * @param table 表格实例\n * @returns 列分组主题\n */\nexport function getColumnGroupTheme(\n col: number,\n colWidth: number,\n table: BaseTableAPI\n): { theme: IThemeSpec & { _vtable: any }; hasFunctionPros: boolean } {\n const style = table._getCellStyle(col, table.columnHeaderLevelCount); // to be fixed\n const { theme: columnTheme, hasFunctionPros } = getStyleTheme(\n style,\n table,\n col,\n table.columnHeaderLevelCount,\n getRawProp\n );\n\n // get column header style\n columnTheme.group.width = colWidth;\n columnTheme.group.height = 0;\n return { theme: columnTheme, hasFunctionPros };\n}\nfunction callCreateCellForPromiseValue(createCellArgs: any) {\n let padding;\n let textAlign;\n let textBaseline;\n const {\n type,\n value,\n define,\n table,\n col,\n row,\n colWidth,\n cellWidth,\n cellHeight,\n columnGroup,\n y,\n cellLocation,\n mayHaveIcon,\n customStyle,\n range,\n customResult,\n defaultRowHeight\n } = createCellArgs;\n const cellStyle = customStyle || table._getCellStyle(range ? range.start.col : col, range ? range.start.row : row);\n const cellTheme = getStyleTheme(\n cellStyle,\n table,\n range ? range.start.col : col,\n range ? range.start.row : row,\n getProp\n ).theme;\n cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table);\n cellTheme.group.width = colWidth;\n cellTheme.group.height = Array.isArray(defaultRowHeight) ? defaultRowHeight[row] : defaultRowHeight;\n if (cellTheme._vtable.padding) {\n padding = cellTheme._vtable.padding;\n }\n if (cellTheme.text.textAlign) {\n textAlign = cellTheme.text.textAlign;\n }\n if (cellTheme.text.textBaseline) {\n textBaseline = cellTheme.text.textBaseline;\n }\n\n // enable clip body\n if (cellLocation !== 'body' && !cellTheme.group.fill) {\n cellTheme.group.fill = '#fff';\n }\n createCell(\n type,\n value,\n define,\n table,\n col,\n row,\n colWidth,\n cellWidth,\n cellHeight,\n columnGroup,\n y,\n padding,\n textAlign,\n textBaseline,\n mayHaveIcon,\n cellTheme,\n range,\n customResult,\n cellStyle\n );\n}\nfunction dealMerge(range: CellRange, mergeMap: MergeMap, table: BaseTableAPI, forceUpdate: boolean) {\n let cellWidth = 0;\n let cellHeight = 0;\n const mergeResult = mergeMap.get(`${range.start.col},${range.start.row};${range.end.col},${range.end.row}`);\n if (!mergeResult || forceUpdate) {\n for (let col = range.start.col; col <= range.end.col; col++) {\n cellWidth += table.getColWidth(col);\n }\n\n // let cellHeight = 0;\n for (let i = range.start.row; i <= range.end.row; i++) {\n cellHeight += table.getRowHeight(i);\n }\n\n mergeMap.set(`${range.start.col},${range.start.row};${range.end.col},${range.end.row}`, {\n cellWidth,\n cellHeight\n });\n } else {\n cellWidth = mergeResult.cellWidth;\n cellHeight = mergeResult.cellHeight;\n }\n return {\n cellWidth,\n cellHeight\n };\n}\n\nfunction createEmptyCellGroup(\n col: number,\n row: number,\n x: number,\n y: number,\n width: number,\n height: number,\n columnGroup: Group\n) {\n const cellGroup = new Group({\n x,\n y,\n width,\n height\n });\n cellGroup.role = 'cell';\n cellGroup.col = col;\n cellGroup.row = row;\n columnGroup.addChild(cellGroup);\n}\n"]}
@@ -110,7 +110,8 @@ export function dealRightFrozen(distRightFrozenCol, scene) {
110
110
  for (let col = table.colCount - currentRightFrozenCol - 1; col >= table.colCount - distRightFrozenCol; col--) {
111
111
  insertBefore(rightFrozenGroup, scene.getColGroup(col), rightFrozenGroup.firstChild);
112
112
  insertBefore(rightTopCornerGroup, scene.getColGroup(col, !0), rightTopCornerGroup.firstChild);
113
- insertBefore(rightBottomCornerGroup, scene.getColGroupInBottom(col), rightBottomCornerGroup.firstChild);
113
+ const bottomColGroup = scene.getColGroupInBottom(col);
114
+ bottomColGroup && insertBefore(rightBottomCornerGroup, bottomColGroup, rightBottomCornerGroup.firstChild);
114
115
  }
115
116
  let x = 0;
116
117
  rightFrozenGroup.forEachChildren((columnGroup => {
@@ -129,8 +130,11 @@ export function dealRightFrozen(distRightFrozenCol, scene) {
129
130
  headerColGroup.setAttribute("x", colHeaderGroup.lastChild.attribute.x + table.getColWidth(colHeaderGroup.lastChild.col)),
130
131
  colHeaderGroup.appendChild(headerColGroup);
131
132
  const bottomColGroup = scene.getColGroupInRightBottomCorner(col);
132
- bottomColGroup.setAttribute("x", bottomFrozenGroup.lastChild.attribute.x + table.getColWidth(bottomFrozenGroup.lastChild.col)),
133
- bottomFrozenGroup.appendChild(bottomColGroup);
133
+ if (bottomColGroup) {
134
+ const lastBottomColGroup = bottomFrozenGroup.lastChild;
135
+ bottomColGroup.setAttribute("x", lastBottomColGroup ? lastBottomColGroup.attribute.x + table.getColWidth(lastBottomColGroup.col) : 0),
136
+ bottomFrozenGroup.appendChild(bottomColGroup);
137
+ }
134
138
  }
135
139
  let x = 0;
136
140
  rightFrozenGroup.forEachChildren((columnGroup => {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/scenegraph/layout/frozen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO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C,eAAe,CAAC,KAAK,CAAC,EAAE;YAC3B,SAAS;SACV;QACD,MAAM,MAAM,GAAG,KAAK,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAU,CAAC;QAC3D,IAAI,CAAC,MAAM,EAAE;YACX,SAAS;SACV;QACD,MAAM,OAAO,GAAG,KAAK,CAAC,SAAkB,CAAC;QAEzC,YAAY,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,UAAmB,CAAC,CAAC;QAE1D,IAAI,CAAC,cAAc,EAAE;YACnB,KAAK,CAAC,mBAAmB,CAAC,YAAY,CACpC,QAAQ,EACR,KAAK,CAAC,mBAAmB,CAAC,SAAS,CAAC,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,MAAM,CACtE,CAAC;YACF,KAAK,CAAC,gBAAgB,CAAC,YAAY,CAAC,QAAQ,EAAE,KAAK,CAAC,gBAAgB,CAAC,SAAS,CAAC,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YAClH,cAAc,GAAG,IAAI,CAAC;SACvB;KACF;AACH,CAAC;AAED,SAAS,eAAe,CAAC,KAAU;IAEjC,OAAO,KAAK,YAAY,KAAK,IAAI,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,MAAK,mBAAmB,CAAC;AACvE,CAAC","file":"frozen.js","sourcesContent":["import { getStyleTheme } from '../../core/tableHelper';\nimport { getTargetCell } from '../../event/util';\nimport { Group } from '../graphic/group';\nimport { createColGroup } from '../group-creater/column';\nimport type { Scenegraph } from '../scenegraph';\nimport { getProp } from '../utils/get-prop';\nimport { table } from 'console';\nimport { updateReactComponentContainer } from './frozen-react';\n\nexport function dealFrozen(scene: Scenegraph) {\n if (scene.table.frozenColCount > scene.table.rowHeaderLevelCount) {\n // 将对应列移入rowHeaderGroup\n scene.rowHeaderGroup.setAttribute('height', scene.bodyGroup.attribute.height);\n scene.rowHeaderGroup.setAttribute('y', scene.bodyGroup.attribute.y);\n scene.cornerHeaderGroup.setAttribute('height', scene.colHeaderGroup.attribute.height);\n for (let i = 0; i < scene.table.frozenColCount - scene.table.rowHeaderLevelCount; i++) {\n moveColumnFromBodyToRowHeader(scene);\n moveColumnFromColHeaderToCornerHeader(scene);\n moveColumnFromBottomToLeftBottomCorner(scene);\n }\n } else if (scene.table.frozenColCount < scene.table.rowHeaderLevelCount) {\n // move columnGroup from rowHeaderGroup into bodyGroup(from cornerHeaderGroup into colHeaderGroup)\n scene.bodyGroup.setAttribute('height', scene.rowHeaderGroup.attribute.height);\n scene.bodyGroup.setAttribute('y', scene.rowHeaderGroup.attribute.y);\n scene.colHeaderGroup.setAttribute('height', scene.cornerHeaderGroup.attribute.height);\n for (let i = 0; i < scene.table.rowHeaderLevelCount - scene.table.frozenColCount; i++) {\n moveColumnFromRowHeaderToBody(scene);\n moveColumnFromCornerHeaderToColHeader(scene);\n moveColumnFromLeftBottomCornerToBottom(scene);\n }\n }\n scene.bodyGroup.setAttribute('x', scene.rowHeaderGroup.attribute.width);\n scene.colHeaderGroup.setAttribute('x', scene.cornerHeaderGroup.attribute.width);\n\n scene.updateContainer();\n scene.updateBorderSizeAndPosition();\n\n if (!scene.isPivot && !(scene.table as any).transpose) {\n scene.component.setFrozenColumnShadow(scene.table.frozenColCount - 1);\n scene.component.setRightFrozenColumnShadow(scene.table.colCount - scene.table.rightFrozenColCount);\n } else if (scene.table.options.frozenColCount) {\n scene.component.setFrozenColumnShadow(scene.table.frozenColCount - 1);\n } else if (scene.table.options.frozenColCount) {\n scene.component.setRightFrozenColumnShadow(scene.table.colCount - scene.table.rightFrozenColCount);\n }\n scene.hasFrozen = true;\n\n // scene.frozenColCount = scene.rowHeaderGroup.childrenCount;\n scene.frozenColCount = scene.table.frozenColCount;\n scene.frozenRowCount =\n scene.colHeaderGroup.firstChild?.childrenCount ??\n scene.cornerHeaderGroup.firstChild?.childrenCount ??\n scene.table.frozenRowCount;\n}\n\nexport function resetFrozen(scene: Scenegraph) {\n if (scene.frozenColCount > scene.table.frozenColCount) {\n // move columnGroup from rowHeaderGroup into bodyGroup(from cornerHeaderGroup into colHeaderGroup)\n scene.bodyGroup.setAttribute('height', scene.rowHeaderGroup.attribute.height);\n scene.bodyGroup.setAttribute('y', scene.rowHeaderGroup.attribute.y);\n scene.colHeaderGroup.setAttribute('height', scene.cornerHeaderGroup.attribute.height);\n for (let i = 0; i < scene.frozenColCount - scene.table.frozenColCount; i++) {\n moveColumnFromRowHeaderToBody(scene);\n moveColumnFromCornerHeaderToColHeader(scene);\n moveColumnFromLeftBottomCornerToBottom(scene);\n }\n } else if (scene.frozenColCount < scene.table.frozenColCount) {\n // move columnGroup from bodyGroup into rowHeaderGroup(from colHeaderGroup into cornerHeaderGroup)\n scene.rowHeaderGroup.setAttribute('height', scene.bodyGroup.attribute.height);\n scene.rowHeaderGroup.setAttribute('y', scene.bodyGroup.attribute.y);\n scene.cornerHeaderGroup.setAttribute('height', scene.colHeaderGroup.attribute.height);\n for (let i = 0; i < scene.table.frozenColCount - scene.frozenColCount; i++) {\n moveColumnFromBodyToRowHeader(scene);\n moveColumnFromColHeaderToCornerHeader(scene);\n moveColumnFromBottomToLeftBottomCorner(scene);\n }\n }\n\n updateReactComponentContainer(scene);\n scene.recreateAllSelectRangeComponents();\n // scene.frozenColCount = scene.rowHeaderGroup.childrenCount;\n scene.frozenColCount = scene.table.frozenColCount;\n scene.frozenRowCount =\n scene.colHeaderGroup.firstChild?.childrenCount ??\n scene.cornerHeaderGroup.firstChild?.childrenCount ??\n scene.table.frozenRowCount;\n // scene.proxy.colStart = scene.table.frozenColCount;\n scene.proxy.colStart = (scene.bodyGroup.firstChild as any)?.col ?? scene.table.frozenColCount;\n\n scene.bodyGroup.setAttribute('x', scene.rowHeaderGroup.attribute.width);\n scene.colHeaderGroup.setAttribute('x', scene.cornerHeaderGroup.attribute.width);\n // scene.updateContainerAttrWidthAndX();\n scene.updateContainer();\n scene.updateBorderSizeAndPosition();\n\n if (!scene.isPivot && !(scene.table as any).transpose) {\n scene.component.setFrozenColumnShadow(scene.table.frozenColCount - 1);\n scene.component.setRightFrozenColumnShadow(scene.table.colCount - scene.table.rightFrozenColCount);\n } else if (scene.table.options.frozenColCount) {\n scene.component.setFrozenColumnShadow(scene.table.frozenColCount - 1);\n } else if (scene.table.options.rightFrozenColCount) {\n scene.component.setRightFrozenColumnShadow(scene.table.colCount - scene.table.rightFrozenColCount);\n }\n scene.hasFrozen = true;\n}\n\nfunction moveColumnFromBodyToRowHeader(scene: Scenegraph) {\n // deal with bodyGroup\n const column = scene.bodyGroup.firstChild instanceof Group ? scene.bodyGroup.firstChild : null;\n if (column) {\n scene.rowHeaderGroup.appendChild(column);\n // update container width\n scene.rowHeaderGroup.setAttribute('width', scene.rowHeaderGroup.attribute.width + column.attribute.width);\n scene.bodyGroup.setAttribute('width', scene.bodyGroup.attribute.width - column.attribute.width);\n }\n}\n\nfunction moveColumnFromColHeaderToCornerHeader(scene: Scenegraph) {\n // deal width colHeaderGroup\n const headerColumn = scene.colHeaderGroup.firstChild instanceof Group ? scene.colHeaderGroup.firstChild : null;\n if (headerColumn) {\n scene.cornerHeaderGroup.appendChild(headerColumn);\n scene.cornerHeaderGroup.setAttribute(\n 'width',\n scene.cornerHeaderGroup.attribute.width + headerColumn.attribute.width\n );\n scene.colHeaderGroup.setAttribute('width', scene.colHeaderGroup.attribute.width - headerColumn.attribute.width);\n }\n}\n\nfunction moveColumnFromRowHeaderToBody(scene: Scenegraph) {\n const column =\n scene.rowHeaderGroup.lastChild instanceof Group\n ? scene.rowHeaderGroup.lastChild\n : (scene.rowHeaderGroup.lastChild?._prev as Group);\n if (column) {\n insertBefore(scene.bodyGroup, column, scene.bodyGroup.firstChild as Group);\n // 更新容器宽度\n scene.bodyGroup.setAttribute('width', scene.bodyGroup.attribute.width + column.attribute.width);\n scene.rowHeaderGroup.setAttribute('width', scene.rowHeaderGroup.attribute.width - column.attribute.width);\n }\n}\n\nfunction moveColumnFromCornerHeaderToColHeader(scene: Scenegraph) {\n // 处理列表头\n const headerColumn =\n scene.cornerHeaderGroup.lastChild instanceof Group\n ? scene.cornerHeaderGroup.lastChild\n : (scene.cornerHeaderGroup.lastChild?._prev as Group);\n if (headerColumn) {\n insertBefore(scene.colHeaderGroup, headerColumn, scene.colHeaderGroup.firstChild as Group);\n scene.colHeaderGroup.setAttribute('width', scene.colHeaderGroup.attribute.width + headerColumn.attribute.width);\n scene.cornerHeaderGroup.setAttribute(\n 'width',\n scene.cornerHeaderGroup.attribute.width - headerColumn.attribute.width\n );\n }\n}\n\nfunction moveColumnFromBottomToLeftBottomCorner(scene: Scenegraph) {\n // deal with bottomFrozenGroup\n const column = scene.bottomFrozenGroup.firstChild instanceof Group ? scene.bottomFrozenGroup.firstChild : null;\n if (column) {\n scene.leftBottomCornerGroup.appendChild(column);\n // update container width\n scene.leftBottomCornerGroup.setAttribute(\n 'width',\n scene.leftBottomCornerGroup.attribute.width + column.attribute.width\n );\n scene.bottomFrozenGroup.setAttribute('width', scene.bottomFrozenGroup.attribute.width - column.attribute.width);\n\n if (scene.table.isPivotChart()) {\n column.forEachChildren((child: Group) => {\n child.setAttributes({\n stroke: false,\n fill: false\n });\n });\n }\n }\n}\n\nfunction moveColumnFromLeftBottomCornerToBottom(scene: Scenegraph) {\n const column =\n scene.leftBottomCornerGroup.lastChild instanceof Group\n ? scene.leftBottomCornerGroup.lastChild\n : (scene.leftBottomCornerGroup.lastChild?._prev as Group);\n if (column) {\n insertBefore(scene.bottomFrozenGroup, column, scene.bottomFrozenGroup.firstChild as Group);\n // 更新容器宽度\n scene.bottomFrozenGroup.setAttribute('width', scene.bottomFrozenGroup.attribute.width + column.attribute.width);\n scene.leftBottomCornerGroup.setAttribute(\n 'width',\n scene.leftBottomCornerGroup.attribute.width - column.attribute.width\n );\n\n if (scene.table.isPivotChart()) {\n column.forEachChildren((child: Group) => {\n const cellStyle = scene.table._getCellStyle(child.col, child.row);\n const range = scene.table.getCellRange(child.col, child.row);\n const cellTheme = getStyleTheme(\n cellStyle,\n scene.table,\n range ? range.start.col : child.col,\n range ? range.start.row : child.row,\n getProp\n ).theme;\n\n child.setAttributes({\n fill: cellTheme?.group?.fill ?? undefined,\n stroke: cellTheme?.group?.stroke ?? undefined\n });\n });\n }\n }\n}\n\nexport function dealRightFrozen(distRightFrozenCol: number, scene: Scenegraph) {\n const {\n table,\n proxy,\n rightTopCornerGroup,\n rightFrozenGroup,\n rightBottomCornerGroup,\n bottomFrozenGroup,\n bodyGroup,\n colHeaderGroup\n } = scene;\n // const distRightFrozenCol = scene.table.rightFrozenColCount;\n const currentRightFrozenCol = scene.table.rightFrozenColCount;\n if (distRightFrozenCol > currentRightFrozenCol) {\n for (let col = table.colCount - currentRightFrozenCol - 1; col >= table.colCount - distRightFrozenCol; col--) {\n const colGroup = scene.getColGroup(col);\n insertBefore(rightFrozenGroup, colGroup, rightFrozenGroup.firstChild as Group);\n const headerColGroup = scene.getColGroup(col, true);\n insertBefore(rightTopCornerGroup, headerColGroup, rightTopCornerGroup.firstChild as Group);\n const bottomColGroup = scene.getColGroupInBottom(col);\n insertBefore(rightBottomCornerGroup, bottomColGroup, rightBottomCornerGroup.firstChild as Group);\n }\n // reset cell y\n let x = 0;\n rightFrozenGroup.forEachChildren((columnGroup: Group) => {\n columnGroup.setAttribute('x', x);\n x += columnGroup.attribute.width;\n });\n x = 0;\n rightTopCornerGroup.forEachChildren((columnGroup: Group) => {\n columnGroup.setAttribute('x', x);\n x += columnGroup.attribute.width;\n });\n x = 0;\n rightBottomCornerGroup.forEachChildren((columnGroup: Group) => {\n columnGroup.setAttribute('x', x);\n x += columnGroup.attribute.width;\n });\n } else if (distRightFrozenCol < currentRightFrozenCol) {\n for (let col = table.colCount - currentRightFrozenCol; col < table.colCount - distRightFrozenCol; col++) {\n const colGroup = scene.getColGroup(col);\n colGroup.setAttribute(\n 'x',\n (bodyGroup.lastChild as Group).attribute.x + table.getColWidth((bodyGroup.lastChild as Group).col)\n );\n bodyGroup.appendChild(colGroup);\n const headerColGroup = scene.getColGroupInRightTopCorner(col);\n headerColGroup.setAttribute(\n 'x',\n (colHeaderGroup.lastChild as Group).attribute.x + table.getColWidth((colHeaderGroup.lastChild as Group).col)\n );\n colHeaderGroup.appendChild(headerColGroup);\n const bottomColGroup = scene.getColGroupInRightBottomCorner(col);\n bottomColGroup.setAttribute(\n 'x',\n (bottomFrozenGroup.lastChild as Group).attribute.x +\n table.getColWidth((bottomFrozenGroup.lastChild as Group).col)\n );\n bottomFrozenGroup.appendChild(bottomColGroup);\n }\n // reset cell y\n let x = 0;\n rightFrozenGroup.forEachChildren((columnGroup: Group) => {\n columnGroup.setAttribute('x', x);\n x += columnGroup.attribute.width;\n });\n x = 0;\n rightTopCornerGroup.forEachChildren((columnGroup: Group) => {\n columnGroup.setAttribute('x', x);\n x += columnGroup.attribute.width;\n });\n x = 0;\n rightBottomCornerGroup.forEachChildren((columnGroup: Group) => {\n columnGroup.setAttribute('x', x);\n x += columnGroup.attribute.width;\n });\n }\n\n // reset right width\n rightFrozenGroup.setAttribute('width', table.getColsWidth(table.colCount - distRightFrozenCol, table.colCount - 1));\n rightTopCornerGroup.setAttribute(\n 'width',\n table.getColsWidth(table.colCount - distRightFrozenCol, table.colCount - 1)\n );\n rightBottomCornerGroup.setAttribute(\n 'width',\n table.getColsWidth(table.colCount - distRightFrozenCol, table.colCount - 1)\n );\n\n table.internalProps.rightFrozenColCount = distRightFrozenCol;\n scene.updateContainer();\n scene.component.updateScrollBar();\n scene.updateNextFrame();\n}\n\nexport function dealBottomFrozen(distBottomFrozenRow: number, scene: Scenegraph) {\n const { table, proxy, bottomFrozenGroup, leftBottomCornerGroup, rightBottomCornerGroup } = scene;\n if (!bottomFrozenGroup.childrenCount) {\n // init bottom\n if (!proxy.table.isPivotChart()) {\n // create left bottom frozen\n createColGroup(\n leftBottomCornerGroup,\n 0,\n 0,\n 0, // colStart\n table.frozenColCount - 1, // colEnd\n 0, // rowStart\n -1, // rowEnd\n 'rowHeader', // isHeader\n table\n );\n createColGroup(\n rightBottomCornerGroup,\n 0,\n 0,\n table.colCount - table.rightFrozenColCount, // colStart\n table.colCount - 1, // colEnd\n 0, // rowStart\n -1, // rowEnd\n 'body', // isHeader\n table\n );\n }\n // create bottomFrozenGroup\n createColGroup(\n bottomFrozenGroup,\n 0,\n 0,\n proxy.colStart, // colStart\n proxy.colEnd, // colEnd\n 0, // rowStart\n -1, // rowEnd\n 'body', // isHeader\n table\n );\n }\n const currentBottomFrozenRow = scene.table.bottomFrozenRowCount;\n if (distBottomFrozenRow > currentBottomFrozenRow) {\n // row header -> left bottom\n for (let col = 0; col < table.frozenColCount; col++) {\n const bottomFrozenColumnGroup = scene.getColGroupInLeftBottomCorner(col);\n // move cell\n for (let row = table.rowCount - currentBottomFrozenRow - 1; row >= table.rowCount - distBottomFrozenRow; row--) {\n const cellGroup = scene.getCell(col, row, true);\n // bottomFrozenColumnGroup.insertBefore(cellGroup, bottomFrozenColumnGroup.firstChild);\n insertBefore(bottomFrozenColumnGroup, cellGroup, bottomFrozenColumnGroup.firstChild as Group);\n }\n // reset cell y\n let y = 0;\n bottomFrozenColumnGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += table.getRowHeight(cellGroup.row);\n });\n }\n // body -> bottom\n for (let col = proxy.colStart; col <= proxy.colEnd; col++) {\n const bottomFrozenColumnGroup = scene.getColGroupInBottom(col);\n // move cell\n for (let row = table.rowCount - currentBottomFrozenRow - 1; row >= table.rowCount - distBottomFrozenRow; row--) {\n const cellGroup = scene.getCell(col, row, true);\n // bottomFrozenColumnGroup.insertBefore(cellGroup, bottomFrozenColumnGroup.firstChild);\n insertBefore(bottomFrozenColumnGroup, cellGroup, bottomFrozenColumnGroup.firstChild as Group);\n }\n // reset cell y\n let y = 0;\n bottomFrozenColumnGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += table.getRowHeight(cellGroup.row);\n });\n }\n if (table.rightFrozenColCount > 0) {\n // right -> right bottom\n for (let col = table.colCount - table.rightFrozenColCount; col < table.colCount; col++) {\n const bottomFrozenColumnGroup = scene.getColGroupInRightBottomCorner(col);\n // move cell\n for (\n let row = table.rowCount - currentBottomFrozenRow - 1;\n row >= table.rowCount - distBottomFrozenRow;\n row--\n ) {\n const cellGroup = scene.getCell(col, row, true);\n // bottomFrozenColumnGroup.insertBefore(cellGroup, bottomFrozenColumnGroup.firstChild);\n insertBefore(bottomFrozenColumnGroup, cellGroup, bottomFrozenColumnGroup.firstChild as Group);\n }\n // reset cell y\n let y = 0;\n bottomFrozenColumnGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += table.getRowHeight(cellGroup.row);\n });\n }\n }\n } else if (distBottomFrozenRow < currentBottomFrozenRow) {\n // left bottom -> row header\n for (let col = 0; col < table.rowHeaderLevelCount; col++) {\n const columnGroup = scene.getColGroup(col);\n for (let row = table.rowCount - currentBottomFrozenRow; row < table.rowCount - distBottomFrozenRow; row++) {\n const cellGroup = scene.getCell(col, row, true);\n cellGroup.setAttribute(\n 'y',\n (columnGroup.lastChild as Group).attribute.y + table.getRowHeight((columnGroup.lastChild as Group).row)\n );\n columnGroup.appendChild(cellGroup);\n }\n // reset cell y\n const bottomFrozenColumnGroup = scene.getColGroupInLeftBottomCorner(col);\n let y = 0;\n bottomFrozenColumnGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += table.getRowHeight(cellGroup.row);\n });\n }\n // bottom -> body\n for (let col = proxy.colStart; col <= proxy.colEnd; col++) {\n const columnGroup = scene.getColGroup(col);\n for (let row = table.rowCount - currentBottomFrozenRow; row < table.rowCount - distBottomFrozenRow; row++) {\n const cellGroup = scene.getCell(col, row, true);\n cellGroup.setAttribute(\n 'y',\n (columnGroup.lastChild as Group).attribute.y + table.getRowHeight((columnGroup.lastChild as Group).row)\n );\n columnGroup.appendChild(cellGroup);\n }\n // reset cell y\n const bottomFrozenColumnGroup = scene.getColGroupInBottom(col);\n let y = 0;\n bottomFrozenColumnGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += table.getRowHeight(cellGroup.row);\n });\n }\n if (table.rightFrozenColCount > 0) {\n // right bottom -> right\n for (let col = table.colCount - table.rightFrozenColCount; col < table.colCount; col++) {\n const columnGroup = scene.getColGroup(col);\n for (let row = table.rowCount - currentBottomFrozenRow; row < table.rowCount - distBottomFrozenRow; row++) {\n const cellGroup = scene.getCell(col, row, true);\n cellGroup.setAttribute(\n 'y',\n (columnGroup.lastChild as Group).attribute.y + table.getRowHeight((columnGroup.lastChild as Group).row)\n );\n columnGroup.appendChild(cellGroup);\n }\n // reset cell y\n const bottomFrozenColumnGroup = scene.getColGroupInRightBottomCorner(col);\n let y = 0;\n bottomFrozenColumnGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += table.getRowHeight(cellGroup.row);\n });\n }\n }\n }\n // reset bottom height\n bottomFrozenGroup.setAttribute(\n 'height',\n table.getRowsHeight(table.rowCount - distBottomFrozenRow, table.rowCount - 1)\n );\n leftBottomCornerGroup.setAttribute(\n 'height',\n table.getRowsHeight(table.rowCount - distBottomFrozenRow, table.rowCount - 1)\n );\n rightBottomCornerGroup.setAttribute(\n 'height',\n table.getRowsHeight(table.rowCount - distBottomFrozenRow, table.rowCount - 1)\n );\n\n table.internalProps.bottomFrozenRowCount = distBottomFrozenRow;\n scene.updateContainer();\n scene.component.updateScrollBar();\n scene.updateNextFrame();\n}\n\nfunction insertBefore(container: Group, newNode: Group, targetGroup: Group) {\n if (!newNode || !container) {\n return;\n }\n if (targetGroup) {\n container.insertBefore(newNode, targetGroup);\n } else {\n container.appendChild(newNode);\n }\n}\n\nexport function resetRowFrozen(scene: Scenegraph) {\n if (scene.frozenRowCount > scene.table.frozenRowCount) {\n // move columnGroup from rowHeaderGroup into bodyGroup(from cornerHeaderGroup into colHeaderGroup)\n scene.bodyGroup.setAttribute('width', scene.colHeaderGroup.attribute.width);\n scene.bodyGroup.setAttribute('x', scene.colHeaderGroup.attribute.x);\n scene.rowHeaderGroup.setAttribute('width', scene.cornerHeaderGroup.attribute.width);\n for (let i = 0; i < scene.frozenRowCount - scene.table.frozenRowCount; i++) {\n moveRowFromColHeaderToBody(scene);\n moveRowFromCornerHeaderToRowHeader(scene);\n moveRowFromTopRightCornerToRight(scene);\n }\n } else if (scene.frozenRowCount < scene.table.frozenRowCount) {\n // move columnGroup from bodyGroup into rowHeaderGroup(from colHeaderGroup into cornerHeaderGroup)\n scene.colHeaderGroup.setAttribute('width', scene.bodyGroup.attribute.width);\n scene.colHeaderGroup.setAttribute('x', scene.bodyGroup.attribute.x);\n scene.cornerHeaderGroup.setAttribute('width', scene.rowHeaderGroup.attribute.width);\n for (let i = 0; i < scene.table.frozenRowCount - scene.frozenRowCount; i++) {\n moveRowFromBodyToColHeader(scene);\n moveRowFromRowHeaderToCornerHeader(scene);\n moveRowFromRightToTopRightCorner(scene);\n }\n }\n\n updateReactComponentContainer(scene);\n scene.recreateAllSelectRangeComponents();\n // scene.frozenColCount = scene.rowHeaderGroup.childrenCount;\n scene.frozenRowCount = scene.table.frozenRowCount;\n scene.frozenColCount = scene.rowHeaderGroup?.childrenCount ?? 0;\n // scene.proxy.colStart = scene.table.frozenColCount;\n scene.proxy.rowStart = (scene.bodyGroup.firstChild?.firstChild as any)?.row ?? scene.table.frozenRowCount;\n scene.bodyGroup.setAttribute('y', scene.colHeaderGroup.attribute.height);\n scene.rowHeaderGroup.setAttribute('y', scene.cornerHeaderGroup.attribute.height);\n // scene.updateContainerAttrWidthAndX();\n scene.updateContainer({ needUpdateCellY: true });\n scene.updateBorderSizeAndPosition();\n\n scene.hasFrozen = true;\n}\n\nfunction moveRowFromBodyToColHeader(scene: Scenegraph) {\n let hasSetedHeight = false;\n // deal with bodyGroup\n for (let i = 0; i < scene.bodyGroup.childrenCount; i++) {\n const child = scene.bodyGroup.children[i];\n if (!checkBeforeMove(child)) {\n continue;\n }\n const rowCell = child.firstChild as Group;\n if (!scene.colHeaderGroup.children[i]) {\n createColGroup(scene.colHeaderGroup, 0, 0, rowCell.col, rowCell.col, 0, 0, 'columnHeader', scene.table);\n }\n scene.colHeaderGroup.children[i]?.appendChild(rowCell);\n // update container width\n if (!hasSetedHeight) {\n scene.colHeaderGroup.setAttribute('height', scene.colHeaderGroup.attribute.height + rowCell.attribute.height);\n scene.bodyGroup.setAttribute('height', scene.bodyGroup.attribute.height - rowCell.attribute.height);\n hasSetedHeight = true;\n }\n }\n}\n\nfunction moveRowFromRowHeaderToCornerHeader(scene: Scenegraph) {\n let hasSetedHeight = false;\n // deal with rowHeaderGroup\n for (let i = 0; i < scene.rowHeaderGroup.childrenCount; i++) {\n const child = scene.rowHeaderGroup.children[i];\n if (!checkBeforeMove(child)) {\n continue;\n }\n const rowCell = child.firstChild as Group;\n if (!scene.cornerHeaderGroup.children[i]) {\n createColGroup(\n scene.cornerHeaderGroup,\n 0,\n 0,\n rowCell.col,\n rowCell.col,\n 0,\n 0,\n scene.table.isListTable() ? 'columnHeader' : 'cornerHeader',\n scene.table\n );\n }\n scene.cornerHeaderGroup.children[i]?.appendChild(rowCell);\n // update container width\n if (!hasSetedHeight) {\n scene.cornerHeaderGroup.setAttribute(\n 'height',\n scene.cornerHeaderGroup.attribute.height + rowCell.attribute.height\n );\n scene.rowHeaderGroup.setAttribute('height', scene.rowHeaderGroup.attribute.height - rowCell.attribute.height);\n hasSetedHeight = true;\n }\n }\n}\n\nfunction moveRowFromRightToTopRightCorner(scene: Scenegraph) {\n let hasSetedHeight = false;\n // deal with rowHeaderGroup\n for (let i = 0; i < scene.rightFrozenGroup.childrenCount; i++) {\n const child = scene.rightFrozenGroup.children[i];\n if (!checkBeforeMove(child)) {\n continue;\n }\n const rowCell = child.firstChild as Group;\n if (!scene.rightTopCornerGroup.children[i]) {\n createColGroup(scene.rightTopCornerGroup, 0, 0, rowCell.col, rowCell.col, 0, 0, 'columnHeader', scene.table);\n }\n scene.rightTopCornerGroup.children[i].appendChild(rowCell);\n // update container width\n if (!hasSetedHeight) {\n scene.rightTopCornerGroup.setAttribute(\n 'height',\n scene.rightTopCornerGroup.attribute.height + rowCell.attribute.height\n );\n scene.rightFrozenGroup.setAttribute('height', scene.rightFrozenGroup.attribute.height - rowCell.attribute.height);\n hasSetedHeight = true;\n }\n }\n}\n\nfunction moveRowFromColHeaderToBody(scene: Scenegraph) {\n let hasSetedHeight = false;\n // deal with bodyGroup\n for (let i = 0; i < scene.colHeaderGroup.childrenCount; i++) {\n const child = scene.colHeaderGroup.children[i];\n if (!checkBeforeMove(child)) {\n continue;\n }\n const target = scene.bodyGroup.children[i] as Group;\n if (!target) {\n continue;\n }\n const rowCell = child.lastChild as Group;\n insertBefore(target, rowCell, target.firstChild as Group);\n // 更新高度\n if (!hasSetedHeight) {\n scene.colHeaderGroup.setAttribute('height', scene.colHeaderGroup.attribute.height - rowCell.attribute.height);\n scene.bodyGroup.setAttribute('height', scene.bodyGroup.attribute.height + rowCell.attribute.height);\n hasSetedHeight = true;\n }\n }\n}\n\nfunction moveRowFromCornerHeaderToRowHeader(scene: Scenegraph) {\n let hasSetedHeight = false;\n // deal with rowHeaderGroup\n for (let i = 0; i < scene.cornerHeaderGroup.childrenCount; i++) {\n const child = scene.cornerHeaderGroup.children[i];\n if (!checkBeforeMove(child)) {\n continue;\n }\n const target = scene.rowHeaderGroup.children[i] as Group;\n if (!target) {\n continue;\n }\n const rowCell = child.lastChild as Group;\n // scene.rowHeaderGroup.children[i]?.appendChild(rowCell);\n insertBefore(target, rowCell, target.firstChild as Group);\n // update container width\n if (!hasSetedHeight) {\n scene.cornerHeaderGroup.setAttribute(\n 'height',\n scene.cornerHeaderGroup.attribute.height - rowCell.attribute.height\n );\n scene.rowHeaderGroup.setAttribute('height', scene.rowHeaderGroup.attribute.height + rowCell.attribute.height);\n hasSetedHeight = true;\n }\n }\n}\n\nfunction moveRowFromTopRightCornerToRight(scene: Scenegraph) {\n let hasSetedHeight = false;\n // deal with rowHeaderGroup\n for (let i = 0; i < scene.rightTopCornerGroup.childrenCount; i++) {\n const child = scene.rightTopCornerGroup.children[i];\n if (!checkBeforeMove(child)) {\n continue;\n }\n const target = scene.rightFrozenGroup.children[i] as Group;\n if (!target) {\n continue;\n }\n const rowCell = child.lastChild as Group;\n // scene.rightFrozenGroup.children[i]?.appendChild(rowCell);\n insertBefore(target, rowCell, target.firstChild as Group);\n // update container width\n if (!hasSetedHeight) {\n scene.rightTopCornerGroup.setAttribute(\n 'height',\n scene.rightTopCornerGroup.attribute.height - rowCell.attribute.height\n );\n scene.rightFrozenGroup.setAttribute('height', scene.rightFrozenGroup.attribute.height + rowCell.attribute.height);\n hasSetedHeight = true;\n }\n }\n}\n\nfunction checkBeforeMove(child: any) {\n // 跳过非 Group 类型或名为 'table-border-rect' 的边框节点\n return child instanceof Group && child?.name !== 'table-border-rect';\n}\n"]}
1
+ {"version":3,"sources":["../src/scenegraph/layout/frozen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAC;AAE/D,MAAM,UAAU,UAAU,CAAC,KAAiB;;IAC1C,IAAI,KAAK,CAAC,KAAK,CAAC,cAAc,GAAG,KAAK,CAAC,KAAK,CAAC,mBAAmB,EAAE;QAEhE,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAC9E,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QACpE,KAAK,CAAC,iBAAiB,CAAC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EACR,KAAK,CAAC,mBAAmB,CAAC,SAAS,CAAC,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,MAAM,CACtE,CAAC;YACF,KAAK,CAAC,gBAAgB,CAAC,YAAY,CAAC,QAAQ,EAAE,KAAK,CAAC,gBAAgB,CAAC,SAAS,CAAC,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YAClH,cAAc,GAAG,IAAI,CAAC;SACvB;KACF;AACH,CAAC;AAED,SAAS,eAAe,CAAC,KAAU;IAEjC,OAAO,KAAK,YAAY,KAAK,IAAI,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,MAAK,mBAAmB,CAAC;AACvE,CAAC","file":"frozen.js","sourcesContent":["import { getStyleTheme } from '../../core/tableHelper';\nimport { getTargetCell } from '../../event/util';\nimport { Group } from '../graphic/group';\nimport { createColGroup } from '../group-creater/column';\nimport type { Scenegraph } from '../scenegraph';\nimport { getProp } from '../utils/get-prop';\nimport { table } from 'console';\nimport { updateReactComponentContainer } from './frozen-react';\n\nexport function dealFrozen(scene: Scenegraph) {\n if (scene.table.frozenColCount > scene.table.rowHeaderLevelCount) {\n // 将对应列移入rowHeaderGroup\n scene.rowHeaderGroup.setAttribute('height', scene.bodyGroup.attribute.height);\n scene.rowHeaderGroup.setAttribute('y', scene.bodyGroup.attribute.y);\n scene.cornerHeaderGroup.setAttribute('height', scene.colHeaderGroup.attribute.height);\n for (let i = 0; i < scene.table.frozenColCount - scene.table.rowHeaderLevelCount; i++) {\n moveColumnFromBodyToRowHeader(scene);\n moveColumnFromColHeaderToCornerHeader(scene);\n moveColumnFromBottomToLeftBottomCorner(scene);\n }\n } else if (scene.table.frozenColCount < scene.table.rowHeaderLevelCount) {\n // move columnGroup from rowHeaderGroup into bodyGroup(from cornerHeaderGroup into colHeaderGroup)\n scene.bodyGroup.setAttribute('height', scene.rowHeaderGroup.attribute.height);\n scene.bodyGroup.setAttribute('y', scene.rowHeaderGroup.attribute.y);\n scene.colHeaderGroup.setAttribute('height', scene.cornerHeaderGroup.attribute.height);\n for (let i = 0; i < scene.table.rowHeaderLevelCount - scene.table.frozenColCount; i++) {\n moveColumnFromRowHeaderToBody(scene);\n moveColumnFromCornerHeaderToColHeader(scene);\n moveColumnFromLeftBottomCornerToBottom(scene);\n }\n }\n scene.bodyGroup.setAttribute('x', scene.rowHeaderGroup.attribute.width);\n scene.colHeaderGroup.setAttribute('x', scene.cornerHeaderGroup.attribute.width);\n\n scene.updateContainer();\n scene.updateBorderSizeAndPosition();\n\n if (!scene.isPivot && !(scene.table as any).transpose) {\n scene.component.setFrozenColumnShadow(scene.table.frozenColCount - 1);\n scene.component.setRightFrozenColumnShadow(scene.table.colCount - scene.table.rightFrozenColCount);\n } else if (scene.table.options.frozenColCount) {\n scene.component.setFrozenColumnShadow(scene.table.frozenColCount - 1);\n } else if (scene.table.options.frozenColCount) {\n scene.component.setRightFrozenColumnShadow(scene.table.colCount - scene.table.rightFrozenColCount);\n }\n scene.hasFrozen = true;\n\n // scene.frozenColCount = scene.rowHeaderGroup.childrenCount;\n scene.frozenColCount = scene.table.frozenColCount;\n scene.frozenRowCount =\n scene.colHeaderGroup.firstChild?.childrenCount ??\n scene.cornerHeaderGroup.firstChild?.childrenCount ??\n scene.table.frozenRowCount;\n}\n\nexport function resetFrozen(scene: Scenegraph) {\n if (scene.frozenColCount > scene.table.frozenColCount) {\n // move columnGroup from rowHeaderGroup into bodyGroup(from cornerHeaderGroup into colHeaderGroup)\n scene.bodyGroup.setAttribute('height', scene.rowHeaderGroup.attribute.height);\n scene.bodyGroup.setAttribute('y', scene.rowHeaderGroup.attribute.y);\n scene.colHeaderGroup.setAttribute('height', scene.cornerHeaderGroup.attribute.height);\n for (let i = 0; i < scene.frozenColCount - scene.table.frozenColCount; i++) {\n moveColumnFromRowHeaderToBody(scene);\n moveColumnFromCornerHeaderToColHeader(scene);\n moveColumnFromLeftBottomCornerToBottom(scene);\n }\n } else if (scene.frozenColCount < scene.table.frozenColCount) {\n // move columnGroup from bodyGroup into rowHeaderGroup(from colHeaderGroup into cornerHeaderGroup)\n scene.rowHeaderGroup.setAttribute('height', scene.bodyGroup.attribute.height);\n scene.rowHeaderGroup.setAttribute('y', scene.bodyGroup.attribute.y);\n scene.cornerHeaderGroup.setAttribute('height', scene.colHeaderGroup.attribute.height);\n for (let i = 0; i < scene.table.frozenColCount - scene.frozenColCount; i++) {\n moveColumnFromBodyToRowHeader(scene);\n moveColumnFromColHeaderToCornerHeader(scene);\n moveColumnFromBottomToLeftBottomCorner(scene);\n }\n }\n\n updateReactComponentContainer(scene);\n scene.recreateAllSelectRangeComponents();\n // scene.frozenColCount = scene.rowHeaderGroup.childrenCount;\n scene.frozenColCount = scene.table.frozenColCount;\n scene.frozenRowCount =\n scene.colHeaderGroup.firstChild?.childrenCount ??\n scene.cornerHeaderGroup.firstChild?.childrenCount ??\n scene.table.frozenRowCount;\n // scene.proxy.colStart = scene.table.frozenColCount;\n scene.proxy.colStart = (scene.bodyGroup.firstChild as any)?.col ?? scene.table.frozenColCount;\n\n scene.bodyGroup.setAttribute('x', scene.rowHeaderGroup.attribute.width);\n scene.colHeaderGroup.setAttribute('x', scene.cornerHeaderGroup.attribute.width);\n // scene.updateContainerAttrWidthAndX();\n scene.updateContainer();\n scene.updateBorderSizeAndPosition();\n\n if (!scene.isPivot && !(scene.table as any).transpose) {\n scene.component.setFrozenColumnShadow(scene.table.frozenColCount - 1);\n scene.component.setRightFrozenColumnShadow(scene.table.colCount - scene.table.rightFrozenColCount);\n } else if (scene.table.options.frozenColCount) {\n scene.component.setFrozenColumnShadow(scene.table.frozenColCount - 1);\n } else if (scene.table.options.rightFrozenColCount) {\n scene.component.setRightFrozenColumnShadow(scene.table.colCount - scene.table.rightFrozenColCount);\n }\n scene.hasFrozen = true;\n}\n\nfunction moveColumnFromBodyToRowHeader(scene: Scenegraph) {\n // deal with bodyGroup\n const column = scene.bodyGroup.firstChild instanceof Group ? scene.bodyGroup.firstChild : null;\n if (column) {\n scene.rowHeaderGroup.appendChild(column);\n // update container width\n scene.rowHeaderGroup.setAttribute('width', scene.rowHeaderGroup.attribute.width + column.attribute.width);\n scene.bodyGroup.setAttribute('width', scene.bodyGroup.attribute.width - column.attribute.width);\n }\n}\n\nfunction moveColumnFromColHeaderToCornerHeader(scene: Scenegraph) {\n // deal width colHeaderGroup\n const headerColumn = scene.colHeaderGroup.firstChild instanceof Group ? scene.colHeaderGroup.firstChild : null;\n if (headerColumn) {\n scene.cornerHeaderGroup.appendChild(headerColumn);\n scene.cornerHeaderGroup.setAttribute(\n 'width',\n scene.cornerHeaderGroup.attribute.width + headerColumn.attribute.width\n );\n scene.colHeaderGroup.setAttribute('width', scene.colHeaderGroup.attribute.width - headerColumn.attribute.width);\n }\n}\n\nfunction moveColumnFromRowHeaderToBody(scene: Scenegraph) {\n const column =\n scene.rowHeaderGroup.lastChild instanceof Group\n ? scene.rowHeaderGroup.lastChild\n : (scene.rowHeaderGroup.lastChild?._prev as Group);\n if (column) {\n insertBefore(scene.bodyGroup, column, scene.bodyGroup.firstChild as Group);\n // 更新容器宽度\n scene.bodyGroup.setAttribute('width', scene.bodyGroup.attribute.width + column.attribute.width);\n scene.rowHeaderGroup.setAttribute('width', scene.rowHeaderGroup.attribute.width - column.attribute.width);\n }\n}\n\nfunction moveColumnFromCornerHeaderToColHeader(scene: Scenegraph) {\n // 处理列表头\n const headerColumn =\n scene.cornerHeaderGroup.lastChild instanceof Group\n ? scene.cornerHeaderGroup.lastChild\n : (scene.cornerHeaderGroup.lastChild?._prev as Group);\n if (headerColumn) {\n insertBefore(scene.colHeaderGroup, headerColumn, scene.colHeaderGroup.firstChild as Group);\n scene.colHeaderGroup.setAttribute('width', scene.colHeaderGroup.attribute.width + headerColumn.attribute.width);\n scene.cornerHeaderGroup.setAttribute(\n 'width',\n scene.cornerHeaderGroup.attribute.width - headerColumn.attribute.width\n );\n }\n}\n\nfunction moveColumnFromBottomToLeftBottomCorner(scene: Scenegraph) {\n // deal with bottomFrozenGroup\n const column = scene.bottomFrozenGroup.firstChild instanceof Group ? scene.bottomFrozenGroup.firstChild : null;\n if (column) {\n scene.leftBottomCornerGroup.appendChild(column);\n // update container width\n scene.leftBottomCornerGroup.setAttribute(\n 'width',\n scene.leftBottomCornerGroup.attribute.width + column.attribute.width\n );\n scene.bottomFrozenGroup.setAttribute('width', scene.bottomFrozenGroup.attribute.width - column.attribute.width);\n\n if (scene.table.isPivotChart()) {\n column.forEachChildren((child: Group) => {\n child.setAttributes({\n stroke: false,\n fill: false\n });\n });\n }\n }\n}\n\nfunction moveColumnFromLeftBottomCornerToBottom(scene: Scenegraph) {\n const column =\n scene.leftBottomCornerGroup.lastChild instanceof Group\n ? scene.leftBottomCornerGroup.lastChild\n : (scene.leftBottomCornerGroup.lastChild?._prev as Group);\n if (column) {\n insertBefore(scene.bottomFrozenGroup, column, scene.bottomFrozenGroup.firstChild as Group);\n // 更新容器宽度\n scene.bottomFrozenGroup.setAttribute('width', scene.bottomFrozenGroup.attribute.width + column.attribute.width);\n scene.leftBottomCornerGroup.setAttribute(\n 'width',\n scene.leftBottomCornerGroup.attribute.width - column.attribute.width\n );\n\n if (scene.table.isPivotChart()) {\n column.forEachChildren((child: Group) => {\n const cellStyle = scene.table._getCellStyle(child.col, child.row);\n const range = scene.table.getCellRange(child.col, child.row);\n const cellTheme = getStyleTheme(\n cellStyle,\n scene.table,\n range ? range.start.col : child.col,\n range ? range.start.row : child.row,\n getProp\n ).theme;\n\n child.setAttributes({\n fill: cellTheme?.group?.fill ?? undefined,\n stroke: cellTheme?.group?.stroke ?? undefined\n });\n });\n }\n }\n}\n\nexport function dealRightFrozen(distRightFrozenCol: number, scene: Scenegraph) {\n const {\n table,\n proxy,\n rightTopCornerGroup,\n rightFrozenGroup,\n rightBottomCornerGroup,\n bottomFrozenGroup,\n bodyGroup,\n colHeaderGroup\n } = scene;\n // const distRightFrozenCol = scene.table.rightFrozenColCount;\n const currentRightFrozenCol = scene.table.rightFrozenColCount;\n if (distRightFrozenCol > currentRightFrozenCol) {\n for (let col = table.colCount - currentRightFrozenCol - 1; col >= table.colCount - distRightFrozenCol; col--) {\n const colGroup = scene.getColGroup(col);\n insertBefore(rightFrozenGroup, colGroup, rightFrozenGroup.firstChild as Group);\n const headerColGroup = scene.getColGroup(col, true);\n insertBefore(rightTopCornerGroup, headerColGroup, rightTopCornerGroup.firstChild as Group);\n const bottomColGroup = scene.getColGroupInBottom(col);\n if (bottomColGroup) {\n insertBefore(rightBottomCornerGroup, bottomColGroup, rightBottomCornerGroup.firstChild as Group);\n }\n }\n // reset cell y\n let x = 0;\n rightFrozenGroup.forEachChildren((columnGroup: Group) => {\n columnGroup.setAttribute('x', x);\n x += columnGroup.attribute.width;\n });\n x = 0;\n rightTopCornerGroup.forEachChildren((columnGroup: Group) => {\n columnGroup.setAttribute('x', x);\n x += columnGroup.attribute.width;\n });\n x = 0;\n rightBottomCornerGroup.forEachChildren((columnGroup: Group) => {\n columnGroup.setAttribute('x', x);\n x += columnGroup.attribute.width;\n });\n } else if (distRightFrozenCol < currentRightFrozenCol) {\n for (let col = table.colCount - currentRightFrozenCol; col < table.colCount - distRightFrozenCol; col++) {\n const colGroup = scene.getColGroup(col);\n colGroup.setAttribute(\n 'x',\n (bodyGroup.lastChild as Group).attribute.x + table.getColWidth((bodyGroup.lastChild as Group).col)\n );\n bodyGroup.appendChild(colGroup);\n const headerColGroup = scene.getColGroupInRightTopCorner(col);\n headerColGroup.setAttribute(\n 'x',\n (colHeaderGroup.lastChild as Group).attribute.x + table.getColWidth((colHeaderGroup.lastChild as Group).col)\n );\n colHeaderGroup.appendChild(headerColGroup);\n const bottomColGroup = scene.getColGroupInRightBottomCorner(col);\n if (bottomColGroup) {\n const lastBottomColGroup = bottomFrozenGroup.lastChild as Group | undefined;\n bottomColGroup.setAttribute(\n 'x',\n lastBottomColGroup ? lastBottomColGroup.attribute.x + table.getColWidth(lastBottomColGroup.col) : 0\n );\n bottomFrozenGroup.appendChild(bottomColGroup);\n }\n }\n // reset cell y\n let x = 0;\n rightFrozenGroup.forEachChildren((columnGroup: Group) => {\n columnGroup.setAttribute('x', x);\n x += columnGroup.attribute.width;\n });\n x = 0;\n rightTopCornerGroup.forEachChildren((columnGroup: Group) => {\n columnGroup.setAttribute('x', x);\n x += columnGroup.attribute.width;\n });\n x = 0;\n rightBottomCornerGroup.forEachChildren((columnGroup: Group) => {\n columnGroup.setAttribute('x', x);\n x += columnGroup.attribute.width;\n });\n }\n\n // reset right width\n rightFrozenGroup.setAttribute('width', table.getColsWidth(table.colCount - distRightFrozenCol, table.colCount - 1));\n rightTopCornerGroup.setAttribute(\n 'width',\n table.getColsWidth(table.colCount - distRightFrozenCol, table.colCount - 1)\n );\n rightBottomCornerGroup.setAttribute(\n 'width',\n table.getColsWidth(table.colCount - distRightFrozenCol, table.colCount - 1)\n );\n\n table.internalProps.rightFrozenColCount = distRightFrozenCol;\n scene.updateContainer();\n scene.component.updateScrollBar();\n scene.updateNextFrame();\n}\n\nexport function dealBottomFrozen(distBottomFrozenRow: number, scene: Scenegraph) {\n const { table, proxy, bottomFrozenGroup, leftBottomCornerGroup, rightBottomCornerGroup } = scene;\n if (!bottomFrozenGroup.childrenCount) {\n // init bottom\n if (!proxy.table.isPivotChart()) {\n // create left bottom frozen\n createColGroup(\n leftBottomCornerGroup,\n 0,\n 0,\n 0, // colStart\n table.frozenColCount - 1, // colEnd\n 0, // rowStart\n -1, // rowEnd\n 'rowHeader', // isHeader\n table\n );\n createColGroup(\n rightBottomCornerGroup,\n 0,\n 0,\n table.colCount - table.rightFrozenColCount, // colStart\n table.colCount - 1, // colEnd\n 0, // rowStart\n -1, // rowEnd\n 'body', // isHeader\n table\n );\n }\n // create bottomFrozenGroup\n createColGroup(\n bottomFrozenGroup,\n 0,\n 0,\n proxy.colStart, // colStart\n proxy.colEnd, // colEnd\n 0, // rowStart\n -1, // rowEnd\n 'body', // isHeader\n table\n );\n }\n const currentBottomFrozenRow = scene.table.bottomFrozenRowCount;\n if (distBottomFrozenRow > currentBottomFrozenRow) {\n // row header -> left bottom\n for (let col = 0; col < table.frozenColCount; col++) {\n const bottomFrozenColumnGroup = scene.getColGroupInLeftBottomCorner(col);\n // move cell\n for (let row = table.rowCount - currentBottomFrozenRow - 1; row >= table.rowCount - distBottomFrozenRow; row--) {\n const cellGroup = scene.getCell(col, row, true);\n // bottomFrozenColumnGroup.insertBefore(cellGroup, bottomFrozenColumnGroup.firstChild);\n insertBefore(bottomFrozenColumnGroup, cellGroup, bottomFrozenColumnGroup.firstChild as Group);\n }\n // reset cell y\n let y = 0;\n bottomFrozenColumnGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += table.getRowHeight(cellGroup.row);\n });\n }\n // body -> bottom\n for (let col = proxy.colStart; col <= proxy.colEnd; col++) {\n const bottomFrozenColumnGroup = scene.getColGroupInBottom(col);\n // move cell\n for (let row = table.rowCount - currentBottomFrozenRow - 1; row >= table.rowCount - distBottomFrozenRow; row--) {\n const cellGroup = scene.getCell(col, row, true);\n // bottomFrozenColumnGroup.insertBefore(cellGroup, bottomFrozenColumnGroup.firstChild);\n insertBefore(bottomFrozenColumnGroup, cellGroup, bottomFrozenColumnGroup.firstChild as Group);\n }\n // reset cell y\n let y = 0;\n bottomFrozenColumnGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += table.getRowHeight(cellGroup.row);\n });\n }\n if (table.rightFrozenColCount > 0) {\n // right -> right bottom\n for (let col = table.colCount - table.rightFrozenColCount; col < table.colCount; col++) {\n const bottomFrozenColumnGroup = scene.getColGroupInRightBottomCorner(col);\n // move cell\n for (\n let row = table.rowCount - currentBottomFrozenRow - 1;\n row >= table.rowCount - distBottomFrozenRow;\n row--\n ) {\n const cellGroup = scene.getCell(col, row, true);\n // bottomFrozenColumnGroup.insertBefore(cellGroup, bottomFrozenColumnGroup.firstChild);\n insertBefore(bottomFrozenColumnGroup, cellGroup, bottomFrozenColumnGroup.firstChild as Group);\n }\n // reset cell y\n let y = 0;\n bottomFrozenColumnGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += table.getRowHeight(cellGroup.row);\n });\n }\n }\n } else if (distBottomFrozenRow < currentBottomFrozenRow) {\n // left bottom -> row header\n for (let col = 0; col < table.rowHeaderLevelCount; col++) {\n const columnGroup = scene.getColGroup(col);\n for (let row = table.rowCount - currentBottomFrozenRow; row < table.rowCount - distBottomFrozenRow; row++) {\n const cellGroup = scene.getCell(col, row, true);\n cellGroup.setAttribute(\n 'y',\n (columnGroup.lastChild as Group).attribute.y + table.getRowHeight((columnGroup.lastChild as Group).row)\n );\n columnGroup.appendChild(cellGroup);\n }\n // reset cell y\n const bottomFrozenColumnGroup = scene.getColGroupInLeftBottomCorner(col);\n let y = 0;\n bottomFrozenColumnGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += table.getRowHeight(cellGroup.row);\n });\n }\n // bottom -> body\n for (let col = proxy.colStart; col <= proxy.colEnd; col++) {\n const columnGroup = scene.getColGroup(col);\n for (let row = table.rowCount - currentBottomFrozenRow; row < table.rowCount - distBottomFrozenRow; row++) {\n const cellGroup = scene.getCell(col, row, true);\n cellGroup.setAttribute(\n 'y',\n (columnGroup.lastChild as Group).attribute.y + table.getRowHeight((columnGroup.lastChild as Group).row)\n );\n columnGroup.appendChild(cellGroup);\n }\n // reset cell y\n const bottomFrozenColumnGroup = scene.getColGroupInBottom(col);\n let y = 0;\n bottomFrozenColumnGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += table.getRowHeight(cellGroup.row);\n });\n }\n if (table.rightFrozenColCount > 0) {\n // right bottom -> right\n for (let col = table.colCount - table.rightFrozenColCount; col < table.colCount; col++) {\n const columnGroup = scene.getColGroup(col);\n for (let row = table.rowCount - currentBottomFrozenRow; row < table.rowCount - distBottomFrozenRow; row++) {\n const cellGroup = scene.getCell(col, row, true);\n cellGroup.setAttribute(\n 'y',\n (columnGroup.lastChild as Group).attribute.y + table.getRowHeight((columnGroup.lastChild as Group).row)\n );\n columnGroup.appendChild(cellGroup);\n }\n // reset cell y\n const bottomFrozenColumnGroup = scene.getColGroupInRightBottomCorner(col);\n let y = 0;\n bottomFrozenColumnGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += table.getRowHeight(cellGroup.row);\n });\n }\n }\n }\n // reset bottom height\n bottomFrozenGroup.setAttribute(\n 'height',\n table.getRowsHeight(table.rowCount - distBottomFrozenRow, table.rowCount - 1)\n );\n leftBottomCornerGroup.setAttribute(\n 'height',\n table.getRowsHeight(table.rowCount - distBottomFrozenRow, table.rowCount - 1)\n );\n rightBottomCornerGroup.setAttribute(\n 'height',\n table.getRowsHeight(table.rowCount - distBottomFrozenRow, table.rowCount - 1)\n );\n\n table.internalProps.bottomFrozenRowCount = distBottomFrozenRow;\n scene.updateContainer();\n scene.component.updateScrollBar();\n scene.updateNextFrame();\n}\n\nfunction insertBefore(container: Group, newNode: Group, targetGroup: Group) {\n if (!newNode || !container) {\n return;\n }\n if (targetGroup) {\n container.insertBefore(newNode, targetGroup);\n } else {\n container.appendChild(newNode);\n }\n}\n\nexport function resetRowFrozen(scene: Scenegraph) {\n if (scene.frozenRowCount > scene.table.frozenRowCount) {\n // move columnGroup from rowHeaderGroup into bodyGroup(from cornerHeaderGroup into colHeaderGroup)\n scene.bodyGroup.setAttribute('width', scene.colHeaderGroup.attribute.width);\n scene.bodyGroup.setAttribute('x', scene.colHeaderGroup.attribute.x);\n scene.rowHeaderGroup.setAttribute('width', scene.cornerHeaderGroup.attribute.width);\n for (let i = 0; i < scene.frozenRowCount - scene.table.frozenRowCount; i++) {\n moveRowFromColHeaderToBody(scene);\n moveRowFromCornerHeaderToRowHeader(scene);\n moveRowFromTopRightCornerToRight(scene);\n }\n } else if (scene.frozenRowCount < scene.table.frozenRowCount) {\n // move columnGroup from bodyGroup into rowHeaderGroup(from colHeaderGroup into cornerHeaderGroup)\n scene.colHeaderGroup.setAttribute('width', scene.bodyGroup.attribute.width);\n scene.colHeaderGroup.setAttribute('x', scene.bodyGroup.attribute.x);\n scene.cornerHeaderGroup.setAttribute('width', scene.rowHeaderGroup.attribute.width);\n for (let i = 0; i < scene.table.frozenRowCount - scene.frozenRowCount; i++) {\n moveRowFromBodyToColHeader(scene);\n moveRowFromRowHeaderToCornerHeader(scene);\n moveRowFromRightToTopRightCorner(scene);\n }\n }\n\n updateReactComponentContainer(scene);\n scene.recreateAllSelectRangeComponents();\n // scene.frozenColCount = scene.rowHeaderGroup.childrenCount;\n scene.frozenRowCount = scene.table.frozenRowCount;\n scene.frozenColCount = scene.rowHeaderGroup?.childrenCount ?? 0;\n // scene.proxy.colStart = scene.table.frozenColCount;\n scene.proxy.rowStart = (scene.bodyGroup.firstChild?.firstChild as any)?.row ?? scene.table.frozenRowCount;\n scene.bodyGroup.setAttribute('y', scene.colHeaderGroup.attribute.height);\n scene.rowHeaderGroup.setAttribute('y', scene.cornerHeaderGroup.attribute.height);\n // scene.updateContainerAttrWidthAndX();\n scene.updateContainer({ needUpdateCellY: true });\n scene.updateBorderSizeAndPosition();\n\n scene.hasFrozen = true;\n}\n\nfunction moveRowFromBodyToColHeader(scene: Scenegraph) {\n let hasSetedHeight = false;\n // deal with bodyGroup\n for (let i = 0; i < scene.bodyGroup.childrenCount; i++) {\n const child = scene.bodyGroup.children[i];\n if (!checkBeforeMove(child)) {\n continue;\n }\n const rowCell = child.firstChild as Group;\n if (!scene.colHeaderGroup.children[i]) {\n createColGroup(scene.colHeaderGroup, 0, 0, rowCell.col, rowCell.col, 0, 0, 'columnHeader', scene.table);\n }\n scene.colHeaderGroup.children[i]?.appendChild(rowCell);\n // update container width\n if (!hasSetedHeight) {\n scene.colHeaderGroup.setAttribute('height', scene.colHeaderGroup.attribute.height + rowCell.attribute.height);\n scene.bodyGroup.setAttribute('height', scene.bodyGroup.attribute.height - rowCell.attribute.height);\n hasSetedHeight = true;\n }\n }\n}\n\nfunction moveRowFromRowHeaderToCornerHeader(scene: Scenegraph) {\n let hasSetedHeight = false;\n // deal with rowHeaderGroup\n for (let i = 0; i < scene.rowHeaderGroup.childrenCount; i++) {\n const child = scene.rowHeaderGroup.children[i];\n if (!checkBeforeMove(child)) {\n continue;\n }\n const rowCell = child.firstChild as Group;\n if (!scene.cornerHeaderGroup.children[i]) {\n createColGroup(\n scene.cornerHeaderGroup,\n 0,\n 0,\n rowCell.col,\n rowCell.col,\n 0,\n 0,\n scene.table.isListTable() ? 'columnHeader' : 'cornerHeader',\n scene.table\n );\n }\n scene.cornerHeaderGroup.children[i]?.appendChild(rowCell);\n // update container width\n if (!hasSetedHeight) {\n scene.cornerHeaderGroup.setAttribute(\n 'height',\n scene.cornerHeaderGroup.attribute.height + rowCell.attribute.height\n );\n scene.rowHeaderGroup.setAttribute('height', scene.rowHeaderGroup.attribute.height - rowCell.attribute.height);\n hasSetedHeight = true;\n }\n }\n}\n\nfunction moveRowFromRightToTopRightCorner(scene: Scenegraph) {\n let hasSetedHeight = false;\n // deal with rowHeaderGroup\n for (let i = 0; i < scene.rightFrozenGroup.childrenCount; i++) {\n const child = scene.rightFrozenGroup.children[i];\n if (!checkBeforeMove(child)) {\n continue;\n }\n const rowCell = child.firstChild as Group;\n if (!scene.rightTopCornerGroup.children[i]) {\n createColGroup(scene.rightTopCornerGroup, 0, 0, rowCell.col, rowCell.col, 0, 0, 'columnHeader', scene.table);\n }\n scene.rightTopCornerGroup.children[i].appendChild(rowCell);\n // update container width\n if (!hasSetedHeight) {\n scene.rightTopCornerGroup.setAttribute(\n 'height',\n scene.rightTopCornerGroup.attribute.height + rowCell.attribute.height\n );\n scene.rightFrozenGroup.setAttribute('height', scene.rightFrozenGroup.attribute.height - rowCell.attribute.height);\n hasSetedHeight = true;\n }\n }\n}\n\nfunction moveRowFromColHeaderToBody(scene: Scenegraph) {\n let hasSetedHeight = false;\n // deal with bodyGroup\n for (let i = 0; i < scene.colHeaderGroup.childrenCount; i++) {\n const child = scene.colHeaderGroup.children[i];\n if (!checkBeforeMove(child)) {\n continue;\n }\n const target = scene.bodyGroup.children[i] as Group;\n if (!target) {\n continue;\n }\n const rowCell = child.lastChild as Group;\n insertBefore(target, rowCell, target.firstChild as Group);\n // 更新高度\n if (!hasSetedHeight) {\n scene.colHeaderGroup.setAttribute('height', scene.colHeaderGroup.attribute.height - rowCell.attribute.height);\n scene.bodyGroup.setAttribute('height', scene.bodyGroup.attribute.height + rowCell.attribute.height);\n hasSetedHeight = true;\n }\n }\n}\n\nfunction moveRowFromCornerHeaderToRowHeader(scene: Scenegraph) {\n let hasSetedHeight = false;\n // deal with rowHeaderGroup\n for (let i = 0; i < scene.cornerHeaderGroup.childrenCount; i++) {\n const child = scene.cornerHeaderGroup.children[i];\n if (!checkBeforeMove(child)) {\n continue;\n }\n const target = scene.rowHeaderGroup.children[i] as Group;\n if (!target) {\n continue;\n }\n const rowCell = child.lastChild as Group;\n // scene.rowHeaderGroup.children[i]?.appendChild(rowCell);\n insertBefore(target, rowCell, target.firstChild as Group);\n // update container width\n if (!hasSetedHeight) {\n scene.cornerHeaderGroup.setAttribute(\n 'height',\n scene.cornerHeaderGroup.attribute.height - rowCell.attribute.height\n );\n scene.rowHeaderGroup.setAttribute('height', scene.rowHeaderGroup.attribute.height + rowCell.attribute.height);\n hasSetedHeight = true;\n }\n }\n}\n\nfunction moveRowFromTopRightCornerToRight(scene: Scenegraph) {\n let hasSetedHeight = false;\n // deal with rowHeaderGroup\n for (let i = 0; i < scene.rightTopCornerGroup.childrenCount; i++) {\n const child = scene.rightTopCornerGroup.children[i];\n if (!checkBeforeMove(child)) {\n continue;\n }\n const target = scene.rightFrozenGroup.children[i] as Group;\n if (!target) {\n continue;\n }\n const rowCell = child.lastChild as Group;\n // scene.rightFrozenGroup.children[i]?.appendChild(rowCell);\n insertBefore(target, rowCell, target.firstChild as Group);\n // update container width\n if (!hasSetedHeight) {\n scene.rightTopCornerGroup.setAttribute(\n 'height',\n scene.rightTopCornerGroup.attribute.height - rowCell.attribute.height\n );\n scene.rightFrozenGroup.setAttribute('height', scene.rightFrozenGroup.attribute.height + rowCell.attribute.height);\n hasSetedHeight = true;\n }\n }\n}\n\nfunction checkBeforeMove(child: any) {\n // 跳过非 Group 类型或名为 'table-border-rect' 的边框节点\n return child instanceof Group && child?.name !== 'table-border-rect';\n}\n"]}
@@ -886,16 +886,28 @@ export class Scenegraph {
886
886
  updateContainerChildrenX(this.rightBottomCornerGroup, rightStartX), this.updateNextFrame();
887
887
  }
888
888
  updateContainerAttrHeightAndY() {
889
- var _a, _b, _c;
890
- for (let i = 0; i < this.cornerHeaderGroup.children.length; i++) updateContainerChildrenY(this.cornerHeaderGroup.children[i], 0);
891
- for (let i = 0; i < this.colHeaderGroup.children.length; i++) updateContainerChildrenY(this.colHeaderGroup.children[i], 0);
892
- for (let i = 0; i < this.rightTopCornerGroup.children.length; i++) updateContainerChildrenY(this.rightTopCornerGroup.children[i], 0);
893
- for (let i = 0; i < this.rowHeaderGroup.children.length; i++) this.rowHeaderGroup.children[i].firstChild && updateContainerChildrenY(this.rowHeaderGroup.children[i], this.rowHeaderGroup.children[i].firstChild.row > 0 ? this.table.getRowsHeight(null !== (_a = this.table.frozenRowCount) && void 0 !== _a ? _a : 0, this.rowHeaderGroup.children[i].firstChild.row - 1) : 0);
894
- for (let i = 0; i < this.bodyGroup.children.length; i++) this.bodyGroup.children[i].firstChild && updateContainerChildrenY(this.bodyGroup.children[i], this.bodyGroup.children[i].firstChild.row > 0 ? this.table.getRowsHeight(null !== (_b = this.table.frozenRowCount) && void 0 !== _b ? _b : 0, this.bodyGroup.children[i].firstChild.row - 1) : 0);
895
- for (let i = 0; i < this.rightFrozenGroup.children.length; i++) this.rightFrozenGroup.children[i].firstChild && updateContainerChildrenY(this.rightFrozenGroup.children[i], this.rightFrozenGroup.children[i].firstChild.row > 0 ? this.table.getRowsHeight(null !== (_c = this.table.frozenRowCount) && void 0 !== _c ? _c : 0, this.rightFrozenGroup.children[i].firstChild.row - 1) : 0);
896
- for (let i = 0; i < this.leftBottomCornerGroup.children.length; i++) updateContainerChildrenY(this.leftBottomCornerGroup.children[i], 0);
897
- for (let i = 0; i < this.bottomFrozenGroup.children.length; i++) updateContainerChildrenY(this.bottomFrozenGroup.children[i], 0);
898
- for (let i = 0; i < this.rightBottomCornerGroup.children.length; i++) updateContainerChildrenY(this.rightBottomCornerGroup.children[i], 0);
889
+ this.cornerHeaderGroup.forEachChildrenSkipChild((column => {
890
+ updateContainerChildrenY(column, 0);
891
+ })), this.colHeaderGroup.forEachChildrenSkipChild((column => {
892
+ updateContainerChildrenY(column, 0);
893
+ })), this.rightTopCornerGroup.forEachChildrenSkipChild((column => {
894
+ updateContainerChildrenY(column, 0);
895
+ })), this.rowHeaderGroup.forEachChildrenSkipChild((column => {
896
+ var _a;
897
+ column.firstChild && updateContainerChildrenY(column, column.firstChild.row > 0 ? this.table.getRowsHeight(null !== (_a = this.table.frozenRowCount) && void 0 !== _a ? _a : 0, column.firstChild.row - 1) : 0);
898
+ })), this.bodyGroup.forEachChildrenSkipChild((column => {
899
+ var _a;
900
+ column.firstChild && updateContainerChildrenY(column, column.firstChild.row > 0 ? this.table.getRowsHeight(null !== (_a = this.table.frozenRowCount) && void 0 !== _a ? _a : 0, column.firstChild.row - 1) : 0);
901
+ })), this.rightFrozenGroup.forEachChildrenSkipChild((column => {
902
+ var _a;
903
+ column.firstChild && updateContainerChildrenY(column, column.firstChild.row > 0 ? this.table.getRowsHeight(null !== (_a = this.table.frozenRowCount) && void 0 !== _a ? _a : 0, column.firstChild.row - 1) : 0);
904
+ })), this.leftBottomCornerGroup.forEachChildrenSkipChild((column => {
905
+ updateContainerChildrenY(column, 0);
906
+ })), this.bottomFrozenGroup.forEachChildrenSkipChild((column => {
907
+ updateContainerChildrenY(column, 0);
908
+ })), this.rightBottomCornerGroup.forEachChildrenSkipChild((column => {
909
+ updateContainerChildrenY(column, 0);
910
+ }));
899
911
  }
900
912
  updateContainer(updateConfig = {
901
913
  async: !1,
@@ -1171,4 +1183,4 @@ export class Scenegraph {
1171
1183
  this.recreateAllSelectRangeComponents();
1172
1184
  }
1173
1185
  }
1174
- //# sourceMappingURL=scenegraph.js.map
1186
+ //# sourceMappingURL=scenegraph.js.map