k-vtable 1.0.17 → 1.0.18

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.
@@ -337,4 +337,5 @@ export class DatasetForPivotTable {
337
337
  }
338
338
  return tree.forEach((treeNode => getPath(treeNode, []))), result;
339
339
  }
340
- }
340
+ }
341
+ //# sourceMappingURL=dataset-pivot-table.js.map
@@ -2,5 +2,4 @@ export const editors = {};
2
2
 
3
3
  export function get(editorName) {
4
4
  if (editors[editorName]) return editors[editorName];
5
- }
6
- //# sourceMappingURL=editors.js.map
5
+ }
package/es/index.d.ts CHANGED
@@ -23,7 +23,7 @@ export * from './render/jsx';
23
23
  export { getTargetCell } from './event/util';
24
24
  export { toBoxArray } from './tools/helper';
25
25
  export { Icon } from './scenegraph/graphic/icon';
26
- export declare const version = "1.0.17";
26
+ export declare const version = "1.0.18";
27
27
  export { TYPES, core, ListTable, ListTableSimple, BaseTableAPI, ListTableConstructorOptions, PivotTable, PivotTableSimple, PivotTableConstructorOptions, PivotChartConstructorOptions, PivotChart, IHeaderTreeDefine, IDimension, IIndicator, ITitleDefine, ICornerDefine, ColumnsDefine, ColumnDefine, LinkColumnDefine, ChartColumnDefine, ImageColumnDefine, SparklineColumnDefine, ProgressbarColumnDefine, TextColumnDefine, GroupColumnDefine, TextAlignType, TextBaselineType, textMeasure, themes, data, MousePointerCellEvent, getIcons, clearGlobal, register, DataStatistics, CustomLayout, updateCell, renderChart, graphicUtil, setCustomAlphabetCharSet, restoreMeasureText, plugins };
28
28
  declare function getIcons(): {
29
29
  [key: string]: TYPES.ColumnIconOption;
package/es/index.js CHANGED
@@ -46,7 +46,7 @@ export { toBoxArray } from "./tools/helper";
46
46
 
47
47
  export { Icon } from "./scenegraph/graphic/icon";
48
48
 
49
- export const version = "1.0.17";
49
+ export const version = "1.0.18";
50
50
 
51
51
  export { TYPES, core, ListTable, ListTableSimple, PivotTable, PivotTableSimple, PivotChart, textMeasure, themes, data, getIcons, clearGlobal, register, DataStatistics, CustomLayout, updateCell, renderChart, graphicUtil, setCustomAlphabetCharSet, restoreMeasureText, plugins };
52
52
 
package/es/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC5D,kBAAkB,EAAE,CAAC;AAErB,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,cAAc,MAAM,0BAA0B,CAAC;AAC3D,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AAsBrC,OAAO,EAAE,YAAY,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,aAAa,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,KAAK,YAAY,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,wDAAwD,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAM5G,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAKjD,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;AAIhC,OAAO,EAKL,KAAK,EACL,IAAI,EACJ,SAAS,EACT,eAAe,EAGf,UAAU,EACV,gBAAgB,EAGhB,UAAU,EAiBV,WAAW,EACX,MAAM,EACN,IAAI,EAEJ,QAAQ,EACR,WAAW,EAEX,QAAQ,EAIR,cAAc,EACd,YAAY,EACZ,UAAU,EACV,WAAW,EACX,WAAW,EACX,wBAAwB,EACxB,kBAAkB,EAClB,OAAO,EAER,CAAC;AAGF,SAAS,QAAQ;IAGf,OAAO,KAAK,CAAC,GAAG,EAAE,CAAC;AACrB,CAAC;AAED,SAAS,WAAW;IAClB,QAAQ,CAAC,QAAQ,EAAE,CAAC;AAGtB,CAAC;AACD,KAAK,CAAC,eAAe,CAAC;AAEtB,cAAc,cAAc,CAAC;AAC7B,cAAc,sCAAsC,CAAC;AAErD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AAE/G,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC","file":"index.js","sourcesContent":["/* eslint-disable sort-imports */\nimport { graphicUtil, registerForVrender } from './vrender';\nregisterForVrender();\n\nimport * as TYPES from './ts-types';\nimport * as core from './core';\nimport * as data from './data';\nimport * as icons from './icons';\nimport * as register from './register';\nimport * as themes from './themes';\nimport * as DataStatistics from './dataset/DataStatistics';\nimport * as plugins from './plugins';\nimport type {\n ColumnDefine,\n ColumnsDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n ListTableConstructorOptions,\n PivotTableConstructorOptions,\n PivotChartConstructorOptions,\n IHeaderTreeDefine,\n IDimension,\n IIndicator,\n ITitleDefine,\n ICornerDefine,\n TextAlignType,\n TextBaselineType\n} from './ts-types';\nimport { ListTableAll as ListTable } from './ListTable-all';\nimport { ListTableSimple } from './ListTable-simple';\n// import { PivotTable } from './PivotTable';\nimport { PivotTableAll as PivotTable } from './PivotTable-all';\nimport { PivotTableSimple } from './PivotTable-simple';\nimport { PivotChart } from './PivotChart';\nimport type { MousePointerCellEvent } from './ts-types/events';\nimport * as CustomLayout from './render/layout';\n\nimport { updateCell } from './scenegraph/group-creater/cell-helper';\nimport { renderChart } from './scenegraph/graphic/contributions/chart-render-helper';\nimport { restoreMeasureText, setCustomAlphabetCharSet, textMeasure } from './scenegraph/utils/text-measure';\nimport type { BaseTableAPI } from './ts-types/base-table';\n\n// import { container, loadCanvasPicker } from '@src/vrender';\n// loadCanvasPicker(container);\n\nexport { getDataCellPath } from './tools/get-data-path';\nexport * from './render/jsx';\nexport { getTargetCell } from './event/util';\nexport { toBoxArray } from './tools/helper';\nexport { Icon } from './scenegraph/graphic/icon';\n\n// export * as VRender from './vrender';\n// import * as VRender from './vrender';\n\nexport const version = \"1.0.17\";\n/**\n * @namespace VTable\n */\nexport {\n /**\n * Types\n * @namespace VTable.TYPES\n */\n TYPES,\n core,\n ListTable,\n ListTableSimple,\n BaseTableAPI,\n ListTableConstructorOptions,\n PivotTable,\n PivotTableSimple,\n PivotTableConstructorOptions,\n PivotChartConstructorOptions,\n PivotChart,\n IHeaderTreeDefine,\n IDimension,\n IIndicator,\n ITitleDefine,\n ICornerDefine,\n ColumnsDefine,\n ColumnDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType,\n textMeasure,\n themes,\n data,\n MousePointerCellEvent,\n getIcons,\n clearGlobal,\n //plugin registers\n register,\n /**\n * 暂不推荐使用\n */\n DataStatistics,\n CustomLayout,\n updateCell,\n renderChart,\n graphicUtil,\n setCustomAlphabetCharSet,\n restoreMeasureText,\n plugins\n // VRender // should use import {xxx} from '@visactor/vtable/es/vrender'\n};\n\n/** @private */\nfunction getIcons(): {\n [key: string]: TYPES.ColumnIconOption;\n} {\n return icons.get();\n}\n/** 清理内部的全局变量 如注册的icon theme等 以及共享的header column类实例 */\nfunction clearGlobal() {\n register.clearAll();\n // headers.type.clearGlobal();\n // columns.type.clearGlobal();\n}\nTYPES.AggregationType;\n\nexport * from './components';\nexport * from './scenegraph/group-creater/cell-type';\n\nexport { TABLE_EVENT_TYPE } from './core/TABLE_EVENT_TYPE';\nexport { PIVOT_CHART_EVENT_TYPE, PIVOT_TABLE_EVENT_TYPE } from './ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE';\n\nexport { EventTarget } from './event/EventTarget';\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC5D,kBAAkB,EAAE,CAAC;AAErB,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,cAAc,MAAM,0BAA0B,CAAC;AAC3D,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AAsBrC,OAAO,EAAE,YAAY,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,aAAa,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qB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qB,CAAC","file":"index.js","sourcesContent":["/* eslint-disable sort-imports */\nimport { graphicUtil, registerForVrender } from './vrender';\nregisterForVrender();\n\nimport * as TYPES from './ts-types';\nimport * as core from './core';\nimport * as data from './data';\nimport * as icons from './icons';\nimport * as register from './register';\nimport * as themes from './themes';\nimport * as DataStatistics from './dataset/DataStatistics';\nimport * as plugins from './plugins';\nimport type {\n ColumnDefine,\n ColumnsDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n ListTableConstructorOptions,\n PivotTableConstructorOptions,\n PivotChartConstructorOptions,\n IHeaderTreeDefine,\n IDimension,\n IIndicator,\n ITitleDefine,\n ICornerDefine,\n TextAlignType,\n TextBaselineType\n} from './ts-types';\nimport { ListTableAll as ListTable } from './ListTable-all';\nimport { ListTableSimple } from './ListTable-simple';\n// import { PivotTable } from './PivotTable';\nimport { PivotTableAll as PivotTable } from './PivotTable-all';\nimport { PivotTableSimple } from './PivotTable-simple';\nimport { PivotChart } from './PivotChart';\nimport type { MousePointerCellEvent } from './ts-types/events';\nimport * as CustomLayout from './render/layout';\n\nimport { updateCell } from './scenegraph/group-creater/cell-helper';\nimport { renderChart } from './scenegraph/graphic/contributions/chart-render-helper';\nimport { restoreMeasureText, setCustomAlphabetCharSet, textMeasure } from './scenegraph/utils/text-measure';\nimport type { BaseTableAPI } from './ts-types/base-table';\n\n// import { container, loadCanvasPicker } from '@src/vrender';\n// loadCanvasPicker(container);\n\nexport { getDataCellPath } from './tools/get-data-path';\nexport * from './render/jsx';\nexport { getTargetCell } from './event/util';\nexport { toBoxArray } from './tools/helper';\nexport { Icon } from './scenegraph/graphic/icon';\n\n// export * as VRender from './vrender';\n// import * as VRender from './vrender';\n\nexport const version = \"1.0.18\";\n/**\n * @namespace VTable\n */\nexport {\n /**\n * Types\n * @namespace VTable.TYPES\n */\n TYPES,\n core,\n ListTable,\n ListTableSimple,\n BaseTableAPI,\n ListTableConstructorOptions,\n PivotTable,\n PivotTableSimple,\n PivotTableConstructorOptions,\n PivotChartConstructorOptions,\n PivotChart,\n IHeaderTreeDefine,\n IDimension,\n IIndicator,\n ITitleDefine,\n ICornerDefine,\n ColumnsDefine,\n ColumnDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType,\n textMeasure,\n themes,\n data,\n MousePointerCellEvent,\n getIcons,\n clearGlobal,\n //plugin registers\n register,\n /**\n * 暂不推荐使用\n */\n DataStatistics,\n CustomLayout,\n updateCell,\n renderChart,\n graphicUtil,\n setCustomAlphabetCharSet,\n restoreMeasureText,\n plugins\n // VRender // should use import {xxx} from '@visactor/vtable/es/vrender'\n};\n\n/** @private */\nfunction getIcons(): {\n [key: string]: TYPES.ColumnIconOption;\n} {\n return icons.get();\n}\n/** 清理内部的全局变量 如注册的icon theme等 以及共享的header column类实例 */\nfunction clearGlobal() {\n register.clearAll();\n // headers.type.clearGlobal();\n // columns.type.clearGlobal();\n}\nTYPES.AggregationType;\n\nexport * from './components';\nexport * from './scenegraph/group-creater/cell-type';\n\nexport { TABLE_EVENT_TYPE } from './core/TABLE_EVENT_TYPE';\nexport { PIVOT_CHART_EVENT_TYPE, PIVOT_TABLE_EVENT_TYPE } from './ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE';\n\nexport { EventTarget } from './event/EventTarget';\n"]}
@@ -24,7 +24,7 @@ export function dealFrozen(scene) {
24
24
  scene.bodyGroup.setAttribute("x", scene.rowHeaderGroup.attribute.width), scene.colHeaderGroup.setAttribute("x", scene.cornerHeaderGroup.attribute.width),
25
25
  scene.updateContainer(), scene.updateBorderSizeAndPosition(), scene.isPivot || scene.table.transpose ? scene.table.options.frozenColCount ? scene.component.setFrozenColumnShadow(scene.table.frozenColCount - 1) : scene.table.options.frozenColCount && scene.component.setRightFrozenColumnShadow(scene.table.colCount - scene.table.rightFrozenColCount) : (scene.component.setFrozenColumnShadow(scene.table.frozenColCount - 1),
26
26
  scene.component.setRightFrozenColumnShadow(scene.table.colCount - scene.table.rightFrozenColCount)),
27
- scene.component.setBottonFrozenColumnShadow(), scene.component.setTopFrozenColumnShadow(),
27
+ scene.component.setBottomFrozenColumnShadow(), scene.component.setTopFrozenColumnShadow(),
28
28
  scene.hasFrozen = !0, scene.frozenColCount = scene.table.frozenColCount, scene.frozenRowCount = null !== (_d = null !== (_b = null === (_a = scene.colHeaderGroup.firstChild) || void 0 === _a ? void 0 : _a.childrenCount) && void 0 !== _b ? _b : null === (_c = scene.cornerHeaderGroup.firstChild) || void 0 === _c ? void 0 : _c.childrenCount) && void 0 !== _d ? _d : scene.table.frozenRowCount;
29
29
  }
30
30
 
@@ -47,7 +47,7 @@ export function resetFrozen(scene) {
47
47
  scene.bodyGroup.setAttribute("x", scene.rowHeaderGroup.attribute.width), scene.colHeaderGroup.setAttribute("x", scene.cornerHeaderGroup.attribute.width),
48
48
  scene.updateContainer(), scene.updateBorderSizeAndPosition(), scene.isPivot || scene.table.transpose ? scene.table.options.frozenColCount ? scene.component.setFrozenColumnShadow(scene.table.frozenColCount - 1) : scene.table.options.rightFrozenColCount && scene.component.setRightFrozenColumnShadow(scene.table.colCount - scene.table.rightFrozenColCount) : (scene.component.setFrozenColumnShadow(scene.table.frozenColCount - 1),
49
49
  scene.component.setRightFrozenColumnShadow(scene.table.colCount - scene.table.rightFrozenColCount)),
50
- scene.component.setBottonFrozenColumnShadow(), scene.component.setTopFrozenColumnShadow(),
50
+ scene.component.setBottomFrozenColumnShadow(), scene.component.setTopFrozenColumnShadow(),
51
51
  scene.hasFrozen = !0;
52
52
  }
53
53
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/scenegraph/layout/frozen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,KAA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":["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\n scene.component.setBottonFrozenColumnShadow();\n scene.component.setTopFrozenColumnShadow();\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\n scene.component.setBottonFrozenColumnShadow();\n scene.component.setTopFrozenColumnShadow();\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,MA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AAc,GAAG,IAAI,CAAC;SACvB;KACF;AACH,CAAC;AAED,SAAS,gCAAgC,CAAC,KAAiB;IACzD,IAAI,cAAc,GAAG,KAAK,CAAC;IAE3B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,mBAAmB,CAAC,aAAa,EAAE,CAAC,EAAE,EAAE;QAChE,MAAM,KAAK,GAAG,KAAK,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QACpD,IAAI,CAAC,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\n scene.component.setBottomFrozenColumnShadow();\n scene.component.setTopFrozenColumnShadow();\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\n scene.component.setBottomFrozenColumnShadow();\n scene.component.setTopFrozenColumnShadow();\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"]}
@@ -106,7 +106,7 @@ export function endMoveCol(state) {
106
106
  delete state.columnMove.rowTarget;
107
107
  }), 0), state.table.scenegraph.component.hideMoveCol(), state.columnResize.col < state.table.frozenColCount && !state.table.isPivotTable() && !state.table.transpose ? (state.table.scenegraph.component.setFrozenColumnShadow(state.table.frozenColCount - 1, state.columnResize.isRightFrozen),
108
108
  state.table.scenegraph.component.setRightFrozenColumnShadow(state.table.colCount - state.table.rightFrozenColCount)) : state.columnResize.col >= state.table.colCount - state.table.rightFrozenColCount && !state.table.isPivotTable() && !state.table.transpose ? state.table.scenegraph.component.setRightFrozenColumnShadow(state.table.colCount - state.table.rightFrozenColCount) : state.table.options.frozenColCount ? state.table.scenegraph.component.setFrozenColumnShadow(state.table.frozenColCount - 1) : state.table.options.rightFrozenColCount && state.table.scenegraph.component.setRightFrozenColumnShadow(state.table.colCount - state.table.rightFrozenColCount),
109
- state.table.scenegraph.component.setBottonFrozenColumnShadow(), state.table.scenegraph.component.setTopFrozenColumnShadow(),
109
+ state.table.scenegraph.component.setBottomFrozenColumnShadow(), state.table.scenegraph.component.setTopFrozenColumnShadow(),
110
110
  state.table.scenegraph.updateNextFrame(), !0 === (null === (_b = state.table.options.customConfig) || void 0 === _b ? void 0 : _b.notUpdateInColumnRowMove) || moveColResult;
111
111
  }
112
112
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/state/cell-move/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAI/D,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAI7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,MAAM,UAAU,YAAY,CAC1B,GAAW,EACX,GAAW,EACX,CAAS,EACT,CAAS,EACT,KAAmB,EACnB,KAA6C;;IAE7C,IAAI,CAAC,CAAC,uBAAuB,IAAI,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,EAAE;QACrE,OAAO;KACR;IACD,KAAK,CAAC,UAAU,CAAC,MAAM,GAAG,IAAI,CAAC;IAC/B,KAAK,CAAC,UAAU,CAAC,SAAS,GAAG,GAAG,CAAC;IACjC,KAAK,CAAC,UAAU,CAAC,SAAS,GAAG,GAAG,CAAC;IACjC,IAAK,KAAK,CAAC,KAAmB,CAAC,WAAW,EAAE,EAAE;QAC5C,MAAM,SAAS,GAA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K,IAAI,GAAG,GAAG,MAAM,EAAE,GAAG,IAAI,MAAM,EAAE,GAAG,EAAE,EAAE;QAC3C,KAAK,CAAC,uBAAuB,CAAC,GAAG,CAAC,CAAC;KACpC;IACD,KAAK,IAAI,GAAG,GAAG,MAAM,EAAE,GAAG,IAAI,MAAM,EAAE,GAAG,EAAE,EAAE;QAC3C,KAAK,CAAC,wBAAwB,CAAC,GAAG,CAAC,CAAC;KACrC;AACH,CAAC","file":"index.js","sourcesContent":["import type { ListTable } from '../../ListTable';\nimport { TABLE_EVENT_TYPE } from '../../core/TABLE_EVENT_TYPE';\nimport type { SimpleHeaderLayoutMap } from '../../layout';\nimport type { PivotHeaderLayoutMap } from '../../layout/pivot-header-layout';\nimport { getCellMergeInfo } from '../../scenegraph/utils/get-cell-merge';\nimport { computeChildrenNodeLength } from '../../tools/util';\nimport type { CellRange } from '../../ts-types';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport type { StateManager } from '../state';\nimport { adjustMoveHeaderTarget } from './adjust-header';\n\nexport function startMoveCol(\n col: number,\n row: number,\n x: number,\n y: number,\n state: StateManager,\n event: MouseEvent | PointerEvent | TouchEvent\n) {\n if (!('canMoveHeaderPosition' in state.table.internalProps.layoutMap)) {\n return;\n }\n state.columnMove.moving = true;\n state.columnMove.colSource = col;\n state.columnMove.rowSource = row;\n if ((state.table as ListTable).isListTable()) {\n const nodeIndex = (state.table as ListTable).getRecordIndexByCell(col, row);\n const nodeData = (state.table as ListTable).getRecordByCell(col, row);\n const hierarchyState = (state.table as ListTable).getRecordHierarchyState(col, row);\n state.columnMove.rowSourceSize = computeChildrenNodeLength(nodeIndex, hierarchyState, nodeData) + 1;\n }\n state.columnMove.x = x - state.table.tableX;\n state.columnMove.y = y - state.table.tableY;\n\n const cellLocation = state.table.getCellLocation(col, row);\n const delta =\n cellLocation === 'columnHeader'\n ? state.columnMove.x\n : cellLocation === 'rowHeader' ||\n (state.table.internalProps.layoutMap as SimpleHeaderLayoutMap).isSeriesNumberInBody(col, row)\n ? state.columnMove.y\n : 0;\n\n const { backX, lineX, backY, lineY } = state.table.scenegraph.component.showMoveCol(col, row, delta);\n\n state.table.fireListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION_START, {\n col,\n row,\n x,\n y,\n backX,\n lineX,\n backY,\n lineY,\n event\n });\n // 调整列顺序期间清空选中清空\n const isHasSelected = !!state.select.ranges?.length;\n state.table.stateManager.updateSelectPos(-1, -1);\n state.table.stateManager.endSelectCells(true, isHasSelected);\n state.table.scenegraph.updateNextFrame();\n}\n\nexport function updateMoveCol(\n col: number,\n row: number,\n x: number,\n y: number,\n state: StateManager,\n event: MouseEvent | PointerEvent | TouchEvent\n) {\n if (!('canMoveHeaderPosition' in state.table.internalProps.layoutMap)) {\n return;\n }\n\n const targetCell = adjustMoveHeaderTarget(\n { col: state.columnMove.colSource, row: state.columnMove.rowSource },\n { col, row },\n state.table\n );\n const canMove = state.table.internalProps.layoutMap.canMoveHeaderPosition(\n { col: state.columnMove.colSource, row: state.columnMove.rowSource },\n { col: targetCell.col, row: targetCell.row }\n );\n if (!canMove) {\n state.updateCursor('not-allowed');\n state.columnMove.colTarget = state.columnMove.colSource;\n state.columnMove.rowTarget = state.columnMove.rowSource;\n } else {\n state.columnMove.x = x - state.table.tableX;\n state.columnMove.y = y - state.table.tableY;\n state.columnMove.colTarget = targetCell.col;\n state.columnMove.rowTarget = targetCell.row;\n if ((state.table as ListTable).isListTable()) {\n const nodeIndex = (state.table as ListTable).getRecordIndexByCell(targetCell.col, targetCell.row);\n const nodeData = (state.table as ListTable).getRecordByCell(targetCell.col, targetCell.row);\n const hierarchyState = (state.table as ListTable).getRecordHierarchyState(targetCell.col, targetCell.row);\n state.columnMove.rowTargetSize = computeChildrenNodeLength(nodeIndex, hierarchyState, nodeData) + 1;\n }\n state.updateCursor('grabbing');\n let lineX;\n let backX;\n let lineY;\n let backY;\n const cellLocation = state.table.getCellLocation(state.columnMove.colSource, state.columnMove.rowSource);\n if (cellLocation === 'columnHeader') {\n backX = state.columnMove.x;\n if (state.table.isLeftFrozenColumn(col)) {\n lineX =\n state.columnMove.colTarget >= state.columnMove.colSource\n ? state.table.getColsWidth(0, state.columnMove.colTarget)\n : state.table.getColsWidth(0, state.columnMove.colTarget - 1);\n } else if (state.table.isRightFrozenColumn(col)) {\n lineX = state.table.tableNoFrameWidth - state.table.getColsWidth(targetCell.col + 1, state.table.colCount - 1);\n } else {\n lineX =\n (state.columnMove.colTarget >= state.columnMove.colSource\n ? state.table.getColsWidth(0, state.columnMove.colTarget)\n : state.table.getColsWidth(0, state.columnMove.colTarget - 1)) -\n state.table.stateManager.scroll.horizontalBarPos;\n }\n } else if (\n cellLocation === 'rowHeader' ||\n (state.table.internalProps.layoutMap as SimpleHeaderLayoutMap).isSeriesNumberInBody(col, row)\n ) {\n backY = state.columnMove.y;\n if (state.table.isFrozenRow(row)) {\n lineY =\n state.columnMove.rowTarget >= state.columnMove.rowSource\n ? state.table.getRowsHeight(0, state.columnMove.rowTarget)\n : state.table.getRowsHeight(0, state.columnMove.rowTarget - 1);\n } else if (state.table.isBottomFrozenRow(row)) {\n lineY =\n state.table.tableNoFrameHeight - state.table.getRowsHeight(targetCell.row + 1, state.table.rowCount - 1);\n } else {\n lineY =\n (state.columnMove.rowTarget >= state.columnMove.rowSource\n ? state.table.getRowsHeight(0, state.columnMove.rowTarget)\n : state.table.getRowsHeight(0, state.columnMove.rowTarget - 1)) -\n state.table.stateManager.scroll.verticalBarPos;\n }\n }\n state.table.scenegraph.component.updateMoveCol(backX, lineX, backY, lineY);\n state.table.fireListeners(TABLE_EVENT_TYPE.CHANGING_HEADER_POSITION, {\n col,\n row,\n x,\n y,\n backX,\n lineX,\n backY,\n lineY,\n event\n });\n state.table.scenegraph.updateNextFrame();\n }\n}\n\nexport function endMoveCol(state: StateManager): boolean {\n let moveColResult = false;\n if (\n 'canMoveHeaderPosition' in state.table.internalProps.layoutMap &&\n state.columnMove.moving &&\n state.columnMove.colSource >= 0 &&\n state.columnMove.rowSource >= 0 &&\n state.columnMove.colTarget >= 0 &&\n state.columnMove.rowTarget >= 0 &&\n state.table.options.customConfig?.notUpdateInColumnRowMove !== true\n ) {\n //getCellMergeInfo 一定要在moveHeaderPosition之前调用 否则就不是修改前的range了\n const oldSourceMergeInfo = state.table.getCellRange(state.columnMove.colSource, state.columnMove.rowSource);\n const oldTargetMergeInfo = state.table.getCellRange(state.columnMove.colTarget, state.columnMove.rowTarget);\n // 调整列顺序\n const moveContext = state.table._moveHeaderPosition(\n { col: state.columnMove.colSource, row: state.columnMove.rowSource },\n { col: state.columnMove.colTarget, row: state.columnMove.rowTarget }\n );\n\n // 更新状态\n if (moveContext && moveContext.targetIndex !== moveContext.sourceIndex) {\n state.table.internalProps.useOneRowHeightFillAll = false;\n state.table.internalProps.layoutMap.clearCellRangeMap();\n const sourceMergeInfo = state.table.getCellRange(state.columnMove.colSource, state.columnMove.rowSource);\n const targetMergeInfo = state.table.getCellRange(state.columnMove.colTarget, state.columnMove.rowTarget);\n\n const colMin = Math.min(\n sourceMergeInfo.start.col,\n targetMergeInfo.start.col,\n oldSourceMergeInfo.start.col,\n oldTargetMergeInfo.start.col\n );\n const colMax = Math.max(\n sourceMergeInfo.end.col,\n targetMergeInfo.end.col,\n oldSourceMergeInfo.end.col,\n oldTargetMergeInfo.end.col\n );\n const rowMin = Math.min(\n sourceMergeInfo.start.row,\n targetMergeInfo.start.row,\n oldSourceMergeInfo.start.row,\n oldTargetMergeInfo.start.row\n );\n let rowMax = Math.max(\n sourceMergeInfo.end.row,\n targetMergeInfo.end.row,\n oldSourceMergeInfo.end.row,\n oldTargetMergeInfo.end.row\n );\n if (\n moveContext.moveType === 'row' &&\n (state.table.internalProps.layoutMap as PivotHeaderLayoutMap).rowHierarchyType === 'tree'\n ) {\n if (moveContext.targetIndex > moveContext.sourceIndex) {\n rowMax = rowMax + moveContext.targetSize - 1;\n } else {\n rowMax = rowMax + moveContext.sourceSize - 1;\n }\n }\n if (\n !(state.table as ListTable).transpose &&\n (state.table.internalProps.layoutMap as SimpleHeaderLayoutMap).isSeriesNumberInBody(\n state.columnMove.colSource,\n state.columnMove.rowSource\n )\n ) {\n state.table.changeRecordOrder(moveContext.sourceIndex, moveContext.targetIndex);\n state.changeCheckboxAndRadioOrder(moveContext.sourceIndex, moveContext.targetIndex);\n }\n // clear columns width and rows height cache\n if (moveContext.moveType === 'column') {\n clearWidthsAndHeightsCache(colMin, colMax, 0, -1, state.table);\n } else {\n clearWidthsAndHeightsCache(0, -1, rowMin, rowMax, state.table);\n }\n\n // clear cell style cache\n state.table.clearCellStyleCache();\n if (\n state.table.internalProps.layoutMap.isSeriesNumberInBody(state.columnMove.colSource, state.columnMove.rowSource)\n ) {\n // 如果是拖拽序号换位置 考虑到非拖拽单元格合并而是其他地方有合并被拆开或者独立单元格拖拽后变为合并的情况 这里直接刷新这个场景树的节点 才能覆盖所有情况\n state.table.scenegraph.updateHeaderPosition(\n state.table.scenegraph.proxy.colStart,\n state.table.scenegraph.proxy.colEnd,\n state.table.scenegraph.proxy.rowStart,\n state.table.scenegraph.proxy.rowEnd,\n moveContext.moveType\n );\n } else if (moveContext.moveType === 'column') {\n state.table.scenegraph.updateHeaderPosition(colMin, colMax, 0, -1, moveContext.moveType);\n } else {\n state.table.scenegraph.updateHeaderPosition(0, -1, rowMin, rowMax, moveContext.moveType);\n }\n //调整冻结列数量\n if (state.table.internalProps.frozenColDragHeaderMode === 'adjustFrozenCount' && state.table.isListTable()) {\n if (\n state.table.isLeftFrozenColumn(state.columnMove.colTarget) &&\n !state.table.isLeftFrozenColumn(state.columnMove.colSource)\n ) {\n state.table.frozenColCount +=\n (sourceMergeInfo as CellRange).end.col - (sourceMergeInfo as CellRange).start.col + 1;\n } else if (\n state.table.isLeftFrozenColumn(state.columnMove.colSource) &&\n !state.table.isLeftFrozenColumn(state.columnMove.colTarget)\n ) {\n state.table.frozenColCount -=\n (sourceMergeInfo as CellRange).end.col - (sourceMergeInfo as CellRange).start.col + 1;\n }\n if (\n state.table.isRightFrozenColumn(state.columnMove.colTarget) &&\n !state.table.isRightFrozenColumn(state.columnMove.colSource)\n ) {\n state.table.rightFrozenColCount +=\n (sourceMergeInfo as CellRange).end.col - (sourceMergeInfo as CellRange).start.col + 1;\n } else if (\n state.table.isRightFrozenColumn(state.columnMove.colSource) &&\n !state.table.isRightFrozenColumn(state.columnMove.colTarget)\n ) {\n state.table.rightFrozenColCount -=\n (sourceMergeInfo as CellRange).end.col - (sourceMergeInfo as CellRange).start.col + 1;\n }\n }\n moveColResult = true;\n } else {\n state.updateCursor();\n //触发事件 CHANGE_HEADER_POSITION 还需要用到这些值 所以延迟清理\n state.columnMove.moving = false;\n delete state.columnMove.colSource;\n delete state.columnMove.rowSource;\n delete state.columnMove.colTarget;\n delete state.columnMove.rowTarget;\n state.table.scenegraph.component.hideMoveCol();\n state.table.scenegraph.updateNextFrame();\n return false;\n }\n }\n state.columnMove.moving = false;\n setTimeout(() => {\n //触发事件 CHANGE_HEADER_POSITION 还需要用到这些值 所以延迟清理\n delete state.columnMove.colSource;\n delete state.columnMove.rowSource;\n delete state.columnMove.colTarget;\n delete state.columnMove.rowTarget;\n }, 0);\n state.table.scenegraph.component.hideMoveCol();\n // update frozen shadowline component\n if (\n state.columnResize.col < state.table.frozenColCount &&\n !state.table.isPivotTable() &&\n !(state.table as ListTable).transpose\n ) {\n state.table.scenegraph.component.setFrozenColumnShadow(\n state.table.frozenColCount - 1,\n state.columnResize.isRightFrozen\n );\n state.table.scenegraph.component.setRightFrozenColumnShadow(state.table.colCount - state.table.rightFrozenColCount);\n } else if (\n state.columnResize.col >= state.table.colCount - state.table.rightFrozenColCount &&\n !state.table.isPivotTable() &&\n !(state.table as ListTable).transpose\n ) {\n state.table.scenegraph.component.setRightFrozenColumnShadow(state.table.colCount - state.table.rightFrozenColCount);\n } else if (state.table.options.frozenColCount) {\n state.table.scenegraph.component.setFrozenColumnShadow(state.table.frozenColCount - 1);\n } else if (state.table.options.rightFrozenColCount) {\n state.table.scenegraph.component.setRightFrozenColumnShadow(state.table.colCount - state.table.rightFrozenColCount);\n }\n\n state.table.scenegraph.component.setBottonFrozenColumnShadow();\n state.table.scenegraph.component.setTopFrozenColumnShadow();\n\n state.table.scenegraph.updateNextFrame();\n\n if (state.table.options.customConfig?.notUpdateInColumnRowMove === true) {\n return true;\n }\n return moveColResult;\n}\n\nfunction clearWidthsAndHeightsCache(\n colMin: number,\n colMax: number,\n rowMin: number,\n rowMax: number,\n table: BaseTableAPI\n) {\n for (let col = colMin; col <= colMax; col++) {\n table._clearColRangeWidthsMap(col);\n }\n for (let row = rowMin; row <= rowMax; row++) {\n table._clearRowRangeHeightsMap(row);\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/state/cell-move/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAI/D,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAI7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,MAAM,UAAU,YAAY,CAC1B,GAAW,EACX,GAAW,EACX,CAAS,EACT,CAAS,EACT,KAAmB,EACnB,KAA6C;;IAE7C,IAAI,CAAC,CAAC,uBAAuB,IAAI,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,EAAE;QACrE,OAAO;KACR;IACD,KAAK,CAAC,UAAU,CAAC,MAAM,GAAG,IAAI,CAAC;IAC/B,KAAK,CAAC,UAAU,CAAC,SAAS,GAAG,GAAG,CAAC;IACjC,KAAK,CAAC,UAAU,CAAC,SAAS,GAAG,GAAG,CAAC;IACjC,IAAK,KAAK,CAAC,KAAmB,CAAC,WAAW,EAAE,EAAE;QAC5C,MAAM,SAAS,GAAI,KAAK,CAAC,KAAmB,CAAC,oBAAoB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QAC5E,MAAM,QAAQ,GAAI,KAAK,CAAC,KAAmB,CAAC,eAAe,CAA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ACD,KAAK,IAAI,GAAG,GAAG,MAAM,EAAE,GAAG,IAAI,MAAM,EAAE,GAAG,EAAE,EAAE;QAC3C,KAAK,CAAC,wBAAwB,CAAC,GAAG,CAAC,CAAC;KACrC;AACH,CAAC","file":"index.js","sourcesContent":["import type { ListTable } from '../../ListTable';\nimport { TABLE_EVENT_TYPE } from '../../core/TABLE_EVENT_TYPE';\nimport type { SimpleHeaderLayoutMap } from '../../layout';\nimport type { PivotHeaderLayoutMap } from '../../layout/pivot-header-layout';\nimport { getCellMergeInfo } from '../../scenegraph/utils/get-cell-merge';\nimport { computeChildrenNodeLength } from '../../tools/util';\nimport type { CellRange } from '../../ts-types';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport type { StateManager } from '../state';\nimport { adjustMoveHeaderTarget } from './adjust-header';\n\nexport function startMoveCol(\n col: number,\n row: number,\n x: number,\n y: number,\n state: StateManager,\n event: MouseEvent | PointerEvent | TouchEvent\n) {\n if (!('canMoveHeaderPosition' in state.table.internalProps.layoutMap)) {\n return;\n }\n state.columnMove.moving = true;\n state.columnMove.colSource = col;\n state.columnMove.rowSource = row;\n if ((state.table as ListTable).isListTable()) {\n const nodeIndex = (state.table as ListTable).getRecordIndexByCell(col, row);\n const nodeData = (state.table as ListTable).getRecordByCell(col, row);\n const hierarchyState = (state.table as ListTable).getRecordHierarchyState(col, row);\n state.columnMove.rowSourceSize = computeChildrenNodeLength(nodeIndex, hierarchyState, nodeData) + 1;\n }\n state.columnMove.x = x - state.table.tableX;\n state.columnMove.y = y - state.table.tableY;\n\n const cellLocation = state.table.getCellLocation(col, row);\n const delta =\n cellLocation === 'columnHeader'\n ? state.columnMove.x\n : cellLocation === 'rowHeader' ||\n (state.table.internalProps.layoutMap as SimpleHeaderLayoutMap).isSeriesNumberInBody(col, row)\n ? state.columnMove.y\n : 0;\n\n const { backX, lineX, backY, lineY } = state.table.scenegraph.component.showMoveCol(col, row, delta);\n\n state.table.fireListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION_START, {\n col,\n row,\n x,\n y,\n backX,\n lineX,\n backY,\n lineY,\n event\n });\n // 调整列顺序期间清空选中清空\n const isHasSelected = !!state.select.ranges?.length;\n state.table.stateManager.updateSelectPos(-1, -1);\n state.table.stateManager.endSelectCells(true, isHasSelected);\n state.table.scenegraph.updateNextFrame();\n}\n\nexport function updateMoveCol(\n col: number,\n row: number,\n x: number,\n y: number,\n state: StateManager,\n event: MouseEvent | PointerEvent | TouchEvent\n) {\n if (!('canMoveHeaderPosition' in state.table.internalProps.layoutMap)) {\n return;\n }\n\n const targetCell = adjustMoveHeaderTarget(\n { col: state.columnMove.colSource, row: state.columnMove.rowSource },\n { col, row },\n state.table\n );\n const canMove = state.table.internalProps.layoutMap.canMoveHeaderPosition(\n { col: state.columnMove.colSource, row: state.columnMove.rowSource },\n { col: targetCell.col, row: targetCell.row }\n );\n if (!canMove) {\n state.updateCursor('not-allowed');\n state.columnMove.colTarget = state.columnMove.colSource;\n state.columnMove.rowTarget = state.columnMove.rowSource;\n } else {\n state.columnMove.x = x - state.table.tableX;\n state.columnMove.y = y - state.table.tableY;\n state.columnMove.colTarget = targetCell.col;\n state.columnMove.rowTarget = targetCell.row;\n if ((state.table as ListTable).isListTable()) {\n const nodeIndex = (state.table as ListTable).getRecordIndexByCell(targetCell.col, targetCell.row);\n const nodeData = (state.table as ListTable).getRecordByCell(targetCell.col, targetCell.row);\n const hierarchyState = (state.table as ListTable).getRecordHierarchyState(targetCell.col, targetCell.row);\n state.columnMove.rowTargetSize = computeChildrenNodeLength(nodeIndex, hierarchyState, nodeData) + 1;\n }\n state.updateCursor('grabbing');\n let lineX;\n let backX;\n let lineY;\n let backY;\n const cellLocation = state.table.getCellLocation(state.columnMove.colSource, state.columnMove.rowSource);\n if (cellLocation === 'columnHeader') {\n backX = state.columnMove.x;\n if (state.table.isLeftFrozenColumn(col)) {\n lineX =\n state.columnMove.colTarget >= state.columnMove.colSource\n ? state.table.getColsWidth(0, state.columnMove.colTarget)\n : state.table.getColsWidth(0, state.columnMove.colTarget - 1);\n } else if (state.table.isRightFrozenColumn(col)) {\n lineX = state.table.tableNoFrameWidth - state.table.getColsWidth(targetCell.col + 1, state.table.colCount - 1);\n } else {\n lineX =\n (state.columnMove.colTarget >= state.columnMove.colSource\n ? state.table.getColsWidth(0, state.columnMove.colTarget)\n : state.table.getColsWidth(0, state.columnMove.colTarget - 1)) -\n state.table.stateManager.scroll.horizontalBarPos;\n }\n } else if (\n cellLocation === 'rowHeader' ||\n (state.table.internalProps.layoutMap as SimpleHeaderLayoutMap).isSeriesNumberInBody(col, row)\n ) {\n backY = state.columnMove.y;\n if (state.table.isFrozenRow(row)) {\n lineY =\n state.columnMove.rowTarget >= state.columnMove.rowSource\n ? state.table.getRowsHeight(0, state.columnMove.rowTarget)\n : state.table.getRowsHeight(0, state.columnMove.rowTarget - 1);\n } else if (state.table.isBottomFrozenRow(row)) {\n lineY =\n state.table.tableNoFrameHeight - state.table.getRowsHeight(targetCell.row + 1, state.table.rowCount - 1);\n } else {\n lineY =\n (state.columnMove.rowTarget >= state.columnMove.rowSource\n ? state.table.getRowsHeight(0, state.columnMove.rowTarget)\n : state.table.getRowsHeight(0, state.columnMove.rowTarget - 1)) -\n state.table.stateManager.scroll.verticalBarPos;\n }\n }\n state.table.scenegraph.component.updateMoveCol(backX, lineX, backY, lineY);\n state.table.fireListeners(TABLE_EVENT_TYPE.CHANGING_HEADER_POSITION, {\n col,\n row,\n x,\n y,\n backX,\n lineX,\n backY,\n lineY,\n event\n });\n state.table.scenegraph.updateNextFrame();\n }\n}\n\nexport function endMoveCol(state: StateManager): boolean {\n let moveColResult = false;\n if (\n 'canMoveHeaderPosition' in state.table.internalProps.layoutMap &&\n state.columnMove.moving &&\n state.columnMove.colSource >= 0 &&\n state.columnMove.rowSource >= 0 &&\n state.columnMove.colTarget >= 0 &&\n state.columnMove.rowTarget >= 0 &&\n state.table.options.customConfig?.notUpdateInColumnRowMove !== true\n ) {\n //getCellMergeInfo 一定要在moveHeaderPosition之前调用 否则就不是修改前的range了\n const oldSourceMergeInfo = state.table.getCellRange(state.columnMove.colSource, state.columnMove.rowSource);\n const oldTargetMergeInfo = state.table.getCellRange(state.columnMove.colTarget, state.columnMove.rowTarget);\n // 调整列顺序\n const moveContext = state.table._moveHeaderPosition(\n { col: state.columnMove.colSource, row: state.columnMove.rowSource },\n { col: state.columnMove.colTarget, row: state.columnMove.rowTarget }\n );\n\n // 更新状态\n if (moveContext && moveContext.targetIndex !== moveContext.sourceIndex) {\n state.table.internalProps.useOneRowHeightFillAll = false;\n state.table.internalProps.layoutMap.clearCellRangeMap();\n const sourceMergeInfo = state.table.getCellRange(state.columnMove.colSource, state.columnMove.rowSource);\n const targetMergeInfo = state.table.getCellRange(state.columnMove.colTarget, state.columnMove.rowTarget);\n\n const colMin = Math.min(\n sourceMergeInfo.start.col,\n targetMergeInfo.start.col,\n oldSourceMergeInfo.start.col,\n oldTargetMergeInfo.start.col\n );\n const colMax = Math.max(\n sourceMergeInfo.end.col,\n targetMergeInfo.end.col,\n oldSourceMergeInfo.end.col,\n oldTargetMergeInfo.end.col\n );\n const rowMin = Math.min(\n sourceMergeInfo.start.row,\n targetMergeInfo.start.row,\n oldSourceMergeInfo.start.row,\n oldTargetMergeInfo.start.row\n );\n let rowMax = Math.max(\n sourceMergeInfo.end.row,\n targetMergeInfo.end.row,\n oldSourceMergeInfo.end.row,\n oldTargetMergeInfo.end.row\n );\n if (\n moveContext.moveType === 'row' &&\n (state.table.internalProps.layoutMap as PivotHeaderLayoutMap).rowHierarchyType === 'tree'\n ) {\n if (moveContext.targetIndex > moveContext.sourceIndex) {\n rowMax = rowMax + moveContext.targetSize - 1;\n } else {\n rowMax = rowMax + moveContext.sourceSize - 1;\n }\n }\n if (\n !(state.table as ListTable).transpose &&\n (state.table.internalProps.layoutMap as SimpleHeaderLayoutMap).isSeriesNumberInBody(\n state.columnMove.colSource,\n state.columnMove.rowSource\n )\n ) {\n state.table.changeRecordOrder(moveContext.sourceIndex, moveContext.targetIndex);\n state.changeCheckboxAndRadioOrder(moveContext.sourceIndex, moveContext.targetIndex);\n }\n // clear columns width and rows height cache\n if (moveContext.moveType === 'column') {\n clearWidthsAndHeightsCache(colMin, colMax, 0, -1, state.table);\n } else {\n clearWidthsAndHeightsCache(0, -1, rowMin, rowMax, state.table);\n }\n\n // clear cell style cache\n state.table.clearCellStyleCache();\n if (\n state.table.internalProps.layoutMap.isSeriesNumberInBody(state.columnMove.colSource, state.columnMove.rowSource)\n ) {\n // 如果是拖拽序号换位置 考虑到非拖拽单元格合并而是其他地方有合并被拆开或者独立单元格拖拽后变为合并的情况 这里直接刷新这个场景树的节点 才能覆盖所有情况\n state.table.scenegraph.updateHeaderPosition(\n state.table.scenegraph.proxy.colStart,\n state.table.scenegraph.proxy.colEnd,\n state.table.scenegraph.proxy.rowStart,\n state.table.scenegraph.proxy.rowEnd,\n moveContext.moveType\n );\n } else if (moveContext.moveType === 'column') {\n state.table.scenegraph.updateHeaderPosition(colMin, colMax, 0, -1, moveContext.moveType);\n } else {\n state.table.scenegraph.updateHeaderPosition(0, -1, rowMin, rowMax, moveContext.moveType);\n }\n //调整冻结列数量\n if (state.table.internalProps.frozenColDragHeaderMode === 'adjustFrozenCount' && state.table.isListTable()) {\n if (\n state.table.isLeftFrozenColumn(state.columnMove.colTarget) &&\n !state.table.isLeftFrozenColumn(state.columnMove.colSource)\n ) {\n state.table.frozenColCount +=\n (sourceMergeInfo as CellRange).end.col - (sourceMergeInfo as CellRange).start.col + 1;\n } else if (\n state.table.isLeftFrozenColumn(state.columnMove.colSource) &&\n !state.table.isLeftFrozenColumn(state.columnMove.colTarget)\n ) {\n state.table.frozenColCount -=\n (sourceMergeInfo as CellRange).end.col - (sourceMergeInfo as CellRange).start.col + 1;\n }\n if (\n state.table.isRightFrozenColumn(state.columnMove.colTarget) &&\n !state.table.isRightFrozenColumn(state.columnMove.colSource)\n ) {\n state.table.rightFrozenColCount +=\n (sourceMergeInfo as CellRange).end.col - (sourceMergeInfo as CellRange).start.col + 1;\n } else if (\n state.table.isRightFrozenColumn(state.columnMove.colSource) &&\n !state.table.isRightFrozenColumn(state.columnMove.colTarget)\n ) {\n state.table.rightFrozenColCount -=\n (sourceMergeInfo as CellRange).end.col - (sourceMergeInfo as CellRange).start.col + 1;\n }\n }\n moveColResult = true;\n } else {\n state.updateCursor();\n //触发事件 CHANGE_HEADER_POSITION 还需要用到这些值 所以延迟清理\n state.columnMove.moving = false;\n delete state.columnMove.colSource;\n delete state.columnMove.rowSource;\n delete state.columnMove.colTarget;\n delete state.columnMove.rowTarget;\n state.table.scenegraph.component.hideMoveCol();\n state.table.scenegraph.updateNextFrame();\n return false;\n }\n }\n state.columnMove.moving = false;\n setTimeout(() => {\n //触发事件 CHANGE_HEADER_POSITION 还需要用到这些值 所以延迟清理\n delete state.columnMove.colSource;\n delete state.columnMove.rowSource;\n delete state.columnMove.colTarget;\n delete state.columnMove.rowTarget;\n }, 0);\n state.table.scenegraph.component.hideMoveCol();\n // update frozen shadowline component\n if (\n state.columnResize.col < state.table.frozenColCount &&\n !state.table.isPivotTable() &&\n !(state.table as ListTable).transpose\n ) {\n state.table.scenegraph.component.setFrozenColumnShadow(\n state.table.frozenColCount - 1,\n state.columnResize.isRightFrozen\n );\n state.table.scenegraph.component.setRightFrozenColumnShadow(state.table.colCount - state.table.rightFrozenColCount);\n } else if (\n state.columnResize.col >= state.table.colCount - state.table.rightFrozenColCount &&\n !state.table.isPivotTable() &&\n !(state.table as ListTable).transpose\n ) {\n state.table.scenegraph.component.setRightFrozenColumnShadow(state.table.colCount - state.table.rightFrozenColCount);\n } else if (state.table.options.frozenColCount) {\n state.table.scenegraph.component.setFrozenColumnShadow(state.table.frozenColCount - 1);\n } else if (state.table.options.rightFrozenColCount) {\n state.table.scenegraph.component.setRightFrozenColumnShadow(state.table.colCount - state.table.rightFrozenColCount);\n }\n\n state.table.scenegraph.component.setBottomFrozenColumnShadow();\n state.table.scenegraph.component.setTopFrozenColumnShadow();\n\n state.table.scenegraph.updateNextFrame();\n\n if (state.table.options.customConfig?.notUpdateInColumnRowMove === true) {\n return true;\n }\n return moveColResult;\n}\n\nfunction clearWidthsAndHeightsCache(\n colMin: number,\n colMax: number,\n rowMin: number,\n rowMax: number,\n table: BaseTableAPI\n) {\n for (let col = colMin; col <= colMax; col++) {\n table._clearColRangeWidthsMap(col);\n }\n for (let row = rowMin; row <= rowMax; row++) {\n table._clearRowRangeHeightsMap(row);\n }\n}\n"]}
@@ -25,7 +25,7 @@ export function updateResizeColumn(xInTable, yInTable, state) {
25
25
  state.columnResize.x = xInTable, state.table.scenegraph.component.updateResizeCol(state.columnResize.col, yInTable, state.columnResize.isRightFrozen),
26
26
  state.table._updateSize(), state.columnResize.col < state.table.frozenColCount && !state.table.isPivotTable() && !state.table.transpose ? state.table.scenegraph.component.setFrozenColumnShadow(state.table.frozenColCount - 1, state.columnResize.isRightFrozen) : state.table.options.frozenColCount && state.table.scenegraph.component.setFrozenColumnShadow(state.table.frozenColCount - 1),
27
27
  (state.columnResize.col >= state.table.colCount - state.table.rightFrozenColCount && !state.table.isPivotTable() && !state.table.transpose || state.table.options.rightFrozenColCount) && state.table.scenegraph.component.setRightFrozenColumnShadow(state.table.colCount - state.table.rightFrozenColCount),
28
- state.table.scenegraph.component.setBottonFrozenColumnShadow(), state.table.scenegraph.component.setTopFrozenColumnShadow(),
28
+ state.table.scenegraph.component.setBottomFrozenColumnShadow(), state.table.scenegraph.component.setTopFrozenColumnShadow(),
29
29
  state.table.scenegraph.updateNextFrame();
30
30
  }
31
31