@visactor/vtable 1.7.1 → 1.7.3

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 (73) hide show
  1. package/cjs/core/BaseTable.js +1 -1
  2. package/cjs/core/BaseTable.js.map +1 -1
  3. package/cjs/core/style-helper.js +3 -3
  4. package/cjs/core/style-helper.js.map +1 -1
  5. package/cjs/data/CachedDataSource.js +3 -3
  6. package/cjs/data/CachedDataSource.js.map +1 -1
  7. package/cjs/event/listener/container-dom.js +1 -1
  8. package/cjs/event/listener/container-dom.js.map +1 -1
  9. package/cjs/event/scroll.js +1 -1
  10. package/cjs/event/scroll.js.map +1 -1
  11. package/cjs/index.d.ts +1 -1
  12. package/cjs/index.js +1 -1
  13. package/cjs/index.js.map +1 -1
  14. package/cjs/layout/cell-range/simple-cell-range.js +1 -1
  15. package/cjs/layout/cell-range/simple-cell-range.js.map +1 -1
  16. package/cjs/plugins/custom-cell-style.js +6 -2
  17. package/cjs/plugins/custom-cell-style.js.map +1 -1
  18. package/cjs/scenegraph/component/table-component.js.map +1 -1
  19. package/cjs/scenegraph/group-creater/cell-helper.js +8 -7
  20. package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
  21. package/cjs/scenegraph/group-creater/column-helper.js +4 -3
  22. package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
  23. package/cjs/scenegraph/layout/update-height.js +5 -5
  24. package/cjs/scenegraph/layout/update-height.js.map +1 -1
  25. package/cjs/scenegraph/layout/update-width.js +7 -7
  26. package/cjs/scenegraph/layout/update-width.js.map +1 -1
  27. package/cjs/scenegraph/scenegraph.js +14 -8
  28. package/cjs/scenegraph/scenegraph.js.map +1 -1
  29. package/cjs/scenegraph/style/frame-border.js +6 -3
  30. package/cjs/scenegraph/style/frame-border.js.map +1 -1
  31. package/cjs/state/resize/update-resize-column.js +2 -1
  32. package/cjs/state/resize/update-resize-column.js.map +1 -1
  33. package/cjs/state/select/is-cell-select-highlight.js +2 -2
  34. package/cjs/state/select/is-cell-select-highlight.js.map +1 -1
  35. package/cjs/vrender.js.map +1 -1
  36. package/dist/vtable.js +81 -49
  37. package/dist/vtable.min.js +2 -2
  38. package/es/core/BaseTable.js +1 -1
  39. package/es/core/BaseTable.js.map +1 -1
  40. package/es/core/style-helper.js +3 -3
  41. package/es/core/style-helper.js.map +1 -1
  42. package/es/data/CachedDataSource.js +3 -3
  43. package/es/data/CachedDataSource.js.map +1 -1
  44. package/es/event/listener/container-dom.js +1 -1
  45. package/es/event/listener/container-dom.js.map +1 -1
  46. package/es/event/scroll.js +1 -1
  47. package/es/event/scroll.js.map +1 -1
  48. package/es/index.d.ts +1 -1
  49. package/es/index.js +1 -1
  50. package/es/index.js.map +1 -1
  51. package/es/layout/cell-range/simple-cell-range.js +1 -1
  52. package/es/layout/cell-range/simple-cell-range.js.map +1 -1
  53. package/es/plugins/custom-cell-style.js +6 -2
  54. package/es/plugins/custom-cell-style.js.map +1 -1
  55. package/es/scenegraph/component/table-component.js.map +1 -1
  56. package/es/scenegraph/group-creater/cell-helper.js +8 -7
  57. package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
  58. package/es/scenegraph/group-creater/column-helper.js +4 -3
  59. package/es/scenegraph/group-creater/column-helper.js.map +1 -1
  60. package/es/scenegraph/layout/update-height.js +5 -5
  61. package/es/scenegraph/layout/update-height.js.map +1 -1
  62. package/es/scenegraph/layout/update-width.js +7 -7
  63. package/es/scenegraph/layout/update-width.js.map +1 -1
  64. package/es/scenegraph/scenegraph.js +14 -8
  65. package/es/scenegraph/scenegraph.js.map +1 -1
  66. package/es/scenegraph/style/frame-border.js +6 -3
  67. package/es/scenegraph/style/frame-border.js.map +1 -1
  68. package/es/state/resize/update-resize-column.js +2 -1
  69. package/es/state/resize/update-resize-column.js.map +1 -1
  70. package/es/state/select/is-cell-select-highlight.js +2 -2
  71. package/es/state/select/is-cell-select-highlight.js.map +1 -1
  72. package/es/vrender.js.map +1 -1
  73. package/package.json +4 -4
@@ -89,12 +89,12 @@ function updateColunmWidth(columnGroup, detaX, mode, scene) {
89
89
  }
90
90
 
91
91
  function updateCellWidth(scene, cell, col, row, oldWidth, distWidth, detaX, isHeader, autoWrapText) {
92
- var _a, _b, _c, _d, _e;
92
+ var _a, _b, _c, _d, _e, _f;
93
93
  if (cell.attribute.width === distWidth && !cell.needUpdateWidth) return !1;
94
94
  cell.needUpdateWidth = !1, cell.setAttribute("width", distWidth);
95
95
  const cellGroup = cell;
96
96
  if (!cellGroup) return !1;
97
- const autoRowHeight = scene.table.isAutoRowHeight(row), type = scene.table.isHeader(col, row) ? scene.table._getHeaderLayoutMap(col, row).headerType : scene.table.getBodyColumnType(col, row);
97
+ const autoRowHeight = scene.table.isAutoRowHeight(row), type = (null === (_a = scene.table.getCellRawRecord(col, row)) || void 0 === _a ? void 0 : _a.vtableMerge) ? "text" : scene.table.isHeader(col, row) ? scene.table._getHeaderLayoutMap(col, row).headerType : scene.table.getBodyColumnType(col, row);
98
98
  let isHeightChange = !1;
99
99
  if ("progressbar" === type) {
100
100
  const columnDefine = scene.table.getBodyColumnDefine(col, row), style = scene.table._getCellStyle(col, row), value = scene.table.getCellValue(col, row), dataValue = scene.table.getCellOriginValue(col, row), padding = (0,
@@ -112,14 +112,14 @@ function updateCellWidth(scene, cell, col, row, oldWidth, distWidth, detaX, isHe
112
112
  get_prop_1.getProp)("padding", headerStyle, col, row, scene.table));
113
113
  factory_1.Factory.getFunction("createSparkLineCellGroup")(cellGroup, cellGroup.parent, cellGroup.attribute.x, cellGroup.attribute.y, col, row, cellGroup.attribute.width, cellGroup.attribute.height, padding, scene.table, (0,
114
114
  tableHelper_1.getStyleTheme)(headerStyle, scene.table, col, row, get_prop_1.getProp).theme, !1);
115
- } else if ("image" === type || "video" === type) (0, image_cell_1.updateImageCellContentWhileResize)(cellGroup, col, row, detaX, 0, scene.table); else if ("axis" === (null === (_a = cellGroup.firstChild) || void 0 === _a ? void 0 : _a.name)) {
115
+ } else if ("image" === type || "video" === type) (0, image_cell_1.updateImageCellContentWhileResize)(cellGroup, col, row, detaX, 0, scene.table); else if ("axis" === (null === (_b = cellGroup.firstChild) || void 0 === _b ? void 0 : _b.name)) {
116
116
  const axisConfig = scene.table.internalProps.layoutMap.getAxisConfigInPivotChart(col, row), cellStyle = scene.table._getCellStyle(col, row), padding = (0,
117
117
  padding_1.getQuadProps)((0, get_prop_1.getProp)("padding", cellStyle, col, row, scene.table));
118
118
  if (axisConfig) {
119
119
  const axis = new (factory_1.Factory.getComponent("axis"))(axisConfig, cellGroup.attribute.width, cellGroup.attribute.height, padding, scene.table);
120
120
  cellGroup.clear(), cellGroup.appendChild(axis.component), axis.overlap();
121
121
  }
122
- } else if ("axis" === (null === (_b = cell.firstChild) || void 0 === _b ? void 0 : _b.name)) null === (_c = cell.firstChild) || void 0 === _c || _c.originAxis.resize(cell.attribute.width, cell.attribute.height); else {
122
+ } else if ("axis" === (null === (_c = cell.firstChild) || void 0 === _c ? void 0 : _c.name)) null === (_d = cell.firstChild) || void 0 === _d || _d.originAxis.resize(cell.attribute.width, cell.attribute.height); else {
123
123
  let renderDefault = !0;
124
124
  const customContainer = cell.getChildByName(custom_1.CUSTOM_CONTAINER_NAME) || cell.getChildByName(custom_1.CUSTOM_MERGE_CONTAINER_NAME);
125
125
  if (customContainer) {
@@ -133,8 +133,8 @@ function updateCellWidth(scene, cell, col, row, oldWidth, distWidth, detaX, isHe
133
133
  customContainer.removeAllChild(), mergedCell.removeChild(customContainer), (0, cell_helper_1.getCustomCellMergeCustom)(mergeCol, row, mergedCell, scene.table);
134
134
  } else {
135
135
  let customRender, customLayout;
136
- const cellType = scene.table.getCellLocation(col, row), {vTableMerge: vTableMerge} = scene.table.getCellRawRecord(col, row);
137
- if (vTableMerge && scene.table.options.groupTitleCustomLayout) customLayout = scene.table.options.groupTitleCustomLayout; else if ("body" !== cellType) {
136
+ const cellType = scene.table.getCellLocation(col, row), {vtableMerge: vtableMerge} = scene.table.getCellRawRecord(col, row);
137
+ if (vtableMerge && scene.table.options.groupTitleCustomLayout) customLayout = scene.table.options.groupTitleCustomLayout; else if ("body" !== cellType) {
138
138
  const define = scene.table.getHeaderDefine(col, row);
139
139
  customRender = null == define ? void 0 : define.headerCustomRender, customLayout = null == define ? void 0 : define.headerCustomLayout;
140
140
  } else {
@@ -149,7 +149,7 @@ function updateCellWidth(scene, cell, col, row, oldWidth, distWidth, detaX, isHe
149
149
  let width = cellGroup.attribute.width, height = cellGroup.attribute.height;
150
150
  (0, is_merge_cell_group_1.isMergeCellGroup)(cellGroup) && (width = scene.table.getColsWidth(cellGroup.mergeStartCol, cellGroup.mergeEndCol),
151
151
  height = scene.table.getRowsHeight(cellGroup.mergeStartRow, cellGroup.mergeEndRow));
152
- const customResult = (0, custom_1.dealWithCustom)(customLayout, customRender, null !== (_d = cellGroup.mergeStartCol) && void 0 !== _d ? _d : col, null !== (_e = cellGroup.mergeStartRow) && void 0 !== _e ? _e : row, width, height, !1, scene.table.isAutoRowHeight(row), padding, (0,
152
+ const customResult = (0, custom_1.dealWithCustom)(customLayout, customRender, null !== (_e = cellGroup.mergeStartCol) && void 0 !== _e ? _e : col, null !== (_f = cellGroup.mergeStartRow) && void 0 !== _f ? _f : row, width, height, !1, scene.table.isAutoRowHeight(row), padding, (0,
153
153
  is_merge_cell_group_1.isMergeCellGroup)(cellGroup) ? {
154
154
  start: {
155
155
  col: cellGroup.mergeStartCol,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/scenegraph/layout/update-width.ts"],"names":[],"mappings":";;;AAGA,gDAA6C;AAC7C,wDAAuD;AAGvD,gDAAyG;AAEzG,sEAA0F;AAG1F,8DAAyF;AAEzF,4DAA2D;AAC3D,gDAA4C;AAC5C,sEAAgE;AAChE,8CAAgD;AAChD,gEAAmE;AACnE,6DAAwD;AACxD,mDAAyD;AACzD,wEAAmE;AACnE,yDAA4D;AAW5D,SAAgB,cAAc,CAAC,KAAiB,EAAE,GAAW,EAAE,KAAa,EAAE,iBAA2B;IAC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CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IAE9F,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;IAGhD,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE;QACnD,MAAM,UAAU,GAAG,SAAS,CAAC;QAC7B,MAAM,IAAI,GAAG,KAAK,CAAC,sBAAsB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QACpD,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE;YACzB,OAAO;SACR;QAED,IAAA,sCAAsB,EACpB,KAAK,EACL,IAAI,EACJ,GAAG,EACH,GAAG,EACH,UAAU,EACV,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAClC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,CAC/B,CAAC;KACH;AACH,CAAC","file":"update-width.js","sourcesContent":["import type { IGraphic } from './../../vrender';\nimport type { ProgressBarStyle } from '../../body-helper/style/ProgressBarStyle';\nimport type { ICartesianAxis } from '../../components/axis/axis';\nimport { Factory } from '../../core/factory';\nimport { getStyleTheme } from '../../core/tableHelper';\nimport type { BaseTableAPI, HeaderData } from '../../ts-types/base-table';\nimport type { IProgressbarColumnBodyDefine } from '../../ts-types/list-table/define/progressbar-define';\nimport { CUSTOM_CONTAINER_NAME, CUSTOM_MERGE_CONTAINER_NAME, dealWithCustom } from '../component/custom';\nimport type { Group } from '../graphic/group';\nimport { updateImageCellContentWhileResize } from '../group-creater/cell-type/image-cell';\nimport type { CreateProgressBarCell } from '../group-creater/cell-type/progress-bar-cell';\nimport type { CreateSparkLineCellGroup } from '../group-creater/cell-type/spark-line-cell';\nimport { resizeCellGroup, getCustomCellMergeCustom } from '../group-creater/cell-helper';\nimport type { Scenegraph } from '../scenegraph';\nimport { getCellMergeInfo } from '../utils/get-cell-merge';\nimport { getProp } from '../utils/get-prop';\nimport { isMergeCellGroup } from '../utils/is-merge-cell-group';\nimport { getQuadProps } from '../utils/padding';\nimport { updateCellContentWidth } from '../utils/text-icon-layout';\nimport { computeRowHeight } from './compute-row-height';\nimport { updateCellHeightForRow } from './update-height';\nimport { getHierarchyOffset } from '../utils/get-hierarchy-offset';\nimport { getCellMergeRange } from '../../tools/merge-range';\nimport type { ColumnDefine, ListTableConstructorOptions } from '../../ts-types';\n// import { updateAutoRowHeight } from './auto-height';\n\n/**\n * @description: 更新指定列列宽,在拖拽调整列宽中使用\n * @param {Scenegraph} scene\n * @param {number} col\n * @param {number} detaX\n * @return {*}\n */\nexport function updateColWidth(scene: Scenegraph, col: number, detaX: number, skipTableWidthMap?: boolean) {\n if (!skipTableWidthMap) {\n scene.table._setColWidth(col, scene.table.getColWidth(col) + detaX, true);\n }\n\n // deal with corner header or column header\n const colOrCornerHeaderColumn = scene.getColGroup(col, true) as Group;\n const rightTopColumn = scene.getColGroupInRightTopCorner(col);\n if (colOrCornerHeaderColumn && !rightTopColumn) {\n updateColunmWidth(colOrCornerHeaderColumn, detaX, 'col-corner', scene);\n }\n // deal with right bottom frozen cells\n if (rightTopColumn) {\n updateColunmWidth(rightTopColumn, detaX, 'right-top', scene);\n }\n\n // deal with row header or body or right frozen cells\n const rowHeaderOrBodyColumn = scene.getColGroup(col) as Group;\n if (rowHeaderOrBodyColumn) {\n updateColunmWidth(rowHeaderOrBodyColumn, detaX, 'row-body', scene);\n }\n\n const leftBottomColumn = scene.getColGroupInLeftBottomCorner(col);\n // deal with left bottom frozen cells\n if (leftBottomColumn) {\n updateColunmWidth(leftBottomColumn, detaX, 'left-bottom', scene);\n }\n // deal with bottom frozen cells\n const bottomColumn = scene.getColGroupInBottom(col);\n if (bottomColumn) {\n updateColunmWidth(bottomColumn, detaX, 'bottom', scene);\n }\n // deal with right bottom frozen cells\n const rightBottomColumn = scene.getColGroupInRightBottomCorner(col);\n if (rightBottomColumn) {\n updateColunmWidth(rightBottomColumn, detaX, 'right-bottom', scene);\n }\n\n // 更新剩余列位置\n if (col < scene.frozenColCount) {\n scene.cornerHeaderGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n scene.rowHeaderGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n } else {\n scene.colHeaderGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n scene.bodyGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n }\n\n if (leftBottomColumn) {\n scene.leftBottomCornerGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n }\n if (bottomColumn) {\n scene.bottomFrozenGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n }\n if (rightBottomColumn) {\n scene.rightBottomCornerGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n }\n\n // scene.table.setColWidth(col, rowHeaderOrBodyColumn.attribute.width, true);\n}\n\nfunction updateColunmWidth(\n columnGroup: Group,\n detaX: number,\n // autoRowHeight: boolean,\n mode: 'col-corner' | 'row-body' | 'bottom' | 'left-bottom' | 'right-top' | 'right-bottom',\n scene: Scenegraph\n) {\n let needRerangeRow = false;\n // const colOrCornerHeaderColumn = scene.getColGroup(col, true) as Group;\n const oldColumnWidth = columnGroup?.attribute.width ?? 0;\n columnGroup?.setAttribute('width', oldColumnWidth + detaX);\n // 更新单元格宽度\n columnGroup?.forEachChildren((cell: Group, index: number) => {\n const isHeightChange = updateCellWidth(\n scene,\n cell,\n cell.col,\n cell.row,\n oldColumnWidth,\n oldColumnWidth + detaX,\n detaX,\n mode === 'row-body' ? cell.col < scene.table.rowHeaderLevelCount : true,\n scene.table.internalProps.autoWrapText\n );\n if (isHeightChange) {\n const mergeInfo = getCellMergeInfo(scene.table, cell.col, cell.row);\n if (mergeInfo && mergeInfo.end.row - mergeInfo.start.row) {\n for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {\n resetRowHeight(scene, row);\n }\n } else {\n resetRowHeight(scene, cell.row);\n }\n needRerangeRow = true;\n }\n });\n\n if (needRerangeRow) {\n let newTotalHeight = 0;\n let colGroup;\n let oldContainerHeight;\n let row;\n for (let col = 0; col < scene.table.colCount; col++) {\n // const colGroup = scene.getColGroup(col, true);\n if (mode === 'col-corner') {\n row = 0;\n colGroup = scene.getColGroup(col, true);\n oldContainerHeight = scene.colHeaderGroup.attribute.height ?? 0;\n } else if (mode === 'row-body') {\n row = scene.table.frozenRowCount;\n colGroup = scene.getColGroup(col, false);\n oldContainerHeight = scene.bodyGroup.attribute.height ?? 0;\n } else if (mode === 'bottom') {\n row = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup = scene.getColGroupInBottom(col);\n oldContainerHeight = scene.bottomFrozenGroup.attribute.height ?? 0;\n } else if (mode === 'left-bottom') {\n row = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup = scene.getColGroupInLeftBottomCorner(col);\n oldContainerHeight = scene.leftBottomCornerGroup.attribute.height ?? 0;\n } else if (mode === 'right-top') {\n row = 0;\n colGroup = scene.getColGroupInRightTopCorner(col);\n oldContainerHeight = scene.rightTopCornerGroup.attribute.height ?? 0;\n } else if (mode === 'right-bottom') {\n row = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup = scene.getColGroupInRightBottomCorner(col);\n oldContainerHeight = scene.rightBottomCornerGroup.attribute.height ?? 0;\n }\n if (!colGroup) {\n continue;\n }\n let y = 0;\n colGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += scene.table.getRowHeight(cellGroup.row) ?? 0;\n });\n newTotalHeight = y;\n }\n scene.updateContainerHeight(row, newTotalHeight - oldContainerHeight);\n //#region 修改bug:https://github.com/VisActor/VTable/issues/954 添加底部冻结行的三块区域\n for (let col = 0; col < scene.table.frozenColCount; col++) {\n const leftBottomFrozenColumnGroup = scene.getColGroupInLeftBottomCorner(col);\n // reset cell y\n let y = 0;\n leftBottomFrozenColumnGroup?.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += scene.table.getRowHeight(cellGroup.row);\n });\n }\n for (let col = scene.table.colCount - scene.table.rightFrozenColCount; col < scene.table.colCount; col++) {\n const rightBottomFrozenColumnGroup = scene.getColGroupInRightBottomCorner(col);\n // reset cell y\n let y = 0;\n rightBottomFrozenColumnGroup?.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += scene.table.getRowHeight(cellGroup.row);\n });\n }\n\n for (let col = scene.table.frozenColCount; col < scene.table.colCount - scene.table.rightFrozenColCount; col++) {\n const rightBottomFrozenColumnGroup = scene.getColGroupInBottom(col);\n // reset cell y\n let y = 0;\n rightBottomFrozenColumnGroup?.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += scene.table.getRowHeight(cellGroup.row);\n });\n }\n //#endregion\n }\n}\n\n/**\n * @description: 更新单个单元格宽度\n * @return {*}\n */\nfunction updateCellWidth(\n scene: Scenegraph,\n cell: Group,\n col: number,\n row: number,\n oldWidth: number, // old width, not dist\n distWidth: number, // old width, not dist\n detaX: number,\n isHeader: boolean,\n // autoColWidth: boolean,\n autoWrapText: boolean\n): boolean {\n if (cell.attribute.width === distWidth && !cell.needUpdateWidth) {\n return false;\n }\n cell.needUpdateWidth = false;\n\n cell.setAttribute('width', distWidth);\n // const mergeInfo = getCellMergeInfo(scene.table, col, row);\n // if (mergeInfo && mergeInfo.start.row !== row) {\n // return false;\n // }\n const cellGroup = cell;\n // const distWidth = width + detaX;\n\n if (!cellGroup) {\n // 合并单元格非主单元格,不处理\n return false;\n }\n const autoRowHeight = scene.table.isAutoRowHeight(row);\n // 更新单元格布局\n const type = scene.table.isHeader(col, row)\n ? (scene.table._getHeaderLayoutMap(col, row) as HeaderData).headerType\n : scene.table.getBodyColumnType(col, row);\n let isHeightChange = false;\n if (type === 'progressbar') {\n // 目前先采用重新生成节点的方案\n const columnDefine = scene.table.getBodyColumnDefine(col, row) as IProgressbarColumnBodyDefine;\n const style = scene.table._getCellStyle(col, row) as ProgressBarStyle;\n const value = scene.table.getCellValue(col, row);\n const dataValue = scene.table.getCellOriginValue(col, row);\n const padding = getQuadProps(getProp('padding', style, col, row, scene.table));\n\n // deal with bar\n let range;\n if (columnDefine?.mergeCell) {\n range = scene.table.getCellRange(col, row);\n }\n\n const createProgressBarCell = Factory.getFunction('createProgressBarCell') as CreateProgressBarCell;\n const newBarCell = createProgressBarCell(\n columnDefine,\n style,\n cellGroup.attribute.width,\n // cellGroup.attribute.height,\n value,\n dataValue,\n col,\n row,\n padding,\n scene.table,\n range\n );\n\n const oldBarCell = cellGroup.getChildByName('progress-bar') as Group;\n // cell.replaceChild(newBarCell, oldBarCell);\n cellGroup.insertBefore(newBarCell, oldBarCell);\n cellGroup.removeChild(oldBarCell);\n oldBarCell.removeAllChild();\n oldBarCell.release();\n\n // deal width text\n const cellChange = updateMergeCellContentWidth(cellGroup, distWidth, detaX, autoRowHeight, true, scene.table);\n isHeightChange = isHeightChange || cellChange;\n } else if (type === 'sparkline') {\n // 目前先采用重新生成节点的方案\n cellGroup.removeAllChild();\n const headerStyle = scene.table._getCellStyle(col, row);\n const padding = getQuadProps(getProp('padding', headerStyle, col, row, scene.table));\n const createSparkLineCellGroup = Factory.getFunction('createSparkLineCellGroup') as CreateSparkLineCellGroup;\n createSparkLineCellGroup(\n cellGroup,\n cellGroup.parent,\n cellGroup.attribute.x,\n cellGroup.attribute.y,\n col,\n row,\n cellGroup.attribute.width,\n cellGroup.attribute.height,\n padding,\n scene.table,\n getStyleTheme(headerStyle, scene.table, col, row, getProp).theme,\n false\n );\n } else if (type === 'image' || type === 'video') {\n // // 只更新背景边框\n // const rect = cell.firstChild as Rect;\n // rect.setAttribute('width', cell.attribute.width);\n updateImageCellContentWhileResize(cellGroup, col, row, detaX, 0, scene.table);\n } else if (cellGroup.firstChild?.name === 'axis') {\n // recreate axis component\n const axisConfig = scene.table.internalProps.layoutMap.getAxisConfigInPivotChart(col, row);\n const cellStyle = scene.table._getCellStyle(col, row);\n const padding = getQuadProps(getProp('padding', cellStyle, col, row, scene.table));\n if (axisConfig) {\n const CartesianAxis: ICartesianAxis = Factory.getComponent('axis');\n const axis = new CartesianAxis(\n axisConfig,\n cellGroup.attribute.width,\n cellGroup.attribute.height,\n padding,\n scene.table\n );\n cellGroup.clear();\n cellGroup.appendChild(axis.component);\n axis.overlap();\n }\n } else if (cell.firstChild?.name === 'axis') {\n (cell.firstChild as any)?.originAxis.resize(cell.attribute.width, cell.attribute.height);\n } else {\n let renderDefault = true;\n const customContainer =\n (cell.getChildByName(CUSTOM_CONTAINER_NAME) as Group) ||\n (cell.getChildByName(CUSTOM_MERGE_CONTAINER_NAME) as Group);\n if (customContainer) {\n if (scene.table.reactCustomLayout) {\n scene.table.reactCustomLayout.removeCustomCell(col, row);\n }\n let customElementsGroup;\n customContainer.removeAllChild();\n cell.removeChild(customContainer);\n\n const customMergeRange = getCustomCellMergeCustom(col, row, cell, scene.table);\n if (customMergeRange) {\n for (let mergeCol = customMergeRange.start.col; mergeCol <= customMergeRange.end.col; mergeCol++) {\n if (mergeCol === col) {\n continue;\n }\n const mergedCell = scene.getCell(mergeCol, row);\n const customContainer =\n (mergedCell.getChildByName(CUSTOM_CONTAINER_NAME) as Group) ||\n (mergedCell.getChildByName(CUSTOM_MERGE_CONTAINER_NAME) as Group);\n customContainer.removeAllChild();\n mergedCell.removeChild(customContainer);\n getCustomCellMergeCustom(mergeCol, row, mergedCell, scene.table);\n }\n } else {\n let customRender;\n let customLayout;\n const cellType = scene.table.getCellLocation(col, row);\n const { vTableMerge } = scene.table.getCellRawRecord(col, row);\n\n if (vTableMerge && (scene.table.options as ListTableConstructorOptions).groupTitleCustomLayout) {\n customLayout = (scene.table.options as ListTableConstructorOptions).groupTitleCustomLayout;\n } else if (cellType !== 'body') {\n const define = scene.table.getHeaderDefine(col, row);\n customRender = (define as ColumnDefine)?.headerCustomRender;\n customLayout = (define as ColumnDefine)?.headerCustomLayout;\n } else {\n const define = scene.table.getBodyColumnDefine(col, row);\n customRender = (define as ColumnDefine)?.customRender || scene.table.customRender;\n customLayout = (define as ColumnDefine)?.customLayout;\n }\n\n if ((customRender || customLayout) && isMergeCellGroup(cellGroup)) {\n for (let mergeCol = cellGroup.mergeStartCol; mergeCol <= cellGroup.mergeEndCol; mergeCol++) {\n if (mergeCol !== col) {\n for (let mergeRow = cellGroup.mergeStartRow; mergeRow <= cellGroup.mergeEndRow; mergeRow++) {\n scene.updateCellContent(mergeCol, mergeRow);\n }\n }\n }\n }\n\n if (customLayout || customRender) {\n // const { autoRowHeight } = table.internalProps;\n const style = scene.table._getCellStyle(col, row) as ProgressBarStyle;\n const padding = getQuadProps(getProp('padding', style, col, row, scene.table));\n let width = cellGroup.attribute.width;\n let height = cellGroup.attribute.height;\n if (isMergeCellGroup(cellGroup)) {\n width = scene.table.getColsWidth(cellGroup.mergeStartCol, cellGroup.mergeEndCol);\n height = scene.table.getRowsHeight(cellGroup.mergeStartRow, cellGroup.mergeEndRow);\n }\n const customResult = dealWithCustom(\n customLayout,\n customRender,\n cellGroup.mergeStartCol ?? col,\n cellGroup.mergeStartRow ?? row,\n width,\n height,\n false,\n // scene.table.heightMode === 'autoHeight',\n scene.table.isAutoRowHeight(row),\n padding,\n isMergeCellGroup(cellGroup)\n ? {\n start: { col: cellGroup.mergeStartCol, row: cellGroup.mergeStartRow },\n end: { col: cellGroup.mergeEndCol, row: cellGroup.mergeEndRow }\n }\n : undefined,\n scene.table\n );\n customElementsGroup = customResult.elementsGroup;\n renderDefault = customResult.renderDefault;\n isHeightChange = true;\n }\n\n if (cell.childrenCount > 0 && customElementsGroup) {\n cell.insertBefore(customElementsGroup, cell.firstChild);\n } else if (customElementsGroup) {\n cell.appendChild(customElementsGroup);\n }\n }\n }\n const cellChange = updateMergeCellContentWidth(\n cellGroup,\n distWidth,\n detaX,\n autoRowHeight,\n renderDefault,\n scene.table\n );\n isHeightChange = isHeightChange || cellChange;\n }\n if (!autoWrapText) {\n const style = scene.table._getCellStyle(col, row);\n autoWrapText = style.autoWrapText;\n }\n return autoRowHeight && autoWrapText ? isHeightChange : false;\n}\n\nfunction updateMergeCellContentWidth(\n cellGroup: Group,\n distWidth: number,\n detaX: number,\n autoRowHeight: boolean,\n renderDefault: boolean,\n table: BaseTableAPI\n) {\n if (isMergeCellGroup(cellGroup)) {\n distWidth = 0;\n let isHeightChange = false;\n for (let col = cellGroup.mergeStartCol; col <= cellGroup.mergeEndCol; col++) {\n distWidth += table.getColWidth(col);\n }\n let cellHeight = 0;\n for (let row = cellGroup.mergeStartRow; row <= cellGroup.mergeEndRow; row++) {\n cellHeight += table.getRowHeight(row);\n }\n\n const { colStart, colEnd, rowStart, rowEnd } = getCellMergeRange(cellGroup, table.scenegraph);\n for (let col = colStart; col <= colEnd; col++) {\n for (let row = rowStart; row <= rowEnd; row++) {\n if (col === cellGroup.col && row !== cellGroup.row) {\n continue;\n }\n const singleCellGroup = table.scenegraph.getCell(col, row);\n singleCellGroup.forEachChildren((child: IGraphic) => {\n child.setAttributes({\n dx: 0,\n dy: 0\n });\n });\n\n let changed = false;\n if (renderDefault) {\n // 处理文字\n // const style = table._getCellStyle(col, row);\n const style = table._getCellStyle(colStart, rowStart);\n const padding = getQuadProps(style.padding as number);\n const textAlign = style.textAlign;\n const textBaseline = style.textBaseline;\n changed = updateCellContentWidth(\n singleCellGroup,\n distWidth,\n cellHeight,\n detaX,\n autoRowHeight,\n padding,\n textAlign,\n textBaseline,\n table.scenegraph\n );\n\n // reset hierarchy offset\n const hierarchyOffset = getHierarchyOffset(singleCellGroup.col, singleCellGroup.row, table);\n if (hierarchyOffset) {\n const text = singleCellGroup.getChildByName('text');\n const icon = singleCellGroup.getChildByName('expand') || singleCellGroup.getChildByName('collapse');\n // icon-left deal with hierarchy offset, no need add to text dx\n if (icon?.role !== 'icon-left' && text) {\n text.setAttribute('dx', hierarchyOffset);\n }\n }\n }\n\n const rangeHeight = table.getRowHeight(row);\n const rangeWidth = table.getColWidth(col);\n\n // const { width: contentWidth } = cellGroup.attribute;\n singleCellGroup.contentWidth = distWidth;\n\n const { heightChange } = resizeCellGroup(\n singleCellGroup,\n rangeWidth,\n rangeHeight,\n {\n start: {\n col: cellGroup.mergeStartCol,\n row: cellGroup.mergeStartRow\n },\n end: {\n col: cellGroup.mergeEndCol,\n row: cellGroup.mergeEndRow\n }\n },\n table\n );\n\n if (heightChange) {\n singleCellGroup.needUpdateHeight = true;\n }\n\n isHeightChange = isHeightChange || changed;\n }\n }\n return isHeightChange;\n }\n\n // 处理文字\n const style = table._getCellStyle(cellGroup.col, cellGroup.row);\n const padding = getQuadProps(style.padding as number);\n const textAlign = style.textAlign;\n const textBaseline = style.textBaseline;\n return updateCellContentWidth(\n cellGroup,\n distWidth,\n table.getRowHeight(cellGroup.row),\n detaX,\n autoRowHeight,\n padding,\n textAlign,\n textBaseline,\n table.scenegraph\n );\n}\n\n/**\n * @description: 重置指定行行高\n * @param {Scenegraph} scene\n * @param {number} row\n * @return {*}\n */\nfunction resetRowHeight(scene: Scenegraph, row: number) {\n // 获取高度\n const maxHeight = Math.round(computeRowHeight(row, 0, scene.table.colCount - 1, scene.table));\n // 更新table行高存储\n scene.table._setRowHeight(row, maxHeight, true);\n\n // 更新高度\n for (let col = 0; col < scene.table.colCount; col++) {\n const distHeight = maxHeight;\n const cell = scene.highPerformanceGetCell(col, row);\n if (cell.role === 'empty') {\n return;\n }\n\n updateCellHeightForRow(\n scene,\n cell,\n col,\n row,\n distHeight,\n distHeight - cell.attribute.height,\n scene.table.isHeader(col, row)\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/scenegraph/layout/update-width.ts"],"names":[],"mappings":";;;AAGA,gDAA6C;AAC7C,wDAAuD;AAGvD,gDAAyG;AAEzG,sEAA0F;AAG1F,8DAAyF;AAEzF,4DAA2D;AAC3D,gDAA4C;AAC5C,sEAAgE;AAChE,8CAAgD;AAChD,gEAAmE;AACnE,6DAAwD;AACxD,mDAAyD;AACzD,wEAAmE;AACnE,yDAA4D;AAW5D,SAAgB,cAAc,CAAC,KAAiB,EAAE,GAAW,EAAE,KAAa,EAAE,iBAA2B;IACvG,IAAI,CAAC,iBAAiB,EAAE;QACtB,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,KAAK,EAAE,IAAI,CAAC,CAAC;KAC3E;IAGD,MAAM,uBAAuB,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE,IAAI,CAAU,CAAC;IACtE,MAAM,cAAc,GAAG,KAAK,CAAC,2BAA2B,CAAC,GAAG,CAAC,CAAC;IAC9D,IAAI,uBAAuB,IAAI,CAAC,cAAc,EAAE;QAC9C,iBAAiB,CAAC,uBAAuB,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC;KACxE;IAED,IAAI,cAAc,EAAE;QAClB,iBAAiB,CAAC,cAAc,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;KAC9D;IAGD,MAAM,qBAAqB,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,CAAU,CAAC;IAC9D,IAAI,qBAAqB,EAAE;QACzB,iBAAiB,CAAC,qBAAqB,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;KACpE;IAED,MAAM,gBAAgB,GAAG,KAAK,CAAC,6BAA6B,CAAC,GAAG,CAAC,CAAC;IAElE,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CAAC;KACH;AACH,CAAC","file":"update-width.js","sourcesContent":["import type { IGraphic } from './../../vrender';\nimport type { ProgressBarStyle } from '../../body-helper/style/ProgressBarStyle';\nimport type { ICartesianAxis } from '../../components/axis/axis';\nimport { Factory } from '../../core/factory';\nimport { getStyleTheme } from '../../core/tableHelper';\nimport type { BaseTableAPI, HeaderData } from '../../ts-types/base-table';\nimport type { IProgressbarColumnBodyDefine } from '../../ts-types/list-table/define/progressbar-define';\nimport { CUSTOM_CONTAINER_NAME, CUSTOM_MERGE_CONTAINER_NAME, dealWithCustom } from '../component/custom';\nimport type { Group } from '../graphic/group';\nimport { updateImageCellContentWhileResize } from '../group-creater/cell-type/image-cell';\nimport type { CreateProgressBarCell } from '../group-creater/cell-type/progress-bar-cell';\nimport type { CreateSparkLineCellGroup } from '../group-creater/cell-type/spark-line-cell';\nimport { resizeCellGroup, getCustomCellMergeCustom } from '../group-creater/cell-helper';\nimport type { Scenegraph } from '../scenegraph';\nimport { getCellMergeInfo } from '../utils/get-cell-merge';\nimport { getProp } from '../utils/get-prop';\nimport { isMergeCellGroup } from '../utils/is-merge-cell-group';\nimport { getQuadProps } from '../utils/padding';\nimport { updateCellContentWidth } from '../utils/text-icon-layout';\nimport { computeRowHeight } from './compute-row-height';\nimport { updateCellHeightForRow } from './update-height';\nimport { getHierarchyOffset } from '../utils/get-hierarchy-offset';\nimport { getCellMergeRange } from '../../tools/merge-range';\nimport type { ColumnDefine, ListTableConstructorOptions } from '../../ts-types';\n// import { updateAutoRowHeight } from './auto-height';\n\n/**\n * @description: 更新指定列列宽,在拖拽调整列宽中使用\n * @param {Scenegraph} scene\n * @param {number} col\n * @param {number} detaX\n * @return {*}\n */\nexport function updateColWidth(scene: Scenegraph, col: number, detaX: number, skipTableWidthMap?: boolean) {\n if (!skipTableWidthMap) {\n scene.table._setColWidth(col, scene.table.getColWidth(col) + detaX, true);\n }\n\n // deal with corner header or column header\n const colOrCornerHeaderColumn = scene.getColGroup(col, true) as Group;\n const rightTopColumn = scene.getColGroupInRightTopCorner(col);\n if (colOrCornerHeaderColumn && !rightTopColumn) {\n updateColunmWidth(colOrCornerHeaderColumn, detaX, 'col-corner', scene);\n }\n // deal with right bottom frozen cells\n if (rightTopColumn) {\n updateColunmWidth(rightTopColumn, detaX, 'right-top', scene);\n }\n\n // deal with row header or body or right frozen cells\n const rowHeaderOrBodyColumn = scene.getColGroup(col) as Group;\n if (rowHeaderOrBodyColumn) {\n updateColunmWidth(rowHeaderOrBodyColumn, detaX, 'row-body', scene);\n }\n\n const leftBottomColumn = scene.getColGroupInLeftBottomCorner(col);\n // deal with left bottom frozen cells\n if (leftBottomColumn) {\n updateColunmWidth(leftBottomColumn, detaX, 'left-bottom', scene);\n }\n // deal with bottom frozen cells\n const bottomColumn = scene.getColGroupInBottom(col);\n if (bottomColumn) {\n updateColunmWidth(bottomColumn, detaX, 'bottom', scene);\n }\n // deal with right bottom frozen cells\n const rightBottomColumn = scene.getColGroupInRightBottomCorner(col);\n if (rightBottomColumn) {\n updateColunmWidth(rightBottomColumn, detaX, 'right-bottom', scene);\n }\n\n // 更新剩余列位置\n if (col < scene.frozenColCount) {\n scene.cornerHeaderGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n scene.rowHeaderGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n } else {\n scene.colHeaderGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n scene.bodyGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n }\n\n if (leftBottomColumn) {\n scene.leftBottomCornerGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n }\n if (bottomColumn) {\n scene.bottomFrozenGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n }\n if (rightBottomColumn) {\n scene.rightBottomCornerGroup.forEachChildrenSkipChild((column: Group, index) => {\n if (column.col > col) {\n column.setAttribute('x', column.attribute.x + detaX);\n }\n });\n }\n\n // scene.table.setColWidth(col, rowHeaderOrBodyColumn.attribute.width, true);\n}\n\nfunction updateColunmWidth(\n columnGroup: Group,\n detaX: number,\n // autoRowHeight: boolean,\n mode: 'col-corner' | 'row-body' | 'bottom' | 'left-bottom' | 'right-top' | 'right-bottom',\n scene: Scenegraph\n) {\n let needRerangeRow = false;\n // const colOrCornerHeaderColumn = scene.getColGroup(col, true) as Group;\n const oldColumnWidth = columnGroup?.attribute.width ?? 0;\n columnGroup?.setAttribute('width', oldColumnWidth + detaX);\n // 更新单元格宽度\n columnGroup?.forEachChildren((cell: Group, index: number) => {\n const isHeightChange = updateCellWidth(\n scene,\n cell,\n cell.col,\n cell.row,\n oldColumnWidth,\n oldColumnWidth + detaX,\n detaX,\n mode === 'row-body' ? cell.col < scene.table.rowHeaderLevelCount : true,\n scene.table.internalProps.autoWrapText\n );\n if (isHeightChange) {\n const mergeInfo = getCellMergeInfo(scene.table, cell.col, cell.row);\n if (mergeInfo && mergeInfo.end.row - mergeInfo.start.row) {\n for (let row = mergeInfo.start.row; row <= mergeInfo.end.row; row++) {\n resetRowHeight(scene, row);\n }\n } else {\n resetRowHeight(scene, cell.row);\n }\n needRerangeRow = true;\n }\n });\n\n if (needRerangeRow) {\n let newTotalHeight = 0;\n let colGroup;\n let oldContainerHeight;\n let row;\n for (let col = 0; col < scene.table.colCount; col++) {\n // const colGroup = scene.getColGroup(col, true);\n if (mode === 'col-corner') {\n row = 0;\n colGroup = scene.getColGroup(col, true);\n oldContainerHeight = scene.colHeaderGroup.attribute.height ?? 0;\n } else if (mode === 'row-body') {\n row = scene.table.frozenRowCount;\n colGroup = scene.getColGroup(col, false);\n oldContainerHeight = scene.bodyGroup.attribute.height ?? 0;\n } else if (mode === 'bottom') {\n row = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup = scene.getColGroupInBottom(col);\n oldContainerHeight = scene.bottomFrozenGroup.attribute.height ?? 0;\n } else if (mode === 'left-bottom') {\n row = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup = scene.getColGroupInLeftBottomCorner(col);\n oldContainerHeight = scene.leftBottomCornerGroup.attribute.height ?? 0;\n } else if (mode === 'right-top') {\n row = 0;\n colGroup = scene.getColGroupInRightTopCorner(col);\n oldContainerHeight = scene.rightTopCornerGroup.attribute.height ?? 0;\n } else if (mode === 'right-bottom') {\n row = scene.table.rowCount - scene.table.bottomFrozenRowCount;\n colGroup = scene.getColGroupInRightBottomCorner(col);\n oldContainerHeight = scene.rightBottomCornerGroup.attribute.height ?? 0;\n }\n if (!colGroup) {\n continue;\n }\n let y = 0;\n colGroup.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += scene.table.getRowHeight(cellGroup.row) ?? 0;\n });\n newTotalHeight = y;\n }\n scene.updateContainerHeight(row, newTotalHeight - oldContainerHeight);\n //#region 修改bug:https://github.com/VisActor/VTable/issues/954 添加底部冻结行的三块区域\n for (let col = 0; col < scene.table.frozenColCount; col++) {\n const leftBottomFrozenColumnGroup = scene.getColGroupInLeftBottomCorner(col);\n // reset cell y\n let y = 0;\n leftBottomFrozenColumnGroup?.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += scene.table.getRowHeight(cellGroup.row);\n });\n }\n for (let col = scene.table.colCount - scene.table.rightFrozenColCount; col < scene.table.colCount; col++) {\n const rightBottomFrozenColumnGroup = scene.getColGroupInRightBottomCorner(col);\n // reset cell y\n let y = 0;\n rightBottomFrozenColumnGroup?.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += scene.table.getRowHeight(cellGroup.row);\n });\n }\n\n for (let col = scene.table.frozenColCount; col < scene.table.colCount - scene.table.rightFrozenColCount; col++) {\n const rightBottomFrozenColumnGroup = scene.getColGroupInBottom(col);\n // reset cell y\n let y = 0;\n rightBottomFrozenColumnGroup?.forEachChildren((cellGroup: Group) => {\n cellGroup.setAttribute('y', y);\n y += scene.table.getRowHeight(cellGroup.row);\n });\n }\n //#endregion\n }\n}\n\n/**\n * @description: 更新单个单元格宽度\n * @return {*}\n */\nfunction updateCellWidth(\n scene: Scenegraph,\n cell: Group,\n col: number,\n row: number,\n oldWidth: number, // old width, not dist\n distWidth: number, // old width, not dist\n detaX: number,\n isHeader: boolean,\n // autoColWidth: boolean,\n autoWrapText: boolean\n): boolean {\n if (cell.attribute.width === distWidth && !cell.needUpdateWidth) {\n return false;\n }\n cell.needUpdateWidth = false;\n\n cell.setAttribute('width', distWidth);\n // const mergeInfo = getCellMergeInfo(scene.table, col, row);\n // if (mergeInfo && mergeInfo.start.row !== row) {\n // return false;\n // }\n const cellGroup = cell;\n // const distWidth = width + detaX;\n\n if (!cellGroup) {\n // 合并单元格非主单元格,不处理\n return false;\n }\n const autoRowHeight = scene.table.isAutoRowHeight(row);\n const isvtableMerge = scene.table.getCellRawRecord(col, row)?.vtableMerge;\n // 更新单元格布局\n const type = isvtableMerge\n ? 'text'\n : scene.table.isHeader(col, row)\n ? (scene.table._getHeaderLayoutMap(col, row) as HeaderData).headerType\n : scene.table.getBodyColumnType(col, row);\n let isHeightChange = false;\n if (type === 'progressbar') {\n // 目前先采用重新生成节点的方案\n const columnDefine = scene.table.getBodyColumnDefine(col, row) as IProgressbarColumnBodyDefine;\n const style = scene.table._getCellStyle(col, row) as ProgressBarStyle;\n const value = scene.table.getCellValue(col, row);\n const dataValue = scene.table.getCellOriginValue(col, row);\n const padding = getQuadProps(getProp('padding', style, col, row, scene.table));\n\n // deal with bar\n let range;\n if (columnDefine?.mergeCell) {\n range = scene.table.getCellRange(col, row);\n }\n\n const createProgressBarCell = Factory.getFunction('createProgressBarCell') as CreateProgressBarCell;\n const newBarCell = createProgressBarCell(\n columnDefine,\n style,\n cellGroup.attribute.width,\n // cellGroup.attribute.height,\n value,\n dataValue,\n col,\n row,\n padding,\n scene.table,\n range\n );\n\n const oldBarCell = cellGroup.getChildByName('progress-bar') as Group;\n // cell.replaceChild(newBarCell, oldBarCell);\n cellGroup.insertBefore(newBarCell, oldBarCell);\n cellGroup.removeChild(oldBarCell);\n oldBarCell.removeAllChild();\n oldBarCell.release();\n\n // deal width text\n const cellChange = updateMergeCellContentWidth(cellGroup, distWidth, detaX, autoRowHeight, true, scene.table);\n isHeightChange = isHeightChange || cellChange;\n } else if (type === 'sparkline') {\n // 目前先采用重新生成节点的方案\n cellGroup.removeAllChild();\n const headerStyle = scene.table._getCellStyle(col, row);\n const padding = getQuadProps(getProp('padding', headerStyle, col, row, scene.table));\n const createSparkLineCellGroup = Factory.getFunction('createSparkLineCellGroup') as CreateSparkLineCellGroup;\n createSparkLineCellGroup(\n cellGroup,\n cellGroup.parent,\n cellGroup.attribute.x,\n cellGroup.attribute.y,\n col,\n row,\n cellGroup.attribute.width,\n cellGroup.attribute.height,\n padding,\n scene.table,\n getStyleTheme(headerStyle, scene.table, col, row, getProp).theme,\n false\n );\n } else if (type === 'image' || type === 'video') {\n // // 只更新背景边框\n // const rect = cell.firstChild as Rect;\n // rect.setAttribute('width', cell.attribute.width);\n updateImageCellContentWhileResize(cellGroup, col, row, detaX, 0, scene.table);\n } else if (cellGroup.firstChild?.name === 'axis') {\n // recreate axis component\n const axisConfig = scene.table.internalProps.layoutMap.getAxisConfigInPivotChart(col, row);\n const cellStyle = scene.table._getCellStyle(col, row);\n const padding = getQuadProps(getProp('padding', cellStyle, col, row, scene.table));\n if (axisConfig) {\n const CartesianAxis: ICartesianAxis = Factory.getComponent('axis');\n const axis = new CartesianAxis(\n axisConfig,\n cellGroup.attribute.width,\n cellGroup.attribute.height,\n padding,\n scene.table\n );\n cellGroup.clear();\n cellGroup.appendChild(axis.component);\n axis.overlap();\n }\n } else if (cell.firstChild?.name === 'axis') {\n (cell.firstChild as any)?.originAxis.resize(cell.attribute.width, cell.attribute.height);\n } else {\n let renderDefault = true;\n const customContainer =\n (cell.getChildByName(CUSTOM_CONTAINER_NAME) as Group) ||\n (cell.getChildByName(CUSTOM_MERGE_CONTAINER_NAME) as Group);\n if (customContainer) {\n if (scene.table.reactCustomLayout) {\n scene.table.reactCustomLayout.removeCustomCell(col, row);\n }\n let customElementsGroup;\n customContainer.removeAllChild();\n cell.removeChild(customContainer);\n\n const customMergeRange = getCustomCellMergeCustom(col, row, cell, scene.table);\n if (customMergeRange) {\n for (let mergeCol = customMergeRange.start.col; mergeCol <= customMergeRange.end.col; mergeCol++) {\n if (mergeCol === col) {\n continue;\n }\n const mergedCell = scene.getCell(mergeCol, row);\n const customContainer =\n (mergedCell.getChildByName(CUSTOM_CONTAINER_NAME) as Group) ||\n (mergedCell.getChildByName(CUSTOM_MERGE_CONTAINER_NAME) as Group);\n customContainer.removeAllChild();\n mergedCell.removeChild(customContainer);\n getCustomCellMergeCustom(mergeCol, row, mergedCell, scene.table);\n }\n } else {\n let customRender;\n let customLayout;\n const cellType = scene.table.getCellLocation(col, row);\n const { vtableMerge } = scene.table.getCellRawRecord(col, row);\n\n if (vtableMerge && (scene.table.options as ListTableConstructorOptions).groupTitleCustomLayout) {\n customLayout = (scene.table.options as ListTableConstructorOptions).groupTitleCustomLayout;\n } else if (cellType !== 'body') {\n const define = scene.table.getHeaderDefine(col, row);\n customRender = (define as ColumnDefine)?.headerCustomRender;\n customLayout = (define as ColumnDefine)?.headerCustomLayout;\n } else {\n const define = scene.table.getBodyColumnDefine(col, row);\n customRender = (define as ColumnDefine)?.customRender || scene.table.customRender;\n customLayout = (define as ColumnDefine)?.customLayout;\n }\n\n if ((customRender || customLayout) && isMergeCellGroup(cellGroup)) {\n for (let mergeCol = cellGroup.mergeStartCol; mergeCol <= cellGroup.mergeEndCol; mergeCol++) {\n if (mergeCol !== col) {\n for (let mergeRow = cellGroup.mergeStartRow; mergeRow <= cellGroup.mergeEndRow; mergeRow++) {\n scene.updateCellContent(mergeCol, mergeRow);\n }\n }\n }\n }\n\n if (customLayout || customRender) {\n // const { autoRowHeight } = table.internalProps;\n const style = scene.table._getCellStyle(col, row) as ProgressBarStyle;\n const padding = getQuadProps(getProp('padding', style, col, row, scene.table));\n let width = cellGroup.attribute.width;\n let height = cellGroup.attribute.height;\n if (isMergeCellGroup(cellGroup)) {\n width = scene.table.getColsWidth(cellGroup.mergeStartCol, cellGroup.mergeEndCol);\n height = scene.table.getRowsHeight(cellGroup.mergeStartRow, cellGroup.mergeEndRow);\n }\n const customResult = dealWithCustom(\n customLayout,\n customRender,\n cellGroup.mergeStartCol ?? col,\n cellGroup.mergeStartRow ?? row,\n width,\n height,\n false,\n // scene.table.heightMode === 'autoHeight',\n scene.table.isAutoRowHeight(row),\n padding,\n isMergeCellGroup(cellGroup)\n ? {\n start: { col: cellGroup.mergeStartCol, row: cellGroup.mergeStartRow },\n end: { col: cellGroup.mergeEndCol, row: cellGroup.mergeEndRow }\n }\n : undefined,\n scene.table\n );\n customElementsGroup = customResult.elementsGroup;\n renderDefault = customResult.renderDefault;\n isHeightChange = true;\n }\n\n if (cell.childrenCount > 0 && customElementsGroup) {\n cell.insertBefore(customElementsGroup, cell.firstChild);\n } else if (customElementsGroup) {\n cell.appendChild(customElementsGroup);\n }\n }\n }\n const cellChange = updateMergeCellContentWidth(\n cellGroup,\n distWidth,\n detaX,\n autoRowHeight,\n renderDefault,\n scene.table\n );\n isHeightChange = isHeightChange || cellChange;\n }\n if (!autoWrapText) {\n const style = scene.table._getCellStyle(col, row);\n autoWrapText = style.autoWrapText;\n }\n return autoRowHeight && autoWrapText ? isHeightChange : false;\n}\n\nfunction updateMergeCellContentWidth(\n cellGroup: Group,\n distWidth: number,\n detaX: number,\n autoRowHeight: boolean,\n renderDefault: boolean,\n table: BaseTableAPI\n) {\n if (isMergeCellGroup(cellGroup)) {\n distWidth = 0;\n let isHeightChange = false;\n for (let col = cellGroup.mergeStartCol; col <= cellGroup.mergeEndCol; col++) {\n distWidth += table.getColWidth(col);\n }\n let cellHeight = 0;\n for (let row = cellGroup.mergeStartRow; row <= cellGroup.mergeEndRow; row++) {\n cellHeight += table.getRowHeight(row);\n }\n\n const { colStart, colEnd, rowStart, rowEnd } = getCellMergeRange(cellGroup, table.scenegraph);\n for (let col = colStart; col <= colEnd; col++) {\n for (let row = rowStart; row <= rowEnd; row++) {\n if (col === cellGroup.col && row !== cellGroup.row) {\n continue;\n }\n const singleCellGroup = table.scenegraph.getCell(col, row);\n singleCellGroup.forEachChildren((child: IGraphic) => {\n child.setAttributes({\n dx: 0,\n dy: 0\n });\n });\n\n let changed = false;\n if (renderDefault) {\n // 处理文字\n // const style = table._getCellStyle(col, row);\n const style = table._getCellStyle(colStart, rowStart);\n const padding = getQuadProps(style.padding as number);\n const textAlign = style.textAlign;\n const textBaseline = style.textBaseline;\n changed = updateCellContentWidth(\n singleCellGroup,\n distWidth,\n cellHeight,\n detaX,\n autoRowHeight,\n padding,\n textAlign,\n textBaseline,\n table.scenegraph\n );\n\n // reset hierarchy offset\n const hierarchyOffset = getHierarchyOffset(singleCellGroup.col, singleCellGroup.row, table);\n if (hierarchyOffset) {\n const text = singleCellGroup.getChildByName('text');\n const icon = singleCellGroup.getChildByName('expand') || singleCellGroup.getChildByName('collapse');\n // icon-left deal with hierarchy offset, no need add to text dx\n if (icon?.role !== 'icon-left' && text) {\n text.setAttribute('dx', hierarchyOffset);\n }\n }\n }\n\n const rangeHeight = table.getRowHeight(row);\n const rangeWidth = table.getColWidth(col);\n\n // const { width: contentWidth } = cellGroup.attribute;\n singleCellGroup.contentWidth = distWidth;\n\n const { heightChange } = resizeCellGroup(\n singleCellGroup,\n rangeWidth,\n rangeHeight,\n {\n start: {\n col: cellGroup.mergeStartCol,\n row: cellGroup.mergeStartRow\n },\n end: {\n col: cellGroup.mergeEndCol,\n row: cellGroup.mergeEndRow\n }\n },\n table\n );\n\n if (heightChange) {\n singleCellGroup.needUpdateHeight = true;\n }\n\n isHeightChange = isHeightChange || changed;\n }\n }\n return isHeightChange;\n }\n\n // 处理文字\n const style = table._getCellStyle(cellGroup.col, cellGroup.row);\n const padding = getQuadProps(style.padding as number);\n const textAlign = style.textAlign;\n const textBaseline = style.textBaseline;\n return updateCellContentWidth(\n cellGroup,\n distWidth,\n table.getRowHeight(cellGroup.row),\n detaX,\n autoRowHeight,\n padding,\n textAlign,\n textBaseline,\n table.scenegraph\n );\n}\n\n/**\n * @description: 重置指定行行高\n * @param {Scenegraph} scene\n * @param {number} row\n * @return {*}\n */\nfunction resetRowHeight(scene: Scenegraph, row: number) {\n // 获取高度\n const maxHeight = Math.round(computeRowHeight(row, 0, scene.table.colCount - 1, scene.table));\n // 更新table行高存储\n scene.table._setRowHeight(row, maxHeight, true);\n\n // 更新高度\n for (let col = 0; col < scene.table.colCount; col++) {\n const distHeight = maxHeight;\n const cell = scene.highPerformanceGetCell(col, row);\n if (cell.role === 'empty') {\n return;\n }\n\n updateCellHeightForRow(\n scene,\n cell,\n col,\n row,\n distHeight,\n distHeight - cell.attribute.height,\n scene.table.isHeader(col, row)\n );\n }\n}\n"]}
@@ -314,11 +314,13 @@ class Scenegraph {
314
314
  updateCheckboxCellState(col, row, checked) {
315
315
  var _a, _b;
316
316
  if (this.table.transpose) null === (_a = this.bodyGroup.children) || void 0 === _a || _a.forEach((columnGroup => {
317
- columnGroup.getChildAt(row).getChildren().forEach((node => {
317
+ var _a;
318
+ null === (_a = columnGroup.getChildAt(row)) || void 0 === _a || _a.getChildren().forEach((node => {
318
319
  "checkbox" === node.name && node.setAttribute("checked", checked);
319
320
  }));
320
321
  })); else {
321
- null === (_b = this.getColGroup(col).children) || void 0 === _b || _b.forEach((cellNode => {
322
+ const columnGroup = this.getColGroup(col);
323
+ null === (_b = null == columnGroup ? void 0 : columnGroup.children) || void 0 === _b || _b.forEach((cellNode => {
322
324
  cellNode.getChildren().find((node => {
323
325
  "checkbox" === node.name && node.setAttribute("checked", checked);
324
326
  }));
@@ -655,7 +657,8 @@ class Scenegraph {
655
657
  this.updateNextFrame());
656
658
  }
657
659
  updateCellContentWhileResize(col, row) {
658
- const type = this.table.isHeader(col, row) ? this.table._getHeaderLayoutMap(col, row).headerType : this.table.getBodyColumnType(col, row), cellGroup = this.getCell(col, row);
660
+ var _a;
661
+ const type = (null === (_a = this.table.getCellRawRecord(col, row)) || void 0 === _a ? void 0 : _a.vtableMerge) ? "text" : this.table.isHeader(col, row) ? this.table._getHeaderLayoutMap(col, row).headerType : this.table.getBodyColumnType(col, row), cellGroup = this.getCell(col, row);
659
662
  "image" !== type && "video" !== type || (0, image_cell_1.updateImageCellContentWhileResize)(cellGroup, col, row, 0, 0, this.table);
660
663
  }
661
664
  createFrameBorder() {
@@ -671,13 +674,13 @@ class Scenegraph {
671
674
  let cell;
672
675
  if (!cellGroup) {
673
676
  const drawRange = this.table.getDrawRange();
674
- return abstractY >= drawRange.top && abstractY <= drawRange.bottom ? (cell = this.table.getCellAtRelativePosition(abstractX - offset, abstractY),
675
- cell) : {
677
+ return abstractY >= drawRange.top && abstractY <= drawRange.bottom && (cell = this.table.getCellAtRelativePosition(abstractX - offset, abstractY),
678
+ cell.col === this.table.colCount - 1) ? cell : {
676
679
  col: -1,
677
680
  row: -1
678
681
  };
679
682
  }
680
- return abstractX < cellGroup.globalAABBBounds.x1 + offset ? cell = {
683
+ return cellGroup.stage ? (abstractX < cellGroup.globalAABBBounds.x1 + offset ? cell = {
681
684
  col: cellGroup.col - 1,
682
685
  row: cellGroup.row,
683
686
  x: cellGroup.globalAABBBounds.x1
@@ -685,10 +688,13 @@ class Scenegraph {
685
688
  col: cellGroup.col,
686
689
  row: cellGroup.row,
687
690
  x: cellGroup.globalAABBBounds.x2
688
- }), cell && this.table.rightFrozenColCount > 0 && cell.col === this.table.colCount - this.table.rightFrozenColCount - 1 && this.table.tableNoFrameWidth - this.table.getFrozenColsWidth() - this.table.getRightFrozenColsWidth() + this.table.scrollLeft < this.bodyGroup.attribute.width && (cell.col = cell.col + 1,
691
+ }), cell && this.table.rightFrozenColCount > 0 && cell.col >= this.table.colCount - this.table.rightFrozenColCount - 1 && this.table.tableNoFrameWidth - this.table.getFrozenColsWidth() - this.table.getRightFrozenColsWidth() + this.table.scrollLeft < this.bodyGroup.attribute.width && (cell.col = cell.col + 1,
689
692
  cell.rightFrozen = !0), cell || {
690
693
  col: -1,
691
694
  row: -1
695
+ }) : {
696
+ col: -1,
697
+ row: -1
692
698
  };
693
699
  }
694
700
  getResizeRowAt(abstractX, abstractY, cellGroup, offset = global_1.ResizeRowHotSpotSize / 2) {
@@ -702,7 +708,7 @@ class Scenegraph {
702
708
  col: cellGroup.col,
703
709
  row: cellGroup.row,
704
710
  y: cellGroup.globalAABBBounds.y2
705
- }), cell && this.table.bottomFrozenRowCount > 0 && cell.row === this.table.rowCount - this.table.bottomFrozenRowCount - 1 && this.table.tableNoFrameHeight - this.table.getFrozenRowsHeight() - this.table.getBottomFrozenRowsHeight() + this.table.scrollTop < this.bodyGroup.attribute.height && (cell.row = cell.row + 1,
711
+ }), cell && this.table.bottomFrozenRowCount > 0 && cell.row >= this.table.rowCount - this.table.bottomFrozenRowCount - 1 && this.table.tableNoFrameHeight - this.table.getFrozenRowsHeight() - this.table.getBottomFrozenRowsHeight() + this.table.scrollTop < this.bodyGroup.attribute.height && (cell.row = cell.row + 1,
706
712
  cell.bottomFrozen = !0), cell) return cell;
707
713
  } else ;
708
714
  return {